[
  {
    "path": ".cargo/config.toml",
    "content": "[target.'cfg(target_env = \"gnu\")']\nrustflags = [\"-C\", \"link-args=-Wl,-z,nodelete\"]\n\n[target.wasm32-unknown-unknown]\nrustflags = [\"-C\", \"link-arg=--export-table\"]\n"
  },
  {
    "path": ".devcontainer/devcontainer.json",
    "content": "// For format details, see https://aka.ms/devcontainer.json. For config options, see the\n// README at: https://github.com/devcontainers/templates/tree/main/src/rust\n{\n  \"name\": \"Rust\",\n  // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile\n  \"image\": \"mcr.microsoft.com/devcontainers/rust:1-1-bullseye\",\n  \"features\": {\n    \"ghcr.io/devcontainers/features/node:1\": {\n      \"nodeGypDependencies\": true,\n      \"version\": \"18\",\n      \"nvmVersion\": \"latest\"\n    }\n  }\n\n  // Use 'mounts' to make the cargo cache persistent in a Docker Volume.\n  // \"mounts\": [\n  // \t{\n  // \t\t\"source\": \"devcontainer-cargo-cache-${devcontainerId}\",\n  // \t\t\"target\": \"/usr/local/cargo\",\n  // \t\t\"type\": \"volume\"\n  // \t}\n  // ]\n\n  // Features to add to the dev container. More info: https://containers.dev/features.\n  // \"features\": {},\n\n  // Use 'forwardPorts' to make a list of ports inside the container available locally.\n  // \"forwardPorts\": [],\n\n  // Use 'postCreateCommand' to run commands after the container is created.\n  // \"postCreateCommand\": \"rustc --version\",\n\n  // Configure tool-specific properties.\n  // \"customizations\": {},\n\n  // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.\n  // \"remoteUser\": \"root\"\n}\n"
  },
  {
    "path": ".editorconfig",
    "content": "# https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 2\nindent_style = space\ninsert_final_newline = true\nmax_line_length = 80\ntrim_trailing_whitespace = true\n\n[*.md]\nmax_line_length = 0\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": ".eslintignore",
    "content": "# ESLint does not support both\n#   - import used as a function, and\n#   - the export statement\n# in the same file\n\nflow-typed\n\nvendor\npackages/*/*/test/integration/**\npackages/*/*/test/mochareporters.json\npackages/core/integration-tests/test/input/**\npackages/core/utils/test/input/**\npackages/utils/create-react-app/templates\npackages/utils/create-parcel-app/templates\npackages/examples\n\n# Generated by the build\nlib\ndist\n/test/dist\n/test/input\n*.min.js\npackages/core/rust/index.js\n\ncoverage\nnode_modules\ntmp\nfixtures\n"
  },
  {
    "path": ".eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config\"\n}\n"
  },
  {
    "path": ".flowconfig",
    "content": "[ignore]\n.*/node_modules/@choojs/**/.*\n.*/node_modules/config-chain/.*\n.*/node_modules/graphviz/documentation.json\n.*/node_modules/resolve/test/**/.*\n<PROJECT_ROOT>/.nyc_output/.*\n.*/tmp/**/.*\n.*/.parcel-cache/.*\n<PROJECT_ROOT>/packages/core/integration-tests/dist/**\n<PROJECT_ROOT>/packages/core/integration-tests/test/input/**\n<PROJECT_ROOT>/packages/core/integration-tests/test/integration/babel-strip-flow-types/**\n<PROJECT_ROOT>/packages/core/integration-tests/test/integration/diagnostic-sourcemap/**\n<PROJECT_ROOT>/packages/utils/node-resolver-core/test/fixture/node_modules/json-error/package.json\n\n[untyped]\n.*/node_modules/graphql/error/GraphQLError.js.flow\n\n[include]\n\n[libs]\nflow-libs/\n\n[lints]\nimplicit-inexact-object=error\nuntyped-type-import=error\n\n[options]\nmodule.system.node.main_field=source\nmodule.system.node.main_field=main\nreact.runtime=automatic\n\n[strict]\nnonstrict-import\nsketchy-null-number\nsketchy-null-string\nsketchy-null-mixed\nunclear-type\nuntyped-import\nuntyped-type-import\n\n[version]\n0.184.0\n"
  },
  {
    "path": ".gitattributes",
    "content": "# Always use unix style line-endings\n* text eol=lf\n*.jpeg binary\n*.jpg binary\n*.png binary\n*.wasm binary\n*.woff2 binary\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "open_collective: parcel\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Bug_Report.md",
    "content": "---\nname: 🐛 Bug Report\nabout: Did something not work as expected?\n---\n\n<!---\nThanks for filing an issue 😄 ! Before you submit, please read the following:\n\nSearch open/closed issues before submitting since someone might have asked the same thing before!\n-->\n\n# 🐛 bug report\n\n<!--- Provide a general summary of the issue here -->\n\n## 🎛 Configuration (.babelrc, package.json, cli command)\n\n<!--- If describing a bug, tell us what your babel configuration looks like -->\n\n```js\n{\n  \"your\": { \"config\": \"here\" }\n}\n```\n\n## 🤔 Expected Behavior\n\n<!--- Tell us what should happen -->\n\n## 😯 Current Behavior\n\n<!--- Tell us what happens instead of the expected behavior -->\n\n<!--- If you are seeing an error, please include the full error message and stack trace -->\n\n## 💁 Possible Solution\n\n<!--- Not obligatory, but suggest a fix/reason for the bug -->\n\n## 🔦 Context\n\n<!--- How has this issue affected you? What are you trying to accomplish? -->\n\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\n\n## 💻 Code Sample\n\n<!-- Please provide a code repository, gist, code snippet or sample files to reproduce the issue -->\n\n## 🌍 Your Environment\n\n<!--- Include as many relevant details about the environment you experienced the bug in -->\n\n| Software         | Version(s) |\n| ---------------- | ---------- |\n| Parcel           |\n| Node             |\n| npm/Yarn         |\n| Operating System |\n\n<!-- Love parcel? Please consider supporting our collective:\n👉  https://opencollective.com/parcel/donate -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Feature_Request.md",
    "content": "---\nname: 🙋 Feature Request\nabout: Want us to add something to parcel?\n---\n\n<!---\nThanks for filing an issue 😄 ! Before you submit, please read the following:\n\nSearch open/closed issues before submitting since someone might have asked the same thing before!\n-->\n\n# 🙋 feature request\n\n<!--- Provide a general summary of the issue here -->\n\n## 🤔 Expected Behavior\n\n<!--- Tell us how the feature should work -->\n\n## 😯 Current Behavior\n\n<!--- Explain the difference from current behavior -->\n\n## 💁 Possible Solution\n\n<!--- Ideas how to implement this feature or a similar solution/workaround that already exists -->\n\n## 🔦 Context\n\n<!--- How has this issue affected you? What are you trying to accomplish? -->\n\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\n\n## 💻 Examples\n\n<!-- Examples help us understand the requested feature better -->\n\n<!-- Love parcel? Please consider supporting our collective:\n👉  https://opencollective.com/parcel/donate -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/RFC.md",
    "content": "---\nname: 💬 Request For Comment (RFC)\nabout: Feature discussion\n---\n\n<!---\nThanks for filing an issue 😄 ! Before you submit, please read the following:\n\nSearch open/closed issues before submitting since someone might have asked the same thing before!\n-->\n\n# 💬 RFC\n\n<!--- Provide a detailed summary of the issue here -->\n\n## 🔦 Context\n\n<!--- How has this issue affected you? What are you trying to accomplish? -->\n\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\n\n## 💻 Examples\n\n<!-- Examples help us understand the requested feature better -->\n\n<!-- Love parcel? Please consider supporting our collective:\n👉  https://opencollective.com/parcel/donate -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Ask a question\n    url: https://github.com/parcel-bundler/parcel/discussions\n    about: Please ask and answer questions here.\n  - name: Documentation\n    url: https://github.com/parcel-bundler/website\n    about: Contribute and suggest documentation here.\n    \n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "<!---\nThanks for filing a pull request 😄 ! Before you submit, please read the following:\n\nSearch open/closed issues before submitting since someone might have pushed the same thing before!\n-->\n\n# ↪️ Pull Request\n\n<!---\nProvide a general summary of the pull request here\nPlease look for any issues that this PR resolves and tag them in the PR.\n-->\n\n## 💻 Examples\n\n<!-- Examples help us understand the requested feature better -->\n\n## 🚨 Test instructions\n\n<!-- In case it is impossible (or too hard) to reliably test this feature/fix with unit tests, please provide test instructions! -->\n\n## ✔️ PR Todo\n\n- [ ] Added/updated unit tests for this change\n- [ ] Filled out test instructions (In case there aren't any unit tests)\n- [ ] Included links to related issues/PRs\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where the package manifests are located.\n# Please see the documentation for more information:\n# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates\n# https://containers.dev/guide/dependabot\n\nversion: 2\nupdates:\n - package-ecosystem: \"devcontainers\"\n   directory: \"/\"\n   schedule:\n     interval: weekly\n"
  },
  {
    "path": ".github/workflows/canary-release.yml",
    "content": "# This workflow builds and releases all packages on the main branch with a canary\n# dist tag. These packages contain changes that are not yet available in a publicly\n# released version of Parcel.\nname: canary-release\n\non:\n  schedule:\n    - cron: '0 0 * * *'\n  workflow_dispatch:\n\njobs:\n  build-and-release:\n    name: Build and release canary\n    uses: ./.github/workflows/release.yml\n    secrets: inherit\n    with:\n      profile: canary\n      release-command: |\n        yarn canary:release --summary-file\n        node scripts/tag-release.mjs --tag nightly\n      type: canary\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: Continuous Integration\n\non:\n  merge_group:\n  pull_request:\n  push:\n    branches:\n      - v2\n\npermissions:\n  contents: read\n\njobs:\n  lint:\n    name: Lint\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          cache: yarn\n      - uses: dtolnay/rust-toolchain@master\n        with:\n          toolchain: stable\n          components: rustfmt\n      - run: yarn --immutable\n      - run: yarn lint\n\n  flow:\n    name: Flow\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          cache: yarn\n      - run: yarn --immutable\n      - run: yarn flow check\n\n  ts-types:\n    name: TypeScript types\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          cache: yarn\n      - run: yarn --immutable\n      - run: yarn build-ts\n\n  benchmarks:\n    name: Benchmarks\n    runs-on: ubuntu-latest\n    steps:\n      - name: PR Benchmarks\n        uses: parcel-bundler/parcel-benchmark-action@master\n        env:\n          PARCEL_BENCHMARK_APIKEY: ${{ secrets.PARCEL_BENCHMARK_APIKEY }}\n\n  unit_tests:\n    name: Unit tests (${{ matrix.os }}, Node ${{ matrix.node }})\n    strategy:\n      matrix:\n        node: [20, 22]\n        os: [ubuntu-latest, macos-latest, windows-latest]\n    runs-on: ${{ matrix.os }}\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          cache: yarn\n          node-version: ${{ matrix.node }}\n      - uses: dtolnay/rust-toolchain@master\n        with:\n          toolchain: stable\n      - uses: Swatinem/rust-cache@v2\n        with:\n          shared-key: ${{ matrix.os }}\n      - name: Bump max inotify watches (Linux only)\n        if: ${{ runner.os == 'Linux' }}\n        run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p;\n      - run: yarn --immutable\n      - run: yarn build-native-release\n      - run: yarn test:unit\n      - name: Upload @parcel/rust artifacts on Linux with Node v20\n        if: ${{ runner.os == 'Linux' && matrix.node == 20 }}\n        uses: actions/upload-artifact@v4\n        with:\n          name: Rust Linux Binaries\n          path: |\n            packages/core/rust/index.d.ts\n            packages/core/rust/index.js\n            packages/core/rust/*.node\n\n  integration_tests:\n    name: Integration tests (${{ matrix.os }}, Node ${{ matrix.node }})\n    strategy:\n      matrix:\n        node: [20, 22]\n        os: [ubuntu-latest, macos-latest, windows-latest]\n      # These tend to be quite flakey, so one failed instance shouldn't stop\n      # others from potentially succeeding\n      fail-fast: false\n    runs-on: ${{ matrix.os }}\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          cache: yarn\n          node-version: ${{ matrix.node }}\n      - uses: dtolnay/rust-toolchain@master\n        with:\n          toolchain: stable\n      - uses: Swatinem/rust-cache@v2\n        with:\n          shared-key: ${{ matrix.os }}\n      - name: Bump max inotify watches (Linux only)\n        run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p;\n        if: ${{ runner.os == 'Linux' }}\n      - run: yarn --immutable\n      - run: yarn build-native-release\n      - run: yarn build\n      - run: yarn test:integration-ci\n\n  # Deployment steps taken from https://github.com/colinwilson/static-site-to-vercel/blob/master/.github/workflows/deploy-preview.yml\n  repl_build:\n    name: Build REPL\n    if: ${{ github.event_name == 'pull_request' }}\n    runs-on: ubuntu-latest\n    permissions:\n      deployments: write\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          cache: yarn\n          node-version: 20\n      - uses: dtolnay/rust-toolchain@master\n        with:\n          toolchain: stable\n          targets: wasm32-unknown-unknown\n      - name: Install wasm-opt\n        run: |\n          curl -L -O https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz\n          tar -xf binaryen-version_116-x86_64-linux.tar.gz\n          echo \"$PWD/binaryen-version_116/bin\" >> $GITHUB_PATH\n      - uses: Swatinem/rust-cache@v2\n        with:\n          key: wasm\n      - name: Bump max inotify watches\n        run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p;\n      - run: yarn --immutable\n      - name: Build native packages\n        run: yarn build-native-release\n      - run: yarn build\n      - run: yarn build-native-wasm\n      - run: yarn workspace @parcel/repl build\n      # - name: Upload REPL\n      #   uses: actions/upload-artifact@v4\n      #   with:\n      #     name: REPL\n      #     path: 'packages/dev/repl/dist'\n      - name: Start Deployment\n        uses: bobheadxi/deployments@v1\n        id: deployment\n        with:\n          step: start\n          token: ${{ secrets.GITHUB_TOKEN }}\n          ref: ${{ github.head_ref }}\n          env: Preview\n          override: false\n      - name: Deploy to Vercel\n        uses: amondnet/vercel-action@v25\n        id: vercel-action\n        with:\n          vercel-token: ${{ secrets.REPL_VERCEL_TOKEN }}\n          vercel-org-id: ${{ secrets.REPL_VERCEL_ORG_ID }}\n          vercel-project-id: ${{ secrets.REPL_VERCEL_PROJECT_ID }}\n          github-comment: false\n          working-directory: packages/dev/repl\n          # vercel-args: '--prod'\n          scope: parcel\n          alias-domains: |\n            pr-{{PR_NUMBER}}.repl.parceljs.org\n      - name: Update Deployment Status\n        uses: bobheadxi/deployments@v1\n        if: always()\n        with:\n          step: finish\n          token: ${{ secrets.GITHUB_TOKEN }}\n          env: Preview\n          override: false\n          status: ${{ job.status }}\n          deployment_id: ${{ steps.deployment.outputs.deployment_id }}\n          env_url: ${{ steps.vercel-action.outputs.preview-url }}\n"
  },
  {
    "path": ".github/workflows/dev-release.yml",
    "content": "# This workflow builds and releases all packages with a dev dist tag. Once published,\n# the packages can be installed to streamline the testing and validation of changes, both\n# locally and within CI, that have not yet been approved or merged into the main branch.\nname: dev-release\n\non:\n  workflow_dispatch:\n\njobs:\n  build-and-release:\n    name: Build and release dev\n    uses: ./.github/workflows/release.yml\n    secrets: inherit\n    with:\n      profile: canary\n      release-command: yarn dev:release\n      type: dev\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: release\n\non:\n  workflow_call:\n    inputs:\n      release-command:\n        description: 'The command that will release packages as part of the final step'\n        required: true\n        type: string\n      type:\n        description: 'The type of release, usually corresponds to the dist-tag'\n        required: true\n        type: string\n      profile:\n        description: 'The profile to use when building the native binaries'\n        required: false\n        default: 'release'\n        type: string\n    secrets:\n      GHCR_TOKEN:\n        required: true\n      NPM_TOKEN:\n        required: true\n\npermissions:\n  contents: read # for actions/checkout\n\njobs:\n  build-macos-windows:\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - name: aarch64-apple-darwin\n            os: macos-latest\n            target: aarch64-apple-darwin\n\n          - name: x86_64-apple-darwin\n            os: macos-latest\n            target: x86_64-apple-darwin\n\n          - name: windows-latest\n            os: windows-latest\n    name: ${{ matrix.name }}\n    runs-on: ${{ matrix.os }}\n    steps:\n      - uses: actions/checkout@v4\n      - name: Install Rust\n        uses: dtolnay/rust-toolchain@master\n        with:\n          toolchain: stable\n          target: ${{ matrix.target }}\n      - uses: bahmutov/npm-install@v1.8.35\n      - uses: Swatinem/rust-cache@v2\n        if: ${{ inputs.type != 'latest' }}\n        with:\n          shared-key: ${{ matrix.name }}\n      - name: Remove CommandLineTools SDKs\n        if: ${{ matrix.target == 'aarch64-apple-darwin' }}\n        run: sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;\n      - name: Build native packages\n        run: yarn build-native-${{ inputs.profile }}\n        env:\n          RUST_TARGET: ${{ matrix.target }}\n      - name: Upload artifacts\n        uses: actions/upload-artifact@v4\n        with:\n          name: bindings-${{ matrix.name }}\n          path: packages/*/*/*.node\n      - name: Debug\n        if: ${{ runner.os == 'macOS' }}\n        run: ls -l packages/*/*/*.node\n      - name: Smoke test\n        if: ${{ !matrix.target }}\n        run: node -e \"require('@parcel/rust')\"\n\n  build-linux:\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - target: x86_64-unknown-linux-gnu\n            arch: x86_64\n            cflags: -mevex512\n            glibc: 2.26\n            docker: node:20-slim\n            args: ''\n          - target: armv7-unknown-linux-gnueabihf\n            arch: armhf\n            cflags: -mfpu=neon\n            glibc: 2.26\n            docker: node:20-slim\n            args: '--platform linux/arm/v7'\n          - target: aarch64-unknown-linux-gnu\n            arch: arm64\n            cflags: ''\n            glibc: 2.26\n            docker: node:20-slim\n            args: '--platform linux/arm64'\n          - target: x86_64-unknown-linux-musl\n            arch: x86_64\n            cflags: -msse4.2 -mevex512\n            glibc: ''\n            docker: node:20-alpine\n            args: ''\n          - target: aarch64-unknown-linux-musl\n            arch: aarch64\n            cflags: ''\n            glibc: ''\n            docker: node:20-alpine\n            args: '--platform linux/arm64'\n    name: ${{ matrix.target }}\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - name: Install Rust\n        uses: dtolnay/rust-toolchain@master\n        with:\n          toolchain: stable\n          target: ${{ matrix.target }}\n      - name: Install ziglang\n        uses: goto-bus-stop/setup-zig@v1\n        with:\n          version: 0.14.0\n      - name: Install cargo toolchains\n        uses: taiki-e/install-action@v2\n        env:\n          GITHUB_TOKEN: ${{ github.token }}\n        with:\n          tool: cargo-zigbuild\n      - uses: bahmutov/npm-install@v1.8.35\n      - uses: Swatinem/rust-cache@v2\n        if: ${{ inputs.type != 'latest' }}\n        with:\n          shared-key: ${{ matrix.target }}\n      - name: Build native packages\n        run: yarn build-native-${{ inputs.profile }}\n        env:\n          RUST_TARGET: ${{ matrix.target }}\n          ZIG_GLIBC: ${{ matrix.glibc }}\n          CFLAGS: ${{ matrix.cflags }}\n      - name: Upload artifacts\n        uses: actions/upload-artifact@v4\n        with:\n          name: bindings-${{ matrix.target }}\n          path: packages/*/*/*.node\n      - name: debug\n        run: ls -l packages/*/*/*.node\n      - name: Set up QEMU\n        if: ${{ matrix.arch != 'x86_64' }}\n        uses: docker/setup-qemu-action@v3\n        with:\n          platforms: arm64,arm\n      - name: Configure binfmt-support\n        if: ${{ matrix.arch != 'x86_64' }}\n        run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes\n      - name: Smoke test\n        uses: addnab/docker-run-action@v3\n        with:\n          image: ${{ matrix.docker }}\n          options: ${{ matrix.args }} -v ${{ github.workspace }}:/build -w /build\n          run: node -e \"require('@parcel/rust')\"\n\n  build-and-release:\n    runs-on: ubuntu-22.04\n    name: Build and release\n    needs:\n      - build-linux\n      - build-macos-windows\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n      - uses: bahmutov/npm-install@v1.8.35\n      - name: Download artifacts\n        uses: actions/download-artifact@v4\n        with:\n          path: artifacts\n      - name: Move bindings\n        run: for d in artifacts/bindings-*/*/*; do cp $d/*.node packages/$(basename $(dirname $d))/$(basename $d); done\n      - name: Debug\n        run: |\n          ls -l packages/*/*/*.node\n      - run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc\n        env:\n          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}\n      - run: ${{ inputs.release-command }}\n"
  },
  {
    "path": ".github/workflows/stale.yml",
    "content": "name: 'Close stale issues'\n\non:\n  schedule:\n    - cron: '0 */12 * * *'\n  issue_comment:\n    types: [created]\n\npermissions: {}\n\njobs:\n  stale:\n    permissions:\n      issues: write # to comment on issues\n      pull-requests: write # to comment on pull requests\n\n    runs-on: ubuntu-latest\n    steps:\n      - uses: DeMoorJasper/stale@master\n        with:\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n          stale-label: Stale\n          stale-message: >\n            This issue has been automatically marked as stale because\n            it has not had recent activity. It will be closed in 14 days if no\n            further activity occurs.\n          days-before-stale: 180\n          days-before-close: 14\n          exempt-labels: 'pinned, Stale Ignore, security, Confirmed Bug, Feature, parcel 2'\n          dry-run: 'false'\n"
  },
  {
    "path": ".github/workflows/tag-release.yml",
    "content": "name: tag-release\n\non:\n  release:\n    types: [published]\n  workflow_dispatch:\n\njobs:\n  build-and-release:\n    name: Build and release the tagged version\n    uses: ./.github/workflows/release.yml\n    secrets: inherit\n    with:\n      release-command: yarn release\n      type: latest\n\n  # Deployment steps taken from https://github.com/colinwilson/static-site-to-vercel/blob/master/.github/workflows/deploy-preview.yml\n  repl_build:\n    name: Build REPL\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      deployments: write\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          cache: yarn\n          node-version: 20\n      - uses: dtolnay/rust-toolchain@master\n        with:\n          toolchain: stable\n          targets: wasm32-unknown-unknown\n      - name: Install wasm-opt\n        run: |\n          curl -L -O https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz\n          tar -xf binaryen-version_116-x86_64-linux.tar.gz\n          echo \"$PWD/binaryen-version_116/bin\" >> $GITHUB_PATH\n      - uses: Swatinem/rust-cache@v2\n        with:\n          key: wasm\n      - name: Bump max inotify watches\n        run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p;\n      - run: yarn --immutable\n      - name: Build native packages\n        run: yarn build-native-release\n      - run: yarn build\n      - run: yarn build-native-wasm\n      - run: yarn workspace @parcel/repl build\n      # - name: Upload REPL\n      #   uses: actions/upload-artifact@v4\n      #   with:\n      #     name: REPL\n      #     path: 'packages/dev/repl/dist'\n      - name: Start Deployment\n        uses: bobheadxi/deployments@v1\n        id: deployment\n        with:\n          step: start\n          token: ${{ secrets.GITHUB_TOKEN }}\n          ref: ${{ github.head_ref }}\n          env: Production\n          override: false\n      - name: Deploy to Vercel\n        uses: amondnet/vercel-action@v25\n        id: vercel-action\n        with:\n          vercel-token: ${{ secrets.REPL_VERCEL_TOKEN }}\n          vercel-org-id: ${{ secrets.REPL_VERCEL_ORG_ID }}\n          vercel-project-id: ${{ secrets.REPL_VERCEL_PROJECT_ID }}\n          github-comment: false\n          working-directory: packages/dev/repl\n          vercel-args: '--prod'\n          scope: parcel\n      - name: Update Deployment Status\n        uses: bobheadxi/deployments@v1\n        if: always()\n        with:\n          step: finish\n          token: ${{ secrets.GITHUB_TOKEN }}\n          env: Production\n          override: false\n          status: ${{ job.status }}\n          deployment_id: ${{ steps.deployment.outputs.deployment_id }}\n          env_url: ${{ steps.vercel-action.outputs.preview-url }}\n"
  },
  {
    "path": ".gitignore",
    "content": ".cache/\n.idea/\n.nyc_output/\n.parcel-cache/\n.verdaccio_storage/\n.vscode/*\n!.vscode/extensions.json\ncoverage/\ndist/\nlib/\nlogs/\nnode_modules/\nparcel-bundle-reports/\ntmp\n\n/target/\n\n.pnp.*\n.yarn/*\n!.yarn/patches\n!.yarn/plugins\n!.yarn/releases\n!.yarn/sdks\n!.yarn/versions\n\n.DS_Store\nnpm-debug.log*\npackage-lock.json\nsourcemap-info.json\nyarn-debug.log*\nyarn-error.log*\n*.log\n*.min.js\n*.node\n"
  },
  {
    "path": ".husky/.gitignore",
    "content": "_\n"
  },
  {
    "path": ".husky/pre-commit",
    "content": "#!/bin/sh\n# Generated with husky-init and https://github.com/typicode/husky-4-to-6\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nyarn lint-staged\n"
  },
  {
    "path": ".mocharc.json",
    "content": "{\n  \"spec\": \"packages/*/!(integration-tests)/test/{*.js,**/*.{test,spec}.js}\",\n  \"require\": [\"@parcel/babel-register\", \"@parcel/test-utils/src/mochaSetup.js\"],\n  // TODO: Remove this when https://github.com/nodejs/node/pull/28788 is resolved\n  \"exit\": true\n}\n"
  },
  {
    "path": ".prettierignore",
    "content": "flow-typed\npackages/*/*/src/builtins\npackages/*/*/test/integration\npackages/*/*/test/input\npackages/*/*/test/dist\npackages/*/*/test/mochareporters.json\npackages/*/*/test/fixtures\npackages/*/*/test/.parcel-cache\npackages/examples/react-server-components/src/server.js\nvendor\ntmp\n.parcel-cache\n\n# Ignoring main README for now because generated Table of Contents adds a line that prettier removes\n# in precommit hook, causing `yarn lint:readme` to fail\n/README.md\n/packages/core/parcel/README.md\n"
  },
  {
    "path": ".prettierrc",
    "content": "{\n  \"bracketSpacing\": false,\n  \"endOfLine\": \"lf\",\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\",\n  \"arrowParens\": \"avoid\",\n  \"overrides\": [\n    {\n      \"files\": [\n        \"packages/packagers/js/src/dev-prelude.js\"\n      ],\n      \"options\": {\n        \"trailingComma\": \"es5\"\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": ".proxyrc.js",
    "content": "module.exports = function (app) {\n  app.use(function (req, res, next) {\n    res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');\n    res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');\n    res.setHeader('Cross-Origin-Resource-Policy', 'same-origin');\n    next();\n  });\n};\n"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n  // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.\n  \"recommendations\": [\n    \"dbaeumer.vscode-eslint\",\n    \"editorconfig.editorconfig\",\n    \"esbenp.prettier-vscode\",\n    \"flowtype.flow-for-vscode\",\n    \"vadimcn.vscode-lldb\"\n  ]\n}\n"
  },
  {
    "path": ".yarn/releases/yarn-4.9.1.cjs",
    "content": "#!/usr/bin/env node\n/* eslint-disable */\n//prettier-ignore\n(()=>{var u7e=Object.create;var D_=Object.defineProperty;var f7e=Object.getOwnPropertyDescriptor;var A7e=Object.getOwnPropertyNames;var p7e=Object.getPrototypeOf,h7e=Object.prototype.hasOwnProperty;var ye=(t=>typeof require<\"u\"?require:typeof Proxy<\"u\"?new Proxy(t,{get:(e,r)=>(typeof require<\"u\"?require:e)[r]}):t)(function(t){if(typeof require<\"u\")return require.apply(this,arguments);throw Error('Dynamic require of \"'+t+'\" is not supported')});var It=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vt=(t,e)=>{for(var r in e)D_(t,r,{get:e[r],enumerable:!0})},g7e=(t,e,r,s)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let a of A7e(e))!h7e.call(t,a)&&a!==r&&D_(t,a,{get:()=>e[a],enumerable:!(s=f7e(e,a))||s.enumerable});return t};var et=(t,e,r)=>(r=t!=null?u7e(p7e(t)):{},g7e(e||!t||!t.__esModule?D_(r,\"default\",{value:t,enumerable:!0}):r,t));var ui={};Vt(ui,{SAFE_TIME:()=>P$,S_IFDIR:()=>lx,S_IFLNK:()=>cx,S_IFMT:()=>_f,S_IFREG:()=>M2});var _f,lx,M2,cx,P$,x$=It(()=>{_f=61440,lx=16384,M2=32768,cx=40960,P$=456789e3});var or={};Vt(or,{EBADF:()=>Uo,EBUSY:()=>d7e,EEXIST:()=>w7e,EINVAL:()=>y7e,EISDIR:()=>C7e,ENOENT:()=>E7e,ENOSYS:()=>m7e,ENOTDIR:()=>I7e,ENOTEMPTY:()=>v7e,EOPNOTSUPP:()=>S7e,EROFS:()=>B7e,ERR_DIR_CLOSED:()=>b_});function wc(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function d7e(t){return wc(\"EBUSY\",t)}function m7e(t,e){return wc(\"ENOSYS\",`${t}, ${e}`)}function y7e(t){return wc(\"EINVAL\",`invalid argument, ${t}`)}function Uo(t){return wc(\"EBADF\",`bad file descriptor, ${t}`)}function E7e(t){return wc(\"ENOENT\",`no such file or directory, ${t}`)}function I7e(t){return wc(\"ENOTDIR\",`not a directory, ${t}`)}function C7e(t){return wc(\"EISDIR\",`illegal operation on a directory, ${t}`)}function w7e(t){return wc(\"EEXIST\",`file already exists, ${t}`)}function B7e(t){return wc(\"EROFS\",`read-only filesystem, ${t}`)}function v7e(t){return wc(\"ENOTEMPTY\",`directory not empty, ${t}`)}function S7e(t){return wc(\"EOPNOTSUPP\",`operation not supported, ${t}`)}function b_(){return wc(\"ERR_DIR_CLOSED\",\"Directory handle was closed\")}var ux=It(()=>{});var el={};Vt(el,{BigIntStatsEntry:()=>iE,DEFAULT_MODE:()=>k_,DirEntry:()=>P_,StatEntry:()=>nE,areStatsEqual:()=>Q_,clearStats:()=>fx,convertToBigIntStats:()=>b7e,makeDefaultStats:()=>k$,makeEmptyStats:()=>D7e});function k$(){return new nE}function D7e(){return fx(k$())}function fx(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r==\"number\"?t[e]=0:typeof r==\"bigint\"?t[e]=BigInt(0):x_.types.isDate(r)&&(t[e]=new Date(0))}return t}function b7e(t){let e=new iE;for(let r in t)if(Object.hasOwn(t,r)){let s=t[r];typeof s==\"number\"?e[r]=BigInt(s):x_.types.isDate(s)&&(e[r]=new Date(s))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function Q_(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,s=e;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var x_,k_,P_,nE,iE,T_=It(()=>{x_=et(ye(\"util\")),k_=33188,P_=class{constructor(){this.name=\"\";this.path=\"\";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},nE=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=k_;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},iE=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(k_);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(61440))===BigInt(32768)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(61440))===BigInt(40960)}}});function T7e(t){let e,r;if(e=t.match(k7e))t=e[1];else if(r=t.match(Q7e))t=`\\\\\\\\${r[1]?\".\\\\\":\"\"}${r[2]}`;else return t;return t.replace(/\\//g,\"\\\\\")}function R7e(t){t=t.replace(/\\\\/g,\"/\");let e,r;return(e=t.match(P7e))?t=`/${e[1]}`:(r=t.match(x7e))&&(t=`/unc/${r[1]?\".dot/\":\"\"}${r[2]}`),t}function Ax(t,e){return t===ue?T$(e):R_(e)}var _2,vt,Er,ue,K,Q$,P7e,x7e,k7e,Q7e,R_,T$,tl=It(()=>{_2=et(ye(\"path\")),vt={root:\"/\",dot:\".\",parent:\"..\"},Er={home:\"~\",nodeModules:\"node_modules\",manifest:\"package.json\",lockfile:\"yarn.lock\",virtual:\"__virtual__\",pnpJs:\".pnp.js\",pnpCjs:\".pnp.cjs\",pnpData:\".pnp.data.json\",pnpEsmLoader:\".pnp.loader.mjs\",rc:\".yarnrc.yml\",env:\".env\"},ue=Object.create(_2.default),K=Object.create(_2.default.posix);ue.cwd=()=>process.cwd();K.cwd=process.platform===\"win32\"?()=>R_(process.cwd()):process.cwd;process.platform===\"win32\"&&(K.resolve=(...t)=>t.length>0&&K.isAbsolute(t[0])?_2.default.posix.resolve(...t):_2.default.posix.resolve(K.cwd(),...t));Q$=function(t,e,r){return e=t.normalize(e),r=t.normalize(r),e===r?\".\":(e.endsWith(t.sep)||(e=e+t.sep),r.startsWith(e)?r.slice(e.length):null)};ue.contains=(t,e)=>Q$(ue,t,e);K.contains=(t,e)=>Q$(K,t,e);P7e=/^([a-zA-Z]:.*)$/,x7e=/^\\/\\/(\\.\\/)?(.*)$/,k7e=/^\\/([a-zA-Z]:.*)$/,Q7e=/^\\/unc\\/(\\.dot\\/)?(.*)$/;R_=process.platform===\"win32\"?R7e:t=>t,T$=process.platform===\"win32\"?T7e:t=>t;ue.fromPortablePath=T$;ue.toPortablePath=R_});async function px(t,e){let r=\"0123456789abcdef\";await t.mkdirPromise(e.indexPath,{recursive:!0});let s=[];for(let a of r)for(let n of r)s.push(t.mkdirPromise(t.pathUtils.join(e.indexPath,`${a}${n}`),{recursive:!0}));return await Promise.all(s),e.indexPath}async function R$(t,e,r,s,a){let n=t.pathUtils.normalize(e),c=r.pathUtils.normalize(s),f=[],p=[],{atime:h,mtime:E}=a.stableTime?{atime:md,mtime:md}:await r.lstatPromise(c);await t.mkdirpPromise(t.pathUtils.dirname(e),{utimes:[h,E]}),await F_(f,p,t,n,r,c,{...a,didParentExist:!0});for(let C of f)await C();await Promise.all(p.map(C=>C()))}async function F_(t,e,r,s,a,n,c){let f=c.didParentExist?await F$(r,s):null,p=await a.lstatPromise(n),{atime:h,mtime:E}=c.stableTime?{atime:md,mtime:md}:p,C;switch(!0){case p.isDirectory():C=await N7e(t,e,r,s,f,a,n,p,c);break;case p.isFile():C=await M7e(t,e,r,s,f,a,n,p,c);break;case p.isSymbolicLink():C=await _7e(t,e,r,s,f,a,n,p,c);break;default:throw new Error(`Unsupported file type (${p.mode})`)}return(c.linkStrategy?.type!==\"HardlinkFromIndex\"||!p.isFile())&&((C||f?.mtime?.getTime()!==E.getTime()||f?.atime?.getTime()!==h.getTime())&&(e.push(()=>r.lutimesPromise(s,h,E)),C=!0),(f===null||(f.mode&511)!==(p.mode&511))&&(e.push(()=>r.chmodPromise(s,p.mode&511)),C=!0)),C}async function F$(t,e){try{return await t.lstatPromise(e)}catch{return null}}async function N7e(t,e,r,s,a,n,c,f,p){if(a!==null&&!a.isDirectory())if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;let h=!1;a===null&&(t.push(async()=>{try{await r.mkdirPromise(s,{mode:f.mode})}catch(S){if(S.code!==\"EEXIST\")throw S}}),h=!0);let E=await n.readdirPromise(c),C=p.didParentExist&&!a?{...p,didParentExist:!1}:p;if(p.stableSort)for(let S of E.sort())await F_(t,e,r,r.pathUtils.join(s,S),n,n.pathUtils.join(c,S),C)&&(h=!0);else(await Promise.all(E.map(async P=>{await F_(t,e,r,r.pathUtils.join(s,P),n,n.pathUtils.join(c,P),C)}))).some(P=>P)&&(h=!0);return h}async function O7e(t,e,r,s,a,n,c,f,p,h){let E=await n.checksumFilePromise(c,{algorithm:\"sha1\"}),C=420,S=f.mode&511,P=`${E}${S!==C?S.toString(8):\"\"}`,I=r.pathUtils.join(h.indexPath,E.slice(0,2),`${P}.dat`),R;(ce=>(ce[ce.Lock=0]=\"Lock\",ce[ce.Rename=1]=\"Rename\"))(R||={});let N=1,U=await F$(r,I);if(a){let ie=U&&a.dev===U.dev&&a.ino===U.ino,Ae=U?.mtimeMs!==F7e;if(ie&&Ae&&h.autoRepair&&(N=0,U=null),!ie)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1}let W=!U&&N===1?`${I}.${Math.floor(Math.random()*4294967296).toString(16).padStart(8,\"0\")}`:null,te=!1;return t.push(async()=>{if(!U&&(N===0&&await r.lockPromise(I,async()=>{let ie=await n.readFilePromise(c);await r.writeFilePromise(I,ie)}),N===1&&W)){let ie=await n.readFilePromise(c);await r.writeFilePromise(W,ie);try{await r.linkPromise(W,I)}catch(Ae){if(Ae.code===\"EEXIST\")te=!0,await r.unlinkPromise(W);else throw Ae}}a||await r.linkPromise(I,s)}),e.push(async()=>{U||(await r.lutimesPromise(I,md,md),S!==C&&await r.chmodPromise(I,S)),W&&!te&&await r.unlinkPromise(W)}),!1}async function L7e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{let h=await n.readFilePromise(c);await r.writeFilePromise(s,h)}),!0}async function M7e(t,e,r,s,a,n,c,f,p){return p.linkStrategy?.type===\"HardlinkFromIndex\"?O7e(t,e,r,s,a,n,c,f,p,p.linkStrategy):L7e(t,e,r,s,a,n,c,f,p)}async function _7e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{await r.symlinkPromise(Ax(r.pathUtils,await n.readlinkPromise(c)),s)}),!0}var md,F7e,N_=It(()=>{tl();md=new Date(456789e3*1e3),F7e=md.getTime()});function hx(t,e,r,s){let a=()=>{let n=r.shift();if(typeof n>\"u\")return null;let c=t.pathUtils.join(e,n);return Object.assign(t.statSync(c),{name:n,path:void 0})};return new U2(e,a,s)}var U2,N$=It(()=>{ux();U2=class{constructor(e,r,s={}){this.path=e;this.nextDirent=r;this.opts=s;this.closed=!1}throwIfClosed(){if(this.closed)throw b_()}async*[Symbol.asyncIterator](){try{let e;for(;(e=await this.read())!==null;)yield e}finally{await this.close()}}read(e){let r=this.readSync();return typeof e<\"u\"?e(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e<\"u\"?e(null):Promise.resolve()}closeSync(){this.throwIfClosed(),this.opts.onClose?.(),this.closed=!0}}});function O$(t,e){if(t!==e)throw new Error(`Invalid StatWatcher status: expected '${e}', got '${t}'`)}var L$,gx,M$=It(()=>{L$=ye(\"events\");T_();gx=class t extends L$.EventEmitter{constructor(r,s,{bigint:a=!1}={}){super();this.status=\"ready\";this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=r,this.path=s,this.bigint=a,this.lastStats=this.stat()}static create(r,s,a){let n=new t(r,s,a);return n.start(),n}start(){O$(this.status,\"ready\"),this.status=\"running\",this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(\"change\",this.lastStats,this.lastStats)},3)}stop(){O$(this.status,\"running\"),this.status=\"stopped\",this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(\"stop\")}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch{let r=this.bigint?new iE:new nE;return fx(r)}}makeInterval(r){let s=setInterval(()=>{let a=this.stat(),n=this.lastStats;Q_(a,n)||(this.lastStats=a,this.emit(\"change\",a,n))},r.interval);return r.persistent?s:s.unref()}registerChangeListener(r,s){this.addListener(\"change\",r),this.changeListeners.set(r,this.makeInterval(s))}unregisterChangeListener(r){this.removeListener(\"change\",r);let s=this.changeListeners.get(r);typeof s<\"u\"&&clearInterval(s),this.changeListeners.delete(r)}unregisterAllChangeListeners(){for(let r of this.changeListeners.keys())this.unregisterChangeListener(r)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let r of this.changeListeners.values())r.ref();return this}unref(){for(let r of this.changeListeners.values())r.unref();return this}}});function sE(t,e,r,s){let a,n,c,f;switch(typeof r){case\"function\":a=!1,n=!0,c=5007,f=r;break;default:({bigint:a=!1,persistent:n=!0,interval:c=5007}=r),f=s;break}let p=dx.get(t);typeof p>\"u\"&&dx.set(t,p=new Map);let h=p.get(e);return typeof h>\"u\"&&(h=gx.create(t,e,{bigint:a}),p.set(e,h)),h.registerChangeListener(f,{persistent:n,interval:c}),h}function yd(t,e,r){let s=dx.get(t);if(typeof s>\"u\")return;let a=s.get(e);typeof a>\"u\"||(typeof r>\"u\"?a.unregisterAllChangeListeners():a.unregisterChangeListener(r),a.hasChangeListeners()||(a.stop(),s.delete(e)))}function Ed(t){let e=dx.get(t);if(!(typeof e>\"u\"))for(let r of e.keys())yd(t,r)}var dx,O_=It(()=>{M$();dx=new WeakMap});function U7e(t){let e=t.match(/\\r?\\n/g);if(e===null)return U$.EOL;let r=e.filter(a=>a===`\\r\n`).length,s=e.length-r;return r>s?`\\r\n`:`\n`}function Id(t,e){return e.replace(/\\r?\\n/g,U7e(t))}var _$,U$,Ep,Uf,Cd=It(()=>{_$=ye(\"crypto\"),U$=ye(\"os\");N_();tl();Ep=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let s=[e];for(;s.length>0;){let a=s.shift();if((await this.lstatPromise(a)).isDirectory()){let c=await this.readdirPromise(a);if(r)for(let f of c.sort())s.push(this.pathUtils.join(a,f));else throw new Error(\"Not supported\")}else yield a}}async checksumFilePromise(e,{algorithm:r=\"sha512\"}={}){let s=await this.openPromise(e,\"r\");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,_$.createHash)(r),f=0;for(;(f=await this.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest(\"hex\")}finally{await this.closePromise(s)}}async removePromise(e,{recursive:r=!0,maxRetries:s=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code===\"ENOENT\")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(c=>this.removePromise(this.pathUtils.resolve(e,c))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(e);break}catch(c){if(c.code!==\"EBUSY\"&&c.code!==\"ENOTEMPTY\")throw c;n<s&&await new Promise(f=>setTimeout(f,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let s;try{s=this.lstatSync(e)}catch(a){if(a.code===\"ENOENT\")return;throw a}if(s.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{await this.mkdirPromise(f)}catch(p){if(p.code===\"EEXIST\")continue;throw p}if(n??=f,r!=null&&await this.chmodPromise(f,r),s!=null)await this.utimesPromise(f,s[0],s[1]);else{let p=await this.statPromise(this.pathUtils.dirname(f));await this.utimesPromise(f,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{this.mkdirSync(f)}catch(p){if(p.code===\"EEXIST\")continue;throw p}if(n??=f,r!=null&&this.chmodSync(f,r),s!=null)this.utimesSync(f,s[0],s[1]);else{let p=this.statSync(this.pathUtils.dirname(f));this.utimesSync(f,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:s=this,overwrite:a=!0,stableSort:n=!1,stableTime:c=!1,linkStrategy:f=null}={}){return await R$(this,e,s,r,{overwrite:a,stableSort:n,stableTime:c,linkStrategy:f})}copySync(e,r,{baseFs:s=this,overwrite:a=!0}={}){let n=s.lstatSync(r),c=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=s.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),s.pathUtils.join(r,h),{baseFs:s,overwrite:a})}else if(n.isFile()){if(!c||a){c&&this.removeSync(e);let p=s.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!c||a){c&&this.removeSync(e);let p=s.readlinkSync(r);this.symlinkSync(Ax(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,\"0\")})`);let f=n.mode&511;this.chmodSync(e,f)}async changeFilePromise(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,s):this.changeFileTextPromise(e,r,s)}async changeFileBufferPromise(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:s})}async changeFileTextPromise(e,r,{automaticNewlines:s,mode:a}={}){let n=\"\";try{n=await this.readFilePromise(e,\"utf8\")}catch{}let c=s?Id(n,r):r;n!==c&&await this.writeFilePromise(e,c,{mode:a})}changeFileSync(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,s):this.changeFileTextSync(e,r,s)}changeFileBufferSync(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:s})}changeFileTextSync(e,r,{automaticNewlines:s=!1,mode:a}={}){let n=\"\";try{n=this.readFileSync(e,\"utf8\")}catch{}let c=s?Id(n,r):r;n!==c&&this.writeFileSync(e,c,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(s){if(s.code===\"EXDEV\")await this.copyPromise(r,e),await this.removePromise(e);else throw s}}moveSync(e,r){try{this.renameSync(e,r)}catch(s){if(s.code===\"EXDEV\")this.copySync(r,e),this.removeSync(e);else throw s}}async lockPromise(e,r){let s=`${e}.flock`,a=1e3/60,n=Date.now(),c=null,f=async()=>{let p;try{[p]=await this.readJsonPromise(s)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;c===null;)try{c=await this.openPromise(s,\"wx\")}catch(p){if(p.code===\"EEXIST\"){if(!await f())try{await this.unlinkPromise(s);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${s})`)}else throw p}await this.writePromise(c,JSON.stringify([process.pid]));try{return await r()}finally{try{await this.closePromise(c),await this.unlinkPromise(s)}catch{}}}async readJsonPromise(e){let r=await this.readFilePromise(e,\"utf8\");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}readJsonSync(e){let r=this.readFileSync(e,\"utf8\");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}async writeJsonPromise(e,r,{compact:s=!1}={}){let a=s?0:2;return await this.writeFilePromise(e,`${JSON.stringify(r,null,a)}\n`)}writeJsonSync(e,r,{compact:s=!1}={}){let a=s?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)}\n`)}async preserveTimePromise(e,r){let s=await this.lstatPromise(e),a=await r();typeof a<\"u\"&&(e=a),await this.lutimesPromise(e,s.atime,s.mtime)}async preserveTimeSync(e,r){let s=this.lstatSync(e),a=r();typeof a<\"u\"&&(e=a),this.lutimesSync(e,s.atime,s.mtime)}},Uf=class extends Ep{constructor(){super(K)}}});var Hs,Ip=It(()=>{Cd();Hs=class extends Ep{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,s){return this.baseFs.openPromise(this.mapToBase(e),r,s)}openSync(e,r,s){return this.baseFs.openSync(this.mapToBase(e),r,s)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,s,a,n){return await this.baseFs.readPromise(e,r,s,a,n)}readSync(e,r,s,a,n){return this.baseFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return typeof r==\"string\"?await this.baseFs.writePromise(e,r,s):await this.baseFs.writePromise(e,r,s,a,n)}writeSync(e,r,s,a,n){return typeof r==\"string\"?this.baseFs.writeSync(e,r,s):this.baseFs.writeSync(e,r,s,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,s){return this.baseFs.fchownPromise(e,r,s)}fchownSync(e,r,s){return this.baseFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return this.baseFs.chownPromise(this.mapToBase(e),r,s)}chownSync(e,r,s){return this.baseFs.chownSync(this.mapToBase(e),r,s)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,s=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),s)}copyFileSync(e,r,s=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),s)}async appendFilePromise(e,r,s){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,s)}appendFileSync(e,r,s){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,s)}async writeFilePromise(e,r,s){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,s)}writeFileSync(e,r,s){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,s)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,s){return this.baseFs.utimesPromise(this.mapToBase(e),r,s)}utimesSync(e,r,s){return this.baseFs.utimesSync(this.mapToBase(e),r,s)}async lutimesPromise(e,r,s){return this.baseFs.lutimesPromise(this.mapToBase(e),r,s)}lutimesSync(e,r,s){return this.baseFs.lutimesSync(this.mapToBase(e),r,s)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async rmPromise(e,r){return this.baseFs.rmPromise(this.mapToBase(e),r)}rmSync(e,r){return this.baseFs.rmSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkPromise(c,a,s)}symlinkSync(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkSync(c,a,s)}async readFilePromise(e,r){return this.baseFs.readFilePromise(this.fsMapToBase(e),r)}readFileSync(e,r){return this.baseFs.readFileSync(this.fsMapToBase(e),r)}readdirPromise(e,r){return this.baseFs.readdirPromise(this.mapToBase(e),r)}readdirSync(e,r){return this.baseFs.readdirSync(this.mapToBase(e),r)}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,r){return this.baseFs.truncatePromise(this.mapToBase(e),r)}truncateSync(e,r){return this.baseFs.truncateSync(this.mapToBase(e),r)}async ftruncatePromise(e,r){return this.baseFs.ftruncatePromise(e,r)}ftruncateSync(e,r){return this.baseFs.ftruncateSync(e,r)}watch(e,r,s){return this.baseFs.watch(this.mapToBase(e),r,s)}watchFile(e,r,s){return this.baseFs.watchFile(this.mapToBase(e),r,s)}unwatchFile(e,r){return this.baseFs.unwatchFile(this.mapToBase(e),r)}fsMapToBase(e){return typeof e==\"number\"?e:this.mapToBase(e)}}});var Hf,H$=It(()=>{Ip();Hf=class extends Hs{constructor(e,{baseFs:r,pathUtils:s}){super(s),this.target=e,this.baseFs=r}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}});function j$(t){let e=t;return typeof t.path==\"string\"&&(e.path=ue.toPortablePath(t.path)),e}var q$,Yn,wd=It(()=>{q$=et(ye(\"fs\"));Cd();tl();Yn=class extends Uf{constructor(e=q$.default){super(),this.realFs=e}getExtractHint(){return!1}getRealPath(){return vt.root}resolve(e){return K.resolve(e)}async openPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.open(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}openSync(e,r,s){return this.realFs.openSync(ue.fromPortablePath(e),r,s)}async opendirPromise(e,r){return await new Promise((s,a)=>{typeof r<\"u\"?this.realFs.opendir(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.opendir(ue.fromPortablePath(e),this.makeCallback(s,a))}).then(s=>{let a=s;return Object.defineProperty(a,\"path\",{value:e,configurable:!0,writable:!0}),a})}opendirSync(e,r){let a=typeof r<\"u\"?this.realFs.opendirSync(ue.fromPortablePath(e),r):this.realFs.opendirSync(ue.fromPortablePath(e));return Object.defineProperty(a,\"path\",{value:e,configurable:!0,writable:!0}),a}async readPromise(e,r,s=0,a=0,n=-1){return await new Promise((c,f)=>{this.realFs.read(e,r,s,a,n,(p,h)=>{p?f(p):c(h)})})}readSync(e,r,s,a,n){return this.realFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return await new Promise((c,f)=>typeof r==\"string\"?this.realFs.write(e,r,s,this.makeCallback(c,f)):this.realFs.write(e,r,s,a,n,this.makeCallback(c,f)))}writeSync(e,r,s,a,n){return typeof r==\"string\"?this.realFs.writeSync(e,r,s):this.realFs.writeSync(e,r,s,a,n)}async closePromise(e){await new Promise((r,s)=>{this.realFs.close(e,this.makeCallback(r,s))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,r){let s=e!==null?ue.fromPortablePath(e):e;return this.realFs.createReadStream(s,r)}createWriteStream(e,r){let s=e!==null?ue.fromPortablePath(e):e;return this.realFs.createWriteStream(s,r)}async realpathPromise(e){return await new Promise((r,s)=>{this.realFs.realpath(ue.fromPortablePath(e),{},this.makeCallback(r,s))}).then(r=>ue.toPortablePath(r))}realpathSync(e){return ue.toPortablePath(this.realFs.realpathSync(ue.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(r=>{this.realFs.exists(ue.fromPortablePath(e),r)})}accessSync(e,r){return this.realFs.accessSync(ue.fromPortablePath(e),r)}async accessPromise(e,r){return await new Promise((s,a)=>{this.realFs.access(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}existsSync(e){return this.realFs.existsSync(ue.fromPortablePath(e))}async statPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.stat(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.stat(ue.fromPortablePath(e),this.makeCallback(s,a))})}statSync(e,r){return r?this.realFs.statSync(ue.fromPortablePath(e),r):this.realFs.statSync(ue.fromPortablePath(e))}async fstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.fstat(e,r,this.makeCallback(s,a)):this.realFs.fstat(e,this.makeCallback(s,a))})}fstatSync(e,r){return r?this.realFs.fstatSync(e,r):this.realFs.fstatSync(e)}async lstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.lstat(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.lstat(ue.fromPortablePath(e),this.makeCallback(s,a))})}lstatSync(e,r){return r?this.realFs.lstatSync(ue.fromPortablePath(e),r):this.realFs.lstatSync(ue.fromPortablePath(e))}async fchmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.fchmod(e,r,this.makeCallback(s,a))})}fchmodSync(e,r){return this.realFs.fchmodSync(e,r)}async chmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.chmod(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}chmodSync(e,r){return this.realFs.chmodSync(ue.fromPortablePath(e),r)}async fchownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.fchown(e,r,s,this.makeCallback(a,n))})}fchownSync(e,r,s){return this.realFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.chown(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}chownSync(e,r,s){return this.realFs.chownSync(ue.fromPortablePath(e),r,s)}async renamePromise(e,r){return await new Promise((s,a)=>{this.realFs.rename(ue.fromPortablePath(e),ue.fromPortablePath(r),this.makeCallback(s,a))})}renameSync(e,r){return this.realFs.renameSync(ue.fromPortablePath(e),ue.fromPortablePath(r))}async copyFilePromise(e,r,s=0){return await new Promise((a,n)=>{this.realFs.copyFile(ue.fromPortablePath(e),ue.fromPortablePath(r),s,this.makeCallback(a,n))})}copyFileSync(e,r,s=0){return this.realFs.copyFileSync(ue.fromPortablePath(e),ue.fromPortablePath(r),s)}async appendFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e==\"string\"?ue.fromPortablePath(e):e;s?this.realFs.appendFile(c,r,s,this.makeCallback(a,n)):this.realFs.appendFile(c,r,this.makeCallback(a,n))})}appendFileSync(e,r,s){let a=typeof e==\"string\"?ue.fromPortablePath(e):e;s?this.realFs.appendFileSync(a,r,s):this.realFs.appendFileSync(a,r)}async writeFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e==\"string\"?ue.fromPortablePath(e):e;s?this.realFs.writeFile(c,r,s,this.makeCallback(a,n)):this.realFs.writeFile(c,r,this.makeCallback(a,n))})}writeFileSync(e,r,s){let a=typeof e==\"string\"?ue.fromPortablePath(e):e;s?this.realFs.writeFileSync(a,r,s):this.realFs.writeFileSync(a,r)}async unlinkPromise(e){return await new Promise((r,s)=>{this.realFs.unlink(ue.fromPortablePath(e),this.makeCallback(r,s))})}unlinkSync(e){return this.realFs.unlinkSync(ue.fromPortablePath(e))}async utimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.utimes(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}utimesSync(e,r,s){this.realFs.utimesSync(ue.fromPortablePath(e),r,s)}async lutimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.lutimes(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}lutimesSync(e,r,s){this.realFs.lutimesSync(ue.fromPortablePath(e),r,s)}async mkdirPromise(e,r){return await new Promise((s,a)=>{this.realFs.mkdir(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}mkdirSync(e,r){return this.realFs.mkdirSync(ue.fromPortablePath(e),r)}async rmdirPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rmdir(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rmdir(ue.fromPortablePath(e),this.makeCallback(s,a))})}rmdirSync(e,r){return this.realFs.rmdirSync(ue.fromPortablePath(e),r)}async rmPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rm(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rm(ue.fromPortablePath(e),this.makeCallback(s,a))})}rmSync(e,r){return this.realFs.rmSync(ue.fromPortablePath(e),r)}async linkPromise(e,r){return await new Promise((s,a)=>{this.realFs.link(ue.fromPortablePath(e),ue.fromPortablePath(r),this.makeCallback(s,a))})}linkSync(e,r){return this.realFs.linkSync(ue.fromPortablePath(e),ue.fromPortablePath(r))}async symlinkPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.symlink(ue.fromPortablePath(e.replace(/\\/+$/,\"\")),ue.fromPortablePath(r),s,this.makeCallback(a,n))})}symlinkSync(e,r,s){return this.realFs.symlinkSync(ue.fromPortablePath(e.replace(/\\/+$/,\"\")),ue.fromPortablePath(r),s)}async readFilePromise(e,r){return await new Promise((s,a)=>{let n=typeof e==\"string\"?ue.fromPortablePath(e):e;this.realFs.readFile(n,r,this.makeCallback(s,a))})}readFileSync(e,r){let s=typeof e==\"string\"?ue.fromPortablePath(e):e;return this.realFs.readFileSync(s,r)}async readdirPromise(e,r){return await new Promise((s,a)=>{r?r.recursive&&process.platform===\"win32\"?r.withFileTypes?this.realFs.readdir(ue.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(j$)),a)):this.realFs.readdir(ue.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(ue.toPortablePath)),a)):this.realFs.readdir(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.readdir(ue.fromPortablePath(e),this.makeCallback(s,a))})}readdirSync(e,r){return r?r.recursive&&process.platform===\"win32\"?r.withFileTypes?this.realFs.readdirSync(ue.fromPortablePath(e),r).map(j$):this.realFs.readdirSync(ue.fromPortablePath(e),r).map(ue.toPortablePath):this.realFs.readdirSync(ue.fromPortablePath(e),r):this.realFs.readdirSync(ue.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((r,s)=>{this.realFs.readlink(ue.fromPortablePath(e),this.makeCallback(r,s))}).then(r=>ue.toPortablePath(r))}readlinkSync(e){return ue.toPortablePath(this.realFs.readlinkSync(ue.fromPortablePath(e)))}async truncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.truncate(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}truncateSync(e,r){return this.realFs.truncateSync(ue.fromPortablePath(e),r)}async ftruncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.ftruncate(e,r,this.makeCallback(s,a))})}ftruncateSync(e,r){return this.realFs.ftruncateSync(e,r)}watch(e,r,s){return this.realFs.watch(ue.fromPortablePath(e),r,s)}watchFile(e,r,s){return this.realFs.watchFile(ue.fromPortablePath(e),r,s)}unwatchFile(e,r){return this.realFs.unwatchFile(ue.fromPortablePath(e),r)}makeCallback(e,r){return(s,a)=>{s?r(s):e(a)}}}});var Sn,G$=It(()=>{wd();Ip();tl();Sn=class extends Hs{constructor(e,{baseFs:r=new Yn}={}){super(K),this.target=this.pathUtils.normalize(e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?K.normalize(e):this.baseFs.resolve(K.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}});var W$,jf,Y$=It(()=>{wd();Ip();tl();W$=vt.root,jf=class extends Hs{constructor(e,{baseFs:r=new Yn}={}){super(K),this.target=this.pathUtils.resolve(vt.root,e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(vt.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){let r=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(W$,e));if(r.match(/^\\.\\.\\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(W$,this.pathUtils.relative(this.target,e))}}});var oE,V$=It(()=>{Ip();oE=class extends Hs{constructor(r,s){super(s);this.instance=null;this.factory=r}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(r){this.instance=r}mapFromBase(r){return r}mapToBase(r){return r}}});var Bd,rl,n0,K$=It(()=>{Bd=ye(\"fs\");Cd();wd();O_();ux();tl();rl=4278190080,n0=class extends Uf{constructor({baseFs:r=new Yn,filter:s=null,magicByte:a=42,maxOpenFiles:n=1/0,useCache:c=!0,maxAge:f=5e3,typeCheck:p=Bd.constants.S_IFREG,getMountPoint:h,factoryPromise:E,factorySync:C}){if(Math.floor(a)!==a||!(a>1&&a<=127))throw new Error(\"The magic byte must be set to a round value between 1 and 127 included\");super();this.fdMap=new Map;this.nextFd=3;this.isMount=new Set;this.notMount=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.baseFs=r,this.mountInstances=c?new Map:null,this.factoryPromise=E,this.factorySync=C,this.filter=s,this.getMountPoint=h,this.magic=a<<24,this.maxAge=f,this.maxOpenFiles=n,this.typeCheck=p}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if(Ed(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.saveAndClose?.(),this.mountInstances.delete(r)}discardAndClose(){if(Ed(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.discardAndClose?.(),this.mountInstances.delete(r)}resolve(r){return this.baseFs.resolve(r)}remapFd(r,s){let a=this.nextFd++|this.magic;return this.fdMap.set(a,[r,s]),a}async openPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.openPromise(r,s,a),async(n,{subPath:c})=>this.remapFd(n,await n.openPromise(c,s,a)))}openSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.openSync(r,s,a),(n,{subPath:c})=>this.remapFd(n,n.openSync(c,s,a)))}async opendirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.opendirPromise(r,s),async(a,{subPath:n})=>await a.opendirPromise(n,s),{requireSubpath:!1})}opendirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.opendirSync(r,s),(a,{subPath:n})=>a.opendirSync(n,s),{requireSubpath:!1})}async readPromise(r,s,a,n,c){if((r&rl)!==this.magic)return await this.baseFs.readPromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Uo(\"read\");let[p,h]=f;return await p.readPromise(h,s,a,n,c)}readSync(r,s,a,n,c){if((r&rl)!==this.magic)return this.baseFs.readSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Uo(\"readSync\");let[p,h]=f;return p.readSync(h,s,a,n,c)}async writePromise(r,s,a,n,c){if((r&rl)!==this.magic)return typeof s==\"string\"?await this.baseFs.writePromise(r,s,a):await this.baseFs.writePromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Uo(\"write\");let[p,h]=f;return typeof s==\"string\"?await p.writePromise(h,s,a):await p.writePromise(h,s,a,n,c)}writeSync(r,s,a,n,c){if((r&rl)!==this.magic)return typeof s==\"string\"?this.baseFs.writeSync(r,s,a):this.baseFs.writeSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Uo(\"writeSync\");let[p,h]=f;return typeof s==\"string\"?p.writeSync(h,s,a):p.writeSync(h,s,a,n,c)}async closePromise(r){if((r&rl)!==this.magic)return await this.baseFs.closePromise(r);let s=this.fdMap.get(r);if(typeof s>\"u\")throw Uo(\"close\");this.fdMap.delete(r);let[a,n]=s;return await a.closePromise(n)}closeSync(r){if((r&rl)!==this.magic)return this.baseFs.closeSync(r);let s=this.fdMap.get(r);if(typeof s>\"u\")throw Uo(\"closeSync\");this.fdMap.delete(r);let[a,n]=s;return a.closeSync(n)}createReadStream(r,s){return r===null?this.baseFs.createReadStream(r,s):this.makeCallSync(r,()=>this.baseFs.createReadStream(r,s),(a,{archivePath:n,subPath:c})=>{let f=a.createReadStream(c,s);return f.path=ue.fromPortablePath(this.pathUtils.join(n,c)),f})}createWriteStream(r,s){return r===null?this.baseFs.createWriteStream(r,s):this.makeCallSync(r,()=>this.baseFs.createWriteStream(r,s),(a,{subPath:n})=>a.createWriteStream(n,s))}async realpathPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.realpathPromise(r),async(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>\"u\"&&(c=await this.baseFs.realpathPromise(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,await s.realpathPromise(n)))})}realpathSync(r){return this.makeCallSync(r,()=>this.baseFs.realpathSync(r),(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>\"u\"&&(c=this.baseFs.realpathSync(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,s.realpathSync(n)))})}async existsPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.existsPromise(r),async(s,{subPath:a})=>await s.existsPromise(a))}existsSync(r){return this.makeCallSync(r,()=>this.baseFs.existsSync(r),(s,{subPath:a})=>s.existsSync(a))}async accessPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.accessPromise(r,s),async(a,{subPath:n})=>await a.accessPromise(n,s))}accessSync(r,s){return this.makeCallSync(r,()=>this.baseFs.accessSync(r,s),(a,{subPath:n})=>a.accessSync(n,s))}async statPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.statPromise(r,s),async(a,{subPath:n})=>await a.statPromise(n,s))}statSync(r,s){return this.makeCallSync(r,()=>this.baseFs.statSync(r,s),(a,{subPath:n})=>a.statSync(n,s))}async fstatPromise(r,s){if((r&rl)!==this.magic)return this.baseFs.fstatPromise(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Uo(\"fstat\");let[n,c]=a;return n.fstatPromise(c,s)}fstatSync(r,s){if((r&rl)!==this.magic)return this.baseFs.fstatSync(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Uo(\"fstatSync\");let[n,c]=a;return n.fstatSync(c,s)}async lstatPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.lstatPromise(r,s),async(a,{subPath:n})=>await a.lstatPromise(n,s))}lstatSync(r,s){return this.makeCallSync(r,()=>this.baseFs.lstatSync(r,s),(a,{subPath:n})=>a.lstatSync(n,s))}async fchmodPromise(r,s){if((r&rl)!==this.magic)return this.baseFs.fchmodPromise(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Uo(\"fchmod\");let[n,c]=a;return n.fchmodPromise(c,s)}fchmodSync(r,s){if((r&rl)!==this.magic)return this.baseFs.fchmodSync(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Uo(\"fchmodSync\");let[n,c]=a;return n.fchmodSync(c,s)}async chmodPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.chmodPromise(r,s),async(a,{subPath:n})=>await a.chmodPromise(n,s))}chmodSync(r,s){return this.makeCallSync(r,()=>this.baseFs.chmodSync(r,s),(a,{subPath:n})=>a.chmodSync(n,s))}async fchownPromise(r,s,a){if((r&rl)!==this.magic)return this.baseFs.fchownPromise(r,s,a);let n=this.fdMap.get(r);if(typeof n>\"u\")throw Uo(\"fchown\");let[c,f]=n;return c.fchownPromise(f,s,a)}fchownSync(r,s,a){if((r&rl)!==this.magic)return this.baseFs.fchownSync(r,s,a);let n=this.fdMap.get(r);if(typeof n>\"u\")throw Uo(\"fchownSync\");let[c,f]=n;return c.fchownSync(f,s,a)}async chownPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.chownPromise(r,s,a),async(n,{subPath:c})=>await n.chownPromise(c,s,a))}chownSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.chownSync(r,s,a),(n,{subPath:c})=>n.chownSync(c,s,a))}async renamePromise(r,s){return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.renamePromise(r,s),async()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})}),async(a,{subPath:n})=>await this.makeCallPromise(s,async()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})},async(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"});return await a.renamePromise(n,f)}))}renameSync(r,s){return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.renameSync(r,s),()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})}),(a,{subPath:n})=>this.makeCallSync(s,()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})},(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"});return a.renameSync(n,f)}))}async copyFilePromise(r,s,a=0){let n=async(c,f,p,h)=>{if(a&Bd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:\"EXDEV\"});if(a&Bd.constants.COPYFILE_EXCL&&await this.existsPromise(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:\"EEXIST\"});let E;try{E=await c.readFilePromise(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:\"EINVAL\"})}await p.writeFilePromise(h,E)};return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.copyFilePromise(r,s,a),async(c,{subPath:f})=>await n(this.baseFs,r,c,f)),async(c,{subPath:f})=>await this.makeCallPromise(s,async()=>await n(c,f,this.baseFs,s),async(p,{subPath:h})=>c!==p?await n(c,f,p,h):await c.copyFilePromise(f,h,a)))}copyFileSync(r,s,a=0){let n=(c,f,p,h)=>{if(a&Bd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:\"EXDEV\"});if(a&Bd.constants.COPYFILE_EXCL&&this.existsSync(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:\"EEXIST\"});let E;try{E=c.readFileSync(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:\"EINVAL\"})}p.writeFileSync(h,E)};return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.copyFileSync(r,s,a),(c,{subPath:f})=>n(this.baseFs,r,c,f)),(c,{subPath:f})=>this.makeCallSync(s,()=>n(c,f,this.baseFs,s),(p,{subPath:h})=>c!==p?n(c,f,p,h):c.copyFileSync(f,h,a)))}async appendFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.appendFilePromise(r,s,a),async(n,{subPath:c})=>await n.appendFilePromise(c,s,a))}appendFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.appendFileSync(r,s,a),(n,{subPath:c})=>n.appendFileSync(c,s,a))}async writeFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.writeFilePromise(r,s,a),async(n,{subPath:c})=>await n.writeFilePromise(c,s,a))}writeFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.writeFileSync(r,s,a),(n,{subPath:c})=>n.writeFileSync(c,s,a))}async unlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.unlinkPromise(r),async(s,{subPath:a})=>await s.unlinkPromise(a))}unlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.unlinkSync(r),(s,{subPath:a})=>s.unlinkSync(a))}async utimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.utimesPromise(r,s,a),async(n,{subPath:c})=>await n.utimesPromise(c,s,a))}utimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.utimesSync(r,s,a),(n,{subPath:c})=>n.utimesSync(c,s,a))}async lutimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.lutimesPromise(r,s,a),async(n,{subPath:c})=>await n.lutimesPromise(c,s,a))}lutimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.lutimesSync(r,s,a),(n,{subPath:c})=>n.lutimesSync(c,s,a))}async mkdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.mkdirPromise(r,s),async(a,{subPath:n})=>await a.mkdirPromise(n,s))}mkdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.mkdirSync(r,s),(a,{subPath:n})=>a.mkdirSync(n,s))}async rmdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmdirPromise(r,s),async(a,{subPath:n})=>await a.rmdirPromise(n,s))}rmdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmdirSync(r,s),(a,{subPath:n})=>a.rmdirSync(n,s))}async rmPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmPromise(r,s),async(a,{subPath:n})=>await a.rmPromise(n,s))}rmSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmSync(r,s),(a,{subPath:n})=>a.rmSync(n,s))}async linkPromise(r,s){return await this.makeCallPromise(s,async()=>await this.baseFs.linkPromise(r,s),async(a,{subPath:n})=>await a.linkPromise(r,n))}linkSync(r,s){return this.makeCallSync(s,()=>this.baseFs.linkSync(r,s),(a,{subPath:n})=>a.linkSync(r,n))}async symlinkPromise(r,s,a){return await this.makeCallPromise(s,async()=>await this.baseFs.symlinkPromise(r,s,a),async(n,{subPath:c})=>await n.symlinkPromise(r,c))}symlinkSync(r,s,a){return this.makeCallSync(s,()=>this.baseFs.symlinkSync(r,s,a),(n,{subPath:c})=>n.symlinkSync(r,c))}async readFilePromise(r,s){return this.makeCallPromise(r,async()=>await this.baseFs.readFilePromise(r,s),async(a,{subPath:n})=>await a.readFilePromise(n,s))}readFileSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readFileSync(r,s),(a,{subPath:n})=>a.readFileSync(n,s))}async readdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.readdirPromise(r,s),async(a,{subPath:n})=>await a.readdirPromise(n,s),{requireSubpath:!1})}readdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readdirSync(r,s),(a,{subPath:n})=>a.readdirSync(n,s),{requireSubpath:!1})}async readlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.readlinkPromise(r),async(s,{subPath:a})=>await s.readlinkPromise(a))}readlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.readlinkSync(r),(s,{subPath:a})=>s.readlinkSync(a))}async truncatePromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.truncatePromise(r,s),async(a,{subPath:n})=>await a.truncatePromise(n,s))}truncateSync(r,s){return this.makeCallSync(r,()=>this.baseFs.truncateSync(r,s),(a,{subPath:n})=>a.truncateSync(n,s))}async ftruncatePromise(r,s){if((r&rl)!==this.magic)return this.baseFs.ftruncatePromise(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Uo(\"ftruncate\");let[n,c]=a;return n.ftruncatePromise(c,s)}ftruncateSync(r,s){if((r&rl)!==this.magic)return this.baseFs.ftruncateSync(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Uo(\"ftruncateSync\");let[n,c]=a;return n.ftruncateSync(c,s)}watch(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watch(r,s,a),(n,{subPath:c})=>n.watch(c,s,a))}watchFile(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watchFile(r,s,a),()=>sE(this,r,s,a))}unwatchFile(r,s){return this.makeCallSync(r,()=>this.baseFs.unwatchFile(r,s),()=>yd(this,r,s))}async makeCallPromise(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!=\"string\")return await s();let c=this.resolve(r),f=this.findMount(c);return f?n&&f.subPath===\"/\"?await s():await this.getMountPromise(f.archivePath,async p=>await a(p,f)):await s()}makeCallSync(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!=\"string\")return s();let c=this.resolve(r),f=this.findMount(c);return!f||n&&f.subPath===\"/\"?s():this.getMountSync(f.archivePath,p=>a(p,f))}findMount(r){if(this.filter&&!this.filter.test(r))return null;let s=\"\";for(;;){let a=r.substring(s.length),n=this.getMountPoint(a,s);if(!n)return null;if(s=this.pathUtils.join(s,n),!this.isMount.has(s)){if(this.notMount.has(s))continue;try{if(this.typeCheck!==null&&(this.baseFs.statSync(s).mode&Bd.constants.S_IFMT)!==this.typeCheck){this.notMount.add(s);continue}}catch{return null}this.isMount.add(s)}return{archivePath:s,subPath:this.pathUtils.join(vt.root,r.substring(s.length))}}}limitOpenFiles(r){if(this.mountInstances===null)return;let s=Date.now(),a=s+this.maxAge,n=r===null?0:this.mountInstances.size-r;for(let[c,{childFs:f,expiresAt:p,refCount:h}]of this.mountInstances.entries())if(!(h!==0||f.hasOpenFileHandles?.())){if(s>=p){f.saveAndClose?.(),this.mountInstances.delete(c),n-=1;continue}else if(r===null||n<=0){a=p;break}f.saveAndClose?.(),this.mountInstances.delete(c),n-=1}this.limitOpenFilesTimeout===null&&(r===null&&this.mountInstances.size>0||r!==null)&&isFinite(a)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},a-s).unref())}async getMountPromise(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);if(!a){let n=await this.factoryPromise(this.baseFs,r);a=this.mountInstances.get(r),a||(a={childFs:n(),expiresAt:0,refCount:0})}this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,a.refCount+=1;try{return await s(a.childFs)}finally{a.refCount-=1}}else{let a=(await this.factoryPromise(this.baseFs,r))();try{return await s(a)}finally{a.saveAndClose?.()}}}getMountSync(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);return a||(a={childFs:this.factorySync(this.baseFs,r),expiresAt:0,refCount:0}),this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,s(a.childFs)}else{let a=this.factorySync(this.baseFs,r);try{return s(a)}finally{a.saveAndClose?.()}}}}});var er,mx,J$=It(()=>{Cd();tl();er=()=>Object.assign(new Error(\"ENOSYS: unsupported filesystem access\"),{code:\"ENOSYS\"}),mx=class t extends Ep{static{this.instance=new t}constructor(){super(K)}getExtractHint(){throw er()}getRealPath(){throw er()}resolve(){throw er()}async openPromise(){throw er()}openSync(){throw er()}async opendirPromise(){throw er()}opendirSync(){throw er()}async readPromise(){throw er()}readSync(){throw er()}async writePromise(){throw er()}writeSync(){throw er()}async closePromise(){throw er()}closeSync(){throw er()}createWriteStream(){throw er()}createReadStream(){throw er()}async realpathPromise(){throw er()}realpathSync(){throw er()}async readdirPromise(){throw er()}readdirSync(){throw er()}async existsPromise(e){throw er()}existsSync(e){throw er()}async accessPromise(){throw er()}accessSync(){throw er()}async statPromise(){throw er()}statSync(){throw er()}async fstatPromise(e){throw er()}fstatSync(e){throw er()}async lstatPromise(e){throw er()}lstatSync(e){throw er()}async fchmodPromise(){throw er()}fchmodSync(){throw er()}async chmodPromise(){throw er()}chmodSync(){throw er()}async fchownPromise(){throw er()}fchownSync(){throw er()}async chownPromise(){throw er()}chownSync(){throw er()}async mkdirPromise(){throw er()}mkdirSync(){throw er()}async rmdirPromise(){throw er()}rmdirSync(){throw er()}async rmPromise(){throw er()}rmSync(){throw er()}async linkPromise(){throw er()}linkSync(){throw er()}async symlinkPromise(){throw er()}symlinkSync(){throw er()}async renamePromise(){throw er()}renameSync(){throw er()}async copyFilePromise(){throw er()}copyFileSync(){throw er()}async appendFilePromise(){throw er()}appendFileSync(){throw er()}async writeFilePromise(){throw er()}writeFileSync(){throw er()}async unlinkPromise(){throw er()}unlinkSync(){throw er()}async utimesPromise(){throw er()}utimesSync(){throw er()}async lutimesPromise(){throw er()}lutimesSync(){throw er()}async readFilePromise(){throw er()}readFileSync(){throw er()}async readlinkPromise(){throw er()}readlinkSync(){throw er()}async truncatePromise(){throw er()}truncateSync(){throw er()}async ftruncatePromise(e,r){throw er()}ftruncateSync(e,r){throw er()}watch(){throw er()}watchFile(){throw er()}unwatchFile(){throw er()}}});var i0,z$=It(()=>{Ip();tl();i0=class extends Hs{constructor(e){super(ue),this.baseFs=e}mapFromBase(e){return ue.fromPortablePath(e)}mapToBase(e){return ue.toPortablePath(e)}}});var H7e,L_,j7e,fo,Z$=It(()=>{wd();Ip();tl();H7e=/^[0-9]+$/,L_=/^(\\/(?:[^/]+\\/)*?(?:\\$\\$virtual|__virtual__))((?:\\/((?:[^/]+-)?[a-f0-9]+)(?:\\/([^/]+))?)?((?:\\/.*)?))$/,j7e=/^([^/]+-)?[a-f0-9]+$/,fo=class t extends Hs{static makeVirtualPath(e,r,s){if(K.basename(e)!==\"__virtual__\")throw new Error('Assertion failed: Virtual folders must be named \"__virtual__\"');if(!K.basename(r).match(j7e))throw new Error(\"Assertion failed: Virtual components must be ended by an hexadecimal hash\");let n=K.relative(K.dirname(e),s).split(\"/\"),c=0;for(;c<n.length&&n[c]===\"..\";)c+=1;let f=n.slice(c);return K.join(e,r,String(c),...f)}static resolveVirtual(e){let r=e.match(L_);if(!r||!r[3]&&r[5])return e;let s=K.dirname(r[1]);if(!r[3]||!r[4])return s;if(!H7e.test(r[4]))return e;let n=Number(r[4]),c=\"../\".repeat(n),f=r[5]||\".\";return t.resolveVirtual(K.join(s,c,f))}constructor({baseFs:e=new Yn}={}){super(K),this.baseFs=e}getExtractHint(e){return this.baseFs.getExtractHint(e)}getRealPath(){return this.baseFs.getRealPath()}realpathSync(e){let r=e.match(L_);if(!r)return this.baseFs.realpathSync(e);if(!r[5])return e;let s=this.baseFs.realpathSync(this.mapToBase(e));return t.makeVirtualPath(r[1],r[3],s)}async realpathPromise(e){let r=e.match(L_);if(!r)return await this.baseFs.realpathPromise(e);if(!r[5])return e;let s=await this.baseFs.realpathPromise(this.mapToBase(e));return t.makeVirtualPath(r[1],r[3],s)}mapToBase(e){if(e===\"\")return e;if(this.pathUtils.isAbsolute(e))return t.resolveVirtual(e);let r=t.resolveVirtual(this.baseFs.resolve(vt.dot)),s=t.resolveVirtual(this.baseFs.resolve(e));return K.relative(r,s)||vt.dot}mapFromBase(e){return e}}});function q7e(t,e){return typeof M_.default.isUtf8<\"u\"?M_.default.isUtf8(t):Buffer.byteLength(e)===t.byteLength}var M_,X$,$$,yx,eee=It(()=>{M_=et(ye(\"buffer\")),X$=ye(\"url\"),$$=ye(\"util\");Ip();tl();yx=class extends Hs{constructor(e){super(ue),this.baseFs=e}mapFromBase(e){return e}mapToBase(e){if(typeof e==\"string\")return e;if(e instanceof URL)return(0,X$.fileURLToPath)(e);if(Buffer.isBuffer(e)){let r=e.toString();if(!q7e(e,r))throw new Error(\"Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942\");return r}throw new Error(`Unsupported path type: ${(0,$$.inspect)(e)}`)}}});var see,Ho,Cp,s0,Ex,Ix,aE,Nu,Ou,tee,ree,nee,iee,H2,oee=It(()=>{see=ye(\"readline\"),Ho=Symbol(\"kBaseFs\"),Cp=Symbol(\"kFd\"),s0=Symbol(\"kClosePromise\"),Ex=Symbol(\"kCloseResolve\"),Ix=Symbol(\"kCloseReject\"),aE=Symbol(\"kRefs\"),Nu=Symbol(\"kRef\"),Ou=Symbol(\"kUnref\"),H2=class{constructor(e,r){this[iee]=1;this[nee]=void 0;this[ree]=void 0;this[tee]=void 0;this[Ho]=r,this[Cp]=e}get fd(){return this[Cp]}async appendFile(e,r){try{this[Nu](this.appendFile);let s=(typeof r==\"string\"?r:r?.encoding)??void 0;return await this[Ho].appendFilePromise(this.fd,e,s?{encoding:s}:void 0)}finally{this[Ou]()}}async chown(e,r){try{return this[Nu](this.chown),await this[Ho].fchownPromise(this.fd,e,r)}finally{this[Ou]()}}async chmod(e){try{return this[Nu](this.chmod),await this[Ho].fchmodPromise(this.fd,e)}finally{this[Ou]()}}createReadStream(e){return this[Ho].createReadStream(null,{...e,fd:this.fd})}createWriteStream(e){return this[Ho].createWriteStream(null,{...e,fd:this.fd})}datasync(){throw new Error(\"Method not implemented.\")}sync(){throw new Error(\"Method not implemented.\")}async read(e,r,s,a){try{this[Nu](this.read);let n;return Buffer.isBuffer(e)?n=e:(e??={},n=e.buffer??Buffer.alloc(16384),r=e.offset||0,s=e.length??n.byteLength,a=e.position??null),r??=0,s??=0,s===0?{bytesRead:s,buffer:n}:{bytesRead:await this[Ho].readPromise(this.fd,n,r,s,a),buffer:n}}finally{this[Ou]()}}async readFile(e){try{this[Nu](this.readFile);let r=(typeof e==\"string\"?e:e?.encoding)??void 0;return await this[Ho].readFilePromise(this.fd,r)}finally{this[Ou]()}}readLines(e){return(0,see.createInterface)({input:this.createReadStream(e),crlfDelay:1/0})}async stat(e){try{return this[Nu](this.stat),await this[Ho].fstatPromise(this.fd,e)}finally{this[Ou]()}}async truncate(e){try{return this[Nu](this.truncate),await this[Ho].ftruncatePromise(this.fd,e)}finally{this[Ou]()}}utimes(e,r){throw new Error(\"Method not implemented.\")}async writeFile(e,r){try{this[Nu](this.writeFile);let s=(typeof r==\"string\"?r:r?.encoding)??void 0;await this[Ho].writeFilePromise(this.fd,e,s)}finally{this[Ou]()}}async write(...e){try{if(this[Nu](this.write),ArrayBuffer.isView(e[0])){let[r,s,a,n]=e;return{bytesWritten:await this[Ho].writePromise(this.fd,r,s??void 0,a??void 0,n??void 0),buffer:r}}else{let[r,s,a]=e;return{bytesWritten:await this[Ho].writePromise(this.fd,r,s,a),buffer:r}}}finally{this[Ou]()}}async writev(e,r){try{this[Nu](this.writev);let s=0;if(typeof r<\"u\")for(let a of e){let n=await this.write(a,void 0,void 0,r);s+=n.bytesWritten,r+=n.bytesWritten}else for(let a of e){let n=await this.write(a);s+=n.bytesWritten}return{buffers:e,bytesWritten:s}}finally{this[Ou]()}}readv(e,r){throw new Error(\"Method not implemented.\")}close(){if(this[Cp]===-1)return Promise.resolve();if(this[s0])return this[s0];if(this[aE]--,this[aE]===0){let e=this[Cp];this[Cp]=-1,this[s0]=this[Ho].closePromise(e).finally(()=>{this[s0]=void 0})}else this[s0]=new Promise((e,r)=>{this[Ex]=e,this[Ix]=r}).finally(()=>{this[s0]=void 0,this[Ix]=void 0,this[Ex]=void 0});return this[s0]}[(Ho,Cp,iee=aE,nee=s0,ree=Ex,tee=Ix,Nu)](e){if(this[Cp]===-1){let r=new Error(\"file closed\");throw r.code=\"EBADF\",r.syscall=e.name,r}this[aE]++}[Ou](){if(this[aE]--,this[aE]===0){let e=this[Cp];this[Cp]=-1,this[Ho].closePromise(e).then(this[Ex],this[Ix])}}}});function j2(t,e){e=new yx(e);let r=(s,a,n)=>{let c=s[a];s[a]=n,typeof c?.[lE.promisify.custom]<\"u\"&&(n[lE.promisify.custom]=c[lE.promisify.custom])};{r(t,\"exists\",(s,...a)=>{let c=typeof a[a.length-1]==\"function\"?a.pop():()=>{};process.nextTick(()=>{e.existsPromise(s).then(f=>{c(f)},()=>{c(!1)})})}),r(t,\"read\",(...s)=>{let[a,n,c,f,p,h]=s;if(s.length<=3){let E={};s.length<3?h=s[1]:(E=s[1],h=s[2]),{buffer:n=Buffer.alloc(16384),offset:c=0,length:f=n.byteLength,position:p}=E}if(c==null&&(c=0),f|=0,f===0){process.nextTick(()=>{h(null,0,n)});return}p==null&&(p=-1),process.nextTick(()=>{e.readPromise(a,n,c,f,p).then(E=>{h(null,E,n)},E=>{h(E,0,n)})})});for(let s of aee){let a=s.replace(/Promise$/,\"\");if(typeof t[a]>\"u\")continue;let n=e[s];if(typeof n>\"u\")continue;r(t,a,(...f)=>{let h=typeof f[f.length-1]==\"function\"?f.pop():()=>{};process.nextTick(()=>{n.apply(e,f).then(E=>{h(null,E)},E=>{h(E)})})})}t.realpath.native=t.realpath}{r(t,\"existsSync\",s=>{try{return e.existsSync(s)}catch{return!1}}),r(t,\"readSync\",(...s)=>{let[a,n,c,f,p]=s;return s.length<=3&&({offset:c=0,length:f=n.byteLength,position:p}=s[2]||{}),c==null&&(c=0),f|=0,f===0?0:(p==null&&(p=-1),e.readSync(a,n,c,f,p))});for(let s of G7e){let a=s;if(typeof t[a]>\"u\")continue;let n=e[s];typeof n>\"u\"||r(t,a,n.bind(e))}t.realpathSync.native=t.realpathSync}{let s=t.promises;for(let a of aee){let n=a.replace(/Promise$/,\"\");if(typeof s[n]>\"u\")continue;let c=e[a];typeof c>\"u\"||a!==\"open\"&&r(s,n,(f,...p)=>f instanceof H2?f[n].apply(f,p):c.call(e,f,...p))}r(s,\"open\",async(...a)=>{let n=await e.openPromise(...a);return new H2(n,e)})}t.read[lE.promisify.custom]=async(s,a,...n)=>({bytesRead:await e.readPromise(s,a,...n),buffer:a}),t.write[lE.promisify.custom]=async(s,a,...n)=>({bytesWritten:await e.writePromise(s,a,...n),buffer:a})}function Cx(t,e){let r=Object.create(t);return j2(r,e),r}var lE,G7e,aee,lee=It(()=>{lE=ye(\"util\");eee();oee();G7e=new Set([\"accessSync\",\"appendFileSync\",\"createReadStream\",\"createWriteStream\",\"chmodSync\",\"fchmodSync\",\"chownSync\",\"fchownSync\",\"closeSync\",\"copyFileSync\",\"linkSync\",\"lstatSync\",\"fstatSync\",\"lutimesSync\",\"mkdirSync\",\"openSync\",\"opendirSync\",\"readlinkSync\",\"readFileSync\",\"readdirSync\",\"readlinkSync\",\"realpathSync\",\"renameSync\",\"rmdirSync\",\"rmSync\",\"statSync\",\"symlinkSync\",\"truncateSync\",\"ftruncateSync\",\"unlinkSync\",\"unwatchFile\",\"utimesSync\",\"watch\",\"watchFile\",\"writeFileSync\",\"writeSync\"]),aee=new Set([\"accessPromise\",\"appendFilePromise\",\"fchmodPromise\",\"chmodPromise\",\"fchownPromise\",\"chownPromise\",\"closePromise\",\"copyFilePromise\",\"linkPromise\",\"fstatPromise\",\"lstatPromise\",\"lutimesPromise\",\"mkdirPromise\",\"openPromise\",\"opendirPromise\",\"readdirPromise\",\"realpathPromise\",\"readFilePromise\",\"readdirPromise\",\"readlinkPromise\",\"renamePromise\",\"rmdirPromise\",\"rmPromise\",\"statPromise\",\"symlinkPromise\",\"truncatePromise\",\"ftruncatePromise\",\"unlinkPromise\",\"utimesPromise\",\"writeFilePromise\",\"writeSync\"])});function cee(t){let e=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,\"0\");return`${t}${e}`}function uee(){if(__)return __;let t=ue.toPortablePath(fee.default.tmpdir()),e=le.realpathSync(t);return process.once(\"exit\",()=>{le.rmtempSync()}),__={tmpdir:t,realTmpdir:e}}var fee,Lu,__,le,Aee=It(()=>{fee=et(ye(\"os\"));wd();tl();Lu=new Set,__=null;le=Object.assign(new Yn,{detachTemp(t){Lu.delete(t)},mktempSync(t){let{tmpdir:e,realTmpdir:r}=uee();for(;;){let s=cee(\"xfs-\");try{this.mkdirSync(K.join(e,s))}catch(n){if(n.code===\"EEXIST\")continue;throw n}let a=K.join(r,s);if(Lu.add(a),typeof t>\"u\")return a;try{return t(a)}finally{if(Lu.has(a)){Lu.delete(a);try{this.removeSync(a)}catch{}}}}},async mktempPromise(t){let{tmpdir:e,realTmpdir:r}=uee();for(;;){let s=cee(\"xfs-\");try{await this.mkdirPromise(K.join(e,s))}catch(n){if(n.code===\"EEXIST\")continue;throw n}let a=K.join(r,s);if(Lu.add(a),typeof t>\"u\")return a;try{return await t(a)}finally{if(Lu.has(a)){Lu.delete(a);try{await this.removePromise(a)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(Lu.values()).map(async t=>{try{await le.removePromise(t,{maxRetries:0}),Lu.delete(t)}catch{}}))},rmtempSync(){for(let t of Lu)try{le.removeSync(t),Lu.delete(t)}catch{}}})});var q2={};Vt(q2,{AliasFS:()=>Hf,BasePortableFakeFS:()=>Uf,CustomDir:()=>U2,CwdFS:()=>Sn,FakeFS:()=>Ep,Filename:()=>Er,JailFS:()=>jf,LazyFS:()=>oE,MountFS:()=>n0,NoFS:()=>mx,NodeFS:()=>Yn,PortablePath:()=>vt,PosixFS:()=>i0,ProxiedFS:()=>Hs,VirtualFS:()=>fo,constants:()=>ui,errors:()=>or,extendFs:()=>Cx,normalizeLineEndings:()=>Id,npath:()=>ue,opendir:()=>hx,patchFs:()=>j2,ppath:()=>K,setupCopyIndex:()=>px,statUtils:()=>el,unwatchAllFiles:()=>Ed,unwatchFile:()=>yd,watchFile:()=>sE,xfs:()=>le});var bt=It(()=>{x$();ux();T_();N_();N$();O_();Cd();tl();tl();H$();Cd();G$();Y$();V$();K$();J$();wd();z$();Ip();Z$();lee();Aee()});var mee=L((A5t,dee)=>{dee.exports=gee;gee.sync=Y7e;var pee=ye(\"fs\");function W7e(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(\";\"),r.indexOf(\"\")!==-1))return!0;for(var s=0;s<r.length;s++){var a=r[s].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a)return!0}return!1}function hee(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:W7e(e,r)}function gee(t,e,r){pee.stat(t,function(s,a){r(s,s?!1:hee(a,t,e))})}function Y7e(t,e){return hee(pee.statSync(t),t,e)}});var wee=L((p5t,Cee)=>{Cee.exports=Eee;Eee.sync=V7e;var yee=ye(\"fs\");function Eee(t,e,r){yee.stat(t,function(s,a){r(s,s?!1:Iee(a,e))})}function V7e(t,e){return Iee(yee.statSync(t),e)}function Iee(t,e){return t.isFile()&&K7e(t,e)}function K7e(t,e){var r=t.mode,s=t.uid,a=t.gid,n=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),c=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),f=parseInt(\"100\",8),p=parseInt(\"010\",8),h=parseInt(\"001\",8),E=f|p,C=r&h||r&p&&a===c||r&f&&s===n||r&E&&n===0;return C}});var vee=L((g5t,Bee)=>{var h5t=ye(\"fs\"),wx;process.platform===\"win32\"||global.TESTING_WINDOWS?wx=mee():wx=wee();Bee.exports=U_;U_.sync=J7e;function U_(t,e,r){if(typeof e==\"function\"&&(r=e,e={}),!r){if(typeof Promise!=\"function\")throw new TypeError(\"callback not provided\");return new Promise(function(s,a){U_(t,e||{},function(n,c){n?a(n):s(c)})})}wx(t,e||{},function(s,a){s&&(s.code===\"EACCES\"||e&&e.ignoreErrors)&&(s=null,a=!1),r(s,a)})}function J7e(t,e){try{return wx.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code===\"EACCES\")return!1;throw r}}});var Qee=L((d5t,kee)=>{var cE=process.platform===\"win32\"||process.env.OSTYPE===\"cygwin\"||process.env.OSTYPE===\"msys\",See=ye(\"path\"),z7e=cE?\";\":\":\",Dee=vee(),bee=t=>Object.assign(new Error(`not found: ${t}`),{code:\"ENOENT\"}),Pee=(t,e)=>{let r=e.colon||z7e,s=t.match(/\\//)||cE&&t.match(/\\\\/)?[\"\"]:[...cE?[process.cwd()]:[],...(e.path||process.env.PATH||\"\").split(r)],a=cE?e.pathExt||process.env.PATHEXT||\".EXE;.CMD;.BAT;.COM\":\"\",n=cE?a.split(r):[\"\"];return cE&&t.indexOf(\".\")!==-1&&n[0]!==\"\"&&n.unshift(\"\"),{pathEnv:s,pathExt:n,pathExtExe:a}},xee=(t,e,r)=>{typeof e==\"function\"&&(r=e,e={}),e||(e={});let{pathEnv:s,pathExt:a,pathExtExe:n}=Pee(t,e),c=[],f=h=>new Promise((E,C)=>{if(h===s.length)return e.all&&c.length?E(c):C(bee(t));let S=s[h],P=/^\".*\"$/.test(S)?S.slice(1,-1):S,I=See.join(P,t),R=!P&&/^\\.[\\\\\\/]/.test(t)?t.slice(0,2)+I:I;E(p(R,h,0))}),p=(h,E,C)=>new Promise((S,P)=>{if(C===a.length)return S(f(E+1));let I=a[C];Dee(h+I,{pathExt:n},(R,N)=>{if(!R&&N)if(e.all)c.push(h+I);else return S(h+I);return S(p(h,E,C+1))})});return r?f(0).then(h=>r(null,h),r):f(0)},Z7e=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:s,pathExtExe:a}=Pee(t,e),n=[];for(let c=0;c<r.length;c++){let f=r[c],p=/^\".*\"$/.test(f)?f.slice(1,-1):f,h=See.join(p,t),E=!p&&/^\\.[\\\\\\/]/.test(t)?t.slice(0,2)+h:h;for(let C=0;C<s.length;C++){let S=E+s[C];try{if(Dee.sync(S,{pathExt:a}))if(e.all)n.push(S);else return S}catch{}}}if(e.all&&n.length)return n;if(e.nothrow)return null;throw bee(t)};kee.exports=xee;xee.sync=Z7e});var Ree=L((m5t,H_)=>{\"use strict\";var Tee=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!==\"win32\"?\"PATH\":Object.keys(e).reverse().find(s=>s.toUpperCase()===\"PATH\")||\"Path\"};H_.exports=Tee;H_.exports.default=Tee});var Lee=L((y5t,Oee)=>{\"use strict\";var Fee=ye(\"path\"),X7e=Qee(),$7e=Ree();function Nee(t,e){let r=t.options.env||process.env,s=process.cwd(),a=t.options.cwd!=null,n=a&&process.chdir!==void 0&&!process.chdir.disabled;if(n)try{process.chdir(t.options.cwd)}catch{}let c;try{c=X7e.sync(t.command,{path:r[$7e({env:r})],pathExt:e?Fee.delimiter:void 0})}catch{}finally{n&&process.chdir(s)}return c&&(c=Fee.resolve(a?t.options.cwd:\"\",c)),c}function eKe(t){return Nee(t)||Nee(t,!0)}Oee.exports=eKe});var Mee=L((E5t,q_)=>{\"use strict\";var j_=/([()\\][%!^\"`<>&|;, *?])/g;function tKe(t){return t=t.replace(j_,\"^$1\"),t}function rKe(t,e){return t=`${t}`,t=t.replace(/(?=(\\\\+?)?)\\1\"/g,'$1$1\\\\\"'),t=t.replace(/(?=(\\\\+?)?)\\1$/,\"$1$1\"),t=`\"${t}\"`,t=t.replace(j_,\"^$1\"),e&&(t=t.replace(j_,\"^$1\")),t}q_.exports.command=tKe;q_.exports.argument=rKe});var Uee=L((I5t,_ee)=>{\"use strict\";_ee.exports=/^#!(.*)/});var jee=L((C5t,Hee)=>{\"use strict\";var nKe=Uee();Hee.exports=(t=\"\")=>{let e=t.match(nKe);if(!e)return null;let[r,s]=e[0].replace(/#! ?/,\"\").split(\" \"),a=r.split(\"/\").pop();return a===\"env\"?s:s?`${a} ${s}`:a}});var Gee=L((w5t,qee)=>{\"use strict\";var G_=ye(\"fs\"),iKe=jee();function sKe(t){let r=Buffer.alloc(150),s;try{s=G_.openSync(t,\"r\"),G_.readSync(s,r,0,150,0),G_.closeSync(s)}catch{}return iKe(r.toString())}qee.exports=sKe});var Kee=L((B5t,Vee)=>{\"use strict\";var oKe=ye(\"path\"),Wee=Lee(),Yee=Mee(),aKe=Gee(),lKe=process.platform===\"win32\",cKe=/\\.(?:com|exe)$/i,uKe=/node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;function fKe(t){t.file=Wee(t);let e=t.file&&aKe(t.file);return e?(t.args.unshift(t.file),t.command=e,Wee(t)):t.file}function AKe(t){if(!lKe)return t;let e=fKe(t),r=!cKe.test(e);if(t.options.forceShell||r){let s=uKe.test(e);t.command=oKe.normalize(t.command),t.command=Yee.command(t.command),t.args=t.args.map(n=>Yee.argument(n,s));let a=[t.command].concat(t.args).join(\" \");t.args=[\"/d\",\"/s\",\"/c\",`\"${a}\"`],t.command=process.env.comspec||\"cmd.exe\",t.options.windowsVerbatimArguments=!0}return t}function pKe(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let s={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?s:AKe(s)}Vee.exports=pKe});var Zee=L((v5t,zee)=>{\"use strict\";var W_=process.platform===\"win32\";function Y_(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:\"ENOENT\",errno:\"ENOENT\",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function hKe(t,e){if(!W_)return;let r=t.emit;t.emit=function(s,a){if(s===\"exit\"){let n=Jee(a,e);if(n)return r.call(t,\"error\",n)}return r.apply(t,arguments)}}function Jee(t,e){return W_&&t===1&&!e.file?Y_(e.original,\"spawn\"):null}function gKe(t,e){return W_&&t===1&&!e.file?Y_(e.original,\"spawnSync\"):null}zee.exports={hookChildProcess:hKe,verifyENOENT:Jee,verifyENOENTSync:gKe,notFoundError:Y_}});var J_=L((S5t,uE)=>{\"use strict\";var Xee=ye(\"child_process\"),V_=Kee(),K_=Zee();function $ee(t,e,r){let s=V_(t,e,r),a=Xee.spawn(s.command,s.args,s.options);return K_.hookChildProcess(a,s),a}function dKe(t,e,r){let s=V_(t,e,r),a=Xee.spawnSync(s.command,s.args,s.options);return a.error=a.error||K_.verifyENOENTSync(a.status,s),a}uE.exports=$ee;uE.exports.spawn=$ee;uE.exports.sync=dKe;uE.exports._parse=V_;uE.exports._enoent=K_});var tte=L((D5t,ete)=>{\"use strict\";function mKe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function vd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,vd)}mKe(vd,Error);vd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function yKe(t,e){e=e!==void 0?e:{};var r={},s={Start:Ya},a=Ya,n=function(O){return O||[]},c=function(O,J,re){return[{command:O,type:J}].concat(re||[])},f=function(O,J){return[{command:O,type:J||\";\"}]},p=function(O){return O},h=\";\",E=ur(\";\",!1),C=\"&\",S=ur(\"&\",!1),P=function(O,J){return J?{chain:O,then:J}:{chain:O}},I=function(O,J){return{type:O,line:J}},R=\"&&\",N=ur(\"&&\",!1),U=\"||\",W=ur(\"||\",!1),te=function(O,J){return J?{...O,then:J}:O},ie=function(O,J){return{type:O,chain:J}},Ae=\"|&\",ce=ur(\"|&\",!1),me=\"|\",pe=ur(\"|\",!1),Be=\"=\",Ce=ur(\"=\",!1),g=function(O,J){return{name:O,args:[J]}},we=function(O){return{name:O,args:[]}},Ee=\"(\",fe=ur(\"(\",!1),se=\")\",X=ur(\")\",!1),De=function(O,J){return{type:\"subshell\",subshell:O,args:J}},Re=\"{\",gt=ur(\"{\",!1),j=\"}\",rt=ur(\"}\",!1),Fe=function(O,J){return{type:\"group\",group:O,args:J}},Ne=function(O,J){return{type:\"command\",args:J,envs:O}},Pe=function(O){return{type:\"envs\",envs:O}},Ye=function(O){return O},ke=function(O){return O},it=/^[0-9]/,_e=zi([[\"0\",\"9\"]],!1,!1),x=function(O,J,re){return{type:\"redirection\",subtype:J,fd:O!==null?parseInt(O):null,args:[re]}},w=\">>\",b=ur(\">>\",!1),y=\">&\",F=ur(\">&\",!1),z=\">\",Z=ur(\">\",!1),$=\"<<<\",oe=ur(\"<<<\",!1),xe=\"<&\",Te=ur(\"<&\",!1),lt=\"<\",Et=ur(\"<\",!1),qt=function(O){return{type:\"argument\",segments:[].concat(...O)}},ir=function(O){return O},Pt=\"$'\",gn=ur(\"$'\",!1),Pr=\"'\",Ir=ur(\"'\",!1),Nr=function(O){return[{type:\"text\",text:O}]},nn='\"\"',oi=ur('\"\"',!1),wo=function(){return{type:\"text\",text:\"\"}},rs='\"',eo=ur('\"',!1),Bo=function(O){return O},Hi=function(O){return{type:\"arithmetic\",arithmetic:O,quoted:!0}},to=function(O){return{type:\"shell\",shell:O,quoted:!0}},vo=function(O){return{type:\"variable\",...O,quoted:!0}},RA=function(O){return{type:\"text\",text:O}},pf=function(O){return{type:\"arithmetic\",arithmetic:O,quoted:!1}},Eh=function(O){return{type:\"shell\",shell:O,quoted:!1}},Ih=function(O){return{type:\"variable\",...O,quoted:!1}},ro=function(O){return{type:\"glob\",pattern:O}},jn=/^[^']/,Rs=zi([\"'\"],!0,!1),no=function(O){return O.join(\"\")},lu=/^[^$\"]/,cu=zi([\"$\",'\"'],!0,!1),uu=`\\\\\n`,FA=ur(`\\\\\n`,!1),NA=function(){return\"\"},aa=\"\\\\\",la=ur(\"\\\\\",!1),OA=/^[\\\\$\"`]/,gr=zi([\"\\\\\",\"$\",'\"',\"`\"],!1,!1),So=function(O){return O},Me=\"\\\\a\",fu=ur(\"\\\\a\",!1),Cr=function(){return\"a\"},hf=\"\\\\b\",LA=ur(\"\\\\b\",!1),MA=function(){return\"\\b\"},Au=/^[Ee]/,pu=zi([\"E\",\"e\"],!1,!1),ac=function(){return\"\\x1B\"},ve=\"\\\\f\",Nt=ur(\"\\\\f\",!1),lc=function(){return\"\\f\"},Ni=\"\\\\n\",io=ur(\"\\\\n\",!1),Rt=function(){return`\n`},xn=\"\\\\r\",ca=ur(\"\\\\r\",!1),ji=function(){return\"\\r\"},Oi=\"\\\\t\",Oa=ur(\"\\\\t\",!1),dn=function(){return\"\t\"},Jn=\"\\\\v\",hu=ur(\"\\\\v\",!1),Ch=function(){return\"\\v\"},La=/^[\\\\'\"?]/,Ma=zi([\"\\\\\",\"'\",'\"',\"?\"],!1,!1),Ua=function(O){return String.fromCharCode(parseInt(O,16))},Xe=\"\\\\x\",Ha=ur(\"\\\\x\",!1),gf=\"\\\\u\",cc=ur(\"\\\\u\",!1),wn=\"\\\\U\",ua=ur(\"\\\\U\",!1),_A=function(O){return String.fromCodePoint(parseInt(O,16))},UA=/^[0-7]/,fa=zi([[\"0\",\"7\"]],!1,!1),vl=/^[0-9a-fA-f]/,Mt=zi([[\"0\",\"9\"],[\"a\",\"f\"],[\"A\",\"f\"]],!1,!1),kn=Ef(),Aa=\"{}\",ja=ur(\"{}\",!1),ns=function(){return\"{}\"},uc=\"-\",gu=ur(\"-\",!1),fc=\"+\",qa=ur(\"+\",!1),Li=\".\",Cs=ur(\".\",!1),Sl=function(O,J,re){return{type:\"number\",value:(O===\"-\"?-1:1)*parseFloat(J.join(\"\")+\".\"+re.join(\"\"))}},df=function(O,J){return{type:\"number\",value:(O===\"-\"?-1:1)*parseInt(J.join(\"\"))}},Ac=function(O){return{type:\"variable\",...O}},wi=function(O){return{type:\"variable\",name:O}},Qn=function(O){return O},pc=\"*\",Je=ur(\"*\",!1),st=\"/\",St=ur(\"/\",!1),lr=function(O,J,re){return{type:J===\"*\"?\"multiplication\":\"division\",right:re}},ee=function(O,J){return J.reduce((re,de)=>({left:re,...de}),O)},Ie=function(O,J,re){return{type:J===\"+\"?\"addition\":\"subtraction\",right:re}},Oe=\"$((\",ht=ur(\"$((\",!1),mt=\"))\",Dt=ur(\"))\",!1),tr=function(O){return O},fn=\"$(\",ai=ur(\"$(\",!1),qi=function(O){return O},Tn=\"${\",Ga=ur(\"${\",!1),my=\":-\",t2=ur(\":-\",!1),Do=function(O,J){return{name:O,defaultValue:J}},yy=\":-}\",wh=ur(\":-}\",!1),r2=function(O){return{name:O,defaultValue:[]}},bo=\":+\",Bh=ur(\":+\",!1),vh=function(O,J){return{name:O,alternativeValue:J}},du=\":+}\",Sh=ur(\":+}\",!1),Ng=function(O){return{name:O,alternativeValue:[]}},Og=function(O){return{name:O}},Lg=\"$\",Ey=ur(\"$\",!1),mf=function(O){return e.isGlobPattern(O)},Po=function(O){return O},Dl=/^[a-zA-Z0-9_]/,Dh=zi([[\"a\",\"z\"],[\"A\",\"Z\"],[\"0\",\"9\"],\"_\"],!1,!1),Mg=function(){return By()},bl=/^[$@*?#a-zA-Z0-9_\\-]/,Pl=zi([\"$\",\"@\",\"*\",\"?\",\"#\",[\"a\",\"z\"],[\"A\",\"Z\"],[\"0\",\"9\"],\"_\",\"-\"],!1,!1),Iy=/^[()}<>$|&; \\t\"']/,HA=zi([\"(\",\")\",\"}\",\"<\",\">\",\"$\",\"|\",\"&\",\";\",\" \",\"\t\",'\"',\"'\"],!1,!1),Cy=/^[<>&; \\t\"']/,wy=zi([\"<\",\">\",\"&\",\";\",\" \",\"\t\",'\"',\"'\"],!1,!1),jA=/^[ \\t]/,qA=zi([\" \",\"\t\"],!1,!1),Y=0,xt=0,GA=[{line:1,column:1}],xo=0,yf=[],dt=0,mu;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function By(){return t.substring(xt,Y)}function _g(){return If(xt,Y)}function n2(O,J){throw J=J!==void 0?J:If(xt,Y),WA([Ug(O)],t.substring(xt,Y),J)}function bh(O,J){throw J=J!==void 0?J:If(xt,Y),gi(O,J)}function ur(O,J){return{type:\"literal\",text:O,ignoreCase:J}}function zi(O,J,re){return{type:\"class\",parts:O,inverted:J,ignoreCase:re}}function Ef(){return{type:\"any\"}}function Wa(){return{type:\"end\"}}function Ug(O){return{type:\"other\",description:O}}function yu(O){var J=GA[O],re;if(J)return J;for(re=O-1;!GA[re];)re--;for(J=GA[re],J={line:J.line,column:J.column};re<O;)t.charCodeAt(re)===10?(J.line++,J.column=1):J.column++,re++;return GA[O]=J,J}function If(O,J){var re=yu(O),de=yu(J);return{start:{offset:O,line:re.line,column:re.column},end:{offset:J,line:de.line,column:de.column}}}function wt(O){Y<xo||(Y>xo&&(xo=Y,yf=[]),yf.push(O))}function gi(O,J){return new vd(O,null,null,J)}function WA(O,J,re){return new vd(vd.buildMessage(O,J),O,J,re)}function Ya(){var O,J,re;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(re=pa(),re===r&&(re=null),re!==r?(xt=O,J=n(re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function pa(){var O,J,re,de,Ke;if(O=Y,J=Ph(),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=Hg(),de!==r?(Ke=Va(),Ke===r&&(Ke=null),Ke!==r?(xt=O,J=c(J,de,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;if(O===r)if(O=Y,J=Ph(),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=Hg(),de===r&&(de=null),de!==r?(xt=O,J=f(J,de),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function Va(){var O,J,re,de,Ke;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=pa(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=p(re),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function Hg(){var O;return t.charCodeAt(Y)===59?(O=h,Y++):(O=r,dt===0&&wt(E)),O===r&&(t.charCodeAt(Y)===38?(O=C,Y++):(O=r,dt===0&&wt(S))),O}function Ph(){var O,J,re;return O=Y,J=YA(),J!==r?(re=jg(),re===r&&(re=null),re!==r?(xt=O,J=P(J,re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function jg(){var O,J,re,de,Ke,ft,dr;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=vy(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=Ph(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();ft!==r?(xt=O,J=I(re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function vy(){var O;return t.substr(Y,2)===R?(O=R,Y+=2):(O=r,dt===0&&wt(N)),O===r&&(t.substr(Y,2)===U?(O=U,Y+=2):(O=r,dt===0&&wt(W))),O}function YA(){var O,J,re;return O=Y,J=Cf(),J!==r?(re=qg(),re===r&&(re=null),re!==r?(xt=O,J=te(J,re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function qg(){var O,J,re,de,Ke,ft,dr;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=Eu(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=YA(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();ft!==r?(xt=O,J=ie(re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function Eu(){var O;return t.substr(Y,2)===Ae?(O=Ae,Y+=2):(O=r,dt===0&&wt(ce)),O===r&&(t.charCodeAt(Y)===124?(O=me,Y++):(O=r,dt===0&&wt(pe))),O}function Iu(){var O,J,re,de,Ke,ft;if(O=Y,J=Qh(),J!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,dt===0&&wt(Ce)),re!==r)if(de=VA(),de!==r){for(Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();Ke!==r?(xt=O,J=g(J,de),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;else Y=O,O=r;if(O===r)if(O=Y,J=Qh(),J!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,dt===0&&wt(Ce)),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=we(J),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function Cf(){var O,J,re,de,Ke,ft,dr,Br,_n,di,ws;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(t.charCodeAt(Y)===40?(re=Ee,Y++):(re=r,dt===0&&wt(fe)),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=pa(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();if(ft!==r)if(t.charCodeAt(Y)===41?(dr=se,Y++):(dr=r,dt===0&&wt(X)),dr!==r){for(Br=[],_n=kt();_n!==r;)Br.push(_n),_n=kt();if(Br!==r){for(_n=[],di=qn();di!==r;)_n.push(di),di=qn();if(_n!==r){for(di=[],ws=kt();ws!==r;)di.push(ws),ws=kt();di!==r?(xt=O,J=De(Ke,_n),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(t.charCodeAt(Y)===123?(re=Re,Y++):(re=r,dt===0&&wt(gt)),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=pa(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();if(ft!==r)if(t.charCodeAt(Y)===125?(dr=j,Y++):(dr=r,dt===0&&wt(rt)),dr!==r){for(Br=[],_n=kt();_n!==r;)Br.push(_n),_n=kt();if(Br!==r){for(_n=[],di=qn();di!==r;)_n.push(di),di=qn();if(_n!==r){for(di=[],ws=kt();ws!==r;)di.push(ws),ws=kt();di!==r?(xt=O,J=Fe(Ke,_n),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r){for(re=[],de=Iu();de!==r;)re.push(de),de=Iu();if(re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r){if(Ke=[],ft=Cu(),ft!==r)for(;ft!==r;)Ke.push(ft),ft=Cu();else Ke=r;if(Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();ft!==r?(xt=O,J=Ne(re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;if(O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r){if(re=[],de=Iu(),de!==r)for(;de!==r;)re.push(de),de=Iu();else re=r;if(re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=Pe(re),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}}}return O}function Fs(){var O,J,re,de,Ke;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r){if(re=[],de=xi(),de!==r)for(;de!==r;)re.push(de),de=xi();else re=r;if(re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=Ye(re),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r;return O}function Cu(){var O,J,re;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r?(re=qn(),re!==r?(xt=O,J=ke(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();J!==r?(re=xi(),re!==r?(xt=O,J=ke(re),O=J):(Y=O,O=r)):(Y=O,O=r)}return O}function qn(){var O,J,re,de,Ke;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(it.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(_e)),re===r&&(re=null),re!==r?(de=is(),de!==r?(Ke=xi(),Ke!==r?(xt=O,J=x(re,de,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function is(){var O;return t.substr(Y,2)===w?(O=w,Y+=2):(O=r,dt===0&&wt(b)),O===r&&(t.substr(Y,2)===y?(O=y,Y+=2):(O=r,dt===0&&wt(F)),O===r&&(t.charCodeAt(Y)===62?(O=z,Y++):(O=r,dt===0&&wt(Z)),O===r&&(t.substr(Y,3)===$?(O=$,Y+=3):(O=r,dt===0&&wt(oe)),O===r&&(t.substr(Y,2)===xe?(O=xe,Y+=2):(O=r,dt===0&&wt(Te)),O===r&&(t.charCodeAt(Y)===60?(O=lt,Y++):(O=r,dt===0&&wt(Et))))))),O}function xi(){var O,J,re;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(re=VA(),re!==r?(xt=O,J=ke(re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function VA(){var O,J,re;if(O=Y,J=[],re=wf(),re!==r)for(;re!==r;)J.push(re),re=wf();else J=r;return J!==r&&(xt=O,J=qt(J)),O=J,O}function wf(){var O,J;return O=Y,J=mn(),J!==r&&(xt=O,J=ir(J)),O=J,O===r&&(O=Y,J=Gg(),J!==r&&(xt=O,J=ir(J)),O=J,O===r&&(O=Y,J=Wg(),J!==r&&(xt=O,J=ir(J)),O=J,O===r&&(O=Y,J=ss(),J!==r&&(xt=O,J=ir(J)),O=J))),O}function mn(){var O,J,re,de;return O=Y,t.substr(Y,2)===Pt?(J=Pt,Y+=2):(J=r,dt===0&&wt(gn)),J!==r?(re=yn(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,dt===0&&wt(Ir)),de!==r?(xt=O,J=Nr(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function Gg(){var O,J,re,de;return O=Y,t.charCodeAt(Y)===39?(J=Pr,Y++):(J=r,dt===0&&wt(Ir)),J!==r?(re=Bf(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,dt===0&&wt(Ir)),de!==r?(xt=O,J=Nr(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function Wg(){var O,J,re,de;if(O=Y,t.substr(Y,2)===nn?(J=nn,Y+=2):(J=r,dt===0&&wt(oi)),J!==r&&(xt=O,J=wo()),O=J,O===r)if(O=Y,t.charCodeAt(Y)===34?(J=rs,Y++):(J=r,dt===0&&wt(eo)),J!==r){for(re=[],de=xl();de!==r;)re.push(de),de=xl();re!==r?(t.charCodeAt(Y)===34?(de=rs,Y++):(de=r,dt===0&&wt(eo)),de!==r?(xt=O,J=Bo(re),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function ss(){var O,J,re;if(O=Y,J=[],re=ko(),re!==r)for(;re!==r;)J.push(re),re=ko();else J=r;return J!==r&&(xt=O,J=Bo(J)),O=J,O}function xl(){var O,J;return O=Y,J=Xr(),J!==r&&(xt=O,J=Hi(J)),O=J,O===r&&(O=Y,J=kh(),J!==r&&(xt=O,J=to(J)),O=J,O===r&&(O=Y,J=JA(),J!==r&&(xt=O,J=vo(J)),O=J,O===r&&(O=Y,J=vf(),J!==r&&(xt=O,J=RA(J)),O=J))),O}function ko(){var O,J;return O=Y,J=Xr(),J!==r&&(xt=O,J=pf(J)),O=J,O===r&&(O=Y,J=kh(),J!==r&&(xt=O,J=Eh(J)),O=J,O===r&&(O=Y,J=JA(),J!==r&&(xt=O,J=Ih(J)),O=J,O===r&&(O=Y,J=Sy(),J!==r&&(xt=O,J=ro(J)),O=J,O===r&&(O=Y,J=xh(),J!==r&&(xt=O,J=RA(J)),O=J)))),O}function Bf(){var O,J,re;for(O=Y,J=[],jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(Rs));re!==r;)J.push(re),jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(Rs));return J!==r&&(xt=O,J=no(J)),O=J,O}function vf(){var O,J,re;if(O=Y,J=[],re=kl(),re===r&&(lu.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(cu))),re!==r)for(;re!==r;)J.push(re),re=kl(),re===r&&(lu.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(cu)));else J=r;return J!==r&&(xt=O,J=no(J)),O=J,O}function kl(){var O,J,re;return O=Y,t.substr(Y,2)===uu?(J=uu,Y+=2):(J=r,dt===0&&wt(FA)),J!==r&&(xt=O,J=NA()),O=J,O===r&&(O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,dt===0&&wt(la)),J!==r?(OA.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(gr)),re!==r?(xt=O,J=So(re),O=J):(Y=O,O=r)):(Y=O,O=r)),O}function yn(){var O,J,re;for(O=Y,J=[],re=Qo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(Rs)));re!==r;)J.push(re),re=Qo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(Rs)));return J!==r&&(xt=O,J=no(J)),O=J,O}function Qo(){var O,J,re;return O=Y,t.substr(Y,2)===Me?(J=Me,Y+=2):(J=r,dt===0&&wt(fu)),J!==r&&(xt=O,J=Cr()),O=J,O===r&&(O=Y,t.substr(Y,2)===hf?(J=hf,Y+=2):(J=r,dt===0&&wt(LA)),J!==r&&(xt=O,J=MA()),O=J,O===r&&(O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,dt===0&&wt(la)),J!==r?(Au.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(pu)),re!==r?(xt=O,J=ac(),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===ve?(J=ve,Y+=2):(J=r,dt===0&&wt(Nt)),J!==r&&(xt=O,J=lc()),O=J,O===r&&(O=Y,t.substr(Y,2)===Ni?(J=Ni,Y+=2):(J=r,dt===0&&wt(io)),J!==r&&(xt=O,J=Rt()),O=J,O===r&&(O=Y,t.substr(Y,2)===xn?(J=xn,Y+=2):(J=r,dt===0&&wt(ca)),J!==r&&(xt=O,J=ji()),O=J,O===r&&(O=Y,t.substr(Y,2)===Oi?(J=Oi,Y+=2):(J=r,dt===0&&wt(Oa)),J!==r&&(xt=O,J=dn()),O=J,O===r&&(O=Y,t.substr(Y,2)===Jn?(J=Jn,Y+=2):(J=r,dt===0&&wt(hu)),J!==r&&(xt=O,J=Ch()),O=J,O===r&&(O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,dt===0&&wt(la)),J!==r?(La.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(Ma)),re!==r?(xt=O,J=So(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=wu()))))))))),O}function wu(){var O,J,re,de,Ke,ft,dr,Br,_n,di,ws,zA;return O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,dt===0&&wt(la)),J!==r?(re=ha(),re!==r?(xt=O,J=Ua(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Xe?(J=Xe,Y+=2):(J=r,dt===0&&wt(Ha)),J!==r?(re=Y,de=Y,Ke=ha(),Ke!==r?(ft=Ns(),ft!==r?(Ke=[Ke,ft],de=Ke):(Y=de,de=r)):(Y=de,de=r),de===r&&(de=ha()),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,J=Ua(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===gf?(J=gf,Y+=2):(J=r,dt===0&&wt(cc)),J!==r?(re=Y,de=Y,Ke=Ns(),Ke!==r?(ft=Ns(),ft!==r?(dr=Ns(),dr!==r?(Br=Ns(),Br!==r?(Ke=[Ke,ft,dr,Br],de=Ke):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,J=Ua(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===wn?(J=wn,Y+=2):(J=r,dt===0&&wt(ua)),J!==r?(re=Y,de=Y,Ke=Ns(),Ke!==r?(ft=Ns(),ft!==r?(dr=Ns(),dr!==r?(Br=Ns(),Br!==r?(_n=Ns(),_n!==r?(di=Ns(),di!==r?(ws=Ns(),ws!==r?(zA=Ns(),zA!==r?(Ke=[Ke,ft,dr,Br,_n,di,ws,zA],de=Ke):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,J=_A(re),O=J):(Y=O,O=r)):(Y=O,O=r)))),O}function ha(){var O;return UA.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,dt===0&&wt(fa)),O}function Ns(){var O;return vl.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,dt===0&&wt(Mt)),O}function xh(){var O,J,re,de,Ke;if(O=Y,J=[],re=Y,t.charCodeAt(Y)===92?(de=aa,Y++):(de=r,dt===0&&wt(la)),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,dt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===Aa?(de=Aa,Y+=2):(de=r,dt===0&&wt(ja)),de!==r&&(xt=re,de=ns()),re=de,re===r&&(re=Y,de=Y,dt++,Ke=Dy(),dt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,dt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r))),re!==r)for(;re!==r;)J.push(re),re=Y,t.charCodeAt(Y)===92?(de=aa,Y++):(de=r,dt===0&&wt(la)),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,dt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===Aa?(de=Aa,Y+=2):(de=r,dt===0&&wt(ja)),de!==r&&(xt=re,de=ns()),re=de,re===r&&(re=Y,de=Y,dt++,Ke=Dy(),dt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,dt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r)));else J=r;return J!==r&&(xt=O,J=no(J)),O=J,O}function KA(){var O,J,re,de,Ke,ft;if(O=Y,t.charCodeAt(Y)===45?(J=uc,Y++):(J=r,dt===0&&wt(gu)),J===r&&(t.charCodeAt(Y)===43?(J=fc,Y++):(J=r,dt===0&&wt(qa))),J===r&&(J=null),J!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,dt===0&&wt(_e)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,dt===0&&wt(_e));else re=r;if(re!==r)if(t.charCodeAt(Y)===46?(de=Li,Y++):(de=r,dt===0&&wt(Cs)),de!==r){if(Ke=[],it.test(t.charAt(Y))?(ft=t.charAt(Y),Y++):(ft=r,dt===0&&wt(_e)),ft!==r)for(;ft!==r;)Ke.push(ft),it.test(t.charAt(Y))?(ft=t.charAt(Y),Y++):(ft=r,dt===0&&wt(_e));else Ke=r;Ke!==r?(xt=O,J=Sl(J,re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;if(O===r){if(O=Y,t.charCodeAt(Y)===45?(J=uc,Y++):(J=r,dt===0&&wt(gu)),J===r&&(t.charCodeAt(Y)===43?(J=fc,Y++):(J=r,dt===0&&wt(qa))),J===r&&(J=null),J!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,dt===0&&wt(_e)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,dt===0&&wt(_e));else re=r;re!==r?(xt=O,J=df(J,re),O=J):(Y=O,O=r)}else Y=O,O=r;if(O===r&&(O=Y,J=JA(),J!==r&&(xt=O,J=Ac(J)),O=J,O===r&&(O=Y,J=hc(),J!==r&&(xt=O,J=wi(J)),O=J,O===r)))if(O=Y,t.charCodeAt(Y)===40?(J=Ee,Y++):(J=r,dt===0&&wt(fe)),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=so(),de!==r){for(Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();Ke!==r?(t.charCodeAt(Y)===41?(ft=se,Y++):(ft=r,dt===0&&wt(X)),ft!==r?(xt=O,J=Qn(de),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r}return O}function Sf(){var O,J,re,de,Ke,ft,dr,Br;if(O=Y,J=KA(),J!==r){for(re=[],de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===42?(ft=pc,Y++):(ft=r,dt===0&&wt(Je)),ft===r&&(t.charCodeAt(Y)===47?(ft=st,Y++):(ft=r,dt===0&&wt(St))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=KA(),Br!==r?(xt=de,Ke=lr(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===42?(ft=pc,Y++):(ft=r,dt===0&&wt(Je)),ft===r&&(t.charCodeAt(Y)===47?(ft=st,Y++):(ft=r,dt===0&&wt(St))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=KA(),Br!==r?(xt=de,Ke=lr(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,J=ee(J,re),O=J):(Y=O,O=r)}else Y=O,O=r;return O}function so(){var O,J,re,de,Ke,ft,dr,Br;if(O=Y,J=Sf(),J!==r){for(re=[],de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===43?(ft=fc,Y++):(ft=r,dt===0&&wt(qa)),ft===r&&(t.charCodeAt(Y)===45?(ft=uc,Y++):(ft=r,dt===0&&wt(gu))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=Sf(),Br!==r?(xt=de,Ke=Ie(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===43?(ft=fc,Y++):(ft=r,dt===0&&wt(qa)),ft===r&&(t.charCodeAt(Y)===45?(ft=uc,Y++):(ft=r,dt===0&&wt(gu))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=Sf(),Br!==r?(xt=de,Ke=Ie(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,J=ee(J,re),O=J):(Y=O,O=r)}else Y=O,O=r;return O}function Xr(){var O,J,re,de,Ke,ft;if(O=Y,t.substr(Y,3)===Oe?(J=Oe,Y+=3):(J=r,dt===0&&wt(ht)),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=so(),de!==r){for(Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();Ke!==r?(t.substr(Y,2)===mt?(ft=mt,Y+=2):(ft=r,dt===0&&wt(Dt)),ft!==r?(xt=O,J=tr(de),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;return O}function kh(){var O,J,re,de;return O=Y,t.substr(Y,2)===fn?(J=fn,Y+=2):(J=r,dt===0&&wt(ai)),J!==r?(re=pa(),re!==r?(t.charCodeAt(Y)===41?(de=se,Y++):(de=r,dt===0&&wt(X)),de!==r?(xt=O,J=qi(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function JA(){var O,J,re,de,Ke,ft;return O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,dt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,2)===my?(de=my,Y+=2):(de=r,dt===0&&wt(t2)),de!==r?(Ke=Fs(),Ke!==r?(t.charCodeAt(Y)===125?(ft=j,Y++):(ft=r,dt===0&&wt(rt)),ft!==r?(xt=O,J=Do(re,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,dt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,3)===yy?(de=yy,Y+=3):(de=r,dt===0&&wt(wh)),de!==r?(xt=O,J=r2(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,dt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,2)===bo?(de=bo,Y+=2):(de=r,dt===0&&wt(Bh)),de!==r?(Ke=Fs(),Ke!==r?(t.charCodeAt(Y)===125?(ft=j,Y++):(ft=r,dt===0&&wt(rt)),ft!==r?(xt=O,J=vh(re,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,dt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,3)===du?(de=du,Y+=3):(de=r,dt===0&&wt(Sh)),de!==r?(xt=O,J=Ng(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,dt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.charCodeAt(Y)===125?(de=j,Y++):(de=r,dt===0&&wt(rt)),de!==r?(xt=O,J=Og(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.charCodeAt(Y)===36?(J=Lg,Y++):(J=r,dt===0&&wt(Ey)),J!==r?(re=hc(),re!==r?(xt=O,J=Og(re),O=J):(Y=O,O=r)):(Y=O,O=r)))))),O}function Sy(){var O,J,re;return O=Y,J=Yg(),J!==r?(xt=Y,re=mf(J),re?re=void 0:re=r,re!==r?(xt=O,J=Po(J),O=J):(Y=O,O=r)):(Y=O,O=r),O}function Yg(){var O,J,re,de,Ke;if(O=Y,J=[],re=Y,de=Y,dt++,Ke=Th(),dt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,dt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r),re!==r)for(;re!==r;)J.push(re),re=Y,de=Y,dt++,Ke=Th(),dt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,dt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r);else J=r;return J!==r&&(xt=O,J=no(J)),O=J,O}function Qh(){var O,J,re;if(O=Y,J=[],Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(Dh)),re!==r)for(;re!==r;)J.push(re),Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(Dh));else J=r;return J!==r&&(xt=O,J=Mg()),O=J,O}function hc(){var O,J,re;if(O=Y,J=[],bl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(Pl)),re!==r)for(;re!==r;)J.push(re),bl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,dt===0&&wt(Pl));else J=r;return J!==r&&(xt=O,J=Mg()),O=J,O}function Dy(){var O;return Iy.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,dt===0&&wt(HA)),O}function Th(){var O;return Cy.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,dt===0&&wt(wy)),O}function kt(){var O,J;if(O=[],jA.test(t.charAt(Y))?(J=t.charAt(Y),Y++):(J=r,dt===0&&wt(qA)),J!==r)for(;J!==r;)O.push(J),jA.test(t.charAt(Y))?(J=t.charAt(Y),Y++):(J=r,dt===0&&wt(qA));else O=r;return O}if(mu=a(),mu!==r&&Y===t.length)return mu;throw mu!==r&&Y<t.length&&wt(Wa()),WA(yf,xo<t.length?t.charAt(xo):null,xo<t.length?If(xo,xo+1):If(xo,xo))}ete.exports={SyntaxError:vd,parse:yKe}});function vx(t,e={isGlobPattern:()=>!1}){try{return(0,rte.parse)(t,e)}catch(r){throw r.location&&(r.message=r.message.replace(/(\\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function fE(t,{endSemicolon:e=!1}={}){return t.map(({command:r,type:s},a)=>`${Sx(r)}${s===\";\"?a!==t.length-1||e?\";\":\"\":\" &\"}`).join(\" \")}function Sx(t){return`${AE(t.chain)}${t.then?` ${z_(t.then)}`:\"\"}`}function z_(t){return`${t.type} ${Sx(t.line)}`}function AE(t){return`${X_(t)}${t.then?` ${Z_(t.then)}`:\"\"}`}function Z_(t){return`${t.type} ${AE(t.chain)}`}function X_(t){switch(t.type){case\"command\":return`${t.envs.length>0?`${t.envs.map(e=>Bx(e)).join(\" \")} `:\"\"}${t.args.map(e=>$_(e)).join(\" \")}`;case\"subshell\":return`(${fE(t.subshell)})${t.args.length>0?` ${t.args.map(e=>G2(e)).join(\" \")}`:\"\"}`;case\"group\":return`{ ${fE(t.group,{endSemicolon:!0})} }${t.args.length>0?` ${t.args.map(e=>G2(e)).join(\" \")}`:\"\"}`;case\"envs\":return t.envs.map(e=>Bx(e)).join(\" \");default:throw new Error(`Unsupported command type:  \"${t.type}\"`)}}function Bx(t){return`${t.name}=${t.args[0]?Sd(t.args[0]):\"\"}`}function $_(t){switch(t.type){case\"redirection\":return G2(t);case\"argument\":return Sd(t);default:throw new Error(`Unsupported argument type: \"${t.type}\"`)}}function G2(t){return`${t.subtype} ${t.args.map(e=>Sd(e)).join(\" \")}`}function Sd(t){return t.segments.map(e=>eU(e)).join(\"\")}function eU(t){let e=(s,a)=>a?`\"${s}\"`:s,r=s=>s===\"\"?\"''\":s.match(/[()}<>$|&;\"'\\n\\t ]/)?s.match(/['\\t\\p{C}]/u)?s.match(/'/)?`\"${s.replace(/[\"$\\t\\p{C}]/u,IKe)}\"`:`$'${s.replace(/[\\t\\p{C}]/u,ite)}'`:`'${s}'`:s;switch(t.type){case\"text\":return r(t.text);case\"glob\":return t.pattern;case\"shell\":return e(`$(${fE(t.shell)})`,t.quoted);case\"variable\":return e(typeof t.defaultValue>\"u\"?typeof t.alternativeValue>\"u\"?`\\${${t.name}}`:t.alternativeValue.length===0?`\\${${t.name}:+}`:`\\${${t.name}:+${t.alternativeValue.map(s=>Sd(s)).join(\" \")}}`:t.defaultValue.length===0?`\\${${t.name}:-}`:`\\${${t.name}:-${t.defaultValue.map(s=>Sd(s)).join(\" \")}}`,t.quoted);case\"arithmetic\":return`$(( ${Dx(t.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: \"${t.type}\"`)}}function Dx(t){let e=a=>{switch(a){case\"addition\":return\"+\";case\"subtraction\":return\"-\";case\"multiplication\":return\"*\";case\"division\":return\"/\";default:throw new Error(`Can't extract operator from arithmetic expression of type \"${a}\"`)}},r=(a,n)=>n?`( ${a} )`:a,s=a=>r(Dx(a),![\"number\",\"variable\"].includes(a.type));switch(t.type){case\"number\":return String(t.value);case\"variable\":return t.name;default:return`${s(t.left)} ${e(t.type)} ${s(t.right)}`}}var rte,nte,EKe,ite,IKe,ste=It(()=>{rte=et(tte());nte=new Map([[\"\\f\",\"\\\\f\"],[`\n`,\"\\\\n\"],[\"\\r\",\"\\\\r\"],[\"\t\",\"\\\\t\"],[\"\\v\",\"\\\\v\"],[\"\\0\",\"\\\\0\"]]),EKe=new Map([[\"\\\\\",\"\\\\\\\\\"],[\"$\",\"\\\\$\"],['\"','\\\\\"'],...Array.from(nte,([t,e])=>[t,`\"$'${e}'\"`])]),ite=t=>nte.get(t)??`\\\\x${t.charCodeAt(0).toString(16).padStart(2,\"0\")}`,IKe=t=>EKe.get(t)??`\"$'${ite(t)}'\"`});var ate=L((U5t,ote)=>{\"use strict\";function CKe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Dd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,Dd)}CKe(Dd,Error);Dd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function wKe(t,e){e=e!==void 0?e:{};var r={},s={resolution:Ne},a=Ne,n=\"/\",c=Ee(\"/\",!1),f=function(_e,x){return{from:_e,descriptor:x}},p=function(_e){return{descriptor:_e}},h=\"@\",E=Ee(\"@\",!1),C=function(_e,x){return{fullName:_e,description:x}},S=function(_e){return{fullName:_e}},P=function(){return Be()},I=/^[^\\/@]/,R=fe([\"/\",\"@\"],!0,!1),N=/^[^\\/]/,U=fe([\"/\"],!0,!1),W=0,te=0,ie=[{line:1,column:1}],Ae=0,ce=[],me=0,pe;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function Be(){return t.substring(te,W)}function Ce(){return gt(te,W)}function g(_e,x){throw x=x!==void 0?x:gt(te,W),Fe([De(_e)],t.substring(te,W),x)}function we(_e,x){throw x=x!==void 0?x:gt(te,W),rt(_e,x)}function Ee(_e,x){return{type:\"literal\",text:_e,ignoreCase:x}}function fe(_e,x,w){return{type:\"class\",parts:_e,inverted:x,ignoreCase:w}}function se(){return{type:\"any\"}}function X(){return{type:\"end\"}}function De(_e){return{type:\"other\",description:_e}}function Re(_e){var x=ie[_e],w;if(x)return x;for(w=_e-1;!ie[w];)w--;for(x=ie[w],x={line:x.line,column:x.column};w<_e;)t.charCodeAt(w)===10?(x.line++,x.column=1):x.column++,w++;return ie[_e]=x,x}function gt(_e,x){var w=Re(_e),b=Re(x);return{start:{offset:_e,line:w.line,column:w.column},end:{offset:x,line:b.line,column:b.column}}}function j(_e){W<Ae||(W>Ae&&(Ae=W,ce=[]),ce.push(_e))}function rt(_e,x){return new Dd(_e,null,null,x)}function Fe(_e,x,w){return new Dd(Dd.buildMessage(_e,x),_e,x,w)}function Ne(){var _e,x,w,b;return _e=W,x=Pe(),x!==r?(t.charCodeAt(W)===47?(w=n,W++):(w=r,me===0&&j(c)),w!==r?(b=Pe(),b!==r?(te=_e,x=f(x,b),_e=x):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r),_e===r&&(_e=W,x=Pe(),x!==r&&(te=_e,x=p(x)),_e=x),_e}function Pe(){var _e,x,w,b;return _e=W,x=Ye(),x!==r?(t.charCodeAt(W)===64?(w=h,W++):(w=r,me===0&&j(E)),w!==r?(b=it(),b!==r?(te=_e,x=C(x,b),_e=x):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r),_e===r&&(_e=W,x=Ye(),x!==r&&(te=_e,x=S(x)),_e=x),_e}function Ye(){var _e,x,w,b,y;return _e=W,t.charCodeAt(W)===64?(x=h,W++):(x=r,me===0&&j(E)),x!==r?(w=ke(),w!==r?(t.charCodeAt(W)===47?(b=n,W++):(b=r,me===0&&j(c)),b!==r?(y=ke(),y!==r?(te=_e,x=P(),_e=x):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r),_e===r&&(_e=W,x=ke(),x!==r&&(te=_e,x=P()),_e=x),_e}function ke(){var _e,x,w;if(_e=W,x=[],I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R)),w!==r)for(;w!==r;)x.push(w),I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R));else x=r;return x!==r&&(te=_e,x=P()),_e=x,_e}function it(){var _e,x,w;if(_e=W,x=[],N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U)),w!==r)for(;w!==r;)x.push(w),N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U));else x=r;return x!==r&&(te=_e,x=P()),_e=x,_e}if(pe=a(),pe!==r&&W===t.length)return pe;throw pe!==r&&W<t.length&&j(X()),Fe(ce,Ae<t.length?t.charAt(Ae):null,Ae<t.length?gt(Ae,Ae+1):gt(Ae,Ae))}ote.exports={SyntaxError:Dd,parse:wKe}});function bx(t){let e=t.match(/^\\*{1,2}\\/(.*)/);if(e)throw new Error(`The override for '${t}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${e[1]}' instead.`);try{return(0,lte.parse)(t)}catch(r){throw r.location&&(r.message=r.message.replace(/(\\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function Px(t){let e=\"\";return t.from&&(e+=t.from.fullName,t.from.description&&(e+=`@${t.from.description}`),e+=\"/\"),e+=t.descriptor.fullName,t.descriptor.description&&(e+=`@${t.descriptor.description}`),e}var lte,cte=It(()=>{lte=et(ate())});var Pd=L((j5t,bd)=>{\"use strict\";function ute(t){return typeof t>\"u\"||t===null}function BKe(t){return typeof t==\"object\"&&t!==null}function vKe(t){return Array.isArray(t)?t:ute(t)?[]:[t]}function SKe(t,e){var r,s,a,n;if(e)for(n=Object.keys(e),r=0,s=n.length;r<s;r+=1)a=n[r],t[a]=e[a];return t}function DKe(t,e){var r=\"\",s;for(s=0;s<e;s+=1)r+=t;return r}function bKe(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}bd.exports.isNothing=ute;bd.exports.isObject=BKe;bd.exports.toArray=vKe;bd.exports.repeat=DKe;bd.exports.isNegativeZero=bKe;bd.exports.extend=SKe});var pE=L((q5t,fte)=>{\"use strict\";function W2(t,e){Error.call(this),this.name=\"YAMLException\",this.reason=t,this.mark=e,this.message=(this.reason||\"(unknown reason)\")+(this.mark?\" \"+this.mark.toString():\"\"),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||\"\"}W2.prototype=Object.create(Error.prototype);W2.prototype.constructor=W2;W2.prototype.toString=function(e){var r=this.name+\": \";return r+=this.reason||\"(unknown reason)\",!e&&this.mark&&(r+=\" \"+this.mark.toString()),r};fte.exports=W2});var hte=L((G5t,pte)=>{\"use strict\";var Ate=Pd();function tU(t,e,r,s,a){this.name=t,this.buffer=e,this.position=r,this.line=s,this.column=a}tU.prototype.getSnippet=function(e,r){var s,a,n,c,f;if(!this.buffer)return null;for(e=e||4,r=r||75,s=\"\",a=this.position;a>0&&`\\0\\r\n\\x85\\u2028\\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){s=\" ... \",a+=5;break}for(n=\"\",c=this.position;c<this.buffer.length&&`\\0\\r\n\\x85\\u2028\\u2029`.indexOf(this.buffer.charAt(c))===-1;)if(c+=1,c-this.position>r/2-1){n=\" ... \",c-=5;break}return f=this.buffer.slice(a,c),Ate.repeat(\" \",e)+s+f+n+`\n`+Ate.repeat(\" \",e+this.position-a+s.length)+\"^\"};tU.prototype.toString=function(e){var r,s=\"\";return this.name&&(s+='in \"'+this.name+'\" '),s+=\"at line \"+(this.line+1)+\", column \"+(this.column+1),e||(r=this.getSnippet(),r&&(s+=`:\n`+r)),s};pte.exports=tU});var Ds=L((W5t,dte)=>{\"use strict\";var gte=pE(),PKe=[\"kind\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"defaultStyle\",\"styleAliases\"],xKe=[\"scalar\",\"sequence\",\"mapping\"];function kKe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function QKe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(PKe.indexOf(r)===-1)throw new gte('Unknown option \"'+r+'\" is met in definition of \"'+t+'\" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=kKe(e.styleAliases||null),xKe.indexOf(this.kind)===-1)throw new gte('Unknown kind \"'+this.kind+'\" is specified for \"'+t+'\" YAML type.')}dte.exports=QKe});var xd=L((Y5t,yte)=>{\"use strict\";var mte=Pd(),xx=pE(),TKe=Ds();function rU(t,e,r){var s=[];return t.include.forEach(function(a){r=rU(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,c){n.tag===a.tag&&n.kind===a.kind&&s.push(c)}),r.push(a)}),r.filter(function(a,n){return s.indexOf(n)===-1})}function RKe(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function s(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(s);return t}function hE(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!==\"scalar\")throw new xx(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\")}),this.compiledImplicit=rU(this,\"implicit\",[]),this.compiledExplicit=rU(this,\"explicit\",[]),this.compiledTypeMap=RKe(this.compiledImplicit,this.compiledExplicit)}hE.DEFAULT=null;hE.create=function(){var e,r;switch(arguments.length){case 1:e=hE.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new xx(\"Wrong number of arguments for Schema.create function\")}if(e=mte.toArray(e),r=mte.toArray(r),!e.every(function(s){return s instanceof hE}))throw new xx(\"Specified list of super schemas (or a single Schema object) contains a non-Schema object.\");if(!r.every(function(s){return s instanceof TKe}))throw new xx(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");return new hE({include:e,explicit:r})};yte.exports=hE});var Ite=L((V5t,Ete)=>{\"use strict\";var FKe=Ds();Ete.exports=new FKe(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(t){return t!==null?t:\"\"}})});var wte=L((K5t,Cte)=>{\"use strict\";var NKe=Ds();Cte.exports=new NKe(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(t){return t!==null?t:[]}})});var vte=L((J5t,Bte)=>{\"use strict\";var OKe=Ds();Bte.exports=new OKe(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(t){return t!==null?t:{}}})});var kx=L((z5t,Ste)=>{\"use strict\";var LKe=xd();Ste.exports=new LKe({explicit:[Ite(),wte(),vte()]})});var bte=L((Z5t,Dte)=>{\"use strict\";var MKe=Ds();function _Ke(t){if(t===null)return!0;var e=t.length;return e===1&&t===\"~\"||e===4&&(t===\"null\"||t===\"Null\"||t===\"NULL\")}function UKe(){return null}function HKe(t){return t===null}Dte.exports=new MKe(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:_Ke,construct:UKe,predicate:HKe,represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"}},defaultStyle:\"lowercase\"})});var xte=L((X5t,Pte)=>{\"use strict\";var jKe=Ds();function qKe(t){if(t===null)return!1;var e=t.length;return e===4&&(t===\"true\"||t===\"True\"||t===\"TRUE\")||e===5&&(t===\"false\"||t===\"False\"||t===\"FALSE\")}function GKe(t){return t===\"true\"||t===\"True\"||t===\"TRUE\"}function WKe(t){return Object.prototype.toString.call(t)===\"[object Boolean]\"}Pte.exports=new jKe(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:qKe,construct:GKe,predicate:WKe,represent:{lowercase:function(t){return t?\"true\":\"false\"},uppercase:function(t){return t?\"TRUE\":\"FALSE\"},camelcase:function(t){return t?\"True\":\"False\"}},defaultStyle:\"lowercase\"})});var Qte=L(($5t,kte)=>{\"use strict\";var YKe=Pd(),VKe=Ds();function KKe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function JKe(t){return 48<=t&&t<=55}function zKe(t){return 48<=t&&t<=57}function ZKe(t){if(t===null)return!1;var e=t.length,r=0,s=!1,a;if(!e)return!1;if(a=t[r],(a===\"-\"||a===\"+\")&&(a=t[++r]),a===\"0\"){if(r+1===e)return!0;if(a=t[++r],a===\"b\"){for(r++;r<e;r++)if(a=t[r],a!==\"_\"){if(a!==\"0\"&&a!==\"1\")return!1;s=!0}return s&&a!==\"_\"}if(a===\"x\"){for(r++;r<e;r++)if(a=t[r],a!==\"_\"){if(!KKe(t.charCodeAt(r)))return!1;s=!0}return s&&a!==\"_\"}for(;r<e;r++)if(a=t[r],a!==\"_\"){if(!JKe(t.charCodeAt(r)))return!1;s=!0}return s&&a!==\"_\"}if(a===\"_\")return!1;for(;r<e;r++)if(a=t[r],a!==\"_\"){if(a===\":\")break;if(!zKe(t.charCodeAt(r)))return!1;s=!0}return!s||a===\"_\"?!1:a!==\":\"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r))}function XKe(t){var e=t,r=1,s,a,n=[];return e.indexOf(\"_\")!==-1&&(e=e.replace(/_/g,\"\")),s=e[0],(s===\"-\"||s===\"+\")&&(s===\"-\"&&(r=-1),e=e.slice(1),s=e[0]),e===\"0\"?0:s===\"0\"?e[1]===\"b\"?r*parseInt(e.slice(2),2):e[1]===\"x\"?r*parseInt(e,16):r*parseInt(e,8):e.indexOf(\":\")!==-1?(e.split(\":\").forEach(function(c){n.unshift(parseInt(c,10))}),e=0,a=1,n.forEach(function(c){e+=c*a,a*=60}),r*e):r*parseInt(e,10)}function $Ke(t){return Object.prototype.toString.call(t)===\"[object Number]\"&&t%1===0&&!YKe.isNegativeZero(t)}kte.exports=new VKe(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:ZKe,construct:XKe,predicate:$Ke,represent:{binary:function(t){return t>=0?\"0b\"+t.toString(2):\"-0b\"+t.toString(2).slice(1)},octal:function(t){return t>=0?\"0\"+t.toString(8):\"-0\"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?\"0x\"+t.toString(16).toUpperCase():\"-0x\"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}})});var Fte=L((e9t,Rte)=>{\"use strict\";var Tte=Pd(),eJe=Ds(),tJe=new RegExp(\"^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");function rJe(t){return!(t===null||!tJe.test(t)||t[t.length-1]===\"_\")}function nJe(t){var e,r,s,a;return e=t.replace(/_/g,\"\").toLowerCase(),r=e[0]===\"-\"?-1:1,a=[],\"+-\".indexOf(e[0])>=0&&(e=e.slice(1)),e===\".inf\"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===\".nan\"?NaN:e.indexOf(\":\")>=0?(e.split(\":\").forEach(function(n){a.unshift(parseFloat(n,10))}),e=0,s=1,a.forEach(function(n){e+=n*s,s*=60}),r*e):r*parseFloat(e,10)}var iJe=/^[-+]?[0-9]+e/;function sJe(t,e){var r;if(isNaN(t))switch(e){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===t)switch(e){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(Tte.isNegativeZero(t))return\"-0.0\";return r=t.toString(10),iJe.test(r)?r.replace(\"e\",\".e\"):r}function oJe(t){return Object.prototype.toString.call(t)===\"[object Number]\"&&(t%1!==0||Tte.isNegativeZero(t))}Rte.exports=new eJe(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:rJe,construct:nJe,predicate:oJe,represent:sJe,defaultStyle:\"lowercase\"})});var nU=L((t9t,Nte)=>{\"use strict\";var aJe=xd();Nte.exports=new aJe({include:[kx()],implicit:[bte(),xte(),Qte(),Fte()]})});var iU=L((r9t,Ote)=>{\"use strict\";var lJe=xd();Ote.exports=new lJe({include:[nU()]})});var Ute=L((n9t,_te)=>{\"use strict\";var cJe=Ds(),Lte=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),Mte=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");function uJe(t){return t===null?!1:Lte.exec(t)!==null||Mte.exec(t)!==null}function fJe(t){var e,r,s,a,n,c,f,p=0,h=null,E,C,S;if(e=Lte.exec(t),e===null&&(e=Mte.exec(t)),e===null)throw new Error(\"Date resolve error\");if(r=+e[1],s=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,s,a));if(n=+e[4],c=+e[5],f=+e[6],e[7]){for(p=e[7].slice(0,3);p.length<3;)p+=\"0\";p=+p}return e[9]&&(E=+e[10],C=+(e[11]||0),h=(E*60+C)*6e4,e[9]===\"-\"&&(h=-h)),S=new Date(Date.UTC(r,s,a,n,c,f,p)),h&&S.setTime(S.getTime()-h),S}function AJe(t){return t.toISOString()}_te.exports=new cJe(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:uJe,construct:fJe,instanceOf:Date,represent:AJe})});var jte=L((i9t,Hte)=>{\"use strict\";var pJe=Ds();function hJe(t){return t===\"<<\"||t===null}Hte.exports=new pJe(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:hJe})});var Wte=L((s9t,Gte)=>{\"use strict\";var kd;try{qte=ye,kd=qte(\"buffer\").Buffer}catch{}var qte,gJe=Ds(),sU=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;function dJe(t){if(t===null)return!1;var e,r,s=0,a=t.length,n=sU;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;s+=6}return s%8===0}function mJe(t){var e,r,s=t.replace(/[\\r\\n=]/g,\"\"),a=s.length,n=sU,c=0,f=[];for(e=0;e<a;e++)e%4===0&&e&&(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)),c=c<<6|n.indexOf(s.charAt(e));return r=a%4*6,r===0?(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)):r===18?(f.push(c>>10&255),f.push(c>>2&255)):r===12&&f.push(c>>4&255),kd?kd.from?kd.from(f):new kd(f):f}function yJe(t){var e=\"\",r=0,s,a,n=t.length,c=sU;for(s=0;s<n;s++)s%3===0&&s&&(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+t[s];return a=n%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}function EJe(t){return kd&&kd.isBuffer(t)}Gte.exports=new gJe(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:dJe,construct:mJe,predicate:EJe,represent:yJe})});var Vte=L((a9t,Yte)=>{\"use strict\";var IJe=Ds(),CJe=Object.prototype.hasOwnProperty,wJe=Object.prototype.toString;function BJe(t){if(t===null)return!0;var e=[],r,s,a,n,c,f=t;for(r=0,s=f.length;r<s;r+=1){if(a=f[r],c=!1,wJe.call(a)!==\"[object Object]\")return!1;for(n in a)if(CJe.call(a,n))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function vJe(t){return t!==null?t:[]}Yte.exports=new IJe(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:BJe,construct:vJe})});var Jte=L((l9t,Kte)=>{\"use strict\";var SJe=Ds(),DJe=Object.prototype.toString;function bJe(t){if(t===null)return!0;var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e<r;e+=1){if(s=c[e],DJe.call(s)!==\"[object Object]\"||(a=Object.keys(s),a.length!==1))return!1;n[e]=[a[0],s[a[0]]]}return!0}function PJe(t){if(t===null)return[];var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e<r;e+=1)s=c[e],a=Object.keys(s),n[e]=[a[0],s[a[0]]];return n}Kte.exports=new SJe(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:bJe,construct:PJe})});var Zte=L((c9t,zte)=>{\"use strict\";var xJe=Ds(),kJe=Object.prototype.hasOwnProperty;function QJe(t){if(t===null)return!0;var e,r=t;for(e in r)if(kJe.call(r,e)&&r[e]!==null)return!1;return!0}function TJe(t){return t!==null?t:{}}zte.exports=new xJe(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:QJe,construct:TJe})});var gE=L((u9t,Xte)=>{\"use strict\";var RJe=xd();Xte.exports=new RJe({include:[iU()],implicit:[Ute(),jte()],explicit:[Wte(),Vte(),Jte(),Zte()]})});var ere=L((f9t,$te)=>{\"use strict\";var FJe=Ds();function NJe(){return!0}function OJe(){}function LJe(){return\"\"}function MJe(t){return typeof t>\"u\"}$te.exports=new FJe(\"tag:yaml.org,2002:js/undefined\",{kind:\"scalar\",resolve:NJe,construct:OJe,predicate:MJe,represent:LJe})});var rre=L((A9t,tre)=>{\"use strict\";var _Je=Ds();function UJe(t){if(t===null||t.length===0)return!1;var e=t,r=/\\/([gim]*)$/.exec(t),s=\"\";return!(e[0]===\"/\"&&(r&&(s=r[1]),s.length>3||e[e.length-s.length-1]!==\"/\"))}function HJe(t){var e=t,r=/\\/([gim]*)$/.exec(t),s=\"\";return e[0]===\"/\"&&(r&&(s=r[1]),e=e.slice(1,e.length-s.length-1)),new RegExp(e,s)}function jJe(t){var e=\"/\"+t.source+\"/\";return t.global&&(e+=\"g\"),t.multiline&&(e+=\"m\"),t.ignoreCase&&(e+=\"i\"),e}function qJe(t){return Object.prototype.toString.call(t)===\"[object RegExp]\"}tre.exports=new _Je(\"tag:yaml.org,2002:js/regexp\",{kind:\"scalar\",resolve:UJe,construct:HJe,predicate:qJe,represent:jJe})});var sre=L((p9t,ire)=>{\"use strict\";var Qx;try{nre=ye,Qx=nre(\"esprima\")}catch{typeof window<\"u\"&&(Qx=window.esprima)}var nre,GJe=Ds();function WJe(t){if(t===null)return!1;try{var e=\"(\"+t+\")\",r=Qx.parse(e,{range:!0});return!(r.type!==\"Program\"||r.body.length!==1||r.body[0].type!==\"ExpressionStatement\"||r.body[0].expression.type!==\"ArrowFunctionExpression\"&&r.body[0].expression.type!==\"FunctionExpression\")}catch{return!1}}function YJe(t){var e=\"(\"+t+\")\",r=Qx.parse(e,{range:!0}),s=[],a;if(r.type!==\"Program\"||r.body.length!==1||r.body[0].type!==\"ExpressionStatement\"||r.body[0].expression.type!==\"ArrowFunctionExpression\"&&r.body[0].expression.type!==\"FunctionExpression\")throw new Error(\"Failed to resolve function\");return r.body[0].expression.params.forEach(function(n){s.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type===\"BlockStatement\"?new Function(s,e.slice(a[0]+1,a[1]-1)):new Function(s,\"return \"+e.slice(a[0],a[1]))}function VJe(t){return t.toString()}function KJe(t){return Object.prototype.toString.call(t)===\"[object Function]\"}ire.exports=new GJe(\"tag:yaml.org,2002:js/function\",{kind:\"scalar\",resolve:WJe,construct:YJe,predicate:KJe,represent:VJe})});var Y2=L((g9t,are)=>{\"use strict\";var ore=xd();are.exports=ore.DEFAULT=new ore({include:[gE()],explicit:[ere(),rre(),sre()]})});var Dre=L((d9t,V2)=>{\"use strict\";var wp=Pd(),hre=pE(),JJe=hte(),gre=gE(),zJe=Y2(),a0=Object.prototype.hasOwnProperty,Tx=1,dre=2,mre=3,Rx=4,oU=1,ZJe=2,lre=3,XJe=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,$Je=/[\\x85\\u2028\\u2029]/,eze=/[,\\[\\]\\{\\}]/,yre=/^(?:!|!!|![a-z\\-]+!)$/i,Ere=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function cre(t){return Object.prototype.toString.call(t)}function qf(t){return t===10||t===13}function Td(t){return t===9||t===32}function nl(t){return t===9||t===32||t===10||t===13}function dE(t){return t===44||t===91||t===93||t===123||t===125}function tze(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function rze(t){return t===120?2:t===117?4:t===85?8:0}function nze(t){return 48<=t&&t<=57?t-48:-1}function ure(t){return t===48?\"\\0\":t===97?\"\\x07\":t===98?\"\\b\":t===116||t===9?\"\t\":t===110?`\n`:t===118?\"\\v\":t===102?\"\\f\":t===114?\"\\r\":t===101?\"\\x1B\":t===32?\" \":t===34?'\"':t===47?\"/\":t===92?\"\\\\\":t===78?\"\\x85\":t===95?\"\\xA0\":t===76?\"\\u2028\":t===80?\"\\u2029\":\"\"}function ize(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Ire=new Array(256),Cre=new Array(256);for(Qd=0;Qd<256;Qd++)Ire[Qd]=ure(Qd)?1:0,Cre[Qd]=ure(Qd);var Qd;function sze(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||zJe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function wre(t,e){return new hre(e,new JJe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Rr(t,e){throw wre(t,e)}function Fx(t,e){t.onWarning&&t.onWarning.call(null,wre(t,e))}var fre={YAML:function(e,r,s){var a,n,c;e.version!==null&&Rr(e,\"duplication of %YAML directive\"),s.length!==1&&Rr(e,\"YAML directive accepts exactly one argument\"),a=/^([0-9]+)\\.([0-9]+)$/.exec(s[0]),a===null&&Rr(e,\"ill-formed argument of the YAML directive\"),n=parseInt(a[1],10),c=parseInt(a[2],10),n!==1&&Rr(e,\"unacceptable YAML version of the document\"),e.version=s[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&Fx(e,\"unsupported YAML version of the document\")},TAG:function(e,r,s){var a,n;s.length!==2&&Rr(e,\"TAG directive accepts exactly two arguments\"),a=s[0],n=s[1],yre.test(a)||Rr(e,\"ill-formed tag handle (first argument) of the TAG directive\"),a0.call(e.tagMap,a)&&Rr(e,'there is a previously declared suffix for \"'+a+'\" tag handle'),Ere.test(n)||Rr(e,\"ill-formed tag prefix (second argument) of the TAG directive\"),e.tagMap[a]=n}};function o0(t,e,r,s){var a,n,c,f;if(e<r){if(f=t.input.slice(e,r),s)for(a=0,n=f.length;a<n;a+=1)c=f.charCodeAt(a),c===9||32<=c&&c<=1114111||Rr(t,\"expected valid JSON character\");else XJe.test(f)&&Rr(t,\"the stream contains non-printable characters\");t.result+=f}}function Are(t,e,r,s){var a,n,c,f;for(wp.isObject(r)||Rr(t,\"cannot merge mappings; the provided source object is unacceptable\"),a=Object.keys(r),c=0,f=a.length;c<f;c+=1)n=a[c],a0.call(e,n)||(e[n]=r[n],s[n]=!0)}function mE(t,e,r,s,a,n,c,f){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Rr(t,\"nested arrays are not supported inside keys\"),typeof a==\"object\"&&cre(a[p])===\"[object Object]\"&&(a[p]=\"[object Object]\");if(typeof a==\"object\"&&cre(a)===\"[object Object]\"&&(a=\"[object Object]\"),a=String(a),e===null&&(e={}),s===\"tag:yaml.org,2002:merge\")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)Are(t,e,n[p],r);else Are(t,e,n,r);else!t.json&&!a0.call(r,a)&&a0.call(e,a)&&(t.line=c||t.line,t.position=f||t.position,Rr(t,\"duplicated mapping key\")),e[a]=n,delete r[a];return e}function aU(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Rr(t,\"a line break is expected\"),t.line+=1,t.lineStart=t.position}function as(t,e,r){for(var s=0,a=t.input.charCodeAt(t.position);a!==0;){for(;Td(a);)a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(qf(a))for(aU(t),a=t.input.charCodeAt(t.position),s++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&s!==0&&t.lineIndent<r&&Fx(t,\"deficient indentation\"),s}function Nx(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||nl(r)))}function lU(t,e){e===1?t.result+=\" \":e>1&&(t.result+=wp.repeat(`\n`,e-1))}function oze(t,e,r){var s,a,n,c,f,p,h,E,C=t.kind,S=t.result,P;if(P=t.input.charCodeAt(t.position),nl(P)||dE(P)||P===35||P===38||P===42||P===33||P===124||P===62||P===39||P===34||P===37||P===64||P===96||(P===63||P===45)&&(a=t.input.charCodeAt(t.position+1),nl(a)||r&&dE(a)))return!1;for(t.kind=\"scalar\",t.result=\"\",n=c=t.position,f=!1;P!==0;){if(P===58){if(a=t.input.charCodeAt(t.position+1),nl(a)||r&&dE(a))break}else if(P===35){if(s=t.input.charCodeAt(t.position-1),nl(s))break}else{if(t.position===t.lineStart&&Nx(t)||r&&dE(P))break;if(qf(P))if(p=t.line,h=t.lineStart,E=t.lineIndent,as(t,!1,-1),t.lineIndent>=e){f=!0,P=t.input.charCodeAt(t.position);continue}else{t.position=c,t.line=p,t.lineStart=h,t.lineIndent=E;break}}f&&(o0(t,n,c,!1),lU(t,t.line-p),n=c=t.position,f=!1),Td(P)||(c=t.position+1),P=t.input.charCodeAt(++t.position)}return o0(t,n,c,!1),t.result?!0:(t.kind=C,t.result=S,!1)}function aze(t,e){var r,s,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind=\"scalar\",t.result=\"\",t.position++,s=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(o0(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,a=t.position;else return!0;else qf(r)?(o0(t,s,a,!0),lU(t,as(t,!1,e)),s=a=t.position):t.position===t.lineStart&&Nx(t)?Rr(t,\"unexpected end of the document within a single quoted scalar\"):(t.position++,a=t.position);Rr(t,\"unexpected end of the stream within a single quoted scalar\")}function lze(t,e){var r,s,a,n,c,f;if(f=t.input.charCodeAt(t.position),f!==34)return!1;for(t.kind=\"scalar\",t.result=\"\",t.position++,r=s=t.position;(f=t.input.charCodeAt(t.position))!==0;){if(f===34)return o0(t,r,t.position,!0),t.position++,!0;if(f===92){if(o0(t,r,t.position,!0),f=t.input.charCodeAt(++t.position),qf(f))as(t,!1,e);else if(f<256&&Ire[f])t.result+=Cre[f],t.position++;else if((c=rze(f))>0){for(a=c,n=0;a>0;a--)f=t.input.charCodeAt(++t.position),(c=tze(f))>=0?n=(n<<4)+c:Rr(t,\"expected hexadecimal character\");t.result+=ize(n),t.position++}else Rr(t,\"unknown escape sequence\");r=s=t.position}else qf(f)?(o0(t,r,s,!0),lU(t,as(t,!1,e)),r=s=t.position):t.position===t.lineStart&&Nx(t)?Rr(t,\"unexpected end of the document within a double quoted scalar\"):(t.position++,s=t.position)}Rr(t,\"unexpected end of the stream within a double quoted scalar\")}function cze(t,e){var r=!0,s,a=t.tag,n,c=t.anchor,f,p,h,E,C,S={},P,I,R,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,C=!1,n=[];else if(N===123)p=125,C=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(as(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=c,t.kind=C?\"mapping\":\"sequence\",t.result=n,!0;r||Rr(t,\"missed comma between flow collection entries\"),I=P=R=null,h=E=!1,N===63&&(f=t.input.charCodeAt(t.position+1),nl(f)&&(h=E=!0,t.position++,as(t,!0,e))),s=t.line,yE(t,e,Tx,!1,!0),I=t.tag,P=t.result,as(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===s)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),as(t,!0,e),yE(t,e,Tx,!1,!0),R=t.result),C?mE(t,n,S,I,P,R):h?n.push(mE(t,null,S,I,P,R)):n.push(P),as(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Rr(t,\"unexpected end of the stream within a flow collection\")}function uze(t,e){var r,s,a=oU,n=!1,c=!1,f=e,p=0,h=!1,E,C;if(C=t.input.charCodeAt(t.position),C===124)s=!1;else if(C===62)s=!0;else return!1;for(t.kind=\"scalar\",t.result=\"\";C!==0;)if(C=t.input.charCodeAt(++t.position),C===43||C===45)oU===a?a=C===43?lre:ZJe:Rr(t,\"repeat of a chomping mode identifier\");else if((E=nze(C))>=0)E===0?Rr(t,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):c?Rr(t,\"repeat of an indentation width identifier\"):(f=e+E-1,c=!0);else break;if(Td(C)){do C=t.input.charCodeAt(++t.position);while(Td(C));if(C===35)do C=t.input.charCodeAt(++t.position);while(!qf(C)&&C!==0)}for(;C!==0;){for(aU(t),t.lineIndent=0,C=t.input.charCodeAt(t.position);(!c||t.lineIndent<f)&&C===32;)t.lineIndent++,C=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>f&&(f=t.lineIndent),qf(C)){p++;continue}if(t.lineIndent<f){a===lre?t.result+=wp.repeat(`\n`,n?1+p:p):a===oU&&n&&(t.result+=`\n`);break}for(s?Td(C)?(h=!0,t.result+=wp.repeat(`\n`,n?1+p:p)):h?(h=!1,t.result+=wp.repeat(`\n`,p+1)):p===0?n&&(t.result+=\" \"):t.result+=wp.repeat(`\n`,p):t.result+=wp.repeat(`\n`,n?1+p:p),n=!0,c=!0,p=0,r=t.position;!qf(C)&&C!==0;)C=t.input.charCodeAt(++t.position);o0(t,r,t.position,!1)}return!0}function pre(t,e){var r,s=t.tag,a=t.anchor,n=[],c,f=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(c=t.input.charCodeAt(t.position+1),!nl(c)));){if(f=!0,t.position++,as(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,yE(t,e,mre,!1,!0),n.push(t.result),as(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)Rr(t,\"bad indentation of a sequence entry\");else if(t.lineIndent<e)break}return f?(t.tag=s,t.anchor=a,t.kind=\"sequence\",t.result=n,!0):!1}function fze(t,e,r){var s,a,n,c,f=t.tag,p=t.anchor,h={},E={},C=null,S=null,P=null,I=!1,R=!1,N;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),N=t.input.charCodeAt(t.position);N!==0;){if(s=t.input.charCodeAt(t.position+1),n=t.line,c=t.position,(N===63||N===58)&&nl(s))N===63?(I&&(mE(t,h,E,C,S,null),C=S=P=null),R=!0,I=!0,a=!0):I?(I=!1,a=!0):Rr(t,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),t.position+=1,N=s;else if(yE(t,r,dre,!1,!0))if(t.line===n){for(N=t.input.charCodeAt(t.position);Td(N);)N=t.input.charCodeAt(++t.position);if(N===58)N=t.input.charCodeAt(++t.position),nl(N)||Rr(t,\"a whitespace character is expected after the key-value separator within a block mapping\"),I&&(mE(t,h,E,C,S,null),C=S=P=null),R=!0,I=!1,a=!1,C=t.tag,S=t.result;else if(R)Rr(t,\"can not read an implicit mapping pair; a colon is missed\");else return t.tag=f,t.anchor=p,!0}else if(R)Rr(t,\"can not read a block mapping entry; a multiline key may not be an implicit key\");else return t.tag=f,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(yE(t,e,Rx,!0,a)&&(I?S=t.result:P=t.result),I||(mE(t,h,E,C,S,P,n,c),C=S=P=null),as(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Rr(t,\"bad indentation of a mapping entry\");else if(t.lineIndent<e)break}return I&&mE(t,h,E,C,S,null),R&&(t.tag=f,t.anchor=p,t.kind=\"mapping\",t.result=h),R}function Aze(t){var e,r=!1,s=!1,a,n,c;if(c=t.input.charCodeAt(t.position),c!==33)return!1;if(t.tag!==null&&Rr(t,\"duplication of a tag property\"),c=t.input.charCodeAt(++t.position),c===60?(r=!0,c=t.input.charCodeAt(++t.position)):c===33?(s=!0,a=\"!!\",c=t.input.charCodeAt(++t.position)):a=\"!\",e=t.position,r){do c=t.input.charCodeAt(++t.position);while(c!==0&&c!==62);t.position<t.length?(n=t.input.slice(e,t.position),c=t.input.charCodeAt(++t.position)):Rr(t,\"unexpected end of the stream within a verbatim tag\")}else{for(;c!==0&&!nl(c);)c===33&&(s?Rr(t,\"tag suffix cannot contain exclamation marks\"):(a=t.input.slice(e-1,t.position+1),yre.test(a)||Rr(t,\"named tag handle cannot contain such characters\"),s=!0,e=t.position+1)),c=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),eze.test(n)&&Rr(t,\"tag suffix cannot contain flow indicator characters\")}return n&&!Ere.test(n)&&Rr(t,\"tag name cannot contain such characters: \"+n),r?t.tag=n:a0.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a===\"!\"?t.tag=\"!\"+n:a===\"!!\"?t.tag=\"tag:yaml.org,2002:\"+n:Rr(t,'undeclared tag handle \"'+a+'\"'),!0}function pze(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Rr(t,\"duplication of an anchor property\"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!nl(r)&&!dE(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Rr(t,\"name of an anchor node must contain at least one character\"),t.anchor=t.input.slice(e,t.position),!0}function hze(t){var e,r,s;if(s=t.input.charCodeAt(t.position),s!==42)return!1;for(s=t.input.charCodeAt(++t.position),e=t.position;s!==0&&!nl(s)&&!dE(s);)s=t.input.charCodeAt(++t.position);return t.position===e&&Rr(t,\"name of an alias node must contain at least one character\"),r=t.input.slice(e,t.position),a0.call(t.anchorMap,r)||Rr(t,'unidentified alias \"'+r+'\"'),t.result=t.anchorMap[r],as(t,!0,-1),!0}function yE(t,e,r,s,a){var n,c,f,p=1,h=!1,E=!1,C,S,P,I,R;if(t.listener!==null&&t.listener(\"open\",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=c=f=Rx===r||mre===r,s&&as(t,!0,-1)&&(h=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),p===1)for(;Aze(t)||pze(t);)as(t,!0,-1)?(h=!0,f=n,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):f=!1;if(f&&(f=h||a),(p===1||Rx===r)&&(Tx===r||dre===r?I=e:I=e+1,R=t.position-t.lineStart,p===1?f&&(pre(t,R)||fze(t,R,I))||cze(t,I)?E=!0:(c&&uze(t,I)||aze(t,I)||lze(t,I)?E=!0:hze(t)?(E=!0,(t.tag!==null||t.anchor!==null)&&Rr(t,\"alias node should not have any properties\")):oze(t,I,Tx===r)&&(E=!0,t.tag===null&&(t.tag=\"?\")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(E=f&&pre(t,R))),t.tag!==null&&t.tag!==\"!\")if(t.tag===\"?\"){for(t.result!==null&&t.kind!==\"scalar\"&&Rr(t,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+t.kind+'\"'),C=0,S=t.implicitTypes.length;C<S;C+=1)if(P=t.implicitTypes[C],P.resolve(t.result)){t.result=P.construct(t.result),t.tag=P.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else a0.call(t.typeMap[t.kind||\"fallback\"],t.tag)?(P=t.typeMap[t.kind||\"fallback\"][t.tag],t.result!==null&&P.kind!==t.kind&&Rr(t,\"unacceptable node kind for !<\"+t.tag+'> tag; it should be \"'+P.kind+'\", not \"'+t.kind+'\"'),P.resolve(t.result)?(t.result=P.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Rr(t,\"cannot resolve a node with !<\"+t.tag+\"> explicit tag\")):Rr(t,\"unknown tag !<\"+t.tag+\">\");return t.listener!==null&&t.listener(\"close\",t),t.tag!==null||t.anchor!==null||E}function gze(t){var e=t.position,r,s,a,n=!1,c;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(c=t.input.charCodeAt(t.position))!==0&&(as(t,!0,-1),c=t.input.charCodeAt(t.position),!(t.lineIndent>0||c!==37));){for(n=!0,c=t.input.charCodeAt(++t.position),r=t.position;c!==0&&!nl(c);)c=t.input.charCodeAt(++t.position);for(s=t.input.slice(r,t.position),a=[],s.length<1&&Rr(t,\"directive name must not be less than one character in length\");c!==0;){for(;Td(c);)c=t.input.charCodeAt(++t.position);if(c===35){do c=t.input.charCodeAt(++t.position);while(c!==0&&!qf(c));break}if(qf(c))break;for(r=t.position;c!==0&&!nl(c);)c=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}c!==0&&aU(t),a0.call(fre,s)?fre[s](t,s,a):Fx(t,'unknown document directive \"'+s+'\"')}if(as(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,as(t,!0,-1)):n&&Rr(t,\"directives end mark is expected\"),yE(t,t.lineIndent-1,Rx,!1,!0),as(t,!0,-1),t.checkLineBreaks&&$Je.test(t.input.slice(e,t.position))&&Fx(t,\"non-ASCII line breaks are interpreted as content\"),t.documents.push(t.result),t.position===t.lineStart&&Nx(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,as(t,!0,-1));return}if(t.position<t.length-1)Rr(t,\"end of the stream or a document separator is expected\");else return}function Bre(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`\n`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new sze(t,e),s=t.indexOf(\"\\0\");for(s!==-1&&(r.position=s,Rr(r,\"null byte is not allowed in input\")),r.input+=\"\\0\";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)gze(r);return r.documents}function vre(t,e,r){e!==null&&typeof e==\"object\"&&typeof r>\"u\"&&(r=e,e=null);var s=Bre(t,r);if(typeof e!=\"function\")return s;for(var a=0,n=s.length;a<n;a+=1)e(s[a])}function Sre(t,e){var r=Bre(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new hre(\"expected a single document in the stream, but found more\")}}function dze(t,e,r){return typeof e==\"object\"&&e!==null&&typeof r>\"u\"&&(r=e,e=null),vre(t,e,wp.extend({schema:gre},r))}function mze(t,e){return Sre(t,wp.extend({schema:gre},e))}V2.exports.loadAll=vre;V2.exports.load=Sre;V2.exports.safeLoadAll=dze;V2.exports.safeLoad=mze});var Jre=L((m9t,AU)=>{\"use strict\";var J2=Pd(),z2=pE(),yze=Y2(),Eze=gE(),Fre=Object.prototype.toString,Nre=Object.prototype.hasOwnProperty,Ize=9,K2=10,Cze=13,wze=32,Bze=33,vze=34,Ore=35,Sze=37,Dze=38,bze=39,Pze=42,Lre=44,xze=45,Mre=58,kze=61,Qze=62,Tze=63,Rze=64,_re=91,Ure=93,Fze=96,Hre=123,Nze=124,jre=125,jo={};jo[0]=\"\\\\0\";jo[7]=\"\\\\a\";jo[8]=\"\\\\b\";jo[9]=\"\\\\t\";jo[10]=\"\\\\n\";jo[11]=\"\\\\v\";jo[12]=\"\\\\f\";jo[13]=\"\\\\r\";jo[27]=\"\\\\e\";jo[34]='\\\\\"';jo[92]=\"\\\\\\\\\";jo[133]=\"\\\\N\";jo[160]=\"\\\\_\";jo[8232]=\"\\\\L\";jo[8233]=\"\\\\P\";var Oze=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"];function Lze(t,e){var r,s,a,n,c,f,p;if(e===null)return{};for(r={},s=Object.keys(e),a=0,n=s.length;a<n;a+=1)c=s[a],f=String(e[c]),c.slice(0,2)===\"!!\"&&(c=\"tag:yaml.org,2002:\"+c.slice(2)),p=t.compiledTypeMap.fallback[c],p&&Nre.call(p.styleAliases,f)&&(f=p.styleAliases[f]),r[c]=f;return r}function bre(t){var e,r,s;if(e=t.toString(16).toUpperCase(),t<=255)r=\"x\",s=2;else if(t<=65535)r=\"u\",s=4;else if(t<=4294967295)r=\"U\",s=8;else throw new z2(\"code point within a string may not be greater than 0xFFFFFFFF\");return\"\\\\\"+r+J2.repeat(\"0\",s-e.length)+e}function Mze(t){this.schema=t.schema||yze,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=J2.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Lze(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function Pre(t,e){for(var r=J2.repeat(\" \",e),s=0,a=-1,n=\"\",c,f=t.length;s<f;)a=t.indexOf(`\n`,s),a===-1?(c=t.slice(s),s=f):(c=t.slice(s,a+1),s=a+1),c.length&&c!==`\n`&&(n+=r),n+=c;return n}function cU(t,e){return`\n`+J2.repeat(\" \",t.indent*e)}function _ze(t,e){var r,s,a;for(r=0,s=t.implicitTypes.length;r<s;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function fU(t){return t===wze||t===Ize}function EE(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function Uze(t){return EE(t)&&!fU(t)&&t!==65279&&t!==Cze&&t!==K2}function xre(t,e){return EE(t)&&t!==65279&&t!==Lre&&t!==_re&&t!==Ure&&t!==Hre&&t!==jre&&t!==Mre&&(t!==Ore||e&&Uze(e))}function Hze(t){return EE(t)&&t!==65279&&!fU(t)&&t!==xze&&t!==Tze&&t!==Mre&&t!==Lre&&t!==_re&&t!==Ure&&t!==Hre&&t!==jre&&t!==Ore&&t!==Dze&&t!==Pze&&t!==Bze&&t!==Nze&&t!==kze&&t!==Qze&&t!==bze&&t!==vze&&t!==Sze&&t!==Rze&&t!==Fze}function qre(t){var e=/^\\n* /;return e.test(t)}var Gre=1,Wre=2,Yre=3,Vre=4,Ox=5;function jze(t,e,r,s,a){var n,c,f,p=!1,h=!1,E=s!==-1,C=-1,S=Hze(t.charCodeAt(0))&&!fU(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(c=t.charCodeAt(n),!EE(c))return Ox;f=n>0?t.charCodeAt(n-1):null,S=S&&xre(c,f)}else{for(n=0;n<t.length;n++){if(c=t.charCodeAt(n),c===K2)p=!0,E&&(h=h||n-C-1>s&&t[C+1]!==\" \",C=n);else if(!EE(c))return Ox;f=n>0?t.charCodeAt(n-1):null,S=S&&xre(c,f)}h=h||E&&n-C-1>s&&t[C+1]!==\" \"}return!p&&!h?S&&!a(t)?Gre:Wre:r>9&&qre(t)?Ox:h?Vre:Yre}function qze(t,e,r,s){t.dump=function(){if(e.length===0)return\"''\";if(!t.noCompatMode&&Oze.indexOf(e)!==-1)return\"'\"+e+\"'\";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),c=s||t.flowLevel>-1&&r>=t.flowLevel;function f(p){return _ze(t,p)}switch(jze(e,c,t.indent,n,f)){case Gre:return e;case Wre:return\"'\"+e.replace(/'/g,\"''\")+\"'\";case Yre:return\"|\"+kre(e,t.indent)+Qre(Pre(e,a));case Vre:return\">\"+kre(e,t.indent)+Qre(Pre(Gze(e,n),a));case Ox:return'\"'+Wze(e,n)+'\"';default:throw new z2(\"impossible error: invalid scalar style\")}}()}function kre(t,e){var r=qre(t)?String(e):\"\",s=t[t.length-1]===`\n`,a=s&&(t[t.length-2]===`\n`||t===`\n`),n=a?\"+\":s?\"\":\"-\";return r+n+`\n`}function Qre(t){return t[t.length-1]===`\n`?t.slice(0,-1):t}function Gze(t,e){for(var r=/(\\n+)([^\\n]*)/g,s=function(){var h=t.indexOf(`\n`);return h=h!==-1?h:t.length,r.lastIndex=h,Tre(t.slice(0,h),e)}(),a=t[0]===`\n`||t[0]===\" \",n,c;c=r.exec(t);){var f=c[1],p=c[2];n=p[0]===\" \",s+=f+(!a&&!n&&p!==\"\"?`\n`:\"\")+Tre(p,e),a=n}return s}function Tre(t,e){if(t===\"\"||t[0]===\" \")return t;for(var r=/ [^ ]/g,s,a=0,n,c=0,f=0,p=\"\";s=r.exec(t);)f=s.index,f-a>e&&(n=c>a?c:f,p+=`\n`+t.slice(a,n),a=n+1),c=f;return p+=`\n`,t.length-a>e&&c>a?p+=t.slice(a,c)+`\n`+t.slice(c+1):p+=t.slice(a),p.slice(1)}function Wze(t){for(var e=\"\",r,s,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(s=t.charCodeAt(n+1),s>=56320&&s<=57343)){e+=bre((r-55296)*1024+s-56320+65536),n++;continue}a=jo[r],e+=!a&&EE(r)?t[n]:a||bre(r)}return e}function Yze(t,e,r){var s=\"\",a=t.tag,n,c;for(n=0,c=r.length;n<c;n+=1)Rd(t,e,r[n],!1,!1)&&(n!==0&&(s+=\",\"+(t.condenseFlow?\"\":\" \")),s+=t.dump);t.tag=a,t.dump=\"[\"+s+\"]\"}function Vze(t,e,r,s){var a=\"\",n=t.tag,c,f;for(c=0,f=r.length;c<f;c+=1)Rd(t,e+1,r[c],!0,!0)&&((!s||c!==0)&&(a+=cU(t,e)),t.dump&&K2===t.dump.charCodeAt(0)?a+=\"-\":a+=\"- \",a+=t.dump);t.tag=n,t.dump=a||\"[]\"}function Kze(t,e,r){var s=\"\",a=t.tag,n=Object.keys(r),c,f,p,h,E;for(c=0,f=n.length;c<f;c+=1)E=\"\",c!==0&&(E+=\", \"),t.condenseFlow&&(E+='\"'),p=n[c],h=r[p],Rd(t,e,p,!1,!1)&&(t.dump.length>1024&&(E+=\"? \"),E+=t.dump+(t.condenseFlow?'\"':\"\")+\":\"+(t.condenseFlow?\"\":\" \"),Rd(t,e,h,!1,!1)&&(E+=t.dump,s+=E));t.tag=a,t.dump=\"{\"+s+\"}\"}function Jze(t,e,r,s){var a=\"\",n=t.tag,c=Object.keys(r),f,p,h,E,C,S;if(t.sortKeys===!0)c.sort();else if(typeof t.sortKeys==\"function\")c.sort(t.sortKeys);else if(t.sortKeys)throw new z2(\"sortKeys must be a boolean or a function\");for(f=0,p=c.length;f<p;f+=1)S=\"\",(!s||f!==0)&&(S+=cU(t,e)),h=c[f],E=r[h],Rd(t,e+1,h,!0,!0,!0)&&(C=t.tag!==null&&t.tag!==\"?\"||t.dump&&t.dump.length>1024,C&&(t.dump&&K2===t.dump.charCodeAt(0)?S+=\"?\":S+=\"? \"),S+=t.dump,C&&(S+=cU(t,e)),Rd(t,e+1,E,!0,C)&&(t.dump&&K2===t.dump.charCodeAt(0)?S+=\":\":S+=\": \",S+=t.dump,a+=S));t.tag=n,t.dump=a||\"{}\"}function Rre(t,e,r){var s,a,n,c,f,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,c=a.length;n<c;n+=1)if(f=a[n],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof e==\"object\"&&e instanceof f.instanceOf)&&(!f.predicate||f.predicate(e))){if(t.tag=r?f.tag:\"?\",f.represent){if(p=t.styleMap[f.tag]||f.defaultStyle,Fre.call(f.represent)===\"[object Function]\")s=f.represent(e,p);else if(Nre.call(f.represent,p))s=f.represent[p](e,p);else throw new z2(\"!<\"+f.tag+'> tag resolver accepts not \"'+p+'\" style');t.dump=s}return!0}return!1}function Rd(t,e,r,s,a,n){t.tag=null,t.dump=r,Rre(t,r,!1)||Rre(t,r,!0);var c=Fre.call(t.dump);s&&(s=t.flowLevel<0||t.flowLevel>e);var f=c===\"[object Object]\"||c===\"[object Array]\",p,h;if(f&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!==\"?\"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump=\"*ref_\"+p;else{if(f&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),c===\"[object Object]\")s&&Object.keys(t.dump).length!==0?(Jze(t,e,t.dump,a),h&&(t.dump=\"&ref_\"+p+t.dump)):(Kze(t,e,t.dump),h&&(t.dump=\"&ref_\"+p+\" \"+t.dump));else if(c===\"[object Array]\"){var E=t.noArrayIndent&&e>0?e-1:e;s&&t.dump.length!==0?(Vze(t,E,t.dump,a),h&&(t.dump=\"&ref_\"+p+t.dump)):(Yze(t,E,t.dump),h&&(t.dump=\"&ref_\"+p+\" \"+t.dump))}else if(c===\"[object String]\")t.tag!==\"?\"&&qze(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new z2(\"unacceptable kind of an object to dump \"+c)}t.tag!==null&&t.tag!==\"?\"&&(t.dump=\"!<\"+t.tag+\"> \"+t.dump)}return!0}function zze(t,e){var r=[],s=[],a,n;for(uU(t,r,s),a=0,n=s.length;a<n;a+=1)e.duplicates.push(r[s[a]]);e.usedDuplicates=new Array(n)}function uU(t,e,r){var s,a,n;if(t!==null&&typeof t==\"object\")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)uU(t[a],e,r);else for(s=Object.keys(t),a=0,n=s.length;a<n;a+=1)uU(t[s[a]],e,r)}function Kre(t,e){e=e||{};var r=new Mze(e);return r.noRefs||zze(t,r),Rd(r,0,t,!0,!0)?r.dump+`\n`:\"\"}function Zze(t,e){return Kre(t,J2.extend({schema:Eze},e))}AU.exports.dump=Kre;AU.exports.safeDump=Zze});var Zre=L((y9t,Gi)=>{\"use strict\";var Lx=Dre(),zre=Jre();function Mx(t){return function(){throw new Error(\"Function \"+t+\" is deprecated and cannot be used.\")}}Gi.exports.Type=Ds();Gi.exports.Schema=xd();Gi.exports.FAILSAFE_SCHEMA=kx();Gi.exports.JSON_SCHEMA=nU();Gi.exports.CORE_SCHEMA=iU();Gi.exports.DEFAULT_SAFE_SCHEMA=gE();Gi.exports.DEFAULT_FULL_SCHEMA=Y2();Gi.exports.load=Lx.load;Gi.exports.loadAll=Lx.loadAll;Gi.exports.safeLoad=Lx.safeLoad;Gi.exports.safeLoadAll=Lx.safeLoadAll;Gi.exports.dump=zre.dump;Gi.exports.safeDump=zre.safeDump;Gi.exports.YAMLException=pE();Gi.exports.MINIMAL_SCHEMA=kx();Gi.exports.SAFE_SCHEMA=gE();Gi.exports.DEFAULT_SCHEMA=Y2();Gi.exports.scan=Mx(\"scan\");Gi.exports.parse=Mx(\"parse\");Gi.exports.compose=Mx(\"compose\");Gi.exports.addConstructor=Mx(\"addConstructor\")});var $re=L((E9t,Xre)=>{\"use strict\";var Xze=Zre();Xre.exports=Xze});var tne=L((I9t,ene)=>{\"use strict\";function $ze(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Fd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,Fd)}$ze(Fd,Error);Fd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function eZe(t,e){e=e!==void 0?e:{};var r={},s={Start:cc},a=cc,n=function(ee){return[].concat(...ee)},c=\"-\",f=dn(\"-\",!1),p=function(ee){return ee},h=function(ee){return Object.assign({},...ee)},E=\"#\",C=dn(\"#\",!1),S=hu(),P=function(){return{}},I=\":\",R=dn(\":\",!1),N=function(ee,Ie){return{[ee]:Ie}},U=\",\",W=dn(\",\",!1),te=function(ee,Ie){return Ie},ie=function(ee,Ie,Oe){return Object.assign({},...[ee].concat(Ie).map(ht=>({[ht]:Oe})))},Ae=function(ee){return ee},ce=function(ee){return ee},me=La(\"correct indentation\"),pe=\" \",Be=dn(\" \",!1),Ce=function(ee){return ee.length===lr*St},g=function(ee){return ee.length===(lr+1)*St},we=function(){return lr++,!0},Ee=function(){return lr--,!0},fe=function(){return ca()},se=La(\"pseudostring\"),X=/^[^\\r\\n\\t ?:,\\][{}#&*!|>'\"%@`\\-]/,De=Jn([\"\\r\",`\n`,\"\t\",\" \",\"?\",\":\",\",\",\"]\",\"[\",\"{\",\"}\",\"#\",\"&\",\"*\",\"!\",\"|\",\">\",\"'\",'\"',\"%\",\"@\",\"`\",\"-\"],!0,!1),Re=/^[^\\r\\n\\t ,\\][{}:#\"']/,gt=Jn([\"\\r\",`\n`,\"\t\",\" \",\",\",\"]\",\"[\",\"{\",\"}\",\":\",\"#\",'\"',\"'\"],!0,!1),j=function(){return ca().replace(/^ *| *$/g,\"\")},rt=\"--\",Fe=dn(\"--\",!1),Ne=/^[a-zA-Z\\/0-9]/,Pe=Jn([[\"a\",\"z\"],[\"A\",\"Z\"],\"/\",[\"0\",\"9\"]],!1,!1),Ye=/^[^\\r\\n\\t :,]/,ke=Jn([\"\\r\",`\n`,\"\t\",\" \",\":\",\",\"],!0,!1),it=\"null\",_e=dn(\"null\",!1),x=function(){return null},w=\"true\",b=dn(\"true\",!1),y=function(){return!0},F=\"false\",z=dn(\"false\",!1),Z=function(){return!1},$=La(\"string\"),oe='\"',xe=dn('\"',!1),Te=function(){return\"\"},lt=function(ee){return ee},Et=function(ee){return ee.join(\"\")},qt=/^[^\"\\\\\\0-\\x1F\\x7F]/,ir=Jn(['\"',\"\\\\\",[\"\\0\",\"\u001f\"],\"\\x7F\"],!0,!1),Pt='\\\\\"',gn=dn('\\\\\"',!1),Pr=function(){return'\"'},Ir=\"\\\\\\\\\",Nr=dn(\"\\\\\\\\\",!1),nn=function(){return\"\\\\\"},oi=\"\\\\/\",wo=dn(\"\\\\/\",!1),rs=function(){return\"/\"},eo=\"\\\\b\",Bo=dn(\"\\\\b\",!1),Hi=function(){return\"\\b\"},to=\"\\\\f\",vo=dn(\"\\\\f\",!1),RA=function(){return\"\\f\"},pf=\"\\\\n\",Eh=dn(\"\\\\n\",!1),Ih=function(){return`\n`},ro=\"\\\\r\",jn=dn(\"\\\\r\",!1),Rs=function(){return\"\\r\"},no=\"\\\\t\",lu=dn(\"\\\\t\",!1),cu=function(){return\"\t\"},uu=\"\\\\u\",FA=dn(\"\\\\u\",!1),NA=function(ee,Ie,Oe,ht){return String.fromCharCode(parseInt(`0x${ee}${Ie}${Oe}${ht}`))},aa=/^[0-9a-fA-F]/,la=Jn([[\"0\",\"9\"],[\"a\",\"f\"],[\"A\",\"F\"]],!1,!1),OA=La(\"blank space\"),gr=/^[ \\t]/,So=Jn([\" \",\"\t\"],!1,!1),Me=La(\"white space\"),fu=/^[ \\t\\n\\r]/,Cr=Jn([\" \",\"\t\",`\n`,\"\\r\"],!1,!1),hf=`\\r\n`,LA=dn(`\\r\n`,!1),MA=`\n`,Au=dn(`\n`,!1),pu=\"\\r\",ac=dn(\"\\r\",!1),ve=0,Nt=0,lc=[{line:1,column:1}],Ni=0,io=[],Rt=0,xn;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function ca(){return t.substring(Nt,ve)}function ji(){return Ua(Nt,ve)}function Oi(ee,Ie){throw Ie=Ie!==void 0?Ie:Ua(Nt,ve),gf([La(ee)],t.substring(Nt,ve),Ie)}function Oa(ee,Ie){throw Ie=Ie!==void 0?Ie:Ua(Nt,ve),Ha(ee,Ie)}function dn(ee,Ie){return{type:\"literal\",text:ee,ignoreCase:Ie}}function Jn(ee,Ie,Oe){return{type:\"class\",parts:ee,inverted:Ie,ignoreCase:Oe}}function hu(){return{type:\"any\"}}function Ch(){return{type:\"end\"}}function La(ee){return{type:\"other\",description:ee}}function Ma(ee){var Ie=lc[ee],Oe;if(Ie)return Ie;for(Oe=ee-1;!lc[Oe];)Oe--;for(Ie=lc[Oe],Ie={line:Ie.line,column:Ie.column};Oe<ee;)t.charCodeAt(Oe)===10?(Ie.line++,Ie.column=1):Ie.column++,Oe++;return lc[ee]=Ie,Ie}function Ua(ee,Ie){var Oe=Ma(ee),ht=Ma(Ie);return{start:{offset:ee,line:Oe.line,column:Oe.column},end:{offset:Ie,line:ht.line,column:ht.column}}}function Xe(ee){ve<Ni||(ve>Ni&&(Ni=ve,io=[]),io.push(ee))}function Ha(ee,Ie){return new Fd(ee,null,null,Ie)}function gf(ee,Ie,Oe){return new Fd(Fd.buildMessage(ee,Ie),ee,Ie,Oe)}function cc(){var ee;return ee=_A(),ee}function wn(){var ee,Ie,Oe;for(ee=ve,Ie=[],Oe=ua();Oe!==r;)Ie.push(Oe),Oe=ua();return Ie!==r&&(Nt=ee,Ie=n(Ie)),ee=Ie,ee}function ua(){var ee,Ie,Oe,ht,mt;return ee=ve,Ie=vl(),Ie!==r?(t.charCodeAt(ve)===45?(Oe=c,ve++):(Oe=r,Rt===0&&Xe(f)),Oe!==r?(ht=Qn(),ht!==r?(mt=fa(),mt!==r?(Nt=ee,Ie=p(mt),ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee}function _A(){var ee,Ie,Oe;for(ee=ve,Ie=[],Oe=UA();Oe!==r;)Ie.push(Oe),Oe=UA();return Ie!==r&&(Nt=ee,Ie=h(Ie)),ee=Ie,ee}function UA(){var ee,Ie,Oe,ht,mt,Dt,tr,fn,ai;if(ee=ve,Ie=Qn(),Ie===r&&(Ie=null),Ie!==r){if(Oe=ve,t.charCodeAt(ve)===35?(ht=E,ve++):(ht=r,Rt===0&&Xe(C)),ht!==r){if(mt=[],Dt=ve,tr=ve,Rt++,fn=st(),Rt--,fn===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(fn=t.charAt(ve),ve++):(fn=r,Rt===0&&Xe(S)),fn!==r?(tr=[tr,fn],Dt=tr):(ve=Dt,Dt=r)):(ve=Dt,Dt=r),Dt!==r)for(;Dt!==r;)mt.push(Dt),Dt=ve,tr=ve,Rt++,fn=st(),Rt--,fn===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(fn=t.charAt(ve),ve++):(fn=r,Rt===0&&Xe(S)),fn!==r?(tr=[tr,fn],Dt=tr):(ve=Dt,Dt=r)):(ve=Dt,Dt=r);else mt=r;mt!==r?(ht=[ht,mt],Oe=ht):(ve=Oe,Oe=r)}else ve=Oe,Oe=r;if(Oe===r&&(Oe=null),Oe!==r){if(ht=[],mt=Je(),mt!==r)for(;mt!==r;)ht.push(mt),mt=Je();else ht=r;ht!==r?(Nt=ee,Ie=P(),ee=Ie):(ve=ee,ee=r)}else ve=ee,ee=r}else ve=ee,ee=r;if(ee===r&&(ee=ve,Ie=vl(),Ie!==r?(Oe=ja(),Oe!==r?(ht=Qn(),ht===r&&(ht=null),ht!==r?(t.charCodeAt(ve)===58?(mt=I,ve++):(mt=r,Rt===0&&Xe(R)),mt!==r?(Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(tr=fa(),tr!==r?(Nt=ee,Ie=N(Oe,tr),ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r&&(ee=ve,Ie=vl(),Ie!==r?(Oe=ns(),Oe!==r?(ht=Qn(),ht===r&&(ht=null),ht!==r?(t.charCodeAt(ve)===58?(mt=I,ve++):(mt=r,Rt===0&&Xe(R)),mt!==r?(Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(tr=fa(),tr!==r?(Nt=ee,Ie=N(Oe,tr),ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r))){if(ee=ve,Ie=vl(),Ie!==r)if(Oe=ns(),Oe!==r)if(ht=Qn(),ht!==r)if(mt=gu(),mt!==r){if(Dt=[],tr=Je(),tr!==r)for(;tr!==r;)Dt.push(tr),tr=Je();else Dt=r;Dt!==r?(Nt=ee,Ie=N(Oe,mt),ee=Ie):(ve=ee,ee=r)}else ve=ee,ee=r;else ve=ee,ee=r;else ve=ee,ee=r;else ve=ee,ee=r;if(ee===r)if(ee=ve,Ie=vl(),Ie!==r)if(Oe=ns(),Oe!==r){if(ht=[],mt=ve,Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&Xe(W)),tr!==r?(fn=Qn(),fn===r&&(fn=null),fn!==r?(ai=ns(),ai!==r?(Nt=mt,Dt=te(Oe,ai),mt=Dt):(ve=mt,mt=r)):(ve=mt,mt=r)):(ve=mt,mt=r)):(ve=mt,mt=r),mt!==r)for(;mt!==r;)ht.push(mt),mt=ve,Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&Xe(W)),tr!==r?(fn=Qn(),fn===r&&(fn=null),fn!==r?(ai=ns(),ai!==r?(Nt=mt,Dt=te(Oe,ai),mt=Dt):(ve=mt,mt=r)):(ve=mt,mt=r)):(ve=mt,mt=r)):(ve=mt,mt=r);else ht=r;ht!==r?(mt=Qn(),mt===r&&(mt=null),mt!==r?(t.charCodeAt(ve)===58?(Dt=I,ve++):(Dt=r,Rt===0&&Xe(R)),Dt!==r?(tr=Qn(),tr===r&&(tr=null),tr!==r?(fn=fa(),fn!==r?(Nt=ee,Ie=ie(Oe,ht,fn),ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)}else ve=ee,ee=r;else ve=ee,ee=r}return ee}function fa(){var ee,Ie,Oe,ht,mt,Dt,tr;if(ee=ve,Ie=ve,Rt++,Oe=ve,ht=st(),ht!==r?(mt=Mt(),mt!==r?(t.charCodeAt(ve)===45?(Dt=c,ve++):(Dt=r,Rt===0&&Xe(f)),Dt!==r?(tr=Qn(),tr!==r?(ht=[ht,mt,Dt,tr],Oe=ht):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r),Rt--,Oe!==r?(ve=Ie,Ie=void 0):Ie=r,Ie!==r?(Oe=Je(),Oe!==r?(ht=kn(),ht!==r?(mt=wn(),mt!==r?(Dt=Aa(),Dt!==r?(Nt=ee,Ie=Ae(mt),ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r&&(ee=ve,Ie=st(),Ie!==r?(Oe=kn(),Oe!==r?(ht=_A(),ht!==r?(mt=Aa(),mt!==r?(Nt=ee,Ie=Ae(ht),ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r))if(ee=ve,Ie=uc(),Ie!==r){if(Oe=[],ht=Je(),ht!==r)for(;ht!==r;)Oe.push(ht),ht=Je();else Oe=r;Oe!==r?(Nt=ee,Ie=ce(Ie),ee=Ie):(ve=ee,ee=r)}else ve=ee,ee=r;return ee}function vl(){var ee,Ie,Oe;for(Rt++,ee=ve,Ie=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));Oe!==r;)Ie.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));return Ie!==r?(Nt=ve,Oe=Ce(Ie),Oe?Oe=void 0:Oe=r,Oe!==r?(Ie=[Ie,Oe],ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r),Rt--,ee===r&&(Ie=r,Rt===0&&Xe(me)),ee}function Mt(){var ee,Ie,Oe;for(ee=ve,Ie=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));Oe!==r;)Ie.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));return Ie!==r?(Nt=ve,Oe=g(Ie),Oe?Oe=void 0:Oe=r,Oe!==r?(Ie=[Ie,Oe],ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r),ee}function kn(){var ee;return Nt=ve,ee=we(),ee?ee=void 0:ee=r,ee}function Aa(){var ee;return Nt=ve,ee=Ee(),ee?ee=void 0:ee=r,ee}function ja(){var ee;return ee=Sl(),ee===r&&(ee=fc()),ee}function ns(){var ee,Ie,Oe;if(ee=Sl(),ee===r){if(ee=ve,Ie=[],Oe=qa(),Oe!==r)for(;Oe!==r;)Ie.push(Oe),Oe=qa();else Ie=r;Ie!==r&&(Nt=ee,Ie=fe()),ee=Ie}return ee}function uc(){var ee;return ee=Li(),ee===r&&(ee=Cs(),ee===r&&(ee=Sl(),ee===r&&(ee=fc()))),ee}function gu(){var ee;return ee=Li(),ee===r&&(ee=Sl(),ee===r&&(ee=qa())),ee}function fc(){var ee,Ie,Oe,ht,mt,Dt;if(Rt++,ee=ve,X.test(t.charAt(ve))?(Ie=t.charAt(ve),ve++):(Ie=r,Rt===0&&Xe(De)),Ie!==r){for(Oe=[],ht=ve,mt=Qn(),mt===r&&(mt=null),mt!==r?(Re.test(t.charAt(ve))?(Dt=t.charAt(ve),ve++):(Dt=r,Rt===0&&Xe(gt)),Dt!==r?(mt=[mt,Dt],ht=mt):(ve=ht,ht=r)):(ve=ht,ht=r);ht!==r;)Oe.push(ht),ht=ve,mt=Qn(),mt===r&&(mt=null),mt!==r?(Re.test(t.charAt(ve))?(Dt=t.charAt(ve),ve++):(Dt=r,Rt===0&&Xe(gt)),Dt!==r?(mt=[mt,Dt],ht=mt):(ve=ht,ht=r)):(ve=ht,ht=r);Oe!==r?(Nt=ee,Ie=j(),ee=Ie):(ve=ee,ee=r)}else ve=ee,ee=r;return Rt--,ee===r&&(Ie=r,Rt===0&&Xe(se)),ee}function qa(){var ee,Ie,Oe,ht,mt;if(ee=ve,t.substr(ve,2)===rt?(Ie=rt,ve+=2):(Ie=r,Rt===0&&Xe(Fe)),Ie===r&&(Ie=null),Ie!==r)if(Ne.test(t.charAt(ve))?(Oe=t.charAt(ve),ve++):(Oe=r,Rt===0&&Xe(Pe)),Oe!==r){for(ht=[],Ye.test(t.charAt(ve))?(mt=t.charAt(ve),ve++):(mt=r,Rt===0&&Xe(ke));mt!==r;)ht.push(mt),Ye.test(t.charAt(ve))?(mt=t.charAt(ve),ve++):(mt=r,Rt===0&&Xe(ke));ht!==r?(Nt=ee,Ie=j(),ee=Ie):(ve=ee,ee=r)}else ve=ee,ee=r;else ve=ee,ee=r;return ee}function Li(){var ee,Ie;return ee=ve,t.substr(ve,4)===it?(Ie=it,ve+=4):(Ie=r,Rt===0&&Xe(_e)),Ie!==r&&(Nt=ee,Ie=x()),ee=Ie,ee}function Cs(){var ee,Ie;return ee=ve,t.substr(ve,4)===w?(Ie=w,ve+=4):(Ie=r,Rt===0&&Xe(b)),Ie!==r&&(Nt=ee,Ie=y()),ee=Ie,ee===r&&(ee=ve,t.substr(ve,5)===F?(Ie=F,ve+=5):(Ie=r,Rt===0&&Xe(z)),Ie!==r&&(Nt=ee,Ie=Z()),ee=Ie),ee}function Sl(){var ee,Ie,Oe,ht;return Rt++,ee=ve,t.charCodeAt(ve)===34?(Ie=oe,ve++):(Ie=r,Rt===0&&Xe(xe)),Ie!==r?(t.charCodeAt(ve)===34?(Oe=oe,ve++):(Oe=r,Rt===0&&Xe(xe)),Oe!==r?(Nt=ee,Ie=Te(),ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r&&(ee=ve,t.charCodeAt(ve)===34?(Ie=oe,ve++):(Ie=r,Rt===0&&Xe(xe)),Ie!==r?(Oe=df(),Oe!==r?(t.charCodeAt(ve)===34?(ht=oe,ve++):(ht=r,Rt===0&&Xe(xe)),ht!==r?(Nt=ee,Ie=lt(Oe),ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)),Rt--,ee===r&&(Ie=r,Rt===0&&Xe($)),ee}function df(){var ee,Ie,Oe;if(ee=ve,Ie=[],Oe=Ac(),Oe!==r)for(;Oe!==r;)Ie.push(Oe),Oe=Ac();else Ie=r;return Ie!==r&&(Nt=ee,Ie=Et(Ie)),ee=Ie,ee}function Ac(){var ee,Ie,Oe,ht,mt,Dt;return qt.test(t.charAt(ve))?(ee=t.charAt(ve),ve++):(ee=r,Rt===0&&Xe(ir)),ee===r&&(ee=ve,t.substr(ve,2)===Pt?(Ie=Pt,ve+=2):(Ie=r,Rt===0&&Xe(gn)),Ie!==r&&(Nt=ee,Ie=Pr()),ee=Ie,ee===r&&(ee=ve,t.substr(ve,2)===Ir?(Ie=Ir,ve+=2):(Ie=r,Rt===0&&Xe(Nr)),Ie!==r&&(Nt=ee,Ie=nn()),ee=Ie,ee===r&&(ee=ve,t.substr(ve,2)===oi?(Ie=oi,ve+=2):(Ie=r,Rt===0&&Xe(wo)),Ie!==r&&(Nt=ee,Ie=rs()),ee=Ie,ee===r&&(ee=ve,t.substr(ve,2)===eo?(Ie=eo,ve+=2):(Ie=r,Rt===0&&Xe(Bo)),Ie!==r&&(Nt=ee,Ie=Hi()),ee=Ie,ee===r&&(ee=ve,t.substr(ve,2)===to?(Ie=to,ve+=2):(Ie=r,Rt===0&&Xe(vo)),Ie!==r&&(Nt=ee,Ie=RA()),ee=Ie,ee===r&&(ee=ve,t.substr(ve,2)===pf?(Ie=pf,ve+=2):(Ie=r,Rt===0&&Xe(Eh)),Ie!==r&&(Nt=ee,Ie=Ih()),ee=Ie,ee===r&&(ee=ve,t.substr(ve,2)===ro?(Ie=ro,ve+=2):(Ie=r,Rt===0&&Xe(jn)),Ie!==r&&(Nt=ee,Ie=Rs()),ee=Ie,ee===r&&(ee=ve,t.substr(ve,2)===no?(Ie=no,ve+=2):(Ie=r,Rt===0&&Xe(lu)),Ie!==r&&(Nt=ee,Ie=cu()),ee=Ie,ee===r&&(ee=ve,t.substr(ve,2)===uu?(Ie=uu,ve+=2):(Ie=r,Rt===0&&Xe(FA)),Ie!==r?(Oe=wi(),Oe!==r?(ht=wi(),ht!==r?(mt=wi(),mt!==r?(Dt=wi(),Dt!==r?(Nt=ee,Ie=NA(Oe,ht,mt,Dt),ee=Ie):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)))))))))),ee}function wi(){var ee;return aa.test(t.charAt(ve))?(ee=t.charAt(ve),ve++):(ee=r,Rt===0&&Xe(la)),ee}function Qn(){var ee,Ie;if(Rt++,ee=[],gr.test(t.charAt(ve))?(Ie=t.charAt(ve),ve++):(Ie=r,Rt===0&&Xe(So)),Ie!==r)for(;Ie!==r;)ee.push(Ie),gr.test(t.charAt(ve))?(Ie=t.charAt(ve),ve++):(Ie=r,Rt===0&&Xe(So));else ee=r;return Rt--,ee===r&&(Ie=r,Rt===0&&Xe(OA)),ee}function pc(){var ee,Ie;if(Rt++,ee=[],fu.test(t.charAt(ve))?(Ie=t.charAt(ve),ve++):(Ie=r,Rt===0&&Xe(Cr)),Ie!==r)for(;Ie!==r;)ee.push(Ie),fu.test(t.charAt(ve))?(Ie=t.charAt(ve),ve++):(Ie=r,Rt===0&&Xe(Cr));else ee=r;return Rt--,ee===r&&(Ie=r,Rt===0&&Xe(Me)),ee}function Je(){var ee,Ie,Oe,ht,mt,Dt;if(ee=ve,Ie=st(),Ie!==r){for(Oe=[],ht=ve,mt=Qn(),mt===r&&(mt=null),mt!==r?(Dt=st(),Dt!==r?(mt=[mt,Dt],ht=mt):(ve=ht,ht=r)):(ve=ht,ht=r);ht!==r;)Oe.push(ht),ht=ve,mt=Qn(),mt===r&&(mt=null),mt!==r?(Dt=st(),Dt!==r?(mt=[mt,Dt],ht=mt):(ve=ht,ht=r)):(ve=ht,ht=r);Oe!==r?(Ie=[Ie,Oe],ee=Ie):(ve=ee,ee=r)}else ve=ee,ee=r;return ee}function st(){var ee;return t.substr(ve,2)===hf?(ee=hf,ve+=2):(ee=r,Rt===0&&Xe(LA)),ee===r&&(t.charCodeAt(ve)===10?(ee=MA,ve++):(ee=r,Rt===0&&Xe(Au)),ee===r&&(t.charCodeAt(ve)===13?(ee=pu,ve++):(ee=r,Rt===0&&Xe(ac)))),ee}let St=2,lr=0;if(xn=a(),xn!==r&&ve===t.length)return xn;throw xn!==r&&ve<t.length&&Xe(Ch()),gf(io,Ni<t.length?t.charAt(Ni):null,Ni<t.length?Ua(Ni,Ni+1):Ua(Ni,Ni))}ene.exports={SyntaxError:Fd,parse:eZe}});function nne(t){return t.match(tZe)?t:JSON.stringify(t)}function sne(t){return typeof t>\"u\"?!0:typeof t==\"object\"&&t!==null&&!Array.isArray(t)?Object.keys(t).every(e=>sne(t[e])):!1}function pU(t,e,r){if(t===null)return`null\n`;if(typeof t==\"number\"||typeof t==\"boolean\")return`${t.toString()}\n`;if(typeof t==\"string\")return`${nne(t)}\n`;if(Array.isArray(t)){if(t.length===0)return`[]\n`;let s=\"  \".repeat(e);return`\n${t.map(n=>`${s}- ${pU(n,e+1,!1)}`).join(\"\")}`}if(typeof t==\"object\"&&t){let[s,a]=t instanceof _x?[t.data,!1]:[t,!0],n=\"  \".repeat(e),c=Object.keys(s);a&&c.sort((p,h)=>{let E=rne.indexOf(p),C=rne.indexOf(h);return E===-1&&C===-1?p<h?-1:p>h?1:0:E!==-1&&C===-1?-1:E===-1&&C!==-1?1:E-C});let f=c.filter(p=>!sne(s[p])).map((p,h)=>{let E=s[p],C=nne(p),S=pU(E,e+1,!0),P=h>0||r?n:\"\",I=C.length>1024?`? ${C}\n${P}:`:`${C}:`,R=S.startsWith(`\n`)?S:` ${S}`;return`${P}${I}${R}`}).join(e===0?`\n`:\"\")||`\n`;return r?`\n${f}`:`${f}`}throw new Error(`Unsupported value type (${t})`)}function il(t){try{let e=pU(t,0,!1);return e!==`\n`?e:\"\"}catch(e){throw e.location&&(e.message=e.message.replace(/(\\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function rZe(t){return t.endsWith(`\n`)||(t+=`\n`),(0,ine.parse)(t)}function iZe(t){if(nZe.test(t))return rZe(t);let e=(0,Ux.safeLoad)(t,{schema:Ux.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!=\"object\")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error(\"Expected an indexed object, got an array instead. Does your file follow Yaml's rules?\");return e}function ls(t){return iZe(t)}var Ux,ine,tZe,rne,_x,nZe,one=It(()=>{Ux=et($re()),ine=et(tne()),tZe=/^(?![-?:,\\][{}#&*!|>'\"%@` \\t\\r\\n]).([ \\t]*(?![,\\][{}:# \\t\\r\\n]).)*$/,rne=[\"__metadata\",\"version\",\"resolution\",\"dependencies\",\"peerDependencies\",\"dependenciesMeta\",\"peerDependenciesMeta\",\"binaries\"],_x=class{constructor(e){this.data=e}};il.PreserveOrdering=_x;nZe=/^(#.*(\\r?\\n))*?#\\s+yarn\\s+lockfile\\s+v1\\r?\\n/i});var Z2={};Vt(Z2,{parseResolution:()=>bx,parseShell:()=>vx,parseSyml:()=>ls,stringifyArgument:()=>$_,stringifyArgumentSegment:()=>eU,stringifyArithmeticExpression:()=>Dx,stringifyCommand:()=>X_,stringifyCommandChain:()=>AE,stringifyCommandChainThen:()=>Z_,stringifyCommandLine:()=>Sx,stringifyCommandLineThen:()=>z_,stringifyEnvSegment:()=>Bx,stringifyRedirectArgument:()=>G2,stringifyResolution:()=>Px,stringifyShell:()=>fE,stringifyShellLine:()=>fE,stringifySyml:()=>il,stringifyValueArgument:()=>Sd});var Bc=It(()=>{ste();cte();one()});var lne=L((S9t,hU)=>{\"use strict\";var sZe=t=>{let e=!1,r=!1,s=!1;for(let a=0;a<t.length;a++){let n=t[a];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,a)+\"-\"+t.slice(a),e=!1,s=r,r=!0,a++):r&&s&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+\"-\"+t.slice(a-1),s=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,s=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},ane=(t,e)=>{if(!(typeof t==\"string\"||Array.isArray(t)))throw new TypeError(\"Expected the input to be `string | string[]`\");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join(\"-\"):t=t.trim(),t.length===0?\"\":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=sZe(t)),t=t.replace(/^[_.\\- ]+/,\"\").toLowerCase().replace(/[_.\\- ]+(\\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\\d+(\\w|$)/g,a=>a.toUpperCase()),r(t))};hU.exports=ane;hU.exports.default=ane});var cne=L((D9t,oZe)=>{oZe.exports=[{name:\"Agola CI\",constant:\"AGOLA\",env:\"AGOLA_GIT_REF\",pr:\"AGOLA_PULL_REQUEST_ID\"},{name:\"Appcircle\",constant:\"APPCIRCLE\",env:\"AC_APPCIRCLE\"},{name:\"AppVeyor\",constant:\"APPVEYOR\",env:\"APPVEYOR\",pr:\"APPVEYOR_PULL_REQUEST_NUMBER\"},{name:\"AWS CodeBuild\",constant:\"CODEBUILD\",env:\"CODEBUILD_BUILD_ARN\"},{name:\"Azure Pipelines\",constant:\"AZURE_PIPELINES\",env:\"TF_BUILD\",pr:{BUILD_REASON:\"PullRequest\"}},{name:\"Bamboo\",constant:\"BAMBOO\",env:\"bamboo_planKey\"},{name:\"Bitbucket Pipelines\",constant:\"BITBUCKET\",env:\"BITBUCKET_COMMIT\",pr:\"BITBUCKET_PR_ID\"},{name:\"Bitrise\",constant:\"BITRISE\",env:\"BITRISE_IO\",pr:\"BITRISE_PULL_REQUEST\"},{name:\"Buddy\",constant:\"BUDDY\",env:\"BUDDY_WORKSPACE_ID\",pr:\"BUDDY_EXECUTION_PULL_REQUEST_ID\"},{name:\"Buildkite\",constant:\"BUILDKITE\",env:\"BUILDKITE\",pr:{env:\"BUILDKITE_PULL_REQUEST\",ne:\"false\"}},{name:\"CircleCI\",constant:\"CIRCLE\",env:\"CIRCLECI\",pr:\"CIRCLE_PULL_REQUEST\"},{name:\"Cirrus CI\",constant:\"CIRRUS\",env:\"CIRRUS_CI\",pr:\"CIRRUS_PR\"},{name:\"Codefresh\",constant:\"CODEFRESH\",env:\"CF_BUILD_ID\",pr:{any:[\"CF_PULL_REQUEST_NUMBER\",\"CF_PULL_REQUEST_ID\"]}},{name:\"Codemagic\",constant:\"CODEMAGIC\",env:\"CM_BUILD_ID\",pr:\"CM_PULL_REQUEST\"},{name:\"Codeship\",constant:\"CODESHIP\",env:{CI_NAME:\"codeship\"}},{name:\"Drone\",constant:\"DRONE\",env:\"DRONE\",pr:{DRONE_BUILD_EVENT:\"pull_request\"}},{name:\"dsari\",constant:\"DSARI\",env:\"DSARI\"},{name:\"Earthly\",constant:\"EARTHLY\",env:\"EARTHLY_CI\"},{name:\"Expo Application Services\",constant:\"EAS\",env:\"EAS_BUILD\"},{name:\"Gerrit\",constant:\"GERRIT\",env:\"GERRIT_PROJECT\"},{name:\"Gitea Actions\",constant:\"GITEA_ACTIONS\",env:\"GITEA_ACTIONS\"},{name:\"GitHub Actions\",constant:\"GITHUB_ACTIONS\",env:\"GITHUB_ACTIONS\",pr:{GITHUB_EVENT_NAME:\"pull_request\"}},{name:\"GitLab CI\",constant:\"GITLAB\",env:\"GITLAB_CI\",pr:\"CI_MERGE_REQUEST_ID\"},{name:\"GoCD\",constant:\"GOCD\",env:\"GO_PIPELINE_LABEL\"},{name:\"Google Cloud Build\",constant:\"GOOGLE_CLOUD_BUILD\",env:\"BUILDER_OUTPUT\"},{name:\"Harness CI\",constant:\"HARNESS\",env:\"HARNESS_BUILD_ID\"},{name:\"Heroku\",constant:\"HEROKU\",env:{env:\"NODE\",includes:\"/app/.heroku/node/bin/node\"}},{name:\"Hudson\",constant:\"HUDSON\",env:\"HUDSON_URL\"},{name:\"Jenkins\",constant:\"JENKINS\",env:[\"JENKINS_URL\",\"BUILD_ID\"],pr:{any:[\"ghprbPullId\",\"CHANGE_ID\"]}},{name:\"LayerCI\",constant:\"LAYERCI\",env:\"LAYERCI\",pr:\"LAYERCI_PULL_REQUEST\"},{name:\"Magnum CI\",constant:\"MAGNUM\",env:\"MAGNUM\"},{name:\"Netlify CI\",constant:\"NETLIFY\",env:\"NETLIFY\",pr:{env:\"PULL_REQUEST\",ne:\"false\"}},{name:\"Nevercode\",constant:\"NEVERCODE\",env:\"NEVERCODE\",pr:{env:\"NEVERCODE_PULL_REQUEST\",ne:\"false\"}},{name:\"Prow\",constant:\"PROW\",env:\"PROW_JOB_ID\"},{name:\"ReleaseHub\",constant:\"RELEASEHUB\",env:\"RELEASE_BUILD_ID\"},{name:\"Render\",constant:\"RENDER\",env:\"RENDER\",pr:{IS_PULL_REQUEST:\"true\"}},{name:\"Sail CI\",constant:\"SAIL\",env:\"SAILCI\",pr:\"SAIL_PULL_REQUEST_NUMBER\"},{name:\"Screwdriver\",constant:\"SCREWDRIVER\",env:\"SCREWDRIVER\",pr:{env:\"SD_PULL_REQUEST\",ne:\"false\"}},{name:\"Semaphore\",constant:\"SEMAPHORE\",env:\"SEMAPHORE\",pr:\"PULL_REQUEST_NUMBER\"},{name:\"Sourcehut\",constant:\"SOURCEHUT\",env:{CI_NAME:\"sourcehut\"}},{name:\"Strider CD\",constant:\"STRIDER\",env:\"STRIDER\"},{name:\"TaskCluster\",constant:\"TASKCLUSTER\",env:[\"TASK_ID\",\"RUN_ID\"]},{name:\"TeamCity\",constant:\"TEAMCITY\",env:\"TEAMCITY_VERSION\"},{name:\"Travis CI\",constant:\"TRAVIS\",env:\"TRAVIS\",pr:{env:\"TRAVIS_PULL_REQUEST\",ne:\"false\"}},{name:\"Vela\",constant:\"VELA\",env:\"VELA\",pr:{VELA_PULL_REQUEST:\"1\"}},{name:\"Vercel\",constant:\"VERCEL\",env:{any:[\"NOW_BUILDER\",\"VERCEL\"]},pr:\"VERCEL_GIT_PULL_REQUEST_ID\"},{name:\"Visual Studio App Center\",constant:\"APPCENTER\",env:\"APPCENTER_BUILD_ID\"},{name:\"Woodpecker\",constant:\"WOODPECKER\",env:{CI:\"woodpecker\"},pr:{CI_BUILD_EVENT:\"pull_request\"}},{name:\"Xcode Cloud\",constant:\"XCODE_CLOUD\",env:\"CI_XCODE_PROJECT\",pr:\"CI_PULL_REQUEST_NUMBER\"},{name:\"Xcode Server\",constant:\"XCODE_SERVER\",env:\"XCS\"}]});var Nd=L(_l=>{\"use strict\";var fne=cne(),bs=process.env;Object.defineProperty(_l,\"_vendors\",{value:fne.map(function(t){return t.constant})});_l.name=null;_l.isPR=null;fne.forEach(function(t){let r=(Array.isArray(t.env)?t.env:[t.env]).every(function(s){return une(s)});if(_l[t.constant]=r,!!r)switch(_l.name=t.name,typeof t.pr){case\"string\":_l.isPR=!!bs[t.pr];break;case\"object\":\"env\"in t.pr?_l.isPR=t.pr.env in bs&&bs[t.pr.env]!==t.pr.ne:\"any\"in t.pr?_l.isPR=t.pr.any.some(function(s){return!!bs[s]}):_l.isPR=une(t.pr);break;default:_l.isPR=null}});_l.isCI=!!(bs.CI!==\"false\"&&(bs.BUILD_ID||bs.BUILD_NUMBER||bs.CI||bs.CI_APP_ID||bs.CI_BUILD_ID||bs.CI_BUILD_NUMBER||bs.CI_NAME||bs.CONTINUOUS_INTEGRATION||bs.RUN_ID||_l.name));function une(t){return typeof t==\"string\"?!!bs[t]:\"env\"in t?bs[t.env]&&bs[t.env].includes(t.includes):\"any\"in t?t.any.some(function(e){return!!bs[e]}):Object.keys(t).every(function(e){return bs[e]===t[e]})}});var ei,En,Od,gU,Hx,Ane,dU,mU,jx=It(()=>{(function(t){t.StartOfInput=\"\\0\",t.EndOfInput=\"\u0001\",t.EndOfPartialInput=\"\u0002\"})(ei||(ei={}));(function(t){t[t.InitialNode=0]=\"InitialNode\",t[t.SuccessNode=1]=\"SuccessNode\",t[t.ErrorNode=2]=\"ErrorNode\",t[t.CustomNode=3]=\"CustomNode\"})(En||(En={}));Od=-1,gU=/^(-h|--help)(?:=([0-9]+))?$/,Hx=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,Ane=/^-[a-zA-Z]{2,}$/,dU=/^([^=]+)=([\\s\\S]*)$/,mU=process.env.DEBUG_CLI===\"1\"});var nt,IE,qx,yU,Gx=It(()=>{jx();nt=class extends Error{constructor(e){super(e),this.clipanion={type:\"usage\"},this.name=\"UsageError\"}},IE=class extends Error{constructor(e,r){if(super(),this.input=e,this.candidates=r,this.clipanion={type:\"none\"},this.name=\"UnknownSyntaxError\",this.candidates.length===0)this.message=\"Command not found, but we're not sure what's the alternative.\";else if(this.candidates.every(s=>s.reason!==null&&s.reason===r[0].reason)){let[{reason:s}]=this.candidates;this.message=`${s}\n\n${this.candidates.map(({usage:a})=>`$ ${a}`).join(`\n`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean:\n\n$ ${s}\n${yU(e)}`}else this.message=`Command not found; did you mean one of:\n\n${this.candidates.map(({usage:s},a)=>`${`${a}.`.padStart(4)} ${s}`).join(`\n`)}\n\n${yU(e)}`}},qx=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:\"none\"},this.name=\"AmbiguousSyntaxError\",this.message=`Cannot find which to pick amongst the following alternatives:\n\n${this.usages.map((s,a)=>`${`${a}.`.padStart(4)} ${s}`).join(`\n`)}\n\n${yU(e)}`}},yU=t=>`While running ${t.filter(e=>e!==ei.EndOfInput&&e!==ei.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\\s/)||e.length===0||r!==`\"${e}\"`?r:e}).join(\" \")}`});function aZe(t){let e=t.split(`\n`),r=e.filter(a=>a.match(/\\S/)),s=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(s).trimRight()).join(`\n`)}function qo(t,{format:e,paragraphs:r}){return t=t.replace(/\\r\\n?/g,`\n`),t=aZe(t),t=t.replace(/^\\n+|\\n+$/g,\"\"),t=t.replace(/^(\\s*)-([^\\n]*?)\\n+/gm,`$1-$2\n\n`),t=t.replace(/\\n(\\n)?\\n*/g,(s,a)=>a||\" \"),r&&(t=t.split(/\\n/).map(s=>{let a=s.match(/^\\s*[*-][\\t ]+(.*)/);if(!a)return s.match(/(.{1,80})(?: |$)/g).join(`\n`);let n=s.length-s.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,\"g\")).map((c,f)=>\" \".repeat(n)+(f===0?\"- \":\"  \")+c).join(`\n`)}).join(`\n\n`)),t=t.replace(/(`+)((?:.|[\\n])*?)\\1/g,(s,a,n)=>e.code(a+n+a)),t=t.replace(/(\\*\\*)((?:.|[\\n])*?)\\1/g,(s,a,n)=>e.bold(a+n+a)),t?`${t}\n`:\"\"}var EU,pne,hne,IU=It(()=>{EU=Array(80).fill(\"\\u2501\");for(let t=0;t<=24;++t)EU[EU.length-t]=`\\x1B[38;5;${232+t}m\\u2501`;pne={header:t=>`\\x1B[1m\\u2501\\u2501\\u2501 ${t}${t.length<75?` ${EU.slice(t.length+5).join(\"\")}`:\":\"}\\x1B[0m`,bold:t=>`\\x1B[1m${t}\\x1B[22m`,error:t=>`\\x1B[31m\\x1B[1m${t}\\x1B[22m\\x1B[39m`,code:t=>`\\x1B[36m${t}\\x1B[39m`},hne={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Ea(t){return{...t,[X2]:!0}}function Gf(t,e){return typeof t>\"u\"?[t,e]:typeof t==\"object\"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function Wx(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return\"validation failed\";let[,s,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=s!==\".\"||!e?`${s.replace(/^\\.(\\[|$)/,\"$1\")}: ${a}`:`: ${a}`,a}function $2(t,e){return e.length===1?new nt(`${t}${Wx(e[0],{mergeName:!0})}`):new nt(`${t}:\n${e.map(r=>`\n- ${Wx(r)}`).join(\"\")}`)}function Ld(t,e,r){if(typeof r>\"u\")return e;let s=[],a=[],n=f=>{let p=e;return e=f,n.bind(null,p)};if(!r(e,{errors:s,coercions:a,coercion:n}))throw $2(`Invalid value for ${t}`,s);for(let[,f]of a)f();return e}var X2,Bp=It(()=>{Gx();X2=Symbol(\"clipanion/isOption\")});var Ia={};Vt(Ia,{KeyRelationship:()=>Wf,TypeAssertionError:()=>c0,applyCascade:()=>rB,as:()=>DZe,assert:()=>BZe,assertWithErrors:()=>vZe,cascade:()=>Jx,fn:()=>bZe,hasAtLeastOneKey:()=>bU,hasExactLength:()=>Ene,hasForbiddenKeys:()=>YZe,hasKeyRelationship:()=>iB,hasMaxLength:()=>xZe,hasMinLength:()=>PZe,hasMutuallyExclusiveKeys:()=>VZe,hasRequiredKeys:()=>WZe,hasUniqueItems:()=>kZe,isArray:()=>Yx,isAtLeast:()=>SU,isAtMost:()=>RZe,isBase64:()=>HZe,isBoolean:()=>gZe,isDate:()=>mZe,isDict:()=>IZe,isEnum:()=>Ao,isHexColor:()=>UZe,isISO8601:()=>_Ze,isInExclusiveRange:()=>NZe,isInInclusiveRange:()=>FZe,isInstanceOf:()=>wZe,isInteger:()=>DU,isJSON:()=>jZe,isLiteral:()=>dne,isLowerCase:()=>OZe,isMap:()=>EZe,isNegative:()=>QZe,isNullable:()=>GZe,isNumber:()=>BU,isObject:()=>mne,isOneOf:()=>vU,isOptional:()=>qZe,isPartial:()=>CZe,isPayload:()=>dZe,isPositive:()=>TZe,isRecord:()=>Kx,isSet:()=>yZe,isString:()=>wE,isTuple:()=>Vx,isUUID4:()=>MZe,isUnknown:()=>wU,isUpperCase:()=>LZe,makeTrait:()=>yne,makeValidator:()=>Wr,matchesRegExp:()=>tB,softAssert:()=>SZe});function ti(t){return t===null?\"null\":t===void 0?\"undefined\":t===\"\"?\"an empty string\":typeof t==\"symbol\"?`<${t.toString()}>`:Array.isArray(t)?\"an array\":JSON.stringify(t)}function CE(t,e){if(t.length===0)return\"nothing\";if(t.length===1)return ti(t[0]);let r=t.slice(0,-1),s=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>ti(n)).join(\", \")}${a}${ti(s)}`}function l0(t,e){var r,s,a;return typeof e==\"number\"?`${(r=t?.p)!==null&&r!==void 0?r:\".\"}[${e}]`:lZe.test(e)?`${(s=t?.p)!==null&&s!==void 0?s:\"\"}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:\".\"}[${JSON.stringify(e)}]`}function CU(t,e,r){return t===1?e:r}function mr({errors:t,p:e}={},r){return t?.push(`${e??\".\"}: ${r}`),!1}function pZe(t,e){return r=>{t[e]=r}}function Yf(t,e){return r=>{let s=t[e];return t[e]=r,Yf(t,e).bind(null,s)}}function eB(t,e,r){let s=()=>(t(r()),a),a=()=>(t(e),s);return s}function wU(){return Wr({test:(t,e)=>!0})}function dne(t){return Wr({test:(e,r)=>e!==t?mr(r,`Expected ${ti(t)} (got ${ti(e)})`):!0})}function wE(){return Wr({test:(t,e)=>typeof t!=\"string\"?mr(e,`Expected a string (got ${ti(t)})`):!0})}function Ao(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a==\"string\"||typeof a==\"number\"),s=new Set(e);return s.size===1?dne([...s][0]):Wr({test:(a,n)=>s.has(a)?!0:r?mr(n,`Expected one of ${CE(e,\"or\")} (got ${ti(a)})`):mr(n,`Expected a valid enumeration value (got ${ti(a)})`)})}function gZe(){return Wr({test:(t,e)=>{var r;if(typeof t!=\"boolean\"){if(typeof e?.coercions<\"u\"){if(typeof e?.coercion>\"u\")return mr(e,\"Unbound coercion result\");let s=hZe.get(t);if(typeof s<\"u\")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:\".\",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a boolean (got ${ti(t)})`)}return!0}})}function BU(){return Wr({test:(t,e)=>{var r;if(typeof t!=\"number\"){if(typeof e?.coercions<\"u\"){if(typeof e?.coercion>\"u\")return mr(e,\"Unbound coercion result\");let s;if(typeof t==\"string\"){let a;try{a=JSON.parse(t)}catch{}if(typeof a==\"number\")if(JSON.stringify(a)===t)s=a;else return mr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof s<\"u\")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:\".\",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a number (got ${ti(t)})`)}return!0}})}function dZe(t){return Wr({test:(e,r)=>{var s;if(typeof r?.coercions>\"u\")return mr(r,\"The isPayload predicate can only be used with coercion enabled\");if(typeof r.coercion>\"u\")return mr(r,\"Unbound coercion result\");if(typeof e!=\"string\")return mr(r,`Expected a string (got ${ti(e)})`);let a;try{a=JSON.parse(e)}catch{return mr(r,`Expected a JSON string (got ${ti(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Yf(n,\"value\")}))?(r.coercions.push([(s=r.p)!==null&&s!==void 0?s:\".\",r.coercion.bind(null,n.value)]),!0):!1}})}function mZe(){return Wr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof e?.coercions<\"u\"){if(typeof e?.coercion>\"u\")return mr(e,\"Unbound coercion result\");let s;if(typeof t==\"string\"&&gne.test(t))s=new Date(t);else{let a;if(typeof t==\"string\"){let n;try{n=JSON.parse(t)}catch{}typeof n==\"number\"&&(a=n)}else typeof t==\"number\"&&(a=t);if(typeof a<\"u\")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))s=new Date(a*1e3);else return mr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof s<\"u\")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:\".\",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a date (got ${ti(t)})`)}return!0}})}function Yx(t,{delimiter:e}={}){return Wr({test:(r,s)=>{var a;let n=r;if(typeof r==\"string\"&&typeof e<\"u\"&&typeof s?.coercions<\"u\"){if(typeof s?.coercion>\"u\")return mr(s,\"Unbound coercion result\");r=r.split(e)}if(!Array.isArray(r))return mr(s,`Expected an array (got ${ti(r)})`);let c=!0;for(let f=0,p=r.length;f<p&&(c=t(r[f],Object.assign(Object.assign({},s),{p:l0(s,f),coercion:Yf(r,f)}))&&c,!(!c&&s?.errors==null));++f);return r!==n&&s.coercions.push([(a=s.p)!==null&&a!==void 0?a:\".\",s.coercion.bind(null,r)]),c}})}function yZe(t,{delimiter:e}={}){let r=Yx(t,{delimiter:e});return Wr({test:(s,a)=>{var n,c;if(Object.getPrototypeOf(s).toString()===\"[object Set]\")if(typeof a?.coercions<\"u\"){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");let f=[...s],p=[...s];if(!r(p,Object.assign(Object.assign({},a),{coercion:void 0})))return!1;let h=()=>p.some((E,C)=>E!==f[C])?new Set(p):s;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",eB(a.coercion,s,h)]),!0}else{let f=!0;for(let p of s)if(f=t(p,Object.assign({},a))&&f,!f&&a?.errors==null)break;return f}if(typeof a?.coercions<\"u\"){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");let f={value:s};return r(s,Object.assign(Object.assign({},a),{coercion:Yf(f,\"value\")}))?(a.coercions.push([(c=a.p)!==null&&c!==void 0?c:\".\",eB(a.coercion,s,()=>new Set(f.value))]),!0):!1}return mr(a,`Expected a set (got ${ti(s)})`)}})}function EZe(t,e){let r=Yx(Vx([t,e])),s=Kx(e,{keys:t});return Wr({test:(a,n)=>{var c,f,p;if(Object.getPrototypeOf(a).toString()===\"[object Map]\")if(typeof n?.coercions<\"u\"){if(typeof n?.coercion>\"u\")return mr(n,\"Unbound coercion result\");let h=[...a],E=[...a];if(!r(E,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let C=()=>E.some((S,P)=>S[0]!==h[P][0]||S[1]!==h[P][1])?new Map(E):a;return n.coercions.push([(c=n.p)!==null&&c!==void 0?c:\".\",eB(n.coercion,a,C)]),!0}else{let h=!0;for(let[E,C]of a)if(h=t(E,Object.assign({},n))&&h,!h&&n?.errors==null||(h=e(C,Object.assign(Object.assign({},n),{p:l0(n,E)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<\"u\"){if(typeof n?.coercion>\"u\")return mr(n,\"Unbound coercion result\");let h={value:a};return Array.isArray(a)?r(a,Object.assign(Object.assign({},n),{coercion:void 0}))?(n.coercions.push([(f=n.p)!==null&&f!==void 0?f:\".\",eB(n.coercion,a,()=>new Map(h.value))]),!0):!1:s(a,Object.assign(Object.assign({},n),{coercion:Yf(h,\"value\")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:\".\",eB(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return mr(n,`Expected a map (got ${ti(a)})`)}})}function Vx(t,{delimiter:e}={}){let r=Ene(t.length);return Wr({test:(s,a)=>{var n;if(typeof s==\"string\"&&typeof e<\"u\"&&typeof a?.coercions<\"u\"){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");s=s.split(e),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",a.coercion.bind(null,s)])}if(!Array.isArray(s))return mr(a,`Expected a tuple (got ${ti(s)})`);let c=r(s,Object.assign({},a));for(let f=0,p=s.length;f<p&&f<t.length&&(c=t[f](s[f],Object.assign(Object.assign({},a),{p:l0(a,f),coercion:Yf(s,f)}))&&c,!(!c&&a?.errors==null));++f);return c}})}function Kx(t,{keys:e=null}={}){let r=Yx(Vx([e??wE(),t]));return Wr({test:(s,a)=>{var n;if(Array.isArray(s)&&typeof a?.coercions<\"u\")return typeof a?.coercion>\"u\"?mr(a,\"Unbound coercion result\"):r(s,Object.assign(Object.assign({},a),{coercion:void 0}))?(s=Object.fromEntries(s),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",a.coercion.bind(null,s)]),!0):!1;if(typeof s!=\"object\"||s===null)return mr(a,`Expected an object (got ${ti(s)})`);let c=Object.keys(s),f=!0;for(let p=0,h=c.length;p<h&&(f||a?.errors!=null);++p){let E=c[p],C=s[E];if(E===\"__proto__\"||E===\"constructor\"){f=mr(Object.assign(Object.assign({},a),{p:l0(a,E)}),\"Unsafe property name\");continue}if(e!==null&&!e(E,a)){f=!1;continue}if(!t(C,Object.assign(Object.assign({},a),{p:l0(a,E),coercion:Yf(s,E)}))){f=!1;continue}}return f}})}function IZe(t,e={}){return Kx(t,e)}function mne(t,{extra:e=null}={}){let r=Object.keys(t),s=Wr({test:(a,n)=>{if(typeof a!=\"object\"||a===null)return mr(n,`Expected an object (got ${ti(a)})`);let c=new Set([...r,...Object.keys(a)]),f={},p=!0;for(let h of c){if(h===\"constructor\"||h===\"__proto__\")p=mr(Object.assign(Object.assign({},n),{p:l0(n,h)}),\"Unsafe property name\");else{let E=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0,C=Object.prototype.hasOwnProperty.call(a,h)?a[h]:void 0;typeof E<\"u\"?p=E(C,Object.assign(Object.assign({},n),{p:l0(n,h),coercion:Yf(a,h)}))&&p:e===null?p=mr(Object.assign(Object.assign({},n),{p:l0(n,h)}),`Extraneous property (got ${ti(C)})`):Object.defineProperty(f,h,{enumerable:!0,get:()=>C,set:pZe(a,h)})}if(!p&&n?.errors==null)break}return e!==null&&(p||n?.errors!=null)&&(p=e(f,n)&&p),p}});return Object.assign(s,{properties:t})}function CZe(t){return mne(t,{extra:Kx(wU())})}function yne(t){return()=>t}function Wr({test:t}){return yne(t)()}function BZe(t,e){if(!e(t))throw new c0}function vZe(t,e){let r=[];if(!e(t,{errors:r}))throw new c0({errors:r})}function SZe(t,e){}function DZe(t,e,{coerce:r=!1,errors:s,throw:a}={}){let n=s?[]:void 0;if(!r){if(e(t,{errors:n}))return a?t:{value:t,errors:void 0};if(a)throw new c0({errors:n});return{value:void 0,errors:n??!0}}let c={value:t},f=Yf(c,\"value\"),p=[];if(!e(t,{errors:n,coercion:f,coercions:p})){if(a)throw new c0({errors:n});return{value:void 0,errors:n??!0}}for(let[,h]of p)h();return a?c.value:{value:c.value,errors:void 0}}function bZe(t,e){let r=Vx(t);return(...s)=>{if(!r(s))throw new c0;return e(...s)}}function PZe(t){return Wr({test:(e,r)=>e.length>=t?!0:mr(r,`Expected to have a length of at least ${t} elements (got ${e.length})`)})}function xZe(t){return Wr({test:(e,r)=>e.length<=t?!0:mr(r,`Expected to have a length of at most ${t} elements (got ${e.length})`)})}function Ene(t){return Wr({test:(e,r)=>e.length!==t?mr(r,`Expected to have a length of exactly ${t} elements (got ${e.length})`):!0})}function kZe({map:t}={}){return Wr({test:(e,r)=>{let s=new Set,a=new Set;for(let n=0,c=e.length;n<c;++n){let f=e[n],p=typeof t<\"u\"?t(f):f;if(s.has(p)){if(a.has(p))continue;mr(r,`Expected to contain unique elements; got a duplicate with ${ti(e)}`),a.add(p)}else s.add(p)}return a.size===0}})}function QZe(){return Wr({test:(t,e)=>t<=0?!0:mr(e,`Expected to be negative (got ${t})`)})}function TZe(){return Wr({test:(t,e)=>t>=0?!0:mr(e,`Expected to be positive (got ${t})`)})}function SU(t){return Wr({test:(e,r)=>e>=t?!0:mr(r,`Expected to be at least ${t} (got ${e})`)})}function RZe(t){return Wr({test:(e,r)=>e<=t?!0:mr(r,`Expected to be at most ${t} (got ${e})`)})}function FZe(t,e){return Wr({test:(r,s)=>r>=t&&r<=e?!0:mr(s,`Expected to be in the [${t}; ${e}] range (got ${r})`)})}function NZe(t,e){return Wr({test:(r,s)=>r>=t&&r<e?!0:mr(s,`Expected to be in the [${t}; ${e}[ range (got ${r})`)})}function DU({unsafe:t=!1}={}){return Wr({test:(e,r)=>e!==Math.round(e)?mr(r,`Expected to be an integer (got ${e})`):!t&&!Number.isSafeInteger(e)?mr(r,`Expected to be a safe integer (got ${e})`):!0})}function tB(t){return Wr({test:(e,r)=>t.test(e)?!0:mr(r,`Expected to match the pattern ${t.toString()} (got ${ti(e)})`)})}function OZe(){return Wr({test:(t,e)=>t!==t.toLowerCase()?mr(e,`Expected to be all-lowercase (got ${t})`):!0})}function LZe(){return Wr({test:(t,e)=>t!==t.toUpperCase()?mr(e,`Expected to be all-uppercase (got ${t})`):!0})}function MZe(){return Wr({test:(t,e)=>AZe.test(t)?!0:mr(e,`Expected to be a valid UUID v4 (got ${ti(t)})`)})}function _Ze(){return Wr({test:(t,e)=>gne.test(t)?!0:mr(e,`Expected to be a valid ISO 8601 date string (got ${ti(t)})`)})}function UZe({alpha:t=!1}){return Wr({test:(e,r)=>(t?cZe.test(e):uZe.test(e))?!0:mr(r,`Expected to be a valid hexadecimal color string (got ${ti(e)})`)})}function HZe(){return Wr({test:(t,e)=>fZe.test(t)?!0:mr(e,`Expected to be a valid base 64 string (got ${ti(t)})`)})}function jZe(t=wU()){return Wr({test:(e,r)=>{let s;try{s=JSON.parse(e)}catch{return mr(r,`Expected to be a valid JSON string (got ${ti(e)})`)}return t(s,r)}})}function Jx(t,...e){let r=Array.isArray(e[0])?e[0]:e;return Wr({test:(s,a)=>{var n,c;let f={value:s},p=typeof a?.coercions<\"u\"?Yf(f,\"value\"):void 0,h=typeof a?.coercions<\"u\"?[]:void 0;if(!t(s,Object.assign(Object.assign({},a),{coercion:p,coercions:h})))return!1;let E=[];if(typeof h<\"u\")for(let[,C]of h)E.push(C());try{if(typeof a?.coercions<\"u\"){if(f.value!==s){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",a.coercion.bind(null,f.value)])}(c=a?.coercions)===null||c===void 0||c.push(...h)}return r.every(C=>C(f.value,a))}finally{for(let C of E)C()}}})}function rB(t,...e){let r=Array.isArray(e[0])?e[0]:e;return Jx(t,r)}function qZe(t){return Wr({test:(e,r)=>typeof e>\"u\"?!0:t(e,r)})}function GZe(t){return Wr({test:(e,r)=>e===null?!0:t(e,r)})}function WZe(t,e){var r;let s=new Set(t),a=nB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)||p.push(h);return p.length>0?mr(c,`Missing required ${CU(p.length,\"property\",\"properties\")} ${CE(p,\"and\")}`):!0}})}function bU(t,e){var r;let s=new Set(t),a=nB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>Object.keys(n).some(h=>a(s,h,n))?!0:mr(c,`Missing at least one property from ${CE(Array.from(s),\"or\")}`)})}function YZe(t,e){var r;let s=new Set(t),a=nB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>0?mr(c,`Forbidden ${CU(p.length,\"property\",\"properties\")} ${CE(p,\"and\")}`):!0}})}function VZe(t,e){var r;let s=new Set(t),a=nB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>1?mr(c,`Mutually exclusive properties ${CE(p,\"and\")}`):!0}})}function iB(t,e,r,s){var a,n;let c=new Set((a=s?.ignore)!==null&&a!==void 0?a:[]),f=nB[(n=s?.missingIf)!==null&&n!==void 0?n:\"missing\"],p=new Set(r),h=KZe[e],E=e===Wf.Forbids?\"or\":\"and\";return Wr({test:(C,S)=>{let P=new Set(Object.keys(C));if(!f(P,t,C)||c.has(C[t]))return!0;let I=[];for(let R of p)(f(P,R,C)&&!c.has(C[R]))!==h.expect&&I.push(R);return I.length>=1?mr(S,`Property \"${t}\" ${h.message} ${CU(I.length,\"property\",\"properties\")} ${CE(I,E)}`):!0}})}var lZe,cZe,uZe,fZe,AZe,gne,hZe,wZe,vU,c0,nB,Wf,KZe,Ul=It(()=>{lZe=/^[a-zA-Z_][a-zA-Z0-9_]*$/;cZe=/^#[0-9a-f]{6}$/i,uZe=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,fZe=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,AZe=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,gne=/^(?:[1-9]\\d{3}(-?)(?:(?:0[1-9]|1[0-2])\\1(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])\\1(?:29|30)|(?:0[13578]|1[02])(?:\\1)31|00[1-9]|0[1-9]\\d|[12]\\d{2}|3(?:[0-5]\\d|6[0-5]))|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\\2)29|-?366))T(?:[01]\\d|2[0-3])(:?)[0-5]\\d(?:\\3[0-5]\\d)?(?:Z|[+-][01]\\d(?:\\3[0-5]\\d)?)$/;hZe=new Map([[\"true\",!0],[\"True\",!0],[\"1\",!0],[1,!0],[\"false\",!1],[\"False\",!1],[\"0\",!1],[0,!1]]);wZe=t=>Wr({test:(e,r)=>e instanceof t?!0:mr(r,`Expected an instance of ${t.name} (got ${ti(e)})`)}),vU=(t,{exclusive:e=!1}={})=>Wr({test:(r,s)=>{var a,n,c;let f=[],p=typeof s?.errors<\"u\"?[]:void 0;for(let h=0,E=t.length;h<E;++h){let C=typeof s?.errors<\"u\"?[]:void 0,S=typeof s?.coercions<\"u\"?[]:void 0;if(t[h](r,Object.assign(Object.assign({},s),{errors:C,coercions:S,p:`${(a=s?.p)!==null&&a!==void 0?a:\".\"}#${h+1}`}))){if(f.push([`#${h+1}`,S]),!e)break}else p?.push(C[0])}if(f.length===1){let[,h]=f[0];return typeof h<\"u\"&&((n=s?.coercions)===null||n===void 0||n.push(...h)),!0}return f.length>1?mr(s,`Expected to match exactly a single predicate (matched ${f.join(\", \")})`):(c=s?.errors)===null||c===void 0||c.push(...p),!1}});c0=class extends Error{constructor({errors:e}={}){let r=\"Type mismatch\";if(e&&e.length>0){r+=`\n`;for(let s of e)r+=`\n- ${s}`}super(r)}};nB={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<\"u\",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids=\"Forbids\",t.Requires=\"Requires\"})(Wf||(Wf={}));KZe={[Wf.Forbids]:{expect:!1,message:\"forbids using\"},[Wf.Requires]:{expect:!0,message:\"requires using\"}}});var ot,u0=It(()=>{Bp();ot=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:c}=await Promise.resolve().then(()=>(Ul(),Ia)),f=c(a(n()),r),p=[],h=[];if(!f(this,{errors:p,coercions:h}))throw $2(\"Invalid option schema\",p);for(let[,C]of h)C()}else if(r!=null)throw new Error(\"Invalid command schema\");let s=await this.execute();return typeof s<\"u\"?s:0}};ot.isOption=X2;ot.Default=[]});function sl(t){mU&&console.log(t)}function Cne(){let t={nodes:[]};for(let e=0;e<En.CustomNode;++e)t.nodes.push(Hl());return t}function JZe(t){let e=Cne(),r=[],s=e.nodes.length;for(let a of t){r.push(s);for(let n=0;n<a.nodes.length;++n)Bne(n)||e.nodes.push(nXe(a.nodes[n],s));s+=a.nodes.length-En.CustomNode+1}for(let a of r)BE(e,En.InitialNode,a);return e}function Mu(t,e){return t.nodes.push(e),t.nodes.length-1}function zZe(t){let e=new Set,r=s=>{if(e.has(s))return;e.add(s);let a=t.nodes[s];for(let c of Object.values(a.statics))for(let{to:f}of c)r(f);for(let[,{to:c}]of a.dynamics)r(c);for(let{to:c}of a.shortcuts)r(c);let n=new Set(a.shortcuts.map(({to:c})=>c));for(;a.shortcuts.length>0;){let{to:c}=a.shortcuts.shift(),f=t.nodes[c];for(let[p,h]of Object.entries(f.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let C of h)E.some(({to:S})=>C.to===S)||E.push(C)}for(let[p,h]of f.dynamics)a.dynamics.some(([E,{to:C}])=>p===E&&h.to===C)||a.dynamics.push([p,h]);for(let p of f.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(En.InitialNode)}function ZZe(t,{prefix:e=\"\"}={}){if(mU){sl(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)sl(`${e}  ${r}: ${JSON.stringify(t.nodes[r])}`)}}function XZe(t,e,r=!1){sl(`Running a vm on ${JSON.stringify(e)}`);let s=[{node:En.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];ZZe(t,{prefix:\"  \"});let a=[ei.StartOfInput,...e];for(let n=0;n<a.length;++n){let c=a[n],f=c===ei.EndOfInput||c===ei.EndOfPartialInput,p=n-1;sl(`  Processing ${JSON.stringify(c)}`);let h=[];for(let{node:E,state:C}of s){sl(`    Current node is ${E}`);let S=t.nodes[E];if(E===En.ErrorNode){h.push({node:E,state:C});continue}console.assert(S.shortcuts.length===0,\"Shortcuts should have been eliminated by now\");let P=Object.prototype.hasOwnProperty.call(S.statics,c);if(!r||n<a.length-1||P)if(P){let I=S.statics[c];for(let{to:R,reducer:N}of I)h.push({node:R,state:typeof N<\"u\"?zx(xU,N,C,c,p):C}),sl(`      Static transition to ${R} found`)}else sl(\"      No static transition found\");else{let I=!1;for(let R of Object.keys(S.statics))if(R.startsWith(c)){if(c===R)for(let{to:N,reducer:U}of S.statics[R])h.push({node:N,state:typeof U<\"u\"?zx(xU,U,C,c,p):C}),sl(`      Static transition to ${N} found`);else for(let{to:N}of S.statics[R])h.push({node:N,state:{...C,remainder:R.slice(c.length)}}),sl(`      Static transition to ${N} found (partial match)`);I=!0}I||sl(\"      No partial static transition found\")}if(!f)for(let[I,{to:R,reducer:N}]of S.dynamics)zx(iXe,I,C,c,p)&&(h.push({node:R,state:typeof N<\"u\"?zx(xU,N,C,c,p):C}),sl(`      Dynamic transition to ${R} found (via ${I})`))}if(h.length===0&&f&&e.length===1)return[{node:En.InitialNode,state:Ine}];if(h.length===0)throw new IE(e,s.filter(({node:E})=>E!==En.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===En.ErrorNode))throw new IE(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));s=eXe(h)}if(s.length>0){sl(\"  Results:\");for(let n of s)sl(`    - ${n.node} -> ${JSON.stringify(n.state)}`)}else sl(\"  No results\");return s}function $Ze(t,e,{endToken:r=ei.EndOfInput}={}){let s=XZe(t,[...e,r]);return tXe(e,s.map(({state:a})=>a))}function eXe(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function tXe(t,e){let r=e.filter(S=>S.selectedIndex!==null),s=r.filter(S=>!S.partial);if(s.length>0&&(r=s),r.length===0)throw new Error;let a=r.filter(S=>S.selectedIndex===Od||S.requiredOptions.every(P=>P.some(I=>S.options.find(R=>R.name===I))));if(a.length===0)throw new IE(t,r.map(S=>({usage:S.candidateUsage,reason:null})));let n=0;for(let S of a)S.path.length>n&&(n=S.path.length);let c=a.filter(S=>S.path.length===n),f=S=>S.positionals.filter(({extra:P})=>!P).length+S.options.length,p=c.map(S=>({state:S,positionalCount:f(S)})),h=0;for(let{positionalCount:S}of p)S>h&&(h=S);let E=p.filter(({positionalCount:S})=>S===h).map(({state:S})=>S),C=rXe(E);if(C.length>1)throw new qx(t,C.map(S=>S.candidateUsage));return C[0]}function rXe(t){let e=[],r=[];for(let s of t)s.selectedIndex===Od?r.push(s):e.push(s);return r.length>0&&e.push({...Ine,path:wne(...r.map(s=>s.path)),options:r.reduce((s,a)=>s.concat(a.options),[])}),e}function wne(t,e,...r){return e===void 0?Array.from(t):wne(t.filter((s,a)=>s===e[a]),...r)}function Hl(){return{dynamics:[],shortcuts:[],statics:{}}}function Bne(t){return t===En.SuccessNode||t===En.ErrorNode}function PU(t,e=0){return{to:Bne(t.to)?t.to:t.to>=En.CustomNode?t.to+e-En.CustomNode+1:t.to+e,reducer:t.reducer}}function nXe(t,e=0){let r=Hl();for(let[s,a]of t.dynamics)r.dynamics.push([s,PU(a,e)]);for(let s of t.shortcuts)r.shortcuts.push(PU(s,e));for(let[s,a]of Object.entries(t.statics))r.statics[s]=a.map(n=>PU(n,e));return r}function js(t,e,r,s,a){t.nodes[e].dynamics.push([r,{to:s,reducer:a}])}function BE(t,e,r,s){t.nodes[e].shortcuts.push({to:r,reducer:s})}function Ca(t,e,r,s,a){(Object.prototype.hasOwnProperty.call(t.nodes[e].statics,r)?t.nodes[e].statics[r]:t.nodes[e].statics[r]=[]).push({to:s,reducer:a})}function zx(t,e,r,s,a){if(Array.isArray(e)){let[n,...c]=e;return t[n](r,s,a,...c)}else return t[e](r,s,a)}var Ine,iXe,xU,jl,kU,Zx,Xx=It(()=>{jx();Gx();Ine={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:Od,partial:!1,tokens:[]};iXe={always:()=>!0,isOptionLike:(t,e)=>!t.ignoreOptions&&e!==\"-\"&&e.startsWith(\"-\"),isNotOptionLike:(t,e)=>t.ignoreOptions||e===\"-\"||!e.startsWith(\"-\"),isOption:(t,e,r,s)=>!t.ignoreOptions&&e===s,isBatchOption:(t,e,r,s)=>!t.ignoreOptions&&Ane.test(e)&&[...e.slice(1)].every(a=>s.has(`-${a}`)),isBoundOption:(t,e,r,s,a)=>{let n=e.match(dU);return!t.ignoreOptions&&!!n&&Hx.test(n[1])&&s.has(n[1])&&a.filter(c=>c.nameSet.includes(n[1])).every(c=>c.allowBinding)},isNegatedOption:(t,e,r,s)=>!t.ignoreOptions&&e===`--no-${s.slice(2)}`,isHelp:(t,e)=>!t.ignoreOptions&&gU.test(e),isUnsupportedOption:(t,e,r,s)=>!t.ignoreOptions&&e.startsWith(\"-\")&&Hx.test(e)&&!s.has(e),isInvalidOption:(t,e)=>!t.ignoreOptions&&e.startsWith(\"-\")&&!Hx.test(e)},xU={setCandidateState:(t,e,r,s)=>({...t,...s}),setSelectedIndex:(t,e,r,s)=>({...t,selectedIndex:s}),setPartialIndex:(t,e,r,s)=>({...t,selectedIndex:s,partial:!0}),pushBatch:(t,e,r,s)=>{let a=t.options.slice(),n=t.tokens.slice();for(let c=1;c<e.length;++c){let f=s.get(`-${e[c]}`),p=c===1?[0,2]:[c,c+1];a.push({name:f,value:!0}),n.push({segmentIndex:r,type:\"option\",option:f,slice:p})}return{...t,options:a,tokens:n}},pushBound:(t,e,r)=>{let[,s,a]=e.match(dU),n=t.options.concat({name:s,value:a}),c=t.tokens.concat([{segmentIndex:r,type:\"option\",slice:[0,s.length],option:s},{segmentIndex:r,type:\"assign\",slice:[s.length,s.length+1]},{segmentIndex:r,type:\"value\",slice:[s.length+1,s.length+a.length+1]}]);return{...t,options:n,tokens:c}},pushPath:(t,e,r)=>{let s=t.path.concat(e),a=t.tokens.concat({segmentIndex:r,type:\"path\"});return{...t,path:s,tokens:a}},pushPositional:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!1}),a=t.tokens.concat({segmentIndex:r,type:\"positional\"});return{...t,positionals:s,tokens:a}},pushExtra:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!0}),a=t.tokens.concat({segmentIndex:r,type:\"positional\"});return{...t,positionals:s,tokens:a}},pushExtraNoLimits:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:jl}),a=t.tokens.concat({segmentIndex:r,type:\"positional\"});return{...t,positionals:s,tokens:a}},pushTrue:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!0}),n=t.tokens.concat({segmentIndex:r,type:\"option\",option:s});return{...t,options:a,tokens:n}},pushFalse:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!1}),n=t.tokens.concat({segmentIndex:r,type:\"option\",option:s});return{...t,options:a,tokens:n}},pushUndefined:(t,e,r,s)=>{let a=t.options.concat({name:e,value:void 0}),n=t.tokens.concat({segmentIndex:r,type:\"option\",option:e});return{...t,options:a,tokens:n}},pushStringValue:(t,e,r)=>{var s;let a=t.options[t.options.length-1],n=t.options.slice(),c=t.tokens.concat({segmentIndex:r,type:\"value\"});return a.value=((s=a.value)!==null&&s!==void 0?s:[]).concat([e]),{...t,options:n,tokens:c}},setStringValue:(t,e,r)=>{let s=t.options[t.options.length-1],a=t.options.slice(),n=t.tokens.concat({segmentIndex:r,type:\"value\"});return s.value=e,{...t,options:a,tokens:n}},inhibateOptions:t=>({...t,ignoreOptions:!0}),useHelp:(t,e,r,s)=>{let[,,a]=e.match(gU);return typeof a<\"u\"?{...t,options:[{name:\"-c\",value:String(s)},{name:\"-i\",value:a}]}:{...t,options:[{name:\"-c\",value:String(s)}]}},setError:(t,e,r,s)=>e===ei.EndOfInput||e===ei.EndOfPartialInput?{...t,errorMessage:`${s}.`}:{...t,errorMessage:`${s} (\"${e}\").`},setOptionArityError:(t,e)=>{let r=t.options[t.options.length-1];return{...t,errorMessage:`Not enough arguments to option ${r.name}.`}}},jl=Symbol(),kU=class{constructor(e,r){this.allOptionNames=new Map,this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=r}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:r=this.arity.trailing,extra:s=this.arity.extra,proxy:a=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:r,extra:s,proxy:a})}addPositional({name:e=\"arg\",required:r=!0}={}){if(!r&&this.arity.extra===jl)throw new Error(\"Optional parameters cannot be declared when using .rest() or .proxy()\");if(!r&&this.arity.trailing.length>0)throw new Error(\"Optional parameters cannot be declared after the required trailing positional arguments\");!r&&this.arity.extra!==jl?this.arity.extra.push(e):this.arity.extra!==jl&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e=\"arg\",required:r=0}={}){if(this.arity.extra===jl)throw new Error(\"Infinite lists cannot be declared multiple times in the same command\");if(this.arity.trailing.length>0)throw new Error(\"Infinite lists cannot be declared after the required trailing positional arguments\");for(let s=0;s<r;++s)this.addPositional({name:e});this.arity.extra=jl}addProxy({required:e=0}={}){this.addRest({required:e}),this.arity.proxy=!0}addOption({names:e,description:r,arity:s=0,hidden:a=!1,required:n=!1,allowBinding:c=!0}){if(!c&&s>1)throw new Error(\"The arity cannot be higher than 1 when the option only supports the --arg=value syntax\");if(!Number.isInteger(s))throw new Error(`The arity must be an integer, got ${s}`);if(s<0)throw new Error(`The arity must be positive, got ${s}`);let f=e.reduce((p,h)=>h.length>p.length?h:p,\"\");for(let p of e)this.allOptionNames.set(p,f);this.options.push({preferredName:f,nameSet:e,description:r,arity:s,hidden:a,required:n,allowBinding:c})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:r=!0}={}){let s=[this.cliOpts.binaryName],a=[];if(this.paths.length>0&&s.push(...this.paths[0]),e){for(let{preferredName:c,nameSet:f,arity:p,hidden:h,description:E,required:C}of this.options){if(h)continue;let S=[];for(let I=0;I<p;++I)S.push(` #${I}`);let P=`${f.join(\",\")}${S.join(\"\")}`;!r&&E?a.push({preferredName:c,nameSet:f,definition:P,description:E,required:C}):s.push(C?`<${P}>`:`[${P}]`)}s.push(...this.arity.leading.map(c=>`<${c}>`)),this.arity.extra===jl?s.push(\"...\"):s.push(...this.arity.extra.map(c=>`[${c}]`)),s.push(...this.arity.trailing.map(c=>`<${c}>`))}return{usage:s.join(\" \"),options:a}}compile(){if(typeof this.context>\"u\")throw new Error(\"Assertion failed: No context attached\");let e=Cne(),r=En.InitialNode,s=this.usage().usage,a=this.options.filter(f=>f.required).map(f=>f.nameSet);r=Mu(e,Hl()),Ca(e,En.InitialNode,ei.StartOfInput,r,[\"setCandidateState\",{candidateUsage:s,requiredOptions:a}]);let n=this.arity.proxy?\"always\":\"isNotOptionLike\",c=this.paths.length>0?this.paths:[[]];for(let f of c){let p=r;if(f.length>0){let S=Mu(e,Hl());BE(e,p,S),this.registerOptions(e,S),p=S}for(let S=0;S<f.length;++S){let P=Mu(e,Hl());Ca(e,p,f[S],P,\"pushPath\"),p=P}if(this.arity.leading.length>0||!this.arity.proxy){let S=Mu(e,Hl());js(e,p,\"isHelp\",S,[\"useHelp\",this.cliIndex]),js(e,S,\"always\",S,\"pushExtra\"),Ca(e,S,ei.EndOfInput,En.SuccessNode,[\"setSelectedIndex\",Od]),this.registerOptions(e,p)}this.arity.leading.length>0&&(Ca(e,p,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ca(e,p,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex]));let h=p;for(let S=0;S<this.arity.leading.length;++S){let P=Mu(e,Hl());(!this.arity.proxy||S+1!==this.arity.leading.length)&&this.registerOptions(e,P),(this.arity.trailing.length>0||S+1!==this.arity.leading.length)&&(Ca(e,P,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ca(e,P,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex])),js(e,h,\"isNotOptionLike\",P,\"pushPositional\"),h=P}let E=h;if(this.arity.extra===jl||this.arity.extra.length>0){let S=Mu(e,Hl());if(BE(e,h,S),this.arity.extra===jl){let P=Mu(e,Hl());this.arity.proxy||this.registerOptions(e,P),js(e,h,n,P,\"pushExtraNoLimits\"),js(e,P,n,P,\"pushExtraNoLimits\"),BE(e,P,S)}else for(let P=0;P<this.arity.extra.length;++P){let I=Mu(e,Hl());(!this.arity.proxy||P>0)&&this.registerOptions(e,I),js(e,E,n,I,\"pushExtra\"),BE(e,I,S),E=I}E=S}this.arity.trailing.length>0&&(Ca(e,E,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ca(e,E,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex]));let C=E;for(let S=0;S<this.arity.trailing.length;++S){let P=Mu(e,Hl());this.arity.proxy||this.registerOptions(e,P),S+1<this.arity.trailing.length&&(Ca(e,P,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ca(e,P,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex])),js(e,C,\"isNotOptionLike\",P,\"pushPositional\"),C=P}js(e,C,n,En.ErrorNode,[\"setError\",\"Extraneous positional argument\"]),Ca(e,C,ei.EndOfInput,En.SuccessNode,[\"setSelectedIndex\",this.cliIndex]),Ca(e,C,ei.EndOfPartialInput,En.SuccessNode,[\"setSelectedIndex\",this.cliIndex])}return{machine:e,context:this.context}}registerOptions(e,r){js(e,r,[\"isOption\",\"--\"],r,\"inhibateOptions\"),js(e,r,[\"isBatchOption\",this.allOptionNames],r,[\"pushBatch\",this.allOptionNames]),js(e,r,[\"isBoundOption\",this.allOptionNames,this.options],r,\"pushBound\"),js(e,r,[\"isUnsupportedOption\",this.allOptionNames],En.ErrorNode,[\"setError\",\"Unsupported option name\"]),js(e,r,[\"isInvalidOption\"],En.ErrorNode,[\"setError\",\"Invalid option name\"]);for(let s of this.options)if(s.arity===0)for(let a of s.nameSet)js(e,r,[\"isOption\",a],r,[\"pushTrue\",s.preferredName]),a.startsWith(\"--\")&&!a.startsWith(\"--no-\")&&js(e,r,[\"isNegatedOption\",a],r,[\"pushFalse\",s.preferredName]);else{let a=Mu(e,Hl());for(let n of s.nameSet)js(e,r,[\"isOption\",n],a,[\"pushUndefined\",s.preferredName]);for(let n=0;n<s.arity;++n){let c=Mu(e,Hl());Ca(e,a,ei.EndOfInput,En.ErrorNode,\"setOptionArityError\"),Ca(e,a,ei.EndOfPartialInput,En.ErrorNode,\"setOptionArityError\"),js(e,a,\"isOptionLike\",En.ErrorNode,\"setOptionArityError\");let f=s.arity===1?\"setStringValue\":\"pushStringValue\";js(e,a,\"isNotOptionLike\",c,f),a=c}BE(e,a,r)}}},Zx=class t{constructor({binaryName:e=\"...\"}={}){this.builders=[],this.opts={binaryName:e}}static build(e,r={}){return new t(r).commands(e).compile()}getBuilderByIndex(e){if(!(e>=0&&e<this.builders.length))throw new Error(`Assertion failed: Out-of-bound command index (${e})`);return this.builders[e]}commands(e){for(let r of e)r(this.command());return this}command(){let e=new kU(this.builders.length,this.opts);return this.builders.push(e),e}compile(){let e=[],r=[];for(let a of this.builders){let{machine:n,context:c}=a.compile();e.push(n),r.push(c)}let s=JZe(e);return zZe(s),{machine:s,contexts:r,process:(a,{partial:n}={})=>{let c=n?ei.EndOfPartialInput:ei.EndOfInput;return $Ze(s,a,{endToken:c})}}}}});function Sne(){return $x.default&&\"getColorDepth\"in $x.default.WriteStream.prototype?$x.default.WriteStream.prototype.getColorDepth():process.env.FORCE_COLOR===\"0\"?1:process.env.FORCE_COLOR===\"1\"||typeof process.stdout<\"u\"&&process.stdout.isTTY?8:1}function Dne(t){let e=vne;if(typeof e>\"u\"){if(t.stdout===process.stdout&&t.stderr===process.stderr)return null;let{AsyncLocalStorage:r}=ye(\"async_hooks\");e=vne=new r;let s=process.stdout._write;process.stdout._write=function(n,c,f){let p=e.getStore();return typeof p>\"u\"?s.call(this,n,c,f):p.stdout.write(n,c,f)};let a=process.stderr._write;process.stderr._write=function(n,c,f){let p=e.getStore();return typeof p>\"u\"?a.call(this,n,c,f):p.stderr.write(n,c,f)}}return r=>e.run(t,r)}var $x,vne,bne=It(()=>{$x=et(ye(\"tty\"),1)});var ek,Pne=It(()=>{u0();ek=class t extends ot{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,r){let s=new t(r);s.path=e.path;for(let a of e.options)switch(a.name){case\"-c\":s.commands.push(Number(a.value));break;case\"-i\":s.index=Number(a.value);break}return s}async execute(){let e=this.commands;if(typeof this.index<\"u\"&&this.index>=0&&this.index<e.length&&(e=[e[this.index]]),e.length===0)this.context.stdout.write(this.cli.usage());else if(e.length===1)this.context.stdout.write(this.cli.usage(this.contexts[e[0]].commandClass,{detailed:!0}));else if(e.length>1){this.context.stdout.write(`Multiple commands match your selection:\n`),this.context.stdout.write(`\n`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`\n`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.\n`)}}}});async function Qne(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=Rne(t);return wa.from(r,e).runExit(s,a)}async function Tne(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=Rne(t);return wa.from(r,e).run(s,a)}function Rne(t){let e,r,s,a;switch(typeof process<\"u\"&&typeof process.argv<\"u\"&&(s=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?s=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],s=t[2]):t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],s=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],s=t[2],a=t[3];break}if(typeof s>\"u\")throw new Error(\"The argv parameter must be provided when running Clipanion outside of a Node context\");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}}function kne(t){return t()}var xne,wa,Fne=It(()=>{jx();Xx();IU();bne();u0();Pne();xne=Symbol(\"clipanion/errorCommand\");wa=class t{constructor({binaryLabel:e,binaryName:r=\"...\",binaryVersion:s,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Zx({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=s,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let s=new t(r),a=Array.isArray(e)?e:[e];for(let n of a)s.register(n);return s}register(e){var r;let s=new Map,a=new e;for(let p in a){let h=a[p];typeof h==\"object\"&&h!==null&&h[ot.isOption]&&s.set(p,h)}let n=this.builder.command(),c=n.cliIndex,f=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof f<\"u\")for(let p of f)n.addPath(p);this.registrations.set(e,{specs:s,builder:n,index:c});for(let[p,{definition:h}]of s.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:s,context:a,partial:n}=typeof e==\"object\"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:c,process:f}=this.builder.compile(),p=f(s,{partial:n}),h={...t.defaultContext,...a};switch(p.selectedIndex){case Od:{let E=ek.from(p,c);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=c[p.selectedIndex],C=this.registrations.get(E);if(typeof C>\"u\")throw new Error(\"Assertion failed: Expected the command class to have been registered.\");let S=new E;S.context=h,S.tokens=p.tokens,S.path=p.path;try{for(let[P,{transformer:I}]of C.specs.entries())S[P]=I(C.builder,P,p,h);return S}catch(P){throw P[xne]=S,P}}break}}async run(e,r){var s,a;let n,c={...t.defaultContext,...r},f=(s=this.enableColors)!==null&&s!==void 0?s:c.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,c)}catch(E){return c.stdout.write(this.error(E,{colored:f})),1}if(n.help)return c.stdout.write(this.usage(n,{colored:f,detailed:!0})),0;n.context=c,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,C)=>this.error(E,C),format:E=>this.format(E),process:(E,C)=>this.process(E,{...c,...C}),run:(E,C)=>this.run(E,{...c,...C}),usage:(E,C)=>this.usage(E,C)};let p=this.enableCapture&&(a=Dne(c))!==null&&a!==void 0?a:kne,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return c.stdout.write(this.error(E,{colored:f,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:s}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),c=typeof e.usage.category<\"u\"?qo(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,f=typeof e.usage.description<\"u\"?qo(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<\"u\"?qo(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<\"u\"?e.usage.examples.map(([E,C])=>[qo(E,{format:this.format(r),paragraphs:!1}),C.replace(/\\$0/g,this.binaryName)]):void 0;return{path:s,usage:a,category:c,description:f,details:p,examples:h,options:n}}definitions({colored:e=!1}={}){let r=[];for(let s of this.registrations.keys()){let a=this.definition(s,{colored:e});a&&r.push(a)}return r}usage(e=null,{colored:r,detailed:s=!1,prefix:a=\"$ \"}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<\"u\";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(P=>P.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(E){e=null;continue}}e&&(s=!0)}let c=e!==null&&e instanceof ot?e.constructor:e,f=\"\";if(c)if(s){let{description:p=\"\",details:h=\"\",examples:E=[]}=c.usage||{};p!==\"\"&&(f+=qo(p,{format:this.format(r),paragraphs:!1}).replace(/^./,P=>P.toUpperCase()),f+=`\n`),(h!==\"\"||E.length>0)&&(f+=`${this.format(r).header(\"Usage\")}\n`,f+=`\n`);let{usage:C,options:S}=this.getUsageByRegistration(c,{inlineOptions:!1});if(f+=`${this.format(r).bold(a)}${C}\n`,S.length>0){f+=`\n`,f+=`${this.format(r).header(\"Options\")}\n`;let P=S.reduce((I,R)=>Math.max(I,R.definition.length),0);f+=`\n`;for(let{definition:I,description:R}of S)f+=`  ${this.format(r).bold(I.padEnd(P))}    ${qo(R,{format:this.format(r),paragraphs:!1})}`}if(h!==\"\"&&(f+=`\n`,f+=`${this.format(r).header(\"Details\")}\n`,f+=`\n`,f+=qo(h,{format:this.format(r),paragraphs:!0})),E.length>0){f+=`\n`,f+=`${this.format(r).header(\"Examples\")}\n`;for(let[P,I]of E)f+=`\n`,f+=qo(P,{format:this.format(r),paragraphs:!1}),f+=`${I.replace(/^/m,`  ${this.format(r).bold(a)}`).replace(/\\$0/g,this.binaryName)}\n`}}else{let{usage:p}=this.getUsageByRegistration(c);f+=`${this.format(r).bold(a)}${p}\n`}else{let p=new Map;for(let[S,{index:P}]of this.registrations.entries()){if(typeof S.usage>\"u\")continue;let I=typeof S.usage.category<\"u\"?qo(S.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(I);typeof R>\"u\"&&p.set(I,R=[]);let{usage:N}=this.getUsageByIndex(P);R.push({commandClass:S,usage:N})}let h=Array.from(p.keys()).sort((S,P)=>S===null?-1:P===null?1:S.localeCompare(P,\"en\",{usage:\"sort\",caseFirst:\"upper\"})),E=typeof this.binaryLabel<\"u\",C=typeof this.binaryVersion<\"u\";E||C?(E&&C?f+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}\n\n`:E?f+=`${this.format(r).header(`${this.binaryLabel}`)}\n`:f+=`${this.format(r).header(`${this.binaryVersion}`)}\n`,f+=`  ${this.format(r).bold(a)}${this.binaryName} <command>\n`):f+=`${this.format(r).bold(a)}${this.binaryName} <command>\n`;for(let S of h){let P=p.get(S).slice().sort((R,N)=>R.usage.localeCompare(N.usage,\"en\",{usage:\"sort\",caseFirst:\"upper\"})),I=S!==null?S.trim():\"General commands\";f+=`\n`,f+=`${this.format(r).header(`${I}`)}\n`;for(let{commandClass:R,usage:N}of P){let U=R.usage.description||\"undocumented\";f+=`\n`,f+=`  ${this.format(r).bold(N)}\n`,f+=`    ${qo(U,{format:this.format(r),paragraphs:!1})}`}}f+=`\n`,f+=qo(\"You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.\",{format:this.format(r),paragraphs:!0})}return f}error(e,r){var s,{colored:a,command:n=(s=e[xne])!==null&&s!==void 0?s:null}=r===void 0?{}:r;(!e||typeof e!=\"object\"||!(\"stack\"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let c=\"\",f=e.name.replace(/([a-z])([A-Z])/g,\"$1 $2\");f===\"Error\"&&(f=\"Internal Error\"),c+=`${this.format(a).error(f)}: ${e.message}\n`;let p=e.clipanion;return typeof p<\"u\"?p.type===\"usage\"&&(c+=`\n`,c+=this.usage(n)):e.stack&&(c+=`${e.stack.replace(/^.*\\n/,\"\")}\n`),c}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:t.defaultContext.colorDepth>1)?pne:hne}getUsageByRegistration(e,r){let s=this.registrations.get(e);if(typeof s>\"u\")throw new Error(\"Assertion failed: Unregistered command\");return this.getUsageByIndex(s.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};wa.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:Sne()}});var sB,Nne=It(()=>{u0();sB=class extends ot{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}\n`)}};sB.paths=[[\"--clipanion=definitions\"]]});var oB,One=It(()=>{u0();oB=class extends ot{async execute(){this.context.stdout.write(this.cli.usage())}};oB.paths=[[\"-h\"],[\"--help\"]]});function tk(t={}){return Ea({definition(e,r){var s;e.addProxy({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){return s.positionals.map(({value:a})=>a)}})}var QU=It(()=>{Bp()});var aB,Lne=It(()=>{u0();QU();aB=class extends ot{constructor(){super(...arguments),this.args=tk()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}\n`)}};aB.paths=[[\"--clipanion=tokens\"]]});var lB,Mne=It(()=>{u0();lB=class extends ot{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:\"<unknown>\"}\n`)}};lB.paths=[[\"-v\"],[\"--version\"]]});var TU={};Vt(TU,{DefinitionsCommand:()=>sB,HelpCommand:()=>oB,TokensCommand:()=>aB,VersionCommand:()=>lB});var _ne=It(()=>{Nne();One();Lne();Mne()});function Une(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(\",\"),f=new Set(c);return Ea({definition(p){p.addOption({names:c,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let C,S=typeof s<\"u\"?[...s]:void 0;for(let{name:P,value:I}of E.options)f.has(P)&&(C=P,S=S??[],S.push(I));return typeof S<\"u\"?Ld(C??h,S,a.validator):S}})}var Hne=It(()=>{Bp()});function jne(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(\",\"),c=new Set(n);return Ea({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E=S);return E}})}var qne=It(()=>{Bp()});function Gne(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(\",\"),c=new Set(n);return Ea({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E??(E=0),S?E+=1:E=0);return E}})}var Wne=It(()=>{Bp()});function Yne(t={}){return Ea({definition(e,r){var s;e.addRest({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){let a=c=>{let f=s.positionals[c];return f.extra===jl||f.extra===!1&&c<e.arity.leading.length},n=0;for(;n<s.positionals.length&&a(n);)n+=1;return s.positionals.splice(0,n).map(({value:c})=>c)}})}var Vne=It(()=>{Xx();Bp()});function sXe(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(\",\"),f=new Set(c);return Ea({definition(p){p.addOption({names:c,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,C){let S,P=s;typeof a.env<\"u\"&&C.env[a.env]&&(S=a.env,P=C.env[a.env]);for(let{name:I,value:R}of E.options)f.has(I)&&(S=I,P=R);return typeof P==\"string\"?Ld(S??h,P,a.validator):P}})}function oXe(t={}){let{required:e=!0}=t;return Ea({definition(r,s){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:s,required:t.required})},transformer(r,s,a){var n;for(let c=0;c<a.positionals.length;++c){if(a.positionals[c].extra===jl||e&&a.positionals[c].extra===!0||!e&&a.positionals[c].extra===!1)continue;let[f]=a.positionals.splice(c,1);return Ld((n=t.name)!==null&&n!==void 0?n:s,f.value,t.validator)}}})}function Kne(t,...e){return typeof t==\"string\"?sXe(t,...e):oXe(t)}var Jne=It(()=>{Xx();Bp()});var ge={};Vt(ge,{Array:()=>Une,Boolean:()=>jne,Counter:()=>Gne,Proxy:()=>tk,Rest:()=>Yne,String:()=>Kne,applyValidator:()=>Ld,cleanValidationError:()=>Wx,formatError:()=>$2,isOptionSymbol:()=>X2,makeCommandOption:()=>Ea,rerouteArguments:()=>Gf});var zne=It(()=>{Bp();QU();Hne();qne();Wne();Vne();Jne()});var cB={};Vt(cB,{Builtins:()=>TU,Cli:()=>wa,Command:()=>ot,Option:()=>ge,UsageError:()=>nt,formatMarkdownish:()=>qo,run:()=>Tne,runExit:()=>Qne});var Wt=It(()=>{Gx();IU();u0();Fne();_ne();zne()});var Zne=L((RWt,aXe)=>{aXe.exports={name:\"dotenv\",version:\"16.3.1\",description:\"Loads environment variables from .env file\",main:\"lib/main.js\",types:\"lib/main.d.ts\",exports:{\".\":{types:\"./lib/main.d.ts\",require:\"./lib/main.js\",default:\"./lib/main.js\"},\"./config\":\"./config.js\",\"./config.js\":\"./config.js\",\"./lib/env-options\":\"./lib/env-options.js\",\"./lib/env-options.js\":\"./lib/env-options.js\",\"./lib/cli-options\":\"./lib/cli-options.js\",\"./lib/cli-options.js\":\"./lib/cli-options.js\",\"./package.json\":\"./package.json\"},scripts:{\"dts-check\":\"tsc --project tests/types/tsconfig.json\",lint:\"standard\",\"lint-readme\":\"standard-markdown\",pretest:\"npm run lint && npm run dts-check\",test:\"tap tests/*.js --100 -Rspec\",prerelease:\"npm test\",release:\"standard-version\"},repository:{type:\"git\",url:\"git://github.com/motdotla/dotenv.git\"},funding:\"https://github.com/motdotla/dotenv?sponsor=1\",keywords:[\"dotenv\",\"env\",\".env\",\"environment\",\"variables\",\"config\",\"settings\"],readmeFilename:\"README.md\",license:\"BSD-2-Clause\",devDependencies:{\"@definitelytyped/dtslint\":\"^0.0.133\",\"@types/node\":\"^18.11.3\",decache:\"^4.6.1\",sinon:\"^14.0.1\",standard:\"^17.0.0\",\"standard-markdown\":\"^7.1.0\",\"standard-version\":\"^9.5.0\",tap:\"^16.3.0\",tar:\"^6.1.11\",typescript:\"^4.8.4\"},engines:{node:\">=12\"},browser:{fs:!1}}});var tie=L((FWt,vp)=>{var Xne=ye(\"fs\"),FU=ye(\"path\"),lXe=ye(\"os\"),cXe=ye(\"crypto\"),uXe=Zne(),NU=uXe.version,fXe=/(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg;function AXe(t){let e={},r=t.toString();r=r.replace(/\\r\\n?/mg,`\n`);let s;for(;(s=fXe.exec(r))!=null;){let a=s[1],n=s[2]||\"\";n=n.trim();let c=n[0];n=n.replace(/^(['\"`])([\\s\\S]*)\\1$/mg,\"$2\"),c==='\"'&&(n=n.replace(/\\\\n/g,`\n`),n=n.replace(/\\\\r/g,\"\\r\")),e[a]=n}return e}function pXe(t){let e=eie(t),r=qs.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let s=$ne(t).split(\",\"),a=s.length,n;for(let c=0;c<a;c++)try{let f=s[c].trim(),p=dXe(r,f);n=qs.decrypt(p.ciphertext,p.key);break}catch(f){if(c+1>=a)throw f}return qs.parse(n)}function hXe(t){console.log(`[dotenv@${NU}][INFO] ${t}`)}function gXe(t){console.log(`[dotenv@${NU}][WARN] ${t}`)}function RU(t){console.log(`[dotenv@${NU}][DEBUG] ${t}`)}function $ne(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:\"\"}function dXe(t,e){let r;try{r=new URL(e)}catch(f){throw f.code===\"ERR_INVALID_URL\"?new Error(\"INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development\"):f}let s=r.password;if(!s)throw new Error(\"INVALID_DOTENV_KEY: Missing key part\");let a=r.searchParams.get(\"environment\");if(!a)throw new Error(\"INVALID_DOTENV_KEY: Missing environment part\");let n=`DOTENV_VAULT_${a.toUpperCase()}`,c=t.parsed[n];if(!c)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:c,key:s}}function eie(t){let e=FU.resolve(process.cwd(),\".env\");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(\".vault\")?e:`${e}.vault`}function mXe(t){return t[0]===\"~\"?FU.join(lXe.homedir(),t.slice(1)):t}function yXe(t){hXe(\"Loading env from encrypted .env.vault\");let e=qs._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),qs.populate(r,e,t),{parsed:e}}function EXe(t){let e=FU.resolve(process.cwd(),\".env\"),r=\"utf8\",s=!!(t&&t.debug);t&&(t.path!=null&&(e=mXe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=qs.parse(Xne.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),qs.populate(n,a,t),{parsed:a}}catch(a){return s&&RU(`Failed to load ${e} ${a.message}`),{error:a}}}function IXe(t){let e=eie(t);return $ne(t).length===0?qs.configDotenv(t):Xne.existsSync(e)?qs._configVault(t):(gXe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),qs.configDotenv(t))}function CXe(t,e){let r=Buffer.from(e.slice(-64),\"hex\"),s=Buffer.from(t,\"base64\"),a=s.slice(0,12),n=s.slice(-16);s=s.slice(12,-16);try{let c=cXe.createDecipheriv(\"aes-256-gcm\",r,a);return c.setAuthTag(n),`${c.update(s)}${c.final()}`}catch(c){let f=c instanceof RangeError,p=c.message===\"Invalid key length\",h=c.message===\"Unsupported state or unable to authenticate data\";if(f||p){let E=\"INVALID_DOTENV_KEY: It must be 64 characters long (or more)\";throw new Error(E)}else if(h){let E=\"DECRYPTION_FAILED: Please check your DOTENV_KEY\";throw new Error(E)}else throw console.error(\"Error: \",c.code),console.error(\"Error: \",c.message),c}}function wXe(t,e,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof e!=\"object\")throw new Error(\"OBJECT_REQUIRED: Please check the processEnv argument being passed to populate\");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),s&&RU(a===!0?`\"${n}\" is already defined and WAS overwritten`:`\"${n}\" is already defined and was NOT overwritten`)):t[n]=e[n]}var qs={configDotenv:EXe,_configVault:yXe,_parseVault:pXe,config:IXe,decrypt:CXe,parse:AXe,populate:wXe};vp.exports.configDotenv=qs.configDotenv;vp.exports._configVault=qs._configVault;vp.exports._parseVault=qs._parseVault;vp.exports.config=qs.config;vp.exports.decrypt=qs.decrypt;vp.exports.parse=qs.parse;vp.exports.populate=qs.populate;vp.exports=qs});var nie=L((NWt,rie)=>{\"use strict\";rie.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var Md=L((OWt,OU)=>{\"use strict\";var BXe=nie(),iie=t=>{if(t<1)throw new TypeError(\"Expected `concurrency` to be a number from 1 and up\");let e=[],r=0,s=()=>{r--,e.length>0&&e.shift()()},a=(f,p,...h)=>{r++;let E=BXe(f,...h);p(E),E.then(s,s)},n=(f,p,...h)=>{r<t?a(f,p,...h):e.push(a.bind(null,f,p,...h))},c=(f,...p)=>new Promise(h=>n(f,h,...p));return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),c};OU.exports=iie;OU.exports.default=iie});function Vf(t){return`YN${t.toString(10).padStart(4,\"0\")}`}function rk(t){let e=Number(t.slice(2));if(typeof Dr[e]>\"u\")throw new Error(`Unknown message name: \"${t}\"`);return e}var Dr,nk=It(()=>{Dr=(Me=>(Me[Me.UNNAMED=0]=\"UNNAMED\",Me[Me.EXCEPTION=1]=\"EXCEPTION\",Me[Me.MISSING_PEER_DEPENDENCY=2]=\"MISSING_PEER_DEPENDENCY\",Me[Me.CYCLIC_DEPENDENCIES=3]=\"CYCLIC_DEPENDENCIES\",Me[Me.DISABLED_BUILD_SCRIPTS=4]=\"DISABLED_BUILD_SCRIPTS\",Me[Me.BUILD_DISABLED=5]=\"BUILD_DISABLED\",Me[Me.SOFT_LINK_BUILD=6]=\"SOFT_LINK_BUILD\",Me[Me.MUST_BUILD=7]=\"MUST_BUILD\",Me[Me.MUST_REBUILD=8]=\"MUST_REBUILD\",Me[Me.BUILD_FAILED=9]=\"BUILD_FAILED\",Me[Me.RESOLVER_NOT_FOUND=10]=\"RESOLVER_NOT_FOUND\",Me[Me.FETCHER_NOT_FOUND=11]=\"FETCHER_NOT_FOUND\",Me[Me.LINKER_NOT_FOUND=12]=\"LINKER_NOT_FOUND\",Me[Me.FETCH_NOT_CACHED=13]=\"FETCH_NOT_CACHED\",Me[Me.YARN_IMPORT_FAILED=14]=\"YARN_IMPORT_FAILED\",Me[Me.REMOTE_INVALID=15]=\"REMOTE_INVALID\",Me[Me.REMOTE_NOT_FOUND=16]=\"REMOTE_NOT_FOUND\",Me[Me.RESOLUTION_PACK=17]=\"RESOLUTION_PACK\",Me[Me.CACHE_CHECKSUM_MISMATCH=18]=\"CACHE_CHECKSUM_MISMATCH\",Me[Me.UNUSED_CACHE_ENTRY=19]=\"UNUSED_CACHE_ENTRY\",Me[Me.MISSING_LOCKFILE_ENTRY=20]=\"MISSING_LOCKFILE_ENTRY\",Me[Me.WORKSPACE_NOT_FOUND=21]=\"WORKSPACE_NOT_FOUND\",Me[Me.TOO_MANY_MATCHING_WORKSPACES=22]=\"TOO_MANY_MATCHING_WORKSPACES\",Me[Me.CONSTRAINTS_MISSING_DEPENDENCY=23]=\"CONSTRAINTS_MISSING_DEPENDENCY\",Me[Me.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]=\"CONSTRAINTS_INCOMPATIBLE_DEPENDENCY\",Me[Me.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]=\"CONSTRAINTS_EXTRANEOUS_DEPENDENCY\",Me[Me.CONSTRAINTS_INVALID_DEPENDENCY=26]=\"CONSTRAINTS_INVALID_DEPENDENCY\",Me[Me.CANT_SUGGEST_RESOLUTIONS=27]=\"CANT_SUGGEST_RESOLUTIONS\",Me[Me.FROZEN_LOCKFILE_EXCEPTION=28]=\"FROZEN_LOCKFILE_EXCEPTION\",Me[Me.CROSS_DRIVE_VIRTUAL_LOCAL=29]=\"CROSS_DRIVE_VIRTUAL_LOCAL\",Me[Me.FETCH_FAILED=30]=\"FETCH_FAILED\",Me[Me.DANGEROUS_NODE_MODULES=31]=\"DANGEROUS_NODE_MODULES\",Me[Me.NODE_GYP_INJECTED=32]=\"NODE_GYP_INJECTED\",Me[Me.AUTHENTICATION_NOT_FOUND=33]=\"AUTHENTICATION_NOT_FOUND\",Me[Me.INVALID_CONFIGURATION_KEY=34]=\"INVALID_CONFIGURATION_KEY\",Me[Me.NETWORK_ERROR=35]=\"NETWORK_ERROR\",Me[Me.LIFECYCLE_SCRIPT=36]=\"LIFECYCLE_SCRIPT\",Me[Me.CONSTRAINTS_MISSING_FIELD=37]=\"CONSTRAINTS_MISSING_FIELD\",Me[Me.CONSTRAINTS_INCOMPATIBLE_FIELD=38]=\"CONSTRAINTS_INCOMPATIBLE_FIELD\",Me[Me.CONSTRAINTS_EXTRANEOUS_FIELD=39]=\"CONSTRAINTS_EXTRANEOUS_FIELD\",Me[Me.CONSTRAINTS_INVALID_FIELD=40]=\"CONSTRAINTS_INVALID_FIELD\",Me[Me.AUTHENTICATION_INVALID=41]=\"AUTHENTICATION_INVALID\",Me[Me.PROLOG_UNKNOWN_ERROR=42]=\"PROLOG_UNKNOWN_ERROR\",Me[Me.PROLOG_SYNTAX_ERROR=43]=\"PROLOG_SYNTAX_ERROR\",Me[Me.PROLOG_EXISTENCE_ERROR=44]=\"PROLOG_EXISTENCE_ERROR\",Me[Me.STACK_OVERFLOW_RESOLUTION=45]=\"STACK_OVERFLOW_RESOLUTION\",Me[Me.AUTOMERGE_FAILED_TO_PARSE=46]=\"AUTOMERGE_FAILED_TO_PARSE\",Me[Me.AUTOMERGE_IMMUTABLE=47]=\"AUTOMERGE_IMMUTABLE\",Me[Me.AUTOMERGE_SUCCESS=48]=\"AUTOMERGE_SUCCESS\",Me[Me.AUTOMERGE_REQUIRED=49]=\"AUTOMERGE_REQUIRED\",Me[Me.DEPRECATED_CLI_SETTINGS=50]=\"DEPRECATED_CLI_SETTINGS\",Me[Me.PLUGIN_NAME_NOT_FOUND=51]=\"PLUGIN_NAME_NOT_FOUND\",Me[Me.INVALID_PLUGIN_REFERENCE=52]=\"INVALID_PLUGIN_REFERENCE\",Me[Me.CONSTRAINTS_AMBIGUITY=53]=\"CONSTRAINTS_AMBIGUITY\",Me[Me.CACHE_OUTSIDE_PROJECT=54]=\"CACHE_OUTSIDE_PROJECT\",Me[Me.IMMUTABLE_INSTALL=55]=\"IMMUTABLE_INSTALL\",Me[Me.IMMUTABLE_CACHE=56]=\"IMMUTABLE_CACHE\",Me[Me.INVALID_MANIFEST=57]=\"INVALID_MANIFEST\",Me[Me.PACKAGE_PREPARATION_FAILED=58]=\"PACKAGE_PREPARATION_FAILED\",Me[Me.INVALID_RANGE_PEER_DEPENDENCY=59]=\"INVALID_RANGE_PEER_DEPENDENCY\",Me[Me.INCOMPATIBLE_PEER_DEPENDENCY=60]=\"INCOMPATIBLE_PEER_DEPENDENCY\",Me[Me.DEPRECATED_PACKAGE=61]=\"DEPRECATED_PACKAGE\",Me[Me.INCOMPATIBLE_OS=62]=\"INCOMPATIBLE_OS\",Me[Me.INCOMPATIBLE_CPU=63]=\"INCOMPATIBLE_CPU\",Me[Me.FROZEN_ARTIFACT_EXCEPTION=64]=\"FROZEN_ARTIFACT_EXCEPTION\",Me[Me.TELEMETRY_NOTICE=65]=\"TELEMETRY_NOTICE\",Me[Me.PATCH_HUNK_FAILED=66]=\"PATCH_HUNK_FAILED\",Me[Me.INVALID_CONFIGURATION_VALUE=67]=\"INVALID_CONFIGURATION_VALUE\",Me[Me.UNUSED_PACKAGE_EXTENSION=68]=\"UNUSED_PACKAGE_EXTENSION\",Me[Me.REDUNDANT_PACKAGE_EXTENSION=69]=\"REDUNDANT_PACKAGE_EXTENSION\",Me[Me.AUTO_NM_SUCCESS=70]=\"AUTO_NM_SUCCESS\",Me[Me.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK=71]=\"NM_CANT_INSTALL_EXTERNAL_SOFT_LINK\",Me[Me.NM_PRESERVE_SYMLINKS_REQUIRED=72]=\"NM_PRESERVE_SYMLINKS_REQUIRED\",Me[Me.UPDATE_LOCKFILE_ONLY_SKIP_LINK=73]=\"UPDATE_LOCKFILE_ONLY_SKIP_LINK\",Me[Me.NM_HARDLINKS_MODE_DOWNGRADED=74]=\"NM_HARDLINKS_MODE_DOWNGRADED\",Me[Me.PROLOG_INSTANTIATION_ERROR=75]=\"PROLOG_INSTANTIATION_ERROR\",Me[Me.INCOMPATIBLE_ARCHITECTURE=76]=\"INCOMPATIBLE_ARCHITECTURE\",Me[Me.GHOST_ARCHITECTURE=77]=\"GHOST_ARCHITECTURE\",Me[Me.RESOLUTION_MISMATCH=78]=\"RESOLUTION_MISMATCH\",Me[Me.PROLOG_LIMIT_EXCEEDED=79]=\"PROLOG_LIMIT_EXCEEDED\",Me[Me.NETWORK_DISABLED=80]=\"NETWORK_DISABLED\",Me[Me.NETWORK_UNSAFE_HTTP=81]=\"NETWORK_UNSAFE_HTTP\",Me[Me.RESOLUTION_FAILED=82]=\"RESOLUTION_FAILED\",Me[Me.AUTOMERGE_GIT_ERROR=83]=\"AUTOMERGE_GIT_ERROR\",Me[Me.CONSTRAINTS_CHECK_FAILED=84]=\"CONSTRAINTS_CHECK_FAILED\",Me[Me.UPDATED_RESOLUTION_RECORD=85]=\"UPDATED_RESOLUTION_RECORD\",Me[Me.EXPLAIN_PEER_DEPENDENCIES_CTA=86]=\"EXPLAIN_PEER_DEPENDENCIES_CTA\",Me[Me.MIGRATION_SUCCESS=87]=\"MIGRATION_SUCCESS\",Me[Me.VERSION_NOTICE=88]=\"VERSION_NOTICE\",Me[Me.TIPS_NOTICE=89]=\"TIPS_NOTICE\",Me[Me.OFFLINE_MODE_ENABLED=90]=\"OFFLINE_MODE_ENABLED\",Me[Me.INVALID_PROVENANCE_ENVIRONMENT=91]=\"INVALID_PROVENANCE_ENVIRONMENT\",Me))(Dr||{})});var uB=L((MWt,sie)=>{var vXe=\"2.0.0\",SXe=Number.MAX_SAFE_INTEGER||9007199254740991,DXe=16,bXe=250,PXe=[\"major\",\"premajor\",\"minor\",\"preminor\",\"patch\",\"prepatch\",\"prerelease\"];sie.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:DXe,MAX_SAFE_BUILD_LENGTH:bXe,MAX_SAFE_INTEGER:SXe,RELEASE_TYPES:PXe,SEMVER_SPEC_VERSION:vXe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var fB=L((_Wt,oie)=>{var xXe=typeof process==\"object\"&&process.env&&process.env.NODE_DEBUG&&/\\bsemver\\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error(\"SEMVER\",...t):()=>{};oie.exports=xXe});var vE=L((Sp,aie)=>{var{MAX_SAFE_COMPONENT_LENGTH:LU,MAX_SAFE_BUILD_LENGTH:kXe,MAX_LENGTH:QXe}=uB(),TXe=fB();Sp=aie.exports={};var RXe=Sp.re=[],FXe=Sp.safeRe=[],rr=Sp.src=[],nr=Sp.t={},NXe=0,MU=\"[a-zA-Z0-9-]\",OXe=[[\"\\\\s\",1],[\"\\\\d\",QXe],[MU,kXe]],LXe=t=>{for(let[e,r]of OXe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Kr=(t,e,r)=>{let s=LXe(e),a=NXe++;TXe(t,a,e),nr[t]=a,rr[a]=e,RXe[a]=new RegExp(e,r?\"g\":void 0),FXe[a]=new RegExp(s,r?\"g\":void 0)};Kr(\"NUMERICIDENTIFIER\",\"0|[1-9]\\\\d*\");Kr(\"NUMERICIDENTIFIERLOOSE\",\"\\\\d+\");Kr(\"NONNUMERICIDENTIFIER\",`\\\\d*[a-zA-Z-]${MU}*`);Kr(\"MAINVERSION\",`(${rr[nr.NUMERICIDENTIFIER]})\\\\.(${rr[nr.NUMERICIDENTIFIER]})\\\\.(${rr[nr.NUMERICIDENTIFIER]})`);Kr(\"MAINVERSIONLOOSE\",`(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})`);Kr(\"PRERELEASEIDENTIFIER\",`(?:${rr[nr.NUMERICIDENTIFIER]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Kr(\"PRERELEASEIDENTIFIERLOOSE\",`(?:${rr[nr.NUMERICIDENTIFIERLOOSE]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Kr(\"PRERELEASE\",`(?:-(${rr[nr.PRERELEASEIDENTIFIER]}(?:\\\\.${rr[nr.PRERELEASEIDENTIFIER]})*))`);Kr(\"PRERELEASELOOSE\",`(?:-?(${rr[nr.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${rr[nr.PRERELEASEIDENTIFIERLOOSE]})*))`);Kr(\"BUILDIDENTIFIER\",`${MU}+`);Kr(\"BUILD\",`(?:\\\\+(${rr[nr.BUILDIDENTIFIER]}(?:\\\\.${rr[nr.BUILDIDENTIFIER]})*))`);Kr(\"FULLPLAIN\",`v?${rr[nr.MAINVERSION]}${rr[nr.PRERELEASE]}?${rr[nr.BUILD]}?`);Kr(\"FULL\",`^${rr[nr.FULLPLAIN]}$`);Kr(\"LOOSEPLAIN\",`[v=\\\\s]*${rr[nr.MAINVERSIONLOOSE]}${rr[nr.PRERELEASELOOSE]}?${rr[nr.BUILD]}?`);Kr(\"LOOSE\",`^${rr[nr.LOOSEPLAIN]}$`);Kr(\"GTLT\",\"((?:<|>)?=?)\");Kr(\"XRANGEIDENTIFIERLOOSE\",`${rr[nr.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);Kr(\"XRANGEIDENTIFIER\",`${rr[nr.NUMERICIDENTIFIER]}|x|X|\\\\*`);Kr(\"XRANGEPLAIN\",`[v=\\\\s]*(${rr[nr.XRANGEIDENTIFIER]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIER]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIER]})(?:${rr[nr.PRERELEASE]})?${rr[nr.BUILD]}?)?)?`);Kr(\"XRANGEPLAINLOOSE\",`[v=\\\\s]*(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:${rr[nr.PRERELEASELOOSE]})?${rr[nr.BUILD]}?)?)?`);Kr(\"XRANGE\",`^${rr[nr.GTLT]}\\\\s*${rr[nr.XRANGEPLAIN]}$`);Kr(\"XRANGELOOSE\",`^${rr[nr.GTLT]}\\\\s*${rr[nr.XRANGEPLAINLOOSE]}$`);Kr(\"COERCEPLAIN\",`(^|[^\\\\d])(\\\\d{1,${LU}})(?:\\\\.(\\\\d{1,${LU}}))?(?:\\\\.(\\\\d{1,${LU}}))?`);Kr(\"COERCE\",`${rr[nr.COERCEPLAIN]}(?:$|[^\\\\d])`);Kr(\"COERCEFULL\",rr[nr.COERCEPLAIN]+`(?:${rr[nr.PRERELEASE]})?(?:${rr[nr.BUILD]})?(?:$|[^\\\\d])`);Kr(\"COERCERTL\",rr[nr.COERCE],!0);Kr(\"COERCERTLFULL\",rr[nr.COERCEFULL],!0);Kr(\"LONETILDE\",\"(?:~>?)\");Kr(\"TILDETRIM\",`(\\\\s*)${rr[nr.LONETILDE]}\\\\s+`,!0);Sp.tildeTrimReplace=\"$1~\";Kr(\"TILDE\",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAIN]}$`);Kr(\"TILDELOOSE\",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAINLOOSE]}$`);Kr(\"LONECARET\",\"(?:\\\\^)\");Kr(\"CARETTRIM\",`(\\\\s*)${rr[nr.LONECARET]}\\\\s+`,!0);Sp.caretTrimReplace=\"$1^\";Kr(\"CARET\",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAIN]}$`);Kr(\"CARETLOOSE\",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAINLOOSE]}$`);Kr(\"COMPARATORLOOSE\",`^${rr[nr.GTLT]}\\\\s*(${rr[nr.LOOSEPLAIN]})$|^$`);Kr(\"COMPARATOR\",`^${rr[nr.GTLT]}\\\\s*(${rr[nr.FULLPLAIN]})$|^$`);Kr(\"COMPARATORTRIM\",`(\\\\s*)${rr[nr.GTLT]}\\\\s*(${rr[nr.LOOSEPLAIN]}|${rr[nr.XRANGEPLAIN]})`,!0);Sp.comparatorTrimReplace=\"$1$2$3\";Kr(\"HYPHENRANGE\",`^\\\\s*(${rr[nr.XRANGEPLAIN]})\\\\s+-\\\\s+(${rr[nr.XRANGEPLAIN]})\\\\s*$`);Kr(\"HYPHENRANGELOOSE\",`^\\\\s*(${rr[nr.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${rr[nr.XRANGEPLAINLOOSE]})\\\\s*$`);Kr(\"STAR\",\"(<|>)?=?\\\\s*\\\\*\");Kr(\"GTE0\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");Kr(\"GTE0PRE\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\")});var ik=L((UWt,lie)=>{var MXe=Object.freeze({loose:!0}),_Xe=Object.freeze({}),UXe=t=>t?typeof t!=\"object\"?MXe:t:_Xe;lie.exports=UXe});var _U=L((HWt,fie)=>{var cie=/^[0-9]+$/,uie=(t,e)=>{let r=cie.test(t),s=cie.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},HXe=(t,e)=>uie(e,t);fie.exports={compareIdentifiers:uie,rcompareIdentifiers:HXe}});var Go=L((jWt,gie)=>{var sk=fB(),{MAX_LENGTH:Aie,MAX_SAFE_INTEGER:ok}=uB(),{safeRe:pie,t:hie}=vE(),jXe=ik(),{compareIdentifiers:SE}=_U(),UU=class t{constructor(e,r){if(r=jXe(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!=\"string\")throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof e}\".`);if(e.length>Aie)throw new TypeError(`version is longer than ${Aie} characters`);sk(\"SemVer\",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?pie[hie.LOOSE]:pie[hie.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>ok||this.major<0)throw new TypeError(\"Invalid major version\");if(this.minor>ok||this.minor<0)throw new TypeError(\"Invalid minor version\");if(this.patch>ok||this.patch<0)throw new TypeError(\"Invalid patch version\");s[4]?this.prerelease=s[4].split(\".\").map(a=>{if(/^[0-9]+$/.test(a)){let n=+a;if(n>=0&&n<ok)return n}return a}):this.prerelease=[],this.build=s[5]?s[5].split(\".\"):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(\".\")}`),this.version}toString(){return this.version}compare(e){if(sk(\"SemVer.compare\",this.version,this.options,e),!(e instanceof t)){if(typeof e==\"string\"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),SE(this.major,e.major)||SE(this.minor,e.minor)||SE(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],a=e.prerelease[r];if(sk(\"prerelease compare\",r,s,a),s===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(s===void 0)return-1;if(s===a)continue;return SE(s,a)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],a=e.build[r];if(sk(\"prerelease compare\",r,s,a),s===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(s===void 0)return-1;if(s===a)continue;return SE(s,a)}while(++r)}inc(e,r,s){switch(e){case\"premajor\":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(\"pre\",r,s);break;case\"preminor\":this.prerelease.length=0,this.patch=0,this.minor++,this.inc(\"pre\",r,s);break;case\"prepatch\":this.prerelease.length=0,this.inc(\"patch\",r,s),this.inc(\"pre\",r,s);break;case\"prerelease\":this.prerelease.length===0&&this.inc(\"patch\",r,s),this.inc(\"pre\",r,s);break;case\"major\":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case\"minor\":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case\"patch\":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case\"pre\":{let a=Number(s)?1:0;if(!r&&s===!1)throw new Error(\"invalid increment argument: identifier is empty\");if(this.prerelease.length===0)this.prerelease=[a];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]==\"number\"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(\".\")&&s===!1)throw new Error(\"invalid increment argument: identifier already exists\");this.prerelease.push(a)}}if(r){let n=[r,a];s===!1&&(n=[r]),SE(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(\".\")}`),this}};gie.exports=UU});var _d=L((qWt,mie)=>{var die=Go(),qXe=(t,e,r=!1)=>{if(t instanceof die)return t;try{return new die(t,e)}catch(s){if(!r)return null;throw s}};mie.exports=qXe});var Eie=L((GWt,yie)=>{var GXe=_d(),WXe=(t,e)=>{let r=GXe(t,e);return r?r.version:null};yie.exports=WXe});var Cie=L((WWt,Iie)=>{var YXe=_d(),VXe=(t,e)=>{let r=YXe(t.trim().replace(/^[=v]+/,\"\"),e);return r?r.version:null};Iie.exports=VXe});var vie=L((YWt,Bie)=>{var wie=Go(),KXe=(t,e,r,s,a)=>{typeof r==\"string\"&&(a=s,s=r,r=void 0);try{return new wie(t instanceof wie?t.version:t,r).inc(e,s,a).version}catch{return null}};Bie.exports=KXe});var bie=L((VWt,Die)=>{var Sie=_d(),JXe=(t,e)=>{let r=Sie(t,null,!0),s=Sie(e,null,!0),a=r.compare(s);if(a===0)return null;let n=a>0,c=n?r:s,f=n?s:r,p=!!c.prerelease.length;if(!!f.prerelease.length&&!p)return!f.patch&&!f.minor?\"major\":c.patch?\"patch\":c.minor?\"minor\":\"major\";let E=p?\"pre\":\"\";return r.major!==s.major?E+\"major\":r.minor!==s.minor?E+\"minor\":r.patch!==s.patch?E+\"patch\":\"prerelease\"};Die.exports=JXe});var xie=L((KWt,Pie)=>{var zXe=Go(),ZXe=(t,e)=>new zXe(t,e).major;Pie.exports=ZXe});var Qie=L((JWt,kie)=>{var XXe=Go(),$Xe=(t,e)=>new XXe(t,e).minor;kie.exports=$Xe});var Rie=L((zWt,Tie)=>{var e$e=Go(),t$e=(t,e)=>new e$e(t,e).patch;Tie.exports=t$e});var Nie=L((ZWt,Fie)=>{var r$e=_d(),n$e=(t,e)=>{let r=r$e(t,e);return r&&r.prerelease.length?r.prerelease:null};Fie.exports=n$e});var vc=L((XWt,Lie)=>{var Oie=Go(),i$e=(t,e,r)=>new Oie(t,r).compare(new Oie(e,r));Lie.exports=i$e});var _ie=L(($Wt,Mie)=>{var s$e=vc(),o$e=(t,e,r)=>s$e(e,t,r);Mie.exports=o$e});var Hie=L((eYt,Uie)=>{var a$e=vc(),l$e=(t,e)=>a$e(t,e,!0);Uie.exports=l$e});var ak=L((tYt,qie)=>{var jie=Go(),c$e=(t,e,r)=>{let s=new jie(t,r),a=new jie(e,r);return s.compare(a)||s.compareBuild(a)};qie.exports=c$e});var Wie=L((rYt,Gie)=>{var u$e=ak(),f$e=(t,e)=>t.sort((r,s)=>u$e(r,s,e));Gie.exports=f$e});var Vie=L((nYt,Yie)=>{var A$e=ak(),p$e=(t,e)=>t.sort((r,s)=>A$e(s,r,e));Yie.exports=p$e});var AB=L((iYt,Kie)=>{var h$e=vc(),g$e=(t,e,r)=>h$e(t,e,r)>0;Kie.exports=g$e});var lk=L((sYt,Jie)=>{var d$e=vc(),m$e=(t,e,r)=>d$e(t,e,r)<0;Jie.exports=m$e});var HU=L((oYt,zie)=>{var y$e=vc(),E$e=(t,e,r)=>y$e(t,e,r)===0;zie.exports=E$e});var jU=L((aYt,Zie)=>{var I$e=vc(),C$e=(t,e,r)=>I$e(t,e,r)!==0;Zie.exports=C$e});var ck=L((lYt,Xie)=>{var w$e=vc(),B$e=(t,e,r)=>w$e(t,e,r)>=0;Xie.exports=B$e});var uk=L((cYt,$ie)=>{var v$e=vc(),S$e=(t,e,r)=>v$e(t,e,r)<=0;$ie.exports=S$e});var qU=L((uYt,ese)=>{var D$e=HU(),b$e=jU(),P$e=AB(),x$e=ck(),k$e=lk(),Q$e=uk(),T$e=(t,e,r,s)=>{switch(e){case\"===\":return typeof t==\"object\"&&(t=t.version),typeof r==\"object\"&&(r=r.version),t===r;case\"!==\":return typeof t==\"object\"&&(t=t.version),typeof r==\"object\"&&(r=r.version),t!==r;case\"\":case\"=\":case\"==\":return D$e(t,r,s);case\"!=\":return b$e(t,r,s);case\">\":return P$e(t,r,s);case\">=\":return x$e(t,r,s);case\"<\":return k$e(t,r,s);case\"<=\":return Q$e(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};ese.exports=T$e});var rse=L((fYt,tse)=>{var R$e=Go(),F$e=_d(),{safeRe:fk,t:Ak}=vE(),N$e=(t,e)=>{if(t instanceof R$e)return t;if(typeof t==\"number\"&&(t=String(t)),typeof t!=\"string\")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?fk[Ak.COERCEFULL]:fk[Ak.COERCE]);else{let p=e.includePrerelease?fk[Ak.COERCERTLFULL]:fk[Ak.COERCERTL],h;for(;(h=p.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||h.index+h[0].length!==r.index+r[0].length)&&(r=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(r===null)return null;let s=r[2],a=r[3]||\"0\",n=r[4]||\"0\",c=e.includePrerelease&&r[5]?`-${r[5]}`:\"\",f=e.includePrerelease&&r[6]?`+${r[6]}`:\"\";return F$e(`${s}.${a}.${n}${c}${f}`,e)};tse.exports=N$e});var ise=L((AYt,nse)=>{\"use strict\";nse.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var pk=L((pYt,sse)=>{\"use strict\";sse.exports=Fn;Fn.Node=Ud;Fn.create=Fn;function Fn(t){var e=this;if(e instanceof Fn||(e=new Fn),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach==\"function\")t.forEach(function(a){e.push(a)});else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)e.push(arguments[r]);return e}Fn.prototype.removeNode=function(t){if(t.list!==this)throw new Error(\"removing node which does not belong to this list\");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};Fn.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};Fn.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};Fn.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)L$e(this,arguments[t]);return this.length};Fn.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)M$e(this,arguments[t]);return this.length};Fn.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};Fn.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};Fn.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,s=0;r!==null;s++)t.call(e,r.value,s,this),r=r.next};Fn.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,s=this.length-1;r!==null;s--)t.call(e,r.value,s,this),r=r.prev};Fn.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};Fn.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};Fn.prototype.map=function(t,e){e=e||this;for(var r=new Fn,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r};Fn.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Fn,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r};Fn.prototype.reduce=function(t,e){var r,s=this.head;if(arguments.length>1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError(\"Reduce of empty list with no initial value\");for(var a=0;s!==null;a++)r=t(r,s.value,a),s=s.next;return r};Fn.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError(\"Reduce of empty list with no initial value\");for(var a=this.length-1;s!==null;a--)r=t(r,s.value,a),s=s.prev;return r};Fn.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Fn.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Fn.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Fn;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=0,a=this.head;a!==null&&s<t;s++)a=a.next;for(;a!==null&&s<e;s++,a=a.next)r.push(a.value);return r};Fn.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Fn;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=this.length,a=this.tail;a!==null&&s>e;s--)a=a.prev;for(;a!==null&&s>t;s--,a=a.prev)r.push(a.value);return r};Fn.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,a=this.head;a!==null&&s<t;s++)a=a.next;for(var n=[],s=0;a&&s<e;s++)n.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var s=0;s<r.length;s++)a=O$e(this,a,r[s]);return n};Fn.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=e,this.tail=t,this};function O$e(t,e,r){var s=e===t.head?new Ud(r,null,e,t):new Ud(r,e,e.next,t);return s.next===null&&(t.tail=s),s.prev===null&&(t.head=s),t.length++,s}function L$e(t,e){t.tail=new Ud(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function M$e(t,e){t.head=new Ud(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Ud(t,e,r,s){if(!(this instanceof Ud))return new Ud(t,e,r,s);this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{ise()(Fn)}catch{}});var use=L((hYt,cse)=>{\"use strict\";var _$e=pk(),Hd=Symbol(\"max\"),bp=Symbol(\"length\"),DE=Symbol(\"lengthCalculator\"),hB=Symbol(\"allowStale\"),jd=Symbol(\"maxAge\"),Dp=Symbol(\"dispose\"),ose=Symbol(\"noDisposeOnSet\"),Gs=Symbol(\"lruList\"),_u=Symbol(\"cache\"),lse=Symbol(\"updateAgeOnGet\"),GU=()=>1,YU=class{constructor(e){if(typeof e==\"number\"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!=\"number\"||e.max<0))throw new TypeError(\"max must be a non-negative number\");let r=this[Hd]=e.max||1/0,s=e.length||GU;if(this[DE]=typeof s!=\"function\"?GU:s,this[hB]=e.stale||!1,e.maxAge&&typeof e.maxAge!=\"number\")throw new TypeError(\"maxAge must be a number\");this[jd]=e.maxAge||0,this[Dp]=e.dispose,this[ose]=e.noDisposeOnSet||!1,this[lse]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!=\"number\"||e<0)throw new TypeError(\"max must be a non-negative number\");this[Hd]=e||1/0,pB(this)}get max(){return this[Hd]}set allowStale(e){this[hB]=!!e}get allowStale(){return this[hB]}set maxAge(e){if(typeof e!=\"number\")throw new TypeError(\"maxAge must be a non-negative number\");this[jd]=e,pB(this)}get maxAge(){return this[jd]}set lengthCalculator(e){typeof e!=\"function\"&&(e=GU),e!==this[DE]&&(this[DE]=e,this[bp]=0,this[Gs].forEach(r=>{r.length=this[DE](r.value,r.key),this[bp]+=r.length})),pB(this)}get lengthCalculator(){return this[DE]}get length(){return this[bp]}get itemCount(){return this[Gs].length}rforEach(e,r){r=r||this;for(let s=this[Gs].tail;s!==null;){let a=s.prev;ase(this,e,s,r),s=a}}forEach(e,r){r=r||this;for(let s=this[Gs].head;s!==null;){let a=s.next;ase(this,e,s,r),s=a}}keys(){return this[Gs].toArray().map(e=>e.key)}values(){return this[Gs].toArray().map(e=>e.value)}reset(){this[Dp]&&this[Gs]&&this[Gs].length&&this[Gs].forEach(e=>this[Dp](e.key,e.value)),this[_u]=new Map,this[Gs]=new _$e,this[bp]=0}dump(){return this[Gs].map(e=>hk(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Gs]}set(e,r,s){if(s=s||this[jd],s&&typeof s!=\"number\")throw new TypeError(\"maxAge must be a number\");let a=s?Date.now():0,n=this[DE](r,e);if(this[_u].has(e)){if(n>this[Hd])return bE(this,this[_u].get(e)),!1;let p=this[_u].get(e).value;return this[Dp]&&(this[ose]||this[Dp](e,p.value)),p.now=a,p.maxAge=s,p.value=r,this[bp]+=n-p.length,p.length=n,this.get(e),pB(this),!0}let c=new VU(e,r,n,a,s);return c.length>this[Hd]?(this[Dp]&&this[Dp](e,r),!1):(this[bp]+=c.length,this[Gs].unshift(c),this[_u].set(e,this[Gs].head),pB(this),!0)}has(e){if(!this[_u].has(e))return!1;let r=this[_u].get(e).value;return!hk(this,r)}get(e){return WU(this,e,!0)}peek(e){return WU(this,e,!1)}pop(){let e=this[Gs].tail;return e?(bE(this,e),e.value):null}del(e){bE(this,this[_u].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let a=e[s],n=a.e||0;if(n===0)this.set(a.k,a.v);else{let c=n-r;c>0&&this.set(a.k,a.v,c)}}}prune(){this[_u].forEach((e,r)=>WU(this,r,!1))}},WU=(t,e,r)=>{let s=t[_u].get(e);if(s){let a=s.value;if(hk(t,a)){if(bE(t,s),!t[hB])return}else r&&(t[lse]&&(s.value.now=Date.now()),t[Gs].unshiftNode(s));return a.value}},hk=(t,e)=>{if(!e||!e.maxAge&&!t[jd])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[jd]&&r>t[jd]},pB=t=>{if(t[bp]>t[Hd])for(let e=t[Gs].tail;t[bp]>t[Hd]&&e!==null;){let r=e.prev;bE(t,e),e=r}},bE=(t,e)=>{if(e){let r=e.value;t[Dp]&&t[Dp](r.key,r.value),t[bp]-=r.length,t[_u].delete(r.key),t[Gs].removeNode(e)}},VU=class{constructor(e,r,s,a,n){this.key=e,this.value=r,this.length=s,this.now=a,this.maxAge=n||0}},ase=(t,e,r,s)=>{let a=r.value;hk(t,a)&&(bE(t,r),t[hB]||(a=void 0)),a&&e.call(s,a.value,a.key,t)};cse.exports=YU});var Sc=L((gYt,hse)=>{var KU=class t{constructor(e,r){if(r=H$e(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof JU)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().split(/\\s+/).join(\" \"),this.set=this.raw.split(\"||\").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(a=>!Ase(a[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&K$e(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(\" \").trim()).join(\"||\").trim(),this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Y$e)|(this.options.loose&&V$e))+\":\"+e,a=fse.get(s);if(a)return a;let n=this.options.loose,c=n?ol[Ba.HYPHENRANGELOOSE]:ol[Ba.HYPHENRANGE];e=e.replace(c,iet(this.options.includePrerelease)),vi(\"hyphen replace\",e),e=e.replace(ol[Ba.COMPARATORTRIM],q$e),vi(\"comparator trim\",e),e=e.replace(ol[Ba.TILDETRIM],G$e),vi(\"tilde trim\",e),e=e.replace(ol[Ba.CARETTRIM],W$e),vi(\"caret trim\",e);let f=e.split(\" \").map(C=>J$e(C,this.options)).join(\" \").split(/\\s+/).map(C=>net(C,this.options));n&&(f=f.filter(C=>(vi(\"loose invalid filter\",C,this.options),!!C.match(ol[Ba.COMPARATORLOOSE])))),vi(\"range list\",f);let p=new Map,h=f.map(C=>new JU(C,this.options));for(let C of h){if(Ase(C))return[C];p.set(C.value,C)}p.size>1&&p.has(\"\")&&p.delete(\"\");let E=[...p.values()];return fse.set(s,E),E}intersects(e,r){if(!(e instanceof t))throw new TypeError(\"a Range is required\");return this.set.some(s=>pse(s,r)&&e.set.some(a=>pse(a,r)&&s.every(n=>a.every(c=>n.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e==\"string\")try{e=new j$e(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(set(this.set[r],e,this.options))return!0;return!1}};hse.exports=KU;var U$e=use(),fse=new U$e({max:1e3}),H$e=ik(),JU=gB(),vi=fB(),j$e=Go(),{safeRe:ol,t:Ba,comparatorTrimReplace:q$e,tildeTrimReplace:G$e,caretTrimReplace:W$e}=vE(),{FLAG_INCLUDE_PRERELEASE:Y$e,FLAG_LOOSE:V$e}=uB(),Ase=t=>t.value===\"<0.0.0-0\",K$e=t=>t.value===\"\",pse=(t,e)=>{let r=!0,s=t.slice(),a=s.pop();for(;r&&s.length;)r=s.every(n=>a.intersects(n,e)),a=s.pop();return r},J$e=(t,e)=>(vi(\"comp\",t,e),t=X$e(t,e),vi(\"caret\",t),t=z$e(t,e),vi(\"tildes\",t),t=eet(t,e),vi(\"xrange\",t),t=ret(t,e),vi(\"stars\",t),t),va=t=>!t||t.toLowerCase()===\"x\"||t===\"*\",z$e=(t,e)=>t.trim().split(/\\s+/).map(r=>Z$e(r,e)).join(\" \"),Z$e=(t,e)=>{let r=e.loose?ol[Ba.TILDELOOSE]:ol[Ba.TILDE];return t.replace(r,(s,a,n,c,f)=>{vi(\"tilde\",t,s,a,n,c,f);let p;return va(a)?p=\"\":va(n)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:va(c)?p=`>=${a}.${n}.0 <${a}.${+n+1}.0-0`:f?(vi(\"replaceTilde pr\",f),p=`>=${a}.${n}.${c}-${f} <${a}.${+n+1}.0-0`):p=`>=${a}.${n}.${c} <${a}.${+n+1}.0-0`,vi(\"tilde return\",p),p})},X$e=(t,e)=>t.trim().split(/\\s+/).map(r=>$$e(r,e)).join(\" \"),$$e=(t,e)=>{vi(\"caret\",t,e);let r=e.loose?ol[Ba.CARETLOOSE]:ol[Ba.CARET],s=e.includePrerelease?\"-0\":\"\";return t.replace(r,(a,n,c,f,p)=>{vi(\"caret\",t,a,n,c,f,p);let h;return va(n)?h=\"\":va(c)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:va(f)?n===\"0\"?h=`>=${n}.${c}.0${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.0${s} <${+n+1}.0.0-0`:p?(vi(\"replaceCaret pr\",p),n===\"0\"?c===\"0\"?h=`>=${n}.${c}.${f}-${p} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}-${p} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f}-${p} <${+n+1}.0.0-0`):(vi(\"no pr\"),n===\"0\"?c===\"0\"?h=`>=${n}.${c}.${f}${s} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f} <${+n+1}.0.0-0`),vi(\"caret return\",h),h})},eet=(t,e)=>(vi(\"replaceXRanges\",t,e),t.split(/\\s+/).map(r=>tet(r,e)).join(\" \")),tet=(t,e)=>{t=t.trim();let r=e.loose?ol[Ba.XRANGELOOSE]:ol[Ba.XRANGE];return t.replace(r,(s,a,n,c,f,p)=>{vi(\"xRange\",t,s,a,n,c,f,p);let h=va(n),E=h||va(c),C=E||va(f),S=C;return a===\"=\"&&S&&(a=\"\"),p=e.includePrerelease?\"-0\":\"\",h?a===\">\"||a===\"<\"?s=\"<0.0.0-0\":s=\"*\":a&&S?(E&&(c=0),f=0,a===\">\"?(a=\">=\",E?(n=+n+1,c=0,f=0):(c=+c+1,f=0)):a===\"<=\"&&(a=\"<\",E?n=+n+1:c=+c+1),a===\"<\"&&(p=\"-0\"),s=`${a+n}.${c}.${f}${p}`):E?s=`>=${n}.0.0${p} <${+n+1}.0.0-0`:C&&(s=`>=${n}.${c}.0${p} <${n}.${+c+1}.0-0`),vi(\"xRange return\",s),s})},ret=(t,e)=>(vi(\"replaceStars\",t,e),t.trim().replace(ol[Ba.STAR],\"\")),net=(t,e)=>(vi(\"replaceGTE0\",t,e),t.trim().replace(ol[e.includePrerelease?Ba.GTE0PRE:Ba.GTE0],\"\")),iet=t=>(e,r,s,a,n,c,f,p,h,E,C,S,P)=>(va(s)?r=\"\":va(a)?r=`>=${s}.0.0${t?\"-0\":\"\"}`:va(n)?r=`>=${s}.${a}.0${t?\"-0\":\"\"}`:c?r=`>=${r}`:r=`>=${r}${t?\"-0\":\"\"}`,va(h)?p=\"\":va(E)?p=`<${+h+1}.0.0-0`:va(C)?p=`<${h}.${+E+1}.0-0`:S?p=`<=${h}.${E}.${C}-${S}`:t?p=`<${h}.${E}.${+C+1}-0`:p=`<=${p}`,`${r} ${p}`.trim()),set=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(vi(t[s].semver),t[s].semver!==JU.ANY&&t[s].semver.prerelease.length>0){let a=t[s].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var gB=L((dYt,Ise)=>{var dB=Symbol(\"SemVer ANY\"),XU=class t{static get ANY(){return dB}constructor(e,r){if(r=gse(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\\s+/).join(\" \"),ZU(\"comparator\",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===dB?this.value=\"\":this.value=this.operator+this.semver.version,ZU(\"comp\",this)}parse(e){let r=this.options.loose?dse[mse.COMPARATORLOOSE]:dse[mse.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:\"\",this.operator===\"=\"&&(this.operator=\"\"),s[2]?this.semver=new yse(s[2],this.options.loose):this.semver=dB}toString(){return this.value}test(e){if(ZU(\"Comparator.test\",e,this.options.loose),this.semver===dB||e===dB)return!0;if(typeof e==\"string\")try{e=new yse(e,this.options)}catch{return!1}return zU(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError(\"a Comparator is required\");return this.operator===\"\"?this.value===\"\"?!0:new Ese(e.value,r).test(this.value):e.operator===\"\"?e.value===\"\"?!0:new Ese(this.value,r).test(e.semver):(r=gse(r),r.includePrerelease&&(this.value===\"<0.0.0-0\"||e.value===\"<0.0.0-0\")||!r.includePrerelease&&(this.value.startsWith(\"<0.0.0\")||e.value.startsWith(\"<0.0.0\"))?!1:!!(this.operator.startsWith(\">\")&&e.operator.startsWith(\">\")||this.operator.startsWith(\"<\")&&e.operator.startsWith(\"<\")||this.semver.version===e.semver.version&&this.operator.includes(\"=\")&&e.operator.includes(\"=\")||zU(this.semver,\"<\",e.semver,r)&&this.operator.startsWith(\">\")&&e.operator.startsWith(\"<\")||zU(this.semver,\">\",e.semver,r)&&this.operator.startsWith(\"<\")&&e.operator.startsWith(\">\")))}};Ise.exports=XU;var gse=ik(),{safeRe:dse,t:mse}=vE(),zU=qU(),ZU=fB(),yse=Go(),Ese=Sc()});var mB=L((mYt,Cse)=>{var oet=Sc(),aet=(t,e,r)=>{try{e=new oet(e,r)}catch{return!1}return e.test(t)};Cse.exports=aet});var Bse=L((yYt,wse)=>{var cet=Sc(),uet=(t,e)=>new cet(t,e).set.map(r=>r.map(s=>s.value).join(\" \").trim().split(\" \"));wse.exports=uet});var Sse=L((EYt,vse)=>{var fet=Go(),Aet=Sc(),pet=(t,e,r)=>{let s=null,a=null,n=null;try{n=new Aet(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===-1)&&(s=c,a=new fet(s,r))}),s};vse.exports=pet});var bse=L((IYt,Dse)=>{var het=Go(),get=Sc(),det=(t,e,r)=>{let s=null,a=null,n=null;try{n=new get(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===1)&&(s=c,a=new het(s,r))}),s};Dse.exports=det});var kse=L((CYt,xse)=>{var $U=Go(),met=Sc(),Pse=AB(),yet=(t,e)=>{t=new met(t,e);let r=new $U(\"0.0.0\");if(t.test(r)||(r=new $U(\"0.0.0-0\"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let a=t.set[s],n=null;a.forEach(c=>{let f=new $U(c.semver.version);switch(c.operator){case\">\":f.prerelease.length===0?f.patch++:f.prerelease.push(0),f.raw=f.format();case\"\":case\">=\":(!n||Pse(f,n))&&(n=f);break;case\"<\":case\"<=\":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),n&&(!r||Pse(r,n))&&(r=n)}return r&&t.test(r)?r:null};xse.exports=yet});var Tse=L((wYt,Qse)=>{var Eet=Sc(),Iet=(t,e)=>{try{return new Eet(t,e).range||\"*\"}catch{return null}};Qse.exports=Iet});var gk=L((BYt,Ose)=>{var Cet=Go(),Nse=gB(),{ANY:wet}=Nse,Bet=Sc(),vet=mB(),Rse=AB(),Fse=lk(),Det=uk(),bet=ck(),Pet=(t,e,r,s)=>{t=new Cet(t,s),e=new Bet(e,s);let a,n,c,f,p;switch(r){case\">\":a=Rse,n=Det,c=Fse,f=\">\",p=\">=\";break;case\"<\":a=Fse,n=bet,c=Rse,f=\"<\",p=\"<=\";break;default:throw new TypeError('Must provide a hilo val of \"<\" or \">\"')}if(vet(t,e,s))return!1;for(let h=0;h<e.set.length;++h){let E=e.set[h],C=null,S=null;if(E.forEach(P=>{P.semver===wet&&(P=new Nse(\">=0.0.0\")),C=C||P,S=S||P,a(P.semver,C.semver,s)?C=P:c(P.semver,S.semver,s)&&(S=P)}),C.operator===f||C.operator===p||(!S.operator||S.operator===f)&&n(t,S.semver))return!1;if(S.operator===p&&c(t,S.semver))return!1}return!0};Ose.exports=Pet});var Mse=L((vYt,Lse)=>{var xet=gk(),ket=(t,e,r)=>xet(t,e,\">\",r);Lse.exports=ket});var Use=L((SYt,_se)=>{var Qet=gk(),Tet=(t,e,r)=>Qet(t,e,\"<\",r);_se.exports=Tet});var qse=L((DYt,jse)=>{var Hse=Sc(),Ret=(t,e,r)=>(t=new Hse(t,r),e=new Hse(e,r),t.intersects(e,r));jse.exports=Ret});var Wse=L((bYt,Gse)=>{var Fet=mB(),Net=vc();Gse.exports=(t,e,r)=>{let s=[],a=null,n=null,c=t.sort((E,C)=>Net(E,C,r));for(let E of c)Fet(E,e,r)?(n=E,a||(a=E)):(n&&s.push([a,n]),n=null,a=null);a&&s.push([a,null]);let f=[];for(let[E,C]of s)E===C?f.push(E):!C&&E===c[0]?f.push(\"*\"):C?E===c[0]?f.push(`<=${C}`):f.push(`${E} - ${C}`):f.push(`>=${E}`);let p=f.join(\" || \"),h=typeof e.raw==\"string\"?e.raw:String(e);return p.length<h.length?p:e}});var Zse=L((PYt,zse)=>{var Yse=Sc(),t4=gB(),{ANY:e4}=t4,yB=mB(),r4=vc(),Oet=(t,e,r={})=>{if(t===e)return!0;t=new Yse(t,r),e=new Yse(e,r);let s=!1;e:for(let a of t.set){for(let n of e.set){let c=Met(a,n,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},Let=[new t4(\">=0.0.0-0\")],Vse=[new t4(\">=0.0.0\")],Met=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===e4){if(e.length===1&&e[0].semver===e4)return!0;r.includePrerelease?t=Let:t=Vse}if(e.length===1&&e[0].semver===e4){if(r.includePrerelease)return!0;e=Vse}let s=new Set,a,n;for(let P of t)P.operator===\">\"||P.operator===\">=\"?a=Kse(a,P,r):P.operator===\"<\"||P.operator===\"<=\"?n=Jse(n,P,r):s.add(P.semver);if(s.size>1)return null;let c;if(a&&n){if(c=r4(a.semver,n.semver,r),c>0)return null;if(c===0&&(a.operator!==\">=\"||n.operator!==\"<=\"))return null}for(let P of s){if(a&&!yB(P,String(a),r)||n&&!yB(P,String(n),r))return null;for(let I of e)if(!yB(P,String(I),r))return!1;return!0}let f,p,h,E,C=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,S=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;C&&C.prerelease.length===1&&n.operator===\"<\"&&C.prerelease[0]===0&&(C=!1);for(let P of e){if(E=E||P.operator===\">\"||P.operator===\">=\",h=h||P.operator===\"<\"||P.operator===\"<=\",a){if(S&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===S.major&&P.semver.minor===S.minor&&P.semver.patch===S.patch&&(S=!1),P.operator===\">\"||P.operator===\">=\"){if(f=Kse(a,P,r),f===P&&f!==a)return!1}else if(a.operator===\">=\"&&!yB(a.semver,String(P),r))return!1}if(n){if(C&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===C.major&&P.semver.minor===C.minor&&P.semver.patch===C.patch&&(C=!1),P.operator===\"<\"||P.operator===\"<=\"){if(p=Jse(n,P,r),p===P&&p!==n)return!1}else if(n.operator===\"<=\"&&!yB(n.semver,String(P),r))return!1}if(!P.operator&&(n||a)&&c!==0)return!1}return!(a&&h&&!n&&c!==0||n&&E&&!a&&c!==0||S||C)},Kse=(t,e,r)=>{if(!t)return e;let s=r4(t.semver,e.semver,r);return s>0?t:s<0||e.operator===\">\"&&t.operator===\">=\"?e:t},Jse=(t,e,r)=>{if(!t)return e;let s=r4(t.semver,e.semver,r);return s<0?t:s>0||e.operator===\"<\"&&t.operator===\"<=\"?e:t};zse.exports=Oet});var fi=L((xYt,eoe)=>{var n4=vE(),Xse=uB(),_et=Go(),$se=_U(),Uet=_d(),Het=Eie(),jet=Cie(),qet=vie(),Get=bie(),Wet=xie(),Yet=Qie(),Vet=Rie(),Ket=Nie(),Jet=vc(),zet=_ie(),Zet=Hie(),Xet=ak(),$et=Wie(),ett=Vie(),ttt=AB(),rtt=lk(),ntt=HU(),itt=jU(),stt=ck(),ott=uk(),att=qU(),ltt=rse(),ctt=gB(),utt=Sc(),ftt=mB(),Att=Bse(),ptt=Sse(),htt=bse(),gtt=kse(),dtt=Tse(),mtt=gk(),ytt=Mse(),Ett=Use(),Itt=qse(),Ctt=Wse(),wtt=Zse();eoe.exports={parse:Uet,valid:Het,clean:jet,inc:qet,diff:Get,major:Wet,minor:Yet,patch:Vet,prerelease:Ket,compare:Jet,rcompare:zet,compareLoose:Zet,compareBuild:Xet,sort:$et,rsort:ett,gt:ttt,lt:rtt,eq:ntt,neq:itt,gte:stt,lte:ott,cmp:att,coerce:ltt,Comparator:ctt,Range:utt,satisfies:ftt,toComparators:Att,maxSatisfying:ptt,minSatisfying:htt,minVersion:gtt,validRange:dtt,outside:mtt,gtr:ytt,ltr:Ett,intersects:Itt,simplifyRange:Ctt,subset:wtt,SemVer:_et,re:n4.re,src:n4.src,tokens:n4.t,SEMVER_SPEC_VERSION:Xse.SEMVER_SPEC_VERSION,RELEASE_TYPES:Xse.RELEASE_TYPES,compareIdentifiers:$se.compareIdentifiers,rcompareIdentifiers:$se.rcompareIdentifiers}});var roe=L((kYt,toe)=>{\"use strict\";function Btt(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function qd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,qd)}Btt(qd,Error);qd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function vtt(t,e){e=e!==void 0?e:{};var r={},s={Expression:y},a=y,n=\"|\",c=Fe(\"|\",!1),f=\"&\",p=Fe(\"&\",!1),h=\"^\",E=Fe(\"^\",!1),C=function($,oe){return!!oe.reduce((xe,Te)=>{switch(Te[1]){case\"|\":return xe|Te[3];case\"&\":return xe&Te[3];case\"^\":return xe^Te[3]}},$)},S=\"!\",P=Fe(\"!\",!1),I=function($){return!$},R=\"(\",N=Fe(\"(\",!1),U=\")\",W=Fe(\")\",!1),te=function($){return $},ie=/^[^ \\t\\n\\r()!|&\\^]/,Ae=Ne([\" \",\"\t\",`\n`,\"\\r\",\"(\",\")\",\"!\",\"|\",\"&\",\"^\"],!0,!1),ce=function($){return e.queryPattern.test($)},me=function($){return e.checkFn($)},pe=ke(\"whitespace\"),Be=/^[ \\t\\n\\r]/,Ce=Ne([\" \",\"\t\",`\n`,\"\\r\"],!1,!1),g=0,we=0,Ee=[{line:1,column:1}],fe=0,se=[],X=0,De;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function Re(){return t.substring(we,g)}function gt(){return _e(we,g)}function j($,oe){throw oe=oe!==void 0?oe:_e(we,g),b([ke($)],t.substring(we,g),oe)}function rt($,oe){throw oe=oe!==void 0?oe:_e(we,g),w($,oe)}function Fe($,oe){return{type:\"literal\",text:$,ignoreCase:oe}}function Ne($,oe,xe){return{type:\"class\",parts:$,inverted:oe,ignoreCase:xe}}function Pe(){return{type:\"any\"}}function Ye(){return{type:\"end\"}}function ke($){return{type:\"other\",description:$}}function it($){var oe=Ee[$],xe;if(oe)return oe;for(xe=$-1;!Ee[xe];)xe--;for(oe=Ee[xe],oe={line:oe.line,column:oe.column};xe<$;)t.charCodeAt(xe)===10?(oe.line++,oe.column=1):oe.column++,xe++;return Ee[$]=oe,oe}function _e($,oe){var xe=it($),Te=it(oe);return{start:{offset:$,line:xe.line,column:xe.column},end:{offset:oe,line:Te.line,column:Te.column}}}function x($){g<fe||(g>fe&&(fe=g,se=[]),se.push($))}function w($,oe){return new qd($,null,null,oe)}function b($,oe,xe){return new qd(qd.buildMessage($,oe),$,oe,xe)}function y(){var $,oe,xe,Te,lt,Et,qt,ir;if($=g,oe=F(),oe!==r){for(xe=[],Te=g,lt=Z(),lt!==r?(t.charCodeAt(g)===124?(Et=n,g++):(Et=r,X===0&&x(c)),Et===r&&(t.charCodeAt(g)===38?(Et=f,g++):(Et=r,X===0&&x(p)),Et===r&&(t.charCodeAt(g)===94?(Et=h,g++):(Et=r,X===0&&x(E)))),Et!==r?(qt=Z(),qt!==r?(ir=F(),ir!==r?(lt=[lt,Et,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);Te!==r;)xe.push(Te),Te=g,lt=Z(),lt!==r?(t.charCodeAt(g)===124?(Et=n,g++):(Et=r,X===0&&x(c)),Et===r&&(t.charCodeAt(g)===38?(Et=f,g++):(Et=r,X===0&&x(p)),Et===r&&(t.charCodeAt(g)===94?(Et=h,g++):(Et=r,X===0&&x(E)))),Et!==r?(qt=Z(),qt!==r?(ir=F(),ir!==r?(lt=[lt,Et,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);xe!==r?(we=$,oe=C(oe,xe),$=oe):(g=$,$=r)}else g=$,$=r;return $}function F(){var $,oe,xe,Te,lt,Et;return $=g,t.charCodeAt(g)===33?(oe=S,g++):(oe=r,X===0&&x(P)),oe!==r?(xe=F(),xe!==r?(we=$,oe=I(xe),$=oe):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(oe=R,g++):(oe=r,X===0&&x(N)),oe!==r?(xe=Z(),xe!==r?(Te=y(),Te!==r?(lt=Z(),lt!==r?(t.charCodeAt(g)===41?(Et=U,g++):(Et=r,X===0&&x(W)),Et!==r?(we=$,oe=te(Te),$=oe):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,oe,xe,Te,lt;if($=g,oe=Z(),oe!==r){if(xe=g,Te=[],ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,X===0&&x(Ae)),lt!==r)for(;lt!==r;)Te.push(lt),ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,X===0&&x(Ae));else Te=r;Te!==r?xe=t.substring(xe,g):xe=Te,xe!==r?(we=g,Te=ce(xe),Te?Te=void 0:Te=r,Te!==r?(we=$,oe=me(xe),$=oe):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function Z(){var $,oe;for(X++,$=[],Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,X===0&&x(Ce));oe!==r;)$.push(oe),Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,X===0&&x(Ce));return X--,$===r&&(oe=r,X===0&&x(pe)),$}if(De=a(),De!==r&&g===t.length)return De;throw De!==r&&g<t.length&&x(Ye()),b(se,fe<t.length?t.charAt(fe):null,fe<t.length?_e(fe,fe+1):_e(fe,fe))}toe.exports={SyntaxError:qd,parse:vtt}});var noe=L(dk=>{var{parse:Stt}=roe();dk.makeParser=(t=/[a-z]+/)=>(e,r)=>Stt(e,{queryPattern:t,checkFn:r});dk.parse=dk.makeParser()});var soe=L((TYt,ioe)=>{\"use strict\";ioe.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var i4=L((RYt,aoe)=>{var EB=soe(),ooe={};for(let t of Object.keys(EB))ooe[EB[t]]=t;var hr={rgb:{channels:3,labels:\"rgb\"},hsl:{channels:3,labels:\"hsl\"},hsv:{channels:3,labels:\"hsv\"},hwb:{channels:3,labels:\"hwb\"},cmyk:{channels:4,labels:\"cmyk\"},xyz:{channels:3,labels:\"xyz\"},lab:{channels:3,labels:\"lab\"},lch:{channels:3,labels:\"lch\"},hex:{channels:1,labels:[\"hex\"]},keyword:{channels:1,labels:[\"keyword\"]},ansi16:{channels:1,labels:[\"ansi16\"]},ansi256:{channels:1,labels:[\"ansi256\"]},hcg:{channels:3,labels:[\"h\",\"c\",\"g\"]},apple:{channels:3,labels:[\"r16\",\"g16\",\"b16\"]},gray:{channels:1,labels:[\"gray\"]}};aoe.exports=hr;for(let t of Object.keys(hr)){if(!(\"channels\"in hr[t]))throw new Error(\"missing channels property: \"+t);if(!(\"labels\"in hr[t]))throw new Error(\"missing channel labels property: \"+t);if(hr[t].labels.length!==hr[t].channels)throw new Error(\"channel and label counts mismatch: \"+t);let{channels:e,labels:r}=hr[t];delete hr[t].channels,delete hr[t].labels,Object.defineProperty(hr[t],\"channels\",{value:e}),Object.defineProperty(hr[t],\"labels\",{value:r})}hr.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(e,r,s),n=Math.max(e,r,s),c=n-a,f,p;n===a?f=0:e===n?f=(r-s)/c:r===n?f=2+(s-e)/c:s===n&&(f=4+(e-r)/c),f=Math.min(f*60,360),f<0&&(f+=360);let h=(a+n)/2;return n===a?p=0:h<=.5?p=c/(n+a):p=c/(2-n-a),[f,p*100,h*100]};hr.rgb.hsv=function(t){let e,r,s,a,n,c=t[0]/255,f=t[1]/255,p=t[2]/255,h=Math.max(c,f,p),E=h-Math.min(c,f,p),C=function(S){return(h-S)/6/E+1/2};return E===0?(a=0,n=0):(n=E/h,e=C(c),r=C(f),s=C(p),c===h?a=s-r:f===h?a=1/3+e-s:p===h&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[a*360,n*100,h*100]};hr.rgb.hwb=function(t){let e=t[0],r=t[1],s=t[2],a=hr.rgb.hsl(t)[0],n=1/255*Math.min(e,Math.min(r,s));return s=1-1/255*Math.max(e,Math.max(r,s)),[a,n*100,s*100]};hr.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(1-e,1-r,1-s),n=(1-e-a)/(1-a)||0,c=(1-r-a)/(1-a)||0,f=(1-s-a)/(1-a)||0;return[n*100,c*100,f*100,a*100]};function Dtt(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}hr.rgb.keyword=function(t){let e=ooe[t];if(e)return e;let r=1/0,s;for(let a of Object.keys(EB)){let n=EB[a],c=Dtt(t,n);c<r&&(r=c,s=a)}return s};hr.keyword.rgb=function(t){return EB[t]};hr.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92;let a=e*.4124+r*.3576+s*.1805,n=e*.2126+r*.7152+s*.0722,c=e*.0193+r*.1192+s*.9505;return[a*100,n*100,c*100]};hr.rgb.lab=function(t){let e=hr.rgb.xyz(t),r=e[0],s=e[1],a=e[2];r/=95.047,s/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let n=116*s-16,c=500*(r-s),f=200*(s-a);return[n,c,f]};hr.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a,n,c;if(r===0)return c=s*255,[c,c,c];s<.5?a=s*(1+r):a=s+r-s*r;let f=2*s-a,p=[0,0,0];for(let h=0;h<3;h++)n=e+1/3*-(h-1),n<0&&n++,n>1&&n--,6*n<1?c=f+(a-f)*6*n:2*n<1?c=a:3*n<2?c=f+(a-f)*(2/3-n)*6:c=f,p[h]=c*255;return p};hr.hsl.hsv=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=r,n=Math.max(s,.01);s*=2,r*=s<=1?s:2-s,a*=n<=1?n:2-n;let c=(s+r)/2,f=s===0?2*a/(n+a):2*r/(s+r);return[e,f*100,c*100]};hr.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,s=t[2]/100,a=Math.floor(e)%6,n=e-Math.floor(e),c=255*s*(1-r),f=255*s*(1-r*n),p=255*s*(1-r*(1-n));switch(s*=255,a){case 0:return[s,p,c];case 1:return[f,s,c];case 2:return[c,s,p];case 3:return[c,f,s];case 4:return[p,c,s];case 5:return[s,c,f]}};hr.hsv.hsl=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=Math.max(s,.01),n,c;c=(2-r)*s;let f=(2-r)*a;return n=r*a,n/=f<=1?f:2-f,n=n||0,c/=2,[e,n*100,c*100]};hr.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a=r+s,n;a>1&&(r/=a,s/=a);let c=Math.floor(6*e),f=1-s;n=6*e-c,c&1&&(n=1-n);let p=r+n*(f-r),h,E,C;switch(c){default:case 6:case 0:h=f,E=p,C=r;break;case 1:h=p,E=f,C=r;break;case 2:h=r,E=f,C=p;break;case 3:h=r,E=p,C=f;break;case 4:h=p,E=r,C=f;break;case 5:h=f,E=r,C=p;break}return[h*255,E*255,C*255]};hr.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a=t[3]/100,n=1-Math.min(1,e*(1-a)+a),c=1-Math.min(1,r*(1-a)+a),f=1-Math.min(1,s*(1-a)+a);return[n*255,c*255,f*255]};hr.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a,n,c;return a=e*3.2406+r*-1.5372+s*-.4986,n=e*-.9689+r*1.8758+s*.0415,c=e*.0557+r*-.204+s*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),c=Math.min(Math.max(0,c),1),[a*255,n*255,c*255]};hr.xyz.lab=function(t){let e=t[0],r=t[1],s=t[2];e/=95.047,r/=100,s/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let a=116*r-16,n=500*(e-r),c=200*(r-s);return[a,n,c]};hr.lab.xyz=function(t){let e=t[0],r=t[1],s=t[2],a,n,c;n=(e+16)/116,a=r/500+n,c=n-s/200;let f=n**3,p=a**3,h=c**3;return n=f>.008856?f:(n-16/116)/7.787,a=p>.008856?p:(a-16/116)/7.787,c=h>.008856?h:(c-16/116)/7.787,a*=95.047,n*=100,c*=108.883,[a,n,c]};hr.lab.lch=function(t){let e=t[0],r=t[1],s=t[2],a;a=Math.atan2(s,r)*360/2/Math.PI,a<0&&(a+=360);let c=Math.sqrt(r*r+s*s);return[e,c,a]};hr.lch.lab=function(t){let e=t[0],r=t[1],a=t[2]/360*2*Math.PI,n=r*Math.cos(a),c=r*Math.sin(a);return[e,n,c]};hr.rgb.ansi16=function(t,e=null){let[r,s,a]=t,n=e===null?hr.rgb.hsv(t)[2]:e;if(n=Math.round(n/50),n===0)return 30;let c=30+(Math.round(a/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return n===2&&(c+=60),c};hr.hsv.ansi16=function(t){return hr.rgb.ansi16(hr.hsv.rgb(t),t[2])};hr.rgb.ansi256=function(t){let e=t[0],r=t[1],s=t[2];return e===r&&r===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)};hr.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,s=(e&1)*r*255,a=(e>>1&1)*r*255,n=(e>>2&1)*r*255;return[s,a,n]};hr.ansi256.rgb=function(t){if(t>=232){let n=(t-232)*10+8;return[n,n,n]}t-=16;let e,r=Math.floor(t/36)/5*255,s=Math.floor((e=t%36)/6)/5*255,a=e%6/5*255;return[r,s,a]};hr.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return\"000000\".substring(r.length)+r};hr.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split(\"\").map(f=>f+f).join(\"\"));let s=parseInt(r,16),a=s>>16&255,n=s>>8&255,c=s&255;return[a,n,c]};hr.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.max(Math.max(e,r),s),n=Math.min(Math.min(e,r),s),c=a-n,f,p;return c<1?f=n/(1-c):f=0,c<=0?p=0:a===e?p=(r-s)/c%6:a===r?p=2+(s-e)/c:p=4+(e-r)/c,p/=6,p%=1,[p*360,c*100,f*100]};hr.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=r<.5?2*e*r:2*e*(1-r),a=0;return s<1&&(a=(r-.5*s)/(1-s)),[t[0],s*100,a*100]};hr.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=e*r,a=0;return s<1&&(a=(r-s)/(1-s)),[t[0],s*100,a*100]};hr.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100;if(r===0)return[s*255,s*255,s*255];let a=[0,0,0],n=e%1*6,c=n%1,f=1-c,p=0;switch(Math.floor(n)){case 0:a[0]=1,a[1]=c,a[2]=0;break;case 1:a[0]=f,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=c;break;case 3:a[0]=0,a[1]=f,a[2]=1;break;case 4:a[0]=c,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=f}return p=(1-r)*s,[(r*a[0]+p)*255,(r*a[1]+p)*255,(r*a[2]+p)*255]};hr.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e),a=0;return s>0&&(a=e/s),[t[0],a*100,s*100]};hr.hcg.hsl=function(t){let e=t[1]/100,s=t[2]/100*(1-e)+.5*e,a=0;return s>0&&s<.5?a=e/(2*s):s>=.5&&s<1&&(a=e/(2*(1-s))),[t[0],a*100,s*100]};hr.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e);return[t[0],(s-e)*100,(1-s)*100]};hr.hwb.hcg=function(t){let e=t[1]/100,s=1-t[2]/100,a=s-e,n=0;return a<1&&(n=(s-a)/(1-a)),[t[0],a*100,n*100]};hr.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};hr.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};hr.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};hr.gray.hsl=function(t){return[0,0,t[0]]};hr.gray.hsv=hr.gray.hsl;hr.gray.hwb=function(t){return[0,100,t[0]]};hr.gray.cmyk=function(t){return[0,0,0,t[0]]};hr.gray.lab=function(t){return[t[0],0,0]};hr.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,s=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return\"000000\".substring(s.length)+s};hr.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var coe=L((FYt,loe)=>{var mk=i4();function btt(){let t={},e=Object.keys(mk);for(let r=e.length,s=0;s<r;s++)t[e[s]]={distance:-1,parent:null};return t}function Ptt(t){let e=btt(),r=[t];for(e[t].distance=0;r.length;){let s=r.pop(),a=Object.keys(mk[s]);for(let n=a.length,c=0;c<n;c++){let f=a[c],p=e[f];p.distance===-1&&(p.distance=e[s].distance+1,p.parent=s,r.unshift(f))}}return e}function xtt(t,e){return function(r){return e(t(r))}}function ktt(t,e){let r=[e[t].parent,t],s=mk[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)r.unshift(e[a].parent),s=xtt(mk[e[a].parent][a],s),a=e[a].parent;return s.conversion=r,s}loe.exports=function(t){let e=Ptt(t),r={},s=Object.keys(e);for(let a=s.length,n=0;n<a;n++){let c=s[n];e[c].parent!==null&&(r[c]=ktt(c,e))}return r}});var foe=L((NYt,uoe)=>{var s4=i4(),Qtt=coe(),PE={},Ttt=Object.keys(s4);function Rtt(t){let e=function(...r){let s=r[0];return s==null?s:(s.length>1&&(r=s),t(r))};return\"conversion\"in t&&(e.conversion=t.conversion),e}function Ftt(t){let e=function(...r){let s=r[0];if(s==null)return s;s.length>1&&(r=s);let a=t(r);if(typeof a==\"object\")for(let n=a.length,c=0;c<n;c++)a[c]=Math.round(a[c]);return a};return\"conversion\"in t&&(e.conversion=t.conversion),e}Ttt.forEach(t=>{PE[t]={},Object.defineProperty(PE[t],\"channels\",{value:s4[t].channels}),Object.defineProperty(PE[t],\"labels\",{value:s4[t].labels});let e=Qtt(t);Object.keys(e).forEach(s=>{let a=e[s];PE[t][s]=Ftt(a),PE[t][s].raw=Rtt(a)})});uoe.exports=PE});var IB=L((OYt,doe)=>{\"use strict\";var Aoe=(t,e)=>(...r)=>`\\x1B[${t(...r)+e}m`,poe=(t,e)=>(...r)=>{let s=t(...r);return`\\x1B[${38+e};5;${s}m`},hoe=(t,e)=>(...r)=>{let s=t(...r);return`\\x1B[${38+e};2;${s[0]};${s[1]};${s[2]}m`},yk=t=>t,goe=(t,e,r)=>[t,e,r],xE=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let s=r();return Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0}),s},enumerable:!0,configurable:!0})},o4,kE=(t,e,r,s)=>{o4===void 0&&(o4=foe());let a=s?10:0,n={};for(let[c,f]of Object.entries(o4)){let p=c===\"ansi16\"?\"ansi\":c;c===e?n[p]=t(r,a):typeof f==\"object\"&&(n[p]=t(f[e],a))}return n};function Ntt(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,s]of Object.entries(e)){for(let[a,n]of Object.entries(s))e[a]={open:`\\x1B[${n[0]}m`,close:`\\x1B[${n[1]}m`},s[a]=e[a],t.set(n[0],n[1]);Object.defineProperty(e,r,{value:s,enumerable:!1})}return Object.defineProperty(e,\"codes\",{value:t,enumerable:!1}),e.color.close=\"\\x1B[39m\",e.bgColor.close=\"\\x1B[49m\",xE(e.color,\"ansi\",()=>kE(Aoe,\"ansi16\",yk,!1)),xE(e.color,\"ansi256\",()=>kE(poe,\"ansi256\",yk,!1)),xE(e.color,\"ansi16m\",()=>kE(hoe,\"rgb\",goe,!1)),xE(e.bgColor,\"ansi\",()=>kE(Aoe,\"ansi16\",yk,!0)),xE(e.bgColor,\"ansi256\",()=>kE(poe,\"ansi256\",yk,!0)),xE(e.bgColor,\"ansi16m\",()=>kE(hoe,\"rgb\",goe,!0)),e}Object.defineProperty(doe,\"exports\",{enumerable:!0,get:Ntt})});var yoe=L((LYt,moe)=>{\"use strict\";moe.exports=(t,e=process.argv)=>{let r=t.startsWith(\"-\")?\"\":t.length===1?\"-\":\"--\",s=e.indexOf(r+t),a=e.indexOf(\"--\");return s!==-1&&(a===-1||s<a)}});var c4=L((MYt,Ioe)=>{\"use strict\";var Ott=ye(\"os\"),Eoe=ye(\"tty\"),Dc=yoe(),{env:Ps}=process,f0;Dc(\"no-color\")||Dc(\"no-colors\")||Dc(\"color=false\")||Dc(\"color=never\")?f0=0:(Dc(\"color\")||Dc(\"colors\")||Dc(\"color=true\")||Dc(\"color=always\"))&&(f0=1);\"FORCE_COLOR\"in Ps&&(Ps.FORCE_COLOR===\"true\"?f0=1:Ps.FORCE_COLOR===\"false\"?f0=0:f0=Ps.FORCE_COLOR.length===0?1:Math.min(parseInt(Ps.FORCE_COLOR,10),3));function a4(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function l4(t,e){if(f0===0)return 0;if(Dc(\"color=16m\")||Dc(\"color=full\")||Dc(\"color=truecolor\"))return 3;if(Dc(\"color=256\"))return 2;if(t&&!e&&f0===void 0)return 0;let r=f0||0;if(Ps.TERM===\"dumb\")return r;if(process.platform===\"win32\"){let s=Ott.release().split(\".\");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if(\"CI\"in Ps)return[\"TRAVIS\",\"CIRCLECI\",\"APPVEYOR\",\"GITLAB_CI\"].some(s=>s in Ps)||Ps.CI_NAME===\"codeship\"?1:r;if(\"TEAMCITY_VERSION\"in Ps)return/^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(Ps.TEAMCITY_VERSION)?1:0;if(\"GITHUB_ACTIONS\"in Ps)return 1;if(Ps.COLORTERM===\"truecolor\")return 3;if(\"TERM_PROGRAM\"in Ps){let s=parseInt((Ps.TERM_PROGRAM_VERSION||\"\").split(\".\")[0],10);switch(Ps.TERM_PROGRAM){case\"iTerm.app\":return s>=3?3:2;case\"Apple_Terminal\":return 2}}return/-256(color)?$/i.test(Ps.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ps.TERM)||\"COLORTERM\"in Ps?1:r}function Ltt(t){let e=l4(t,t&&t.isTTY);return a4(e)}Ioe.exports={supportsColor:Ltt,stdout:a4(l4(!0,Eoe.isatty(1))),stderr:a4(l4(!0,Eoe.isatty(2)))}});var woe=L((_Yt,Coe)=>{\"use strict\";var Mtt=(t,e,r)=>{let s=t.indexOf(e);if(s===-1)return t;let a=e.length,n=0,c=\"\";do c+=t.substr(n,s-n)+e+r,n=s+a,s=t.indexOf(e,n);while(s!==-1);return c+=t.substr(n),c},_tt=(t,e,r,s)=>{let a=0,n=\"\";do{let c=t[s-1]===\"\\r\";n+=t.substr(a,(c?s-1:s)-a)+e+(c?`\\r\n`:`\n`)+r,a=s+1,s=t.indexOf(`\n`,a)}while(s!==-1);return n+=t.substr(a),n};Coe.exports={stringReplaceAll:Mtt,stringEncaseCRLFWithFirstIndex:_tt}});var boe=L((UYt,Doe)=>{\"use strict\";var Utt=/(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi,Boe=/(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g,Htt=/^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/,jtt=/\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.)|([^\\\\])/gi,qtt=new Map([[\"n\",`\n`],[\"r\",\"\\r\"],[\"t\",\"\t\"],[\"b\",\"\\b\"],[\"f\",\"\\f\"],[\"v\",\"\\v\"],[\"0\",\"\\0\"],[\"\\\\\",\"\\\\\"],[\"e\",\"\\x1B\"],[\"a\",\"\\x07\"]]);function Soe(t){let e=t[0]===\"u\",r=t[1]===\"{\";return e&&!r&&t.length===5||t[0]===\"x\"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):qtt.get(t)||t}function Gtt(t,e){let r=[],s=e.trim().split(/\\s*,\\s*/g),a;for(let n of s){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(Htt))r.push(a[2].replace(jtt,(f,p,h)=>p?Soe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function Wtt(t){Boe.lastIndex=0;let e=[],r;for(;(r=Boe.exec(t))!==null;){let s=r[1];if(r[2]){let a=Gtt(s,r[2]);e.push([s].concat(a))}else e.push([s])}return e}function voe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let s=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in s))throw new Error(`Unknown Chalk style: ${a}`);s=n.length>0?s[a](...n):s[a]}return s}Doe.exports=(t,e)=>{let r=[],s=[],a=[];if(e.replace(Utt,(n,c,f,p,h,E)=>{if(c)a.push(Soe(c));else if(p){let C=a.join(\"\");a=[],s.push(r.length===0?C:voe(t,r)(C)),r.push({inverse:f,styles:Wtt(p)})}else if(h){if(r.length===0)throw new Error(\"Found extraneous } in Chalk template literal\");s.push(voe(t,r)(a.join(\"\"))),a=[],r.pop()}else a.push(E)}),s.push(a.join(\"\")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?\"\":\"s\"} (\\`}\\`)`;throw new Error(n)}return s.join(\"\")}});var g4=L((HYt,Qoe)=>{\"use strict\";var CB=IB(),{stdout:f4,stderr:A4}=c4(),{stringReplaceAll:Ytt,stringEncaseCRLFWithFirstIndex:Vtt}=woe(),Poe=[\"ansi\",\"ansi\",\"ansi256\",\"ansi16m\"],QE=Object.create(null),Ktt=(t,e={})=>{if(e.level>3||e.level<0)throw new Error(\"The `level` option should be an integer from 0 to 3\");let r=f4?f4.level:0;t.level=e.level===void 0?r:e.level},p4=class{constructor(e){return xoe(e)}},xoe=t=>{let e={};return Ktt(e,t),e.template=(...r)=>Ztt(e.template,...r),Object.setPrototypeOf(e,Ek.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error(\"`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.\")},e.template.Instance=p4,e.template};function Ek(t){return xoe(t)}for(let[t,e]of Object.entries(CB))QE[t]={get(){let r=Ik(this,h4(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};QE.visible={get(){let t=Ik(this,this._styler,!0);return Object.defineProperty(this,\"visible\",{value:t}),t}};var koe=[\"rgb\",\"hex\",\"keyword\",\"hsl\",\"hsv\",\"hwb\",\"ansi\",\"ansi256\"];for(let t of koe)QE[t]={get(){let{level:e}=this;return function(...r){let s=h4(CB.color[Poe[e]][t](...r),CB.color.close,this._styler);return Ik(this,s,this._isEmpty)}}};for(let t of koe){let e=\"bg\"+t[0].toUpperCase()+t.slice(1);QE[e]={get(){let{level:r}=this;return function(...s){let a=h4(CB.bgColor[Poe[r]][t](...s),CB.bgColor.close,this._styler);return Ik(this,a,this._isEmpty)}}}}var Jtt=Object.defineProperties(()=>{},{...QE,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),h4=(t,e,r)=>{let s,a;return r===void 0?(s=t,a=e):(s=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:a,parent:r}},Ik=(t,e,r)=>{let s=(...a)=>ztt(s,a.length===1?\"\"+a[0]:a.join(\" \"));return s.__proto__=Jtt,s._generator=t,s._styler=e,s._isEmpty=r,s},ztt=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?\"\":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:a}=r;if(e.indexOf(\"\\x1B\")!==-1)for(;r!==void 0;)e=Ytt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`\n`);return n!==-1&&(e=Vtt(e,a,s,n)),s+e+a},u4,Ztt=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(\" \");let s=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(s[n-1]).replace(/[{}\\\\]/g,\"\\\\$&\"),String(r.raw[n]));return u4===void 0&&(u4=boe()),u4(t,a.join(\"\"))};Object.defineProperties(Ek.prototype,QE);var wB=Ek();wB.supportsColor=f4;wB.stderr=Ek({level:A4?A4.level:0});wB.stderr.supportsColor=A4;wB.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:\"None\",1:\"Basic\",2:\"Ansi256\",3:\"TrueColor\"};Qoe.exports=wB});var Ck=L(bc=>{\"use strict\";bc.isInteger=t=>typeof t==\"number\"?Number.isInteger(t):typeof t==\"string\"&&t.trim()!==\"\"?Number.isInteger(Number(t)):!1;bc.find=(t,e)=>t.nodes.find(r=>r.type===e);bc.exceedsLimit=(t,e,r=1,s)=>s===!1||!bc.isInteger(t)||!bc.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=s;bc.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];s&&(r&&s.type===r||s.type===\"open\"||s.type===\"close\")&&s.escaped!==!0&&(s.value=\"\\\\\"+s.value,s.escaped=!0)};bc.encloseBrace=t=>t.type!==\"brace\"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);bc.isInvalidBrace=t=>t.type!==\"brace\"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;bc.isOpenOrClose=t=>t.type===\"open\"||t.type===\"close\"?!0:t.open===!0||t.close===!0;bc.reduce=t=>t.reduce((e,r)=>(r.type===\"text\"&&e.push(r.value),r.type===\"range\"&&(r.type=\"text\"),e),[]);bc.flatten=(...t)=>{let e=[],r=s=>{for(let a=0;a<s.length;a++){let n=s[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var wk=L((qYt,Roe)=>{\"use strict\";var Toe=Ck();Roe.exports=(t,e={})=>{let r=(s,a={})=>{let n=e.escapeInvalid&&Toe.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f=\"\";if(s.value)return(n||c)&&Toe.isOpenOrClose(s)?\"\\\\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let p of s.nodes)f+=r(p);return f};return r(t)}});var Noe=L((GYt,Foe)=>{\"use strict\";Foe.exports=function(t){return typeof t==\"number\"?t-t===0:typeof t==\"string\"&&t.trim()!==\"\"?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var Goe=L((WYt,qoe)=>{\"use strict\";var Ooe=Noe(),Gd=(t,e,r)=>{if(Ooe(t)===!1)throw new TypeError(\"toRegexRange: expected the first argument to be a number\");if(e===void 0||t===e)return String(t);if(Ooe(e)===!1)throw new TypeError(\"toRegexRange: expected the second argument to be a number.\");let s={relaxZeros:!0,...r};typeof s.strictZeros==\"boolean\"&&(s.relaxZeros=s.strictZeros===!1);let a=String(s.relaxZeros),n=String(s.shorthand),c=String(s.capture),f=String(s.wrap),p=t+\":\"+e+\"=\"+a+n+c+f;if(Gd.cache.hasOwnProperty(p))return Gd.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let R=t+\"|\"+e;return s.capture?`(${R})`:s.wrap===!1?R:`(?:${R})`}let C=joe(t)||joe(e),S={min:t,max:e,a:h,b:E},P=[],I=[];if(C&&(S.isPadded=C,S.maxLen=String(S.max).length),h<0){let R=E<0?Math.abs(E):1;I=Loe(R,Math.abs(h),S,s),h=S.a=0}return E>=0&&(P=Loe(h,E,S,s)),S.negatives=I,S.positives=P,S.result=Xtt(I,P,s),s.capture===!0?S.result=`(${S.result})`:s.wrap!==!1&&P.length+I.length>1&&(S.result=`(?:${S.result})`),Gd.cache[p]=S,S.result};function Xtt(t,e,r){let s=d4(t,e,\"-\",!1,r)||[],a=d4(e,t,\"\",!1,r)||[],n=d4(t,e,\"-?\",!0,r)||[];return s.concat(n).concat(a).join(\"|\")}function $tt(t,e){let r=1,s=1,a=_oe(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=_oe(t,r);for(a=Uoe(e+1,s)-1;t<a&&a<=e;)n.add(a),s+=1,a=Uoe(e+1,s)-1;return n=[...n],n.sort(rrt),n}function ert(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let s=trt(t,e),a=s.length,n=\"\",c=0;for(let f=0;f<a;f++){let[p,h]=s[f];p===h?n+=p:p!==\"0\"||h!==\"9\"?n+=nrt(p,h,r):c++}return c&&(n+=r.shorthand===!0?\"\\\\d\":\"[0-9]\"),{pattern:n,count:[c],digits:a}}function Loe(t,e,r,s){let a=$tt(t,e),n=[],c=t,f;for(let p=0;p<a.length;p++){let h=a[p],E=ert(String(c),String(h),s),C=\"\";if(!r.isPadded&&f&&f.pattern===E.pattern){f.count.length>1&&f.count.pop(),f.count.push(E.count[0]),f.string=f.pattern+Hoe(f.count),c=h+1;continue}r.isPadded&&(C=irt(h,r,s)),E.string=C+E.pattern+Hoe(E.count),n.push(E),c=h+1,f=E}return n}function d4(t,e,r,s,a){let n=[];for(let c of t){let{string:f}=c;!s&&!Moe(e,\"string\",f)&&n.push(r+f),s&&Moe(e,\"string\",f)&&n.push(r+f)}return n}function trt(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function rrt(t,e){return t>e?1:e>t?-1:0}function Moe(t,e,r){return t.some(s=>s[e]===r)}function _oe(t,e){return Number(String(t).slice(0,-e)+\"9\".repeat(e))}function Uoe(t,e){return t-t%Math.pow(10,e)}function Hoe(t){let[e=0,r=\"\"]=t;return r||e>1?`{${e+(r?\",\"+r:\"\")}}`:\"\"}function nrt(t,e,r){return`[${t}${e-t===1?\"\":\"-\"}${e}]`}function joe(t){return/^-?(0+)\\d/.test(t)}function irt(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(s){case 0:return\"\";case 1:return a?\"0?\":\"0\";case 2:return a?\"0{0,2}\":\"00\";default:return a?`0{0,${s}}`:`0{${s}}`}}Gd.cache={};Gd.clearCache=()=>Gd.cache={};qoe.exports=Gd});var E4=L((YYt,Xoe)=>{\"use strict\";var srt=ye(\"util\"),Voe=Goe(),Woe=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t),ort=t=>e=>t===!0?Number(e):String(e),m4=t=>typeof t==\"number\"||typeof t==\"string\"&&t!==\"\",BB=t=>Number.isInteger(+t),y4=t=>{let e=`${t}`,r=-1;if(e[0]===\"-\"&&(e=e.slice(1)),e===\"0\")return!1;for(;e[++r]===\"0\";);return r>0},art=(t,e,r)=>typeof t==\"string\"||typeof e==\"string\"?!0:r.stringify===!0,lrt=(t,e,r)=>{if(e>0){let s=t[0]===\"-\"?\"-\":\"\";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,\"0\")}return r===!1?String(t):t},Yoe=(t,e)=>{let r=t[0]===\"-\"?\"-\":\"\";for(r&&(t=t.slice(1),e--);t.length<e;)t=\"0\"+t;return r?\"-\"+t:t},crt=(t,e)=>{t.negatives.sort((c,f)=>c<f?-1:c>f?1:0),t.positives.sort((c,f)=>c<f?-1:c>f?1:0);let r=e.capture?\"\":\"?:\",s=\"\",a=\"\",n;return t.positives.length&&(s=t.positives.join(\"|\")),t.negatives.length&&(a=`-(${r}${t.negatives.join(\"|\")})`),s&&a?n=`${s}|${a}`:n=s||a,e.wrap?`(${r}${n})`:n},Koe=(t,e,r,s)=>{if(r)return Voe(t,e,{wrap:!1,...s});let a=String.fromCharCode(t);if(t===e)return a;let n=String.fromCharCode(e);return`[${a}-${n}]`},Joe=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===!0,a=r.capture?\"\":\"?:\";return s?`(${a}${t.join(\"|\")})`:t.join(\"|\")}return Voe(t,e,r)},zoe=(...t)=>new RangeError(\"Invalid range arguments: \"+srt.inspect(...t)),Zoe=(t,e,r)=>{if(r.strictRanges===!0)throw zoe([t,e]);return[]},urt=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step \"${t}\" to be a number`);return[]},frt=(t,e,r=1,s={})=>{let a=Number(t),n=Number(e);if(!Number.isInteger(a)||!Number.isInteger(n)){if(s.strictRanges===!0)throw zoe([t,e]);return[]}a===0&&(a=0),n===0&&(n=0);let c=a>n,f=String(t),p=String(e),h=String(r);r=Math.max(Math.abs(r),1);let E=y4(f)||y4(p)||y4(h),C=E?Math.max(f.length,p.length,h.length):0,S=E===!1&&art(t,e,s)===!1,P=s.transform||ort(S);if(s.toRegex&&r===1)return Koe(Yoe(t,C),Yoe(e,C),!0,s);let I={negatives:[],positives:[]},R=W=>I[W<0?\"negatives\":\"positives\"].push(Math.abs(W)),N=[],U=0;for(;c?a>=n:a<=n;)s.toRegex===!0&&r>1?R(a):N.push(lrt(P(a,U),C,S)),a=c?a-r:a+r,U++;return s.toRegex===!0?r>1?crt(I,s):Joe(N,null,{wrap:!1,...s}):N},Art=(t,e,r=1,s={})=>{if(!BB(t)&&t.length>1||!BB(e)&&e.length>1)return Zoe(t,e,s);let a=s.transform||(S=>String.fromCharCode(S)),n=`${t}`.charCodeAt(0),c=`${e}`.charCodeAt(0),f=n>c,p=Math.min(n,c),h=Math.max(n,c);if(s.toRegex&&r===1)return Koe(p,h,!1,s);let E=[],C=0;for(;f?n>=c:n<=c;)E.push(a(n,C)),n=f?n-r:n+r,C++;return s.toRegex===!0?Joe(E,null,{wrap:!1,options:s}):E},Bk=(t,e,r,s={})=>{if(e==null&&m4(t))return[t];if(!m4(t)||!m4(e))return Zoe(t,e,s);if(typeof r==\"function\")return Bk(t,e,1,{transform:r});if(Woe(r))return Bk(t,e,0,r);let a={...s};return a.capture===!0&&(a.wrap=!0),r=r||a.step||1,BB(r)?BB(t)&&BB(e)?frt(t,e,r,a):Art(t,e,Math.max(Math.abs(r),1),a):r!=null&&!Woe(r)?urt(r,a):Bk(t,e,1,r)};Xoe.exports=Bk});var tae=L((VYt,eae)=>{\"use strict\";var prt=E4(),$oe=Ck(),hrt=(t,e={})=>{let r=(s,a={})=>{let n=$oe.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f=n===!0||c===!0,p=e.escapeInvalid===!0?\"\\\\\":\"\",h=\"\";if(s.isOpen===!0||s.isClose===!0)return p+s.value;if(s.type===\"open\")return f?p+s.value:\"(\";if(s.type===\"close\")return f?p+s.value:\")\";if(s.type===\"comma\")return s.prev.type===\"comma\"?\"\":f?s.value:\"|\";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let E=$oe.reduce(s.nodes),C=prt(...E,{...e,wrap:!1,toRegex:!0});if(C.length!==0)return E.length>1&&C.length>1?`(${C})`:C}if(s.nodes)for(let E of s.nodes)h+=r(E,s);return h};return r(t)};eae.exports=hrt});var iae=L((KYt,nae)=>{\"use strict\";var grt=E4(),rae=wk(),TE=Ck(),Wd=(t=\"\",e=\"\",r=!1)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?TE.flatten(e).map(a=>`{${a}}`):e;for(let a of t)if(Array.isArray(a))for(let n of a)s.push(Wd(n,e,r));else for(let n of e)r===!0&&typeof n==\"string\"&&(n=`{${n}}`),s.push(Array.isArray(n)?Wd(a,n,r):a+n);return TE.flatten(s)},drt=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(a,n={})=>{a.queue=[];let c=n,f=n.queue;for(;c.type!==\"brace\"&&c.type!==\"root\"&&c.parent;)c=c.parent,f=c.queue;if(a.invalid||a.dollar){f.push(Wd(f.pop(),rae(a,e)));return}if(a.type===\"brace\"&&a.invalid!==!0&&a.nodes.length===2){f.push(Wd(f.pop(),[\"{}\"]));return}if(a.nodes&&a.ranges>0){let C=TE.reduce(a.nodes);if(TE.exceedsLimit(...C,e.step,r))throw new RangeError(\"expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.\");let S=grt(...C,e);S.length===0&&(S=rae(a,e)),f.push(Wd(f.pop(),S)),a.nodes=[];return}let p=TE.encloseBrace(a),h=a.queue,E=a;for(;E.type!==\"brace\"&&E.type!==\"root\"&&E.parent;)E=E.parent,h=E.queue;for(let C=0;C<a.nodes.length;C++){let S=a.nodes[C];if(S.type===\"comma\"&&a.type===\"brace\"){C===1&&h.push(\"\"),h.push(\"\");continue}if(S.type===\"close\"){f.push(Wd(f.pop(),h,p));continue}if(S.value&&S.type!==\"open\"){h.push(Wd(h.pop(),S.value));continue}S.nodes&&s(S,a)}return h};return TE.flatten(s(t))};nae.exports=drt});var oae=L((JYt,sae)=>{\"use strict\";sae.exports={MAX_LENGTH:1024*64,CHAR_0:\"0\",CHAR_9:\"9\",CHAR_UPPERCASE_A:\"A\",CHAR_LOWERCASE_A:\"a\",CHAR_UPPERCASE_Z:\"Z\",CHAR_LOWERCASE_Z:\"z\",CHAR_LEFT_PARENTHESES:\"(\",CHAR_RIGHT_PARENTHESES:\")\",CHAR_ASTERISK:\"*\",CHAR_AMPERSAND:\"&\",CHAR_AT:\"@\",CHAR_BACKSLASH:\"\\\\\",CHAR_BACKTICK:\"`\",CHAR_CARRIAGE_RETURN:\"\\r\",CHAR_CIRCUMFLEX_ACCENT:\"^\",CHAR_COLON:\":\",CHAR_COMMA:\",\",CHAR_DOLLAR:\"$\",CHAR_DOT:\".\",CHAR_DOUBLE_QUOTE:'\"',CHAR_EQUAL:\"=\",CHAR_EXCLAMATION_MARK:\"!\",CHAR_FORM_FEED:\"\\f\",CHAR_FORWARD_SLASH:\"/\",CHAR_HASH:\"#\",CHAR_HYPHEN_MINUS:\"-\",CHAR_LEFT_ANGLE_BRACKET:\"<\",CHAR_LEFT_CURLY_BRACE:\"{\",CHAR_LEFT_SQUARE_BRACKET:\"[\",CHAR_LINE_FEED:`\n`,CHAR_NO_BREAK_SPACE:\"\\xA0\",CHAR_PERCENT:\"%\",CHAR_PLUS:\"+\",CHAR_QUESTION_MARK:\"?\",CHAR_RIGHT_ANGLE_BRACKET:\">\",CHAR_RIGHT_CURLY_BRACE:\"}\",CHAR_RIGHT_SQUARE_BRACKET:\"]\",CHAR_SEMICOLON:\";\",CHAR_SINGLE_QUOTE:\"'\",CHAR_SPACE:\" \",CHAR_TAB:\"\t\",CHAR_UNDERSCORE:\"_\",CHAR_VERTICAL_LINE:\"|\",CHAR_ZERO_WIDTH_NOBREAK_SPACE:\"\\uFEFF\"}});var fae=L((zYt,uae)=>{\"use strict\";var mrt=wk(),{MAX_LENGTH:aae,CHAR_BACKSLASH:I4,CHAR_BACKTICK:yrt,CHAR_COMMA:Ert,CHAR_DOT:Irt,CHAR_LEFT_PARENTHESES:Crt,CHAR_RIGHT_PARENTHESES:wrt,CHAR_LEFT_CURLY_BRACE:Brt,CHAR_RIGHT_CURLY_BRACE:vrt,CHAR_LEFT_SQUARE_BRACKET:lae,CHAR_RIGHT_SQUARE_BRACKET:cae,CHAR_DOUBLE_QUOTE:Srt,CHAR_SINGLE_QUOTE:Drt,CHAR_NO_BREAK_SPACE:brt,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Prt}=oae(),xrt=(t,e={})=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");let r=e||{},s=typeof r.maxLength==\"number\"?Math.min(aae,r.maxLength):aae;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let a={type:\"root\",input:t,nodes:[]},n=[a],c=a,f=a,p=0,h=t.length,E=0,C=0,S,P={},I=()=>t[E++],R=N=>{if(N.type===\"text\"&&f.type===\"dot\"&&(f.type=\"text\"),f&&f.type===\"text\"&&N.type===\"text\"){f.value+=N.value;return}return c.nodes.push(N),N.parent=c,N.prev=f,f=N,N};for(R({type:\"bos\"});E<h;)if(c=n[n.length-1],S=I(),!(S===Prt||S===brt)){if(S===I4){R({type:\"text\",value:(e.keepEscaping?S:\"\")+I()});continue}if(S===cae){R({type:\"text\",value:\"\\\\\"+S});continue}if(S===lae){p++;let N=!0,U;for(;E<h&&(U=I());){if(S+=U,U===lae){p++;continue}if(U===I4){S+=I();continue}if(U===cae&&(p--,p===0))break}R({type:\"text\",value:S});continue}if(S===Crt){c=R({type:\"paren\",nodes:[]}),n.push(c),R({type:\"text\",value:S});continue}if(S===wrt){if(c.type!==\"paren\"){R({type:\"text\",value:S});continue}c=n.pop(),R({type:\"text\",value:S}),c=n[n.length-1];continue}if(S===Srt||S===Drt||S===yrt){let N=S,U;for(e.keepQuotes!==!0&&(S=\"\");E<h&&(U=I());){if(U===I4){S+=U+I();continue}if(U===N){e.keepQuotes===!0&&(S+=U);break}S+=U}R({type:\"text\",value:S});continue}if(S===Brt){C++;let U={type:\"brace\",open:!0,close:!1,dollar:f.value&&f.value.slice(-1)===\"$\"||c.dollar===!0,depth:C,commas:0,ranges:0,nodes:[]};c=R(U),n.push(c),R({type:\"open\",value:S});continue}if(S===vrt){if(c.type!==\"brace\"){R({type:\"text\",value:S});continue}let N=\"close\";c=n.pop(),c.close=!0,R({type:N,value:S}),C--,c=n[n.length-1];continue}if(S===Ert&&C>0){if(c.ranges>0){c.ranges=0;let N=c.nodes.shift();c.nodes=[N,{type:\"text\",value:mrt(c)}]}R({type:\"comma\",value:S}),c.commas++;continue}if(S===Irt&&C>0&&c.commas===0){let N=c.nodes;if(C===0||N.length===0){R({type:\"text\",value:S});continue}if(f.type===\"dot\"){if(c.range=[],f.value+=S,f.type=\"range\",c.nodes.length!==3&&c.nodes.length!==5){c.invalid=!0,c.ranges=0,f.type=\"text\";continue}c.ranges++,c.args=[];continue}if(f.type===\"range\"){N.pop();let U=N[N.length-1];U.value+=f.value+S,f=U,c.ranges--;continue}R({type:\"dot\",value:S});continue}R({type:\"text\",value:S})}do if(c=n.pop(),c.type!==\"root\"){c.nodes.forEach(W=>{W.nodes||(W.type===\"open\"&&(W.isOpen=!0),W.type===\"close\"&&(W.isClose=!0),W.nodes||(W.type=\"text\"),W.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(c);N.nodes.splice(U,1,...c.nodes)}while(n.length>0);return R({type:\"eos\"}),a};uae.exports=xrt});var hae=L((ZYt,pae)=>{\"use strict\";var Aae=wk(),krt=tae(),Qrt=iae(),Trt=fae(),ql=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let a=ql.create(s,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(ql.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};ql.parse=(t,e={})=>Trt(t,e);ql.stringify=(t,e={})=>Aae(typeof t==\"string\"?ql.parse(t,e):t,e);ql.compile=(t,e={})=>(typeof t==\"string\"&&(t=ql.parse(t,e)),krt(t,e));ql.expand=(t,e={})=>{typeof t==\"string\"&&(t=ql.parse(t,e));let r=Qrt(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};ql.create=(t,e={})=>t===\"\"||t.length<3?[t]:e.expand!==!0?ql.compile(t,e):ql.expand(t,e);pae.exports=ql});var vB=L((XYt,Eae)=>{\"use strict\";var Rrt=ye(\"path\"),Kf=\"\\\\\\\\/\",gae=`[^${Kf}]`,Pp=\"\\\\.\",Frt=\"\\\\+\",Nrt=\"\\\\?\",vk=\"\\\\/\",Ort=\"(?=.)\",dae=\"[^/]\",C4=`(?:${vk}|$)`,mae=`(?:^|${vk})`,w4=`${Pp}{1,2}${C4}`,Lrt=`(?!${Pp})`,Mrt=`(?!${mae}${w4})`,_rt=`(?!${Pp}{0,1}${C4})`,Urt=`(?!${w4})`,Hrt=`[^.${vk}]`,jrt=`${dae}*?`,yae={DOT_LITERAL:Pp,PLUS_LITERAL:Frt,QMARK_LITERAL:Nrt,SLASH_LITERAL:vk,ONE_CHAR:Ort,QMARK:dae,END_ANCHOR:C4,DOTS_SLASH:w4,NO_DOT:Lrt,NO_DOTS:Mrt,NO_DOT_SLASH:_rt,NO_DOTS_SLASH:Urt,QMARK_NO_DOT:Hrt,STAR:jrt,START_ANCHOR:mae},qrt={...yae,SLASH_LITERAL:`[${Kf}]`,QMARK:gae,STAR:`${gae}*?`,DOTS_SLASH:`${Pp}{1,2}(?:[${Kf}]|$)`,NO_DOT:`(?!${Pp})`,NO_DOTS:`(?!(?:^|[${Kf}])${Pp}{1,2}(?:[${Kf}]|$))`,NO_DOT_SLASH:`(?!${Pp}{0,1}(?:[${Kf}]|$))`,NO_DOTS_SLASH:`(?!${Pp}{1,2}(?:[${Kf}]|$))`,QMARK_NO_DOT:`[^.${Kf}]`,START_ANCHOR:`(?:^|[${Kf}])`,END_ANCHOR:`(?:[${Kf}]|$)`},Grt={alnum:\"a-zA-Z0-9\",alpha:\"a-zA-Z\",ascii:\"\\\\x00-\\\\x7F\",blank:\" \\\\t\",cntrl:\"\\\\x00-\\\\x1F\\\\x7F\",digit:\"0-9\",graph:\"\\\\x21-\\\\x7E\",lower:\"a-z\",print:\"\\\\x20-\\\\x7E \",punct:\"\\\\-!\\\"#$%&'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~\",space:\" \\\\t\\\\r\\\\n\\\\v\\\\f\",upper:\"A-Z\",word:\"A-Za-z0-9_\",xdigit:\"A-Fa-f0-9\"};Eae.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Grt,REGEX_BACKSLASH:/\\\\(?![*+?^${}(|)[\\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\\].,$*+?^{}()|\\\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\\\?)((\\W)(\\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,REPLACEMENTS:{\"***\":\"*\",\"**/**\":\"**\",\"**/**/**\":\"**\"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Rrt.sep,extglobChars(t){return{\"!\":{type:\"negate\",open:\"(?:(?!(?:\",close:`))${t.STAR})`},\"?\":{type:\"qmark\",open:\"(?:\",close:\")?\"},\"+\":{type:\"plus\",open:\"(?:\",close:\")+\"},\"*\":{type:\"star\",open:\"(?:\",close:\")*\"},\"@\":{type:\"at\",open:\"(?:\",close:\")\"}}},globChars(t){return t===!0?qrt:yae}}});var SB=L(al=>{\"use strict\";var Wrt=ye(\"path\"),Yrt=process.platform===\"win32\",{REGEX_BACKSLASH:Vrt,REGEX_REMOVE_BACKSLASH:Krt,REGEX_SPECIAL_CHARS:Jrt,REGEX_SPECIAL_CHARS_GLOBAL:zrt}=vB();al.isObject=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t);al.hasRegexChars=t=>Jrt.test(t);al.isRegexChar=t=>t.length===1&&al.hasRegexChars(t);al.escapeRegex=t=>t.replace(zrt,\"\\\\$1\");al.toPosixSlashes=t=>t.replace(Vrt,\"/\");al.removeBackslashes=t=>t.replace(Krt,e=>e===\"\\\\\"?\"\":e);al.supportsLookbehinds=()=>{let t=process.version.slice(1).split(\".\").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};al.isWindows=t=>t&&typeof t.windows==\"boolean\"?t.windows:Yrt===!0||Wrt.sep===\"\\\\\";al.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]===\"\\\\\"?al.escapeLast(t,e,s-1):`${t.slice(0,s)}\\\\${t.slice(s)}`};al.removePrefix=(t,e={})=>{let r=t;return r.startsWith(\"./\")&&(r=r.slice(2),e.prefix=\"./\"),r};al.wrapOutput=(t,e={},r={})=>{let s=r.contains?\"\":\"^\",a=r.contains?\"\":\"$\",n=`${s}(?:${t})${a}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n}});var bae=L((eVt,Dae)=>{\"use strict\";var Iae=SB(),{CHAR_ASTERISK:B4,CHAR_AT:Zrt,CHAR_BACKWARD_SLASH:DB,CHAR_COMMA:Xrt,CHAR_DOT:v4,CHAR_EXCLAMATION_MARK:S4,CHAR_FORWARD_SLASH:Sae,CHAR_LEFT_CURLY_BRACE:D4,CHAR_LEFT_PARENTHESES:b4,CHAR_LEFT_SQUARE_BRACKET:$rt,CHAR_PLUS:ent,CHAR_QUESTION_MARK:Cae,CHAR_RIGHT_CURLY_BRACE:tnt,CHAR_RIGHT_PARENTHESES:wae,CHAR_RIGHT_SQUARE_BRACKET:rnt}=vB(),Bae=t=>t===Sae||t===DB,vae=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},nnt=(t,e)=>{let r=e||{},s=t.length-1,a=r.parts===!0||r.scanToEnd===!0,n=[],c=[],f=[],p=t,h=-1,E=0,C=0,S=!1,P=!1,I=!1,R=!1,N=!1,U=!1,W=!1,te=!1,ie=!1,Ae=!1,ce=0,me,pe,Be={value:\"\",depth:0,isGlob:!1},Ce=()=>h>=s,g=()=>p.charCodeAt(h+1),we=()=>(me=pe,p.charCodeAt(++h));for(;h<s;){pe=we();let De;if(pe===DB){W=Be.backslashes=!0,pe=we(),pe===D4&&(U=!0);continue}if(U===!0||pe===D4){for(ce++;Ce()!==!0&&(pe=we());){if(pe===DB){W=Be.backslashes=!0,we();continue}if(pe===D4){ce++;continue}if(U!==!0&&pe===v4&&(pe=we())===v4){if(S=Be.isBrace=!0,I=Be.isGlob=!0,Ae=!0,a===!0)continue;break}if(U!==!0&&pe===Xrt){if(S=Be.isBrace=!0,I=Be.isGlob=!0,Ae=!0,a===!0)continue;break}if(pe===tnt&&(ce--,ce===0)){U=!1,S=Be.isBrace=!0,Ae=!0;break}}if(a===!0)continue;break}if(pe===Sae){if(n.push(h),c.push(Be),Be={value:\"\",depth:0,isGlob:!1},Ae===!0)continue;if(me===v4&&h===E+1){E+=2;continue}C=h+1;continue}if(r.noext!==!0&&(pe===ent||pe===Zrt||pe===B4||pe===Cae||pe===S4)===!0&&g()===b4){if(I=Be.isGlob=!0,R=Be.isExtglob=!0,Ae=!0,pe===S4&&h===E&&(ie=!0),a===!0){for(;Ce()!==!0&&(pe=we());){if(pe===DB){W=Be.backslashes=!0,pe=we();continue}if(pe===wae){I=Be.isGlob=!0,Ae=!0;break}}continue}break}if(pe===B4){if(me===B4&&(N=Be.isGlobstar=!0),I=Be.isGlob=!0,Ae=!0,a===!0)continue;break}if(pe===Cae){if(I=Be.isGlob=!0,Ae=!0,a===!0)continue;break}if(pe===$rt){for(;Ce()!==!0&&(De=we());){if(De===DB){W=Be.backslashes=!0,we();continue}if(De===rnt){P=Be.isBracket=!0,I=Be.isGlob=!0,Ae=!0;break}}if(a===!0)continue;break}if(r.nonegate!==!0&&pe===S4&&h===E){te=Be.negated=!0,E++;continue}if(r.noparen!==!0&&pe===b4){if(I=Be.isGlob=!0,a===!0){for(;Ce()!==!0&&(pe=we());){if(pe===b4){W=Be.backslashes=!0,pe=we();continue}if(pe===wae){Ae=!0;break}}continue}break}if(I===!0){if(Ae=!0,a===!0)continue;break}}r.noext===!0&&(R=!1,I=!1);let Ee=p,fe=\"\",se=\"\";E>0&&(fe=p.slice(0,E),p=p.slice(E),C-=E),Ee&&I===!0&&C>0?(Ee=p.slice(0,C),se=p.slice(C)):I===!0?(Ee=\"\",se=p):Ee=p,Ee&&Ee!==\"\"&&Ee!==\"/\"&&Ee!==p&&Bae(Ee.charCodeAt(Ee.length-1))&&(Ee=Ee.slice(0,-1)),r.unescape===!0&&(se&&(se=Iae.removeBackslashes(se)),Ee&&W===!0&&(Ee=Iae.removeBackslashes(Ee)));let X={prefix:fe,input:t,start:E,base:Ee,glob:se,isBrace:S,isBracket:P,isGlob:I,isExtglob:R,isGlobstar:N,negated:te,negatedExtglob:ie};if(r.tokens===!0&&(X.maxDepth=0,Bae(pe)||c.push(Be),X.tokens=c),r.parts===!0||r.tokens===!0){let De;for(let Re=0;Re<n.length;Re++){let gt=De?De+1:E,j=n[Re],rt=t.slice(gt,j);r.tokens&&(Re===0&&E!==0?(c[Re].isPrefix=!0,c[Re].value=fe):c[Re].value=rt,vae(c[Re]),X.maxDepth+=c[Re].depth),(Re!==0||rt!==\"\")&&f.push(rt),De=j}if(De&&De+1<t.length){let Re=t.slice(De+1);f.push(Re),r.tokens&&(c[c.length-1].value=Re,vae(c[c.length-1]),X.maxDepth+=c[c.length-1].depth)}X.slashes=n,X.parts=f}return X};Dae.exports=nnt});var kae=L((tVt,xae)=>{\"use strict\";var Sk=vB(),Gl=SB(),{MAX_LENGTH:Dk,POSIX_REGEX_SOURCE:int,REGEX_NON_SPECIAL_CHARS:snt,REGEX_SPECIAL_CHARS_BACKREF:ont,REPLACEMENTS:Pae}=Sk,ant=(t,e)=>{if(typeof e.expandRange==\"function\")return e.expandRange(...t,e);t.sort();let r=`[${t.join(\"-\")}]`;try{new RegExp(r)}catch{return t.map(a=>Gl.escapeRegex(a)).join(\"..\")}return r},RE=(t,e)=>`Missing ${t}: \"${e}\" - use \"\\\\\\\\${e}\" to match literal characters`,P4=(t,e)=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");t=Pae[t]||t;let r={...e},s=typeof r.maxLength==\"number\"?Math.min(Dk,r.maxLength):Dk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);let n={type:\"bos\",value:\"\",output:r.prepend||\"\"},c=[n],f=r.capture?\"\":\"?:\",p=Gl.isWindows(e),h=Sk.globChars(p),E=Sk.extglobChars(h),{DOT_LITERAL:C,PLUS_LITERAL:S,SLASH_LITERAL:P,ONE_CHAR:I,DOTS_SLASH:R,NO_DOT:N,NO_DOT_SLASH:U,NO_DOTS_SLASH:W,QMARK:te,QMARK_NO_DOT:ie,STAR:Ae,START_ANCHOR:ce}=h,me=x=>`(${f}(?:(?!${ce}${x.dot?R:C}).)*?)`,pe=r.dot?\"\":N,Be=r.dot?te:ie,Ce=r.bash===!0?me(r):Ae;r.capture&&(Ce=`(${Ce})`),typeof r.noext==\"boolean\"&&(r.noextglob=r.noext);let g={input:t,index:-1,start:0,dot:r.dot===!0,consumed:\"\",output:\"\",prefix:\"\",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:c};t=Gl.removePrefix(t,g),a=t.length;let we=[],Ee=[],fe=[],se=n,X,De=()=>g.index===a-1,Re=g.peek=(x=1)=>t[g.index+x],gt=g.advance=()=>t[++g.index]||\"\",j=()=>t.slice(g.index+1),rt=(x=\"\",w=0)=>{g.consumed+=x,g.index+=w},Fe=x=>{g.output+=x.output!=null?x.output:x.value,rt(x.value)},Ne=()=>{let x=1;for(;Re()===\"!\"&&(Re(2)!==\"(\"||Re(3)===\"?\");)gt(),g.start++,x++;return x%2===0?!1:(g.negated=!0,g.start++,!0)},Pe=x=>{g[x]++,fe.push(x)},Ye=x=>{g[x]--,fe.pop()},ke=x=>{if(se.type===\"globstar\"){let w=g.braces>0&&(x.type===\"comma\"||x.type===\"brace\"),b=x.extglob===!0||we.length&&(x.type===\"pipe\"||x.type===\"paren\");x.type!==\"slash\"&&x.type!==\"paren\"&&!w&&!b&&(g.output=g.output.slice(0,-se.output.length),se.type=\"star\",se.value=\"*\",se.output=Ce,g.output+=se.output)}if(we.length&&x.type!==\"paren\"&&(we[we.length-1].inner+=x.value),(x.value||x.output)&&Fe(x),se&&se.type===\"text\"&&x.type===\"text\"){se.value+=x.value,se.output=(se.output||\"\")+x.value;return}x.prev=se,c.push(x),se=x},it=(x,w)=>{let b={...E[w],conditions:1,inner:\"\"};b.prev=se,b.parens=g.parens,b.output=g.output;let y=(r.capture?\"(\":\"\")+b.open;Pe(\"parens\"),ke({type:x,value:w,output:g.output?\"\":I}),ke({type:\"paren\",extglob:!0,value:gt(),output:y}),we.push(b)},_e=x=>{let w=x.close+(r.capture?\")\":\"\"),b;if(x.type===\"negate\"){let y=Ce;if(x.inner&&x.inner.length>1&&x.inner.includes(\"/\")&&(y=me(r)),(y!==Ce||De()||/^\\)+$/.test(j()))&&(w=x.close=`)$))${y}`),x.inner.includes(\"*\")&&(b=j())&&/^\\.[^\\\\/.]+$/.test(b)){let F=P4(b,{...e,fastpaths:!1}).output;w=x.close=`)${F})${y})`}x.prev.type===\"bos\"&&(g.negatedExtglob=!0)}ke({type:\"paren\",extglob:!0,value:X,output:w}),Ye(\"parens\")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\\]{}\"])/.test(t)){let x=!1,w=t.replace(ont,(b,y,F,z,Z,$)=>z===\"\\\\\"?(x=!0,b):z===\"?\"?y?y+z+(Z?te.repeat(Z.length):\"\"):$===0?Be+(Z?te.repeat(Z.length):\"\"):te.repeat(F.length):z===\".\"?C.repeat(F.length):z===\"*\"?y?y+z+(Z?Ce:\"\"):Ce:y?b:`\\\\${b}`);return x===!0&&(r.unescape===!0?w=w.replace(/\\\\/g,\"\"):w=w.replace(/\\\\+/g,b=>b.length%2===0?\"\\\\\\\\\":b?\"\\\\\":\"\")),w===t&&r.contains===!0?(g.output=t,g):(g.output=Gl.wrapOutput(w,g,e),g)}for(;!De();){if(X=gt(),X===\"\\0\")continue;if(X===\"\\\\\"){let b=Re();if(b===\"/\"&&r.bash!==!0||b===\".\"||b===\";\")continue;if(!b){X+=\"\\\\\",ke({type:\"text\",value:X});continue}let y=/^\\\\+/.exec(j()),F=0;if(y&&y[0].length>2&&(F=y[0].length,g.index+=F,F%2!==0&&(X+=\"\\\\\")),r.unescape===!0?X=gt():X+=gt(),g.brackets===0){ke({type:\"text\",value:X});continue}}if(g.brackets>0&&(X!==\"]\"||se.value===\"[\"||se.value===\"[^\")){if(r.posix!==!1&&X===\":\"){let b=se.value.slice(1);if(b.includes(\"[\")&&(se.posix=!0,b.includes(\":\"))){let y=se.value.lastIndexOf(\"[\"),F=se.value.slice(0,y),z=se.value.slice(y+2),Z=int[z];if(Z){se.value=F+Z,g.backtrack=!0,gt(),!n.output&&c.indexOf(se)===1&&(n.output=I);continue}}}(X===\"[\"&&Re()!==\":\"||X===\"-\"&&Re()===\"]\")&&(X=`\\\\${X}`),X===\"]\"&&(se.value===\"[\"||se.value===\"[^\")&&(X=`\\\\${X}`),r.posix===!0&&X===\"!\"&&se.value===\"[\"&&(X=\"^\"),se.value+=X,Fe({value:X});continue}if(g.quotes===1&&X!=='\"'){X=Gl.escapeRegex(X),se.value+=X,Fe({value:X});continue}if(X==='\"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&ke({type:\"text\",value:X});continue}if(X===\"(\"){Pe(\"parens\"),ke({type:\"paren\",value:X});continue}if(X===\")\"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(RE(\"opening\",\"(\"));let b=we[we.length-1];if(b&&g.parens===b.parens+1){_e(we.pop());continue}ke({type:\"paren\",value:X,output:g.parens?\")\":\"\\\\)\"}),Ye(\"parens\");continue}if(X===\"[\"){if(r.nobracket===!0||!j().includes(\"]\")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(RE(\"closing\",\"]\"));X=`\\\\${X}`}else Pe(\"brackets\");ke({type:\"bracket\",value:X});continue}if(X===\"]\"){if(r.nobracket===!0||se&&se.type===\"bracket\"&&se.value.length===1){ke({type:\"text\",value:X,output:`\\\\${X}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(RE(\"opening\",\"[\"));ke({type:\"text\",value:X,output:`\\\\${X}`});continue}Ye(\"brackets\");let b=se.value.slice(1);if(se.posix!==!0&&b[0]===\"^\"&&!b.includes(\"/\")&&(X=`/${X}`),se.value+=X,Fe({value:X}),r.literalBrackets===!1||Gl.hasRegexChars(b))continue;let y=Gl.escapeRegex(se.value);if(g.output=g.output.slice(0,-se.value.length),r.literalBrackets===!0){g.output+=y,se.value=y;continue}se.value=`(${f}${y}|${se.value})`,g.output+=se.value;continue}if(X===\"{\"&&r.nobrace!==!0){Pe(\"braces\");let b={type:\"brace\",value:X,output:\"(\",outputIndex:g.output.length,tokensIndex:g.tokens.length};Ee.push(b),ke(b);continue}if(X===\"}\"){let b=Ee[Ee.length-1];if(r.nobrace===!0||!b){ke({type:\"text\",value:X,output:X});continue}let y=\")\";if(b.dots===!0){let F=c.slice(),z=[];for(let Z=F.length-1;Z>=0&&(c.pop(),F[Z].type!==\"brace\");Z--)F[Z].type!==\"dots\"&&z.unshift(F[Z].value);y=ant(z,r),g.backtrack=!0}if(b.comma!==!0&&b.dots!==!0){let F=g.output.slice(0,b.outputIndex),z=g.tokens.slice(b.tokensIndex);b.value=b.output=\"\\\\{\",X=y=\"\\\\}\",g.output=F;for(let Z of z)g.output+=Z.output||Z.value}ke({type:\"brace\",value:X,output:y}),Ye(\"braces\"),Ee.pop();continue}if(X===\"|\"){we.length>0&&we[we.length-1].conditions++,ke({type:\"text\",value:X});continue}if(X===\",\"){let b=X,y=Ee[Ee.length-1];y&&fe[fe.length-1]===\"braces\"&&(y.comma=!0,b=\"|\"),ke({type:\"comma\",value:X,output:b});continue}if(X===\"/\"){if(se.type===\"dot\"&&g.index===g.start+1){g.start=g.index+1,g.consumed=\"\",g.output=\"\",c.pop(),se=n;continue}ke({type:\"slash\",value:X,output:P});continue}if(X===\".\"){if(g.braces>0&&se.type===\"dot\"){se.value===\".\"&&(se.output=C);let b=Ee[Ee.length-1];se.type=\"dots\",se.output+=X,se.value+=X,b.dots=!0;continue}if(g.braces+g.parens===0&&se.type!==\"bos\"&&se.type!==\"slash\"){ke({type:\"text\",value:X,output:C});continue}ke({type:\"dot\",value:X,output:C});continue}if(X===\"?\"){if(!(se&&se.value===\"(\")&&r.noextglob!==!0&&Re()===\"(\"&&Re(2)!==\"?\"){it(\"qmark\",X);continue}if(se&&se.type===\"paren\"){let y=Re(),F=X;if(y===\"<\"&&!Gl.supportsLookbehinds())throw new Error(\"Node.js v10 or higher is required for regex lookbehinds\");(se.value===\"(\"&&!/[!=<:]/.test(y)||y===\"<\"&&!/<([!=]|\\w+>)/.test(j()))&&(F=`\\\\${X}`),ke({type:\"text\",value:X,output:F});continue}if(r.dot!==!0&&(se.type===\"slash\"||se.type===\"bos\")){ke({type:\"qmark\",value:X,output:ie});continue}ke({type:\"qmark\",value:X,output:te});continue}if(X===\"!\"){if(r.noextglob!==!0&&Re()===\"(\"&&(Re(2)!==\"?\"||!/[!=<:]/.test(Re(3)))){it(\"negate\",X);continue}if(r.nonegate!==!0&&g.index===0){Ne();continue}}if(X===\"+\"){if(r.noextglob!==!0&&Re()===\"(\"&&Re(2)!==\"?\"){it(\"plus\",X);continue}if(se&&se.value===\"(\"||r.regex===!1){ke({type:\"plus\",value:X,output:S});continue}if(se&&(se.type===\"bracket\"||se.type===\"paren\"||se.type===\"brace\")||g.parens>0){ke({type:\"plus\",value:X});continue}ke({type:\"plus\",value:S});continue}if(X===\"@\"){if(r.noextglob!==!0&&Re()===\"(\"&&Re(2)!==\"?\"){ke({type:\"at\",extglob:!0,value:X,output:\"\"});continue}ke({type:\"text\",value:X});continue}if(X!==\"*\"){(X===\"$\"||X===\"^\")&&(X=`\\\\${X}`);let b=snt.exec(j());b&&(X+=b[0],g.index+=b[0].length),ke({type:\"text\",value:X});continue}if(se&&(se.type===\"globstar\"||se.star===!0)){se.type=\"star\",se.star=!0,se.value+=X,se.output=Ce,g.backtrack=!0,g.globstar=!0,rt(X);continue}let x=j();if(r.noextglob!==!0&&/^\\([^?]/.test(x)){it(\"star\",X);continue}if(se.type===\"star\"){if(r.noglobstar===!0){rt(X);continue}let b=se.prev,y=b.prev,F=b.type===\"slash\"||b.type===\"bos\",z=y&&(y.type===\"star\"||y.type===\"globstar\");if(r.bash===!0&&(!F||x[0]&&x[0]!==\"/\")){ke({type:\"star\",value:X,output:\"\"});continue}let Z=g.braces>0&&(b.type===\"comma\"||b.type===\"brace\"),$=we.length&&(b.type===\"pipe\"||b.type===\"paren\");if(!F&&b.type!==\"paren\"&&!Z&&!$){ke({type:\"star\",value:X,output:\"\"});continue}for(;x.slice(0,3)===\"/**\";){let oe=t[g.index+4];if(oe&&oe!==\"/\")break;x=x.slice(3),rt(\"/**\",3)}if(b.type===\"bos\"&&De()){se.type=\"globstar\",se.value+=X,se.output=me(r),g.output=se.output,g.globstar=!0,rt(X);continue}if(b.type===\"slash\"&&b.prev.type!==\"bos\"&&!z&&De()){g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type=\"globstar\",se.output=me(r)+(r.strictSlashes?\")\":\"|$)\"),se.value+=X,g.globstar=!0,g.output+=b.output+se.output,rt(X);continue}if(b.type===\"slash\"&&b.prev.type!==\"bos\"&&x[0]===\"/\"){let oe=x[1]!==void 0?\"|$\":\"\";g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type=\"globstar\",se.output=`${me(r)}${P}|${P}${oe})`,se.value+=X,g.output+=b.output+se.output,g.globstar=!0,rt(X+gt()),ke({type:\"slash\",value:\"/\",output:\"\"});continue}if(b.type===\"bos\"&&x[0]===\"/\"){se.type=\"globstar\",se.value+=X,se.output=`(?:^|${P}|${me(r)}${P})`,g.output=se.output,g.globstar=!0,rt(X+gt()),ke({type:\"slash\",value:\"/\",output:\"\"});continue}g.output=g.output.slice(0,-se.output.length),se.type=\"globstar\",se.output=me(r),se.value+=X,g.output+=se.output,g.globstar=!0,rt(X);continue}let w={type:\"star\",value:X,output:Ce};if(r.bash===!0){w.output=\".*?\",(se.type===\"bos\"||se.type===\"slash\")&&(w.output=pe+w.output),ke(w);continue}if(se&&(se.type===\"bracket\"||se.type===\"paren\")&&r.regex===!0){w.output=X,ke(w);continue}(g.index===g.start||se.type===\"slash\"||se.type===\"dot\")&&(se.type===\"dot\"?(g.output+=U,se.output+=U):r.dot===!0?(g.output+=W,se.output+=W):(g.output+=pe,se.output+=pe),Re()!==\"*\"&&(g.output+=I,se.output+=I)),ke(w)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(RE(\"closing\",\"]\"));g.output=Gl.escapeLast(g.output,\"[\"),Ye(\"brackets\")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(RE(\"closing\",\")\"));g.output=Gl.escapeLast(g.output,\"(\"),Ye(\"parens\")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(RE(\"closing\",\"}\"));g.output=Gl.escapeLast(g.output,\"{\"),Ye(\"braces\")}if(r.strictSlashes!==!0&&(se.type===\"star\"||se.type===\"bracket\")&&ke({type:\"maybe_slash\",value:\"\",output:`${P}?`}),g.backtrack===!0){g.output=\"\";for(let x of g.tokens)g.output+=x.output!=null?x.output:x.value,x.suffix&&(g.output+=x.suffix)}return g};P4.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength==\"number\"?Math.min(Dk,r.maxLength):Dk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);t=Pae[t]||t;let n=Gl.isWindows(e),{DOT_LITERAL:c,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:E,NO_DOTS:C,NO_DOTS_SLASH:S,STAR:P,START_ANCHOR:I}=Sk.globChars(n),R=r.dot?C:E,N=r.dot?S:E,U=r.capture?\"\":\"?:\",W={negated:!1,prefix:\"\"},te=r.bash===!0?\".*?\":P;r.capture&&(te=`(${te})`);let ie=pe=>pe.noglobstar===!0?te:`(${U}(?:(?!${I}${pe.dot?h:c}).)*?)`,Ae=pe=>{switch(pe){case\"*\":return`${R}${p}${te}`;case\".*\":return`${c}${p}${te}`;case\"*.*\":return`${R}${te}${c}${p}${te}`;case\"*/*\":return`${R}${te}${f}${p}${N}${te}`;case\"**\":return R+ie(r);case\"**/*\":return`(?:${R}${ie(r)}${f})?${N}${p}${te}`;case\"**/*.*\":return`(?:${R}${ie(r)}${f})?${N}${te}${c}${p}${te}`;case\"**/.*\":return`(?:${R}${ie(r)}${f})?${c}${p}${te}`;default:{let Be=/^(.*?)\\.(\\w+)$/.exec(pe);if(!Be)return;let Ce=Ae(Be[1]);return Ce?Ce+c+Be[2]:void 0}}},ce=Gl.removePrefix(t,W),me=Ae(ce);return me&&r.strictSlashes!==!0&&(me+=`${f}?`),me};xae.exports=P4});var Tae=L((rVt,Qae)=>{\"use strict\";var lnt=ye(\"path\"),cnt=bae(),x4=kae(),k4=SB(),unt=vB(),fnt=t=>t&&typeof t==\"object\"&&!Array.isArray(t),Xi=(t,e,r=!1)=>{if(Array.isArray(t)){let E=t.map(S=>Xi(S,e,r));return S=>{for(let P of E){let I=P(S);if(I)return I}return!1}}let s=fnt(t)&&t.tokens&&t.input;if(t===\"\"||typeof t!=\"string\"&&!s)throw new TypeError(\"Expected pattern to be a non-empty string\");let a=e||{},n=k4.isWindows(e),c=s?Xi.compileRe(t,e):Xi.makeRe(t,e,!1,!0),f=c.state;delete c.state;let p=()=>!1;if(a.ignore){let E={...e,ignore:null,onMatch:null,onResult:null};p=Xi(a.ignore,E,r)}let h=(E,C=!1)=>{let{isMatch:S,match:P,output:I}=Xi.test(E,c,e,{glob:t,posix:n}),R={glob:t,state:f,regex:c,posix:n,input:E,output:I,match:P,isMatch:S};return typeof a.onResult==\"function\"&&a.onResult(R),S===!1?(R.isMatch=!1,C?R:!1):p(E)?(typeof a.onIgnore==\"function\"&&a.onIgnore(R),R.isMatch=!1,C?R:!1):(typeof a.onMatch==\"function\"&&a.onMatch(R),C?R:!0)};return r&&(h.state=f),h};Xi.test=(t,e,r,{glob:s,posix:a}={})=>{if(typeof t!=\"string\")throw new TypeError(\"Expected input to be a string\");if(t===\"\")return{isMatch:!1,output:\"\"};let n=r||{},c=n.format||(a?k4.toPosixSlashes:null),f=t===s,p=f&&c?c(t):t;return f===!1&&(p=c?c(t):t,f=p===s),(f===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?f=Xi.matchBase(t,e,r,a):f=e.exec(p)),{isMatch:!!f,match:f,output:p}};Xi.matchBase=(t,e,r,s=k4.isWindows(r))=>(e instanceof RegExp?e:Xi.makeRe(e,r)).test(lnt.basename(t));Xi.isMatch=(t,e,r)=>Xi(e,r)(t);Xi.parse=(t,e)=>Array.isArray(t)?t.map(r=>Xi.parse(r,e)):x4(t,{...e,fastpaths:!1});Xi.scan=(t,e)=>cnt(t,e);Xi.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let a=e||{},n=a.contains?\"\":\"^\",c=a.contains?\"\":\"$\",f=`${n}(?:${t.output})${c}`;t&&t.negated===!0&&(f=`^(?!${f}).*$`);let p=Xi.toRegex(f,e);return s===!0&&(p.state=t),p};Xi.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!=\"string\")throw new TypeError(\"Expected a non-empty string\");let a={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]===\".\"||t[0]===\"*\")&&(a.output=x4.fastpaths(t,e)),a.output||(a=x4(t,e)),Xi.compileRe(a,e,r,s)};Xi.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?\"i\":\"\"))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Xi.constants=unt;Qae.exports=Xi});var Fae=L((nVt,Rae)=>{\"use strict\";Rae.exports=Tae()});var Sa=L((iVt,Mae)=>{\"use strict\";var Oae=ye(\"util\"),Lae=hae(),Jf=Fae(),Q4=SB(),Nae=t=>t===\"\"||t===\"./\",ki=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,a=new Set,n=new Set,c=0,f=E=>{n.add(E.output),r&&r.onResult&&r.onResult(E)};for(let E=0;E<e.length;E++){let C=Jf(String(e[E]),{...r,onResult:f},!0),S=C.state.negated||C.state.negatedExtglob;S&&c++;for(let P of t){let I=C(P,!0);(S?!I.isMatch:I.isMatch)&&(S?s.add(I.output):(s.delete(I.output),a.add(I.output)))}}let h=(c===e.length?[...n]:[...a]).filter(E=>!s.has(E));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for \"${e.join(\", \")}\"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(E=>E.replace(/\\\\/g,\"\")):e}return h};ki.match=ki;ki.matcher=(t,e)=>Jf(t,e);ki.isMatch=(t,e,r)=>Jf(e,r)(t);ki.any=ki.isMatch;ki.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,a=[],n=f=>{r.onResult&&r.onResult(f),a.push(f.output)},c=new Set(ki(t,e,{...r,onResult:n}));for(let f of a)c.has(f)||s.add(f);return[...s]};ki.contains=(t,e,r)=>{if(typeof t!=\"string\")throw new TypeError(`Expected a string: \"${Oae.inspect(t)}\"`);if(Array.isArray(e))return e.some(s=>ki.contains(t,s,r));if(typeof e==\"string\"){if(Nae(t)||Nae(e))return!1;if(t.includes(e)||t.startsWith(\"./\")&&t.slice(2).includes(e))return!0}return ki.isMatch(t,e,{...r,contains:!0})};ki.matchKeys=(t,e,r)=>{if(!Q4.isObject(t))throw new TypeError(\"Expected the first argument to be an object\");let s=ki(Object.keys(t),e,r),a={};for(let n of s)a[n]=t[n];return a};ki.some=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(s.some(c=>n(c)))return!0}return!1};ki.every=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(!s.every(c=>n(c)))return!1}return!0};ki.all=(t,e,r)=>{if(typeof t!=\"string\")throw new TypeError(`Expected a string: \"${Oae.inspect(t)}\"`);return[].concat(e).every(s=>Jf(s,r)(t))};ki.capture=(t,e,r)=>{let s=Q4.isWindows(r),n=Jf.makeRe(String(t),{...r,capture:!0}).exec(s?Q4.toPosixSlashes(e):e);if(n)return n.slice(1).map(c=>c===void 0?\"\":c)};ki.makeRe=(...t)=>Jf.makeRe(...t);ki.scan=(...t)=>Jf.scan(...t);ki.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[]))for(let a of Lae(String(s),e))r.push(Jf.parse(a,e));return r};ki.braces=(t,e)=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");return e&&e.nobrace===!0||!/\\{.*\\}/.test(t)?[t]:Lae(t,e)};ki.braceExpand=(t,e)=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");return ki.braces(t,{...e,expand:!0})};Mae.exports=ki});var Uae=L((sVt,_ae)=>{\"use strict\";_ae.exports=({onlyFirst:t=!1}={})=>{let e=[\"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))\"].join(\"|\");return new RegExp(e,t?void 0:\"g\")}});var bk=L((oVt,Hae)=>{\"use strict\";var Ant=Uae();Hae.exports=t=>typeof t==\"string\"?t.replace(Ant(),\"\"):t});var qae=L((aVt,jae)=>{function pnt(){this.__data__=[],this.size=0}jae.exports=pnt});var FE=L((lVt,Gae)=>{function hnt(t,e){return t===e||t!==t&&e!==e}Gae.exports=hnt});var bB=L((cVt,Wae)=>{var gnt=FE();function dnt(t,e){for(var r=t.length;r--;)if(gnt(t[r][0],e))return r;return-1}Wae.exports=dnt});var Vae=L((uVt,Yae)=>{var mnt=bB(),ynt=Array.prototype,Ent=ynt.splice;function Int(t){var e=this.__data__,r=mnt(e,t);if(r<0)return!1;var s=e.length-1;return r==s?e.pop():Ent.call(e,r,1),--this.size,!0}Yae.exports=Int});var Jae=L((fVt,Kae)=>{var Cnt=bB();function wnt(t){var e=this.__data__,r=Cnt(e,t);return r<0?void 0:e[r][1]}Kae.exports=wnt});var Zae=L((AVt,zae)=>{var Bnt=bB();function vnt(t){return Bnt(this.__data__,t)>-1}zae.exports=vnt});var $ae=L((pVt,Xae)=>{var Snt=bB();function Dnt(t,e){var r=this.__data__,s=Snt(r,t);return s<0?(++this.size,r.push([t,e])):r[s][1]=e,this}Xae.exports=Dnt});var PB=L((hVt,ele)=>{var bnt=qae(),Pnt=Vae(),xnt=Jae(),knt=Zae(),Qnt=$ae();function NE(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var s=t[e];this.set(s[0],s[1])}}NE.prototype.clear=bnt;NE.prototype.delete=Pnt;NE.prototype.get=xnt;NE.prototype.has=knt;NE.prototype.set=Qnt;ele.exports=NE});var rle=L((gVt,tle)=>{var Tnt=PB();function Rnt(){this.__data__=new Tnt,this.size=0}tle.exports=Rnt});var ile=L((dVt,nle)=>{function Fnt(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}nle.exports=Fnt});var ole=L((mVt,sle)=>{function Nnt(t){return this.__data__.get(t)}sle.exports=Nnt});var lle=L((yVt,ale)=>{function Ont(t){return this.__data__.has(t)}ale.exports=Ont});var T4=L((EVt,cle)=>{var Lnt=typeof global==\"object\"&&global&&global.Object===Object&&global;cle.exports=Lnt});var Pc=L((IVt,ule)=>{var Mnt=T4(),_nt=typeof self==\"object\"&&self&&self.Object===Object&&self,Unt=Mnt||_nt||Function(\"return this\")();ule.exports=Unt});var Yd=L((CVt,fle)=>{var Hnt=Pc(),jnt=Hnt.Symbol;fle.exports=jnt});var gle=L((wVt,hle)=>{var Ale=Yd(),ple=Object.prototype,qnt=ple.hasOwnProperty,Gnt=ple.toString,xB=Ale?Ale.toStringTag:void 0;function Wnt(t){var e=qnt.call(t,xB),r=t[xB];try{t[xB]=void 0;var s=!0}catch{}var a=Gnt.call(t);return s&&(e?t[xB]=r:delete t[xB]),a}hle.exports=Wnt});var mle=L((BVt,dle)=>{var Ynt=Object.prototype,Vnt=Ynt.toString;function Knt(t){return Vnt.call(t)}dle.exports=Knt});var Vd=L((vVt,Ile)=>{var yle=Yd(),Jnt=gle(),znt=mle(),Znt=\"[object Null]\",Xnt=\"[object Undefined]\",Ele=yle?yle.toStringTag:void 0;function $nt(t){return t==null?t===void 0?Xnt:Znt:Ele&&Ele in Object(t)?Jnt(t):znt(t)}Ile.exports=$nt});var Wl=L((SVt,Cle)=>{function eit(t){var e=typeof t;return t!=null&&(e==\"object\"||e==\"function\")}Cle.exports=eit});var Pk=L((DVt,wle)=>{var tit=Vd(),rit=Wl(),nit=\"[object AsyncFunction]\",iit=\"[object Function]\",sit=\"[object GeneratorFunction]\",oit=\"[object Proxy]\";function ait(t){if(!rit(t))return!1;var e=tit(t);return e==iit||e==sit||e==nit||e==oit}wle.exports=ait});var vle=L((bVt,Ble)=>{var lit=Pc(),cit=lit[\"__core-js_shared__\"];Ble.exports=cit});var ble=L((PVt,Dle)=>{var R4=vle(),Sle=function(){var t=/[^.]+$/.exec(R4&&R4.keys&&R4.keys.IE_PROTO||\"\");return t?\"Symbol(src)_1.\"+t:\"\"}();function uit(t){return!!Sle&&Sle in t}Dle.exports=uit});var F4=L((xVt,Ple)=>{var fit=Function.prototype,Ait=fit.toString;function pit(t){if(t!=null){try{return Ait.call(t)}catch{}try{return t+\"\"}catch{}}return\"\"}Ple.exports=pit});var kle=L((kVt,xle)=>{var hit=Pk(),git=ble(),dit=Wl(),mit=F4(),yit=/[\\\\^$.*+?()[\\]{}|]/g,Eit=/^\\[object .+?Constructor\\]$/,Iit=Function.prototype,Cit=Object.prototype,wit=Iit.toString,Bit=Cit.hasOwnProperty,vit=RegExp(\"^\"+wit.call(Bit).replace(yit,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");function Sit(t){if(!dit(t)||git(t))return!1;var e=hit(t)?vit:Eit;return e.test(mit(t))}xle.exports=Sit});var Tle=L((QVt,Qle)=>{function Dit(t,e){return t?.[e]}Qle.exports=Dit});var A0=L((TVt,Rle)=>{var bit=kle(),Pit=Tle();function xit(t,e){var r=Pit(t,e);return bit(r)?r:void 0}Rle.exports=xit});var xk=L((RVt,Fle)=>{var kit=A0(),Qit=Pc(),Tit=kit(Qit,\"Map\");Fle.exports=Tit});var kB=L((FVt,Nle)=>{var Rit=A0(),Fit=Rit(Object,\"create\");Nle.exports=Fit});var Mle=L((NVt,Lle)=>{var Ole=kB();function Nit(){this.__data__=Ole?Ole(null):{},this.size=0}Lle.exports=Nit});var Ule=L((OVt,_le)=>{function Oit(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}_le.exports=Oit});var jle=L((LVt,Hle)=>{var Lit=kB(),Mit=\"__lodash_hash_undefined__\",_it=Object.prototype,Uit=_it.hasOwnProperty;function Hit(t){var e=this.__data__;if(Lit){var r=e[t];return r===Mit?void 0:r}return Uit.call(e,t)?e[t]:void 0}Hle.exports=Hit});var Gle=L((MVt,qle)=>{var jit=kB(),qit=Object.prototype,Git=qit.hasOwnProperty;function Wit(t){var e=this.__data__;return jit?e[t]!==void 0:Git.call(e,t)}qle.exports=Wit});var Yle=L((_Vt,Wle)=>{var Yit=kB(),Vit=\"__lodash_hash_undefined__\";function Kit(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Yit&&e===void 0?Vit:e,this}Wle.exports=Kit});var Kle=L((UVt,Vle)=>{var Jit=Mle(),zit=Ule(),Zit=jle(),Xit=Gle(),$it=Yle();function OE(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var s=t[e];this.set(s[0],s[1])}}OE.prototype.clear=Jit;OE.prototype.delete=zit;OE.prototype.get=Zit;OE.prototype.has=Xit;OE.prototype.set=$it;Vle.exports=OE});var Zle=L((HVt,zle)=>{var Jle=Kle(),est=PB(),tst=xk();function rst(){this.size=0,this.__data__={hash:new Jle,map:new(tst||est),string:new Jle}}zle.exports=rst});var $le=L((jVt,Xle)=>{function nst(t){var e=typeof t;return e==\"string\"||e==\"number\"||e==\"symbol\"||e==\"boolean\"?t!==\"__proto__\":t===null}Xle.exports=nst});var QB=L((qVt,ece)=>{var ist=$le();function sst(t,e){var r=t.__data__;return ist(e)?r[typeof e==\"string\"?\"string\":\"hash\"]:r.map}ece.exports=sst});var rce=L((GVt,tce)=>{var ost=QB();function ast(t){var e=ost(this,t).delete(t);return this.size-=e?1:0,e}tce.exports=ast});var ice=L((WVt,nce)=>{var lst=QB();function cst(t){return lst(this,t).get(t)}nce.exports=cst});var oce=L((YVt,sce)=>{var ust=QB();function fst(t){return ust(this,t).has(t)}sce.exports=fst});var lce=L((VVt,ace)=>{var Ast=QB();function pst(t,e){var r=Ast(this,t),s=r.size;return r.set(t,e),this.size+=r.size==s?0:1,this}ace.exports=pst});var kk=L((KVt,cce)=>{var hst=Zle(),gst=rce(),dst=ice(),mst=oce(),yst=lce();function LE(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var s=t[e];this.set(s[0],s[1])}}LE.prototype.clear=hst;LE.prototype.delete=gst;LE.prototype.get=dst;LE.prototype.has=mst;LE.prototype.set=yst;cce.exports=LE});var fce=L((JVt,uce)=>{var Est=PB(),Ist=xk(),Cst=kk(),wst=200;function Bst(t,e){var r=this.__data__;if(r instanceof Est){var s=r.__data__;if(!Ist||s.length<wst-1)return s.push([t,e]),this.size=++r.size,this;r=this.__data__=new Cst(s)}return r.set(t,e),this.size=r.size,this}uce.exports=Bst});var Qk=L((zVt,Ace)=>{var vst=PB(),Sst=rle(),Dst=ile(),bst=ole(),Pst=lle(),xst=fce();function ME(t){var e=this.__data__=new vst(t);this.size=e.size}ME.prototype.clear=Sst;ME.prototype.delete=Dst;ME.prototype.get=bst;ME.prototype.has=Pst;ME.prototype.set=xst;Ace.exports=ME});var hce=L((ZVt,pce)=>{var kst=\"__lodash_hash_undefined__\";function Qst(t){return this.__data__.set(t,kst),this}pce.exports=Qst});var dce=L((XVt,gce)=>{function Tst(t){return this.__data__.has(t)}gce.exports=Tst});var yce=L(($Vt,mce)=>{var Rst=kk(),Fst=hce(),Nst=dce();function Tk(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Rst;++e<r;)this.add(t[e])}Tk.prototype.add=Tk.prototype.push=Fst;Tk.prototype.has=Nst;mce.exports=Tk});var Ice=L((e7t,Ece)=>{function Ost(t,e){for(var r=-1,s=t==null?0:t.length;++r<s;)if(e(t[r],r,t))return!0;return!1}Ece.exports=Ost});var wce=L((t7t,Cce)=>{function Lst(t,e){return t.has(e)}Cce.exports=Lst});var N4=L((r7t,Bce)=>{var Mst=yce(),_st=Ice(),Ust=wce(),Hst=1,jst=2;function qst(t,e,r,s,a,n){var c=r&Hst,f=t.length,p=e.length;if(f!=p&&!(c&&p>f))return!1;var h=n.get(t),E=n.get(e);if(h&&E)return h==e&&E==t;var C=-1,S=!0,P=r&jst?new Mst:void 0;for(n.set(t,e),n.set(e,t);++C<f;){var I=t[C],R=e[C];if(s)var N=c?s(R,I,C,e,t,n):s(I,R,C,t,e,n);if(N!==void 0){if(N)continue;S=!1;break}if(P){if(!_st(e,function(U,W){if(!Ust(P,W)&&(I===U||a(I,U,r,s,n)))return P.push(W)})){S=!1;break}}else if(!(I===R||a(I,R,r,s,n))){S=!1;break}}return n.delete(t),n.delete(e),S}Bce.exports=qst});var O4=L((n7t,vce)=>{var Gst=Pc(),Wst=Gst.Uint8Array;vce.exports=Wst});var Dce=L((i7t,Sce)=>{function Yst(t){var e=-1,r=Array(t.size);return t.forEach(function(s,a){r[++e]=[a,s]}),r}Sce.exports=Yst});var Pce=L((s7t,bce)=>{function Vst(t){var e=-1,r=Array(t.size);return t.forEach(function(s){r[++e]=s}),r}bce.exports=Vst});var Rce=L((o7t,Tce)=>{var xce=Yd(),kce=O4(),Kst=FE(),Jst=N4(),zst=Dce(),Zst=Pce(),Xst=1,$st=2,eot=\"[object Boolean]\",tot=\"[object Date]\",rot=\"[object Error]\",not=\"[object Map]\",iot=\"[object Number]\",sot=\"[object RegExp]\",oot=\"[object Set]\",aot=\"[object String]\",lot=\"[object Symbol]\",cot=\"[object ArrayBuffer]\",uot=\"[object DataView]\",Qce=xce?xce.prototype:void 0,L4=Qce?Qce.valueOf:void 0;function fot(t,e,r,s,a,n,c){switch(r){case uot:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case cot:return!(t.byteLength!=e.byteLength||!n(new kce(t),new kce(e)));case eot:case tot:case iot:return Kst(+t,+e);case rot:return t.name==e.name&&t.message==e.message;case sot:case aot:return t==e+\"\";case not:var f=zst;case oot:var p=s&Xst;if(f||(f=Zst),t.size!=e.size&&!p)return!1;var h=c.get(t);if(h)return h==e;s|=$st,c.set(t,e);var E=Jst(f(t),f(e),s,a,n,c);return c.delete(t),E;case lot:if(L4)return L4.call(t)==L4.call(e)}return!1}Tce.exports=fot});var Rk=L((a7t,Fce)=>{function Aot(t,e){for(var r=-1,s=e.length,a=t.length;++r<s;)t[a+r]=e[r];return t}Fce.exports=Aot});var xc=L((l7t,Nce)=>{var pot=Array.isArray;Nce.exports=pot});var M4=L((c7t,Oce)=>{var hot=Rk(),got=xc();function dot(t,e,r){var s=e(t);return got(t)?s:hot(s,r(t))}Oce.exports=dot});var Mce=L((u7t,Lce)=>{function mot(t,e){for(var r=-1,s=t==null?0:t.length,a=0,n=[];++r<s;){var c=t[r];e(c,r,t)&&(n[a++]=c)}return n}Lce.exports=mot});var _4=L((f7t,_ce)=>{function yot(){return[]}_ce.exports=yot});var Fk=L((A7t,Hce)=>{var Eot=Mce(),Iot=_4(),Cot=Object.prototype,wot=Cot.propertyIsEnumerable,Uce=Object.getOwnPropertySymbols,Bot=Uce?function(t){return t==null?[]:(t=Object(t),Eot(Uce(t),function(e){return wot.call(t,e)}))}:Iot;Hce.exports=Bot});var qce=L((p7t,jce)=>{function vot(t,e){for(var r=-1,s=Array(t);++r<t;)s[r]=e(r);return s}jce.exports=vot});var zf=L((h7t,Gce)=>{function Sot(t){return t!=null&&typeof t==\"object\"}Gce.exports=Sot});var Yce=L((g7t,Wce)=>{var Dot=Vd(),bot=zf(),Pot=\"[object Arguments]\";function xot(t){return bot(t)&&Dot(t)==Pot}Wce.exports=xot});var TB=L((d7t,Jce)=>{var Vce=Yce(),kot=zf(),Kce=Object.prototype,Qot=Kce.hasOwnProperty,Tot=Kce.propertyIsEnumerable,Rot=Vce(function(){return arguments}())?Vce:function(t){return kot(t)&&Qot.call(t,\"callee\")&&!Tot.call(t,\"callee\")};Jce.exports=Rot});var Zce=L((m7t,zce)=>{function Fot(){return!1}zce.exports=Fot});var FB=L((RB,_E)=>{var Not=Pc(),Oot=Zce(),eue=typeof RB==\"object\"&&RB&&!RB.nodeType&&RB,Xce=eue&&typeof _E==\"object\"&&_E&&!_E.nodeType&&_E,Lot=Xce&&Xce.exports===eue,$ce=Lot?Not.Buffer:void 0,Mot=$ce?$ce.isBuffer:void 0,_ot=Mot||Oot;_E.exports=_ot});var NB=L((y7t,tue)=>{var Uot=9007199254740991,Hot=/^(?:0|[1-9]\\d*)$/;function jot(t,e){var r=typeof t;return e=e??Uot,!!e&&(r==\"number\"||r!=\"symbol\"&&Hot.test(t))&&t>-1&&t%1==0&&t<e}tue.exports=jot});var Nk=L((E7t,rue)=>{var qot=9007199254740991;function Got(t){return typeof t==\"number\"&&t>-1&&t%1==0&&t<=qot}rue.exports=Got});var iue=L((I7t,nue)=>{var Wot=Vd(),Yot=Nk(),Vot=zf(),Kot=\"[object Arguments]\",Jot=\"[object Array]\",zot=\"[object Boolean]\",Zot=\"[object Date]\",Xot=\"[object Error]\",$ot=\"[object Function]\",eat=\"[object Map]\",tat=\"[object Number]\",rat=\"[object Object]\",nat=\"[object RegExp]\",iat=\"[object Set]\",sat=\"[object String]\",oat=\"[object WeakMap]\",aat=\"[object ArrayBuffer]\",lat=\"[object DataView]\",cat=\"[object Float32Array]\",uat=\"[object Float64Array]\",fat=\"[object Int8Array]\",Aat=\"[object Int16Array]\",pat=\"[object Int32Array]\",hat=\"[object Uint8Array]\",gat=\"[object Uint8ClampedArray]\",dat=\"[object Uint16Array]\",mat=\"[object Uint32Array]\",Si={};Si[cat]=Si[uat]=Si[fat]=Si[Aat]=Si[pat]=Si[hat]=Si[gat]=Si[dat]=Si[mat]=!0;Si[Kot]=Si[Jot]=Si[aat]=Si[zot]=Si[lat]=Si[Zot]=Si[Xot]=Si[$ot]=Si[eat]=Si[tat]=Si[rat]=Si[nat]=Si[iat]=Si[sat]=Si[oat]=!1;function yat(t){return Vot(t)&&Yot(t.length)&&!!Si[Wot(t)]}nue.exports=yat});var Ok=L((C7t,sue)=>{function Eat(t){return function(e){return t(e)}}sue.exports=Eat});var Lk=L((OB,UE)=>{var Iat=T4(),oue=typeof OB==\"object\"&&OB&&!OB.nodeType&&OB,LB=oue&&typeof UE==\"object\"&&UE&&!UE.nodeType&&UE,Cat=LB&&LB.exports===oue,U4=Cat&&Iat.process,wat=function(){try{var t=LB&&LB.require&&LB.require(\"util\").types;return t||U4&&U4.binding&&U4.binding(\"util\")}catch{}}();UE.exports=wat});var Mk=L((w7t,cue)=>{var Bat=iue(),vat=Ok(),aue=Lk(),lue=aue&&aue.isTypedArray,Sat=lue?vat(lue):Bat;cue.exports=Sat});var H4=L((B7t,uue)=>{var Dat=qce(),bat=TB(),Pat=xc(),xat=FB(),kat=NB(),Qat=Mk(),Tat=Object.prototype,Rat=Tat.hasOwnProperty;function Fat(t,e){var r=Pat(t),s=!r&&bat(t),a=!r&&!s&&xat(t),n=!r&&!s&&!a&&Qat(t),c=r||s||a||n,f=c?Dat(t.length,String):[],p=f.length;for(var h in t)(e||Rat.call(t,h))&&!(c&&(h==\"length\"||a&&(h==\"offset\"||h==\"parent\")||n&&(h==\"buffer\"||h==\"byteLength\"||h==\"byteOffset\")||kat(h,p)))&&f.push(h);return f}uue.exports=Fat});var _k=L((v7t,fue)=>{var Nat=Object.prototype;function Oat(t){var e=t&&t.constructor,r=typeof e==\"function\"&&e.prototype||Nat;return t===r}fue.exports=Oat});var j4=L((S7t,Aue)=>{function Lat(t,e){return function(r){return t(e(r))}}Aue.exports=Lat});var hue=L((D7t,pue)=>{var Mat=j4(),_at=Mat(Object.keys,Object);pue.exports=_at});var due=L((b7t,gue)=>{var Uat=_k(),Hat=hue(),jat=Object.prototype,qat=jat.hasOwnProperty;function Gat(t){if(!Uat(t))return Hat(t);var e=[];for(var r in Object(t))qat.call(t,r)&&r!=\"constructor\"&&e.push(r);return e}gue.exports=Gat});var MB=L((P7t,mue)=>{var Wat=Pk(),Yat=Nk();function Vat(t){return t!=null&&Yat(t.length)&&!Wat(t)}mue.exports=Vat});var Uk=L((x7t,yue)=>{var Kat=H4(),Jat=due(),zat=MB();function Zat(t){return zat(t)?Kat(t):Jat(t)}yue.exports=Zat});var q4=L((k7t,Eue)=>{var Xat=M4(),$at=Fk(),elt=Uk();function tlt(t){return Xat(t,elt,$at)}Eue.exports=tlt});var wue=L((Q7t,Cue)=>{var Iue=q4(),rlt=1,nlt=Object.prototype,ilt=nlt.hasOwnProperty;function slt(t,e,r,s,a,n){var c=r&rlt,f=Iue(t),p=f.length,h=Iue(e),E=h.length;if(p!=E&&!c)return!1;for(var C=p;C--;){var S=f[C];if(!(c?S in e:ilt.call(e,S)))return!1}var P=n.get(t),I=n.get(e);if(P&&I)return P==e&&I==t;var R=!0;n.set(t,e),n.set(e,t);for(var N=c;++C<p;){S=f[C];var U=t[S],W=e[S];if(s)var te=c?s(W,U,S,e,t,n):s(U,W,S,t,e,n);if(!(te===void 0?U===W||a(U,W,r,s,n):te)){R=!1;break}N||(N=S==\"constructor\")}if(R&&!N){var ie=t.constructor,Ae=e.constructor;ie!=Ae&&\"constructor\"in t&&\"constructor\"in e&&!(typeof ie==\"function\"&&ie instanceof ie&&typeof Ae==\"function\"&&Ae instanceof Ae)&&(R=!1)}return n.delete(t),n.delete(e),R}Cue.exports=slt});var vue=L((T7t,Bue)=>{var olt=A0(),alt=Pc(),llt=olt(alt,\"DataView\");Bue.exports=llt});var Due=L((R7t,Sue)=>{var clt=A0(),ult=Pc(),flt=clt(ult,\"Promise\");Sue.exports=flt});var Pue=L((F7t,bue)=>{var Alt=A0(),plt=Pc(),hlt=Alt(plt,\"Set\");bue.exports=hlt});var kue=L((N7t,xue)=>{var glt=A0(),dlt=Pc(),mlt=glt(dlt,\"WeakMap\");xue.exports=mlt});var _B=L((O7t,Lue)=>{var G4=vue(),W4=xk(),Y4=Due(),V4=Pue(),K4=kue(),Oue=Vd(),HE=F4(),Que=\"[object Map]\",ylt=\"[object Object]\",Tue=\"[object Promise]\",Rue=\"[object Set]\",Fue=\"[object WeakMap]\",Nue=\"[object DataView]\",Elt=HE(G4),Ilt=HE(W4),Clt=HE(Y4),wlt=HE(V4),Blt=HE(K4),Kd=Oue;(G4&&Kd(new G4(new ArrayBuffer(1)))!=Nue||W4&&Kd(new W4)!=Que||Y4&&Kd(Y4.resolve())!=Tue||V4&&Kd(new V4)!=Rue||K4&&Kd(new K4)!=Fue)&&(Kd=function(t){var e=Oue(t),r=e==ylt?t.constructor:void 0,s=r?HE(r):\"\";if(s)switch(s){case Elt:return Nue;case Ilt:return Que;case Clt:return Tue;case wlt:return Rue;case Blt:return Fue}return e});Lue.exports=Kd});var Wue=L((L7t,Gue)=>{var J4=Qk(),vlt=N4(),Slt=Rce(),Dlt=wue(),Mue=_B(),_ue=xc(),Uue=FB(),blt=Mk(),Plt=1,Hue=\"[object Arguments]\",jue=\"[object Array]\",Hk=\"[object Object]\",xlt=Object.prototype,que=xlt.hasOwnProperty;function klt(t,e,r,s,a,n){var c=_ue(t),f=_ue(e),p=c?jue:Mue(t),h=f?jue:Mue(e);p=p==Hue?Hk:p,h=h==Hue?Hk:h;var E=p==Hk,C=h==Hk,S=p==h;if(S&&Uue(t)){if(!Uue(e))return!1;c=!0,E=!1}if(S&&!E)return n||(n=new J4),c||blt(t)?vlt(t,e,r,s,a,n):Slt(t,e,p,r,s,a,n);if(!(r&Plt)){var P=E&&que.call(t,\"__wrapped__\"),I=C&&que.call(e,\"__wrapped__\");if(P||I){var R=P?t.value():t,N=I?e.value():e;return n||(n=new J4),a(R,N,r,s,n)}}return S?(n||(n=new J4),Dlt(t,e,r,s,a,n)):!1}Gue.exports=klt});var Jue=L((M7t,Kue)=>{var Qlt=Wue(),Yue=zf();function Vue(t,e,r,s,a){return t===e?!0:t==null||e==null||!Yue(t)&&!Yue(e)?t!==t&&e!==e:Qlt(t,e,r,s,Vue,a)}Kue.exports=Vue});var Zue=L((_7t,zue)=>{var Tlt=Jue();function Rlt(t,e){return Tlt(t,e)}zue.exports=Rlt});var z4=L((U7t,Xue)=>{var Flt=A0(),Nlt=function(){try{var t=Flt(Object,\"defineProperty\");return t({},\"\",{}),t}catch{}}();Xue.exports=Nlt});var jk=L((H7t,efe)=>{var $ue=z4();function Olt(t,e,r){e==\"__proto__\"&&$ue?$ue(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}efe.exports=Olt});var Z4=L((j7t,tfe)=>{var Llt=jk(),Mlt=FE();function _lt(t,e,r){(r!==void 0&&!Mlt(t[e],r)||r===void 0&&!(e in t))&&Llt(t,e,r)}tfe.exports=_lt});var nfe=L((q7t,rfe)=>{function Ult(t){return function(e,r,s){for(var a=-1,n=Object(e),c=s(e),f=c.length;f--;){var p=c[t?f:++a];if(r(n[p],p,n)===!1)break}return e}}rfe.exports=Ult});var sfe=L((G7t,ife)=>{var Hlt=nfe(),jlt=Hlt();ife.exports=jlt});var X4=L((UB,jE)=>{var qlt=Pc(),cfe=typeof UB==\"object\"&&UB&&!UB.nodeType&&UB,ofe=cfe&&typeof jE==\"object\"&&jE&&!jE.nodeType&&jE,Glt=ofe&&ofe.exports===cfe,afe=Glt?qlt.Buffer:void 0,lfe=afe?afe.allocUnsafe:void 0;function Wlt(t,e){if(e)return t.slice();var r=t.length,s=lfe?lfe(r):new t.constructor(r);return t.copy(s),s}jE.exports=Wlt});var qk=L((W7t,ffe)=>{var ufe=O4();function Ylt(t){var e=new t.constructor(t.byteLength);return new ufe(e).set(new ufe(t)),e}ffe.exports=Ylt});var $4=L((Y7t,Afe)=>{var Vlt=qk();function Klt(t,e){var r=e?Vlt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}Afe.exports=Klt});var Gk=L((V7t,pfe)=>{function Jlt(t,e){var r=-1,s=t.length;for(e||(e=Array(s));++r<s;)e[r]=t[r];return e}pfe.exports=Jlt});var dfe=L((K7t,gfe)=>{var zlt=Wl(),hfe=Object.create,Zlt=function(){function t(){}return function(e){if(!zlt(e))return{};if(hfe)return hfe(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();gfe.exports=Zlt});var Wk=L((J7t,mfe)=>{var Xlt=j4(),$lt=Xlt(Object.getPrototypeOf,Object);mfe.exports=$lt});var e3=L((z7t,yfe)=>{var ect=dfe(),tct=Wk(),rct=_k();function nct(t){return typeof t.constructor==\"function\"&&!rct(t)?ect(tct(t)):{}}yfe.exports=nct});var Ife=L((Z7t,Efe)=>{var ict=MB(),sct=zf();function oct(t){return sct(t)&&ict(t)}Efe.exports=oct});var t3=L((X7t,wfe)=>{var act=Vd(),lct=Wk(),cct=zf(),uct=\"[object Object]\",fct=Function.prototype,Act=Object.prototype,Cfe=fct.toString,pct=Act.hasOwnProperty,hct=Cfe.call(Object);function gct(t){if(!cct(t)||act(t)!=uct)return!1;var e=lct(t);if(e===null)return!0;var r=pct.call(e,\"constructor\")&&e.constructor;return typeof r==\"function\"&&r instanceof r&&Cfe.call(r)==hct}wfe.exports=gct});var r3=L(($7t,Bfe)=>{function dct(t,e){if(!(e===\"constructor\"&&typeof t[e]==\"function\")&&e!=\"__proto__\")return t[e]}Bfe.exports=dct});var Yk=L((eKt,vfe)=>{var mct=jk(),yct=FE(),Ect=Object.prototype,Ict=Ect.hasOwnProperty;function Cct(t,e,r){var s=t[e];(!(Ict.call(t,e)&&yct(s,r))||r===void 0&&!(e in t))&&mct(t,e,r)}vfe.exports=Cct});var Jd=L((tKt,Sfe)=>{var wct=Yk(),Bct=jk();function vct(t,e,r,s){var a=!r;r||(r={});for(var n=-1,c=e.length;++n<c;){var f=e[n],p=s?s(r[f],t[f],f,r,t):void 0;p===void 0&&(p=t[f]),a?Bct(r,f,p):wct(r,f,p)}return r}Sfe.exports=vct});var bfe=L((rKt,Dfe)=>{function Sct(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}Dfe.exports=Sct});var xfe=L((nKt,Pfe)=>{var Dct=Wl(),bct=_k(),Pct=bfe(),xct=Object.prototype,kct=xct.hasOwnProperty;function Qct(t){if(!Dct(t))return Pct(t);var e=bct(t),r=[];for(var s in t)s==\"constructor\"&&(e||!kct.call(t,s))||r.push(s);return r}Pfe.exports=Qct});var qE=L((iKt,kfe)=>{var Tct=H4(),Rct=xfe(),Fct=MB();function Nct(t){return Fct(t)?Tct(t,!0):Rct(t)}kfe.exports=Nct});var Tfe=L((sKt,Qfe)=>{var Oct=Jd(),Lct=qE();function Mct(t){return Oct(t,Lct(t))}Qfe.exports=Mct});var Mfe=L((oKt,Lfe)=>{var Rfe=Z4(),_ct=X4(),Uct=$4(),Hct=Gk(),jct=e3(),Ffe=TB(),Nfe=xc(),qct=Ife(),Gct=FB(),Wct=Pk(),Yct=Wl(),Vct=t3(),Kct=Mk(),Ofe=r3(),Jct=Tfe();function zct(t,e,r,s,a,n,c){var f=Ofe(t,r),p=Ofe(e,r),h=c.get(p);if(h){Rfe(t,r,h);return}var E=n?n(f,p,r+\"\",t,e,c):void 0,C=E===void 0;if(C){var S=Nfe(p),P=!S&&Gct(p),I=!S&&!P&&Kct(p);E=p,S||P||I?Nfe(f)?E=f:qct(f)?E=Hct(f):P?(C=!1,E=_ct(p,!0)):I?(C=!1,E=Uct(p,!0)):E=[]:Vct(p)||Ffe(p)?(E=f,Ffe(f)?E=Jct(f):(!Yct(f)||Wct(f))&&(E=jct(p))):C=!1}C&&(c.set(p,E),a(E,p,s,n,c),c.delete(p)),Rfe(t,r,E)}Lfe.exports=zct});var Hfe=L((aKt,Ufe)=>{var Zct=Qk(),Xct=Z4(),$ct=sfe(),eut=Mfe(),tut=Wl(),rut=qE(),nut=r3();function _fe(t,e,r,s,a){t!==e&&$ct(e,function(n,c){if(a||(a=new Zct),tut(n))eut(t,e,c,r,_fe,s,a);else{var f=s?s(nut(t,c),n,c+\"\",t,e,a):void 0;f===void 0&&(f=n),Xct(t,c,f)}},rut)}Ufe.exports=_fe});var n3=L((lKt,jfe)=>{function iut(t){return t}jfe.exports=iut});var Gfe=L((cKt,qfe)=>{function sut(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}qfe.exports=sut});var i3=L((uKt,Yfe)=>{var out=Gfe(),Wfe=Math.max;function aut(t,e,r){return e=Wfe(e===void 0?t.length-1:e,0),function(){for(var s=arguments,a=-1,n=Wfe(s.length-e,0),c=Array(n);++a<n;)c[a]=s[e+a];a=-1;for(var f=Array(e+1);++a<e;)f[a]=s[a];return f[e]=r(c),out(t,this,f)}}Yfe.exports=aut});var Kfe=L((fKt,Vfe)=>{function lut(t){return function(){return t}}Vfe.exports=lut});var Zfe=L((AKt,zfe)=>{var cut=Kfe(),Jfe=z4(),uut=n3(),fut=Jfe?function(t,e){return Jfe(t,\"toString\",{configurable:!0,enumerable:!1,value:cut(e),writable:!0})}:uut;zfe.exports=fut});var $fe=L((pKt,Xfe)=>{var Aut=800,put=16,hut=Date.now;function gut(t){var e=0,r=0;return function(){var s=hut(),a=put-(s-r);if(r=s,a>0){if(++e>=Aut)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}Xfe.exports=gut});var s3=L((hKt,eAe)=>{var dut=Zfe(),mut=$fe(),yut=mut(dut);eAe.exports=yut});var rAe=L((gKt,tAe)=>{var Eut=n3(),Iut=i3(),Cut=s3();function wut(t,e){return Cut(Iut(t,e,Eut),t+\"\")}tAe.exports=wut});var iAe=L((dKt,nAe)=>{var But=FE(),vut=MB(),Sut=NB(),Dut=Wl();function but(t,e,r){if(!Dut(r))return!1;var s=typeof e;return(s==\"number\"?vut(r)&&Sut(e,r.length):s==\"string\"&&e in r)?But(r[e],t):!1}nAe.exports=but});var oAe=L((mKt,sAe)=>{var Put=rAe(),xut=iAe();function kut(t){return Put(function(e,r){var s=-1,a=r.length,n=a>1?r[a-1]:void 0,c=a>2?r[2]:void 0;for(n=t.length>3&&typeof n==\"function\"?(a--,n):void 0,c&&xut(r[0],r[1],c)&&(n=a<3?void 0:n,a=1),e=Object(e);++s<a;){var f=r[s];f&&t(e,f,s,n)}return e})}sAe.exports=kut});var lAe=L((yKt,aAe)=>{var Qut=Hfe(),Tut=oAe(),Rut=Tut(function(t,e,r,s){Qut(t,e,r,s)});aAe.exports=Rut});var je={};Vt(je,{AsyncActions:()=>l3,BufferStream:()=>a3,CachingStrategy:()=>IAe,DefaultStream:()=>c3,allSettledSafe:()=>Uu,assertNever:()=>f3,bufferStream:()=>WE,buildIgnorePattern:()=>Uut,convertMapsToIndexableObjects:()=>Kk,dynamicRequire:()=>kp,escapeRegExp:()=>Nut,getArrayWithDefault:()=>jB,getFactoryWithDefault:()=>Vl,getMapWithDefault:()=>A3,getSetWithDefault:()=>xp,groupBy:()=>qut,isIndexableObject:()=>o3,isPathLike:()=>Hut,isTaggedYarnVersion:()=>Fut,makeDeferred:()=>mAe,mapAndFilter:()=>Yl,mapAndFind:()=>p0,mergeIntoTarget:()=>wAe,overrideType:()=>Out,parseBoolean:()=>qB,parseInt:()=>YE,parseOptionalBoolean:()=>CAe,plural:()=>Vk,prettifyAsyncErrors:()=>GE,prettifySyncErrors:()=>p3,releaseAfterUseAsync:()=>Mut,replaceEnvVariables:()=>Jk,sortMap:()=>Ws,toMerged:()=>jut,tryParseOptionalBoolean:()=>h3,validateEnum:()=>Lut});function Fut(t){return!!(hAe.default.valid(t)&&t.match(/^[^-]+(-rc\\.[0-9]+)?$/))}function Vk(t,{one:e,more:r,zero:s=r}){return t===0?s:t===1?e:r}function Nut(t){return t.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function Out(t){}function f3(t){throw new Error(`Assertion failed: Unexpected object '${t}'`)}function Lut(t,e){let r=Object.values(t);if(!r.includes(e))throw new nt(`Invalid value for enumeration: ${JSON.stringify(e)} (expected one of ${r.map(s=>JSON.stringify(s)).join(\", \")})`);return e}function Yl(t,e){let r=[];for(let s of t){let a=e(s);a!==gAe&&r.push(a)}return r}function p0(t,e){for(let r of t){let s=e(r);if(s!==dAe)return s}}function o3(t){return typeof t==\"object\"&&t!==null}async function Uu(t){let e=await Promise.allSettled(t),r=[];for(let s of e){if(s.status===\"rejected\")throw s.reason;r.push(s.value)}return r}function Kk(t){if(t instanceof Map&&(t=Object.fromEntries(t)),o3(t))for(let e of Object.keys(t)){let r=t[e];o3(r)&&(t[e]=Kk(r))}return t}function Vl(t,e,r){let s=t.get(e);return typeof s>\"u\"&&t.set(e,s=r()),s}function jB(t,e){let r=t.get(e);return typeof r>\"u\"&&t.set(e,r=[]),r}function xp(t,e){let r=t.get(e);return typeof r>\"u\"&&t.set(e,r=new Set),r}function A3(t,e){let r=t.get(e);return typeof r>\"u\"&&t.set(e,r=new Map),r}async function Mut(t,e){if(e==null)return await t();try{return await t()}finally{await e()}}async function GE(t,e){try{return await t()}catch(r){throw r.message=e(r.message),r}}function p3(t,e){try{return t()}catch(r){throw r.message=e(r.message),r}}async function WE(t){return await new Promise((e,r)=>{let s=[];t.on(\"error\",a=>{r(a)}),t.on(\"data\",a=>{s.push(a)}),t.on(\"end\",()=>{e(Buffer.concat(s))})})}function mAe(){let t,e;return{promise:new Promise((s,a)=>{t=s,e=a}),resolve:t,reject:e}}function yAe(t){return HB(ue.fromPortablePath(t))}function EAe(path){let physicalPath=ue.fromPortablePath(path),currentCacheEntry=HB.cache[physicalPath];delete HB.cache[physicalPath];let result;try{result=yAe(physicalPath);let freshCacheEntry=HB.cache[physicalPath],dynamicModule=eval(\"module\"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{HB.cache[physicalPath]=currentCacheEntry}return result}function _ut(t){let e=cAe.get(t),r=le.statSync(t);if(e?.mtime===r.mtimeMs)return e.instance;let s=EAe(t);return cAe.set(t,{mtime:r.mtimeMs,instance:s}),s}function kp(t,{cachingStrategy:e=2}={}){switch(e){case 0:return EAe(t);case 1:return _ut(t);case 2:return yAe(t);default:throw new Error(\"Unsupported caching strategy\")}}function Ws(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]<f[c]?-1:f[n]>f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function Uut(t){return t.length===0?null:t.map(e=>`(${AAe.default.makeRe(e,{windows:!1,dot:!0}).source})`).join(\"|\")}function Jk(t,{env:e}){let r=/\\${(?<variableName>[\\d\\w_]+)(?<colon>:)?(?:-(?<fallback>[^}]*))?}/g;return t.replace(r,(...s)=>{let{variableName:a,colon:n,fallback:c}=s[s.length-1],f=Object.hasOwn(e,a),p=e[a];if(p||f&&!n)return p;if(c!=null)return c;throw new nt(`Environment variable not found (${a})`)})}function qB(t){switch(t){case\"true\":case\"1\":case 1:case!0:return!0;case\"false\":case\"0\":case 0:case!1:return!1;default:throw new Error(`Couldn't parse \"${t}\" as a boolean`)}}function CAe(t){return typeof t>\"u\"?t:qB(t)}function h3(t){try{return CAe(t)}catch{return null}}function Hut(t){return!!(ue.isAbsolute(t)||t.match(/^(\\.{1,2}|~)\\//))}function wAe(t,...e){let r=c=>({value:c}),s=r(t),a=e.map(c=>r(c)),{value:n}=(0,fAe.default)(s,...a,(c,f)=>{if(Array.isArray(c)&&Array.isArray(f)){for(let p of f)c.find(h=>(0,uAe.default)(h,p))||c.push(p);return c}});return n}function jut(...t){return wAe({},...t)}function qut(t,e){let r=Object.create(null);for(let s of t){let a=s[e];r[a]??=[],r[a].push(s)}return r}function YE(t){return typeof t==\"string\"?Number.parseInt(t,10):t}var uAe,fAe,AAe,pAe,hAe,u3,gAe,dAe,a3,l3,c3,HB,cAe,IAe,kc=It(()=>{bt();Wt();uAe=et(Zue()),fAe=et(lAe()),AAe=et(Sa()),pAe=et(Md()),hAe=et(fi()),u3=ye(\"stream\");gAe=Symbol();Yl.skip=gAe;dAe=Symbol();p0.skip=dAe;a3=class extends u3.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(r,s,a){if(s!==\"buffer\"||!Buffer.isBuffer(r))throw new Error(\"Assertion failed: BufferStream only accept buffers\");this.chunks.push(r),a(null,null)}_flush(r){r(null,Buffer.concat(this.chunks))}};l3=class{constructor(e){this.deferred=new Map;this.promises=new Map;this.limit=(0,pAe.default)(e)}set(e,r){let s=this.deferred.get(e);typeof s>\"u\"&&this.deferred.set(e,s=mAe());let a=this.limit(()=>r());return this.promises.set(e,a),a.then(()=>{this.promises.get(e)===a&&s.resolve()},n=>{this.promises.get(e)===a&&s.reject(n)}),s.promise}reduce(e,r){let s=this.promises.get(e)??Promise.resolve();this.set(e,()=>r(s))}async wait(){await Promise.all(this.promises.values())}},c3=class extends u3.Transform{constructor(r=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=r}_transform(r,s,a){if(s!==\"buffer\"||!Buffer.isBuffer(r))throw new Error(\"Assertion failed: DefaultStream only accept buffers\");this.active=!1,a(null,r)}_flush(r){this.active&&this.ifEmpty.length>0?r(null,this.ifEmpty):r(null)}},HB=eval(\"require\");cAe=new Map;IAe=(s=>(s[s.NoCache=0]=\"NoCache\",s[s.FsTime=1]=\"FsTime\",s[s.Node=2]=\"Node\",s))(IAe||{})});var VE,g3,d3,BAe=It(()=>{VE=(r=>(r.HARD=\"HARD\",r.SOFT=\"SOFT\",r))(VE||{}),g3=(s=>(s.Dependency=\"Dependency\",s.PeerDependency=\"PeerDependency\",s.PeerDependencyMeta=\"PeerDependencyMeta\",s))(g3||{}),d3=(s=>(s.Inactive=\"inactive\",s.Redundant=\"redundant\",s.Active=\"active\",s))(d3||{})});var he={};Vt(he,{LogLevel:()=>eQ,Style:()=>Zk,Type:()=>Ct,addLogFilterSupport:()=>YB,applyColor:()=>po,applyHyperlink:()=>JE,applyStyle:()=>zd,json:()=>Zd,jsonOrPretty:()=>Yut,mark:()=>C3,pretty:()=>Ut,prettyField:()=>Zf,prettyList:()=>I3,prettyTruncatedLocatorList:()=>$k,stripAnsi:()=>KE.default,supportsColor:()=>Xk,supportsHyperlinks:()=>E3,tuple:()=>Hu});function vAe(t){let e=[\"KiB\",\"MiB\",\"GiB\",\"TiB\"],r=e.length;for(;r>1&&t<1024**r;)r-=1;let s=1024**r;return`${Math.floor(t*100/s)/100} ${e[r-1]}`}function Hu(t,e){return[e,t]}function zd(t,e,r){return t.get(\"enableColors\")&&r&2&&(e=WB.default.bold(e)),e}function po(t,e,r){if(!t.get(\"enableColors\"))return e;let s=Gut.get(r);if(s===null)return e;let a=typeof s>\"u\"?r:y3.level>=3?s[0]:s[1],n=typeof a==\"number\"?m3.ansi256(a):a.startsWith(\"#\")?m3.hex(a):m3[a];if(typeof n!=\"function\")throw new Error(`Invalid format type ${a}`);return n(e)}function JE(t,e,r){return t.get(\"enableHyperlinks\")?Wut?`\\x1B]8;;${r}\\x1B\\\\${e}\\x1B]8;;\\x1B\\\\`:`\\x1B]8;;${r}\\x07${e}\\x1B]8;;\\x07`:e}function Ut(t,e,r){if(e===null)return po(t,\"null\",Ct.NULL);if(Object.hasOwn(zk,r))return zk[r].pretty(t,e);if(typeof e!=\"string\")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return po(t,e,r)}function I3(t,e,r,{separator:s=\", \"}={}){return[...e].map(a=>Ut(t,a,r)).join(s)}function Zd(t,e){if(t===null)return null;if(Object.hasOwn(zk,e))return zk[e].json(t);if(typeof t!=\"string\")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof t}`);return t}function Yut(t,e,[r,s]){return t?Zd(r,s):Ut(e,r,s)}function C3(t){return{Check:po(t,\"\\u2713\",\"green\"),Cross:po(t,\"\\u2718\",\"red\"),Question:po(t,\"?\",\"cyan\")}}function Zf(t,{label:e,value:[r,s]}){return`${Ut(t,e,Ct.CODE)}: ${Ut(t,r,s)}`}function $k(t,e,r){let s=[],a=[...e],n=r;for(;a.length>0;){let h=a[0],E=`${Yr(t,h)}, `,C=w3(h).length+2;if(s.length>0&&n<C)break;s.push([E,C]),n-=C,a.shift()}if(a.length===0)return s.map(([h])=>h).join(\"\").slice(0,-2);let c=\"X\".repeat(a.length.toString().length),f=`and ${c} more.`,p=a.length;for(;s.length>1&&n<f.length;)n+=s[s.length-1][1],p+=1,s.pop();return[s.map(([h])=>h).join(\"\"),f.replace(c,Ut(t,p,Ct.NUMBER))].join(\"\")}function YB(t,{configuration:e}){let r=e.get(\"logFilters\"),s=new Map,a=new Map,n=[];for(let C of r){let S=C.get(\"level\");if(typeof S>\"u\")continue;let P=C.get(\"code\");typeof P<\"u\"&&s.set(P,S);let I=C.get(\"text\");typeof I<\"u\"&&a.set(I,S);let R=C.get(\"pattern\");typeof R<\"u\"&&n.push([SAe.default.matcher(R,{contains:!0}),S])}n.reverse();let c=(C,S,P)=>{if(C===null||C===0)return P;let I=a.size>0||n.length>0?(0,KE.default)(S):S;if(a.size>0){let R=a.get(I);if(typeof R<\"u\")return R??P}if(n.length>0){for(let[R,N]of n)if(R(I))return N??P}if(s.size>0){let R=s.get(Vf(C));if(typeof R<\"u\")return R??P}return P},f=t.reportInfo,p=t.reportWarning,h=t.reportError,E=function(C,S,P,I){switch(c(S,P,I)){case\"info\":f.call(C,S,P);break;case\"warning\":p.call(C,S??0,P);break;case\"error\":h.call(C,S??0,P);break}};t.reportInfo=function(...C){return E(this,...C,\"info\")},t.reportWarning=function(...C){return E(this,...C,\"warning\")},t.reportError=function(...C){return E(this,...C,\"error\")}}var WB,GB,SAe,KE,DAe,Ct,Zk,y3,Xk,E3,m3,Gut,Wo,zk,Wut,eQ,Qc=It(()=>{bt();WB=et(g4()),GB=et(Nd());Wt();SAe=et(Sa()),KE=et(bk()),DAe=ye(\"util\");nk();Yo();Ct={NO_HINT:\"NO_HINT\",ID:\"ID\",NULL:\"NULL\",SCOPE:\"SCOPE\",NAME:\"NAME\",RANGE:\"RANGE\",REFERENCE:\"REFERENCE\",NUMBER:\"NUMBER\",PATH:\"PATH\",URL:\"URL\",ADDED:\"ADDED\",REMOVED:\"REMOVED\",CODE:\"CODE\",INSPECT:\"INSPECT\",DURATION:\"DURATION\",SIZE:\"SIZE\",SIZE_DIFF:\"SIZE_DIFF\",IDENT:\"IDENT\",DESCRIPTOR:\"DESCRIPTOR\",LOCATOR:\"LOCATOR\",RESOLUTION:\"RESOLUTION\",DEPENDENT:\"DEPENDENT\",PACKAGE_EXTENSION:\"PACKAGE_EXTENSION\",SETTING:\"SETTING\",MARKDOWN:\"MARKDOWN\",MARKDOWN_INLINE:\"MARKDOWN_INLINE\"},Zk=(e=>(e[e.BOLD=2]=\"BOLD\",e))(Zk||{}),y3=GB.default.GITHUB_ACTIONS?{level:2}:WB.default.supportsColor?{level:WB.default.supportsColor.level}:{level:0},Xk=y3.level!==0,E3=Xk&&!GB.default.GITHUB_ACTIONS&&!GB.default.CIRCLE&&!GB.default.GITLAB,m3=new WB.default.Instance(y3),Gut=new Map([[Ct.NO_HINT,null],[Ct.NULL,[\"#a853b5\",129]],[Ct.SCOPE,[\"#d75f00\",166]],[Ct.NAME,[\"#d7875f\",173]],[Ct.RANGE,[\"#00afaf\",37]],[Ct.REFERENCE,[\"#87afff\",111]],[Ct.NUMBER,[\"#ffd700\",220]],[Ct.PATH,[\"#d75fd7\",170]],[Ct.URL,[\"#d75fd7\",170]],[Ct.ADDED,[\"#5faf00\",70]],[Ct.REMOVED,[\"#ff3131\",160]],[Ct.CODE,[\"#87afff\",111]],[Ct.SIZE,[\"#ffd700\",220]]]),Wo=t=>t;zk={[Ct.ID]:Wo({pretty:(t,e)=>typeof e==\"number\"?po(t,`${e}`,Ct.NUMBER):po(t,e,Ct.CODE),json:t=>t}),[Ct.INSPECT]:Wo({pretty:(t,e)=>(0,DAe.inspect)(e,{depth:1/0,colors:t.get(\"enableColors\"),compact:!0,breakLength:1/0}),json:t=>t}),[Ct.NUMBER]:Wo({pretty:(t,e)=>po(t,`${e}`,Ct.NUMBER),json:t=>t}),[Ct.IDENT]:Wo({pretty:(t,e)=>$i(t,e),json:t=>cn(t)}),[Ct.LOCATOR]:Wo({pretty:(t,e)=>Yr(t,e),json:t=>cl(t)}),[Ct.DESCRIPTOR]:Wo({pretty:(t,e)=>ri(t,e),json:t=>ll(t)}),[Ct.RESOLUTION]:Wo({pretty:(t,{descriptor:e,locator:r})=>VB(t,e,r),json:({descriptor:t,locator:e})=>({descriptor:ll(t),locator:e!==null?cl(e):null})}),[Ct.DEPENDENT]:Wo({pretty:(t,{locator:e,descriptor:r})=>B3(t,e,r),json:({locator:t,descriptor:e})=>({locator:cl(t),descriptor:ll(e)})}),[Ct.PACKAGE_EXTENSION]:Wo({pretty:(t,e)=>{switch(e.type){case\"Dependency\":return`${$i(t,e.parentDescriptor)} \\u27A4 ${po(t,\"dependencies\",Ct.CODE)} \\u27A4 ${$i(t,e.descriptor)}`;case\"PeerDependency\":return`${$i(t,e.parentDescriptor)} \\u27A4 ${po(t,\"peerDependencies\",Ct.CODE)} \\u27A4 ${$i(t,e.descriptor)}`;case\"PeerDependencyMeta\":return`${$i(t,e.parentDescriptor)} \\u27A4 ${po(t,\"peerDependenciesMeta\",Ct.CODE)} \\u27A4 ${$i(t,Da(e.selector))} \\u27A4 ${po(t,e.key,Ct.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}},json:t=>{switch(t.type){case\"Dependency\":return`${cn(t.parentDescriptor)} > ${cn(t.descriptor)}`;case\"PeerDependency\":return`${cn(t.parentDescriptor)} >> ${cn(t.descriptor)}`;case\"PeerDependencyMeta\":return`${cn(t.parentDescriptor)} >> ${t.selector} / ${t.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${t.type}`)}}}),[Ct.SETTING]:Wo({pretty:(t,e)=>(t.get(e),JE(t,po(t,e,Ct.CODE),`https://yarnpkg.com/configuration/yarnrc#${e}`)),json:t=>t}),[Ct.DURATION]:Wo({pretty:(t,e)=>{if(e>1e3*60){let r=Math.floor(e/1e3/60),s=Math.ceil((e-r*60*1e3)/1e3);return s===0?`${r}m`:`${r}m ${s}s`}else{let r=Math.floor(e/1e3),s=e-r*1e3;return s===0?`${r}s`:`${r}s ${s}ms`}},json:t=>t}),[Ct.SIZE]:Wo({pretty:(t,e)=>po(t,vAe(e),Ct.NUMBER),json:t=>t}),[Ct.SIZE_DIFF]:Wo({pretty:(t,e)=>{let r=e>=0?\"+\":\"-\",s=r===\"+\"?Ct.REMOVED:Ct.ADDED;return po(t,`${r} ${vAe(Math.max(Math.abs(e),1))}`,s)},json:t=>t}),[Ct.PATH]:Wo({pretty:(t,e)=>po(t,ue.fromPortablePath(e),Ct.PATH),json:t=>ue.fromPortablePath(t)}),[Ct.MARKDOWN]:Wo({pretty:(t,{text:e,format:r,paragraphs:s})=>qo(e,{format:r,paragraphs:s}),json:({text:t})=>t}),[Ct.MARKDOWN_INLINE]:Wo({pretty:(t,e)=>(e=e.replace(/(`+)((?:.|[\\n])*?)\\1/g,(r,s,a)=>Ut(t,s+a+s,Ct.CODE)),e=e.replace(/(\\*\\*)((?:.|[\\n])*?)\\1/g,(r,s,a)=>zd(t,a,2)),e),json:t=>t})};Wut=!!process.env.KONSOLE_VERSION;eQ=(a=>(a.Error=\"error\",a.Warning=\"warning\",a.Info=\"info\",a.Discard=\"discard\",a))(eQ||{})});var bAe=L(zE=>{\"use strict\";Object.defineProperty(zE,\"__esModule\",{value:!0});zE.splitWhen=zE.flatten=void 0;function Vut(t){return t.reduce((e,r)=>[].concat(e,r),[])}zE.flatten=Vut;function Kut(t,e){let r=[[]],s=0;for(let a of t)e(a)?(s++,r[s]=[]):r[s].push(a);return r}zE.splitWhen=Kut});var PAe=L(tQ=>{\"use strict\";Object.defineProperty(tQ,\"__esModule\",{value:!0});tQ.isEnoentCodeError=void 0;function Jut(t){return t.code===\"ENOENT\"}tQ.isEnoentCodeError=Jut});var xAe=L(rQ=>{\"use strict\";Object.defineProperty(rQ,\"__esModule\",{value:!0});rQ.createDirentFromStats=void 0;var v3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function zut(t,e){return new v3(t,e)}rQ.createDirentFromStats=zut});var RAe=L(cs=>{\"use strict\";Object.defineProperty(cs,\"__esModule\",{value:!0});cs.convertPosixPathToPattern=cs.convertWindowsPathToPattern=cs.convertPathToPattern=cs.escapePosixPath=cs.escapeWindowsPath=cs.escape=cs.removeLeadingDotSegment=cs.makeAbsolute=cs.unixify=void 0;var Zut=ye(\"os\"),Xut=ye(\"path\"),kAe=Zut.platform()===\"win32\",$ut=2,eft=/(\\\\?)([()*?[\\]{|}]|^!|[!+@](?=\\()|\\\\(?![!()*+?@[\\]{|}]))/g,tft=/(\\\\?)([()[\\]{}]|^!|[!+@](?=\\())/g,rft=/^\\\\\\\\([.?])/,nft=/\\\\(?![!()+@[\\]{}])/g;function ift(t){return t.replace(/\\\\/g,\"/\")}cs.unixify=ift;function sft(t,e){return Xut.resolve(t,e)}cs.makeAbsolute=sft;function oft(t){if(t.charAt(0)===\".\"){let e=t.charAt(1);if(e===\"/\"||e===\"\\\\\")return t.slice($ut)}return t}cs.removeLeadingDotSegment=oft;cs.escape=kAe?S3:D3;function S3(t){return t.replace(tft,\"\\\\$2\")}cs.escapeWindowsPath=S3;function D3(t){return t.replace(eft,\"\\\\$2\")}cs.escapePosixPath=D3;cs.convertPathToPattern=kAe?QAe:TAe;function QAe(t){return S3(t).replace(rft,\"//$1\").replace(nft,\"/\")}cs.convertWindowsPathToPattern=QAe;function TAe(t){return D3(t)}cs.convertPosixPathToPattern=TAe});var NAe=L((RKt,FAe)=>{FAe.exports=function(e){if(typeof e!=\"string\"||e===\"\")return!1;for(var r;r=/(\\\\).|([@?!+*]\\(.*\\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var MAe=L((FKt,LAe)=>{var aft=NAe(),OAe={\"{\":\"}\",\"(\":\")\",\"[\":\"]\"},lft=function(t){if(t[0]===\"!\")return!0;for(var e=0,r=-2,s=-2,a=-2,n=-2,c=-2;e<t.length;){if(t[e]===\"*\"||t[e+1]===\"?\"&&/[\\].+)]/.test(t[e])||s!==-1&&t[e]===\"[\"&&t[e+1]!==\"]\"&&(s<e&&(s=t.indexOf(\"]\",e)),s>e&&(c===-1||c>s||(c=t.indexOf(\"\\\\\",e),c===-1||c>s)))||a!==-1&&t[e]===\"{\"&&t[e+1]!==\"}\"&&(a=t.indexOf(\"}\",e),a>e&&(c=t.indexOf(\"\\\\\",e),c===-1||c>a))||n!==-1&&t[e]===\"(\"&&t[e+1]===\"?\"&&/[:!=]/.test(t[e+2])&&t[e+3]!==\")\"&&(n=t.indexOf(\")\",e),n>e&&(c=t.indexOf(\"\\\\\",e),c===-1||c>n))||r!==-1&&t[e]===\"(\"&&t[e+1]!==\"|\"&&(r<e&&(r=t.indexOf(\"|\",e)),r!==-1&&t[r+1]!==\")\"&&(n=t.indexOf(\")\",r),n>r&&(c=t.indexOf(\"\\\\\",r),c===-1||c>n))))return!0;if(t[e]===\"\\\\\"){var f=t[e+1];e+=2;var p=OAe[f];if(p){var h=t.indexOf(p,e);h!==-1&&(e=h+1)}if(t[e]===\"!\")return!0}else e++}return!1},cft=function(t){if(t[0]===\"!\")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\\]]/.test(t[e]))return!0;if(t[e]===\"\\\\\"){var r=t[e+1];e+=2;var s=OAe[r];if(s){var a=t.indexOf(s,e);a!==-1&&(e=a+1)}if(t[e]===\"!\")return!0}else e++}return!1};LAe.exports=function(e,r){if(typeof e!=\"string\"||e===\"\")return!1;if(aft(e))return!0;var s=lft;return r&&r.strict===!1&&(s=cft),s(e)}});var UAe=L((NKt,_Ae)=>{\"use strict\";var uft=MAe(),fft=ye(\"path\").posix.dirname,Aft=ye(\"os\").platform()===\"win32\",b3=\"/\",pft=/\\\\/g,hft=/[\\{\\[].*[\\}\\]]$/,gft=/(^|[^\\\\])([\\{\\[]|\\([^\\)]+$)/,dft=/\\\\([\\!\\*\\?\\|\\[\\]\\(\\)\\{\\}])/g;_Ae.exports=function(e,r){var s=Object.assign({flipBackslashes:!0},r);s.flipBackslashes&&Aft&&e.indexOf(b3)<0&&(e=e.replace(pft,b3)),hft.test(e)&&(e+=b3),e+=\"a\";do e=fft(e);while(uft(e)||gft.test(e));return e.replace(dft,\"$1\")}});var KAe=L(jr=>{\"use strict\";Object.defineProperty(jr,\"__esModule\",{value:!0});jr.removeDuplicateSlashes=jr.matchAny=jr.convertPatternsToRe=jr.makeRe=jr.getPatternParts=jr.expandBraceExpansion=jr.expandPatternsWithBraceExpansion=jr.isAffectDepthOfReadingPattern=jr.endsWithSlashGlobStar=jr.hasGlobStar=jr.getBaseDirectory=jr.isPatternRelatedToParentDirectory=jr.getPatternsOutsideCurrentDirectory=jr.getPatternsInsideCurrentDirectory=jr.getPositivePatterns=jr.getNegativePatterns=jr.isPositivePattern=jr.isNegativePattern=jr.convertToNegativePattern=jr.convertToPositivePattern=jr.isDynamicPattern=jr.isStaticPattern=void 0;var mft=ye(\"path\"),yft=UAe(),P3=Sa(),HAe=\"**\",Eft=\"\\\\\",Ift=/[*?]|^!/,Cft=/\\[[^[]*]/,wft=/(?:^|[^!*+?@])\\([^(]*\\|[^|]*\\)/,Bft=/[!*+?@]\\([^(]*\\)/,vft=/,|\\.\\./,Sft=/(?!^)\\/{2,}/g;function jAe(t,e={}){return!qAe(t,e)}jr.isStaticPattern=jAe;function qAe(t,e={}){return t===\"\"?!1:!!(e.caseSensitiveMatch===!1||t.includes(Eft)||Ift.test(t)||Cft.test(t)||wft.test(t)||e.extglob!==!1&&Bft.test(t)||e.braceExpansion!==!1&&Dft(t))}jr.isDynamicPattern=qAe;function Dft(t){let e=t.indexOf(\"{\");if(e===-1)return!1;let r=t.indexOf(\"}\",e+1);if(r===-1)return!1;let s=t.slice(e,r);return vft.test(s)}function bft(t){return nQ(t)?t.slice(1):t}jr.convertToPositivePattern=bft;function Pft(t){return\"!\"+t}jr.convertToNegativePattern=Pft;function nQ(t){return t.startsWith(\"!\")&&t[1]!==\"(\"}jr.isNegativePattern=nQ;function GAe(t){return!nQ(t)}jr.isPositivePattern=GAe;function xft(t){return t.filter(nQ)}jr.getNegativePatterns=xft;function kft(t){return t.filter(GAe)}jr.getPositivePatterns=kft;function Qft(t){return t.filter(e=>!x3(e))}jr.getPatternsInsideCurrentDirectory=Qft;function Tft(t){return t.filter(x3)}jr.getPatternsOutsideCurrentDirectory=Tft;function x3(t){return t.startsWith(\"..\")||t.startsWith(\"./..\")}jr.isPatternRelatedToParentDirectory=x3;function Rft(t){return yft(t,{flipBackslashes:!1})}jr.getBaseDirectory=Rft;function Fft(t){return t.includes(HAe)}jr.hasGlobStar=Fft;function WAe(t){return t.endsWith(\"/\"+HAe)}jr.endsWithSlashGlobStar=WAe;function Nft(t){let e=mft.basename(t);return WAe(t)||jAe(e)}jr.isAffectDepthOfReadingPattern=Nft;function Oft(t){return t.reduce((e,r)=>e.concat(YAe(r)),[])}jr.expandPatternsWithBraceExpansion=Oft;function YAe(t){let e=P3.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,s)=>r.length-s.length),e.filter(r=>r!==\"\")}jr.expandBraceExpansion=YAe;function Lft(t,e){let{parts:r}=P3.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith(\"/\")&&(r[0]=r[0].slice(1),r.unshift(\"\")),r}jr.getPatternParts=Lft;function VAe(t,e){return P3.makeRe(t,e)}jr.makeRe=VAe;function Mft(t,e){return t.map(r=>VAe(r,e))}jr.convertPatternsToRe=Mft;function _ft(t,e){return e.some(r=>r.test(t))}jr.matchAny=_ft;function Uft(t){return t.replace(Sft,\"/\")}jr.removeDuplicateSlashes=Uft});var XAe=L((LKt,ZAe)=>{\"use strict\";var Hft=ye(\"stream\"),JAe=Hft.PassThrough,jft=Array.prototype.slice;ZAe.exports=qft;function qft(){let t=[],e=jft.call(arguments),r=!1,s=e[e.length-1];s&&!Array.isArray(s)&&s.pipe==null?e.pop():s={};let a=s.end!==!1,n=s.pipeError===!0;s.objectMode==null&&(s.objectMode=!0),s.highWaterMark==null&&(s.highWaterMark=64*1024);let c=JAe(s);function f(){for(let E=0,C=arguments.length;E<C;E++)t.push(zAe(arguments[E],s));return p(),this}function p(){if(r)return;r=!0;let E=t.shift();if(!E){process.nextTick(h);return}Array.isArray(E)||(E=[E]);let C=E.length+1;function S(){--C>0||(r=!1,p())}function P(I){function R(){I.removeListener(\"merge2UnpipeEnd\",R),I.removeListener(\"end\",R),n&&I.removeListener(\"error\",N),S()}function N(U){c.emit(\"error\",U)}if(I._readableState.endEmitted)return S();I.on(\"merge2UnpipeEnd\",R),I.on(\"end\",R),n&&I.on(\"error\",N),I.pipe(c,{end:!1}),I.resume()}for(let I=0;I<E.length;I++)P(E[I]);S()}function h(){r=!1,c.emit(\"queueDrain\"),a&&c.end()}return c.setMaxListeners(0),c.add=f,c.on(\"unpipe\",function(E){E.emit(\"merge2UnpipeEnd\")}),e.length&&f.apply(null,e),c}function zAe(t,e){if(Array.isArray(t))for(let r=0,s=t.length;r<s;r++)t[r]=zAe(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(JAe(e))),!t._readableState||!t.pause||!t.pipe)throw new Error(\"Only readable stream can be merged.\");t.pause()}return t}});var epe=L(iQ=>{\"use strict\";Object.defineProperty(iQ,\"__esModule\",{value:!0});iQ.merge=void 0;var Gft=XAe();function Wft(t){let e=Gft(t);return t.forEach(r=>{r.once(\"error\",s=>e.emit(\"error\",s))}),e.once(\"close\",()=>$Ae(t)),e.once(\"end\",()=>$Ae(t)),e}iQ.merge=Wft;function $Ae(t){t.forEach(e=>e.emit(\"close\"))}});var tpe=L(ZE=>{\"use strict\";Object.defineProperty(ZE,\"__esModule\",{value:!0});ZE.isEmpty=ZE.isString=void 0;function Yft(t){return typeof t==\"string\"}ZE.isString=Yft;function Vft(t){return t===\"\"}ZE.isEmpty=Vft});var Qp=L(Vo=>{\"use strict\";Object.defineProperty(Vo,\"__esModule\",{value:!0});Vo.string=Vo.stream=Vo.pattern=Vo.path=Vo.fs=Vo.errno=Vo.array=void 0;var Kft=bAe();Vo.array=Kft;var Jft=PAe();Vo.errno=Jft;var zft=xAe();Vo.fs=zft;var Zft=RAe();Vo.path=Zft;var Xft=KAe();Vo.pattern=Xft;var $ft=epe();Vo.stream=$ft;var eAt=tpe();Vo.string=eAt});var spe=L(Ko=>{\"use strict\";Object.defineProperty(Ko,\"__esModule\",{value:!0});Ko.convertPatternGroupToTask=Ko.convertPatternGroupsToTasks=Ko.groupPatternsByBaseDirectory=Ko.getNegativePatternsAsPositive=Ko.getPositivePatterns=Ko.convertPatternsToTasks=Ko.generate=void 0;var ju=Qp();function tAt(t,e){let r=rpe(t,e),s=rpe(e.ignore,e),a=npe(r),n=ipe(r,s),c=a.filter(E=>ju.pattern.isStaticPattern(E,e)),f=a.filter(E=>ju.pattern.isDynamicPattern(E,e)),p=k3(c,n,!1),h=k3(f,n,!0);return p.concat(h)}Ko.generate=tAt;function rpe(t,e){let r=t;return e.braceExpansion&&(r=ju.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(s=>s.includes(\"/\")?s:`**/${s}`)),r.map(s=>ju.pattern.removeDuplicateSlashes(s))}function k3(t,e,r){let s=[],a=ju.pattern.getPatternsOutsideCurrentDirectory(t),n=ju.pattern.getPatternsInsideCurrentDirectory(t),c=Q3(a),f=Q3(n);return s.push(...T3(c,e,r)),\".\"in f?s.push(R3(\".\",n,e,r)):s.push(...T3(f,e,r)),s}Ko.convertPatternsToTasks=k3;function npe(t){return ju.pattern.getPositivePatterns(t)}Ko.getPositivePatterns=npe;function ipe(t,e){return ju.pattern.getNegativePatterns(t).concat(e).map(ju.pattern.convertToPositivePattern)}Ko.getNegativePatternsAsPositive=ipe;function Q3(t){let e={};return t.reduce((r,s)=>{let a=ju.pattern.getBaseDirectory(s);return a in r?r[a].push(s):r[a]=[s],r},e)}Ko.groupPatternsByBaseDirectory=Q3;function T3(t,e,r){return Object.keys(t).map(s=>R3(s,t[s],e,r))}Ko.convertPatternGroupsToTasks=T3;function R3(t,e,r,s){return{dynamic:s,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(ju.pattern.convertToNegativePattern))}}Ko.convertPatternGroupToTask=R3});var ape=L(sQ=>{\"use strict\";Object.defineProperty(sQ,\"__esModule\",{value:!0});sQ.read=void 0;function rAt(t,e,r){e.fs.lstat(t,(s,a)=>{if(s!==null){ope(r,s);return}if(!a.isSymbolicLink()||!e.followSymbolicLink){F3(r,a);return}e.fs.stat(t,(n,c)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){ope(r,n);return}F3(r,a);return}e.markSymbolicLink&&(c.isSymbolicLink=()=>!0),F3(r,c)})})}sQ.read=rAt;function ope(t,e){t(e)}function F3(t,e){t(null,e)}});var lpe=L(oQ=>{\"use strict\";Object.defineProperty(oQ,\"__esModule\",{value:!0});oQ.read=void 0;function nAt(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let s=e.fs.statSync(t);return e.markSymbolicLink&&(s.isSymbolicLink=()=>!0),s}catch(s){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw s}}oQ.read=nAt});var cpe=L(h0=>{\"use strict\";Object.defineProperty(h0,\"__esModule\",{value:!0});h0.createFileSystemAdapter=h0.FILE_SYSTEM_ADAPTER=void 0;var aQ=ye(\"fs\");h0.FILE_SYSTEM_ADAPTER={lstat:aQ.lstat,stat:aQ.stat,lstatSync:aQ.lstatSync,statSync:aQ.statSync};function iAt(t){return t===void 0?h0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},h0.FILE_SYSTEM_ADAPTER),t)}h0.createFileSystemAdapter=iAt});var upe=L(O3=>{\"use strict\";Object.defineProperty(O3,\"__esModule\",{value:!0});var sAt=cpe(),N3=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=sAt.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};O3.default=N3});var Xd=L(g0=>{\"use strict\";Object.defineProperty(g0,\"__esModule\",{value:!0});g0.statSync=g0.stat=g0.Settings=void 0;var fpe=ape(),oAt=lpe(),L3=upe();g0.Settings=L3.default;function aAt(t,e,r){if(typeof e==\"function\"){fpe.read(t,M3(),e);return}fpe.read(t,M3(e),r)}g0.stat=aAt;function lAt(t,e){let r=M3(e);return oAt.read(t,r)}g0.statSync=lAt;function M3(t={}){return t instanceof L3.default?t:new L3.default(t)}});var hpe=L((VKt,ppe)=>{var Ape;ppe.exports=typeof queueMicrotask==\"function\"?queueMicrotask.bind(typeof window<\"u\"?window:global):t=>(Ape||(Ape=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var dpe=L((KKt,gpe)=>{gpe.exports=uAt;var cAt=hpe();function uAt(t,e){let r,s,a,n=!0;Array.isArray(t)?(r=[],s=t.length):(a=Object.keys(t),r={},s=a.length);function c(p){function h(){e&&e(p,r),e=null}n?cAt(h):h()}function f(p,h,E){r[p]=E,(--s===0||h)&&c(h)}s?a?a.forEach(function(p){t[p](function(h,E){f(p,h,E)})}):t.forEach(function(p,h){p(function(E,C){f(h,E,C)})}):c(null),n=!1}});var _3=L(cQ=>{\"use strict\";Object.defineProperty(cQ,\"__esModule\",{value:!0});cQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var lQ=process.versions.node.split(\".\");if(lQ[0]===void 0||lQ[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var mpe=Number.parseInt(lQ[0],10),fAt=Number.parseInt(lQ[1],10),ype=10,AAt=10,pAt=mpe>ype,hAt=mpe===ype&&fAt>=AAt;cQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=pAt||hAt});var Epe=L(uQ=>{\"use strict\";Object.defineProperty(uQ,\"__esModule\",{value:!0});uQ.createDirentFromStats=void 0;var U3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function gAt(t,e){return new U3(t,e)}uQ.createDirentFromStats=gAt});var H3=L(fQ=>{\"use strict\";Object.defineProperty(fQ,\"__esModule\",{value:!0});fQ.fs=void 0;var dAt=Epe();fQ.fs=dAt});var j3=L(AQ=>{\"use strict\";Object.defineProperty(AQ,\"__esModule\",{value:!0});AQ.joinPathSegments=void 0;function mAt(t,e,r){return t.endsWith(r)?t+e:t+r+e}AQ.joinPathSegments=mAt});var Spe=L(d0=>{\"use strict\";Object.defineProperty(d0,\"__esModule\",{value:!0});d0.readdir=d0.readdirWithFileTypes=d0.read=void 0;var yAt=Xd(),Ipe=dpe(),EAt=_3(),Cpe=H3(),wpe=j3();function IAt(t,e,r){if(!e.stats&&EAt.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Bpe(t,e,r);return}vpe(t,e,r)}d0.read=IAt;function Bpe(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(s,a)=>{if(s!==null){pQ(r,s);return}let n=a.map(f=>({dirent:f,name:f.name,path:wpe.joinPathSegments(t,f.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){q3(r,n);return}let c=n.map(f=>CAt(f,e));Ipe(c,(f,p)=>{if(f!==null){pQ(r,f);return}q3(r,p)})})}d0.readdirWithFileTypes=Bpe;function CAt(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(s,a)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,t);return}t.dirent=Cpe.fs.createDirentFromStats(t.name,a),r(null,t)})}}function vpe(t,e,r){e.fs.readdir(t,(s,a)=>{if(s!==null){pQ(r,s);return}let n=a.map(c=>{let f=wpe.joinPathSegments(t,c,e.pathSegmentSeparator);return p=>{yAt.stat(f,e.fsStatSettings,(h,E)=>{if(h!==null){p(h);return}let C={name:c,path:f,dirent:Cpe.fs.createDirentFromStats(c,E)};e.stats&&(C.stats=E),p(null,C)})}});Ipe(n,(c,f)=>{if(c!==null){pQ(r,c);return}q3(r,f)})})}d0.readdir=vpe;function pQ(t,e){t(e)}function q3(t,e){t(null,e)}});var kpe=L(m0=>{\"use strict\";Object.defineProperty(m0,\"__esModule\",{value:!0});m0.readdir=m0.readdirWithFileTypes=m0.read=void 0;var wAt=Xd(),BAt=_3(),Dpe=H3(),bpe=j3();function vAt(t,e){return!e.stats&&BAt.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Ppe(t,e):xpe(t,e)}m0.read=vAt;function Ppe(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(s=>{let a={dirent:s,name:s.name,path:bpe.joinPathSegments(t,s.name,e.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let n=e.fs.statSync(a.path);a.dirent=Dpe.fs.createDirentFromStats(a.name,n)}catch(n){if(e.throwErrorOnBrokenSymbolicLink)throw n}return a})}m0.readdirWithFileTypes=Ppe;function xpe(t,e){return e.fs.readdirSync(t).map(s=>{let a=bpe.joinPathSegments(t,s,e.pathSegmentSeparator),n=wAt.statSync(a,e.fsStatSettings),c={name:s,path:a,dirent:Dpe.fs.createDirentFromStats(s,n)};return e.stats&&(c.stats=n),c})}m0.readdir=xpe});var Qpe=L(y0=>{\"use strict\";Object.defineProperty(y0,\"__esModule\",{value:!0});y0.createFileSystemAdapter=y0.FILE_SYSTEM_ADAPTER=void 0;var XE=ye(\"fs\");y0.FILE_SYSTEM_ADAPTER={lstat:XE.lstat,stat:XE.stat,lstatSync:XE.lstatSync,statSync:XE.statSync,readdir:XE.readdir,readdirSync:XE.readdirSync};function SAt(t){return t===void 0?y0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},y0.FILE_SYSTEM_ADAPTER),t)}y0.createFileSystemAdapter=SAt});var Tpe=L(W3=>{\"use strict\";Object.defineProperty(W3,\"__esModule\",{value:!0});var DAt=ye(\"path\"),bAt=Xd(),PAt=Qpe(),G3=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=PAt.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,DAt.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new bAt.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};W3.default=G3});var hQ=L(E0=>{\"use strict\";Object.defineProperty(E0,\"__esModule\",{value:!0});E0.Settings=E0.scandirSync=E0.scandir=void 0;var Rpe=Spe(),xAt=kpe(),Y3=Tpe();E0.Settings=Y3.default;function kAt(t,e,r){if(typeof e==\"function\"){Rpe.read(t,V3(),e);return}Rpe.read(t,V3(e),r)}E0.scandir=kAt;function QAt(t,e){let r=V3(e);return xAt.read(t,r)}E0.scandirSync=QAt;function V3(t={}){return t instanceof Y3.default?t:new Y3.default(t)}});var Npe=L((iJt,Fpe)=>{\"use strict\";function TAt(t){var e=new t,r=e;function s(){var n=e;return n.next?e=n.next:(e=new t,r=e),n.next=null,n}function a(n){r.next=n,r=n}return{get:s,release:a}}Fpe.exports=TAt});var Lpe=L((sJt,K3)=>{\"use strict\";var RAt=Npe();function Ope(t,e,r){if(typeof t==\"function\"&&(r=e,e=t,t=null),!(r>=1))throw new Error(\"fastqueue concurrency must be equal to or greater than 1\");var s=RAt(FAt),a=null,n=null,c=0,f=null,p={push:R,drain:Tc,saturated:Tc,pause:E,paused:!1,get concurrency(){return r},set concurrency(Ae){if(!(Ae>=1))throw new Error(\"fastqueue concurrency must be equal to or greater than 1\");if(r=Ae,!p.paused)for(;a&&c<r;)c++,U()},running:h,resume:P,idle:I,length:C,getQueue:S,unshift:N,empty:Tc,kill:W,killAndDrain:te,error:ie};return p;function h(){return c}function E(){p.paused=!0}function C(){for(var Ae=a,ce=0;Ae;)Ae=Ae.next,ce++;return ce}function S(){for(var Ae=a,ce=[];Ae;)ce.push(Ae.value),Ae=Ae.next;return ce}function P(){if(p.paused){if(p.paused=!1,a===null){c++,U();return}for(;a&&c<r;)c++,U()}}function I(){return c===0&&p.length()===0}function R(Ae,ce){var me=s.get();me.context=t,me.release=U,me.value=Ae,me.callback=ce||Tc,me.errorHandler=f,c>=r||p.paused?n?(n.next=me,n=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function N(Ae,ce){var me=s.get();me.context=t,me.release=U,me.value=Ae,me.callback=ce||Tc,me.errorHandler=f,c>=r||p.paused?a?(me.next=a,a=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function U(Ae){Ae&&s.release(Ae);var ce=a;ce&&c<=r?p.paused?c--:(n===a&&(n=null),a=ce.next,ce.next=null,e.call(t,ce.value,ce.worked),n===null&&p.empty()):--c===0&&p.drain()}function W(){a=null,n=null,p.drain=Tc}function te(){a=null,n=null,p.drain(),p.drain=Tc}function ie(Ae){f=Ae}}function Tc(){}function FAt(){this.value=null,this.callback=Tc,this.next=null,this.release=Tc,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,s){var a=t.callback,n=t.errorHandler,c=t.value;t.value=null,t.callback=Tc,t.errorHandler&&n(r,c),a.call(t.context,r,s),t.release(t)}}function NAt(t,e,r){typeof t==\"function\"&&(r=e,e=t,t=null);function s(E,C){e.call(this,E).then(function(S){C(null,S)},C)}var a=Ope(t,s,r),n=a.push,c=a.unshift;return a.push=f,a.unshift=p,a.drained=h,a;function f(E){var C=new Promise(function(S,P){n(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(Tc),C}function p(E){var C=new Promise(function(S,P){c(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(Tc),C}function h(){if(a.idle())return new Promise(function(S){S()});var E=a.drain,C=new Promise(function(S){a.drain=function(){E(),S()}});return C}}K3.exports=Ope;K3.exports.promise=NAt});var gQ=L(Xf=>{\"use strict\";Object.defineProperty(Xf,\"__esModule\",{value:!0});Xf.joinPathSegments=Xf.replacePathSegmentSeparator=Xf.isAppliedFilter=Xf.isFatalError=void 0;function OAt(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}Xf.isFatalError=OAt;function LAt(t,e){return t===null||t(e)}Xf.isAppliedFilter=LAt;function MAt(t,e){return t.split(/[/\\\\]/).join(e)}Xf.replacePathSegmentSeparator=MAt;function _At(t,e,r){return t===\"\"?e:t.endsWith(r)?t+e:t+r+e}Xf.joinPathSegments=_At});var Z3=L(z3=>{\"use strict\";Object.defineProperty(z3,\"__esModule\",{value:!0});var UAt=gQ(),J3=class{constructor(e,r){this._root=e,this._settings=r,this._root=UAt.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};z3.default=J3});var e8=L($3=>{\"use strict\";Object.defineProperty($3,\"__esModule\",{value:!0});var HAt=ye(\"events\"),jAt=hQ(),qAt=Lpe(),dQ=gQ(),GAt=Z3(),X3=class extends GAt.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=jAt.scandir,this._emitter=new HAt.EventEmitter,this._queue=qAt(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit(\"end\")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error(\"The reader is already destroyed\");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on(\"entry\",e)}onError(e){this._emitter.once(\"error\",e)}onEnd(e){this._emitter.once(\"end\",e)}_pushToQueue(e,r){let s={directory:e,base:r};this._queue.push(s,a=>{a!==null&&this._handleError(a)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(s,a)=>{if(s!==null){r(s,void 0);return}for(let n of a)this._handleEntry(n,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!dQ.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit(\"error\",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let s=e.path;r!==void 0&&(e.path=dQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),dQ.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&dQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit(\"entry\",e)}};$3.default=X3});var Mpe=L(r8=>{\"use strict\";Object.defineProperty(r8,\"__esModule\",{value:!0});var WAt=e8(),t8=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new WAt.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{YAt(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{VAt(e,this._storage)}),this._reader.read()}};r8.default=t8;function YAt(t,e){t(e)}function VAt(t,e){t(null,e)}});var _pe=L(i8=>{\"use strict\";Object.defineProperty(i8,\"__esModule\",{value:!0});var KAt=ye(\"stream\"),JAt=e8(),n8=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new JAt.default(this._root,this._settings),this._stream=new KAt.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit(\"error\",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};i8.default=n8});var Upe=L(o8=>{\"use strict\";Object.defineProperty(o8,\"__esModule\",{value:!0});var zAt=hQ(),mQ=gQ(),ZAt=Z3(),s8=class extends ZAt.default{constructor(){super(...arguments),this._scandir=zAt.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let s=this._scandir(e,this._settings.fsScandirSettings);for(let a of s)this._handleEntry(a,r)}catch(s){this._handleError(s)}}_handleError(e){if(mQ.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let s=e.path;r!==void 0&&(e.path=mQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),mQ.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&mQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};o8.default=s8});var Hpe=L(l8=>{\"use strict\";Object.defineProperty(l8,\"__esModule\",{value:!0});var XAt=Upe(),a8=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new XAt.default(this._root,this._settings)}read(){return this._reader.read()}};l8.default=a8});var jpe=L(u8=>{\"use strict\";Object.defineProperty(u8,\"__esModule\",{value:!0});var $At=ye(\"path\"),ept=hQ(),c8=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,$At.sep),this.fsScandirSettings=new ept.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};u8.default=c8});var EQ=L($f=>{\"use strict\";Object.defineProperty($f,\"__esModule\",{value:!0});$f.Settings=$f.walkStream=$f.walkSync=$f.walk=void 0;var qpe=Mpe(),tpt=_pe(),rpt=Hpe(),f8=jpe();$f.Settings=f8.default;function npt(t,e,r){if(typeof e==\"function\"){new qpe.default(t,yQ()).read(e);return}new qpe.default(t,yQ(e)).read(r)}$f.walk=npt;function ipt(t,e){let r=yQ(e);return new rpt.default(t,r).read()}$f.walkSync=ipt;function spt(t,e){let r=yQ(e);return new tpt.default(t,r).read()}$f.walkStream=spt;function yQ(t={}){return t instanceof f8.default?t:new f8.default(t)}});var IQ=L(p8=>{\"use strict\";Object.defineProperty(p8,\"__esModule\",{value:!0});var opt=ye(\"path\"),apt=Xd(),Gpe=Qp(),A8=class{constructor(e){this._settings=e,this._fsStatSettings=new apt.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return opt.resolve(this._settings.cwd,e)}_makeEntry(e,r){let s={name:r,path:r,dirent:Gpe.fs.createDirentFromStats(r,e)};return this._settings.stats&&(s.stats=e),s}_isFatalError(e){return!Gpe.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};p8.default=A8});var d8=L(g8=>{\"use strict\";Object.defineProperty(g8,\"__esModule\",{value:!0});var lpt=ye(\"stream\"),cpt=Xd(),upt=EQ(),fpt=IQ(),h8=class extends fpt.default{constructor(){super(...arguments),this._walkStream=upt.walkStream,this._stat=cpt.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let s=e.map(this._getFullEntryPath,this),a=new lpt.PassThrough({objectMode:!0});a._write=(n,c,f)=>this._getEntry(s[n],e[n],r).then(p=>{p!==null&&r.entryFilter(p)&&a.push(p),n===s.length-1&&a.end(),f()}).catch(f);for(let n=0;n<s.length;n++)a.write(n);return a}_getEntry(e,r,s){return this._getStat(e).then(a=>this._makeEntry(a,r)).catch(a=>{if(s.errorFilter(a))return null;throw a})}_getStat(e){return new Promise((r,s)=>{this._stat(e,this._fsStatSettings,(a,n)=>a===null?r(n):s(a))})}};g8.default=h8});var Wpe=L(y8=>{\"use strict\";Object.defineProperty(y8,\"__esModule\",{value:!0});var Apt=EQ(),ppt=IQ(),hpt=d8(),m8=class extends ppt.default{constructor(){super(...arguments),this._walkAsync=Apt.walk,this._readerStream=new hpt.default(this._settings)}dynamic(e,r){return new Promise((s,a)=>{this._walkAsync(e,r,(n,c)=>{n===null?s(c):a(n)})})}async static(e,r){let s=[],a=this._readerStream.static(e,r);return new Promise((n,c)=>{a.once(\"error\",c),a.on(\"data\",f=>s.push(f)),a.once(\"end\",()=>n(s))})}};y8.default=m8});var Ype=L(I8=>{\"use strict\";Object.defineProperty(I8,\"__esModule\",{value:!0});var KB=Qp(),E8=class{constructor(e,r,s){this._patterns=e,this._settings=r,this._micromatchOptions=s,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),s=this._splitSegmentsIntoSections(r);this._storage.push({complete:s.length<=1,pattern:e,segments:r,sections:s})}}_getPatternSegments(e){return KB.pattern.getPatternParts(e,this._micromatchOptions).map(s=>KB.pattern.isDynamicPattern(s,this._settings)?{dynamic:!0,pattern:s,patternRe:KB.pattern.makeRe(s,this._micromatchOptions)}:{dynamic:!1,pattern:s})}_splitSegmentsIntoSections(e){return KB.array.splitWhen(e,r=>r.dynamic&&KB.pattern.hasGlobStar(r.pattern))}};I8.default=E8});var Vpe=L(w8=>{\"use strict\";Object.defineProperty(w8,\"__esModule\",{value:!0});var gpt=Ype(),C8=class extends gpt.default{match(e){let r=e.split(\"/\"),s=r.length,a=this._storage.filter(n=>!n.complete||n.segments.length>s);for(let n of a){let c=n.sections[0];if(!n.complete&&s>c.length||r.every((p,h)=>{let E=n.segments[h];return!!(E.dynamic&&E.patternRe.test(p)||!E.dynamic&&E.pattern===p)}))return!0}return!1}};w8.default=C8});var Kpe=L(v8=>{\"use strict\";Object.defineProperty(v8,\"__esModule\",{value:!0});var CQ=Qp(),dpt=Vpe(),B8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,s){let a=this._getMatcher(r),n=this._getNegativePatternsRe(s);return c=>this._filter(e,c,a,n)}_getMatcher(e){return new dpt.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(CQ.pattern.isAffectDepthOfReadingPattern);return CQ.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,s,a){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let n=CQ.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(n,s)?!1:this._isSkippedByNegativePatterns(n,a)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let s=r.split(\"/\").length;if(e===\"\")return s;let a=e.split(\"/\").length;return s-a}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!CQ.pattern.matchAny(e,r)}};v8.default=B8});var Jpe=L(D8=>{\"use strict\";Object.defineProperty(D8,\"__esModule\",{value:!0});var $d=Qp(),S8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let s=$d.pattern.convertPatternsToRe(e,this._micromatchOptions),a=$d.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return n=>this._filter(n,s,a)}_filter(e,r,s){let a=$d.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(a)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(a,s))return!1;let n=e.dirent.isDirectory(),c=this._isMatchToPatterns(a,r,n)&&!this._isMatchToPatterns(a,s,n);return this._settings.unique&&c&&this._createIndexRecord(a),c}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let s=$d.path.makeAbsolute(this._settings.cwd,e);return $d.pattern.matchAny(s,r)}_isMatchToPatterns(e,r,s){let a=$d.pattern.matchAny(e,r);return!a&&s?$d.pattern.matchAny(e+\"/\",r):a}};D8.default=S8});var zpe=L(P8=>{\"use strict\";Object.defineProperty(P8,\"__esModule\",{value:!0});var mpt=Qp(),b8=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return mpt.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};P8.default=b8});var Xpe=L(k8=>{\"use strict\";Object.defineProperty(k8,\"__esModule\",{value:!0});var Zpe=Qp(),x8=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Zpe.path.makeAbsolute(this._settings.cwd,r),r=Zpe.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+=\"/\"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};k8.default=x8});var wQ=L(T8=>{\"use strict\";Object.defineProperty(T8,\"__esModule\",{value:!0});var ypt=ye(\"path\"),Ept=Kpe(),Ipt=Jpe(),Cpt=zpe(),wpt=Xpe(),Q8=class{constructor(e){this._settings=e,this.errorFilter=new Cpt.default(this._settings),this.entryFilter=new Ipt.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Ept.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new wpt.default(this._settings)}_getRootDirectory(e){return ypt.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base===\".\"?\"\":e.base;return{basePath:r,pathSegmentSeparator:\"/\",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};T8.default=Q8});var $pe=L(F8=>{\"use strict\";Object.defineProperty(F8,\"__esModule\",{value:!0});var Bpt=Wpe(),vpt=wQ(),R8=class extends vpt.default{constructor(){super(...arguments),this._reader=new Bpt.default(this._settings)}async read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return(await this.api(r,e,s)).map(n=>s.transform(n))}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};F8.default=R8});var ehe=L(O8=>{\"use strict\";Object.defineProperty(O8,\"__esModule\",{value:!0});var Spt=ye(\"stream\"),Dpt=d8(),bpt=wQ(),N8=class extends bpt.default{constructor(){super(...arguments),this._reader=new Dpt.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e),a=this.api(r,e,s),n=new Spt.Readable({objectMode:!0,read:()=>{}});return a.once(\"error\",c=>n.emit(\"error\",c)).on(\"data\",c=>n.emit(\"data\",s.transform(c))).once(\"end\",()=>n.emit(\"end\")),n.once(\"close\",()=>a.destroy()),n}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};O8.default=N8});var the=L(M8=>{\"use strict\";Object.defineProperty(M8,\"__esModule\",{value:!0});var Ppt=Xd(),xpt=EQ(),kpt=IQ(),L8=class extends kpt.default{constructor(){super(...arguments),this._walkSync=xpt.walkSync,this._statSync=Ppt.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let s=[];for(let a of e){let n=this._getFullEntryPath(a),c=this._getEntry(n,a,r);c===null||!r.entryFilter(c)||s.push(c)}return s}_getEntry(e,r,s){try{let a=this._getStat(e);return this._makeEntry(a,r)}catch(a){if(s.errorFilter(a))return null;throw a}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};M8.default=L8});var rhe=L(U8=>{\"use strict\";Object.defineProperty(U8,\"__esModule\",{value:!0});var Qpt=the(),Tpt=wQ(),_8=class extends Tpt.default{constructor(){super(...arguments),this._reader=new Qpt.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return this.api(r,e,s).map(s.transform)}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};U8.default=_8});var nhe=L(eI=>{\"use strict\";Object.defineProperty(eI,\"__esModule\",{value:!0});eI.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var $E=ye(\"fs\"),Rpt=ye(\"os\"),Fpt=Math.max(Rpt.cpus().length,1);eI.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:$E.lstat,lstatSync:$E.lstatSync,stat:$E.stat,statSync:$E.statSync,readdir:$E.readdir,readdirSync:$E.readdirSync};var H8=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,Fpt),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},eI.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};eI.default=H8});var BQ=L((kJt,she)=>{\"use strict\";var ihe=spe(),Npt=$pe(),Opt=ehe(),Lpt=rhe(),j8=nhe(),Rc=Qp();async function q8(t,e){qu(t);let r=G8(t,Npt.default,e),s=await Promise.all(r);return Rc.array.flatten(s)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(h,E){qu(h);let C=G8(h,Lpt.default,E);return Rc.array.flatten(C)}t.sync=e;function r(h,E){qu(h);let C=G8(h,Opt.default,E);return Rc.stream.merge(C)}t.stream=r;function s(h,E){qu(h);let C=[].concat(h),S=new j8.default(E);return ihe.generate(C,S)}t.generateTasks=s;function a(h,E){qu(h);let C=new j8.default(E);return Rc.pattern.isDynamicPattern(h,C)}t.isDynamicPattern=a;function n(h){return qu(h),Rc.path.escape(h)}t.escapePath=n;function c(h){return qu(h),Rc.path.convertPathToPattern(h)}t.convertPathToPattern=c;let f;(function(h){function E(S){return qu(S),Rc.path.escapePosixPath(S)}h.escapePath=E;function C(S){return qu(S),Rc.path.convertPosixPathToPattern(S)}h.convertPathToPattern=C})(f=t.posix||(t.posix={}));let p;(function(h){function E(S){return qu(S),Rc.path.escapeWindowsPath(S)}h.escapePath=E;function C(S){return qu(S),Rc.path.convertWindowsPathToPattern(S)}h.convertPathToPattern=C})(p=t.win32||(t.win32={}))})(q8||(q8={}));function G8(t,e,r){let s=[].concat(t),a=new j8.default(r),n=ihe.generate(s,a),c=new e(a);return n.map(c.read,c)}function qu(t){if(![].concat(t).every(s=>Rc.string.isString(s)&&!Rc.string.isEmpty(s)))throw new TypeError(\"Patterns must be a string (non empty) or an array of strings\")}she.exports=q8});var Nn={};Vt(Nn,{checksumFile:()=>SQ,checksumPattern:()=>DQ,makeHash:()=>us});function us(...t){let e=(0,vQ.createHash)(\"sha512\"),r=\"\";for(let s of t)typeof s==\"string\"?r+=s:s&&(r&&(e.update(r),r=\"\"),e.update(s));return r&&e.update(r),e.digest(\"hex\")}async function SQ(t,{baseFs:e,algorithm:r}={baseFs:le,algorithm:\"sha512\"}){let s=await e.openPromise(t,\"r\");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,vQ.createHash)(r),f=0;for(;(f=await e.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest(\"hex\")}finally{await e.closePromise(s)}}async function DQ(t,{cwd:e}){let s=(await(0,W8.default)(t,{cwd:ue.fromPortablePath(e),onlyDirectories:!0})).map(f=>`${f}/**/*`),a=await(0,W8.default)([t,...s],{cwd:ue.fromPortablePath(e),onlyFiles:!1});a.sort();let n=await Promise.all(a.map(async f=>{let p=[Buffer.from(f)],h=K.join(e,ue.toPortablePath(f)),E=await le.lstatPromise(h);return E.isSymbolicLink()?p.push(Buffer.from(await le.readlinkPromise(h))):E.isFile()&&p.push(await le.readFilePromise(h)),p.join(\"\\0\")})),c=(0,vQ.createHash)(\"sha512\");for(let f of n)c.update(f);return c.digest(\"hex\")}var vQ,W8,I0=It(()=>{bt();vQ=ye(\"crypto\"),W8=et(BQ())});var q={};Vt(q,{allPeerRequests:()=>nv,areDescriptorsEqual:()=>uhe,areIdentsEqual:()=>XB,areLocatorsEqual:()=>$B,areVirtualPackagesEquivalent:()=>Ypt,bindDescriptor:()=>Gpt,bindLocator:()=>Wpt,convertDescriptorToLocator:()=>bQ,convertLocatorToDescriptor:()=>V8,convertPackageToLocator:()=>Hpt,convertToIdent:()=>Upt,convertToManifestRange:()=>rht,copyPackage:()=>zB,devirtualizeDescriptor:()=>ZB,devirtualizeLocator:()=>rI,ensureDevirtualizedDescriptor:()=>jpt,ensureDevirtualizedLocator:()=>qpt,getIdentVendorPath:()=>Z8,isPackageCompatible:()=>TQ,isVirtualDescriptor:()=>Tp,isVirtualLocator:()=>Gu,makeDescriptor:()=>On,makeIdent:()=>ba,makeLocator:()=>Ys,makeRange:()=>kQ,parseDescriptor:()=>C0,parseFileStyleRange:()=>eht,parseIdent:()=>Da,parseLocator:()=>Rp,parseRange:()=>em,prettyDependent:()=>B3,prettyDescriptor:()=>ri,prettyIdent:()=>$i,prettyLocator:()=>Yr,prettyLocatorNoColors:()=>w3,prettyRange:()=>iI,prettyReference:()=>tv,prettyResolution:()=>VB,prettyWorkspace:()=>rv,renamePackage:()=>K8,slugifyIdent:()=>Y8,slugifyLocator:()=>nI,sortDescriptors:()=>sI,stringifyDescriptor:()=>ll,stringifyIdent:()=>cn,stringifyLocator:()=>cl,tryParseDescriptor:()=>ev,tryParseIdent:()=>fhe,tryParseLocator:()=>xQ,tryParseRange:()=>$pt,unwrapIdentFromScope:()=>iht,virtualizeDescriptor:()=>J8,virtualizePackage:()=>z8,wrapIdentIntoScope:()=>nht});function ba(t,e){if(t?.startsWith(\"@\"))throw new Error(\"Invalid scope: don't prefix it with '@'\");return{identHash:us(t,e),scope:t,name:e}}function On(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:us(t.identHash,e),range:e}}function Ys(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:us(t.identHash,e),reference:e}}function Upt(t){return{identHash:t.identHash,scope:t.scope,name:t.name}}function bQ(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.descriptorHash,reference:t.range}}function V8(t){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:t.locatorHash,range:t.reference}}function Hpt(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference}}function K8(t,e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference,version:t.version,languageName:t.languageName,linkType:t.linkType,conditions:t.conditions,dependencies:new Map(t.dependencies),peerDependencies:new Map(t.peerDependencies),dependenciesMeta:new Map(t.dependenciesMeta),peerDependenciesMeta:new Map(t.peerDependenciesMeta),bin:new Map(t.bin)}}function zB(t){return K8(t,t)}function J8(t,e){if(e.includes(\"#\"))throw new Error(\"Invalid entropy\");return On(t,`virtual:${e}#${t.range}`)}function z8(t,e){if(e.includes(\"#\"))throw new Error(\"Invalid entropy\");return K8(t,Ys(t,`virtual:${e}#${t.reference}`))}function Tp(t){return t.range.startsWith(JB)}function Gu(t){return t.reference.startsWith(JB)}function ZB(t){if(!Tp(t))throw new Error(\"Not a virtual descriptor\");return On(t,t.range.replace(PQ,\"\"))}function rI(t){if(!Gu(t))throw new Error(\"Not a virtual descriptor\");return Ys(t,t.reference.replace(PQ,\"\"))}function jpt(t){return Tp(t)?On(t,t.range.replace(PQ,\"\")):t}function qpt(t){return Gu(t)?Ys(t,t.reference.replace(PQ,\"\")):t}function Gpt(t,e){return t.range.includes(\"::\")?t:On(t,`${t.range}::${tI.default.stringify(e)}`)}function Wpt(t,e){return t.reference.includes(\"::\")?t:Ys(t,`${t.reference}::${tI.default.stringify(e)}`)}function XB(t,e){return t.identHash===e.identHash}function uhe(t,e){return t.descriptorHash===e.descriptorHash}function $B(t,e){return t.locatorHash===e.locatorHash}function Ypt(t,e){if(!Gu(t))throw new Error(\"Invalid package type\");if(!Gu(e))throw new Error(\"Invalid package type\");if(!XB(t,e)||t.dependencies.size!==e.dependencies.size)return!1;for(let r of t.dependencies.values()){let s=e.dependencies.get(r.identHash);if(!s||!uhe(r,s))return!1}return!0}function Da(t){let e=fhe(t);if(!e)throw new Error(`Invalid ident (${t})`);return e}function fhe(t){let e=t.match(Vpt);if(!e)return null;let[,r,s]=e;return ba(typeof r<\"u\"?r:null,s)}function C0(t,e=!1){let r=ev(t,e);if(!r)throw new Error(`Invalid descriptor (${t})`);return r}function ev(t,e=!1){let r=e?t.match(Kpt):t.match(Jpt);if(!r)return null;let[,s,a,n]=r;if(n===\"unknown\")throw new Error(`Invalid range (${t})`);let c=typeof s<\"u\"?s:null,f=typeof n<\"u\"?n:\"unknown\";return On(ba(c,a),f)}function Rp(t,e=!1){let r=xQ(t,e);if(!r)throw new Error(`Invalid locator (${t})`);return r}function xQ(t,e=!1){let r=e?t.match(zpt):t.match(Zpt);if(!r)return null;let[,s,a,n]=r;if(n===\"unknown\")throw new Error(`Invalid reference (${t})`);let c=typeof s<\"u\"?s:null,f=typeof n<\"u\"?n:\"unknown\";return Ys(ba(c,a),f)}function em(t,e){let r=t.match(Xpt);if(r===null)throw new Error(`Invalid range (${t})`);let s=typeof r[1]<\"u\"?r[1]:null;if(typeof e?.requireProtocol==\"string\"&&s!==e.requireProtocol)throw new Error(`Invalid protocol (${s})`);if(e?.requireProtocol&&s===null)throw new Error(`Missing protocol (${s})`);let a=typeof r[3]<\"u\"?decodeURIComponent(r[2]):null;if(e?.requireSource&&a===null)throw new Error(`Missing source (${t})`);let n=typeof r[3]<\"u\"?decodeURIComponent(r[3]):decodeURIComponent(r[2]),c=e?.parseSelector?tI.default.parse(n):n,f=typeof r[4]<\"u\"?tI.default.parse(r[4]):null;return{protocol:s,source:a,selector:c,params:f}}function $pt(t,e){try{return em(t,e)}catch{return null}}function eht(t,{protocol:e}){let{selector:r,params:s}=em(t,{requireProtocol:e,requireBindings:!0});if(typeof s.locator!=\"string\")throw new Error(`Assertion failed: Invalid bindings for ${t}`);return{parentLocator:Rp(s.locator,!0),path:r}}function ohe(t){return t=t.replaceAll(\"%\",\"%25\"),t=t.replaceAll(\":\",\"%3A\"),t=t.replaceAll(\"#\",\"%23\"),t}function tht(t){return t===null?!1:Object.entries(t).length>0}function kQ({protocol:t,source:e,selector:r,params:s}){let a=\"\";return t!==null&&(a+=`${t}`),e!==null&&(a+=`${ohe(e)}#`),a+=ohe(r),tht(s)&&(a+=`::${tI.default.stringify(s)}`),a}function rht(t){let{params:e,protocol:r,source:s,selector:a}=em(t);for(let n in e)n.startsWith(\"__\")&&delete e[n];return kQ({protocol:r,source:s,params:e,selector:a})}function cn(t){return t.scope?`@${t.scope}/${t.name}`:`${t.name}`}function nht(t,e){return t.scope?ba(e,`${t.scope}__${t.name}`):ba(e,t.name)}function iht(t,e){if(t.scope!==e)return t;let r=t.name.indexOf(\"__\");if(r===-1)return ba(null,t.name);let s=t.name.slice(0,r),a=t.name.slice(r+2);return ba(s,a)}function ll(t){return t.scope?`@${t.scope}/${t.name}@${t.range}`:`${t.name}@${t.range}`}function cl(t){return t.scope?`@${t.scope}/${t.name}@${t.reference}`:`${t.name}@${t.reference}`}function Y8(t){return t.scope!==null?`@${t.scope}-${t.name}`:t.name}function nI(t){let{protocol:e,selector:r}=em(t.reference),s=e!==null?e.replace(sht,\"\"):\"exotic\",a=ahe.default.valid(r),n=a!==null?`${s}-${a}`:`${s}`,c=10;return t.scope?`${Y8(t)}-${n}-${t.locatorHash.slice(0,c)}`:`${Y8(t)}-${n}-${t.locatorHash.slice(0,c)}`}function $i(t,e){return e.scope?`${Ut(t,`@${e.scope}/`,Ct.SCOPE)}${Ut(t,e.name,Ct.NAME)}`:`${Ut(t,e.name,Ct.NAME)}`}function QQ(t){if(t.startsWith(JB)){let e=QQ(t.substring(t.indexOf(\"#\")+1)),r=t.substring(JB.length,JB.length+Mpt);return`${e} [${r}]`}else return t.replace(oht,\"?[...]\")}function iI(t,e){return`${Ut(t,QQ(e),Ct.RANGE)}`}function ri(t,e){return`${$i(t,e)}${Ut(t,\"@\",Ct.RANGE)}${iI(t,e.range)}`}function tv(t,e){return`${Ut(t,QQ(e),Ct.REFERENCE)}`}function Yr(t,e){return`${$i(t,e)}${Ut(t,\"@\",Ct.REFERENCE)}${tv(t,e.reference)}`}function w3(t){return`${cn(t)}@${QQ(t.reference)}`}function sI(t){return Ws(t,[e=>cn(e),e=>e.range])}function rv(t,e){return $i(t,e.anchoredLocator)}function VB(t,e,r){let s=Tp(e)?ZB(e):e;return r===null?`${ri(t,s)} \\u2192 ${C3(t).Cross}`:s.identHash===r.identHash?`${ri(t,s)} \\u2192 ${tv(t,r.reference)}`:`${ri(t,s)} \\u2192 ${Yr(t,r)}`}function B3(t,e,r){return r===null?`${Yr(t,e)}`:`${Yr(t,e)} (via ${iI(t,r.range)})`}function Z8(t){return`node_modules/${cn(t)}`}function TQ(t,e){return t.conditions?_pt(t.conditions,r=>{let[,s,a]=r.match(che),n=e[s];return n?n.includes(a):!0}):!0}function nv(t){let e=new Set;if(\"children\"in t)e.add(t);else for(let r of t.requests.values())e.add(r);for(let r of e)for(let s of r.children.values())e.add(s);return e}var tI,ahe,lhe,JB,Mpt,che,_pt,PQ,Vpt,Kpt,Jpt,zpt,Zpt,Xpt,sht,oht,Yo=It(()=>{tI=et(ye(\"querystring\")),ahe=et(fi()),lhe=et(noe());Qc();I0();kc();Yo();JB=\"virtual:\",Mpt=5,che=/(os|cpu|libc)=([a-z0-9_-]+)/,_pt=(0,lhe.makeParser)(che);PQ=/^[^#]*#/;Vpt=/^(?:@([^/]+?)\\/)?([^@/]+)$/;Kpt=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))$/,Jpt=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))?$/;zpt=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))$/,Zpt=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))?$/;Xpt=/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/;sht=/:$/;oht=/\\?.*/});var Ahe,phe=It(()=>{Yo();Ahe={hooks:{reduceDependency:(t,e,r,s,{resolver:a,resolveOptions:n})=>{for(let{pattern:c,reference:f}of e.topLevelWorkspace.manifest.resolutions){if(c.from&&(c.from.fullName!==cn(r)||e.configuration.normalizeLocator(Ys(Da(c.from.fullName),c.from.description??r.reference)).locatorHash!==r.locatorHash)||c.descriptor.fullName!==cn(t)||e.configuration.normalizeDependency(On(Rp(c.descriptor.fullName),c.descriptor.description??t.range)).descriptorHash!==t.descriptorHash)continue;return a.bindDescriptor(e.configuration.normalizeDependency(On(t,f)),e.topLevelWorkspace.anchoredLocator,n)}return t},validateProject:async(t,e)=>{for(let r of t.workspaces){let s=rv(t.configuration,r);await t.configuration.triggerHook(a=>a.validateWorkspace,r,{reportWarning:(a,n)=>e.reportWarning(a,`${s}: ${n}`),reportError:(a,n)=>e.reportError(a,`${s}: ${n}`)})}},validateWorkspace:async(t,e)=>{let{manifest:r}=t;r.resolutions.length&&t.cwd!==t.project.cwd&&r.errors.push(new Error(\"Resolutions field will be ignored\"));for(let s of r.errors)e.reportWarning(57,s.message)}}}});var yi,tm=It(()=>{yi=class t{static{this.protocol=\"workspace:\"}supportsDescriptor(e,r){return!!(e.range.startsWith(t.protocol)||r.project.tryWorkspaceByDescriptor(e)!==null)}supportsLocator(e,r){return!!e.reference.startsWith(t.protocol)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[s.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.getWorkspaceByCwd(e.reference.slice(t.protocol.length));return{...e,version:s.manifest.version||\"0.0.0\",languageName:\"unknown\",linkType:\"SOFT\",conditions:null,dependencies:r.project.configuration.normalizeDependencyMap(new Map([...s.manifest.dependencies,...s.manifest.devDependencies])),peerDependencies:new Map([...s.manifest.peerDependencies]),dependenciesMeta:s.manifest.dependenciesMeta,peerDependenciesMeta:s.manifest.peerDependenciesMeta,bin:s.manifest.bin}}}});var Or={};Vt(Or,{SemVer:()=>yhe.SemVer,clean:()=>lht,getComparator:()=>dhe,mergeComparators:()=>X8,satisfiesWithPrereleases:()=>eA,simplifyRanges:()=>$8,stringifyComparator:()=>mhe,validRange:()=>ul});function eA(t,e,r=!1){if(!t)return!1;let s=`${e}${r}`,a=hhe.get(s);if(typeof a>\"u\")try{a=new Fp.default.Range(e,{includePrerelease:!0,loose:r})}catch{return!1}finally{hhe.set(s,a||null)}else if(a===null)return!1;let n;try{n=new Fp.default.SemVer(t,a)}catch{return!1}return a.test(n)?!0:(n.prerelease&&(n.prerelease=[]),a.set.some(c=>{for(let f of c)f.semver.prerelease&&(f.semver.prerelease=[]);return c.every(f=>f.test(n))}))}function ul(t){if(t.indexOf(\":\")!==-1)return null;let e=ghe.get(t);if(typeof e<\"u\")return e;try{e=new Fp.default.Range(t)}catch{e=null}return ghe.set(t,e),e}function lht(t){let e=aht.exec(t);return e?e[1]:null}function dhe(t){if(t.semver===Fp.default.Comparator.ANY)return{gt:null,lt:null};switch(t.operator){case\"\":return{gt:[\">=\",t.semver],lt:[\"<=\",t.semver]};case\">\":case\">=\":return{gt:[t.operator,t.semver],lt:null};case\"<\":case\"<=\":return{gt:null,lt:[t.operator,t.semver]};default:throw new Error(`Assertion failed: Unexpected comparator operator (${t.operator})`)}}function X8(t){if(t.length===0)return null;let e=null,r=null;for(let s of t){if(s.gt){let a=e!==null?Fp.default.compare(s.gt[1],e[1]):null;(a===null||a>0||a===0&&s.gt[0]===\">\")&&(e=s.gt)}if(s.lt){let a=r!==null?Fp.default.compare(s.lt[1],r[1]):null;(a===null||a<0||a===0&&s.lt[0]===\"<\")&&(r=s.lt)}}if(e&&r){let s=Fp.default.compare(e[1],r[1]);if(s===0&&(e[0]===\">\"||r[0]===\"<\")||s>0)return null}return{gt:e,lt:r}}function mhe(t){if(t.gt&&t.lt){if(t.gt[0]===\">=\"&&t.lt[0]===\"<=\"&&t.gt[1].version===t.lt[1].version)return t.gt[1].version;if(t.gt[0]===\">=\"&&t.lt[0]===\"<\"){if(t.lt[1].version===`${t.gt[1].major+1}.0.0-0`)return`^${t.gt[1].version}`;if(t.lt[1].version===`${t.gt[1].major}.${t.gt[1].minor+1}.0-0`)return`~${t.gt[1].version}`}}let e=[];return t.gt&&e.push(t.gt[0]+t.gt[1].version),t.lt&&e.push(t.lt[0]+t.lt[1].version),e.length?e.join(\" \"):\"*\"}function $8(t){let e=t.map(cht).map(s=>ul(s).set.map(a=>a.map(n=>dhe(n)))),r=e.shift().map(s=>X8(s)).filter(s=>s!==null);for(let s of e){let a=[];for(let n of r)for(let c of s){let f=X8([n,...c]);f!==null&&a.push(f)}r=a}return r.length===0?null:r.map(s=>mhe(s)).join(\" || \")}function cht(t){let e=t.split(\"||\");if(e.length>1){let r=new Set;for(let s of e)e.some(a=>a!==s&&Fp.default.subset(s,a))||r.add(s);if(r.size<e.length)return[...r].join(\" || \")}return t}var Fp,yhe,hhe,ghe,aht,Np=It(()=>{Fp=et(fi()),yhe=et(fi()),hhe=new Map;ghe=new Map;aht=/^(?:[\\sv=]*?)((0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s*)$/});function Ehe(t){let e=t.match(/^[ \\t]+/m);return e?e[0]:\"  \"}function Ihe(t){return t.charCodeAt(0)===65279?t.slice(1):t}function Pa(t){return t.replace(/\\\\/g,\"/\")}function RQ(t,{yamlCompatibilityMode:e}){return e?h3(t):typeof t>\"u\"||typeof t==\"boolean\"?t:null}function Che(t,e){let r=e.search(/[^!]/);if(r===-1)return\"invalid\";let s=r%2===0?\"\":\"!\",a=e.slice(r);return`${s}${t}=${a}`}function eH(t,e){return e.length===1?Che(t,e[0]):`(${e.map(r=>Che(t,r)).join(\" | \")})`}var whe,Ht,oI=It(()=>{bt();Bc();whe=et(fi());tm();kc();Np();Yo();Ht=class t{constructor(){this.indent=\"  \";this.name=null;this.version=null;this.os=null;this.cpu=null;this.libc=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static{this.fileName=\"package.json\"}static{this.allDependencies=[\"dependencies\",\"devDependencies\",\"peerDependencies\"]}static{this.hardDependencies=[\"dependencies\",\"devDependencies\"]}static async tryFind(e,{baseFs:r=new Yn}={}){let s=K.join(e,\"package.json\");try{return await t.fromFile(s,{baseFs:r})}catch(a){if(a.code===\"ENOENT\")return null;throw a}}static async find(e,{baseFs:r}={}){let s=await t.tryFind(e,{baseFs:r});if(s===null)throw new Error(\"Manifest not found\");return s}static async fromFile(e,{baseFs:r=new Yn}={}){let s=new t;return await s.loadFile(e,{baseFs:r}),s}static fromText(e){let r=new t;return r.loadFromText(e),r}loadFromText(e){let r;try{r=JSON.parse(Ihe(e)||\"{}\")}catch(s){throw s.message+=` (when parsing ${e})`,s}this.load(r),this.indent=Ehe(e)}async loadFile(e,{baseFs:r=new Yn}){let s=await r.readFilePromise(e,\"utf8\"),a;try{a=JSON.parse(Ihe(s)||\"{}\")}catch(n){throw n.message+=` (when parsing ${e})`,n}this.load(a),this.indent=Ehe(s)}load(e,{yamlCompatibilityMode:r=!1}={}){if(typeof e!=\"object\"||e===null)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;let s=[];if(this.name=null,typeof e.name==\"string\")try{this.name=Da(e.name)}catch{s.push(new Error(\"Parsing failed for the 'name' field\"))}if(typeof e.version==\"string\"?this.version=e.version:this.version=null,Array.isArray(e.os)){let n=[];this.os=n;for(let c of e.os)typeof c!=\"string\"?s.push(new Error(\"Parsing failed for the 'os' field\")):n.push(c)}else this.os=null;if(Array.isArray(e.cpu)){let n=[];this.cpu=n;for(let c of e.cpu)typeof c!=\"string\"?s.push(new Error(\"Parsing failed for the 'cpu' field\")):n.push(c)}else this.cpu=null;if(Array.isArray(e.libc)){let n=[];this.libc=n;for(let c of e.libc)typeof c!=\"string\"?s.push(new Error(\"Parsing failed for the 'libc' field\")):n.push(c)}else this.libc=null;if(typeof e.type==\"string\"?this.type=e.type:this.type=null,typeof e.packageManager==\"string\"?this.packageManager=e.packageManager:this.packageManager=null,typeof e.private==\"boolean\"?this.private=e.private:this.private=!1,typeof e.license==\"string\"?this.license=e.license:this.license=null,typeof e.languageName==\"string\"?this.languageName=e.languageName:this.languageName=null,typeof e.main==\"string\"?this.main=Pa(e.main):this.main=null,typeof e.module==\"string\"?this.module=Pa(e.module):this.module=null,e.browser!=null)if(typeof e.browser==\"string\")this.browser=Pa(e.browser);else{this.browser=new Map;for(let[n,c]of Object.entries(e.browser))this.browser.set(Pa(n),typeof c==\"string\"?Pa(c):c)}else this.browser=null;if(this.bin=new Map,typeof e.bin==\"string\")e.bin.trim()===\"\"?s.push(new Error(\"Invalid bin field\")):this.name!==null?this.bin.set(this.name.name,Pa(e.bin)):s.push(new Error(\"String bin field, but no attached package name\"));else if(typeof e.bin==\"object\"&&e.bin!==null)for(let[n,c]of Object.entries(e.bin)){if(typeof c!=\"string\"||c.trim()===\"\"){s.push(new Error(`Invalid bin definition for '${n}'`));continue}let f=Da(n);this.bin.set(f.name,Pa(c))}if(this.scripts=new Map,typeof e.scripts==\"object\"&&e.scripts!==null)for(let[n,c]of Object.entries(e.scripts)){if(typeof c!=\"string\"){s.push(new Error(`Invalid script definition for '${n}'`));continue}this.scripts.set(n,c)}if(this.dependencies=new Map,typeof e.dependencies==\"object\"&&e.dependencies!==null)for(let[n,c]of Object.entries(e.dependencies)){if(typeof c!=\"string\"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p)}if(this.devDependencies=new Map,typeof e.devDependencies==\"object\"&&e.devDependencies!==null)for(let[n,c]of Object.entries(e.devDependencies)){if(typeof c!=\"string\"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.devDependencies.set(p.identHash,p)}if(this.peerDependencies=new Map,typeof e.peerDependencies==\"object\"&&e.peerDependencies!==null)for(let[n,c]of Object.entries(e.peerDependencies)){let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}(typeof c!=\"string\"||!c.startsWith(yi.protocol)&&!ul(c))&&(s.push(new Error(`Invalid dependency range for '${n}'`)),c=\"*\");let p=On(f,c);this.peerDependencies.set(p.identHash,p)}typeof e.workspaces==\"object\"&&e.workspaces!==null&&e.workspaces.nohoist&&s.push(new Error(\"'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead\"));let a=Array.isArray(e.workspaces)?e.workspaces:typeof e.workspaces==\"object\"&&e.workspaces!==null&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];this.workspaceDefinitions=[];for(let n of a){if(typeof n!=\"string\"){s.push(new Error(`Invalid workspace definition for '${n}'`));continue}this.workspaceDefinitions.push({pattern:n})}if(this.dependenciesMeta=new Map,typeof e.dependenciesMeta==\"object\"&&e.dependenciesMeta!==null)for(let[n,c]of Object.entries(e.dependenciesMeta)){if(typeof c!=\"object\"||c===null){s.push(new Error(`Invalid meta field for '${n}`));continue}let f=C0(n),p=this.ensureDependencyMeta(f),h=RQ(c.built,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid built meta field for '${n}'`));continue}let E=RQ(c.optional,{yamlCompatibilityMode:r});if(E===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}let C=RQ(c.unplugged,{yamlCompatibilityMode:r});if(C===null){s.push(new Error(`Invalid unplugged meta field for '${n}'`));continue}Object.assign(p,{built:h,optional:E,unplugged:C})}if(this.peerDependenciesMeta=new Map,typeof e.peerDependenciesMeta==\"object\"&&e.peerDependenciesMeta!==null)for(let[n,c]of Object.entries(e.peerDependenciesMeta)){if(typeof c!=\"object\"||c===null){s.push(new Error(`Invalid meta field for '${n}'`));continue}let f=C0(n),p=this.ensurePeerDependencyMeta(f),h=RQ(c.optional,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}Object.assign(p,{optional:h})}if(this.resolutions=[],typeof e.resolutions==\"object\"&&e.resolutions!==null)for(let[n,c]of Object.entries(e.resolutions)){if(typeof c!=\"string\"){s.push(new Error(`Invalid resolution entry for '${n}'`));continue}try{this.resolutions.push({pattern:bx(n),reference:c})}catch(f){s.push(f);continue}}if(Array.isArray(e.files)){this.files=new Set;for(let n of e.files){if(typeof n!=\"string\"){s.push(new Error(`Invalid files entry for '${n}'`));continue}this.files.add(n)}}else this.files=null;if(typeof e.publishConfig==\"object\"&&e.publishConfig!==null){if(this.publishConfig={},typeof e.publishConfig.access==\"string\"&&(this.publishConfig.access=e.publishConfig.access),typeof e.publishConfig.main==\"string\"&&(this.publishConfig.main=Pa(e.publishConfig.main)),typeof e.publishConfig.module==\"string\"&&(this.publishConfig.module=Pa(e.publishConfig.module)),e.publishConfig.browser!=null)if(typeof e.publishConfig.browser==\"string\")this.publishConfig.browser=Pa(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[n,c]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(Pa(n),typeof c==\"string\"?Pa(c):c)}if(typeof e.publishConfig.registry==\"string\"&&(this.publishConfig.registry=e.publishConfig.registry),typeof e.publishConfig.bin==\"string\")this.name!==null?this.publishConfig.bin=new Map([[this.name.name,Pa(e.publishConfig.bin)]]):s.push(new Error(\"String bin field, but no attached package name\"));else if(typeof e.publishConfig.bin==\"object\"&&e.publishConfig.bin!==null){this.publishConfig.bin=new Map;for(let[n,c]of Object.entries(e.publishConfig.bin)){if(typeof c!=\"string\"){s.push(new Error(`Invalid bin definition for '${n}'`));continue}this.publishConfig.bin.set(n,Pa(c))}}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let n of e.publishConfig.executableFiles){if(typeof n!=\"string\"){s.push(new Error(\"Invalid executable file definition\"));continue}this.publishConfig.executableFiles.add(Pa(n))}}}else this.publishConfig=null;if(typeof e.installConfig==\"object\"&&e.installConfig!==null){this.installConfig={};for(let n of Object.keys(e.installConfig))n===\"hoistingLimits\"?typeof e.installConfig.hoistingLimits==\"string\"?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:s.push(new Error(\"Invalid hoisting limits definition\")):n==\"selfReferences\"?typeof e.installConfig.selfReferences==\"boolean\"?this.installConfig.selfReferences=e.installConfig.selfReferences:s.push(new Error(\"Invalid selfReferences definition, must be a boolean value\")):s.push(new Error(`Unrecognized installConfig key: ${n}`))}else this.installConfig=null;if(typeof e.optionalDependencies==\"object\"&&e.optionalDependencies!==null)for(let[n,c]of Object.entries(e.optionalDependencies)){if(typeof c!=\"string\"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p);let h=On(f,\"unknown\"),E=this.ensureDependencyMeta(h);Object.assign(E,{optional:!0})}typeof e.preferUnplugged==\"boolean\"?this.preferUnplugged=e.preferUnplugged:this.preferUnplugged=null,this.errors=s}getForScope(e){switch(e){case\"dependencies\":return this.dependencies;case\"devDependencies\":return this.devDependencies;case\"peerDependencies\":return this.peerDependencies;default:throw new Error(`Unsupported value (\"${e}\")`)}}hasConsumerDependency(e){return!!(this.dependencies.has(e.identHash)||this.peerDependencies.has(e.identHash))}hasHardDependency(e){return!!(this.dependencies.has(e.identHash)||this.devDependencies.has(e.identHash))}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!(this.hasHardDependency(e)||this.hasSoftDependency(e))}getConditions(){let e=[];return this.os&&this.os.length>0&&e.push(eH(\"os\",this.os)),this.cpu&&this.cpu.length>0&&e.push(eH(\"cpu\",this.cpu)),this.libc&&this.libc.length>0&&e.push(eH(\"libc\",this.libc)),e.length>0?e.join(\" & \"):null}ensureDependencyMeta(e){if(e.range!==\"unknown\"&&!whe.default.valid(e.range))throw new Error(`Invalid meta field range for '${ll(e)}'`);let r=cn(e),s=e.range!==\"unknown\"?e.range:null,a=this.dependenciesMeta.get(r);a||this.dependenciesMeta.set(r,a=new Map);let n=a.get(s);return n||a.set(s,n={}),n}ensurePeerDependencyMeta(e){if(e.range!==\"unknown\")throw new Error(`Invalid meta field range for '${ll(e)}'`);let r=cn(e),s=this.peerDependenciesMeta.get(r);return s||this.peerDependenciesMeta.set(r,s={}),s}setRawField(e,r,{after:s=[]}={}){let a=new Set(s.filter(n=>Object.hasOwn(this.raw,n)));if(a.size===0||Object.hasOwn(this.raw,e))this.raw[e]=r;else{let n=this.raw,c=this.raw={},f=!1;for(let p of Object.keys(n))c[p]=n[p],f||(a.delete(p),a.size===0&&(c[e]=r,f=!0))}}exportTo(e,{compatibilityMode:r=!0}={}){if(Object.assign(e,this.raw),this.name!==null?e.name=cn(this.name):delete e.name,this.version!==null?e.version=this.version:delete e.version,this.os!==null?e.os=this.os:delete e.os,this.cpu!==null?e.cpu=this.cpu:delete e.cpu,this.type!==null?e.type=this.type:delete e.type,this.packageManager!==null?e.packageManager=this.packageManager:delete e.packageManager,this.private?e.private=!0:delete e.private,this.license!==null?e.license=this.license:delete e.license,this.languageName!==null?e.languageName=this.languageName:delete e.languageName,this.main!==null?e.main=this.main:delete e.main,this.module!==null?e.module=this.module:delete e.module,this.browser!==null){let n=this.browser;typeof n==\"string\"?e.browser=n:n instanceof Map&&(e.browser=Object.assign({},...Array.from(n.keys()).sort().map(c=>({[c]:n.get(c)}))))}else delete e.browser;this.bin.size===1&&this.name!==null&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(n=>({[n]:this.bin.get(n)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:n})=>n)}:e.workspaces=this.workspaceDefinitions.map(({pattern:n})=>n):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;let s=[],a=[];for(let n of this.dependencies.values()){let c=this.dependenciesMeta.get(cn(n)),f=!1;if(r&&c){let p=c.get(null);p&&p.optional&&(f=!0)}f?a.push(n):s.push(n)}s.length>0?e.dependencies=Object.assign({},...sI(s).map(n=>({[cn(n)]:n.range}))):delete e.dependencies,a.length>0?e.optionalDependencies=Object.assign({},...sI(a).map(n=>({[cn(n)]:n.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...sI(this.devDependencies.values()).map(n=>({[cn(n)]:n.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...sI(this.peerDependencies.values()).map(n=>({[cn(n)]:n.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(let[n,c]of Ws(this.dependenciesMeta.entries(),([f,p])=>f))for(let[f,p]of Ws(c.entries(),([h,E])=>h!==null?`0${h}`:\"1\")){let h=f!==null?ll(On(Da(n),f)):n,E={...p};r&&f===null&&delete E.optional,Object.keys(E).length!==0&&(e.dependenciesMeta[h]=E)}if(Object.keys(e.dependenciesMeta).length===0&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...Ws(this.peerDependenciesMeta.entries(),([n,c])=>n).map(([n,c])=>({[n]:c}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:n,reference:c})=>({[Px(n)]:c}))):delete e.resolutions,this.files!==null?e.files=Array.from(this.files):delete e.files,this.preferUnplugged!==null?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,this.scripts!==null&&this.scripts.size>0){e.scripts??={};for(let n of Object.keys(e.scripts))this.scripts.has(n)||delete e.scripts[n];for(let[n,c]of this.scripts.entries())e.scripts[n]=c}else delete e.scripts;return e}}});var vhe=L((WJt,Bhe)=>{var uht=Pc(),fht=function(){return uht.Date.now()};Bhe.exports=fht});var Dhe=L((YJt,She)=>{var Aht=/\\s/;function pht(t){for(var e=t.length;e--&&Aht.test(t.charAt(e)););return e}She.exports=pht});var Phe=L((VJt,bhe)=>{var hht=Dhe(),ght=/^\\s+/;function dht(t){return t&&t.slice(0,hht(t)+1).replace(ght,\"\")}bhe.exports=dht});var aI=L((KJt,xhe)=>{var mht=Vd(),yht=zf(),Eht=\"[object Symbol]\";function Iht(t){return typeof t==\"symbol\"||yht(t)&&mht(t)==Eht}xhe.exports=Iht});var Rhe=L((JJt,The)=>{var Cht=Phe(),khe=Wl(),wht=aI(),Qhe=NaN,Bht=/^[-+]0x[0-9a-f]+$/i,vht=/^0b[01]+$/i,Sht=/^0o[0-7]+$/i,Dht=parseInt;function bht(t){if(typeof t==\"number\")return t;if(wht(t))return Qhe;if(khe(t)){var e=typeof t.valueOf==\"function\"?t.valueOf():t;t=khe(e)?e+\"\":e}if(typeof t!=\"string\")return t===0?t:+t;t=Cht(t);var r=vht.test(t);return r||Sht.test(t)?Dht(t.slice(2),r?2:8):Bht.test(t)?Qhe:+t}The.exports=bht});var Ohe=L((zJt,Nhe)=>{var Pht=Wl(),tH=vhe(),Fhe=Rhe(),xht=\"Expected a function\",kht=Math.max,Qht=Math.min;function Tht(t,e,r){var s,a,n,c,f,p,h=0,E=!1,C=!1,S=!0;if(typeof t!=\"function\")throw new TypeError(xht);e=Fhe(e)||0,Pht(r)&&(E=!!r.leading,C=\"maxWait\"in r,n=C?kht(Fhe(r.maxWait)||0,e):n,S=\"trailing\"in r?!!r.trailing:S);function P(ce){var me=s,pe=a;return s=a=void 0,h=ce,c=t.apply(pe,me),c}function I(ce){return h=ce,f=setTimeout(U,e),E?P(ce):c}function R(ce){var me=ce-p,pe=ce-h,Be=e-me;return C?Qht(Be,n-pe):Be}function N(ce){var me=ce-p,pe=ce-h;return p===void 0||me>=e||me<0||C&&pe>=n}function U(){var ce=tH();if(N(ce))return W(ce);f=setTimeout(U,R(ce))}function W(ce){return f=void 0,S&&s?P(ce):(s=a=void 0,c)}function te(){f!==void 0&&clearTimeout(f),h=0,s=p=a=f=void 0}function ie(){return f===void 0?c:W(tH())}function Ae(){var ce=tH(),me=N(ce);if(s=arguments,a=this,p=ce,me){if(f===void 0)return I(p);if(C)return clearTimeout(f),f=setTimeout(U,e),P(p)}return f===void 0&&(f=setTimeout(U,e)),c}return Ae.cancel=te,Ae.flush=ie,Ae}Nhe.exports=Tht});var rH=L((ZJt,Lhe)=>{var Rht=Ohe(),Fht=Wl(),Nht=\"Expected a function\";function Oht(t,e,r){var s=!0,a=!0;if(typeof t!=\"function\")throw new TypeError(Nht);return Fht(r)&&(s=\"leading\"in r?!!r.leading:s,a=\"trailing\"in r?!!r.trailing:a),Rht(t,e,{leading:s,maxWait:e,trailing:a})}Lhe.exports=Oht});function Mht(t){return typeof t.reportCode<\"u\"}var Mhe,_he,Uhe,Lht,Yt,ho,Fc=It(()=>{Mhe=et(rH()),_he=ye(\"stream\"),Uhe=ye(\"string_decoder\"),Lht=15,Yt=class extends Error{constructor(r,s,a){super(s);this.reportExtra=a;this.reportCode=r}};ho=class{constructor(){this.cacheHits=new Set;this.cacheMisses=new Set;this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}getRecommendedLength(){return 180}reportCacheHit(e){this.cacheHits.add(e.locatorHash)}reportCacheMiss(e,r){this.cacheMisses.add(e.locatorHash)}static progressViaCounter(e){let r=0,s,a=new Promise(p=>{s=p}),n=p=>{let h=s;a=new Promise(E=>{s=E}),r=p,h()},c=(p=0)=>{n(r+1)},f=async function*(){for(;r<e;)await a,yield{progress:r/e}}();return{[Symbol.asyncIterator](){return f},hasProgress:!0,hasTitle:!1,set:n,tick:c}}static progressViaTitle(){let e,r,s=new Promise(c=>{r=c}),a=(0,Mhe.default)(c=>{let f=r;s=new Promise(p=>{r=p}),e=c,f()},1e3/Lht),n=async function*(){for(;;)await s,yield{title:e}}();return{[Symbol.asyncIterator](){return n},hasProgress:!1,hasTitle:!0,setTitle:a}}async startProgressPromise(e,r){let s=this.reportProgress(e);try{return await r(e)}finally{s.stop()}}startProgressSync(e,r){let s=this.reportProgress(e);try{return r(e)}finally{s.stop()}}reportInfoOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedInfos.has(a)||(this.reportedInfos.add(a),this.reportInfo(e,r),s?.reportExtra?.(this))}reportWarningOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedWarnings.has(a)||(this.reportedWarnings.add(a),this.reportWarning(e,r),s?.reportExtra?.(this))}reportErrorOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedErrors.has(a)||(this.reportedErrors.add(a),this.reportError(e,r),s?.reportExtra?.(this))}reportExceptionOnce(e){Mht(e)?this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra}):this.reportErrorOnce(1,e.stack||e.message,{key:e})}createStreamReporter(e=null){let r=new _he.PassThrough,s=new Uhe.StringDecoder,a=\"\";return r.on(\"data\",n=>{let c=s.write(n),f;do if(f=c.indexOf(`\n`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a=\"\",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(f!==-1);a+=c}),r.on(\"end\",()=>{let n=s.end();n!==\"\"&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var lI,nH=It(()=>{Fc();Yo();lI=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));return s||null}getFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));if(!s)throw new Yt(11,`${Yr(r.project.configuration,e)} isn't supported by any available fetcher`);return s}}});var rm,iH=It(()=>{Yo();rm=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.getResolverByDescriptor(e,s).bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,s){return await this.getResolverByDescriptor(e,s).getCandidates(e,r,s)}async getSatisfying(e,r,s,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,s,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));return s||null}getResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!s)throw new Error(`${ri(r.project.configuration,e)} isn't supported by any available resolver`);return s}tryResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));return s||null}getResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));if(!s)throw new Error(`${Yr(r.project.configuration,e)} isn't supported by any available resolver`);return s}}});var cI,sH=It(()=>{bt();Yo();cI=class{supports(e){return!!e.reference.startsWith(\"virtual:\")}getLocalPath(e,r){let s=e.reference.indexOf(\"#\");if(s===-1)throw new Error(\"Invalid virtual package reference\");let a=e.reference.slice(s+1),n=Ys(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let s=e.reference.indexOf(\"#\");if(s===-1)throw new Error(\"Invalid virtual package reference\");let a=e.reference.slice(s+1),n=Ys(e,a),c=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,c,r)}getLocatorFilename(e){return nI(e)}async ensureVirtualLink(e,r,s){let a=r.packageFs.getRealPath(),n=s.project.configuration.get(\"virtualFolder\"),c=this.getLocatorFilename(e),f=fo.makeVirtualPath(n,c,a),p=new Hf(f,{baseFs:r.packageFs,pathUtils:K});return{...r,packageFs:p}}}});var FQ,Hhe=It(()=>{FQ=class t{static{this.protocol=\"virtual:\"}static isVirtualDescriptor(e){return!!e.range.startsWith(t.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(t.protocol)}supportsDescriptor(e,r){return t.isVirtualDescriptor(e)}supportsLocator(e,r){return t.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){throw new Error('Assertion failed: calling \"bindDescriptor\" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling \"getResolutionDependencies\" on a virtual descriptor is unsupported')}async getCandidates(e,r,s){throw new Error('Assertion failed: calling \"getCandidates\" on a virtual descriptor is unsupported')}async getSatisfying(e,r,s,a){throw new Error('Assertion failed: calling \"getSatisfying\" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling \"resolve\" on a virtual locator is unsupported')}}});var uI,oH=It(()=>{bt();tm();uI=class{supports(e){return!!e.reference.startsWith(yi.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let s=this.getWorkspace(e,r).cwd;return{packageFs:new Sn(s),prefixPath:vt.dot,localPath:s}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(yi.protocol.length))}}});function iv(t){return typeof t==\"object\"&&t!==null&&!Array.isArray(t)}function jhe(t){return typeof t>\"u\"?3:iv(t)?0:Array.isArray(t)?1:2}function cH(t,e){return Object.hasOwn(t,e)}function Uht(t){return iv(t)&&cH(t,\"onConflict\")&&typeof t.onConflict==\"string\"}function Hht(t){if(typeof t>\"u\")return{onConflict:\"default\",value:t};if(!Uht(t))return{onConflict:\"default\",value:t};if(cH(t,\"value\"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function qhe(t,e){let r=iv(t)&&cH(t,e)?t[e]:void 0;return Hht(r)}function fI(t,e){return[t,e,Ghe]}function uH(t){return Array.isArray(t)?t[2]===Ghe:!1}function aH(t,e){if(iv(t)){let r={};for(let s of Object.keys(t))r[s]=aH(t[s],e);return fI(e,r)}return Array.isArray(t)?fI(e,t.map(r=>aH(r,e))):fI(e,t)}function lH(t,e,r,s,a){let n,c=[],f=a,p=0;for(let E=a-1;E>=s;--E){let[C,S]=t[E],{onConflict:P,value:I}=qhe(S,r),R=jhe(I);if(R!==3){if(n??=R,R!==n||P===\"hardReset\"){p=f;break}if(R===2)return fI(C,I);if(c.unshift([C,I]),P===\"reset\"){p=E;break}P===\"extend\"&&E===s&&(s=0),f=E}}if(typeof n>\"u\")return null;let h=c.map(([E])=>E).join(\", \");switch(n){case 1:return fI(h,new Array().concat(...c.map(([E,C])=>C.map(S=>aH(S,E)))));case 0:{let E=Object.assign({},...c.map(([,R])=>R)),C=Object.keys(E),S={},P=t.map(([R,N])=>[R,qhe(N,r).value]),I=_ht(P,([R,N])=>{let U=jhe(N);return U!==0&&U!==3});if(I!==-1){let R=P.slice(I+1);for(let N of C)S[N]=lH(R,e,N,0,R.length)}else for(let R of C)S[R]=lH(P,e,R,p,P.length);return fI(h,S)}default:throw new Error(\"Assertion failed: Non-extendable value type\")}}function Whe(t){return lH(t.map(([e,r])=>[e,{\".\":r}]),[],\".\",0,t.length)}function sv(t){return uH(t)?t[1]:t}function NQ(t){let e=uH(t)?t[1]:t;if(Array.isArray(e))return e.map(r=>NQ(r));if(iv(e)){let r={};for(let[s,a]of Object.entries(e))r[s]=NQ(a);return r}return e}function fH(t){return uH(t)?t[0]:null}var _ht,Ghe,Yhe=It(()=>{_ht=(t,e,r)=>{let s=[...t];return s.reverse(),s.findIndex(e,r)};Ghe=Symbol()});var OQ={};Vt(OQ,{getDefaultGlobalFolder:()=>pH,getHomeFolder:()=>AI,isFolderInside:()=>hH});function pH(){if(process.platform===\"win32\"){let t=ue.toPortablePath(process.env.LOCALAPPDATA||ue.join((0,AH.homedir)(),\"AppData\",\"Local\"));return K.resolve(t,\"Yarn/Berry\")}if(process.env.XDG_DATA_HOME){let t=ue.toPortablePath(process.env.XDG_DATA_HOME);return K.resolve(t,\"yarn/berry\")}return K.resolve(AI(),\".yarn/berry\")}function AI(){return ue.toPortablePath((0,AH.homedir)()||\"/usr/local/share\")}function hH(t,e){let r=K.relative(e,t);return r&&!r.startsWith(\"..\")&&!K.isAbsolute(r)}var AH,LQ=It(()=>{bt();AH=ye(\"os\")});var zhe=L(pI=>{\"use strict\";var uzt=ye(\"net\"),qht=ye(\"tls\"),gH=ye(\"http\"),Vhe=ye(\"https\"),Ght=ye(\"events\"),fzt=ye(\"assert\"),Wht=ye(\"util\");pI.httpOverHttp=Yht;pI.httpsOverHttp=Vht;pI.httpOverHttps=Kht;pI.httpsOverHttps=Jht;function Yht(t){var e=new Op(t);return e.request=gH.request,e}function Vht(t){var e=new Op(t);return e.request=gH.request,e.createSocket=Khe,e.defaultPort=443,e}function Kht(t){var e=new Op(t);return e.request=Vhe.request,e}function Jht(t){var e=new Op(t);return e.request=Vhe.request,e.createSocket=Khe,e.defaultPort=443,e}function Op(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||gH.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on(\"free\",function(s,a,n,c){for(var f=Jhe(a,n,c),p=0,h=e.requests.length;p<h;++p){var E=e.requests[p];if(E.host===f.host&&E.port===f.port){e.requests.splice(p,1),E.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)})}Wht.inherits(Op,Ght.EventEmitter);Op.prototype.addRequest=function(e,r,s,a){var n=this,c=dH({request:e},n.options,Jhe(r,s,a));if(n.sockets.length>=this.maxSockets){n.requests.push(c);return}n.createSocket(c,function(f){f.on(\"free\",p),f.on(\"close\",h),f.on(\"agentRemove\",h),e.onSocket(f);function p(){n.emit(\"free\",f,c)}function h(E){n.removeSocket(f),f.removeListener(\"free\",p),f.removeListener(\"close\",h),f.removeListener(\"agentRemove\",h)}})};Op.prototype.createSocket=function(e,r){var s=this,a={};s.sockets.push(a);var n=dH({},s.proxyOptions,{method:\"CONNECT\",path:e.host+\":\"+e.port,agent:!1,headers:{host:e.host+\":\"+e.port}});e.localAddress&&(n.localAddress=e.localAddress),n.proxyAuth&&(n.headers=n.headers||{},n.headers[\"Proxy-Authorization\"]=\"Basic \"+new Buffer(n.proxyAuth).toString(\"base64\")),w0(\"making CONNECT request\");var c=s.request(n);c.useChunkedEncodingByDefault=!1,c.once(\"response\",f),c.once(\"upgrade\",p),c.once(\"connect\",h),c.once(\"error\",E),c.end();function f(C){C.upgrade=!0}function p(C,S,P){process.nextTick(function(){h(C,S,P)})}function h(C,S,P){if(c.removeAllListeners(),S.removeAllListeners(),C.statusCode!==200){w0(\"tunneling socket could not be established, statusCode=%d\",C.statusCode),S.destroy();var I=new Error(\"tunneling socket could not be established, statusCode=\"+C.statusCode);I.code=\"ECONNRESET\",e.request.emit(\"error\",I),s.removeSocket(a);return}if(P.length>0){w0(\"got illegal response body from proxy\"),S.destroy();var I=new Error(\"got illegal response body from proxy\");I.code=\"ECONNRESET\",e.request.emit(\"error\",I),s.removeSocket(a);return}return w0(\"tunneling connection has established\"),s.sockets[s.sockets.indexOf(a)]=S,r(S)}function E(C){c.removeAllListeners(),w0(`tunneling socket could not be established, cause=%s\n`,C.message,C.stack);var S=new Error(\"tunneling socket could not be established, cause=\"+C.message);S.code=\"ECONNRESET\",e.request.emit(\"error\",S),s.removeSocket(a)}};Op.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var s=this.requests.shift();s&&this.createSocket(s,function(a){s.request.onSocket(a)})}};function Khe(t,e){var r=this;Op.prototype.createSocket.call(r,t,function(s){var a=t.request.getHeader(\"host\"),n=dH({},r.options,{socket:s,servername:a?a.replace(/:.*$/,\"\"):t.host}),c=qht.connect(0,n);r.sockets[r.sockets.indexOf(s)]=c,e(c)})}function Jhe(t,e,r){return typeof t==\"string\"?{host:t,port:e,localAddress:r}:t}function dH(t){for(var e=1,r=arguments.length;e<r;++e){var s=arguments[e];if(typeof s==\"object\")for(var a=Object.keys(s),n=0,c=a.length;n<c;++n){var f=a[n];s[f]!==void 0&&(t[f]=s[f])}}return t}var w0;process.env.NODE_DEBUG&&/\\btunnel\\b/.test(process.env.NODE_DEBUG)?w0=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]==\"string\"?t[0]=\"TUNNEL: \"+t[0]:t.unshift(\"TUNNEL:\"),console.error.apply(console,t)}:w0=function(){};pI.debug=w0});var Xhe=L((pzt,Zhe)=>{Zhe.exports=zhe()});var Mp=L((Lp,MQ)=>{\"use strict\";Object.defineProperty(Lp,\"__esModule\",{value:!0});var $he=[\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"];function zht(t){return $he.includes(t)}var Zht=[\"Function\",\"Generator\",\"AsyncGenerator\",\"GeneratorFunction\",\"AsyncGeneratorFunction\",\"AsyncFunction\",\"Observable\",\"Array\",\"Buffer\",\"Blob\",\"Object\",\"RegExp\",\"Date\",\"Error\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Promise\",\"URL\",\"FormData\",\"URLSearchParams\",\"HTMLElement\",...$he];function Xht(t){return Zht.includes(t)}var $ht=[\"null\",\"undefined\",\"string\",\"number\",\"bigint\",\"boolean\",\"symbol\"];function e0t(t){return $ht.includes(t)}function hI(t){return e=>typeof e===t}var{toString:e0e}=Object.prototype,ov=t=>{let e=e0e.call(t).slice(8,-1);if(/HTML\\w+Element/.test(e)&&be.domElement(t))return\"HTMLElement\";if(Xht(e))return e},Ai=t=>e=>ov(e)===t;function be(t){if(t===null)return\"null\";switch(typeof t){case\"undefined\":return\"undefined\";case\"string\":return\"string\";case\"number\":return\"number\";case\"boolean\":return\"boolean\";case\"function\":return\"Function\";case\"bigint\":return\"bigint\";case\"symbol\":return\"symbol\";default:}if(be.observable(t))return\"Observable\";if(be.array(t))return\"Array\";if(be.buffer(t))return\"Buffer\";let e=ov(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError(\"Please don't use object wrappers for primitive types\");return\"Object\"}be.undefined=hI(\"undefined\");be.string=hI(\"string\");var t0t=hI(\"number\");be.number=t=>t0t(t)&&!be.nan(t);be.bigint=hI(\"bigint\");be.function_=hI(\"function\");be.null_=t=>t===null;be.class_=t=>be.function_(t)&&t.toString().startsWith(\"class \");be.boolean=t=>t===!0||t===!1;be.symbol=hI(\"symbol\");be.numericString=t=>be.string(t)&&!be.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));be.array=(t,e)=>Array.isArray(t)?be.function_(e)?t.every(e):!0:!1;be.buffer=t=>{var e,r,s,a;return(a=(s=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||s===void 0?void 0:s.call(r,t))!==null&&a!==void 0?a:!1};be.blob=t=>Ai(\"Blob\")(t);be.nullOrUndefined=t=>be.null_(t)||be.undefined(t);be.object=t=>!be.null_(t)&&(typeof t==\"object\"||be.function_(t));be.iterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};be.asyncIterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};be.generator=t=>{var e,r;return be.iterable(t)&&be.function_((e=t)===null||e===void 0?void 0:e.next)&&be.function_((r=t)===null||r===void 0?void 0:r.throw)};be.asyncGenerator=t=>be.asyncIterable(t)&&be.function_(t.next)&&be.function_(t.throw);be.nativePromise=t=>Ai(\"Promise\")(t);var r0t=t=>{var e,r;return be.function_((e=t)===null||e===void 0?void 0:e.then)&&be.function_((r=t)===null||r===void 0?void 0:r.catch)};be.promise=t=>be.nativePromise(t)||r0t(t);be.generatorFunction=Ai(\"GeneratorFunction\");be.asyncGeneratorFunction=t=>ov(t)===\"AsyncGeneratorFunction\";be.asyncFunction=t=>ov(t)===\"AsyncFunction\";be.boundFunction=t=>be.function_(t)&&!t.hasOwnProperty(\"prototype\");be.regExp=Ai(\"RegExp\");be.date=Ai(\"Date\");be.error=Ai(\"Error\");be.map=t=>Ai(\"Map\")(t);be.set=t=>Ai(\"Set\")(t);be.weakMap=t=>Ai(\"WeakMap\")(t);be.weakSet=t=>Ai(\"WeakSet\")(t);be.int8Array=Ai(\"Int8Array\");be.uint8Array=Ai(\"Uint8Array\");be.uint8ClampedArray=Ai(\"Uint8ClampedArray\");be.int16Array=Ai(\"Int16Array\");be.uint16Array=Ai(\"Uint16Array\");be.int32Array=Ai(\"Int32Array\");be.uint32Array=Ai(\"Uint32Array\");be.float32Array=Ai(\"Float32Array\");be.float64Array=Ai(\"Float64Array\");be.bigInt64Array=Ai(\"BigInt64Array\");be.bigUint64Array=Ai(\"BigUint64Array\");be.arrayBuffer=Ai(\"ArrayBuffer\");be.sharedArrayBuffer=Ai(\"SharedArrayBuffer\");be.dataView=Ai(\"DataView\");be.enumCase=(t,e)=>Object.values(e).includes(t);be.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;be.urlInstance=t=>Ai(\"URL\")(t);be.urlString=t=>{if(!be.string(t))return!1;try{return new URL(t),!0}catch{return!1}};be.truthy=t=>!!t;be.falsy=t=>!t;be.nan=t=>Number.isNaN(t);be.primitive=t=>be.null_(t)||e0t(typeof t);be.integer=t=>Number.isInteger(t);be.safeInteger=t=>Number.isSafeInteger(t);be.plainObject=t=>{if(e0e.call(t)!==\"[object Object]\")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};be.typedArray=t=>zht(ov(t));var n0t=t=>be.safeInteger(t)&&t>=0;be.arrayLike=t=>!be.nullOrUndefined(t)&&!be.function_(t)&&n0t(t.length);be.inRange=(t,e)=>{if(be.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(be.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var i0t=1,s0t=[\"innerHTML\",\"ownerDocument\",\"style\",\"attributes\",\"nodeValue\"];be.domElement=t=>be.object(t)&&t.nodeType===i0t&&be.string(t.nodeName)&&!be.plainObject(t)&&s0t.every(e=>e in t);be.observable=t=>{var e,r,s,a;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((a=(s=t)[\"@@observable\"])===null||a===void 0?void 0:a.call(s)):!1};be.nodeStream=t=>be.object(t)&&be.function_(t.pipe)&&!be.observable(t);be.infinite=t=>t===1/0||t===-1/0;var t0e=t=>e=>be.integer(e)&&Math.abs(e%2)===t;be.evenInteger=t0e(0);be.oddInteger=t0e(1);be.emptyArray=t=>be.array(t)&&t.length===0;be.nonEmptyArray=t=>be.array(t)&&t.length>0;be.emptyString=t=>be.string(t)&&t.length===0;var o0t=t=>be.string(t)&&!/\\S/.test(t);be.emptyStringOrWhitespace=t=>be.emptyString(t)||o0t(t);be.nonEmptyString=t=>be.string(t)&&t.length>0;be.nonEmptyStringAndNotWhitespace=t=>be.string(t)&&!be.emptyStringOrWhitespace(t);be.emptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length===0;be.nonEmptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length>0;be.emptySet=t=>be.set(t)&&t.size===0;be.nonEmptySet=t=>be.set(t)&&t.size>0;be.emptyMap=t=>be.map(t)&&t.size===0;be.nonEmptyMap=t=>be.map(t)&&t.size>0;be.propertyKey=t=>be.any([be.string,be.number,be.symbol],t);be.formData=t=>Ai(\"FormData\")(t);be.urlSearchParams=t=>Ai(\"URLSearchParams\")(t);var r0e=(t,e,r)=>{if(!be.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError(\"Invalid number of values\");return t.call(r,e)};be.any=(t,...e)=>(be.array(t)?t:[t]).some(s=>r0e(Array.prototype.some,s,e));be.all=(t,...e)=>r0e(Array.prototype.every,t,e);var _t=(t,e,r,s={})=>{if(!t){let{multipleValues:a}=s,n=a?`received values of types ${[...new Set(r.map(c=>`\\`${be(c)}\\``))].join(\", \")}`:`received value of type \\`${be(r)}\\``;throw new TypeError(`Expected value which is \\`${e}\\`, ${n}.`)}};Lp.assert={undefined:t=>_t(be.undefined(t),\"undefined\",t),string:t=>_t(be.string(t),\"string\",t),number:t=>_t(be.number(t),\"number\",t),bigint:t=>_t(be.bigint(t),\"bigint\",t),function_:t=>_t(be.function_(t),\"Function\",t),null_:t=>_t(be.null_(t),\"null\",t),class_:t=>_t(be.class_(t),\"Class\",t),boolean:t=>_t(be.boolean(t),\"boolean\",t),symbol:t=>_t(be.symbol(t),\"symbol\",t),numericString:t=>_t(be.numericString(t),\"string with a number\",t),array:(t,e)=>{_t(be.array(t),\"Array\",t),e&&t.forEach(e)},buffer:t=>_t(be.buffer(t),\"Buffer\",t),blob:t=>_t(be.blob(t),\"Blob\",t),nullOrUndefined:t=>_t(be.nullOrUndefined(t),\"null or undefined\",t),object:t=>_t(be.object(t),\"Object\",t),iterable:t=>_t(be.iterable(t),\"Iterable\",t),asyncIterable:t=>_t(be.asyncIterable(t),\"AsyncIterable\",t),generator:t=>_t(be.generator(t),\"Generator\",t),asyncGenerator:t=>_t(be.asyncGenerator(t),\"AsyncGenerator\",t),nativePromise:t=>_t(be.nativePromise(t),\"native Promise\",t),promise:t=>_t(be.promise(t),\"Promise\",t),generatorFunction:t=>_t(be.generatorFunction(t),\"GeneratorFunction\",t),asyncGeneratorFunction:t=>_t(be.asyncGeneratorFunction(t),\"AsyncGeneratorFunction\",t),asyncFunction:t=>_t(be.asyncFunction(t),\"AsyncFunction\",t),boundFunction:t=>_t(be.boundFunction(t),\"Function\",t),regExp:t=>_t(be.regExp(t),\"RegExp\",t),date:t=>_t(be.date(t),\"Date\",t),error:t=>_t(be.error(t),\"Error\",t),map:t=>_t(be.map(t),\"Map\",t),set:t=>_t(be.set(t),\"Set\",t),weakMap:t=>_t(be.weakMap(t),\"WeakMap\",t),weakSet:t=>_t(be.weakSet(t),\"WeakSet\",t),int8Array:t=>_t(be.int8Array(t),\"Int8Array\",t),uint8Array:t=>_t(be.uint8Array(t),\"Uint8Array\",t),uint8ClampedArray:t=>_t(be.uint8ClampedArray(t),\"Uint8ClampedArray\",t),int16Array:t=>_t(be.int16Array(t),\"Int16Array\",t),uint16Array:t=>_t(be.uint16Array(t),\"Uint16Array\",t),int32Array:t=>_t(be.int32Array(t),\"Int32Array\",t),uint32Array:t=>_t(be.uint32Array(t),\"Uint32Array\",t),float32Array:t=>_t(be.float32Array(t),\"Float32Array\",t),float64Array:t=>_t(be.float64Array(t),\"Float64Array\",t),bigInt64Array:t=>_t(be.bigInt64Array(t),\"BigInt64Array\",t),bigUint64Array:t=>_t(be.bigUint64Array(t),\"BigUint64Array\",t),arrayBuffer:t=>_t(be.arrayBuffer(t),\"ArrayBuffer\",t),sharedArrayBuffer:t=>_t(be.sharedArrayBuffer(t),\"SharedArrayBuffer\",t),dataView:t=>_t(be.dataView(t),\"DataView\",t),enumCase:(t,e)=>_t(be.enumCase(t,e),\"EnumCase\",t),urlInstance:t=>_t(be.urlInstance(t),\"URL\",t),urlString:t=>_t(be.urlString(t),\"string with a URL\",t),truthy:t=>_t(be.truthy(t),\"truthy\",t),falsy:t=>_t(be.falsy(t),\"falsy\",t),nan:t=>_t(be.nan(t),\"NaN\",t),primitive:t=>_t(be.primitive(t),\"primitive\",t),integer:t=>_t(be.integer(t),\"integer\",t),safeInteger:t=>_t(be.safeInteger(t),\"integer\",t),plainObject:t=>_t(be.plainObject(t),\"plain object\",t),typedArray:t=>_t(be.typedArray(t),\"TypedArray\",t),arrayLike:t=>_t(be.arrayLike(t),\"array-like\",t),domElement:t=>_t(be.domElement(t),\"HTMLElement\",t),observable:t=>_t(be.observable(t),\"Observable\",t),nodeStream:t=>_t(be.nodeStream(t),\"Node.js Stream\",t),infinite:t=>_t(be.infinite(t),\"infinite number\",t),emptyArray:t=>_t(be.emptyArray(t),\"empty array\",t),nonEmptyArray:t=>_t(be.nonEmptyArray(t),\"non-empty array\",t),emptyString:t=>_t(be.emptyString(t),\"empty string\",t),emptyStringOrWhitespace:t=>_t(be.emptyStringOrWhitespace(t),\"empty string or whitespace\",t),nonEmptyString:t=>_t(be.nonEmptyString(t),\"non-empty string\",t),nonEmptyStringAndNotWhitespace:t=>_t(be.nonEmptyStringAndNotWhitespace(t),\"non-empty string and not whitespace\",t),emptyObject:t=>_t(be.emptyObject(t),\"empty object\",t),nonEmptyObject:t=>_t(be.nonEmptyObject(t),\"non-empty object\",t),emptySet:t=>_t(be.emptySet(t),\"empty set\",t),nonEmptySet:t=>_t(be.nonEmptySet(t),\"non-empty set\",t),emptyMap:t=>_t(be.emptyMap(t),\"empty map\",t),nonEmptyMap:t=>_t(be.nonEmptyMap(t),\"non-empty map\",t),propertyKey:t=>_t(be.propertyKey(t),\"PropertyKey\",t),formData:t=>_t(be.formData(t),\"FormData\",t),urlSearchParams:t=>_t(be.urlSearchParams(t),\"URLSearchParams\",t),evenInteger:t=>_t(be.evenInteger(t),\"even integer\",t),oddInteger:t=>_t(be.oddInteger(t),\"odd integer\",t),directInstanceOf:(t,e)=>_t(be.directInstanceOf(t,e),\"T\",t),inRange:(t,e)=>_t(be.inRange(t,e),\"in range\",t),any:(t,...e)=>_t(be.any(t,...e),\"predicate returns truthy for any value\",e,{multipleValues:!0}),all:(t,...e)=>_t(be.all(t,...e),\"predicate returns truthy for all values\",e,{multipleValues:!0})};Object.defineProperties(be,{class:{value:be.class_},function:{value:be.function_},null:{value:be.null_}});Object.defineProperties(Lp.assert,{class:{value:Lp.assert.class_},function:{value:Lp.assert.function_},null:{value:Lp.assert.null_}});Lp.default=be;MQ.exports=be;MQ.exports.default=be;MQ.exports.assert=Lp.assert});var n0e=L((hzt,mH)=>{\"use strict\";var _Q=class extends Error{constructor(e){super(e||\"Promise was canceled\"),this.name=\"CancelError\"}get isCanceled(){return!0}},UQ=class t{static fn(e){return(...r)=>new t((s,a,n)=>{r.push(n),e(...r).then(s,a)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,s)=>{this._reject=s;let a=f=>{this._isPending=!1,r(f)},n=f=>{this._isPending=!1,s(f)},c=f=>{if(!this._isPending)throw new Error(\"The `onCancel` handler was attached after the promise settled.\");this._cancelHandlers.push(f)};return Object.defineProperties(c,{shouldReject:{get:()=>this._rejectOnCancel,set:f=>{this._rejectOnCancel=f}}}),e(a,n,c)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new _Q(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(UQ.prototype,Promise.prototype);mH.exports=UQ;mH.exports.CancelError=_Q});var i0e=L((EH,IH)=>{\"use strict\";Object.defineProperty(EH,\"__esModule\",{value:!0});function a0t(t){return t.encrypted}var yH=(t,e)=>{let r;typeof e==\"function\"?r={connect:e}:r=e;let s=typeof r.connect==\"function\",a=typeof r.secureConnect==\"function\",n=typeof r.close==\"function\",c=()=>{s&&r.connect(),a0t(t)&&a&&(t.authorized?r.secureConnect():t.authorizationError||t.once(\"secureConnect\",r.secureConnect)),n&&t.once(\"close\",r.close)};t.writable&&!t.connecting?c():t.connecting?t.once(\"connect\",c):t.destroyed&&n&&r.close(t._hadError)};EH.default=yH;IH.exports=yH;IH.exports.default=yH});var s0e=L((wH,BH)=>{\"use strict\";Object.defineProperty(wH,\"__esModule\",{value:!0});var l0t=i0e(),c0t=Number(process.versions.node.split(\".\")[0]),CH=t=>{let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=c=>{let f=c.emit.bind(c);c.emit=(p,...h)=>(p===\"error\"&&(e.error=Date.now(),e.phases.total=e.error-e.start,c.emit=f),f(p,...h))};r(t),t.prependOnceListener(\"abort\",()=>{e.abort=Date.now(),(!e.response||c0t>=13)&&(e.phases.total=Date.now()-e.start)});let s=c=>{e.socket=Date.now(),e.phases.wait=e.socket-e.start;let f=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};c.prependOnceListener(\"lookup\",f),l0t.default(c,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(c.removeListener(\"lookup\",f),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?s(t.socket):t.prependOnceListener(\"socket\",s);let a=()=>{var c;e.upload=Date.now(),e.phases.request=e.upload-(c=e.secureConnect,c??e.connect)};return(typeof t.writableFinished==\"boolean\"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))?a():t.prependOnceListener(\"finish\",a),t.prependOnceListener(\"response\",c=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,c.timings=e,r(c),c.prependOnceListener(\"end\",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start})}),e};wH.default=CH;BH.exports=CH;BH.exports.default=CH});var A0e=L((gzt,DH)=>{\"use strict\";var{V4MAPPED:u0t,ADDRCONFIG:f0t,ALL:f0e,promises:{Resolver:o0e},lookup:A0t}=ye(\"dns\"),{promisify:vH}=ye(\"util\"),p0t=ye(\"os\"),gI=Symbol(\"cacheableLookupCreateConnection\"),SH=Symbol(\"cacheableLookupInstance\"),a0e=Symbol(\"expires\"),h0t=typeof f0e==\"number\",l0e=t=>{if(!(t&&typeof t.createConnection==\"function\"))throw new Error(\"Expected an Agent instance as the first argument\")},g0t=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},c0e=()=>{let t=!1,e=!1;for(let r of Object.values(p0t.networkInterfaces()))for(let s of r)if(!s.internal&&(s.family===\"IPv6\"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},d0t=t=>Symbol.iterator in t,u0e={ttl:!0},m0t={all:!0},HQ=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:s=3600,errorTtl:a=.15,resolver:n=new o0e,lookup:c=A0t}={}){if(this.maxTtl=r,this.errorTtl=a,this._cache=e,this._resolver=n,this._dnsLookup=vH(c),this._resolver instanceof o0e?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=vH(this._resolver.resolve4.bind(this._resolver)),this._resolve6=vH(this._resolver.resolve6.bind(this._resolver))),this._iface=c0e(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,s<1)this._fallback=!1;else{this._fallback=!0;let f=setInterval(()=>{this._hostnamesToFallback.clear()},s*1e3);f.unref&&f.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,s){if(typeof r==\"function\"?(s=r,r={}):typeof r==\"number\"&&(r={family:r}),!s)throw new Error(\"Callback must be a function.\");this.lookupAsync(e,r).then(a=>{r.all?s(null,a):s(null,a.address,a.family,a.expires,a.ttl)},s)}async lookupAsync(e,r={}){typeof r==\"number\"&&(r={family:r});let s=await this.query(e);if(r.family===6){let a=s.filter(n=>n.family===6);r.hints&u0t&&(h0t&&r.hints&f0e||a.length===0)?g0t(s):s=a}else r.family===4&&(s=s.filter(a=>a.family===4));if(r.hints&f0t){let{_iface:a}=this;s=s.filter(n=>n.family===6?a.has6:a.has4)}if(s.length===0){let a=new Error(`cacheableLookup ENOTFOUND ${e}`);throw a.code=\"ENOTFOUND\",a.hostname=e,a}return r.all?s:s[0]}async query(e){let r=await this._cache.get(e);if(!r){let s=this._pending[e];if(s)r=await s;else{let a=this.queryAndCache(e);this._pending[e]=a,r=await a}}return r=r.map(s=>({...s})),r}async _resolve(e){let r=async h=>{try{return await h}catch(E){if(E.code===\"ENODATA\"||E.code===\"ENOTFOUND\")return[];throw E}},[s,a]=await Promise.all([this._resolve4(e,u0e),this._resolve6(e,u0e)].map(h=>r(h))),n=0,c=0,f=0,p=Date.now();for(let h of s)h.family=4,h.expires=p+h.ttl*1e3,n=Math.max(n,h.ttl);for(let h of a)h.family=6,h.expires=p+h.ttl*1e3,c=Math.max(c,h.ttl);return s.length>0?a.length>0?f=Math.min(n,c):f=n:f=c,{entries:[...s,...a],cacheTtl:f}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,s){if(this.maxTtl>0&&s>0){s=Math.min(s,this.maxTtl)*1e3,r[a0e]=Date.now()+s;try{await this._cache.set(e,r,s)}catch(a){this.lookupAsync=async()=>{let n=new Error(\"Cache Error. Please recreate the CacheableLookup instance.\");throw n.cause=a,n}}d0t(this._cache)&&this._tick(s)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,m0t);try{let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));let s=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,s),delete this._pending[e],r.entries}catch(r){throw delete this._pending[e],r}}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let s=1/0,a=Date.now();for(let[n,c]of this._cache){let f=c[a0e];a>=f?this._cache.delete(n):f<s&&(s=f)}s!==1/0&&this._tick(s-a)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(l0e(e),gI in e)throw new Error(\"CacheableLookup has been already installed\");e[gI]=e.createConnection,e[SH]=this,e.createConnection=(r,s)=>(\"lookup\"in r||(r.lookup=this.lookup),e[gI](r,s))}uninstall(e){if(l0e(e),e[gI]){if(e[SH]!==this)throw new Error(\"The agent is not owned by this CacheableLookup instance\");e.createConnection=e[gI],delete e[gI],delete e[SH]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=c0e(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};DH.exports=HQ;DH.exports.default=HQ});var g0e=L((dzt,bH)=>{\"use strict\";var y0t=typeof URL>\"u\"?ye(\"url\").URL:URL,E0t=\"text/plain\",I0t=\"us-ascii\",p0e=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),C0t=(t,{stripHash:e})=>{let r=t.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${t}`);let s=r[1].split(\";\"),a=r[2],n=e?\"\":r[3],c=!1;s[s.length-1]===\"base64\"&&(s.pop(),c=!0);let f=(s.shift()||\"\").toLowerCase(),h=[...s.map(E=>{let[C,S=\"\"]=E.split(\"=\").map(P=>P.trim());return C===\"charset\"&&(S=S.toLowerCase(),S===I0t)?\"\":`${C}${S?`=${S}`:\"\"}`}).filter(Boolean)];return c&&h.push(\"base64\"),(h.length!==0||f&&f!==E0t)&&h.unshift(f),`data:${h.join(\";\")},${c?a.trim():a}${n?`#${n}`:\"\"}`},h0e=(t,e)=>{if(e={defaultProtocol:\"http:\",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},Reflect.has(e,\"normalizeHttps\"))throw new Error(\"options.normalizeHttps is renamed to options.forceHttp\");if(Reflect.has(e,\"normalizeHttp\"))throw new Error(\"options.normalizeHttp is renamed to options.forceHttps\");if(Reflect.has(e,\"stripFragment\"))throw new Error(\"options.stripFragment is renamed to options.stripHash\");if(t=t.trim(),/^data:/i.test(t))return C0t(t,e);let r=t.startsWith(\"//\");!r&&/^\\.*\\//.test(t)||(t=t.replace(/^(?!(?:\\w+:)?\\/\\/)|^\\/\\//,e.defaultProtocol));let a=new y0t(t);if(e.forceHttp&&e.forceHttps)throw new Error(\"The `forceHttp` and `forceHttps` options cannot be used together\");if(e.forceHttp&&a.protocol===\"https:\"&&(a.protocol=\"http:\"),e.forceHttps&&a.protocol===\"http:\"&&(a.protocol=\"https:\"),e.stripAuthentication&&(a.username=\"\",a.password=\"\"),e.stripHash&&(a.hash=\"\"),a.pathname&&(a.pathname=a.pathname.replace(/((?!:).|^)\\/{2,}/g,(n,c)=>/^(?!\\/)/g.test(c)?`${c}/`:\"/\")),a.pathname&&(a.pathname=decodeURI(a.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let n=a.pathname.split(\"/\"),c=n[n.length-1];p0e(c,e.removeDirectoryIndex)&&(n=n.slice(0,n.length-1),a.pathname=n.slice(1).join(\"/\")+\"/\")}if(a.hostname&&(a.hostname=a.hostname.replace(/\\.$/,\"\"),e.stripWWW&&/^www\\.([a-z\\-\\d]{2,63})\\.([a-z.]{2,5})$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\\./,\"\"))),Array.isArray(e.removeQueryParameters))for(let n of[...a.searchParams.keys()])p0e(n,e.removeQueryParameters)&&a.searchParams.delete(n);return e.sortQueryParameters&&a.searchParams.sort(),e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\\/$/,\"\")),t=a.toString(),(e.removeTrailingSlash||a.pathname===\"/\")&&a.hash===\"\"&&(t=t.replace(/\\/$/,\"\")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\\/\\//,\"//\")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\\/\\//,\"\")),t};bH.exports=h0e;bH.exports.default=h0e});var y0e=L((mzt,m0e)=>{m0e.exports=d0e;function d0e(t,e){if(t&&e)return d0e(t)(e);if(typeof t!=\"function\")throw new TypeError(\"need wrapper function\");return Object.keys(t).forEach(function(s){r[s]=t[s]}),r;function r(){for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];var n=t.apply(this,s),c=s[s.length-1];return typeof n==\"function\"&&n!==c&&Object.keys(c).forEach(function(f){n[f]=c[f]}),n}}});var xH=L((yzt,PH)=>{var E0e=y0e();PH.exports=E0e(jQ);PH.exports.strict=E0e(I0e);jQ.proto=jQ(function(){Object.defineProperty(Function.prototype,\"once\",{value:function(){return jQ(this)},configurable:!0}),Object.defineProperty(Function.prototype,\"onceStrict\",{value:function(){return I0e(this)},configurable:!0})});function jQ(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function I0e(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||\"Function wrapped with `once`\";return e.onceError=r+\" shouldn't be called more than once\",e.called=!1,e}});var kH=L((Ezt,w0e)=>{var w0t=xH(),B0t=function(){},v0t=function(t){return t.setHeader&&typeof t.abort==\"function\"},S0t=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},C0e=function(t,e,r){if(typeof e==\"function\")return C0e(t,null,e);e||(e={}),r=w0t(r||B0t);var s=t._writableState,a=t._readableState,n=e.readable||e.readable!==!1&&t.readable,c=e.writable||e.writable!==!1&&t.writable,f=function(){t.writable||p()},p=function(){c=!1,n||r.call(t)},h=function(){n=!1,c||r.call(t)},E=function(I){r.call(t,I?new Error(\"exited with error code: \"+I):null)},C=function(I){r.call(t,I)},S=function(){if(n&&!(a&&a.ended))return r.call(t,new Error(\"premature close\"));if(c&&!(s&&s.ended))return r.call(t,new Error(\"premature close\"))},P=function(){t.req.on(\"finish\",p)};return v0t(t)?(t.on(\"complete\",p),t.on(\"abort\",S),t.req?P():t.on(\"request\",P)):c&&!s&&(t.on(\"end\",f),t.on(\"close\",f)),S0t(t)&&t.on(\"exit\",E),t.on(\"end\",h),t.on(\"finish\",p),e.error!==!1&&t.on(\"error\",C),t.on(\"close\",S),function(){t.removeListener(\"complete\",p),t.removeListener(\"abort\",S),t.removeListener(\"request\",P),t.req&&t.req.removeListener(\"finish\",p),t.removeListener(\"end\",f),t.removeListener(\"close\",f),t.removeListener(\"finish\",p),t.removeListener(\"exit\",E),t.removeListener(\"end\",h),t.removeListener(\"error\",C),t.removeListener(\"close\",S)}};w0e.exports=C0e});var S0e=L((Izt,v0e)=>{var D0t=xH(),b0t=kH(),QH=ye(\"fs\"),av=function(){},P0t=/^v?\\.0/.test(process.version),qQ=function(t){return typeof t==\"function\"},x0t=function(t){return!P0t||!QH?!1:(t instanceof(QH.ReadStream||av)||t instanceof(QH.WriteStream||av))&&qQ(t.close)},k0t=function(t){return t.setHeader&&qQ(t.abort)},Q0t=function(t,e,r,s){s=D0t(s);var a=!1;t.on(\"close\",function(){a=!0}),b0t(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,x0t(t))return t.close(av);if(k0t(t))return t.abort();if(qQ(t.destroy))return t.destroy();s(c||new Error(\"stream was destroyed\"))}}},B0e=function(t){t()},T0t=function(t,e){return t.pipe(e)},R0t=function(){var t=Array.prototype.slice.call(arguments),e=qQ(t[t.length-1]||av)&&t.pop()||av;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error(\"pump requires two streams per minimum\");var r,s=t.map(function(a,n){var c=n<t.length-1,f=n>0;return Q0t(a,c,f,function(p){r||(r=p),p&&s.forEach(B0e),!c&&(s.forEach(B0e),e(r))})});return t.reduce(T0t)};v0e.exports=R0t});var b0e=L((Czt,D0e)=>{\"use strict\";var{PassThrough:F0t}=ye(\"stream\");D0e.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,s=r===\"buffer\",a=!1;e?a=!(r||s):r=r||\"utf8\",s&&(r=null);let n=new F0t({objectMode:a});r&&n.setEncoding(r);let c=0,f=[];return n.on(\"data\",p=>{f.push(p),a?c=f.length:c+=p.length}),n.getBufferedValue=()=>e?f:s?Buffer.concat(f,c):f.join(\"\"),n.getBufferedLength=()=>c,n}});var P0e=L((wzt,dI)=>{\"use strict\";var N0t=S0e(),O0t=b0e(),GQ=class extends Error{constructor(){super(\"maxBuffer exceeded\"),this.name=\"MaxBufferError\"}};async function WQ(t,e){if(!t)return Promise.reject(new Error(\"Expected a stream\"));e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,s;return await new Promise((a,n)=>{let c=f=>{f&&(f.bufferedData=s.getBufferedValue()),n(f)};s=N0t(t,O0t(e),f=>{if(f){c(f);return}a()}),s.on(\"data\",()=>{s.getBufferedLength()>r&&c(new GQ)})}),s.getBufferedValue()}dI.exports=WQ;dI.exports.default=WQ;dI.exports.buffer=(t,e)=>WQ(t,{...e,encoding:\"buffer\"});dI.exports.array=(t,e)=>WQ(t,{...e,array:!0});dI.exports.MaxBufferError=GQ});var k0e=L((vzt,x0e)=>{\"use strict\";var L0t=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),M0t=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),_0t=new Set([500,502,503,504]),U0t={date:!0,connection:!0,\"keep-alive\":!0,\"proxy-authenticate\":!0,\"proxy-authorization\":!0,te:!0,trailer:!0,\"transfer-encoding\":!0,upgrade:!0},H0t={\"content-length\":!0,\"content-encoding\":!0,\"transfer-encoding\":!0,\"content-range\":!0};function nm(t){let e=parseInt(t,10);return isFinite(e)?e:0}function j0t(t){return t?_0t.has(t.status):!0}function TH(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let s of r){let[a,n]=s.split(/=/,2);e[a.trim()]=n===void 0?!0:n.trim().replace(/^\"|\"$/g,\"\")}return e}function q0t(t){let e=[];for(let r in t){let s=t[r];e.push(s===!0?r:r+\"=\"+s)}if(e.length)return e.join(\", \")}x0e.exports=class{constructor(e,r,{shared:s,cacheHeuristic:a,immutableMinTimeToLive:n,ignoreCargoCult:c,_fromObject:f}={}){if(f){this._fromObject(f);return}if(!r||!r.headers)throw Error(\"Response headers missing\");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=s!==!1,this._cacheHeuristic=a!==void 0?a:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status=\"status\"in r?r.status:200,this._resHeaders=r.headers,this._rescc=TH(r.headers[\"cache-control\"]),this._method=\"method\"in e?e.method:\"GET\",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=TH(e.headers[\"cache-control\"]),c&&\"pre-check\"in this._rescc&&\"post-check\"in this._rescc&&(delete this._rescc[\"pre-check\"],delete this._rescc[\"post-check\"],delete this._rescc[\"no-cache\"],delete this._rescc[\"no-store\"],delete this._rescc[\"must-revalidate\"],this._resHeaders=Object.assign({},this._resHeaders,{\"cache-control\":q0t(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers[\"cache-control\"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc[\"no-cache\"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc[\"no-store\"]&&(this._method===\"GET\"||this._method===\"HEAD\"||this._method===\"POST\"&&this._hasExplicitExpiration())&&M0t.has(this._status)&&!this._rescc[\"no-store\"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc[\"max-age\"]||this._isShared&&this._rescc[\"s-maxage\"]||this._rescc.public||L0t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc[\"s-maxage\"]||this._rescc[\"max-age\"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error(\"Request headers missing\")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=TH(e.headers[\"cache-control\"]);return r[\"no-cache\"]||/no-cache/.test(e.headers.pragma)||r[\"max-age\"]&&this.age()>r[\"max-age\"]||r[\"min-fresh\"]&&this.timeToLive()<1e3*r[\"min-fresh\"]||this.stale()&&!(r[\"max-stale\"]&&!this._rescc[\"must-revalidate\"]&&(r[\"max-stale\"]===!0||r[\"max-stale\"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method===\"HEAD\")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc[\"must-revalidate\"]||this._rescc.public||this._rescc[\"s-maxage\"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary===\"*\")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\\s*,\\s*/);for(let s of r)if(e.headers[s]!==this._reqHeaders[s])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let s in e)U0t[s]||(r[s]=e[s]);if(e.connection){let s=e.connection.trim().split(/\\s*,\\s*/);for(let a of s)delete r[a]}if(r.warning){let s=r.warning.split(/,/).filter(a=>!/^\\s*1[0-9][0-9]/.test(a));s.length?r.warning=s.join(\",\").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:\"\")+'113 - \"rfc7234 5.5.4\"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return nm(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc[\"no-cache\"]||this._isShared&&this._resHeaders[\"set-cookie\"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary===\"*\")return 0;if(this._isShared){if(this._rescc[\"proxy-revalidate\"])return 0;if(this._rescc[\"s-maxage\"])return nm(this._rescc[\"s-maxage\"])}if(this._rescc[\"max-age\"])return nm(this._rescc[\"max-age\"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let s=Date.parse(this._resHeaders.expires);return Number.isNaN(s)||s<r?0:Math.max(e,(s-r)/1e3)}if(this._resHeaders[\"last-modified\"]){let s=Date.parse(this._resHeaders[\"last-modified\"]);if(isFinite(s)&&r>s)return Math.max(e,(r-s)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+nm(this._rescc[\"stale-if-error\"]),s=e+nm(this._rescc[\"stale-while-revalidate\"]);return Math.max(0,e,r,s)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+nm(this._rescc[\"stale-if-error\"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+nm(this._rescc[\"stale-while-revalidate\"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error(\"Reinitialized\");if(!e||e.v!==1)throw Error(\"Invalid serialization\");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r[\"if-range\"],!this._requestMatches(e,!0)||!this.storable())return delete r[\"if-none-match\"],delete r[\"if-modified-since\"],r;if(this._resHeaders.etag&&(r[\"if-none-match\"]=r[\"if-none-match\"]?`${r[\"if-none-match\"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r[\"accept-ranges\"]||r[\"if-match\"]||r[\"if-unmodified-since\"]||this._method&&this._method!=\"GET\"){if(delete r[\"if-modified-since\"],r[\"if-none-match\"]){let a=r[\"if-none-match\"].split(/,/).filter(n=>!/^\\s*W\\//.test(n));a.length?r[\"if-none-match\"]=a.join(\",\").trim():delete r[\"if-none-match\"]}}else this._resHeaders[\"last-modified\"]&&!r[\"if-modified-since\"]&&(r[\"if-modified-since\"]=this._resHeaders[\"last-modified\"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&j0t(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error(\"Response headers missing\");let s=!1;if(r.status!==void 0&&r.status!=304?s=!1:r.headers.etag&&!/^\\s*W\\//.test(r.headers.etag)?s=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\\s*W\\//,\"\")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?s=this._resHeaders.etag.replace(/^\\s*W\\//,\"\")===r.headers.etag.replace(/^\\s*W\\//,\"\"):this._resHeaders[\"last-modified\"]?s=this._resHeaders[\"last-modified\"]===r.headers[\"last-modified\"]:!this._resHeaders.etag&&!this._resHeaders[\"last-modified\"]&&!r.headers.etag&&!r.headers[\"last-modified\"]&&(s=!0),!s)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let a={};for(let c in this._resHeaders)a[c]=c in r.headers&&!H0t[c]?r.headers[c]:this._resHeaders[c];let n=Object.assign({},r,{status:this._status,method:this._method,headers:a});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var YQ=L((Szt,Q0e)=>{\"use strict\";Q0e.exports=t=>{let e={};for(let[r,s]of Object.entries(t))e[r.toLowerCase()]=s;return e}});var R0e=L((Dzt,T0e)=>{\"use strict\";var G0t=ye(\"stream\").Readable,W0t=YQ(),RH=class extends G0t{constructor(e,r,s,a){if(typeof e!=\"number\")throw new TypeError(\"Argument `statusCode` should be a number\");if(typeof r!=\"object\")throw new TypeError(\"Argument `headers` should be an object\");if(!(s instanceof Buffer))throw new TypeError(\"Argument `body` should be a buffer\");if(typeof a!=\"string\")throw new TypeError(\"Argument `url` should be a string\");super(),this.statusCode=e,this.headers=W0t(r),this.body=s,this.url=a}_read(){this.push(this.body),this.push(null)}};T0e.exports=RH});var N0e=L((bzt,F0e)=>{\"use strict\";var Y0t=[\"destroy\",\"setTimeout\",\"socket\",\"headers\",\"trailers\",\"rawHeaders\",\"statusCode\",\"httpVersion\",\"httpVersionMinor\",\"httpVersionMajor\",\"rawTrailers\",\"statusMessage\"];F0e.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(Y0t));for(let s of r)s in e||(e[s]=typeof t[s]==\"function\"?t[s].bind(t):t[s])}});var L0e=L((Pzt,O0e)=>{\"use strict\";var V0t=ye(\"stream\").PassThrough,K0t=N0e(),J0t=t=>{if(!(t&&t.pipe))throw new TypeError(\"Parameter `response` must be a response stream.\");let e=new V0t;return K0t(t,e),t.pipe(e)};O0e.exports=J0t});var M0e=L(FH=>{FH.stringify=function t(e){if(typeof e>\"u\")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(\":base64:\"+e.toString(\"base64\"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e==\"object\"){var r=\"\",s=Array.isArray(e);r=s?\"[\":\"{\";var a=!0;for(var n in e){var c=typeof e[n]==\"function\"||!s&&typeof e[n]>\"u\";Object.hasOwnProperty.call(e,n)&&!c&&(a||(r+=\",\"),a=!1,s?e[n]==null?r+=\"null\":r+=t(e[n]):e[n]!==void 0&&(r+=t(n)+\":\"+t(e[n])))}return r+=s?\"]\":\"}\",r}else return typeof e==\"string\"?JSON.stringify(/^:/.test(e)?\":\"+e:e):typeof e>\"u\"?\"null\":JSON.stringify(e)};FH.parse=function(t){return JSON.parse(t,function(e,r){return typeof r==\"string\"?/^:base64:/.test(r)?Buffer.from(r.substring(8),\"base64\"):/^:/.test(r)?r.substring(1):r:r})}});var j0e=L((kzt,H0e)=>{\"use strict\";var z0t=ye(\"events\"),_0e=M0e(),Z0t=t=>{let e={redis:\"@keyv/redis\",rediss:\"@keyv/redis\",mongodb:\"@keyv/mongo\",mongo:\"@keyv/mongo\",sqlite:\"@keyv/sqlite\",postgresql:\"@keyv/postgres\",postgres:\"@keyv/postgres\",mysql:\"@keyv/mysql\",etcd:\"@keyv/etcd\",offline:\"@keyv/offline\",tiered:\"@keyv/tiered\"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(ye(e[r]))(t)}return new Map},U0e=[\"sqlite\",\"postgres\",\"mysql\",\"mongo\",\"redis\",\"tiered\"],NH=class extends z0t{constructor(e,{emitErrors:r=!0,...s}={}){if(super(),this.opts={namespace:\"keyv\",serialize:_0e.stringify,deserialize:_0e.parse,...typeof e==\"string\"?{uri:e}:e,...s},!this.opts.store){let n={...this.opts};this.opts.store=Z0t(n)}if(this.opts.compression){let n=this.opts.compression;this.opts.serialize=n.serialize.bind(n),this.opts.deserialize=n.deserialize.bind(n)}typeof this.opts.store.on==\"function\"&&r&&this.opts.store.on(\"error\",n=>this.emit(\"error\",n)),this.opts.store.namespace=this.opts.namespace;let a=n=>async function*(){for await(let[c,f]of typeof n==\"function\"?n(this.opts.store.namespace):n){let p=await this.opts.deserialize(f);if(!(this.opts.store.namespace&&!c.includes(this.opts.store.namespace))){if(typeof p.expires==\"number\"&&Date.now()>p.expires){this.delete(c);continue}yield[this._getKeyUnprefix(c),p.value]}}};typeof this.opts.store[Symbol.iterator]==\"function\"&&this.opts.store instanceof Map?this.iterator=a(this.opts.store):typeof this.opts.store.iterator==\"function\"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=a(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return U0e.includes(this.opts.store.opts.dialect)||U0e.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(\":\").splice(1).join(\":\")}get(e,r){let{store:s}=this.opts,a=Array.isArray(e),n=a?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(a&&s.getMany===void 0){let c=[];for(let f of n)c.push(Promise.resolve().then(()=>s.get(f)).then(p=>typeof p==\"string\"?this.opts.deserialize(p):this.opts.compression?this.opts.deserialize(p):p).then(p=>{if(p!=null)return typeof p.expires==\"number\"&&Date.now()>p.expires?this.delete(f).then(()=>{}):r&&r.raw?p:p.value}));return Promise.allSettled(c).then(f=>{let p=[];for(let h of f)p.push(h.value);return p})}return Promise.resolve().then(()=>a?s.getMany(n):s.get(n)).then(c=>typeof c==\"string\"?this.opts.deserialize(c):this.opts.compression?this.opts.deserialize(c):c).then(c=>{if(c!=null)return a?c.map((f,p)=>{if(typeof f==\"string\"&&(f=this.opts.deserialize(f)),f!=null){if(typeof f.expires==\"number\"&&Date.now()>f.expires){this.delete(e[p]).then(()=>{});return}return r&&r.raw?f:f.value}}):typeof c.expires==\"number\"&&Date.now()>c.expires?this.delete(e).then(()=>{}):r&&r.raw?c:c.value})}set(e,r,s){let a=this._getKeyPrefix(e);typeof s>\"u\"&&(s=this.opts.ttl),s===0&&(s=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let c=typeof s==\"number\"?Date.now()+s:null;return typeof r==\"symbol\"&&this.emit(\"error\",\"symbol cannot be serialized\"),r={value:r,expires:c},this.opts.serialize(r)}).then(c=>n.set(a,c,s)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let a=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let n=[];for(let c of a)n.push(r.delete(c));return Promise.allSettled(n).then(c=>c.every(f=>f.value===!0))}return Promise.resolve().then(()=>r.deleteMany(a))}let s=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(s))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:s}=this.opts;return Promise.resolve().then(async()=>typeof s.has==\"function\"?s.has(r):await s.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect==\"function\")return e.disconnect()}};H0e.exports=NH});var W0e=L((Tzt,G0e)=>{\"use strict\";var X0t=ye(\"events\"),VQ=ye(\"url\"),$0t=g0e(),egt=P0e(),OH=k0e(),q0e=R0e(),tgt=YQ(),rgt=L0e(),ngt=j0e(),lv=class t{constructor(e,r){if(typeof e!=\"function\")throw new TypeError(\"Parameter `request` must be a function\");return this.cache=new ngt({uri:typeof r==\"string\"&&r,store:typeof r!=\"string\"&&r,namespace:\"cacheable-request\"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,s)=>{let a;if(typeof r==\"string\")a=LH(VQ.parse(r)),r={};else if(r instanceof VQ.URL)a=LH(VQ.parse(r.toString())),r={};else{let[C,...S]=(r.path||\"\").split(\"?\"),P=S.length>0?`?${S.join(\"?\")}`:\"\";a=LH({...r,pathname:C,search:P})}r={headers:{},method:\"GET\",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...igt(a)},r.headers=tgt(r.headers);let n=new X0t,c=$0t(VQ.format(a),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),f=`${r.method}:${c}`,p=!1,h=!1,E=C=>{h=!0;let S=!1,P,I=new Promise(N=>{P=()=>{S||(S=!0,N())}}),R=N=>{if(p&&!C.forceRefresh){N.status=N.statusCode;let W=OH.fromObject(p.cachePolicy).revalidatedPolicy(C,N);if(!W.modified){let te=W.policy.responseHeaders();N=new q0e(p.statusCode,te,p.body,p.url),N.cachePolicy=W.policy,N.fromCache=!0}}N.fromCache||(N.cachePolicy=new OH(C,N,C),N.fromCache=!1);let U;C.cache&&N.cachePolicy.storable()?(U=rgt(N),(async()=>{try{let W=egt.buffer(N);if(await Promise.race([I,new Promise(ce=>N.once(\"end\",ce))]),S)return;let te=await W,ie={cachePolicy:N.cachePolicy.toObject(),url:N.url,statusCode:N.fromCache?p.statusCode:N.statusCode,body:te},Ae=C.strictTtl?N.cachePolicy.timeToLive():void 0;C.maxTtl&&(Ae=Ae?Math.min(Ae,C.maxTtl):C.maxTtl),await this.cache.set(f,ie,Ae)}catch(W){n.emit(\"error\",new t.CacheError(W))}})()):C.cache&&p&&(async()=>{try{await this.cache.delete(f)}catch(W){n.emit(\"error\",new t.CacheError(W))}})(),n.emit(\"response\",U||N),typeof s==\"function\"&&s(U||N)};try{let N=e(C,R);N.once(\"error\",P),N.once(\"abort\",P),n.emit(\"request\",N)}catch(N){n.emit(\"error\",new t.RequestError(N))}};return(async()=>{let C=async P=>{await Promise.resolve();let I=P.cache?await this.cache.get(f):void 0;if(typeof I>\"u\")return E(P);let R=OH.fromObject(I.cachePolicy);if(R.satisfiesWithoutRevalidation(P)&&!P.forceRefresh){let N=R.responseHeaders(),U=new q0e(I.statusCode,N,I.body,I.url);U.cachePolicy=R,U.fromCache=!0,n.emit(\"response\",U),typeof s==\"function\"&&s(U)}else p=I,P.headers=R.revalidationHeaders(P),E(P)},S=P=>n.emit(\"error\",new t.CacheError(P));this.cache.once(\"error\",S),n.on(\"response\",()=>this.cache.removeListener(\"error\",S));try{await C(r)}catch(P){r.automaticFailover&&!h&&E(r),n.emit(\"error\",new t.CacheError(P))}})(),n}}};function igt(t){let e={...t};return e.path=`${t.pathname||\"/\"}${t.search||\"\"}`,delete e.pathname,delete e.search,e}function LH(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||\"localhost\",port:t.port,pathname:t.pathname,search:t.search}}lv.RequestError=class extends Error{constructor(t){super(t.message),this.name=\"RequestError\",Object.assign(this,t)}};lv.CacheError=class extends Error{constructor(t){super(t.message),this.name=\"CacheError\",Object.assign(this,t)}};G0e.exports=lv});var V0e=L((Nzt,Y0e)=>{\"use strict\";var sgt=[\"aborted\",\"complete\",\"headers\",\"httpVersion\",\"httpVersionMinor\",\"httpVersionMajor\",\"method\",\"rawHeaders\",\"rawTrailers\",\"setTimeout\",\"socket\",\"statusCode\",\"statusMessage\",\"trailers\",\"url\"];Y0e.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error(\"The second stream must have the `autoDestroy` option set to `false`\");let r=new Set(Object.keys(t).concat(sgt)),s={};for(let a of r)a in e||(s[a]={get(){let n=t[a];return typeof n==\"function\"?n.bind(t):n},set(n){t[a]=n},enumerable:!0,configurable:!1});return Object.defineProperties(e,s),t.once(\"aborted\",()=>{e.destroy(),e.emit(\"aborted\")}),t.once(\"close\",()=>{t.complete&&e.readable?e.once(\"end\",()=>{e.emit(\"close\")}):e.emit(\"close\")}),e}});var J0e=L((Ozt,K0e)=>{\"use strict\";var{Transform:ogt,PassThrough:agt}=ye(\"stream\"),MH=ye(\"zlib\"),lgt=V0e();K0e.exports=t=>{let e=(t.headers[\"content-encoding\"]||\"\").toLowerCase();if(![\"gzip\",\"deflate\",\"br\"].includes(e))return t;let r=e===\"br\";if(r&&typeof MH.createBrotliDecompress!=\"function\")return t.destroy(new Error(\"Brotli is not supported on Node.js < 12\")),t;let s=!0,a=new ogt({transform(f,p,h){s=!1,h(null,f)},flush(f){f()}}),n=new agt({autoDestroy:!1,destroy(f,p){t.destroy(),p(f)}}),c=r?MH.createBrotliDecompress():MH.createUnzip();return c.once(\"error\",f=>{if(s&&!t.readable){n.end();return}n.destroy(f)}),lgt(t,n),t.pipe(a).pipe(c).pipe(n),n}});var UH=L((Lzt,z0e)=>{\"use strict\";var _H=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError(\"`maxSize` must be a number greater than 0\");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction==\"function\")for(let[s,a]of this.oldCache.entries())this.onEviction(s,a);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};z0e.exports=_H});var jH=L((Mzt,ege)=>{\"use strict\";var cgt=ye(\"events\"),ugt=ye(\"tls\"),fgt=ye(\"http2\"),Agt=UH(),xa=Symbol(\"currentStreamsCount\"),Z0e=Symbol(\"request\"),Nc=Symbol(\"cachedOriginSet\"),mI=Symbol(\"gracefullyClosing\"),pgt=[\"maxDeflateDynamicTableSize\",\"maxSessionMemory\",\"maxHeaderListPairs\",\"maxOutstandingPings\",\"maxReservedRemoteStreams\",\"maxSendHeaderBlockLength\",\"paddingStrategy\",\"localAddress\",\"path\",\"rejectUnauthorized\",\"minDHSize\",\"ca\",\"cert\",\"clientCertEngine\",\"ciphers\",\"key\",\"pfx\",\"servername\",\"minVersion\",\"maxVersion\",\"secureProtocol\",\"crl\",\"honorCipherOrder\",\"ecdhCurve\",\"dhparam\",\"secureOptions\",\"sessionIdContext\"],hgt=(t,e,r)=>{let s=0,a=t.length;for(;s<a;){let n=s+a>>>1;r(t[n],e)?s=n+1:a=n}return s},ggt=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,HH=(t,e)=>{for(let r of t)r[Nc].length<e[Nc].length&&r[Nc].every(s=>e[Nc].includes(s))&&r[xa]+e[xa]<=e.remoteSettings.maxConcurrentStreams&&$0e(r)},dgt=(t,e)=>{for(let r of t)e[Nc].length<r[Nc].length&&e[Nc].every(s=>r[Nc].includes(s))&&e[xa]+r[xa]<=r.remoteSettings.maxConcurrentStreams&&$0e(e)},X0e=({agent:t,isFree:e})=>{let r={};for(let s in t.sessions){let n=t.sessions[s].filter(c=>{let f=c[im.kCurrentStreamsCount]<c.remoteSettings.maxConcurrentStreams;return e?f:!f});n.length!==0&&(r[s]=n)}return r},$0e=t=>{t[mI]=!0,t[xa]===0&&t.close()},im=class t extends cgt{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:s=10,maxCachedTlsSessions:a=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=s,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new Agt({maxSize:a})}static normalizeOrigin(e,r){return typeof e==\"string\"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r=\"\";if(e)for(let s of pgt)e[s]&&(r+=`:${e[s]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let s=this.queue[e][r];this._sessionsCount<this.maxSessions&&!s.completed&&(s.completed=!0,s())}getSession(e,r,s){return new Promise((a,n)=>{Array.isArray(s)?(s=[...s],a()):s=[{resolve:a,reject:n}];let c=this.normalizeOptions(r),f=t.normalizeOrigin(e,r&&r.servername);if(f===void 0){for(let{reject:E}of s)E(new TypeError(\"The `origin` argument needs to be a string or an URL object\"));return}if(c in this.sessions){let E=this.sessions[c],C=-1,S=-1,P;for(let I of E){let R=I.remoteSettings.maxConcurrentStreams;if(R<C)break;if(I[Nc].includes(f)){let N=I[xa];if(N>=R||I[mI]||I.destroyed)continue;P||(C=R),N>S&&(P=I,S=N)}}if(P){if(s.length!==1){for(let{reject:I}of s){let R=new Error(`Expected the length of listeners to be 1, got ${s.length}.\nPlease report this to https://github.com/szmarczak/http2-wrapper/`);I(R)}return}s[0].resolve(P);return}}if(c in this.queue){if(f in this.queue[c]){this.queue[c][f].listeners.push(...s),this._tryToCreateNewSession(c,f);return}}else this.queue[c]={};let p=()=>{c in this.queue&&this.queue[c][f]===h&&(delete this.queue[c][f],Object.keys(this.queue[c]).length===0&&delete this.queue[c])},h=()=>{let E=`${f}:${c}`,C=!1;try{let S=fgt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});S[xa]=0,S[mI]=!1;let P=()=>S[xa]<S.remoteSettings.maxConcurrentStreams,I=!0;S.socket.once(\"session\",N=>{this.tlsSessionCache.set(E,N)}),S.once(\"error\",N=>{for(let{reject:U}of s)U(N);this.tlsSessionCache.delete(E)}),S.setTimeout(this.timeout,()=>{S.destroy()}),S.once(\"close\",()=>{if(C){I&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[c];N.splice(N.indexOf(S),1),N.length===0&&delete this.sessions[c]}else{let N=new Error(\"Session closed without receiving a SETTINGS frame\");N.code=\"HTTP2WRAPPER_NOSETTINGS\";for(let{reject:U}of s)U(N);p()}this._tryToCreateNewSession(c,f)});let R=()=>{if(!(!(c in this.queue)||!P())){for(let N of S[Nc])if(N in this.queue[c]){let{listeners:U}=this.queue[c][N];for(;U.length!==0&&P();)U.shift().resolve(S);let W=this.queue[c];if(W[N].listeners.length===0&&(delete W[N],Object.keys(W).length===0)){delete this.queue[c];break}if(!P())break}}};S.on(\"origin\",()=>{S[Nc]=S.originSet,P()&&(R(),HH(this.sessions[c],S))}),S.once(\"remoteSettings\",()=>{if(S.ref(),S.unref(),this._sessionsCount++,h.destroyed){let N=new Error(\"Agent has been destroyed\");for(let U of s)U.reject(N);S.destroy();return}S[Nc]=S.originSet;{let N=this.sessions;if(c in N){let U=N[c];U.splice(hgt(U,S,ggt),0,S)}else N[c]=[S]}this._freeSessionsCount+=1,C=!0,this.emit(\"session\",S),R(),p(),S[xa]===0&&this._freeSessionsCount>this.maxFreeSessions&&S.close(),s.length!==0&&(this.getSession(f,r,s),s.length=0),S.on(\"remoteSettings\",()=>{R(),HH(this.sessions[c],S)})}),S[Z0e]=S.request,S.request=(N,U)=>{if(S[mI])throw new Error(\"The session is gracefully closing. No new streams are allowed.\");let W=S[Z0e](N,U);return S.ref(),++S[xa],S[xa]===S.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,W.once(\"close\",()=>{if(I=P(),--S[xa],!S.destroyed&&!S.closed&&(dgt(this.sessions[c],S),P()&&!S.closed)){I||(this._freeSessionsCount++,I=!0);let te=S[xa]===0;te&&S.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||S[mI])?S.close():(HH(this.sessions[c],S),R())}}),W}}catch(S){for(let P of s)P.reject(S);p()}};h.listeners=s,h.completed=!1,h.destroyed=!1,this.queue[c][f]=h,this._tryToCreateNewSession(c,f)})}request(e,r,s,a){return new Promise((n,c)=>{this.getSession(e,r,[{reject:c,resolve:f=>{try{n(f.request(s,a))}catch(p){c(p)}}}])})}createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=[\"h2\"];let s=e.port||443,a=e.hostname||e.host;return typeof r.servername>\"u\"&&(r.servername=a),ugt.connect(s,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[xa]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(e);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return X0e({agent:this,isFree:!0})}get busySessions(){return X0e({agent:this,isFree:!1})}};im.kCurrentStreamsCount=xa;im.kGracefullyClosing=mI;ege.exports={Agent:im,globalAgent:new im}});var GH=L((_zt,tge)=>{\"use strict\";var{Readable:mgt}=ye(\"stream\"),qH=class extends mgt{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage=\"\",this.httpVersion=\"2.0\",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners(\"data\"),this.resume())}_read(){this.req&&this.req._request.resume()}};tge.exports=qH});var WH=L((Uzt,rge)=>{\"use strict\";rge.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname==\"string\"&&t.hostname.startsWith(\"[\")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||\"\"}${t.search||\"\"}`};return typeof t.port==\"string\"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||\"\"}:${t.password||\"\"}`),e}});var ige=L((Hzt,nge)=>{\"use strict\";nge.exports=(t,e,r)=>{for(let s of r)t.on(s,(...a)=>e.emit(s,...a))}});var oge=L((jzt,sge)=>{\"use strict\";sge.exports=t=>{switch(t){case\":method\":case\":scheme\":case\":authority\":case\":path\":return!0;default:return!1}}});var lge=L((Gzt,age)=>{\"use strict\";var yI=(t,e,r)=>{age.exports[e]=class extends t{constructor(...a){super(typeof r==\"string\"?r:r(a)),this.name=`${super.name} [${e}]`,this.code=e}}};yI(TypeError,\"ERR_INVALID_ARG_TYPE\",t=>{let e=t[0].includes(\".\")?\"property\":\"argument\",r=t[1],s=Array.isArray(r);return s&&(r=`${r.slice(0,-1).join(\", \")} or ${r.slice(-1)}`),`The \"${t[0]}\" ${e} must be ${s?\"one of\":\"of\"} type ${r}. Received ${typeof t[2]}`});yI(TypeError,\"ERR_INVALID_PROTOCOL\",t=>`Protocol \"${t[0]}\" not supported. Expected \"${t[1]}\"`);yI(Error,\"ERR_HTTP_HEADERS_SENT\",t=>`Cannot ${t[0]} headers after they are sent to the client`);yI(TypeError,\"ERR_INVALID_HTTP_TOKEN\",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);yI(TypeError,\"ERR_HTTP_INVALID_HEADER_VALUE\",t=>`Invalid value \"${t[0]} for header \"${t[1]}\"`);yI(TypeError,\"ERR_INVALID_CHAR\",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var zH=L((Wzt,gge)=>{\"use strict\";var ygt=ye(\"http2\"),{Writable:Egt}=ye(\"stream\"),{Agent:cge,globalAgent:Igt}=jH(),Cgt=GH(),wgt=WH(),Bgt=ige(),vgt=oge(),{ERR_INVALID_ARG_TYPE:YH,ERR_INVALID_PROTOCOL:Sgt,ERR_HTTP_HEADERS_SENT:uge,ERR_INVALID_HTTP_TOKEN:Dgt,ERR_HTTP_INVALID_HEADER_VALUE:bgt,ERR_INVALID_CHAR:Pgt}=lge(),{HTTP2_HEADER_STATUS:fge,HTTP2_HEADER_METHOD:Age,HTTP2_HEADER_PATH:pge,HTTP2_METHOD_CONNECT:xgt}=ygt.constants,Jo=Symbol(\"headers\"),VH=Symbol(\"origin\"),KH=Symbol(\"session\"),hge=Symbol(\"options\"),KQ=Symbol(\"flushedHeaders\"),cv=Symbol(\"jobs\"),kgt=/^[\\^`\\-\\w!#$%&*+.|~]+$/,Qgt=/[^\\t\\u0020-\\u007E\\u0080-\\u00FF]/,JH=class extends Egt{constructor(e,r,s){super({autoDestroy:!1});let a=typeof e==\"string\"||e instanceof URL;if(a&&(e=wgt(e instanceof URL?e:new URL(e))),typeof r==\"function\"||r===void 0?(s=r,r=a?e:{...e}):r={...e,...r},r.h2session)this[KH]=r.h2session;else if(r.agent===!1)this.agent=new cge({maxFreeSessions:0});else if(typeof r.agent>\"u\"||r.agent===null)typeof r.createConnection==\"function\"?(this.agent=new cge({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=Igt;else if(typeof r.agent.request==\"function\")this.agent=r.agent;else throw new YH(\"options.agent\",[\"Agent-like Object\",\"undefined\",\"false\"],r.agent);if(r.protocol&&r.protocol!==\"https:\")throw new Sgt(r.protocol,\"https:\");let n=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,c=r.hostname||r.host||\"localhost\";delete r.hostname,delete r.host,delete r.port;let{timeout:f}=r;if(r.timeout=void 0,this[Jo]=Object.create(null),this[cv]=[],this.socket=null,this.connection=null,this.method=r.method||\"GET\",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[p,h]of Object.entries(r.headers))this.setHeader(p,h);r.auth&&!(\"authorization\"in this[Jo])&&(this[Jo].authorization=\"Basic \"+Buffer.from(r.auth).toString(\"base64\")),r.session=r.tlsSession,r.path=r.socketPath,this[hge]=r,n===443?(this[VH]=`https://${c}`,\":authority\"in this[Jo]||(this[Jo][\":authority\"]=c)):(this[VH]=`https://${c}:${n}`,\":authority\"in this[Jo]||(this[Jo][\":authority\"]=`${c}:${n}`)),f&&this.setTimeout(f),s&&this.once(\"response\",s),this[KQ]=!1}get method(){return this[Jo][Age]}set method(e){e&&(this[Jo][Age]=e.toUpperCase())}get path(){return this[Jo][pge]}set path(e){e&&(this[Jo][pge]=e)}get _mustNotHaveABody(){return this.method===\"GET\"||this.method===\"HEAD\"||this.method===\"DELETE\"}_write(e,r,s){if(this._mustNotHaveABody){s(new Error(\"The GET, HEAD and DELETE methods must NOT have a body\"));return}this.flushHeaders();let a=()=>this._request.write(e,r,s);this._request?a():this[cv].push(a)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[cv].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit(\"abort\")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[KQ]||this.destroyed)return;this[KQ]=!0;let e=this.method===xgt,r=s=>{if(this._request=s,this.destroyed){s.destroy();return}e||Bgt(s,this,[\"timeout\",\"continue\",\"close\",\"error\"]);let a=c=>(...f)=>{!this.writable&&!this.destroyed?c(...f):this.once(\"finish\",()=>{c(...f)})};s.once(\"response\",a((c,f,p)=>{let h=new Cgt(this.socket,s.readableHighWaterMark);this.res=h,h.req=this,h.statusCode=c[fge],h.headers=c,h.rawHeaders=p,h.once(\"end\",()=>{this.aborted?(h.aborted=!0,h.emit(\"aborted\")):(h.complete=!0,h.socket=null,h.connection=null)}),e?(h.upgrade=!0,this.emit(\"connect\",h,s,Buffer.alloc(0))?this.emit(\"close\"):s.destroy()):(s.on(\"data\",E=>{!h._dumped&&!h.push(E)&&s.pause()}),s.once(\"end\",()=>{h.push(null)}),this.emit(\"response\",h)||h._dump())})),s.once(\"headers\",a(c=>this.emit(\"information\",{statusCode:c[fge]}))),s.once(\"trailers\",a((c,f,p)=>{let{res:h}=this;h.trailers=c,h.rawTrailers=p}));let{socket:n}=s.session;this.socket=n,this.connection=n;for(let c of this[cv])c();this.emit(\"socket\",this.socket)};if(this[KH])try{r(this[KH].request(this[Jo]))}catch(s){this.emit(\"error\",s)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[VH],this[hge],this[Jo]))}catch(s){this.emit(\"error\",s)}}}getHeader(e){if(typeof e!=\"string\")throw new YH(\"name\",\"string\",e);return this[Jo][e.toLowerCase()]}get headersSent(){return this[KQ]}removeHeader(e){if(typeof e!=\"string\")throw new YH(\"name\",\"string\",e);if(this.headersSent)throw new uge(\"remove\");delete this[Jo][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new uge(\"set\");if(typeof e!=\"string\"||!kgt.test(e)&&!vgt(e))throw new Dgt(\"Header name\",e);if(typeof r>\"u\")throw new bgt(r,e);if(Qgt.test(r))throw new Pgt(\"header content\",e);this[Jo][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let s=()=>this._request.setTimeout(e,r);return this._request?s():this[cv].push(s),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};gge.exports=JH});var mge=L((Yzt,dge)=>{\"use strict\";var Tgt=ye(\"tls\");dge.exports=(t={},e=Tgt.connect)=>new Promise((r,s)=>{let a=!1,n,c=async()=>{await p,n.off(\"timeout\",f),n.off(\"error\",s),t.resolveSocket?(r({alpnProtocol:n.alpnProtocol,socket:n,timeout:a}),a&&(await Promise.resolve(),n.emit(\"timeout\"))):(n.destroy(),r({alpnProtocol:n.alpnProtocol,timeout:a}))},f=async()=>{a=!0,c()},p=(async()=>{try{n=await e(t,c),n.on(\"error\",s),n.once(\"timeout\",f)}catch(h){s(h)}})()})});var Ege=L((Vzt,yge)=>{\"use strict\";var Rgt=ye(\"net\");yge.exports=t=>{let e=t.host,r=t.headers&&t.headers.host;return r&&(r.startsWith(\"[\")?r.indexOf(\"]\")===-1?e=r:e=r.slice(1,-1):e=r.split(\":\",1)[0]),Rgt.isIP(e)?\"\":e}});var wge=L((Kzt,XH)=>{\"use strict\";var Ige=ye(\"http\"),ZH=ye(\"https\"),Fgt=mge(),Ngt=UH(),Ogt=zH(),Lgt=Ege(),Mgt=WH(),JQ=new Ngt({maxSize:100}),uv=new Map,Cge=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let s=()=>{t.emit(\"free\",e,r)};e.on(\"free\",s);let a=()=>{t.removeSocket(e,r)};e.on(\"close\",a);let n=()=>{t.removeSocket(e,r),e.off(\"close\",a),e.off(\"free\",s),e.off(\"agentRemove\",n)};e.on(\"agentRemove\",n),t.emit(\"free\",e,r)},_gt=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!JQ.has(e)){if(uv.has(e))return(await uv.get(e)).alpnProtocol;let{path:r,agent:s}=t;t.path=t.socketPath;let a=Fgt(t);uv.set(e,a);try{let{socket:n,alpnProtocol:c}=await a;if(JQ.set(e,c),t.path=r,c===\"h2\")n.destroy();else{let{globalAgent:f}=ZH,p=ZH.Agent.prototype.createConnection;s?s.createConnection===p?Cge(s,n,t):n.destroy():f.createConnection===p?Cge(f,n,t):n.destroy()}return uv.delete(e),c}catch(n){throw uv.delete(e),n}}return JQ.get(e)};XH.exports=async(t,e,r)=>{if((typeof t==\"string\"||t instanceof URL)&&(t=Mgt(new URL(t))),typeof e==\"function\"&&(r=e,e=void 0),e={ALPNProtocols:[\"h2\",\"http/1.1\"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error(\"The `ALPNProtocols` option must be an Array with at least one entry\");e.protocol=e.protocol||\"https:\";let s=e.protocol===\"https:\";e.host=e.hostname||e.host||\"localhost\",e.session=e.tlsSession,e.servername=e.servername||Lgt(e),e.port=e.port||(s?443:80),e._defaultAgent=s?ZH.globalAgent:Ige.globalAgent;let a=e.agent;if(a){if(a.addRequest)throw new Error(\"The `options.agent` object can contain only `http`, `https` or `http2` properties\");e.agent=a[s?\"https\":\"http\"]}return s&&await _gt(e)===\"h2\"?(a&&(e.agent=a.http2),new Ogt(e,r)):Ige.request(e,r)};XH.exports.protocolCache=JQ});var vge=L((Jzt,Bge)=>{\"use strict\";var Ugt=ye(\"http2\"),Hgt=jH(),$H=zH(),jgt=GH(),qgt=wge(),Ggt=(t,e,r)=>new $H(t,e,r),Wgt=(t,e,r)=>{let s=new $H(t,e,r);return s.end(),s};Bge.exports={...Ugt,ClientRequest:$H,IncomingMessage:jgt,...Hgt,request:Ggt,get:Wgt,auto:qgt}});var tj=L(ej=>{\"use strict\";Object.defineProperty(ej,\"__esModule\",{value:!0});var Sge=Mp();ej.default=t=>Sge.default.nodeStream(t)&&Sge.default.function_(t.getBoundary)});var xge=L(rj=>{\"use strict\";Object.defineProperty(rj,\"__esModule\",{value:!0});var bge=ye(\"fs\"),Pge=ye(\"util\"),Dge=Mp(),Ygt=tj(),Vgt=Pge.promisify(bge.stat);rj.default=async(t,e)=>{if(e&&\"content-length\"in e)return Number(e[\"content-length\"]);if(!t)return 0;if(Dge.default.string(t))return Buffer.byteLength(t);if(Dge.default.buffer(t))return t.length;if(Ygt.default(t))return Pge.promisify(t.getLength.bind(t))();if(t instanceof bge.ReadStream){let{size:r}=await Vgt(t.path);return r===0?void 0:r}}});var ij=L(nj=>{\"use strict\";Object.defineProperty(nj,\"__esModule\",{value:!0});function Kgt(t,e,r){let s={};for(let a of r)s[a]=(...n)=>{e.emit(a,...n)},t.on(a,s[a]);return()=>{for(let a of r)t.off(a,s[a])}}nj.default=Kgt});var kge=L(sj=>{\"use strict\";Object.defineProperty(sj,\"__esModule\",{value:!0});sj.default=()=>{let t=[];return{once(e,r,s){e.once(r,s),t.push({origin:e,event:r,fn:s})},unhandleAll(){for(let e of t){let{origin:r,event:s,fn:a}=e;r.removeListener(s,a)}t.length=0}}}});var Tge=L(fv=>{\"use strict\";Object.defineProperty(fv,\"__esModule\",{value:!0});fv.TimeoutError=void 0;var Jgt=ye(\"net\"),zgt=kge(),Qge=Symbol(\"reentry\"),Zgt=()=>{},zQ=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name=\"TimeoutError\",this.code=\"ETIMEDOUT\"}};fv.TimeoutError=zQ;fv.default=(t,e,r)=>{if(Qge in t)return Zgt;t[Qge]=!0;let s=[],{once:a,unhandleAll:n}=zgt.default(),c=(C,S,P)=>{var I;let R=setTimeout(S,C,C,P);(I=R.unref)===null||I===void 0||I.call(R);let N=()=>{clearTimeout(R)};return s.push(N),N},{host:f,hostname:p}=r,h=(C,S)=>{t.destroy(new zQ(C,S))},E=()=>{for(let C of s)C();n()};if(t.once(\"error\",C=>{if(E(),t.listenerCount(\"error\")===0)throw C}),t.once(\"close\",E),a(t,\"response\",C=>{a(C,\"end\",E)}),typeof e.request<\"u\"&&c(e.request,h,\"request\"),typeof e.socket<\"u\"){let C=()=>{h(e.socket,\"socket\")};t.setTimeout(e.socket,C),s.push(()=>{t.removeListener(\"timeout\",C)})}return a(t,\"socket\",C=>{var S;let{socketPath:P}=t;if(C.connecting){let I=!!(P??Jgt.isIP((S=p??f)!==null&&S!==void 0?S:\"\")!==0);if(typeof e.lookup<\"u\"&&!I&&typeof C.address().address>\"u\"){let R=c(e.lookup,h,\"lookup\");a(C,\"lookup\",R)}if(typeof e.connect<\"u\"){let R=()=>c(e.connect,h,\"connect\");I?a(C,\"connect\",R()):a(C,\"lookup\",N=>{N===null&&a(C,\"connect\",R())})}typeof e.secureConnect<\"u\"&&r.protocol===\"https:\"&&a(C,\"connect\",()=>{let R=c(e.secureConnect,h,\"secureConnect\");a(C,\"secureConnect\",R)})}if(typeof e.send<\"u\"){let I=()=>c(e.send,h,\"send\");C.connecting?a(C,\"connect\",()=>{a(t,\"upload-complete\",I())}):a(t,\"upload-complete\",I())}}),typeof e.response<\"u\"&&a(t,\"upload-complete\",()=>{let C=c(e.response,h,\"response\");a(t,\"response\",C)}),E}});var Fge=L(oj=>{\"use strict\";Object.defineProperty(oj,\"__esModule\",{value:!0});var Rge=Mp();oj.default=t=>{t=t;let e={protocol:t.protocol,hostname:Rge.default.string(t.hostname)&&t.hostname.startsWith(\"[\")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||\"\"}${t.search||\"\"}`};return Rge.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||\"\"}:${t.password||\"\"}`),e}});var Nge=L(aj=>{\"use strict\";Object.defineProperty(aj,\"__esModule\",{value:!0});var Xgt=ye(\"url\"),$gt=[\"protocol\",\"host\",\"hostname\",\"port\",\"pathname\",\"search\"];aj.default=(t,e)=>{var r,s;if(e.path){if(e.pathname)throw new TypeError(\"Parameters `path` and `pathname` are mutually exclusive.\");if(e.search)throw new TypeError(\"Parameters `path` and `search` are mutually exclusive.\");if(e.searchParams)throw new TypeError(\"Parameters `path` and `searchParams` are mutually exclusive.\")}if(e.search&&e.searchParams)throw new TypeError(\"Parameters `search` and `searchParams` are mutually exclusive.\");if(!t){if(!e.protocol)throw new TypeError(\"No URL protocol specified\");t=`${e.protocol}//${(s=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&s!==void 0?s:\"\"}`}let a=new Xgt.URL(t);if(e.path){let n=e.path.indexOf(\"?\");n===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,n),e.search=e.path.slice(n+1)),delete e.path}for(let n of $gt)e[n]&&(a[n]=e[n].toString());return a}});var Oge=L(cj=>{\"use strict\";Object.defineProperty(cj,\"__esModule\",{value:!0});var lj=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e==\"object\"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e==\"object\"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e==\"object\"?this.weakMap.has(e):this.map.has(e)}};cj.default=lj});var fj=L(uj=>{\"use strict\";Object.defineProperty(uj,\"__esModule\",{value:!0});var edt=async t=>{let e=[],r=0;for await(let s of t)e.push(s),r+=Buffer.byteLength(s);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(\"\"))};uj.default=edt});var Mge=L(sm=>{\"use strict\";Object.defineProperty(sm,\"__esModule\",{value:!0});sm.dnsLookupIpVersionToFamily=sm.isDnsLookupIpVersion=void 0;var Lge={auto:0,ipv4:4,ipv6:6};sm.isDnsLookupIpVersion=t=>t in Lge;sm.dnsLookupIpVersionToFamily=t=>{if(sm.isDnsLookupIpVersion(t))return Lge[t];throw new Error(\"Invalid DNS lookup IP version\")}});var Aj=L(ZQ=>{\"use strict\";Object.defineProperty(ZQ,\"__esModule\",{value:!0});ZQ.isResponseOk=void 0;ZQ.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var Uge=L(pj=>{\"use strict\";Object.defineProperty(pj,\"__esModule\",{value:!0});var _ge=new Set;pj.default=t=>{_ge.has(t)||(_ge.add(t),process.emitWarning(`Got: ${t}`,{type:\"DeprecationWarning\"}))}});var Hge=L(hj=>{\"use strict\";Object.defineProperty(hj,\"__esModule\",{value:!0});var Di=Mp(),tdt=(t,e)=>{if(Di.default.null_(t.encoding))throw new TypeError(\"To get a Buffer, set `options.responseType` to `buffer` instead\");Di.assert.any([Di.default.string,Di.default.undefined],t.encoding),Di.assert.any([Di.default.boolean,Di.default.undefined],t.resolveBodyOnly),Di.assert.any([Di.default.boolean,Di.default.undefined],t.methodRewriting),Di.assert.any([Di.default.boolean,Di.default.undefined],t.isStream),Di.assert.any([Di.default.string,Di.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType=\"text\");let{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:s=>s.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},Di.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(s=>s.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):Di.default.number(r)&&(t.retry.limit=r),Di.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(Di.default.number))),Di.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:s}=t;if(!Di.default.function_(s.transform))throw new Error(\"`options.pagination.transform` must be implemented\");if(!Di.default.function_(s.shouldContinue))throw new Error(\"`options.pagination.shouldContinue` must be implemented\");if(!Di.default.function_(s.filter))throw new TypeError(\"`options.pagination.filter` must be implemented\");if(!Di.default.function_(s.paginate))throw new Error(\"`options.pagination.paginate` must be implemented\")}return t.responseType===\"json\"&&t.headers.accept===void 0&&(t.headers.accept=\"application/json\"),t};hj.default=tdt});var jge=L(Av=>{\"use strict\";Object.defineProperty(Av,\"__esModule\",{value:!0});Av.retryAfterStatusCodes=void 0;Av.retryAfterStatusCodes=new Set([413,429,503]);var rdt=({attemptCount:t,retryOptions:e,error:r,retryAfter:s})=>{if(t>e.limit)return 0;let a=e.methods.includes(r.options.method),n=e.errorCodes.includes(r.code),c=r.response&&e.statusCodes.includes(r.response.statusCode);if(!a||!n&&!c)return 0;if(r.response){if(s)return e.maxRetryAfter===void 0||s>e.maxRetryAfter?0:s;if(r.response.statusCode===413)return 0}let f=Math.random()*100;return 2**(t-1)*1e3+f};Av.default=rdt});var gv=L(Ln=>{\"use strict\";Object.defineProperty(Ln,\"__esModule\",{value:!0});Ln.UnsupportedProtocolError=Ln.ReadError=Ln.TimeoutError=Ln.UploadError=Ln.CacheError=Ln.HTTPError=Ln.MaxRedirectsError=Ln.RequestError=Ln.setNonEnumerableProperties=Ln.knownHookEvents=Ln.withoutBody=Ln.kIsNormalizedAlready=void 0;var qge=ye(\"util\"),Gge=ye(\"stream\"),ndt=ye(\"fs\"),B0=ye(\"url\"),Wge=ye(\"http\"),gj=ye(\"http\"),idt=ye(\"https\"),sdt=s0e(),odt=A0e(),Yge=W0e(),adt=J0e(),ldt=vge(),cdt=YQ(),at=Mp(),udt=xge(),Vge=tj(),fdt=ij(),Kge=Tge(),Adt=Fge(),Jge=Nge(),pdt=Oge(),hdt=fj(),zge=Mge(),gdt=Aj(),v0=Uge(),ddt=Hge(),mdt=jge(),dj,go=Symbol(\"request\"),eT=Symbol(\"response\"),EI=Symbol(\"responseSize\"),II=Symbol(\"downloadedSize\"),CI=Symbol(\"bodySize\"),wI=Symbol(\"uploadedSize\"),XQ=Symbol(\"serverResponsesPiped\"),Zge=Symbol(\"unproxyEvents\"),Xge=Symbol(\"isFromCache\"),mj=Symbol(\"cancelTimeouts\"),$ge=Symbol(\"startedReading\"),BI=Symbol(\"stopReading\"),$Q=Symbol(\"triggerRead\"),S0=Symbol(\"body\"),pv=Symbol(\"jobs\"),ede=Symbol(\"originalResponse\"),tde=Symbol(\"retryTimeout\");Ln.kIsNormalizedAlready=Symbol(\"isNormalizedAlready\");var ydt=at.default.string(process.versions.brotli);Ln.withoutBody=new Set([\"GET\",\"HEAD\"]);Ln.knownHookEvents=[\"init\",\"beforeRequest\",\"beforeRedirect\",\"beforeError\",\"beforeRetry\",\"afterResponse\"];function Edt(t){for(let e in t){let r=t[e];if(!at.default.string(r)&&!at.default.number(r)&&!at.default.boolean(r)&&!at.default.null_(r)&&!at.default.undefined(r))throw new TypeError(`The \\`searchParams\\` value '${String(r)}' must be a string, number, boolean or null`)}}function Idt(t){return at.default.object(t)&&!(\"statusCode\"in t)}var yj=new pdt.default,Cdt=async t=>new Promise((e,r)=>{let s=a=>{r(a)};t.pending||e(),t.once(\"error\",s),t.once(\"ready\",()=>{t.off(\"error\",s),e()})}),wdt=new Set([300,301,302,303,304,307,308]),Bdt=[\"context\",\"body\",\"json\",\"form\"];Ln.setNonEnumerableProperties=(t,e)=>{let r={};for(let s of t)if(s)for(let a of Bdt)a in s&&(r[a]={writable:!0,configurable:!0,enumerable:!1,value:s[a]});Object.defineProperties(e,r)};var fs=class extends Error{constructor(e,r,s){var a;if(super(e),Error.captureStackTrace(this,this.constructor),this.name=\"RequestError\",this.code=r.code,s instanceof aT?(Object.defineProperty(this,\"request\",{enumerable:!1,value:s}),Object.defineProperty(this,\"response\",{enumerable:!1,value:s[eT]}),Object.defineProperty(this,\"options\",{enumerable:!1,value:s.options})):Object.defineProperty(this,\"options\",{enumerable:!1,value:s}),this.timings=(a=this.request)===null||a===void 0?void 0:a.timings,at.default.string(r.stack)&&at.default.string(this.stack)){let n=this.stack.indexOf(this.message)+this.message.length,c=this.stack.slice(n).split(`\n`).reverse(),f=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`\n`).reverse();for(;f.length!==0&&f[0]===c[0];)c.shift();this.stack=`${this.stack.slice(0,n)}${c.reverse().join(`\n`)}${f.reverse().join(`\n`)}`}}};Ln.RequestError=fs;var tT=class extends fs{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name=\"MaxRedirectsError\"}};Ln.MaxRedirectsError=tT;var rT=class extends fs{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name=\"HTTPError\"}};Ln.HTTPError=rT;var nT=class extends fs{constructor(e,r){super(e.message,e,r),this.name=\"CacheError\"}};Ln.CacheError=nT;var iT=class extends fs{constructor(e,r){super(e.message,e,r),this.name=\"UploadError\"}};Ln.UploadError=iT;var sT=class extends fs{constructor(e,r,s){super(e.message,e,s),this.name=\"TimeoutError\",this.event=e.event,this.timings=r}};Ln.TimeoutError=sT;var hv=class extends fs{constructor(e,r){super(e.message,e,r),this.name=\"ReadError\"}};Ln.ReadError=hv;var oT=class extends fs{constructor(e){super(`Unsupported protocol \"${e.url.protocol}\"`,{},e),this.name=\"UnsupportedProtocolError\"}};Ln.UnsupportedProtocolError=oT;var vdt=[\"socket\",\"connect\",\"continue\",\"information\",\"upgrade\",\"timeout\"],aT=class extends Gge.Duplex{constructor(e,r={},s){super({autoDestroy:!1,highWaterMark:0}),this[II]=0,this[wI]=0,this.requestInitialized=!1,this[XQ]=new Set,this.redirects=[],this[BI]=!1,this[$Q]=!1,this[pv]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on(\"pipe\",h=>{h.prependListener(\"data\",a),h.on(\"data\",n),h.prependListener(\"end\",a),h.on(\"end\",n)}),this.on(\"unpipe\",h=>{h.off(\"data\",a),h.off(\"data\",n),h.off(\"end\",a),h.off(\"end\",n)}),this.on(\"pipe\",h=>{h instanceof gj.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:c,body:f,form:p}=r;if((c||f||p)&&this._lockWrite(),Ln.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(h){at.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof ndt.ReadStream&&await Cdt(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError(\"Missing `url` property\");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[go])===null||h===void 0||h.destroy();return}for(let C of this[pv])C();this[pv].length=0,this.requestInitialized=!0}catch(E){if(E instanceof fs){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,s){var a,n,c,f,p;let h=r;if(at.default.object(e)&&!at.default.urlInstance(e))r={...s,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError(\"The `url` option is mutually exclusive with the `input` argument\");r={...s,...r},e!==void 0&&(r.url=e),at.default.urlInstance(r.url)&&(r.url=new B0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),at.assert.any([at.default.string,at.default.undefined],r.method),at.assert.any([at.default.object,at.default.undefined],r.headers),at.assert.any([at.default.string,at.default.urlInstance,at.default.undefined],r.prefixUrl),at.assert.any([at.default.object,at.default.undefined],r.cookieJar),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.searchParams),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.cache),at.assert.any([at.default.object,at.default.number,at.default.undefined],r.timeout),at.assert.any([at.default.object,at.default.undefined],r.context),at.assert.any([at.default.object,at.default.undefined],r.hooks),at.assert.any([at.default.boolean,at.default.undefined],r.decompress),at.assert.any([at.default.boolean,at.default.undefined],r.ignoreInvalidCookies),at.assert.any([at.default.boolean,at.default.undefined],r.followRedirect),at.assert.any([at.default.number,at.default.undefined],r.maxRedirects),at.assert.any([at.default.boolean,at.default.undefined],r.throwHttpErrors),at.assert.any([at.default.boolean,at.default.undefined],r.http2),at.assert.any([at.default.boolean,at.default.undefined],r.allowGetBody),at.assert.any([at.default.string,at.default.undefined],r.localAddress),at.assert.any([zge.isDnsLookupIpVersion,at.default.undefined],r.dnsLookupIpVersion),at.assert.any([at.default.object,at.default.undefined],r.https),at.assert.any([at.default.boolean,at.default.undefined],r.rejectUnauthorized),r.https&&(at.assert.any([at.default.boolean,at.default.undefined],r.https.rejectUnauthorized),at.assert.any([at.default.function_,at.default.undefined],r.https.checkServerIdentity),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificateAuthority),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.key),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificate),at.assert.any([at.default.string,at.default.undefined],r.https.passphrase),at.assert.any([at.default.string,at.default.buffer,at.default.array,at.default.undefined],r.https.pfx)),at.assert.any([at.default.object,at.default.undefined],r.cacheOptions),at.default.string(r.method)?r.method=r.method.toUpperCase():r.method=\"GET\",r.headers===s?.headers?r.headers={...r.headers}:r.headers=cdt({...s?.headers,...r.headers}),\"slashes\"in r)throw new TypeError(\"The legacy `url.Url` has been deprecated. Use `URL` instead.\");if(\"auth\"in r)throw new TypeError(\"Parameter `auth` is deprecated. Use `username` / `password` instead.\");if(\"searchParams\"in r&&r.searchParams&&r.searchParams!==s?.searchParams){let P;if(at.default.string(r.searchParams)||r.searchParams instanceof B0.URLSearchParams)P=new B0.URLSearchParams(r.searchParams);else{Edt(r.searchParams),P=new B0.URLSearchParams;for(let I in r.searchParams){let R=r.searchParams[I];R===null?P.append(I,\"\"):R!==void 0&&P.append(I,R)}}(a=s?.searchParams)===null||a===void 0||a.forEach((I,R)=>{P.has(R)||P.append(R,I)}),r.searchParams=P}if(r.username=(n=r.username)!==null&&n!==void 0?n:\"\",r.password=(c=r.password)!==null&&c!==void 0?c:\"\",at.default.undefined(r.prefixUrl)?r.prefixUrl=(f=s?.prefixUrl)!==null&&f!==void 0?f:\"\":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==\"\"&&!r.prefixUrl.endsWith(\"/\")&&(r.prefixUrl+=\"/\")),at.default.string(r.url)){if(r.url.startsWith(\"/\"))throw new Error(\"`input` must not start with a slash when using `prefixUrl`\");r.url=Jge.default(r.prefixUrl+r.url,r)}else(at.default.undefined(r.url)&&r.prefixUrl!==\"\"||r.protocol)&&(r.url=Jge.default(r.prefixUrl,r));if(r.url){\"port\"in r&&delete r.port;let{prefixUrl:P}=r;Object.defineProperty(r,\"prefixUrl\",{set:R=>{let N=r.url;if(!N.href.startsWith(R))throw new Error(`Cannot change \\`prefixUrl\\` from ${P} to ${R}: ${N.href}`);r.url=new B0.URL(R+N.href.slice(P.length)),P=R},get:()=>P});let{protocol:I}=r.url;if(I===\"unix:\"&&(I=\"http:\",r.url=new B0.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),I!==\"http:\"&&I!==\"https:\")throw new oT(r);r.username===\"\"?r.username=r.url.username:r.url.username=r.username,r.password===\"\"?r.password=r.url.password:r.url.password=r.password}let{cookieJar:E}=r;if(E){let{setCookie:P,getCookieString:I}=E;at.assert.function_(P),at.assert.function_(I),P.length===4&&I.length===0&&(P=qge.promisify(P.bind(r.cookieJar)),I=qge.promisify(I.bind(r.cookieJar)),r.cookieJar={setCookie:P,getCookieString:I})}let{cache:C}=r;if(C&&(yj.has(C)||yj.set(C,new Yge((P,I)=>{let R=P[go](P,I);return at.default.promise(R)&&(R.once=(N,U)=>{if(N===\"error\")R.catch(U);else if(N===\"abort\")(async()=>{try{(await R).once(\"abort\",U)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${N}`);return R}),R},C))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)dj||(dj=new odt.default),r.dnsCache=dj;else if(!at.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \\`dnsCache\\` must be a CacheableLookup instance or a boolean, got ${at.default(r.dnsCache)}`);at.default.number(r.timeout)?r.timeout={request:r.timeout}:s&&r.timeout!==s.timeout?r.timeout={...s.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let S=r.hooks===s?.hooks;r.hooks={...r.hooks};for(let P of Ln.knownHookEvents)if(P in r.hooks)if(at.default.array(r.hooks[P]))r.hooks[P]=[...r.hooks[P]];else throw new TypeError(`Parameter \\`${P}\\` must be an Array, got ${at.default(r.hooks[P])}`);else r.hooks[P]=[];if(s&&!S)for(let P of Ln.knownHookEvents)s.hooks[P].length>0&&(r.hooks[P]=[...s.hooks[P],...r.hooks[P]]);if(\"family\"in r&&v0.default('\"options.family\" was never documented, please use \"options.dnsLookupIpVersion\"'),s?.https&&(r.https={...s.https,...r.https}),\"rejectUnauthorized\"in r&&v0.default('\"options.rejectUnauthorized\" is now deprecated, please use \"options.https.rejectUnauthorized\"'),\"checkServerIdentity\"in r&&v0.default('\"options.checkServerIdentity\" was never documented, please use \"options.https.checkServerIdentity\"'),\"ca\"in r&&v0.default('\"options.ca\" was never documented, please use \"options.https.certificateAuthority\"'),\"key\"in r&&v0.default('\"options.key\" was never documented, please use \"options.https.key\"'),\"cert\"in r&&v0.default('\"options.cert\" was never documented, please use \"options.https.certificate\"'),\"passphrase\"in r&&v0.default('\"options.passphrase\" was never documented, please use \"options.https.passphrase\"'),\"pfx\"in r&&v0.default('\"options.pfx\" was never documented, please use \"options.https.pfx\"'),\"followRedirects\"in r)throw new TypeError(\"The `followRedirects` option does not exist. Use `followRedirect` instead.\");if(r.agent){for(let P in r.agent)if(P!==\"http\"&&P!==\"https\"&&P!==\"http2\")throw new TypeError(`Expected the \\`options.agent\\` properties to be \\`http\\`, \\`https\\` or \\`http2\\`, got \\`${P}\\``)}return r.maxRedirects=(p=r.maxRedirects)!==null&&p!==void 0?p:0,Ln.setNonEnumerableProperties([s,h],r),ddt.default(r,s)}_lockWrite(){let e=()=>{throw new TypeError(\"The payload has been already provided\")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:r}=e,s=!at.default.undefined(e.form),a=!at.default.undefined(e.json),n=!at.default.undefined(e.body),c=s||a||n,f=Ln.withoutBody.has(e.method)&&!(e.method===\"GET\"&&e.allowGetBody);if(this._cannotHaveBody=f,c){if(f)throw new TypeError(`The \\`${e.method}\\` method cannot be used with a body`);if([n,s,a].filter(p=>p).length>1)throw new TypeError(\"The `body`, `json` and `form` options are mutually exclusive\");if(n&&!(e.body instanceof Gge.Readable)&&!at.default.string(e.body)&&!at.default.buffer(e.body)&&!Vge.default(e.body))throw new TypeError(\"The `body` option must be a stream.Readable, string or Buffer\");if(s&&!at.default.object(e.form))throw new TypeError(\"The `form` option must be an Object\");{let p=!at.default.string(r[\"content-type\"]);n?(Vge.default(e.body)&&p&&(r[\"content-type\"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[S0]=e.body):s?(p&&(r[\"content-type\"]=\"application/x-www-form-urlencoded\"),this[S0]=new B0.URLSearchParams(e.form).toString()):(p&&(r[\"content-type\"]=\"application/json\"),this[S0]=e.stringifyJson(e.json));let h=await udt.default(this[S0],e.headers);at.default.undefined(r[\"content-length\"])&&at.default.undefined(r[\"transfer-encoding\"])&&!f&&!at.default.undefined(h)&&(r[\"content-length\"]=String(h))}}else f?this._lockWrite():this._unlockWrite();this[CI]=Number(r[\"content-length\"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:s}=r;this[ede]=e,r.decompress&&(e=adt(e));let a=e.statusCode,n=e;n.statusMessage=n.statusMessage?n.statusMessage:Wge.STATUS_CODES[a],n.url=r.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=e.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[Xge]=n.isFromCache,this[EI]=Number(e.headers[\"content-length\"])||void 0,this[eT]=e,e.once(\"end\",()=>{this[EI]=this[II],this.emit(\"downloadProgress\",this.downloadProgress)}),e.once(\"error\",f=>{e.destroy(),this._beforeError(new hv(f,this))}),e.once(\"aborted\",()=>{this._beforeError(new hv({name:\"Error\",message:\"The server aborted pending request\",code:\"ECONNRESET\"},this))}),this.emit(\"downloadProgress\",this.downloadProgress);let c=e.headers[\"set-cookie\"];if(at.default.object(r.cookieJar)&&c){let f=c.map(async p=>r.cookieJar.setCookie(p,s.toString()));r.ignoreInvalidCookies&&(f=f.map(async p=>p.catch(()=>{})));try{await Promise.all(f)}catch(p){this._beforeError(p);return}}if(r.followRedirect&&e.headers.location&&wdt.has(a)){if(e.resume(),this[go]&&(this[mj](),delete this[go],this[Zge]()),(a===303&&r.method!==\"GET\"&&r.method!==\"HEAD\"||!r.methodRewriting)&&(r.method=\"GET\",\"body\"in r&&delete r.body,\"json\"in r&&delete r.json,\"form\"in r&&delete r.form,this[S0]=void 0,delete r.headers[\"content-length\"]),this.redirects.length>=r.maxRedirects){this._beforeError(new tT(this));return}try{let p=Buffer.from(e.headers.location,\"binary\").toString(),h=new B0.URL(p,s),E=h.toString();decodeURI(E),h.hostname!==s.hostname||h.port!==s.port?(\"host\"in r.headers&&delete r.headers.host,\"cookie\"in r.headers&&delete r.headers.cookie,\"authorization\"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username=\"\",r.password=\"\")):(h.username=r.username,h.password=r.password),this.redirects.push(E),r.url=h;for(let C of r.hooks.beforeRedirect)await C(r,n);this.emit(\"redirect\",n,r),await this._makeRequest()}catch(p){this._beforeError(p);return}return}if(r.isStream&&r.throwHttpErrors&&!gdt.isResponseOk(n)){this._beforeError(new rT(n));return}e.on(\"readable\",()=>{this[$Q]&&this._read()}),this.on(\"resume\",()=>{e.resume()}),this.on(\"pause\",()=>{e.pause()}),e.once(\"end\",()=>{this.push(null)}),this.emit(\"response\",e);for(let f of this[XQ])if(!f.headersSent){for(let p in e.headers){let h=r.decompress?p!==\"content-encoding\":!0,E=e.headers[p];h&&f.setHeader(p,E)}f.statusCode=a}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:s,url:a}=r;sdt.default(e),this[mj]=Kge.default(e,s,a);let n=r.cache?\"cacheableResponse\":\"response\";e.once(n,p=>{this._onResponse(p)}),e.once(\"error\",p=>{var h;e.destroy(),(h=e.res)===null||h===void 0||h.removeAllListeners(\"end\"),p=p instanceof Kge.TimeoutError?new sT(p,this.timings,this):new fs(p.message,p,this),this._beforeError(p)}),this[Zge]=fdt.default(e,this,vdt),this[go]=e,this.emit(\"uploadProgress\",this.uploadProgress);let c=this[S0],f=this.redirects.length===0?this:e;at.default.nodeStream(c)?(c.pipe(f),c.once(\"error\",p=>{this._beforeError(new iT(p,this))})):(this._unlockWrite(),at.default.undefined(c)?(this._cannotHaveBody||this._noPipe)&&(f.end(),this._lockWrite()):(this._writeRequest(c,void 0,()=>{}),f.end(),this._lockWrite())),this.emit(\"request\",e)}async _createCacheableRequest(e,r){return new Promise((s,a)=>{Object.assign(r,Adt.default(e)),delete r.url;let n,c=yj.get(r.cache)(r,async f=>{f._readableState.autoDestroy=!1,n&&(await n).emit(\"cacheableResponse\",f),s(f)});r.url=e,c.once(\"error\",a),c.once(\"request\",async f=>{n=f,s(n)})})}async _makeRequest(){var e,r,s,a,n;let{options:c}=this,{headers:f}=c;for(let U in f)if(at.default.undefined(f[U]))delete f[U];else if(at.default.null_(f[U]))throw new TypeError(`Use \\`undefined\\` instead of \\`null\\` to delete the \\`${U}\\` header`);if(c.decompress&&at.default.undefined(f[\"accept-encoding\"])&&(f[\"accept-encoding\"]=ydt?\"gzip, deflate, br\":\"gzip, deflate\"),c.cookieJar){let U=await c.cookieJar.getCookieString(c.url.toString());at.default.nonEmptyString(U)&&(c.headers.cookie=U)}for(let U of c.hooks.beforeRequest){let W=await U(c);if(!at.default.undefined(W)){c.request=()=>W;break}}c.body&&this[S0]!==c.body&&(this[S0]=c.body);let{agent:p,request:h,timeout:E,url:C}=c;if(c.dnsCache&&!(\"lookup\"in c)&&(c.lookup=c.dnsCache.lookup),C.hostname===\"unix\"){let U=/(?<socketPath>.+?):(?<path>.+)/.exec(`${C.pathname}${C.search}`);if(U?.groups){let{socketPath:W,path:te}=U.groups;Object.assign(c,{socketPath:W,path:te,host:\"\"})}}let S=C.protocol===\"https:\",P;c.http2?P=ldt.auto:P=S?idt.request:Wge.request;let I=(e=c.request)!==null&&e!==void 0?e:P,R=c.cache?this._createCacheableRequest:I;p&&!c.http2&&(c.agent=p[S?\"https\":\"http\"]),c[go]=I,delete c.request,delete c.timeout;let N=c;if(N.shared=(r=c.cacheOptions)===null||r===void 0?void 0:r.shared,N.cacheHeuristic=(s=c.cacheOptions)===null||s===void 0?void 0:s.cacheHeuristic,N.immutableMinTimeToLive=(a=c.cacheOptions)===null||a===void 0?void 0:a.immutableMinTimeToLive,N.ignoreCargoCult=(n=c.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult,c.dnsLookupIpVersion!==void 0)try{N.family=zge.dnsLookupIpVersionToFamily(c.dnsLookupIpVersion)}catch{throw new Error(\"Invalid `dnsLookupIpVersion` option value\")}c.https&&(\"rejectUnauthorized\"in c.https&&(N.rejectUnauthorized=c.https.rejectUnauthorized),c.https.checkServerIdentity&&(N.checkServerIdentity=c.https.checkServerIdentity),c.https.certificateAuthority&&(N.ca=c.https.certificateAuthority),c.https.certificate&&(N.cert=c.https.certificate),c.https.key&&(N.key=c.https.key),c.https.passphrase&&(N.passphrase=c.https.passphrase),c.https.pfx&&(N.pfx=c.https.pfx));try{let U=await R(C,N);at.default.undefined(U)&&(U=P(C,N)),c.request=h,c.timeout=E,c.agent=p,c.https&&(\"rejectUnauthorized\"in c.https&&delete N.rejectUnauthorized,c.https.checkServerIdentity&&delete N.checkServerIdentity,c.https.certificateAuthority&&delete N.ca,c.https.certificate&&delete N.cert,c.https.key&&delete N.key,c.https.passphrase&&delete N.passphrase,c.https.pfx&&delete N.pfx),Idt(U)?this._onRequest(U):this.writable?(this.once(\"finish\",()=>{this._onResponse(U)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(U)}catch(U){throw U instanceof Yge.CacheError?new nT(U,this):new fs(U.message,U,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new fs(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[BI])return;let{options:r}=this,s=this.retryCount+1;this[BI]=!0,e instanceof fs||(e=new fs(e.message,e,this));let a=e,{response:n}=a;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await hdt.default(n),n.body=n.rawBody.toString()}catch{}}if(this.listenerCount(\"retry\")!==0){let c;try{let f;n&&\"retry-after\"in n.headers&&(f=Number(n.headers[\"retry-after\"]),Number.isNaN(f)?(f=Date.parse(n.headers[\"retry-after\"])-Date.now(),f<=0&&(f=1)):f*=1e3),c=await r.retry.calculateDelay({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:mdt.default({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:0})})}catch(f){this._error(new fs(f.message,f,this));return}if(c){let f=async()=>{try{for(let p of this.options.hooks.beforeRetry)await p(this.options,a,s)}catch(p){this._error(new fs(p.message,e,this));return}this.destroyed||(this.destroy(),this.emit(\"retry\",s,e))};this[tde]=setTimeout(f,c);return}}this._error(a)})()}_read(){this[$Q]=!0;let e=this[eT];if(e&&!this[BI]){e.readableLength&&(this[$Q]=!1);let r;for(;(r=e.read())!==null;){this[II]+=r.length,this[$ge]=!0;let s=this.downloadProgress;s.percent<1&&this.emit(\"downloadProgress\",s),this.push(r)}}}_write(e,r,s){let a=()=>{this._writeRequest(e,r,s)};this.requestInitialized?a():this[pv].push(a)}_writeRequest(e,r,s){this[go].destroyed||(this._progressCallbacks.push(()=>{this[wI]+=Buffer.byteLength(e,r);let a=this.uploadProgress;a.percent<1&&this.emit(\"uploadProgress\",a)}),this[go].write(e,r,a=>{!a&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),s(a)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(go in this)){e();return}if(this[go].destroyed){e();return}this[go].end(s=>{s||(this[CI]=this[wI],this.emit(\"uploadProgress\",this.uploadProgress),this[go].emit(\"upload-complete\")),e(s)})};this.requestInitialized?r():this[pv].push(r)}_destroy(e,r){var s;this[BI]=!0,clearTimeout(this[tde]),go in this&&(this[mj](),!((s=this[eT])===null||s===void 0)&&s.complete||this[go].destroy()),e!==null&&!at.default.undefined(e)&&!(e instanceof fs)&&(e=new fs(e.message,e,this)),r(e)}get _isAboutToError(){return this[BI]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,s;return((r=(e=this[go])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((s=this[ede])===null||s===void 0)&&s.complete)}get socket(){var e,r;return(r=(e=this[go])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[EI]?e=this[II]/this[EI]:this[EI]===this[II]?e=1:e=0,{percent:e,transferred:this[II],total:this[EI]}}get uploadProgress(){let e;return this[CI]?e=this[wI]/this[CI]:this[CI]===this[wI]?e=1:e=0,{percent:e,transferred:this[wI],total:this[CI]}}get timings(){var e;return(e=this[go])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[Xge]}pipe(e,r){if(this[$ge])throw new Error(\"Failed to pipe. The response has been emitted already.\");return e instanceof gj.ServerResponse&&this[XQ].add(e),super.pipe(e,r)}unpipe(e){return e instanceof gj.ServerResponse&&this[XQ].delete(e),super.unpipe(e),this}};Ln.default=aT});var dv=L(Wu=>{\"use strict\";var Sdt=Wu&&Wu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Ddt=Wu&&Wu.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Sdt(e,t,r)};Object.defineProperty(Wu,\"__esModule\",{value:!0});Wu.CancelError=Wu.ParseError=void 0;var rde=gv(),Ej=class extends rde.RequestError{constructor(e,r){let{options:s}=r.request;super(`${e.message} in \"${s.url.toString()}\"`,e,r.request),this.name=\"ParseError\"}};Wu.ParseError=Ej;var Ij=class extends rde.RequestError{constructor(e){super(\"Promise was canceled\",{},e),this.name=\"CancelError\"}get isCanceled(){return!0}};Wu.CancelError=Ij;Ddt(gv(),Wu)});var ide=L(Cj=>{\"use strict\";Object.defineProperty(Cj,\"__esModule\",{value:!0});var nde=dv(),bdt=(t,e,r,s)=>{let{rawBody:a}=t;try{if(e===\"text\")return a.toString(s);if(e===\"json\")return a.length===0?\"\":r(a.toString());if(e===\"buffer\")return a;throw new nde.ParseError({message:`Unknown body type '${e}'`,name:\"Error\"},t)}catch(n){throw new nde.ParseError(n,t)}};Cj.default=bdt});var wj=L(D0=>{\"use strict\";var Pdt=D0&&D0.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),xdt=D0&&D0.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Pdt(e,t,r)};Object.defineProperty(D0,\"__esModule\",{value:!0});var kdt=ye(\"events\"),Qdt=Mp(),Tdt=n0e(),lT=dv(),sde=ide(),ode=gv(),Rdt=ij(),Fdt=fj(),ade=Aj(),Ndt=[\"request\",\"response\",\"redirect\",\"uploadProgress\",\"downloadProgress\"];function lde(t){let e,r,s=new kdt.EventEmitter,a=new Tdt((c,f,p)=>{let h=E=>{let C=new ode.default(void 0,t);C.retryCount=E,C._noPipe=!0,p(()=>C.destroy()),p.shouldReject=!1,p(()=>f(new lT.CancelError(C))),e=C,C.once(\"response\",async I=>{var R;if(I.retryCount=E,I.request.aborted)return;let N;try{N=await Fdt.default(C),I.rawBody=N}catch{return}if(C._isAboutToError)return;let U=((R=I.headers[\"content-encoding\"])!==null&&R!==void 0?R:\"\").toLowerCase(),W=[\"gzip\",\"deflate\",\"br\"].includes(U),{options:te}=C;if(W&&!te.decompress)I.body=N;else try{I.body=sde.default(I,te.responseType,te.parseJson,te.encoding)}catch(ie){if(I.body=N.toString(),ade.isResponseOk(I)){C._beforeError(ie);return}}try{for(let[ie,Ae]of te.hooks.afterResponse.entries())I=await Ae(I,async ce=>{let me=ode.default.normalizeArguments(void 0,{...ce,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},te);me.hooks.afterResponse=me.hooks.afterResponse.slice(0,ie);for(let Be of me.hooks.beforeRetry)await Be(me);let pe=lde(me);return p(()=>{pe.catch(()=>{}),pe.cancel()}),pe})}catch(ie){C._beforeError(new lT.RequestError(ie.message,ie,C));return}if(!ade.isResponseOk(I)){C._beforeError(new lT.HTTPError(I));return}r=I,c(C.options.resolveBodyOnly?I.body:I)});let S=I=>{if(a.isCanceled)return;let{options:R}=C;if(I instanceof lT.HTTPError&&!R.throwHttpErrors){let{response:N}=I;c(C.options.resolveBodyOnly?N.body:N);return}f(I)};C.once(\"error\",S);let P=C.options.body;C.once(\"retry\",(I,R)=>{var N,U;if(P===((N=R.request)===null||N===void 0?void 0:N.options.body)&&Qdt.default.nodeStream((U=R.request)===null||U===void 0?void 0:U.options.body)){S(R);return}h(I)}),Rdt.default(C,s,Ndt)};h(0)});a.on=(c,f)=>(s.on(c,f),a);let n=c=>{let f=(async()=>{await a;let{options:p}=r.request;return sde.default(r,c,p.parseJson,p.encoding)})();return Object.defineProperties(f,Object.getOwnPropertyDescriptors(a)),f};return a.json=()=>{let{headers:c}=e.options;return!e.writableFinished&&c.accept===void 0&&(c.accept=\"application/json\"),n(\"json\")},a.buffer=()=>n(\"buffer\"),a.text=()=>n(\"text\"),a}D0.default=lde;xdt(dv(),D0)});var cde=L(Bj=>{\"use strict\";Object.defineProperty(Bj,\"__esModule\",{value:!0});var Odt=dv();function Ldt(t,...e){let r=(async()=>{if(t instanceof Odt.RequestError)try{for(let a of e)if(a)for(let n of a)t=await n(t)}catch(a){t=a}throw t})(),s=()=>r;return r.json=s,r.text=s,r.buffer=s,r.on=s,r}Bj.default=Ldt});var Ade=L(vj=>{\"use strict\";Object.defineProperty(vj,\"__esModule\",{value:!0});var ude=Mp();function fde(t){for(let e of Object.values(t))(ude.default.plainObject(e)||ude.default.array(e))&&fde(e);return Object.freeze(t)}vj.default=fde});var hde=L(pde=>{\"use strict\";Object.defineProperty(pde,\"__esModule\",{value:!0})});var Sj=L(Lc=>{\"use strict\";var Mdt=Lc&&Lc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),_dt=Lc&&Lc.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Mdt(e,t,r)};Object.defineProperty(Lc,\"__esModule\",{value:!0});Lc.defaultHandler=void 0;var gde=Mp(),Oc=wj(),Udt=cde(),uT=gv(),Hdt=Ade(),jdt={RequestError:Oc.RequestError,CacheError:Oc.CacheError,ReadError:Oc.ReadError,HTTPError:Oc.HTTPError,MaxRedirectsError:Oc.MaxRedirectsError,TimeoutError:Oc.TimeoutError,ParseError:Oc.ParseError,CancelError:Oc.CancelError,UnsupportedProtocolError:Oc.UnsupportedProtocolError,UploadError:Oc.UploadError},qdt=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:cT}=uT.default,dde=(...t)=>{let e;for(let r of t)e=cT(void 0,r,e);return e},Gdt=t=>t.isStream?new uT.default(void 0,t):Oc.default(t),Wdt=t=>\"defaults\"in t&&\"options\"in t.defaults,Ydt=[\"get\",\"post\",\"put\",\"patch\",\"head\",\"delete\"];Lc.defaultHandler=(t,e)=>e(t);var mde=(t,e)=>{if(t)for(let r of t)r(e)},yde=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(s=>(a,n)=>{let c,f=s(a,p=>(c=n(p),c));if(f!==c&&!a.isStream&&c){let p=f,{then:h,catch:E,finally:C}=p;Object.setPrototypeOf(p,Object.getPrototypeOf(c)),Object.defineProperties(p,Object.getOwnPropertyDescriptors(c)),p.then=h,p.catch=E,p.finally=C}return f});let e=(s,a={},n)=>{var c,f;let p=0,h=E=>t.handlers[p++](E,p===t.handlers.length?Gdt:h);if(gde.default.plainObject(s)){let E={...s,...a};uT.setNonEnumerableProperties([s,a],E),a=E,s=void 0}try{let E;try{mde(t.options.hooks.init,a),mde((c=a.hooks)===null||c===void 0?void 0:c.init,a)}catch(S){E=S}let C=cT(s,a,n??t.options);if(C[uT.kIsNormalizedAlready]=!0,E)throw new Oc.RequestError(E.message,E,C);return h(C)}catch(E){if(a.isStream)throw E;return Udt.default(E,t.options.hooks.beforeError,(f=a.hooks)===null||f===void 0?void 0:f.beforeError)}};e.extend=(...s)=>{let a=[t.options],n=[...t._rawHandlers],c;for(let f of s)Wdt(f)?(a.push(f.defaults.options),n.push(...f.defaults._rawHandlers),c=f.defaults.mutableDefaults):(a.push(f),\"handlers\"in f&&n.push(...f.handlers),c=f.mutableDefaults);return n=n.filter(f=>f!==Lc.defaultHandler),n.length===0&&n.push(Lc.defaultHandler),yde({options:dde(...a),handlers:n,mutableDefaults:!!c})};let r=async function*(s,a){let n=cT(s,a,t.options);n.resolveBodyOnly=!1;let c=n.pagination;if(!gde.default.object(c))throw new TypeError(\"`options.pagination` must be implemented\");let f=[],{countLimit:p}=c,h=0;for(;h<c.requestLimit;){h!==0&&await qdt(c.backoff);let E=await e(void 0,void 0,n),C=await c.transform(E),S=[];for(let I of C)if(c.filter(I,f,S)&&(!c.shouldContinue(I,f,S)||(yield I,c.stackAllItems&&f.push(I),S.push(I),--p<=0)))return;let P=c.paginate(E,f,S);if(P===!1)return;P===E.request.options?n=E.request.options:P!==void 0&&(n=cT(void 0,P,n)),h++}};e.paginate=r,e.paginate.all=async(s,a)=>{let n=[];for await(let c of r(s,a))n.push(c);return n},e.paginate.each=r,e.stream=(s,a)=>e(s,{...a,isStream:!0});for(let s of Ydt)e[s]=(a,n)=>e(a,{...n,method:s}),e.stream[s]=(a,n)=>e(a,{...n,method:s,isStream:!0});return Object.assign(e,jdt),Object.defineProperty(e,\"defaults\",{value:t.mutableDefaults?t:Hdt.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=dde,e};Lc.default=yde;_dt(hde(),Lc)});var Cde=L((_p,fT)=>{\"use strict\";var Vdt=_p&&_p.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Ede=_p&&_p.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Vdt(e,t,r)};Object.defineProperty(_p,\"__esModule\",{value:!0});var Kdt=ye(\"url\"),Ide=Sj(),Jdt={options:{method:\"GET\",retry:{limit:2,methods:[\"GET\",\"PUT\",\"HEAD\",\"DELETE\",\"OPTIONS\",\"TRACE\"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:[\"ETIMEDOUT\",\"ECONNRESET\",\"EADDRINUSE\",\"ECONNREFUSED\",\"EPIPE\",\"ENOTFOUND\",\"ENETUNREACH\",\"EAI_AGAIN\"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{\"user-agent\":\"got (https://github.com/sindresorhus/got)\"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:\"text\",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:\"\",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType===\"json\"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,\"link\"))return!1;let e=t.headers.link.split(\",\"),r;for(let s of e){let a=s.split(\";\");if(a[1].includes(\"next\")){r=a[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new Kdt.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[Ide.defaultHandler],mutableDefaults:!1},Dj=Ide.default(Jdt);_p.default=Dj;fT.exports=Dj;fT.exports.default=Dj;fT.exports.__esModule=!0;Ede(Sj(),_p);Ede(wj(),_p)});var An={};Vt(An,{Method:()=>Pde,del:()=>emt,get:()=>kj,getNetworkSettings:()=>bde,post:()=>Qj,put:()=>$dt,request:()=>mv});function vde(t){let e=new URL(t),r={host:e.hostname,headers:{}};return e.port&&(r.port=Number(e.port)),e.username&&e.password&&(r.proxyAuth=`${e.username}:${e.password}`),{proxy:r}}async function bj(t){return Vl(Bde,t,()=>le.readFilePromise(t).then(e=>(Bde.set(t,e),e)))}function Xdt({statusCode:t,statusMessage:e},r){let s=Ut(r,t,Ct.NUMBER),a=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${t}`;return JE(r,`${s}${e?` (${e})`:\"\"}`,a)}async function AT(t,{configuration:e,customErrorMessage:r}){try{return await t}catch(s){if(s.name!==\"HTTPError\")throw s;let a=r?.(s,e)??s.response.body?.error;a==null&&(s.message.startsWith(\"Response code\")?a=\"The remote server failed to provide the requested resource\":a=s.message),s.code===\"ETIMEDOUT\"&&s.event===\"socket\"&&(a+=`(can be increased via ${Ut(e,\"httpTimeout\",Ct.SETTING)})`);let n=new Yt(35,a,c=>{s.response&&c.reportError(35,`  ${Zf(e,{label:\"Response Code\",value:Hu(Ct.NO_HINT,Xdt(s.response,e))})}`),s.request&&(c.reportError(35,`  ${Zf(e,{label:\"Request Method\",value:Hu(Ct.NO_HINT,s.request.options.method)})}`),c.reportError(35,`  ${Zf(e,{label:\"Request URL\",value:Hu(Ct.URL,s.request.requestUrl)})}`)),s.request.redirects.length>0&&c.reportError(35,`  ${Zf(e,{label:\"Request Redirects\",value:Hu(Ct.NO_HINT,I3(e,s.request.redirects,Ct.URL))})}`),s.request.retryCount===s.request.options.retry.limit&&c.reportError(35,`  ${Zf(e,{label:\"Request Retry Count\",value:Hu(Ct.NO_HINT,`${Ut(e,s.request.retryCount,Ct.NUMBER)} (can be increased via ${Ut(e,\"httpRetry\",Ct.SETTING)})`)})}`)});throw n.originalError=s,n}}function bde(t,e){let r=[...e.configuration.get(\"networkSettings\")].sort(([c],[f])=>f.length-c.length),s={enableNetwork:void 0,httpsCaFilePath:void 0,httpProxy:void 0,httpsProxy:void 0,httpsKeyFilePath:void 0,httpsCertFilePath:void 0},a=Object.keys(s),n=typeof t==\"string\"?new URL(t):t;for(let[c,f]of r)if(xj.default.isMatch(n.hostname,c))for(let p of a){let h=f.get(p);h!==null&&typeof s[p]>\"u\"&&(s[p]=h)}for(let c of a)typeof s[c]>\"u\"&&(s[c]=e.configuration.get(c));return s}async function mv(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c=\"GET\",wrapNetworkRequest:f}){let p={target:t,body:e,configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c},h=async()=>await tmt(t,e,p),E=typeof f<\"u\"?await f(h,p):h;return await(await r.reduceHook(S=>S.wrapNetworkRequest,E,p))()}async function kj(t,{configuration:e,jsonResponse:r,customErrorMessage:s,wrapNetworkRequest:a,...n}){let c=()=>AT(mv(t,null,{configuration:e,wrapNetworkRequest:a,...n}),{configuration:e,customErrorMessage:s}).then(p=>p.body),f=await(typeof a<\"u\"?c():Vl(wde,t,()=>c().then(p=>(wde.set(t,p),p))));return r?JSON.parse(f.toString()):f}async function $dt(t,e,{customErrorMessage:r,...s}){return(await AT(mv(t,e,{...s,method:\"PUT\"}),{customErrorMessage:r,configuration:s.configuration})).body}async function Qj(t,e,{customErrorMessage:r,...s}){return(await AT(mv(t,e,{...s,method:\"POST\"}),{customErrorMessage:r,configuration:s.configuration})).body}async function emt(t,{customErrorMessage:e,...r}){return(await AT(mv(t,null,{...r,method:\"DELETE\"}),{customErrorMessage:e,configuration:r.configuration})).body}async function tmt(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c=\"GET\"}){let f=typeof t==\"string\"?new URL(t):t,p=bde(f,{configuration:r});if(p.enableNetwork===!1)throw new Yt(80,`Request to '${f.href}' has been blocked because of your configuration settings`);if(f.protocol===\"http:\"&&!xj.default.isMatch(f.hostname,r.get(\"unsafeHttpWhitelist\")))throw new Yt(81,`Unsafe http requests must be explicitly whitelisted in your configuration (${f.hostname})`);let E={agent:{http:p.httpProxy?Pj.default.httpOverHttp(vde(p.httpProxy)):zdt,https:p.httpsProxy?Pj.default.httpsOverHttp(vde(p.httpsProxy)):Zdt},headers:s,method:c};E.responseType=n?\"json\":\"buffer\",e!==null&&(Buffer.isBuffer(e)||!a&&typeof e==\"string\"?E.body=e:E.json=e);let C=r.get(\"httpTimeout\"),S=r.get(\"httpRetry\"),P=r.get(\"enableStrictSsl\"),I=p.httpsCaFilePath,R=p.httpsCertFilePath,N=p.httpsKeyFilePath,{default:U}=await Promise.resolve().then(()=>et(Cde())),W=I?await bj(I):void 0,te=R?await bj(R):void 0,ie=N?await bj(N):void 0,Ae=U.extend({timeout:{socket:C},retry:S,https:{rejectUnauthorized:P,certificateAuthority:W,certificate:te,key:ie},...E});return r.getLimit(\"networkConcurrency\")(()=>Ae(f))}var Sde,Dde,xj,Pj,wde,Bde,zdt,Zdt,Pde,pT=It(()=>{bt();Sde=ye(\"https\"),Dde=ye(\"http\"),xj=et(Sa()),Pj=et(Xhe());Fc();Qc();kc();wde=new Map,Bde=new Map,zdt=new Dde.Agent({keepAlive:!0}),Zdt=new Sde.Agent({keepAlive:!0});Pde=(a=>(a.GET=\"GET\",a.PUT=\"PUT\",a.POST=\"POST\",a.DELETE=\"DELETE\",a))(Pde||{})});var As={};Vt(As,{availableParallelism:()=>Rj,getArchitecture:()=>yv,getArchitectureName:()=>omt,getArchitectureSet:()=>Tj,getCaller:()=>umt,major:()=>rmt,openUrl:()=>nmt});function smt(){if(process.platform===\"darwin\"||process.platform===\"win32\")return null;let t;try{t=le.readFileSync(imt)}catch{}if(typeof t<\"u\"){if(t&&(t.includes(\"GLIBC\")||t.includes(\"libc\")))return\"glibc\";if(t&&t.includes(\"musl\"))return\"musl\"}let r=(process.report?.getReport()??{}).sharedObjects??[],s=/\\/(?:(ld-linux-|[^/]+-linux-gnu\\/)|(libc.musl-|ld-musl-))/;return p0(r,a=>{let n=a.match(s);if(!n)return p0.skip;if(n[1])return\"glibc\";if(n[2])return\"musl\";throw new Error(\"Assertion failed: Expected the libc variant to have been detected\")})??null}function yv(){return kde=kde??{os:process.platform,cpu:process.arch,libc:smt()}}function omt(t=yv()){return t.libc?`${t.os}-${t.cpu}-${t.libc}`:`${t.os}-${t.cpu}`}function Tj(){let t=yv();return Qde=Qde??{os:[t.os],cpu:[t.cpu],libc:t.libc?[t.libc]:[]}}function cmt(t){let e=amt.exec(t);if(!e)return null;let r=e[2]&&e[2].indexOf(\"native\")===0,s=e[2]&&e[2].indexOf(\"eval\")===0,a=lmt.exec(e[2]);return s&&a!=null&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{file:r?null:e[2],methodName:e[1]||\"<unknown>\",arguments:r?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}function umt(){let e=new Error().stack.split(`\n`)[3];return cmt(e)}function Rj(){return typeof hT.default.availableParallelism<\"u\"?hT.default.availableParallelism():Math.max(1,hT.default.cpus().length)}var hT,rmt,xde,nmt,imt,kde,Qde,amt,lmt,gT=It(()=>{bt();hT=et(ye(\"os\"));dT();kc();rmt=Number(process.versions.node.split(\".\")[0]),xde=new Map([[\"darwin\",\"open\"],[\"linux\",\"xdg-open\"],[\"win32\",\"explorer.exe\"]]).get(process.platform),nmt=typeof xde<\"u\"?async t=>{try{return await Fj(xde,[t],{cwd:K.cwd()}),!0}catch{return!1}}:void 0,imt=\"/usr/bin/ldd\";amt=/^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,lmt=/\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/});function _j(t,e,r,s,a){let n=sv(r);if(s.isArray||s.type===\"ANY\"&&Array.isArray(n))return Array.isArray(n)?n.map((c,f)=>Nj(t,`${e}[${f}]`,c,s,a)):String(n).split(/,/).map(c=>Nj(t,e,c,s,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings \"${e}\" cannot be an array`);return Nj(t,e,r,s,a)}function Nj(t,e,r,s,a){let n=sv(r);switch(s.type){case\"ANY\":return NQ(n);case\"SHAPE\":return hmt(t,e,r,s,a);case\"MAP\":return gmt(t,e,r,s,a)}if(n===null&&!s.isNullable&&s.default!==null)throw new Error(`Non-nullable configuration settings \"${e}\" cannot be set to null`);if(s.values?.includes(n))return n;let f=(()=>{if(s.type===\"BOOLEAN\"&&typeof n!=\"string\")return qB(n);if(typeof n!=\"string\")throw new Error(`Expected configuration setting \"${e}\" to be a string, got ${typeof n}`);let p=Jk(n,{env:t.env});switch(s.type){case\"ABSOLUTE_PATH\":{let h=a,E=fH(r);return E&&E[0]!==\"<\"&&(h=K.dirname(E)),K.resolve(h,ue.toPortablePath(p))}case\"LOCATOR_LOOSE\":return Rp(p,!1);case\"NUMBER\":return parseInt(p);case\"LOCATOR\":return Rp(p);case\"BOOLEAN\":return qB(p);default:return p}})();if(s.values&&!s.values.includes(f))throw new Error(`Invalid value, expected one of ${s.values.join(\", \")}`);return f}function hmt(t,e,r,s,a){let n=sv(r);if(typeof n!=\"object\"||Array.isArray(n))throw new nt(`Object configuration settings \"${e}\" must be an object`);let c=Uj(t,s,{ignoreArrays:!0});if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=`${e}.${f}`;if(!s.properties[f])throw new nt(`Unrecognized configuration settings found: ${e}.${f} - run \"yarn config -v\" to see the list of settings supported in Yarn`);c.set(f,_j(t,h,p,s.properties[f],a))}return c}function gmt(t,e,r,s,a){let n=sv(r),c=new Map;if(typeof n!=\"object\"||Array.isArray(n))throw new nt(`Map configuration settings \"${e}\" must be an object`);if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=s.normalizeKeys?s.normalizeKeys(f):f,E=`${e}['${h}']`,C=s.valueDefinition;c.set(h,_j(t,E,p,C,a))}return c}function Uj(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case\"SHAPE\":{if(e.isArray&&!r)return[];let s=new Map;for(let[a,n]of Object.entries(e.properties))s.set(a,Uj(t,n));return s}case\"MAP\":return e.isArray&&!r?[]:new Map;case\"ABSOLUTE_PATH\":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(s=>K.normalize(s)):K.isAbsolute(e.default)?K.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(s=>K.resolve(t.projectCwd,s)):K.resolve(t.projectCwd,e.default);default:return e.default}}function yT(t,e,r){if(e.type===\"SECRET\"&&typeof t==\"string\"&&r.hideSecrets)return pmt;if(e.type===\"ABSOLUTE_PATH\"&&typeof t==\"string\"&&r.getNativePaths)return ue.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let s=[];for(let a of t)s.push(yT(a,e,r));return s}if(e.type===\"MAP\"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=yT(n,e.valueDefinition,r);typeof c<\"u\"&&s.set(a,c)}return s}if(e.type===\"SHAPE\"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=e.properties[a],f=yT(n,c,r);typeof f<\"u\"&&s.set(a,f)}return s}return t}function dmt(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(ET)&&(e=(0,Rde.default)(e.slice(ET.length)),t[e]=r);return t}function Lj(){let t=`${ET}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r==\"string\")return r;return Mj}async function Tde(t){try{return await le.readFilePromise(t)}catch{return Buffer.of()}}async function mmt(t,e){return Buffer.compare(...await Promise.all([Tde(t),Tde(e)]))===0}async function ymt(t,e){let[r,s]=await Promise.all([le.statPromise(t),le.statPromise(e)]);return r.dev===s.dev&&r.ino===s.ino}async function Imt({configuration:t,selfPath:e}){let r=t.get(\"yarnPath\");return t.get(\"ignorePath\")||r===null||r===e||await Emt(r,e)?null:r}var Rde,Up,Fde,Nde,Ode,Oj,fmt,Ev,Amt,Hp,ET,Mj,pmt,Iv,Lde,IT,mT,Emt,ze,Cv=It(()=>{bt();Bc();Rde=et(lne()),Up=et(Nd());Wt();Fde=et(tie()),Nde=ye(\"module\"),Ode=et(Md()),Oj=ye(\"stream\");phe();oI();nH();iH();sH();Hhe();oH();tm();Yhe();LQ();Qc();I0();pT();kc();gT();Np();Yo();fmt=function(){if(!Up.GITHUB_ACTIONS||!process.env.GITHUB_EVENT_PATH)return!1;let t=ue.toPortablePath(process.env.GITHUB_EVENT_PATH),e;try{e=le.readJsonSync(t)}catch{return!1}return!(!(\"repository\"in e)||!e.repository||(e.repository.private??!0))}(),Ev=new Set([\"@yarnpkg/plugin-constraints\",\"@yarnpkg/plugin-exec\",\"@yarnpkg/plugin-interactive-tools\",\"@yarnpkg/plugin-stage\",\"@yarnpkg/plugin-typescript\",\"@yarnpkg/plugin-version\",\"@yarnpkg/plugin-workspace-tools\"]),Amt=new Set([\"isTestEnv\",\"injectNpmUser\",\"injectNpmPassword\",\"injectNpm2FaToken\",\"zipDataEpilogue\",\"cacheCheckpointOverride\",\"cacheVersionOverride\",\"lockfileVersionOverride\",\"binFolder\",\"version\",\"flags\",\"profile\",\"gpg\",\"ignoreNode\",\"wrapOutput\",\"home\",\"confDir\",\"registry\",\"ignoreCwd\"]),Hp=/^(?!v)[a-z0-9._-]+$/i,ET=\"yarn_\",Mj=\".yarnrc.yml\",pmt=\"********\",Iv=(E=>(E.ANY=\"ANY\",E.BOOLEAN=\"BOOLEAN\",E.ABSOLUTE_PATH=\"ABSOLUTE_PATH\",E.LOCATOR=\"LOCATOR\",E.LOCATOR_LOOSE=\"LOCATOR_LOOSE\",E.NUMBER=\"NUMBER\",E.STRING=\"STRING\",E.SECRET=\"SECRET\",E.SHAPE=\"SHAPE\",E.MAP=\"MAP\",E))(Iv||{}),Lde=Ct,IT=(r=>(r.JUNCTIONS=\"junctions\",r.SYMLINKS=\"symlinks\",r))(IT||{}),mT={lastUpdateCheck:{description:\"Last timestamp we checked whether new Yarn versions were available\",type:\"STRING\",default:null},yarnPath:{description:\"Path to the local executable that must be used over the global one\",type:\"ABSOLUTE_PATH\",default:null},ignorePath:{description:\"If true, the local executable will be ignored when using the global one\",type:\"BOOLEAN\",default:!1},globalFolder:{description:\"Folder where all system-global files are stored\",type:\"ABSOLUTE_PATH\",default:pH()},cacheFolder:{description:\"Folder where the cache files must be written\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/cache\"},compressionLevel:{description:\"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)\",type:\"NUMBER\",values:[\"mixed\",0,1,2,3,4,5,6,7,8,9],default:0},virtualFolder:{description:\"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/__virtual__\"},installStatePath:{description:\"Path of the file where the install state will be persisted\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/install-state.gz\"},immutablePatterns:{description:\"Array of glob patterns; files matching them won't be allowed to change during immutable installs\",type:\"STRING\",default:[],isArray:!0},rcFilename:{description:\"Name of the files where the configuration can be found\",type:\"STRING\",default:Lj()},enableGlobalCache:{description:\"If true, the system-wide cache folder will be used regardless of `cache-folder`\",type:\"BOOLEAN\",default:!0},cacheMigrationMode:{description:\"Defines the conditions under which Yarn upgrades should cause the cache archives to be regenerated.\",type:\"STRING\",values:[\"always\",\"match-spec\",\"required-only\"],default:\"always\"},enableColors:{description:\"If true, the CLI is allowed to use colors in its output\",type:\"BOOLEAN\",default:Xk,defaultText:\"<dynamic>\"},enableHyperlinks:{description:\"If true, the CLI is allowed to use hyperlinks in its output\",type:\"BOOLEAN\",default:E3,defaultText:\"<dynamic>\"},enableInlineBuilds:{description:\"If true, the CLI will print the build output on the command line\",type:\"BOOLEAN\",default:Up.isCI,defaultText:\"<dynamic>\"},enableMessageNames:{description:\"If true, the CLI will prefix most messages with codes suitable for search engines\",type:\"BOOLEAN\",default:!0},enableProgressBars:{description:\"If true, the CLI is allowed to show a progress bar for long-running events\",type:\"BOOLEAN\",default:!Up.isCI,defaultText:\"<dynamic>\"},enableTimers:{description:\"If true, the CLI is allowed to print the time spent executing commands\",type:\"BOOLEAN\",default:!0},enableTips:{description:\"If true, installs will print a helpful message every day of the week\",type:\"BOOLEAN\",default:!Up.isCI,defaultText:\"<dynamic>\"},preferInteractive:{description:\"If true, the CLI will automatically use the interactive mode when called from a TTY\",type:\"BOOLEAN\",default:!1},preferTruncatedLines:{description:\"If true, the CLI will truncate lines that would go beyond the size of the terminal\",type:\"BOOLEAN\",default:!1},progressBarStyle:{description:\"Which style of progress bar should be used (only when progress bars are enabled)\",type:\"STRING\",default:void 0,defaultText:\"<dynamic>\"},defaultLanguageName:{description:\"Default language mode that should be used when a package doesn't offer any insight\",type:\"STRING\",default:\"node\"},defaultProtocol:{description:\"Default resolution protocol used when resolving pure semver and tag ranges\",type:\"STRING\",default:\"npm:\"},enableTransparentWorkspaces:{description:\"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol\",type:\"BOOLEAN\",default:!0},supportedArchitectures:{description:\"Architectures that Yarn will fetch and inject into the resolver\",type:\"SHAPE\",properties:{os:{description:\"Array of supported process.platform strings, or null to target them all\",type:\"STRING\",isArray:!0,isNullable:!0,default:[\"current\"]},cpu:{description:\"Array of supported process.arch strings, or null to target them all\",type:\"STRING\",isArray:!0,isNullable:!0,default:[\"current\"]},libc:{description:\"Array of supported libc libraries, or null to target them all\",type:\"STRING\",isArray:!0,isNullable:!0,default:[\"current\"]}}},enableMirror:{description:\"If true, the downloaded packages will be retrieved and stored in both the local and global folders\",type:\"BOOLEAN\",default:!0},enableNetwork:{description:\"If false, Yarn will refuse to use the network if required to\",type:\"BOOLEAN\",default:!0},enableOfflineMode:{description:\"If true, Yarn will attempt to retrieve files and metadata from the global cache rather than the network\",type:\"BOOLEAN\",default:!1},httpProxy:{description:\"URL of the http proxy that must be used for outgoing http requests\",type:\"STRING\",default:null},httpsProxy:{description:\"URL of the http proxy that must be used for outgoing https requests\",type:\"STRING\",default:null},unsafeHttpWhitelist:{description:\"List of the hostnames for which http queries are allowed (glob patterns are supported)\",type:\"STRING\",default:[],isArray:!0},httpTimeout:{description:\"Timeout of each http request in milliseconds\",type:\"NUMBER\",default:6e4},httpRetry:{description:\"Retry times on http failure\",type:\"NUMBER\",default:3},networkConcurrency:{description:\"Maximal number of concurrent requests\",type:\"NUMBER\",default:50},taskPoolConcurrency:{description:\"Maximal amount of concurrent heavy task processing\",type:\"NUMBER\",default:Rj()},taskPoolMode:{description:\"Execution strategy for heavy tasks\",type:\"STRING\",values:[\"async\",\"workers\"],default:\"workers\"},networkSettings:{description:\"Network settings per hostname (glob patterns are supported)\",type:\"MAP\",valueDefinition:{description:\"\",type:\"SHAPE\",properties:{httpsCaFilePath:{description:\"Path to file containing one or multiple Certificate Authority signing certificates\",type:\"ABSOLUTE_PATH\",default:null},enableNetwork:{description:\"If false, the package manager will refuse to use the network if required to\",type:\"BOOLEAN\",default:null},httpProxy:{description:\"URL of the http proxy that must be used for outgoing http requests\",type:\"STRING\",default:null},httpsProxy:{description:\"URL of the http proxy that must be used for outgoing https requests\",type:\"STRING\",default:null},httpsKeyFilePath:{description:\"Path to file containing private key in PEM format\",type:\"ABSOLUTE_PATH\",default:null},httpsCertFilePath:{description:\"Path to file containing certificate chain in PEM format\",type:\"ABSOLUTE_PATH\",default:null}}}},httpsCaFilePath:{description:\"A path to a file containing one or multiple Certificate Authority signing certificates\",type:\"ABSOLUTE_PATH\",default:null},httpsKeyFilePath:{description:\"Path to file containing private key in PEM format\",type:\"ABSOLUTE_PATH\",default:null},httpsCertFilePath:{description:\"Path to file containing certificate chain in PEM format\",type:\"ABSOLUTE_PATH\",default:null},enableStrictSsl:{description:\"If false, SSL certificate errors will be ignored\",type:\"BOOLEAN\",default:!0},logFilters:{description:\"Overrides for log levels\",type:\"SHAPE\",isArray:!0,concatenateValues:!0,properties:{code:{description:\"Code of the messages covered by this override\",type:\"STRING\",default:void 0},text:{description:\"Code of the texts covered by this override\",type:\"STRING\",default:void 0},pattern:{description:\"Code of the patterns covered by this override\",type:\"STRING\",default:void 0},level:{description:\"Log level override, set to null to remove override\",type:\"STRING\",values:Object.values(eQ),isNullable:!0,default:void 0}}},enableTelemetry:{description:\"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry\",type:\"BOOLEAN\",default:!0},telemetryInterval:{description:\"Minimal amount of time between two telemetry uploads, in days\",type:\"NUMBER\",default:7},telemetryUserId:{description:\"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.\",type:\"STRING\",default:null},enableHardenedMode:{description:\"If true, automatically enable --check-resolutions --refresh-lockfile on installs\",type:\"BOOLEAN\",default:Up.isPR&&fmt,defaultText:\"<true on public PRs>\"},enableScripts:{description:\"If true, packages are allowed to have install scripts by default\",type:\"BOOLEAN\",default:!0},enableStrictSettings:{description:\"If true, unknown settings will cause Yarn to abort\",type:\"BOOLEAN\",default:!0},enableImmutableCache:{description:\"If true, the cache is reputed immutable and actions that would modify it will throw\",type:\"BOOLEAN\",default:!1},enableCacheClean:{description:\"If false, disallows the `cache clean` command\",type:\"BOOLEAN\",default:!0},checksumBehavior:{description:\"Enumeration defining what to do when a checksum doesn't match expectations\",type:\"STRING\",default:\"throw\"},injectEnvironmentFiles:{description:\"List of all the environment files that Yarn should inject inside the process when it starts\",type:\"ABSOLUTE_PATH\",default:[\".env.yarn?\"],isArray:!0},packageExtensions:{description:\"Map of package corrections to apply on the dependency tree\",type:\"MAP\",valueDefinition:{description:\"The extension that will be applied to any package whose version matches the specified range\",type:\"SHAPE\",properties:{dependencies:{description:\"The set of dependencies that must be made available to the current package in order for it to work properly\",type:\"MAP\",valueDefinition:{description:\"A range\",type:\"STRING\"}},peerDependencies:{description:\"Inherited dependencies - the consumer of the package will be tasked to provide them\",type:\"MAP\",valueDefinition:{description:\"A semver range\",type:\"STRING\"}},peerDependenciesMeta:{description:\"Extra information related to the dependencies listed in the peerDependencies field\",type:\"MAP\",valueDefinition:{description:\"The peerDependency meta\",type:\"SHAPE\",properties:{optional:{description:\"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error\",type:\"BOOLEAN\",default:!1}}}}}}}};Emt=process.platform===\"win32\"?mmt:ymt;ze=class t{constructor(e){this.isCI=Up.isCI;this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.env={};this.limits=new Map;this.packageExtensions=null;this.startingCwd=e}static{this.deleteProperty=Symbol()}static{this.telemetry=null}static create(e,r,s){let a=new t(e);typeof r<\"u\"&&!(r instanceof Map)&&(a.projectCwd=r),a.importSettings(mT);let n=typeof s<\"u\"?s:r instanceof Map?r:new Map;for(let[c,f]of n)a.activatePlugin(c,f);return a}static async find(e,r,{strict:s=!0,usePathCheck:a=null,useRc:n=!0}={}){let c=dmt();delete c.rcFilename;let f=new t(e),p=await t.findRcFiles(e),h=await t.findFolderRcFile(AI());h&&(p.find(me=>me.path===h.path)||p.unshift(h));let E=Whe(p.map(ce=>[ce.path,ce.data])),C=vt.dot,S=new Set(Object.keys(mT)),P=({yarnPath:ce,ignorePath:me,injectEnvironmentFiles:pe})=>({yarnPath:ce,ignorePath:me,injectEnvironmentFiles:pe}),I=({yarnPath:ce,ignorePath:me,injectEnvironmentFiles:pe,...Be})=>{let Ce={};for(let[g,we]of Object.entries(Be))S.has(g)&&(Ce[g]=we);return Ce},R=({yarnPath:ce,ignorePath:me,...pe})=>{let Be={};for(let[Ce,g]of Object.entries(pe))S.has(Ce)||(Be[Ce]=g);return Be};if(f.importSettings(P(mT)),f.useWithSource(\"<environment>\",P(c),e,{strict:!1}),E){let[ce,me]=E;f.useWithSource(ce,P(me),C,{strict:!1})}if(a){if(await Imt({configuration:f,selfPath:a})!==null)return f;f.useWithSource(\"<override>\",{ignorePath:!0},e,{strict:!1,overwrite:!0})}let N=await t.findProjectCwd(e);f.startingCwd=e,f.projectCwd=N;let U=Object.assign(Object.create(null),process.env);f.env=U;let W=await Promise.all(f.get(\"injectEnvironmentFiles\").map(async ce=>{let me=ce.endsWith(\"?\")?await le.readFilePromise(ce.slice(0,-1),\"utf8\").catch(()=>\"\"):await le.readFilePromise(ce,\"utf8\");return(0,Fde.parse)(me)}));for(let ce of W)for(let[me,pe]of Object.entries(ce))f.env[me]=Jk(pe,{env:U});if(f.importSettings(I(mT)),f.useWithSource(\"<environment>\",I(c),e,{strict:s}),E){let[ce,me]=E;f.useWithSource(ce,I(me),C,{strict:s})}let te=ce=>\"default\"in ce?ce.default:ce,ie=new Map([[\"@@core\",Ahe]]);if(r!==null)for(let ce of r.plugins.keys())ie.set(ce,te(r.modules.get(ce)));for(let[ce,me]of ie)f.activatePlugin(ce,me);let Ae=new Map([]);if(r!==null){let ce=new Map;for(let[Be,Ce]of r.modules)ce.set(Be,()=>Ce);let me=new Set,pe=async(Be,Ce)=>{let{factory:g,name:we}=kp(Be);if(!g||me.has(we))return;let Ee=new Map(ce),fe=X=>{if((0,Nde.isBuiltin)(X))return kp(X);if(Ee.has(X))return Ee.get(X)();throw new nt(`This plugin cannot access the package referenced via ${X} which is neither a builtin, nor an exposed entry`)},se=await GE(async()=>te(await g(fe)),X=>`${X} (when initializing ${we}, defined in ${Ce})`);ce.set(we,()=>se),me.add(we),Ae.set(we,se)};if(c.plugins)for(let Be of c.plugins.split(\";\")){let Ce=K.resolve(e,ue.toPortablePath(Be));await pe(Ce,\"<environment>\")}for(let{path:Be,cwd:Ce,data:g}of p)if(n&&Array.isArray(g.plugins))for(let we of g.plugins){let Ee=typeof we!=\"string\"?we.path:we,fe=we?.spec??\"\",se=we?.checksum??\"\";if(Ev.has(fe))continue;let X=K.resolve(Ce,ue.toPortablePath(Ee));if(!await le.existsPromise(X)){if(!fe){let gt=Ut(f,K.basename(X,\".cjs\"),Ct.NAME),j=Ut(f,\".gitignore\",Ct.NAME),rt=Ut(f,f.values.get(\"rcFilename\"),Ct.NAME),Fe=Ut(f,\"https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored\",Ct.URL);throw new nt(`Missing source for the ${gt} plugin - please try to remove the plugin from ${rt} then reinstall it manually. This error usually occurs because ${j} is incorrect, check ${Fe} to make sure your plugin folder isn't gitignored.`)}if(!fe.match(/^https?:/)){let gt=Ut(f,K.basename(X,\".cjs\"),Ct.NAME),j=Ut(f,f.values.get(\"rcFilename\"),Ct.NAME);throw new nt(`Failed to recognize the source for the ${gt} plugin - please try to delete the plugin from ${j} then reinstall it manually.`)}let De=await kj(fe,{configuration:f}),Re=us(De);if(se&&se!==Re){let gt=Ut(f,K.basename(X,\".cjs\"),Ct.NAME),j=Ut(f,f.values.get(\"rcFilename\"),Ct.NAME),rt=Ut(f,`yarn plugin import ${fe}`,Ct.CODE);throw new nt(`Failed to fetch the ${gt} plugin from its remote location: its checksum seems to have changed. If this is expected, please remove the plugin from ${j} then run ${rt} to reimport it.`)}await le.mkdirPromise(K.dirname(X),{recursive:!0}),await le.writeFilePromise(X,De)}await pe(X,Be)}}for(let[ce,me]of Ae)f.activatePlugin(ce,me);if(f.useWithSource(\"<environment>\",R(c),e,{strict:s}),E){let[ce,me]=E;f.useWithSource(ce,R(me),C,{strict:s})}return f.get(\"enableGlobalCache\")&&(f.values.set(\"cacheFolder\",`${f.get(\"globalFolder\")}/cache`),f.sources.set(\"cacheFolder\",\"<internal>\")),f}static async findRcFiles(e){let r=Lj(),s=[],a=e,n=null;for(;a!==n;){n=a;let c=K.join(n,r);if(le.existsSync(c)){let f,p;try{p=await le.readFilePromise(c,\"utf8\"),f=ls(p)}catch{let h=\"\";throw p?.match(/^\\s+(?!-)[^:]+\\s+\\S+/m)&&(h=\" (in particular, make sure you list the colons after each key name)\"),new nt(`Parse error when loading ${c}; please check it's proper Yaml${h}`)}s.unshift({path:c,cwd:n,data:f})}a=K.dirname(n)}return s}static async findFolderRcFile(e){let r=K.join(e,Er.rc),s;try{s=await le.readFilePromise(r,\"utf8\")}catch(n){if(n.code===\"ENOENT\")return null;throw n}let a=ls(s);return{path:r,cwd:e,data:a}}static async findProjectCwd(e){let r=null,s=e,a=null;for(;s!==a;){if(a=s,le.existsSync(K.join(a,Er.lockfile)))return a;le.existsSync(K.join(a,Er.manifest))&&(r=a),s=K.dirname(a)}return r}static async updateConfiguration(e,r,s={}){let a=Lj(),n=K.join(e,a),c=le.existsSync(n)?ls(await le.readFilePromise(n,\"utf8\")):{},f=!1,p;if(typeof r==\"function\"){try{p=r(c)}catch{p=r({})}if(p===c)return!1}else{p=c;for(let h of Object.keys(r)){let E=c[h],C=r[h],S;if(typeof C==\"function\")try{S=C(E)}catch{S=C(void 0)}else S=C;E!==S&&(S===t.deleteProperty?delete p[h]:p[h]=S,f=!0)}if(!f)return!1}return await le.changeFilePromise(n,il(p),{automaticNewlines:!0}),!0}static async addPlugin(e,r){r.length!==0&&await t.updateConfiguration(e,s=>{let a=s.plugins??[];if(a.length===0)return{...s,plugins:r};let n=[],c=[...r];for(let f of a){let p=typeof f!=\"string\"?f.path:f,h=c.find(E=>E.path===p);h?(n.push(h),c=c.filter(E=>E!==h)):n.push(f)}return n.push(...c),{...s,plugins:n}})}static async updateHomeConfiguration(e){let r=AI();return await t.updateConfiguration(r,e)}activatePlugin(e,r){this.plugins.set(e,r),typeof r.configuration<\"u\"&&this.importSettings(r.configuration)}importSettings(e){for(let[r,s]of Object.entries(e))if(s!=null){if(this.settings.has(r))throw new Error(`Cannot redefine settings \"${r}\"`);this.settings.set(r,s),this.values.set(r,Uj(this,s))}}useWithSource(e,r,s,a){try{this.use(e,r,s,a)}catch(n){throw n.message+=` (in ${Ut(this,e,Ct.PATH)})`,n}}use(e,r,s,{strict:a=!0,overwrite:n=!1}={}){a=a&&this.get(\"enableStrictSettings\");for(let c of[\"enableStrictSettings\",...Object.keys(r)]){let f=r[c],p=fH(f);if(p&&(e=p),typeof f>\"u\"||c===\"plugins\"||e===\"<environment>\"&&Amt.has(c))continue;if(c===\"rcFilename\")throw new nt(`The rcFilename settings can only be set via ${`${ET}RC_FILENAME`.toUpperCase()}, not via a rc file`);let h=this.settings.get(c);if(!h){let C=AI(),S=e[0]!==\"<\"?K.dirname(e):null;if(a&&!(S!==null?C===S:!1))throw new nt(`Unrecognized or legacy configuration settings found: ${c} - run \"yarn config -v\" to see the list of settings supported in Yarn`);this.invalid.set(c,e);continue}if(this.sources.has(c)&&!(n||h.type===\"MAP\"||h.isArray&&h.concatenateValues))continue;let E;try{E=_j(this,c,f,h,s)}catch(C){throw C.message+=` in ${Ut(this,e,Ct.PATH)}`,C}if(c===\"enableStrictSettings\"&&e!==\"<environment>\"){a=E;continue}if(h.type===\"MAP\"){let C=this.values.get(c);this.values.set(c,new Map(n?[...C,...E]:[...E,...C])),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else if(h.isArray&&h.concatenateValues){let C=this.values.get(c);this.values.set(c,n?[...C,...E]:[...E,...C]),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else this.values.set(c,E),this.sources.set(c,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key \"${e}\"`);return this.values.get(e)}getSpecial(e,{hideSecrets:r=!1,getNativePaths:s=!1}){let a=this.get(e),n=this.settings.get(e);if(typeof n>\"u\")throw new nt(`Couldn't find a configuration settings named \"${e}\"`);return yT(a,n,{hideSecrets:r,getNativePaths:s})}getSubprocessStreams(e,{header:r,prefix:s,report:a}){let n,c,f=le.createWriteStream(e);if(this.get(\"enableInlineBuilds\")){let p=a.createStreamReporter(`${s} ${Ut(this,\"STDOUT\",\"green\")}`),h=a.createStreamReporter(`${s} ${Ut(this,\"STDERR\",\"red\")}`);n=new Oj.PassThrough,n.pipe(p),n.pipe(f),c=new Oj.PassThrough,c.pipe(h),c.pipe(f)}else n=f,c=f,typeof r<\"u\"&&n.write(`${r}\n`);return{stdout:n,stderr:c}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])e.push(new s);return new rm([new FQ,new yi,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])e.push(new s);return new lI([new cI,new uI,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let s of r.linkers||[])e.push(new s);return e}getSupportedArchitectures(){let e=yv(),r=this.get(\"supportedArchitectures\"),s=r.get(\"os\");s!==null&&(s=s.map(c=>c===\"current\"?e.os:c));let a=r.get(\"cpu\");a!==null&&(a=a.map(c=>c===\"current\"?e.cpu:c));let n=r.get(\"libc\");return n!==null&&(n=Yl(n,c=>c===\"current\"?e.libc??Yl.skip:c)),{os:s,cpu:a,libc:n}}isInteractive({interactive:e,stdout:r}){return r.isTTY?e??this.get(\"preferInteractive\"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(s,a,{userProvided:n=!1}={})=>{if(!ul(s.range))throw new Error(\"Only semver ranges are allowed as keys for the packageExtensions setting\");let c=new Ht;c.load(a,{yamlCompatibilityMode:!0});let f=jB(e,s.identHash),p=[];f.push([s.range,p]);let h={status:\"inactive\",userProvided:n,parentDescriptor:s};for(let E of c.dependencies.values())p.push({...h,type:\"Dependency\",descriptor:E});for(let E of c.peerDependencies.values())p.push({...h,type:\"PeerDependency\",descriptor:E});for(let[E,C]of c.peerDependenciesMeta)for(let[S,P]of Object.entries(C))p.push({...h,type:\"PeerDependencyMeta\",selector:E,key:S,value:P})};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,a]of this.get(\"packageExtensions\"))r(C0(s,!0),Kk(a),{userProvided:!0});return e}normalizeLocator(e){return ul(e.reference)?Ys(e,`${this.get(\"defaultProtocol\")}${e.reference}`):Hp.test(e.reference)?Ys(e,`${this.get(\"defaultProtocol\")}${e.reference}`):e}normalizeDependency(e){return ul(e.range)?On(e,`${this.get(\"defaultProtocol\")}${e.range}`):Hp.test(e.range)?On(e,`${this.get(\"defaultProtocol\")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(e,{packageExtensions:r}){let s=zB(e),a=r.get(e.identHash);if(typeof a<\"u\"){let c=e.version;if(c!==null){for(let[f,p]of a)if(eA(c,f))for(let h of p)switch(h.status===\"inactive\"&&(h.status=\"redundant\"),h.type){case\"Dependency\":typeof s.dependencies.get(h.descriptor.identHash)>\"u\"&&(h.status=\"active\",s.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case\"PeerDependency\":typeof s.peerDependencies.get(h.descriptor.identHash)>\"u\"&&(h.status=\"active\",s.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case\"PeerDependencyMeta\":{let E=s.peerDependenciesMeta.get(h.selector);(typeof E>\"u\"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status=\"active\",Vl(s.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:f3(h)}}}let n=c=>c.scope?`${c.scope}__${c.name}`:`${c.name}`;for(let c of s.peerDependenciesMeta.keys()){let f=Da(c);s.peerDependencies.has(f.identHash)||s.peerDependencies.set(f.identHash,On(f,\"*\"))}for(let c of s.peerDependencies.values()){if(c.scope===\"types\")continue;let f=n(c),p=ba(\"types\",f),h=cn(p);s.peerDependencies.has(p.identHash)||s.peerDependenciesMeta.has(h)||(s.peerDependencies.set(p.identHash,On(p,\"*\")),s.peerDependenciesMeta.set(h,{optional:!0}))}return s.dependencies=new Map(Ws(s.dependencies,([,c])=>ll(c))),s.peerDependencies=new Map(Ws(s.peerDependencies,([,c])=>ll(c))),s}getLimit(e){return Vl(this.limits,e,()=>(0,Ode.default)(this.get(e)))}async triggerHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);n&&await n(...r)}}async triggerMultipleHooks(e,r){for(let s of r)await this.triggerHook(e,...s)}async reduceHook(e,r,...s){let a=r;for(let n of this.plugins.values()){let c=n.hooks;if(!c)continue;let f=e(c);f&&(a=await f(a,...s))}return a}async firstHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);if(!n)continue;let c=await n(...r);if(typeof c<\"u\")return c}return null}}});var Gr={};Vt(Gr,{EndStrategy:()=>Gj,ExecError:()=>CT,PipeError:()=>wv,execvp:()=>Fj,pipevp:()=>Yu});function om(t){return t!==null&&typeof t.fd==\"number\"}function Hj(){}function jj(){for(let t of am)t.kill()}async function Yu(t,e,{cwd:r,env:s=process.env,strict:a=!1,stdin:n=null,stdout:c,stderr:f,end:p=2}){let h=[\"pipe\",\"pipe\",\"pipe\"];n===null?h[0]=\"ignore\":om(n)&&(h[0]=n),om(c)&&(h[1]=c),om(f)&&(h[2]=f);let E=(0,qj.default)(t,e,{cwd:ue.fromPortablePath(r),env:{...s,PWD:ue.fromPortablePath(r)},stdio:h});am.add(E),am.size===1&&(process.on(\"SIGINT\",Hj),process.on(\"SIGTERM\",jj)),!om(n)&&n!==null&&n.pipe(E.stdin),om(c)||E.stdout.pipe(c,{end:!1}),om(f)||E.stderr.pipe(f,{end:!1});let C=()=>{for(let S of new Set([c,f]))om(S)||S.end()};return new Promise((S,P)=>{E.on(\"error\",I=>{am.delete(E),am.size===0&&(process.off(\"SIGINT\",Hj),process.off(\"SIGTERM\",jj)),(p===2||p===1)&&C(),P(I)}),E.on(\"close\",(I,R)=>{am.delete(E),am.size===0&&(process.off(\"SIGINT\",Hj),process.off(\"SIGTERM\",jj)),(p===2||p===1&&I!==0)&&C(),I===0||!a?S({code:Wj(I,R)}):P(new wv({fileName:t,code:I,signal:R}))})})}async function Fj(t,e,{cwd:r,env:s=process.env,encoding:a=\"utf8\",strict:n=!1}){let c=[\"ignore\",\"pipe\",\"pipe\"],f=[],p=[],h=ue.fromPortablePath(r);typeof s.PWD<\"u\"&&(s={...s,PWD:h});let E=(0,qj.default)(t,e,{cwd:h,env:s,stdio:c});return E.stdout.on(\"data\",C=>{f.push(C)}),E.stderr.on(\"data\",C=>{p.push(C)}),await new Promise((C,S)=>{E.on(\"error\",P=>{let I=ze.create(r),R=Ut(I,t,Ct.PATH);S(new Yt(1,`Process ${R} failed to spawn`,N=>{N.reportError(1,`  ${Zf(I,{label:\"Thrown Error\",value:Hu(Ct.NO_HINT,P.message)})}`)}))}),E.on(\"close\",(P,I)=>{let R=a===\"buffer\"?Buffer.concat(f):Buffer.concat(f).toString(a),N=a===\"buffer\"?Buffer.concat(p):Buffer.concat(p).toString(a);P===0||!n?C({code:Wj(P,I),stdout:R,stderr:N}):S(new CT({fileName:t,code:P,signal:I,stdout:R,stderr:N}))})})}function Wj(t,e){let r=Cmt.get(e);return typeof r<\"u\"?128+r:t??1}function wmt(t,e,{configuration:r,report:s}){s.reportError(1,`  ${Zf(r,t!==null?{label:\"Exit Code\",value:Hu(Ct.NUMBER,t)}:{label:\"Exit Signal\",value:Hu(Ct.CODE,e)})}`)}var qj,Gj,wv,CT,am,Cmt,dT=It(()=>{bt();qj=et(J_());Cv();Fc();Qc();Gj=(s=>(s[s.Never=0]=\"Never\",s[s.ErrorCode=1]=\"ErrorCode\",s[s.Always=2]=\"Always\",s))(Gj||{}),wv=class extends Yt{constructor({fileName:e,code:r,signal:s}){let a=ze.create(K.cwd()),n=Ut(a,e,Ct.PATH);super(1,`Child ${n} reported an error`,c=>{wmt(r,s,{configuration:a,report:c})}),this.code=Wj(r,s)}},CT=class extends wv{constructor({fileName:e,code:r,signal:s,stdout:a,stderr:n}){super({fileName:e,code:r,signal:s}),this.stdout=a,this.stderr=n}};am=new Set;Cmt=new Map([[\"SIGINT\",2],[\"SIGQUIT\",3],[\"SIGKILL\",9],[\"SIGTERM\",15]])});function _de(t){Mde=t}function Bv(){return typeof Yj>\"u\"&&(Yj=Mde()),Yj}var Yj,Mde,Vj=It(()=>{Mde=()=>{throw new Error(\"Assertion failed: No libzip instance is available, and no factory was configured\")}});var Ude=L((wT,Jj)=>{var Bmt=Object.assign({},ye(\"fs\")),Kj=function(){var t=typeof document<\"u\"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<\"u\"&&(t=t||__filename),function(e){e=e||{};var r=typeof e<\"u\"?e:{},s,a;r.ready=new Promise(function(Je,st){s=Je,a=st});var n={},c;for(c in r)r.hasOwnProperty(c)&&(n[c]=r[c]);var f=[],p=\"./this.program\",h=function(Je,st){throw st},E=!1,C=!0,S=\"\";function P(Je){return r.locateFile?r.locateFile(Je,S):S+Je}var I,R,N,U;C&&(E?S=ye(\"path\").dirname(S)+\"/\":S=__dirname+\"/\",I=function(st,St){var lr=Me(st);return lr?St?lr:lr.toString():(N||(N=Bmt),U||(U=ye(\"path\")),st=U.normalize(st),N.readFileSync(st,St?null:\"utf8\"))},R=function(st){var St=I(st,!0);return St.buffer||(St=new Uint8Array(St)),we(St.buffer),St},process.argv.length>1&&(p=process.argv[1].replace(/\\\\/g,\"/\")),f=process.argv.slice(2),h=function(Je){process.exit(Je)},r.inspect=function(){return\"[Emscripten Module object]\"});var W=r.print||console.log.bind(console),te=r.printErr||console.warn.bind(console);for(c in n)n.hasOwnProperty(c)&&(r[c]=n[c]);n=null,r.arguments&&(f=r.arguments),r.thisProgram&&(p=r.thisProgram),r.quit&&(h=r.quit);var ie=0,Ae=function(Je){ie=Je},ce;r.wasmBinary&&(ce=r.wasmBinary);var me=r.noExitRuntime||!0;typeof WebAssembly!=\"object\"&&rs(\"no native wasm support detected\");function pe(Je,st,St){switch(st=st||\"i8\",st.charAt(st.length-1)===\"*\"&&(st=\"i32\"),st){case\"i1\":return Ye[Je>>0];case\"i8\":return Ye[Je>>0];case\"i16\":return Ih((Je>>1)*2);case\"i32\":return ro((Je>>2)*4);case\"i64\":return ro((Je>>2)*4);case\"float\":return pf((Je>>2)*4);case\"double\":return Eh((Je>>3)*8);default:rs(\"invalid type for getValue: \"+st)}return null}var Be,Ce=!1,g;function we(Je,st){Je||rs(\"Assertion failed: \"+st)}function Ee(Je){var st=r[\"_\"+Je];return we(st,\"Cannot call unknown function \"+Je+\", make sure it is exported\"),st}function fe(Je,st,St,lr,ee){var Ie={string:function(qi){var Tn=0;if(qi!=null&&qi!==0){var Ga=(qi.length<<2)+1;Tn=wi(Ga),gt(qi,Tn,Ga)}return Tn},array:function(qi){var Tn=wi(qi.length);return Fe(qi,Tn),Tn}};function Oe(qi){return st===\"string\"?De(qi):st===\"boolean\"?!!qi:qi}var ht=Ee(Je),mt=[],Dt=0;if(lr)for(var tr=0;tr<lr.length;tr++){var fn=Ie[St[tr]];fn?(Dt===0&&(Dt=df()),mt[tr]=fn(lr[tr])):mt[tr]=lr[tr]}var ai=ht.apply(null,mt);return ai=Oe(ai),Dt!==0&&Ac(Dt),ai}function se(Je,st,St,lr){St=St||[];var ee=St.every(function(Oe){return Oe===\"number\"}),Ie=st!==\"string\";return Ie&&ee&&!lr?Ee(Je):function(){return fe(Je,st,St,arguments,lr)}}var X=new TextDecoder(\"utf8\");function De(Je,st){if(!Je)return\"\";for(var St=Je+st,lr=Je;!(lr>=St)&&ke[lr];)++lr;return X.decode(ke.subarray(Je,lr))}function Re(Je,st,St,lr){if(!(lr>0))return 0;for(var ee=St,Ie=St+lr-1,Oe=0;Oe<Je.length;++Oe){var ht=Je.charCodeAt(Oe);if(ht>=55296&&ht<=57343){var mt=Je.charCodeAt(++Oe);ht=65536+((ht&1023)<<10)|mt&1023}if(ht<=127){if(St>=Ie)break;st[St++]=ht}else if(ht<=2047){if(St+1>=Ie)break;st[St++]=192|ht>>6,st[St++]=128|ht&63}else if(ht<=65535){if(St+2>=Ie)break;st[St++]=224|ht>>12,st[St++]=128|ht>>6&63,st[St++]=128|ht&63}else{if(St+3>=Ie)break;st[St++]=240|ht>>18,st[St++]=128|ht>>12&63,st[St++]=128|ht>>6&63,st[St++]=128|ht&63}}return st[St]=0,St-ee}function gt(Je,st,St){return Re(Je,ke,st,St)}function j(Je){for(var st=0,St=0;St<Je.length;++St){var lr=Je.charCodeAt(St);lr>=55296&&lr<=57343&&(lr=65536+((lr&1023)<<10)|Je.charCodeAt(++St)&1023),lr<=127?++st:lr<=2047?st+=2:lr<=65535?st+=3:st+=4}return st}function rt(Je){var st=j(Je)+1,St=Ma(st);return St&&Re(Je,Ye,St,st),St}function Fe(Je,st){Ye.set(Je,st)}function Ne(Je,st){return Je%st>0&&(Je+=st-Je%st),Je}var Pe,Ye,ke,it,_e,x,w,b,y,F;function z(Je){Pe=Je,r.HEAP_DATA_VIEW=F=new DataView(Je),r.HEAP8=Ye=new Int8Array(Je),r.HEAP16=it=new Int16Array(Je),r.HEAP32=x=new Int32Array(Je),r.HEAPU8=ke=new Uint8Array(Je),r.HEAPU16=_e=new Uint16Array(Je),r.HEAPU32=w=new Uint32Array(Je),r.HEAPF32=b=new Float32Array(Je),r.HEAPF64=y=new Float64Array(Je)}var Z=r.INITIAL_MEMORY||16777216,$,oe=[],xe=[],Te=[],lt=!1;function Et(){if(r.preRun)for(typeof r.preRun==\"function\"&&(r.preRun=[r.preRun]);r.preRun.length;)Pt(r.preRun.shift());Rs(oe)}function qt(){lt=!0,Rs(xe)}function ir(){if(r.postRun)for(typeof r.postRun==\"function\"&&(r.postRun=[r.postRun]);r.postRun.length;)Pr(r.postRun.shift());Rs(Te)}function Pt(Je){oe.unshift(Je)}function gn(Je){xe.unshift(Je)}function Pr(Je){Te.unshift(Je)}var Ir=0,Nr=null,nn=null;function oi(Je){Ir++,r.monitorRunDependencies&&r.monitorRunDependencies(Ir)}function wo(Je){if(Ir--,r.monitorRunDependencies&&r.monitorRunDependencies(Ir),Ir==0&&(Nr!==null&&(clearInterval(Nr),Nr=null),nn)){var st=nn;nn=null,st()}}r.preloadedImages={},r.preloadedAudios={};function rs(Je){r.onAbort&&r.onAbort(Je),Je+=\"\",te(Je),Ce=!0,g=1,Je=\"abort(\"+Je+\"). Build with -s ASSERTIONS=1 for more info.\";var st=new WebAssembly.RuntimeError(Je);throw a(st),st}var eo=\"data:application/octet-stream;base64,\";function Bo(Je){return Je.startsWith(eo)}var Hi=\"data:application/octet-stream;base64,AGFzbQEAAAAB/wEkYAN/f38Bf2ABfwF/YAJ/fwF/YAF/AGAEf39/fwF/YAN/f38AYAV/f39/fwF/YAJ/fwBgBH9/f38AYAABf2AFf39/fn8BfmAEf35/fwF/YAR/f35/AX5gAn9+AX9gA398fwBgA39/fgF/YAF/AX5gBn9/f39/fwF/YAN/fn8Bf2AEf39/fwF+YAV/f35/fwF/YAR/f35/AX9gA39/fgF+YAJ/fgBgAn9/AX5gBX9/f39/AGADf35/AX5gBX5+f35/AX5gA39/fwF+YAZ/fH9/f38Bf2AAAGAHf35/f39+fwF/YAV/fn9/fwF/YAV/f39/fwF+YAJ+fwF/YAJ/fAACJQYBYQFhAAMBYQFiAAEBYQFjAAABYQFkAAEBYQFlAAIBYQFmAAED5wHlAQMAAwEDAwEHDAgDFgcNEgEDDRcFAQ8DEAUQAwIBAhgECxkEAQMBBQsFAwMDARACBAMAAggLBwEAAwADGgQDGwYGABwBBgMTFBEHBwcVCx4ABAgHBAICAgAfAQICAgIGFSAAIQAiAAIBBgIHAg0LEw0FAQUCACMDAQAUAAAGBQECBQUDCwsSAgEDBQIHAQEICAACCQQEAQABCAEBCQoBAwkBAQEBBgEGBgYABAIEBAQGEQQEAAARAAEDCQEJAQAJCQkBAQECCgoAAAMPAQEBAwACAgICBQIABwAKBgwHAAADAgICBQEEBQFwAT8/BQcBAYACgIACBgkBfwFBgInBAgsH+gEzAWcCAAFoAFQBaQDqAQFqALsBAWsAwQEBbACpAQFtAKgBAW4ApwEBbwClAQFwAKMBAXEAoAEBcgCbAQFzAMABAXQAugEBdQC5AQF2AEsBdwDiAQF4AMgBAXkAxwEBegDCAQFBAMkBAUIAuAEBQwAGAUQACQFFAKYBAUYAtwEBRwC2AQFIALUBAUkAtAEBSgCzAQFLALIBAUwAsQEBTQCwAQFOAK8BAU8AvAEBUACuAQFRAK0BAVIArAEBUwAaAVQACwFVAKQBAVYAMgFXAQABWACrAQFZAKoBAVoAxgEBXwDFAQEkAMQBAmFhAL8BAmJhAL4BAmNhAL0BCXgBAEEBCz6iAeMBjgGQAVpbjwFYnwGdAVeeAV1coQFZVlWcAZoBmQGYAZcBlgGVAZQBkwGSAZEB6QHoAecB5gHlAeQB4QHfAeAB3gHdAdwB2gHbAYUB2QHYAdcB1gHVAdQB0wHSAdEB0AHPAc4BzQHMAcsBygE4wwEK1N8G5QHMDAEHfwJAIABFDQAgAEEIayIDIABBBGsoAgAiAUF4cSIAaiEFAkAgAUEBcQ0AIAFBA3FFDQEgAyADKAIAIgFrIgNBxIQBKAIASQ0BIAAgAWohACADQciEASgCAEcEQCABQf8BTQRAIAMoAggiAiABQQN2IgRBA3RB3IQBakYaIAIgAygCDCIBRgRAQbSEAUG0hAEoAgBBfiAEd3E2AgAMAwsgAiABNgIMIAEgAjYCCAwCCyADKAIYIQYCQCADIAMoAgwiAUcEQCADKAIIIgIgATYCDCABIAI2AggMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEBDAELA0AgAiEHIAQiAUEUaiICKAIAIgQNACABQRBqIQIgASgCECIEDQALIAdBADYCAAsgBkUNAQJAIAMgAygCHCICQQJ0QeSGAWoiBCgCAEYEQCAEIAE2AgAgAQ0BQbiEAUG4hAEoAgBBfiACd3E2AgAMAwsgBkEQQRQgBigCECADRhtqIAE2AgAgAUUNAgsgASAGNgIYIAMoAhAiAgRAIAEgAjYCECACIAE2AhgLIAMoAhQiAkUNASABIAI2AhQgAiABNgIYDAELIAUoAgQiAUEDcUEDRw0AQbyEASAANgIAIAUgAUF+cTYCBCADIABBAXI2AgQgACADaiAANgIADwsgAyAFTw0AIAUoAgQiAUEBcUUNAAJAIAFBAnFFBEAgBUHMhAEoAgBGBEBBzIQBIAM2AgBBwIQBQcCEASgCACAAaiIANgIAIAMgAEEBcjYCBCADQciEASgCAEcNA0G8hAFBADYCAEHIhAFBADYCAA8LIAVByIQBKAIARgRAQciEASADNgIAQbyEAUG8hAEoAgAgAGoiADYCACADIABBAXI2AgQgACADaiAANgIADwsgAUF4cSAAaiEAAkAgAUH/AU0EQCAFKAIIIgIgAUEDdiIEQQN0QdyEAWpGGiACIAUoAgwiAUYEQEG0hAFBtIQBKAIAQX4gBHdxNgIADAILIAIgATYCDCABIAI2AggMAQsgBSgCGCEGAkAgBSAFKAIMIgFHBEAgBSgCCCICQcSEASgCAEkaIAIgATYCDCABIAI2AggMAQsCQCAFQRRqIgIoAgAiBA0AIAVBEGoiAigCACIEDQBBACEBDAELA0AgAiEHIAQiAUEUaiICKAIAIgQNACABQRBqIQIgASgCECIEDQALIAdBADYCAAsgBkUNAAJAIAUgBSgCHCICQQJ0QeSGAWoiBCgCAEYEQCAEIAE2AgAgAQ0BQbiEAUG4hAEoAgBBfiACd3E2AgAMAgsgBkEQQRQgBigCECAFRhtqIAE2AgAgAUUNAQsgASAGNgIYIAUoAhAiAgRAIAEgAjYCECACIAE2AhgLIAUoAhQiAkUNACABIAI2AhQgAiABNgIYCyADIABBAXI2AgQgACADaiAANgIAIANByIQBKAIARw0BQbyEASAANgIADwsgBSABQX5xNgIEIAMgAEEBcjYCBCAAIANqIAA2AgALIABB/wFNBEAgAEEDdiIBQQN0QdyEAWohAAJ/QbSEASgCACICQQEgAXQiAXFFBEBBtIQBIAEgAnI2AgAgAAwBCyAAKAIICyECIAAgAzYCCCACIAM2AgwgAyAANgIMIAMgAjYCCA8LQR8hAiADQgA3AhAgAEH///8HTQRAIABBCHYiASABQYD+P2pBEHZBCHEiAXQiAiACQYDgH2pBEHZBBHEiAnQiBCAEQYCAD2pBEHZBAnEiBHRBD3YgASACciAEcmsiAUEBdCAAIAFBFWp2QQFxckEcaiECCyADIAI2AhwgAkECdEHkhgFqIQECQAJAAkBBuIQBKAIAIgRBASACdCIHcUUEQEG4hAEgBCAHcjYCACABIAM2AgAgAyABNgIYDAELIABBAEEZIAJBAXZrIAJBH0YbdCECIAEoAgAhAQNAIAEiBCgCBEF4cSAARg0CIAJBHXYhASACQQF0IQIgBCABQQRxaiIHQRBqKAIAIgENAAsgByADNgIQIAMgBDYCGAsgAyADNgIMIAMgAzYCCAwBCyAEKAIIIgAgAzYCDCAEIAM2AgggA0EANgIYIAMgBDYCDCADIAA2AggLQdSEAUHUhAEoAgBBAWsiAEF/IAAbNgIACwuDBAEDfyACQYAETwRAIAAgASACEAIaIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAEEDcUUEQCAAIQIMAQsgAkEBSARAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAkEDcUUNASACIANJDQALCwJAIANBfHEiBEHAAEkNACACIARBQGoiBUsNAANAIAIgASgCADYCACACIAEoAgQ2AgQgAiABKAIINgIIIAIgASgCDDYCDCACIAEoAhA2AhAgAiABKAIUNgIUIAIgASgCGDYCGCACIAEoAhw2AhwgAiABKAIgNgIgIAIgASgCJDYCJCACIAEoAig2AiggAiABKAIsNgIsIAIgASgCMDYCMCACIAEoAjQ2AjQgAiABKAI4NgI4IAIgASgCPDYCPCABQUBrIQEgAkFAayICIAVNDQALCyACIARPDQEDQCACIAEoAgA2AgAgAUEEaiEBIAJBBGoiAiAESQ0ACwwBCyADQQRJBEAgACECDAELIAAgA0EEayIESwRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAiABLQABOgABIAIgAS0AAjoAAiACIAEtAAM6AAMgAUEEaiEBIAJBBGoiAiAETQ0ACwsgAiADSQRAA0AgAiABLQAAOgAAIAFBAWohASACQQFqIgIgA0cNAAsLIAALGgAgAARAIAAtAAEEQCAAKAIEEAYLIAAQBgsLoi4BDH8jAEEQayIMJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEH0AU0EQEG0hAEoAgAiBUEQIABBC2pBeHEgAEELSRsiCEEDdiICdiIBQQNxBEAgAUF/c0EBcSACaiIDQQN0IgFB5IQBaigCACIEQQhqIQACQCAEKAIIIgIgAUHchAFqIgFGBEBBtIQBIAVBfiADd3E2AgAMAQsgAiABNgIMIAEgAjYCCAsgBCADQQN0IgFBA3I2AgQgASAEaiIBIAEoAgRBAXI2AgQMDQsgCEG8hAEoAgAiCk0NASABBEACQEECIAJ0IgBBACAAa3IgASACdHEiAEEAIABrcUEBayIAIABBDHZBEHEiAnYiAUEFdkEIcSIAIAJyIAEgAHYiAUECdkEEcSIAciABIAB2IgFBAXZBAnEiAHIgASAAdiIBQQF2QQFxIgByIAEgAHZqIgNBA3QiAEHkhAFqKAIAIgQoAggiASAAQdyEAWoiAEYEQEG0hAEgBUF+IAN3cSIFNgIADAELIAEgADYCDCAAIAE2AggLIARBCGohACAEIAhBA3I2AgQgBCAIaiICIANBA3QiASAIayIDQQFyNgIEIAEgBGogAzYCACAKBEAgCkEDdiIBQQN0QdyEAWohB0HIhAEoAgAhBAJ/IAVBASABdCIBcUUEQEG0hAEgASAFcjYCACAHDAELIAcoAggLIQEgByAENgIIIAEgBDYCDCAEIAc2AgwgBCABNgIIC0HIhAEgAjYCAEG8hAEgAzYCAAwNC0G4hAEoAgAiBkUNASAGQQAgBmtxQQFrIgAgAEEMdkEQcSICdiIBQQV2QQhxIgAgAnIgASAAdiIBQQJ2QQRxIgByIAEgAHYiAUEBdkECcSIAciABIAB2IgFBAXZBAXEiAHIgASAAdmpBAnRB5IYBaigCACIBKAIEQXhxIAhrIQMgASECA0ACQCACKAIQIgBFBEAgAigCFCIARQ0BCyAAKAIEQXhxIAhrIgIgAyACIANJIgIbIQMgACABIAIbIQEgACECDAELCyABIAhqIgkgAU0NAiABKAIYIQsgASABKAIMIgRHBEAgASgCCCIAQcSEASgCAEkaIAAgBDYCDCAEIAA2AggMDAsgAUEUaiICKAIAIgBFBEAgASgCECIARQ0EIAFBEGohAgsDQCACIQcgACIEQRRqIgIoAgAiAA0AIARBEGohAiAEKAIQIgANAAsgB0EANgIADAsLQX8hCCAAQb9/Sw0AIABBC2oiAEF4cSEIQbiEASgCACIJRQ0AQQAgCGshAwJAAkACQAJ/QQAgCEGAAkkNABpBHyAIQf///wdLDQAaIABBCHYiACAAQYD+P2pBEHZBCHEiAnQiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASACciAAcmsiAEEBdCAIIABBFWp2QQFxckEcagsiBUECdEHkhgFqKAIAIgJFBEBBACEADAELQQAhACAIQQBBGSAFQQF2ayAFQR9GG3QhAQNAAkAgAigCBEF4cSAIayIHIANPDQAgAiEEIAciAw0AQQAhAyACIQAMAwsgACACKAIUIgcgByACIAFBHXZBBHFqKAIQIgJGGyAAIAcbIQAgAUEBdCEBIAINAAsLIAAgBHJFBEBBAiAFdCIAQQAgAGtyIAlxIgBFDQMgAEEAIABrcUEBayIAIABBDHZBEHEiAnYiAUEFdkEIcSIAIAJyIAEgAHYiAUECdkEEcSIAciABIAB2IgFBAXZBAnEiAHIgASAAdiIBQQF2QQFxIgByIAEgAHZqQQJ0QeSGAWooAgAhAAsgAEUNAQsDQCAAKAIEQXhxIAhrIgEgA0khAiABIAMgAhshAyAAIAQgAhshBCAAKAIQIgEEfyABBSAAKAIUCyIADQALCyAERQ0AIANBvIQBKAIAIAhrTw0AIAQgCGoiBiAETQ0BIAQoAhghBSAEIAQoAgwiAUcEQCAEKAIIIgBBxIQBKAIASRogACABNgIMIAEgADYCCAwKCyAEQRRqIgIoAgAiAEUEQCAEKAIQIgBFDQQgBEEQaiECCwNAIAIhByAAIgFBFGoiAigCACIADQAgAUEQaiECIAEoAhAiAA0ACyAHQQA2AgAMCQsgCEG8hAEoAgAiAk0EQEHIhAEoAgAhAwJAIAIgCGsiAUEQTwRAQbyEASABNgIAQciEASADIAhqIgA2AgAgACABQQFyNgIEIAIgA2ogATYCACADIAhBA3I2AgQMAQtByIQBQQA2AgBBvIQBQQA2AgAgAyACQQNyNgIEIAIgA2oiACAAKAIEQQFyNgIECyADQQhqIQAMCwsgCEHAhAEoAgAiBkkEQEHAhAEgBiAIayIBNgIAQcyEAUHMhAEoAgAiAiAIaiIANgIAIAAgAUEBcjYCBCACIAhBA3I2AgQgAkEIaiEADAsLQQAhACAIQS9qIgkCf0GMiAEoAgAEQEGUiAEoAgAMAQtBmIgBQn83AgBBkIgBQoCggICAgAQ3AgBBjIgBIAxBDGpBcHFB2KrVqgVzNgIAQaCIAUEANgIAQfCHAUEANgIAQYAgCyIBaiIFQQAgAWsiB3EiAiAITQ0KQeyHASgCACIEBEBB5IcBKAIAIgMgAmoiASADTQ0LIAEgBEsNCwtB8IcBLQAAQQRxDQUCQAJAQcyEASgCACIDBEBB9IcBIQADQCADIAAoAgAiAU8EQCABIAAoAgRqIANLDQMLIAAoAggiAA0ACwtBABApIgFBf0YNBiACIQVBkIgBKAIAIgNBAWsiACABcQRAIAIgAWsgACABakEAIANrcWohBQsgBSAITQ0GIAVB/v///wdLDQZB7IcBKAIAIgQEQEHkhwEoAgAiAyAFaiIAIANNDQcgACAESw0HCyAFECkiACABRw0BDAgLIAUgBmsgB3EiBUH+////B0sNBSAFECkiASAAKAIAIAAoAgRqRg0EIAEhAAsCQCAAQX9GDQAgCEEwaiAFTQ0AQZSIASgCACIBIAkgBWtqQQAgAWtxIgFB/v///wdLBEAgACEBDAgLIAEQKUF/RwRAIAEgBWohBSAAIQEMCAtBACAFaxApGgwFCyAAIgFBf0cNBgwECwALQQAhBAwHC0EAIQEMBQsgAUF/Rw0CC0HwhwFB8IcBKAIAQQRyNgIACyACQf7///8HSw0BIAIQKSEBQQAQKSEAIAFBf0YNASAAQX9GDQEgACABTQ0BIAAgAWsiBSAIQShqTQ0BC0HkhwFB5IcBKAIAIAVqIgA2AgBB6IcBKAIAIABJBEBB6IcBIAA2AgALAkACQAJAQcyEASgCACIHBEBB9IcBIQADQCABIAAoAgAiAyAAKAIEIgJqRg0CIAAoAggiAA0ACwwCC0HEhAEoAgAiAEEAIAAgAU0bRQRAQcSEASABNgIAC0EAIQBB+IcBIAU2AgBB9IcBIAE2AgBB1IQBQX82AgBB2IQBQYyIASgCADYCAEGAiAFBADYCAANAIABBA3QiA0HkhAFqIANB3IQBaiICNgIAIANB6IQBaiACNgIAIABBAWoiAEEgRw0AC0HAhAEgBUEoayIDQXggAWtBB3FBACABQQhqQQdxGyIAayICNgIAQcyEASAAIAFqIgA2AgAgACACQQFyNgIEIAEgA2pBKDYCBEHQhAFBnIgBKAIANgIADAILIAAtAAxBCHENACADIAdLDQAgASAHTQ0AIAAgAiAFajYCBEHMhAEgB0F4IAdrQQdxQQAgB0EIakEHcRsiAGoiAjYCAEHAhAFBwIQBKAIAIAVqIgEgAGsiADYCACACIABBAXI2AgQgASAHakEoNgIEQdCEAUGciAEoAgA2AgAMAQtBxIQBKAIAIAFLBEBBxIQBIAE2AgALIAEgBWohAkH0hwEhAAJAAkACQAJAAkACQANAIAIgACgCAEcEQCAAKAIIIgANAQwCCwsgAC0ADEEIcUUNAQtB9IcBIQADQCAHIAAoAgAiAk8EQCACIAAoAgRqIgQgB0sNAwsgACgCCCEADAALAAsgACABNgIAIAAgACgCBCAFajYCBCABQXggAWtBB3FBACABQQhqQQdxG2oiCSAIQQNyNgIEIAJBeCACa0EHcUEAIAJBCGpBB3EbaiIFIAggCWoiBmshAiAFIAdGBEBBzIQBIAY2AgBBwIQBQcCEASgCACACaiIANgIAIAYgAEEBcjYCBAwDCyAFQciEASgCAEYEQEHIhAEgBjYCAEG8hAFBvIQBKAIAIAJqIgA2AgAgBiAAQQFyNgIEIAAgBmogADYCAAwDCyAFKAIEIgBBA3FBAUYEQCAAQXhxIQcCQCAAQf8BTQRAIAUoAggiAyAAQQN2IgBBA3RB3IQBakYaIAMgBSgCDCIBRgRAQbSEAUG0hAEoAgBBfiAAd3E2AgAMAgsgAyABNgIMIAEgAzYCCAwBCyAFKAIYIQgCQCAFIAUoAgwiAUcEQCAFKAIIIgAgATYCDCABIAA2AggMAQsCQCAFQRRqIgAoAgAiAw0AIAVBEGoiACgCACIDDQBBACEBDAELA0AgACEEIAMiAUEUaiIAKAIAIgMNACABQRBqIQAgASgCECIDDQALIARBADYCAAsgCEUNAAJAIAUgBSgCHCIDQQJ0QeSGAWoiACgCAEYEQCAAIAE2AgAgAQ0BQbiEAUG4hAEoAgBBfiADd3E2AgAMAgsgCEEQQRQgCCgCECAFRhtqIAE2AgAgAUUNAQsgASAINgIYIAUoAhAiAARAIAEgADYCECAAIAE2AhgLIAUoAhQiAEUNACABIAA2AhQgACABNgIYCyAFIAdqIQUgAiAHaiECCyAFIAUoAgRBfnE2AgQgBiACQQFyNgIEIAIgBmogAjYCACACQf8BTQRAIAJBA3YiAEEDdEHchAFqIQICf0G0hAEoAgAiAUEBIAB0IgBxRQRAQbSEASAAIAFyNgIAIAIMAQsgAigCCAshACACIAY2AgggACAGNgIMIAYgAjYCDCAGIAA2AggMAwtBHyEAIAJB////B00EQCACQQh2IgAgAEGA/j9qQRB2QQhxIgN0IgAgAEGA4B9qQRB2QQRxIgF0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAEgA3IgAHJrIgBBAXQgAiAAQRVqdkEBcXJBHGohAAsgBiAANgIcIAZCADcCECAAQQJ0QeSGAWohBAJAQbiEASgCACIDQQEgAHQiAXFFBEBBuIQBIAEgA3I2AgAgBCAGNgIAIAYgBDYCGAwBCyACQQBBGSAAQQF2ayAAQR9GG3QhACAEKAIAIQEDQCABIgMoAgRBeHEgAkYNAyAAQR12IQEgAEEBdCEAIAMgAUEEcWoiBCgCECIBDQALIAQgBjYCECAGIAM2AhgLIAYgBjYCDCAGIAY2AggMAgtBwIQBIAVBKGsiA0F4IAFrQQdxQQAgAUEIakEHcRsiAGsiAjYCAEHMhAEgACABaiIANgIAIAAgAkEBcjYCBCABIANqQSg2AgRB0IQBQZyIASgCADYCACAHIARBJyAEa0EHcUEAIARBJ2tBB3EbakEvayIAIAAgB0EQakkbIgJBGzYCBCACQfyHASkCADcCECACQfSHASkCADcCCEH8hwEgAkEIajYCAEH4hwEgBTYCAEH0hwEgATYCAEGAiAFBADYCACACQRhqIQADQCAAQQc2AgQgAEEIaiEBIABBBGohACABIARJDQALIAIgB0YNAyACIAIoAgRBfnE2AgQgByACIAdrIgRBAXI2AgQgAiAENgIAIARB/wFNBEAgBEEDdiIAQQN0QdyEAWohAgJ/QbSEASgCACIBQQEgAHQiAHFFBEBBtIQBIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBzYCCCAAIAc2AgwgByACNgIMIAcgADYCCAwEC0EfIQAgB0IANwIQIARB////B00EQCAEQQh2IgAgAEGA/j9qQRB2QQhxIgJ0IgAgAEGA4B9qQRB2QQRxIgF0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAEgAnIgAHJrIgBBAXQgBCAAQRVqdkEBcXJBHGohAAsgByAANgIcIABBAnRB5IYBaiEDAkBBuIQBKAIAIgJBASAAdCIBcUUEQEG4hAEgASACcjYCACADIAc2AgAgByADNgIYDAELIARBAEEZIABBAXZrIABBH0YbdCEAIAMoAgAhAQNAIAEiAigCBEF4cSAERg0EIABBHXYhASAAQQF0IQAgAiABQQRxaiIDKAIQIgENAAsgAyAHNgIQIAcgAjYCGAsgByAHNgIMIAcgBzYCCAwDCyADKAIIIgAgBjYCDCADIAY2AgggBkEANgIYIAYgAzYCDCAGIAA2AggLIAlBCGohAAwFCyACKAIIIgAgBzYCDCACIAc2AgggB0EANgIYIAcgAjYCDCAHIAA2AggLQcCEASgCACIAIAhNDQBBwIQBIAAgCGsiATYCAEHMhAFBzIQBKAIAIgIgCGoiADYCACAAIAFBAXI2AgQgAiAIQQNyNgIEIAJBCGohAAwDC0GEhAFBMDYCAEEAIQAMAgsCQCAFRQ0AAkAgBCgCHCICQQJ0QeSGAWoiACgCACAERgRAIAAgATYCACABDQFBuIQBIAlBfiACd3EiCTYCAAwCCyAFQRBBFCAFKAIQIARGG2ogATYCACABRQ0BCyABIAU2AhggBCgCECIABEAgASAANgIQIAAgATYCGAsgBCgCFCIARQ0AIAEgADYCFCAAIAE2AhgLAkAgA0EPTQRAIAQgAyAIaiIAQQNyNgIEIAAgBGoiACAAKAIEQQFyNgIEDAELIAQgCEEDcjYCBCAGIANBAXI2AgQgAyAGaiADNgIAIANB/wFNBEAgA0EDdiIAQQN0QdyEAWohAgJ/QbSEASgCACIBQQEgAHQiAHFFBEBBtIQBIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBjYCCCAAIAY2AgwgBiACNgIMIAYgADYCCAwBC0EfIQAgA0H///8HTQRAIANBCHYiACAAQYD+P2pBEHZBCHEiAnQiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASACciAAcmsiAEEBdCADIABBFWp2QQFxckEcaiEACyAGIAA2AhwgBkIANwIQIABBAnRB5IYBaiECAkACQCAJQQEgAHQiAXFFBEBBuIQBIAEgCXI2AgAgAiAGNgIAIAYgAjYCGAwBCyADQQBBGSAAQQF2ayAAQR9GG3QhACACKAIAIQgDQCAIIgEoAgRBeHEgA0YNAiAAQR12IQIgAEEBdCEAIAEgAkEEcWoiAigCECIIDQALIAIgBjYCECAGIAE2AhgLIAYgBjYCDCAGIAY2AggMAQsgASgCCCIAIAY2AgwgASAGNgIIIAZBADYCGCAGIAE2AgwgBiAANgIICyAEQQhqIQAMAQsCQCALRQ0AAkAgASgCHCICQQJ0QeSGAWoiACgCACABRgRAIAAgBDYCACAEDQFBuIQBIAZBfiACd3E2AgAMAgsgC0EQQRQgCygCECABRhtqIAQ2AgAgBEUNAQsgBCALNgIYIAEoAhAiAARAIAQgADYCECAAIAQ2AhgLIAEoAhQiAEUNACAEIAA2AhQgACAENgIYCwJAIANBD00EQCABIAMgCGoiAEEDcjYCBCAAIAFqIgAgACgCBEEBcjYCBAwBCyABIAhBA3I2AgQgCSADQQFyNgIEIAMgCWogAzYCACAKBEAgCkEDdiIAQQN0QdyEAWohBEHIhAEoAgAhAgJ/QQEgAHQiACAFcUUEQEG0hAEgACAFcjYCACAEDAELIAQoAggLIQAgBCACNgIIIAAgAjYCDCACIAQ2AgwgAiAANgIIC0HIhAEgCTYCAEG8hAEgAzYCAAsgAUEIaiEACyAMQRBqJAAgAAuJAQEDfyAAKAIcIgEQMAJAIAAoAhAiAiABKAIQIgMgAiADSRsiAkUNACAAKAIMIAEoAgggAhAHGiAAIAAoAgwgAmo2AgwgASABKAIIIAJqNgIIIAAgACgCFCACajYCFCAAIAAoAhAgAms2AhAgASABKAIQIAJrIgA2AhAgAA0AIAEgASgCBDYCCAsLzgEBBX8CQCAARQ0AIAAoAjAiAQRAIAAgAUEBayIBNgIwIAENAQsgACgCIARAIABBATYCICAAEBoaCyAAKAIkQQFGBEAgABBDCwJAIAAoAiwiAUUNACAALQAoDQACQCABKAJEIgNFDQAgASgCTCEEA0AgACAEIAJBAnRqIgUoAgBHBEAgAyACQQFqIgJHDQEMAgsLIAUgBCADQQFrIgJBAnRqKAIANgIAIAEgAjYCRAsLIABBAEIAQQUQDhogACgCACIBBEAgARALCyAAEAYLC1oCAn4BfwJ/AkACQCAALQAARQ0AIAApAxAiAUJ9Vg0AIAFCAnwiAiAAKQMIWA0BCyAAQQA6AABBAAwBC0EAIAAoAgQiA0UNABogACACNwMQIAMgAadqLwAACwthAgJ+AX8CQAJAIAAtAABFDQAgACkDECICQn1WDQAgAkICfCIDIAApAwhYDQELIABBADoAAA8LIAAoAgQiBEUEQA8LIAAgAzcDECAEIAKnaiIAIAFBCHY6AAEgACABOgAAC8wCAQJ/IwBBEGsiBCQAAkAgACkDGCADrYinQQFxRQRAIABBDGoiAARAIABBADYCBCAAQRw2AgALQn8hAgwBCwJ+IAAoAgAiBUUEQCAAKAIIIAEgAiADIAAoAgQRDAAMAQsgBSAAKAIIIAEgAiADIAAoAgQRCgALIgJCf1UNAAJAIANBBGsOCwEAAAAAAAAAAAABAAsCQAJAIAAtABhBEHFFBEAgAEEMaiIBBEAgAUEANgIEIAFBHDYCAAsMAQsCfiAAKAIAIgFFBEAgACgCCCAEQQhqQghBBCAAKAIEEQwADAELIAEgACgCCCAEQQhqQghBBCAAKAIEEQoAC0J/VQ0BCyAAQQxqIgAEQCAAQQA2AgQgAEEUNgIACwwBCyAEKAIIIQEgBCgCDCEDIABBDGoiAARAIAAgAzYCBCAAIAE2AgALCyAEQRBqJAAgAguTFQIOfwN+AkACQAJAAkACQAJAAkACQAJAAkACQCAAKALwLQRAIAAoAogBQQFIDQEgACgCACIEKAIsQQJHDQQgAC8B5AENAyAALwHoAQ0DIAAvAewBDQMgAC8B8AENAyAALwH0AQ0DIAAvAfgBDQMgAC8B/AENAyAALwGcAg0DIAAvAaACDQMgAC8BpAINAyAALwGoAg0DIAAvAawCDQMgAC8BsAINAyAALwG0Ag0DIAAvAbgCDQMgAC8BvAINAyAALwHAAg0DIAAvAcQCDQMgAC8ByAINAyAALwHUAg0DIAAvAdgCDQMgAC8B3AINAyAALwHgAg0DIAAvAYgCDQIgAC8BjAINAiAALwGYAg0CQSAhBgNAIAAgBkECdCIFai8B5AENAyAAIAVBBHJqLwHkAQ0DIAAgBUEIcmovAeQBDQMgACAFQQxyai8B5AENAyAGQQRqIgZBgAJHDQALDAMLIABBBzYC/C0gAkF8Rw0FIAFFDQUMBgsgAkEFaiIEIQcMAwtBASEHCyAEIAc2AiwLIAAgAEHoFmoQUSAAIABB9BZqEFEgAC8B5gEhBCAAIABB7BZqKAIAIgxBAnRqQf//AzsB6gEgAEGQFmohECAAQZQWaiERIABBjBZqIQdBACEGIAxBAE4EQEEHQYoBIAQbIQ1BBEEDIAQbIQpBfyEJA0AgBCEIIAAgCyIOQQFqIgtBAnRqLwHmASEEAkACQCAGQQFqIgVB//8DcSIPIA1B//8DcU8NACAEIAhHDQAgBSEGDAELAn8gACAIQQJ0akHMFWogCkH//wNxIA9LDQAaIAgEQEEBIQUgByAIIAlGDQEaIAAgCEECdGpBzBVqIgYgBi8BAEEBajsBACAHDAELQQEhBSAQIBEgBkH//wNxQQpJGwsiBiAGLwEAIAVqOwEAQQAhBgJ/IARFBEBBAyEKQYoBDAELQQNBBCAEIAhGIgUbIQpBBkEHIAUbCyENIAghCQsgDCAORw0ACwsgAEHaE2ovAQAhBCAAIABB+BZqKAIAIgxBAnRqQd4TakH//wM7AQBBACEGIAxBAE4EQEEHQYoBIAQbIQ1BBEEDIAQbIQpBfyEJQQAhCwNAIAQhCCAAIAsiDkEBaiILQQJ0akHaE2ovAQAhBAJAAkAgBkEBaiIFQf//A3EiDyANQf//A3FPDQAgBCAIRw0AIAUhBgwBCwJ/IAAgCEECdGpBzBVqIApB//8DcSAPSw0AGiAIBEBBASEFIAcgCCAJRg0BGiAAIAhBAnRqQcwVaiIGIAYvAQBBAWo7AQAgBwwBC0EBIQUgECARIAZB//8DcUEKSRsLIgYgBi8BACAFajsBAEEAIQYCfyAERQRAQQMhCkGKAQwBC0EDQQQgBCAIRiIFGyEKQQZBByAFGwshDSAIIQkLIAwgDkcNAAsLIAAgAEGAF2oQUSAAIAAoAvgtAn9BEiAAQYoWai8BAA0AGkERIABB0hVqLwEADQAaQRAgAEGGFmovAQANABpBDyAAQdYVai8BAA0AGkEOIABBghZqLwEADQAaQQ0gAEHaFWovAQANABpBDCAAQf4Vai8BAA0AGkELIABB3hVqLwEADQAaQQogAEH6FWovAQANABpBCSAAQeIVai8BAA0AGkEIIABB9hVqLwEADQAaQQcgAEHmFWovAQANABpBBiAAQfIVai8BAA0AGkEFIABB6hVqLwEADQAaQQQgAEHuFWovAQANABpBA0ECIABBzhVqLwEAGwsiBkEDbGoiBEERajYC+C0gACgC/C1BCmpBA3YiByAEQRtqQQN2IgRNBEAgByEEDAELIAAoAowBQQRHDQAgByEECyAEIAJBBGpPQQAgARsNASAEIAdHDQQLIANBAmqtIRIgACkDmC4hFCAAKAKgLiIBQQNqIgdBP0sNASASIAGthiAUhCESDAILIAAgASACIAMQOQwDCyABQcAARgRAIAAoAgQgACgCEGogFDcAACAAIAAoAhBBCGo2AhBBAyEHDAELIAAoAgQgACgCEGogEiABrYYgFIQ3AAAgACAAKAIQQQhqNgIQIAFBPWshByASQcAAIAFrrYghEgsgACASNwOYLiAAIAc2AqAuIABBgMEAQYDKABCHAQwBCyADQQRqrSESIAApA5guIRQCQCAAKAKgLiIBQQNqIgRBP00EQCASIAGthiAUhCESDAELIAFBwABGBEAgACgCBCAAKAIQaiAUNwAAIAAgACgCEEEIajYCEEEDIQQMAQsgACgCBCAAKAIQaiASIAGthiAUhDcAACAAIAAoAhBBCGo2AhAgAUE9ayEEIBJBwAAgAWutiCESCyAAIBI3A5guIAAgBDYCoC4gAEHsFmooAgAiC6xCgAJ9IRMgAEH4FmooAgAhCQJAAkACfwJ+AkACfwJ/IARBOk0EQCATIASthiAShCETIARBBWoMAQsgBEHAAEYEQCAAKAIEIAAoAhBqIBI3AAAgACAAKAIQQQhqNgIQIAmsIRJCBSEUQQoMAgsgACgCBCAAKAIQaiATIASthiAShDcAACAAIAAoAhBBCGo2AhAgE0HAACAEa62IIRMgBEE7awshBSAJrCESIAVBOksNASAFrSEUIAVBBWoLIQcgEiAUhiAThAwBCyAFQcAARgRAIAAoAgQgACgCEGogEzcAACAAIAAoAhBBCGo2AhAgBq1CA30hE0IFIRRBCQwCCyAAKAIEIAAoAhBqIBIgBa2GIBOENwAAIAAgACgCEEEIajYCECAFQTtrIQcgEkHAACAFa62ICyESIAatQgN9IRMgB0E7Sw0BIAetIRQgB0EEagshBCATIBSGIBKEIRMMAQsgB0HAAEYEQCAAKAIEIAAoAhBqIBI3AAAgACAAKAIQQQhqNgIQQQQhBAwBCyAAKAIEIAAoAhBqIBMgB62GIBKENwAAIAAgACgCEEEIajYCECAHQTxrIQQgE0HAACAHa62IIRMLQQAhBQNAIAAgBSIBQZDWAGotAABBAnRqQc4VajMBACEUAn8gBEE8TQRAIBQgBK2GIBOEIRMgBEEDagwBCyAEQcAARgRAIAAoAgQgACgCEGogEzcAACAAIAAoAhBBCGo2AhAgFCETQQMMAQsgACgCBCAAKAIQaiAUIASthiAThDcAACAAIAAoAhBBCGo2AhAgFEHAACAEa62IIRMgBEE9awshBCABQQFqIQUgASAGRw0ACyAAIAQ2AqAuIAAgEzcDmC4gACAAQeQBaiICIAsQhgEgACAAQdgTaiIBIAkQhgEgACACIAEQhwELIAAQiAEgAwRAAkAgACgCoC4iBEE5TgRAIAAoAgQgACgCEGogACkDmC43AAAgACAAKAIQQQhqNgIQDAELIARBGU4EQCAAKAIEIAAoAhBqIAApA5guPgAAIAAgAEGcLmo1AgA3A5guIAAgACgCEEEEajYCECAAIAAoAqAuQSBrIgQ2AqAuCyAEQQlOBH8gACgCBCAAKAIQaiAAKQOYLj0AACAAIAAoAhBBAmo2AhAgACAAKQOYLkIQiDcDmC4gACgCoC5BEGsFIAQLQQFIDQAgACAAKAIQIgFBAWo2AhAgASAAKAIEaiAAKQOYLjwAAAsgAEEANgKgLiAAQgA3A5guCwsZACAABEAgACgCABAGIAAoAgwQBiAAEAYLC6wBAQJ+Qn8hAwJAIAAtACgNAAJAAkAgACgCIEUNACACQgBTDQAgAlANASABDQELIABBDGoiAARAIABBADYCBCAAQRI2AgALQn8PCyAALQA1DQBCACEDIAAtADQNACACUA0AA0AgACABIAOnaiACIAN9QQEQDiIEQn9XBEAgAEEBOgA1Qn8gAyADUBsPCyAEUEUEQCADIAR8IgMgAloNAgwBCwsgAEEBOgA0CyADC3UCAn4BfwJAAkAgAC0AAEUNACAAKQMQIgJCe1YNACACQgR8IgMgACkDCFgNAQsgAEEAOgAADwsgACgCBCIERQRADwsgACADNwMQIAQgAqdqIgAgAUEYdjoAAyAAIAFBEHY6AAIgACABQQh2OgABIAAgAToAAAtUAgF+AX8CQAJAIAAtAABFDQAgASAAKQMQIgF8IgIgAVQNACACIAApAwhYDQELIABBADoAAEEADwsgACgCBCIDRQRAQQAPCyAAIAI3AxAgAyABp2oLdwECfyMAQRBrIgMkAEF/IQQCQCAALQAoDQAgACgCIEEAIAJBA0kbRQRAIABBDGoiAARAIABBADYCBCAAQRI2AgALDAELIAMgAjYCCCADIAE3AwAgACADQhBBBhAOQgBTDQBBACEEIABBADoANAsgA0EQaiQAIAQLVwICfgF/AkACQCAALQAARQ0AIAApAxAiAUJ7Vg0AIAFCBHwiAiAAKQMIWA0BCyAAQQA6AABBAA8LIAAoAgQiA0UEQEEADwsgACACNwMQIAMgAadqKAAAC1UCAX4BfyAABEACQCAAKQMIUA0AQgEhAQNAIAAoAgAgAkEEdGoQPiABIAApAwhaDQEgAachAiABQgF8IQEMAAsACyAAKAIAEAYgACgCKBAQIAAQBgsLZAECfwJAAkACQCAARQRAIAGnEAkiA0UNAkEYEAkiAkUNAQwDCyAAIQNBGBAJIgINAkEADwsgAxAGC0EADwsgAkIANwMQIAIgATcDCCACIAM2AgQgAkEBOgAAIAIgAEU6AAEgAgudAQICfgF/AkACQCAALQAARQ0AIAApAxAiAkJ3Vg0AIAJCCHwiAyAAKQMIWA0BCyAAQQA6AAAPCyAAKAIEIgRFBEAPCyAAIAM3AxAgBCACp2oiACABQjiIPAAHIAAgAUIwiDwABiAAIAFCKIg8AAUgACABQiCIPAAEIAAgAUIYiDwAAyAAIAFCEIg8AAIgACABQgiIPAABIAAgATwAAAvwAgICfwF+AkAgAkUNACAAIAJqIgNBAWsgAToAACAAIAE6AAAgAkEDSQ0AIANBAmsgAToAACAAIAE6AAEgA0EDayABOgAAIAAgAToAAiACQQdJDQAgA0EEayABOgAAIAAgAToAAyACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiADYCACADIAIgBGtBfHEiAmoiAUEEayAANgIAIAJBCUkNACADIAA2AgggAyAANgIEIAFBCGsgADYCACABQQxrIAA2AgAgAkEZSQ0AIAMgADYCGCADIAA2AhQgAyAANgIQIAMgADYCDCABQRBrIAA2AgAgAUEUayAANgIAIAFBGGsgADYCACABQRxrIAA2AgAgAiADQQRxQRhyIgFrIgJBIEkNACAArUKBgICAEH4hBSABIANqIQEDQCABIAU3AxggASAFNwMQIAEgBTcDCCABIAU3AwAgAUEgaiEBIAJBIGsiAkEfSw0ACwsLbwEDfyAAQQxqIQICQAJ/IAAoAiAiAUUEQEF/IQFBEgwBCyAAIAFBAWsiAzYCIEEAIQEgAw0BIABBAEIAQQIQDhogACgCACIARQ0BIAAQGkF/Sg0BQRQLIQAgAgRAIAJBADYCBCACIAA2AgALCyABC58BAgF/AX4CfwJAAn4gACgCACIDKAIkQQFGQQAgAkJ/VRtFBEAgA0EMaiIBBEAgAUEANgIEIAFBEjYCAAtCfwwBCyADIAEgAkELEA4LIgRCf1cEQCAAKAIAIQEgAEEIaiIABEAgACABKAIMNgIAIAAgASgCEDYCBAsMAQtBACACIARRDQEaIABBCGoEQCAAQRs2AgwgAEEGNgIICwtBfwsLJAEBfyAABEADQCAAKAIAIQEgACgCDBAGIAAQBiABIgANAAsLC5gBAgJ+AX8CQAJAIAAtAABFDQAgACkDECIBQndWDQAgAUIIfCICIAApAwhYDQELIABBADoAAEIADwsgACgCBCIDRQRAQgAPCyAAIAI3AxAgAyABp2oiADEABkIwhiAAMQAHQjiGhCAAMQAFQiiGhCAAMQAEQiCGhCAAMQADQhiGhCAAMQACQhCGhCAAMQABQgiGhCAAMQAAfAsjACAAQShGBEAgAhAGDwsgAgRAIAEgAkEEaygCACAAEQcACwsyACAAKAIkQQFHBEAgAEEMaiIABEAgAEEANgIEIABBEjYCAAtCfw8LIABBAEIAQQ0QDgsPACAABEAgABA2IAAQBgsLgAEBAX8gAC0AKAR/QX8FIAFFBEAgAEEMagRAIABBADYCECAAQRI2AgwLQX8PCyABECoCQCAAKAIAIgJFDQAgAiABECFBf0oNACAAKAIAIQEgAEEMaiIABEAgACABKAIMNgIAIAAgASgCEDYCBAtBfw8LIAAgAUI4QQMQDkI/h6cLC38BA38gACEBAkAgAEEDcQRAA0AgAS0AAEUNAiABQQFqIgFBA3ENAAsLA0AgASICQQRqIQEgAigCACIDQX9zIANBgYKECGtxQYCBgoR4cUUNAAsgA0H/AXFFBEAgAiAAaw8LA0AgAi0AASEDIAJBAWoiASECIAMNAAsLIAEgAGsL3wIBCH8gAEUEQEEBDwsCQCAAKAIIIgINAEEBIQQgAC8BBCIHRQRAQQEhAgwBCyAAKAIAIQgDQAJAIAMgCGoiBS0AACICQSBPBEAgAkEYdEEYdUF/Sg0BCyACQQ1NQQBBASACdEGAzABxGw0AAn8CfyACQeABcUHAAUYEQEEBIQYgA0EBagwBCyACQfABcUHgAUYEQCADQQJqIQNBACEGQQEMAgsgAkH4AXFB8AFHBEBBBCECDAULQQAhBiADQQNqCyEDQQALIQlBBCECIAMgB08NAiAFLQABQcABcUGAAUcNAkEDIQQgBg0AIAUtAAJBwAFxQYABRw0CIAkNACAFLQADQcABcUGAAUcNAgsgBCECIANBAWoiAyAHSQ0ACwsgACACNgIIAn8CQCABRQ0AAkAgAUECRw0AIAJBA0cNAEECIQIgAEECNgIICyABIAJGDQBBBSACQQFHDQEaCyACCwtIAgJ+An8jAEEQayIEIAE2AgxCASAArYYhAgNAIAQgAUEEaiIANgIMIAIiA0IBIAEoAgAiBa2GhCECIAAhASAFQX9KDQALIAMLhwUBB38CQAJAIABFBEBBxRQhAiABRQ0BIAFBADYCAEHFFA8LIAJBwABxDQEgACgCCEUEQCAAQQAQIxoLIAAoAgghBAJAIAJBgAFxBEAgBEEBa0ECTw0BDAMLIARBBEcNAgsCQCAAKAIMIgINACAAAn8gACgCACEIIABBEGohCUEAIQICQAJAAkACQCAALwEEIgUEQEEBIQQgBUEBcSEHIAVBAUcNAQwCCyAJRQ0CIAlBADYCAEEADAQLIAVBfnEhBgNAIARBAUECQQMgAiAIai0AAEEBdEHQFGovAQAiCkGAEEkbIApBgAFJG2pBAUECQQMgCCACQQFyai0AAEEBdEHQFGovAQAiBEGAEEkbIARBgAFJG2ohBCACQQJqIQIgBkECayIGDQALCwJ/IAcEQCAEQQFBAkEDIAIgCGotAABBAXRB0BRqLwEAIgJBgBBJGyACQYABSRtqIQQLIAQLEAkiB0UNASAFQQEgBUEBSxshCkEAIQVBACEGA0AgBSAHaiEDAn8gBiAIai0AAEEBdEHQFGovAQAiAkH/AE0EQCADIAI6AAAgBUEBagwBCyACQf8PTQRAIAMgAkE/cUGAAXI6AAEgAyACQQZ2QcABcjoAACAFQQJqDAELIAMgAkE/cUGAAXI6AAIgAyACQQx2QeABcjoAACADIAJBBnZBP3FBgAFyOgABIAVBA2oLIQUgBkEBaiIGIApHDQALIAcgBEEBayICakEAOgAAIAlFDQAgCSACNgIACyAHDAELIAMEQCADQQA2AgQgA0EONgIAC0EACyICNgIMIAINAEEADwsgAUUNACABIAAoAhA2AgALIAIPCyABBEAgASAALwEENgIACyAAKAIAC4MBAQR/QRIhBQJAAkAgACkDMCABWA0AIAGnIQYgACgCQCEEIAJBCHEiB0UEQCAEIAZBBHRqKAIEIgINAgsgBCAGQQR0aiIEKAIAIgJFDQAgBC0ADEUNAUEXIQUgBw0BC0EAIQIgAyAAQQhqIAMbIgAEQCAAQQA2AgQgACAFNgIACwsgAgtuAQF/IwBBgAJrIgUkAAJAIARBgMAEcQ0AIAIgA0wNACAFIAFB/wFxIAIgA2siAkGAAiACQYACSSIBGxAZIAFFBEADQCAAIAVBgAIQLiACQYACayICQf8BSw0ACwsgACAFIAIQLgsgBUGAAmokAAuBAQEBfyMAQRBrIgQkACACIANsIQICQCAAQSdGBEAgBEEMaiACEIwBIQBBACAEKAIMIAAbIQAMAQsgAUEBIAJBxABqIAARAAAiAUUEQEEAIQAMAQtBwAAgAUE/cWsiACABakHAAEEAIABBBEkbaiIAQQRrIAE2AAALIARBEGokACAAC1IBAn9BhIEBKAIAIgEgAEEDakF8cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQA0UNAQtBhIEBIAA2AgAgAQ8LQYSEAUEwNgIAQX8LNwAgAEJ/NwMQIABBADYCCCAAQgA3AwAgAEEANgIwIABC/////w83AyggAEIANwMYIABCADcDIAulAQEBf0HYABAJIgFFBEBBAA8LAkAgAARAIAEgAEHYABAHGgwBCyABQgA3AyAgAUEANgIYIAFC/////w83AxAgAUEAOwEMIAFBv4YoNgIIIAFBAToABiABQQA6AAQgAUIANwNIIAFBgIDYjXg2AkQgAUIANwMoIAFCADcDMCABQgA3AzggAUFAa0EAOwEAIAFCADcDUAsgAUEBOgAFIAFBADYCACABC1gCAn4BfwJAAkAgAC0AAEUNACAAKQMQIgMgAq18IgQgA1QNACAEIAApAwhYDQELIABBADoAAA8LIAAoAgQiBUUEQA8LIAAgBDcDECAFIAOnaiABIAIQBxoLlgEBAn8CQAJAIAJFBEAgAacQCSIFRQ0BQRgQCSIEDQIgBRAGDAELIAIhBUEYEAkiBA0BCyADBEAgA0EANgIEIANBDjYCAAtBAA8LIARCADcDECAEIAE3AwggBCAFNgIEIARBAToAACAEIAJFOgABIAAgBSABIAMQZUEASAR/IAQtAAEEQCAEKAIEEAYLIAQQBkEABSAECwubAgEDfyAALQAAQSBxRQRAAkAgASEDAkAgAiAAIgEoAhAiAAR/IAAFAn8gASABLQBKIgBBAWsgAHI6AEogASgCACIAQQhxBEAgASAAQSByNgIAQX8MAQsgAUIANwIEIAEgASgCLCIANgIcIAEgADYCFCABIAAgASgCMGo2AhBBAAsNASABKAIQCyABKAIUIgVrSwRAIAEgAyACIAEoAiQRAAAaDAILAn8gASwAS0F/SgRAIAIhAANAIAIgACIERQ0CGiADIARBAWsiAGotAABBCkcNAAsgASADIAQgASgCJBEAACAESQ0CIAMgBGohAyABKAIUIQUgAiAEawwBCyACCyEAIAUgAyAAEAcaIAEgASgCFCAAajYCFAsLCwvNBQEGfyAAKAIwIgNBhgJrIQYgACgCPCECIAMhAQNAIAAoAkQgAiAAKAJoIgRqayECIAEgBmogBE0EQCAAKAJIIgEgASADaiADEAcaAkAgAyAAKAJsIgFNBEAgACABIANrNgJsDAELIABCADcCbAsgACAAKAJoIANrIgE2AmggACAAKAJYIANrNgJYIAEgACgChC5JBEAgACABNgKELgsgAEH8gAEoAgARAwAgAiADaiECCwJAIAAoAgAiASgCBCIERQ0AIAAoAjwhBSAAIAIgBCACIARJGyICBH8gACgCSCAAKAJoaiAFaiEFIAEgBCACazYCBAJAAkACQAJAIAEoAhwiBCgCFEEBaw4CAQACCyAEQaABaiAFIAEoAgAgAkHcgAEoAgARCAAMAgsgASABKAIwIAUgASgCACACQcSAASgCABEEADYCMAwBCyAFIAEoAgAgAhAHGgsgASABKAIAIAJqNgIAIAEgASgCCCACajYCCCAAKAI8BSAFCyACaiICNgI8AkAgACgChC4iASACakEDSQ0AIAAoAmggAWshAQJAIAAoAnRBgQhPBEAgACAAIAAoAkggAWoiAi0AACACLQABIAAoAnwRAAA2AlQMAQsgAUUNACAAIAFBAWsgACgChAERAgAaCyAAKAKELiAAKAI8IgJBAUZrIgRFDQAgACABIAQgACgCgAERBQAgACAAKAKELiAEazYChC4gACgCPCECCyACQYUCSw0AIAAoAgAoAgRFDQAgACgCMCEBDAELCwJAIAAoAkQiAiAAKAJAIgNNDQAgAAJ/IAAoAjwgACgCaGoiASADSwRAIAAoAkggAWpBACACIAFrIgNBggIgA0GCAkkbIgMQGSABIANqDAELIAFBggJqIgEgA00NASAAKAJIIANqQQAgAiADayICIAEgA2siAyACIANJGyIDEBkgACgCQCADags2AkALC50CAQF/AkAgAAJ/IAAoAqAuIgFBwABGBEAgACgCBCAAKAIQaiAAKQOYLjcAACAAQgA3A5guIAAgACgCEEEIajYCEEEADAELIAFBIE4EQCAAKAIEIAAoAhBqIAApA5guPgAAIAAgAEGcLmo1AgA3A5guIAAgACgCEEEEajYCECAAIAAoAqAuQSBrIgE2AqAuCyABQRBOBEAgACgCBCAAKAIQaiAAKQOYLj0AACAAIAAoAhBBAmo2AhAgACAAKQOYLkIQiDcDmC4gACAAKAKgLkEQayIBNgKgLgsgAUEISA0BIAAgACgCECIBQQFqNgIQ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KAJUIgEEfyABQQAgARAiEBkgACgCVAVBAAsQBiAAQQA2AlQLC9wMAgl/AX4jAEFAaiIGJAACQAJAAkACQAJAIAEoAjBBABAjIgVBAkZBACABKAI4QQAQIyIEQQFGGw0AIAVBAUZBACAEQQJGGw0AIAVBAkciAw0BIARBAkcNAQsgASABLwEMQYAQcjsBDEEAIQMMAQsgASABLwEMQf/vA3E7AQxBACEFIANFBEBB9eABIAEoAjAgAEEIahBpIgVFDQILIAJBgAJxBEAgBSEDDAELIARBAkcEQCAFIQMMAQtB9cYBIAEoAjggAEEIahBpIgNFBEAgBRAcDAILIAMgBTYCAAsgASABLwEMQf7/A3EgAS8BUiIFQQBHcjsBDAJAAkACQAJAAn8CQAJAIAEpAyhC/v///w9WDQAgASkDIEL+////D1YNACACQYAEcUUNASABKQNIQv////8PVA0BCyAFQYECa0H//wNxQQNJIQdBAQwBCyAFQYECa0H//wNxIQQgAkGACnFBgApHDQEgBEEDSSEHQQALIQkgBkIcEBciBEUEQCAAQQhqIgAEQCAAQQA2AgQgAEEONgIACyADEBwMBQsgAkGACHEhBQJAAkAgAkGAAnEEQAJAIAUNACABKQMgQv////8PVg0AIAEpAyhCgICAgBBUDQMLIAQgASkDKBAYIAEpAyAhDAwBCwJAAkACQCAFDQAgASkDIEL/////D1YNACABKQMoIgxC/////w9WDQEgASkDSEKAgICAEFQNBAsgASkDKCIMQv////8PVA0BCyAEIAwQGAsgASkDICIMQv////8PWgRAIAQgDBAYCyABKQNIIgxC/////w9UDQELIAQgDBAYCyAELQAARQRAIABBCGoiAARAIABBADYCBCAAQRQ2AgALIAQQCCADEBwMBQtBASEKQQEgBC0AAAR+IAQpAxAFQgALp0H//wNxIAYQRyEFIAQQCCAFIAM2AgAgBw0BDAILIAMhBSAEQQJLDQELIAZCBxAXIgRFBEAgAEEIaiIABEAgAEEANgIEIABBDjYCAAsgBRAcDAMLIARBAhANIARBhxJBAhAsIAQgAS0AUhBwIAQgAS8BEBANIAQtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAsgBBAIDAILQYGyAkEHIAYQRyEDIAQQCCADIAU2AgBBASEL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NgIEIABB7A42AhggGiEdDAMLIARB/wFxIgJBwABxRQRAIAggDSADLwECQQJ0aiAdp0F/IAJ0QX9zcUECdGoiAy0AASICayEIIB0gAq2IIR0gAy0AACIERQ0HDAELCyAEQSBxBEAgB0G//gA2AgQgASECDAgLIAdB0f4ANgIEIABB0A42AhggASECDAcLIB1BfyAGdEF/c62DIBt8IhunIQUgCCAEQQ9xIgNrIQggGiAErUIPg4ghHSABIBdrIgYgAjMBAiAaQX8gA3RBf3Otg3ynIgRPDQIgBCAGayIGIBlNDQEgBygCjEdFDQEgB0HR/gA2AgQgAEG5DDYCGAsgASECIAshBQwFCwJAIA5FBEAgDCARIAZraiEDDAELIAYgDk0EQCAMIA4gBmtqIQMMAQsgDCARIAYgDmsiBmtqIQMgBSAGTQ0AIAUgBmshBQJAAkAgASADTSABIA8gAWusIhogBq0iGyAaIBtUGyIapyIGaiICIANLcQ0AIAMgBmogAUsgASADT3ENACABIAMgBhAHGiACIQEMAQsgASADIAMgAWsiASABQR91IgFqIAFzIgIQByACaiEBIBogAq0iHn0iHFANACACIANqIQIDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgASACKQAANwAAIAEgAikAGDcAGCABIAIpABA3ABAgASACKQAINwAIIBpCIH0hGiACQSBqIQIgAUEgaiEBIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAEgAikAADcAACABIAIpABg3ABggASACKQAQNwAQIAEgAikACDcACCABIAIpADg3ADggASACKQAwNwAwIAEgAikAKDcAKCABIAIpACA3ACAgASACKQBYNwBYIAEgAikAUDcAUCABIAIpAEg3AEggASACKQBANwBAIAEgAikAYDcAYCABIAIpAGg3AGggASACKQBwNwBwIAEgAikAeDcAeCACQYABaiECIAFBgAFqIQEgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAEgAikAADcAACABIAIpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCABIAIpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCABIAIoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCABIAIvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCABIAItAAA6AAAgAkEBaiECIAFBAWohAQsgHEIAUg0ACwsgDiEGIAwhAwsgBSAGSwRAAkACQCABIANNIAEgDyABa6wiGiAGrSIbIBogG1QbIhqnIglqIgIgA0txDQAgAyAJaiABSyABIANPcQ0AIAEgAyAJEAcaDAELIAEgAyADIAFrIgEgAUEfdSIBaiABcyIBEAcgAWohAiAaIAGtIh59IhxQDQAgASADaiEBA0ACQCAcIB4gHCAeVBsiG0IgVARAIBshGgwBCyAbIhpCIH0iIEIFiEIBfEIDgyIfUEUEQANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCAaQiB9IRogAUEgaiEBIAJBIGohAiAfQgF9Ih9CAFINAAsLICBC4ABUDQADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggAiABKQA4NwA4IAIgASkAMDcAMCACIAEpACg3ACggAiABKQAgNwAgIAIgASkAWDcAWCACIAEpAFA3AFAgAiABKQBINwBIIAIgASkAQDcAQCACIAEpAGA3AGAgAiABKQBoNwBoIAIgASkAcDcAcCACIAEpAHg3AHggAUGAAWohASACQYABaiECIBpCgAF9IhpCH1YNAAsLIBpCEFoEQCACIAEpAAA3AAAgAiABKQAINwAIIBpCEH0hGiACQRBqIQIgAUEQaiEBCyAaQghaBEAgAiABKQAANwAAIBpCCH0hGiACQQhqIQIgAUEIaiEBCyAaQgRaBEAgAiABKAAANgAAIBpCBH0hGiACQQRqIQIgAUEEaiEBCyAaQgJaBEAgAiABLwAAOwAAIBpCAn0hGiACQQJqIQIgAUECaiEBCyAcIBt9IRwgGlBFBEAgAiABLQAAOgAAIAJBAWohAiABQQFqIQELIBxCAFINAAsLIAUgBmshAUEAIARrIQUCQCAEQQdLBEAgBCEDDAELIAEgBE0EQCAEIQMMAQsgAiAEayEFA0ACQCACIAUpAAA3AAAgBEEBdCEDIAEgBGshASACIARqIQIgBEEDSw0AIAMhBCABIANLDQELC0EAIANrIQULIAIgBWohBAJAIAUgDyACa6wiGiABrSIbIBogG1QbIhqnIgFIIAVBf0pxDQAgBUEBSCABIARqIAJLcQ0AIAIgBCABEAcgAWohAgwDCyACIAQgAyADQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANAiABIARqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAILAkAgASADTSABIA8gAWusIhogBa0iGyAaIBtUGyIapyIEaiICIANLcQ0AIAMgBGogAUsgASADT3ENACABIAMgBBAHGgwCCyABIAMgAyABayIBIAFBH3UiAWogAXMiARAHIAFqIQIgGiABrSIefSIcUA0BIAEgA2ohAQNAAkAgHCAeIBwgHlQbIhtCIFQEQCAbIRoMAQsgGyIaQiB9IiBCBYhCAXxCA4MiH1BFBEADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggGkIgfSEaIAFBIGohASACQSBqIQIgH0IBfSIfQgBSDQALCyAgQuAAVA0AA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIAIgASkAODcAOCACIAEpADA3ADAgAiABKQAoNwAoIAIgASkAIDcAICACIAEpAFg3AFggAiABKQBQNwBQIAIgASkASDcASCACIAEpAEA3AEAgAiABKQBgNwBgIAIgASkAaDcAaCACIAEpAHA3AHAgAiABKQB4NwB4IAFBgAFqIQEgAkGAAWohAiAaQoABfSIaQh9WDQALCyAaQhBaBEAgAiABKQAANwAAIAIgASkACDcACCAaQhB9IRogAkEQaiECIAFBEGohAQsgGkIIWgRAIAIgASkAADcAACAaQgh9IRogAkEIaiECIAFBCGohAQsgGkIEWgRAIAIgASgAADYAACAaQgR9IRogAkEEaiECIAFBBGohAQsgGkICWgRAIAIgAS8AADsAACAaQgJ9IRogAkECaiECIAFBAmohAQsgHCAbfSEcIBpQRQRAIAIgAS0AADoAACACQQFqIQIgAUEBaiEBCyAcUEUNAAsMAQsCQAJAIBYEQAJAIAQgBUkEQCAHKAKYRyAESw0BCyABIARrIQMCQEEAIARrIgVBf0ogDyABa6wiGiAbIBogG1QbIhqnIgIgBUpxDQAgBUEBSCACIANqIAFLcQ0AIAEgAyACEAcgAmohAgwFCyABIAMgBCAEQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANBCABIANqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAQLIBAgAWsiCUEBaiIGIAUgBSAGSxshAyABIARrIQIgAUEHcUUNAiADRQ0CIAEgAi0AADoAACACQQFqIQIgAUEBaiIGQQdxQQAgA0EBayIFGw0BIAYhASAFIQMgCSEGDAILAkAgBCAFSQRAIAcoAphHIARLDQELIAEgASAEayIGKQAANwAAIAEgBUEBa0EHcUEBaiIDaiECIAUgA2siBEUNAyADIAZqIQEDQCACIAEpAAA3AAAgAUEIaiEBIAJBCGohAiAEQQhrIgQNAAsMAwsgASAEIAUQPyECDAILIAEgAi0AADoAASAJQQFrIQYgA0ECayEFIAJBAWohAgJAIAFBAmoiCkEHcUUNACAFRQ0AIAEgAi0AADoAAiAJQQJrIQYgA0EDayEFIAJBAWohAgJAIAFBA2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAAyAJQQNrIQYgA0EEayEFIAJBAWohAgJAIAFBBGoiCkEHcUUNACAFRQ0AIAEgAi0AADoABCAJQQRrIQYgA0EFayEFIAJBAWohAgJAIAFBBWoiCkEHcUUNACAFRQ0AIAEgAi0AADoABSAJQQVrIQYgA0EGayEFIAJBAWohAgJAIAFBBmoiCkEHcUUNACAFRQ0AIAEgAi0AADoABiAJQQZrIQYgA0EHayEFIAJBAWohAgJAIAFBB2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAByAJQQdrIQYgA0EIayEDIAFBCGohASACQQFqIQIMBgsgCiEBIAUhAwwFCyAKIQEgBSEDDAQLIAohASAFIQMMAwsgCiEBIAUhAwwCCyAKIQEgBSEDDAELIAohASAFIQMLAkACQCAGQRdNBEAgA0UNASADQQFrIQUgA0EHcSIEBEADQCABIAItAAA6AAAgA0EBayEDIAFBAWohASACQQFqIQIgBEEBayIEDQALCyAFQQdJDQEDQCABIAItAAA6AAAgASACLQABOgABIAEgAi0AAjoAAiABIAItAAM6AAMgASACLQAEOgAEIAEgAi0ABToABSABIAItAAY6AAYgASACLQAHOgAHIAFBCGohASACQQhqIQIgA0EIayIDDQALDAELIAMNAQsgASECDAELIAEgBCADED8hAgsgCyEFDAELIAEgAy0AAjoAACABQQFqIQILIAUgFE8NACACIBNJDQELCyAAIAI2AgwgACAFIAhBA3ZrIgE2AgAgACATIAJrQYMCajYCECAAIBQgAWtBDmo2AgQgByAIQQdxIgA2AogBIAcgHUJ/IACthkJ/hYM+AoQBC+cFAQR/IAMgAiACIANLGyEEIAAgAWshAgJAIABBB3FFDQAgBEUNACAAIAItAAA6AAAgA0EBayEGIAJBAWohAiAAQQFqIgdBB3FBACAEQQFrIgUbRQRAIAchACAFIQQgBiEDDAELIAAgAi0AADoAASADQQJrIQYgBEECayEFIAJBAWohAgJAIABBAmoiB0EHcUUNACAFRQ0AIAAgAi0AADoAAiADQQNrIQYgBEEDayEFIAJBAWohAgJAIABBA2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAAyADQQRrIQYgBEEEayEFIAJBAWohAgJAIABBBGoiB0EHcUUNACAFRQ0AIAAgAi0AADoABCADQQVrIQYgBEEFayEFIAJBAWohAgJAIABBBWoiB0EHcUUNACAFRQ0AIAAgAi0AADoABSADQQZrIQYgBEEGayEFIAJBAWohAgJAIABBBmoiB0EHcUUNACAFRQ0AIAAgAi0AADoABiADQQdrIQYgBEEHayEFIAJBAWohAgJAIABBB2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAByADQQhrIQMgBEEIayEEIABBCGohACACQQFqIQIMBgsgByEAIAUhBCAGIQMMBQsgByEAIAUhBCAGIQMMBAsgByEAIAUhBCAGIQMMAwsgByEAIAUhBCAGIQMMAgsgByEAIAUhBCAGIQMMAQsgByEAIAUhBCAGIQMLAkAgA0EXTQRAIARFDQEgBEEBayEBIARBB3EiAwRAA0AgACACLQAAOgAAIARBAWshBCAAQQFqIQAgAkEBaiECIANBAWsi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CyAAIAMtAAAEfiADKQMQBUIAC6dB//8DcSADKAIEEEcLIQUgAxAICyAEQRBqJAAgBQvgAQICfwF+QTAQCSICRQRAIAEEQCABQQA2AgQgAUEONgIAC0EADwsgAkIANwMIIAJBADYCACACQgA3AxAgAkIANwMYIAJCADcDICACQgA3ACUgAFAEQCACDwsCQCAAQv////8AVg0AIACnQQR0EAkiA0UNACACIAM2AgBBACEBQgEhBANAIAMgAUEEdGoiAUIANwIAIAFCADcABSAAIARSBEAgBKchASAEQgF8IQQMAQsLIAIgADcDCCACIAA3AxAgAg8LIAEEQCABQQA2AgQgAUEONgIAC0EAEBAgAhAGQQAL7gECA38BfiMAQRBrIgQkAAJAIARBDGpCBBAXIgNFBEBBfyECDAELAkAgAQRAIAJBgAZxIQUDQAJAIAUgASgCBHFFDQACQCADKQMIQgBUBEAgA0EAOgAADAELIANCADcDECADQQE6AAALIAMgAS8BCBANIAMgAS8BChANIAMtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAtBfyECDAQLQX8hAiAAIARBDGpCBBAbQQBIDQMgATMBCiIGUA0AIAAgASgCDCAGEBtBAEgNAwsgASgCACIBDQALC0EAIQILIAMQCAsgBEEQaiQAIAILPAEBfyAABEAgAUGABnEhAQNAIAEgACgCBHEEQCACIAAvAQpqQQRqIQILIAAoAgAiAA0ACwsgAkH//wNxC5wBAQN/IABFBEBBAA8LIAAhAwNAAn8CQAJAIAAvAQgiAUH04AFNBEAgAUEBRg0BIAFB9cYBRg0BDAILIAFBgbICRg0AIAFB9eABRw0BCyAAKAIAIQEgAEEANgIAIAAoAgwQBiAAEAYgASADIAAgA0YbIQMCQCACRQRAQQAhAgwBCyACIAE2AgALIAEMAQsgACICKAIACyIADQALIAMLsgQCBX8BfgJAAkACQCAAIAGtEBciAQRAIAEtAAANAUEAIQAMAgsgBARAIARBADYCBCAEQQ42AgALQQAPC0EAIQADQCABLQAABH4gASkDCCABKQMQfQVCAAtCBFQNASABEAwhByABIAEQDCIGrRATIghFBEBBACECIAQEQCAEQQA2AgQgBEEVNgIACyABEAggAEUNAwNAIAAoAgAhASAAKAIMEAYg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DCAAQRg2AggLDAMLIAAgBiAFLwFqQQAgBCABEQYAIQEgBhALIAFFDQILAkAgDUUEQCABIQMMAQsgACABIAUvAWgQgQEhAyABEAsgA0UNAQsCQCAJRSAMckUEQCADIQEMAQsgACADQQEQgAEhASADEAsgAUUNAQsgASEDDAELQQAhAwsgBUHwAGokACADC4UBAQF/IAFFBEAgAEEIaiIABEAgAEEANgIEIABBEjYCAAtBAA8LQTgQCSIDRQRAIABBCGoiAARAIABBADYCBCAAQQ42AgALQQAPCyADQQA2AhAgA0IANwIIIANCADcDKCADQQA2AgQgAyACNgIAIANCADcDGCADQQA2AjAgACABQTsgAxBCCw8AIAAgASACQQBBABCCAQusAgECfyABRQRAIABBCGoiAARAIABBADYCBCAAQRI2AgALQQAPCwJAIAJBfUsNACACQf//A3FBCEYNACAAQQhqIgAEQCAAQQA2AgQgAEEQNgIAC0EADwsCQEGwwAAQCSIFBEAgBUEANgIIIAVCADcCACAFQYiBAUGogQEgAxs2AqhAIAUgAjYCFCAFIAM6ABAgBUEAOgAPIAVBADsBDCAFIAMgAkF9SyIGcToADiAFQQggAiAGG0H//wNxIAQgBUGIgQFBqIEBIAMbKAIAEQAAIgI2AqxAIAINASAFEDEgBRAGCyAAQQhqIgAEQCAAQQA2AgQgAEEONgIAC0EADwsgACABQTogBRBCIgAEfyAABSAFKAKsQCAFKAKoQCgCBBEDACAFEDEgBRAGQQALC6ABAQF/IAIgACgCBCIDIAIgA0kbIgIEQCAAIAMgAms2AgQCQAJAAkACQCAAKAIcIgMoAhRBAWsOAgEAAgsgA0GgAWogASAAKAIAIAJB3IABKAIAEQgADAILIAAgACgCMCABIAAoAgAgAkHEgAEoAgARBAA2AjAMAQsgASAAKAIAIAIQBxoLIAAgACgCACACajYCACAAIAAoAgggAmo2AggLC7cCAQR/QX4hAgJAIABFDQAgACgCIEUNACAAKAIkIgRFDQAgACgCHCIBRQ0AIAEoAgAgAEcNAAJAAkAgASgCICIDQTlrDjkBAgICAgICAgICAgIBAgICAQICAgICAgICAgICAgICAgICAQICAgICAgICAgICAQICAgICAgICAgEACyADQZoFRg0AIANBKkcN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DCABajYCDCAGIAYoAgggAWo2AgggBSAFKAIUIAFqNgIUIAUgBSgCECABazYCECAGIAYoAhAgAWsiATYCECABDQAgBiAGKAIENgIIC0EAIQRBACEJIAMoAhBFDQAMCgsgAygCHCgCJCEGIAMgAygCGCIBQQFqNgIYIAEgBmotAAAhASADIARBAWo2AhAgAygCBCAEaiABOgAAIAEEQCADKAIQIQQMAQsLIAMoAhwoAixFDQAgAygCECIGIAlNDQAgBQJ/IAUoAjAhBEEAIAMoAgQgCWoiAUUNABogBCABIAYgCWtB1IABKAIAEQAACzYCMAsgA0HnADYCIAsCQCADKAIcKAIsBEAgAygCDCADKAIQIgFBAmpJBH8gBRAKIAMoAhANAkEABSABCyADKAIEaiAFKAIwOwAAIAMgAygCEEECajYCECADQaABakHkgAEoAgARAQAaCyADQfEANgIgIAUQCiADKAIQRQ0BDAcLDAYLIAUoAgQNAQsgAygCPA0AIApFDQEgAygCIEGaBUYNAQsCfyADKAKIASIBRQRAIAMgChCFAQwBCwJAAkACQCADKAKMAUECaw4CAAECCwJ/AkADQAJAAkAgAygCPA0AIAMQLyADKAI8DQAgCg0BQQAMBAsgAygCSCADKAJoai0AACEEIAMgAygC8C0iAUEBajYC8C0gASADKALsLWpBADoAACADIAMoAvAtIgFBAWo2AvAtIAEgAygC7C1qQQA6AAAgAyADKALwLSIBQQFqNgLwLSABIAMoAuwtaiAEOgAAIAMgBEECdGoiASABLwHkAUEBajsB5AEgAyADKAI8QQFrNgI8IAMgAygCaEEBaiIBNgJoIAMoAvAtIAMoAvQtRw0BQQAhBCADIAMoAlgiBkEATgR/IAMoAkggBmoFQQALIAEgBmtBABAPIAMgAygCaDYCWCADKAIAEAogAygCACgCEA0BDAILCyADQQA2AoQuIApBBEYEQCADIAMoAlgiAUEATgR/IAMoAkggAWoFQQALIAMoAmggAWtBARAPIAMgAygCaDYCWCADKAIAEApBA0ECIAMoAgAoAhAbDAILIAMoAvAtBEBBACEEIAMgAygCWCIBQQBOBH8gAygCSCABagVBAAsgAygCaCABa0EAEA8gAyADKAJoNgJYIAMoAgAQCiADKAIAKAIQRQ0BC0EBIQQLIAQL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bGl0ZXJhbC9sZW5ndGhzIHNldABpbnZhbGlkIGNvZGUgbGVuZ3RocyBzZXQAdW5rbm93biBoZWFkZXIgZmxhZ3Mgc2V0AGludmFsaWQgZGlzdGFuY2VzIHNldABpbnZhbGlkIGJpdCBsZW5ndGggcmVwZWF0AEZpbGUgYWxyZWFkeSBleGlzdHMAdG9vIG1hbnkgbGVuZ3RoIG9yIGRpc3RhbmNlIHN5bWJvbHMAaW52YWxpZCBzdG9yZWQgYmxvY2sgbGVuZ3RocwAlcyVzJXMAYnVmZmVyIGVycm9yAE5vIGVycm9yAHN0cmVhbSBlcnJvcgBUZWxsIGVycm9yAEludGVybmFsIGVycm9yAFNlZWsgZXJyb3IAV3JpdGUgZXJyb3IAZmlsZSBlcnJvcgBSZWFkIGVycm9yAFpsaWIgZXJyb3IAZGF0YSBlcnJvcgBDUkMgZXJyb3IAaW5jb21wYXRpYmxlIHZlcnNpb24AaW52YWxpZCBjb2RlIC0tIG1pc3NpbmcgZW5kLW9mLWJsb2NrAGluY29ycmVjdCBoZWFkZXIgY2hlY2sAaW5jb3JyZWN0IGxlbmd0aCBjaGVjawBpbmNvcnJlY3QgZGF0YSBjaGVjawBpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFjawBoZWFkZXIgY3JjIG1pc21hdGNoADEuMi4xMy56bGliLW5nAGludmFsaWQgd2luZG93IHNpemUAUmVhZC1vbmx5IGFyY2hpdmUATm90IGEgemlwIGFyY2hpdmUAUmVzb3VyY2Ugc3RpbGwgaW4gdXNlAE1hbGxvYyBmYWlsdXJlAGludmFsaWQgYmxvY2sgdHlwZQBGYWlsdXJlIHRvIGNyZWF0ZSB0ZW1wb3JhcnkgZmlsZQBDYW4ndCBvcGVuIGZpbGUATm8gc3VjaCBmaWxlAFByZW1hdHVyZSBlbmQgb2YgZmlsZQBDYW4ndCByZW1vdmUgZmlsZQBpbnZhbGlkIGxpdGVyYWwvbGVuZ3RoIGNvZGUAaW52YWxpZCBkaXN0YW5jZSBjb2RlAHVua25vd24gY29tcHJlc3Npb24gbWV0aG9kAHN0cmVhbSBlbmQAQ29tcHJlc3NlZCBkYXRhIGludmFsaWQATXVsdGktZGlzayB6aXAgYXJjaGl2ZXMgbm90IHN1cHBvcnRl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UgAIANIACAAyAAgAsgAIAHIACADyAAgACgAIAIoACABKAAgAygAIACoACACqAAgAagAIAOoACAAaAAgAmgAIAFoACADaAAgAOgAIALoACAB6AAgA+gAIAAYACACGAAgARgAIAMYACAAmAAgApgAIAGYACADmAAgAFgAIAJYACABWAAgA1gAIADYACAC2AAgAdgAIAPYACAAOAAgAjgAIAE4ACADOAAgALgAIAK4ACABuAAgA7gAIAB4ACACeAAgAXgAIAN4ACAA+AAgAvgAIAH4ACAD+AAgAAQAIAIEACABBAAgAwQAIACEACAChAAgAYQAIAOEACAARAAgAkQAIAFEACADRAAgAMQAIALEACABxAAgA8QAIAAkACACJAAgASQAIAMkACAApAAgAqQAIAGkACADpAAgAGQAIAJkACABZAAgA2QAIADkACAC5AAgAeQAIAPkACAAFAAgAhQAIAEUACADFAAgAJQAIAKUACABlAAgA5QAIABUACACVAAgAVQAIANUACAA1AAgAtQAIAHUACAD1AAgADQAIAI0ACABNAAgAzQAIAC0ACACtAAgAbQAIAO0ACAAdAAgAnQAIAF0ACADdAAgAPQAIAL0ACAB9AAgA/QAIABMACQATAQkAkwAJAJMBCQBTAAkAUwEJANMACQDTAQkAMwAJADMBCQCzAAkAswEJAHMACQBzAQkA8wAJAPMBCQALAAkACwEJAIsACQCLAQkASwAJAEsBCQDLAAkAywEJACsACQArAQkAqwAJAKsBCQBrAAkAawEJAOsACQDrAQkAGwAJABsBCQCbAAkAmwEJAFsACQBbAQkA2wAJANsBCQA7AAkAOwEJALsACQC7AQkAewAJAHsBCQD7AAkA+wEJAAcACQAHAQkAhwAJAIcBCQBHAAkARwEJAMcACQDHAQkAJwAJACcBCQCnAAkApwEJAGcACQBnAQkA5wAJAOcBCQAXAAkAFwEJAJcACQCXAQkAVwAJAFcBCQDXAAkA1wEJADcACQA3AQkAtwAJALcBCQB3AAkAdwEJAPcACQD3AQkADwAJAA8BCQCPAAkAjwEJAE8ACQBPAQkAzwAJAM8BCQAvAAkALwEJAK8ACQCvAQkAbwAJAG8BCQDvAAkA7wEJAB8ACQAfAQkAnwAJAJ8BCQBfAAkAXwEJAN8ACQDfAQkAPwAJAD8BCQC/AAkA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SXMgYSBkaXJlY3RvcnkAVGV4dCBmaWxlIGJ1c3kARXhlYyBmb3JtYXQgZXJyb3IASW52YWxpZCBhcmd1bWVudABBcmd1bWVudCBsaXN0IHRvbyBsb25nAFN5bWJvbGljIGxpbmsgbG9vcABGaWxlbmFtZSB0b28gbG9uZwBUb28gbWFueSBvcGVuIGZpbGVzIGluIHN5c3RlbQBObyBmaWxlIGRlc2NyaXB0b3JzIGF2YWlsYWJsZQBCYWQgZmlsZSBkZXNjcmlwdG9yAE5vIGNoaWxkIHByb2Nlc3MAQmFkIGFkZHJlc3MARmlsZSB0b28gbGFyZ2UAVG9vIG1hbnkgbGlua3MATm8gbG9ja3MgYXZhaWxhYmxlAFJlc291cmNlIGRlYWRsb2NrIHdvdWxkIG9jY3VyAFN0YXRlIG5vdCByZWNvdmVyYWJsZQBQcmV2aW91cyBvd25lciBkaWVkAE9wZXJhdGlvbiBjYW5jZWxlZABGdW5jdGlvbiBub3QgaW1wbGVtZW50ZWQATm8gbWVzc2FnZSBvZiBkZXNpcmVkIHR5cGUASWRlbnRpZmllciByZW1vdmVkAERldmljZSBub3QgYSBzdHJlYW0ATm8gZGF0YSBhdmFpbGFibGUARGV2aWNlIHRpbWVvdXQAT3V0IG9mIHN0cmVhbXMgcmVzb3VyY2VzAExpbmsgaGFzIGJlZW4gc2V2ZXJlZABQcm90b2NvbCBlcnJvcgBCYWQgbWVzc2FnZQBGaWxlIGRlc2NyaXB0b3IgaW4gYmFkIHN0YXRlAE5vdCBhIHNvY2tldABEZXN0aW5hdGlvbiBhZGRyZXNzIHJlcXVpcmVkAE1lc3NhZ2UgdG9vIGxhcmdlAFByb3RvY29sIHdyb25nIHR5cGUgZm9yIHNvY2tldABQcm90b2NvbCBub3QgYXZhaWxhYmxlAFByb3RvY29sIG5vdCBzdXBwb3J0ZWQAU29ja2V0IHR5cGUgbm90IHN1cHBvcnRlZABOb3Qgc3VwcG9ydGVkAFByb3RvY29sIGZhbWlseSBub3Qgc3VwcG9ydGVkAEFkZHJlc3MgZmFtaWx5IG5vdCBzdXBwb3J0ZWQgYnkgcHJvdG9jb2wAQWRkcmVzcyBub3QgYXZhaWxhYmxlAE5ldHdvcmsgaXMgZG93bgBOZXR3b3JrIHVucmVhY2hhYmxlAENvbm5lY3Rpb24gcmVzZXQgYnkgbmV0d29yawBDb25uZWN0aW9uIGFib3J0ZWQATm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZQBTb2NrZXQgaXMgY29ubmVjdGVkAFNvY2tldCBub3QgY29ubmVjdGVkAENhbm5vdCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93bgBPcGVyYXRpb24gYWxyZWFkeSBpbiBwcm9ncmVzcwBPcGVyYXRpb24gaW4gcHJvZ3Jlc3MAU3RhbGUgZmlsZSBoYW5kbGUAUmVtb3RlIEkvTyBlcnJvcgBRdW90YSBleGNlZWRlZABObyBtZWRpdW0gZm91bmQAV3JvbmcgbWVkaXVtIHR5cGUATm8gZXJyb3IgaW5mb3JtYXRpb24AQcCAAQuFARMAAAAUAAAAFQAAABYAAAAXAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAgAAAAIQAAACIAAAAjAAAAgERQADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAQfSCAQsCXEQAQbCDAQsQ/////////////////////w==\";Bo(Hi)||(Hi=P(Hi));function to(Je){try{if(Je==Hi&&ce)return new Uint8Array(ce);var st=Me(Je);if(st)return st;if(R)return R(Je);throw\"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)\"}catch(St){rs(St)}}function vo(Je,st){var St,lr,ee;try{ee=to(Je),lr=new WebAssembly.Module(ee),St=new WebAssembly.Instance(lr,st)}catch(Oe){var Ie=Oe.toString();throw te(\"failed to compile wasm module: \"+Ie),(Ie.includes(\"imported Memory\")||Ie.includes(\"memory import\"))&&te(\"Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time).\"),Oe}return[St,lr]}function RA(){var Je={a:fu};function st(ee,Ie){var Oe=ee.exports;r.asm=Oe,Be=r.asm.g,z(Be.buffer),$=r.asm.W,gn(r.asm.h),wo(\"wasm-instantiate\")}if(oi(\"wasm-instantiate\"),r.instantiateWasm)try{var St=r.instantiateWasm(Je,st);return St}catch(ee){return te(\"Module.instantiateWasm callback failed with error: \"+ee),!1}var lr=vo(Hi,Je);return st(lr[0]),r.asm}function pf(Je){return F.getFloat32(Je,!0)}function Eh(Je){return F.getFloat64(Je,!0)}function Ih(Je){return F.getInt16(Je,!0)}function ro(Je){return F.getInt32(Je,!0)}function jn(Je,st){F.setInt32(Je,st,!0)}function Rs(Je){for(;Je.length>0;){var st=Je.shift();if(typeof st==\"function\"){st(r);continue}var St=st.func;typeof St==\"number\"?st.arg===void 0?$.get(St)():$.get(St)(st.arg):St(st.arg===void 0?null:st.arg)}}function no(Je,st){var St=new Date(ro((Je>>2)*4)*1e3);jn((st>>2)*4,St.getUTCSeconds()),jn((st+4>>2)*4,St.getUTCMinutes()),jn((st+8>>2)*4,St.getUTCHours()),jn((st+12>>2)*4,St.getUTCDate()),jn((st+16>>2)*4,St.getUTCMonth()),jn((st+20>>2)*4,St.getUTCFullYear()-1900),jn((st+24>>2)*4,St.getUTCDay()),jn((st+36>>2)*4,0),jn((st+32>>2)*4,0);var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),ee=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((st+28>>2)*4,ee),no.GMTString||(no.GMTString=rt(\"GMT\")),jn((st+40>>2)*4,no.GMTString),st}function lu(Je,st){return no(Je,st)}function cu(Je,st,St){ke.copyWithin(Je,st,st+St)}function uu(Je){try{return Be.grow(Je-Pe.byteLength+65535>>>16),z(Be.buffer),1}catch{}}function FA(Je){var st=ke.length;Je=Je>>>0;var St=2147483648;if(Je>St)return!1;for(var lr=1;lr<=4;lr*=2){var ee=st*(1+.2/lr);ee=Math.min(ee,Je+100663296);var Ie=Math.min(St,Ne(Math.max(Je,ee),65536)),Oe=uu(Ie);if(Oe)return!0}return!1}function NA(Je){Ae(Je)}function aa(Je){var st=Date.now()/1e3|0;return Je&&jn((Je>>2)*4,st),st}function la(){if(la.called)return;la.called=!0;var Je=new Date().getFullYear(),st=new Date(Je,0,1),St=new Date(Je,6,1),lr=st.getTimezoneOffset(),ee=St.getTimezoneOffset(),Ie=Math.max(lr,ee);jn((Sl()>>2)*4,Ie*60),jn((Cs()>>2)*4,+(lr!=ee));function Oe(fn){var ai=fn.toTimeString().match(/\\(([A-Za-z ]+)\\)$/);return ai?ai[1]:\"GMT\"}var ht=Oe(st),mt=Oe(St),Dt=rt(ht),tr=rt(mt);ee<lr?(jn((Li()>>2)*4,Dt),jn((Li()+4>>2)*4,tr)):(jn((Li()>>2)*4,tr),jn((Li()+4>>2)*4,Dt))}function OA(Je){la();var st=Date.UTC(ro((Je+20>>2)*4)+1900,ro((Je+16>>2)*4),ro((Je+12>>2)*4),ro((Je+8>>2)*4),ro((Je+4>>2)*4),ro((Je>>2)*4),0),St=new Date(st);jn((Je+24>>2)*4,St.getUTCDay());var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),ee=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((Je+28>>2)*4,ee),St.getTime()/1e3|0}var gr=typeof atob==\"function\"?atob:function(Je){var st=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",St=\"\",lr,ee,Ie,Oe,ht,mt,Dt,tr=0;Je=Je.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");do Oe=st.indexOf(Je.charAt(tr++)),ht=st.indexOf(Je.charAt(tr++)),mt=st.indexOf(Je.charAt(tr++)),Dt=st.indexOf(Je.charAt(tr++)),lr=Oe<<2|ht>>4,ee=(ht&15)<<4|mt>>2,Ie=(mt&3)<<6|Dt,St=St+String.fromCharCode(lr),mt!==64&&(St=St+String.fromCharCode(ee)),Dt!==64&&(St=St+String.fromCharCode(Ie));while(tr<Je.length);return St};function So(Je){if(typeof C==\"boolean\"&&C){var st;try{st=Buffer.from(Je,\"base64\")}catch{st=new Buffer(Je,\"base64\")}return new Uint8Array(st.buffer,st.byteOffset,st.byteLength)}try{for(var St=gr(Je),lr=new Uint8Array(St.length),ee=0;ee<St.length;++ee)lr[ee]=St.charCodeAt(ee);return lr}catch{throw new Error(\"Converting base64 string to bytes failed.\")}}function Me(Je){if(Bo(Je))return So(Je.slice(eo.length))}var fu={e:lu,c:cu,d:FA,a:NA,b:aa,f:OA},Cr=RA(),hf=r.___wasm_call_ctors=Cr.h,LA=r._zip_ext_count_symlinks=Cr.i,MA=r._zip_file_get_external_attributes=Cr.j,Au=r._zipstruct_statS=Cr.k,pu=r._zipstruct_stat_size=Cr.l,ac=r._zipstruct_stat_mtime=Cr.m,ve=r._zipstruct_stat_crc=Cr.n,Nt=r._zipstruct_errorS=Cr.o,lc=r._zipstruct_error_code_zip=Cr.p,Ni=r._zipstruct_stat_comp_size=Cr.q,io=r._zipstruct_stat_comp_method=Cr.r,Rt=r._zip_close=Cr.s,xn=r._zip_delete=Cr.t,ca=r._zip_dir_add=Cr.u,ji=r._zip_discard=Cr.v,Oi=r._zip_error_init_with_code=Cr.w,Oa=r._zip_get_error=Cr.x,dn=r._zip_file_get_error=Cr.y,Jn=r._zip_error_strerror=Cr.z,hu=r._zip_fclose=Cr.A,Ch=r._zip_file_add=Cr.B,La=r._free=Cr.C,Ma=r._malloc=Cr.D,Ua=r._zip_source_error=Cr.E,Xe=r._zip_source_seek=Cr.F,Ha=r._zip_file_set_external_attributes=Cr.G,gf=r._zip_file_set_mtime=Cr.H,cc=r._zip_fopen_index=Cr.I,wn=r._zip_fread=Cr.J,ua=r._zip_get_name=Cr.K,_A=r._zip_get_num_entries=Cr.L,UA=r._zip_source_read=Cr.M,fa=r._zip_name_locate=Cr.N,vl=r._zip_open_from_source=Cr.O,Mt=r._zip_set_file_compression=Cr.P,kn=r._zip_source_buffer=Cr.Q,Aa=r._zip_source_buffer_create=Cr.R,ja=r._zip_source_close=Cr.S,ns=r._zip_source_free=Cr.T,uc=r._zip_source_keep=Cr.U,gu=r._zip_source_open=Cr.V,fc=r._zip_source_tell=Cr.X,qa=r._zip_stat_index=Cr.Y,Li=r.__get_tzname=Cr.Z,Cs=r.__get_daylight=Cr._,Sl=r.__get_timezone=Cr.$,df=r.stackSave=Cr.aa,Ac=r.stackRestore=Cr.ba,wi=r.stackAlloc=Cr.ca;r.cwrap=se,r.getValue=pe;var Qn;nn=function Je(){Qn||pc(),Qn||(nn=Je)};function pc(Je){if(Je=Je||f,Ir>0||(Et(),Ir>0))return;function st(){Qn||(Qn=!0,r.calledRun=!0,!Ce&&(qt(),s(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),ir()))}r.setStatus?(r.setStatus(\"Running...\"),setTimeout(function(){setTimeout(function(){r.setStatus(\"\")},1),st()},1)):st()}if(r.run=pc,r.preInit)for(typeof r.preInit==\"function\"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return pc(),e}}();typeof wT==\"object\"&&typeof Jj==\"object\"?Jj.exports=Kj:typeof define==\"function\"&&define.amd?define([],function(){return Kj}):typeof wT==\"object\"&&(wT.createModule=Kj)});var jp,Hde,jde,qde=It(()=>{jp=[\"number\",\"number\"],Hde=(X=>(X[X.ZIP_ER_OK=0]=\"ZIP_ER_OK\",X[X.ZIP_ER_MULTIDISK=1]=\"ZIP_ER_MULTIDISK\",X[X.ZIP_ER_RENAME=2]=\"ZIP_ER_RENAME\",X[X.ZIP_ER_CLOSE=3]=\"ZIP_ER_CLOSE\",X[X.ZIP_ER_SEEK=4]=\"ZIP_ER_SEEK\",X[X.ZIP_ER_READ=5]=\"ZIP_ER_READ\",X[X.ZIP_ER_WRITE=6]=\"ZIP_ER_WRITE\",X[X.ZIP_ER_CRC=7]=\"ZIP_ER_CRC\",X[X.ZIP_ER_ZIPCLOSED=8]=\"ZIP_ER_ZIPCLOSED\",X[X.ZIP_ER_NOENT=9]=\"ZIP_ER_NOENT\",X[X.ZIP_ER_EXISTS=10]=\"ZIP_ER_EXISTS\",X[X.ZIP_ER_OPEN=11]=\"ZIP_ER_OPEN\",X[X.ZIP_ER_TMPOPEN=12]=\"ZIP_ER_TMPOPEN\",X[X.ZIP_ER_ZLIB=13]=\"ZIP_ER_ZLIB\",X[X.ZIP_ER_MEMORY=14]=\"ZIP_ER_MEMORY\",X[X.ZIP_ER_CHANGED=15]=\"ZIP_ER_CHANGED\",X[X.ZIP_ER_COMPNOTSUPP=16]=\"ZIP_ER_COMPNOTSUPP\",X[X.ZIP_ER_EOF=17]=\"ZIP_ER_EOF\",X[X.ZIP_ER_INVAL=18]=\"ZIP_ER_INVAL\",X[X.ZIP_ER_NOZIP=19]=\"ZIP_ER_NOZIP\",X[X.ZIP_ER_INTERNAL=20]=\"ZIP_ER_INTERNAL\",X[X.ZIP_ER_INCONS=21]=\"ZIP_ER_INCONS\",X[X.ZIP_ER_REMOVE=22]=\"ZIP_ER_REMOVE\",X[X.ZIP_ER_DELETED=23]=\"ZIP_ER_DELETED\",X[X.ZIP_ER_ENCRNOTSUPP=24]=\"ZIP_ER_ENCRNOTSUPP\",X[X.ZIP_ER_RDONLY=25]=\"ZIP_ER_RDONLY\",X[X.ZIP_ER_NOPASSWD=26]=\"ZIP_ER_NOPASSWD\",X[X.ZIP_ER_WRONGPASSWD=27]=\"ZIP_ER_WRONGPASSWD\",X[X.ZIP_ER_OPNOTSUPP=28]=\"ZIP_ER_OPNOTSUPP\",X[X.ZIP_ER_INUSE=29]=\"ZIP_ER_INUSE\",X[X.ZIP_ER_TELL=30]=\"ZIP_ER_TELL\",X[X.ZIP_ER_COMPRESSED_DATA=31]=\"ZIP_ER_COMPRESSED_DATA\",X))(Hde||{}),jde=t=>({get HEAPU8(){return t.HEAPU8},errors:Hde,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_EXCL:2,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:t._malloc(1),uint32S:t._malloc(4),malloc:t._malloc,free:t._free,getValue:t.getValue,openFromSource:t.cwrap(\"zip_open_from_source\",\"number\",[\"number\",\"number\",\"number\"]),close:t.cwrap(\"zip_close\",\"number\",[\"number\"]),discard:t.cwrap(\"zip_discard\",null,[\"number\"]),getError:t.cwrap(\"zip_get_error\",\"number\",[\"number\"]),getName:t.cwrap(\"zip_get_name\",\"string\",[\"number\",\"number\",\"number\"]),getNumEntries:t.cwrap(\"zip_get_num_entries\",\"number\",[\"number\",\"number\"]),delete:t.cwrap(\"zip_delete\",\"number\",[\"number\",\"number\"]),statIndex:t.cwrap(\"zip_stat_index\",\"number\",[\"number\",...jp,\"number\",\"number\"]),fopenIndex:t.cwrap(\"zip_fopen_index\",\"number\",[\"number\",...jp,\"number\"]),fread:t.cwrap(\"zip_fread\",\"number\",[\"number\",\"number\",\"number\",\"number\"]),fclose:t.cwrap(\"zip_fclose\",\"number\",[\"number\"]),dir:{add:t.cwrap(\"zip_dir_add\",\"number\",[\"number\",\"string\"])},file:{add:t.cwrap(\"zip_file_add\",\"number\",[\"number\",\"string\",\"number\",\"number\"]),getError:t.cwrap(\"zip_file_get_error\",\"number\",[\"number\"]),getExternalAttributes:t.cwrap(\"zip_file_get_external_attributes\",\"number\",[\"number\",...jp,\"number\",\"number\",\"number\"]),setExternalAttributes:t.cwrap(\"zip_file_set_external_attributes\",\"number\",[\"number\",...jp,\"number\",\"number\",\"number\"]),setMtime:t.cwrap(\"zip_file_set_mtime\",\"number\",[\"number\",...jp,\"number\",\"number\"]),setCompression:t.cwrap(\"zip_set_file_compression\",\"number\",[\"number\",...jp,\"number\",\"number\"])},ext:{countSymlinks:t.cwrap(\"zip_ext_count_symlinks\",\"number\",[\"number\"])},error:{initWithCode:t.cwrap(\"zip_error_init_with_code\",null,[\"number\",\"number\"]),strerror:t.cwrap(\"zip_error_strerror\",\"string\",[\"number\"])},name:{locate:t.cwrap(\"zip_name_locate\",\"number\",[\"number\",\"string\",\"number\"])},source:{fromUnattachedBuffer:t.cwrap(\"zip_source_buffer_create\",\"number\",[\"number\",...jp,\"number\",\"number\"]),fromBuffer:t.cwrap(\"zip_source_buffer\",\"number\",[\"number\",\"number\",...jp,\"number\"]),free:t.cwrap(\"zip_source_free\",null,[\"number\"]),keep:t.cwrap(\"zip_source_keep\",null,[\"number\"]),open:t.cwrap(\"zip_source_open\",\"number\",[\"number\"]),close:t.cwrap(\"zip_source_close\",\"number\",[\"number\"]),seek:t.cwrap(\"zip_source_seek\",\"number\",[\"number\",...jp,\"number\"]),tell:t.cwrap(\"zip_source_tell\",\"number\",[\"number\"]),read:t.cwrap(\"zip_source_read\",\"number\",[\"number\",\"number\",\"number\"]),error:t.cwrap(\"zip_source_error\",\"number\",[\"number\"])},struct:{statS:t.cwrap(\"zipstruct_statS\",\"number\",[]),statSize:t.cwrap(\"zipstruct_stat_size\",\"number\",[\"number\"]),statCompSize:t.cwrap(\"zipstruct_stat_comp_size\",\"number\",[\"number\"]),statCompMethod:t.cwrap(\"zipstruct_stat_comp_method\",\"number\",[\"number\"]),statMtime:t.cwrap(\"zipstruct_stat_mtime\",\"number\",[\"number\"]),statCrc:t.cwrap(\"zipstruct_stat_crc\",\"number\",[\"number\"]),errorS:t.cwrap(\"zipstruct_errorS\",\"number\",[]),errorCodeZip:t.cwrap(\"zipstruct_error_code_zip\",\"number\",[\"number\"])}})});function zj(t,e){let r=t.indexOf(e);if(r<=0)return null;let s=r;for(;r>=0&&(s=r+e.length,t[s]!==K.sep);){if(t[r-1]===K.sep)return null;r=t.indexOf(e,s)}return t.length>s&&t[s]!==K.sep?null:t.slice(0,s)}var tA,Gde=It(()=>{bt();bt();rA();tA=class t extends n0{static async openPromise(e,r){let s=new t(r);try{return await e(s)}finally{s.saveAndClose()}}constructor(e={}){let r=e.fileExtensions,s=e.readOnlyArchives,a=typeof r>\"u\"?f=>zj(f,\".zip\"):f=>{for(let p of r){let h=zj(f,p);if(h)return h}return null},n=(f,p)=>new ps(p,{baseFs:f,readOnly:s,stats:f.statSync(p),customZipImplementation:e.customZipImplementation}),c=async(f,p)=>{let h={baseFs:f,readOnly:s,stats:await f.statPromise(p),customZipImplementation:e.customZipImplementation};return()=>new ps(p,h)};super({...e,factorySync:n,factoryPromise:c,getMountPoint:a})}}});var Zj,vI,Xj=It(()=>{Vj();Zj=class extends Error{constructor(e,r){super(e),this.name=\"Libzip Error\",this.code=r}},vI=class{constructor(e){this.filesShouldBeCached=!0;let r=\"buffer\"in e?e.buffer:e.baseFs.readFileSync(e.path);this.libzip=Bv();let s=this.libzip.malloc(4);try{let c=0;e.readOnly&&(c|=this.libzip.ZIP_RDONLY);let f=this.allocateUnattachedSource(r);try{this.zip=this.libzip.openFromSource(f,c,s),this.lzSource=f}catch(p){throw this.libzip.source.free(f),p}if(this.zip===0){let p=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(p,this.libzip.getValue(s,\"i32\")),this.makeLibzipError(p)}}finally{this.libzip.free(s)}let a=this.libzip.getNumEntries(this.zip,0),n=new Array(a);for(let c=0;c<a;++c)n[c]=this.libzip.getName(this.zip,c,0);if(this.listings=n,this.symlinkCount=this.libzip.ext.countSymlinks(this.zip),this.symlinkCount===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}getSymlinkCount(){return this.symlinkCount}getListings(){return this.listings}stat(e){let r=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,r)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.libzip.struct.statSize(r)>>>0,n=this.libzip.struct.statMtime(r)>>>0,c=this.libzip.struct.statCrc(r)>>>0;return{size:a,mtime:n,crc:c}}makeLibzipError(e){let r=this.libzip.struct.errorCodeZip(e),s=this.libzip.error.strerror(e),a=new Zj(s,this.libzip.errors[r]);if(r===this.libzip.errors.ZIP_ER_CHANGED)throw new Error(`Assertion failed: Unexpected libzip error: ${a.message}`);return a}setFileSource(e,r,s){let a=this.allocateSource(s);try{let n=this.libzip.file.add(this.zip,e,a,this.libzip.ZIP_FL_OVERWRITE);if(n===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(r!==null&&this.libzip.file.setCompression(this.zip,n,0,r[0],r[1])===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return n}catch(n){throw this.libzip.source.free(a),n}}setMtime(e,r){if(this.libzip.file.setMtime(this.zip,e,0,r,0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}getExternalAttributes(e){if(this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let s=this.libzip.getValue(this.libzip.uint08S,\"i8\")>>>0,a=this.libzip.getValue(this.libzip.uint32S,\"i32\")>>>0;return[s,a]}setExternalAttributes(e,r,s){if(this.libzip.file.setExternalAttributes(this.zip,e,0,0,r,s)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}locate(e){return this.libzip.name.locate(this.zip,e,0)}getFileSource(e){let r=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,r)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.libzip.struct.statCompSize(r),n=this.libzip.struct.statCompMethod(r),c=this.libzip.malloc(a);try{let f=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(f===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let p=this.libzip.fread(f,c,a,0);if(p===-1)throw this.makeLibzipError(this.libzip.file.getError(f));if(p<a)throw new Error(\"Incomplete read\");if(p>a)throw new Error(\"Overread\");let h=this.libzip.HEAPU8.subarray(c,c+a);return{data:Buffer.from(h),compressionMethod:n}}finally{this.libzip.fclose(f)}}finally{this.libzip.free(c)}}deleteEntry(e){if(this.libzip.delete(this.zip,e)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}addDirectory(e){let r=this.libzip.dir.add(this.zip,e);if(r===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return r}getBufferAndClose(){try{if(this.libzip.source.keep(this.lzSource),this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.source.open(this.lzSource)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_END)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let e=this.libzip.source.tell(this.lzSource);if(e===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_SET)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let r=this.libzip.malloc(e);if(!r)throw new Error(\"Couldn't allocate enough memory\");try{let s=this.libzip.source.read(this.lzSource,r,e);if(s===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(s<e)throw new Error(\"Incomplete read\");if(s>e)throw new Error(\"Overread\");let a=Buffer.from(this.libzip.HEAPU8.subarray(r,r+e));return process.env.YARN_IS_TEST_ENV&&process.env.YARN_ZIP_DATA_EPILOGUE&&(a=Buffer.concat([a,Buffer.from(process.env.YARN_ZIP_DATA_EPILOGUE)])),a}finally{this.libzip.free(r)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource)}}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));let r=this.libzip.malloc(e.byteLength);if(!r)throw new Error(\"Couldn't allocate enough memory\");return new Uint8Array(this.libzip.HEAPU8.buffer,r,e.byteLength).set(e),{buffer:r,byteLength:e.byteLength}}allocateUnattachedSource(e){let r=this.libzip.struct.errorS(),{buffer:s,byteLength:a}=this.allocateBuffer(e),n=this.libzip.source.fromUnattachedBuffer(s,a,0,1,r);if(n===0)throw this.libzip.free(r),this.makeLibzipError(r);return n}allocateSource(e){let{buffer:r,byteLength:s}=this.allocateBuffer(e),a=this.libzip.source.fromBuffer(this.zip,r,s,0,1);if(a===0)throw this.libzip.free(r),this.makeLibzipError(this.libzip.getError(this.zip));return a}discard(){this.libzip.discard(this.zip)}}});function vmt(t){if(typeof t==\"string\"&&String(+t)===t)return+t;if(typeof t==\"number\"&&Number.isFinite(t))return t<0?Date.now()/1e3:t;if(Wde.types.isDate(t))return t.getTime()/1e3;throw new Error(\"Invalid time\")}function BT(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}var ka,$j,Wde,e6,lm,t6,r6,Yde,ps,vT=It(()=>{bt();bt();bt();bt();bt();bt();ka=ye(\"fs\"),$j=ye(\"stream\"),Wde=ye(\"util\"),e6=et(ye(\"zlib\"));Xj();lm=3,t6=0,r6=8,Yde=\"mixed\";ps=class extends Uf{constructor(r,s={}){super();this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=!1;this.readOnly=!1;s.readOnly&&(this.readOnly=!0);let a=s;this.level=typeof a.level<\"u\"?a.level:Yde;let n=s.customZipImplementation??vI;if(typeof r==\"string\"){let{baseFs:f=new Yn}=a;this.baseFs=f,this.path=r}else this.path=null,this.baseFs=null;if(s.stats)this.stats=s.stats;else if(typeof r==\"string\")try{this.stats=this.baseFs.statSync(r)}catch(f){if(f.code===\"ENOENT\"&&a.create)this.stats=el.makeDefaultStats();else throw f}else this.stats=el.makeDefaultStats();typeof r==\"string\"?s.create?this.zipImpl=new n({buffer:BT(),readOnly:this.readOnly}):this.zipImpl=new n({path:r,baseFs:this.baseFs,readOnly:this.readOnly,size:this.stats.size}):this.zipImpl=new n({buffer:r??BT(),readOnly:this.readOnly}),this.listings.set(vt.root,new Set);let c=this.zipImpl.getListings();for(let f=0;f<c.length;f++){let p=c[f];if(K.isAbsolute(p))continue;let h=K.resolve(vt.root,p);this.registerEntry(h,f),p.endsWith(\"/\")&&this.registerListing(h)}this.symlinkCount=this.zipImpl.getSymlinkCount(),this.ready=!0}getExtractHint(r){for(let s of this.entries.keys()){let a=this.pathUtils.extname(s);if(r.relevantExtensions.has(a))return!0}return!1}getAllFiles(){return Array.from(this.entries.keys())}getRealPath(){if(!this.path)throw new Error(\"ZipFS don't have real paths when loaded from a buffer\");return this.path}prepareClose(){if(!this.ready)throw or.EBUSY(\"archive closed, close\");Ed(this)}getBufferAndClose(){if(this.prepareClose(),this.entries.size===0)return this.discardAndClose(),BT();try{return this.zipImpl.getBufferAndClose()}finally{this.ready=!1}}discardAndClose(){this.prepareClose(),this.zipImpl.discard(),this.ready=!1}saveAndClose(){if(!this.path||!this.baseFs)throw new Error(\"ZipFS cannot be saved and must be discarded when loaded from a buffer\");if(this.readOnly){this.discardAndClose();return}let r=this.baseFs.existsSync(this.path)||this.stats.mode===el.DEFAULT_MODE?void 0:this.stats.mode;this.baseFs.writeFileSync(this.path,this.getBufferAndClose(),{mode:r}),this.ready=!1}resolve(r){return K.resolve(vt.root,r)}async openPromise(r,s,a){return this.openSync(r,s,a)}openSync(r,s,a){let n=this.nextFd++;return this.fds.set(n,{cursor:0,p:r}),n}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(r,s){return this.opendirSync(r,s)}opendirSync(r,s={}){let a=this.resolveFilename(`opendir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`opendir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`opendir '${r}'`);let c=[...n],f=this.openSync(a,\"r\");return hx(this,a,c,{onClose:()=>{this.closeSync(f)}})}async readPromise(r,s,a,n,c){return this.readSync(r,s,a,n,c)}readSync(r,s,a=0,n=s.byteLength,c=-1){let f=this.fds.get(r);if(typeof f>\"u\")throw or.EBADF(\"read\");let p=c===-1||c===null?f.cursor:c,h=this.readFileSync(f.p);h.copy(s,a,p,p+n);let E=Math.max(0,Math.min(h.length-p,n));return(c===-1||c===null)&&(f.cursor+=E),E}async writePromise(r,s,a,n,c){return typeof s==\"string\"?this.writeSync(r,s,c):this.writeSync(r,s,a,n,c)}writeSync(r,s,a,n,c){throw typeof this.fds.get(r)>\"u\"?or.EBADF(\"read\"):new Error(\"Unimplemented\")}async closePromise(r){return this.closeSync(r)}closeSync(r){if(typeof this.fds.get(r)>\"u\")throw or.EBADF(\"read\");this.fds.delete(r)}createReadStream(r,{encoding:s}={}){if(r===null)throw new Error(\"Unimplemented\");let a=this.openSync(r,\"r\"),n=Object.assign(new $j.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(f,p)=>{clearImmediate(c),this.closeSync(a),p(f)}}),{close(){n.destroy()},bytesRead:0,path:r,pending:!1}),c=setImmediate(async()=>{try{let f=await this.readFilePromise(r,s);n.bytesRead=f.length,n.end(f)}catch(f){n.destroy(f)}});return n}createWriteStream(r,{encoding:s}={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);if(r===null)throw new Error(\"Unimplemented\");let a=[],n=this.openSync(r,\"w\"),c=Object.assign(new $j.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(f,p)=>{try{f?p(f):(this.writeFileSync(r,Buffer.concat(a),s),p(null))}catch(h){p(h)}finally{this.closeSync(n)}}}),{close(){c.destroy()},bytesWritten:0,path:r,pending:!1});return c.on(\"data\",f=>{let p=Buffer.from(f);c.bytesWritten+=p.length,a.push(p)}),c}async realpathPromise(r){return this.realpathSync(r)}realpathSync(r){let s=this.resolveFilename(`lstat '${r}'`,r);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`lstat '${r}'`);return s}async existsPromise(r){return this.existsSync(r)}existsSync(r){if(!this.ready)throw or.EBUSY(`archive closed, existsSync '${r}'`);if(this.symlinkCount===0){let a=K.resolve(vt.root,r);return this.entries.has(a)||this.listings.has(a)}let s;try{s=this.resolveFilename(`stat '${r}'`,r,void 0,!1)}catch{return!1}return s===void 0?!1:this.entries.has(s)||this.listings.has(s)}async accessPromise(r,s){return this.accessSync(r,s)}accessSync(r,s=ka.constants.F_OK){let a=this.resolveFilename(`access '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`access '${r}'`);if(this.readOnly&&s&ka.constants.W_OK)throw or.EROFS(`access '${r}'`)}async statPromise(r,s={bigint:!1}){return s.bigint?this.statSync(r,{bigint:!0}):this.statSync(r)}statSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`stat '${r}'`,r,void 0,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`stat '${r}'`)}if(r[r.length-1]===\"/\"&&!this.listings.has(a))throw or.ENOTDIR(`stat '${r}'`);return this.statImpl(`stat '${r}'`,a,s)}}async fstatPromise(r,s){return this.fstatSync(r,s)}fstatSync(r,s){let a=this.fds.get(r);if(typeof a>\"u\")throw or.EBADF(\"fstatSync\");let{p:n}=a,c=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(c)&&!this.listings.has(c))throw or.ENOENT(`stat '${n}'`);if(n[n.length-1]===\"/\"&&!this.listings.has(c))throw or.ENOTDIR(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,c,s)}async lstatPromise(r,s={bigint:!1}){return s.bigint?this.lstatSync(r,{bigint:!0}):this.lstatSync(r)}lstatSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`lstat '${r}'`,r,!1,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`lstat '${r}'`)}if(r[r.length-1]===\"/\"&&!this.listings.has(a))throw or.ENOTDIR(`lstat '${r}'`);return this.statImpl(`lstat '${r}'`,a,s)}}statImpl(r,s,a={}){let n=this.entries.get(s);if(typeof n<\"u\"){let c=this.zipImpl.stat(n),f=c.crc,p=c.size,h=c.mtime*1e3,E=this.stats.uid,C=this.stats.gid,S=512,P=Math.ceil(c.size/S),I=h,R=h,N=h,U=new Date(I),W=new Date(R),te=new Date(N),ie=new Date(h),Ae=this.listings.has(s)?ka.constants.S_IFDIR:this.isSymbolicLink(n)?ka.constants.S_IFLNK:ka.constants.S_IFREG,ce=Ae===ka.constants.S_IFDIR?493:420,me=Ae|this.getUnixMode(n,ce)&511,pe=Object.assign(new el.StatEntry,{uid:E,gid:C,size:p,blksize:S,blocks:P,atime:U,birthtime:W,ctime:te,mtime:ie,atimeMs:I,birthtimeMs:R,ctimeMs:N,mtimeMs:h,mode:me,crc:f});return a.bigint===!0?el.convertToBigIntStats(pe):pe}if(this.listings.has(s)){let c=this.stats.uid,f=this.stats.gid,p=0,h=512,E=0,C=this.stats.mtimeMs,S=this.stats.mtimeMs,P=this.stats.mtimeMs,I=this.stats.mtimeMs,R=new Date(C),N=new Date(S),U=new Date(P),W=new Date(I),te=ka.constants.S_IFDIR|493,Ae=Object.assign(new el.StatEntry,{uid:c,gid:f,size:p,blksize:h,blocks:E,atime:R,birthtime:N,ctime:U,mtime:W,atimeMs:C,birthtimeMs:S,ctimeMs:P,mtimeMs:I,mode:te,crc:0});return a.bigint===!0?el.convertToBigIntStats(Ae):Ae}throw new Error(\"Unreachable\")}getUnixMode(r,s){let[a,n]=this.zipImpl.getExternalAttributes(r);return a!==lm?s:n>>>16}registerListing(r){let s=this.listings.get(r);if(s)return s;this.registerListing(K.dirname(r)).add(K.basename(r));let n=new Set;return this.listings.set(r,n),n}registerEntry(r,s){this.registerListing(K.dirname(r)).add(K.basename(r)),this.entries.set(r,s)}unregisterListing(r){this.listings.delete(r),this.listings.get(K.dirname(r))?.delete(K.basename(r))}unregisterEntry(r){this.unregisterListing(r);let s=this.entries.get(r);this.entries.delete(r),!(typeof s>\"u\")&&(this.fileSources.delete(s),this.isSymbolicLink(s)&&this.symlinkCount--)}deleteEntry(r,s){this.unregisterEntry(r),this.zipImpl.deleteEntry(s)}resolveFilename(r,s,a=!0,n=!0){if(!this.ready)throw or.EBUSY(`archive closed, ${r}`);let c=K.resolve(vt.root,s);if(c===\"/\")return vt.root;let f=this.entries.get(c);if(a&&f!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(f)){let p=this.getFileSource(f).toString();return this.resolveFilename(r,K.resolve(K.dirname(c),p),!0,n)}else return c;for(;;){let p=this.resolveFilename(r,K.dirname(c),!0,n);if(p===void 0)return p;let h=this.listings.has(p),E=this.entries.has(p);if(!h&&!E){if(n===!1)return;throw or.ENOENT(r)}if(!h)throw or.ENOTDIR(r);if(c=K.resolve(p,K.basename(c)),!a||this.symlinkCount===0)break;let C=this.zipImpl.locate(c.slice(1));if(C===-1)break;if(this.isSymbolicLink(C)){let S=this.getFileSource(C).toString();c=K.resolve(K.dirname(c),S)}else break}return c}setFileSource(r,s){let a=Buffer.isBuffer(s)?s:Buffer.from(s),n=K.relative(vt.root,r),c=null;this.level!==\"mixed\"&&(c=[this.level===0?t6:r6,this.level]);let f=this.zipImpl.setFileSource(n,c,a);return this.fileSources.set(f,a),f}isSymbolicLink(r){if(this.symlinkCount===0)return!1;let[s,a]=this.zipImpl.getExternalAttributes(r);return s!==lm?!1:(a>>>16&ka.constants.S_IFMT)===ka.constants.S_IFLNK}getFileSource(r,s={asyncDecompress:!1}){let a=this.fileSources.get(r);if(typeof a<\"u\")return a;let{data:n,compressionMethod:c}=this.zipImpl.getFileSource(r);if(c===t6)return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,n),n;if(c===r6){if(s.asyncDecompress)return new Promise((f,p)=>{e6.default.inflateRaw(n,(h,E)=>{h?p(h):(this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,E),f(E))})});{let f=e6.default.inflateRawSync(n);return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,f),f}}else throw new Error(`Unsupported compression method: ${c}`)}async fchmodPromise(r,s){return this.chmodPromise(this.fdToPath(r,\"fchmod\"),s)}fchmodSync(r,s){return this.chmodSync(this.fdToPath(r,\"fchmodSync\"),s)}async chmodPromise(r,s){return this.chmodSync(r,s)}chmodSync(r,s){if(this.readOnly)throw or.EROFS(`chmod '${r}'`);s&=493;let a=this.resolveFilename(`chmod '${r}'`,r,!1),n=this.entries.get(a);if(typeof n>\"u\")throw new Error(`Assertion failed: The entry should have been registered (${a})`);let f=this.getUnixMode(n,ka.constants.S_IFREG|0)&-512|s;this.zipImpl.setExternalAttributes(n,lm,f<<16)}async fchownPromise(r,s,a){return this.chownPromise(this.fdToPath(r,\"fchown\"),s,a)}fchownSync(r,s,a){return this.chownSync(this.fdToPath(r,\"fchownSync\"),s,a)}async chownPromise(r,s,a){return this.chownSync(r,s,a)}chownSync(r,s,a){throw new Error(\"Unimplemented\")}async renamePromise(r,s){return this.renameSync(r,s)}renameSync(r,s){throw new Error(\"Unimplemented\")}async copyFilePromise(r,s,a){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=await this.getFileSource(n,{asyncDecompress:!0}),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}copyFileSync(r,s,a=0){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=this.getFileSource(n),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}prepareCopyFile(r,s,a=0){if(this.readOnly)throw or.EROFS(`copyfile '${r} -> '${s}'`);if(a&ka.constants.COPYFILE_FICLONE_FORCE)throw or.ENOSYS(\"unsupported clone operation\",`copyfile '${r}' -> ${s}'`);let n=this.resolveFilename(`copyfile '${r} -> ${s}'`,r),c=this.entries.get(n);if(typeof c>\"u\")throw or.EINVAL(`copyfile '${r}' -> '${s}'`);let f=this.resolveFilename(`copyfile '${r}' -> ${s}'`,s),p=this.entries.get(f);if(a&(ka.constants.COPYFILE_EXCL|ka.constants.COPYFILE_FICLONE_FORCE)&&typeof p<\"u\")throw or.EEXIST(`copyfile '${r}' -> '${s}'`);return{indexSource:c,resolvedDestP:f,indexDest:p}}async appendFilePromise(r,s,a){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>\"u\"?a={flag:\"a\"}:typeof a==\"string\"?a={flag:\"a\",encoding:a}:typeof a.flag>\"u\"&&(a={flag:\"a\",...a}),this.writeFilePromise(r,s,a)}appendFileSync(r,s,a={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>\"u\"?a={flag:\"a\"}:typeof a==\"string\"?a={flag:\"a\",encoding:a}:typeof a.flag>\"u\"&&(a={flag:\"a\",...a}),this.writeFileSync(r,s,a)}fdToPath(r,s){let a=this.fds.get(r)?.p;if(typeof a>\"u\")throw or.EBADF(s);return a}async writeFilePromise(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a==\"object\"&&a.flag&&a.flag.includes(\"a\")&&(s=Buffer.concat([await this.getFileSource(f,{asyncDecompress:!0}),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&await this.chmodPromise(p,c)}writeFileSync(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a==\"object\"&&a.flag&&a.flag.includes(\"a\")&&(s=Buffer.concat([this.getFileSource(f),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&this.chmodSync(p,c)}prepareWriteFile(r,s){if(typeof r==\"number\"&&(r=this.fdToPath(r,\"read\")),this.readOnly)throw or.EROFS(`open '${r}'`);let a=this.resolveFilename(`open '${r}'`,r);if(this.listings.has(a))throw or.EISDIR(`open '${r}'`);let n=null,c=null;typeof s==\"string\"?n=s:typeof s==\"object\"&&({encoding:n=null,mode:c=null}=s);let f=this.entries.get(a);return{encoding:n,mode:c,resolvedP:a,index:f}}async unlinkPromise(r){return this.unlinkSync(r)}unlinkSync(r){if(this.readOnly)throw or.EROFS(`unlink '${r}'`);let s=this.resolveFilename(`unlink '${r}'`,r);if(this.listings.has(s))throw or.EISDIR(`unlink '${r}'`);let a=this.entries.get(s);if(typeof a>\"u\")throw or.EINVAL(`unlink '${r}'`);this.deleteEntry(s,a)}async utimesPromise(r,s,a){return this.utimesSync(r,s,a)}utimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`utimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r);this.utimesImpl(n,a)}async lutimesPromise(r,s,a){return this.lutimesSync(r,s,a)}lutimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`lutimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r,!1);this.utimesImpl(n,a)}utimesImpl(r,s){this.listings.has(r)&&(this.entries.has(r)||this.hydrateDirectory(r));let a=this.entries.get(r);if(a===void 0)throw new Error(\"Unreachable\");this.zipImpl.setMtime(a,vmt(s))}async mkdirPromise(r,s){return this.mkdirSync(r,s)}mkdirSync(r,{mode:s=493,recursive:a=!1}={}){if(a)return this.mkdirpSync(r,{chmod:s});if(this.readOnly)throw or.EROFS(`mkdir '${r}'`);let n=this.resolveFilename(`mkdir '${r}'`,r);if(this.entries.has(n)||this.listings.has(n))throw or.EEXIST(`mkdir '${r}'`);this.hydrateDirectory(n),this.chmodSync(n,s)}async rmdirPromise(r,s){return this.rmdirSync(r,s)}rmdirSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rmdir '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rmdir '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rmdir '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rmdir '${r}'`);let c=this.entries.get(a);if(typeof c>\"u\")throw or.EINVAL(`rmdir '${r}'`);this.deleteEntry(r,c)}async rmPromise(r,s){return this.rmSync(r,s)}rmSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rm '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rm '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rm '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rm '${r}'`);let c=this.entries.get(a);if(typeof c>\"u\")throw or.EINVAL(`rm '${r}'`);this.deleteEntry(r,c)}hydrateDirectory(r){let s=this.zipImpl.addDirectory(K.relative(vt.root,r));return this.registerListing(r),this.registerEntry(r,s),s}async linkPromise(r,s){return this.linkSync(r,s)}linkSync(r,s){throw or.EOPNOTSUPP(`link '${r}' -> '${s}'`)}async symlinkPromise(r,s){return this.symlinkSync(r,s)}symlinkSync(r,s){if(this.readOnly)throw or.EROFS(`symlink '${r}' -> '${s}'`);let a=this.resolveFilename(`symlink '${r}' -> '${s}'`,s);if(this.listings.has(a))throw or.EISDIR(`symlink '${r}' -> '${s}'`);if(this.entries.has(a))throw or.EEXIST(`symlink '${r}' -> '${s}'`);let n=this.setFileSource(a,r);this.registerEntry(a,n),this.zipImpl.setExternalAttributes(n,lm,(ka.constants.S_IFLNK|511)<<16),this.symlinkCount+=1}async readFilePromise(r,s){typeof s==\"object\"&&(s=s?s.encoding:void 0);let a=await this.readFileBuffer(r,{asyncDecompress:!0});return s?a.toString(s):a}readFileSync(r,s){typeof s==\"object\"&&(s=s?s.encoding:void 0);let a=this.readFileBuffer(r);return s?a.toString(s):a}readFileBuffer(r,s={asyncDecompress:!1}){typeof r==\"number\"&&(r=this.fdToPath(r,\"read\"));let a=this.resolveFilename(`open '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`open '${r}'`);if(r[r.length-1]===\"/\"&&!this.listings.has(a))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(a))throw or.EISDIR(\"read\");let n=this.entries.get(a);if(n===void 0)throw new Error(\"Unreachable\");return this.getFileSource(n,s)}async readdirPromise(r,s){return this.readdirSync(r,s)}readdirSync(r,s){let a=this.resolveFilename(`scandir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`scandir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`scandir '${r}'`);if(s?.recursive)if(s?.withFileTypes){let c=Array.from(n,f=>Object.assign(this.statImpl(\"lstat\",K.join(r,f)),{name:f,path:vt.dot}));for(let f of c){if(!f.isDirectory())continue;let p=K.join(f.path,f.name),h=this.listings.get(K.join(a,p));for(let E of h)c.push(Object.assign(this.statImpl(\"lstat\",K.join(r,p,E)),{name:E,path:p}))}return c}else{let c=[...n];for(let f of c){let p=this.listings.get(K.join(a,f));if(!(typeof p>\"u\"))for(let h of p)c.push(K.join(f,h))}return c}else return s?.withFileTypes?Array.from(n,c=>Object.assign(this.statImpl(\"lstat\",K.join(r,c)),{name:c,path:void 0})):[...n]}async readlinkPromise(r){let s=this.prepareReadlink(r);return(await this.getFileSource(s,{asyncDecompress:!0})).toString()}readlinkSync(r){let s=this.prepareReadlink(r);return this.getFileSource(s).toString()}prepareReadlink(r){let s=this.resolveFilename(`readlink '${r}'`,r,!1);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`readlink '${r}'`);if(r[r.length-1]===\"/\"&&!this.listings.has(s))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(s))throw or.EINVAL(`readlink '${r}'`);let a=this.entries.get(s);if(a===void 0)throw new Error(\"Unreachable\");if(!this.isSymbolicLink(a))throw or.EINVAL(`readlink '${r}'`);return a}async truncatePromise(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>\"u\")throw or.EINVAL(`open '${r}'`);let c=await this.getFileSource(n,{asyncDecompress:!0}),f=Buffer.alloc(s,0);return c.copy(f),await this.writeFilePromise(r,f)}truncateSync(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>\"u\")throw or.EINVAL(`open '${r}'`);let c=this.getFileSource(n),f=Buffer.alloc(s,0);return c.copy(f),this.writeFileSync(r,f)}async ftruncatePromise(r,s){return this.truncatePromise(this.fdToPath(r,\"ftruncate\"),s)}ftruncateSync(r,s){return this.truncateSync(this.fdToPath(r,\"ftruncateSync\"),s)}watch(r,s,a){let n;switch(typeof s){case\"function\":case\"string\":case\"undefined\":n=!0;break;default:({persistent:n=!0}=s);break}if(!n)return{on:()=>{},close:()=>{}};let c=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(c)}}}watchFile(r,s,a){let n=K.resolve(vt.root,r);return sE(this,n,s,a)}unwatchFile(r,s){let a=K.resolve(vt.root,r);return yd(this,a,s)}}});function Kde(t,e,r=Buffer.alloc(0),s){let a=new ps(r),n=C=>C===e||C.startsWith(`${e}/`)?C.slice(0,e.length):null,c=async(C,S)=>()=>a,f=(C,S)=>a,p={...t},h=new Yn(p),E=new n0({baseFs:h,getMountPoint:n,factoryPromise:c,factorySync:f,magicByte:21,maxAge:1/0,typeCheck:s?.typeCheck});return j2(Vde.default,new i0(E)),a}var Vde,Jde=It(()=>{bt();Vde=et(ye(\"fs\"));vT()});var zde=It(()=>{Gde();vT();Jde()});var n6,vv,ST,Zde=It(()=>{bt();vT();n6={CENTRAL_DIRECTORY:33639248,END_OF_CENTRAL_DIRECTORY:101010256},vv=22,ST=class t{constructor(e){this.filesShouldBeCached=!1;if(\"buffer\"in e)throw new Error(\"Buffer based zip archives are not supported\");if(!e.readOnly)throw new Error(\"Writable zip archives are not supported\");this.baseFs=e.baseFs,this.fd=this.baseFs.openSync(e.path,\"r\");try{this.entries=t.readZipSync(this.fd,this.baseFs,e.size)}catch(r){throw this.baseFs.closeSync(this.fd),this.fd=\"closed\",r}}static readZipSync(e,r,s){if(s<vv)throw new Error(\"Invalid ZIP file: EOCD not found\");let a=-1,n=Buffer.alloc(vv);if(r.readSync(e,n,0,vv,s-vv),n.readUInt32LE(0)===n6.END_OF_CENTRAL_DIRECTORY)a=0;else{let R=Math.min(65557,s);n=Buffer.alloc(R),r.readSync(e,n,0,R,Math.max(0,s-R));for(let N=n.length-4;N>=0;N--)if(n.readUInt32LE(N)===n6.END_OF_CENTRAL_DIRECTORY){a=N;break}if(a===-1)throw new Error(\"Not a zip archive\")}let c=n.readUInt16LE(a+10),f=n.readUInt32LE(a+12),p=n.readUInt32LE(a+16),h=n.readUInt16LE(a+20);if(a+h+vv>n.length)throw new Error(\"Zip archive inconsistent\");if(c==65535||f==4294967295||p==4294967295)throw new Error(\"Zip 64 is not supported\");if(f>s)throw new Error(\"Zip archive inconsistent\");if(c>f/46)throw new Error(\"Zip archive inconsistent\");let E=Buffer.alloc(f);if(r.readSync(e,E,0,E.length,p)!==E.length)throw new Error(\"Zip archive inconsistent\");let C=[],S=0,P=0,I=0;for(;P<c;){if(S+46>E.length)throw new Error(\"Zip archive inconsistent\");if(E.readUInt32LE(S)!==n6.CENTRAL_DIRECTORY)throw new Error(\"Zip archive inconsistent\");let N=E.readUInt16LE(S+4)>>>8;if(E.readUInt16LE(S+8)&1)throw new Error(\"Encrypted zip files are not supported\");let W=E.readUInt16LE(S+10),te=E.readUInt32LE(S+16),ie=E.readUInt16LE(S+28),Ae=E.readUInt16LE(S+30),ce=E.readUInt16LE(S+32),me=E.readUInt32LE(S+42),pe=E.toString(\"utf8\",S+46,S+46+ie).replaceAll(\"\\0\",\" \");if(pe.includes(\"\\0\"))throw new Error(\"Invalid ZIP file\");let Be=E.readUInt32LE(S+20),Ce=E.readUInt32LE(S+38);C.push({name:pe,os:N,mtime:ui.SAFE_TIME,crc:te,compressionMethod:W,isSymbolicLink:N===lm&&(Ce>>>16&ui.S_IFMT)===ui.S_IFLNK,size:E.readUInt32LE(S+24),compressedSize:Be,externalAttributes:Ce,localHeaderOffset:me}),I+=Be,P+=1,S+=46+ie+Ae+ce}if(I>s)throw new Error(\"Zip archive inconsistent\");if(S!==E.length)throw new Error(\"Zip archive inconsistent\");return C}getExternalAttributes(e){let r=this.entries[e];return[r.os,r.externalAttributes]}getListings(){return this.entries.map(e=>e.name)}getSymlinkCount(){let e=0;for(let r of this.entries)r.isSymbolicLink&&(e+=1);return e}stat(e){let r=this.entries[e];return{crc:r.crc,mtime:r.mtime,size:r.size}}locate(e){for(let r=0;r<this.entries.length;r++)if(this.entries[r].name===e)return r;return-1}getFileSource(e){if(this.fd===\"closed\")throw new Error(\"ZIP file is closed\");let r=this.entries[e],s=Buffer.alloc(30);this.baseFs.readSync(this.fd,s,0,s.length,r.localHeaderOffset);let a=s.readUInt16LE(26),n=s.readUInt16LE(28),c=Buffer.alloc(r.compressedSize);if(this.baseFs.readSync(this.fd,c,0,r.compressedSize,r.localHeaderOffset+30+a+n)!==r.compressedSize)throw new Error(\"Invalid ZIP file\");return{data:c,compressionMethod:r.compressionMethod}}discard(){this.fd!==\"closed\"&&(this.baseFs.closeSync(this.fd),this.fd=\"closed\")}addDirectory(e){throw new Error(\"Not implemented\")}deleteEntry(e){throw new Error(\"Not implemented\")}setMtime(e,r){throw new Error(\"Not implemented\")}getBufferAndClose(){throw new Error(\"Not implemented\")}setFileSource(e,r,s){throw new Error(\"Not implemented\")}setExternalAttributes(e,r,s){throw new Error(\"Not implemented\")}}});var Sv={};Vt(Sv,{DEFAULT_COMPRESSION_LEVEL:()=>Yde,DEFLATE:()=>r6,JsZipImpl:()=>ST,LibZipImpl:()=>vI,STORE:()=>t6,ZIP_UNIX:()=>lm,ZipFS:()=>ps,ZipOpenFS:()=>tA,getArchivePart:()=>zj,getLibzipPromise:()=>Dmt,getLibzipSync:()=>Smt,makeEmptyArchive:()=>BT,mountMemoryDrive:()=>Kde});function Smt(){return Bv()}async function Dmt(){return Bv()}var Xde,rA=It(()=>{Vj();Xde=et(Ude());qde();zde();Zde();Xj();_de(()=>{let t=(0,Xde.default)();return jde(t)})});var Dv,$de=It(()=>{bt();Wt();bv();Dv=class extends ot{constructor(){super(...arguments);this.cwd=ge.String(\"--cwd\",process.cwd(),{description:\"The directory to run the command in\"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.usage={description:\"run a command using yarn's portable shell\",details:`\n      This command will run a command using Yarn's portable shell.\n\n      Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.\n\n      Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.\n\n      Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.\n\n      For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.\n    `,examples:[[\"Run a simple command\",\"$0 echo Hello\"],[\"Run a command with a glob pattern\",\"$0 echo '*.js'\"],[\"Run a command with a redirection\",\"$0 echo Hello World '>' hello.txt\"],[\"Run a command with an escaped glob pattern (The double escape is needed in Unix shells)\",`$0 echo '\"*.js\"'`],[\"Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)\",'$0 \"GREETING=Hello echo $GREETING World\"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(\" \")}`:this.commandName;return await SI(r,[],{cwd:ue.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var Kl,eme=It(()=>{Kl=class extends Error{constructor(e){super(e),this.name=\"ShellError\"}}});var PT={};Vt(PT,{fastGlobOptions:()=>nme,isBraceExpansion:()=>i6,isGlobPattern:()=>bmt,match:()=>Pmt,micromatchOptions:()=>bT});function bmt(t){if(!DT.default.scan(t,bT).isGlob)return!1;try{DT.default.parse(t,bT)}catch{return!1}return!0}function Pmt(t,{cwd:e,baseFs:r}){return(0,tme.default)(t,{...nme,cwd:ue.fromPortablePath(e),fs:Cx(rme.default,new i0(r))})}function i6(t){return DT.default.scan(t,bT).isBrace}var tme,rme,DT,bT,nme,ime=It(()=>{bt();tme=et(BQ()),rme=et(ye(\"fs\")),DT=et(Sa()),bT={strictBrackets:!0},nme={onlyDirectories:!1,onlyFiles:!1}});function s6(){}function o6(){for(let t of cm)t.kill()}function lme(t,e,r,s){return a=>{let n=a[0]instanceof nA.Transform?\"pipe\":a[0],c=a[1]instanceof nA.Transform?\"pipe\":a[1],f=a[2]instanceof nA.Transform?\"pipe\":a[2],p=(0,ome.default)(t,e,{...s,stdio:[n,c,f]});return cm.add(p),cm.size===1&&(process.on(\"SIGINT\",s6),process.on(\"SIGTERM\",o6)),a[0]instanceof nA.Transform&&a[0].pipe(p.stdin),a[1]instanceof nA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof nA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on(\"error\",E=>{switch(cm.delete(p),cm.size===0&&(process.off(\"SIGINT\",s6),process.off(\"SIGTERM\",o6)),E.code){case\"ENOENT\":a[2].write(`command not found: ${t}\n`),h(127);break;case\"EACCES\":a[2].write(`permission denied: ${t}\n`),h(128);break;default:a[2].write(`uncaught error: ${E.message}\n`),h(1);break}}),p.on(\"close\",E=>{cm.delete(p),cm.size===0&&(process.off(\"SIGINT\",s6),process.off(\"SIGTERM\",o6)),h(E!==null?E:129)})})}}}function cme(t){return e=>{let r=e[0]===\"pipe\"?new nA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function xT(t,e){return l6.start(t,e)}function sme(t,e=null){let r=new nA.PassThrough,s=new ame.StringDecoder,a=\"\";return r.on(\"data\",n=>{let c=s.write(n),f;do if(f=c.indexOf(`\n`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a=\"\",t(e!==null?`${e} ${p}`:p)}while(f!==-1);a+=c}),r.on(\"end\",()=>{let n=s.end();n!==\"\"&&t(e!==null?`${e} ${n}`:n)}),r}function ume(t,{prefix:e}){return{stdout:sme(r=>t.stdout.write(`${r}\n`),t.stdout.isTTY?e:null),stderr:sme(r=>t.stderr.write(`${r}\n`),t.stderr.isTTY?e:null)}}var ome,nA,ame,cm,Mc,a6,l6,c6=It(()=>{ome=et(J_()),nA=ye(\"stream\"),ame=ye(\"string_decoder\"),cm=new Set;Mc=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},a6=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error(\"Assertion failed: No stream attached\");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error(\"Assertion failed: No stream attached\");return this.stream}},l6=class t{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:s,stderr:a}){let n=new t(null,e);return n.stdin=r,n.stdout=s,n.stderr=a,n}pipeTo(e,r=1){let s=new t(this,e),a=new a6;return s.pipe=a,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}async exec(){let e=[\"ignore\",\"ignore\",\"ignore\"];if(this.pipe)e[0]=\"pipe\";else{if(this.stdin===null)throw new Error(\"Assertion failed: No input stream registered\");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error(\"Assertion failed: No output stream registered\");r=this.stdout,e[1]=r.get();let s;if(this.stderr===null)throw new Error(\"Assertion failed: No error stream registered\");s=this.stderr,e[2]=s.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),s.close(),n))}async run(){let e=[];for(let s=this;s;s=s.ancestor)e.push(s.exec());return(await Promise.all(e))[0]}}});var Qv={};Vt(Qv,{EntryCommand:()=>Dv,ShellError:()=>Kl,execute:()=>SI,globUtils:()=>PT});function fme(t,e,r){let s=new Jl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(s,{end:!1}),(e&2)===2&&r.stdin instanceof Jl.Writable&&s.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stderr,{end:!1});break;default:throw new Kl(`Bad file descriptor: \"${t}\"`)}return s}function QT(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function kmt(t,e,r){let s=[],a=new Jl.PassThrough;return a.on(\"data\",n=>s.push(n)),await TT(t,e,QT(r,{stdout:a})),Buffer.concat(s).toString().replace(/[\\r\\n]+$/,\"\")}async function Ame(t,e,r){let s=t.map(async n=>{let c=await um(n.args,e,r);return{name:n.name,value:c.join(\" \")}});return(await Promise.all(s)).reduce((n,c)=>(n[c.name]=c.value,n),{})}function kT(t){return t.match(/[^ \\r\\n\\t]+/g)||[]}async function yme(t,e,r,s,a=s){switch(t.name){case\"$\":s(String(process.pid));break;case\"#\":s(String(e.args.length));break;case\"@\":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let c=kT(n);for(let f=0;f<c.length-1;++f)a(c[f]);s(c[c.length-1])}break;case\"*\":{let n=e.args.join(\" \");if(t.quoted)s(n);else for(let c of kT(n))a(c)}break;case\"PPID\":s(String(process.ppid));break;case\"RANDOM\":s(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),c,f=Number.isFinite(n);if(f?n>=0&&n<e.args.length&&(c=e.args[n]):Object.hasOwn(r.variables,t.name)?c=r.variables[t.name]:Object.hasOwn(r.environment,t.name)&&(c=r.environment[t.name]),typeof c<\"u\"&&t.alternativeValue?c=(await um(t.alternativeValue,e,r)).join(\" \"):typeof c>\"u\"&&(t.defaultValue?c=(await um(t.defaultValue,e,r)).join(\" \"):t.alternativeValue&&(c=\"\")),typeof c>\"u\")throw f?new Kl(`Unbound argument #${n}`):new Kl(`Unbound variable \"${t.name}\"`);if(t.quoted)s(c);else{let p=kT(c);for(let E=0;E<p.length-1;++E)a(p[E]);let h=p[p.length-1];typeof h<\"u\"&&s(h)}}break}}async function Pv(t,e,r){if(t.type===\"number\"){if(Number.isInteger(t.value))return t.value;throw new Error(`Invalid number: \"${t.value}\", only integers are allowed`)}else if(t.type===\"variable\"){let s=[];await yme({...t,quoted:!0},e,r,n=>s.push(n));let a=Number(s.join(\" \"));return Number.isNaN(a)?Pv({type:\"variable\",name:s.join(\" \")},e,r):Pv({type:\"number\",value:a},e,r)}else return Qmt[t.type](await Pv(t.left,e,r),await Pv(t.right,e,r))}async function um(t,e,r){let s=new Map,a=[],n=[],c=E=>{n.push(E)},f=()=>{n.length>0&&a.push(n.join(\"\")),n=[]},p=E=>{c(E),f()},h=(E,C,S)=>{let P=JSON.stringify({type:E,fd:C}),I=s.get(P);typeof I>\"u\"&&s.set(P,I=[]),I.push(S)};for(let E of t){let C=!1;switch(E.type){case\"redirection\":{let S=await um(E.args,e,r);for(let P of S)h(E.subtype,E.fd,P)}break;case\"argument\":for(let S of E.segments)switch(S.type){case\"text\":c(S.text);break;case\"glob\":c(S.pattern),C=!0;break;case\"shell\":{let P=await kmt(S.shell,e,r);if(S.quoted)c(P);else{let I=kT(P);for(let R=0;R<I.length-1;++R)p(I[R]);c(I[I.length-1])}}break;case\"variable\":await yme(S,e,r,c,p);break;case\"arithmetic\":c(String(await Pv(S.arithmetic,e,r)));break}break}if(f(),C){let S=a.pop();if(typeof S>\"u\")throw new Error(\"Assertion failed: Expected a glob pattern to have been set\");let P=await e.glob.match(S,{cwd:r.cwd,baseFs:e.baseFs});if(P.length===0){let I=i6(S)?\". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22\":\"\";throw new Kl(`No matches found: \"${S}\"${I}`)}for(let I of P.sort())p(I)}}if(s.size>0){let E=[];for(let[C,S]of s.entries())E.splice(E.length,0,C,String(S.length),...S);a.splice(0,0,\"__ysh_set_redirects\",...E,\"--\")}return a}function xv(t,e,r){e.builtins.has(t[0])||(t=[\"command\",...t]);let s=ue.fromPortablePath(r.cwd),a=r.environment;typeof a.PWD<\"u\"&&(a={...a,PWD:s});let[n,...c]=t;if(n===\"command\")return lme(c[0],c.slice(1),e,{cwd:s,env:a});let f=e.builtins.get(n);if(typeof f>\"u\")throw new Error(`Assertion failed: A builtin should exist for \"${n}\"`);return cme(async({stdin:p,stdout:h,stderr:E})=>{let{stdin:C,stdout:S,stderr:P}=r;r.stdin=p,r.stdout=h,r.stderr=E;try{return await f(c,e,r)}finally{r.stdin=C,r.stdout=S,r.stderr=P}})}function Tmt(t,e,r){return s=>{let a=new Jl.PassThrough,n=TT(t,e,QT(r,{stdin:a}));return{stdin:a,promise:n}}}function Rmt(t,e,r){return s=>{let a=new Jl.PassThrough,n=TT(t,e,r);return{stdin:a,promise:n}}}function pme(t,e,r,s){if(e.length===0)return t;{let a;do a=String(Math.random());while(Object.hasOwn(s.procedures,a));return s.procedures={...s.procedures},s.procedures[a]=t,xv([...e,\"__ysh_run_procedure\",a],r,s)}}async function hme(t,e,r){let s=t,a=null,n=null;for(;s;){let c=s.then?{...r}:r,f;switch(s.type){case\"command\":{let p=await um(s.args,e,r),h=await Ame(s.envs,e,r);f=s.envs.length?xv(p,e,QT(c,{environment:h})):xv(p,e,c)}break;case\"subshell\":{let p=await um(s.args,e,r),h=Tmt(s.subshell,e,c);f=pme(h,p,e,c)}break;case\"group\":{let p=await um(s.args,e,r),h=Rmt(s.group,e,c);f=pme(h,p,e,c)}break;case\"envs\":{let p=await Ame(s.envs,e,r);c.environment={...c.environment,...p},f=xv([\"true\"],e,c)}break}if(typeof f>\"u\")throw new Error(\"Assertion failed: An action should have been generated\");if(a===null)n=xT(f,{stdin:new Mc(c.stdin),stdout:new Mc(c.stdout),stderr:new Mc(c.stderr)});else{if(n===null)throw new Error(\"Assertion failed: The execution pipeline should have been setup\");switch(a){case\"|\":n=n.pipeTo(f,1);break;case\"|&\":n=n.pipeTo(f,3);break}}s.then?(a=s.then.type,s=s.then.chain):s=null}if(n===null)throw new Error(\"Assertion failed: The execution pipeline should have been setup\");return await n.run()}async function Fmt(t,e,r,{background:s=!1}={}){function a(n){let c=[\"#2E86AB\",\"#A23B72\",\"#F18F01\",\"#C73E1D\",\"#CCE2A3\"],f=c[n%c.length];return gme.default.hex(f)}if(s){let n=r.nextBackgroundJobIndex++,c=a(n),f=`[${n}]`,p=c(f),{stdout:h,stderr:E}=ume(r,{prefix:p});return r.backgroundJobs.push(hme(t,e,QT(r,{stdout:h,stderr:E})).catch(C=>E.write(`${C.message}\n`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${c(AE(t))}' has ended\n`)})),0}return await hme(t,e,r)}async function Nmt(t,e,r,{background:s=!1}={}){let a,n=f=>{a=f,r.variables[\"?\"]=String(f)},c=async f=>{try{return await Fmt(f.chain,e,r,{background:s&&typeof f.then>\"u\"})}catch(p){if(!(p instanceof Kl))throw p;return r.stderr.write(`${p.message}\n`),1}};for(n(await c(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case\"&&\":a===0&&n(await c(t.then.line));break;case\"||\":a!==0&&n(await c(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: \"${t.then.type}\"`)}t=t.then.line}return a}async function TT(t,e,r){let s=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:c}of t){if(a=await Nmt(n,e,r,{background:c===\"&\"}),r.exitCode!==null)return r.exitCode;r.variables[\"?\"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,a}function Eme(t){switch(t.type){case\"variable\":return t.name===\"@\"||t.name===\"#\"||t.name===\"*\"||Number.isFinite(parseInt(t.name,10))||\"defaultValue\"in t&&!!t.defaultValue&&t.defaultValue.some(e=>kv(e))||\"alternativeValue\"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>kv(e));case\"arithmetic\":return u6(t.arithmetic);case\"shell\":return f6(t.shell);default:return!1}}function kv(t){switch(t.type){case\"redirection\":return t.args.some(e=>kv(e));case\"argument\":return t.segments.some(e=>Eme(e));default:throw new Error(`Assertion failed: Unsupported argument type: \"${t.type}\"`)}}function u6(t){switch(t.type){case\"variable\":return Eme(t);case\"number\":return!1;default:return u6(t.left)||u6(t.right)}}function f6(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let s;switch(r.type){case\"subshell\":s=f6(r.subshell);break;case\"command\":s=r.envs.some(a=>a.args.some(n=>kv(n)))||r.args.some(a=>kv(a));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function SI(t,e=[],{baseFs:r=new Yn,builtins:s={},cwd:a=ue.toPortablePath(process.cwd()),env:n=process.env,stdin:c=process.stdin,stdout:f=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=PT}={}){let C={};for(let[I,R]of Object.entries(n))typeof R<\"u\"&&(C[I]=R);let S=new Map(xmt);for(let[I,R]of Object.entries(s))S.set(I,R);c===null&&(c=new Jl.PassThrough,c.end());let P=vx(t,E);if(!f6(P)&&P.length>0&&e.length>0){let{command:I}=P[P.length-1];for(;I.then;)I=I.then.line;let R=I.chain;for(;R.then;)R=R.then.chain;R.type===\"command\"&&(R.args=R.args.concat(e.map(N=>({type:\"argument\",segments:[{type:\"text\",text:N}]}))))}return await TT(P,{args:e,baseFs:r,builtins:S,initialStdin:c,initialStdout:f,initialStderr:p,glob:E},{cwd:a,environment:C,exitCode:null,procedures:{},stdin:c,stdout:f,stderr:p,variables:Object.assign({},h,{\"?\":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var gme,dme,Jl,mme,xmt,Qmt,bv=It(()=>{bt();Bc();gme=et(g4()),dme=ye(\"os\"),Jl=ye(\"stream\"),mme=ye(\"timers/promises\");$de();eme();ime();c6();c6();xmt=new Map([[\"cd\",async([t=(0,dme.homedir)(),...e],r,s)=>{let a=K.resolve(s.cwd,ue.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(c=>{throw c.code===\"ENOENT\"?new Kl(`cd: no such file or directory: ${t}`):c})).isDirectory())throw new Kl(`cd: not a directory: ${t}`);return s.cwd=a,0}],[\"pwd\",async(t,e,r)=>(r.stdout.write(`${ue.fromPortablePath(r.cwd)}\n`),0)],[\":\",async(t,e,r)=>0],[\"true\",async(t,e,r)=>0],[\"false\",async(t,e,r)=>1],[\"exit\",async([t,...e],r,s)=>s.exitCode=parseInt(t??s.variables[\"?\"],10)],[\"echo\",async(t,e,r)=>(r.stdout.write(`${t.join(\" \")}\n`),0)],[\"sleep\",async([t],e,r)=>{if(typeof t>\"u\")throw new Kl(\"sleep: missing operand\");let s=Number(t);if(Number.isNaN(s))throw new Kl(`sleep: invalid time interval '${t}'`);return await(0,mme.setTimeout)(1e3*s,0)}],[\"unset\",async(t,e,r)=>{for(let s of t)delete r.environment[s],delete r.variables[s];return 0}],[\"__ysh_run_procedure\",async(t,e,r)=>{let s=r.procedures[t[0]];return await xT(s,{stdin:new Mc(r.stdin),stdout:new Mc(r.stdout),stderr:new Mc(r.stderr)}).run()}],[\"__ysh_set_redirects\",async(t,e,r)=>{let s=r.stdin,a=r.stdout,n=r.stderr,c=[],f=[],p=[],h=0;for(;t[h]!==\"--\";){let C=t[h++],{type:S,fd:P}=JSON.parse(C),I=W=>{switch(P){case null:case 0:c.push(W);break;default:throw new Error(`Unsupported file descriptor: \"${P}\"`)}},R=W=>{switch(P){case null:case 1:f.push(W);break;case 2:p.push(W);break;default:throw new Error(`Unsupported file descriptor: \"${P}\"`)}},N=Number(t[h++]),U=h+N;for(let W=h;W<U;++h,++W)switch(S){case\"<\":I(()=>e.baseFs.createReadStream(K.resolve(r.cwd,ue.toPortablePath(t[W]))));break;case\"<<<\":I(()=>{let te=new Jl.PassThrough;return process.nextTick(()=>{te.write(`${t[W]}\n`),te.end()}),te});break;case\"<&\":I(()=>fme(Number(t[W]),1,r));break;case\">\":case\">>\":{let te=K.resolve(r.cwd,ue.toPortablePath(t[W]));R(te===\"/dev/null\"?new Jl.Writable({autoDestroy:!0,emitClose:!0,write(ie,Ae,ce){setImmediate(ce)}}):e.baseFs.createWriteStream(te,S===\">>\"?{flags:\"a\"}:void 0))}break;case\">&\":R(fme(Number(t[W]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: \"${S}\"`)}}if(c.length>0){let C=new Jl.PassThrough;s=C;let S=P=>{if(P===c.length)C.end();else{let I=c[P]();I.pipe(C,{end:!1}),I.on(\"end\",()=>{S(P+1)})}};S(0)}if(f.length>0){let C=new Jl.PassThrough;a=C;for(let S of f)C.pipe(S)}if(p.length>0){let C=new Jl.PassThrough;n=C;for(let S of p)C.pipe(S)}let E=await xT(xv(t.slice(h+1),e,r),{stdin:new Mc(s),stdout:new Mc(a),stderr:new Mc(n)}).run();return await Promise.all(f.map(C=>new Promise((S,P)=>{C.on(\"error\",I=>{P(I)}),C.on(\"close\",()=>{S()}),C.end()}))),await Promise.all(p.map(C=>new Promise((S,P)=>{C.on(\"error\",I=>{P(I)}),C.on(\"close\",()=>{S()}),C.end()}))),E}]]);Qmt={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var RT=L((y$t,Ime)=>{function Omt(t,e){for(var r=-1,s=t==null?0:t.length,a=Array(s);++r<s;)a[r]=e(t[r],r,t);return a}Ime.exports=Omt});var Dme=L((E$t,Sme)=>{var Cme=Yd(),Lmt=RT(),Mmt=xc(),_mt=aI(),Umt=1/0,wme=Cme?Cme.prototype:void 0,Bme=wme?wme.toString:void 0;function vme(t){if(typeof t==\"string\")return t;if(Mmt(t))return Lmt(t,vme)+\"\";if(_mt(t))return Bme?Bme.call(t):\"\";var e=t+\"\";return e==\"0\"&&1/t==-Umt?\"-0\":e}Sme.exports=vme});var Tv=L((I$t,bme)=>{var Hmt=Dme();function jmt(t){return t==null?\"\":Hmt(t)}bme.exports=jmt});var A6=L((C$t,Pme)=>{function qmt(t,e,r){var s=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++s<a;)n[s]=t[s+e];return n}Pme.exports=qmt});var kme=L((w$t,xme)=>{var Gmt=A6();function Wmt(t,e,r){var s=t.length;return r=r===void 0?s:r,!e&&r>=s?t:Gmt(t,e,r)}xme.exports=Wmt});var p6=L((B$t,Qme)=>{var Ymt=\"\\\\ud800-\\\\udfff\",Vmt=\"\\\\u0300-\\\\u036f\",Kmt=\"\\\\ufe20-\\\\ufe2f\",Jmt=\"\\\\u20d0-\\\\u20ff\",zmt=Vmt+Kmt+Jmt,Zmt=\"\\\\ufe0e\\\\ufe0f\",Xmt=\"\\\\u200d\",$mt=RegExp(\"[\"+Xmt+Ymt+zmt+Zmt+\"]\");function eyt(t){return $mt.test(t)}Qme.exports=eyt});var Rme=L((v$t,Tme)=>{function tyt(t){return t.split(\"\")}Tme.exports=tyt});var Hme=L((S$t,Ume)=>{var Fme=\"\\\\ud800-\\\\udfff\",ryt=\"\\\\u0300-\\\\u036f\",nyt=\"\\\\ufe20-\\\\ufe2f\",iyt=\"\\\\u20d0-\\\\u20ff\",syt=ryt+nyt+iyt,oyt=\"\\\\ufe0e\\\\ufe0f\",ayt=\"[\"+Fme+\"]\",h6=\"[\"+syt+\"]\",g6=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",lyt=\"(?:\"+h6+\"|\"+g6+\")\",Nme=\"[^\"+Fme+\"]\",Ome=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",Lme=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",cyt=\"\\\\u200d\",Mme=lyt+\"?\",_me=\"[\"+oyt+\"]?\",uyt=\"(?:\"+cyt+\"(?:\"+[Nme,Ome,Lme].join(\"|\")+\")\"+_me+Mme+\")*\",fyt=_me+Mme+uyt,Ayt=\"(?:\"+[Nme+h6+\"?\",h6,Ome,Lme,ayt].join(\"|\")+\")\",pyt=RegExp(g6+\"(?=\"+g6+\")|\"+Ayt+fyt,\"g\");function hyt(t){return t.match(pyt)||[]}Ume.exports=hyt});var qme=L((D$t,jme)=>{var gyt=Rme(),dyt=p6(),myt=Hme();function yyt(t){return dyt(t)?myt(t):gyt(t)}jme.exports=yyt});var Wme=L((b$t,Gme)=>{var Eyt=kme(),Iyt=p6(),Cyt=qme(),wyt=Tv();function Byt(t){return function(e){e=wyt(e);var r=Iyt(e)?Cyt(e):void 0,s=r?r[0]:e.charAt(0),a=r?Eyt(r,1).join(\"\"):e.slice(1);return s[t]()+a}}Gme.exports=Byt});var Vme=L((P$t,Yme)=>{var vyt=Wme(),Syt=vyt(\"toUpperCase\");Yme.exports=Syt});var d6=L((x$t,Kme)=>{var Dyt=Tv(),byt=Vme();function Pyt(t){return byt(Dyt(t).toLowerCase())}Kme.exports=Pyt});var Jme=L((k$t,FT)=>{function xyt(){var t=0,e=1,r=2,s=3,a=4,n=5,c=6,f=7,p=8,h=9,E=10,C=11,S=12,P=13,I=14,R=15,N=16,U=17,W=0,te=1,ie=2,Ae=3,ce=4;function me(g,we){return 55296<=g.charCodeAt(we)&&g.charCodeAt(we)<=56319&&56320<=g.charCodeAt(we+1)&&g.charCodeAt(we+1)<=57343}function pe(g,we){we===void 0&&(we=0);var Ee=g.charCodeAt(we);if(55296<=Ee&&Ee<=56319&&we<g.length-1){var fe=Ee,se=g.charCodeAt(we+1);return 56320<=se&&se<=57343?(fe-55296)*1024+(se-56320)+65536:fe}if(56320<=Ee&&Ee<=57343&&we>=1){var fe=g.charCodeAt(we-1),se=Ee;return 55296<=fe&&fe<=56319?(fe-55296)*1024+(se-56320)+65536:se}return Ee}function Be(g,we,Ee){var fe=[g].concat(we).concat([Ee]),se=fe[fe.length-2],X=Ee,De=fe.lastIndexOf(I);if(De>1&&fe.slice(1,De).every(function(j){return j==s})&&[s,P,U].indexOf(g)==-1)return ie;var Re=fe.lastIndexOf(a);if(Re>0&&fe.slice(1,Re).every(function(j){return j==a})&&[S,a].indexOf(se)==-1)return fe.filter(function(j){return j==a}).length%2==1?Ae:ce;if(se==t&&X==e)return W;if(se==r||se==t||se==e)return X==I&&we.every(function(j){return j==s})?ie:te;if(X==r||X==t||X==e)return te;if(se==c&&(X==c||X==f||X==h||X==E))return W;if((se==h||se==f)&&(X==f||X==p))return W;if((se==E||se==p)&&X==p)return W;if(X==s||X==R)return W;if(X==n)return W;if(se==S)return W;var gt=fe.indexOf(s)!=-1?fe.lastIndexOf(s)-1:fe.length-2;return[P,U].indexOf(fe[gt])!=-1&&fe.slice(gt+1,-1).every(function(j){return j==s})&&X==I||se==R&&[N,U].indexOf(X)!=-1?W:we.indexOf(a)!=-1?ie:se==a&&X==a?W:te}this.nextBreak=function(g,we){if(we===void 0&&(we=0),we<0)return 0;if(we>=g.length-1)return g.length;for(var Ee=Ce(pe(g,we)),fe=[],se=we+1;se<g.length;se++)if(!me(g,se-1)){var X=Ce(pe(g,se));if(Be(Ee,fe,X))return se;fe.push(X)}return g.length},this.splitGraphemes=function(g){for(var we=[],Ee=0,fe;(fe=this.nextBreak(g,Ee))<g.length;)we.push(g.slice(Ee,fe)),Ee=fe;return Ee<g.length&&we.push(g.slice(Ee)),we},this.iterateGraphemes=function(g){var we=0,Ee={next:function(){var fe,se;return(se=this.nextBreak(g,we))<g.length?(fe=g.slice(we,se),we=se,{value:fe,done:!1}):we<g.length?(fe=g.slice(we),we=g.length,{value:fe,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<\"u\"&&Symbol.iterator&&(Ee[Symbol.iterator]=function(){return Ee}),Ee},this.countGraphemes=function(g){for(var we=0,Ee=0,fe;(fe=this.nextBreak(g,Ee))<g.length;)Ee=fe,we++;return Ee<g.length&&we++,we};function Ce(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?S:g==13?t:g==10?e:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?r:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006||g==3008||g==3021||g==3031||g==3072||3134<=g&&g<=3136||3142<=g&&g<=3144||3146<=g&&g<=3149||3157<=g&&g<=3158||3170<=g&&g<=3171||g==3201||g==3260||g==3263||g==3266||g==3270||3276<=g&&g<=3277||3285<=g&&g<=3286||3298<=g&&g<=3299||3328<=g&&g<=3329||3387<=g&&g<=3388||g==3390||3393<=g&&g<=3396||g==3405||g==3415||3426<=g&&g<=3427||g==3530||g==3535||3538<=g&&g<=3540||g==3542||g==3551||g==3633||3636<=g&&g<=3642||3655<=g&&g<=3662||g==3761||3764<=g&&g<=3769||3771<=g&&g<=3772||3784<=g&&g<=3789||3864<=g&&g<=3865||g==3893||g==3895||g==3897||3953<=g&&g<=3966||3968<=g&&g<=3972||3974<=g&&g<=3975||3981<=g&&g<=3991||3993<=g&&g<=4028||g==4038||4141<=g&&g<=4144||4146<=g&&g<=4151||4153<=g&&g<=4154||4157<=g&&g<=4158||4184<=g&&g<=4185||4190<=g&&g<=4192||4209<=g&&g<=4212||g==4226||4229<=g&&g<=4230||g==4237||g==4253||4957<=g&&g<=4959||5906<=g&&g<=5908||5938<=g&&g<=5940||5970<=g&&g<=5971||6002<=g&&g<=6003||6068<=g&&g<=6069||6071<=g&&g<=6077||g==6086||6089<=g&&g<=6099||g==6109||6155<=g&&g<=6157||6277<=g&&g<=6278||g==6313||6432<=g&&g<=6434||6439<=g&&g<=6440||g==6450||6457<=g&&g<=6459||6679<=g&&g<=6680||g==6683||g==6742||6744<=g&&g<=6750||g==6752||g==6754||6757<=g&&g<=6764||6771<=g&&g<=6780||g==6783||6832<=g&&g<=6845||g==6846||6912<=g&&g<=6915||g==6964||6966<=g&&g<=6970||g==6972||g==6978||7019<=g&&g<=7027||7040<=g&&g<=7041||7074<=g&&g<=7077||7080<=g&&g<=7081||7083<=g&&g<=7085||g==7142||7144<=g&&g<=7145||g==7149||7151<=g&&g<=7153||7212<=g&&g<=7219||7222<=g&&g<=7223||7376<=g&&g<=7378||7380<=g&&g<=7392||7394<=g&&g<=7400||g==7405||g==7412||7416<=g&&g<=7417||7616<=g&&g<=7673||7675<=g&&g<=7679||g==8204||8400<=g&&g<=8412||8413<=g&&g<=8416||g==8417||8418<=g&&g<=8420||8421<=g&&g<=8432||11503<=g&&g<=11505||g==11647||11744<=g&&g<=11775||12330<=g&&g<=12333||12334<=g&&g<=12335||12441<=g&&g<=12442||g==42607||42608<=g&&g<=42610||42612<=g&&g<=42621||42654<=g&&g<=42655||42736<=g&&g<=42737||g==43010||g==43014||g==43019||43045<=g&&g<=43046||43204<=g&&g<=43205||43232<=g&&g<=43249||43302<=g&&g<=43309||43335<=g&&g<=43345||43392<=g&&g<=43394||g==43443||43446<=g&&g<=43449||g==43452||g==43493||43561<=g&&g<=43566||43569<=g&&g<=43570||43573<=g&&g<=43574||g==43587||g==43596||g==43644||g==43696||43698<=g&&g<=43700||43703<=g&&g<=43704||43710<=g&&g<=43711||g==43713||43756<=g&&g<=43757||g==43766||g==44005||g==44008||g==44013||g==64286||65024<=g&&g<=65039||65056<=g&&g<=65071||65438<=g&&g<=65439||g==66045||g==66272||66422<=g&&g<=66426||68097<=g&&g<=68099||68101<=g&&g<=68102||68108<=g&&g<=68111||68152<=g&&g<=68154||g==68159||68325<=g&&g<=68326||g==69633||69688<=g&&g<=69702||69759<=g&&g<=69761||69811<=g&&g<=69814||69817<=g&&g<=69818||69888<=g&&g<=69890||69927<=g&&g<=69931||69933<=g&&g<=69940||g==70003||70016<=g&&g<=70017||70070<=g&&g<=70078||70090<=g&&g<=70092||70191<=g&&g<=70193||g==70196||70198<=g&&g<=70199||g==70206||g==70367||70371<=g&&g<=70378||70400<=g&&g<=70401||g==70460||g==70462||g==70464||g==70487||70502<=g&&g<=70508||70512<=g&&g<=70516||70712<=g&&g<=70719||70722<=g&&g<=70724||g==70726||g==70832||70835<=g&&g<=70840||g==70842||g==70845||70847<=g&&g<=70848||70850<=g&&g<=70851||g==71087||71090<=g&&g<=71093||71100<=g&&g<=71101||71103<=g&&g<=71104||71132<=g&&g<=71133||71219<=g&&g<=71226||g==71229||71231<=g&&g<=71232||g==71339||g==71341||71344<=g&&g<=71349||g==71351||71453<=g&&g<=71455||71458<=g&&g<=71461||71463<=g&&g<=71467||72193<=g&&g<=72198||72201<=g&&g<=72202||72243<=g&&g<=72248||72251<=g&&g<=72254||g==72263||72273<=g&&g<=72278||72281<=g&&g<=72283||72330<=g&&g<=72342||72344<=g&&g<=72345||72752<=g&&g<=72758||72760<=g&&g<=72765||g==72767||72850<=g&&g<=72871||72874<=g&&g<=72880||72882<=g&&g<=72883||72885<=g&&g<=72886||73009<=g&&g<=73014||g==73018||73020<=g&&g<=73021||73023<=g&&g<=73029||g==73031||92912<=g&&g<=92916||92976<=g&&g<=92982||94095<=g&&g<=94098||113821<=g&&g<=113822||g==119141||119143<=g&&g<=119145||119150<=g&&g<=119154||119163<=g&&g<=119170||119173<=g&&g<=119179||119210<=g&&g<=119213||119362<=g&&g<=119364||121344<=g&&g<=121398||121403<=g&&g<=121452||g==121461||g==121476||121499<=g&&g<=121503||121505<=g&&g<=121519||122880<=g&&g<=122886||122888<=g&&g<=122904||122907<=g&&g<=122913||122915<=g&&g<=122916||122918<=g&&g<=122922||125136<=g&&g<=125142||125252<=g&&g<=125258||917536<=g&&g<=917631||917760<=g&&g<=917999?s:127462<=g&&g<=127487?a:g==2307||g==2363||2366<=g&&g<=2368||2377<=g&&g<=2380||2382<=g&&g<=2383||2434<=g&&g<=2435||2495<=g&&g<=2496||2503<=g&&g<=2504||2507<=g&&g<=2508||g==2563||2622<=g&&g<=2624||g==2691||2750<=g&&g<=2752||g==2761||2763<=g&&g<=2764||2818<=g&&g<=2819||g==2880||2887<=g&&g<=2888||2891<=g&&g<=2892||g==3007||3009<=g&&g<=3010||3014<=g&&g<=3016||3018<=g&&g<=3020||3073<=g&&g<=3075||3137<=g&&g<=3140||3202<=g&&g<=3203||g==3262||3264<=g&&g<=3265||3267<=g&&g<=3268||3271<=g&&g<=3272||3274<=g&&g<=3275||3330<=g&&g<=3331||3391<=g&&g<=3392||3398<=g&&g<=3400||3402<=g&&g<=3404||3458<=g&&g<=3459||3536<=g&&g<=3537||3544<=g&&g<=3550||3570<=g&&g<=3571||g==3635||g==3763||3902<=g&&g<=3903||g==3967||g==4145||4155<=g&&g<=4156||4182<=g&&g<=4183||g==4228||g==6070||6078<=g&&g<=6085||6087<=g&&g<=6088||6435<=g&&g<=6438||6441<=g&&g<=6443||6448<=g&&g<=6449||6451<=g&&g<=6456||6681<=g&&g<=6682||g==6741||g==6743||6765<=g&&g<=6770||g==6916||g==6965||g==6971||6973<=g&&g<=6977||6979<=g&&g<=6980||g==7042||g==7073||7078<=g&&g<=7079||g==7082||g==7143||7146<=g&&g<=7148||g==7150||7154<=g&&g<=7155||7204<=g&&g<=7211||7220<=g&&g<=7221||g==7393||7410<=g&&g<=7411||g==7415||43043<=g&&g<=43044||g==43047||43136<=g&&g<=43137||43188<=g&&g<=43203||43346<=g&&g<=43347||g==43395||43444<=g&&g<=43445||43450<=g&&g<=43451||43453<=g&&g<=43456||43567<=g&&g<=43568||43571<=g&&g<=43572||g==43597||g==43755||43758<=g&&g<=43759||g==43765||44003<=g&&g<=44004||44006<=g&&g<=44007||44009<=g&&g<=44010||g==44012||g==69632||g==69634||g==69762||69808<=g&&g<=69810||69815<=g&&g<=69816||g==69932||g==70018||70067<=g&&g<=70069||70079<=g&&g<=70080||70188<=g&&g<=70190||70194<=g&&g<=70195||g==70197||70368<=g&&g<=70370||70402<=g&&g<=70403||g==70463||70465<=g&&g<=70468||70471<=g&&g<=70472||70475<=g&&g<=70477||70498<=g&&g<=70499||70709<=g&&g<=70711||70720<=g&&g<=70721||g==70725||70833<=g&&g<=70834||g==70841||70843<=g&&g<=70844||g==70846||g==70849||71088<=g&&g<=71089||71096<=g&&g<=71099||g==71102||71216<=g&&g<=71218||71227<=g&&g<=71228||g==71230||g==71340||71342<=g&&g<=71343||g==71350||71456<=g&&g<=71457||g==71462||72199<=g&&g<=72200||g==72249||72279<=g&&g<=72280||g==72343||g==72751||g==72766||g==72873||g==72881||g==72884||94033<=g&&g<=94078||g==119142||g==119149?n:4352<=g&&g<=4447||43360<=g&&g<=43388?c:4448<=g&&g<=4519||55216<=g&&g<=55238?f:4520<=g&&g<=4607||55243<=g&&g<=55291?p:g==44032||g==44060||g==44088||g==44116||g==44144||g==44172||g==44200||g==44228||g==44256||g==44284||g==44312||g==44340||g==44368||g==44396||g==44424||g==44452||g==44480||g==44508||g==44536||g==44564||g==44592||g==44620||g==44648||g==44676||g==44704||g==44732||g==44760||g==44788||g==44816||g==44844||g==44872||g==44900||g==44928||g==44956||g==44984||g==45012||g==45040||g==45068||g==45096||g==45124||g==45152||g==45180||g==45208||g==45236||g==45264||g==45292||g==45320||g==45348||g==45376||g==45404||g==45432||g==45460||g==45488||g==45516||g==45544||g==45572||g==45600||g==45628||g==45656||g==45684||g==45712||g==45740||g==45768||g==45796||g==45824||g==45852||g==45880||g==45908||g==45936||g==45964||g==45992||g==46020||g==46048||g==46076||g==46104||g==46132||g==46160||g==46188||g==46216||g==46244||g==46272||g==46300||g==46328||g==46356||g==46384||g==46412||g==46440||g==46468||g==46496||g==46524||g==46552||g==46580||g==46608||g==46636||g==46664||g==46692||g==46720||g==46748||g==46776||g==46804||g==46832||g==46860||g==46888||g==46916||g==46944||g==46972||g==47e3||g==47028||g==47056||g==47084||g==47112||g==47140||g==47168||g==47196||g==47224||g==47252||g==47280||g==47308||g==47336||g==47364||g==47392||g==47420||g==47448||g==47476||g==47504||g==47532||g==47560||g==47588||g==47616||g==47644||g==47672||g==47700||g==47728||g==47756||g==47784||g==47812||g==47840||g==47868||g==47896||g==47924||g==47952||g==47980||g==48008||g==48036||g==48064||g==48092||g==48120||g==48148||g==48176||g==48204||g==48232||g==48260||g==48288||g==48316||g==48344||g==48372||g==48400||g==48428||g==48456||g==48484||g==48512||g==48540||g==48568||g==48596||g==48624||g==48652||g==48680||g==48708||g==48736||g==48764||g==48792||g==48820||g==48848||g==48876||g==48904||g==48932||g==48960||g==48988||g==49016||g==49044||g==49072||g==49100||g==49128||g==49156||g==49184||g==49212||g==49240||g==49268||g==49296||g==49324||g==49352||g==49380||g==49408||g==49436||g==49464||g==49492||g==49520||g==49548||g==49576||g==49604||g==49632||g==49660||g==49688||g==49716||g==49744||g==49772||g==49800||g==49828||g==49856||g==49884||g==49912||g==49940||g==49968||g==49996||g==50024||g==50052||g==50080||g==50108||g==50136||g==50164||g==50192||g==50220||g==50248||g==50276||g==50304||g==50332||g==50360||g==50388||g==50416||g==50444||g==50472||g==50500||g==50528||g==50556||g==50584||g==50612||g==50640||g==50668||g==50696||g==50724||g==50752||g==50780||g==50808||g==50836||g==50864||g==50892||g==50920||g==50948||g==50976||g==51004||g==51032||g==51060||g==51088||g==51116||g==51144||g==51172||g==51200||g==51228||g==51256||g==51284||g==51312||g==51340||g==51368||g==51396||g==51424||g==51452||g==51480||g==51508||g==51536||g==51564||g==51592||g==51620||g==51648||g==51676||g==51704||g==51732||g==51760||g==51788||g==51816||g==51844||g==51872||g==51900||g==51928||g==51956||g==51984||g==52012||g==52040||g==52068||g==52096||g==52124||g==52152||g==52180||g==52208||g==52236||g==52264||g==52292||g==52320||g==52348||g==52376||g==52404||g==52432||g==52460||g==52488||g==52516||g==52544||g==52572||g==52600||g==52628||g==52656||g==52684||g==52712||g==52740||g==52768||g==52796||g==52824||g==52852||g==52880||g==52908||g==52936||g==52964||g==52992||g==53020||g==53048||g==53076||g==53104||g==53132||g==53160||g==53188||g==53216||g==53244||g==53272||g==53300||g==53328||g==53356||g==53384||g==53412||g==53440||g==53468||g==53496||g==53524||g==53552||g==53580||g==53608||g==53636||g==53664||g==53692||g==53720||g==53748||g==53776||g==53804||g==53832||g==53860||g==53888||g==53916||g==53944||g==53972||g==54e3||g==54028||g==54056||g==54084||g==54112||g==54140||g==54168||g==54196||g==54224||g==54252||g==54280||g==54308||g==54336||g==54364||g==54392||g==54420||g==54448||g==54476||g==54504||g==54532||g==54560||g==54588||g==54616||g==54644||g==54672||g==54700||g==54728||g==54756||g==54784||g==54812||g==54840||g==54868||g==54896||g==54924||g==54952||g==54980||g==55008||g==55036||g==55064||g==55092||g==55120||g==55148||g==55176?h:44033<=g&&g<=44059||44061<=g&&g<=44087||44089<=g&&g<=44115||44117<=g&&g<=44143||44145<=g&&g<=44171||44173<=g&&g<=44199||44201<=g&&g<=44227||44229<=g&&g<=44255||44257<=g&&g<=44283||44285<=g&&g<=44311||44313<=g&&g<=44339||44341<=g&&g<=44367||44369<=g&&g<=44395||44397<=g&&g<=44423||44425<=g&&g<=44451||44453<=g&&g<=44479||44481<=g&&g<=44507||44509<=g&&g<=44535||44537<=g&&g<=44563||44565<=g&&g<=44591||44593<=g&&g<=44619||44621<=g&&g<=44647||44649<=g&&g<=44675||44677<=g&&g<=44703||44705<=g&&g<=44731||44733<=g&&g<=44759||44761<=g&&g<=44787||44789<=g&&g<=44815||44817<=g&&g<=44843||44845<=g&&g<=44871||44873<=g&&g<=44899||44901<=g&&g<=44927||44929<=g&&g<=44955||44957<=g&&g<=44983||44985<=g&&g<=45011||45013<=g&&g<=45039||45041<=g&&g<=45067||45069<=g&&g<=45095||45097<=g&&g<=45123||45125<=g&&g<=45151||45153<=g&&g<=45179||45181<=g&&g<=45207||45209<=g&&g<=45235||45237<=g&&g<=45263||45265<=g&&g<=45291||45293<=g&&g<=45319||45321<=g&&g<=45347||45349<=g&&g<=45375||45377<=g&&g<=45403||45405<=g&&g<=45431||45433<=g&&g<=45459||45461<=g&&g<=45487||45489<=g&&g<=45515||45517<=g&&g<=45543||45545<=g&&g<=45571||45573<=g&&g<=45599||45601<=g&&g<=45627||45629<=g&&g<=45655||45657<=g&&g<=45683||45685<=g&&g<=45711||45713<=g&&g<=45739||45741<=g&&g<=45767||45769<=g&&g<=45795||45797<=g&&g<=45823||45825<=g&&g<=45851||45853<=g&&g<=45879||45881<=g&&g<=45907||45909<=g&&g<=45935||45937<=g&&g<=45963||45965<=g&&g<=45991||45993<=g&&g<=46019||46021<=g&&g<=46047||46049<=g&&g<=46075||46077<=g&&g<=46103||46105<=g&&g<=46131||46133<=g&&g<=46159||46161<=g&&g<=46187||46189<=g&&g<=46215||46217<=g&&g<=46243||46245<=g&&g<=46271||46273<=g&&g<=46299||46301<=g&&g<=46327||46329<=g&&g<=46355||46357<=g&&g<=46383||46385<=g&&g<=46411||46413<=g&&g<=46439||46441<=g&&g<=46467||46469<=g&&g<=46495||46497<=g&&g<=46523||46525<=g&&g<=46551||46553<=g&&g<=46579||46581<=g&&g<=46607||46609<=g&&g<=46635||46637<=g&&g<=46663||46665<=g&&g<=46691||46693<=g&&g<=46719||46721<=g&&g<=46747||46749<=g&&g<=46775||46777<=g&&g<=46803||46805<=g&&g<=46831||46833<=g&&g<=46859||46861<=g&&g<=46887||46889<=g&&g<=46915||46917<=g&&g<=46943||46945<=g&&g<=46971||46973<=g&&g<=46999||47001<=g&&g<=47027||47029<=g&&g<=47055||47057<=g&&g<=47083||47085<=g&&g<=47111||47113<=g&&g<=47139||47141<=g&&g<=47167||47169<=g&&g<=47195||47197<=g&&g<=47223||47225<=g&&g<=47251||47253<=g&&g<=47279||47281<=g&&g<=47307||47309<=g&&g<=47335||47337<=g&&g<=47363||47365<=g&&g<=47391||47393<=g&&g<=47419||47421<=g&&g<=47447||47449<=g&&g<=47475||47477<=g&&g<=47503||47505<=g&&g<=47531||47533<=g&&g<=47559||47561<=g&&g<=47587||47589<=g&&g<=47615||47617<=g&&g<=47643||47645<=g&&g<=47671||47673<=g&&g<=47699||47701<=g&&g<=47727||47729<=g&&g<=47755||47757<=g&&g<=47783||47785<=g&&g<=47811||47813<=g&&g<=47839||47841<=g&&g<=47867||47869<=g&&g<=47895||47897<=g&&g<=47923||47925<=g&&g<=47951||47953<=g&&g<=47979||47981<=g&&g<=48007||48009<=g&&g<=48035||48037<=g&&g<=48063||48065<=g&&g<=48091||48093<=g&&g<=48119||48121<=g&&g<=48147||48149<=g&&g<=48175||48177<=g&&g<=48203||48205<=g&&g<=48231||48233<=g&&g<=48259||48261<=g&&g<=48287||48289<=g&&g<=48315||48317<=g&&g<=48343||48345<=g&&g<=48371||48373<=g&&g<=48399||48401<=g&&g<=48427||48429<=g&&g<=48455||48457<=g&&g<=48483||48485<=g&&g<=48511||48513<=g&&g<=48539||48541<=g&&g<=48567||48569<=g&&g<=48595||48597<=g&&g<=48623||48625<=g&&g<=48651||48653<=g&&g<=48679||48681<=g&&g<=48707||48709<=g&&g<=48735||48737<=g&&g<=48763||48765<=g&&g<=48791||48793<=g&&g<=48819||48821<=g&&g<=48847||48849<=g&&g<=48875||48877<=g&&g<=48903||48905<=g&&g<=48931||48933<=g&&g<=48959||48961<=g&&g<=48987||48989<=g&&g<=49015||49017<=g&&g<=49043||49045<=g&&g<=49071||49073<=g&&g<=49099||49101<=g&&g<=49127||49129<=g&&g<=49155||49157<=g&&g<=49183||49185<=g&&g<=49211||49213<=g&&g<=49239||49241<=g&&g<=49267||49269<=g&&g<=49295||49297<=g&&g<=49323||49325<=g&&g<=49351||49353<=g&&g<=49379||49381<=g&&g<=49407||49409<=g&&g<=49435||49437<=g&&g<=49463||49465<=g&&g<=49491||49493<=g&&g<=49519||49521<=g&&g<=49547||49549<=g&&g<=49575||49577<=g&&g<=49603||49605<=g&&g<=49631||49633<=g&&g<=49659||49661<=g&&g<=49687||49689<=g&&g<=49715||49717<=g&&g<=49743||49745<=g&&g<=49771||49773<=g&&g<=49799||49801<=g&&g<=49827||49829<=g&&g<=49855||49857<=g&&g<=49883||49885<=g&&g<=49911||49913<=g&&g<=49939||49941<=g&&g<=49967||49969<=g&&g<=49995||49997<=g&&g<=50023||50025<=g&&g<=50051||50053<=g&&g<=50079||50081<=g&&g<=50107||50109<=g&&g<=50135||50137<=g&&g<=50163||50165<=g&&g<=50191||50193<=g&&g<=50219||50221<=g&&g<=50247||50249<=g&&g<=50275||50277<=g&&g<=50303||50305<=g&&g<=50331||50333<=g&&g<=50359||50361<=g&&g<=50387||50389<=g&&g<=50415||50417<=g&&g<=50443||50445<=g&&g<=50471||50473<=g&&g<=50499||50501<=g&&g<=50527||50529<=g&&g<=50555||50557<=g&&g<=50583||50585<=g&&g<=50611||50613<=g&&g<=50639||50641<=g&&g<=50667||50669<=g&&g<=50695||50697<=g&&g<=50723||50725<=g&&g<=50751||50753<=g&&g<=50779||50781<=g&&g<=50807||50809<=g&&g<=50835||50837<=g&&g<=50863||50865<=g&&g<=50891||50893<=g&&g<=50919||50921<=g&&g<=50947||50949<=g&&g<=50975||50977<=g&&g<=51003||51005<=g&&g<=51031||51033<=g&&g<=51059||51061<=g&&g<=51087||51089<=g&&g<=51115||51117<=g&&g<=51143||51145<=g&&g<=51171||51173<=g&&g<=51199||51201<=g&&g<=51227||51229<=g&&g<=51255||51257<=g&&g<=51283||51285<=g&&g<=51311||51313<=g&&g<=51339||51341<=g&&g<=51367||51369<=g&&g<=51395||51397<=g&&g<=51423||51425<=g&&g<=51451||51453<=g&&g<=51479||51481<=g&&g<=51507||51509<=g&&g<=51535||51537<=g&&g<=51563||51565<=g&&g<=51591||51593<=g&&g<=51619||51621<=g&&g<=51647||51649<=g&&g<=51675||51677<=g&&g<=51703||51705<=g&&g<=51731||51733<=g&&g<=51759||51761<=g&&g<=51787||51789<=g&&g<=51815||51817<=g&&g<=51843||51845<=g&&g<=51871||51873<=g&&g<=51899||51901<=g&&g<=51927||51929<=g&&g<=51955||51957<=g&&g<=51983||51985<=g&&g<=52011||52013<=g&&g<=52039||52041<=g&&g<=52067||52069<=g&&g<=52095||52097<=g&&g<=52123||52125<=g&&g<=52151||52153<=g&&g<=52179||52181<=g&&g<=52207||52209<=g&&g<=52235||52237<=g&&g<=52263||52265<=g&&g<=52291||52293<=g&&g<=52319||52321<=g&&g<=52347||52349<=g&&g<=52375||52377<=g&&g<=52403||52405<=g&&g<=52431||52433<=g&&g<=52459||52461<=g&&g<=52487||52489<=g&&g<=52515||52517<=g&&g<=52543||52545<=g&&g<=52571||52573<=g&&g<=52599||52601<=g&&g<=52627||52629<=g&&g<=52655||52657<=g&&g<=52683||52685<=g&&g<=52711||52713<=g&&g<=52739||52741<=g&&g<=52767||52769<=g&&g<=52795||52797<=g&&g<=52823||52825<=g&&g<=52851||52853<=g&&g<=52879||52881<=g&&g<=52907||52909<=g&&g<=52935||52937<=g&&g<=52963||52965<=g&&g<=52991||52993<=g&&g<=53019||53021<=g&&g<=53047||53049<=g&&g<=53075||53077<=g&&g<=53103||53105<=g&&g<=53131||53133<=g&&g<=53159||53161<=g&&g<=53187||53189<=g&&g<=53215||53217<=g&&g<=53243||53245<=g&&g<=53271||53273<=g&&g<=53299||53301<=g&&g<=53327||53329<=g&&g<=53355||53357<=g&&g<=53383||53385<=g&&g<=53411||53413<=g&&g<=53439||53441<=g&&g<=53467||53469<=g&&g<=53495||53497<=g&&g<=53523||53525<=g&&g<=53551||53553<=g&&g<=53579||53581<=g&&g<=53607||53609<=g&&g<=53635||53637<=g&&g<=53663||53665<=g&&g<=53691||53693<=g&&g<=53719||53721<=g&&g<=53747||53749<=g&&g<=53775||53777<=g&&g<=53803||53805<=g&&g<=53831||53833<=g&&g<=53859||53861<=g&&g<=53887||53889<=g&&g<=53915||53917<=g&&g<=53943||53945<=g&&g<=53971||53973<=g&&g<=53999||54001<=g&&g<=54027||54029<=g&&g<=54055||54057<=g&&g<=54083||54085<=g&&g<=54111||54113<=g&&g<=54139||54141<=g&&g<=54167||54169<=g&&g<=54195||54197<=g&&g<=54223||54225<=g&&g<=54251||54253<=g&&g<=54279||54281<=g&&g<=54307||54309<=g&&g<=54335||54337<=g&&g<=54363||54365<=g&&g<=54391||54393<=g&&g<=54419||54421<=g&&g<=54447||54449<=g&&g<=54475||54477<=g&&g<=54503||54505<=g&&g<=54531||54533<=g&&g<=54559||54561<=g&&g<=54587||54589<=g&&g<=54615||54617<=g&&g<=54643||54645<=g&&g<=54671||54673<=g&&g<=54699||54701<=g&&g<=54727||54729<=g&&g<=54755||54757<=g&&g<=54783||54785<=g&&g<=54811||54813<=g&&g<=54839||54841<=g&&g<=54867||54869<=g&&g<=54895||54897<=g&&g<=54923||54925<=g&&g<=54951||54953<=g&&g<=54979||54981<=g&&g<=55007||55009<=g&&g<=55035||55037<=g&&g<=55063||55065<=g&&g<=55091||55093<=g&&g<=55119||55121<=g&&g<=55147||55149<=g&&g<=55175||55177<=g&&g<=55203?E:g==9757||g==9977||9994<=g&&g<=9997||g==127877||127938<=g&&g<=127940||g==127943||127946<=g&&g<=127948||128066<=g&&g<=128067||128070<=g&&g<=128080||g==128110||128112<=g&&g<=128120||g==128124||128129<=g&&g<=128131||128133<=g&&g<=128135||g==128170||128372<=g&&g<=128373||g==128378||g==128400||128405<=g&&g<=128406||128581<=g&&g<=128583||128587<=g&&g<=128591||g==128675||128692<=g&&g<=128694||g==128704||g==128716||129304<=g&&g<=129308||129310<=g&&g<=129311||g==129318||129328<=g&&g<=129337||129341<=g&&g<=129342||129489<=g&&g<=129501?P:127995<=g&&g<=127999?I:g==8205?R:g==9792||g==9794||9877<=g&&g<=9878||g==9992||g==10084||g==127752||g==127806||g==127859||g==127891||g==127908||g==127912||g==127979||g==127981||g==128139||128187<=g&&g<=128188||g==128295||g==128300||g==128488||g==128640||g==128658?N:128102<=g&&g<=128105?U:C}return this}typeof FT<\"u\"&&FT.exports&&(FT.exports=xyt)});var Zme=L((Q$t,zme)=>{var kyt=/^(.*?)(\\x1b\\[[^m]+m|\\x1b\\]8;;.*?(\\x1b\\\\|\\u0007))/,NT;function Qyt(){if(NT)return NT;if(typeof Intl.Segmenter<\"u\"){let t=new Intl.Segmenter(\"en\",{granularity:\"grapheme\"});return NT=e=>Array.from(t.segment(e),({segment:r})=>r)}else{let t=Jme(),e=new t;return NT=r=>e.splitGraphemes(r)}}zme.exports=(t,e=0,r=t.length)=>{if(e<0||r<0)throw new RangeError(\"Negative indices aren't supported by this implementation\");let s=r-e,a=\"\",n=0,c=0;for(;t.length>0;){let f=t.match(kyt)||[t,t,void 0],p=Qyt()(f[1]),h=Math.min(e-n,p.length);p=p.slice(h);let E=Math.min(s-c,p.length);a+=p.slice(0,E).join(\"\"),n+=h,c+=E,typeof f[2]<\"u\"&&(a+=f[2]),t=t.slice(f[0].length)}return a}});var un,Rv=It(()=>{un=process.env.YARN_IS_TEST_ENV?\"0.0.0\":\"4.9.1\"});function nye(t,{configuration:e,json:r}){if(!e.get(\"enableMessageNames\"))return\"\";let a=Vf(t===null?0:t);return!r&&t===null?Ut(e,a,\"grey\"):a}function m6(t,{configuration:e,json:r}){let s=nye(t,{configuration:e,json:r});if(!s||t===null||t===0)return s;let a=Dr[t],n=`https://yarnpkg.com/advanced/error-codes#${s}---${a}`.toLowerCase();return JE(e,s,n)}async function DI({configuration:t,stdout:e,forceError:r},s){let a=await Ot.start({configuration:t,stdout:e,includeFooter:!1},async n=>{let c=!1,f=!1;for(let p of s)typeof p.option<\"u\"&&(p.error||r?(f=!0,n.reportError(50,p.message)):(c=!0,n.reportWarning(50,p.message)),p.callback?.());c&&!f&&n.reportSeparator()});return a.hasErrors()?a.exitCode():null}var tye,OT,Tyt,Xme,$me,b0,rye,eye,Ryt,Fyt,LT,Nyt,Ot,Fv=It(()=>{tye=et(Zme()),OT=et(Nd());nk();Fc();Rv();Qc();Tyt=\"\\xB7\",Xme=[\"\\u280B\",\"\\u2819\",\"\\u2839\",\"\\u2838\",\"\\u283C\",\"\\u2834\",\"\\u2826\",\"\\u2827\",\"\\u2807\",\"\\u280F\"],$me=80,b0=OT.default.GITHUB_ACTIONS?{start:t=>`::group::${t}\n`,end:t=>`::endgroup::\n`}:OT.default.TRAVIS?{start:t=>`travis_fold:start:${t}\n`,end:t=>`travis_fold:end:${t}\n`}:OT.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\\W+/g,\"_\")}[collapsed=true]\\r\\x1B[0K${t}\n`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\\W+/g,\"_\")}\\r\\x1B[0K`}:null,rye=b0!==null,eye=new Date,Ryt=[\"iTerm.app\",\"Apple_Terminal\",\"WarpTerminal\",\"vscode\"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,Fyt=t=>t,LT=Fyt({patrick:{date:[17,3],chars:[\"\\u{1F340}\",\"\\u{1F331}\"],size:40},simba:{date:[19,7],chars:[\"\\u{1F981}\",\"\\u{1F334}\"],size:40},jack:{date:[31,10],chars:[\"\\u{1F383}\",\"\\u{1F987}\"],size:40},hogsfather:{date:[31,12],chars:[\"\\u{1F389}\",\"\\u{1F384}\"],size:40},default:{chars:[\"=\",\"-\"],size:80}}),Nyt=Ryt&&Object.keys(LT).find(t=>{let e=LT[t];return!(e.date&&(e.date[0]!==eye.getDate()||e.date[1]!==eye.getMonth()+1))})||\"default\";Ot=class extends ho{constructor({configuration:r,stdout:s,json:a=!1,forceSectionAlignment:n=!1,includeNames:c=!0,includePrefix:f=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:C=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(YB(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=c,this.includePrefix=f,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=C,this.json=a,this.stdout=s,r.get(\"enableProgressBars\")&&!a&&s.isTTY&&s.columns>22){let S=r.get(\"progressBarStyle\")||Nyt;if(!Object.hasOwn(LT,S))throw new Error(\"Assertion failed: Invalid progress bar style\");this.progressStyle=LT[S];let P=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*P/80)}}static async start(r,s){let a=new this(r),n=process.emitWarning;process.emitWarning=(c,f)=>{if(typeof c!=\"string\"){let h=c;c=h.message,f=f??h.name}let p=typeof f<\"u\"?`${f}: ${c}`:c;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,zd(r.configuration,`Yarn ${un}`,2));try{await s(a)}catch(c){a.reportExceptionOnce(c)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let s=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,s-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}async startSectionPromise({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}startTimerImpl(r,s,a){return{cb:typeof s==\"function\"?s:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\\u250C ${r}`),this.indent+=1,b0!==null&&!this.json&&this.includeInfos&&this.stdout.write(b0.start(r))},reportFooter:f=>{if(this.indent-=1,b0!==null&&!this.json&&this.includeInfos){this.stdout.write(b0.end(r));for(let p of this.timerFooter)p()}this.configuration.get(\"enableTimers\")&&f>200?this.reportInfo(null,`\\u2514 Completed in ${Ut(this.configuration,f,Ct.DURATION)}`):this.reportInfo(null,\"\\u2514 Completed\"),this.level-=1},skipIfEmpty:(typeof s==\"function\"?{}:s).skipIfEmpty}}startTimerSync(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionSync(c,n)}async startTimerPromise(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionPromise(c,n)}reportSeparator(){this.indent===0?this.writeLine(\"\"):this.reportInfo(null,\"\")}reportInfo(r,s){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:\"\",c=`${this.formatPrefix(n,\"blueBright\")}${s}`;this.json?this.reportJson({type:\"info\",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(c)}reportWarning(r,s){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:\"\";this.json?this.reportJson({type:\"warning\",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,\"yellowBright\")}${s}`)}reportError(r,s){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,s)),this.reportErrorImpl(r,s)}reportErrorImpl(r,s){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:\"\";this.json?this.reportJson({type:\"error\",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,\"redBright\")}${s}`,{truncate:!1})}reportFold(r,s){if(!b0)return;let a=`${b0.start(r)}${s}${b0.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)return{...Promise.resolve(),stop:()=>{}};if(r.hasProgress&&r.hasTitle)throw new Error(\"Unimplemented: Progress bars can't have both progress and titles.\");let s=!1,a=Promise.resolve().then(async()=>{let c={progress:r.hasProgress?0:void 0,title:r.hasTitle?\"\":void 0};this.progress.set(r,{definition:c,lastScaledSize:r.hasProgress?-1:void 0,lastTitle:void 0}),this.refreshProgress({delta:-1});for await(let{progress:f,title:p}of r)s||c.progress===f&&c.title===p||(c.progress=f,c.title=p,this.refreshProgress());n()}),n=()=>{s||(s=!0,this.progress.delete(r),this.refreshProgress({delta:1}))};return{...a,stop:n}}reportJson(r){this.json&&this.writeLine(`${JSON.stringify(r)}`)}async finalize(){if(!this.includeFooter)return;let r=\"\";this.errorCount>0?r=\"Failed with errors\":this.warningCount>0?r=\"Done with warnings\":r=\"Done\";let s=Ut(this.configuration,Date.now()-this.startTime,Ct.DURATION),a=this.configuration.get(\"enableTimers\")?`${r} in ${s}`:r;this.errorCount>0?this.reportError(0,a):this.warningCount>0?this.reportWarning(0,a):this.reportInfo(0,a)}writeLine(r,{truncate:s}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(r,{truncate:s})}\n`),this.writeProgress()}writeLines(r,{truncate:s}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:s})}\n`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let s of r)s.committed=!0,s.action()}clearProgress({delta:r=0,clear:s=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\\x1B[${this.progress.size+r}A`),(r>0||s)&&this.stdout.write(\"\\x1B[0J\"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>$me&&(this.progressFrame=(this.progressFrame+1)%Xme.length,this.progressTime=r);let s=Xme[this.progressFrame];for(let a of this.progress.values()){let n=\"\";if(typeof a.lastScaledSize<\"u\"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let c=this.formatName(null),f=c?`${c}: `:\"\",p=a.definition.title?` ${a.definition.title}`:\"\";this.stdout.write(`${Ut(this.configuration,\"\\u27A4\",\"blueBright\")} ${f}${s}${n}${p}\n`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},$me)}refreshProgress({delta:r=0,force:s=!1}={}){let a=!1,n=!1;if(s||this.progress.size===0)a=!0;else for(let c of this.progress.values()){let f=typeof c.definition.progress<\"u\"?Math.trunc(this.progressMaxScaledSize*c.definition.progress):void 0,p=c.lastScaledSize;c.lastScaledSize=f;let h=c.lastTitle;if(c.lastTitle=c.definition.title,f!==p||(n=h!==c.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:s}={}){return this.progressStyle===null&&(s=!1),typeof s>\"u\"&&(s=this.configuration.get(\"preferTruncatedLines\")),s&&(r=(0,tye.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?nye(r,{configuration:this.configuration,json:this.json}):\"\"}formatPrefix(r,s){return this.includePrefix?`${Ut(this.configuration,\"\\u27A4\",s)} ${r}${this.formatIndent()}`:\"\"}formatNameWithHyperlink(r){return this.includeNames?m6(r,{configuration:this.configuration,json:this.json}):\"\"}formatIndent(){return this.level>0||!this.forceSectionAlignment?\"\\u2502 \".repeat(this.indent):`${Tyt} `}}});var In={};Vt(In,{PackageManager:()=>oye,detectPackageManager:()=>aye,executePackageAccessibleBinary:()=>Aye,executePackageScript:()=>MT,executePackageShellcode:()=>y6,executeWorkspaceAccessibleBinary:()=>jyt,executeWorkspaceLifecycleScript:()=>uye,executeWorkspaceScript:()=>cye,getPackageAccessibleBinaries:()=>_T,getWorkspaceAccessibleBinaries:()=>fye,hasPackageScript:()=>_yt,hasWorkspaceScript:()=>E6,isNodeScript:()=>I6,makeScriptEnv:()=>Nv,maybeExecuteWorkspaceLifecycleScript:()=>Hyt,prepareExternalProject:()=>Myt});async function P0(t,e,r,s=[]){if(process.platform===\"win32\"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @\"${r}\" ${s.map(n=>`\"${n.replace('\"','\"\"')}\"`).join(\" \")} %*`;await le.writeFilePromise(K.format({dir:t,name:e,ext:\".cmd\"}),a)}await le.writeFilePromise(K.join(t,e),`#!/bin/sh\nexec \"${r}\" ${s.map(a=>`'${a.replace(/'/g,`'\"'\"'`)}'`).join(\" \")} \"$@\"\n`,{mode:493})}async function aye(t){let e=await Ht.tryFind(t);if(e?.packageManager){let s=xQ(e.packageManager);if(s?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=s.reference.split(\".\");switch(s.name){case\"yarn\":return{packageManagerField:!0,packageManager:Number(n)===1?\"Yarn Classic\":\"Yarn\",reason:a};case\"npm\":return{packageManagerField:!0,packageManager:\"npm\",reason:a};case\"pnpm\":return{packageManagerField:!0,packageManager:\"pnpm\",reason:a}}}}let r;try{r=await le.readFilePromise(K.join(t,Er.lockfile),\"utf8\")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:\"Yarn\",reason:'\"__metadata\" key found in yarn.lock'}:{packageManager:\"Yarn Classic\",reason:'\"__metadata\" key not found in yarn.lock, must be a Yarn classic lockfile'}:le.existsSync(K.join(t,\"package-lock.json\"))?{packageManager:\"npm\",reason:`found npm's \"package-lock.json\" lockfile`}:le.existsSync(K.join(t,\"pnpm-lock.yaml\"))?{packageManager:\"pnpm\",reason:`found pnpm's \"pnpm-lock.yaml\" lockfile`}:null}async function Nv({project:t,locator:e,binFolder:r,ignoreCorepack:s,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let c={};for(let[E,C]of Object.entries(n))typeof C<\"u\"&&(c[E.toLowerCase()!==\"path\"?E:\"PATH\"]=C);let f=ue.fromPortablePath(r);c.BERRY_BIN_FOLDER=ue.fromPortablePath(f);let p=process.env.COREPACK_ROOT&&!s?ue.join(process.env.COREPACK_ROOT,\"dist/yarn.js\"):process.argv[1];if(await Promise.all([P0(r,\"node\",process.execPath),...un!==null?[P0(r,\"run\",process.execPath,[p,\"run\"]),P0(r,\"yarn\",process.execPath,[p]),P0(r,\"yarnpkg\",process.execPath,[p]),P0(r,\"node-gyp\",process.execPath,[p,\"run\",\"--top-level\",\"node-gyp\"])]:[]]),t&&(c.INIT_CWD=ue.fromPortablePath(t.configuration.startingCwd),c.PROJECT_CWD=ue.fromPortablePath(t.cwd)),c.PATH=c.PATH?`${f}${ue.delimiter}${c.PATH}`:`${f}`,c.npm_execpath=`${f}${ue.sep}yarn`,c.npm_node_execpath=`${f}${ue.sep}node`,e){if(!t)throw new Error(\"Assertion failed: Missing project\");let E=t.tryWorkspaceByLocator(e),C=E?E.manifest.version??\"\":t.storedPackages.get(e.locatorHash).version??\"\";c.npm_package_name=cn(e),c.npm_package_version=C;let S;if(E)S=E.cwd;else{let P=t.storedPackages.get(e.locatorHash);if(!P)throw new Error(`Package for ${Yr(t.configuration,e)} not found in the project`);let I=t.configuration.getLinkers(),R={project:t,report:new Ot({stdout:new x0.PassThrough,configuration:t.configuration})},N=I.find(U=>U.supportsPackage(P,R));if(!N)throw new Error(`The package ${Yr(t.configuration,P)} isn't supported by any of the available linkers`);S=await N.findPackageLocation(P,R)}c.npm_package_json=ue.fromPortablePath(K.join(S,Er.manifest))}let h=un!==null?`yarn/${un}`:`yarn/${kp(\"@yarnpkg/core\").version}-core`;return c.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(c.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,c,async(E,C,S)=>await P0(r,E,C,S)),c}async function Myt(t,e,{configuration:r,report:s,workspace:a=null,locator:n=null}){await Lyt(async()=>{await le.mktempPromise(async c=>{let f=K.join(c,\"pack.log\"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(f,{prefix:ue.fromPortablePath(t),report:s}),C=n&&Gu(n)?rI(n):n,S=C?cl(C):\"an external project\";h.write(`Packing ${S} from sources\n`);let P=await aye(t),I;P!==null?(h.write(`Using ${P.packageManager} for bootstrap. Reason: ${P.reason}\n\n`),I=P.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn\n\n`),I=\"Yarn\");let R=I===\"Yarn\"&&!P?.packageManagerField;await le.mktempPromise(async N=>{let U=await Nv({binFolder:N,ignoreCorepack:R,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:\"0\"}}),te=new Map([[\"Yarn Classic\",async()=>{let Ae=a!==null?[\"workspace\",a]:[],ce=K.join(t,Er.manifest),me=await le.readFilePromise(ce),pe=await Yu(process.execPath,[process.argv[1],\"set\",\"version\",\"classic\",\"--only-if-needed\",\"--yarn-path\"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(pe.code!==0)return pe.code;await le.writeFilePromise(ce,me),await le.appendFilePromise(K.join(t,\".npmignore\"),`/.yarn\n`),h.write(`\n`),delete U.NODE_ENV;let Be=await Yu(\"yarn\",[\"install\"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Be.code!==0)return Be.code;h.write(`\n`);let Ce=await Yu(\"yarn\",[...Ae,\"pack\",\"--filename\",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ce.code!==0?Ce.code:0}],[\"Yarn\",async()=>{let Ae=a!==null?[\"workspace\",a]:[];U.YARN_ENABLE_INLINE_BUILDS=\"1\";let ce=K.join(t,Er.lockfile);await le.existsPromise(ce)||await le.writeFilePromise(ce,\"\");let me=await Yu(\"yarn\",[...Ae,\"pack\",\"--install-if-needed\",\"--filename\",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return me.code!==0?me.code:0}],[\"npm\",async()=>{if(a!==null){let we=new x0.PassThrough,Ee=WE(we);we.pipe(h,{end:!1});let fe=await Yu(\"npm\",[\"--version\"],{cwd:t,env:U,stdin:p,stdout:we,stderr:E,end:0});if(we.end(),fe.code!==0)return h.end(),E.end(),fe.code;let se=(await Ee).toString().trim();if(!eA(se,\">=7.x\")){let X=ba(null,\"npm\"),De=On(X,se),Re=On(X,\">=7.x\");throw new Error(`Workspaces aren't supported by ${ri(r,De)}; please upgrade to ${ri(r,Re)} (npm has been detected as the primary package manager for ${Ut(r,t,Ct.PATH)})`)}}let Ae=a!==null?[\"--workspace\",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ce=await Yu(\"npm\",[\"install\",\"--legacy-peer-deps\"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ce.code!==0)return ce.code;let me=new x0.PassThrough,pe=WE(me);me.pipe(h);let Be=await Yu(\"npm\",[\"pack\",\"--silent\",...Ae],{cwd:t,env:U,stdin:p,stdout:me,stderr:E});if(Be.code!==0)return Be.code;let Ce=(await pe).toString().trim().replace(/^.*\\n/s,\"\"),g=K.resolve(t,ue.toPortablePath(Ce));return await le.renamePromise(g,e),0}]]).get(I);if(typeof te>\"u\")throw new Error(\"Assertion failed: Unsupported workflow\");let ie=await te();if(!(ie===0||typeof ie>\"u\"))throw le.detachTemp(c),new Yt(58,`Packing the package failed (exit code ${ie}, logs can be found here: ${Ut(r,f,Ct.PATH)})`)})})})}async function _yt(t,e,{project:r}){let s=r.tryWorkspaceByLocator(t);if(s!==null)return E6(s,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r.configuration,t)} not found in the project`);return await tA.openPromise(async n=>{let c=r.configuration,f=r.configuration.getLinkers(),p={project:r,report:new Ot({stdout:new x0.PassThrough,configuration:c})},h=f.find(P=>P.supportsPackage(a,p));if(!h)throw new Error(`The package ${Yr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),C=new Sn(E,{baseFs:n});return(await Ht.find(vt.dot,{baseFs:C})).scripts.has(e)})}async function MT(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{manifest:h,env:E,cwd:C}=await lye(t,{project:a,binFolder:p,cwd:s,lifecycleScript:e}),S=h.scripts.get(e);if(typeof S>\"u\")return 1;let P=async()=>await SI(S,r,{cwd:C,env:E,stdin:n,stdout:c,stderr:f});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,P,a,t,e,{script:S,args:r,cwd:C,env:E,stdin:n,stdout:c,stderr:f}))()})}async function y6(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{env:h,cwd:E}=await lye(t,{project:a,binFolder:p,cwd:s});return await SI(e,r,{cwd:E,env:h,stdin:n,stdout:c,stderr:f})})}async function Uyt(t,{binFolder:e,cwd:r,lifecycleScript:s}){let a=await Nv({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:s});return await C6(e,await fye(t)),typeof r>\"u\"&&(r=K.dirname(await le.realpathPromise(K.join(t.cwd,\"package.json\")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function lye(t,{project:e,binFolder:r,cwd:s,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return Uyt(n,{binFolder:r,cwd:s,lifecycleScript:a});let c=e.storedPackages.get(t.locatorHash);if(!c)throw new Error(`Package for ${Yr(e.configuration,t)} not found in the project`);return await tA.openPromise(async f=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Ot({stdout:new x0.PassThrough,configuration:p})},C=h.find(N=>N.supportsPackage(c,E));if(!C)throw new Error(`The package ${Yr(e.configuration,c)} isn't supported by any of the available linkers`);let S=await Nv({project:e,locator:t,binFolder:r,lifecycleScript:a});await C6(r,await _T(t,{project:e}));let P=await C.findPackageLocation(c,E),I=new Sn(P,{baseFs:f}),R=await Ht.find(vt.dot,{baseFs:I});return typeof s>\"u\"&&(s=P),{manifest:R,binFolder:r,env:S,cwd:s}})}async function cye(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c}){return await MT(t.anchoredLocator,e,r,{cwd:s,project:t.project,stdin:a,stdout:n,stderr:c})}function E6(t,e){return t.manifest.scripts.has(e)}async function uye(t,e,{cwd:r,report:s}){let{configuration:a}=t.project,n=null;await le.mktempPromise(async c=>{let f=K.join(c,`${e}.log`),p=`# This file contains the result of Yarn calling the \"${e}\" lifecycle script inside a workspace (\"${ue.fromPortablePath(t.cwd)}\")\n`,{stdout:h,stderr:E}=a.getSubprocessStreams(f,{report:s,prefix:Yr(a,t.anchoredLocator),header:p});s.reportInfo(36,`Calling the \"${e}\" lifecycle script`);let C=await cye(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),C!==0)throw le.detachTemp(c),new Yt(36,`${(0,iye.default)(e)} script failed (exit code ${Ut(a,C,Ct.NUMBER)}, logs can be found here: ${Ut(a,f,Ct.PATH)}); run ${Ut(a,`yarn ${e}`,Ct.CODE)} to investigate`)})}async function Hyt(t,e,r){E6(t,e)&&await uye(t,e,r)}function I6(t){let e=K.extname(t);if(e.match(/\\.[cm]?[jt]sx?$/))return!0;if(e===\".exe\"||e===\".bin\")return!1;let r=Buffer.alloc(4),s;try{s=le.openSync(t,\"r\")}catch{return!0}try{le.readSync(s,r,0,r.length,0)}finally{le.closeSync(s)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function _T(t,{project:e}){let r=e.configuration,s=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r,t)} not found in the project`);let n=new x0.Writable,c=r.getLinkers(),f={project:e,report:new Ot({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let C=e.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(`Assertion failed: The resolution (${ri(r,E)}) should have been registered`);p.add(C)}let h=await Promise.all(Array.from(p,async E=>{let C=e.storedPackages.get(E);if(!C)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(C.bin.size===0)return Yl.skip;let S=c.find(I=>I.supportsPackage(C,f));if(!S)return Yl.skip;let P=null;try{P=await S.findPackageLocation(C,f)}catch(I){if(I.code===\"LOCATOR_NOT_INSTALLED\")return Yl.skip;throw I}return{dependency:C,packageLocation:P}}));for(let E of h){if(E===Yl.skip)continue;let{dependency:C,packageLocation:S}=E;for(let[P,I]of C.bin){let R=K.resolve(S,I);s.set(P,[C,ue.fromPortablePath(R),I6(R)])}}return s}async function fye(t){return await _T(t.anchoredLocator,{project:t.project})}async function C6(t,e){await Promise.all(Array.from(e,([r,[,s,a]])=>a?P0(t,r,process.execPath,[s]):P0(t,r,s,[])))}async function Aye(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await _T(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${Yr(a.configuration,t)}`);return await le.mktempPromise(async C=>{let[,S]=E,P=await Nv({project:a,locator:t,binFolder:C});await C6(P.BERRY_BIN_FOLDER,h);let I=I6(ue.toPortablePath(S))?Yu(process.execPath,[...p,S,...r],{cwd:s,env:P,stdin:n,stdout:c,stderr:f}):Yu(S,r,{cwd:s,env:P,stdin:n,stdout:c,stderr:f}),R;try{R=await I}finally{await le.removePromise(P.BERRY_BIN_FOLDER)}return R.code})}async function jyt(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f}){return await Aye(t.anchoredLocator,e,r,{project:t.project,cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f})}var iye,sye,x0,oye,Oyt,Lyt,w6=It(()=>{bt();bt();rA();bv();iye=et(d6()),sye=et(Md()),x0=ye(\"stream\");oI();Fc();Fv();Rv();dT();Qc();kc();Np();Yo();oye=(a=>(a.Yarn1=\"Yarn Classic\",a.Yarn2=\"Yarn\",a.Npm=\"npm\",a.Pnpm=\"pnpm\",a))(oye||{});Oyt=2,Lyt=(0,sye.default)(Oyt)});var bI=L((X$t,hye)=>{\"use strict\";var pye=new Map([[\"C\",\"cwd\"],[\"f\",\"file\"],[\"z\",\"gzip\"],[\"P\",\"preservePaths\"],[\"U\",\"unlink\"],[\"strip-components\",\"strip\"],[\"stripComponents\",\"strip\"],[\"keep-newer\",\"newer\"],[\"keepNewer\",\"newer\"],[\"keep-newer-files\",\"newer\"],[\"keepNewerFiles\",\"newer\"],[\"k\",\"keep\"],[\"keep-existing\",\"keep\"],[\"keepExisting\",\"keep\"],[\"m\",\"noMtime\"],[\"no-mtime\",\"noMtime\"],[\"p\",\"preserveOwner\"],[\"L\",\"follow\"],[\"h\",\"follow\"]]);hye.exports=t=>t?Object.keys(t).map(e=>[pye.has(e)?pye.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var xI=L(($$t,Bye)=>{\"use strict\";var gye=typeof process==\"object\"&&process?process:{stdout:null,stderr:null},qyt=ye(\"events\"),dye=ye(\"stream\"),mye=ye(\"string_decoder\").StringDecoder,qp=Symbol(\"EOF\"),Gp=Symbol(\"maybeEmitEnd\"),k0=Symbol(\"emittedEnd\"),UT=Symbol(\"emittingEnd\"),Ov=Symbol(\"emittedError\"),HT=Symbol(\"closed\"),yye=Symbol(\"read\"),jT=Symbol(\"flush\"),Eye=Symbol(\"flushChunk\"),fl=Symbol(\"encoding\"),Wp=Symbol(\"decoder\"),qT=Symbol(\"flowing\"),Lv=Symbol(\"paused\"),PI=Symbol(\"resume\"),Vs=Symbol(\"bufferLength\"),B6=Symbol(\"bufferPush\"),v6=Symbol(\"bufferShift\"),zo=Symbol(\"objectMode\"),Zo=Symbol(\"destroyed\"),S6=Symbol(\"emitData\"),Iye=Symbol(\"emitEnd\"),D6=Symbol(\"emitEnd2\"),Yp=Symbol(\"async\"),Mv=t=>Promise.resolve().then(t),Cye=global._MP_NO_ITERATOR_SYMBOLS_!==\"1\",Gyt=Cye&&Symbol.asyncIterator||Symbol(\"asyncIterator not implemented\"),Wyt=Cye&&Symbol.iterator||Symbol(\"iterator not implemented\"),Yyt=t=>t===\"end\"||t===\"finish\"||t===\"prefinish\",Vyt=t=>t instanceof ArrayBuffer||typeof t==\"object\"&&t.constructor&&t.constructor.name===\"ArrayBuffer\"&&t.byteLength>=0,Kyt=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),GT=class{constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[PI](),r.on(\"drain\",this.ondrain)}unpipe(){this.dest.removeListener(\"drain\",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},b6=class extends GT{unpipe(){this.src.removeListener(\"error\",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit(\"error\",a),e.on(\"error\",this.proxyErrors)}};Bye.exports=class wye extends dye{constructor(e){super(),this[qT]=!1,this[Lv]=!1,this.pipes=[],this.buffer=[],this[zo]=e&&e.objectMode||!1,this[zo]?this[fl]=null:this[fl]=e&&e.encoding||null,this[fl]===\"buffer\"&&(this[fl]=null),this[Yp]=e&&!!e.async||!1,this[Wp]=this[fl]?new mye(this[fl]):null,this[qp]=!1,this[k0]=!1,this[UT]=!1,this[HT]=!1,this[Ov]=null,this.writable=!0,this.readable=!0,this[Vs]=0,this[Zo]=!1}get bufferLength(){return this[Vs]}get encoding(){return this[fl]}set encoding(e){if(this[zo])throw new Error(\"cannot set encoding in objectMode\");if(this[fl]&&e!==this[fl]&&(this[Wp]&&this[Wp].lastNeed||this[Vs]))throw new Error(\"cannot change encoding\");this[fl]!==e&&(this[Wp]=e?new mye(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Wp].write(r)))),this[fl]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[zo]}set objectMode(e){this[zo]=this[zo]||!!e}get async(){return this[Yp]}set async(e){this[Yp]=this[Yp]||!!e}write(e,r,s){if(this[qp])throw new Error(\"write after end\");if(this[Zo])return this.emit(\"error\",Object.assign(new Error(\"Cannot call write after a stream was destroyed\"),{code:\"ERR_STREAM_DESTROYED\"})),!0;typeof r==\"function\"&&(s=r,r=\"utf8\"),r||(r=\"utf8\");let a=this[Yp]?Mv:n=>n();return!this[zo]&&!Buffer.isBuffer(e)&&(Kyt(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):Vyt(e)?e=Buffer.from(e):typeof e!=\"string\"&&(this.objectMode=!0)),this[zo]?(this.flowing&&this[Vs]!==0&&this[jT](!0),this.flowing?this.emit(\"data\",e):this[B6](e),this[Vs]!==0&&this.emit(\"readable\"),s&&a(s),this.flowing):e.length?(typeof e==\"string\"&&!(r===this[fl]&&!this[Wp].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[fl]&&(e=this[Wp].write(e)),this.flowing&&this[Vs]!==0&&this[jT](!0),this.flowing?this.emit(\"data\",e):this[B6](e),this[Vs]!==0&&this.emit(\"readable\"),s&&a(s),this.flowing):(this[Vs]!==0&&this.emit(\"readable\"),s&&a(s),this.flowing)}read(e){if(this[Zo])return null;if(this[Vs]===0||e===0||e>this[Vs])return this[Gp](),null;this[zo]&&(e=null),this.buffer.length>1&&!this[zo]&&(this.encoding?this.buffer=[this.buffer.join(\"\")]:this.buffer=[Buffer.concat(this.buffer,this[Vs])]);let r=this[yye](e||null,this.buffer[0]);return this[Gp](),r}[yye](e,r){return e===r.length||e===null?this[v6]():(this.buffer[0]=r.slice(e),r=r.slice(0,e),this[Vs]-=e),this.emit(\"data\",r),!this.buffer.length&&!this[qp]&&this.emit(\"drain\"),r}end(e,r,s){return typeof e==\"function\"&&(s=e,e=null),typeof r==\"function\"&&(s=r,r=\"utf8\"),e&&this.write(e,r),s&&this.once(\"end\",s),this[qp]=!0,this.writable=!1,(this.flowing||!this[Lv])&&this[Gp](),this}[PI](){this[Zo]||(this[Lv]=!1,this[qT]=!0,this.emit(\"resume\"),this.buffer.length?this[jT]():this[qp]?this[Gp]():this.emit(\"drain\"))}resume(){return this[PI]()}pause(){this[qT]=!1,this[Lv]=!0}get destroyed(){return this[Zo]}get flowing(){return this[qT]}get paused(){return this[Lv]}[B6](e){this[zo]?this[Vs]+=1:this[Vs]+=e.length,this.buffer.push(e)}[v6](){return this.buffer.length&&(this[zo]?this[Vs]-=1:this[Vs]-=this.buffer[0].length),this.buffer.shift()}[jT](e){do;while(this[Eye](this[v6]()));!e&&!this.buffer.length&&!this[qp]&&this.emit(\"drain\")}[Eye](e){return e?(this.emit(\"data\",e),this.flowing):!1}pipe(e,r){if(this[Zo])return;let s=this[k0];return r=r||{},e===gye.stdout||e===gye.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this.pipes.push(r.proxyErrors?new b6(this,e,r):new GT(this,e,r)),this[Yp]?Mv(()=>this[PI]()):this[PI]()),e}unpipe(e){let r=this.pipes.find(s=>s.dest===e);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);return e===\"data\"&&!this.pipes.length&&!this.flowing?this[PI]():e===\"readable\"&&this[Vs]!==0?super.emit(\"readable\"):Yyt(e)&&this[k0]?(super.emit(e),this.removeAllListeners(e)):e===\"error\"&&this[Ov]&&(this[Yp]?Mv(()=>r.call(this,this[Ov])):r.call(this,this[Ov])),s}get emittedEnd(){return this[k0]}[Gp](){!this[UT]&&!this[k0]&&!this[Zo]&&this.buffer.length===0&&this[qp]&&(this[UT]=!0,this.emit(\"end\"),this.emit(\"prefinish\"),this.emit(\"finish\"),this[HT]&&this.emit(\"close\"),this[UT]=!1)}emit(e,r,...s){if(e!==\"error\"&&e!==\"close\"&&e!==Zo&&this[Zo])return;if(e===\"data\")return r?this[Yp]?Mv(()=>this[S6](r)):this[S6](r):!1;if(e===\"end\")return this[Iye]();if(e===\"close\"){if(this[HT]=!0,!this[k0]&&!this[Zo])return;let n=super.emit(\"close\");return this.removeAllListeners(\"close\"),n}else if(e===\"error\"){this[Ov]=r;let n=super.emit(\"error\",r);return this[Gp](),n}else if(e===\"resume\"){let n=super.emit(\"resume\");return this[Gp](),n}else if(e===\"finish\"||e===\"prefinish\"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,r,...s);return this[Gp](),a}[S6](e){for(let s of this.pipes)s.dest.write(e)===!1&&this.pause();let r=super.emit(\"data\",e);return this[Gp](),r}[Iye](){this[k0]||(this[k0]=!0,this.readable=!1,this[Yp]?Mv(()=>this[D6]()):this[D6]())}[D6](){if(this[Wp]){let r=this[Wp].end();if(r){for(let s of this.pipes)s.dest.write(r);super.emit(\"data\",r)}}for(let r of this.pipes)r.end();let e=super.emit(\"end\");return this.removeAllListeners(\"end\"),e}collect(){let e=[];this[zo]||(e.dataLength=0);let r=this.promise();return this.on(\"data\",s=>{e.push(s),this[zo]||(e.dataLength+=s.length)}),r.then(()=>e)}concat(){return this[zo]?Promise.reject(new Error(\"cannot concat in objectMode\")):this.collect().then(e=>this[zo]?Promise.reject(new Error(\"cannot concat in objectMode\")):this[fl]?e.join(\"\"):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Zo,()=>r(new Error(\"stream destroyed\"))),this.on(\"error\",s=>r(s)),this.on(\"end\",()=>e())})}[Gyt](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[qp])return Promise.resolve({done:!0});let s=null,a=null,n=h=>{this.removeListener(\"data\",c),this.removeListener(\"end\",f),a(h)},c=h=>{this.removeListener(\"error\",n),this.removeListener(\"end\",f),this.pause(),s({value:h,done:!!this[qp]})},f=()=>{this.removeListener(\"error\",n),this.removeListener(\"data\",c),s({done:!0})},p=()=>n(new Error(\"stream destroyed\"));return new Promise((h,E)=>{a=E,s=h,this.once(Zo,p),this.once(\"error\",n),this.once(\"end\",f),this.once(\"data\",c)})}}}[Wyt](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Zo]?(e?this.emit(\"error\",e):this.emit(Zo),this):(this[Zo]=!0,this.buffer.length=0,this[Vs]=0,typeof this.close==\"function\"&&!this[HT]&&this.close(),e?this.emit(\"error\",e):this.emit(Zo),this)}static isStream(e){return!!e&&(e instanceof wye||e instanceof dye||e instanceof qyt&&(typeof e.pipe==\"function\"||typeof e.write==\"function\"&&typeof e.end==\"function\"))}}});var Sye=L((eer,vye)=>{var Jyt=ye(\"zlib\").constants||{ZLIB_VERNUM:4736};vye.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},Jyt))});var q6=L(zl=>{\"use strict\";var T6=ye(\"assert\"),Q0=ye(\"buffer\").Buffer,Pye=ye(\"zlib\"),fm=zl.constants=Sye(),zyt=xI(),Dye=Q0.concat,Am=Symbol(\"_superWrite\"),QI=class extends Error{constructor(e){super(\"zlib: \"+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code=\"ZLIB_ERROR\"),this.message=\"zlib: \"+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return\"ZlibError\"}},Zyt=Symbol(\"opts\"),_v=Symbol(\"flushFlag\"),bye=Symbol(\"finishFlushFlag\"),j6=Symbol(\"fullFlushFlag\"),Ei=Symbol(\"handle\"),WT=Symbol(\"onError\"),kI=Symbol(\"sawError\"),P6=Symbol(\"level\"),x6=Symbol(\"strategy\"),k6=Symbol(\"ended\"),ter=Symbol(\"_defaultFullFlush\"),YT=class extends zyt{constructor(e,r){if(!e||typeof e!=\"object\")throw new TypeError(\"invalid options for ZlibBase constructor\");super(e),this[kI]=!1,this[k6]=!1,this[Zyt]=e,this[_v]=e.flush,this[bye]=e.finishFlush;try{this[Ei]=new Pye[r](e)}catch(s){throw new QI(s)}this[WT]=s=>{this[kI]||(this[kI]=!0,this.close(),this.emit(\"error\",s))},this[Ei].on(\"error\",s=>this[WT](new QI(s))),this.once(\"end\",()=>this.close)}close(){this[Ei]&&(this[Ei].close(),this[Ei]=null,this.emit(\"close\"))}reset(){if(!this[kI])return T6(this[Ei],\"zlib binding closed\"),this[Ei].reset()}flush(e){this.ended||(typeof e!=\"number\"&&(e=this[j6]),this.write(Object.assign(Q0.alloc(0),{[_v]:e})))}end(e,r,s){return e&&this.write(e,r),this.flush(this[bye]),this[k6]=!0,super.end(null,null,s)}get ended(){return this[k6]}write(e,r,s){if(typeof r==\"function\"&&(s=r,r=\"utf8\"),typeof e==\"string\"&&(e=Q0.from(e,r)),this[kI])return;T6(this[Ei],\"zlib binding closed\");let a=this[Ei]._handle,n=a.close;a.close=()=>{};let c=this[Ei].close;this[Ei].close=()=>{},Q0.concat=h=>h;let f;try{let h=typeof e[_v]==\"number\"?e[_v]:this[_v];f=this[Ei]._processChunk(e,h),Q0.concat=Dye}catch(h){Q0.concat=Dye,this[WT](new QI(h))}finally{this[Ei]&&(this[Ei]._handle=a,a.close=n,this[Ei].close=c,this[Ei].removeAllListeners(\"error\"))}this[Ei]&&this[Ei].on(\"error\",h=>this[WT](new QI(h)));let p;if(f)if(Array.isArray(f)&&f.length>0){p=this[Am](Q0.from(f[0]));for(let h=1;h<f.length;h++)p=this[Am](f[h])}else p=this[Am](Q0.from(f));return s&&s(),p}[Am](e){return super.write(e)}},Vp=class extends YT{constructor(e,r){e=e||{},e.flush=e.flush||fm.Z_NO_FLUSH,e.finishFlush=e.finishFlush||fm.Z_FINISH,super(e,r),this[j6]=fm.Z_FULL_FLUSH,this[P6]=e.level,this[x6]=e.strategy}params(e,r){if(!this[kI]){if(!this[Ei])throw new Error(\"cannot switch params when binding is closed\");if(!this[Ei].params)throw new Error(\"not supported in this implementation\");if(this[P6]!==e||this[x6]!==r){this.flush(fm.Z_SYNC_FLUSH),T6(this[Ei],\"zlib binding closed\");let s=this[Ei].flush;this[Ei].flush=(a,n)=>{this.flush(a),n()};try{this[Ei].params(e,r)}finally{this[Ei].flush=s}this[Ei]&&(this[P6]=e,this[x6]=r)}}}},R6=class extends Vp{constructor(e){super(e,\"Deflate\")}},F6=class extends Vp{constructor(e){super(e,\"Inflate\")}},Q6=Symbol(\"_portable\"),N6=class extends Vp{constructor(e){super(e,\"Gzip\"),this[Q6]=e&&!!e.portable}[Am](e){return this[Q6]?(this[Q6]=!1,e[9]=255,super[Am](e)):super[Am](e)}},O6=class extends Vp{constructor(e){super(e,\"Gunzip\")}},L6=class extends Vp{constructor(e){super(e,\"DeflateRaw\")}},M6=class extends Vp{constructor(e){super(e,\"InflateRaw\")}},_6=class extends Vp{constructor(e){super(e,\"Unzip\")}},VT=class extends YT{constructor(e,r){e=e||{},e.flush=e.flush||fm.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||fm.BROTLI_OPERATION_FINISH,super(e,r),this[j6]=fm.BROTLI_OPERATION_FLUSH}},U6=class extends VT{constructor(e){super(e,\"BrotliCompress\")}},H6=class extends VT{constructor(e){super(e,\"BrotliDecompress\")}};zl.Deflate=R6;zl.Inflate=F6;zl.Gzip=N6;zl.Gunzip=O6;zl.DeflateRaw=L6;zl.InflateRaw=M6;zl.Unzip=_6;typeof Pye.BrotliCompress==\"function\"?(zl.BrotliCompress=U6,zl.BrotliDecompress=H6):zl.BrotliCompress=zl.BrotliDecompress=class{constructor(){throw new Error(\"Brotli is not supported in this version of Node.js\")}}});var TI=L((ier,xye)=>{var Xyt=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;xye.exports=Xyt!==\"win32\"?t=>t:t=>t&&t.replace(/\\\\/g,\"/\")});var KT=L((oer,kye)=>{\"use strict\";var $yt=xI(),G6=TI(),W6=Symbol(\"slurp\");kye.exports=class extends $yt{constructor(e,r,s){switch(super(),this.pause(),this.extended=r,this.globalExtended=s,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case\"File\":case\"OldFile\":case\"Link\":case\"SymbolicLink\":case\"CharacterDevice\":case\"BlockDevice\":case\"Directory\":case\"FIFO\":case\"ContiguousFile\":case\"GNUDumpDir\":break;case\"NextFileHasLongLinkpath\":case\"NextFileHasLongPath\":case\"OldGnuLongPath\":case\"GlobalExtendedHeader\":case\"ExtendedHeader\":case\"OldExtendedHeader\":this.meta=!0;break;default:this.ignore=!0}this.path=G6(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=G6(e.linkpath),this.uname=e.uname,this.gname=e.gname,r&&this[W6](r),s&&this[W6](s,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error(\"writing more to entry than is appropriate\");let s=this.remain,a=this.blockRemain;return this.remain=Math.max(0,s-r),this.blockRemain=Math.max(0,a-r),this.ignore?!0:s>=r?super.write(e):super.write(e.slice(0,s))}[W6](e,r){for(let s in e)e[s]!==null&&e[s]!==void 0&&!(r&&s===\"path\")&&(this[s]=s===\"path\"||s===\"linkpath\"?G6(e[s]):e[s])}}});var Y6=L(JT=>{\"use strict\";JT.name=new Map([[\"0\",\"File\"],[\"\",\"OldFile\"],[\"1\",\"Link\"],[\"2\",\"SymbolicLink\"],[\"3\",\"CharacterDevice\"],[\"4\",\"BlockDevice\"],[\"5\",\"Directory\"],[\"6\",\"FIFO\"],[\"7\",\"ContiguousFile\"],[\"g\",\"GlobalExtendedHeader\"],[\"x\",\"ExtendedHeader\"],[\"A\",\"SolarisACL\"],[\"D\",\"GNUDumpDir\"],[\"I\",\"Inode\"],[\"K\",\"NextFileHasLongLinkpath\"],[\"L\",\"NextFileHasLongPath\"],[\"M\",\"ContinuationFile\"],[\"N\",\"OldGnuLongPath\"],[\"S\",\"SparseFile\"],[\"V\",\"TapeVolumeHeader\"],[\"X\",\"OldExtendedHeader\"]]);JT.code=new Map(Array.from(JT.name).map(t=>[t[1],t[0]]))});var Fye=L((ler,Rye)=>{\"use strict\";var eEt=(t,e)=>{if(Number.isSafeInteger(t))t<0?rEt(t,e):tEt(t,e);else throw Error(\"cannot encode number outside of javascript safe integer range\");return e},tEt=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},rEt=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var s=e.length;s>1;s--){var a=t&255;t=Math.floor(t/256),r?e[s-1]=Qye(a):a===0?e[s-1]=0:(r=!0,e[s-1]=Tye(a))}},nEt=t=>{let e=t[0],r=e===128?sEt(t.slice(1,t.length)):e===255?iEt(t):null;if(r===null)throw Error(\"invalid base256 encoding\");if(!Number.isSafeInteger(r))throw Error(\"parsed number outside of javascript safe integer range\");return r},iEt=t=>{for(var e=t.length,r=0,s=!1,a=e-1;a>-1;a--){var n=t[a],c;s?c=Qye(n):n===0?c=n:(s=!0,c=Tye(n)),c!==0&&(r-=c*Math.pow(256,e-a-1))}return r},sEt=t=>{for(var e=t.length,r=0,s=e-1;s>-1;s--){var a=t[s];a!==0&&(r+=a*Math.pow(256,e-s-1))}return r},Qye=t=>(255^t)&255,Tye=t=>(255^t)+1&255;Rye.exports={encode:eEt,parse:nEt}});var FI=L((cer,Oye)=>{\"use strict\";var V6=Y6(),RI=ye(\"path\").posix,Nye=Fye(),K6=Symbol(\"slurp\"),Zl=Symbol(\"type\"),Z6=class{constructor(e,r,s,a){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[Zl]=\"0\",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,s,a):e&&this.set(e)}decode(e,r,s,a){if(r||(r=0),!e||!(e.length>=r+512))throw new Error(\"need 512 bytes for header\");if(this.path=pm(e,r,100),this.mode=T0(e,r+100,8),this.uid=T0(e,r+108,8),this.gid=T0(e,r+116,8),this.size=T0(e,r+124,12),this.mtime=J6(e,r+136,12),this.cksum=T0(e,r+148,12),this[K6](s),this[K6](a,!0),this[Zl]=pm(e,r+156,1),this[Zl]===\"\"&&(this[Zl]=\"0\"),this[Zl]===\"0\"&&this.path.substr(-1)===\"/\"&&(this[Zl]=\"5\"),this[Zl]===\"5\"&&(this.size=0),this.linkpath=pm(e,r+157,100),e.slice(r+257,r+265).toString()===\"ustar\\x0000\")if(this.uname=pm(e,r+265,32),this.gname=pm(e,r+297,32),this.devmaj=T0(e,r+329,8),this.devmin=T0(e,r+337,8),e[r+475]!==0){let c=pm(e,r+345,155);this.path=c+\"/\"+this.path}else{let c=pm(e,r+345,130);c&&(this.path=c+\"/\"+this.path),this.atime=J6(e,r+476,12),this.ctime=J6(e,r+488,12)}let n=8*32;for(let c=r;c<r+148;c++)n+=e[c];for(let c=r+156;c<r+512;c++)n+=e[c];this.cksumValid=n===this.cksum,this.cksum===null&&n===8*32&&(this.nullBlock=!0)}[K6](e,r){for(let s in e)e[s]!==null&&e[s]!==void 0&&!(r&&s===\"path\")&&(this[s]=e[s])}encode(e,r){if(e||(e=this.block=Buffer.alloc(512),r=0),r||(r=0),!(e.length>=r+512))throw new Error(\"need 512 bytes for header\");let s=this.ctime||this.atime?130:155,a=oEt(this.path||\"\",s),n=a[0],c=a[1];this.needPax=a[2],this.needPax=hm(e,r,100,n)||this.needPax,this.needPax=R0(e,r+100,8,this.mode)||this.needPax,this.needPax=R0(e,r+108,8,this.uid)||this.needPax,this.needPax=R0(e,r+116,8,this.gid)||this.needPax,this.needPax=R0(e,r+124,12,this.size)||this.needPax,this.needPax=z6(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[Zl].charCodeAt(0),this.needPax=hm(e,r+157,100,this.linkpath)||this.needPax,e.write(\"ustar\\x0000\",r+257,8),this.needPax=hm(e,r+265,32,this.uname)||this.needPax,this.needPax=hm(e,r+297,32,this.gname)||this.needPax,this.needPax=R0(e,r+329,8,this.devmaj)||this.needPax,this.needPax=R0(e,r+337,8,this.devmin)||this.needPax,this.needPax=hm(e,r+345,s,c)||this.needPax,e[r+475]!==0?this.needPax=hm(e,r+345,155,c)||this.needPax:(this.needPax=hm(e,r+345,130,c)||this.needPax,this.needPax=z6(e,r+476,12,this.atime)||this.needPax,this.needPax=z6(e,r+488,12,this.ctime)||this.needPax);let f=8*32;for(let p=r;p<r+148;p++)f+=e[p];for(let p=r+156;p<r+512;p++)f+=e[p];return this.cksum=f,R0(e,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(let r in e)e[r]!==null&&e[r]!==void 0&&(this[r]=e[r])}get type(){return V6.name.get(this[Zl])||this[Zl]}get typeKey(){return this[Zl]}set type(e){V6.code.has(e)?this[Zl]=V6.code.get(e):this[Zl]=e}},oEt=(t,e)=>{let s=t,a=\"\",n,c=RI.parse(t).root||\".\";if(Buffer.byteLength(s)<100)n=[s,a,!1];else{a=RI.dirname(s),s=RI.basename(s);do Buffer.byteLength(s)<=100&&Buffer.byteLength(a)<=e?n=[s,a,!1]:Buffer.byteLength(s)>100&&Buffer.byteLength(a)<=e?n=[s.substr(0,99),a,!0]:(s=RI.join(RI.basename(a),s),a=RI.dirname(a));while(a!==c&&!n);n||(n=[t.substr(0,99),\"\",!0])}return n},pm=(t,e,r)=>t.slice(e,e+r).toString(\"utf8\").replace(/\\0.*/,\"\"),J6=(t,e,r)=>aEt(T0(t,e,r)),aEt=t=>t===null?null:new Date(t*1e3),T0=(t,e,r)=>t[e]&128?Nye.parse(t.slice(e,e+r)):cEt(t,e,r),lEt=t=>isNaN(t)?null:t,cEt=(t,e,r)=>lEt(parseInt(t.slice(e,e+r).toString(\"utf8\").replace(/\\0.*$/,\"\").trim(),8)),uEt={12:8589934591,8:2097151},R0=(t,e,r,s)=>s===null?!1:s>uEt[r]||s<0?(Nye.encode(s,t.slice(e,e+r)),!0):(fEt(t,e,r,s),!1),fEt=(t,e,r,s)=>t.write(AEt(s,r),e,r,\"ascii\"),AEt=(t,e)=>pEt(Math.floor(t).toString(8),e),pEt=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join(\"0\")+t+\" \")+\"\\0\",z6=(t,e,r,s)=>s===null?!1:R0(t,e,r,s.getTime()/1e3),hEt=new Array(156).join(\"\\0\"),hm=(t,e,r,s)=>s===null?!1:(t.write(s+hEt,e,r,\"utf8\"),s.length!==Buffer.byteLength(s)||s.length>r);Oye.exports=Z6});var zT=L((uer,Lye)=>{\"use strict\";var gEt=FI(),dEt=ye(\"path\"),Uv=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e===\"\")return null;let r=Buffer.byteLength(e),s=512*Math.ceil(1+r/512),a=Buffer.allocUnsafe(s);for(let n=0;n<512;n++)a[n]=0;new gEt({path:(\"PaxHeader/\"+dEt.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?\"GlobalExtendedHeader\":\"ExtendedHeader\",linkpath:\"\",uname:this.uname||\"\",gname:this.gname||\"\",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(a),a.write(e,512,r,\"utf8\");for(let n=r+512;n<a.length;n++)a[n]=0;return a}encodeBody(){return this.encodeField(\"path\")+this.encodeField(\"ctime\")+this.encodeField(\"atime\")+this.encodeField(\"dev\")+this.encodeField(\"ino\")+this.encodeField(\"nlink\")+this.encodeField(\"charset\")+this.encodeField(\"comment\")+this.encodeField(\"gid\")+this.encodeField(\"gname\")+this.encodeField(\"linkpath\")+this.encodeField(\"mtime\")+this.encodeField(\"size\")+this.encodeField(\"uid\")+this.encodeField(\"uname\")}encodeField(e){if(this[e]===null||this[e]===void 0)return\"\";let r=this[e]instanceof Date?this[e].getTime()/1e3:this[e],s=\" \"+(e===\"dev\"||e===\"ino\"||e===\"nlink\"?\"SCHILY.\":\"\")+e+\"=\"+r+`\n`,a=Buffer.byteLength(s),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+s}};Uv.parse=(t,e,r)=>new Uv(mEt(yEt(t),e),r);var mEt=(t,e)=>e?Object.keys(t).reduce((r,s)=>(r[s]=t[s],r),e):t,yEt=t=>t.replace(/\\n$/,\"\").split(`\n`).reduce(EEt,Object.create(null)),EEt=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+\" \").length);let s=e.split(\"=\"),a=s.shift().replace(/^SCHILY\\.(dev|ino|nlink)/,\"$1\");if(!a)return t;let n=s.join(\"=\");return t[a]=/^([A-Z]+\\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};Lye.exports=Uv});var NI=L((fer,Mye)=>{Mye.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)===\"/\";)r=e,e--;return r===-1?t:t.slice(0,r)}});var ZT=L((Aer,_ye)=>{\"use strict\";_ye.exports=t=>class extends t{warn(e,r,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=r instanceof Error&&r.code||e,s.tarCode=e,!this.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),this.emit(\"warn\",s.tarCode,r,s)):r instanceof Error?this.emit(\"error\",Object.assign(r,s)):this.emit(\"error\",Object.assign(new Error(`${e}: ${r}`),s))}}});var $6=L((her,Uye)=>{\"use strict\";var XT=[\"|\",\"<\",\">\",\"?\",\":\"],X6=XT.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),IEt=new Map(XT.map((t,e)=>[t,X6[e]])),CEt=new Map(X6.map((t,e)=>[t,XT[e]]));Uye.exports={encode:t=>XT.reduce((e,r)=>e.split(r).join(IEt.get(r)),t),decode:t=>X6.reduce((e,r)=>e.split(r).join(CEt.get(r)),t)}});var eq=L((ger,jye)=>{var{isAbsolute:wEt,parse:Hye}=ye(\"path\").win32;jye.exports=t=>{let e=\"\",r=Hye(t);for(;wEt(t)||r.root;){let s=t.charAt(0)===\"/\"&&t.slice(0,4)!==\"//?/\"?\"/\":r.root;t=t.substr(s.length),e+=s,r=Hye(t)}return[e,t]}});var Gye=L((der,qye)=>{\"use strict\";qye.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var uq=L((Eer,iEe)=>{\"use strict\";var Zye=xI(),Xye=zT(),$ye=FI(),sA=ye(\"fs\"),Wye=ye(\"path\"),iA=TI(),BEt=NI(),eEe=(t,e)=>e?(t=iA(t).replace(/^\\.(\\/|$)/,\"\"),BEt(e)+\"/\"+t):iA(t),vEt=16*1024*1024,Yye=Symbol(\"process\"),Vye=Symbol(\"file\"),Kye=Symbol(\"directory\"),rq=Symbol(\"symlink\"),Jye=Symbol(\"hardlink\"),Hv=Symbol(\"header\"),$T=Symbol(\"read\"),nq=Symbol(\"lstat\"),eR=Symbol(\"onlstat\"),iq=Symbol(\"onread\"),sq=Symbol(\"onreadlink\"),oq=Symbol(\"openfile\"),aq=Symbol(\"onopenfile\"),F0=Symbol(\"close\"),tR=Symbol(\"mode\"),lq=Symbol(\"awaitDrain\"),tq=Symbol(\"ondrain\"),oA=Symbol(\"prefix\"),zye=Symbol(\"hadError\"),tEe=ZT(),SEt=$6(),rEe=eq(),nEe=Gye(),rR=tEe(class extends Zye{constructor(e,r){if(r=r||{},super(r),typeof e!=\"string\")throw new TypeError(\"path is required\");this.path=iA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||\"\",this.maxReadSize=r.maxReadSize||vEt,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=iA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?iA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn==\"function\"&&this.on(\"warn\",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=rEe(this.path);a&&(this.path=n,s=a)}this.win32=!!r.win32||process.platform===\"win32\",this.win32&&(this.path=SEt.decode(this.path.replace(/\\\\/g,\"/\")),e=e.replace(/\\\\/g,\"/\")),this.absolute=iA(r.absolute||Wye.resolve(this.cwd,e)),this.path===\"\"&&(this.path=\"./\"),s&&this.warn(\"TAR_ENTRY_INFO\",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.statCache.has(this.absolute)?this[eR](this.statCache.get(this.absolute)):this[nq]()}emit(e,...r){return e===\"error\"&&(this[zye]=!0),super.emit(e,...r)}[nq](){sA.lstat(this.absolute,(e,r)=>{if(e)return this.emit(\"error\",e);this[eR](r)})}[eR](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=bEt(e),this.emit(\"stat\",e),this[Yye]()}[Yye](){switch(this.type){case\"File\":return this[Vye]();case\"Directory\":return this[Kye]();case\"SymbolicLink\":return this[rq]();default:return this.end()}}[tR](e){return nEe(e,this.type===\"Directory\",this.portable)}[oA](e){return eEe(e,this.prefix)}[Hv](){this.type===\"Directory\"&&this.portable&&(this.noMtime=!0),this.header=new $ye({path:this[oA](this.path),linkpath:this.type===\"Link\"?this[oA](this.linkpath):this.linkpath,mode:this[tR](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:\"\",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new Xye({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[oA](this.path),linkpath:this.type===\"Link\"?this[oA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Kye](){this.path.substr(-1)!==\"/\"&&(this.path+=\"/\"),this.stat.size=0,this[Hv](),this.end()}[rq](){sA.readlink(this.absolute,(e,r)=>{if(e)return this.emit(\"error\",e);this[sq](r)})}[sq](e){this.linkpath=iA(e),this[Hv](),this.end()}[Jye](e){this.type=\"Link\",this.linkpath=iA(Wye.relative(this.cwd,e)),this.stat.size=0,this[Hv](),this.end()}[Vye](){if(this.stat.nlink>1){let e=this.stat.dev+\":\"+this.stat.ino;if(this.linkCache.has(e)){let r=this.linkCache.get(e);if(r.indexOf(this.cwd)===0)return this[Jye](r)}this.linkCache.set(e,this.absolute)}if(this[Hv](),this.stat.size===0)return this.end();this[oq]()}[oq](){sA.open(this.absolute,\"r\",(e,r)=>{if(e)return this.emit(\"error\",e);this[aq](r)})}[aq](e){if(this.fd=e,this[zye])return this[F0]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[$T]()}[$T](){let{fd:e,buf:r,offset:s,length:a,pos:n}=this;sA.read(e,r,s,a,n,(c,f)=>{if(c)return this[F0](()=>this.emit(\"error\",c));this[iq](f)})}[F0](e){sA.close(this.fd,e)}[iq](e){if(e<=0&&this.remain>0){let a=new Error(\"encountered unexpected EOF\");return a.path=this.absolute,a.syscall=\"read\",a.code=\"EOF\",this[F0](()=>this.emit(\"error\",a))}if(e>this.remain){let a=new Error(\"did not encounter expected EOF\");return a.path=this.absolute,a.syscall=\"read\",a.code=\"EOF\",this[F0](()=>this.emit(\"error\",a))}if(e===this.remain)for(let a=e;a<this.length&&e<this.blockRemain;a++)this.buf[a+this.offset]=0,e++,this.remain++;let r=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);this.write(r)?this[tq]():this[lq](()=>this[tq]())}[lq](e){this.once(\"drain\",e)}write(e){if(this.blockRemain<e.length){let r=new Error(\"writing more data than expected\");return r.path=this.absolute,this.emit(\"error\",r)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e)}[tq](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[F0](e=>e?this.emit(\"error\",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[$T]()}}),cq=class extends rR{[nq](){this[eR](sA.lstatSync(this.absolute))}[rq](){this[sq](sA.readlinkSync(this.absolute))}[oq](){this[aq](sA.openSync(this.absolute,\"r\"))}[$T](){let e=!0;try{let{fd:r,buf:s,offset:a,length:n,pos:c}=this,f=sA.readSync(r,s,a,n,c);this[iq](f),e=!1}finally{if(e)try{this[F0](()=>{})}catch{}}}[lq](e){e()}[F0](e){sA.closeSync(this.fd),e()}},DEt=tEe(class extends Zye{constructor(e,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=e,this.type=e.type,this.type===\"Directory\"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=iA(e.path),this.mode=this[tR](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:r.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=iA(e.linkpath),typeof r.onwarn==\"function\"&&this.on(\"warn\",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=rEe(this.path);a&&(this.path=n,s=a)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new $ye({path:this[oA](this.path),linkpath:this.type===\"Link\"?this[oA](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),s&&this.warn(\"TAR_ENTRY_INFO\",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.header.encode()&&!this.noPax&&super.write(new Xye({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[oA](this.path),linkpath:this.type===\"Link\"?this[oA](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[oA](e){return eEe(e,this.prefix)}[tR](e){return nEe(e,this.type===\"Directory\",this.portable)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error(\"writing more to entry than is appropriate\");return this.blockRemain-=r,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});rR.Sync=cq;rR.Tar=DEt;var bEt=t=>t.isFile()?\"File\":t.isDirectory()?\"Directory\":t.isSymbolicLink()?\"SymbolicLink\":\"Unsupported\";iEe.exports=rR});var fR=L((Cer,fEe)=>{\"use strict\";var cR=class{constructor(e,r){this.path=e||\"./\",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},PEt=xI(),xEt=q6(),kEt=KT(),Eq=uq(),QEt=Eq.Sync,TEt=Eq.Tar,REt=pk(),sEe=Buffer.alloc(1024),sR=Symbol(\"onStat\"),nR=Symbol(\"ended\"),aA=Symbol(\"queue\"),OI=Symbol(\"current\"),gm=Symbol(\"process\"),iR=Symbol(\"processing\"),oEe=Symbol(\"processJob\"),lA=Symbol(\"jobs\"),fq=Symbol(\"jobDone\"),oR=Symbol(\"addFSEntry\"),aEe=Symbol(\"addTarEntry\"),gq=Symbol(\"stat\"),dq=Symbol(\"readdir\"),aR=Symbol(\"onreaddir\"),lR=Symbol(\"pipe\"),lEe=Symbol(\"entry\"),Aq=Symbol(\"entryOpt\"),mq=Symbol(\"writeEntryClass\"),uEe=Symbol(\"write\"),pq=Symbol(\"ondrain\"),uR=ye(\"fs\"),cEe=ye(\"path\"),FEt=ZT(),hq=TI(),Iq=FEt(class extends PEt{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||\"\",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=hq(e.prefix||\"\"),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[mq]=Eq,typeof e.onwarn==\"function\"&&this.on(\"warn\",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!=\"object\"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new xEt.Gzip(e.gzip),this.zip.on(\"data\",r=>super.write(r)),this.zip.on(\"end\",r=>super.end()),this.zip.on(\"drain\",r=>this[pq]()),this.on(\"resume\",r=>this.zip.resume())):this.on(\"drain\",this[pq]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter==\"function\"?e.filter:r=>!0,this[aA]=new REt,this[lA]=0,this.jobs=+e.jobs||4,this[iR]=!1,this[nR]=!1}[uEe](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[nR]=!0,this[gm](),this}write(e){if(this[nR])throw new Error(\"write after end\");return e instanceof kEt?this[aEe](e):this[oR](e),this.flowing}[aEe](e){let r=hq(cEe.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let s=new cR(e.path,r,!1);s.entry=new TEt(e,this[Aq](s)),s.entry.on(\"end\",a=>this[fq](s)),this[lA]+=1,this[aA].push(s)}this[gm]()}[oR](e){let r=hq(cEe.resolve(this.cwd,e));this[aA].push(new cR(e,r)),this[gm]()}[gq](e){e.pending=!0,this[lA]+=1;let r=this.follow?\"stat\":\"lstat\";uR[r](e.absolute,(s,a)=>{e.pending=!1,this[lA]-=1,s?this.emit(\"error\",s):this[sR](e,a)})}[sR](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[gm]()}[dq](e){e.pending=!0,this[lA]+=1,uR.readdir(e.absolute,(r,s)=>{if(e.pending=!1,this[lA]-=1,r)return this.emit(\"error\",r);this[aR](e,s)})}[aR](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[gm]()}[gm](){if(!this[iR]){this[iR]=!0;for(let e=this[aA].head;e!==null&&this[lA]<this.jobs;e=e.next)if(this[oEe](e.value),e.value.ignore){let r=e.next;this[aA].removeNode(e),e.next=r}this[iR]=!1,this[nR]&&!this[aA].length&&this[lA]===0&&(this.zip?this.zip.end(sEe):(super.write(sEe),super.end()))}}get[OI](){return this[aA]&&this[aA].head&&this[aA].head.value}[fq](e){this[aA].shift(),this[lA]-=1,this[gm]()}[oEe](e){if(!e.pending){if(e.entry){e===this[OI]&&!e.piped&&this[lR](e);return}if(e.stat||(this.statCache.has(e.absolute)?this[sR](e,this.statCache.get(e.absolute)):this[gq](e)),!!e.stat&&!e.ignore&&!(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir&&(this.readdirCache.has(e.absolute)?this[aR](e,this.readdirCache.get(e.absolute)):this[dq](e),!e.readdir))){if(e.entry=this[lEe](e),!e.entry){e.ignore=!0;return}e===this[OI]&&!e.piped&&this[lR](e)}}}[Aq](e){return{onwarn:(r,s,a)=>this.warn(r,s,a),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[lEe](e){this[lA]+=1;try{return new this[mq](e.path,this[Aq](e)).on(\"end\",()=>this[fq](e)).on(\"error\",r=>this.emit(\"error\",r))}catch(r){this.emit(\"error\",r)}}[pq](){this[OI]&&this[OI].entry&&this[OI].entry.resume()}[lR](e){e.piped=!0,e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n===\"./\"?\"\":n.replace(/\\/*$/,\"/\");this[oR](c+a)});let r=e.entry,s=this.zip;s?r.on(\"data\",a=>{s.write(a)||r.pause()}):r.on(\"data\",a=>{super.write(a)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),yq=class extends Iq{constructor(e){super(e),this[mq]=QEt}pause(){}resume(){}[gq](e){let r=this.follow?\"statSync\":\"lstatSync\";this[sR](e,uR[r](e.absolute))}[dq](e,r){this[aR](e,uR.readdirSync(e.absolute))}[lR](e){let r=e.entry,s=this.zip;e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n===\"./\"?\"\":n.replace(/\\/*$/,\"/\");this[oR](c+a)}),s?r.on(\"data\",a=>{s.write(a)}):r.on(\"data\",a=>{super[uEe](a)})}};Iq.Sync=yq;fEe.exports=Iq});var GI=L(qv=>{\"use strict\";var NEt=xI(),OEt=ye(\"events\").EventEmitter,Al=ye(\"fs\"),Bq=Al.writev;if(!Bq){let t=process.binding(\"fs\"),e=t.FSReqWrap||t.FSReqCallback;Bq=(r,s,a,n)=>{let c=(p,h)=>n(p,h,s),f=new e;f.oncomplete=c,t.writeBuffers(r,s,a,f)}}var jI=Symbol(\"_autoClose\"),Vu=Symbol(\"_close\"),jv=Symbol(\"_ended\"),ni=Symbol(\"_fd\"),AEe=Symbol(\"_finished\"),O0=Symbol(\"_flags\"),Cq=Symbol(\"_flush\"),vq=Symbol(\"_handleChunk\"),Sq=Symbol(\"_makeBuf\"),dR=Symbol(\"_mode\"),AR=Symbol(\"_needDrain\"),UI=Symbol(\"_onerror\"),qI=Symbol(\"_onopen\"),wq=Symbol(\"_onread\"),MI=Symbol(\"_onwrite\"),L0=Symbol(\"_open\"),Kp=Symbol(\"_path\"),dm=Symbol(\"_pos\"),cA=Symbol(\"_queue\"),_I=Symbol(\"_read\"),pEe=Symbol(\"_readSize\"),N0=Symbol(\"_reading\"),pR=Symbol(\"_remain\"),hEe=Symbol(\"_size\"),hR=Symbol(\"_write\"),LI=Symbol(\"_writing\"),gR=Symbol(\"_defaultFlag\"),HI=Symbol(\"_errored\"),mR=class extends NEt{constructor(e,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof e!=\"string\")throw new TypeError(\"path must be a string\");this[HI]=!1,this[ni]=typeof r.fd==\"number\"?r.fd:null,this[Kp]=e,this[pEe]=r.readSize||16*1024*1024,this[N0]=!1,this[hEe]=typeof r.size==\"number\"?r.size:1/0,this[pR]=this[hEe],this[jI]=typeof r.autoClose==\"boolean\"?r.autoClose:!0,typeof this[ni]==\"number\"?this[_I]():this[L0]()}get fd(){return this[ni]}get path(){return this[Kp]}write(){throw new TypeError(\"this is a readable stream\")}end(){throw new TypeError(\"this is a readable stream\")}[L0](){Al.open(this[Kp],\"r\",(e,r)=>this[qI](e,r))}[qI](e,r){e?this[UI](e):(this[ni]=r,this.emit(\"open\",r),this[_I]())}[Sq](){return Buffer.allocUnsafe(Math.min(this[pEe],this[pR]))}[_I](){if(!this[N0]){this[N0]=!0;let e=this[Sq]();if(e.length===0)return process.nextTick(()=>this[wq](null,0,e));Al.read(this[ni],e,0,e.length,null,(r,s,a)=>this[wq](r,s,a))}}[wq](e,r,s){this[N0]=!1,e?this[UI](e):this[vq](r,s)&&this[_I]()}[Vu](){if(this[jI]&&typeof this[ni]==\"number\"){let e=this[ni];this[ni]=null,Al.close(e,r=>r?this.emit(\"error\",r):this.emit(\"close\"))}}[UI](e){this[N0]=!0,this[Vu](),this.emit(\"error\",e)}[vq](e,r){let s=!1;return this[pR]-=e,e>0&&(s=super.write(e<r.length?r.slice(0,e):r)),(e===0||this[pR]<=0)&&(s=!1,this[Vu](),super.end()),s}emit(e,r){switch(e){case\"prefinish\":case\"finish\":break;case\"drain\":typeof this[ni]==\"number\"&&this[_I]();break;case\"error\":return this[HI]?void 0:(this[HI]=!0,super.emit(e,r));default:return super.emit(e,r)}}},Dq=class extends mR{[L0](){let e=!0;try{this[qI](null,Al.openSync(this[Kp],\"r\")),e=!1}finally{e&&this[Vu]()}}[_I](){let e=!0;try{if(!this[N0]){this[N0]=!0;do{let r=this[Sq](),s=r.length===0?0:Al.readSync(this[ni],r,0,r.length,null);if(!this[vq](s,r))break}while(!0);this[N0]=!1}e=!1}finally{e&&this[Vu]()}}[Vu](){if(this[jI]&&typeof this[ni]==\"number\"){let e=this[ni];this[ni]=null,Al.closeSync(e),this.emit(\"close\")}}},yR=class extends OEt{constructor(e,r){r=r||{},super(r),this.readable=!1,this.writable=!0,this[HI]=!1,this[LI]=!1,this[jv]=!1,this[AR]=!1,this[cA]=[],this[Kp]=e,this[ni]=typeof r.fd==\"number\"?r.fd:null,this[dR]=r.mode===void 0?438:r.mode,this[dm]=typeof r.start==\"number\"?r.start:null,this[jI]=typeof r.autoClose==\"boolean\"?r.autoClose:!0;let s=this[dm]!==null?\"r+\":\"w\";this[gR]=r.flags===void 0,this[O0]=this[gR]?s:r.flags,this[ni]===null&&this[L0]()}emit(e,r){if(e===\"error\"){if(this[HI])return;this[HI]=!0}return super.emit(e,r)}get fd(){return this[ni]}get path(){return this[Kp]}[UI](e){this[Vu](),this[LI]=!0,this.emit(\"error\",e)}[L0](){Al.open(this[Kp],this[O0],this[dR],(e,r)=>this[qI](e,r))}[qI](e,r){this[gR]&&this[O0]===\"r+\"&&e&&e.code===\"ENOENT\"?(this[O0]=\"w\",this[L0]()):e?this[UI](e):(this[ni]=r,this.emit(\"open\",r),this[Cq]())}end(e,r){return e&&this.write(e,r),this[jv]=!0,!this[LI]&&!this[cA].length&&typeof this[ni]==\"number\"&&this[MI](null,0),this}write(e,r){return typeof e==\"string\"&&(e=Buffer.from(e,r)),this[jv]?(this.emit(\"error\",new Error(\"write() after end()\")),!1):this[ni]===null||this[LI]||this[cA].length?(this[cA].push(e),this[AR]=!0,!1):(this[LI]=!0,this[hR](e),!0)}[hR](e){Al.write(this[ni],e,0,e.length,this[dm],(r,s)=>this[MI](r,s))}[MI](e,r){e?this[UI](e):(this[dm]!==null&&(this[dm]+=r),this[cA].length?this[Cq]():(this[LI]=!1,this[jv]&&!this[AEe]?(this[AEe]=!0,this[Vu](),this.emit(\"finish\")):this[AR]&&(this[AR]=!1,this.emit(\"drain\"))))}[Cq](){if(this[cA].length===0)this[jv]&&this[MI](null,0);else if(this[cA].length===1)this[hR](this[cA].pop());else{let e=this[cA];this[cA]=[],Bq(this[ni],e,this[dm],(r,s)=>this[MI](r,s))}}[Vu](){if(this[jI]&&typeof this[ni]==\"number\"){let e=this[ni];this[ni]=null,Al.close(e,r=>r?this.emit(\"error\",r):this.emit(\"close\"))}}},bq=class extends yR{[L0](){let e;if(this[gR]&&this[O0]===\"r+\")try{e=Al.openSync(this[Kp],this[O0],this[dR])}catch(r){if(r.code===\"ENOENT\")return this[O0]=\"w\",this[L0]();throw r}else e=Al.openSync(this[Kp],this[O0],this[dR]);this[qI](null,e)}[Vu](){if(this[jI]&&typeof this[ni]==\"number\"){let e=this[ni];this[ni]=null,Al.closeSync(e),this.emit(\"close\")}}[hR](e){let r=!0;try{this[MI](null,Al.writeSync(this[ni],e,0,e.length,this[dm])),r=!1}finally{if(r)try{this[Vu]()}catch{}}}};qv.ReadStream=mR;qv.ReadStreamSync=Dq;qv.WriteStream=yR;qv.WriteStreamSync=bq});var SR=L((ver,CEe)=>{\"use strict\";var LEt=ZT(),MEt=FI(),_Et=ye(\"events\"),UEt=pk(),HEt=1024*1024,jEt=KT(),gEe=zT(),qEt=q6(),Pq=Buffer.from([31,139]),_c=Symbol(\"state\"),mm=Symbol(\"writeEntry\"),Jp=Symbol(\"readEntry\"),xq=Symbol(\"nextEntry\"),dEe=Symbol(\"processEntry\"),Uc=Symbol(\"extendedHeader\"),Gv=Symbol(\"globalExtendedHeader\"),M0=Symbol(\"meta\"),mEe=Symbol(\"emitMeta\"),bi=Symbol(\"buffer\"),zp=Symbol(\"queue\"),ym=Symbol(\"ended\"),yEe=Symbol(\"emittedEnd\"),Em=Symbol(\"emit\"),pl=Symbol(\"unzip\"),ER=Symbol(\"consumeChunk\"),IR=Symbol(\"consumeChunkSub\"),kq=Symbol(\"consumeBody\"),EEe=Symbol(\"consumeMeta\"),IEe=Symbol(\"consumeHeader\"),CR=Symbol(\"consuming\"),Qq=Symbol(\"bufferConcat\"),Tq=Symbol(\"maybeEnd\"),Wv=Symbol(\"writing\"),_0=Symbol(\"aborted\"),wR=Symbol(\"onDone\"),Im=Symbol(\"sawValidEntry\"),BR=Symbol(\"sawNullBlock\"),vR=Symbol(\"sawEOF\"),GEt=t=>!0;CEe.exports=LEt(class extends _Et{constructor(e){e=e||{},super(e),this.file=e.file||\"\",this[Im]=null,this.on(wR,r=>{(this[_c]===\"begin\"||this[Im]===!1)&&this.warn(\"TAR_BAD_ARCHIVE\",\"Unrecognized archive format\")}),e.ondone?this.on(wR,e.ondone):this.on(wR,r=>{this.emit(\"prefinish\"),this.emit(\"finish\"),this.emit(\"end\"),this.emit(\"close\")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||HEt,this.filter=typeof e.filter==\"function\"?e.filter:GEt,this.writable=!0,this.readable=!1,this[zp]=new UEt,this[bi]=null,this[Jp]=null,this[mm]=null,this[_c]=\"begin\",this[M0]=\"\",this[Uc]=null,this[Gv]=null,this[ym]=!1,this[pl]=null,this[_0]=!1,this[BR]=!1,this[vR]=!1,typeof e.onwarn==\"function\"&&this.on(\"warn\",e.onwarn),typeof e.onentry==\"function\"&&this.on(\"entry\",e.onentry)}[IEe](e,r){this[Im]===null&&(this[Im]=!1);let s;try{s=new MEt(e,r,this[Uc],this[Gv])}catch(a){return this.warn(\"TAR_ENTRY_INVALID\",a)}if(s.nullBlock)this[BR]?(this[vR]=!0,this[_c]===\"begin\"&&(this[_c]=\"header\"),this[Em](\"eof\")):(this[BR]=!0,this[Em](\"nullBlock\"));else if(this[BR]=!1,!s.cksumValid)this.warn(\"TAR_ENTRY_INVALID\",\"checksum failure\",{header:s});else if(!s.path)this.warn(\"TAR_ENTRY_INVALID\",\"path is required\",{header:s});else{let a=s.type;if(/^(Symbolic)?Link$/.test(a)&&!s.linkpath)this.warn(\"TAR_ENTRY_INVALID\",\"linkpath required\",{header:s});else if(!/^(Symbolic)?Link$/.test(a)&&s.linkpath)this.warn(\"TAR_ENTRY_INVALID\",\"linkpath forbidden\",{header:s});else{let n=this[mm]=new jEt(s,this[Uc],this[Gv]);if(!this[Im])if(n.remain){let c=()=>{n.invalid||(this[Im]=!0)};n.on(\"end\",c)}else this[Im]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[Em](\"ignoredEntry\",n),this[_c]=\"ignore\",n.resume()):n.size>0&&(this[M0]=\"\",n.on(\"data\",c=>this[M0]+=c),this[_c]=\"meta\"):(this[Uc]=null,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[Em](\"ignoredEntry\",n),this[_c]=n.remain?\"ignore\":\"header\",n.resume()):(n.remain?this[_c]=\"body\":(this[_c]=\"header\",n.end()),this[Jp]?this[zp].push(n):(this[zp].push(n),this[xq]())))}}}[dEe](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[Jp]=e,this.emit(\"entry\",e),e.emittedEnd||(e.on(\"end\",s=>this[xq]()),r=!1)):(this[Jp]=null,r=!1),r}[xq](){do;while(this[dEe](this[zp].shift()));if(!this[zp].length){let e=this[Jp];!e||e.flowing||e.size===e.remain?this[Wv]||this.emit(\"drain\"):e.once(\"drain\",s=>this.emit(\"drain\"))}}[kq](e,r){let s=this[mm],a=s.blockRemain,n=a>=e.length&&r===0?e:e.slice(r,r+a);return s.write(n),s.blockRemain||(this[_c]=\"header\",this[mm]=null,s.end()),n.length}[EEe](e,r){let s=this[mm],a=this[kq](e,r);return this[mm]||this[mEe](s),a}[Em](e,r,s){!this[zp].length&&!this[Jp]?this.emit(e,r,s):this[zp].push([e,r,s])}[mEe](e){switch(this[Em](\"meta\",this[M0]),e.type){case\"ExtendedHeader\":case\"OldExtendedHeader\":this[Uc]=gEe.parse(this[M0],this[Uc],!1);break;case\"GlobalExtendedHeader\":this[Gv]=gEe.parse(this[M0],this[Gv],!0);break;case\"NextFileHasLongPath\":case\"OldGnuLongPath\":this[Uc]=this[Uc]||Object.create(null),this[Uc].path=this[M0].replace(/\\0.*/,\"\");break;case\"NextFileHasLongLinkpath\":this[Uc]=this[Uc]||Object.create(null),this[Uc].linkpath=this[M0].replace(/\\0.*/,\"\");break;default:throw new Error(\"unknown meta: \"+e.type)}}abort(e){this[_0]=!0,this.emit(\"abort\",e),this.warn(\"TAR_ABORT\",e,{recoverable:!1})}write(e){if(this[_0])return;if(this[pl]===null&&e){if(this[bi]&&(e=Buffer.concat([this[bi],e]),this[bi]=null),e.length<Pq.length)return this[bi]=e,!0;for(let s=0;this[pl]===null&&s<Pq.length;s++)e[s]!==Pq[s]&&(this[pl]=!1);if(this[pl]===null){let s=this[ym];this[ym]=!1,this[pl]=new qEt.Unzip,this[pl].on(\"data\",n=>this[ER](n)),this[pl].on(\"error\",n=>this.abort(n)),this[pl].on(\"end\",n=>{this[ym]=!0,this[ER]()}),this[Wv]=!0;let a=this[pl][s?\"end\":\"write\"](e);return this[Wv]=!1,a}}this[Wv]=!0,this[pl]?this[pl].write(e):this[ER](e),this[Wv]=!1;let r=this[zp].length?!1:this[Jp]?this[Jp].flowing:!0;return!r&&!this[zp].length&&this[Jp].once(\"drain\",s=>this.emit(\"drain\")),r}[Qq](e){e&&!this[_0]&&(this[bi]=this[bi]?Buffer.concat([this[bi],e]):e)}[Tq](){if(this[ym]&&!this[yEe]&&!this[_0]&&!this[CR]){this[yEe]=!0;let e=this[mm];if(e&&e.blockRemain){let r=this[bi]?this[bi].length:0;this.warn(\"TAR_BAD_ARCHIVE\",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[bi]&&e.write(this[bi]),e.end()}this[Em](wR)}}[ER](e){if(this[CR])this[Qq](e);else if(!e&&!this[bi])this[Tq]();else{if(this[CR]=!0,this[bi]){this[Qq](e);let r=this[bi];this[bi]=null,this[IR](r)}else this[IR](e);for(;this[bi]&&this[bi].length>=512&&!this[_0]&&!this[vR];){let r=this[bi];this[bi]=null,this[IR](r)}this[CR]=!1}(!this[bi]||this[ym])&&this[Tq]()}[IR](e){let r=0,s=e.length;for(;r+512<=s&&!this[_0]&&!this[vR];)switch(this[_c]){case\"begin\":case\"header\":this[IEe](e,r),r+=512;break;case\"ignore\":case\"body\":r+=this[kq](e,r);break;case\"meta\":r+=this[EEe](e,r);break;default:throw new Error(\"invalid state: \"+this[_c])}r<s&&(this[bi]?this[bi]=Buffer.concat([e.slice(r),this[bi]]):this[bi]=e.slice(r))}end(e){this[_0]||(this[pl]?this[pl].end(e):(this[ym]=!0,this.write(e)))}})});var DR=L((Ser,SEe)=>{\"use strict\";var WEt=bI(),BEe=SR(),WI=ye(\"fs\"),YEt=GI(),wEe=ye(\"path\"),Rq=NI();SEe.exports=(t,e,r)=>{typeof t==\"function\"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e==\"function\"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=WEt(t);if(s.sync&&typeof r==\"function\")throw new TypeError(\"callback not supported for sync tar functions\");if(!s.file&&typeof r==\"function\")throw new TypeError(\"callback only supported with file option\");return e.length&&KEt(s,e),s.noResume||VEt(s),s.file&&s.sync?JEt(s):s.file?zEt(s,r):vEe(s)};var VEt=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},KEt=(t,e)=>{let r=new Map(e.map(n=>[Rq(n),!0])),s=t.filter,a=(n,c)=>{let f=c||wEe.parse(n).root||\".\",p=n===f?!1:r.has(n)?r.get(n):a(wEe.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(Rq(n)):n=>a(Rq(n))},JEt=t=>{let e=vEe(t),r=t.file,s=!0,a;try{let n=WI.statSync(r),c=t.maxReadSize||16*1024*1024;if(n.size<c)e.end(WI.readFileSync(r));else{let f=0,p=Buffer.allocUnsafe(c);for(a=WI.openSync(r,\"r\");f<n.size;){let h=WI.readSync(a,p,0,c,f);f+=h,e.write(p.slice(0,h))}e.end()}s=!1}finally{if(s&&a)try{WI.closeSync(a)}catch{}}},zEt=(t,e)=>{let r=new BEe(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on(\"error\",f),r.on(\"end\",c),WI.stat(a,(p,h)=>{if(p)f(p);else{let E=new YEt.ReadStream(a,{readSize:s,size:h.size});E.on(\"error\",f),E.pipe(r)}})});return e?n.then(e,e):n},vEe=t=>new BEe(t)});var QEe=L((Der,kEe)=>{\"use strict\";var ZEt=bI(),bR=fR(),DEe=GI(),bEe=DR(),PEe=ye(\"path\");kEe.exports=(t,e,r)=>{if(typeof e==\"function\"&&(r=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError(\"no files or directories specified\");e=Array.from(e);let s=ZEt(t);if(s.sync&&typeof r==\"function\")throw new TypeError(\"callback not supported for sync tar functions\");if(!s.file&&typeof r==\"function\")throw new TypeError(\"callback only supported with file option\");return s.file&&s.sync?XEt(s,e):s.file?$Et(s,e,r):s.sync?eIt(s,e):tIt(s,e)};var XEt=(t,e)=>{let r=new bR.Sync(t),s=new DEe.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(s),xEe(r,e)},$Et=(t,e,r)=>{let s=new bR(t),a=new DEe.WriteStream(t.file,{mode:t.mode||438});s.pipe(a);let n=new Promise((c,f)=>{a.on(\"error\",f),a.on(\"close\",c),s.on(\"error\",f)});return Fq(s,e),r?n.then(r,r):n},xEe=(t,e)=>{e.forEach(r=>{r.charAt(0)===\"@\"?bEe({file:PEe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},Fq=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)===\"@\")return bEe({file:PEe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>Fq(t,e));t.add(r)}t.end()},eIt=(t,e)=>{let r=new bR.Sync(t);return xEe(r,e),r},tIt=(t,e)=>{let r=new bR(t);return Fq(r,e),r}});var Nq=L((ber,MEe)=>{\"use strict\";var rIt=bI(),TEe=fR(),Xl=ye(\"fs\"),REe=GI(),FEe=DR(),NEe=ye(\"path\"),OEe=FI();MEe.exports=(t,e,r)=>{let s=rIt(t);if(!s.file)throw new TypeError(\"file is required\");if(s.gzip)throw new TypeError(\"cannot append to compressed archives\");if(!e||!Array.isArray(e)||!e.length)throw new TypeError(\"no files or directories specified\");return e=Array.from(e),s.sync?nIt(s,e):sIt(s,e,r)};var nIt=(t,e)=>{let r=new TEe.Sync(t),s=!0,a,n;try{try{a=Xl.openSync(t.file,\"r+\")}catch(p){if(p.code===\"ENOENT\")a=Xl.openSync(t.file,\"w+\");else throw p}let c=Xl.fstatSync(a),f=Buffer.alloc(512);e:for(n=0;n<c.size;n+=512){for(let E=0,C=0;E<512;E+=C){if(C=Xl.readSync(a,f,E,f.length-E,n+E),n===0&&f[0]===31&&f[1]===139)throw new Error(\"cannot append to compressed archives\");if(!C)break e}let p=new OEe(f);if(!p.cksumValid)break;let h=512*Math.ceil(p.size/512);if(n+h+512>c.size)break;n+=h,t.mtimeCache&&t.mtimeCache.set(p.path,p.mtime)}s=!1,iIt(t,r,n,a,e)}finally{if(s)try{Xl.closeSync(a)}catch{}}},iIt=(t,e,r,s,a)=>{let n=new REe.WriteStreamSync(t.file,{fd:s,start:r});e.pipe(n),oIt(e,a)},sIt=(t,e,r)=>{e=Array.from(e);let s=new TEe(t),a=(c,f,p)=>{let h=(I,R)=>{I?Xl.close(c,N=>p(I)):p(null,R)},E=0;if(f===0)return h(null,0);let C=0,S=Buffer.alloc(512),P=(I,R)=>{if(I)return h(I);if(C+=R,C<512&&R)return Xl.read(c,S,C,S.length-C,E+C,P);if(E===0&&S[0]===31&&S[1]===139)return h(new Error(\"cannot append to compressed archives\"));if(C<512)return h(null,E);let N=new OEe(S);if(!N.cksumValid)return h(null,E);let U=512*Math.ceil(N.size/512);if(E+U+512>f||(E+=U+512,E>=f))return h(null,E);t.mtimeCache&&t.mtimeCache.set(N.path,N.mtime),C=0,Xl.read(c,S,0,512,E,P)};Xl.read(c,S,0,512,E,P)},n=new Promise((c,f)=>{s.on(\"error\",f);let p=\"r+\",h=(E,C)=>{if(E&&E.code===\"ENOENT\"&&p===\"r+\")return p=\"w+\",Xl.open(t.file,p,h);if(E)return f(E);Xl.fstat(C,(S,P)=>{if(S)return Xl.close(C,()=>f(S));a(C,P.size,(I,R)=>{if(I)return f(I);let N=new REe.WriteStream(t.file,{fd:C,start:R});s.pipe(N),N.on(\"error\",f),N.on(\"close\",c),LEe(s,e)})})};Xl.open(t.file,p,h)});return r?n.then(r,r):n},oIt=(t,e)=>{e.forEach(r=>{r.charAt(0)===\"@\"?FEe({file:NEe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},LEe=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)===\"@\")return FEe({file:NEe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>LEe(t,e));t.add(r)}t.end()}});var UEe=L((Per,_Ee)=>{\"use strict\";var aIt=bI(),lIt=Nq();_Ee.exports=(t,e,r)=>{let s=aIt(t);if(!s.file)throw new TypeError(\"file is required\");if(s.gzip)throw new TypeError(\"cannot append to compressed archives\");if(!e||!Array.isArray(e)||!e.length)throw new TypeError(\"no files or directories specified\");return e=Array.from(e),cIt(s),lIt(s,e,r)};var cIt=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,s)=>e(r,s)&&!(t.mtimeCache.get(r)>s.mtime):(r,s)=>!(t.mtimeCache.get(r)>s.mtime)}});var qEe=L((xer,jEe)=>{var{promisify:HEe}=ye(\"util\"),U0=ye(\"fs\"),uIt=t=>{if(!t)t={mode:511,fs:U0};else if(typeof t==\"object\")t={mode:511,fs:U0,...t};else if(typeof t==\"number\")t={mode:t,fs:U0};else if(typeof t==\"string\")t={mode:parseInt(t,8),fs:U0};else throw new TypeError(\"invalid options argument\");return t.mkdir=t.mkdir||t.fs.mkdir||U0.mkdir,t.mkdirAsync=HEe(t.mkdir),t.stat=t.stat||t.fs.stat||U0.stat,t.statAsync=HEe(t.stat),t.statSync=t.statSync||t.fs.statSync||U0.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||U0.mkdirSync,t};jEe.exports=uIt});var WEe=L((ker,GEe)=>{var fIt=process.platform,{resolve:AIt,parse:pIt}=ye(\"path\"),hIt=t=>{if(/\\0/.test(t))throw Object.assign(new TypeError(\"path must be a string without null bytes\"),{path:t,code:\"ERR_INVALID_ARG_VALUE\"});if(t=AIt(t),fIt===\"win32\"){let e=/[*|\"<>?:]/,{root:r}=pIt(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error(\"Illegal characters in path.\"),{path:t,code:\"EINVAL\"})}return t};GEe.exports=hIt});var zEe=L((Qer,JEe)=>{var{dirname:YEe}=ye(\"path\"),VEe=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(s=>s.isDirectory()?r:void 0,s=>s.code===\"ENOENT\"?VEe(t,YEe(e),e):void 0),KEe=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(s){return s.code===\"ENOENT\"?KEe(t,YEe(e),e):void 0}};JEe.exports={findMade:VEe,findMadeSync:KEe}});var Mq=L((Ter,XEe)=>{var{dirname:ZEe}=ye(\"path\"),Oq=(t,e,r)=>{e.recursive=!1;let s=ZEe(t);return s===t?e.mkdirAsync(t,e).catch(a=>{if(a.code!==\"EISDIR\")throw a}):e.mkdirAsync(t,e).then(()=>r||t,a=>{if(a.code===\"ENOENT\")return Oq(s,e).then(n=>Oq(t,e,n));if(a.code!==\"EEXIST\"&&a.code!==\"EROFS\")throw a;return e.statAsync(t).then(n=>{if(n.isDirectory())return r;throw a},()=>{throw a})})},Lq=(t,e,r)=>{let s=ZEe(t);if(e.recursive=!1,s===t)try{return e.mkdirSync(t,e)}catch(a){if(a.code!==\"EISDIR\")throw a;return}try{return e.mkdirSync(t,e),r||t}catch(a){if(a.code===\"ENOENT\")return Lq(t,e,Lq(s,e,r));if(a.code!==\"EEXIST\"&&a.code!==\"EROFS\")throw a;try{if(!e.statSync(t).isDirectory())throw a}catch{throw a}}};XEe.exports={mkdirpManual:Oq,mkdirpManualSync:Lq}});var tIe=L((Rer,eIe)=>{var{dirname:$Ee}=ye(\"path\"),{findMade:gIt,findMadeSync:dIt}=zEe(),{mkdirpManual:mIt,mkdirpManualSync:yIt}=Mq(),EIt=(t,e)=>(e.recursive=!0,$Ee(t)===t?e.mkdirAsync(t,e):gIt(e,t).then(s=>e.mkdirAsync(t,e).then(()=>s).catch(a=>{if(a.code===\"ENOENT\")return mIt(t,e);throw a}))),IIt=(t,e)=>{if(e.recursive=!0,$Ee(t)===t)return e.mkdirSync(t,e);let s=dIt(e,t);try{return e.mkdirSync(t,e),s}catch(a){if(a.code===\"ENOENT\")return yIt(t,e);throw a}};eIe.exports={mkdirpNative:EIt,mkdirpNativeSync:IIt}});var sIe=L((Fer,iIe)=>{var rIe=ye(\"fs\"),CIt=process.version,_q=CIt.replace(/^v/,\"\").split(\".\"),nIe=+_q[0]>10||+_q[0]==10&&+_q[1]>=12,wIt=nIe?t=>t.mkdir===rIe.mkdir:()=>!1,BIt=nIe?t=>t.mkdirSync===rIe.mkdirSync:()=>!1;iIe.exports={useNative:wIt,useNativeSync:BIt}});var fIe=L((Ner,uIe)=>{var YI=qEe(),VI=WEe(),{mkdirpNative:oIe,mkdirpNativeSync:aIe}=tIe(),{mkdirpManual:lIe,mkdirpManualSync:cIe}=Mq(),{useNative:vIt,useNativeSync:SIt}=sIe(),KI=(t,e)=>(t=VI(t),e=YI(e),vIt(e)?oIe(t,e):lIe(t,e)),DIt=(t,e)=>(t=VI(t),e=YI(e),SIt(e)?aIe(t,e):cIe(t,e));KI.sync=DIt;KI.native=(t,e)=>oIe(VI(t),YI(e));KI.manual=(t,e)=>lIe(VI(t),YI(e));KI.nativeSync=(t,e)=>aIe(VI(t),YI(e));KI.manualSync=(t,e)=>cIe(VI(t),YI(e));uIe.exports=KI});var yIe=L((Oer,mIe)=>{\"use strict\";var Hc=ye(\"fs\"),Cm=ye(\"path\"),bIt=Hc.lchown?\"lchown\":\"chown\",PIt=Hc.lchownSync?\"lchownSync\":\"chownSync\",pIe=Hc.lchown&&!process.version.match(/v1[1-9]+\\./)&&!process.version.match(/v10\\.[6-9]/),AIe=(t,e,r)=>{try{return Hc[PIt](t,e,r)}catch(s){if(s.code!==\"ENOENT\")throw s}},xIt=(t,e,r)=>{try{return Hc.chownSync(t,e,r)}catch(s){if(s.code!==\"ENOENT\")throw s}},kIt=pIe?(t,e,r,s)=>a=>{!a||a.code!==\"EISDIR\"?s(a):Hc.chown(t,e,r,s)}:(t,e,r,s)=>s,Uq=pIe?(t,e,r)=>{try{return AIe(t,e,r)}catch(s){if(s.code!==\"EISDIR\")throw s;xIt(t,e,r)}}:(t,e,r)=>AIe(t,e,r),QIt=process.version,hIe=(t,e,r)=>Hc.readdir(t,e,r),TIt=(t,e)=>Hc.readdirSync(t,e);/^v4\\./.test(QIt)&&(hIe=(t,e,r)=>Hc.readdir(t,r));var PR=(t,e,r,s)=>{Hc[bIt](t,e,r,kIt(t,e,r,a=>{s(a&&a.code!==\"ENOENT\"?a:null)}))},gIe=(t,e,r,s,a)=>{if(typeof e==\"string\")return Hc.lstat(Cm.resolve(t,e),(n,c)=>{if(n)return a(n.code!==\"ENOENT\"?n:null);c.name=e,gIe(t,c,r,s,a)});if(e.isDirectory())Hq(Cm.resolve(t,e.name),r,s,n=>{if(n)return a(n);let c=Cm.resolve(t,e.name);PR(c,r,s,a)});else{let n=Cm.resolve(t,e.name);PR(n,r,s,a)}},Hq=(t,e,r,s)=>{hIe(t,{withFileTypes:!0},(a,n)=>{if(a){if(a.code===\"ENOENT\")return s();if(a.code!==\"ENOTDIR\"&&a.code!==\"ENOTSUP\")return s(a)}if(a||!n.length)return PR(t,e,r,s);let c=n.length,f=null,p=h=>{if(!f){if(h)return s(f=h);if(--c===0)return PR(t,e,r,s)}};n.forEach(h=>gIe(t,h,e,r,p))})},RIt=(t,e,r,s)=>{if(typeof e==\"string\")try{let a=Hc.lstatSync(Cm.resolve(t,e));a.name=e,e=a}catch(a){if(a.code===\"ENOENT\")return;throw a}e.isDirectory()&&dIe(Cm.resolve(t,e.name),r,s),Uq(Cm.resolve(t,e.name),r,s)},dIe=(t,e,r)=>{let s;try{s=TIt(t,{withFileTypes:!0})}catch(a){if(a.code===\"ENOENT\")return;if(a.code===\"ENOTDIR\"||a.code===\"ENOTSUP\")return Uq(t,e,r);throw a}return s&&s.length&&s.forEach(a=>RIt(t,a,e,r)),Uq(t,e,r)};mIe.exports=Hq;Hq.sync=dIe});var wIe=L((Ler,jq)=>{\"use strict\";var EIe=fIe(),jc=ye(\"fs\"),xR=ye(\"path\"),IIe=yIe(),Ku=TI(),kR=class extends Error{constructor(e,r){super(\"Cannot extract through symbolic link\"),this.path=r,this.symlink=e}get name(){return\"SylinkError\"}},QR=class extends Error{constructor(e,r){super(r+\": Cannot cd into '\"+e+\"'\"),this.path=e,this.code=r}get name(){return\"CwdError\"}},TR=(t,e)=>t.get(Ku(e)),Yv=(t,e,r)=>t.set(Ku(e),r),FIt=(t,e)=>{jc.stat(t,(r,s)=>{(r||!s.isDirectory())&&(r=new QR(t,r&&r.code||\"ENOTDIR\")),e(r)})};jq.exports=(t,e,r)=>{t=Ku(t);let s=e.umask,a=e.mode|448,n=(a&s)!==0,c=e.uid,f=e.gid,p=typeof c==\"number\"&&typeof f==\"number\"&&(c!==e.processUid||f!==e.processGid),h=e.preserve,E=e.unlink,C=e.cache,S=Ku(e.cwd),P=(N,U)=>{N?r(N):(Yv(C,t,!0),U&&p?IIe(U,c,f,W=>P(W)):n?jc.chmod(t,a,r):r())};if(C&&TR(C,t)===!0)return P();if(t===S)return FIt(t,P);if(h)return EIe(t,{mode:a}).then(N=>P(null,N),P);let R=Ku(xR.relative(S,t)).split(\"/\");RR(S,R,a,C,E,S,null,P)};var RR=(t,e,r,s,a,n,c,f)=>{if(!e.length)return f(null,c);let p=e.shift(),h=Ku(xR.resolve(t+\"/\"+p));if(TR(s,h))return RR(h,e,r,s,a,n,c,f);jc.mkdir(h,r,CIe(h,e,r,s,a,n,c,f))},CIe=(t,e,r,s,a,n,c,f)=>p=>{p?jc.lstat(t,(h,E)=>{if(h)h.path=h.path&&Ku(h.path),f(h);else if(E.isDirectory())RR(t,e,r,s,a,n,c,f);else if(a)jc.unlink(t,C=>{if(C)return f(C);jc.mkdir(t,r,CIe(t,e,r,s,a,n,c,f))});else{if(E.isSymbolicLink())return f(new kR(t,t+\"/\"+e.join(\"/\")));f(p)}}):(c=c||t,RR(t,e,r,s,a,n,c,f))},NIt=t=>{let e=!1,r=\"ENOTDIR\";try{e=jc.statSync(t).isDirectory()}catch(s){r=s.code}finally{if(!e)throw new QR(t,r)}};jq.exports.sync=(t,e)=>{t=Ku(t);let r=e.umask,s=e.mode|448,a=(s&r)!==0,n=e.uid,c=e.gid,f=typeof n==\"number\"&&typeof c==\"number\"&&(n!==e.processUid||c!==e.processGid),p=e.preserve,h=e.unlink,E=e.cache,C=Ku(e.cwd),S=N=>{Yv(E,t,!0),N&&f&&IIe.sync(N,n,c),a&&jc.chmodSync(t,s)};if(E&&TR(E,t)===!0)return S();if(t===C)return NIt(C),S();if(p)return S(EIe.sync(t,s));let I=Ku(xR.relative(C,t)).split(\"/\"),R=null;for(let N=I.shift(),U=C;N&&(U+=\"/\"+N);N=I.shift())if(U=Ku(xR.resolve(U)),!TR(E,U))try{jc.mkdirSync(U,s),R=R||U,Yv(E,U,!0)}catch{let te=jc.lstatSync(U);if(te.isDirectory()){Yv(E,U,!0);continue}else if(h){jc.unlinkSync(U),jc.mkdirSync(U,s),R=R||U,Yv(E,U,!0);continue}else if(te.isSymbolicLink())return new kR(U,U+\"/\"+I.join(\"/\"))}return S(R)}});var Gq=L((Mer,BIe)=>{var qq=Object.create(null),{hasOwnProperty:OIt}=Object.prototype;BIe.exports=t=>(OIt.call(qq,t)||(qq[t]=t.normalize(\"NFKD\")),qq[t])});var bIe=L((_er,DIe)=>{var vIe=ye(\"assert\"),LIt=Gq(),MIt=NI(),{join:SIe}=ye(\"path\"),_It=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,UIt=_It===\"win32\";DIe.exports=()=>{let t=new Map,e=new Map,r=h=>h.split(\"/\").slice(0,-1).reduce((C,S)=>(C.length&&(S=SIe(C[C.length-1],S)),C.push(S||\"/\"),C),[]),s=new Set,a=h=>{let E=e.get(h);if(!E)throw new Error(\"function does not have any path reservations\");return{paths:E.paths.map(C=>t.get(C)),dirs:[...E.dirs].map(C=>t.get(C))}},n=h=>{let{paths:E,dirs:C}=a(h);return E.every(S=>S[0]===h)&&C.every(S=>S[0]instanceof Set&&S[0].has(h))},c=h=>s.has(h)||!n(h)?!1:(s.add(h),h(()=>f(h)),!0),f=h=>{if(!s.has(h))return!1;let{paths:E,dirs:C}=e.get(h),S=new Set;return E.forEach(P=>{let I=t.get(P);vIe.equal(I[0],h),I.length===1?t.delete(P):(I.shift(),typeof I[0]==\"function\"?S.add(I[0]):I[0].forEach(R=>S.add(R)))}),C.forEach(P=>{let I=t.get(P);vIe(I[0]instanceof Set),I[0].size===1&&I.length===1?t.delete(P):I[0].size===1?(I.shift(),S.add(I[0])):I[0].delete(h)}),s.delete(h),S.forEach(P=>c(P)),!0};return{check:n,reserve:(h,E)=>{h=UIt?[\"win32 parallelization disabled\"]:h.map(S=>LIt(MIt(SIe(S))).toLowerCase());let C=new Set(h.map(S=>r(S)).reduce((S,P)=>S.concat(P)));return e.set(E,{dirs:C,paths:h}),h.forEach(S=>{let P=t.get(S);P?P.push(E):t.set(S,[E])}),C.forEach(S=>{let P=t.get(S);P?P[P.length-1]instanceof Set?P[P.length-1].add(E):P.push(new Set([E])):t.set(S,[new Set([E])])}),c(E)}}}});var kIe=L((Uer,xIe)=>{var HIt=process.platform,jIt=HIt===\"win32\",qIt=global.__FAKE_TESTING_FS__||ye(\"fs\"),{O_CREAT:GIt,O_TRUNC:WIt,O_WRONLY:YIt,UV_FS_O_FILEMAP:PIe=0}=qIt.constants,VIt=jIt&&!!PIe,KIt=512*1024,JIt=PIe|WIt|GIt|YIt;xIe.exports=VIt?t=>t<KIt?JIt:\"w\":()=>\"w\"});var $q=L((Her,GIe)=>{\"use strict\";var zIt=ye(\"assert\"),ZIt=SR(),Mn=ye(\"fs\"),XIt=GI(),Zp=ye(\"path\"),HIe=wIe(),QIe=$6(),$It=bIe(),eCt=eq(),$l=TI(),tCt=NI(),rCt=Gq(),TIe=Symbol(\"onEntry\"),Vq=Symbol(\"checkFs\"),RIe=Symbol(\"checkFs2\"),OR=Symbol(\"pruneCache\"),Kq=Symbol(\"isReusable\"),qc=Symbol(\"makeFs\"),Jq=Symbol(\"file\"),zq=Symbol(\"directory\"),LR=Symbol(\"link\"),FIe=Symbol(\"symlink\"),NIe=Symbol(\"hardlink\"),OIe=Symbol(\"unsupported\"),LIe=Symbol(\"checkPath\"),H0=Symbol(\"mkdir\"),Xo=Symbol(\"onError\"),FR=Symbol(\"pending\"),MIe=Symbol(\"pend\"),JI=Symbol(\"unpend\"),Wq=Symbol(\"ended\"),Yq=Symbol(\"maybeClose\"),Zq=Symbol(\"skip\"),Vv=Symbol(\"doChown\"),Kv=Symbol(\"uid\"),Jv=Symbol(\"gid\"),zv=Symbol(\"checkedCwd\"),jIe=ye(\"crypto\"),qIe=kIe(),nCt=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Zv=nCt===\"win32\",iCt=(t,e)=>{if(!Zv)return Mn.unlink(t,e);let r=t+\".DELETE.\"+jIe.randomBytes(16).toString(\"hex\");Mn.rename(t,r,s=>{if(s)return e(s);Mn.unlink(r,e)})},sCt=t=>{if(!Zv)return Mn.unlinkSync(t);let e=t+\".DELETE.\"+jIe.randomBytes(16).toString(\"hex\");Mn.renameSync(t,e),Mn.unlinkSync(e)},_Ie=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,UIe=t=>rCt(tCt($l(t))).toLowerCase(),oCt=(t,e)=>{e=UIe(e);for(let r of t.keys()){let s=UIe(r);(s===e||s.indexOf(e+\"/\")===0)&&t.delete(r)}},aCt=t=>{for(let e of t.keys())t.delete(e)},Xv=class extends ZIt{constructor(e){if(e||(e={}),e.ondone=r=>{this[Wq]=!0,this[Yq]()},super(e),this[zv]=!1,this.reservations=$It(),this.transform=typeof e.transform==\"function\"?e.transform:null,this.writable=!0,this.readable=!1,this[FR]=0,this[Wq]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid==\"number\"||typeof e.gid==\"number\"){if(typeof e.uid!=\"number\"||typeof e.gid!=\"number\")throw new TypeError(\"cannot set owner without number uid and gid\");if(e.preserveOwner)throw new TypeError(\"cannot preserve owner in archive and also set owner explicitly\");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!=\"number\"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Zv,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=$l(Zp.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask==\"number\"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on(\"entry\",r=>this[TIe](r))}warn(e,r,s={}){return(e===\"TAR_BAD_ARCHIVE\"||e===\"TAR_ABORT\")&&(s.recoverable=!1),super.warn(e,r,s)}[Yq](){this[Wq]&&this[FR]===0&&(this.emit(\"prefinish\"),this.emit(\"finish\"),this.emit(\"end\"),this.emit(\"close\"))}[LIe](e){if(this.strip){let r=$l(e.path).split(\"/\");if(r.length<this.strip)return!1;if(e.path=r.slice(this.strip).join(\"/\"),e.type===\"Link\"){let s=$l(e.linkpath).split(\"/\");if(s.length>=this.strip)e.linkpath=s.slice(this.strip).join(\"/\");else return!1}}if(!this.preservePaths){let r=$l(e.path),s=r.split(\"/\");if(s.includes(\"..\")||Zv&&/^[a-z]:\\.\\.$/i.test(s[0]))return this.warn(\"TAR_ENTRY_ERROR\",\"path contains '..'\",{entry:e,path:r}),!1;let[a,n]=eCt(r);a&&(e.path=n,this.warn(\"TAR_ENTRY_INFO\",`stripping ${a} from absolute path`,{entry:e,path:r}))}if(Zp.isAbsolute(e.path)?e.absolute=$l(Zp.resolve(e.path)):e.absolute=$l(Zp.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+\"/\")!==0&&e.absolute!==this.cwd)return this.warn(\"TAR_ENTRY_ERROR\",\"path escaped extraction target\",{entry:e,path:$l(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!==\"Directory\"&&e.type!==\"GNUDumpDir\")return!1;if(this.win32){let{root:r}=Zp.win32.parse(e.absolute);e.absolute=r+QIe.encode(e.absolute.substr(r.length));let{root:s}=Zp.win32.parse(e.path);e.path=s+QIe.encode(e.path.substr(s.length))}return!0}[TIe](e){if(!this[LIe](e))return e.resume();switch(zIt.equal(typeof e.absolute,\"string\"),e.type){case\"Directory\":case\"GNUDumpDir\":e.mode&&(e.mode=e.mode|448);case\"File\":case\"OldFile\":case\"ContiguousFile\":case\"Link\":case\"SymbolicLink\":return this[Vq](e);case\"CharacterDevice\":case\"BlockDevice\":case\"FIFO\":default:return this[OIe](e)}}[Xo](e,r){e.name===\"CwdError\"?this.emit(\"error\",e):(this.warn(\"TAR_ENTRY_ERROR\",e,{entry:r}),this[JI](),r.resume())}[H0](e,r,s){HIe($l(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},s)}[Vv](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==\"number\"&&e.uid!==this.processUid||typeof e.gid==\"number\"&&e.gid!==this.processGid)||typeof this.uid==\"number\"&&this.uid!==this.processUid||typeof this.gid==\"number\"&&this.gid!==this.processGid}[Kv](e){return _Ie(this.uid,e.uid,this.processUid)}[Jv](e){return _Ie(this.gid,e.gid,this.processGid)}[Jq](e,r){let s=e.mode&4095||this.fmode,a=new XIt.WriteStream(e.absolute,{flags:qIe(e.size),mode:s,autoClose:!1});a.on(\"error\",p=>{a.fd&&Mn.close(a.fd,()=>{}),a.write=()=>!0,this[Xo](p,e),r()});let n=1,c=p=>{if(p){a.fd&&Mn.close(a.fd,()=>{}),this[Xo](p,e),r();return}--n===0&&Mn.close(a.fd,h=>{h?this[Xo](h,e):this[JI](),r()})};a.on(\"finish\",p=>{let h=e.absolute,E=a.fd;if(e.mtime&&!this.noMtime){n++;let C=e.atime||new Date,S=e.mtime;Mn.futimes(E,C,S,P=>P?Mn.utimes(h,C,S,I=>c(I&&P)):c())}if(this[Vv](e)){n++;let C=this[Kv](e),S=this[Jv](e);Mn.fchown(E,C,S,P=>P?Mn.chown(h,C,S,I=>c(I&&P)):c())}c()});let f=this.transform&&this.transform(e)||e;f!==e&&(f.on(\"error\",p=>{this[Xo](p,e),r()}),e.pipe(f)),f.pipe(a)}[zq](e,r){let s=e.mode&4095||this.dmode;this[H0](e.absolute,s,a=>{if(a){this[Xo](a,e),r();return}let n=1,c=f=>{--n===0&&(r(),this[JI](),e.resume())};e.mtime&&!this.noMtime&&(n++,Mn.utimes(e.absolute,e.atime||new Date,e.mtime,c)),this[Vv](e)&&(n++,Mn.chown(e.absolute,this[Kv](e),this[Jv](e),c)),c()})}[OIe](e){e.unsupported=!0,this.warn(\"TAR_ENTRY_UNSUPPORTED\",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[FIe](e,r){this[LR](e,e.linkpath,\"symlink\",r)}[NIe](e,r){let s=$l(Zp.resolve(this.cwd,e.linkpath));this[LR](e,s,\"link\",r)}[MIe](){this[FR]++}[JI](){this[FR]--,this[Yq]()}[Zq](e){this[JI](),e.resume()}[Kq](e,r){return e.type===\"File\"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Zv}[Vq](e){this[MIe]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,s=>this[RIe](e,s))}[OR](e){e.type===\"SymbolicLink\"?aCt(this.dirCache):e.type!==\"Directory\"&&oCt(this.dirCache,e.absolute)}[RIe](e,r){this[OR](e);let s=f=>{this[OR](e),r(f)},a=()=>{this[H0](this.cwd,this.dmode,f=>{if(f){this[Xo](f,e),s();return}this[zv]=!0,n()})},n=()=>{if(e.absolute!==this.cwd){let f=$l(Zp.dirname(e.absolute));if(f!==this.cwd)return this[H0](f,this.dmode,p=>{if(p){this[Xo](p,e),s();return}c()})}c()},c=()=>{Mn.lstat(e.absolute,(f,p)=>{if(p&&(this.keep||this.newer&&p.mtime>e.mtime)){this[Zq](e),s();return}if(f||this[Kq](e,p))return this[qc](null,e,s);if(p.isDirectory()){if(e.type===\"Directory\"){let h=!this.noChmod&&e.mode&&(p.mode&4095)!==e.mode,E=C=>this[qc](C,e,s);return h?Mn.chmod(e.absolute,e.mode,E):E()}if(e.absolute!==this.cwd)return Mn.rmdir(e.absolute,h=>this[qc](h,e,s))}if(e.absolute===this.cwd)return this[qc](null,e,s);iCt(e.absolute,h=>this[qc](h,e,s))})};this[zv]?n():a()}[qc](e,r,s){if(e){this[Xo](e,r),s();return}switch(r.type){case\"File\":case\"OldFile\":case\"ContiguousFile\":return this[Jq](r,s);case\"Link\":return this[NIe](r,s);case\"SymbolicLink\":return this[FIe](r,s);case\"Directory\":case\"GNUDumpDir\":return this[zq](r,s)}}[LR](e,r,s,a){Mn[s](r,e.absolute,n=>{n?this[Xo](n,e):(this[JI](),e.resume()),a()})}},NR=t=>{try{return[null,t()]}catch(e){return[e,null]}},Xq=class extends Xv{[qc](e,r){return super[qc](e,r,()=>{})}[Vq](e){if(this[OR](e),!this[zv]){let n=this[H0](this.cwd,this.dmode);if(n)return this[Xo](n,e);this[zv]=!0}if(e.absolute!==this.cwd){let n=$l(Zp.dirname(e.absolute));if(n!==this.cwd){let c=this[H0](n,this.dmode);if(c)return this[Xo](c,e)}}let[r,s]=NR(()=>Mn.lstatSync(e.absolute));if(s&&(this.keep||this.newer&&s.mtime>e.mtime))return this[Zq](e);if(r||this[Kq](e,s))return this[qc](null,e);if(s.isDirectory()){if(e.type===\"Directory\"){let c=!this.noChmod&&e.mode&&(s.mode&4095)!==e.mode,[f]=c?NR(()=>{Mn.chmodSync(e.absolute,e.mode)}):[];return this[qc](f,e)}let[n]=NR(()=>Mn.rmdirSync(e.absolute));this[qc](n,e)}let[a]=e.absolute===this.cwd?[]:NR(()=>sCt(e.absolute));this[qc](a,e)}[Jq](e,r){let s=e.mode&4095||this.fmode,a=f=>{let p;try{Mn.closeSync(n)}catch(h){p=h}(f||p)&&this[Xo](f||p,e),r()},n;try{n=Mn.openSync(e.absolute,qIe(e.size),s)}catch(f){return a(f)}let c=this.transform&&this.transform(e)||e;c!==e&&(c.on(\"error\",f=>this[Xo](f,e)),e.pipe(c)),c.on(\"data\",f=>{try{Mn.writeSync(n,f,0,f.length)}catch(p){a(p)}}),c.on(\"end\",f=>{let p=null;if(e.mtime&&!this.noMtime){let h=e.atime||new Date,E=e.mtime;try{Mn.futimesSync(n,h,E)}catch(C){try{Mn.utimesSync(e.absolute,h,E)}catch{p=C}}}if(this[Vv](e)){let h=this[Kv](e),E=this[Jv](e);try{Mn.fchownSync(n,h,E)}catch(C){try{Mn.chownSync(e.absolute,h,E)}catch{p=p||C}}}a(p)})}[zq](e,r){let s=e.mode&4095||this.dmode,a=this[H0](e.absolute,s);if(a){this[Xo](a,e),r();return}if(e.mtime&&!this.noMtime)try{Mn.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[Vv](e))try{Mn.chownSync(e.absolute,this[Kv](e),this[Jv](e))}catch{}r(),e.resume()}[H0](e,r){try{return HIe.sync($l(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(s){return s}}[LR](e,r,s,a){try{Mn[s+\"Sync\"](r,e.absolute),a(),e.resume()}catch(n){return this[Xo](n,e)}}};Xv.Sync=Xq;GIe.exports=Xv});var JIe=L((jer,KIe)=>{\"use strict\";var lCt=bI(),MR=$q(),YIe=ye(\"fs\"),VIe=GI(),WIe=ye(\"path\"),eG=NI();KIe.exports=(t,e,r)=>{typeof t==\"function\"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e==\"function\"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=lCt(t);if(s.sync&&typeof r==\"function\")throw new TypeError(\"callback not supported for sync tar functions\");if(!s.file&&typeof r==\"function\")throw new TypeError(\"callback only supported with file option\");return e.length&&cCt(s,e),s.file&&s.sync?uCt(s):s.file?fCt(s,r):s.sync?ACt(s):pCt(s)};var cCt=(t,e)=>{let r=new Map(e.map(n=>[eG(n),!0])),s=t.filter,a=(n,c)=>{let f=c||WIe.parse(n).root||\".\",p=n===f?!1:r.has(n)?r.get(n):a(WIe.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(eG(n)):n=>a(eG(n))},uCt=t=>{let e=new MR.Sync(t),r=t.file,s=YIe.statSync(r),a=t.maxReadSize||16*1024*1024;new VIe.ReadStreamSync(r,{readSize:a,size:s.size}).pipe(e)},fCt=(t,e)=>{let r=new MR(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on(\"error\",f),r.on(\"close\",c),YIe.stat(a,(p,h)=>{if(p)f(p);else{let E=new VIe.ReadStream(a,{readSize:s,size:h.size});E.on(\"error\",f),E.pipe(r)}})});return e?n.then(e,e):n},ACt=t=>new MR.Sync(t),pCt=t=>new MR(t)});var zIe=L(xs=>{\"use strict\";xs.c=xs.create=QEe();xs.r=xs.replace=Nq();xs.t=xs.list=DR();xs.u=xs.update=UEe();xs.x=xs.extract=JIe();xs.Pack=fR();xs.Unpack=$q();xs.Parse=SR();xs.ReadEntry=KT();xs.WriteEntry=uq();xs.Header=FI();xs.Pax=zT();xs.types=Y6()});var tG,ZIe,j0,$v,eS,XIe=It(()=>{tG=et(Md()),ZIe=ye(\"worker_threads\"),j0=Symbol(\"kTaskInfo\"),$v=class{constructor(e,r){this.fn=e;this.limit=(0,tG.default)(r.poolSize)}run(e){return this.limit(()=>this.fn(e))}},eS=class{constructor(e,r){this.source=e;this.workers=[];this.limit=(0,tG.default)(r.poolSize),this.cleanupInterval=setInterval(()=>{if(this.limit.pendingCount===0&&this.limit.activeCount===0){let s=this.workers.pop();s?s.terminate():clearInterval(this.cleanupInterval)}},5e3).unref()}createWorker(){this.cleanupInterval.refresh();let e=new ZIe.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,\"--unhandled-rejections=strict\"]});return e.on(\"message\",r=>{if(!e[j0])throw new Error(\"Assertion failed: Worker sent a result without having a task assigned\");e[j0].resolve(r),e[j0]=null,e.unref(),this.workers.push(e)}),e.on(\"error\",r=>{e[j0]?.reject(r),e[j0]=null}),e.on(\"exit\",r=>{r!==0&&e[j0]?.reject(new Error(`Worker exited with code ${r}`)),e[j0]=null}),e}run(e){return this.limit(()=>{let r=this.workers.pop()??this.createWorker();return r.ref(),new Promise((s,a)=>{r[j0]={resolve:s,reject:a},r.postMessage(e)})})}}});var eCe=L((Yer,$Ie)=>{var rG;$Ie.exports.getContent=()=>(typeof rG>\"u\"&&(rG=ye(\"zlib\").brotliDecompressSync(Buffer.from(\"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\",\"base64\")).toString()),rG)});var hs={};Vt(hs,{convertToZip:()=>mCt,convertToZipWorker:()=>sG,extractArchiveTo:()=>sCe,getDefaultTaskPool:()=>nCe,getTaskPoolForConfiguration:()=>iCe,makeArchiveFromDirectory:()=>dCt});function hCt(t,e){switch(t){case\"async\":return new $v(sG,{poolSize:e});case\"workers\":return new eS((0,iG.getContent)(),{poolSize:e});default:throw new Error(`Assertion failed: Unknown value ${t} for taskPoolMode`)}}function nCe(){return typeof nG>\"u\"&&(nG=hCt(\"workers\",As.availableParallelism())),nG}function iCe(t){return typeof t>\"u\"?nCe():Vl(gCt,t,()=>{let e=t.get(\"taskPoolMode\"),r=t.get(\"taskPoolConcurrency\");switch(e){case\"async\":return new $v(sG,{poolSize:r});case\"workers\":return new eS((0,iG.getContent)(),{poolSize:r});default:throw new Error(`Assertion failed: Unknown value ${e} for taskPoolMode`)}})}async function sG(t){let{tmpFile:e,tgz:r,compressionLevel:s,extractBufferOpts:a}=t,n=new ps(e,{create:!0,level:s,stats:el.makeDefaultStats()}),c=Buffer.from(r.buffer,r.byteOffset,r.byteLength);return await sCe(c,n,a),n.saveAndClose(),e}async function dCt(t,{baseFs:e=new Yn,prefixPath:r=vt.root,compressionLevel:s,inMemory:a=!1}={}){let n;if(a)n=new ps(null,{level:s});else{let f=await le.mktempPromise(),p=K.join(f,\"archive.zip\");n=new ps(p,{create:!0,level:s})}let c=K.resolve(vt.root,r);return await n.copyPromise(c,t,{baseFs:e,stableTime:!0,stableSort:!0}),n}async function mCt(t,e={}){let r=await le.mktempPromise(),s=K.join(r,\"archive.zip\"),a=e.compressionLevel??e.configuration?.get(\"compressionLevel\")??\"mixed\",n={prefixPath:e.prefixPath,stripComponents:e.stripComponents};return await(e.taskPool??iCe(e.configuration)).run({tmpFile:s,tgz:t,compressionLevel:a,extractBufferOpts:n}),new ps(s,{level:e.compressionLevel})}async function*yCt(t){let e=new rCe.default.Parse,r=new tCe.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});e.on(\"entry\",s=>{r.write(s)}),e.on(\"error\",s=>{r.destroy(s)}),e.on(\"close\",()=>{r.destroyed||r.end()}),e.end(t);for await(let s of r){let a=s;yield a,a.resume()}}async function sCe(t,e,{stripComponents:r=0,prefixPath:s=vt.dot}={}){function a(n){if(n.path[0]===\"/\")return!0;let c=n.path.split(/\\//g);return!!(c.some(f=>f===\"..\")||c.length<=r)}for await(let n of yCt(t)){if(a(n))continue;let c=K.normalize(ue.toPortablePath(n.path)).replace(/\\/$/,\"\").split(/\\//g);if(c.length<=r)continue;let f=c.slice(r).join(\"/\"),p=K.join(s,f),h=420;switch((n.type===\"Directory\"||(n.mode??0)&73)&&(h|=73),n.type){case\"Directory\":e.mkdirpSync(K.dirname(p),{chmod:493,utimes:[ui.SAFE_TIME,ui.SAFE_TIME]}),e.mkdirSync(p,{mode:h}),e.utimesSync(p,ui.SAFE_TIME,ui.SAFE_TIME);break;case\"OldFile\":case\"File\":e.mkdirpSync(K.dirname(p),{chmod:493,utimes:[ui.SAFE_TIME,ui.SAFE_TIME]}),e.writeFileSync(p,await WE(n),{mode:h}),e.utimesSync(p,ui.SAFE_TIME,ui.SAFE_TIME);break;case\"SymbolicLink\":e.mkdirpSync(K.dirname(p),{chmod:493,utimes:[ui.SAFE_TIME,ui.SAFE_TIME]}),e.symlinkSync(n.linkpath,p),e.lutimesSync(p,ui.SAFE_TIME,ui.SAFE_TIME);break}}return e}var tCe,rCe,iG,nG,gCt,oCe=It(()=>{Ve();bt();rA();tCe=ye(\"stream\"),rCe=et(zIe());XIe();kc();iG=et(eCe());gCt=new WeakMap});var lCe=L((oG,aCe)=>{(function(t,e){typeof oG==\"object\"?aCe.exports=e():typeof define==\"function\"&&define.amd?define(e):t.treeify=e()})(oG,function(){function t(a,n){var c=n?\"\\u2514\":\"\\u251C\";return a?c+=\"\\u2500 \":c+=\"\\u2500\\u2500\\u2510\",c}function e(a,n){var c=[];for(var f in a)a.hasOwnProperty(f)&&(n&&typeof a[f]==\"function\"||c.push(f));return c}function r(a,n,c,f,p,h,E){var C=\"\",S=0,P,I,R=f.slice(0);if(R.push([n,c])&&f.length>0&&(f.forEach(function(U,W){W>0&&(C+=(U[1]?\" \":\"\\u2502\")+\"  \"),!I&&U[0]===n&&(I=!0)}),C+=t(a,c)+a,p&&(typeof n!=\"object\"||n instanceof Date)&&(C+=\": \"+n),I&&(C+=\" (circular ref.)\"),E(C)),!I&&typeof n==\"object\"){var N=e(n,h);N.forEach(function(U){P=++S===N.length,r(U,n[U],P,R,p,h,E)})}}var s={};return s.asLines=function(a,n,c,f){var p=typeof c!=\"function\"?c:!1;r(\".\",a,!1,[],n,p,f||c)},s.asTree=function(a,n,c){var f=\"\";return r(\".\",a,!1,[],n,c,function(p){f+=p+`\n`}),f},s})});var ks={};Vt(ks,{emitList:()=>ECt,emitTree:()=>ACe,treeNodeToJson:()=>fCe,treeNodeToTreeify:()=>uCe});function uCe(t,{configuration:e}){let r={},s=0,a=(n,c)=>{let f=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of f){if(!h)continue;let{label:E,value:C,children:S}=h,P=[];typeof E<\"u\"&&P.push(zd(e,E,2)),typeof C<\"u\"&&P.push(Ut(e,C[0],C[1])),P.length===0&&P.push(zd(e,`${p}`,2));let I=P.join(\": \").trim(),R=`\\0${s++}\\0`,N=c[`${R}${I}`]={};typeof S<\"u\"&&a(S,N)}};if(typeof t.children>\"u\")throw new Error(\"The root node must only contain children\");return a(t.children,r),r}function fCe(t){let e=r=>{if(typeof r.children>\"u\"){if(typeof r.value>\"u\")throw new Error(\"Assertion failed: Expected a value to be set if the children are missing\");return Zd(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,c]of s)c&&(a[ICt(n)]=e(c));return typeof r.value>\"u\"?a:{value:Zd(r.value[0],r.value[1]),children:a}};return e(t)}function ECt(t,{configuration:e,stdout:r,json:s}){let a=t.map(n=>({value:n}));ACe({children:a},{configuration:e,stdout:r,json:s})}function ACe(t,{configuration:e,stdout:r,json:s,separators:a=0}){if(s){let c=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let f of c)f&&r.write(`${JSON.stringify(fCe(f))}\n`);return}let n=(0,cCe.asTree)(uCe(t,{configuration:e}),!1,!1);if(n=n.replace(/\\0[0-9]+\\0/g,\"\"),a>=1&&(n=n.replace(/^([├└]─)/gm,`\\u2502\n$1`).replace(/^│\\n/,\"\")),a>=2)for(let c=0;c<2;++c)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\\n]+\\n)(([│ ]).{2}[├└].{2}[^\\n]*\\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3  \\u2502 \n$2`).replace(/^│\\n/,\"\");if(a>=3)throw new Error(\"Only the first two levels are accepted by treeUtils.emitTree\");r.write(n)}function ICt(t){return typeof t==\"string\"?t.replace(/^\\0[0-9]+\\0/,\"\"):t}var cCe,pCe=It(()=>{cCe=et(lCe());Qc()});var _R,hCe=It(()=>{_R=class{constructor(e){this.releaseFunction=e;this.map=new Map}addOrCreate(e,r){let s=this.map.get(e);if(typeof s<\"u\"){if(s.refCount<=0)throw new Error(`Race condition in RefCountedMap. While adding a new key the refCount is: ${s.refCount} for ${JSON.stringify(e)}`);return s.refCount++,{value:s.value,release:()=>this.release(e)}}else{let a=r();return this.map.set(e,{refCount:1,value:a}),{value:a,release:()=>this.release(e)}}}release(e){let r=this.map.get(e);if(!r)throw new Error(`Unbalanced calls to release. No known instances of: ${JSON.stringify(e)}`);let s=r.refCount;if(s<=0)throw new Error(`Unbalanced calls to release. Too many release vs alloc refcount would become: ${s-1} of ${JSON.stringify(e)}`);s==1?(this.map.delete(e),this.releaseFunction(r.value)):r.refCount--}}});function tS(t){let e=t.match(CCt);if(!e?.groups)throw new Error(\"Assertion failed: Expected the checksum to match the requested pattern\");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var gCe,aG,lG,UR,Jr,CCt,cG=It(()=>{Ve();bt();bt();rA();gCe=ye(\"crypto\"),aG=et(ye(\"fs\"));hCe();Fc();I0();kc();Yo();lG=YE(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),UR=YE(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Jr=class t{constructor(e,{configuration:r,immutable:s=r.get(\"enableImmutableCache\"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.refCountedZipFsCache=new _R(e=>{e.discardAndClose()});this.cacheId=`-${(0,gCe.randomBytes)(8).toString(\"hex\")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=s,this.check=a;let{cacheSpec:n,cacheKey:c}=t.getCacheKey(r);this.cacheSpec=n,this.cacheKey=c}static async find(e,{immutable:r,check:s}={}){let a=new t(e.get(\"cacheFolder\"),{configuration:e,immutable:r,check:s});return await a.setup(),a}static getCacheKey(e){let r=e.get(\"compressionLevel\"),s=r!==\"mixed\"?`c${r}`:\"\";return{cacheKey:[UR,s].join(\"\"),cacheSpec:s}}get mirrorCwd(){if(!this.configuration.get(\"enableMirror\"))return null;let e=`${this.configuration.get(\"globalFolder\")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${nI(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=tS(r).hash.slice(0,10);return`${nI(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:s}=tS(e);if(r===null||r<lG)return!1;let a=this.configuration.get(\"cacheMigrationMode\");return!(r<UR&&a===\"always\"||s!==this.cacheSpec&&a!==\"required-only\")}getLocatorPath(e,r){return this.mirrorCwd===null?K.resolve(this.cwd,this.getVersionFilename(e)):r===null?K.resolve(this.cwd,this.getVersionFilename(e)):K.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?K.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get(\"enableGlobalCache\"))if(this.immutable){if(!await le.existsPromise(this.cwd))throw new Yt(56,\"Cache path does not exist.\")}else{await le.mkdirPromise(this.cwd,{recursive:!0});let e=K.resolve(this.cwd,\".gitignore\");await le.changeFilePromise(e,`/.gitignore\n*.flock\n*.tmp\n`)}(this.mirrorCwd||!this.immutable)&&await le.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:s,onMiss:a,loader:n,...c}){let f=this.getLocatorMirrorPath(e),p=new Yn,h=()=>{let pe=new ps,Be=K.join(vt.root,Z8(e));return pe.mkdirSync(Be,{recursive:!0}),pe.writeJsonSync(K.join(Be,Er.manifest),{name:cn(e),mocked:!0}),pe},E=async(pe,{isColdHit:Be,controlPath:Ce=null})=>{if(Ce===null&&c.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!Be?tS(r).cacheKey:this.cacheKey,we=!c.skipIntegrityCheck||!r?`${g}/${await SQ(pe)}`:r;if(Ce!==null){let fe=!c.skipIntegrityCheck||!r?`${this.cacheKey}/${await SQ(Ce)}`:r;if(we!==fe)throw new Yt(18,\"The remote archive doesn't match the local checksum - has the local cache been corrupted?\")}let Ee=null;switch(r!==null&&we!==r&&(this.check?Ee=\"throw\":tS(r).cacheKey!==tS(we).cacheKey?Ee=\"update\":Ee=this.configuration.get(\"checksumBehavior\")),Ee){case null:case\"update\":return{isValid:!0,hash:we};case\"ignore\":return{isValid:!0,hash:r};case\"reset\":return{isValid:!1,hash:r};default:case\"throw\":throw new Yt(18,\"The remote archive doesn't match the expected checksum\")}},C=async pe=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Yr(this.configuration,e)}`);let Be=await n(),Ce=Be.getRealPath();Be.saveAndClose(),await le.chmodPromise(Ce,420);let g=await E(pe,{controlPath:Ce,isColdHit:!1});if(!g.isValid)throw new Error(\"Assertion failed: Expected a valid checksum\");return g.hash},S=async()=>{if(f===null||!await le.existsPromise(f)){let pe=await n(),Be=pe.getRealPath();return pe.saveAndClose(),{source:\"loader\",path:Be}}return{source:\"mirror\",path:f}},P=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Yr(this.configuration,e)}`);if(this.immutable)throw new Yt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}`);let{path:pe,source:Be}=await S(),{hash:Ce}=await E(pe,{isColdHit:!0}),g=this.getLocatorPath(e,Ce),we=[];Be!==\"mirror\"&&f!==null&&we.push(async()=>{let fe=`${f}${this.cacheId}`;await le.copyFilePromise(pe,fe,aG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(fe,420),await le.renamePromise(fe,f)}),(!c.mirrorWriteOnly||f===null)&&we.push(async()=>{let fe=`${g}${this.cacheId}`;await le.copyFilePromise(pe,fe,aG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(fe,420),await le.renamePromise(fe,g)});let Ee=c.mirrorWriteOnly?f??g:g;return await Promise.all(we.map(fe=>fe())),[!1,Ee,Ce]},I=async()=>{let Be=(async()=>{let Ce=c.unstablePackages?.has(e.locatorHash),g=Ce||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,we=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,Ee=!!c.mockedPackages?.has(e.locatorHash)&&(!this.check||!we),fe=Ee||we,se=fe?s:a;if(se&&se(),fe){let X=null,De=g;if(!Ee)if(this.check)X=await C(De);else{let Re=await E(De,{isColdHit:!1});if(Re.isValid)X=Re.hash;else return P()}return[Ee,De,X]}else{if(this.immutable&&Ce)throw new Yt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}; consider defining ${he.pretty(this.configuration,\"supportedArchitectures\",he.Type.CODE)} to cache packages for multiple systems`);return P()}})();this.mutexes.set(e.locatorHash,Be);try{return await Be}finally{this.mutexes.delete(e.locatorHash)}};for(let pe;pe=this.mutexes.get(e.locatorHash);)await pe;let[R,N,U]=await I();R||this.markedFiles.add(N);let W=()=>this.refCountedZipFsCache.addOrCreate(N,()=>R?h():new ps(N,{baseFs:p,readOnly:!0})),te,ie=new oE(()=>p3(()=>(te=W(),te.value),pe=>`Failed to open the cache entry for ${Yr(this.configuration,e)}: ${pe}`),K),Ae=new Hf(N,{baseFs:ie,pathUtils:K}),ce=()=>{te?.release()},me=c.unstablePackages?.has(e.locatorHash)?null:U;return[Ae,ce,me]}},CCt=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\\/)?(?<hash>.*)$/});var HR,dCe=It(()=>{HR=(r=>(r[r.SCRIPT=0]=\"SCRIPT\",r[r.SHELLCODE=1]=\"SHELLCODE\",r))(HR||{})});var wCt,zI,uG=It(()=>{bt();Bc();Np();Yo();wCt=[[/^(git(?:\\+(?:https|ssh))?:\\/\\/.*(?:\\.git)?)#(.*)$/,(t,e,r,s)=>`${r}#commit=${s}`],[/^https:\\/\\/((?:[^/]+?)@)?codeload\\.github\\.com\\/([^/]+\\/[^/]+)\\/tar\\.gz\\/([0-9a-f]+)$/,(t,e,r=\"\",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https:\\/\\/((?:[^/]+?)@)?github\\.com\\/([^/]+\\/[^/]+?)(?:\\.git)?#([0-9a-f]+)$/,(t,e,r=\"\",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https?:\\/\\/[^/]+\\/(?:[^/]+\\/)*(?:@.+(?:\\/|(?:%2f)))?([^/]+)\\/(?:-|download)\\/\\1-[^/]+\\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\\/\\/npm\\.pkg\\.github\\.com\\/download\\/(?:@[^/]+)\\/(?:[^/]+)\\/(?:[^/]+)\\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\\/\\/npm\\.fontawesome\\.com\\/(?:@[^/]+)\\/([^/]+)\\/-\\/([^/]+)\\/\\1-\\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\\/\\/[^/]+\\/.*\\/(@[^/]+)\\/([^/]+)\\/-\\/\\1\\/\\2-(?:[.\\d\\w-]+)\\.tgz(?:#|$)/,(t,e)=>kQ({protocol:\"npm:\",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],zI=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let s=K.join(e.cwd,Er.lockfile);if(!le.existsSync(s))return;let a=await le.readFilePromise(s,\"utf8\"),n=ls(a);if(Object.hasOwn(n,\"__metadata\"))return;let c=this.resolutions=new Map;for(let f of Object.keys(n)){let p=ev(f);if(!p){r.reportWarning(14,`Failed to parse the string \"${f}\" into a proper descriptor`);continue}let h=ul(p.range)?On(p,`npm:${p.range}`):p,{version:E,resolved:C}=n[f];if(!C)continue;let S;for(let[I,R]of wCt){let N=C.match(I);if(N){S=R(E,...N);break}}if(!S){r.reportWarning(14,`${ri(e.configuration,h)}: Only some patterns can be imported from legacy lockfiles (not \"${C}\")`);continue}let P=h;try{let I=em(h.range),R=ev(I.selector,!0);R&&(P=R)}catch{}c.set(h.descriptorHash,Ys(P,S))}}supportsDescriptor(e,r){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error(\"Assertion failed: This resolver doesn't support resolving locators to packages\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!this.resolutions)throw new Error(\"Assertion failed: The resolution store should have been setup\");let a=this.resolutions.get(e.descriptorHash);if(!a)throw new Error(\"Assertion failed: The resolution should have been registered\");let n=V8(a),c=s.project.configuration.normalizeDependency(n);return await this.resolver.getCandidates(c,r,s)}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){throw new Error(\"Assertion failed: This resolver doesn't support resolving locators to packages\")}}});var uA,mCe=It(()=>{Fc();Fv();Qc();uA=class extends ho{constructor({configuration:r,stdout:s,suggestInstall:a=!0}){super();this.errorCount=0;YB(this,{configuration:r}),this.configuration=r,this.stdout=s,this.suggestInstall=a}static async start(r,s){let a=new this(r);try{await s(a)}catch(n){a.reportExceptionOnce(n)}finally{await a.finalize()}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){}reportCacheMiss(r){}startSectionSync(r,s){return s()}async startSectionPromise(r,s){return await s()}startTimerSync(r,s,a){return(typeof s==\"function\"?s:a)()}async startTimerPromise(r,s,a){return await(typeof s==\"function\"?s:a)()}reportSeparator(){}reportInfo(r,s){}reportWarning(r,s){}reportError(r,s){this.errorCount+=1,this.stdout.write(`${Ut(this.configuration,\"\\u27A4\",\"redBright\")} ${this.formatNameWithHyperlink(r)}: ${s}\n`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,s){}async finalize(){this.errorCount>0&&(this.stdout.write(`\n`),this.stdout.write(`${Ut(this.configuration,\"\\u27A4\",\"redBright\")} Errors happened when preparing the environment required to run this command.\n`),this.suggestInstall&&this.stdout.write(`${Ut(this.configuration,\"\\u27A4\",\"redBright\")} This might be caused by packages being missing from the lockfile, in which case running \"yarn install\" might help.\n`))}formatNameWithHyperlink(r){return m6(r,{configuration:this.configuration,json:!1})}}});var ZI,fG=It(()=>{Yo();ZI=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(bQ(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error(\"The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){let a=s.project.storedResolutions.get(e.descriptorHash);if(a){let c=s.project.originalPackages.get(a);if(c)return[c]}let n=s.project.originalPackages.get(bQ(e).locatorHash);if(n)return[n];throw new Error(\"Resolution expected from the lockfile data\")}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.originalPackages.get(e.locatorHash);if(!s)throw new Error(\"The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache\");return s}}});function Xp(){}function BCt(t,e,r,s,a){for(var n=0,c=e.length,f=0,p=0;n<c;n++){var h=e[n];if(h.removed){if(h.value=t.join(s.slice(p,p+h.count)),p+=h.count,n&&e[n-1].added){var C=e[n-1];e[n-1]=e[n],e[n]=C}}else{if(!h.added&&a){var E=r.slice(f,f+h.count);E=E.map(function(P,I){var R=s[p+I];return R.length>P.length?R:P}),h.value=t.join(E)}else h.value=t.join(r.slice(f,f+h.count));f+=h.count,h.added||(p+=h.count)}}var S=e[c-1];return c>1&&typeof S.value==\"string\"&&(S.added||S.removed)&&t.equals(\"\",S.value)&&(e[c-2].value+=S.value,e.pop()),e}function vCt(t){return{newPos:t.newPos,components:t.components.slice(0)}}function SCt(t,e){if(typeof t==\"function\")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function ICe(t,e,r){return r=SCt(r,{ignoreWhitespace:!0}),dG.diff(t,e,r)}function DCt(t,e,r){return mG.diff(t,e,r)}function jR(t){\"@babel/helpers - typeof\";return typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?jR=function(e){return typeof e}:jR=function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},jR(t)}function AG(t){return xCt(t)||kCt(t)||QCt(t)||TCt()}function xCt(t){if(Array.isArray(t))return pG(t)}function kCt(t){if(typeof Symbol<\"u\"&&Symbol.iterator in Object(t))return Array.from(t)}function QCt(t,e){if(t){if(typeof t==\"string\")return pG(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r===\"Object\"&&t.constructor&&(r=t.constructor.name),r===\"Map\"||r===\"Set\")return Array.from(t);if(r===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pG(t,e)}}function pG(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function TCt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hG(t,e,r,s,a){e=e||[],r=r||[],s&&(t=s(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var c;if(RCt.call(t)===\"[object Array]\"){for(e.push(t),c=new Array(t.length),r.push(c),n=0;n<t.length;n+=1)c[n]=hG(t[n],e,r,s,a);return e.pop(),r.pop(),c}if(t&&t.toJSON&&(t=t.toJSON()),jR(t)===\"object\"&&t!==null){e.push(t),c={},r.push(c);var f=[],p;for(p in t)t.hasOwnProperty(p)&&f.push(p);for(f.sort(),n=0;n<f.length;n+=1)p=f[n],c[p]=hG(t[p],e,r,s,p);e.pop(),r.pop()}else c=t;return c}function CCe(t,e,r,s,a,n,c){c||(c={}),typeof c.context>\"u\"&&(c.context=4);var f=DCt(r,s,c);if(!f)return;f.push({value:\"\",lines:[]});function p(U){return U.map(function(W){return\" \"+W})}for(var h=[],E=0,C=0,S=[],P=1,I=1,R=function(W){var te=f[W],ie=te.lines||te.value.replace(/\\n$/,\"\").split(`\n`);if(te.lines=ie,te.added||te.removed){var Ae;if(!E){var ce=f[W-1];E=P,C=I,ce&&(S=c.context>0?p(ce.lines.slice(-c.context)):[],E-=S.length,C-=S.length)}(Ae=S).push.apply(Ae,AG(ie.map(function(fe){return(te.added?\"+\":\"-\")+fe}))),te.added?I+=ie.length:P+=ie.length}else{if(E)if(ie.length<=c.context*2&&W<f.length-2){var me;(me=S).push.apply(me,AG(p(ie)))}else{var pe,Be=Math.min(ie.length,c.context);(pe=S).push.apply(pe,AG(p(ie.slice(0,Be))));var Ce={oldStart:E,oldLines:P-E+Be,newStart:C,newLines:I-C+Be,lines:S};if(W>=f.length-2&&ie.length<=c.context){var g=/\\n$/.test(r),we=/\\n$/.test(s),Ee=ie.length==0&&S.length>Ce.oldLines;!g&&Ee&&r.length>0&&S.splice(Ce.oldLines,0,\"\\\\ No newline at end of file\"),(!g&&!Ee||!we)&&S.push(\"\\\\ No newline at end of file\")}h.push(Ce),E=0,C=0,S=[]}P+=ie.length,I+=ie.length}},N=0;N<f.length;N++)R(N);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var Btr,yCe,ECe,dG,mG,bCt,PCt,RCt,rS,gG,yG=It(()=>{Xp.prototype={diff:function(e,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.callback;typeof s==\"function\"&&(a=s,s={}),this.options=s;var n=this;function c(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=e.length,h=1,E=f+p;s.maxEditLength&&(E=Math.min(E,s.maxEditLength));var C=[{newPos:-1,components:[]}],S=this.extractCommon(C[0],r,e,0);if(C[0].newPos+1>=f&&S+1>=p)return c([{value:this.join(r),count:r.length}]);function P(){for(var R=-1*h;R<=h;R+=2){var N=void 0,U=C[R-1],W=C[R+1],te=(W?W.newPos:0)-R;U&&(C[R-1]=void 0);var ie=U&&U.newPos+1<f,Ae=W&&0<=te&&te<p;if(!ie&&!Ae){C[R]=void 0;continue}if(!ie||Ae&&U.newPos<W.newPos?(N=vCt(W),n.pushComponent(N.components,void 0,!0)):(N=U,N.newPos++,n.pushComponent(N.components,!0,void 0)),te=n.extractCommon(N,r,e,R),N.newPos+1>=f&&te+1>=p)return c(BCt(n,N.components,r,e,n.useLongestToken));C[R]=N}h++}if(a)(function R(){setTimeout(function(){if(h>E)return a();P()||R()},0)})();else for(;h<=E;){var I=P();if(I)return I}},pushComponent:function(e,r,s){var a=e[e.length-1];a&&a.added===r&&a.removed===s?e[e.length-1]={count:a.count+1,added:r,removed:s}:e.push({count:1,added:r,removed:s})},extractCommon:function(e,r,s,a){for(var n=r.length,c=s.length,f=e.newPos,p=f-a,h=0;f+1<n&&p+1<c&&this.equals(r[f+1],s[p+1]);)f++,p++,h++;return h&&e.components.push({count:h}),e.newPos=f,p},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],s=0;s<e.length;s++)e[s]&&r.push(e[s]);return r},castInput:function(e){return e},tokenize:function(e){return e.split(\"\")},join:function(e){return e.join(\"\")}};Btr=new Xp;yCe=/^[A-Za-z\\xC0-\\u02C6\\u02C8-\\u02D7\\u02DE-\\u02FF\\u1E00-\\u1EFF]+$/,ECe=/\\S/,dG=new Xp;dG.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!ECe.test(t)&&!ECe.test(e)};dG.tokenize=function(t){for(var e=t.split(/([^\\S\\r\\n]+|[()[\\]{}'\"\\r\\n]|\\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&yCe.test(e[r])&&yCe.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};mG=new Xp;mG.tokenize=function(t){var e=[],r=t.split(/(\\n|\\r\\n)/);r[r.length-1]||r.pop();for(var s=0;s<r.length;s++){var a=r[s];s%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};bCt=new Xp;bCt.tokenize=function(t){return t.split(/(\\S.+?[.!?])(?=\\s+|$)/)};PCt=new Xp;PCt.tokenize=function(t){return t.split(/([{}:;,]|\\s+)/)};RCt=Object.prototype.toString,rS=new Xp;rS.useLongestToken=!0;rS.tokenize=mG.tokenize;rS.castInput=function(t){var e=this.options,r=e.undefinedReplacement,s=e.stringifyReplacer,a=s===void 0?function(n,c){return typeof c>\"u\"?r:c}:s;return typeof t==\"string\"?t:JSON.stringify(hG(t,null,null,a),a,\"  \")};rS.equals=function(t,e){return Xp.prototype.equals.call(rS,t.replace(/,([\\r\\n])/g,\"$1\"),e.replace(/,([\\r\\n])/g,\"$1\"))};gG=new Xp;gG.tokenize=function(t){return t.slice()};gG.join=gG.removeEmpty=function(t){return t}});var BCe=L((Str,wCe)=>{var FCt=xc(),NCt=aI(),OCt=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,LCt=/^\\w*$/;function MCt(t,e){if(FCt(t))return!1;var r=typeof t;return r==\"number\"||r==\"symbol\"||r==\"boolean\"||t==null||NCt(t)?!0:LCt.test(t)||!OCt.test(t)||e!=null&&t in Object(e)}wCe.exports=MCt});var DCe=L((Dtr,SCe)=>{var vCe=kk(),_Ct=\"Expected a function\";function EG(t,e){if(typeof t!=\"function\"||e!=null&&typeof e!=\"function\")throw new TypeError(_Ct);var r=function(){var s=arguments,a=e?e.apply(this,s):s[0],n=r.cache;if(n.has(a))return n.get(a);var c=t.apply(this,s);return r.cache=n.set(a,c)||n,c};return r.cache=new(EG.Cache||vCe),r}EG.Cache=vCe;SCe.exports=EG});var PCe=L((btr,bCe)=>{var UCt=DCe(),HCt=500;function jCt(t){var e=UCt(t,function(s){return r.size===HCt&&r.clear(),s}),r=e.cache;return e}bCe.exports=jCt});var IG=L((Ptr,xCe)=>{var qCt=PCe(),GCt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,WCt=/\\\\(\\\\)?/g,YCt=qCt(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(\"\"),t.replace(GCt,function(r,s,a,n){e.push(a?n.replace(WCt,\"$1\"):s||r)}),e});xCe.exports=YCt});var wm=L((xtr,kCe)=>{var VCt=xc(),KCt=BCe(),JCt=IG(),zCt=Tv();function ZCt(t,e){return VCt(t)?t:KCt(t,e)?[t]:JCt(zCt(t))}kCe.exports=ZCt});var XI=L((ktr,QCe)=>{var XCt=aI(),$Ct=1/0;function ewt(t){if(typeof t==\"string\"||XCt(t))return t;var e=t+\"\";return e==\"0\"&&1/t==-$Ct?\"-0\":e}QCe.exports=ewt});var qR=L((Qtr,TCe)=>{var twt=wm(),rwt=XI();function nwt(t,e){e=twt(e,t);for(var r=0,s=e.length;t!=null&&r<s;)t=t[rwt(e[r++])];return r&&r==s?t:void 0}TCe.exports=nwt});var CG=L((Ttr,FCe)=>{var iwt=Yk(),swt=wm(),owt=NB(),RCe=Wl(),awt=XI();function lwt(t,e,r,s){if(!RCe(t))return t;e=swt(e,t);for(var a=-1,n=e.length,c=n-1,f=t;f!=null&&++a<n;){var p=awt(e[a]),h=r;if(p===\"__proto__\"||p===\"constructor\"||p===\"prototype\")return t;if(a!=c){var E=f[p];h=s?s(E,p,f):void 0,h===void 0&&(h=RCe(E)?E:owt(e[a+1])?[]:{})}iwt(f,p,h),f=f[p]}return t}FCe.exports=lwt});var OCe=L((Rtr,NCe)=>{var cwt=qR(),uwt=CG(),fwt=wm();function Awt(t,e,r){for(var s=-1,a=e.length,n={};++s<a;){var c=e[s],f=cwt(t,c);r(f,c)&&uwt(n,fwt(c,t),f)}return n}NCe.exports=Awt});var MCe=L((Ftr,LCe)=>{function pwt(t,e){return t!=null&&e in Object(t)}LCe.exports=pwt});var wG=L((Ntr,_Ce)=>{var hwt=wm(),gwt=TB(),dwt=xc(),mwt=NB(),ywt=Nk(),Ewt=XI();function Iwt(t,e,r){e=hwt(e,t);for(var s=-1,a=e.length,n=!1;++s<a;){var c=Ewt(e[s]);if(!(n=t!=null&&r(t,c)))break;t=t[c]}return n||++s!=a?n:(a=t==null?0:t.length,!!a&&ywt(a)&&mwt(c,a)&&(dwt(t)||gwt(t)))}_Ce.exports=Iwt});var HCe=L((Otr,UCe)=>{var Cwt=MCe(),wwt=wG();function Bwt(t,e){return t!=null&&wwt(t,e,Cwt)}UCe.exports=Bwt});var qCe=L((Ltr,jCe)=>{var vwt=OCe(),Swt=HCe();function Dwt(t,e){return vwt(t,e,function(r,s){return Swt(t,s)})}jCe.exports=Dwt});var VCe=L((Mtr,YCe)=>{var GCe=Yd(),bwt=TB(),Pwt=xc(),WCe=GCe?GCe.isConcatSpreadable:void 0;function xwt(t){return Pwt(t)||bwt(t)||!!(WCe&&t&&t[WCe])}YCe.exports=xwt});var zCe=L((_tr,JCe)=>{var kwt=Rk(),Qwt=VCe();function KCe(t,e,r,s,a){var n=-1,c=t.length;for(r||(r=Qwt),a||(a=[]);++n<c;){var f=t[n];e>0&&r(f)?e>1?KCe(f,e-1,r,s,a):kwt(a,f):s||(a[a.length]=f)}return a}JCe.exports=KCe});var XCe=L((Utr,ZCe)=>{var Twt=zCe();function Rwt(t){var e=t==null?0:t.length;return e?Twt(t,1):[]}ZCe.exports=Rwt});var BG=L((Htr,$Ce)=>{var Fwt=XCe(),Nwt=i3(),Owt=s3();function Lwt(t){return Owt(Nwt(t,void 0,Fwt),t+\"\")}$Ce.exports=Lwt});var vG=L((jtr,ewe)=>{var Mwt=qCe(),_wt=BG(),Uwt=_wt(function(t,e){return t==null?{}:Mwt(t,e)});ewe.exports=Uwt});var GR,twe=It(()=>{Fc();GR=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return this.resolver.supportsDescriptor(e,r)}supportsLocator(e,r){return this.resolver.supportsLocator(e,r)}shouldPersistResolution(e,r){return this.resolver.shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.resolver.bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run \"yarn install\" to update the lockfile`)}async getSatisfying(e,r,s,a){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run \"yarn install\" to update the lockfile`)}async resolve(e,r){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run \"yarn install\" to update the lockfile`)}}});var Wi,SG=It(()=>{Fc();Wi=class extends ho{reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,r){return r()}async startSectionPromise(e,r){return await r()}startTimerSync(e,r,s){return(typeof r==\"function\"?r:s)()}async startTimerPromise(e,r,s){return await(typeof r==\"function\"?r:s)()}reportSeparator(){}reportInfo(e,r){}reportWarning(e,r){}reportError(e,r){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(let{}of e);}),stop:()=>{}}}reportJson(e){}reportFold(e,r){}async finalize(){}}});var rwe,$I,DG=It(()=>{bt();rwe=et(BQ());oI();tm();Qc();I0();Np();Yo();$I=class{constructor(e,{project:r}){this.workspacesCwds=new Set;this.project=r,this.cwd=e}async setup(){this.manifest=await Ht.tryFind(this.cwd)??new Ht,this.relativeCwd=K.relative(this.project.cwd,this.cwd)||vt.dot;let e=this.manifest.name?this.manifest.name:ba(null,`${this.computeCandidateName()}-${us(this.relativeCwd).substring(0,6)}`);this.anchoredDescriptor=On(e,`${yi.protocol}${this.relativeCwd}`),this.anchoredLocator=Ys(e,`${yi.protocol}${this.relativeCwd}`);let r=this.manifest.workspaceDefinitions.map(({pattern:a})=>a);if(r.length===0)return;let s=await(0,rwe.default)(r,{cwd:ue.fromPortablePath(this.cwd),onlyDirectories:!0,ignore:[\"**/node_modules\",\"**/.git\",\"**/.yarn\"]});s.sort(),await s.reduce(async(a,n)=>{let c=K.resolve(this.cwd,ue.toPortablePath(n)),f=await le.existsPromise(K.join(c,\"package.json\"));await a,f&&this.workspacesCwds.add(c)},Promise.resolve())}get anchoredPackage(){let e=this.project.storedPackages.get(this.anchoredLocator.locatorHash);if(!e)throw new Error(`Assertion failed: Expected workspace ${rv(this.project.configuration,this)} (${Ut(this.project.configuration,K.join(this.cwd,Er.manifest),Ct.PATH)}) to have been resolved. Run \"yarn install\" to update the lockfile`);return e}accepts(e){let r=e.indexOf(\":\"),s=r!==-1?e.slice(0,r+1):null,a=r!==-1?e.slice(r+1):e;if(s===yi.protocol&&K.normalize(a)===this.relativeCwd||s===yi.protocol&&(a===\"*\"||a===\"^\"||a===\"~\"))return!0;let n=ul(a);return n?s===yi.protocol?n.test(this.manifest.version??\"0.0.0\"):this.project.configuration.get(\"enableTransparentWorkspaces\")&&this.manifest.version!==null?n.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?\"root-workspace\":`${K.basename(this.cwd)}`||\"unnamed-workspace\"}getRecursiveWorkspaceDependencies({dependencies:e=Ht.hardDependencies}={}){let r=new Set,s=a=>{for(let n of e)for(let c of a.manifest[n].values()){let f=this.project.tryWorkspaceByDescriptor(c);f===null||r.has(f)||(r.add(f),s(f))}};return s(this),r}getRecursiveWorkspaceDependents({dependencies:e=Ht.hardDependencies}={}){let r=new Set,s=a=>{for(let n of this.project.workspaces)e.some(f=>[...n.manifest[f].values()].some(p=>{let h=this.project.tryWorkspaceByDescriptor(p);return h!==null&&$B(h.anchoredLocator,a.anchoredLocator)}))&&!r.has(n)&&(r.add(n),s(n))};return s(this),r}getRecursiveWorkspaceChildren(){let e=new Set([this]);for(let r of e)for(let s of r.workspacesCwds){let a=this.project.workspacesByCwd.get(s);a&&e.add(a)}return e.delete(this),Array.from(e)}async persistManifest(){let e={};this.manifest.exportTo(e);let r=K.join(this.cwd,Ht.fileName),s=`${JSON.stringify(e,null,this.manifest.indent)}\n`;await le.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=e}}});function Ywt({project:t,allDescriptors:e,allResolutions:r,allPackages:s,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:c=new Map,peerWarnings:f=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,C=[],S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=new Map(t.workspaces.map(ce=>{let me=ce.anchoredLocator.locatorHash,pe=s.get(me);if(typeof pe>\"u\")throw new Error(\"Assertion failed: The workspace should have an associated package\");return[me,zB(pe)]})),W=()=>{let ce=le.mktempSync(),me=K.join(ce,\"stacktrace.log\"),pe=String(C.length+1).length,Be=C.map((Ce,g)=>`${`${g+1}.`.padStart(pe,\" \")} ${cl(Ce)}\n`).join(\"\");throw le.writeFileSync(me,Be),le.detachTemp(ce),new Yt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${ue.fromPortablePath(me)}`)},te=ce=>{let me=r.get(ce.descriptorHash);if(typeof me>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");let pe=s.get(me);if(!pe)throw new Error(\"Assertion failed: The package could not be found\");return pe},ie=(ce,me,pe,{top:Be,optional:Ce})=>{C.length>1e3&&W(),C.push(me);let g=Ae(ce,me,pe,{top:Be,optional:Ce});return C.pop(),g},Ae=(ce,me,pe,{top:Be,optional:Ce})=>{if(Ce||n.delete(me.locatorHash),a.has(me.locatorHash))return;a.add(me.locatorHash);let g=s.get(me.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${Yr(t.configuration,me)}) should have been registered`);let we=new Set,Ee=new Map,fe=[],se=[],X=[],De=[];for(let Re of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Re.identHash)&&g.locatorHash!==Be)continue;if(Tp(Re))throw new Error(\"Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch\");h.delete(Re.descriptorHash);let gt=Ce;if(!gt){let ke=g.dependenciesMeta.get(cn(Re));if(typeof ke<\"u\"){let it=ke.get(null);typeof it<\"u\"&&it.optional&&(gt=!0)}}let j=r.get(Re.descriptorHash);if(!j)throw new Error(`Assertion failed: The resolution (${ri(t.configuration,Re)}) should have been registered`);let rt=U.get(j)||s.get(j);if(!rt)throw new Error(`Assertion failed: The package (${j}, resolved from ${ri(t.configuration,Re)}) should have been registered`);if(rt.peerDependencies.size===0){ie(Re,rt,new Map,{top:Be,optional:gt});continue}let Fe,Ne,Pe=new Set,Ye=new Map;fe.push(()=>{Fe=J8(Re,me.locatorHash),Ne=z8(rt,me.locatorHash),g.dependencies.set(Re.identHash,Fe),r.set(Fe.descriptorHash,Ne.locatorHash),e.set(Fe.descriptorHash,Fe),s.set(Ne.locatorHash,Ne),xp(R,Ne.locatorHash).add(Fe.descriptorHash),we.add(Ne.locatorHash)}),se.push(()=>{N.set(Ne.locatorHash,Ye);for(let ke of Ne.peerDependencies.values()){let _e=Vl(Ee,ke.identHash,()=>{let x=pe.get(ke.identHash)??null,w=g.dependencies.get(ke.identHash);return!w&&XB(me,ke)&&(ce.identHash===me.identHash?w=ce:(w=On(me,ce.range),e.set(w.descriptorHash,w),r.set(w.descriptorHash,me.locatorHash),h.delete(w.descriptorHash),x=null)),w||(w=On(ke,\"missing:\")),{subject:me,ident:ke,provided:w,root:!x,requests:new Map,hash:`p${us(me.locatorHash,ke.identHash).slice(0,5)}`}}).provided;if(_e.range===\"missing:\"&&Ne.dependencies.has(ke.identHash)){Ne.peerDependencies.delete(ke.identHash);continue}if(Ye.set(ke.identHash,{requester:Ne,descriptor:ke,meta:Ne.peerDependenciesMeta.get(cn(ke)),children:new Map}),Ne.dependencies.set(ke.identHash,_e),Tp(_e)){let x=r.get(_e.descriptorHash);xp(I,x).add(Ne.locatorHash)}S.set(_e.identHash,_e),_e.range===\"missing:\"&&Pe.add(_e.identHash)}Ne.dependencies=new Map(Ws(Ne.dependencies,([ke,it])=>cn(it)))}),X.push(()=>{if(!s.has(Ne.locatorHash))return;let ke=E.get(rt.locatorHash);typeof ke==\"number\"&&ke>=2&&W();let it=E.get(rt.locatorHash),_e=typeof it<\"u\"?it+1:1;E.set(rt.locatorHash,_e),ie(Fe,Ne,Ye,{top:Be,optional:gt}),E.set(rt.locatorHash,_e-1)}),De.push(()=>{let ke=r.get(Fe.descriptorHash);if(typeof ke>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let it=N.get(ke);if(typeof it>\"u\")throw new Error(\"Assertion failed: Expected the peer requests to be registered\");for(let _e of Ee.values()){let x=it.get(_e.ident.identHash);x&&(_e.requests.set(Fe.descriptorHash,x),p.set(_e.hash,_e),_e.root||pe.get(_e.ident.identHash)?.children.set(Fe.descriptorHash,x))}if(s.has(Ne.locatorHash))for(let _e of Pe)Ne.dependencies.delete(_e)})}for(let Re of[...fe,...se])Re();for(let Re of we){we.delete(Re);let gt=s.get(Re),j=us(rI(gt).locatorHash,...Array.from(gt.dependencies.values(),Pe=>{let Ye=Pe.range!==\"missing:\"?r.get(Pe.descriptorHash):\"missing:\";if(typeof Ye>\"u\")throw new Error(`Assertion failed: Expected the resolution for ${ri(t.configuration,Pe)} to have been registered`);return Ye===Be?`${Ye} (top)`:Ye})),rt=P.get(j);if(typeof rt>\"u\"){P.set(j,gt);continue}let Fe=xp(R,rt.locatorHash);for(let Pe of R.get(gt.locatorHash)??[])r.set(Pe,rt.locatorHash),Fe.add(Pe);s.delete(gt.locatorHash),a.delete(gt.locatorHash),we.delete(gt.locatorHash);let Ne=I.get(gt.locatorHash);if(Ne!==void 0){let Pe=xp(I,rt.locatorHash);for(let Ye of Ne)Pe.add(Ye),we.add(Ye)}}for(let Re of[...X,...De])Re()};for(let ce of t.workspaces){let me=ce.anchoredLocator;h.delete(ce.anchoredDescriptor.descriptorHash),ie(ce.anchoredDescriptor,me,new Map,{top:me.locatorHash,optional:!1})}for(let ce of p.values()){if(!ce.root)continue;let me=s.get(ce.subject.locatorHash);if(typeof me>\"u\")continue;for(let Be of ce.requests.values()){let Ce=`p${us(ce.subject.locatorHash,cn(ce.ident),Be.requester.locatorHash).slice(0,5)}`;c.set(Ce,{subject:ce.subject.locatorHash,requested:ce.ident,rootRequester:Be.requester.locatorHash,allRequesters:Array.from(nv(Be),g=>g.requester.locatorHash)})}let pe=[...nv(ce)];if(ce.provided.range!==\"missing:\"){let Be=te(ce.provided),Ce=Be.version??\"0.0.0\",g=Ee=>{if(Ee.startsWith(yi.protocol)){if(!t.tryWorkspaceByLocator(Be))return null;Ee=Ee.slice(yi.protocol.length),(Ee===\"^\"||Ee===\"~\")&&(Ee=\"*\")}return Ee},we=!0;for(let Ee of pe){let fe=g(Ee.descriptor.range);if(fe===null){we=!1;continue}if(!eA(Ce,fe)){we=!1;let se=`p${us(ce.subject.locatorHash,cn(ce.ident),Ee.requester.locatorHash).slice(0,5)}`;f.push({type:1,subject:me,requested:ce.ident,requester:Ee.requester,version:Ce,hash:se,requirementCount:pe.length})}}if(!we){let Ee=pe.map(fe=>g(fe.descriptor.range));f.push({type:3,node:ce,range:Ee.includes(null)?null:$8(Ee),hash:ce.hash})}}else{let Be=!0;for(let Ce of pe)if(!Ce.meta?.optional){Be=!1;let g=`p${us(ce.subject.locatorHash,cn(ce.ident),Ce.requester.locatorHash).slice(0,5)}`;f.push({type:0,subject:me,requested:ce.ident,requester:Ce.requester,hash:g})}Be||f.push({type:2,node:ce,hash:ce.hash})}}}function*Vwt(t){let e=new Map;if(\"children\"in t)e.set(t,t);else for(let r of t.requests.values())e.set(r,r);for(let[r,s]of e){yield{request:r,root:s};for(let a of r.children.values())e.has(a)||e.set(a,s)}}function Kwt(t,e){let r=[],s=[],a=!1;for(let n of t.peerWarnings)if(!(n.type===1||n.type===0)){if(!t.tryWorkspaceByLocator(n.node.subject)){a=!0;continue}if(n.type===3){let c=t.storedResolutions.get(n.node.provided.descriptorHash);if(typeof c>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let f=t.storedPackages.get(c);if(typeof f>\"u\")throw new Error(\"Assertion failed: Expected the package to be registered\");let p=p0(Vwt(n.node),({request:C,root:S})=>eA(f.version??\"0.0.0\",C.descriptor.range)?p0.skip:C===S?$i(t.configuration,C.requester):`${$i(t.configuration,C.requester)} (via ${$i(t.configuration,S.requester)})`),h=[...nv(n.node)].length>1?\"and other dependencies request\":\"requests\",E=n.range?iI(t.configuration,n.range):Ut(t.configuration,\"but they have non-overlapping ranges!\",\"redBright\");r.push(`${$i(t.configuration,n.node.ident)} is listed by your project with version ${tv(t.configuration,f.version??\"0.0.0\")} (${Ut(t.configuration,n.hash,Ct.CODE)}), which doesn't satisfy what ${p} ${h} (${E}).`)}if(n.type===2){let c=n.node.requests.size>1?\" and other dependencies\":\"\";s.push(`${Yr(t.configuration,n.node.subject)} doesn't provide ${$i(t.configuration,n.node.ident)} (${Ut(t.configuration,n.hash,Ct.CODE)}), requested by ${$i(t.configuration,n.node.requests.values().next().value.requester)}${c}.`)}}e.startSectionSync({reportFooter:()=>{e.reportWarning(86,`Some peer dependencies are incorrectly met by your project; run ${Ut(t.configuration,\"yarn explain peer-requirements <hash>\",Ct.CODE)} for details, where ${Ut(t.configuration,\"<hash>\",Ct.CODE)} is the six-letter p-prefixed code.`)},skipIfEmpty:!0},()=>{for(let n of Ws(r,c=>KE.default(c)))e.reportWarning(60,n);for(let n of Ws(s,c=>KE.default(c)))e.reportWarning(2,n)}),a&&e.reportWarning(86,`Some peer dependencies are incorrectly met by dependencies; run ${Ut(t.configuration,\"yarn explain peer-requirements\",Ct.CODE)} for details.`)}var WR,YR,VR,swe,xG,PG,kG,KR,Hwt,jwt,nwe,qwt,Gwt,Wwt,ec,bG,JR,iwe,Tt,owe=It(()=>{bt();bt();Bc();Wt();WR=ye(\"crypto\");yG();YR=et(vG()),VR=et(Md()),swe=et(fi()),xG=ye(\"util\"),PG=et(ye(\"v8\")),kG=et(ye(\"zlib\"));cG();Cv();uG();fG();oI();iH();Fc();twe();Fv();SG();tm();DG();LQ();Qc();I0();kc();gT();w6();Np();Yo();KR=YE(process.env.YARN_LOCKFILE_VERSION_OVERRIDE??8),Hwt=3,jwt=/ *, */g,nwe=/\\/$/,qwt=32,Gwt=(0,xG.promisify)(kG.default.gzip),Wwt=(0,xG.promisify)(kG.default.gunzip),ec=(r=>(r.UpdateLockfile=\"update-lockfile\",r.SkipBuild=\"skip-build\",r))(ec||{}),bG={restoreLinkersCustomData:[\"linkersCustomData\"],restoreResolutions:[\"accessibleLocators\",\"conditionalLocators\",\"disabledLocators\",\"optionalBuilds\",\"storedDescriptors\",\"storedResolutions\",\"storedPackages\",\"lockFileChecksum\"],restoreBuildState:[\"skippedBuilds\",\"storedBuildState\"]},JR=(a=>(a[a.NotProvided=0]=\"NotProvided\",a[a.NotCompatible=1]=\"NotCompatible\",a[a.NodeNotProvided=2]=\"NodeNotProvided\",a[a.NodeNotCompatible=3]=\"NodeNotCompatible\",a))(JR||{}),iwe=t=>us(`${Hwt}`,t),Tt=class t{constructor(e,{configuration:r}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.skippedBuilds=new Set;this.lockfileLastVersion=null;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.peerWarnings=[];this.peerRequirementNodes=new Map;this.linkersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=e}static async find(e,r){if(!e.projectCwd)throw new nt(`No project found in ${r}`);let s=e.projectCwd,a=r,n=null;for(;n!==e.projectCwd;){if(n=a,le.existsSync(K.join(n,Er.manifest))){s=n;break}a=K.dirname(n)}let c=new t(e.projectCwd,{configuration:e});ze.telemetry?.reportProject(c.cwd),await c.setupResolutions(),await c.setupWorkspaces(),ze.telemetry?.reportWorkspaceCount(c.workspaces.length),ze.telemetry?.reportDependencyCount(c.workspaces.reduce((I,R)=>I+R.manifest.dependencies.size+R.manifest.devDependencies.size,0));let f=c.tryWorkspaceByCwd(s);if(f)return{project:c,workspace:f,locator:f.anchoredLocator};let p=await c.findLocatorForLocation(`${s}/`,{strict:!0});if(p)return{project:c,locator:p,workspace:null};let h=Ut(e,c.cwd,Ct.PATH),E=Ut(e,K.relative(c.cwd,s),Ct.PATH),C=`- If ${h} isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,S=`- If ${h} is intended to be a project, it might be that you forgot to list ${E} in its workspace configuration.`,P=`- Finally, if ${h} is fine and you intend ${E} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new nt(`The nearest package directory (${Ut(e,s,Ct.PATH)}) doesn't seem to be part of the project declared in ${Ut(e,c.cwd,Ct.PATH)}.\n\n${[C,S,P].join(`\n`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=K.join(this.cwd,Er.lockfile),r=this.configuration.get(\"defaultLanguageName\");if(le.existsSync(e)){let s=await le.readFilePromise(e,\"utf8\");this.lockFileChecksum=iwe(s);let a=ls(s);if(a.__metadata){let n=a.__metadata.version,c=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<KR;for(let f of Object.keys(a)){if(f===\"__metadata\")continue;let p=a[f];if(typeof p.resolution>\"u\")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let h=Rp(p.resolution,!0),E=new Ht;E.load(p,{yamlCompatibilityMode:!0});let C=E.version,S=E.languageName||r,P=p.linkType.toUpperCase(),I=p.conditions??null,R=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,W=E.peerDependenciesMeta,te=E.bin;if(p.checksum!=null){let Ae=typeof c<\"u\"&&!p.checksum.includes(\"/\")?`${c}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,Ae)}let ie={...h,version:C,languageName:S,linkType:P,conditions:I,dependencies:R,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:W,bin:te};this.originalPackages.set(ie.locatorHash,ie);for(let Ae of f.split(jwt)){let ce=C0(Ae);n<=6&&(ce=this.configuration.normalizeDependency(ce),ce=On(ce,ce.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,\"$1npm%3A\"))),this.storedDescriptors.set(ce.descriptorHash,ce),this.storedResolutions.set(ce.descriptorHash,h.locatorHash)}}}else s.includes(\"yarn lockfile v1\")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,VR.default)(4),s=async(a,n)=>{if(e.has(n))return a;e.add(n);let c=new $I(n,{project:this});await r(()=>c.setup());let f=a.then(()=>{this.addWorkspace(c)});return Array.from(c.workspacesCwds).reduce(s,f)};await s(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<\"u\")throw new Error(`Duplicate workspace name ${$i(this.configuration,e.anchoredLocator)}: ${ue.fromPortablePath(e.cwd)} conflicts with ${ue.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){K.isAbsolute(e)||(e=K.resolve(this.cwd,e)),e=K.normalize(e).replace(/\\/+$/,\"\");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let s of this.workspaces)K.relative(s.cwd,e).startsWith(\"../\")||r&&r.cwd.length>=s.cwd.length||(r=s);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>\"u\"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${$i(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(yi.protocol)){let s=e.range.slice(yi.protocol.length);if(s!==\"^\"&&s!==\"~\"&&s!==\"*\"&&!ul(s))return this.tryWorkspaceByCwd(s)}let r=this.tryWorkspaceByIdent(e);return r===null||(Tp(e)&&(e=ZB(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${ri(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Gu(e)&&(e=rI(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${Yr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if(\"descriptorHash\"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let s=new Set(this.storedResolutions.values());typeof r<\"u\"&&!s.has(r)&&this.deleteLocator(r)}if(\"locatorHash\"in e){this.deleteLocator(e.locatorHash);for(let[r,s]of this.storedResolutions)s===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[s,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(s)}for(let s of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(s,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(s.locatorHash);let n=r.get(s.locatorHash);if(n){r.delete(s.locatorHash);for(let c of n)this.deleteDescriptor(c)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,s]of e.dependencies)Tp(s)&&e.dependencies.set(r,ZB(s))}getDependencyMeta(e,r){let s={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(cn(e));if(!n)return s;let c=n.get(null);if(c&&Object.assign(s,c),r===null||!swe.default.valid(r))return s;for(let[f,p]of n)f!==null&&f===r&&Object.assign(s,p);return s}async findLocatorForLocation(e,{strict:r=!1}={}){let s=new Wi,a=this.configuration.getLinkers(),n={project:this,report:s};for(let c of a){let f=await c.findPackageLocator(e,n);if(f){if(r&&(await c.findPackageLocation(f,n)).replace(nwe,\"\")!==e.replace(nwe,\"\"))continue;return f}}return null}async loadUserConfig(){let e=K.join(this.cwd,\".pnp.cjs\");await le.existsPromise(e)&&kp(e).setup();let r=K.join(this.cwd,\"yarn.config.cjs\");return await le.existsPromise(r)?kp(r):null}async preparePackage(e,{resolver:r,resolveOptions:s}){let a=await this.configuration.getPackageExtensions(),n=this.configuration.normalizePackage(e,{packageExtensions:a});for(let[c,f]of n.dependencies){let p=await this.configuration.reduceHook(E=>E.reduceDependency,f,this,n,f,{resolver:r,resolveOptions:s});if(!XB(f,p))throw new Error(\"Assertion failed: The descriptor ident cannot be changed through aliases\");let h=r.bindDescriptor(p,n,s);n.dependencies.set(c,h)}return n}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error(\"Workspaces must have been setup before calling this function\");this.forgetVirtualResolutions();let r=new Map(this.originalPackages),s=[];e.lockfileOnly||this.forgetTransientResolutions();let a=e.resolver||this.configuration.makeResolver(),n=new zI(a);await n.setup(this,{report:e.report});let c=e.lockfileOnly?[new GR(a)]:[n,a],f=new rm([new ZI(a),...c]),p=new rm([...c]),h=this.configuration.makeFetcher(),E=e.lockfileOnly?{project:this,report:e.report,resolver:f}:{project:this,report:e.report,resolver:f,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:h,cacheOptions:{mirrorWriteOnly:!0}}},C=new Map,S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=this.topLevelWorkspace.anchoredLocator,W=new Set,te=[],ie=Tj(),Ae=this.configuration.getSupportedArchitectures();await e.report.startProgressPromise(ho.progressViaTitle(),async se=>{let X=async rt=>{let Fe=await GE(async()=>await f.resolve(rt,E),ke=>`${Yr(this.configuration,rt)}: ${ke}`);if(!$B(rt,Fe))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${Yr(this.configuration,rt)} to ${Yr(this.configuration,Fe)})`);I.set(Fe.locatorHash,Fe),!r.delete(Fe.locatorHash)&&!this.tryWorkspaceByLocator(Fe)&&s.push(Fe);let Pe=await this.preparePackage(Fe,{resolver:f,resolveOptions:E}),Ye=Uu([...Pe.dependencies.values()].map(ke=>j(ke)));return te.push(Ye),Ye.catch(()=>{}),S.set(Pe.locatorHash,Pe),Pe},De=async rt=>{let Fe=R.get(rt.locatorHash);if(typeof Fe<\"u\")return Fe;let Ne=Promise.resolve().then(()=>X(rt));return R.set(rt.locatorHash,Ne),Ne},Re=async(rt,Fe)=>{let Ne=await j(Fe);return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,Ne.locatorHash),Ne},gt=async rt=>{se.setTitle(ri(this.configuration,rt));let Fe=this.resolutionAliases.get(rt.descriptorHash);if(typeof Fe<\"u\")return Re(rt,this.storedDescriptors.get(Fe));let Ne=f.getResolutionDependencies(rt,E),Pe=Object.fromEntries(await Uu(Object.entries(Ne).map(async([it,_e])=>{let x=f.bindDescriptor(_e,U,E),w=await j(x);return W.add(w.locatorHash),[it,w]}))),ke=(await GE(async()=>await f.getCandidates(rt,Pe,E),it=>`${ri(this.configuration,rt)}: ${it}`))[0];if(typeof ke>\"u\")throw new Yt(82,`${ri(this.configuration,rt)}: No candidates found`);if(e.checkResolutions){let{locators:it}=await p.getSatisfying(rt,Pe,[ke],{...E,resolver:p});if(!it.find(_e=>_e.locatorHash===ke.locatorHash))throw new Yt(78,`Invalid resolution ${VB(this.configuration,rt,ke)}`)}return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,ke.locatorHash),De(ke)},j=rt=>{let Fe=N.get(rt.descriptorHash);if(typeof Fe<\"u\")return Fe;C.set(rt.descriptorHash,rt);let Ne=Promise.resolve().then(()=>gt(rt));return N.set(rt.descriptorHash,Ne),Ne};for(let rt of this.workspaces){let Fe=rt.anchoredDescriptor;te.push(j(Fe))}for(;te.length>0;){let rt=[...te];te.length=0,await Uu(rt)}});let ce=Yl(r.values(),se=>this.tryWorkspaceByLocator(se)?Yl.skip:se);if(s.length>0||ce.length>0){let se=new Set(this.workspaces.flatMap(rt=>{let Fe=S.get(rt.anchoredLocator.locatorHash);if(!Fe)throw new Error(\"Assertion failed: The workspace should have been resolved\");return Array.from(Fe.dependencies.values(),Ne=>{let Pe=P.get(Ne.descriptorHash);if(!Pe)throw new Error(\"Assertion failed: The resolution should have been registered\");return Pe})})),X=rt=>se.has(rt.locatorHash)?\"0\":\"1\",De=rt=>cl(rt),Re=Ws(s,[X,De]),gt=Ws(ce,[X,De]),j=e.report.getRecommendedLength();Re.length>0&&e.report.reportInfo(85,`${Ut(this.configuration,\"+\",Ct.ADDED)} ${$k(this.configuration,Re,j)}`),gt.length>0&&e.report.reportInfo(85,`${Ut(this.configuration,\"-\",Ct.REMOVED)} ${$k(this.configuration,gt,j)}`)}let me=new Set(this.resolutionAliases.values()),pe=new Set(S.keys()),Be=new Set,Ce=new Map,g=[],we=new Map;Ywt({project:this,accessibleLocators:Be,volatileDescriptors:me,optionalBuilds:pe,peerRequirements:Ce,peerWarnings:g,peerRequirementNodes:we,allDescriptors:C,allResolutions:P,allPackages:S});for(let se of W)pe.delete(se);for(let se of me)C.delete(se),P.delete(se);let Ee=new Set,fe=new Set;for(let se of S.values())se.conditions!=null&&pe.has(se.locatorHash)&&(TQ(se,Ae)||(TQ(se,ie)&&e.report.reportWarningOnce(77,`${Yr(this.configuration,se)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${Ut(this.configuration,\"supportedArchitectures\",Ct.SETTING)} setting`),fe.add(se.locatorHash)),Ee.add(se.locatorHash));this.storedResolutions=P,this.storedDescriptors=C,this.storedPackages=S,this.accessibleLocators=Be,this.conditionalLocators=Ee,this.disabledLocators=fe,this.originalPackages=I,this.optionalBuilds=pe,this.peerRequirements=Ce,this.peerWarnings=g,this.peerRequirementNodes=we}async fetchEverything({cache:e,report:r,fetcher:s,mode:a,persistProject:n=!0}){let c={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},f=s||this.configuration.makeFetcher(),p={checksums:this.storedChecksums,project:this,cache:e,fetcher:f,report:r,cacheOptions:c},h=Array.from(new Set(Ws(this.storedResolutions.values(),[I=>{let R=this.storedPackages.get(I);if(!R)throw new Error(\"Assertion failed: The locator should have been registered\");return cl(R)}])));a===\"update-lockfile\"&&(h=h.filter(I=>!this.storedChecksums.has(I)));let E=!1,C=ho.progressViaCounter(h.length);await r.reportProgress(C);let S=(0,VR.default)(qwt);if(await Uu(h.map(I=>S(async()=>{let R=this.storedPackages.get(I);if(!R)throw new Error(\"Assertion failed: The locator should have been registered\");if(Gu(R))return;let N;try{N=await f.fetch(R,p)}catch(U){U.message=`${Yr(this.configuration,R)}: ${U.message}`,r.reportExceptionOnce(U),E=U;return}N.checksum!=null?this.storedChecksums.set(R.locatorHash,N.checksum):this.storedChecksums.delete(R.locatorHash),N.releaseFs&&N.releaseFs()}).finally(()=>{C.tick()}))),E)throw E;let P=n&&a!==\"update-lockfile\"?await this.cacheCleanup({cache:e,report:r}):null;if(r.cacheMisses.size>0||P){let R=(await Promise.all([...r.cacheMisses].map(async ce=>{let me=this.storedPackages.get(ce),pe=this.storedChecksums.get(ce)??null,Be=e.getLocatorPath(me,pe);return(await le.statPromise(Be)).size}))).reduce((ce,me)=>ce+me,0)-(P?.size??0),N=r.cacheMisses.size,U=P?.count??0,W=`${Vk(N,{zero:\"No new packages\",one:\"A package was\",more:`${Ut(this.configuration,N,Ct.NUMBER)} packages were`})} added to the project`,te=`${Vk(U,{zero:\"none were\",one:\"one was\",more:`${Ut(this.configuration,U,Ct.NUMBER)} were`})} removed`,ie=R!==0?` (${Ut(this.configuration,R,Ct.SIZE_DIFF)})`:\"\",Ae=U>0?N>0?`${W}, and ${te}${ie}.`:`${W}, but ${te}${ie}.`:`${W}${ie}.`;r.reportInfo(13,Ae)}}async linkEverything({cache:e,report:r,fetcher:s,mode:a}){let n={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},c=s||this.configuration.makeFetcher(),f={checksums:this.storedChecksums,project:this,cache:e,fetcher:c,report:r,cacheOptions:n},p=this.configuration.getLinkers(),h={project:this,report:r},E=new Map(p.map(Ee=>{let fe=Ee.makeInstaller(h),se=Ee.getCustomDataKey(),X=this.linkersCustomData.get(se);return typeof X<\"u\"&&fe.attachCustomData(X),[Ee,fe]})),C=new Map,S=new Map,P=new Map,I=new Map(await Uu([...this.accessibleLocators].map(async Ee=>{let fe=this.storedPackages.get(Ee);if(!fe)throw new Error(\"Assertion failed: The locator should have been registered\");return[Ee,await c.fetch(fe,f)]}))),R=[],N=new Set,U=[];for(let Ee of this.accessibleLocators){let fe=this.storedPackages.get(Ee);if(typeof fe>\"u\")throw new Error(\"Assertion failed: The locator should have been registered\");let se=I.get(fe.locatorHash);if(typeof se>\"u\")throw new Error(\"Assertion failed: The fetch result should have been registered\");let X=[],De=gt=>{X.push(gt)},Re=this.tryWorkspaceByLocator(fe);if(Re!==null){let gt=[],{scripts:j}=Re.manifest;for(let Fe of[\"preinstall\",\"install\",\"postinstall\"])j.has(Fe)&&gt.push({type:0,script:Fe});try{for(let[Fe,Ne]of E)if(Fe.supportsPackage(fe,h)&&(await Ne.installPackage(fe,se,{holdFetchResult:De})).buildRequest!==null)throw new Error(\"Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core\")}finally{X.length===0?se.releaseFs?.():R.push(Uu(X).catch(()=>{}).then(()=>{se.releaseFs?.()}))}let rt=K.join(se.packageFs.getRealPath(),se.prefixPath);S.set(fe.locatorHash,rt),!Gu(fe)&&gt.length>0&&P.set(fe.locatorHash,{buildDirectives:gt,buildLocations:[rt]})}else{let gt=p.find(Fe=>Fe.supportsPackage(fe,h));if(!gt)throw new Yt(12,`${Yr(this.configuration,fe)} isn't supported by any available linker`);let j=E.get(gt);if(!j)throw new Error(\"Assertion failed: The installer should have been registered\");let rt;try{rt=await j.installPackage(fe,se,{holdFetchResult:De})}finally{X.length===0?se.releaseFs?.():R.push(Uu(X).then(()=>{}).then(()=>{se.releaseFs?.()}))}C.set(fe.locatorHash,gt),S.set(fe.locatorHash,rt.packageLocation),rt.buildRequest&&rt.packageLocation&&(rt.buildRequest.skipped?(N.add(fe.locatorHash),this.skippedBuilds.has(fe.locatorHash)||U.push([fe,rt.buildRequest.explain])):P.set(fe.locatorHash,{buildDirectives:rt.buildRequest.directives,buildLocations:[rt.packageLocation]}))}}let W=new Map;for(let Ee of this.accessibleLocators){let fe=this.storedPackages.get(Ee);if(!fe)throw new Error(\"Assertion failed: The locator should have been registered\");let se=this.tryWorkspaceByLocator(fe)!==null,X=async(De,Re)=>{let gt=S.get(fe.locatorHash);if(typeof gt>\"u\")throw new Error(`Assertion failed: The package (${Yr(this.configuration,fe)}) should have been registered`);let j=[];for(let rt of fe.dependencies.values()){let Fe=this.storedResolutions.get(rt.descriptorHash);if(typeof Fe>\"u\")throw new Error(`Assertion failed: The resolution (${ri(this.configuration,rt)}, from ${Yr(this.configuration,fe)})should have been registered`);let Ne=this.storedPackages.get(Fe);if(typeof Ne>\"u\")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ri(this.configuration,rt)}) should have been registered`);let Pe=this.tryWorkspaceByLocator(Ne)===null?C.get(Fe):null;if(typeof Pe>\"u\")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ri(this.configuration,rt)}) should have been registered`);Pe===De||Pe===null?S.get(Ne.locatorHash)!==null&&j.push([rt,Ne]):!se&&gt!==null&&jB(W,Fe).push(gt)}gt!==null&&await Re.attachInternalDependencies(fe,j)};if(se)for(let[De,Re]of E)De.supportsPackage(fe,h)&&await X(De,Re);else{let De=C.get(fe.locatorHash);if(!De)throw new Error(\"Assertion failed: The linker should have been found\");let Re=E.get(De);if(!Re)throw new Error(\"Assertion failed: The installer should have been registered\");await X(De,Re)}}for(let[Ee,fe]of W){let se=this.storedPackages.get(Ee);if(!se)throw new Error(\"Assertion failed: The package should have been registered\");let X=C.get(se.locatorHash);if(!X)throw new Error(\"Assertion failed: The linker should have been found\");let De=E.get(X);if(!De)throw new Error(\"Assertion failed: The installer should have been registered\");await De.attachExternalDependents(se,fe)}let te=new Map;for(let[Ee,fe]of E){let se=await fe.finalizeInstall();for(let X of se?.records??[])X.buildRequest.skipped?(N.add(X.locator.locatorHash),this.skippedBuilds.has(X.locator.locatorHash)||U.push([X.locator,X.buildRequest.explain])):P.set(X.locator.locatorHash,{buildDirectives:X.buildRequest.directives,buildLocations:X.buildLocations});typeof se?.customData<\"u\"&&te.set(Ee.getCustomDataKey(),se.customData)}if(this.linkersCustomData=te,await Uu(R),a===\"skip-build\")return;for(let[,Ee]of Ws(U,([fe])=>cl(fe)))Ee(r);let ie=new Set(P.keys()),Ae=(0,WR.createHash)(\"sha512\");Ae.update(process.versions.node),await this.configuration.triggerHook(Ee=>Ee.globalHashGeneration,this,Ee=>{Ae.update(\"\\0\"),Ae.update(Ee)});let ce=Ae.digest(\"hex\"),me=new Map,pe=Ee=>{let fe=me.get(Ee.locatorHash);if(typeof fe<\"u\")return fe;let se=this.storedPackages.get(Ee.locatorHash);if(typeof se>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");let X=(0,WR.createHash)(\"sha512\");X.update(Ee.locatorHash),me.set(Ee.locatorHash,\"<recursive>\");for(let De of se.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(typeof Re>\"u\")throw new Error(`Assertion failed: The resolution (${ri(this.configuration,De)}) should have been registered`);let gt=this.storedPackages.get(Re);if(typeof gt>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");X.update(pe(gt))}return fe=X.digest(\"hex\"),me.set(Ee.locatorHash,fe),fe},Be=(Ee,fe)=>{let se=(0,WR.createHash)(\"sha512\");se.update(ce),se.update(pe(Ee));for(let X of fe)se.update(X);return se.digest(\"hex\")},Ce=new Map,g=!1,we=Ee=>{let fe=new Set([Ee.locatorHash]);for(let se of fe){let X=this.storedPackages.get(se);if(!X)throw new Error(\"Assertion failed: The package should have been registered\");for(let De of X.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(!Re)throw new Error(`Assertion failed: The resolution (${ri(this.configuration,De)}) should have been registered`);if(Re!==Ee.locatorHash&&ie.has(Re))return!1;let gt=this.storedPackages.get(Re);if(!gt)throw new Error(\"Assertion failed: The package should have been registered\");let j=this.tryWorkspaceByLocator(gt);if(j){if(j.anchoredLocator.locatorHash!==Ee.locatorHash&&ie.has(j.anchoredLocator.locatorHash))return!1;fe.add(j.anchoredLocator.locatorHash)}fe.add(Re)}}return!0};for(;ie.size>0;){let Ee=ie.size,fe=[];for(let se of ie){let X=this.storedPackages.get(se);if(!X)throw new Error(\"Assertion failed: The package should have been registered\");if(!we(X))continue;let De=P.get(X.locatorHash);if(!De)throw new Error(\"Assertion failed: The build directive should have been registered\");let Re=Be(X,De.buildLocations);if(this.storedBuildState.get(X.locatorHash)===Re){Ce.set(X.locatorHash,Re),ie.delete(se);continue}g||(await this.persistInstallStateFile(),g=!0),this.storedBuildState.has(X.locatorHash)?r.reportInfo(8,`${Yr(this.configuration,X)} must be rebuilt because its dependency tree changed`):r.reportInfo(7,`${Yr(this.configuration,X)} must be built because it never has been before or the last one failed`);let gt=De.buildLocations.map(async j=>{if(!K.isAbsolute(j))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${j})`);for(let rt of De.buildDirectives){let Fe=`# This file contains the result of Yarn building a package (${cl(X)})\n`;switch(rt.type){case 0:Fe+=`# Script name: ${rt.script}\n`;break;case 1:Fe+=`# Script code: ${rt.script}\n`;break}let Ne=null;if(!await le.mktempPromise(async Ye=>{let ke=K.join(Ye,\"build.log\"),{stdout:it,stderr:_e}=this.configuration.getSubprocessStreams(ke,{header:Fe,prefix:Yr(this.configuration,X),report:r}),x;try{switch(rt.type){case 0:x=await MT(X,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:_e});break;case 1:x=await y6(X,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:_e});break}}catch(y){_e.write(y.stack),x=1}if(it.end(),_e.end(),x===0)return!0;le.detachTemp(Ye);let w=`${Yr(this.configuration,X)} couldn't be built successfully (exit code ${Ut(this.configuration,x,Ct.NUMBER)}, logs can be found here: ${Ut(this.configuration,ke,Ct.PATH)})`,b=this.optionalBuilds.has(X.locatorHash);return b?r.reportInfo(9,w):r.reportError(9,w),rye&&r.reportFold(ue.fromPortablePath(ke),le.readFileSync(ke,\"utf8\")),b}))return!1}return!0});fe.push(...gt,Promise.allSettled(gt).then(j=>{ie.delete(se),j.every(rt=>rt.status===\"fulfilled\"&&rt.value===!0)&&Ce.set(X.locatorHash,Re)}))}if(await Uu(fe),Ee===ie.size){let se=Array.from(ie).map(X=>{let De=this.storedPackages.get(X);if(!De)throw new Error(\"Assertion failed: The package should have been registered\");return Yr(this.configuration,De)}).join(\", \");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${se})`);break}}this.storedBuildState=Ce,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Ot.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get(\"nodeLinker\");ze.telemetry?.reportInstall(r);let s=!1;if(await e.report.startTimerPromise(\"Project validation\",{skipIfEmpty:!0},async()=>{this.configuration.get(\"enableOfflineMode\")&&e.report.reportWarning(90,\"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it\"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),s=!0}})}),s)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,C]of E)for(let S of C)S.status=\"inactive\";let n=K.join(this.cwd,Er.lockfile),c=null;if(e.immutable)try{c=await le.readFilePromise(n,\"utf8\")}catch(E){throw E.code===\"ENOENT\"?new Yt(28,\"The lockfile would have been created by this install, which is explicitly forbidden.\"):E}await e.report.startTimerPromise(\"Resolution step\",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise(\"Post-resolution validation\",{skipIfEmpty:!0},async()=>{Kwt(this,e.report);for(let[,E]of a)for(let[,C]of E)for(let S of C)if(S.userProvided){let P=Ut(this.configuration,S,Ct.PACKAGE_EXTENSION);switch(S.status){case\"inactive\":e.report.reportWarning(68,`${P}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case\"redundant\":e.report.reportWarning(69,`${P}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(c!==null){let E=Id(c,this.generateLockfile());if(E!==c){let C=CCe(n,n,c,E,void 0,void 0,{maxEditLength:100});if(C){e.report.reportSeparator();for(let S of C.hunks){e.report.reportInfo(null,`@@ -${S.oldStart},${S.oldLines} +${S.newStart},${S.newLines} @@`);for(let P of S.lines)P.startsWith(\"+\")?e.report.reportError(28,Ut(this.configuration,P,Ct.ADDED)):P.startsWith(\"-\")?e.report.reportError(28,Ut(this.configuration,P,Ct.REMOVED)):e.report.reportInfo(null,Ut(this.configuration,P,\"grey\"))}e.report.reportSeparator()}throw new Yt(28,\"The lockfile would have been modified by this install, which is explicitly forbidden.\")}}});for(let E of a.values())for(let[,C]of E)for(let S of C)S.userProvided&&S.status===\"active\"&&ze.telemetry?.reportPackageExtension(Zd(S,Ct.PACKAGE_EXTENSION));await e.report.startTimerPromise(\"Fetch step\",async()=>{await this.fetchEverything(e)});let f=e.immutable?[...new Set(this.configuration.get(\"immutablePatterns\"))].sort():[],p=await Promise.all(f.map(async E=>DQ(E,{cwd:this.cwd})));(typeof e.persistProject>\"u\"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise(\"Link step\",async()=>{if(e.mode===\"update-lockfile\"){e.report.reportWarning(73,`Skipped due to ${Ut(this.configuration,\"mode=update-lockfile\",Ct.CODE)}`);return}await this.linkEverything(e);let E=await Promise.all(f.map(async C=>DQ(C,{cwd:this.cwd})));for(let C=0;C<f.length;++C)p[C]!==E[C]&&e.report.reportError(64,`The checksum for ${f[C]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let h=!1;await e.report.startTimerPromise(\"Post-install validation\",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),h=!0}})}),!h&&await this.configuration.triggerHook(E=>E.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[n,c]of this.storedResolutions.entries()){let f=e.get(c);f||e.set(c,f=new Set),f.add(n)}let r={},{cacheKey:s}=Jr.getCacheKey(this.configuration);r.__metadata={version:KR,cacheKey:s};for(let[n,c]of e.entries()){let f=this.originalPackages.get(n);if(!f)continue;let p=[];for(let C of c){let S=this.storedDescriptors.get(C);if(!S)throw new Error(\"Assertion failed: The descriptor should have been registered\");p.push(S)}let h=p.map(C=>ll(C)).sort().join(\", \"),E=new Ht;E.version=f.linkType===\"HARD\"?f.version:\"0.0.0-use.local\",E.languageName=f.languageName,E.dependencies=new Map(f.dependencies),E.peerDependencies=new Map(f.peerDependencies),E.dependenciesMeta=new Map(f.dependenciesMeta),E.peerDependenciesMeta=new Map(f.peerDependenciesMeta),E.bin=new Map(f.bin),r[h]={...E.exportTo({},{compatibilityMode:!1}),linkType:f.linkType.toLowerCase(),resolution:cl(f),checksum:this.storedChecksums.get(f.locatorHash),conditions:f.conditions||void 0}}return`${[`# This file is generated by running \"yarn install\" inside your project.\n`,`# Manual changes might be lost - proceed with caution!\n`].join(\"\")}\n`+il(r)}async persistLockfile(){let e=K.join(this.cwd,Er.lockfile),r=\"\";try{r=await le.readFilePromise(e,\"utf8\")}catch{}let s=this.generateLockfile(),a=Id(r,s);a!==r&&(await le.writeFilePromise(e,a),this.lockFileChecksum=iwe(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let c of Object.values(bG))e.push(...c);let r=(0,YR.default)(this,e),s=PG.default.serialize(r),a=us(s);if(this.installStateChecksum===a)return;let n=this.configuration.get(\"installStatePath\");await le.mkdirPromise(K.dirname(n),{recursive:!0}),await le.writeFilePromise(n,await Gwt(s)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let a=this.configuration.get(\"installStatePath\"),n;try{let c=await Wwt(await le.readFilePromise(a));n=PG.default.deserialize(c),this.installStateChecksum=us(c)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<\"u\"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,(0,YR.default)(n,bG.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,YR.default)(n,bG.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Wi}),await this.persistInstallStateFile()}async persist(){let e=(0,VR.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get(\"enableGlobalCache\"))return null;let s=new Set([\".gitignore\"]);if(!hH(e.cwd,this.cwd)||!await le.existsPromise(e.cwd))return null;let a=[];for(let c of await le.readdirPromise(e.cwd)){if(s.has(c))continue;let f=K.resolve(e.cwd,c);e.markedFiles.has(f)||(e.immutable?r.reportError(56,`${Ut(this.configuration,K.basename(f),\"magenta\")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(le.lstatPromise(f).then(async p=>(await le.removePromise(f),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((c,f)=>c+f,0)}}}});function Jwt(t){let s=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),c=n+a,f=t.state.lastTips??s*864e5,p=f+864e5+8*36e5-t.timeZone,h=c<=t.timeNow,E=p<=t.timeNow,C=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(C={},C.lastUpdate=h?t.timeNow:n,C.lastTips=f,C.blocks=h?{}:t.state.blocks,C.displayedTips=t.state.displayedTips),{nextState:C,triggerUpdate:h,triggerTips:E,nextTips:E?s*864e5:f}}var eC,awe=It(()=>{bt();Rv();I0();pT();kc();Np();eC=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let s=this.getRegistryPath();this.isNew=!le.existsSync(s),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),s=f=>f&&un?eA(un,f):!1,a=e.map((f,p)=>p).filter(f=>e[f]&&s(e[f]?.selector));if(a.length===0)return null;let n=a.filter(f=>!r.has(f));if(n.length===0){let f=Math.floor(a.length*.2);this.displayedTips=f>0?this.displayedTips.slice(-f):[],n=a.filter(p=>!r.has(p))}let c=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(c),this.commitTips(),e[c]}reportVersion(e){this.reportValue(\"version\",e.replace(/-git\\..*/,\"-git\"))}reportCommandName(e){this.reportValue(\"commandName\",e||\"<none>\")}reportPluginName(e){this.reportValue(\"pluginName\",e)}reportProject(e){this.reportEnumerator(\"projectCount\",e)}reportInstall(e){this.reportHit(\"installCount\",e)}reportPackageExtension(e){this.reportValue(\"packageExtension\",e)}reportWorkspaceCount(e){this.reportValue(\"workspaceCount\",String(e))}reportDependencyCount(e){this.reportValue(\"dependencyCount\",String(e))}reportValue(e,r){xp(this.values,e).add(r)}reportEnumerator(e,r){xp(this.enumerators,e).add(us(r))}reportHit(e,r=\"*\"){let s=A3(this.hits,e),a=Vl(s,r,()=>0);s.set(r,a+1)}getRegistryPath(){let e=this.configuration.get(\"globalFolder\");return K.join(e,\"telemetry.json\")}sendReport(e){let r=this.getRegistryPath(),s;try{s=le.readJsonSync(r)}catch{s={}}let{nextState:a,triggerUpdate:n,triggerTips:c,nextTips:f}=Jwt({state:s,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get(\"telemetryInterval\")});if(this.nextTips=f,this.displayedTips=s.displayedTips??[],a!==null)try{le.mkdirSync(K.dirname(r),{recursive:!0}),le.writeJsonSync(r,a)}catch{return!1}if(c&&this.configuration.get(\"enableTips\")&&(this.shouldShowTips=!0),n){let p=s.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,E=C=>Qj(h,C,{configuration:this.configuration}).catch(()=>{});for(let[C,S]of Object.entries(s.blocks??{})){if(Object.keys(S).length===0)continue;let P=S;P.userId=C,P.reportType=\"primary\";for(let N of Object.keys(P.enumerators??{}))P.enumerators[N]=P.enumerators[N].length;E(P);let I=new Map,R=20;for(let[N,U]of Object.entries(P.values))U.length>0&&I.set(N,U.slice(0,R));for(;I.size>0;){let N={};N.userId=C,N.reportType=\"secondary\",N.metrics={};for(let[U,W]of I)N.metrics[U]=W.shift(),W.length===0&&I.delete(U);E(N)}}}}return!0}applyChanges(){let e=this.getRegistryPath(),r;try{r=le.readJsonSync(e)}catch{r={}}let s=this.configuration.get(\"telemetryUserId\")??\"*\",a=r.blocks=r.blocks??{},n=a[s]=a[s]??{};for(let c of this.hits.keys()){let f=n.hits=n.hits??{},p=f[c]=f[c]??{};for(let[h,E]of this.hits.get(c))p[h]=(p[h]??0)+E}for(let c of[\"values\",\"enumerators\"])for(let f of this[c].keys()){let p=n[c]=n[c]??{};p[f]=[...new Set([...p[f]??[],...this[c].get(f)??[]])]}this.shouldCommitTips&&(r.lastTips=this.nextTips,r.displayedTips=this.displayedTips),le.mkdirSync(K.dirname(e),{recursive:!0}),le.writeJsonSync(e,r)}startBuffer(){process.on(\"exit\",()=>{try{this.applyChanges()}catch{}})}}});var nS={};Vt(nS,{BuildDirectiveType:()=>HR,CACHE_CHECKPOINT:()=>lG,CACHE_VERSION:()=>UR,Cache:()=>Jr,Configuration:()=>ze,DEFAULT_RC_FILENAME:()=>Mj,FormatType:()=>Lde,InstallMode:()=>ec,LEGACY_PLUGINS:()=>Ev,LOCKFILE_VERSION:()=>KR,LegacyMigrationResolver:()=>zI,LightReport:()=>uA,LinkType:()=>VE,LockfileResolver:()=>ZI,Manifest:()=>Ht,MessageName:()=>Dr,MultiFetcher:()=>lI,PackageExtensionStatus:()=>d3,PackageExtensionType:()=>g3,PeerWarningType:()=>JR,Project:()=>Tt,Report:()=>ho,ReportError:()=>Yt,SettingsType:()=>Iv,StreamReport:()=>Ot,TAG_REGEXP:()=>Hp,TelemetryManager:()=>eC,ThrowReport:()=>Wi,VirtualFetcher:()=>cI,WindowsLinkType:()=>IT,Workspace:()=>$I,WorkspaceFetcher:()=>uI,WorkspaceResolver:()=>yi,YarnVersion:()=>un,execUtils:()=>Gr,folderUtils:()=>OQ,formatUtils:()=>he,hashUtils:()=>Nn,httpUtils:()=>An,miscUtils:()=>je,nodeUtils:()=>As,parseMessageName:()=>rk,reportOptionDeprecations:()=>DI,scriptUtils:()=>In,semverUtils:()=>Or,stringifyMessageName:()=>Vf,structUtils:()=>q,tgzUtils:()=>hs,treeUtils:()=>ks});var Ve=It(()=>{dT();LQ();Qc();I0();pT();kc();gT();w6();Np();Yo();oCe();pCe();cG();Cv();Cv();dCe();uG();mCe();fG();oI();nk();nH();owe();Fc();Fv();awe();SG();sH();oH();tm();DG();Rv();BAe()});var pwe=L((hnr,sS)=>{\"use strict\";var Zwt=process.env.TERM_PROGRAM===\"Hyper\",Xwt=process.platform===\"win32\",uwe=process.platform===\"linux\",QG={ballotDisabled:\"\\u2612\",ballotOff:\"\\u2610\",ballotOn:\"\\u2611\",bullet:\"\\u2022\",bulletWhite:\"\\u25E6\",fullBlock:\"\\u2588\",heart:\"\\u2764\",identicalTo:\"\\u2261\",line:\"\\u2500\",mark:\"\\u203B\",middot:\"\\xB7\",minus:\"\\uFF0D\",multiplication:\"\\xD7\",obelus:\"\\xF7\",pencilDownRight:\"\\u270E\",pencilRight:\"\\u270F\",pencilUpRight:\"\\u2710\",percent:\"%\",pilcrow2:\"\\u2761\",pilcrow:\"\\xB6\",plusMinus:\"\\xB1\",section:\"\\xA7\",starsOff:\"\\u2606\",starsOn:\"\\u2605\",upDownArrow:\"\\u2195\"},fwe=Object.assign({},QG,{check:\"\\u221A\",cross:\"\\xD7\",ellipsisLarge:\"...\",ellipsis:\"...\",info:\"i\",question:\"?\",questionSmall:\"?\",pointer:\">\",pointerSmall:\"\\xBB\",radioOff:\"( )\",radioOn:\"(*)\",warning:\"\\u203C\"}),Awe=Object.assign({},QG,{ballotCross:\"\\u2718\",check:\"\\u2714\",cross:\"\\u2716\",ellipsisLarge:\"\\u22EF\",ellipsis:\"\\u2026\",info:\"\\u2139\",question:\"?\",questionFull:\"\\uFF1F\",questionSmall:\"\\uFE56\",pointer:uwe?\"\\u25B8\":\"\\u276F\",pointerSmall:uwe?\"\\u2023\":\"\\u203A\",radioOff:\"\\u25EF\",radioOn:\"\\u25C9\",warning:\"\\u26A0\"});sS.exports=Xwt&&!Zwt?fwe:Awe;Reflect.defineProperty(sS.exports,\"common\",{enumerable:!1,value:QG});Reflect.defineProperty(sS.exports,\"windows\",{enumerable:!1,value:fwe});Reflect.defineProperty(sS.exports,\"other\",{enumerable:!1,value:Awe})});var Ju=L((gnr,TG)=>{\"use strict\";var $wt=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t),e1t=/[\\u001b\\u009b][[\\]#;?()]*(?:(?:(?:[^\\W_]*;?[^\\W_]*)\\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,hwe=()=>{let t={enabled:!0,visible:!0,styles:{},keys:{}};\"FORCE_COLOR\"in process.env&&(t.enabled=process.env.FORCE_COLOR!==\"0\");let e=n=>{let c=n.open=`\\x1B[${n.codes[0]}m`,f=n.close=`\\x1B[${n.codes[1]}m`,p=n.regex=new RegExp(`\\\\u001b\\\\[${n.codes[1]}m`,\"g\");return n.wrap=(h,E)=>{h.includes(f)&&(h=h.replace(p,f+c));let C=c+h+f;return E?C.replace(/\\r*\\n/g,`${f}$&${c}`):C},n},r=(n,c,f)=>typeof n==\"function\"?n(c):n.wrap(c,f),s=(n,c)=>{if(n===\"\"||n==null)return\"\";if(t.enabled===!1)return n;if(t.visible===!1)return\"\";let f=\"\"+n,p=f.includes(`\n`),h=c.length;for(h>0&&c.includes(\"unstyle\")&&(c=[...new Set([\"unstyle\",...c])].reverse());h-- >0;)f=r(t.styles[c[h]],f,p);return f},a=(n,c,f)=>{t.styles[n]=e({name:n,codes:c}),(t.keys[f]||(t.keys[f]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>s(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a(\"reset\",[0,0],\"modifier\"),a(\"bold\",[1,22],\"modifier\"),a(\"dim\",[2,22],\"modifier\"),a(\"italic\",[3,23],\"modifier\"),a(\"underline\",[4,24],\"modifier\"),a(\"inverse\",[7,27],\"modifier\"),a(\"hidden\",[8,28],\"modifier\"),a(\"strikethrough\",[9,29],\"modifier\"),a(\"black\",[30,39],\"color\"),a(\"red\",[31,39],\"color\"),a(\"green\",[32,39],\"color\"),a(\"yellow\",[33,39],\"color\"),a(\"blue\",[34,39],\"color\"),a(\"magenta\",[35,39],\"color\"),a(\"cyan\",[36,39],\"color\"),a(\"white\",[37,39],\"color\"),a(\"gray\",[90,39],\"color\"),a(\"grey\",[90,39],\"color\"),a(\"bgBlack\",[40,49],\"bg\"),a(\"bgRed\",[41,49],\"bg\"),a(\"bgGreen\",[42,49],\"bg\"),a(\"bgYellow\",[43,49],\"bg\"),a(\"bgBlue\",[44,49],\"bg\"),a(\"bgMagenta\",[45,49],\"bg\"),a(\"bgCyan\",[46,49],\"bg\"),a(\"bgWhite\",[47,49],\"bg\"),a(\"blackBright\",[90,39],\"bright\"),a(\"redBright\",[91,39],\"bright\"),a(\"greenBright\",[92,39],\"bright\"),a(\"yellowBright\",[93,39],\"bright\"),a(\"blueBright\",[94,39],\"bright\"),a(\"magentaBright\",[95,39],\"bright\"),a(\"cyanBright\",[96,39],\"bright\"),a(\"whiteBright\",[97,39],\"bright\"),a(\"bgBlackBright\",[100,49],\"bgBright\"),a(\"bgRedBright\",[101,49],\"bgBright\"),a(\"bgGreenBright\",[102,49],\"bgBright\"),a(\"bgYellowBright\",[103,49],\"bgBright\"),a(\"bgBlueBright\",[104,49],\"bgBright\"),a(\"bgMagentaBright\",[105,49],\"bgBright\"),a(\"bgCyanBright\",[106,49],\"bgBright\"),a(\"bgWhiteBright\",[107,49],\"bgBright\"),t.ansiRegex=e1t,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n==\"string\"&&n!==\"\"&&t.ansiRegex.test(n)),t.alias=(n,c)=>{let f=typeof c==\"string\"?t[c]:c;if(typeof f!=\"function\")throw new TypeError(\"Expected alias to be the name of an existing color (string) or a function\");f.stack||(Reflect.defineProperty(f,\"name\",{value:n}),t.styles[n]=f,f.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>s(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(f.stack):f.stack,p}})},t.theme=n=>{if(!$wt(n))throw new TypeError(\"Expected theme to be an object\");for(let c of Object.keys(n))t.alias(c,n[c]);return t},t.alias(\"unstyle\",n=>typeof n==\"string\"&&n!==\"\"?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,\"\")):\"\"),t.alias(\"noop\",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=pwe(),t.define=a,t};TG.exports=hwe();TG.exports.create=hwe});var $o=L(pn=>{\"use strict\";var t1t=Object.prototype.toString,Gc=Ju(),gwe=!1,RG=[],dwe={yellow:\"blue\",cyan:\"red\",green:\"magenta\",black:\"white\",blue:\"yellow\",red:\"cyan\",magenta:\"green\",white:\"black\"};pn.longest=(t,e)=>t.reduce((r,s)=>Math.max(r,e?s[e].length:s.length),0);pn.hasColor=t=>!!t&&Gc.hasColor(t);var ZR=pn.isObject=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t);pn.nativeType=t=>t1t.call(t).slice(8,-1).toLowerCase().replace(/\\s/g,\"\");pn.isAsyncFn=t=>pn.nativeType(t)===\"asyncfunction\";pn.isPrimitive=t=>t!=null&&typeof t!=\"object\"&&typeof t!=\"function\";pn.resolve=(t,e,...r)=>typeof e==\"function\"?e.call(t,...r):e;pn.scrollDown=(t=[])=>[...t.slice(1),t[0]];pn.scrollUp=(t=[])=>[t.pop(),...t];pn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,s)=>r.index>s.index?1:r.index<s.index?-1:0),e};pn.swap=(t,e,r)=>{let s=t.length,a=r===s?0:r<0?s-1:r,n=t[e];t[e]=t[a],t[a]=n};pn.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize==\"function\"&&(r=t.getWindowSize()[0]),process.platform===\"win32\"?r-1:r};pn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize==\"function\"&&(r=t.getWindowSize()[1]),r};pn.wordWrap=(t,e={})=>{if(!t)return t;typeof e==\"number\"&&(e={width:e});let{indent:r=\"\",newline:s=`\n`+r,width:a=80}=e,n=(s+r).match(/[^\\S\\n]/g)||[];a-=n.length;let c=`.{1,${a}}([\\\\s\\\\u200B]+|$)|[^\\\\s\\\\u200B]+?([\\\\s\\\\u200B]+|$)`,f=t.trim(),p=new RegExp(c,\"g\"),h=f.match(p)||[];return h=h.map(E=>E.replace(/\\n$/,\"\")),e.padEnd&&(h=h.map(E=>E.padEnd(a,\" \"))),e.padStart&&(h=h.map(E=>E.padStart(a,\" \"))),r+h.join(s)};pn.unmute=t=>{let e=t.stack.find(s=>Gc.keys.color.includes(s));return e?Gc[e]:t.stack.find(s=>s.slice(2)===\"bg\")?Gc[e.slice(2)]:s=>s};pn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):\"\";pn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>Gc.keys.color.includes(s));if(e){let s=Gc[\"bg\"+pn.pascal(e)];return s?s.black:t}let r=t.stack.find(s=>s.slice(0,2)===\"bg\");return r?Gc[r.slice(2).toLowerCase()]||t:Gc.none};pn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>Gc.keys.color.includes(s)),r=t.stack.find(s=>s.slice(0,2)===\"bg\");if(e&&!r)return Gc[dwe[e]||e];if(r){let s=r.slice(2).toLowerCase(),a=dwe[s];return a&&Gc[\"bg\"+pn.pascal(a)]||t}return Gc.none};pn.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),s=e>=12?\"pm\":\"am\";e=e%12;let a=e===0?12:e,n=r<10?\"0\"+r:r;return a+\":\"+n+\" \"+s};pn.set=(t={},e=\"\",r)=>e.split(\".\").reduce((s,a,n,c)=>{let f=c.length-1>n?s[a]||{}:r;return!pn.isObject(f)&&n<c.length-1&&(f={}),s[a]=f},t);pn.get=(t={},e=\"\",r)=>{let s=t[e]==null?e.split(\".\").reduce((a,n)=>a&&a[n],t):t[e];return s??r};pn.mixin=(t,e)=>{if(!ZR(t))return e;if(!ZR(e))return t;for(let r of Object.keys(e)){let s=Object.getOwnPropertyDescriptor(e,r);if(s.hasOwnProperty(\"value\"))if(t.hasOwnProperty(r)&&ZR(s.value)){let a=Object.getOwnPropertyDescriptor(t,r);ZR(a.value)?t[r]=pn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,s)}else Reflect.defineProperty(t,r,s);else Reflect.defineProperty(t,r,s)}return t};pn.merge=(...t)=>{let e={};for(let r of t)pn.mixin(e,r);return e};pn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let s of Object.keys(r)){let a=r[s];typeof a==\"function\"?pn.define(t,s,a.bind(e)):pn.define(t,s,a)}};pn.onExit=t=>{let e=(r,s)=>{gwe||(gwe=!0,RG.forEach(a=>a()),r===!0&&process.exit(128+s))};RG.length===0&&(process.once(\"SIGTERM\",e.bind(null,!0,15)),process.once(\"SIGINT\",e.bind(null,!0,2)),process.once(\"exit\",e)),RG.push(t)};pn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};pn.defineExport=(t,e,r)=>{let s;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){s=a},get(){return s?s():r()}})}});var mwe=L(iC=>{\"use strict\";iC.ctrl={a:\"first\",b:\"backward\",c:\"cancel\",d:\"deleteForward\",e:\"last\",f:\"forward\",g:\"reset\",i:\"tab\",k:\"cutForward\",l:\"reset\",n:\"newItem\",m:\"cancel\",j:\"submit\",p:\"search\",r:\"remove\",s:\"save\",u:\"undo\",w:\"cutLeft\",x:\"toggleCursor\",v:\"paste\"};iC.shift={up:\"shiftUp\",down:\"shiftDown\",left:\"shiftLeft\",right:\"shiftRight\",tab:\"prev\"};iC.fn={up:\"pageUp\",down:\"pageDown\",left:\"pageLeft\",right:\"pageRight\",delete:\"deleteForward\"};iC.option={b:\"backward\",f:\"forward\",d:\"cutRight\",left:\"cutLeft\",up:\"altUp\",down:\"altDown\"};iC.keys={pageup:\"pageUp\",pagedown:\"pageDown\",home:\"home\",end:\"end\",cancel:\"cancel\",delete:\"deleteForward\",backspace:\"delete\",down:\"down\",enter:\"submit\",escape:\"cancel\",left:\"left\",space:\"space\",number:\"number\",return:\"submit\",right:\"right\",tab:\"next\",up:\"up\"}});var Iwe=L((ynr,Ewe)=>{\"use strict\";var ywe=ye(\"readline\"),r1t=mwe(),n1t=/^(?:\\x1b)([a-zA-Z0-9])$/,i1t=/^(?:\\x1b+)(O|N|\\[|\\[\\[)(?:(\\d+)(?:;(\\d+))?([~^$])|(?:1;)?(\\d+)?([a-zA-Z]))/,s1t={OP:\"f1\",OQ:\"f2\",OR:\"f3\",OS:\"f4\",\"[11~\":\"f1\",\"[12~\":\"f2\",\"[13~\":\"f3\",\"[14~\":\"f4\",\"[[A\":\"f1\",\"[[B\":\"f2\",\"[[C\":\"f3\",\"[[D\":\"f4\",\"[[E\":\"f5\",\"[15~\":\"f5\",\"[17~\":\"f6\",\"[18~\":\"f7\",\"[19~\":\"f8\",\"[20~\":\"f9\",\"[21~\":\"f10\",\"[23~\":\"f11\",\"[24~\":\"f12\",\"[A\":\"up\",\"[B\":\"down\",\"[C\":\"right\",\"[D\":\"left\",\"[E\":\"clear\",\"[F\":\"end\",\"[H\":\"home\",OA:\"up\",OB:\"down\",OC:\"right\",OD:\"left\",OE:\"clear\",OF:\"end\",OH:\"home\",\"[1~\":\"home\",\"[2~\":\"insert\",\"[3~\":\"delete\",\"[4~\":\"end\",\"[5~\":\"pageup\",\"[6~\":\"pagedown\",\"[[5~\":\"pageup\",\"[[6~\":\"pagedown\",\"[7~\":\"home\",\"[8~\":\"end\",\"[a\":\"up\",\"[b\":\"down\",\"[c\":\"right\",\"[d\":\"left\",\"[e\":\"clear\",\"[2$\":\"insert\",\"[3$\":\"delete\",\"[5$\":\"pageup\",\"[6$\":\"pagedown\",\"[7$\":\"home\",\"[8$\":\"end\",Oa:\"up\",Ob:\"down\",Oc:\"right\",Od:\"left\",Oe:\"clear\",\"[2^\":\"insert\",\"[3^\":\"delete\",\"[5^\":\"pageup\",\"[6^\":\"pagedown\",\"[7^\":\"home\",\"[8^\":\"end\",\"[Z\":\"tab\"};function o1t(t){return[\"[a\",\"[b\",\"[c\",\"[d\",\"[e\",\"[2$\",\"[3$\",\"[5$\",\"[6$\",\"[7$\",\"[8$\",\"[Z\"].includes(t)}function a1t(t){return[\"Oa\",\"Ob\",\"Oc\",\"Od\",\"Oe\",\"[2^\",\"[3^\",\"[5^\",\"[6^\",\"[7^\",\"[8^\"].includes(t)}var XR=(t=\"\",e={})=>{let r,s={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t=\"\\x1B\"+String(t)):t=String(t):t!==void 0&&typeof t!=\"string\"?t=String(t):t||(t=s.sequence||\"\"),s.sequence=s.sequence||t||s.name,t===\"\\r\")s.raw=void 0,s.name=\"return\";else if(t===`\n`)s.name=\"enter\";else if(t===\"\t\")s.name=\"tab\";else if(t===\"\\b\"||t===\"\\x7F\"||t===\"\\x1B\\x7F\"||t===\"\\x1B\\b\")s.name=\"backspace\",s.meta=t.charAt(0)===\"\\x1B\";else if(t===\"\\x1B\"||t===\"\\x1B\\x1B\")s.name=\"escape\",s.meta=t.length===2;else if(t===\" \"||t===\"\\x1B \")s.name=\"space\",s.meta=t.length===2;else if(t<=\"\u001a\")s.name=String.fromCharCode(t.charCodeAt(0)+97-1),s.ctrl=!0;else if(t.length===1&&t>=\"0\"&&t<=\"9\")s.name=\"number\";else if(t.length===1&&t>=\"a\"&&t<=\"z\")s.name=t;else if(t.length===1&&t>=\"A\"&&t<=\"Z\")s.name=t.toLowerCase(),s.shift=!0;else if(r=n1t.exec(t))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=i1t.exec(t)){let a=[...t];a[0]===\"\\x1B\"&&a[1]===\"\\x1B\"&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(\"\"),c=(r[3]||r[5]||1)-1;s.ctrl=!!(c&4),s.meta=!!(c&10),s.shift=!!(c&1),s.code=n,s.name=s1t[n],s.shift=o1t(n)||s.shift,s.ctrl=a1t(n)||s.ctrl}return s};XR.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error(\"Invalid stream passed\");let s=ywe.createInterface({terminal:!0,input:r});ywe.emitKeypressEvents(r,s);let a=(f,p)=>e(f,XR(f,p),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on(\"keypress\",a),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener(\"keypress\",a),s.pause(),s.close()}};XR.action=(t,e,r)=>{let s={...r1t,...r};return e.ctrl?(e.action=s.ctrl[e.name],e):e.option&&s.option?(e.action=s.option[e.name],e):e.shift?(e.action=s.shift[e.name],e):(e.action=s.keys[e.name],e)};Ewe.exports=XR});var wwe=L((Enr,Cwe)=>{\"use strict\";Cwe.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(e)for(let r of Object.keys(e)){let s=e[r];typeof s==\"number\"&&(s={interval:s}),l1t(t,r,s)}};function l1t(t,e,r={}){let s=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,t.render()},a);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,\"interval\",{value:n}),t.once(\"close\",()=>s.stop()),s.stop}});var vwe=L((Inr,Bwe)=>{\"use strict\";var{define:c1t,width:u1t}=$o(),FG=class{constructor(e){let r=e.options;c1t(this,\"_prompt\",e),this.type=e.type,this.name=e.name,this.message=\"\",this.header=\"\",this.footer=\"\",this.error=\"\",this.hint=\"\",this.input=\"\",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt=\"\",this.buffer=\"\",this.width=u1t(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r==\"function\"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading==\"boolean\"?this._loading:this.loadingChoices?\"choices\":!1}get status(){return this.cancelled?\"cancelled\":this.submitted?\"submitted\":\"pending\"}};Bwe.exports=FG});var Dwe=L((Cnr,Swe)=>{\"use strict\";var NG=$o(),mo=Ju(),OG={default:mo.noop,noop:mo.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||NG.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||NG.complement(this.primary)},primary:mo.cyan,success:mo.green,danger:mo.magenta,strong:mo.bold,warning:mo.yellow,muted:mo.dim,disabled:mo.gray,dark:mo.dim.gray,underline:mo.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};OG.merge=(t={})=>{t.styles&&typeof t.styles.enabled==\"boolean\"&&(mo.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible==\"boolean\"&&(mo.visible=t.styles.visible);let e=NG.merge({},OG,t.styles);delete e.merge;for(let r of Object.keys(mo))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>mo[r]});for(let r of Object.keys(mo.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>mo[r]});return e};Swe.exports=OG});var Pwe=L((wnr,bwe)=>{\"use strict\";var LG=process.platform===\"win32\",$p=Ju(),f1t=$o(),MG={...$p.symbols,upDownDoubleArrow:\"\\u21D5\",upDownDoubleArrow2:\"\\u2B0D\",upDownArrow:\"\\u2195\",asterisk:\"*\",asterism:\"\\u2042\",bulletWhite:\"\\u25E6\",electricArrow:\"\\u2301\",ellipsisLarge:\"\\u22EF\",ellipsisSmall:\"\\u2026\",fullBlock:\"\\u2588\",identicalTo:\"\\u2261\",indicator:$p.symbols.check,leftAngle:\"\\u2039\",mark:\"\\u203B\",minus:\"\\u2212\",multiplication:\"\\xD7\",obelus:\"\\xF7\",percent:\"%\",pilcrow:\"\\xB6\",pilcrow2:\"\\u2761\",pencilUpRight:\"\\u2710\",pencilDownRight:\"\\u270E\",pencilRight:\"\\u270F\",plus:\"+\",plusMinus:\"\\xB1\",pointRight:\"\\u261E\",rightAngle:\"\\u203A\",section:\"\\xA7\",hexagon:{off:\"\\u2B21\",on:\"\\u2B22\",disabled:\"\\u2B22\"},ballot:{on:\"\\u2611\",off:\"\\u2610\",disabled:\"\\u2612\"},stars:{on:\"\\u2605\",off:\"\\u2606\",disabled:\"\\u2606\"},folder:{on:\"\\u25BC\",off:\"\\u25B6\",disabled:\"\\u25B6\"},prefix:{pending:$p.symbols.question,submitted:$p.symbols.check,cancelled:$p.symbols.cross},separator:{pending:$p.symbols.pointerSmall,submitted:$p.symbols.middot,cancelled:$p.symbols.middot},radio:{off:LG?\"( )\":\"\\u25EF\",on:LG?\"(*)\":\"\\u25C9\",disabled:LG?\"(|)\":\"\\u24BE\"},numbers:[\"\\u24EA\",\"\\u2460\",\"\\u2461\",\"\\u2462\",\"\\u2463\",\"\\u2464\",\"\\u2465\",\"\\u2466\",\"\\u2467\",\"\\u2468\",\"\\u2469\",\"\\u246A\",\"\\u246B\",\"\\u246C\",\"\\u246D\",\"\\u246E\",\"\\u246F\",\"\\u2470\",\"\\u2471\",\"\\u2472\",\"\\u2473\",\"\\u3251\",\"\\u3252\",\"\\u3253\",\"\\u3254\",\"\\u3255\",\"\\u3256\",\"\\u3257\",\"\\u3258\",\"\\u3259\",\"\\u325A\",\"\\u325B\",\"\\u325C\",\"\\u325D\",\"\\u325E\",\"\\u325F\",\"\\u32B1\",\"\\u32B2\",\"\\u32B3\",\"\\u32B4\",\"\\u32B5\",\"\\u32B6\",\"\\u32B7\",\"\\u32B8\",\"\\u32B9\",\"\\u32BA\",\"\\u32BB\",\"\\u32BC\",\"\\u32BD\",\"\\u32BE\",\"\\u32BF\"]};MG.merge=t=>{let e=f1t.merge({},$p.symbols,MG,t.symbols);return delete e.merge,e};bwe.exports=MG});var kwe=L((Bnr,xwe)=>{\"use strict\";var A1t=Dwe(),p1t=Pwe(),h1t=$o();xwe.exports=t=>{t.options=h1t.merge({},t.options.theme,t.options),t.symbols=p1t.merge(t.options),t.styles=A1t.merge(t.options)}});var Nwe=L((Rwe,Fwe)=>{\"use strict\";var Qwe=process.env.TERM_PROGRAM===\"Apple_Terminal\",g1t=Ju(),_G=$o(),zu=Fwe.exports=Rwe,Mi=\"\\x1B[\",Twe=\"\\x07\",UG=!1,q0=zu.code={bell:Twe,beep:Twe,beginning:`${Mi}G`,down:`${Mi}J`,esc:Mi,getPosition:`${Mi}6n`,hide:`${Mi}?25l`,line:`${Mi}2K`,lineEnd:`${Mi}K`,lineStart:`${Mi}1K`,restorePosition:Mi+(Qwe?\"8\":\"u\"),savePosition:Mi+(Qwe?\"7\":\"s\"),screen:`${Mi}2J`,show:`${Mi}?25h`,up:`${Mi}1J`},Bm=zu.cursor={get hidden(){return UG},hide(){return UG=!0,q0.hide},show(){return UG=!1,q0.show},forward:(t=1)=>`${Mi}${t}C`,backward:(t=1)=>`${Mi}${t}D`,nextLine:(t=1)=>`${Mi}E`.repeat(t),prevLine:(t=1)=>`${Mi}F`.repeat(t),up:(t=1)=>t?`${Mi}${t}A`:\"\",down:(t=1)=>t?`${Mi}${t}B`:\"\",right:(t=1)=>t?`${Mi}${t}C`:\"\",left:(t=1)=>t?`${Mi}${t}D`:\"\",to(t,e){return e?`${Mi}${e+1};${t+1}H`:`${Mi}${t+1}G`},move(t=0,e=0){let r=\"\";return r+=t<0?Bm.left(-t):t>0?Bm.right(t):\"\",r+=e<0?Bm.up(-e):e>0?Bm.down(e):\"\",r},restore(t={}){let{after:e,cursor:r,initial:s,input:a,prompt:n,size:c,value:f}=t;if(s=_G.isPrimitive(s)?String(s):\"\",a=_G.isPrimitive(a)?String(a):\"\",f=_G.isPrimitive(f)?String(f):\"\",c){let p=zu.cursor.up(c)+zu.cursor.to(n.length),h=a.length-r;return h>0&&(p+=zu.cursor.left(h)),p}if(f||e){let p=!a&&s?-s.length:-a.length+r;return e&&(p-=e.length),a===\"\"&&s&&!n.includes(s)&&(p+=s.length),zu.cursor.move(p)}}},HG=zu.erase={screen:q0.screen,up:q0.up,down:q0.down,line:q0.line,lineEnd:q0.lineEnd,lineStart:q0.lineStart,lines(t){let e=\"\";for(let r=0;r<t;r++)e+=zu.erase.line+(r<t-1?zu.cursor.up(1):\"\");return t&&(e+=zu.code.beginning),e}};zu.clear=(t=\"\",e=process.stdout.columns)=>{if(!e)return HG.line+Bm.to(0);let r=n=>[...g1t.unstyle(n)].length,s=t.split(/\\r?\\n/),a=0;for(let n of s)a+=1+Math.floor(Math.max(r(n)-1,0)/e);return(HG.line+Bm.prevLine()).repeat(a-1)+HG.line+Bm.to(0)}});var sC=L((vnr,Lwe)=>{\"use strict\";var d1t=ye(\"events\"),Owe=Ju(),jG=Iwe(),m1t=wwe(),y1t=vwe(),E1t=kwe(),hl=$o(),vm=Nwe(),qG=class t extends d1t{constructor(e={}){super(),this.name=e.name,this.type=e.type,this.options=e,E1t(this),m1t(this),this.state=new y1t(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=C1t(this.options.margin),this.setMaxListeners(0),I1t(this)}async keypress(e,r={}){this.keypressed=!0;let s=jG.action(e,jG(e,r),this.options.actions);this.state.keypress=s,this.emit(\"keypress\",e,s),this.emit(\"state\",this.state.clone());let a=this.options[s.action]||this[s.action]||this.dispatch;if(typeof a==\"function\")return await a.call(this,e,s);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit(\"alert\"):this.stdout.write(vm.code.beep)}cursorHide(){this.stdout.write(vm.cursor.hide()),hl.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(vm.cursor.show())}write(e){e&&(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer=\"\",!(!r&&!e||this.options.show===!1)&&this.stdout.write(vm.cursor.down(e)+vm.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:s}=this.sections(),{cursor:a,initial:n=\"\",input:c=\"\",value:f=\"\"}=this,p=this.state.size=s.length,h={after:r,cursor:a,initial:n,input:c,prompt:e,size:p,value:f},E=vm.cursor.restore(h);E&&this.stdout.write(E)}sections(){let{buffer:e,input:r,prompt:s}=this.state;s=Owe.unstyle(s);let a=Owe.unstyle(e),n=a.indexOf(s),c=a.slice(0,n),p=a.slice(n).split(`\n`),h=p[0],E=p[p.length-1],S=(s+(r?\" \"+r:\"\")).length,P=S<h.length?h.slice(S+1):\"\";return{header:c,prompt:h,after:P,rest:p.slice(1),last:E}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`\n`+this.symbols.pointer+\" \";typeof e==\"string\"?r+=e.trim():r+=\"Invalid input\",this.state.error=`\n`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit(\"submit\",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel==\"function\"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit(\"cancel\",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(vm.cursor.down(e.rest.length)),this.write(`\n`.repeat(r))}catch{}this.emit(\"close\")}start(){!this.stop&&this.options.show!==!1&&(this.stop=jG.listen(this,this.keypress.bind(this)),this.once(\"close\",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip==\"function\"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:s}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial==\"function\"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun==\"function\"&&await r.onRun.call(this,this),typeof r.onSubmit==\"function\"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error(\"expected prompt to have a custom render method\")}run(){return new Promise(async(e,r)=>{if(this.once(\"submit\",e),this.once(\"cancel\",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit(\"run\")})}async element(e,r,s){let{options:a,state:n,symbols:c,timers:f}=this,p=f&&f[e];n.timer=p;let h=a[e]||n[e]||c[e],E=r&&r[e]!=null?r[e]:await h;if(E===\"\")return E;let C=await this.resolve(E,n,r,s);return!C&&r&&r[e]?this.resolve(h,n,r,s):C}async prefix(){let e=await this.element(\"prefix\")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,hl.isObject(e)&&(e=e[s.status]||e.pending),hl.hasColor(e)?e:(this.styles[s.status]||this.styles.pending)(e)}async message(){let e=await this.element(\"message\");return hl.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element(\"separator\")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let a=e[s.status]||e.pending||s.separator,n=await this.resolve(a,s);return hl.isObject(n)&&(n=n[s.status]||n.pending),hl.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let s=await this.element(\"pointer\",e,r);if(typeof s==\"string\"&&hl.hasColor(s))return s;if(s){let a=this.styles,n=this.index===r,c=n?a.primary:h=>h,f=await this.resolve(s[n?\"on\":\"off\"]||s,this.state),p=hl.hasColor(f)?f:c(f);return n?p:\" \".repeat(f.length)}}async indicator(e,r){let s=await this.element(\"indicator\",e,r);if(typeof s==\"string\"&&hl.hasColor(s))return s;if(s){let a=this.styles,n=e.enabled===!0,c=n?a.success:a.dark,f=s[n?\"on\":\"off\"]||s;return hl.hasColor(f)?f:c(f)}return\"\"}body(){return null}footer(){if(this.state.status===\"pending\")return this.element(\"footer\")}header(){if(this.state.status===\"pending\")return this.element(\"header\")}async hint(){if(this.state.status===\"pending\"&&!this.isValue(this.state.input)){let e=await this.element(\"hint\");return hl.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?\"\":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==\"\"}resolve(e,...r){return hl.resolve(this,e,...r)}get base(){return t.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||hl.height(this.stdout,25)}get width(){return this.options.columns||hl.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,s=[r,e].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return e=>new this(e).run()}};function I1t(t){let e=a=>t[a]===void 0||typeof t[a]==\"function\",r=[\"actions\",\"choices\",\"initial\",\"margin\",\"roles\",\"styles\",\"symbols\",\"theme\",\"timers\",\"value\"],s=[\"body\",\"footer\",\"error\",\"header\",\"hint\",\"indicator\",\"message\",\"prefix\",\"separator\",\"skip\"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n==\"function\"&&e(a)?s.includes(a)||(t[a]=n.bind(t)):typeof t[a]!=\"function\"&&(t[a]=n)}}function C1t(t){typeof t==\"number\"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?`\n`:\" \",s=[];for(let a=0;a<4;a++){let n=r(a);e[a]?s.push(n.repeat(e[a])):s.push(\"\")}return s}Lwe.exports=qG});var Uwe=L((Snr,_we)=>{\"use strict\";var w1t=$o(),Mwe={default(t,e){return e},checkbox(t,e){throw new Error(\"checkbox role is not implemented yet\")},editable(t,e){throw new Error(\"editable role is not implemented yet\")},expandable(t,e){throw new Error(\"expandable role is not implemented yet\")},heading(t,e){return e.disabled=\"\",e.indicator=[e.indicator,\" \"].find(r=>r!=null),e.message=e.message||\"\",e},input(t,e){throw new Error(\"input role is not implemented yet\")},option(t,e){return Mwe.default(t,e)},radio(t,e){throw new Error(\"radio role is not implemented yet\")},separator(t,e){return e.disabled=\"\",e.indicator=[e.indicator,\" \"].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};_we.exports=(t,e={})=>{let r=w1t.merge({},Mwe,e.roles);return r[t]||r.default}});var oS=L((Dnr,qwe)=>{\"use strict\";var B1t=Ju(),v1t=sC(),S1t=Uwe(),$R=$o(),{reorder:GG,scrollUp:D1t,scrollDown:b1t,isObject:Hwe,swap:P1t}=$R,WG=class extends v1t{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=\"\"}async initialize(){typeof this.options.initial==\"function\"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:s,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!=\"function\"&&this.selectable.length===0)throw new Error(\"At least one choice must be selectable\");Hwe(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),typeof r==\"string\"&&(r=this.findIndex(r)),typeof r==\"number\"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let s=[],a=0,n=async(c,f)=>{typeof c==\"function\"&&(c=await c.call(this)),c instanceof Promise&&(c=await c);for(let p=0;p<c.length;p++){let h=c[p]=await this.toChoice(c[p],a++,f);s.push(h),h.choices&&await n(h.choices,h)}return s};return n(e,r).then(c=>(this.state.loadingChoices=!1,c))}async toChoice(e,r,s){if(typeof e==\"function\"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e==\"string\"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=S1t(e.role,this.options)(this,e),typeof e.disabled==\"string\"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint=\"(disabled)\"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||\"\",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input=\"\",e.index=r,e.cursor=0,$R.define(e,\"parent\",s),e.level=s?s.level+1:1,e.indent==null&&(e.indent=s?s.indent+\"  \":e.indent||\"\"),e.path=s?s.path+\".\"+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,B1t.unstyle(e.message).length));let c={...e};return e.reset=(f=c.input,p=c.value)=>{for(let h of Object.keys(c))e[h]=c[h];e.input=f,e.value=p},a==null&&typeof e.initial==\"function\"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit(\"choice\",e,r,this),typeof e.onChoice==\"function\"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,s){let a=await this.toChoice(e,r,s);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,s){let a={name:\"New choice name?\",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input=\"\",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?\"  \".repeat(e.level-1):\"\":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!=\"boolean\"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!=\"boolean\"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(a=>this.toggle(a,r));let s=e.parent;for(;s;){let a=s.choices.filter(n=>this.isDisabled(n));s.enabled=a.every(n=>n.enabled===!0),s=s.parent}return jwe(this,this.choices),this.emit(\"toggle\",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=s=>{let a=Number(s);if(a>this.choices.length-1)return this.alert();let n=this.focused,c=this.choices.find(f=>a===f.index);if(!c.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(c)===-1){let f=GG(this.choices),p=f.indexOf(c);if(n.index>p){let h=f.slice(p,p+this.limit),E=f.filter(C=>!h.includes(C));this.choices=h.concat(E)}else{let h=p-this.limit+1;this.choices=f.slice(h).concat(f.slice(0,h))}}return this.index=this.choices.indexOf(c),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(s=>{let a=this.choices.length,n=this.num,c=(f=!1,p)=>{clearTimeout(this.numberTimeout),f&&(p=r(n)),this.num=\"\",s(p)};if(n===\"0\"||n.length===1&&+(n+\"0\")>a)return c(!0);if(Number(n)>a)return c(!1,this.alert());this.numberTimeout=setTimeout(()=>c(!0),this.delay)})}home(){return this.choices=GG(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=GG(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===0?this.alert():e>r&&s===0?this.scrollUp():(this.index=(s-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===r-1?this.alert():e>r&&s===r-1?this.scrollDown():(this.index=(s+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=D1t(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=b1t(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){P1t(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&[\"disabled\",\"collapsed\",\"hidden\",\"completing\",\"readonly\"].some(s=>e[s]===!0)?!0:e&&e.role===\"heading\"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(s=>!this.isDisabled(s));return e.enabled&&r.every(s=>this.isEnabled(s))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r=\"value\"){return[].concat(e||[]).reduce((s,a)=>(s[a]=this.find(a,r),s),{})}filter(e,r){let a=typeof e==\"function\"?e:(f,p)=>[f.name,p].includes(e),c=(this.options.multiple?this.state._choices:this.choices).filter(a);return r?c.map(f=>f[r]):c}find(e,r){if(Hwe(e))return r?e[r]:e;let a=typeof e==\"function\"?e:(c,f)=>[c.name,f].includes(e),n=this.choices.find(a);if(n)return r?n[r]:n}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(c=>c.newChoice))return this.alert();let{reorder:r,sort:s}=this.options,a=this.multiple===!0,n=this.selected;return n===void 0?this.alert():(Array.isArray(n)&&r!==!1&&s!==!0&&(n=$R.reorder(n)),this.value=a?n.map(c=>c.name):n.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(s=>s.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r==\"string\"||typeof r==\"number\"){let s=this.find(r);s&&(this.initial=s.index,this.focus(s,!0))}}}get choices(){return jwe(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:s}=this,a=e.limit||this._limit||r.limit||s.length;return Math.min(a,this.height)}set value(e){super.value=e}get value(){return typeof super.value!=\"string\"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}};function jwe(t,e){if(e instanceof Promise)return e;if(typeof e==\"function\"){if($R.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let s=r.choices.filter(a=>!t.isDisabled(a));r.enabled=s.every(a=>a.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}qwe.exports=WG});var G0=L((bnr,Gwe)=>{\"use strict\";var x1t=oS(),YG=$o(),VG=class extends x1t{constructor(e){super(e),this.emptyError=this.options.emptyError||\"No items were selected\"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):\"\"}indicator(e,r){return this.multiple?super.indicator(e,r):\"\"}choiceMessage(e,r){let s=this.resolve(e.message,this.state,e,r);return e.role===\"heading\"&&!YG.hasColor(s)&&(s=this.styles.strong(s)),this.resolve(s,this.state,e,r)}choiceSeparator(){return\":\"}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await this.indicator(e,r)+(e.pad||\"\"),c=await this.resolve(e.hint,this.state,e,r);c&&!YG.hasColor(c)&&(c=this.styles.muted(c));let f=this.indent(e),p=await this.choiceMessage(e,r),h=()=>[this.margin[3],f+a+n,p,this.margin[1],c].filter(Boolean).join(\" \");return e.role===\"heading\"?h():e.disabled?(YG.hasColor(p)||(p=this.styles.disabled(p)),h()):(s&&(p=this.styles.em(p)),h())}async renderChoices(){if(this.state.loading===\"choices\")return this.styles.warning(\"Loading choices\");if(this.state.submitted)return\"\";let e=this.visible.map(async(n,c)=>await this.renderChoice(n,c)),r=await Promise.all(e);r.length||r.push(this.styles.danger(\"No matching choices\"));let s=this.margin[0]+r.join(`\n`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,s].filter(Boolean).join(`\n`)}format(){return!this.state.submitted||this.state.cancelled?\"\":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(\", \"):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,s=\"\",a=await this.header(),n=await this.prefix(),c=await this.separator(),f=await this.message();this.options.promptLine!==!1&&(s=[n,f,c,\"\"].join(\" \"),this.state.prompt=s);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();p&&(s+=p),h&&!s.includes(h)&&(s+=\" \"+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,s,E,C].filter(Boolean).join(`\n`)),this.write(this.margin[2]),this.restore()}};Gwe.exports=VG});var Ywe=L((Pnr,Wwe)=>{\"use strict\";var k1t=G0(),Q1t=(t,e)=>{let r=t.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),c=e(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+c+s.slice(n+r.length):s}},KG=class extends k1t{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+e+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest==\"function\")return this.options.suggest.call(this,e,r);let s=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(s))}pointer(){return\"\"}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(\", \");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!==\"pending\")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=Q1t(this.input,e),s=this.choices;this.choices=s.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};Wwe.exports=KG});var zG=L((xnr,Vwe)=>{\"use strict\";var JG=$o();Vwe.exports=(t,e={})=>{t.cursorHide();let{input:r=\"\",initial:s=\"\",pos:a,showCursor:n=!0,color:c}=e,f=c||t.styles.placeholder,p=JG.inverse(t.styles.primary),h=R=>p(t.styles.black(R)),E=r,C=\" \",S=h(C);if(t.blink&&t.blink.off===!0&&(h=R=>R,S=\"\"),n&&a===0&&s===\"\"&&r===\"\")return h(C);if(n&&a===0&&(r===s||r===\"\"))return h(s[0])+f(s.slice(1));s=JG.isPrimitive(s)?`${s}`:\"\",r=JG.isPrimitive(r)?`${r}`:\"\";let P=s&&s.startsWith(r)&&s!==r,I=P?h(s[r.length]):S;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),I=\"\"),n===!1&&(I=\"\"),P){let R=t.styles.unstyle(E+I);return E+I+f(s.slice(R.length))}return E+I}});var eF=L((knr,Kwe)=>{\"use strict\";var T1t=Ju(),R1t=G0(),F1t=zG(),ZG=class extends R1t{constructor(e){super({...e,multiple:!0}),this.type=\"form\",this.initial=this.options.initial,this.align=[this.options.align,\"right\"].find(r=>r!=null),this.emptyError=\"\",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:a}=r;return r.value=r.input=a.slice(0,s)+e+a.slice(s),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:s}=e;return e.value=e.input=s.slice(0,r-1)+s.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:s}=e;if(s[r]===void 0)return this.alert();let a=`${s}`.slice(0,r)+`${s}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:s}=e;return r&&r.startsWith(s)&&s!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input=\"\",e.cursor=0,this.render()):this.alert()}separator(){return\"\"}format(e){return this.state.submitted?\"\":super.format(e)}pointer(){return\"\"}indicator(e){return e.input?\"\\u29BF\":\"\\u2299\"}async choiceSeparator(e,r){let s=await this.resolve(e.separator,this.state,e,r)||\":\";return s?\" \"+this.styles.disabled(s):\"\"}async renderChoice(e,r){await this.onChoice(e,r);let{state:s,styles:a}=this,{cursor:n,initial:c=\"\",name:f,hint:p,input:h=\"\"}=e,{muted:E,submitted:C,primary:S,danger:P}=a,I=p,R=this.index===r,N=e.validate||(()=>!0),U=await this.choiceSeparator(e,r),W=e.message;this.align===\"right\"&&(W=W.padStart(this.longest+1,\" \")),this.align===\"left\"&&(W=W.padEnd(this.longest+1,\" \"));let te=this.values[f]=h||c,ie=h?\"success\":\"dark\";await N.call(e,te,this.state)!==!0&&(ie=\"danger\");let Ae=a[ie],ce=Ae(await this.indicator(e,r))+(e.pad||\"\"),me=this.indent(e),pe=()=>[me,ce,W+U,h,I].filter(Boolean).join(\" \");if(s.submitted)return W=T1t.unstyle(W),h=C(h),I=\"\",pe();if(e.format)h=await e.format.call(this,h,e,r);else{let Be=this.styles.muted;h=F1t(this,{input:h,initial:c,pos:n,showCursor:R,color:Be})}return this.isValue(h)||(h=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[f]=await e.result.call(this,te,e,r)),R&&(W=S(W)),e.error?h+=(h?\" \":\"\")+P(e.error.trim()):e.hint&&(h+=(h?\" \":\"\")+E(e.hint.trim())),pe()}async submit(){return this.value=this.values,super.base.submit.call(this)}};Kwe.exports=ZG});var XG=L((Qnr,zwe)=>{\"use strict\";var N1t=eF(),O1t=()=>{throw new Error(\"expected prompt to have a custom authenticate method\")},Jwe=(t=O1t)=>{class e extends N1t{constructor(s){super(s)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(s){return Jwe(s)}}return e};zwe.exports=Jwe()});var $we=L((Tnr,Xwe)=>{\"use strict\";var L1t=XG();function M1t(t,e){return t.username===this.options.username&&t.password===this.options.password}var Zwe=(t=M1t)=>{let e=[{name:\"username\",message:\"username\"},{name:\"password\",message:\"password\",format(s){return this.options.showPassword?s:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(s.length))}}];class r extends L1t.create(t){constructor(a){super({...a,choices:e})}static create(a){return Zwe(a)}}return r};Xwe.exports=Zwe()});var tF=L((Rnr,e1e)=>{\"use strict\";var _1t=sC(),{isPrimitive:U1t,hasColor:H1t}=$o(),$G=class extends _1t{constructor(e){super(e),this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:s}=this;return s.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return U1t(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status===\"pending\"){let e=await this.element(\"hint\");return H1t(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=this.styles.muted(this.default),f=[s,n,c,a].filter(Boolean).join(\" \");this.state.prompt=f;let p=await this.header(),h=this.value=this.cast(e),E=await this.format(h),C=await this.error()||await this.hint(),S=await this.footer();C&&!f.includes(C)&&(E+=\" \"+C),f+=\" \"+E,this.clear(r),this.write([p,f,S].filter(Boolean).join(`\n`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};e1e.exports=$G});var r1e=L((Fnr,t1e)=>{\"use strict\";var j1t=tF(),e5=class extends j1t{constructor(e){super(e),this.default=this.options.default||(this.initial?\"(Y/n)\":\"(y/N)\")}};t1e.exports=e5});var i1e=L((Nnr,n1e)=>{\"use strict\";var q1t=G0(),G1t=eF(),oC=G1t.prototype,t5=class extends q1t{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,\"left\"].find(r=>r!=null),this.emptyError=\"\",this.values={}}dispatch(e,r){let s=this.focused,a=s.parent||{};return!s.editable&&!a.editable&&(e===\"a\"||e===\"i\")?super[e]():oC.dispatch.call(this,e,r)}append(e,r){return oC.append.call(this,e,r)}delete(e,r){return oC.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?oC.next.call(this):super.next()}prev(){return this.focused.editable?oC.prev.call(this):super.prev()}async indicator(e,r){let s=e.indicator||\"\",a=e.editable?s:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||\"\"}indent(e){return e.role===\"heading\"?\"\":e.editable?\" \":\"  \"}async renderChoice(e,r){return e.indent=\"\",e.editable?oC.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return\"\"}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!=\"function\"||r.role===\"heading\")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||\"\":r.value:this.isDisabled(r)||(s=r.enabled===!0),e=await r.validate(s,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e==\"string\"?e:\"Invalid Input\"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role===\"heading\"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||\"\":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};n1e.exports=t5});var Sm=L((Onr,s1e)=>{\"use strict\";var W1t=sC(),Y1t=zG(),{isPrimitive:V1t}=$o(),r5=class extends W1t{constructor(e){super(e),this.initial=V1t(this.initial)?String(this.initial):\"\",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name===\"return\"&&(!s||s.name!==\"return\")?this.append(`\n`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value=\"\",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+e+`${s}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),s=this.input.slice(e),a=r.split(\" \");this.state.clipboard.push(a.pop()),this.input=a.join(\" \"),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):\"\";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):Y1t(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),s=await this.separator(),a=await this.message(),n=[r,a,s].filter(Boolean).join(\" \");this.state.prompt=n;let c=await this.header(),f=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!f.includes(p)&&(f+=\" \"+p),n+=\" \"+f,this.clear(e),this.write([c,n,h].filter(Boolean).join(`\n`)),this.restore()}};s1e.exports=r5});var a1e=L((Lnr,o1e)=>{\"use strict\";var K1t=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),rF=t=>K1t(t).filter(Boolean);o1e.exports=(t,e={},r=\"\")=>{let{past:s=[],present:a=\"\"}=e,n,c;switch(t){case\"prev\":case\"undo\":return n=s.slice(0,s.length-1),c=s[s.length-1]||\"\",{past:rF([r,...n]),present:c};case\"next\":case\"redo\":return n=s.slice(1),c=s[0]||\"\",{past:rF([...n,r]),present:c};case\"save\":return{past:rF([...s,r]),present:\"\"};case\"remove\":return c=rF(s.filter(f=>f!==r)),a=\"\",c.length&&(a=c.pop()),{past:c,present:a};default:throw new Error(`Invalid action: \"${t}\"`)}}});var i5=L((Mnr,c1e)=>{\"use strict\";var J1t=Sm(),l1e=a1e(),n5=class extends J1t{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get(\"values\")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=l1e(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion(\"prev\")}altDown(){return this.completion(\"next\")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=l1e(\"save\",this.data,this.input),this.store.set(\"values\",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};c1e.exports=n5});var f1e=L((_nr,u1e)=>{\"use strict\";var z1t=Sm(),s5=class extends z1t{format(){return\"\"}};u1e.exports=s5});var p1e=L((Unr,A1e)=>{\"use strict\";var Z1t=Sm(),o5=class extends Z1t{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||\"\"}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(\", \")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};A1e.exports=o5});var g1e=L((Hnr,h1e)=>{\"use strict\";var X1t=G0(),a5=class extends X1t{constructor(e){super({...e,multiple:!0})}};h1e.exports=a5});var c5=L((jnr,d1e)=>{\"use strict\";var $1t=Sm(),l5=class extends $1t{constructor(e={}){super({style:\"number\",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:\"\",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e===\".\"&&this.input.includes(\".\")?this.alert(\"invalid number\"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(e){let r=e||this.minor,s=this.toNumber(this.input);return s<this.min-r?this.alert():(this.input=`${s-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format==\"function\"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=\"\"){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\\.)|(\\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};d1e.exports=l5});var y1e=L((qnr,m1e)=>{m1e.exports=c5()});var I1e=L((Gnr,E1e)=>{\"use strict\";var e2t=Sm(),u5=class extends e2t{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):\"\"}};E1e.exports=u5});var B1e=L((Wnr,w1e)=>{\"use strict\";var t2t=Ju(),r2t=oS(),C1e=$o(),f5=class extends r2t{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||\"left\"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`\n   `;let r=e.startNumber||1;typeof this.scale==\"number\"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s<this.scale.length;s++)r.scale.push({index:s})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,s){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return\"\"}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(\", \"):\"\"}pointer(){return\"\"}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?\"\":[\"\",...this.scale.map(s=>`   ${s.name} - ${s.message}`)].map(s=>this.styles.muted(s)).join(`\n`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading==\"function\"&&(r=this.options.renderScaleHeading.call(this,e));let s=this.scaleLength-r.join(\"\").length,a=Math.round(s/(r.length-1)),c=r.map(p=>this.styles.strong(p)).join(\" \".repeat(a)),f=\" \".repeat(this.widths[0]);return this.margin[3]+f+this.margin[1]+c}scaleIndicator(e,r,s){if(typeof this.options.scaleIndicator==\"function\")return this.options.scaleIndicator.call(this,e,r,s);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let s=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term===\"Hyper\"?\"\":\" \";return s.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!C1e.hasColor(n)&&(n=this.styles.muted(n));let c=I=>this.margin[3]+I.replace(/\\s+$/,\"\").padEnd(this.widths[0],\" \"),f=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),C=this.margin[1]+this.margin[3];this.scaleLength=t2t.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-C.length);let P=C1e.wordWrap(h,{width:this.widths[0],newline:f}).split(`\n`).map(I=>c(I)+this.margin[1]);return s&&(E=this.styles.info(E),P=P.map(I=>this.styles.info(I))),P[0]+=E,this.linebreak&&P.push(\"\"),[p+a,P.join(`\n`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return\"\";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(a=>a.join(\" \"))].join(`\n`)}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=\"\";this.options.promptLine!==!1&&(c=[s,n,a,\"\"].join(\" \"),this.state.prompt=c);let f=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),C=await this.renderChoices(),S=await this.footer(),P=this.emptyError;p&&(c+=p),E&&!c.includes(E)&&(c+=\" \"+E),e&&!p&&!C.trim()&&this.multiple&&P!=null&&(c+=this.styles.danger(P)),this.clear(r),this.write([f,c,h,C,S].filter(Boolean).join(`\n`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};w1e.exports=f5});var D1e=L((Ynr,S1e)=>{\"use strict\";var v1e=Ju(),n2t=(t=\"\")=>typeof t==\"string\"?t.replace(/^['\"]|['\"]$/g,\"\"):\"\",p5=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=n2t(e.initial||this.field.initial||\"\"),this.message=e.message||this.name,this.cursor=0,this.input=\"\",this.lines=[]}},i2t=async(t={},e={},r=s=>s)=>{let s=new Set,a=t.fields||[],n=t.template,c=[],f=[],p=[],h=1;typeof n==\"function\"&&(n=await n());let E=-1,C=()=>n[++E],S=()=>n[E+1],P=I=>{I.line=h,c.push(I)};for(P({type:\"bos\",value:\"\"});E<n.length-1;){let I=C();if(/^[^\\S\\n ]$/.test(I)){P({type:\"text\",value:I});continue}if(I===`\n`){P({type:\"newline\",value:I}),h++;continue}if(I===\"\\\\\"){I+=C(),P({type:\"text\",value:I});continue}if((I===\"$\"||I===\"#\"||I===\"{\")&&S()===\"{\"){let N=C();I+=N;let U={type:\"template\",open:I,inner:\"\",close:\"\",value:I},W;for(;W=C();){if(W===\"}\"){S()===\"}\"&&(W+=C()),U.value+=W,U.close=W;break}W===\":\"?(U.initial=\"\",U.key=U.inner):U.initial!==void 0&&(U.initial+=W),U.value+=W,U.inner+=W}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,e.hasOwnProperty(U.key)&&(U.initial=e[U.key]),U=r(U),P(U),p.push(U.key),s.add(U.key);let te=f.find(ie=>ie.name===U.key);U.field=a.find(ie=>ie.name===U.key),te||(te=new p5(U),f.push(te)),te.lines.push(U.line-1);continue}let R=c[c.length-1];R.type===\"text\"&&R.line===h?R.value+=I:P({type:\"text\",value:I})}return P({type:\"eos\",value:\"\"}),{input:n,tabstops:c,unique:s,keys:p,items:f}};S1e.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),s={...e.values,...e.initial},{tabstops:a,items:n,keys:c}=await i2t(e,s),f=A5(\"result\",t,e),p=A5(\"format\",t,e),h=A5(\"validate\",t,e,!0),E=t.isValue.bind(t);return async(C={},S=!1)=>{let P=0;C.required=r,C.items=n,C.keys=c,C.output=\"\";let I=async(W,te,ie,Ae)=>{let ce=await h(W,te,ie,Ae);return ce===!1?\"Invalid field \"+ie.name:ce};for(let W of a){let te=W.value,ie=W.key;if(W.type!==\"template\"){te&&(C.output+=te);continue}if(W.type===\"template\"){let Ae=n.find(Ce=>Ce.name===ie);e.required===!0&&C.required.add(Ae.name);let ce=[Ae.input,C.values[Ae.value],Ae.value,te].find(E),pe=(Ae.field||{}).message||W.inner;if(S){let Ce=await I(C.values[ie],C,Ae,P);if(Ce&&typeof Ce==\"string\"||Ce===!1){C.invalid.set(ie,Ce);continue}C.invalid.delete(ie);let g=await f(C.values[ie],C,Ae,P);C.output+=v1e.unstyle(g);continue}Ae.placeholder=!1;let Be=te;te=await p(te,C,Ae,P),ce!==te?(C.values[ie]=ce,te=t.styles.typing(ce),C.missing.delete(pe)):(C.values[ie]=void 0,ce=`<${pe}>`,te=t.styles.primary(ce),Ae.placeholder=!0,C.required.has(ie)&&C.missing.add(pe)),C.missing.has(pe)&&C.validating&&(te=t.styles.warning(ce)),C.invalid.has(ie)&&C.validating&&(te=t.styles.danger(ce)),P===C.index&&(Be!==te?te=t.styles.underline(te):te=t.styles.heading(v1e.unstyle(te))),P++}te&&(C.output+=te)}let R=C.output.split(`\n`).map(W=>\" \"+W),N=n.length,U=0;for(let W of n)C.invalid.has(W.name)&&W.lines.forEach(te=>{R[te][0]===\" \"&&(R[te]=C.styles.danger(C.symbols.bullet)+R[te].slice(1))}),t.isValue(C.values[W.name])&&U++;return C.completed=(U/N*100).toFixed(0),C.output=R.join(`\n`),C.output}};function A5(t,e,r,s){return(a,n,c,f)=>typeof c.field[t]==\"function\"?c.field[t].call(e,a,n,c,f):[s,a].find(p=>e.isValue(p))}});var P1e=L((Vnr,b1e)=>{\"use strict\";var s2t=Ju(),o2t=D1e(),a2t=sC(),h5=class extends a2t{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await o2t(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let s=this.getItem(),a=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),s=e.input.slice(0,this.cursor-1);this.input=e.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:s,size:a}=this.state,n=[this.options.newline,`\n`].find(W=>W!=null),c=await this.prefix(),f=await this.separator(),p=await this.message(),h=[c,p,f].filter(Boolean).join(\" \");this.state.prompt=h;let E=await this.header(),C=await this.error()||\"\",S=await this.hint()||\"\",P=s?\"\":await this.interpolate(this.state),I=this.state.key=r[e]||\"\",R=await this.format(I),N=await this.footer();R&&(h+=\" \"+R),S&&!R&&this.state.completed===0&&(h+=\" \"+S),this.clear(a);let U=[E,h,P,N,C.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:s,index:a}=this.state,n=r.find(c=>c.name===s[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!=\"function\"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:s,values:a}=this.state;if(e.size){let f=\"\";for(let[p,h]of e)f+=`Invalid ${p}: ${h}\n`;return this.state.error=f,super.submit()}if(r.size)return this.state.error=\"Required: \"+[...r.keys()].join(\", \"),super.submit();let c=s2t.unstyle(s).split(`\n`).map(f=>f.slice(1)).join(`\n`);return this.value={values:a,result:c},super.submit()}};b1e.exports=h5});var k1e=L((Knr,x1e)=>{\"use strict\";var l2t=\"(Use <shift>+<up/down> to sort)\",c2t=G0(),g5=class extends c2t{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,l2t].find(this.isValue.bind(this))}indicator(){return\"\"}async renderChoice(e,r){let s=await super.renderChoice(e,r),a=this.symbols.identicalTo+\" \",n=this.index===r&&this.sorting?this.styles.muted(a):\"  \";return this.options.drag===!1&&(n=\"\"),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};x1e.exports=g5});var T1e=L((Jnr,Q1e)=>{\"use strict\";var u2t=oS(),d5=class extends u2t{constructor(e={}){if(super(e),this.emptyError=e.emptyError||\"No items were selected\",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=[\"\",\"4 - Strongly Agree\",\"3 - Agree\",\"2 - Neutral\",\"1 - Disagree\",\"0 - Strongly Disagree\",\"\"];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(`\n   `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let s of r)s.scale=f2t(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],s=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!s,this.render()}indicator(){return\"\"}pointer(){return\"\"}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return\"   \"}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=this.term===\"Hyper\",n=a?9:8,c=a?\"\":\" \",f=this.symbols.line.repeat(n),p=\" \".repeat(n+(a?0:1)),h=te=>(te?this.styles.success(\"\\u25C9\"):\"\\u25EF\")+c,E=r+1+\".\",C=s?this.styles.heading:this.styles.noop,S=await this.resolve(e.message,this.state,e,r),P=this.indent(e),I=P+e.scale.map((te,ie)=>h(ie===e.scaleIdx)).join(f),R=te=>te===e.scaleIdx?C(te):te,N=P+e.scale.map((te,ie)=>R(ie)).join(p),U=()=>[E,S].filter(Boolean).join(\" \"),W=()=>[U(),I,N,\" \"].filter(Boolean).join(`\n`);return s&&(I=this.styles.cyan(I),N=this.styles.cyan(N)),W()}async renderChoices(){if(this.state.submitted)return\"\";let e=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger(\"No matching choices\")),r.join(`\n`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(\", \"):\"\"}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=[s,n,a].filter(Boolean).join(\" \");this.state.prompt=c;let f=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();(p||!h)&&(c+=\" \"+p),h&&!c.includes(h)&&(c+=\" \"+h),e&&!p&&!E&&this.multiple&&this.type!==\"form\"&&(c+=this.styles.danger(this.emptyError)),this.clear(r),this.write([c,f,E,C].filter(Boolean).join(`\n`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function f2t(t,e={}){if(Array.isArray(e.scale))return e.scale.map(s=>({...s}));let r=[];for(let s=1;s<t+1;s++)r.push({i:s,selected:!1});return r}Q1e.exports=d5});var F1e=L((znr,R1e)=>{R1e.exports=i5()});var O1e=L((Znr,N1e)=>{\"use strict\";var A2t=tF(),m5=class extends A2t{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||\"no\",this.enabled=this.options.enabled||\"yes\",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e=\"\",r){switch(e.toLowerCase()){case\" \":return this.toggle();case\"1\":case\"y\":case\"t\":return this.enable();case\"0\":case\"n\":case\"f\":return this.disable();default:return this.alert()}}format(){let e=s=>this.styles.primary.underline(s);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(\" / \"))}async render(){let{size:e}=this.state,r=await this.header(),s=await this.prefix(),a=await this.separator(),n=await this.message(),c=await this.format(),f=await this.error()||await this.hint(),p=await this.footer(),h=[s,n,a,c].join(\" \");this.state.prompt=h,f&&!h.includes(f)&&(h+=\" \"+f),this.clear(e),this.write([r,h,p].filter(Boolean).join(`\n`)),this.write(this.margin[2]),this.restore()}};N1e.exports=m5});var M1e=L((Xnr,L1e)=>{\"use strict\";var p2t=G0(),y5=class extends p2t{constructor(e){if(super(e),typeof this.options.correctChoice!=\"number\"||this.options.correctChoice<0)throw new Error(\"Please specify the index of the correct answer from the list of choices\")}async toChoices(e,r){let s=await super.toChoices(e,r);if(s.length<2)throw new Error(\"Please give at least two choices to the user\");if(this.options.correctChoice>s.length)throw new Error(\"Please specify the index of the correct answer from the list of choices\");return s}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};L1e.exports=y5});var U1e=L(E5=>{\"use strict\";var _1e=$o(),Qs=(t,e)=>{_1e.defineExport(E5,t,e),_1e.defineExport(E5,t.toLowerCase(),e)};Qs(\"AutoComplete\",()=>Ywe());Qs(\"BasicAuth\",()=>$we());Qs(\"Confirm\",()=>r1e());Qs(\"Editable\",()=>i1e());Qs(\"Form\",()=>eF());Qs(\"Input\",()=>i5());Qs(\"Invisible\",()=>f1e());Qs(\"List\",()=>p1e());Qs(\"MultiSelect\",()=>g1e());Qs(\"Numeral\",()=>y1e());Qs(\"Password\",()=>I1e());Qs(\"Scale\",()=>B1e());Qs(\"Select\",()=>G0());Qs(\"Snippet\",()=>P1e());Qs(\"Sort\",()=>k1e());Qs(\"Survey\",()=>T1e());Qs(\"Text\",()=>F1e());Qs(\"Toggle\",()=>O1e());Qs(\"Quiz\",()=>M1e())});var j1e=L((eir,H1e)=>{H1e.exports={ArrayPrompt:oS(),AuthPrompt:XG(),BooleanPrompt:tF(),NumberPrompt:c5(),StringPrompt:Sm()}});var lS=L((tir,G1e)=>{\"use strict\";var q1e=ye(\"assert\"),C5=ye(\"events\"),W0=$o(),Zu=class extends C5{constructor(e,r){super(),this.options=W0.merge({},e),this.answers={...r}}register(e,r){if(W0.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}q1e.equal(typeof r,\"function\",\"expected a function\");let s=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r==\"function\"&&(r=await r.call(this)),await this.ask(W0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(e){typeof e==\"function\"&&(e=await e.call(this));let r=W0.merge({},this.options,e),{type:s,name:a}=e,{set:n,get:c}=W0;if(typeof s==\"function\"&&(s=await s.call(this,e,this.answers)),!s)return this.answers[a];q1e(this.prompts[s],`Prompt \"${s}\" is not registered`);let f=new this.prompts[s](r),p=c(this.answers,a);f.state.answers=this.answers,f.enquirer=this,a&&f.on(\"submit\",E=>{this.emit(\"answer\",a,E,f),n(this.answers,a,E)});let h=f.emit.bind(f);return f.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit(\"prompt\",f,this),r.autofill&&p!=null?(f.value=f.input=p,r.autofill===\"show\"&&await f.submit()):p=f.value=await f.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||sC()}static get prompts(){return U1e()}static get types(){return j1e()}static get prompt(){let e=(r,...s)=>{let a=new this(...s),n=a.emit.bind(a);return a.emit=(...c)=>(e.emit(...c),n(...c)),a.prompt(r)};return W0.mixinEmitter(e,new C5),e}};W0.mixinEmitter(Zu,new C5);var I5=Zu.prompts;for(let t of Object.keys(I5)){let e=t.toLowerCase(),r=s=>new I5[t](s).run();Zu.prompt[e]=r,Zu[e]=r,Zu[t]||Reflect.defineProperty(Zu,t,{get:()=>I5[t]})}var aS=t=>{W0.defineExport(Zu,t,()=>Zu.types[t])};aS(\"ArrayPrompt\");aS(\"AuthPrompt\");aS(\"BooleanPrompt\");aS(\"NumberPrompt\");aS(\"StringPrompt\");G1e.exports=Zu});var AS=L((Lir,Z1e)=>{var I2t=qR();function C2t(t,e,r){var s=t==null?void 0:I2t(t,e);return s===void 0?r:s}Z1e.exports=C2t});var e2e=L((qir,$1e)=>{function w2t(t,e){for(var r=-1,s=t==null?0:t.length;++r<s&&e(t[r],r,t)!==!1;);return t}$1e.exports=w2t});var r2e=L((Gir,t2e)=>{var B2t=Jd(),v2t=Uk();function S2t(t,e){return t&&B2t(e,v2t(e),t)}t2e.exports=S2t});var i2e=L((Wir,n2e)=>{var D2t=Jd(),b2t=qE();function P2t(t,e){return t&&D2t(e,b2t(e),t)}n2e.exports=P2t});var o2e=L((Yir,s2e)=>{var x2t=Jd(),k2t=Fk();function Q2t(t,e){return x2t(t,k2t(t),e)}s2e.exports=Q2t});var b5=L((Vir,a2e)=>{var T2t=Rk(),R2t=Wk(),F2t=Fk(),N2t=_4(),O2t=Object.getOwnPropertySymbols,L2t=O2t?function(t){for(var e=[];t;)T2t(e,F2t(t)),t=R2t(t);return e}:N2t;a2e.exports=L2t});var c2e=L((Kir,l2e)=>{var M2t=Jd(),_2t=b5();function U2t(t,e){return M2t(t,_2t(t),e)}l2e.exports=U2t});var P5=L((Jir,u2e)=>{var H2t=M4(),j2t=b5(),q2t=qE();function G2t(t){return H2t(t,q2t,j2t)}u2e.exports=G2t});var A2e=L((zir,f2e)=>{var W2t=Object.prototype,Y2t=W2t.hasOwnProperty;function V2t(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]==\"string\"&&Y2t.call(t,\"index\")&&(r.index=t.index,r.input=t.input),r}f2e.exports=V2t});var h2e=L((Zir,p2e)=>{var K2t=qk();function J2t(t,e){var r=e?K2t(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}p2e.exports=J2t});var d2e=L((Xir,g2e)=>{var z2t=/\\w*$/;function Z2t(t){var e=new t.constructor(t.source,z2t.exec(t));return e.lastIndex=t.lastIndex,e}g2e.exports=Z2t});var C2e=L(($ir,I2e)=>{var m2e=Yd(),y2e=m2e?m2e.prototype:void 0,E2e=y2e?y2e.valueOf:void 0;function X2t(t){return E2e?Object(E2e.call(t)):{}}I2e.exports=X2t});var B2e=L((esr,w2e)=>{var $2t=qk(),eBt=h2e(),tBt=d2e(),rBt=C2e(),nBt=$4(),iBt=\"[object Boolean]\",sBt=\"[object Date]\",oBt=\"[object Map]\",aBt=\"[object Number]\",lBt=\"[object RegExp]\",cBt=\"[object Set]\",uBt=\"[object String]\",fBt=\"[object Symbol]\",ABt=\"[object ArrayBuffer]\",pBt=\"[object DataView]\",hBt=\"[object Float32Array]\",gBt=\"[object Float64Array]\",dBt=\"[object Int8Array]\",mBt=\"[object Int16Array]\",yBt=\"[object Int32Array]\",EBt=\"[object Uint8Array]\",IBt=\"[object Uint8ClampedArray]\",CBt=\"[object Uint16Array]\",wBt=\"[object Uint32Array]\";function BBt(t,e,r){var s=t.constructor;switch(e){case ABt:return $2t(t);case iBt:case sBt:return new s(+t);case pBt:return eBt(t,r);case hBt:case gBt:case dBt:case mBt:case yBt:case EBt:case IBt:case CBt:case wBt:return nBt(t,r);case oBt:return new s;case aBt:case uBt:return new s(t);case lBt:return tBt(t);case cBt:return new s;case fBt:return rBt(t)}}w2e.exports=BBt});var S2e=L((tsr,v2e)=>{var vBt=_B(),SBt=zf(),DBt=\"[object Map]\";function bBt(t){return SBt(t)&&vBt(t)==DBt}v2e.exports=bBt});var x2e=L((rsr,P2e)=>{var PBt=S2e(),xBt=Ok(),D2e=Lk(),b2e=D2e&&D2e.isMap,kBt=b2e?xBt(b2e):PBt;P2e.exports=kBt});var Q2e=L((nsr,k2e)=>{var QBt=_B(),TBt=zf(),RBt=\"[object Set]\";function FBt(t){return TBt(t)&&QBt(t)==RBt}k2e.exports=FBt});var N2e=L((isr,F2e)=>{var NBt=Q2e(),OBt=Ok(),T2e=Lk(),R2e=T2e&&T2e.isSet,LBt=R2e?OBt(R2e):NBt;F2e.exports=LBt});var x5=L((ssr,_2e)=>{var MBt=Qk(),_Bt=e2e(),UBt=Yk(),HBt=r2e(),jBt=i2e(),qBt=X4(),GBt=Gk(),WBt=o2e(),YBt=c2e(),VBt=q4(),KBt=P5(),JBt=_B(),zBt=A2e(),ZBt=B2e(),XBt=e3(),$Bt=xc(),evt=FB(),tvt=x2e(),rvt=Wl(),nvt=N2e(),ivt=Uk(),svt=qE(),ovt=1,avt=2,lvt=4,O2e=\"[object Arguments]\",cvt=\"[object Array]\",uvt=\"[object Boolean]\",fvt=\"[object Date]\",Avt=\"[object Error]\",L2e=\"[object Function]\",pvt=\"[object GeneratorFunction]\",hvt=\"[object Map]\",gvt=\"[object Number]\",M2e=\"[object Object]\",dvt=\"[object RegExp]\",mvt=\"[object Set]\",yvt=\"[object String]\",Evt=\"[object Symbol]\",Ivt=\"[object WeakMap]\",Cvt=\"[object ArrayBuffer]\",wvt=\"[object DataView]\",Bvt=\"[object Float32Array]\",vvt=\"[object Float64Array]\",Svt=\"[object Int8Array]\",Dvt=\"[object Int16Array]\",bvt=\"[object Int32Array]\",Pvt=\"[object Uint8Array]\",xvt=\"[object Uint8ClampedArray]\",kvt=\"[object Uint16Array]\",Qvt=\"[object Uint32Array]\",Ii={};Ii[O2e]=Ii[cvt]=Ii[Cvt]=Ii[wvt]=Ii[uvt]=Ii[fvt]=Ii[Bvt]=Ii[vvt]=Ii[Svt]=Ii[Dvt]=Ii[bvt]=Ii[hvt]=Ii[gvt]=Ii[M2e]=Ii[dvt]=Ii[mvt]=Ii[yvt]=Ii[Evt]=Ii[Pvt]=Ii[xvt]=Ii[kvt]=Ii[Qvt]=!0;Ii[Avt]=Ii[L2e]=Ii[Ivt]=!1;function iF(t,e,r,s,a,n){var c,f=e&ovt,p=e&avt,h=e&lvt;if(r&&(c=a?r(t,s,a,n):r(t)),c!==void 0)return c;if(!rvt(t))return t;var E=$Bt(t);if(E){if(c=zBt(t),!f)return GBt(t,c)}else{var C=JBt(t),S=C==L2e||C==pvt;if(evt(t))return qBt(t,f);if(C==M2e||C==O2e||S&&!a){if(c=p||S?{}:XBt(t),!f)return p?YBt(t,jBt(c,t)):WBt(t,HBt(c,t))}else{if(!Ii[C])return a?t:{};c=ZBt(t,C,f)}}n||(n=new MBt);var P=n.get(t);if(P)return P;n.set(t,c),nvt(t)?t.forEach(function(N){c.add(iF(N,e,r,N,t,n))}):tvt(t)&&t.forEach(function(N,U){c.set(U,iF(N,e,r,U,t,n))});var I=h?p?KBt:VBt:p?svt:ivt,R=E?void 0:I(t);return _Bt(R||t,function(N,U){R&&(U=N,N=t[U]),UBt(c,U,iF(N,e,r,U,t,n))}),c}_2e.exports=iF});var k5=L((osr,U2e)=>{var Tvt=x5(),Rvt=1,Fvt=4;function Nvt(t){return Tvt(t,Rvt|Fvt)}U2e.exports=Nvt});var Q5=L((asr,H2e)=>{var Ovt=CG();function Lvt(t,e,r){return t==null?t:Ovt(t,e,r)}H2e.exports=Lvt});var Y2e=L((psr,W2e)=>{var Mvt=Object.prototype,_vt=Mvt.hasOwnProperty;function Uvt(t,e){return t!=null&&_vt.call(t,e)}W2e.exports=Uvt});var K2e=L((hsr,V2e)=>{var Hvt=Y2e(),jvt=wG();function qvt(t,e){return t!=null&&jvt(t,e,Hvt)}V2e.exports=qvt});var z2e=L((gsr,J2e)=>{function Gvt(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}J2e.exports=Gvt});var X2e=L((dsr,Z2e)=>{var Wvt=qR(),Yvt=A6();function Vvt(t,e){return e.length<2?t:Wvt(t,Yvt(e,0,-1))}Z2e.exports=Vvt});var R5=L((msr,$2e)=>{var Kvt=wm(),Jvt=z2e(),zvt=X2e(),Zvt=XI();function Xvt(t,e){return e=Kvt(e,t),t=zvt(t,e),t==null||delete t[Zvt(Jvt(e))]}$2e.exports=Xvt});var F5=L((ysr,eBe)=>{var $vt=R5();function eSt(t,e){return t==null?!0:$vt(t,e)}eBe.exports=eSt});var sBe=L((Vsr,nSt)=>{nSt.exports={name:\"@yarnpkg/cli\",version:\"4.9.1\",license:\"BSD-2-Clause\",main:\"./sources/index.ts\",exports:{\".\":\"./sources/index.ts\",\"./polyfills\":\"./sources/polyfills.ts\",\"./package.json\":\"./package.json\"},dependencies:{\"@yarnpkg/core\":\"workspace:^\",\"@yarnpkg/fslib\":\"workspace:^\",\"@yarnpkg/libzip\":\"workspace:^\",\"@yarnpkg/parsers\":\"workspace:^\",\"@yarnpkg/plugin-compat\":\"workspace:^\",\"@yarnpkg/plugin-constraints\":\"workspace:^\",\"@yarnpkg/plugin-dlx\":\"workspace:^\",\"@yarnpkg/plugin-essentials\":\"workspace:^\",\"@yarnpkg/plugin-exec\":\"workspace:^\",\"@yarnpkg/plugin-file\":\"workspace:^\",\"@yarnpkg/plugin-git\":\"workspace:^\",\"@yarnpkg/plugin-github\":\"workspace:^\",\"@yarnpkg/plugin-http\":\"workspace:^\",\"@yarnpkg/plugin-init\":\"workspace:^\",\"@yarnpkg/plugin-interactive-tools\":\"workspace:^\",\"@yarnpkg/plugin-jsr\":\"workspace:^\",\"@yarnpkg/plugin-link\":\"workspace:^\",\"@yarnpkg/plugin-nm\":\"workspace:^\",\"@yarnpkg/plugin-npm\":\"workspace:^\",\"@yarnpkg/plugin-npm-cli\":\"workspace:^\",\"@yarnpkg/plugin-pack\":\"workspace:^\",\"@yarnpkg/plugin-patch\":\"workspace:^\",\"@yarnpkg/plugin-pnp\":\"workspace:^\",\"@yarnpkg/plugin-pnpm\":\"workspace:^\",\"@yarnpkg/plugin-stage\":\"workspace:^\",\"@yarnpkg/plugin-typescript\":\"workspace:^\",\"@yarnpkg/plugin-version\":\"workspace:^\",\"@yarnpkg/plugin-workspace-tools\":\"workspace:^\",\"@yarnpkg/shell\":\"workspace:^\",\"ci-info\":\"^4.0.0\",clipanion:\"^4.0.0-rc.2\",semver:\"^7.1.2\",tslib:\"^2.4.0\",typanion:\"^3.14.0\"},devDependencies:{\"@types/semver\":\"^7.1.0\",\"@yarnpkg/builder\":\"workspace:^\",\"@yarnpkg/monorepo\":\"workspace:^\",\"@yarnpkg/pnpify\":\"workspace:^\"},peerDependencies:{\"@yarnpkg/core\":\"workspace:^\"},scripts:{postpack:\"rm -rf lib\",prepack:'run build:compile \"$(pwd)\"',\"build:cli+hook\":\"run build:pnp:hook && builder build bundle\",\"build:cli\":\"builder build bundle\",\"run:cli\":\"builder run\",\"update-local\":\"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/\"},publishConfig:{main:\"./lib/index.js\",bin:null,exports:{\".\":\"./lib/index.js\",\"./package.json\":\"./package.json\"}},files:[\"/lib/**/*\",\"!/lib/pluginConfiguration.*\",\"!/lib/cli.*\"],\"@yarnpkg/builder\":{bundles:{standard:[\"@yarnpkg/plugin-essentials\",\"@yarnpkg/plugin-compat\",\"@yarnpkg/plugin-constraints\",\"@yarnpkg/plugin-dlx\",\"@yarnpkg/plugin-exec\",\"@yarnpkg/plugin-file\",\"@yarnpkg/plugin-git\",\"@yarnpkg/plugin-github\",\"@yarnpkg/plugin-http\",\"@yarnpkg/plugin-init\",\"@yarnpkg/plugin-interactive-tools\",\"@yarnpkg/plugin-jsr\",\"@yarnpkg/plugin-link\",\"@yarnpkg/plugin-nm\",\"@yarnpkg/plugin-npm\",\"@yarnpkg/plugin-npm-cli\",\"@yarnpkg/plugin-pack\",\"@yarnpkg/plugin-patch\",\"@yarnpkg/plugin-pnp\",\"@yarnpkg/plugin-pnpm\",\"@yarnpkg/plugin-stage\",\"@yarnpkg/plugin-typescript\",\"@yarnpkg/plugin-version\",\"@yarnpkg/plugin-workspace-tools\"]}},repository:{type:\"git\",url:\"git+https://github.com/yarnpkg/berry.git\",directory:\"packages/yarnpkg-cli\"},engines:{node:\">=18.12.0\"}}});var q5=L((Dcr,mBe)=>{\"use strict\";mBe.exports=function(e,r){r===!0&&(r=0);var s=\"\";if(typeof e==\"string\")try{s=new URL(e).protocol}catch{}else e&&e.constructor===URL&&(s=e.protocol);var a=s.split(/\\:|\\+/).filter(Boolean);return typeof r==\"number\"?a[r]:a}});var EBe=L((bcr,yBe)=>{\"use strict\";var BSt=q5();function vSt(t){var e={protocols:[],protocol:null,port:null,resource:\"\",host:\"\",user:\"\",password:\"\",pathname:\"\",hash:\"\",search:\"\",href:t,query:{},parse_failed:!1};try{var r=new URL(t);e.protocols=BSt(r),e.protocol=e.protocols[0],e.port=r.port,e.resource=r.hostname,e.host=r.host,e.user=r.username||\"\",e.password=r.password||\"\",e.pathname=r.pathname,e.hash=r.hash.slice(1),e.search=r.search.slice(1),e.href=r.href,e.query=Object.fromEntries(r.searchParams)}catch{e.protocols=[\"file\"],e.protocol=e.protocols[0],e.port=\"\",e.resource=\"\",e.user=\"\",e.pathname=\"\",e.hash=\"\",e.search=\"\",e.href=t,e.query={},e.parse_failed=!0}return e}yBe.exports=vSt});var wBe=L((Pcr,CBe)=>{\"use strict\";var SSt=EBe();function DSt(t){return t&&typeof t==\"object\"&&\"default\"in t?t:{default:t}}var bSt=DSt(SSt),PSt=\"text/plain\",xSt=\"us-ascii\",IBe=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),kSt=(t,{stripHash:e})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:s,data:a,hash:n}=r.groups,c=s.split(\";\");n=e?\"\":n;let f=!1;c[c.length-1]===\"base64\"&&(c.pop(),f=!0);let p=(c.shift()||\"\").toLowerCase(),E=[...c.map(C=>{let[S,P=\"\"]=C.split(\"=\").map(I=>I.trim());return S===\"charset\"&&(P=P.toLowerCase(),P===xSt)?\"\":`${S}${P?`=${P}`:\"\"}`}).filter(Boolean)];return f&&E.push(\"base64\"),(E.length>0||p&&p!==PSt)&&E.unshift(p),`data:${E.join(\";\")},${f?a.trim():a}${n?`#${n}`:\"\"}`};function QSt(t,e){if(e={defaultProtocol:\"http:\",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return kSt(t,e);if(/^view-source:/i.test(t))throw new Error(\"`view-source:` is not supported as it is a non-standard protocol\");let r=t.startsWith(\"//\");!r&&/^\\.*\\//.test(t)||(t=t.replace(/^(?!(?:\\w+:)?\\/\\/)|^\\/\\//,e.defaultProtocol));let a=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error(\"The `forceHttp` and `forceHttps` options cannot be used together\");if(e.forceHttp&&a.protocol===\"https:\"&&(a.protocol=\"http:\"),e.forceHttps&&a.protocol===\"http:\"&&(a.protocol=\"https:\"),e.stripAuthentication&&(a.username=\"\",a.password=\"\"),e.stripHash?a.hash=\"\":e.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,\"\")),a.pathname){let c=/\\b[a-z][a-z\\d+\\-.]{1,50}:\\/\\//g,f=0,p=\"\";for(;;){let E=c.exec(a.pathname);if(!E)break;let C=E[0],S=E.index,P=a.pathname.slice(f,S);p+=P.replace(/\\/{2,}/g,\"/\"),p+=C,f=S+C.length}let h=a.pathname.slice(f,a.pathname.length);p+=h.replace(/\\/{2,}/g,\"/\"),a.pathname=p}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let c=a.pathname.split(\"/\"),f=c[c.length-1];IBe(f,e.removeDirectoryIndex)&&(c=c.slice(0,-1),a.pathname=c.slice(1).join(\"/\")+\"/\")}if(a.hostname&&(a.hostname=a.hostname.replace(/\\.$/,\"\"),e.stripWWW&&/^www\\.(?!www\\.)[a-z\\-\\d]{1,63}\\.[a-z.\\-\\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\\./,\"\"))),Array.isArray(e.removeQueryParameters))for(let c of[...a.searchParams.keys()])IBe(c,e.removeQueryParameters)&&a.searchParams.delete(c);if(e.removeQueryParameters===!0&&(a.search=\"\"),e.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch{}}e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\\/$/,\"\"));let n=t;return t=a.toString(),!e.removeSingleSlash&&a.pathname===\"/\"&&!n.endsWith(\"/\")&&a.hash===\"\"&&(t=t.replace(/\\/$/,\"\")),(e.removeTrailingSlash||a.pathname===\"/\")&&a.hash===\"\"&&e.removeSingleSlash&&(t=t.replace(/\\/$/,\"\")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\\/\\//,\"//\")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\\/\\//,\"\")),t}var G5=(t,e=!1)=>{let r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\\/\\/)([\\w\\.\\-@]+)[\\/:]([\\~,\\.\\w,\\-,\\_,\\/]+?(?:\\.git|\\/)?)$/,s=n=>{let c=new Error(n);throw c.subject_url=t,c};(typeof t!=\"string\"||!t.trim())&&s(\"Invalid url.\"),t.length>G5.MAX_INPUT_LENGTH&&s(\"Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH.\"),e&&(typeof e!=\"object\"&&(e={stripHash:!1}),t=QSt(t,e));let a=bSt.default(t);if(a.parse_failed){let n=a.href.match(r);n?(a.protocols=[\"ssh\"],a.protocol=\"ssh\",a.resource=n[2],a.host=n[2],a.user=n[1],a.pathname=`/${n[3]}`,a.parse_failed=!1):s(\"URL parsing failed.\")}return a};G5.MAX_INPUT_LENGTH=2048;CBe.exports=G5});var SBe=L((xcr,vBe)=>{\"use strict\";var TSt=q5();function BBe(t){if(Array.isArray(t))return t.indexOf(\"ssh\")!==-1||t.indexOf(\"rsync\")!==-1;if(typeof t!=\"string\")return!1;var e=TSt(t);if(t=t.substring(t.indexOf(\"://\")+3),BBe(e))return!0;var r=new RegExp(\".([a-zA-Z\\\\d]+):(\\\\d+)/\");return!t.match(r)&&t.indexOf(\"@\")<t.indexOf(\":\")}vBe.exports=BBe});var PBe=L((kcr,bBe)=>{\"use strict\";var RSt=wBe(),DBe=SBe();function FSt(t){var e=RSt(t);return e.token=\"\",e.password===\"x-oauth-basic\"?e.token=e.user:e.user===\"x-token-auth\"&&(e.token=e.password),DBe(e.protocols)||e.protocols.length===0&&DBe(t)?e.protocol=\"ssh\":e.protocols.length?e.protocol=e.protocols[0]:(e.protocol=\"file\",e.protocols=[\"file\"]),e.href=e.href.replace(/\\/$/,\"\"),e}bBe.exports=FSt});var kBe=L((Qcr,xBe)=>{\"use strict\";var NSt=PBe();function W5(t){if(typeof t!=\"string\")throw new Error(\"The url must be a string.\");var e=/^([a-z\\d-]{1,39})\\/([-\\.\\w]{1,100})$/i;e.test(t)&&(t=\"https://github.com/\"+t);var r=NSt(t),s=r.resource.split(\".\"),a=null;switch(r.toString=function(N){return W5.stringify(this,N)},r.source=s.length>2?s.slice(1-s.length).join(\".\"):r.source=r.resource,r.git_suffix=/\\.git$/.test(r.pathname),r.name=decodeURIComponent((r.pathname||r.href).replace(/(^\\/)|(\\/$)/g,\"\").replace(/\\.git$/,\"\")),r.owner=decodeURIComponent(r.user),r.source){case\"git.cloudforge.com\":r.owner=r.user,r.organization=s[0],r.source=\"cloudforge.com\";break;case\"visualstudio.com\":if(r.resource===\"vs-ssh.visualstudio.com\"){a=r.name.split(\"/\"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3],r.full_name=a[2]+\"/\"+a[3]);break}else{a=r.name.split(\"/\"),a.length===2?(r.owner=a[1],r.name=a[1],r.full_name=\"_git/\"+r.name):a.length===3?(r.name=a[2],a[0]===\"DefaultCollection\"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+\"/_git/\"+r.name):(r.owner=a[0],r.full_name=r.owner+\"/_git/\"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+\"/\"+r.owner+\"/_git/\"+r.name);break}case\"dev.azure.com\":case\"azure.com\":if(r.resource===\"ssh.dev.azure.com\"){a=r.name.split(\"/\"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3]);break}else{a=r.name.split(\"/\"),a.length===5?(r.organization=a[0],r.owner=a[1],r.name=a[4],r.full_name=\"_git/\"+r.name):a.length===3?(r.name=a[2],a[0]===\"DefaultCollection\"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+\"/_git/\"+r.name):(r.owner=a[0],r.full_name=r.owner+\"/_git/\"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+\"/\"+r.owner+\"/_git/\"+r.name),r.query&&r.query.path&&(r.filepath=r.query.path.replace(/^\\/+/g,\"\")),r.query&&r.query.version&&(r.ref=r.query.version.replace(/^GB/,\"\"));break}default:a=r.name.split(\"/\");var n=a.length-1;if(a.length>=2){var c=a.indexOf(\"-\",2),f=a.indexOf(\"blob\",2),p=a.indexOf(\"tree\",2),h=a.indexOf(\"commit\",2),E=a.indexOf(\"src\",2),C=a.indexOf(\"raw\",2),S=a.indexOf(\"edit\",2);n=c>0?c-1:f>0?f-1:p>0?p-1:h>0?h-1:E>0?E-1:C>0?C-1:S>0?S-1:n,r.owner=a.slice(0,n).join(\"/\"),r.name=a[n],h&&(r.commit=a[n+2])}r.ref=\"\",r.filepathtype=\"\",r.filepath=\"\";var P=a.length>n&&a[n+1]===\"-\"?n+1:n;a.length>P+2&&[\"raw\",\"src\",\"blob\",\"tree\",\"edit\"].indexOf(a[P+1])>=0&&(r.filepathtype=a[P+1],r.ref=a[P+2],a.length>P+3&&(r.filepath=a.slice(P+3).join(\"/\"))),r.organization=r.owner;break}r.full_name||(r.full_name=r.owner,r.name&&(r.full_name&&(r.full_name+=\"/\"),r.full_name+=r.name)),r.owner.startsWith(\"scm/\")&&(r.source=\"bitbucket-server\",r.owner=r.owner.replace(\"scm/\",\"\"),r.organization=r.owner,r.full_name=r.owner+\"/\"+r.name);var I=/(projects|users)\\/(.*?)\\/repos\\/(.*?)((\\/.*$)|$)/,R=I.exec(r.pathname);return R!=null&&(r.source=\"bitbucket-server\",R[1]===\"users\"?r.owner=\"~\"+R[2]:r.owner=R[2],r.organization=r.owner,r.name=R[3],a=R[4].split(\"/\"),a.length>1&&([\"raw\",\"browse\"].indexOf(a[1])>=0?(r.filepathtype=a[1],a.length>2&&(r.filepath=a.slice(2).join(\"/\"))):a[1]===\"commits\"&&a.length>2&&(r.commit=a[2])),r.full_name=r.owner+\"/\"+r.name,r.query.at?r.ref=r.query.at:r.ref=\"\"),r}W5.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join(\"+\"):t.protocol);var r=t.port?\":\"+t.port:\"\",s=t.user||\"git\",a=t.git_suffix?\".git\":\"\";switch(e){case\"ssh\":return r?\"ssh://\"+s+\"@\"+t.resource+r+\"/\"+t.full_name+a:s+\"@\"+t.resource+\":\"+t.full_name+a;case\"git+ssh\":case\"ssh+git\":case\"ftp\":case\"ftps\":return e+\"://\"+s+\"@\"+t.resource+r+\"/\"+t.full_name+a;case\"http\":case\"https\":var n=t.token?OSt(t):t.user&&(t.protocols.includes(\"http\")||t.protocols.includes(\"https\"))?t.user+\"@\":\"\";return e+\"://\"+n+t.resource+r+\"/\"+LSt(t)+a;default:return t.href}};function OSt(t){switch(t.source){case\"bitbucket.org\":return\"x-token-auth:\"+t.token+\"@\";default:return t.token+\"@\"}}function LSt(t){switch(t.source){case\"bitbucket-server\":return\"scm/\"+t.full_name;default:return\"\"+t.full_name}}xBe.exports=W5});var YBe=L((ufr,WBe)=>{var KSt=RT(),JSt=Gk(),zSt=xc(),ZSt=aI(),XSt=IG(),$St=XI(),eDt=Tv();function tDt(t){return zSt(t)?KSt(t,$St):ZSt(t)?[t]:JSt(XSt(eDt(t)))}WBe.exports=tDt});function sDt(t,e){return e===1&&iDt.has(t[0])}function ES(t){let e=Array.isArray(t)?t:(0,JBe.default)(t);return e.map((s,a)=>rDt.test(s)?`[${s}]`:nDt.test(s)&&!sDt(e,a)?`.${s}`:`[${JSON.stringify(s)}]`).join(\"\").replace(/^\\./,\"\")}function oDt(t,e){let r=[];if(e.methodName!==null&&r.push(he.pretty(t,e.methodName,he.Type.CODE)),e.file!==null){let s=[];s.push(he.pretty(t,e.file,he.Type.PATH)),e.line!==null&&(s.push(he.pretty(t,e.line,he.Type.NUMBER)),e.column!==null&&s.push(he.pretty(t,e.column,he.Type.NUMBER))),r.push(`(${s.join(he.pretty(t,\":\",\"grey\"))})`)}return r.join(\" \")}function lF(t,{manifestUpdates:e,reportedErrors:r},{fix:s}={}){let a=new Map,n=new Map,c=[...r.keys()].map(f=>[f,new Map]);for(let[f,p]of[...c,...e]){let h=r.get(f)?.map(P=>({text:P,fixable:!1}))??[],E=!1,C=t.getWorkspaceByCwd(f),S=C.manifest.exportTo({});for(let[P,I]of p){if(I.size>1){let R=[...I].map(([N,U])=>{let W=he.pretty(t.configuration,N,he.Type.INSPECT),te=U.size>0?oDt(t.configuration,U.values().next().value):null;return te!==null?`\n${W} at ${te}`:`\n${W}`}).join(\"\");h.push({text:`Conflict detected in constraint targeting ${he.pretty(t.configuration,P,he.Type.CODE)}; conflicting values are:${R}`,fixable:!1})}else{let[[R]]=I,N=(0,VBe.default)(S,P);if(JSON.stringify(N)===JSON.stringify(R))continue;if(!s){let U=typeof N>\"u\"?`Missing field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}`:typeof R>\"u\"?`Extraneous field ${he.pretty(t.configuration,P,he.Type.CODE)} currently set to ${he.pretty(t.configuration,N,he.Type.INSPECT)}`:`Invalid field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}, found ${he.pretty(t.configuration,N,he.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof R>\"u\"?(0,zBe.default)(S,P):(0,KBe.default)(S,P,R),E=!0}E&&a.set(C,S)}h.length>0&&n.set(C,h)}return{changedWorkspaces:a,remainingErrors:n}}function ZBe(t,{configuration:e}){let r={children:[]};for(let[s,a]of t){let n=[];for(let f of a){let p=f.text.split(/\\n/);f.fixable&&(p[0]=`${he.pretty(e,\"\\u2699\",\"gray\")} ${p[0]}`),n.push({value:he.tuple(he.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:he.tuple(he.Type.NO_HINT,h)}))})}let c={value:he.tuple(he.Type.LOCATOR,s.anchoredLocator),children:je.sortMap(n,f=>f.value[1])};r.children.push(c)}return r.children=je.sortMap(r.children,s=>s.value[1]),r}var VBe,KBe,JBe,zBe,VC,rDt,nDt,iDt,IS=It(()=>{Ve();VBe=et(AS()),KBe=et(Q5()),JBe=et(YBe()),zBe=et(F5()),VC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let s=Object.hasOwn(e,r)?e[r]:void 0;if(typeof s>\"u\")continue;je.getArrayWithDefault(this.indexes[r],s).push(e)}return e}find(e){if(typeof e>\"u\")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let s=[],a;for(let[c,f]of r){let p=c,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>\"u\"){s.push([p,f]);continue}let E=new Set(h.get(f)??[]);if(E.size===0)return[];if(typeof a>\"u\")a=E;else for(let C of a)E.has(C)||a.delete(C);if(a.size===0)break}let n=[...a??[]];return s.length>0&&(n=n.filter(c=>{for(let[f,p]of s)if(!(typeof p<\"u\"?Object.hasOwn(c,f)&&c[f]===p:Object.hasOwn(c,f)===!1))return!1;return!0})),n}},rDt=/^[0-9]+$/,nDt=/^[a-zA-Z0-9_]+$/,iDt=new Set([\"scripts\",...Ht.allDependencies])});var XBe=L((wfr,s9)=>{var aDt;(function(t){var e=function(){return{\"append/2\":[new t.type.Rule(new t.type.Term(\"append\",[new t.type.Var(\"X\"),new t.type.Var(\"L\")]),new t.type.Term(\"foldl\",[new t.type.Term(\"append\",[]),new t.type.Var(\"X\"),new t.type.Term(\"[]\",[]),new t.type.Var(\"L\")]))],\"append/3\":[new t.type.Rule(new t.type.Term(\"append\",[new t.type.Term(\"[]\",[]),new t.type.Var(\"X\"),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"append\",[new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"S\")])]),new t.type.Term(\"append\",[new t.type.Var(\"T\"),new t.type.Var(\"X\"),new t.type.Var(\"S\")]))],\"member/2\":[new t.type.Rule(new t.type.Term(\"member\",[new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"_\")])]),null),new t.type.Rule(new t.type.Term(\"member\",[new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"_\"),new t.type.Var(\"Xs\")])]),new t.type.Term(\"member\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]))],\"permutation/2\":[new t.type.Rule(new t.type.Term(\"permutation\",[new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"permutation\",[new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"permutation\",[new t.type.Var(\"T\"),new t.type.Var(\"P\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"P\")]),new t.type.Term(\"append\",[new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"Y\")]),new t.type.Var(\"S\")])])]))],\"maplist/2\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"X\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"Xs\")])]))],\"maplist/3\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\")])]))],\"maplist/4\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\")])]))],\"maplist/5\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\")])]))],\"maplist/6\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")]),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Es\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\"),new t.type.Var(\"E\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\"),new t.type.Var(\"Es\")])]))],\"maplist/7\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")]),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Es\")]),new t.type.Term(\".\",[new t.type.Var(\"F\"),new t.type.Var(\"Fs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\"),new t.type.Var(\"E\"),new t.type.Var(\"F\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\"),new t.type.Var(\"Es\"),new t.type.Var(\"Fs\")])]))],\"maplist/8\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")]),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Es\")]),new t.type.Term(\".\",[new t.type.Var(\"F\"),new t.type.Var(\"Fs\")]),new t.type.Term(\".\",[new t.type.Var(\"G\"),new t.type.Var(\"Gs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\"),new t.type.Var(\"E\"),new t.type.Var(\"F\"),new t.type.Var(\"G\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\"),new t.type.Var(\"Es\"),new t.type.Var(\"Fs\"),new t.type.Var(\"Gs\")])]))],\"include/3\":[new t.type.Rule(new t.type.Term(\"include\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"include\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"L\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P\"),new t.type.Var(\"A\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"A\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"B\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"F\"),new t.type.Var(\"B\")]),new t.type.Term(\",\",[new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"F\")]),new t.type.Term(\",\",[new t.type.Term(\"=\",[new t.type.Var(\"L\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"S\")])]),new t.type.Term(\"!\",[])])]),new t.type.Term(\"=\",[new t.type.Var(\"L\"),new t.type.Var(\"S\")])]),new t.type.Term(\"include\",[new t.type.Var(\"P\"),new t.type.Var(\"T\"),new t.type.Var(\"S\")])])])])]))],\"exclude/3\":[new t.type.Rule(new t.type.Term(\"exclude\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"exclude\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"exclude\",[new t.type.Var(\"P\"),new t.type.Var(\"T\"),new t.type.Var(\"E\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P\"),new t.type.Var(\"L\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"L\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"Q\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"R\"),new t.type.Var(\"Q\")]),new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"R\")]),new t.type.Term(\",\",[new t.type.Term(\"!\",[]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"E\")])])]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"E\")])])])])])])]))],\"foldl/4\":[new t.type.Rule(new t.type.Term(\"foldl\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Var(\"I\"),new t.type.Var(\"I\")]),null),new t.type.Rule(new t.type.Term(\"foldl\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"I\"),new t.type.Var(\"R\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P\"),new t.type.Var(\"L\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"L\"),new t.type.Term(\".\",[new t.type.Var(\"I\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])])])]),new t.type.Var(\"L2\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P2\"),new t.type.Var(\"L2\")]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P2\")]),new t.type.Term(\"foldl\",[new t.type.Var(\"P\"),new t.type.Var(\"T\"),new t.type.Var(\"X\"),new t.type.Var(\"R\")])])])])]))],\"select/3\":[new t.type.Rule(new t.type.Term(\"select\",[new t.type.Var(\"E\"),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"Xs\")]),null),new t.type.Rule(new t.type.Term(\"select\",[new t.type.Var(\"E\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Ys\")])]),new t.type.Term(\"select\",[new t.type.Var(\"E\"),new t.type.Var(\"Xs\"),new t.type.Var(\"Ys\")]))],\"sum_list/2\":[new t.type.Rule(new t.type.Term(\"sum_list\",[new t.type.Term(\"[]\",[]),new t.type.Num(0,!1)]),null),new t.type.Rule(new t.type.Term(\"sum_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"sum_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\"is\",[new t.type.Var(\"S\"),new t.type.Term(\"+\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")])])]))],\"max_list/2\":[new t.type.Rule(new t.type.Term(\"max_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"max_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"max_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\">=\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")]),new t.type.Term(\",\",[new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"X\")]),new t.type.Term(\"!\",[])])]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"Y\")])])]))],\"min_list/2\":[new t.type.Rule(new t.type.Term(\"min_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"min_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"min_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\"=<\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")]),new t.type.Term(\",\",[new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"X\")]),new t.type.Term(\"!\",[])])]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"Y\")])])]))],\"prod_list/2\":[new t.type.Rule(new t.type.Term(\"prod_list\",[new t.type.Term(\"[]\",[]),new t.type.Num(1,!1)]),null),new t.type.Rule(new t.type.Term(\"prod_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"prod_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\"is\",[new t.type.Var(\"S\"),new t.type.Term(\"*\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")])])]))],\"last/2\":[new t.type.Rule(new t.type.Term(\"last\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"last\",[new t.type.Term(\".\",[new t.type.Var(\"_\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"X\")]),new t.type.Term(\"last\",[new t.type.Var(\"Xs\"),new t.type.Var(\"X\")]))],\"prefix/2\":[new t.type.Rule(new t.type.Term(\"prefix\",[new t.type.Var(\"Part\"),new t.type.Var(\"Whole\")]),new t.type.Term(\"append\",[new t.type.Var(\"Part\"),new t.type.Var(\"_\"),new t.type.Var(\"Whole\")]))],\"nth0/3\":[new t.type.Rule(new t.type.Term(\"nth0\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")])]),new t.type.Term(\",\",[new t.type.Term(\">=\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")]),new t.type.Term(\"!\",[])])])]))],\"nth1/3\":[new t.type.Rule(new t.type.Term(\"nth1\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")])]),new t.type.Term(\",\",[new t.type.Term(\">\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")]),new t.type.Term(\"!\",[])])])]))],\"nth0/4\":[new t.type.Rule(new t.type.Term(\"nth0\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")])]),new t.type.Term(\",\",[new t.type.Term(\">=\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\"!\",[])])])]))],\"nth1/4\":[new t.type.Rule(new t.type.Term(\"nth1\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")])]),new t.type.Term(\",\",[new t.type.Term(\">\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\"!\",[])])])]))],\"nth/5\":[new t.type.Rule(new t.type.Term(\"nth\",[new t.type.Var(\"N\"),new t.type.Var(\"N\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),null),new t.type.Rule(new t.type.Term(\"nth\",[new t.type.Var(\"N\"),new t.type.Var(\"O\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"Y\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Ys\")])]),new t.type.Term(\",\",[new t.type.Term(\"is\",[new t.type.Var(\"M\"),new t.type.Term(\"+\",[new t.type.Var(\"N\"),new t.type.Num(1,!1)])]),new t.type.Term(\"nth\",[new t.type.Var(\"M\"),new t.type.Var(\"O\"),new t.type.Var(\"Xs\"),new t.type.Var(\"Y\"),new t.type.Var(\"Ys\")])]))],\"length/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(!t.type.is_variable(f)&&!t.type.is_integer(f))s.throw_error(t.error.type(\"integer\",f,n.indicator));else if(t.type.is_integer(f)&&f.value<0)s.throw_error(t.error.domain(\"not_less_than_zero\",f,n.indicator));else{var p=new t.type.Term(\"length\",[c,new t.type.Num(0,!1),f]);t.type.is_integer(f)&&(p=new t.type.Term(\",\",[p,new t.type.Term(\"!\",[])])),s.prepend([new t.type.State(a.goal.replace(p),a.substitution,a)])}},\"length/3\":[new t.type.Rule(new t.type.Term(\"length\",[new t.type.Term(\"[]\",[]),new t.type.Var(\"N\"),new t.type.Var(\"N\")]),null),new t.type.Rule(new t.type.Term(\"length\",[new t.type.Term(\".\",[new t.type.Var(\"_\"),new t.type.Var(\"X\")]),new t.type.Var(\"A\"),new t.type.Var(\"N\")]),new t.type.Term(\",\",[new t.type.Term(\"succ\",[new t.type.Var(\"A\"),new t.type.Var(\"B\")]),new t.type.Term(\"length\",[new t.type.Var(\"X\"),new t.type.Var(\"B\"),new t.type.Var(\"N\")])]))],\"replicate/3\":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_integer(f))s.throw_error(t.error.type(\"integer\",f,n.indicator));else if(f.value<0)s.throw_error(t.error.domain(\"not_less_than_zero\",f,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type(\"list\",p,n.indicator));else{for(var h=new t.type.Term(\"[]\"),E=0;E<f.value;E++)h=new t.type.Term(\".\",[c,h]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[h,p])),a.substitution,a)])}},\"sort/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else{for(var p=[],h=c;h.indicator===\"./2\";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var E=p.sort(t.compare),C=E.length-1;C>0;C--)E[C].equals(E[C-1])&&E.splice(C,1);for(var S=new t.type.Term(\"[]\"),C=E.length-1;C>=0;C--)S=new t.type.Term(\".\",[E[C],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[S,f])),a.substitution,a)])}}},\"msort/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else{for(var p=[],h=c;h.indicator===\"./2\";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var E=p.sort(t.compare),C=new t.type.Term(\"[]\"),S=E.length-1;S>=0;S--)C=new t.type.Term(\".\",[E[S],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[C,f])),a.substitution,a)])}}},\"keysort/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else{for(var p=[],h,E=c;E.indicator===\"./2\";){if(h=E.args[0],t.type.is_variable(h)){s.throw_error(t.error.instantiation(n.indicator));return}else if(!t.type.is_term(h)||h.indicator!==\"-/2\"){s.throw_error(t.error.type(\"pair\",h,n.indicator));return}h.args[0].pair=h.args[1],p.push(h.args[0]),E=E.args[1]}if(t.type.is_variable(E))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(E))s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var C=p.sort(t.compare),S=new t.type.Term(\"[]\"),P=C.length-1;P>=0;P--)S=new t.type.Term(\".\",[new t.type.Term(\"-\",[C[P],C[P].pair]),S]),delete C[P].pair;s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[S,f])),a.substitution,a)])}}},\"take/3\":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type(\"integer\",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type(\"list\",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator===\"./2\";)E.push(C.args[0]),C=C.args[1],h--;if(h===0){for(var S=new t.type.Term(\"[]\"),h=E.length-1;h>=0;h--)S=new t.type.Term(\".\",[E[h],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[S,p])),a.substitution,a)])}}},\"drop/3\":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type(\"integer\",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type(\"list\",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator===\"./2\";)E.push(C.args[0]),C=C.args[1],h--;h===0&&s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[C,p])),a.substitution,a)])}},\"reverse/2\":function(s,a,n){var c=n.args[0],f=n.args[1],p=t.type.is_instantiated_list(c),h=t.type.is_instantiated_list(f);if(t.type.is_variable(c)&&t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(c)&&!t.type.is_fully_list(c))s.throw_error(t.error.type(\"list\",c,n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else if(!p&&!h)s.throw_error(t.error.instantiation(n.indicator));else{for(var E=p?c:f,C=new t.type.Term(\"[]\",[]);E.indicator===\"./2\";)C=new t.type.Term(\".\",[E.args[0],C]),E=E.args[1];s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[C,p?f:c])),a.substitution,a)])}},\"list_to_set/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else{for(var p=c,h=[];p.indicator===\"./2\";)h.push(p.args[0]),p=p.args[1];if(t.type.is_variable(p))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_term(p)||p.indicator!==\"[]/0\")s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var E=[],C=new t.type.Term(\"[]\",[]),S,P=0;P<h.length;P++){S=!1;for(var I=0;I<E.length&&!S;I++)S=t.compare(h[P],E[I])===0;S||E.push(h[P])}for(P=E.length-1;P>=0;P--)C=new t.type.Term(\".\",[E[P],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[f,C])),a.substitution,a)])}}}}},r=[\"append/2\",\"append/3\",\"member/2\",\"permutation/2\",\"maplist/2\",\"maplist/3\",\"maplist/4\",\"maplist/5\",\"maplist/6\",\"maplist/7\",\"maplist/8\",\"include/3\",\"exclude/3\",\"foldl/4\",\"sum_list/2\",\"max_list/2\",\"min_list/2\",\"prod_list/2\",\"last/2\",\"prefix/2\",\"nth0/3\",\"nth1/3\",\"nth0/4\",\"nth1/4\",\"length/2\",\"replicate/3\",\"select/3\",\"sort/2\",\"msort/2\",\"keysort/2\",\"take/3\",\"drop/3\",\"reverse/2\",\"list_to_set/2\"];typeof s9<\"u\"?s9.exports=function(s){t=s,new t.type.Module(\"lists\",e(),r)}:new t.type.Module(\"lists\",e(),r)})(aDt)});var pve=L($r=>{\"use strict\";var Pm=process.platform===\"win32\",o9=\"aes-256-cbc\",lDt=\"sha256\",tve=\"The current environment doesn't support interactive reading from TTY.\",ii=ye(\"fs\"),$Be=process.binding(\"tty_wrap\").TTY,l9=ye(\"child_process\"),K0=ye(\"path\"),c9={prompt:\"> \",hideEchoBack:!1,mask:\"*\",limit:[],limitMessage:\"Input another, please.$<( [)limit(])>\",defaultInput:\"\",trueValue:[],falseValue:[],caseSensitive:!1,keepWhitespace:!1,encoding:\"utf8\",bufferSize:1024,print:void 0,history:!0,cd:!1,phContent:void 0,preCheck:void 0},eh=\"none\",$u,JC,eve=!1,V0,uF,a9,cDt=0,h9=\"\",bm=[],fF,rve=!1,u9=!1,CS=!1;function nve(t){function e(r){return r.replace(/[^\\w\\u0080-\\uFFFF]/g,function(s){return\"#\"+s.charCodeAt(0)+\";\"})}return uF.concat(function(r){var s=[];return Object.keys(r).forEach(function(a){r[a]===\"boolean\"?t[a]&&s.push(\"--\"+a):r[a]===\"string\"&&t[a]&&s.push(\"--\"+a,e(t[a]))}),s}({display:\"string\",displayOnly:\"boolean\",keyIn:\"boolean\",hideEchoBack:\"boolean\",mask:\"string\",limit:\"string\",caseSensitive:\"boolean\"}))}function uDt(t,e){function r(U){var W,te=\"\",ie;for(a9=a9||ye(\"os\").tmpdir();;){W=K0.join(a9,U+te);try{ie=ii.openSync(W,\"wx\")}catch(Ae){if(Ae.code===\"EEXIST\"){te++;continue}else throw Ae}ii.closeSync(ie);break}return W}var s,a,n,c={},f,p,h=r(\"readline-sync.stdout\"),E=r(\"readline-sync.stderr\"),C=r(\"readline-sync.exit\"),S=r(\"readline-sync.done\"),P=ye(\"crypto\"),I,R,N;I=P.createHash(lDt),I.update(\"\"+process.pid+cDt+++Math.random()),N=I.digest(\"hex\"),R=P.createDecipher(o9,N),s=nve(t),Pm?(a=process.env.ComSpec||\"cmd.exe\",process.env.Q='\"',n=[\"/V:ON\",\"/S\",\"/C\",\"(%Q%\"+a+\"%Q% /V:ON /S /C %Q%%Q%\"+V0+\"%Q%\"+s.map(function(U){return\" %Q%\"+U+\"%Q%\"}).join(\"\")+\" & (echo !ERRORLEVEL!)>%Q%\"+C+\"%Q%%Q%) 2>%Q%\"+E+\"%Q% |%Q%\"+process.execPath+\"%Q% %Q%\"+__dirname+\"\\\\encrypt.js%Q% %Q%\"+o9+\"%Q% %Q%\"+N+\"%Q% >%Q%\"+h+\"%Q% & (echo 1)>%Q%\"+S+\"%Q%\"]):(a=\"/bin/sh\",n=[\"-c\",'(\"'+V0+'\"'+s.map(function(U){return\" '\"+U.replace(/'/g,\"'\\\\''\")+\"'\"}).join(\"\")+'; echo $?>\"'+C+'\") 2>\"'+E+'\" |\"'+process.execPath+'\" \"'+__dirname+'/encrypt.js\" \"'+o9+'\" \"'+N+'\" >\"'+h+'\"; echo 1 >\"'+S+'\"']),CS&&CS(\"_execFileSync\",s);try{l9.spawn(a,n,e)}catch(U){c.error=new Error(U.message),c.error.method=\"_execFileSync - spawn\",c.error.program=a,c.error.args=n}for(;ii.readFileSync(S,{encoding:t.encoding}).trim()!==\"1\";);return(f=ii.readFileSync(C,{encoding:t.encoding}).trim())===\"0\"?c.input=R.update(ii.readFileSync(h,{encoding:\"binary\"}),\"hex\",t.encoding)+R.final(t.encoding):(p=ii.readFileSync(E,{encoding:t.encoding}).trim(),c.error=new Error(tve+(p?`\n`+p:\"\")),c.error.method=\"_execFileSync\",c.error.program=a,c.error.args=n,c.error.extMessage=p,c.error.exitCode=+f),ii.unlinkSync(h),ii.unlinkSync(E),ii.unlinkSync(C),ii.unlinkSync(S),c}function fDt(t){var e,r={},s,a={env:process.env,encoding:t.encoding};if(V0||(Pm?process.env.PSModulePath?(V0=\"powershell.exe\",uF=[\"-ExecutionPolicy\",\"Bypass\",\"-File\",__dirname+\"\\\\read.ps1\"]):(V0=\"cscript.exe\",uF=[\"//nologo\",__dirname+\"\\\\read.cs.js\"]):(V0=\"/bin/sh\",uF=[__dirname+\"/read.sh\"])),Pm&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),l9.execFileSync){e=nve(t),CS&&CS(\"execFileSync\",e);try{r.input=l9.execFileSync(V0,e,a)}catch(n){s=n.stderr?(n.stderr+\"\").trim():\"\",r.error=new Error(tve+(s?`\n`+s:\"\")),r.error.method=\"execFileSync\",r.error.program=V0,r.error.args=e,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=uDt(t,a);return r.error||(r.input=r.input.replace(/^\\s*'|'\\s*$/g,\"\"),t.display=\"\"),r}function f9(t){var e=\"\",r=t.display,s=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=fDt(t);if(n.error)throw n.error;return n.input}return u9&&u9(t),function(){var n,c,f;function p(){return n||(n=process.binding(\"fs\"),c=process.binding(\"constants\")),n}if(typeof eh==\"string\")if(eh=null,Pm){if(f=function(h){var E=h.replace(/^\\D+/,\"\").split(\".\"),C=0;return(E[0]=+E[0])&&(C+=E[0]*1e4),(E[1]=+E[1])&&(C+=E[1]*100),(E[2]=+E[2])&&(C+=E[2]),C}(process.version),!(f>=20302&&f<40204||f>=5e4&&f<50100||f>=50600&&f<60200)&&process.stdin.isTTY)process.stdin.pause(),eh=process.stdin.fd,JC=process.stdin._handle;else try{eh=p().open(\"CONIN$\",c.O_RDWR,parseInt(\"0666\",8)),JC=new $Be(eh,!0)}catch{}if(process.stdout.isTTY)$u=process.stdout.fd;else{try{$u=ii.openSync(\"\\\\\\\\.\\\\CON\",\"w\")}catch{}if(typeof $u!=\"number\")try{$u=p().open(\"CONOUT$\",c.O_RDWR,parseInt(\"0666\",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{eh=ii.openSync(\"/dev/tty\",\"r\"),JC=process.stdin._handle}catch{}}else try{eh=ii.openSync(\"/dev/tty\",\"r\"),JC=new $Be(eh,!1)}catch{}if(process.stdout.isTTY)$u=process.stdout.fd;else try{$u=ii.openSync(\"/dev/tty\",\"w\")}catch{}}}(),function(){var n,c,f=!t.hideEchoBack&&!t.keyIn,p,h,E,C,S;fF=\"\";function P(I){return I===eve?!0:JC.setRawMode(I)!==0?!1:(eve=I,!0)}if(rve||!JC||typeof $u!=\"number\"&&(t.display||!f)){e=a();return}if(t.display&&(ii.writeSync($u,t.display),t.display=\"\"),!t.displayOnly){if(!P(!f)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(c=new RegExp(\"[^\"+t.limit+\"]\",\"g\"+(t.caseSensitive?\"\":\"i\")));;){E=0;try{E=ii.readSync(eh,p,0,h)}catch(I){if(I.code!==\"EOF\"){P(!1),e+=a();return}}if(E>0?(C=p.toString(t.encoding,0,E),fF+=C):(C=`\n`,fF+=\"\\0\"),C&&typeof(S=(C.match(/^(.*?)[\\r\\n]/)||[])[1])==\"string\"&&(C=S,n=!0),C&&(C=C.replace(/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/g,\"\")),C&&c&&(C=C.replace(c,\"\")),C&&(f||(t.hideEchoBack?t.mask&&ii.writeSync($u,new Array(C.length+1).join(t.mask)):ii.writeSync($u,C)),e+=C),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!f&&!s&&ii.writeSync($u,`\n`),P(!1)}}(),t.print&&!s&&t.print(r+(t.displayOnly?\"\":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`\n`),t.encoding),t.displayOnly?\"\":h9=t.keepWhitespace||t.keyIn?e:e.trim()}function ADt(t,e){var r=[];function s(a){a!=null&&(Array.isArray(a)?a.forEach(s):(!e||e(a))&&r.push(a))}return s(t),r}function g9(t){return t.replace(/[\\x00-\\x7f]/g,function(e){return\"\\\\x\"+(\"00\"+e.charCodeAt().toString(16)).substr(-2)})}function Ks(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]==\"boolean\"&&(r=t.shift(),r&&(e=Object.keys(c9),t.unshift(c9))),t.reduce(function(s,a){return a==null||(a.hasOwnProperty(\"noEchoBack\")&&!a.hasOwnProperty(\"hideEchoBack\")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty(\"noTrim\")&&!a.hasOwnProperty(\"keepWhitespace\")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var c;if(a.hasOwnProperty(n))switch(c=a[n],n){case\"mask\":case\"limitMessage\":case\"defaultInput\":case\"encoding\":c=c!=null?c+\"\":\"\",c&&n!==\"limitMessage\"&&(c=c.replace(/[\\r\\n]/g,\"\")),s[n]=c;break;case\"bufferSize\":!isNaN(c=parseInt(c,10))&&typeof c==\"number\"&&(s[n]=c);break;case\"displayOnly\":case\"keyIn\":case\"hideEchoBack\":case\"caseSensitive\":case\"keepWhitespace\":case\"history\":case\"cd\":s[n]=!!c;break;case\"limit\":case\"trueValue\":case\"falseValue\":s[n]=ADt(c,function(f){var p=typeof f;return p===\"string\"||p===\"number\"||p===\"function\"||f instanceof RegExp}).map(function(f){return typeof f==\"string\"?f.replace(/[\\r\\n]/g,\"\"):f});break;case\"print\":case\"phContent\":case\"preCheck\":s[n]=typeof c==\"function\"?c:void 0;break;case\"prompt\":case\"display\":s[n]=c??\"\";break}})),s},{})}function A9(t,e,r){return e.some(function(s){var a=typeof s;return a===\"string\"?r?t===s:t.toLowerCase()===s.toLowerCase():a===\"number\"?parseFloat(t)===s:a===\"function\"?s(t):s instanceof RegExp?s.test(t):!1})}function d9(t,e){var r=K0.normalize(Pm?(process.env.HOMEDRIVE||\"\")+(process.env.HOMEPATH||\"\"):process.env.HOME||\"\").replace(/[\\/\\\\]+$/,\"\");return t=K0.normalize(t),e?t.replace(/^~(?=\\/|\\\\|$)/,r):t.replace(new RegExp(\"^\"+g9(r)+\"(?=\\\\/|\\\\\\\\|$)\",Pm?\"i\":\"\"),\"~\")}function zC(t,e){var r=\"(?:\\\\(([\\\\s\\\\S]*?)\\\\))?(\\\\w+|.-.)(?:\\\\(([\\\\s\\\\S]*?)\\\\))?\",s=new RegExp(\"(\\\\$)?(\\\\$<\"+r+\">)\",\"g\"),a=new RegExp(\"(\\\\$)?(\\\\$\\\\{\"+r+\"\\\\})\",\"g\");function n(c,f,p,h,E,C){var S;return f||typeof(S=e(E))!=\"string\"?p:S?(h||\"\")+S+(C||\"\"):\"\"}return t.replace(s,n).replace(a,n)}function ive(t,e,r){var s,a=[],n=-1,c=0,f=\"\",p;function h(E,C){return C.length>3?(E.push(C[0]+\"...\"+C[C.length-1]),p=!0):C.length&&(E=E.concat(C)),E}return s=t.reduce(function(E,C){return E.concat((C+\"\").split(\"\"))},[]).reduce(function(E,C){var S,P;return e||(C=C.toLowerCase()),S=/^\\d$/.test(C)?1:/^[A-Z]$/.test(C)?2:/^[a-z]$/.test(C)?3:0,r&&S===0?f+=C:(P=C.charCodeAt(0),S&&S===n&&P===c+1?a.push(C):(E=h(E,a),a=[C],n=S),c=P),E},[]),s=h(s,a),f&&(s.push(f),p=!0),{values:s,suppressed:p}}function sve(t,e){return t.join(t.length>2?\", \":e?\" / \":\"/\")}function ove(t,e){var r,s,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!=\"string\")switch(t){case\"hideEchoBack\":case\"mask\":case\"defaultInput\":case\"caseSensitive\":case\"keepWhitespace\":case\"encoding\":case\"bufferSize\":case\"history\":case\"cd\":r=e.hasOwnProperty(t)?typeof e[t]==\"boolean\"?e[t]?\"on\":\"off\":e[t]+\"\":\"\";break;case\"limit\":case\"trueValue\":case\"falseValue\":s=e[e.hasOwnProperty(t+\"Src\")?t+\"Src\":t],e.keyIn?(a=ive(s,e.caseSensitive),s=a.values):s=s.filter(function(c){var f=typeof c;return f===\"string\"||f===\"number\"}),r=sve(s,a.suppressed);break;case\"limitCount\":case\"limitCountNotZero\":r=e[e.hasOwnProperty(\"limitSrc\")?\"limitSrc\":\"limit\"].length,r=r||t!==\"limitCountNotZero\"?r+\"\":\"\";break;case\"lastInput\":r=h9;break;case\"cwd\":case\"CWD\":case\"cwdHome\":r=process.cwd(),t===\"CWD\"?r=K0.basename(r):t===\"cwdHome\"&&(r=d9(r));break;case\"date\":case\"time\":case\"localeDate\":case\"localeTime\":r=new Date()[\"to\"+t.replace(/^./,function(c){return c.toUpperCase()})+\"String\"]();break;default:typeof(n=(t.match(/^history_m(\\d+)$/)||[])[1])==\"string\"&&(r=bm[bm.length-n]||\"\")}return r}function ave(t){var e=/^(.)-(.)$/.exec(t),r=\"\",s,a,n,c;if(!e)return null;for(s=e[1].charCodeAt(0),a=e[2].charCodeAt(0),c=s<a?1:-1,n=s;n!==a+c;n+=c)r+=String.fromCharCode(n);return r}function p9(t){var e=new RegExp(/(\\s*)(?:(\"|')(.*?)(?:\\2|$)|(\\S+))/g),r,s=\"\",a=[],n;for(t=t.trim();r=e.exec(t);)n=r[3]||r[4]||\"\",r[1]&&(a.push(s),s=\"\"),s+=n;return s&&a.push(s),a}function lve(t,e){return e.trueValue.length&&A9(t,e.trueValue,e.caseSensitive)?!0:e.falseValue.length&&A9(t,e.falseValue,e.caseSensitive)?!1:t}function cve(t){var e,r,s,a,n,c,f;function p(E){return ove(E,t)}function h(E){t.display+=(/[^\\r\\n]$/.test(t.display)?`\n`:\"\")+E}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit=\"\",t.display=zC(t.display+\"\",p);;){if(e=f9(t),r=!1,s=\"\",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\\s*\\!(?:\\!|-1)(:p)?\\s*$/.exec(e))?(n=bm[0]||\"\",a[1]?r=!0:e=n,h(n+`\n`),r||(t.displayOnly=!0,f9(t),t.displayOnly=!1)):e&&e!==bm[bm.length-1]&&(bm=[e])),!r&&t.cd&&e)switch(c=p9(e),c[0].toLowerCase()){case\"cd\":if(c[1])try{process.chdir(d9(c[1],!0))}catch(E){h(E+\"\")}r=!0;break;case\"pwd\":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(f=t.preCheck(e,t),e=f.res,f.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||A9(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(s=zC(t.limitMessage,p))}h((s?s+`\n`:\"\")+zC(t.displaySrc+\"\",p))}return lve(e,t)}$r._DBG_set_useExt=function(t){rve=t};$r._DBG_set_checkOptions=function(t){u9=t};$r._DBG_set_checkMethod=function(t){CS=t};$r._DBG_clearHistory=function(){h9=\"\",bm=[]};$r.setDefaultOptions=function(t){return c9=Ks(!0,t),Ks(!0)};$r.question=function(t,e){return cve(Ks(Ks(!0,e),{display:t}))};$r.prompt=function(t){var e=Ks(!0,t);return e.display=e.prompt,cve(e)};$r.keyIn=function(t,e){var r=Ks(Ks(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(s){var a=typeof s;return a===\"string\"||a===\"number\"}).map(function(s){return zC(s+\"\",ave)}),r.limit=g9(r.limitSrc.join(\"\")),[\"trueValue\",\"falseValue\"].forEach(function(s){r[s]=r[s].reduce(function(a,n){var c=typeof n;return c===\"string\"||c===\"number\"?a=a.concat((n+\"\").split(\"\")):a.push(n),a},[])}),r.display=zC(r.display+\"\",function(s){return ove(s,r)}),lve(f9(r),r)};$r.questionEMail=function(t,e){return t==null&&(t=\"Input e-mail address: \"),$r.question(t,Ks({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:\"Input valid e-mail address, please.\",trueValue:null,falseValue:null},e,{keepWhitespace:!1,cd:!1}))};$r.questionNewPassword=function(t,e){var r,s,a,n=Ks({hideEchoBack:!0,mask:\"*\",limitMessage:`It can include: $<charlist>\nAnd the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(P){return P===\"charlist\"?r.text:P===\"length\"?s+\"...\"+a:null}}),c,f,p,h,E,C,S;for(e=e||{},c=zC(e.charlist?e.charlist+\"\":\"$<!-~>\",ave),(isNaN(s=parseInt(e.min,10))||typeof s!=\"number\")&&(s=12),(isNaN(a=parseInt(e.max,10))||typeof a!=\"number\")&&(a=24),h=new RegExp(\"^[\"+g9(c)+\"]{\"+s+\",\"+a+\"}$\"),r=ive([c],n.caseSensitive,!0),r.text=sve(r.values,r.suppressed),f=e.confirmMessage!=null?e.confirmMessage:\"Reinput a same one to confirm it: \",p=e.unmatchMessage!=null?e.unmatchMessage:\"It differs from first one. Hit only the Enter key if you want to retry from first one.\",t==null&&(t=\"Input new password: \"),E=n.limitMessage;!S;)n.limit=h,n.limitMessage=E,C=$r.question(t,n),n.limit=[C,\"\"],n.limitMessage=p,S=$r.question(f,n);return C};function uve(t,e,r){var s;function a(n){return s=r(n),!isNaN(s)&&typeof s==\"number\"}return $r.question(t,Ks({limitMessage:\"Input valid number, please.\"},e,{limit:a,cd:!1})),s}$r.questionInt=function(t,e){return uve(t,e,function(r){return parseInt(r,10)})};$r.questionFloat=function(t,e){return uve(t,e,parseFloat)};$r.questionPath=function(t,e){var r,s=\"\",a=Ks({hideEchoBack:!1,limitMessage:`$<error(\n)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var c,f,p;n=d9(n,!0),s=\"\";function h(E){E.split(/\\/|\\\\/).reduce(function(C,S){var P=K0.resolve(C+=S+K0.sep);if(!ii.existsSync(P))ii.mkdirSync(P);else if(!ii.statSync(P).isDirectory())throw new Error(\"Non directory already exists: \"+P);return C},\"\")}try{if(c=ii.existsSync(n),r=c?ii.realpathSync(n):K0.resolve(n),!e.hasOwnProperty(\"exists\")&&!c||typeof e.exists==\"boolean\"&&e.exists!==c)return s=(c?\"Already exists\":\"No such file or directory\")+\": \"+r,!1;if(!c&&e.create&&(e.isDirectory?h(r):(h(K0.dirname(r)),ii.closeSync(ii.openSync(r,\"w\"))),r=ii.realpathSync(r)),c&&(e.min||e.max||e.isFile||e.isDirectory)){if(f=ii.statSync(r),e.isFile&&!f.isFile())return s=\"Not file: \"+r,!1;if(e.isDirectory&&!f.isDirectory())return s=\"Not directory: \"+r,!1;if(e.min&&f.size<+e.min||e.max&&f.size>+e.max)return s=\"Size \"+f.size+\" is out of range: \"+r,!1}if(typeof e.validate==\"function\"&&(p=e.validate(r))!==!0)return typeof p==\"string\"&&(s=p),!1}catch(E){return s=E+\"\",!1}return!0},phContent:function(n){return n===\"error\"?s:n!==\"min\"&&n!==\"max\"?null:e.hasOwnProperty(n)?e[n]+\"\":\"\"}});return e=e||{},t==null&&(t='Input path (you can \"cd\" and \"pwd\"): '),$r.question(t,a),r};function fve(t,e){var r={},s={};return typeof t==\"object\"?(Object.keys(t).forEach(function(a){typeof t[a]==\"function\"&&(s[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=p9(a),n=r.args[0]||\"\",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!==\"_\"&&s.hasOwnProperty(n)?s[n].apply(a,r.args.slice(1)):s.hasOwnProperty(\"_\")?s._.apply(a,r.args):null,{res:a,forceNext:!1}},s.hasOwnProperty(\"_\")||(r.limit=function(){var a=r.args[0]||\"\";return e.caseSensitive||(a=a.toLowerCase()),s.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=p9(a),r.hRes=typeof t==\"function\"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}$r.promptCL=function(t,e){var r=Ks({hideEchoBack:!1,limitMessage:\"Requested command is not available.\",caseSensitive:!1,history:!0},e),s=fve(t,r);return r.limit=s.limit,r.preCheck=s.preCheck,$r.prompt(r),s.args};$r.promptLoop=function(t,e){for(var r=Ks({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t($r.prompt(r)););};$r.promptCLLoop=function(t,e){var r=Ks({hideEchoBack:!1,limitMessage:\"Requested command is not available.\",caseSensitive:!1,history:!0},e),s=fve(t,r);for(r.limit=s.limit,r.preCheck=s.preCheck;$r.prompt(r),!s.hRes;);};$r.promptSimShell=function(t){return $r.prompt(Ks({hideEchoBack:!1,history:!0},t,{prompt:function(){return Pm?\"$<cwd>>\":(process.env.USER||\"\")+(process.env.HOSTNAME?\"@\"+process.env.HOSTNAME.replace(/\\..*$/,\"\"):\"\")+\":$<cwdHome>$ \"}()}))};function Ave(t,e,r){var s;return t==null&&(t=\"Are you sure? \"),(!e||e.guide!==!1)&&(t+=\"\")&&(t=t.replace(/\\s*:?\\s*$/,\"\")+\" [y/n]: \"),s=$r.keyIn(t,Ks(e,{hideEchoBack:!1,limit:r,trueValue:\"y\",falseValue:\"n\",caseSensitive:!1})),typeof s==\"boolean\"?s:\"\"}$r.keyInYN=function(t,e){return Ave(t,e)};$r.keyInYNStrict=function(t,e){return Ave(t,e,\"yn\")};$r.keyInPause=function(t,e){t==null&&(t=\"Continue...\"),(!e||e.guide!==!1)&&(t+=\"\")&&(t=t.replace(/\\s+$/,\"\")+\" (Hit any key)\"),$r.keyIn(t,Ks({limit:null},e,{hideEchoBack:!0,mask:\"\"}))};$r.keyInSelect=function(t,e,r){var s=Ks({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p===\"itemsCount\"?t.length+\"\":p===\"firstItem\"?(t[0]+\"\").trim():p===\"lastItem\"?(t[t.length-1]+\"\").trim():null}}),a=\"\",n={},c=49,f=`\n`;if(!Array.isArray(t)||!t.length||t.length>35)throw\"`items` must be Array (max length: 35).\";return t.forEach(function(p,h){var E=String.fromCharCode(c);a+=E,n[E]=h,f+=\"[\"+E+\"] \"+(p+\"\").trim()+`\n`,c=c===57?97:c+1}),(!r||r.cancel!==!1)&&(a+=\"0\",n[0]=-1,f+=\"[0] \"+(r&&r.cancel!=null&&typeof r.cancel!=\"boolean\"?(r.cancel+\"\").trim():\"CANCEL\")+`\n`),s.limit=a,f+=`\n`,e==null&&(e=\"Choose one from list: \"),(e+=\"\")&&((!r||r.guide!==!1)&&(e=e.replace(/\\s*:?\\s*$/,\"\")+\" [$<limit>]: \"),f+=e),n[$r.keyIn(f,s).toLowerCase()]};$r.getRawInput=function(){return fF};function wS(t,e){var r;return e.length&&(r={},r[t]=e[0]),$r.setDefaultOptions(r)[t]}$r.setPrint=function(){return wS(\"print\",arguments)};$r.setPrompt=function(){return wS(\"prompt\",arguments)};$r.setEncoding=function(){return wS(\"encoding\",arguments)};$r.setMask=function(){return wS(\"mask\",arguments)};$r.setBufferSize=function(){return wS(\"bufferSize\",arguments)}});var m9=L((vfr,tc)=>{(function(){var t={major:0,minor:2,patch:66,status:\"beta\"};tau_file_system={files:{},open:function(w,b,y){var F=tau_file_system.files[w];if(!F){if(y===\"read\")return null;F={path:w,text:\"\",type:b,get:function(z,Z){return Z===this.text.length||Z>this.text.length?\"end_of_file\":this.text.substring(Z,Z+z)},put:function(z,Z){return Z===\"end_of_file\"?(this.text+=z,!0):Z===\"past_end_of_file\"?null:(this.text=this.text.substring(0,Z)+z+this.text.substring(Z+z.length),!0)},get_byte:function(z){if(z===\"end_of_stream\")return-1;var Z=Math.floor(z/2);if(this.text.length<=Z)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,Z){var $=Z===\"end_of_stream\"?this.text.length:Math.floor(Z/2);if(this.text.length<$)return null;var oe=this.text.length===$?-1:n(this.text[Math.floor(Z/2)],0);return Z%2===0?(oe=oe/256>>>0,oe=(oe&255)<<8|z&255):(oe=oe&255,oe=(z&255)<<8|oe&255),this.text.length===$?this.text+=c(oe):this.text=this.text.substring(0,$)+c(oe)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[w]=F}return y===\"write\"&&(F.text=\"\"),F}},tau_user_input={buffer:\"\",get:function(w,b){for(var y;tau_user_input.buffer.length<w;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,w),tau_user_input.buffer=tau_user_input.buffer.substr(w),y}},tau_user_output={put:function(w,b){return console.log(w),!0},flush:function(){return!0}},nodejs_file_system={open:function(w,b,y){var F=ye(\"fs\"),z=F.openSync(w,y[0]);return y===\"read\"&&!F.existsSync(w)?null:{get:function(Z,$){var oe=new Buffer(Z);return F.readSync(z,oe,0,Z,$),oe.toString()},put:function(Z,$){var oe=Buffer.from(Z);if($===\"end_of_file\")F.writeSync(z,oe);else{if($===\"past_end_of_file\")return null;F.writeSync(z,oe,0,oe.length,$)}return!0},get_byte:function(Z){return null},put_byte:function(Z,$){return null},flush:function(){return!0},close:function(){return F.closeSync(z),!0}}}},nodejs_user_input={buffer:\"\",get:function(w,b){for(var y,F=pve();nodejs_user_input.buffer.length<w;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,w),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(w),y}},nodejs_user_output={put:function(w,b){return process.stdout.write(w),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(w,b){return w.indexOf(b)}:e=function(w,b){for(var y=w.length,F=0;F<y;F++)if(b===w[F])return F;return-1};var r=function(w,b){if(w.length!==0){for(var y=w[0],F=w.length,z=1;z<F;z++)y=b(y,w[z]);return y}},s;Array.prototype.map?s=function(w,b){return w.map(b)}:s=function(w,b){for(var y=[],F=w.length,z=0;z<F;z++)y.push(b(w[z]));return y};var a;Array.prototype.filter?a=function(w,b){return w.filter(b)}:a=function(w,b){for(var y=[],F=w.length,z=0;z<F;z++)b(w[z])&&y.push(w[z]);return y};var n;String.prototype.codePointAt?n=function(w,b){return w.codePointAt(b)}:n=function(w,b){return w.charCodeAt(b)};var c;String.fromCodePoint?c=function(){return String.fromCodePoint.apply(null,arguments)}:c=function(){return String.fromCharCode.apply(null,arguments)};var f=0,p=1,h=/(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)|\\\\x([0-9a-fA-F]+)\\\\|\\\\([0-7]+)\\\\|(\\\\\\\\)|(\\\\')|('')|(\\\\\")|(\\\\`)|(\\\\.)|(.)/g,E={\"\\\\a\":7,\"\\\\b\":8,\"\\\\f\":12,\"\\\\n\":10,\"\\\\r\":13,\"\\\\t\":9,\"\\\\v\":11};function C(w){var b=[],y=!1;return w.replace(h,function(F,z,Z,$,oe,xe,Te,lt,Et,qt,ir,Pt,gn,Pr,Ir,Nr,nn){switch(!0){case Et!==void 0:return b.push(parseInt(Et,16)),\"\";case qt!==void 0:return b.push(parseInt(qt,8)),\"\";case ir!==void 0:case Pt!==void 0:case gn!==void 0:case Pr!==void 0:case Ir!==void 0:return b.push(n(F.substr(1),0)),\"\";case nn!==void 0:return b.push(n(nn,0)),\"\";case Nr!==void 0:y=!0;default:return b.push(E[F]),\"\"}}),y?null:b}function S(w,b){var y=\"\";if(w.length<2)return w;try{w=w.replace(/\\\\([0-7]+)\\\\/g,function($,oe){return c(parseInt(oe,8))}),w=w.replace(/\\\\x([0-9a-fA-F]+)\\\\/g,function($,oe){return c(parseInt(oe,16))})}catch{return null}for(var F=0;F<w.length;F++){var z=w.charAt(F),Z=w.charAt(F+1);if(z===b&&Z===b)F++,y+=b;else if(z===\"\\\\\")if([\"a\",\"b\",\"f\",\"n\",\"r\",\"t\",\"v\",\"'\",'\"',\"\\\\\",\"a\",\"\\b\",\"\\f\",`\n`,\"\\r\",\"\t\",\"\\v\"].indexOf(Z)!==-1)switch(F+=1,Z){case\"a\":y+=\"a\";break;case\"b\":y+=\"\\b\";break;case\"f\":y+=\"\\f\";break;case\"n\":y+=`\n`;break;case\"r\":y+=\"\\r\";break;case\"t\":y+=\"\t\";break;case\"v\":y+=\"\\v\";break;case\"'\":y+=\"'\";break;case'\"':y+='\"';break;case\"\\\\\":y+=\"\\\\\";break}else return null;else y+=z}return y}function P(w){for(var b=\"\",y=0;y<w.length;y++)switch(w.charAt(y)){case\"'\":b+=\"\\\\'\";break;case\"\\\\\":b+=\"\\\\\\\\\";break;case\"\\b\":b+=\"\\\\b\";break;case\"\\f\":b+=\"\\\\f\";break;case`\n`:b+=\"\\\\n\";break;case\"\\r\":b+=\"\\\\r\";break;case\"\t\":b+=\"\\\\t\";break;case\"\\v\":b+=\"\\\\v\";break;default:b+=w.charAt(y);break}return b}function I(w){var b=w.substr(2);switch(w.substr(0,2).toLowerCase()){case\"0x\":return parseInt(b,16);case\"0b\":return parseInt(b,2);case\"0o\":return parseInt(b,8);case\"0'\":return C(b)[0];default:return parseFloat(w)}}var R={whitespace:/^\\s*(?:(?:%.*)|(?:\\/\\*(?:\\n|\\r|.)*?\\*\\/)|(?:\\s+))\\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\\!|,|;|[a-z][0-9a-zA-Z_]*|[#\\$\\&\\*\\+\\-\\.\\/\\:\\<\\=\\>\\?\\@\\^\\~\\\\]+|'(?:[^']*?(?:\\\\(?:x?\\d+)?\\\\)*(?:'')*(?:\\\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\\\[abfnrtv\\\\'\"`]|\\\\x?\\d+\\\\|[^\\\\])|\\d+(?:\\.\\d+(?:[eE][+-]?\\d+)?)?)/,string:/^(?:\"([^\"]|\"\"|\\\\\")*\"|`([^`]|``|\\\\`)*`)/,l_brace:/^(?:\\[)/,r_brace:/^(?:\\])/,l_bracket:/^(?:\\{)/,r_bracket:/^(?:\\})/,bar:/^(?:\\|)/,l_paren:/^(?:\\()/,r_paren:/^(?:\\))/};function N(w,b){return w.get_flag(\"char_conversion\").id===\"on\"?b.replace(/./g,function(y){return w.get_char_conversion(y)}):b}function U(w){this.thread=w,this.text=\"\",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var b,y=0,F=0,z=0,Z=[],$=!1;if(w){var oe=this.tokens[w-1];y=oe.len,b=N(this.thread,this.text.substr(oe.len)),F=oe.line,z=oe.start}else b=this.text;if(/^\\s*$/.test(b))return null;for(;b!==\"\";){var xe=[],Te=!1;if(/^\\n/.exec(b)!==null){F++,z=0,y++,b=b.replace(/\\n/,\"\"),$=!0;continue}for(var lt in R)if(R.hasOwnProperty(lt)){var Et=R[lt].exec(b);Et&&xe.push({value:Et[0],name:lt,matches:Et})}if(!xe.length)return this.set_last_tokens([{value:b,matches:[],name:\"lexical\",line:F,start:z}]);var oe=r(xe,function(Pr,Ir){return Pr.value.length>=Ir.value.length?Pr:Ir});switch(oe.start=z,oe.line=F,b=b.replace(oe.value,\"\"),z+=oe.value.length,y+=oe.value.length,oe.name){case\"atom\":oe.raw=oe.value,oe.value.charAt(0)===\"'\"&&(oe.value=S(oe.value.substr(1,oe.value.length-2),\"'\"),oe.value===null&&(oe.name=\"lexical\",oe.value=\"unknown escape sequence\"));break;case\"number\":oe.float=oe.value.substring(0,2)!==\"0x\"&&oe.value.match(/[.eE]/)!==null&&oe.value!==\"0'.\",oe.value=I(oe.value),oe.blank=Te;break;case\"string\":var qt=oe.value.charAt(0);oe.value=S(oe.value.substr(1,oe.value.length-2),qt),oe.value===null&&(oe.name=\"lexical\",oe.value=\"unknown escape sequence\");break;case\"whitespace\":var ir=Z[Z.length-1];ir&&(ir.space=!0),Te=!0;continue;case\"r_bracket\":Z.length>0&&Z[Z.length-1].name===\"l_bracket\"&&(oe=Z.pop(),oe.name=\"atom\",oe.value=\"{}\",oe.raw=\"{}\",oe.space=!1);break;case\"r_brace\":Z.length>0&&Z[Z.length-1].name===\"l_brace\"&&(oe=Z.pop(),oe.name=\"atom\",oe.value=\"[]\",oe.raw=\"[]\",oe.space=!1);break}oe.len=y,Z.push(oe),Te=!1}var Pt=this.set_last_tokens(Z);return Pt.length===0?null:Pt};function W(w,b,y,F,z){if(!b[y])return{type:f,value:x.error.syntax(b[y-1],\"expression expected\",!0)};var Z;if(F===\"0\"){var $=b[y];switch($.name){case\"number\":return{type:p,len:y+1,value:new x.type.Num($.value,$.float)};case\"variable\":return{type:p,len:y+1,value:new x.type.Var($.value)};case\"string\":var oe;switch(w.get_flag(\"double_quotes\").id){case\"atom\":oe=new j($.value,[]);break;case\"codes\":oe=new j(\"[]\",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(\".\",[new x.type.Num(n($.value,xe),!1),oe]);break;case\"chars\":oe=new j(\"[]\",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(\".\",[new x.type.Term($.value.charAt(xe),[]),oe]);break}return{type:p,len:y+1,value:oe};case\"l_paren\":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name===\"r_paren\"?(Pt.len++,Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],\") or operator expected\",!b[Pt.len])};case\"l_bracket\":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name===\"r_bracket\"?(Pt.len++,Pt.value=new j(\"{}\",[Pt.value]),Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],\"} or operator expected\",!b[Pt.len])}}var Te=te(w,b,y,z);return Te.type===p||Te.derived||(Te=ie(w,b,y),Te.type===p||Te.derived)?Te:{type:f,derived:!1,value:x.error.syntax(b[y],\"unexpected token\")}}var lt=w.__get_max_priority(),Et=w.__get_next_priority(F),qt=y;if(b[y].name===\"atom\"&&b[y+1]&&(b[y].space||b[y+1].name!==\"l_paren\")){var $=b[y++],ir=w.__lookup_operator_classes(F,$.value);if(ir&&ir.indexOf(\"fy\")>-1){var Pt=W(w,b,y,F,z);if(Pt.type!==f)return $.value===\"-\"&&!$.space&&x.type.is_number(Pt.value)?{value:new x.type.Num(-Pt.value.value,Pt.value.is_float),len:Pt.len,type:p}:{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};Z=Pt}else if(ir&&ir.indexOf(\"fx\")>-1){var Pt=W(w,b,y,Et,z);if(Pt.type!==f)return{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};Z=Pt}}y=qt;var Pt=W(w,b,y,Et,z);if(Pt.type===p){y=Pt.len;var $=b[y];if(b[y]&&(b[y].name===\"atom\"&&w.__lookup_operator_classes(F,$.value)||b[y].name===\"bar\"&&w.__lookup_operator_classes(F,\"|\"))){var gn=Et,Pr=F,ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf(\"xf\")>-1)return{value:new x.type.Term($.value,[Pt.value]),len:++Pt.len,type:p};if(ir.indexOf(\"xfx\")>-1){var Ir=W(w,b,y+1,gn,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(ir.indexOf(\"xfy\")>-1){var Ir=W(w,b,y+1,Pr,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(Pt.type!==f)for(;;){y=Pt.len;var $=b[y];if($&&$.name===\"atom\"&&w.__lookup_operator_classes(F,$.value)){var ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf(\"yf\")>-1)Pt={value:new x.type.Term($.value,[Pt.value]),len:++y,type:p};else if(ir.indexOf(\"yfx\")>-1){var Ir=W(w,b,++y,gn,z);if(Ir.type===f)return Ir.derived=!0,Ir;y=Ir.len,Pt={value:new x.type.Term($.value,[Pt.value,Ir.value]),len:y,type:p}}else break}else break}}else Z={type:f,value:x.error.syntax(b[Pt.len-1],\"operator expected\")};return Pt}return Pt}function te(w,b,y,F){if(!b[y]||b[y].name===\"atom\"&&b[y].raw===\".\"&&!F&&(b[y].space||!b[y+1]||b[y+1].name!==\"l_paren\"))return{type:f,derived:!1,value:x.error.syntax(b[y-1],\"unfounded token\")};var z=b[y],Z=[];if(b[y].name===\"atom\"&&b[y].raw!==\",\"){if(y++,b[y-1].space)return{type:p,len:y,value:new x.type.Term(z.value,Z)};if(b[y]&&b[y].name===\"l_paren\"){if(b[y+1]&&b[y+1].name===\"r_paren\")return{type:f,derived:!0,value:x.error.syntax(b[y+1],\"argument expected\")};var $=W(w,b,++y,\"999\",!0);if($.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],\"argument expected\",!b[y])};for(Z.push($.value),y=$.len;b[y]&&b[y].name===\"atom\"&&b[y].value===\",\";){if($=W(w,b,y+1,\"999\",!0),$.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],\"argument expected\",!b[y+1])};Z.push($.value),y=$.len}if(b[y]&&b[y].name===\"r_paren\")y++;else return{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],\", or ) expected\",!b[y])}}return{type:p,len:y,value:new x.type.Term(z.value,Z)}}return{type:f,derived:!1,value:x.error.syntax(b[y],\"term expected\")}}function ie(w,b,y){if(!b[y])return{type:f,derived:!1,value:x.error.syntax(b[y-1],\"[ expected\")};if(b[y]&&b[y].name===\"l_brace\"){var F=W(w,b,++y,\"999\",!0),z=[F.value],Z=void 0;if(F.type===f)return b[y]&&b[y].name===\"r_brace\"?{type:p,len:y+1,value:new x.type.Term(\"[]\",[])}:{type:f,derived:!0,value:x.error.syntax(b[y],\"] expected\")};for(y=F.len;b[y]&&b[y].name===\"atom\"&&b[y].value===\",\";){if(F=W(w,b,y+1,\"999\",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],\"argument expected\",!b[y+1])};z.push(F.value),y=F.len}var $=!1;if(b[y]&&b[y].name===\"bar\"){if($=!0,F=W(w,b,y+1,\"999\",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],\"argument expected\",!b[y+1])};Z=F.value,y=F.len}return b[y]&&b[y].name===\"r_brace\"?{type:p,len:y+1,value:g(z,Z)}:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],$?\"] expected\":\", or | or ] expected\",!b[y])}}return{type:f,derived:!1,value:x.error.syntax(b[y],\"list expected\")}}function Ae(w,b,y){var F=b[y].line,z=W(w,b,y,w.__get_max_priority(),!1),Z=null,$;if(z.type!==f)if(y=z.len,b[y]&&b[y].name===\"atom\"&&b[y].raw===\".\")if(y++,x.type.is_term(z.value)){if(z.value.indicator===\":-/2\"?(Z=new x.type.Rule(z.value.args[0],Ce(z.value.args[1])),$={value:Z,len:y,type:p}):z.value.indicator===\"-->/2\"?(Z=pe(new x.type.Rule(z.value.args[0],z.value.args[1]),w),Z.body=Ce(Z.body),$={value:Z,len:y,type:x.type.is_rule(Z)?p:f}):(Z=new x.type.Rule(z.value,null),$={value:Z,len:y,type:p}),Z){var oe=Z.singleton_variables();oe.length>0&&w.throw_warning(x.warning.singleton(oe,Z.head.indicator,F))}return $}else return{type:f,value:x.error.syntax(b[y],\"callable expected\")};else return{type:f,value:x.error.syntax(b[y]?b[y]:b[y-1],\". or operator expected\")};return z}function ce(w,b,y){y=y||{},y.from=y.from?y.from:\"$tau-js\",y.reconsult=y.reconsult!==void 0?y.reconsult:!0;var F=new U(w),z={},Z;F.new_text(b);var $=0,oe=F.get_tokens($);do{if(oe===null||!oe[$])break;var xe=Ae(w,oe,$);if(xe.type===f)return new j(\"throw\",[xe.value]);if(xe.value.body===null&&xe.value.head.indicator===\"?-/1\"){var Te=new it(w.session);Te.add_goal(xe.value.head.args[0]),Te.answer(function(Et){x.type.is_error(Et)?w.throw_warning(Et.args[0]):(Et===!1||Et===null)&&w.throw_warning(x.warning.failed_goal(xe.value.head.args[0],xe.len))}),$=xe.len;var lt=!0}else if(xe.value.body===null&&xe.value.head.indicator===\":-/1\"){var lt=w.run_directive(xe.value.head.args[0]);$=xe.len,xe.value.head.args[0].indicator===\"char_conversion/2\"&&(oe=F.get_tokens($),$=0)}else{Z=xe.value.head.indicator,y.reconsult!==!1&&z[Z]!==!0&&!w.is_multifile_predicate(Z)&&(w.session.rules[Z]=a(w.session.rules[Z]||[],function(qt){return qt.dynamic}),z[Z]=!0);var lt=w.add_rule(xe.value,y);$=xe.len}if(!lt)return lt}while(!0);return!0}function me(w,b){var y=new U(w);y.new_text(b);var F=0;do{var z=y.get_tokens(F);if(z===null)break;var Z=W(w,z,0,w.__get_max_priority(),!1);if(Z.type!==f){var $=Z.len,oe=$;if(z[$]&&z[$].name===\"atom\"&&z[$].raw===\".\")w.add_goal(Ce(Z.value));else{var xe=z[$];return new j(\"throw\",[x.error.syntax(xe||z[$-1],\". or operator expected\",!xe)])}F=Z.len+1}else return new j(\"throw\",[Z.value])}while(!0);return!0}function pe(w,b){w=w.rename(b);var y=b.next_free_variable(),F=Be(w.body,y,b);return F.error?F.value:(w.body=F.value,w.head.args=w.head.args.concat([y,F.variable]),w.head=new j(w.head.id,w.head.args),w)}function Be(w,b,y){var F;if(x.type.is_term(w)&&w.indicator===\"!/0\")return{value:w,variable:b,error:!1};if(x.type.is_term(w)&&w.indicator===\",/2\"){var z=Be(w.args[0],b,y);if(z.error)return z;var Z=Be(w.args[1],z.variable,y);return Z.error?Z:{value:new j(\",\",[z.value,Z.value]),variable:Z.variable,error:!1}}else{if(x.type.is_term(w)&&w.indicator===\"{}/1\")return{value:w.args[0],variable:b,error:!1};if(x.type.is_empty_list(w))return{value:new j(\"true\",[]),variable:b,error:!1};if(x.type.is_list(w)){F=y.next_free_variable();for(var $=w,oe;$.indicator===\"./2\";)oe=$,$=$.args[1];return x.type.is_variable($)?{value:x.error.instantiation(\"DCG\"),variable:b,error:!0}:x.type.is_empty_list($)?(oe.args[1]=F,{value:new j(\"=\",[b,w]),variable:F,error:!1}):{value:x.error.type(\"list\",w,\"DCG\"),variable:b,error:!0}}else return x.type.is_callable(w)?(F=y.next_free_variable(),w.args=w.args.concat([b,F]),w=new j(w.id,w.args),{value:w,variable:F,error:!1}):{value:x.error.type(\"callable\",w,\"DCG\"),variable:b,error:!0}}}function Ce(w){return x.type.is_variable(w)?new j(\"call\",[w]):x.type.is_term(w)&&[\",/2\",\";/2\",\"->/2\"].indexOf(w.indicator)!==-1?new j(w.id,[Ce(w.args[0]),Ce(w.args[1])]):w}function g(w,b){for(var y=b||new x.type.Term(\"[]\",[]),F=w.length-1;F>=0;F--)y=new x.type.Term(\".\",[w[F],y]);return y}function we(w,b){for(var y=w.length-1;y>=0;y--)w[y]===b&&w.splice(y,1)}function Ee(w){for(var b={},y=[],F=0;F<w.length;F++)w[F]in b||(y.push(w[F]),b[w[F]]=!0);return y}function fe(w,b,y,F){if(w.session.rules[y]!==null){for(var z=0;z<w.session.rules[y].length;z++)if(w.session.rules[y][z]===F){w.session.rules[y].splice(z,1),w.success(b);break}}}function se(w){return function(b,y,F){var z=F.args[0],Z=F.args.slice(1,w);if(x.type.is_variable(z))b.throw_error(x.error.instantiation(b.level));else if(!x.type.is_callable(z))b.throw_error(x.error.type(\"callable\",z,b.level));else{var $=new j(z.id,z.args.concat(Z));b.prepend([new Pe(y.goal.replace($),y.substitution,y)])}}}function X(w){for(var b=w.length-1;b>=0;b--)if(w.charAt(b)===\"/\")return new j(\"/\",[new j(w.substring(0,b)),new Re(parseInt(w.substring(b+1)),!1)])}function De(w){this.id=w}function Re(w,b){this.is_float=b!==void 0?b:parseInt(w)!==w,this.value=this.is_float?w:parseInt(w)}var gt=0;function j(w,b,y){this.ref=y||++gt,this.id=w,this.args=b||[],this.indicator=w+\"/\"+this.args.length}var rt=0;function Fe(w,b,y,F,z,Z){this.id=rt++,this.stream=w,this.mode=b,this.alias=y,this.type=F!==void 0?F:\"text\",this.reposition=z!==void 0?z:!0,this.eof_action=Z!==void 0?Z:\"eof_code\",this.position=this.mode===\"append\"?\"end_of_stream\":0,this.output=this.mode===\"write\"||this.mode===\"append\",this.input=this.mode===\"read\"}function Ne(w){w=w||{},this.links=w}function Pe(w,b,y){b=b||new Ne,y=y||null,this.goal=w,this.substitution=b,this.parent=y}function Ye(w,b,y){this.head=w,this.body=b,this.dynamic=y||!1}function ke(w){w=w===void 0||w<=0?1e3:w,this.rules={},this.src_predicates={},this.rename=0,this.modules=[],this.thread=new it(this),this.total_threads=1,this.renamed_variables={},this.public_predicates={},this.multifile_predicates={},this.limit=w,this.streams={user_input:new Fe(typeof tc<\"u\"&&tc.exports?nodejs_user_input:tau_user_input,\"read\",\"user_input\",\"text\",!1,\"reset\"),user_output:new Fe(typeof tc<\"u\"&&tc.exports?nodejs_user_output:tau_user_output,\"write\",\"user_output\",\"text\",!1,\"eof_code\")},this.file_system=typeof tc<\"u\"&&tc.exports?nodejs_file_system:tau_file_system,this.standard_input=this.streams.user_input,this.standard_output=this.streams.user_output,this.current_input=this.streams.user_input,this.current_output=this.streams.user_output,this.format_success=function(b){return b.substitution},this.format_error=function(b){return b.goal},this.flag={bounded:x.flag.bounded.value,max_integer:x.flag.max_integer.value,min_integer:x.flag.min_integer.value,integer_rounding_function:x.flag.integer_rounding_function.value,char_conversion:x.flag.char_conversion.value,debug:x.flag.debug.value,max_arity:x.flag.max_arity.value,unknown:x.flag.unknown.value,double_quotes:x.flag.double_quotes.value,occurs_check:x.flag.occurs_check.value,dialect:x.flag.dialect.value,version_data:x.flag.version_data.value,nodejs:x.flag.nodejs.value},this.__loaded_modules=[],this.__char_conversion={},this.__operators={1200:{\":-\":[\"fx\",\"xfx\"],\"-->\":[\"xfx\"],\"?-\":[\"fx\"]},1100:{\";\":[\"xfy\"]},1050:{\"->\":[\"xfy\"]},1e3:{\",\":[\"xfy\"]},900:{\"\\\\+\":[\"fy\"]},700:{\"=\":[\"xfx\"],\"\\\\=\":[\"xfx\"],\"==\":[\"xfx\"],\"\\\\==\":[\"xfx\"],\"@<\":[\"xfx\"],\"@=<\":[\"xfx\"],\"@>\":[\"xfx\"],\"@>=\":[\"xfx\"],\"=..\":[\"xfx\"],is:[\"xfx\"],\"=:=\":[\"xfx\"],\"=\\\\=\":[\"xfx\"],\"<\":[\"xfx\"],\"=<\":[\"xfx\"],\">\":[\"xfx\"],\">=\":[\"xfx\"]},600:{\":\":[\"xfy\"]},500:{\"+\":[\"yfx\"],\"-\":[\"yfx\"],\"/\\\\\":[\"yfx\"],\"\\\\/\":[\"yfx\"]},400:{\"*\":[\"yfx\"],\"/\":[\"yfx\"],\"//\":[\"yfx\"],rem:[\"yfx\"],mod:[\"yfx\"],\"<<\":[\"yfx\"],\">>\":[\"yfx\"]},200:{\"**\":[\"xfx\"],\"^\":[\"xfy\"],\"-\":[\"fy\"],\"+\":[\"fy\"],\"\\\\\":[\"fy\"]}}}function it(w){this.epoch=Date.now(),this.session=w,this.session.total_threads++,this.total_steps=0,this.cpu_time=0,this.cpu_time_last=0,this.points=[],this.debugger=!1,this.debugger_states=[],this.level=\"top_level/0\",this.__calls=[],this.current_limit=this.session.limit,this.warnings=[]}function _e(w,b,y){this.id=w,this.rules=b,this.exports=y,x.module[w]=this}_e.prototype.exports_predicate=function(w){return this.exports.indexOf(w)!==-1},De.prototype.unify=function(w,b){if(b&&e(w.variables(),this.id)!==-1&&!x.type.is_variable(w))return null;var y={};return y[this.id]=w,new Ne(y)},Re.prototype.unify=function(w,b){return x.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float?new Ne:null},j.prototype.unify=function(w,b){if(x.type.is_term(w)&&this.indicator===w.indicator){for(var y=new Ne,F=0;F<this.args.length;F++){var z=x.unify(this.args[F].apply(y),w.args[F].apply(y),b);if(z===null)return null;for(var Z in z.links)y.links[Z]=z.links[Z];y=y.apply(z)}return y}return null},Fe.prototype.unify=function(w,b){return x.type.is_stream(w)&&this.id===w.id?new Ne:null},De.prototype.toString=function(w){return this.id},Re.prototype.toString=function(w){return this.is_float&&e(this.value.toString(),\".\")===-1?this.value+\".0\":this.value.toString()},j.prototype.toString=function(w,b,y){if(w=w||{},w.quoted=w.quoted===void 0?!0:w.quoted,w.ignore_ops=w.ignore_ops===void 0?!1:w.ignore_ops,w.numbervars=w.numbervars===void 0?!1:w.numbervars,b=b===void 0?1200:b,y=y===void 0?\"\":y,w.numbervars&&this.indicator===\"$VAR/1\"&&x.type.is_integer(this.args[0])&&this.args[0].value>=0){var F=this.args[0].value,z=Math.floor(F/26),Z=F%26;return\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"[Z]+(z!==0?z:\"\")}switch(this.indicator){case\"[]/0\":case\"{}/0\":case\"!/0\":return this.id;case\"{}/1\":return\"{\"+this.args[0].toString(w)+\"}\";case\"./2\":for(var $=\"[\"+this.args[0].toString(w),oe=this.args[1];oe.indicator===\"./2\";)$+=\", \"+oe.args[0].toString(w),oe=oe.args[1];return oe.indicator!==\"[]/0\"&&($+=\"|\"+oe.toString(w)),$+=\"]\",$;case\",/2\":return\"(\"+this.args[0].toString(w)+\", \"+this.args[1].toString(w)+\")\";default:var xe=this.id,Te=w.session?w.session.lookup_operator(this.id,this.args.length):null;if(w.session===void 0||w.ignore_ops||Te===null)return w.quoted&&!/^(!|,|;|[a-z][0-9a-zA-Z_]*)$/.test(xe)&&xe!==\"{}\"&&xe!==\"[]\"&&(xe=\"'\"+P(xe)+\"'\"),xe+(this.args.length?\"(\"+s(this.args,function(ir){return ir.toString(w)}).join(\", \")+\")\":\"\");var lt=Te.priority>b.priority||Te.priority===b.priority&&(Te.class===\"xfy\"&&this.indicator!==b.indicator||Te.class===\"yfx\"&&this.indicator!==b.indicator||this.indicator===b.indicator&&Te.class===\"yfx\"&&y===\"right\"||this.indicator===b.indicator&&Te.class===\"xfy\"&&y===\"left\");Te.indicator=this.indicator;var Et=lt?\"(\":\"\",qt=lt?\")\":\"\";return this.args.length===0?\"(\"+this.id+\")\":[\"fy\",\"fx\"].indexOf(Te.class)!==-1?Et+xe+\" \"+this.args[0].toString(w,Te)+qt:[\"yf\",\"xf\"].indexOf(Te.class)!==-1?Et+this.args[0].toString(w,Te)+\" \"+xe+qt:Et+this.args[0].toString(w,Te,\"left\")+\" \"+this.id+\" \"+this.args[1].toString(w,Te,\"right\")+qt}},Fe.prototype.toString=function(w){return\"<stream>(\"+this.id+\")\"},Ne.prototype.toString=function(w){var b=\"{\";for(var y in this.links)this.links.hasOwnProperty(y)&&(b!==\"{\"&&(b+=\", \"),b+=y+\"/\"+this.links[y].toString(w));return b+=\"}\",b},Pe.prototype.toString=function(w){return this.goal===null?\"<\"+this.substitution.toString(w)+\">\":\"<\"+this.goal.toString(w)+\", \"+this.substitution.toString(w)+\">\"},Ye.prototype.toString=function(w){return this.body?this.head.toString(w)+\" :- \"+this.body.toString(w)+\".\":this.head.toString(w)+\".\"},ke.prototype.toString=function(w){for(var b=\"\",y=0;y<this.modules.length;y++)b+=\":- use_module(library(\"+this.modules[y]+`)).\n`;b+=`\n`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)b+=this.rules[key][y].toString(w),b+=`\n`;return b},De.prototype.clone=function(){return new De(this.id)},Re.prototype.clone=function(){return new Re(this.value,this.is_float)},j.prototype.clone=function(){return new j(this.id,s(this.args,function(w){return w.clone()}))},Fe.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Ne.prototype.clone=function(){var w={};for(var b in this.links)this.links.hasOwnProperty(b)&&(w[b]=this.links[b].clone());return new Ne(w)},Pe.prototype.clone=function(){return new Pe(this.goal.clone(),this.substitution.clone(),this.parent)},Ye.prototype.clone=function(){return new Ye(this.head.clone(),this.body!==null?this.body.clone():null)},De.prototype.equals=function(w){return x.type.is_variable(w)&&this.id===w.id},Re.prototype.equals=function(w){return x.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float},j.prototype.equals=function(w){if(!x.type.is_term(w)||this.indicator!==w.indicator)return!1;for(var b=0;b<this.args.length;b++)if(!this.args[b].equals(w.args[b]))return!1;return!0},Fe.prototype.equals=function(w){return x.type.is_stream(w)&&this.id===w.id},Ne.prototype.equals=function(w){var b;if(!x.type.is_substitution(w))return!1;for(b in this.links)if(this.links.hasOwnProperty(b)&&(!w.links[b]||!this.links[b].equals(w.links[b])))return!1;for(b in w.links)if(w.links.hasOwnProperty(b)&&!this.links[b])return!1;return!0},Pe.prototype.equals=function(w){return x.type.is_state(w)&&this.goal.equals(w.goal)&&this.substitution.equals(w.substitution)&&this.parent===w.parent},Ye.prototype.equals=function(w){return x.type.is_rule(w)&&this.head.equals(w.head)&&(this.body===null&&w.body===null||this.body!==null&&this.body.equals(w.body))},De.prototype.rename=function(w){return w.get_free_variable(this)},Re.prototype.rename=function(w){return this},j.prototype.rename=function(w){return new j(this.id,s(this.args,function(b){return b.rename(w)}))},Fe.prototype.rename=function(w){return this},Ye.prototype.rename=function(w){return new Ye(this.head.rename(w),this.body!==null?this.body.rename(w):null)},De.prototype.variables=function(){return[this.id]},Re.prototype.variables=function(){return[]},j.prototype.variables=function(){return[].concat.apply([],s(this.args,function(w){return w.variables()}))},Fe.prototype.variables=function(){return[]},Ye.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},De.prototype.apply=function(w){return w.lookup(this.id)?w.lookup(this.id):this},Re.prototype.apply=function(w){return this},j.prototype.apply=function(w){if(this.indicator===\"./2\"){for(var b=[],y=this;y.indicator===\"./2\";)b.push(y.args[0].apply(w)),y=y.args[1];for(var F=y.apply(w),z=b.length-1;z>=0;z--)F=new j(\".\",[b[z],F]);return F}return new j(this.id,s(this.args,function(Z){return Z.apply(w)}),this.ref)},Fe.prototype.apply=function(w){return this},Ye.prototype.apply=function(w){return new Ye(this.head.apply(w),this.body!==null?this.body.apply(w):null)},Ne.prototype.apply=function(w){var b,y={};for(b in this.links)this.links.hasOwnProperty(b)&&(y[b]=this.links[b].apply(w));return new Ne(y)},j.prototype.select=function(){for(var w=this;w.indicator===\",/2\";)w=w.args[0];return w},j.prototype.replace=function(w){return this.indicator===\",/2\"?this.args[0].indicator===\",/2\"?new j(\",\",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new j(\",\",[w,this.args[1]]):w},j.prototype.search=function(w){if(x.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var b=0;b<this.args.length;b++)if(x.type.is_term(this.args[b])&&this.args[b].search(w))return!0;return!1},ke.prototype.get_current_input=function(){return this.current_input},it.prototype.get_current_input=function(){return this.session.get_current_input()},ke.prototype.get_current_output=function(){return this.current_output},it.prototype.get_current_output=function(){return this.session.get_current_output()},ke.prototype.set_current_input=function(w){this.current_input=w},it.prototype.set_current_input=function(w){return this.session.set_current_input(w)},ke.prototype.set_current_output=function(w){this.current_input=w},it.prototype.set_current_output=function(w){return this.session.set_current_output(w)},ke.prototype.get_stream_by_alias=function(w){return this.streams[w]},it.prototype.get_stream_by_alias=function(w){return this.session.get_stream_by_alias(w)},ke.prototype.file_system_open=function(w,b,y){return this.file_system.open(w,b,y)},it.prototype.file_system_open=function(w,b,y){return this.session.file_system_open(w,b,y)},ke.prototype.get_char_conversion=function(w){return this.__char_conversion[w]||w},it.prototype.get_char_conversion=function(w){return this.session.get_char_conversion(w)},ke.prototype.parse=function(w){return this.thread.parse(w)},it.prototype.parse=function(w){var b=new U(this);b.new_text(w);var y=b.get_tokens();if(y===null)return!1;var F=W(this,y,0,this.__get_max_priority(),!1);return F.len!==y.length?!1:{value:F.value,expr:F,tokens:y}},ke.prototype.get_flag=function(w){return this.flag[w]},it.prototype.get_flag=function(w){return this.session.get_flag(w)},ke.prototype.add_rule=function(w,b){return b=b||{},b.from=b.from?b.from:\"$tau-js\",this.src_predicates[w.head.indicator]=b.from,this.rules[w.head.indicator]||(this.rules[w.head.indicator]=[]),this.rules[w.head.indicator].push(w),this.public_predicates.hasOwnProperty(w.head.indicator)||(this.public_predicates[w.head.indicator]=!1),!0},it.prototype.add_rule=function(w,b){return this.session.add_rule(w,b)},ke.prototype.run_directive=function(w){this.thread.run_directive(w)},it.prototype.run_directive=function(w){return x.type.is_directive(w)?(x.directive[w.indicator](this,w),!0):!1},ke.prototype.__get_max_priority=function(){return\"1200\"},it.prototype.__get_max_priority=function(){return this.session.__get_max_priority()},ke.prototype.__get_next_priority=function(w){var b=0;w=parseInt(w);for(var y in this.__operators)if(this.__operators.hasOwnProperty(y)){var F=parseInt(y);F>b&&F<w&&(b=F)}return b.toString()},it.prototype.__get_next_priority=function(w){return this.session.__get_next_priority(w)},ke.prototype.__lookup_operator_classes=function(w,b){return this.__operators.hasOwnProperty(w)&&this.__operators[w][b]instanceof Array&&this.__operators[w][b]||!1},it.prototype.__lookup_operator_classes=function(w,b){return this.session.__lookup_operator_classes(w,b)},ke.prototype.lookup_operator=function(w,b){for(var y in this.__operators)if(this.__operators[y][w]){for(var F=0;F<this.__operators[y][w].length;F++)if(b===0||this.__operators[y][w][F].length===b+1)return{priority:y,class:this.__operators[y][w][F]}}return null},it.prototype.lookup_operator=function(w,b){return this.session.lookup_operator(w,b)},ke.prototype.throw_warning=function(w){this.thread.throw_warning(w)},it.prototype.throw_warning=function(w){this.warnings.push(w)},ke.prototype.get_warnings=function(){return this.thread.get_warnings()},it.prototype.get_warnings=function(){return this.warnings},ke.prototype.add_goal=function(w,b){this.thread.add_goal(w,b)},it.prototype.add_goal=function(w,b,y){y=y||null,b===!0&&(this.points=[]);for(var F=w.variables(),z={},Z=0;Z<F.length;Z++)z[F[Z]]=new De(F[Z]);this.points.push(new Pe(w,new Ne(z),y))},ke.prototype.consult=function(w,b){return this.thread.consult(w,b)},it.prototype.consult=function(w,b){var y=\"\";if(typeof w==\"string\"){y=w;var F=y.length;if(y.substring(F-3,F)===\".pl\"&&document.getElementById(y)){var z=document.getElementById(y),Z=z.getAttribute(\"type\");Z!==null&&Z.replace(/ /g,\"\").toLowerCase()===\"text/prolog\"&&(y=z.text)}}else if(w.nodeName)switch(w.nodeName.toLowerCase()){case\"input\":case\"textarea\":y=w.value;break;default:y=w.innerHTML;break}else return!1;return this.warnings=[],ce(this,y,b)},ke.prototype.query=function(w){return this.thread.query(w)},it.prototype.query=function(w){return this.points=[],this.debugger_points=[],me(this,w)},ke.prototype.head_point=function(){return this.thread.head_point()},it.prototype.head_point=function(){return this.points[this.points.length-1]},ke.prototype.get_free_variable=function(w){return this.thread.get_free_variable(w)},it.prototype.get_free_variable=function(w){var b=[];if(w.id===\"_\"||this.session.renamed_variables[w.id]===void 0){for(this.session.rename++,this.points.length>0&&(b=this.head_point().substitution.domain());e(b,x.format_variable(this.session.rename))!==-1;)this.session.rename++;if(w.id===\"_\")return new De(x.format_variable(this.session.rename));this.session.renamed_variables[w.id]=x.format_variable(this.session.rename)}return new De(this.session.renamed_variables[w.id])},ke.prototype.next_free_variable=function(){return this.thread.next_free_variable()},it.prototype.next_free_variable=function(){this.session.rename++;var w=[];for(this.points.length>0&&(w=this.head_point().substitution.domain());e(w,x.format_variable(this.session.rename))!==-1;)this.session.rename++;return new De(x.format_variable(this.session.rename))},ke.prototype.is_public_predicate=function(w){return!this.public_predicates.hasOwnProperty(w)||this.public_predicates[w]===!0},it.prototype.is_public_predicate=function(w){return this.session.is_public_predicate(w)},ke.prototype.is_multifile_predicate=function(w){return this.multifile_predicates.hasOwnProperty(w)&&this.multifile_predicates[w]===!0},it.prototype.is_multifile_predicate=function(w){return this.session.is_multifile_predicate(w)},ke.prototype.prepend=function(w){return this.thread.prepend(w)},it.prototype.prepend=function(w){for(var b=w.length-1;b>=0;b--)this.points.push(w[b])},ke.prototype.success=function(w,b){return this.thread.success(w,b)},it.prototype.success=function(w,y){var y=typeof y>\"u\"?w:y;this.prepend([new Pe(w.goal.replace(null),w.substitution,y)])},ke.prototype.throw_error=function(w){return this.thread.throw_error(w)},it.prototype.throw_error=function(w){this.prepend([new Pe(new j(\"throw\",[w]),new Ne,null,null)])},ke.prototype.step_rule=function(w,b){return this.thread.step_rule(w,b)},it.prototype.step_rule=function(w,b){var y=b.indicator;if(w===\"user\"&&(w=null),w===null&&this.session.rules.hasOwnProperty(y))return this.session.rules[y];for(var F=w===null?this.session.modules:e(this.session.modules,w)===-1?[]:[w],z=0;z<F.length;z++){var Z=x.module[F[z]];if(Z.rules.hasOwnProperty(y)&&(Z.rules.hasOwnProperty(this.level)||Z.exports_predicate(y)))return x.module[F[z]].rules[y]}return null},ke.prototype.step=function(){return this.thread.step()},it.prototype.step=function(){if(this.points.length!==0){var w=!1,b=this.points.pop();if(this.debugger&&this.debugger_states.push(b),x.type.is_term(b.goal)){var y=b.goal.select(),F=null,z=[];if(y!==null){this.total_steps++;for(var Z=b;Z.parent!==null&&Z.parent.goal.search(y);)Z=Z.parent;if(this.level=Z.parent===null?\"top_level/0\":Z.parent.goal.select().indicator,x.type.is_term(y)&&y.indicator===\":/2\"&&(F=y.args[0].id,y=y.args[1]),F===null&&x.type.is_builtin(y))this.__call_indicator=y.indicator,w=x.predicate[y.indicator](this,b,y);else{var $=this.step_rule(F,y);if($===null)this.session.rules.hasOwnProperty(y.indicator)||(this.get_flag(\"unknown\").id===\"error\"?this.throw_error(x.error.existence(\"procedure\",y.indicator,this.level)):this.get_flag(\"unknown\").id===\"warning\"&&this.throw_warning(\"unknown procedure \"+y.indicator+\" (from \"+this.level+\")\"));else if($ instanceof Function)w=$(this,b,y);else{for(var oe in $)if($.hasOwnProperty(oe)){var xe=$[oe];this.session.renamed_variables={},xe=xe.rename(this);var Te=this.get_flag(\"occurs_check\").indicator===\"true/0\",lt=new Pe,Et=x.unify(y,xe.head,Te);Et!==null&&(lt.goal=b.goal.replace(xe.body),lt.goal!==null&&(lt.goal=lt.goal.apply(Et)),lt.substitution=b.substitution.apply(Et),lt.parent=b,z.push(lt))}this.prepend(z)}}}}else x.type.is_variable(b.goal)?this.throw_error(x.error.instantiation(this.level)):this.throw_error(x.error.type(\"callable\",b.goal,this.level));return w}},ke.prototype.answer=function(w){return this.thread.answer(w)},it.prototype.answer=function(w){w=w||function(b){},this.__calls.push(w),!(this.__calls.length>1)&&this.again()},ke.prototype.answers=function(w,b,y){return this.thread.answers(w,b,y)},it.prototype.answers=function(w,b,y){var F=b||1e3,z=this;if(b<=0){y&&y();return}this.answer(function(Z){w(Z),Z!==!1?setTimeout(function(){z.answers(w,b-1,y)},1):y&&y()})},ke.prototype.again=function(w){return this.thread.again(w)},it.prototype.again=function(w){for(var b,y=Date.now();this.__calls.length>0;){for(this.warnings=[],w!==!1&&(this.current_limit=this.session.limit);this.current_limit>0&&this.points.length>0&&this.head_point().goal!==null&&!x.type.is_error(this.head_point().goal);)if(this.current_limit--,this.step()===!0)return;var F=Date.now();this.cpu_time_last=F-y,this.cpu_time+=this.cpu_time_last;var z=this.__calls.shift();this.current_limit<=0?z(null):this.points.length===0?z(!1):x.type.is_error(this.head_point().goal)?(b=this.session.format_error(this.points.pop()),this.points=[],z(b)):(this.debugger&&this.debugger_states.push(this.head_point()),b=this.session.format_success(this.points.pop()),z(b))}},ke.prototype.unfold=function(w){if(w.body===null)return!1;var b=w.head,y=w.body,F=y.select(),z=new it(this),Z=[];z.add_goal(F),z.step();for(var $=z.points.length-1;$>=0;$--){var oe=z.points[$],xe=b.apply(oe.substitution),Te=y.replace(oe.goal);Te!==null&&(Te=Te.apply(oe.substitution)),Z.push(new Ye(xe,Te))}var lt=this.rules[b.indicator],Et=e(lt,w);return Z.length>0&&Et!==-1?(lt.splice.apply(lt,[Et,1].concat(Z)),!0):!1},it.prototype.unfold=function(w){return this.session.unfold(w)},De.prototype.interpret=function(w){return x.error.instantiation(w.level)},Re.prototype.interpret=function(w){return this},j.prototype.interpret=function(w){return x.type.is_unitary_list(this)?this.args[0].interpret(w):x.operate(w,this)},De.prototype.compare=function(w){return this.id<w.id?-1:this.id>w.id?1:0},Re.prototype.compare=function(w){if(this.value===w.value&&this.is_float===w.is_float)return 0;if(this.value<w.value||this.value===w.value&&this.is_float&&!w.is_float)return-1;if(this.value>w.value)return 1},j.prototype.compare=function(w){if(this.args.length<w.args.length||this.args.length===w.args.length&&this.id<w.id)return-1;if(this.args.length>w.args.length||this.args.length===w.args.length&&this.id>w.id)return 1;for(var b=0;b<this.args.length;b++){var y=x.compare(this.args[b],w.args[b]);if(y!==0)return y}return 0},Ne.prototype.lookup=function(w){return this.links[w]?this.links[w]:null},Ne.prototype.filter=function(w){var b={};for(var y in this.links)if(this.links.hasOwnProperty(y)){var F=this.links[y];w(y,F)&&(b[y]=F)}return new Ne(b)},Ne.prototype.exclude=function(w){var b={};for(var y in this.links)this.links.hasOwnProperty(y)&&e(w,y)===-1&&(b[y]=this.links[y]);return new Ne(b)},Ne.prototype.add=function(w,b){this.links[w]=b},Ne.prototype.domain=function(w){var b=w===!0?function(z){return z}:function(z){return new De(z)},y=[];for(var F in this.links)y.push(b(F));return y},De.prototype.compile=function(){return'new pl.type.Var(\"'+this.id.toString()+'\")'},Re.prototype.compile=function(){return\"new pl.type.Num(\"+this.value.toString()+\", \"+this.is_float.toString()+\")\"},j.prototype.compile=function(){return'new pl.type.Term(\"'+this.id.replace(/\"/g,'\\\\\"')+'\", ['+s(this.args,function(w){return w.compile()})+\"])\"},Ye.prototype.compile=function(){return\"new pl.type.Rule(\"+this.head.compile()+\", \"+(this.body===null?\"null\":this.body.compile())+\")\"},ke.prototype.compile=function(){var w,b=[],y;for(var F in this.rules)if(this.rules.hasOwnProperty(F)){var z=this.rules[F];y=[],w='\"'+F+'\": [';for(var Z=0;Z<z.length;Z++)y.push(z[Z].compile());w+=y.join(),w+=\"]\",b.push(w)}return\"{\"+b.join()+\"};\"},De.prototype.toJavaScript=function(){},Re.prototype.toJavaScript=function(){return this.value},j.prototype.toJavaScript=function(){if(this.args.length===0&&this.indicator!==\"[]/0\")return this.id;if(x.type.is_list(this)){for(var w=[],b=this,y;b.indicator===\"./2\";){if(y=b.args[0].toJavaScript(),y===void 0)return;w.push(y),b=b.args[1]}if(b.indicator===\"[]/0\")return w}},Ye.prototype.singleton_variables=function(){var w=this.head.variables(),b={},y=[];this.body!==null&&(w=w.concat(this.body.variables()));for(var F=0;F<w.length;F++)b[w[F]]===void 0&&(b[w[F]]=0),b[w[F]]++;for(var z in b)z!==\"_\"&&b[z]===1&&y.push(z);return y};var x={__env:typeof tc<\"u\"&&tc.exports?global:window,module:{},version:t,parser:{tokenizer:U,expression:W},utils:{str_indicator:X,codePointAt:n,fromCodePoint:c},statistics:{getCountTerms:function(){return gt}},fromJavaScript:{test:{boolean:function(w){return w===!0||w===!1},number:function(w){return typeof w==\"number\"},string:function(w){return typeof w==\"string\"},list:function(w){return w instanceof Array},variable:function(w){return w===void 0},any:function(w){return!0}},conversion:{boolean:function(w){return new j(w?\"true\":\"false\",[])},number:function(w){return new Re(w,w%1!==0)},string:function(w){return new j(w,[])},list:function(w){for(var b=[],y,F=0;F<w.length;F++){if(y=x.fromJavaScript.apply(w[F]),y===void 0)return;b.push(y)}return g(b)},variable:function(w){return new De(\"_\")},any:function(w){}},apply:function(w){for(var b in x.fromJavaScript.test)if(b!==\"any\"&&x.fromJavaScript.test[b](w))return x.fromJavaScript.conversion[b](w);return x.fromJavaScript.conversion.any(w)}},type:{Var:De,Num:Re,Term:j,Rule:Ye,State:Pe,Stream:Fe,Module:_e,Thread:it,Session:ke,Substitution:Ne,order:[De,Re,j,Fe],compare:function(w,b){var y=e(x.type.order,w.constructor),F=e(x.type.order,b.constructor);if(y<F)return-1;if(y>F)return 1;if(w.constructor===Re){if(w.is_float&&b.is_float)return 0;if(w.is_float)return-1;if(b.is_float)return 1}return 0},is_substitution:function(w){return w instanceof Ne},is_state:function(w){return w instanceof Pe},is_rule:function(w){return w instanceof Ye},is_variable:function(w){return w instanceof De},is_stream:function(w){return w instanceof Fe},is_anonymous_var:function(w){return w instanceof De&&w.id===\"_\"},is_callable:function(w){return w instanceof j},is_number:function(w){return w instanceof Re},is_integer:function(w){return w instanceof Re&&!w.is_float},is_float:function(w){return w instanceof Re&&w.is_float},is_term:function(w){return w instanceof j},is_atom:function(w){return w instanceof j&&w.args.length===0},is_ground:function(w){if(w instanceof De)return!1;if(w instanceof j){for(var b=0;b<w.args.length;b++)if(!x.type.is_ground(w.args[b]))return!1}return!0},is_atomic:function(w){return w instanceof j&&w.args.length===0||w instanceof Re},is_compound:function(w){return w instanceof j&&w.args.length>0},is_list:function(w){return w instanceof j&&(w.indicator===\"[]/0\"||w.indicator===\"./2\")},is_empty_list:function(w){return w instanceof j&&w.indicator===\"[]/0\"},is_non_empty_list:function(w){return w instanceof j&&w.indicator===\"./2\"},is_fully_list:function(w){for(;w instanceof j&&w.indicator===\"./2\";)w=w.args[1];return w instanceof De||w instanceof j&&w.indicator===\"[]/0\"},is_instantiated_list:function(w){for(;w instanceof j&&w.indicator===\"./2\";)w=w.args[1];return w instanceof j&&w.indicator===\"[]/0\"},is_unitary_list:function(w){return w instanceof j&&w.indicator===\"./2\"&&w.args[1]instanceof j&&w.args[1].indicator===\"[]/0\"},is_character:function(w){return w instanceof j&&(w.id.length===1||w.id.length>0&&w.id.length<=2&&n(w.id,0)>=65536)},is_character_code:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=1114111},is_byte:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=255},is_operator:function(w){return w instanceof j&&x.arithmetic.evaluation[w.indicator]},is_directive:function(w){return w instanceof j&&x.directive[w.indicator]!==void 0},is_builtin:function(w){return w instanceof j&&x.predicate[w.indicator]!==void 0},is_error:function(w){return w instanceof j&&w.indicator===\"throw/1\"},is_predicate_indicator:function(w){return w instanceof j&&w.indicator===\"//2\"&&w.args[0]instanceof j&&w.args[0].args.length===0&&w.args[1]instanceof Re&&w.args[1].is_float===!1},is_flag:function(w){return w instanceof j&&w.args.length===0&&x.flag[w.id]!==void 0},is_value_flag:function(w,b){if(!x.type.is_flag(w))return!1;for(var y in x.flag[w.id].allowed)if(x.flag[w.id].allowed.hasOwnProperty(y)&&x.flag[w.id].allowed[y].equals(b))return!0;return!1},is_io_mode:function(w){return x.type.is_atom(w)&&[\"read\",\"write\",\"append\"].indexOf(w.id)!==-1},is_stream_option:function(w){return x.type.is_term(w)&&(w.indicator===\"alias/1\"&&x.type.is_atom(w.args[0])||w.indicator===\"reposition/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")||w.indicator===\"type/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"text\"||w.args[0].id===\"binary\")||w.indicator===\"eof_action/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"error\"||w.args[0].id===\"eof_code\"||w.args[0].id===\"reset\"))},is_stream_position:function(w){return x.type.is_integer(w)&&w.value>=0||x.type.is_atom(w)&&(w.id===\"end_of_stream\"||w.id===\"past_end_of_stream\")},is_stream_property:function(w){return x.type.is_term(w)&&(w.indicator===\"input/0\"||w.indicator===\"output/0\"||w.indicator===\"alias/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator===\"file_name/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator===\"position/1\"&&(x.type.is_variable(w.args[0])||x.type.is_stream_position(w.args[0]))||w.indicator===\"reposition/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\"))||w.indicator===\"type/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"text\"||w.args[0].id===\"binary\"))||w.indicator===\"mode/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"read\"||w.args[0].id===\"write\"||w.args[0].id===\"append\"))||w.indicator===\"eof_action/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"error\"||w.args[0].id===\"eof_code\"||w.args[0].id===\"reset\"))||w.indicator===\"end_of_stream/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"at\"||w.args[0].id===\"past\"||w.args[0].id===\"not\")))},is_streamable:function(w){return w.__proto__.stream!==void 0},is_read_option:function(w){return x.type.is_term(w)&&[\"variables/1\",\"variable_names/1\",\"singletons/1\"].indexOf(w.indicator)!==-1},is_write_option:function(w){return x.type.is_term(w)&&(w.indicator===\"quoted/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")||w.indicator===\"ignore_ops/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")||w.indicator===\"numbervars/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\"))},is_close_option:function(w){return x.type.is_term(w)&&w.indicator===\"force/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")},is_modifiable_flag:function(w){return x.type.is_flag(w)&&x.flag[w.id].changeable},is_module:function(w){return w instanceof j&&w.indicator===\"library/1\"&&w.args[0]instanceof j&&w.args[0].args.length===0&&x.module[w.args[0].id]!==void 0}},arithmetic:{evaluation:{\"e/0\":{type_args:null,type_result:!0,fn:function(w){return Math.E}},\"pi/0\":{type_args:null,type_result:!0,fn:function(w){return Math.PI}},\"tau/0\":{type_args:null,type_result:!0,fn:function(w){return 2*Math.PI}},\"epsilon/0\":{type_args:null,type_result:!0,fn:function(w){return Number.EPSILON}},\"+/1\":{type_args:null,type_result:null,fn:function(w,b){return w}},\"-/1\":{type_args:null,type_result:null,fn:function(w,b){return-w}},\"\\\\/1\":{type_args:!1,type_result:!1,fn:function(w,b){return~w}},\"abs/1\":{type_args:null,type_result:null,fn:function(w,b){return Math.abs(w)}},\"sign/1\":{type_args:null,type_result:null,fn:function(w,b){return Math.sign(w)}},\"float_integer_part/1\":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},\"float_fractional_part/1\":{type_args:!0,type_result:!0,fn:function(w,b){return w-parseInt(w)}},\"float/1\":{type_args:null,type_result:!0,fn:function(w,b){return parseFloat(w)}},\"floor/1\":{type_args:!0,type_result:!1,fn:function(w,b){return Math.floor(w)}},\"truncate/1\":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},\"round/1\":{type_args:!0,type_result:!1,fn:function(w,b){return Math.round(w)}},\"ceiling/1\":{type_args:!0,type_result:!1,fn:function(w,b){return Math.ceil(w)}},\"sin/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.sin(w)}},\"cos/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.cos(w)}},\"tan/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.tan(w)}},\"asin/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.asin(w)}},\"acos/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.acos(w)}},\"atan/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.atan(w)}},\"atan2/2\":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.atan2(w,b)}},\"exp/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.exp(w)}},\"sqrt/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.sqrt(w)}},\"log/1\":{type_args:null,type_result:!0,fn:function(w,b){return w>0?Math.log(w):x.error.evaluation(\"undefined\",b.__call_indicator)}},\"+/2\":{type_args:null,type_result:null,fn:function(w,b,y){return w+b}},\"-/2\":{type_args:null,type_result:null,fn:function(w,b,y){return w-b}},\"*/2\":{type_args:null,type_result:null,fn:function(w,b,y){return w*b}},\"//2\":{type_args:null,type_result:!0,fn:function(w,b,y){return b?w/b:x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"///2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?parseInt(w/b):x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"**/2\":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.pow(w,b)}},\"^/2\":{type_args:null,type_result:null,fn:function(w,b,y){return Math.pow(w,b)}},\"<</2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w<<b}},\">>/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w>>b}},\"/\\\\/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w&b}},\"\\\\//2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w|b}},\"xor/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w^b}},\"rem/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w%b:x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"mod/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w-parseInt(w/b)*b:x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"max/2\":{type_args:null,type_result:null,fn:function(w,b,y){return Math.max(w,b)}},\"min/2\":{type_args:null,type_result:null,fn:function(w,b,y){return Math.min(w,b)}}}},directive:{\"dynamic/1\":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_compound(y)||y.indicator!==\"//2\")w.throw_error(x.error.type(\"predicate_indicator\",y,b.indicator));else if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type(\"atom\",y.args[0],b.indicator));else if(!x.type.is_integer(y.args[1]))w.throw_error(x.error.type(\"integer\",y.args[1],b.indicator));else{var F=b.args[0].args[0].id+\"/\"+b.args[0].args[1].value;w.session.public_predicates[F]=!0,w.session.rules[F]||(w.session.rules[F]=[])}},\"multifile/1\":function(w,b){var y=b.args[0];x.type.is_variable(y)?w.throw_error(x.error.instantiation(b.indicator)):!x.type.is_compound(y)||y.indicator!==\"//2\"?w.throw_error(x.error.type(\"predicate_indicator\",y,b.indicator)):x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1])?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y.args[0])?x.type.is_integer(y.args[1])?w.session.multifile_predicates[b.args[0].args[0].id+\"/\"+b.args[0].args[1].value]=!0:w.throw_error(x.error.type(\"integer\",y.args[1],b.indicator)):w.throw_error(x.error.type(\"atom\",y.args[0],b.indicator))},\"set_prolog_flag/2\":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y)?x.type.is_flag(y)?x.type.is_value_flag(y,F)?x.type.is_modifiable_flag(y)?w.session.flag[y.id]=F:w.throw_error(x.error.permission(\"modify\",\"flag\",y)):w.throw_error(x.error.domain(\"flag_value\",new j(\"+\",[y,F]),b.indicator)):w.throw_error(x.error.domain(\"prolog_flag\",y,b.indicator)):w.throw_error(x.error.type(\"atom\",y,b.indicator))},\"use_module/1\":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_term(y))w.throw_error(x.error.type(\"term\",y,b.indicator));else if(x.type.is_module(y)){var F=y.args[0].id;e(w.session.modules,F)===-1&&w.session.modules.push(F)}},\"char_conversion/2\":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_character(y)?x.type.is_character(F)?y.id===F.id?delete w.session.__char_conversion[y.id]:w.session.__char_conversion[y.id]=F.id:w.throw_error(x.error.type(\"character\",F,b.indicator)):w.throw_error(x.error.type(\"character\",y,b.indicator))},\"op/3\":function(w,b){var y=b.args[0],F=b.args[1],z=b.args[2];if(x.type.is_variable(y)||x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_integer(y))w.throw_error(x.error.type(\"integer\",y,b.indicator));else if(!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,b.indicator));else if(!x.type.is_atom(z))w.throw_error(x.error.type(\"atom\",z,b.indicator));else if(y.value<0||y.value>1200)w.throw_error(x.error.domain(\"operator_priority\",y,b.indicator));else if(z.id===\",\")w.throw_error(x.error.permission(\"modify\",\"operator\",z,b.indicator));else if(z.id===\"|\"&&(y.value<1001||F.id.length!==3))w.throw_error(x.error.permission(\"modify\",\"operator\",z,b.indicator));else if([\"fy\",\"fx\",\"yf\",\"xf\",\"xfx\",\"yfx\",\"xfy\"].indexOf(F.id)===-1)w.throw_error(x.error.domain(\"operator_specifier\",F,b.indicator));else{var Z={prefix:null,infix:null,postfix:null};for(var $ in w.session.__operators)if(w.session.__operators.hasOwnProperty($)){var oe=w.session.__operators[$][z.id];oe&&(e(oe,\"fx\")!==-1&&(Z.prefix={priority:$,type:\"fx\"}),e(oe,\"fy\")!==-1&&(Z.prefix={priority:$,type:\"fy\"}),e(oe,\"xf\")!==-1&&(Z.postfix={priority:$,type:\"xf\"}),e(oe,\"yf\")!==-1&&(Z.postfix={priority:$,type:\"yf\"}),e(oe,\"xfx\")!==-1&&(Z.infix={priority:$,type:\"xfx\"}),e(oe,\"xfy\")!==-1&&(Z.infix={priority:$,type:\"xfy\"}),e(oe,\"yfx\")!==-1&&(Z.infix={priority:$,type:\"yfx\"}))}var xe;switch(F.id){case\"fy\":case\"fx\":xe=\"prefix\";break;case\"yf\":case\"xf\":xe=\"postfix\";break;default:xe=\"infix\";break}if(((Z.prefix&&xe===\"prefix\"||Z.postfix&&xe===\"postfix\"||Z.infix&&xe===\"infix\")&&Z[xe].type!==F.id||Z.infix&&xe===\"postfix\"||Z.postfix&&xe===\"infix\")&&y.value!==0)w.throw_error(x.error.permission(\"create\",\"operator\",z,b.indicator));else return Z[xe]&&(we(w.session.__operators[Z[xe].priority][z.id],F.id),w.session.__operators[Z[xe].priority][z.id].length===0&&delete w.session.__operators[Z[xe].priority][z.id]),y.value>0&&(w.session.__operators[y.value]||(w.session.__operators[y.value.toString()]={}),w.session.__operators[y.value][z.id]||(w.session.__operators[y.value][z.id]=[]),w.session.__operators[y.value][z.id].push(F.id)),!0}}},predicate:{\"op/3\":function(w,b,y){x.directive[\"op/3\"](w,y)&&w.success(b)},\"current_op/3\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2],$=[];for(var oe in w.session.__operators)for(var xe in w.session.__operators[oe])for(var Te=0;Te<w.session.__operators[oe][xe].length;Te++)$.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[new Re(oe,!1),F]),new j(\",\",[new j(\"=\",[new j(w.session.__operators[oe][xe][Te],[]),z]),new j(\"=\",[new j(xe,[]),Z])])])),b.substitution,b));w.prepend($)},\";/2\":function(w,b,y){if(x.type.is_term(y.args[0])&&y.args[0].indicator===\"->/2\"){var F=w.points,z=w.session.format_success,Z=w.session.format_error;w.session.format_success=function(Te){return Te.substitution},w.session.format_error=function(Te){return Te.goal},w.points=[new Pe(y.args[0].args[0],b.substitution,b)];var $=function(Te){w.points=F,w.session.format_success=z,w.session.format_error=Z,Te===!1?w.prepend([new Pe(b.goal.replace(y.args[1]),b.substitution,b)]):x.type.is_error(Te)?w.throw_error(Te.args[0]):Te===null?(w.prepend([b]),w.__calls.shift()(null)):w.prepend([new Pe(b.goal.replace(y.args[0].args[1]).apply(Te),b.substitution.apply(Te),b)])};w.__calls.unshift($)}else{var oe=new Pe(b.goal.replace(y.args[0]),b.substitution,b),xe=new Pe(b.goal.replace(y.args[1]),b.substitution,b);w.prepend([oe,xe])}},\"!/0\":function(w,b,y){var F,z,Z=[];for(F=b,z=null;F.parent!==null&&F.parent.goal.search(y);)if(z=F,F=F.parent,F.goal!==null){var $=F.goal.select();if($&&$.id===\"call\"&&$.search(y)){F=z;break}}for(var oe=w.points.length-1;oe>=0;oe--){for(var xe=w.points[oe],Te=xe.parent;Te!==null&&Te!==F.parent;)Te=Te.parent;Te===null&&Te!==F.parent&&Z.push(xe)}w.points=Z.reverse(),w.success(b)},\"\\\\+/1\":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(w.level)):x.type.is_callable(F)?w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\",\",[new j(\"call\",[F]),new j(\"!\",[])]),new j(\"fail\",[])])),b.substitution,b),new Pe(b.goal.replace(null),b.substitution,b)]):w.throw_error(x.error.type(\"callable\",F,w.level))},\"->/2\":function(w,b,y){var F=b.goal.replace(new j(\",\",[y.args[0],new j(\",\",[new j(\"!\"),y.args[1]])]));w.prepend([new Pe(F,b.substitution,b)])},\"fail/0\":function(w,b,y){},\"false/0\":function(w,b,y){},\"true/0\":function(w,b,y){w.success(b)},\"call/1\":se(1),\"call/2\":se(2),\"call/3\":se(3),\"call/4\":se(4),\"call/5\":se(5),\"call/6\":se(6),\"call/7\":se(7),\"call/8\":se(8),\"once/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"call\",[F]),new j(\"!\",[])])),b.substitution,b)])},\"forall/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"\\\\+\",[new j(\",\",[new j(\"call\",[F]),new j(\"\\\\+\",[new j(\"call\",[z])])])])),b.substitution,b)])},\"repeat/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(null),b.substitution,b),b])},\"throw/1\":function(w,b,y){x.type.is_variable(y.args[0])?w.throw_error(x.error.instantiation(w.level)):w.throw_error(y.args[0])},\"catch/3\":function(w,b,y){var F=w.points;w.points=[],w.prepend([new Pe(y.args[0],b.substitution,b)]);var z=w.session.format_success,Z=w.session.format_error;w.session.format_success=function(oe){return oe.substitution},w.session.format_error=function(oe){return oe.goal};var $=function(oe){var xe=w.points;if(w.points=F,w.session.format_success=z,w.session.format_error=Z,x.type.is_error(oe)){for(var Te=[],lt=w.points.length-1;lt>=0;lt--){for(var ir=w.points[lt],Et=ir.parent;Et!==null&&Et!==b.parent;)Et=Et.parent;Et===null&&Et!==b.parent&&Te.push(ir)}w.points=Te;var qt=w.get_flag(\"occurs_check\").indicator===\"true/0\",ir=new Pe,Pt=x.unify(oe.args[0],y.args[1],qt);Pt!==null?(ir.substitution=b.substitution.apply(Pt),ir.goal=b.goal.replace(y.args[2]).apply(Pt),ir.parent=b,w.prepend([ir])):w.throw_error(oe.args[0])}else if(oe!==!1){for(var gn=oe===null?[]:[new Pe(b.goal.apply(oe).replace(null),b.substitution.apply(oe),b)],Pr=[],lt=xe.length-1;lt>=0;lt--){Pr.push(xe[lt]);var Ir=xe[lt].goal!==null?xe[lt].goal.select():null;if(x.type.is_term(Ir)&&Ir.indicator===\"!/0\")break}var Nr=s(Pr,function(nn){return nn.goal===null&&(nn.goal=new j(\"true\",[])),nn=new Pe(b.goal.replace(new j(\"catch\",[nn.goal,y.args[1],y.args[2]])),b.substitution.apply(nn.substitution),nn.parent),nn.exclude=y.args[0].variables(),nn}).reverse();w.prepend(Nr),w.prepend(gn),oe===null&&(this.current_limit=0,w.__calls.shift()(null))}};w.__calls.unshift($)},\"=/2\":function(w,b,y){var F=w.get_flag(\"occurs_check\").indicator===\"true/0\",z=new Pe,Z=x.unify(y.args[0],y.args[1],F);Z!==null&&(z.goal=b.goal.apply(Z).replace(null),z.substitution=b.substitution.apply(Z),z.parent=b,w.prepend([z]))},\"unify_with_occurs_check/2\":function(w,b,y){var F=new Pe,z=x.unify(y.args[0],y.args[1],!0);z!==null&&(F.goal=b.goal.apply(z).replace(null),F.substitution=b.substitution.apply(z),F.parent=b,w.prepend([F]))},\"\\\\=/2\":function(w,b,y){var F=w.get_flag(\"occurs_check\").indicator===\"true/0\",z=x.unify(y.args[0],y.args[1],F);z===null&&w.success(b)},\"subsumes_term/2\":function(w,b,y){var F=w.get_flag(\"occurs_check\").indicator===\"true/0\",z=x.unify(y.args[1],y.args[0],F);z!==null&&y.args[1].apply(z).equals(y.args[1])&&w.success(b)},\"findall/3\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(z))w.throw_error(x.error.type(\"callable\",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))w.throw_error(x.error.type(\"list\",Z,y.indicator));else{var $=w.next_free_variable(),oe=new j(\",\",[z,new j(\"=\",[$,F])]),xe=w.points,Te=w.session.limit,lt=w.session.format_success;w.session.format_success=function(ir){return ir.substitution},w.add_goal(oe,!0,b);var Et=[],qt=function(ir){if(ir!==!1&&ir!==null&&!x.type.is_error(ir))w.__calls.unshift(qt),Et.push(ir.links[$.id]),w.session.limit=w.current_limit;else if(w.points=xe,w.session.limit=Te,w.session.format_success=lt,x.type.is_error(ir))w.throw_error(ir.args[0]);else if(w.current_limit>0){for(var Pt=new j(\"[]\"),gn=Et.length-1;gn>=0;gn--)Pt=new j(\".\",[Et[gn],Pt]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[Z,Pt])),b.substitution,b)])}};w.__calls.unshift(qt)}},\"bagof/3\":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2];if(x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(Z))w.throw_error(x.error.type(\"callable\",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type(\"list\",$,y.indicator));else{var oe=w.next_free_variable(),xe;Z.indicator===\"^/2\"?(xe=Z.args[0].variables(),Z=Z.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=Z.variables().filter(function(Nr){return e(xe,Nr)===-1}),lt=new j(\"[]\"),Et=Te.length-1;Et>=0;Et--)lt=new j(\".\",[new De(Te[Et]),lt]);var qt=new j(\",\",[Z,new j(\"=\",[oe,new j(\",\",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Nr){return Nr.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Nr){if(Nr!==!1&&Nr!==null&&!x.type.is_error(Nr)){w.__calls.unshift(Ir);var nn=!1,oi=Nr.links[oe.id].args[0],wo=Nr.links[oe.id].args[1];for(var rs in Pr)if(Pr.hasOwnProperty(rs)){var eo=Pr[rs];if(eo.variables.equals(oi)){eo.answers.push(wo),nn=!0;break}}nn||Pr.push({variables:oi,answers:[wo]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Nr))w.throw_error(Nr.args[0]);else if(w.current_limit>0){for(var Bo=[],Hi=0;Hi<Pr.length;Hi++){Nr=Pr[Hi].answers;for(var to=new j(\"[]\"),vo=Nr.length-1;vo>=0;vo--)to=new j(\".\",[Nr[vo],to]);Bo.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[lt,Pr[Hi].variables]),new j(\"=\",[$,to])])),b.substitution,b))}w.prepend(Bo)}};w.__calls.unshift(Ir)}},\"setof/3\":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2];if(x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(Z))w.throw_error(x.error.type(\"callable\",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type(\"list\",$,y.indicator));else{var oe=w.next_free_variable(),xe;Z.indicator===\"^/2\"?(xe=Z.args[0].variables(),Z=Z.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=Z.variables().filter(function(Nr){return e(xe,Nr)===-1}),lt=new j(\"[]\"),Et=Te.length-1;Et>=0;Et--)lt=new j(\".\",[new De(Te[Et]),lt]);var qt=new j(\",\",[Z,new j(\"=\",[oe,new j(\",\",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Nr){return Nr.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Nr){if(Nr!==!1&&Nr!==null&&!x.type.is_error(Nr)){w.__calls.unshift(Ir);var nn=!1,oi=Nr.links[oe.id].args[0],wo=Nr.links[oe.id].args[1];for(var rs in Pr)if(Pr.hasOwnProperty(rs)){var eo=Pr[rs];if(eo.variables.equals(oi)){eo.answers.push(wo),nn=!0;break}}nn||Pr.push({variables:oi,answers:[wo]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Nr))w.throw_error(Nr.args[0]);else if(w.current_limit>0){for(var Bo=[],Hi=0;Hi<Pr.length;Hi++){Nr=Pr[Hi].answers.sort(x.compare);for(var to=new j(\"[]\"),vo=Nr.length-1;vo>=0;vo--)to=new j(\".\",[Nr[vo],to]);Bo.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[lt,Pr[Hi].variables]),new j(\"=\",[$,to])])),b.substitution,b))}w.prepend(Bo)}};w.__calls.unshift(Ir)}},\"functor/3\":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2];if(x.type.is_variable(z)&&(x.type.is_variable(Z)||x.type.is_variable($)))w.throw_error(x.error.instantiation(\"functor/3\"));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type(\"integer\",y.args[2],\"functor/3\"));else if(!x.type.is_variable(Z)&&!x.type.is_atomic(Z))w.throw_error(x.error.type(\"atomic\",y.args[1],\"functor/3\"));else if(x.type.is_integer(Z)&&x.type.is_integer($)&&$.value!==0)w.throw_error(x.error.type(\"atom\",y.args[1],\"functor/3\"));else if(x.type.is_variable(z)){if(y.args[2].value>=0){for(var oe=[],xe=0;xe<$.value;xe++)oe.push(w.next_free_variable());var Te=x.type.is_integer(Z)?Z:new j(Z.id,oe);w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,Te])),b.substitution,b)])}}else{var lt=x.type.is_integer(z)?z:new j(z.id,[]),Et=x.type.is_integer(z)?new Re(0,!1):new Re(z.args.length,!1),qt=new j(\",\",[new j(\"=\",[lt,Z]),new j(\"=\",[Et,$])]);w.prepend([new Pe(b.goal.replace(qt),b.substitution,b)])}},\"arg/3\":function(w,b,y){if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(y.indicator));else if(y.args[0].value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",y.args[0],y.indicator));else if(!x.type.is_compound(y.args[1]))w.throw_error(x.error.type(\"compound\",y.args[1],y.indicator));else{var F=y.args[0].value;if(F>0&&F<=y.args[1].args.length){var z=new j(\"=\",[y.args[1].args[F-1],y.args[2]]);w.prepend([new Pe(b.goal.replace(z),b.substitution,b)])}}},\"=../2\":function(w,b,y){var F;if(x.type.is_variable(y.args[0])&&(x.type.is_variable(y.args[1])||x.type.is_non_empty_list(y.args[1])&&x.type.is_variable(y.args[1].args[0])))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_fully_list(y.args[1]))w.throw_error(x.error.type(\"list\",y.args[1],y.indicator));else if(x.type.is_variable(y.args[0])){if(!x.type.is_variable(y.args[1])){var Z=[];for(F=y.args[1].args[1];F.indicator===\"./2\";)Z.push(F.args[0]),F=F.args[1];x.type.is_variable(y.args[0])&&x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):Z.length===0&&x.type.is_compound(y.args[1].args[0])?w.throw_error(x.error.type(\"atomic\",y.args[1].args[0],y.indicator)):Z.length>0&&(x.type.is_compound(y.args[1].args[0])||x.type.is_number(y.args[1].args[0]))?w.throw_error(x.error.type(\"atom\",y.args[1].args[0],y.indicator)):Z.length===0?w.prepend([new Pe(b.goal.replace(new j(\"=\",[y.args[1].args[0],y.args[0]],b)),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j(y.args[1].args[0].id,Z),y.args[0]])),b.substitution,b)])}}else{if(x.type.is_atomic(y.args[0]))F=new j(\".\",[y.args[0],new j(\"[]\")]);else{F=new j(\"[]\");for(var z=y.args[0].args.length-1;z>=0;z--)F=new j(\".\",[y.args[0].args[z],F]);F=new j(\".\",[new j(y.args[0].id),F])}w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,y.args[1]])),b.substitution,b)])}},\"copy_term/2\":function(w,b,y){var F=y.args[0].rename(w);w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,y.args[1]])),b.substitution,b.parent)])},\"term_variables/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_fully_list(z))w.throw_error(x.error.type(\"list\",z,y.indicator));else{var Z=g(s(Ee(F.variables()),function($){return new De($)}));w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,Z])),b.substitution,b)])}},\"clause/2\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_callable(y.args[1]))w.throw_error(x.error.type(\"callable\",y.args[1],y.indicator));else if(w.session.rules[y.args[0].indicator]!==void 0)if(w.is_public_predicate(y.args[0].indicator)){var F=[];for(var z in w.session.rules[y.args[0].indicator])if(w.session.rules[y.args[0].indicator].hasOwnProperty(z)){var Z=w.session.rules[y.args[0].indicator][z];w.session.renamed_variables={},Z=Z.rename(w),Z.body===null&&(Z.body=new j(\"true\"));var $=new j(\",\",[new j(\"=\",[Z.head,y.args[0]]),new j(\"=\",[Z.body,y.args[1]])]);F.push(new Pe(b.goal.replace($),b.substitution,b))}w.prepend(F)}else w.throw_error(x.error.permission(\"access\",\"private_procedure\",y.args[0].indicator,y.indicator))},\"current_predicate/1\":function(w,b,y){var F=y.args[0];if(!x.type.is_variable(F)&&(!x.type.is_compound(F)||F.indicator!==\"//2\"))w.throw_error(x.error.type(\"predicate_indicator\",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[0])&&!x.type.is_atom(F.args[0]))w.throw_error(x.error.type(\"atom\",F.args[0],y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[1])&&!x.type.is_integer(F.args[1]))w.throw_error(x.error.type(\"integer\",F.args[1],y.indicator));else{var z=[];for(var Z in w.session.rules)if(w.session.rules.hasOwnProperty(Z)){var $=Z.lastIndexOf(\"/\"),oe=Z.substr(0,$),xe=parseInt(Z.substr($+1,Z.length-($+1))),Te=new j(\"/\",[new j(oe),new Re(xe,!1)]),lt=new j(\"=\",[Te,F]);z.push(new Pe(b.goal.replace(lt),b.substitution,b))}w.prepend(z)}},\"asserta/1\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===\":-/2\"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type(\"callable\",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator]=[new Ye(F,z,!0)].concat(w.session.rules[F.indicator]),w.success(b)):w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F.indicator,y.indicator)):w.throw_error(x.error.type(\"callable\",F,y.indicator))}},\"assertz/1\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===\":-/2\"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type(\"callable\",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator].push(new Ye(F,z,!0)),w.success(b)):w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F.indicator,y.indicator)):w.throw_error(x.error.type(\"callable\",F,y.indicator))}},\"retract/1\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else{var F,z;if(y.args[0].indicator===\":-/2\"?(F=y.args[0].args[0],z=y.args[0].args[1]):(F=y.args[0],z=new j(\"true\")),typeof b.retract>\"u\")if(w.is_public_predicate(F.indicator)){if(w.session.rules[F.indicator]!==void 0){for(var Z=[],$=0;$<w.session.rules[F.indicator].length;$++){w.session.renamed_variables={};var oe=w.session.rules[F.indicator][$],xe=oe.rename(w);xe.body===null&&(xe.body=new j(\"true\",[]));var Te=w.get_flag(\"occurs_check\").indicator===\"true/0\",lt=x.unify(new j(\",\",[F,z]),new j(\",\",[xe.head,xe.body]),Te);if(lt!==null){var Et=new Pe(b.goal.replace(new j(\",\",[new j(\"retract\",[new j(\":-\",[F,z])]),new j(\",\",[new j(\"=\",[F,xe.head]),new j(\"=\",[z,xe.body])])])),b.substitution,b);Et.retract=oe,Z.push(Et)}}w.prepend(Z)}}else w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F.indicator,y.indicator));else fe(w,b,F.indicator,b.retract)}},\"retractall/1\":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_callable(F)?w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"retract\",[new x.type.Term(\":-\",[F,new De(\"_\")])]),new j(\"fail\",[])])),b.substitution,b),new Pe(b.goal.replace(null),b.substitution,b)]):w.throw_error(x.error.type(\"callable\",F,y.indicator))},\"abolish/1\":function(w,b,y){if(x.type.is_variable(y.args[0])||x.type.is_term(y.args[0])&&y.args[0].indicator===\"//2\"&&(x.type.is_variable(y.args[0].args[0])||x.type.is_variable(y.args[0].args[1])))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_term(y.args[0])||y.args[0].indicator!==\"//2\")w.throw_error(x.error.type(\"predicate_indicator\",y.args[0],y.indicator));else if(!x.type.is_atom(y.args[0].args[0]))w.throw_error(x.error.type(\"atom\",y.args[0].args[0],y.indicator));else if(!x.type.is_integer(y.args[0].args[1]))w.throw_error(x.error.type(\"integer\",y.args[0].args[1],y.indicator));else if(y.args[0].args[1].value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",y.args[0].args[1],y.indicator));else if(x.type.is_number(w.get_flag(\"max_arity\"))&&y.args[0].args[1].value>w.get_flag(\"max_arity\").value)w.throw_error(x.error.representation(\"max_arity\",y.indicator));else{var F=y.args[0].args[0].id+\"/\"+y.args[0].args[1].value;w.is_public_predicate(F)?(delete w.session.rules[F],w.success(b)):w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F,y.indicator))}},\"atom_length/2\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type(\"atom\",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_integer(y.args[1]))w.throw_error(x.error.type(\"integer\",y.args[1],y.indicator));else if(x.type.is_integer(y.args[1])&&y.args[1].value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",y.args[1],y.indicator));else{var F=new Re(y.args[0].id.length,!1);w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,y.args[1]])),b.substitution,b)])}},\"atom_concat/3\":function(w,b,y){var F,z,Z=y.args[0],$=y.args[1],oe=y.args[2];if(x.type.is_variable(oe)&&(x.type.is_variable(Z)||x.type.is_variable($)))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_atom(Z))w.throw_error(x.error.type(\"atom\",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_atom($))w.throw_error(x.error.type(\"atom\",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_atom(oe))w.throw_error(x.error.type(\"atom\",oe,y.indicator));else{var xe=x.type.is_variable(Z),Te=x.type.is_variable($);if(!xe&&!Te)z=new j(\"=\",[oe,new j(Z.id+$.id)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]);else if(xe&&!Te)F=oe.id.substr(0,oe.id.length-$.id.length),F+$.id===oe.id&&(z=new j(\"=\",[Z,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else if(Te&&!xe)F=oe.id.substr(Z.id.length),Z.id+F===oe.id&&(z=new j(\"=\",[$,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else{for(var lt=[],Et=0;Et<=oe.id.length;Et++){var qt=new j(oe.id.substr(0,Et)),ir=new j(oe.id.substr(Et));z=new j(\",\",[new j(\"=\",[qt,Z]),new j(\"=\",[ir,$])]),lt.push(new Pe(b.goal.replace(z),b.substitution,b))}w.prepend(lt)}}},\"sub_atom/5\":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2],oe=y.args[3],xe=y.args[4];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_integer(Z))w.throw_error(x.error.type(\"integer\",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type(\"integer\",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_integer(oe))w.throw_error(x.error.type(\"integer\",oe,y.indicator));else if(x.type.is_integer(Z)&&Z.value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",Z,y.indicator));else if(x.type.is_integer($)&&$.value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",$,y.indicator));else if(x.type.is_integer(oe)&&oe.value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",oe,y.indicator));else{var Te=[],lt=[],Et=[];if(x.type.is_variable(Z))for(F=0;F<=z.id.length;F++)Te.push(F);else Te.push(Z.value);if(x.type.is_variable($))for(F=0;F<=z.id.length;F++)lt.push(F);else lt.push($.value);if(x.type.is_variable(oe))for(F=0;F<=z.id.length;F++)Et.push(F);else Et.push(oe.value);var qt=[];for(var ir in Te)if(Te.hasOwnProperty(ir)){F=Te[ir];for(var Pt in lt)if(lt.hasOwnProperty(Pt)){var gn=lt[Pt],Pr=z.id.length-F-gn;if(e(Et,Pr)!==-1&&F+gn+Pr===z.id.length){var Ir=z.id.substr(F,gn);if(z.id===z.id.substr(0,F)+Ir+z.id.substr(F+gn,Pr)){var Nr=new j(\"=\",[new j(Ir),xe]),nn=new j(\"=\",[Z,new Re(F)]),oi=new j(\"=\",[$,new Re(gn)]),wo=new j(\"=\",[oe,new Re(Pr)]),rs=new j(\",\",[new j(\",\",[new j(\",\",[nn,oi]),wo]),Nr]);qt.push(new Pe(b.goal.replace(rs),b.substitution,b))}}}}w.prepend(qt)}},\"atom_chars/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te=\"\";oe.indicator===\"./2\";){if(x.type.is_character(oe.args[0]))Te+=oe.args[0].id;else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type(\"character\",oe.args[0],y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type(\"list\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j(Te),F])),b.substitution,b)])}else{for(var Z=new j(\"[]\"),$=F.id.length-1;$>=0;$--)Z=new j(\".\",[new j(F.id.charAt($)),Z]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,Z])),b.substitution,b)])}},\"atom_codes/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te=\"\";oe.indicator===\"./2\";){if(x.type.is_character_code(oe.args[0]))Te+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.representation(\"character_code\",y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type(\"list\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j(Te),F])),b.substitution,b)])}else{for(var Z=new j(\"[]\"),$=F.id.length-1;$>=0;$--)Z=new j(\".\",[new Re(n(F.id,$),!1),Z]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,Z])),b.substitution,b)])}},\"char_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_character(F))w.throw_error(x.error.type(\"character\",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",z,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character_code(z))w.throw_error(x.error.representation(\"character_code\",y.indicator));else if(x.type.is_variable(z)){var Z=new Re(n(F.id,0),!1);w.prepend([new Pe(b.goal.replace(new j(\"=\",[Z,z])),b.substitution,b)])}else{var $=new j(c(z.value));w.prepend([new Pe(b.goal.replace(new j(\"=\",[$,F])),b.substitution,b)])}},\"number_chars/2\":function(w,b,y){var F,z=y.args[0],Z=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type(\"number\",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))w.throw_error(x.error.type(\"list\",Z,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(Z)){var oe=Z,xe=!0;for(F=\"\";oe.indicator===\"./2\";){if(x.type.is_character(oe.args[0]))F+=oe.args[0].id;else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type(\"character\",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type(\"list\",Z,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate(\"parseable_number\",y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var Et=new j(\"[]\"),qt=F.length-1;qt>=0;qt--)Et=new j(\".\",[new j(F.charAt(qt)),Et]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[Z,Et])),b.substitution,b)])}}},\"number_codes/2\":function(w,b,y){var F,z=y.args[0],Z=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type(\"number\",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))w.throw_error(x.error.type(\"list\",Z,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(Z)){var oe=Z,xe=!0;for(F=\"\";oe.indicator===\"./2\";){if(x.type.is_character_code(oe.args[0]))F+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type(\"character_code\",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type(\"list\",Z,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate(\"parseable_number\",y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var Et=new j(\"[]\"),qt=F.length-1;qt>=0;qt--)Et=new j(\".\",[new Re(n(F,qt),!1),Et]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[Z,Et])),b.substitution,b)])}}},\"upcase_atom/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type(\"atom\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,new j(F.id.toUpperCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type(\"atom\",F,y.indicator))},\"downcase_atom/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type(\"atom\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,new j(F.id.toLowerCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type(\"atom\",F,y.indicator))},\"atomic_list_concat/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"atomic_list_concat\",[F,new j(\"\",[]),z])),b.substitution,b)])},\"atomic_list_concat/3\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(x.type.is_variable(z)||x.type.is_variable(F)&&x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_list(F))w.throw_error(x.error.type(\"list\",F,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_atom(Z))w.throw_error(x.error.type(\"atom\",Z,y.indicator));else if(x.type.is_variable(Z)){for(var oe=\"\",xe=F;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(!x.type.is_atom(xe.args[0])&&!x.type.is_number(xe.args[0])){w.throw_error(x.error.type(\"atomic\",xe.args[0],y.indicator));return}oe!==\"\"&&(oe+=z.id),x.type.is_atom(xe.args[0])?oe+=xe.args[0].id:oe+=\"\"+xe.args[0].value,xe=xe.args[1]}oe=new j(oe,[]),x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_term(xe)||xe.indicator!==\"[]/0\"?w.throw_error(x.error.type(\"list\",F,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[oe,Z])),b.substitution,b)])}else{var $=g(s(Z.id.split(z.id),function(Te){return new j(Te,[])}));w.prepend([new Pe(b.goal.replace(new j(\"=\",[$,F])),b.substitution,b)])}},\"@=</2\":function(w,b,y){x.compare(y.args[0],y.args[1])<=0&&w.success(b)},\"==/2\":function(w,b,y){x.compare(y.args[0],y.args[1])===0&&w.success(b)},\"\\\\==/2\":function(w,b,y){x.compare(y.args[0],y.args[1])!==0&&w.success(b)},\"@</2\":function(w,b,y){x.compare(y.args[0],y.args[1])<0&&w.success(b)},\"@>/2\":function(w,b,y){x.compare(y.args[0],y.args[1])>0&&w.success(b)},\"@>=/2\":function(w,b,y){x.compare(y.args[0],y.args[1])>=0&&w.success(b)},\"compare/3\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(x.type.is_atom(F)&&[\"<\",\">\",\"=\"].indexOf(F.id)===-1)w.throw_error(x.type.domain(\"order\",F,y.indicator));else{var $=x.compare(z,Z);$=$===0?\"=\":$===-1?\"<\":\">\",w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,new j($,[])])),b.substitution,b)])}},\"is/2\":function(w,b,y){var F=y.args[1].interpret(w);x.type.is_number(F)?w.prepend([new Pe(b.goal.replace(new j(\"=\",[y.args[0],F],w.level)),b.substitution,b)]):w.throw_error(F)},\"between/3\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_integer(F))w.throw_error(x.error.type(\"integer\",F,y.indicator));else if(!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_integer(Z))w.throw_error(x.error.type(\"integer\",Z,y.indicator));else if(x.type.is_variable(Z)){var $=[new Pe(b.goal.replace(new j(\"=\",[Z,F])),b.substitution,b)];F.value<z.value&&$.push(new Pe(b.goal.replace(new j(\"between\",[new Re(F.value+1,!1),z,Z])),b.substitution,b)),w.prepend($)}else F.value<=Z.value&&z.value>=Z.value&&w.success(b)},\"succ/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)&&x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_integer(F)?w.throw_error(x.error.type(\"integer\",F,y.indicator)):!x.type.is_variable(z)&&!x.type.is_integer(z)?w.throw_error(x.error.type(\"integer\",z,y.indicator)):!x.type.is_variable(F)&&F.value<0?w.throw_error(x.error.domain(\"not_less_than_zero\",F,y.indicator)):!x.type.is_variable(z)&&z.value<0?w.throw_error(x.error.domain(\"not_less_than_zero\",z,y.indicator)):(x.type.is_variable(z)||z.value>0)&&(x.type.is_variable(F)?w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,new Re(z.value-1,!1)])),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,new Re(F.value+1,!1)])),b.substitution,b)]))},\"=:=/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F===0&&w.success(b)},\"=\\\\=/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F!==0&&w.success(b)},\"</2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F<0&&w.success(b)},\"=</2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F<=0&&w.success(b)},\">/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>0&&w.success(b)},\">=/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>=0&&w.success(b)},\"var/1\":function(w,b,y){x.type.is_variable(y.args[0])&&w.success(b)},\"atom/1\":function(w,b,y){x.type.is_atom(y.args[0])&&w.success(b)},\"atomic/1\":function(w,b,y){x.type.is_atomic(y.args[0])&&w.success(b)},\"compound/1\":function(w,b,y){x.type.is_compound(y.args[0])&&w.success(b)},\"integer/1\":function(w,b,y){x.type.is_integer(y.args[0])&&w.success(b)},\"float/1\":function(w,b,y){x.type.is_float(y.args[0])&&w.success(b)},\"number/1\":function(w,b,y){x.type.is_number(y.args[0])&&w.success(b)},\"nonvar/1\":function(w,b,y){x.type.is_variable(y.args[0])||w.success(b)},\"ground/1\":function(w,b,y){y.variables().length===0&&w.success(b)},\"acyclic_term/1\":function(w,b,y){for(var F=b.substitution.apply(b.substitution),z=y.args[0].variables(),Z=0;Z<z.length;Z++)if(b.substitution.links[z[Z]]!==void 0&&!b.substitution.links[z[Z]].equals(F.links[z[Z]]))return;w.success(b)},\"callable/1\":function(w,b,y){x.type.is_callable(y.args[0])&&w.success(b)},\"is_list/1\":function(w,b,y){for(var F=y.args[0];x.type.is_term(F)&&F.indicator===\"./2\";)F=F.args[1];x.type.is_term(F)&&F.indicator===\"[]/0\"&&w.success(b)},\"current_input/1\":function(w,b,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream\",F,y.indicator)):(x.type.is_atom(F)&&w.get_stream_by_alias(F.id)&&(F=w.get_stream_by_alias(F.id)),w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,w.get_current_input()])),b.substitution,b)]))},\"current_output/1\":function(w,b,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):(x.type.is_atom(F)&&w.get_stream_by_alias(F.id)&&(F=w.get_stream_by_alias(F.id)),w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,w.get_current_output()])),b.substitution,b)]))},\"set_input/1\":function(w,b,y){var F=y.args[0],z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):x.type.is_stream(z)?z.output===!0?w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator)):(w.set_current_input(z),w.success(b)):w.throw_error(x.error.existence(\"stream\",F,y.indicator))},\"set_output/1\":function(w,b,y){var F=y.args[0],z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):x.type.is_stream(z)?z.input===!0?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):(w.set_current_output(z),w.success(b)):w.throw_error(x.error.existence(\"stream\",F,y.indicator))},\"open/3\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];w.prepend([new Pe(b.goal.replace(new j(\"open\",[F,z,Z,new j(\"[]\",[])])),b.substitution,b)])},\"open/4\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2],$=y.args[3];if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_atom(z))w.throw_error(x.error.type(\"atom\",z,y.indicator));else if(!x.type.is_list($))w.throw_error(x.error.type(\"list\",$,y.indicator));else if(!x.type.is_variable(Z))w.throw_error(x.error.type(\"variable\",Z,y.indicator));else if(!x.type.is_atom(F)&&!x.type.is_streamable(F))w.throw_error(x.error.domain(\"source_sink\",F,y.indicator));else if(!x.type.is_io_mode(z))w.throw_error(x.error.domain(\"io_mode\",z,y.indicator));else{for(var oe={},xe=$,Te;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_stream_option(Te)){w.throw_error(x.error.domain(\"stream_option\",Te,y.indicator));return}oe[Te.id]=Te.args[0].id,xe=xe.args[1]}if(xe.indicator!==\"[]/0\"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",$,y.indicator));return}else{var lt=oe.alias;if(lt&&w.get_stream_by_alias(lt)){w.throw_error(x.error.permission(\"open\",\"source_sink\",new j(\"alias\",[new j(lt,[])]),y.indicator));return}oe.type||(oe.type=\"text\");var Et;if(x.type.is_atom(F)?Et=w.file_system_open(F.id,oe.type,z.id):Et=F.stream(oe.type,z.id),Et===!1){w.throw_error(x.error.permission(\"open\",\"source_sink\",F,y.indicator));return}else if(Et===null){w.throw_error(x.error.existence(\"source_sink\",F,y.indicator));return}var qt=new Fe(Et,z.id,oe.alias,oe.type,oe.reposition===\"true\",oe.eof_action);lt?w.session.streams[lt]=qt:w.session.streams[qt.id]=qt,w.prepend([new Pe(b.goal.replace(new j(\"=\",[Z,qt])),b.substitution,b)])}}},\"close/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\"close\",[F,new j(\"[]\",[])])),b.substitution,b)])},\"close/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(z))w.throw_error(x.error.type(\"list\",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(Z)||Z.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else{for(var $={},oe=z,xe;x.type.is_term(oe)&&oe.indicator===\"./2\";){if(xe=oe.args[0],x.type.is_variable(xe)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_close_option(xe)){w.throw_error(x.error.domain(\"close_option\",xe,y.indicator));return}$[xe.id]=xe.args[0].id===\"true\",oe=oe.args[1]}if(oe.indicator!==\"[]/0\"){x.type.is_variable(oe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",z,y.indicator));return}else{if(Z===w.session.standard_input||Z===w.session.standard_output){w.success(b);return}else Z===w.session.current_input?w.session.current_input=w.session.standard_input:Z===w.session.current_output&&(w.session.current_output=w.session.current_output);Z.alias!==null?delete w.session.streams[Z.alias]:delete w.session.streams[Z.id],Z.output&&Z.stream.flush();var Te=Z.stream.close();Z.stream=null,($.force===!0||Te===!0)&&w.success(b)}}},\"flush_output/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"flush_output\",[new De(\"S\")])])),b.substitution,b)])},\"flush_output/1\":function(w,b,y){var F=y.args[0],z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(z)||z.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):F.input===!0?w.throw_error(x.error.permission(\"output\",\"stream\",output,y.indicator)):(z.stream.flush(),w.success(b))},\"stream_property/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_variable(F)&&(!x.type.is_stream(Z)||Z.stream===null))w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_stream_property(z))w.throw_error(x.error.domain(\"stream_property\",z,y.indicator));else{var $=[],oe=[];if(!x.type.is_variable(F))$.push(Z);else for(var xe in w.session.streams)$.push(w.session.streams[xe]);for(var Te=0;Te<$.length;Te++){var lt=[];$[Te].filename&&lt.push(new j(\"file_name\",[new j($[Te].file_name,[])])),lt.push(new j(\"mode\",[new j($[Te].mode,[])])),lt.push(new j($[Te].input?\"input\":\"output\",[])),$[Te].alias&&lt.push(new j(\"alias\",[new j($[Te].alias,[])])),lt.push(new j(\"position\",[typeof $[Te].position==\"number\"?new Re($[Te].position,!1):new j($[Te].position,[])])),lt.push(new j(\"end_of_stream\",[new j($[Te].position===\"end_of_stream\"?\"at\":$[Te].position===\"past_end_of_stream\"?\"past\":\"not\",[])])),lt.push(new j(\"eof_action\",[new j($[Te].eof_action,[])])),lt.push(new j(\"reposition\",[new j($[Te].reposition?\"true\":\"false\",[])])),lt.push(new j(\"type\",[new j($[Te].type,[])]));for(var Et=0;Et<lt.length;Et++)oe.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[x.type.is_variable(F)?F:Z,$[Te]]),new j(\"=\",[z,lt[Et]])])),b.substitution,b))}w.prepend(oe)}},\"at_end_of_stream/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\",\",[new j(\"stream_property\",[new De(\"S\"),new j(\"end_of_stream\",[new De(\"E\")])]),new j(\",\",[new j(\"!\",[]),new j(\";\",[new j(\"=\",[new De(\"E\"),new j(\"at\",[])]),new j(\"=\",[new De(\"E\"),new j(\"past\",[])])])])])])),b.substitution,b)])},\"at_end_of_stream/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"stream_property\",[F,new j(\"end_of_stream\",[new De(\"E\")])]),new j(\",\",[new j(\"!\",[]),new j(\";\",[new j(\"=\",[new De(\"E\"),new j(\"at\",[])]),new j(\"=\",[new De(\"E\"),new j(\"past\",[])])])])])),b.substitution,b)])},\"set_stream_position/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(Z)||Z.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):x.type.is_stream_position(z)?Z.reposition===!1?w.throw_error(x.error.permission(\"reposition\",\"stream\",F,y.indicator)):(x.type.is_integer(z)?Z.position=z.value:Z.position=z.id,w.success(b)):w.throw_error(x.error.domain(\"stream_position\",z,y.indicator))},\"get_char/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"get_char\",[new De(\"S\"),F])])),b.substitution,b)])},\"get_char/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))w.throw_error(x.error.type(\"in_character\",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(Z)||Z.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(Z.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(Z.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(Z.position===\"past_end_of_stream\"&&Z.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(Z.position===\"end_of_stream\")$=\"end_of_file\",Z.position=\"past_end_of_stream\";else{if($=Z.stream.get(1,Z.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}Z.position++}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j($,[]),z])),b.substitution,b)])}},\"get_code/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"get_code\",[new De(\"S\"),F])])),b.substitution,b)])},\"get_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(Z)||Z.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(Z.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(Z.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(Z.position===\"past_end_of_stream\"&&Z.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(Z.position===\"end_of_stream\")$=-1,Z.position=\"past_end_of_stream\";else{if($=Z.stream.get(1,Z.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}$=n($,0),Z.position++}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"peek_char/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"peek_char\",[new De(\"S\"),F])])),b.substitution,b)])},\"peek_char/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))w.throw_error(x.error.type(\"in_character\",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(Z)||Z.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(Z.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(Z.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(Z.position===\"past_end_of_stream\"&&Z.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(Z.position===\"end_of_stream\")$=\"end_of_file\",Z.position=\"past_end_of_stream\";else if($=Z.stream.get(1,Z.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j($,[]),z])),b.substitution,b)])}},\"peek_code/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"peek_code\",[new De(\"S\"),F])])),b.substitution,b)])},\"peek_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(Z)||Z.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(Z.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(Z.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(Z.position===\"past_end_of_stream\"&&Z.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(Z.position===\"end_of_stream\")$=-1,Z.position=\"past_end_of_stream\";else{if($=Z.stream.get(1,Z.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}$=n($,0)}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"put_char/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_char\",[new De(\"S\"),F])])),b.substitution,b)])},\"put_char/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_character(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(Z)||Z.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):Z.input?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):Z.type===\"binary\"?w.throw_error(x.error.permission(\"output\",\"binary_stream\",F,y.indicator)):Z.stream.put(z.id,Z.position)&&(typeof Z.position==\"number\"&&Z.position++,w.success(b)):w.throw_error(x.error.type(\"character\",z,y.indicator))},\"put_code/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_code\",[new De(\"S\"),F])])),b.substitution,b)])},\"put_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(z)?x.type.is_character_code(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(Z)||Z.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):Z.input?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):Z.type===\"binary\"?w.throw_error(x.error.permission(\"output\",\"binary_stream\",F,y.indicator)):Z.stream.put_char(c(z.value),Z.position)&&(typeof Z.position==\"number\"&&Z.position++,w.success(b)):w.throw_error(x.error.representation(\"character_code\",y.indicator)):w.throw_error(x.error.type(\"integer\",z,y.indicator))},\"nl/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_char\",[new De(\"S\"),new j(`\n`,[])])])),b.substitution,b)])},\"nl/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\"put_char\",[F,new j(`\n`,[])])),b.substitution,b)])},\"get_byte/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"get_byte\",[new De(\"S\"),F])])),b.substitution,b)])},\"get_byte/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))w.throw_error(x.error.type(\"in_byte\",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(Z)||Z.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(Z.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(Z.type===\"text\")w.throw_error(x.error.permission(\"input\",\"text_stream\",F,y.indicator));else if(Z.position===\"past_end_of_stream\"&&Z.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(Z.position===\"end_of_stream\")$=\"end_of_file\",Z.position=\"past_end_of_stream\";else{if($=Z.stream.get_byte(Z.position),$===null){w.throw_error(x.error.representation(\"byte\",y.indicator));return}Z.position++}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"peek_byte/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"peek_byte\",[new De(\"S\"),F])])),b.substitution,b)])},\"peek_byte/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))w.throw_error(x.error.type(\"in_byte\",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(Z)||Z.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(Z.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(Z.type===\"text\")w.throw_error(x.error.permission(\"input\",\"text_stream\",F,y.indicator));else if(Z.position===\"past_end_of_stream\"&&Z.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(Z.position===\"end_of_stream\")$=\"end_of_file\",Z.position=\"past_end_of_stream\";else if($=Z.stream.get_byte(Z.position),$===null){w.throw_error(x.error.representation(\"byte\",y.indicator));return}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"put_byte/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_byte\",[new De(\"S\"),F])])),b.substitution,b)])},\"put_byte/2\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_byte(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(Z)||Z.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):Z.input?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):Z.type===\"text\"?w.throw_error(x.error.permission(\"output\",\"text_stream\",F,y.indicator)):Z.stream.put_byte(z.value,Z.position)&&(typeof Z.position==\"number\"&&Z.position++,w.success(b)):w.throw_error(x.error.type(\"byte\",z,y.indicator))},\"read/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"read_term\",[new De(\"S\"),F,new j(\"[]\",[])])])),b.substitution,b)])},\"read/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"read_term\",[F,z,new j(\"[]\",[])])),b.substitution,b)])},\"read_term/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"read_term\",[new De(\"S\"),F,z])])),b.substitution,b)])},\"read_term/3\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2],$=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(Z))w.throw_error(x.error.type(\"list\",Z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if($.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if($.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if($.position===\"past_end_of_stream\"&&$.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{for(var oe={},xe=Z,Te;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_read_option(Te)){w.throw_error(x.error.domain(\"read_option\",Te,y.indicator));return}oe[Te.id]=Te.args[0],xe=xe.args[1]}if(xe.indicator!==\"[]/0\"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",Z,y.indicator));return}else{for(var lt,Et,qt,ir=\"\",Pt=[],gn=null;gn===null||gn.name!==\"atom\"||gn.value!==\".\"||qt.type===f&&x.flatten_error(new j(\"throw\",[qt.value])).found===\"token_not_found\";){if(lt=$.stream.get(1,$.position),lt===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}if(lt===\"end_of_file\"||lt===\"past_end_of_file\"){qt?w.throw_error(x.error.syntax(Pt[qt.len-1],\". or expression expected\",!1)):w.throw_error(x.error.syntax(null,\"token not found\",!0));return}$.position++,ir+=lt,Et=new U(w),Et.new_text(ir),Pt=Et.get_tokens(),gn=Pt!==null&&Pt.length>0?Pt[Pt.length-1]:null,Pt!==null&&(qt=W(w,Pt,0,w.__get_max_priority(),!1))}if(qt.type===p&&qt.len===Pt.length-1&&gn.value===\".\"){qt=qt.value.rename(w);var Pr=new j(\"=\",[z,qt]);if(oe.variables){var Ir=g(s(Ee(qt.variables()),function(Nr){return new De(Nr)}));Pr=new j(\",\",[Pr,new j(\"=\",[oe.variables,Ir])])}if(oe.variable_names){var Ir=g(s(Ee(qt.variables()),function(nn){var oi;for(oi in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(oi)&&w.session.renamed_variables[oi]===nn)break;return new j(\"=\",[new j(oi,[]),new De(nn)])}));Pr=new j(\",\",[Pr,new j(\"=\",[oe.variable_names,Ir])])}if(oe.singletons){var Ir=g(s(new Ye(qt,null).singleton_variables(),function(nn){var oi;for(oi in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(oi)&&w.session.renamed_variables[oi]===nn)break;return new j(\"=\",[new j(oi,[]),new De(nn)])}));Pr=new j(\",\",[Pr,new j(\"=\",[oe.singletons,Ir])])}w.prepend([new Pe(b.goal.replace(Pr),b.substitution,b)])}else qt.type===p?w.throw_error(x.error.syntax(Pt[qt.len],\"unexpected token\",!1)):w.throw_error(qt.value)}}},\"write/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"write\",[new De(\"S\"),F])])),b.substitution,b)])},\"write/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"write_term\",[F,z,new j(\".\",[new j(\"quoted\",[new j(\"false\",[])]),new j(\".\",[new j(\"ignore_ops\",[new j(\"false\")]),new j(\".\",[new j(\"numbervars\",[new j(\"true\")]),new j(\"[]\",[])])])])])),b.substitution,b)])},\"writeq/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"writeq\",[new De(\"S\"),F])])),b.substitution,b)])},\"writeq/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"write_term\",[F,z,new j(\".\",[new j(\"quoted\",[new j(\"true\",[])]),new j(\".\",[new j(\"ignore_ops\",[new j(\"false\")]),new j(\".\",[new j(\"numbervars\",[new j(\"true\")]),new j(\"[]\",[])])])])])),b.substitution,b)])},\"write_canonical/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"write_canonical\",[new De(\"S\"),F])])),b.substitution,b)])},\"write_canonical/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"write_term\",[F,z,new j(\".\",[new j(\"quoted\",[new j(\"true\",[])]),new j(\".\",[new j(\"ignore_ops\",[new j(\"true\")]),new j(\".\",[new j(\"numbervars\",[new j(\"false\")]),new j(\"[]\",[])])])])])),b.substitution,b)])},\"write_term/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"write_term\",[new De(\"S\"),F,z])])),b.substitution,b)])},\"write_term/3\":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2],$=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(Z))w.throw_error(x.error.type(\"list\",Z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if($.input)w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator));else if($.type===\"binary\")w.throw_error(x.error.permission(\"output\",\"binary_stream\",F,y.indicator));else if($.position===\"past_end_of_stream\"&&$.eof_action===\"error\")w.throw_error(x.error.permission(\"output\",\"past_end_of_stream\",F,y.indicator));else{for(var oe={},xe=Z,Te;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_write_option(Te)){w.throw_error(x.error.domain(\"write_option\",Te,y.indicator));return}oe[Te.id]=Te.args[0].id===\"true\",xe=xe.args[1]}if(xe.indicator!==\"[]/0\"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",Z,y.indicator));return}else{oe.session=w.session;var lt=z.toString(oe);$.stream.put(lt,$.position),typeof $.position==\"number\"&&($.position+=lt.length),w.success(b)}}},\"halt/0\":function(w,b,y){w.points=[]},\"halt/1\":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(F)?w.points=[]:w.throw_error(x.error.type(\"integer\",F,y.indicator))},\"current_prolog_flag/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_flag(F))w.throw_error(x.error.domain(\"prolog_flag\",F,y.indicator));else{var Z=[];for(var $ in x.flag)if(x.flag.hasOwnProperty($)){var oe=new j(\",\",[new j(\"=\",[new j($),F]),new j(\"=\",[w.get_flag($),z])]);Z.push(new Pe(b.goal.replace(oe),b.substitution,b))}w.prepend(Z)}},\"set_prolog_flag/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?x.type.is_flag(F)?x.type.is_value_flag(F,z)?x.type.is_modifiable_flag(F)?(w.session.flag[F.id]=z,w.success(b)):w.throw_error(x.error.permission(\"modify\",\"flag\",F)):w.throw_error(x.error.domain(\"flag_value\",new j(\"+\",[F,z]),y.indicator)):w.throw_error(x.error.domain(\"prolog_flag\",F,y.indicator)):w.throw_error(x.error.type(\"atom\",F,y.indicator))}},flag:{bounded:{allowed:[new j(\"true\"),new j(\"false\")],value:new j(\"true\"),changeable:!1},max_integer:{allowed:[new Re(Number.MAX_SAFE_INTEGER)],value:new Re(Number.MAX_SAFE_INTEGER),changeable:!1},min_integer:{allowed:[new Re(Number.MIN_SAFE_INTEGER)],value:new Re(Number.MIN_SAFE_INTEGER),changeable:!1},integer_rounding_function:{allowed:[new j(\"down\"),new j(\"toward_zero\")],value:new j(\"toward_zero\"),changeable:!1},char_conversion:{allowed:[new j(\"on\"),new j(\"off\")],value:new j(\"on\"),changeable:!0},debug:{allowed:[new j(\"on\"),new j(\"off\")],value:new j(\"off\"),changeable:!0},max_arity:{allowed:[new j(\"unbounded\")],value:new j(\"unbounded\"),changeable:!1},unknown:{allowed:[new j(\"error\"),new j(\"fail\"),new j(\"warning\")],value:new j(\"error\"),changeable:!0},double_quotes:{allowed:[new j(\"chars\"),new j(\"codes\"),new j(\"atom\")],value:new j(\"codes\"),changeable:!0},occurs_check:{allowed:[new j(\"false\"),new j(\"true\")],value:new j(\"false\"),changeable:!0},dialect:{allowed:[new j(\"tau\")],value:new j(\"tau\"),changeable:!1},version_data:{allowed:[new j(\"tau\",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)])],value:new j(\"tau\",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)]),changeable:!1},nodejs:{allowed:[new j(\"yes\"),new j(\"no\")],value:new j(typeof tc<\"u\"&&tc.exports?\"yes\":\"no\"),changeable:!1}},unify:function(w,b,y){y=y===void 0?!1:y;for(var F=[{left:w,right:b}],z={};F.length!==0;){var Z=F.pop();if(w=Z.left,b=Z.right,x.type.is_term(w)&&x.type.is_term(b)){if(w.indicator!==b.indicator)return null;for(var $=0;$<w.args.length;$++)F.push({left:w.args[$],right:b.args[$]})}else if(x.type.is_number(w)&&x.type.is_number(b)){if(w.value!==b.value||w.is_float!==b.is_float)return null}else if(x.type.is_variable(w)){if(x.type.is_variable(b)&&w.id===b.id)continue;if(y===!0&&b.variables().indexOf(w.id)!==-1)return null;if(w.id!==\"_\"){var oe=new Ne;oe.add(w.id,b);for(var $=0;$<F.length;$++)F[$].left=F[$].left.apply(oe),F[$].right=F[$].right.apply(oe);for(var $ in z)z[$]=z[$].apply(oe);z[w.id]=b}}else if(x.type.is_variable(b))F.push({left:b,right:w});else if(w.unify!==void 0){if(!w.unify(b))return null}else return null}return new Ne(z)},compare:function(w,b){var y=x.type.compare(w,b);return y!==0?y:w.compare(b)},arithmetic_compare:function(w,b,y){var F=b.interpret(w);if(x.type.is_number(F)){var z=y.interpret(w);return x.type.is_number(z)?F.value<z.value?-1:F.value>z.value?1:0:z}else return F},operate:function(w,b){if(x.type.is_operator(b)){for(var y=x.type.is_operator(b),F=[],z,Z=!1,$=0;$<b.args.length;$++){if(z=b.args[$].interpret(w),x.type.is_number(z)){if(y.type_args!==null&&z.is_float!==y.type_args)return x.error.type(y.type_args?\"float\":\"integer\",z,w.__call_indicator);F.push(z.value)}else return z;Z=Z||z.is_float}return F.push(w),z=x.arithmetic.evaluation[b.indicator].fn.apply(this,F),Z=y.type_result===null?Z:y.type_result,x.type.is_term(z)?z:z===Number.POSITIVE_INFINITY||z===Number.NEGATIVE_INFINITY?x.error.evaluation(\"overflow\",w.__call_indicator):Z===!1&&w.get_flag(\"bounded\").id===\"true\"&&(z>w.get_flag(\"max_integer\").value||z<w.get_flag(\"min_integer\").value)?x.error.evaluation(\"int_overflow\",w.__call_indicator):new Re(z,Z)}else return x.error.type(\"evaluable\",b.indicator,w.__call_indicator)},error:{existence:function(w,b,y){return typeof b==\"string\"&&(b=X(b)),new j(\"error\",[new j(\"existence_error\",[new j(w),b]),X(y)])},type:function(w,b,y){return new j(\"error\",[new j(\"type_error\",[new j(w),b]),X(y)])},instantiation:function(w){return new j(\"error\",[new j(\"instantiation_error\"),X(w)])},domain:function(w,b,y){return new j(\"error\",[new j(\"domain_error\",[new j(w),b]),X(y)])},representation:function(w,b){return new j(\"error\",[new j(\"representation_error\",[new j(w)]),X(b)])},permission:function(w,b,y,F){return new j(\"error\",[new j(\"permission_error\",[new j(w),new j(b),y]),X(F)])},evaluation:function(w,b){return new j(\"error\",[new j(\"evaluation_error\",[new j(w)]),X(b)])},syntax:function(w,b,y){w=w||{value:\"\",line:0,column:0,matches:[\"\"],start:0};var F=y&&w.matches.length>0?w.start+w.matches[0].length:w.start,z=y?new j(\"token_not_found\"):new j(\"found\",[new j(w.value.toString())]),Z=new j(\".\",[new j(\"line\",[new Re(w.line+1)]),new j(\".\",[new j(\"column\",[new Re(F+1)]),new j(\".\",[z,new j(\"[]\",[])])])]);return new j(\"error\",[new j(\"syntax_error\",[new j(b)]),Z])},syntax_by_predicate:function(w,b){return new j(\"error\",[new j(\"syntax_error\",[new j(w)]),X(b)])}},warning:{singleton:function(w,b,y){for(var F=new j(\"[]\"),z=w.length-1;z>=0;z--)F=new j(\".\",[new De(w[z]),F]);return new j(\"warning\",[new j(\"singleton_variables\",[F,X(b)]),new j(\".\",[new j(\"line\",[new Re(y,!1)]),new j(\"[]\")])])},failed_goal:function(w,b){return new j(\"warning\",[new j(\"failed_goal\",[w]),new j(\".\",[new j(\"line\",[new Re(b,!1)]),new j(\"[]\")])])}},format_variable:function(w){return\"_\"+w},format_answer:function(w,b,F){b instanceof ke&&(b=b.thread);var F=F||{};if(F.session=b?b.session:void 0,x.type.is_error(w))return\"uncaught exception: \"+w.args[0].toString();if(w===!1)return\"false.\";if(w===null)return\"limit exceeded ;\";var z=0,Z=\"\";if(x.type.is_substitution(w)){var $=w.domain(!0);w=w.filter(function(Te,lt){return!x.type.is_variable(lt)||$.indexOf(lt.id)!==-1&&Te!==lt.id})}for(var oe in w.links)w.links.hasOwnProperty(oe)&&(z++,Z!==\"\"&&(Z+=\", \"),Z+=oe.toString(F)+\" = \"+w.links[oe].toString(F));var xe=typeof b>\"u\"||b.points.length>0?\" ;\":\".\";return z===0?\"true\"+xe:Z+xe},flatten_error:function(w){if(!x.type.is_error(w))return null;w=w.args[0];var b={};return b.type=w.args[0].id,b.thrown=b.type===\"syntax_error\"?null:w.args[1].id,b.expected=null,b.found=null,b.representation=null,b.existence=null,b.existence_type=null,b.line=null,b.column=null,b.permission_operation=null,b.permission_type=null,b.evaluation_type=null,b.type===\"type_error\"||b.type===\"domain_error\"?(b.expected=w.args[0].args[0].id,b.found=w.args[0].args[1].toString()):b.type===\"syntax_error\"?w.args[1].indicator===\"./2\"?(b.expected=w.args[0].args[0].id,b.found=w.args[1].args[1].args[1].args[0],b.found=b.found.id===\"token_not_found\"?b.found.id:b.found.args[0].id,b.line=w.args[1].args[0].args[0].value,b.column=w.args[1].args[1].args[0].args[0].value):b.thrown=w.args[1].id:b.type===\"permission_error\"?(b.found=w.args[0].args[2].toString(),b.permission_operation=w.args[0].args[0].id,b.permission_type=w.args[0].args[1].id):b.type===\"evaluation_error\"?b.evaluation_type=w.args[0].args[0].id:b.type===\"representation_error\"?b.representation=w.args[0].args[0].id:b.type===\"existence_error\"&&(b.existence=w.args[0].args[1].toString(),b.existence_type=w.args[0].args[0].id),b},create:function(w){return new x.type.Session(w)}};typeof tc<\"u\"?tc.exports=x:window.pl=x})()});function hve(t,e,r){t.prepend(r.map(s=>new gl.default.type.State(e.goal.replace(s),e.substitution,e)))}function y9(t){let e=dve.get(t.session);if(e==null)throw new Error(\"Assertion failed: A project should have been registered for the active session\");return e}function mve(t,e){dve.set(t,e),t.consult(`:- use_module(library(${gDt.id})).`)}var E9,gl,gve,J0,pDt,hDt,dve,gDt,yve=It(()=>{Ve();E9=et(AS()),gl=et(m9()),gve=et(ye(\"vm\")),{is_atom:J0,is_variable:pDt,is_instantiated_list:hDt}=gl.default.type;dve=new WeakMap;gDt=new gl.default.type.Module(\"constraints\",{\"project_workspaces_by_descriptor/3\":(t,e,r)=>{let[s,a,n]=r.args;if(!J0(s)||!J0(a)){t.throw_error(gl.default.error.instantiation(r.indicator));return}let c=q.parseIdent(s.id),f=q.makeDescriptor(c,a.id),h=y9(t).tryWorkspaceByDescriptor(f);pDt(n)&&h!==null&&hve(t,e,[new gl.default.type.Term(\"=\",[n,new gl.default.type.Term(String(h.relativeCwd))])]),J0(n)&&h!==null&&h.relativeCwd===n.id&&t.success(e)},\"workspace_field/3\":(t,e,r)=>{let[s,a,n]=r.args;if(!J0(s)||!J0(a)){t.throw_error(gl.default.error.instantiation(r.indicator));return}let f=y9(t).tryWorkspaceByCwd(s.id);if(f==null)return;let p=(0,E9.default)(f.manifest.raw,a.id);typeof p>\"u\"||hve(t,e,[new gl.default.type.Term(\"=\",[n,new gl.default.type.Term(typeof p==\"object\"?JSON.stringify(p):p)])])},\"workspace_field_test/3\":(t,e,r)=>{let[s,a,n]=r.args;t.prepend([new gl.default.type.State(e.goal.replace(new gl.default.type.Term(\"workspace_field_test\",[s,a,n,new gl.default.type.Term(\"[]\",[])])),e.substitution,e)])},\"workspace_field_test/4\":(t,e,r)=>{let[s,a,n,c]=r.args;if(!J0(s)||!J0(a)||!J0(n)||!hDt(c)){t.throw_error(gl.default.error.instantiation(r.indicator));return}let p=y9(t).tryWorkspaceByCwd(s.id);if(p==null)return;let h=(0,E9.default)(p.manifest.raw,a.id);if(typeof h>\"u\")return;let E={$$:h};for(let[S,P]of c.toJavaScript().entries())E[`$${S}`]=P;gve.default.runInNewContext(n.id,E)&&t.success(e)}},[\"project_workspaces_by_descriptor/3\",\"workspace_field/3\",\"workspace_field_test/3\",\"workspace_field_test/4\"])});var BS={};Vt(BS,{Constraints:()=>C9,DependencyType:()=>wve});function yo(t){if(t instanceof ZC.default.type.Num)return t.value;if(t instanceof ZC.default.type.Term)switch(t.indicator){case\"throw/1\":return yo(t.args[0]);case\"error/1\":return yo(t.args[0]);case\"error/2\":if(t.args[0]instanceof ZC.default.type.Term&&t.args[0].indicator===\"syntax_error/1\")return Object.assign(yo(t.args[0]),...yo(t.args[1]));{let e=yo(t.args[0]);return e.message+=` (in ${yo(t.args[1])})`,e}case\"syntax_error/1\":return new Yt(43,`Syntax error: ${yo(t.args[0])}`);case\"existence_error/2\":return new Yt(44,`Existence error: ${yo(t.args[0])} ${yo(t.args[1])} not found`);case\"instantiation_error/0\":return new Yt(75,\"Instantiation error: an argument is variable when an instantiated argument was expected\");case\"line/1\":return{line:yo(t.args[0])};case\"column/1\":return{column:yo(t.args[0])};case\"found/1\":return{found:yo(t.args[0])};case\"./2\":return[yo(t.args[0])].concat(yo(t.args[1]));case\"//2\":return`${yo(t.args[0])}/${yo(t.args[1])}`;default:return t.id}throw`couldn't pretty print because of unsupported node ${t}`}function Ive(t){let e;try{e=yo(t)}catch(r){throw typeof r==\"string\"?new Yt(42,`Unknown error: ${t} (note: ${r})`):r}return typeof e.line<\"u\"&&typeof e.column<\"u\"&&(e.message+=` at line ${e.line}, column ${e.column}`),e}function xm(t){return t.id===\"null\"?null:`${t.toJavaScript()}`}function dDt(t){if(t.id===\"null\")return null;{let e=t.toJavaScript();if(typeof e!=\"string\")return JSON.stringify(e);try{return JSON.stringify(JSON.parse(e))}catch{return JSON.stringify(e)}}}function z0(t){return typeof t==\"string\"?`'${t}'`:\"[]\"}var Cve,ZC,wve,Eve,I9,C9,vS=It(()=>{Ve();Ve();bt();Cve=et(XBe()),ZC=et(m9());IS();yve();(0,Cve.default)(ZC.default);wve=(s=>(s.Dependencies=\"dependencies\",s.DevDependencies=\"devDependencies\",s.PeerDependencies=\"peerDependencies\",s))(wve||{}),Eve=[\"dependencies\",\"devDependencies\",\"peerDependencies\"];I9=class{constructor(e,r){let s=1e3*e.workspaces.length;this.session=ZC.default.create(s),mve(this.session,e),this.session.consult(\":- use_module(library(lists)).\"),this.session.consult(r)}fetchNextAnswer(){return new Promise(e=>{this.session.answer(r=>{e(r)})})}async*makeQuery(e){let r=this.session.query(e);if(r!==!0)throw Ive(r);for(;;){let s=await this.fetchNextAnswer();if(s===null)throw new Yt(79,\"Resolution limit exceeded\");if(!s)break;if(s.id===\"throw\")throw Ive(s);yield s}}};C9=class t{constructor(e){this.source=\"\";this.project=e;let r=e.configuration.get(\"constraintsPath\");le.existsSync(r)&&(this.source=le.readFileSync(r,\"utf8\"))}static async find(e){return new t(e)}getProjectDatabase(){let e=\"\";for(let r of Eve)e+=`dependency_type(${r}).\n`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;e+=`workspace(${z0(s)}).\n`,e+=`workspace_ident(${z0(s)}, ${z0(q.stringifyIdent(r.anchoredLocator))}).\n`,e+=`workspace_version(${z0(s)}, ${z0(r.manifest.version)}).\n`;for(let a of Eve)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${z0(s)}, ${z0(q.stringifyIdent(n))}, ${z0(n.range)}, ${a}).\n`}return e+=`workspace(_) :- false.\n`,e+=`workspace_ident(_, _) :- false.\n`,e+=`workspace_version(_, _) :- false.\n`,e+=`workspace_has_dependency(_, _, _, _) :- false.\n`,e}getDeclarations(){let e=\"\";return e+=`gen_enforced_dependency(_, _, _, _) :- false.\n`,e+=`gen_enforced_field(_, _, _) :- false.\n`,e}get fullSource(){return`${this.getProjectDatabase()}\n${this.source}\n${this.getDeclarations()}`}createSession(){return new I9(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),s=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:c,dependencyType:f}of e){let p=ES([f,q.stringifyIdent(n)]),h=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(h,p).set(c??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:c}of r){let f=ES(n),p=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(p,f).set(JSON.parse(c)??void 0,new Set)}return{manifestUpdates:s,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let s of e.makeQuery(\"workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).\")){let a=K.resolve(this.project.cwd,xm(s.links.WorkspaceCwd)),n=xm(s.links.DependencyIdent),c=xm(s.links.DependencyRange),f=xm(s.links.DependencyType);if(a===null||n===null)throw new Error(\"Invalid rule\");let p=this.project.getWorkspaceByCwd(a),h=q.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:c,dependencyType:f})}return je.sortMap(r,[({dependencyRange:s})=>s!==null?\"0\":\"1\",({workspace:s})=>q.stringifyIdent(s.anchoredLocator),({dependencyIdent:s})=>q.stringifyIdent(s)])}async genEnforcedFields(e){let r=[];for await(let s of e.makeQuery(\"workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).\")){let a=K.resolve(this.project.cwd,xm(s.links.WorkspaceCwd)),n=xm(s.links.FieldPath),c=dDt(s.links.FieldValue);if(a===null||n===null)throw new Error(\"Invalid rule\");let f=this.project.getWorkspaceByCwd(a);r.push({workspace:f,fieldPath:n,fieldValue:c})}return je.sortMap(r,[({workspace:s})=>q.stringifyIdent(s.anchoredLocator),({fieldPath:s})=>s])}async*query(e){let r=this.createSession();for await(let s of r.makeQuery(e)){let a={};for(let[n,c]of Object.entries(s.links))n!==\"_\"&&(a[n]=xm(c));yield a}}}});var Qve=L(gF=>{\"use strict\";Object.defineProperty(gF,\"__esModule\",{value:!0});function US(t){let e=[...t.caches],r=e.shift();return r===void 0?kve():{get(s,a,n={miss:()=>Promise.resolve()}){return r.get(s,a,n).catch(()=>US({caches:e}).get(s,a,n))},set(s,a){return r.set(s,a).catch(()=>US({caches:e}).set(s,a))},delete(s){return r.delete(s).catch(()=>US({caches:e}).delete(s))},clear(){return r.clear().catch(()=>US({caches:e}).clear())}}}function kve(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}gF.createFallbackableCache=US;gF.createNullCache=kve});var Rve=L((ihr,Tve)=>{Tve.exports=Qve()});var Fve=L(N9=>{\"use strict\";Object.defineProperty(N9,\"__esModule\",{value:!0});function NDt(t={serializable:!0}){let e={};return{get(r,s,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let c=s(),f=a&&a.miss||(()=>Promise.resolve());return c.then(p=>f(p)).then(()=>c)},set(r,s){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}N9.createInMemoryCache=NDt});var Ove=L((ohr,Nve)=>{Nve.exports=Fve()});var Mve=L(ef=>{\"use strict\";Object.defineProperty(ef,\"__esModule\",{value:!0});function ODt(t,e,r){let s={\"x-algolia-api-key\":r,\"x-algolia-application-id\":e};return{headers(){return t===O9.WithinHeaders?s:{}},queryParameters(){return t===O9.WithinQueryParameters?s:{}}}}function LDt(t){let e=0,r=()=>(e++,new Promise(s=>{setTimeout(()=>{s(t(r))},Math.min(100*e,1e3))}));return t(r)}function Lve(t,e=(r,s)=>Promise.resolve()){return Object.assign(t,{wait(r){return Lve(t.then(s=>Promise.all([e(s,r),s])).then(s=>s[1]))}})}function MDt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[r],t[r]=s}return t}function _Dt(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function UDt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var HDt=\"4.22.1\",jDt=t=>()=>t.transporter.requester.destroy(),O9={WithinQueryParameters:0,WithinHeaders:1};ef.AuthMode=O9;ef.addMethods=_Dt;ef.createAuth=ODt;ef.createRetryablePromise=LDt;ef.createWaitablePromise=Lve;ef.destroy=jDt;ef.encode=UDt;ef.shuffle=MDt;ef.version=HDt});var HS=L((lhr,_ve)=>{_ve.exports=Mve()});var Uve=L(L9=>{\"use strict\";Object.defineProperty(L9,\"__esModule\",{value:!0});var qDt={Delete:\"DELETE\",Get:\"GET\",Post:\"POST\",Put:\"PUT\"};L9.MethodEnum=qDt});var jS=L((uhr,Hve)=>{Hve.exports=Uve()});var rSe=L(Yi=>{\"use strict\";Object.defineProperty(Yi,\"__esModule\",{value:!0});var qve=jS();function M9(t,e){let r=t||{},s=r.data||{};return Object.keys(r).forEach(a=>{[\"timeout\",\"headers\",\"queryParameters\",\"data\",\"cacheable\"].indexOf(a)===-1&&(s[a]=r[a])}),{data:Object.entries(s).length>0?s:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var qS={Read:1,Write:2,Any:3},aw={Up:1,Down:2,Timeouted:3},Gve=2*60*1e3;function U9(t,e=aw.Up){return{...t,status:e,lastUpdate:Date.now()}}function Wve(t){return t.status===aw.Up||Date.now()-t.lastUpdate>Gve}function Yve(t){return t.status===aw.Timeouted&&Date.now()-t.lastUpdate<=Gve}function H9(t){return typeof t==\"string\"?{protocol:\"https\",url:t,accept:qS.Any}:{protocol:t.protocol||\"https\",url:t.url,accept:t.accept||qS.Any}}function GDt(t,e){return Promise.all(e.map(r=>t.get(r,()=>Promise.resolve(U9(r))))).then(r=>{let s=r.filter(f=>Wve(f)),a=r.filter(f=>Yve(f)),n=[...s,...a],c=n.length>0?n.map(f=>H9(f)):e;return{getTimeout(f,p){return(a.length===0&&f===0?1:a.length+3+f)*p},statelessHosts:c}})}var WDt=({isTimedOut:t,status:e})=>!t&&~~e===0,YDt=t=>{let e=t.status;return t.isTimedOut||WDt(t)||~~(e/100)!==2&&~~(e/100)!==4},VDt=({status:t})=>~~(t/100)===2,KDt=(t,e)=>YDt(t)?e.onRetry(t):VDt(t)?e.onSuccess(t):e.onFail(t);function jve(t,e,r,s){let a=[],n=Zve(r,s),c=Xve(t,s),f=r.method,p=r.method!==qve.MethodEnum.Get?{}:{...r.data,...s.data},h={\"x-algolia-agent\":t.userAgent.value,...t.queryParameters,...p,...s.queryParameters},E=0,C=(S,P)=>{let I=S.pop();if(I===void 0)throw tSe(_9(a));let R={data:n,headers:c,method:f,url:Jve(I,r.path,h),connectTimeout:P(E,t.timeouts.connect),responseTimeout:P(E,s.timeout)},N=W=>{let te={request:R,response:W,host:I,triesLeft:S.length};return a.push(te),te},U={onSuccess:W=>Vve(W),onRetry(W){let te=N(W);return W.isTimedOut&&E++,Promise.all([t.logger.info(\"Retryable failure\",j9(te)),t.hostsCache.set(I,U9(I,W.isTimedOut?aw.Timeouted:aw.Down))]).then(()=>C(S,P))},onFail(W){throw N(W),Kve(W,_9(a))}};return t.requester.send(R).then(W=>KDt(W,U))};return GDt(t.hostsCache,e).then(S=>C([...S.statelessHosts].reverse(),S.getTimeout))}function JDt(t){let{hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,hosts:p,queryParameters:h,headers:E}=t,C={hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,headers:E,queryParameters:h,hosts:p.map(S=>H9(S)),read(S,P){let I=M9(P,C.timeouts.read),R=()=>jve(C,C.hosts.filter(W=>(W.accept&qS.Read)!==0),S,I);if((I.cacheable!==void 0?I.cacheable:S.cacheable)!==!0)return R();let U={request:S,mappedRequestOptions:I,transporter:{queryParameters:C.queryParameters,headers:C.headers}};return C.responsesCache.get(U,()=>C.requestsCache.get(U,()=>C.requestsCache.set(U,R()).then(W=>Promise.all([C.requestsCache.delete(U),W]),W=>Promise.all([C.requestsCache.delete(U),Promise.reject(W)])).then(([W,te])=>te)),{miss:W=>C.responsesCache.set(U,W)})},write(S,P){return jve(C,C.hosts.filter(I=>(I.accept&qS.Write)!==0),S,M9(P,C.timeouts.write))}};return C}function zDt(t){let e={value:`Algolia for JavaScript (${t})`,add(r){let s=`; ${r.segment}${r.version!==void 0?` (${r.version})`:\"\"}`;return e.value.indexOf(s)===-1&&(e.value=`${e.value}${s}`),e}};return e}function Vve(t){try{return JSON.parse(t.content)}catch(e){throw eSe(e.message,t)}}function Kve({content:t,status:e},r){let s=t;try{s=JSON.parse(t).message}catch{}return $ve(s,e,r)}function ZDt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}function Jve(t,e,r){let s=zve(r),a=`${t.protocol}://${t.url}/${e.charAt(0)===\"/\"?e.substr(1):e}`;return s.length&&(a+=`?${s}`),a}function zve(t){let e=r=>Object.prototype.toString.call(r)===\"[object Object]\"||Object.prototype.toString.call(r)===\"[object Array]\";return Object.keys(t).map(r=>ZDt(\"%s=%s\",r,e(t[r])?JSON.stringify(t[r]):t[r])).join(\"&\")}function Zve(t,e){if(t.method===qve.MethodEnum.Get||t.data===void 0&&e.data===void 0)return;let r=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(r)}function Xve(t,e){let r={...t.headers,...e.headers},s={};return Object.keys(r).forEach(a=>{let n=r[a];s[a.toLowerCase()]=n}),s}function _9(t){return t.map(e=>j9(e))}function j9(t){let e=t.request.headers[\"x-algolia-api-key\"]?{\"x-algolia-api-key\":\"*****\"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function $ve(t,e,r){return{name:\"ApiError\",message:t,status:e,transporterStackTrace:r}}function eSe(t,e){return{name:\"DeserializationError\",message:t,response:e}}function tSe(t){return{name:\"RetryError\",message:\"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.\",transporterStackTrace:t}}Yi.CallEnum=qS;Yi.HostStatusEnum=aw;Yi.createApiError=$ve;Yi.createDeserializationError=eSe;Yi.createMappedRequestOptions=M9;Yi.createRetryError=tSe;Yi.createStatefulHost=U9;Yi.createStatelessHost=H9;Yi.createTransporter=JDt;Yi.createUserAgent=zDt;Yi.deserializeFailure=Kve;Yi.deserializeSuccess=Vve;Yi.isStatefulHostTimeouted=Yve;Yi.isStatefulHostUp=Wve;Yi.serializeData=Zve;Yi.serializeHeaders=Xve;Yi.serializeQueryParameters=zve;Yi.serializeUrl=Jve;Yi.stackFrameWithoutCredentials=j9;Yi.stackTraceWithoutCredentials=_9});var GS=L((Ahr,nSe)=>{nSe.exports=rSe()});var iSe=L(X0=>{\"use strict\";Object.defineProperty(X0,\"__esModule\",{value:!0});var lw=HS(),XDt=GS(),WS=jS(),$Dt=t=>{let e=t.region||\"us\",r=lw.createAuth(lw.AuthMode.WithinHeaders,t.appId,t.apiKey),s=XDt.createTransporter({hosts:[{url:`analytics.${e}.algolia.com`}],...t,headers:{...r.headers(),\"content-type\":\"application/json\",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a=t.appId;return lw.addMethods({appId:a,transporter:s},t.methods)},ebt=t=>(e,r)=>t.transporter.write({method:WS.MethodEnum.Post,path:\"2/abtests\",data:e},r),tbt=t=>(e,r)=>t.transporter.write({method:WS.MethodEnum.Delete,path:lw.encode(\"2/abtests/%s\",e)},r),rbt=t=>(e,r)=>t.transporter.read({method:WS.MethodEnum.Get,path:lw.encode(\"2/abtests/%s\",e)},r),nbt=t=>e=>t.transporter.read({method:WS.MethodEnum.Get,path:\"2/abtests\"},e),ibt=t=>(e,r)=>t.transporter.write({method:WS.MethodEnum.Post,path:lw.encode(\"2/abtests/%s/stop\",e)},r);X0.addABTest=ebt;X0.createAnalyticsClient=$Dt;X0.deleteABTest=tbt;X0.getABTest=rbt;X0.getABTests=nbt;X0.stopABTest=ibt});var oSe=L((hhr,sSe)=>{sSe.exports=iSe()});var lSe=L(YS=>{\"use strict\";Object.defineProperty(YS,\"__esModule\",{value:!0});var q9=HS(),sbt=GS(),aSe=jS(),obt=t=>{let e=t.region||\"us\",r=q9.createAuth(q9.AuthMode.WithinHeaders,t.appId,t.apiKey),s=sbt.createTransporter({hosts:[{url:`personalization.${e}.algolia.com`}],...t,headers:{...r.headers(),\"content-type\":\"application/json\",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}});return q9.addMethods({appId:t.appId,transporter:s},t.methods)},abt=t=>e=>t.transporter.read({method:aSe.MethodEnum.Get,path:\"1/strategies/personalization\"},e),lbt=t=>(e,r)=>t.transporter.write({method:aSe.MethodEnum.Post,path:\"1/strategies/personalization\",data:e},r);YS.createPersonalizationClient=obt;YS.getPersonalizationStrategy=abt;YS.setPersonalizationStrategy=lbt});var uSe=L((dhr,cSe)=>{cSe.exports=lSe()});var vSe=L(Ft=>{\"use strict\";Object.defineProperty(Ft,\"__esModule\",{value:!0});var Kt=HS(),dl=GS(),br=jS(),cbt=ye(\"crypto\");function dF(t){let e=r=>t.request(r).then(s=>{if(t.batch!==void 0&&t.batch(s.hits),!t.shouldStop(s))return s.cursor?e({cursor:s.cursor}):e({page:(r.page||0)+1})});return e({})}var ubt=t=>{let e=t.appId,r=Kt.createAuth(t.authMode!==void 0?t.authMode:Kt.AuthMode.WithinHeaders,e,t.apiKey),s=dl.createTransporter({hosts:[{url:`${e}-dsn.algolia.net`,accept:dl.CallEnum.Read},{url:`${e}.algolia.net`,accept:dl.CallEnum.Write}].concat(Kt.shuffle([{url:`${e}-1.algolianet.com`},{url:`${e}-2.algolianet.com`},{url:`${e}-3.algolianet.com`}])),...t,headers:{...r.headers(),\"content-type\":\"application/x-www-form-urlencoded\",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a={transporter:s,appId:e,addAlgoliaAgent(n,c){s.userAgent.add({segment:n,version:c})},clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})}};return Kt.addMethods(a,t.methods)};function fSe(){return{name:\"MissingObjectIDError\",message:\"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option.\"}}function ASe(){return{name:\"ObjectNotFoundError\",message:\"Object not found.\"}}function pSe(){return{name:\"ValidUntilNotFoundError\",message:\"ValidUntil not found in given secured api key.\"}}var fbt=t=>(e,r)=>{let{queryParameters:s,...a}=r||{},n={acl:e,...s!==void 0?{queryParameters:s}:{}},c=(f,p)=>Kt.createRetryablePromise(h=>VS(t)(f.key,p).catch(E=>{if(E.status!==404)throw E;return h()}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:\"1/keys\",data:n},a),c)},Abt=t=>(e,r,s)=>{let a=dl.createMappedRequestOptions(s);return a.queryParameters[\"X-Algolia-User-ID\"]=e,t.transporter.write({method:br.MethodEnum.Post,path:\"1/clusters/mapping\",data:{cluster:r}},a)},pbt=t=>(e,r,s)=>t.transporter.write({method:br.MethodEnum.Post,path:\"1/clusters/mapping/batch\",data:{users:e,cluster:r}},s),hbt=t=>(e,r)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!0,requests:{action:\"addEntry\",body:[]}}},r),(s,a)=>cw(t)(s.taskID,a)),mF=t=>(e,r,s)=>{let a=(n,c)=>KS(t)(e,{methods:{waitTask:gs}}).waitTask(n.taskID,c);return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/operation\",e),data:{operation:\"copy\",destination:r}},s),a)},gbt=t=>(e,r,s)=>mF(t)(e,r,{...s,scope:[EF.Rules]}),dbt=t=>(e,r,s)=>mF(t)(e,r,{...s,scope:[EF.Settings]}),mbt=t=>(e,r,s)=>mF(t)(e,r,{...s,scope:[EF.Synonyms]}),ybt=t=>(e,r)=>e.method===br.MethodEnum.Get?t.transporter.read(e,r):t.transporter.write(e,r),Ebt=t=>(e,r)=>{let s=(a,n)=>Kt.createRetryablePromise(c=>VS(t)(e,n).then(c).catch(f=>{if(f.status!==404)throw f}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode(\"1/keys/%s\",e)},r),s)},Ibt=t=>(e,r,s)=>{let a=r.map(n=>({action:\"deleteEntry\",body:{objectID:n}}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>cw(t)(n.taskID,c))},Cbt=()=>(t,e)=>{let r=dl.serializeQueryParameters(e),s=cbt.createHmac(\"sha256\",t).update(r).digest(\"hex\");return Buffer.from(s+r).toString(\"base64\")},VS=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode(\"1/keys/%s\",e)},r),hSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode(\"1/task/%s\",e.toString())},r),wbt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"/1/dictionaries/*/settings\"},e),Bbt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/logs\"},e),vbt=()=>t=>{let e=Buffer.from(t,\"base64\").toString(\"ascii\"),r=/validUntil=(\\d+)/,s=e.match(r);if(s===null)throw pSe();return parseInt(s[1],10)-Math.round(new Date().getTime()/1e3)},Sbt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters/mapping/top\"},e),Dbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode(\"1/clusters/mapping/%s\",e)},r),bbt=t=>e=>{let{retrieveMappings:r,...s}=e||{};return r===!0&&(s.getClusters=!0),t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters/mapping/pending\"},s)},KS=t=>(e,r={})=>{let s={transporter:t.transporter,appId:t.appId,indexName:e};return Kt.addMethods(s,r.methods)},Pbt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/keys\"},e),xbt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters\"},e),kbt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/indexes\"},e),Qbt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters/mapping\"},e),Tbt=t=>(e,r,s)=>{let a=(n,c)=>KS(t)(e,{methods:{waitTask:gs}}).waitTask(n.taskID,c);return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/operation\",e),data:{operation:\"move\",destination:r}},s),a)},Rbt=t=>(e,r)=>{let s=(a,n)=>Promise.all(Object.keys(a.taskID).map(c=>KS(t)(c,{methods:{waitTask:gs}}).waitTask(a.taskID[c],n)));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:\"1/indexes/*/batch\",data:{requests:e}},r),s)},Fbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:\"1/indexes/*/objects\",data:{requests:e}},r),Nbt=t=>(e,r)=>{let s=e.map(a=>({...a,params:dl.serializeQueryParameters(a.params||{})}));return t.transporter.read({method:br.MethodEnum.Post,path:\"1/indexes/*/queries\",data:{requests:s},cacheable:!0},r)},Obt=t=>(e,r)=>Promise.all(e.map(s=>{let{facetName:a,facetQuery:n,...c}=s.params;return KS(t)(s.indexName,{methods:{searchForFacetValues:CSe}}).searchForFacetValues(a,n,{...r,...c})})),Lbt=t=>(e,r)=>{let s=dl.createMappedRequestOptions(r);return s.queryParameters[\"X-Algolia-User-ID\"]=e,t.transporter.write({method:br.MethodEnum.Delete,path:\"1/clusters/mapping\"},s)},Mbt=t=>(e,r,s)=>{let a=r.map(n=>({action:\"addEntry\",body:n}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!0,requests:a}},s),(n,c)=>cw(t)(n.taskID,c))},_bt=t=>(e,r)=>{let s=(a,n)=>Kt.createRetryablePromise(c=>VS(t)(e,n).catch(f=>{if(f.status!==404)throw f;return c()}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/keys/%s/restore\",e)},r),s)},Ubt=t=>(e,r,s)=>{let a=r.map(n=>({action:\"addEntry\",body:n}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>cw(t)(n.taskID,c))},Hbt=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode(\"/1/dictionaries/%s/search\",e),data:{query:r},cacheable:!0},s),jbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:\"1/clusters/mapping/search\",data:{query:e}},r),qbt=t=>(e,r)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:\"/1/dictionaries/*/settings\",data:e},r),(s,a)=>cw(t)(s.taskID,a)),Gbt=t=>(e,r)=>{let s=Object.assign({},r),{queryParameters:a,...n}=r||{},c=a?{queryParameters:a}:{},f=[\"acl\",\"indexes\",\"referers\",\"restrictSources\",\"queryParameters\",\"description\",\"maxQueriesPerIPPerHour\",\"maxHitsPerQuery\"],p=E=>Object.keys(s).filter(C=>f.indexOf(C)!==-1).every(C=>{if(Array.isArray(E[C])&&Array.isArray(s[C])){let S=E[C];return S.length===s[C].length&&S.every((P,I)=>P===s[C][I])}else return E[C]===s[C]}),h=(E,C)=>Kt.createRetryablePromise(S=>VS(t)(e,C).then(P=>p(P)?Promise.resolve():S()));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Kt.encode(\"1/keys/%s\",e),data:c},n),h)},cw=t=>(e,r)=>Kt.createRetryablePromise(s=>hSe(t)(e,r).then(a=>a.status!==\"published\"?s():void 0)),gSe=t=>(e,r)=>{let s=(a,n)=>gs(t)(a.taskID,n);return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/batch\",t.indexName),data:{requests:e}},r),s)},Wbt=t=>e=>dF({shouldStop:r=>r.cursor===void 0,...e,request:r=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/browse\",t.indexName),data:r},e)}),Ybt=t=>e=>{let r={hitsPerPage:1e3,...e};return dF({shouldStop:s=>s.hits.length<r.hitsPerPage,...r,request(s){return wSe(t)(\"\",{...r,...s}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},Vbt=t=>e=>{let r={hitsPerPage:1e3,...e};return dF({shouldStop:s=>s.hits.length<r.hitsPerPage,...r,request(s){return BSe(t)(\"\",{...r,...s}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},yF=t=>(e,r,s)=>{let{batchSize:a,...n}=s||{},c={taskIDs:[],objectIDs:[]},f=(p=0)=>{let h=[],E;for(E=p;E<e.length&&(h.push(e[E]),h.length!==(a||1e3));E++);return h.length===0?Promise.resolve(c):gSe(t)(h.map(C=>({action:r,body:C})),n).then(C=>(c.objectIDs=c.objectIDs.concat(C.objectIDs),c.taskIDs.push(C.taskID),E++,f(E)))};return Kt.createWaitablePromise(f(),(p,h)=>Promise.all(p.taskIDs.map(E=>gs(t)(E,h))))},Kbt=t=>e=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/clear\",t.indexName)},e),(r,s)=>gs(t)(r.taskID,s)),Jbt=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=dl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/rules/clear\",t.indexName)},a),(n,c)=>gs(t)(n.taskID,c))},zbt=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=dl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/synonyms/clear\",t.indexName)},a),(n,c)=>gs(t)(n.taskID,c))},Zbt=t=>(e,r)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/deleteByQuery\",t.indexName),data:e},r),(s,a)=>gs(t)(s.taskID,a)),Xbt=t=>e=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode(\"1/indexes/%s\",t.indexName)},e),(r,s)=>gs(t)(r.taskID,s)),$bt=t=>(e,r)=>Kt.createWaitablePromise(dSe(t)([e],r).then(s=>({taskID:s.taskIDs[0]})),(s,a)=>gs(t)(s.taskID,a)),dSe=t=>(e,r)=>{let s=e.map(a=>({objectID:a}));return yF(t)(s,Qm.DeleteObject,r)},ePt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=dl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode(\"1/indexes/%s/rules/%s\",t.indexName,e)},n),(c,f)=>gs(t)(c.taskID,f))},tPt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=dl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode(\"1/indexes/%s/synonyms/%s\",t.indexName,e)},n),(c,f)=>gs(t)(c.taskID,f))},rPt=t=>e=>mSe(t)(e).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),nPt=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode(\"1/answers/%s/prediction\",t.indexName),data:{query:e,queryLanguages:r},cacheable:!0},s),iPt=t=>(e,r)=>{let{query:s,paginate:a,...n}=r||{},c=0,f=()=>ISe(t)(s||\"\",{...n,page:c}).then(p=>{for(let[h,E]of Object.entries(p.hits))if(e(E))return{object:E,position:parseInt(h,10),page:c};if(c++,a===!1||c>=p.nbPages)throw ASe();return f()});return f()},sPt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode(\"1/indexes/%s/%s\",t.indexName,e)},r),oPt=()=>(t,e)=>{for(let[r,s]of Object.entries(t.hits))if(s.objectID===e)return parseInt(r,10);return-1},aPt=t=>(e,r)=>{let{attributesToRetrieve:s,...a}=r||{},n=e.map(c=>({indexName:t.indexName,objectID:c,...s?{attributesToRetrieve:s}:{}}));return t.transporter.read({method:br.MethodEnum.Post,path:\"1/indexes/*/objects\",data:{requests:n}},a)},lPt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode(\"1/indexes/%s/rules/%s\",t.indexName,e)},r),mSe=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode(\"1/indexes/%s/settings\",t.indexName),data:{getVersion:2}},e),cPt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode(\"1/indexes/%s/synonyms/%s\",t.indexName,e)},r),ySe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode(\"1/indexes/%s/task/%s\",t.indexName,e.toString())},r),uPt=t=>(e,r)=>Kt.createWaitablePromise(ESe(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>gs(t)(s.taskID,a)),ESe=t=>(e,r)=>{let{createIfNotExists:s,...a}=r||{},n=s?Qm.PartialUpdateObject:Qm.PartialUpdateObjectNoCreate;return yF(t)(e,n,a)},fPt=t=>(e,r)=>{let{safe:s,autoGenerateObjectIDIfNotExist:a,batchSize:n,...c}=r||{},f=(I,R,N,U)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/operation\",I),data:{operation:N,destination:R}},U),(W,te)=>gs(t)(W.taskID,te)),p=Math.random().toString(36).substring(7),h=`${t.indexName}_tmp_${p}`,E=G9({appId:t.appId,transporter:t.transporter,indexName:h}),C=[],S=f(t.indexName,h,\"copy\",{...c,scope:[\"settings\",\"synonyms\",\"rules\"]});C.push(S);let P=(s?S.wait(c):S).then(()=>{let I=E(e,{...c,autoGenerateObjectIDIfNotExist:a,batchSize:n});return C.push(I),s?I.wait(c):I}).then(()=>{let I=f(h,t.indexName,\"move\",c);return C.push(I),s?I.wait(c):I}).then(()=>Promise.all(C)).then(([I,R,N])=>({objectIDs:R.objectIDs,taskIDs:[I.taskID,...R.taskIDs,N.taskID]}));return Kt.createWaitablePromise(P,(I,R)=>Promise.all(C.map(N=>N.wait(R))))},APt=t=>(e,r)=>W9(t)(e,{...r,clearExistingRules:!0}),pPt=t=>(e,r)=>Y9(t)(e,{...r,clearExistingSynonyms:!0}),hPt=t=>(e,r)=>Kt.createWaitablePromise(G9(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>gs(t)(s.taskID,a)),G9=t=>(e,r)=>{let{autoGenerateObjectIDIfNotExist:s,...a}=r||{},n=s?Qm.AddObject:Qm.UpdateObject;if(n===Qm.UpdateObject){for(let c of e)if(c.objectID===void 0)return Kt.createWaitablePromise(Promise.reject(fSe()))}return yF(t)(e,n,a)},gPt=t=>(e,r)=>W9(t)([e],r),W9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingRules:a,...n}=r||{},c=dl.createMappedRequestOptions(n);return s&&(c.queryParameters.forwardToReplicas=1),a&&(c.queryParameters.clearExistingRules=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/rules/batch\",t.indexName),data:e},c),(f,p)=>gs(t)(f.taskID,p))},dPt=t=>(e,r)=>Y9(t)([e],r),Y9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingSynonyms:a,replaceExistingSynonyms:n,...c}=r||{},f=dl.createMappedRequestOptions(c);return s&&(f.queryParameters.forwardToReplicas=1),(n||a)&&(f.queryParameters.replaceExistingSynonyms=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/synonyms/batch\",t.indexName),data:e},f),(p,h)=>gs(t)(p.taskID,h))},ISe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/query\",t.indexName),data:{query:e},cacheable:!0},r),CSe=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/facets/%s/query\",t.indexName,e),data:{facetQuery:r},cacheable:!0},s),wSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/rules/search\",t.indexName),data:{query:e}},r),BSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode(\"1/indexes/%s/synonyms/search\",t.indexName),data:{query:e}},r),mPt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=dl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Kt.encode(\"1/indexes/%s/settings\",t.indexName),data:e},n),(c,f)=>gs(t)(c.taskID,f))},gs=t=>(e,r)=>Kt.createRetryablePromise(s=>ySe(t)(e,r).then(a=>a.status!==\"published\"?s():void 0)),yPt={AddObject:\"addObject\",Analytics:\"analytics\",Browser:\"browse\",DeleteIndex:\"deleteIndex\",DeleteObject:\"deleteObject\",EditSettings:\"editSettings\",Inference:\"inference\",ListIndexes:\"listIndexes\",Logs:\"logs\",Personalization:\"personalization\",Recommendation:\"recommendation\",Search:\"search\",SeeUnretrievableAttributes:\"seeUnretrievableAttributes\",Settings:\"settings\",Usage:\"usage\"},Qm={AddObject:\"addObject\",UpdateObject:\"updateObject\",PartialUpdateObject:\"partialUpdateObject\",PartialUpdateObjectNoCreate:\"partialUpdateObjectNoCreate\",DeleteObject:\"deleteObject\",DeleteIndex:\"delete\",ClearIndex:\"clear\"},EF={Settings:\"settings\",Synonyms:\"synonyms\",Rules:\"rules\"},EPt={None:\"none\",StopIfEnoughMatches:\"stopIfEnoughMatches\"},IPt={Synonym:\"synonym\",OneWaySynonym:\"oneWaySynonym\",AltCorrection1:\"altCorrection1\",AltCorrection2:\"altCorrection2\",Placeholder:\"placeholder\"};Ft.ApiKeyACLEnum=yPt;Ft.BatchActionEnum=Qm;Ft.ScopeEnum=EF;Ft.StrategyEnum=EPt;Ft.SynonymEnum=IPt;Ft.addApiKey=fbt;Ft.assignUserID=Abt;Ft.assignUserIDs=pbt;Ft.batch=gSe;Ft.browseObjects=Wbt;Ft.browseRules=Ybt;Ft.browseSynonyms=Vbt;Ft.chunkedBatch=yF;Ft.clearDictionaryEntries=hbt;Ft.clearObjects=Kbt;Ft.clearRules=Jbt;Ft.clearSynonyms=zbt;Ft.copyIndex=mF;Ft.copyRules=gbt;Ft.copySettings=dbt;Ft.copySynonyms=mbt;Ft.createBrowsablePromise=dF;Ft.createMissingObjectIDError=fSe;Ft.createObjectNotFoundError=ASe;Ft.createSearchClient=ubt;Ft.createValidUntilNotFoundError=pSe;Ft.customRequest=ybt;Ft.deleteApiKey=Ebt;Ft.deleteBy=Zbt;Ft.deleteDictionaryEntries=Ibt;Ft.deleteIndex=Xbt;Ft.deleteObject=$bt;Ft.deleteObjects=dSe;Ft.deleteRule=ePt;Ft.deleteSynonym=tPt;Ft.exists=rPt;Ft.findAnswers=nPt;Ft.findObject=iPt;Ft.generateSecuredApiKey=Cbt;Ft.getApiKey=VS;Ft.getAppTask=hSe;Ft.getDictionarySettings=wbt;Ft.getLogs=Bbt;Ft.getObject=sPt;Ft.getObjectPosition=oPt;Ft.getObjects=aPt;Ft.getRule=lPt;Ft.getSecuredApiKeyRemainingValidity=vbt;Ft.getSettings=mSe;Ft.getSynonym=cPt;Ft.getTask=ySe;Ft.getTopUserIDs=Sbt;Ft.getUserID=Dbt;Ft.hasPendingMappings=bbt;Ft.initIndex=KS;Ft.listApiKeys=Pbt;Ft.listClusters=xbt;Ft.listIndices=kbt;Ft.listUserIDs=Qbt;Ft.moveIndex=Tbt;Ft.multipleBatch=Rbt;Ft.multipleGetObjects=Fbt;Ft.multipleQueries=Nbt;Ft.multipleSearchForFacetValues=Obt;Ft.partialUpdateObject=uPt;Ft.partialUpdateObjects=ESe;Ft.removeUserID=Lbt;Ft.replaceAllObjects=fPt;Ft.replaceAllRules=APt;Ft.replaceAllSynonyms=pPt;Ft.replaceDictionaryEntries=Mbt;Ft.restoreApiKey=_bt;Ft.saveDictionaryEntries=Ubt;Ft.saveObject=hPt;Ft.saveObjects=G9;Ft.saveRule=gPt;Ft.saveRules=W9;Ft.saveSynonym=dPt;Ft.saveSynonyms=Y9;Ft.search=ISe;Ft.searchDictionaryEntries=Hbt;Ft.searchForFacetValues=CSe;Ft.searchRules=wSe;Ft.searchSynonyms=BSe;Ft.searchUserIDs=jbt;Ft.setDictionarySettings=qbt;Ft.setSettings=mPt;Ft.updateApiKey=Gbt;Ft.waitAppTask=cw;Ft.waitTask=gs});var DSe=L((yhr,SSe)=>{SSe.exports=vSe()});var bSe=L(IF=>{\"use strict\";Object.defineProperty(IF,\"__esModule\",{value:!0});function CPt(){return{debug(t,e){return Promise.resolve()},info(t,e){return Promise.resolve()},error(t,e){return Promise.resolve()}}}var wPt={Debug:1,Info:2,Error:3};IF.LogLevelEnum=wPt;IF.createNullLogger=CPt});var xSe=L((Ihr,PSe)=>{PSe.exports=bSe()});var RSe=L(V9=>{\"use strict\";Object.defineProperty(V9,\"__esModule\",{value:!0});var kSe=ye(\"http\"),QSe=ye(\"https\"),BPt=ye(\"url\"),TSe={keepAlive:!0},vPt=new kSe.Agent(TSe),SPt=new QSe.Agent(TSe);function DPt({agent:t,httpAgent:e,httpsAgent:r,requesterOptions:s={}}={}){let a=e||t||vPt,n=r||t||SPt;return{send(c){return new Promise(f=>{let p=BPt.parse(c.url),h=p.query===null?p.pathname:`${p.pathname}?${p.query}`,E={...s,agent:p.protocol===\"https:\"?n:a,hostname:p.hostname,path:h,method:c.method,headers:{...s&&s.headers?s.headers:{},...c.headers},...p.port!==void 0?{port:p.port||\"\"}:{}},C=(p.protocol===\"https:\"?QSe:kSe).request(E,R=>{let N=[];R.on(\"data\",U=>{N=N.concat(U)}),R.on(\"end\",()=>{clearTimeout(P),clearTimeout(I),f({status:R.statusCode||0,content:Buffer.concat(N).toString(),isTimedOut:!1})})}),S=(R,N)=>setTimeout(()=>{C.abort(),f({status:0,content:N,isTimedOut:!0})},R*1e3),P=S(c.connectTimeout,\"Connection timeout\"),I;C.on(\"error\",R=>{clearTimeout(P),clearTimeout(I),f({status:0,content:R.message,isTimedOut:!1})}),C.once(\"response\",()=>{clearTimeout(P),I=S(c.responseTimeout,\"Socket timeout\")}),c.data!==void 0&&C.write(c.data),C.end()})},destroy(){return a.destroy(),n.destroy(),Promise.resolve()}}}V9.createNodeHttpRequester=DPt});var NSe=L((whr,FSe)=>{FSe.exports=RSe()});var _Se=L((Bhr,MSe)=>{\"use strict\";var OSe=Rve(),bPt=Ove(),uw=oSe(),J9=HS(),K9=uSe(),jt=DSe(),PPt=xSe(),xPt=NSe(),kPt=GS();function LSe(t,e,r){let s={appId:t,apiKey:e,timeouts:{connect:2,read:5,write:30},requester:xPt.createNodeHttpRequester(),logger:PPt.createNullLogger(),responsesCache:OSe.createNullCache(),requestsCache:OSe.createNullCache(),hostsCache:bPt.createInMemoryCache(),userAgent:kPt.createUserAgent(J9.version).add({segment:\"Node.js\",version:process.versions.node})},a={...s,...r},n=()=>c=>K9.createPersonalizationClient({...s,...c,methods:{getPersonalizationStrategy:K9.getPersonalizationStrategy,setPersonalizationStrategy:K9.setPersonalizationStrategy}});return jt.createSearchClient({...a,methods:{search:jt.multipleQueries,searchForFacetValues:jt.multipleSearchForFacetValues,multipleBatch:jt.multipleBatch,multipleGetObjects:jt.multipleGetObjects,multipleQueries:jt.multipleQueries,copyIndex:jt.copyIndex,copySettings:jt.copySettings,copyRules:jt.copyRules,copySynonyms:jt.copySynonyms,moveIndex:jt.moveIndex,listIndices:jt.listIndices,getLogs:jt.getLogs,listClusters:jt.listClusters,multipleSearchForFacetValues:jt.multipleSearchForFacetValues,getApiKey:jt.getApiKey,addApiKey:jt.addApiKey,listApiKeys:jt.listApiKeys,updateApiKey:jt.updateApiKey,deleteApiKey:jt.deleteApiKey,restoreApiKey:jt.restoreApiKey,assignUserID:jt.assignUserID,assignUserIDs:jt.assignUserIDs,getUserID:jt.getUserID,searchUserIDs:jt.searchUserIDs,listUserIDs:jt.listUserIDs,getTopUserIDs:jt.getTopUserIDs,removeUserID:jt.removeUserID,hasPendingMappings:jt.hasPendingMappings,generateSecuredApiKey:jt.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:jt.getSecuredApiKeyRemainingValidity,destroy:J9.destroy,clearDictionaryEntries:jt.clearDictionaryEntries,deleteDictionaryEntries:jt.deleteDictionaryEntries,getDictionarySettings:jt.getDictionarySettings,getAppTask:jt.getAppTask,replaceDictionaryEntries:jt.replaceDictionaryEntries,saveDictionaryEntries:jt.saveDictionaryEntries,searchDictionaryEntries:jt.searchDictionaryEntries,setDictionarySettings:jt.setDictionarySettings,waitAppTask:jt.waitAppTask,customRequest:jt.customRequest,initIndex:c=>f=>jt.initIndex(c)(f,{methods:{batch:jt.batch,delete:jt.deleteIndex,findAnswers:jt.findAnswers,getObject:jt.getObject,getObjects:jt.getObjects,saveObject:jt.saveObject,saveObjects:jt.saveObjects,search:jt.search,searchForFacetValues:jt.searchForFacetValues,waitTask:jt.waitTask,setSettings:jt.setSettings,getSettings:jt.getSettings,partialUpdateObject:jt.partialUpdateObject,partialUpdateObjects:jt.partialUpdateObjects,deleteObject:jt.deleteObject,deleteObjects:jt.deleteObjects,deleteBy:jt.deleteBy,clearObjects:jt.clearObjects,browseObjects:jt.browseObjects,getObjectPosition:jt.getObjectPosition,findObject:jt.findObject,exists:jt.exists,saveSynonym:jt.saveSynonym,saveSynonyms:jt.saveSynonyms,getSynonym:jt.getSynonym,searchSynonyms:jt.searchSynonyms,browseSynonyms:jt.browseSynonyms,deleteSynonym:jt.deleteSynonym,clearSynonyms:jt.clearSynonyms,replaceAllObjects:jt.replaceAllObjects,replaceAllSynonyms:jt.replaceAllSynonyms,searchRules:jt.searchRules,getRule:jt.getRule,deleteRule:jt.deleteRule,saveRule:jt.saveRule,saveRules:jt.saveRules,replaceAllRules:jt.replaceAllRules,browseRules:jt.browseRules,clearRules:jt.clearRules}}),initAnalytics:()=>c=>uw.createAnalyticsClient({...s,...c,methods:{addABTest:uw.addABTest,getABTest:uw.getABTest,getABTests:uw.getABTests,stopABTest:uw.stopABTest,deleteABTest:uw.deleteABTest}}),initPersonalization:n,initRecommendation:()=>c=>(a.logger.info(\"The `initRecommendation` method is deprecated. Use `initPersonalization` instead.\"),n()(c))}})}LSe.version=J9.version;MSe.exports=LSe});var Z9=L((vhr,z9)=>{var USe=_Se();z9.exports=USe;z9.exports.default=USe});var eW=L((Dhr,qSe)=>{\"use strict\";var jSe=Object.getOwnPropertySymbols,TPt=Object.prototype.hasOwnProperty,RPt=Object.prototype.propertyIsEnumerable;function FPt(t){if(t==null)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(t)}function NPt(){try{if(!Object.assign)return!1;var t=new String(\"abc\");if(t[5]=\"de\",Object.getOwnPropertyNames(t)[0]===\"5\")return!1;for(var e={},r=0;r<10;r++)e[\"_\"+String.fromCharCode(r)]=r;var s=Object.getOwnPropertyNames(e).map(function(n){return e[n]});if(s.join(\"\")!==\"0123456789\")return!1;var a={};return\"abcdefghijklmnopqrst\".split(\"\").forEach(function(n){a[n]=n}),Object.keys(Object.assign({},a)).join(\"\")===\"abcdefghijklmnopqrst\"}catch{return!1}}qSe.exports=NPt()?Object.assign:function(t,e){for(var r,s=FPt(t),a,n=1;n<arguments.length;n++){r=Object(arguments[n]);for(var c in r)TPt.call(r,c)&&(s[c]=r[c]);if(jSe){a=jSe(r);for(var f=0;f<a.length;f++)RPt.call(r,a[f])&&(s[a[f]]=r[a[f]])}}return s}});var sDe=L(Dn=>{\"use strict\";var rW=eW(),fw=60103,YSe=60106;Dn.Fragment=60107;Dn.StrictMode=60108;Dn.Profiler=60114;var VSe=60109,KSe=60110,JSe=60112;Dn.Suspense=60113;var zSe=60115,ZSe=60116;typeof Symbol==\"function\"&&Symbol.for&&(Wc=Symbol.for,fw=Wc(\"react.element\"),YSe=Wc(\"react.portal\"),Dn.Fragment=Wc(\"react.fragment\"),Dn.StrictMode=Wc(\"react.strict_mode\"),Dn.Profiler=Wc(\"react.profiler\"),VSe=Wc(\"react.provider\"),KSe=Wc(\"react.context\"),JSe=Wc(\"react.forward_ref\"),Dn.Suspense=Wc(\"react.suspense\"),zSe=Wc(\"react.memo\"),ZSe=Wc(\"react.lazy\"));var Wc,GSe=typeof Symbol==\"function\"&&Symbol.iterator;function OPt(t){return t===null||typeof t!=\"object\"?null:(t=GSe&&t[GSe]||t[\"@@iterator\"],typeof t==\"function\"?t:null)}function JS(t){for(var e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+t,r=1;r<arguments.length;r++)e+=\"&args[]=\"+encodeURIComponent(arguments[r]);return\"Minified React error #\"+t+\"; visit \"+e+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var XSe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$Se={};function Aw(t,e,r){this.props=t,this.context=e,this.refs=$Se,this.updater=r||XSe}Aw.prototype.isReactComponent={};Aw.prototype.setState=function(t,e){if(typeof t!=\"object\"&&typeof t!=\"function\"&&t!=null)throw Error(JS(85));this.updater.enqueueSetState(this,t,e,\"setState\")};Aw.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,\"forceUpdate\")};function eDe(){}eDe.prototype=Aw.prototype;function nW(t,e,r){this.props=t,this.context=e,this.refs=$Se,this.updater=r||XSe}var iW=nW.prototype=new eDe;iW.constructor=nW;rW(iW,Aw.prototype);iW.isPureReactComponent=!0;var sW={current:null},tDe=Object.prototype.hasOwnProperty,rDe={key:!0,ref:!0,__self:!0,__source:!0};function nDe(t,e,r){var s,a={},n=null,c=null;if(e!=null)for(s in e.ref!==void 0&&(c=e.ref),e.key!==void 0&&(n=\"\"+e.key),e)tDe.call(e,s)&&!rDe.hasOwnProperty(s)&&(a[s]=e[s]);var f=arguments.length-2;if(f===1)a.children=r;else if(1<f){for(var p=Array(f),h=0;h<f;h++)p[h]=arguments[h+2];a.children=p}if(t&&t.defaultProps)for(s in f=t.defaultProps,f)a[s]===void 0&&(a[s]=f[s]);return{$$typeof:fw,type:t,key:n,ref:c,props:a,_owner:sW.current}}function LPt(t,e){return{$$typeof:fw,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function oW(t){return typeof t==\"object\"&&t!==null&&t.$$typeof===fw}function MPt(t){var e={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+t.replace(/[=:]/g,function(r){return e[r]})}var WSe=/\\/+/g;function tW(t,e){return typeof t==\"object\"&&t!==null&&t.key!=null?MPt(\"\"+t.key):e.toString(36)}function wF(t,e,r,s,a){var n=typeof t;(n===\"undefined\"||n===\"boolean\")&&(t=null);var c=!1;if(t===null)c=!0;else switch(n){case\"string\":case\"number\":c=!0;break;case\"object\":switch(t.$$typeof){case fw:case YSe:c=!0}}if(c)return c=t,a=a(c),t=s===\"\"?\".\"+tW(c,0):s,Array.isArray(a)?(r=\"\",t!=null&&(r=t.replace(WSe,\"$&/\")+\"/\"),wF(a,e,r,\"\",function(h){return h})):a!=null&&(oW(a)&&(a=LPt(a,r+(!a.key||c&&c.key===a.key?\"\":(\"\"+a.key).replace(WSe,\"$&/\")+\"/\")+t)),e.push(a)),1;if(c=0,s=s===\"\"?\".\":s+\":\",Array.isArray(t))for(var f=0;f<t.length;f++){n=t[f];var p=s+tW(n,f);c+=wF(n,e,r,p,a)}else if(p=OPt(t),typeof p==\"function\")for(t=p.call(t),f=0;!(n=t.next()).done;)n=n.value,p=s+tW(n,f++),c+=wF(n,e,r,p,a);else if(n===\"object\")throw e=\"\"+t,Error(JS(31,e===\"[object Object]\"?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":e));return c}function CF(t,e,r){if(t==null)return t;var s=[],a=0;return wF(t,s,\"\",\"\",function(n){return e.call(r,n,a++)}),s}function _Pt(t){if(t._status===-1){var e=t._result;e=e(),t._status=0,t._result=e,e.then(function(r){t._status===0&&(r=r.default,t._status=1,t._result=r)},function(r){t._status===0&&(t._status=2,t._result=r)})}if(t._status===1)return t._result;throw t._result}var iDe={current:null};function th(){var t=iDe.current;if(t===null)throw Error(JS(321));return t}var UPt={ReactCurrentDispatcher:iDe,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:sW,IsSomeRendererActing:{current:!1},assign:rW};Dn.Children={map:CF,forEach:function(t,e,r){CF(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return CF(t,function(){e++}),e},toArray:function(t){return CF(t,function(e){return e})||[]},only:function(t){if(!oW(t))throw Error(JS(143));return t}};Dn.Component=Aw;Dn.PureComponent=nW;Dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=UPt;Dn.cloneElement=function(t,e,r){if(t==null)throw Error(JS(267,t));var s=rW({},t.props),a=t.key,n=t.ref,c=t._owner;if(e!=null){if(e.ref!==void 0&&(n=e.ref,c=sW.current),e.key!==void 0&&(a=\"\"+e.key),t.type&&t.type.defaultProps)var f=t.type.defaultProps;for(p in e)tDe.call(e,p)&&!rDe.hasOwnProperty(p)&&(s[p]=e[p]===void 0&&f!==void 0?f[p]:e[p])}var p=arguments.length-2;if(p===1)s.children=r;else if(1<p){f=Array(p);for(var h=0;h<p;h++)f[h]=arguments[h+2];s.children=f}return{$$typeof:fw,type:t.type,key:a,ref:n,props:s,_owner:c}};Dn.createContext=function(t,e){return e===void 0&&(e=null),t={$$typeof:KSe,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider={$$typeof:VSe,_context:t},t.Consumer=t};Dn.createElement=nDe;Dn.createFactory=function(t){var e=nDe.bind(null,t);return e.type=t,e};Dn.createRef=function(){return{current:null}};Dn.forwardRef=function(t){return{$$typeof:JSe,render:t}};Dn.isValidElement=oW;Dn.lazy=function(t){return{$$typeof:ZSe,_payload:{_status:-1,_result:t},_init:_Pt}};Dn.memo=function(t,e){return{$$typeof:zSe,type:t,compare:e===void 0?null:e}};Dn.useCallback=function(t,e){return th().useCallback(t,e)};Dn.useContext=function(t,e){return th().useContext(t,e)};Dn.useDebugValue=function(){};Dn.useEffect=function(t,e){return th().useEffect(t,e)};Dn.useImperativeHandle=function(t,e,r){return th().useImperativeHandle(t,e,r)};Dn.useLayoutEffect=function(t,e){return th().useLayoutEffect(t,e)};Dn.useMemo=function(t,e){return th().useMemo(t,e)};Dn.useReducer=function(t,e,r){return th().useReducer(t,e,r)};Dn.useRef=function(t){return th().useRef(t)};Dn.useState=function(t){return th().useState(t)};Dn.version=\"17.0.2\"});var hn=L((Phr,oDe)=>{\"use strict\";oDe.exports=sDe()});var lW=L((xhr,aW)=>{\"use strict\";var Cn=aW.exports;aW.exports.default=Cn;var Zn=\"\\x1B[\",zS=\"\\x1B]\",pw=\"\\x07\",BF=\";\",aDe=process.env.TERM_PROGRAM===\"Apple_Terminal\";Cn.cursorTo=(t,e)=>{if(typeof t!=\"number\")throw new TypeError(\"The `x` argument is required\");return typeof e!=\"number\"?Zn+(t+1)+\"G\":Zn+(e+1)+\";\"+(t+1)+\"H\"};Cn.cursorMove=(t,e)=>{if(typeof t!=\"number\")throw new TypeError(\"The `x` argument is required\");let r=\"\";return t<0?r+=Zn+-t+\"D\":t>0&&(r+=Zn+t+\"C\"),e<0?r+=Zn+-e+\"A\":e>0&&(r+=Zn+e+\"B\"),r};Cn.cursorUp=(t=1)=>Zn+t+\"A\";Cn.cursorDown=(t=1)=>Zn+t+\"B\";Cn.cursorForward=(t=1)=>Zn+t+\"C\";Cn.cursorBackward=(t=1)=>Zn+t+\"D\";Cn.cursorLeft=Zn+\"G\";Cn.cursorSavePosition=aDe?\"\\x1B7\":Zn+\"s\";Cn.cursorRestorePosition=aDe?\"\\x1B8\":Zn+\"u\";Cn.cursorGetPosition=Zn+\"6n\";Cn.cursorNextLine=Zn+\"E\";Cn.cursorPrevLine=Zn+\"F\";Cn.cursorHide=Zn+\"?25l\";Cn.cursorShow=Zn+\"?25h\";Cn.eraseLines=t=>{let e=\"\";for(let r=0;r<t;r++)e+=Cn.eraseLine+(r<t-1?Cn.cursorUp():\"\");return t&&(e+=Cn.cursorLeft),e};Cn.eraseEndLine=Zn+\"K\";Cn.eraseStartLine=Zn+\"1K\";Cn.eraseLine=Zn+\"2K\";Cn.eraseDown=Zn+\"J\";Cn.eraseUp=Zn+\"1J\";Cn.eraseScreen=Zn+\"2J\";Cn.scrollUp=Zn+\"S\";Cn.scrollDown=Zn+\"T\";Cn.clearScreen=\"\\x1Bc\";Cn.clearTerminal=process.platform===\"win32\"?`${Cn.eraseScreen}${Zn}0f`:`${Cn.eraseScreen}${Zn}3J${Zn}H`;Cn.beep=pw;Cn.link=(t,e)=>[zS,\"8\",BF,BF,e,pw,t,zS,\"8\",BF,BF,pw].join(\"\");Cn.image=(t,e={})=>{let r=`${zS}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=\";preserveAspectRatio=0\"),r+\":\"+t.toString(\"base64\")+pw};Cn.iTerm={setCwd:(t=process.cwd())=>`${zS}50;CurrentDir=${t}${pw}`,annotation:(t,e={})=>{let r=`${zS}1337;`,s=typeof e.x<\"u\",a=typeof e.y<\"u\";if((s||a)&&!(s&&a&&typeof e.length<\"u\"))throw new Error(\"`x`, `y` and `length` must be defined when `x` or `y` is defined\");return t=t.replace(/\\|/g,\"\"),r+=e.isHidden?\"AddHiddenAnnotation=\":\"AddAnnotation=\",e.length>0?r+=(s?[t,e.length,e.x,e.y]:[e.length,t]).join(\"|\"):r+=t,r+pw}}});var cDe=L((khr,cW)=>{\"use strict\";var lDe=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};cW.exports=lDe;cW.exports.default=lDe});var fDe=L((Qhr,SF)=>{\"use strict\";var HPt=cDe(),vF=new WeakMap,uDe=(t,e={})=>{if(typeof t!=\"function\")throw new TypeError(\"Expected a function\");let r,s=0,a=t.displayName||t.name||\"<anonymous>\",n=function(...c){if(vF.set(n,++s),s===1)r=t.apply(this,c),t=null;else if(e.throw===!0)throw new Error(`Function \\`${a}\\` can only be called once`);return r};return HPt(n,t),vF.set(n,s),n};SF.exports=uDe;SF.exports.default=uDe;SF.exports.callCount=t=>{if(!vF.has(t))throw new Error(`The given function \\`${t.name}\\` is not wrapped by the \\`onetime\\` package`);return vF.get(t)}});var ADe=L((Thr,DF)=>{DF.exports=[\"SIGABRT\",\"SIGALRM\",\"SIGHUP\",\"SIGINT\",\"SIGTERM\"];process.platform!==\"win32\"&&DF.exports.push(\"SIGVTALRM\",\"SIGXCPU\",\"SIGXFSZ\",\"SIGUSR2\",\"SIGTRAP\",\"SIGSYS\",\"SIGQUIT\",\"SIGIOT\");process.platform===\"linux\"&&DF.exports.push(\"SIGIO\",\"SIGPOLL\",\"SIGPWR\",\"SIGSTKFLT\",\"SIGUNUSED\")});var AW=L((Rhr,dw)=>{var Qi=global.process,Tm=function(t){return t&&typeof t==\"object\"&&typeof t.removeListener==\"function\"&&typeof t.emit==\"function\"&&typeof t.reallyExit==\"function\"&&typeof t.listeners==\"function\"&&typeof t.kill==\"function\"&&typeof t.pid==\"number\"&&typeof t.on==\"function\"};Tm(Qi)?(pDe=ye(\"assert\"),hw=ADe(),hDe=/^win/i.test(Qi.platform),ZS=ye(\"events\"),typeof ZS!=\"function\"&&(ZS=ZS.EventEmitter),Qi.__signal_exit_emitter__?Js=Qi.__signal_exit_emitter__:(Js=Qi.__signal_exit_emitter__=new ZS,Js.count=0,Js.emitted={}),Js.infinite||(Js.setMaxListeners(1/0),Js.infinite=!0),dw.exports=function(t,e){if(!Tm(global.process))return function(){};pDe.equal(typeof t,\"function\",\"a callback must be provided for exit handler\"),gw===!1&&uW();var r=\"exit\";e&&e.alwaysLast&&(r=\"afterexit\");var s=function(){Js.removeListener(r,t),Js.listeners(\"exit\").length===0&&Js.listeners(\"afterexit\").length===0&&bF()};return Js.on(r,t),s},bF=function(){!gw||!Tm(global.process)||(gw=!1,hw.forEach(function(e){try{Qi.removeListener(e,PF[e])}catch{}}),Qi.emit=xF,Qi.reallyExit=fW,Js.count-=1)},dw.exports.unload=bF,Rm=function(e,r,s){Js.emitted[e]||(Js.emitted[e]=!0,Js.emit(e,r,s))},PF={},hw.forEach(function(t){PF[t]=function(){if(Tm(global.process)){var r=Qi.listeners(t);r.length===Js.count&&(bF(),Rm(\"exit\",null,t),Rm(\"afterexit\",null,t),hDe&&t===\"SIGHUP\"&&(t=\"SIGINT\"),Qi.kill(Qi.pid,t))}}}),dw.exports.signals=function(){return hw},gw=!1,uW=function(){gw||!Tm(global.process)||(gw=!0,Js.count+=1,hw=hw.filter(function(e){try{return Qi.on(e,PF[e]),!0}catch{return!1}}),Qi.emit=dDe,Qi.reallyExit=gDe)},dw.exports.load=uW,fW=Qi.reallyExit,gDe=function(e){Tm(global.process)&&(Qi.exitCode=e||0,Rm(\"exit\",Qi.exitCode,null),Rm(\"afterexit\",Qi.exitCode,null),fW.call(Qi,Qi.exitCode))},xF=Qi.emit,dDe=function(e,r){if(e===\"exit\"&&Tm(global.process)){r!==void 0&&(Qi.exitCode=r);var s=xF.apply(this,arguments);return Rm(\"exit\",Qi.exitCode,null),Rm(\"afterexit\",Qi.exitCode,null),s}else return xF.apply(this,arguments)}):dw.exports=function(){return function(){}};var pDe,hw,hDe,ZS,Js,bF,Rm,PF,gw,uW,fW,gDe,xF,dDe});var yDe=L((Fhr,mDe)=>{\"use strict\";var jPt=fDe(),qPt=AW();mDe.exports=jPt(()=>{qPt(()=>{process.stderr.write(\"\\x1B[?25h\")},{alwaysLast:!0})})});var pW=L(mw=>{\"use strict\";var GPt=yDe(),kF=!1;mw.show=(t=process.stderr)=>{t.isTTY&&(kF=!1,t.write(\"\\x1B[?25h\"))};mw.hide=(t=process.stderr)=>{t.isTTY&&(GPt(),kF=!0,t.write(\"\\x1B[?25l\"))};mw.toggle=(t,e)=>{t!==void 0&&(kF=t),kF?mw.show(e):mw.hide(e)}});var wDe=L(XS=>{\"use strict\";var CDe=XS&&XS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(XS,\"__esModule\",{value:!0});var EDe=CDe(lW()),IDe=CDe(pW()),WPt=(t,{showCursor:e=!1}={})=>{let r=0,s=\"\",a=!1,n=c=>{!e&&!a&&(IDe.default.hide(),a=!0);let f=c+`\n`;f!==s&&(s=f,t.write(EDe.default.eraseLines(r)+f),r=f.split(`\n`).length)};return n.clear=()=>{t.write(EDe.default.eraseLines(r)),s=\"\",r=0},n.done=()=>{s=\"\",r=0,e||(IDe.default.show(),a=!1)},n};XS.default={create:WPt}});var BDe=L((Lhr,YPt)=>{YPt.exports=[{name:\"AppVeyor\",constant:\"APPVEYOR\",env:\"APPVEYOR\",pr:\"APPVEYOR_PULL_REQUEST_NUMBER\"},{name:\"Azure Pipelines\",constant:\"AZURE_PIPELINES\",env:\"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI\",pr:\"SYSTEM_PULLREQUEST_PULLREQUESTID\"},{name:\"Bamboo\",constant:\"BAMBOO\",env:\"bamboo_planKey\"},{name:\"Bitbucket Pipelines\",constant:\"BITBUCKET\",env:\"BITBUCKET_COMMIT\",pr:\"BITBUCKET_PR_ID\"},{name:\"Bitrise\",constant:\"BITRISE\",env:\"BITRISE_IO\",pr:\"BITRISE_PULL_REQUEST\"},{name:\"Buddy\",constant:\"BUDDY\",env:\"BUDDY_WORKSPACE_ID\",pr:\"BUDDY_EXECUTION_PULL_REQUEST_ID\"},{name:\"Buildkite\",constant:\"BUILDKITE\",env:\"BUILDKITE\",pr:{env:\"BUILDKITE_PULL_REQUEST\",ne:\"false\"}},{name:\"CircleCI\",constant:\"CIRCLE\",env:\"CIRCLECI\",pr:\"CIRCLE_PULL_REQUEST\"},{name:\"Cirrus CI\",constant:\"CIRRUS\",env:\"CIRRUS_CI\",pr:\"CIRRUS_PR\"},{name:\"AWS CodeBuild\",constant:\"CODEBUILD\",env:\"CODEBUILD_BUILD_ARN\"},{name:\"Codeship\",constant:\"CODESHIP\",env:{CI_NAME:\"codeship\"}},{name:\"Drone\",constant:\"DRONE\",env:\"DRONE\",pr:{DRONE_BUILD_EVENT:\"pull_request\"}},{name:\"dsari\",constant:\"DSARI\",env:\"DSARI\"},{name:\"GitLab CI\",constant:\"GITLAB\",env:\"GITLAB_CI\"},{name:\"GoCD\",constant:\"GOCD\",env:\"GO_PIPELINE_LABEL\"},{name:\"Hudson\",constant:\"HUDSON\",env:\"HUDSON_URL\"},{name:\"Jenkins\",constant:\"JENKINS\",env:[\"JENKINS_URL\",\"BUILD_ID\"],pr:{any:[\"ghprbPullId\",\"CHANGE_ID\"]}},{name:\"Magnum CI\",constant:\"MAGNUM\",env:\"MAGNUM\"},{name:\"Netlify CI\",constant:\"NETLIFY\",env:\"NETLIFY_BUILD_BASE\",pr:{env:\"PULL_REQUEST\",ne:\"false\"}},{name:\"Sail CI\",constant:\"SAIL\",env:\"SAILCI\",pr:\"SAIL_PULL_REQUEST_NUMBER\"},{name:\"Semaphore\",constant:\"SEMAPHORE\",env:\"SEMAPHORE\",pr:\"PULL_REQUEST_NUMBER\"},{name:\"Shippable\",constant:\"SHIPPABLE\",env:\"SHIPPABLE\",pr:{IS_PULL_REQUEST:\"true\"}},{name:\"Solano CI\",constant:\"SOLANO\",env:\"TDDIUM\",pr:\"TDDIUM_PR_ID\"},{name:\"Strider CD\",constant:\"STRIDER\",env:\"STRIDER\"},{name:\"TaskCluster\",constant:\"TASKCLUSTER\",env:[\"TASK_ID\",\"RUN_ID\"]},{name:\"TeamCity\",constant:\"TEAMCITY\",env:\"TEAMCITY_VERSION\"},{name:\"Travis CI\",constant:\"TRAVIS\",env:\"TRAVIS\",pr:{env:\"TRAVIS_PULL_REQUEST\",ne:\"false\"}}]});var DDe=L(rc=>{\"use strict\";var SDe=BDe(),AA=process.env;Object.defineProperty(rc,\"_vendors\",{value:SDe.map(function(t){return t.constant})});rc.name=null;rc.isPR=null;SDe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(s){return vDe(s)});if(rc[t.constant]=r,r)switch(rc.name=t.name,typeof t.pr){case\"string\":rc.isPR=!!AA[t.pr];break;case\"object\":\"env\"in t.pr?rc.isPR=t.pr.env in AA&&AA[t.pr.env]!==t.pr.ne:\"any\"in t.pr?rc.isPR=t.pr.any.some(function(s){return!!AA[s]}):rc.isPR=vDe(t.pr);break;default:rc.isPR=null}});rc.isCI=!!(AA.CI||AA.CONTINUOUS_INTEGRATION||AA.BUILD_NUMBER||AA.RUN_ID||rc.name);function vDe(t){return typeof t==\"string\"?!!AA[t]:Object.keys(t).every(function(e){return AA[e]===t[e]})}});var PDe=L((_hr,bDe)=>{\"use strict\";bDe.exports=DDe().isCI});var kDe=L((Uhr,xDe)=>{\"use strict\";var VPt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};xDe.exports=(t,{include:e,exclude:r}={})=>{let s=a=>{let n=c=>typeof c==\"string\"?a===c:c.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of VPt(t.constructor.prototype)){if(n===\"constructor\"||!s(n))continue;let c=Reflect.getOwnPropertyDescriptor(a,n);c&&typeof c.value==\"function\"&&(t[n]=t[n].bind(t))}return t}});var ODe=L(Vn=>{\"use strict\";var Ew,tD,FF,IW;typeof performance==\"object\"&&typeof performance.now==\"function\"?(QDe=performance,Vn.unstable_now=function(){return QDe.now()}):(hW=Date,TDe=hW.now(),Vn.unstable_now=function(){return hW.now()-TDe});var QDe,hW,TDe;typeof window>\"u\"||typeof MessageChannel!=\"function\"?(yw=null,gW=null,dW=function(){if(yw!==null)try{var t=Vn.unstable_now();yw(!0,t),yw=null}catch(e){throw setTimeout(dW,0),e}},Ew=function(t){yw!==null?setTimeout(Ew,0,t):(yw=t,setTimeout(dW,0))},tD=function(t,e){gW=setTimeout(t,e)},FF=function(){clearTimeout(gW)},Vn.unstable_shouldYield=function(){return!1},IW=Vn.unstable_forceFrameRate=function(){}):(RDe=window.setTimeout,FDe=window.clearTimeout,typeof console<\"u\"&&(NDe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!=\"function\"&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"),typeof NDe!=\"function\"&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\")),$S=!1,eD=null,QF=-1,mW=5,yW=0,Vn.unstable_shouldYield=function(){return Vn.unstable_now()>=yW},IW=function(){},Vn.unstable_forceFrameRate=function(t){0>t||125<t?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):mW=0<t?Math.floor(1e3/t):5},EW=new MessageChannel,TF=EW.port2,EW.port1.onmessage=function(){if(eD!==null){var t=Vn.unstable_now();yW=t+mW;try{eD(!0,t)?TF.postMessage(null):($S=!1,eD=null)}catch(e){throw TF.postMessage(null),e}}else $S=!1},Ew=function(t){eD=t,$S||($S=!0,TF.postMessage(null))},tD=function(t,e){QF=RDe(function(){t(Vn.unstable_now())},e)},FF=function(){FDe(QF),QF=-1});var yw,gW,dW,RDe,FDe,NDe,$S,eD,QF,mW,yW,EW,TF;function CW(t,e){var r=t.length;t.push(e);e:for(;;){var s=r-1>>>1,a=t[s];if(a!==void 0&&0<RF(a,e))t[s]=e,t[r]=a,r=s;else break e}}function tf(t){return t=t[0],t===void 0?null:t}function NF(t){var e=t[0];if(e!==void 0){var r=t.pop();if(r!==e){t[0]=r;e:for(var s=0,a=t.length;s<a;){var n=2*(s+1)-1,c=t[n],f=n+1,p=t[f];if(c!==void 0&&0>RF(c,r))p!==void 0&&0>RF(p,c)?(t[s]=p,t[f]=r,s=f):(t[s]=c,t[n]=r,s=n);else if(p!==void 0&&0>RF(p,r))t[s]=p,t[f]=r,s=f;else break e}}return e}return null}function RF(t,e){var r=t.sortIndex-e.sortIndex;return r!==0?r:t.id-e.id}var pA=[],$0=[],KPt=1,Yc=null,ea=3,OF=!1,Fm=!1,rD=!1;function wW(t){for(var e=tf($0);e!==null;){if(e.callback===null)NF($0);else if(e.startTime<=t)NF($0),e.sortIndex=e.expirationTime,CW(pA,e);else break;e=tf($0)}}function BW(t){if(rD=!1,wW(t),!Fm)if(tf(pA)!==null)Fm=!0,Ew(vW);else{var e=tf($0);e!==null&&tD(BW,e.startTime-t)}}function vW(t,e){Fm=!1,rD&&(rD=!1,FF()),OF=!0;var r=ea;try{for(wW(e),Yc=tf(pA);Yc!==null&&(!(Yc.expirationTime>e)||t&&!Vn.unstable_shouldYield());){var s=Yc.callback;if(typeof s==\"function\"){Yc.callback=null,ea=Yc.priorityLevel;var a=s(Yc.expirationTime<=e);e=Vn.unstable_now(),typeof a==\"function\"?Yc.callback=a:Yc===tf(pA)&&NF(pA),wW(e)}else NF(pA);Yc=tf(pA)}if(Yc!==null)var n=!0;else{var c=tf($0);c!==null&&tD(BW,c.startTime-e),n=!1}return n}finally{Yc=null,ea=r,OF=!1}}var JPt=IW;Vn.unstable_IdlePriority=5;Vn.unstable_ImmediatePriority=1;Vn.unstable_LowPriority=4;Vn.unstable_NormalPriority=3;Vn.unstable_Profiling=null;Vn.unstable_UserBlockingPriority=2;Vn.unstable_cancelCallback=function(t){t.callback=null};Vn.unstable_continueExecution=function(){Fm||OF||(Fm=!0,Ew(vW))};Vn.unstable_getCurrentPriorityLevel=function(){return ea};Vn.unstable_getFirstCallbackNode=function(){return tf(pA)};Vn.unstable_next=function(t){switch(ea){case 1:case 2:case 3:var e=3;break;default:e=ea}var r=ea;ea=e;try{return t()}finally{ea=r}};Vn.unstable_pauseExecution=function(){};Vn.unstable_requestPaint=JPt;Vn.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=ea;ea=t;try{return e()}finally{ea=r}};Vn.unstable_scheduleCallback=function(t,e,r){var s=Vn.unstable_now();switch(typeof r==\"object\"&&r!==null?(r=r.delay,r=typeof r==\"number\"&&0<r?s+r:s):r=s,t){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=r+a,t={id:KPt++,callback:e,priorityLevel:t,startTime:r,expirationTime:a,sortIndex:-1},r>s?(t.sortIndex=r,CW($0,t),tf(pA)===null&&t===tf($0)&&(rD?FF():rD=!0,tD(BW,r-s))):(t.sortIndex=a,CW(pA,t),Fm||OF||(Fm=!0,Ew(vW))),t};Vn.unstable_wrapCallback=function(t){var e=ea;return function(){var r=ea;ea=e;try{return t.apply(this,arguments)}finally{ea=r}}}});var SW=L((jhr,LDe)=>{\"use strict\";LDe.exports=ODe()});var MDe=L((qhr,nD)=>{nD.exports=function(e){var r={},s=eW(),a=hn(),n=SW();function c(v){for(var D=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+v,Q=1;Q<arguments.length;Q++)D+=\"&args[]=\"+encodeURIComponent(arguments[Q]);return\"Minified React error #\"+v+\"; visit \"+D+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var f=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,p=60103,h=60106,E=60107,C=60108,S=60114,P=60109,I=60110,R=60112,N=60113,U=60120,W=60115,te=60116,ie=60121,Ae=60129,ce=60130,me=60131;if(typeof Symbol==\"function\"&&Symbol.for){var pe=Symbol.for;p=pe(\"react.element\"),h=pe(\"react.portal\"),E=pe(\"react.fragment\"),C=pe(\"react.strict_mode\"),S=pe(\"react.profiler\"),P=pe(\"react.provider\"),I=pe(\"react.context\"),R=pe(\"react.forward_ref\"),N=pe(\"react.suspense\"),U=pe(\"react.suspense_list\"),W=pe(\"react.memo\"),te=pe(\"react.lazy\"),ie=pe(\"react.block\"),pe(\"react.scope\"),Ae=pe(\"react.debug_trace_mode\"),ce=pe(\"react.offscreen\"),me=pe(\"react.legacy_hidden\")}var Be=typeof Symbol==\"function\"&&Symbol.iterator;function Ce(v){return v===null||typeof v!=\"object\"?null:(v=Be&&v[Be]||v[\"@@iterator\"],typeof v==\"function\"?v:null)}function g(v){if(v==null)return null;if(typeof v==\"function\")return v.displayName||v.name||null;if(typeof v==\"string\")return v;switch(v){case E:return\"Fragment\";case h:return\"Portal\";case S:return\"Profiler\";case C:return\"StrictMode\";case N:return\"Suspense\";case U:return\"SuspenseList\"}if(typeof v==\"object\")switch(v.$$typeof){case I:return(v.displayName||\"Context\")+\".Consumer\";case P:return(v._context.displayName||\"Context\")+\".Provider\";case R:var D=v.render;return D=D.displayName||D.name||\"\",v.displayName||(D!==\"\"?\"ForwardRef(\"+D+\")\":\"ForwardRef\");case W:return g(v.type);case ie:return g(v._render);case te:D=v._payload,v=v._init;try{return g(v(D))}catch{}}return null}function we(v){var D=v,Q=v;if(v.alternate)for(;D.return;)D=D.return;else{v=D;do D=v,D.flags&1026&&(Q=D.return),v=D.return;while(v)}return D.tag===3?Q:null}function Ee(v){if(we(v)!==v)throw Error(c(188))}function fe(v){var D=v.alternate;if(!D){if(D=we(v),D===null)throw Error(c(188));return D!==v?null:v}for(var Q=v,H=D;;){var V=Q.return;if(V===null)break;var ne=V.alternate;if(ne===null){if(H=V.return,H!==null){Q=H;continue}break}if(V.child===ne.child){for(ne=V.child;ne;){if(ne===Q)return Ee(V),v;if(ne===H)return Ee(V),D;ne=ne.sibling}throw Error(c(188))}if(Q.return!==H.return)Q=V,H=ne;else{for(var Se=!1,Ue=V.child;Ue;){if(Ue===Q){Se=!0,Q=V,H=ne;break}if(Ue===H){Se=!0,H=V,Q=ne;break}Ue=Ue.sibling}if(!Se){for(Ue=ne.child;Ue;){if(Ue===Q){Se=!0,Q=ne,H=V;break}if(Ue===H){Se=!0,H=ne,Q=V;break}Ue=Ue.sibling}if(!Se)throw Error(c(189))}}if(Q.alternate!==H)throw Error(c(190))}if(Q.tag!==3)throw Error(c(188));return Q.stateNode.current===Q?v:D}function se(v){if(v=fe(v),!v)return null;for(var D=v;;){if(D.tag===5||D.tag===6)return D;if(D.child)D.child.return=D,D=D.child;else{if(D===v)break;for(;!D.sibling;){if(!D.return||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}function X(v){if(v=fe(v),!v)return null;for(var D=v;;){if(D.tag===5||D.tag===6)return D;if(D.child&&D.tag!==4)D.child.return=D,D=D.child;else{if(D===v)break;for(;!D.sibling;){if(!D.return||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}function De(v,D){for(var Q=v.alternate;D!==null;){if(D===v||D===Q)return!0;D=D.return}return!1}var Re=e.getPublicInstance,gt=e.getRootHostContext,j=e.getChildHostContext,rt=e.prepareForCommit,Fe=e.resetAfterCommit,Ne=e.createInstance,Pe=e.appendInitialChild,Ye=e.finalizeInitialChildren,ke=e.prepareUpdate,it=e.shouldSetTextContent,_e=e.createTextInstance,x=e.scheduleTimeout,w=e.cancelTimeout,b=e.noTimeout,y=e.isPrimaryRenderer,F=e.supportsMutation,z=e.supportsPersistence,Z=e.supportsHydration,$=e.getInstanceFromNode,oe=e.makeOpaqueHydratingObject,xe=e.makeClientId,Te=e.beforeActiveInstanceBlur,lt=e.afterActiveInstanceBlur,Et=e.preparePortalMount,qt=e.supportsTestSelectors,ir=e.findFiberRoot,Pt=e.getBoundingRect,gn=e.getTextContent,Pr=e.isHiddenSubtree,Ir=e.matchAccessibilityRole,Nr=e.setFocusIfFocusable,nn=e.setupIntersectionObserver,oi=e.appendChild,wo=e.appendChildToContainer,rs=e.commitTextUpdate,eo=e.commitMount,Bo=e.commitUpdate,Hi=e.insertBefore,to=e.insertInContainerBefore,vo=e.removeChild,RA=e.removeChildFromContainer,pf=e.resetTextContent,Eh=e.hideInstance,Ih=e.hideTextInstance,ro=e.unhideInstance,jn=e.unhideTextInstance,Rs=e.clearContainer,no=e.cloneInstance,lu=e.createContainerChildSet,cu=e.appendChildToContainerChildSet,uu=e.finalizeContainerChildren,FA=e.replaceContainerChildren,NA=e.cloneHiddenInstance,aa=e.cloneHiddenTextInstance,la=e.canHydrateInstance,OA=e.canHydrateTextInstance,gr=e.isSuspenseInstancePending,So=e.isSuspenseInstanceFallback,Me=e.getNextHydratableSibling,fu=e.getFirstHydratableChild,Cr=e.hydrateInstance,hf=e.hydrateTextInstance,LA=e.getNextHydratableInstanceAfterSuspenseInstance,MA=e.commitHydratedContainer,Au=e.commitHydratedSuspenseInstance,pu;function ac(v){if(pu===void 0)try{throw Error()}catch(Q){var D=Q.stack.trim().match(/\\n( *(at )?)/);pu=D&&D[1]||\"\"}return`\n`+pu+v}var ve=!1;function Nt(v,D){if(!v||ve)return\"\";ve=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(D)if(D=function(){throw Error()},Object.defineProperty(D.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"&&Reflect.construct){try{Reflect.construct(D,[])}catch(At){var H=At}Reflect.construct(v,[],D)}else{try{D.call()}catch(At){H=At}v.call(D.prototype)}else{try{throw Error()}catch(At){H=At}v()}}catch(At){if(At&&H&&typeof At.stack==\"string\"){for(var V=At.stack.split(`\n`),ne=H.stack.split(`\n`),Se=V.length-1,Ue=ne.length-1;1<=Se&&0<=Ue&&V[Se]!==ne[Ue];)Ue--;for(;1<=Se&&0<=Ue;Se--,Ue--)if(V[Se]!==ne[Ue]){if(Se!==1||Ue!==1)do if(Se--,Ue--,0>Ue||V[Se]!==ne[Ue])return`\n`+V[Se].replace(\" at new \",\" at \");while(1<=Se&&0<=Ue);break}}}finally{ve=!1,Error.prepareStackTrace=Q}return(v=v?v.displayName||v.name:\"\")?ac(v):\"\"}var lc=[],Ni=-1;function io(v){return{current:v}}function Rt(v){0>Ni||(v.current=lc[Ni],lc[Ni]=null,Ni--)}function xn(v,D){Ni++,lc[Ni]=v.current,v.current=D}var ca={},ji=io(ca),Oi=io(!1),Oa=ca;function dn(v,D){var Q=v.type.contextTypes;if(!Q)return ca;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===D)return H.__reactInternalMemoizedMaskedChildContext;var V={},ne;for(ne in Q)V[ne]=D[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=D,v.__reactInternalMemoizedMaskedChildContext=V),V}function Jn(v){return v=v.childContextTypes,v!=null}function hu(){Rt(Oi),Rt(ji)}function Ch(v,D,Q){if(ji.current!==ca)throw Error(c(168));xn(ji,D),xn(Oi,Q)}function La(v,D,Q){var H=v.stateNode;if(v=D.childContextTypes,typeof H.getChildContext!=\"function\")return Q;H=H.getChildContext();for(var V in H)if(!(V in v))throw Error(c(108,g(D)||\"Unknown\",V));return s({},Q,H)}function Ma(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||ca,Oa=ji.current,xn(ji,v),xn(Oi,Oi.current),!0}function Ua(v,D,Q){var H=v.stateNode;if(!H)throw Error(c(169));Q?(v=La(v,D,Oa),H.__reactInternalMemoizedMergedChildContext=v,Rt(Oi),Rt(ji),xn(ji,v)):Rt(Oi),xn(Oi,Q)}var Xe=null,Ha=null,gf=n.unstable_now;gf();var cc=0,wn=8;function ua(v){if(1&v)return wn=15,1;if(2&v)return wn=14,2;if(4&v)return wn=13,4;var D=24&v;return D!==0?(wn=12,D):v&32?(wn=11,32):(D=192&v,D!==0?(wn=10,D):v&256?(wn=9,256):(D=3584&v,D!==0?(wn=8,D):v&4096?(wn=7,4096):(D=4186112&v,D!==0?(wn=6,D):(D=62914560&v,D!==0?(wn=5,D):v&67108864?(wn=4,67108864):v&134217728?(wn=3,134217728):(D=805306368&v,D!==0?(wn=2,D):1073741824&v?(wn=1,1073741824):(wn=8,v))))))}function _A(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function UA(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(c(358,v))}}function fa(v,D){var Q=v.pendingLanes;if(Q===0)return wn=0;var H=0,V=0,ne=v.expiredLanes,Se=v.suspendedLanes,Ue=v.pingedLanes;if(ne!==0)H=ne,V=wn=15;else if(ne=Q&134217727,ne!==0){var At=ne&~Se;At!==0?(H=ua(At),V=wn):(Ue&=ne,Ue!==0&&(H=ua(Ue),V=wn))}else ne=Q&~Se,ne!==0?(H=ua(ne),V=wn):Ue!==0&&(H=ua(Ue),V=wn);if(H===0)return 0;if(H=31-ns(H),H=Q&((0>H?0:1<<H)<<1)-1,D!==0&&D!==H&&!(D&Se)){if(ua(D),V<=wn)return D;wn=V}if(D=v.entangledLanes,D!==0)for(v=v.entanglements,D&=H;0<D;)Q=31-ns(D),V=1<<Q,H|=v[Q],D&=~V;return H}function vl(v){return v=v.pendingLanes&-1073741825,v!==0?v:v&1073741824?1073741824:0}function Mt(v,D){switch(v){case 15:return 1;case 14:return 2;case 12:return v=kn(24&~D),v===0?Mt(10,D):v;case 10:return v=kn(192&~D),v===0?Mt(8,D):v;case 8:return v=kn(3584&~D),v===0&&(v=kn(4186112&~D),v===0&&(v=512)),v;case 2:return D=kn(805306368&~D),D===0&&(D=268435456),D}throw Error(c(358,v))}function kn(v){return v&-v}function Aa(v){for(var D=[],Q=0;31>Q;Q++)D.push(v);return D}function ja(v,D,Q){v.pendingLanes|=D;var H=D-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,D=31-ns(D),v[D]=Q}var ns=Math.clz32?Math.clz32:fc,uc=Math.log,gu=Math.LN2;function fc(v){return v===0?32:31-(uc(v)/gu|0)|0}var qa=n.unstable_runWithPriority,Li=n.unstable_scheduleCallback,Cs=n.unstable_cancelCallback,Sl=n.unstable_shouldYield,df=n.unstable_requestPaint,Ac=n.unstable_now,wi=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,pc=n.unstable_UserBlockingPriority,Je=n.unstable_NormalPriority,st=n.unstable_LowPriority,St=n.unstable_IdlePriority,lr={},ee=df!==void 0?df:function(){},Ie=null,Oe=null,ht=!1,mt=Ac(),Dt=1e4>mt?Ac:function(){return Ac()-mt};function tr(){switch(wi()){case Qn:return 99;case pc:return 98;case Je:return 97;case st:return 96;case St:return 95;default:throw Error(c(332))}}function fn(v){switch(v){case 99:return Qn;case 98:return pc;case 97:return Je;case 96:return st;case 95:return St;default:throw Error(c(332))}}function ai(v,D){return v=fn(v),qa(v,D)}function qi(v,D,Q){return v=fn(v),Li(v,D,Q)}function Tn(){if(Oe!==null){var v=Oe;Oe=null,Cs(v)}Ga()}function Ga(){if(!ht&&Ie!==null){ht=!0;var v=0;try{var D=Ie;ai(99,function(){for(;v<D.length;v++){var Q=D[v];do Q=Q(!0);while(Q!==null)}}),Ie=null}catch(Q){throw Ie!==null&&(Ie=Ie.slice(v+1)),Li(Qn,Tn),Q}finally{ht=!1}}}var my=f.ReactCurrentBatchConfig;function t2(v,D){return v===D&&(v!==0||1/v===1/D)||v!==v&&D!==D}var Do=typeof Object.is==\"function\"?Object.is:t2,yy=Object.prototype.hasOwnProperty;function wh(v,D){if(Do(v,D))return!0;if(typeof v!=\"object\"||v===null||typeof D!=\"object\"||D===null)return!1;var Q=Object.keys(v),H=Object.keys(D);if(Q.length!==H.length)return!1;for(H=0;H<Q.length;H++)if(!yy.call(D,Q[H])||!Do(v[Q[H]],D[Q[H]]))return!1;return!0}function r2(v){switch(v.tag){case 5:return ac(v.type);case 16:return ac(\"Lazy\");case 13:return ac(\"Suspense\");case 19:return ac(\"SuspenseList\");case 0:case 2:case 15:return v=Nt(v.type,!1),v;case 11:return v=Nt(v.type.render,!1),v;case 22:return v=Nt(v.type._render,!1),v;case 1:return v=Nt(v.type,!0),v;default:return\"\"}}function bo(v,D){if(v&&v.defaultProps){D=s({},D),v=v.defaultProps;for(var Q in v)D[Q]===void 0&&(D[Q]=v[Q]);return D}return D}var Bh=io(null),vh=null,du=null,Sh=null;function Ng(){Sh=du=vh=null}function Og(v,D){v=v.type._context,y?(xn(Bh,v._currentValue),v._currentValue=D):(xn(Bh,v._currentValue2),v._currentValue2=D)}function Lg(v){var D=Bh.current;Rt(Bh),v=v.type._context,y?v._currentValue=D:v._currentValue2=D}function Ey(v,D){for(;v!==null;){var Q=v.alternate;if((v.childLanes&D)===D){if(Q===null||(Q.childLanes&D)===D)break;Q.childLanes|=D}else v.childLanes|=D,Q!==null&&(Q.childLanes|=D);v=v.return}}function mf(v,D){vh=v,Sh=du=null,v=v.dependencies,v!==null&&v.firstContext!==null&&(v.lanes&D&&(Ke=!0),v.firstContext=null)}function Po(v,D){if(Sh!==v&&D!==!1&&D!==0)if((typeof D!=\"number\"||D===1073741823)&&(Sh=v,D=1073741823),D={context:v,observedBits:D,next:null},du===null){if(vh===null)throw Error(c(308));du=D,vh.dependencies={lanes:0,firstContext:D,responders:null}}else du=du.next=D;return y?v._currentValue:v._currentValue2}var Dl=!1;function Dh(v){v.updateQueue={baseState:v.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Mg(v,D){v=v.updateQueue,D.updateQueue===v&&(D.updateQueue={baseState:v.baseState,firstBaseUpdate:v.firstBaseUpdate,lastBaseUpdate:v.lastBaseUpdate,shared:v.shared,effects:v.effects})}function bl(v,D){return{eventTime:v,lane:D,tag:0,payload:null,callback:null,next:null}}function Pl(v,D){if(v=v.updateQueue,v!==null){v=v.shared;var Q=v.pending;Q===null?D.next=D:(D.next=Q.next,Q.next=D),v.pending=D}}function Iy(v,D){var Q=v.updateQueue,H=v.alternate;if(H!==null&&(H=H.updateQueue,Q===H)){var V=null,ne=null;if(Q=Q.firstBaseUpdate,Q!==null){do{var Se={eventTime:Q.eventTime,lane:Q.lane,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null};ne===null?V=ne=Se:ne=ne.next=Se,Q=Q.next}while(Q!==null);ne===null?V=ne=D:ne=ne.next=D}else V=ne=D;Q={baseState:H.baseState,firstBaseUpdate:V,lastBaseUpdate:ne,shared:H.shared,effects:H.effects},v.updateQueue=Q;return}v=Q.lastBaseUpdate,v===null?Q.firstBaseUpdate=D:v.next=D,Q.lastBaseUpdate=D}function HA(v,D,Q,H){var V=v.updateQueue;Dl=!1;var ne=V.firstBaseUpdate,Se=V.lastBaseUpdate,Ue=V.shared.pending;if(Ue!==null){V.shared.pending=null;var At=Ue,Gt=At.next;At.next=null,Se===null?ne=Gt:Se.next=Gt,Se=At;var vr=v.alternate;if(vr!==null){vr=vr.updateQueue;var Lr=vr.lastBaseUpdate;Lr!==Se&&(Lr===null?vr.firstBaseUpdate=Gt:Lr.next=Gt,vr.lastBaseUpdate=At)}}if(ne!==null){Lr=V.baseState,Se=0,vr=Gt=At=null;do{Ue=ne.lane;var Xt=ne.eventTime;if((H&Ue)===Ue){vr!==null&&(vr=vr.next={eventTime:Xt,lane:0,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null});e:{var zn=v,mi=ne;switch(Ue=D,Xt=Q,mi.tag){case 1:if(zn=mi.payload,typeof zn==\"function\"){Lr=zn.call(Xt,Lr,Ue);break e}Lr=zn;break e;case 3:zn.flags=zn.flags&-4097|64;case 0:if(zn=mi.payload,Ue=typeof zn==\"function\"?zn.call(Xt,Lr,Ue):zn,Ue==null)break e;Lr=s({},Lr,Ue);break e;case 2:Dl=!0}}ne.callback!==null&&(v.flags|=32,Ue=V.effects,Ue===null?V.effects=[ne]:Ue.push(ne))}else Xt={eventTime:Xt,lane:Ue,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},vr===null?(Gt=vr=Xt,At=Lr):vr=vr.next=Xt,Se|=Ue;if(ne=ne.next,ne===null){if(Ue=V.shared.pending,Ue===null)break;ne=Ue.next,Ue.next=null,V.lastBaseUpdate=Ue,V.shared.pending=null}}while(!0);vr===null&&(At=Lr),V.baseState=At,V.firstBaseUpdate=Gt,V.lastBaseUpdate=vr,$g|=Se,v.lanes=Se,v.memoizedState=Lr}}function Cy(v,D,Q){if(v=D.effects,D.effects=null,v!==null)for(D=0;D<v.length;D++){var H=v[D],V=H.callback;if(V!==null){if(H.callback=null,H=Q,typeof V!=\"function\")throw Error(c(191,V));V.call(H)}}}var wy=new a.Component().refs;function jA(v,D,Q,H){D=v.memoizedState,Q=Q(H,D),Q=Q==null?D:s({},D,Q),v.memoizedState=Q,v.lanes===0&&(v.updateQueue.baseState=Q)}var qA={isMounted:function(v){return(v=v._reactInternals)?we(v)===v:!1},enqueueSetState:function(v,D,Q){v=v._reactInternals;var H=To(),V=vs(v),ne=bl(H,V);ne.payload=D,Q!=null&&(ne.callback=Q),Pl(v,ne),Rl(v,V,H)},enqueueReplaceState:function(v,D,Q){v=v._reactInternals;var H=To(),V=vs(v),ne=bl(H,V);ne.tag=1,ne.payload=D,Q!=null&&(ne.callback=Q),Pl(v,ne),Rl(v,V,H)},enqueueForceUpdate:function(v,D){v=v._reactInternals;var Q=To(),H=vs(v),V=bl(Q,H);V.tag=2,D!=null&&(V.callback=D),Pl(v,V),Rl(v,H,Q)}};function Y(v,D,Q,H,V,ne,Se){return v=v.stateNode,typeof v.shouldComponentUpdate==\"function\"?v.shouldComponentUpdate(H,ne,Se):D.prototype&&D.prototype.isPureReactComponent?!wh(Q,H)||!wh(V,ne):!0}function xt(v,D,Q){var H=!1,V=ca,ne=D.contextType;return typeof ne==\"object\"&&ne!==null?ne=Po(ne):(V=Jn(D)?Oa:ji.current,H=D.contextTypes,ne=(H=H!=null)?dn(v,V):ca),D=new D(Q,ne),v.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=qA,v.stateNode=D,D._reactInternals=v,H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=V,v.__reactInternalMemoizedMaskedChildContext=ne),D}function GA(v,D,Q,H){v=D.state,typeof D.componentWillReceiveProps==\"function\"&&D.componentWillReceiveProps(Q,H),typeof D.UNSAFE_componentWillReceiveProps==\"function\"&&D.UNSAFE_componentWillReceiveProps(Q,H),D.state!==v&&qA.enqueueReplaceState(D,D.state,null)}function xo(v,D,Q,H){var V=v.stateNode;V.props=Q,V.state=v.memoizedState,V.refs=wy,Dh(v);var ne=D.contextType;typeof ne==\"object\"&&ne!==null?V.context=Po(ne):(ne=Jn(D)?Oa:ji.current,V.context=dn(v,ne)),HA(v,Q,V,H),V.state=v.memoizedState,ne=D.getDerivedStateFromProps,typeof ne==\"function\"&&(jA(v,D,ne,Q),V.state=v.memoizedState),typeof D.getDerivedStateFromProps==\"function\"||typeof V.getSnapshotBeforeUpdate==\"function\"||typeof V.UNSAFE_componentWillMount!=\"function\"&&typeof V.componentWillMount!=\"function\"||(D=V.state,typeof V.componentWillMount==\"function\"&&V.componentWillMount(),typeof V.UNSAFE_componentWillMount==\"function\"&&V.UNSAFE_componentWillMount(),D!==V.state&&qA.enqueueReplaceState(V,V.state,null),HA(v,Q,V,H),V.state=v.memoizedState),typeof V.componentDidMount==\"function\"&&(v.flags|=4)}var yf=Array.isArray;function dt(v,D,Q){if(v=Q.ref,v!==null&&typeof v!=\"function\"&&typeof v!=\"object\"){if(Q._owner){if(Q=Q._owner,Q){if(Q.tag!==1)throw Error(c(309));var H=Q.stateNode}if(!H)throw Error(c(147,v));var V=\"\"+v;return D!==null&&D.ref!==null&&typeof D.ref==\"function\"&&D.ref._stringRef===V?D.ref:(D=function(ne){var Se=H.refs;Se===wy&&(Se=H.refs={}),ne===null?delete Se[V]:Se[V]=ne},D._stringRef=V,D)}if(typeof v!=\"string\")throw Error(c(284));if(!Q._owner)throw Error(c(290,v))}return v}function mu(v,D){if(v.type!==\"textarea\")throw Error(c(31,Object.prototype.toString.call(D)===\"[object Object]\"?\"object with keys {\"+Object.keys(D).join(\", \")+\"}\":D))}function By(v){function D($e,qe){if(v){var pt=$e.lastEffect;pt!==null?(pt.nextEffect=qe,$e.lastEffect=qe):$e.firstEffect=$e.lastEffect=qe,qe.nextEffect=null,qe.flags=8}}function Q($e,qe){if(!v)return null;for(;qe!==null;)D($e,qe),qe=qe.sibling;return null}function H($e,qe){for($e=new Map;qe!==null;)qe.key!==null?$e.set(qe.key,qe):$e.set(qe.index,qe),qe=qe.sibling;return $e}function V($e,qe){return $e=bu($e,qe),$e.index=0,$e.sibling=null,$e}function ne($e,qe,pt){return $e.index=pt,v?(pt=$e.alternate,pt!==null?(pt=pt.index,pt<qe?($e.flags=2,qe):pt):($e.flags=2,qe)):qe}function Se($e){return v&&$e.alternate===null&&($e.flags=2),$e}function Ue($e,qe,pt,Zt){return qe===null||qe.tag!==6?(qe=k2(pt,$e.mode,Zt),qe.return=$e,qe):(qe=V(qe,pt),qe.return=$e,qe)}function At($e,qe,pt,Zt){return qe!==null&&qe.elementType===pt.type?(Zt=V(qe,pt.props),Zt.ref=dt($e,qe,pt),Zt.return=$e,Zt):(Zt=od(pt.type,pt.key,pt.props,null,$e.mode,Zt),Zt.ref=dt($e,qe,pt),Zt.return=$e,Zt)}function Gt($e,qe,pt,Zt){return qe===null||qe.tag!==4||qe.stateNode.containerInfo!==pt.containerInfo||qe.stateNode.implementation!==pt.implementation?(qe=Ro(pt,$e.mode,Zt),qe.return=$e,qe):(qe=V(qe,pt.children||[]),qe.return=$e,qe)}function vr($e,qe,pt,Zt,Sr){return qe===null||qe.tag!==7?(qe=Qf(pt,$e.mode,Zt,Sr),qe.return=$e,qe):(qe=V(qe,pt),qe.return=$e,qe)}function Lr($e,qe,pt){if(typeof qe==\"string\"||typeof qe==\"number\")return qe=k2(\"\"+qe,$e.mode,pt),qe.return=$e,qe;if(typeof qe==\"object\"&&qe!==null){switch(qe.$$typeof){case p:return pt=od(qe.type,qe.key,qe.props,null,$e.mode,pt),pt.ref=dt($e,null,qe),pt.return=$e,pt;case h:return qe=Ro(qe,$e.mode,pt),qe.return=$e,qe}if(yf(qe)||Ce(qe))return qe=Qf(qe,$e.mode,pt,null),qe.return=$e,qe;mu($e,qe)}return null}function Xt($e,qe,pt,Zt){var Sr=qe!==null?qe.key:null;if(typeof pt==\"string\"||typeof pt==\"number\")return Sr!==null?null:Ue($e,qe,\"\"+pt,Zt);if(typeof pt==\"object\"&&pt!==null){switch(pt.$$typeof){case p:return pt.key===Sr?pt.type===E?vr($e,qe,pt.props.children,Zt,Sr):At($e,qe,pt,Zt):null;case h:return pt.key===Sr?Gt($e,qe,pt,Zt):null}if(yf(pt)||Ce(pt))return Sr!==null?null:vr($e,qe,pt,Zt,null);mu($e,pt)}return null}function zn($e,qe,pt,Zt,Sr){if(typeof Zt==\"string\"||typeof Zt==\"number\")return $e=$e.get(pt)||null,Ue(qe,$e,\"\"+Zt,Sr);if(typeof Zt==\"object\"&&Zt!==null){switch(Zt.$$typeof){case p:return $e=$e.get(Zt.key===null?pt:Zt.key)||null,Zt.type===E?vr(qe,$e,Zt.props.children,Sr,Zt.key):At(qe,$e,Zt,Sr);case h:return $e=$e.get(Zt.key===null?pt:Zt.key)||null,Gt(qe,$e,Zt,Sr)}if(yf(Zt)||Ce(Zt))return $e=$e.get(pt)||null,vr(qe,$e,Zt,Sr,null);mu(qe,Zt)}return null}function mi($e,qe,pt,Zt){for(var Sr=null,Xn=null,kr=qe,Rn=qe=0,Un=null;kr!==null&&Rn<pt.length;Rn++){kr.index>Rn?(Un=kr,kr=null):Un=kr.sibling;var zr=Xt($e,kr,pt[Rn],Zt);if(zr===null){kr===null&&(kr=Un);break}v&&kr&&zr.alternate===null&&D($e,kr),qe=ne(zr,qe,Rn),Xn===null?Sr=zr:Xn.sibling=zr,Xn=zr,kr=Un}if(Rn===pt.length)return Q($e,kr),Sr;if(kr===null){for(;Rn<pt.length;Rn++)kr=Lr($e,pt[Rn],Zt),kr!==null&&(qe=ne(kr,qe,Rn),Xn===null?Sr=kr:Xn.sibling=kr,Xn=kr);return Sr}for(kr=H($e,kr);Rn<pt.length;Rn++)Un=zn(kr,$e,Rn,pt[Rn],Zt),Un!==null&&(v&&Un.alternate!==null&&kr.delete(Un.key===null?Rn:Un.key),qe=ne(Un,qe,Rn),Xn===null?Sr=Un:Xn.sibling=Un,Xn=Un);return v&&kr.forEach(function(li){return D($e,li)}),Sr}function Za($e,qe,pt,Zt){var Sr=Ce(pt);if(typeof Sr!=\"function\")throw Error(c(150));if(pt=Sr.call(pt),pt==null)throw Error(c(151));for(var Xn=Sr=null,kr=qe,Rn=qe=0,Un=null,zr=pt.next();kr!==null&&!zr.done;Rn++,zr=pt.next()){kr.index>Rn?(Un=kr,kr=null):Un=kr.sibling;var li=Xt($e,kr,zr.value,Zt);if(li===null){kr===null&&(kr=Un);break}v&&kr&&li.alternate===null&&D($e,kr),qe=ne(li,qe,Rn),Xn===null?Sr=li:Xn.sibling=li,Xn=li,kr=Un}if(zr.done)return Q($e,kr),Sr;if(kr===null){for(;!zr.done;Rn++,zr=pt.next())zr=Lr($e,zr.value,Zt),zr!==null&&(qe=ne(zr,qe,Rn),Xn===null?Sr=zr:Xn.sibling=zr,Xn=zr);return Sr}for(kr=H($e,kr);!zr.done;Rn++,zr=pt.next())zr=zn(kr,$e,Rn,zr.value,Zt),zr!==null&&(v&&zr.alternate!==null&&kr.delete(zr.key===null?Rn:zr.key),qe=ne(zr,qe,Rn),Xn===null?Sr=zr:Xn.sibling=zr,Xn=zr);return v&&kr.forEach(function(Pu){return D($e,Pu)}),Sr}return function($e,qe,pt,Zt){var Sr=typeof pt==\"object\"&&pt!==null&&pt.type===E&&pt.key===null;Sr&&(pt=pt.props.children);var Xn=typeof pt==\"object\"&&pt!==null;if(Xn)switch(pt.$$typeof){case p:e:{for(Xn=pt.key,Sr=qe;Sr!==null;){if(Sr.key===Xn){switch(Sr.tag){case 7:if(pt.type===E){Q($e,Sr.sibling),qe=V(Sr,pt.props.children),qe.return=$e,$e=qe;break e}break;default:if(Sr.elementType===pt.type){Q($e,Sr.sibling),qe=V(Sr,pt.props),qe.ref=dt($e,Sr,pt),qe.return=$e,$e=qe;break e}}Q($e,Sr);break}else D($e,Sr);Sr=Sr.sibling}pt.type===E?(qe=Qf(pt.props.children,$e.mode,Zt,pt.key),qe.return=$e,$e=qe):(Zt=od(pt.type,pt.key,pt.props,null,$e.mode,Zt),Zt.ref=dt($e,qe,pt),Zt.return=$e,$e=Zt)}return Se($e);case h:e:{for(Sr=pt.key;qe!==null;){if(qe.key===Sr)if(qe.tag===4&&qe.stateNode.containerInfo===pt.containerInfo&&qe.stateNode.implementation===pt.implementation){Q($e,qe.sibling),qe=V(qe,pt.children||[]),qe.return=$e,$e=qe;break e}else{Q($e,qe);break}else D($e,qe);qe=qe.sibling}qe=Ro(pt,$e.mode,Zt),qe.return=$e,$e=qe}return Se($e)}if(typeof pt==\"string\"||typeof pt==\"number\")return pt=\"\"+pt,qe!==null&&qe.tag===6?(Q($e,qe.sibling),qe=V(qe,pt),qe.return=$e,$e=qe):(Q($e,qe),qe=k2(pt,$e.mode,Zt),qe.return=$e,$e=qe),Se($e);if(yf(pt))return mi($e,qe,pt,Zt);if(Ce(pt))return Za($e,qe,pt,Zt);if(Xn&&mu($e,pt),typeof pt>\"u\"&&!Sr)switch($e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(c(152,g($e.type)||\"Component\"))}return Q($e,qe)}}var _g=By(!0),n2=By(!1),bh={},ur=io(bh),zi=io(bh),Ef=io(bh);function Wa(v){if(v===bh)throw Error(c(174));return v}function Ug(v,D){xn(Ef,D),xn(zi,v),xn(ur,bh),v=gt(D),Rt(ur),xn(ur,v)}function yu(){Rt(ur),Rt(zi),Rt(Ef)}function If(v){var D=Wa(Ef.current),Q=Wa(ur.current);D=j(Q,v.type,D),Q!==D&&(xn(zi,v),xn(ur,D))}function wt(v){zi.current===v&&(Rt(ur),Rt(zi))}var gi=io(0);function WA(v){for(var D=v;D!==null;){if(D.tag===13){var Q=D.memoizedState;if(Q!==null&&(Q=Q.dehydrated,Q===null||gr(Q)||So(Q)))return D}else if(D.tag===19&&D.memoizedProps.revealOrder!==void 0){if(D.flags&64)return D}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===v)break;for(;D.sibling===null;){if(D.return===null||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}return null}var Ya=null,pa=null,Va=!1;function Hg(v,D){var Q=za(5,null,null,0);Q.elementType=\"DELETED\",Q.type=\"DELETED\",Q.stateNode=D,Q.return=v,Q.flags=8,v.lastEffect!==null?(v.lastEffect.nextEffect=Q,v.lastEffect=Q):v.firstEffect=v.lastEffect=Q}function Ph(v,D){switch(v.tag){case 5:return D=la(D,v.type,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 6:return D=OA(D,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 13:return!1;default:return!1}}function jg(v){if(Va){var D=pa;if(D){var Q=D;if(!Ph(v,D)){if(D=Me(Q),!D||!Ph(v,D)){v.flags=v.flags&-1025|2,Va=!1,Ya=v;return}Hg(Ya,Q)}Ya=v,pa=fu(D)}else v.flags=v.flags&-1025|2,Va=!1,Ya=v}}function vy(v){for(v=v.return;v!==null&&v.tag!==5&&v.tag!==3&&v.tag!==13;)v=v.return;Ya=v}function YA(v){if(!Z||v!==Ya)return!1;if(!Va)return vy(v),Va=!0,!1;var D=v.type;if(v.tag!==5||D!==\"head\"&&D!==\"body\"&&!it(D,v.memoizedProps))for(D=pa;D;)Hg(v,D),D=Me(D);if(vy(v),v.tag===13){if(!Z)throw Error(c(316));if(v=v.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(c(317));pa=LA(v)}else pa=Ya?Me(v.stateNode):null;return!0}function qg(){Z&&(pa=Ya=null,Va=!1)}var Eu=[];function Iu(){for(var v=0;v<Eu.length;v++){var D=Eu[v];y?D._workInProgressVersionPrimary=null:D._workInProgressVersionSecondary=null}Eu.length=0}var Cf=f.ReactCurrentDispatcher,Fs=f.ReactCurrentBatchConfig,Cu=0,qn=null,is=null,xi=null,VA=!1,wf=!1;function mn(){throw Error(c(321))}function Gg(v,D){if(D===null)return!1;for(var Q=0;Q<D.length&&Q<v.length;Q++)if(!Do(v[Q],D[Q]))return!1;return!0}function Wg(v,D,Q,H,V,ne){if(Cu=ne,qn=D,D.memoizedState=null,D.updateQueue=null,D.lanes=0,Cf.current=v===null||v.memoizedState===null?O:J,v=Q(H,V),wf){ne=0;do{if(wf=!1,!(25>ne))throw Error(c(301));ne+=1,xi=is=null,D.updateQueue=null,Cf.current=re,v=Q(H,V)}while(wf)}if(Cf.current=kt,D=is!==null&&is.next!==null,Cu=0,xi=is=qn=null,VA=!1,D)throw Error(c(300));return v}function ss(){var v={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xi===null?qn.memoizedState=xi=v:xi=xi.next=v,xi}function xl(){if(is===null){var v=qn.alternate;v=v!==null?v.memoizedState:null}else v=is.next;var D=xi===null?qn.memoizedState:xi.next;if(D!==null)xi=D,is=v;else{if(v===null)throw Error(c(310));is=v,v={memoizedState:is.memoizedState,baseState:is.baseState,baseQueue:is.baseQueue,queue:is.queue,next:null},xi===null?qn.memoizedState=xi=v:xi=xi.next=v}return xi}function ko(v,D){return typeof D==\"function\"?D(v):D}function Bf(v){var D=xl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=is,V=H.baseQueue,ne=Q.pending;if(ne!==null){if(V!==null){var Se=V.next;V.next=ne.next,ne.next=Se}H.baseQueue=V=ne,Q.pending=null}if(V!==null){V=V.next,H=H.baseState;var Ue=Se=ne=null,At=V;do{var Gt=At.lane;if((Cu&Gt)===Gt)Ue!==null&&(Ue=Ue.next={lane:0,action:At.action,eagerReducer:At.eagerReducer,eagerState:At.eagerState,next:null}),H=At.eagerReducer===v?At.eagerState:v(H,At.action);else{var vr={lane:Gt,action:At.action,eagerReducer:At.eagerReducer,eagerState:At.eagerState,next:null};Ue===null?(Se=Ue=vr,ne=H):Ue=Ue.next=vr,qn.lanes|=Gt,$g|=Gt}At=At.next}while(At!==null&&At!==V);Ue===null?ne=H:Ue.next=Se,Do(H,D.memoizedState)||(Ke=!0),D.memoizedState=H,D.baseState=ne,D.baseQueue=Ue,Q.lastRenderedState=H}return[D.memoizedState,Q.dispatch]}function vf(v){var D=xl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=Q.dispatch,V=Q.pending,ne=D.memoizedState;if(V!==null){Q.pending=null;var Se=V=V.next;do ne=v(ne,Se.action),Se=Se.next;while(Se!==V);Do(ne,D.memoizedState)||(Ke=!0),D.memoizedState=ne,D.baseQueue===null&&(D.baseState=ne),Q.lastRenderedState=ne}return[ne,H]}function kl(v,D,Q){var H=D._getVersion;H=H(D._source);var V=y?D._workInProgressVersionPrimary:D._workInProgressVersionSecondary;if(V!==null?v=V===H:(v=v.mutableReadLanes,(v=(Cu&v)===v)&&(y?D._workInProgressVersionPrimary=H:D._workInProgressVersionSecondary=H,Eu.push(D))),v)return Q(D._source);throw Eu.push(D),Error(c(350))}function yn(v,D,Q,H){var V=oo;if(V===null)throw Error(c(349));var ne=D._getVersion,Se=ne(D._source),Ue=Cf.current,At=Ue.useState(function(){return kl(V,D,Q)}),Gt=At[1],vr=At[0];At=xi;var Lr=v.memoizedState,Xt=Lr.refs,zn=Xt.getSnapshot,mi=Lr.source;Lr=Lr.subscribe;var Za=qn;return v.memoizedState={refs:Xt,source:D,subscribe:H},Ue.useEffect(function(){Xt.getSnapshot=Q,Xt.setSnapshot=Gt;var $e=ne(D._source);if(!Do(Se,$e)){$e=Q(D._source),Do(vr,$e)||(Gt($e),$e=vs(Za),V.mutableReadLanes|=$e&V.pendingLanes),$e=V.mutableReadLanes,V.entangledLanes|=$e;for(var qe=V.entanglements,pt=$e;0<pt;){var Zt=31-ns(pt),Sr=1<<Zt;qe[Zt]|=$e,pt&=~Sr}}},[Q,D,H]),Ue.useEffect(function(){return H(D._source,function(){var $e=Xt.getSnapshot,qe=Xt.setSnapshot;try{qe($e(D._source));var pt=vs(Za);V.mutableReadLanes|=pt&V.pendingLanes}catch(Zt){qe(function(){throw Zt})}})},[D,H]),Do(zn,Q)&&Do(mi,D)&&Do(Lr,H)||(v={pending:null,dispatch:null,lastRenderedReducer:ko,lastRenderedState:vr},v.dispatch=Gt=Th.bind(null,qn,v),At.queue=v,At.baseQueue=null,vr=kl(V,D,Q),At.memoizedState=At.baseState=vr),vr}function Qo(v,D,Q){var H=xl();return yn(H,v,D,Q)}function wu(v){var D=ss();return typeof v==\"function\"&&(v=v()),D.memoizedState=D.baseState=v,v=D.queue={pending:null,dispatch:null,lastRenderedReducer:ko,lastRenderedState:v},v=v.dispatch=Th.bind(null,qn,v),[D.memoizedState,v]}function ha(v,D,Q,H){return v={tag:v,create:D,destroy:Q,deps:H,next:null},D=qn.updateQueue,D===null?(D={lastEffect:null},qn.updateQueue=D,D.lastEffect=v.next=v):(Q=D.lastEffect,Q===null?D.lastEffect=v.next=v:(H=Q.next,Q.next=v,v.next=H,D.lastEffect=v)),v}function Ns(v){var D=ss();return v={current:v},D.memoizedState=v}function xh(){return xl().memoizedState}function KA(v,D,Q,H){var V=ss();qn.flags|=v,V.memoizedState=ha(1|D,Q,void 0,H===void 0?null:H)}function Sf(v,D,Q,H){var V=xl();H=H===void 0?null:H;var ne=void 0;if(is!==null){var Se=is.memoizedState;if(ne=Se.destroy,H!==null&&Gg(H,Se.deps)){ha(D,Q,ne,H);return}}qn.flags|=v,V.memoizedState=ha(1|D,Q,ne,H)}function so(v,D){return KA(516,4,v,D)}function Xr(v,D){return Sf(516,4,v,D)}function kh(v,D){return Sf(4,2,v,D)}function JA(v,D){if(typeof D==\"function\")return v=v(),D(v),function(){D(null)};if(D!=null)return v=v(),D.current=v,function(){D.current=null}}function Sy(v,D,Q){return Q=Q!=null?Q.concat([v]):null,Sf(4,2,JA.bind(null,D,v),Q)}function Yg(){}function Qh(v,D){var Q=xl();D=D===void 0?null:D;var H=Q.memoizedState;return H!==null&&D!==null&&Gg(D,H[1])?H[0]:(Q.memoizedState=[v,D],v)}function hc(v,D){var Q=xl();D=D===void 0?null:D;var H=Q.memoizedState;return H!==null&&D!==null&&Gg(D,H[1])?H[0]:(v=v(),Q.memoizedState=[v,D],v)}function Dy(v,D){var Q=tr();ai(98>Q?98:Q,function(){v(!0)}),ai(97<Q?97:Q,function(){var H=Fs.transition;Fs.transition=1;try{v(!1),D()}finally{Fs.transition=H}})}function Th(v,D,Q){var H=To(),V=vs(v),ne={lane:V,action:Q,eagerReducer:null,eagerState:null,next:null},Se=D.pending;if(Se===null?ne.next=ne:(ne.next=Se.next,Se.next=ne),D.pending=ne,Se=v.alternate,v===qn||Se!==null&&Se===qn)wf=VA=!0;else{if(v.lanes===0&&(Se===null||Se.lanes===0)&&(Se=D.lastRenderedReducer,Se!==null))try{var Ue=D.lastRenderedState,At=Se(Ue,Q);if(ne.eagerReducer=Se,ne.eagerState=At,Do(At,Ue))return}catch{}finally{}Rl(v,V,H)}}var kt={readContext:Po,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useLayoutEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useMutableSource:mn,useOpaqueIdentifier:mn,unstable_isNewReconciler:!1},O={readContext:Po,useCallback:function(v,D){return ss().memoizedState=[v,D===void 0?null:D],v},useContext:Po,useEffect:so,useImperativeHandle:function(v,D,Q){return Q=Q!=null?Q.concat([v]):null,KA(4,2,JA.bind(null,D,v),Q)},useLayoutEffect:function(v,D){return KA(4,2,v,D)},useMemo:function(v,D){var Q=ss();return D=D===void 0?null:D,v=v(),Q.memoizedState=[v,D],v},useReducer:function(v,D,Q){var H=ss();return D=Q!==void 0?Q(D):D,H.memoizedState=H.baseState=D,v=H.queue={pending:null,dispatch:null,lastRenderedReducer:v,lastRenderedState:D},v=v.dispatch=Th.bind(null,qn,v),[H.memoizedState,v]},useRef:Ns,useState:wu,useDebugValue:Yg,useDeferredValue:function(v){var D=wu(v),Q=D[0],H=D[1];return so(function(){var V=Fs.transition;Fs.transition=1;try{H(v)}finally{Fs.transition=V}},[v]),Q},useTransition:function(){var v=wu(!1),D=v[0];return v=Dy.bind(null,v[1]),Ns(v),[v,D]},useMutableSource:function(v,D,Q){var H=ss();return H.memoizedState={refs:{getSnapshot:D,setSnapshot:null},source:v,subscribe:Q},yn(H,v,D,Q)},useOpaqueIdentifier:function(){if(Va){var v=!1,D=oe(function(){throw v||(v=!0,Q(xe())),Error(c(355))}),Q=wu(D)[1];return!(qn.mode&2)&&(qn.flags|=516,ha(5,function(){Q(xe())},void 0,null)),D}return D=xe(),wu(D),D},unstable_isNewReconciler:!1},J={readContext:Po,useCallback:Qh,useContext:Po,useEffect:Xr,useImperativeHandle:Sy,useLayoutEffect:kh,useMemo:hc,useReducer:Bf,useRef:xh,useState:function(){return Bf(ko)},useDebugValue:Yg,useDeferredValue:function(v){var D=Bf(ko),Q=D[0],H=D[1];return Xr(function(){var V=Fs.transition;Fs.transition=1;try{H(v)}finally{Fs.transition=V}},[v]),Q},useTransition:function(){var v=Bf(ko)[0];return[xh().current,v]},useMutableSource:Qo,useOpaqueIdentifier:function(){return Bf(ko)[0]},unstable_isNewReconciler:!1},re={readContext:Po,useCallback:Qh,useContext:Po,useEffect:Xr,useImperativeHandle:Sy,useLayoutEffect:kh,useMemo:hc,useReducer:vf,useRef:xh,useState:function(){return vf(ko)},useDebugValue:Yg,useDeferredValue:function(v){var D=vf(ko),Q=D[0],H=D[1];return Xr(function(){var V=Fs.transition;Fs.transition=1;try{H(v)}finally{Fs.transition=V}},[v]),Q},useTransition:function(){var v=vf(ko)[0];return[xh().current,v]},useMutableSource:Qo,useOpaqueIdentifier:function(){return vf(ko)[0]},unstable_isNewReconciler:!1},de=f.ReactCurrentOwner,Ke=!1;function ft(v,D,Q,H){D.child=v===null?n2(D,null,Q,H):_g(D,v.child,Q,H)}function dr(v,D,Q,H,V){Q=Q.render;var ne=D.ref;return mf(D,V),H=Wg(v,D,Q,H,ne,V),v!==null&&!Ke?(D.updateQueue=v.updateQueue,D.flags&=-517,v.lanes&=~V,Gn(v,D,V)):(D.flags|=1,ft(v,D,H,V),D.child)}function Br(v,D,Q,H,V,ne){if(v===null){var Se=Q.type;return typeof Se==\"function\"&&!P2(Se)&&Se.defaultProps===void 0&&Q.compare===null&&Q.defaultProps===void 0?(D.tag=15,D.type=Se,_n(v,D,Se,H,V,ne)):(v=od(Q.type,null,H,D,D.mode,ne),v.ref=D.ref,v.return=D,D.child=v)}return Se=v.child,!(V&ne)&&(V=Se.memoizedProps,Q=Q.compare,Q=Q!==null?Q:wh,Q(V,H)&&v.ref===D.ref)?Gn(v,D,ne):(D.flags|=1,v=bu(Se,H),v.ref=D.ref,v.return=D,D.child=v)}function _n(v,D,Q,H,V,ne){if(v!==null&&wh(v.memoizedProps,H)&&v.ref===D.ref)if(Ke=!1,(ne&V)!==0)v.flags&16384&&(Ke=!0);else return D.lanes=v.lanes,Gn(v,D,ne);return zA(v,D,Q,H,ne)}function di(v,D,Q){var H=D.pendingProps,V=H.children,ne=v!==null?v.memoizedState:null;if(H.mode===\"hidden\"||H.mode===\"unstable-defer-without-hiding\")if(!(D.mode&4))D.memoizedState={baseLanes:0},Gy(D,Q);else if(Q&1073741824)D.memoizedState={baseLanes:0},Gy(D,ne!==null?ne.baseLanes:Q);else return v=ne!==null?ne.baseLanes|Q:Q,D.lanes=D.childLanes=1073741824,D.memoizedState={baseLanes:v},Gy(D,v),null;else ne!==null?(H=ne.baseLanes|Q,D.memoizedState=null):H=Q,Gy(D,H);return ft(v,D,V,Q),D.child}function ws(v,D){var Q=D.ref;(v===null&&Q!==null||v!==null&&v.ref!==Q)&&(D.flags|=128)}function zA(v,D,Q,H,V){var ne=Jn(Q)?Oa:ji.current;return ne=dn(D,ne),mf(D,V),Q=Wg(v,D,Q,H,ne,V),v!==null&&!Ke?(D.updateQueue=v.updateQueue,D.flags&=-517,v.lanes&=~V,Gn(v,D,V)):(D.flags|=1,ft(v,D,Q,V),D.child)}function wP(v,D,Q,H,V){if(Jn(Q)){var ne=!0;Ma(D)}else ne=!1;if(mf(D,V),D.stateNode===null)v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),xt(D,Q,H),xo(D,Q,H,V),H=!0;else if(v===null){var Se=D.stateNode,Ue=D.memoizedProps;Se.props=Ue;var At=Se.context,Gt=Q.contextType;typeof Gt==\"object\"&&Gt!==null?Gt=Po(Gt):(Gt=Jn(Q)?Oa:ji.current,Gt=dn(D,Gt));var vr=Q.getDerivedStateFromProps,Lr=typeof vr==\"function\"||typeof Se.getSnapshotBeforeUpdate==\"function\";Lr||typeof Se.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof Se.componentWillReceiveProps!=\"function\"||(Ue!==H||At!==Gt)&&GA(D,Se,H,Gt),Dl=!1;var Xt=D.memoizedState;Se.state=Xt,HA(D,H,Se,V),At=D.memoizedState,Ue!==H||Xt!==At||Oi.current||Dl?(typeof vr==\"function\"&&(jA(D,Q,vr,H),At=D.memoizedState),(Ue=Dl||Y(D,Q,Ue,H,Xt,At,Gt))?(Lr||typeof Se.UNSAFE_componentWillMount!=\"function\"&&typeof Se.componentWillMount!=\"function\"||(typeof Se.componentWillMount==\"function\"&&Se.componentWillMount(),typeof Se.UNSAFE_componentWillMount==\"function\"&&Se.UNSAFE_componentWillMount()),typeof Se.componentDidMount==\"function\"&&(D.flags|=4)):(typeof Se.componentDidMount==\"function\"&&(D.flags|=4),D.memoizedProps=H,D.memoizedState=At),Se.props=H,Se.state=At,Se.context=Gt,H=Ue):(typeof Se.componentDidMount==\"function\"&&(D.flags|=4),H=!1)}else{Se=D.stateNode,Mg(v,D),Ue=D.memoizedProps,Gt=D.type===D.elementType?Ue:bo(D.type,Ue),Se.props=Gt,Lr=D.pendingProps,Xt=Se.context,At=Q.contextType,typeof At==\"object\"&&At!==null?At=Po(At):(At=Jn(Q)?Oa:ji.current,At=dn(D,At));var zn=Q.getDerivedStateFromProps;(vr=typeof zn==\"function\"||typeof Se.getSnapshotBeforeUpdate==\"function\")||typeof Se.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof Se.componentWillReceiveProps!=\"function\"||(Ue!==Lr||Xt!==At)&&GA(D,Se,H,At),Dl=!1,Xt=D.memoizedState,Se.state=Xt,HA(D,H,Se,V);var mi=D.memoizedState;Ue!==Lr||Xt!==mi||Oi.current||Dl?(typeof zn==\"function\"&&(jA(D,Q,zn,H),mi=D.memoizedState),(Gt=Dl||Y(D,Q,Gt,H,Xt,mi,At))?(vr||typeof Se.UNSAFE_componentWillUpdate!=\"function\"&&typeof Se.componentWillUpdate!=\"function\"||(typeof Se.componentWillUpdate==\"function\"&&Se.componentWillUpdate(H,mi,At),typeof Se.UNSAFE_componentWillUpdate==\"function\"&&Se.UNSAFE_componentWillUpdate(H,mi,At)),typeof Se.componentDidUpdate==\"function\"&&(D.flags|=4),typeof Se.getSnapshotBeforeUpdate==\"function\"&&(D.flags|=256)):(typeof Se.componentDidUpdate!=\"function\"||Ue===v.memoizedProps&&Xt===v.memoizedState||(D.flags|=4),typeof Se.getSnapshotBeforeUpdate!=\"function\"||Ue===v.memoizedProps&&Xt===v.memoizedState||(D.flags|=256),D.memoizedProps=H,D.memoizedState=mi),Se.props=H,Se.state=mi,Se.context=At,H=Gt):(typeof Se.componentDidUpdate!=\"function\"||Ue===v.memoizedProps&&Xt===v.memoizedState||(D.flags|=4),typeof Se.getSnapshotBeforeUpdate!=\"function\"||Ue===v.memoizedProps&&Xt===v.memoizedState||(D.flags|=256),H=!1)}return i2(v,D,Q,H,ne,V)}function i2(v,D,Q,H,V,ne){ws(v,D);var Se=(D.flags&64)!==0;if(!H&&!Se)return V&&Ua(D,Q,!1),Gn(v,D,ne);H=D.stateNode,de.current=D;var Ue=Se&&typeof Q.getDerivedStateFromError!=\"function\"?null:H.render();return D.flags|=1,v!==null&&Se?(D.child=_g(D,v.child,null,ne),D.child=_g(D,null,Ue,ne)):ft(v,D,Ue,ne),D.memoizedState=H.state,V&&Ua(D,Q,!0),D.child}function by(v){var D=v.stateNode;D.pendingContext?Ch(v,D.pendingContext,D.pendingContext!==D.context):D.context&&Ch(v,D.context,!1),Ug(v,D.containerInfo)}var Rh={dehydrated:null,retryLane:0};function s2(v,D,Q){var H=D.pendingProps,V=gi.current,ne=!1,Se;return(Se=(D.flags&64)!==0)||(Se=v!==null&&v.memoizedState===null?!1:(V&2)!==0),Se?(ne=!0,D.flags&=-65):v!==null&&v.memoizedState===null||H.fallback===void 0||H.unstable_avoidThisFallback===!0||(V|=1),xn(gi,V&1),v===null?(H.fallback!==void 0&&jg(D),v=H.children,V=H.fallback,ne?(v=Ka(D,v,V,Q),D.child.memoizedState={baseLanes:Q},D.memoizedState=Rh,v):typeof H.unstable_expectedLoadTime==\"number\"?(v=Ka(D,v,V,Q),D.child.memoizedState={baseLanes:Q},D.memoizedState=Rh,D.lanes=33554432,v):(Q=x2({mode:\"visible\",children:v},D.mode,Q,null),Q.return=D,D.child=Q)):v.memoizedState!==null?ne?(H=ZA(v,D,H.children,H.fallback,Q),ne=D.child,V=v.child.memoizedState,ne.memoizedState=V===null?{baseLanes:Q}:{baseLanes:V.baseLanes|Q},ne.childLanes=v.childLanes&~Q,D.memoizedState=Rh,H):(Q=o2(v,D,H.children,Q),D.memoizedState=null,Q):ne?(H=ZA(v,D,H.children,H.fallback,Q),ne=D.child,V=v.child.memoizedState,ne.memoizedState=V===null?{baseLanes:Q}:{baseLanes:V.baseLanes|Q},ne.childLanes=v.childLanes&~Q,D.memoizedState=Rh,H):(Q=o2(v,D,H.children,Q),D.memoizedState=null,Q)}function Ka(v,D,Q,H){var V=v.mode,ne=v.child;return D={mode:\"hidden\",children:D},!(V&2)&&ne!==null?(ne.childLanes=0,ne.pendingProps=D):ne=x2(D,V,0,null),Q=Qf(Q,V,H,null),ne.return=v,Q.return=v,ne.sibling=Q,v.child=ne,Q}function o2(v,D,Q,H){var V=v.child;return v=V.sibling,Q=bu(V,{mode:\"visible\",children:Q}),!(D.mode&2)&&(Q.lanes=H),Q.return=D,Q.sibling=null,v!==null&&(v.nextEffect=null,v.flags=8,D.firstEffect=D.lastEffect=v),D.child=Q}function ZA(v,D,Q,H,V){var ne=D.mode,Se=v.child;v=Se.sibling;var Ue={mode:\"hidden\",children:Q};return!(ne&2)&&D.child!==Se?(Q=D.child,Q.childLanes=0,Q.pendingProps=Ue,Se=Q.lastEffect,Se!==null?(D.firstEffect=Q.firstEffect,D.lastEffect=Se,Se.nextEffect=null):D.firstEffect=D.lastEffect=null):Q=bu(Se,Ue),v!==null?H=bu(v,H):(H=Qf(H,ne,V,null),H.flags|=2),H.return=D,Q.return=D,Q.sibling=H,D.child=Q,H}function Fh(v,D){v.lanes|=D;var Q=v.alternate;Q!==null&&(Q.lanes|=D),Ey(v.return,D)}function Py(v,D,Q,H,V,ne){var Se=v.memoizedState;Se===null?v.memoizedState={isBackwards:D,rendering:null,renderingStartTime:0,last:H,tail:Q,tailMode:V,lastEffect:ne}:(Se.isBackwards=D,Se.rendering=null,Se.renderingStartTime=0,Se.last=H,Se.tail=Q,Se.tailMode=V,Se.lastEffect=ne)}function BP(v,D,Q){var H=D.pendingProps,V=H.revealOrder,ne=H.tail;if(ft(v,D,H.children,Q),H=gi.current,H&2)H=H&1|2,D.flags|=64;else{if(v!==null&&v.flags&64)e:for(v=D.child;v!==null;){if(v.tag===13)v.memoizedState!==null&&Fh(v,Q);else if(v.tag===19)Fh(v,Q);else if(v.child!==null){v.child.return=v,v=v.child;continue}if(v===D)break e;for(;v.sibling===null;){if(v.return===null||v.return===D)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}H&=1}if(xn(gi,H),!(D.mode&2))D.memoizedState=null;else switch(V){case\"forwards\":for(Q=D.child,V=null;Q!==null;)v=Q.alternate,v!==null&&WA(v)===null&&(V=Q),Q=Q.sibling;Q=V,Q===null?(V=D.child,D.child=null):(V=Q.sibling,Q.sibling=null),Py(D,!1,V,Q,ne,D.lastEffect);break;case\"backwards\":for(Q=null,V=D.child,D.child=null;V!==null;){if(v=V.alternate,v!==null&&WA(v)===null){D.child=V;break}v=V.sibling,V.sibling=Q,Q=V,V=v}Py(D,!0,Q,null,ne,D.lastEffect);break;case\"together\":Py(D,!1,null,null,void 0,D.lastEffect);break;default:D.memoizedState=null}return D.child}function Gn(v,D,Q){if(v!==null&&(D.dependencies=v.dependencies),$g|=D.lanes,Q&D.childLanes){if(v!==null&&D.child!==v.child)throw Error(c(153));if(D.child!==null){for(v=D.child,Q=bu(v,v.pendingProps),D.child=Q,Q.return=D;v.sibling!==null;)v=v.sibling,Q=Q.sibling=bu(v,v.pendingProps),Q.return=D;Q.sibling=null}return D.child}return null}function os(v){v.flags|=4}var Ql,Tl,Bu,ga;if(F)Ql=function(v,D){for(var Q=D.child;Q!==null;){if(Q.tag===5||Q.tag===6)Pe(v,Q.stateNode);else if(Q.tag!==4&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}},Tl=function(){},Bu=function(v,D,Q,H,V){if(v=v.memoizedProps,v!==H){var ne=D.stateNode,Se=Wa(ur.current);Q=ke(ne,Q,v,H,V,Se),(D.updateQueue=Q)&&os(D)}},ga=function(v,D,Q,H){Q!==H&&os(D)};else if(z){Ql=function(v,D,Q,H){for(var V=D.child;V!==null;){if(V.tag===5){var ne=V.stateNode;Q&&H&&(ne=NA(ne,V.type,V.memoizedProps,V)),Pe(v,ne)}else if(V.tag===6)ne=V.stateNode,Q&&H&&(ne=aa(ne,V.memoizedProps,V)),Pe(v,ne);else if(V.tag!==4){if(V.tag===13&&V.flags&4&&(ne=V.memoizedState!==null)){var Se=V.child;if(Se!==null&&(Se.child!==null&&(Se.child.return=Se,Ql(v,Se,!0,ne)),ne=Se.sibling,ne!==null)){ne.return=V,V=ne;continue}}if(V.child!==null){V.child.return=V,V=V.child;continue}}if(V===D)break;for(;V.sibling===null;){if(V.return===null||V.return===D)return;V=V.return}V.sibling.return=V.return,V=V.sibling}};var XA=function(v,D,Q,H){for(var V=D.child;V!==null;){if(V.tag===5){var ne=V.stateNode;Q&&H&&(ne=NA(ne,V.type,V.memoizedProps,V)),cu(v,ne)}else if(V.tag===6)ne=V.stateNode,Q&&H&&(ne=aa(ne,V.memoizedProps,V)),cu(v,ne);else if(V.tag!==4){if(V.tag===13&&V.flags&4&&(ne=V.memoizedState!==null)){var Se=V.child;if(Se!==null&&(Se.child!==null&&(Se.child.return=Se,XA(v,Se,!0,ne)),ne=Se.sibling,ne!==null)){ne.return=V,V=ne;continue}}if(V.child!==null){V.child.return=V,V=V.child;continue}}if(V===D)break;for(;V.sibling===null;){if(V.return===null||V.return===D)return;V=V.return}V.sibling.return=V.return,V=V.sibling}};Tl=function(v){var D=v.stateNode;if(v.firstEffect!==null){var Q=D.containerInfo,H=lu(Q);XA(H,v,!1,!1),D.pendingChildren=H,os(v),uu(Q,H)}},Bu=function(v,D,Q,H,V){var ne=v.stateNode,Se=v.memoizedProps;if((v=D.firstEffect===null)&&Se===H)D.stateNode=ne;else{var Ue=D.stateNode,At=Wa(ur.current),Gt=null;Se!==H&&(Gt=ke(Ue,Q,Se,H,V,At)),v&&Gt===null?D.stateNode=ne:(ne=no(ne,Gt,Q,Se,H,D,v,Ue),Ye(ne,Q,H,V,At)&&os(D),D.stateNode=ne,v?os(D):Ql(ne,D,!1,!1))}},ga=function(v,D,Q,H){Q!==H?(v=Wa(Ef.current),Q=Wa(ur.current),D.stateNode=_e(H,v,Q,D),os(D)):D.stateNode=v.stateNode}}else Tl=function(){},Bu=function(){},ga=function(){};function $A(v,D){if(!Va)switch(v.tailMode){case\"hidden\":D=v.tail;for(var Q=null;D!==null;)D.alternate!==null&&(Q=D),D=D.sibling;Q===null?v.tail=null:Q.sibling=null;break;case\"collapsed\":Q=v.tail;for(var H=null;Q!==null;)Q.alternate!==null&&(H=Q),Q=Q.sibling;H===null?D||v.tail===null?v.tail=null:v.tail.sibling=null:H.sibling=null}}function XL(v,D,Q){var H=D.pendingProps;switch(D.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Jn(D.type)&&hu(),null;case 3:return yu(),Rt(Oi),Rt(ji),Iu(),H=D.stateNode,H.pendingContext&&(H.context=H.pendingContext,H.pendingContext=null),(v===null||v.child===null)&&(YA(D)?os(D):H.hydrate||(D.flags|=256)),Tl(D),null;case 5:wt(D);var V=Wa(Ef.current);if(Q=D.type,v!==null&&D.stateNode!=null)Bu(v,D,Q,H,V),v.ref!==D.ref&&(D.flags|=128);else{if(!H){if(D.stateNode===null)throw Error(c(166));return null}if(v=Wa(ur.current),YA(D)){if(!Z)throw Error(c(175));v=Cr(D.stateNode,D.type,D.memoizedProps,V,v,D),D.updateQueue=v,v!==null&&os(D)}else{var ne=Ne(Q,H,V,v,D);Ql(ne,D,!1,!1),D.stateNode=ne,Ye(ne,Q,H,V,v)&&os(D)}D.ref!==null&&(D.flags|=128)}return null;case 6:if(v&&D.stateNode!=null)ga(v,D,v.memoizedProps,H);else{if(typeof H!=\"string\"&&D.stateNode===null)throw Error(c(166));if(v=Wa(Ef.current),V=Wa(ur.current),YA(D)){if(!Z)throw Error(c(176));hf(D.stateNode,D.memoizedProps,D)&&os(D)}else D.stateNode=_e(H,v,V,D)}return null;case 13:return Rt(gi),H=D.memoizedState,D.flags&64?(D.lanes=Q,D):(H=H!==null,V=!1,v===null?D.memoizedProps.fallback!==void 0&&YA(D):V=v.memoizedState!==null,H&&!V&&D.mode&2&&(v===null&&D.memoizedProps.unstable_avoidThisFallback!==!0||gi.current&1?Bs===0&&(Bs=3):((Bs===0||Bs===3)&&(Bs=4),oo===null||!($g&134217727)&&!(Lh&134217727)||Mh(oo,Os))),z&&H&&(D.flags|=4),F&&(H||V)&&(D.flags|=4),null);case 4:return yu(),Tl(D),v===null&&Et(D.stateNode.containerInfo),null;case 10:return Lg(D),null;case 17:return Jn(D.type)&&hu(),null;case 19:if(Rt(gi),H=D.memoizedState,H===null)return null;if(V=(D.flags&64)!==0,ne=H.rendering,ne===null)if(V)$A(H,!1);else{if(Bs!==0||v!==null&&v.flags&64)for(v=D.child;v!==null;){if(ne=WA(v),ne!==null){for(D.flags|=64,$A(H,!1),v=ne.updateQueue,v!==null&&(D.updateQueue=v,D.flags|=4),H.lastEffect===null&&(D.firstEffect=null),D.lastEffect=H.lastEffect,v=Q,H=D.child;H!==null;)V=H,Q=v,V.flags&=2,V.nextEffect=null,V.firstEffect=null,V.lastEffect=null,ne=V.alternate,ne===null?(V.childLanes=0,V.lanes=Q,V.child=null,V.memoizedProps=null,V.memoizedState=null,V.updateQueue=null,V.dependencies=null,V.stateNode=null):(V.childLanes=ne.childLanes,V.lanes=ne.lanes,V.child=ne.child,V.memoizedProps=ne.memoizedProps,V.memoizedState=ne.memoizedState,V.updateQueue=ne.updateQueue,V.type=ne.type,Q=ne.dependencies,V.dependencies=Q===null?null:{lanes:Q.lanes,firstContext:Q.firstContext}),H=H.sibling;return xn(gi,gi.current&1|2),D.child}v=v.sibling}H.tail!==null&&Dt()>I2&&(D.flags|=64,V=!0,$A(H,!1),D.lanes=33554432)}else{if(!V)if(v=WA(ne),v!==null){if(D.flags|=64,V=!0,v=v.updateQueue,v!==null&&(D.updateQueue=v,D.flags|=4),$A(H,!0),H.tail===null&&H.tailMode===\"hidden\"&&!ne.alternate&&!Va)return D=D.lastEffect=H.lastEffect,D!==null&&(D.nextEffect=null),null}else 2*Dt()-H.renderingStartTime>I2&&Q!==1073741824&&(D.flags|=64,V=!0,$A(H,!1),D.lanes=33554432);H.isBackwards?(ne.sibling=D.child,D.child=ne):(v=H.last,v!==null?v.sibling=ne:D.child=ne,H.last=ne)}return H.tail!==null?(v=H.tail,H.rendering=v,H.tail=v.sibling,H.lastEffect=D.lastEffect,H.renderingStartTime=Dt(),v.sibling=null,D=gi.current,xn(gi,V?D&1|2:D&1),v):null;case 23:case 24:return D2(),v!==null&&v.memoizedState!==null!=(D.memoizedState!==null)&&H.mode!==\"unstable-defer-without-hiding\"&&(D.flags|=4),null}throw Error(c(156,D.tag))}function $L(v){switch(v.tag){case 1:Jn(v.type)&&hu();var D=v.flags;return D&4096?(v.flags=D&-4097|64,v):null;case 3:if(yu(),Rt(Oi),Rt(ji),Iu(),D=v.flags,D&64)throw Error(c(285));return v.flags=D&-4097|64,v;case 5:return wt(v),null;case 13:return Rt(gi),D=v.flags,D&4096?(v.flags=D&-4097|64,v):null;case 19:return Rt(gi),null;case 4:return yu(),null;case 10:return Lg(v),null;case 23:case 24:return D2(),null;default:return null}}function Vg(v,D){try{var Q=\"\",H=D;do Q+=r2(H),H=H.return;while(H);var V=Q}catch(ne){V=`\nError generating stack: `+ne.message+`\n`+ne.stack}return{value:v,source:D,stack:V}}function Kg(v,D){try{console.error(D.value)}catch(Q){setTimeout(function(){throw Q})}}var eM=typeof WeakMap==\"function\"?WeakMap:Map;function a2(v,D,Q){Q=bl(-1,Q),Q.tag=3,Q.payload={element:null};var H=D.value;return Q.callback=function(){Uy||(Uy=!0,C2=H),Kg(v,D)},Q}function Jg(v,D,Q){Q=bl(-1,Q),Q.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H==\"function\"){var V=D.value;Q.payload=function(){return Kg(v,D),H(V)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch==\"function\"&&(Q.callback=function(){typeof H!=\"function\"&&(gc===null?gc=new Set([this]):gc.add(this),Kg(v,D));var Se=D.stack;this.componentDidCatch(D.value,{componentStack:Se!==null?Se:\"\"})}),Q}var tM=typeof WeakSet==\"function\"?WeakSet:Set;function l2(v){var D=v.ref;if(D!==null)if(typeof D==\"function\")try{D(null)}catch(Q){kf(v,Q)}else D.current=null}function xy(v,D){switch(D.tag){case 0:case 11:case 15:case 22:return;case 1:if(D.flags&256&&v!==null){var Q=v.memoizedProps,H=v.memoizedState;v=D.stateNode,D=v.getSnapshotBeforeUpdate(D.elementType===D.type?Q:bo(D.type,Q),H),v.__reactInternalSnapshotBeforeUpdate=D}return;case 3:F&&D.flags&256&&Rs(D.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(c(163))}function Nh(v,D){if(D=D.updateQueue,D=D!==null?D.lastEffect:null,D!==null){var Q=D=D.next;do{if((Q.tag&v)===v){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&H()}Q=Q.next}while(Q!==D)}}function vP(v,D,Q){switch(Q.tag){case 0:case 11:case 15:case 22:if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==D)}if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{var V=v;H=V.next,V=V.tag,V&4&&V&1&&(MP(Q,v),uM(Q,v)),v=H}while(v!==D)}return;case 1:v=Q.stateNode,Q.flags&4&&(D===null?v.componentDidMount():(H=Q.elementType===Q.type?D.memoizedProps:bo(Q.type,D.memoizedProps),v.componentDidUpdate(H,D.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),D=Q.updateQueue,D!==null&&Cy(Q,D,v);return;case 3:if(D=Q.updateQueue,D!==null){if(v=null,Q.child!==null)switch(Q.child.tag){case 5:v=Re(Q.child.stateNode);break;case 1:v=Q.child.stateNode}Cy(Q,D,v)}return;case 5:v=Q.stateNode,D===null&&Q.flags&4&&eo(v,Q.type,Q.memoizedProps,Q);return;case 6:return;case 4:return;case 12:return;case 13:Z&&Q.memoizedState===null&&(Q=Q.alternate,Q!==null&&(Q=Q.memoizedState,Q!==null&&(Q=Q.dehydrated,Q!==null&&Au(Q))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(c(163))}function SP(v,D){if(F)for(var Q=v;;){if(Q.tag===5){var H=Q.stateNode;D?Eh(H):ro(Q.stateNode,Q.memoizedProps)}else if(Q.tag===6)H=Q.stateNode,D?Ih(H):jn(H,Q.memoizedProps);else if((Q.tag!==23&&Q.tag!==24||Q.memoizedState===null||Q===v)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===v)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===v)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}function ky(v,D){if(Ha&&typeof Ha.onCommitFiberUnmount==\"function\")try{Ha.onCommitFiberUnmount(Xe,D)}catch{}switch(D.tag){case 0:case 11:case 14:case 15:case 22:if(v=D.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var Q=v=v.next;do{var H=Q,V=H.destroy;if(H=H.tag,V!==void 0)if(H&4)MP(D,Q);else{H=D;try{V()}catch(ne){kf(H,ne)}}Q=Q.next}while(Q!==v)}break;case 1:if(l2(D),v=D.stateNode,typeof v.componentWillUnmount==\"function\")try{v.props=D.memoizedProps,v.state=D.memoizedState,v.componentWillUnmount()}catch(ne){kf(D,ne)}break;case 5:l2(D);break;case 4:F?xP(v,D):z&&z&&(D=D.stateNode.containerInfo,v=lu(D),FA(D,v))}}function DP(v,D){for(var Q=D;;)if(ky(v,Q),Q.child===null||F&&Q.tag===4){if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}else Q.child.return=Q,Q=Q.child}function Qy(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function bP(v){return v.tag===5||v.tag===3||v.tag===4}function PP(v){if(F){e:{for(var D=v.return;D!==null;){if(bP(D))break e;D=D.return}throw Error(c(160))}var Q=D;switch(D=Q.stateNode,Q.tag){case 5:var H=!1;break;case 3:D=D.containerInfo,H=!0;break;case 4:D=D.containerInfo,H=!0;break;default:throw Error(c(161))}Q.flags&16&&(pf(D),Q.flags&=-17);e:t:for(Q=v;;){for(;Q.sibling===null;){if(Q.return===null||bP(Q.return)){Q=null;break e}Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;Q.tag!==5&&Q.tag!==6&&Q.tag!==18;){if(Q.flags&2||Q.child===null||Q.tag===4)continue t;Q.child.return=Q,Q=Q.child}if(!(Q.flags&2)){Q=Q.stateNode;break e}}H?c2(v,Q,D):u2(v,Q,D)}}function c2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?to(Q,v,D):wo(Q,v);else if(H!==4&&(v=v.child,v!==null))for(c2(v,D,Q),v=v.sibling;v!==null;)c2(v,D,Q),v=v.sibling}function u2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?Hi(Q,v,D):oi(Q,v);else if(H!==4&&(v=v.child,v!==null))for(u2(v,D,Q),v=v.sibling;v!==null;)u2(v,D,Q),v=v.sibling}function xP(v,D){for(var Q=D,H=!1,V,ne;;){if(!H){H=Q.return;e:for(;;){if(H===null)throw Error(c(160));switch(V=H.stateNode,H.tag){case 5:ne=!1;break e;case 3:V=V.containerInfo,ne=!0;break e;case 4:V=V.containerInfo,ne=!0;break e}H=H.return}H=!0}if(Q.tag===5||Q.tag===6)DP(v,Q),ne?RA(V,Q.stateNode):vo(V,Q.stateNode);else if(Q.tag===4){if(Q.child!==null){V=Q.stateNode.containerInfo,ne=!0,Q.child.return=Q,Q=Q.child;continue}}else if(ky(v,Q),Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return,Q.tag===4&&(H=!1)}Q.sibling.return=Q.return,Q=Q.sibling}}function f2(v,D){if(F){switch(D.tag){case 0:case 11:case 14:case 15:case 22:Nh(3,D);return;case 1:return;case 5:var Q=D.stateNode;if(Q!=null){var H=D.memoizedProps;v=v!==null?v.memoizedProps:H;var V=D.type,ne=D.updateQueue;D.updateQueue=null,ne!==null&&Bo(Q,ne,V,v,H,D)}return;case 6:if(D.stateNode===null)throw Error(c(162));Q=D.memoizedProps,rs(D.stateNode,v!==null?v.memoizedProps:Q,Q);return;case 3:Z&&(D=D.stateNode,D.hydrate&&(D.hydrate=!1,MA(D.containerInfo)));return;case 12:return;case 13:kP(D),zg(D);return;case 19:zg(D);return;case 17:return;case 23:case 24:SP(D,D.memoizedState!==null);return}throw Error(c(163))}switch(D.tag){case 0:case 11:case 14:case 15:case 22:Nh(3,D);return;case 12:return;case 13:kP(D),zg(D);return;case 19:zg(D);return;case 3:Z&&(Q=D.stateNode,Q.hydrate&&(Q.hydrate=!1,MA(Q.containerInfo)));break;case 23:case 24:return}e:if(z){switch(D.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:D=D.stateNode,FA(D.containerInfo,D.pendingChildren);break e}throw Error(c(163))}}function kP(v){v.memoizedState!==null&&(E2=Dt(),F&&SP(v.child,!0))}function zg(v){var D=v.updateQueue;if(D!==null){v.updateQueue=null;var Q=v.stateNode;Q===null&&(Q=v.stateNode=new tM),D.forEach(function(H){var V=AM.bind(null,v,H);Q.has(H)||(Q.add(H),H.then(V,V))})}}function rM(v,D){return v!==null&&(v=v.memoizedState,v===null||v.dehydrated!==null)?(D=D.memoizedState,D!==null&&D.dehydrated===null):!1}var Ty=0,Ry=1,Fy=2,Zg=3,Ny=4;if(typeof Symbol==\"function\"&&Symbol.for){var Xg=Symbol.for;Ty=Xg(\"selector.component\"),Ry=Xg(\"selector.has_pseudo_class\"),Fy=Xg(\"selector.role\"),Zg=Xg(\"selector.test_id\"),Ny=Xg(\"selector.text\")}function Oy(v){var D=$(v);if(D!=null){if(typeof D.memoizedProps[\"data-testname\"]!=\"string\")throw Error(c(364));return D}if(v=ir(v),v===null)throw Error(c(362));return v.stateNode.current}function Df(v,D){switch(D.$$typeof){case Ty:if(v.type===D.value)return!0;break;case Ry:e:{D=D.value,v=[v,0];for(var Q=0;Q<v.length;){var H=v[Q++],V=v[Q++],ne=D[V];if(H.tag!==5||!Pr(H)){for(;ne!=null&&Df(H,ne);)V++,ne=D[V];if(V===D.length){D=!0;break e}else for(H=H.child;H!==null;)v.push(H,V),H=H.sibling}}D=!1}return D;case Fy:if(v.tag===5&&Ir(v.stateNode,D.value))return!0;break;case Ny:if((v.tag===5||v.tag===6)&&(v=gn(v),v!==null&&0<=v.indexOf(D.value)))return!0;break;case Zg:if(v.tag===5&&(v=v.memoizedProps[\"data-testname\"],typeof v==\"string\"&&v.toLowerCase()===D.value.toLowerCase()))return!0;break;default:throw Error(c(365,D))}return!1}function bf(v){switch(v.$$typeof){case Ty:return\"<\"+(g(v.value)||\"Unknown\")+\">\";case Ry:return\":has(\"+(bf(v)||\"\")+\")\";case Fy:return'[role=\"'+v.value+'\"]';case Ny:return'\"'+v.value+'\"';case Zg:return'[data-testname=\"'+v.value+'\"]';default:throw Error(c(365,v))}}function A2(v,D){var Q=[];v=[v,0];for(var H=0;H<v.length;){var V=v[H++],ne=v[H++],Se=D[ne];if(V.tag!==5||!Pr(V)){for(;Se!=null&&Df(V,Se);)ne++,Se=D[ne];if(ne===D.length)Q.push(V);else for(V=V.child;V!==null;)v.push(V,ne),V=V.sibling}}return Q}function p2(v,D){if(!qt)throw Error(c(363));v=Oy(v),v=A2(v,D),D=[],v=Array.from(v);for(var Q=0;Q<v.length;){var H=v[Q++];if(H.tag===5)Pr(H)||D.push(H.stateNode);else for(H=H.child;H!==null;)v.push(H),H=H.sibling}return D}var Ly=null;function nM(v){if(Ly===null)try{var D=(\"require\"+Math.random()).slice(0,7);Ly=(nD&&nD[D]).call(nD,\"timers\").setImmediate}catch{Ly=function(H){var V=new MessageChannel;V.port1.onmessage=H,V.port2.postMessage(void 0)}}return Ly(v)}var iM=Math.ceil,My=f.ReactCurrentDispatcher,h2=f.ReactCurrentOwner,g2=f.IsSomeRendererActing,xr=0,oo=null,Zi=null,Os=0,ep=0,d2=io(0),Bs=0,_y=null,Oh=0,$g=0,Lh=0,m2=0,y2=null,E2=0,I2=1/0;function Pf(){I2=Dt()+500}var sr=null,Uy=!1,C2=null,gc=null,xf=!1,ed=null,td=90,w2=[],B2=[],vu=null,rd=0,v2=null,Hy=-1,Su=0,jy=0,nd=null,id=!1;function To(){return xr&48?Dt():Hy!==-1?Hy:Hy=Dt()}function vs(v){if(v=v.mode,!(v&2))return 1;if(!(v&4))return tr()===99?1:2;if(Su===0&&(Su=Oh),my.transition!==0){jy!==0&&(jy=y2!==null?y2.pendingLanes:0),v=Su;var D=4186112&~jy;return D&=-D,D===0&&(v=4186112&~v,D=v&-v,D===0&&(D=8192)),D}return v=tr(),xr&4&&v===98?v=Mt(12,Su):(v=_A(v),v=Mt(v,Su)),v}function Rl(v,D,Q){if(50<rd)throw rd=0,v2=null,Error(c(185));if(v=qy(v,D),v===null)return null;ja(v,D,Q),v===oo&&(Lh|=D,Bs===4&&Mh(v,Os));var H=tr();D===1?xr&8&&!(xr&48)?S2(v):(da(v,Q),xr===0&&(Pf(),Tn())):(!(xr&4)||H!==98&&H!==99||(vu===null?vu=new Set([v]):vu.add(v)),da(v,Q)),y2=v}function qy(v,D){v.lanes|=D;var Q=v.alternate;for(Q!==null&&(Q.lanes|=D),Q=v,v=v.return;v!==null;)v.childLanes|=D,Q=v.alternate,Q!==null&&(Q.childLanes|=D),Q=v,v=v.return;return Q.tag===3?Q.stateNode:null}function da(v,D){for(var Q=v.callbackNode,H=v.suspendedLanes,V=v.pingedLanes,ne=v.expirationTimes,Se=v.pendingLanes;0<Se;){var Ue=31-ns(Se),At=1<<Ue,Gt=ne[Ue];if(Gt===-1){if(!(At&H)||At&V){Gt=D,ua(At);var vr=wn;ne[Ue]=10<=vr?Gt+250:6<=vr?Gt+5e3:-1}}else Gt<=D&&(v.expiredLanes|=At);Se&=~At}if(H=fa(v,v===oo?Os:0),D=wn,H===0)Q!==null&&(Q!==lr&&Cs(Q),v.callbackNode=null,v.callbackPriority=0);else{if(Q!==null){if(v.callbackPriority===D)return;Q!==lr&&Cs(Q)}D===15?(Q=S2.bind(null,v),Ie===null?(Ie=[Q],Oe=Li(Qn,Ga)):Ie.push(Q),Q=lr):D===14?Q=qi(99,S2.bind(null,v)):(Q=UA(D),Q=qi(Q,QP.bind(null,v))),v.callbackPriority=D,v.callbackNode=Q}}function QP(v){if(Hy=-1,jy=Su=0,xr&48)throw Error(c(327));var D=v.callbackNode;if(Du()&&v.callbackNode!==D)return null;var Q=fa(v,v===oo?Os:0);if(Q===0)return null;var H=Q,V=xr;xr|=16;var ne=NP();(oo!==v||Os!==H)&&(Pf(),_h(v,H));do try{aM();break}catch(Ue){FP(v,Ue)}while(!0);if(Ng(),My.current=ne,xr=V,Zi!==null?H=0:(oo=null,Os=0,H=Bs),Oh&Lh)_h(v,0);else if(H!==0){if(H===2&&(xr|=64,v.hydrate&&(v.hydrate=!1,Rs(v.containerInfo)),Q=vl(v),Q!==0&&(H=sd(v,Q))),H===1)throw D=_y,_h(v,0),Mh(v,Q),da(v,Dt()),D;switch(v.finishedWork=v.current.alternate,v.finishedLanes=Q,H){case 0:case 1:throw Error(c(345));case 2:tp(v);break;case 3:if(Mh(v,Q),(Q&62914560)===Q&&(H=E2+500-Dt(),10<H)){if(fa(v,0)!==0)break;if(V=v.suspendedLanes,(V&Q)!==Q){To(),v.pingedLanes|=v.suspendedLanes&V;break}v.timeoutHandle=x(tp.bind(null,v),H);break}tp(v);break;case 4:if(Mh(v,Q),(Q&4186112)===Q)break;for(H=v.eventTimes,V=-1;0<Q;){var Se=31-ns(Q);ne=1<<Se,Se=H[Se],Se>V&&(V=Se),Q&=~ne}if(Q=V,Q=Dt()-Q,Q=(120>Q?120:480>Q?480:1080>Q?1080:1920>Q?1920:3e3>Q?3e3:4320>Q?4320:1960*iM(Q/1960))-Q,10<Q){v.timeoutHandle=x(tp.bind(null,v),Q);break}tp(v);break;case 5:tp(v);break;default:throw Error(c(329))}}return da(v,Dt()),v.callbackNode===D?QP.bind(null,v):null}function Mh(v,D){for(D&=~m2,D&=~Lh,v.suspendedLanes|=D,v.pingedLanes&=~D,v=v.expirationTimes;0<D;){var Q=31-ns(D),H=1<<Q;v[Q]=-1,D&=~H}}function S2(v){if(xr&48)throw Error(c(327));if(Du(),v===oo&&v.expiredLanes&Os){var D=Os,Q=sd(v,D);Oh&Lh&&(D=fa(v,D),Q=sd(v,D))}else D=fa(v,0),Q=sd(v,D);if(v.tag!==0&&Q===2&&(xr|=64,v.hydrate&&(v.hydrate=!1,Rs(v.containerInfo)),D=vl(v),D!==0&&(Q=sd(v,D))),Q===1)throw Q=_y,_h(v,0),Mh(v,D),da(v,Dt()),Q;return v.finishedWork=v.current.alternate,v.finishedLanes=D,tp(v),da(v,Dt()),null}function sM(){if(vu!==null){var v=vu;vu=null,v.forEach(function(D){D.expiredLanes|=24&D.pendingLanes,da(D,Dt())})}Tn()}function TP(v,D){var Q=xr;xr|=1;try{return v(D)}finally{xr=Q,xr===0&&(Pf(),Tn())}}function RP(v,D){var Q=xr;if(Q&48)return v(D);xr|=1;try{if(v)return ai(99,v.bind(null,D))}finally{xr=Q,Tn()}}function Gy(v,D){xn(d2,ep),ep|=D,Oh|=D}function D2(){ep=d2.current,Rt(d2)}function _h(v,D){v.finishedWork=null,v.finishedLanes=0;var Q=v.timeoutHandle;if(Q!==b&&(v.timeoutHandle=b,w(Q)),Zi!==null)for(Q=Zi.return;Q!==null;){var H=Q;switch(H.tag){case 1:H=H.type.childContextTypes,H!=null&&hu();break;case 3:yu(),Rt(Oi),Rt(ji),Iu();break;case 5:wt(H);break;case 4:yu();break;case 13:Rt(gi);break;case 19:Rt(gi);break;case 10:Lg(H);break;case 23:case 24:D2()}Q=Q.return}oo=v,Zi=bu(v.current,null),Os=ep=Oh=D,Bs=0,_y=null,m2=Lh=$g=0}function FP(v,D){do{var Q=Zi;try{if(Ng(),Cf.current=kt,VA){for(var H=qn.memoizedState;H!==null;){var V=H.queue;V!==null&&(V.pending=null),H=H.next}VA=!1}if(Cu=0,xi=is=qn=null,wf=!1,h2.current=null,Q===null||Q.return===null){Bs=1,_y=D,Zi=null;break}e:{var ne=v,Se=Q.return,Ue=Q,At=D;if(D=Os,Ue.flags|=2048,Ue.firstEffect=Ue.lastEffect=null,At!==null&&typeof At==\"object\"&&typeof At.then==\"function\"){var Gt=At;if(!(Ue.mode&2)){var vr=Ue.alternate;vr?(Ue.updateQueue=vr.updateQueue,Ue.memoizedState=vr.memoizedState,Ue.lanes=vr.lanes):(Ue.updateQueue=null,Ue.memoizedState=null)}var Lr=(gi.current&1)!==0,Xt=Se;do{var zn;if(zn=Xt.tag===13){var mi=Xt.memoizedState;if(mi!==null)zn=mi.dehydrated!==null;else{var Za=Xt.memoizedProps;zn=Za.fallback===void 0?!1:Za.unstable_avoidThisFallback!==!0?!0:!Lr}}if(zn){var $e=Xt.updateQueue;if($e===null){var qe=new Set;qe.add(Gt),Xt.updateQueue=qe}else $e.add(Gt);if(!(Xt.mode&2)){if(Xt.flags|=64,Ue.flags|=16384,Ue.flags&=-2981,Ue.tag===1)if(Ue.alternate===null)Ue.tag=17;else{var pt=bl(-1,1);pt.tag=2,Pl(Ue,pt)}Ue.lanes|=1;break e}At=void 0,Ue=D;var Zt=ne.pingCache;if(Zt===null?(Zt=ne.pingCache=new eM,At=new Set,Zt.set(Gt,At)):(At=Zt.get(Gt),At===void 0&&(At=new Set,Zt.set(Gt,At))),!At.has(Ue)){At.add(Ue);var Sr=UP.bind(null,ne,Gt,Ue);Gt.then(Sr,Sr)}Xt.flags|=4096,Xt.lanes=D;break e}Xt=Xt.return}while(Xt!==null);At=Error((g(Ue.type)||\"A React component\")+` suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Bs!==5&&(Bs=2),At=Vg(At,Ue),Xt=Se;do{switch(Xt.tag){case 3:ne=At,Xt.flags|=4096,D&=-D,Xt.lanes|=D;var Xn=a2(Xt,ne,D);Iy(Xt,Xn);break e;case 1:ne=At;var kr=Xt.type,Rn=Xt.stateNode;if(!(Xt.flags&64)&&(typeof kr.getDerivedStateFromError==\"function\"||Rn!==null&&typeof Rn.componentDidCatch==\"function\"&&(gc===null||!gc.has(Rn)))){Xt.flags|=4096,D&=-D,Xt.lanes|=D;var Un=Jg(Xt,ne,D);Iy(Xt,Un);break e}}Xt=Xt.return}while(Xt!==null)}LP(Q)}catch(zr){D=zr,Zi===Q&&Q!==null&&(Zi=Q=Q.return);continue}break}while(!0)}function NP(){var v=My.current;return My.current=kt,v===null?kt:v}function sd(v,D){var Q=xr;xr|=16;var H=NP();oo===v&&Os===D||_h(v,D);do try{oM();break}catch(V){FP(v,V)}while(!0);if(Ng(),xr=Q,My.current=H,Zi!==null)throw Error(c(261));return oo=null,Os=0,Bs}function oM(){for(;Zi!==null;)OP(Zi)}function aM(){for(;Zi!==null&&!Sl();)OP(Zi)}function OP(v){var D=HP(v.alternate,v,ep);v.memoizedProps=v.pendingProps,D===null?LP(v):Zi=D,h2.current=null}function LP(v){var D=v;do{var Q=D.alternate;if(v=D.return,D.flags&2048){if(Q=$L(D),Q!==null){Q.flags&=2047,Zi=Q;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(Q=XL(Q,D,ep),Q!==null){Zi=Q;return}if(Q=D,Q.tag!==24&&Q.tag!==23||Q.memoizedState===null||ep&1073741824||!(Q.mode&4)){for(var H=0,V=Q.child;V!==null;)H|=V.lanes|V.childLanes,V=V.sibling;Q.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=D.firstEffect),D.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=D.firstEffect),v.lastEffect=D.lastEffect),1<D.flags&&(v.lastEffect!==null?v.lastEffect.nextEffect=D:v.firstEffect=D,v.lastEffect=D))}if(D=D.sibling,D!==null){Zi=D;return}Zi=D=v}while(D!==null);Bs===0&&(Bs=5)}function tp(v){var D=tr();return ai(99,lM.bind(null,v,D)),null}function lM(v,D){do Du();while(ed!==null);if(xr&48)throw Error(c(327));var Q=v.finishedWork;if(Q===null)return null;if(v.finishedWork=null,v.finishedLanes=0,Q===v.current)throw Error(c(177));v.callbackNode=null;var H=Q.lanes|Q.childLanes,V=H,ne=v.pendingLanes&~V;v.pendingLanes=V,v.suspendedLanes=0,v.pingedLanes=0,v.expiredLanes&=V,v.mutableReadLanes&=V,v.entangledLanes&=V,V=v.entanglements;for(var Se=v.eventTimes,Ue=v.expirationTimes;0<ne;){var At=31-ns(ne),Gt=1<<At;V[At]=0,Se[At]=-1,Ue[At]=-1,ne&=~Gt}if(vu!==null&&!(H&24)&&vu.has(v)&&vu.delete(v),v===oo&&(Zi=oo=null,Os=0),1<Q.flags?Q.lastEffect!==null?(Q.lastEffect.nextEffect=Q,H=Q.firstEffect):H=Q:H=Q.firstEffect,H!==null){V=xr,xr|=32,h2.current=null,nd=rt(v.containerInfo),id=!1,sr=H;do try{cM()}catch(qe){if(sr===null)throw Error(c(330));kf(sr,qe),sr=sr.nextEffect}while(sr!==null);nd=null,sr=H;do try{for(Se=v;sr!==null;){var vr=sr.flags;if(vr&16&&F&&pf(sr.stateNode),vr&128){var Lr=sr.alternate;if(Lr!==null){var Xt=Lr.ref;Xt!==null&&(typeof Xt==\"function\"?Xt(null):Xt.current=null)}}switch(vr&1038){case 2:PP(sr),sr.flags&=-3;break;case 6:PP(sr),sr.flags&=-3,f2(sr.alternate,sr);break;case 1024:sr.flags&=-1025;break;case 1028:sr.flags&=-1025,f2(sr.alternate,sr);break;case 4:f2(sr.alternate,sr);break;case 8:Ue=Se,ne=sr,F?xP(Ue,ne):DP(Ue,ne);var zn=ne.alternate;Qy(ne),zn!==null&&Qy(zn)}sr=sr.nextEffect}}catch(qe){if(sr===null)throw Error(c(330));kf(sr,qe),sr=sr.nextEffect}while(sr!==null);id&&lt(),Fe(v.containerInfo),v.current=Q,sr=H;do try{for(vr=v;sr!==null;){var mi=sr.flags;if(mi&36&&vP(vr,sr.alternate,sr),mi&128){Lr=void 0;var Za=sr.ref;if(Za!==null){var $e=sr.stateNode;switch(sr.tag){case 5:Lr=Re($e);break;default:Lr=$e}typeof Za==\"function\"?Za(Lr):Za.current=Lr}}sr=sr.nextEffect}}catch(qe){if(sr===null)throw Error(c(330));kf(sr,qe),sr=sr.nextEffect}while(sr!==null);sr=null,ee(),xr=V}else v.current=Q;if(xf)xf=!1,ed=v,td=D;else for(sr=H;sr!==null;)D=sr.nextEffect,sr.nextEffect=null,sr.flags&8&&(mi=sr,mi.sibling=null,mi.stateNode=null),sr=D;if(H=v.pendingLanes,H===0&&(gc=null),H===1?v===v2?rd++:(rd=0,v2=v):rd=0,Q=Q.stateNode,Ha&&typeof Ha.onCommitFiberRoot==\"function\")try{Ha.onCommitFiberRoot(Xe,Q,void 0,(Q.current.flags&64)===64)}catch{}if(da(v,Dt()),Uy)throw Uy=!1,v=C2,C2=null,v;return xr&8||Tn(),null}function cM(){for(;sr!==null;){var v=sr.alternate;id||nd===null||(sr.flags&8?De(sr,nd)&&(id=!0,Te()):sr.tag===13&&rM(v,sr)&&De(sr,nd)&&(id=!0,Te()));var D=sr.flags;D&256&&xy(v,sr),!(D&512)||xf||(xf=!0,qi(97,function(){return Du(),null})),sr=sr.nextEffect}}function Du(){if(td!==90){var v=97<td?97:td;return td=90,ai(v,fM)}return!1}function uM(v,D){w2.push(D,v),xf||(xf=!0,qi(97,function(){return Du(),null}))}function MP(v,D){B2.push(D,v),xf||(xf=!0,qi(97,function(){return Du(),null}))}function fM(){if(ed===null)return!1;var v=ed;if(ed=null,xr&48)throw Error(c(331));var D=xr;xr|=32;var Q=B2;B2=[];for(var H=0;H<Q.length;H+=2){var V=Q[H],ne=Q[H+1],Se=V.destroy;if(V.destroy=void 0,typeof Se==\"function\")try{Se()}catch(At){if(ne===null)throw Error(c(330));kf(ne,At)}}for(Q=w2,w2=[],H=0;H<Q.length;H+=2){V=Q[H],ne=Q[H+1];try{var Ue=V.create;V.destroy=Ue()}catch(At){if(ne===null)throw Error(c(330));kf(ne,At)}}for(Ue=v.current.firstEffect;Ue!==null;)v=Ue.nextEffect,Ue.nextEffect=null,Ue.flags&8&&(Ue.sibling=null,Ue.stateNode=null),Ue=v;return xr=D,Tn(),!0}function _P(v,D,Q){D=Vg(Q,D),D=a2(v,D,1),Pl(v,D),D=To(),v=qy(v,1),v!==null&&(ja(v,1,D),da(v,D))}function kf(v,D){if(v.tag===3)_P(v,v,D);else for(var Q=v.return;Q!==null;){if(Q.tag===3){_P(Q,v,D);break}else if(Q.tag===1){var H=Q.stateNode;if(typeof Q.type.getDerivedStateFromError==\"function\"||typeof H.componentDidCatch==\"function\"&&(gc===null||!gc.has(H))){v=Vg(D,v);var V=Jg(Q,v,1);if(Pl(Q,V),V=To(),Q=qy(Q,1),Q!==null)ja(Q,1,V),da(Q,V);else if(typeof H.componentDidCatch==\"function\"&&(gc===null||!gc.has(H)))try{H.componentDidCatch(D,v)}catch{}break}}Q=Q.return}}function UP(v,D,Q){var H=v.pingCache;H!==null&&H.delete(D),D=To(),v.pingedLanes|=v.suspendedLanes&Q,oo===v&&(Os&Q)===Q&&(Bs===4||Bs===3&&(Os&62914560)===Os&&500>Dt()-E2?_h(v,0):m2|=Q),da(v,D)}function AM(v,D){var Q=v.stateNode;Q!==null&&Q.delete(D),D=0,D===0&&(D=v.mode,D&2?D&4?(Su===0&&(Su=Oh),D=kn(62914560&~Su),D===0&&(D=4194304)):D=tr()===99?1:2:D=1),Q=To(),v=qy(v,D),v!==null&&(ja(v,D,Q),da(v,Q))}var HP;HP=function(v,D,Q){var H=D.lanes;if(v!==null)if(v.memoizedProps!==D.pendingProps||Oi.current)Ke=!0;else if(Q&H)Ke=!!(v.flags&16384);else{switch(Ke=!1,D.tag){case 3:by(D),qg();break;case 5:If(D);break;case 1:Jn(D.type)&&Ma(D);break;case 4:Ug(D,D.stateNode.containerInfo);break;case 10:Og(D,D.memoizedProps.value);break;case 13:if(D.memoizedState!==null)return Q&D.child.childLanes?s2(v,D,Q):(xn(gi,gi.current&1),D=Gn(v,D,Q),D!==null?D.sibling:null);xn(gi,gi.current&1);break;case 19:if(H=(Q&D.childLanes)!==0,v.flags&64){if(H)return BP(v,D,Q);D.flags|=64}var V=D.memoizedState;if(V!==null&&(V.rendering=null,V.tail=null,V.lastEffect=null),xn(gi,gi.current),H)break;return null;case 23:case 24:return D.lanes=0,di(v,D,Q)}return Gn(v,D,Q)}else Ke=!1;switch(D.lanes=0,D.tag){case 2:if(H=D.type,v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,V=dn(D,ji.current),mf(D,Q),V=Wg(null,D,H,v,V,Q),D.flags|=1,typeof V==\"object\"&&V!==null&&typeof V.render==\"function\"&&V.$$typeof===void 0){if(D.tag=1,D.memoizedState=null,D.updateQueue=null,Jn(H)){var ne=!0;Ma(D)}else ne=!1;D.memoizedState=V.state!==null&&V.state!==void 0?V.state:null,Dh(D);var Se=H.getDerivedStateFromProps;typeof Se==\"function\"&&jA(D,H,Se,v),V.updater=qA,D.stateNode=V,V._reactInternals=D,xo(D,H,v,Q),D=i2(null,D,H,!0,ne,Q)}else D.tag=0,ft(null,D,V,Q),D=D.child;return D;case 16:V=D.elementType;e:{switch(v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,ne=V._init,V=ne(V._payload),D.type=V,ne=D.tag=hM(V),v=bo(V,v),ne){case 0:D=zA(null,D,V,v,Q);break e;case 1:D=wP(null,D,V,v,Q);break e;case 11:D=dr(null,D,V,v,Q);break e;case 14:D=Br(null,D,V,bo(V.type,v),H,Q);break e}throw Error(c(306,V,\"\"))}return D;case 0:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:bo(H,V),zA(v,D,H,V,Q);case 1:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:bo(H,V),wP(v,D,H,V,Q);case 3:if(by(D),H=D.updateQueue,v===null||H===null)throw Error(c(282));if(H=D.pendingProps,V=D.memoizedState,V=V!==null?V.element:null,Mg(v,D),HA(D,H,null,Q),H=D.memoizedState.element,H===V)qg(),D=Gn(v,D,Q);else{if(V=D.stateNode,(ne=V.hydrate)&&(Z?(pa=fu(D.stateNode.containerInfo),Ya=D,ne=Va=!0):ne=!1),ne){if(Z&&(v=V.mutableSourceEagerHydrationData,v!=null))for(V=0;V<v.length;V+=2)ne=v[V],Se=v[V+1],y?ne._workInProgressVersionPrimary=Se:ne._workInProgressVersionSecondary=Se,Eu.push(ne);for(Q=n2(D,null,H,Q),D.child=Q;Q;)Q.flags=Q.flags&-3|1024,Q=Q.sibling}else ft(v,D,H,Q),qg();D=D.child}return D;case 5:return If(D),v===null&&jg(D),H=D.type,V=D.pendingProps,ne=v!==null?v.memoizedProps:null,Se=V.children,it(H,V)?Se=null:ne!==null&&it(H,ne)&&(D.flags|=16),ws(v,D),ft(v,D,Se,Q),D.child;case 6:return v===null&&jg(D),null;case 13:return s2(v,D,Q);case 4:return Ug(D,D.stateNode.containerInfo),H=D.pendingProps,v===null?D.child=_g(D,null,H,Q):ft(v,D,H,Q),D.child;case 11:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:bo(H,V),dr(v,D,H,V,Q);case 7:return ft(v,D,D.pendingProps,Q),D.child;case 8:return ft(v,D,D.pendingProps.children,Q),D.child;case 12:return ft(v,D,D.pendingProps.children,Q),D.child;case 10:e:{if(H=D.type._context,V=D.pendingProps,Se=D.memoizedProps,ne=V.value,Og(D,ne),Se!==null){var Ue=Se.value;if(ne=Do(Ue,ne)?0:(typeof H._calculateChangedBits==\"function\"?H._calculateChangedBits(Ue,ne):1073741823)|0,ne===0){if(Se.children===V.children&&!Oi.current){D=Gn(v,D,Q);break e}}else for(Ue=D.child,Ue!==null&&(Ue.return=D);Ue!==null;){var At=Ue.dependencies;if(At!==null){Se=Ue.child;for(var Gt=At.firstContext;Gt!==null;){if(Gt.context===H&&Gt.observedBits&ne){Ue.tag===1&&(Gt=bl(-1,Q&-Q),Gt.tag=2,Pl(Ue,Gt)),Ue.lanes|=Q,Gt=Ue.alternate,Gt!==null&&(Gt.lanes|=Q),Ey(Ue.return,Q),At.lanes|=Q;break}Gt=Gt.next}}else Se=Ue.tag===10&&Ue.type===D.type?null:Ue.child;if(Se!==null)Se.return=Ue;else for(Se=Ue;Se!==null;){if(Se===D){Se=null;break}if(Ue=Se.sibling,Ue!==null){Ue.return=Se.return,Se=Ue;break}Se=Se.return}Ue=Se}}ft(v,D,V.children,Q),D=D.child}return D;case 9:return V=D.type,ne=D.pendingProps,H=ne.children,mf(D,Q),V=Po(V,ne.unstable_observedBits),H=H(V),D.flags|=1,ft(v,D,H,Q),D.child;case 14:return V=D.type,ne=bo(V,D.pendingProps),ne=bo(V.type,ne),Br(v,D,V,ne,H,Q);case 15:return _n(v,D,D.type,D.pendingProps,H,Q);case 17:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:bo(H,V),v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),D.tag=1,Jn(H)?(v=!0,Ma(D)):v=!1,mf(D,Q),xt(D,H,V),xo(D,H,V,Q),i2(null,D,H,!0,v,Q);case 19:return BP(v,D,Q);case 23:return di(v,D,Q);case 24:return di(v,D,Q)}throw Error(c(156,D.tag))};var Wy={current:!1},Ls=n.unstable_flushAllWithoutAsserting,jP=typeof Ls==\"function\";function b2(){if(Ls!==void 0)return Ls();for(var v=!1;Du();)v=!0;return v}function ma(v){try{b2(),nM(function(){b2()?ma(v):v()})}catch(D){v(D)}}var Ja=0,Yy=!1;function pM(v,D,Q,H){this.tag=v,this.key=Q,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=D,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=H,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function za(v,D,Q,H){return new pM(v,D,Q,H)}function P2(v){return v=v.prototype,!(!v||!v.isReactComponent)}function hM(v){if(typeof v==\"function\")return P2(v)?1:0;if(v!=null){if(v=v.$$typeof,v===R)return 11;if(v===W)return 14}return 2}function bu(v,D){var Q=v.alternate;return Q===null?(Q=za(v.tag,D,v.key,v.mode),Q.elementType=v.elementType,Q.type=v.type,Q.stateNode=v.stateNode,Q.alternate=v,v.alternate=Q):(Q.pendingProps=D,Q.type=v.type,Q.flags=0,Q.nextEffect=null,Q.firstEffect=null,Q.lastEffect=null),Q.childLanes=v.childLanes,Q.lanes=v.lanes,Q.child=v.child,Q.memoizedProps=v.memoizedProps,Q.memoizedState=v.memoizedState,Q.updateQueue=v.updateQueue,D=v.dependencies,Q.dependencies=D===null?null:{lanes:D.lanes,firstContext:D.firstContext},Q.sibling=v.sibling,Q.index=v.index,Q.ref=v.ref,Q}function od(v,D,Q,H,V,ne){var Se=2;if(H=v,typeof v==\"function\")P2(v)&&(Se=1);else if(typeof v==\"string\")Se=5;else e:switch(v){case E:return Qf(Q.children,V,ne,D);case Ae:Se=8,V|=16;break;case C:Se=8,V|=1;break;case S:return v=za(12,Q,D,V|8),v.elementType=S,v.type=S,v.lanes=ne,v;case N:return v=za(13,Q,D,V),v.type=N,v.elementType=N,v.lanes=ne,v;case U:return v=za(19,Q,D,V),v.elementType=U,v.lanes=ne,v;case ce:return x2(Q,V,ne,D);case me:return v=za(24,Q,D,V),v.elementType=me,v.lanes=ne,v;default:if(typeof v==\"object\"&&v!==null)switch(v.$$typeof){case P:Se=10;break e;case I:Se=9;break e;case R:Se=11;break e;case W:Se=14;break e;case te:Se=16,H=null;break e;case ie:Se=22;break e}throw Error(c(130,v==null?v:typeof v,\"\"))}return D=za(Se,Q,D,V),D.elementType=v,D.type=H,D.lanes=ne,D}function Qf(v,D,Q,H){return v=za(7,v,H,D),v.lanes=Q,v}function x2(v,D,Q,H){return v=za(23,v,H,D),v.elementType=ce,v.lanes=Q,v}function k2(v,D,Q){return v=za(6,v,null,D),v.lanes=Q,v}function Ro(v,D,Q){return D=za(4,v.children!==null?v.children:[],v.key,D),D.lanes=Q,D.stateNode={containerInfo:v.containerInfo,pendingChildren:null,implementation:v.implementation},D}function gM(v,D,Q){this.tag=D,this.containerInfo=v,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=b,this.pendingContext=this.context=null,this.hydrate=Q,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Aa(0),this.expirationTimes=Aa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Aa(0),Z&&(this.mutableSourceEagerHydrationData=null)}function qP(v){var D=v._reactInternals;if(D===void 0)throw typeof v.render==\"function\"?Error(c(188)):Error(c(268,Object.keys(v)));return v=se(D),v===null?null:v.stateNode}function GP(v,D){if(v=v.memoizedState,v!==null&&v.dehydrated!==null){var Q=v.retryLane;v.retryLane=Q!==0&&Q<D?Q:D}}function Vy(v,D){GP(v,D),(v=v.alternate)&&GP(v,D)}function dM(v){return v=se(v),v===null?null:v.stateNode}function mM(){return null}return r.IsThisRendererActing=Wy,r.act=function(v){function D(){Ja--,g2.current=Q,Wy.current=H}Yy===!1&&(Yy=!0,console.error(\"act(...) is not supported in production builds of React, and might not behave as expected.\")),Ja++;var Q=g2.current,H=Wy.current;g2.current=!0,Wy.current=!0;try{var V=TP(v)}catch(ne){throw D(),ne}if(V!==null&&typeof V==\"object\"&&typeof V.then==\"function\")return{then:function(ne,Se){V.then(function(){1<Ja||jP===!0&&Q===!0?(D(),ne()):ma(function(Ue){D(),Ue?Se(Ue):ne()})},function(Ue){D(),Se(Ue)})}};try{Ja!==1||jP!==!1&&Q!==!1||b2(),D()}catch(ne){throw D(),ne}return{then:function(ne){ne()}}},r.attemptContinuousHydration=function(v){if(v.tag===13){var D=To();Rl(v,67108864,D),Vy(v,67108864)}},r.attemptHydrationAtCurrentPriority=function(v){if(v.tag===13){var D=To(),Q=vs(v);Rl(v,Q,D),Vy(v,Q)}},r.attemptSynchronousHydration=function(v){switch(v.tag){case 3:var D=v.stateNode;if(D.hydrate){var Q=ua(D.pendingLanes);D.expiredLanes|=Q&D.pendingLanes,da(D,Dt()),!(xr&48)&&(Pf(),Tn())}break;case 13:var H=To();RP(function(){return Rl(v,1,H)}),Vy(v,4)}},r.attemptUserBlockingHydration=function(v){if(v.tag===13){var D=To();Rl(v,4,D),Vy(v,4)}},r.batchedEventUpdates=function(v,D){var Q=xr;xr|=2;try{return v(D)}finally{xr=Q,xr===0&&(Pf(),Tn())}},r.batchedUpdates=TP,r.createComponentSelector=function(v){return{$$typeof:Ty,value:v}},r.createContainer=function(v,D,Q){return v=new gM(v,D,Q),D=za(3,null,null,D===2?7:D===1?3:0),v.current=D,D.stateNode=v,Dh(D),v},r.createHasPsuedoClassSelector=function(v){return{$$typeof:Ry,value:v}},r.createPortal=function(v,D,Q){var H=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:H==null?null:\"\"+H,children:v,containerInfo:D,implementation:Q}},r.createRoleSelector=function(v){return{$$typeof:Fy,value:v}},r.createTestNameSelector=function(v){return{$$typeof:Zg,value:v}},r.createTextSelector=function(v){return{$$typeof:Ny,value:v}},r.deferredUpdates=function(v){return ai(97,v)},r.discreteUpdates=function(v,D,Q,H,V){var ne=xr;xr|=4;try{return ai(98,v.bind(null,D,Q,H,V))}finally{xr=ne,xr===0&&(Pf(),Tn())}},r.findAllNodes=p2,r.findBoundingRects=function(v,D){if(!qt)throw Error(c(363));D=p2(v,D),v=[];for(var Q=0;Q<D.length;Q++)v.push(Pt(D[Q]));for(D=v.length-1;0<D;D--){Q=v[D];for(var H=Q.x,V=H+Q.width,ne=Q.y,Se=ne+Q.height,Ue=D-1;0<=Ue;Ue--)if(D!==Ue){var At=v[Ue],Gt=At.x,vr=Gt+At.width,Lr=At.y,Xt=Lr+At.height;if(H>=Gt&&ne>=Lr&&V<=vr&&Se<=Xt){v.splice(D,1);break}else if(H!==Gt||Q.width!==At.width||Xt<ne||Lr>Se){if(!(ne!==Lr||Q.height!==At.height||vr<H||Gt>V)){Gt>H&&(At.width+=Gt-H,At.x=H),vr<V&&(At.width=V-Gt),v.splice(D,1);break}}else{Lr>ne&&(At.height+=Lr-ne,At.y=ne),Xt<Se&&(At.height=Se-Lr),v.splice(D,1);break}}}return v},r.findHostInstance=qP,r.findHostInstanceWithNoPortals=function(v){return v=X(v),v===null?null:v.tag===20?v.stateNode.instance:v.stateNode},r.findHostInstanceWithWarning=function(v){return qP(v)},r.flushControlled=function(v){var D=xr;xr|=1;try{ai(99,v)}finally{xr=D,xr===0&&(Pf(),Tn())}},r.flushDiscreteUpdates=function(){!(xr&49)&&(sM(),Du())},r.flushPassiveEffects=Du,r.flushSync=RP,r.focusWithin=function(v,D){if(!qt)throw Error(c(363));for(v=Oy(v),D=A2(v,D),D=Array.from(D),v=0;v<D.length;){var Q=D[v++];if(!Pr(Q)){if(Q.tag===5&&Nr(Q.stateNode))return!0;for(Q=Q.child;Q!==null;)D.push(Q),Q=Q.sibling}}return!1},r.getCurrentUpdateLanePriority=function(){return cc},r.getFindAllNodesFailureDescription=function(v,D){if(!qt)throw Error(c(363));var Q=0,H=[];v=[Oy(v),0];for(var V=0;V<v.length;){var ne=v[V++],Se=v[V++],Ue=D[Se];if((ne.tag!==5||!Pr(ne))&&(Df(ne,Ue)&&(H.push(bf(Ue)),Se++,Se>Q&&(Q=Se)),Se<D.length))for(ne=ne.child;ne!==null;)v.push(ne,Se),ne=ne.sibling}if(Q<D.length){for(v=[];Q<D.length;Q++)v.push(bf(D[Q]));return`findAllNodes was able to match part of the selector:\n  `+(H.join(\" > \")+`\n\nNo matching component was found for:\n  `)+v.join(\" > \")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Re(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:f.ReactCurrentDispatcher,findHostInstanceByFiber:dM,findFiberByHostInstance:v.findFiberByHostInstance||mM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\")v=!1;else{var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!D.isDisabled&&D.supportsFiber)try{Xe=D.inject(v),Ha=D}catch{}v=!0}return v},r.observeVisibleRects=function(v,D,Q,H){if(!qt)throw Error(c(363));v=p2(v,D);var V=nn(v,Q,H).disconnect;return{disconnect:function(){V()}}},r.registerMutableSourceForHydration=function(v,D){var Q=D._getVersion;Q=Q(D._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[D,Q]:v.mutableSourceEagerHydrationData.push(D,Q)},r.runWithPriority=function(v,D){var Q=cc;try{return cc=v,D()}finally{cc=Q}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,D){var Q=xr;xr&=-2,xr|=8;try{return v(D)}finally{xr=Q,xr===0&&(Pf(),Tn())}},r.updateContainer=function(v,D,Q,H){var V=D.current,ne=To(),Se=vs(V);e:if(Q){Q=Q._reactInternals;t:{if(we(Q)!==Q||Q.tag!==1)throw Error(c(170));var Ue=Q;do{switch(Ue.tag){case 3:Ue=Ue.stateNode.context;break t;case 1:if(Jn(Ue.type)){Ue=Ue.stateNode.__reactInternalMemoizedMergedChildContext;break t}}Ue=Ue.return}while(Ue!==null);throw Error(c(171))}if(Q.tag===1){var At=Q.type;if(Jn(At)){Q=La(Q,At,Ue);break e}}Q=Ue}else Q=ca;return D.context===null?D.context=Q:D.pendingContext=Q,D=bl(ne,Se),D.payload={element:v},H=H===void 0?null:H,H!==null&&(D.callback=H),Pl(V,D),Rl(V,Se,ne),Se},r}});var UDe=L((Ghr,_De)=>{\"use strict\";_De.exports=MDe()});var jDe=L((Whr,HDe)=>{\"use strict\";var zPt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};HDe.exports=zPt});var YDe=L((Yhr,WDe)=>{\"use strict\";var ZPt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},LF=function(){function t(e,r){for(var s=0;s<r.length;s++){var a=r[s];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,s){return r&&t(e.prototype,r),s&&t(e,s),e}}();function DW(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bW(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}var rf=jDe(),XPt=function(){function t(e,r,s,a,n,c){bW(this,t),this.left=e,this.right=r,this.top=s,this.bottom=a,this.width=n,this.height=c}return LF(t,[{key:\"fromJS\",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:\"toString\",value:function(){return\"<Layout#\"+this.left+\":\"+this.right+\";\"+this.top+\":\"+this.bottom+\";\"+this.width+\":\"+this.height+\">\"}}]),t}(),qDe=function(){LF(t,null,[{key:\"fromJS\",value:function(r){var s=r.width,a=r.height;return new t(s,a)}}]);function t(e,r){bW(this,t),this.width=e,this.height=r}return LF(t,[{key:\"fromJS\",value:function(r){r(this.width,this.height)}},{key:\"toString\",value:function(){return\"<Size#\"+this.width+\"x\"+this.height+\">\"}}]),t}(),GDe=function(){function t(e,r){bW(this,t),this.unit=e,this.value=r}return LF(t,[{key:\"fromJS\",value:function(r){r(this.unit,this.value)}},{key:\"toString\",value:function(){switch(this.unit){case rf.UNIT_POINT:return String(this.value);case rf.UNIT_PERCENT:return this.value+\"%\";case rf.UNIT_AUTO:return\"auto\";default:return this.value+\"?\"}}},{key:\"valueOf\",value:function(){return this.value}}]),t}();WDe.exports=function(t,e){function r(c,f,p){var h=c[f];c[f]=function(){for(var E=arguments.length,C=Array(E),S=0;S<E;S++)C[S]=arguments[S];return p.call.apply(p,[this,h].concat(C))}}for(var s=[\"setPosition\",\"setMargin\",\"setFlexBasis\",\"setWidth\",\"setHeight\",\"setMinWidth\",\"setMinHeight\",\"setMaxWidth\",\"setMaxHeight\",\"setPadding\"],a=function(){var f,p=s[n],h=(f={},DW(f,rf.UNIT_POINT,e.Node.prototype[p]),DW(f,rf.UNIT_PERCENT,e.Node.prototype[p+\"Percent\"]),DW(f,rf.UNIT_AUTO,e.Node.prototype[p+\"Auto\"]),f);r(e.Node.prototype,p,function(E){for(var C=arguments.length,S=Array(C>1?C-1:0),P=1;P<C;P++)S[P-1]=arguments[P];var I=S.pop(),R=void 0,N=void 0;if(I===\"auto\")R=rf.UNIT_AUTO,N=void 0;else if(I instanceof GDe)R=I.unit,N=I.valueOf();else if(R=typeof I==\"string\"&&I.endsWith(\"%\")?rf.UNIT_PERCENT:rf.UNIT_POINT,N=parseFloat(I),!Number.isNaN(I)&&Number.isNaN(N))throw new Error(\"Invalid value \"+I+\" for \"+p);if(!h[R])throw new Error('Failed to execute \"'+p+`\": Unsupported unit '`+I+\"'\");if(N!==void 0){var U;return(U=h[R]).call.apply(U,[this].concat(S,[N]))}else{var W;return(W=h[R]).call.apply(W,[this].concat(S))}})},n=0;n<s.length;n++)a();return r(e.Config.prototype,\"free\",function(){e.Config.destroy(this)}),r(e.Node,\"create\",function(c,f){return f?e.Node.createWithConfig(f):e.Node.createDefault()}),r(e.Node.prototype,\"free\",function(){e.Node.destroy(this)}),r(e.Node.prototype,\"freeRecursive\",function(){for(var c=0,f=this.getChildCount();c<f;++c)this.getChild(0).freeRecursive();this.free()}),r(e.Node.prototype,\"setMeasureFunc\",function(c,f){return f?c.call(this,function(){return qDe.fromJS(f.apply(void 0,arguments))}):this.unsetMeasureFunc()}),r(e.Node.prototype,\"calculateLayout\",function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:rf.DIRECTION_LTR;return c.call(this,f,p,h)}),ZPt({Config:e.Config,Node:e.Node,Layout:t(\"Layout\",XPt),Size:t(\"Size\",qDe),Value:t(\"Value\",GDe),getInstanceCount:function(){return e.getInstanceCount.apply(e,arguments)}},rf)}});var VDe=L((exports,module)=>{(function(t,e){typeof define==\"function\"&&define.amd?define([],function(){return e}):typeof module==\"object\"&&module.exports?module.exports=e:(t.nbind=t.nbind||{}).init=e})(exports,function(Module,cb){typeof Module==\"function\"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(t,e){return function(){t&&t.apply(this,arguments);try{Module.ccall(\"nbind_init\")}catch(r){e(r);return}e(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module<\"u\"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT===\"WEB\")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT===\"WORKER\")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT===\"NODE\")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT===\"SHELL\")ENVIRONMENT_IS_SHELL=!0;else throw new Error(\"The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.\");else ENVIRONMENT_IS_WEB=typeof window==\"object\",ENVIRONMENT_IS_WORKER=typeof importScripts==\"function\",ENVIRONMENT_IS_NODE=typeof process==\"object\"&&typeof ye==\"function\"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(e,r){nodeFS||(nodeFS={}(\"\")),nodePath||(nodePath={}(\"\")),e=nodePath.normalize(e);var s=nodeFS.readFileSync(e);return r?s:s.toString()},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\\\/g,\"/\"):Module.thisProgram=\"unknown-program\"),Module.arguments=process.argv.slice(2),typeof module<\"u\"&&(module.exports=Module),Module.inspect=function(){return\"[Emscripten Module object]\"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<\"u\"&&(Module.printErr=printErr),typeof read<\"u\"?Module.read=read:Module.read=function(){throw\"no read() available\"},Module.readBinary=function(e){if(typeof readbuffer==\"function\")return new Uint8Array(readbuffer(e));var r=read(e,\"binary\");return assert(typeof r==\"object\"),r},typeof scriptArgs<\"u\"?Module.arguments=scriptArgs:typeof arguments<\"u\"&&(Module.arguments=arguments),typeof quit==\"function\"&&(Module.quit=function(t,e){quit(t)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(e){var r=new XMLHttpRequest;return r.open(\"GET\",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var r=new XMLHttpRequest;return r.open(\"GET\",e,!1),r.responseType=\"arraybuffer\",r.send(null),new Uint8Array(r.response)}),Module.readAsync=function(e,r,s){var a=new XMLHttpRequest;a.open(\"GET\",e,!0),a.responseType=\"arraybuffer\",a.onload=function(){a.status==200||a.status==0&&a.response?r(a.response):s()},a.onerror=s,a.send(null)},typeof arguments<\"u\"&&(Module.arguments=arguments),typeof console<\"u\")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<\"u\"?function(t){dump(t)}:function(t){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>\"u\"&&(Module.setWindowTitle=function(t){document.title=t})}else throw\"Unknown runtime environment. Where are we?\";function globalEval(t){eval.call(null,t)}!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram=\"./this.program\"),Module.quit||(Module.quit=function(t,e){throw e}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(t){return tempRet0=t,t},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(t){STACKTOP=t},getNativeTypeSize:function(t){switch(t){case\"i1\":case\"i8\":return 1;case\"i16\":return 2;case\"i32\":return 4;case\"i64\":return 8;case\"float\":return 4;case\"double\":return 8;default:{if(t[t.length-1]===\"*\")return Runtime.QUANTUM_SIZE;if(t[0]===\"i\"){var e=parseInt(t.substr(1));return assert(e%8===0),e/8}else return 0}}},getNativeFieldSize:function(t){return Math.max(Runtime.getNativeTypeSize(t),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(t,e){return e===\"double\"||e===\"i64\"?t&7&&(assert((t&7)===4),t+=4):assert((t&3)===0),t},getAlignSize:function(t,e,r){return!r&&(t==\"i64\"||t==\"double\")?8:t?Math.min(e||(t?Runtime.getNativeFieldSize(t):0),Runtime.QUANTUM_SIZE):Math.min(e,8)},dynCall:function(t,e,r){return r&&r.length?Module[\"dynCall_\"+t].apply(null,[e].concat(r)):Module[\"dynCall_\"+t].call(null,e)},functionPointers:[],addFunction:function(t){for(var e=0;e<Runtime.functionPointers.length;e++)if(!Runtime.functionPointers[e])return Runtime.functionPointers[e]=t,2*(1+e);throw\"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.\"},removeFunction:function(t){Runtime.functionPointers[(t-2)/2]=null},warnOnce:function(t){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[t]||(Runtime.warnOnce.shown[t]=1,Module.printErr(t))},funcWrappers:{},getFuncWrapper:function(t,e){if(t){assert(e),Runtime.funcWrappers[e]||(Runtime.funcWrappers[e]={});var r=Runtime.funcWrappers[e];return r[t]||(e.length===1?r[t]=function(){return Runtime.dynCall(e,t)}:e.length===2?r[t]=function(a){return Runtime.dynCall(e,t,[a])}:r[t]=function(){return Runtime.dynCall(e,t,Array.prototype.slice.call(arguments))}),r[t]}},getCompilerSetting:function(t){throw\"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work\"},stackAlloc:function(t){var e=STACKTOP;return STACKTOP=STACKTOP+t|0,STACKTOP=STACKTOP+15&-16,e},staticAlloc:function(t){var e=STATICTOP;return STATICTOP=STATICTOP+t|0,STATICTOP=STATICTOP+15&-16,e},dynamicAlloc:function(t){var e=HEAP32[DYNAMICTOP_PTR>>2],r=(e+t+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=r,r>=TOTAL_MEMORY){var s=enlargeMemory();if(!s)return HEAP32[DYNAMICTOP_PTR>>2]=e,0}return e},alignMemory:function(t,e){var r=t=Math.ceil(t/(e||16))*(e||16);return r},makeBigInt:function(t,e,r){var s=r?+(t>>>0)+ +(e>>>0)*4294967296:+(t>>>0)+ +(e|0)*4294967296;return s},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(t,e){t||abort(\"Assertion failed: \"+e)}function getCFunc(ident){var func=Module[\"_\"+ident];if(!func)try{func=eval(\"_\"+ident)}catch(t){}return assert(func,\"Cannot call unknown function \"+ident+\" (perhaps LLVM optimizations or closure removed it?)\"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(t){var e=Runtime.stackAlloc(t.length);return writeArrayToMemory(t,e),e},stringToC:function(t){var e=0;if(t!=null&&t!==0){var r=(t.length<<2)+1;e=Runtime.stackAlloc(r),stringToUTF8(t,e,r)}return e}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,s,a,n){var c=getCFunc(e),f=[],p=0;if(a)for(var h=0;h<a.length;h++){var E=toC[s[h]];E?(p===0&&(p=Runtime.stackSave()),f[h]=E(a[h])):f[h]=a[h]}var C=c.apply(null,f);if(r===\"string\"&&(C=Pointer_stringify(C)),p!==0){if(n&&n.async){EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(p)});return}Runtime.stackRestore(p)}return C};var sourceRegex=/^function\\s*[a-zA-Z$_0-9]*\\s*\\(([^)]*)\\)\\s*{\\s*([^*]*?)[\\s;]*(?:return\\s*(.*?)[;\\s]*)?}$/;function parseJSFunc(t){var e=t.toString().match(sourceRegex).slice(1);return{arguments:e[0],body:e[1],returnValue:e[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource){JSsource={};for(var t in JSfuncs)JSfuncs.hasOwnProperty(t)&&(JSsource[t]=parseJSFunc(JSfuncs[t]))}}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(t){return t===\"number\"}),numericRet=returnType!==\"string\";if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(t,e){return\"$\"+e}),funcstr=\"(function(\"+argNames.join(\",\")+\") {\",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+=\"var stack = \"+JSsource.stackSave.body+\";\";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if(type!==\"number\"){var convertCode=JSsource[type+\"ToC\"];funcstr+=\"var \"+convertCode.arguments+\" = \"+arg+\";\",funcstr+=convertCode.body+\";\",funcstr+=arg+\"=(\"+convertCode.returnValue+\");\"}}}var cfuncname=parseJSFunc(function(){return cfunc}).returnValue;if(funcstr+=\"var ret = \"+cfuncname+\"(\"+argNames.join(\",\")+\");\",!numericRet){var strgfy=parseJSFunc(function(){return Pointer_stringify}).returnValue;funcstr+=\"ret = \"+strgfy+\"(ret);\"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace(\"()\",\"(stack)\")+\";\"),funcstr+=\"return ret})\",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap;function setValue(t,e,r,s){switch(r=r||\"i8\",r.charAt(r.length-1)===\"*\"&&(r=\"i32\"),r){case\"i1\":HEAP8[t>>0]=e;break;case\"i8\":HEAP8[t>>0]=e;break;case\"i16\":HEAP16[t>>1]=e;break;case\"i32\":HEAP32[t>>2]=e;break;case\"i64\":tempI64=[e>>>0,(tempDouble=e,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t>>2]=tempI64[0],HEAP32[t+4>>2]=tempI64[1];break;case\"float\":HEAPF32[t>>2]=e;break;case\"double\":HEAPF64[t>>3]=e;break;default:abort(\"invalid type for setValue: \"+r)}}Module.setValue=setValue;function getValue(t,e,r){switch(e=e||\"i8\",e.charAt(e.length-1)===\"*\"&&(e=\"i32\"),e){case\"i1\":return HEAP8[t>>0];case\"i8\":return HEAP8[t>>0];case\"i16\":return HEAP16[t>>1];case\"i32\":return HEAP32[t>>2];case\"i64\":return HEAP32[t>>2];case\"float\":return HEAPF32[t>>2];case\"double\":return HEAPF64[t>>3];default:abort(\"invalid type for setValue: \"+e)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(t,e,r,s){var a,n;typeof t==\"number\"?(a=!0,n=t):(a=!1,n=t.length);var c=typeof e==\"string\"?e:null,f;if(r==ALLOC_NONE?f=s:f=[typeof _malloc==\"function\"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][r===void 0?ALLOC_STATIC:r](Math.max(n,c?1:e.length)),a){var s=f,p;for(assert((f&3)==0),p=f+(n&-4);s<p;s+=4)HEAP32[s>>2]=0;for(p=f+n;s<p;)HEAP8[s++>>0]=0;return f}if(c===\"i8\")return t.subarray||t.slice?HEAPU8.set(t,f):HEAPU8.set(new Uint8Array(t),f),f;for(var h=0,E,C,S;h<n;){var P=t[h];if(typeof P==\"function\"&&(P=Runtime.getFunctionIndex(P)),E=c||e[h],E===0){h++;continue}E==\"i64\"&&(E=\"i32\"),setValue(f+h,P,E),S!==E&&(C=Runtime.getNativeTypeSize(E),S=E),h+=C}return f}Module.allocate=allocate;function getMemory(t){return staticSealed?runtimeInitialized?_malloc(t):Runtime.dynamicAlloc(t):Runtime.staticAlloc(t)}Module.getMemory=getMemory;function Pointer_stringify(t,e){if(e===0||!t)return\"\";for(var r=0,s,a=0;s=HEAPU8[t+a>>0],r|=s,!(s==0&&!e||(a++,e&&a==e)););e||(e=a);var n=\"\";if(r<128){for(var c=1024,f;e>0;)f=String.fromCharCode.apply(String,HEAPU8.subarray(t,t+Math.min(e,c))),n=n?n+f:f,t+=c,e-=c;return n}return Module.UTF8ToString(t)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(t){for(var e=\"\";;){var r=HEAP8[t++>>0];if(!r)return e;e+=String.fromCharCode(r)}}Module.AsciiToString=AsciiToString;function stringToAscii(t,e){return writeAsciiToMemory(t,e,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<\"u\"?new TextDecoder(\"utf8\"):void 0;function UTF8ArrayToString(t,e){for(var r=e;t[r];)++r;if(r-e>16&&t.subarray&&UTF8Decoder)return UTF8Decoder.decode(t.subarray(e,r));for(var s,a,n,c,f,p,h=\"\";;){if(s=t[e++],!s)return h;if(!(s&128)){h+=String.fromCharCode(s);continue}if(a=t[e++]&63,(s&224)==192){h+=String.fromCharCode((s&31)<<6|a);continue}if(n=t[e++]&63,(s&240)==224?s=(s&15)<<12|a<<6|n:(c=t[e++]&63,(s&248)==240?s=(s&7)<<18|a<<12|n<<6|c:(f=t[e++]&63,(s&252)==248?s=(s&3)<<24|a<<18|n<<12|c<<6|f:(p=t[e++]&63,s=(s&1)<<30|a<<24|n<<18|c<<12|f<<6|p))),s<65536)h+=String.fromCharCode(s);else{var E=s-65536;h+=String.fromCharCode(55296|E>>10,56320|E&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(t){return UTF8ArrayToString(HEAPU8,t)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(t,e,r,s){if(!(s>0))return 0;for(var a=r,n=r+s-1,c=0;c<t.length;++c){var f=t.charCodeAt(c);if(f>=55296&&f<=57343&&(f=65536+((f&1023)<<10)|t.charCodeAt(++c)&1023),f<=127){if(r>=n)break;e[r++]=f}else if(f<=2047){if(r+1>=n)break;e[r++]=192|f>>6,e[r++]=128|f&63}else if(f<=65535){if(r+2>=n)break;e[r++]=224|f>>12,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=2097151){if(r+3>=n)break;e[r++]=240|f>>18,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=67108863){if(r+4>=n)break;e[r++]=248|f>>24,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else{if(r+5>=n)break;e[r++]=252|f>>30,e[r++]=128|f>>24&63,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}}return e[r]=0,r-a}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(t,e,r){return stringToUTF8Array(t,HEAPU8,e,r)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(t){for(var e=0,r=0;r<t.length;++r){var s=t.charCodeAt(r);s>=55296&&s<=57343&&(s=65536+((s&1023)<<10)|t.charCodeAt(++r)&1023),s<=127?++e:s<=2047?e+=2:s<=65535?e+=3:s<=2097151?e+=4:s<=67108863?e+=5:e+=6}return e}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder<\"u\"?new TextDecoder(\"utf-16le\"):void 0;function demangle(t){var e=Module.___cxa_demangle||Module.__cxa_demangle;if(e){try{var r=t.substr(1),s=lengthBytesUTF8(r)+1,a=_malloc(s);stringToUTF8(r,a,s);var n=_malloc(4),c=e(a,0,0,n);if(getValue(n,\"i32\")===0&&c)return Pointer_stringify(c)}catch{}finally{a&&_free(a),n&&_free(n),c&&_free(c)}return t}return Runtime.warnOnce(\"warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling\"),t}function demangleAll(t){var e=/__Z[\\w\\d_]+/g;return t.replace(e,function(r){var s=demangle(r);return r===s?r:r+\" [\"+s+\"]\"})}function jsStackTrace(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return\"(no stack trace available)\"}return t.stack.toString()}function stackTrace(){var t=jsStackTrace();return Module.extraStackTrace&&(t+=`\n`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort(\"Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value \"+TOTAL_MEMORY+\", (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 \")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr(\"TOTAL_MEMORY should be larger than TOTAL_STACK, was \"+TOTAL_MEMORY+\"! (TOTAL_STACK=\"+TOTAL_STACK+\")\"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw\"Runtime error: expected the system to be little-endian!\";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(t){for(;t.length>0;){var e=t.shift();if(typeof e==\"function\"){e();continue}var r=e.func;typeof r==\"number\"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun==\"function\"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun==\"function\"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var s=r>0?r:lengthBytesUTF8(t)+1,a=new Array(s),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var s=t[r];s>255&&(s&=255),e.push(String.fromCharCode(s))}return e.join(\"\")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce(\"writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!\");var s,a;r&&(a=e+lengthBytesUTF8(t),s=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var s=0;s<t.length;++s)HEAP8[e++>>0]=t.charCodeAt(s);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var s=e>>>16,a=e&65535,n=r>>>16,c=r&65535;return a*c+(s*c+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(t){return t}function addRunDependency(t){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(t){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(t,e,r,s,a,n,c,f){return _nbind.callbackSignatureList[t].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(t,e,r,s,a,n,c,f){return ASM_CONSTS[t](e,r,s,a,n,c,f)}function _emscripten_asm_const_iiiii(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiidddddd(t,e,r,s,a,n,c,f,p){return ASM_CONSTS[t](e,r,s,a,n,c,f,p)}function _emscripten_asm_const_iiididi(t,e,r,s,a,n,c){return ASM_CONSTS[t](e,r,s,a,n,c)}function _emscripten_asm_const_iiii(t,e,r,s){return ASM_CONSTS[t](e,r,s)}function _emscripten_asm_const_iiiid(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiiiii(t,e,r,s,a,n){return ASM_CONSTS[t](e,r,s,a,n)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],\"i8\",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(t,e){__ATEXIT__.unshift({func:t,arg:e})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr(\"missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj\"),abort(-1)}function __decorate(t,e,r,s){var a=arguments.length,n=a<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s,c;if(typeof Reflect==\"object\"&&typeof Reflect.decorate==\"function\")n=Reflect.decorate(t,e,r,s);else for(var f=t.length-1;f>=0;f--)(c=t[f])&&(n=(a<3?c(n):a>3?c(e,r,n):c(e,r))||n);return a>3&&n&&Object.defineProperty(e,r,n),n}function _defineHidden(t){return function(e,r){Object.defineProperty(e,r,{configurable:!1,enumerable:!1,value:t,writable:!0})}}var _nbind={};function __nbind_free_external(t){_nbind.externalList[t].dereference(t)}function __nbind_reference_external(t){_nbind.externalList[t].reference()}function _llvm_stackrestore(t){var e=_llvm_stacksave,r=e.LLVM_SAVEDSTACKS[t];e.LLVM_SAVEDSTACKS.splice(t,1),Runtime.stackRestore(r)}function __nbind_register_pool(t,e,r,s){_nbind.Pool.pageSize=t,_nbind.Pool.usedPtr=e/4,_nbind.Pool.rootPtr=r,_nbind.Pool.pagePtr=s/4,HEAP32[e/4]=16909060,HEAP8[e]==1&&(_nbind.bigEndian=!0),HEAP32[e/4]=0,_nbind.makeTypeKindTbl=(n={},n[1024]=_nbind.PrimitiveType,n[64]=_nbind.Int64Type,n[2048]=_nbind.BindClass,n[3072]=_nbind.BindClassPtr,n[4096]=_nbind.SharedClassPtr,n[5120]=_nbind.ArrayType,n[6144]=_nbind.ArrayType,n[7168]=_nbind.CStringType,n[9216]=_nbind.CallbackType,n[10240]=_nbind.BindType,n),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,\"cbFunction &\":_nbind.CallbackType,\"const cbFunction &\":_nbind.CallbackType,\"const std::string &\":_nbind.StringType,\"std::string\":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var a=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:\"\"});a.proto=Module,_nbind.BindClass.list.push(a);var n}function _emscripten_set_main_loop_timing(t,e){if(Browser.mainLoop.timingMode=t,Browser.mainLoop.timingValue=e,!Browser.mainLoop.func)return 1;if(t==0)Browser.mainLoop.scheduler=function(){var c=Math.max(0,Browser.mainLoop.tickStartTime+e-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,c)},Browser.mainLoop.method=\"timeout\";else if(t==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method=\"rAF\";else if(t==2){if(!window.setImmediate){let n=function(c){c.source===window&&c.data===s&&(c.stopPropagation(),r.shift()())};var a=n,r=[],s=\"setimmediate\";window.addEventListener(\"message\",n,!0),window.setImmediate=function(f){r.push(f),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(f),window.postMessage({target:s})):window.postMessage(s,\"*\")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method=\"immediate\"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(t,e,r,s,a){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,\"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.\"),Browser.mainLoop.func=t,Browser.mainLoop.arg=s;var n;typeof s<\"u\"?n=function(){Module.dynCall_vi(t,s)}:n=function(){Module.dynCall_v(t)};var c=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var p=Date.now(),h=Browser.mainLoop.queue.shift();if(h.func(h.arg),Browser.mainLoop.remainingBlockers){var E=Browser.mainLoop.remainingBlockers,C=E%1==0?E-1:Math.floor(E);h.counted?Browser.mainLoop.remainingBlockers=C:(C=C+.5,Browser.mainLoop.remainingBlockers=(8*E+C)/9)}if(console.log('main loop blocker \"'+h.name+'\" took '+(Date.now()-p)+\" ms\"),Browser.mainLoop.updateStatus(),c<Browser.mainLoop.currentlyRunningMainloop)return;setTimeout(Browser.mainLoop.runner,0);return}if(!(c<Browser.mainLoop.currentlyRunningMainloop)){if(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method===\"timeout\"&&Module.ctx&&(Module.printErr(\"Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!\"),Browser.mainLoop.method=\"\"),Browser.mainLoop.runIter(n),!(c<Browser.mainLoop.currentlyRunningMainloop)&&(typeof SDL==\"object\"&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Browser.mainLoop.scheduler())}}},a||(e&&e>0?_emscripten_set_main_loop_timing(0,1e3/e):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),r)throw\"SimulateInfiniteLoop\"}var Browser={mainLoop:{scheduler:null,method:\"\",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var t=Browser.mainLoop.timingMode,e=Browser.mainLoop.timingValue,r=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(r,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(t,e),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var t=Module.statusMessage||\"Please wait...\",e=Browser.mainLoop.remainingBlockers,r=Browser.mainLoop.expectedBlockers;e?e<r?Module.setStatus(t+\" (\"+(r-e)+\"/\"+r+\")\"):Module.setStatus(t):Module.setStatus(\"\")}},runIter:function(t){if(!ABORT){if(Module.preMainLoop){var e=Module.preMainLoop();if(e===!1)return}try{t()}catch(r){if(r instanceof ExitStatus)return;throw r&&typeof r==\"object\"&&r.stack&&Module.printErr(\"exception thrown: \"+[r,r.stack]),r}Module.postMainLoop&&Module.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(Module.preloadPlugins||(Module.preloadPlugins=[]),Browser.initted)return;Browser.initted=!0;try{new Blob,Browser.hasBlobConstructor=!0}catch{Browser.hasBlobConstructor=!1,console.log(\"warning: no blob constructor, cannot create blobs with mimetypes\")}Browser.BlobBuilder=typeof MozBlobBuilder<\"u\"?MozBlobBuilder:typeof WebKitBlobBuilder<\"u\"?WebKitBlobBuilder:Browser.hasBlobConstructor?null:console.log(\"warning: no BlobBuilder\"),Browser.URLObject=typeof window<\"u\"?window.URL?window.URL:window.webkitURL:void 0,!Module.noImageDecoding&&typeof Browser.URLObject>\"u\"&&(console.log(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\"),Module.noImageDecoding=!0);var t={};t.canHandle=function(n){return!Module.noImageDecoding&&/\\.(jpg|jpeg|png|bmp)$/i.test(n)},t.handle=function(n,c,f,p){var h=null;if(Browser.hasBlobConstructor)try{h=new Blob([n],{type:Browser.getMimetype(c)}),h.size!==n.length&&(h=new Blob([new Uint8Array(n).buffer],{type:Browser.getMimetype(c)}))}catch(P){Runtime.warnOnce(\"Blob constructor present but fails: \"+P+\"; falling back to blob builder\")}if(!h){var E=new Browser.BlobBuilder;E.append(new Uint8Array(n).buffer),h=E.getBlob()}var C=Browser.URLObject.createObjectURL(h),S=new Image;S.onload=function(){assert(S.complete,\"Image \"+c+\" could not be decoded\");var I=document.createElement(\"canvas\");I.width=S.width,I.height=S.height;var R=I.getContext(\"2d\");R.drawImage(S,0,0),Module.preloadedImages[c]=I,Browser.URLObject.revokeObjectURL(C),f&&f(n)},S.onerror=function(I){console.log(\"Image \"+C+\" could not be decoded\"),p&&p()},S.src=C},Module.preloadPlugins.push(t);var e={};e.canHandle=function(n){return!Module.noAudioDecoding&&n.substr(-4)in{\".ogg\":1,\".wav\":1,\".mp3\":1}},e.handle=function(n,c,f,p){var h=!1;function E(R){h||(h=!0,Module.preloadedAudios[c]=R,f&&f(n))}function C(){h||(h=!0,Module.preloadedAudios[c]=new Audio,p&&p())}if(Browser.hasBlobConstructor){try{var S=new Blob([n],{type:Browser.getMimetype(c)})}catch{return C()}var P=Browser.URLObject.createObjectURL(S),I=new Audio;I.addEventListener(\"canplaythrough\",function(){E(I)},!1),I.onerror=function(N){if(h)return;console.log(\"warning: browser could not fully decode audio \"+c+\", trying slower base64 approach\");function U(W){for(var te=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",ie=\"=\",Ae=\"\",ce=0,me=0,pe=0;pe<W.length;pe++)for(ce=ce<<8|W[pe],me+=8;me>=6;){var Be=ce>>me-6&63;me-=6,Ae+=te[Be]}return me==2?(Ae+=te[(ce&3)<<4],Ae+=ie+ie):me==4&&(Ae+=te[(ce&15)<<2],Ae+=ie),Ae}I.src=\"data:audio/x-\"+c.substr(-3)+\";base64,\"+U(n),E(I)},I.src=P,Browser.safeSetTimeout(function(){E(I)},1e4)}else return C()},Module.preloadPlugins.push(e);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var s=Module.canvas;s&&(s.requestPointerLock=s.requestPointerLock||s.mozRequestPointerLock||s.webkitRequestPointerLock||s.msRequestPointerLock||function(){},s.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},s.exitPointerLock=s.exitPointerLock.bind(document),document.addEventListener(\"pointerlockchange\",r,!1),document.addEventListener(\"mozpointerlockchange\",r,!1),document.addEventListener(\"webkitpointerlockchange\",r,!1),document.addEventListener(\"mspointerlockchange\",r,!1),Module.elementPointerLock&&s.addEventListener(\"click\",function(a){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext:function(t,e,r,s){if(e&&Module.ctx&&t==Module.canvas)return Module.ctx;var a,n;if(e){var c={antialias:!1,alpha:!1};if(s)for(var f in s)c[f]=s[f];n=GL.createContext(t,c),n&&(a=GL.getContext(n).GLctx)}else a=t.getContext(\"2d\");return a?(r&&(e||assert(typeof GLctx>\"u\",\"cannot set in module if GLctx is used, but we are a non-GL context that would replace it\"),Module.ctx=a,e&&GL.makeContextCurrent(n),Module.useWebGL=e,Browser.moduleContextCreatedCallbacks.forEach(function(p){p()}),Browser.init()),a):null},destroyContext:function(t,e,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,e,r){Browser.lockPointer=t,Browser.resizeCanvas=e,Browser.vrDevice=r,typeof Browser.lockPointer>\"u\"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>\"u\"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>\"u\"&&(Browser.vrDevice=null);var s=Module.canvas;function a(){Browser.isFullscreen=!1;var c=s.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===c?(s.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},s.exitFullscreen=s.exitFullscreen.bind(document),Browser.lockPointer&&s.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(c.parentNode.insertBefore(s,c),c.parentNode.removeChild(c),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(s)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener(\"fullscreenchange\",a,!1),document.addEventListener(\"mozfullscreenchange\",a,!1),document.addEventListener(\"webkitfullscreenchange\",a,!1),document.addEventListener(\"MSFullscreenChange\",a,!1));var n=document.createElement(\"div\");s.parentNode.insertBefore(n,s),n.appendChild(s),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?function(){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),r?n.requestFullscreen({vrDisplay:r}):n.requestFullscreen()},requestFullScreen:function(t,e,r){return Module.printErr(\"Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.\"),Browser.requestFullScreen=function(s,a,n){return Browser.requestFullscreen(s,a,n)},Browser.requestFullscreen(t,e,r)},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=e+1e3/60;else for(;e+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var r=Math.max(Browser.nextRAF-e,0);setTimeout(t,r)},requestAnimationFrame:function t(e){typeof window>\"u\"?Browser.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(t){return function(){if(!ABORT)return t.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var t=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],t.forEach(function(e){e()})}},safeRequestAnimationFrame:function(t){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))})},safeSetTimeout:function(t,e){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))},e)},safeSetInterval:function(t,e){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&t()},e)},getMimetype:function(t){return{jpg:\"image/jpeg\",jpeg:\"image/jpeg\",png:\"image/png\",bmp:\"image/bmp\",ogg:\"audio/ogg\",wav:\"audio/wav\",mp3:\"audio/mpeg\"}[t.substr(t.lastIndexOf(\".\")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case\"DOMMouseScroll\":e=t.detail;break;case\"mousewheel\":e=t.wheelDelta;break;case\"wheel\":e=t.deltaY;break;default:throw\"unrecognized mouse wheel event: \"+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Browser.pointerLock)t.type!=\"mousemove\"&&\"mozMovementX\"in t?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(t),Browser.mouseMovementY=Browser.getMovementY(t)),typeof SDL<\"u\"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var e=Module.canvas.getBoundingClientRect(),r=Module.canvas.width,s=Module.canvas.height,a=typeof window.scrollX<\"u\"?window.scrollX:window.pageXOffset,n=typeof window.scrollY<\"u\"?window.scrollY:window.pageYOffset;if(t.type===\"touchstart\"||t.type===\"touchend\"||t.type===\"touchmove\"){var c=t.touch;if(c===void 0)return;var f=c.pageX-(a+e.left),p=c.pageY-(n+e.top);f=f*(r/e.width),p=p*(s/e.height);var h={x:f,y:p};if(t.type===\"touchstart\")Browser.lastTouches[c.identifier]=h,Browser.touches[c.identifier]=h;else if(t.type===\"touchend\"||t.type===\"touchmove\"){var E=Browser.touches[c.identifier];E||(E=h),Browser.lastTouches[c.identifier]=E,Browser.touches[c.identifier]=h}return}var C=t.pageX-(a+e.left),S=t.pageY-(n+e.top);C=C*(r/e.width),S=S*(s/e.height),Browser.mouseMovementX=C-Browser.mouseX,Browser.mouseMovementY=S-Browser.mouseY,Browser.mouseX=C,Browser.mouseY=S}},asyncLoad:function(t,e,r,s){var a=s?\"\":\"al \"+t;Module.readAsync(t,function(n){assert(n,'Loading data file \"'+t+'\" failed (no arrayBuffer).'),e(new Uint8Array(n)),a&&removeRunDependency(a)},function(n){if(r)r();else throw'Loading data file \"'+t+'\" failed.'}),a&&addRunDependency(a)},resizeListeners:[],updateResizeListeners:function(){var t=Module.canvas;Browser.resizeListeners.forEach(function(e){e(t.width,t.height)})},setCanvasSize:function(t,e,r){var s=Module.canvas;Browser.updateCanvasDimensions(s,t,e),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL<\"u\"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<\"u\"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},updateCanvasDimensions:function(t,e,r){e&&r?(t.widthNative=e,t.heightNative=r):(e=t.widthNative,r=t.heightNative);var s=e,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(s/a<Module.forcedAspectRatio?s=Math.round(a*Module.forcedAspectRatio):a=Math.round(s/Module.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&typeof screen<\"u\"){var n=Math.min(screen.width/s,screen.height/a);s=Math.round(s*n),a=Math.round(a*n)}Browser.resizeCanvas?(t.width!=s&&(t.width=s),t.height!=a&&(t.height=a),typeof t.style<\"u\"&&(t.style.removeProperty(\"width\"),t.style.removeProperty(\"height\"))):(t.width!=e&&(t.width=e),t.height!=r&&(t.height=r),typeof t.style<\"u\"&&(s!=e||a!=r?(t.style.setProperty(\"width\",s+\"px\",\"important\"),t.style.setProperty(\"height\",a+\"px\",\"important\")):(t.style.removeProperty(\"width\"),t.style.removeProperty(\"height\"))))},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var t=Browser.nextWgetRequestHandle;return Browser.nextWgetRequestHandle++,t}},SYSCALLS={varargs:0,get:function(t){SYSCALLS.varargs+=4;var e=HEAP32[SYSCALLS.varargs-4>>2];return e},getStr:function(){var t=Pointer_stringify(SYSCALLS.get());return t},get64:function(){var t=SYSCALLS.get(),e=SYSCALLS.get();return t>=0?assert(e===0):assert(e===-1),t},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(s){return(typeof FS>\"u\"||!(s instanceof FS.ErrnoError))&&abort(s),-s.errno}}function ___syscall54(t,e){SYSCALLS.varargs=e;try{return 0}catch(r){return(typeof FS>\"u\"||!(r instanceof FS.ErrnoError))&&abort(r),-r.errno}}function _typeModule(t){var e=[[0,1,\"X\"],[1,1,\"const X\"],[128,1,\"X *\"],[256,1,\"X &\"],[384,1,\"X &&\"],[512,1,\"std::shared_ptr<X>\"],[640,1,\"std::unique_ptr<X>\"],[5120,1,\"std::vector<X>\"],[6144,2,\"std::array<X, Y>\"],[9216,-1,\"std::function<X (Y)>\"]];function r(p,h,E,C,S,P){if(h==1){var I=C&896;(I==128||I==256||I==384)&&(p=\"X const\")}var R;return P?R=E.replace(\"X\",p).replace(\"Y\",S):R=p.replace(\"X\",E).replace(\"Y\",S),R.replace(/([*&]) (?=[*&])/g,\"$1\")}function s(p,h,E,C,S){throw new Error(p+\" type \"+E.replace(\"X\",h+\"?\")+(C?\" with flag \"+C:\"\")+\" in \"+S)}function a(p,h,E,C,S,P,I,R){P===void 0&&(P=\"X\"),R===void 0&&(R=1);var N=E(p);if(N)return N;var U=C(p),W=U.placeholderFlag,te=e[W];I&&te&&(P=r(I[2],I[0],P,te[0],\"?\",!0));var ie;W==0&&(ie=\"Unbound\"),W>=10&&(ie=\"Corrupt\"),R>20&&(ie=\"Deeply nested\"),ie&&s(ie,p,P,W,S||\"?\");var Ae=U.paramList[0],ce=a(Ae,h,E,C,S,P,te,R+1),me,pe={flags:te[0],id:p,name:\"\",paramList:[ce]},Be=[],Ce=\"?\";switch(U.placeholderFlag){case 1:me=ce.spec;break;case 2:if((ce.flags&15360)==1024&&ce.spec.ptrSize==1){pe.flags=7168;break}case 3:case 6:case 5:me=ce.spec,ce.flags&15360;break;case 8:Ce=\"\"+U.paramList[1],pe.paramList.push(U.paramList[1]);break;case 9:for(var g=0,we=U.paramList[1];g<we.length;g++){var Ee=we[g],fe=a(Ee,h,E,C,S,P,te,R+1);Be.push(fe.name),pe.paramList.push(fe)}Ce=Be.join(\", \");break;default:break}if(pe.name=r(te[2],te[0],ce.name,ce.flags,Ce),me){for(var se=0,X=Object.keys(me);se<X.length;se++){var De=X[se];pe[De]=pe[De]||me[De]}pe.flags|=me.flags}return n(h,pe)}function n(p,h){var E=h.flags,C=E&896,S=E&15360;return!h.name&&S==1024&&(h.ptrSize==1?h.name=(E&16?\"\":(E&8?\"un\":\"\")+\"signed \")+\"char\":h.name=(E&8?\"u\":\"\")+(E&32?\"float\":\"int\")+(h.ptrSize*8+\"_t\")),h.ptrSize==8&&!(E&32)&&(S=64),S==2048&&(C==512||C==640?S=4096:C&&(S=3072)),p(S,h)}var c=function(){function p(h){this.id=h.id,this.name=h.name,this.flags=h.flags,this.spec=h}return p.prototype.toString=function(){return this.name},p}(),f={Type:c,getComplexType:a,makeType:n,structureList:e};return t.output=f,t.output||f}function __nbind_register_type(t,e){var r=_nbind.readAsciiString(e),s={flags:10240,id:t,name:r};_nbind.makeType(_nbind.constructType,s)}function __nbind_register_callback_signature(t,e){var r=_nbind.readTypeIdList(t,e),s=_nbind.callbackSignatureList.length;return _nbind.callbackSignatureList[s]=_nbind.makeJSCaller(r),s}function __extends(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function s(){this.constructor=t}s.prototype=e.prototype,t.prototype=new s}function __nbind_register_class(t,e,r,s,a,n,c){var f=_nbind.readAsciiString(c),p=_nbind.readPolicyList(e),h=HEAPU32.subarray(t/4,t/4+2),E={flags:2048|(p.Value?2:0),id:h[0],name:f},C=_nbind.makeType(_nbind.constructType,E);C.ptrType=_nbind.getComplexType(h[1],_nbind.constructType,_nbind.getType,_nbind.queryType),C.destroy=_nbind.makeMethodCaller(C.ptrType,{boundID:E.id,flags:0,name:\"destroy\",num:0,ptr:n,title:C.name+\".free\",typeList:[\"void\",\"uint32_t\",\"uint32_t\"]}),a&&(C.superIdList=Array.prototype.slice.call(HEAPU32.subarray(r/4,r/4+a)),C.upcastList=Array.prototype.slice.call(HEAPU32.subarray(s/4,s/4+a))),Module[C.name]=C.makeBound(p),_nbind.BindClass.list.push(C)}function _removeAccessorPrefix(t){var e=/^[Gg]et_?([A-Z]?([A-Z]?))/;return t.replace(e,function(r,s,a){return a?s:s.toLowerCase()})}function __nbind_register_function(t,e,r,s,a,n,c,f,p,h){var E=_nbind.getType(t),C=_nbind.readPolicyList(e),S=_nbind.readTypeIdList(r,s),P;if(c==5)P=[{direct:a,name:\"__nbindConstructor\",ptr:0,title:E.name+\" constructor\",typeList:[\"uint32_t\"].concat(S.slice(1))},{direct:n,name:\"__nbindValueConstructor\",ptr:0,title:E.name+\" value constructor\",typeList:[\"void\",\"uint32_t\"].concat(S.slice(1))}];else{var I=_nbind.readAsciiString(f),R=(E.name&&E.name+\".\")+I;(c==3||c==4)&&(I=_removeAccessorPrefix(I)),P=[{boundID:t,direct:n,name:I,ptr:a,title:R,typeList:S}]}for(var N=0,U=P;N<U.length;N++){var W=U[N];W.signatureType=c,W.policyTbl=C,W.num=p,W.flags=h,E.addMethod(W)}}function _nbind_value(t,e){_nbind.typeNameTbl[t]||_nbind.throwError(\"Unknown value type \"+t),Module.NBind.bind_value(t,e),_defineHidden(_nbind.typeNameTbl[t].proto.prototype.__nbindValueConstructor)(e.prototype,\"__nbindValueConstructor\")}Module._nbind_value=_nbind_value;function __nbind_get_value_object(t,e){var r=_nbind.popValue(t);if(!r.fromJS)throw new Error(\"Object \"+r+\" has no fromJS function\");r.fromJS(function(){r.__nbindValueConstructor.apply(this,Array.prototype.concat.apply([e],arguments))})}function _emscripten_memcpy_big(t,e,r){return HEAPU8.set(HEAPU8.subarray(e,e+r),t),t}function __nbind_register_primitive(t,e,r){var s={flags:1024|r,id:t,ptrSize:e};_nbind.makeType(_nbind.constructType,s)}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],\"i8\",ALLOC_STATIC);function ___setErrNo(t){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=t),t}function _llvm_stacksave(){var t=_llvm_stacksave;return t.LLVM_SAVEDSTACKS||(t.LLVM_SAVEDSTACKS=[]),t.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),t.LLVM_SAVEDSTACKS.length-1}function ___syscall140(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=SYSCALLS.get(),c=SYSCALLS.get(),f=a;return FS.llseek(r,f,c),HEAP32[n>>2]=r.position,r.getdents&&f===0&&c===0&&(r.getdents=null),0}catch(p){return(typeof FS>\"u\"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall146(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.get(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(E,C){var S=___syscall146.buffers[E];assert(S),C===0||C===10?((E===1?Module.print:Module.printErr)(UTF8ArrayToString(S,0)),S.length=0):S.push(C)});for(var c=0;c<a;c++){for(var f=HEAP32[s+c*8>>2],p=HEAP32[s+(c*8+4)>>2],h=0;h<p;h++)___syscall146.printChar(r,HEAPU8[f+h]);n+=p}return n}catch(E){return(typeof FS>\"u\"||!(E instanceof FS.ErrnoError))&&abort(E),-E.errno}}function __nbind_finish(){for(var t=0,e=_nbind.BindClass.list;t<e.length;t++){var r=e[t];r.finish()}}var ___dso_handle=STATICTOP;STATICTOP+=16,function(_nbind){var typeIdTbl={};_nbind.typeNameTbl={};var Pool=function(){function t(){}return t.lalloc=function(e){e=e+7&-8;var r=HEAPU32[t.usedPtr];if(e>t.pageSize/2||e>t.pageSize-r){var s=_nbind.typeNameTbl.NBind.proto;return s.lalloc(e)}else return HEAPU32[t.usedPtr]=r+e,t.rootPtr+r},t.lreset=function(e,r){var s=HEAPU32[t.pagePtr];if(s){var a=_nbind.typeNameTbl.NBind.proto;a.lreset(e,r)}else HEAPU32[t.usedPtr]=e},t}();_nbind.Pool=Pool;function constructType(t,e){var r=t==10240?_nbind.makeTypeNameTbl[e.name]||_nbind.BindType:_nbind.makeTypeKindTbl[t],s=new r(e);return typeIdTbl[e.id]=s,_nbind.typeNameTbl[e.name]=s,s}_nbind.constructType=constructType;function getType(t){return typeIdTbl[t]}_nbind.getType=getType;function queryType(t){var e=HEAPU8[t],r=_nbind.structureList[e][1];t/=4,r<0&&(++t,r=HEAPU32[t]+1);var s=Array.prototype.slice.call(HEAPU32.subarray(t+1,t+1+r));return e==9&&(s=[s[0],s.slice(1)]),{paramList:s,placeholderFlag:e}}_nbind.queryType=queryType;function getTypes(t,e){return t.map(function(r){return typeof r==\"number\"?_nbind.getComplexType(r,constructType,getType,queryType,e):_nbind.typeNameTbl[r]})}_nbind.getTypes=getTypes;function readTypeIdList(t,e){return Array.prototype.slice.call(HEAPU32,t/4,t/4+e)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(t){for(var e=t;HEAPU8[e++];);return String.fromCharCode.apply(\"\",HEAPU8.subarray(t,e-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(t){var e={};if(t)for(;;){var r=HEAPU32[t/4];if(!r)break;e[readAsciiString(r)]=!0,t+=4}return e}_nbind.readPolicyList=readPolicyList;function getDynCall(t,e){var r={float32_t:\"d\",float64_t:\"d\",int64_t:\"d\",uint64_t:\"d\",void:\"v\"},s=t.map(function(n){return r[n.name]||\"i\"}).join(\"\"),a=Module[\"dynCall_\"+s];if(!a)throw new Error(\"dynCall_\"+s+\" not found for \"+e+\"(\"+t.map(function(n){return n.name}).join(\", \")+\")\");return a}_nbind.getDynCall=getDynCall;function addMethod(t,e,r,s){var a=t[e];t.hasOwnProperty(e)&&a?((a.arity||a.arity===0)&&(a=_nbind.makeOverloader(a,a.arity),t[e]=a),a.addMethod(r,s)):(r.arity=s,t[e]=r)}_nbind.addMethod=addMethod;function throwError(t){throw new Error(t)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.heap=HEAPU32,r.ptrSize=4,r}return e.prototype.needsWireRead=function(r){return!!this.wireRead||!!this.makeWireRead},e.prototype.needsWireWrite=function(r){return!!this.wireWrite||!!this.makeWireWrite},e}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this,a=r.flags&32?{32:HEAPF32,64:HEAPF64}:r.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return s.heap=a[r.ptrSize*8],s.ptrSize=r.ptrSize,s}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a==\"number\")return a;throw new Error(\"Type mismatch\")}},e}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(t,e){if(t==null){if(e&&e.Nullable)return 0;throw new Error(\"Type mismatch\")}if(e&&e.Strict){if(typeof t!=\"string\")throw new Error(\"Type mismatch\")}else t=t.toString();var r=Module.lengthBytesUTF8(t)+1,s=_nbind.Pool.lalloc(r);return Module.stringToUTF8Array(t,HEAPU8,s,r),s}_nbind.pushCString=pushCString;function popCString(t){return t===0?null:Module.Pointer_stringify(t)}_nbind.popCString=popCString;var CStringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popCString,r.wireWrite=pushCString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushCString(a,s)}},e}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=function(s){return!!s},r}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireRead=function(r){return\"!!(\"+r+\")\"},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a==\"boolean\")return a;throw new Error(\"Type mismatch\")}||r},e}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function t(){}return t.prototype.persist=function(){this.__nbindState|=1},t}();_nbind.Wrapper=Wrapper;function makeBound(t,e){var r=function(s){__extends(a,s);function a(n,c,f,p){var h=s.call(this)||this;if(!(h instanceof a))return new(Function.prototype.bind.apply(a,Array.prototype.concat.apply([null],arguments)));var E=c,C=f,S=p;if(n!==_nbind.ptrMarker){var P=h.__nbindConstructor.apply(h,arguments);E=4608,S=HEAPU32[P/4],C=HEAPU32[P/4+1]}var I={configurable:!0,enumerable:!1,value:null,writable:!1},R={__nbindFlags:E,__nbindPtr:C};S&&(R.__nbindShared=S,_nbind.mark(h));for(var N=0,U=Object.keys(R);N<U.length;N++){var W=U[N];I.value=R[W],Object.defineProperty(h,W,I)}return _defineHidden(0)(h,\"__nbindState\"),h}return a.prototype.free=function(){e.destroy.call(this,this.__nbindShared,this.__nbindFlags),this.__nbindState|=2,disableMember(this,\"__nbindShared\"),disableMember(this,\"__nbindPtr\")},a}(Wrapper);return __decorate([_defineHidden()],r.prototype,\"__nbindConstructor\",void 0),__decorate([_defineHidden()],r.prototype,\"__nbindValueConstructor\",void 0),__decorate([_defineHidden(t)],r.prototype,\"__nbindPolicies\",void 0),r}_nbind.makeBound=makeBound;function disableMember(t,e){function r(){throw new Error(\"Accessing deleted object\")}Object.defineProperty(t,e,{configurable:!1,enumerable:!1,get:r,set:r})}_nbind.ptrMarker={};var BindClass=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;return s.wireRead=function(a){return _nbind.popValue(a,s.ptrType)},s.wireWrite=function(a){return pushPointer(a,s.ptrType,!0)},s.pendingSuperCount=0,s.ready=!1,s.methodTbl={},r.paramList?(s.classType=r.paramList[0].classType,s.proto=s.classType.proto):s.classType=s,s}return e.prototype.makeBound=function(r){var s=_nbind.makeBound(r,this);return this.proto=s,this.ptrType.proto=s,s},e.prototype.addMethod=function(r){var s=this.methodTbl[r.name]||[];s.push(r),this.methodTbl[r.name]=s},e.prototype.registerMethods=function(r,s){for(var a,n=0,c=Object.keys(r.methodTbl);n<c.length;n++)for(var f=c[n],p=r.methodTbl[f],h=0,E=p;h<E.length;h++){var C=E[h],S=void 0,P=void 0;if(S=this.proto.prototype,!(s&&C.signatureType!=1))switch(C.signatureType){case 1:S=this.proto;case 5:P=_nbind.makeCaller(C),_nbind.addMethod(S,C.name,P,C.typeList.length-1);break;case 4:a=_nbind.makeMethodCaller(r.ptrType,C);break;case 3:Object.defineProperty(S,C.name,{configurable:!0,enumerable:!1,get:_nbind.makeMethodCaller(r.ptrType,C),set:a});break;case 2:P=_nbind.makeMethodCaller(r.ptrType,C),_nbind.addMethod(S,C.name,P,C.typeList.length-1);break;default:break}}},e.prototype.registerSuperMethods=function(r,s,a){if(!a[r.name]){a[r.name]=!0;for(var n=0,c,f=0,p=r.superIdList||[];f<p.length;f++){var h=p[f],E=_nbind.getType(h);n++<s||s<0?c=-1:c=0,this.registerSuperMethods(E,c,a)}this.registerMethods(r,s<0)}},e.prototype.finish=function(){if(this.ready)return this;this.ready=!0,this.superList=(this.superIdList||[]).map(function(a){return _nbind.getType(a).finish()});var r=this.proto;if(this.superList.length){var s=function(){this.constructor=r};s.prototype=this.superList[0].proto.prototype,r.prototype=new s}return r!=Module&&(r.prototype.__nbindType=this),this.registerSuperMethods(this,1,{}),this},e.prototype.upcastStep=function(r,s){if(r==this)return s;for(var a=0;a<this.superList.length;++a){var n=this.superList[a].upcastStep(r,_nbind.callUpcast(this.upcastList[a],s));if(n)return n}return 0},e}(_nbind.BindType);BindClass.list=[],_nbind.BindClass=BindClass;function popPointer(t,e){return t?new e.proto(_nbind.ptrMarker,e.flags,t):null}_nbind.popPointer=popPointer;function pushPointer(t,e,r){if(!(t instanceof _nbind.Wrapper)){if(r)return _nbind.pushValue(t);throw new Error(\"Type mismatch\")}var s=t.__nbindPtr,a=t.__nbindType.classType,n=e.classType;if(t instanceof e.proto)for(;a!=n;)s=_nbind.callUpcast(a.upcastList[0],s),a=a.superList[0];else if(s=a.upcastStep(n,s),!s)throw new Error(\"Type mismatch\");return s}_nbind.pushPointer=pushPointer;function pushMutablePointer(t,e){var r=pushPointer(t,e);if(t.__nbindFlags&1)throw new Error(\"Passing a const value as a non-const argument\");return r}var BindClassPtr=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;s.classType=r.paramList[0].classType,s.proto=s.classType.proto;var a=r.flags&1,n=(s.flags&896)==256&&r.flags&2,c=a?pushPointer:pushMutablePointer,f=n?_nbind.popValue:popPointer;return s.makeWireWrite=function(p,h){return h.Nullable?function(E){return E?c(E,s):0}:function(E){return c(E,s)}},s.wireRead=function(p){return f(p,s)},s.wireWrite=function(p){return c(p,s)},s}return e}(_nbind.BindType);_nbind.BindClassPtr=BindClassPtr;function popShared(t,e){var r=HEAPU32[t/4],s=HEAPU32[t/4+1];return s?new e.proto(_nbind.ptrMarker,e.flags,s,r):null}_nbind.popShared=popShared;function pushShared(t,e){if(!(t instanceof e.proto))throw new Error(\"Type mismatch\");return t.__nbindShared}function pushMutableShared(t,e){if(!(t instanceof e.proto))throw new Error(\"Type mismatch\");if(t.__nbindFlags&1)throw new Error(\"Passing a const value as a non-const argument\");return t.__nbindShared}var SharedClassPtr=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;s.readResources=[_nbind.resources.pool],s.classType=r.paramList[0].classType,s.proto=s.classType.proto;var a=r.flags&1,n=a?pushShared:pushMutableShared;return s.wireRead=function(c){return popShared(c,s)},s.wireWrite=function(c){return n(c,s)},s}return e}(_nbind.BindType);_nbind.SharedClassPtr=SharedClassPtr,_nbind.externalList=[0];var firstFreeExternal=0,External=function(){function t(e){this.refCount=1,this.data=e}return t.prototype.register=function(){var e=firstFreeExternal;return e?firstFreeExternal=_nbind.externalList[e]:e=_nbind.externalList.length,_nbind.externalList[e]=this,e},t.prototype.reference=function(){++this.refCount},t.prototype.dereference=function(e){--this.refCount==0&&(this.free&&this.free(),_nbind.externalList[e]=firstFreeExternal,firstFreeExternal=e)},t}();_nbind.External=External;function popExternal(t){var e=_nbind.externalList[t];return e.dereference(t),e.data}function pushExternal(t){var e=new External(t);return e.reference(),e.register()}var ExternalType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popExternal,r.wireWrite=pushExternal,r}return e}(_nbind.BindType);_nbind.ExternalType=ExternalType,_nbind.callbackSignatureList=[];var CallbackType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=function(s){return typeof s!=\"function\"&&_nbind.throwError(\"Type mismatch\"),new _nbind.External(s).register()},r}return e}(_nbind.BindType);_nbind.CallbackType=CallbackType,_nbind.valueList=[0];var firstFreeValue=0;function pushValue(t){var e=firstFreeValue;return e?firstFreeValue=_nbind.valueList[e]:e=_nbind.valueList.length,_nbind.valueList[e]=t,e*2+1}_nbind.pushValue=pushValue;function popValue(t,e){if(t||_nbind.throwError(\"Value type JavaScript class is missing or not registered\"),t&1){t>>=1;var r=_nbind.valueList[t];return _nbind.valueList[t]=firstFreeValue,firstFreeValue=t,r}else{if(e)return _nbind.popShared(t,e);throw new Error(\"Invalid value slot \"+t)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(t){return typeof t==\"number\"?t:pushValue(t)*4096+valueBase}function pop64(t){return t<valueBase?t:popValue((t-valueBase)/4096)}var CreateValueType=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeWireWrite=function(r){return\"(_nbind.pushValue(new \"+r+\"))\"},e}(_nbind.BindType);_nbind.CreateValueType=CreateValueType;var Int64Type=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=push64,r.wireRead=pop64,r}return e}(_nbind.BindType);_nbind.Int64Type=Int64Type;function pushArray(t,e){if(!t)return 0;var r=t.length;if((e.size||e.size===0)&&r<e.size)throw new Error(\"Type mismatch\");var s=e.memberType.ptrSize,a=_nbind.Pool.lalloc(4+r*s);HEAPU32[a/4]=r;var n=e.memberType.heap,c=(a+4)/s,f=e.memberType.wireWrite,p=0;if(f)for(;p<r;)n[c++]=f(t[p++]);else for(;p<r;)n[c++]=t[p++];return a}_nbind.pushArray=pushArray;function popArray(t,e){if(t===0)return null;var r=HEAPU32[t/4],s=new Array(r),a=e.memberType.heap;t=(t+4)/e.memberType.ptrSize;var n=e.memberType.wireRead,c=0;if(n)for(;c<r;)s[c++]=n(a[t++]);else for(;c<r;)s[c++]=a[t++];return s}_nbind.popArray=popArray;var ArrayType=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;return s.wireRead=function(a){return popArray(a,s)},s.wireWrite=function(a){return pushArray(a,s)},s.readResources=[_nbind.resources.pool],s.writeResources=[_nbind.resources.pool],s.memberType=r.paramList[0],r.paramList[1]&&(s.size=r.paramList[1]),s}return e}(_nbind.BindType);_nbind.ArrayType=ArrayType;function pushString(t,e){if(t==null)if(e&&e.Nullable)t=\"\";else throw new Error(\"Type mismatch\");if(e&&e.Strict){if(typeof t!=\"string\")throw new Error(\"Type mismatch\")}else t=t.toString();var r=Module.lengthBytesUTF8(t),s=_nbind.Pool.lalloc(4+r+1);return HEAPU32[s/4]=r,Module.stringToUTF8Array(t,HEAPU8,s+4,r+1),s}_nbind.pushString=pushString;function popString(t){if(t===0)return null;var e=HEAPU32[t/4];return Module.Pointer_stringify(t+4,e)}_nbind.popString=popString;var StringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popString,r.wireWrite=pushString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushString(a,s)}},e}(_nbind.BindType);_nbind.StringType=StringType;function makeArgList(t){return Array.apply(null,Array(t)).map(function(e,r){return\"a\"+(r+1)})}function anyNeedsWireWrite(t,e){return t.reduce(function(r,s){return r||s.needsWireWrite(e)},!1)}function anyNeedsWireRead(t,e){return t.reduce(function(r,s){return r||!!s.needsWireRead(e)},!1)}function makeWireRead(t,e,r,s){var a=t.length;return r.makeWireRead?r.makeWireRead(s,t,a):r.wireRead?(t[a]=r.wireRead,\"(convertParamList[\"+a+\"](\"+s+\"))\"):s}function makeWireWrite(t,e,r,s){var a,n=t.length;return r.makeWireWrite?a=r.makeWireWrite(s,e,t,n):a=r.wireWrite,a?typeof a==\"string\"?a:(t[n]=a,\"(convertParamList[\"+n+\"](\"+s+\"))\"):s}function buildCallerFunction(dynCall,ptrType,ptr,num,policyTbl,needsWireWrite,prefix,returnType,argTypeList,mask,err){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireRead(convertParamList,policyTbl,returnType,\"dynCall(\"+[prefix].concat(argList.map(function(t,e){return makeWireWrite(convertParamList,policyTbl,argTypeList[e],t)})).join(\",\")+\")\"),resourceSet=_nbind.listResources([returnType],argTypeList),sourceCode=\"function(\"+argList.join(\",\")+\"){\"+(mask?\"this.__nbindFlags&mask&&err();\":\"\")+resourceSet.makeOpen()+\"var r=\"+callExpression+\";\"+resourceSet.makeClose()+\"return r;}\";return eval(\"(\"+sourceCode+\")\")}function buildJSCallerFunction(returnType,argTypeList){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireWrite(convertParamList,null,returnType,\"_nbind.externalList[num].data(\"+argList.map(function(t,e){return makeWireRead(convertParamList,null,argTypeList[e],t)}).join(\",\")+\")\"),resourceSet=_nbind.listResources(argTypeList,[returnType]);resourceSet.remove(_nbind.resources.pool);var sourceCode=\"function(\"+[\"dummy\",\"num\"].concat(argList).join(\",\")+\"){\"+resourceSet.makeOpen()+\"var r=\"+callExpression+\";\"+resourceSet.makeClose()+\"return r;}\";return eval(\"(\"+sourceCode+\")\")}_nbind.buildJSCallerFunction=buildJSCallerFunction;function makeJSCaller(t){var e=t.length-1,r=_nbind.getTypes(t,\"callback\"),s=r[0],a=r.slice(1),n=anyNeedsWireRead(a,null),c=s.needsWireWrite(null);if(!c&&!n)switch(e){case 0:return function(f,p){return _nbind.externalList[p].data()};case 1:return function(f,p,h){return _nbind.externalList[p].data(h)};case 2:return function(f,p,h,E){return _nbind.externalList[p].data(h,E)};case 3:return function(f,p,h,E,C){return _nbind.externalList[p].data(h,E,C)};default:break}return buildJSCallerFunction(s,a)}_nbind.makeJSCaller=makeJSCaller;function makeMethodCaller(t,e){var r=e.typeList.length-1,s=e.typeList.slice(0);s.splice(1,0,\"uint32_t\",e.boundID);var a=_nbind.getTypes(s,e.title),n=a[0],c=a.slice(3),f=n.needsWireRead(e.policyTbl),p=anyNeedsWireWrite(c,e.policyTbl),h=e.ptr,E=e.num,C=_nbind.getDynCall(a,e.title),S=~e.flags&1;function P(){throw new Error(\"Calling a non-const method on a const object\")}if(!f&&!p)switch(r){case 0:return function(){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t))};case 1:return function(I){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t),I)};case 2:return function(I,R){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t),I,R)};case 3:return function(I,R,N){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t),I,R,N)};default:break}return buildCallerFunction(C,t,h,E,e.policyTbl,p,\"ptr,num,pushPointer(this,ptrType)\",n,c,S,P)}_nbind.makeMethodCaller=makeMethodCaller;function makeCaller(t){var e=t.typeList.length-1,r=_nbind.getTypes(t.typeList,t.title),s=r[0],a=r.slice(1),n=s.needsWireRead(t.policyTbl),c=anyNeedsWireWrite(a,t.policyTbl),f=t.direct,p=t.ptr;if(t.direct&&!n&&!c){var h=_nbind.getDynCall(r,t.title);switch(e){case 0:return function(){return h(f)};case 1:return function(P){return h(f,P)};case 2:return function(P,I){return h(f,P,I)};case 3:return function(P,I,R){return h(f,P,I,R)};default:break}p=0}var E;if(p){var C=t.typeList.slice(0);C.splice(1,0,\"uint32_t\"),r=_nbind.getTypes(C,t.title),E=\"ptr,num\"}else p=f,E=\"ptr\";var S=_nbind.getDynCall(r,t.title);return buildCallerFunction(S,null,p,t.num,t.policyTbl,c,E,s,a)}_nbind.makeCaller=makeCaller;function makeOverloader(t,e){var r=[];function s(){return r[arguments.length].apply(this,arguments)}return s.addMethod=function(a,n){r[n]=a},s.addMethod(t,e),s}_nbind.makeOverloader=makeOverloader;var Resource=function(){function t(e,r){var s=this;this.makeOpen=function(){return Object.keys(s.openTbl).join(\"\")},this.makeClose=function(){return Object.keys(s.closeTbl).join(\"\")},this.openTbl={},this.closeTbl={},e&&(this.openTbl[e]=!0),r&&(this.closeTbl[r]=!0)}return t.prototype.add=function(e){for(var r=0,s=Object.keys(e.openTbl);r<s.length;r++){var a=s[r];this.openTbl[a]=!0}for(var n=0,c=Object.keys(e.closeTbl);n<c.length;n++){var a=c[n];this.closeTbl[a]=!0}},t.prototype.remove=function(e){for(var r=0,s=Object.keys(e.openTbl);r<s.length;r++){var a=s[r];delete this.openTbl[a]}for(var n=0,c=Object.keys(e.closeTbl);n<c.length;n++){var a=c[n];delete this.closeTbl[a]}},t}();_nbind.Resource=Resource;function listResources(t,e){for(var r=new Resource,s=0,a=t;s<a.length;s++)for(var n=a[s],c=0,f=n.readResources||[];c<f.length;c++){var p=f[c];r.add(p)}for(var h=0,E=e;h<E.length;h++)for(var n=E[h],C=0,S=n.writeResources||[];C<S.length;C++){var p=S[C];r.add(p)}return r}_nbind.listResources=listResources,_nbind.resources={pool:new Resource(\"var used=HEAPU32[_nbind.Pool.usedPtr],page=HEAPU32[_nbind.Pool.pagePtr];\",\"_nbind.Pool.lreset(used,page);\")};var ExternalBuffer=function(t){__extends(e,t);function e(r,s){var a=t.call(this,r)||this;return a.ptr=s,a}return e.prototype.free=function(){_free(this.ptr)},e}(_nbind.External);function getBuffer(t){return t instanceof ArrayBuffer?new Uint8Array(t):t instanceof DataView?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function pushBuffer(t,e){if(t==null&&e&&e.Nullable&&(t=[]),typeof t!=\"object\")throw new Error(\"Type mismatch\");var r=t,s=r.byteLength||r.length;if(!s&&s!==0&&r.byteLength!==0)throw new Error(\"Type mismatch\");var a=_nbind.Pool.lalloc(8),n=_malloc(s),c=a/4;return HEAPU32[c++]=s,HEAPU32[c++]=n,HEAPU32[c++]=new ExternalBuffer(t,n).register(),HEAPU8.set(getBuffer(t),n),a}var BufferType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=pushBuffer,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushBuffer(a,s)}},e}(_nbind.BindType);_nbind.BufferType=BufferType;function commitBuffer(t,e,r){var s=_nbind.externalList[t].data,a=Buffer;if(typeof Buffer!=\"function\"&&(a=function(){}),!(s instanceof Array)){var n=HEAPU8.subarray(e,e+r);if(s instanceof a){var c=void 0;typeof Buffer.from==\"function\"&&Buffer.from.length>=3?c=Buffer.from(n):c=new Buffer(n),c.copy(s)}else getBuffer(s).set(n)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var t=0,e=dirtyList;t<e.length;t++){var r=e[t];r.__nbindState&3||r.free()}dirtyList=[],gcTimer=0}_nbind.mark=function(t){};function toggleLightGC(t){t?_nbind.mark=function(e){dirtyList.push(e),gcTimer||(gcTimer=setTimeout(sweep,0))}:_nbind.mark=function(e){}}_nbind.toggleLightGC=toggleLightGC}(_nbind),Module.requestFullScreen=function t(e,r,s){Module.printErr(\"Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.\"),Module.requestFullScreen=Module.requestFullscreen,Browser.requestFullScreen(e,r,s)},Module.requestFullscreen=function t(e,r,s){Browser.requestFullscreen(e,r,s)},Module.requestAnimationFrame=function t(e){Browser.requestAnimationFrame(e)},Module.setCanvasSize=function t(e,r,s){Browser.setCanvasSize(e,r,s)},Module.pauseMainLoop=function t(){Browser.mainLoop.pause()},Module.resumeMainLoop=function t(){Browser.mainLoop.resume()},Module.getUserMedia=function t(){Browser.getUserMedia()},Module.createContext=function t(e,r,s,a){return Browser.createContext(e,r,s,a)},ENVIRONMENT_IS_NODE?_emscripten_get_now=function(){var e=process.hrtime();return e[0]*1e3+e[1]/1e6}:typeof dateNow<\"u\"?_emscripten_get_now=dateNow:typeof self==\"object\"&&self.performance&&typeof self.performance.now==\"function\"?_emscripten_get_now=function(){return self.performance.now()}:typeof performance==\"object\"&&typeof performance.now==\"function\"?_emscripten_get_now=function(){return performance.now()}:_emscripten_get_now=Date.now,__ATEXIT__.push(function(){var t=Module._fflush;t&&t(0);var e=___syscall146.printChar;if(e){var r=___syscall146.buffers;r[1].length&&e(1,10),r[2].length&&e(2,10)}}),DYNAMICTOP_PTR=allocate(1,\"i32\",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(t,e,r,s,a,n){try{Module.dynCall_viiiii(t,e,r,s,a,n)}catch(c){if(typeof c!=\"number\"&&c!==\"longjmp\")throw c;Module.setThrew(1,0)}}function invoke_vif(t,e,r){try{Module.dynCall_vif(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_vid(t,e,r){try{Module.dynCall_vid(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_fiff(t,e,r,s){try{return Module.dynCall_fiff(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_vi(t,e){try{Module.dynCall_vi(t,e)}catch(r){if(typeof r!=\"number\"&&r!==\"longjmp\")throw r;Module.setThrew(1,0)}}function invoke_vii(t,e,r){try{Module.dynCall_vii(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_ii(t,e){try{return Module.dynCall_ii(t,e)}catch(r){if(typeof r!=\"number\"&&r!==\"longjmp\")throw r;Module.setThrew(1,0)}}function invoke_viddi(t,e,r,s,a){try{Module.dynCall_viddi(t,e,r,s,a)}catch(n){if(typeof n!=\"number\"&&n!==\"longjmp\")throw n;Module.setThrew(1,0)}}function invoke_vidd(t,e,r,s){try{Module.dynCall_vidd(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_iiii(t,e,r,s){try{return Module.dynCall_iiii(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_diii(t,e,r,s){try{return Module.dynCall_diii(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_di(t,e){try{return Module.dynCall_di(t,e)}catch(r){if(typeof r!=\"number\"&&r!==\"longjmp\")throw r;Module.setThrew(1,0)}}function invoke_iid(t,e,r){try{return Module.dynCall_iid(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_iii(t,e,r){try{return Module.dynCall_iii(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_viiddi(t,e,r,s,a,n){try{Module.dynCall_viiddi(t,e,r,s,a,n)}catch(c){if(typeof c!=\"number\"&&c!==\"longjmp\")throw c;Module.setThrew(1,0)}}function invoke_viiiiii(t,e,r,s,a,n,c){try{Module.dynCall_viiiiii(t,e,r,s,a,n,c)}catch(f){if(typeof f!=\"number\"&&f!==\"longjmp\")throw f;Module.setThrew(1,0)}}function invoke_dii(t,e,r){try{return Module.dynCall_dii(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_i(t){try{return Module.dynCall_i(t)}catch(e){if(typeof e!=\"number\"&&e!==\"longjmp\")throw e;Module.setThrew(1,0)}}function invoke_iiiiii(t,e,r,s,a,n){try{return Module.dynCall_iiiiii(t,e,r,s,a,n)}catch(c){if(typeof c!=\"number\"&&c!==\"longjmp\")throw c;Module.setThrew(1,0)}}function invoke_viiid(t,e,r,s,a){try{Module.dynCall_viiid(t,e,r,s,a)}catch(n){if(typeof n!=\"number\"&&n!==\"longjmp\")throw n;Module.setThrew(1,0)}}function invoke_viififi(t,e,r,s,a,n,c){try{Module.dynCall_viififi(t,e,r,s,a,n,c)}catch(f){if(typeof f!=\"number\"&&f!==\"longjmp\")throw f;Module.setThrew(1,0)}}function invoke_viii(t,e,r,s){try{Module.dynCall_viii(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_v(t){try{Module.dynCall_v(t)}catch(e){if(typeof e!=\"number\"&&e!==\"longjmp\")throw e;Module.setThrew(1,0)}}function invoke_viid(t,e,r,s){try{Module.dynCall_viid(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_idd(t,e,r){try{return Module.dynCall_idd(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_viiii(t,e,r,s,a){try{Module.dynCall_viiii(t,e,r,s,a)}catch(n){if(typeof n!=\"number\"&&n!==\"longjmp\")throw n;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(t,e,r){var s=new t.Int8Array(r),a=new t.Int16Array(r),n=new t.Int32Array(r),c=new t.Uint8Array(r),f=new t.Uint16Array(r),p=new t.Uint32Array(r),h=new t.Float32Array(r),E=new t.Float64Array(r),C=e.DYNAMICTOP_PTR|0,S=e.tempDoublePtr|0,P=e.ABORT|0,I=e.STACKTOP|0,R=e.STACK_MAX|0,N=e.cttz_i8|0,U=e.___dso_handle|0,W=0,te=0,ie=0,Ae=0,ce=t.NaN,me=t.Infinity,pe=0,Be=0,Ce=0,g=0,we=0,Ee=0,fe=t.Math.floor,se=t.Math.abs,X=t.Math.sqrt,De=t.Math.pow,Re=t.Math.cos,gt=t.Math.sin,j=t.Math.tan,rt=t.Math.acos,Fe=t.Math.asin,Ne=t.Math.atan,Pe=t.Math.atan2,Ye=t.Math.exp,ke=t.Math.log,it=t.Math.ceil,_e=t.Math.imul,x=t.Math.min,w=t.Math.max,b=t.Math.clz32,y=t.Math.fround,F=e.abort,z=e.assert,Z=e.enlargeMemory,$=e.getTotalMemory,oe=e.abortOnCannotGrowMemory,xe=e.invoke_viiiii,Te=e.invoke_vif,lt=e.invoke_vid,Et=e.invoke_fiff,qt=e.invoke_vi,ir=e.invoke_vii,Pt=e.invoke_ii,gn=e.invoke_viddi,Pr=e.invoke_vidd,Ir=e.invoke_iiii,Nr=e.invoke_diii,nn=e.invoke_di,oi=e.invoke_iid,wo=e.invoke_iii,rs=e.invoke_viiddi,eo=e.invoke_viiiiii,Bo=e.invoke_dii,Hi=e.invoke_i,to=e.invoke_iiiiii,vo=e.invoke_viiid,RA=e.invoke_viififi,pf=e.invoke_viii,Eh=e.invoke_v,Ih=e.invoke_viid,ro=e.invoke_idd,jn=e.invoke_viiii,Rs=e._emscripten_asm_const_iiiii,no=e._emscripten_asm_const_iiidddddd,lu=e._emscripten_asm_const_iiiid,cu=e.__nbind_reference_external,uu=e._emscripten_asm_const_iiiiiiii,FA=e._removeAccessorPrefix,NA=e._typeModule,aa=e.__nbind_register_pool,la=e.__decorate,OA=e._llvm_stackrestore,gr=e.___cxa_atexit,So=e.__extends,Me=e.__nbind_get_value_object,fu=e.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Cr=e._emscripten_set_main_loop_timing,hf=e.__nbind_register_primitive,LA=e.__nbind_register_type,MA=e._emscripten_memcpy_big,Au=e.__nbind_register_function,pu=e.___setErrNo,ac=e.__nbind_register_class,ve=e.__nbind_finish,Nt=e._abort,lc=e._nbind_value,Ni=e._llvm_stacksave,io=e.___syscall54,Rt=e._defineHidden,xn=e._emscripten_set_main_loop,ca=e._emscripten_get_now,ji=e.__nbind_register_callback_signature,Oi=e._emscripten_asm_const_iiiiii,Oa=e.__nbind_free_external,dn=e._emscripten_asm_const_iiii,Jn=e._emscripten_asm_const_iiididi,hu=e.___syscall6,Ch=e._atexit,La=e.___syscall140,Ma=e.___syscall146,Ua=y(0);let Xe=y(0);function Ha(o){o=o|0;var l=0;return l=I,I=I+o|0,I=I+15&-16,l|0}function gf(){return I|0}function cc(o){o=o|0,I=o}function wn(o,l){o=o|0,l=l|0,I=o,R=l}function ua(o,l){o=o|0,l=l|0,W||(W=o,te=l)}function _A(o){o=o|0,Ee=o}function UA(){return Ee|0}function fa(){var o=0,l=0;Qr(8104,8,400)|0,Qr(8504,408,540)|0,o=9044,l=o+44|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));s[9088]=0,s[9089]=1,n[2273]=0,n[2274]=948,n[2275]=948,gr(17,8104,U|0)|0}function vl(o){o=o|0,ht(o+948|0)}function Mt(o){return o=y(o),((SP(o)|0)&2147483647)>>>0>2139095040|0}function kn(o,l,u){o=o|0,l=l|0,u=u|0;e:do if(n[o+(l<<3)+4>>2]|0)o=o+(l<<3)|0;else{if((l|2|0)==3&&n[o+60>>2]|0){o=o+56|0;break}switch(l|0){case 0:case 2:case 4:case 5:{if(n[o+52>>2]|0){o=o+48|0;break e}break}default:}if(n[o+68>>2]|0){o=o+64|0;break}else{o=(l|1|0)==5?948:u;break}}while(!1);return o|0}function Aa(o){o=o|0;var l=0;return l=ex(1e3)|0,ja(o,(l|0)!=0,2456),n[2276]=(n[2276]|0)+1,Qr(l|0,8104,1e3)|0,s[o+2>>0]|0&&(n[l+4>>2]=2,n[l+12>>2]=4),n[l+976>>2]=o,l|0}function ja(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,Yg(o,5,3197,A)),I=d}function ns(){return Aa(956)|0}function uc(o){o=o|0;var l=0;return l=Jt(1e3)|0,gu(l,o),ja(n[o+976>>2]|0,1,2456),n[2276]=(n[2276]|0)+1,n[l+944>>2]=0,l|0}function gu(o,l){o=o|0,l=l|0;var u=0;Qr(o|0,l|0,948)|0,Dy(o+948|0,l+948|0),u=o+960|0,o=l+960|0,l=u+40|0;do n[u>>2]=n[o>>2],u=u+4|0,o=o+4|0;while((u|0)<(l|0))}function fc(o){o=o|0;var l=0,u=0,A=0,d=0;if(l=o+944|0,u=n[l>>2]|0,u|0&&(qa(u+948|0,o)|0,n[l>>2]=0),u=Li(o)|0,u|0){l=0;do n[(Cs(o,l)|0)+944>>2]=0,l=l+1|0;while((l|0)!=(u|0))}u=o+948|0,A=n[u>>2]|0,d=o+952|0,l=n[d>>2]|0,(l|0)!=(A|0)&&(n[d>>2]=l+(~((l+-4-A|0)>>>2)<<2)),Sl(u),tx(o),n[2276]=(n[2276]|0)+-1}function qa(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0;A=n[o>>2]|0,k=o+4|0,u=n[k>>2]|0,m=u;e:do if((A|0)==(u|0))d=A,B=4;else for(o=A;;){if((n[o>>2]|0)==(l|0)){d=o,B=4;break e}if(o=o+4|0,(o|0)==(u|0)){o=0;break}}while(!1);return(B|0)==4&&((d|0)!=(u|0)?(A=d+4|0,o=m-A|0,l=o>>2,l&&(F2(d|0,A|0,o|0)|0,u=n[k>>2]|0),o=d+(l<<2)|0,(u|0)==(o|0)||(n[k>>2]=u+(~((u+-4-o|0)>>>2)<<2)),o=1):o=0),o|0}function Li(o){return o=o|0,(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2|0}function Cs(o,l){o=o|0,l=l|0;var u=0;return u=n[o+948>>2]|0,(n[o+952>>2]|0)-u>>2>>>0>l>>>0?o=n[u+(l<<2)>>2]|0:o=0,o|0}function Sl(o){o=o|0;var l=0,u=0,A=0,d=0;A=I,I=I+32|0,l=A,d=n[o>>2]|0,u=(n[o+4>>2]|0)-d|0,((n[o+8>>2]|0)-d|0)>>>0>u>>>0&&(d=u>>2,ky(l,d,d,o+8|0),DP(o,l),Qy(l)),I=A}function df(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;_=Li(o)|0;do if(_|0){if((n[(Cs(o,0)|0)+944>>2]|0)==(o|0)){if(!(qa(o+948|0,l)|0))break;Qr(l+400|0,8504,540)|0,n[l+944>>2]=0,Oe(o);break}B=n[(n[o+976>>2]|0)+12>>2]|0,k=o+948|0,T=(B|0)==0,u=0,m=0;do A=n[(n[k>>2]|0)+(m<<2)>>2]|0,(A|0)==(l|0)?Oe(o):(d=uc(A)|0,n[(n[k>>2]|0)+(u<<2)>>2]=d,n[d+944>>2]=o,T||S_[B&15](A,d,o,u),u=u+1|0),m=m+1|0;while((m|0)!=(_|0));if(u>>>0<_>>>0){T=o+948|0,k=o+952|0,B=u,u=n[k>>2]|0;do m=(n[T>>2]|0)+(B<<2)|0,A=m+4|0,d=u-A|0,l=d>>2,l&&(F2(m|0,A|0,d|0)|0,u=n[k>>2]|0),d=u,A=m+(l<<2)|0,(d|0)!=(A|0)&&(u=d+(~((d+-4-A|0)>>>2)<<2)|0,n[k>>2]=u),B=B+1|0;while((B|0)!=(_|0))}}while(!1)}function Ac(o){o=o|0;var l=0,u=0,A=0,d=0;wi(o,(Li(o)|0)==0,2491),wi(o,(n[o+944>>2]|0)==0,2545),l=o+948|0,u=n[l>>2]|0,A=o+952|0,d=n[A>>2]|0,(d|0)!=(u|0)&&(n[A>>2]=d+(~((d+-4-u|0)>>>2)<<2)),Sl(l),l=o+976|0,u=n[l>>2]|0,Qr(o|0,8104,1e3)|0,s[u+2>>0]|0&&(n[o+4>>2]=2,n[o+12>>2]=4),n[l>>2]=u}function wi(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,Qo(o,5,3197,A)),I=d}function Qn(){return n[2276]|0}function pc(){var o=0;return o=ex(20)|0,Je((o|0)!=0,2592),n[2277]=(n[2277]|0)+1,n[o>>2]=n[239],n[o+4>>2]=n[240],n[o+8>>2]=n[241],n[o+12>>2]=n[242],n[o+16>>2]=n[243],o|0}function Je(o,l){o=o|0,l=l|0;var u=0,A=0;A=I,I=I+16|0,u=A,o||(n[u>>2]=l,Qo(0,5,3197,u)),I=A}function st(o){o=o|0,tx(o),n[2277]=(n[2277]|0)+-1}function St(o,l){o=o|0,l=l|0;var u=0;l?(wi(o,(Li(o)|0)==0,2629),u=1):(u=0,l=0),n[o+964>>2]=l,n[o+988>>2]=u}function lr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+8|0,d=A+4|0,B=A,n[d>>2]=l,wi(o,(n[l+944>>2]|0)==0,2709),wi(o,(n[o+964>>2]|0)==0,2763),ee(o),l=o+948|0,n[B>>2]=(n[l>>2]|0)+(u<<2),n[m>>2]=n[B>>2],Ie(l,m,d)|0,n[(n[d>>2]|0)+944>>2]=o,Oe(o),I=A}function ee(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;if(u=Li(o)|0,u|0&&(n[(Cs(o,0)|0)+944>>2]|0)!=(o|0)){A=n[(n[o+976>>2]|0)+12>>2]|0,d=o+948|0,m=(A|0)==0,l=0;do B=n[(n[d>>2]|0)+(l<<2)>>2]|0,k=uc(B)|0,n[(n[d>>2]|0)+(l<<2)>>2]=k,n[k+944>>2]=o,m||S_[A&15](B,k,o,l),l=l+1|0;while((l|0)!=(u|0))}}function Ie(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0;tt=I,I=I+64|0,G=tt+52|0,k=tt+48|0,ae=tt+28|0,We=tt+24|0,Le=tt+20|0,Qe=tt,A=n[o>>2]|0,m=A,l=A+((n[l>>2]|0)-m>>2<<2)|0,A=o+4|0,d=n[A>>2]|0,B=o+8|0;do if(d>>>0<(n[B>>2]|0)>>>0){if((l|0)==(d|0)){n[l>>2]=n[u>>2],n[A>>2]=(n[A>>2]|0)+4;break}bP(o,l,d,l+4|0),l>>>0<=u>>>0&&(u=(n[A>>2]|0)>>>0>u>>>0?u+4|0:u),n[l>>2]=n[u>>2]}else{A=(d-m>>2)+1|0,d=O(o)|0,d>>>0<A>>>0&&sn(o),M=n[o>>2]|0,_=(n[B>>2]|0)-M|0,m=_>>1,ky(Qe,_>>2>>>0<d>>>1>>>0?m>>>0<A>>>0?A:m:d,l-M>>2,o+8|0),M=Qe+8|0,A=n[M>>2]|0,m=Qe+12|0,_=n[m>>2]|0,B=_,T=A;do if((A|0)==(_|0)){if(_=Qe+4|0,A=n[_>>2]|0,Ze=n[Qe>>2]|0,d=Ze,A>>>0<=Ze>>>0){A=B-d>>1,A=A|0?A:1,ky(ae,A,A>>>2,n[Qe+16>>2]|0),n[We>>2]=n[_>>2],n[Le>>2]=n[M>>2],n[k>>2]=n[We>>2],n[G>>2]=n[Le>>2],c2(ae,k,G),A=n[Qe>>2]|0,n[Qe>>2]=n[ae>>2],n[ae>>2]=A,A=ae+4|0,Ze=n[_>>2]|0,n[_>>2]=n[A>>2],n[A>>2]=Ze,A=ae+8|0,Ze=n[M>>2]|0,n[M>>2]=n[A>>2],n[A>>2]=Ze,A=ae+12|0,Ze=n[m>>2]|0,n[m>>2]=n[A>>2],n[A>>2]=Ze,Qy(ae),A=n[M>>2]|0;break}m=A,B=((m-d>>2)+1|0)/-2|0,k=A+(B<<2)|0,d=T-m|0,m=d>>2,m&&(F2(k|0,A|0,d|0)|0,A=n[_>>2]|0),Ze=k+(m<<2)|0,n[M>>2]=Ze,n[_>>2]=A+(B<<2),A=Ze}while(!1);n[A>>2]=n[u>>2],n[M>>2]=(n[M>>2]|0)+4,l=PP(o,Qe,l)|0,Qy(Qe)}while(!1);return I=tt,l|0}function Oe(o){o=o|0;var l=0;do{if(l=o+984|0,s[l>>0]|0)break;s[l>>0]=1,h[o+504>>2]=y(ce),o=n[o+944>>2]|0}while(o|0)}function ht(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),yt(u))}function mt(o){return o=o|0,n[o+944>>2]|0}function Dt(o){o=o|0,wi(o,(n[o+964>>2]|0)!=0,2832),Oe(o)}function tr(o){return o=o|0,(s[o+984>>0]|0)!=0|0}function fn(o,l){o=o|0,l=l|0,qYe(o,l,400)|0&&(Qr(o|0,l|0,400)|0,Oe(o))}function ai(o){o=o|0;var l=Xe;return l=y(h[o+44>>2]),o=Mt(l)|0,y(o?y(0):l)}function qi(o){o=o|0;var l=Xe;return l=y(h[o+48>>2]),Mt(l)|0&&(l=s[(n[o+976>>2]|0)+2>>0]|0?y(1):y(0)),y(l)}function Tn(o,l){o=o|0,l=l|0,n[o+980>>2]=l}function Ga(o){return o=o|0,n[o+980>>2]|0}function my(o,l){o=o|0,l=l|0;var u=0;u=o+4|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function t2(o){return o=o|0,n[o+4>>2]|0}function Do(o,l){o=o|0,l=l|0;var u=0;u=o+8|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function yy(o){return o=o|0,n[o+8>>2]|0}function wh(o,l){o=o|0,l=l|0;var u=0;u=o+12|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function r2(o){return o=o|0,n[o+12>>2]|0}function bo(o,l){o=o|0,l=l|0;var u=0;u=o+16|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Bh(o){return o=o|0,n[o+16>>2]|0}function vh(o,l){o=o|0,l=l|0;var u=0;u=o+20|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function du(o){return o=o|0,n[o+20>>2]|0}function Sh(o,l){o=o|0,l=l|0;var u=0;u=o+24|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Ng(o){return o=o|0,n[o+24>>2]|0}function Og(o,l){o=o|0,l=l|0;var u=0;u=o+28|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Lg(o){return o=o|0,n[o+28>>2]|0}function Ey(o,l){o=o|0,l=l|0;var u=0;u=o+32|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function mf(o){return o=o|0,n[o+32>>2]|0}function Po(o,l){o=o|0,l=l|0;var u=0;u=o+36|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Dl(o){return o=o|0,n[o+36>>2]|0}function Dh(o,l){o=o|0,l=y(l);var u=0;u=o+40|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Mg(o,l){o=o|0,l=y(l);var u=0;u=o+44|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function bl(o,l){o=o|0,l=y(l);var u=0;u=o+48|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Pl(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+52|0,d=o+56|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Iy(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+52|0,u=o+56|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function HA(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+52|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Cy(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function wy(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function jA(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+132+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function qA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function Y(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function xt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+60+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function GA(o,l){o=o|0,l=l|0;var u=0;u=o+60+(l<<3)+4|0,(n[u>>2]|0)!=3&&(h[o+60+(l<<3)>>2]=y(ce),n[u>>2]=3,Oe(o))}function xo(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function yf(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function dt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+204+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function mu(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+276+(l<<3)|0,l=o+276+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function By(o,l){return o=o|0,l=l|0,y(h[o+276+(l<<3)>>2])}function _g(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+348|0,d=o+352|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function n2(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+348|0,u=o+352|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function bh(o){o=o|0;var l=0;l=o+352|0,(n[l>>2]|0)!=3&&(h[o+348>>2]=y(ce),n[l>>2]=3,Oe(o))}function ur(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+348|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function zi(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+356|0,d=o+360|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ef(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+356|0,u=o+360|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function Wa(o){o=o|0;var l=0;l=o+360|0,(n[l>>2]|0)!=3&&(h[o+356>>2]=y(ce),n[l>>2]=3,Oe(o))}function Ug(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+356|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function yu(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function If(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function wt(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+364|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function gi(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function WA(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ya(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+372|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function pa(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Va(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Hg(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+380|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Ph(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function jg(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function vy(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+388|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function YA(o,l){o=o|0,l=y(l);var u=0;u=o+396|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function qg(o){return o=o|0,y(h[o+396>>2])}function Eu(o){return o=o|0,y(h[o+400>>2])}function Iu(o){return o=o|0,y(h[o+404>>2])}function Cf(o){return o=o|0,y(h[o+408>>2])}function Fs(o){return o=o|0,y(h[o+412>>2])}function Cu(o){return o=o|0,y(h[o+416>>2])}function qn(o){return o=o|0,y(h[o+420>>2])}function is(o,l){switch(o=o|0,l=l|0,wi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+424+(l<<2)>>2])}function xi(o,l){switch(o=o|0,l=l|0,wi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+448+(l<<2)>>2])}function VA(o,l){switch(o=o|0,l=l|0,wi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+472+(l<<2)>>2])}function wf(o,l){o=o|0,l=l|0;var u=0,A=Xe;return u=n[o+4>>2]|0,(u|0)==(n[l+4>>2]|0)?u?(A=y(h[o>>2]),o=y(se(y(A-y(h[l>>2]))))<y(999999974e-13)):o=1:o=0,o|0}function mn(o,l){o=y(o),l=y(l);var u=0;return Mt(o)|0?u=Mt(l)|0:u=y(se(y(o-l)))<y(999999974e-13),u|0}function Gg(o,l){o=o|0,l=l|0,Wg(o,l)}function Wg(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u+4|0,n[A>>2]=0,n[A+4>>2]=0,n[A+8>>2]=0,fu(A|0,o|0,l|0,0),Qo(o,3,(s[A+11>>0]|0)<0?n[A>>2]|0:A,u),AVe(A),I=u}function ss(o,l,u,A){o=y(o),l=y(l),u=u|0,A=A|0;var d=Xe;o=y(o*l),d=y(E_(o,y(1)));do if(mn(d,y(0))|0)o=y(o-d);else{if(o=y(o-d),mn(d,y(1))|0){o=y(o+y(1));break}if(u){o=y(o+y(1));break}A||(d>y(.5)?d=y(1):(A=mn(d,y(.5))|0,d=y(A?1:0)),o=y(o+d))}while(!1);return y(o/l)}function xl(o,l,u,A,d,m,B,k,T,_,M,G,ae){o=o|0,l=y(l),u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,k=y(k),T=y(T),_=y(_),M=y(M),G=y(G),ae=ae|0;var We=0,Le=Xe,Qe=Xe,tt=Xe,Ze=Xe,ct=Xe,He=Xe;return T<y(0)|_<y(0)?ae=0:(ae|0&&(Le=y(h[ae+4>>2]),Le!=y(0))?(tt=y(ss(l,Le,0,0)),Ze=y(ss(A,Le,0,0)),Qe=y(ss(m,Le,0,0)),Le=y(ss(k,Le,0,0))):(Qe=m,tt=l,Le=k,Ze=A),(d|0)==(o|0)?We=mn(Qe,tt)|0:We=0,(B|0)==(u|0)?ae=mn(Le,Ze)|0:ae=0,!We&&(ct=y(l-M),!(ko(o,ct,T)|0))&&!(Bf(o,ct,d,T)|0)?We=vf(o,ct,d,m,T)|0:We=1,!ae&&(He=y(A-G),!(ko(u,He,_)|0))&&!(Bf(u,He,B,_)|0)?ae=vf(u,He,B,k,_)|0:ae=1,ae=We&ae),ae|0}function ko(o,l,u){return o=o|0,l=y(l),u=y(u),(o|0)==1?o=mn(l,u)|0:o=0,o|0}function Bf(o,l,u,A){return o=o|0,l=y(l),u=u|0,A=y(A),(o|0)==2&(u|0)==0?l>=A?o=1:o=mn(l,A)|0:o=0,o|0}function vf(o,l,u,A,d){return o=o|0,l=y(l),u=u|0,A=y(A),d=y(d),(o|0)==2&(u|0)==2&A>l?d<=l?o=1:o=mn(l,d)|0:o=0,o|0}function kl(o,l,u,A,d,m,B,k,T,_,M){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=m|0,B=y(B),k=y(k),T=T|0,_=_|0,M=M|0;var G=0,ae=0,We=0,Le=0,Qe=Xe,tt=Xe,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=Xe,Fo=Xe,No=Xe,Oo=0,$a=0;cr=I,I=I+160|0,$t=cr+152|0,fr=cr+120|0,qr=cr+104|0,He=cr+72|0,Le=cr+56|0,Lt=cr+8|0,ct=cr,Ge=(n[2279]|0)+1|0,n[2279]=Ge,Tr=o+984|0,s[Tr>>0]|0&&(n[o+512>>2]|0)!=(n[2278]|0)?Ze=4:(n[o+516>>2]|0)==(A|0)?Hr=0:Ze=4,(Ze|0)==4&&(n[o+520>>2]=0,n[o+924>>2]=-1,n[o+928>>2]=-1,h[o+932>>2]=y(-1),h[o+936>>2]=y(-1),Hr=1);e:do if(n[o+964>>2]|0)if(Qe=y(yn(o,2,B)),tt=y(yn(o,0,B)),G=o+916|0,No=y(h[G>>2]),Fo=y(h[o+920>>2]),Hn=y(h[o+932>>2]),xl(d,l,m,u,n[o+924>>2]|0,No,n[o+928>>2]|0,Fo,Hn,y(h[o+936>>2]),Qe,tt,M)|0)Ze=22;else if(We=n[o+520>>2]|0,!We)Ze=21;else for(ae=0;;){if(G=o+524+(ae*24|0)|0,Hn=y(h[G>>2]),Fo=y(h[o+524+(ae*24|0)+4>>2]),No=y(h[o+524+(ae*24|0)+16>>2]),xl(d,l,m,u,n[o+524+(ae*24|0)+8>>2]|0,Hn,n[o+524+(ae*24|0)+12>>2]|0,Fo,No,y(h[o+524+(ae*24|0)+20>>2]),Qe,tt,M)|0){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=We>>>0){Ze=21;break}}else{if(T){if(G=o+916|0,!(mn(y(h[G>>2]),l)|0)){Ze=21;break}if(!(mn(y(h[o+920>>2]),u)|0)){Ze=21;break}if((n[o+924>>2]|0)!=(d|0)){Ze=21;break}G=(n[o+928>>2]|0)==(m|0)?G:0,Ze=22;break}if(We=n[o+520>>2]|0,!We)Ze=21;else for(ae=0;;){if(G=o+524+(ae*24|0)|0,mn(y(h[G>>2]),l)|0&&mn(y(h[o+524+(ae*24|0)+4>>2]),u)|0&&(n[o+524+(ae*24|0)+8>>2]|0)==(d|0)&&(n[o+524+(ae*24|0)+12>>2]|0)==(m|0)){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=We>>>0){Ze=21;break}}}while(!1);do if((Ze|0)==21)s[11697]|0?(G=0,Ze=28):(G=0,Ze=31);else if((Ze|0)==22){if(ae=(s[11697]|0)!=0,!((G|0)!=0&(Hr^1)))if(ae){Ze=28;break}else{Ze=31;break}Le=G+16|0,n[o+908>>2]=n[Le>>2],We=G+20|0,n[o+912>>2]=n[We>>2],(s[11698]|0)==0|ae^1||(n[ct>>2]=wu(Ge)|0,n[ct+4>>2]=Ge,Qo(o,4,2972,ct),ae=n[o+972>>2]|0,ae|0&&op[ae&127](o),d=ha(d,T)|0,m=ha(m,T)|0,$a=+y(h[Le>>2]),Oo=+y(h[We>>2]),n[Lt>>2]=d,n[Lt+4>>2]=m,E[Lt+8>>3]=+l,E[Lt+16>>3]=+u,E[Lt+24>>3]=$a,E[Lt+32>>3]=Oo,n[Lt+40>>2]=_,Qo(o,4,2989,Lt))}while(!1);return(Ze|0)==28&&(ae=wu(Ge)|0,n[Le>>2]=ae,n[Le+4>>2]=Ge,n[Le+8>>2]=Hr?3047:11699,Qo(o,4,3038,Le),ae=n[o+972>>2]|0,ae|0&&op[ae&127](o),Lt=ha(d,T)|0,Ze=ha(m,T)|0,n[He>>2]=Lt,n[He+4>>2]=Ze,E[He+8>>3]=+l,E[He+16>>3]=+u,n[He+24>>2]=_,Qo(o,4,3049,He),Ze=31),(Ze|0)==31&&(Ns(o,l,u,A,d,m,B,k,T,M),s[11697]|0&&(ae=n[2279]|0,Lt=wu(ae)|0,n[qr>>2]=Lt,n[qr+4>>2]=ae,n[qr+8>>2]=Hr?3047:11699,Qo(o,4,3083,qr),ae=n[o+972>>2]|0,ae|0&&op[ae&127](o),Lt=ha(d,T)|0,qr=ha(m,T)|0,Oo=+y(h[o+908>>2]),$a=+y(h[o+912>>2]),n[fr>>2]=Lt,n[fr+4>>2]=qr,E[fr+8>>3]=Oo,E[fr+16>>3]=$a,n[fr+24>>2]=_,Qo(o,4,3092,fr)),n[o+516>>2]=A,G||(ae=o+520|0,G=n[ae>>2]|0,(G|0)==16&&(s[11697]|0&&Qo(o,4,3124,$t),n[ae>>2]=0,G=0),T?G=o+916|0:(n[ae>>2]=G+1,G=o+524+(G*24|0)|0),h[G>>2]=l,h[G+4>>2]=u,n[G+8>>2]=d,n[G+12>>2]=m,n[G+16>>2]=n[o+908>>2],n[G+20>>2]=n[o+912>>2],G=0)),T&&(n[o+416>>2]=n[o+908>>2],n[o+420>>2]=n[o+912>>2],s[o+985>>0]=1,s[Tr>>0]=0),n[2279]=(n[2279]|0)+-1,n[o+512>>2]=n[2278],I=cr,Hr|(G|0)==0|0}function yn(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return A=y(J(o,l,u)),y(A+y(re(o,l,u)))}function Qo(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=I,I=I+16|0,d=m,n[d>>2]=A,o?A=n[o+976>>2]|0:A=0,Qh(A,o,l,u,d),I=m}function wu(o){return o=o|0,(o>>>0>60?3201:3201+(60-o)|0)|0}function ha(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+32|0,u=d+12|0,A=d,n[u>>2]=n[254],n[u+4>>2]=n[255],n[u+8>>2]=n[256],n[A>>2]=n[257],n[A+4>>2]=n[258],n[A+8>>2]=n[259],(o|0)>2?o=11699:o=n[(l?A:u)+(o<<2)>>2]|0,I=d,o|0}function Ns(o,l,u,A,d,m,B,k,T,_){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=m|0,B=y(B),k=y(k),T=T|0,_=_|0;var M=0,G=0,ae=0,We=0,Le=Xe,Qe=Xe,tt=Xe,Ze=Xe,ct=Xe,He=Xe,Ge=Xe,Lt=0,qr=0,fr=0,$t=Xe,Tr=Xe,Hr=0,cr=Xe,Hn=0,Fo=0,No=0,Oo=0,$a=0,Kh=0,Jh=0,dc=0,zh=0,Ff=0,Nf=0,Zh=0,Xh=0,$h=0,on=0,mc=0,e0=0,ku=0,t0=Xe,r0=Xe,Of=Xe,Lf=Xe,Qu=Xe,ao=0,Ml=0,ya=0,yc=0,lp=0,cp=Xe,Mf=Xe,up=Xe,fp=Xe,lo=Xe,_s=Xe,Ec=0,Wn=Xe,Ap=Xe,Lo=Xe,Tu=Xe,Mo=Xe,Ru=Xe,pp=0,hp=0,Fu=Xe,co=Xe,Ic=0,gp=0,dp=0,mp=0,Fr=Xe,ci=0,Us=0,_o=0,uo=0,Mr=0,Ar=0,Cc=0,zt=Xe,yp=0,Bi=0;Cc=I,I=I+16|0,ao=Cc+12|0,Ml=Cc+8|0,ya=Cc+4|0,yc=Cc,wi(o,(d|0)==0|(Mt(l)|0)^1,3326),wi(o,(m|0)==0|(Mt(u)|0)^1,3406),Us=ft(o,A)|0,n[o+496>>2]=Us,Mr=dr(2,Us)|0,Ar=dr(0,Us)|0,h[o+440>>2]=y(J(o,Mr,B)),h[o+444>>2]=y(re(o,Mr,B)),h[o+428>>2]=y(J(o,Ar,B)),h[o+436>>2]=y(re(o,Ar,B)),h[o+464>>2]=y(Br(o,Mr)),h[o+468>>2]=y(_n(o,Mr)),h[o+452>>2]=y(Br(o,Ar)),h[o+460>>2]=y(_n(o,Ar)),h[o+488>>2]=y(di(o,Mr,B)),h[o+492>>2]=y(ws(o,Mr,B)),h[o+476>>2]=y(di(o,Ar,B)),h[o+484>>2]=y(ws(o,Ar,B));do if(n[o+964>>2]|0)zA(o,l,u,d,m,B,k);else{if(_o=o+948|0,uo=(n[o+952>>2]|0)-(n[_o>>2]|0)>>2,!uo){wP(o,l,u,d,m,B,k);break}if(!T&&i2(o,l,u,d,m,B,k)|0)break;ee(o),mc=o+508|0,s[mc>>0]=0,Mr=dr(n[o+4>>2]|0,Us)|0,Ar=by(Mr,Us)|0,ci=de(Mr)|0,e0=n[o+8>>2]|0,gp=o+28|0,ku=(n[gp>>2]|0)!=0,Mo=ci?B:k,Fu=ci?k:B,t0=y(Rh(o,Mr,B)),r0=y(s2(o,Mr,B)),Le=y(Rh(o,Ar,B)),Ru=y(Ka(o,Mr,B)),co=y(Ka(o,Ar,B)),fr=ci?d:m,Ic=ci?m:d,Fr=ci?Ru:co,ct=ci?co:Ru,Tu=y(yn(o,2,B)),Ze=y(yn(o,0,B)),Qe=y(y(Xr(o+364|0,B))-Fr),tt=y(y(Xr(o+380|0,B))-Fr),He=y(y(Xr(o+372|0,k))-ct),Ge=y(y(Xr(o+388|0,k))-ct),Of=ci?Qe:He,Lf=ci?tt:Ge,Tu=y(l-Tu),l=y(Tu-Fr),Mt(l)|0?Fr=l:Fr=y($n(y(hd(l,tt)),Qe)),Ap=y(u-Ze),l=y(Ap-ct),Mt(l)|0?Lo=l:Lo=y($n(y(hd(l,Ge)),He)),Qe=ci?Fr:Lo,Wn=ci?Lo:Fr;e:do if((fr|0)==1)for(A=0,G=0;;){if(M=Cs(o,G)|0,!A)y(ZA(M))>y(0)&&y(Fh(M))>y(0)?A=M:A=0;else if(o2(M)|0){We=0;break e}if(G=G+1|0,G>>>0>=uo>>>0){We=A;break}}else We=0;while(!1);Lt=We+500|0,qr=We+504|0,A=0,M=0,l=y(0),ae=0;do{if(G=n[(n[_o>>2]|0)+(ae<<2)>>2]|0,(n[G+36>>2]|0)==1)Py(G),s[G+985>>0]=1,s[G+984>>0]=0;else{Sf(G),T&&kh(G,ft(G,Us)|0,Qe,Wn,Fr);do if((n[G+24>>2]|0)!=1)if((G|0)==(We|0)){n[Lt>>2]=n[2278],h[qr>>2]=y(0);break}else{BP(o,G,Fr,d,Lo,Fr,Lo,m,Us,_);break}else M|0&&(n[M+960>>2]=G),n[G+960>>2]=0,M=G,A=A|0?A:G;while(!1);_s=y(h[G+504>>2]),l=y(l+y(_s+y(yn(G,Mr,Fr))))}ae=ae+1|0}while((ae|0)!=(uo|0));for(No=l>Qe,Ec=ku&((fr|0)==2&No)?1:fr,Hn=(Ic|0)==1,$a=Hn&(T^1),Kh=(Ec|0)==1,Jh=(Ec|0)==2,dc=976+(Mr<<2)|0,zh=(Ic|2|0)==2,$h=Hn&(ku^1),Ff=1040+(Ar<<2)|0,Nf=1040+(Mr<<2)|0,Zh=976+(Ar<<2)|0,Xh=(Ic|0)!=1,No=ku&((fr|0)!=0&No),Fo=o+976|0,Hn=Hn^1,l=Qe,Hr=0,Oo=0,_s=y(0),Qu=y(0);;){e:do if(Hr>>>0<uo>>>0)for(qr=n[_o>>2]|0,ae=0,Ge=y(0),He=y(0),tt=y(0),Qe=y(0),G=0,M=0,We=Hr;;){if(Lt=n[qr+(We<<2)>>2]|0,(n[Lt+36>>2]|0)!=1&&(n[Lt+940>>2]=Oo,(n[Lt+24>>2]|0)!=1)){if(Ze=y(yn(Lt,Mr,Fr)),on=n[dc>>2]|0,u=y(Xr(Lt+380+(on<<3)|0,Mo)),ct=y(h[Lt+504>>2]),u=y(hd(u,ct)),u=y($n(y(Xr(Lt+364+(on<<3)|0,Mo)),u)),ku&(ae|0)!=0&y(Ze+y(He+u))>l){m=ae,Ze=Ge,fr=We;break e}Ze=y(Ze+u),u=y(He+Ze),Ze=y(Ge+Ze),o2(Lt)|0&&(tt=y(tt+y(ZA(Lt))),Qe=y(Qe-y(ct*y(Fh(Lt))))),M|0&&(n[M+960>>2]=Lt),n[Lt+960>>2]=0,ae=ae+1|0,M=Lt,G=G|0?G:Lt}else Ze=Ge,u=He;if(We=We+1|0,We>>>0<uo>>>0)Ge=Ze,He=u;else{m=ae,fr=We;break}}else m=0,Ze=y(0),tt=y(0),Qe=y(0),G=0,fr=Hr;while(!1);on=tt>y(0)&tt<y(1),$t=on?y(1):tt,on=Qe>y(0)&Qe<y(1),Ge=on?y(1):Qe;do if(Kh)on=51;else if(Ze<Of&((Mt(Of)|0)^1))l=Of,on=51;else if(Ze>Lf&((Mt(Lf)|0)^1))l=Lf,on=51;else if(s[(n[Fo>>2]|0)+3>>0]|0)on=51;else{if($t!=y(0)&&y(ZA(o))!=y(0)){on=53;break}l=Ze,on=53}while(!1);if((on|0)==51&&(on=0,Mt(l)|0?on=53:(Tr=y(l-Ze),cr=l)),(on|0)==53&&(on=0,Ze<y(0)?(Tr=y(-Ze),cr=l):(Tr=y(0),cr=l)),!$a&&(lp=(G|0)==0,!lp)){ae=n[dc>>2]|0,We=Tr<y(0),ct=y(Tr/Ge),Lt=Tr>y(0),He=y(Tr/$t),tt=y(0),Ze=y(0),l=y(0),M=G;do u=y(Xr(M+380+(ae<<3)|0,Mo)),Qe=y(Xr(M+364+(ae<<3)|0,Mo)),Qe=y(hd(u,y($n(Qe,y(h[M+504>>2]))))),We?(u=y(Qe*y(Fh(M))),u!=y(-0)&&(zt=y(Qe-y(ct*u)),cp=y(Gn(M,Mr,zt,cr,Fr)),zt!=cp)&&(tt=y(tt-y(cp-Qe)),l=y(l+u))):Lt&&(Mf=y(ZA(M)),Mf!=y(0))&&(zt=y(Qe+y(He*Mf)),up=y(Gn(M,Mr,zt,cr,Fr)),zt!=up)&&(tt=y(tt-y(up-Qe)),Ze=y(Ze-Mf)),M=n[M+960>>2]|0;while(M|0);if(l=y(Ge+l),Qe=y(Tr+tt),lp)l=y(0);else{ct=y($t+Ze),We=n[dc>>2]|0,Lt=Qe<y(0),qr=l==y(0),He=y(Qe/l),ae=Qe>y(0),ct=y(Qe/ct),l=y(0);do{zt=y(Xr(G+380+(We<<3)|0,Mo)),tt=y(Xr(G+364+(We<<3)|0,Mo)),tt=y(hd(zt,y($n(tt,y(h[G+504>>2]))))),Lt?(zt=y(tt*y(Fh(G))),Qe=y(-zt),zt!=y(-0)?(zt=y(He*Qe),Qe=y(Gn(G,Mr,y(tt+(qr?Qe:zt)),cr,Fr))):Qe=tt):ae&&(fp=y(ZA(G)),fp!=y(0))?Qe=y(Gn(G,Mr,y(tt+y(ct*fp)),cr,Fr)):Qe=tt,l=y(l-y(Qe-tt)),Ze=y(yn(G,Mr,Fr)),u=y(yn(G,Ar,Fr)),Qe=y(Qe+Ze),h[Ml>>2]=Qe,n[yc>>2]=1,tt=y(h[G+396>>2]);e:do if(Mt(tt)|0){M=Mt(Wn)|0;do if(!M){if(No|(so(G,Ar,Wn)|0|Hn)||(os(o,G)|0)!=4||(n[(Ql(G,Ar)|0)+4>>2]|0)==3||(n[(Tl(G,Ar)|0)+4>>2]|0)==3)break;h[ao>>2]=Wn,n[ya>>2]=1;break e}while(!1);if(so(G,Ar,Wn)|0){M=n[G+992+(n[Zh>>2]<<2)>>2]|0,zt=y(u+y(Xr(M,Wn))),h[ao>>2]=zt,M=Xh&(n[M+4>>2]|0)==2,n[ya>>2]=((Mt(zt)|0|M)^1)&1;break}else{h[ao>>2]=Wn,n[ya>>2]=M?0:2;break}}else zt=y(Qe-Ze),$t=y(zt/tt),zt=y(tt*zt),n[ya>>2]=1,h[ao>>2]=y(u+(ci?$t:zt));while(!1);Bu(G,Mr,cr,Fr,yc,Ml),Bu(G,Ar,Wn,Fr,ya,ao);do if(!(so(G,Ar,Wn)|0)&&(os(o,G)|0)==4){if((n[(Ql(G,Ar)|0)+4>>2]|0)==3){M=0;break}M=(n[(Tl(G,Ar)|0)+4>>2]|0)!=3}else M=0;while(!1);zt=y(h[Ml>>2]),$t=y(h[ao>>2]),yp=n[yc>>2]|0,Bi=n[ya>>2]|0,kl(G,ci?zt:$t,ci?$t:zt,Us,ci?yp:Bi,ci?Bi:yp,Fr,Lo,T&(M^1),3488,_)|0,s[mc>>0]=s[mc>>0]|s[G+508>>0],G=n[G+960>>2]|0}while(G|0)}}else l=y(0);if(l=y(Tr+l),Bi=l<y(0)&1,s[mc>>0]=Bi|c[mc>>0],Jh&l>y(0)?(M=n[dc>>2]|0,n[o+364+(M<<3)+4>>2]|0&&(lo=y(Xr(o+364+(M<<3)|0,Mo)),lo>=y(0))?Qe=y($n(y(0),y(lo-y(cr-l)))):Qe=y(0)):Qe=l,Lt=Hr>>>0<fr>>>0,Lt){We=n[_o>>2]|0,ae=Hr,M=0;do G=n[We+(ae<<2)>>2]|0,n[G+24>>2]|0||(M=((n[(Ql(G,Mr)|0)+4>>2]|0)==3&1)+M|0,M=M+((n[(Tl(G,Mr)|0)+4>>2]|0)==3&1)|0),ae=ae+1|0;while((ae|0)!=(fr|0));M?(Ze=y(0),u=y(0)):on=101}else on=101;e:do if((on|0)==101)switch(on=0,e0|0){case 1:{M=0,Ze=y(Qe*y(.5)),u=y(0);break e}case 2:{M=0,Ze=Qe,u=y(0);break e}case 3:{if(m>>>0<=1){M=0,Ze=y(0),u=y(0);break e}u=y((m+-1|0)>>>0),M=0,Ze=y(0),u=y(y($n(Qe,y(0)))/u);break e}case 5:{u=y(Qe/y((m+1|0)>>>0)),M=0,Ze=u;break e}case 4:{u=y(Qe/y(m>>>0)),M=0,Ze=y(u*y(.5));break e}default:{M=0,Ze=y(0),u=y(0);break e}}while(!1);if(l=y(t0+Ze),Lt){tt=y(Qe/y(M|0)),ae=n[_o>>2]|0,G=Hr,Qe=y(0);do{M=n[ae+(G<<2)>>2]|0;e:do if((n[M+36>>2]|0)!=1){switch(n[M+24>>2]|0){case 1:{if(ga(M,Mr)|0){if(!T)break e;zt=y(XA(M,Mr,cr)),zt=y(zt+y(Br(o,Mr))),zt=y(zt+y(J(M,Mr,Fr))),h[M+400+(n[Nf>>2]<<2)>>2]=zt;break e}break}case 0:if(Bi=(n[(Ql(M,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=Bi?zt:l,T&&(Bi=M+400+(n[Nf>>2]<<2)|0,h[Bi>>2]=y(l+y(h[Bi>>2]))),Bi=(n[(Tl(M,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=Bi?zt:l,$a){zt=y(u+y(yn(M,Mr,Fr))),Qe=Wn,l=y(l+y(zt+y(h[M+504>>2])));break e}else{l=y(l+y(u+y($A(M,Mr,Fr)))),Qe=y($n(Qe,y($A(M,Ar,Fr))));break e}default:}T&&(zt=y(Ze+y(Br(o,Mr))),Bi=M+400+(n[Nf>>2]<<2)|0,h[Bi>>2]=y(zt+y(h[Bi>>2])))}while(!1);G=G+1|0}while((G|0)!=(fr|0))}else Qe=y(0);if(u=y(r0+l),zh?Ze=y(y(Gn(o,Ar,y(co+Qe),Fu,B))-co):Ze=Wn,tt=y(y(Gn(o,Ar,y(co+($h?Wn:Qe)),Fu,B))-co),Lt&T){G=Hr;do{ae=n[(n[_o>>2]|0)+(G<<2)>>2]|0;do if((n[ae+36>>2]|0)!=1){if((n[ae+24>>2]|0)==1){if(ga(ae,Ar)|0){if(zt=y(XA(ae,Ar,Wn)),zt=y(zt+y(Br(o,Ar))),zt=y(zt+y(J(ae,Ar,Fr))),M=n[Ff>>2]|0,h[ae+400+(M<<2)>>2]=zt,!(Mt(zt)|0))break}else M=n[Ff>>2]|0;zt=y(Br(o,Ar)),h[ae+400+(M<<2)>>2]=y(zt+y(J(ae,Ar,Fr)));break}M=os(o,ae)|0;do if((M|0)==4){if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){on=139;break}if((n[(Tl(ae,Ar)|0)+4>>2]|0)==3){on=139;break}if(so(ae,Ar,Wn)|0){l=Le;break}yp=n[ae+908+(n[dc>>2]<<2)>>2]|0,n[ao>>2]=yp,l=y(h[ae+396>>2]),Bi=Mt(l)|0,Qe=(n[S>>2]=yp,y(h[S>>2])),Bi?l=tt:(Tr=y(yn(ae,Ar,Fr)),zt=y(Qe/l),l=y(l*Qe),l=y(Tr+(ci?zt:l))),h[Ml>>2]=l,h[ao>>2]=y(y(yn(ae,Mr,Fr))+Qe),n[ya>>2]=1,n[yc>>2]=1,Bu(ae,Mr,cr,Fr,ya,ao),Bu(ae,Ar,Wn,Fr,yc,Ml),l=y(h[ao>>2]),Tr=y(h[Ml>>2]),zt=ci?l:Tr,l=ci?Tr:l,Bi=((Mt(zt)|0)^1)&1,kl(ae,zt,l,Us,Bi,((Mt(l)|0)^1)&1,Fr,Lo,1,3493,_)|0,l=Le}else on=139;while(!1);e:do if((on|0)==139){on=0,l=y(Ze-y($A(ae,Ar,Fr)));do if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){if((n[(Tl(ae,Ar)|0)+4>>2]|0)!=3)break;l=y(Le+y($n(y(0),y(l*y(.5)))));break e}while(!1);if((n[(Tl(ae,Ar)|0)+4>>2]|0)==3){l=Le;break}if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){l=y(Le+y($n(y(0),l)));break}switch(M|0){case 1:{l=Le;break e}case 2:{l=y(Le+y(l*y(.5)));break e}default:{l=y(Le+l);break e}}}while(!1);zt=y(_s+l),Bi=ae+400+(n[Ff>>2]<<2)|0,h[Bi>>2]=y(zt+y(h[Bi>>2]))}while(!1);G=G+1|0}while((G|0)!=(fr|0))}if(_s=y(_s+tt),Qu=y($n(Qu,u)),m=Oo+1|0,fr>>>0>=uo>>>0)break;l=cr,Hr=fr,Oo=m}do if(T){if(M=m>>>0>1,!M&&!(XL(o)|0))break;if(!(Mt(Wn)|0)){l=y(Wn-_s);e:do switch(n[o+12>>2]|0){case 3:{Le=y(Le+l),He=y(0);break}case 2:{Le=y(Le+y(l*y(.5))),He=y(0);break}case 4:{Wn>_s?He=y(l/y(m>>>0)):He=y(0);break}case 7:if(Wn>_s){Le=y(Le+y(l/y(m<<1>>>0))),He=y(l/y(m>>>0)),He=M?He:y(0);break e}else{Le=y(Le+y(l*y(.5))),He=y(0);break e}case 6:{He=y(l/y(Oo>>>0)),He=Wn>_s&M?He:y(0);break}default:He=y(0)}while(!1);if(m|0)for(Lt=1040+(Ar<<2)|0,qr=976+(Ar<<2)|0,We=0,G=0;;){e:do if(G>>>0<uo>>>0)for(Qe=y(0),tt=y(0),l=y(0),ae=G;;){M=n[(n[_o>>2]|0)+(ae<<2)>>2]|0;do if((n[M+36>>2]|0)!=1&&!(n[M+24>>2]|0)){if((n[M+940>>2]|0)!=(We|0))break e;if($L(M,Ar)|0&&(zt=y(h[M+908+(n[qr>>2]<<2)>>2]),l=y($n(l,y(zt+y(yn(M,Ar,Fr)))))),(os(o,M)|0)!=5)break;lo=y(Vg(M)),lo=y(lo+y(J(M,0,Fr))),zt=y(h[M+912>>2]),zt=y(y(zt+y(yn(M,0,Fr)))-lo),lo=y($n(tt,lo)),zt=y($n(Qe,zt)),Qe=zt,tt=lo,l=y($n(l,y(lo+zt)))}while(!1);if(M=ae+1|0,M>>>0<uo>>>0)ae=M;else{ae=M;break}}else tt=y(0),l=y(0),ae=G;while(!1);if(ct=y(He+l),u=Le,Le=y(Le+ct),G>>>0<ae>>>0){Ze=y(u+tt),M=G;do{G=n[(n[_o>>2]|0)+(M<<2)>>2]|0;e:do if((n[G+36>>2]|0)!=1&&!(n[G+24>>2]|0))switch(os(o,G)|0){case 1:{zt=y(u+y(J(G,Ar,Fr))),h[G+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 3:{zt=y(y(Le-y(re(G,Ar,Fr)))-y(h[G+908+(n[qr>>2]<<2)>>2])),h[G+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 2:{zt=y(u+y(y(ct-y(h[G+908+(n[qr>>2]<<2)>>2]))*y(.5))),h[G+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 4:{if(zt=y(u+y(J(G,Ar,Fr))),h[G+400+(n[Lt>>2]<<2)>>2]=zt,so(G,Ar,Wn)|0||(ci?(Qe=y(h[G+908>>2]),l=y(Qe+y(yn(G,Mr,Fr))),tt=ct):(tt=y(h[G+912>>2]),tt=y(tt+y(yn(G,Ar,Fr))),l=ct,Qe=y(h[G+908>>2])),mn(l,Qe)|0&&mn(tt,y(h[G+912>>2]))|0))break e;kl(G,l,tt,Us,1,1,Fr,Lo,1,3501,_)|0;break e}case 5:{h[G+404>>2]=y(y(Ze-y(Vg(G)))+y(XA(G,0,Wn)));break e}default:break e}while(!1);M=M+1|0}while((M|0)!=(ae|0))}if(We=We+1|0,(We|0)==(m|0))break;G=ae}}}while(!1);if(h[o+908>>2]=y(Gn(o,2,Tu,B,B)),h[o+912>>2]=y(Gn(o,0,Ap,k,B)),Ec|0&&(pp=n[o+32>>2]|0,hp=(Ec|0)==2,!(hp&(pp|0)!=2))?hp&(pp|0)==2&&(l=y(Ru+cr),l=y($n(y(hd(l,y(Kg(o,Mr,Qu,Mo)))),Ru)),on=198):(l=y(Gn(o,Mr,Qu,Mo,B)),on=198),(on|0)==198&&(h[o+908+(n[976+(Mr<<2)>>2]<<2)>>2]=l),Ic|0&&(dp=n[o+32>>2]|0,mp=(Ic|0)==2,!(mp&(dp|0)!=2))?mp&(dp|0)==2&&(l=y(co+Wn),l=y($n(y(hd(l,y(Kg(o,Ar,y(co+_s),Fu)))),co)),on=204):(l=y(Gn(o,Ar,y(co+_s),Fu,B)),on=204),(on|0)==204&&(h[o+908+(n[976+(Ar<<2)>>2]<<2)>>2]=l),T){if((n[gp>>2]|0)==2){G=976+(Ar<<2)|0,ae=1040+(Ar<<2)|0,M=0;do We=Cs(o,M)|0,n[We+24>>2]|0||(yp=n[G>>2]|0,zt=y(h[o+908+(yp<<2)>>2]),Bi=We+400+(n[ae>>2]<<2)|0,zt=y(zt-y(h[Bi>>2])),h[Bi>>2]=y(zt-y(h[We+908+(yp<<2)>>2]))),M=M+1|0;while((M|0)!=(uo|0))}if(A|0){M=ci?Ec:d;do eM(o,A,Fr,M,Lo,Us,_),A=n[A+960>>2]|0;while(A|0)}if(M=(Mr|2|0)==3,G=(Ar|2|0)==3,M|G){A=0;do ae=n[(n[_o>>2]|0)+(A<<2)>>2]|0,(n[ae+36>>2]|0)!=1&&(M&&a2(o,ae,Mr),G&&a2(o,ae,Ar)),A=A+1|0;while((A|0)!=(uo|0))}}}while(!1);I=Cc}function xh(o,l){o=o|0,l=y(l);var u=0;ja(o,l>=y(0),3147),u=l==y(0),h[o+4>>2]=u?y(0):l}function KA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=A|0;var d=Xe,m=Xe,B=0,k=0,T=0;n[2278]=(n[2278]|0)+1,Sf(o),so(o,2,l)|0?(d=y(Xr(n[o+992>>2]|0,l)),T=1,d=y(d+y(yn(o,2,l)))):(d=y(Xr(o+380|0,l)),d>=y(0)?T=2:(T=((Mt(l)|0)^1)&1,d=l)),so(o,0,u)|0?(m=y(Xr(n[o+996>>2]|0,u)),k=1,m=y(m+y(yn(o,0,l)))):(m=y(Xr(o+388|0,u)),m>=y(0)?k=2:(k=((Mt(u)|0)^1)&1,m=u)),B=o+976|0,kl(o,d,m,A,T,k,l,u,1,3189,n[B>>2]|0)|0&&(kh(o,n[o+496>>2]|0,l,u,l),JA(o,y(h[(n[B>>2]|0)+4>>2]),y(0),y(0)),s[11696]|0)&&Gg(o,7)}function Sf(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;k=I,I=I+32|0,B=k+24|0,m=k+16|0,A=k+8|0,d=k,u=0;do l=o+380+(u<<3)|0,n[o+380+(u<<3)+4>>2]|0&&(T=l,_=n[T+4>>2]|0,M=A,n[M>>2]=n[T>>2],n[M+4>>2]=_,M=o+364+(u<<3)|0,_=n[M+4>>2]|0,T=d,n[T>>2]=n[M>>2],n[T+4>>2]=_,n[m>>2]=n[A>>2],n[m+4>>2]=n[A+4>>2],n[B>>2]=n[d>>2],n[B+4>>2]=n[d+4>>2],wf(m,B)|0)||(l=o+348+(u<<3)|0),n[o+992+(u<<2)>>2]=l,u=u+1|0;while((u|0)!=2);I=k}function so(o,l,u){o=o|0,l=l|0,u=y(u);var A=0;switch(o=n[o+992+(n[976+(l<<2)>>2]<<2)>>2]|0,n[o+4>>2]|0){case 0:case 3:{o=0;break}case 1:{y(h[o>>2])<y(0)?o=0:A=5;break}case 2:{y(h[o>>2])<y(0)?o=0:o=(Mt(u)|0)^1;break}default:A=5}return(A|0)==5&&(o=1),o|0}function Xr(o,l){switch(o=o|0,l=y(l),n[o+4>>2]|0){case 2:{l=y(y(y(h[o>>2])*l)/y(100));break}case 1:{l=y(h[o>>2]);break}default:l=y(ce)}return y(l)}function kh(o,l,u,A,d){o=o|0,l=l|0,u=y(u),A=y(A),d=y(d);var m=0,B=Xe;l=n[o+944>>2]|0?l:1,m=dr(n[o+4>>2]|0,l)|0,l=by(m,l)|0,u=y(vP(o,m,u)),A=y(vP(o,l,A)),B=y(u+y(J(o,m,d))),h[o+400+(n[1040+(m<<2)>>2]<<2)>>2]=B,u=y(u+y(re(o,m,d))),h[o+400+(n[1e3+(m<<2)>>2]<<2)>>2]=u,u=y(A+y(J(o,l,d))),h[o+400+(n[1040+(l<<2)>>2]<<2)>>2]=u,d=y(A+y(re(o,l,d))),h[o+400+(n[1e3+(l<<2)>>2]<<2)>>2]=d}function JA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=y(A);var d=0,m=0,B=Xe,k=Xe,T=0,_=0,M=Xe,G=0,ae=Xe,We=Xe,Le=Xe,Qe=Xe;if(l!=y(0)&&(d=o+400|0,Qe=y(h[d>>2]),m=o+404|0,Le=y(h[m>>2]),G=o+416|0,We=y(h[G>>2]),_=o+420|0,B=y(h[_>>2]),ae=y(Qe+u),M=y(Le+A),A=y(ae+We),k=y(M+B),T=(n[o+988>>2]|0)==1,h[d>>2]=y(ss(Qe,l,0,T)),h[m>>2]=y(ss(Le,l,0,T)),u=y(E_(y(We*l),y(1))),mn(u,y(0))|0?m=0:m=(mn(u,y(1))|0)^1,u=y(E_(y(B*l),y(1))),mn(u,y(0))|0?d=0:d=(mn(u,y(1))|0)^1,Qe=y(ss(A,l,T&m,T&(m^1))),h[G>>2]=y(Qe-y(ss(ae,l,0,T))),Qe=y(ss(k,l,T&d,T&(d^1))),h[_>>2]=y(Qe-y(ss(M,l,0,T))),m=(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2,m|0)){d=0;do JA(Cs(o,d)|0,l,ae,M),d=d+1|0;while((d|0)!=(m|0))}}function Sy(o,l,u,A,d){switch(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,u|0){case 5:case 0:{o=n$(n[489]|0,A,d)|0;break}default:o=lVe(A,d)|0}return o|0}function Yg(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;d=I,I=I+16|0,m=d,n[m>>2]=A,Qh(o,0,l,u,m),I=d}function Qh(o,l,u,A,d){if(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,o=o|0?o:956,v$[n[o+8>>2]&1](o,l,u,A,d)|0,(u|0)==5)Nt();else return}function hc(o,l,u){o=o|0,l=l|0,u=u|0,s[o+l>>0]=u&1}function Dy(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(Th(o,A),kt(o,n[l>>2]|0,n[u>>2]|0,A))}function Th(o,l){o=o|0,l=l|0;var u=0;if((O(o)|0)>>>0<l>>>0&&sn(o),l>>>0>1073741823)Nt();else{u=Jt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function kt(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function O(o){return o=o|0,1073741823}function J(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+96>>2]|0?o=o+92|0:o=kn(o+60|0,n[1040+(l<<2)>>2]|0,992)|0,y(Ke(o,u))}function re(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+104>>2]|0?o=o+100|0:o=kn(o+60|0,n[1e3+(l<<2)>>2]|0,992)|0,y(Ke(o,u))}function de(o){return o=o|0,(o|1|0)==3|0}function Ke(o,l){return o=o|0,l=y(l),(n[o+4>>2]|0)==3?l=y(0):l=y(Xr(o,l)),y(l)}function ft(o,l){return o=o|0,l=l|0,o=n[o>>2]|0,(o|0?o:(l|0)>1?l:1)|0}function dr(o,l){o=o|0,l=l|0;var u=0;e:do if((l|0)==2){switch(o|0){case 2:{o=3;break e}case 3:break;default:{u=4;break e}}o=2}else u=4;while(!1);return o|0}function Br(o,l){o=o|0,l=l|0;var u=Xe;return de(l)|0&&n[o+312>>2]|0&&(u=y(h[o+308>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1040+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function _n(o,l){o=o|0,l=l|0;var u=Xe;return de(l)|0&&n[o+320>>2]|0&&(u=y(h[o+316>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1e3+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function di(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return de(l)|0&&n[o+240>>2]|0&&(A=y(Xr(o+236|0,u)),A>=y(0))||(A=y($n(y(Xr(kn(o+204|0,n[1040+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function ws(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return de(l)|0&&n[o+248>>2]|0&&(A=y(Xr(o+244|0,u)),A>=y(0))||(A=y($n(y(Xr(kn(o+204|0,n[1e3+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function zA(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=Xe,T=Xe,_=Xe,M=Xe,G=Xe,ae=Xe,We=0,Le=0,Qe=0;Qe=I,I=I+16|0,We=Qe,Le=o+964|0,wi(o,(n[Le>>2]|0)!=0,3519),k=y(Ka(o,2,l)),T=y(Ka(o,0,l)),_=y(yn(o,2,l)),M=y(yn(o,0,l)),Mt(l)|0?G=l:G=y($n(y(0),y(y(l-_)-k))),Mt(u)|0?ae=u:ae=y($n(y(0),y(y(u-M)-T))),(A|0)==1&(d|0)==1?(h[o+908>>2]=y(Gn(o,2,y(l-_),m,m)),l=y(Gn(o,0,y(u-M),B,m))):(S$[n[Le>>2]&1](We,o,G,A,ae,d),G=y(k+y(h[We>>2])),ae=y(l-_),h[o+908>>2]=y(Gn(o,2,(A|2|0)==2?G:ae,m,m)),ae=y(T+y(h[We+4>>2])),l=y(u-M),l=y(Gn(o,0,(d|2|0)==2?ae:l,B,m))),h[o+912>>2]=l,I=Qe}function wP(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=Xe,T=Xe,_=Xe,M=Xe;_=y(Ka(o,2,m)),k=y(Ka(o,0,m)),M=y(yn(o,2,m)),T=y(yn(o,0,m)),l=y(l-M),h[o+908>>2]=y(Gn(o,2,(A|2|0)==2?_:l,m,m)),u=y(u-T),h[o+912>>2]=y(Gn(o,0,(d|2|0)==2?k:u,B,m))}function i2(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=0,T=Xe,_=Xe;return k=(A|0)==2,!(l<=y(0)&k)&&!(u<=y(0)&(d|0)==2)&&!((A|0)==1&(d|0)==1)?o=0:(T=y(yn(o,0,m)),_=y(yn(o,2,m)),k=l<y(0)&k|(Mt(l)|0),l=y(l-_),h[o+908>>2]=y(Gn(o,2,k?y(0):l,m,m)),l=y(u-T),k=u<y(0)&(d|0)==2|(Mt(u)|0),h[o+912>>2]=y(Gn(o,0,k?y(0):l,B,m)),o=1),o|0}function by(o,l){return o=o|0,l=l|0,Jg(o)|0?o=dr(2,l)|0:o=0,o|0}function Rh(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(di(o,l,u)),y(u+y(Br(o,l)))}function s2(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(ws(o,l,u)),y(u+y(_n(o,l)))}function Ka(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return A=y(Rh(o,l,u)),y(A+y(s2(o,l,u)))}function o2(o){return o=o|0,n[o+24>>2]|0?o=0:y(ZA(o))!=y(0)?o=1:o=y(Fh(o))!=y(0),o|0}function ZA(o){o=o|0;var l=Xe;if(n[o+944>>2]|0){if(l=y(h[o+44>>2]),Mt(l)|0)return l=y(h[o+40>>2]),o=l>y(0)&((Mt(l)|0)^1),y(o?l:y(0))}else l=y(0);return y(l)}function Fh(o){o=o|0;var l=Xe,u=0,A=Xe;do if(n[o+944>>2]|0){if(l=y(h[o+48>>2]),Mt(l)|0){if(u=s[(n[o+976>>2]|0)+2>>0]|0,!(u<<24>>24)&&(A=y(h[o+40>>2]),A<y(0)&((Mt(A)|0)^1))){l=y(-A);break}l=u<<24>>24?y(1):y(0)}}else l=y(0);while(!1);return y(l)}function Py(o){o=o|0;var l=0,u=0;if(eE(o+400|0,0,540)|0,s[o+985>>0]=1,ee(o),u=Li(o)|0,u|0){l=o+948|0,o=0;do Py(n[(n[l>>2]|0)+(o<<2)>>2]|0),o=o+1|0;while((o|0)!=(u|0))}}function BP(o,l,u,A,d,m,B,k,T,_){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=y(m),B=y(B),k=k|0,T=T|0,_=_|0;var M=0,G=Xe,ae=0,We=0,Le=Xe,Qe=Xe,tt=0,Ze=Xe,ct=0,He=Xe,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0,Fo=0;Hn=I,I=I+16|0,qr=Hn+12|0,fr=Hn+8|0,$t=Hn+4|0,Tr=Hn,cr=dr(n[o+4>>2]|0,T)|0,Ge=de(cr)|0,G=y(Xr(tM(l)|0,Ge?m:B)),Lt=so(l,2,m)|0,Hr=so(l,0,B)|0;do if(!(Mt(G)|0)&&!(Mt(Ge?u:d)|0)){if(M=l+504|0,!(Mt(y(h[M>>2]))|0)&&(!(l2(n[l+976>>2]|0,0)|0)||(n[l+500>>2]|0)==(n[2278]|0)))break;h[M>>2]=y($n(G,y(Ka(l,cr,m))))}else ae=7;while(!1);do if((ae|0)==7){if(ct=Ge^1,!(ct|Lt^1)){B=y(Xr(n[l+992>>2]|0,m)),h[l+504>>2]=y($n(B,y(Ka(l,2,m))));break}if(!(Ge|Hr^1)){B=y(Xr(n[l+996>>2]|0,B)),h[l+504>>2]=y($n(B,y(Ka(l,0,m))));break}h[qr>>2]=y(ce),h[fr>>2]=y(ce),n[$t>>2]=0,n[Tr>>2]=0,Ze=y(yn(l,2,m)),He=y(yn(l,0,m)),Lt?(Le=y(Ze+y(Xr(n[l+992>>2]|0,m))),h[qr>>2]=Le,n[$t>>2]=1,We=1):(We=0,Le=y(ce)),Hr?(G=y(He+y(Xr(n[l+996>>2]|0,B))),h[fr>>2]=G,n[Tr>>2]=1,M=1):(M=0,G=y(ce)),ae=n[o+32>>2]|0,Ge&(ae|0)==2?ae=2:Mt(Le)|0&&!(Mt(u)|0)&&(h[qr>>2]=u,n[$t>>2]=2,We=2,Le=u),!((ae|0)==2&ct)&&Mt(G)|0&&!(Mt(d)|0)&&(h[fr>>2]=d,n[Tr>>2]=2,M=2,G=d),Qe=y(h[l+396>>2]),tt=Mt(Qe)|0;do if(tt)ae=We;else{if((We|0)==1&ct){h[fr>>2]=y(y(Le-Ze)/Qe),n[Tr>>2]=1,M=1,ae=1;break}Ge&(M|0)==1?(h[qr>>2]=y(Qe*y(G-He)),n[$t>>2]=1,M=1,ae=1):ae=We}while(!1);Fo=Mt(u)|0,We=(os(o,l)|0)!=4,!(Ge|Lt|((A|0)!=1|Fo)|(We|(ae|0)==1))&&(h[qr>>2]=u,n[$t>>2]=1,!tt)&&(h[fr>>2]=y(y(u-Ze)/Qe),n[Tr>>2]=1,M=1),!(Hr|ct|((k|0)!=1|(Mt(d)|0))|(We|(M|0)==1))&&(h[fr>>2]=d,n[Tr>>2]=1,!tt)&&(h[qr>>2]=y(Qe*y(d-He)),n[$t>>2]=1),Bu(l,2,m,m,$t,qr),Bu(l,0,B,m,Tr,fr),u=y(h[qr>>2]),d=y(h[fr>>2]),kl(l,u,d,T,n[$t>>2]|0,n[Tr>>2]|0,m,B,0,3565,_)|0,B=y(h[l+908+(n[976+(cr<<2)>>2]<<2)>>2]),h[l+504>>2]=y($n(B,y(Ka(l,cr,m))))}while(!1);n[l+500>>2]=n[2278],I=Hn}function Gn(o,l,u,A,d){return o=o|0,l=l|0,u=y(u),A=y(A),d=y(d),A=y(Kg(o,l,u,A)),y($n(A,y(Ka(o,l,d))))}function os(o,l){return o=o|0,l=l|0,l=l+20|0,l=n[(n[l>>2]|0?l:o+16|0)>>2]|0,(l|0)==5&&Jg(n[o+4>>2]|0)|0&&(l=1),l|0}function Ql(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+96>>2]|0?l=4:l=n[1040+(l<<2)>>2]|0,o+60+(l<<3)|0}function Tl(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+104>>2]|0?l=5:l=n[1e3+(l<<2)>>2]|0,o+60+(l<<3)|0}function Bu(o,l,u,A,d,m){switch(o=o|0,l=l|0,u=y(u),A=y(A),d=d|0,m=m|0,u=y(Xr(o+380+(n[976+(l<<2)>>2]<<3)|0,u)),u=y(u+y(yn(o,l,A))),n[d>>2]|0){case 2:case 1:{d=Mt(u)|0,A=y(h[m>>2]),h[m>>2]=d|A<u?A:u;break}case 0:{Mt(u)|0||(n[d>>2]=2,h[m>>2]=u);break}default:}}function ga(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,4,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1040+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function XA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,4,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1040+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Xr(A,u))),y(u)}function $A(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return A=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),A=y(A+y(J(o,l,u))),y(A+y(re(o,l,u)))}function XL(o){o=o|0;var l=0,u=0,A=0;e:do if(Jg(n[o+4>>2]|0)|0)l=0;else if((n[o+16>>2]|0)!=5)if(u=Li(o)|0,!u)l=0;else for(l=0;;){if(A=Cs(o,l)|0,!(n[A+24>>2]|0)&&(n[A+20>>2]|0)==5){l=1;break e}if(l=l+1|0,l>>>0>=u>>>0){l=0;break}}else l=1;while(!1);return l|0}function $L(o,l){o=o|0,l=l|0;var u=Xe;return u=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),u>=y(0)&((Mt(u)|0)^1)|0}function Vg(o){o=o|0;var l=Xe,u=0,A=0,d=0,m=0,B=0,k=0,T=Xe;if(u=n[o+968>>2]|0,u)T=y(h[o+908>>2]),l=y(h[o+912>>2]),l=y(I$[u&0](o,T,l)),wi(o,(Mt(l)|0)^1,3573);else{m=Li(o)|0;do if(m|0){for(u=0,d=0;;){if(A=Cs(o,d)|0,n[A+940>>2]|0){B=8;break}if((n[A+24>>2]|0)!=1)if(k=(os(o,A)|0)==5,k){u=A;break}else u=u|0?u:A;if(d=d+1|0,d>>>0>=m>>>0){B=8;break}}if((B|0)==8&&!u)break;return l=y(Vg(u)),y(l+y(h[u+404>>2]))}while(!1);l=y(h[o+912>>2])}return y(l)}function Kg(o,l,u,A){o=o|0,l=l|0,u=y(u),A=y(A);var d=Xe,m=0;return Jg(l)|0?(l=1,m=3):de(l)|0?(l=0,m=3):(A=y(ce),d=y(ce)),(m|0)==3&&(d=y(Xr(o+364+(l<<3)|0,A)),A=y(Xr(o+380+(l<<3)|0,A))),m=A<u&(A>=y(0)&((Mt(A)|0)^1)),u=m?A:u,m=d>=y(0)&((Mt(d)|0)^1)&u<d,y(m?d:u)}function eM(o,l,u,A,d,m,B){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0,B=B|0;var k=Xe,T=Xe,_=0,M=0,G=Xe,ae=Xe,We=Xe,Le=0,Qe=0,tt=0,Ze=0,ct=Xe,He=0;tt=dr(n[o+4>>2]|0,m)|0,Le=by(tt,m)|0,Qe=de(tt)|0,G=y(yn(l,2,u)),ae=y(yn(l,0,u)),so(l,2,u)|0?k=y(G+y(Xr(n[l+992>>2]|0,u))):ga(l,2)|0&&xy(l,2)|0?(k=y(h[o+908>>2]),T=y(Br(o,2)),T=y(k-y(T+y(_n(o,2)))),k=y(XA(l,2,u)),k=y(Gn(l,2,y(T-y(k+y(Nh(l,2,u)))),u,u))):k=y(ce),so(l,0,d)|0?T=y(ae+y(Xr(n[l+996>>2]|0,d))):ga(l,0)|0&&xy(l,0)|0?(T=y(h[o+912>>2]),ct=y(Br(o,0)),ct=y(T-y(ct+y(_n(o,0)))),T=y(XA(l,0,d)),T=y(Gn(l,0,y(ct-y(T+y(Nh(l,0,d)))),d,u))):T=y(ce),_=Mt(k)|0,M=Mt(T)|0;do if(_^M&&(We=y(h[l+396>>2]),!(Mt(We)|0)))if(_){k=y(G+y(y(T-ae)*We));break}else{ct=y(ae+y(y(k-G)/We)),T=M?ct:T;break}while(!1);M=Mt(k)|0,_=Mt(T)|0,M|_&&(He=(M^1)&1,A=u>y(0)&((A|0)!=0&M),k=Qe?k:A?u:k,kl(l,k,T,m,Qe?He:A?2:He,M&(_^1)&1,k,T,0,3623,B)|0,k=y(h[l+908>>2]),k=y(k+y(yn(l,2,u))),T=y(h[l+912>>2]),T=y(T+y(yn(l,0,u)))),kl(l,k,T,m,1,1,k,T,1,3635,B)|0,xy(l,tt)|0&&!(ga(l,tt)|0)?(He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(_n(o,tt))),ct=y(ct-y(re(l,tt,u))),ct=y(ct-y(Nh(l,tt,Qe?u:d))),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct):Ze=21;do if((Ze|0)==21){if(!(ga(l,tt)|0)&&(n[o+8>>2]|0)==1){He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct;break}!(ga(l,tt)|0)&&(n[o+8>>2]|0)==2&&(He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct)}while(!1);xy(l,Le)|0&&!(ga(l,Le)|0)?(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(_n(o,Le))),ct=y(ct-y(re(l,Le,u))),ct=y(ct-y(Nh(l,Le,Qe?d:u))),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct):Ze=30;do if((Ze|0)==30&&!(ga(l,Le)|0)){if((os(o,l)|0)==2){He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct;break}He=(os(o,l)|0)==3,He^(n[o+28>>2]|0)==2&&(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct)}while(!1)}function a2(o,l,u){o=o|0,l=l|0,u=u|0;var A=Xe,d=0;d=n[976+(u<<2)>>2]|0,A=y(h[l+908+(d<<2)>>2]),A=y(y(h[o+908+(d<<2)>>2])-A),A=y(A-y(h[l+400+(n[1040+(u<<2)>>2]<<2)>>2])),h[l+400+(n[1e3+(u<<2)>>2]<<2)>>2]=A}function Jg(o){return o=o|0,(o|1|0)==1|0}function tM(o){o=o|0;var l=Xe;switch(n[o+56>>2]|0){case 0:case 3:{l=y(h[o+40>>2]),l>y(0)&((Mt(l)|0)^1)?o=s[(n[o+976>>2]|0)+2>>0]|0?1056:992:o=1056;break}default:o=o+52|0}return o|0}function l2(o,l){return o=o|0,l=l|0,(s[o+l>>0]|0)!=0|0}function xy(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,5,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1e3+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function Nh(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,5,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1e3+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Xr(A,u))),y(u)}function vP(o,l,u){return o=o|0,l=l|0,u=y(u),ga(o,l)|0?u=y(XA(o,l,u)):u=y(-y(Nh(o,l,u))),y(u)}function SP(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function ky(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Jt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function DP(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function Qy(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&yt(o)}function bP(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;if(B=o+4|0,k=n[B>>2]|0,d=k-A|0,m=d>>2,o=l+(m<<2)|0,o>>>0<u>>>0){A=k;do n[A>>2]=n[o>>2],o=o+4|0,A=(n[B>>2]|0)+4|0,n[B>>2]=A;while(o>>>0<u>>>0)}m|0&&F2(k+(0-m<<2)|0,l|0,d|0)|0}function PP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0;return k=l+4|0,T=n[k>>2]|0,d=n[o>>2]|0,B=u,m=B-d|0,A=T+(0-(m>>2)<<2)|0,n[k>>2]=A,(m|0)>0&&Qr(A|0,d|0,m|0)|0,d=o+4|0,m=l+8|0,A=(n[d>>2]|0)-B|0,(A|0)>0&&(Qr(n[m>>2]|0,u|0,A|0)|0,n[m>>2]=(n[m>>2]|0)+(A>>>2<<2)),B=n[o>>2]|0,n[o>>2]=n[k>>2],n[k>>2]=B,B=n[d>>2]|0,n[d>>2]=n[m>>2],n[m>>2]=B,B=o+8|0,u=l+12|0,o=n[B>>2]|0,n[B>>2]=n[u>>2],n[u>>2]=o,n[l>>2]=n[k>>2],T|0}function c2(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;if(B=n[l>>2]|0,m=n[u>>2]|0,(B|0)!=(m|0)){d=o+8|0,u=((m+-4-B|0)>>>2)+1|0,o=B,A=n[d>>2]|0;do n[A>>2]=n[o>>2],A=(n[d>>2]|0)+4|0,n[d>>2]=A,o=o+4|0;while((o|0)!=(m|0));n[l>>2]=B+(u<<2)}}function u2(){fa()}function xP(){var o=0;return o=Jt(4)|0,f2(o),o|0}function f2(o){o=o|0,n[o>>2]=pc()|0}function kP(o){o=o|0,o|0&&(zg(o),yt(o))}function zg(o){o=o|0,st(n[o>>2]|0)}function rM(o,l,u){o=o|0,l=l|0,u=u|0,hc(n[o>>2]|0,l,u)}function Ty(o,l){o=o|0,l=y(l),xh(n[o>>2]|0,l)}function Ry(o,l){return o=o|0,l=l|0,l2(n[o>>2]|0,l)|0}function Fy(){var o=0;return o=Jt(8)|0,Zg(o,0),o|0}function Zg(o,l){o=o|0,l=l|0,l?l=Aa(n[l>>2]|0)|0:l=ns()|0,n[o>>2]=l,n[o+4>>2]=0,Tn(l,o)}function Ny(o){o=o|0;var l=0;return l=Jt(8)|0,Zg(l,o),l|0}function Xg(o){o=o|0,o|0&&(Oy(o),yt(o))}function Oy(o){o=o|0;var l=0;fc(n[o>>2]|0),l=o+4|0,o=n[l>>2]|0,n[l>>2]=0,o|0&&(Df(o),yt(o))}function Df(o){o=o|0,bf(o)}function bf(o){o=o|0,o=n[o>>2]|0,o|0&&Oa(o|0)}function A2(o){return o=o|0,Ga(o)|0}function p2(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Df(l),yt(l)),Ac(n[o>>2]|0)}function Ly(o,l){o=o|0,l=l|0,fn(n[o>>2]|0,n[l>>2]|0)}function nM(o,l){o=o|0,l=l|0,Sh(n[o>>2]|0,l)}function iM(o,l,u){o=o|0,l=l|0,u=+u,Cy(n[o>>2]|0,l,y(u))}function My(o,l,u){o=o|0,l=l|0,u=+u,wy(n[o>>2]|0,l,y(u))}function h2(o,l){o=o|0,l=l|0,wh(n[o>>2]|0,l)}function g2(o,l){o=o|0,l=l|0,bo(n[o>>2]|0,l)}function xr(o,l){o=o|0,l=l|0,vh(n[o>>2]|0,l)}function oo(o,l){o=o|0,l=l|0,my(n[o>>2]|0,l)}function Zi(o,l){o=o|0,l=l|0,Og(n[o>>2]|0,l)}function Os(o,l){o=o|0,l=l|0,Do(n[o>>2]|0,l)}function ep(o,l,u){o=o|0,l=l|0,u=+u,qA(n[o>>2]|0,l,y(u))}function d2(o,l,u){o=o|0,l=l|0,u=+u,Y(n[o>>2]|0,l,y(u))}function Bs(o,l){o=o|0,l=l|0,GA(n[o>>2]|0,l)}function _y(o,l){o=o|0,l=l|0,Ey(n[o>>2]|0,l)}function Oh(o,l){o=o|0,l=l|0,Po(n[o>>2]|0,l)}function $g(o,l){o=o|0,l=+l,Dh(n[o>>2]|0,y(l))}function Lh(o,l){o=o|0,l=+l,Pl(n[o>>2]|0,y(l))}function m2(o,l){o=o|0,l=+l,Iy(n[o>>2]|0,y(l))}function y2(o,l){o=o|0,l=+l,Mg(n[o>>2]|0,y(l))}function E2(o,l){o=o|0,l=+l,bl(n[o>>2]|0,y(l))}function I2(o,l){o=o|0,l=+l,_g(n[o>>2]|0,y(l))}function Pf(o,l){o=o|0,l=+l,n2(n[o>>2]|0,y(l))}function sr(o){o=o|0,bh(n[o>>2]|0)}function Uy(o,l){o=o|0,l=+l,zi(n[o>>2]|0,y(l))}function C2(o,l){o=o|0,l=+l,Ef(n[o>>2]|0,y(l))}function gc(o){o=o|0,Wa(n[o>>2]|0)}function xf(o,l){o=o|0,l=+l,yu(n[o>>2]|0,y(l))}function ed(o,l){o=o|0,l=+l,If(n[o>>2]|0,y(l))}function td(o,l){o=o|0,l=+l,gi(n[o>>2]|0,y(l))}function w2(o,l){o=o|0,l=+l,WA(n[o>>2]|0,y(l))}function B2(o,l){o=o|0,l=+l,pa(n[o>>2]|0,y(l))}function vu(o,l){o=o|0,l=+l,Va(n[o>>2]|0,y(l))}function rd(o,l){o=o|0,l=+l,Ph(n[o>>2]|0,y(l))}function v2(o,l){o=o|0,l=+l,jg(n[o>>2]|0,y(l))}function Hy(o,l){o=o|0,l=+l,YA(n[o>>2]|0,y(l))}function Su(o,l,u){o=o|0,l=l|0,u=+u,mu(n[o>>2]|0,l,y(u))}function jy(o,l,u){o=o|0,l=l|0,u=+u,xo(n[o>>2]|0,l,y(u))}function nd(o,l,u){o=o|0,l=l|0,u=+u,yf(n[o>>2]|0,l,y(u))}function id(o){return o=o|0,Ng(n[o>>2]|0)|0}function To(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,jA(d,n[l>>2]|0,u),vs(o,d),I=A}function vs(o,l){o=o|0,l=l|0,Rl(o,n[l+4>>2]|0,+y(h[l>>2]))}function Rl(o,l,u){o=o|0,l=l|0,u=+u,n[o>>2]=l,E[o+8>>3]=u}function qy(o){return o=o|0,r2(n[o>>2]|0)|0}function da(o){return o=o|0,Bh(n[o>>2]|0)|0}function QP(o){return o=o|0,du(n[o>>2]|0)|0}function Mh(o){return o=o|0,t2(n[o>>2]|0)|0}function S2(o){return o=o|0,Lg(n[o>>2]|0)|0}function sM(o){return o=o|0,yy(n[o>>2]|0)|0}function TP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,xt(d,n[l>>2]|0,u),vs(o,d),I=A}function RP(o){return o=o|0,mf(n[o>>2]|0)|0}function Gy(o){return o=o|0,Dl(n[o>>2]|0)|0}function D2(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,HA(A,n[l>>2]|0),vs(o,A),I=u}function _h(o){return o=o|0,+ +y(ai(n[o>>2]|0))}function FP(o){return o=o|0,+ +y(qi(n[o>>2]|0))}function NP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,ur(A,n[l>>2]|0),vs(o,A),I=u}function sd(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Ug(A,n[l>>2]|0),vs(o,A),I=u}function oM(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,wt(A,n[l>>2]|0),vs(o,A),I=u}function aM(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Ya(A,n[l>>2]|0),vs(o,A),I=u}function OP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Hg(A,n[l>>2]|0),vs(o,A),I=u}function LP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,vy(A,n[l>>2]|0),vs(o,A),I=u}function tp(o){return o=o|0,+ +y(qg(n[o>>2]|0))}function lM(o,l){return o=o|0,l=l|0,+ +y(By(n[o>>2]|0,l))}function cM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,dt(d,n[l>>2]|0,u),vs(o,d),I=A}function Du(o,l,u){o=o|0,l=l|0,u=u|0,lr(n[o>>2]|0,n[l>>2]|0,u)}function uM(o,l){o=o|0,l=l|0,df(n[o>>2]|0,n[l>>2]|0)}function MP(o){return o=o|0,Li(n[o>>2]|0)|0}function fM(o){return o=o|0,o=mt(n[o>>2]|0)|0,o?o=A2(o)|0:o=0,o|0}function _P(o,l){return o=o|0,l=l|0,o=Cs(n[o>>2]|0,l)|0,o?o=A2(o)|0:o=0,o|0}function kf(o,l){o=o|0,l=l|0;var u=0,A=0;A=Jt(4)|0,UP(A,l),u=o+4|0,l=n[u>>2]|0,n[u>>2]=A,l|0&&(Df(l),yt(l)),St(n[o>>2]|0,1)}function UP(o,l){o=o|0,l=l|0,gM(o,l)}function AM(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,HP(k,Ga(l)|0,+u,A,+d,m),h[o>>2]=y(+E[k>>3]),h[o+4>>2]=y(+E[k+8>>3]),I=B}function HP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0,k=0,T=0,_=0,M=0;B=I,I=I+32|0,M=B+8|0,_=B+20|0,T=B,k=B+16|0,E[M>>3]=u,n[_>>2]=A,E[T>>3]=d,n[k>>2]=m,Wy(o,n[l+4>>2]|0,M,_,T,k),I=B}function Wy(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,Nl(k),l=Ls(l)|0,jP(o,l,+E[u>>3],n[A>>2]|0,+E[d>>3],n[m>>2]|0),Ol(k),I=B}function Ls(o){return o=o|0,n[o>>2]|0}function jP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0;B=ma(b2()|0)|0,u=+Ja(u),A=Yy(A)|0,d=+Ja(d),pM(o,Jn(0,B|0,l|0,+u,A|0,+d,Yy(m)|0)|0)}function b2(){var o=0;return s[7608]|0||(x2(9120),o=7608,n[o>>2]=1,n[o+4>>2]=0),9120}function ma(o){return o=o|0,n[o+8>>2]|0}function Ja(o){return o=+o,+ +Qf(o)}function Yy(o){return o=o|0,od(o)|0}function pM(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=l,A&1?(za(u,0),Me(A|0,u|0)|0,P2(o,u),hM(u)):(n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]),I=d}function za(o,l){o=o|0,l=l|0,bu(o,l),n[o+8>>2]=0,s[o+24>>0]=0}function P2(o,l){o=o|0,l=l|0,l=l+8|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]}function hM(o){o=o|0,s[o+24>>0]=0}function bu(o,l){o=o|0,l=l|0,n[o>>2]=l}function od(o){return o=o|0,o|0}function Qf(o){return o=+o,+o}function x2(o){o=o|0,Ro(o,k2()|0,4)}function k2(){return 1064}function Ro(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=ji(l|0,u+1|0)|0}function gM(o,l){o=o|0,l=l|0,l=n[l>>2]|0,n[o>>2]=l,cu(l|0)}function qP(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Df(l),yt(l)),St(n[o>>2]|0,0)}function GP(o){o=o|0,Dt(n[o>>2]|0)}function Vy(o){return o=o|0,tr(n[o>>2]|0)|0}function dM(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,KA(n[o>>2]|0,y(l),y(u),A)}function mM(o){return o=o|0,+ +y(Eu(n[o>>2]|0))}function v(o){return o=o|0,+ +y(Cf(n[o>>2]|0))}function D(o){return o=o|0,+ +y(Iu(n[o>>2]|0))}function Q(o){return o=o|0,+ +y(Fs(n[o>>2]|0))}function H(o){return o=o|0,+ +y(Cu(n[o>>2]|0))}function V(o){return o=o|0,+ +y(qn(n[o>>2]|0))}function ne(o,l){o=o|0,l=l|0,E[o>>3]=+y(Eu(n[l>>2]|0)),E[o+8>>3]=+y(Cf(n[l>>2]|0)),E[o+16>>3]=+y(Iu(n[l>>2]|0)),E[o+24>>3]=+y(Fs(n[l>>2]|0)),E[o+32>>3]=+y(Cu(n[l>>2]|0)),E[o+40>>3]=+y(qn(n[l>>2]|0))}function Se(o,l){return o=o|0,l=l|0,+ +y(is(n[o>>2]|0,l))}function Ue(o,l){return o=o|0,l=l|0,+ +y(xi(n[o>>2]|0,l))}function At(o,l){return o=o|0,l=l|0,+ +y(VA(n[o>>2]|0,l))}function Gt(){return Qn()|0}function vr(){Lr(),Xt(),zn(),mi(),Za(),$e()}function Lr(){Kqe(11713,4938,1)}function Xt(){pqe(10448)}function zn(){K6e(10408)}function mi(){m6e(10324)}function Za(){SHe(10096)}function $e(){qe(9132)}function qe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0,Fo=0,No=0,Oo=0,$a=0,Kh=0,Jh=0,dc=0,zh=0,Ff=0,Nf=0,Zh=0,Xh=0,$h=0,on=0,mc=0,e0=0,ku=0,t0=0,r0=0,Of=0,Lf=0,Qu=0,ao=0,Ml=0,ya=0,yc=0,lp=0,cp=0,Mf=0,up=0,fp=0,lo=0,_s=0,Ec=0,Wn=0,Ap=0,Lo=0,Tu=0,Mo=0,Ru=0,pp=0,hp=0,Fu=0,co=0,Ic=0,gp=0,dp=0,mp=0,Fr=0,ci=0,Us=0,_o=0,uo=0,Mr=0,Ar=0,Cc=0;l=I,I=I+672|0,u=l+656|0,Cc=l+648|0,Ar=l+640|0,Mr=l+632|0,uo=l+624|0,_o=l+616|0,Us=l+608|0,ci=l+600|0,Fr=l+592|0,mp=l+584|0,dp=l+576|0,gp=l+568|0,Ic=l+560|0,co=l+552|0,Fu=l+544|0,hp=l+536|0,pp=l+528|0,Ru=l+520|0,Mo=l+512|0,Tu=l+504|0,Lo=l+496|0,Ap=l+488|0,Wn=l+480|0,Ec=l+472|0,_s=l+464|0,lo=l+456|0,fp=l+448|0,up=l+440|0,Mf=l+432|0,cp=l+424|0,lp=l+416|0,yc=l+408|0,ya=l+400|0,Ml=l+392|0,ao=l+384|0,Qu=l+376|0,Lf=l+368|0,Of=l+360|0,r0=l+352|0,t0=l+344|0,ku=l+336|0,e0=l+328|0,mc=l+320|0,on=l+312|0,$h=l+304|0,Xh=l+296|0,Zh=l+288|0,Nf=l+280|0,Ff=l+272|0,zh=l+264|0,dc=l+256|0,Jh=l+248|0,Kh=l+240|0,$a=l+232|0,Oo=l+224|0,No=l+216|0,Fo=l+208|0,Hn=l+200|0,cr=l+192|0,Hr=l+184|0,Tr=l+176|0,$t=l+168|0,fr=l+160|0,qr=l+152|0,Lt=l+144|0,Ge=l+136|0,He=l+128|0,ct=l+120|0,Ze=l+112|0,tt=l+104|0,Qe=l+96|0,Le=l+88|0,We=l+80|0,ae=l+72|0,G=l+64|0,M=l+56|0,_=l+48|0,T=l+40|0,k=l+32|0,B=l+24|0,m=l+16|0,d=l+8|0,A=l,pt(o,3646),Zt(o,3651,2)|0,Sr(o,3665,2)|0,Xn(o,3682,18)|0,n[Cc>>2]=19,n[Cc+4>>2]=0,n[u>>2]=n[Cc>>2],n[u+4>>2]=n[Cc+4>>2],kr(o,3690,u)|0,n[Ar>>2]=1,n[Ar+4>>2]=0,n[u>>2]=n[Ar>>2],n[u+4>>2]=n[Ar+4>>2],Rn(o,3696,u)|0,n[Mr>>2]=2,n[Mr+4>>2]=0,n[u>>2]=n[Mr>>2],n[u+4>>2]=n[Mr+4>>2],Un(o,3706,u)|0,n[uo>>2]=1,n[uo+4>>2]=0,n[u>>2]=n[uo>>2],n[u+4>>2]=n[uo+4>>2],zr(o,3722,u)|0,n[_o>>2]=2,n[_o+4>>2]=0,n[u>>2]=n[_o>>2],n[u+4>>2]=n[_o+4>>2],zr(o,3734,u)|0,n[Us>>2]=3,n[Us+4>>2]=0,n[u>>2]=n[Us>>2],n[u+4>>2]=n[Us+4>>2],Un(o,3753,u)|0,n[ci>>2]=4,n[ci+4>>2]=0,n[u>>2]=n[ci>>2],n[u+4>>2]=n[ci+4>>2],Un(o,3769,u)|0,n[Fr>>2]=5,n[Fr+4>>2]=0,n[u>>2]=n[Fr>>2],n[u+4>>2]=n[Fr+4>>2],Un(o,3783,u)|0,n[mp>>2]=6,n[mp+4>>2]=0,n[u>>2]=n[mp>>2],n[u+4>>2]=n[mp+4>>2],Un(o,3796,u)|0,n[dp>>2]=7,n[dp+4>>2]=0,n[u>>2]=n[dp>>2],n[u+4>>2]=n[dp+4>>2],Un(o,3813,u)|0,n[gp>>2]=8,n[gp+4>>2]=0,n[u>>2]=n[gp>>2],n[u+4>>2]=n[gp+4>>2],Un(o,3825,u)|0,n[Ic>>2]=3,n[Ic+4>>2]=0,n[u>>2]=n[Ic>>2],n[u+4>>2]=n[Ic+4>>2],zr(o,3843,u)|0,n[co>>2]=4,n[co+4>>2]=0,n[u>>2]=n[co>>2],n[u+4>>2]=n[co+4>>2],zr(o,3853,u)|0,n[Fu>>2]=9,n[Fu+4>>2]=0,n[u>>2]=n[Fu>>2],n[u+4>>2]=n[Fu+4>>2],Un(o,3870,u)|0,n[hp>>2]=10,n[hp+4>>2]=0,n[u>>2]=n[hp>>2],n[u+4>>2]=n[hp+4>>2],Un(o,3884,u)|0,n[pp>>2]=11,n[pp+4>>2]=0,n[u>>2]=n[pp>>2],n[u+4>>2]=n[pp+4>>2],Un(o,3896,u)|0,n[Ru>>2]=1,n[Ru+4>>2]=0,n[u>>2]=n[Ru>>2],n[u+4>>2]=n[Ru+4>>2],li(o,3907,u)|0,n[Mo>>2]=2,n[Mo+4>>2]=0,n[u>>2]=n[Mo>>2],n[u+4>>2]=n[Mo+4>>2],li(o,3915,u)|0,n[Tu>>2]=3,n[Tu+4>>2]=0,n[u>>2]=n[Tu>>2],n[u+4>>2]=n[Tu+4>>2],li(o,3928,u)|0,n[Lo>>2]=4,n[Lo+4>>2]=0,n[u>>2]=n[Lo>>2],n[u+4>>2]=n[Lo+4>>2],li(o,3948,u)|0,n[Ap>>2]=5,n[Ap+4>>2]=0,n[u>>2]=n[Ap>>2],n[u+4>>2]=n[Ap+4>>2],li(o,3960,u)|0,n[Wn>>2]=6,n[Wn+4>>2]=0,n[u>>2]=n[Wn>>2],n[u+4>>2]=n[Wn+4>>2],li(o,3974,u)|0,n[Ec>>2]=7,n[Ec+4>>2]=0,n[u>>2]=n[Ec>>2],n[u+4>>2]=n[Ec+4>>2],li(o,3983,u)|0,n[_s>>2]=20,n[_s+4>>2]=0,n[u>>2]=n[_s>>2],n[u+4>>2]=n[_s+4>>2],kr(o,3999,u)|0,n[lo>>2]=8,n[lo+4>>2]=0,n[u>>2]=n[lo>>2],n[u+4>>2]=n[lo+4>>2],li(o,4012,u)|0,n[fp>>2]=9,n[fp+4>>2]=0,n[u>>2]=n[fp>>2],n[u+4>>2]=n[fp+4>>2],li(o,4022,u)|0,n[up>>2]=21,n[up+4>>2]=0,n[u>>2]=n[up>>2],n[u+4>>2]=n[up+4>>2],kr(o,4039,u)|0,n[Mf>>2]=10,n[Mf+4>>2]=0,n[u>>2]=n[Mf>>2],n[u+4>>2]=n[Mf+4>>2],li(o,4053,u)|0,n[cp>>2]=11,n[cp+4>>2]=0,n[u>>2]=n[cp>>2],n[u+4>>2]=n[cp+4>>2],li(o,4065,u)|0,n[lp>>2]=12,n[lp+4>>2]=0,n[u>>2]=n[lp>>2],n[u+4>>2]=n[lp+4>>2],li(o,4084,u)|0,n[yc>>2]=13,n[yc+4>>2]=0,n[u>>2]=n[yc>>2],n[u+4>>2]=n[yc+4>>2],li(o,4097,u)|0,n[ya>>2]=14,n[ya+4>>2]=0,n[u>>2]=n[ya>>2],n[u+4>>2]=n[ya+4>>2],li(o,4117,u)|0,n[Ml>>2]=15,n[Ml+4>>2]=0,n[u>>2]=n[Ml>>2],n[u+4>>2]=n[Ml+4>>2],li(o,4129,u)|0,n[ao>>2]=16,n[ao+4>>2]=0,n[u>>2]=n[ao>>2],n[u+4>>2]=n[ao+4>>2],li(o,4148,u)|0,n[Qu>>2]=17,n[Qu+4>>2]=0,n[u>>2]=n[Qu>>2],n[u+4>>2]=n[Qu+4>>2],li(o,4161,u)|0,n[Lf>>2]=18,n[Lf+4>>2]=0,n[u>>2]=n[Lf>>2],n[u+4>>2]=n[Lf+4>>2],li(o,4181,u)|0,n[Of>>2]=5,n[Of+4>>2]=0,n[u>>2]=n[Of>>2],n[u+4>>2]=n[Of+4>>2],zr(o,4196,u)|0,n[r0>>2]=6,n[r0+4>>2]=0,n[u>>2]=n[r0>>2],n[u+4>>2]=n[r0+4>>2],zr(o,4206,u)|0,n[t0>>2]=7,n[t0+4>>2]=0,n[u>>2]=n[t0>>2],n[u+4>>2]=n[t0+4>>2],zr(o,4217,u)|0,n[ku>>2]=3,n[ku+4>>2]=0,n[u>>2]=n[ku>>2],n[u+4>>2]=n[ku+4>>2],Pu(o,4235,u)|0,n[e0>>2]=1,n[e0+4>>2]=0,n[u>>2]=n[e0>>2],n[u+4>>2]=n[e0+4>>2],yM(o,4251,u)|0,n[mc>>2]=4,n[mc+4>>2]=0,n[u>>2]=n[mc>>2],n[u+4>>2]=n[mc+4>>2],Pu(o,4263,u)|0,n[on>>2]=5,n[on+4>>2]=0,n[u>>2]=n[on>>2],n[u+4>>2]=n[on+4>>2],Pu(o,4279,u)|0,n[$h>>2]=6,n[$h+4>>2]=0,n[u>>2]=n[$h>>2],n[u+4>>2]=n[$h+4>>2],Pu(o,4293,u)|0,n[Xh>>2]=7,n[Xh+4>>2]=0,n[u>>2]=n[Xh>>2],n[u+4>>2]=n[Xh+4>>2],Pu(o,4306,u)|0,n[Zh>>2]=8,n[Zh+4>>2]=0,n[u>>2]=n[Zh>>2],n[u+4>>2]=n[Zh+4>>2],Pu(o,4323,u)|0,n[Nf>>2]=9,n[Nf+4>>2]=0,n[u>>2]=n[Nf>>2],n[u+4>>2]=n[Nf+4>>2],Pu(o,4335,u)|0,n[Ff>>2]=2,n[Ff+4>>2]=0,n[u>>2]=n[Ff>>2],n[u+4>>2]=n[Ff+4>>2],yM(o,4353,u)|0,n[zh>>2]=12,n[zh+4>>2]=0,n[u>>2]=n[zh>>2],n[u+4>>2]=n[zh+4>>2],ad(o,4363,u)|0,n[dc>>2]=1,n[dc+4>>2]=0,n[u>>2]=n[dc>>2],n[u+4>>2]=n[dc+4>>2],rp(o,4376,u)|0,n[Jh>>2]=2,n[Jh+4>>2]=0,n[u>>2]=n[Jh>>2],n[u+4>>2]=n[Jh+4>>2],rp(o,4388,u)|0,n[Kh>>2]=13,n[Kh+4>>2]=0,n[u>>2]=n[Kh>>2],n[u+4>>2]=n[Kh+4>>2],ad(o,4402,u)|0,n[$a>>2]=14,n[$a+4>>2]=0,n[u>>2]=n[$a>>2],n[u+4>>2]=n[$a+4>>2],ad(o,4411,u)|0,n[Oo>>2]=15,n[Oo+4>>2]=0,n[u>>2]=n[Oo>>2],n[u+4>>2]=n[Oo+4>>2],ad(o,4421,u)|0,n[No>>2]=16,n[No+4>>2]=0,n[u>>2]=n[No>>2],n[u+4>>2]=n[No+4>>2],ad(o,4433,u)|0,n[Fo>>2]=17,n[Fo+4>>2]=0,n[u>>2]=n[Fo>>2],n[u+4>>2]=n[Fo+4>>2],ad(o,4446,u)|0,n[Hn>>2]=18,n[Hn+4>>2]=0,n[u>>2]=n[Hn>>2],n[u+4>>2]=n[Hn+4>>2],ad(o,4458,u)|0,n[cr>>2]=3,n[cr+4>>2]=0,n[u>>2]=n[cr>>2],n[u+4>>2]=n[cr+4>>2],rp(o,4471,u)|0,n[Hr>>2]=1,n[Hr+4>>2]=0,n[u>>2]=n[Hr>>2],n[u+4>>2]=n[Hr+4>>2],WP(o,4486,u)|0,n[Tr>>2]=10,n[Tr+4>>2]=0,n[u>>2]=n[Tr>>2],n[u+4>>2]=n[Tr+4>>2],Pu(o,4496,u)|0,n[$t>>2]=11,n[$t+4>>2]=0,n[u>>2]=n[$t>>2],n[u+4>>2]=n[$t+4>>2],Pu(o,4508,u)|0,n[fr>>2]=3,n[fr+4>>2]=0,n[u>>2]=n[fr>>2],n[u+4>>2]=n[fr+4>>2],yM(o,4519,u)|0,n[qr>>2]=4,n[qr+4>>2]=0,n[u>>2]=n[qr>>2],n[u+4>>2]=n[qr+4>>2],rLe(o,4530,u)|0,n[Lt>>2]=19,n[Lt+4>>2]=0,n[u>>2]=n[Lt>>2],n[u+4>>2]=n[Lt+4>>2],nLe(o,4542,u)|0,n[Ge>>2]=12,n[Ge+4>>2]=0,n[u>>2]=n[Ge>>2],n[u+4>>2]=n[Ge+4>>2],iLe(o,4554,u)|0,n[He>>2]=13,n[He+4>>2]=0,n[u>>2]=n[He>>2],n[u+4>>2]=n[He+4>>2],sLe(o,4568,u)|0,n[ct>>2]=2,n[ct+4>>2]=0,n[u>>2]=n[ct>>2],n[u+4>>2]=n[ct+4>>2],oLe(o,4578,u)|0,n[Ze>>2]=20,n[Ze+4>>2]=0,n[u>>2]=n[Ze>>2],n[u+4>>2]=n[Ze+4>>2],aLe(o,4587,u)|0,n[tt>>2]=22,n[tt+4>>2]=0,n[u>>2]=n[tt>>2],n[u+4>>2]=n[tt+4>>2],kr(o,4602,u)|0,n[Qe>>2]=23,n[Qe+4>>2]=0,n[u>>2]=n[Qe>>2],n[u+4>>2]=n[Qe+4>>2],kr(o,4619,u)|0,n[Le>>2]=14,n[Le+4>>2]=0,n[u>>2]=n[Le>>2],n[u+4>>2]=n[Le+4>>2],lLe(o,4629,u)|0,n[We>>2]=1,n[We+4>>2]=0,n[u>>2]=n[We>>2],n[u+4>>2]=n[We+4>>2],cLe(o,4637,u)|0,n[ae>>2]=4,n[ae+4>>2]=0,n[u>>2]=n[ae>>2],n[u+4>>2]=n[ae+4>>2],rp(o,4653,u)|0,n[G>>2]=5,n[G+4>>2]=0,n[u>>2]=n[G>>2],n[u+4>>2]=n[G+4>>2],rp(o,4669,u)|0,n[M>>2]=6,n[M+4>>2]=0,n[u>>2]=n[M>>2],n[u+4>>2]=n[M+4>>2],rp(o,4686,u)|0,n[_>>2]=7,n[_+4>>2]=0,n[u>>2]=n[_>>2],n[u+4>>2]=n[_+4>>2],rp(o,4701,u)|0,n[T>>2]=8,n[T+4>>2]=0,n[u>>2]=n[T>>2],n[u+4>>2]=n[T+4>>2],rp(o,4719,u)|0,n[k>>2]=9,n[k+4>>2]=0,n[u>>2]=n[k>>2],n[u+4>>2]=n[k+4>>2],rp(o,4736,u)|0,n[B>>2]=21,n[B+4>>2]=0,n[u>>2]=n[B>>2],n[u+4>>2]=n[B+4>>2],uLe(o,4754,u)|0,n[m>>2]=2,n[m+4>>2]=0,n[u>>2]=n[m>>2],n[u+4>>2]=n[m+4>>2],WP(o,4772,u)|0,n[d>>2]=3,n[d+4>>2]=0,n[u>>2]=n[d>>2],n[u+4>>2]=n[d+4>>2],WP(o,4790,u)|0,n[A>>2]=4,n[A+4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],WP(o,4808,u)|0,I=l}function pt(o,l){o=o|0,l=l|0;var u=0;u=dHe()|0,n[o>>2]=u,mHe(u,l),Wh(n[o>>2]|0)}function Zt(o,l,u){return o=o|0,l=l|0,u=u|0,rHe(o,Bn(l)|0,u,0),o|0}function Sr(o,l,u){return o=o|0,l=l|0,u=u|0,U8e(o,Bn(l)|0,u,0),o|0}function Xn(o,l,u){return o=o|0,l=l|0,u=u|0,D8e(o,Bn(l)|0,u,0),o|0}function kr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u8e(o,l,d),I=A,o|0}function Rn(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],W3e(o,l,d),I=A,o|0}function Un(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],x3e(o,l,d),I=A,o|0}function zr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],p3e(o,l,d),I=A,o|0}function li(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Z4e(o,l,d),I=A,o|0}function Pu(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],N4e(o,l,d),I=A,o|0}function yM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],E4e(o,l,d),I=A,o|0}function ad(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],WUe(o,l,d),I=A,o|0}function rp(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],xUe(o,l,d),I=A,o|0}function WP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],pUe(o,l,d),I=A,o|0}function rLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Z_e(o,l,d),I=A,o|0}function nLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],N_e(o,l,d),I=A,o|0}function iLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],I_e(o,l,d),I=A,o|0}function sLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],s_e(o,l,d),I=A,o|0}function oLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],jMe(o,l,d),I=A,o|0}function aLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],SMe(o,l,d),I=A,o|0}function lLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],cMe(o,l,d),I=A,o|0}function cLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],WLe(o,l,d),I=A,o|0}function uLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],fLe(o,l,d),I=A,o|0}function fLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ALe(o,u,d,1),I=A}function Bn(o){return o=o|0,o|0}function ALe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=EM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=pLe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,hLe(m,A)|0,A),I=d}function EM(){var o=0,l=0;if(s[7616]|0||(eZ(9136),gr(24,9136,U|0)|0,l=7616,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9136)|0)){o=9136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));eZ(9136)}return 9136}function pLe(o){return o=o|0,0}function hLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=EM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],$z(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(mLe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function vn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0;B=I,I=I+32|0,ae=B+24|0,G=B+20|0,T=B+16|0,M=B+12|0,_=B+8|0,k=B+4|0,We=B,n[G>>2]=l,n[T>>2]=u,n[M>>2]=A,n[_>>2]=d,n[k>>2]=m,m=o+28|0,n[We>>2]=n[m>>2],n[ae>>2]=n[We>>2],gLe(o+24|0,ae,G,M,_,T,k)|0,n[m>>2]=n[n[m>>2]>>2],I=B}function gLe(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,o=dLe(l)|0,l=Jt(24)|0,Xz(l+4|0,n[u>>2]|0,n[A>>2]|0,n[d>>2]|0,n[m>>2]|0,n[B>>2]|0),n[l>>2]=n[o>>2],n[o>>2]=l,l|0}function dLe(o){return o=o|0,n[o>>2]|0}function Xz(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function yr(o,l){return o=o|0,l=l|0,l|o|0}function $z(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function mLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=yLe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,ELe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],$z(m,A,u),n[T>>2]=(n[T>>2]|0)+12,ILe(o,k),CLe(k),I=_;return}}function yLe(o){return o=o|0,357913941}function ELe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function ILe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function CLe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function eZ(o){o=o|0,vLe(o)}function wLe(o){o=o|0,BLe(o+24|0)}function Ur(o){return o=o|0,n[o>>2]|0}function BLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function vLe(o){o=o|0;var l=0;l=en()|0,tn(o,2,3,l,SLe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function en(){return 9228}function SLe(){return 1140}function DLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=bLe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=PLe(l,A)|0,I=u,l|0}function tn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function bLe(o){return o=o|0,(n[(EM()|0)+24>>2]|0)+(o*12|0)|0}function PLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+48|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),ap[u&31](A,o),A=xLe(A)|0,I=d,A|0}function xLe(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=IM(tZ()|0)|0,A?(CM(l,A),wM(u,l),kLe(o,u),o=BM(l)|0):o=QLe(o)|0,I=d,o|0}function tZ(){var o=0;return s[7632]|0||(HLe(9184),gr(25,9184,U|0)|0,o=7632,n[o>>2]=1,n[o+4>>2]=0),9184}function IM(o){return o=o|0,n[o+36>>2]|0}function CM(o,l){o=o|0,l=l|0,n[o>>2]=l,n[o+4>>2]=o,n[o+8>>2]=0}function wM(o,l){o=o|0,l=l|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=0}function kLe(o,l){o=o|0,l=l|0,NLe(l,o,o+8|0,o+16|0,o+24|0,o+32|0,o+40|0)|0}function BM(o){return o=o|0,n[(n[o+4>>2]|0)+8>>2]|0}function QLe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;T=I,I=I+16|0,u=T+4|0,A=T,d=Fl(8)|0,m=d,B=Jt(48)|0,k=B,l=k+48|0;do n[k>>2]=n[o>>2],k=k+4|0,o=o+4|0;while((k|0)<(l|0));return l=m+4|0,n[l>>2]=B,k=Jt(8)|0,B=n[l>>2]|0,n[A>>2]=0,n[u>>2]=n[A>>2],rZ(k,B,u),n[d>>2]=k,I=T,m|0}function rZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1092,n[u+12>>2]=l,n[o+4>>2]=u}function TLe(o){o=o|0,$y(o),yt(o)}function RLe(o){o=o|0,o=n[o+12>>2]|0,o|0&&yt(o)}function FLe(o){o=o|0,yt(o)}function NLe(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,m=OLe(n[o>>2]|0,l,u,A,d,m,B)|0,B=o+4|0,n[(n[B>>2]|0)+8>>2]=m,n[(n[B>>2]|0)+8>>2]|0}function OLe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0;var k=0,T=0;return k=I,I=I+16|0,T=k,Nl(T),o=Ls(o)|0,B=LLe(o,+E[l>>3],+E[u>>3],+E[A>>3],+E[d>>3],+E[m>>3],+E[B>>3])|0,Ol(T),I=k,B|0}function LLe(o,l,u,A,d,m,B){o=o|0,l=+l,u=+u,A=+A,d=+d,m=+m,B=+B;var k=0;return k=ma(MLe()|0)|0,l=+Ja(l),u=+Ja(u),A=+Ja(A),d=+Ja(d),m=+Ja(m),no(0,k|0,o|0,+l,+u,+A,+d,+m,+ +Ja(B))|0}function MLe(){var o=0;return s[7624]|0||(_Le(9172),o=7624,n[o>>2]=1,n[o+4>>2]=0),9172}function _Le(o){o=o|0,Ro(o,ULe()|0,6)}function ULe(){return 1112}function HLe(o){o=o|0,Uh(o)}function jLe(o){o=o|0,nZ(o+24|0),iZ(o+16|0)}function nZ(o){o=o|0,GLe(o)}function iZ(o){o=o|0,qLe(o)}function qLe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,yt(u);while(l|0);n[o>>2]=0}function GLe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,yt(u);while(l|0);n[o>>2]=0}function Uh(o){o=o|0;var l=0;n[o+16>>2]=0,n[o+20>>2]=0,l=o+24|0,n[l>>2]=0,n[o+28>>2]=l,n[o+36>>2]=0,s[o+40>>0]=0,s[o+41>>0]=0}function WLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],YLe(o,u,d,0),I=A}function YLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=vM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=VLe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,KLe(m,A)|0,A),I=d}function vM(){var o=0,l=0;if(s[7640]|0||(oZ(9232),gr(26,9232,U|0)|0,l=7640,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9232)|0)){o=9232,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));oZ(9232)}return 9232}function VLe(o){return o=o|0,0}function KLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=vM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],sZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(JLe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function sZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function JLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=zLe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,ZLe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],sZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,XLe(o,k),$Le(k),I=_;return}}function zLe(o){return o=o|0,357913941}function ZLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function XLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function $Le(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function oZ(o){o=o|0,rMe(o)}function eMe(o){o=o|0,tMe(o+24|0)}function tMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function rMe(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,nMe()|0,3),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function nMe(){return 1144}function iMe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,B=m+8|0,k=m,T=sMe(o)|0,o=n[T+4>>2]|0,n[k>>2]=n[T>>2],n[k+4>>2]=o,n[B>>2]=n[k>>2],n[B+4>>2]=n[k+4>>2],oMe(l,B,u,A,d),I=m}function sMe(o){return o=o|0,(n[(vM()|0)+24>>2]|0)+(o*12|0)|0}function oMe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0,_=0;_=I,I=I+16|0,B=_+2|0,k=_+1|0,T=_,m=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(m=n[(n[o>>2]|0)+m>>2]|0),Tf(B,u),u=+Rf(B,u),Tf(k,A),A=+Rf(k,A),np(T,d),T=ip(T,d)|0,C$[m&1](o,u,A,T),I=_}function Tf(o,l){o=o|0,l=+l}function Rf(o,l){return o=o|0,l=+l,+ +lMe(l)}function np(o,l){o=o|0,l=l|0}function ip(o,l){return o=o|0,l=l|0,aMe(l)|0}function aMe(o){return o=o|0,o|0}function lMe(o){return o=+o,+o}function cMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uMe(o,u,d,1),I=A}function uMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=SM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=fMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,AMe(m,A)|0,A),I=d}function SM(){var o=0,l=0;if(s[7648]|0||(lZ(9268),gr(27,9268,U|0)|0,l=7648,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9268)|0)){o=9268,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));lZ(9268)}return 9268}function fMe(o){return o=o|0,0}function AMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=SM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],aZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(pMe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function aZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function pMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=hMe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,gMe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],aZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,dMe(o,k),mMe(k),I=_;return}}function hMe(o){return o=o|0,357913941}function gMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function dMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function mMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function lZ(o){o=o|0,IMe(o)}function yMe(o){o=o|0,EMe(o+24|0)}function EMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function IMe(o){o=o|0;var l=0;l=en()|0,tn(o,2,4,l,CMe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function CMe(){return 1160}function wMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=BMe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=vMe(l,A)|0,I=u,l|0}function BMe(o){return o=o|0,(n[(SM()|0)+24>>2]|0)+(o*12|0)|0}function vMe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),cZ(dd[u&31](o)|0)|0}function cZ(o){return o=o|0,o&1|0}function SMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],DMe(o,u,d,0),I=A}function DMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=DM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=bMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,PMe(m,A)|0,A),I=d}function DM(){var o=0,l=0;if(s[7656]|0||(fZ(9304),gr(28,9304,U|0)|0,l=7656,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9304)|0)){o=9304,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));fZ(9304)}return 9304}function bMe(o){return o=o|0,0}function PMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=DM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],uZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(xMe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function uZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function xMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=kMe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,QMe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],uZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,TMe(o,k),RMe(k),I=_;return}}function kMe(o){return o=o|0,357913941}function QMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function TMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function RMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function fZ(o){o=o|0,OMe(o)}function FMe(o){o=o|0,NMe(o+24|0)}function NMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function OMe(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,LMe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function LMe(){return 1164}function MMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=_Me(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],UMe(l,d,u),I=A}function _Me(o){return o=o|0,(n[(DM()|0)+24>>2]|0)+(o*12|0)|0}function UMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Hh(d,u),u=jh(d,u)|0,ap[A&31](o,u),qh(d),I=m}function Hh(o,l){o=o|0,l=l|0,HMe(o,l)}function jh(o,l){return o=o|0,l=l|0,o|0}function qh(o){o=o|0,Df(o)}function HMe(o,l){o=o|0,l=l|0,bM(o,l)}function bM(o,l){o=o|0,l=l|0,n[o>>2]=l}function jMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],qMe(o,u,d,0),I=A}function qMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=PM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=GMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,WMe(m,A)|0,A),I=d}function PM(){var o=0,l=0;if(s[7664]|0||(pZ(9340),gr(29,9340,U|0)|0,l=7664,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9340)|0)){o=9340,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));pZ(9340)}return 9340}function GMe(o){return o=o|0,0}function WMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=PM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],AZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(YMe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function AZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function YMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=VMe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,KMe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],AZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,JMe(o,k),zMe(k),I=_;return}}function VMe(o){return o=o|0,357913941}function KMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function JMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function zMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function pZ(o){o=o|0,$Me(o)}function ZMe(o){o=o|0,XMe(o+24|0)}function XMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function $Me(o){o=o|0;var l=0;l=en()|0,tn(o,2,4,l,e_e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function e_e(){return 1180}function t_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=r_e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=n_e(l,d,u)|0,I=A,u|0}function r_e(o){return o=o|0,(n[(PM()|0)+24>>2]|0)+(o*12|0)|0}function n_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),ld(d,u),d=cd(d,u)|0,d=YP(v_[A&15](o,d)|0)|0,I=m,d|0}function ld(o,l){o=o|0,l=l|0}function cd(o,l){return o=o|0,l=l|0,i_e(l)|0}function YP(o){return o=o|0,o|0}function i_e(o){return o=o|0,o|0}function s_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],o_e(o,u,d,0),I=A}function o_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=xM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=a_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,l_e(m,A)|0,A),I=d}function xM(){var o=0,l=0;if(s[7672]|0||(gZ(9376),gr(30,9376,U|0)|0,l=7672,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9376)|0)){o=9376,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));gZ(9376)}return 9376}function a_e(o){return o=o|0,0}function l_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=xM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],hZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(c_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function hZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function c_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=u_e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,f_e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],hZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,A_e(o,k),p_e(k),I=_;return}}function u_e(o){return o=o|0,357913941}function f_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function A_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function p_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function gZ(o){o=o|0,d_e(o)}function h_e(o){o=o|0,g_e(o+24|0)}function g_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function d_e(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,dZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function dZ(){return 1196}function m_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=y_e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=E_e(l,A)|0,I=u,l|0}function y_e(o){return o=o|0,(n[(xM()|0)+24>>2]|0)+(o*12|0)|0}function E_e(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),YP(dd[u&31](o)|0)|0}function I_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],C_e(o,u,d,1),I=A}function C_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=kM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=w_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,B_e(m,A)|0,A),I=d}function kM(){var o=0,l=0;if(s[7680]|0||(yZ(9412),gr(31,9412,U|0)|0,l=7680,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9412)|0)){o=9412,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));yZ(9412)}return 9412}function w_e(o){return o=o|0,0}function B_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=kM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],mZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(v_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function mZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function v_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=S_e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,D_e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],mZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,b_e(o,k),P_e(k),I=_;return}}function S_e(o){return o=o|0,357913941}function D_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function b_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function P_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function yZ(o){o=o|0,Q_e(o)}function x_e(o){o=o|0,k_e(o+24|0)}function k_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function Q_e(o){o=o|0;var l=0;l=en()|0,tn(o,2,6,l,EZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function EZ(){return 1200}function T_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=R_e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=F_e(l,A)|0,I=u,l|0}function R_e(o){return o=o|0,(n[(kM()|0)+24>>2]|0)+(o*12|0)|0}function F_e(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),VP(dd[u&31](o)|0)|0}function VP(o){return o=o|0,o|0}function N_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],O_e(o,u,d,0),I=A}function O_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=QM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=L_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,M_e(m,A)|0,A),I=d}function QM(){var o=0,l=0;if(s[7688]|0||(CZ(9448),gr(32,9448,U|0)|0,l=7688,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9448)|0)){o=9448,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));CZ(9448)}return 9448}function L_e(o){return o=o|0,0}function M_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=QM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],IZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(__e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function IZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function __e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=U_e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,H_e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],IZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,j_e(o,k),q_e(k),I=_;return}}function U_e(o){return o=o|0,357913941}function H_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function j_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function q_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function CZ(o){o=o|0,Y_e(o)}function G_e(o){o=o|0,W_e(o+24|0)}function W_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function Y_e(o){o=o|0;var l=0;l=en()|0,tn(o,2,6,l,wZ()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function wZ(){return 1204}function V_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=K_e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],J_e(l,d,u),I=A}function K_e(o){return o=o|0,(n[(QM()|0)+24>>2]|0)+(o*12|0)|0}function J_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),TM(d,u),d=RM(d,u)|0,ap[A&31](o,d),I=m}function TM(o,l){o=o|0,l=l|0}function RM(o,l){return o=o|0,l=l|0,z_e(l)|0}function z_e(o){return o=o|0,o|0}function Z_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],X_e(o,u,d,0),I=A}function X_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=FM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=$_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,eUe(m,A)|0,A),I=d}function FM(){var o=0,l=0;if(s[7696]|0||(vZ(9484),gr(33,9484,U|0)|0,l=7696,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9484)|0)){o=9484,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));vZ(9484)}return 9484}function $_e(o){return o=o|0,0}function eUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=FM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],BZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(tUe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function BZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function tUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=rUe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,nUe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],BZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,iUe(o,k),sUe(k),I=_;return}}function rUe(o){return o=o|0,357913941}function nUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function iUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function sUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function vZ(o){o=o|0,lUe(o)}function oUe(o){o=o|0,aUe(o+24|0)}function aUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function lUe(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,cUe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function cUe(){return 1212}function uUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=fUe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],AUe(l,m,u,A),I=d}function fUe(o){return o=o|0,(n[(FM()|0)+24>>2]|0)+(o*12|0)|0}function AUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),TM(m,u),m=RM(m,u)|0,ld(B,A),B=cd(B,A)|0,L2[d&15](o,m,B),I=k}function pUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],hUe(o,u,d,1),I=A}function hUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=NM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=gUe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,dUe(m,A)|0,A),I=d}function NM(){var o=0,l=0;if(s[7704]|0||(DZ(9520),gr(34,9520,U|0)|0,l=7704,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9520)|0)){o=9520,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));DZ(9520)}return 9520}function gUe(o){return o=o|0,0}function dUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=NM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],SZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(mUe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function SZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function mUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=yUe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,EUe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],SZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,IUe(o,k),CUe(k),I=_;return}}function yUe(o){return o=o|0,357913941}function EUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function IUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function CUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function DZ(o){o=o|0,vUe(o)}function wUe(o){o=o|0,BUe(o+24|0)}function BUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function vUe(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,SUe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function SUe(){return 1224}function DUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;return d=I,I=I+16|0,m=d+8|0,B=d,k=bUe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],A=+PUe(l,m,u),I=d,+A}function bUe(o){return o=o|0,(n[(NM()|0)+24>>2]|0)+(o*12|0)|0}function PUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(d,u),d=ip(d,u)|0,B=+Qf(+B$[A&7](o,d)),I=m,+B}function xUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],kUe(o,u,d,1),I=A}function kUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=OM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=QUe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,TUe(m,A)|0,A),I=d}function OM(){var o=0,l=0;if(s[7712]|0||(PZ(9556),gr(35,9556,U|0)|0,l=7712,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9556)|0)){o=9556,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));PZ(9556)}return 9556}function QUe(o){return o=o|0,0}function TUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=OM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],bZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(RUe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function bZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function RUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=FUe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,NUe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],bZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,OUe(o,k),LUe(k),I=_;return}}function FUe(o){return o=o|0,357913941}function NUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function OUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function LUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function PZ(o){o=o|0,UUe(o)}function MUe(o){o=o|0,_Ue(o+24|0)}function _Ue(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function UUe(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,HUe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function HUe(){return 1232}function jUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=qUe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=+GUe(l,d),I=A,+u}function qUe(o){return o=o|0,(n[(OM()|0)+24>>2]|0)+(o*12|0)|0}function GUe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),+ +Qf(+w$[u&15](o))}function WUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],YUe(o,u,d,1),I=A}function YUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=LM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=VUe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,KUe(m,A)|0,A),I=d}function LM(){var o=0,l=0;if(s[7720]|0||(kZ(9592),gr(36,9592,U|0)|0,l=7720,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9592)|0)){o=9592,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));kZ(9592)}return 9592}function VUe(o){return o=o|0,0}function KUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=LM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],xZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(JUe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function xZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function JUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=zUe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,ZUe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],xZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,XUe(o,k),$Ue(k),I=_;return}}function zUe(o){return o=o|0,357913941}function ZUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function XUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function $Ue(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function kZ(o){o=o|0,r4e(o)}function e4e(o){o=o|0,t4e(o+24|0)}function t4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function r4e(o){o=o|0;var l=0;l=en()|0,tn(o,2,7,l,n4e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function n4e(){return 1276}function i4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=s4e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=o4e(l,A)|0,I=u,l|0}function s4e(o){return o=o|0,(n[(LM()|0)+24>>2]|0)+(o*12|0)|0}function o4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+16|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),ap[u&31](A,o),A=QZ(A)|0,I=d,A|0}function QZ(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=IM(TZ()|0)|0,A?(CM(l,A),wM(u,l),a4e(o,u),o=BM(l)|0):o=l4e(o)|0,I=d,o|0}function TZ(){var o=0;return s[7736]|0||(y4e(9640),gr(25,9640,U|0)|0,o=7736,n[o>>2]=1,n[o+4>>2]=0),9640}function a4e(o,l){o=o|0,l=l|0,A4e(l,o,o+8|0)|0}function l4e(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Fl(8)|0,l=A,k=Jt(16)|0,n[k>>2]=n[o>>2],n[k+4>>2]=n[o+4>>2],n[k+8>>2]=n[o+8>>2],n[k+12>>2]=n[o+12>>2],m=l+4|0,n[m>>2]=k,o=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],MM(o,m,d),n[A>>2]=o,I=u,l|0}function MM(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1244,n[u+12>>2]=l,n[o+4>>2]=u}function c4e(o){o=o|0,$y(o),yt(o)}function u4e(o){o=o|0,o=n[o+12>>2]|0,o|0&&yt(o)}function f4e(o){o=o|0,yt(o)}function A4e(o,l,u){return o=o|0,l=l|0,u=u|0,l=p4e(n[o>>2]|0,l,u)|0,u=o+4|0,n[(n[u>>2]|0)+8>>2]=l,n[(n[u>>2]|0)+8>>2]|0}function p4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return A=I,I=I+16|0,d=A,Nl(d),o=Ls(o)|0,u=h4e(o,n[l>>2]|0,+E[u>>3])|0,Ol(d),I=A,u|0}function h4e(o,l,u){o=o|0,l=l|0,u=+u;var A=0;return A=ma(g4e()|0)|0,l=Yy(l)|0,lu(0,A|0,o|0,l|0,+ +Ja(u))|0}function g4e(){var o=0;return s[7728]|0||(d4e(9628),o=7728,n[o>>2]=1,n[o+4>>2]=0),9628}function d4e(o){o=o|0,Ro(o,m4e()|0,2)}function m4e(){return 1264}function y4e(o){o=o|0,Uh(o)}function E4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],I4e(o,u,d,1),I=A}function I4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=_M()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=C4e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,w4e(m,A)|0,A),I=d}function _M(){var o=0,l=0;if(s[7744]|0||(FZ(9684),gr(37,9684,U|0)|0,l=7744,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9684)|0)){o=9684,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));FZ(9684)}return 9684}function C4e(o){return o=o|0,0}function w4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=_M()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],RZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(B4e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function RZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function B4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=v4e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,S4e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],RZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,D4e(o,k),b4e(k),I=_;return}}function v4e(o){return o=o|0,357913941}function S4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function D4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function b4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function FZ(o){o=o|0,k4e(o)}function P4e(o){o=o|0,x4e(o+24|0)}function x4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function k4e(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,Q4e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Q4e(){return 1280}function T4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=R4e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=F4e(l,d,u)|0,I=A,u|0}function R4e(o){return o=o|0,(n[(_M()|0)+24>>2]|0)+(o*12|0)|0}function F4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return B=I,I=I+32|0,d=B,m=B+16|0,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(m,u),m=ip(m,u)|0,L2[A&15](d,o,m),m=QZ(d)|0,I=B,m|0}function N4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],O4e(o,u,d,1),I=A}function O4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=UM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=L4e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,M4e(m,A)|0,A),I=d}function UM(){var o=0,l=0;if(s[7752]|0||(OZ(9720),gr(38,9720,U|0)|0,l=7752,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9720)|0)){o=9720,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));OZ(9720)}return 9720}function L4e(o){return o=o|0,0}function M4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=UM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],NZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(_4e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function NZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function _4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=U4e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,H4e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],NZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,j4e(o,k),q4e(k),I=_;return}}function U4e(o){return o=o|0,357913941}function H4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function j4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function q4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function OZ(o){o=o|0,Y4e(o)}function G4e(o){o=o|0,W4e(o+24|0)}function W4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function Y4e(o){o=o|0;var l=0;l=en()|0,tn(o,2,8,l,V4e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function V4e(){return 1288}function K4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=J4e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=z4e(l,A)|0,I=u,l|0}function J4e(o){return o=o|0,(n[(UM()|0)+24>>2]|0)+(o*12|0)|0}function z4e(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),od(dd[u&31](o)|0)|0}function Z4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],X4e(o,u,d,0),I=A}function X4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=HM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=$4e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,e3e(m,A)|0,A),I=d}function HM(){var o=0,l=0;if(s[7760]|0||(MZ(9756),gr(39,9756,U|0)|0,l=7760,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9756)|0)){o=9756,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));MZ(9756)}return 9756}function $4e(o){return o=o|0,0}function e3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=HM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],LZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(t3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function LZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function t3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=r3e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,n3e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],LZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,i3e(o,k),s3e(k),I=_;return}}function r3e(o){return o=o|0,357913941}function n3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function i3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function s3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function MZ(o){o=o|0,l3e(o)}function o3e(o){o=o|0,a3e(o+24|0)}function a3e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function l3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,8,l,c3e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function c3e(){return 1292}function u3e(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=f3e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],A3e(l,d,u),I=A}function f3e(o){return o=o|0,(n[(HM()|0)+24>>2]|0)+(o*12|0)|0}function A3e(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Tf(d,u),u=+Rf(d,u),E$[A&31](o,u),I=m}function p3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],h3e(o,u,d,0),I=A}function h3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=jM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=g3e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,d3e(m,A)|0,A),I=d}function jM(){var o=0,l=0;if(s[7768]|0||(UZ(9792),gr(40,9792,U|0)|0,l=7768,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9792)|0)){o=9792,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));UZ(9792)}return 9792}function g3e(o){return o=o|0,0}function d3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=jM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],_Z(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(m3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function _Z(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function m3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=y3e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,E3e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],_Z(m,A,u),n[T>>2]=(n[T>>2]|0)+12,I3e(o,k),C3e(k),I=_;return}}function y3e(o){return o=o|0,357913941}function E3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function I3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function C3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function UZ(o){o=o|0,v3e(o)}function w3e(o){o=o|0,B3e(o+24|0)}function B3e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function v3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,S3e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function S3e(){return 1300}function D3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=b3e(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],P3e(l,m,u,A),I=d}function b3e(o){return o=o|0,(n[(jM()|0)+24>>2]|0)+(o*12|0)|0}function P3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),np(m,u),m=ip(m,u)|0,Tf(B,A),A=+Rf(B,A),b$[d&15](o,m,A),I=k}function x3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],k3e(o,u,d,0),I=A}function k3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=qM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=Q3e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,T3e(m,A)|0,A),I=d}function qM(){var o=0,l=0;if(s[7776]|0||(jZ(9828),gr(41,9828,U|0)|0,l=7776,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9828)|0)){o=9828,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));jZ(9828)}return 9828}function Q3e(o){return o=o|0,0}function T3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=qM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],HZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(R3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function HZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function R3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=F3e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,N3e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],HZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,O3e(o,k),L3e(k),I=_;return}}function F3e(o){return o=o|0,357913941}function N3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function O3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function L3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function jZ(o){o=o|0,U3e(o)}function M3e(o){o=o|0,_3e(o+24|0)}function _3e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function U3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,7,l,H3e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function H3e(){return 1312}function j3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=q3e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],G3e(l,d,u),I=A}function q3e(o){return o=o|0,(n[(qM()|0)+24>>2]|0)+(o*12|0)|0}function G3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(d,u),d=ip(d,u)|0,ap[A&31](o,d),I=m}function W3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Y3e(o,u,d,0),I=A}function Y3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=GM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=V3e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,K3e(m,A)|0,A),I=d}function GM(){var o=0,l=0;if(s[7784]|0||(GZ(9864),gr(42,9864,U|0)|0,l=7784,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9864)|0)){o=9864,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));GZ(9864)}return 9864}function V3e(o){return o=o|0,0}function K3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=GM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],qZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(J3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function qZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function J3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=z3e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,Z3e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],qZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,X3e(o,k),$3e(k),I=_;return}}function z3e(o){return o=o|0,357913941}function Z3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function X3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function $3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function GZ(o){o=o|0,r8e(o)}function e8e(o){o=o|0,t8e(o+24|0)}function t8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function r8e(o){o=o|0;var l=0;l=en()|0,tn(o,2,8,l,n8e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function n8e(){return 1320}function i8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=s8e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],o8e(l,d,u),I=A}function s8e(o){return o=o|0,(n[(GM()|0)+24>>2]|0)+(o*12|0)|0}function o8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),a8e(d,u),d=l8e(d,u)|0,ap[A&31](o,d),I=m}function a8e(o,l){o=o|0,l=l|0}function l8e(o,l){return o=o|0,l=l|0,c8e(l)|0}function c8e(o){return o=o|0,o|0}function u8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],f8e(o,u,d,0),I=A}function f8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=WM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=A8e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,p8e(m,A)|0,A),I=d}function WM(){var o=0,l=0;if(s[7792]|0||(YZ(9900),gr(43,9900,U|0)|0,l=7792,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9900)|0)){o=9900,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));YZ(9900)}return 9900}function A8e(o){return o=o|0,0}function p8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=WM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],WZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(h8e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function WZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function h8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=g8e(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,d8e(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],WZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,m8e(o,k),y8e(k),I=_;return}}function g8e(o){return o=o|0,357913941}function d8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function m8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function y8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function YZ(o){o=o|0,C8e(o)}function E8e(o){o=o|0,I8e(o+24|0)}function I8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function C8e(o){o=o|0;var l=0;l=en()|0,tn(o,2,22,l,w8e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function w8e(){return 1344}function B8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;u=I,I=I+16|0,A=u+8|0,d=u,m=v8e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],S8e(l,A),I=u}function v8e(o){return o=o|0,(n[(WM()|0)+24>>2]|0)+(o*12|0)|0}function S8e(o,l){o=o|0,l=l|0;var u=0;u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),op[u&127](o)}function D8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=YM()|0,o=b8e(u)|0,vn(m,l,d,o,P8e(u,A)|0,A)}function YM(){var o=0,l=0;if(s[7800]|0||(KZ(9936),gr(44,9936,U|0)|0,l=7800,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9936)|0)){o=9936,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));KZ(9936)}return 9936}function b8e(o){return o=o|0,o|0}function P8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=YM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(VZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(x8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function VZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function x8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=k8e(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,Q8e(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,VZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,T8e(o,d),R8e(d),I=k;return}}function k8e(o){return o=o|0,536870911}function Q8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function T8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function R8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function KZ(o){o=o|0,O8e(o)}function F8e(o){o=o|0,N8e(o+24|0)}function N8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function O8e(o){o=o|0;var l=0;l=en()|0,tn(o,1,23,l,wZ()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function L8e(o,l){o=o|0,l=l|0,_8e(n[(M8e(o)|0)>>2]|0,l)}function M8e(o){return o=o|0,(n[(YM()|0)+24>>2]|0)+(o<<3)|0}function _8e(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,TM(A,l),l=RM(A,l)|0,op[o&127](l),I=u}function U8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=VM()|0,o=H8e(u)|0,vn(m,l,d,o,j8e(u,A)|0,A)}function VM(){var o=0,l=0;if(s[7808]|0||(zZ(9972),gr(45,9972,U|0)|0,l=7808,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9972)|0)){o=9972,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));zZ(9972)}return 9972}function H8e(o){return o=o|0,o|0}function j8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=VM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(JZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(q8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function JZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function q8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=G8e(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,W8e(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,JZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Y8e(o,d),V8e(d),I=k;return}}function G8e(o){return o=o|0,536870911}function W8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function Y8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function V8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function zZ(o){o=o|0,z8e(o)}function K8e(o){o=o|0,J8e(o+24|0)}function J8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function z8e(o){o=o|0;var l=0;l=en()|0,tn(o,1,9,l,Z8e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Z8e(){return 1348}function X8e(o,l){return o=o|0,l=l|0,eHe(n[($8e(o)|0)>>2]|0,l)|0}function $8e(o){return o=o|0,(n[(VM()|0)+24>>2]|0)+(o<<3)|0}function eHe(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,ZZ(A,l),l=XZ(A,l)|0,l=YP(dd[o&31](l)|0)|0,I=u,l|0}function ZZ(o,l){o=o|0,l=l|0}function XZ(o,l){return o=o|0,l=l|0,tHe(l)|0}function tHe(o){return o=o|0,o|0}function rHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=KM()|0,o=nHe(u)|0,vn(m,l,d,o,iHe(u,A)|0,A)}function KM(){var o=0,l=0;if(s[7816]|0||(eX(10008),gr(46,10008,U|0)|0,l=7816,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10008)|0)){o=10008,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));eX(10008)}return 10008}function nHe(o){return o=o|0,o|0}function iHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=KM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?($Z(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(sHe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function $Z(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function sHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=oHe(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,aHe(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,$Z(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,lHe(o,d),cHe(d),I=k;return}}function oHe(o){return o=o|0,536870911}function aHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function lHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function cHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function eX(o){o=o|0,AHe(o)}function uHe(o){o=o|0,fHe(o+24|0)}function fHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function AHe(o){o=o|0;var l=0;l=en()|0,tn(o,1,15,l,dZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function pHe(o){return o=o|0,gHe(n[(hHe(o)|0)>>2]|0)|0}function hHe(o){return o=o|0,(n[(KM()|0)+24>>2]|0)+(o<<3)|0}function gHe(o){return o=o|0,YP(ax[o&7]()|0)|0}function dHe(){var o=0;return s[7832]|0||(vHe(10052),gr(25,10052,U|0)|0,o=7832,n[o>>2]=1,n[o+4>>2]=0),10052}function mHe(o,l){o=o|0,l=l|0,n[o>>2]=yHe()|0,n[o+4>>2]=EHe()|0,n[o+12>>2]=l,n[o+8>>2]=IHe()|0,n[o+32>>2]=2}function yHe(){return 11709}function EHe(){return 1188}function IHe(){return KP()|0}function CHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Gh(A,896)|0)==512?u|0&&(wHe(u),yt(u)):l|0&&(Oy(l),yt(l))}function Gh(o,l){return o=o|0,l=l|0,l&o|0}function wHe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Yh(o)}function KP(){var o=0;return s[7824]|0||(n[2511]=BHe()|0,n[2512]=0,o=7824,n[o>>2]=1,n[o+4>>2]=0),10044}function BHe(){return 0}function vHe(o){o=o|0,Uh(o)}function SHe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0;l=I,I=I+32|0,u=l+24|0,m=l+16|0,d=l+8|0,A=l,DHe(o,4827),bHe(o,4834,3)|0,PHe(o,3682,47)|0,n[m>>2]=9,n[m+4>>2]=0,n[u>>2]=n[m>>2],n[u+4>>2]=n[m+4>>2],xHe(o,4841,u)|0,n[d>>2]=1,n[d+4>>2]=0,n[u>>2]=n[d>>2],n[u+4>>2]=n[d+4>>2],kHe(o,4871,u)|0,n[A>>2]=10,n[A+4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],QHe(o,4891,u)|0,I=l}function DHe(o,l){o=o|0,l=l|0;var u=0;u=c6e()|0,n[o>>2]=u,u6e(u,l),Wh(n[o>>2]|0)}function bHe(o,l,u){return o=o|0,l=l|0,u=u|0,Vje(o,Bn(l)|0,u,0),o|0}function PHe(o,l,u){return o=o|0,l=l|0,u=u|0,Tje(o,Bn(l)|0,u,0),o|0}function xHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],pje(o,l,d),I=A,o|0}function kHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],KHe(o,l,d),I=A,o|0}function QHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],THe(o,l,d),I=A,o|0}function THe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RHe(o,u,d,1),I=A}function RHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=JM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=FHe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,NHe(m,A)|0,A),I=d}function JM(){var o=0,l=0;if(s[7840]|0||(rX(10100),gr(48,10100,U|0)|0,l=7840,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10100)|0)){o=10100,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));rX(10100)}return 10100}function FHe(o){return o=o|0,0}function NHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=JM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],tX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(OHe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function tX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function OHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=LHe(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,MHe(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],tX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,_He(o,k),UHe(k),I=_;return}}function LHe(o){return o=o|0,357913941}function MHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function _He(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function UHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function rX(o){o=o|0,qHe(o)}function HHe(o){o=o|0,jHe(o+24|0)}function jHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function qHe(o){o=o|0;var l=0;l=en()|0,tn(o,2,6,l,GHe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function GHe(){return 1364}function WHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=YHe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=VHe(l,d,u)|0,I=A,u|0}function YHe(o){return o=o|0,(n[(JM()|0)+24>>2]|0)+(o*12|0)|0}function VHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(d,u),d=ip(d,u)|0,d=cZ(v_[A&15](o,d)|0)|0,I=m,d|0}function KHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],JHe(o,u,d,0),I=A}function JHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=zM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=zHe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,ZHe(m,A)|0,A),I=d}function zM(){var o=0,l=0;if(s[7848]|0||(iX(10136),gr(49,10136,U|0)|0,l=7848,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10136)|0)){o=10136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));iX(10136)}return 10136}function zHe(o){return o=o|0,0}function ZHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=zM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],nX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(XHe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function nX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function XHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=$He(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,eje(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],nX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,tje(o,k),rje(k),I=_;return}}function $He(o){return o=o|0,357913941}function eje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function tje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function rje(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function iX(o){o=o|0,sje(o)}function nje(o){o=o|0,ije(o+24|0)}function ije(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function sje(o){o=o|0;var l=0;l=en()|0,tn(o,2,9,l,oje()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function oje(){return 1372}function aje(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=lje(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],cje(l,d,u),I=A}function lje(o){return o=o|0,(n[(zM()|0)+24>>2]|0)+(o*12|0)|0}function cje(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=Xe;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),uje(d,u),B=y(fje(d,u)),y$[A&1](o,B),I=m}function uje(o,l){o=o|0,l=+l}function fje(o,l){return o=o|0,l=+l,y(Aje(l))}function Aje(o){return o=+o,y(o)}function pje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],hje(o,u,d,0),I=A}function hje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=ZM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=gje(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,dje(m,A)|0,A),I=d}function ZM(){var o=0,l=0;if(s[7856]|0||(oX(10172),gr(50,10172,U|0)|0,l=7856,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10172)|0)){o=10172,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));oX(10172)}return 10172}function gje(o){return o=o|0,0}function dje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=ZM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],sX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(mje(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function sX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function mje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=yje(o)|0,m>>>0<d>>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,Eje(k,ae>>>0<m>>>1>>>0?G>>>0<d>>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],sX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,Ije(o,k),Cje(k),I=_;return}}function yje(o){return o=o|0,357913941}function Eje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function Ije(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function Cje(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&yt(o)}function oX(o){o=o|0,vje(o)}function wje(o){o=o|0,Bje(o+24|0)}function Bje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),yt(u))}function vje(o){o=o|0;var l=0;l=en()|0,tn(o,2,3,l,Sje()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Sje(){return 1380}function Dje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=bje(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],Pje(l,m,u,A),I=d}function bje(o){return o=o|0,(n[(ZM()|0)+24>>2]|0)+(o*12|0)|0}function Pje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),np(m,u),m=ip(m,u)|0,xje(B,A),B=kje(B,A)|0,L2[d&15](o,m,B),I=k}function xje(o,l){o=o|0,l=l|0}function kje(o,l){return o=o|0,l=l|0,Qje(l)|0}function Qje(o){return o=o|0,(o|0)!=0|0}function Tje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=XM()|0,o=Rje(u)|0,vn(m,l,d,o,Fje(u,A)|0,A)}function XM(){var o=0,l=0;if(s[7864]|0||(lX(10208),gr(51,10208,U|0)|0,l=7864,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10208)|0)){o=10208,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));lX(10208)}return 10208}function Rje(o){return o=o|0,o|0}function Fje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=XM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(aX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(Nje(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function aX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function Nje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=Oje(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,Lje(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,aX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Mje(o,d),_je(d),I=k;return}}function Oje(o){return o=o|0,536870911}function Lje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function Mje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _je(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function lX(o){o=o|0,jje(o)}function Uje(o){o=o|0,Hje(o+24|0)}function Hje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function jje(o){o=o|0;var l=0;l=en()|0,tn(o,1,24,l,qje()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qje(){return 1392}function Gje(o,l){o=o|0,l=l|0,Yje(n[(Wje(o)|0)>>2]|0,l)}function Wje(o){return o=o|0,(n[(XM()|0)+24>>2]|0)+(o<<3)|0}function Yje(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,ZZ(A,l),l=XZ(A,l)|0,op[o&127](l),I=u}function Vje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=$M()|0,o=Kje(u)|0,vn(m,l,d,o,Jje(u,A)|0,A)}function $M(){var o=0,l=0;if(s[7872]|0||(uX(10244),gr(52,10244,U|0)|0,l=7872,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10244)|0)){o=10244,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));uX(10244)}return 10244}function Kje(o){return o=o|0,o|0}function Jje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=$M()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(cX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(zje(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function cX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function zje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=Zje(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,Xje(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,cX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,$je(o,d),e6e(d),I=k;return}}function Zje(o){return o=o|0,536870911}function Xje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function $je(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function e6e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function uX(o){o=o|0,n6e(o)}function t6e(o){o=o|0,r6e(o+24|0)}function r6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function n6e(o){o=o|0;var l=0;l=en()|0,tn(o,1,16,l,i6e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function i6e(){return 1400}function s6e(o){return o=o|0,a6e(n[(o6e(o)|0)>>2]|0)|0}function o6e(o){return o=o|0,(n[($M()|0)+24>>2]|0)+(o<<3)|0}function a6e(o){return o=o|0,l6e(ax[o&7]()|0)|0}function l6e(o){return o=o|0,o|0}function c6e(){var o=0;return s[7880]|0||(d6e(10280),gr(25,10280,U|0)|0,o=7880,n[o>>2]=1,n[o+4>>2]=0),10280}function u6e(o,l){o=o|0,l=l|0,n[o>>2]=f6e()|0,n[o+4>>2]=A6e()|0,n[o+12>>2]=l,n[o+8>>2]=p6e()|0,n[o+32>>2]=4}function f6e(){return 11711}function A6e(){return 1356}function p6e(){return KP()|0}function h6e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Gh(A,896)|0)==512?u|0&&(g6e(u),yt(u)):l|0&&(zg(l),yt(l))}function g6e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Yh(o)}function d6e(o){o=o|0,Uh(o)}function m6e(o){o=o|0,y6e(o,4920),E6e(o)|0,I6e(o)|0}function y6e(o,l){o=o|0,l=l|0;var u=0;u=TZ()|0,n[o>>2]=u,H6e(u,l),Wh(n[o>>2]|0)}function E6e(o){o=o|0;var l=0;return l=n[o>>2]|0,ud(l,Q6e()|0),o|0}function I6e(o){o=o|0;var l=0;return l=n[o>>2]|0,ud(l,C6e()|0),o|0}function C6e(){var o=0;return s[7888]|0||(fX(10328),gr(53,10328,U|0)|0,o=7888,n[o>>2]=1,n[o+4>>2]=0),Ur(10328)|0||fX(10328),10328}function ud(o,l){o=o|0,l=l|0,vn(o,0,l,0,0,0)}function fX(o){o=o|0,v6e(o),fd(o,10)}function w6e(o){o=o|0,B6e(o+24|0)}function B6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function v6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,1,l,P6e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function S6e(o,l,u){o=o|0,l=l|0,u=+u,D6e(o,l,u)}function fd(o,l){o=o|0,l=l|0,n[o+20>>2]=l}function D6e(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,m=A+8|0,k=A+13|0,d=A,B=A+12|0,np(k,l),n[m>>2]=ip(k,l)|0,Tf(B,u),E[d>>3]=+Rf(B,u),b6e(o,m,d),I=A}function b6e(o,l,u){o=o|0,l=l|0,u=u|0,Rl(o+8|0,n[l>>2]|0,+E[u>>3]),s[o+24>>0]=1}function P6e(){return 1404}function x6e(o,l){return o=o|0,l=+l,k6e(o,l)|0}function k6e(o,l){o=o|0,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,m=A+4|0,B=A+8|0,k=A,d=Fl(8)|0,u=d,T=Jt(16)|0,np(m,o),o=ip(m,o)|0,Tf(B,l),Rl(T,o,+Rf(B,l)),B=u+4|0,n[B>>2]=T,o=Jt(8)|0,B=n[B>>2]|0,n[k>>2]=0,n[m>>2]=n[k>>2],MM(o,B,m),n[d>>2]=o,I=A,u|0}function Q6e(){var o=0;return s[7896]|0||(AX(10364),gr(54,10364,U|0)|0,o=7896,n[o>>2]=1,n[o+4>>2]=0),Ur(10364)|0||AX(10364),10364}function AX(o){o=o|0,F6e(o),fd(o,55)}function T6e(o){o=o|0,R6e(o+24|0)}function R6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function F6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,4,l,M6e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function N6e(o){o=o|0,O6e(o)}function O6e(o){o=o|0,L6e(o)}function L6e(o){o=o|0,pX(o+8|0),s[o+24>>0]=1}function pX(o){o=o|0,n[o>>2]=0,E[o+8>>3]=0}function M6e(){return 1424}function _6e(){return U6e()|0}function U6e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Fl(8)|0,o=u,A=Jt(16)|0,pX(A),m=o+4|0,n[m>>2]=A,A=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],MM(A,m,d),n[u>>2]=A,I=l,o|0}function H6e(o,l){o=o|0,l=l|0,n[o>>2]=j6e()|0,n[o+4>>2]=q6e()|0,n[o+12>>2]=l,n[o+8>>2]=G6e()|0,n[o+32>>2]=5}function j6e(){return 11710}function q6e(){return 1416}function G6e(){return JP()|0}function W6e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Gh(A,896)|0)==512?u|0&&(Y6e(u),yt(u)):l|0&&yt(l)}function Y6e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Yh(o)}function JP(){var o=0;return s[7904]|0||(n[2600]=V6e()|0,n[2601]=0,o=7904,n[o>>2]=1,n[o+4>>2]=0),10400}function V6e(){return n[357]|0}function K6e(o){o=o|0,J6e(o,4926),z6e(o)|0}function J6e(o,l){o=o|0,l=l|0;var u=0;u=tZ()|0,n[o>>2]=u,aqe(u,l),Wh(n[o>>2]|0)}function z6e(o){o=o|0;var l=0;return l=n[o>>2]|0,ud(l,Z6e()|0),o|0}function Z6e(){var o=0;return s[7912]|0||(hX(10412),gr(56,10412,U|0)|0,o=7912,n[o>>2]=1,n[o+4>>2]=0),Ur(10412)|0||hX(10412),10412}function hX(o){o=o|0,eqe(o),fd(o,57)}function X6e(o){o=o|0,$6e(o+24|0)}function $6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function eqe(o){o=o|0;var l=0;l=en()|0,tn(o,5,5,l,iqe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function tqe(o){o=o|0,rqe(o)}function rqe(o){o=o|0,nqe(o)}function nqe(o){o=o|0;var l=0,u=0;l=o+8|0,u=l+48|0;do n[l>>2]=0,l=l+4|0;while((l|0)<(u|0));s[o+56>>0]=1}function iqe(){return 1432}function sqe(){return oqe()|0}function oqe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0;B=I,I=I+16|0,o=B+4|0,l=B,u=Fl(8)|0,A=u,d=Jt(48)|0,m=d,k=m+48|0;do n[m>>2]=0,m=m+4|0;while((m|0)<(k|0));return m=A+4|0,n[m>>2]=d,k=Jt(8)|0,m=n[m>>2]|0,n[l>>2]=0,n[o>>2]=n[l>>2],rZ(k,m,o),n[u>>2]=k,I=B,A|0}function aqe(o,l){o=o|0,l=l|0,n[o>>2]=lqe()|0,n[o+4>>2]=cqe()|0,n[o+12>>2]=l,n[o+8>>2]=uqe()|0,n[o+32>>2]=6}function lqe(){return 11704}function cqe(){return 1436}function uqe(){return JP()|0}function fqe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Gh(A,896)|0)==512?u|0&&(Aqe(u),yt(u)):l|0&&yt(l)}function Aqe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Yh(o)}function pqe(o){o=o|0,hqe(o,4933),gqe(o)|0,dqe(o)|0}function hqe(o,l){o=o|0,l=l|0;var u=0;u=Uqe()|0,n[o>>2]=u,Hqe(u,l),Wh(n[o>>2]|0)}function gqe(o){o=o|0;var l=0;return l=n[o>>2]|0,ud(l,kqe()|0),o|0}function dqe(o){o=o|0;var l=0;return l=n[o>>2]|0,ud(l,mqe()|0),o|0}function mqe(){var o=0;return s[7920]|0||(gX(10452),gr(58,10452,U|0)|0,o=7920,n[o>>2]=1,n[o+4>>2]=0),Ur(10452)|0||gX(10452),10452}function gX(o){o=o|0,Iqe(o),fd(o,1)}function yqe(o){o=o|0,Eqe(o+24|0)}function Eqe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function Iqe(o){o=o|0;var l=0;l=en()|0,tn(o,5,1,l,vqe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Cqe(o,l,u){o=o|0,l=+l,u=+u,wqe(o,l,u)}function wqe(o,l,u){o=o|0,l=+l,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,m=A+8|0,k=A+17|0,d=A,B=A+16|0,Tf(k,l),E[m>>3]=+Rf(k,l),Tf(B,u),E[d>>3]=+Rf(B,u),Bqe(o,m,d),I=A}function Bqe(o,l,u){o=o|0,l=l|0,u=u|0,dX(o+8|0,+E[l>>3],+E[u>>3]),s[o+24>>0]=1}function dX(o,l,u){o=o|0,l=+l,u=+u,E[o>>3]=l,E[o+8>>3]=u}function vqe(){return 1472}function Sqe(o,l){return o=+o,l=+l,Dqe(o,l)|0}function Dqe(o,l){o=+o,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,B=A+4|0,k=A+8|0,T=A,d=Fl(8)|0,u=d,m=Jt(16)|0,Tf(B,o),o=+Rf(B,o),Tf(k,l),dX(m,o,+Rf(k,l)),k=u+4|0,n[k>>2]=m,m=Jt(8)|0,k=n[k>>2]|0,n[T>>2]=0,n[B>>2]=n[T>>2],mX(m,k,B),n[d>>2]=m,I=A,u|0}function mX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1452,n[u+12>>2]=l,n[o+4>>2]=u}function bqe(o){o=o|0,$y(o),yt(o)}function Pqe(o){o=o|0,o=n[o+12>>2]|0,o|0&&yt(o)}function xqe(o){o=o|0,yt(o)}function kqe(){var o=0;return s[7928]|0||(yX(10488),gr(59,10488,U|0)|0,o=7928,n[o>>2]=1,n[o+4>>2]=0),Ur(10488)|0||yX(10488),10488}function yX(o){o=o|0,Rqe(o),fd(o,60)}function Qqe(o){o=o|0,Tqe(o+24|0)}function Tqe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function Rqe(o){o=o|0;var l=0;l=en()|0,tn(o,5,6,l,Lqe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Fqe(o){o=o|0,Nqe(o)}function Nqe(o){o=o|0,Oqe(o)}function Oqe(o){o=o|0,EX(o+8|0),s[o+24>>0]=1}function EX(o){o=o|0,n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,n[o+12>>2]=0}function Lqe(){return 1492}function Mqe(){return _qe()|0}function _qe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Fl(8)|0,o=u,A=Jt(16)|0,EX(A),m=o+4|0,n[m>>2]=A,A=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],mX(A,m,d),n[u>>2]=A,I=l,o|0}function Uqe(){var o=0;return s[7936]|0||(Vqe(10524),gr(25,10524,U|0)|0,o=7936,n[o>>2]=1,n[o+4>>2]=0),10524}function Hqe(o,l){o=o|0,l=l|0,n[o>>2]=jqe()|0,n[o+4>>2]=qqe()|0,n[o+12>>2]=l,n[o+8>>2]=Gqe()|0,n[o+32>>2]=7}function jqe(){return 11700}function qqe(){return 1484}function Gqe(){return JP()|0}function Wqe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Gh(A,896)|0)==512?u|0&&(Yqe(u),yt(u)):l|0&&yt(l)}function Yqe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Yh(o)}function Vqe(o){o=o|0,Uh(o)}function Kqe(o,l,u){o=o|0,l=l|0,u=u|0,o=Bn(l)|0,l=Jqe(u)|0,u=zqe(u,0)|0,DGe(o,l,u,e_()|0,0)}function Jqe(o){return o=o|0,o|0}function zqe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=e_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(CX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(nGe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function e_(){var o=0,l=0;if(s[7944]|0||(IX(10568),gr(61,10568,U|0)|0,l=7944,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10568)|0)){o=10568,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));IX(10568)}return 10568}function IX(o){o=o|0,$qe(o)}function Zqe(o){o=o|0,Xqe(o+24|0)}function Xqe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function $qe(o){o=o|0;var l=0;l=en()|0,tn(o,1,17,l,EZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function eGe(o){return o=o|0,rGe(n[(tGe(o)|0)>>2]|0)|0}function tGe(o){return o=o|0,(n[(e_()|0)+24>>2]|0)+(o<<3)|0}function rGe(o){return o=o|0,VP(ax[o&7]()|0)|0}function CX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function nGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=iGe(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,sGe(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,CX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,oGe(o,d),aGe(d),I=k;return}}function iGe(o){return o=o|0,536870911}function sGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function oGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function aGe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function lGe(){cGe()}function cGe(){uGe(10604)}function uGe(o){o=o|0,fGe(o,4955)}function fGe(o,l){o=o|0,l=l|0;var u=0;u=AGe()|0,n[o>>2]=u,pGe(u,l),Wh(n[o>>2]|0)}function AGe(){var o=0;return s[7952]|0||(wGe(10612),gr(25,10612,U|0)|0,o=7952,n[o>>2]=1,n[o+4>>2]=0),10612}function pGe(o,l){o=o|0,l=l|0,n[o>>2]=mGe()|0,n[o+4>>2]=yGe()|0,n[o+12>>2]=l,n[o+8>>2]=EGe()|0,n[o+32>>2]=8}function Wh(o){o=o|0;var l=0,u=0;l=I,I=I+16|0,u=l,Ky()|0,n[u>>2]=o,hGe(10608,u),I=l}function Ky(){return s[11714]|0||(n[2652]=0,gr(62,10608,U|0)|0,s[11714]=1),10608}function hGe(o,l){o=o|0,l=l|0;var u=0;u=Jt(8)|0,n[u+4>>2]=n[l>>2],n[u>>2]=n[o>>2],n[o>>2]=u}function gGe(o){o=o|0,dGe(o)}function dGe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,yt(u);while(l|0);n[o>>2]=0}function mGe(){return 11715}function yGe(){return 1496}function EGe(){return KP()|0}function IGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Gh(A,896)|0)==512?u|0&&(CGe(u),yt(u)):l|0&&yt(l)}function CGe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Yh(o)}function wGe(o){o=o|0,Uh(o)}function BGe(o,l){o=o|0,l=l|0;var u=0,A=0;Ky()|0,u=n[2652]|0;e:do if(u|0){for(;A=n[u+4>>2]|0,!(A|0&&!(r$(t_(A)|0,o)|0));)if(u=n[u>>2]|0,!u)break e;vGe(A,l)}while(!1)}function t_(o){return o=o|0,n[o+12>>2]|0}function vGe(o,l){o=o|0,l=l|0;var u=0;o=o+36|0,u=n[o>>2]|0,u|0&&(Df(u),yt(u)),u=Jt(4)|0,UP(u,l),n[o>>2]=u}function r_(){return s[11716]|0||(n[2664]=0,gr(63,10656,U|0)|0,s[11716]=1),10656}function wX(){var o=0;return s[11717]|0?o=n[2665]|0:(SGe(),n[2665]=1504,s[11717]=1,o=1504),o|0}function SGe(){s[11740]|0||(s[11718]=yr(yr(8,0)|0,0)|0,s[11719]=yr(yr(0,0)|0,0)|0,s[11720]=yr(yr(0,16)|0,0)|0,s[11721]=yr(yr(8,0)|0,0)|0,s[11722]=yr(yr(0,0)|0,0)|0,s[11723]=yr(yr(8,0)|0,0)|0,s[11724]=yr(yr(0,0)|0,0)|0,s[11725]=yr(yr(8,0)|0,0)|0,s[11726]=yr(yr(0,0)|0,0)|0,s[11727]=yr(yr(8,0)|0,0)|0,s[11728]=yr(yr(0,0)|0,0)|0,s[11729]=yr(yr(0,0)|0,32)|0,s[11730]=yr(yr(0,0)|0,32)|0,s[11740]=1)}function BX(){return 1572}function DGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0;m=I,I=I+32|0,M=m+16|0,_=m+12|0,T=m+8|0,k=m+4|0,B=m,n[M>>2]=o,n[_>>2]=l,n[T>>2]=u,n[k>>2]=A,n[B>>2]=d,r_()|0,bGe(10656,M,_,T,k,B),I=m}function bGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0;B=Jt(24)|0,Xz(B+4|0,n[l>>2]|0,n[u>>2]|0,n[A>>2]|0,n[d>>2]|0,n[m>>2]|0),n[B>>2]=n[o>>2],n[o>>2]=B}function vX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0;if(ct=I,I=I+32|0,Le=ct+20|0,Qe=ct+8|0,tt=ct+4|0,Ze=ct,l=n[l>>2]|0,l|0){We=Le+4|0,T=Le+8|0,_=Qe+4|0,M=Qe+8|0,G=Qe+8|0,ae=Le+8|0;do{if(B=l+4|0,k=n_(B)|0,k|0){if(d=Q2(k)|0,n[Le>>2]=0,n[We>>2]=0,n[T>>2]=0,A=(T2(k)|0)+1|0,PGe(Le,A),A|0)for(;A=A+-1|0,xu(Qe,n[d>>2]|0),m=n[We>>2]|0,m>>>0<(n[ae>>2]|0)>>>0?(n[m>>2]=n[Qe>>2],n[We>>2]=(n[We>>2]|0)+4):i_(Le,Qe),A;)d=d+4|0;A=R2(k)|0,n[Qe>>2]=0,n[_>>2]=0,n[M>>2]=0;e:do if(n[A>>2]|0)for(d=0,m=0;;){if((d|0)==(m|0)?xGe(Qe,A):(n[d>>2]=n[A>>2],n[_>>2]=(n[_>>2]|0)+4),A=A+4|0,!(n[A>>2]|0))break e;d=n[_>>2]|0,m=n[G>>2]|0}while(!1);n[tt>>2]=zP(B)|0,n[Ze>>2]=Ur(k)|0,kGe(u,o,tt,Ze,Le,Qe),s_(Qe),sp(Le)}l=n[l>>2]|0}while(l|0)}I=ct}function n_(o){return o=o|0,n[o+12>>2]|0}function Q2(o){return o=o|0,n[o+12>>2]|0}function T2(o){return o=o|0,n[o+16>>2]|0}function PGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=n[o>>2]|0,(n[o+8>>2]|0)-A>>2>>>0<l>>>0&&(TX(u,l,(n[o+4>>2]|0)-A>>2,o+8|0),RX(o,u),FX(u)),I=d}function i_(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=QX(o)|0,m>>>0<d>>>0)sn(o);else{k=n[o>>2]|0,_=(n[o+8>>2]|0)-k|0,T=_>>1,TX(u,_>>2>>>0<m>>>1>>>0?T>>>0<d>>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,RX(o,u),FX(u),I=B;return}}function R2(o){return o=o|0,n[o+8>>2]|0}function xGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=kX(o)|0,m>>>0<d>>>0)sn(o);else{k=n[o>>2]|0,_=(n[o+8>>2]|0)-k|0,T=_>>1,JGe(u,_>>2>>>0<m>>>1>>>0?T>>>0<d>>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,zGe(o,u),ZGe(u),I=B;return}}function zP(o){return o=o|0,n[o>>2]|0}function kGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,QGe(o,l,u,A,d,m)}function s_(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),yt(u))}function sp(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),yt(u))}function QGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0;B=I,I=I+48|0,M=B+40|0,k=B+32|0,G=B+24|0,T=B+12|0,_=B,Nl(k),o=Ls(o)|0,n[G>>2]=n[l>>2],u=n[u>>2]|0,A=n[A>>2]|0,o_(T,d),TGe(_,m),n[M>>2]=n[G>>2],RGe(o,M,u,A,T,_),s_(_),sp(T),Ol(k),I=B}function o_(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(VGe(o,A),KGe(o,n[l>>2]|0,n[u>>2]|0,A))}function TGe(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(WGe(o,A),YGe(o,n[l>>2]|0,n[u>>2]|0,A))}function RGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0;B=I,I=I+32|0,M=B+28|0,G=B+24|0,k=B+12|0,T=B,_=ma(FGe()|0)|0,n[G>>2]=n[l>>2],n[M>>2]=n[G>>2],l=Ad(M)|0,u=SX(u)|0,A=a_(A)|0,n[k>>2]=n[d>>2],M=d+4|0,n[k+4>>2]=n[M>>2],G=d+8|0,n[k+8>>2]=n[G>>2],n[G>>2]=0,n[M>>2]=0,n[d>>2]=0,d=l_(k)|0,n[T>>2]=n[m>>2],M=m+4|0,n[T+4>>2]=n[M>>2],G=m+8|0,n[T+8>>2]=n[G>>2],n[G>>2]=0,n[M>>2]=0,n[m>>2]=0,uu(0,_|0,o|0,l|0,u|0,A|0,d|0,NGe(T)|0)|0,s_(T),sp(k),I=B}function FGe(){var o=0;return s[7968]|0||(qGe(10708),o=7968,n[o>>2]=1,n[o+4>>2]=0),10708}function Ad(o){return o=o|0,bX(o)|0}function SX(o){return o=o|0,DX(o)|0}function a_(o){return o=o|0,VP(o)|0}function l_(o){return o=o|0,LGe(o)|0}function NGe(o){return o=o|0,OGe(o)|0}function OGe(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Fl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=DX(n[(n[o>>2]|0)+(l<<2)>>2]|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function DX(o){return o=o|0,o|0}function LGe(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Fl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=bX((n[o>>2]|0)+(l<<2)|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function bX(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=IM(PX()|0)|0,A?(CM(l,A),wM(u,l),EYe(o,u),o=BM(l)|0):o=MGe(o)|0,I=d,o|0}function PX(){var o=0;return s[7960]|0||(jGe(10664),gr(25,10664,U|0)|0,o=7960,n[o>>2]=1,n[o+4>>2]=0),10664}function MGe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Fl(8)|0,l=A,k=Jt(4)|0,n[k>>2]=n[o>>2],m=l+4|0,n[m>>2]=k,o=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],xX(o,m,d),n[A>>2]=o,I=u,l|0}function xX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1656,n[u+12>>2]=l,n[o+4>>2]=u}function _Ge(o){o=o|0,$y(o),yt(o)}function UGe(o){o=o|0,o=n[o+12>>2]|0,o|0&&yt(o)}function HGe(o){o=o|0,yt(o)}function jGe(o){o=o|0,Uh(o)}function qGe(o){o=o|0,Ro(o,GGe()|0,5)}function GGe(){return 1676}function WGe(o,l){o=o|0,l=l|0;var u=0;if((kX(o)|0)>>>0<l>>>0&&sn(o),l>>>0>1073741823)Nt();else{u=Jt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function YGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function kX(o){return o=o|0,1073741823}function VGe(o,l){o=o|0,l=l|0;var u=0;if((QX(o)|0)>>>0<l>>>0&&sn(o),l>>>0>1073741823)Nt();else{u=Jt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function KGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function QX(o){return o=o|0,1073741823}function JGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Jt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function zGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ZGe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&yt(o)}function TX(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Jt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function RX(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function FX(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&yt(o)}function XGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0;if(Qe=I,I=I+32|0,M=Qe+20|0,G=Qe+12|0,_=Qe+16|0,ae=Qe+4|0,We=Qe,Le=Qe+8|0,k=wX()|0,m=n[k>>2]|0,B=n[m>>2]|0,B|0)for(T=n[k+8>>2]|0,k=n[k+4>>2]|0;xu(M,B),$Ge(o,M,k,T),m=m+4|0,B=n[m>>2]|0,B;)T=T+1|0,k=k+1|0;if(m=BX()|0,B=n[m>>2]|0,B|0)do xu(M,B),n[G>>2]=n[m+4>>2],e5e(l,M,G),m=m+8|0,B=n[m>>2]|0;while(B|0);if(m=n[(Ky()|0)>>2]|0,m|0)do l=n[m+4>>2]|0,xu(M,n[(Jy(l)|0)>>2]|0),n[G>>2]=t_(l)|0,t5e(u,M,G),m=n[m>>2]|0;while(m|0);if(xu(_,0),m=r_()|0,n[M>>2]=n[_>>2],vX(M,m,d),m=n[(Ky()|0)>>2]|0,m|0){o=M+4|0,l=M+8|0,u=M+8|0;do{if(T=n[m+4>>2]|0,xu(G,n[(Jy(T)|0)>>2]|0),r5e(ae,NX(T)|0),B=n[ae>>2]|0,B|0){n[M>>2]=0,n[o>>2]=0,n[l>>2]=0;do xu(We,n[(Jy(n[B+4>>2]|0)|0)>>2]|0),k=n[o>>2]|0,k>>>0<(n[u>>2]|0)>>>0?(n[k>>2]=n[We>>2],n[o>>2]=(n[o>>2]|0)+4):i_(M,We),B=n[B>>2]|0;while(B|0);n5e(A,G,M),sp(M)}n[Le>>2]=n[G>>2],_=OX(T)|0,n[M>>2]=n[Le>>2],vX(M,_,d),iZ(ae),m=n[m>>2]|0}while(m|0)}I=Qe}function $Ge(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,g5e(o,l,u,A)}function e5e(o,l,u){o=o|0,l=l|0,u=u|0,h5e(o,l,u)}function Jy(o){return o=o|0,o|0}function t5e(o,l,u){o=o|0,l=l|0,u=u|0,u5e(o,l,u)}function NX(o){return o=o|0,o+16|0}function r5e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(m=I,I=I+16|0,d=m+8|0,u=m,n[o>>2]=0,A=n[l>>2]|0,n[d>>2]=A,n[u>>2]=o,u=c5e(u)|0,A|0){if(A=Jt(12)|0,B=(LX(d)|0)+4|0,o=n[B+4>>2]|0,l=A+4|0,n[l>>2]=n[B>>2],n[l+4>>2]=o,l=n[n[d>>2]>>2]|0,n[d>>2]=l,!l)o=A;else for(l=A;o=Jt(12)|0,T=(LX(d)|0)+4|0,k=n[T+4>>2]|0,B=o+4|0,n[B>>2]=n[T>>2],n[B+4>>2]=k,n[l>>2]=o,B=n[n[d>>2]>>2]|0,n[d>>2]=B,B;)l=o;n[o>>2]=n[u>>2],n[u>>2]=A}I=m}function n5e(o,l,u){o=o|0,l=l|0,u=u|0,i5e(o,l,u)}function OX(o){return o=o|0,o+24|0}function i5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+24|0,d=A+16|0,k=A+12|0,m=A,Nl(d),o=Ls(o)|0,n[k>>2]=n[l>>2],o_(m,u),n[B>>2]=n[k>>2],s5e(o,B,m),sp(m),Ol(d),I=A}function s5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+16|0,k=A+12|0,d=A,m=ma(o5e()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=Ad(B)|0,n[d>>2]=n[u>>2],B=u+4|0,n[d+4>>2]=n[B>>2],k=u+8|0,n[d+8>>2]=n[k>>2],n[k>>2]=0,n[B>>2]=0,n[u>>2]=0,Rs(0,m|0,o|0,l|0,l_(d)|0)|0,sp(d),I=A}function o5e(){var o=0;return s[7976]|0||(a5e(10720),o=7976,n[o>>2]=1,n[o+4>>2]=0),10720}function a5e(o){o=o|0,Ro(o,l5e()|0,2)}function l5e(){return 1732}function c5e(o){return o=o|0,n[o>>2]|0}function LX(o){return o=o|0,n[o>>2]|0}function u5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Nl(d),o=Ls(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],MX(o,m,u),Ol(d),I=A}function MX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+4|0,B=A,d=ma(f5e()|0)|0,n[B>>2]=n[l>>2],n[m>>2]=n[B>>2],l=Ad(m)|0,Rs(0,d|0,o|0,l|0,SX(u)|0)|0,I=A}function f5e(){var o=0;return s[7984]|0||(A5e(10732),o=7984,n[o>>2]=1,n[o+4>>2]=0),10732}function A5e(o){o=o|0,Ro(o,p5e()|0,2)}function p5e(){return 1744}function h5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Nl(d),o=Ls(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],MX(o,m,u),Ol(d),I=A}function g5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Nl(m),o=Ls(o)|0,n[k>>2]=n[l>>2],u=s[u>>0]|0,A=s[A>>0]|0,n[B>>2]=n[k>>2],d5e(o,B,u,A),Ol(m),I=d}function d5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,B=d+4|0,k=d,m=ma(m5e()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=Ad(B)|0,u=zy(u)|0,Oi(0,m|0,o|0,l|0,u|0,zy(A)|0)|0,I=d}function m5e(){var o=0;return s[7992]|0||(E5e(10744),o=7992,n[o>>2]=1,n[o+4>>2]=0),10744}function zy(o){return o=o|0,y5e(o)|0}function y5e(o){return o=o|0,o&255|0}function E5e(o){o=o|0,Ro(o,I5e()|0,3)}function I5e(){return 1756}function C5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;switch(ae=I,I=I+32|0,k=ae+8|0,T=ae+4|0,_=ae+20|0,M=ae,bM(o,0),A=yYe(l)|0,n[k>>2]=0,G=k+4|0,n[G>>2]=0,n[k+8>>2]=0,A<<24>>24){case 0:{s[_>>0]=0,w5e(T,u,_),ZP(o,T)|0,bf(T);break}case 8:{G=h_(l)|0,s[_>>0]=8,xu(M,n[G+4>>2]|0),B5e(T,u,_,M,G+8|0),ZP(o,T)|0,bf(T);break}case 9:{if(m=h_(l)|0,l=n[m+4>>2]|0,l|0)for(B=k+8|0,d=m+12|0;l=l+-1|0,xu(T,n[d>>2]|0),A=n[G>>2]|0,A>>>0<(n[B>>2]|0)>>>0?(n[A>>2]=n[T>>2],n[G>>2]=(n[G>>2]|0)+4):i_(k,T),l;)d=d+4|0;s[_>>0]=9,xu(M,n[m+8>>2]|0),v5e(T,u,_,M,k),ZP(o,T)|0,bf(T);break}default:G=h_(l)|0,s[_>>0]=A,xu(M,n[G+4>>2]|0),S5e(T,u,_,M),ZP(o,T)|0,bf(T)}sp(k),I=ae}function w5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,Nl(d),l=Ls(l)|0,M5e(o,l,s[u>>0]|0),Ol(d),I=A}function ZP(o,l){o=o|0,l=l|0;var u=0;return u=n[o>>2]|0,u|0&&Oa(u|0),n[o>>2]=n[l>>2],n[l>>2]=0,o|0}function B5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+32|0,k=m+16|0,B=m+8|0,T=m,Nl(B),l=Ls(l)|0,u=s[u>>0]|0,n[T>>2]=n[A>>2],d=n[d>>2]|0,n[k>>2]=n[T>>2],F5e(o,l,u,k,d),Ol(B),I=m}function v5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0;m=I,I=I+32|0,T=m+24|0,B=m+16|0,_=m+12|0,k=m,Nl(B),l=Ls(l)|0,u=s[u>>0]|0,n[_>>2]=n[A>>2],o_(k,d),n[T>>2]=n[_>>2],k5e(o,l,u,T,k),sp(k),Ol(B),I=m}function S5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Nl(m),l=Ls(l)|0,u=s[u>>0]|0,n[k>>2]=n[A>>2],n[B>>2]=n[k>>2],D5e(o,l,u,B),Ol(m),I=d}function D5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+4|0,k=d,B=ma(b5e()|0)|0,u=zy(u)|0,n[k>>2]=n[A>>2],n[m>>2]=n[k>>2],XP(o,Rs(0,B|0,l|0,u|0,Ad(m)|0)|0),I=d}function b5e(){var o=0;return s[8e3]|0||(P5e(10756),o=8e3,n[o>>2]=1,n[o+4>>2]=0),10756}function XP(o,l){o=o|0,l=l|0,bM(o,l)}function P5e(o){o=o|0,Ro(o,x5e()|0,2)}function x5e(){return 1772}function k5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0;m=I,I=I+32|0,T=m+16|0,_=m+12|0,B=m,k=ma(Q5e()|0)|0,u=zy(u)|0,n[_>>2]=n[A>>2],n[T>>2]=n[_>>2],A=Ad(T)|0,n[B>>2]=n[d>>2],T=d+4|0,n[B+4>>2]=n[T>>2],_=d+8|0,n[B+8>>2]=n[_>>2],n[_>>2]=0,n[T>>2]=0,n[d>>2]=0,XP(o,Oi(0,k|0,l|0,u|0,A|0,l_(B)|0)|0),sp(B),I=m}function Q5e(){var o=0;return s[8008]|0||(T5e(10768),o=8008,n[o>>2]=1,n[o+4>>2]=0),10768}function T5e(o){o=o|0,Ro(o,R5e()|0,3)}function R5e(){return 1784}function F5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,k=m+4|0,T=m,B=ma(N5e()|0)|0,u=zy(u)|0,n[T>>2]=n[A>>2],n[k>>2]=n[T>>2],A=Ad(k)|0,XP(o,Oi(0,B|0,l|0,u|0,A|0,a_(d)|0)|0),I=m}function N5e(){var o=0;return s[8016]|0||(O5e(10780),o=8016,n[o>>2]=1,n[o+4>>2]=0),10780}function O5e(o){o=o|0,Ro(o,L5e()|0,3)}function L5e(){return 1800}function M5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=ma(_5e()|0)|0,XP(o,dn(0,A|0,l|0,zy(u)|0)|0)}function _5e(){var o=0;return s[8024]|0||(U5e(10792),o=8024,n[o>>2]=1,n[o+4>>2]=0),10792}function U5e(o){o=o|0,Ro(o,H5e()|0,1)}function H5e(){return 1816}function j5e(){q5e(),G5e(),W5e()}function q5e(){n[2702]=A$(65536)|0}function G5e(){f9e(10856)}function W5e(){Y5e(10816)}function Y5e(o){o=o|0,V5e(o,5044),K5e(o)|0}function V5e(o,l){o=o|0,l=l|0;var u=0;u=PX()|0,n[o>>2]=u,s9e(u,l),Wh(n[o>>2]|0)}function K5e(o){o=o|0;var l=0;return l=n[o>>2]|0,ud(l,J5e()|0),o|0}function J5e(){var o=0;return s[8032]|0||(_X(10820),gr(64,10820,U|0)|0,o=8032,n[o>>2]=1,n[o+4>>2]=0),Ur(10820)|0||_X(10820),10820}function _X(o){o=o|0,X5e(o),fd(o,25)}function z5e(o){o=o|0,Z5e(o+24|0)}function Z5e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function X5e(o){o=o|0;var l=0;l=en()|0,tn(o,5,18,l,r9e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function $5e(o,l){o=o|0,l=l|0,e9e(o,l)}function e9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;u=I,I=I+16|0,A=u,d=u+4|0,ld(d,l),n[A>>2]=cd(d,l)|0,t9e(o,A),I=u}function t9e(o,l){o=o|0,l=l|0,UX(o+4|0,n[l>>2]|0),s[o+8>>0]=1}function UX(o,l){o=o|0,l=l|0,n[o>>2]=l}function r9e(){return 1824}function n9e(o){return o=o|0,i9e(o)|0}function i9e(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Fl(8)|0,l=A,k=Jt(4)|0,ld(d,o),UX(k,cd(d,o)|0),m=l+4|0,n[m>>2]=k,o=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],xX(o,m,d),n[A>>2]=o,I=u,l|0}function Fl(o){o=o|0;var l=0,u=0;return o=o+7&-8,o>>>0<=32768&&(l=n[2701]|0,o>>>0<=(65536-l|0)>>>0)?(u=(n[2702]|0)+l|0,n[2701]=l+o,o=u):(o=A$(o+8|0)|0,n[o>>2]=n[2703],n[2703]=o,o=o+8|0),o|0}function s9e(o,l){o=o|0,l=l|0,n[o>>2]=o9e()|0,n[o+4>>2]=a9e()|0,n[o+12>>2]=l,n[o+8>>2]=l9e()|0,n[o+32>>2]=9}function o9e(){return 11744}function a9e(){return 1832}function l9e(){return JP()|0}function c9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Gh(A,896)|0)==512?u|0&&(u9e(u),yt(u)):l|0&&yt(l)}function u9e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Yh(o)}function f9e(o){o=o|0,A9e(o,5052),p9e(o)|0,h9e(o,5058,26)|0,g9e(o,5069,1)|0,d9e(o,5077,10)|0,m9e(o,5087,19)|0,y9e(o,5094,27)|0}function A9e(o,l){o=o|0,l=l|0;var u=0;u=uYe()|0,n[o>>2]=u,fYe(u,l),Wh(n[o>>2]|0)}function p9e(o){o=o|0;var l=0;return l=n[o>>2]|0,ud(l,zWe()|0),o|0}function h9e(o,l,u){return o=o|0,l=l|0,u=u|0,TWe(o,Bn(l)|0,u,0),o|0}function g9e(o,l,u){return o=o|0,l=l|0,u=u|0,mWe(o,Bn(l)|0,u,0),o|0}function d9e(o,l,u){return o=o|0,l=l|0,u=u|0,J9e(o,Bn(l)|0,u,0),o|0}function m9e(o,l,u){return o=o|0,l=l|0,u=u|0,F9e(o,Bn(l)|0,u,0),o|0}function HX(o,l){o=o|0,l=l|0;var u=0,A=0;e:for(;;){for(u=n[2703]|0;;){if((u|0)==(l|0))break e;if(A=n[u>>2]|0,n[2703]=A,!u)u=A;else break}yt(u)}n[2701]=o}function y9e(o,l,u){return o=o|0,l=l|0,u=u|0,E9e(o,Bn(l)|0,u,0),o|0}function E9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=c_()|0,o=I9e(u)|0,vn(m,l,d,o,C9e(u,A)|0,A)}function c_(){var o=0,l=0;if(s[8040]|0||(qX(10860),gr(65,10860,U|0)|0,l=8040,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10860)|0)){o=10860,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));qX(10860)}return 10860}function I9e(o){return o=o|0,o|0}function C9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=c_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(jX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(w9e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function jX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function w9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=B9e(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,v9e(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,jX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,S9e(o,d),D9e(d),I=k;return}}function B9e(o){return o=o|0,536870911}function v9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function S9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function D9e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function qX(o){o=o|0,x9e(o)}function b9e(o){o=o|0,P9e(o+24|0)}function P9e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function x9e(o){o=o|0;var l=0;l=en()|0,tn(o,1,11,l,k9e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function k9e(){return 1840}function Q9e(o,l,u){o=o|0,l=l|0,u=u|0,R9e(n[(T9e(o)|0)>>2]|0,l,u)}function T9e(o){return o=o|0,(n[(c_()|0)+24>>2]|0)+(o<<3)|0}function R9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+1|0,d=A,ld(m,l),l=cd(m,l)|0,ld(d,u),u=cd(d,u)|0,ap[o&31](l,u),I=A}function F9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=u_()|0,o=N9e(u)|0,vn(m,l,d,o,O9e(u,A)|0,A)}function u_(){var o=0,l=0;if(s[8048]|0||(WX(10896),gr(66,10896,U|0)|0,l=8048,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10896)|0)){o=10896,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));WX(10896)}return 10896}function N9e(o){return o=o|0,o|0}function O9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=u_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(GX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(L9e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function GX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function L9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=M9e(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,_9e(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,GX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,U9e(o,d),H9e(d),I=k;return}}function M9e(o){return o=o|0,536870911}function _9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function U9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function H9e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function WX(o){o=o|0,G9e(o)}function j9e(o){o=o|0,q9e(o+24|0)}function q9e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function G9e(o){o=o|0;var l=0;l=en()|0,tn(o,1,11,l,W9e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function W9e(){return 1852}function Y9e(o,l){return o=o|0,l=l|0,K9e(n[(V9e(o)|0)>>2]|0,l)|0}function V9e(o){return o=o|0,(n[(u_()|0)+24>>2]|0)+(o<<3)|0}function K9e(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,ld(A,l),l=cd(A,l)|0,l=VP(dd[o&31](l)|0)|0,I=u,l|0}function J9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=f_()|0,o=z9e(u)|0,vn(m,l,d,o,Z9e(u,A)|0,A)}function f_(){var o=0,l=0;if(s[8056]|0||(VX(10932),gr(67,10932,U|0)|0,l=8056,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10932)|0)){o=10932,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));VX(10932)}return 10932}function z9e(o){return o=o|0,o|0}function Z9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=f_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(YX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(X9e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function YX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function X9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=$9e(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,eWe(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,YX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,tWe(o,d),rWe(d),I=k;return}}function $9e(o){return o=o|0,536870911}function eWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function tWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function rWe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function VX(o){o=o|0,sWe(o)}function nWe(o){o=o|0,iWe(o+24|0)}function iWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function sWe(o){o=o|0;var l=0;l=en()|0,tn(o,1,7,l,oWe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function oWe(){return 1860}function aWe(o,l,u){return o=o|0,l=l|0,u=u|0,cWe(n[(lWe(o)|0)>>2]|0,l,u)|0}function lWe(o){return o=o|0,(n[(f_()|0)+24>>2]|0)+(o<<3)|0}function cWe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+32|0,B=A+12|0,m=A+8|0,k=A,T=A+16|0,d=A+4|0,uWe(T,l),fWe(k,T,l),Hh(d,u),u=jh(d,u)|0,n[B>>2]=n[k>>2],L2[o&15](m,B,u),u=AWe(m)|0,bf(m),qh(d),I=A,u|0}function uWe(o,l){o=o|0,l=l|0}function fWe(o,l,u){o=o|0,l=l|0,u=u|0,pWe(o,u)}function AWe(o){return o=o|0,Ls(o)|0}function pWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+16|0,u=d,A=l,A&1?(hWe(u,0),Me(A|0,u|0)|0,gWe(o,u),dWe(u)):n[o>>2]=n[l>>2],I=d}function hWe(o,l){o=o|0,l=l|0,bu(o,l),n[o+4>>2]=0,s[o+8>>0]=0}function gWe(o,l){o=o|0,l=l|0,n[o>>2]=n[l+4>>2]}function dWe(o){o=o|0,s[o+8>>0]=0}function mWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=A_()|0,o=yWe(u)|0,vn(m,l,d,o,EWe(u,A)|0,A)}function A_(){var o=0,l=0;if(s[8064]|0||(JX(10968),gr(68,10968,U|0)|0,l=8064,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10968)|0)){o=10968,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));JX(10968)}return 10968}function yWe(o){return o=o|0,o|0}function EWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=A_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(KX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(IWe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function KX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function IWe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=CWe(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,wWe(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,KX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,BWe(o,d),vWe(d),I=k;return}}function CWe(o){return o=o|0,536870911}function wWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function BWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function vWe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function JX(o){o=o|0,bWe(o)}function SWe(o){o=o|0,DWe(o+24|0)}function DWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function bWe(o){o=o|0;var l=0;l=en()|0,tn(o,1,1,l,PWe()|0,5),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function PWe(){return 1872}function xWe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,QWe(n[(kWe(o)|0)>>2]|0,l,u,A,d,m)}function kWe(o){return o=o|0,(n[(A_()|0)+24>>2]|0)+(o<<3)|0}function QWe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0;B=I,I=I+32|0,k=B+16|0,T=B+12|0,_=B+8|0,M=B+4|0,G=B,Hh(k,l),l=jh(k,l)|0,Hh(T,u),u=jh(T,u)|0,Hh(_,A),A=jh(_,A)|0,Hh(M,d),d=jh(M,d)|0,Hh(G,m),m=jh(G,m)|0,m$[o&1](l,u,A,d,m),qh(G),qh(M),qh(_),qh(T),qh(k),I=B}function TWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=p_()|0,o=RWe(u)|0,vn(m,l,d,o,FWe(u,A)|0,A)}function p_(){var o=0,l=0;if(s[8072]|0||(ZX(11004),gr(69,11004,U|0)|0,l=8072,n[l>>2]=1,n[l+4>>2]=0),!(Ur(11004)|0)){o=11004,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));ZX(11004)}return 11004}function RWe(o){return o=o|0,o|0}function FWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=p_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(zX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(NWe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function zX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function NWe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=OWe(o)|0,A>>>0<B>>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,LWe(d,M>>3>>>0<A>>>1>>>0?_>>>0<B>>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,zX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,MWe(o,d),_We(d),I=k;return}}function OWe(o){return o=o|0,536870911}function LWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function MWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _We(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&yt(o)}function ZX(o){o=o|0,jWe(o)}function UWe(o){o=o|0,HWe(o+24|0)}function HWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function jWe(o){o=o|0;var l=0;l=en()|0,tn(o,1,12,l,qWe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qWe(){return 1896}function GWe(o,l,u){o=o|0,l=l|0,u=u|0,YWe(n[(WWe(o)|0)>>2]|0,l,u)}function WWe(o){return o=o|0,(n[(p_()|0)+24>>2]|0)+(o<<3)|0}function YWe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+4|0,d=A,VWe(m,l),l=KWe(m,l)|0,Hh(d,u),u=jh(d,u)|0,ap[o&31](l,u),qh(d),I=A}function VWe(o,l){o=o|0,l=l|0}function KWe(o,l){return o=o|0,l=l|0,JWe(l)|0}function JWe(o){return o=o|0,o|0}function zWe(){var o=0;return s[8080]|0||(XX(11040),gr(70,11040,U|0)|0,o=8080,n[o>>2]=1,n[o+4>>2]=0),Ur(11040)|0||XX(11040),11040}function XX(o){o=o|0,$We(o),fd(o,71)}function ZWe(o){o=o|0,XWe(o+24|0)}function XWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),yt(u))}function $We(o){o=o|0;var l=0;l=en()|0,tn(o,5,7,l,nYe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function eYe(o){o=o|0,tYe(o)}function tYe(o){o=o|0,rYe(o)}function rYe(o){o=o|0,s[o+8>>0]=1}function nYe(){return 1936}function iYe(){return sYe()|0}function sYe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Fl(8)|0,o=u,m=o+4|0,n[m>>2]=Jt(1)|0,A=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],oYe(A,m,d),n[u>>2]=A,I=l,o|0}function oYe(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1916,n[u+12>>2]=l,n[o+4>>2]=u}function aYe(o){o=o|0,$y(o),yt(o)}function lYe(o){o=o|0,o=n[o+12>>2]|0,o|0&&yt(o)}function cYe(o){o=o|0,yt(o)}function uYe(){var o=0;return s[8088]|0||(mYe(11076),gr(25,11076,U|0)|0,o=8088,n[o>>2]=1,n[o+4>>2]=0),11076}function fYe(o,l){o=o|0,l=l|0,n[o>>2]=AYe()|0,n[o+4>>2]=pYe()|0,n[o+12>>2]=l,n[o+8>>2]=hYe()|0,n[o+32>>2]=10}function AYe(){return 11745}function pYe(){return 1940}function hYe(){return KP()|0}function gYe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Gh(A,896)|0)==512?u|0&&(dYe(u),yt(u)):l|0&&yt(l)}function dYe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Yh(o)}function mYe(o){o=o|0,Uh(o)}function xu(o,l){o=o|0,l=l|0,n[o>>2]=l}function h_(o){return o=o|0,n[o>>2]|0}function yYe(o){return o=o|0,s[n[o>>2]>>0]|0}function EYe(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,n[A>>2]=n[o>>2],IYe(l,A)|0,I=u}function IYe(o,l){o=o|0,l=l|0;var u=0;return u=CYe(n[o>>2]|0,l)|0,l=o+4|0,n[(n[l>>2]|0)+8>>2]=u,n[(n[l>>2]|0)+8>>2]|0}function CYe(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,Nl(A),o=Ls(o)|0,l=wYe(o,n[l>>2]|0)|0,Ol(A),I=u,l|0}function Nl(o){o=o|0,n[o>>2]=n[2701],n[o+4>>2]=n[2703]}function wYe(o,l){o=o|0,l=l|0;var u=0;return u=ma(BYe()|0)|0,dn(0,u|0,o|0,a_(l)|0)|0}function Ol(o){o=o|0,HX(n[o>>2]|0,n[o+4>>2]|0)}function BYe(){var o=0;return s[8096]|0||(vYe(11120),o=8096,n[o>>2]=1,n[o+4>>2]=0),11120}function vYe(o){o=o|0,Ro(o,SYe()|0,1)}function SYe(){return 1948}function DYe(){bYe()}function bYe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0;if(Le=I,I=I+16|0,M=Le+4|0,G=Le,aa(65536,10804,n[2702]|0,10812),u=wX()|0,l=n[u>>2]|0,o=n[l>>2]|0,o|0)for(A=n[u+8>>2]|0,u=n[u+4>>2]|0;hf(o|0,c[u>>0]|0|0,s[A>>0]|0),l=l+4|0,o=n[l>>2]|0,o;)A=A+1|0,u=u+1|0;if(o=BX()|0,l=n[o>>2]|0,l|0)do LA(l|0,n[o+4>>2]|0),o=o+8|0,l=n[o>>2]|0;while(l|0);LA(PYe()|0,5167),_=Ky()|0,o=n[_>>2]|0;e:do if(o|0){do xYe(n[o+4>>2]|0),o=n[o>>2]|0;while(o|0);if(o=n[_>>2]|0,o|0){T=_;do{for(;d=o,o=n[o>>2]|0,d=n[d+4>>2]|0,!!(kYe(d)|0);)if(n[G>>2]=T,n[M>>2]=n[G>>2],QYe(_,M)|0,!o)break e;if(TYe(d),T=n[T>>2]|0,l=$X(d)|0,m=Ni()|0,B=I,I=I+((1*(l<<2)|0)+15&-16)|0,k=I,I=I+((1*(l<<2)|0)+15&-16)|0,l=n[(NX(d)|0)>>2]|0,l|0)for(u=B,A=k;n[u>>2]=n[(Jy(n[l+4>>2]|0)|0)>>2],n[A>>2]=n[l+8>>2],l=n[l>>2]|0,l;)u=u+4|0,A=A+4|0;Qe=Jy(d)|0,l=RYe(d)|0,u=$X(d)|0,A=FYe(d)|0,ac(Qe|0,l|0,B|0,k|0,u|0,A|0,t_(d)|0),OA(m|0)}while(o|0)}}while(!1);if(o=n[(r_()|0)>>2]|0,o|0)do Qe=o+4|0,_=n_(Qe)|0,d=R2(_)|0,m=Q2(_)|0,B=(T2(_)|0)+1|0,k=$P(_)|0,T=e$(Qe)|0,_=Ur(_)|0,M=zP(Qe)|0,G=g_(Qe)|0,Au(0,d|0,m|0,B|0,k|0,T|0,_|0,M|0,G|0,d_(Qe)|0),o=n[o>>2]|0;while(o|0);o=n[(Ky()|0)>>2]|0;e:do if(o|0){t:for(;;){if(l=n[o+4>>2]|0,l|0&&(ae=n[(Jy(l)|0)>>2]|0,We=n[(OX(l)|0)>>2]|0,We|0)){u=We;do{l=u+4|0,A=n_(l)|0;r:do if(A|0)switch(Ur(A)|0){case 0:break t;case 4:case 3:case 2:{k=R2(A)|0,T=Q2(A)|0,_=(T2(A)|0)+1|0,M=$P(A)|0,G=Ur(A)|0,Qe=zP(l)|0,Au(ae|0,k|0,T|0,_|0,M|0,0,G|0,Qe|0,g_(l)|0,d_(l)|0);break r}case 1:{B=R2(A)|0,k=Q2(A)|0,T=(T2(A)|0)+1|0,_=$P(A)|0,M=e$(l)|0,G=Ur(A)|0,Qe=zP(l)|0,Au(ae|0,B|0,k|0,T|0,_|0,M|0,G|0,Qe|0,g_(l)|0,d_(l)|0);break r}case 5:{_=R2(A)|0,M=Q2(A)|0,G=(T2(A)|0)+1|0,Qe=$P(A)|0,Au(ae|0,_|0,M|0,G|0,Qe|0,NYe(A)|0,Ur(A)|0,0,0,0);break r}default:break r}while(!1);u=n[u>>2]|0}while(u|0)}if(o=n[o>>2]|0,!o)break e}Nt()}while(!1);ve(),I=Le}function PYe(){return 11703}function xYe(o){o=o|0,s[o+40>>0]=0}function kYe(o){return o=o|0,(s[o+40>>0]|0)!=0|0}function QYe(o,l){return o=o|0,l=l|0,l=OYe(l)|0,o=n[l>>2]|0,n[l>>2]=n[o>>2],yt(o),n[l>>2]|0}function TYe(o){o=o|0,s[o+40>>0]=1}function $X(o){return o=o|0,n[o+20>>2]|0}function RYe(o){return o=o|0,n[o+8>>2]|0}function FYe(o){return o=o|0,n[o+32>>2]|0}function $P(o){return o=o|0,n[o+4>>2]|0}function e$(o){return o=o|0,n[o+4>>2]|0}function g_(o){return o=o|0,n[o+8>>2]|0}function d_(o){return o=o|0,n[o+16>>2]|0}function NYe(o){return o=o|0,n[o+20>>2]|0}function OYe(o){return o=o|0,n[o>>2]|0}function ex(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0;Lt=I,I=I+16|0,ae=Lt;do if(o>>>0<245){if(_=o>>>0<11?16:o+11&-8,o=_>>>3,G=n[2783]|0,u=G>>>o,u&3|0)return l=(u&1^1)+o|0,o=11172+(l<<1<<2)|0,u=o+8|0,A=n[u>>2]|0,d=A+8|0,m=n[d>>2]|0,(o|0)==(m|0)?n[2783]=G&~(1<<l):(n[m+12>>2]=o,n[u>>2]=m),Ge=l<<3,n[A+4>>2]=Ge|3,Ge=A+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1,Ge=d,I=Lt,Ge|0;if(M=n[2785]|0,_>>>0>M>>>0){if(u|0)return l=2<<o,l=u<<o&(l|0-l),l=(l&0-l)+-1|0,B=l>>>12&16,l=l>>>B,u=l>>>5&8,l=l>>>u,d=l>>>2&4,l=l>>>d,o=l>>>1&2,l=l>>>o,A=l>>>1&1,A=(u|B|d|o|A)+(l>>>A)|0,l=11172+(A<<1<<2)|0,o=l+8|0,d=n[o>>2]|0,B=d+8|0,u=n[B>>2]|0,(l|0)==(u|0)?(o=G&~(1<<A),n[2783]=o):(n[u+12>>2]=l,n[o>>2]=u,o=G),m=(A<<3)-_|0,n[d+4>>2]=_|3,A=d+_|0,n[A+4>>2]=m|1,n[A+m>>2]=m,M|0&&(d=n[2788]|0,l=M>>>3,u=11172+(l<<1<<2)|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=d,n[l+12>>2]=d,n[d+8>>2]=l,n[d+12>>2]=u),n[2785]=m,n[2788]=A,Ge=B,I=Lt,Ge|0;if(k=n[2784]|0,k){if(u=(k&0-k)+-1|0,B=u>>>12&16,u=u>>>B,m=u>>>5&8,u=u>>>m,T=u>>>2&4,u=u>>>T,A=u>>>1&2,u=u>>>A,o=u>>>1&1,o=n[11436+((m|B|T|A|o)+(u>>>o)<<2)>>2]|0,u=(n[o+4>>2]&-8)-_|0,A=n[o+16+(((n[o+16>>2]|0)==0&1)<<2)>>2]|0,!A)T=o,m=u;else{do B=(n[A+4>>2]&-8)-_|0,T=B>>>0<u>>>0,u=T?B:u,o=T?A:o,A=n[A+16+(((n[A+16>>2]|0)==0&1)<<2)>>2]|0;while(A|0);T=o,m=u}if(B=T+_|0,T>>>0<B>>>0){d=n[T+24>>2]|0,l=n[T+12>>2]|0;do if((l|0)==(T|0)){if(o=T+20|0,l=n[o>>2]|0,!l&&(o=T+16|0,l=n[o>>2]|0,!l)){u=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0,u=l}else u=n[T+8>>2]|0,n[u+12>>2]=l,n[l+8>>2]=u,u=l;while(!1);do if(d|0){if(l=n[T+28>>2]|0,o=11436+(l<<2)|0,(T|0)==(n[o>>2]|0)){if(n[o>>2]=u,!u){n[2784]=k&~(1<<l);break}}else if(n[d+16+(((n[d+16>>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=d,l=n[T+16>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),l=n[T+20>>2]|0,l|0&&(n[u+20>>2]=l,n[l+24>>2]=u)}while(!1);return m>>>0<16?(Ge=m+_|0,n[T+4>>2]=Ge|3,Ge=T+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1):(n[T+4>>2]=_|3,n[B+4>>2]=m|1,n[B+m>>2]=m,M|0&&(A=n[2788]|0,l=M>>>3,u=11172+(l<<1<<2)|0,l=1<<l,G&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=G|l,l=u,o=u+8|0),n[o>>2]=A,n[l+12>>2]=A,n[A+8>>2]=l,n[A+12>>2]=u),n[2785]=m,n[2788]=B),Ge=T+8|0,I=Lt,Ge|0}else G=_}else G=_}else G=_}else if(o>>>0<=4294967231)if(o=o+11|0,_=o&-8,T=n[2784]|0,T){A=0-_|0,o=o>>>8,o?_>>>0>16777215?k=31:(G=(o+1048320|0)>>>16&8,He=o<<G,M=(He+520192|0)>>>16&4,He=He<<M,k=(He+245760|0)>>>16&2,k=14-(M|G|k)+(He<<k>>>15)|0,k=_>>>(k+7|0)&1|k<<1):k=0,u=n[11436+(k<<2)>>2]|0;e:do if(!u)u=0,o=0,He=57;else for(o=0,B=_<<((k|0)==31?0:25-(k>>>1)|0),m=0;;){if(d=(n[u+4>>2]&-8)-_|0,d>>>0<A>>>0)if(d)o=u,A=d;else{o=u,A=0,d=u,He=61;break e}if(d=n[u+20>>2]|0,u=n[u+16+(B>>>31<<2)>>2]|0,m=(d|0)==0|(d|0)==(u|0)?m:d,d=(u|0)==0,d){u=m,He=57;break}else B=B<<((d^1)&1)}while(!1);if((He|0)==57){if((u|0)==0&(o|0)==0){if(o=2<<k,o=T&(o|0-o),!o){G=_;break}G=(o&0-o)+-1|0,B=G>>>12&16,G=G>>>B,m=G>>>5&8,G=G>>>m,k=G>>>2&4,G=G>>>k,M=G>>>1&2,G=G>>>M,u=G>>>1&1,o=0,u=n[11436+((m|B|k|M|u)+(G>>>u)<<2)>>2]|0}u?(d=u,He=61):(k=o,B=A)}if((He|0)==61)for(;;)if(He=0,u=(n[d+4>>2]&-8)-_|0,G=u>>>0<A>>>0,u=G?u:A,o=G?d:o,d=n[d+16+(((n[d+16>>2]|0)==0&1)<<2)>>2]|0,d)A=u,He=61;else{k=o,B=u;break}if(k|0&&B>>>0<((n[2785]|0)-_|0)>>>0){if(m=k+_|0,k>>>0>=m>>>0)return Ge=0,I=Lt,Ge|0;d=n[k+24>>2]|0,l=n[k+12>>2]|0;do if((l|0)==(k|0)){if(o=k+20|0,l=n[o>>2]|0,!l&&(o=k+16|0,l=n[o>>2]|0,!l)){l=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0}else Ge=n[k+8>>2]|0,n[Ge+12>>2]=l,n[l+8>>2]=Ge;while(!1);do if(d){if(o=n[k+28>>2]|0,u=11436+(o<<2)|0,(k|0)==(n[u>>2]|0)){if(n[u>>2]=l,!l){A=T&~(1<<o),n[2784]=A;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(k|0)&1)<<2)>>2]=l,!l){A=T;break}n[l+24>>2]=d,o=n[k+16>>2]|0,o|0&&(n[l+16>>2]=o,n[o+24>>2]=l),o=n[k+20>>2]|0,o&&(n[l+20>>2]=o,n[o+24>>2]=l),A=T}else A=T;while(!1);do if(B>>>0>=16){if(n[k+4>>2]=_|3,n[m+4>>2]=B|1,n[m+B>>2]=B,l=B>>>3,B>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=m,n[l+12>>2]=m,n[m+8>>2]=l,n[m+12>>2]=u;break}if(l=B>>>8,l?B>>>0>16777215?l=31:(He=(l+1048320|0)>>>16&8,Ge=l<<He,ct=(Ge+520192|0)>>>16&4,Ge=Ge<<ct,l=(Ge+245760|0)>>>16&2,l=14-(ct|He|l)+(Ge<<l>>>15)|0,l=B>>>(l+7|0)&1|l<<1):l=0,u=11436+(l<<2)|0,n[m+28>>2]=l,o=m+16|0,n[o+4>>2]=0,n[o>>2]=0,o=1<<l,!(A&o)){n[2784]=A|o,n[u>>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}for(o=B<<((l|0)==31?0:25-(l>>>1)|0),u=n[u>>2]|0;;){if((n[u+4>>2]&-8|0)==(B|0)){He=97;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=96;break}}if((He|0)==96){n[A>>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}else if((He|0)==97){He=u+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=m,n[He>>2]=m,n[m+8>>2]=Ge,n[m+12>>2]=u,n[m+24>>2]=0;break}}else Ge=B+_|0,n[k+4>>2]=Ge|3,Ge=k+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1;while(!1);return Ge=k+8|0,I=Lt,Ge|0}else G=_}else G=_;else G=-1;while(!1);if(u=n[2785]|0,u>>>0>=G>>>0)return l=u-G|0,o=n[2788]|0,l>>>0>15?(Ge=o+G|0,n[2788]=Ge,n[2785]=l,n[Ge+4>>2]=l|1,n[Ge+l>>2]=l,n[o+4>>2]=G|3):(n[2785]=0,n[2788]=0,n[o+4>>2]=u|3,Ge=o+u+4|0,n[Ge>>2]=n[Ge>>2]|1),Ge=o+8|0,I=Lt,Ge|0;if(B=n[2786]|0,B>>>0>G>>>0)return ct=B-G|0,n[2786]=ct,Ge=n[2789]|0,He=Ge+G|0,n[2789]=He,n[He+4>>2]=ct|1,n[Ge+4>>2]=G|3,Ge=Ge+8|0,I=Lt,Ge|0;if(n[2901]|0?o=n[2903]|0:(n[2903]=4096,n[2902]=4096,n[2904]=-1,n[2905]=-1,n[2906]=0,n[2894]=0,o=ae&-16^1431655768,n[ae>>2]=o,n[2901]=o,o=4096),k=G+48|0,T=G+47|0,m=o+T|0,d=0-o|0,_=m&d,_>>>0<=G>>>0||(o=n[2893]|0,o|0&&(M=n[2891]|0,ae=M+_|0,ae>>>0<=M>>>0|ae>>>0>o>>>0)))return Ge=0,I=Lt,Ge|0;e:do if(n[2894]&4)l=0,He=133;else{u=n[2789]|0;t:do if(u){for(A=11580;o=n[A>>2]|0,!(o>>>0<=u>>>0&&(Qe=A+4|0,(o+(n[Qe>>2]|0)|0)>>>0>u>>>0));)if(o=n[A+8>>2]|0,o)A=o;else{He=118;break t}if(l=m-B&d,l>>>0<2147483647)if(o=Vh(l|0)|0,(o|0)==((n[A>>2]|0)+(n[Qe>>2]|0)|0)){if((o|0)!=-1){B=l,m=o,He=135;break e}}else A=o,He=126;else l=0}else He=118;while(!1);do if((He|0)==118)if(u=Vh(0)|0,(u|0)!=-1&&(l=u,We=n[2902]|0,Le=We+-1|0,l=(Le&l|0?(Le+l&0-We)-l|0:0)+_|0,We=n[2891]|0,Le=l+We|0,l>>>0>G>>>0&l>>>0<2147483647)){if(Qe=n[2893]|0,Qe|0&&Le>>>0<=We>>>0|Le>>>0>Qe>>>0){l=0;break}if(o=Vh(l|0)|0,(o|0)==(u|0)){B=l,m=u,He=135;break e}else A=o,He=126}else l=0;while(!1);do if((He|0)==126){if(u=0-l|0,!(k>>>0>l>>>0&(l>>>0<2147483647&(A|0)!=-1)))if((A|0)==-1){l=0;break}else{B=l,m=A,He=135;break e}if(o=n[2903]|0,o=T-l+o&0-o,o>>>0>=2147483647){B=l,m=A,He=135;break e}if((Vh(o|0)|0)==-1){Vh(u|0)|0,l=0;break}else{B=o+l|0,m=A,He=135;break e}}while(!1);n[2894]=n[2894]|4,He=133}while(!1);if((He|0)==133&&_>>>0<2147483647&&(ct=Vh(_|0)|0,Qe=Vh(0)|0,tt=Qe-ct|0,Ze=tt>>>0>(G+40|0)>>>0,!((ct|0)==-1|Ze^1|ct>>>0<Qe>>>0&((ct|0)!=-1&(Qe|0)!=-1)^1))&&(B=Ze?tt:l,m=ct,He=135),(He|0)==135){l=(n[2891]|0)+B|0,n[2891]=l,l>>>0>(n[2892]|0)>>>0&&(n[2892]=l),T=n[2789]|0;do if(T){for(l=11580;;){if(o=n[l>>2]|0,u=l+4|0,A=n[u>>2]|0,(m|0)==(o+A|0)){He=145;break}if(d=n[l+8>>2]|0,d)l=d;else break}if((He|0)==145&&!(n[l+12>>2]&8|0)&&T>>>0<m>>>0&T>>>0>=o>>>0){n[u>>2]=A+B,Ge=T+8|0,Ge=Ge&7|0?0-Ge&7:0,He=T+Ge|0,Ge=(n[2786]|0)+(B-Ge)|0,n[2789]=He,n[2786]=Ge,n[He+4>>2]=Ge|1,n[He+Ge+4>>2]=40,n[2790]=n[2905];break}for(m>>>0<(n[2787]|0)>>>0&&(n[2787]=m),u=m+B|0,l=11580;;){if((n[l>>2]|0)==(u|0)){He=153;break}if(o=n[l+8>>2]|0,o)l=o;else break}if((He|0)==153&&!(n[l+12>>2]&8|0)){n[l>>2]=m,M=l+4|0,n[M>>2]=(n[M>>2]|0)+B,M=m+8|0,M=m+(M&7|0?0-M&7:0)|0,l=u+8|0,l=u+(l&7|0?0-l&7:0)|0,_=M+G|0,k=l-M-G|0,n[M+4>>2]=G|3;do if((l|0)!=(T|0)){if((l|0)==(n[2788]|0)){Ge=(n[2785]|0)+k|0,n[2785]=Ge,n[2788]=_,n[_+4>>2]=Ge|1,n[_+Ge>>2]=Ge;break}if(o=n[l+4>>2]|0,(o&3|0)==1){B=o&-8,A=o>>>3;e:do if(o>>>0<256)if(o=n[l+8>>2]|0,u=n[l+12>>2]|0,(u|0)==(o|0)){n[2783]=n[2783]&~(1<<A);break}else{n[o+12>>2]=u,n[u+8>>2]=o;break}else{m=n[l+24>>2]|0,o=n[l+12>>2]|0;do if((o|0)==(l|0)){if(A=l+16|0,u=A+4|0,o=n[u>>2]|0,!o)if(o=n[A>>2]|0,o)u=A;else{o=0;break}for(;;){if(A=o+20|0,d=n[A>>2]|0,d|0){o=d,u=A;continue}if(A=o+16|0,d=n[A>>2]|0,d)o=d,u=A;else break}n[u>>2]=0}else Ge=n[l+8>>2]|0,n[Ge+12>>2]=o,n[o+8>>2]=Ge;while(!1);if(!m)break;u=n[l+28>>2]|0,A=11436+(u<<2)|0;do if((l|0)!=(n[A>>2]|0)){if(n[m+16+(((n[m+16>>2]|0)!=(l|0)&1)<<2)>>2]=o,!o)break e}else{if(n[A>>2]=o,o|0)break;n[2784]=n[2784]&~(1<<u);break e}while(!1);if(n[o+24>>2]=m,u=l+16|0,A=n[u>>2]|0,A|0&&(n[o+16>>2]=A,n[A+24>>2]=o),u=n[u+4>>2]|0,!u)break;n[o+20>>2]=u,n[u+24>>2]=o}while(!1);l=l+B|0,d=B+k|0}else d=k;if(l=l+4|0,n[l>>2]=n[l>>2]&-2,n[_+4>>2]=d|1,n[_+d>>2]=d,l=d>>>3,d>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=_,n[l+12>>2]=_,n[_+8>>2]=l,n[_+12>>2]=u;break}l=d>>>8;do if(!l)l=0;else{if(d>>>0>16777215){l=31;break}He=(l+1048320|0)>>>16&8,Ge=l<<He,ct=(Ge+520192|0)>>>16&4,Ge=Ge<<ct,l=(Ge+245760|0)>>>16&2,l=14-(ct|He|l)+(Ge<<l>>>15)|0,l=d>>>(l+7|0)&1|l<<1}while(!1);if(A=11436+(l<<2)|0,n[_+28>>2]=l,o=_+16|0,n[o+4>>2]=0,n[o>>2]=0,o=n[2784]|0,u=1<<l,!(o&u)){n[2784]=o|u,n[A>>2]=_,n[_+24>>2]=A,n[_+12>>2]=_,n[_+8>>2]=_;break}for(o=d<<((l|0)==31?0:25-(l>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){He=194;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=193;break}}if((He|0)==193){n[A>>2]=_,n[_+24>>2]=u,n[_+12>>2]=_,n[_+8>>2]=_;break}else if((He|0)==194){He=u+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=_,n[He>>2]=_,n[_+8>>2]=Ge,n[_+12>>2]=u,n[_+24>>2]=0;break}}else Ge=(n[2786]|0)+k|0,n[2786]=Ge,n[2789]=_,n[_+4>>2]=Ge|1;while(!1);return Ge=M+8|0,I=Lt,Ge|0}for(l=11580;o=n[l>>2]|0,!(o>>>0<=T>>>0&&(Ge=o+(n[l+4>>2]|0)|0,Ge>>>0>T>>>0));)l=n[l+8>>2]|0;d=Ge+-47|0,o=d+8|0,o=d+(o&7|0?0-o&7:0)|0,d=T+16|0,o=o>>>0<d>>>0?T:o,l=o+8|0,u=m+8|0,u=u&7|0?0-u&7:0,He=m+u|0,u=B+-40-u|0,n[2789]=He,n[2786]=u,n[He+4>>2]=u|1,n[He+u+4>>2]=40,n[2790]=n[2905],u=o+4|0,n[u>>2]=27,n[l>>2]=n[2895],n[l+4>>2]=n[2896],n[l+8>>2]=n[2897],n[l+12>>2]=n[2898],n[2895]=m,n[2896]=B,n[2898]=0,n[2897]=l,l=o+24|0;do He=l,l=l+4|0,n[l>>2]=7;while((He+8|0)>>>0<Ge>>>0);if((o|0)!=(T|0)){if(m=o-T|0,n[u>>2]=n[u>>2]&-2,n[T+4>>2]=m|1,n[o>>2]=m,l=m>>>3,m>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=T,n[l+12>>2]=T,n[T+8>>2]=l,n[T+12>>2]=u;break}if(l=m>>>8,l?m>>>0>16777215?u=31:(He=(l+1048320|0)>>>16&8,Ge=l<<He,ct=(Ge+520192|0)>>>16&4,Ge=Ge<<ct,u=(Ge+245760|0)>>>16&2,u=14-(ct|He|u)+(Ge<<u>>>15)|0,u=m>>>(u+7|0)&1|u<<1):u=0,A=11436+(u<<2)|0,n[T+28>>2]=u,n[T+20>>2]=0,n[d>>2]=0,l=n[2784]|0,o=1<<u,!(l&o)){n[2784]=l|o,n[A>>2]=T,n[T+24>>2]=A,n[T+12>>2]=T,n[T+8>>2]=T;break}for(o=m<<((u|0)==31?0:25-(u>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(m|0)){He=216;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=215;break}}if((He|0)==215){n[A>>2]=T,n[T+24>>2]=u,n[T+12>>2]=T,n[T+8>>2]=T;break}else if((He|0)==216){He=u+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=T,n[He>>2]=T,n[T+8>>2]=Ge,n[T+12>>2]=u,n[T+24>>2]=0;break}}}else{Ge=n[2787]|0,(Ge|0)==0|m>>>0<Ge>>>0&&(n[2787]=m),n[2895]=m,n[2896]=B,n[2898]=0,n[2792]=n[2901],n[2791]=-1,l=0;do Ge=11172+(l<<1<<2)|0,n[Ge+12>>2]=Ge,n[Ge+8>>2]=Ge,l=l+1|0;while((l|0)!=32);Ge=m+8|0,Ge=Ge&7|0?0-Ge&7:0,He=m+Ge|0,Ge=B+-40-Ge|0,n[2789]=He,n[2786]=Ge,n[He+4>>2]=Ge|1,n[He+Ge+4>>2]=40,n[2790]=n[2905]}while(!1);if(l=n[2786]|0,l>>>0>G>>>0)return ct=l-G|0,n[2786]=ct,Ge=n[2789]|0,He=Ge+G|0,n[2789]=He,n[He+4>>2]=ct|1,n[Ge+4>>2]=G|3,Ge=Ge+8|0,I=Lt,Ge|0}return n[(Zy()|0)>>2]=12,Ge=0,I=Lt,Ge|0}function tx(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(o){u=o+-8|0,d=n[2787]|0,o=n[o+-4>>2]|0,l=o&-8,T=u+l|0;do if(o&1)k=u,B=u;else{if(A=n[u>>2]|0,!(o&3)||(B=u+(0-A)|0,m=A+l|0,B>>>0<d>>>0))return;if((B|0)==(n[2788]|0)){if(o=T+4|0,l=n[o>>2]|0,(l&3|0)!=3){k=B,l=m;break}n[2785]=m,n[o>>2]=l&-2,n[B+4>>2]=m|1,n[B+m>>2]=m;return}if(u=A>>>3,A>>>0<256)if(o=n[B+8>>2]|0,l=n[B+12>>2]|0,(l|0)==(o|0)){n[2783]=n[2783]&~(1<<u),k=B,l=m;break}else{n[o+12>>2]=l,n[l+8>>2]=o,k=B,l=m;break}d=n[B+24>>2]|0,o=n[B+12>>2]|0;do if((o|0)==(B|0)){if(u=B+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{o=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0}else k=n[B+8>>2]|0,n[k+12>>2]=o,n[o+8>>2]=k;while(!1);if(d){if(l=n[B+28>>2]|0,u=11436+(l<<2)|0,(B|0)==(n[u>>2]|0)){if(n[u>>2]=o,!o){n[2784]=n[2784]&~(1<<l),k=B,l=m;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(B|0)&1)<<2)>>2]=o,!o){k=B,l=m;break}n[o+24>>2]=d,l=B+16|0,u=n[l>>2]|0,u|0&&(n[o+16>>2]=u,n[u+24>>2]=o),l=n[l+4>>2]|0,l?(n[o+20>>2]=l,n[l+24>>2]=o,k=B,l=m):(k=B,l=m)}else k=B,l=m}while(!1);if(!(B>>>0>=T>>>0)&&(o=T+4|0,A=n[o>>2]|0,!!(A&1))){if(A&2)n[o>>2]=A&-2,n[k+4>>2]=l|1,n[B+l>>2]=l,d=l;else{if(o=n[2788]|0,(T|0)==(n[2789]|0)){if(T=(n[2786]|0)+l|0,n[2786]=T,n[2789]=k,n[k+4>>2]=T|1,(k|0)!=(o|0))return;n[2788]=0,n[2785]=0;return}if((T|0)==(o|0)){T=(n[2785]|0)+l|0,n[2785]=T,n[2788]=B,n[k+4>>2]=T|1,n[B+T>>2]=T;return}d=(A&-8)+l|0,u=A>>>3;do if(A>>>0<256)if(l=n[T+8>>2]|0,o=n[T+12>>2]|0,(o|0)==(l|0)){n[2783]=n[2783]&~(1<<u);break}else{n[l+12>>2]=o,n[o+8>>2]=l;break}else{m=n[T+24>>2]|0,o=n[T+12>>2]|0;do if((o|0)==(T|0)){if(u=T+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{u=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0,u=o}else u=n[T+8>>2]|0,n[u+12>>2]=o,n[o+8>>2]=u,u=o;while(!1);if(m|0){if(o=n[T+28>>2]|0,l=11436+(o<<2)|0,(T|0)==(n[l>>2]|0)){if(n[l>>2]=u,!u){n[2784]=n[2784]&~(1<<o);break}}else if(n[m+16+(((n[m+16>>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=m,o=T+16|0,l=n[o>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),o=n[o+4>>2]|0,o|0&&(n[u+20>>2]=o,n[o+24>>2]=u)}}while(!1);if(n[k+4>>2]=d|1,n[B+d>>2]=d,(k|0)==(n[2788]|0)){n[2785]=d;return}}if(o=d>>>3,d>>>0<256){u=11172+(o<<1<<2)|0,l=n[2783]|0,o=1<<o,l&o?(l=u+8|0,o=n[l>>2]|0):(n[2783]=l|o,o=u,l=u+8|0),n[l>>2]=k,n[o+12>>2]=k,n[k+8>>2]=o,n[k+12>>2]=u;return}o=d>>>8,o?d>>>0>16777215?o=31:(B=(o+1048320|0)>>>16&8,T=o<<B,m=(T+520192|0)>>>16&4,T=T<<m,o=(T+245760|0)>>>16&2,o=14-(m|B|o)+(T<<o>>>15)|0,o=d>>>(o+7|0)&1|o<<1):o=0,A=11436+(o<<2)|0,n[k+28>>2]=o,n[k+20>>2]=0,n[k+16>>2]=0,l=n[2784]|0,u=1<<o;do if(l&u){for(l=d<<((o|0)==31?0:25-(o>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){o=73;break}if(A=u+16+(l>>>31<<2)|0,o=n[A>>2]|0,o)l=l<<1,u=o;else{o=72;break}}if((o|0)==72){n[A>>2]=k,n[k+24>>2]=u,n[k+12>>2]=k,n[k+8>>2]=k;break}else if((o|0)==73){B=u+8|0,T=n[B>>2]|0,n[T+12>>2]=k,n[B>>2]=k,n[k+8>>2]=T,n[k+12>>2]=u,n[k+24>>2]=0;break}}else n[2784]=l|u,n[A>>2]=k,n[k+24>>2]=A,n[k+12>>2]=k,n[k+8>>2]=k;while(!1);if(T=(n[2791]|0)+-1|0,n[2791]=T,!T)o=11588;else return;for(;o=n[o>>2]|0,o;)o=o+8|0;n[2791]=-1}}}function LYe(){return 11628}function MYe(o){o=o|0;var l=0,u=0;return l=I,I=I+16|0,u=l,n[u>>2]=HYe(n[o+60>>2]|0)|0,o=rx(hu(6,u|0)|0)|0,I=l,o|0}function t$(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0;G=I,I=I+48|0,_=G+16|0,m=G,d=G+32|0,k=o+28|0,A=n[k>>2]|0,n[d>>2]=A,T=o+20|0,A=(n[T>>2]|0)-A|0,n[d+4>>2]=A,n[d+8>>2]=l,n[d+12>>2]=u,A=A+u|0,B=o+60|0,n[m>>2]=n[B>>2],n[m+4>>2]=d,n[m+8>>2]=2,m=rx(Ma(146,m|0)|0)|0;e:do if((A|0)!=(m|0)){for(l=2;!((m|0)<0);)if(A=A-m|0,We=n[d+4>>2]|0,ae=m>>>0>We>>>0,d=ae?d+8|0:d,l=(ae<<31>>31)+l|0,We=m-(ae?We:0)|0,n[d>>2]=(n[d>>2]|0)+We,ae=d+4|0,n[ae>>2]=(n[ae>>2]|0)-We,n[_>>2]=n[B>>2],n[_+4>>2]=d,n[_+8>>2]=l,m=rx(Ma(146,_|0)|0)|0,(A|0)==(m|0)){M=3;break e}n[o+16>>2]=0,n[k>>2]=0,n[T>>2]=0,n[o>>2]=n[o>>2]|32,(l|0)==2?u=0:u=u-(n[d+4>>2]|0)|0}else M=3;while(!1);return(M|0)==3&&(We=n[o+44>>2]|0,n[o+16>>2]=We+(n[o+48>>2]|0),n[k>>2]=We,n[T>>2]=We),I=G,u|0}function _Ye(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return d=I,I=I+32|0,m=d,A=d+20|0,n[m>>2]=n[o+60>>2],n[m+4>>2]=0,n[m+8>>2]=l,n[m+12>>2]=A,n[m+16>>2]=u,(rx(La(140,m|0)|0)|0)<0?(n[A>>2]=-1,o=-1):o=n[A>>2]|0,I=d,o|0}function rx(o){return o=o|0,o>>>0>4294963200&&(n[(Zy()|0)>>2]=0-o,o=-1),o|0}function Zy(){return(UYe()|0)+64|0}function UYe(){return m_()|0}function m_(){return 2084}function HYe(o){return o=o|0,o|0}function jYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return d=I,I=I+32|0,A=d,n[o+36>>2]=1,!(n[o>>2]&64|0)&&(n[A>>2]=n[o+60>>2],n[A+4>>2]=21523,n[A+8>>2]=d+16,io(54,A|0)|0)&&(s[o+75>>0]=-1),A=t$(o,l,u)|0,I=d,A|0}function r$(o,l){o=o|0,l=l|0;var u=0,A=0;if(u=s[o>>0]|0,A=s[l>>0]|0,!(u<<24>>24)||u<<24>>24!=A<<24>>24)o=A;else{do o=o+1|0,l=l+1|0,u=s[o>>0]|0,A=s[l>>0]|0;while(!(!(u<<24>>24)||u<<24>>24!=A<<24>>24));o=A}return(u&255)-(o&255)|0}function qYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;e:do if(!u)o=0;else{for(;A=s[o>>0]|0,d=s[l>>0]|0,A<<24>>24==d<<24>>24;)if(u=u+-1|0,u)o=o+1|0,l=l+1|0;else{o=0;break e}o=(A&255)-(d&255)|0}while(!1);return o|0}function n$(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0;Qe=I,I=I+224|0,M=Qe+120|0,G=Qe+80|0,We=Qe,Le=Qe+136|0,A=G,d=A+40|0;do n[A>>2]=0,A=A+4|0;while((A|0)<(d|0));return n[M>>2]=n[u>>2],(y_(0,l,M,We,G)|0)<0?u=-1:((n[o+76>>2]|0)>-1?ae=GYe(o)|0:ae=0,u=n[o>>2]|0,_=u&32,(s[o+74>>0]|0)<1&&(n[o>>2]=u&-33),A=o+48|0,n[A>>2]|0?u=y_(o,l,M,We,G)|0:(d=o+44|0,m=n[d>>2]|0,n[d>>2]=Le,B=o+28|0,n[B>>2]=Le,k=o+20|0,n[k>>2]=Le,n[A>>2]=80,T=o+16|0,n[T>>2]=Le+80,u=y_(o,l,M,We,G)|0,m&&(ox[n[o+36>>2]&7](o,0,0)|0,u=n[k>>2]|0?u:-1,n[d>>2]=m,n[A>>2]=0,n[T>>2]=0,n[B>>2]=0,n[k>>2]=0)),A=n[o>>2]|0,n[o>>2]=A|_,ae|0&&WYe(o),u=A&32|0?-1:u),I=Qe,u|0}function y_(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0;cr=I,I=I+64|0,fr=cr+16|0,$t=cr,Lt=cr+24|0,Tr=cr+8|0,Hr=cr+20|0,n[fr>>2]=l,ct=(o|0)!=0,He=Lt+40|0,Ge=He,Lt=Lt+39|0,qr=Tr+4|0,B=0,m=0,M=0;e:for(;;){do if((m|0)>-1)if((B|0)>(2147483647-m|0)){n[(Zy()|0)>>2]=75,m=-1;break}else{m=B+m|0;break}while(!1);if(B=s[l>>0]|0,B<<24>>24)k=l;else{Ze=87;break}t:for(;;){switch(B<<24>>24){case 37:{B=k,Ze=9;break t}case 0:{B=k;break t}default:}tt=k+1|0,n[fr>>2]=tt,B=s[tt>>0]|0,k=tt}t:do if((Ze|0)==9)for(;;){if(Ze=0,(s[k+1>>0]|0)!=37)break t;if(B=B+1|0,k=k+2|0,n[fr>>2]=k,(s[k>>0]|0)==37)Ze=9;else break}while(!1);if(B=B-l|0,ct&&Ss(o,l,B),B|0){l=k;continue}T=k+1|0,B=(s[T>>0]|0)+-48|0,B>>>0<10?(tt=(s[k+2>>0]|0)==36,Qe=tt?B:-1,M=tt?1:M,T=tt?k+3|0:T):Qe=-1,n[fr>>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0;t:do if(k>>>0<32)for(_=0,G=B;;){if(B=1<<k,!(B&75913)){B=G;break t}if(_=B|_,T=T+1|0,n[fr>>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0,k>>>0>=32)break;G=B}else _=0;while(!1);if(B<<24>>24==42){if(k=T+1|0,B=(s[k>>0]|0)+-48|0,B>>>0<10&&(s[T+2>>0]|0)==36)n[d+(B<<2)>>2]=10,B=n[A+((s[k>>0]|0)+-48<<3)>>2]|0,M=1,T=T+3|0;else{if(M|0){m=-1;break}ct?(M=(n[u>>2]|0)+3&-4,B=n[M>>2]|0,n[u>>2]=M+4,M=0,T=k):(B=0,M=0,T=k)}n[fr>>2]=T,tt=(B|0)<0,B=tt?0-B|0:B,_=tt?_|8192:_}else{if(B=i$(fr)|0,(B|0)<0){m=-1;break}T=n[fr>>2]|0}do if((s[T>>0]|0)==46){if((s[T+1>>0]|0)!=42){n[fr>>2]=T+1,k=i$(fr)|0,T=n[fr>>2]|0;break}if(G=T+2|0,k=(s[G>>0]|0)+-48|0,k>>>0<10&&(s[T+3>>0]|0)==36){n[d+(k<<2)>>2]=10,k=n[A+((s[G>>0]|0)+-48<<3)>>2]|0,T=T+4|0,n[fr>>2]=T;break}if(M|0){m=-1;break e}ct?(tt=(n[u>>2]|0)+3&-4,k=n[tt>>2]|0,n[u>>2]=tt+4):k=0,n[fr>>2]=G,T=G}else k=-1;while(!1);for(Le=0;;){if(((s[T>>0]|0)+-65|0)>>>0>57){m=-1;break e}if(tt=T+1|0,n[fr>>2]=tt,G=s[(s[T>>0]|0)+-65+(5178+(Le*58|0))>>0]|0,ae=G&255,(ae+-1|0)>>>0<8)Le=ae,T=tt;else break}if(!(G<<24>>24)){m=-1;break}We=(Qe|0)>-1;do if(G<<24>>24==19)if(We){m=-1;break e}else Ze=49;else{if(We){n[d+(Qe<<2)>>2]=ae,We=A+(Qe<<3)|0,Qe=n[We+4>>2]|0,Ze=$t,n[Ze>>2]=n[We>>2],n[Ze+4>>2]=Qe,Ze=49;break}if(!ct){m=0;break e}s$($t,ae,u)}while(!1);if((Ze|0)==49&&(Ze=0,!ct)){B=0,l=tt;continue}T=s[T>>0]|0,T=(Le|0)!=0&(T&15|0)==3?T&-33:T,We=_&-65537,Qe=_&8192|0?We:_;t:do switch(T|0){case 110:switch((Le&255)<<24>>24){case 0:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 1:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 2:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}case 3:{a[n[$t>>2]>>1]=m,B=0,l=tt;continue e}case 4:{s[n[$t>>2]>>0]=m,B=0,l=tt;continue e}case 6:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 7:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}default:{B=0,l=tt;continue e}}case 112:{T=120,k=k>>>0>8?k:8,l=Qe|8,Ze=61;break}case 88:case 120:{l=Qe,Ze=61;break}case 111:{T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,ae=VYe(l,T,He)|0,We=Ge-ae|0,_=0,G=5642,k=(Qe&8|0)==0|(k|0)>(We|0)?k:We+1|0,We=Qe,Ze=67;break}case 105:case 100:if(T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,(T|0)<0){l=nx(0,0,l|0,T|0)|0,T=Ee,_=$t,n[_>>2]=l,n[_+4>>2]=T,_=1,G=5642,Ze=66;break t}else{_=(Qe&2049|0)!=0&1,G=Qe&2048|0?5643:Qe&1|0?5644:5642,Ze=66;break t}case 117:{T=$t,_=0,G=5642,l=n[T>>2]|0,T=n[T+4>>2]|0,Ze=66;break}case 99:{s[Lt>>0]=n[$t>>2],l=Lt,_=0,G=5642,ae=He,T=1,k=We;break}case 109:{T=KYe(n[(Zy()|0)>>2]|0)|0,Ze=71;break}case 115:{T=n[$t>>2]|0,T=T|0?T:5652,Ze=71;break}case 67:{n[Tr>>2]=n[$t>>2],n[qr>>2]=0,n[$t>>2]=Tr,ae=-1,T=Tr,Ze=75;break}case 83:{l=n[$t>>2]|0,k?(ae=k,T=l,Ze=75):(Ms(o,32,B,0,Qe),l=0,Ze=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{B=zYe(o,+E[$t>>3],B,k,Qe,T)|0,l=tt;continue e}default:_=0,G=5642,ae=He,T=k,k=Qe}while(!1);t:do if((Ze|0)==61)Qe=$t,Le=n[Qe>>2]|0,Qe=n[Qe+4>>2]|0,ae=YYe(Le,Qe,He,T&32)|0,G=(l&8|0)==0|(Le|0)==0&(Qe|0)==0,_=G?0:2,G=G?5642:5642+(T>>4)|0,We=l,l=Le,T=Qe,Ze=67;else if((Ze|0)==66)ae=Xy(l,T,He)|0,We=Qe,Ze=67;else if((Ze|0)==71)Ze=0,Qe=JYe(T,0,k)|0,Le=(Qe|0)==0,l=T,_=0,G=5642,ae=Le?T+k|0:Qe,T=Le?k:Qe-T|0,k=We;else if((Ze|0)==75){for(Ze=0,G=T,l=0,k=0;_=n[G>>2]|0,!(!_||(k=o$(Hr,_)|0,(k|0)<0|k>>>0>(ae-l|0)>>>0));)if(l=k+l|0,ae>>>0>l>>>0)G=G+4|0;else break;if((k|0)<0){m=-1;break e}if(Ms(o,32,B,l,Qe),!l)l=0,Ze=84;else for(_=0;;){if(k=n[T>>2]|0,!k){Ze=84;break t}if(k=o$(Hr,k)|0,_=k+_|0,(_|0)>(l|0)){Ze=84;break t}if(Ss(o,Hr,k),_>>>0>=l>>>0){Ze=84;break}else T=T+4|0}}while(!1);if((Ze|0)==67)Ze=0,T=(l|0)!=0|(T|0)!=0,Qe=(k|0)!=0|T,T=((T^1)&1)+(Ge-ae)|0,l=Qe?ae:He,ae=He,T=Qe?(k|0)>(T|0)?k:T:k,k=(k|0)>-1?We&-65537:We;else if((Ze|0)==84){Ze=0,Ms(o,32,B,l,Qe^8192),B=(B|0)>(l|0)?B:l,l=tt;continue}Le=ae-l|0,We=(T|0)<(Le|0)?Le:T,Qe=We+_|0,B=(B|0)<(Qe|0)?Qe:B,Ms(o,32,B,Qe,k),Ss(o,G,_),Ms(o,48,B,Qe,k^65536),Ms(o,48,We,Le,0),Ss(o,l,Le),Ms(o,32,B,Qe,k^8192),l=tt}e:do if((Ze|0)==87&&!o)if(!M)m=0;else{for(m=1;l=n[d+(m<<2)>>2]|0,!!l;)if(s$(A+(m<<3)|0,l,u),m=m+1|0,(m|0)>=10){m=1;break e}for(;;){if(n[d+(m<<2)>>2]|0){m=-1;break e}if(m=m+1|0,(m|0)>=10){m=1;break}}}while(!1);return I=cr,m|0}function GYe(o){return o=o|0,0}function WYe(o){o=o|0}function Ss(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]&32||sVe(l,u,o)|0}function i$(o){o=o|0;var l=0,u=0,A=0;if(u=n[o>>2]|0,A=(s[u>>0]|0)+-48|0,A>>>0<10){l=0;do l=A+(l*10|0)|0,u=u+1|0,n[o>>2]=u,A=(s[u>>0]|0)+-48|0;while(A>>>0<10)}else l=0;return l|0}function s$(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;e:do if(l>>>0<=20)do switch(l|0){case 9:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,n[o>>2]=l;break e}case 10:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=((l|0)<0)<<31>>31;break e}case 11:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=0;break e}case 12:{A=(n[u>>2]|0)+7&-8,l=A,d=n[l>>2]|0,l=n[l+4>>2]|0,n[u>>2]=A+8,A=o,n[A>>2]=d,n[A+4>>2]=l;break e}case 13:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&65535)<<16>>16,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 14:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&65535,n[d+4>>2]=0;break e}case 15:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&255)<<24>>24,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 16:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&255,n[d+4>>2]=0;break e}case 17:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}case 18:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}default:break e}while(!1);while(!1)}function YYe(o,l,u,A){if(o=o|0,l=l|0,u=u|0,A=A|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=c[5694+(o&15)>>0]|0|A,o=ix(o|0,l|0,4)|0,l=Ee;while(!((o|0)==0&(l|0)==0));return u|0}function VYe(o,l,u){if(o=o|0,l=l|0,u=u|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=o&7|48,o=ix(o|0,l|0,3)|0,l=Ee;while(!((o|0)==0&(l|0)==0));return u|0}function Xy(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if(l>>>0>0|(l|0)==0&o>>>0>4294967295){for(;A=w_(o|0,l|0,10,0)|0,u=u+-1|0,s[u>>0]=A&255|48,A=o,o=C_(o|0,l|0,10,0)|0,l>>>0>9|(l|0)==9&A>>>0>4294967295;)l=Ee;l=o}else l=o;if(l)for(;u=u+-1|0,s[u>>0]=(l>>>0)%10|0|48,!(l>>>0<10);)l=(l>>>0)/10|0;return u|0}function KYe(o){return o=o|0,tVe(o,n[(eVe()|0)+188>>2]|0)|0}function JYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;m=l&255,A=(u|0)!=0;e:do if(A&(o&3|0)!=0)for(d=l&255;;){if((s[o>>0]|0)==d<<24>>24){B=6;break e}if(o=o+1|0,u=u+-1|0,A=(u|0)!=0,!(A&(o&3|0)!=0)){B=5;break}}else B=5;while(!1);(B|0)==5&&(A?B=6:u=0);e:do if((B|0)==6&&(d=l&255,(s[o>>0]|0)!=d<<24>>24)){A=_e(m,16843009)|0;t:do if(u>>>0>3){for(;m=n[o>>2]^A,!((m&-2139062144^-2139062144)&m+-16843009|0);)if(o=o+4|0,u=u+-4|0,u>>>0<=3){B=11;break t}}else B=11;while(!1);if((B|0)==11&&!u){u=0;break}for(;;){if((s[o>>0]|0)==d<<24>>24)break e;if(o=o+1|0,u=u+-1|0,!u){u=0;break}}}while(!1);return(u|0?o:0)|0}function Ms(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0;if(B=I,I=I+256|0,m=B,(u|0)>(A|0)&(d&73728|0)==0){if(d=u-A|0,eE(m|0,l|0,(d>>>0<256?d:256)|0)|0,d>>>0>255){l=u-A|0;do Ss(o,m,256),d=d+-256|0;while(d>>>0>255);d=l&255}Ss(o,m,d)}I=B}function o$(o,l){return o=o|0,l=l|0,o?o=XYe(o,l,0)|0:o=0,o|0}function zYe(o,l,u,A,d,m){o=o|0,l=+l,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0;Hn=I,I=I+560|0,T=Hn+8|0,tt=Hn,cr=Hn+524|0,Hr=cr,_=Hn+512|0,n[tt>>2]=0,Tr=_+12|0,a$(l)|0,(Ee|0)<0?(l=-l,fr=1,qr=5659):(fr=(d&2049|0)!=0&1,qr=d&2048|0?5662:d&1|0?5665:5660),a$(l)|0,$t=Ee&2146435072;do if($t>>>0<2146435072|($t|0)==2146435072&!1){if(We=+ZYe(l,tt)*2,B=We!=0,B&&(n[tt>>2]=(n[tt>>2]|0)+-1),ct=m|32,(ct|0)==97){Le=m&32,ae=Le|0?qr+9|0:qr,G=fr|2,B=12-A|0;do if(A>>>0>11|(B|0)==0)l=We;else{l=8;do B=B+-1|0,l=l*16;while(B|0);if((s[ae>>0]|0)==45){l=-(l+(-We-l));break}else{l=We+l-l;break}}while(!1);k=n[tt>>2]|0,B=(k|0)<0?0-k|0:k,B=Xy(B,((B|0)<0)<<31>>31,Tr)|0,(B|0)==(Tr|0)&&(B=_+11|0,s[B>>0]=48),s[B+-1>>0]=(k>>31&2)+43,M=B+-2|0,s[M>>0]=m+15,_=(A|0)<1,T=(d&8|0)==0,B=cr;do $t=~~l,k=B+1|0,s[B>>0]=c[5694+$t>>0]|Le,l=(l-+($t|0))*16,(k-Hr|0)==1&&!(T&(_&l==0))?(s[k>>0]=46,B=B+2|0):B=k;while(l!=0);$t=B-Hr|0,Hr=Tr-M|0,Tr=(A|0)!=0&($t+-2|0)<(A|0)?A+2|0:$t,B=Hr+G+Tr|0,Ms(o,32,u,B,d),Ss(o,ae,G),Ms(o,48,u,B,d^65536),Ss(o,cr,$t),Ms(o,48,Tr-$t|0,0,0),Ss(o,M,Hr),Ms(o,32,u,B,d^8192);break}k=(A|0)<0?6:A,B?(B=(n[tt>>2]|0)+-28|0,n[tt>>2]=B,l=We*268435456):(l=We,B=n[tt>>2]|0),$t=(B|0)<0?T:T+288|0,T=$t;do Ge=~~l>>>0,n[T>>2]=Ge,T=T+4|0,l=(l-+(Ge>>>0))*1e9;while(l!=0);if((B|0)>0)for(_=$t,G=T;;){if(M=(B|0)<29?B:29,B=G+-4|0,B>>>0>=_>>>0){T=0;do He=p$(n[B>>2]|0,0,M|0)|0,He=I_(He|0,Ee|0,T|0,0)|0,Ge=Ee,Ze=w_(He|0,Ge|0,1e9,0)|0,n[B>>2]=Ze,T=C_(He|0,Ge|0,1e9,0)|0,B=B+-4|0;while(B>>>0>=_>>>0);T&&(_=_+-4|0,n[_>>2]=T)}for(T=G;!(T>>>0<=_>>>0);)if(B=T+-4|0,!(n[B>>2]|0))T=B;else break;if(B=(n[tt>>2]|0)-M|0,n[tt>>2]=B,(B|0)>0)G=T;else break}else _=$t;if((B|0)<0){A=((k+25|0)/9|0)+1|0,Qe=(ct|0)==102;do{if(Le=0-B|0,Le=(Le|0)<9?Le:9,_>>>0<T>>>0){M=(1<<Le)+-1|0,G=1e9>>>Le,ae=0,B=_;do Ge=n[B>>2]|0,n[B>>2]=(Ge>>>Le)+ae,ae=_e(Ge&M,G)|0,B=B+4|0;while(B>>>0<T>>>0);B=n[_>>2]|0?_:_+4|0,ae?(n[T>>2]=ae,_=B,B=T+4|0):(_=B,B=T)}else _=n[_>>2]|0?_:_+4|0,B=T;T=Qe?$t:_,T=(B-T>>2|0)>(A|0)?T+(A<<2)|0:B,B=(n[tt>>2]|0)+Le|0,n[tt>>2]=B}while((B|0)<0);B=_,A=T}else B=_,A=T;if(Ge=$t,B>>>0<A>>>0){if(T=(Ge-B>>2)*9|0,M=n[B>>2]|0,M>>>0>=10){_=10;do _=_*10|0,T=T+1|0;while(M>>>0>=_>>>0)}}else T=0;if(Qe=(ct|0)==103,Ze=(k|0)!=0,_=k-((ct|0)!=102?T:0)+((Ze&Qe)<<31>>31)|0,(_|0)<(((A-Ge>>2)*9|0)+-9|0)){if(_=_+9216|0,Le=$t+4+(((_|0)/9|0)+-1024<<2)|0,_=((_|0)%9|0)+1|0,(_|0)<9){M=10;do M=M*10|0,_=_+1|0;while((_|0)!=9)}else M=10;if(G=n[Le>>2]|0,ae=(G>>>0)%(M>>>0)|0,_=(Le+4|0)==(A|0),_&(ae|0)==0)_=Le;else if(We=((G>>>0)/(M>>>0)|0)&1|0?9007199254740994:9007199254740992,He=(M|0)/2|0,l=ae>>>0<He>>>0?.5:_&(ae|0)==(He|0)?1:1.5,fr&&(He=(s[qr>>0]|0)==45,l=He?-l:l,We=He?-We:We),_=G-ae|0,n[Le>>2]=_,We+l!=We){if(He=_+M|0,n[Le>>2]=He,He>>>0>999999999)for(T=Le;_=T+-4|0,n[T>>2]=0,_>>>0<B>>>0&&(B=B+-4|0,n[B>>2]=0),He=(n[_>>2]|0)+1|0,n[_>>2]=He,He>>>0>999999999;)T=_;else _=Le;if(T=(Ge-B>>2)*9|0,G=n[B>>2]|0,G>>>0>=10){M=10;do M=M*10|0,T=T+1|0;while(G>>>0>=M>>>0)}}else _=Le;_=_+4|0,_=A>>>0>_>>>0?_:A,He=B}else _=A,He=B;for(ct=_;;){if(ct>>>0<=He>>>0){tt=0;break}if(B=ct+-4|0,!(n[B>>2]|0))ct=B;else{tt=1;break}}A=0-T|0;do if(Qe)if(B=((Ze^1)&1)+k|0,(B|0)>(T|0)&(T|0)>-5?(M=m+-1|0,k=B+-1-T|0):(M=m+-2|0,k=B+-1|0),B=d&8,B)Le=B;else{if(tt&&(Lt=n[ct+-4>>2]|0,(Lt|0)!=0))if((Lt>>>0)%10|0)_=0;else{_=0,B=10;do B=B*10|0,_=_+1|0;while(!((Lt>>>0)%(B>>>0)|0|0))}else _=9;if(B=((ct-Ge>>2)*9|0)+-9|0,(M|32|0)==102){Le=B-_|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}else{Le=B+T-_|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}}else M=m,Le=d&8;while(!1);if(Qe=k|Le,G=(Qe|0)!=0&1,ae=(M|32|0)==102,ae)Ze=0,B=(T|0)>0?T:0;else{if(B=(T|0)<0?A:T,B=Xy(B,((B|0)<0)<<31>>31,Tr)|0,_=Tr,(_-B|0)<2)do B=B+-1|0,s[B>>0]=48;while((_-B|0)<2);s[B+-1>>0]=(T>>31&2)+43,B=B+-2|0,s[B>>0]=M,Ze=B,B=_-B|0}if(B=fr+1+k+G+B|0,Ms(o,32,u,B,d),Ss(o,qr,fr),Ms(o,48,u,B,d^65536),ae){M=He>>>0>$t>>>0?$t:He,Le=cr+9|0,G=Le,ae=cr+8|0,_=M;do{if(T=Xy(n[_>>2]|0,0,Le)|0,(_|0)==(M|0))(T|0)==(Le|0)&&(s[ae>>0]=48,T=ae);else if(T>>>0>cr>>>0){eE(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}Ss(o,T,G-T|0),_=_+4|0}while(_>>>0<=$t>>>0);if(Qe|0&&Ss(o,5710,1),_>>>0<ct>>>0&(k|0)>0)for(;;){if(T=Xy(n[_>>2]|0,0,Le)|0,T>>>0>cr>>>0){eE(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}if(Ss(o,T,(k|0)<9?k:9),_=_+4|0,T=k+-9|0,_>>>0<ct>>>0&(k|0)>9)k=T;else{k=T;break}}Ms(o,48,k+9|0,9,0)}else{if(Qe=tt?ct:He+4|0,(k|0)>-1){tt=cr+9|0,Le=(Le|0)==0,A=tt,G=0-Hr|0,ae=cr+8|0,M=He;do{T=Xy(n[M>>2]|0,0,tt)|0,(T|0)==(tt|0)&&(s[ae>>0]=48,T=ae);do if((M|0)==(He|0)){if(_=T+1|0,Ss(o,T,1),Le&(k|0)<1){T=_;break}Ss(o,5710,1),T=_}else{if(T>>>0<=cr>>>0)break;eE(cr|0,48,T+G|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}while(!1);Hr=A-T|0,Ss(o,T,(k|0)>(Hr|0)?Hr:k),k=k-Hr|0,M=M+4|0}while(M>>>0<Qe>>>0&(k|0)>-1)}Ms(o,48,k+18|0,18,0),Ss(o,Ze,Tr-Ze|0)}Ms(o,32,u,B,d^8192)}else cr=(m&32|0)!=0,B=fr+3|0,Ms(o,32,u,B,d&-65537),Ss(o,qr,fr),Ss(o,l!=l|!1?cr?5686:5690:cr?5678:5682,3),Ms(o,32,u,B,d^8192);while(!1);return I=Hn,((B|0)<(u|0)?u:B)|0}function a$(o){o=+o;var l=0;return E[S>>3]=o,l=n[S>>2]|0,Ee=n[S+4>>2]|0,l|0}function ZYe(o,l){return o=+o,l=l|0,+ +l$(o,l)}function l$(o,l){o=+o,l=l|0;var u=0,A=0,d=0;switch(E[S>>3]=o,u=n[S>>2]|0,A=n[S+4>>2]|0,d=ix(u|0,A|0,52)|0,d&2047){case 0:{o!=0?(o=+l$(o*18446744073709552e3,l),u=(n[l>>2]|0)+-64|0):u=0,n[l>>2]=u;break}case 2047:break;default:n[l>>2]=(d&2047)+-1022,n[S>>2]=u,n[S+4>>2]=A&-2146435073|1071644672,o=+E[S>>3]}return+o}function XYe(o,l,u){o=o|0,l=l|0,u=u|0;do if(o){if(l>>>0<128){s[o>>0]=l,o=1;break}if(!(n[n[($Ye()|0)+188>>2]>>2]|0))if((l&-128|0)==57216){s[o>>0]=l,o=1;break}else{n[(Zy()|0)>>2]=84,o=-1;break}if(l>>>0<2048){s[o>>0]=l>>>6|192,s[o+1>>0]=l&63|128,o=2;break}if(l>>>0<55296|(l&-8192|0)==57344){s[o>>0]=l>>>12|224,s[o+1>>0]=l>>>6&63|128,s[o+2>>0]=l&63|128,o=3;break}if((l+-65536|0)>>>0<1048576){s[o>>0]=l>>>18|240,s[o+1>>0]=l>>>12&63|128,s[o+2>>0]=l>>>6&63|128,s[o+3>>0]=l&63|128,o=4;break}else{n[(Zy()|0)>>2]=84,o=-1;break}}else o=1;while(!1);return o|0}function $Ye(){return m_()|0}function eVe(){return m_()|0}function tVe(o,l){o=o|0,l=l|0;var u=0,A=0;for(A=0;;){if((c[5712+A>>0]|0)==(o|0)){o=2;break}if(u=A+1|0,(u|0)==87){u=5800,A=87,o=5;break}else A=u}if((o|0)==2&&(A?(u=5800,o=5):u=5800),(o|0)==5)for(;;){do o=u,u=u+1|0;while(s[o>>0]|0);if(A=A+-1|0,A)o=5;else break}return rVe(u,n[l+20>>2]|0)|0}function rVe(o,l){return o=o|0,l=l|0,nVe(o,l)|0}function nVe(o,l){return o=o|0,l=l|0,l?l=iVe(n[l>>2]|0,n[l+4>>2]|0,o)|0:l=0,(l|0?l:o)|0}function iVe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;ae=(n[o>>2]|0)+1794895138|0,m=pd(n[o+8>>2]|0,ae)|0,A=pd(n[o+12>>2]|0,ae)|0,d=pd(n[o+16>>2]|0,ae)|0;e:do if(m>>>0<l>>>2>>>0&&(G=l-(m<<2)|0,A>>>0<G>>>0&d>>>0<G>>>0)&&!((d|A)&3|0)){for(G=A>>>2,M=d>>>2,_=0;;){if(k=m>>>1,T=_+k|0,B=T<<1,d=B+G|0,A=pd(n[o+(d<<2)>>2]|0,ae)|0,d=pd(n[o+(d+1<<2)>>2]|0,ae)|0,!(d>>>0<l>>>0&A>>>0<(l-d|0)>>>0)){A=0;break e}if(s[o+(d+A)>>0]|0){A=0;break e}if(A=r$(u,o+d|0)|0,!A)break;if(A=(A|0)<0,(m|0)==1){A=0;break e}else _=A?_:T,m=A?k:m-k|0}A=B+M|0,d=pd(n[o+(A<<2)>>2]|0,ae)|0,A=pd(n[o+(A+1<<2)>>2]|0,ae)|0,A>>>0<l>>>0&d>>>0<(l-A|0)>>>0?A=s[o+(A+d)>>0]|0?0:o+A|0:A=0}else A=0;while(!1);return A|0}function pd(o,l){o=o|0,l=l|0;var u=0;return u=d$(o|0)|0,(l|0?u:o)|0}function sVe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=u+16|0,d=n[A>>2]|0,d?m=5:oVe(u)|0?A=0:(d=n[A>>2]|0,m=5);e:do if((m|0)==5){if(k=u+20|0,B=n[k>>2]|0,A=B,(d-B|0)>>>0<l>>>0){A=ox[n[u+36>>2]&7](u,o,l)|0;break}t:do if((s[u+75>>0]|0)>-1){for(B=l;;){if(!B){m=0,d=o;break t}if(d=B+-1|0,(s[o+d>>0]|0)==10)break;B=d}if(A=ox[n[u+36>>2]&7](u,o,B)|0,A>>>0<B>>>0)break e;m=B,d=o+B|0,l=l-B|0,A=n[k>>2]|0}else m=0,d=o;while(!1);Qr(A|0,d|0,l|0)|0,n[k>>2]=(n[k>>2]|0)+l,A=m+l|0}while(!1);return A|0}function oVe(o){o=o|0;var l=0,u=0;return l=o+74|0,u=s[l>>0]|0,s[l>>0]=u+255|u,l=n[o>>2]|0,l&8?(n[o>>2]=l|32,o=-1):(n[o+8>>2]=0,n[o+4>>2]=0,u=n[o+44>>2]|0,n[o+28>>2]=u,n[o+20>>2]=u,n[o+16>>2]=u+(n[o+48>>2]|0),o=0),o|0}function $n(o,l){o=y(o),l=y(l);var u=0,A=0;u=c$(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=c$(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?l:o;break}else{o=o<l?l:o;break}}else o=l;while(!1);return y(o)}function c$(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function hd(o,l){o=y(o),l=y(l);var u=0,A=0;u=u$(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=u$(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?o:l;break}else{o=o<l?o:l;break}}else o=l;while(!1);return y(o)}function u$(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function E_(o,l){o=y(o),l=y(l);var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;m=(h[S>>2]=o,n[S>>2]|0),k=(h[S>>2]=l,n[S>>2]|0),u=m>>>23&255,B=k>>>23&255,T=m&-2147483648,d=k<<1;e:do if(d|0&&!((u|0)==255|((aVe(l)|0)&2147483647)>>>0>2139095040)){if(A=m<<1,A>>>0<=d>>>0)return l=y(o*y(0)),y((A|0)==(d|0)?l:o);if(u)A=m&8388607|8388608;else{if(u=m<<9,(u|0)>-1){A=u,u=0;do u=u+-1|0,A=A<<1;while((A|0)>-1)}else u=0;A=m<<1-u}if(B)k=k&8388607|8388608;else{if(m=k<<9,(m|0)>-1){d=0;do d=d+-1|0,m=m<<1;while((m|0)>-1)}else d=0;B=d,k=k<<1-d}d=A-k|0,m=(d|0)>-1;t:do if((u|0)>(B|0)){for(;;){if(m)if(d)A=d;else break;if(A=A<<1,u=u+-1|0,d=A-k|0,m=(d|0)>-1,(u|0)<=(B|0))break t}l=y(o*y(0));break e}while(!1);if(m)if(d)A=d;else{l=y(o*y(0));break}if(A>>>0<8388608)do A=A<<1,u=u+-1|0;while(A>>>0<8388608);(u|0)>0?u=A+-8388608|u<<23:u=A>>>(1-u|0),l=(n[S>>2]=u|T,y(h[S>>2]))}else _=3;while(!1);return(_|0)==3&&(l=y(o*l),l=y(l/l)),y(l)}function aVe(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function lVe(o,l){return o=o|0,l=l|0,n$(n[582]|0,o,l)|0}function sn(o){o=o|0,Nt()}function $y(o){o=o|0}function cVe(o,l){return o=o|0,l=l|0,0}function uVe(o){return o=o|0,(f$(o+4|0)|0)==-1?(op[n[(n[o>>2]|0)+8>>2]&127](o),o=1):o=0,o|0}function f$(o){o=o|0;var l=0;return l=n[o>>2]|0,n[o>>2]=l+-1,l+-1|0}function Yh(o){o=o|0,uVe(o)|0&&fVe(o)}function fVe(o){o=o|0;var l=0;l=o+8|0,n[l>>2]|0&&(f$(l)|0)!=-1||op[n[(n[o>>2]|0)+16>>2]&127](o)}function Jt(o){o=o|0;var l=0;for(l=o|0?o:1;o=ex(l)|0,!(o|0);){if(o=pVe()|0,!o){o=0;break}D$[o&0]()}return o|0}function A$(o){return o=o|0,Jt(o)|0}function yt(o){o=o|0,tx(o)}function AVe(o){o=o|0,(s[o+11>>0]|0)<0&&yt(n[o>>2]|0)}function pVe(){var o=0;return o=n[2923]|0,n[2923]=o+0,o|0}function hVe(){}function nx(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,A=l-A-(u>>>0>o>>>0|0)>>>0,Ee=A,o-u>>>0|0|0}function I_(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,u=o+u>>>0,Ee=l+A+(u>>>0<o>>>0|0)>>>0,u|0|0}function eE(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;if(m=o+u|0,l=l&255,(u|0)>=67){for(;o&3;)s[o>>0]=l,o=o+1|0;for(A=m&-4|0,d=A-64|0,B=l|l<<8|l<<16|l<<24;(o|0)<=(d|0);)n[o>>2]=B,n[o+4>>2]=B,n[o+8>>2]=B,n[o+12>>2]=B,n[o+16>>2]=B,n[o+20>>2]=B,n[o+24>>2]=B,n[o+28>>2]=B,n[o+32>>2]=B,n[o+36>>2]=B,n[o+40>>2]=B,n[o+44>>2]=B,n[o+48>>2]=B,n[o+52>>2]=B,n[o+56>>2]=B,n[o+60>>2]=B,o=o+64|0;for(;(o|0)<(A|0);)n[o>>2]=B,o=o+4|0}for(;(o|0)<(m|0);)s[o>>0]=l,o=o+1|0;return m-u|0}function p$(o,l,u){return o=o|0,l=l|0,u=u|0,(u|0)<32?(Ee=l<<u|(o&(1<<u)-1<<32-u)>>>32-u,o<<u):(Ee=o<<u-32,0)}function ix(o,l,u){return o=o|0,l=l|0,u=u|0,(u|0)<32?(Ee=l>>>u,o>>>u|(l&(1<<u)-1)<<32-u):(Ee=0,l>>>u-32|0)}function Qr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;if((u|0)>=8192)return MA(o|0,l|0,u|0)|0;if(m=o|0,d=o+u|0,(o&3)==(l&3)){for(;o&3;){if(!u)return m|0;s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0,u=u-1|0}for(u=d&-4|0,A=u-64|0;(o|0)<=(A|0);)n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2],n[o+16>>2]=n[l+16>>2],n[o+20>>2]=n[l+20>>2],n[o+24>>2]=n[l+24>>2],n[o+28>>2]=n[l+28>>2],n[o+32>>2]=n[l+32>>2],n[o+36>>2]=n[l+36>>2],n[o+40>>2]=n[l+40>>2],n[o+44>>2]=n[l+44>>2],n[o+48>>2]=n[l+48>>2],n[o+52>>2]=n[l+52>>2],n[o+56>>2]=n[l+56>>2],n[o+60>>2]=n[l+60>>2],o=o+64|0,l=l+64|0;for(;(o|0)<(u|0);)n[o>>2]=n[l>>2],o=o+4|0,l=l+4|0}else for(u=d-4|0;(o|0)<(u|0);)s[o>>0]=s[l>>0]|0,s[o+1>>0]=s[l+1>>0]|0,s[o+2>>0]=s[l+2>>0]|0,s[o+3>>0]=s[l+3>>0]|0,o=o+4|0,l=l+4|0;for(;(o|0)<(d|0);)s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0;return m|0}function h$(o){o=o|0;var l=0;return l=s[N+(o&255)>>0]|0,(l|0)<8?l|0:(l=s[N+(o>>8&255)>>0]|0,(l|0)<8?l+8|0:(l=s[N+(o>>16&255)>>0]|0,(l|0)<8?l+16|0:(s[N+(o>>>24)>>0]|0)+24|0))}function g$(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0;if(M=o,T=l,_=T,B=u,ae=A,k=ae,!_)return m=(d|0)!=0,k?m?(n[d>>2]=o|0,n[d+4>>2]=l&0,ae=0,d=0,Ee=ae,d|0):(ae=0,d=0,Ee=ae,d|0):(m&&(n[d>>2]=(M>>>0)%(B>>>0),n[d+4>>2]=0),ae=0,d=(M>>>0)/(B>>>0)>>>0,Ee=ae,d|0);m=(k|0)==0;do if(B){if(!m){if(m=(b(k|0)|0)-(b(_|0)|0)|0,m>>>0<=31){G=m+1|0,k=31-m|0,l=m-31>>31,B=G,o=M>>>(G>>>0)&l|_<<k,l=_>>>(G>>>0)&l,m=0,k=M<<k;break}return d?(n[d>>2]=o|0,n[d+4>>2]=T|l&0,ae=0,d=0,Ee=ae,d|0):(ae=0,d=0,Ee=ae,d|0)}if(m=B-1|0,m&B|0){k=(b(B|0)|0)+33-(b(_|0)|0)|0,Le=64-k|0,G=32-k|0,T=G>>31,We=k-32|0,l=We>>31,B=k,o=G-1>>31&_>>>(We>>>0)|(_<<G|M>>>(k>>>0))&l,l=l&_>>>(k>>>0),m=M<<Le&T,k=(_<<Le|M>>>(We>>>0))&T|M<<G&k-33>>31;break}return d|0&&(n[d>>2]=m&M,n[d+4>>2]=0),(B|0)==1?(We=T|l&0,Le=o|0|0,Ee=We,Le|0):(Le=h$(B|0)|0,We=_>>>(Le>>>0)|0,Le=_<<32-Le|M>>>(Le>>>0)|0,Ee=We,Le|0)}else{if(m)return d|0&&(n[d>>2]=(_>>>0)%(B>>>0),n[d+4>>2]=0),We=0,Le=(_>>>0)/(B>>>0)>>>0,Ee=We,Le|0;if(!M)return d|0&&(n[d>>2]=0,n[d+4>>2]=(_>>>0)%(k>>>0)),We=0,Le=(_>>>0)/(k>>>0)>>>0,Ee=We,Le|0;if(m=k-1|0,!(m&k))return d|0&&(n[d>>2]=o|0,n[d+4>>2]=m&_|l&0),We=0,Le=_>>>((h$(k|0)|0)>>>0),Ee=We,Le|0;if(m=(b(k|0)|0)-(b(_|0)|0)|0,m>>>0<=30){l=m+1|0,k=31-m|0,B=l,o=_<<k|M>>>(l>>>0),l=_>>>(l>>>0),m=0,k=M<<k;break}return d?(n[d>>2]=o|0,n[d+4>>2]=T|l&0,We=0,Le=0,Ee=We,Le|0):(We=0,Le=0,Ee=We,Le|0)}while(!1);if(!B)_=k,T=0,k=0;else{G=u|0|0,M=ae|A&0,_=I_(G|0,M|0,-1,-1)|0,u=Ee,T=k,k=0;do A=T,T=m>>>31|T<<1,m=k|m<<1,A=o<<1|A>>>31|0,ae=o>>>31|l<<1|0,nx(_|0,u|0,A|0,ae|0)|0,Le=Ee,We=Le>>31|((Le|0)<0?-1:0)<<1,k=We&1,o=nx(A|0,ae|0,We&G|0,(((Le|0)<0?-1:0)>>31|((Le|0)<0?-1:0)<<1)&M|0)|0,l=Ee,B=B-1|0;while(B|0);_=T,T=0}return B=0,d|0&&(n[d>>2]=o,n[d+4>>2]=l),We=(m|0)>>>31|(_|B)<<1|(B<<1|m>>>31)&0|T,Le=(m<<1|0)&-2|k,Ee=We,Le|0}function C_(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,g$(o,l,u,A,0)|0}function Vh(o){o=o|0;var l=0,u=0;return u=o+15&-16|0,l=n[C>>2]|0,o=l+u|0,(u|0)>0&(o|0)<(l|0)|(o|0)<0?(oe()|0,pu(12),-1):(n[C>>2]=o,(o|0)>($()|0)&&!(Z()|0)?(n[C>>2]=l,pu(12),-1):l|0)}function F2(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if((l|0)<(o|0)&(o|0)<(l+u|0)){for(A=o,l=l+u|0,o=o+u|0;(u|0)>0;)o=o-1|0,l=l-1|0,u=u-1|0,s[o>>0]=s[l>>0]|0;o=A}else Qr(o,l,u)|0;return o|0}function w_(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;return m=I,I=I+16|0,d=m|0,g$(o,l,u,A,d)|0,I=m,Ee=n[d+4>>2]|0,n[d>>2]|0|0}function d$(o){return o=o|0,(o&255)<<24|(o>>8&255)<<16|(o>>16&255)<<8|o>>>24|0}function gVe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,m$[o&1](l|0,u|0,A|0,d|0,m|0)}function dVe(o,l,u){o=o|0,l=l|0,u=y(u),y$[o&1](l|0,y(u))}function mVe(o,l,u){o=o|0,l=l|0,u=+u,E$[o&31](l|0,+u)}function yVe(o,l,u,A){return o=o|0,l=l|0,u=y(u),A=y(A),y(I$[o&0](l|0,y(u),y(A)))}function EVe(o,l){o=o|0,l=l|0,op[o&127](l|0)}function IVe(o,l,u){o=o|0,l=l|0,u=u|0,ap[o&31](l|0,u|0)}function CVe(o,l){return o=o|0,l=l|0,dd[o&31](l|0)|0}function wVe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,C$[o&1](l|0,+u,+A,d|0)}function BVe(o,l,u,A){o=o|0,l=l|0,u=+u,A=+A,n7e[o&1](l|0,+u,+A)}function vVe(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,ox[o&7](l|0,u|0,A|0)|0}function SVe(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,+i7e[o&1](l|0,u|0,A|0)}function DVe(o,l){return o=o|0,l=l|0,+w$[o&15](l|0)}function bVe(o,l,u){return o=o|0,l=l|0,u=+u,s7e[o&1](l|0,+u)|0}function PVe(o,l,u){return o=o|0,l=l|0,u=u|0,v_[o&15](l|0,u|0)|0}function xVe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=+A,d=+d,m=m|0,o7e[o&1](l|0,u|0,+A,+d,m|0)}function kVe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,a7e[o&1](l|0,u|0,A|0,d|0,m|0,B|0)}function QVe(o,l,u){return o=o|0,l=l|0,u=u|0,+B$[o&7](l|0,u|0)}function TVe(o){return o=o|0,ax[o&7]()|0}function RVe(o,l,u,A,d,m){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,v$[o&1](l|0,u|0,A|0,d|0,m|0)|0}function FVe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=+d,l7e[o&1](l|0,u|0,A|0,+d)}function NVe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,S$[o&1](l|0,u|0,y(A),d|0,y(m),B|0)}function OVe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,L2[o&15](l|0,u|0,A|0)}function LVe(o){o=o|0,D$[o&0]()}function MVe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,b$[o&15](l|0,u|0,+A)}function _Ve(o,l,u){return o=o|0,l=+l,u=+u,c7e[o&1](+l,+u)|0}function UVe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,S_[o&15](l|0,u|0,A|0,d|0)}function HVe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(0)}function jVe(o,l){o=o|0,l=y(l),F(1)}function Xa(o,l){o=o|0,l=+l,F(2)}function qVe(o,l,u){return o=o|0,l=y(l),u=y(u),F(3),Xe}function wr(o){o=o|0,F(4)}function N2(o,l){o=o|0,l=l|0,F(5)}function Ll(o){return o=o|0,F(6),0}function GVe(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,F(7)}function WVe(o,l,u){o=o|0,l=+l,u=+u,F(8)}function YVe(o,l,u){return o=o|0,l=l|0,u=u|0,F(9),0}function VVe(o,l,u){return o=o|0,l=l|0,u=u|0,F(10),0}function gd(o){return o=o|0,F(11),0}function KVe(o,l){return o=o|0,l=+l,F(12),0}function O2(o,l){return o=o|0,l=l|0,F(13),0}function JVe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,F(14)}function zVe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,F(15)}function B_(o,l){return o=o|0,l=l|0,F(16),0}function ZVe(){return F(17),0}function XVe(o,l,u,A,d){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(18),0}function $Ve(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,F(19)}function e7e(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0,F(20)}function sx(o,l,u){o=o|0,l=l|0,u=u|0,F(21)}function t7e(){F(22)}function tE(o,l,u){o=o|0,l=l|0,u=+u,F(23)}function r7e(o,l){return o=+o,l=+l,F(24),0}function rE(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F(25)}var m$=[HVe,XGe],y$=[jVe,Ty],E$=[Xa,$g,Lh,m2,y2,E2,I2,Pf,Uy,C2,xf,ed,td,w2,B2,vu,rd,v2,Hy,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa],I$=[qVe],op=[wr,$y,TLe,RLe,FLe,c4e,u4e,f4e,bqe,Pqe,xqe,_Ge,UGe,HGe,aYe,lYe,cYe,vl,Xg,p2,sr,gc,qP,GP,wLe,jLe,eMe,yMe,FMe,ZMe,h_e,x_e,G_e,oUe,wUe,MUe,e4e,P4e,G4e,o3e,w3e,M3e,e8e,E8e,F8e,K8e,uHe,kP,HHe,nje,wje,Uje,t6e,w6e,T6e,N6e,X6e,tqe,yqe,Qqe,Fqe,Zqe,gGe,nZ,z5e,b9e,j9e,nWe,SWe,UWe,ZWe,eYe,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr],ap=[N2,Ly,nM,h2,g2,xr,oo,Zi,Os,Bs,_y,Oh,D2,NP,sd,oM,aM,OP,LP,uM,kf,ne,B8e,L8e,Gje,$5e,BGe,HX,N2,N2,N2,N2],dd=[Ll,MYe,Ny,id,qy,da,QP,Mh,S2,sM,RP,Gy,MP,fM,Vy,pHe,s6e,eGe,n9e,Fl,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll],C$=[GVe,dM],n7e=[WVe,Cqe],ox=[YVe,t$,_Ye,jYe,t_e,T4e,WHe,aWe],i7e=[VVe,DUe],w$=[gd,_h,FP,tp,mM,v,D,Q,H,V,gd,gd,gd,gd,gd,gd],s7e=[KVe,x6e],v_=[O2,cVe,_P,DLe,wMe,m_e,T_e,i4e,K4e,X8e,Ry,Y9e,O2,O2,O2,O2],o7e=[JVe,iMe],a7e=[zVe,xWe],B$=[B_,lM,Se,Ue,At,jUe,B_,B_],ax=[ZVe,Gt,Fy,xP,_6e,sqe,Mqe,iYe],v$=[XVe,Sy],l7e=[$Ve,D3e],S$=[e7e,AM],L2=[sx,To,TP,cM,Du,MMe,V_e,j3e,i8e,rM,C5e,Q9e,GWe,sx,sx,sx],D$=[t7e],b$=[tE,iM,My,ep,d2,Su,jy,nd,u3e,aje,S6e,tE,tE,tE,tE,tE],c7e=[r7e,Sqe],S_=[rE,uUe,CHe,Dje,h6e,W6e,fqe,Wqe,IGe,c9e,gYe,rE,rE,rE,rE,rE];return{_llvm_bswap_i32:d$,dynCall_idd:_Ve,dynCall_i:TVe,_i64Subtract:nx,___udivdi3:C_,dynCall_vif:dVe,setThrew:ua,dynCall_viii:OVe,_bitshift64Lshr:ix,_bitshift64Shl:p$,dynCall_vi:EVe,dynCall_viiddi:xVe,dynCall_diii:SVe,dynCall_iii:PVe,_memset:eE,_sbrk:Vh,_memcpy:Qr,__GLOBAL__sub_I_Yoga_cpp:u2,dynCall_vii:IVe,___uremdi3:w_,dynCall_vid:mVe,stackAlloc:Ha,_nbind_init:DYe,getTempRet0:UA,dynCall_di:DVe,dynCall_iid:bVe,setTempRet0:_A,_i64Add:I_,dynCall_fiff:yVe,dynCall_iiii:vVe,_emscripten_get_global_libc:LYe,dynCall_viid:MVe,dynCall_viiid:FVe,dynCall_viififi:NVe,dynCall_ii:CVe,__GLOBAL__sub_I_Binding_cc:j5e,dynCall_viiii:UVe,dynCall_iiiiii:RVe,stackSave:gf,dynCall_viiiii:gVe,__GLOBAL__sub_I_nbind_cc:vr,dynCall_vidd:BVe,_free:tx,runPostSets:hVe,dynCall_viiiiii:kVe,establishStackSpace:wn,_memmove:F2,stackRestore:cc,_malloc:ex,__GLOBAL__sub_I_common_cc:lGe,dynCall_viddi:wVe,dynCall_dii:QVe,dynCall_v:LVe}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(t){this.name=\"ExitStatus\",this.message=\"Program terminated with exit(\"+t+\")\",this.status=t}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function t(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=t)},Module.callMain=Module.callMain=function t(e){e=e||[],ensureInitRuntime();var r=e.length+1;function s(){for(var p=0;p<3;p++)a.push(0)}var a=[allocate(intArrayFromString(Module.thisProgram),\"i8\",ALLOC_NORMAL)];s();for(var n=0;n<r-1;n=n+1)a.push(allocate(intArrayFromString(e[n]),\"i8\",ALLOC_NORMAL)),s();a.push(0),a=allocate(a,\"i32\",ALLOC_NORMAL);try{var c=Module._main(r,a,0);exit(c,!0)}catch(p){if(p instanceof ExitStatus)return;if(p==\"SimulateInfiniteLoop\"){Module.noExitRuntime=!0;return}else{var f=p;p&&typeof p==\"object\"&&p.stack&&(f=[p,p.stack]),Module.printErr(\"exception thrown: \"+f),Module.quit(1,p)}}finally{calledMain=!0}};function run(t){if(t=t||Module.arguments,preloadStartTime===null&&(preloadStartTime=Date.now()),runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun)return;function e(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(t),postRun()))}Module.setStatus?(Module.setStatus(\"Running...\"),setTimeout(function(){setTimeout(function(){Module.setStatus(\"\")},1),e()},1)):e()}Module.run=Module.run=run;function exit(t,e){e&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=t,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(t)),ENVIRONMENT_IS_NODE&&process.exit(t),Module.quit(t,new ExitStatus(t)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(t){Module.onAbort&&Module.onAbort(t),t!==void 0?(Module.print(t),Module.printErr(t),t=JSON.stringify(t)):t=\"\",ABORT=!0,EXITSTATUS=1;var e=`\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r=\"abort(\"+t+\") at \"+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit==\"function\"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var Nm=L((Khr,KDe)=>{\"use strict\";var $Pt=YDe(),ext=VDe(),PW=!1,xW=null;ext({},function(t,e){if(!PW){if(PW=!0,t)throw t;xW=e}});if(!PW)throw new Error(\"Failed to load the yoga module - it needed to be loaded synchronously, but didn't\");KDe.exports=$Pt(xW.bind,xW.lib)});var QW=L((Jhr,kW)=>{\"use strict\";var JDe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);kW.exports=JDe;kW.exports.default=JDe});var ZDe=L((zhr,zDe)=>{\"use strict\";zDe.exports=function(){return/\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73)\\uDB40\\uDC7F|\\uD83D\\uDC68(?:\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C\\uDFFB|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83D[\\uDC66\\uDC67]|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C[\\uDFFB-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)\\uD83C\\uDFFB|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83D\\uDC69(?:\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFB\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFC-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|(?:(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)\\uFE0F|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|\\u200D[\\u2640\\u2642])|\\uD83C\\uDFF4\\u200D\\u2620)\\uFE0F|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83C\\uDFF3\\uFE0F\\u200D\\uD83C\\uDF08|\\uD83D\\uDC15\\u200D\\uD83E\\uDDBA|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67|\\uD83C\\uDDFD\\uD83C\\uDDF0|\\uD83C\\uDDF4\\uD83C\\uDDF2|\\uD83C\\uDDF6\\uD83C\\uDDE6|[#\\*0-9]\\uFE0F\\u20E3|\\uD83C\\uDDE7(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEF\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9\\uDDFB\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDF9(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDED\\uDDEF-\\uDDF4\\uDDF7\\uDDF9\\uDDFB\\uDDFC\\uDDFF])|\\uD83C\\uDDEA(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDED\\uDDF7-\\uDDFA])|\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF7(?:\\uD83C[\\uDDEA\\uDDF4\\uDDF8\\uDDFA\\uDDFC])|\\uD83D\\uDC69(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF2(?:\\uD83C[\\uDDE6\\uDDE8-\\uDDED\\uDDF0-\\uDDFF])|\\uD83C\\uDDE6(?:\\uD83C[\\uDDE8-\\uDDEC\\uDDEE\\uDDF1\\uDDF2\\uDDF4\\uDDF6-\\uDDFA\\uDDFC\\uDDFD\\uDDFF])|\\uD83C\\uDDF0(?:\\uD83C[\\uDDEA\\uDDEC-\\uDDEE\\uDDF2\\uDDF3\\uDDF5\\uDDF7\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDED(?:\\uD83C[\\uDDF0\\uDDF2\\uDDF3\\uDDF7\\uDDF9\\uDDFA])|\\uD83C\\uDDE9(?:\\uD83C[\\uDDEA\\uDDEC\\uDDEF\\uDDF0\\uDDF2\\uDDF4\\uDDFF])|\\uD83C\\uDDFE(?:\\uD83C[\\uDDEA\\uDDF9])|\\uD83C\\uDDEC(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEE\\uDDF1-\\uDDF3\\uDDF5-\\uDDFA\\uDDFC\\uDDFE])|\\uD83C\\uDDF8(?:\\uD83C[\\uDDE6-\\uDDEA\\uDDEC-\\uDDF4\\uDDF7-\\uDDF9\\uDDFB\\uDDFD-\\uDDFF])|\\uD83C\\uDDEB(?:\\uD83C[\\uDDEE-\\uDDF0\\uDDF2\\uDDF4\\uDDF7])|\\uD83C\\uDDF5(?:\\uD83C[\\uDDE6\\uDDEA-\\uDDED\\uDDF0-\\uDDF3\\uDDF7-\\uDDF9\\uDDFC\\uDDFE])|\\uD83C\\uDDFB(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDEE\\uDDF3\\uDDFA])|\\uD83C\\uDDF3(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA-\\uDDEC\\uDDEE\\uDDF1\\uDDF4\\uDDF5\\uDDF7\\uDDFA\\uDDFF])|\\uD83C\\uDDE8(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDEE\\uDDF0-\\uDDF5\\uDDF7\\uDDFA-\\uDDFF])|\\uD83C\\uDDF1(?:\\uD83C[\\uDDE6-\\uDDE8\\uDDEE\\uDDF0\\uDDF7-\\uDDFB\\uDDFE])|\\uD83C\\uDDFF(?:\\uD83C[\\uDDE6\\uDDF2\\uDDFC])|\\uD83C\\uDDFC(?:\\uD83C[\\uDDEB\\uDDF8])|\\uD83C\\uDDFA(?:\\uD83C[\\uDDE6\\uDDEC\\uDDF2\\uDDF3\\uDDF8\\uDDFE\\uDDFF])|\\uD83C\\uDDEE(?:\\uD83C[\\uDDE8-\\uDDEA\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9])|\\uD83C\\uDDEF(?:\\uD83C[\\uDDEA\\uDDF2\\uDDF4\\uDDF5])|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u261D\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2\\uDFC7]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66\\uDC67\\uDC6B-\\uDC6D\\uDC70\\uDC72\\uDC74-\\uDC76\\uDC78\\uDC7C\\uDC83\\uDC85\\uDCAA\\uDD74\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE4C\\uDE4F\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1C\\uDD1E\\uDD1F\\uDD30-\\uDD36\\uDDB5\\uDDB6\\uDDBB\\uDDD2-\\uDDD5])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5\\uDEEB\\uDEEC\\uDEF4-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g}});var iD=L((Zhr,TW)=>{\"use strict\";var txt=bk(),rxt=QW(),nxt=ZDe(),XDe=t=>{if(typeof t!=\"string\"||t.length===0||(t=txt(t),t.length===0))return 0;t=t.replace(nxt(),\"  \");let e=0;for(let r=0;r<t.length;r++){let s=t.codePointAt(r);s<=31||s>=127&&s<=159||s>=768&&s<=879||(s>65535&&r++,e+=rxt(s)?2:1)}return e};TW.exports=XDe;TW.exports.default=XDe});var FW=L((Xhr,RW)=>{\"use strict\";var ixt=iD(),$De=t=>{let e=0;for(let r of t.split(`\n`))e=Math.max(e,ixt(r));return e};RW.exports=$De;RW.exports.default=$De});var ebe=L(sD=>{\"use strict\";var sxt=sD&&sD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sD,\"__esModule\",{value:!0});var oxt=sxt(FW()),NW={};sD.default=t=>{if(t.length===0)return{width:0,height:0};if(NW[t])return NW[t];let e=oxt.default(t),r=t.split(`\n`).length;return NW[t]={width:e,height:r},{width:e,height:r}}});var tbe=L(oD=>{\"use strict\";var axt=oD&&oD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oD,\"__esModule\",{value:!0});var bn=axt(Nm()),lxt=(t,e)=>{\"position\"in e&&t.setPositionType(e.position===\"absolute\"?bn.default.POSITION_TYPE_ABSOLUTE:bn.default.POSITION_TYPE_RELATIVE)},cxt=(t,e)=>{\"marginLeft\"in e&&t.setMargin(bn.default.EDGE_START,e.marginLeft||0),\"marginRight\"in e&&t.setMargin(bn.default.EDGE_END,e.marginRight||0),\"marginTop\"in e&&t.setMargin(bn.default.EDGE_TOP,e.marginTop||0),\"marginBottom\"in e&&t.setMargin(bn.default.EDGE_BOTTOM,e.marginBottom||0)},uxt=(t,e)=>{\"paddingLeft\"in e&&t.setPadding(bn.default.EDGE_LEFT,e.paddingLeft||0),\"paddingRight\"in e&&t.setPadding(bn.default.EDGE_RIGHT,e.paddingRight||0),\"paddingTop\"in e&&t.setPadding(bn.default.EDGE_TOP,e.paddingTop||0),\"paddingBottom\"in e&&t.setPadding(bn.default.EDGE_BOTTOM,e.paddingBottom||0)},fxt=(t,e)=>{var r;\"flexGrow\"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),\"flexShrink\"in e&&t.setFlexShrink(typeof e.flexShrink==\"number\"?e.flexShrink:1),\"flexDirection\"in e&&(e.flexDirection===\"row\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW),e.flexDirection===\"row-reverse\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection===\"column\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN),e.flexDirection===\"column-reverse\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN_REVERSE)),\"flexBasis\"in e&&(typeof e.flexBasis==\"number\"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis==\"string\"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),\"alignItems\"in e&&((e.alignItems===\"stretch\"||!e.alignItems)&&t.setAlignItems(bn.default.ALIGN_STRETCH),e.alignItems===\"flex-start\"&&t.setAlignItems(bn.default.ALIGN_FLEX_START),e.alignItems===\"center\"&&t.setAlignItems(bn.default.ALIGN_CENTER),e.alignItems===\"flex-end\"&&t.setAlignItems(bn.default.ALIGN_FLEX_END)),\"alignSelf\"in e&&((e.alignSelf===\"auto\"||!e.alignSelf)&&t.setAlignSelf(bn.default.ALIGN_AUTO),e.alignSelf===\"flex-start\"&&t.setAlignSelf(bn.default.ALIGN_FLEX_START),e.alignSelf===\"center\"&&t.setAlignSelf(bn.default.ALIGN_CENTER),e.alignSelf===\"flex-end\"&&t.setAlignSelf(bn.default.ALIGN_FLEX_END)),\"justifyContent\"in e&&((e.justifyContent===\"flex-start\"||!e.justifyContent)&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_START),e.justifyContent===\"center\"&&t.setJustifyContent(bn.default.JUSTIFY_CENTER),e.justifyContent===\"flex-end\"&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_END),e.justifyContent===\"space-between\"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent===\"space-around\"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_AROUND))},Axt=(t,e)=>{var r,s;\"width\"in e&&(typeof e.width==\"number\"?t.setWidth(e.width):typeof e.width==\"string\"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),\"height\"in e&&(typeof e.height==\"number\"?t.setHeight(e.height):typeof e.height==\"string\"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),\"minWidth\"in e&&(typeof e.minWidth==\"string\"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),\"minHeight\"in e&&(typeof e.minHeight==\"string\"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((s=e.minHeight)!==null&&s!==void 0?s:0))},pxt=(t,e)=>{\"display\"in e&&t.setDisplay(e.display===\"flex\"?bn.default.DISPLAY_FLEX:bn.default.DISPLAY_NONE)},hxt=(t,e)=>{if(\"borderStyle\"in e){let r=typeof e.borderStyle==\"string\"?1:0;t.setBorder(bn.default.EDGE_TOP,r),t.setBorder(bn.default.EDGE_BOTTOM,r),t.setBorder(bn.default.EDGE_LEFT,r),t.setBorder(bn.default.EDGE_RIGHT,r)}};oD.default=(t,e={})=>{lxt(t,e),cxt(t,e),uxt(t,e),fxt(t,e),Axt(t,e),pxt(t,e),hxt(t,e)}});var ibe=L((t0r,nbe)=>{\"use strict\";var aD=iD(),gxt=bk(),dxt=IB(),LW=new Set([\"\\x1B\",\"\\x9B\"]),mxt=39,rbe=t=>`${LW.values().next().value}[${t}m`,yxt=t=>t.split(\" \").map(e=>aD(e)),OW=(t,e,r)=>{let s=[...e],a=!1,n=aD(gxt(t[t.length-1]));for(let[c,f]of s.entries()){let p=aD(f);if(n+p<=r?t[t.length-1]+=f:(t.push(f),n=0),LW.has(f))a=!0;else if(a&&f===\"m\"){a=!1;continue}a||(n+=p,n===r&&c<s.length-1&&(t.push(\"\"),n=0))}!n&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Ext=t=>{let e=t.split(\" \"),r=e.length;for(;r>0&&!(aD(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(\" \")+e.slice(r).join(\"\")},Ixt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()===\"\")return\"\";let s=\"\",a=\"\",n,c=yxt(t),f=[\"\"];for(let[p,h]of t.split(\" \").entries()){r.trim!==!1&&(f[f.length-1]=f[f.length-1].trimLeft());let E=aD(f[f.length-1]);if(p!==0&&(E>=e&&(r.wordWrap===!1||r.trim===!1)&&(f.push(\"\"),E=0),(E>0||r.trim===!1)&&(f[f.length-1]+=\" \",E++)),r.hard&&c[p]>e){let C=e-E,S=1+Math.floor((c[p]-C-1)/e);Math.floor((c[p]-1)/e)<S&&f.push(\"\"),OW(f,h,e);continue}if(E+c[p]>e&&E>0&&c[p]>0){if(r.wordWrap===!1&&E<e){OW(f,h,e);continue}f.push(\"\")}if(E+c[p]>e&&r.wordWrap===!1){OW(f,h,e);continue}f[f.length-1]+=h}r.trim!==!1&&(f=f.map(Ext)),s=f.join(`\n`);for(let[p,h]of[...s].entries()){if(a+=h,LW.has(h)){let C=parseFloat(/\\d[^m]*/.exec(s.slice(p,p+4)));n=C===mxt?null:C}let E=dxt.codes.get(Number(n));n&&E&&(s[p+1]===`\n`?a+=rbe(E):h===`\n`&&(a+=rbe(n)))}return a};nbe.exports=(t,e,r)=>String(t).normalize().replace(/\\r\\n/g,`\n`).split(`\n`).map(s=>Ixt(s,e,r)).join(`\n`)});var abe=L((r0r,obe)=>{\"use strict\";var sbe=\"[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]\",Cxt=t=>t&&t.exact?new RegExp(`^${sbe}$`):new RegExp(sbe,\"g\");obe.exports=Cxt});var MW=L((n0r,fbe)=>{\"use strict\";var wxt=QW(),Bxt=abe(),lbe=IB(),ube=[\"\\x1B\",\"\\x9B\"],MF=t=>`${ube[0]}[${t}m`,cbe=(t,e,r)=>{let s=[];t=[...t];for(let a of t){let n=a;a.match(\";\")&&(a=a.split(\";\")[0][0]+\"0\");let c=lbe.codes.get(parseInt(a,10));if(c){let f=t.indexOf(c.toString());f>=0?t.splice(f,1):s.push(MF(e?c:n))}else if(e){s.push(MF(0));break}else s.push(MF(n))}if(e&&(s=s.filter((a,n)=>s.indexOf(a)===n),r!==void 0)){let a=MF(lbe.codes.get(parseInt(r,10)));s=s.reduce((n,c)=>c===a?[c,...n]:[...n,c],[])}return s.join(\"\")};fbe.exports=(t,e,r)=>{let s=[...t.normalize()],a=[];r=typeof r==\"number\"?r:s.length;let n=!1,c,f=0,p=\"\";for(let[h,E]of s.entries()){let C=!1;if(ube.includes(E)){let S=/\\d[^m]*/.exec(t.slice(h,h+18));c=S&&S.length>0?S[0]:void 0,f<r&&(n=!0,c!==void 0&&a.push(c))}else n&&E===\"m\"&&(n=!1,C=!0);if(!n&&!C&&++f,!Bxt({exact:!0}).test(E)&&wxt(E.codePointAt())&&++f,f>e&&f<=r)p+=E;else if(f===e&&!n&&c!==void 0)p=cbe(a);else if(f>=r){p+=cbe(a,!0,c);break}}return p}});var pbe=L((i0r,Abe)=>{\"use strict\";var eg=MW(),vxt=iD();function _F(t,e,r){if(t.charAt(e)===\" \")return e;for(let s=1;s<=3;s++)if(r){if(t.charAt(e+s)===\" \")return e+s}else if(t.charAt(e-s)===\" \")return e-s;return e}Abe.exports=(t,e,r)=>{r={position:\"end\",preferTruncationOnSpace:!1,...r};let{position:s,space:a,preferTruncationOnSpace:n}=r,c=\"\\u2026\",f=1;if(typeof t!=\"string\")throw new TypeError(`Expected \\`input\\` to be a string, got ${typeof t}`);if(typeof e!=\"number\")throw new TypeError(`Expected \\`columns\\` to be a number, got ${typeof e}`);if(e<1)return\"\";if(e===1)return c;let p=vxt(t);if(p<=e)return t;if(s===\"start\"){if(n){let h=_F(t,p-e+1,!0);return c+eg(t,h,p).trim()}return a===!0&&(c+=\" \",f=2),c+eg(t,p-e+f,p)}if(s===\"middle\"){a===!0&&(c=\" \"+c+\" \",f=3);let h=Math.floor(e/2);if(n){let E=_F(t,h),C=_F(t,p-(e-h)+1,!0);return eg(t,0,E)+c+eg(t,C,p).trim()}return eg(t,0,h)+c+eg(t,p-(e-h)+f,p)}if(s===\"end\"){if(n){let h=_F(t,e-1);return eg(t,0,h)+c}return a===!0&&(c=\" \"+c,f=2),eg(t,0,e-f)+c}throw new Error(`Expected \\`options.position\\` to be either \\`start\\`, \\`middle\\` or \\`end\\`, got ${s}`)}});var UW=L(lD=>{\"use strict\";var hbe=lD&&lD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lD,\"__esModule\",{value:!0});var Sxt=hbe(ibe()),Dxt=hbe(pbe()),_W={};lD.default=(t,e,r)=>{let s=t+String(e)+String(r);if(_W[s])return _W[s];let a=t;if(r===\"wrap\"&&(a=Sxt.default(t,e,{trim:!1,hard:!0})),r.startsWith(\"truncate\")){let n=\"end\";r===\"truncate-middle\"&&(n=\"middle\"),r===\"truncate-start\"&&(n=\"start\"),a=Dxt.default(t,e,{position:n})}return _W[s]=a,a}});var jW=L(HW=>{\"use strict\";Object.defineProperty(HW,\"__esModule\",{value:!0});var gbe=t=>{let e=\"\";if(t.childNodes.length>0)for(let r of t.childNodes){let s=\"\";r.nodeName===\"#text\"?s=r.nodeValue:((r.nodeName===\"ink-text\"||r.nodeName===\"ink-virtual-text\")&&(s=gbe(r)),s.length>0&&typeof r.internal_transform==\"function\"&&(s=r.internal_transform(s))),e+=s}return e};HW.default=gbe});var qW=L(Pi=>{\"use strict\";var cD=Pi&&Pi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pi,\"__esModule\",{value:!0});Pi.setTextNodeValue=Pi.createTextNode=Pi.setStyle=Pi.setAttribute=Pi.removeChildNode=Pi.insertBeforeNode=Pi.appendChildNode=Pi.createNode=Pi.TEXT_NAME=void 0;var bxt=cD(Nm()),dbe=cD(ebe()),Pxt=cD(tbe()),xxt=cD(UW()),kxt=cD(jW());Pi.TEXT_NAME=\"#text\";Pi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t===\"ink-virtual-text\"?void 0:bxt.default.Node.create()};return t===\"ink-text\"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(Qxt.bind(null,r))),r};Pi.appendChildNode=(t,e)=>{var r;e.parentNode&&Pi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName===\"ink-text\"||t.nodeName===\"ink-virtual-text\")&&UF(t)};Pi.insertBeforeNode=(t,e,r)=>{var s,a;e.parentNode&&Pi.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((s=t.yogaNode)===null||s===void 0||s.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName===\"ink-text\"||t.nodeName===\"ink-virtual-text\")&&UF(t)};Pi.removeChildNode=(t,e)=>{var r,s;e.yogaNode&&((s=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||s===void 0||s.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName===\"ink-text\"||t.nodeName===\"ink-virtual-text\")&&UF(t)};Pi.setAttribute=(t,e,r)=>{t.attributes[e]=r};Pi.setStyle=(t,e)=>{t.style=e,t.yogaNode&&Pxt.default(t.yogaNode,e)};Pi.createTextNode=t=>{let e={nodeName:\"#text\",nodeValue:t,yogaNode:void 0,parentNode:null,style:{}};return Pi.setTextNodeValue(e,t),e};var Qxt=function(t,e){var r,s;let a=t.nodeName===\"#text\"?t.nodeValue:kxt.default(t),n=dbe.default(a);if(n.width<=e||n.width>=1&&e>0&&e<1)return n;let c=(s=(r=t.style)===null||r===void 0?void 0:r.textWrap)!==null&&s!==void 0?s:\"wrap\",f=xxt.default(a,e,c);return dbe.default(f)},mbe=t=>{var e;if(!(!t||!t.parentNode))return(e=t.yogaNode)!==null&&e!==void 0?e:mbe(t.parentNode)},UF=t=>{let e=mbe(t);e?.markDirty()};Pi.setTextNodeValue=(t,e)=>{typeof e!=\"string\"&&(e=String(e)),t.nodeValue=e,UF(t)}});var wbe=L(uD=>{\"use strict\";var Cbe=uD&&uD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uD,\"__esModule\",{value:!0});var ybe=SW(),Txt=Cbe(UDe()),Ebe=Cbe(Nm()),ta=qW(),Ibe=t=>{t?.unsetMeasureFunc(),t?.freeRecursive()};uD.default=Txt.default({schedulePassiveEffects:ybe.unstable_scheduleCallback,cancelPassiveEffects:ybe.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,shouldDeprioritizeSubtree:()=>!1,resetAfterCommit:t=>{if(t.isStaticDirty){t.isStaticDirty=!1,typeof t.onImmediateRender==\"function\"&&t.onImmediateRender();return}typeof t.onRender==\"function\"&&t.onRender()},getChildHostContext:(t,e)=>{let r=t.isInsideText,s=e===\"ink-text\"||e===\"ink-virtual-text\";return r===s?t:{isInsideText:s}},shouldSetTextContent:()=>!1,createInstance:(t,e,r,s)=>{if(s.isInsideText&&t===\"ink-box\")throw new Error(\"<Box> can\\u2019t be nested inside <Text> component\");let a=t===\"ink-text\"&&s.isInsideText?\"ink-virtual-text\":t,n=ta.createNode(a);for(let[c,f]of Object.entries(e))c!==\"children\"&&(c===\"style\"?ta.setStyle(n,f):c===\"internal_transform\"?n.internal_transform=f:c===\"internal_static\"?n.internal_static=!0:ta.setAttribute(n,c,f));return n},createTextInstance:(t,e,r)=>{if(!r.isInsideText)throw new Error(`Text string \"${t}\" must be rendered inside <Text> component`);return ta.createTextNode(t)},resetTextContent:()=>{},hideTextInstance:t=>{ta.setTextNodeValue(t,\"\")},unhideTextInstance:(t,e)=>{ta.setTextNodeValue(t,e)},getPublicInstance:t=>t,hideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(Ebe.default.DISPLAY_NONE)},unhideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(Ebe.default.DISPLAY_FLEX)},appendInitialChild:ta.appendChildNode,appendChild:ta.appendChildNode,insertBefore:ta.insertBeforeNode,finalizeInitialChildren:(t,e,r,s)=>(t.internal_static&&(s.isStaticDirty=!0,s.staticNode=t),!1),supportsMutation:!0,appendChildToContainer:ta.appendChildNode,insertInContainerBefore:ta.insertBeforeNode,removeChildFromContainer:(t,e)=>{ta.removeChildNode(t,e),Ibe(e.yogaNode)},prepareUpdate:(t,e,r,s,a)=>{t.internal_static&&(a.isStaticDirty=!0);let n={},c=Object.keys(s);for(let f of c)if(s[f]!==r[f]){if(f===\"style\"&&typeof s.style==\"object\"&&typeof r.style==\"object\"){let h=s.style,E=r.style,C=Object.keys(h);for(let S of C){if(S===\"borderStyle\"||S===\"borderColor\"){if(typeof n.style!=\"object\"){let P={};n.style=P}n.style.borderStyle=h.borderStyle,n.style.borderColor=h.borderColor}if(h[S]!==E[S]){if(typeof n.style!=\"object\"){let P={};n.style=P}n.style[S]=h[S]}}continue}n[f]=s[f]}return n},commitUpdate:(t,e)=>{for(let[r,s]of Object.entries(e))r!==\"children\"&&(r===\"style\"?ta.setStyle(t,s):r===\"internal_transform\"?t.internal_transform=s:r===\"internal_static\"?t.internal_static=!0:ta.setAttribute(t,r,s))},commitTextUpdate:(t,e,r)=>{ta.setTextNodeValue(t,r)},removeChild:(t,e)=>{ta.removeChildNode(t,e),Ibe(e.yogaNode)}})});var vbe=L((c0r,Bbe)=>{\"use strict\";Bbe.exports=(t,e=1,r)=>{if(r={indent:\" \",includeEmptyLines:!1,...r},typeof t!=\"string\")throw new TypeError(`Expected \\`input\\` to be a \\`string\\`, got \\`${typeof t}\\``);if(typeof e!=\"number\")throw new TypeError(`Expected \\`count\\` to be a \\`number\\`, got \\`${typeof e}\\``);if(typeof r.indent!=\"string\")throw new TypeError(`Expected \\`options.indent\\` to be a \\`string\\`, got \\`${typeof r.indent}\\``);if(e===0)return t;let s=r.includeEmptyLines?/^/gm:/^(?!\\s*$)/gm;return t.replace(s,r.indent.repeat(e))}});var Sbe=L(fD=>{\"use strict\";var Rxt=fD&&fD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fD,\"__esModule\",{value:!0});var HF=Rxt(Nm());fD.default=t=>t.getComputedWidth()-t.getComputedPadding(HF.default.EDGE_LEFT)-t.getComputedPadding(HF.default.EDGE_RIGHT)-t.getComputedBorder(HF.default.EDGE_LEFT)-t.getComputedBorder(HF.default.EDGE_RIGHT)});var Dbe=L((f0r,Fxt)=>{Fxt.exports={single:{topLeft:\"\\u250C\",topRight:\"\\u2510\",bottomRight:\"\\u2518\",bottomLeft:\"\\u2514\",vertical:\"\\u2502\",horizontal:\"\\u2500\"},double:{topLeft:\"\\u2554\",topRight:\"\\u2557\",bottomRight:\"\\u255D\",bottomLeft:\"\\u255A\",vertical:\"\\u2551\",horizontal:\"\\u2550\"},round:{topLeft:\"\\u256D\",topRight:\"\\u256E\",bottomRight:\"\\u256F\",bottomLeft:\"\\u2570\",vertical:\"\\u2502\",horizontal:\"\\u2500\"},bold:{topLeft:\"\\u250F\",topRight:\"\\u2513\",bottomRight:\"\\u251B\",bottomLeft:\"\\u2517\",vertical:\"\\u2503\",horizontal:\"\\u2501\"},singleDouble:{topLeft:\"\\u2553\",topRight:\"\\u2556\",bottomRight:\"\\u255C\",bottomLeft:\"\\u2559\",vertical:\"\\u2551\",horizontal:\"\\u2500\"},doubleSingle:{topLeft:\"\\u2552\",topRight:\"\\u2555\",bottomRight:\"\\u255B\",bottomLeft:\"\\u2558\",vertical:\"\\u2502\",horizontal:\"\\u2550\"},classic:{topLeft:\"+\",topRight:\"+\",bottomRight:\"+\",bottomLeft:\"+\",vertical:\"|\",horizontal:\"-\"}}});var Pbe=L((A0r,GW)=>{\"use strict\";var bbe=Dbe();GW.exports=bbe;GW.exports.default=bbe});var kbe=L((p0r,xbe)=>{\"use strict\";var Nxt=(t,e,r)=>{let s=t.indexOf(e);if(s===-1)return t;let a=e.length,n=0,c=\"\";do c+=t.substr(n,s-n)+e+r,n=s+a,s=t.indexOf(e,n);while(s!==-1);return c+=t.substr(n),c},Oxt=(t,e,r,s)=>{let a=0,n=\"\";do{let c=t[s-1]===\"\\r\";n+=t.substr(a,(c?s-1:s)-a)+e+(c?`\\r\n`:`\n`)+r,a=s+1,s=t.indexOf(`\n`,a)}while(s!==-1);return n+=t.substr(a),n};xbe.exports={stringReplaceAll:Nxt,stringEncaseCRLFWithFirstIndex:Oxt}});var Nbe=L((h0r,Fbe)=>{\"use strict\";var Lxt=/(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi,Qbe=/(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g,Mxt=/^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/,_xt=/\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi,Uxt=new Map([[\"n\",`\n`],[\"r\",\"\\r\"],[\"t\",\"\t\"],[\"b\",\"\\b\"],[\"f\",\"\\f\"],[\"v\",\"\\v\"],[\"0\",\"\\0\"],[\"\\\\\",\"\\\\\"],[\"e\",\"\\x1B\"],[\"a\",\"\\x07\"]]);function Rbe(t){let e=t[0]===\"u\",r=t[1]===\"{\";return e&&!r&&t.length===5||t[0]===\"x\"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):Uxt.get(t)||t}function Hxt(t,e){let r=[],s=e.trim().split(/\\s*,\\s*/g),a;for(let n of s){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(Mxt))r.push(a[2].replace(_xt,(f,p,h)=>p?Rbe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function jxt(t){Qbe.lastIndex=0;let e=[],r;for(;(r=Qbe.exec(t))!==null;){let s=r[1];if(r[2]){let a=Hxt(s,r[2]);e.push([s].concat(a))}else e.push([s])}return e}function Tbe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let s=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in s))throw new Error(`Unknown Chalk style: ${a}`);s=n.length>0?s[a](...n):s[a]}return s}Fbe.exports=(t,e)=>{let r=[],s=[],a=[];if(e.replace(Lxt,(n,c,f,p,h,E)=>{if(c)a.push(Rbe(c));else if(p){let C=a.join(\"\");a=[],s.push(r.length===0?C:Tbe(t,r)(C)),r.push({inverse:f,styles:jxt(p)})}else if(h){if(r.length===0)throw new Error(\"Found extraneous } in Chalk template literal\");s.push(Tbe(t,r)(a.join(\"\"))),a=[],r.pop()}else a.push(E)}),s.push(a.join(\"\")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?\"\":\"s\"} (\\`}\\`)`;throw new Error(n)}return s.join(\"\")}});var YF=L((g0r,Hbe)=>{\"use strict\";var AD=IB(),{stdout:YW,stderr:VW}=c4(),{stringReplaceAll:qxt,stringEncaseCRLFWithFirstIndex:Gxt}=kbe(),{isArray:jF}=Array,Lbe=[\"ansi\",\"ansi\",\"ansi256\",\"ansi16m\"],Iw=Object.create(null),Wxt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error(\"The `level` option should be an integer from 0 to 3\");let r=YW?YW.level:0;t.level=e.level===void 0?r:e.level},KW=class{constructor(e){return Mbe(e)}},Mbe=t=>{let e={};return Wxt(e,t),e.template=(...r)=>Ube(e.template,...r),Object.setPrototypeOf(e,qF.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error(\"`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.\")},e.template.Instance=KW,e.template};function qF(t){return Mbe(t)}for(let[t,e]of Object.entries(AD))Iw[t]={get(){let r=GF(this,JW(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Iw.visible={get(){let t=GF(this,this._styler,!0);return Object.defineProperty(this,\"visible\",{value:t}),t}};var _be=[\"rgb\",\"hex\",\"keyword\",\"hsl\",\"hsv\",\"hwb\",\"ansi\",\"ansi256\"];for(let t of _be)Iw[t]={get(){let{level:e}=this;return function(...r){let s=JW(AD.color[Lbe[e]][t](...r),AD.color.close,this._styler);return GF(this,s,this._isEmpty)}}};for(let t of _be){let e=\"bg\"+t[0].toUpperCase()+t.slice(1);Iw[e]={get(){let{level:r}=this;return function(...s){let a=JW(AD.bgColor[Lbe[r]][t](...s),AD.bgColor.close,this._styler);return GF(this,a,this._isEmpty)}}}}var Yxt=Object.defineProperties(()=>{},{...Iw,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),JW=(t,e,r)=>{let s,a;return r===void 0?(s=t,a=e):(s=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:a,parent:r}},GF=(t,e,r)=>{let s=(...a)=>jF(a[0])&&jF(a[0].raw)?Obe(s,Ube(s,...a)):Obe(s,a.length===1?\"\"+a[0]:a.join(\" \"));return Object.setPrototypeOf(s,Yxt),s._generator=t,s._styler=e,s._isEmpty=r,s},Obe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?\"\":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:a}=r;if(e.indexOf(\"\\x1B\")!==-1)for(;r!==void 0;)e=qxt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`\n`);return n!==-1&&(e=Gxt(e,a,s,n)),s+e+a},WW,Ube=(t,...e)=>{let[r]=e;if(!jF(r)||!jF(r.raw))return e.join(\" \");let s=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(s[n-1]).replace(/[{}\\\\]/g,\"\\\\$&\"),String(r.raw[n]));return WW===void 0&&(WW=Nbe()),WW(t,a.join(\"\"))};Object.defineProperties(qF.prototype,Iw);var WF=qF();WF.supportsColor=YW;WF.stderr=qF({level:VW?VW.level:0});WF.stderr.supportsColor=VW;Hbe.exports=WF});var zW=L(hD=>{\"use strict\";var Vxt=hD&&hD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hD,\"__esModule\",{value:!0});var pD=Vxt(YF()),Kxt=/^(rgb|hsl|hsv|hwb)\\(\\s?(\\d+),\\s?(\\d+),\\s?(\\d+)\\s?\\)$/,Jxt=/^(ansi|ansi256)\\(\\s?(\\d+)\\s?\\)$/,VF=(t,e)=>e===\"foreground\"?t:\"bg\"+t[0].toUpperCase()+t.slice(1);hD.default=(t,e,r)=>{if(!e)return t;if(e in pD.default){let a=VF(e,r);return pD.default[a](t)}if(e.startsWith(\"#\")){let a=VF(\"hex\",r);return pD.default[a](e)(t)}if(e.startsWith(\"ansi\")){let a=Jxt.exec(e);if(!a)return t;let n=VF(a[1],r),c=Number(a[2]);return pD.default[n](c)(t)}if(e.startsWith(\"rgb\")||e.startsWith(\"hsl\")||e.startsWith(\"hsv\")||e.startsWith(\"hwb\")){let a=Kxt.exec(e);if(!a)return t;let n=VF(a[1],r),c=Number(a[2]),f=Number(a[3]),p=Number(a[4]);return pD.default[n](c,f,p)(t)}return t}});var qbe=L(gD=>{\"use strict\";var jbe=gD&&gD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gD,\"__esModule\",{value:!0});var zxt=jbe(Pbe()),ZW=jbe(zW());gD.default=(t,e,r,s)=>{if(typeof r.style.borderStyle==\"string\"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),c=r.style.borderColor,f=zxt.default[r.style.borderStyle],p=ZW.default(f.topLeft+f.horizontal.repeat(a-2)+f.topRight,c,\"foreground\"),h=(ZW.default(f.vertical,c,\"foreground\")+`\n`).repeat(n-2),E=ZW.default(f.bottomLeft+f.horizontal.repeat(a-2)+f.bottomRight,c,\"foreground\");s.write(t,e,p,{transformers:[]}),s.write(t,e+1,h,{transformers:[]}),s.write(t+a-1,e+1,h,{transformers:[]}),s.write(t,e+n-1,E,{transformers:[]})}}});var Wbe=L(dD=>{\"use strict\";var Om=dD&&dD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dD,\"__esModule\",{value:!0});var Zxt=Om(Nm()),Xxt=Om(FW()),$xt=Om(vbe()),ekt=Om(UW()),tkt=Om(Sbe()),rkt=Om(jW()),nkt=Om(qbe()),ikt=(t,e)=>{var r;let s=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let a=s.getComputedLeft(),n=s.getComputedTop();e=`\n`.repeat(n)+$xt.default(e,a)}return e},Gbe=(t,e,r)=>{var s;let{offsetX:a=0,offsetY:n=0,transformers:c=[],skipStaticElements:f}=r;if(f&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===Zxt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),C=c;if(typeof t.internal_transform==\"function\"&&(C=[t.internal_transform,...c]),t.nodeName===\"ink-text\"){let S=rkt.default(t);if(S.length>0){let P=Xxt.default(S),I=tkt.default(p);if(P>I){let R=(s=t.style.textWrap)!==null&&s!==void 0?s:\"wrap\";S=ekt.default(S,I,R)}S=ikt(t,S),e.write(h,E,S,{transformers:C})}return}if(t.nodeName===\"ink-box\"&&nkt.default(h,E,t,e),t.nodeName===\"ink-root\"||t.nodeName===\"ink-box\")for(let S of t.childNodes)Gbe(S,e,{offsetX:h,offsetY:E,transformers:C,skipStaticElements:f})}};dD.default=Gbe});var Kbe=L(mD=>{\"use strict\";var Vbe=mD&&mD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mD,\"__esModule\",{value:!0});var Ybe=Vbe(MW()),skt=Vbe(iD()),XW=class{constructor(e){this.writes=[];let{width:r,height:s}=e;this.width=r,this.height=s}write(e,r,s,a){let{transformers:n}=a;s&&this.writes.push({x:e,y:r,text:s,transformers:n})}get(){let e=[];for(let s=0;s<this.height;s++)e.push(\" \".repeat(this.width));for(let s of this.writes){let{x:a,y:n,text:c,transformers:f}=s,p=c.split(`\n`),h=0;for(let E of p){let C=e[n+h];if(!C)continue;let S=skt.default(E);for(let P of f)E=P(E);e[n+h]=Ybe.default(C,0,a)+E+Ybe.default(C,a+S),h++}}return{output:e.map(s=>s.trimRight()).join(`\n`),height:e.length}}};mD.default=XW});var Zbe=L(yD=>{\"use strict\";var $W=yD&&yD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yD,\"__esModule\",{value:!0});var okt=$W(Nm()),Jbe=$W(Wbe()),zbe=$W(Kbe());yD.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,okt.default.DIRECTION_LTR);let s=new zbe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});Jbe.default(t,s,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new zbe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),Jbe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:c}=s.get();return{output:n,outputHeight:c,staticOutput:a?`${a.get().output}\n`:\"\"}}return{output:\"\",outputHeight:0,staticOutput:\"\"}}});var tPe=L((C0r,ePe)=>{\"use strict\";var Xbe=ye(\"stream\"),$be=[\"assert\",\"count\",\"countReset\",\"debug\",\"dir\",\"dirxml\",\"error\",\"group\",\"groupCollapsed\",\"groupEnd\",\"info\",\"log\",\"table\",\"time\",\"timeEnd\",\"timeLog\",\"trace\",\"warn\"],eY={},akt=t=>{let e=new Xbe.PassThrough,r=new Xbe.PassThrough;e.write=a=>t(\"stdout\",a),r.write=a=>t(\"stderr\",a);let s=new console.Console(e,r);for(let a of $be)eY[a]=console[a],console[a]=s[a];return()=>{for(let a of $be)console[a]=eY[a];eY={}}};ePe.exports=akt});var rY=L(tY=>{\"use strict\";Object.defineProperty(tY,\"__esModule\",{value:!0});tY.default=new WeakMap});var iY=L(nY=>{\"use strict\";Object.defineProperty(nY,\"__esModule\",{value:!0});var lkt=hn(),rPe=lkt.createContext({exit:()=>{}});rPe.displayName=\"InternalAppContext\";nY.default=rPe});var oY=L(sY=>{\"use strict\";Object.defineProperty(sY,\"__esModule\",{value:!0});var ckt=hn(),nPe=ckt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});nPe.displayName=\"InternalStdinContext\";sY.default=nPe});var lY=L(aY=>{\"use strict\";Object.defineProperty(aY,\"__esModule\",{value:!0});var ukt=hn(),iPe=ukt.createContext({stdout:void 0,write:()=>{}});iPe.displayName=\"InternalStdoutContext\";aY.default=iPe});var uY=L(cY=>{\"use strict\";Object.defineProperty(cY,\"__esModule\",{value:!0});var fkt=hn(),sPe=fkt.createContext({stderr:void 0,write:()=>{}});sPe.displayName=\"InternalStderrContext\";cY.default=sPe});var KF=L(fY=>{\"use strict\";Object.defineProperty(fY,\"__esModule\",{value:!0});var Akt=hn(),oPe=Akt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});oPe.displayName=\"InternalFocusContext\";fY.default=oPe});var lPe=L((P0r,aPe)=>{\"use strict\";var pkt=/[|\\\\{}()[\\]^$+*?.-]/g;aPe.exports=t=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");return t.replace(pkt,\"\\\\$&\")}});var APe=L((x0r,fPe)=>{\"use strict\";var hkt=lPe(),gkt=typeof process==\"object\"&&process&&typeof process.cwd==\"function\"?process.cwd():\".\",uPe=[].concat(ye(\"module\").builtinModules,\"bootstrap_node\",\"node\").map(t=>new RegExp(`(?:\\\\((?:node:)?${t}(?:\\\\.js)?:\\\\d+:\\\\d+\\\\)$|^\\\\s*at (?:node:)?${t}(?:\\\\.js)?:\\\\d+:\\\\d+$)`));uPe.push(/\\((?:node:)?internal\\/[^:]+:\\d+:\\d+\\)$/,/\\s*at (?:node:)?internal\\/[^:]+:\\d+:\\d+$/,/\\/\\.node-spawn-wrap-\\w+-\\w+\\/node:\\d+:\\d+\\)?$/);var AY=class t{constructor(e){e={ignoredPackages:[],...e},\"internals\"in e||(e.internals=t.nodeInternals()),\"cwd\"in e||(e.cwd=gkt),this._cwd=e.cwd.replace(/\\\\/g,\"/\"),this._internals=[].concat(e.internals,dkt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...uPe]}clean(e,r=0){r=\" \".repeat(r),Array.isArray(e)||(e=e.split(`\n`)),!/^\\s*at /.test(e[0])&&/^\\s*at /.test(e[1])&&(e=e.slice(1));let s=!1,a=null,n=[];return e.forEach(c=>{if(c=c.replace(/\\\\/g,\"/\"),this._internals.some(p=>p.test(c)))return;let f=/^\\s*at /.test(c);s?c=c.trimEnd().replace(/^(\\s+)at /,\"$1\"):(c=c.trim(),f&&(c=c.slice(3))),c=c.replace(`${this._cwd}/`,\"\"),c&&(f?(a&&(n.push(a),a=null),n.push(c)):(s=!0,a=c))}),n.map(c=>`${r}${c}\n`).join(\"\")}captureString(e,r=this.captureString){typeof e==\"function\"&&(r=e,e=1/0);let{stackTraceLimit:s}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=s,this.clean(n)}capture(e,r=this.capture){typeof e==\"function\"&&(r=e,e=1/0);let{prepareStackTrace:s,stackTraceLimit:a}=Error;Error.prepareStackTrace=(f,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:c}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:a}),c}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};cPe(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!==\"Object\"&&a!==\"[object Object]\"&&(s.type=a);let n=r.getFunctionName();n&&(s.function=n);let c=r.getMethodName();return c&&n!==c&&(s.method=c),s}parseLine(e){let r=e&&e.match(mkt);if(!r)return null;let s=r[1]===\"new\",a=r[2],n=r[3],c=r[4],f=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],C=r[9],S=r[10]===\"native\",P=r[11]===\")\",I,R={};if(E&&(R.line=Number(E)),C&&(R.column=Number(C)),P&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===\")\")N++;else if(h.charAt(U)===\"(\"&&h.charAt(U-1)===\" \"&&(N--,N===-1&&h.charAt(U-1)===\" \")){let W=h.slice(0,U-1);h=h.slice(U+1),a+=` (${W}`;break}}if(a){let N=a.match(ykt);N&&(a=N[1],I=N[2])}return cPe(R,h,this._cwd),s&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=f,R.evalColumn=p,R.evalFile=c&&c.replace(/\\\\/g,\"/\")),S&&(R.native=!0),a&&(R.function=a),I&&a!==I&&(R.method=I),R}};function cPe(t,e,r){e&&(e=e.replace(/\\\\/g,\"/\"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function dkt(t){if(t.length===0)return[];let e=t.map(r=>hkt(r));return new RegExp(`[/\\\\\\\\]node_modules[/\\\\\\\\](?:${e.join(\"|\")})[/\\\\\\\\][^:]+:\\\\d+:\\\\d+`)}var mkt=new RegExp(\"^(?:\\\\s*at )?(?:(new) )?(?:(.*?) \\\\()?(?:eval at ([^ ]+) \\\\((.+?):(\\\\d+):(\\\\d+)\\\\), )?(?:(.+?):(\\\\d+):(\\\\d+)|(native))(\\\\)?)$\"),ykt=/^(.*?) \\[as (.*?)\\]$/;fPe.exports=AY});var hPe=L((k0r,pPe)=>{\"use strict\";pPe.exports=(t,e)=>t.replace(/^\\t+/gm,r=>\" \".repeat(r.length*(e||2)))});var dPe=L((Q0r,gPe)=>{\"use strict\";var Ekt=hPe(),Ikt=(t,e)=>{let r=[],s=t-e,a=t+e;for(let n=s;n<=a;n++)r.push(n);return r};gPe.exports=(t,e,r)=>{if(typeof t!=\"string\")throw new TypeError(\"Source code is missing.\");if(!e||e<1)throw new TypeError(\"Line number must start from `1`.\");if(t=Ekt(t).split(/\\r?\\n/),!(e>t.length))return r={around:3,...r},Ikt(e,r.around).filter(s=>t[s-1]!==void 0).map(s=>({line:s,value:t[s-1]}))}});var JF=L(nf=>{\"use strict\";var Ckt=nf&&nf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),wkt=nf&&nf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Bkt=nf&&nf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&Ckt(e,t,r);return wkt(e,t),e},vkt=nf&&nf.__rest||function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols==\"function\")for(var a=0,s=Object.getOwnPropertySymbols(t);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(r[s[a]]=t[s[a]]);return r};Object.defineProperty(nf,\"__esModule\",{value:!0});var mPe=Bkt(hn()),pY=mPe.forwardRef((t,e)=>{var{children:r}=t,s=vkt(t,[\"children\"]);let a=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop||s.paddingY||s.padding||0,paddingBottom:s.paddingBottom||s.paddingY||s.padding||0});return mPe.default.createElement(\"ink-box\",{ref:e,style:a},r)});pY.displayName=\"Box\";pY.defaultProps={flexDirection:\"row\",flexGrow:0,flexShrink:1};nf.default=pY});var dY=L(ED=>{\"use strict\";var hY=ED&&ED.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ED,\"__esModule\",{value:!0});var Skt=hY(hn()),Cw=hY(YF()),yPe=hY(zW()),gY=({color:t,backgroundColor:e,dimColor:r,bold:s,italic:a,underline:n,strikethrough:c,inverse:f,wrap:p,children:h})=>{if(h==null)return null;let E=C=>(r&&(C=Cw.default.dim(C)),t&&(C=yPe.default(C,t,\"foreground\")),e&&(C=yPe.default(C,e,\"background\")),s&&(C=Cw.default.bold(C)),a&&(C=Cw.default.italic(C)),n&&(C=Cw.default.underline(C)),c&&(C=Cw.default.strikethrough(C)),f&&(C=Cw.default.inverse(C)),C);return Skt.default.createElement(\"ink-text\",{style:{flexGrow:0,flexShrink:1,flexDirection:\"row\",textWrap:p},internal_transform:E},h)};gY.displayName=\"Text\";gY.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:\"wrap\"};ED.default=gY});var wPe=L(sf=>{\"use strict\";var Dkt=sf&&sf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),bkt=sf&&sf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Pkt=sf&&sf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&Dkt(e,t,r);return bkt(e,t),e},ID=sf&&sf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sf,\"__esModule\",{value:!0});var EPe=Pkt(ye(\"fs\")),Ts=ID(hn()),IPe=ID(APe()),xkt=ID(dPe()),rh=ID(JF()),hA=ID(dY()),CPe=new IPe.default({cwd:process.cwd(),internals:IPe.default.nodeInternals()}),kkt=({error:t})=>{let e=t.stack?t.stack.split(`\n`).slice(1):void 0,r=e?CPe.parseLine(e[0]):void 0,s,a=0;if(r?.file&&r?.line&&EPe.existsSync(r.file)){let n=EPe.readFileSync(r.file,\"utf8\");if(s=xkt.default(n,r.line),s)for(let{line:c}of s)a=Math.max(a,String(c).length)}return Ts.default.createElement(rh.default,{flexDirection:\"column\",padding:1},Ts.default.createElement(rh.default,null,Ts.default.createElement(hA.default,{backgroundColor:\"red\",color:\"white\"},\" \",\"ERROR\",\" \"),Ts.default.createElement(hA.default,null,\" \",t.message)),r&&Ts.default.createElement(rh.default,{marginTop:1},Ts.default.createElement(hA.default,{dimColor:!0},r.file,\":\",r.line,\":\",r.column)),r&&s&&Ts.default.createElement(rh.default,{marginTop:1,flexDirection:\"column\"},s.map(({line:n,value:c})=>Ts.default.createElement(rh.default,{key:n},Ts.default.createElement(rh.default,{width:a+1},Ts.default.createElement(hA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?\"red\":void 0,color:n===r.line?\"white\":void 0},String(n).padStart(a,\" \"),\":\")),Ts.default.createElement(hA.default,{key:n,backgroundColor:n===r.line?\"red\":void 0,color:n===r.line?\"white\":void 0},\" \"+c)))),t.stack&&Ts.default.createElement(rh.default,{marginTop:1,flexDirection:\"column\"},t.stack.split(`\n`).slice(1).map(n=>{let c=CPe.parseLine(n);return c?Ts.default.createElement(rh.default,{key:n},Ts.default.createElement(hA.default,{dimColor:!0},\"- \"),Ts.default.createElement(hA.default,{dimColor:!0,bold:!0},c.function),Ts.default.createElement(hA.default,{dimColor:!0,color:\"gray\"},\" \",\"(\",c.file,\":\",c.line,\":\",c.column,\")\")):Ts.default.createElement(rh.default,{key:n},Ts.default.createElement(hA.default,{dimColor:!0},\"- \"),Ts.default.createElement(hA.default,{dimColor:!0,bold:!0},n))})))};sf.default=kkt});var vPe=L(of=>{\"use strict\";var Qkt=of&&of.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Tkt=of&&of.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rkt=of&&of.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&Qkt(e,t,r);return Tkt(e,t),e},Mm=of&&of.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,\"__esModule\",{value:!0});var Lm=Rkt(hn()),BPe=Mm(pW()),Fkt=Mm(iY()),Nkt=Mm(oY()),Okt=Mm(lY()),Lkt=Mm(uY()),Mkt=Mm(KF()),_kt=Mm(wPe()),Ukt=\"\t\",Hkt=\"\\x1B[Z\",jkt=\"\\x1B\",zF=class extends Lm.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.\nRead about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.\nRead about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding(\"utf8\"),e){this.rawModeEnabledCount===0&&(r.addListener(\"data\",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener(\"data\",this.handleInput),r.pause())},this.handleInput=e=>{e===\"\u0003\"&&this.props.exitOnCtrlC&&this.handleExit(),e===jkt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===Ukt&&this.focusNext(),e===Hkt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=e=>{this.setState(r=>r.focusables.some(a=>a?.id===e)?{activeFocusId:e}:r)},this.focusNext=()=>{this.setState(e=>{var r;let s=(r=e.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(e)||s}})},this.focusPrevious=()=>{this.setState(e=>{var r;let s=(r=e.focusables[e.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(e)||s}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(s=>{let a=s.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...s.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s+1;a<e.focusables.length;a++)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id},this.findPreviousFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s-1;a>=0;a--)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return Lm.default.createElement(Fkt.default.Provider,{value:{exit:this.handleExit}},Lm.default.createElement(Nkt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},Lm.default.createElement(Okt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},Lm.default.createElement(Lkt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},Lm.default.createElement(Mkt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?Lm.default.createElement(_kt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){BPe.default.hide(this.props.stdout)}componentWillUnmount(){BPe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};of.default=zF;zF.displayName=\"InternalApp\"});var bPe=L(af=>{\"use strict\";var qkt=af&&af.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Gkt=af&&af.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Wkt=af&&af.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&qkt(e,t,r);return Gkt(e,t),e},lf=af&&af.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(af,\"__esModule\",{value:!0});var Ykt=lf(hn()),SPe=rH(),Vkt=lf(wDe()),Kkt=lf(lW()),Jkt=lf(PDe()),zkt=lf(kDe()),mY=lf(wbe()),Zkt=lf(Zbe()),Xkt=lf(AW()),$kt=lf(tPe()),eQt=Wkt(qW()),tQt=lf(rY()),rQt=lf(vPe()),ww=process.env.CI===\"false\"?!1:Jkt.default,DPe=()=>{},yY=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:s,staticOutput:a}=Zkt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`\n`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(ww){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),s>=this.options.stdout.rows){this.options.stdout.write(Kkt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},zkt.default(this),this.options=e,this.rootNode=eQt.createNode(\"ink-root\"),this.rootNode.onRender=e.debug?this.onRender:SPe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=Vkt.default.create(e.stdout),this.throttledLog=e.debug?this.log:SPe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput=\"\",this.fullStaticOutput=\"\",this.container=mY.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=Xkt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),ww||(e.stdout.on(\"resize\",this.onRender),this.unsubscribeResize=()=>{e.stdout.off(\"resize\",this.onRender)})}render(e){let r=Ykt.default.createElement(rQt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);mY.default.updateContainer(r,this.container,null,DPe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(ww){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(ww){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole==\"function\"&&this.restoreConsole(),typeof this.unsubscribeResize==\"function\"&&this.unsubscribeResize(),ww?this.options.stdout.write(this.lastOutput+`\n`):this.options.debug||this.log.done(),this.isUnmounted=!0,mY.default.updateContainer(null,this.container,null,DPe),tQt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!ww&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=$kt.default((e,r)=>{e===\"stdout\"&&this.writeToStdout(r),e===\"stderr\"&&(r.startsWith(\"The above error occurred\")||this.writeToStderr(r))}))}};af.default=yY});var xPe=L(CD=>{\"use strict\";var PPe=CD&&CD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(CD,\"__esModule\",{value:!0});var nQt=PPe(bPe()),ZF=PPe(rY()),iQt=ye(\"stream\"),sQt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},oQt(e)),s=aQt(r.stdout,()=>new nQt.default(r));return s.render(t),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>ZF.default.delete(r.stdout),clear:s.clear}};CD.default=sQt;var oQt=(t={})=>t instanceof iQt.Stream?{stdout:t,stdin:process.stdin}:t,aQt=(t,e)=>{let r;return ZF.default.has(t)?r=ZF.default.get(t):(r=e(),ZF.default.set(t,r)),r}});var QPe=L(nh=>{\"use strict\";var lQt=nh&&nh.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),cQt=nh&&nh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uQt=nh&&nh.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&lQt(e,t,r);return cQt(e,t),e};Object.defineProperty(nh,\"__esModule\",{value:!0});var wD=uQt(hn()),kPe=t=>{let{items:e,children:r,style:s}=t,[a,n]=wD.useState(0),c=wD.useMemo(()=>e.slice(a),[e,a]);wD.useLayoutEffect(()=>{n(e.length)},[e.length]);let f=c.map((h,E)=>r(h,a+E)),p=wD.useMemo(()=>Object.assign({position:\"absolute\",flexDirection:\"column\"},s),[s]);return wD.default.createElement(\"ink-box\",{internal_static:!0,style:p},f)};kPe.displayName=\"Static\";nh.default=kPe});var RPe=L(BD=>{\"use strict\";var fQt=BD&&BD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BD,\"__esModule\",{value:!0});var AQt=fQt(hn()),TPe=({children:t,transform:e})=>t==null?null:AQt.default.createElement(\"ink-text\",{style:{flexGrow:0,flexShrink:1,flexDirection:\"row\"},internal_transform:e},t);TPe.displayName=\"Transform\";BD.default=TPe});var NPe=L(vD=>{\"use strict\";var pQt=vD&&vD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vD,\"__esModule\",{value:!0});var hQt=pQt(hn()),FPe=({count:t=1})=>hQt.default.createElement(\"ink-text\",null,`\n`.repeat(t));FPe.displayName=\"Newline\";vD.default=FPe});var MPe=L(SD=>{\"use strict\";var OPe=SD&&SD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(SD,\"__esModule\",{value:!0});var gQt=OPe(hn()),dQt=OPe(JF()),LPe=()=>gQt.default.createElement(dQt.default,{flexGrow:1});LPe.displayName=\"Spacer\";SD.default=LPe});var XF=L(DD=>{\"use strict\";var mQt=DD&&DD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(DD,\"__esModule\",{value:!0});var yQt=hn(),EQt=mQt(oY()),IQt=()=>yQt.useContext(EQt.default);DD.default=IQt});var UPe=L(bD=>{\"use strict\";var CQt=bD&&bD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bD,\"__esModule\",{value:!0});var _Pe=hn(),wQt=CQt(XF()),BQt=(t,e={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:a}=wQt.default();_Pe.useEffect(()=>{if(e.isActive!==!1)return s(!0),()=>{s(!1)}},[e.isActive,s]),_Pe.useEffect(()=>{if(e.isActive===!1)return;let n=c=>{let f=String(c),p={upArrow:f===\"\\x1B[A\",downArrow:f===\"\\x1B[B\",leftArrow:f===\"\\x1B[D\",rightArrow:f===\"\\x1B[C\",pageDown:f===\"\\x1B[6~\",pageUp:f===\"\\x1B[5~\",return:f===\"\\r\",escape:f===\"\\x1B\",ctrl:!1,shift:!1,tab:f===\"\t\"||f===\"\\x1B[Z\",backspace:f===\"\\b\",delete:f===\"\\x7F\"||f===\"\\x1B[3~\",meta:!1};f<=\"\u001a\"&&!p.return&&(f=String.fromCharCode(f.charCodeAt(0)+97-1),p.ctrl=!0),f.startsWith(\"\\x1B\")&&(f=f.slice(1),p.meta=!0);let h=f>=\"A\"&&f<=\"Z\",E=f>=\"\\u0410\"&&f<=\"\\u042F\";f.length===1&&(h||E)&&(p.shift=!0),p.tab&&f===\"[Z\"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(f=\"\"),(!(f===\"c\"&&p.ctrl)||!a)&&t(f,p)};return r?.on(\"data\",n),()=>{r?.off(\"data\",n)}},[e.isActive,r,a,t])};bD.default=BQt});var HPe=L(PD=>{\"use strict\";var vQt=PD&&PD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(PD,\"__esModule\",{value:!0});var SQt=hn(),DQt=vQt(iY()),bQt=()=>SQt.useContext(DQt.default);PD.default=bQt});var jPe=L(xD=>{\"use strict\";var PQt=xD&&xD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xD,\"__esModule\",{value:!0});var xQt=hn(),kQt=PQt(lY()),QQt=()=>xQt.useContext(kQt.default);xD.default=QQt});var qPe=L(kD=>{\"use strict\";var TQt=kD&&kD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kD,\"__esModule\",{value:!0});var RQt=hn(),FQt=TQt(uY()),NQt=()=>RQt.useContext(FQt.default);kD.default=NQt});var WPe=L(TD=>{\"use strict\";var GPe=TD&&TD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TD,\"__esModule\",{value:!0});var QD=hn(),OQt=GPe(KF()),LQt=GPe(XF()),MQt=({isActive:t=!0,autoFocus:e=!1,id:r}={})=>{let{isRawModeSupported:s,setRawMode:a}=LQt.default(),{activeId:n,add:c,remove:f,activate:p,deactivate:h,focus:E}=QD.useContext(OQt.default),C=QD.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return QD.useEffect(()=>(c(C,{autoFocus:e}),()=>{f(C)}),[C,e]),QD.useEffect(()=>{t?p(C):h(C)},[t,C]),QD.useEffect(()=>{if(!(!s||!t))return a(!0),()=>{a(!1)}},[t]),{isFocused:!!C&&n===C,focus:E}};TD.default=MQt});var YPe=L(RD=>{\"use strict\";var _Qt=RD&&RD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(RD,\"__esModule\",{value:!0});var UQt=hn(),HQt=_Qt(KF()),jQt=()=>{let t=UQt.useContext(HQt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious,focus:t.focus}};RD.default=jQt});var VPe=L(EY=>{\"use strict\";Object.defineProperty(EY,\"__esModule\",{value:!0});EY.default=t=>{var e,r,s,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(s=t.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&a!==void 0?a:0}}});var Vc=L(Eo=>{\"use strict\";Object.defineProperty(Eo,\"__esModule\",{value:!0});var qQt=xPe();Object.defineProperty(Eo,\"render\",{enumerable:!0,get:function(){return qQt.default}});var GQt=JF();Object.defineProperty(Eo,\"Box\",{enumerable:!0,get:function(){return GQt.default}});var WQt=dY();Object.defineProperty(Eo,\"Text\",{enumerable:!0,get:function(){return WQt.default}});var YQt=QPe();Object.defineProperty(Eo,\"Static\",{enumerable:!0,get:function(){return YQt.default}});var VQt=RPe();Object.defineProperty(Eo,\"Transform\",{enumerable:!0,get:function(){return VQt.default}});var KQt=NPe();Object.defineProperty(Eo,\"Newline\",{enumerable:!0,get:function(){return KQt.default}});var JQt=MPe();Object.defineProperty(Eo,\"Spacer\",{enumerable:!0,get:function(){return JQt.default}});var zQt=UPe();Object.defineProperty(Eo,\"useInput\",{enumerable:!0,get:function(){return zQt.default}});var ZQt=HPe();Object.defineProperty(Eo,\"useApp\",{enumerable:!0,get:function(){return ZQt.default}});var XQt=XF();Object.defineProperty(Eo,\"useStdin\",{enumerable:!0,get:function(){return XQt.default}});var $Qt=jPe();Object.defineProperty(Eo,\"useStdout\",{enumerable:!0,get:function(){return $Qt.default}});var eTt=qPe();Object.defineProperty(Eo,\"useStderr\",{enumerable:!0,get:function(){return eTt.default}});var tTt=WPe();Object.defineProperty(Eo,\"useFocus\",{enumerable:!0,get:function(){return tTt.default}});var rTt=YPe();Object.defineProperty(Eo,\"useFocusManager\",{enumerable:!0,get:function(){return rTt.default}});var nTt=VPe();Object.defineProperty(Eo,\"measureElement\",{enumerable:!0,get:function(){return nTt.default}})});var CY={};Vt(CY,{Gem:()=>IY});var KPe,_m,IY,$F=It(()=>{KPe=et(Vc()),_m=et(hn()),IY=(0,_m.memo)(({active:t})=>{let e=(0,_m.useMemo)(()=>t?\"\\u25C9\":\"\\u25EF\",[t]),r=(0,_m.useMemo)(()=>t?\"green\":\"yellow\",[t]);return _m.default.createElement(KPe.Text,{color:r},e)})});var zPe={};Vt(zPe,{useKeypress:()=>Um});function Um({active:t},e,r){let{stdin:s}=(0,JPe.useStdin)(),a=(0,eN.useCallback)((n,c)=>e(n,c),r);(0,eN.useEffect)(()=>{if(!(!t||!s))return s.on(\"keypress\",a),()=>{s.off(\"keypress\",a)}},[t,a,s])}var JPe,eN,FD=It(()=>{JPe=et(Vc()),eN=et(hn())});var XPe={};Vt(XPe,{FocusRequest:()=>ZPe,useFocusRequest:()=>wY});var ZPe,wY,BY=It(()=>{FD();ZPe=(r=>(r.BEFORE=\"before\",r.AFTER=\"after\",r))(ZPe||{}),wY=function({active:t},e,r){Um({active:t},(s,a)=>{a.name===\"tab\"&&(a.shift?e(\"before\"):e(\"after\"))},r)}});var $Pe={};Vt($Pe,{useListInput:()=>ND});var ND,tN=It(()=>{FD();ND=function(t,e,{active:r,minus:s,plus:a,set:n,loop:c=!0}){Um({active:r},(f,p)=>{let h=e.indexOf(t);switch(p.name){case s:{let E=h-1;if(c){n(e[(e.length+E)%e.length]);return}if(E<0)return;n(e[E])}break;case a:{let E=h+1;if(c){n(e[E%e.length]);return}if(E>=e.length)return;n(e[E])}break}},[e,t,a,n,c])}});var rN={};Vt(rN,{ScrollableItems:()=>iTt});var tg,ml,iTt,nN=It(()=>{tg=et(Vc()),ml=et(hn());BY();tN();iTt=({active:t=!0,children:e=[],radius:r=10,size:s=1,loop:a=!0,onFocusRequest:n,willReachEnd:c})=>{let f=N=>{if(N.key===null)throw new Error(\"Expected all children to have a key\");return N.key},p=ml.default.Children.map(e,N=>f(N)),h=p[0],[E,C]=(0,ml.useState)(h),S=p.indexOf(E);(0,ml.useEffect)(()=>{p.includes(E)||C(h)},[e]),(0,ml.useEffect)(()=>{c&&S>=p.length-2&&c()},[S]),wY({active:t&&!!n},N=>{n?.(N)},[n]),ND(E,p,{active:t,minus:\"up\",plus:\"down\",set:C,loop:a});let P=S-r,I=S+r;I>p.length&&(P-=I-p.length,I=p.length),P<0&&(I+=-P,P=0),I>=p.length&&(I=p.length-1);let R=[];for(let N=P;N<=I;++N){let U=p[N],W=t&&U===E;R.push(ml.default.createElement(tg.Box,{key:U,height:s},ml.default.createElement(tg.Box,{marginLeft:1,marginRight:1},ml.default.createElement(tg.Text,null,W?ml.default.createElement(tg.Text,{color:\"cyan\",bold:!0},\">\"):\" \")),ml.default.createElement(tg.Box,null,ml.default.cloneElement(e[N],{active:W}))))}return ml.default.createElement(tg.Box,{flexDirection:\"column\",width:\"100%\"},R)}});var exe,ih,txe,vY,rxe,SY=It(()=>{exe=et(Vc()),ih=et(hn()),txe=ye(\"readline\"),vY=ih.default.createContext(null),rxe=({children:t})=>{let{stdin:e,setRawMode:r}=(0,exe.useStdin)();(0,ih.useEffect)(()=>{r&&r(!0),e&&(0,txe.emitKeypressEvents)(e)},[e,r]);let[s,a]=(0,ih.useState)(new Map),n=(0,ih.useMemo)(()=>({getAll:()=>s,get:c=>s.get(c),set:(c,f)=>a(new Map([...s,[c,f]]))}),[s,a]);return ih.default.createElement(vY.Provider,{value:n,children:t})}});var DY={};Vt(DY,{useMinistore:()=>sTt});function sTt(t,e){let r=(0,iN.useContext)(vY);if(r===null)throw new Error(\"Expected this hook to run with a ministore context attached\");if(typeof t>\"u\")return r.getAll();let s=(0,iN.useCallback)(n=>{r.set(t,n)},[t,r.set]),a=r.get(t);return typeof a>\"u\"&&(a=e),[a,s]}var iN,bY=It(()=>{iN=et(hn());SY()});var oN={};Vt(oN,{renderForm:()=>oTt});async function oTt(t,e,{stdin:r,stdout:s,stderr:a}){let n,c=p=>{let{exit:h}=(0,sN.useApp)();Um({active:!0},(E,C)=>{C.name===\"return\"&&(n=p,h())},[h,p])},{waitUntilExit:f}=(0,sN.render)(PY.default.createElement(rxe,null,PY.default.createElement(t,{...e,useSubmit:c})),{stdin:r,stdout:s,stderr:a});return await f(),n}var sN,PY,aN=It(()=>{sN=et(Vc()),PY=et(hn());SY();FD()});var oxe=L(OD=>{\"use strict\";Object.defineProperty(OD,\"__esModule\",{value:!0});OD.UncontrolledTextInput=void 0;var ixe=hn(),xY=hn(),nxe=Vc(),Hm=YF(),sxe=({value:t,placeholder:e=\"\",focus:r=!0,mask:s,highlightPastedText:a=!1,showCursor:n=!0,onChange:c,onSubmit:f})=>{let[{cursorOffset:p,cursorWidth:h},E]=xY.useState({cursorOffset:(t||\"\").length,cursorWidth:0});xY.useEffect(()=>{E(R=>{if(!r||!n)return R;let N=t||\"\";return R.cursorOffset>N.length-1?{cursorOffset:N.length,cursorWidth:0}:R})},[t,r,n]);let C=a?h:0,S=s?s.repeat(t.length):t,P=S,I=e?Hm.grey(e):void 0;if(n&&r){I=e.length>0?Hm.inverse(e[0])+Hm.grey(e.slice(1)):Hm.inverse(\" \"),P=S.length>0?\"\":Hm.inverse(\" \");let R=0;for(let N of S)R>=p-C&&R<=p?P+=Hm.inverse(N):P+=N,R++;S.length>0&&p===S.length&&(P+=Hm.inverse(\" \"))}return nxe.useInput((R,N)=>{if(N.upArrow||N.downArrow||N.ctrl&&R===\"c\"||N.tab||N.shift&&N.tab)return;if(N.return){f&&f(t);return}let U=p,W=t,te=0;N.leftArrow?n&&U--:N.rightArrow?n&&U++:N.backspace||N.delete?p>0&&(W=t.slice(0,p-1)+t.slice(p,t.length),U--):(W=t.slice(0,p)+R+t.slice(p,t.length),U+=R.length,R.length>1&&(te=R.length)),p<0&&(U=0),p>t.length&&(U=t.length),E({cursorOffset:U,cursorWidth:te}),W!==t&&c(W)},{isActive:r}),ixe.createElement(nxe.Text,null,e?S.length>0?P:I:P)};OD.default=sxe;OD.UncontrolledTextInput=({initialValue:t=\"\",...e})=>{let[r,s]=xY.useState(t);return ixe.createElement(sxe,Object.assign({},e,{value:r,onChange:s}))}});var cxe={};Vt(cxe,{Pad:()=>kY});var axe,lxe,kY,QY=It(()=>{axe=et(Vc()),lxe=et(hn()),kY=({length:t,active:e})=>{if(t===0)return null;let r=t>1?` ${\"-\".repeat(t-1)}`:\" \";return lxe.default.createElement(axe.Text,{dimColor:!e},r)}});var uxe={};Vt(uxe,{ItemOptions:()=>aTt});var MD,rg,aTt,fxe=It(()=>{MD=et(Vc()),rg=et(hn());tN();$F();QY();aTt=function({active:t,skewer:e,options:r,value:s,onChange:a,sizes:n=[]}){let c=r.filter(({label:p})=>!!p).map(({value:p})=>p),f=r.findIndex(p=>p.value===s&&p.label!=\"\");return ND(s,c,{active:t,minus:\"left\",plus:\"right\",set:a}),rg.default.createElement(rg.default.Fragment,null,r.map(({label:p},h)=>{let E=h===f,C=n[h]-1||0,S=p.replace(/[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,\"\"),P=Math.max(0,C-S.length-2);return p?rg.default.createElement(MD.Box,{key:p,width:C,marginLeft:1},rg.default.createElement(MD.Text,{wrap:\"truncate\"},rg.default.createElement(IY,{active:E}),\" \",p),e?rg.default.createElement(kY,{active:t,length:P}):null):rg.default.createElement(MD.Box,{key:`spacer-${h}`,width:C,marginLeft:1})}))}});var Dxe=L((Ndr,Sxe)=>{var jY;Sxe.exports=()=>(typeof jY>\"u\"&&(jY=ye(\"zlib\").brotliDecompressSync(Buffer.from(\"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\",\"base64\")).toString()),jY)});var Vxe=L((omr,Yxe)=>{var ZY=Symbol(\"arg flag\"),Kc=class t extends Error{constructor(e,r){super(e),this.name=\"ArgError\",this.code=r,Object.setPrototypeOf(this,t.prototype)}};function tb(t,{argv:e=process.argv.slice(2),permissive:r=!1,stopAtPositional:s=!1}={}){if(!t)throw new Kc(\"argument specification object is required\",\"ARG_CONFIG_NO_SPEC\");let a={_:[]},n={},c={};for(let f of Object.keys(t)){if(!f)throw new Kc(\"argument key cannot be an empty string\",\"ARG_CONFIG_EMPTY_KEY\");if(f[0]!==\"-\")throw new Kc(`argument key must start with '-' but found: '${f}'`,\"ARG_CONFIG_NONOPT_KEY\");if(f.length===1)throw new Kc(`argument key must have a name; singular '-' keys are not allowed: ${f}`,\"ARG_CONFIG_NONAME_KEY\");if(typeof t[f]==\"string\"){n[f]=t[f];continue}let p=t[f],h=!1;if(Array.isArray(p)&&p.length===1&&typeof p[0]==\"function\"){let[E]=p;p=(C,S,P=[])=>(P.push(E(C,S,P[P.length-1])),P),h=E===Boolean||E[ZY]===!0}else if(typeof p==\"function\")h=p===Boolean||p[ZY]===!0;else throw new Kc(`type missing or not a function or valid array type: ${f}`,\"ARG_CONFIG_VAD_TYPE\");if(f[1]!==\"-\"&&f.length>2)throw new Kc(`short argument keys (with a single hyphen) must have only one character: ${f}`,\"ARG_CONFIG_SHORTOPT_TOOLONG\");c[f]=[p,h]}for(let f=0,p=e.length;f<p;f++){let h=e[f];if(s&&a._.length>0){a._=a._.concat(e.slice(f));break}if(h===\"--\"){a._=a._.concat(e.slice(f+1));break}if(h.length>1&&h[0]===\"-\"){let E=h[1]===\"-\"||h.length===2?[h]:h.slice(1).split(\"\").map(C=>`-${C}`);for(let C=0;C<E.length;C++){let S=E[C],[P,I]=S[1]===\"-\"?S.split(/=(.*)/,2):[S,void 0],R=P;for(;R in n;)R=n[R];if(!(R in c))if(r){a._.push(S);continue}else throw new Kc(`unknown or unexpected option: ${P}`,\"ARG_UNKNOWN_OPTION\");let[N,U]=c[R];if(!U&&C+1<E.length)throw new Kc(`option requires argument (but was followed by another short argument): ${P}`,\"ARG_MISSING_REQUIRED_SHORTARG\");if(U)a[R]=N(!0,R,a[R]);else if(I===void 0){if(e.length<f+2||e[f+1].length>1&&e[f+1][0]===\"-\"&&!(e[f+1].match(/^-?\\d*(\\.(?=\\d))?\\d*$/)&&(N===Number||typeof BigInt<\"u\"&&N===BigInt))){let W=P===R?\"\":` (alias for ${R})`;throw new Kc(`option requires argument: ${P}${W}`,\"ARG_MISSING_REQUIRED_LONGARG\")}a[R]=N(e[f+1],R,a[R]),++f}else a[R]=N(I,R,a[R])}}else a._.push(h)}return a}tb.flag=t=>(t[ZY]=!0,t);tb.COUNT=tb.flag((t,e,r)=>(r||0)+1);tb.ArgError=Kc;Yxe.exports=tb});var tke=L((Omr,eke)=>{var tV;eke.exports=()=>(typeof tV>\"u\"&&(tV=ye(\"zlib\").brotliDecompressSync(Buffer.from(\"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\",\"base64\")).toString()),tV)});var oke=L((aV,lV)=>{(function(t){aV&&typeof aV==\"object\"&&typeof lV<\"u\"?lV.exports=t():typeof define==\"function\"&&define.amd?define([],t):typeof window<\"u\"?window.isWindows=t():typeof global<\"u\"?global.isWindows=t():typeof self<\"u\"?self.isWindows=t():this.isWindows=t()})(function(){\"use strict\";return function(){return process&&(process.platform===\"win32\"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var uke=L((Fyr,cke)=>{\"use strict\";cV.ifExists=lRt;var xw=ye(\"util\"),Jc=ye(\"path\"),ake=oke(),sRt=/^#!\\s*(?:\\/usr\\/bin\\/env)?\\s*([^ \\t]+)(.*)$/,oRt={createPwshFile:!0,createCmdFile:ake(),fs:ye(\"fs\")},aRt=new Map([[\".js\",\"node\"],[\".cjs\",\"node\"],[\".mjs\",\"node\"],[\".cmd\",\"cmd\"],[\".bat\",\"cmd\"],[\".ps1\",\"pwsh\"],[\".sh\",\"sh\"]]);function lke(t){let e={...oRt,...t},r=e.fs;return e.fs_={chmod:r.chmod?xw.promisify(r.chmod):async()=>{},mkdir:xw.promisify(r.mkdir),readFile:xw.promisify(r.readFile),stat:xw.promisify(r.stat),unlink:xw.promisify(r.unlink),writeFile:xw.promisify(r.writeFile)},e}async function cV(t,e,r){let s=lke(r);await s.fs_.stat(t),await uRt(t,e,s)}function lRt(t,e,r){return cV(t,e,r).catch(()=>{})}function cRt(t,e){return e.fs_.unlink(t).catch(()=>{})}async function uRt(t,e,r){let s=await gRt(t,r);return await fRt(e,r),ARt(t,e,s,r)}function fRt(t,e){return e.fs_.mkdir(Jc.dirname(t),{recursive:!0})}function ARt(t,e,r,s){let a=lke(s),n=[{generator:yRt,extension:\"\"}];return a.createCmdFile&&n.push({generator:mRt,extension:\".cmd\"}),a.createPwshFile&&n.push({generator:ERt,extension:\".ps1\"}),Promise.all(n.map(c=>dRt(t,e+c.extension,r,c.generator,a)))}function pRt(t,e){return cRt(t,e)}function hRt(t,e){return IRt(t,e)}async function gRt(t,e){let a=(await e.fs_.readFile(t,\"utf8\")).trim().split(/\\r*\\n/)[0].match(sRt);if(!a){let n=Jc.extname(t).toLowerCase();return{program:aRt.get(n)||null,additionalArgs:\"\"}}return{program:a[1],additionalArgs:a[2]}}async function dRt(t,e,r,s,a){let n=a.preserveSymlinks?\"--preserve-symlinks\":\"\",c=[r.additionalArgs,n].filter(f=>f).join(\" \");return a=Object.assign({},a,{prog:r.program,args:c}),await pRt(e,a),await a.fs_.writeFile(e,s(t,e,a),\"utf8\"),hRt(e,a)}function mRt(t,e,r){let a=Jc.relative(Jc.dirname(e),t).split(\"/\").join(\"\\\\\"),n=Jc.isAbsolute(a)?`\"${a}\"`:`\"%~dp0\\\\${a}\"`,c,f=r.prog,p=r.args||\"\",h=uV(r.nodePath).win32;f?(c=`\"%~dp0\\\\${f}.exe\"`,a=n):(f=n,p=\"\",a=\"\");let E=r.progArgs?`${r.progArgs.join(\" \")} `:\"\",C=h?`@SET NODE_PATH=${h}\\r\n`:\"\";return c?C+=`@IF EXIST ${c} (\\r\n  ${c} ${p} ${a} ${E}%*\\r\n) ELSE (\\r\n  @SETLOCAL\\r\n  @SET PATHEXT=%PATHEXT:;.JS;=;%\\r\n  ${f} ${p} ${a} ${E}%*\\r\n)\\r\n`:C+=`@${f} ${p} ${a} ${E}%*\\r\n`,C}function yRt(t,e,r){let s=Jc.relative(Jc.dirname(e),t),a=r.prog&&r.prog.split(\"\\\\\").join(\"/\"),n;s=s.split(\"\\\\\").join(\"/\");let c=Jc.isAbsolute(s)?`\"${s}\"`:`\"$basedir/${s}\"`,f=r.args||\"\",p=uV(r.nodePath).posix;a?(n=`\"$basedir/${r.prog}\"`,s=c):(a=c,f=\"\",s=\"\");let h=r.progArgs?`${r.progArgs.join(\" \")} `:\"\",E=`#!/bin/sh\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\\\\\,/,g')\")\n\ncase \\`uname\\` in\n    *CYGWIN*) basedir=\\`cygpath -w \"$basedir\"\\`;;\nesac\n\n`,C=r.nodePath?`export NODE_PATH=\"${p}\"\n`:\"\";return n?E+=`${C}if [ -x ${n} ]; then\n  exec ${n} ${f} ${s} ${h}\"$@\"\nelse\n  exec ${a} ${f} ${s} ${h}\"$@\"\nfi\n`:E+=`${C}${a} ${f} ${s} ${h}\"$@\"\nexit $?\n`,E}function ERt(t,e,r){let s=Jc.relative(Jc.dirname(e),t),a=r.prog&&r.prog.split(\"\\\\\").join(\"/\"),n=a&&`\"${a}$exe\"`,c;s=s.split(\"\\\\\").join(\"/\");let f=Jc.isAbsolute(s)?`\"${s}\"`:`\"$basedir/${s}\"`,p=r.args||\"\",h=uV(r.nodePath),E=h.win32,C=h.posix;n?(c=`\"$basedir/${r.prog}$exe\"`,s=f):(n=f,p=\"\",s=\"\");let S=r.progArgs?`${r.progArgs.join(\" \")} `:\"\",P=`#!/usr/bin/env pwsh\n$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n\n$exe=\"\"\n${r.nodePath?`$env_node_path=$env:NODE_PATH\n$env:NODE_PATH=\"${E}\"\n`:\"\"}if ($PSVersionTable.PSVersion -lt \"6.0\" -or $IsWindows) {\n  # Fix case when both the Windows and Linux builds of Node\n  # are installed in the same directory\n  $exe=\".exe\"\n}`;return r.nodePath&&(P+=` else {\n  $env:NODE_PATH=\"${C}\"\n}`),c?P+=`\n$ret=0\nif (Test-Path ${c}) {\n  # Support pipeline input\n  if ($MyInvocation.ExpectingInput) {\n    $input | & ${c} ${p} ${s} ${S}$args\n  } else {\n    & ${c} ${p} ${s} ${S}$args\n  }\n  $ret=$LASTEXITCODE\n} else {\n  # Support pipeline input\n  if ($MyInvocation.ExpectingInput) {\n    $input | & ${n} ${p} ${s} ${S}$args\n  } else {\n    & ${n} ${p} ${s} ${S}$args\n  }\n  $ret=$LASTEXITCODE\n}\n${r.nodePath?`$env:NODE_PATH=$env_node_path\n`:\"\"}exit $ret\n`:P+=`\n# Support pipeline input\nif ($MyInvocation.ExpectingInput) {\n  $input | & ${n} ${p} ${s} ${S}$args\n} else {\n  & ${n} ${p} ${s} ${S}$args\n}\n${r.nodePath?`$env:NODE_PATH=$env_node_path\n`:\"\"}exit $LASTEXITCODE\n`,P}function IRt(t,e){return e.fs_.chmod(t,493)}function uV(t){if(!t)return{win32:\"\",posix:\"\"};let e=typeof t==\"string\"?t.split(Jc.delimiter):Array.from(t),r={};for(let s=0;s<e.length;s++){let a=e[s].split(\"/\").join(\"\\\\\"),n=ake()?e[s].split(\"\\\\\").join(\"/\").replace(/^([^:\\\\/]*):/,(c,f)=>`/mnt/${f.toLowerCase()}`):e[s];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:a,posix:n}}return r}cke.exports=cV});var vV=L((tIr,kke)=>{kke.exports=ye(\"stream\")});var Fke=L((rIr,Rke)=>{\"use strict\";function Qke(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function JRt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qke(Object(r),!0).forEach(function(s){zRt(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qke(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function zRt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZRt(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function Tke(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,\"value\"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function XRt(t,e,r){return e&&Tke(t.prototype,e),r&&Tke(t,r),t}var $Rt=ye(\"buffer\"),CN=$Rt.Buffer,eFt=ye(\"util\"),SV=eFt.inspect,tFt=SV&&SV.custom||\"inspect\";function rFt(t,e,r){CN.prototype.copy.call(t,e,r)}Rke.exports=function(){function t(){ZRt(this,t),this.head=null,this.tail=null,this.length=0}return XRt(t,[{key:\"push\",value:function(r){var s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:\"unshift\",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}},{key:\"shift\",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(r){if(this.length===0)return\"\";for(var s=this.head,a=\"\"+s.data;s=s.next;)a+=r+s.data;return a}},{key:\"concat\",value:function(r){if(this.length===0)return CN.alloc(0);for(var s=CN.allocUnsafe(r>>>0),a=this.head,n=0;a;)rFt(a.data,s,n),n+=a.data.length,a=a.next;return s}},{key:\"consume\",value:function(r,s){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=s?this._getString(r):this._getBuffer(r),a}},{key:\"first\",value:function(){return this.head.data}},{key:\"_getString\",value:function(r){var s=this.head,a=1,n=s.data;for(r-=n.length;s=s.next;){var c=s.data,f=r>c.length?c.length:r;if(f===c.length?n+=c:n+=c.slice(0,r),r-=f,r===0){f===c.length?(++a,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=c.slice(f));break}++a}return this.length-=a,n}},{key:\"_getBuffer\",value:function(r){var s=CN.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(s),r-=a.data.length;a=a.next;){var c=a.data,f=r>c.length?c.length:r;if(c.copy(s,s.length-r,0,f),r-=f,r===0){f===c.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=c.slice(f));break}++n}return this.length-=n,s}},{key:tFt,value:function(r,s){return SV(this,JRt({},s,{depth:0,customInspect:!1}))}}]),t}()});var bV=L((nIr,Oke)=>{\"use strict\";function nFt(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(DV,this,t)):process.nextTick(DV,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(wN,r):(r._writableState.errorEmitted=!0,process.nextTick(Nke,r,n)):process.nextTick(Nke,r,n):e?(process.nextTick(wN,r),e(n)):process.nextTick(wN,r)}),this)}function Nke(t,e){DV(t,e),wN(t)}function wN(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit(\"close\")}function iFt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function DV(t,e){t.emit(\"error\",e)}function sFt(t,e){var r=t._readableState,s=t._writableState;r&&r.autoDestroy||s&&s.autoDestroy?t.destroy(e):t.emit(\"error\",e)}Oke.exports={destroy:nFt,undestroy:iFt,errorOrDestroy:sFt}});var cg=L((iIr,_ke)=>{\"use strict\";var Mke={};function Zc(t,e,r){r||(r=Error);function s(n,c,f){return typeof e==\"string\"?e:e(n,c,f)}class a extends r{constructor(c,f,p){super(s(c,f,p))}}a.prototype.name=r.name,a.prototype.code=t,Mke[t]=a}function Lke(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(s=>String(s)),r>2?`one of ${e} ${t.slice(0,r-1).join(\", \")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function oFt(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function aFt(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function lFt(t,e,r){return typeof r!=\"number\"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Zc(\"ERR_INVALID_OPT_VALUE\",function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'},TypeError);Zc(\"ERR_INVALID_ARG_TYPE\",function(t,e,r){let s;typeof e==\"string\"&&oFt(e,\"not \")?(s=\"must not be\",e=e.replace(/^not /,\"\")):s=\"must be\";let a;if(aFt(t,\" argument\"))a=`The ${t} ${s} ${Lke(e,\"type\")}`;else{let n=lFt(t,\".\")?\"property\":\"argument\";a=`The \"${t}\" ${n} ${s} ${Lke(e,\"type\")}`}return a+=`. Received type ${typeof r}`,a},TypeError);Zc(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\");Zc(\"ERR_METHOD_NOT_IMPLEMENTED\",function(t){return\"The \"+t+\" method is not implemented\"});Zc(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\");Zc(\"ERR_STREAM_DESTROYED\",function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"});Zc(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\");Zc(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\");Zc(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\");Zc(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError);Zc(\"ERR_UNKNOWN_ENCODING\",function(t){return\"Unknown encoding: \"+t},TypeError);Zc(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\");_ke.exports.codes=Mke});var PV=L((sIr,Uke)=>{\"use strict\";var cFt=cg().codes.ERR_INVALID_OPT_VALUE;function uFt(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function fFt(t,e,r,s){var a=uFt(e,s,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=s?r:\"highWaterMark\";throw new cFt(n,a)}return Math.floor(a)}return t.objectMode?16:16*1024}Uke.exports={getHighWaterMark:fFt}});var Hke=L((oIr,xV)=>{typeof Object.create==\"function\"?xV.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:xV.exports=function(e,r){if(r){e.super_=r;var s=function(){};s.prototype=r.prototype,e.prototype=new s,e.prototype.constructor=e}}});var ug=L((aIr,QV)=>{try{if(kV=ye(\"util\"),typeof kV.inherits!=\"function\")throw\"\";QV.exports=kV.inherits}catch{QV.exports=Hke()}var kV});var qke=L((lIr,jke)=>{jke.exports=ye(\"util\").deprecate});var FV=L((cIr,Jke)=>{\"use strict\";Jke.exports=Vi;function Wke(t){var e=this;this.next=null,this.entry=null,this.finish=function(){MFt(e,t)}}var Fw;Vi.WritableState=hb;var AFt={deprecate:qke()},Yke=vV(),vN=ye(\"buffer\").Buffer,pFt=global.Uint8Array||function(){};function hFt(t){return vN.from(t)}function gFt(t){return vN.isBuffer(t)||t instanceof pFt}var RV=bV(),dFt=PV(),mFt=dFt.getHighWaterMark,fg=cg().codes,yFt=fg.ERR_INVALID_ARG_TYPE,EFt=fg.ERR_METHOD_NOT_IMPLEMENTED,IFt=fg.ERR_MULTIPLE_CALLBACK,CFt=fg.ERR_STREAM_CANNOT_PIPE,wFt=fg.ERR_STREAM_DESTROYED,BFt=fg.ERR_STREAM_NULL_VALUES,vFt=fg.ERR_STREAM_WRITE_AFTER_END,SFt=fg.ERR_UNKNOWN_ENCODING,Nw=RV.errorOrDestroy;ug()(Vi,Yke);function DFt(){}function hb(t,e,r){Fw=Fw||Vm(),t=t||{},typeof r!=\"boolean\"&&(r=e instanceof Fw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=mFt(this,t,\"writableHighWaterMark\",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){RFt(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Wke(this)}hb.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(hb.prototype,\"buffer\",{get:AFt.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch{}})();var BN;typeof Symbol==\"function\"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==\"function\"?(BN=Function.prototype[Symbol.hasInstance],Object.defineProperty(Vi,Symbol.hasInstance,{value:function(e){return BN.call(this,e)?!0:this!==Vi?!1:e&&e._writableState instanceof hb}})):BN=function(e){return e instanceof this};function Vi(t){Fw=Fw||Vm();var e=this instanceof Fw;if(!e&&!BN.call(Vi,this))return new Vi(t);this._writableState=new hb(t,this,e),this.writable=!0,t&&(typeof t.write==\"function\"&&(this._write=t.write),typeof t.writev==\"function\"&&(this._writev=t.writev),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.final==\"function\"&&(this._final=t.final)),Yke.call(this)}Vi.prototype.pipe=function(){Nw(this,new CFt)};function bFt(t,e){var r=new vFt;Nw(t,r),process.nextTick(e,r)}function PFt(t,e,r,s){var a;return r===null?a=new BFt:typeof r!=\"string\"&&!e.objectMode&&(a=new yFt(\"chunk\",[\"string\",\"Buffer\"],r)),a?(Nw(t,a),process.nextTick(s,a),!1):!0}Vi.prototype.write=function(t,e,r){var s=this._writableState,a=!1,n=!s.objectMode&&gFt(t);return n&&!vN.isBuffer(t)&&(t=hFt(t)),typeof e==\"function\"&&(r=e,e=null),n?e=\"buffer\":e||(e=s.defaultEncoding),typeof r!=\"function\"&&(r=DFt),s.ending?bFt(this,r):(n||PFt(this,s,t,r))&&(s.pendingcb++,a=kFt(this,s,n,t,e,r)),a};Vi.prototype.cork=function(){this._writableState.corked++};Vi.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Vke(this,t))};Vi.prototype.setDefaultEncoding=function(e){if(typeof e==\"string\"&&(e=e.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((e+\"\").toLowerCase())>-1))throw new SFt(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Vi.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function xFt(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e==\"string\"&&(e=vN.from(e,r)),e}Object.defineProperty(Vi.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function kFt(t,e,r,s,a,n){if(!r){var c=xFt(e,s,a);s!==c&&(r=!0,a=\"buffer\",s=c)}var f=e.objectMode?1:s.length;e.length+=f;var p=e.length<e.highWaterMark;if(p||(e.needDrain=!0),e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:s,encoding:a,isBuf:r,callback:n,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else TV(t,e,!1,f,s,a,n);return p}function TV(t,e,r,s,a,n,c){e.writelen=s,e.writecb=c,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new wFt(\"write\")):r?t._writev(a,e.onwrite):t._write(a,n,e.onwrite),e.sync=!1}function QFt(t,e,r,s,a){--e.pendingcb,r?(process.nextTick(a,s),process.nextTick(pb,t,e),t._writableState.errorEmitted=!0,Nw(t,s)):(a(s),t._writableState.errorEmitted=!0,Nw(t,s),pb(t,e))}function TFt(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function RFt(t,e){var r=t._writableState,s=r.sync,a=r.writecb;if(typeof a!=\"function\")throw new IFt;if(TFt(r),e)QFt(t,r,s,e,a);else{var n=Kke(r)||t.destroyed;!n&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Vke(t,r),s?process.nextTick(Gke,t,r,n,a):Gke(t,r,n,a)}}function Gke(t,e,r,s){r||FFt(t,e),e.pendingcb--,s(),pb(t,e)}function FFt(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}function Vke(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var s=e.bufferedRequestCount,a=new Array(s),n=e.corkedRequestsFree;n.entry=r;for(var c=0,f=!0;r;)a[c]=r,r.isBuf||(f=!1),r=r.next,c+=1;a.allBuffers=f,TV(t,e,!0,e.length,a,\"\",n.finish),e.pendingcb++,e.lastBufferedRequest=null,n.next?(e.corkedRequestsFree=n.next,n.next=null):e.corkedRequestsFree=new Wke(e),e.bufferedRequestCount=0}else{for(;r;){var p=r.chunk,h=r.encoding,E=r.callback,C=e.objectMode?1:p.length;if(TV(t,e,!1,C,p,h,E),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Vi.prototype._write=function(t,e,r){r(new EFt(\"_write()\"))};Vi.prototype._writev=null;Vi.prototype.end=function(t,e,r){var s=this._writableState;return typeof t==\"function\"?(r=t,t=null,e=null):typeof e==\"function\"&&(r=e,e=null),t!=null&&this.write(t,e),s.corked&&(s.corked=1,this.uncork()),s.ending||LFt(this,s,r),this};Object.defineProperty(Vi.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function Kke(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function NFt(t,e){t._final(function(r){e.pendingcb--,r&&Nw(t,r),e.prefinished=!0,t.emit(\"prefinish\"),pb(t,e)})}function OFt(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final==\"function\"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(NFt,t,e)):(e.prefinished=!0,t.emit(\"prefinish\")))}function pb(t,e){var r=Kke(e);if(r&&(OFt(t,e),e.pendingcb===0&&(e.finished=!0,t.emit(\"finish\"),e.autoDestroy))){var s=t._readableState;(!s||s.autoDestroy&&s.endEmitted)&&t.destroy()}return r}function LFt(t,e,r){e.ending=!0,pb(t,e),r&&(e.finished?process.nextTick(r):t.once(\"finish\",r)),e.ended=!0,t.writable=!1}function MFt(t,e,r){var s=t.entry;for(t.entry=null;s;){var a=s.callback;e.pendingcb--,a(r),s=s.next}e.corkedRequestsFree.next=t}Object.defineProperty(Vi.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Vi.prototype.destroy=RV.destroy;Vi.prototype._undestroy=RV.undestroy;Vi.prototype._destroy=function(t,e){e(t)}});var Vm=L((uIr,Zke)=>{\"use strict\";var _Ft=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Zke.exports=yA;var zke=LV(),OV=FV();ug()(yA,zke);for(NV=_Ft(OV.prototype),SN=0;SN<NV.length;SN++)DN=NV[SN],yA.prototype[DN]||(yA.prototype[DN]=OV.prototype[DN]);var NV,DN,SN;function yA(t){if(!(this instanceof yA))return new yA(t);zke.call(this,t),OV.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once(\"end\",UFt)))}Object.defineProperty(yA.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(yA.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(yA.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function UFt(){this._writableState.ended||process.nextTick(HFt,this)}function HFt(t){t.end()}Object.defineProperty(yA.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var eQe=L((MV,$ke)=>{var bN=ye(\"buffer\"),uh=bN.Buffer;function Xke(t,e){for(var r in t)e[r]=t[r]}uh.from&&uh.alloc&&uh.allocUnsafe&&uh.allocUnsafeSlow?$ke.exports=bN:(Xke(bN,MV),MV.Buffer=Ow);function Ow(t,e,r){return uh(t,e,r)}Xke(uh,Ow);Ow.from=function(t,e,r){if(typeof t==\"number\")throw new TypeError(\"Argument must not be a number\");return uh(t,e,r)};Ow.alloc=function(t,e,r){if(typeof t!=\"number\")throw new TypeError(\"Argument must be a number\");var s=uh(t);return e!==void 0?typeof r==\"string\"?s.fill(e,r):s.fill(e):s.fill(0),s};Ow.allocUnsafe=function(t){if(typeof t!=\"number\")throw new TypeError(\"Argument must be a number\");return uh(t)};Ow.allocUnsafeSlow=function(t){if(typeof t!=\"number\")throw new TypeError(\"Argument must be a number\");return bN.SlowBuffer(t)}});var HV=L(rQe=>{\"use strict\";var UV=eQe().Buffer,tQe=UV.isEncoding||function(t){switch(t=\"\"+t,t&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function jFt(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}function qFt(t){var e=jFt(t);if(typeof e!=\"string\"&&(UV.isEncoding===tQe||!tQe(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}rQe.StringDecoder=gb;function gb(t){this.encoding=qFt(t);var e;switch(this.encoding){case\"utf16le\":this.text=JFt,this.end=zFt,e=4;break;case\"utf8\":this.fillLast=YFt,e=4;break;case\"base64\":this.text=ZFt,this.end=XFt,e=3;break;default:this.write=$Ft,this.end=eNt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=UV.allocUnsafe(e)}gb.prototype.write=function(t){if(t.length===0)return\"\";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||\"\"};gb.prototype.end=KFt;gb.prototype.text=VFt;gb.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function _V(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function GFt(t,e,r){var s=e.length-1;if(s<r)return 0;var a=_V(e[s]);return a>=0?(a>0&&(t.lastNeed=a-1),a):--s<r||a===-2?0:(a=_V(e[s]),a>=0?(a>0&&(t.lastNeed=a-2),a):--s<r||a===-2?0:(a=_V(e[s]),a>=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function WFt(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,\"\\uFFFD\";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,\"\\uFFFD\";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,\"\\uFFFD\"}}function YFt(t){var e=this.lastTotal-this.lastNeed,r=WFt(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function VFt(t,e){var r=GFt(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var s=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,s),t.toString(\"utf8\",e,s)}function KFt(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+\"\\uFFFD\":e}function JFt(t,e){if((t.length-e)%2===0){var r=t.toString(\"utf16le\",e);if(r){var s=r.charCodeAt(r.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function zFt(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function ZFt(t,e){var r=(t.length-e)%3;return r===0?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function XFt(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function $Ft(t){return t.toString(this.encoding)}function eNt(t){return t&&t.length?this.write(t):\"\"}});var PN=L((AIr,sQe)=>{\"use strict\";var nQe=cg().codes.ERR_STREAM_PREMATURE_CLOSE;function tNt(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];t.apply(this,s)}}}function rNt(){}function nNt(t){return t.setHeader&&typeof t.abort==\"function\"}function iQe(t,e,r){if(typeof e==\"function\")return iQe(t,null,e);e||(e={}),r=tNt(r||rNt);var s=e.readable||e.readable!==!1&&t.readable,a=e.writable||e.writable!==!1&&t.writable,n=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){a=!1,c=!0,s||r.call(t)},p=t._readableState&&t._readableState.endEmitted,h=function(){s=!1,p=!0,a||r.call(t)},E=function(I){r.call(t,I)},C=function(){var I;if(s&&!p)return(!t._readableState||!t._readableState.ended)&&(I=new nQe),r.call(t,I);if(a&&!c)return(!t._writableState||!t._writableState.ended)&&(I=new nQe),r.call(t,I)},S=function(){t.req.on(\"finish\",f)};return nNt(t)?(t.on(\"complete\",f),t.on(\"abort\",C),t.req?S():t.on(\"request\",S)):a&&!t._writableState&&(t.on(\"end\",n),t.on(\"close\",n)),t.on(\"end\",h),t.on(\"finish\",f),e.error!==!1&&t.on(\"error\",E),t.on(\"close\",C),function(){t.removeListener(\"complete\",f),t.removeListener(\"abort\",C),t.removeListener(\"request\",S),t.req&&t.req.removeListener(\"finish\",f),t.removeListener(\"end\",n),t.removeListener(\"close\",n),t.removeListener(\"finish\",f),t.removeListener(\"end\",h),t.removeListener(\"error\",E),t.removeListener(\"close\",C)}}sQe.exports=iQe});var aQe=L((pIr,oQe)=>{\"use strict\";var xN;function Ag(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var iNt=PN(),pg=Symbol(\"lastResolve\"),Km=Symbol(\"lastReject\"),db=Symbol(\"error\"),kN=Symbol(\"ended\"),Jm=Symbol(\"lastPromise\"),jV=Symbol(\"handlePromise\"),zm=Symbol(\"stream\");function hg(t,e){return{value:t,done:e}}function sNt(t){var e=t[pg];if(e!==null){var r=t[zm].read();r!==null&&(t[Jm]=null,t[pg]=null,t[Km]=null,e(hg(r,!1)))}}function oNt(t){process.nextTick(sNt,t)}function aNt(t,e){return function(r,s){t.then(function(){if(e[kN]){r(hg(void 0,!0));return}e[jV](r,s)},s)}}var lNt=Object.getPrototypeOf(function(){}),cNt=Object.setPrototypeOf((xN={get stream(){return this[zm]},next:function(){var e=this,r=this[db];if(r!==null)return Promise.reject(r);if(this[kN])return Promise.resolve(hg(void 0,!0));if(this[zm].destroyed)return new Promise(function(c,f){process.nextTick(function(){e[db]?f(e[db]):c(hg(void 0,!0))})});var s=this[Jm],a;if(s)a=new Promise(aNt(s,this));else{var n=this[zm].read();if(n!==null)return Promise.resolve(hg(n,!1));a=new Promise(this[jV])}return this[Jm]=a,a}},Ag(xN,Symbol.asyncIterator,function(){return this}),Ag(xN,\"return\",function(){var e=this;return new Promise(function(r,s){e[zm].destroy(null,function(a){if(a){s(a);return}r(hg(void 0,!0))})})}),xN),lNt),uNt=function(e){var r,s=Object.create(cNt,(r={},Ag(r,zm,{value:e,writable:!0}),Ag(r,pg,{value:null,writable:!0}),Ag(r,Km,{value:null,writable:!0}),Ag(r,db,{value:null,writable:!0}),Ag(r,kN,{value:e._readableState.endEmitted,writable:!0}),Ag(r,jV,{value:function(n,c){var f=s[zm].read();f?(s[Jm]=null,s[pg]=null,s[Km]=null,n(hg(f,!1))):(s[pg]=n,s[Km]=c)},writable:!0}),r));return s[Jm]=null,iNt(e,function(a){if(a&&a.code!==\"ERR_STREAM_PREMATURE_CLOSE\"){var n=s[Km];n!==null&&(s[Jm]=null,s[pg]=null,s[Km]=null,n(a)),s[db]=a;return}var c=s[pg];c!==null&&(s[Jm]=null,s[pg]=null,s[Km]=null,c(hg(void 0,!0))),s[kN]=!0}),e.on(\"readable\",oNt.bind(null,s)),s};oQe.exports=uNt});var fQe=L((hIr,uQe)=>{\"use strict\";function lQe(t,e,r,s,a,n,c){try{var f=t[n](c),p=f.value}catch(h){r(h);return}f.done?e(p):Promise.resolve(p).then(s,a)}function fNt(t){return function(){var e=this,r=arguments;return new Promise(function(s,a){var n=t.apply(e,r);function c(p){lQe(n,s,a,c,f,\"next\",p)}function f(p){lQe(n,s,a,c,f,\"throw\",p)}c(void 0)})}}function cQe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function ANt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cQe(Object(r),!0).forEach(function(s){pNt(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cQe(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function pNt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var hNt=cg().codes.ERR_INVALID_ARG_TYPE;function gNt(t,e,r){var s;if(e&&typeof e.next==\"function\")s=e;else if(e&&e[Symbol.asyncIterator])s=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])s=e[Symbol.iterator]();else throw new hNt(\"iterable\",[\"Iterable\"],e);var a=new t(ANt({objectMode:!0},r)),n=!1;a._read=function(){n||(n=!0,c())};function c(){return f.apply(this,arguments)}function f(){return f=fNt(function*(){try{var p=yield s.next(),h=p.value,E=p.done;E?a.push(null):a.push(yield h)?c():n=!1}catch(C){a.destroy(C)}}),f.apply(this,arguments)}return a}uQe.exports=gNt});var LV=L((dIr,CQe)=>{\"use strict\";CQe.exports=Pn;var Lw;Pn.ReadableState=gQe;var gIr=ye(\"events\").EventEmitter,hQe=function(e,r){return e.listeners(r).length},yb=vV(),QN=ye(\"buffer\").Buffer,dNt=global.Uint8Array||function(){};function mNt(t){return QN.from(t)}function yNt(t){return QN.isBuffer(t)||t instanceof dNt}var qV=ye(\"util\"),ln;qV&&qV.debuglog?ln=qV.debuglog(\"stream\"):ln=function(){};var ENt=Fke(),zV=bV(),INt=PV(),CNt=INt.getHighWaterMark,TN=cg().codes,wNt=TN.ERR_INVALID_ARG_TYPE,BNt=TN.ERR_STREAM_PUSH_AFTER_EOF,vNt=TN.ERR_METHOD_NOT_IMPLEMENTED,SNt=TN.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Mw,GV,WV;ug()(Pn,yb);var mb=zV.errorOrDestroy,YV=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function DNt(t,e,r){if(typeof t.prependListener==\"function\")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function gQe(t,e,r){Lw=Lw||Vm(),t=t||{},typeof r!=\"boolean\"&&(r=e instanceof Lw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=CNt(this,t,\"readableHighWaterMark\",r),this.buffer=new ENt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Mw||(Mw=HV().StringDecoder),this.decoder=new Mw(t.encoding),this.encoding=t.encoding)}function Pn(t){if(Lw=Lw||Vm(),!(this instanceof Pn))return new Pn(t);var e=this instanceof Lw;this._readableState=new gQe(t,this,e),this.readable=!0,t&&(typeof t.read==\"function\"&&(this._read=t.read),typeof t.destroy==\"function\"&&(this._destroy=t.destroy)),yb.call(this)}Object.defineProperty(Pn.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Pn.prototype.destroy=zV.destroy;Pn.prototype._undestroy=zV.undestroy;Pn.prototype._destroy=function(t,e){e(t)};Pn.prototype.push=function(t,e){var r=this._readableState,s;return r.objectMode?s=!0:typeof t==\"string\"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=QN.from(t,e),e=\"\"),s=!0),dQe(this,t,e,!1,s)};Pn.prototype.unshift=function(t){return dQe(this,t,null,!0,!1)};function dQe(t,e,r,s,a){ln(\"readableAddChunk\",e);var n=t._readableState;if(e===null)n.reading=!1,xNt(t,n);else{var c;if(a||(c=bNt(n,e)),c)mb(t,c);else if(n.objectMode||e&&e.length>0)if(typeof e!=\"string\"&&!n.objectMode&&Object.getPrototypeOf(e)!==QN.prototype&&(e=mNt(e)),s)n.endEmitted?mb(t,new SNt):VV(t,n,e,!0);else if(n.ended)mb(t,new BNt);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?VV(t,n,e,!1):JV(t,n)):VV(t,n,e,!1)}else s||(n.reading=!1,JV(t,n))}return!n.ended&&(n.length<n.highWaterMark||n.length===0)}function VV(t,e,r,s){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit(\"data\",r)):(e.length+=e.objectMode?1:r.length,s?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&RN(t)),JV(t,e)}function bNt(t,e){var r;return!yNt(e)&&typeof e!=\"string\"&&e!==void 0&&!t.objectMode&&(r=new wNt(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e)),r}Pn.prototype.isPaused=function(){return this._readableState.flowing===!1};Pn.prototype.setEncoding=function(t){Mw||(Mw=HV().StringDecoder);var e=new Mw(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,s=\"\";r!==null;)s+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),s!==\"\"&&this._readableState.buffer.push(s),this._readableState.length=s.length,this};var AQe=1073741824;function PNt(t){return t>=AQe?t=AQe:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function pQe(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=PNt(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Pn.prototype.read=function(t){ln(\"read\",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return ln(\"read: emitReadable\",e.length,e.ended),e.length===0&&e.ended?KV(this):RN(this),null;if(t=pQe(t,e),t===0&&e.ended)return e.length===0&&KV(this),null;var s=e.needReadable;ln(\"need readable\",s),(e.length===0||e.length-t<e.highWaterMark)&&(s=!0,ln(\"length less than watermark\",s)),e.ended||e.reading?(s=!1,ln(\"reading or ended\",s)):s&&(ln(\"do read\"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=pQe(r,e)));var a;return t>0?a=EQe(t,e):a=null,a===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&KV(this)),a!==null&&this.emit(\"data\",a),a};function xNt(t,e){if(ln(\"onEofChunk\"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?RN(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,mQe(t)))}}function RN(t){var e=t._readableState;ln(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(ln(\"emitReadable\",e.flowing),e.emittedReadable=!0,process.nextTick(mQe,t))}function mQe(t){var e=t._readableState;ln(\"emitReadable_\",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,ZV(t)}function JV(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(kNt,t,e))}function kNt(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(ln(\"maybeReadMore read 0\"),t.read(0),r===e.length)break}e.readingMore=!1}Pn.prototype._read=function(t){mb(this,new vNt(\"_read()\"))};Pn.prototype.pipe=function(t,e){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t);break}s.pipesCount+=1,ln(\"pipe count=%d opts=%j\",s.pipesCount,e);var a=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,n=a?f:R;s.endEmitted?process.nextTick(n):r.once(\"end\",n),t.on(\"unpipe\",c);function c(N,U){ln(\"onunpipe\"),N===r&&U&&U.hasUnpiped===!1&&(U.hasUnpiped=!0,E())}function f(){ln(\"onend\"),t.end()}var p=QNt(r);t.on(\"drain\",p);var h=!1;function E(){ln(\"cleanup\"),t.removeListener(\"close\",P),t.removeListener(\"finish\",I),t.removeListener(\"drain\",p),t.removeListener(\"error\",S),t.removeListener(\"unpipe\",c),r.removeListener(\"end\",f),r.removeListener(\"end\",R),r.removeListener(\"data\",C),h=!0,s.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&p()}r.on(\"data\",C);function C(N){ln(\"ondata\");var U=t.write(N);ln(\"dest.write\",U),U===!1&&((s.pipesCount===1&&s.pipes===t||s.pipesCount>1&&IQe(s.pipes,t)!==-1)&&!h&&(ln(\"false write response, pause\",s.awaitDrain),s.awaitDrain++),r.pause())}function S(N){ln(\"onerror\",N),R(),t.removeListener(\"error\",S),hQe(t,\"error\")===0&&mb(t,N)}DNt(t,\"error\",S);function P(){t.removeListener(\"finish\",I),R()}t.once(\"close\",P);function I(){ln(\"onfinish\"),t.removeListener(\"close\",P),R()}t.once(\"finish\",I);function R(){ln(\"unpipe\"),r.unpipe(t)}return t.emit(\"pipe\",r),s.flowing||(ln(\"pipe resume\"),r.resume()),t};function QNt(t){return function(){var r=t._readableState;ln(\"pipeOnDrain\",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&hQe(t,\"data\")&&(r.flowing=!0,ZV(t))}}Pn.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r),this);if(!t){var s=e.pipes,a=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<a;n++)s[n].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var c=IQe(e.pipes,t);return c===-1?this:(e.pipes.splice(c,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit(\"unpipe\",this,r),this)};Pn.prototype.on=function(t,e){var r=yb.prototype.on.call(this,t,e),s=this._readableState;return t===\"data\"?(s.readableListening=this.listenerCount(\"readable\")>0,s.flowing!==!1&&this.resume()):t===\"readable\"&&!s.endEmitted&&!s.readableListening&&(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,ln(\"on readable\",s.length,s.reading),s.length?RN(this):s.reading||process.nextTick(TNt,this)),r};Pn.prototype.addListener=Pn.prototype.on;Pn.prototype.removeListener=function(t,e){var r=yb.prototype.removeListener.call(this,t,e);return t===\"readable\"&&process.nextTick(yQe,this),r};Pn.prototype.removeAllListeners=function(t){var e=yb.prototype.removeAllListeners.apply(this,arguments);return(t===\"readable\"||t===void 0)&&process.nextTick(yQe,this),e};function yQe(t){var e=t._readableState;e.readableListening=t.listenerCount(\"readable\")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function TNt(t){ln(\"readable nexttick read 0\"),t.read(0)}Pn.prototype.resume=function(){var t=this._readableState;return t.flowing||(ln(\"resume\"),t.flowing=!t.readableListening,RNt(this,t)),t.paused=!1,this};function RNt(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(FNt,t,e))}function FNt(t,e){ln(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),ZV(t),e.flowing&&!e.reading&&t.read(0)}Pn.prototype.pause=function(){return ln(\"call pause flowing=%j\",this._readableState.flowing),this._readableState.flowing!==!1&&(ln(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this};function ZV(t){var e=t._readableState;for(ln(\"flow\",e.flowing);e.flowing&&t.read()!==null;);}Pn.prototype.wrap=function(t){var e=this,r=this._readableState,s=!1;t.on(\"end\",function(){if(ln(\"wrapped end\"),r.decoder&&!r.ended){var c=r.decoder.end();c&&c.length&&e.push(c)}e.push(null)}),t.on(\"data\",function(c){if(ln(\"wrapped data\"),r.decoder&&(c=r.decoder.write(c)),!(r.objectMode&&c==null)&&!(!r.objectMode&&(!c||!c.length))){var f=e.push(c);f||(s=!0,t.pause())}});for(var a in t)this[a]===void 0&&typeof t[a]==\"function\"&&(this[a]=function(f){return function(){return t[f].apply(t,arguments)}}(a));for(var n=0;n<YV.length;n++)t.on(YV[n],this.emit.bind(this,YV[n]));return this._read=function(c){ln(\"wrapped _read\",c),s&&(s=!1,t.resume())},this};typeof Symbol==\"function\"&&(Pn.prototype[Symbol.asyncIterator]=function(){return GV===void 0&&(GV=aQe()),GV(this)});Object.defineProperty(Pn.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Pn.prototype,\"readableBuffer\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Pn.prototype,\"readableFlowing\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Pn._fromList=EQe;Object.defineProperty(Pn.prototype,\"readableLength\",{enumerable:!1,get:function(){return this._readableState.length}});function EQe(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(\"\"):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function KV(t){var e=t._readableState;ln(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(NNt,e,t))}function NNt(t,e){if(ln(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol==\"function\"&&(Pn.from=function(t,e){return WV===void 0&&(WV=fQe()),WV(Pn,t,e)});function IQe(t,e){for(var r=0,s=t.length;r<s;r++)if(t[r]===e)return r;return-1}});var XV=L((mIr,BQe)=>{\"use strict\";BQe.exports=fh;var FN=cg().codes,ONt=FN.ERR_METHOD_NOT_IMPLEMENTED,LNt=FN.ERR_MULTIPLE_CALLBACK,MNt=FN.ERR_TRANSFORM_ALREADY_TRANSFORMING,_Nt=FN.ERR_TRANSFORM_WITH_LENGTH_0,NN=Vm();ug()(fh,NN);function UNt(t,e){var r=this._transformState;r.transforming=!1;var s=r.writecb;if(s===null)return this.emit(\"error\",new LNt);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),s(t);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function fh(t){if(!(this instanceof fh))return new fh(t);NN.call(this,t),this._transformState={afterTransform:UNt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform==\"function\"&&(this._transform=t.transform),typeof t.flush==\"function\"&&(this._flush=t.flush)),this.on(\"prefinish\",HNt)}function HNt(){var t=this;typeof this._flush==\"function\"&&!this._readableState.destroyed?this._flush(function(e,r){wQe(t,e,r)}):wQe(this,null,null)}fh.prototype.push=function(t,e){return this._transformState.needTransform=!1,NN.prototype.push.call(this,t,e)};fh.prototype._transform=function(t,e,r){r(new ONt(\"_transform()\"))};fh.prototype._write=function(t,e,r){var s=this._transformState;if(s.writecb=r,s.writechunk=t,s.writeencoding=e,!s.transforming){var a=this._readableState;(s.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};fh.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};fh.prototype._destroy=function(t,e){NN.prototype._destroy.call(this,t,function(r){e(r)})};function wQe(t,e,r){if(e)return t.emit(\"error\",e);if(r!=null&&t.push(r),t._writableState.length)throw new _Nt;if(t._transformState.transforming)throw new MNt;return t.push(null)}});var DQe=L((yIr,SQe)=>{\"use strict\";SQe.exports=Eb;var vQe=XV();ug()(Eb,vQe);function Eb(t){if(!(this instanceof Eb))return new Eb(t);vQe.call(this,t)}Eb.prototype._transform=function(t,e,r){r(null,t)}});var QQe=L((EIr,kQe)=>{\"use strict\";var $V;function jNt(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var xQe=cg().codes,qNt=xQe.ERR_MISSING_ARGS,GNt=xQe.ERR_STREAM_DESTROYED;function bQe(t){if(t)throw t}function WNt(t){return t.setHeader&&typeof t.abort==\"function\"}function YNt(t,e,r,s){s=jNt(s);var a=!1;t.on(\"close\",function(){a=!0}),$V===void 0&&($V=PN()),$V(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,WNt(t))return t.abort();if(typeof t.destroy==\"function\")return t.destroy();s(c||new GNt(\"pipe\"))}}}function PQe(t){t()}function VNt(t,e){return t.pipe(e)}function KNt(t){return!t.length||typeof t[t.length-1]!=\"function\"?bQe:t.pop()}function JNt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var s=KNt(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new qNt(\"streams\");var a,n=e.map(function(c,f){var p=f<e.length-1,h=f>0;return YNt(c,p,h,function(E){a||(a=E),E&&n.forEach(PQe),!p&&(n.forEach(PQe),s(a))})});return e.reduce(VNt)}kQe.exports=JNt});var _w=L((Xc,Cb)=>{var Ib=ye(\"stream\");process.env.READABLE_STREAM===\"disable\"&&Ib?(Cb.exports=Ib.Readable,Object.assign(Cb.exports,Ib),Cb.exports.Stream=Ib):(Xc=Cb.exports=LV(),Xc.Stream=Ib||Xc,Xc.Readable=Xc,Xc.Writable=FV(),Xc.Duplex=Vm(),Xc.Transform=XV(),Xc.PassThrough=DQe(),Xc.finished=PN(),Xc.pipeline=QQe())});var FQe=L((IIr,RQe)=>{\"use strict\";var{Buffer:uf}=ye(\"buffer\"),TQe=Symbol.for(\"BufferList\");function Ci(t){if(!(this instanceof Ci))return new Ci(t);Ci._init.call(this,t)}Ci._init=function(e){Object.defineProperty(this,TQe,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};Ci.prototype._new=function(e){return new Ci(e)};Ci.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let s=0;s<this._bufs.length;s++){let a=r+this._bufs[s].length;if(e<a||s===this._bufs.length-1)return[s,e-r];r=a}};Ci.prototype._reverseOffset=function(t){let e=t[0],r=t[1];for(let s=0;s<e;s++)r+=this._bufs[s].length;return r};Ci.prototype.get=function(e){if(e>this.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};Ci.prototype.slice=function(e,r){return typeof e==\"number\"&&e<0&&(e+=this.length),typeof r==\"number\"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};Ci.prototype.copy=function(e,r,s,a){if((typeof s!=\"number\"||s<0)&&(s=0),(typeof a!=\"number\"||a>this.length)&&(a=this.length),s>=this.length||a<=0)return e||uf.alloc(0);let n=!!e,c=this._offset(s),f=a-s,p=f,h=n&&r||0,E=c[1];if(s===0&&a===this.length){if(!n)return this._bufs.length===1?this._bufs[0]:uf.concat(this._bufs,this.length);for(let C=0;C<this._bufs.length;C++)this._bufs[C].copy(e,h),h+=this._bufs[C].length;return e}if(p<=this._bufs[c[0]].length-E)return n?this._bufs[c[0]].copy(e,r,E,E+p):this._bufs[c[0]].slice(E,E+p);n||(e=uf.allocUnsafe(f));for(let C=c[0];C<this._bufs.length;C++){let S=this._bufs[C].length-E;if(p>S)this._bufs[C].copy(e,h,E),h+=S;else{this._bufs[C].copy(e,h,E,E+p),h+=S;break}p-=S,E&&(E=0)}return e.length>h?e.slice(0,h):e};Ci.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!=\"number\"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let s=this._offset(e),a=this._offset(r),n=this._bufs.slice(s[0],a[0]+1);return a[1]===0?n.pop():n[n.length-1]=n[n.length-1].slice(0,a[1]),s[1]!==0&&(n[0]=n[0].slice(s[1])),this._new(n)};Ci.prototype.toString=function(e,r,s){return this.slice(r,s).toString(e)};Ci.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};Ci.prototype.duplicate=function(){let e=this._new();for(let r=0;r<this._bufs.length;r++)e.append(this._bufs[r]);return e};Ci.prototype.append=function(e){if(e==null)return this;if(e.buffer)this._appendBuffer(uf.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let r=0;r<e.length;r++)this.append(e[r]);else if(this._isBufferList(e))for(let r=0;r<e._bufs.length;r++)this.append(e._bufs[r]);else typeof e==\"number\"&&(e=e.toString()),this._appendBuffer(uf.from(e));return this};Ci.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length};Ci.prototype.indexOf=function(t,e,r){if(r===void 0&&typeof e==\"string\"&&(r=e,e=void 0),typeof t==\"function\"||Array.isArray(t))throw new TypeError('The \"value\" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t==\"number\"?t=uf.from([t]):typeof t==\"string\"?t=uf.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=uf.from(t.buffer,t.byteOffset,t.byteLength):uf.isBuffer(t)||(t=uf.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let s=this._offset(e),a=s[0],n=s[1];for(;a<this._bufs.length;a++){let c=this._bufs[a];for(;n<c.length;)if(c.length-n>=t.length){let p=c.indexOf(t,n);if(p!==-1)return this._reverseOffset([a,p]);n=c.length-t.length+1}else{let p=this._reverseOffset([a,n]);if(this._match(p,t))return p;n++}n=0}return-1};Ci.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0};(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(r){t[r]===null?Ci.prototype[r]=function(s,a){return this.slice(s,s+a)[r](0,a)}:Ci.prototype[r]=function(s=0){return this.slice(s,s+t[r])[r](0)}})(e)})();Ci.prototype._isBufferList=function(e){return e instanceof Ci||Ci.isBufferList(e)};Ci.isBufferList=function(e){return e!=null&&e[TQe]};RQe.exports=Ci});var NQe=L((CIr,ON)=>{\"use strict\";var e7=_w().Duplex,zNt=ug(),wb=FQe();function na(t){if(!(this instanceof na))return new na(t);if(typeof t==\"function\"){this._callback=t;let e=function(s){this._callback&&(this._callback(s),this._callback=null)}.bind(this);this.on(\"pipe\",function(s){s.on(\"error\",e)}),this.on(\"unpipe\",function(s){s.removeListener(\"error\",e)}),t=null}wb._init.call(this,t),e7.call(this)}zNt(na,e7);Object.assign(na.prototype,wb.prototype);na.prototype._new=function(e){return new na(e)};na.prototype._write=function(e,r,s){this._appendBuffer(e),typeof s==\"function\"&&s()};na.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};na.prototype.end=function(e){e7.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};na.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};na.prototype._isBufferList=function(e){return e instanceof na||e instanceof wb||na.isBufferList(e)};na.isBufferList=wb.isBufferList;ON.exports=na;ON.exports.BufferListStream=na;ON.exports.BufferList=wb});var n7=L(Hw=>{var ZNt=Buffer.alloc,XNt=\"0000000000000000000\",$Nt=\"7777777777777777777\",OQe=48,LQe=Buffer.from(\"ustar\\0\",\"binary\"),eOt=Buffer.from(\"00\",\"binary\"),tOt=Buffer.from(\"ustar \",\"binary\"),rOt=Buffer.from(\" \\0\",\"binary\"),nOt=parseInt(\"7777\",8),Bb=257,r7=263,iOt=function(t,e,r){return typeof t!=\"number\"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)},sOt=function(t){switch(t){case 0:return\"file\";case 1:return\"link\";case 2:return\"symlink\";case 3:return\"character-device\";case 4:return\"block-device\";case 5:return\"directory\";case 6:return\"fifo\";case 7:return\"contiguous-file\";case 72:return\"pax-header\";case 55:return\"pax-global-header\";case 27:return\"gnu-long-link-path\";case 28:case 30:return\"gnu-long-path\"}return null},oOt=function(t){switch(t){case\"file\":return 0;case\"link\":return 1;case\"symlink\":return 2;case\"character-device\":return 3;case\"block-device\":return 4;case\"directory\":return 5;case\"fifo\":return 6;case\"contiguous-file\":return 7;case\"pax-header\":return 72}return 0},MQe=function(t,e,r,s){for(;r<s;r++)if(t[r]===e)return r;return s},_Qe=function(t){for(var e=256,r=0;r<148;r++)e+=t[r];for(var s=156;s<512;s++)e+=t[s];return e},gg=function(t,e){return t=t.toString(8),t.length>e?$Nt.slice(0,e)+\" \":XNt.slice(0,e-t.length)+t+\" \"};function aOt(t){var e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;for(var r=[],s=t.length-1;s>0;s--){var a=t[s];e?r.push(a):r.push(255-a)}var n=0,c=r.length;for(s=0;s<c;s++)n+=r[s]*Math.pow(256,s);return e?n:-1*n}var dg=function(t,e,r){if(t=t.slice(e,e+r),e=0,t[e]&128)return aOt(t);for(;e<t.length&&t[e]===32;)e++;for(var s=iOt(MQe(t,32,e,t.length),t.length,t.length);e<s&&t[e]===0;)e++;return s===e?0:parseInt(t.slice(e,s).toString(),8)},Uw=function(t,e,r,s){return t.slice(e,MQe(t,0,e,e+r)).toString(s)},t7=function(t){var e=Buffer.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t};Hw.decodeLongPath=function(t,e){return Uw(t,0,t.length,e)};Hw.encodePax=function(t){var e=\"\";t.name&&(e+=t7(\" path=\"+t.name+`\n`)),t.linkname&&(e+=t7(\" linkpath=\"+t.linkname+`\n`));var r=t.pax;if(r)for(var s in r)e+=t7(\" \"+s+\"=\"+r[s]+`\n`);return Buffer.from(e)};Hw.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var s=parseInt(t.slice(0,r).toString(),10);if(!s)return e;var a=t.slice(r+1,s-1).toString(),n=a.indexOf(\"=\");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(s)}return e};Hw.encode=function(t){var e=ZNt(512),r=t.name,s=\"\";if(t.typeflag===5&&r[r.length-1]!==\"/\"&&(r+=\"/\"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf(\"/\");if(a===-1)return null;s+=s?\"/\"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(gg(t.mode&nOt,6),100),e.write(gg(t.uid,6),108),e.write(gg(t.gid,6),116),e.write(gg(t.size,11),124),e.write(gg(t.mtime.getTime()/1e3|0,11),136),e[156]=OQe+oOt(t.type),t.linkname&&e.write(t.linkname,157),LQe.copy(e,Bb),eOt.copy(e,r7),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(gg(t.devmajor||0,6),329),e.write(gg(t.devminor||0,6),337),s&&e.write(s,345),e.write(gg(_Qe(e),6),148),e)};Hw.decode=function(t,e,r){var s=t[156]===0?0:t[156]-OQe,a=Uw(t,0,100,e),n=dg(t,100,8),c=dg(t,108,8),f=dg(t,116,8),p=dg(t,124,12),h=dg(t,136,12),E=sOt(s),C=t[157]===0?null:Uw(t,157,100,e),S=Uw(t,265,32),P=Uw(t,297,32),I=dg(t,329,8),R=dg(t,337,8),N=_Qe(t);if(N===8*32)return null;if(N!==dg(t,148,8))throw new Error(\"Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?\");if(LQe.compare(t,Bb,Bb+6)===0)t[345]&&(a=Uw(t,345,155,e)+\"/\"+a);else if(!(tOt.compare(t,Bb,Bb+6)===0&&rOt.compare(t,r7,r7+2)===0)){if(!r)throw new Error(\"Invalid tar header: unknown format.\")}return s===0&&a&&a[a.length-1]===\"/\"&&(s=5),{name:a,mode:n,uid:c,gid:f,size:p,mtime:new Date(1e3*h),type:E,linkname:C,uname:S,gname:P,devmajor:I,devminor:R}}});var YQe=L((BIr,WQe)=>{var HQe=ye(\"util\"),lOt=NQe(),vb=n7(),jQe=_w().Writable,qQe=_w().PassThrough,GQe=function(){},UQe=function(t){return t&=511,t&&512-t},cOt=function(t,e){var r=new LN(t,e);return r.end(),r},uOt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},LN=function(t,e){this._parent=t,this.offset=e,qQe.call(this,{autoDestroy:!1})};HQe.inherits(LN,qQe);LN.prototype.destroy=function(t){this._parent.destroy(t)};var Ah=function(t){if(!(this instanceof Ah))return new Ah(t);jQe.call(this,t),t=t||{},this._offset=0,this._buffer=lOt(),this._missing=0,this._partial=!1,this._onparse=GQe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,s=function(){e._continue()},a=function(S){if(e._locked=!1,S)return e.destroy(S);e._stream||s()},n=function(){e._stream=null;var S=UQe(e._header.size);S?e._parse(S,c):e._parse(512,C),e._locked||s()},c=function(){e._buffer.consume(UQe(e._header.size)),e._parse(512,C),s()},f=function(){var S=e._header.size;e._paxGlobal=vb.decodePax(r.slice(0,S)),r.consume(S),n()},p=function(){var S=e._header.size;e._pax=vb.decodePax(r.slice(0,S)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(S),n()},h=function(){var S=e._header.size;this._gnuLongPath=vb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},E=function(){var S=e._header.size;this._gnuLongLinkPath=vb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},C=function(){var S=e._offset,P;try{P=e._header=vb.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(I){e.emit(\"error\",I)}if(r.consume(512),!P){e._parse(512,C),s();return}if(P.type===\"gnu-long-path\"){e._parse(P.size,h),s();return}if(P.type===\"gnu-long-link-path\"){e._parse(P.size,E),s();return}if(P.type===\"pax-global-header\"){e._parse(P.size,f),s();return}if(P.type===\"pax-header\"){e._parse(P.size,p),s();return}if(e._gnuLongPath&&(P.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(P.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=P=uOt(P,e._pax),e._pax=null),e._locked=!0,!P.size||P.type===\"directory\"){e._parse(512,C),e.emit(\"entry\",P,cOt(e,S),a);return}e._stream=new LN(e,S),e.emit(\"entry\",P,e._stream,a),e._parse(P.size,n),s()};this._onheader=C,this._parse(512,C)};HQe.inherits(Ah,jQe);Ah.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit(\"error\",t),this.emit(\"close\"),this._stream&&this._stream.emit(\"close\"))};Ah.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};Ah.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=GQe,this._overflow?this._write(this._overflow,void 0,t):t()}};Ah.prototype._write=function(t,e,r){if(!this._destroyed){var s=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.length<n)return this._missing-=t.length,this._overflow=null,s?s.write(t,r):(a.append(t),r());this._cb=r,this._missing=0;var c=null;t.length>n&&(c=t.slice(n),t=t.slice(0,n)),s?s.end(t):a.append(t),this._overflow=c,this._onparse()}};Ah.prototype._final=function(t){if(this._partial)return this.destroy(new Error(\"Unexpected end of data\"));t()};WQe.exports=Ah});var KQe=L((vIr,VQe)=>{VQe.exports=ye(\"fs\").constants||ye(\"constants\")});var $Qe=L((SIr,XQe)=>{var jw=KQe(),JQe=kH(),_N=ug(),fOt=Buffer.alloc,zQe=_w().Readable,qw=_w().Writable,AOt=ye(\"string_decoder\").StringDecoder,MN=n7(),pOt=parseInt(\"755\",8),hOt=parseInt(\"644\",8),ZQe=fOt(1024),s7=function(){},i7=function(t,e){e&=511,e&&t.push(ZQe.slice(0,512-e))};function gOt(t){switch(t&jw.S_IFMT){case jw.S_IFBLK:return\"block-device\";case jw.S_IFCHR:return\"character-device\";case jw.S_IFDIR:return\"directory\";case jw.S_IFIFO:return\"fifo\";case jw.S_IFLNK:return\"symlink\"}return\"file\"}var UN=function(t){qw.call(this),this.written=0,this._to=t,this._destroyed=!1};_N(UN,qw);UN.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r};UN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit(\"close\"))};var HN=function(){qw.call(this),this.linkname=\"\",this._decoder=new AOt(\"utf-8\"),this._destroyed=!1};_N(HN,qw);HN.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()};HN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit(\"close\"))};var Sb=function(){qw.call(this),this._destroyed=!1};_N(Sb,qw);Sb.prototype._write=function(t,e,r){r(new Error(\"No body allowed for this entry\"))};Sb.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit(\"close\"))};var EA=function(t){if(!(this instanceof EA))return new EA(t);zQe.call(this,t),this._drain=s7,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};_N(EA,zQe);EA.prototype.entry=function(t,e,r){if(this._stream)throw new Error(\"already piping an entry\");if(!(this._finalized||this._destroyed)){typeof e==\"function\"&&(r=e,e=null),r||(r=s7);var s=this;if((!t.size||t.type===\"symlink\")&&(t.size=0),t.type||(t.type=gOt(t.mode)),t.mode||(t.mode=t.type===\"directory\"?pOt:hOt),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),typeof e==\"string\"&&(e=Buffer.from(e)),Buffer.isBuffer(e)){t.size=e.length,this._encode(t);var a=this.push(e);return i7(s,t.size),a?process.nextTick(r):this._drain=r,new Sb}if(t.type===\"symlink\"&&!t.linkname){var n=new HN;return JQe(n,function(f){if(f)return s.destroy(),r(f);t.linkname=n.linkname,s._encode(t),r()}),n}if(this._encode(t),t.type!==\"file\"&&t.type!==\"contiguous-file\")return process.nextTick(r),new Sb;var c=new UN(this);return this._stream=c,JQe(c,function(f){if(s._stream=null,f)return s.destroy(),r(f);if(c.written!==t.size)return s.destroy(),r(new Error(\"size mismatch\"));i7(s,t.size),s._finalizing&&s.finalize(),r()}),c}};EA.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(ZQe),this.push(null))};EA.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit(\"error\",t),this.emit(\"close\"),this._stream&&this._stream.destroy&&this._stream.destroy())};EA.prototype._encode=function(t){if(!t.pax){var e=MN.encode(t);if(e){this.push(e);return}}this._encodePax(t)};EA.prototype._encodePax=function(t){var e=MN.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:\"PaxHeader\",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:\"pax-header\",linkname:t.linkname&&\"PaxHeader\",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(MN.encode(r)),this.push(e),i7(this,e.length),r.size=t.size,r.type=t.type,this.push(MN.encode(r))};EA.prototype._read=function(t){var e=this._drain;this._drain=s7,e()};XQe.exports=EA});var eTe=L(o7=>{o7.extract=YQe();o7.pack=$Qe()});var pTe=L(Ra=>{\"use strict\";var POt=Ra&&Ra.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ra,\"__esModule\",{value:!0});Ra.Minipass=Ra.isWritable=Ra.isReadable=Ra.isStream=void 0;var lTe=typeof process==\"object\"&&process?process:{stdout:null,stderr:null},y7=ye(\"node:events\"),ATe=POt(ye(\"node:stream\")),xOt=ye(\"node:string_decoder\"),kOt=t=>!!t&&typeof t==\"object\"&&(t instanceof zN||t instanceof ATe.default||(0,Ra.isReadable)(t)||(0,Ra.isWritable)(t));Ra.isStream=kOt;var QOt=t=>!!t&&typeof t==\"object\"&&t instanceof y7.EventEmitter&&typeof t.pipe==\"function\"&&t.pipe!==ATe.default.Writable.prototype.pipe;Ra.isReadable=QOt;var TOt=t=>!!t&&typeof t==\"object\"&&t instanceof y7.EventEmitter&&typeof t.write==\"function\"&&typeof t.end==\"function\";Ra.isWritable=TOt;var ph=Symbol(\"EOF\"),hh=Symbol(\"maybeEmitEnd\"),mg=Symbol(\"emittedEnd\"),GN=Symbol(\"emittingEnd\"),Db=Symbol(\"emittedError\"),WN=Symbol(\"closed\"),cTe=Symbol(\"read\"),YN=Symbol(\"flush\"),uTe=Symbol(\"flushChunk\"),ff=Symbol(\"encoding\"),Ww=Symbol(\"decoder\"),zs=Symbol(\"flowing\"),bb=Symbol(\"paused\"),Yw=Symbol(\"resume\"),Zs=Symbol(\"buffer\"),Ta=Symbol(\"pipes\"),Xs=Symbol(\"bufferLength\"),A7=Symbol(\"bufferPush\"),VN=Symbol(\"bufferShift\"),ia=Symbol(\"objectMode\"),ts=Symbol(\"destroyed\"),p7=Symbol(\"error\"),h7=Symbol(\"emitData\"),fTe=Symbol(\"emitEnd\"),g7=Symbol(\"emitEnd2\"),CA=Symbol(\"async\"),d7=Symbol(\"abort\"),KN=Symbol(\"aborted\"),Pb=Symbol(\"signal\"),Zm=Symbol(\"dataListeners\"),nc=Symbol(\"discarded\"),xb=t=>Promise.resolve().then(t),ROt=t=>t(),FOt=t=>t===\"end\"||t===\"finish\"||t===\"prefinish\",NOt=t=>t instanceof ArrayBuffer||!!t&&typeof t==\"object\"&&t.constructor&&t.constructor.name===\"ArrayBuffer\"&&t.byteLength>=0,OOt=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),JN=class{src;dest;opts;ondrain;constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[Yw](),this.dest.on(\"drain\",this.ondrain)}unpipe(){this.dest.removeListener(\"drain\",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},m7=class extends JN{unpipe(){this.src.removeListener(\"error\",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit(\"error\",a),e.on(\"error\",this.proxyErrors)}},LOt=t=>!!t.objectMode,MOt=t=>!t.objectMode&&!!t.encoding&&t.encoding!==\"buffer\",zN=class extends y7.EventEmitter{[zs]=!1;[bb]=!1;[Ta]=[];[Zs]=[];[ia];[ff];[CA];[Ww];[ph]=!1;[mg]=!1;[GN]=!1;[WN]=!1;[Db]=null;[Xs]=0;[ts]=!1;[Pb];[KN]=!1;[Zm]=0;[nc]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding==\"string\")throw new TypeError(\"Encoding and objectMode may not be used together\");LOt(r)?(this[ia]=!0,this[ff]=null):MOt(r)?(this[ff]=r.encoding,this[ia]=!1):(this[ia]=!1,this[ff]=null),this[CA]=!!r.async,this[Ww]=this[ff]?new xOt.StringDecoder(this[ff]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,\"buffer\",{get:()=>this[Zs]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,\"pipes\",{get:()=>this[Ta]});let{signal:s}=r;s&&(this[Pb]=s,s.aborted?this[d7]():s.addEventListener(\"abort\",()=>this[d7]()))}get bufferLength(){return this[Xs]}get encoding(){return this[ff]}set encoding(e){throw new Error(\"Encoding must be set at instantiation time\")}setEncoding(e){throw new Error(\"Encoding must be set at instantiation time\")}get objectMode(){return this[ia]}set objectMode(e){throw new Error(\"objectMode must be set at instantiation time\")}get async(){return this[CA]}set async(e){this[CA]=this[CA]||!!e}[d7](){this[KN]=!0,this.emit(\"abort\",this[Pb]?.reason),this.destroy(this[Pb]?.reason)}get aborted(){return this[KN]}set aborted(e){}write(e,r,s){if(this[KN])return!1;if(this[ph])throw new Error(\"write after end\");if(this[ts])return this.emit(\"error\",Object.assign(new Error(\"Cannot call write after a stream was destroyed\"),{code:\"ERR_STREAM_DESTROYED\"})),!0;typeof r==\"function\"&&(s=r,r=\"utf8\"),r||(r=\"utf8\");let a=this[CA]?xb:ROt;if(!this[ia]&&!Buffer.isBuffer(e)){if(OOt(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(NOt(e))e=Buffer.from(e);else if(typeof e!=\"string\")throw new Error(\"Non-contiguous data written to non-objectMode stream\")}return this[ia]?(this[zs]&&this[Xs]!==0&&this[YN](!0),this[zs]?this.emit(\"data\",e):this[A7](e),this[Xs]!==0&&this.emit(\"readable\"),s&&a(s),this[zs]):e.length?(typeof e==\"string\"&&!(r===this[ff]&&!this[Ww]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[ff]&&(e=this[Ww].write(e)),this[zs]&&this[Xs]!==0&&this[YN](!0),this[zs]?this.emit(\"data\",e):this[A7](e),this[Xs]!==0&&this.emit(\"readable\"),s&&a(s),this[zs]):(this[Xs]!==0&&this.emit(\"readable\"),s&&a(s),this[zs])}read(e){if(this[ts])return null;if(this[nc]=!1,this[Xs]===0||e===0||e&&e>this[Xs])return this[hh](),null;this[ia]&&(e=null),this[Zs].length>1&&!this[ia]&&(this[Zs]=[this[ff]?this[Zs].join(\"\"):Buffer.concat(this[Zs],this[Xs])]);let r=this[cTe](e||null,this[Zs][0]);return this[hh](),r}[cTe](e,r){if(this[ia])this[VN]();else{let s=r;e===s.length||e===null?this[VN]():typeof s==\"string\"?(this[Zs][0]=s.slice(e),r=s.slice(0,e),this[Xs]-=e):(this[Zs][0]=s.subarray(e),r=s.subarray(0,e),this[Xs]-=e)}return this.emit(\"data\",r),!this[Zs].length&&!this[ph]&&this.emit(\"drain\"),r}end(e,r,s){return typeof e==\"function\"&&(s=e,e=void 0),typeof r==\"function\"&&(s=r,r=\"utf8\"),e!==void 0&&this.write(e,r),s&&this.once(\"end\",s),this[ph]=!0,this.writable=!1,(this[zs]||!this[bb])&&this[hh](),this}[Yw](){this[ts]||(!this[Zm]&&!this[Ta].length&&(this[nc]=!0),this[bb]=!1,this[zs]=!0,this.emit(\"resume\"),this[Zs].length?this[YN]():this[ph]?this[hh]():this.emit(\"drain\"))}resume(){return this[Yw]()}pause(){this[zs]=!1,this[bb]=!0,this[nc]=!1}get destroyed(){return this[ts]}get flowing(){return this[zs]}get paused(){return this[bb]}[A7](e){this[ia]?this[Xs]+=1:this[Xs]+=e.length,this[Zs].push(e)}[VN](){return this[ia]?this[Xs]-=1:this[Xs]-=this[Zs][0].length,this[Zs].shift()}[YN](e=!1){do;while(this[uTe](this[VN]())&&this[Zs].length);!e&&!this[Zs].length&&!this[ph]&&this.emit(\"drain\")}[uTe](e){return this.emit(\"data\",e),this[zs]}pipe(e,r){if(this[ts])return e;this[nc]=!1;let s=this[mg];return r=r||{},e===lTe.stdout||e===lTe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this[Ta].push(r.proxyErrors?new m7(this,e,r):new JN(this,e,r)),this[CA]?xb(()=>this[Yw]()):this[Yw]()),e}unpipe(e){let r=this[Ta].find(s=>s.dest===e);r&&(this[Ta].length===1?(this[zs]&&this[Zm]===0&&(this[zs]=!1),this[Ta]=[]):this[Ta].splice(this[Ta].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);if(e===\"data\")this[nc]=!1,this[Zm]++,!this[Ta].length&&!this[zs]&&this[Yw]();else if(e===\"readable\"&&this[Xs]!==0)super.emit(\"readable\");else if(FOt(e)&&this[mg])super.emit(e),this.removeAllListeners(e);else if(e===\"error\"&&this[Db]){let a=r;this[CA]?xb(()=>a.call(this,this[Db])):a.call(this,this[Db])}return s}removeListener(e,r){return this.off(e,r)}off(e,r){let s=super.off(e,r);return e===\"data\"&&(this[Zm]=this.listeners(\"data\").length,this[Zm]===0&&!this[nc]&&!this[Ta].length&&(this[zs]=!1)),s}removeAllListeners(e){let r=super.removeAllListeners(e);return(e===\"data\"||e===void 0)&&(this[Zm]=0,!this[nc]&&!this[Ta].length&&(this[zs]=!1)),r}get emittedEnd(){return this[mg]}[hh](){!this[GN]&&!this[mg]&&!this[ts]&&this[Zs].length===0&&this[ph]&&(this[GN]=!0,this.emit(\"end\"),this.emit(\"prefinish\"),this.emit(\"finish\"),this[WN]&&this.emit(\"close\"),this[GN]=!1)}emit(e,...r){let s=r[0];if(e!==\"error\"&&e!==\"close\"&&e!==ts&&this[ts])return!1;if(e===\"data\")return!this[ia]&&!s?!1:this[CA]?(xb(()=>this[h7](s)),!0):this[h7](s);if(e===\"end\")return this[fTe]();if(e===\"close\"){if(this[WN]=!0,!this[mg]&&!this[ts])return!1;let n=super.emit(\"close\");return this.removeAllListeners(\"close\"),n}else if(e===\"error\"){this[Db]=s,super.emit(p7,s);let n=!this[Pb]||this.listeners(\"error\").length?super.emit(\"error\",s):!1;return this[hh](),n}else if(e===\"resume\"){let n=super.emit(\"resume\");return this[hh](),n}else if(e===\"finish\"||e===\"prefinish\"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,...r);return this[hh](),a}[h7](e){for(let s of this[Ta])s.dest.write(e)===!1&&this.pause();let r=this[nc]?!1:super.emit(\"data\",e);return this[hh](),r}[fTe](){return this[mg]?!1:(this[mg]=!0,this.readable=!1,this[CA]?(xb(()=>this[g7]()),!0):this[g7]())}[g7](){if(this[Ww]){let r=this[Ww].end();if(r){for(let s of this[Ta])s.dest.write(r);this[nc]||super.emit(\"data\",r)}}for(let r of this[Ta])r.end();let e=super.emit(\"end\");return this.removeAllListeners(\"end\"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ia]||(e.dataLength=0);let r=this.promise();return this.on(\"data\",s=>{e.push(s),this[ia]||(e.dataLength+=s.length)}),await r,e}async concat(){if(this[ia])throw new Error(\"cannot concat in objectMode\");let e=await this.collect();return this[ff]?e.join(\"\"):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ts,()=>r(new Error(\"stream destroyed\"))),this.on(\"error\",s=>r(s)),this.on(\"end\",()=>e())})}[Symbol.asyncIterator](){this[nc]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let a=this.read();if(a!==null)return Promise.resolve({done:!1,value:a});if(this[ph])return r();let n,c,f=C=>{this.off(\"data\",p),this.off(\"end\",h),this.off(ts,E),r(),c(C)},p=C=>{this.off(\"error\",f),this.off(\"end\",h),this.off(ts,E),this.pause(),n({value:C,done:!!this[ph]})},h=()=>{this.off(\"error\",f),this.off(\"data\",p),this.off(ts,E),r(),n({done:!0,value:void 0})},E=()=>f(new Error(\"stream destroyed\"));return new Promise((C,S)=>{c=S,n=C,this.once(ts,E),this.once(\"error\",f),this.once(\"end\",h),this.once(\"data\",p)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[nc]=!1;let e=!1,r=()=>(this.pause(),this.off(p7,r),this.off(ts,r),this.off(\"end\",r),e=!0,{done:!0,value:void 0}),s=()=>{if(e)return r();let a=this.read();return a===null?r():{done:!1,value:a}};return this.once(\"end\",r),this.once(p7,r),this.once(ts,r),{next:s,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ts])return e?this.emit(\"error\",e):this.emit(ts),this;this[ts]=!0,this[nc]=!0,this[Zs].length=0,this[Xs]=0;let r=this;return typeof r.close==\"function\"&&!this[WN]&&r.close(),e?this.emit(\"error\",e):this.emit(ts),this}static get isStream(){return Ra.isStream}};Ra.Minipass=zN});var dTe=L((YIr,wA)=>{\"use strict\";var Qb=ye(\"crypto\"),{Minipass:_Ot}=pTe(),I7=[\"sha512\",\"sha384\",\"sha256\"],w7=[\"sha512\"],UOt=/^[a-z0-9+/]+(?:=?=?)$/i,HOt=/^([a-z0-9]+)-([^?]+)([?\\S*]*)$/,jOt=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\\?[\\x21-\\x7E]*)?$/,qOt=/^[\\x21-\\x7E]+$/,Tb=t=>t?.length?`?${t.join(\"?\")}`:\"\",C7=class extends _Ot{#t;#r;#i;constructor(e){super(),this.size=0,this.opts=e,this.#e(),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...w7],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(Qb.createHash)}#e(){this.sri=this.opts?.integrity?ic(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=Tb(this.opts?.options)}on(e,r){return e===\"size\"&&this.#r?r(this.#r):e===\"integrity\"&&this.#t?r(this.#t):e===\"verified\"&&this.#i?r(this.#i):super.on(e,r)}emit(e,r){return e===\"end\"&&this.#n(),super.emit(e,r)}write(e){return this.size+=e.length,this.hashes.forEach(r=>r.update(e)),super.write(e)}#n(){this.goodSri||this.#e();let e=ic(this.hashes.map((s,a)=>`${this.algorithms[a]}-${s.digest(\"base64\")}${this.optString}`).join(\" \"),this.opts),r=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize==\"number\"&&this.size!==this.expectedSize){let s=new Error(`stream size mismatch when checking ${this.sri}.\n  Wanted: ${this.expectedSize}\n  Found: ${this.size}`);s.code=\"EBADSIZE\",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit(\"error\",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);s.code=\"EINTEGRITY\",s.found=e,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit(\"error\",s)}else this.#r=this.size,this.emit(\"size\",this.size),this.#t=e,this.emit(\"integrity\",e),r&&(this.#i=r,this.emit(\"verified\",r))}},gh=class{get isHash(){return!0}constructor(e,r){let s=r?.strict;this.source=e.trim(),this.digest=\"\",this.algorithm=\"\",this.options=[];let a=this.source.match(s?jOt:HOt);if(!a||s&&!I7.includes(a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];n&&(this.options=n.slice(1).split(\"?\"))}hexDigest(){return this.digest&&Buffer.from(this.digest,\"base64\").toString(\"hex\")}toJSON(){return this.toString()}match(e,r){let s=ic(e,r);if(!s)return!1;if(s.isIntegrity){let a=s.pickAlgorithm(r,[this.algorithm]);if(!a)return!1;let n=s[a].find(c=>c.digest===this.digest);return n||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(I7.includes(this.algorithm)&&this.digest.match(UOt)&&this.options.every(r=>r.match(qOt)))?\"\":`${this.algorithm}-${this.digest}${Tb(this.options)}`}};function hTe(t,e,r,s){let a=t!==\"\",n=!1,c=\"\",f=s.length-1;for(let h=0;h<f;h++){let E=gh.prototype.toString.call(s[h],r);E&&(n=!0,c+=E,c+=e)}let p=gh.prototype.toString.call(s[f],r);return p&&(n=!0,c+=p),a&&n?t+e+c:t+c}var Xm=class{get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let r=e?.sep||\" \",s=\"\";if(e?.strict){r=r.replace(/\\S+/g,\" \");for(let a of I7)this[a]&&(s=hTe(s,r,e,this[a]))}else for(let a of Object.keys(this))s=hTe(s,r,e,this[a]);return s}concat(e,r){let s=typeof e==\"string\"?e:kb(e,r);return ic(`${this.toString(r)} ${s}`,r)}hexDigest(){return ic(this,{single:!0}).hexDigest()}merge(e,r){let s=ic(e,r);for(let a in s)if(this[a]){if(!this[a].find(n=>s[a].find(c=>n.digest===c.digest)))throw new Error(\"hashes do not match, cannot update integrity\")}else this[a]=s[a]}match(e,r){let s=ic(e,r);if(!s)return!1;let a=s.pickAlgorithm(r,Object.keys(this));return!!a&&this[a]&&s[a]&&this[a].find(n=>s[a].find(c=>n.digest===c.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||ZOt,a=Object.keys(this).filter(n=>r?.length?r.includes(n):!0);return a.length?a.reduce((n,c)=>s(n,c)||n):null}};wA.exports.parse=ic;function ic(t,e){if(!t)return null;if(typeof t==\"string\")return E7(t,e);if(t.algorithm&&t.digest){let r=new Xm;return r[t.algorithm]=[t],E7(kb(r,e),e)}else return E7(kb(t,e),e)}function E7(t,e){if(e?.single)return new gh(t,e);let r=t.trim().split(/\\s+/).reduce((s,a)=>{let n=new gh(a,e);if(n.algorithm&&n.digest){let c=n.algorithm;s[c]||(s[c]=[]),s[c].push(n)}return s},new Xm);return r.isEmpty()?null:r}wA.exports.stringify=kb;function kb(t,e){return t.algorithm&&t.digest?gh.prototype.toString.call(t,e):typeof t==\"string\"?kb(ic(t,e),e):Xm.prototype.toString.call(t,e)}wA.exports.fromHex=GOt;function GOt(t,e,r){let s=Tb(r?.options);return ic(`${e}-${Buffer.from(t,\"hex\").toString(\"base64\")}${s}`,r)}wA.exports.fromData=WOt;function WOt(t,e){let r=e?.algorithms||[...w7],s=Tb(e?.options);return r.reduce((a,n)=>{let c=Qb.createHash(n).update(t).digest(\"base64\"),f=new gh(`${n}-${c}${s}`,e);if(f.algorithm&&f.digest){let p=f.algorithm;a[p]||(a[p]=[]),a[p].push(f)}return a},new Xm)}wA.exports.fromStream=YOt;function YOt(t,e){let r=B7(e);return new Promise((s,a)=>{t.pipe(r),t.on(\"error\",a),r.on(\"error\",a);let n;r.on(\"integrity\",c=>{n=c}),r.on(\"end\",()=>s(n)),r.resume()})}wA.exports.checkData=VOt;function VOt(t,e,r){if(e=ic(e,r),!e||!Object.keys(e).length){if(r?.error)throw Object.assign(new Error(\"No valid integrity hashes to check against\"),{code:\"EINTEGRITY\"});return!1}let s=e.pickAlgorithm(r),a=Qb.createHash(s).update(t).digest(\"base64\"),n=ic({algorithm:s,digest:a}),c=n.match(e,r);if(r=r||{},c||!r.error)return c;if(typeof r.size==\"number\"&&t.length!==r.size){let f=new Error(`data size mismatch when checking ${e}.\n  Wanted: ${r.size}\n  Found: ${t.length}`);throw f.code=\"EBADSIZE\",f.found=t.length,f.expected=r.size,f.sri=e,f}else{let f=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw f.code=\"EINTEGRITY\",f.found=n,f.expected=e,f.algorithm=s,f.sri=e,f}}wA.exports.checkStream=KOt;function KOt(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=ic(e,r),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error(\"No valid integrity hashes to check against\"),{code:\"EINTEGRITY\"}));let s=B7(r);return new Promise((a,n)=>{t.pipe(s),t.on(\"error\",n),s.on(\"error\",n);let c;s.on(\"verified\",f=>{c=f}),s.on(\"end\",()=>a(c)),s.resume()})}wA.exports.integrityStream=B7;function B7(t=Object.create(null)){return new C7(t)}wA.exports.create=JOt;function JOt(t){let e=t?.algorithms||[...w7],r=Tb(t?.options),s=e.map(Qb.createHash);return{update:function(a,n){return s.forEach(c=>c.update(a,n)),this},digest:function(){return e.reduce((n,c)=>{let f=s.shift().digest(\"base64\"),p=new gh(`${c}-${f}${r}`,t);if(p.algorithm&&p.digest){let h=p.algorithm;n[h]||(n[h]=[]),n[h].push(p)}return n},new Xm)}}}var zOt=Qb.getHashes(),gTe=[\"md5\",\"whirlpool\",\"sha1\",\"sha224\",\"sha256\",\"sha384\",\"sha512\",\"sha3\",\"sha3-256\",\"sha3-384\",\"sha3-512\",\"sha3_256\",\"sha3_384\",\"sha3_512\"].filter(t=>zOt.includes(t));function ZOt(t,e){return gTe.indexOf(t.toLowerCase())>=gTe.indexOf(e.toLowerCase())?t:e}});var v7=L(yg=>{\"use strict\";Object.defineProperty(yg,\"__esModule\",{value:!0});yg.Signature=yg.Envelope=void 0;yg.Envelope={fromJSON(t){return{payload:ZN(t.payload)?Buffer.from(mTe(t.payload)):Buffer.alloc(0),payloadType:ZN(t.payloadType)?globalThis.String(t.payloadType):\"\",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>yg.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=yTe(t.payload)),t.payloadType!==\"\"&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>yg.Signature.toJSON(r))),e}};yg.Signature={fromJSON(t){return{sig:ZN(t.sig)?Buffer.from(mTe(t.sig)):Buffer.alloc(0),keyid:ZN(t.keyid)?globalThis.String(t.keyid):\"\"}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=yTe(t.sig)),t.keyid!==\"\"&&(e.keyid=t.keyid),e}};function mTe(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function yTe(t){return globalThis.Buffer.from(t).toString(\"base64\")}function ZN(t){return t!=null}});var ITe=L(XN=>{\"use strict\";Object.defineProperty(XN,\"__esModule\",{value:!0});XN.Timestamp=void 0;XN.Timestamp={fromJSON(t){return{seconds:ETe(t.seconds)?globalThis.String(t.seconds):\"0\",nanos:ETe(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!==\"0\"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function ETe(t){return t!=null}});var Vw=L(_r=>{\"use strict\";Object.defineProperty(_r,\"__esModule\",{value:!0});_r.TimeRange=_r.X509CertificateChain=_r.SubjectAlternativeName=_r.X509Certificate=_r.DistinguishedName=_r.ObjectIdentifierValuePair=_r.ObjectIdentifier=_r.PublicKeyIdentifier=_r.PublicKey=_r.RFC3161SignedTimestamp=_r.LogId=_r.MessageSignature=_r.HashOutput=_r.SubjectAlternativeNameType=_r.PublicKeyDetails=_r.HashAlgorithm=void 0;_r.hashAlgorithmFromJSON=wTe;_r.hashAlgorithmToJSON=BTe;_r.publicKeyDetailsFromJSON=vTe;_r.publicKeyDetailsToJSON=STe;_r.subjectAlternativeNameTypeFromJSON=DTe;_r.subjectAlternativeNameTypeToJSON=bTe;var XOt=ITe(),El;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]=\"HASH_ALGORITHM_UNSPECIFIED\",t[t.SHA2_256=1]=\"SHA2_256\",t[t.SHA2_384=2]=\"SHA2_384\",t[t.SHA2_512=3]=\"SHA2_512\",t[t.SHA3_256=4]=\"SHA3_256\",t[t.SHA3_384=5]=\"SHA3_384\"})(El||(_r.HashAlgorithm=El={}));function wTe(t){switch(t){case 0:case\"HASH_ALGORITHM_UNSPECIFIED\":return El.HASH_ALGORITHM_UNSPECIFIED;case 1:case\"SHA2_256\":return El.SHA2_256;case 2:case\"SHA2_384\":return El.SHA2_384;case 3:case\"SHA2_512\":return El.SHA2_512;case 4:case\"SHA3_256\":return El.SHA3_256;case 5:case\"SHA3_384\":return El.SHA3_384;default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum HashAlgorithm\")}}function BTe(t){switch(t){case El.HASH_ALGORITHM_UNSPECIFIED:return\"HASH_ALGORITHM_UNSPECIFIED\";case El.SHA2_256:return\"SHA2_256\";case El.SHA2_384:return\"SHA2_384\";case El.SHA2_512:return\"SHA2_512\";case El.SHA3_256:return\"SHA3_256\";case El.SHA3_384:return\"SHA3_384\";default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum HashAlgorithm\")}}var rn;(function(t){t[t.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]=\"PUBLIC_KEY_DETAILS_UNSPECIFIED\",t[t.PKCS1_RSA_PKCS1V5=1]=\"PKCS1_RSA_PKCS1V5\",t[t.PKCS1_RSA_PSS=2]=\"PKCS1_RSA_PSS\",t[t.PKIX_RSA_PKCS1V5=3]=\"PKIX_RSA_PKCS1V5\",t[t.PKIX_RSA_PSS=4]=\"PKIX_RSA_PSS\",t[t.PKIX_RSA_PKCS1V15_2048_SHA256=9]=\"PKIX_RSA_PKCS1V15_2048_SHA256\",t[t.PKIX_RSA_PKCS1V15_3072_SHA256=10]=\"PKIX_RSA_PKCS1V15_3072_SHA256\",t[t.PKIX_RSA_PKCS1V15_4096_SHA256=11]=\"PKIX_RSA_PKCS1V15_4096_SHA256\",t[t.PKIX_RSA_PSS_2048_SHA256=16]=\"PKIX_RSA_PSS_2048_SHA256\",t[t.PKIX_RSA_PSS_3072_SHA256=17]=\"PKIX_RSA_PSS_3072_SHA256\",t[t.PKIX_RSA_PSS_4096_SHA256=18]=\"PKIX_RSA_PSS_4096_SHA256\",t[t.PKIX_ECDSA_P256_HMAC_SHA_256=6]=\"PKIX_ECDSA_P256_HMAC_SHA_256\",t[t.PKIX_ECDSA_P256_SHA_256=5]=\"PKIX_ECDSA_P256_SHA_256\",t[t.PKIX_ECDSA_P384_SHA_384=12]=\"PKIX_ECDSA_P384_SHA_384\",t[t.PKIX_ECDSA_P521_SHA_512=13]=\"PKIX_ECDSA_P521_SHA_512\",t[t.PKIX_ED25519=7]=\"PKIX_ED25519\",t[t.PKIX_ED25519_PH=8]=\"PKIX_ED25519_PH\",t[t.LMS_SHA256=14]=\"LMS_SHA256\",t[t.LMOTS_SHA256=15]=\"LMOTS_SHA256\"})(rn||(_r.PublicKeyDetails=rn={}));function vTe(t){switch(t){case 0:case\"PUBLIC_KEY_DETAILS_UNSPECIFIED\":return rn.PUBLIC_KEY_DETAILS_UNSPECIFIED;case 1:case\"PKCS1_RSA_PKCS1V5\":return rn.PKCS1_RSA_PKCS1V5;case 2:case\"PKCS1_RSA_PSS\":return rn.PKCS1_RSA_PSS;case 3:case\"PKIX_RSA_PKCS1V5\":return rn.PKIX_RSA_PKCS1V5;case 4:case\"PKIX_RSA_PSS\":return rn.PKIX_RSA_PSS;case 9:case\"PKIX_RSA_PKCS1V15_2048_SHA256\":return rn.PKIX_RSA_PKCS1V15_2048_SHA256;case 10:case\"PKIX_RSA_PKCS1V15_3072_SHA256\":return rn.PKIX_RSA_PKCS1V15_3072_SHA256;case 11:case\"PKIX_RSA_PKCS1V15_4096_SHA256\":return rn.PKIX_RSA_PKCS1V15_4096_SHA256;case 16:case\"PKIX_RSA_PSS_2048_SHA256\":return rn.PKIX_RSA_PSS_2048_SHA256;case 17:case\"PKIX_RSA_PSS_3072_SHA256\":return rn.PKIX_RSA_PSS_3072_SHA256;case 18:case\"PKIX_RSA_PSS_4096_SHA256\":return rn.PKIX_RSA_PSS_4096_SHA256;case 6:case\"PKIX_ECDSA_P256_HMAC_SHA_256\":return rn.PKIX_ECDSA_P256_HMAC_SHA_256;case 5:case\"PKIX_ECDSA_P256_SHA_256\":return rn.PKIX_ECDSA_P256_SHA_256;case 12:case\"PKIX_ECDSA_P384_SHA_384\":return rn.PKIX_ECDSA_P384_SHA_384;case 13:case\"PKIX_ECDSA_P521_SHA_512\":return rn.PKIX_ECDSA_P521_SHA_512;case 7:case\"PKIX_ED25519\":return rn.PKIX_ED25519;case 8:case\"PKIX_ED25519_PH\":return rn.PKIX_ED25519_PH;case 14:case\"LMS_SHA256\":return rn.LMS_SHA256;case 15:case\"LMOTS_SHA256\":return rn.LMOTS_SHA256;default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum PublicKeyDetails\")}}function STe(t){switch(t){case rn.PUBLIC_KEY_DETAILS_UNSPECIFIED:return\"PUBLIC_KEY_DETAILS_UNSPECIFIED\";case rn.PKCS1_RSA_PKCS1V5:return\"PKCS1_RSA_PKCS1V5\";case rn.PKCS1_RSA_PSS:return\"PKCS1_RSA_PSS\";case rn.PKIX_RSA_PKCS1V5:return\"PKIX_RSA_PKCS1V5\";case rn.PKIX_RSA_PSS:return\"PKIX_RSA_PSS\";case rn.PKIX_RSA_PKCS1V15_2048_SHA256:return\"PKIX_RSA_PKCS1V15_2048_SHA256\";case rn.PKIX_RSA_PKCS1V15_3072_SHA256:return\"PKIX_RSA_PKCS1V15_3072_SHA256\";case rn.PKIX_RSA_PKCS1V15_4096_SHA256:return\"PKIX_RSA_PKCS1V15_4096_SHA256\";case rn.PKIX_RSA_PSS_2048_SHA256:return\"PKIX_RSA_PSS_2048_SHA256\";case rn.PKIX_RSA_PSS_3072_SHA256:return\"PKIX_RSA_PSS_3072_SHA256\";case rn.PKIX_RSA_PSS_4096_SHA256:return\"PKIX_RSA_PSS_4096_SHA256\";case rn.PKIX_ECDSA_P256_HMAC_SHA_256:return\"PKIX_ECDSA_P256_HMAC_SHA_256\";case rn.PKIX_ECDSA_P256_SHA_256:return\"PKIX_ECDSA_P256_SHA_256\";case rn.PKIX_ECDSA_P384_SHA_384:return\"PKIX_ECDSA_P384_SHA_384\";case rn.PKIX_ECDSA_P521_SHA_512:return\"PKIX_ECDSA_P521_SHA_512\";case rn.PKIX_ED25519:return\"PKIX_ED25519\";case rn.PKIX_ED25519_PH:return\"PKIX_ED25519_PH\";case rn.LMS_SHA256:return\"LMS_SHA256\";case rn.LMOTS_SHA256:return\"LMOTS_SHA256\";default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum PublicKeyDetails\")}}var BA;(function(t){t[t.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED=0]=\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\",t[t.EMAIL=1]=\"EMAIL\",t[t.URI=2]=\"URI\",t[t.OTHER_NAME=3]=\"OTHER_NAME\"})(BA||(_r.SubjectAlternativeNameType=BA={}));function DTe(t){switch(t){case 0:case\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\":return BA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED;case 1:case\"EMAIL\":return BA.EMAIL;case 2:case\"URI\":return BA.URI;case 3:case\"OTHER_NAME\":return BA.OTHER_NAME;default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum SubjectAlternativeNameType\")}}function bTe(t){switch(t){case BA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED:return\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\";case BA.EMAIL:return\"EMAIL\";case BA.URI:return\"URI\";case BA.OTHER_NAME:return\"OTHER_NAME\";default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum SubjectAlternativeNameType\")}}_r.HashOutput={fromJSON(t){return{algorithm:ms(t.algorithm)?wTe(t.algorithm):0,digest:ms(t.digest)?Buffer.from($m(t.digest)):Buffer.alloc(0)}},toJSON(t){let e={};return t.algorithm!==0&&(e.algorithm=BTe(t.algorithm)),t.digest.length!==0&&(e.digest=ey(t.digest)),e}};_r.MessageSignature={fromJSON(t){return{messageDigest:ms(t.messageDigest)?_r.HashOutput.fromJSON(t.messageDigest):void 0,signature:ms(t.signature)?Buffer.from($m(t.signature)):Buffer.alloc(0)}},toJSON(t){let e={};return t.messageDigest!==void 0&&(e.messageDigest=_r.HashOutput.toJSON(t.messageDigest)),t.signature.length!==0&&(e.signature=ey(t.signature)),e}};_r.LogId={fromJSON(t){return{keyId:ms(t.keyId)?Buffer.from($m(t.keyId)):Buffer.alloc(0)}},toJSON(t){let e={};return t.keyId.length!==0&&(e.keyId=ey(t.keyId)),e}};_r.RFC3161SignedTimestamp={fromJSON(t){return{signedTimestamp:ms(t.signedTimestamp)?Buffer.from($m(t.signedTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedTimestamp.length!==0&&(e.signedTimestamp=ey(t.signedTimestamp)),e}};_r.PublicKey={fromJSON(t){return{rawBytes:ms(t.rawBytes)?Buffer.from($m(t.rawBytes)):void 0,keyDetails:ms(t.keyDetails)?vTe(t.keyDetails):0,validFor:ms(t.validFor)?_r.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.rawBytes!==void 0&&(e.rawBytes=ey(t.rawBytes)),t.keyDetails!==0&&(e.keyDetails=STe(t.keyDetails)),t.validFor!==void 0&&(e.validFor=_r.TimeRange.toJSON(t.validFor)),e}};_r.PublicKeyIdentifier={fromJSON(t){return{hint:ms(t.hint)?globalThis.String(t.hint):\"\"}},toJSON(t){let e={};return t.hint!==\"\"&&(e.hint=t.hint),e}};_r.ObjectIdentifier={fromJSON(t){return{id:globalThis.Array.isArray(t?.id)?t.id.map(e=>globalThis.Number(e)):[]}},toJSON(t){let e={};return t.id?.length&&(e.id=t.id.map(r=>Math.round(r))),e}};_r.ObjectIdentifierValuePair={fromJSON(t){return{oid:ms(t.oid)?_r.ObjectIdentifier.fromJSON(t.oid):void 0,value:ms(t.value)?Buffer.from($m(t.value)):Buffer.alloc(0)}},toJSON(t){let e={};return t.oid!==void 0&&(e.oid=_r.ObjectIdentifier.toJSON(t.oid)),t.value.length!==0&&(e.value=ey(t.value)),e}};_r.DistinguishedName={fromJSON(t){return{organization:ms(t.organization)?globalThis.String(t.organization):\"\",commonName:ms(t.commonName)?globalThis.String(t.commonName):\"\"}},toJSON(t){let e={};return t.organization!==\"\"&&(e.organization=t.organization),t.commonName!==\"\"&&(e.commonName=t.commonName),e}};_r.X509Certificate={fromJSON(t){return{rawBytes:ms(t.rawBytes)?Buffer.from($m(t.rawBytes)):Buffer.alloc(0)}},toJSON(t){let e={};return t.rawBytes.length!==0&&(e.rawBytes=ey(t.rawBytes)),e}};_r.SubjectAlternativeName={fromJSON(t){return{type:ms(t.type)?DTe(t.type):0,identity:ms(t.regexp)?{$case:\"regexp\",regexp:globalThis.String(t.regexp)}:ms(t.value)?{$case:\"value\",value:globalThis.String(t.value)}:void 0}},toJSON(t){let e={};return t.type!==0&&(e.type=bTe(t.type)),t.identity?.$case===\"regexp\"?e.regexp=t.identity.regexp:t.identity?.$case===\"value\"&&(e.value=t.identity.value),e}};_r.X509CertificateChain={fromJSON(t){return{certificates:globalThis.Array.isArray(t?.certificates)?t.certificates.map(e=>_r.X509Certificate.fromJSON(e)):[]}},toJSON(t){let e={};return t.certificates?.length&&(e.certificates=t.certificates.map(r=>_r.X509Certificate.toJSON(r))),e}};_r.TimeRange={fromJSON(t){return{start:ms(t.start)?CTe(t.start):void 0,end:ms(t.end)?CTe(t.end):void 0}},toJSON(t){let e={};return t.start!==void 0&&(e.start=t.start.toISOString()),t.end!==void 0&&(e.end=t.end.toISOString()),e}};function $m(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function ey(t){return globalThis.Buffer.from(t).toString(\"base64\")}function $Ot(t){let e=(globalThis.Number(t.seconds)||0)*1e3;return e+=(t.nanos||0)/1e6,new globalThis.Date(e)}function CTe(t){return t instanceof globalThis.Date?t:typeof t==\"string\"?new globalThis.Date(t):$Ot(XOt.Timestamp.fromJSON(t))}function ms(t){return t!=null}});var S7=L(ys=>{\"use strict\";Object.defineProperty(ys,\"__esModule\",{value:!0});ys.TransparencyLogEntry=ys.InclusionPromise=ys.InclusionProof=ys.Checkpoint=ys.KindVersion=void 0;var PTe=Vw();ys.KindVersion={fromJSON(t){return{kind:Fa(t.kind)?globalThis.String(t.kind):\"\",version:Fa(t.version)?globalThis.String(t.version):\"\"}},toJSON(t){let e={};return t.kind!==\"\"&&(e.kind=t.kind),t.version!==\"\"&&(e.version=t.version),e}};ys.Checkpoint={fromJSON(t){return{envelope:Fa(t.envelope)?globalThis.String(t.envelope):\"\"}},toJSON(t){let e={};return t.envelope!==\"\"&&(e.envelope=t.envelope),e}};ys.InclusionProof={fromJSON(t){return{logIndex:Fa(t.logIndex)?globalThis.String(t.logIndex):\"0\",rootHash:Fa(t.rootHash)?Buffer.from($N(t.rootHash)):Buffer.alloc(0),treeSize:Fa(t.treeSize)?globalThis.String(t.treeSize):\"0\",hashes:globalThis.Array.isArray(t?.hashes)?t.hashes.map(e=>Buffer.from($N(e))):[],checkpoint:Fa(t.checkpoint)?ys.Checkpoint.fromJSON(t.checkpoint):void 0}},toJSON(t){let e={};return t.logIndex!==\"0\"&&(e.logIndex=t.logIndex),t.rootHash.length!==0&&(e.rootHash=eO(t.rootHash)),t.treeSize!==\"0\"&&(e.treeSize=t.treeSize),t.hashes?.length&&(e.hashes=t.hashes.map(r=>eO(r))),t.checkpoint!==void 0&&(e.checkpoint=ys.Checkpoint.toJSON(t.checkpoint)),e}};ys.InclusionPromise={fromJSON(t){return{signedEntryTimestamp:Fa(t.signedEntryTimestamp)?Buffer.from($N(t.signedEntryTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedEntryTimestamp.length!==0&&(e.signedEntryTimestamp=eO(t.signedEntryTimestamp)),e}};ys.TransparencyLogEntry={fromJSON(t){return{logIndex:Fa(t.logIndex)?globalThis.String(t.logIndex):\"0\",logId:Fa(t.logId)?PTe.LogId.fromJSON(t.logId):void 0,kindVersion:Fa(t.kindVersion)?ys.KindVersion.fromJSON(t.kindVersion):void 0,integratedTime:Fa(t.integratedTime)?globalThis.String(t.integratedTime):\"0\",inclusionPromise:Fa(t.inclusionPromise)?ys.InclusionPromise.fromJSON(t.inclusionPromise):void 0,inclusionProof:Fa(t.inclusionProof)?ys.InclusionProof.fromJSON(t.inclusionProof):void 0,canonicalizedBody:Fa(t.canonicalizedBody)?Buffer.from($N(t.canonicalizedBody)):Buffer.alloc(0)}},toJSON(t){let e={};return t.logIndex!==\"0\"&&(e.logIndex=t.logIndex),t.logId!==void 0&&(e.logId=PTe.LogId.toJSON(t.logId)),t.kindVersion!==void 0&&(e.kindVersion=ys.KindVersion.toJSON(t.kindVersion)),t.integratedTime!==\"0\"&&(e.integratedTime=t.integratedTime),t.inclusionPromise!==void 0&&(e.inclusionPromise=ys.InclusionPromise.toJSON(t.inclusionPromise)),t.inclusionProof!==void 0&&(e.inclusionProof=ys.InclusionProof.toJSON(t.inclusionProof)),t.canonicalizedBody.length!==0&&(e.canonicalizedBody=eO(t.canonicalizedBody)),e}};function $N(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function eO(t){return globalThis.Buffer.from(t).toString(\"base64\")}function Fa(t){return t!=null}});var D7=L($c=>{\"use strict\";Object.defineProperty($c,\"__esModule\",{value:!0});$c.Bundle=$c.VerificationMaterial=$c.TimestampVerificationData=void 0;var xTe=v7(),vA=Vw(),kTe=S7();$c.TimestampVerificationData={fromJSON(t){return{rfc3161Timestamps:globalThis.Array.isArray(t?.rfc3161Timestamps)?t.rfc3161Timestamps.map(e=>vA.RFC3161SignedTimestamp.fromJSON(e)):[]}},toJSON(t){let e={};return t.rfc3161Timestamps?.length&&(e.rfc3161Timestamps=t.rfc3161Timestamps.map(r=>vA.RFC3161SignedTimestamp.toJSON(r))),e}};$c.VerificationMaterial={fromJSON(t){return{content:Eg(t.publicKey)?{$case:\"publicKey\",publicKey:vA.PublicKeyIdentifier.fromJSON(t.publicKey)}:Eg(t.x509CertificateChain)?{$case:\"x509CertificateChain\",x509CertificateChain:vA.X509CertificateChain.fromJSON(t.x509CertificateChain)}:Eg(t.certificate)?{$case:\"certificate\",certificate:vA.X509Certificate.fromJSON(t.certificate)}:void 0,tlogEntries:globalThis.Array.isArray(t?.tlogEntries)?t.tlogEntries.map(e=>kTe.TransparencyLogEntry.fromJSON(e)):[],timestampVerificationData:Eg(t.timestampVerificationData)?$c.TimestampVerificationData.fromJSON(t.timestampVerificationData):void 0}},toJSON(t){let e={};return t.content?.$case===\"publicKey\"?e.publicKey=vA.PublicKeyIdentifier.toJSON(t.content.publicKey):t.content?.$case===\"x509CertificateChain\"?e.x509CertificateChain=vA.X509CertificateChain.toJSON(t.content.x509CertificateChain):t.content?.$case===\"certificate\"&&(e.certificate=vA.X509Certificate.toJSON(t.content.certificate)),t.tlogEntries?.length&&(e.tlogEntries=t.tlogEntries.map(r=>kTe.TransparencyLogEntry.toJSON(r))),t.timestampVerificationData!==void 0&&(e.timestampVerificationData=$c.TimestampVerificationData.toJSON(t.timestampVerificationData)),e}};$c.Bundle={fromJSON(t){return{mediaType:Eg(t.mediaType)?globalThis.String(t.mediaType):\"\",verificationMaterial:Eg(t.verificationMaterial)?$c.VerificationMaterial.fromJSON(t.verificationMaterial):void 0,content:Eg(t.messageSignature)?{$case:\"messageSignature\",messageSignature:vA.MessageSignature.fromJSON(t.messageSignature)}:Eg(t.dsseEnvelope)?{$case:\"dsseEnvelope\",dsseEnvelope:xTe.Envelope.fromJSON(t.dsseEnvelope)}:void 0}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.verificationMaterial!==void 0&&(e.verificationMaterial=$c.VerificationMaterial.toJSON(t.verificationMaterial)),t.content?.$case===\"messageSignature\"?e.messageSignature=vA.MessageSignature.toJSON(t.content.messageSignature):t.content?.$case===\"dsseEnvelope\"&&(e.dsseEnvelope=xTe.Envelope.toJSON(t.content.dsseEnvelope)),e}};function Eg(t){return t!=null}});var b7=L(Ti=>{\"use strict\";Object.defineProperty(Ti,\"__esModule\",{value:!0});Ti.ClientTrustConfig=Ti.SigningConfig=Ti.TrustedRoot=Ti.CertificateAuthority=Ti.TransparencyLogInstance=void 0;var Il=Vw();Ti.TransparencyLogInstance={fromJSON(t){return{baseUrl:sa(t.baseUrl)?globalThis.String(t.baseUrl):\"\",hashAlgorithm:sa(t.hashAlgorithm)?(0,Il.hashAlgorithmFromJSON)(t.hashAlgorithm):0,publicKey:sa(t.publicKey)?Il.PublicKey.fromJSON(t.publicKey):void 0,logId:sa(t.logId)?Il.LogId.fromJSON(t.logId):void 0,checkpointKeyId:sa(t.checkpointKeyId)?Il.LogId.fromJSON(t.checkpointKeyId):void 0}},toJSON(t){let e={};return t.baseUrl!==\"\"&&(e.baseUrl=t.baseUrl),t.hashAlgorithm!==0&&(e.hashAlgorithm=(0,Il.hashAlgorithmToJSON)(t.hashAlgorithm)),t.publicKey!==void 0&&(e.publicKey=Il.PublicKey.toJSON(t.publicKey)),t.logId!==void 0&&(e.logId=Il.LogId.toJSON(t.logId)),t.checkpointKeyId!==void 0&&(e.checkpointKeyId=Il.LogId.toJSON(t.checkpointKeyId)),e}};Ti.CertificateAuthority={fromJSON(t){return{subject:sa(t.subject)?Il.DistinguishedName.fromJSON(t.subject):void 0,uri:sa(t.uri)?globalThis.String(t.uri):\"\",certChain:sa(t.certChain)?Il.X509CertificateChain.fromJSON(t.certChain):void 0,validFor:sa(t.validFor)?Il.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.subject!==void 0&&(e.subject=Il.DistinguishedName.toJSON(t.subject)),t.uri!==\"\"&&(e.uri=t.uri),t.certChain!==void 0&&(e.certChain=Il.X509CertificateChain.toJSON(t.certChain)),t.validFor!==void 0&&(e.validFor=Il.TimeRange.toJSON(t.validFor)),e}};Ti.TrustedRoot={fromJSON(t){return{mediaType:sa(t.mediaType)?globalThis.String(t.mediaType):\"\",tlogs:globalThis.Array.isArray(t?.tlogs)?t.tlogs.map(e=>Ti.TransparencyLogInstance.fromJSON(e)):[],certificateAuthorities:globalThis.Array.isArray(t?.certificateAuthorities)?t.certificateAuthorities.map(e=>Ti.CertificateAuthority.fromJSON(e)):[],ctlogs:globalThis.Array.isArray(t?.ctlogs)?t.ctlogs.map(e=>Ti.TransparencyLogInstance.fromJSON(e)):[],timestampAuthorities:globalThis.Array.isArray(t?.timestampAuthorities)?t.timestampAuthorities.map(e=>Ti.CertificateAuthority.fromJSON(e)):[]}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.tlogs?.length&&(e.tlogs=t.tlogs.map(r=>Ti.TransparencyLogInstance.toJSON(r))),t.certificateAuthorities?.length&&(e.certificateAuthorities=t.certificateAuthorities.map(r=>Ti.CertificateAuthority.toJSON(r))),t.ctlogs?.length&&(e.ctlogs=t.ctlogs.map(r=>Ti.TransparencyLogInstance.toJSON(r))),t.timestampAuthorities?.length&&(e.timestampAuthorities=t.timestampAuthorities.map(r=>Ti.CertificateAuthority.toJSON(r))),e}};Ti.SigningConfig={fromJSON(t){return{mediaType:sa(t.mediaType)?globalThis.String(t.mediaType):\"\",caUrl:sa(t.caUrl)?globalThis.String(t.caUrl):\"\",oidcUrl:sa(t.oidcUrl)?globalThis.String(t.oidcUrl):\"\",tlogUrls:globalThis.Array.isArray(t?.tlogUrls)?t.tlogUrls.map(e=>globalThis.String(e)):[],tsaUrls:globalThis.Array.isArray(t?.tsaUrls)?t.tsaUrls.map(e=>globalThis.String(e)):[]}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.caUrl!==\"\"&&(e.caUrl=t.caUrl),t.oidcUrl!==\"\"&&(e.oidcUrl=t.oidcUrl),t.tlogUrls?.length&&(e.tlogUrls=t.tlogUrls),t.tsaUrls?.length&&(e.tsaUrls=t.tsaUrls),e}};Ti.ClientTrustConfig={fromJSON(t){return{mediaType:sa(t.mediaType)?globalThis.String(t.mediaType):\"\",trustedRoot:sa(t.trustedRoot)?Ti.TrustedRoot.fromJSON(t.trustedRoot):void 0,signingConfig:sa(t.signingConfig)?Ti.SigningConfig.fromJSON(t.signingConfig):void 0}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.trustedRoot!==void 0&&(e.trustedRoot=Ti.TrustedRoot.toJSON(t.trustedRoot)),t.signingConfig!==void 0&&(e.signingConfig=Ti.SigningConfig.toJSON(t.signingConfig)),e}};function sa(t){return t!=null}});var RTe=L(Vr=>{\"use strict\";Object.defineProperty(Vr,\"__esModule\",{value:!0});Vr.Input=Vr.Artifact=Vr.ArtifactVerificationOptions_ObserverTimestampOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions=Vr.ArtifactVerificationOptions_CtlogOptions=Vr.ArtifactVerificationOptions_TlogOptions=Vr.ArtifactVerificationOptions=Vr.PublicKeyIdentities=Vr.CertificateIdentities=Vr.CertificateIdentity=void 0;var QTe=D7(),Ig=Vw(),TTe=b7();Vr.CertificateIdentity={fromJSON(t){return{issuer:hi(t.issuer)?globalThis.String(t.issuer):\"\",san:hi(t.san)?Ig.SubjectAlternativeName.fromJSON(t.san):void 0,oids:globalThis.Array.isArray(t?.oids)?t.oids.map(e=>Ig.ObjectIdentifierValuePair.fromJSON(e)):[]}},toJSON(t){let e={};return t.issuer!==\"\"&&(e.issuer=t.issuer),t.san!==void 0&&(e.san=Ig.SubjectAlternativeName.toJSON(t.san)),t.oids?.length&&(e.oids=t.oids.map(r=>Ig.ObjectIdentifierValuePair.toJSON(r))),e}};Vr.CertificateIdentities={fromJSON(t){return{identities:globalThis.Array.isArray(t?.identities)?t.identities.map(e=>Vr.CertificateIdentity.fromJSON(e)):[]}},toJSON(t){let e={};return t.identities?.length&&(e.identities=t.identities.map(r=>Vr.CertificateIdentity.toJSON(r))),e}};Vr.PublicKeyIdentities={fromJSON(t){return{publicKeys:globalThis.Array.isArray(t?.publicKeys)?t.publicKeys.map(e=>Ig.PublicKey.fromJSON(e)):[]}},toJSON(t){let e={};return t.publicKeys?.length&&(e.publicKeys=t.publicKeys.map(r=>Ig.PublicKey.toJSON(r))),e}};Vr.ArtifactVerificationOptions={fromJSON(t){return{signers:hi(t.certificateIdentities)?{$case:\"certificateIdentities\",certificateIdentities:Vr.CertificateIdentities.fromJSON(t.certificateIdentities)}:hi(t.publicKeys)?{$case:\"publicKeys\",publicKeys:Vr.PublicKeyIdentities.fromJSON(t.publicKeys)}:void 0,tlogOptions:hi(t.tlogOptions)?Vr.ArtifactVerificationOptions_TlogOptions.fromJSON(t.tlogOptions):void 0,ctlogOptions:hi(t.ctlogOptions)?Vr.ArtifactVerificationOptions_CtlogOptions.fromJSON(t.ctlogOptions):void 0,tsaOptions:hi(t.tsaOptions)?Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(t.tsaOptions):void 0,integratedTsOptions:hi(t.integratedTsOptions)?Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.fromJSON(t.integratedTsOptions):void 0,observerOptions:hi(t.observerOptions)?Vr.ArtifactVerificationOptions_ObserverTimestampOptions.fromJSON(t.observerOptions):void 0}},toJSON(t){let e={};return t.signers?.$case===\"certificateIdentities\"?e.certificateIdentities=Vr.CertificateIdentities.toJSON(t.signers.certificateIdentities):t.signers?.$case===\"publicKeys\"&&(e.publicKeys=Vr.PublicKeyIdentities.toJSON(t.signers.publicKeys)),t.tlogOptions!==void 0&&(e.tlogOptions=Vr.ArtifactVerificationOptions_TlogOptions.toJSON(t.tlogOptions)),t.ctlogOptions!==void 0&&(e.ctlogOptions=Vr.ArtifactVerificationOptions_CtlogOptions.toJSON(t.ctlogOptions)),t.tsaOptions!==void 0&&(e.tsaOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(t.tsaOptions)),t.integratedTsOptions!==void 0&&(e.integratedTsOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(t.integratedTsOptions)),t.observerOptions!==void 0&&(e.observerOptions=Vr.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(t.observerOptions)),e}};Vr.ArtifactVerificationOptions_TlogOptions={fromJSON(t){return{threshold:hi(t.threshold)?globalThis.Number(t.threshold):0,performOnlineVerification:hi(t.performOnlineVerification)?globalThis.Boolean(t.performOnlineVerification):!1,disable:hi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.performOnlineVerification!==!1&&(e.performOnlineVerification=t.performOnlineVerification),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_CtlogOptions={fromJSON(t){return{threshold:hi(t.threshold)?globalThis.Number(t.threshold):0,disable:hi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TimestampAuthorityOptions={fromJSON(t){return{threshold:hi(t.threshold)?globalThis.Number(t.threshold):0,disable:hi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions={fromJSON(t){return{threshold:hi(t.threshold)?globalThis.Number(t.threshold):0,disable:hi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_ObserverTimestampOptions={fromJSON(t){return{threshold:hi(t.threshold)?globalThis.Number(t.threshold):0,disable:hi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.Artifact={fromJSON(t){return{data:hi(t.artifactUri)?{$case:\"artifactUri\",artifactUri:globalThis.String(t.artifactUri)}:hi(t.artifact)?{$case:\"artifact\",artifact:Buffer.from(eLt(t.artifact))}:hi(t.artifactDigest)?{$case:\"artifactDigest\",artifactDigest:Ig.HashOutput.fromJSON(t.artifactDigest)}:void 0}},toJSON(t){let e={};return t.data?.$case===\"artifactUri\"?e.artifactUri=t.data.artifactUri:t.data?.$case===\"artifact\"?e.artifact=tLt(t.data.artifact):t.data?.$case===\"artifactDigest\"&&(e.artifactDigest=Ig.HashOutput.toJSON(t.data.artifactDigest)),e}};Vr.Input={fromJSON(t){return{artifactTrustRoot:hi(t.artifactTrustRoot)?TTe.TrustedRoot.fromJSON(t.artifactTrustRoot):void 0,artifactVerificationOptions:hi(t.artifactVerificationOptions)?Vr.ArtifactVerificationOptions.fromJSON(t.artifactVerificationOptions):void 0,bundle:hi(t.bundle)?QTe.Bundle.fromJSON(t.bundle):void 0,artifact:hi(t.artifact)?Vr.Artifact.fromJSON(t.artifact):void 0}},toJSON(t){let e={};return t.artifactTrustRoot!==void 0&&(e.artifactTrustRoot=TTe.TrustedRoot.toJSON(t.artifactTrustRoot)),t.artifactVerificationOptions!==void 0&&(e.artifactVerificationOptions=Vr.ArtifactVerificationOptions.toJSON(t.artifactVerificationOptions)),t.bundle!==void 0&&(e.bundle=QTe.Bundle.toJSON(t.bundle)),t.artifact!==void 0&&(e.artifact=Vr.Artifact.toJSON(t.artifact)),e}};function eLt(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function tLt(t){return globalThis.Buffer.from(t).toString(\"base64\")}function hi(t){return t!=null}});var Rb=L(eu=>{\"use strict\";var rLt=eu&&eu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Kw=eu&&eu.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&rLt(e,t,r)};Object.defineProperty(eu,\"__esModule\",{value:!0});Kw(v7(),eu);Kw(D7(),eu);Kw(Vw(),eu);Kw(S7(),eu);Kw(b7(),eu);Kw(RTe(),eu)});var tO=L(Cl=>{\"use strict\";Object.defineProperty(Cl,\"__esModule\",{value:!0});Cl.BUNDLE_V03_MEDIA_TYPE=Cl.BUNDLE_V03_LEGACY_MEDIA_TYPE=Cl.BUNDLE_V02_MEDIA_TYPE=Cl.BUNDLE_V01_MEDIA_TYPE=void 0;Cl.isBundleWithCertificateChain=nLt;Cl.isBundleWithPublicKey=iLt;Cl.isBundleWithMessageSignature=sLt;Cl.isBundleWithDsseEnvelope=oLt;Cl.BUNDLE_V01_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle+json;version=0.1\";Cl.BUNDLE_V02_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle+json;version=0.2\";Cl.BUNDLE_V03_LEGACY_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle+json;version=0.3\";Cl.BUNDLE_V03_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle.v0.3+json\";function nLt(t){return t.verificationMaterial.content.$case===\"x509CertificateChain\"}function iLt(t){return t.verificationMaterial.content.$case===\"publicKey\"}function sLt(t){return t.content.$case===\"messageSignature\"}function oLt(t){return t.content.$case===\"dsseEnvelope\"}});var NTe=L(nO=>{\"use strict\";Object.defineProperty(nO,\"__esModule\",{value:!0});nO.toMessageSignatureBundle=lLt;nO.toDSSEBundle=cLt;var aLt=Rb(),rO=tO();function lLt(t){return{mediaType:t.certificateChain?rO.BUNDLE_V02_MEDIA_TYPE:rO.BUNDLE_V03_MEDIA_TYPE,content:{$case:\"messageSignature\",messageSignature:{messageDigest:{algorithm:aLt.HashAlgorithm.SHA2_256,digest:t.digest},signature:t.signature}},verificationMaterial:FTe(t)}}function cLt(t){return{mediaType:t.certificateChain?rO.BUNDLE_V02_MEDIA_TYPE:rO.BUNDLE_V03_MEDIA_TYPE,content:{$case:\"dsseEnvelope\",dsseEnvelope:uLt(t)},verificationMaterial:FTe(t)}}function uLt(t){return{payloadType:t.artifactType,payload:t.artifact,signatures:[fLt(t)]}}function fLt(t){return{keyid:t.keyHint||\"\",sig:t.signature}}function FTe(t){return{content:ALt(t),tlogEntries:[],timestampVerificationData:{rfc3161Timestamps:[]}}}function ALt(t){return t.certificate?t.certificateChain?{$case:\"x509CertificateChain\",x509CertificateChain:{certificates:[{rawBytes:t.certificate}]}}:{$case:\"certificate\",certificate:{rawBytes:t.certificate}}:{$case:\"publicKey\",publicKey:{hint:t.keyHint||\"\"}}}});var x7=L(iO=>{\"use strict\";Object.defineProperty(iO,\"__esModule\",{value:!0});iO.ValidationError=void 0;var P7=class extends Error{constructor(e,r){super(e),this.fields=r}};iO.ValidationError=P7});var k7=L(ty=>{\"use strict\";Object.defineProperty(ty,\"__esModule\",{value:!0});ty.assertBundle=pLt;ty.assertBundleV01=OTe;ty.isBundleV01=hLt;ty.assertBundleV02=gLt;ty.assertBundleLatest=dLt;var sO=x7();function pLt(t){let e=oO(t);if(e.length>0)throw new sO.ValidationError(\"invalid bundle\",e)}function OTe(t){let e=[];if(e.push(...oO(t)),e.push(...mLt(t)),e.length>0)throw new sO.ValidationError(\"invalid v0.1 bundle\",e)}function hLt(t){try{return OTe(t),!0}catch{return!1}}function gLt(t){let e=[];if(e.push(...oO(t)),e.push(...LTe(t)),e.length>0)throw new sO.ValidationError(\"invalid v0.2 bundle\",e)}function dLt(t){let e=[];if(e.push(...oO(t)),e.push(...LTe(t)),e.push(...yLt(t)),e.length>0)throw new sO.ValidationError(\"invalid bundle\",e)}function oO(t){let e=[];if((t.mediaType===void 0||!t.mediaType.match(/^application\\/vnd\\.dev\\.sigstore\\.bundle\\+json;version=\\d\\.\\d/)&&!t.mediaType.match(/^application\\/vnd\\.dev\\.sigstore\\.bundle\\.v\\d\\.\\d\\+json/))&&e.push(\"mediaType\"),t.content===void 0)e.push(\"content\");else switch(t.content.$case){case\"messageSignature\":t.content.messageSignature.messageDigest===void 0?e.push(\"content.messageSignature.messageDigest\"):t.content.messageSignature.messageDigest.digest.length===0&&e.push(\"content.messageSignature.messageDigest.digest\"),t.content.messageSignature.signature.length===0&&e.push(\"content.messageSignature.signature\");break;case\"dsseEnvelope\":t.content.dsseEnvelope.payload.length===0&&e.push(\"content.dsseEnvelope.payload\"),t.content.dsseEnvelope.signatures.length!==1?e.push(\"content.dsseEnvelope.signatures\"):t.content.dsseEnvelope.signatures[0].sig.length===0&&e.push(\"content.dsseEnvelope.signatures[0].sig\");break}if(t.verificationMaterial===void 0)e.push(\"verificationMaterial\");else{if(t.verificationMaterial.content===void 0)e.push(\"verificationMaterial.content\");else switch(t.verificationMaterial.content.$case){case\"x509CertificateChain\":t.verificationMaterial.content.x509CertificateChain.certificates.length===0&&e.push(\"verificationMaterial.content.x509CertificateChain.certificates\"),t.verificationMaterial.content.x509CertificateChain.certificates.forEach((r,s)=>{r.rawBytes.length===0&&e.push(`verificationMaterial.content.x509CertificateChain.certificates[${s}].rawBytes`)});break;case\"certificate\":t.verificationMaterial.content.certificate.rawBytes.length===0&&e.push(\"verificationMaterial.content.certificate.rawBytes\");break}t.verificationMaterial.tlogEntries===void 0?e.push(\"verificationMaterial.tlogEntries\"):t.verificationMaterial.tlogEntries.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.logId===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].logId`),r.kindVersion===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].kindVersion`)})}return e}function mLt(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionPromise===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionPromise`)}),e}function LTe(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionProof===void 0?e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof`):r.inclusionProof.checkpoint===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof.checkpoint`)}),e}function yLt(t){let e=[];return t.verificationMaterial?.content?.$case===\"x509CertificateChain\"&&e.push(\"verificationMaterial.content.$case\"),e}});var _Te=L(SA=>{\"use strict\";Object.defineProperty(SA,\"__esModule\",{value:!0});SA.envelopeToJSON=SA.envelopeFromJSON=SA.bundleToJSON=SA.bundleFromJSON=void 0;var aO=Rb(),MTe=tO(),Q7=k7(),ELt=t=>{let e=aO.Bundle.fromJSON(t);switch(e.mediaType){case MTe.BUNDLE_V01_MEDIA_TYPE:(0,Q7.assertBundleV01)(e);break;case MTe.BUNDLE_V02_MEDIA_TYPE:(0,Q7.assertBundleV02)(e);break;default:(0,Q7.assertBundleLatest)(e);break}return e};SA.bundleFromJSON=ELt;var ILt=t=>aO.Bundle.toJSON(t);SA.bundleToJSON=ILt;var CLt=t=>aO.Envelope.fromJSON(t);SA.envelopeFromJSON=CLt;var wLt=t=>aO.Envelope.toJSON(t);SA.envelopeToJSON=wLt});var Nb=L(Zr=>{\"use strict\";Object.defineProperty(Zr,\"__esModule\",{value:!0});Zr.isBundleV01=Zr.assertBundleV02=Zr.assertBundleV01=Zr.assertBundleLatest=Zr.assertBundle=Zr.envelopeToJSON=Zr.envelopeFromJSON=Zr.bundleToJSON=Zr.bundleFromJSON=Zr.ValidationError=Zr.isBundleWithPublicKey=Zr.isBundleWithMessageSignature=Zr.isBundleWithDsseEnvelope=Zr.isBundleWithCertificateChain=Zr.BUNDLE_V03_MEDIA_TYPE=Zr.BUNDLE_V03_LEGACY_MEDIA_TYPE=Zr.BUNDLE_V02_MEDIA_TYPE=Zr.BUNDLE_V01_MEDIA_TYPE=Zr.toMessageSignatureBundle=Zr.toDSSEBundle=void 0;var UTe=NTe();Object.defineProperty(Zr,\"toDSSEBundle\",{enumerable:!0,get:function(){return UTe.toDSSEBundle}});Object.defineProperty(Zr,\"toMessageSignatureBundle\",{enumerable:!0,get:function(){return UTe.toMessageSignatureBundle}});var Cg=tO();Object.defineProperty(Zr,\"BUNDLE_V01_MEDIA_TYPE\",{enumerable:!0,get:function(){return Cg.BUNDLE_V01_MEDIA_TYPE}});Object.defineProperty(Zr,\"BUNDLE_V02_MEDIA_TYPE\",{enumerable:!0,get:function(){return Cg.BUNDLE_V02_MEDIA_TYPE}});Object.defineProperty(Zr,\"BUNDLE_V03_LEGACY_MEDIA_TYPE\",{enumerable:!0,get:function(){return Cg.BUNDLE_V03_LEGACY_MEDIA_TYPE}});Object.defineProperty(Zr,\"BUNDLE_V03_MEDIA_TYPE\",{enumerable:!0,get:function(){return Cg.BUNDLE_V03_MEDIA_TYPE}});Object.defineProperty(Zr,\"isBundleWithCertificateChain\",{enumerable:!0,get:function(){return Cg.isBundleWithCertificateChain}});Object.defineProperty(Zr,\"isBundleWithDsseEnvelope\",{enumerable:!0,get:function(){return Cg.isBundleWithDsseEnvelope}});Object.defineProperty(Zr,\"isBundleWithMessageSignature\",{enumerable:!0,get:function(){return Cg.isBundleWithMessageSignature}});Object.defineProperty(Zr,\"isBundleWithPublicKey\",{enumerable:!0,get:function(){return Cg.isBundleWithPublicKey}});var BLt=x7();Object.defineProperty(Zr,\"ValidationError\",{enumerable:!0,get:function(){return BLt.ValidationError}});var lO=_Te();Object.defineProperty(Zr,\"bundleFromJSON\",{enumerable:!0,get:function(){return lO.bundleFromJSON}});Object.defineProperty(Zr,\"bundleToJSON\",{enumerable:!0,get:function(){return lO.bundleToJSON}});Object.defineProperty(Zr,\"envelopeFromJSON\",{enumerable:!0,get:function(){return lO.envelopeFromJSON}});Object.defineProperty(Zr,\"envelopeToJSON\",{enumerable:!0,get:function(){return lO.envelopeToJSON}});var Fb=k7();Object.defineProperty(Zr,\"assertBundle\",{enumerable:!0,get:function(){return Fb.assertBundle}});Object.defineProperty(Zr,\"assertBundleLatest\",{enumerable:!0,get:function(){return Fb.assertBundleLatest}});Object.defineProperty(Zr,\"assertBundleV01\",{enumerable:!0,get:function(){return Fb.assertBundleV01}});Object.defineProperty(Zr,\"assertBundleV02\",{enumerable:!0,get:function(){return Fb.assertBundleV02}});Object.defineProperty(Zr,\"isBundleV01\",{enumerable:!0,get:function(){return Fb.isBundleV01}})});var Ob=L(uO=>{\"use strict\";Object.defineProperty(uO,\"__esModule\",{value:!0});uO.ByteStream=void 0;var T7=class extends Error{},cO=class t{constructor(e){this.start=0,e?(this.buf=e,this.view=Buffer.from(e)):(this.buf=new ArrayBuffer(0),this.view=Buffer.from(this.buf))}get buffer(){return this.view.subarray(0,this.start)}get length(){return this.view.byteLength}get position(){return this.start}seek(e){this.start=e}slice(e,r){let s=e+r;if(s>this.length)throw new T7(\"request past end of buffer\");return this.view.subarray(e,s)}appendChar(e){this.ensureCapacity(1),this.view[this.start]=e,this.start+=1}appendUint16(e){this.ensureCapacity(2);let r=new Uint16Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[1],this.view[this.start+1]=s[0],this.start+=2}appendUint24(e){this.ensureCapacity(3);let r=new Uint32Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[2],this.view[this.start+1]=s[1],this.view[this.start+2]=s[0],this.start+=3}appendView(e){this.ensureCapacity(e.length),this.view.set(e,this.start),this.start+=e.length}getBlock(e){if(e<=0)return Buffer.alloc(0);if(this.start+e>this.view.length)throw new Error(\"request past end of buffer\");let r=this.view.subarray(this.start,this.start+e);return this.start+=e,r}getUint8(){return this.getBlock(1)[0]}getUint16(){let e=this.getBlock(2);return e[0]<<8|e[1]}ensureCapacity(e){if(this.start+e>this.view.byteLength){let r=t.BLOCK_SIZE+(e>t.BLOCK_SIZE?e:0);this.realloc(this.view.byteLength+r)}}realloc(e){let r=new ArrayBuffer(e),s=Buffer.from(r);s.set(this.view),this.buf=r,this.view=s}};uO.ByteStream=cO;cO.BLOCK_SIZE=1024});var fO=L(Jw=>{\"use strict\";Object.defineProperty(Jw,\"__esModule\",{value:!0});Jw.ASN1TypeError=Jw.ASN1ParseError=void 0;var R7=class extends Error{};Jw.ASN1ParseError=R7;var F7=class extends Error{};Jw.ASN1TypeError=F7});var jTe=L(AO=>{\"use strict\";Object.defineProperty(AO,\"__esModule\",{value:!0});AO.decodeLength=vLt;AO.encodeLength=SLt;var HTe=fO();function vLt(t){let e=t.getUint8();if(!(e&128))return e;let r=e&127;if(r>6)throw new HTe.ASN1ParseError(\"length exceeds 6 byte limit\");let s=0;for(let a=0;a<r;a++)s=s*256+t.getUint8();if(s===0)throw new HTe.ASN1ParseError(\"indefinite length encoding not supported\");return s}function SLt(t){if(t<128)return Buffer.from([t]);let e=BigInt(t),r=[];for(;e>0n;)r.unshift(Number(e&255n)),e=e>>8n;return Buffer.from([128|r.length,...r])}});var GTe=L(wg=>{\"use strict\";Object.defineProperty(wg,\"__esModule\",{value:!0});wg.parseInteger=PLt;wg.parseStringASCII=qTe;wg.parseTime=xLt;wg.parseOID=kLt;wg.parseBoolean=QLt;wg.parseBitString=TLt;var DLt=/^(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\.\\d{3})?Z$/,bLt=/^(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\.\\d{3})?Z$/;function PLt(t){let e=0,r=t.length,s=t[e],a=s>127,n=a?255:0;for(;s==n&&++e<r;)s=t[e];if(r-e===0)return BigInt(a?-1:0);s=a?s-256:s;let f=BigInt(s);for(let p=e+1;p<r;++p)f=f*BigInt(256)+BigInt(t[p]);return f}function qTe(t){return t.toString(\"ascii\")}function xLt(t,e){let r=qTe(t),s=e?DLt.exec(r):bLt.exec(r);if(!s)throw new Error(\"invalid time\");if(e){let a=Number(s[1]);a+=a>=50?1900:2e3,s[1]=a.toString()}return new Date(`${s[1]}-${s[2]}-${s[3]}T${s[4]}:${s[5]}:${s[6]}Z`)}function kLt(t){let e=0,r=t.length,s=t[e++],a=Math.floor(s/40),n=s%40,c=`${a}.${n}`,f=0;for(;e<r;++e)s=t[e],f=(f<<7)+(s&127),s&128||(c+=`.${f}`,f=0);return c}function QLt(t){return t[0]!==0}function TLt(t){let e=t[0],r=1,s=t.length,a=[];for(let n=r;n<s;++n){let c=t[n],f=n===s-1?e:0;for(let p=7;p>=f;--p)a.push(c>>p&1)}return a}});var YTe=L(pO=>{\"use strict\";Object.defineProperty(pO,\"__esModule\",{value:!0});pO.ASN1Tag=void 0;var WTe=fO(),ry={BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,OBJECT_IDENTIFIER:6,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,UTC_TIME:23,GENERALIZED_TIME:24},N7={UNIVERSAL:0,APPLICATION:1,CONTEXT_SPECIFIC:2,PRIVATE:3},O7=class{constructor(e){if(this.number=e&31,this.constructed=(e&32)===32,this.class=e>>6,this.number===31)throw new WTe.ASN1ParseError(\"long form tags not supported\");if(this.class===N7.UNIVERSAL&&this.number===0)throw new WTe.ASN1ParseError(\"unsupported tag 0x00\")}isUniversal(){return this.class===N7.UNIVERSAL}isContextSpecific(e){let r=this.class===N7.CONTEXT_SPECIFIC;return e!==void 0?r&&this.number===e:r}isBoolean(){return this.isUniversal()&&this.number===ry.BOOLEAN}isInteger(){return this.isUniversal()&&this.number===ry.INTEGER}isBitString(){return this.isUniversal()&&this.number===ry.BIT_STRING}isOctetString(){return this.isUniversal()&&this.number===ry.OCTET_STRING}isOID(){return this.isUniversal()&&this.number===ry.OBJECT_IDENTIFIER}isUTCTime(){return this.isUniversal()&&this.number===ry.UTC_TIME}isGeneralizedTime(){return this.isUniversal()&&this.number===ry.GENERALIZED_TIME}toDER(){return this.number|(this.constructed?32:0)|this.class<<6}};pO.ASN1Tag=O7});var zTe=L(gO=>{\"use strict\";Object.defineProperty(gO,\"__esModule\",{value:!0});gO.ASN1Obj=void 0;var L7=Ob(),ny=fO(),KTe=jTe(),zw=GTe(),RLt=YTe(),hO=class{constructor(e,r,s){this.tag=e,this.value=r,this.subs=s}static parseBuffer(e){return JTe(new L7.ByteStream(e))}toDER(){let e=new L7.ByteStream;if(this.subs.length>0)for(let a of this.subs)e.appendView(a.toDER());else e.appendView(this.value);let r=e.buffer,s=new L7.ByteStream;return s.appendChar(this.tag.toDER()),s.appendView((0,KTe.encodeLength)(r.length)),s.appendView(r),s.buffer}toBoolean(){if(!this.tag.isBoolean())throw new ny.ASN1TypeError(\"not a boolean\");return(0,zw.parseBoolean)(this.value)}toInteger(){if(!this.tag.isInteger())throw new ny.ASN1TypeError(\"not an integer\");return(0,zw.parseInteger)(this.value)}toOID(){if(!this.tag.isOID())throw new ny.ASN1TypeError(\"not an OID\");return(0,zw.parseOID)(this.value)}toDate(){switch(!0){case this.tag.isUTCTime():return(0,zw.parseTime)(this.value,!0);case this.tag.isGeneralizedTime():return(0,zw.parseTime)(this.value,!1);default:throw new ny.ASN1TypeError(\"not a date\")}}toBitString(){if(!this.tag.isBitString())throw new ny.ASN1TypeError(\"not a bit string\");return(0,zw.parseBitString)(this.value)}};gO.ASN1Obj=hO;function JTe(t){let e=new RLt.ASN1Tag(t.getUint8()),r=(0,KTe.decodeLength)(t),s=t.slice(t.position,r),a=t.position,n=[];if(e.constructed)n=VTe(t,r);else if(e.isOctetString())try{n=VTe(t,r)}catch{}return n.length===0&&t.seek(a+r),new hO(e,s,n)}function VTe(t,e){let r=t.position+e;if(r>t.length)throw new ny.ASN1ParseError(\"invalid length\");let s=[];for(;t.position<r;)s.push(JTe(t));if(t.position!==r)throw new ny.ASN1ParseError(\"invalid length\");return s}});var mO=L(dO=>{\"use strict\";Object.defineProperty(dO,\"__esModule\",{value:!0});dO.ASN1Obj=void 0;var FLt=zTe();Object.defineProperty(dO,\"ASN1Obj\",{enumerable:!0,get:function(){return FLt.ASN1Obj}})});var Zw=L(Bg=>{\"use strict\";var NLt=Bg&&Bg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bg,\"__esModule\",{value:!0});Bg.createPublicKey=OLt;Bg.digest=LLt;Bg.verify=MLt;Bg.bufferEqual=_Lt;var Lb=NLt(ye(\"crypto\"));function OLt(t,e=\"spki\"){return typeof t==\"string\"?Lb.default.createPublicKey(t):Lb.default.createPublicKey({key:t,format:\"der\",type:e})}function LLt(t,...e){let r=Lb.default.createHash(t);for(let s of e)r.update(s);return r.digest()}function MLt(t,e,r,s){try{return Lb.default.verify(s,t,e,r)}catch{return!1}}function _Lt(t,e){try{return Lb.default.timingSafeEqual(t,e)}catch{return!1}}});var ZTe=L(M7=>{\"use strict\";Object.defineProperty(M7,\"__esModule\",{value:!0});M7.preAuthEncoding=HLt;var ULt=\"DSSEv1\";function HLt(t,e){let r=[ULt,t.length,t,e.length,\"\"].join(\" \");return Buffer.concat([Buffer.from(r,\"ascii\"),e])}});var eRe=L(yO=>{\"use strict\";Object.defineProperty(yO,\"__esModule\",{value:!0});yO.base64Encode=jLt;yO.base64Decode=qLt;var XTe=\"base64\",$Te=\"utf-8\";function jLt(t){return Buffer.from(t,$Te).toString(XTe)}function qLt(t){return Buffer.from(t,XTe).toString($Te)}});var tRe=L(U7=>{\"use strict\";Object.defineProperty(U7,\"__esModule\",{value:!0});U7.canonicalize=_7;function _7(t){let e=\"\";if(t===null||typeof t!=\"object\"||t.toJSON!=null)e+=JSON.stringify(t);else if(Array.isArray(t)){e+=\"[\";let r=!0;t.forEach(s=>{r||(e+=\",\"),r=!1,e+=_7(s)}),e+=\"]\"}else{e+=\"{\";let r=!0;Object.keys(t).sort().forEach(s=>{r||(e+=\",\"),r=!1,e+=JSON.stringify(s),e+=\":\",e+=_7(t[s])}),e+=\"}\"}return e}});var H7=L(EO=>{\"use strict\";Object.defineProperty(EO,\"__esModule\",{value:!0});EO.toDER=YLt;EO.fromDER=VLt;var GLt=/-----BEGIN (.*)-----/,WLt=/-----END (.*)-----/;function YLt(t){let e=\"\";return t.split(`\n`).forEach(r=>{r.match(GLt)||r.match(WLt)||(e+=r)}),Buffer.from(e,\"base64\")}function VLt(t,e=\"CERTIFICATE\"){let s=t.toString(\"base64\").match(/.{1,64}/g)||\"\";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`\n`).concat(`\n`)}});var IO=L(Xw=>{\"use strict\";Object.defineProperty(Xw,\"__esModule\",{value:!0});Xw.SHA2_HASH_ALGOS=Xw.ECDSA_SIGNATURE_ALGOS=void 0;Xw.ECDSA_SIGNATURE_ALGOS={\"1.2.840.10045.4.3.1\":\"sha224\",\"1.2.840.10045.4.3.2\":\"sha256\",\"1.2.840.10045.4.3.3\":\"sha384\",\"1.2.840.10045.4.3.4\":\"sha512\"};Xw.SHA2_HASH_ALGOS={\"2.16.840.1.101.3.4.2.1\":\"sha256\",\"2.16.840.1.101.3.4.2.2\":\"sha384\",\"2.16.840.1.101.3.4.2.3\":\"sha512\"}});var q7=L(CO=>{\"use strict\";Object.defineProperty(CO,\"__esModule\",{value:!0});CO.RFC3161TimestampVerificationError=void 0;var j7=class extends Error{};CO.RFC3161TimestampVerificationError=j7});var nRe=L(DA=>{\"use strict\";var KLt=DA&&DA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),JLt=DA&&DA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zLt=DA&&DA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&KLt(e,t,r);return JLt(e,t),e};Object.defineProperty(DA,\"__esModule\",{value:!0});DA.TSTInfo=void 0;var rRe=zLt(Zw()),ZLt=IO(),XLt=q7(),G7=class{constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return ZLt.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=rRe.digest(this.messageImprintHashAlgorithm,e);if(!rRe.bufferEqual(r,this.messageImprintHashedMessage))throw new XLt.RFC3161TimestampVerificationError(\"message imprint does not match artifact\")}get messageImprintObj(){return this.root.subs[2]}};DA.TSTInfo=G7});var sRe=L(bA=>{\"use strict\";var $Lt=bA&&bA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),eMt=bA&&bA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tMt=bA&&bA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&$Lt(e,t,r);return eMt(e,t),e};Object.defineProperty(bA,\"__esModule\",{value:!0});bA.RFC3161Timestamp=void 0;var rMt=mO(),W7=tMt(Zw()),iRe=IO(),Mb=q7(),nMt=nRe(),iMt=\"1.2.840.113549.1.7.2\",sMt=\"1.2.840.113549.1.9.16.1.4\",oMt=\"1.2.840.113549.1.9.4\",Y7=class t{constructor(e){this.root=e}static parse(e){let r=rMt.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return iRe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return iRe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new nMt.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new Mb.RFC3161TimestampVerificationError(\"timeStampToken is missing\");if(this.contentType!==iMt)throw new Mb.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==sMt)throw new Mb.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=W7.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!W7.bufferEqual(e,r))throw new Mb.RFC3161TimestampVerificationError(\"signed data does not match tstInfo\")}verifySignature(e){let r=this.signedAttrsObj.toDER();if(r[0]=49,!W7.verify(r,e,this.signatureValue,this.signatureAlgorithm))throw new Mb.RFC3161TimestampVerificationError(\"signature verification failed\")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(r=>r.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let e=this.signedDataObj;return e.subs[e.subs.length-1]}get signerInfoObj(){return this.signerInfosObj.subs[0]}get eContentTypeObj(){return this.encapContentInfoObj.subs[0]}get eContentObj(){return this.encapContentInfoObj.subs[1]}get signedAttrsObj(){return this.signerInfoObj.subs.find(r=>r.tag.isContextSpecific(0))}get messageDigestAttributeObj(){return this.signedAttrsObj.subs.find(r=>r.subs[0].tag.isOID()&&r.subs[0].toOID()===oMt)}get signerSidObj(){return this.signerInfoObj.subs[1]}get signerDigestAlgorithmObj(){return this.signerInfoObj.subs[2]}get signatureAlgorithmObj(){return this.signerInfoObj.subs[4]}get signatureValueObj(){return this.signerInfoObj.subs[5]}};bA.RFC3161Timestamp=Y7});var oRe=L(wO=>{\"use strict\";Object.defineProperty(wO,\"__esModule\",{value:!0});wO.RFC3161Timestamp=void 0;var aMt=sRe();Object.defineProperty(wO,\"RFC3161Timestamp\",{enumerable:!0,get:function(){return aMt.RFC3161Timestamp}})});var lRe=L(PA=>{\"use strict\";var lMt=PA&&PA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),cMt=PA&&PA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uMt=PA&&PA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&lMt(e,t,r);return cMt(e,t),e};Object.defineProperty(PA,\"__esModule\",{value:!0});PA.SignedCertificateTimestamp=void 0;var fMt=uMt(Zw()),aRe=Ob(),V7=class t{constructor(e){this.version=e.version,this.logID=e.logID,this.timestamp=e.timestamp,this.extensions=e.extensions,this.hashAlgorithm=e.hashAlgorithm,this.signatureAlgorithm=e.signatureAlgorithm,this.signature=e.signature}get datetime(){return new Date(Number(this.timestamp.readBigInt64BE()))}get algorithm(){switch(this.hashAlgorithm){case 0:return\"none\";case 1:return\"md5\";case 2:return\"sha1\";case 3:return\"sha224\";case 4:return\"sha256\";case 5:return\"sha384\";case 6:return\"sha512\";default:return\"unknown\"}}verify(e,r){let s=new aRe.ByteStream;return s.appendChar(this.version),s.appendChar(0),s.appendView(this.timestamp),s.appendUint16(1),s.appendView(e),s.appendUint16(this.extensions.byteLength),this.extensions.byteLength>0&&s.appendView(this.extensions),fMt.verify(s.buffer,r,this.signature,this.algorithm)}static parse(e){let r=new aRe.ByteStream(e),s=r.getUint8(),a=r.getBlock(32),n=r.getBlock(8),c=r.getUint16(),f=r.getBlock(c),p=r.getUint8(),h=r.getUint8(),E=r.getUint16(),C=r.getBlock(E);if(r.position!==e.length)throw new Error(\"SCT buffer length mismatch\");return new t({version:s,logID:a,timestamp:n,extensions:f,hashAlgorithm:p,signatureAlgorithm:h,signature:C})}};PA.SignedCertificateTimestamp=V7});var eK=L(oa=>{\"use strict\";Object.defineProperty(oa,\"__esModule\",{value:!0});oa.X509SCTExtension=oa.X509SubjectKeyIDExtension=oa.X509AuthorityKeyIDExtension=oa.X509SubjectAlternativeNameExtension=oa.X509KeyUsageExtension=oa.X509BasicConstraintsExtension=oa.X509Extension=void 0;var AMt=Ob(),pMt=lRe(),dh=class{constructor(e){this.root=e}get oid(){return this.root.subs[0].toOID()}get critical(){return this.root.subs.length===3?this.root.subs[1].toBoolean():!1}get value(){return this.extnValueObj.value}get valueObj(){return this.extnValueObj}get extnValueObj(){return this.root.subs[this.root.subs.length-1]}};oa.X509Extension=dh;var K7=class extends dh{get isCA(){return this.sequence.subs[0]?.toBoolean()??!1}get pathLenConstraint(){return this.sequence.subs.length>1?this.sequence.subs[1].toInteger():void 0}get sequence(){return this.extnValueObj.subs[0]}};oa.X509BasicConstraintsExtension=K7;var J7=class extends dh{get digitalSignature(){return this.bitString[0]===1}get keyCertSign(){return this.bitString[5]===1}get crlSign(){return this.bitString[6]===1}get bitString(){return this.extnValueObj.subs[0].toBitString()}};oa.X509KeyUsageExtension=J7;var z7=class extends dh{get rfc822Name(){return this.findGeneralName(1)?.value.toString(\"ascii\")}get uri(){return this.findGeneralName(6)?.value.toString(\"ascii\")}otherName(e){let r=this.findGeneralName(0);return r===void 0||r.subs[0].toOID()!==e?void 0:r.subs[1].subs[0].value.toString(\"ascii\")}findGeneralName(e){return this.generalNames.find(r=>r.tag.isContextSpecific(e))}get generalNames(){return this.extnValueObj.subs[0].subs}};oa.X509SubjectAlternativeNameExtension=z7;var Z7=class extends dh{get keyIdentifier(){return this.findSequenceMember(0)?.value}findSequenceMember(e){return this.sequence.subs.find(r=>r.tag.isContextSpecific(e))}get sequence(){return this.extnValueObj.subs[0]}};oa.X509AuthorityKeyIDExtension=Z7;var X7=class extends dh{get keyIdentifier(){return this.extnValueObj.subs[0].value}};oa.X509SubjectKeyIDExtension=X7;var $7=class extends dh{constructor(e){super(e)}get signedCertificateTimestamps(){let e=this.extnValueObj.subs[0].value,r=new AMt.ByteStream(e),s=r.getUint16()+2,a=[];for(;r.position<s;){let n=r.getUint16(),c=r.getBlock(n);a.push(pMt.SignedCertificateTimestamp.parse(c))}if(r.position!==s)throw new Error(\"SCT list length does not match actual length\");return a}};oa.X509SCTExtension=$7});var fRe=L(sc=>{\"use strict\";var hMt=sc&&sc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),gMt=sc&&sc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uRe=sc&&sc.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&hMt(e,t,r);return gMt(e,t),e};Object.defineProperty(sc,\"__esModule\",{value:!0});sc.X509Certificate=sc.EXTENSION_OID_SCT=void 0;var dMt=mO(),cRe=uRe(Zw()),mMt=IO(),yMt=uRe(H7()),iy=eK(),EMt=\"2.5.29.14\",IMt=\"2.5.29.15\",CMt=\"2.5.29.17\",wMt=\"2.5.29.19\",BMt=\"2.5.29.35\";sc.EXTENSION_OID_SCT=\"1.3.6.1.4.1.11129.2.4.2\";var tK=class t{constructor(e){this.root=e}static parse(e){let r=typeof e==\"string\"?yMt.toDER(e):e,s=dMt.ASN1Obj.parseBuffer(r);return new t(s)}get tbsCertificate(){return this.tbsCertificateObj}get version(){return`v${(this.versionObj.subs[0].toInteger()+BigInt(1)).toString()}`}get serialNumber(){return this.serialNumberObj.value}get notBefore(){return this.validityObj.subs[0].toDate()}get notAfter(){return this.validityObj.subs[1].toDate()}get issuer(){return this.issuerObj.value}get subject(){return this.subjectObj.value}get publicKey(){return this.subjectPublicKeyInfoObj.toDER()}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return mMt.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value.subarray(1)}get subjectAltName(){let e=this.extSubjectAltName;return e?.uri||e?.rfc822Name}get extensions(){return this.extensionsObj?.subs[0]?.subs||[]}get extKeyUsage(){let e=this.findExtension(IMt);return e?new iy.X509KeyUsageExtension(e):void 0}get extBasicConstraints(){let e=this.findExtension(wMt);return e?new iy.X509BasicConstraintsExtension(e):void 0}get extSubjectAltName(){let e=this.findExtension(CMt);return e?new iy.X509SubjectAlternativeNameExtension(e):void 0}get extAuthorityKeyID(){let e=this.findExtension(BMt);return e?new iy.X509AuthorityKeyIDExtension(e):void 0}get extSubjectKeyID(){let e=this.findExtension(EMt);return e?new iy.X509SubjectKeyIDExtension(e):void 0}get extSCT(){let e=this.findExtension(sc.EXTENSION_OID_SCT);return e?new iy.X509SCTExtension(e):void 0}get isCA(){let e=this.extBasicConstraints?.isCA||!1;return this.extKeyUsage?e&&this.extKeyUsage.keyCertSign:e}extension(e){let r=this.findExtension(e);return r?new iy.X509Extension(r):void 0}verify(e){let r=e?.publicKey||this.publicKey,s=cRe.createPublicKey(r);return cRe.verify(this.tbsCertificate.toDER(),s,this.signatureValue,this.signatureAlgorithm)}validForDate(e){return this.notBefore<=e&&e<=this.notAfter}equals(e){return this.root.toDER().equals(e.root.toDER())}clone(){let e=this.root.toDER(),r=Buffer.alloc(e.length);return e.copy(r),t.parse(r)}findExtension(e){return this.extensions.find(r=>r.subs[0].toOID()===e)}get tbsCertificateObj(){return this.root.subs[0]}get signatureAlgorithmObj(){return this.root.subs[1]}get signatureValueObj(){return this.root.subs[2]}get versionObj(){return this.tbsCertificateObj.subs[0]}get serialNumberObj(){return this.tbsCertificateObj.subs[1]}get issuerObj(){return this.tbsCertificateObj.subs[3]}get validityObj(){return this.tbsCertificateObj.subs[4]}get subjectObj(){return this.tbsCertificateObj.subs[5]}get subjectPublicKeyInfoObj(){return this.tbsCertificateObj.subs[6]}get extensionsObj(){return this.tbsCertificateObj.subs.find(e=>e.tag.isContextSpecific(3))}};sc.X509Certificate=tK});var pRe=L(vg=>{\"use strict\";Object.defineProperty(vg,\"__esModule\",{value:!0});vg.X509SCTExtension=vg.X509Certificate=vg.EXTENSION_OID_SCT=void 0;var ARe=fRe();Object.defineProperty(vg,\"EXTENSION_OID_SCT\",{enumerable:!0,get:function(){return ARe.EXTENSION_OID_SCT}});Object.defineProperty(vg,\"X509Certificate\",{enumerable:!0,get:function(){return ARe.X509Certificate}});var vMt=eK();Object.defineProperty(vg,\"X509SCTExtension\",{enumerable:!0,get:function(){return vMt.X509SCTExtension}})});var wl=L(Kn=>{\"use strict\";var SMt=Kn&&Kn.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),DMt=Kn&&Kn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_b=Kn&&Kn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&SMt(e,t,r);return DMt(e,t),e};Object.defineProperty(Kn,\"__esModule\",{value:!0});Kn.X509SCTExtension=Kn.X509Certificate=Kn.EXTENSION_OID_SCT=Kn.ByteStream=Kn.RFC3161Timestamp=Kn.pem=Kn.json=Kn.encoding=Kn.dsse=Kn.crypto=Kn.ASN1Obj=void 0;var bMt=mO();Object.defineProperty(Kn,\"ASN1Obj\",{enumerable:!0,get:function(){return bMt.ASN1Obj}});Kn.crypto=_b(Zw());Kn.dsse=_b(ZTe());Kn.encoding=_b(eRe());Kn.json=_b(tRe());Kn.pem=_b(H7());var PMt=oRe();Object.defineProperty(Kn,\"RFC3161Timestamp\",{enumerable:!0,get:function(){return PMt.RFC3161Timestamp}});var xMt=Ob();Object.defineProperty(Kn,\"ByteStream\",{enumerable:!0,get:function(){return xMt.ByteStream}});var rK=pRe();Object.defineProperty(Kn,\"EXTENSION_OID_SCT\",{enumerable:!0,get:function(){return rK.EXTENSION_OID_SCT}});Object.defineProperty(Kn,\"X509Certificate\",{enumerable:!0,get:function(){return rK.X509Certificate}});Object.defineProperty(Kn,\"X509SCTExtension\",{enumerable:!0,get:function(){return rK.X509SCTExtension}})});var hRe=L(nK=>{\"use strict\";Object.defineProperty(nK,\"__esModule\",{value:!0});nK.extractJWTSubject=QMt;var kMt=wl();function QMt(t){let e=t.split(\".\",3),r=JSON.parse(kMt.encoding.base64Decode(e[1]));switch(r.iss){case\"https://accounts.google.com\":case\"https://oauth2.sigstore.dev/auth\":return r.email;default:return r.sub}}});var gRe=L((kCr,TMt)=>{TMt.exports={name:\"@sigstore/sign\",version:\"3.1.0\",description:\"Sigstore signing library\",main:\"dist/index.js\",types:\"dist/index.d.ts\",scripts:{clean:\"shx rm -rf dist *.tsbuildinfo\",build:\"tsc --build\",test:\"jest\"},files:[\"dist\"],author:\"bdehamer@github.com\",license:\"Apache-2.0\",repository:{type:\"git\",url:\"git+https://github.com/sigstore/sigstore-js.git\"},bugs:{url:\"https://github.com/sigstore/sigstore-js/issues\"},homepage:\"https://github.com/sigstore/sigstore-js/tree/main/packages/sign#readme\",publishConfig:{provenance:!0},devDependencies:{\"@sigstore/jest\":\"^0.0.0\",\"@sigstore/mock\":\"^0.10.0\",\"@sigstore/rekor-types\":\"^3.0.0\",\"@types/make-fetch-happen\":\"^10.0.4\",\"@types/promise-retry\":\"^1.1.6\"},dependencies:{\"@sigstore/bundle\":\"^3.1.0\",\"@sigstore/core\":\"^2.0.0\",\"@sigstore/protobuf-specs\":\"^0.4.0\",\"make-fetch-happen\":\"^14.0.2\",\"proc-log\":\"^5.0.0\",\"promise-retry\":\"^2.0.1\"},engines:{node:\"^18.17.0 || >=20.5.0\"}}});var mRe=L($w=>{\"use strict\";var RMt=$w&&$w.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($w,\"__esModule\",{value:!0});$w.getUserAgent=void 0;var dRe=RMt(ye(\"os\")),FMt=()=>{let t=gRe().version,e=process.version,r=dRe.default.platform(),s=dRe.default.arch();return`sigstore-js/${t} (Node ${e}) (${r}/${s})`};$w.getUserAgent=FMt});var Sg=L(Ki=>{\"use strict\";var NMt=Ki&&Ki.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),OMt=Ki&&Ki.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yRe=Ki&&Ki.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a<s.length;a++)s[a]!==\"default\"&&NMt(r,e,s[a]);return OMt(r,e),r}}();Object.defineProperty(Ki,\"__esModule\",{value:!0});Ki.ua=Ki.oidc=Ki.pem=Ki.json=Ki.encoding=Ki.dsse=Ki.crypto=void 0;var Ub=wl();Object.defineProperty(Ki,\"crypto\",{enumerable:!0,get:function(){return Ub.crypto}});Object.defineProperty(Ki,\"dsse\",{enumerable:!0,get:function(){return Ub.dsse}});Object.defineProperty(Ki,\"encoding\",{enumerable:!0,get:function(){return Ub.encoding}});Object.defineProperty(Ki,\"json\",{enumerable:!0,get:function(){return Ub.json}});Object.defineProperty(Ki,\"pem\",{enumerable:!0,get:function(){return Ub.pem}});Ki.oidc=yRe(hRe());Ki.ua=yRe(mRe())});var sK=L(BO=>{\"use strict\";Object.defineProperty(BO,\"__esModule\",{value:!0});BO.BaseBundleBuilder=void 0;var iK=class{constructor(e){this.signer=e.signer,this.witnesses=e.witnesses}async create(e){let r=await this.prepare(e).then(f=>this.signer.sign(f)),s=await this.package(e,r),a=await Promise.all(this.witnesses.map(f=>f.testify(s.content,LMt(r.key)))),n=[],c=[];return a.forEach(({tlogEntries:f,rfc3161Timestamps:p})=>{n.push(...f??[]),c.push(...p??[])}),s.verificationMaterial.tlogEntries=n,s.verificationMaterial.timestampVerificationData={rfc3161Timestamps:c},s}async prepare(e){return e.data}};BO.BaseBundleBuilder=iK;function LMt(t){switch(t.$case){case\"publicKey\":return t.publicKey;case\"x509Certificate\":return t.certificate}}});var aK=L(xA=>{\"use strict\";var MMt=xA&&xA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),_Mt=xA&&xA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),UMt=xA&&xA.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a<s.length;a++)s[a]!==\"default\"&&MMt(r,e,s[a]);return _Mt(r,e),r}}();Object.defineProperty(xA,\"__esModule\",{value:!0});xA.toMessageSignatureBundle=HMt;xA.toDSSEBundle=jMt;var ERe=UMt(Nb()),oK=Sg();function HMt(t,e){let r=oK.crypto.digest(\"sha256\",t.data);return ERe.toMessageSignatureBundle({digest:r,signature:e.signature,certificate:e.key.$case===\"x509Certificate\"?oK.pem.toDER(e.key.certificate):void 0,keyHint:e.key.$case===\"publicKey\"?e.key.hint:void 0,certificateChain:!0})}function jMt(t,e,r){return ERe.toDSSEBundle({artifact:t.data,artifactType:t.type,signature:e.signature,certificate:e.key.$case===\"x509Certificate\"?oK.pem.toDER(e.key.certificate):void 0,keyHint:e.key.$case===\"publicKey\"?e.key.hint:void 0,certificateChain:r})}});var CRe=L(vO=>{\"use strict\";Object.defineProperty(vO,\"__esModule\",{value:!0});vO.DSSEBundleBuilder=void 0;var qMt=Sg(),GMt=sK(),WMt=aK(),lK=class extends GMt.BaseBundleBuilder{constructor(e){super(e),this.certificateChain=e.certificateChain??!1}async prepare(e){let r=IRe(e);return qMt.dsse.preAuthEncoding(r.type,r.data)}async package(e,r){return(0,WMt.toDSSEBundle)(IRe(e),r,this.certificateChain)}};vO.DSSEBundleBuilder=lK;function IRe(t){return{...t,type:t.type??\"\"}}});var wRe=L(SO=>{\"use strict\";Object.defineProperty(SO,\"__esModule\",{value:!0});SO.MessageSignatureBundleBuilder=void 0;var YMt=sK(),VMt=aK(),cK=class extends YMt.BaseBundleBuilder{constructor(e){super(e)}async package(e,r){return(0,VMt.toMessageSignatureBundle)(e,r)}};SO.MessageSignatureBundleBuilder=cK});var BRe=L(e1=>{\"use strict\";Object.defineProperty(e1,\"__esModule\",{value:!0});e1.MessageSignatureBundleBuilder=e1.DSSEBundleBuilder=void 0;var KMt=CRe();Object.defineProperty(e1,\"DSSEBundleBuilder\",{enumerable:!0,get:function(){return KMt.DSSEBundleBuilder}});var JMt=wRe();Object.defineProperty(e1,\"MessageSignatureBundleBuilder\",{enumerable:!0,get:function(){return JMt.MessageSignatureBundleBuilder}})});var bO=L(DO=>{\"use strict\";Object.defineProperty(DO,\"__esModule\",{value:!0});DO.HTTPError=void 0;var uK=class extends Error{constructor({status:e,message:r,location:s}){super(`(${e}) ${r}`),this.statusCode=e,this.location=s}};DO.HTTPError=uK});var t1=L(Hb=>{\"use strict\";Object.defineProperty(Hb,\"__esModule\",{value:!0});Hb.InternalError=void 0;Hb.internalError=ZMt;var zMt=bO(),PO=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.name=this.constructor.name,this.cause=s,this.code=e}};Hb.InternalError=PO;function ZMt(t,e,r){throw t instanceof zMt.HTTPError&&(r+=` - ${t.message}`),new PO({code:e,message:r,cause:t})}});var xO=L((UCr,vRe)=>{vRe.exports=fetch});var SRe=L(r1=>{\"use strict\";var XMt=r1&&r1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r1,\"__esModule\",{value:!0});r1.CIContextProvider=void 0;var $Mt=XMt(xO()),e_t=[t_t,r_t],fK=class{constructor(e=\"sigstore\"){this.audience=e}async getToken(){return Promise.any(e_t.map(e=>e(this.audience))).catch(()=>Promise.reject(\"CI: no tokens available\"))}};r1.CIContextProvider=fK;async function t_t(t){if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL||!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)return Promise.reject(\"no token available\");let e=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);return e.searchParams.append(\"audience\",t),(await(0,$Mt.default)(e.href,{retry:2,headers:{Accept:\"application/json\",Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).json().then(s=>s.value)}async function r_t(){return process.env.SIGSTORE_ID_TOKEN?process.env.SIGSTORE_ID_TOKEN:Promise.reject(\"no token available\")}});var DRe=L(kO=>{\"use strict\";Object.defineProperty(kO,\"__esModule\",{value:!0});kO.CIContextProvider=void 0;var n_t=SRe();Object.defineProperty(kO,\"CIContextProvider\",{enumerable:!0,get:function(){return n_t.CIContextProvider}})});var PRe=L((qCr,bRe)=>{var i_t=Symbol(\"proc-log.meta\");bRe.exports={META:i_t,output:{LEVELS:[\"standard\",\"error\",\"buffer\",\"flush\"],KEYS:{standard:\"standard\",error:\"error\",buffer:\"buffer\",flush:\"flush\"},standard:function(...t){return process.emit(\"output\",\"standard\",...t)},error:function(...t){return process.emit(\"output\",\"error\",...t)},buffer:function(...t){return process.emit(\"output\",\"buffer\",...t)},flush:function(...t){return process.emit(\"output\",\"flush\",...t)}},log:{LEVELS:[\"notice\",\"error\",\"warn\",\"info\",\"verbose\",\"http\",\"silly\",\"timing\",\"pause\",\"resume\"],KEYS:{notice:\"notice\",error:\"error\",warn:\"warn\",info:\"info\",verbose:\"verbose\",http:\"http\",silly:\"silly\",timing:\"timing\",pause:\"pause\",resume:\"resume\"},error:function(...t){return process.emit(\"log\",\"error\",...t)},notice:function(...t){return process.emit(\"log\",\"notice\",...t)},warn:function(...t){return process.emit(\"log\",\"warn\",...t)},info:function(...t){return process.emit(\"log\",\"info\",...t)},verbose:function(...t){return process.emit(\"log\",\"verbose\",...t)},http:function(...t){return process.emit(\"log\",\"http\",...t)},silly:function(...t){return process.emit(\"log\",\"silly\",...t)},timing:function(...t){return process.emit(\"log\",\"timing\",...t)},pause:function(){return process.emit(\"log\",\"pause\")},resume:function(){return process.emit(\"log\",\"resume\")}},time:{LEVELS:[\"start\",\"end\"],KEYS:{start:\"start\",end:\"end\"},start:function(t,e){process.emit(\"time\",\"start\",t);function r(){return process.emit(\"time\",\"end\",t)}if(typeof e==\"function\"){let s=e();return s&&s.finally?s.finally(r):(r(),s)}return r},end:function(t){return process.emit(\"time\",\"end\",t)}},input:{LEVELS:[\"start\",\"end\",\"read\"],KEYS:{start:\"start\",end:\"end\",read:\"read\"},start:function(t){process.emit(\"input\",\"start\");function e(){return process.emit(\"input\",\"end\")}if(typeof t==\"function\"){let r=t();return r&&r.finally?r.finally(e):(e(),r)}return e},end:function(){return process.emit(\"input\",\"end\")},read:function(...t){let e,r,s=new Promise((a,n)=>{e=a,r=n});return process.emit(\"input\",\"read\",e,r,...t),s}}}});var QRe=L((GCr,kRe)=>{\"use strict\";function xRe(t,e){for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!0,configurable:!0});return t}function s_t(t,e,r){if(!t||typeof t==\"string\")throw new TypeError(\"Please pass an Error to err-code\");r||(r={}),typeof e==\"object\"&&(r=e,e=void 0),e!=null&&(r.code=e);try{return xRe(t,r)}catch{r.message=t.message,r.stack=t.stack;let a=function(){};return a.prototype=Object.create(Object.getPrototypeOf(t)),xRe(new a,r)}}kRe.exports=s_t});var RRe=L((WCr,TRe)=>{function tu(t,e){typeof e==\"boolean\"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}TRe.exports=tu;tu.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};tu.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};tu.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error(\"RetryOperation timeout occurred\")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var s=this,a=setTimeout(function(){s._attempts++,s._operationTimeoutCb&&(s._timeout=setTimeout(function(){s._operationTimeoutCb(s._attempts)},s._operationTimeout),s._options.unref&&s._timeout.unref()),s._fn(s._attempts)},r);return this._options.unref&&a.unref(),!0};tu.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};tu.prototype.try=function(t){console.log(\"Using RetryOperation.try() is deprecated\"),this.attempt(t)};tu.prototype.start=function(t){console.log(\"Using RetryOperation.start() is deprecated\"),this.attempt(t)};tu.prototype.start=tu.prototype.try;tu.prototype.errors=function(){return this._errors};tu.prototype.attempts=function(){return this._attempts};tu.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,r=0,s=0;s<this._errors.length;s++){var a=this._errors[s],n=a.message,c=(t[n]||0)+1;t[n]=c,c>=r&&(e=a,r=c)}return e}});var FRe=L(sy=>{var o_t=RRe();sy.operation=function(t){var e=sy.timeouts(t);return new o_t(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};sy.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error(\"minTimeout is greater than maxTimeout\");for(var s=[],a=0;a<e.retries;a++)s.push(this.createTimeout(a,e));return t&&t.forever&&!s.length&&s.push(this.createTimeout(a,e)),s.sort(function(n,c){return n-c}),s};sy.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,s=Math.round(r*e.minTimeout*Math.pow(e.factor,t));return s=Math.min(s,e.maxTimeout),s};sy.wrap=function(t,e,r){if(e instanceof Array&&(r=e,e=null),!r){r=[];for(var s in t)typeof t[s]==\"function\"&&r.push(s)}for(var a=0;a<r.length;a++){var n=r[a],c=t[n];t[n]=function(p){var h=sy.operation(e),E=Array.prototype.slice.call(arguments,1),C=E.pop();E.push(function(S){h.retry(S)||(S&&(arguments[0]=h.mainError()),C.apply(this,arguments))}),h.attempt(function(){p.apply(t,E)})}.bind(t,c),t[n].options=e}}});var ORe=L((VCr,NRe)=>{NRe.exports=FRe()});var _Re=L((KCr,MRe)=>{\"use strict\";var a_t=QRe(),l_t=ORe(),c_t=Object.prototype.hasOwnProperty;function LRe(t){return t&&t.code===\"EPROMISERETRY\"&&c_t.call(t,\"retried\")}function u_t(t,e){var r,s;return typeof t==\"object\"&&typeof e==\"function\"&&(r=e,e=t,t=r),s=l_t.operation(e),new Promise(function(a,n){s.attempt(function(c){Promise.resolve().then(function(){return t(function(f){throw LRe(f)&&(f=f.retried),a_t(new Error(\"Retrying\"),\"EPROMISERETRY\",{retried:f})},c)}).then(a,function(f){LRe(f)&&(f=f.retried,s.retry(f||new Error))||n(f)})})})}MRe.exports=u_t});var QO=L(jb=>{\"use strict\";var HRe=jb&&jb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jb,\"__esModule\",{value:!0});jb.fetchWithRetry=w_t;var f_t=ye(\"http2\"),A_t=HRe(xO()),URe=PRe(),p_t=HRe(_Re()),h_t=Sg(),g_t=bO(),{HTTP2_HEADER_LOCATION:d_t,HTTP2_HEADER_CONTENT_TYPE:m_t,HTTP2_HEADER_USER_AGENT:y_t,HTTP_STATUS_INTERNAL_SERVER_ERROR:E_t,HTTP_STATUS_TOO_MANY_REQUESTS:I_t,HTTP_STATUS_REQUEST_TIMEOUT:C_t}=f_t.constants;async function w_t(t,e){return(0,p_t.default)(async(r,s)=>{let a=e.method||\"POST\",n={[y_t]:h_t.ua.getUserAgent(),...e.headers},c=await(0,A_t.default)(t,{method:a,headers:n,body:e.body,timeout:e.timeout,retry:!1}).catch(f=>(URe.log.http(\"fetch\",`${a} ${t} attempt ${s} failed with ${f}`),r(f)));if(c.ok)return c;{let f=await B_t(c);if(URe.log.http(\"fetch\",`${a} ${t} attempt ${s} failed with ${c.status}`),v_t(c.status))return r(f);throw f}},S_t(e.retry))}var B_t=async t=>{let e=t.statusText,r=t.headers.get(d_t)||void 0;if(t.headers.get(m_t)?.includes(\"application/json\"))try{e=(await t.json()).message||e}catch{}return new g_t.HTTPError({status:t.status,message:e,location:r})},v_t=t=>[C_t,I_t].includes(t)||t>=E_t,S_t=t=>typeof t==\"boolean\"?{retries:t?1:0}:typeof t==\"number\"?{retries:t}:{retries:0,...t}});var jRe=L(TO=>{\"use strict\";Object.defineProperty(TO,\"__esModule\",{value:!0});TO.Fulcio=void 0;var D_t=QO(),AK=class{constructor(e){this.options=e}async createSigningCertificate(e){let{baseURL:r,retry:s,timeout:a}=this.options,n=`${r}/api/v2/signingCert`;return(await(0,D_t.fetchWithRetry)(n,{headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(e),timeout:a,retry:s})).json()}};TO.Fulcio=AK});var qRe=L(RO=>{\"use strict\";Object.defineProperty(RO,\"__esModule\",{value:!0});RO.CAClient=void 0;var b_t=t1(),P_t=jRe(),pK=class{constructor(e){this.fulcio=new P_t.Fulcio({baseURL:e.fulcioBaseURL,retry:e.retry,timeout:e.timeout})}async createSigningCertificate(e,r,s){let a=x_t(e,r,s);try{let n=await this.fulcio.createSigningCertificate(a);return(n.signedCertificateEmbeddedSct?n.signedCertificateEmbeddedSct:n.signedCertificateDetachedSct).chain.certificates}catch(n){(0,b_t.internalError)(n,\"CA_CREATE_SIGNING_CERTIFICATE_ERROR\",\"error creating signing certificate\")}}};RO.CAClient=pK;function x_t(t,e,r){return{credentials:{oidcIdentityToken:t},publicKeyRequest:{publicKey:{algorithm:\"ECDSA\",content:e},proofOfPossession:r.toString(\"base64\")}}}});var WRe=L(n1=>{\"use strict\";var k_t=n1&&n1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n1,\"__esModule\",{value:!0});n1.EphemeralSigner=void 0;var GRe=k_t(ye(\"crypto\")),Q_t=\"ec\",T_t=\"P-256\",hK=class{constructor(){this.keypair=GRe.default.generateKeyPairSync(Q_t,{namedCurve:T_t})}async sign(e){let r=GRe.default.sign(null,e,this.keypair.privateKey),s=this.keypair.publicKey.export({format:\"pem\",type:\"spki\"}).toString(\"ascii\");return{signature:r,key:{$case:\"publicKey\",publicKey:s}}}};n1.EphemeralSigner=hK});var YRe=L(oy=>{\"use strict\";Object.defineProperty(oy,\"__esModule\",{value:!0});oy.FulcioSigner=oy.DEFAULT_FULCIO_URL=void 0;var gK=t1(),R_t=Sg(),F_t=qRe(),N_t=WRe();oy.DEFAULT_FULCIO_URL=\"https://fulcio.sigstore.dev\";var dK=class{constructor(e){this.ca=new F_t.CAClient({...e,fulcioBaseURL:e.fulcioBaseURL||oy.DEFAULT_FULCIO_URL}),this.identityProvider=e.identityProvider,this.keyHolder=e.keyHolder||new N_t.EphemeralSigner}async sign(e){let r=await this.getIdentityToken(),s;try{s=R_t.oidc.extractJWTSubject(r)}catch(f){throw new gK.InternalError({code:\"IDENTITY_TOKEN_PARSE_ERROR\",message:`invalid identity token: ${r}`,cause:f})}let a=await this.keyHolder.sign(Buffer.from(s));if(a.key.$case!==\"publicKey\")throw new gK.InternalError({code:\"CA_CREATE_SIGNING_CERTIFICATE_ERROR\",message:\"unexpected format for signing key\"});let n=await this.ca.createSigningCertificate(r,a.key.publicKey,a.signature);return{signature:(await this.keyHolder.sign(e)).signature,key:{$case:\"x509Certificate\",certificate:n[0]}}}async getIdentityToken(){try{return await this.identityProvider.getToken()}catch(e){throw new gK.InternalError({code:\"IDENTITY_TOKEN_READ_ERROR\",message:\"error retrieving identity token\",cause:e})}}};oy.FulcioSigner=dK});var KRe=L(i1=>{\"use strict\";Object.defineProperty(i1,\"__esModule\",{value:!0});i1.FulcioSigner=i1.DEFAULT_FULCIO_URL=void 0;var VRe=YRe();Object.defineProperty(i1,\"DEFAULT_FULCIO_URL\",{enumerable:!0,get:function(){return VRe.DEFAULT_FULCIO_URL}});Object.defineProperty(i1,\"FulcioSigner\",{enumerable:!0,get:function(){return VRe.FulcioSigner}})});var ZRe=L(FO=>{\"use strict\";Object.defineProperty(FO,\"__esModule\",{value:!0});FO.Rekor=void 0;var JRe=QO(),mK=class{constructor(e){this.options=e}async createEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries`,f=await(await(0,JRe.fetchWithRetry)(n,{headers:{\"Content-Type\":\"application/json\",Accept:\"application/json\"},body:JSON.stringify(e),timeout:s,retry:a})).json();return zRe(f)}async getEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries/${e}`,f=await(await(0,JRe.fetchWithRetry)(n,{method:\"GET\",headers:{Accept:\"application/json\"},timeout:s,retry:a})).json();return zRe(f)}};FO.Rekor=mK;function zRe(t){let e=Object.entries(t);if(e.length!=1)throw new Error(\"Received multiple entries in Rekor response\");let[r,s]=e[0];return{...s,uuid:r}}});var $Re=L(NO=>{\"use strict\";Object.defineProperty(NO,\"__esModule\",{value:!0});NO.TLogClient=void 0;var XRe=t1(),O_t=bO(),L_t=ZRe(),yK=class{constructor(e){this.fetchOnConflict=e.fetchOnConflict??!1,this.rekor=new L_t.Rekor({baseURL:e.rekorBaseURL,retry:e.retry,timeout:e.timeout})}async createEntry(e){let r;try{r=await this.rekor.createEntry(e)}catch(s){if(M_t(s)&&this.fetchOnConflict){let a=s.location.split(\"/\").pop()||\"\";try{r=await this.rekor.getEntry(a)}catch(n){(0,XRe.internalError)(n,\"TLOG_FETCH_ENTRY_ERROR\",\"error fetching tlog entry\")}}else(0,XRe.internalError)(s,\"TLOG_CREATE_ENTRY_ERROR\",\"error creating tlog entry\")}return r}};NO.TLogClient=yK;function M_t(t){return t instanceof O_t.HTTPError&&t.statusCode===409&&t.location!==void 0}});var eFe=L(EK=>{\"use strict\";Object.defineProperty(EK,\"__esModule\",{value:!0});EK.toProposedEntry=U_t;var __t=Nb(),Dg=Sg(),qb=\"sha256\";function U_t(t,e,r=\"dsse\"){switch(t.$case){case\"dsseEnvelope\":return r===\"intoto\"?q_t(t.dsseEnvelope,e):j_t(t.dsseEnvelope,e);case\"messageSignature\":return H_t(t.messageSignature,e)}}function H_t(t,e){let r=t.messageDigest.digest.toString(\"hex\"),s=t.signature.toString(\"base64\"),a=Dg.encoding.base64Encode(e);return{apiVersion:\"0.0.1\",kind:\"hashedrekord\",spec:{data:{hash:{algorithm:qb,value:r}},signature:{content:s,publicKey:{content:a}}}}}function j_t(t,e){let r=JSON.stringify((0,__t.envelopeToJSON)(t)),s=Dg.encoding.base64Encode(e);return{apiVersion:\"0.0.1\",kind:\"dsse\",spec:{proposedContent:{envelope:r,verifiers:[s]}}}}function q_t(t,e){let r=Dg.crypto.digest(qb,t.payload).toString(\"hex\"),s=G_t(t,e),a=Dg.encoding.base64Encode(t.payload.toString(\"base64\")),n=Dg.encoding.base64Encode(t.signatures[0].sig.toString(\"base64\")),c=t.signatures[0].keyid,f=Dg.encoding.base64Encode(e),p={payloadType:t.payloadType,payload:a,signatures:[{sig:n,publicKey:f}]};return c.length>0&&(p.signatures[0].keyid=c),{apiVersion:\"0.0.2\",kind:\"intoto\",spec:{content:{envelope:p,hash:{algorithm:qb,value:s},payloadHash:{algorithm:qb,value:r}}}}}function G_t(t,e){let r={payloadType:t.payloadType,payload:t.payload.toString(\"base64\"),signatures:[{sig:t.signatures[0].sig.toString(\"base64\"),publicKey:e}]};return t.signatures[0].keyid.length>0&&(r.signatures[0].keyid=t.signatures[0].keyid),Dg.crypto.digest(qb,Dg.json.canonicalize(r)).toString(\"hex\")}});var tFe=L(ay=>{\"use strict\";Object.defineProperty(ay,\"__esModule\",{value:!0});ay.RekorWitness=ay.DEFAULT_REKOR_URL=void 0;var W_t=Sg(),Y_t=$Re(),V_t=eFe();ay.DEFAULT_REKOR_URL=\"https://rekor.sigstore.dev\";var IK=class{constructor(e){this.entryType=e.entryType,this.tlog=new Y_t.TLogClient({...e,rekorBaseURL:e.rekorBaseURL||ay.DEFAULT_REKOR_URL})}async testify(e,r){let s=(0,V_t.toProposedEntry)(e,r,this.entryType),a=await this.tlog.createEntry(s);return K_t(a)}};ay.RekorWitness=IK;function K_t(t){let e=Buffer.from(t.logID,\"hex\"),r=W_t.encoding.base64Decode(t.body),s=JSON.parse(r),a=t?.verification?.signedEntryTimestamp?J_t(t.verification.signedEntryTimestamp):void 0,n=t?.verification?.inclusionProof?z_t(t.verification.inclusionProof):void 0;return{tlogEntries:[{logIndex:t.logIndex.toString(),logId:{keyId:e},integratedTime:t.integratedTime.toString(),kindVersion:{kind:s.kind,version:s.apiVersion},inclusionPromise:a,inclusionProof:n,canonicalizedBody:Buffer.from(t.body,\"base64\")}]}}function J_t(t){return{signedEntryTimestamp:Buffer.from(t,\"base64\")}}function z_t(t){return{logIndex:t.logIndex.toString(),treeSize:t.treeSize.toString(),rootHash:Buffer.from(t.rootHash,\"hex\"),hashes:t.hashes.map(e=>Buffer.from(e,\"hex\")),checkpoint:{envelope:t.checkpoint}}}});var rFe=L(OO=>{\"use strict\";Object.defineProperty(OO,\"__esModule\",{value:!0});OO.TimestampAuthority=void 0;var Z_t=QO(),CK=class{constructor(e){this.options=e}async createTimestamp(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/timestamp`;return(await(0,Z_t.fetchWithRetry)(n,{headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(e),timeout:s,retry:a})).buffer()}};OO.TimestampAuthority=CK});var iFe=L(LO=>{\"use strict\";Object.defineProperty(LO,\"__esModule\",{value:!0});LO.TSAClient=void 0;var X_t=t1(),$_t=rFe(),eUt=Sg(),nFe=\"sha256\",wK=class{constructor(e){this.tsa=new $_t.TimestampAuthority({baseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async createTimestamp(e){let r={artifactHash:eUt.crypto.digest(nFe,e).toString(\"base64\"),hashAlgorithm:nFe};try{return await this.tsa.createTimestamp(r)}catch(s){(0,X_t.internalError)(s,\"TSA_CREATE_TIMESTAMP_ERROR\",\"error creating timestamp\")}}};LO.TSAClient=wK});var sFe=L(MO=>{\"use strict\";Object.defineProperty(MO,\"__esModule\",{value:!0});MO.TSAWitness=void 0;var tUt=iFe(),BK=class{constructor(e){this.tsa=new tUt.TSAClient({tsaBaseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async testify(e){let r=rUt(e);return{rfc3161Timestamps:[{signedTimestamp:await this.tsa.createTimestamp(r)}]}}};MO.TSAWitness=BK;function rUt(t){switch(t.$case){case\"dsseEnvelope\":return t.dsseEnvelope.signatures[0].sig;case\"messageSignature\":return t.messageSignature.signature}}});var aFe=L(bg=>{\"use strict\";Object.defineProperty(bg,\"__esModule\",{value:!0});bg.TSAWitness=bg.RekorWitness=bg.DEFAULT_REKOR_URL=void 0;var oFe=tFe();Object.defineProperty(bg,\"DEFAULT_REKOR_URL\",{enumerable:!0,get:function(){return oFe.DEFAULT_REKOR_URL}});Object.defineProperty(bg,\"RekorWitness\",{enumerable:!0,get:function(){return oFe.RekorWitness}});var nUt=sFe();Object.defineProperty(bg,\"TSAWitness\",{enumerable:!0,get:function(){return nUt.TSAWitness}})});var SK=L(Es=>{\"use strict\";Object.defineProperty(Es,\"__esModule\",{value:!0});Es.TSAWitness=Es.RekorWitness=Es.DEFAULT_REKOR_URL=Es.FulcioSigner=Es.DEFAULT_FULCIO_URL=Es.CIContextProvider=Es.InternalError=Es.MessageSignatureBundleBuilder=Es.DSSEBundleBuilder=void 0;var lFe=BRe();Object.defineProperty(Es,\"DSSEBundleBuilder\",{enumerable:!0,get:function(){return lFe.DSSEBundleBuilder}});Object.defineProperty(Es,\"MessageSignatureBundleBuilder\",{enumerable:!0,get:function(){return lFe.MessageSignatureBundleBuilder}});var iUt=t1();Object.defineProperty(Es,\"InternalError\",{enumerable:!0,get:function(){return iUt.InternalError}});var sUt=DRe();Object.defineProperty(Es,\"CIContextProvider\",{enumerable:!0,get:function(){return sUt.CIContextProvider}});var cFe=KRe();Object.defineProperty(Es,\"DEFAULT_FULCIO_URL\",{enumerable:!0,get:function(){return cFe.DEFAULT_FULCIO_URL}});Object.defineProperty(Es,\"FulcioSigner\",{enumerable:!0,get:function(){return cFe.FulcioSigner}});var vK=aFe();Object.defineProperty(Es,\"DEFAULT_REKOR_URL\",{enumerable:!0,get:function(){return vK.DEFAULT_REKOR_URL}});Object.defineProperty(Es,\"RekorWitness\",{enumerable:!0,get:function(){return vK.RekorWitness}});Object.defineProperty(Es,\"TSAWitness\",{enumerable:!0,get:function(){return vK.TSAWitness}})});var fFe=L(Gb=>{\"use strict\";var uFe=Gb&&Gb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Gb,\"__esModule\",{value:!0});Gb.appDataPath=aUt;var oUt=uFe(ye(\"os\")),s1=uFe(ye(\"path\"));function aUt(t){let e=oUt.default.homedir();switch(process.platform){case\"darwin\":{let r=s1.default.join(e,\"Library\",\"Application Support\");return s1.default.join(r,t)}case\"win32\":{let r=process.env.LOCALAPPDATA||s1.default.join(e,\"AppData\",\"Local\");return s1.default.join(r,t,\"Data\")}default:{let r=process.env.XDG_DATA_HOME||s1.default.join(e,\".local\",\"share\");return s1.default.join(r,t)}}}});var kA=L(Bl=>{\"use strict\";Object.defineProperty(Bl,\"__esModule\",{value:!0});Bl.UnsupportedAlgorithmError=Bl.CryptoError=Bl.LengthOrHashMismatchError=Bl.UnsignedMetadataError=Bl.RepositoryError=Bl.ValueError=void 0;var DK=class extends Error{};Bl.ValueError=DK;var Wb=class extends Error{};Bl.RepositoryError=Wb;var bK=class extends Wb{};Bl.UnsignedMetadataError=bK;var PK=class extends Wb{};Bl.LengthOrHashMismatchError=PK;var _O=class extends Error{};Bl.CryptoError=_O;var xK=class extends _O{};Bl.UnsupportedAlgorithmError=xK});var pFe=L(Pg=>{\"use strict\";Object.defineProperty(Pg,\"__esModule\",{value:!0});Pg.isDefined=lUt;Pg.isObject=AFe;Pg.isStringArray=cUt;Pg.isObjectArray=uUt;Pg.isStringRecord=fUt;Pg.isObjectRecord=AUt;function lUt(t){return t!==void 0}function AFe(t){return typeof t==\"object\"&&t!==null}function cUt(t){return Array.isArray(t)&&t.every(e=>typeof e==\"string\")}function uUt(t){return Array.isArray(t)&&t.every(AFe)}function fUt(t){return typeof t==\"object\"&&t!==null&&Object.keys(t).every(e=>typeof e==\"string\")&&Object.values(t).every(e=>typeof e==\"string\")}function AUt(t){return typeof t==\"object\"&&t!==null&&Object.keys(t).every(e=>typeof e==\"string\")&&Object.values(t).every(e=>typeof e==\"object\"&&e!==null)}});var QK=L((pwr,dFe)=>{var hFe=\",\",pUt=\":\",hUt=\"[\",gUt=\"]\",dUt=\"{\",mUt=\"}\";function kK(t){let e=[];if(typeof t==\"string\")e.push(gFe(t));else if(typeof t==\"boolean\")e.push(JSON.stringify(t));else if(Number.isInteger(t))e.push(JSON.stringify(t));else if(t===null)e.push(JSON.stringify(t));else if(Array.isArray(t)){e.push(hUt);let r=!0;t.forEach(s=>{r||e.push(hFe),r=!1,e.push(kK(s))}),e.push(gUt)}else if(typeof t==\"object\"){e.push(dUt);let r=!0;Object.keys(t).sort().forEach(s=>{r||e.push(hFe),r=!1,e.push(gFe(s)),e.push(pUt),e.push(kK(t[s]))}),e.push(mUt)}else throw new TypeError(\"cannot encode \"+t.toString());return e.join(\"\")}function gFe(t){return'\"'+t.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'}dFe.exports={canonicalize:kK}});var mFe=L(o1=>{\"use strict\";var yUt=o1&&o1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(o1,\"__esModule\",{value:!0});o1.verifySignature=void 0;var EUt=QK(),IUt=yUt(ye(\"crypto\")),CUt=(t,e,r)=>{let s=Buffer.from((0,EUt.canonicalize)(t));return IUt.default.verify(void 0,s,e,Buffer.from(r,\"hex\"))};o1.verifySignature=CUt});var Af=L(ru=>{\"use strict\";var wUt=ru&&ru.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),BUt=ru&&ru.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yFe=ru&&ru.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&wUt(e,t,r);return BUt(e,t),e};Object.defineProperty(ru,\"__esModule\",{value:!0});ru.crypto=ru.guard=void 0;ru.guard=yFe(pFe());ru.crypto=yFe(mFe())});var ly=L(mh=>{\"use strict\";var vUt=mh&&mh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mh,\"__esModule\",{value:!0});mh.Signed=mh.MetadataKind=void 0;mh.isMetadataKind=DUt;var SUt=vUt(ye(\"util\")),Yb=kA(),TK=Af(),EFe=[\"1\",\"0\",\"31\"],RK;(function(t){t.Root=\"root\",t.Timestamp=\"timestamp\",t.Snapshot=\"snapshot\",t.Targets=\"targets\"})(RK||(mh.MetadataKind=RK={}));function DUt(t){return typeof t==\"string\"&&Object.values(RK).includes(t)}var FK=class t{constructor(e){this.specVersion=e.specVersion||EFe.join(\".\");let r=this.specVersion.split(\".\");if(!(r.length===2||r.length===3)||!r.every(s=>bUt(s)))throw new Yb.ValueError(\"Failed to parse specVersion\");if(r[0]!=EFe[0])throw new Yb.ValueError(\"Unsupported specVersion\");this.expires=e.expires,this.version=e.version,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.specVersion===e.specVersion&&this.expires===e.expires&&this.version===e.version&&SUt.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}isExpired(e){return e||(e=new Date),e>=new Date(this.expires)}static commonFieldsFromJSON(e){let{spec_version:r,expires:s,version:a,...n}=e;if(TK.guard.isDefined(r)){if(typeof r!=\"string\")throw new TypeError(\"spec_version must be a string\")}else throw new Yb.ValueError(\"spec_version is not defined\");if(TK.guard.isDefined(s)){if(typeof s!=\"string\")throw new TypeError(\"expires must be a string\")}else throw new Yb.ValueError(\"expires is not defined\");if(TK.guard.isDefined(a)){if(typeof a!=\"number\")throw new TypeError(\"version must be a number\")}else throw new Yb.ValueError(\"version is not defined\");return{specVersion:r,expires:s,version:a,unrecognizedFields:n}}};mh.Signed=FK;function bUt(t){return!isNaN(Number(t))}});var Vb=L(kg=>{\"use strict\";var IFe=kg&&kg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kg,\"__esModule\",{value:!0});kg.TargetFile=kg.MetaFile=void 0;var CFe=IFe(ye(\"crypto\")),HO=IFe(ye(\"util\")),xg=kA(),UO=Af(),NK=class t{constructor(e){if(e.version<=0)throw new xg.ValueError(\"Metafile version must be at least 1\");e.length!==void 0&&wFe(e.length),this.version=e.version,this.length=e.length,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.version===e.version&&this.length===e.length&&HO.default.isDeepStrictEqual(this.hashes,e.hashes)&&HO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}verify(e){if(this.length!==void 0&&e.length!==this.length)throw new xg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${e.length}`);this.hashes&&Object.entries(this.hashes).forEach(([r,s])=>{let a;try{a=CFe.default.createHash(r)}catch{throw new xg.LengthOrHashMismatchError(`Hash algorithm ${r} not supported`)}let n=a.update(e).digest(\"hex\");if(n!==s)throw new xg.LengthOrHashMismatchError(`Expected hash ${s} but got ${n}`)})}toJSON(){let e={version:this.version,...this.unrecognizedFields};return this.length!==void 0&&(e.length=this.length),this.hashes&&(e.hashes=this.hashes),e}static fromJSON(e){let{version:r,length:s,hashes:a,...n}=e;if(typeof r!=\"number\")throw new TypeError(\"version must be a number\");if(UO.guard.isDefined(s)&&typeof s!=\"number\")throw new TypeError(\"length must be a number\");if(UO.guard.isDefined(a)&&!UO.guard.isStringRecord(a))throw new TypeError(\"hashes must be string keys and values\");return new t({version:r,length:s,hashes:a,unrecognizedFields:n})}};kg.MetaFile=NK;var OK=class t{constructor(e){wFe(e.length),this.length=e.length,this.path=e.path,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}get custom(){let e=this.unrecognizedFields.custom;return!e||Array.isArray(e)||typeof e!=\"object\"?{}:e}equals(e){return e instanceof t?this.length===e.length&&this.path===e.path&&HO.default.isDeepStrictEqual(this.hashes,e.hashes)&&HO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}async verify(e){let r=0,s=Object.keys(this.hashes).reduce((a,n)=>{try{a[n]=CFe.default.createHash(n)}catch{throw new xg.LengthOrHashMismatchError(`Hash algorithm ${n} not supported`)}return a},{});for await(let a of e)r+=a.length,Object.values(s).forEach(n=>{n.update(a)});if(r!==this.length)throw new xg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${r}`);Object.entries(s).forEach(([a,n])=>{let c=this.hashes[a],f=n.digest(\"hex\");if(f!==c)throw new xg.LengthOrHashMismatchError(`Expected hash ${c} but got ${f}`)})}toJSON(){return{length:this.length,hashes:this.hashes,...this.unrecognizedFields}}static fromJSON(e,r){let{length:s,hashes:a,...n}=r;if(typeof s!=\"number\")throw new TypeError(\"length must be a number\");if(!UO.guard.isStringRecord(a))throw new TypeError(\"hashes must have string keys and values\");return new t({length:s,path:e,hashes:a,unrecognizedFields:n})}};kg.TargetFile=OK;function wFe(t){if(t<0)throw new xg.ValueError(\"Length must be at least 0\")}});var BFe=L(LK=>{\"use strict\";Object.defineProperty(LK,\"__esModule\",{value:!0});LK.encodeOIDString=xUt;var PUt=6;function xUt(t){let e=t.split(\".\"),r=parseInt(e[0],10)*40+parseInt(e[1],10),s=[];e.slice(2).forEach(n=>{let c=kUt(parseInt(n,10));s.push(...c)});let a=Buffer.from([r,...s]);return Buffer.from([PUt,a.length,...a])}function kUt(t){let e=[],r=0;for(;t>0;)e.unshift(t&127|r),t>>=7,r=128;return e}});var bFe=L(Jb=>{\"use strict\";var QUt=Jb&&Jb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jb,\"__esModule\",{value:!0});Jb.getPublicKey=NUt;var a1=QUt(ye(\"crypto\")),Kb=kA(),MK=BFe(),jO=48,vFe=3,SFe=0,TUt=\"1.3.101.112\",RUt=\"1.2.840.10045.2.1\",FUt=\"1.2.840.10045.3.1.7\",_K=\"-----BEGIN PUBLIC KEY-----\";function NUt(t){switch(t.keyType){case\"rsa\":return OUt(t);case\"ed25519\":return LUt(t);case\"ecdsa\":case\"ecdsa-sha2-nistp256\":case\"ecdsa-sha2-nistp384\":return MUt(t);default:throw new Kb.UnsupportedAlgorithmError(`Unsupported key type: ${t.keyType}`)}}function OUt(t){if(!t.keyVal.startsWith(_K))throw new Kb.CryptoError(\"Invalid key format\");let e=a1.default.createPublicKey(t.keyVal);switch(t.scheme){case\"rsassa-pss-sha256\":return{key:e,padding:a1.default.constants.RSA_PKCS1_PSS_PADDING};default:throw new Kb.UnsupportedAlgorithmError(`Unsupported RSA scheme: ${t.scheme}`)}}function LUt(t){let e;if(t.keyVal.startsWith(_K))e=a1.default.createPublicKey(t.keyVal);else{if(!DFe(t.keyVal))throw new Kb.CryptoError(\"Invalid key format\");e=a1.default.createPublicKey({key:_Ut.hexToDER(t.keyVal),format:\"der\",type:\"spki\"})}return{key:e}}function MUt(t){let e;if(t.keyVal.startsWith(_K))e=a1.default.createPublicKey(t.keyVal);else{if(!DFe(t.keyVal))throw new Kb.CryptoError(\"Invalid key format\");e=a1.default.createPublicKey({key:UUt.hexToDER(t.keyVal),format:\"der\",type:\"spki\"})}return{key:e}}var _Ut={hexToDER:t=>{let e=Buffer.from(t,\"hex\"),r=(0,MK.encodeOIDString)(TUt),s=Buffer.concat([Buffer.concat([Buffer.from([jO]),Buffer.from([r.length]),r]),Buffer.concat([Buffer.from([vFe]),Buffer.from([e.length+1]),Buffer.from([SFe]),e])]);return Buffer.concat([Buffer.from([jO]),Buffer.from([s.length]),s])}},UUt={hexToDER:t=>{let e=Buffer.from(t,\"hex\"),r=Buffer.concat([Buffer.from([vFe]),Buffer.from([e.length+1]),Buffer.from([SFe]),e]),s=Buffer.concat([(0,MK.encodeOIDString)(RUt),(0,MK.encodeOIDString)(FUt)]),a=Buffer.concat([Buffer.from([jO]),Buffer.from([s.length]),s]);return Buffer.concat([Buffer.from([jO]),Buffer.from([a.length+r.length]),a,r])}},DFe=t=>/^[0-9a-fA-F]+$/.test(t)});var qO=L(l1=>{\"use strict\";var HUt=l1&&l1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(l1,\"__esModule\",{value:!0});l1.Key=void 0;var PFe=HUt(ye(\"util\")),zb=kA(),xFe=Af(),jUt=bFe(),UK=class t{constructor(e){let{keyID:r,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c}=e;this.keyID=r,this.keyType=s,this.scheme=a,this.keyVal=n,this.unrecognizedFields=c||{}}verifySignature(e){let r=e.signatures[this.keyID];if(!r)throw new zb.UnsignedMetadataError(\"no signature for key found in metadata\");if(!this.keyVal.public)throw new zb.UnsignedMetadataError(\"no public key found\");let s=(0,jUt.getPublicKey)({keyType:this.keyType,scheme:this.scheme,keyVal:this.keyVal.public}),a=e.signed.toJSON();try{if(!xFe.crypto.verifySignature(a,s,r.sig))throw new zb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}catch(n){throw n instanceof zb.UnsignedMetadataError?n:new zb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}equals(e){return e instanceof t?this.keyID===e.keyID&&this.keyType===e.keyType&&this.scheme===e.scheme&&PFe.default.isDeepStrictEqual(this.keyVal,e.keyVal)&&PFe.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keytype:this.keyType,scheme:this.scheme,keyval:this.keyVal,...this.unrecognizedFields}}static fromJSON(e,r){let{keytype:s,scheme:a,keyval:n,...c}=r;if(typeof s!=\"string\")throw new TypeError(\"keytype must be a string\");if(typeof a!=\"string\")throw new TypeError(\"scheme must be a string\");if(!xFe.guard.isStringRecord(n))throw new TypeError(\"keyval must be a string record\");return new t({keyID:e,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c})}};l1.Key=UK});var FFe=L((Cwr,RFe)=>{\"use strict\";RFe.exports=QFe;function QFe(t,e,r){t instanceof RegExp&&(t=kFe(t,r)),e instanceof RegExp&&(e=kFe(e,r));var s=TFe(t,e,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+t.length,s[1]),post:r.slice(s[1]+e.length)}}function kFe(t,e){var r=e.match(t);return r?r[0]:null}QFe.range=TFe;function TFe(t,e,r){var s,a,n,c,f,p=r.indexOf(t),h=r.indexOf(e,p+1),E=p;if(p>=0&&h>0){for(s=[],n=r.length;E>=0&&!f;)E==p?(s.push(E),p=r.indexOf(t,E+1)):s.length==1?f=[s.pop(),h]:(a=s.pop(),a<n&&(n=a,c=h),h=r.indexOf(e,E+1)),E=p<h&&p>=0?p:h;s.length&&(f=[n,c])}return f}});var jFe=L((wwr,HFe)=>{var NFe=FFe();HFe.exports=WUt;var OFe=\"\\0SLASH\"+Math.random()+\"\\0\",LFe=\"\\0OPEN\"+Math.random()+\"\\0\",jK=\"\\0CLOSE\"+Math.random()+\"\\0\",MFe=\"\\0COMMA\"+Math.random()+\"\\0\",_Fe=\"\\0PERIOD\"+Math.random()+\"\\0\";function HK(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function qUt(t){return t.split(\"\\\\\\\\\").join(OFe).split(\"\\\\{\").join(LFe).split(\"\\\\}\").join(jK).split(\"\\\\,\").join(MFe).split(\"\\\\.\").join(_Fe)}function GUt(t){return t.split(OFe).join(\"\\\\\").split(LFe).join(\"{\").split(jK).join(\"}\").split(MFe).join(\",\").split(_Fe).join(\".\")}function UFe(t){if(!t)return[\"\"];var e=[],r=NFe(\"{\",\"}\",t);if(!r)return t.split(\",\");var s=r.pre,a=r.body,n=r.post,c=s.split(\",\");c[c.length-1]+=\"{\"+a+\"}\";var f=UFe(n);return n.length&&(c[c.length-1]+=f.shift(),c.push.apply(c,f)),e.push.apply(e,c),e}function WUt(t){return t?(t.substr(0,2)===\"{}\"&&(t=\"\\\\{\\\\}\"+t.substr(2)),Zb(qUt(t),!0).map(GUt)):[]}function YUt(t){return\"{\"+t+\"}\"}function VUt(t){return/^-?0\\d/.test(t)}function KUt(t,e){return t<=e}function JUt(t,e){return t>=e}function Zb(t,e){var r=[],s=NFe(\"{\",\"}\",t);if(!s)return[t];var a=s.pre,n=s.post.length?Zb(s.post,!1):[\"\"];if(/\\$$/.test(s.pre))for(var c=0;c<n.length;c++){var f=a+\"{\"+s.body+\"}\"+n[c];r.push(f)}else{var p=/^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(s.body),h=/^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(s.body),E=p||h,C=s.body.indexOf(\",\")>=0;if(!E&&!C)return s.post.match(/,.*\\}/)?(t=s.pre+\"{\"+s.body+jK+s.post,Zb(t)):[t];var S;if(E)S=s.body.split(/\\.\\./);else if(S=UFe(s.body),S.length===1&&(S=Zb(S[0],!1).map(YUt),S.length===1))return n.map(function(Ce){return s.pre+S[0]+Ce});var P;if(E){var I=HK(S[0]),R=HK(S[1]),N=Math.max(S[0].length,S[1].length),U=S.length==3?Math.abs(HK(S[2])):1,W=KUt,te=R<I;te&&(U*=-1,W=JUt);var ie=S.some(VUt);P=[];for(var Ae=I;W(Ae,R);Ae+=U){var ce;if(h)ce=String.fromCharCode(Ae),ce===\"\\\\\"&&(ce=\"\");else if(ce=String(Ae),ie){var me=N-ce.length;if(me>0){var pe=new Array(me+1).join(\"0\");Ae<0?ce=\"-\"+pe+ce.slice(1):ce=pe+ce}}P.push(ce)}}else{P=[];for(var Be=0;Be<S.length;Be++)P.push.apply(P,Zb(S[Be],!1))}for(var Be=0;Be<P.length;Be++)for(var c=0;c<n.length;c++){var f=a+P[Be]+n[c];(!e||E||f)&&r.push(f)}}return r}});var qFe=L(GO=>{\"use strict\";Object.defineProperty(GO,\"__esModule\",{value:!0});GO.assertValidPattern=void 0;var zUt=1024*64,ZUt=t=>{if(typeof t!=\"string\")throw new TypeError(\"invalid pattern\");if(t.length>zUt)throw new TypeError(\"pattern is too long\")};GO.assertValidPattern=ZUt});var WFe=L(WO=>{\"use strict\";Object.defineProperty(WO,\"__esModule\",{value:!0});WO.parseClass=void 0;var XUt={\"[:alnum:]\":[\"\\\\p{L}\\\\p{Nl}\\\\p{Nd}\",!0],\"[:alpha:]\":[\"\\\\p{L}\\\\p{Nl}\",!0],\"[:ascii:]\":[\"\\\\x00-\\\\x7f\",!1],\"[:blank:]\":[\"\\\\p{Zs}\\\\t\",!0],\"[:cntrl:]\":[\"\\\\p{Cc}\",!0],\"[:digit:]\":[\"\\\\p{Nd}\",!0],\"[:graph:]\":[\"\\\\p{Z}\\\\p{C}\",!0,!0],\"[:lower:]\":[\"\\\\p{Ll}\",!0],\"[:print:]\":[\"\\\\p{C}\",!0],\"[:punct:]\":[\"\\\\p{P}\",!0],\"[:space:]\":[\"\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f\",!0],\"[:upper:]\":[\"\\\\p{Lu}\",!0],\"[:word:]\":[\"\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}\",!0],\"[:xdigit:]\":[\"A-Fa-f0-9\",!1]},Xb=t=>t.replace(/[[\\]\\\\-]/g,\"\\\\$&\"),$Ut=t=>t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),GFe=t=>t.join(\"\"),e4t=(t,e)=>{let r=e;if(t.charAt(r)!==\"[\")throw new Error(\"not in a brace expression\");let s=[],a=[],n=r+1,c=!1,f=!1,p=!1,h=!1,E=r,C=\"\";e:for(;n<t.length;){let R=t.charAt(n);if((R===\"!\"||R===\"^\")&&n===r+1){h=!0,n++;continue}if(R===\"]\"&&c&&!p){E=n+1;break}if(c=!0,R===\"\\\\\"&&!p){p=!0,n++;continue}if(R===\"[\"&&!p){for(let[N,[U,W,te]]of Object.entries(XUt))if(t.startsWith(N,n)){if(C)return[\"$.\",!1,t.length-r,!0];n+=N.length,te?a.push(U):s.push(U),f=f||W;continue e}}if(p=!1,C){R>C?s.push(Xb(C)+\"-\"+Xb(R)):R===C&&s.push(Xb(R)),C=\"\",n++;continue}if(t.startsWith(\"-]\",n+1)){s.push(Xb(R+\"-\")),n+=2;continue}if(t.startsWith(\"-\",n+1)){C=R,n+=2;continue}s.push(Xb(R)),n++}if(E<n)return[\"\",!1,0,!1];if(!s.length&&!a.length)return[\"$.\",!1,t.length-r,!0];if(a.length===0&&s.length===1&&/^\\\\?.$/.test(s[0])&&!h){let R=s[0].length===2?s[0].slice(-1):s[0];return[$Ut(R),!1,E-r,!1]}let S=\"[\"+(h?\"^\":\"\")+GFe(s)+\"]\",P=\"[\"+(h?\"\":\"^\")+GFe(a)+\"]\";return[s.length&&a.length?\"(\"+S+\"|\"+P+\")\":s.length?S:P,f,E-r,!0]};WO.parseClass=e4t});var VO=L(YO=>{\"use strict\";Object.defineProperty(YO,\"__esModule\",{value:!0});YO.unescape=void 0;var t4t=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\\[([^\\/\\\\])\\]/g,\"$1\"):t.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g,\"$1$2\").replace(/\\\\([^\\/])/g,\"$1\");YO.unescape=t4t});var WK=L(zO=>{\"use strict\";Object.defineProperty(zO,\"__esModule\",{value:!0});zO.AST=void 0;var r4t=WFe(),KO=VO(),n4t=new Set([\"!\",\"?\",\"+\",\"*\",\"@\"]),YFe=t=>n4t.has(t),i4t=\"(?!(?:^|/)\\\\.\\\\.?(?:$|/))\",JO=\"(?!\\\\.)\",s4t=new Set([\"[\",\".\"]),o4t=new Set([\"..\",\".\"]),a4t=new Set(\"().*{}+?[]^$\\\\!\"),l4t=t=>t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),GK=\"[^/]\",VFe=GK+\"*?\",KFe=GK+\"+?\",qK=class t{type;#t;#r;#i=!1;#e=[];#n;#o;#l;#a=!1;#s;#c;#f=!1;constructor(e,r,s={}){this.type=e,e&&(this.#r=!0),this.#n=r,this.#t=this.#n?this.#n.#t:this,this.#s=this.#t===this?s:this.#t.#s,this.#l=this.#t===this?[]:this.#t.#l,e===\"!\"&&!this.#t.#a&&this.#l.push(this),this.#o=this.#n?this.#n.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!=\"string\"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+\"(\"+this.#e.map(e=>String(e)).join(\"|\")+\")\":this.#c=this.#e.map(e=>String(e)).join(\"\")}#p(){if(this!==this.#t)throw new Error(\"should only call on root\");if(this.#a)return this;this.toString(),this.#a=!0;let e;for(;e=this.#l.pop();){if(e.type!==\"!\")continue;let r=e,s=r.#n;for(;s;){for(let a=r.#o+1;!s.type&&a<s.#e.length;a++)for(let n of e.#e){if(typeof n==\"string\")throw new Error(\"string part in extglob AST??\");n.copyIn(s.#e[a])}r=s,s=r.#n}}return this}push(...e){for(let r of e)if(r!==\"\"){if(typeof r!=\"string\"&&!(r instanceof t&&r.#n===this))throw new Error(\"invalid part: \"+r);this.#e.push(r)}}toJSON(){let e=this.type===null?this.#e.slice().map(r=>typeof r==\"string\"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&this.#n?.type===\"!\")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(this.#o===0)return!0;let e=this.#n;for(let r=0;r<this.#o;r++){let s=e.#e[r];if(!(s instanceof t&&s.type===\"!\"))return!1}return!0}isEnd(){if(this.#t===this||this.#n?.type===\"!\")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();let e=this.#n?this.#n.#e.length:0;return this.#o===e-1}copyIn(e){typeof e==\"string\"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let s of this.#e)r.copyIn(s);return r}static#u(e,r,s,a){let n=!1,c=!1,f=-1,p=!1;if(r.type===null){let P=s,I=\"\";for(;P<e.length;){let R=e.charAt(P++);if(n||R===\"\\\\\"){n=!n,I+=R;continue}if(c){P===f+1?(R===\"^\"||R===\"!\")&&(p=!0):R===\"]\"&&!(P===f+2&&p)&&(c=!1),I+=R;continue}else if(R===\"[\"){c=!0,f=P,p=!1,I+=R;continue}if(!a.noext&&YFe(R)&&e.charAt(P)===\"(\"){r.push(I),I=\"\";let N=new t(R,r);P=t.#u(e,N,P,a),r.push(N);continue}I+=R}return r.push(I),P}let h=s+1,E=new t(null,r),C=[],S=\"\";for(;h<e.length;){let P=e.charAt(h++);if(n||P===\"\\\\\"){n=!n,S+=P;continue}if(c){h===f+1?(P===\"^\"||P===\"!\")&&(p=!0):P===\"]\"&&!(h===f+2&&p)&&(c=!1),S+=P;continue}else if(P===\"[\"){c=!0,f=h,p=!1,S+=P;continue}if(YFe(P)&&e.charAt(h)===\"(\"){E.push(S),S=\"\";let I=new t(P,E);E.push(I),h=t.#u(e,I,h,a);continue}if(P===\"|\"){E.push(S),S=\"\",C.push(E),E=new t(null,r);continue}if(P===\")\")return S===\"\"&&r.#e.length===0&&(r.#f=!0),E.push(S),S=\"\",r.push(...C,E),h;S+=P}return r.type=null,r.#r=void 0,r.#e=[e.substring(s-1)],h}static fromGlob(e,r={}){let s=new t(null,void 0,r);return t.#u(e,s,0,r),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[r,s,a,n]=this.toRegExpSource();if(!(a||this.#r||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return s;let f=(this.#s.nocase?\"i\":\"\")+(n?\"u\":\"\");return Object.assign(new RegExp(`^${r}$`,f),{_src:r,_glob:e})}get options(){return this.#s}toRegExpSource(e){let r=e??!!this.#s.dot;if(this.#t===this&&this.#p(),!this.type){let p=this.isStart()&&this.isEnd(),h=this.#e.map(P=>{let[I,R,N,U]=typeof P==\"string\"?t.#h(P,this.#r,p):P.toRegExpSource(e);return this.#r=this.#r||N,this.#i=this.#i||U,I}).join(\"\"),E=\"\";if(this.isStart()&&typeof this.#e[0]==\"string\"&&!(this.#e.length===1&&o4t.has(this.#e[0]))){let I=s4t,R=r&&I.has(h.charAt(0))||h.startsWith(\"\\\\.\")&&I.has(h.charAt(2))||h.startsWith(\"\\\\.\\\\.\")&&I.has(h.charAt(4)),N=!r&&!e&&I.has(h.charAt(0));E=R?i4t:N?JO:\"\"}let C=\"\";return this.isEnd()&&this.#t.#a&&this.#n?.type===\"!\"&&(C=\"(?:$|\\\\/)\"),[E+h+C,(0,KO.unescape)(h),this.#r=!!this.#r,this.#i]}let s=this.type===\"*\"||this.type===\"+\",a=this.type===\"!\"?\"(?:(?!(?:\":\"(?:\",n=this.#A(r);if(this.isStart()&&this.isEnd()&&!n&&this.type!==\"!\"){let p=this.toString();return this.#e=[p],this.type=null,this.#r=void 0,[p,(0,KO.unescape)(this.toString()),!1,!1]}let c=!s||e||r||!JO?\"\":this.#A(!0);c===n&&(c=\"\"),c&&(n=`(?:${n})(?:${c})*?`);let f=\"\";if(this.type===\"!\"&&this.#f)f=(this.isStart()&&!r?JO:\"\")+KFe;else{let p=this.type===\"!\"?\"))\"+(this.isStart()&&!r&&!e?JO:\"\")+VFe+\")\":this.type===\"@\"?\")\":this.type===\"?\"?\")?\":this.type===\"+\"&&c?\")\":this.type===\"*\"&&c?\")?\":`)${this.type}`;f=a+n+p}return[f,(0,KO.unescape)(n),this.#r=!!this.#r,this.#i]}#A(e){return this.#e.map(r=>{if(typeof r==\"string\")throw new Error(\"string type in extglob ast??\");let[s,a,n,c]=r.toRegExpSource(e);return this.#i=this.#i||c,s}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join(\"|\")}static#h(e,r,s=!1){let a=!1,n=\"\",c=!1;for(let f=0;f<e.length;f++){let p=e.charAt(f);if(a){a=!1,n+=(a4t.has(p)?\"\\\\\":\"\")+p;continue}if(p===\"\\\\\"){f===e.length-1?n+=\"\\\\\\\\\":a=!0;continue}if(p===\"[\"){let[h,E,C,S]=(0,r4t.parseClass)(e,f);if(C){n+=h,c=c||E,f+=C-1,r=r||S;continue}}if(p===\"*\"){s&&e===\"*\"?n+=KFe:n+=VFe,r=!0;continue}if(p===\"?\"){n+=GK,r=!0;continue}n+=l4t(p)}return[n,(0,KO.unescape)(e),!!r,c]}};zO.AST=qK});var YK=L(ZO=>{\"use strict\";Object.defineProperty(ZO,\"__esModule\",{value:!0});ZO.escape=void 0;var c4t=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\\]]/g,\"[$&]\"):t.replace(/[?*()[\\]\\\\]/g,\"\\\\$&\");ZO.escape=c4t});var tNe=L(pr=>{\"use strict\";var u4t=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pr,\"__esModule\",{value:!0});pr.unescape=pr.escape=pr.AST=pr.Minimatch=pr.match=pr.makeRe=pr.braceExpand=pr.defaults=pr.filter=pr.GLOBSTAR=pr.sep=pr.minimatch=void 0;var f4t=u4t(jFe()),XO=qFe(),ZFe=WK(),A4t=YK(),p4t=VO(),h4t=(t,e,r={})=>((0,XO.assertValidPattern)(e),!r.nocomment&&e.charAt(0)===\"#\"?!1:new cy(e,r).match(t));pr.minimatch=h4t;var g4t=/^\\*+([^+@!?\\*\\[\\(]*)$/,d4t=t=>e=>!e.startsWith(\".\")&&e.endsWith(t),m4t=t=>e=>e.endsWith(t),y4t=t=>(t=t.toLowerCase(),e=>!e.startsWith(\".\")&&e.toLowerCase().endsWith(t)),E4t=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),I4t=/^\\*+\\.\\*+$/,C4t=t=>!t.startsWith(\".\")&&t.includes(\".\"),w4t=t=>t!==\".\"&&t!==\"..\"&&t.includes(\".\"),B4t=/^\\.\\*+$/,v4t=t=>t!==\".\"&&t!==\"..\"&&t.startsWith(\".\"),S4t=/^\\*+$/,D4t=t=>t.length!==0&&!t.startsWith(\".\"),b4t=t=>t.length!==0&&t!==\".\"&&t!==\"..\",P4t=/^\\?+([^+@!?\\*\\[\\(]*)?$/,x4t=([t,e=\"\"])=>{let r=XFe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},k4t=([t,e=\"\"])=>{let r=$Fe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},Q4t=([t,e=\"\"])=>{let r=$Fe([t]);return e?s=>r(s)&&s.endsWith(e):r},T4t=([t,e=\"\"])=>{let r=XFe([t]);return e?s=>r(s)&&s.endsWith(e):r},XFe=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(\".\")},$Fe=([t])=>{let e=t.length;return r=>r.length===e&&r!==\".\"&&r!==\"..\"},eNe=typeof process==\"object\"&&process?typeof process.env==\"object\"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:\"posix\",JFe={win32:{sep:\"\\\\\"},posix:{sep:\"/\"}};pr.sep=eNe===\"win32\"?JFe.win32.sep:JFe.posix.sep;pr.minimatch.sep=pr.sep;pr.GLOBSTAR=Symbol(\"globstar **\");pr.minimatch.GLOBSTAR=pr.GLOBSTAR;var R4t=\"[^/]\",F4t=R4t+\"*?\",N4t=\"(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?\",O4t=\"(?:(?!(?:\\\\/|^)\\\\.).)*?\",L4t=(t,e={})=>r=>(0,pr.minimatch)(r,t,e);pr.filter=L4t;pr.minimatch.filter=pr.filter;var nu=(t,e={})=>Object.assign({},t,e),M4t=t=>{if(!t||typeof t!=\"object\"||!Object.keys(t).length)return pr.minimatch;let e=pr.minimatch;return Object.assign((s,a,n={})=>e(s,a,nu(t,n)),{Minimatch:class extends e.Minimatch{constructor(a,n={}){super(a,nu(t,n))}static defaults(a){return e.defaults(nu(t,a)).Minimatch}},AST:class extends e.AST{constructor(a,n,c={}){super(a,n,nu(t,c))}static fromGlob(a,n={}){return e.AST.fromGlob(a,nu(t,n))}},unescape:(s,a={})=>e.unescape(s,nu(t,a)),escape:(s,a={})=>e.escape(s,nu(t,a)),filter:(s,a={})=>e.filter(s,nu(t,a)),defaults:s=>e.defaults(nu(t,s)),makeRe:(s,a={})=>e.makeRe(s,nu(t,a)),braceExpand:(s,a={})=>e.braceExpand(s,nu(t,a)),match:(s,a,n={})=>e.match(s,a,nu(t,n)),sep:e.sep,GLOBSTAR:pr.GLOBSTAR})};pr.defaults=M4t;pr.minimatch.defaults=pr.defaults;var _4t=(t,e={})=>((0,XO.assertValidPattern)(t),e.nobrace||!/\\{(?:(?!\\{).)*\\}/.test(t)?[t]:(0,f4t.default)(t));pr.braceExpand=_4t;pr.minimatch.braceExpand=pr.braceExpand;var U4t=(t,e={})=>new cy(t,e).makeRe();pr.makeRe=U4t;pr.minimatch.makeRe=pr.makeRe;var H4t=(t,e,r={})=>{let s=new cy(e,r);return t=t.filter(a=>s.match(a)),s.options.nonull&&!t.length&&t.push(e),t};pr.match=H4t;pr.minimatch.match=pr.match;var zFe=/[?*]|[+@!]\\(.*?\\)|\\[|\\]/,j4t=t=>t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),cy=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){(0,XO.assertValidPattern)(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||eNe,this.isWindows=this.platform===\"win32\",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\\\/g,\"/\")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!=\"string\")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)===\"#\"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let a=this.globParts.map((n,c,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){let p=n[0]===\"\"&&n[1]===\"\"&&(n[2]===\"?\"||!zFe.test(n[2]))&&!zFe.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(p)return[...n.slice(0,4),...n.slice(4).map(E=>this.parse(E))];if(h)return[n[0],...n.slice(1).map(E=>this.parse(E))]}return n.map(p=>this.parse(p))});if(this.debug(this.pattern,a),this.set=a.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let c=this.set[n];c[0]===\"\"&&c[1]===\"\"&&this.globParts[n][2]===\"?\"&&typeof c[3]==\"string\"&&/^[a-z]:$/i.test(c[3])&&(c[2]=\"?\")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let s=0;s<e.length;s++)for(let a=0;a<e[s].length;a++)e[s][a]===\"**\"&&(e[s][a]=\"*\");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let s=-1;for(;(s=r.indexOf(\"**\",s+1))!==-1;){let a=s;for(;r[a+1]===\"**\";)a++;a!==s&&r.splice(s,a-s)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((s,a)=>{let n=s[s.length-1];return a===\"**\"&&n===\"**\"?s:a===\"..\"&&n&&n!==\"..\"&&n!==\".\"&&n!==\"**\"?(s.pop(),s):(s.push(a),s)},[]),r.length===0?[\"\"]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let a=1;a<e.length-1;a++){let n=e[a];a===1&&n===\"\"&&e[0]===\"\"||(n===\".\"||n===\"\")&&(r=!0,e.splice(a,1),a--)}e[0]===\".\"&&e.length===2&&(e[1]===\".\"||e[1]===\"\")&&(r=!0,e.pop())}let s=0;for(;(s=e.indexOf(\"..\",s+1))!==-1;){let a=e[s-1];a&&a!==\".\"&&a!==\"..\"&&a!==\"**\"&&(r=!0,e.splice(s-1,2),s-=2)}}while(r);return e.length===0?[\"\"]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let s of e){let a=-1;for(;(a=s.indexOf(\"**\",a+1))!==-1;){let c=a;for(;s[c+1]===\"**\";)c++;c>a&&s.splice(a+1,c-a);let f=s[a+1],p=s[a+2],h=s[a+3];if(f!==\"..\"||!p||p===\".\"||p===\"..\"||!h||h===\".\"||h===\"..\")continue;r=!0,s.splice(a,1);let E=s.slice(0);E[a]=\"**\",e.push(E),a--}if(!this.preserveMultipleSlashes){for(let c=1;c<s.length-1;c++){let f=s[c];c===1&&f===\"\"&&s[0]===\"\"||(f===\".\"||f===\"\")&&(r=!0,s.splice(c,1),c--)}s[0]===\".\"&&s.length===2&&(s[1]===\".\"||s[1]===\"\")&&(r=!0,s.pop())}let n=0;for(;(n=s.indexOf(\"..\",n+1))!==-1;){let c=s[n-1];if(c&&c!==\".\"&&c!==\"..\"&&c!==\"**\"){r=!0;let p=n===1&&s[n+1]===\"**\"?[\".\"]:[];s.splice(n-1,2,...p),s.length===0&&s.push(\"\"),n-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let s=r+1;s<e.length;s++){let a=this.partsMatch(e[r],e[s],!this.preserveMultipleSlashes);if(a){e[r]=[],e[s]=a;break}}return e.filter(r=>r.length)}partsMatch(e,r,s=!1){let a=0,n=0,c=[],f=\"\";for(;a<e.length&&n<r.length;)if(e[a]===r[n])c.push(f===\"b\"?r[n]:e[a]),a++,n++;else if(s&&e[a]===\"**\"&&r[n]===e[a+1])c.push(e[a]),a++;else if(s&&r[n]===\"**\"&&e[a]===r[n+1])c.push(r[n]),n++;else if(e[a]===\"*\"&&r[n]&&(this.options.dot||!r[n].startsWith(\".\"))&&r[n]!==\"**\"){if(f===\"b\")return!1;f=\"a\",c.push(e[a]),a++,n++}else if(r[n]===\"*\"&&e[a]&&(this.options.dot||!e[a].startsWith(\".\"))&&e[a]!==\"**\"){if(f===\"a\")return!1;f=\"b\",c.push(r[n]),a++,n++}else return!1;return e.length===r.length&&c}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,s=0;for(let a=0;a<e.length&&e.charAt(a)===\"!\";a++)r=!r,s++;s&&(this.pattern=e.slice(s)),this.negate=r}matchOne(e,r,s=!1){let a=this.options;if(this.isWindows){let R=typeof e[0]==\"string\"&&/^[a-z]:$/i.test(e[0]),N=!R&&e[0]===\"\"&&e[1]===\"\"&&e[2]===\"?\"&&/^[a-z]:$/i.test(e[3]),U=typeof r[0]==\"string\"&&/^[a-z]:$/i.test(r[0]),W=!U&&r[0]===\"\"&&r[1]===\"\"&&r[2]===\"?\"&&typeof r[3]==\"string\"&&/^[a-z]:$/i.test(r[3]),te=N?3:R?0:void 0,ie=W?3:U?0:void 0;if(typeof te==\"number\"&&typeof ie==\"number\"){let[Ae,ce]=[e[te],r[ie]];Ae.toLowerCase()===ce.toLowerCase()&&(r[ie]=Ae,ie>te?r=r.slice(ie):te>ie&&(e=e.slice(te)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug(\"matchOne\",this,{file:e,pattern:r}),this.debug(\"matchOne\",e.length,r.length);for(var c=0,f=0,p=e.length,h=r.length;c<p&&f<h;c++,f++){this.debug(\"matchOne loop\");var E=r[f],C=e[c];if(this.debug(r,E,C),E===!1)return!1;if(E===pr.GLOBSTAR){this.debug(\"GLOBSTAR\",[r,E,C]);var S=c,P=f+1;if(P===h){for(this.debug(\"** at the end\");c<p;c++)if(e[c]===\".\"||e[c]===\"..\"||!a.dot&&e[c].charAt(0)===\".\")return!1;return!0}for(;S<p;){var I=e[S];if(this.debug(`\nglobstar while`,e,S,r,P,I),this.matchOne(e.slice(S),r.slice(P),s))return this.debug(\"globstar found match!\",S,p,I),!0;if(I===\".\"||I===\"..\"||!a.dot&&I.charAt(0)===\".\"){this.debug(\"dot detected!\",e,S,r,P);break}this.debug(\"globstar swallow a segment, and continue\"),S++}return!!(s&&(this.debug(`\n>>> no match, partial?`,e,S,r,P),S===p))}let R;if(typeof E==\"string\"?(R=C===E,this.debug(\"string match\",E,C,R)):(R=E.test(C),this.debug(\"pattern match\",E,C,R)),!R)return!1}if(c===p&&f===h)return!0;if(c===p)return s;if(f===h)return c===p-1&&e[c]===\"\";throw new Error(\"wtf?\")}braceExpand(){return(0,pr.braceExpand)(this.pattern,this.options)}parse(e){(0,XO.assertValidPattern)(e);let r=this.options;if(e===\"**\")return pr.GLOBSTAR;if(e===\"\")return\"\";let s,a=null;(s=e.match(S4t))?a=r.dot?b4t:D4t:(s=e.match(g4t))?a=(r.nocase?r.dot?E4t:y4t:r.dot?m4t:d4t)(s[1]):(s=e.match(P4t))?a=(r.nocase?r.dot?k4t:x4t:r.dot?Q4t:T4t)(s):(s=e.match(I4t))?a=r.dot?w4t:C4t:(s=e.match(B4t))&&(a=v4t);let n=ZFe.AST.fromGlob(e,this.options).toMMPattern();return a&&typeof n==\"object\"&&Reflect.defineProperty(n,\"test\",{value:a}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,s=r.noglobstar?F4t:r.dot?N4t:O4t,a=new Set(r.nocase?[\"i\"]:[]),n=e.map(p=>{let h=p.map(E=>{if(E instanceof RegExp)for(let C of E.flags.split(\"\"))a.add(C);return typeof E==\"string\"?j4t(E):E===pr.GLOBSTAR?pr.GLOBSTAR:E._src});return h.forEach((E,C)=>{let S=h[C+1],P=h[C-1];E!==pr.GLOBSTAR||P===pr.GLOBSTAR||(P===void 0?S!==void 0&&S!==pr.GLOBSTAR?h[C+1]=\"(?:\\\\/|\"+s+\"\\\\/)?\"+S:h[C]=s:S===void 0?h[C-1]=P+\"(?:\\\\/|\"+s+\")?\":S!==pr.GLOBSTAR&&(h[C-1]=P+\"(?:\\\\/|\\\\/\"+s+\"\\\\/)\"+S,h[C+1]=pr.GLOBSTAR))}),h.filter(E=>E!==pr.GLOBSTAR).join(\"/\")}).join(\"|\"),[c,f]=e.length>1?[\"(?:\",\")\"]:[\"\",\"\"];n=\"^\"+c+n+f+\"$\",this.negate&&(n=\"^(?!\"+n+\").+$\");try{this.regexp=new RegExp(n,[...a].join(\"\"))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(\"/\"):this.isWindows&&/^\\/\\/[^\\/]+/.test(e)?[\"\",...e.split(/\\/+/)]:e.split(/\\/+/)}match(e,r=this.partial){if(this.debug(\"match\",e,this.pattern),this.comment)return!1;if(this.empty)return e===\"\";if(e===\"/\"&&r)return!0;let s=this.options;this.isWindows&&(e=e.split(\"\\\\\").join(\"/\"));let a=this.slashSplit(e);this.debug(this.pattern,\"split\",a);let n=this.set;this.debug(this.pattern,\"set\",n);let c=a[a.length-1];if(!c)for(let f=a.length-2;!c&&f>=0;f--)c=a[f];for(let f=0;f<n.length;f++){let p=n[f],h=a;if(s.matchBase&&p.length===1&&(h=[c]),this.matchOne(h,p,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return pr.minimatch.defaults(e).Minimatch}};pr.Minimatch=cy;var q4t=WK();Object.defineProperty(pr,\"AST\",{enumerable:!0,get:function(){return q4t.AST}});var G4t=YK();Object.defineProperty(pr,\"escape\",{enumerable:!0,get:function(){return G4t.escape}});var W4t=VO();Object.defineProperty(pr,\"unescape\",{enumerable:!0,get:function(){return W4t.unescape}});pr.minimatch.AST=ZFe.AST;pr.minimatch.Minimatch=cy;pr.minimatch.escape=A4t.escape;pr.minimatch.unescape=p4t.unescape});var JK=L(iu=>{\"use strict\";var rNe=iu&&iu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iu,\"__esModule\",{value:!0});iu.SuccinctRoles=iu.DelegatedRole=iu.Role=iu.TOP_LEVEL_ROLE_NAMES=void 0;var nNe=rNe(ye(\"crypto\")),Y4t=tNe(),$O=rNe(ye(\"util\")),eL=kA(),uy=Af();iu.TOP_LEVEL_ROLE_NAMES=[\"root\",\"targets\",\"snapshot\",\"timestamp\"];var $b=class t{constructor(e){let{keyIDs:r,threshold:s,unrecognizedFields:a}=e;if(V4t(r))throw new eL.ValueError(\"duplicate key IDs found\");if(s<1)throw new eL.ValueError(\"threshold must be at least 1\");this.keyIDs=r,this.threshold=s,this.unrecognizedFields=a||{}}equals(e){return e instanceof t?this.threshold===e.threshold&&$O.default.isDeepStrictEqual(this.keyIDs,e.keyIDs)&&$O.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(e){let{keyids:r,threshold:s,...a}=e;if(!uy.guard.isStringArray(r))throw new TypeError(\"keyids must be an array\");if(typeof s!=\"number\")throw new TypeError(\"threshold must be a number\");return new t({keyIDs:r,threshold:s,unrecognizedFields:a})}};iu.Role=$b;function V4t(t){return new Set(t).size!==t.length}var VK=class t extends $b{constructor(e){super(e);let{name:r,terminating:s,paths:a,pathHashPrefixes:n}=e;if(this.name=r,this.terminating=s,e.paths&&e.pathHashPrefixes)throw new eL.ValueError(\"paths and pathHashPrefixes are mutually exclusive\");this.paths=a,this.pathHashPrefixes=n}equals(e){return e instanceof t?super.equals(e)&&this.name===e.name&&this.terminating===e.terminating&&$O.default.isDeepStrictEqual(this.paths,e.paths)&&$O.default.isDeepStrictEqual(this.pathHashPrefixes,e.pathHashPrefixes):!1}isDelegatedPath(e){if(this.paths)return this.paths.some(r=>J4t(e,r));if(this.pathHashPrefixes){let s=nNe.default.createHash(\"sha256\").update(e).digest(\"hex\");return this.pathHashPrefixes.some(a=>s.startsWith(a))}return!1}toJSON(){let e={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(e.paths=this.paths),this.pathHashPrefixes&&(e.path_hash_prefixes=this.pathHashPrefixes),e}static fromJSON(e){let{keyids:r,threshold:s,name:a,terminating:n,paths:c,path_hash_prefixes:f,...p}=e;if(!uy.guard.isStringArray(r))throw new TypeError(\"keyids must be an array of strings\");if(typeof s!=\"number\")throw new TypeError(\"threshold must be a number\");if(typeof a!=\"string\")throw new TypeError(\"name must be a string\");if(typeof n!=\"boolean\")throw new TypeError(\"terminating must be a boolean\");if(uy.guard.isDefined(c)&&!uy.guard.isStringArray(c))throw new TypeError(\"paths must be an array of strings\");if(uy.guard.isDefined(f)&&!uy.guard.isStringArray(f))throw new TypeError(\"path_hash_prefixes must be an array of strings\");return new t({keyIDs:r,threshold:s,name:a,terminating:n,paths:c,pathHashPrefixes:f,unrecognizedFields:p})}};iu.DelegatedRole=VK;var K4t=(t,e)=>t.map((r,s)=>[r,e[s]]);function J4t(t,e){let r=t.split(\"/\"),s=e.split(\"/\");return s.length!=r.length?!1:K4t(r,s).every(([a,n])=>(0,Y4t.minimatch)(a,n))}var KK=class t extends $b{constructor(e){super(e);let{bitLength:r,namePrefix:s}=e;if(r<=0||r>32)throw new eL.ValueError(\"bitLength must be between 1 and 32\");this.bitLength=r,this.namePrefix=s,this.numberOfBins=Math.pow(2,r),this.suffixLen=(this.numberOfBins-1).toString(16).length}equals(e){return e instanceof t?super.equals(e)&&this.bitLength===e.bitLength&&this.namePrefix===e.namePrefix:!1}getRoleForTarget(e){let a=nNe.default.createHash(\"sha256\").update(e).digest().subarray(0,4),n=32-this.bitLength,f=(a.readUInt32BE()>>>n).toString(16).padStart(this.suffixLen,\"0\");return`${this.namePrefix}-${f}`}*getRoles(){for(let e=0;e<this.numberOfBins;e++){let r=e.toString(16).padStart(this.suffixLen,\"0\");yield`${this.namePrefix}-${r}`}}isDelegatedRole(e){let r=this.namePrefix+\"-\";if(!e.startsWith(r))return!1;let s=e.slice(r.length,e.length);if(s.length!=this.suffixLen||!s.match(/^[0-9a-fA-F]+$/))return!1;let a=parseInt(s,16);return 0<=a&&a<this.numberOfBins}toJSON(){return{...super.toJSON(),bit_length:this.bitLength,name_prefix:this.namePrefix}}static fromJSON(e){let{keyids:r,threshold:s,bit_length:a,name_prefix:n,...c}=e;if(!uy.guard.isStringArray(r))throw new TypeError(\"keyids must be an array of strings\");if(typeof s!=\"number\")throw new TypeError(\"threshold must be a number\");if(typeof a!=\"number\")throw new TypeError(\"bit_length must be a number\");if(typeof n!=\"string\")throw new TypeError(\"name_prefix must be a string\");return new t({keyIDs:r,threshold:s,bitLength:a,namePrefix:n,unrecognizedFields:c})}};iu.SuccinctRoles=KK});var XK=L(c1=>{\"use strict\";var z4t=c1&&c1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c1,\"__esModule\",{value:!0});c1.Root=void 0;var iNe=z4t(ye(\"util\")),zK=ly(),sNe=kA(),Z4t=qO(),tL=JK(),rL=Af(),ZK=class t extends zK.Signed{constructor(e){if(super(e),this.type=zK.MetadataKind.Root,this.keys=e.keys||{},this.consistentSnapshot=e.consistentSnapshot??!0,!e.roles)this.roles=tL.TOP_LEVEL_ROLE_NAMES.reduce((r,s)=>({...r,[s]:new tL.Role({keyIDs:[],threshold:1})}),{});else{let r=new Set(Object.keys(e.roles));if(!tL.TOP_LEVEL_ROLE_NAMES.every(s=>r.has(s)))throw new sNe.ValueError(\"missing top-level role\");this.roles=e.roles}}addKey(e,r){if(!this.roles[r])throw new sNe.ValueError(`role ${r} does not exist`);this.roles[r].keyIDs.includes(e.keyID)||this.roles[r].keyIDs.push(e.keyID),this.keys[e.keyID]=e}equals(e){return e instanceof t?super.equals(e)&&this.consistentSnapshot===e.consistentSnapshot&&iNe.default.isDeepStrictEqual(this.keys,e.keys)&&iNe.default.isDeepStrictEqual(this.roles,e.roles):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,keys:X4t(this.keys),roles:$4t(this.roles),consistent_snapshot:this.consistentSnapshot,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=zK.Signed.commonFieldsFromJSON(e),{keys:a,roles:n,consistent_snapshot:c,...f}=r;if(typeof c!=\"boolean\")throw new TypeError(\"consistent_snapshot must be a boolean\");return new t({...s,keys:e3t(a),roles:t3t(n),consistentSnapshot:c,unrecognizedFields:f})}};c1.Root=ZK;function X4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function $4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function e3t(t){let e;if(rL.guard.isDefined(t)){if(!rL.guard.isObjectRecord(t))throw new TypeError(\"keys must be an object\");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:Z4t.Key.fromJSON(s,a)}),{})}return e}function t3t(t){let e;if(rL.guard.isDefined(t)){if(!rL.guard.isObjectRecord(t))throw new TypeError(\"roles must be an object\");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:tL.Role.fromJSON(a)}),{})}return e}});var eJ=L(nL=>{\"use strict\";Object.defineProperty(nL,\"__esModule\",{value:!0});nL.Signature=void 0;var $K=class t{constructor(e){let{keyID:r,sig:s}=e;this.keyID=r,this.sig=s}toJSON(){return{keyid:this.keyID,sig:this.sig}}static fromJSON(e){let{keyid:r,sig:s}=e;if(typeof r!=\"string\")throw new TypeError(\"keyid must be a string\");if(typeof s!=\"string\")throw new TypeError(\"sig must be a string\");return new t({keyID:r,sig:s})}};nL.Signature=$K});var nJ=L(u1=>{\"use strict\";var r3t=u1&&u1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(u1,\"__esModule\",{value:!0});u1.Snapshot=void 0;var n3t=r3t(ye(\"util\")),tJ=ly(),aNe=Vb(),oNe=Af(),rJ=class t extends tJ.Signed{constructor(e){super(e),this.type=tJ.MetadataKind.Snapshot,this.meta=e.meta||{\"targets.json\":new aNe.MetaFile({version:1})}}equals(e){return e instanceof t?super.equals(e)&&n3t.default.isDeepStrictEqual(this.meta,e.meta):!1}toJSON(){return{_type:this.type,meta:i3t(this.meta),spec_version:this.specVersion,version:this.version,expires:this.expires,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=tJ.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,meta:s3t(a),unrecognizedFields:n})}};u1.Snapshot=rJ;function i3t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function s3t(t){let e;if(oNe.guard.isDefined(t))if(oNe.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:aNe.MetaFile.fromJSON(a)}),{});else throw new TypeError(\"meta field is malformed\");return e}});var lNe=L(f1=>{\"use strict\";var o3t=f1&&f1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(f1,\"__esModule\",{value:!0});f1.Delegations=void 0;var iL=o3t(ye(\"util\")),a3t=kA(),l3t=qO(),iJ=JK(),sL=Af(),sJ=class t{constructor(e){if(this.keys=e.keys,this.unrecognizedFields=e.unrecognizedFields||{},e.roles&&Object.keys(e.roles).some(r=>iJ.TOP_LEVEL_ROLE_NAMES.includes(r)))throw new a3t.ValueError(\"Delegated role name conflicts with top-level role name\");this.succinctRoles=e.succinctRoles,this.roles=e.roles}equals(e){return e instanceof t?iL.default.isDeepStrictEqual(this.keys,e.keys)&&iL.default.isDeepStrictEqual(this.roles,e.roles)&&iL.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields)&&iL.default.isDeepStrictEqual(this.succinctRoles,e.succinctRoles):!1}*rolesForTarget(e){if(this.roles)for(let r of Object.values(this.roles))r.isDelegatedPath(e)&&(yield{role:r.name,terminating:r.terminating});else this.succinctRoles&&(yield{role:this.succinctRoles.getRoleForTarget(e),terminating:!0})}toJSON(){let e={keys:c3t(this.keys),...this.unrecognizedFields};return this.roles?e.roles=u3t(this.roles):this.succinctRoles&&(e.succinct_roles=this.succinctRoles.toJSON()),e}static fromJSON(e){let{keys:r,roles:s,succinct_roles:a,...n}=e,c;return sL.guard.isObject(a)&&(c=iJ.SuccinctRoles.fromJSON(a)),new t({keys:f3t(r),roles:A3t(s),unrecognizedFields:n,succinctRoles:c})}};f1.Delegations=sJ;function c3t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function u3t(t){return Object.values(t).map(e=>e.toJSON())}function f3t(t){if(!sL.guard.isObjectRecord(t))throw new TypeError(\"keys is malformed\");return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:l3t.Key.fromJSON(r,s)}),{})}function A3t(t){let e;if(sL.guard.isDefined(t)){if(!sL.guard.isObjectArray(t))throw new TypeError(\"roles is malformed\");e=t.reduce((r,s)=>{let a=iJ.DelegatedRole.fromJSON(s);return{...r,[a.name]:a}},{})}return e}});var lJ=L(A1=>{\"use strict\";var p3t=A1&&A1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(A1,\"__esModule\",{value:!0});A1.Targets=void 0;var cNe=p3t(ye(\"util\")),oJ=ly(),h3t=lNe(),g3t=Vb(),oL=Af(),aJ=class t extends oJ.Signed{constructor(e){super(e),this.type=oJ.MetadataKind.Targets,this.targets=e.targets||{},this.delegations=e.delegations}addTarget(e){this.targets[e.path]=e}equals(e){return e instanceof t?super.equals(e)&&cNe.default.isDeepStrictEqual(this.targets,e.targets)&&cNe.default.isDeepStrictEqual(this.delegations,e.delegations):!1}toJSON(){let e={_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,targets:d3t(this.targets),...this.unrecognizedFields};return this.delegations&&(e.delegations=this.delegations.toJSON()),e}static fromJSON(e){let{unrecognizedFields:r,...s}=oJ.Signed.commonFieldsFromJSON(e),{targets:a,delegations:n,...c}=r;return new t({...s,targets:m3t(a),delegations:y3t(n),unrecognizedFields:c})}};A1.Targets=aJ;function d3t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function m3t(t){let e;if(oL.guard.isDefined(t))if(oL.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:g3t.TargetFile.fromJSON(s,a)}),{});else throw new TypeError(\"targets must be an object\");return e}function y3t(t){let e;if(oL.guard.isDefined(t))if(oL.guard.isObject(t))e=h3t.Delegations.fromJSON(t);else throw new TypeError(\"delegations must be an object\");return e}});var AJ=L(aL=>{\"use strict\";Object.defineProperty(aL,\"__esModule\",{value:!0});aL.Timestamp=void 0;var cJ=ly(),uNe=Vb(),uJ=Af(),fJ=class t extends cJ.Signed{constructor(e){super(e),this.type=cJ.MetadataKind.Timestamp,this.snapshotMeta=e.snapshotMeta||new uNe.MetaFile({version:1})}equals(e){return e instanceof t?super.equals(e)&&this.snapshotMeta.equals(e.snapshotMeta):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,meta:{\"snapshot.json\":this.snapshotMeta.toJSON()},...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=cJ.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,snapshotMeta:E3t(a),unrecognizedFields:n})}};aL.Timestamp=fJ;function E3t(t){let e;if(uJ.guard.isDefined(t)){let r=t[\"snapshot.json\"];if(!uJ.guard.isDefined(r)||!uJ.guard.isObject(r))throw new TypeError(\"missing snapshot.json in meta\");e=uNe.MetaFile.fromJSON(r)}return e}});var ANe=L(h1=>{\"use strict\";var I3t=h1&&h1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(h1,\"__esModule\",{value:!0});h1.Metadata=void 0;var C3t=QK(),fNe=I3t(ye(\"util\")),p1=ly(),eP=kA(),w3t=XK(),B3t=eJ(),v3t=nJ(),S3t=lJ(),D3t=AJ(),pJ=Af(),hJ=class t{constructor(e,r,s){this.signed=e,this.signatures=r||{},this.unrecognizedFields=s||{}}sign(e,r=!0){let s=Buffer.from((0,C3t.canonicalize)(this.signed.toJSON())),a=e(s);r||(this.signatures={}),this.signatures[a.keyID]=a}verifyDelegate(e,r){let s,a={};switch(this.signed.type){case p1.MetadataKind.Root:a=this.signed.keys,s=this.signed.roles[e];break;case p1.MetadataKind.Targets:if(!this.signed.delegations)throw new eP.ValueError(`No delegations found for ${e}`);a=this.signed.delegations.keys,this.signed.delegations.roles?s=this.signed.delegations.roles[e]:this.signed.delegations.succinctRoles&&this.signed.delegations.succinctRoles.isDelegatedRole(e)&&(s=this.signed.delegations.succinctRoles);break;default:throw new TypeError(\"invalid metadata type\")}if(!s)throw new eP.ValueError(`no delegation found for ${e}`);let n=new Set;if(s.keyIDs.forEach(c=>{let f=a[c];if(f)try{f.verifySignature(r),n.add(f.keyID)}catch{}}),n.size<s.threshold)throw new eP.UnsignedMetadataError(`${e} was signed by ${n.size}/${s.threshold} keys`)}equals(e){return e instanceof t?this.signed.equals(e.signed)&&fNe.default.isDeepStrictEqual(this.signatures,e.signatures)&&fNe.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{signatures:Object.values(this.signatures).map(r=>r.toJSON()),signed:this.signed.toJSON(),...this.unrecognizedFields}}static fromJSON(e,r){let{signed:s,signatures:a,...n}=r;if(!pJ.guard.isDefined(s)||!pJ.guard.isObject(s))throw new TypeError(\"signed is not defined\");if(e!==s._type)throw new eP.ValueError(`expected '${e}', got ${s._type}`);if(!pJ.guard.isObjectArray(a))throw new TypeError(\"signatures is not an array\");let c;switch(e){case p1.MetadataKind.Root:c=w3t.Root.fromJSON(s);break;case p1.MetadataKind.Timestamp:c=D3t.Timestamp.fromJSON(s);break;case p1.MetadataKind.Snapshot:c=v3t.Snapshot.fromJSON(s);break;case p1.MetadataKind.Targets:c=S3t.Targets.fromJSON(s);break;default:throw new TypeError(\"invalid metadata type\")}let f={};return a.forEach(p=>{let h=B3t.Signature.fromJSON(p);if(f[h.keyID])throw new eP.ValueError(`multiple signatures found for keyid: ${h.keyID}`);f[h.keyID]=h}),new t(c,f,n)}};h1.Metadata=hJ});var lL=L(Ri=>{\"use strict\";Object.defineProperty(Ri,\"__esModule\",{value:!0});Ri.Timestamp=Ri.Targets=Ri.Snapshot=Ri.Signature=Ri.Root=Ri.Metadata=Ri.Key=Ri.TargetFile=Ri.MetaFile=Ri.ValueError=Ri.MetadataKind=void 0;var b3t=ly();Object.defineProperty(Ri,\"MetadataKind\",{enumerable:!0,get:function(){return b3t.MetadataKind}});var P3t=kA();Object.defineProperty(Ri,\"ValueError\",{enumerable:!0,get:function(){return P3t.ValueError}});var pNe=Vb();Object.defineProperty(Ri,\"MetaFile\",{enumerable:!0,get:function(){return pNe.MetaFile}});Object.defineProperty(Ri,\"TargetFile\",{enumerable:!0,get:function(){return pNe.TargetFile}});var x3t=qO();Object.defineProperty(Ri,\"Key\",{enumerable:!0,get:function(){return x3t.Key}});var k3t=ANe();Object.defineProperty(Ri,\"Metadata\",{enumerable:!0,get:function(){return k3t.Metadata}});var Q3t=XK();Object.defineProperty(Ri,\"Root\",{enumerable:!0,get:function(){return Q3t.Root}});var T3t=eJ();Object.defineProperty(Ri,\"Signature\",{enumerable:!0,get:function(){return T3t.Signature}});var R3t=nJ();Object.defineProperty(Ri,\"Snapshot\",{enumerable:!0,get:function(){return R3t.Snapshot}});var F3t=lJ();Object.defineProperty(Ri,\"Targets\",{enumerable:!0,get:function(){return F3t.Targets}});var N3t=AJ();Object.defineProperty(Ri,\"Timestamp\",{enumerable:!0,get:function(){return N3t.Timestamp}})});var gNe=L((Uwr,hNe)=>{var g1=1e3,d1=g1*60,m1=d1*60,fy=m1*24,O3t=fy*7,L3t=fy*365.25;hNe.exports=function(t,e){e=e||{};var r=typeof t;if(r===\"string\"&&t.length>0)return M3t(t);if(r===\"number\"&&isFinite(t))return e.long?U3t(t):_3t(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))};function M3t(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),s=(e[2]||\"ms\").toLowerCase();switch(s){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return r*L3t;case\"weeks\":case\"week\":case\"w\":return r*O3t;case\"days\":case\"day\":case\"d\":return r*fy;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*m1;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*d1;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*g1;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function _3t(t){var e=Math.abs(t);return e>=fy?Math.round(t/fy)+\"d\":e>=m1?Math.round(t/m1)+\"h\":e>=d1?Math.round(t/d1)+\"m\":e>=g1?Math.round(t/g1)+\"s\":t+\"ms\"}function U3t(t){var e=Math.abs(t);return e>=fy?cL(t,e,fy,\"day\"):e>=m1?cL(t,e,m1,\"hour\"):e>=d1?cL(t,e,d1,\"minute\"):e>=g1?cL(t,e,g1,\"second\"):t+\" ms\"}function cL(t,e,r,s){var a=e>=r*1.5;return Math.round(t/r)+\" \"+s+(a?\"s\":\"\")}});var gJ=L((Hwr,dNe)=>{function H3t(t){r.debug=r,r.default=r,r.coerce=p,r.disable=c,r.enable=a,r.enabled=f,r.humanize=gNe(),r.destroy=h,Object.keys(t).forEach(E=>{r[E]=t[E]}),r.names=[],r.skips=[],r.formatters={};function e(E){let C=0;for(let S=0;S<E.length;S++)C=(C<<5)-C+E.charCodeAt(S),C|=0;return r.colors[Math.abs(C)%r.colors.length]}r.selectColor=e;function r(E){let C,S=null,P,I;function R(...N){if(!R.enabled)return;let U=R,W=Number(new Date),te=W-(C||W);U.diff=te,U.prev=C,U.curr=W,C=W,N[0]=r.coerce(N[0]),typeof N[0]!=\"string\"&&N.unshift(\"%O\");let ie=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(ce,me)=>{if(ce===\"%%\")return\"%\";ie++;let pe=r.formatters[me];if(typeof pe==\"function\"){let Be=N[ie];ce=pe.call(U,Be),N.splice(ie,1),ie--}return ce}),r.formatArgs.call(U,N),(U.log||r.log).apply(U,N)}return R.namespace=E,R.useColors=r.useColors(),R.color=r.selectColor(E),R.extend=s,R.destroy=r.destroy,Object.defineProperty(R,\"enabled\",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(P!==r.namespaces&&(P=r.namespaces,I=r.enabled(E)),I),set:N=>{S=N}}),typeof r.init==\"function\"&&r.init(R),R}function s(E,C){let S=r(this.namespace+(typeof C>\"u\"?\":\":C)+E);return S.log=this.log,S}function a(E){r.save(E),r.namespaces=E,r.names=[],r.skips=[];let C=(typeof E==\"string\"?E:\"\").trim().replace(\" \",\",\").split(\",\").filter(Boolean);for(let S of C)S[0]===\"-\"?r.skips.push(S.slice(1)):r.names.push(S)}function n(E,C){let S=0,P=0,I=-1,R=0;for(;S<E.length;)if(P<C.length&&(C[P]===E[S]||C[P]===\"*\"))C[P]===\"*\"?(I=P,R=S,P++):(S++,P++);else if(I!==-1)P=I+1,R++,S=R;else return!1;for(;P<C.length&&C[P]===\"*\";)P++;return P===C.length}function c(){let E=[...r.names,...r.skips.map(C=>\"-\"+C)].join(\",\");return r.enable(\"\"),E}function f(E){for(let C of r.skips)if(n(E,C))return!1;for(let C of r.names)if(n(E,C))return!0;return!1}function p(E){return E instanceof Error?E.stack||E.message:E}function h(){console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\")}return r.enable(r.load()),r}dNe.exports=H3t});var mNe=L((oc,uL)=>{oc.formatArgs=q3t;oc.save=G3t;oc.load=W3t;oc.useColors=j3t;oc.storage=Y3t();oc.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"))}})();oc.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"];function j3t(){if(typeof window<\"u\"&&window.process&&(window.process.type===\"renderer\"||window.process.__nwjs))return!0;if(typeof navigator<\"u\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;let t;return typeof document<\"u\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<\"u\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<\"u\"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<\"u\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function q3t(t){if(t[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+t[0]+(this.useColors?\"%c \":\" \")+\"+\"+uL.exports.humanize(this.diff),!this.useColors)return;let e=\"color: \"+this.color;t.splice(1,0,e,\"color: inherit\");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,a=>{a!==\"%%\"&&(r++,a===\"%c\"&&(s=r))}),t.splice(s,0,e)}oc.log=console.debug||console.log||(()=>{});function G3t(t){try{t?oc.storage.setItem(\"debug\",t):oc.storage.removeItem(\"debug\")}catch{}}function W3t(){let t;try{t=oc.storage.getItem(\"debug\")}catch{}return!t&&typeof process<\"u\"&&\"env\"in process&&(t=process.env.DEBUG),t}function Y3t(){try{return localStorage}catch{}}uL.exports=gJ()(oc);var{formatters:V3t}=uL.exports;V3t.j=function(t){try{return JSON.stringify(t)}catch(e){return\"[UnexpectedJSONParseError]: \"+e.message}}});var ENe=L(($s,AL)=>{var K3t=ye(\"tty\"),fL=ye(\"util\");$s.init=t8t;$s.log=X3t;$s.formatArgs=z3t;$s.save=$3t;$s.load=e8t;$s.useColors=J3t;$s.destroy=fL.deprecate(()=>{},\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\");$s.colors=[6,2,3,4,5,1];try{let t=ye(\"supports-color\");t&&(t.stderr||t).level>=2&&($s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}$s.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(a,n)=>n.toUpperCase()),s=process.env[e];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s===\"null\"?s=null:s=Number(s),t[r]=s,t},{});function J3t(){return\"colors\"in $s.inspectOpts?!!$s.inspectOpts.colors:K3t.isatty(process.stderr.fd)}function z3t(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,a=\"\\x1B[3\"+(s<8?s:\"8;5;\"+s),n=`  ${a};1m${e} \\x1B[0m`;t[0]=n+t[0].split(`\n`).join(`\n`+n),t.push(a+\"m+\"+AL.exports.humanize(this.diff)+\"\\x1B[0m\")}else t[0]=Z3t()+e+\" \"+t[0]}function Z3t(){return $s.inspectOpts.hideDate?\"\":new Date().toISOString()+\" \"}function X3t(...t){return process.stderr.write(fL.formatWithOptions($s.inspectOpts,...t)+`\n`)}function $3t(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function e8t(){return process.env.DEBUG}function t8t(t){t.inspectOpts={};let e=Object.keys($s.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=$s.inspectOpts[e[r]]}AL.exports=gJ()($s);var{formatters:yNe}=AL.exports;yNe.o=function(t){return this.inspectOpts.colors=this.useColors,fL.inspect(t,this.inspectOpts).split(`\n`).map(e=>e.trim()).join(\" \")};yNe.O=function(t){return this.inspectOpts.colors=this.useColors,fL.inspect(t,this.inspectOpts)}});var mJ=L((jwr,dJ)=>{typeof process>\"u\"||process.type===\"renderer\"||process.browser===!0||process.__nwjs?dJ.exports=mNe():dJ.exports=ENe()});var hL=L(Ji=>{\"use strict\";Object.defineProperty(Ji,\"__esModule\",{value:!0});Ji.DownloadHTTPError=Ji.DownloadLengthMismatchError=Ji.DownloadError=Ji.ExpiredMetadataError=Ji.EqualVersionError=Ji.BadVersionError=Ji.RepositoryError=Ji.PersistError=Ji.RuntimeError=Ji.ValueError=void 0;var yJ=class extends Error{};Ji.ValueError=yJ;var EJ=class extends Error{};Ji.RuntimeError=EJ;var IJ=class extends Error{};Ji.PersistError=IJ;var tP=class extends Error{};Ji.RepositoryError=tP;var pL=class extends tP{};Ji.BadVersionError=pL;var CJ=class extends pL{};Ji.EqualVersionError=CJ;var wJ=class extends tP{};Ji.ExpiredMetadataError=wJ;var rP=class extends Error{};Ji.DownloadError=rP;var BJ=class extends rP{};Ji.DownloadLengthMismatchError=BJ;var vJ=class extends rP{constructor(e,r){super(e),this.statusCode=r}};Ji.DownloadHTTPError=vJ});var CNe=L(y1=>{\"use strict\";var DJ=y1&&y1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(y1,\"__esModule\",{value:!0});y1.withTempFile=void 0;var SJ=DJ(ye(\"fs/promises\")),r8t=DJ(ye(\"os\")),INe=DJ(ye(\"path\")),n8t=async t=>i8t(async e=>t(INe.default.join(e,\"tempfile\")));y1.withTempFile=n8t;var i8t=async t=>{let e=await SJ.default.realpath(r8t.default.tmpdir()),r=await SJ.default.mkdtemp(e+INe.default.sep);try{return await t(r)}finally{await SJ.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}}});var PJ=L(Qg=>{\"use strict\";var dL=Qg&&Qg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qg,\"__esModule\",{value:!0});Qg.DefaultFetcher=Qg.BaseFetcher=void 0;var s8t=dL(mJ()),wNe=dL(ye(\"fs\")),o8t=dL(xO()),a8t=dL(ye(\"util\")),BNe=hL(),l8t=CNe(),c8t=(0,s8t.default)(\"tuf:fetch\"),gL=class{async downloadFile(e,r,s){return(0,l8t.withTempFile)(async a=>{let n=await this.fetch(e),c=0,f=wNe.default.createWriteStream(a);try{for await(let p of n){let h=Buffer.from(p);if(c+=h.length,c>r)throw new BNe.DownloadLengthMismatchError(\"Max length reached\");await u8t(f,h)}}finally{await a8t.default.promisify(f.close).bind(f)()}return s(a)})}async downloadBytes(e,r){return this.downloadFile(e,r,async s=>{let a=wNe.default.createReadStream(s),n=[];for await(let c of a)n.push(c);return Buffer.concat(n)})}};Qg.BaseFetcher=gL;var bJ=class extends gL{constructor(e={}){super(),this.timeout=e.timeout,this.retry=e.retry}async fetch(e){c8t(\"GET %s\",e);let r=await(0,o8t.default)(e,{timeout:this.timeout,retry:this.retry});if(!r.ok||!r?.body)throw new BNe.DownloadHTTPError(\"Failed to download\",r.status);return r.body}};Qg.DefaultFetcher=bJ;var u8t=async(t,e)=>new Promise((r,s)=>{t.write(e,a=>{a&&s(a),r(!0)})})});var vNe=L(mL=>{\"use strict\";Object.defineProperty(mL,\"__esModule\",{value:!0});mL.defaultConfig=void 0;mL.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}});var SNe=L(yL=>{\"use strict\";Object.defineProperty(yL,\"__esModule\",{value:!0});yL.TrustedMetadataStore=void 0;var Is=lL(),Ui=hL(),xJ=class{constructor(e){this.trustedSet={},this.referenceTime=new Date,this.loadTrustedRoot(e)}get root(){if(!this.trustedSet.root)throw new ReferenceError(\"No trusted root metadata\");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(e){return this.trustedSet[e]}updateRoot(e){let r=JSON.parse(e.toString(\"utf8\")),s=Is.Metadata.fromJSON(Is.MetadataKind.Root,r);if(s.signed.type!=Is.MetadataKind.Root)throw new Ui.RepositoryError(`Expected 'root', got ${s.signed.type}`);if(this.root.verifyDelegate(Is.MetadataKind.Root,s),s.signed.version!=this.root.signed.version+1)throw new Ui.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${s.signed.version}`);return s.verifyDelegate(Is.MetadataKind.Root,s),this.trustedSet.root=s,s}updateTimestamp(e){if(this.snapshot)throw new Ui.RuntimeError(\"Cannot update timestamp after snapshot\");if(this.root.signed.isExpired(this.referenceTime))throw new Ui.ExpiredMetadataError(\"Final root.json is expired\");let r=JSON.parse(e.toString(\"utf8\")),s=Is.Metadata.fromJSON(Is.MetadataKind.Timestamp,r);if(s.signed.type!=Is.MetadataKind.Timestamp)throw new Ui.RepositoryError(`Expected 'timestamp', got ${s.signed.type}`);if(this.root.verifyDelegate(Is.MetadataKind.Timestamp,s),this.timestamp){if(s.signed.version<this.timestamp.signed.version)throw new Ui.BadVersionError(`New timestamp version ${s.signed.version} is less than current version ${this.timestamp.signed.version}`);if(s.signed.version===this.timestamp.signed.version)throw new Ui.EqualVersionError(`New timestamp version ${s.signed.version} is equal to current version ${this.timestamp.signed.version}`);let a=this.timestamp.signed.snapshotMeta,n=s.signed.snapshotMeta;if(n.version<a.version)throw new Ui.BadVersionError(`New snapshot version ${n.version} is less than current version ${a.version}`)}return this.trustedSet.timestamp=s,this.checkFinalTimestamp(),s}updateSnapshot(e,r=!1){if(!this.timestamp)throw new Ui.RuntimeError(\"Cannot update snapshot before timestamp\");if(this.targets)throw new Ui.RuntimeError(\"Cannot update snapshot after targets\");this.checkFinalTimestamp();let s=this.timestamp.signed.snapshotMeta;r||s.verify(e);let a=JSON.parse(e.toString(\"utf8\")),n=Is.Metadata.fromJSON(Is.MetadataKind.Snapshot,a);if(n.signed.type!=Is.MetadataKind.Snapshot)throw new Ui.RepositoryError(`Expected 'snapshot', got ${n.signed.type}`);return this.root.verifyDelegate(Is.MetadataKind.Snapshot,n),this.snapshot&&Object.entries(this.snapshot.signed.meta).forEach(([c,f])=>{let p=n.signed.meta[c];if(!p)throw new Ui.RepositoryError(`Missing file ${c} in new snapshot`);if(p.version<f.version)throw new Ui.BadVersionError(`New version ${p.version} of ${c} is less than current version ${f.version}`)}),this.trustedSet.snapshot=n,this.checkFinalSnapsnot(),n}updateDelegatedTargets(e,r,s){if(!this.snapshot)throw new Ui.RuntimeError(\"Cannot update delegated targets before snapshot\");this.checkFinalSnapsnot();let a=this.trustedSet[s];if(!a)throw new Ui.RuntimeError(`No trusted ${s} metadata`);let n=this.snapshot.signed.meta?.[`${r}.json`];if(!n)throw new Ui.RepositoryError(`Missing ${r}.json in snapshot`);n.verify(e);let c=JSON.parse(e.toString(\"utf8\")),f=Is.Metadata.fromJSON(Is.MetadataKind.Targets,c);if(f.signed.type!=Is.MetadataKind.Targets)throw new Ui.RepositoryError(`Expected 'targets', got ${f.signed.type}`);a.verifyDelegate(r,f);let p=f.signed.version;if(p!=n.version)throw new Ui.BadVersionError(`Version ${p} of ${r} does not match snapshot version ${n.version}`);if(f.signed.isExpired(this.referenceTime))throw new Ui.ExpiredMetadataError(`${r}.json is expired`);this.trustedSet[r]=f}loadTrustedRoot(e){let r=JSON.parse(e.toString(\"utf8\")),s=Is.Metadata.fromJSON(Is.MetadataKind.Root,r);if(s.signed.type!=Is.MetadataKind.Root)throw new Ui.RepositoryError(`Expected 'root', got ${s.signed.type}`);s.verifyDelegate(Is.MetadataKind.Root,s),this.trustedSet.root=s}checkFinalTimestamp(){if(!this.timestamp)throw new ReferenceError(\"No trusted timestamp metadata\");if(this.timestamp.signed.isExpired(this.referenceTime))throw new Ui.ExpiredMetadataError(\"Final timestamp.json is expired\")}checkFinalSnapsnot(){if(!this.snapshot)throw new ReferenceError(\"No trusted snapshot metadata\");if(!this.timestamp)throw new ReferenceError(\"No trusted timestamp metadata\");if(this.snapshot.signed.isExpired(this.referenceTime))throw new Ui.ExpiredMetadataError(\"snapshot.json is expired\");let e=this.timestamp.signed.snapshotMeta;if(this.snapshot.signed.version!==e.version)throw new Ui.BadVersionError(\"Snapshot version doesn't match timestamp\")}};yL.TrustedMetadataStore=xJ});var DNe=L(kJ=>{\"use strict\";Object.defineProperty(kJ,\"__esModule\",{value:!0});kJ.join=A8t;var f8t=ye(\"url\");function A8t(t,e){return new f8t.URL(p8t(t)+h8t(e)).toString()}function p8t(t){return t.endsWith(\"/\")?t:t+\"/\"}function h8t(t){return t.startsWith(\"/\")?t.slice(1):t}});var bNe=L(su=>{\"use strict\";var g8t=su&&su.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),d8t=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),RJ=su&&su.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&g8t(e,t,r);return d8t(e,t),e},m8t=su&&su.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(su,\"__esModule\",{value:!0});su.Updater=void 0;var QA=lL(),y8t=m8t(mJ()),E1=RJ(ye(\"fs\")),EL=RJ(ye(\"path\")),E8t=vNe(),Ay=hL(),I8t=PJ(),C8t=SNe(),nP=RJ(DNe()),QJ=(0,y8t.default)(\"tuf:cache\"),TJ=class{constructor(e){let{metadataDir:r,metadataBaseUrl:s,targetDir:a,targetBaseUrl:n,fetcher:c,config:f}=e;this.dir=r,this.metadataBaseUrl=s,this.targetDir=a,this.targetBaseUrl=n,this.forceCache=e.forceCache??!1;let p=this.loadLocalMetadata(QA.MetadataKind.Root);this.trustedSet=new C8t.TrustedMetadataStore(p),this.config={...E8t.defaultConfig,...f},this.fetcher=c||new I8t.DefaultFetcher({timeout:this.config.fetchTimeout,retry:this.config.fetchRetries??this.config.fetchRetry})}async refresh(){if(this.forceCache)try{await this.loadTimestamp({checkRemote:!1})}catch{await this.loadRoot(),await this.loadTimestamp()}else await this.loadRoot(),await this.loadTimestamp();await this.loadSnapshot(),await this.loadTargets(QA.MetadataKind.Targets,QA.MetadataKind.Root)}async getTargetInfo(e){return this.trustedSet.targets||await this.refresh(),this.preorderDepthFirstWalk(e)}async downloadTarget(e,r,s){let a=r||this.generateTargetPath(e);if(!s){if(!this.targetBaseUrl)throw new Ay.ValueError(\"Target base URL not set\");s=this.targetBaseUrl}let n=e.path;if(this.trustedSet.root.signed.consistentSnapshot&&this.config.prefixTargetsWithHash){let p=Object.values(e.hashes),{dir:h,base:E}=EL.parse(n),C=`${p[0]}.${E}`;n=h?`${h}/${C}`:C}let f=nP.join(s,n);return await this.fetcher.downloadFile(f,e.length,async p=>{await e.verify(E1.createReadStream(p)),QJ(\"WRITE %s\",a),E1.copyFileSync(p,a)}),a}async findCachedTarget(e,r){r||(r=this.generateTargetPath(e));try{if(E1.existsSync(r))return await e.verify(E1.createReadStream(r)),r}catch{return}}loadLocalMetadata(e){let r=EL.join(this.dir,`${e}.json`);return QJ(\"READ %s\",r),E1.readFileSync(r)}async loadRoot(){let r=this.trustedSet.root.signed.version+1,s=r+this.config.maxRootRotations;for(let a=r;a<s;a++){let n=nP.join(this.metadataBaseUrl,`${a}.root.json`);try{let c=await this.fetcher.downloadBytes(n,this.config.rootMaxLength);this.trustedSet.updateRoot(c),this.persistMetadata(QA.MetadataKind.Root,c)}catch(c){if(c instanceof Ay.DownloadHTTPError&&[403,404].includes(c.statusCode))break;throw c}}}async loadTimestamp({checkRemote:e}={checkRemote:!0}){try{let a=this.loadLocalMetadata(QA.MetadataKind.Timestamp);if(this.trustedSet.updateTimestamp(a),!e)return}catch{}let r=nP.join(this.metadataBaseUrl,\"timestamp.json\"),s=await this.fetcher.downloadBytes(r,this.config.timestampMaxLength);try{this.trustedSet.updateTimestamp(s)}catch(a){if(a instanceof Ay.EqualVersionError)return;throw a}this.persistMetadata(QA.MetadataKind.Timestamp,s)}async loadSnapshot(){try{let e=this.loadLocalMetadata(QA.MetadataKind.Snapshot);this.trustedSet.updateSnapshot(e,!0)}catch{if(!this.trustedSet.timestamp)throw new ReferenceError(\"No timestamp metadata\");let r=this.trustedSet.timestamp.signed.snapshotMeta,s=r.length||this.config.snapshotMaxLength,a=this.trustedSet.root.signed.consistentSnapshot?r.version:void 0,n=nP.join(this.metadataBaseUrl,a?`${a}.snapshot.json`:\"snapshot.json\");try{let c=await this.fetcher.downloadBytes(n,s);this.trustedSet.updateSnapshot(c),this.persistMetadata(QA.MetadataKind.Snapshot,c)}catch(c){throw new Ay.RuntimeError(`Unable to load snapshot metadata error ${c}`)}}}async loadTargets(e,r){if(this.trustedSet.getRole(e))return this.trustedSet.getRole(e);try{let s=this.loadLocalMetadata(e);this.trustedSet.updateDelegatedTargets(s,e,r)}catch{if(!this.trustedSet.snapshot)throw new ReferenceError(\"No snapshot metadata\");let a=this.trustedSet.snapshot.signed.meta[`${e}.json`],n=a.length||this.config.targetsMaxLength,c=this.trustedSet.root.signed.consistentSnapshot?a.version:void 0,f=encodeURIComponent(e),p=nP.join(this.metadataBaseUrl,c?`${c}.${f}.json`:`${f}.json`);try{let h=await this.fetcher.downloadBytes(p,n);this.trustedSet.updateDelegatedTargets(h,e,r),this.persistMetadata(e,h)}catch(h){throw new Ay.RuntimeError(`Unable to load targets error ${h}`)}}return this.trustedSet.getRole(e)}async preorderDepthFirstWalk(e){let r=[{roleName:QA.MetadataKind.Targets,parentRoleName:QA.MetadataKind.Root}],s=new Set;for(;s.size<=this.config.maxDelegations&&r.length>0;){let{roleName:a,parentRoleName:n}=r.pop();if(s.has(a))continue;let c=(await this.loadTargets(a,n))?.signed;if(!c)continue;let f=c.targets?.[e];if(f)return f;if(s.add(a),c.delegations){let p=[],h=c.delegations.rolesForTarget(e);for(let{role:E,terminating:C}of h)if(p.push({roleName:E,parentRoleName:a}),C){r.splice(0);break}p.reverse(),r.push(...p)}}}generateTargetPath(e){if(!this.targetDir)throw new Ay.ValueError(\"Target directory not set\");let r=encodeURIComponent(e.path);return EL.join(this.targetDir,r)}persistMetadata(e,r){let s=encodeURIComponent(e);try{let a=EL.join(this.dir,`${s}.json`);QJ(\"WRITE %s\",a),E1.writeFileSync(a,r.toString(\"utf8\"))}catch(a){throw new Ay.PersistError(`Failed to persist metadata ${s} error: ${a}`)}}};su.Updater=TJ});var PNe=L(Tg=>{\"use strict\";Object.defineProperty(Tg,\"__esModule\",{value:!0});Tg.Updater=Tg.BaseFetcher=Tg.TargetFile=void 0;var w8t=lL();Object.defineProperty(Tg,\"TargetFile\",{enumerable:!0,get:function(){return w8t.TargetFile}});var B8t=PJ();Object.defineProperty(Tg,\"BaseFetcher\",{enumerable:!0,get:function(){return B8t.BaseFetcher}});var v8t=bNe();Object.defineProperty(Tg,\"Updater\",{enumerable:!0,get:function(){return v8t.Updater}})});var NJ=L(IL=>{\"use strict\";Object.defineProperty(IL,\"__esModule\",{value:!0});IL.TUFError=void 0;var FJ=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}};IL.TUFError=FJ});var xNe=L(iP=>{\"use strict\";var S8t=iP&&iP.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iP,\"__esModule\",{value:!0});iP.readTarget=b8t;var D8t=S8t(ye(\"fs\")),CL=NJ();async function b8t(t,e){let r=await P8t(t,e);return new Promise((s,a)=>{D8t.default.readFile(r,\"utf-8\",(n,c)=>{n?a(new CL.TUFError({code:\"TUF_READ_TARGET_ERROR\",message:`error reading target ${r}`,cause:n})):s(c)})})}async function P8t(t,e){let r;try{r=await t.getTargetInfo(e)}catch(a){throw new CL.TUFError({code:\"TUF_REFRESH_METADATA_ERROR\",message:\"error refreshing TUF metadata\",cause:a})}if(!r)throw new CL.TUFError({code:\"TUF_FIND_TARGET_ERROR\",message:`target ${e} not found`});let s=await t.findCachedTarget(r);if(!s)try{s=await t.downloadTarget(r)}catch(a){throw new CL.TUFError({code:\"TUF_DOWNLOAD_TARGET_ERROR\",message:`error downloading target ${s}`,cause:a})}return s}});var kNe=L(($wr,x8t)=>{x8t.exports={\"https://tuf-repo-cdn.sigstore.dev\":{\"root.json\":\"ewogInNpZ25hdHVyZXMiOiBbCiAgewogICAia2V5aWQiOiAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICJzaWciOiAiMzA0NjAyMjEwMDhhYjFmNmYxN2Q0ZjllNmQ3ZGNmMWM4ODkxMmI2YjUzY2MxMDM4ODY0NGFlMWYwOWJjMzdhMDgyY2QwNjAwM2UwMjIxMDBlMTQ1ZWY0YzdiNzgyZDRlODEwN2I1MzQzN2U2NjlkMDQ3Njg5MmNlOTk5OTAzYWUzM2QxNDQ0ODM2Njk5NmU3IgogIH0sCiAgewogICAia2V5aWQiOiAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICJzaWciOiAiMzA0NTAyMjEwMGM3NjhiMmY4NmRhOTk1NjkwMTljMTYwYTA4MWRhNTRhZTM2YzM0YzBhMzEyMGQzY2I2OWI1M2I3ZDExMzc1OGUwMjIwNGY2NzE1MThmNjE3YjIwZDQ2NTM3ZmFlNmMzYjYzYmFlODkxM2Y0ZjE5NjIxNTYxMDVjYzRmMDE5YWMzNWM2YSIKICB9LAogIHsKICAgImtleWlkIjogIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAic2lnIjogIjMwNDUwMjIxMDBiNDQzNGU2OTk1ZDM2OGQyM2U3NDc1OWFjZDBjYjkwMTNjODNhNWQzNTExZjBmOTk3ZWM1NGM0NTZhZTQzNTBhMDIyMDE1YjBlMjY1ZDE4MmQyYjYxZGM3NGUxNTVkOThiM2MzZmJlNTY0YmEwNTI4NmFhMTRjOGRmMDJjOWI3NTY1MTYiCiAgfSwKICB7CiAgICJrZXlpZCI6ICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgInNpZyI6ICIzMDQ1MDIyMTAwODJjNTg0MTFkOTg5ZWI5Zjg2MTQxMDg1N2Q0MjM4MTU5MGVjOTQyNGRiZGFhNTFlNzhlZDEzNTE1NDMxOTA0ZTAyMjAxMTgxODVkYTZhNmMyOTQ3MTMxYzE3Nzk3ZTJiYjc2MjBjZTI2ZTVmMzAxZDFjZWFjNWYyYTdlNThmOWRjZjJlIgogIH0sCiAgewogICAia2V5aWQiOiAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIsCiAgICJzaWciOiAiMzA0NjAyMjEwMGM3ODUxMzg1NGNhZTljMzJlYWE2Yjg4ZTE4OTEyZjQ4MDA2YzI3NTdhMjU4ZjkxNzMxMmNhYmE3NTk0OGViOWUwMjIxMDBkOWUxYjRjZTBhZGZlOWZkMmUyMTQ4ZDdmYTI3YTJmNDBiYTExMjJiZDY5ZGE3NjEyZDhkMTc3NmIwMTNjOTFkIgogIH0sCiAgewogICAia2V5aWQiOiAiZmRmYTgzYTA3YjVhODM1ODliODdkZWQ0MWY3N2YzOWQyMzJhZDkxZjdjY2U1Mjg2OGRhY2QwNmJhMDg5ODQ5ZiIsCiAgICJzaWciOiAiMzA0NTAyMjA1NjQ4M2EyZDVkOWVhOWNlYzZlMTFlYWRmYjMzYzQ4NGI2MTQyOThmYWNhMTVhY2YxYzQzMWIxMWVkN2Y3MzRjMDIyMTAwZDBjMWQ3MjZhZjkyYTg3ZTRlNjY0NTljYTVhZGYzOGEwNWI0NGUxZjk0MzE4NDIzZjk1NGJhZThiY2E1YmIyZSIKICB9LAogIHsKICAgImtleWlkIjogImUyZjU5YWNiOTQ4ODUxOTQwN2UxOGNiZmM5MzI5NTEwYmUwM2MwNGFjYTk5MjlkMmYwMzAxMzQzZmVjODU1MjMiLAogICAic2lnIjogIjMwNDYwMjIxMDBkMDA0ZGU4ODAyNGMzMmRjNTY1M2E5ZjQ4NDNjZmM1MjE1NDI3MDQ4YWQ5NjAwZDJjZjljOTY5ZTZlZGZmM2QyMDIyMTAwZDllYmI3OThmNWZjNjZhZjEwODk5ZGVjZTAxNGE4NjI4Y2NmM2M1NDAyY2Q0YTQyNzAyMDc0NzJmOGY2ZTcxMiIKICB9LAogIHsKICAgImtleWlkIjogIjNjMzQ0YWEwNjhmZDRjYzRlODdkYzUwYjYxMmMwMjQzMWZiYzc3MWU5NTAwMzk5MzY4M2EyYjBiZjI2MGNmMGUiLAogICAic2lnIjogIjMwNDYwMjIxMDBiN2IwOTk5NmM0NWNhMmQ0YjA1NjAzZTU2YmFlZmEyOTcxOGEwYjcxMTQ3Y2Y4YzZlNjYzNDliYWE2MTQ3N2RmMDIyMTAwYzRkYTgwYzcxN2I0ZmE3YmJhMGZkNWM3MmRhOGEwNDk5MzU4YjAxMzU4YjIzMDlmNDFkMTQ1NmVhMWU3ZTFkOSIKICB9LAogIHsKICAgImtleWlkIjogImVjODE2Njk3MzRlMDE3OTk2YzViODVmM2QwMmMzZGUxZGQ0NjM3YTE1MjAxOWZlMWFmMTI1ZDJmOTM2OGI5NWUiLAogICAic2lnIjogIjMwNDYwMjIxMDBiZTk3ODJjMzA3NDRlNDExYTgyZmE4NWI1MTM4ZDYwMWNlMTQ4YmMxOTI1OGFlYzY0ZTdlYzI0NDc4ZjM4ODEyMDIyMTAwY2FlZjYzZGNhZjFhNGI5YTUwMGQzYmQwZTNmMTY0ZWMxOGYxYjYzZDdhOTQ2MGQ5YWNhYjEwNjZkYjBmMDE2ZCIKICB9LAogIHsKICAgImtleWlkIjogIjFlMWQ2NWNlOThiMTBhZGRhZDQ3NjRmZWJmN2RkYTJkMDQzNmIzZDNhMzg5MzU3OWMwZGRkYWVhMjBlNTQ4NDkiLAogICAic2lnIjogIjMwNDUwMjIwNzQ2ZWMzZjg1MzRjZTU1NTMxZDBkMDFmZjY0OTY0ZWY0NDBkMWU3ZDJjNGMxNDI0MDliOGU5NzY5ZjFhZGE2ZjAyMjEwMGUzYjkyOWZjZDkzZWExOGZlYWEwODI1ODg3YTcyMTA0ODk4NzlhNjY3ODBjMDdhODNmNGJkNDZlMmYwOWFiM2IiCiAgfQogXSwKICJzaWduZWQiOiB7CiAgIl90eXBlIjogInJvb3QiLAogICJjb25zaXN0ZW50X3NuYXBzaG90IjogdHJ1ZSwKICAiZXhwaXJlcyI6ICIyMDI1LTAyLTE5VDA4OjA0OjMyWiIsCiAgImtleXMiOiB7CiAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFekJ6Vk9tSENQb2pNVkxTSTM2NFdpaVY4TlByRFxuNklnUnhWbGlza3ovdit5M0pFUjVtY1ZHY09ObGlEY1dNQzVKMmxmSG1qUE5QaGI0SDd4bThMemZTQT09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBzYW50aWFnb3RvcnJlcyIKICAgfSwKICAgIjYxNjQzODM4MTI1YjQ0MGI0MGRiNjk0MmY1Y2I1YTMxYzBkYzA0MzY4MzE2ZWIyYWFhNThiOTU5MDRhNTgyMjIiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVpbmlrU3NBUW1Za05lSDVlWXEvQ25JekxhYWNPXG54bFNhYXdRRE93cUt5L3RDcXhxNXh4UFNKYzIxSzRXSWhzOUd5T2tLZnp1ZVkzR0lMemNNSlo0Y1d3PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGJvYmNhbGxhd2F5IgogICB9LAogICAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXk4WEtzbWhCWURJOEpjMEd3ekJ4ZUtheDBjbTVcblNUS0VVNjVIUEZ1blVuNDFzVDhwaTBGak00SWtIei9ZVW13bUxVTzBXdDdseGhqNkJrTElLNHFZQXc9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAZGxvcmVuYyIKICAgfSwKICAgIjcyNDdmMGRiYWQ4NWIxNDdlMTg2M2JhZGU3NjEyNDNjYzc4NWRjYjdhYTQxMGU3MTA1ZGQzZDJiNjFhMzZkMmMiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVXUmlHcjUraiszSjVTc0grWnRyNW5FMkgyd083XG5CVituTzNzOTNnTGNhMThxVE96SFkxb1d5QUdEeWtNU3NHVFVCU3Q5RCtBbjBLZktzRDJtZlNNNDJRPT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2ktb25saW5lLXVyaSI6ICJnY3BrbXM6Ly9wcm9qZWN0cy9zaWdzdG9yZS1yb290LXNpZ25pbmcvbG9jYXRpb25zL2dsb2JhbC9rZXlSaW5ncy9yb290L2NyeXB0b0tleXMvdGltZXN0YW1wIgogICB9LAogICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTBnaHJoOTJMdzFZcjNpZEdWNVdxQ3RNREI4Q3hcbitEOGhkQzR3MlpMTklwbFZSb1ZHTHNrWWEzZ2hlTXlPamlKOGtQaTE1YVEyLy83UCtvajdVdkpQR3c9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAam9zaHVhZ2wiCiAgIH0sCiAgICJlNzFhNTRkNTQzODM1YmE4NmFkYWQ5NDYwMzc5Yzc2NDFmYjg3MjZkMTY0ZWE3NjY4MDFhMWM1MjJhYmE3ZWEyIjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFRVhzejNTWlhGYjhqTVY0Mmo2cEpseWpialI4S1xuTjNCd29jZXhxNkxNSWI1cXNXS09RdkxOMTZOVWVmTGM0SHN3T291bVJzVlZhYWpTcFFTNmZvYmtSdz09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBtbm02NzgiCiAgIH0KICB9LAogICJyb2xlcyI6IHsKICAgInJvb3QiOiB7CiAgICAia2V5aWRzIjogWwogICAgICI2ZjI2MDA4OWQ1OTIzZGFmMjAxNjZjYTY1N2M1NDNhZjYxODM0NmFiOTcxODg0YTk5OTYyYjAxOTg4YmJlMGMzIiwKICAgICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICAgIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIKICAgIF0sCiAgICAidGhyZXNob2xkIjogMwogICB9LAogICAic25hcHNob3QiOiB7CiAgICAia2V5aWRzIjogWwogICAgICI3MjQ3ZjBkYmFkODViMTQ3ZTE4NjNiYWRlNzYxMjQzY2M3ODVkY2I3YWE0MTBlNzEwNWRkM2QyYjYxYTM2ZDJjIgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAxLAogICAgIngtdHVmLW9uLWNpLWV4cGlyeS1wZXJpb2QiOiAzNjUwLAogICAgIngtdHVmLW9uLWNpLXNpZ25pbmctcGVyaW9kIjogMzY1CiAgIH0sCiAgICJ0YXJnZXRzIjogewogICAgImtleWlkcyI6IFsKICAgICAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICAgImU3MWE1NGQ1NDM4MzViYTg2YWRhZDk0NjAzNzljNzY0MWZiODcyNmQxNjRlYTc2NjgwMWExYzUyMmFiYTdlYTIiLAogICAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IiwKICAgICAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDMKICAgfSwKICAgInRpbWVzdGFtcCI6IHsKICAgICJrZXlpZHMiOiBbCiAgICAgIjcyNDdmMGRiYWQ4NWIxNDdlMTg2M2JhZGU3NjEyNDNjYzc4NWRjYjdhYTQxMGU3MTA1ZGQzZDJiNjFhMzZkMmMiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDEsCiAgICAieC10dWYtb24tY2ktZXhwaXJ5LXBlcmlvZCI6IDcsCiAgICAieC10dWYtb24tY2ktc2lnbmluZy1wZXJpb2QiOiA0CiAgIH0KICB9LAogICJzcGVjX3ZlcnNpb24iOiAiMS4wIiwKICAidmVyc2lvbiI6IDEwLAogICJ4LXR1Zi1vbi1jaS1leHBpcnktcGVyaW9kIjogMTgyLAogICJ4LXR1Zi1vbi1jaS1zaWduaW5nLXBlcmlvZCI6IDMxCiB9Cn0=\",targets:{\"trusted_root.json\":\"ewogICJtZWRpYVR5cGUiOiAiYXBwbGljYXRpb24vdm5kLmRldi5zaWdzdG9yZS50cnVzdGVkcm9vdCtqc29uO3ZlcnNpb249MC4xIiwKICAidGxvZ3MiOiBbCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vcmVrb3Iuc2lnc3RvcmUuZGV2IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUyRzJZKzJ0YWJkVFY1QmNHaUJJeDBhOWZBRndya0JibUxTR3RrczRMM3FYNnlZWTB6dWZCbmhDOFVyL2l5NTVHaFdQLzlBL2JZMkxoQzMwTTkrUll0dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDEtMTJUMTE6NTM6MjcuMDAwWiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAid05JOWF0UUdseitWV2ZPNkxSeWdINFFVZlkvOFc0UkZ3aVQ1aTVXUmdCMD0iCiAgICAgIH0KICAgIH0KICBdLAogICJjZXJ0aWZpY2F0ZUF1dGhvcml0aWVzIjogWwogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly9mdWxjaW8uc2lnc3RvcmUuZGV2IiwKICAgICAgImNlcnRDaGFpbiI6IHsKICAgICAgICAiY2VydGlmaWNhdGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQitEQ0NBWDZnQXdJQkFnSVROVmtEWm9DaW9mUERzeTdkZm02Z2VMYnVoekFLQmdncWhrak9QUVFEQXpBcU1SVXdFd1lEVlFRS0V3eHphV2R6ZEc5eVpTNWtaWFl4RVRBUEJnTlZCQU1UQ0hOcFozTjBiM0psTUI0WERUSXhNRE13TnpBek1qQXlPVm9YRFRNeE1ESXlNekF6TWpBeU9Wb3dLakVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1SRXdEd1lEVlFRREV3aHphV2R6ZEc5eVpUQjJNQkFHQnlxR1NNNDlBZ0VHQlN1QkJBQWlBMklBQkxTeUE3SWk1aytwTk84WkVXWTB5bGVtV0Rvd09rTmEza0wrR1pFNVo1R1dlaEw5L0E5YlJOQTNSYnJzWjVpMEpjYXN0YVJMN1NwNWZwL2pENWR4cWMvVWRUVm5sdlMxNmFuKzJZZnN3ZS9RdUxvbFJVQ3JjT0UyKzJpQTUrdHpkNk5tTUdRd0RnWURWUjBQQVFIL0JBUURBZ0VHTUJJR0ExVWRFd0VCL3dRSU1BWUJBZjhDQVFFd0hRWURWUjBPQkJZRUZNakZIUUJCbWlRcE1sRWs2dzJ1U3UxS0J0UHNNQjhHQTFVZEl3UVlNQmFBRk1qRkhRQkJtaVFwTWxFazZ3MnVTdTFLQnRQc01Bb0dDQ3FHU000OUJBTURBMmdBTUdVQ01IOGxpV0pmTXVpNnZYWEJoakRnWTRNd3NsbU4vVEp4VmUvODNXckZvbXdtTmYwNTZ5MVg0OEY5YzRtM2Ezb3pYQUl4QUtqUmF5NS9hai9qc0tLR0lrbVFhdGpJOHV1cEhyLytDeEZ2YUpXbXBZcU5rTERHUlUrOW9yemg1aEkyUnJjdWFRPT0iCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMDdUMDM6MjA6MjkuMDAwWiIsCiAgICAgICAgImVuZCI6ICIyMDIyLTEyLTMxVDIzOjU5OjU5Ljk5OVoiCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAic2lnc3RvcmUuZGV2IiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJzaWdzdG9yZSIKICAgICAgfSwKICAgICAgInVyaSI6ICJodHRwczovL2Z1bGNpby5zaWdzdG9yZS5kZXYiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlDR2pDQ0FhR2dBd0lCQWdJVUFMblZpVmZuVTBickphc21Sa0hybi9VbmZhUXdDZ1lJS29aSXpqMEVBd013S2pFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNUkV3RHdZRFZRUURFd2h6YVdkemRHOXlaVEFlRncweU1qQTBNVE15TURBMk1UVmFGdzB6TVRFd01EVXhNelUyTlRoYU1EY3hGVEFUQmdOVkJBb1RESE5wWjNOMGIzSmxMbVJsZGpFZU1Cd0dBMVVFQXhNVmMybG5jM1J2Y21VdGFXNTBaWEp0WldScFlYUmxNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRThSVlMveXNIK05PdnVEWnlQSVp0aWxnVUY5TmxhcllwQWQ5SFAxdkJCSDFVNUNWNzdMU1M3czBaaUg0bkU3SHY3cHRTNkx2dlIvU1RrNzk4TFZnTXpMbEo0SGVJZkYzdEhTYWV4TGNZcFNBU3Ixa1MwTi9SZ0JKei85aldDaVhubzNzd2VUQU9CZ05WSFE4QkFmOEVCQU1DQVFZd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3TXdFZ1lEVlIwVEFRSC9CQWd3QmdFQi93SUJBREFkQmdOVkhRNEVGZ1FVMzlQcHoxWWtFWmI1cU5qcEtGV2l4aTRZWkQ4d0h3WURWUjBqQkJnd0ZvQVVXTUFlWDVGRnBXYXBlc3lRb1pNaTBDckZ4Zm93Q2dZSUtvWkl6ajBFQXdNRFp3QXdaQUl3UENzUUs0RFlpWllEUElhRGk1SEZLbmZ4WHg2QVNTVm1FUmZzeW5ZQmlYMlg2U0pSblpVODQvOURaZG5GdnZ4bUFqQk90NlFwQmxjNEovMER4dmtUQ3FwY2x2emlMNkJDQ1BuamRsSUIzUHUzQnhzUG15Z1VZN0lpMnpiZENkbGlpb3c9IgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUI5ekNDQVh5Z0F3SUJBZ0lVQUxaTkFQRmR4SFB3amVEbG9Ed3lZQ2hBTy80d0NnWUlLb1pJemowRUF3TXdLakVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1SRXdEd1lEVlFRREV3aHphV2R6ZEc5eVpUQWVGdzB5TVRFd01EY3hNelUyTlRsYUZ3MHpNVEV3TURVeE16VTJOVGhhTUNveEZUQVRCZ05WQkFvVERITnBaM04wYjNKbExtUmxkakVSTUE4R0ExVUVBeE1JYzJsbmMzUnZjbVV3ZGpBUUJnY3Foa2pPUFFJQkJnVXJnUVFBSWdOaUFBVDdYZUZUNHJiM1BRR3dTNElhanRMazMvT2xucGdhbmdhQmNsWXBzWUJyNWkrNHluQjA3Y2ViM0xQME9JT1pkeGV4WDY5YzVpVnV5SlJRK0h6MDV5aStVRjN1QldBbEhwaVM1c2gwK0gyR0hFN1NYcmsxRUM1bTFUcjE5TDlnZzkyall6QmhNQTRHQTFVZER3RUIvd1FFQXdJQkJqQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01CMEdBMVVkRGdRV0JCUll3QjVma1VXbFpxbDZ6SkNoa3lMUUtzWEYrakFmQmdOVkhTTUVHREFXZ0JSWXdCNWZrVVdsWnFsNnpKQ2hreUxRS3NYRitqQUtCZ2dxaGtqT1BRUURBd05wQURCbUFqRUFqMW5IZVhacCsxM05XQk5hK0VEc0RQOEcxV1dnMXRDTVdQL1dIUHFwYVZvMGpoc3dlTkZaZ1NzMGVFN3dZSTRxQWpFQTJXQjlvdDk4c0lrb0YzdlpZZGQzL1Z0V0I1YjlUTk1lYTdJeC9zdEo1VGZjTExlQUJMRTRCTkpPc1E0dm5CSEoiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjItMDQtMTNUMjA6MDY6MTUuMDAwWiIKICAgICAgfQogICAgfQogIF0sCiAgImN0bG9ncyI6IFsKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi90ZXN0IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUViZndSK1JKdWRYc2NnUkJScEtYMVhGRHkzUHl1ZER4ei9TZm5SaTFmVDhla3BmQmQyTzF1b3o3anIzWjhuS3p4QTY5RVVRK2VGQ0ZJM3pldWJQV1U3dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMTRUMDA6MDA6MDAuMDAwWiIsCiAgICAgICAgICAiZW5kIjogIjIwMjItMTAtMzFUMjM6NTk6NTkuOTk5WiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAiQ0dDUzhDaFMvMmhGMGRGcko0U2NSV2NZckJZOXd6alNiZWE4SWdZMmIzST0iCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vY3RmZS5zaWdzdG9yZS5kZXYvMjAyMiIsCiAgICAgICJoYXNoQWxnb3JpdGhtIjogIlNIQTJfMjU2IiwKICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAicmF3Qnl0ZXMiOiAiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFaVBTbEZpMENtRlRmRWpDVXFGOUh1Q0VjWVhOS0FhWWFsSUptQlo4eXllelBqVHFoeHJLQnBNbmFvY1Z0TEpCSTFlTTN1WG5RelFHQUpkSjRnczlGeXc9PSIsCiAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICJzdGFydCI6ICIyMDIyLTEwLTIwVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgfQogICAgICB9LAogICAgICAibG9nSWQiOiB7CiAgICAgICAgImtleUlkIjogIjNUMHdhc2JIRVRKakdSNGNtV2MzQXFKS1hyamVQSzMvaDRweWdDOHA3bzQ9IgogICAgICB9CiAgICB9CiAgXSwKICAidGltZXN0YW1wQXV0aG9yaXRpZXMiOiBbCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAiR2l0SHViLCBJbmMuIiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJJbnRlcm5hbCBTZXJ2aWNlcyBSb290IgogICAgICB9LAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCM0RDQ0FXS2dBd0lCQWdJVWNoa05zSDM2WGEwNGIxTHFJYytxcjlEVmVjTXdDZ1lJS29aSXpqMEVBd013TWpFVk1CTUdBMVVFQ2hNTVIybDBTSFZpTENCSmJtTXVNUmt3RndZRFZRUURFeEJVVTBFZ2FXNTBaWEp0WldScFlYUmxNQjRYRFRJek1EUXhOREF3TURBd01Gb1hEVEkwTURReE16QXdNREF3TUZvd01qRVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVJrd0Z3WURWUVFERXhCVVUwRWdWR2x0WlhOMFlXMXdhVzVuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFVUQ1Wk5iU3FZTWQ2cjhxcE9PRVg5aWJHblpUOUdzdVhPaHIvZjhVOUZKdWdCR0V4S1lwNDBPVUxTMGVyalpXN3hWOXhWNTJObkpmNU9lRHE0ZTVaS3FOV01GUXdEZ1lEVlIwUEFRSC9CQVFEQWdlQU1CTUdBMVVkSlFRTU1Bb0dDQ3NHQVFVRkJ3TUlNQXdHQTFVZEV3RUIvd1FDTUFBd0h3WURWUjBqQkJnd0ZvQVVhVzFSdWRPZ1Z0MGxlcVkwV0tZYnVQcjQ3d0F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl3YlVIOUh2RDRlakNaSk9XUW5xQWxrcVVSbGx2dTlNOCtWcUxiaVJLK3pTZlpDWndzaWxqUm44TVFRUlNrWEVFNUFqRUFnK1Z4cXRvamZWZnU4RGh6emhDeDlHS0VUYkpIYjE5aVY3Mm1NS1ViREFGbXpaNmJROGI1NFpiOHRpZHk1YVdlIgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUNFRENDQVpXZ0F3SUJBZ0lVWDhaTzVRWFA3dk40ZE1RNWU5c1UzbnViOE9nd0NnWUlLb1pJemowRUF3TXdPREVWTUJNR0ExVUVDaE1NUjJsMFNIVmlMQ0JKYm1NdU1SOHdIUVlEVlFRREV4WkpiblJsY201aGJDQlRaWEoyYVdObGN5QlNiMjkwTUI0WERUSXpNRFF4TkRBd01EQXdNRm9YRFRJNE1EUXhNakF3TURBd01Gb3dNakVWTUJNR0ExVUVDaE1NUjJsMFNIVmlMQ0JKYm1NdU1Sa3dGd1lEVlFRREV4QlVVMEVnYVc1MFpYSnRaV1JwWVhSbE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFdk1MWS9kVFZidklKWUFOQXVzekV3Sm5RRTFsbGZ0eW55TUtJTWhoNDhIbXFiVnI1eWd5YnpzTFJMVktiQldPZFoyMWFlSnorZ1ppeXRaZXRxY3lGOVdsRVI1TkVNZjZKVjdaTm9qUXB4SHE0UkhHb0dTY2VRdi9xdlRpWnhFREtvMll3WkRBT0JnTlZIUThCQWY4RUJBTUNBUVl3RWdZRFZSMFRBUUgvQkFnd0JnRUIvd0lCQURBZEJnTlZIUTRFRmdRVWFXMVJ1ZE9nVnQwbGVxWTBXS1lidVByNDd3QXdId1lEVlIwakJCZ3dGb0FVOU5ZWWxvYm5BRzRjMC9xanh5SC9scS93eitRd0NnWUlLb1pJemowRUF3TURhUUF3WmdJeEFLMUIxODV5Z0NySVlGbElzM0dqc3dqbndTTUc2TFk4d29MVmRha0tEWnhWYThmOGNxTXMxRGhjeEowKzA5dzk1UUl4QU8rdEJ6Wms3dmpVSjlpSmdENFI2WldUeFFXS3FObTc0ak85OW8rbzlzdjRGSS9TWlRaVEZ5TW4wSUpFSGRObXlBPT0iCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQjlEQ0NBWHFnQXdJQkFnSVVhL0pBa2RVaks0SlV3c3F0YWlSSkdXaHFMU293Q2dZSUtvWkl6ajBFQXdNd09ERVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVI4d0hRWURWUVFERXhaSmJuUmxjbTVoYkNCVFpYSjJhV05sY3lCU2IyOTBNQjRYRFRJek1EUXhOREF3TURBd01Gb1hEVE16TURReE1UQXdNREF3TUZvd09ERVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVI4d0hRWURWUVFERXhaSmJuUmxjbTVoYkNCVFpYSjJhV05sY3lCU2IyOTBNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRWY5akZBWHh6NGt4NjhBSFJNT2tGQmhmbERjTVR2emFYejR4L0ZDY1hqSi8xcUVLb24vcVBJR25hVVJza0R0eU5iTkRPcGVKVERERnF0NDhpTVBybnpweDZJWndxZW1mVUpONHhCRVpmemErcFl0L2l5b2QrOXRacjIwUlJXU3YvbzBVd1F6QU9CZ05WSFE4QkFmOEVCQU1DQVFZd0VnWURWUjBUQVFIL0JBZ3dCZ0VCL3dJQkFqQWRCZ05WSFE0RUZnUVU5TllZbG9ibkFHNGMwL3FqeHlIL2xxL3d6K1F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl4QUxaTFo4QmdSWHpLeExNTU45VklsTytlNGhyQm5OQmdGN3R6N0hucm93djJOZXRaRXJJQUNLRnltQmx2V0R2dE1BSXdaTytraTZzc1ExYnNabzk4TzhtRUFmMk5aN2lpQ2dERFUwVndqZWNvNnp5ZWgwekJUczkvN2dWNkFITlE1M3hEIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIzLTA0LTE0VDAwOjAwOjAwLjAwMFoiCiAgICAgIH0KICAgIH0KICBdCn0K\",\"registry.npmjs.org%2Fkeys.json\":\"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAgICAgICAgICJlbmQiOiAiMjAyNS0wMS0yOVQwMDowMDowMC4wMDBaIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJrZXlJZCI6ICJTSEEyNTY6amwzYndzd3U4MFBqam9rQ2doMG8ydzVjMlU0TGhRQUU1N2dqOWN6MWt6QSIsCiAgICAgICAgICAgICJrZXlVc2FnZSI6ICJucG06YXR0ZXN0YXRpb25zIiwKICAgICAgICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUxT2xiM3pNQUZGeFhLSGlJa1FPNWNKM1lobDVpNlVQcCtJaHV0ZUJKYnVIY0E1VW9nS28wRVd0bFd3VzZLU2FLb1RORVlMN0psQ1FpVm5raEJrdFVnZz09IiwKICAgICAgICAgICAgICAgICJrZXlEZXRhaWxzIjogIlBLSVhfRUNEU0FfUDI1Nl9TSEFfMjU2IiwKICAgICAgICAgICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICAgICAgICAgICAic3RhcnQiOiAiMjAyMi0xMi0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgICAgICAgICAgICAgICAiZW5kIjogIjIwMjUtMDEtMjlUMDA6MDA6MDAuMDAwWiIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OkRoUTh3UjVBUEJ2RkhMRi8rVGMrQVl2UE9kVHBjSURxT2h4c0JIUndDN1UiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpEaFE4d1I1QVBCdkZITEYvK1RjK0FZdlBPZFRwY0lEcU9oeHNCSFJ3QzdVIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K\"}}}});var TNe=L(I1=>{\"use strict\";var QNe=I1&&I1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(I1,\"__esModule\",{value:!0});I1.TUFClient=void 0;var Rg=QNe(ye(\"fs\")),sP=QNe(ye(\"path\")),k8t=PNe(),Q8t=wL(),T8t=xNe(),LJ=\"targets\",OJ=class{constructor(e){let r=new URL(e.mirrorURL),s=encodeURIComponent(r.host+r.pathname.replace(/\\/$/,\"\")),a=sP.default.join(e.cachePath,s);R8t(a),F8t({cachePath:a,mirrorURL:e.mirrorURL,tufRootPath:e.rootPath,forceInit:e.forceInit}),this.updater=N8t({mirrorURL:e.mirrorURL,cachePath:a,forceCache:e.forceCache,retry:e.retry,timeout:e.timeout})}async refresh(){return this.updater.refresh()}getTarget(e){return(0,T8t.readTarget)(this.updater,e)}};I1.TUFClient=OJ;function R8t(t){let e=sP.default.join(t,LJ);Rg.default.existsSync(t)||Rg.default.mkdirSync(t,{recursive:!0}),Rg.default.existsSync(e)||Rg.default.mkdirSync(e)}function F8t({cachePath:t,mirrorURL:e,tufRootPath:r,forceInit:s}){let a=sP.default.join(t,\"root.json\");if(!Rg.default.existsSync(a)||s)if(r)Rg.default.copyFileSync(r,a);else{let c=kNe()[e];if(!c)throw new Q8t.TUFError({code:\"TUF_INIT_CACHE_ERROR\",message:`No root.json found for mirror: ${e}`});Rg.default.writeFileSync(a,Buffer.from(c[\"root.json\"],\"base64\")),Object.entries(c.targets).forEach(([f,p])=>{Rg.default.writeFileSync(sP.default.join(t,LJ,f),Buffer.from(p,\"base64\"))})}}function N8t(t){let e={fetchTimeout:t.timeout,fetchRetry:t.retry};return new k8t.Updater({metadataBaseUrl:t.mirrorURL,targetBaseUrl:`${t.mirrorURL}/targets`,metadataDir:t.cachePath,targetDir:sP.default.join(t.cachePath,LJ),forceCache:t.forceCache,config:e})}});var wL=L(yh=>{\"use strict\";Object.defineProperty(yh,\"__esModule\",{value:!0});yh.TUFError=yh.DEFAULT_MIRROR_URL=void 0;yh.getTrustedRoot=q8t;yh.initTUF=G8t;var O8t=Rb(),L8t=fFe(),M8t=TNe();yh.DEFAULT_MIRROR_URL=\"https://tuf-repo-cdn.sigstore.dev\";var _8t=\"sigstore-js\",U8t={retries:2},H8t=5e3,j8t=\"trusted_root.json\";async function q8t(t={}){let r=await RNe(t).getTarget(j8t);return O8t.TrustedRoot.fromJSON(JSON.parse(r))}async function G8t(t={}){let e=RNe(t);return e.refresh().then(()=>e)}function RNe(t){return new M8t.TUFClient({cachePath:t.cachePath||(0,L8t.appDataPath)(_8t),rootPath:t.rootPath,mirrorURL:t.mirrorURL||yh.DEFAULT_MIRROR_URL,retry:t.retry??U8t,timeout:t.timeout??H8t,forceCache:t.forceCache??!1,forceInit:t.forceInit??t.force??!1})}var W8t=NJ();Object.defineProperty(yh,\"TUFError\",{enumerable:!0,get:function(){return W8t.TUFError}})});var FNe=L(BL=>{\"use strict\";Object.defineProperty(BL,\"__esModule\",{value:!0});BL.DSSESignatureContent=void 0;var oP=wl(),MJ=class{constructor(e){this.env=e}compareDigest(e){return oP.crypto.bufferEqual(e,oP.crypto.digest(\"sha256\",this.env.payload))}compareSignature(e){return oP.crypto.bufferEqual(e,this.signature)}verifySignature(e){return oP.crypto.verify(this.preAuthEncoding,e,this.signature)}get signature(){return this.env.signatures.length>0?this.env.signatures[0].sig:Buffer.from(\"\")}get preAuthEncoding(){return oP.dsse.preAuthEncoding(this.env.payloadType,this.env.payload)}};BL.DSSESignatureContent=MJ});var NNe=L(vL=>{\"use strict\";Object.defineProperty(vL,\"__esModule\",{value:!0});vL.MessageSignatureContent=void 0;var _J=wl(),UJ=class{constructor(e,r){this.signature=e.signature,this.messageDigest=e.messageDigest.digest,this.artifact=r}compareSignature(e){return _J.crypto.bufferEqual(e,this.signature)}compareDigest(e){return _J.crypto.bufferEqual(e,this.messageDigest)}verifySignature(e){return _J.crypto.verify(this.artifact,e,this.signature)}};vL.MessageSignatureContent=UJ});var LNe=L(SL=>{\"use strict\";Object.defineProperty(SL,\"__esModule\",{value:!0});SL.toSignedEntity=K8t;SL.signatureContent=ONe;var HJ=wl(),Y8t=FNe(),V8t=NNe();function K8t(t,e){let{tlogEntries:r,timestampVerificationData:s}=t.verificationMaterial,a=[];for(let n of r)a.push({$case:\"transparency-log\",tlogEntry:n});for(let n of s?.rfc3161Timestamps??[])a.push({$case:\"timestamp-authority\",timestamp:HJ.RFC3161Timestamp.parse(n.signedTimestamp)});return{signature:ONe(t,e),key:J8t(t),tlogEntries:r,timestamps:a}}function ONe(t,e){switch(t.content.$case){case\"dsseEnvelope\":return new Y8t.DSSESignatureContent(t.content.dsseEnvelope);case\"messageSignature\":return new V8t.MessageSignatureContent(t.content.messageSignature,e)}}function J8t(t){switch(t.verificationMaterial.content.$case){case\"publicKey\":return{$case:\"public-key\",hint:t.verificationMaterial.content.publicKey.hint};case\"x509CertificateChain\":return{$case:\"certificate\",certificate:HJ.X509Certificate.parse(t.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes)};case\"certificate\":return{$case:\"certificate\",certificate:HJ.X509Certificate.parse(t.verificationMaterial.content.certificate.rawBytes)}}}});var Co=L(C1=>{\"use strict\";Object.defineProperty(C1,\"__esModule\",{value:!0});C1.PolicyError=C1.VerificationError=void 0;var DL=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}},jJ=class extends DL{};C1.VerificationError=jJ;var qJ=class extends DL{};C1.PolicyError=qJ});var MNe=L(bL=>{\"use strict\";Object.defineProperty(bL,\"__esModule\",{value:!0});bL.filterCertAuthorities=z8t;bL.filterTLogAuthorities=Z8t;function z8t(t,e){return t.filter(r=>r.validFor.start<=e.start&&r.validFor.end>=e.end)}function Z8t(t,e){return t.filter(r=>e.logID&&!r.logID.equals(e.logID)?!1:r.validFor.start<=e.targetDate&&e.targetDate<=r.validFor.end)}});var hy=L(py=>{\"use strict\";Object.defineProperty(py,\"__esModule\",{value:!0});py.filterTLogAuthorities=py.filterCertAuthorities=void 0;py.toTrustMaterial=$8t;var GJ=wl(),aP=Rb(),X8t=Co(),WJ=new Date(0),YJ=new Date(864e13),HNe=MNe();Object.defineProperty(py,\"filterCertAuthorities\",{enumerable:!0,get:function(){return HNe.filterCertAuthorities}});Object.defineProperty(py,\"filterTLogAuthorities\",{enumerable:!0,get:function(){return HNe.filterTLogAuthorities}});function $8t(t,e){let r=typeof e==\"function\"?e:eHt(e);return{certificateAuthorities:t.certificateAuthorities.map(UNe),timestampAuthorities:t.timestampAuthorities.map(UNe),tlogs:t.tlogs.map(_Ne),ctlogs:t.ctlogs.map(_Ne),publicKey:r}}function _Ne(t){let e=t.publicKey.keyDetails,r=e===aP.PublicKeyDetails.PKCS1_RSA_PKCS1V5||e===aP.PublicKeyDetails.PKIX_RSA_PKCS1V5||e===aP.PublicKeyDetails.PKIX_RSA_PKCS1V15_2048_SHA256||e===aP.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256||e===aP.PublicKeyDetails.PKIX_RSA_PKCS1V15_4096_SHA256?\"pkcs1\":\"spki\";return{logID:t.logId.keyId,publicKey:GJ.crypto.createPublicKey(t.publicKey.rawBytes,r),validFor:{start:t.publicKey.validFor?.start||WJ,end:t.publicKey.validFor?.end||YJ}}}function UNe(t){return{certChain:t.certChain.certificates.map(e=>GJ.X509Certificate.parse(e.rawBytes)),validFor:{start:t.validFor?.start||WJ,end:t.validFor?.end||YJ}}}function eHt(t){return e=>{let r=(t||{})[e];if(!r)throw new X8t.VerificationError({code:\"PUBLIC_KEY_ERROR\",message:`key not found: ${e}`});return{publicKey:GJ.crypto.createPublicKey(r.rawBytes),validFor:s=>(r.validFor?.start||WJ)<=s&&(r.validFor?.end||YJ)>=s}}}});var VJ=L(lP=>{\"use strict\";Object.defineProperty(lP,\"__esModule\",{value:!0});lP.CertificateChainVerifier=void 0;lP.verifyCertificateChain=rHt;var gy=Co(),tHt=hy();function rHt(t,e){let r=(0,tHt.filterCertAuthorities)(e,{start:t.notBefore,end:t.notAfter}),s;for(let a of r)try{return new PL({trustedCerts:a.certChain,untrustedCert:t}).verify()}catch(n){s=n}throw new gy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"Failed to verify certificate chain\",cause:s})}var PL=class{constructor(e){this.untrustedCert=e.untrustedCert,this.trustedCerts=e.trustedCerts,this.localCerts=nHt([...e.trustedCerts,e.untrustedCert])}verify(){let e=this.sort();return this.checkPath(e),e}sort(){let e=this.untrustedCert,r=this.buildPaths(e);if(r=r.filter(a=>a.some(n=>this.trustedCerts.includes(n))),r.length===0)throw new gy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"no trusted certificate path found\"});let s=r.reduce((a,n)=>a.length<n.length?a:n);return[e,...s].slice(0,-1)}buildPaths(e){let r=[],s=this.findIssuer(e);if(s.length===0)throw new gy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"no valid certificate path found\"});for(let a=0;a<s.length;a++){let n=s[a];if(n.equals(e)){r.push([e]);continue}let c=this.buildPaths(n);for(let f=0;f<c.length;f++)r.push([n,...c[f]])}return r}findIssuer(e){let r=[],s;return e.subject.equals(e.issuer)&&e.verify()?[e]:(e.extAuthorityKeyID&&(s=e.extAuthorityKeyID.keyIdentifier),this.localCerts.forEach(a=>{if(s&&a.extSubjectKeyID){a.extSubjectKeyID.keyIdentifier.equals(s)&&r.push(a);return}a.subject.equals(e.issuer)&&r.push(a)}),r=r.filter(a=>{try{return e.verify(a)}catch{return!1}}),r)}checkPath(e){if(e.length<1)throw new gy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"certificate chain must contain at least one certificate\"});if(!e.slice(1).every(s=>s.isCA))throw new gy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"intermediate certificate is not a CA\"});for(let s=e.length-2;s>=0;s--)if(!e[s].issuer.equals(e[s+1].subject))throw new gy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"incorrect certificate name chaining\"});for(let s=0;s<e.length;s++){let a=e[s];if(a.extBasicConstraints?.isCA){let n=a.extBasicConstraints.pathLenConstraint;if(n!==void 0&&n<s-1)throw new gy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"path length constraint exceeded\"})}}}};lP.CertificateChainVerifier=PL;function nHt(t){for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++)t[e].equals(t[r])&&(t.splice(r,1),r--);return t}});var jNe=L(KJ=>{\"use strict\";Object.defineProperty(KJ,\"__esModule\",{value:!0});KJ.verifySCTs=oHt;var xL=wl(),iHt=Co(),sHt=hy();function oHt(t,e,r){let s,a=t.clone();for(let p=0;p<a.extensions.length;p++){let h=a.extensions[p];if(h.subs[0].toOID()===xL.EXTENSION_OID_SCT){s=new xL.X509SCTExtension(h),a.extensions.splice(p,1);break}}if(!s)return[];if(s.signedCertificateTimestamps.length===0)return[];let n=new xL.ByteStream,c=xL.crypto.digest(\"sha256\",e.publicKey);n.appendView(c);let f=a.tbsCertificate.toDER();return n.appendUint24(f.length),n.appendView(f),s.signedCertificateTimestamps.map(p=>{if(!(0,sHt.filterTLogAuthorities)(r,{logID:p.logID,targetDate:p.datetime}).some(C=>p.verify(n.buffer,C.publicKey)))throw new iHt.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"SCT verification failed\"});return p.logID})}});var GNe=L(kL=>{\"use strict\";Object.defineProperty(kL,\"__esModule\",{value:!0});kL.verifyPublicKey=AHt;kL.verifyCertificate=pHt;var aHt=wl(),qNe=Co(),lHt=VJ(),cHt=jNe(),uHt=\"1.3.6.1.4.1.57264.1.1\",fHt=\"1.3.6.1.4.1.57264.1.8\";function AHt(t,e,r){let s=r.publicKey(t);return e.forEach(a=>{if(!s.validFor(a))throw new qNe.VerificationError({code:\"PUBLIC_KEY_ERROR\",message:`Public key is not valid for timestamp: ${a.toISOString()}`})}),{key:s.publicKey}}function pHt(t,e,r){let s=(0,lHt.verifyCertificateChain)(t,r.certificateAuthorities);if(!e.every(n=>s.every(c=>c.validForDate(n))))throw new qNe.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"certificate is not valid or expired at the specified date\"});return{scts:(0,cHt.verifySCTs)(s[0],s[1],r.ctlogs),signer:hHt(s[0])}}function hHt(t){let e,r=t.extension(fHt);r?e=r.valueObj.subs?.[0]?.value.toString(\"ascii\"):e=t.extension(uHt)?.value.toString(\"ascii\");let s={extensions:{issuer:e},subjectAlternativeName:t.subjectAltName};return{key:aHt.crypto.createPublicKey(t.publicKey),identity:s}}});var YNe=L(QL=>{\"use strict\";Object.defineProperty(QL,\"__esModule\",{value:!0});QL.verifySubjectAlternativeName=gHt;QL.verifyExtensions=dHt;var WNe=Co();function gHt(t,e){if(e===void 0||!e.match(t))throw new WNe.PolicyError({code:\"UNTRUSTED_SIGNER_ERROR\",message:`certificate identity error - expected ${t}, got ${e}`})}function dHt(t,e={}){let r;for(r in t)if(e[r]!==t[r])throw new WNe.PolicyError({code:\"UNTRUSTED_SIGNER_ERROR\",message:`invalid certificate extension - expected ${r}=${t[r]}, got ${r}=${e[r]}`})}});var VNe=L($J=>{\"use strict\";Object.defineProperty($J,\"__esModule\",{value:!0});$J.verifyCheckpoint=EHt;var zJ=wl(),w1=Co(),mHt=hy(),JJ=`\n\n`,yHt=/\\u2014 (\\S+) (\\S+)\\n/g;function EHt(t,e){let r=(0,mHt.filterTLogAuthorities)(e,{targetDate:new Date(Number(t.integratedTime)*1e3)}),s=t.inclusionProof,a=ZJ.fromString(s.checkpoint.envelope),n=XJ.fromString(a.note);if(!IHt(a,r))throw new w1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"invalid checkpoint signature\"});if(!zJ.crypto.bufferEqual(n.logHash,s.rootHash))throw new w1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"root hash mismatch\"})}function IHt(t,e){let r=Buffer.from(t.note,\"utf-8\");return t.signatures.every(s=>{let a=e.find(n=>zJ.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint));return a?zJ.crypto.verify(r,a.publicKey,s.signature):!1})}var ZJ=class t{constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(JJ))throw new w1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"missing checkpoint separator\"});let r=e.indexOf(JJ),s=e.slice(0,r+1),n=e.slice(r+JJ.length).matchAll(yHt),c=Array.from(n,f=>{let[,p,h]=f,E=Buffer.from(h,\"base64\");if(E.length<5)throw new w1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"malformed checkpoint signature\"});return{name:p,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(c.length===0)throw new w1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"no signatures found in checkpoint\"});return new t(s,c)}},XJ=class t{constructor(e,r,s,a){this.origin=e,this.logSize=r,this.logHash=s,this.rest=a}static fromString(e){let r=e.trimEnd().split(`\n`);if(r.length<3)throw new w1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"too few lines in checkpoint header\"});let s=r[0],a=BigInt(r[1]),n=Buffer.from(r[2],\"base64\"),c=r.slice(3);return new t(s,a,n,c)}}});var KNe=L(nz=>{\"use strict\";Object.defineProperty(nz,\"__esModule\",{value:!0});nz.verifyMerkleInclusion=BHt;var rz=wl(),ez=Co(),CHt=Buffer.from([0]),wHt=Buffer.from([1]);function BHt(t){let e=t.inclusionProof,r=BigInt(e.logIndex),s=BigInt(e.treeSize);if(r<0n||r>=s)throw new ez.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:`invalid index: ${r}`});let{inner:a,border:n}=vHt(r,s);if(e.hashes.length!==a+n)throw new ez.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"invalid hash count\"});let c=e.hashes.slice(0,a),f=e.hashes.slice(a),p=kHt(t.canonicalizedBody),h=DHt(SHt(p,c,r),f);if(!rz.crypto.bufferEqual(h,e.rootHash))throw new ez.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"calculated root hash does not match inclusion proof\"})}function vHt(t,e){let r=bHt(t,e),s=PHt(t>>BigInt(r));return{inner:r,border:s}}function SHt(t,e,r){return e.reduce((s,a,n)=>r>>BigInt(n)&BigInt(1)?tz(a,s):tz(s,a),t)}function DHt(t,e){return e.reduce((r,s)=>tz(s,r),t)}function bHt(t,e){return xHt(t^e-BigInt(1))}function PHt(t){return t.toString(2).split(\"1\").length-1}function xHt(t){return t===0n?0:t.toString(2).length}function tz(t,e){return rz.crypto.digest(\"sha256\",wHt,t,e)}function kHt(t){return rz.crypto.digest(\"sha256\",CHt,t)}});var zNe=L(iz=>{\"use strict\";Object.defineProperty(iz,\"__esModule\",{value:!0});iz.verifyTLogSET=RHt;var JNe=wl(),QHt=Co(),THt=hy();function RHt(t,e){if(!(0,THt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(a=>{let n=FHt(t),c=Buffer.from(JNe.json.canonicalize(n),\"utf8\"),f=t.inclusionPromise.signedEntryTimestamp;return JNe.crypto.verify(c,a.publicKey,f)}))throw new QHt.VerificationError({code:\"TLOG_INCLUSION_PROMISE_ERROR\",message:\"inclusion promise could not be verified\"})}function FHt(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:a}=t;return{body:a.toString(\"base64\"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString(\"hex\")}}});var ZNe=L(az=>{\"use strict\";Object.defineProperty(az,\"__esModule\",{value:!0});az.verifyRFC3161Timestamp=LHt;var sz=wl(),oz=Co(),NHt=VJ(),OHt=hy();function LHt(t,e,r){let s=t.signingTime;if(r=(0,OHt.filterCertAuthorities)(r,{start:s,end:s}),r=_Ht(r,{serialNumber:t.signerSerialNumber,issuer:t.signerIssuer}),!r.some(n=>{try{return MHt(t,e,n),!0}catch{return!1}}))throw new oz.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"timestamp could not be verified\"})}function MHt(t,e,r){let[s,...a]=r.certChain,n=sz.crypto.createPublicKey(s.publicKey),c=t.signingTime;try{new NHt.CertificateChainVerifier({untrustedCert:s,trustedCerts:a}).verify()}catch{throw new oz.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"invalid certificate chain\"})}if(!r.certChain.every(p=>p.validForDate(c)))throw new oz.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"timestamp was signed with an expired certificate\"});t.verify(e,n)}function _Ht(t,e){return t.filter(r=>r.certChain.length>0&&sz.crypto.bufferEqual(r.certChain[0].serialNumber,e.serialNumber)&&sz.crypto.bufferEqual(r.certChain[0].issuer,e.issuer))}});var XNe=L(TL=>{\"use strict\";Object.defineProperty(TL,\"__esModule\",{value:!0});TL.verifyTSATimestamp=WHt;TL.verifyTLogTimestamp=YHt;var UHt=Co(),HHt=VNe(),jHt=KNe(),qHt=zNe(),GHt=ZNe();function WHt(t,e,r){return(0,GHt.verifyRFC3161Timestamp)(t,e,r),{type:\"timestamp-authority\",logID:t.signerSerialNumber,timestamp:t.signingTime}}function YHt(t,e){let r=!1;if(VHt(t)&&((0,qHt.verifyTLogSET)(t,e),r=!0),KHt(t)&&((0,jHt.verifyMerkleInclusion)(t),(0,HHt.verifyCheckpoint)(t,e),r=!0),!r)throw new UHt.VerificationError({code:\"TLOG_MISSING_INCLUSION_ERROR\",message:\"inclusion could not be verified\"});return{type:\"transparency-log\",logID:t.logId.keyId,timestamp:new Date(Number(t.integratedTime)*1e3)}}function VHt(t){return t.inclusionPromise!==void 0}function KHt(t){return t.inclusionProof!==void 0}});var $Ne=L(lz=>{\"use strict\";Object.defineProperty(lz,\"__esModule\",{value:!0});lz.verifyDSSETLogBody=JHt;var RL=Co();function JHt(t,e){switch(t.apiVersion){case\"0.0.1\":return zHt(t,e);default:throw new RL.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported dsse version: ${t.apiVersion}`})}}function zHt(t,e){if(t.spec.signatures?.length!==1)throw new RL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"signature count mismatch\"});let r=t.spec.signatures[0].signature;if(!e.compareSignature(Buffer.from(r,\"base64\")))throw new RL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"tlog entry signature mismatch\"});let s=t.spec.payloadHash?.value||\"\";if(!e.compareDigest(Buffer.from(s,\"hex\")))throw new RL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"DSSE payload hash mismatch\"})}});var eOe=L(uz=>{\"use strict\";Object.defineProperty(uz,\"__esModule\",{value:!0});uz.verifyHashedRekordTLogBody=ZHt;var cz=Co();function ZHt(t,e){switch(t.apiVersion){case\"0.0.1\":return XHt(t,e);default:throw new cz.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported hashedrekord version: ${t.apiVersion}`})}}function XHt(t,e){let r=t.spec.signature.content||\"\";if(!e.compareSignature(Buffer.from(r,\"base64\")))throw new cz.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"signature mismatch\"});let s=t.spec.data.hash?.value||\"\";if(!e.compareDigest(Buffer.from(s,\"hex\")))throw new cz.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"digest mismatch\"})}});var tOe=L(fz=>{\"use strict\";Object.defineProperty(fz,\"__esModule\",{value:!0});fz.verifyIntotoTLogBody=$Ht;var FL=Co();function $Ht(t,e){switch(t.apiVersion){case\"0.0.2\":return ejt(t,e);default:throw new FL.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported intoto version: ${t.apiVersion}`})}}function ejt(t,e){if(t.spec.content.envelope.signatures?.length!==1)throw new FL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"signature count mismatch\"});let r=tjt(t.spec.content.envelope.signatures[0].sig);if(!e.compareSignature(Buffer.from(r,\"base64\")))throw new FL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"tlog entry signature mismatch\"});let s=t.spec.content.payloadHash?.value||\"\";if(!e.compareDigest(Buffer.from(s,\"hex\")))throw new FL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"DSSE payload hash mismatch\"})}function tjt(t){return Buffer.from(t,\"base64\").toString(\"utf-8\")}});var nOe=L(Az=>{\"use strict\";Object.defineProperty(Az,\"__esModule\",{value:!0});Az.verifyTLogBody=sjt;var rOe=Co(),rjt=$Ne(),njt=eOe(),ijt=tOe();function sjt(t,e){let{kind:r,version:s}=t.kindVersion,a=JSON.parse(t.canonicalizedBody.toString(\"utf8\"));if(r!==a.kind||s!==a.apiVersion)throw new rOe.VerificationError({code:\"TLOG_BODY_ERROR\",message:`kind/version mismatch - expected: ${r}/${s}, received: ${a.kind}/${a.apiVersion}`});switch(a.kind){case\"dsse\":return(0,rjt.verifyDSSETLogBody)(a,e);case\"intoto\":return(0,ijt.verifyIntotoTLogBody)(a,e);case\"hashedrekord\":return(0,njt.verifyHashedRekordTLogBody)(a,e);default:throw new rOe.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported kind: ${r}`})}}});var lOe=L(NL=>{\"use strict\";Object.defineProperty(NL,\"__esModule\",{value:!0});NL.Verifier=void 0;var ojt=ye(\"util\"),B1=Co(),iOe=GNe(),sOe=YNe(),oOe=XNe(),ajt=nOe(),pz=class{constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,tsaThreshold:r.tsaThreshold??0}}verify(e,r){let s=this.verifyTimestamps(e),a=this.verifySigningKey(e,s);return this.verifyTLogs(e),this.verifySignature(e,a),r&&this.verifyPolicy(r,a.identity||{}),a}verifyTimestamps(e){let r=0,s=0,a=e.timestamps.map(n=>{switch(n.$case){case\"timestamp-authority\":return s++,(0,oOe.verifyTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities);case\"transparency-log\":return r++,(0,oOe.verifyTLogTimestamp)(n.tlogEntry,this.trustMaterial.tlogs)}});if(aOe(a))throw new B1.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"duplicate timestamp\"});if(r<this.options.tlogThreshold)throw new B1.VerificationError({code:\"TIMESTAMP_ERROR\",message:`expected ${this.options.tlogThreshold} tlog timestamps, got ${r}`});if(s<this.options.tsaThreshold)throw new B1.VerificationError({code:\"TIMESTAMP_ERROR\",message:`expected ${this.options.tsaThreshold} tsa timestamps, got ${s}`});return a.map(n=>n.timestamp)}verifySigningKey({key:e},r){switch(e.$case){case\"public-key\":return(0,iOe.verifyPublicKey)(e.hint,r,this.trustMaterial);case\"certificate\":{let s=(0,iOe.verifyCertificate)(e.certificate,r,this.trustMaterial);if(aOe(s.scts))throw new B1.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"duplicate SCT\"});if(s.scts.length<this.options.ctlogThreshold)throw new B1.VerificationError({code:\"CERTIFICATE_ERROR\",message:`expected ${this.options.ctlogThreshold} SCTs, got ${s.scts.length}`});return s.signer}}}verifyTLogs({signature:e,tlogEntries:r}){r.forEach(s=>(0,ajt.verifyTLogBody)(s,e))}verifySignature(e,r){if(!e.signature.verifySignature(r.key))throw new B1.VerificationError({code:\"SIGNATURE_ERROR\",message:\"signature verification failed\"})}verifyPolicy(e,r){e.subjectAlternativeName&&(0,sOe.verifySubjectAlternativeName)(e.subjectAlternativeName,r.subjectAlternativeName),e.extensions&&(0,sOe.verifyExtensions)(e.extensions,r.extensions)}};NL.Verifier=pz;function aOe(t){for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++)if((0,ojt.isDeepStrictEqual)(t[e],t[r]))return!0;return!1}});var OL=L(ou=>{\"use strict\";Object.defineProperty(ou,\"__esModule\",{value:!0});ou.Verifier=ou.toTrustMaterial=ou.VerificationError=ou.PolicyError=ou.toSignedEntity=void 0;var ljt=LNe();Object.defineProperty(ou,\"toSignedEntity\",{enumerable:!0,get:function(){return ljt.toSignedEntity}});var cOe=Co();Object.defineProperty(ou,\"PolicyError\",{enumerable:!0,get:function(){return cOe.PolicyError}});Object.defineProperty(ou,\"VerificationError\",{enumerable:!0,get:function(){return cOe.VerificationError}});var cjt=hy();Object.defineProperty(ou,\"toTrustMaterial\",{enumerable:!0,get:function(){return cjt.toTrustMaterial}});var ujt=lOe();Object.defineProperty(ou,\"Verifier\",{enumerable:!0,get:function(){return ujt.Verifier}})});var uOe=L(Na=>{\"use strict\";Object.defineProperty(Na,\"__esModule\",{value:!0});Na.DEFAULT_TIMEOUT=Na.DEFAULT_RETRY=void 0;Na.createBundleBuilder=pjt;Na.createKeyFinder=hjt;Na.createVerificationPolicy=gjt;var fjt=wl(),v1=SK(),Ajt=OL();Na.DEFAULT_RETRY={retries:2};Na.DEFAULT_TIMEOUT=5e3;function pjt(t,e){let r={signer:djt(e),witnesses:yjt(e)};switch(t){case\"messageSignature\":return new v1.MessageSignatureBundleBuilder(r);case\"dsseEnvelope\":return new v1.DSSEBundleBuilder({...r,certificateChain:e.legacyCompatibility})}}function hjt(t){return e=>{let r=t(e);if(!r)throw new Ajt.VerificationError({code:\"PUBLIC_KEY_ERROR\",message:`key not found: ${e}`});return{publicKey:fjt.crypto.createPublicKey(r),validFor:()=>!0}}}function gjt(t){let e={},r=t.certificateIdentityEmail||t.certificateIdentityURI;return r&&(e.subjectAlternativeName=r),t.certificateIssuer&&(e.extensions={issuer:t.certificateIssuer}),e}function djt(t){return new v1.FulcioSigner({fulcioBaseURL:t.fulcioURL,identityProvider:t.identityProvider||mjt(t),retry:t.retry??Na.DEFAULT_RETRY,timeout:t.timeout??Na.DEFAULT_TIMEOUT})}function mjt(t){let e=t.identityToken;return e?{getToken:()=>Promise.resolve(e)}:new v1.CIContextProvider(\"sigstore\")}function yjt(t){let e=[];return Ejt(t)&&e.push(new v1.RekorWitness({rekorBaseURL:t.rekorURL,entryType:t.legacyCompatibility?\"intoto\":\"dsse\",fetchOnConflict:!1,retry:t.retry??Na.DEFAULT_RETRY,timeout:t.timeout??Na.DEFAULT_TIMEOUT})),Ijt(t)&&e.push(new v1.TSAWitness({tsaBaseURL:t.tsaServerURL,retry:t.retry??Na.DEFAULT_RETRY,timeout:t.timeout??Na.DEFAULT_TIMEOUT})),e}function Ejt(t){return t.tlogUpload!==!1}function Ijt(t){return t.tsaServerURL!==void 0}});var pOe=L(au=>{\"use strict\";var Cjt=au&&au.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),wjt=au&&au.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),fOe=au&&au.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a<s.length;a++)s[a]!==\"default\"&&Cjt(r,e,s[a]);return wjt(r,e),r}}();Object.defineProperty(au,\"__esModule\",{value:!0});au.sign=vjt;au.attest=Sjt;au.verify=Djt;au.createVerifier=AOe;var gz=Nb(),Bjt=fOe(wL()),hz=OL(),S1=fOe(uOe());async function vjt(t,e={}){let s=await S1.createBundleBuilder(\"messageSignature\",e).create({data:t});return(0,gz.bundleToJSON)(s)}async function Sjt(t,e,r={}){let a=await S1.createBundleBuilder(\"dsseEnvelope\",r).create({data:t,type:e});return(0,gz.bundleToJSON)(a)}async function Djt(t,e,r){let s;return Buffer.isBuffer(e)?s=e:r=e,AOe(r).then(a=>a.verify(t,s))}async function AOe(t={}){let e=await Bjt.getTrustedRoot({mirrorURL:t.tufMirrorURL,rootPath:t.tufRootPath,cachePath:t.tufCachePath,forceCache:t.tufForceCache,retry:t.retry??S1.DEFAULT_RETRY,timeout:t.timeout??S1.DEFAULT_TIMEOUT}),r=t.keySelector?S1.createKeyFinder(t.keySelector):void 0,s=(0,hz.toTrustMaterial)(e,r),a={ctlogThreshold:t.ctLogThreshold,tlogThreshold:t.tlogThreshold},n=new hz.Verifier(s,a),c=S1.createVerificationPolicy(t);return{verify:(f,p)=>{let h=(0,gz.bundleFromJSON)(f),E=(0,hz.toSignedEntity)(h,p);n.verify(E,c)}}}});var gOe=L(Fi=>{\"use strict\";Object.defineProperty(Fi,\"__esModule\",{value:!0});Fi.verify=Fi.sign=Fi.createVerifier=Fi.attest=Fi.VerificationError=Fi.PolicyError=Fi.TUFError=Fi.InternalError=Fi.DEFAULT_REKOR_URL=Fi.DEFAULT_FULCIO_URL=Fi.ValidationError=void 0;var bjt=Nb();Object.defineProperty(Fi,\"ValidationError\",{enumerable:!0,get:function(){return bjt.ValidationError}});var dz=SK();Object.defineProperty(Fi,\"DEFAULT_FULCIO_URL\",{enumerable:!0,get:function(){return dz.DEFAULT_FULCIO_URL}});Object.defineProperty(Fi,\"DEFAULT_REKOR_URL\",{enumerable:!0,get:function(){return dz.DEFAULT_REKOR_URL}});Object.defineProperty(Fi,\"InternalError\",{enumerable:!0,get:function(){return dz.InternalError}});var Pjt=wL();Object.defineProperty(Fi,\"TUFError\",{enumerable:!0,get:function(){return Pjt.TUFError}});var hOe=OL();Object.defineProperty(Fi,\"PolicyError\",{enumerable:!0,get:function(){return hOe.PolicyError}});Object.defineProperty(Fi,\"VerificationError\",{enumerable:!0,get:function(){return hOe.VerificationError}});var LL=pOe();Object.defineProperty(Fi,\"attest\",{enumerable:!0,get:function(){return LL.attest}});Object.defineProperty(Fi,\"createVerifier\",{enumerable:!0,get:function(){return LL.createVerifier}});Object.defineProperty(Fi,\"sign\",{enumerable:!0,get:function(){return LL.sign}});Object.defineProperty(Fi,\"verify\",{enumerable:!0,get:function(){return LL.verify}})});var GOe=L((xSr,qOe)=>{var M6t=t3();function _6t(t){return M6t(t)?void 0:t}qOe.exports=_6t});var YOe=L((kSr,WOe)=>{var U6t=RT(),H6t=x5(),j6t=R5(),q6t=wm(),G6t=Jd(),W6t=GOe(),Y6t=BG(),V6t=P5(),K6t=1,J6t=2,z6t=4,Z6t=Y6t(function(t,e){var r={};if(t==null)return r;var s=!1;e=U6t(e,function(n){return n=q6t(n,t),s||(s=n.length>1),n}),G6t(t,V6t(t),r),s&&(r=H6t(r,K6t|J6t|z6t,W6t));for(var a=e.length;a--;)j6t(r,e[a]);return r});WOe.exports=Z6t});bt();Ve();bt();var ZOe=ye(\"child_process\"),XOe=et(Nd());Wt();var tC=new Map([]);var iS={};Vt(iS,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>ar,getCli:()=>cwe,getDynamicLibs:()=>lwe,getPluginConfiguration:()=>nC,openWorkspace:()=>rC,pluginCommands:()=>tC,runExit:()=>zR});Wt();var ut=class extends ot{constructor(){super(...arguments);this.cwd=ge.String(\"--cwd\",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<\"u\")throw new nt(\"The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path\");return super.validateAndExecute()}};Ve();bt();Wt();var ar=class extends nt{constructor(e,r){let s=K.relative(e,r),a=K.join(e,Ht.fileName);super(`This command can only be run from within a workspace of your project (${s} isn't a workspace of ${a}).`)}};Ve();bt();rA();Bc();bv();Wt();var zwt=et(fi());Ul();var lwe=()=>new Map([[\"@yarnpkg/cli\",iS],[\"@yarnpkg/core\",nS],[\"@yarnpkg/fslib\",q2],[\"@yarnpkg/libzip\",Sv],[\"@yarnpkg/parsers\",Z2],[\"@yarnpkg/shell\",Qv],[\"clipanion\",cB],[\"semver\",zwt],[\"typanion\",Ia]]);Ve();async function rC(t,e){let{project:r,workspace:s}=await Tt.find(t,e);if(!s)throw new ar(r.cwd,e);return s}Ve();bt();rA();Bc();bv();Wt();var oqt=et(fi());Ul();var $5={};Vt($5,{AddCommand:()=>aC,BinCommand:()=>lC,CacheCleanCommand:()=>cC,ClipanionCommand:()=>gC,ConfigCommand:()=>pC,ConfigGetCommand:()=>uC,ConfigSetCommand:()=>fC,ConfigUnsetCommand:()=>AC,DedupeCommand:()=>hC,EntryCommand:()=>mC,ExecCommand:()=>EC,ExplainCommand:()=>wC,ExplainPeerRequirementsCommand:()=>IC,HelpCommand:()=>dC,InfoCommand:()=>BC,LinkCommand:()=>SC,NodeCommand:()=>DC,PluginCheckCommand:()=>bC,PluginImportCommand:()=>kC,PluginImportSourcesCommand:()=>QC,PluginListCommand:()=>PC,PluginRemoveCommand:()=>TC,PluginRuntimeCommand:()=>RC,RebuildCommand:()=>FC,RemoveCommand:()=>NC,RunCommand:()=>LC,RunIndexCommand:()=>OC,SetResolutionCommand:()=>MC,SetVersionCommand:()=>CC,SetVersionSourcesCommand:()=>xC,UnlinkCommand:()=>_C,UpCommand:()=>UC,VersionCommand:()=>yC,WhyCommand:()=>HC,WorkspaceCommand:()=>YC,WorkspacesListCommand:()=>WC,YarnCommand:()=>vC,dedupeUtils:()=>oF,default:()=>WSt,suggestUtils:()=>Xu});var UBe=et(Nd());Ve();Ve();Ve();Wt();var z1e=et(lS());Ul();var Xu={};Vt(Xu,{Modifier:()=>B5,Strategy:()=>nF,Target:()=>cS,WorkspaceModifier:()=>W1e,applyModifier:()=>d2t,extractDescriptorFromPath:()=>v5,extractRangeModifier:()=>Y1e,fetchDescriptorFrom:()=>S5,findProjectDescriptors:()=>J1e,getModifier:()=>uS,getSuggestedDescriptors:()=>fS,makeWorkspaceDescriptor:()=>K1e,toWorkspaceModifier:()=>V1e});Ve();Ve();bt();var w5=et(fi()),h2t=\"workspace:\",cS=(s=>(s.REGULAR=\"dependencies\",s.DEVELOPMENT=\"devDependencies\",s.PEER=\"peerDependencies\",s))(cS||{}),B5=(s=>(s.CARET=\"^\",s.TILDE=\"~\",s.EXACT=\"\",s))(B5||{}),W1e=(s=>(s.CARET=\"^\",s.TILDE=\"~\",s.EXACT=\"*\",s))(W1e||{}),nF=(n=>(n.KEEP=\"keep\",n.REUSE=\"reuse\",n.PROJECT=\"project\",n.LATEST=\"latest\",n.CACHE=\"cache\",n))(nF||{});function uS(t,e){return t.exact?\"\":t.caret?\"^\":t.tilde?\"~\":e.configuration.get(\"defaultSemverRangePrefix\")}var g2t=/^([\\^~]?)[0-9]+(?:\\.[0-9]+){0,2}(?:-\\S+)?$/;function Y1e(t,{project:e}){let r=t.match(g2t);return r?r[1]:e.configuration.get(\"defaultSemverRangePrefix\")}function d2t(t,e){let{protocol:r,source:s,params:a,selector:n}=q.parseRange(t.range);return w5.default.valid(n)&&(n=`${e}${t.range}`),q.makeDescriptor(t,q.makeRange({protocol:r,source:s,params:a,selector:n}))}function V1e(t){switch(t){case\"^\":return\"^\";case\"~\":return\"~\";case\"\":return\"*\";default:throw new Error(`Assertion failed: Unknown modifier: \"${t}\"`)}}function K1e(t,e){return q.makeDescriptor(t.anchoredDescriptor,`${h2t}${V1e(e)}`)}async function J1e(t,{project:e,target:r}){let s=new Map,a=n=>{let c=s.get(n.descriptorHash);return c||s.set(n.descriptorHash,c={descriptor:n,locators:[]}),c};for(let n of e.workspaces)if(r===\"peerDependencies\"){let c=n.manifest.peerDependencies.get(t.identHash);c!==void 0&&a(c).locators.push(n.anchoredLocator)}else{let c=n.manifest.dependencies.get(t.identHash),f=n.manifest.devDependencies.get(t.identHash);r===\"devDependencies\"?f!==void 0?a(f).locators.push(n.anchoredLocator):c!==void 0&&a(c).locators.push(n.anchoredLocator):c!==void 0?a(c).locators.push(n.anchoredLocator):f!==void 0&&a(f).locators.push(n.anchoredLocator)}return s}async function v5(t,{cwd:e,workspace:r}){return await y2t(async s=>{K.isAbsolute(t)||(t=K.relative(r.cwd,K.resolve(e,t)),t.match(/^\\.{0,2}\\//)||(t=`./${t}`));let{project:a}=r,n=await S5(q.makeIdent(null,\"archive\"),t,{project:r.project,cache:s,workspace:r});if(!n)throw new Error(\"Assertion failed: The descriptor should have been found\");let c=new Wi,f=a.configuration.makeResolver(),p=a.configuration.makeFetcher(),h={checksums:a.storedChecksums,project:a,cache:s,fetcher:p,report:c,resolver:f},E=f.bindDescriptor(n,r.anchoredLocator,h),C=q.convertDescriptorToLocator(E),S=await p.fetch(C,h),P=await Ht.find(S.prefixPath,{baseFs:S.packageFs});if(!P.name)throw new Error(\"Target path doesn't have a name\");return q.makeDescriptor(P.name,t)})}function m2t(t){if(t.range===\"unknown\")return{type:\"resolve\",range:\"latest\"};if(Or.validRange(t.range))return{type:\"fixed\",range:t.range};if(Hp.test(t.range))return{type:\"resolve\",range:t.range};let e=t.range.match(/^(?:jsr:|npm:)(.*)/);if(!e)return{type:\"fixed\",range:t.range};let[,r]=e,s=`${q.stringifyIdent(t)}@`;return r.startsWith(s)&&(r=r.slice(s.length)),Or.validRange(r)?{type:\"fixed\",range:t.range}:Hp.test(r)?{type:\"resolve\",range:t.range}:{type:\"fixed\",range:t.range}}async function fS(t,{project:e,workspace:r,cache:s,target:a,fixed:n,modifier:c,strategies:f,maxResults:p=1/0}){if(!(p>=0))throw new Error(`Invalid maxResults (${p})`);let h=!n||t.range===\"unknown\"?m2t(t):{type:\"fixed\",range:t.range};if(h.type===\"fixed\")return{suggestions:[{descriptor:t,name:`Use ${q.prettyDescriptor(e.configuration,t)}`,reason:\"(unambiguous explicit request)\"}],rejections:[]};let E=typeof r<\"u\"&&r!==null&&r.manifest[a].get(t.identHash)||null,C=[],S=[],P=async I=>{try{await I()}catch(R){S.push(R)}};for(let I of f){if(C.length>=p)break;switch(I){case\"keep\":await P(async()=>{E&&C.push({descriptor:E,name:`Keep ${q.prettyDescriptor(e.configuration,E)}`,reason:\"(no changes)\"})});break;case\"reuse\":await P(async()=>{for(let{descriptor:R,locators:N}of(await J1e(t,{project:e,target:a})).values()){if(N.length===1&&N[0].locatorHash===r.anchoredLocator.locatorHash&&f.includes(\"keep\"))continue;let U=`(originally used by ${q.prettyLocator(e.configuration,N[0])}`;U+=N.length>1?` and ${N.length-1} other${N.length>2?\"s\":\"\"})`:\")\",C.push({descriptor:R,name:`Reuse ${q.prettyDescriptor(e.configuration,R)}`,reason:U})}});break;case\"cache\":await P(async()=>{for(let R of e.storedDescriptors.values())R.identHash===t.identHash&&C.push({descriptor:R,name:`Reuse ${q.prettyDescriptor(e.configuration,R)}`,reason:\"(already used somewhere in the lockfile)\"})});break;case\"project\":await P(async()=>{if(r.manifest.name!==null&&t.identHash===r.manifest.name.identHash)return;let R=e.tryWorkspaceByIdent(t);if(R===null)return;let N=K1e(R,c);C.push({descriptor:N,name:`Attach ${q.prettyDescriptor(e.configuration,N)}`,reason:`(local workspace at ${he.pretty(e.configuration,R.relativeCwd,he.Type.PATH)})`})});break;case\"latest\":{let R=e.configuration.get(\"enableNetwork\"),N=e.configuration.get(\"enableOfflineMode\");await P(async()=>{if(a===\"peerDependencies\")C.push({descriptor:q.makeDescriptor(t,\"*\"),name:\"Use *\",reason:\"(catch-all peer dependency pattern)\"});else if(!R&&!N)C.push({descriptor:null,name:\"Resolve from latest\",reason:he.pretty(e.configuration,\"(unavailable because enableNetwork is toggled off)\",\"grey\")});else{let U=await S5(t,h.range,{project:e,cache:s,workspace:r,modifier:c});U&&C.push({descriptor:U,name:`Use ${q.prettyDescriptor(e.configuration,U)}`,reason:`(resolved from ${N?\"the cache\":\"latest\"})`})}})}break}}return{suggestions:C.slice(0,p),rejections:S.slice(0,p)}}async function S5(t,e,{project:r,cache:s,workspace:a,preserveModifier:n=!0,modifier:c}){let f=r.configuration.normalizeDependency(q.makeDescriptor(t,e)),p=new Wi,h=r.configuration.makeFetcher(),E=r.configuration.makeResolver(),C={project:r,fetcher:h,cache:s,checksums:r.storedChecksums,report:p,cacheOptions:{skipIntegrityCheck:!0}},S={...C,resolver:E,fetchOptions:C},P=E.bindDescriptor(f,a.anchoredLocator,S),I=await E.getCandidates(P,{},S);if(I.length===0)return null;let R=I[0],{protocol:N,source:U,params:W,selector:te}=q.parseRange(q.convertToManifestRange(R.reference));if(N===r.configuration.get(\"defaultProtocol\")&&(N=null),w5.default.valid(te)){let ie=te;if(typeof c<\"u\")te=c+te;else if(n!==!1){let me=typeof n==\"string\"?n:f.range;te=Y1e(me,{project:r})+te}let Ae=q.makeDescriptor(R,q.makeRange({protocol:N,source:U,params:W,selector:te}));(await E.getCandidates(r.configuration.normalizeDependency(Ae),{},S)).length!==1&&(te=ie)}return q.makeDescriptor(R,q.makeRange({protocol:N,source:U,params:W,selector:te}))}async function y2t(t){return await le.mktempPromise(async e=>{let r=ze.create(e);return r.useWithSource(e,{enableMirror:!1,compressionLevel:0},e,{overwrite:!0}),await t(new Jr(e,{configuration:r,check:!1,immutable:!1}))})}var aC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.fixed=ge.Boolean(\"-F,--fixed\",!1,{description:\"Store dependency tags as-is instead of resolving them\"});this.exact=ge.Boolean(\"-E,--exact\",!1,{description:\"Don't use any semver modifier on the resolved range\"});this.tilde=ge.Boolean(\"-T,--tilde\",!1,{description:\"Use the `~` semver modifier on the resolved range\"});this.caret=ge.Boolean(\"-C,--caret\",!1,{description:\"Use the `^` semver modifier on the resolved range\"});this.dev=ge.Boolean(\"-D,--dev\",!1,{description:\"Add a package as a dev dependency\"});this.peer=ge.Boolean(\"-P,--peer\",!1,{description:\"Add a package as a peer dependency\"});this.optional=ge.Boolean(\"-O,--optional\",!1,{description:\"Add / upgrade a package to an optional regular / peer dependency\"});this.preferDev=ge.Boolean(\"--prefer-dev\",!1,{description:\"Add / upgrade a package to a dev dependency\"});this.interactive=ge.Boolean(\"-i,--interactive\",{description:\"Reuse the specified package from other workspaces in the project\"});this.cached=ge.Boolean(\"--cached\",!1,{description:\"Reuse the highest version already used somewhere within the project\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:Ao(ec)});this.silent=ge.Boolean(\"--silent\",{hidden:!0});this.packages=ge.Rest()}static{this.paths=[[\"add\"]]}static{this.usage=ot.Usage({description:\"add dependencies to the project\",details:\"\\n      This command adds a package to the package.json for the nearest workspace.\\n\\n      - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\\n\\n      - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\\n\\n      - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\\n\\n      - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\\\"peerDependenciesMeta\\\": { \\\"<package>\\\": { \\\"optional\\\": true } }`\\n\\n      - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\\n\\n      - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\\n\\n      If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\\n\\n      If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n\\n      For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/protocols.\\n    \",examples:[[\"Add a regular package to the current workspace\",\"$0 add lodash\"],[\"Add a specific version for a package to the current workspace\",\"$0 add lodash@1.2.3\"],[\"Add a package from a GitHub repository (the master branch) to the current workspace using a URL\",\"$0 add lodash@https://github.com/lodash/lodash\"],[\"Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol\",\"$0 add lodash@github:lodash/lodash\"],[\"Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)\",\"$0 add lodash@lodash/lodash\"],[\"Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)\",\"$0 add lodash-es@lodash/lodash#es\"],[\"Add a local package (gzipped tarball format) to the current workspace\",\"$0 add local-package-name@file:../path/to/local-package-name-v0.1.2.tgz\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=f||r.get(\"preferReuse\"),h=uS(this,s),E=[p?\"reuse\":void 0,\"project\",this.cached?\"cache\":void 0,\"latest\"].filter(W=>typeof W<\"u\"),C=f?1/0:1,S=W=>{let te=q.tryParseDescriptor(W.slice(4));return te?te.range===\"unknown\"?q.makeDescriptor(te,`jsr:${q.stringifyIdent(te)}@latest`):q.makeDescriptor(te,`jsr:${te.range}`):null},P=await Promise.all(this.packages.map(async W=>{let te=W.match(/^\\.{0,2}\\//)?await v5(W,{cwd:this.context.cwd,workspace:a}):W.startsWith(\"jsr:\")?S(W):q.tryParseDescriptor(W),ie=W.match(/^(https?:|git@github)/);if(ie)throw new nt(`It seems you are trying to add a package using a ${he.pretty(r,`${ie[0]}...`,he.Type.RANGE)} url; we now require package names to be explicitly specified.\nTry running the command again with the package name prefixed: ${he.pretty(r,\"yarn add\",he.Type.CODE)} ${he.pretty(r,q.makeDescriptor(q.makeIdent(null,\"my-package\"),`${ie[0]}...`),he.Type.DESCRIPTOR)}`);if(!te)throw new nt(`The ${he.pretty(r,W,he.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let Ae=E2t(a,te,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(Ae.map(async me=>{let pe=await fS(te,{project:s,workspace:a,cache:n,fixed:c,target:me,modifier:h,strategies:E,maxResults:C});return{request:te,suggestedDescriptors:pe,target:me}}))})).then(W=>W.flat()),I=await uA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async W=>{for(let{request:te,suggestedDescriptors:{suggestions:ie,rejections:Ae}}of P)if(ie.filter(me=>me.descriptor!==null).length===0){let[me]=Ae;if(typeof me>\"u\")throw new Error(\"Assertion failed: Expected an error to have been set\");s.configuration.get(\"enableNetwork\")?W.reportError(27,`${q.prettyDescriptor(r,te)} can't be resolved to a satisfying range`):W.reportError(27,`${q.prettyDescriptor(r,te)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),W.reportSeparator(),W.reportExceptionOnce(me)}});if(I.hasErrors())return I.exitCode();let R=!1,N=[],U=[];for(let{suggestedDescriptors:{suggestions:W},target:te}of P){let ie,Ae=W.filter(Be=>Be.descriptor!==null),ce=Ae[0].descriptor,me=Ae.every(Be=>q.areDescriptorsEqual(Be.descriptor,ce));Ae.length===1||me?ie=ce:(R=!0,{answer:ie}=await(0,z1e.prompt)({type:\"select\",name:\"answer\",message:\"Which range do you want to use?\",choices:W.map(({descriptor:Be,name:Ce,reason:g})=>Be?{name:Ce,hint:g,descriptor:Be}:{name:Ce,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(Be){return this.find(Be,\"descriptor\")},stdin:this.context.stdin,stdout:this.context.stdout}));let pe=a.manifest[te].get(ie.identHash);(typeof pe>\"u\"||pe.descriptorHash!==ie.descriptorHash)&&(a.manifest[te].set(ie.identHash,ie),this.optional&&(te===\"dependencies\"?a.manifest.ensureDependencyMeta({...ie,range:\"unknown\"}).optional=!0:te===\"peerDependencies\"&&(a.manifest.ensurePeerDependencyMeta({...ie,range:\"unknown\"}).optional=!0)),typeof pe>\"u\"?N.push([a,te,ie,E]):U.push([a,te,pe,ie]))}return await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyAddition,N),await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyReplacement,U),R&&this.context.stdout.write(`\n`),await s.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function E2t(t,e,{dev:r,peer:s,preferDev:a,optional:n}){let c=t.manifest.dependencies.has(e.identHash),f=t.manifest.devDependencies.has(e.identHash),p=t.manifest.peerDependencies.has(e.identHash);if((r||s)&&c)throw new nt(`Package \"${q.prettyIdent(t.project.configuration,e)}\" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!s&&p)throw new nt(`Package \"${q.prettyIdent(t.project.configuration,e)}\" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&f)throw new nt(`Package \"${q.prettyIdent(t.project.configuration,e)}\" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!s&&p)throw new nt(`Package \"${q.prettyIdent(t.project.configuration,e)}\" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new nt(`Package \"${q.prettyIdent(t.project.configuration,e)}\" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return s&&h.push(\"peerDependencies\"),(r||a)&&h.push(\"devDependencies\"),n&&h.push(\"dependencies\"),h.length>0?h:f?[\"devDependencies\"]:p?[\"peerDependencies\"]:[\"dependencies\"]}Ve();Ve();Wt();var lC=class extends ut{constructor(){super(...arguments);this.verbose=ge.Boolean(\"-v,--verbose\",!1,{description:\"Print both the binary name and the locator of the package that provides the binary\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.name=ge.String({required:!1})}static{this.paths=[[\"bin\"]]}static{this.usage=ot.Usage({description:\"get the path to a binary script\",details:`\n      When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \\`-v,--verbose\\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.\n\n      When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.\n    `,examples:[[\"List all the available binaries\",\"$0 bin\"],[\"Print the path to a specific binary\",\"$0 bin eslint\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);if(await s.restoreInstallState(),this.name){let f=(await In.getPackageAccessibleBinaries(a,{project:s})).get(this.name);if(!f)throw new nt(`Couldn't find a binary named \"${this.name}\" for package \"${q.prettyLocator(r,a)}\"`);let[,p]=f;return this.context.stdout.write(`${p}\n`),0}return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async c=>{let f=await In.getPackageAccessibleBinaries(a,{project:s}),h=Array.from(f.keys()).reduce((E,C)=>Math.max(E,C.length),0);for(let[E,[C,S]]of f)c.reportJson({name:E,source:q.stringifyIdent(C),path:S});if(this.verbose)for(let[E,[C]]of f)c.reportInfo(null,`${E.padEnd(h,\" \")}   ${q.prettyLocator(r,C)}`);else for(let E of f.keys())c.reportInfo(null,E)})).exitCode()}};Ve();bt();Wt();var cC=class extends ut{constructor(){super(...arguments);this.mirror=ge.Boolean(\"--mirror\",!1,{description:\"Remove the global cache files instead of the local cache files\"});this.all=ge.Boolean(\"--all\",!1,{description:\"Remove both the global cache files and the local cache files of the current project\"})}static{this.paths=[[\"cache\",\"clean\"],[\"cache\",\"clear\"]]}static{this.usage=ot.Usage({description:\"remove the shared cache files\",details:`\n      This command will remove all the files from the cache.\n    `,examples:[[\"Remove all the local archives\",\"$0 cache clean\"],[\"Remove all the archives stored in the ~/.yarn directory\",\"$0 cache clean --mirror\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(!r.get(\"enableCacheClean\"))throw new nt(\"Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.\");let s=await Jr.find(r);return(await Ot.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&s.mirrorCwd!==null,c=!this.mirror;n&&(await le.removePromise(s.mirrorCwd),await r.triggerHook(f=>f.cleanGlobalArtifacts,r)),c&&await le.removePromise(s.cwd)})).exitCode()}};Ve();Wt();var X1e=et(AS()),D5=ye(\"util\"),uC=class extends ut{constructor(){super(...arguments);this.why=ge.Boolean(\"--why\",!1,{description:\"Print the explanation for why a setting has its value\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.unsafe=ge.Boolean(\"--no-redacted\",!1,{description:\"Don't redact secrets (such as tokens) from the output\"});this.name=ge.String()}static{this.paths=[[\"config\",\"get\"]]}static{this.usage=ot.Usage({description:\"read a configuration settings\",details:`\n      This command will print a configuration setting.\n\n      Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \\`--no-redacted\\` to get the untransformed value.\n    `,examples:[[\"Print a simple configuration setting\",\"yarn config get yarnPath\"],[\"Print a complex configuration setting\",\"yarn config get packageExtensions\"],[\"Print a nested field from the configuration\",`yarn config get 'npmScopes[\"my-company\"].npmRegistryServer'`],[\"Print a token from the configuration\",\"yarn config get npmAuthToken --no-redacted\"],[\"Print a configuration setting as JSON\",\"yarn config get packageExtensions --json\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=this.name.replace(/[.[].*$/,\"\"),a=this.name.replace(/^[^.[]*/,\"\");if(typeof r.settings.get(s)>\"u\")throw new nt(`Couldn't find a configuration settings named \"${s}\"`);let c=r.getSpecial(s,{hideSecrets:!this.unsafe,getNativePaths:!0}),f=je.convertMapsToIndexableObjects(c),p=a?(0,X1e.default)(f,a):f,h=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p==\"string\")return this.context.stdout.write(`${p}\n`),h.exitCode();D5.inspect.styles.name=\"cyan\",this.context.stdout.write(`${(0,D5.inspect)(p,{depth:1/0,colors:r.get(\"enableColors\"),compact:!1})}\n`)}return h.exitCode()}};Ve();Wt();var j2e=et(k5()),q2e=et(AS()),G2e=et(Q5()),T5=ye(\"util\"),fC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Set complex configuration settings to JSON values\"});this.home=ge.Boolean(\"-H,--home\",!1,{description:\"Update the home configuration instead of the project configuration\"});this.name=ge.String();this.value=ge.String()}static{this.paths=[[\"config\",\"set\"]]}static{this.usage=ot.Usage({description:\"change a configuration settings\",details:`\n      This command will set a configuration setting.\n\n      When used without the \\`--json\\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).\n\n      When used with the \\`--json\\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.\n    `,examples:[[\"Set a simple configuration setting (a string, a number, or a boolean)\",\"yarn config set initScope myScope\"],[\"Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag\",'yarn config set initScope --json \\\\\"myScope\\\\\"'],[\"Set a complex configuration setting (an Array) using the `--json` flag\",`yarn config set unsafeHttpWhitelist --json '[\"*.example.com\", \"example.com\"]'`],[\"Set a complex configuration setting (an Object) using the `--json` flag\",`yarn config set packageExtensions --json '{ \"@babel/parser@*\": { \"dependencies\": { \"@babel/types\": \"*\" } } }'`],[\"Set a nested configuration setting\",'yarn config set npmScopes.company.npmRegistryServer \"https://npm.example.com\"'],[\"Set a nested configuration setting using indexed access for non-simple keys\",`yarn config set 'npmRegistries[\"//npm.example.com\"].npmAuthToken' \"ffffffff-ffff-ffff-ffff-ffffffffffff\"`]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt(\"This command must be run from within a project folder\");return r.projectCwd},a=this.name.replace(/[.[].*$/,\"\"),n=this.name.replace(/^[^.[]*\\.?/,\"\");if(typeof r.settings.get(a)>\"u\")throw new nt(`Couldn't find a configuration settings named \"${a}\"`);if(a===\"enableStrictSettings\")throw new nt(\"This setting only affects the file it's in, and thus cannot be set from the CLI\");let f=this.json?JSON.parse(this.value):this.value;await(this.home?I=>ze.updateHomeConfiguration(I):I=>ze.updateConfiguration(s(),I))(I=>{if(n){let R=(0,j2e.default)(I);return(0,G2e.default)(R,this.name,f),R}else return{...I,[a]:f}});let E=(await ze.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),C=je.convertMapsToIndexableObjects(E),S=n?(0,q2e.default)(C,n):C;return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async I=>{T5.inspect.styles.name=\"cyan\",I.reportInfo(0,`Successfully set ${this.name} to ${(0,T5.inspect)(S,{depth:1/0,colors:r.get(\"enableColors\"),compact:!1})}`)})).exitCode()}};Ve();Wt();var tBe=et(k5()),rBe=et(K2e()),nBe=et(F5()),AC=class extends ut{constructor(){super(...arguments);this.home=ge.Boolean(\"-H,--home\",!1,{description:\"Update the home configuration instead of the project configuration\"});this.name=ge.String()}static{this.paths=[[\"config\",\"unset\"]]}static{this.usage=ot.Usage({description:\"unset a configuration setting\",details:`\n      This command will unset a configuration setting.\n    `,examples:[[\"Unset a simple configuration setting\",\"yarn config unset initScope\"],[\"Unset a complex configuration setting\",\"yarn config unset packageExtensions\"],[\"Unset a nested configuration setting\",\"yarn config unset npmScopes.company.npmRegistryServer\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt(\"This command must be run from within a project folder\");return r.projectCwd},a=this.name.replace(/[.[].*$/,\"\"),n=this.name.replace(/^[^.[]*\\.?/,\"\");if(typeof r.settings.get(a)>\"u\")throw new nt(`Couldn't find a configuration settings named \"${a}\"`);let f=this.home?h=>ze.updateHomeConfiguration(h):h=>ze.updateConfiguration(s(),h);return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await f(C=>{if(!(0,rBe.default)(C,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,C;let S=n?(0,tBe.default)(C):{...C};return(0,nBe.default)(S,this.name),S}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Ve();bt();Wt();var sF=ye(\"util\"),pC=class extends ut{constructor(){super(...arguments);this.noDefaults=ge.Boolean(\"--no-defaults\",!1,{description:\"Omit the default values from the display\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.verbose=ge.Boolean(\"-v,--verbose\",{hidden:!0});this.why=ge.Boolean(\"--why\",{hidden:!0});this.names=ge.Rest()}static{this.paths=[[\"config\"]]}static{this.usage=ot.Usage({description:\"display the current configuration\",details:`\n      This command prints the current active configuration settings.\n    `,examples:[[\"Print the active configuration settings\",\"$0 config\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins,{strict:!1}),s=await DI({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:\"The --verbose option is deprecated, the settings' descriptions are now always displayed\"},{option:this.why,message:\"The --why option is deprecated, the settings' sources are now always displayed\"}]);if(s!==null)return s;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async f=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)f.reportError(34,`Invalid configuration key \"${p}\" in ${h}`);f.reportSeparator()}if(this.json)for(let p of a){if(this.noDefaults&&!r.sources.has(p))continue;let h=r.settings.get(p);typeof h>\"u\"&&f.reportError(34,`No configuration key named \"${p}\"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),C=r.sources.get(p)??\"<default>\",S=C&&C[0]!==\"<\"?ue.fromPortablePath(C):C;f.reportJson({key:p,effective:E,source:S,...h})}else{let p={breakLength:1/0,colors:r.get(\"enableColors\"),maxArrayLength:2},h={},E={children:h};for(let C of a){if(this.noDefaults&&!r.sources.has(C))continue;let S=r.settings.get(C),P=r.sources.get(C)??\"<default>\",I=r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),R={Description:{label:\"Description\",value:he.tuple(he.Type.MARKDOWN,{text:S.description,format:this.cli.format(),paragraphs:!1})},Source:{label:\"Source\",value:he.tuple(P[0]===\"<\"?he.Type.CODE:he.Type.PATH,P)}};h[C]={value:he.tuple(he.Type.CODE,C),children:R};let N=(U,W)=>{for(let[te,ie]of W)if(ie instanceof Map){let Ae={};U[te]={children:Ae},N(Ae,ie)}else U[te]={label:te,value:he.tuple(he.Type.NO_HINT,(0,sF.inspect)(ie,p))}};I instanceof Map?N(R,I):R.Value={label:\"Value\",value:he.tuple(he.Type.NO_HINT,(0,sF.inspect)(I,p))}}a.length!==1&&(n=void 0),ks.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<\"u\"){let f=a[0],p=(0,sF.inspect)(r.getSpecial(f,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get(\"enableColors\")});this.context.stdout.write(`\n`),this.context.stdout.write(`${p}\n`)}return c.exitCode()}};Ve();Wt();Ul();var oF={};Vt(oF,{Strategy:()=>pS,acceptedStrategies:()=>tSt,dedupe:()=>N5});Ve();Ve();var iBe=et(Sa()),pS=(e=>(e.HIGHEST=\"highest\",e))(pS||{}),tSt=new Set(Object.values(pS)),rSt={highest:async(t,e,{resolver:r,fetcher:s,resolveOptions:a,fetchOptions:n})=>{let c=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>\"u\")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);je.getSetWithDefault(c,E.identHash).add(h)}let f=new Map(je.mapAndFilter(t.storedDescriptors.values(),p=>q.isVirtualDescriptor(p)?je.mapAndFilter.skip:[p.descriptorHash,je.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=f.get(p.descriptorHash);if(typeof h>\"u\")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>\"u\")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let C=t.originalPackages.get(E);if(typeof C>\"u\")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let S=r.getResolutionDependencies(p,a),P=Object.fromEntries(await je.allSettledSafe(Object.entries(S).map(async([te,ie])=>{let Ae=f.get(ie.descriptorHash);if(typeof Ae>\"u\")throw new Error(`Assertion failed: The descriptor (${ie.descriptorHash}) should have been registered`);let ce=await Ae.promise;if(!ce)throw new Error(\"Assertion failed: Expected the dependency to have been through the dedupe process itself\");return[te,ce.updatedPackage]})));if(e.length&&!iBe.default.isMatch(q.stringifyIdent(p),e)||!r.shouldPersistResolution(C,a))return C;let I=c.get(p.identHash);if(typeof I>\"u\")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(I.size===1)return C;let R=[...I].map(te=>{let ie=t.originalPackages.get(te);if(typeof ie>\"u\")throw new Error(`Assertion failed: The package (${te}) should have been registered`);return ie}),N=await r.getSatisfying(p,P,R,a),U=N.locators?.[0];if(typeof U>\"u\"||!N.sorted)return C;let W=t.originalPackages.get(U.locatorHash);if(typeof W>\"u\")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return W}).then(async S=>{let P=await t.preparePackage(S,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:C,updatedPackage:S,resolvedPackage:P})}).catch(S=>{h.reject(S)})}return[...f.values()].map(p=>p.promise)}};async function N5(t,{strategy:e,patterns:r,cache:s,report:a}){let{configuration:n}=t,c=new Wi,f=n.makeResolver(),p=n.makeFetcher(),h={cache:s,checksums:t.storedChecksums,fetcher:p,project:t,report:c,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:f,report:c,fetchOptions:h};return await a.startTimerPromise(\"Deduplication step\",async()=>{let C=rSt[e],S=await C(t,r,{resolver:f,resolveOptions:E,fetcher:p,fetchOptions:h}),P=ho.progressViaCounter(S.length);await a.reportProgress(P);let I=0;await Promise.all(S.map(U=>U.then(W=>{if(W===null||W.currentPackage.locatorHash===W.updatedPackage.locatorHash)return;I++;let{descriptor:te,currentPackage:ie,updatedPackage:Ae}=W;a.reportInfo(0,`${q.prettyDescriptor(n,te)} can be deduped from ${q.prettyLocator(n,ie)} to ${q.prettyLocator(n,Ae)}`),a.reportJson({descriptor:q.stringifyDescriptor(te),currentResolution:q.stringifyLocator(ie),updatedResolution:q.stringifyLocator(Ae)}),t.storedResolutions.set(te.descriptorHash,Ae.locatorHash)}).finally(()=>P.tick())));let R;switch(I){case 0:R=\"No packages\";break;case 1:R=\"One package\";break;default:R=`${I} packages`}let N=he.pretty(n,e,he.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${N} strategy`),I})}var hC=class extends ut{constructor(){super(...arguments);this.strategy=ge.String(\"-s,--strategy\",\"highest\",{description:\"The strategy to use when deduping dependencies\",validator:Ao(pS)});this.check=ge.Boolean(\"-c,--check\",!1,{description:\"Exit with exit code 1 when duplicates are found, without persisting the dependency tree\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:Ao(ec)});this.patterns=ge.Rest()}static{this.paths=[[\"dedupe\"]]}static{this.usage=ot.Usage({description:\"deduplicate dependencies with overlapping ranges\",details:\"\\n      Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\\n\\n      This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\\n\\n      - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\\n\\n      **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\\n\\n      If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n\\n      This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\\n\\n      ### In-depth explanation:\\n\\n      Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\\n\\n      **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\\n\\n      Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\\n\\n      **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\\n    \",examples:[[\"Dedupe all packages\",\"$0 dedupe\"],[\"Dedupe all packages using a specific strategy\",\"$0 dedupe --strategy highest\"],[\"Dedupe a specific package\",\"$0 dedupe lodash\"],[\"Dedupe all packages with the `@babel/*` scope\",\"$0 dedupe '@babel/*'\"],[\"Check for duplicates (can be used as a CI step)\",\"$0 dedupe --check\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=await Jr.find(r);await s.restoreInstallState({restoreResolutions:!1});let n=0,c=await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout,json:this.json},async f=>{n=await N5(s,{strategy:this.strategy,patterns:this.patterns,cache:a,report:f})});return c.hasErrors()?c.exitCode():this.check?n?1:0:await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:a,mode:this.mode})}};Ve();Wt();var gC=class extends ut{static{this.paths=[[\"--clipanion=definitions\"]]}async execute(){let{plugins:e}=await ze.find(this.context.cwd,this.context.plugins),r=[];for(let c of e){let{commands:f}=c[1];if(f){let h=wa.from(f).definitions();r.push([c[0],h])}}let s=this.cli.definitions(),a=(c,f)=>c.split(\" \").slice(1).join()===f.split(\" \").slice(1).join(),n=sBe()[\"@yarnpkg/builder\"].bundles.standard;for(let c of r){let f=c[1];for(let p of f)s.find(h=>a(h.path,p.path)).plugin={name:c[0],isDefault:n.includes(c[0])}}this.context.stdout.write(`${JSON.stringify(s,null,2)}\n`)}};var dC=class extends ut{static{this.paths=[[\"help\"],[\"--help\"],[\"-h\"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};Ve();bt();Wt();var mC=class extends ut{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\\\/]/)&&!q.tryParseIdent(this.leadingArgument)){let r=K.resolve(this.context.cwd,ue.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run([\"run\",this.leadingArgument,...this.args])}};Ve();var yC=class extends ut{static{this.paths=[[\"-v\"],[\"--version\"]]}async execute(){this.context.stdout.write(`${un||\"<unknown>\"}\n`)}};Ve();Ve();Wt();var EC=class extends ut{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"exec\"]]}static{this.usage=ot.Usage({description:\"execute a shell script\",details:`\n      This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.\n\n      It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n    `,examples:[[\"Execute a single shell command\",\"$0 exec echo Hello World\"],[\"Execute a shell script\",'$0 exec \"tsc & babel src --out-dir lib\"']]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState(),await In.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:s})}};Ve();Wt();Ul();var IC=class extends ut{constructor(){super(...arguments);this.hash=ge.String({required:!1,validator:Jx(wE(),[tB(/^p[0-9a-f]{5}$/)])})}static{this.paths=[[\"explain\",\"peer-requirements\"]]}static{this.usage=ot.Usage({description:\"explain a set of peer requirements\",details:`\n      A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters.\n\n      When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not.\n\n      When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.\n\n      **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\\`yarn explain peer-requirements\\`).\n    `,examples:[[\"Explain the corresponding peer requirement for a hash\",\"$0 explain peer-requirements p1a4ed\"],[\"List all peer requirements\",\"$0 explain peer-requirements\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState({restoreResolutions:!1}),await s.applyLightResolution(),typeof this.hash<\"u\"?await iSt(this.hash,s,{stdout:this.context.stdout}):await sSt(s,{stdout:this.context.stdout})}};async function iSt(t,e,r){let s=e.peerRequirementNodes.get(t);if(typeof s>\"u\")throw new Error(`No peerDependency requirements found for hash: \"${t}\"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:he.tuple(he.Type.NO_HINT,\"...\")}]:[]}:(a.add(p.requester.locatorHash),{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[q.stringifyLocator(h.requester),n(h)]))}),c=e.peerWarnings.find(p=>p.hash===t);return(await Ot.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=he.mark(e.configuration),E=c?h.Cross:h.Check;if(p.reportInfo(0,`Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} is requested to provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,he.pretty(e.configuration,s.subject,he.Type.LOCATOR)),ks.emitTree({children:Object.fromEntries(Array.from(s.requests.values(),C=>[q.stringifyLocator(C.requester),n(C)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),s.provided.range===\"missing:\"){let C=c?\"\":\" , but all peer requests are optional\";p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} does not provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)}${C}.`)}else{let C=e.storedResolutions.get(s.provided.descriptorHash);if(!C)throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let S=e.storedPackages.get(C);if(!S)throw new Error(\"Assertion failed: Expected the package to be registered\");p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} provides ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} with version ${q.prettyReference(e.configuration,S.version??\"0.0.0\")}, ${c?\"which does not satisfy all requests.\":\"which satisfies all requests\"}`),c?.type===3&&(c.range?p.reportInfo(0,`  The combined requested range is ${he.pretty(e.configuration,c.range,he.Type.RANGE)}`):p.reportInfo(0,\"  Unfortunately, the requested ranges have no overlap\"))}})).exitCode()}async function sSt(t,e){return(await Ot.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async s=>{let a=he.mark(t.configuration),n=je.sortMap(t.peerRequirementNodes,[([,c])=>q.stringifyLocator(c.subject),([,c])=>q.stringifyIdent(c.ident)]);for(let[,c]of n.values()){if(!c.root)continue;let f=t.peerWarnings.find(E=>E.hash===c.hash),p=[...q.allPeerRequests(c)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=\" and 1 other dependency\":h=\"\",c.provided.range!==\"missing:\"){let E=t.storedResolutions.get(c.provided.descriptorHash);if(!E)throw new Error(\"Assertion failed: Expected the resolution to have been registered\");let C=t.storedPackages.get(E);if(!C)throw new Error(\"Assertion failed: Expected the provided package to have been registered\");let S=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \\u2192 ${f?a.Cross:a.Check} ${q.prettyLocator(t.configuration,c.subject)} provides ${q.prettyLocator(t.configuration,C)} to ${q.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,S):s.reportInfo(0,S)}else{let E=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \\u2192 ${f?a.Cross:a.Check} ${q.prettyLocator(t.configuration,c.subject)} doesn't provide ${q.prettyIdent(t.configuration,c.ident)} to ${q.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,E):s.reportInfo(0,E)}}})).exitCode()}Ve();Wt();Ul();Ve();Ve();bt();Wt();var oBe=et(fi()),CC=class extends ut{constructor(){super(...arguments);this.useYarnPath=ge.Boolean(\"--yarn-path\",{description:\"Set the yarnPath setting even if the version can be accessed by Corepack\"});this.onlyIfNeeded=ge.Boolean(\"--only-if-needed\",!1,{description:\"Only lock the Yarn version if it isn't already locked\"});this.version=ge.String()}static{this.paths=[[\"set\",\"version\"]]}static{this.usage=ot.Usage({description:\"lock the Yarn version used by the project\",details:\"\\n      This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\\n\\n      By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set the `--yarn-path` command line flag, then the release will also be downloaded from the Yarn GitHub repository, stored inside your project, and referenced via the `yarnPath` settings from your project `.yarnrc.yml` file.\\n\\n      A very good use case for this command is to enforce the version of Yarn used by any single member of your team inside the same project - by doing this you ensure that you have control over Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting different behavior.\\n\\n      The version specifier can be:\\n\\n      - a tag:\\n        - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\\n        - `canary` -> the most recent canary (release candidate) berry (`>=2.0.0`) release\\n        - `classic` -> the most recent classic (`^0.x || ^1.x`) release\\n\\n      - a semver range (e.g. `2.x`) -> the most recent version satisfying the range (limited to berry releases)\\n\\n      - a semver version (e.g. `2.4.1`, `1.22.1`)\\n\\n      - a local file referenced through either a relative or absolute path\\n\\n      - `self` -> the version used to invoke the command\\n    \",examples:[[\"Download the latest release from the Yarn repository\",\"$0 set version latest\"],[\"Download the latest canary release from the Yarn repository\",\"$0 set version canary\"],[\"Download the latest classic release from the Yarn repository\",\"$0 set version classic\"],[\"Download the most recent Yarn 3 build\",\"$0 set version 3.x\"],[\"Download a specific Yarn 2 build\",\"$0 set version 2.0.0-rc.30\"],[\"Switch back to a specific Yarn 1 release\",\"$0 set version 1.22.1\"],[\"Use a release from the local filesystem\",\"$0 set version ./yarn.cjs\"],[\"Use a release from a URL\",\"$0 set version https://repo.yarnpkg.com/3.1.0/packages/yarnpkg-cli/bin/yarn.js\"],[\"Download the version used to invoke the command\",\"$0 set version self\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get(\"yarnPath\")){let f=r.sources.get(\"yarnPath\");if(!f)throw new Error(\"Assertion failed: Expected 'yarnPath' to have a source\");let p=r.projectCwd??r.startingCwd;if(K.contains(p,f))return 0}let s=()=>{if(typeof un>\"u\")throw new nt(\"The --install flag can only be used without explicit version specifier from the Yarn CLI\");return`file://${process.argv[1]}`},a,n=(f,p)=>({version:p,url:f.replace(/\\{\\}/g,p)});if(this.version===\"self\")a={url:s(),version:un??\"self\"};else if(this.version===\"latest\"||this.version===\"berry\"||this.version===\"stable\")a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",await hS(r,\"stable\"));else if(this.version===\"canary\")a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",await hS(r,\"canary\"));else if(this.version===\"classic\")a={url:\"https://classic.yarnpkg.com/latest.js\",version:\"classic\"};else if(this.version.match(/^https?:/))a={url:this.version,version:\"remote\"};else if(this.version.match(/^\\.{0,2}[\\\\/]/)||ue.isAbsolute(this.version))a={url:`file://${K.resolve(ue.toPortablePath(this.version))}`,version:\"file\"};else if(Or.satisfiesWithPrereleases(this.version,\">=2.0.0\"))a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",this.version);else if(Or.satisfiesWithPrereleases(this.version,\"^0.x || ^1.x\"))a=n(\"https://github.com/yarnpkg/yarn/releases/download/v{}/yarn-{}.js\",this.version);else if(Or.validRange(this.version))a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",await oSt(r,this.version));else throw new nt(`Invalid version descriptor \"${this.version}\"`);return(await Ot.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async f=>{let p=async()=>{let h=\"file://\";return a.url.startsWith(h)?(f.reportInfo(0,`Retrieving ${he.pretty(r,a.url,he.Type.PATH)}`),await le.readFilePromise(a.url.slice(h.length))):(f.reportInfo(0,`Downloading ${he.pretty(r,a.url,he.Type.URL)}`),await An.get(a.url,{configuration:r}))};await O5(r,a.version,p,{report:f,useYarnPath:this.useYarnPath})})).exitCode()}};async function oSt(t,e){let s=(await An.get(\"https://repo.yarnpkg.com/tags\",{configuration:t,jsonResponse:!0})).tags.filter(a=>Or.satisfiesWithPrereleases(a,e));if(s.length===0)throw new nt(`No matching release found for range ${he.pretty(t,e,he.Type.RANGE)}.`);return s[0]}async function hS(t,e){let r=await An.get(\"https://repo.yarnpkg.com/tags\",{configuration:t,jsonResponse:!0});if(!r.latest[e])throw new nt(`Tag ${he.pretty(t,e,he.Type.RANGE)} not found`);return r.latest[e]}async function O5(t,e,r,{report:s,useYarnPath:a}){let n,c=async()=>(typeof n>\"u\"&&(n=await r()),n);if(e===null){let te=await c();await le.mktempPromise(async ie=>{let Ae=K.join(ie,\"yarn.cjs\");await le.writeFilePromise(Ae,te);let{stdout:ce}=await Gr.execvp(process.execPath,[ue.fromPortablePath(Ae),\"--version\"],{cwd:ie,env:{...t.env,YARN_IGNORE_PATH:\"1\"}});if(e=ce.trim(),!oBe.default.valid(e))throw new Error(`Invalid semver version. ${he.pretty(t,\"yarn --version\",he.Type.CODE)} returned:\n${e}`)})}let f=t.projectCwd??t.startingCwd,p=K.resolve(f,\".yarn/releases\"),h=K.resolve(p,`yarn-${e}.cjs`),E=K.relative(t.startingCwd,h),C=je.isTaggedYarnVersion(e),S=t.get(\"yarnPath\"),P=!C,I=P||!!S||!!a;if(a===!1){if(P)throw new Yt(0,\"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack\");I=!1}else!I&&!process.env.COREPACK_ROOT&&(s.reportWarning(0,`You don't seem to have ${he.applyHyperlink(t,\"Corepack\",\"https://nodejs.org/api/corepack.html\")} enabled; we'll have to rely on ${he.applyHyperlink(t,\"yarnPath\",\"https://yarnpkg.com/configuration/yarnrc#yarnPath\")} instead`),I=!0);if(I){let te=await c();s.reportInfo(0,`Saving the new release in ${he.pretty(t,E,\"magenta\")}`),await le.removePromise(K.dirname(h)),await le.mkdirPromise(K.dirname(h),{recursive:!0}),await le.writeFilePromise(h,te,{mode:493}),await ze.updateConfiguration(f,{yarnPath:K.relative(f,h)})}else await le.removePromise(K.dirname(h)),await ze.updateConfiguration(f,{yarnPath:ze.deleteProperty});let R=await Ht.tryFind(f)||new Ht;R.packageManager=`yarn@${C?e:await hS(t,\"stable\")}`;let N={};R.exportTo(N);let U=K.join(f,Ht.fileName),W=`${JSON.stringify(N,null,R.indent)}\n`;return await le.changeFilePromise(U,W,{automaticNewlines:!0}),{bundleVersion:e}}function aBe(t){return Dr[rk(t)]}var aSt=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\\n\\n(?<details>(?:.(?!##))+)/gs;async function lSt(t){let r=`https://repo.yarnpkg.com/${je.isTaggedYarnVersion(un)?un:await hS(t,\"canary\")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,s=await An.get(r,{configuration:t});return new Map(Array.from(s.toString().matchAll(aSt),({groups:a})=>{if(!a)throw new Error(\"Assertion failed: Expected the match to have been successful\");let n=aBe(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected \"${a.name}\" to be named \"${n}\"`);return[a.code,a.details]}))}var wC=class extends ut{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:rB(wE(),[tB(/^YN[0-9]{4}$/)])});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"explain\"]]}static{this.usage=ot.Usage({description:\"explain an error code\",details:`\n      When the code argument is specified, this command prints its name and its details.\n\n      When used without arguments, this command lists all error codes and their names.\n    `,examples:[[\"Explain an error code\",\"$0 explain YN0006\"],[\"List all error codes\",\"$0 explain\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(typeof this.code<\"u\"){let s=aBe(this.code),a=he.pretty(r,s,he.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),f=(await lSt(r)).get(this.code),p=typeof f<\"u\"?he.jsonOrPretty(this.json,r,he.tuple(he.Type.MARKDOWN,{text:f,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.\n\nYou can help us by editing this page on GitHub \\u{1F642}:\n${he.jsonOrPretty(this.json,r,he.tuple(he.Type.URL,\"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx\"))}\n`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:s,details:p})}\n`):this.context.stdout.write(`${n}\n\n${p}\n`)}else{let s={children:je.mapAndFilter(Object.entries(Dr),([a,n])=>Number.isNaN(Number(a))?je.mapAndFilter.skip:{label:Vf(Number(a)),value:he.tuple(he.Type.CODE,n)})};ks.emitTree(s,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Ve();bt();Wt();var lBe=et(Sa()),BC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Print versions of a package from the whole project\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Print information for all packages, including transitive dependencies\"});this.extra=ge.Array(\"-X,--extra\",[],{description:\"An array of requests of extra data provided by plugins\"});this.cache=ge.Boolean(\"--cache\",!1,{description:\"Print information about the cache entry of a package (path, size, checksum)\"});this.dependents=ge.Boolean(\"--dependents\",!1,{description:\"Print all dependents for each matching package\"});this.manifest=ge.Boolean(\"--manifest\",!1,{description:\"Print data obtained by looking at the package archive (license, homepage, ...)\"});this.nameOnly=ge.Boolean(\"--name-only\",!1,{description:\"Only print the name for the matching packages\"});this.virtuals=ge.Boolean(\"--virtuals\",!1,{description:\"Print each instance of the virtual packages\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.patterns=ge.Rest()}static{this.paths=[[\"info\"]]}static{this.usage=ot.Usage({description:\"see information related to packages\",details:\"\\n      This command prints various information related to the specified packages, accepting glob patterns.\\n\\n      By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\\n\\n      Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\\n\\n      Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\\n    \",examples:[[\"Show information about Lodash\",\"$0 info lodash\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a&&!this.all)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=new Set(this.extra);this.cache&&c.add(\"cache\"),this.dependents&&c.add(\"dependents\"),this.manifest&&c.add(\"manifest\");let f=(ie,{recursive:Ae})=>{let ce=ie.anchoredLocator.locatorHash,me=new Map,pe=[ce];for(;pe.length>0;){let Be=pe.shift();if(me.has(Be))continue;let Ce=s.storedPackages.get(Be);if(typeof Ce>\"u\")throw new Error(\"Assertion failed: Expected the package to be registered\");if(me.set(Be,Ce),q.isVirtualLocator(Ce)&&pe.push(q.devirtualizeLocator(Ce).locatorHash),!(!Ae&&Be!==ce))for(let g of Ce.dependencies.values()){let we=s.storedResolutions.get(g.descriptorHash);if(typeof we>\"u\")throw new Error(\"Assertion failed: Expected the resolution to be registered\");pe.push(we)}}return me.values()},p=({recursive:ie})=>{let Ae=new Map;for(let ce of s.workspaces)for(let me of f(ce,{recursive:ie}))Ae.set(me.locatorHash,me);return Ae.values()},h=({all:ie,recursive:Ae})=>ie&&Ae?s.storedPackages.values():ie?p({recursive:Ae}):f(a,{recursive:Ae}),E=({all:ie,recursive:Ae})=>{let ce=h({all:ie,recursive:Ae}),me=this.patterns.map(Ce=>{let g=q.parseLocator(Ce),we=lBe.default.makeRe(q.stringifyIdent(g)),Ee=q.isVirtualLocator(g),fe=Ee?q.devirtualizeLocator(g):g;return se=>{let X=q.stringifyIdent(se);if(!we.test(X))return!1;if(g.reference===\"unknown\")return!0;let De=q.isVirtualLocator(se),Re=De?q.devirtualizeLocator(se):se;return!(Ee&&De&&g.reference!==se.reference||fe.reference!==Re.reference)}}),pe=je.sortMap([...ce],Ce=>q.stringifyLocator(Ce));return{selection:pe.filter(Ce=>me.length===0||me.some(g=>g(Ce))),sortedLookup:pe}},{selection:C,sortedLookup:S}=E({all:this.all,recursive:this.recursive});if(C.length===0)throw new nt(\"No package matched your request\");let P=new Map;if(this.dependents)for(let ie of S)for(let Ae of ie.dependencies.values()){let ce=s.storedResolutions.get(Ae.descriptorHash);if(typeof ce>\"u\")throw new Error(\"Assertion failed: Expected the resolution to be registered\");je.getArrayWithDefault(P,ce).push(ie)}let I=new Map;for(let ie of S){if(!q.isVirtualLocator(ie))continue;let Ae=q.devirtualizeLocator(ie);je.getArrayWithDefault(I,Ae.locatorHash).push(ie)}let R={},N={children:R},U=r.makeFetcher(),W={project:s,fetcher:U,cache:n,checksums:s.storedChecksums,report:new Wi,cacheOptions:{skipIntegrityCheck:!0}},te=[async(ie,Ae,ce)=>{if(!Ae.has(\"manifest\"))return;let me=await U.fetch(ie,W),pe;try{pe=await Ht.find(me.prefixPath,{baseFs:me.packageFs})}finally{me.releaseFs?.()}ce(\"Manifest\",{License:he.tuple(he.Type.NO_HINT,pe.license),Homepage:he.tuple(he.Type.URL,pe.raw.homepage??null)})},async(ie,Ae,ce)=>{if(!Ae.has(\"cache\"))return;let me=s.storedChecksums.get(ie.locatorHash)??null,pe=n.getLocatorPath(ie,me),Be;if(pe!==null)try{Be=await le.statPromise(pe)}catch{}let Ce=typeof Be<\"u\"?[Be.size,he.Type.SIZE]:void 0;ce(\"Cache\",{Checksum:he.tuple(he.Type.NO_HINT,me),Path:he.tuple(he.Type.PATH,pe),Size:Ce})}];for(let ie of C){let Ae=q.isVirtualLocator(ie);if(!this.virtuals&&Ae)continue;let ce={},me={value:[ie,he.Type.LOCATOR],children:ce};if(R[q.stringifyLocator(ie)]=me,this.nameOnly){delete me.children;continue}let pe=I.get(ie.locatorHash);typeof pe<\"u\"&&(ce.Instances={label:\"Instances\",value:he.tuple(he.Type.NUMBER,pe.length)}),ce.Version={label:\"Version\",value:he.tuple(he.Type.NO_HINT,ie.version)};let Be=(g,we)=>{let Ee={};if(ce[g]=Ee,Array.isArray(we))Ee.children=we.map(fe=>({value:fe}));else{let fe={};Ee.children=fe;for(let[se,X]of Object.entries(we))typeof X>\"u\"||(fe[se]={label:se,value:X})}};if(!Ae){for(let g of te)await g(ie,c,Be);await r.triggerHook(g=>g.fetchPackageInfo,ie,c,Be)}ie.bin.size>0&&!Ae&&Be(\"Exported Binaries\",[...ie.bin.keys()].map(g=>he.tuple(he.Type.PATH,g)));let Ce=P.get(ie.locatorHash);typeof Ce<\"u\"&&Ce.length>0&&Be(\"Dependents\",Ce.map(g=>he.tuple(he.Type.LOCATOR,g))),ie.dependencies.size>0&&!Ae&&Be(\"Dependencies\",[...ie.dependencies.values()].map(g=>{let we=s.storedResolutions.get(g.descriptorHash),Ee=typeof we<\"u\"?s.storedPackages.get(we)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:Ee})})),ie.peerDependencies.size>0&&Ae&&Be(\"Peer dependencies\",[...ie.peerDependencies.values()].map(g=>{let we=ie.dependencies.get(g.identHash),Ee=typeof we<\"u\"?s.storedResolutions.get(we.descriptorHash)??null:null,fe=Ee!==null?s.storedPackages.get(Ee)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:fe})}))}ks.emitTree(N,{configuration:r,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};Ve();bt();Bc();var aF=et(Nd());Wt();var L5=et(fi());Ul();var cSt=[{selector:t=>t===-1,name:\"nodeLinker\",value:\"node-modules\"},{selector:t=>t!==-1&&t<8,name:\"enableGlobalCache\",value:!1},{selector:t=>t!==-1&&t<8,name:\"compressionLevel\",value:\"mixed\"}],vC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.immutable=ge.Boolean(\"--immutable\",{description:\"Abort with an error exit code if the lockfile was to be modified\"});this.immutableCache=ge.Boolean(\"--immutable-cache\",{description:\"Abort with an error exit code if the cache folder was to be modified\"});this.refreshLockfile=ge.Boolean(\"--refresh-lockfile\",{description:\"Refresh the package metadata stored in the lockfile\"});this.checkCache=ge.Boolean(\"--check-cache\",{description:\"Always refetch the packages and ensure that their checksums are consistent\"});this.checkResolutions=ge.Boolean(\"--check-resolutions\",{description:\"Validates that the package resolutions are coherent\"});this.inlineBuilds=ge.Boolean(\"--inline-builds\",{description:\"Verbosely print the output of the build steps of dependencies\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:Ao(ec)});this.cacheFolder=ge.String(\"--cache-folder\",{hidden:!0});this.frozenLockfile=ge.Boolean(\"--frozen-lockfile\",{hidden:!0});this.ignoreEngines=ge.Boolean(\"--ignore-engines\",{hidden:!0});this.nonInteractive=ge.Boolean(\"--non-interactive\",{hidden:!0});this.preferOffline=ge.Boolean(\"--prefer-offline\",{hidden:!0});this.production=ge.Boolean(\"--production\",{hidden:!0});this.registry=ge.String(\"--registry\",{hidden:!0});this.silent=ge.Boolean(\"--silent\",{hidden:!0});this.networkTimeout=ge.String(\"--network-timeout\",{hidden:!0})}static{this.paths=[[\"install\"],ot.Default]}static{this.usage=ot.Usage({description:\"install the project dependencies\",details:\"\\n      This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics:\\n\\n      - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\\n\\n      - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where the cache files are stored).\\n\\n      - **Link:** Then we send the dependency tree information to internal plugins tasked with writing them on the disk in some form (for example by generating the `.pnp.cjs` file you might know).\\n\\n      - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another. See https://yarnpkg.com/advanced/lifecycle-scripts for detail.\\n\\n      Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your `.pnp.cjs` file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\\n\\n      If the `--immutable` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePatterns` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\\n\\n      If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\\n\\n      If the `--refresh-lockfile` option is set, Yarn will keep the same resolution for the packages currently in the lockfile but will refresh their metadata. If used together with `--immutable`, it can validate that the lockfile information are consistent. This flag is enabled by default when Yarn detects it runs within a pull request context.\\n\\n      If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\\n\\n      If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n    \",examples:[[\"Install the project\",\"$0 install\"],[\"Validate a project when using Zero-Installs\",\"$0 install --immutable --immutable-cache\"],[\"Validate a project when using Zero-Installs (slightly safer if you accept external PRs)\",\"$0 install --immutable --immutable-cache --check-cache\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds<\"u\"&&r.useWithSource(\"<cli>\",{enableInlineBuilds:this.inlineBuilds},r.startingCwd,{overwrite:!0});let s=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=await DI({configuration:r,stdout:this.context.stdout},[{option:this.ignoreEngines,message:\"The --ignore-engines option is deprecated; engine checking isn't a core feature anymore\",error:!aF.default.VERCEL},{option:this.registry,message:\"The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file\"},{option:this.preferOffline,message:\"The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead\",error:!aF.default.VERCEL},{option:this.production,message:\"The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead\",error:!0},{option:this.nonInteractive,message:\"The --non-interactive option is deprecated\",error:!s},{option:this.frozenLockfile,message:\"The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead\",callback:()=>this.immutable=this.frozenLockfile},{option:this.cacheFolder,message:\"The cache-folder option has been deprecated; use rc settings instead\",error:!aF.default.NETLIFY}]);if(a!==null)return a;let n=this.mode===\"update-lockfile\";if(n&&(this.immutable||this.immutableCache))throw new nt(`${he.pretty(r,\"--immutable\",he.Type.CODE)} and ${he.pretty(r,\"--immutable-cache\",he.Type.CODE)} cannot be used with ${he.pretty(r,\"--mode=update-lockfile\",he.Type.CODE)}`);let c=(this.immutable??r.get(\"enableImmutableInstalls\"))&&!n,f=this.immutableCache&&!n;if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U=!1;await ASt(r,c)&&(N.reportInfo(48,\"Automatically removed core plugins that are now builtins \\u{1F44D}\"),U=!0),await fSt(r,c)&&(N.reportInfo(48,\"Automatically fixed merge conflicts \\u{1F44D}\"),U=!0),U&&N.reportSeparator()});if(R.hasErrors())return R.exitCode()}if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{if(ze.telemetry?.isNew)ze.telemetry.commitTips(),N.reportInfo(65,\"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry\"),N.reportInfo(65,`Run ${he.pretty(r,\"yarn config set --home enableTelemetry 0\",he.Type.CODE)} to disable`),N.reportSeparator();else if(ze.telemetry?.shouldShowTips){let U=await An.get(\"https://repo.yarnpkg.com/tags\",{configuration:r,jsonResponse:!0}).catch(()=>null);if(U!==null){let W=null;if(un!==null){let ie=L5.default.prerelease(un)?\"canary\":\"stable\",Ae=U.latest[ie];L5.default.gt(Ae,un)&&(W=[ie,Ae])}if(W)ze.telemetry.commitTips(),N.reportInfo(88,`${he.applyStyle(r,`A new ${W[0]} version of Yarn is available:`,he.Style.BOLD)} ${q.prettyReference(r,W[1])}!`),N.reportInfo(88,`Upgrade now by running ${he.pretty(r,`yarn set version ${W[1]}`,he.Type.CODE)}`),N.reportSeparator();else{let te=ze.telemetry.selectTip(U.tips);te&&(N.reportInfo(89,he.pretty(r,te.message,he.Type.MARKDOWN_INLINE)),te.url&&N.reportInfo(89,`Learn more at ${te.url}`),N.reportSeparator())}}}});if(R.hasErrors())return R.exitCode()}let{project:p,workspace:h}=await Tt.find(r,this.context.cwd),E=p.lockfileLastVersion;if(E!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U={};for(let W of cSt)W.selector(E)&&typeof r.sources.get(W.name)>\"u\"&&(r.use(\"<compat>\",{[W.name]:W.value},p.cwd,{overwrite:!0}),U[W.name]=W.value);Object.keys(U).length>0&&(await ze.updateConfiguration(p.cwd,U),N.reportInfo(87,\"Migrated your project to the latest Yarn version \\u{1F680}\"),N.reportSeparator())});if(R.hasErrors())return R.exitCode()}let C=await Jr.find(r,{immutable:f,check:this.checkCache});if(!h)throw new ar(p.cwd,this.context.cwd);await p.restoreInstallState({restoreResolutions:!1});let S=r.get(\"enableHardenedMode\");S&&typeof r.sources.get(\"enableHardenedMode\")>\"u\"&&await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{R.reportWarning(0,\"Yarn detected that the current workflow is executed from a public pull request. For safety the hardened mode has been enabled.\"),R.reportWarning(0,`It will prevent malicious lockfile manipulations, in exchange for a slower install time. You can opt-out if necessary; check our ${he.applyHyperlink(r,\"documentation\",\"https://yarnpkg.com/features/security#hardened-mode\")} for more details.`),R.reportSeparator()}),(this.refreshLockfile??S)&&(p.lockfileNeedsRefresh=!0);let P=this.checkResolutions??S;return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,forceSectionAlignment:!0,includeLogs:!0,includeVersion:!0},async R=>{await p.install({cache:C,report:R,immutable:c,checkResolutions:P,mode:this.mode})})).exitCode()}},uSt=\"<<<<<<<\";async function fSt(t,e){if(!t.projectCwd)return!1;let r=K.join(t.projectCwd,Er.lockfile);if(!await le.existsPromise(r)||!(await le.readFilePromise(r,\"utf8\")).includes(uSt))return!1;if(e)throw new Yt(47,\"Cannot autofix a lockfile when running an immutable install\");let a=await Gr.execvp(\"git\",[\"rev-parse\",\"MERGE_HEAD\",\"HEAD\"],{cwd:t.projectCwd});if(a.code!==0&&(a=await Gr.execvp(\"git\",[\"rev-parse\",\"REBASE_HEAD\",\"HEAD\"],{cwd:t.projectCwd})),a.code!==0&&(a=await Gr.execvp(\"git\",[\"rev-parse\",\"CHERRY_PICK_HEAD\",\"HEAD\"],{cwd:t.projectCwd})),a.code!==0)throw new Yt(83,\"Git returned an error when trying to find the commits pertaining to the conflict\");let n=await Promise.all(a.stdout.trim().split(/\\n/).map(async f=>{let p=await Gr.execvp(\"git\",[\"show\",`${f}:./${Er.lockfile}`],{cwd:t.projectCwd});if(p.code!==0)throw new Yt(83,`Git returned an error when trying to access the lockfile content in ${f}`);try{return ls(p.stdout)}catch{throw new Yt(46,\"A variant of the conflicting lockfile failed to parse\")}}));n=n.filter(f=>!!f.__metadata);for(let f of n){if(f.__metadata.version<7)for(let p of Object.keys(f)){if(p===\"__metadata\")continue;let h=q.parseDescriptor(p,!0),E=t.normalizeDependency(h),C=q.stringifyDescriptor(E);C!==p&&(f[C]=f[p],delete f[p])}for(let p of Object.keys(f)){if(p===\"__metadata\")continue;let h=f[p].checksum;typeof h>\"u\"||h.includes(\"/\")||(f[p].checksum=`${f.__metadata.cacheKey}/${h}`)}}let c=Object.assign({},...n);c.__metadata.version=`${Math.min(...n.map(f=>parseInt(f.__metadata.version??0)))}`,c.__metadata.cacheKey=\"merged\";for(let[f,p]of Object.entries(c))typeof p==\"string\"&&delete c[f];return await le.changeFilePromise(r,il(c),{automaticNewlines:!0}),!0}async function ASt(t,e){if(!t.projectCwd)return!1;let r=[],s=K.join(t.projectCwd,\".yarn/plugins/@yarnpkg\");return await ze.updateConfiguration(t.projectCwd,{plugins:n=>{if(!Array.isArray(n))return n;let c=n.filter(f=>{if(!f.path)return!0;let p=K.resolve(t.projectCwd,f.path),h=Ev.has(f.spec)&&K.contains(s,p);return h&&r.push(p),!h});return c.length===0?ze.deleteProperty:c.length===n.length?n:c}},{immutable:e})?(await Promise.all(r.map(async n=>{await le.removePromise(n)})),!0):!1}Ve();bt();Wt();var SC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Link all workspaces belonging to the target projects to the current one\"});this.private=ge.Boolean(\"-p,--private\",!1,{description:\"Also link private workspaces belonging to the target projects to the current one\"});this.relative=ge.Boolean(\"-r,--relative\",!1,{description:\"Link workspaces using relative paths instead of absolute paths\"});this.destinations=ge.Rest()}static{this.paths=[[\"link\"]]}static{this.usage=ot.Usage({description:\"connect the local project to another one\",details:\"\\n      This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\\n    \",examples:[[\"Register one or more remote workspaces for use in the current project\",\"$0 link ~/ts-loader ~/jest\"],[\"Register all workspaces from a remote project for use in the current project\",\"$0 link ~/jest --all\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=s.topLevelWorkspace,f=[];for(let p of this.destinations){let h=K.resolve(this.context.cwd,ue.toPortablePath(p)),E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(s.cwd===C.cwd)throw new nt(`Invalid destination '${p}'; Can't link the project to itself`);if(!S)throw new ar(C.cwd,h);if(this.all){let P=!1;for(let I of C.workspaces)I.manifest.name&&(!I.manifest.private||this.private)&&(f.push(I),P=!0);if(!P)throw new nt(`No workspace found to be linked in the target project: ${p}`)}else{if(!S.manifest.name)throw new nt(`The target workspace at '${p}' doesn't have a name and thus cannot be linked`);if(S.manifest.private&&!this.private)throw new nt(`The target workspace at '${p}' is marked private - use the --private flag to link it anyway`);f.push(S)}}for(let p of f){let h=q.stringifyIdent(p.anchoredLocator),E=this.relative?K.relative(s.cwd,p.cwd):p.cwd;c.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${E}`})}return await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Wt();var DC=class extends ut{constructor(){super(...arguments);this.args=ge.Proxy()}static{this.paths=[[\"node\"]]}static{this.usage=ot.Usage({description:\"run node with the hook already setup\",details:`\n      This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n\n      The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.\n    `,examples:[[\"Run a Node script\",\"$0 node ./my-script.js\"]]})}async execute(){return this.cli.run([\"exec\",\"node\",...this.args])}};Ve();Wt();var bC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"plugin\",\"check\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"find all third-party plugins that differ from their own spec\",details:`\n      Check only the plugins from https.\n\n      If this command detects any plugin differences in the CI environment, it will throw an error.\n    `,examples:[[\"find all third-party plugins that differ from their own spec\",\"$0 plugin check\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await ze.findRcFiles(this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let c of s)if(c.data?.plugins)for(let f of c.data.plugins){if(!f.checksum||!f.spec.match(/^https?:/))continue;let p=await An.get(f.spec,{configuration:r}),h=Nn.makeHash(p);if(f.checksum===h)continue;let E=he.pretty(r,f.path,he.Type.PATH),C=he.pretty(r,f.spec,he.Type.URL),S=`${E} is different from the file provided by ${C}`;n.reportJson({...f,newChecksum:h}),n.reportError(0,S)}})).exitCode()}};Ve();Ve();bt();Wt();var pBe=ye(\"os\");Ve();bt();Wt();var cBe=ye(\"os\");Ve();Bc();Wt();var pSt=\"https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml\";async function Dm(t,e){let r=await An.get(pSt,{configuration:t}),s=ls(r.toString());return Object.fromEntries(Object.entries(s).filter(([a,n])=>!e||Or.satisfiesWithPrereleases(e,n.range??\"<4.0.0-rc.1\")))}var PC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"plugin\",\"list\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"list the available official plugins\",details:\"\\n      This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\\n    \",examples:[[\"List the official plugins\",\"$0 plugin list\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Dm(r,un);for(let[c,{experimental:f,...p}]of Object.entries(n)){let h=c;f&&(h+=\" [experimental]\"),a.reportJson({name:c,experimental:f,...p}),a.reportInfo(null,h)}})).exitCode()}};var hSt=/^[0-9]+$/,gSt=process.platform===\"win32\";function uBe(t){return hSt.test(t)?`pull/${t}/head`:t}var dSt=({repository:t,branch:e},r)=>[[\"git\",\"init\",ue.fromPortablePath(r)],[\"git\",\"remote\",\"add\",\"origin\",t],[\"git\",\"fetch\",\"origin\",\"--depth=1\",uBe(e)],[\"git\",\"reset\",\"--hard\",\"FETCH_HEAD\"]],mSt=({branch:t})=>[[\"git\",\"fetch\",\"origin\",\"--depth=1\",uBe(t),\"--force\"],[\"git\",\"reset\",\"--hard\",\"FETCH_HEAD\"],[\"git\",\"clean\",\"-dfx\",\"-e\",\"packages/yarnpkg-cli/bundles\"]],ySt=({plugins:t,noMinify:e},r,s)=>[[\"yarn\",\"build:cli\",...new Array().concat(...t.map(a=>[\"--plugin\",K.resolve(s,a)])),...e?[\"--no-minify\"]:[],\"|\"],[gSt?\"move\":\"mv\",\"packages/yarnpkg-cli/bundles/yarn.js\",ue.fromPortablePath(r),\"|\"]],xC=class extends ut{constructor(){super(...arguments);this.installPath=ge.String(\"--path\",{description:\"The path where the repository should be cloned to\"});this.repository=ge.String(\"--repository\",\"https://github.com/yarnpkg/berry.git\",{description:\"The repository that should be cloned\"});this.branch=ge.String(\"--branch\",\"master\",{description:\"The branch of the repository that should be cloned\"});this.plugins=ge.Array(\"--plugin\",[],{description:\"An array of additional plugins that should be included in the bundle\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"If set, the bundle will be built but not added to the project\"});this.noMinify=ge.Boolean(\"--no-minify\",!1,{description:\"Build a bundle for development (debugging) - non-minified and non-mangled\"});this.force=ge.Boolean(\"-f,--force\",!1,{description:\"Always clone the repository instead of trying to fetch the latest commits\"});this.skipPlugins=ge.Boolean(\"--skip-plugins\",!1,{description:\"Skip updating the contrib plugins\"})}static{this.paths=[[\"set\",\"version\",\"from\",\"sources\"]]}static{this.usage=ot.Usage({description:\"build Yarn from master\",details:`\n      This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.\n\n      By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \\`--skip-plugins\\` flag.\n    `,examples:[[\"Build Yarn from master\",\"$0 set version from sources\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.installPath<\"u\"?K.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):K.resolve(ue.toPortablePath((0,cBe.tmpdir)()),\"yarnpkg-sources\",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{await M5(this,{configuration:r,report:c,target:a}),c.reportSeparator(),c.reportInfo(0,\"Building a fresh bundle\"),c.reportSeparator();let f=await Gr.execvp(\"git\",[\"rev-parse\",\"--short\",\"HEAD\"],{cwd:a,strict:!0}),p=K.join(a,`packages/yarnpkg-cli/bundles/yarn-${f.stdout.trim()}.js`);le.existsSync(p)||(await gS(ySt(this,p,a),{configuration:r,context:this.context,target:a}),c.reportSeparator());let h=await le.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await O5(r,null,async()=>h,{report:c});this.skipPlugins||await ESt(this,E,{project:s,report:c,target:a})}})).exitCode()}};async function gS(t,{configuration:e,context:r,target:s}){for(let[a,...n]of t){let c=n[n.length-1]===\"|\";if(c&&n.pop(),c)await Gr.pipevp(a,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${he.pretty(e,`  $ ${[a,...n].join(\" \")}`,\"grey\")}\n`);try{await Gr.execvp(a,n,{cwd:s,strict:!0})}catch(f){throw r.stdout.write(f.stdout||f.stack),f}}}}async function M5(t,{configuration:e,report:r,target:s}){let a=!1;if(!t.force&&le.existsSync(K.join(s,\".git\"))){r.reportInfo(0,\"Fetching the latest commits\"),r.reportSeparator();try{await gS(mSt(t),{configuration:e,context:t.context,target:s}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,\"Repository update failed; we'll try to regenerate it\")}}a||(r.reportInfo(0,\"Cloning the remote repository\"),r.reportSeparator(),await le.removePromise(s),await le.mkdirPromise(s,{recursive:!0}),await gS(dSt(t,s),{configuration:e,context:t.context,target:s}))}async function ESt(t,e,{project:r,report:s,target:a}){let n=await Dm(r.configuration,e),c=new Set(Object.keys(n));for(let f of r.configuration.plugins.keys())c.has(f)&&await _5(f,t,{project:r,report:s,target:a})}Ve();Ve();bt();Wt();var fBe=et(fi()),ABe=ye(\"vm\");var kC=class extends ut{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean(\"--checksum\",!0,{description:\"Whether to care if this plugin is modified\"})}static{this.paths=[[\"plugin\",\"import\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"download a plugin\",details:`\n      This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.\n\n      Three types of plugin references are accepted:\n\n      - If the plugin is stored within the Yarn repository, it can be referenced by name.\n      - Third-party plugins can be referenced directly through their public urls.\n      - Local plugins can be referenced by their path on the disk.\n\n      If the \\`--no-checksum\\` option is set, Yarn will no longer care if the plugin is modified.\n\n      Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \\`@yarnpkg/builder\\` package).\n    `,examples:[['Download and activate the \"@yarnpkg/plugin-exec\" plugin',\"$0 plugin import @yarnpkg/plugin-exec\"],['Download and activate the \"@yarnpkg/plugin-exec\" plugin (shorthand)',\"$0 plugin import exec\"],[\"Download and activate a community plugin\",\"$0 plugin import https://example.org/path/to/plugin.js\"],[\"Activate a local plugin\",\"$0 plugin import ./path/to/plugin.js\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Tt.find(r,this.context.cwd),c,f;if(this.name.match(/^\\.{0,2}[\\\\/]/)||ue.isAbsolute(this.name)){let p=K.resolve(this.context.cwd,ue.toPortablePath(this.name));a.reportInfo(0,`Reading ${he.pretty(r,p,he.Type.PATH)}`),c=K.relative(n.cwd,p),f=await le.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Yt(52,`Plugin specifier \"${this.name}\" is neither a plugin name nor a valid url`)}c=this.name,p=this.name}else{let h=q.parseLocator(this.name.replace(/^((@yarnpkg\\/)?plugin-)?/,\"@yarnpkg/plugin-\"));if(h.reference!==\"unknown\"&&!fBe.default.valid(h.reference))throw new Yt(0,\"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.\");let E=q.stringifyIdent(h),C=await Dm(r,un);if(!Object.hasOwn(C,E)){let S=`Couldn't find a plugin named ${q.prettyIdent(r,h)} on the remote registry.\n`;throw r.plugins.has(E)?S+=`A plugin named ${q.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:S+=`Note that only the plugins referenced on our website (${he.pretty(r,\"https://github.com/yarnpkg/berry/blob/master/plugins.yml\",he.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${he.pretty(r,\"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js\",he.Type.URL)}).`,new Yt(51,S)}c=E,p=C[E].url,h.reference!==\"unknown\"?p=p.replace(/\\/master\\//,`/${E}/${h.reference}/`):un!==null&&(p=p.replace(/\\/master\\//,`/@yarnpkg/cli/${un}/`))}a.reportInfo(0,`Downloading ${he.pretty(r,p,\"green\")}`),f=await An.get(p,{configuration:r})}await U5(c,f,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function U5(t,e,{checksum:r=!0,project:s,report:a}){let{configuration:n}=s,c={},f={exports:c};(0,ABe.runInNewContext)(e.toString(),{module:f,exports:c});let h=`.yarn/plugins/${f.exports.name}.cjs`,E=K.resolve(s.cwd,h);a.reportInfo(0,`Saving the new plugin in ${he.pretty(n,h,\"magenta\")}`),await le.mkdirPromise(K.dirname(E),{recursive:!0}),await le.writeFilePromise(E,e);let C={path:h,spec:t};r&&(C.checksum=Nn.makeHash(e)),await ze.addPlugin(s.cwd,[C])}var ISt=({pluginName:t,noMinify:e},r)=>[[\"yarn\",`build:${t}`,...e?[\"--no-minify\"]:[],\"|\"]],QC=class extends ut{constructor(){super(...arguments);this.installPath=ge.String(\"--path\",{description:\"The path where the repository should be cloned to\"});this.repository=ge.String(\"--repository\",\"https://github.com/yarnpkg/berry.git\",{description:\"The repository that should be cloned\"});this.branch=ge.String(\"--branch\",\"master\",{description:\"The branch of the repository that should be cloned\"});this.noMinify=ge.Boolean(\"--no-minify\",!1,{description:\"Build a plugin for development (debugging) - non-minified and non-mangled\"});this.force=ge.Boolean(\"-f,--force\",!1,{description:\"Always clone the repository instead of trying to fetch the latest commits\"});this.name=ge.String()}static{this.paths=[[\"plugin\",\"import\",\"from\",\"sources\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"build a plugin from sources\",details:`\n      This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.\n\n      The plugins can be referenced by their short name if sourced from the official Yarn repository.\n    `,examples:[['Build and activate the \"@yarnpkg/plugin-exec\" plugin',\"$0 plugin import from sources @yarnpkg/plugin-exec\"],['Build and activate the \"@yarnpkg/plugin-exec\" plugin (shorthand)',\"$0 plugin import from sources exec\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.installPath<\"u\"?K.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):K.resolve(ue.toPortablePath((0,pBe.tmpdir)()),\"yarnpkg-sources\",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:c}=await Tt.find(r,this.context.cwd),f=q.parseIdent(this.name.replace(/^((@yarnpkg\\/)?plugin-)?/,\"@yarnpkg/plugin-\")),p=q.stringifyIdent(f),h=await Dm(r,un);if(!Object.hasOwn(h,p))throw new Yt(51,`Couldn't find a plugin named \"${p}\" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await M5(this,{configuration:r,report:n,target:s}),await _5(E,this,{project:c,report:n,target:s})})).exitCode()}};async function _5(t,{context:e,noMinify:r},{project:s,report:a,target:n}){let c=t.replace(/@yarnpkg\\//,\"\"),{configuration:f}=s;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${c}`),a.reportSeparator(),await gS(ISt({pluginName:c,noMinify:r},n),{configuration:f,context:e,target:n}),a.reportSeparator();let p=K.resolve(n,`packages/${c}/bundles/${t}.js`),h=await le.readFilePromise(p);await U5(t,h,{project:s,report:a})}Ve();bt();Wt();var TC=class extends ut{constructor(){super(...arguments);this.name=ge.String()}static{this.paths=[[\"plugin\",\"remove\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"remove a plugin\",details:`\n      This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.\n\n      **Note:** The plugins have to be referenced by their name property, which can be obtained using the \\`yarn plugin runtime\\` command. Shorthands are not allowed.\n   `,examples:[[\"Remove a plugin imported from the Yarn repository\",\"$0 plugin remove @yarnpkg/plugin-typescript\"],[\"Remove a plugin imported from a local file\",\"$0 plugin remove my-local-plugin\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c=this.name,f=q.parseIdent(c);if(!r.plugins.has(c))throw new nt(`${q.prettyIdent(r,f)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${c}.cjs`,h=K.resolve(s.cwd,p);le.existsSync(h)&&(n.reportInfo(0,`Removing ${he.pretty(r,p,he.Type.PATH)}...`),await le.removePromise(h)),n.reportInfo(0,\"Updating the configuration...\"),await ze.updateConfiguration(s.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let C=E.filter(S=>S.path!==p);return C.length===0?ze.deleteProperty:C.length===E.length?E:C}})})).exitCode()}};Ve();Wt();var RC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"plugin\",\"runtime\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"list the active plugins\",details:`\n      This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.\n    `,examples:[[\"List the currently active plugins\",\"$0 plugin runtime\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let c=this.context.plugins.plugins.has(n),f=n;c&&(f+=\" [builtin]\"),a.reportJson({name:n,builtin:c}),a.reportInfo(null,`${f}`)}})).exitCode()}};Ve();Ve();Wt();var FC=class extends ut{constructor(){super(...arguments);this.idents=ge.Rest()}static{this.paths=[[\"rebuild\"]]}static{this.usage=ot.Usage({description:\"rebuild the project's native packages\",details:`\n      This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.\n\n      Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).\n\n      By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.\n    `,examples:[[\"Rebuild all packages\",\"$0 rebuild\"],[\"Rebuild fsevents only\",\"$0 rebuild fsevents\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=new Set;for(let f of this.idents)c.add(q.parseIdent(f).identHash);if(await s.restoreInstallState({restoreResolutions:!1}),await s.resolveEverything({cache:n,report:new Wi}),c.size>0)for(let f of s.storedPackages.values())c.has(f.identHash)&&(s.storedBuildState.delete(f.locatorHash),s.skippedBuilds.delete(f.locatorHash));else s.storedBuildState.clear(),s.skippedBuilds.clear();return await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Wt();var H5=et(Sa());Ul();var NC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Apply the operation to all workspaces from the current project\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:Ao(ec)});this.patterns=ge.Rest()}static{this.paths=[[\"remove\"]]}static{this.usage=ot.Usage({description:\"remove dependencies from the project\",details:`\n      This command will remove the packages matching the specified patterns from the current workspace.\n\n      If the \\`--mode=<mode>\\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n      - \\`skip-build\\` will not run the build scripts at all. Note that this is different from setting \\`enableScripts\\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n      - \\`update-lockfile\\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n      This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n    `,examples:[[\"Remove a dependency from the current project\",\"$0 remove lodash\"],[\"Remove a dependency from all workspaces at once\",\"$0 remove lodash --all\"],[\"Remove all dependencies starting with `eslint-`\",\"$0 remove 'eslint-*'\"],[\"Remove all dependencies with the `@babel` scope\",\"$0 remove '@babel/*'\"],[\"Remove all dependencies matching `react-dom` or `react-helmet`\",\"$0 remove 'react-{dom,helmet}'\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.all?s.workspaces:[a],f=[\"dependencies\",\"devDependencies\",\"peerDependencies\"],p=[],h=!1,E=[];for(let I of this.patterns){let R=!1,N=q.parseIdent(I);for(let U of c){let W=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,H5.default)(W,I))U.manifest.peerDependenciesMeta.delete(te),h=!0,R=!0;for(let te of f){let ie=U.manifest.getForScope(te),Ae=[...ie.values()].map(ce=>q.stringifyIdent(ce));for(let ce of(0,H5.default)(Ae,q.stringifyIdent(N))){let{identHash:me}=q.parseIdent(ce),pe=ie.get(me);if(typeof pe>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");U.manifest[te].delete(me),E.push([U,te,pe]),h=!0,R=!0}}}R||p.push(I)}let C=p.length>1?\"Patterns\":\"Pattern\",S=p.length>1?\"don't\":\"doesn't\",P=this.all?\"any\":\"this\";if(p.length>0)throw new nt(`${C} ${he.prettyList(r,p,he.Type.CODE)} ${S} match any packages referenced by ${P} workspace`);return h?(await r.triggerMultipleHooks(I=>I.afterWorkspaceDependencyRemoval,E),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};Ve();Ve();Wt();var hBe=ye(\"util\"),OC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"run\"]]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async c=>{let f=a.manifest.scripts,p=je.sortMap(f.keys(),C=>C),h={breakLength:1/0,colors:r.get(\"enableColors\"),maxArrayLength:2},E=p.reduce((C,S)=>Math.max(C,S.length),0);for(let[C,S]of f.entries())c.reportInfo(null,`${C.padEnd(E,\" \")}   ${(0,hBe.inspect)(S,h)}`),c.reportJson({name:C,script:S})})).exitCode()}};Ve();Ve();Wt();var LC=class extends ut{constructor(){super(...arguments);this.inspect=ge.String(\"--inspect\",!1,{tolerateBoolean:!0,description:\"Forwarded to the underlying Node process when executing a binary\"});this.inspectBrk=ge.String(\"--inspect-brk\",!1,{tolerateBoolean:!0,description:\"Forwarded to the underlying Node process when executing a binary\"});this.topLevel=ge.Boolean(\"-T,--top-level\",!1,{description:\"Check the root workspace for scripts and/or binaries instead of the current one\"});this.binariesOnly=ge.Boolean(\"-B,--binaries-only\",!1,{description:\"Ignore any user defined scripts and only check for binaries\"});this.require=ge.String(\"--require\",{description:\"Forwarded to the underlying Node process when executing a binary\"});this.silent=ge.Boolean(\"--silent\",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"run\"]]}static{this.usage=ot.Usage({description:\"run a script defined in the package.json\",details:`\n      This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:\n\n      - If the \\`scripts\\` field from your local package.json contains a matching script name, its definition will get executed.\n\n      - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.\n\n      - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.\n\n      Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).\n    `,examples:[[\"Run the tests from the local workspace\",\"$0 run test\"],['Same thing, but without the \"run\" keyword',\"$0 test\"],[\"Inspect Webpack while running\",\"$0 run --inspect-brk webpack\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a,locator:n}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let c=this.topLevel?s.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await In.hasPackageScript(c,this.scriptName,{project:s}))return await In.executePackageScript(c,this.scriptName,this.args,{project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let f=await In.getPackageAccessibleBinaries(c,{project:s});if(f.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect==\"string\"?h.push(`--inspect=${this.inspect}`):h.push(\"--inspect\")),this.inspectBrk&&(typeof this.inspectBrk==\"string\"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push(\"--inspect-brk\")),this.require&&h.push(`--require=${this.require}`),await In.executePackageAccessibleBinary(c,this.scriptName,this.args,{cwd:this.context.cwd,project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:f})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(\":\")){let E=(await Promise.all(s.workspaces.map(async C=>C.manifest.scripts.has(this.scriptName)?C:null))).filter(C=>C!==null);if(E.length===1)return await In.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName===\"node-gyp\"?new nt(`Couldn't find a script name \"${this.scriptName}\" in the top-level (used by ${q.prettyLocator(r,n)}). This typically happens because some package depends on \"node-gyp\" to build itself, but didn't list it in their dependencies. To fix that, please run \"yarn add node-gyp\" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new nt(`Couldn't find a script name \"${this.scriptName}\" in the top-level (used by ${q.prettyLocator(r,n)}).`);{if(this.scriptName===\"global\")throw new nt(\"The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead\");let h=[this.scriptName].concat(this.args);for(let[E,C]of tC)for(let S of C)if(h.length>=S.length&&JSON.stringify(h.slice(0,S.length))===JSON.stringify(S))throw new nt(`Couldn't find a script named \"${this.scriptName}\", but a matching command can be found in the ${E} plugin. You can install it with \"yarn plugin import ${E}\".`);throw new nt(`Couldn't find a script named \"${this.scriptName}\".`)}}};Ve();Ve();Wt();var MC=class extends ut{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}static{this.paths=[[\"set\",\"resolution\"]]}static{this.usage=ot.Usage({description:\"enforce a package resolution\",details:'\\n      This command updates the resolution table so that `descriptor` is resolved by `resolution`.\\n\\n      Note that by default this command only affect the current resolution table - meaning that this \"manual override\" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\\n\\n      Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\\n    ',examples:[[\"Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0\",\"$0 set resolution lodash@npm:^1.2.3 npm:1.5.0\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(await s.restoreInstallState({restoreResolutions:!1}),!a)throw new ar(s.cwd,this.context.cwd);let c=q.parseDescriptor(this.descriptor,!0),f=q.makeDescriptor(c,this.resolution);return s.storedDescriptors.set(c.descriptorHash,c),s.storedDescriptors.set(f.descriptorHash,f),s.resolutionAliases.set(c.descriptorHash,f.descriptorHash),await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Ve();bt();Wt();var gBe=et(Sa()),_C=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Unlink all workspaces belonging to the target project from the current one\"});this.leadingArguments=ge.Rest()}static{this.paths=[[\"unlink\"]]}static{this.usage=ot.Usage({description:\"disconnect the local project from another one\",details:`\n      This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.\n    `,examples:[[\"Unregister a remote workspace in the current project\",\"$0 unlink ~/ts-loader\"],[\"Unregister all workspaces from a remote project in the current project\",\"$0 unlink ~/jest --all\"],[\"Unregister all previously linked workspaces\",\"$0 unlink --all\"],[\"Unregister all workspaces matching a glob\",\"$0 unlink '@babel/*' 'pkg-{a,b}'\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=s.topLevelWorkspace,f=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of c.manifest.resolutions)h.startsWith(\"portal:\")&&f.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=K.resolve(this.context.cwd,ue.toPortablePath(p));if(je.isPathLike(p)){let E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(!S)throw new ar(C.cwd,h);if(this.all){for(let P of C.workspaces)P.manifest.name&&f.add(q.stringifyIdent(P.anchoredLocator));if(f.size===0)throw new nt(\"No workspace found to be unlinked in the target project\")}else{if(!S.manifest.name)throw new nt(\"The target workspace doesn't have a name and thus cannot be unlinked\");f.add(q.stringifyIdent(S.anchoredLocator))}}else{let E=[...c.manifest.resolutions.map(({pattern:C})=>C.descriptor.fullName)];for(let C of(0,gBe.default)(E,p))f.add(C)}}return c.manifest.resolutions=c.manifest.resolutions.filter(({pattern:p})=>!f.has(p.descriptor.fullName)),await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Wt();var dBe=et(lS()),j5=et(Sa());Ul();var UC=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean(\"-i,--interactive\",{description:\"Offer various choices, depending on the detected upgrade paths\"});this.fixed=ge.Boolean(\"-F,--fixed\",!1,{description:\"Store dependency tags as-is instead of resolving them\"});this.exact=ge.Boolean(\"-E,--exact\",!1,{description:\"Don't use any semver modifier on the resolved range\"});this.tilde=ge.Boolean(\"-T,--tilde\",!1,{description:\"Use the `~` semver modifier on the resolved range\"});this.caret=ge.Boolean(\"-C,--caret\",!1,{description:\"Use the `^` semver modifier on the resolved range\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Resolve again ALL resolutions for those packages\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:Ao(ec)});this.patterns=ge.Rest()}static{this.paths=[[\"up\"]]}static{this.usage=ot.Usage({description:\"upgrade dependencies across the project\",details:\"\\n      This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\\n\\n      If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\\n\\n      If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\\n\\n      The, `-C,--caret`, `-E,--exact` and  `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n\\n      Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\\n\\n      This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\\n\\n      **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\\n    \",examples:[[\"Upgrade all instances of lodash to the latest release\",\"$0 up lodash\"],[\"Upgrade all instances of lodash to the latest release, but ask confirmation for each\",\"$0 up lodash -i\"],[\"Upgrade all instances of lodash to 1.2.3\",\"$0 up lodash@1.2.3\"],[\"Upgrade all instances of packages with the `@babel` scope to the latest release\",\"$0 up '@babel/*'\"],[\"Upgrade all instances of packages containing the word `jest` to the latest release\",\"$0 up '*jest*'\"],[\"Upgrade all instances of packages with the `@babel` scope to 7.0.0\",\"$0 up '@babel/*@7.0.0'\"]]})}static{this.schema=[iB(\"recursive\",Wf.Forbids,[\"interactive\",\"exact\",\"tilde\",\"caret\"],{ignore:[void 0,!1]})]}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=[...s.storedDescriptors.values()],f=c.map(E=>q.stringifyIdent(E)),p=new Set;for(let E of this.patterns){if(q.parseDescriptor(E).range!==\"unknown\")throw new nt(\"Ranges aren't allowed when using --recursive\");for(let C of(0,j5.default)(f,E)){let S=q.parseIdent(C);p.add(S.identHash)}}let h=c.filter(E=>p.has(E.identHash));for(let E of h)s.storedDescriptors.delete(E.descriptorHash),s.storedResolutions.delete(E.descriptorHash);return await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}async executeUpClassic(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=uS(this,s),h=f?[\"keep\",\"reuse\",\"project\",\"latest\"]:[\"project\",\"latest\"],E=[],C=[];for(let N of this.patterns){let U=!1,W=q.parseDescriptor(N),te=q.stringifyIdent(W);for(let ie of s.workspaces)for(let Ae of[\"dependencies\",\"devDependencies\"]){let me=[...ie.manifest.getForScope(Ae).values()].map(Be=>q.stringifyIdent(Be)),pe=te===\"*\"?me:(0,j5.default)(me,te);for(let Be of pe){let Ce=q.parseIdent(Be),g=ie.manifest[Ae].get(Ce.identHash);if(typeof g>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let we=q.makeDescriptor(Ce,W.range);E.push(Promise.resolve().then(async()=>[ie,Ae,g,await fS(we,{project:s,workspace:ie,cache:n,target:Ae,fixed:c,modifier:p,strategies:h})])),U=!0}}U||C.push(N)}if(C.length>1)throw new nt(`Patterns ${he.prettyList(r,C,he.Type.CODE)} don't match any packages referenced by any workspace`);if(C.length>0)throw new nt(`Pattern ${he.prettyList(r,C,he.Type.CODE)} doesn't match any packages referenced by any workspace`);let S=await Promise.all(E),P=await uA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:W,rejections:te}]of S){let ie=W.filter(Ae=>Ae.descriptor!==null);if(ie.length===0){let[Ae]=te;if(typeof Ae>\"u\")throw new Error(\"Assertion failed: Expected an error to have been set\");let ce=this.cli.error(Ae);s.configuration.get(\"enableNetwork\")?N.reportError(27,`${q.prettyDescriptor(r,U)} can't be resolved to a satisfying range\n\n${ce}`):N.reportError(27,`${q.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)\n\n${ce}`)}else ie.length>1&&!f&&N.reportError(27,`${q.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(P.hasErrors())return P.exitCode();let I=!1,R=[];for(let[N,U,,{suggestions:W}]of S){let te,ie=W.filter(pe=>pe.descriptor!==null),Ae=ie[0].descriptor,ce=ie.every(pe=>q.areDescriptorsEqual(pe.descriptor,Ae));ie.length===1||ce?te=Ae:(I=!0,{answer:te}=await(0,dBe.prompt)({type:\"select\",name:\"answer\",message:`Which range do you want to use in ${q.prettyWorkspace(r,N)} \\u276F ${U}?`,choices:W.map(({descriptor:pe,name:Be,reason:Ce})=>pe?{name:Be,hint:Ce,descriptor:pe}:{name:Be,hint:Ce,disabled:!0}),onCancel:()=>process.exit(130),result(pe){return this.find(pe,\"descriptor\")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=N.manifest[U].get(te.identHash);if(typeof me>\"u\")throw new Error(\"Assertion failed: This descriptor should have a matching entry\");if(me.descriptorHash!==te.descriptorHash)N.manifest[U].set(te.identHash,te),R.push([N,U,me,te]);else{let pe=r.makeResolver(),Be={project:s,resolver:pe},Ce=r.normalizeDependency(me),g=pe.bindDescriptor(Ce,N.anchoredLocator,Be);s.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,R),I&&this.context.stdout.write(`\n`),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Ve();Ve();Ve();Wt();var HC=class extends ut{constructor(){super(...arguments);this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"List, for each workspace, what are all the paths that lead to the dependency\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.peers=ge.Boolean(\"--peers\",!1,{description:\"Also print the peer dependencies that match the specified name\"});this.package=ge.String()}static{this.paths=[[\"why\"]]}static{this.usage=ot.Usage({description:\"display the reason why a package is needed\",details:`\n      This command prints the exact reasons why a package appears in the dependency tree.\n\n      If \\`-R,--recursive\\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named \"Foo\" when looking for \"Bar\", it means that \"Foo\" already got printed higher in the tree.\n    `,examples:[[\"Explain why lodash is used in your project\",\"$0 why lodash\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=q.parseIdent(this.package).identHash,c=this.recursive?wSt(s,n,{configuration:r,peers:this.peers}):CSt(s,n,{configuration:r,peers:this.peers});ks.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function CSt(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.storedPackages.values(),f=>q.stringifyLocator(f)),n={},c={children:n};for(let f of a){let p={};for(let E of f.dependencies.values()){if(!s&&f.peerDependencies.has(E.identHash))continue;let C=t.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(\"Assertion failed: The resolution should have been registered\");let S=t.storedPackages.get(C);if(!S)throw new Error(\"Assertion failed: The package should have been registered\");if(S.identHash!==e)continue;{let I=q.stringifyLocator(f);n[I]={value:[f,he.Type.LOCATOR],children:p}}let P=q.stringifyLocator(S);p[P]={value:[{descriptor:E,locator:S},he.Type.DEPENDENT]}}}return c}function wSt(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.workspaces,S=>q.stringifyLocator(S.anchoredLocator)),n=new Set,c=new Set,f=S=>{if(n.has(S.locatorHash))return c.has(S.locatorHash);if(n.add(S.locatorHash),S.identHash===e)return c.add(S.locatorHash),!0;let P=!1;S.identHash===e&&(P=!0);for(let I of S.dependencies.values()){if(!s&&S.peerDependencies.has(I.identHash))continue;let R=t.storedResolutions.get(I.descriptorHash);if(!R)throw new Error(\"Assertion failed: The resolution should have been registered\");let N=t.storedPackages.get(R);if(!N)throw new Error(\"Assertion failed: The package should have been registered\");f(N)&&(P=!0)}return P&&c.add(S.locatorHash),P};for(let S of a)f(S.anchoredPackage);let p=new Set,h={},E={children:h},C=(S,P,I)=>{if(!c.has(S.locatorHash))return;let R=I!==null?he.tuple(he.Type.DEPENDENT,{locator:S,descriptor:I}):he.tuple(he.Type.LOCATOR,S),N={},U={value:R,children:N},W=q.stringifyLocator(S);if(P[W]=U,!(I!==null&&t.tryWorkspaceByLocator(S))&&!p.has(S.locatorHash)){p.add(S.locatorHash);for(let te of S.dependencies.values()){if(!s&&S.peerDependencies.has(te.identHash))continue;let ie=t.storedResolutions.get(te.descriptorHash);if(!ie)throw new Error(\"Assertion failed: The resolution should have been registered\");let Ae=t.storedPackages.get(ie);if(!Ae)throw new Error(\"Assertion failed: The package should have been registered\");C(Ae,N,te)}}};for(let S of a)C(S.anchoredPackage,h,null);return E}Ve();var X5={};Vt(X5,{GitFetcher:()=>mS,GitResolver:()=>yS,default:()=>qSt,gitUtils:()=>Qa});Ve();bt();var Qa={};Vt(Qa,{TreeishProtocols:()=>dS,clone:()=>Z5,fetchBase:()=>MBe,fetchChangedFiles:()=>_Be,fetchChangedWorkspaces:()=>HSt,fetchRoot:()=>LBe,isGitUrl:()=>GC,lsRemote:()=>OBe,normalizeLocator:()=>USt,normalizeRepoUrl:()=>jC,resolveUrl:()=>z5,splitRepoUrl:()=>Y0,validateRepoUrl:()=>J5});Ve();bt();Wt();var RBe=et(kBe()),FBe=et(d6()),qC=et(ye(\"querystring\")),V5=et(fi());function Y5(t,e,r){let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)}function QBe(t){try{return new URL(t)}catch{return}}function MSt(t){let e=Y5(t,\"@\",\"#\"),r=Y5(t,\":\",\"#\");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),Y5(t,\":\",\"#\")===-1&&t.indexOf(\"//\")===-1&&(t=`ssh://${t}`),t}function TBe(t){return QBe(t)||QBe(MSt(t))}function jC(t,{git:e=!1}={}){if(t=t.replace(/^git\\+https:/,\"https:\"),t=t.replace(/^(?:github:|https:\\/\\/github\\.com\\/|git:\\/\\/github\\.com\\/)?(?!\\.{1,2}\\/)([a-zA-Z0-9._-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\\.git)?(#.*)?$/,\"https://github.com/$1/$2.git$3\"),t=t.replace(/^https:\\/\\/github\\.com\\/(?!\\.{1,2}\\/)([a-zA-Z0-9._-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\\/tarball\\/(.+)?$/,\"https://github.com/$1/$2.git#$3\"),e){let r=TBe(t);r&&(t=r.href),t=t.replace(/^git\\+([^:]+):/,\"$1:\")}return t}function NBe(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||\"ssh\"} -o BatchMode=yes`}}var _St=[/^ssh:/,/^git(?:\\+[^:]+)?:/,/^(?:git\\+)?https?:[^#]+\\/[^#]+(?:\\.git)(?:#.*)?$/,/^git@[^#]+\\/[^#]+\\.git(?:#.*)?$/,/^(?:github:|https:\\/\\/github\\.com\\/)?(?!\\.{1,2}\\/)([a-zA-Z._0-9-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\\.git)?(?:#.*)?$/,/^https:\\/\\/github\\.com\\/(?!\\.{1,2}\\/)([a-zA-Z0-9._-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\\/tarball\\/(.+)?$/],dS=(a=>(a.Commit=\"commit\",a.Head=\"head\",a.Tag=\"tag\",a.Semver=\"semver\",a))(dS||{});function GC(t){return t?_St.some(e=>!!t.match(e)):!1}function Y0(t){t=jC(t);let e=t.indexOf(\"#\");if(e===-1)return{repo:t,treeish:{protocol:\"head\",request:\"HEAD\"},extra:{}};let r=t.slice(0,e),s=t.slice(e+1);if(s.match(/^[a-z]+=/)){let a=qC.default.parse(s);for(let[p,h]of Object.entries(a))if(typeof h!=\"string\")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(dS).find(p=>Object.hasOwn(a,p)),[c,f]=typeof n<\"u\"?[n,a[n]]:[\"head\",\"HEAD\"];for(let p of Object.values(dS))delete a[p];return{repo:r,treeish:{protocol:c,request:f},extra:a}}else{let a=s.indexOf(\":\"),[n,c]=a===-1?[null,s]:[s.slice(0,a),s.slice(a+1)];return{repo:r,treeish:{protocol:n,request:c},extra:{}}}}function USt(t){return q.makeLocator(t,jC(t.reference))}function J5(t,{configuration:e}){let r=jC(t,{git:!0});if(!An.getNetworkSettings(`https://${(0,RBe.default)(r).resource}`,{configuration:e}).enableNetwork)throw new Yt(80,`Request to '${r}' has been blocked because of your configuration settings`);return r}async function OBe(t,e){let r=J5(t,{configuration:e}),s=await K5(\"listing refs\",[\"ls-remote\",r],{cwd:e.startingCwd,env:NBe()},{configuration:e,normalizedRepoUrl:r}),a=new Map,n=/^([a-f0-9]{40})\\t([^\\n]+)/gm,c;for(;(c=n.exec(s.stdout))!==null;)a.set(c[2],c[1]);return a}async function z5(t,e){let{repo:r,treeish:{protocol:s,request:a},extra:n}=Y0(t),c=await OBe(r,e),f=(h,E)=>{switch(h){case\"commit\":{if(!E.match(/^[a-f0-9]{40}$/))throw new Error(\"Invalid commit hash\");return qC.default.stringify({...n,commit:E})}case\"head\":{let C=c.get(E===\"HEAD\"?E:`refs/heads/${E}`);if(typeof C>\"u\")throw new Error(`Unknown head (\"${E}\")`);return qC.default.stringify({...n,commit:C})}case\"tag\":{let C=c.get(`refs/tags/${E}`);if(typeof C>\"u\")throw new Error(`Unknown tag (\"${E}\")`);return qC.default.stringify({...n,commit:C})}case\"semver\":{let C=Or.validRange(E);if(!C)throw new Error(`Invalid range (\"${E}\")`);let S=new Map([...c.entries()].filter(([I])=>I.startsWith(\"refs/tags/\")).map(([I,R])=>[V5.default.parse(I.slice(10)),R]).filter(I=>I[0]!==null)),P=V5.default.maxSatisfying([...S.keys()],C);if(P===null)throw new Error(`No matching range (\"${E}\")`);return qC.default.stringify({...n,commit:S.get(P)})}case null:{let C;if((C=p(\"commit\",E))!==null||(C=p(\"tag\",E))!==null||(C=p(\"head\",E))!==null)return C;throw E.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve \"${E}\" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve \"${E}\" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol (\"${h}\")`)}},p=(h,E)=>{try{return f(h,E)}catch{return null}};return jC(`${r}#${f(s,a)}`)}async function Z5(t,e){return await e.getLimit(\"cloneConcurrency\")(async()=>{let{repo:r,treeish:{protocol:s,request:a}}=Y0(t);if(s!==\"commit\")throw new Error(\"Invalid treeish protocol when cloning\");let n=J5(r,{configuration:e}),c=await le.mktempPromise(),f={cwd:c,env:NBe()};return await K5(\"cloning the repository\",[\"clone\",\"-c core.autocrlf=false\",n,ue.fromPortablePath(c)],f,{configuration:e,normalizedRepoUrl:n}),await K5(\"switching branch\",[\"checkout\",`${a}`],f,{configuration:e,normalizedRepoUrl:n}),c})}async function LBe(t){let e,r=t;do{if(e=r,await le.existsPromise(K.join(e,\".git\")))return e;r=K.dirname(e)}while(r!==e);return null}async function MBe(t,{baseRefs:e}){if(e.length===0)throw new nt(\"Can't run this command with zero base refs specified.\");let r=[];for(let f of e){let{code:p}=await Gr.execvp(\"git\",[\"merge-base\",f,\"HEAD\"],{cwd:t});p===0&&r.push(f)}if(r.length===0)throw new nt(`No ancestor could be found between any of HEAD and ${e.join(\", \")}`);let{stdout:s}=await Gr.execvp(\"git\",[\"merge-base\",\"HEAD\",...r],{cwd:t,strict:!0}),a=s.trim(),{stdout:n}=await Gr.execvp(\"git\",[\"show\",\"--quiet\",\"--pretty=format:%s\",a],{cwd:t,strict:!0}),c=n.trim();return{hash:a,title:c}}async function _Be(t,{base:e,project:r}){let s=je.buildIgnorePattern(r.configuration.get(\"changesetIgnorePatterns\")),{stdout:a}=await Gr.execvp(\"git\",[\"diff\",\"--name-only\",`${e}`],{cwd:t,strict:!0}),n=a.split(/\\r\\n|\\r|\\n/).filter(h=>h.length>0).map(h=>K.resolve(t,ue.toPortablePath(h))),{stdout:c}=await Gr.execvp(\"git\",[\"ls-files\",\"--others\",\"--exclude-standard\"],{cwd:t,strict:!0}),f=c.split(/\\r\\n|\\r|\\n/).filter(h=>h.length>0).map(h=>K.resolve(t,ue.toPortablePath(h))),p=[...new Set([...n,...f].sort())];return s?p.filter(h=>!K.relative(r.cwd,h).match(s)):p}async function HSt({ref:t,project:e}){if(e.configuration.projectCwd===null)throw new nt(\"This command can only be run from within a Yarn project\");let r=[K.resolve(e.cwd,Er.lockfile),K.resolve(e.cwd,e.configuration.get(\"cacheFolder\")),K.resolve(e.cwd,e.configuration.get(\"installStatePath\")),K.resolve(e.cwd,e.configuration.get(\"virtualFolder\"))];await e.configuration.triggerHook(c=>c.populateYarnPaths,e,c=>{c!=null&&r.push(c)});let s=await LBe(e.configuration.projectCwd);if(s==null)throw new nt(\"This command can only be run on Git repositories\");let a=await MBe(s,{baseRefs:typeof t==\"string\"?[t]:e.configuration.get(\"changesetBaseRefs\")}),n=await _Be(s,{base:a.hash,project:e});return new Set(je.mapAndFilter(n,c=>{let f=e.tryWorkspaceByFilePath(c);return f===null?je.mapAndFilter.skip:r.some(p=>c.startsWith(p))?je.mapAndFilter.skip:f}))}async function K5(t,e,r,{configuration:s,normalizedRepoUrl:a}){try{return await Gr.execvp(\"git\",e,{...r,strict:!0})}catch(n){if(!(n instanceof Gr.ExecError))throw n;let c=n.reportExtra,f=n.stderr.toString();throw new Yt(1,`Failed ${t}`,p=>{p.reportError(1,`  ${he.prettyField(s,{label:\"Repository URL\",value:he.tuple(he.Type.URL,a)})}`);for(let h of f.matchAll(/^(.+?): (.*)$/gm)){let[,E,C]=h;E=E.toLowerCase();let S=E===\"error\"?\"Error\":`${(0,FBe.default)(E)} Error`;p.reportError(1,`  ${he.prettyField(s,{label:S,value:he.tuple(he.Type.NO_HINT,C)})}`)}c?.(p)})}}var mS=class{supports(e,r){return GC(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,a=new Map(r.checksums);a.set(e.locatorHash,s);let n={...r,checksums:a},c=await this.downloadHosted(e,n);if(c!==null)return c;let[f,p,h]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(e,n),...r.cacheOptions});return{packageFs:f,releaseFs:p,prefixPath:q.getIdentVendorPath(e),checksum:h}}async downloadHosted(e,r){return r.project.configuration.reduceHook(s=>s.fetchHostedRepository,null,e,r)}async cloneFromRemote(e,r){let s=Y0(e.reference),a=await Z5(e.reference,r.project.configuration),n=K.resolve(a,s.extra.cwd??vt.dot),c=K.join(n,\"package.tgz\");await In.prepareExternalProject(n,c,{configuration:r.project.configuration,report:r.report,workspace:s.extra.workspace,locator:e});let f=await le.readFilePromise(c);return await je.releaseAfterUseAsync(async()=>await hs.convertToZip(f,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1}))}};Ve();Ve();var yS=class{supportsDescriptor(e,r){return GC(e.range)}supportsLocator(e,r){return GC(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=await z5(e.range,s.project.configuration);return[q.makeLocator(e,a)]}async getSatisfying(e,r,s,a){let n=Y0(e.range);return{locators:s.filter(f=>{if(f.identHash!==e.identHash)return!1;let p=Y0(f.reference);return!(n.repo!==p.repo||n.treeish.protocol===\"commit\"&&n.treeish.request!==p.treeish.request)}),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var jSt={configuration:{changesetBaseRefs:{description:\"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.\",type:\"STRING\",isArray:!0,isNullable:!1,default:[\"master\",\"origin/master\",\"upstream/master\",\"main\",\"origin/main\",\"upstream/main\"]},changesetIgnorePatterns:{description:\"Array of glob patterns; files matching them will be ignored when fetching the changed files\",type:\"STRING\",default:[],isArray:!0},cloneConcurrency:{description:\"Maximal number of concurrent clones\",type:\"NUMBER\",default:2}},fetchers:[mS],resolvers:[yS]};var qSt=jSt;Wt();var WC=class extends ut{constructor(){super(...arguments);this.since=ge.String(\"--since\",{description:\"Only include workspaces that have been changed since the specified ref.\",tolerateBoolean:!0});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Find packages via dependencies/devDependencies instead of using the workspaces field\"});this.noPrivate=ge.Boolean(\"--no-private\",{description:\"Exclude workspaces that have the private field set to true\"});this.verbose=ge.Boolean(\"-v,--verbose\",!1,{description:\"Also return the cross-dependencies between workspaces\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"workspaces\",\"list\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"list all available workspaces\",details:\"\\n      This command will print the list of all workspaces in the project.\\n\\n      - If `--since` is set, Yarn will only list workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\\n\\n      - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\\n\\n      - If `--no-private` is set, Yarn will not list any workspaces that have the `private` field set to `true`.\\n\\n      - If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{let c=this.since?await Qa.fetchChangedWorkspaces({ref:this.since,project:s}):s.workspaces,f=new Set(c);if(this.recursive)for(let p of[...c].map(h=>h.getRecursiveWorkspaceDependents()))for(let h of p)f.add(h);for(let p of f){let{manifest:h}=p;if(h.private&&this.noPrivate)continue;let E;if(this.verbose){let C=new Set,S=new Set;for(let P of Ht.hardDependencies)for(let[I,R]of h.getForScope(P)){let N=s.tryWorkspaceByDescriptor(R);N===null?s.workspacesByIdent.has(I)&&S.add(R):C.add(N)}E={workspaceDependencies:Array.from(C).map(P=>P.relativeCwd),mismatchedWorkspaceDependencies:Array.from(S).map(P=>q.stringifyDescriptor(P))}}n.reportInfo(null,`${p.relativeCwd}`),n.reportJson({location:p.relativeCwd,name:h.name?q.stringifyIdent(h.name):null,...E})}})).exitCode()}};Ve();Ve();Wt();var YC=class extends ut{constructor(){super(...arguments);this.workspaceName=ge.String();this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"workspace\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"run a command within the specified workspace\",details:`\n      This command will run a given sub-command on a single workspace.\n    `,examples:[[\"Add a package to a single workspace\",\"yarn workspace components add -D react\"],[\"Run build script on a single workspace\",\"yarn workspace components run build\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=s.workspaces,c=new Map(n.map(p=>[q.stringifyIdent(p.anchoredLocator),p])),f=c.get(this.workspaceName);if(f===void 0){let p=Array.from(c.keys()).sort();throw new nt(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:\n  - ${p.join(`\n  - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:f.cwd})}};var GSt={configuration:{enableImmutableInstalls:{description:\"If true (the default on CI), prevents the install command from modifying the lockfile\",type:\"BOOLEAN\",default:UBe.isCI},defaultSemverRangePrefix:{description:\"The default save prefix: '^', '~' or ''\",type:\"STRING\",values:[\"^\",\"~\",\"\"],default:\"^\"},preferReuse:{description:\"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.\",type:\"BOOLEAN\",default:!1}},commands:[cC,uC,fC,AC,MC,xC,CC,WC,gC,dC,mC,yC,aC,lC,pC,hC,EC,IC,wC,BC,vC,SC,_C,DC,bC,QC,kC,TC,PC,RC,FC,NC,OC,LC,UC,HC,YC]},WSt=GSt;var i9={};Vt(i9,{default:()=>VSt});Ve();var Qt={optional:!0},e9=[[\"@tailwindcss/aspect-ratio@<0.2.1\",{peerDependencies:{tailwindcss:\"^2.0.2\"}}],[\"@tailwindcss/line-clamp@<0.2.1\",{peerDependencies:{tailwindcss:\"^2.0.2\"}}],[\"@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0\",{peerDependencies:{postcss:\"^8.0.0\"}}],[\"@samverschueren/stream-to-observable@<0.3.1\",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],[\"any-observable@<0.5.1\",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],[\"@pm2/agent@<1.0.4\",{dependencies:{debug:\"*\"}}],[\"debug@<4.2.0\",{peerDependenciesMeta:{\"supports-color\":Qt}}],[\"got@<11\",{dependencies:{\"@types/responselike\":\"^1.0.0\",\"@types/keyv\":\"^3.1.1\"}}],[\"cacheable-lookup@<4.1.2\",{dependencies:{\"@types/keyv\":\"^3.1.1\"}}],[\"http-link-dataloader@*\",{peerDependencies:{graphql:\"^0.13.1 || ^14.0.0\"}}],[\"typescript-language-server@*\",{dependencies:{\"vscode-jsonrpc\":\"^5.0.1\",\"vscode-languageserver-protocol\":\"^3.15.0\"}}],[\"postcss-syntax@*\",{peerDependenciesMeta:{\"postcss-html\":Qt,\"postcss-jsx\":Qt,\"postcss-less\":Qt,\"postcss-markdown\":Qt,\"postcss-scss\":Qt}}],[\"jss-plugin-rule-value-function@<=10.1.1\",{dependencies:{\"tiny-warning\":\"^1.0.2\"}}],[\"ink-select-input@<4.1.0\",{peerDependencies:{react:\"^16.8.2\"}}],[\"license-webpack-plugin@<2.3.18\",{peerDependenciesMeta:{webpack:Qt}}],[\"snowpack@>=3.3.0\",{dependencies:{\"node-gyp\":\"^7.1.0\"}}],[\"promise-inflight@*\",{peerDependenciesMeta:{bluebird:Qt}}],[\"reactcss@*\",{peerDependencies:{react:\"*\"}}],[\"react-color@<=2.19.0\",{peerDependencies:{react:\"*\"}}],[\"gatsby-plugin-i18n@*\",{dependencies:{ramda:\"^0.24.1\"}}],[\"useragent@^2.0.0\",{dependencies:{request:\"^2.88.0\",yamlparser:\"0.0.x\",semver:\"5.5.x\"}}],[\"@apollographql/apollo-tools@<=0.5.2\",{peerDependencies:{graphql:\"^14.2.1 || ^15.0.0\"}}],[\"material-table@^2.0.0\",{dependencies:{\"@babel/runtime\":\"^7.11.2\"}}],[\"@babel/parser@*\",{dependencies:{\"@babel/types\":\"^7.8.3\"}}],[\"fork-ts-checker-webpack-plugin@<=6.3.4\",{peerDependencies:{eslint:\">= 6\",typescript:\">= 2.7\",webpack:\">= 4\",\"vue-template-compiler\":\"*\"},peerDependenciesMeta:{eslint:Qt,\"vue-template-compiler\":Qt}}],[\"rc-animate@<=3.1.1\",{peerDependencies:{react:\">=16.9.0\",\"react-dom\":\">=16.9.0\"}}],[\"react-bootstrap-table2-paginator@*\",{dependencies:{classnames:\"^2.2.6\"}}],[\"react-draggable@<=4.4.3\",{peerDependencies:{react:\">= 16.3.0\",\"react-dom\":\">= 16.3.0\"}}],[\"apollo-upload-client@<14\",{peerDependencies:{graphql:\"14 - 15\"}}],[\"react-instantsearch-core@<=6.7.0\",{peerDependencies:{algoliasearch:\">= 3.1 < 5\"}}],[\"react-instantsearch-dom@<=6.7.0\",{dependencies:{\"react-fast-compare\":\"^3.0.0\"}}],[\"ws@<7.2.1\",{peerDependencies:{bufferutil:\"^4.0.1\",\"utf-8-validate\":\"^5.0.2\"},peerDependenciesMeta:{bufferutil:Qt,\"utf-8-validate\":Qt}}],[\"react-portal@<4.2.2\",{peerDependencies:{\"react-dom\":\"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0\"}}],[\"react-scripts@<=4.0.1\",{peerDependencies:{react:\"*\"}}],[\"testcafe@<=1.10.1\",{dependencies:{\"@babel/plugin-transform-for-of\":\"^7.12.1\",\"@babel/runtime\":\"^7.12.5\"}}],[\"testcafe-legacy-api@<=4.2.0\",{dependencies:{\"testcafe-hammerhead\":\"^17.0.1\",\"read-file-relative\":\"^1.2.0\"}}],[\"@google-cloud/firestore@<=4.9.3\",{dependencies:{protobufjs:\"^6.8.6\"}}],[\"gatsby-source-apiserver@*\",{dependencies:{\"babel-polyfill\":\"^6.26.0\"}}],[\"@webpack-cli/package-utils@<=1.0.1-alpha.4\",{dependencies:{\"cross-spawn\":\"^7.0.3\"}}],[\"gatsby-remark-prismjs@<3.3.28\",{dependencies:{lodash:\"^4\"}}],[\"gatsby-plugin-favicon@*\",{peerDependencies:{webpack:\"*\"}}],[\"gatsby-plugin-sharp@<=4.6.0-next.3\",{dependencies:{debug:\"^4.3.1\"}}],[\"gatsby-react-router-scroll@<=5.6.0-next.0\",{dependencies:{\"prop-types\":\"^15.7.2\"}}],[\"@rebass/forms@*\",{dependencies:{\"@styled-system/should-forward-prop\":\"^5.0.0\"},peerDependencies:{react:\"^16.8.6\"}}],[\"rebass@*\",{peerDependencies:{react:\"^16.8.6\"}}],[\"@ant-design/react-slick@<=0.28.3\",{peerDependencies:{react:\">=16.0.0\"}}],[\"mqtt@<4.2.7\",{dependencies:{duplexify:\"^4.1.1\"}}],[\"vue-cli-plugin-vuetify@<=2.0.3\",{dependencies:{semver:\"^6.3.0\"},peerDependenciesMeta:{\"sass-loader\":Qt,\"vuetify-loader\":Qt}}],[\"vue-cli-plugin-vuetify@<=2.0.4\",{dependencies:{\"null-loader\":\"^3.0.0\"}}],[\"vue-cli-plugin-vuetify@>=2.4.3\",{peerDependencies:{vue:\"*\"}}],[\"@vuetify/cli-plugin-utils@<=0.0.4\",{dependencies:{semver:\"^6.3.0\"},peerDependenciesMeta:{\"sass-loader\":Qt}}],[\"@vue/cli-plugin-typescript@<=5.0.0-alpha.0\",{dependencies:{\"babel-loader\":\"^8.1.0\"}}],[\"@vue/cli-plugin-typescript@<=5.0.0-beta.0\",{dependencies:{\"@babel/core\":\"^7.12.16\"},peerDependencies:{\"vue-template-compiler\":\"^2.0.0\"},peerDependenciesMeta:{\"vue-template-compiler\":Qt}}],[\"cordova-ios@<=6.3.0\",{dependencies:{underscore:\"^1.9.2\"}}],[\"cordova-lib@<=10.0.1\",{dependencies:{underscore:\"^1.9.2\"}}],[\"git-node-fs@*\",{peerDependencies:{\"js-git\":\"^0.7.8\"},peerDependenciesMeta:{\"js-git\":Qt}}],[\"consolidate@<0.16.0\",{peerDependencies:{mustache:\"^3.0.0\"},peerDependenciesMeta:{mustache:Qt}}],[\"consolidate@<=0.16.0\",{peerDependencies:{velocityjs:\"^2.0.1\",tinyliquid:\"^0.2.34\",\"liquid-node\":\"^3.0.1\",jade:\"^1.11.0\",\"then-jade\":\"*\",dust:\"^0.3.0\",\"dustjs-helpers\":\"^1.7.4\",\"dustjs-linkedin\":\"^2.7.5\",swig:\"^1.4.2\",\"swig-templates\":\"^2.0.3\",\"razor-tmpl\":\"^1.3.1\",atpl:\">=0.7.6\",liquor:\"^0.0.5\",twig:\"^1.15.2\",ejs:\"^3.1.5\",eco:\"^1.1.0-rc-3\",jazz:\"^0.0.18\",jqtpl:\"~1.1.0\",hamljs:\"^0.6.2\",hamlet:\"^0.3.3\",whiskers:\"^0.4.0\",\"haml-coffee\":\"^1.14.1\",\"hogan.js\":\"^3.0.2\",templayed:\">=0.2.3\",handlebars:\"^4.7.6\",underscore:\"^1.11.0\",lodash:\"^4.17.20\",pug:\"^3.0.0\",\"then-pug\":\"*\",qejs:\"^3.0.5\",walrus:\"^0.10.1\",mustache:\"^4.0.1\",just:\"^0.1.8\",ect:\"^0.5.9\",mote:\"^0.2.0\",toffee:\"^0.3.6\",dot:\"^1.1.3\",\"bracket-template\":\"^1.1.5\",ractive:\"^1.3.12\",nunjucks:\"^3.2.2\",htmling:\"^0.0.8\",\"babel-core\":\"^6.26.3\",plates:\"~0.4.11\",\"react-dom\":\"^16.13.1\",react:\"^16.13.1\",\"arc-templates\":\"^0.5.3\",vash:\"^0.13.0\",slm:\"^2.0.0\",marko:\"^3.14.4\",teacup:\"^2.0.0\",\"coffee-script\":\"^1.12.7\",squirrelly:\"^5.1.0\",twing:\"^5.0.2\"},peerDependenciesMeta:{velocityjs:Qt,tinyliquid:Qt,\"liquid-node\":Qt,jade:Qt,\"then-jade\":Qt,dust:Qt,\"dustjs-helpers\":Qt,\"dustjs-linkedin\":Qt,swig:Qt,\"swig-templates\":Qt,\"razor-tmpl\":Qt,atpl:Qt,liquor:Qt,twig:Qt,ejs:Qt,eco:Qt,jazz:Qt,jqtpl:Qt,hamljs:Qt,hamlet:Qt,whiskers:Qt,\"haml-coffee\":Qt,\"hogan.js\":Qt,templayed:Qt,handlebars:Qt,underscore:Qt,lodash:Qt,pug:Qt,\"then-pug\":Qt,qejs:Qt,walrus:Qt,mustache:Qt,just:Qt,ect:Qt,mote:Qt,toffee:Qt,dot:Qt,\"bracket-template\":Qt,ractive:Qt,nunjucks:Qt,htmling:Qt,\"babel-core\":Qt,plates:Qt,\"react-dom\":Qt,react:Qt,\"arc-templates\":Qt,vash:Qt,slm:Qt,marko:Qt,teacup:Qt,\"coffee-script\":Qt,squirrelly:Qt,twing:Qt}}],[\"vue-loader@<=16.3.3\",{peerDependencies:{\"@vue/compiler-sfc\":\"^3.0.8\",webpack:\"^4.1.0 || ^5.0.0-0\"},peerDependenciesMeta:{\"@vue/compiler-sfc\":Qt}}],[\"vue-loader@^16.7.0\",{peerDependencies:{\"@vue/compiler-sfc\":\"^3.0.8\",vue:\"^3.2.13\"},peerDependenciesMeta:{\"@vue/compiler-sfc\":Qt,vue:Qt}}],[\"scss-parser@<=1.0.5\",{dependencies:{lodash:\"^4.17.21\"}}],[\"query-ast@<1.0.5\",{dependencies:{lodash:\"^4.17.21\"}}],[\"redux-thunk@<=2.3.0\",{peerDependencies:{redux:\"^4.0.0\"}}],[\"skypack@<=0.3.2\",{dependencies:{tar:\"^6.1.0\"}}],[\"@npmcli/metavuln-calculator@<2.0.0\",{dependencies:{\"json-parse-even-better-errors\":\"^2.3.1\"}}],[\"bin-links@<2.3.0\",{dependencies:{\"mkdirp-infer-owner\":\"^1.0.2\"}}],[\"rollup-plugin-polyfill-node@<=0.8.0\",{peerDependencies:{rollup:\"^1.20.0 || ^2.0.0\"}}],[\"snowpack@<3.8.6\",{dependencies:{\"magic-string\":\"^0.25.7\"}}],[\"elm-webpack-loader@*\",{dependencies:{temp:\"^0.9.4\"}}],[\"winston-transport@<=4.4.0\",{dependencies:{logform:\"^2.2.0\"}}],[\"jest-vue-preprocessor@*\",{dependencies:{\"@babel/core\":\"7.8.7\",\"@babel/template\":\"7.8.6\"},peerDependencies:{pug:\"^2.0.4\"},peerDependenciesMeta:{pug:Qt}}],[\"redux-persist@*\",{peerDependencies:{react:\">=16\"},peerDependenciesMeta:{react:Qt}}],[\"sodium@>=3\",{dependencies:{\"node-gyp\":\"^3.8.0\"}}],[\"babel-plugin-graphql-tag@<=3.1.0\",{peerDependencies:{graphql:\"^14.0.0 || ^15.0.0\"}}],[\"@playwright/test@<=1.14.1\",{dependencies:{\"jest-matcher-utils\":\"^26.4.2\"}}],...[\"babel-plugin-remove-graphql-queries@<3.14.0-next.1\",\"babel-preset-gatsby-package@<1.14.0-next.1\",\"create-gatsby@<1.14.0-next.1\",\"gatsby-admin@<0.24.0-next.1\",\"gatsby-cli@<3.14.0-next.1\",\"gatsby-core-utils@<2.14.0-next.1\",\"gatsby-design-tokens@<3.14.0-next.1\",\"gatsby-legacy-polyfills@<1.14.0-next.1\",\"gatsby-plugin-benchmark-reporting@<1.14.0-next.1\",\"gatsby-plugin-graphql-config@<0.23.0-next.1\",\"gatsby-plugin-image@<1.14.0-next.1\",\"gatsby-plugin-mdx@<2.14.0-next.1\",\"gatsby-plugin-netlify-cms@<5.14.0-next.1\",\"gatsby-plugin-no-sourcemaps@<3.14.0-next.1\",\"gatsby-plugin-page-creator@<3.14.0-next.1\",\"gatsby-plugin-preact@<5.14.0-next.1\",\"gatsby-plugin-preload-fonts@<2.14.0-next.1\",\"gatsby-plugin-schema-snapshot@<2.14.0-next.1\",\"gatsby-plugin-styletron@<6.14.0-next.1\",\"gatsby-plugin-subfont@<3.14.0-next.1\",\"gatsby-plugin-utils@<1.14.0-next.1\",\"gatsby-recipes@<0.25.0-next.1\",\"gatsby-source-shopify@<5.6.0-next.1\",\"gatsby-source-wikipedia@<3.14.0-next.1\",\"gatsby-transformer-screenshot@<3.14.0-next.1\",\"gatsby-worker@<0.5.0-next.1\"].map(t=>[t,{dependencies:{\"@babel/runtime\":\"^7.14.8\"}}]),[\"gatsby-core-utils@<2.14.0-next.1\",{dependencies:{got:\"8.3.2\"}}],[\"gatsby-plugin-gatsby-cloud@<=3.1.0-next.0\",{dependencies:{\"gatsby-core-utils\":\"^2.13.0-next.0\"}}],[\"gatsby-plugin-gatsby-cloud@<=3.2.0-next.1\",{peerDependencies:{webpack:\"*\"}}],[\"babel-plugin-remove-graphql-queries@<=3.14.0-next.1\",{dependencies:{\"gatsby-core-utils\":\"^2.8.0-next.1\"}}],[\"gatsby-plugin-netlify@3.13.0-next.1\",{dependencies:{\"gatsby-core-utils\":\"^2.13.0-next.0\"}}],[\"clipanion-v3-codemod@<=0.2.0\",{peerDependencies:{jscodeshift:\"^0.11.0\"}}],[\"react-live@*\",{peerDependencies:{\"react-dom\":\"*\",react:\"*\"}}],[\"webpack@<4.44.1\",{peerDependenciesMeta:{\"webpack-cli\":Qt,\"webpack-command\":Qt}}],[\"webpack@<5.0.0-beta.23\",{peerDependenciesMeta:{\"webpack-cli\":Qt}}],[\"webpack-dev-server@<3.10.2\",{peerDependenciesMeta:{\"webpack-cli\":Qt}}],[\"@docusaurus/responsive-loader@<1.5.0\",{peerDependenciesMeta:{sharp:Qt,jimp:Qt}}],[\"eslint-module-utils@*\",{peerDependenciesMeta:{\"eslint-import-resolver-node\":Qt,\"eslint-import-resolver-typescript\":Qt,\"eslint-import-resolver-webpack\":Qt,\"@typescript-eslint/parser\":Qt}}],[\"eslint-plugin-import@*\",{peerDependenciesMeta:{\"@typescript-eslint/parser\":Qt}}],[\"critters-webpack-plugin@<3.0.2\",{peerDependenciesMeta:{\"html-webpack-plugin\":Qt}}],[\"terser@<=5.10.0\",{dependencies:{acorn:\"^8.5.0\"}}],[\"babel-preset-react-app@10.0.x <10.0.2\",{dependencies:{\"@babel/plugin-proposal-private-property-in-object\":\"^7.16.7\"}}],[\"eslint-config-react-app@*\",{peerDependenciesMeta:{typescript:Qt}}],[\"@vue/eslint-config-typescript@<11.0.0\",{peerDependenciesMeta:{typescript:Qt}}],[\"unplugin-vue2-script-setup@<0.9.1\",{peerDependencies:{\"@vue/composition-api\":\"^1.4.3\",\"@vue/runtime-dom\":\"^3.2.26\"}}],[\"@cypress/snapshot@*\",{dependencies:{debug:\"^3.2.7\"}}],[\"auto-relay@<=0.14.0\",{peerDependencies:{\"reflect-metadata\":\"^0.1.13\"}}],[\"vue-template-babel-compiler@<1.2.0\",{peerDependencies:{\"vue-template-compiler\":\"^2.6.0\"}}],[\"@parcel/transformer-image@<2.5.0\",{peerDependencies:{\"@parcel/core\":\"*\"}}],[\"@parcel/transformer-js@<2.5.0\",{peerDependencies:{\"@parcel/core\":\"*\"}}],[\"parcel@*\",{peerDependenciesMeta:{\"@parcel/core\":Qt}}],[\"react-scripts@*\",{peerDependencies:{eslint:\"*\"}}],[\"focus-trap-react@^8.0.0\",{dependencies:{tabbable:\"^5.3.2\"}}],[\"react-rnd@<10.3.7\",{peerDependencies:{react:\">=16.3.0\",\"react-dom\":\">=16.3.0\"}}],[\"connect-mongo@<5.0.0\",{peerDependencies:{\"express-session\":\"^1.17.1\"}}],[\"vue-i18n@<9\",{peerDependencies:{vue:\"^2\"}}],[\"vue-router@<4\",{peerDependencies:{vue:\"^2\"}}],[\"unified@<10\",{dependencies:{\"@types/unist\":\"^2.0.0\"}}],[\"react-github-btn@<=1.3.0\",{peerDependencies:{react:\">=16.3.0\"}}],[\"react-dev-utils@*\",{peerDependencies:{typescript:\">=2.7\",webpack:\">=4\"},peerDependenciesMeta:{typescript:Qt}}],[\"@asyncapi/react-component@<=1.0.0-next.39\",{peerDependencies:{react:\">=16.8.0\",\"react-dom\":\">=16.8.0\"}}],[\"xo@*\",{peerDependencies:{webpack:\">=1.11.0\"},peerDependenciesMeta:{webpack:Qt}}],[\"babel-plugin-remove-graphql-queries@<=4.20.0-next.0\",{dependencies:{\"@babel/types\":\"^7.15.4\"}}],[\"gatsby-plugin-page-creator@<=4.20.0-next.1\",{dependencies:{\"fs-extra\":\"^10.1.0\"}}],[\"gatsby-plugin-utils@<=3.14.0-next.1\",{dependencies:{fastq:\"^1.13.0\"},peerDependencies:{graphql:\"^15.0.0\"}}],[\"gatsby-plugin-mdx@<3.1.0-next.1\",{dependencies:{mkdirp:\"^1.0.4\"}}],[\"gatsby-plugin-mdx@^2\",{peerDependencies:{gatsby:\"^3.0.0-next\"}}],[\"fdir@<=5.2.0\",{peerDependencies:{picomatch:\"2.x\"},peerDependenciesMeta:{picomatch:Qt}}],[\"babel-plugin-transform-typescript-metadata@<=0.3.2\",{peerDependencies:{\"@babel/core\":\"^7\",\"@babel/traverse\":\"^7\"},peerDependenciesMeta:{\"@babel/traverse\":Qt}}],[\"graphql-compose@>=9.0.10\",{peerDependencies:{graphql:\"^14.2.0 || ^15.0.0 || ^16.0.0\"}}],[\"vite-plugin-vuetify@<=1.0.2\",{peerDependencies:{vue:\"^3.0.0\"}}],[\"webpack-plugin-vuetify@<=2.0.1\",{peerDependencies:{vue:\"^3.2.6\"}}],[\"eslint-import-resolver-vite@<2.0.1\",{dependencies:{debug:\"^4.3.4\",resolve:\"^1.22.8\"}}],[\"notistack@^3.0.0\",{dependencies:{csstype:\"^3.0.10\"}}]];var t9;function HBe(){return typeof t9>\"u\"&&(t9=ye(\"zlib\").brotliDecompressSync(Buffer.from(\"G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==\",\"base64\")).toString()),t9}var r9;function jBe(){return typeof r9>\"u\"&&(r9=ye(\"zlib\").brotliDecompressSync(Buffer.from(\"G8MSIIzURnVBnObTcvb3XE6v2S9Qgc2K801Oa5otNKEtK8BINZNcaQHy+9/vf/WXBimwutXC33P2DPc64pps5rz7NGGWaOKNSPL4Y2KRE8twut2lFOIN+OXPtRmPMRhMTILib2bEQx43az2I5d3YS8Roa5UZpF/ujHb3Djd3GDvYUfvFYSUQ39vb2cmifp/rgB4J/65JK3wRBTvMBoNBmn3mbXC63/gbBkW/2IRPri0O8bcsRBsmarF328pAln04nyJFkwUAvNu934supAqLtyerZZpJ8I8suJHhf/ocMV+scKwa8NOiDKIPXw6Ex/EEZD6TEGaW8N5zvNHYF10l6Lfooj7D5W2k3dgvQSbp2Wv8TGOayS978gxlOLVjTGXs66ozewbrjwElLtyrYNnWTfzzdEutgROUFPVMhnMoy8EjJLLlWwIEoySxliim9kYW30JUHiPVyjt0iAw/ZpPmCbUCltYPnq6ZNblIKhTNhqS/oqC9iya5sGKZTOVsTEg34n92uZTf2iPpcZih8rPW8CzA+adIGmyCPcKdLMsBLShd+zuEbTrqpwuh+DLmracZcjPC5Sdf5odDAhKpFuOsQS67RT+1VgWWygSv3YwxDnylc04/PYuaMeIzhBkLrvs7e/OUzRTF56MmfY6rI63QtEjEQzq637zQqJ39nNhu3NmoRRhW/086bHGBUtx0PE0j3aEGvkdh9WJC8y8j8mqqke9/dQ5la+Q3ba4RlhvTbnfQhPDDab3tUifkjKuOsp13mXEmO00Mu88F/M67R7LXfoFDFLNtgCSWjWX+3Jn1371pJTK9xPBiMJafvDjtFyAzu8rxeQ0TKMQXNPs5xxiBOd+BRJP8KP88XPtJIbZKh/cdW8KvBUkpqKpGoiIaA32c3/JnQr4efXt85mXvidOvn/eU3Pase1typLYBalJ14mCso9h79nuMOuCa/kZAOkJHmTjP5RM2WNoPasZUAnT1TAE/NH25hUxcQv6hQWR/m1PKk4ooXMcM4SR1iYU3fUohvqk4RY2hbmTVVIXv6TvqO+0doOjgeVFAcom+RlwJQmOVH7pr1Q9LoJT6n1DeQEB+NHygsATbIwTcOKZlJsY8G4+suX1uQLjUWwLjjs0mvSvZcLTpIGAekeR7GCgl8eo3ndAqEe2XCav4huliHjdbIPBsGJuPX7lrO9HX1UbXRH5opOe1x6JsOSgHZR+EaxuXVhpLLxm6jk1LJtZfHSc6BKPun3CpYYVMJGwEUyk8MTGG0XL5MfEwaXpnc9TKnBmlGn6nHiGREc3ysn47XIBDzA+YvFdjZzVIEDcKGpS6PbUJehFRjEne8D0lVU1XuRtlgszq6pTNlQ/3MzNOEgCWPyTct22V2mEi2krizn5VDo9B19/X2DB3hCGRMM7ONbtnAcIx/OWB1u5uPbW1gsH8irXxT/IzG0PoXWYjhbMsH3KTuoOl5o17PulcgvsfTSnKFM354GWI8luqZnrswWjiXy3G+Vbyo1KMopFmmvBwNELgaS8z8dNZchx/Cl/xjddxhMcyqtzFyONb2Zdu90NkI8pAeufe7YlXrp53v8Dj/l8vWeVspRKBGXScBBPI/HinSTGmLDOGGOCIyH0JFdOZx0gWsacNlQLJMIrBhqRxXxHF/5pseWwejlAAvZ3klZSDSYY8mkToaWejXhgNomeGtx1DTLEUFMRkgF5yFB22WYdJnaWN14r1YJj81hGi45+jrADS5nYRhCiSlCJJ1nL8pYX+HDSMhdTEWyRcgHVp/IsUIZYMfT+YYncUQPgcxNGCHfZ88vDdrcUuaGIl6zhAsiaq7R5dfqrqXH/JcBhfjT8D0azayIyEz75Nxp6YkcyDxlJq3EXnJUpqDohJJOysL1t1uNiHESlvsxPb5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=\",\"base64\")).toString()),r9}var n9;function qBe(){return typeof n9>\"u\"&&(n9=ye(\"zlib\").brotliDecompressSync(Buffer.from(\"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\",\"base64\")).toString()),n9}var GBe=new Map([[q.makeIdent(null,\"fsevents\").identHash,HBe],[q.makeIdent(null,\"resolve\").identHash,jBe],[q.makeIdent(null,\"typescript\").identHash,qBe]]),YSt={hooks:{registerPackageExtensions:async(t,e)=>{for(let[r,s]of e9)e(q.parseDescriptor(r,!0),s)},getBuiltinPatch:async(t,e)=>{let r=\"compat/\";if(!e.startsWith(r))return;let s=q.parseIdent(e.slice(r.length)),a=GBe.get(s.identHash)?.();return typeof a<\"u\"?a:null},reduceDependency:async(t,e,r,s)=>typeof GBe.get(t.identHash)>\"u\"?t:q.makeDescriptor(t,q.makeRange({protocol:\"patch:\",source:q.stringifyDescriptor(t),selector:`optional!builtin<compat/${q.stringifyIdent(t)}>`,params:null}))}},VSt=YSt;var w9={};Vt(w9,{ConstraintsCheckCommand:()=>ew,ConstraintsQueryCommand:()=>XC,ConstraintsSourceCommand:()=>$C,default:()=>IDt});Ve();Ve();IS();var KC=class{constructor(e){this.project=e}createEnvironment(){let e=new VC([\"cwd\",\"ident\"]),r=new VC([\"workspace\",\"type\",\"ident\"]),s=new VC([\"ident\"]),a={manifestUpdates:new Map,reportedErrors:new Map},n=new Map,c=new Map;for(let f of this.project.storedPackages.values()){let p=Array.from(f.peerDependencies.values(),h=>[q.stringifyIdent(h),h.range]);n.set(f.locatorHash,{workspace:null,ident:q.stringifyIdent(f),version:f.version,dependencies:new Map,peerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional!==!0)),optionalPeerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional===!0))})}for(let f of this.project.storedPackages.values()){let p=n.get(f.locatorHash);p.dependencies=new Map(Array.from(f.dependencies.values(),h=>{let E=this.project.storedResolutions.get(h.descriptorHash);if(typeof E>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");let C=n.get(E);if(typeof C>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");return[q.stringifyIdent(h),C]})),p.dependencies.delete(p.ident)}for(let f of this.project.workspaces){let p=q.stringifyIdent(f.anchoredLocator),h=f.manifest.exportTo({}),E=n.get(f.anchoredLocator.locatorHash);if(typeof E>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");let C=(R,N,{caller:U=As.getCaller()}={})=>{let W=ES(R),te=je.getMapWithDefault(a.manifestUpdates,f.cwd),ie=je.getMapWithDefault(te,W),Ae=je.getSetWithDefault(ie,N);U!==null&&Ae.add(U)},S=R=>C(R,void 0,{caller:As.getCaller()}),P=R=>{je.getArrayWithDefault(a.reportedErrors,f.cwd).push(R)},I=e.insert({cwd:f.relativeCwd,ident:p,manifest:h,pkg:E,set:C,unset:S,error:P});c.set(f,I);for(let R of Ht.allDependencies)for(let N of f.manifest[R].values()){let U=q.stringifyIdent(N),W=()=>{C([R,U],void 0,{caller:As.getCaller()})},te=Ae=>{C([R,U],Ae,{caller:As.getCaller()})},ie=null;if(R!==\"peerDependencies\"&&(R!==\"dependencies\"||!f.manifest.devDependencies.has(N.identHash))){let Ae=f.anchoredPackage.dependencies.get(N.identHash);if(Ae){if(typeof Ae>\"u\")throw new Error(\"Assertion failed: The dependency should have been registered\");let ce=this.project.storedResolutions.get(Ae.descriptorHash);if(typeof ce>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");let me=n.get(ce);if(typeof me>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");ie=me}}r.insert({workspace:I,ident:U,range:N.range,type:R,resolution:ie,update:te,delete:W,error:P})}}for(let f of this.project.storedPackages.values()){let p=this.project.tryWorkspaceByLocator(f);if(!p)continue;let h=c.get(p);if(typeof h>\"u\")throw new Error(\"Assertion failed: The workspace should have been registered\");let E=n.get(f.locatorHash);if(typeof E>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");E.workspace=h}return{workspaces:e,dependencies:r,packages:s,result:a}}async process(){let e=this.createEnvironment(),r={Yarn:{workspace:a=>e.workspaces.find(a)[0]??null,workspaces:a=>e.workspaces.find(a),dependency:a=>e.dependencies.find(a)[0]??null,dependencies:a=>e.dependencies.find(a),package:a=>e.packages.find(a)[0]??null,packages:a=>e.packages.find(a)}},s=await this.project.loadUserConfig();return s?.constraints?(await s.constraints(r),e.result):null}};Ve();Ve();Wt();var XC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.query=ge.String()}static{this.paths=[[\"constraints\",\"query\"]]}static{this.usage=ot.Usage({category:\"Constraints-related commands\",description:\"query the constraints fact database\",details:`\n      This command will output all matches to the given prolog query.\n    `,examples:[[\"List all dependencies throughout the workspace\",\"yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'\"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(vS(),BS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a),c=this.query;return c.endsWith(\".\")||(c=`${c}.`),(await Ot.start({configuration:s,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(c)){let E=Array.from(Object.entries(h)),C=E.length,S=E.reduce((P,[I])=>Math.max(P,I.length),0);for(let P=0;P<C;P++){let[I,R]=E[P];p.reportInfo(null,`${yDt(P,C)}${I.padEnd(S,\" \")} = ${mDt(R)}`)}p.reportJson(h)}})).exitCode()}};function mDt(t){return typeof t!=\"string\"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function yDt(t,e){let r=t===0,s=t===e-1;return r&&s?\"\":r?\"\\u250C \":s?\"\\u2514 \":\"\\u2502 \"}Ve();Wt();var $C=class extends ut{constructor(){super(...arguments);this.verbose=ge.Boolean(\"-v,--verbose\",!1,{description:\"Also print the fact database automatically compiled from the workspace manifests\"})}static{this.paths=[[\"constraints\",\"source\"]]}static{this.usage=ot.Usage({category:\"Constraints-related commands\",description:\"print the source code for the constraints\",details:\"\\n      This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\\n    \",examples:[[\"Prints the source code\",\"yarn constraints source\"],[\"Print the source code and the fact database\",\"yarn constraints source -v\"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(vS(),BS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ve();Ve();Wt();IS();var ew=class extends ut{constructor(){super(...arguments);this.fix=ge.Boolean(\"--fix\",!1,{description:\"Attempt to automatically fix unambiguous issues, following a multi-pass process\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"constraints\"]]}static{this.usage=ot.Usage({category:\"Constraints-related commands\",description:\"check that the project constraints are met\",details:`\n      This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.\n\n      If the \\`--fix\\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.\n\n      For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.\n    `,examples:[[\"Check that all constraints are satisfied\",\"yarn constraints\"],[\"Autofix all unmet constraints\",\"yarn constraints --fix\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let a=await s.loadUserConfig(),n;if(a?.constraints)n=new KC(s);else{let{Constraints:h}=await Promise.resolve().then(()=>(vS(),BS));n=await h.find(s)}let c,f=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:C,remainingErrors:S}=lF(s,E,{fix:this.fix}),P=[];for(let[I,R]of C){let N=I.manifest.indent;I.manifest=new Ht,I.manifest.indent=N,I.manifest.load(R),P.push(I.persistManifest())}if(await Promise.all(P),!(C.size>0&&h>1)){c=ZBe(S,{configuration:r}),f=!1,p=!0;for(let[,I]of S)for(let R of I)R.fixable?f=!0:p=!1}}if(c.children.length===0)return 0;if(f){let h=p?`Those errors can all be fixed by running ${he.pretty(r,\"yarn constraints --fix\",he.Type.CODE)}`:`Errors prefixed by '\\u2699' can be fixed by running ${he.pretty(r,\"yarn constraints --fix\",he.Type.CODE)}`;await Ot.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return c.children=je.sortMap(c.children,h=>h.value[1]),ks.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};IS();var EDt={configuration:{enableConstraintsChecks:{description:\"If true, constraints will run during installs\",type:\"BOOLEAN\",default:!1},constraintsPath:{description:\"The path of the constraints file.\",type:\"ABSOLUTE_PATH\",default:\"./constraints.pro\"}},commands:[XC,$C,ew],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get(\"enableConstraintsChecks\"))return;let r=await t.loadUserConfig(),s;if(r?.constraints)s=new KC(t);else{let{Constraints:c}=await Promise.resolve().then(()=>(vS(),BS));s=await c.find(t)}let a=await s.process();if(!a)return;let{remainingErrors:n}=lF(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[c,f]of n)for(let p of f)e(84,`${he.pretty(t.configuration,c.anchoredLocator,he.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${he.pretty(t.configuration,\"yarn constraints\",he.Type.CODE)} for more details`)}}},IDt=EDt;var B9={};Vt(B9,{CreateCommand:()=>tw,DlxCommand:()=>rw,default:()=>wDt});Ve();Wt();var tw=class extends ut{constructor(){super(...arguments);this.pkg=ge.String(\"-p,--package\",{description:\"The package to run the provided command from\"});this.quiet=ge.Boolean(\"-q,--quiet\",!1,{description:\"Only report critical errors instead of printing the full install logs\"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"create\"]]}async execute(){let r=[];this.pkg&&r.push(\"--package\",this.pkg),this.quiet&&r.push(\"--quiet\");let s=this.command.replace(/^(@[^@/]+)(@|$)/,\"$1/create$2\"),a=q.parseDescriptor(s),n=a.name.match(/^create(-|$)/)?a:a.scope?q.makeIdent(a.scope,`create-${a.name}`):q.makeIdent(null,`create-${a.name}`),c=q.stringifyIdent(n);return a.range!==\"unknown\"&&(c+=`@${a.range}`),this.cli.run([\"dlx\",...r,c,...this.args])}};Ve();Ve();bt();Wt();var rw=class extends ut{constructor(){super(...arguments);this.packages=ge.Array(\"-p,--package\",{description:\"The package(s) to install before running the command\"});this.quiet=ge.Boolean(\"-q,--quiet\",!1,{description:\"Only report critical errors instead of printing the full install logs\"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"dlx\"]]}static{this.usage=ot.Usage({description:\"run a package in a temporary environment\",details:\"\\n      This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\\n\\n      By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\\n\\n      Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\\n    \",examples:[[\"Use create-react-app to create a new React app\",\"yarn dlx create-react-app ./my-app\"],[\"Install multiple packages for a single command\",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e \"console.log('hello!')\"`]]})}async execute(){return ze.telemetry=null,await le.mktempPromise(async r=>{let s=K.join(r,`dlx-${process.pid}`);await le.mkdirPromise(s),await le.writeFilePromise(K.join(s,\"package.json\"),`{}\n`),await le.writeFilePromise(K.join(s,\"yarn.lock\"),\"\");let a=K.join(s,\".yarnrc.yml\"),n=await ze.findProjectCwd(this.context.cwd),f={enableGlobalCache:!(await ze.find(this.context.cwd,null,{strict:!1})).get(\"enableGlobalCache\"),enableTelemetry:!1,logFilters:[{code:Vf(68),level:he.LogLevel.Discard}]},p=n!==null?K.join(n,\".yarnrc.yml\"):null;p!==null&&le.existsSync(p)?(await le.copyFilePromise(p,a),await ze.updateConfiguration(s,N=>{let U=je.toMerged(N,f);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(W=>{let te=typeof W==\"string\"?W:W.path,ie=ue.isAbsolute(te)?te:ue.resolve(ue.fromPortablePath(n),te);return typeof W==\"string\"?ie:{path:ie,spec:W.spec}})),U})):await le.writeJsonPromise(a,f);let h=this.packages??[this.command],E=q.parseDescriptor(this.command).name,C=await this.cli.run([\"add\",\"--fixed\",\"--\",...h],{cwd:s,quiet:this.quiet});if(C!==0)return C;this.quiet||this.context.stdout.write(`\n`);let S=await ze.find(s,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,s);if(I===null)throw new ar(P.cwd,s);await P.restoreInstallState();let R=await In.getWorkspaceAccessibleBinaries(I);return R.has(E)===!1&&R.size===1&&typeof this.packages>\"u\"&&(E=Array.from(R)[0][0]),await In.executeWorkspaceAccessibleBinary(I,E,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var CDt={commands:[tw,rw]},wDt=CDt;var D9={};Vt(D9,{ExecFetcher:()=>DS,ExecResolver:()=>bS,default:()=>SDt,execUtils:()=>AF});Ve();Ve();bt();var fA=\"exec:\";var AF={};Vt(AF,{loadGeneratorFile:()=>SS,makeLocator:()=>S9,makeSpec:()=>Bve,parseSpec:()=>v9});Ve();bt();function v9(t){let{params:e,selector:r}=q.parseRange(t),s=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator==\"string\"?q.parseLocator(e.locator):null,path:s}}function Bve({parentLocator:t,path:e,generatorHash:r,protocol:s}){let a=t!==null?{locator:q.stringifyLocator(t)}:{},n=typeof r<\"u\"?{hash:r}:{};return q.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function S9(t,{parentLocator:e,path:r,generatorHash:s,protocol:a}){return q.makeLocator(t,Bve({parentLocator:e,path:r,generatorHash:s,protocol:a}))}async function SS(t,e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(t,{protocol:e}),n=K.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,n.localPath)}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.join(c.prefixPath,a);return await f.readFilePromise(p,\"utf8\")}var DS=class{supports(e,r){return!!e.reference.startsWith(fA)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:fA});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){let s=await SS(e.reference,fA,r);return le.mktempPromise(async a=>{let n=K.join(a,\"generator.js\");return await le.writeFilePromise(n,s),le.mktempPromise(async c=>{if(await this.generatePackage(c,e,n,r),!le.existsSync(K.join(c,\"build\")))throw new Error(\"The script should have generated a build directory\");return await hs.makeArchiveFromDirectory(K.join(c,\"build\"),{prefixPath:q.getIdentVendorPath(e),compressionLevel:r.project.configuration.get(\"compressionLevel\")})})})}async generatePackage(e,r,s,a){return await le.mktempPromise(async n=>{let c=await In.makeScriptEnv({project:a.project,binFolder:n}),f=K.join(e,\"runtime.js\");return await le.mktempPromise(async p=>{let h=K.join(p,\"buildfile.log\"),E=K.join(e,\"generator\"),C=K.join(e,\"build\");await le.mkdirPromise(E),await le.mkdirPromise(C);let S={tempDir:ue.fromPortablePath(E),buildDir:ue.fromPortablePath(C),locator:q.stringifyLocator(r)};await le.writeFilePromise(f,`\n          // Expose 'Module' as a global variable\n          Object.defineProperty(global, 'Module', {\n            get: () => require('module'),\n            configurable: true,\n            enumerable: false,\n          });\n\n          // Expose non-hidden built-in modules as global variables\n          for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {\n            Object.defineProperty(global, name, {\n              get: () => require(name),\n              configurable: true,\n              enumerable: false,\n            });\n          }\n\n          // Expose the 'execEnv' global variable\n          Object.defineProperty(global, 'execEnv', {\n            value: {\n              ...${JSON.stringify(S)},\n            },\n            enumerable: true,\n          });\n        `);let P=c.NODE_OPTIONS||\"\",I=/\\s*--require\\s+\\S*\\.pnp\\.c?js\\s*/g;P=P.replace(I,\" \").trim(),c.NODE_OPTIONS=P;let{stdout:R,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${q.stringifyLocator(r)})\n`,prefix:q.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Gr.pipevp(process.execPath,[\"--require\",ue.fromPortablePath(f),ue.fromPortablePath(s),q.stringifyIdent(r)],{cwd:e,env:c,stdin:null,stdout:R,stderr:N});if(U!==0)throw le.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${he.pretty(a.project.configuration,h,he.Type.PATH)})`)})})}};Ve();Ve();var BDt=2,bS=class{supportsDescriptor(e,r){return!!e.range.startsWith(fA)}supportsLocator(e,r){return!!e.reference.startsWith(fA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{path:a,parentLocator:n}=v9(e.range);if(n===null)throw new Error(\"Assertion failed: The descriptor should have been bound\");let c=await SS(q.makeRange({protocol:fA,source:a,selector:a,params:{locator:q.stringifyLocator(n)}}),fA,s.fetchOptions),f=Nn.makeHash(`${BDt}`,c).slice(0,6);return[S9(e,{parentLocator:n,path:a,generatorHash:f,protocol:fA})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var vDt={fetchers:[DS],resolvers:[bS]},SDt=vDt;var P9={};Vt(P9,{FileFetcher:()=>QS,FileResolver:()=>TS,TarballFileFetcher:()=>RS,TarballFileResolver:()=>NS,default:()=>PDt,fileUtils:()=>km});Ve();bt();var nw=/^(?:[a-zA-Z]:[\\\\/]|\\.{0,2}\\/)/,PS=/^[^?]*\\.(?:tar\\.gz|tgz)(?:::.*)?$/,es=\"file:\";var km={};Vt(km,{fetchArchiveFromLocator:()=>kS,makeArchiveFromLocator:()=>pF,makeBufferFromLocator:()=>b9,makeLocator:()=>iw,makeSpec:()=>vve,parseSpec:()=>xS});Ve();bt();function xS(t){let{params:e,selector:r}=q.parseRange(t),s=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator==\"string\"?q.parseLocator(e.locator):null,path:s}}function vve({parentLocator:t,path:e,hash:r,protocol:s}){let a=t!==null?{locator:q.stringifyLocator(t)}:{},n=typeof r<\"u\"?{hash:r}:{};return q.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function iw(t,{parentLocator:e,path:r,hash:s,protocol:a}){return q.makeLocator(t,vve({parentLocator:e,path:r,hash:s,protocol:a}))}async function kS(t,e){let{parentLocator:r,path:s}=q.parseFileStyleRange(t.reference,{protocol:es}),a=K.isAbsolute(s)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let c=n.packageFs,f=K.join(n.prefixPath,s);return await je.releaseAfterUseAsync(async()=>await c.readFilePromise(f),n.releaseFs)}async function pF(t,{protocol:e,fetchOptions:r,inMemory:s=!1}){let{parentLocator:a,path:n}=q.parseFileStyleRange(t.reference,{protocol:e}),c=K.isAbsolute(n)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(a,r),f=c.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,c.localPath)}:c;c!==f&&c.releaseFs&&c.releaseFs();let p=f.packageFs,h=K.join(f.prefixPath,n);return await je.releaseAfterUseAsync(async()=>await hs.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:q.getIdentVendorPath(t),compressionLevel:r.project.configuration.get(\"compressionLevel\"),inMemory:s}),f.releaseFs)}async function b9(t,{protocol:e,fetchOptions:r}){return(await pF(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var QS=class{supports(e,r){return!!e.reference.startsWith(es)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:es});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){return pF(e,{protocol:es,fetchOptions:r})}};Ve();Ve();var DDt=2,TS=class{supportsDescriptor(e,r){return e.range.match(nw)?!0:!!e.range.startsWith(es)}supportsLocator(e,r){return!!e.reference.startsWith(es)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return nw.test(e.range)&&(e=q.makeDescriptor(e,`${es}${e.range}`)),q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{path:a,parentLocator:n}=xS(e.range);if(n===null)throw new Error(\"Assertion failed: The descriptor should have been bound\");let c=await b9(q.makeLocator(e,q.makeRange({protocol:es,source:a,selector:a,params:{locator:q.stringifyLocator(n)}})),{protocol:es,fetchOptions:s.fetchOptions}),f=Nn.makeHash(`${DDt}`,c).slice(0,6);return[iw(e,{parentLocator:n,path:a,hash:f,protocol:es})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};Ve();var RS=class{supports(e,r){return PS.test(e.reference)?!!e.reference.startsWith(es):!1}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromDisk(e,r){let s=await kS(e,r);return await hs.convertToZip(s,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}};Ve();Ve();Ve();var NS=class{supportsDescriptor(e,r){return PS.test(e.range)?!!(e.range.startsWith(es)||nw.test(e.range)):!1}supportsLocator(e,r){return PS.test(e.reference)?!!e.reference.startsWith(es):!1}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return nw.test(e.range)&&(e=q.makeDescriptor(e,`${es}${e.range}`)),q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{path:a,parentLocator:n}=xS(e.range);if(n===null)throw new Error(\"Assertion failed: The descriptor should have been bound\");let c=iw(e,{parentLocator:n,path:a,hash:\"\",protocol:es}),f=await kS(c,s.fetchOptions),p=Nn.makeHash(f).slice(0,6);return[iw(e,{parentLocator:n,path:a,hash:p,protocol:es})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var bDt={fetchers:[RS,QS],resolvers:[NS,TS]},PDt=bDt;var Q9={};Vt(Q9,{GithubFetcher:()=>OS,default:()=>kDt,githubUtils:()=>hF});Ve();bt();var hF={};Vt(hF,{invalidGithubUrlMessage:()=>bve,isGithubUrl:()=>x9,parseGithubUrl:()=>k9});var Sve=et(ye(\"querystring\")),Dve=[/^https?:\\/\\/(?:([^/]+?)@)?github.com\\/([^/#]+)\\/([^/#]+)\\/tarball\\/([^/#]+)(?:#(.*))?$/,/^https?:\\/\\/(?:([^/]+?)@)?github.com\\/([^/#]+)\\/([^/#]+?)(?:\\.git)?(?:#(.*))?$/];function x9(t){return t?Dve.some(e=>!!t.match(e)):!1}function k9(t){let e;for(let f of Dve)if(e=t.match(f),e)break;if(!e)throw new Error(bve(t));let[,r,s,a,n=\"master\"]=e,{commit:c}=Sve.default.parse(n);return n=c||n.replace(/[^:]*:/,\"\"),{auth:r,username:s,reponame:a,treeish:n}}function bve(t){return`Input cannot be parsed as a valid GitHub URL ('${t}').`}var OS=class{supports(e,r){return!!x9(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await An.get(this.getLocatorUrl(e,r),{configuration:r.project.configuration});return await le.mktempPromise(async a=>{let n=new Sn(a);await hs.extractArchiveTo(s,n,{stripComponents:1});let c=Qa.splitRepoUrl(e.reference),f=K.join(a,\"package.tgz\");await In.prepareExternalProject(a,f,{configuration:r.project.configuration,report:r.report,workspace:c.extra.workspace,locator:e});let p=await le.readFilePromise(f);return await hs.convertToZip(p,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,r){let{auth:s,username:a,reponame:n,treeish:c}=k9(e.reference);return`https://${s?`${s}@`:\"\"}github.com/${a}/${n}/archive/${c}.tar.gz`}};var xDt={hooks:{async fetchHostedRepository(t,e,r){if(t!==null)return t;let s=new OS;if(!s.supports(e,r))return null;try{return await s.fetch(e,r)}catch{return null}}}},kDt=xDt;var T9={};Vt(T9,{TarballHttpFetcher:()=>MS,TarballHttpResolver:()=>_S,default:()=>TDt});Ve();function LS(t){let e;try{e=new URL(t)}catch{return!1}return!(e.protocol!==\"http:\"&&e.protocol!==\"https:\"||!e.pathname.match(/(\\.tar\\.gz|\\.tgz|\\/[^.]+)$/))}var MS=class{supports(e,r){return LS(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await An.get(e.reference,{configuration:r.project.configuration});return await hs.convertToZip(s,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}};Ve();Ve();var _S=class{supportsDescriptor(e,r){return LS(e.range)}supportsLocator(e,r){return LS(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[q.convertDescriptorToLocator(e)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var QDt={fetchers:[MS],resolvers:[_S]},TDt=QDt;var R9={};Vt(R9,{InitCommand:()=>Z0,InitInitializerCommand:()=>sw,default:()=>FDt});Wt();Ve();Ve();bt();Wt();var Z0=class extends ut{constructor(){super(...arguments);this.private=ge.Boolean(\"-p,--private\",!1,{description:\"Initialize a private package\"});this.workspace=ge.Boolean(\"-w,--workspace\",!1,{description:\"Initialize a workspace root with a `packages/` directory\"});this.install=ge.String(\"-i,--install\",!1,{tolerateBoolean:!0,description:\"Initialize a package with a specific bundle that will be locked in the project\"});this.name=ge.String(\"-n,--name\",{description:\"Initialize a package with the given name\"});this.usev2=ge.Boolean(\"-2\",!1,{hidden:!0});this.yes=ge.Boolean(\"-y,--yes\",{hidden:!0})}static{this.paths=[[\"init\"]]}static{this.usage=ot.Usage({description:\"create a new package\",details:\"\\n      This command will setup a new package in your local directory.\\n\\n      If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\\n\\n      If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\\n\\n      If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\\n\\n      The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\\n    \",examples:[[\"Create a new package in the local directory\",\"yarn init\"],[\"Create a new private package in the local directory\",\"yarn init -p\"],[\"Create a new package and store the Yarn release inside\",\"yarn init -i=latest\"],[\"Create a new private package and defines it as a workspace root\",\"yarn init -w\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.install==\"string\"?this.install:this.usev2||this.install===!0?\"latest\":null;return s!==null?await this.executeProxy(r,s):await this.executeRegular(r)}async executeProxy(r,s){if(r.projectCwd!==null&&r.projectCwd!==this.context.cwd)throw new nt(\"Cannot use the --install flag from within a project subdirectory\");le.existsSync(this.context.cwd)||await le.mkdirPromise(this.context.cwd,{recursive:!0});let a=K.join(this.context.cwd,Er.lockfile);le.existsSync(a)||await le.writeFilePromise(a,\"\");let n=await this.cli.run([\"set\",\"version\",s],{quiet:!0});if(n!==0)return n;let c=[];return this.private&&c.push(\"-p\"),this.workspace&&c.push(\"-w\"),this.name&&c.push(`-n=${this.name}`),this.yes&&c.push(\"-y\"),await le.mktempPromise(async f=>{let{code:p}=await Gr.pipevp(\"yarn\",[\"init\",...c],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await In.makeScriptEnv({binFolder:f})});return p})}async initialize(){}async executeRegular(r){let s=null;try{s=(await Tt.find(r,this.context.cwd)).project}catch{s=null}le.existsSync(this.context.cwd)||await le.mkdirPromise(this.context.cwd,{recursive:!0});let a=await Ht.tryFind(this.context.cwd),n=a??new Ht,c=Object.fromEntries(r.get(\"initFields\").entries());n.load(c),n.name=n.name??q.makeIdent(r.get(\"initScope\"),this.name??K.basename(this.context.cwd)),n.packageManager=un&&je.isTaggedYarnVersion(un)?`yarn@${un}`:null,(!a&&this.workspace||this.private)&&(n.private=!0),this.workspace&&n.workspaceDefinitions.length===0&&(await le.mkdirPromise(K.join(this.context.cwd,\"packages\"),{recursive:!0}),n.workspaceDefinitions=[{pattern:\"packages/*\"}]);let f={};n.exportTo(f);let p=K.join(this.context.cwd,Ht.fileName);await le.changeFilePromise(p,`${JSON.stringify(f,null,2)}\n`,{automaticNewlines:!0});let h=[p],E=K.join(this.context.cwd,\"README.md\");if(le.existsSync(E)||(await le.writeFilePromise(E,`# ${q.stringifyIdent(n.name)}\n`),h.push(E)),!s||s.cwd===this.context.cwd){let C=K.join(this.context.cwd,Er.lockfile);le.existsSync(C)||(await le.writeFilePromise(C,\"\"),h.push(C));let P=[\".yarn/*\",\"!.yarn/patches\",\"!.yarn/plugins\",\"!.yarn/releases\",\"!.yarn/sdks\",\"!.yarn/versions\",\"\",\"# Whether you use PnP or not, the node_modules folder is often used to store\",\"# build artifacts that should be gitignored\",\"node_modules\",\"\",\"# Swap the comments on the following lines if you wish to use zero-installs\",\"# In that case, don't forget to run `yarn config set enableGlobalCache false`!\",\"# Documentation here: https://yarnpkg.com/features/caching#zero-installs\",\"\",\"#!.yarn/cache\",\".pnp.*\"].map(Ae=>`${Ae}\n`).join(\"\"),I=K.join(this.context.cwd,\".gitignore\");le.existsSync(I)||(await le.writeFilePromise(I,P),h.push(I));let N=[\"/.yarn/**            linguist-vendored\",\"/.yarn/releases/*    binary\",\"/.yarn/plugins/**/*  binary\",\"/.pnp.*              binary linguist-generated\"].map(Ae=>`${Ae}\n`).join(\"\"),U=K.join(this.context.cwd,\".gitattributes\");le.existsSync(U)||(await le.writeFilePromise(U,N),h.push(U));let W={\"*\":{charset:\"utf-8\",endOfLine:\"lf\",indentSize:2,indentStyle:\"space\",insertFinalNewline:!0}};je.mergeIntoTarget(W,r.get(\"initEditorConfig\"));let te=`root = true\n`;for(let[Ae,ce]of Object.entries(W)){te+=`\n[${Ae}]\n`;for(let[me,pe]of Object.entries(ce)){let Be=me.replace(/[A-Z]/g,Ce=>`_${Ce.toLowerCase()}`);te+=`${Be} = ${pe}\n`}}let ie=K.join(this.context.cwd,\".editorconfig\");le.existsSync(ie)||(await le.writeFilePromise(ie,te),h.push(ie)),await this.cli.run([\"install\"],{quiet:!0}),await this.initialize(),le.existsSync(K.join(this.context.cwd,\".git\"))||(await Gr.execvp(\"git\",[\"init\"],{cwd:this.context.cwd}),await Gr.execvp(\"git\",[\"add\",\"--\",...h],{cwd:this.context.cwd}),await Gr.execvp(\"git\",[\"commit\",\"--allow-empty\",\"-m\",\"First commit\"],{cwd:this.context.cwd}))}}};var sw=class extends Z0{constructor(){super(...arguments);this.initializer=ge.String();this.argv=ge.Proxy()}static{this.paths=[[\"init\"]]}async initialize(){this.context.stdout.write(`\n`),await this.cli.run([\"dlx\",this.initializer,...this.argv],{quiet:!0})}};var RDt={configuration:{initScope:{description:\"Scope used when creating packages via the init command\",type:\"STRING\",default:null},initFields:{description:\"Additional fields to set when creating packages via the init command\",type:\"MAP\",valueDefinition:{description:\"\",type:\"ANY\"}},initEditorConfig:{description:\"Extra rules to define in the generator editorconfig\",type:\"MAP\",valueDefinition:{description:\"\",type:\"ANY\"}}},commands:[Z0,sw]},FDt=RDt;var TY={};Vt(TY,{SearchCommand:()=>Bw,UpgradeInteractiveCommand:()=>vw,default:()=>cTt});Ve();var xve=et(ye(\"os\"));function ow({stdout:t}){if(xve.default.endianness()===\"BE\")throw new Error(\"Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures\");if(!t.isTTY)throw new Error(\"Interactive commands can only be used inside a TTY environment\")}Wt();var HSe=et(Z9()),X9={appId:\"OFCNCOG2CU\",apiKey:\"6fe4476ee5a1832882e326b506d14126\",indexName:\"npm-search\"},QPt=(0,HSe.default)(X9.appId,X9.apiKey).initIndex(X9.indexName),$9=async(t,e=0)=>await QPt.search(t,{analyticsTags:[\"yarn-plugin-interactive-tools\"],attributesToRetrieve:[\"name\",\"version\",\"owner\",\"repository\",\"humanDownloadsLast30Days\"],page:e,hitsPerPage:10});var LD=[\"regular\",\"dev\",\"peer\"],Bw=class extends ut{static{this.paths=[[\"search\"]]}static{this.usage=ot.Usage({category:\"Interactive commands\",description:\"open the search interface\",details:`\n    This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.\n    `,examples:[[\"Open the search window\",\"yarn search\"]]})}async execute(){ow(this.context);let{Gem:e}=await Promise.resolve().then(()=>($F(),CY)),{ScrollableItems:r}=await Promise.resolve().then(()=>(nN(),rN)),{useKeypress:s}=await Promise.resolve().then(()=>(FD(),zPe)),{useMinistore:a}=await Promise.resolve().then(()=>(bY(),DY)),{renderForm:n}=await Promise.resolve().then(()=>(aN(),oN)),{default:c}=await Promise.resolve().then(()=>et(oxe())),{Box:f,Text:p}=await Promise.resolve().then(()=>et(Vc())),{default:h,useEffect:E,useState:C}=await Promise.resolve().then(()=>et(hn())),S=await ze.find(this.context.cwd,this.context.plugins),P=()=>h.createElement(f,{flexDirection:\"row\"},h.createElement(f,{flexDirection:\"column\",width:48},h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<up>\"),\"/\",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<down>\"),\" to move between packages.\")),h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<space>\"),\" to select a package.\")),h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<space>\"),\" again to change the target.\"))),h.createElement(f,{flexDirection:\"column\"},h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<enter>\"),\" to install the selected packages.\")),h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<ctrl+c>\"),\" to abort.\")))),I=()=>h.createElement(h.Fragment,null,h.createElement(f,{width:15},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Owner\")),h.createElement(f,{width:11},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Version\")),h.createElement(f,{width:10},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Downloads\"))),R=()=>h.createElement(f,{width:17},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Target\")),N=({hit:pe,active:Be})=>{let[Ce,g]=a(pe.name,null);s({active:Be},(fe,se)=>{if(se.name!==\"space\")return;if(!Ce){g(LD[0]);return}let X=LD.indexOf(Ce)+1;X===LD.length?g(null):g(LD[X])},[Ce,g]);let we=q.parseIdent(pe.name),Ee=q.prettyIdent(S,we);return h.createElement(f,null,h.createElement(f,{width:45},h.createElement(p,{bold:!0,wrap:\"wrap\"},Ee)),h.createElement(f,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:\"truncate\"},pe.owner.name)),h.createElement(f,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:\"truncate\"},pe.version)),h.createElement(f,{width:16,marginLeft:1},h.createElement(p,null,pe.humanDownloadsLast30Days)))},U=({name:pe,active:Be})=>{let[Ce]=a(pe,null),g=q.parseIdent(pe);return h.createElement(f,null,h.createElement(f,{width:47},h.createElement(p,{bold:!0},\" - \",q.prettyIdent(S,g))),LD.map(we=>h.createElement(f,{key:we,width:14,marginLeft:1},h.createElement(p,null,\" \",h.createElement(e,{active:Ce===we}),\" \",h.createElement(p,{bold:!0},we)))))},W=()=>h.createElement(f,{marginTop:1},h.createElement(p,null,\"Powered by Algolia.\")),ie=await n(({useSubmit:pe})=>{let Be=a();pe(Be);let Ce=Array.from(Be.keys()).filter(j=>Be.get(j)!==null),[g,we]=C(\"\"),[Ee,fe]=C(0),[se,X]=C([]),De=j=>{j.match(/\\t| /)||we(j)},Re=async()=>{fe(0);let j=await $9(g);j.query===g&&X(j.hits)},gt=async()=>{let j=await $9(g,Ee+1);j.query===g&&j.page-1===Ee&&(fe(j.page),X([...se,...j.hits]))};return E(()=>{g?Re():X([])},[g]),h.createElement(f,{flexDirection:\"column\"},h.createElement(P,null),h.createElement(f,{flexDirection:\"row\",marginTop:1},h.createElement(p,{bold:!0},\"Search: \"),h.createElement(f,{width:41},h.createElement(c,{value:g,onChange:De,placeholder:\"i.e. babel, webpack, react...\",showCursor:!1})),h.createElement(I,null)),se.length?h.createElement(r,{radius:2,loop:!1,children:se.map(j=>h.createElement(N,{key:j.name,hit:j,active:!1})),willReachEnd:gt}):h.createElement(p,{color:\"gray\"},\"Start typing...\"),h.createElement(f,{flexDirection:\"row\",marginTop:1},h.createElement(f,{width:49},h.createElement(p,{bold:!0},\"Selected:\")),h.createElement(R,null)),Ce.length?Ce.map(j=>h.createElement(U,{key:j,name:j,active:!1})):h.createElement(p,{color:\"gray\"},\"No selected packages...\"),h.createElement(W,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ie>\"u\")return 1;let Ae=Array.from(ie.keys()).filter(pe=>ie.get(pe)===\"regular\"),ce=Array.from(ie.keys()).filter(pe=>ie.get(pe)===\"dev\"),me=Array.from(ie.keys()).filter(pe=>ie.get(pe)===\"peer\");return Ae.length&&await this.cli.run([\"add\",...Ae]),ce.length&&await this.cli.run([\"add\",\"--dev\",...ce]),me&&await this.cli.run([\"add\",\"--peer\",...me]),0}};Ve();Wt();yG();var pxe=et(fi()),Axe=/^((?:[\\^~]|>=?)?)([0-9]+)(\\.[0-9]+)(\\.[0-9]+)((?:-\\S+)?)$/;function hxe(t,e){return t.length>0?[t.slice(0,e)].concat(hxe(t.slice(e),e)):[]}var vw=class extends ut{static{this.paths=[[\"upgrade-interactive\"]]}static{this.usage=ot.Usage({category:\"Interactive commands\",description:\"open the upgrade interface\",details:`\n      This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.\n    `,examples:[[\"Open the upgrade window\",\"yarn upgrade-interactive\"]]})}async execute(){ow(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(fxe(),uxe)),{Pad:r}=await Promise.resolve().then(()=>(QY(),cxe)),{ScrollableItems:s}=await Promise.resolve().then(()=>(nN(),rN)),{useMinistore:a}=await Promise.resolve().then(()=>(bY(),DY)),{renderForm:n}=await Promise.resolve().then(()=>(aN(),oN)),{Box:c,Text:f}=await Promise.resolve().then(()=>et(Vc())),{default:p,useEffect:h,useRef:E,useState:C}=await Promise.resolve().then(()=>et(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd),R=await Jr.find(S);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(we,Ee)=>{let fe=ICe(we,Ee),se=\"\";for(let X of fe)X.added?se+=he.pretty(S,X.value,\"green\"):X.removed||(se+=X.value);return se},W=(we,Ee)=>{if(we===Ee)return Ee;let fe=q.parseRange(we),se=q.parseRange(Ee),X=fe.selector.match(Axe),De=se.selector.match(Axe);if(!X||!De)return U(we,Ee);let Re=[\"gray\",\"red\",\"yellow\",\"green\",\"magenta\"],gt=null,j=\"\";for(let rt=1;rt<Re.length;++rt)gt!==null||X[rt]!==De[rt]?(gt===null&&(gt=Re[rt-1]),j+=he.pretty(S,De[rt],gt)):j+=De[rt];return j},te=async(we,Ee,fe)=>{let se=await Xu.fetchDescriptorFrom(we,fe,{project:P,cache:R,preserveModifier:Ee,workspace:I});return se!==null?se.range:we.range},ie=async we=>{let Ee=pxe.default.valid(we.range)?`^${we.range}`:we.range,[fe,se]=await Promise.all([te(we,we.range,Ee).catch(()=>null),te(we,we.range,\"latest\").catch(()=>null)]),X=[{value:null,label:we.range}];return fe&&fe!==we.range?X.push({value:fe,label:W(we.range,fe)}):X.push({value:null,label:\"\"}),se&&se!==fe&&se!==we.range?X.push({value:se,label:W(we.range,se)}):X.push({value:null,label:\"\"}),X},Ae=()=>p.createElement(c,{flexDirection:\"row\"},p.createElement(c,{flexDirection:\"column\",width:49},p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<up>\"),\"/\",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<down>\"),\" to select packages.\")),p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<left>\"),\"/\",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<right>\"),\" to select versions.\"))),p.createElement(c,{flexDirection:\"column\"},p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<enter>\"),\" to install.\")),p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<ctrl+c>\"),\" to abort.\")))),ce=()=>p.createElement(c,{flexDirection:\"row\",paddingTop:1,paddingBottom:1},p.createElement(c,{width:50},p.createElement(f,{bold:!0},p.createElement(f,{color:\"greenBright\"},\"?\"),\" Pick the packages you want to upgrade.\")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:\"gray\"},\"Current\")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:\"gray\"},\"Range\")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:\"gray\"},\"Latest\"))),me=({active:we,descriptor:Ee,suggestions:fe})=>{let[se,X]=a(Ee.descriptorHash,null),De=q.stringifyIdent(Ee),Re=Math.max(0,45-De.length);return p.createElement(p.Fragment,null,p.createElement(c,null,p.createElement(c,{width:45},p.createElement(f,{bold:!0},q.prettyIdent(S,Ee)),p.createElement(r,{active:we,length:Re})),p.createElement(e,{active:we,options:fe,value:se,skewer:!0,onChange:X,sizes:[17,17,17]})))},pe=({dependencies:we})=>{let[Ee,fe]=C(we.map(()=>null)),se=E(!0),X=async De=>{let Re=await ie(De);return Re.filter(gt=>gt.label!==\"\").length<=1?null:{descriptor:De,suggestions:Re}};return h(()=>()=>{se.current=!1},[]),h(()=>{let De=Math.trunc(N*1.75),Re=we.slice(0,De),gt=we.slice(De),j=hxe(gt,N),rt=Re.map(X).reduce(async(Fe,Ne)=>{await Fe;let Pe=await Ne;Pe!==null&&se.current&&fe(Ye=>{let ke=Ye.findIndex(_e=>_e===null),it=[...Ye];return it[ke]=Pe,it})},Promise.resolve());j.reduce((Fe,Ne)=>Promise.all(Ne.map(Pe=>Promise.resolve().then(()=>X(Pe)))).then(async Pe=>{Pe=Pe.filter(Ye=>Ye!==null),await Fe,se.current&&fe(Ye=>{let ke=Ye.findIndex(it=>it===null);return Ye.slice(0,ke).concat(Pe).concat(Ye.slice(ke+Pe.length))})}),rt).then(()=>{se.current&&fe(Fe=>Fe.filter(Ne=>Ne!==null))})},[]),Ee.length?p.createElement(s,{radius:N>>1,children:Ee.map((De,Re)=>De!==null?p.createElement(me,{key:Re,active:!1,descriptor:De.descriptor,suggestions:De.suggestions}):p.createElement(f,{key:Re},\"Loading...\"))}):p.createElement(f,null,\"No upgrades found\")},Ce=await n(({useSubmit:we})=>{we(a());let Ee=new Map;for(let se of P.workspaces)for(let X of[\"dependencies\",\"devDependencies\"])for(let De of se.manifest[X].values())P.tryWorkspaceByDescriptor(De)===null&&(De.range.startsWith(\"link:\")||Ee.set(De.descriptorHash,De));let fe=je.sortMap(Ee.values(),se=>q.stringifyDescriptor(se));return p.createElement(c,{flexDirection:\"column\"},p.createElement(Ae,null),p.createElement(ce,null),p.createElement(pe,{dependencies:fe}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof Ce>\"u\")return 1;let g=!1;for(let we of P.workspaces)for(let Ee of[\"dependencies\",\"devDependencies\"]){let fe=we.manifest[Ee];for(let se of fe.values()){let X=Ce.get(se.descriptorHash);typeof X<\"u\"&&X!==null&&(fe.set(se.identHash,q.makeDescriptor(se,X)),g=!0)}}return g?await P.installWithNewReport({quiet:this.context.quiet,stdout:this.context.stdout},{cache:R}):0}};var lTt={commands:[Bw,vw]},cTt=lTt;var FY={};Vt(FY,{default:()=>pTt});Ve();var _D=\"jsr:\";Ve();Ve();function Sw(t){let e=t.range.slice(4);if(Or.validRange(e))return q.makeDescriptor(t,`npm:${q.stringifyIdent(q.wrapIdentIntoScope(t,\"jsr\"))}@${e}`);let r=q.tryParseDescriptor(e,!0);if(r!==null)return q.makeDescriptor(t,`npm:${q.stringifyIdent(q.wrapIdentIntoScope(r,\"jsr\"))}@${r.range}`);throw new Error(`Invalid range: ${t.range}`)}function Dw(t){return q.makeLocator(q.wrapIdentIntoScope(t,\"jsr\"),`npm:${t.reference.slice(4)}`)}function RY(t){return q.makeLocator(q.unwrapIdentFromScope(t,\"jsr\"),`jsr:${t.reference.slice(4)}`)}var lN=class{supports(e,r){return e.reference.startsWith(_D)}getLocalPath(e,r){let s=Dw(e);return r.fetcher.getLocalPath(s,r)}fetch(e,r){let s=Dw(e);return r.fetcher.fetch(s,r)}};var cN=class{supportsDescriptor(e,r){return!!e.range.startsWith(_D)}supportsLocator(e,r){return!!e.reference.startsWith(_D)}shouldPersistResolution(e,r){let s=Dw(e);return r.resolver.shouldPersistResolution(s,r)}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{inner:Sw(e)}}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(Sw(e));return(await s.resolver.getCandidates(a,r,s)).map(c=>RY(c))}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(Sw(e));return a.resolver.getSatisfying(n,r,s,a)}async resolve(e,r){let s=Dw(e),a=await r.resolver.resolve(s,r);return{...a,...RY(a)}}};var uTt=[\"dependencies\",\"devDependencies\",\"peerDependencies\"];function fTt(t,e){for(let r of uTt)for(let s of t.manifest.getForScope(r).values()){if(!s.range.startsWith(\"jsr:\"))continue;let a=Sw(s),n=r===\"dependencies\"?q.makeDescriptor(s,\"unknown\"):null,c=n!==null&&t.manifest.ensureDependencyMeta(n).optional?\"optionalDependencies\":r;e[c][q.stringifyIdent(s)]=a.range}}var ATt={hooks:{beforeWorkspacePacking:fTt},resolvers:[cN],fetchers:[lN]},pTt=ATt;var NY={};Vt(NY,{LinkFetcher:()=>UD,LinkResolver:()=>HD,PortalFetcher:()=>jD,PortalResolver:()=>qD,default:()=>gTt});Ve();bt();var sh=\"portal:\",oh=\"link:\";var UD=class{supports(e,r){return!!e.reference.startsWith(oh)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:oh});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:oh}),n=K.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new jf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0}}};Ve();bt();var HD=class{supportsDescriptor(e,r){return!!e.range.startsWith(oh)}supportsLocator(e,r){return!!e.reference.startsWith(oh)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(oh.length);return[q.makeLocator(e,`${oh}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return{...e,version:\"0.0.0\",languageName:r.project.configuration.get(\"defaultLanguageName\"),linkType:\"SOFT\",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ve();bt();var jD=class{supports(e,r){return!!e.reference.startsWith(sh)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:sh});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:sh}),n=K.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,localPath:p}:{packageFs:new jf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot}}};Ve();Ve();bt();var qD=class{supportsDescriptor(e,r){return!!e.range.startsWith(sh)}supportsLocator(e,r){return!!e.reference.startsWith(sh)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(sh.length);return[q.makeLocator(e,`${sh}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"SOFT\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var hTt={fetchers:[UD,jD],resolvers:[HD,qD]},gTt=hTt;var yV={};Vt(yV,{NodeModulesLinker:()=>ib,NodeModulesMode:()=>hV,PnpLooseLinker:()=>sb,default:()=>QRt});bt();Ve();bt();bt();var LY=(t,e)=>`${t}@${e}`,gxe=(t,e)=>{let r=e.indexOf(\"#\"),s=r>=0?e.substring(r+1):e;return LY(t,s)};var mxe=(t,e={})=>{let r=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),s=e.check||r>=9,a=e.hoistingLimits||new Map,n={check:s,debugLevel:r,hoistingLimits:a,fastLookupPossible:!0},c;n.debugLevel>=0&&(c=Date.now());let f=wTt(t,n),p=!1,h=0;do{let E=MY(f,[f],new Set([f.locator]),new Map,n);p=E.anotherRoundNeeded||E.isGraphChanged,n.fastLookupPossible=!1,h++}while(p);if(n.debugLevel>=0&&console.log(`hoist time: ${Date.now()-c}ms, rounds: ${h}`),n.debugLevel>=1){let E=GD(f);if(MY(f,[f],new Set([f.locator]),new Map,n).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree:\n${E}, next tree:\n${GD(f)}`);let S=yxe(f);if(S)throw new Error(`${S}, after hoisting finished:\n${GD(f)}`)}return n.debugLevel>=2&&console.log(GD(f)),BTt(f)},dTt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=n=>{if(!s.has(n)){s.add(n);for(let c of n.hoistedDependencies.values())r.set(c.name,c);for(let c of n.dependencies.values())n.peerNames.has(c.name)||a(c)}};return a(e),r},mTt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=new Set,n=(c,f)=>{if(s.has(c))return;s.add(c);for(let h of c.hoistedDependencies.values())if(!f.has(h.name)){let E;for(let C of t)E=C.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of c.dependencies.values())p.add(h.name);for(let h of c.dependencies.values())c.peerNames.has(h.name)||n(h,p)};return n(e,a),r},dxe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:s,ident:a,locator:n,dependencies:c,originalDependencies:f,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:I,hoistedTo:R}=e,N={name:r,references:new Set(s),ident:a,locator:n,dependencies:new Map(c),originalDependencies:new Map(f),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:new Map(I),hoistedTo:new Map(R)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},yTt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let s=Array.from(e.keys());s.sort((a,n)=>{let c=e.get(a),f=e.get(n);if(f.hoistPriority!==c.hoistPriority)return f.hoistPriority-c.hoistPriority;{let p=c.dependents.size+c.peerDependents.size;return f.dependents.size+f.peerDependents.size-p}});for(let a of s){let n=a.substring(0,a.indexOf(\"@\",1)),c=a.substring(n.length+1);if(!t.peerNames.has(n)){let f=r.get(n);f||(f=[],r.set(n,f)),f.indexOf(c)<0&&f.push(c)}}return r},OY=t=>{let e=new Set,r=(s,a=new Set)=>{if(!a.has(s)){a.add(s);for(let n of s.peerNames)if(!t.peerNames.has(n)){let c=t.dependencies.get(n);c&&!e.has(c)&&r(c,a)}e.add(s)}};for(let s of t.dependencies.values())t.peerNames.has(s.name)||r(s);return e},MY=(t,e,r,s,a,n=new Set)=>{let c=e[e.length-1];if(n.has(c))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(c);let f=vTt(c),p=yTt(c,f),h=t==c?new Map:a.fastLookupPossible?dTt(e):mTt(e),E,C=!1,S=!1,P=new Map(Array.from(p.entries()).map(([R,N])=>[R,N[0]])),I=new Map;do{let R=CTt(t,e,r,h,P,p,s,I,a);R.isGraphChanged&&(S=!0),R.anotherRoundNeeded&&(C=!0),E=!1;for(let[N,U]of p)U.length>1&&!c.dependencies.has(N)&&(P.delete(N),U.shift(),P.set(N,U[0]),E=!0)}while(E);for(let R of c.dependencies.values())if(!c.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let N=MY(t,[...e,R],r,I,a);N.isGraphChanged&&(S=!0),N.anotherRoundNeeded&&(C=!0),r.delete(R.locator)}return{anotherRoundNeeded:C,isGraphChanged:S}},ETt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},ITt=(t,e,r,s,a,n,c,f,{outputReason:p,fastLookupPossible:h})=>{let E,C=null,S=new Set;p&&(E=`${Array.from(e).map(N=>Io(N)).join(\"\\u2192\")}`);let P=r[r.length-1],R=!(s.ident===P.ident);if(p&&!R&&(C=\"- self-reference\"),R&&(R=s.dependencyKind!==1,p&&!R&&(C=\"- workspace\")),R&&s.dependencyKind===2&&(R=!ETt(s),p&&!R&&(C=\"- external soft link with unhoisted dependencies\")),R&&(R=!t.peerNames.has(s.name),p&&!R&&(C=`- cannot shadow peer: ${Io(t.originalDependencies.get(s.name).locator)} at ${E}`)),R){let N=!1,U=a.get(s.name);if(N=!U||U.ident===s.ident,p&&!N&&(C=`- filled by: ${Io(U.locator)} at ${E}`),N)for(let W=r.length-1;W>=1;W--){let ie=r[W].dependencies.get(s.name);if(ie&&ie.ident!==s.ident){N=!1;let Ae=f.get(P);Ae||(Ae=new Set,f.set(P,Ae)),Ae.add(s.name),p&&(C=`- filled by ${Io(ie.locator)} at ${r.slice(0,W).map(ce=>Io(ce.locator)).join(\"\\u2192\")}`);break}}R=N}if(R&&(R=n.get(s.name)===s.ident,p&&!R&&(C=`- filled by: ${Io(c.get(s.name)[0])} at ${E}`)),R){let N=!0,U=new Set(s.peerNames);for(let W=r.length-1;W>=1;W--){let te=r[W];for(let ie of U){if(te.peerNames.has(ie)&&te.originalDependencies.has(ie))continue;let Ae=te.dependencies.get(ie);Ae&&t.dependencies.get(ie)!==Ae&&(W===r.length-1?S.add(Ae):(S=null,N=!1,p&&(C=`- peer dependency ${Io(Ae.locator)} from parent ${Io(te.locator)} was not hoisted to ${E}`))),U.delete(ie)}if(!N)break}R=N}if(R&&!h)for(let N of s.hoistedDependencies.values()){let U=a.get(N.name)||t.dependencies.get(N.name);if(!U||N.ident!==U.ident){R=!1,p&&(C=`- previously hoisted dependency mismatch, needed: ${Io(N.locator)}, available: ${Io(U?.locator)}`);break}}return S!==null&&S.size>0?{isHoistable:2,dependsOn:S,reason:C}:{isHoistable:R?0:1,reason:C}},uN=t=>`${t.name}@${t.locator}`,CTt=(t,e,r,s,a,n,c,f,p)=>{let h=e[e.length-1],E=new Set,C=!1,S=!1,P=(U,W,te,ie,Ae)=>{if(E.has(ie))return;let ce=[...W,uN(ie)],me=[...te,uN(ie)],pe=new Map,Be=new Map;for(let fe of OY(ie)){let se=ITt(h,r,[h,...U,ie],fe,s,a,n,f,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Be.set(fe,se),se.isHoistable===2)for(let X of se.dependsOn){let De=pe.get(X.name)||new Set;De.add(fe.name),pe.set(X.name,De)}}let Ce=new Set,g=(fe,se,X)=>{if(!Ce.has(fe)){Ce.add(fe),Be.set(fe,{isHoistable:1,reason:X});for(let De of pe.get(fe.name)||[])g(ie.dependencies.get(De),se,p.debugLevel>=2?`- peer dependency ${Io(fe.locator)} from parent ${Io(ie.locator)} was not hoisted`:\"\")}};for(let[fe,se]of Be)se.isHoistable===1&&g(fe,se,se.reason);let we=!1;for(let fe of Be.keys())if(!Ce.has(fe)){S=!0;let se=c.get(ie);se&&se.has(fe.name)&&(C=!0),we=!0,ie.dependencies.delete(fe.name),ie.hoistedDependencies.set(fe.name,fe),ie.reasons.delete(fe.name);let X=h.dependencies.get(fe.name);if(p.debugLevel>=2){let De=Array.from(W).concat([ie.locator]).map(gt=>Io(gt)).join(\"\\u2192\"),Re=h.hoistedFrom.get(fe.name);Re||(Re=[],h.hoistedFrom.set(fe.name,Re)),Re.push(De),ie.hoistedTo.set(fe.name,Array.from(e).map(gt=>Io(gt.locator)).join(\"\\u2192\"))}if(!X)h.ident!==fe.ident&&(h.dependencies.set(fe.name,fe),Ae.add(fe));else for(let De of fe.references)X.references.add(De)}if(ie.dependencyKind===2&&we&&(C=!0),p.check){let fe=yxe(t);if(fe)throw new Error(`${fe}, after hoisting dependencies of ${[h,...U,ie].map(se=>Io(se.locator)).join(\"\\u2192\")}:\n${GD(t)}`)}let Ee=OY(ie);for(let fe of Ee)if(Ce.has(fe)){let se=Be.get(fe);if((a.get(fe.name)===fe.ident||!ie.reasons.has(fe.name))&&se.isHoistable!==0&&ie.reasons.set(fe.name,se.reason),!fe.isHoistBorder&&me.indexOf(uN(fe))<0){E.add(ie);let De=dxe(ie,fe);P([...U,ie],ce,me,De,R),E.delete(ie)}}},I,R=new Set(OY(h)),N=Array.from(e).map(U=>uN(U));do{I=R,R=new Set;for(let U of I){if(U.locator===h.locator||U.isHoistBorder)continue;let W=dxe(h,U);P([],Array.from(r),N,W,R)}}while(R.size>0);return{anotherRoundNeeded:C,isGraphChanged:S}},yxe=t=>{let e=[],r=new Set,s=new Set,a=(n,c,f)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let p=new Map(c);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),C=()=>`${Array.from(s).concat([n]).map(S=>Io(S.locator)).join(\"\\u2192\")}`;if(n.peerNames.has(h.name)){let S=c.get(h.name);(S!==E||!S||S.ident!==h.ident)&&e.push(`${C()} - broken peer promise: expected ${h.ident} but found ${S&&S.ident}`)}else{let S=f.hoistedFrom.get(n.name),P=n.hoistedTo.get(h.name),I=`${S?` hoisted from ${S.join(\", \")}`:\"\"}`,R=`${P?` hoisted to ${P}`:\"\"}`,N=`${C()}${I}`;E?E.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${R} found`)}}s.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);s.delete(n)};return a(t,t.dependencies,t),e.join(`\n`)},wTt=(t,e)=>{let{identName:r,name:s,reference:a,peerNames:n}=t,c={name:s,references:new Set([a]),locator:LY(r,a),ident:gxe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},f=new Map([[t,c]]),p=(h,E)=>{let C=f.get(h),S=!!C;if(!C){let{name:P,identName:I,reference:R,peerNames:N,hoistPriority:U,dependencyKind:W}=h,te=e.hoistingLimits.get(E.locator);C={name:P,references:new Set([R]),locator:LY(I,R),ident:gxe(I,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(P):!1,hoistPriority:U||0,dependencyKind:W||0,hoistedFrom:new Map,hoistedTo:new Map},f.set(h,C)}if(E.dependencies.set(h.name,C),E.originalDependencies.set(h.name,C),S){let P=new Set,I=R=>{if(!P.has(R)){P.add(R),R.decoupled=!1;for(let N of R.dependencies.values())R.peerNames.has(N.name)||I(N)}};I(C)}else for(let P of h.dependencies)p(P,C)};for(let h of t.dependencies)p(h,c);return c},_Y=t=>t.substring(0,t.indexOf(\"@\",1)),BTt=t=>{let e={name:t.name,identName:_Y(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),s=(a,n,c)=>{let f=r.has(a),p;if(n===a)p=c;else{let{name:h,references:E,locator:C}=a;p={name:h,identName:_Y(C),references:E,dependencies:new Set}}if(c.dependencies.add(p),!f){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||s(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())s(a,t,e);return e},vTt=t=>{let e=new Map,r=new Set([t]),s=c=>`${c.name}@${c.ident}`,a=c=>{let f=s(c),p=e.get(f);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(f,p)),p},n=(c,f)=>{let p=!!r.has(f);if(a(f).dependents.add(c.ident),!p){r.add(f);for(let E of f.dependencies.values()){let C=a(E);C.hoistPriority=Math.max(C.hoistPriority,E.hoistPriority),f.peerNames.has(E.name)?C.peerDependents.add(f.ident):n(f,E)}}};for(let c of t.dependencies.values())t.peerNames.has(c.name)||n(t,c);return e},Io=t=>{if(!t)return\"none\";let e=t.indexOf(\"@\",1),r=t.substring(0,e);r.endsWith(\"$wsroot$\")&&(r=`wh:${r.replace(\"$wsroot$\",\"\")}`);let s=t.substring(e+1);if(s===\"workspace:.\")return\".\";if(s){let a=(s.indexOf(\"#\")>0?s.split(\"#\")[1]:s).replace(\"npm:\",\"\");return s.startsWith(\"virtual\")&&(r=`v:${r}`),a.startsWith(\"workspace\")&&(r=`w:${r}`,a=\"\"),`${r}${a?`@${a}`:\"\"}`}else return`${r}`};var GD=t=>{let e=0,r=(a,n,c=\"\")=>{if(e>5e4||n.has(a))return\"\";e++;let f=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p=\"\";n.add(a);for(let h=0;h<f.length;h++){let E=f[h];if(!a.peerNames.has(E.name)&&E!==a){let C=a.reasons.get(E.name),S=_Y(E.locator);p+=`${c}${h<f.length-1?\"\\u251C\\u2500\":\"\\u2514\\u2500\"}${(n.has(E)?\">\":\"\")+(S!==E.name?`a:${E.name}:`:\"\")+Io(E.locator)+(C?` ${C}`:\"\")}\n`,p+=r(E,n,`${c}${h<f.length-1?\"\\u2502 \":\"  \"}`)}}return n.delete(a),p};return r(t,new Set)+(e>5e4?`\nTree is too large, part of the tree has been dunped\n`:\"\")};var WD=(s=>(s.WORKSPACES=\"workspaces\",s.DEPENDENCIES=\"dependencies\",s.NONE=\"none\",s))(WD||{}),Exe=\"node_modules\",ng=\"$wsroot$\";var YD=(t,e)=>{let{packageTree:r,hoistingLimits:s,errors:a,preserveSymlinksRequired:n}=DTt(t,e),c=null;if(a.length===0){let f=mxe(r,{hoistingLimits:s});c=PTt(t,f,e)}return{tree:c,errors:a,preserveSymlinksRequired:n}},gA=t=>`${t.name}@${t.reference}`,HY=t=>{let e=new Map;for(let[r,s]of t.entries())if(!s.dirList){let a=e.get(s.locator);a||(a={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},e.set(s.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((s,a)=>{let n=s.split(K.delimiter).length,c=a.split(K.delimiter).length;return a===s?0:n!==c?c-n:a>s?1:-1});return e},Ixe=(t,e)=>{let r=q.isVirtualLocator(t)?q.devirtualizeLocator(t):t,s=q.isVirtualLocator(e)?q.devirtualizeLocator(e):e;return q.areLocatorsEqual(r,s)},UY=(t,e,r,s)=>{if(t.linkType!==\"SOFT\")return!1;let a=ue.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith(\"virtual:\")?r.resolveVirtual(t.packageLocation):t.packageLocation);return K.contains(s,a)===null},STt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error(\"Assertion failed: Expected the top-level package to have been registered\");if(t.findPackageLocator(e.packageLocation)===null)throw new Error(\"Assertion failed: Expected the top-level package to have a physical locator\");let s=ue.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},c=t.getDependencyTreeRoots(),f=new Map,p=new Set,h=(S,P)=>{let I=gA(S);if(p.has(I))return;p.add(I);let R=t.getPackageInformation(S);if(R){let N=P?gA(P):\"\";if(gA(S)!==N&&R.linkType===\"SOFT\"&&!S.reference.startsWith(\"link:\")&&!UY(R,S,t,s)){let U=Cxe(R,S,t);(!f.get(U)||S.reference.startsWith(\"workspace:\"))&&f.set(U,S)}for(let[U,W]of R.packageDependencies)W!==null&&(R.packagePeers.has(U)||h(t.getLocator(U,W),S))}};for(let S of c)h(S,null);let E=s.split(K.sep);for(let S of f.values()){let P=t.getPackageInformation(S),R=ue.toPortablePath(P.packageLocation.slice(0,-1)).split(K.sep).slice(E.length),N=n;for(let U of R){let W=N.children.get(U);W||(W={children:new Map},N.children.set(U,W)),N=W}N.workspaceLocator=S}let C=(S,P)=>{if(S.workspaceLocator){let I=gA(P),R=a.get(I);R||(R=new Set,a.set(I,R)),R.add(S.workspaceLocator)}for(let I of S.children.values())C(I,S.workspaceLocator||P)};for(let S of n.children.values())C(S,n.workspaceLocator);return a},DTt=(t,e)=>{let r=[],s=!1,a=new Map,n=STt(t),c=t.getPackageInformation(t.topLevel);if(c===null)throw new Error(\"Assertion failed: Expected the top-level package to have been registered\");let f=t.findPackageLocator(c.packageLocation);if(f===null)throw new Error(\"Assertion failed: Expected the top-level package to have a physical locator\");let p=ue.toPortablePath(c.packageLocation.slice(0,-1)),h={name:f.name,identName:f.name,reference:f.reference,peerNames:c.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,C=(P,I)=>`${gA(I)}:${P}`,S=(P,I,R,N,U,W,te,ie)=>{let Ae=C(P,R),ce=E.get(Ae),me=!!ce;!me&&R.name===f.name&&R.reference===f.reference&&(ce=h,E.set(Ae,h));let pe=UY(I,R,t,p);if(!ce){let fe=0;pe?fe=2:I.linkType===\"SOFT\"&&R.name.endsWith(ng)&&(fe=1),ce={name:P,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:fe===1?new Set:I.packagePeers,dependencyKind:fe},E.set(Ae,ce)}let Be;if(pe?Be=2:U.linkType===\"SOFT\"?Be=1:Be=0,ce.hoistPriority=Math.max(ce.hoistPriority||0,Be),ie&&!pe){let fe=gA({name:N.identName,reference:N.reference}),se=a.get(fe)||new Set;a.set(fe,se),se.add(ce.name)}let Ce=new Map(I.packageDependencies);if(e.project){let fe=e.project.workspacesByCwd.get(ue.toPortablePath(I.packageLocation.slice(0,-1)));if(fe){let se=new Set([...Array.from(fe.manifest.peerDependencies.values(),X=>q.stringifyIdent(X)),...Array.from(fe.manifest.peerDependenciesMeta.keys())]);for(let X of se)Ce.has(X)||(Ce.set(X,W.get(X)||null),ce.peerNames.add(X))}}let g=gA({name:R.name.replace(ng,\"\"),reference:R.reference}),we=n.get(g);if(we)for(let fe of we)Ce.set(`${fe.name}${ng}`,fe.reference);(I!==U||I.linkType!==\"SOFT\"||!pe&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(te)))&&N.dependencies.add(ce);let Ee=R!==f&&I.linkType===\"SOFT\"&&!R.name.endsWith(ng)&&!pe;if(!me&&!Ee){let fe=new Map;for(let[se,X]of Ce)if(X!==null){let De=t.getLocator(se,X),Re=t.getLocator(se.replace(ng,\"\"),X),gt=t.getPackageInformation(Re);if(gt===null)throw new Error(\"Assertion failed: Expected the package to have been registered\");let j=UY(gt,De,t,p);if(e.validateExternalSoftLinks&&e.project&&j){gt.packageDependencies.size>0&&(s=!0);for(let[Ye,ke]of gt.packageDependencies)if(ke!==null){let it=q.parseLocator(Array.isArray(ke)?`${ke[0]}@${ke[1]}`:`${Ye}@${ke}`);if(gA(it)!==gA(De)){let _e=Ce.get(Ye);if(_e){let x=q.parseLocator(Array.isArray(_e)?`${_e[0]}@${_e[1]}`:`${Ye}@${_e}`);Ixe(x,it)||r.push({messageName:71,text:`Cannot link ${q.prettyIdent(e.project.configuration,q.parseIdent(De.name))} into ${q.prettyLocator(e.project.configuration,q.parseLocator(`${R.name}@${R.reference}`))} dependency ${q.prettyLocator(e.project.configuration,it)} conflicts with parent dependency ${q.prettyLocator(e.project.configuration,x)}`})}else{let x=fe.get(Ye);if(x){let w=x.target,b=q.parseLocator(Array.isArray(w)?`${w[0]}@${w[1]}`:`${Ye}@${w}`);Ixe(b,it)||r.push({messageName:71,text:`Cannot link ${q.prettyIdent(e.project.configuration,q.parseIdent(De.name))} into ${q.prettyLocator(e.project.configuration,q.parseLocator(`${R.name}@${R.reference}`))} dependency ${q.prettyLocator(e.project.configuration,it)} conflicts with dependency ${q.prettyLocator(e.project.configuration,b)} from sibling portal ${q.prettyIdent(e.project.configuration,q.parseIdent(x.portal.name))}`})}else fe.set(Ye,{target:it.reference,portal:De})}}}}let rt=e.hoistingLimitsByCwd?.get(te),Fe=j?te:K.relative(p,ue.toPortablePath(gt.packageLocation))||vt.dot,Ne=e.hoistingLimitsByCwd?.get(Fe);S(se,gt,De,ce,I,Ce,Fe,rt===\"dependencies\"||Ne===\"dependencies\"||Ne===\"workspaces\")}}};return S(f.name,c,f,h,c,c.packageDependencies,vt.dot,!1),{packageTree:h,hoistingLimits:a,errors:r,preserveSymlinksRequired:s}};function Cxe(t,e,r){let s=r.resolveVirtual&&e.reference&&e.reference.startsWith(\"virtual:\")?r.resolveVirtual(t.packageLocation):t.packageLocation;return ue.toPortablePath(s||t.packageLocation)}function bTt(t,e,r){let s=e.getLocator(t.name.replace(ng,\"\"),t.reference),a=e.getPackageInformation(s);if(a===null)throw new Error(\"Assertion failed: Expected the package to be registered\");return r.pnpifyFs?{linkType:\"SOFT\",target:ue.toPortablePath(a.packageLocation)}:{linkType:a.linkType,target:Cxe(a,t,e)}}var PTt=(t,e,r)=>{let s=new Map,a=(E,C,S)=>{let{linkType:P,target:I}=bTt(E,t,r);return{locator:gA(E),nodePath:C,target:I,linkType:P,aliases:S}},n=E=>{let[C,S]=E.split(\"/\");return S?{scope:C,name:S}:{scope:null,name:C}},c=new Set,f=(E,C,S)=>{if(c.has(E))return;c.add(E);let P=Array.from(E.references).sort().join(\"#\");for(let I of E.dependencies){let R=Array.from(I.references).sort().join(\"#\");if(I.identName===E.identName.replace(ng,\"\")&&R===P)continue;let N=Array.from(I.references).sort(),U={name:I.identName,reference:N[0]},{name:W,scope:te}=n(I.name),ie=te?[te,W]:[W],Ae=K.join(C,Exe),ce=K.join(Ae,...ie),me=`${S}/${U.name}`,pe=a(U,S,N.slice(1)),Be=!1;if(pe.linkType===\"SOFT\"&&r.project){let Ce=r.project.workspacesByCwd.get(pe.target.slice(0,-1));Be=!!(Ce&&!Ce.manifest.name)}if(!I.name.endsWith(ng)&&!Be){let Ce=s.get(ce);if(Ce){if(Ce.dirList)throw new Error(`Assertion failed: ${ce} cannot merge dir node with leaf node`);{let Ee=q.parseLocator(Ce.locator),fe=q.parseLocator(pe.locator);if(Ce.linkType!==pe.linkType)throw new Error(`Assertion failed: ${ce} cannot merge nodes with different link types ${Ce.nodePath}/${q.stringifyLocator(Ee)} and ${S}/${q.stringifyLocator(fe)}`);if(Ee.identHash!==fe.identHash)throw new Error(`Assertion failed: ${ce} cannot merge nodes with different idents ${Ce.nodePath}/${q.stringifyLocator(Ee)} and ${S}/s${q.stringifyLocator(fe)}`);pe.aliases=[...pe.aliases,...Ce.aliases,q.parseLocator(Ce.locator).reference]}}s.set(ce,pe);let g=ce.split(\"/\"),we=g.indexOf(Exe);for(let Ee=g.length-1;we>=0&&Ee>we;Ee--){let fe=ue.toPortablePath(g.slice(0,Ee).join(K.sep)),se=g[Ee],X=s.get(fe);if(!X)s.set(fe,{dirList:new Set([se])});else if(X.dirList){if(X.dirList.has(se))break;X.dirList.add(se)}}}f(I,pe.linkType===\"SOFT\"?pe.target:ce,me)}},p=a({name:e.name,reference:Array.from(e.references)[0]},\"\",[]),h=p.target;return s.set(h,p),f(e,h,\"\"),s};Ve();Ve();bt();bt();rA();Bc();var oV={};Vt(oV,{PnpInstaller:()=>Gm,PnpLinker:()=>og,UnplugCommand:()=>Pw,default:()=>iRt,getPnpPath:()=>ag,jsInstallUtils:()=>mA,pnpUtils:()=>nb,quotePathIfNeeded:()=>ske});bt();var ike=ye(\"url\");Ve();Ve();bt();bt();var wxe={DEFAULT:{collapsed:!1,next:{\"*\":\"DEFAULT\"}},TOP_LEVEL:{collapsed:!1,next:{fallbackExclusionList:\"FALLBACK_EXCLUSION_LIST\",packageRegistryData:\"PACKAGE_REGISTRY_DATA\",\"*\":\"DEFAULT\"}},FALLBACK_EXCLUSION_LIST:{collapsed:!1,next:{\"*\":\"FALLBACK_EXCLUSION_ENTRIES\"}},FALLBACK_EXCLUSION_ENTRIES:{collapsed:!0,next:{\"*\":\"FALLBACK_EXCLUSION_DATA\"}},FALLBACK_EXCLUSION_DATA:{collapsed:!0,next:{\"*\":\"DEFAULT\"}},PACKAGE_REGISTRY_DATA:{collapsed:!1,next:{\"*\":\"PACKAGE_REGISTRY_ENTRIES\"}},PACKAGE_REGISTRY_ENTRIES:{collapsed:!0,next:{\"*\":\"PACKAGE_STORE_DATA\"}},PACKAGE_STORE_DATA:{collapsed:!1,next:{\"*\":\"PACKAGE_STORE_ENTRIES\"}},PACKAGE_STORE_ENTRIES:{collapsed:!0,next:{\"*\":\"PACKAGE_INFORMATION_DATA\"}},PACKAGE_INFORMATION_DATA:{collapsed:!1,next:{packageDependencies:\"PACKAGE_DEPENDENCIES\",\"*\":\"DEFAULT\"}},PACKAGE_DEPENDENCIES:{collapsed:!1,next:{\"*\":\"PACKAGE_DEPENDENCY\"}},PACKAGE_DEPENDENCY:{collapsed:!0,next:{\"*\":\"DEFAULT\"}}};function xTt(t,e,r){let s=\"\";s+=\"[\";for(let a=0,n=t.length;a<n;++a)s+=fN(String(a),t[a],e,r).replace(/^ +/g,\"\"),a+1<n&&(s+=\", \");return s+=\"]\",s}function kTt(t,e,r){let s=`${r}  `,a=\"\";a+=r,a+=`[\n`;for(let n=0,c=t.length;n<c;++n)a+=s+fN(String(n),t[n],e,s).replace(/^ +/,\"\"),n+1<c&&(a+=\",\"),a+=`\n`;return a+=r,a+=\"]\",a}function QTt(t,e,r){let s=Object.keys(t),a=\"\";a+=\"{\";for(let n=0,c=s.length,f=0;n<c;++n){let p=s[n],h=t[p];typeof h>\"u\"||(f!==0&&(a+=\", \"),a+=JSON.stringify(p),a+=\": \",a+=fN(p,h,e,r).replace(/^ +/g,\"\"),f+=1)}return a+=\"}\",a}function TTt(t,e,r){let s=Object.keys(t),a=`${r}  `,n=\"\";n+=r,n+=`{\n`;let c=0;for(let f=0,p=s.length;f<p;++f){let h=s[f],E=t[h];typeof E>\"u\"||(c!==0&&(n+=\",\",n+=`\n`),n+=a,n+=JSON.stringify(h),n+=\": \",n+=fN(h,E,e,a).replace(/^ +/g,\"\"),c+=1)}return c!==0&&(n+=`\n`),n+=r,n+=\"}\",n}function fN(t,e,r,s){let{next:a}=wxe[r],n=a[t]||a[\"*\"];return Bxe(e,n,s)}function Bxe(t,e,r){let{collapsed:s}=wxe[e];return Array.isArray(t)?s?xTt(t,e,r):kTt(t,e,r):typeof t==\"object\"&&t!==null?s?QTt(t,e,r):TTt(t,e,r):JSON.stringify(t)}function vxe(t){return Bxe(t,\"TOP_LEVEL\",\"\")}function VD(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]<f[c]?-1:f[n]>f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function RTt(t){let e=new Map,r=VD(t.fallbackExclusionList||[],[({name:s,reference:a})=>s,({name:s,reference:a})=>a]);for(let{name:s,reference:a}of r){let n=e.get(s);typeof n>\"u\"&&e.set(s,n=new Set),n.add(a)}return Array.from(e).map(([s,a])=>[s,Array.from(a)])}function FTt(t){return VD(t.fallbackPool||[],([e])=>e)}function NTt(t){let e=[],r=t.dependencyTreeRoots.find(s=>t.packageRegistry.get(s.name)?.get(s.reference)?.packageLocation===\"./\");for(let[s,a]of VD(t.packageRegistry,([n])=>n===null?\"0\":`1${n}`)){if(s===null)continue;let n=[];e.push([s,n]);for(let[c,{packageLocation:f,packageDependencies:p,packagePeers:h,linkType:E,discardFromLookup:C}]of VD(a,([S])=>S===null?\"0\":`1${S}`)){if(c===null)continue;let S=[];s!==null&&c!==null&&!p.has(s)&&S.push([s,c]);for(let[U,W]of p)S.push([U,W]);let P=VD(S,([U])=>U),I=h&&h.size>0?Array.from(h):void 0,N={packageLocation:f,packageDependencies:P,packagePeers:I,linkType:E,discardFromLookup:C||void 0};n.push([c,N]),r&&s===r.name&&c===r.reference&&e.unshift([null,[[null,N]]])}}return e}function KD(t){return{__info:[\"This file is automatically generated. Do not touch it, or risk\",\"your modifications being lost.\"],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,pnpZipBackend:t.pnpZipBackend,fallbackExclusionList:RTt(t),fallbackPool:FTt(t),packageRegistryData:NTt(t)}}var bxe=et(Dxe());function Pxe(t,e){return[t?`${t}\n`:\"\",`/* eslint-disable */\n`,`// @ts-nocheck\n`,`\"use strict\";\n`,`\n`,e,`\n`,(0,bxe.default)()].join(\"\")}function OTt(t){return JSON.stringify(t,null,2)}function LTt(t){return`'${t.replace(/\\\\/g,\"\\\\\\\\\").replace(/'/g,\"\\\\'\").replace(/\\n/g,`\\\\\n`)}'`}function MTt(t){return[`const RAW_RUNTIME_STATE =\n`,`${LTt(vxe(t))};\n\n`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n`,`  return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});\n`,`}\n`].join(\"\")}function _Tt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n`,`  const fs = require('fs');\n`,`  const path = require('path');\n`,`  const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(Er.pnpData)});\n`,`  return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});\n`,`}\n`].join(\"\")}function xxe(t){let e=KD(t),r=MTt(e);return Pxe(t.shebang,r)}function kxe(t){let e=KD(t),r=_Tt(),s=Pxe(t.shebang,r);return{dataFile:OTt(e),loaderFile:s}}bt();function qY(t,{basePath:e}){let r=ue.toPortablePath(e),s=K.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,c=new Map(t.packageRegistryData.map(([C,S])=>[C,new Map(S.map(([P,I])=>{if(C===null!=(P===null))throw new Error(\"Assertion failed: The name and reference should be null, or neither should\");let R=I.discardFromLookup??!1,N={name:C,reference:P},U=n.get(I.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&R,R||(U.locator=N)):n.set(I.packageLocation,{locator:N,discardFromLookup:R});let W=null;return[P,{packageDependencies:new Map(I.packageDependencies),packagePeers:new Set(I.packagePeers),linkType:I.linkType,discardFromLookup:R,get packageLocation(){return W||(W=K.join(s,I.packageLocation))}}]}))])),f=new Map(t.fallbackExclusionList.map(([C,S])=>[C,new Set(S)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:f,pnpZipBackend:t.pnpZipBackend,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:c}}bt();bt();var lh=ye(\"module\"),qm=ye(\"url\"),$Y=ye(\"util\");var ra=ye(\"url\");var Fxe=et(ye(\"assert\"));var GY=Array.isArray,JD=JSON.stringify,zD=Object.getOwnPropertyNames,jm=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),WY=(t,e)=>RegExp.prototype.exec.call(t,e),YY=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),ig=(t,...e)=>String.prototype.endsWith.apply(t,e),VY=(t,...e)=>String.prototype.includes.apply(t,e),KY=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),ZD=(t,...e)=>String.prototype.indexOf.apply(t,e),Qxe=(t,...e)=>String.prototype.replace.apply(t,e),sg=(t,...e)=>String.prototype.slice.apply(t,e),dA=(t,...e)=>String.prototype.startsWith.apply(t,e),Txe=Map,Rxe=JSON.parse;function XD(t,e,r){return class extends r{constructor(...s){super(e(...s)),this.code=t,this.name=`${r.name} [${t}]`}}}var Nxe=XD(\"ERR_PACKAGE_IMPORT_NOT_DEFINED\",(t,e,r)=>`Package import specifier \"${t}\" is not defined${e?` in package ${e}package.json`:\"\"} imported from ${r}`,TypeError),JY=XD(\"ERR_INVALID_MODULE_SPECIFIER\",(t,e,r=void 0)=>`Invalid module \"${t}\" ${e}${r?` imported from ${r}`:\"\"}`,TypeError),Oxe=XD(\"ERR_INVALID_PACKAGE_TARGET\",(t,e,r,s=!1,a=void 0)=>{let n=typeof r==\"string\"&&!s&&r.length&&!dA(r,\"./\");return e===\".\"?((0,Fxe.default)(s===!1),`Invalid \"exports\" main target ${JD(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:\"\"}${n?'; targets must start with \"./\"':\"\"}`):`Invalid \"${s?\"imports\":\"exports\"}\" target ${JD(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:\"\"}${n?'; targets must start with \"./\"':\"\"}`},Error),$D=XD(\"ERR_INVALID_PACKAGE_CONFIG\",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:\"\"}${r?`. ${r}`:\"\"}`,Error),Lxe=XD(\"ERR_PACKAGE_PATH_NOT_EXPORTED\",(t,e,r=void 0)=>e===\".\"?`No \"exports\" main defined in ${t}package.json${r?` imported from ${r}`:\"\"}`:`Package subpath '${e}' is not defined by \"exports\" in ${t}package.json${r?` imported from ${r}`:\"\"}`,Error);var pN=ye(\"url\");function Mxe(t,e){let r=Object.create(null);for(let s=0;s<e.length;s++){let a=e[s];jm(t,a)&&(r[a]=t[a])}return r}var AN=new Txe;function UTt(t,e,r,s){let a=AN.get(t);if(a!==void 0)return a;let n=s(t);if(n===void 0){let P={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:\"none\",exports:void 0,imports:void 0};return AN.set(t,P),P}let c;try{c=Rxe(n)}catch(P){throw new $D(t,(r?`\"${e}\" from `:\"\")+(0,pN.fileURLToPath)(r||e),P.message)}let{imports:f,main:p,name:h,type:E}=Mxe(c,[\"imports\",\"main\",\"name\",\"type\"]),C=jm(c,\"exports\")?c.exports:void 0;(typeof f!=\"object\"||f===null)&&(f=void 0),typeof p!=\"string\"&&(p=void 0),typeof h!=\"string\"&&(h=void 0),E!==\"module\"&&E!==\"commonjs\"&&(E=\"none\");let S={pjsonPath:t,exists:!0,main:p,name:h,type:E,exports:C,imports:f};return AN.set(t,S),S}function _xe(t,e){let r=new URL(\"./package.json\",t);for(;;){let n=r.pathname;if(ig(n,\"node_modules/package.json\"))break;let c=UTt((0,pN.fileURLToPath)(r),t,void 0,e);if(c.exists)return c;let f=r;if(r=new URL(\"../package.json\",r),r.pathname===f.pathname)break}let s=(0,pN.fileURLToPath)(r),a={pjsonPath:s,exists:!1,main:void 0,name:void 0,type:\"none\",exports:void 0,imports:void 0};return AN.set(s,a),a}function HTt(t,e,r){throw new Nxe(t,e&&(0,ra.fileURLToPath)(new URL(\".\",e)),(0,ra.fileURLToPath)(r))}function jTt(t,e,r,s){let a=`request is not a valid subpath for the \"${r?\"imports\":\"exports\"}\" resolution of ${(0,ra.fileURLToPath)(e)}`;throw new JY(t,a,s&&(0,ra.fileURLToPath)(s))}function eb(t,e,r,s,a){throw typeof e==\"object\"&&e!==null?e=JD(e,null,\"\"):e=`${e}`,new Oxe((0,ra.fileURLToPath)(new URL(\".\",r)),t,e,s,a&&(0,ra.fileURLToPath)(a))}var Uxe=/(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\\\|\\/|$)/i,Hxe=/\\*/g;function qTt(t,e,r,s,a,n,c,f){if(e!==\"\"&&!n&&t[t.length-1]!==\"/\"&&eb(r,t,s,c,a),!dA(t,\"./\")){if(c&&!dA(t,\"../\")&&!dA(t,\"/\")){let C=!1;try{new URL(t),C=!0}catch{}if(!C)return n?YY(Hxe,t,()=>e):t+e}eb(r,t,s,c,a)}WY(Uxe,sg(t,2))!==null&&eb(r,t,s,c,a);let p=new URL(t,s),h=p.pathname,E=new URL(\".\",s).pathname;if(dA(h,E)||eb(r,t,s,c,a),e===\"\")return p;if(WY(Uxe,e)!==null){let C=n?Qxe(r,\"*\",()=>e):r+e;jTt(C,s,c,a)}return n?new URL(YY(Hxe,p.href,()=>e)):new URL(e,p)}function GTt(t){let e=+t;return`${e}`!==t?!1:e>=0&&e<4294967295}function bw(t,e,r,s,a,n,c,f){if(typeof e==\"string\")return qTt(e,r,s,t,a,n,c,f);if(GY(e)){if(e.length===0)return null;let p;for(let h=0;h<e.length;h++){let E=e[h],C;try{C=bw(t,E,r,s,a,n,c,f)}catch(S){if(p=S,S.code===\"ERR_INVALID_PACKAGE_TARGET\")continue;throw S}if(C!==void 0){if(C===null){p=null;continue}return C}}if(p==null)return p;throw p}else if(typeof e==\"object\"&&e!==null){let p=zD(e);for(let h=0;h<p.length;h++){let E=p[h];if(GTt(E))throw new $D((0,ra.fileURLToPath)(t),a,'\"exports\" cannot contain numeric property keys.')}for(let h=0;h<p.length;h++){let E=p[h];if(E===\"default\"||f.has(E)){let C=e[E],S=bw(t,C,r,s,a,n,c,f);if(S===void 0)continue;return S}}return}else if(e===null)return null;eb(s,e,t,c,a)}function qxe(t,e){let r=ZD(t,\"*\"),s=ZD(e,\"*\"),a=r===-1?t.length:r+1,n=s===-1?e.length:s+1;return a>n?-1:n>a||r===-1?1:s===-1||t.length>e.length?-1:e.length>t.length?1:0}function WTt(t,e,r){if(typeof t==\"string\"||GY(t))return!0;if(typeof t!=\"object\"||t===null)return!1;let s=zD(t),a=!1,n=0;for(let c=0;c<s.length;c++){let f=s[c],p=f===\"\"||f[0]!==\".\";if(n++===0)a=p;else if(a!==p)throw new $D((0,ra.fileURLToPath)(e),r,`\"exports\" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return a}function zY(t,e,r){throw new Lxe((0,ra.fileURLToPath)(new URL(\".\",e)),t,r&&(0,ra.fileURLToPath)(r))}var jxe=new Set;function YTt(t,e,r){let s=(0,ra.fileURLToPath)(e);jxe.has(s+\"|\"+t)||(jxe.add(s+\"|\"+t),process.emitWarning(`Use of deprecated trailing slash pattern mapping \"${t}\" in the \"exports\" field module resolution of the package at ${s}${r?` imported from ${(0,ra.fileURLToPath)(r)}`:\"\"}. Mapping specifiers ending in \"/\" is no longer supported.`,\"DeprecationWarning\",\"DEP0155\"))}function Gxe({packageJSONUrl:t,packageSubpath:e,exports:r,base:s,conditions:a}){if(WTt(r,t,s)&&(r={\".\":r}),jm(r,e)&&!VY(e,\"*\")&&!ig(e,\"/\")){let p=r[e],h=bw(t,p,\"\",e,s,!1,!1,a);return h==null&&zY(e,t,s),h}let n=\"\",c,f=zD(r);for(let p=0;p<f.length;p++){let h=f[p],E=ZD(h,\"*\");if(E!==-1&&dA(e,sg(h,0,E))){ig(e,\"/\")&&YTt(e,t,s);let C=sg(h,E+1);e.length>=h.length&&ig(e,C)&&qxe(n,h)===1&&KY(h,\"*\")===E&&(n=h,c=sg(e,E,e.length-C.length))}}if(n){let p=r[n],h=bw(t,p,c,n,s,!0,!1,a);return h==null&&zY(e,t,s),h}zY(e,t,s)}function Wxe({name:t,base:e,conditions:r,readFileSyncFn:s}){if(t===\"#\"||dA(t,\"#/\")||ig(t,\"/\")){let c=\"is not a valid internal imports specifier name\";throw new JY(t,c,(0,ra.fileURLToPath)(e))}let a,n=_xe(e,s);if(n.exists){a=(0,ra.pathToFileURL)(n.pjsonPath);let c=n.imports;if(c)if(jm(c,t)&&!VY(t,\"*\")){let f=bw(a,c[t],\"\",t,e,!1,!0,r);if(f!=null)return f}else{let f=\"\",p,h=zD(c);for(let E=0;E<h.length;E++){let C=h[E],S=ZD(C,\"*\");if(S!==-1&&dA(t,sg(C,0,S))){let P=sg(C,S+1);t.length>=C.length&&ig(t,P)&&qxe(f,C)===1&&KY(C,\"*\")===S&&(f=C,p=sg(t,S,t.length-P.length))}}if(f){let E=c[f],C=bw(a,E,p,f,e,!0,!0,r);if(C!=null)return C}}}HTt(t,a,e)}bt();var VTt=new Set([\"BUILTIN_NODE_RESOLUTION_FAILED\",\"MISSING_DEPENDENCY\",\"MISSING_PEER_DEPENDENCY\",\"QUALIFIED_PATH_RESOLUTION_FAILED\",\"UNDECLARED_DEPENDENCY\"]);function ds(t,e,r={},s){s??=VTt.has(t)?\"MODULE_NOT_FOUND\":t;let a={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:{...a,value:s},pnpCode:{...a,value:t},data:{...a,value:r}})}function cf(t){return ue.normalize(ue.fromPortablePath(t))}var Jxe=et(Vxe());function zxe(t){return KTt(),XY[t]}var XY;function KTt(){XY||(XY={\"--conditions\":[],...Kxe(JTt()),...Kxe(process.execArgv)})}function Kxe(t){return(0,Jxe.default)({\"--conditions\":[String],\"-C\":\"--conditions\"},{argv:t,permissive:!0})}function JTt(){let t=[],e=zTt(process.env.NODE_OPTIONS||\"\",t);return t.length,e}function zTt(t,e){let r=[],s=!1,a=!0;for(let n=0;n<t.length;++n){let c=t[n];if(c===\"\\\\\"&&s){if(n+1===t.length)return e.push(`invalid value for NODE_OPTIONS (invalid escape)\n`),r;c=t[++n]}else if(c===\" \"&&!s){a=!0;continue}else if(c==='\"'){s=!s;continue}a?(r.push(c),a=!1):r[r.length-1]+=c}return s&&e.push(`invalid value for NODE_OPTIONS (unterminated string)\n`),r}bt();var[yl,ah]=process.versions.node.split(\".\").map(t=>parseInt(t,10)),Zxe=yl>19||yl===19&&ah>=2||yl===18&&ah>=13,lmr=yl===20&&ah<6||yl===19&&ah>=3,cmr=yl>19||yl===19&&ah>=6,umr=yl>=21||yl===20&&ah>=10||yl===18&&ah>=19,fmr=yl>=21||yl===20&&ah>=10||yl===18&&ah>=20,Amr=yl>=22;function Xxe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>ue.fromPortablePath(fo.resolveVirtual(ue.toPortablePath(e)))),Zxe)process.send({\"watch:require\":t});else for(let e of t)process.send({\"watch:require\":e})}function eV(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\\\/]|\\\\\\\\|\\.{0,2}(?:\\/|$))((?:node:)?(?:@[^/]+\\/)?[^/]+)\\/*(.*|)$/,n=/^(\\/|\\.{1,2}(\\/|$))/,c=/\\/$/,f=/^\\.{0,2}\\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Fe of[\"react-scripts\",\"gatsby\"]){let Ne=t.packageRegistry.get(Fe);if(Ne)for(let Pe of Ne.keys()){if(Pe===null)throw new Error(\"Assertion failed: This reference shouldn't be null\");h.push({name:Fe,reference:Pe})}}let{ignorePattern:C,packageRegistry:S,packageLocatorsByLocations:P}=t;function I(Fe,Ne){return{fn:Fe,args:Ne,error:null,result:null}}function R(Fe){let Ne=process.stderr?.hasColors?.()??process.stdout.isTTY,Pe=(it,_e)=>`\\x1B[${it}m${_e}\\x1B[0m`,Ye=Fe.error;console.error(Ye?Pe(\"31;1\",`\\u2716 ${Fe.error?.message.replace(/\\n.*/s,\"\")}`):Pe(\"33;1\",\"\\u203C Resolution\")),Fe.args.length>0&&console.error();for(let it of Fe.args)console.error(`  ${Pe(\"37;1\",\"In \\u2190\")} ${(0,$Y.inspect)(it,{colors:Ne,compact:!0})}`);Fe.result&&(console.error(),console.error(`  ${Pe(\"37;1\",\"Out \\u2192\")} ${(0,$Y.inspect)(Fe.result,{colors:Ne,compact:!0})}`));let ke=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(ke.length>0){console.error();for(let it of ke)console.error(`  ${Pe(\"38;5;244\",it)}`)}console.error()}function N(Fe,Ne){if(e.allowDebug===!1)return Ne;if(Number.isFinite(s)){if(s>=2)return(...Pe)=>{let Ye=I(Fe,Pe);try{return Ye.result=Ne(...Pe)}catch(ke){throw Ye.error=ke}finally{R(Ye)}};if(s>=1)return(...Pe)=>{try{return Ne(...Pe)}catch(Ye){let ke=I(Fe,Pe);throw ke.error=Ye,R(ke),Ye}}}return Ne}function U(Fe){let Ne=g(Fe);if(!Ne)throw ds(\"INTERNAL\",\"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)\");return Ne}function W(Fe){if(Fe.name===null)return!0;for(let Ne of t.dependencyTreeRoots)if(Ne.name===Fe.name&&Ne.reference===Fe.reference)return!0;return!1}let te=new Set([\"node\",\"require\",...zxe(\"--conditions\")]);function ie(Fe,Ne=te,Pe){let Ye=fe(K.join(Fe,\"internal.js\"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ye===null)throw ds(\"INTERNAL\",`The locator that owns the \"${Fe}\" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:ke}=U(Ye),it=K.join(ke,Er.manifest);if(!e.fakeFs.existsSync(it))return null;let _e=JSON.parse(e.fakeFs.readFileSync(it,\"utf8\"));if(_e.exports==null)return null;let x=K.contains(ke,Fe);if(x===null)throw ds(\"INTERNAL\",\"unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)\");x!==\".\"&&!f.test(x)&&(x=`./${x}`);try{let w=Gxe({packageJSONUrl:(0,qm.pathToFileURL)(ue.fromPortablePath(it)),packageSubpath:x,exports:_e.exports,base:Pe?(0,qm.pathToFileURL)(ue.fromPortablePath(Pe)):null,conditions:Ne});return ue.toPortablePath((0,qm.fileURLToPath)(w))}catch(w){throw ds(\"EXPORTS_RESOLUTION_FAILED\",w.message,{unqualifiedPath:cf(Fe),locator:Ye,pkgJson:_e,subpath:cf(x),conditions:Ne},w.code)}}function Ae(Fe,Ne,{extensions:Pe}){let Ye;try{Ne.push(Fe),Ye=e.fakeFs.statSync(Fe)}catch{}if(Ye&&!Ye.isDirectory())return e.fakeFs.realpathSync(Fe);if(Ye&&Ye.isDirectory()){let ke;try{ke=JSON.parse(e.fakeFs.readFileSync(K.join(Fe,Er.manifest),\"utf8\"))}catch{}let it;if(ke&&ke.main&&(it=K.resolve(Fe,ke.main)),it&&it!==Fe){let _e=Ae(it,Ne,{extensions:Pe});if(_e!==null)return _e}}for(let ke=0,it=Pe.length;ke<it;ke++){let _e=`${Fe}${Pe[ke]}`;if(Ne.push(_e),e.fakeFs.existsSync(_e))return _e}if(Ye&&Ye.isDirectory())for(let ke=0,it=Pe.length;ke<it;ke++){let _e=K.format({dir:Fe,name:\"index\",ext:Pe[ke]});if(Ne.push(_e),e.fakeFs.existsSync(_e))return _e}return null}function ce(Fe){let Ne=new lh.Module(Fe,null);return Ne.filename=Fe,Ne.paths=lh.Module._nodeModulePaths(Fe),Ne}function me(Fe,Ne){return Ne.endsWith(\"/\")&&(Ne=K.join(Ne,\"internal.js\")),lh.Module._resolveFilename(ue.fromPortablePath(Fe),ce(ue.fromPortablePath(Ne)),!1,{plugnplay:!1})}function pe(Fe){if(C===null)return!1;let Ne=K.contains(t.basePath,Fe);return Ne===null?!1:!!C.test(Ne.replace(/\\/$/,\"\"))}let Be={std:3,resolveVirtual:1,getAllLocators:1},Ce=p;function g({name:Fe,reference:Ne}){let Pe=S.get(Fe);if(!Pe)return null;let Ye=Pe.get(Ne);return Ye||null}function we({name:Fe,reference:Ne}){let Pe=[];for(let[Ye,ke]of S)if(Ye!==null)for(let[it,_e]of ke)it===null||_e.packageDependencies.get(Fe)!==Ne||Ye===Fe&&it===Ne||Pe.push({name:Ye,reference:it});return Pe}function Ee(Fe,Ne){let Pe=new Map,Ye=new Set,ke=_e=>{let x=JSON.stringify(_e.name);if(Ye.has(x))return;Ye.add(x);let w=we(_e);for(let b of w)if(U(b).packagePeers.has(Fe))ke(b);else{let F=Pe.get(b.name);typeof F>\"u\"&&Pe.set(b.name,F=new Set),F.add(b.reference)}};ke(Ne);let it=[];for(let _e of[...Pe.keys()].sort())for(let x of[...Pe.get(_e)].sort())it.push({name:_e,reference:x});return it}function fe(Fe,{resolveIgnored:Ne=!1,includeDiscardFromLookup:Pe=!1}={}){if(pe(Fe)&&!Ne)return null;let Ye=K.relative(t.basePath,Fe);Ye.match(n)||(Ye=`./${Ye}`),Ye.endsWith(\"/\")||(Ye=`${Ye}/`);do{let ke=P.get(Ye);if(typeof ke>\"u\"||ke.discardFromLookup&&!Pe){Ye=Ye.substring(0,Ye.lastIndexOf(\"/\",Ye.length-2)+1);continue}return ke.locator}while(Ye!==\"\");return null}function se(Fe){try{return e.fakeFs.readFileSync(ue.toPortablePath(Fe),\"utf8\")}catch(Ne){if(Ne.code===\"ENOENT\")return;throw Ne}}function X(Fe,Ne,{considerBuiltins:Pe=!0}={}){if(Fe.startsWith(\"#\"))throw new Error(\"resolveToUnqualified can not handle private import mappings\");if(Fe===\"pnpapi\")return ue.toPortablePath(e.pnpapiResolution);if(Pe&&(0,lh.isBuiltin)(Fe))return null;let Ye=cf(Fe),ke=Ne&&cf(Ne);if(Ne&&pe(Ne)&&(!K.isAbsolute(Fe)||fe(Fe)===null)){let x=me(Fe,Ne);if(x===!1)throw ds(\"BUILTIN_NODE_RESOLUTION_FAILED\",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp)\n\nRequire request: \"${Ye}\"\nRequired by: ${ke}\n`,{request:Ye,issuer:ke});return ue.toPortablePath(x)}let it,_e=Fe.match(a);if(_e){if(!Ne)throw ds(\"API_ERROR\",\"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute\",{request:Ye,issuer:ke});let[,x,w]=_e,b=fe(Ne);if(!b){let Te=me(Fe,Ne);if(Te===!1)throw ds(\"BUILTIN_NODE_RESOLUTION_FAILED\",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).\n\nRequire path: \"${Ye}\"\nRequired by: ${ke}\n`,{request:Ye,issuer:ke});return ue.toPortablePath(Te)}let F=U(b).packageDependencies.get(x),z=null;if(F==null&&b.name!==null){let Te=t.fallbackExclusionList.get(b.name);if(!Te||!Te.has(b.reference)){for(let Et=0,qt=h.length;Et<qt;++Et){let Pt=U(h[Et]).packageDependencies.get(x);if(Pt!=null){r?z=Pt:F=Pt;break}}if(t.enableTopLevelFallback&&F==null&&z===null){let Et=t.fallbackPool.get(x);Et!=null&&(z=Et)}}}let Z=null;if(F===null)if(W(b))Z=ds(\"MISSING_PEER_DEPENDENCY\",`Your application tried to access ${x} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.\n\nRequired package: ${x}${x!==Ye?` (via \"${Ye}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ye,issuer:ke,dependencyName:x});else{let Te=Ee(x,b);Te.every(lt=>W(lt))?Z=ds(\"MISSING_PEER_DEPENDENCY\",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ye?` (via \"${Ye}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}\n`).join(\"\")}\n`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te}):Z=ds(\"MISSING_PEER_DEPENDENCY\",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ye?` (via \"${Ye}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n\n${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}\n`).join(\"\")}\n`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te})}else F===void 0&&(!Pe&&(0,lh.isBuiltin)(Fe)?W(b)?Z=ds(\"UNDECLARED_DEPENDENCY\",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ye?` (via \"${Ye}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ye,issuer:ke,dependencyName:x}):Z=ds(\"UNDECLARED_DEPENDENCY\",`${b.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${b.name}'s dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ye?` (via \"${Ye}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}):W(b)?Z=ds(\"UNDECLARED_DEPENDENCY\",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ye?` (via \"${Ye}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ye,issuer:ke,dependencyName:x}):Z=ds(\"UNDECLARED_DEPENDENCY\",`${b.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ye?` (via \"${Ye}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}));if(F==null){if(z===null||Z===null)throw Z||new Error(\"Assertion failed: Expected an error to have been set\");F=z;let Te=Z.message.replace(/\\n.*/g,\"\");Z.message=Te,!E.has(Te)&&s!==0&&(E.add(Te),process.emitWarning(Z))}let $=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:x,reference:F},oe=U($);if(!oe.packageLocation)throw ds(\"MISSING_DEPENDENCY\",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.\n\nRequired package: ${$.name}@${$.reference}${$.name!==Ye?` (via \"${Ye}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n`,{request:Ye,issuer:ke,dependencyLocator:Object.assign({},$)});let xe=oe.packageLocation;w?it=K.join(xe,w):it=xe}else if(K.isAbsolute(Fe))it=K.normalize(Fe);else{if(!Ne)throw ds(\"API_ERROR\",\"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute\",{request:Ye,issuer:ke});let x=K.resolve(Ne);Ne.match(c)?it=K.normalize(K.join(x,Fe)):it=K.normalize(K.join(K.dirname(x),Fe))}return K.normalize(it)}function De(Fe,Ne,Pe=te,Ye){if(n.test(Fe))return Ne;let ke=ie(Ne,Pe,Ye);return ke?K.normalize(ke):Ne}function Re(Fe,{extensions:Ne=Object.keys(lh.Module._extensions)}={}){let Pe=[],Ye=Ae(Fe,Pe,{extensions:Ne});if(Ye)return K.normalize(Ye);{Xxe(Pe.map(_e=>ue.fromPortablePath(_e)));let ke=cf(Fe),it=fe(Fe);if(it){let{packageLocation:_e}=U(it),x=!0;try{e.fakeFs.accessSync(_e)}catch(w){if(w?.code===\"ENOENT\")x=!1;else{let b=(w?.message??w??\"empty exception thrown\").replace(/^[A-Z]/,y=>y.toLowerCase());throw ds(\"QUALIFIED_PATH_RESOLUTION_FAILED\",`Required package exists but could not be accessed (${b}).\n\nMissing package: ${it.name}@${it.reference}\nExpected package location: ${cf(_e)}\n`,{unqualifiedPath:ke,extensions:Ne})}}if(!x){let w=_e.includes(\"/unplugged/\")?\"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).\":\"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.\";throw ds(\"QUALIFIED_PATH_RESOLUTION_FAILED\",`${w}\n\nMissing package: ${it.name}@${it.reference}\nExpected package location: ${cf(_e)}\n`,{unqualifiedPath:ke,extensions:Ne})}}throw ds(\"QUALIFIED_PATH_RESOLUTION_FAILED\",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.\n\nSource path: ${ke}\n${Pe.map(_e=>`Not found: ${cf(_e)}\n`).join(\"\")}`,{unqualifiedPath:ke,extensions:Ne})}}function gt(Fe,Ne,Pe){if(!Ne)throw new Error(\"Assertion failed: An issuer is required to resolve private import mappings\");let Ye=Wxe({name:Fe,base:(0,qm.pathToFileURL)(ue.fromPortablePath(Ne)),conditions:Pe.conditions??te,readFileSyncFn:se});if(Ye instanceof URL)return Re(ue.toPortablePath((0,qm.fileURLToPath)(Ye)),{extensions:Pe.extensions});if(Ye.startsWith(\"#\"))throw new Error(\"Mapping from one private import to another isn't allowed\");return j(Ye,Ne,Pe)}function j(Fe,Ne,Pe={}){try{if(Fe.startsWith(\"#\"))return gt(Fe,Ne,Pe);let{considerBuiltins:Ye,extensions:ke,conditions:it}=Pe,_e=X(Fe,Ne,{considerBuiltins:Ye});if(Fe===\"pnpapi\")return _e;if(_e===null)return null;let x=()=>Ne!==null?pe(Ne):!1,w=(!Ye||!(0,lh.isBuiltin)(Fe))&&!x()?De(Fe,_e,it,Ne):_e;return Re(w,{extensions:ke})}catch(Ye){throw Object.hasOwn(Ye,\"pnpCode\")&&Object.assign(Ye.data,{request:cf(Fe),issuer:Ne&&cf(Ne)}),Ye}}function rt(Fe){let Ne=K.normalize(Fe),Pe=fo.resolveVirtual(Ne);return Pe!==Ne?Pe:null}return{VERSIONS:Be,topLevel:Ce,getLocator:(Fe,Ne)=>Array.isArray(Ne)?{name:Ne[0],reference:Ne[1]}:{name:Fe,reference:Ne},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Fe=[];for(let[Ne,Pe]of S)for(let Ye of Pe.keys())Ne!==null&&Ye!==null&&Fe.push({name:Ne,reference:Ye});return Fe},getPackageInformation:Fe=>{let Ne=g(Fe);if(Ne===null)return null;let Pe=ue.fromPortablePath(Ne.packageLocation);return{...Ne,packageLocation:Pe}},findPackageLocator:Fe=>fe(ue.toPortablePath(Fe)),resolveToUnqualified:N(\"resolveToUnqualified\",(Fe,Ne,Pe)=>{let Ye=Ne!==null?ue.toPortablePath(Ne):null,ke=X(ue.toPortablePath(Fe),Ye,Pe);return ke===null?null:ue.fromPortablePath(ke)}),resolveUnqualified:N(\"resolveUnqualified\",(Fe,Ne)=>ue.fromPortablePath(Re(ue.toPortablePath(Fe),Ne))),resolveRequest:N(\"resolveRequest\",(Fe,Ne,Pe)=>{let Ye=Ne!==null?ue.toPortablePath(Ne):null,ke=j(ue.toPortablePath(Fe),Ye,Pe);return ke===null?null:ue.fromPortablePath(ke)}),resolveVirtual:N(\"resolveVirtual\",Fe=>{let Ne=rt(ue.toPortablePath(Fe));return Ne!==null?ue.fromPortablePath(Ne):null})}}bt();var $xe=(t,e,r)=>{let s=KD(t),a=qY(s,{basePath:e}),n=ue.join(e,Er.pnpCjs);return eV(a,{fakeFs:r,pnpapiResolution:n})};var rV=et(tke());Wt();var mA={};Vt(mA,{checkManifestCompatibility:()=>rke,extractBuildRequest:()=>hN,getExtractHint:()=>nV,hasBindingGyp:()=>iV});Ve();bt();function rke(t){return q.isPackageCompatible(t,As.getArchitectureSet())}function hN(t,e,r,{configuration:s}){let a=[];for(let n of[\"preinstall\",\"install\",\"postinstall\"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has(\"install\")&&e.misc.hasBindingGyp&&a.push({type:1,script:\"node-gyp rebuild\"}),a.length===0?null:t.linkType!==\"HARD\"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${q.prettyLocator(s,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${q.prettyLocator(s,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!s.get(\"enableScripts\")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${q.prettyLocator(s,t)} lists build scripts, but all build scripts have been disabled.`)}:rke(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${q.prettyLocator(s,t)} The ${As.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var XTt=new Set([\".exe\",\".bin\",\".h\",\".hh\",\".hpp\",\".c\",\".cc\",\".cpp\",\".java\",\".jar\",\".node\"]);function nV(t){return t.packageFs.getExtractHint({relevantExtensions:XTt})}function iV(t){let e=K.join(t.prefixPath,\"binding.gyp\");return t.packageFs.existsSync(e)}var nb={};Vt(nb,{getUnpluggedPath:()=>rb});Ve();bt();function rb(t,{configuration:e}){return K.resolve(e.get(\"pnpUnpluggedFolder\"),q.slugifyLocator(t))}var $Tt=new Set([q.makeIdent(null,\"open\").identHash,q.makeIdent(null,\"opn\").identHash]),og=class{constructor(){this.mode=\"strict\";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:\"PnpLinker\",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error(\"Assertion failed: Expected the PnP linker to be enabled\");let s=ag(r.project).cjs;if(!le.existsSync(s))throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})),n={name:q.stringifyIdent(e),reference:e.reference},c=a.getPackageInformation(n);if(!c)throw new nt(`Couldn't find ${q.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return ue.toPortablePath(c.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=ag(r.project).cjs;if(!le.existsSync(s))return null;let n=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})).findPackageLocator(ue.fromPortablePath(e));return n?q.makeLocator(q.parseIdent(n.name),n.reference):null}makeInstaller(e){return new Gm(e)}isEnabled(e){return!(e.project.configuration.get(\"nodeLinker\")!==\"pnp\"||e.project.configuration.get(\"pnpMode\")!==this.mode)}},Gm=class{constructor(e){this.opts=e;this.mode=\"strict\";this.asyncActions=new je.AsyncActions(10);this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=e}attachCustomData(e){this.customData=e}async installPackage(e,r,s){let a=q.stringifyIdent(e),n=e.reference,c=!!this.opts.project.tryWorkspaceByLocator(e),f=q.isVirtualLocator(e),p=e.peerDependencies.size>0&&!f,h=!p&&!c,E=!p&&e.linkType!==\"SOFT\",C,S;if(h||E){let te=f?q.devirtualizeLocator(e):e;C=this.customData.store.get(te.locatorHash),typeof C>\"u\"&&(C=await eRt(r),e.linkType===\"HARD\"&&this.customData.store.set(te.locatorHash,C)),C.manifest.type===\"module\"&&(this.isESMLoaderRequired=!0),S=this.opts.project.getDependencyMeta(te,e.version)}let P=h?hN(e,C,S,{configuration:this.opts.project.configuration}):null,I=E?await this.unplugPackageIfNeeded(e,C,r,S,s):r.packageFs;if(K.isAbsolute(r.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${r.prefixPath}) to be relative to the parent`);let R=K.resolve(I.getRealPath(),r.prefixPath),N=sV(this.opts.project.cwd,R),U=new Map,W=new Set;if(f){for(let te of e.peerDependencies.values())U.set(q.stringifyIdent(te),null),W.add(q.stringifyIdent(te));if(!c){let te=q.devirtualizeLocator(e);this.virtualTemplates.set(te.locatorHash,{location:sV(this.opts.project.cwd,fo.resolveVirtual(R)),locator:te})}}return je.getMapWithDefault(this.packageRegistry,a).set(n,{packageLocation:N,packageDependencies:U,packagePeers:W,linkType:e.linkType,discardFromLookup:r.discardFromLookup||!1}),{packageLocation:R,buildRequest:P}}async attachInternalDependencies(e,r){let s=this.getPackageInformation(e);for(let[a,n]of r){let c=q.areIdentsEqual(a,n)?n.reference:[q.stringifyIdent(n),n.reference];s.packageDependencies.set(q.stringifyIdent(a),c)}}async attachExternalDependents(e,r){for(let s of r)this.getDiskInformation(s).packageDependencies.set(q.stringifyIdent(e),e.reference)}async finalizeInstall(){if(this.opts.project.configuration.get(\"pnpMode\")!==this.mode)return;let e=ag(this.opts.project);if(this.isEsmEnabled()||await le.removePromise(e.esmLoader),this.opts.project.configuration.get(\"nodeLinker\")!==\"pnp\"){await le.removePromise(e.cjs),await le.removePromise(e.data),await le.removePromise(e.esmLoader),await le.removePromise(this.opts.project.configuration.get(\"pnpUnpluggedFolder\"));return}for(let{locator:C,location:S}of this.virtualTemplates.values())je.getMapWithDefault(this.packageRegistry,q.stringifyIdent(C)).set(C.reference,{packageLocation:S,packageDependencies:new Map,packagePeers:new Set,linkType:\"SOFT\",discardFromLookup:!1});let r=this.opts.project.configuration.get(\"pnpFallbackMode\"),s=this.opts.project.workspaces.map(({anchoredLocator:C})=>({name:q.stringifyIdent(C),reference:C.reference})),a=r!==\"none\",n=[],c=new Map,f=je.buildIgnorePattern([\".yarn/sdks/**\",...this.opts.project.configuration.get(\"pnpIgnorePatterns\")]),p=this.packageRegistry,h=this.opts.project.configuration.get(\"pnpShebang\"),E=this.opts.project.configuration.get(\"pnpZipBackend\");if(r===\"dependencies-only\")for(let C of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(C)&&n.push({name:q.stringifyIdent(C),reference:C.reference});return await this.asyncActions.wait(),await this.finalizeInstallWithPnp({dependencyTreeRoots:s,enableTopLevelFallback:a,fallbackExclusionList:n,fallbackPool:c,ignorePattern:f,pnpZipBackend:E,packageRegistry:p,shebang:h}),{customData:this.customData}}async transformPnpSettings(e){}isEsmEnabled(){if(this.opts.project.configuration.sources.has(\"pnpEnableEsmLoader\"))return this.opts.project.configuration.get(\"pnpEnableEsmLoader\");if(this.isESMLoaderRequired)return!0;for(let e of this.opts.project.workspaces)if(e.manifest.type===\"module\")return!0;return!1}async finalizeInstallWithPnp(e){let r=ag(this.opts.project),s=await this.locateNodeModules(e.ignorePattern);if(s.length>0){this.opts.report.reportWarning(31,\"One or more node_modules have been detected and will be removed. This operation may take some time.\");for(let n of s)await le.removePromise(n)}if(await this.transformPnpSettings(e),this.opts.project.configuration.get(\"pnpEnableInlining\")){let n=xxe(e);await le.changeFilePromise(r.cjs,n,{automaticNewlines:!0,mode:493}),await le.removePromise(r.data)}else{let{dataFile:n,loaderFile:c}=kxe(e);await le.changeFilePromise(r.cjs,c,{automaticNewlines:!0,mode:493}),await le.changeFilePromise(r.data,n,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(0,\"ESM support for PnP uses the experimental loader API and is therefore experimental\"),await le.changeFilePromise(r.esmLoader,(0,rV.default)(),{automaticNewlines:!0,mode:420}));let a=this.opts.project.configuration.get(\"pnpUnpluggedFolder\");if(this.unpluggedPaths.size===0)await le.removePromise(a);else for(let n of await le.readdirPromise(a)){let c=K.resolve(a,n);this.unpluggedPaths.has(c)||await le.removePromise(c)}}async locateNodeModules(e){let r=[],s=e?new RegExp(e):null;for(let a of this.opts.project.workspaces){let n=K.join(a.cwd,\"node_modules\");if(s&&s.test(K.relative(this.opts.project.cwd,a.cwd))||!le.existsSync(n))continue;let c=await le.readdirPromise(n,{withFileTypes:!0}),f=c.filter(p=>!p.isDirectory()||p.name===\".bin\"||!p.name.startsWith(\".\"));if(f.length===c.length)r.push(n);else for(let p of f)r.push(K.join(n,p.name))}return r}async unplugPackageIfNeeded(e,r,s,a,n){return this.shouldBeUnplugged(e,r,a)?this.unplugPackage(e,s,n):s.packageFs}shouldBeUnplugged(e,r,s){return typeof s.unplugged<\"u\"?s.unplugged:$Tt.has(e.identHash)||e.conditions!=null?!0:r.manifest.preferUnplugged!==null?r.manifest.preferUnplugged:!!(hN(e,r,s,{configuration:this.opts.project.configuration})?.skipped===!1||r.misc.extractHint)}async unplugPackage(e,r,s){let a=rb(e,{configuration:this.opts.project.configuration});return this.opts.project.disabledLocators.has(e.locatorHash)?new Hf(a,{baseFs:r.packageFs,pathUtils:K}):(this.unpluggedPaths.add(a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{let n=K.join(a,r.prefixPath,\".ready\");await le.existsPromise(n)||(this.opts.project.storedBuildState.delete(e.locatorHash),await le.mkdirPromise(a,{recursive:!0}),await le.copyPromise(a,vt.dot,{baseFs:r.packageFs,overwrite:!1}),await le.writeFilePromise(n,\"\"))})),new Sn(a))}getPackageInformation(e){let r=q.stringifyIdent(e),s=e.reference,a=this.packageRegistry.get(r);if(!a)throw new Error(`Assertion failed: The package information store should have been available (for ${q.prettyIdent(this.opts.project.configuration,e)})`);let n=a.get(s);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${q.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){let r=je.getMapWithDefault(this.packageRegistry,\"@@disk\"),s=sV(this.opts.project.cwd,e);return je.getFactoryWithDefault(r,s,()=>({packageLocation:s,packageDependencies:new Map,packagePeers:new Set,linkType:\"SOFT\",discardFromLookup:!1}))}};function sV(t,e){let r=K.relative(t,e);return r.match(/^\\.{0,2}\\//)||(r=`./${r}`),r.replace(/\\/?$/,\"/\")}async function eRt(t){let e=await Ht.tryFind(t.prefixPath,{baseFs:t.packageFs})??new Ht,r=new Set([\"preinstall\",\"install\",\"postinstall\"]);for(let s of e.scripts.keys())r.has(s)||e.scripts.delete(s);return{manifest:{scripts:e.scripts,preferUnplugged:e.preferUnplugged,type:e.type},misc:{extractHint:nV(t),hasBindingGyp:iV(t)}}}Ve();Ve();Wt();var nke=et(Sa());var Pw=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Unplug direct dependencies from the entire project\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Unplug both direct and transitive dependencies\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.patterns=ge.Rest()}static{this.paths=[[\"unplug\"]]}static{this.usage=ot.Usage({description:\"force the unpacking of a list of packages\",details:\"\\n      This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\\n\\n      A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\\n\\n      Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\\n\\n      By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\\n\\n      This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\\n    \",examples:[[\"Unplug the lodash dependency from the active workspace\",\"yarn unplug lodash\"],[\"Unplug all instances of lodash referenced by any workspace\",\"yarn unplug lodash -A\"],[\"Unplug all instances of lodash referenced by the active workspace and its dependencies\",\"yarn unplug lodash -R\"],[\"Unplug all instances of lodash, anywhere\",\"yarn unplug lodash -AR\"],[\"Unplug one specific version of lodash\",\"yarn unplug lodash@1.2.3\"],[\"Unplug all packages with the `@babel` scope\",\"yarn unplug '@babel/*'\"],[\"Unplug all packages (only for testing, not recommended)\",\"yarn unplug -R '*'\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);if(r.get(\"nodeLinker\")!==\"pnp\")throw new nt(\"This command can only be used if the `nodeLinker` option is set to `pnp`\");await s.restoreInstallState();let c=new Set(this.patterns),f=this.patterns.map(P=>{let I=q.parseDescriptor(P),R=I.range!==\"unknown\"?I:q.makeDescriptor(I,\"*\");if(!Or.validRange(R.range))throw new nt(`The range of the descriptor patterns must be a valid semver range (${q.prettyDescriptor(r,R)})`);return N=>{let U=q.stringifyIdent(N);return!nke.default.isMatch(U,q.stringifyIdent(R))||N.version&&!Or.satisfiesWithPrereleases(N.version,R.range)?!1:(c.delete(P),!0)}}),p=()=>{let P=[];for(let I of s.storedPackages.values())!s.tryWorkspaceByLocator(I)&&!q.isVirtualLocator(I)&&f.some(R=>R(I))&&P.push(I);return P},h=P=>{let I=new Set,R=[],N=(U,W)=>{if(I.has(U.locatorHash))return;let te=!!s.tryWorkspaceByLocator(U);if(!(W>0&&!this.recursive&&te)&&(I.add(U.locatorHash),!s.tryWorkspaceByLocator(U)&&f.some(ie=>ie(U))&&R.push(U),!(W>0&&!this.recursive)))for(let ie of U.dependencies.values()){let Ae=s.storedResolutions.get(ie.descriptorHash);if(!Ae)throw new Error(\"Assertion failed: The resolution should have been registered\");let ce=s.storedPackages.get(Ae);if(!ce)throw new Error(\"Assertion failed: The package should have been registered\");N(ce,W+1)}};for(let U of P)N(U.anchoredPackage,0);return R},E,C;if(this.all&&this.recursive?(E=p(),C=\"the project\"):this.all?(E=h(s.workspaces),C=\"any workspace\"):(E=h([a]),C=\"this workspace\"),c.size>1)throw new nt(`Patterns ${he.prettyList(r,c,he.Type.CODE)} don't match any packages referenced by ${C}`);if(c.size>0)throw new nt(`Pattern ${he.prettyList(r,c,he.Type.CODE)} doesn't match any packages referenced by ${C}`);E=je.sortMap(E,P=>q.stringifyLocator(P));let S=await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async P=>{for(let I of E){let R=I.version??\"unknown\",N=s.topLevelWorkspace.manifest.ensureDependencyMeta(q.makeDescriptor(I,R));N.unplugged=!0,P.reportInfo(0,`Will unpack ${q.prettyLocator(r,I)} to ${he.pretty(r,rb(I,{configuration:r}),he.Type.PATH)}`),P.reportJson({locator:q.stringifyLocator(I),version:R})}await s.topLevelWorkspace.persistManifest(),this.json||P.reportSeparator()});return S.hasErrors()?S.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};var ag=t=>({cjs:K.join(t.cwd,Er.pnpCjs),data:K.join(t.cwd,Er.pnpData),esmLoader:K.join(t.cwd,Er.pnpEsmLoader)}),ske=t=>/\\s/.test(t)?JSON.stringify(t):t;async function tRt(t,e,r){let s=/\\s*--require\\s+\\S*\\.pnp\\.c?js\\s*/g,a=/\\s*--experimental-loader\\s+\\S*\\.pnp\\.loader\\.mjs\\s*/,n=(e.NODE_OPTIONS??\"\").replace(s,\" \").replace(a,\" \").trim();if(t.configuration.get(\"nodeLinker\")!==\"pnp\"){e.NODE_OPTIONS=n||void 0;return}let c=ag(t),f=`--require ${ske(ue.fromPortablePath(c.cjs))}`;le.existsSync(c.esmLoader)&&(f=`${f} --experimental-loader ${(0,ike.pathToFileURL)(ue.fromPortablePath(c.esmLoader)).href}`),le.existsSync(c.cjs)&&(e.NODE_OPTIONS=n?`${f} ${n}`:f)}async function rRt(t,e){let r=ag(t);e(r.cjs),e(r.data),e(r.esmLoader),e(t.configuration.get(\"pnpUnpluggedFolder\"))}var nRt={hooks:{populateYarnPaths:rRt,setupScriptEnvironment:tRt},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: \"pnp\", \"pnpm\", or \"node-modules\"',type:\"STRING\",default:\"pnp\"},minizip:{description:\"Whether Yarn should use minizip to extract archives\",type:\"BOOLEAN\",default:!1},winLinkType:{description:\"Whether Yarn should use Windows Junctions or symlinks when creating links on Windows.\",type:\"STRING\",values:[\"junctions\",\"symlinks\"],default:\"junctions\"},pnpMode:{description:\"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.\",type:\"STRING\",default:\"strict\"},pnpShebang:{description:\"String to prepend to the generated PnP script\",type:\"STRING\",default:\"#!/usr/bin/env node\"},pnpIgnorePatterns:{description:\"Array of glob patterns; files matching them will use the classic resolution\",type:\"STRING\",default:[],isArray:!0},pnpZipBackend:{description:\"Whether to use the experimental js implementation for the ZipFS\",type:\"STRING\",values:[\"libzip\",\"js\"],default:\"libzip\"},pnpEnableEsmLoader:{description:\"If true, Yarn will generate an ESM loader (`.pnp.loader.mjs`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.\",type:\"BOOLEAN\",default:!1},pnpEnableInlining:{description:\"If true, the PnP data will be inlined along with the generated loader\",type:\"BOOLEAN\",default:!0},pnpFallbackMode:{description:\"If true, the generated PnP loader will follow the top-level fallback rule\",type:\"STRING\",default:\"dependencies-only\"},pnpUnpluggedFolder:{description:\"Folder where the unplugged packages must be stored\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/unplugged\"}},linkers:[og],commands:[Pw]},iRt=nRt;var pke=et(uke());Wt();var pV=et(ye(\"crypto\")),hke=et(ye(\"fs\")),gke=1,_i=\"node_modules\",gN=\".bin\",dke=\".yarn-state.yml\",CRt=1e3,hV=(s=>(s.CLASSIC=\"classic\",s.HARDLINKS_LOCAL=\"hardlinks-local\",s.HARDLINKS_GLOBAL=\"hardlinks-global\",s))(hV||{}),ib=class{constructor(){this.installStateCache=new Map}getCustomDataKey(){return JSON.stringify({name:\"NodeModulesLinker\",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error(\"Assertion failed: Expected the node-modules linker to be enabled\");let s=r.project.tryWorkspaceByLocator(e);if(s)return s.cwd;let a=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await AV(r.project,{unrollAliases:!0}));if(a===null)throw new nt(\"Couldn't find the node_modules state file - running an install might help (findPackageLocation)\");let n=a.locatorMap.get(q.stringifyLocator(e));if(!n){let p=new nt(`Couldn't find ${q.prettyLocator(r.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw p.code=\"LOCATOR_NOT_INSTALLED\",p}let c=n.locations.sort((p,h)=>p.split(K.sep).length-h.split(K.sep).length),f=K.join(r.project.configuration.startingCwd,_i);return c.find(p=>K.contains(f,p))||n.locations[0]}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await AV(r.project,{unrollAliases:!0}));if(s===null)return null;let{locationRoot:a,segments:n}=dN(K.resolve(e),{skipPrefix:r.project.cwd}),c=s.locationTree.get(a);if(!c)return null;let f=c.locator;for(let p of n){if(c=c.children.get(p),!c)break;f=c.locator||f}return q.parseLocator(f)}makeInstaller(e){return new fV(e)}isEnabled(e){return e.project.configuration.get(\"nodeLinker\")===\"node-modules\"}},fV=class{constructor(e){this.opts=e;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}attachCustomData(e){this.customData=e}async installPackage(e,r){let s=K.resolve(r.packageFs.getRealPath(),r.prefixPath),a=this.customData.store.get(e.locatorHash);if(typeof a>\"u\"&&(a=await wRt(e,r),e.linkType===\"HARD\"&&this.customData.store.set(e.locatorHash,a)),!q.isPackageCompatible(e,this.opts.project.configuration.getSupportedArchitectures()))return{packageLocation:null,buildRequest:null};let n=new Map,c=new Set;n.has(q.stringifyIdent(e))||n.set(q.stringifyIdent(e),e.reference);let f=e;if(q.isVirtualLocator(e)){f=q.devirtualizeLocator(e);for(let E of e.peerDependencies.values())n.set(q.stringifyIdent(E),null),c.add(q.stringifyIdent(E))}let p={packageLocation:`${ue.fromPortablePath(s)}/`,packageDependencies:n,packagePeers:c,linkType:e.linkType,discardFromLookup:r.discardFromLookup??!1};this.localStore.set(e.locatorHash,{pkg:e,customPackageData:a,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:p});let h=r.checksum?r.checksum.substring(r.checksum.indexOf(\"/\")+1):null;return this.realLocatorChecksums.set(f.locatorHash,h),{packageLocation:s,buildRequest:null}}async attachInternalDependencies(e,r){let s=this.localStore.get(e.locatorHash);if(typeof s>\"u\")throw new Error(\"Assertion failed: Expected information object to have been registered\");for(let[a,n]of r){let c=q.areIdentsEqual(a,n)?n.reference:[q.stringifyIdent(n),n.reference];s.pnpNode.packageDependencies.set(q.stringifyIdent(a),c)}}async attachExternalDependents(e,r){throw new Error(\"External dependencies haven't been implemented for the node-modules linker\")}async finalizeInstall(){if(this.opts.project.configuration.get(\"nodeLinker\")!==\"node-modules\")return;let e=new fo({baseFs:new tA({maxOpenFiles:80,readOnlyArchives:!0})}),r=await AV(this.opts.project),s=this.opts.project.configuration.get(\"nmMode\");(r===null||s!==r.nmMode)&&(this.opts.project.storedBuildState.clear(),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:s,mtimeMs:0});let a=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get(\"nmHoistingLimits\");try{P=je.validateEnum(WD,S.manifest.installConfig?.hoistingLimits??P)}catch{let I=q.prettyWorkspace(this.opts.project.configuration,S);this.opts.report.reportWarning(57,`${I}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(WD).join(\", \")}, using default: \"${P}\"`)}return[S.relativeCwd,P]})),n=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get(\"nmSelfReferences\");return P=S.manifest.installConfig?.selfReferences??P,[S.relativeCwd,P]})),c={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(S,P)=>Array.isArray(P)?{name:P[0],reference:P[1]}:{name:S,reference:P},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(S=>{let P=S.anchoredLocator;return{name:q.stringifyIdent(P),reference:P.reference}}),getPackageInformation:S=>{let P=S.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:q.makeLocator(q.parseIdent(S.name),S.reference),I=this.localStore.get(P.locatorHash);if(typeof I>\"u\")throw new Error(\"Assertion failed: Expected the package reference to have been registered\");return I.pnpNode},findPackageLocator:S=>{let P=this.opts.project.tryWorkspaceByCwd(ue.toPortablePath(S));if(P!==null){let I=P.anchoredLocator;return{name:q.stringifyIdent(I),reference:I.reference}}throw new Error(\"Assertion failed: Unimplemented\")},resolveToUnqualified:()=>{throw new Error(\"Assertion failed: Unimplemented\")},resolveUnqualified:()=>{throw new Error(\"Assertion failed: Unimplemented\")},resolveRequest:()=>{throw new Error(\"Assertion failed: Unimplemented\")},resolveVirtual:S=>ue.fromPortablePath(fo.resolveVirtual(ue.toPortablePath(S)))},{tree:f,errors:p,preserveSymlinksRequired:h}=YD(c,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:a,project:this.opts.project,selfReferencesByCwd:n});if(!f){for(let{messageName:S,text:P}of p)this.opts.report.reportError(S,P);return}let E=HY(f);await PRt(r,E,{baseFs:e,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async S=>{let P=q.parseLocator(S),I=this.localStore.get(P.locatorHash);if(typeof I>\"u\")throw new Error(\"Assertion failed: Expected the slot to exist\");return I.customPackageData.manifest}});let C=[];for(let[S,P]of E.entries()){if(Eke(S))continue;let I=q.parseLocator(S),R=this.localStore.get(I.locatorHash);if(typeof R>\"u\")throw new Error(\"Assertion failed: Expected the slot to exist\");if(this.opts.project.tryWorkspaceByLocator(R.pkg))continue;let N=mA.extractBuildRequest(R.pkg,R.customPackageData,R.dependencyMeta,{configuration:this.opts.project.configuration});N&&C.push({buildLocations:P.locations,locator:I,buildRequest:N})}return h&&this.opts.report.reportWarning(72,`The application uses portals and that's why ${he.pretty(this.opts.project.configuration,\"--preserve-symlinks\",he.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:C}}};async function wRt(t,e){let r=await Ht.tryFind(e.prefixPath,{baseFs:e.packageFs})??new Ht,s=new Set([\"preinstall\",\"install\",\"postinstall\"]);for(let a of r.scripts.keys())s.has(a)||r.scripts.delete(a);return{manifest:{bin:r.bin,scripts:r.scripts},misc:{hasBindingGyp:mA.hasBindingGyp(e)}}}async function BRt(t,e,r,s,{installChangedByUser:a}){let n=\"\";n+=`# Warning: This file is automatically generated. Removing it is fine, but will\n`,n+=`# cause your node_modules installation to become invalidated.\n`,n+=`\n`,n+=`__metadata:\n`,n+=`  version: ${gke}\n`,n+=`  nmMode: ${s.value}\n`;let c=Array.from(e.keys()).sort(),f=q.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of c){let C=e.get(E);n+=`\n`,n+=`${JSON.stringify(E)}:\n`,n+=`  locations:\n`;for(let S of C.locations){let P=K.contains(t.cwd,S);if(P===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=`    - ${JSON.stringify(P)}\n`}if(C.aliases.length>0){n+=`  aliases:\n`;for(let S of C.aliases)n+=`    - ${JSON.stringify(S)}\n`}if(E===f&&r.size>0){n+=`  bin:\n`;for(let[S,P]of r){let I=K.contains(t.cwd,S);if(I===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=`    ${JSON.stringify(I)}:\n`;for(let[R,N]of P){let U=K.relative(K.join(S,_i),N);n+=`      ${JSON.stringify(R)}: ${JSON.stringify(U)}\n`}}}}let p=t.cwd,h=K.join(p,_i,dke);a&&await le.removePromise(h),await le.changeFilePromise(h,n,{automaticNewlines:!0})}async function AV(t,{unrollAliases:e=!1}={}){let r=t.cwd,s=K.join(r,_i,dke),a;try{a=await le.statPromise(s)}catch{}if(!a)return null;let n=ls(await le.readFilePromise(s,\"utf8\"));if(n.__metadata.version>gke)return null;let c=n.__metadata.nmMode||\"classic\",f=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let C=E.locations.map(P=>K.join(r,P)),S=E.bin;if(S)for(let[P,I]of Object.entries(S)){let R=K.join(r,ue.toPortablePath(P)),N=je.getMapWithDefault(p,R);for(let[U,W]of Object.entries(I))N.set(U,ue.toPortablePath([R,_i,W].join(K.sep)))}if(f.set(h,{target:vt.dot,linkType:\"HARD\",locations:C,aliases:E.aliases||[]}),e&&E.aliases)for(let P of E.aliases){let{scope:I,name:R}=q.parseLocator(h),N=q.makeLocator(q.makeIdent(I,R),P),U=q.stringifyLocator(N);f.set(U,{target:vt.dot,linkType:\"HARD\",locations:C,aliases:[]})}}return{locatorMap:f,binSymlinks:p,locationTree:mke(f,{skipPrefix:t.cwd}),nmMode:c,mtimeMs:a.mtimeMs}}var kw=async(t,e)=>{if(t.split(K.sep).indexOf(_i)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{let r;if(!e.innerLoop&&(r=await le.lstatPromise(t),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!e.isWorkspaceDir)){await le.unlinkPromise(t);return}let s=await le.readdirPromise(t,{withFileTypes:!0});for(let n of s){let c=K.join(t,n.name);n.isDirectory()?(n.name!==_i||e&&e.innerLoop)&&await kw(c,{innerLoop:!0,contentsOnly:!1}):await le.unlinkPromise(c)}let a=!e.innerLoop&&e.isWorkspaceDir&&r?.isSymbolicLink();!e.contentsOnly&&!a&&await le.rmdirPromise(t)}catch(r){if(r.code!==\"ENOENT\"&&r.code!==\"ENOTEMPTY\")throw r}},fke=4,dN=(t,{skipPrefix:e})=>{let r=K.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let s=r.split(K.sep).filter(p=>p!==\"\"),a=s.indexOf(_i),n=s.slice(0,a).join(K.sep),c=K.join(e,n),f=s.slice(a);return{locationRoot:c,segments:f}},mke=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let s=()=>({children:new Map,linkType:\"HARD\"});for(let[a,n]of t.entries()){if(n.linkType===\"SOFT\"&&K.contains(e,n.target)!==null){let f=je.getFactoryWithDefault(r,n.target,s);f.locator=a,f.linkType=n.linkType}for(let c of n.locations){let{locationRoot:f,segments:p}=dN(c,{skipPrefix:e}),h=je.getFactoryWithDefault(r,f,s);for(let E=0;E<p.length;++E){let C=p[E];if(C!==\".\"){let S=je.getFactoryWithDefault(h.children,C,s);h.children.set(C,S),h=S}E===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},gV=async(t,e,r)=>{if(process.platform===\"win32\"&&r===\"junctions\"){let s;try{s=await le.lstatPromise(t)}catch{}if(!s||s.isDirectory()){await le.symlinkPromise(t,e,\"junction\");return}}await le.symlinkPromise(K.relative(K.dirname(e),t),e)};async function yke(t,e,r){let s=K.join(t,`${pV.default.randomBytes(16).toString(\"hex\")}.tmp`);try{await le.writeFilePromise(s,r);try{await le.linkPromise(s,e)}catch{}}finally{await le.unlinkPromise(s)}}async function vRt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:s,baseFs:a,nmMode:n}){if(r.kind===\"file\"){if(n.value===\"hardlinks-global\"&&s&&r.digest){let f=K.join(s,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await le.statPromise(f);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-CRt))if(await Nn.checksumFile(f,{baseFs:le,algorithm:\"sha1\"})!==r.digest){let C=K.join(s,`${pV.default.randomBytes(16).toString(\"hex\")}.tmp`);await le.renamePromise(f,C);let S=await a.readFilePromise(t);await le.writeFilePromise(C,S);try{await le.linkPromise(C,f),r.mtimeMs=new Date().getTime(),await le.unlinkPromise(C)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await le.linkPromise(f,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await yke(s,f,h),r.mtimeMs=new Date().getTime();try{await le.linkPromise(f,e)}catch(E){E&&E.code&&E.code==\"EXDEV\"&&(n.value=\"hardlinks-local\",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let c=r.mode&511;c!==420&&await le.chmodPromise(e,c)}}var SRt=async(t,e,{baseFs:r,globalHardlinksStore:s,nmMode:a,windowsLinkType:n,packageChecksum:c})=>{await le.mkdirPromise(t,{recursive:!0});let f=async(E=vt.dot)=>{let C=K.join(e,E),S=await r.readdirPromise(C,{withFileTypes:!0}),P=new Map;for(let I of S){let R=K.join(E,I.name),N,U=K.join(C,I.name);if(I.isFile()){if(N={kind:\"file\",mode:(await r.lstatPromise(U)).mode},a.value===\"hardlinks-global\"){let W=await Nn.checksumFile(U,{baseFs:r,algorithm:\"sha1\"});N.digest=W}}else if(I.isDirectory())N={kind:\"directory\"};else if(I.isSymbolicLink())N={kind:\"symlink\",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,\"0\")})`);if(P.set(R,N),I.isDirectory()&&R!==_i){let W=await f(R);for(let[te,ie]of W)P.set(te,ie)}}return P},p;if(a.value===\"hardlinks-global\"&&s&&c){let E=K.join(s,c.substring(0,2),`${c.substring(2)}.json`);try{p=new Map(Object.entries(JSON.parse(await le.readFilePromise(E,\"utf8\"))))}catch{p=await f()}}else p=await f();let h=!1;for(let[E,C]of p){let S=K.join(e,E),P=K.join(t,E);if(C.kind===\"directory\")await le.mkdirPromise(P,{recursive:!0});else if(C.kind===\"file\"){let I=C.mtimeMs;await vRt({srcPath:S,dstPath:P,entry:C,nmMode:a,baseFs:r,globalHardlinksStore:s}),C.mtimeMs!==I&&(h=!0)}else C.kind===\"symlink\"&&await gV(K.resolve(K.dirname(P),C.symlinkTo),P,n)}if(a.value===\"hardlinks-global\"&&s&&h&&c){let E=K.join(s,c.substring(0,2),`${c.substring(2)}.json`);await le.removePromise(E),await yke(s,E,Buffer.from(JSON.stringify(Object.fromEntries(p))))}};function DRt(t,e,r,s){let a=new Map,n=new Map,c=new Map,f=!1,p=(h,E,C,S,P)=>{let I=!0,R=K.join(h,E),N=new Set;if(E===_i||E.startsWith(\"@\")){let W;try{W=le.statSync(R)}catch{}I=!!W,W?W.mtimeMs>r?(f=!0,N=new Set(le.readdirSync(R))):N=new Set(C.children.get(E).children.keys()):f=!0;let te=e.get(h);if(te){let ie=K.join(h,_i,gN),Ae;try{Ae=le.statSync(ie)}catch{}if(!Ae)f=!0;else if(Ae.mtimeMs>r){f=!0;let ce=new Set(le.readdirSync(ie)),me=new Map;n.set(h,me);for(let[pe,Be]of te)ce.has(pe)&&me.set(pe,Be)}else n.set(h,te)}}else I=P.has(E);let U=C.children.get(E);if(I){let{linkType:W,locator:te}=U,ie={children:new Map,linkType:W,locator:te};if(S.children.set(E,ie),te){let Ae=je.getSetWithDefault(c,te);Ae.add(R),c.set(te,Ae)}for(let Ae of U.children.keys())p(R,Ae,U,ie,N)}else U.locator&&s.storedBuildState.delete(q.parseLocator(U.locator).locatorHash)};for(let[h,E]of t){let{linkType:C,locator:S}=E,P={children:new Map,linkType:C,locator:S};if(a.set(h,P),S){let I=je.getSetWithDefault(c,E.locator);I.add(h),c.set(E.locator,I)}E.children.has(_i)&&p(h,_i,E,P,new Set)}return{locationTree:a,binSymlinks:n,locatorLocations:c,installChangedByUser:f}}function Eke(t){let e=q.parseDescriptor(t);return q.isVirtualDescriptor(e)&&(e=q.devirtualizeDescriptor(e)),e.range.startsWith(\"link:\")}async function bRt(t,e,r,{loadManifest:s}){let a=new Map;for(let[f,{locations:p}]of t){let h=Eke(f)?null:await s(f,p[0]),E=new Map;if(h)for(let[C,S]of h.bin){let P=K.join(p[0],S);S!==\"\"&&le.existsSync(P)&&E.set(C,S)}a.set(f,E)}let n=new Map,c=(f,p,h)=>{let E=new Map,C=K.contains(r,f);if(h.locator&&C!==null){let S=a.get(h.locator);for(let[P,I]of S){let R=K.join(f,ue.toPortablePath(I));E.set(P,R)}for(let[P,I]of h.children){let R=K.join(f,P),N=c(R,R,I);N.size>0&&n.set(f,new Map([...n.get(f)||new Map,...N]))}}else for(let[S,P]of h.children){let I=c(K.join(f,S),p,P);for(let[R,N]of I)E.set(R,N)}return E};for(let[f,p]of e){let h=c(f,f,p);h.size>0&&n.set(f,new Map([...n.get(f)||new Map,...h]))}return n}var Ake=(t,e)=>{if(!t||!e)return t===e;let r=q.parseLocator(t);q.isVirtualLocator(r)&&(r=q.devirtualizeLocator(r));let s=q.parseLocator(e);return q.isVirtualLocator(s)&&(s=q.devirtualizeLocator(s)),q.areLocatorsEqual(r,s)};function dV(t){return K.join(t.get(\"globalFolder\"),\"store\")}async function PRt(t,e,{baseFs:r,project:s,report:a,loadManifest:n,realLocatorChecksums:c}){let f=K.join(s.cwd,_i),{locationTree:p,binSymlinks:h,locatorLocations:E,installChangedByUser:C}=DRt(t.locationTree,t.binSymlinks,t.mtimeMs,s),S=mke(e,{skipPrefix:s.cwd}),P=[],I=async({srcDir:Be,dstDir:Ce,linkType:g,globalHardlinksStore:we,nmMode:Ee,windowsLinkType:fe,packageChecksum:se})=>{let X=(async()=>{try{g===\"SOFT\"?(await le.mkdirPromise(K.dirname(Ce),{recursive:!0}),await gV(K.resolve(Be),Ce,fe)):await SRt(Ce,Be,{baseFs:r,globalHardlinksStore:we,nmMode:Ee,windowsLinkType:fe,packageChecksum:se})}catch(De){throw De.message=`While persisting ${Be} -> ${Ce} ${De.message}`,De}finally{ie.tick()}})().then(()=>P.splice(P.indexOf(X),1));P.push(X),P.length>fke&&await Promise.race(P)},R=async(Be,Ce,g)=>{let we=(async()=>{let Ee=async(fe,se,X)=>{try{X.innerLoop||await le.mkdirPromise(se,{recursive:!0});let De=await le.readdirPromise(fe,{withFileTypes:!0});for(let Re of De){if(!X.innerLoop&&Re.name===gN)continue;let gt=K.join(fe,Re.name),j=K.join(se,Re.name);Re.isDirectory()?(Re.name!==_i||X&&X.innerLoop)&&(await le.mkdirPromise(j,{recursive:!0}),await Ee(gt,j,{...X,innerLoop:!0})):me.value===\"hardlinks-local\"||me.value===\"hardlinks-global\"?await le.linkPromise(gt,j):await le.copyFilePromise(gt,j,hke.default.constants.COPYFILE_FICLONE)}}catch(De){throw X.innerLoop||(De.message=`While cloning ${fe} -> ${se} ${De.message}`),De}finally{X.innerLoop||ie.tick()}};await Ee(Be,Ce,g)})().then(()=>P.splice(P.indexOf(we),1));P.push(we),P.length>fke&&await Promise.race(P)},N=async(Be,Ce,g)=>{if(g)for(let[we,Ee]of Ce.children){let fe=g.children.get(we);await N(K.join(Be,we),Ee,fe)}else{Ce.children.has(_i)&&await kw(K.join(Be,_i),{contentsOnly:!1});let we=K.basename(Be)===_i&&p.has(K.join(K.dirname(Be)));await kw(Be,{contentsOnly:Be===f,isWorkspaceDir:we})}};for(let[Be,Ce]of p){let g=S.get(Be);for(let[we,Ee]of Ce.children){if(we===\".\")continue;let fe=g&&g.children.get(we),se=K.join(Be,we);await N(se,Ee,fe)}}let U=async(Be,Ce,g)=>{if(g){Ake(Ce.locator,g.locator)||await kw(Be,{contentsOnly:Ce.linkType===\"HARD\"});for(let[we,Ee]of Ce.children){let fe=g.children.get(we);await U(K.join(Be,we),Ee,fe)}}else{Ce.children.has(_i)&&await kw(K.join(Be,_i),{contentsOnly:!0});let we=K.basename(Be)===_i&&S.has(K.join(K.dirname(Be)));await kw(Be,{contentsOnly:Ce.linkType===\"HARD\",isWorkspaceDir:we})}};for(let[Be,Ce]of S){let g=p.get(Be);for(let[we,Ee]of Ce.children){if(we===\".\")continue;let fe=g&&g.children.get(we);await U(K.join(Be,we),Ee,fe)}}let W=new Map,te=[];for(let[Be,Ce]of E)for(let g of Ce){let{locationRoot:we,segments:Ee}=dN(g,{skipPrefix:s.cwd}),fe=S.get(we),se=we;if(fe){for(let X of Ee)if(se=K.join(se,X),fe=fe.children.get(X),!fe)break;if(fe){let X=Ake(fe.locator,Be),De=e.get(fe.locator),Re=De.target,gt=se,j=De.linkType;if(X)W.has(Re)||W.set(Re,gt);else if(Re!==gt){let rt=q.parseLocator(fe.locator);q.isVirtualLocator(rt)&&(rt=q.devirtualizeLocator(rt)),te.push({srcDir:Re,dstDir:gt,linkType:j,realLocatorHash:rt.locatorHash})}}}}for(let[Be,{locations:Ce}]of e.entries())for(let g of Ce){let{locationRoot:we,segments:Ee}=dN(g,{skipPrefix:s.cwd}),fe=p.get(we),se=S.get(we),X=we,De=e.get(Be),Re=q.parseLocator(Be);q.isVirtualLocator(Re)&&(Re=q.devirtualizeLocator(Re));let gt=Re.locatorHash,j=De.target,rt=g;if(j===rt)continue;let Fe=De.linkType;for(let Ne of Ee)se=se.children.get(Ne);if(!fe)te.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:gt});else for(let Ne of Ee)if(X=K.join(X,Ne),fe=fe.children.get(Ne),!fe){te.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:gt});break}}let ie=ho.progressViaCounter(te.length),Ae=a.reportProgress(ie),ce=s.configuration.get(\"nmMode\"),me={value:ce},pe=s.configuration.get(\"winLinkType\");try{let Be=me.value===\"hardlinks-global\"?`${dV(s.configuration)}/v1`:null;if(Be&&!await le.existsPromise(Be)){await le.mkdirpPromise(Be);for(let g=0;g<256;g++)await le.mkdirPromise(K.join(Be,g.toString(16).padStart(2,\"0\")))}for(let g of te)(g.linkType===\"SOFT\"||!W.has(g.srcDir))&&(W.set(g.srcDir,g.dstDir),await I({...g,globalHardlinksStore:Be,nmMode:me,windowsLinkType:pe,packageChecksum:c.get(g.realLocatorHash)||null}));await Promise.all(P),P.length=0;for(let g of te){let we=W.get(g.srcDir);g.linkType!==\"SOFT\"&&g.dstDir!==we&&await R(we,g.dstDir,{nmMode:me})}await Promise.all(P),await le.mkdirPromise(f,{recursive:!0});let Ce=await bRt(e,S,s.cwd,{loadManifest:n});await xRt(h,Ce,s.cwd,pe),await BRt(s,e,Ce,me,{installChangedByUser:C}),ce==\"hardlinks-global\"&&me.value==\"hardlinks-local\"&&a.reportWarningOnce(74,\"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices\")}finally{Ae.stop()}}async function xRt(t,e,r,s){for(let a of t.keys()){if(K.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);if(!e.has(a)){let n=K.join(a,_i,gN);await le.removePromise(n)}}for(let[a,n]of e){if(K.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);let c=K.join(a,_i,gN),f=t.get(a)||new Map;await le.mkdirPromise(c,{recursive:!0});for(let p of f.keys())n.has(p)||(await le.removePromise(K.join(c,p)),process.platform===\"win32\"&&await le.removePromise(K.join(c,`${p}.cmd`)));for(let[p,h]of n){let E=f.get(p),C=K.join(c,p);E!==h&&(process.platform===\"win32\"?await(0,pke.default)(ue.fromPortablePath(h),ue.fromPortablePath(C),{createPwshFile:!1}):(await le.removePromise(C),await gV(h,C,s),K.contains(r,await le.realpathPromise(h))!==null&&await le.chmodPromise(h,493)))}}}Ve();bt();rA();var sb=class extends og{constructor(){super(...arguments);this.mode=\"loose\"}makeInstaller(r){return new mV(r)}},mV=class extends Gm{constructor(){super(...arguments);this.mode=\"loose\"}async transformPnpSettings(r){let s=new fo({baseFs:new tA({maxOpenFiles:80,readOnlyArchives:!0})}),a=$xe(r,this.opts.project.cwd,s),{tree:n,errors:c}=YD(a,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:C,text:S}of c)this.opts.report.reportError(C,S);return}let f=new Map;r.fallbackPool=f;let p=(C,S)=>{let P=q.parseLocator(S.locator),I=q.stringifyIdent(P);I===C?f.set(C,P.reference):f.set(C,[I,P.reference])},h=K.join(this.opts.project.cwd,Er.nodeModules),E=n.get(h);if(!(typeof E>\"u\")){if(\"target\"in E)throw new Error(\"Assertion failed: Expected the root junction point to be a directory\");for(let C of E.dirList){let S=K.join(h,C),P=n.get(S);if(typeof P>\"u\")throw new Error(\"Assertion failed: Expected the child to have been registered\");if(\"target\"in P)p(C,P);else for(let I of P.dirList){let R=K.join(S,I),N=n.get(R);if(typeof N>\"u\")throw new Error(\"Assertion failed: Expected the subchild to have been registered\");if(\"target\"in N)p(`${C}/${I}`,N);else throw new Error(\"Assertion failed: Expected the leaf junction to be a package\")}}}}};var kRt={hooks:{cleanGlobalArtifacts:async t=>{let e=dV(t);await le.removePromise(e)}},configuration:{nmHoistingLimits:{description:\"Prevents packages to be hoisted past specific levels\",type:\"STRING\",values:[\"workspaces\",\"dependencies\",\"none\"],default:\"none\"},nmMode:{description:\"Defines in which measure Yarn must use hardlinks and symlinks when generated `node_modules` directories.\",type:\"STRING\",values:[\"classic\",\"hardlinks-local\",\"hardlinks-global\"],default:\"classic\"},nmSelfReferences:{description:\"Defines whether the linker should generate self-referencing symlinks for workspaces.\",type:\"BOOLEAN\",default:!0}},linkers:[ib,sb]},QRt=kRt;var yz={};Vt(yz,{NpmHttpFetcher:()=>lb,NpmRemapResolver:()=>ub,NpmSemverFetcher:()=>ch,NpmSemverResolver:()=>fb,NpmTagResolver:()=>Ab,default:()=>Hjt,npmConfigUtils:()=>pi,npmHttpUtils:()=>an,npmPublishUtils:()=>D1});Ve();var bke=et(fi());var si=\"npm:\";var an={};Vt(an,{AuthType:()=>vke,customPackageError:()=>Wm,del:()=>WRt,get:()=>Ym,getIdentUrl:()=>mN,getPackageMetadata:()=>Rw,handleInvalidAuthenticationError:()=>lg,post:()=>qRt,put:()=>GRt});Ve();Ve();bt();var CV=et(lS()),wke=et(vG()),Bke=et(fi());var pi={};Vt(pi,{RegistryType:()=>Ike,getAuditRegistry:()=>TRt,getAuthConfiguration:()=>IV,getDefaultRegistry:()=>ob,getPublishRegistry:()=>RRt,getRegistryConfiguration:()=>Cke,getScopeConfiguration:()=>EV,getScopeRegistry:()=>Qw,normalizeRegistry:()=>zc});var Ike=(s=>(s.AUDIT_REGISTRY=\"npmAuditRegistry\",s.FETCH_REGISTRY=\"npmRegistryServer\",s.PUBLISH_REGISTRY=\"npmPublishRegistry\",s))(Ike||{});function zc(t){return t.replace(/\\/$/,\"\")}function TRt({configuration:t}){return ob({configuration:t,type:\"npmAuditRegistry\"})}function RRt(t,{configuration:e}){return t.publishConfig?.registry?zc(t.publishConfig.registry):t.name?Qw(t.name.scope,{configuration:e,type:\"npmPublishRegistry\"}):ob({configuration:e,type:\"npmPublishRegistry\"})}function Qw(t,{configuration:e,type:r=\"npmRegistryServer\"}){let s=EV(t,{configuration:e});if(s===null)return ob({configuration:e,type:r});let a=s.get(r);return a===null?ob({configuration:e,type:r}):zc(a)}function ob({configuration:t,type:e=\"npmRegistryServer\"}){let r=t.get(e);return zc(r!==null?r:t.get(\"npmRegistryServer\"))}function Cke(t,{configuration:e}){let r=e.get(\"npmRegistries\"),s=zc(t),a=r.get(s);if(typeof a<\"u\")return a;let n=r.get(s.replace(/^[a-z]+:/,\"\"));return typeof n<\"u\"?n:null}var FRt=new Map([[\"npmRegistryServer\",\"https://npm.jsr.io/\"]]);function EV(t,{configuration:e}){if(t===null)return null;let s=e.get(\"npmScopes\").get(t);return s||(t===\"jsr\"?FRt:null)}function IV(t,{configuration:e,ident:r}){let s=r&&EV(r.scope,{configuration:e});return s?.get(\"npmAuthIdent\")||s?.get(\"npmAuthToken\")?s:Cke(t,{configuration:e})||e}var vke=(a=>(a[a.NO_AUTH=0]=\"NO_AUTH\",a[a.BEST_EFFORT=1]=\"BEST_EFFORT\",a[a.CONFIGURATION=2]=\"CONFIGURATION\",a[a.ALWAYS_AUTH=3]=\"ALWAYS_AUTH\",a))(vke||{});async function lg(t,{attemptedAs:e,registry:r,headers:s,configuration:a}){if(EN(t))throw new Yt(41,\"Invalid OTP token\");if(t.originalError?.name===\"HTTPError\"&&t.originalError?.response.statusCode===401)throw new Yt(41,`Invalid authentication (${typeof e!=\"string\"?`as ${await VRt(r,s,{configuration:a})}`:`attempted as ${e}`})`)}function Wm(t,e){let r=t.response?.statusCode;return r?r===404?\"Package not found\":r>=500&&r<600?`The registry appears to be down (using a ${he.applyHyperlink(e,\"local cache\",\"https://yarnpkg.com/advanced/lexicon#local-cache\")} might have protected you against such outages)`:null:null}function mN(t){return t.scope?`/@${t.scope}%2f${t.name}`:`/${t.name}`}var Ske=new Map,NRt=new Map;async function ORt(t){return await je.getFactoryWithDefault(Ske,t,async()=>{let e=null;try{e=await le.readJsonPromise(t)}catch{}return e})}async function LRt(t,e,{configuration:r,cached:s,registry:a,headers:n,version:c,...f}){return await je.getFactoryWithDefault(NRt,t,async()=>await Ym(mN(e),{...f,customErrorMessage:Wm,configuration:r,registry:a,ident:e,headers:{...n,\"If-None-Match\":s?.etag,\"If-Modified-Since\":s?.lastModified},wrapNetworkRequest:async p=>async()=>{let h=await p();if(h.statusCode===304){if(s===null)throw new Error(\"Assertion failed: cachedMetadata should not be null\");return{...h,body:s.metadata}}let E=_Rt(JSON.parse(h.body.toString())),C={metadata:E,etag:h.headers.etag,lastModified:h.headers[\"last-modified\"]};return Ske.set(t,Promise.resolve(C)),Promise.resolve().then(async()=>{let S=`${t}-${process.pid}.tmp`;await le.mkdirPromise(K.dirname(S),{recursive:!0}),await le.writeJsonPromise(S,C,{compact:!0}),await le.renamePromise(S,t)}).catch(()=>{}),{...h,body:E}}}))}function MRt(t){return t.scope!==null?`@${t.scope}-${t.name}-${t.scope.length}`:t.name}async function Rw(t,{cache:e,project:r,registry:s,headers:a,version:n,...c}){let{configuration:f}=r;s=ab(f,{ident:t,registry:s});let p=HRt(f,s),h=K.join(p,`${MRt(t)}.json`),E=null;if(!r.lockfileNeedsRefresh&&(E=await ORt(h),E)){if(typeof n<\"u\"&&typeof E.metadata.versions[n]<\"u\")return E.metadata;if(f.get(\"enableOfflineMode\")){let C=structuredClone(E.metadata),S=new Set;if(e){for(let I of Object.keys(C.versions)){let R=q.makeLocator(t,`npm:${I}`),N=e.getLocatorMirrorPath(R);(!N||!le.existsSync(N))&&(delete C.versions[I],S.add(I))}let P=C[\"dist-tags\"].latest;if(S.has(P)){let I=Object.keys(E.metadata.versions).sort(Bke.default.compare),R=I.indexOf(P);for(;S.has(I[R])&&R>=0;)R-=1;R>=0?C[\"dist-tags\"].latest=I[R]:delete C[\"dist-tags\"].latest}}return C}}return await LRt(h,t,{...c,configuration:f,cached:E,registry:s,headers:a,version:n})}var Dke=[\"name\",\"dist.tarball\",\"bin\",\"scripts\",\"os\",\"cpu\",\"libc\",\"dependencies\",\"dependenciesMeta\",\"optionalDependencies\",\"peerDependencies\",\"peerDependenciesMeta\",\"deprecated\"];function _Rt(t){return{\"dist-tags\":t[\"dist-tags\"],versions:Object.fromEntries(Object.entries(t.versions).map(([e,r])=>[e,(0,wke.default)(r,Dke)]))}}var URt=Nn.makeHash(...Dke).slice(0,6);function HRt(t,e){let r=jRt(t),s=new URL(e);return K.join(r,URt,s.hostname)}function jRt(t){return K.join(t.get(\"globalFolder\"),\"metadata/npm\")}async function Ym(t,{configuration:e,headers:r,ident:s,authType:a,registry:n,...c}){n=ab(e,{ident:s,registry:n}),s&&s.scope&&typeof a>\"u\"&&(a=1);let f=await yN(n,{authType:a,configuration:e,ident:s});f&&(r={...r,authorization:f});try{return await An.get(t.charAt(0)===\"/\"?`${n}${t}`:t,{configuration:e,headers:r,...c})}catch(p){throw await lg(p,{registry:n,configuration:e,headers:r}),p}}async function qRt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,registry:f,otp:p,...h}){f=ab(s,{ident:n,registry:f});let E=await yN(f,{authType:c,configuration:s,ident:n});E&&(a={...a,authorization:E}),p&&(a={...a,...Tw(p)});try{return await An.post(f+t,e,{configuration:s,headers:a,...h})}catch(C){if(!EN(C)||p)throw await lg(C,{attemptedAs:r,registry:f,configuration:s,headers:a}),C;p=await wV(C,{configuration:s});let S={...a,...Tw(p)};try{return await An.post(`${f}${t}`,e,{configuration:s,headers:S,...h})}catch(P){throw await lg(P,{attemptedAs:r,registry:f,configuration:s,headers:a}),P}}}async function GRt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,registry:f,otp:p,...h}){f=ab(s,{ident:n,registry:f});let E=await yN(f,{authType:c,configuration:s,ident:n});E&&(a={...a,authorization:E}),p&&(a={...a,...Tw(p)});try{return await An.put(f+t,e,{configuration:s,headers:a,...h})}catch(C){if(!EN(C))throw await lg(C,{attemptedAs:r,registry:f,configuration:s,headers:a}),C;p=await wV(C,{configuration:s});let S={...a,...Tw(p)};try{return await An.put(`${f}${t}`,e,{configuration:s,headers:S,...h})}catch(P){throw await lg(P,{attemptedAs:r,registry:f,configuration:s,headers:a}),P}}}async function WRt(t,{attemptedAs:e,configuration:r,headers:s,ident:a,authType:n=3,registry:c,otp:f,...p}){c=ab(r,{ident:a,registry:c});let h=await yN(c,{authType:n,configuration:r,ident:a});h&&(s={...s,authorization:h}),f&&(s={...s,...Tw(f)});try{return await An.del(c+t,{configuration:r,headers:s,...p})}catch(E){if(!EN(E)||f)throw await lg(E,{attemptedAs:e,registry:c,configuration:r,headers:s}),E;f=await wV(E,{configuration:r});let C={...s,...Tw(f)};try{return await An.del(`${c}${t}`,{configuration:r,headers:C,...p})}catch(S){throw await lg(S,{attemptedAs:e,registry:c,configuration:r,headers:s}),S}}}function ab(t,{ident:e,registry:r}){if(typeof r>\"u\"&&e)return Qw(e.scope,{configuration:t});if(typeof r!=\"string\")throw new Error(\"Assertion failed: The registry should be a string\");return zc(r)}async function yN(t,{authType:e=2,configuration:r,ident:s}){let a=IV(t,{configuration:r,ident:s}),n=YRt(a,e);if(!n)return null;let c=await r.reduceHook(f=>f.getNpmAuthenticationHeader,void 0,t,{configuration:r,ident:s});if(c)return c;if(a.get(\"npmAuthToken\"))return`Bearer ${a.get(\"npmAuthToken\")}`;if(a.get(\"npmAuthIdent\")){let f=a.get(\"npmAuthIdent\");return f.includes(\":\")?`Basic ${Buffer.from(f).toString(\"base64\")}`:`Basic ${f}`}if(n&&e!==1)throw new Yt(33,\"No authentication configured for request\");return null}function YRt(t,e){switch(e){case 2:return t.get(\"npmAlwaysAuth\");case 1:case 3:return!0;case 0:return!1;default:throw new Error(\"Unreachable\")}}async function VRt(t,e,{configuration:r}){if(typeof e>\"u\"||typeof e.authorization>\"u\")return\"an anonymous user\";try{return(await An.get(new URL(`${t}/-/whoami`).href,{configuration:r,headers:e,jsonResponse:!0})).username??\"an unknown user\"}catch{return\"an unknown user\"}}async function wV(t,{configuration:e}){let r=t.originalError?.response.headers[\"npm-notice\"];if(r&&(await Ot.start({configuration:e,stdout:process.stdout,includeFooter:!1},async a=>{if(a.reportInfo(0,r.replace(/(https?:\\/\\/\\S+)/g,he.pretty(e,\"$1\",he.Type.URL))),!process.env.YARN_IS_TEST_ENV){let n=r.match(/open (https?:\\/\\/\\S+)/i);if(n&&As.openUrl){let{openNow:c}=await(0,CV.prompt)({type:\"confirm\",name:\"openNow\",message:\"Do you want to try to open this url now?\",required:!0,initial:!0,onCancel:()=>process.exit(130)});c&&(await As.openUrl(n[1])||(a.reportSeparator(),a.reportWarning(0,\"We failed to automatically open the url; you'll have to open it yourself in your browser of choice.\")))}}}),process.stdout.write(`\n`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||\"\";let{otp:s}=await(0,CV.prompt)({type:\"password\",name:\"otp\",message:\"One-time password:\",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`\n`),s}function EN(t){if(t.originalError?.name!==\"HTTPError\")return!1;try{return(t.originalError?.response.headers[\"www-authenticate\"].split(/,\\s*/).map(r=>r.toLowerCase())).includes(\"otp\")}catch{return!1}}function Tw(t){return{\"npm-otp\":t}}var lb=class{supports(e,r){if(!e.reference.startsWith(si))return!1;let{selector:s,params:a}=q.parseRange(e.reference);return!(!bke.default.valid(s)||a===null||typeof a.__archiveUrl!=\"string\")}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let{params:s}=q.parseRange(e.reference);if(s===null||typeof s.__archiveUrl!=\"string\")throw new Error(\"Assertion failed: The archiveUrl querystring parameter should have been available\");let a=await Ym(s.__archiveUrl,{customErrorMessage:Wm,configuration:r.project.configuration,ident:e});return await hs.convertToZip(a,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}};Ve();var ub=class{supportsDescriptor(e,r){return!(!e.range.startsWith(si)||!q.tryParseDescriptor(e.range.slice(si.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error(\"Unreachable\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){let s=r.project.configuration.normalizeDependency(q.parseDescriptor(e.range.slice(si.length),!0));return r.resolver.getResolutionDependencies(s,r)}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(q.parseDescriptor(e.range.slice(si.length),!0));return await s.resolver.getCandidates(a,r,s)}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(q.parseDescriptor(e.range.slice(si.length),!0));return a.resolver.getSatisfying(n,r,s,a)}resolve(e,r){throw new Error(\"Unreachable\")}};Ve();Ve();var Pke=et(fi());var ch=class t{supports(e,r){if(!e.reference.startsWith(si))return!1;let s=new URL(e.reference);return!(!Pke.default.valid(s.pathname)||s.searchParams.has(\"__archiveUrl\"))}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s;try{s=await Ym(t.getLocatorUrl(e),{customErrorMessage:Wm,configuration:r.project.configuration,ident:e})}catch{s=await Ym(t.getLocatorUrl(e).replace(/%2f/g,\"/\"),{customErrorMessage:Wm,configuration:r.project.configuration,ident:e})}return await hs.convertToZip(s,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:s}){let a=Qw(e.scope,{configuration:s}),n=t.getLocatorUrl(e);return r=r.replace(/^https?:(\\/\\/(?:[^/]+\\.)?npmjs.org(?:$|\\/))/,\"https:$1\"),a=a.replace(/^https:\\/\\/registry\\.npmjs\\.org($|\\/)/,\"https://registry.yarnpkg.com$1\"),r=r.replace(/^https:\\/\\/registry\\.npmjs\\.org($|\\/)/,\"https://registry.yarnpkg.com$1\"),r===a+n||r===a+n.replace(/%2f/g,\"/\")}static getLocatorUrl(e){let r=Or.clean(e.reference.slice(si.length));if(r===null)throw new Yt(10,\"The npm semver resolver got selected, but the version isn't semver\");return`${mN(e)}/-/${e.name}-${r}.tgz`}};Ve();Ve();Ve();var BV=et(fi());var IN=q.makeIdent(null,\"node-gyp\"),KRt=/\\b(node-gyp|prebuild-install)\\b/,fb=class{supportsDescriptor(e,r){return e.range.startsWith(si)?!!Or.validRange(e.range.slice(si.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(si))return!1;let{selector:s}=q.parseRange(e.reference);return!!BV.default.valid(s)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=Or.validRange(e.range.slice(si.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(si.length)}`);let n=await Rw(e,{cache:s.fetchOptions?.cache,project:s.project,version:BV.default.valid(a.raw)?a.raw:void 0}),c=je.mapAndFilter(Object.keys(n.versions),h=>{try{let E=new Or.SemVer(h);if(a.test(E))return E}catch{}return je.mapAndFilter.skip}),f=c.filter(h=>!n.versions[h.raw].deprecated),p=f.length>0?f:c;return p.sort((h,E)=>-h.compare(E)),p.map(h=>{let E=q.makeLocator(e,`${si}${h.raw}`),C=n.versions[h.raw].dist.tarball;return ch.isConventionalTarballUrl(E,C,{configuration:s.project.configuration})?E:q.bindLocator(E,{__archiveUrl:C})})}async getSatisfying(e,r,s,a){let n=Or.validRange(e.range.slice(si.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(si.length)}`);return{locators:je.mapAndFilter(s,p=>{if(p.identHash!==e.identHash)return je.mapAndFilter.skip;let h=q.tryParseRange(p.reference,{requireProtocol:si});if(!h)return je.mapAndFilter.skip;let E=new Or.SemVer(h.selector);return n.test(E)?{locator:p,version:E}:je.mapAndFilter.skip}).sort((p,h)=>-p.version.compare(h.version)).map(({locator:p})=>p),sorted:!0}}async resolve(e,r){let{selector:s}=q.parseRange(e.reference),a=Or.clean(s);if(a===null)throw new Yt(10,\"The npm semver resolver got selected, but the version isn't semver\");let n=await Rw(e,{cache:r.fetchOptions?.cache,project:r.project,version:a});if(!Object.hasOwn(n,\"versions\"))throw new Yt(15,'Registry returned invalid data for - missing \"versions\" field');if(!Object.hasOwn(n.versions,a))throw new Yt(16,`Registry failed to return reference \"${a}\"`);let c=new Ht;if(c.load(n.versions[a]),!c.dependencies.has(IN.identHash)&&!c.peerDependencies.has(IN.identHash)){for(let f of c.scripts.values())if(f.match(KRt)){c.dependencies.set(IN.identHash,q.makeDescriptor(IN,\"latest\"));break}}return{...e,version:a,languageName:\"node\",linkType:\"HARD\",conditions:c.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(c.dependencies),peerDependencies:c.peerDependencies,dependenciesMeta:c.dependenciesMeta,peerDependenciesMeta:c.peerDependenciesMeta,bin:c.bin}}};Ve();Ve();var xke=et(fi());var Ab=class{supportsDescriptor(e,r){return!(!e.range.startsWith(si)||!Hp.test(e.range.slice(si.length)))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error(\"Unreachable\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(si.length),n=await Rw(e,{cache:s.fetchOptions?.cache,project:s.project});if(!Object.hasOwn(n,\"dist-tags\"))throw new Yt(15,'Registry returned invalid data - missing \"dist-tags\" field');let c=n[\"dist-tags\"];if(!Object.hasOwn(c,a))throw new Yt(16,`Registry failed to return tag \"${a}\"`);let f=c[a],p=q.makeLocator(e,`${si}${f}`),h=n.versions[f].dist.tarball;return ch.isConventionalTarballUrl(p,h,{configuration:s.project.configuration})?[p]:[q.bindLocator(p,{__archiveUrl:h})]}async getSatisfying(e,r,s,a){let n=[];for(let c of s){if(c.identHash!==e.identHash)continue;let f=q.tryParseRange(c.reference,{requireProtocol:si});if(!(!f||!xke.default.valid(f.selector))){if(f.params?.__archiveUrl){let p=q.makeRange({protocol:si,selector:f.selector,source:null,params:null}),[h]=await a.resolver.getCandidates(q.makeDescriptor(e,p),r,a);if(c.reference!==h.reference)continue}n.push(c)}}return{locators:n,sorted:!1}}async resolve(e,r){throw new Error(\"Unreachable\")}};var D1={};Vt(D1,{getGitHead:()=>_jt,getPublishAccess:()=>EOe,getReadmeContent:()=>IOe,makePublishBody:()=>Mjt});Ve();Ve();bt();var f7={};Vt(f7,{PackCommand:()=>Gw,default:()=>bOt,packUtils:()=>IA});Ve();Ve();Ve();bt();Wt();var IA={};Vt(IA,{genPackList:()=>qN,genPackStream:()=>u7,genPackageManifest:()=>oTe,hasPackScripts:()=>l7,prepareForPack:()=>c7});Ve();bt();var a7=et(Sa()),iTe=et(eTe()),sTe=ye(\"zlib\"),dOt=[\"/package.json\",\"/readme\",\"/readme.*\",\"/license\",\"/license.*\",\"/licence\",\"/licence.*\",\"/changelog\",\"/changelog.*\"],mOt=[\"/package.tgz\",\".github\",\".git\",\".hg\",\"node_modules\",\".npmignore\",\".gitignore\",\".#*\",\".DS_Store\"];async function l7(t){return!!(In.hasWorkspaceScript(t,\"prepack\")||In.hasWorkspaceScript(t,\"postpack\"))}async function c7(t,{report:e},r){await In.maybeExecuteWorkspaceLifecycleScript(t,\"prepack\",{report:e});try{let s=K.join(t.cwd,Ht.fileName);await le.existsPromise(s)&&await t.manifest.loadFile(s,{baseFs:le}),await r()}finally{await In.maybeExecuteWorkspaceLifecycleScript(t,\"postpack\",{report:e})}}async function u7(t,e){typeof e>\"u\"&&(e=await qN(t));let r=new Set;for(let n of t.manifest.publishConfig?.executableFiles??new Set)r.add(K.normalize(n));for(let n of t.manifest.bin.values())r.add(K.normalize(n));let s=iTe.default.pack();process.nextTick(async()=>{for(let n of e){let c=K.normalize(n),f=K.resolve(t.cwd,c),p=K.join(\"package\",c),h=await le.lstatPromise(f),E={name:p,mtime:new Date(ui.SAFE_TIME*1e3)},C=r.has(c)?493:420,S,P,I=new Promise((N,U)=>{S=N,P=U}),R=N=>{N?P(N):S()};if(h.isFile()){let N;c===\"package.json\"?N=Buffer.from(JSON.stringify(await oTe(t),null,2)):N=await le.readFilePromise(f),s.entry({...E,mode:C,type:\"file\"},N,R)}else h.isSymbolicLink()?s.entry({...E,mode:C,type:\"symlink\",linkname:await le.readlinkPromise(f)},R):R(new Error(`Unsupported file type ${h.mode} for ${ue.fromPortablePath(c)}`));await I}s.finalize()});let a=(0,sTe.createGzip)();return s.pipe(a),a}async function oTe(t){let e=JSON.parse(JSON.stringify(t.manifest.raw));return await t.project.configuration.triggerHook(r=>r.beforeWorkspacePacking,t,e),e}async function qN(t){let e=t.project,r=e.configuration,s={accept:[],reject:[]};for(let C of mOt)s.reject.push(C);for(let C of dOt)s.accept.push(C);s.reject.push(r.get(\"rcFilename\"));let a=C=>{if(C===null||!C.startsWith(`${t.cwd}/`))return;let S=K.relative(t.cwd,C),P=K.resolve(vt.root,S);s.reject.push(P)};a(K.resolve(e.cwd,Er.lockfile)),a(r.get(\"cacheFolder\")),a(r.get(\"globalFolder\")),a(r.get(\"installStatePath\")),a(r.get(\"virtualFolder\")),a(r.get(\"yarnPath\")),await r.triggerHook(C=>C.populateYarnPaths,e,C=>{a(C)});for(let C of e.workspaces){let S=K.relative(t.cwd,C.cwd);S!==\"\"&&!S.match(/^(\\.\\.)?\\//)&&s.reject.push(`/${S}`)}let n={accept:[],reject:[]},c=t.manifest.publishConfig?.main??t.manifest.main,f=t.manifest.publishConfig?.module??t.manifest.module,p=t.manifest.publishConfig?.browser??t.manifest.browser,h=t.manifest.publishConfig?.bin??t.manifest.bin;c!=null&&n.accept.push(K.resolve(vt.root,c)),f!=null&&n.accept.push(K.resolve(vt.root,f)),typeof p==\"string\"&&n.accept.push(K.resolve(vt.root,p));for(let C of h.values())n.accept.push(K.resolve(vt.root,C));if(p instanceof Map)for(let[C,S]of p.entries())n.accept.push(K.resolve(vt.root,C)),typeof S==\"string\"&&n.accept.push(K.resolve(vt.root,S));let E=t.manifest.files!==null;if(E){n.reject.push(\"/*\");for(let C of t.manifest.files)aTe(n.accept,C,{cwd:vt.root})}return await yOt(t.cwd,{hasExplicitFileList:E,globalList:s,ignoreList:n})}async function yOt(t,{hasExplicitFileList:e,globalList:r,ignoreList:s}){let a=[],n=new jf(t),c=[[vt.root,[s]]];for(;c.length>0;){let[f,p]=c.pop(),h=await n.lstatPromise(f);if(!rTe(f,{globalList:r,ignoreLists:h.isDirectory()?null:p}))if(h.isDirectory()){let E=await n.readdirPromise(f),C=!1,S=!1;if(!e||f!==vt.root)for(let R of E)C=C||R===\".gitignore\",S=S||R===\".npmignore\";let P=S?await tTe(n,f,\".npmignore\"):C?await tTe(n,f,\".gitignore\"):null,I=P!==null?[P].concat(p):p;rTe(f,{globalList:r,ignoreLists:p})&&(I=[...p,{accept:[],reject:[\"**/*\"]}]);for(let R of E)c.push([K.resolve(f,R),I])}else(h.isFile()||h.isSymbolicLink())&&a.push(K.relative(vt.root,f))}return a.sort()}async function tTe(t,e,r){let s={accept:[],reject:[]},a=await t.readFilePromise(K.join(e,r),\"utf8\");for(let n of a.split(/\\n/g))aTe(s.reject,n,{cwd:e});return s}function EOt(t,{cwd:e}){let r=t[0]===\"!\";return r&&(t=t.slice(1)),t.match(/\\.{0,1}\\//)&&(t=K.resolve(e,t)),r&&(t=`!${t}`),t}function aTe(t,e,{cwd:r}){let s=e.trim();s===\"\"||s[0]===\"#\"||t.push(EOt(s,{cwd:r}))}function rTe(t,{globalList:e,ignoreLists:r}){let s=jN(t,e.accept);if(s!==0)return s===2;let a=jN(t,e.reject);if(a!==0)return a===1;if(r!==null)for(let n of r){let c=jN(t,n.accept);if(c!==0)return c===2;let f=jN(t,n.reject);if(f!==0)return f===1}return!1}function jN(t,e){let r=e,s=[];for(let a=0;a<e.length;++a)e[a][0]!==\"!\"?r!==e&&r.push(e[a]):(r===e&&(r=e.slice(0,a)),s.push(e[a].slice(1)));return nTe(t,s)?2:nTe(t,r)?1:0}function nTe(t,e){let r=e,s=[];for(let a=0;a<e.length;++a)e[a].includes(\"/\")?r!==e&&r.push(e[a]):(r===e&&(r=e.slice(0,a)),s.push(e[a]));return!!(a7.default.isMatch(t,r,{dot:!0,nocase:!0})||a7.default.isMatch(t,s,{dot:!0,basename:!0,nocase:!0}))}var Gw=class extends ut{constructor(){super(...arguments);this.installIfNeeded=ge.Boolean(\"--install-if-needed\",!1,{description:\"Run a preliminary `yarn install` if the package contains build scripts\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"Print the file paths without actually generating the package archive\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.out=ge.String(\"-o,--out\",{description:\"Create the archive at the specified path\"});this.filename=ge.String(\"--filename\",{hidden:!0})}static{this.paths=[[\"pack\"]]}static{this.usage=ot.Usage({description:\"generate a tarball from the active workspace\",details:\"\\n      This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\\n\\n      If the `-o,--out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\\n    \",examples:[[\"Create an archive from the active workspace\",\"yarn pack\"],[\"List the files that would be made part of the workspace's archive\",\"yarn pack --dry-run\"],[\"Name and output the archive in a dedicated folder\",\"yarn pack --out /artifacts/%s-%v.tgz\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await l7(a)&&(this.installIfNeeded?await s.install({cache:await Jr.find(r),report:new Wi}):await s.restoreInstallState());let n=this.out??this.filename,c=typeof n<\"u\"?K.resolve(this.context.cwd,IOt(n,{workspace:a})):K.resolve(a.cwd,\"package.tgz\");return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async p=>{await c7(a,{report:p},async()=>{p.reportJson({base:ue.fromPortablePath(a.cwd)});let h=await qN(a);for(let E of h)p.reportInfo(null,ue.fromPortablePath(E)),p.reportJson({location:ue.fromPortablePath(E)});if(!this.dryRun){let E=await u7(a,h);await le.mkdirPromise(K.dirname(c),{recursive:!0});let C=le.createWriteStream(c);E.pipe(C),await new Promise(S=>{C.on(\"finish\",S)})}}),this.dryRun||(p.reportInfo(0,`Package archive generated in ${he.pretty(r,c,he.Type.PATH)}`),p.reportJson({output:ue.fromPortablePath(c)}))})).exitCode()}};function IOt(t,{workspace:e}){let r=t.replace(\"%s\",COt(e)).replace(\"%v\",wOt(e));return ue.toPortablePath(r)}function COt(t){return t.manifest.name!==null?q.slugifyIdent(t.manifest.name):\"package\"}function wOt(t){return t.manifest.version!==null?t.manifest.version:\"unknown\"}var BOt=[\"dependencies\",\"devDependencies\",\"peerDependencies\"],vOt=\"workspace:\",SOt=(t,e)=>{e.publishConfig&&(e.publishConfig.type&&(e.type=e.publishConfig.type),e.publishConfig.main&&(e.main=e.publishConfig.main),e.publishConfig.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.module&&(e.module=e.publishConfig.module),e.publishConfig.exports&&(e.exports=e.publishConfig.exports),e.publishConfig.imports&&(e.imports=e.publishConfig.imports),e.publishConfig.bin&&(e.bin=e.publishConfig.bin));let r=t.project;for(let s of BOt)for(let a of t.manifest.getForScope(s).values()){let n=r.tryWorkspaceByDescriptor(a),c=q.parseRange(a.range);if(c.protocol===vOt)if(n===null){if(r.tryWorkspaceByIdent(a)===null)throw new Yt(21,`${q.prettyDescriptor(r.configuration,a)}: No local workspace found for this range`)}else{let f;q.areDescriptorsEqual(a,n.anchoredDescriptor)||c.selector===\"*\"?f=n.manifest.version??\"0.0.0\":c.selector===\"~\"||c.selector===\"^\"?f=`${c.selector}${n.manifest.version??\"0.0.0\"}`:f=c.selector;let p=s===\"dependencies\"?q.makeDescriptor(a,\"unknown\"):null,h=p!==null&&t.manifest.ensureDependencyMeta(p).optional?\"optionalDependencies\":s;e[h][q.stringifyIdent(a)]=f}}},DOt={hooks:{beforeWorkspacePacking:SOt},commands:[Gw]},bOt=DOt;var yOe=et(dTe());Ve();var dOe=et(gOe()),{env:Bt}=process,xjt=\"application/vnd.in-toto+json\",kjt=\"https://in-toto.io/Statement/v0.1\",Qjt=\"https://in-toto.io/Statement/v1\",Tjt=\"https://slsa.dev/provenance/v0.2\",Rjt=\"https://slsa.dev/provenance/v1\",Fjt=\"https://github.com/actions/runner\",Njt=\"https://slsa-framework.github.io/github-actions-buildtypes/workflow/v1\",Ojt=\"https://github.com/npm/cli/gitlab\",Ljt=\"v0alpha1\",mOe=async(t,e)=>{let r;if(Bt.GITHUB_ACTIONS){if(!Bt.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Yt(91,'Provenance generation in GitHub Actions requires \"write\" access to the \"id-token\" permission');let s=(Bt.GITHUB_WORKFLOW_REF||\"\").replace(`${Bt.GITHUB_REPOSITORY}/`,\"\"),a=s.indexOf(\"@\"),n=s.slice(0,a),c=s.slice(a+1);r={_type:Qjt,subject:t,predicateType:Rjt,predicate:{buildDefinition:{buildType:Njt,externalParameters:{workflow:{ref:c,repository:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}`,path:n}},internalParameters:{github:{event_name:Bt.GITHUB_EVENT_NAME,repository_id:Bt.GITHUB_REPOSITORY_ID,repository_owner_id:Bt.GITHUB_REPOSITORY_OWNER_ID}},resolvedDependencies:[{uri:`git+${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}@${Bt.GITHUB_REF}`,digest:{gitCommit:Bt.GITHUB_SHA}}]},runDetails:{builder:{id:`${Fjt}/${Bt.RUNNER_ENVIRONMENT}`},metadata:{invocationId:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}/actions/runs/${Bt.GITHUB_RUN_ID}/attempts/${Bt.GITHUB_RUN_ATTEMPT}`}}}}}else if(Bt.GITLAB_CI){if(!Bt.SIGSTORE_ID_TOKEN)throw new Yt(91,`Provenance generation in GitLab CI requires \"SIGSTORE_ID_TOKEN\" with \"sigstore\" audience to be present in \"id_tokens\". For more info see:\nhttps://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html`);r={_type:kjt,subject:t,predicateType:Tjt,predicate:{buildType:`${Ojt}/${Ljt}`,builder:{id:`${Bt.CI_PROJECT_URL}/-/runners/${Bt.CI_RUNNER_ID}`},invocation:{configSource:{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA},entryPoint:Bt.CI_JOB_NAME},parameters:{CI:Bt.CI,CI_API_GRAPHQL_URL:Bt.CI_API_GRAPHQL_URL,CI_API_V4_URL:Bt.CI_API_V4_URL,CI_BUILD_BEFORE_SHA:Bt.CI_BUILD_BEFORE_SHA,CI_BUILD_ID:Bt.CI_BUILD_ID,CI_BUILD_NAME:Bt.CI_BUILD_NAME,CI_BUILD_REF:Bt.CI_BUILD_REF,CI_BUILD_REF_NAME:Bt.CI_BUILD_REF_NAME,CI_BUILD_REF_SLUG:Bt.CI_BUILD_REF_SLUG,CI_BUILD_STAGE:Bt.CI_BUILD_STAGE,CI_COMMIT_BEFORE_SHA:Bt.CI_COMMIT_BEFORE_SHA,CI_COMMIT_BRANCH:Bt.CI_COMMIT_BRANCH,CI_COMMIT_REF_NAME:Bt.CI_COMMIT_REF_NAME,CI_COMMIT_REF_PROTECTED:Bt.CI_COMMIT_REF_PROTECTED,CI_COMMIT_REF_SLUG:Bt.CI_COMMIT_REF_SLUG,CI_COMMIT_SHA:Bt.CI_COMMIT_SHA,CI_COMMIT_SHORT_SHA:Bt.CI_COMMIT_SHORT_SHA,CI_COMMIT_TIMESTAMP:Bt.CI_COMMIT_TIMESTAMP,CI_COMMIT_TITLE:Bt.CI_COMMIT_TITLE,CI_CONFIG_PATH:Bt.CI_CONFIG_PATH,CI_DEFAULT_BRANCH:Bt.CI_DEFAULT_BRANCH,CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_SERVER:Bt.CI_DEPENDENCY_PROXY_SERVER,CI_DEPENDENCY_PROXY_USER:Bt.CI_DEPENDENCY_PROXY_USER,CI_JOB_ID:Bt.CI_JOB_ID,CI_JOB_NAME:Bt.CI_JOB_NAME,CI_JOB_NAME_SLUG:Bt.CI_JOB_NAME_SLUG,CI_JOB_STAGE:Bt.CI_JOB_STAGE,CI_JOB_STARTED_AT:Bt.CI_JOB_STARTED_AT,CI_JOB_URL:Bt.CI_JOB_URL,CI_NODE_TOTAL:Bt.CI_NODE_TOTAL,CI_PAGES_DOMAIN:Bt.CI_PAGES_DOMAIN,CI_PAGES_URL:Bt.CI_PAGES_URL,CI_PIPELINE_CREATED_AT:Bt.CI_PIPELINE_CREATED_AT,CI_PIPELINE_ID:Bt.CI_PIPELINE_ID,CI_PIPELINE_IID:Bt.CI_PIPELINE_IID,CI_PIPELINE_SOURCE:Bt.CI_PIPELINE_SOURCE,CI_PIPELINE_URL:Bt.CI_PIPELINE_URL,CI_PROJECT_CLASSIFICATION_LABEL:Bt.CI_PROJECT_CLASSIFICATION_LABEL,CI_PROJECT_DESCRIPTION:Bt.CI_PROJECT_DESCRIPTION,CI_PROJECT_ID:Bt.CI_PROJECT_ID,CI_PROJECT_NAME:Bt.CI_PROJECT_NAME,CI_PROJECT_NAMESPACE:Bt.CI_PROJECT_NAMESPACE,CI_PROJECT_NAMESPACE_ID:Bt.CI_PROJECT_NAMESPACE_ID,CI_PROJECT_PATH:Bt.CI_PROJECT_PATH,CI_PROJECT_PATH_SLUG:Bt.CI_PROJECT_PATH_SLUG,CI_PROJECT_REPOSITORY_LANGUAGES:Bt.CI_PROJECT_REPOSITORY_LANGUAGES,CI_PROJECT_ROOT_NAMESPACE:Bt.CI_PROJECT_ROOT_NAMESPACE,CI_PROJECT_TITLE:Bt.CI_PROJECT_TITLE,CI_PROJECT_URL:Bt.CI_PROJECT_URL,CI_PROJECT_VISIBILITY:Bt.CI_PROJECT_VISIBILITY,CI_REGISTRY:Bt.CI_REGISTRY,CI_REGISTRY_IMAGE:Bt.CI_REGISTRY_IMAGE,CI_REGISTRY_USER:Bt.CI_REGISTRY_USER,CI_RUNNER_DESCRIPTION:Bt.CI_RUNNER_DESCRIPTION,CI_RUNNER_ID:Bt.CI_RUNNER_ID,CI_RUNNER_TAGS:Bt.CI_RUNNER_TAGS,CI_SERVER_HOST:Bt.CI_SERVER_HOST,CI_SERVER_NAME:Bt.CI_SERVER_NAME,CI_SERVER_PORT:Bt.CI_SERVER_PORT,CI_SERVER_PROTOCOL:Bt.CI_SERVER_PROTOCOL,CI_SERVER_REVISION:Bt.CI_SERVER_REVISION,CI_SERVER_SHELL_SSH_HOST:Bt.CI_SERVER_SHELL_SSH_HOST,CI_SERVER_SHELL_SSH_PORT:Bt.CI_SERVER_SHELL_SSH_PORT,CI_SERVER_URL:Bt.CI_SERVER_URL,CI_SERVER_VERSION:Bt.CI_SERVER_VERSION,CI_SERVER_VERSION_MAJOR:Bt.CI_SERVER_VERSION_MAJOR,CI_SERVER_VERSION_MINOR:Bt.CI_SERVER_VERSION_MINOR,CI_SERVER_VERSION_PATCH:Bt.CI_SERVER_VERSION_PATCH,CI_TEMPLATE_REGISTRY_HOST:Bt.CI_TEMPLATE_REGISTRY_HOST,GITLAB_CI:Bt.GITLAB_CI,GITLAB_FEATURES:Bt.GITLAB_FEATURES,GITLAB_USER_ID:Bt.GITLAB_USER_ID,GITLAB_USER_LOGIN:Bt.GITLAB_USER_LOGIN,RUNNER_GENERATE_ARTIFACTS_METADATA:Bt.RUNNER_GENERATE_ARTIFACTS_METADATA},environment:{name:Bt.CI_RUNNER_DESCRIPTION,architecture:Bt.CI_RUNNER_EXECUTABLE_ARCH,server:Bt.CI_SERVER_URL,project:Bt.CI_PROJECT_PATH,job:{id:Bt.CI_JOB_ID},pipeline:{id:Bt.CI_PIPELINE_ID,ref:Bt.CI_CONFIG_PATH}}},metadata:{buildInvocationId:`${Bt.CI_JOB_URL}`,completeness:{parameters:!0,environment:!0,materials:!1},reproducible:!1},materials:[{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA}}]}}}else throw new Yt(91,\"Provenance generation is only supported in GitHub Actions and GitLab CI\");return dOe.attest(Buffer.from(JSON.stringify(r)),xjt,e)};async function Mjt(t,e,{access:r,tag:s,registry:a,gitHead:n,provenance:c}){let f=t.manifest.name,p=t.manifest.version,h=q.stringifyIdent(f),E=yOe.default.fromData(e,{algorithms:[\"sha1\",\"sha512\"]}),C=r??EOe(t,f),S=await IOe(t),P=await IA.genPackageManifest(t),I=`${h}-${p}.tgz`,R=new URL(`${zc(a)}/${h}/-/${I}`),N={[I]:{content_type:\"application/octet-stream\",data:e.toString(\"base64\"),length:e.length}};if(c){let U={name:`pkg:npm/${h.replace(/^@/,\"%40\")}@${p}`,digest:{sha512:E.sha512[0].hexDigest()}},W=await mOe([U]),te=JSON.stringify(W);N[`${h}-${p}.sigstore`]={content_type:W.mediaType,data:te,length:te.length}}return{_id:h,_attachments:N,name:h,access:C,\"dist-tags\":{[s]:p},versions:{[p]:{...P,_id:`${h}@${p}`,name:h,version:p,gitHead:n,dist:{shasum:E.sha1[0].hexDigest(),integrity:E.sha512[0].toString(),tarball:R.toString()}}},readme:S}}async function _jt(t){try{let{stdout:e}=await Gr.execvp(\"git\",[\"rev-parse\",\"--revs-only\",\"HEAD\"],{cwd:t});return e.trim()===\"\"?void 0:e.trim()}catch{return}}function EOe(t,e){let r=t.project.configuration;return t.manifest.publishConfig&&typeof t.manifest.publishConfig.access==\"string\"?t.manifest.publishConfig.access:r.get(\"npmPublishAccess\")!==null?r.get(\"npmPublishAccess\"):e.scope?\"restricted\":\"public\"}async function IOe(t){let e=ue.toPortablePath(`${t.cwd}/README.md`),r=t.manifest.name,a=`# ${q.stringifyIdent(r)}\n`;try{a=await le.readFilePromise(e,\"utf8\")}catch(n){if(n.code===\"ENOENT\")return a;throw n}return a}var mz={npmAlwaysAuth:{description:\"URL of the selected npm registry (note: npm enterprise isn't supported)\",type:\"BOOLEAN\",default:!1},npmAuthIdent:{description:\"Authentication identity for the npm registry (_auth in npm and yarn v1)\",type:\"SECRET\",default:null},npmAuthToken:{description:\"Authentication token for the npm registry (_authToken in npm and yarn v1)\",type:\"SECRET\",default:null}},COe={npmAuditRegistry:{description:\"Registry to query for audit reports\",type:\"STRING\",default:null},npmPublishRegistry:{description:\"Registry to push packages to\",type:\"STRING\",default:null},npmRegistryServer:{description:\"URL of the selected npm registry (note: npm enterprise isn't supported)\",type:\"STRING\",default:\"https://registry.yarnpkg.com\"}},Ujt={configuration:{...mz,...COe,npmScopes:{description:\"Settings per package scope\",type:\"MAP\",valueDefinition:{description:\"\",type:\"SHAPE\",properties:{...mz,...COe}}},npmRegistries:{description:\"Settings per registry\",type:\"MAP\",normalizeKeys:zc,valueDefinition:{description:\"\",type:\"SHAPE\",properties:{...mz}}}},fetchers:[lb,ch],resolvers:[ub,fb,Ab]},Hjt=Ujt;var bz={};Vt(bz,{NpmAuditCommand:()=>P1,NpmInfoCommand:()=>x1,NpmLoginCommand:()=>k1,NpmLogoutCommand:()=>T1,NpmPublishCommand:()=>R1,NpmTagAddCommand:()=>N1,NpmTagListCommand:()=>F1,NpmTagRemoveCommand:()=>O1,NpmWhoamiCommand:()=>L1,default:()=>Kjt,npmAuditTypes:()=>fP,npmAuditUtils:()=>ML});Ve();Ve();Wt();var Bz=et(Sa());Ul();var fP={};Vt(fP,{Environment:()=>cP,Severity:()=>uP});var cP=(s=>(s.All=\"all\",s.Production=\"production\",s.Development=\"development\",s))(cP||{}),uP=(n=>(n.Info=\"info\",n.Low=\"low\",n.Moderate=\"moderate\",n.High=\"high\",n.Critical=\"critical\",n))(uP||{});var ML={};Vt(ML,{allSeverities:()=>b1,getPackages:()=>wz,getReportTree:()=>Iz,getSeverityInclusions:()=>Ez,getTopLevelDependencies:()=>Cz});Ve();var wOe=et(fi());var b1=[\"info\",\"low\",\"moderate\",\"high\",\"critical\"];function Ez(t){if(typeof t>\"u\")return new Set(b1);let e=b1.indexOf(t),r=b1.slice(e);return new Set(r)}function Iz(t){let e={},r={children:e};for(let[s,a]of je.sortMap(Object.entries(t),n=>n[0]))for(let n of je.sortMap(a,c=>`${c.id}`))e[`${s}/${n.id}`]={value:he.tuple(he.Type.IDENT,q.parseIdent(s)),children:{ID:typeof n.id<\"u\"&&{label:\"ID\",value:he.tuple(he.Type.ID,n.id)},Issue:{label:\"Issue\",value:he.tuple(he.Type.NO_HINT,n.title)},URL:typeof n.url<\"u\"&&{label:\"URL\",value:he.tuple(he.Type.URL,n.url)},Severity:{label:\"Severity\",value:he.tuple(he.Type.NO_HINT,n.severity)},\"Vulnerable Versions\":{label:\"Vulnerable Versions\",value:he.tuple(he.Type.RANGE,n.vulnerable_versions)},\"Tree Versions\":{label:\"Tree Versions\",children:[...n.versions].sort(wOe.default.compare).map(c=>({value:he.tuple(he.Type.REFERENCE,c)}))},Dependents:{label:\"Dependents\",children:je.sortMap(n.dependents,c=>q.stringifyLocator(c)).map(c=>({value:he.tuple(he.Type.LOCATOR,c)}))}}};return r}function Cz(t,e,{all:r,environment:s}){let a=[],n=r?t.workspaces:[e],c=[\"all\",\"production\"].includes(s),f=[\"all\",\"development\"].includes(s);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!f:!c)||a.push({workspace:p,dependency:h});return a}function wz(t,e,{recursive:r}){let s=new Map,a=new Set,n=[],c=(f,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");if(q.ensureDevirtualizedLocator(E).reference.startsWith(\"npm:\")&&E.version!==null){let S=q.stringifyIdent(E),P=je.getMapWithDefault(s,S);je.getArrayWithDefault(P,E.version).push(f)}if(r)for(let S of E.dependencies.values())n.push([E,S])};for(let{workspace:f,dependency:p}of e)n.push([f.anchoredLocator,p]);for(;n.length>0;){let[f,p]=n.shift();c(f,p)}return s}var P1=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Audit dependencies from all workspaces\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Audit transitive dependencies as well\"});this.environment=ge.String(\"--environment\",\"all\",{description:\"Which environments to cover\",validator:Ao(cP)});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.noDeprecations=ge.Boolean(\"--no-deprecations\",!1,{description:\"Don't warn about deprecated packages\"});this.severity=ge.String(\"--severity\",\"info\",{description:\"Minimal severity requested for packages to be displayed\",validator:Ao(uP)});this.excludes=ge.Array(\"--exclude\",[],{description:\"Array of glob patterns of packages to exclude from audit\"});this.ignores=ge.Array(\"--ignore\",[],{description:\"Array of glob patterns of advisory ID's to ignore in the audit report\"})}static{this.paths=[[\"npm\",\"audit\"]]}static{this.usage=ot.Usage({description:\"perform a vulnerability audit against the installed packages\",details:`\n      This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).\n\n      For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \\`-A,--all\\`. To extend this search to both direct and transitive dependencies, use \\`-R,--recursive\\`.\n\n      Applying the \\`--severity\\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${b1.map(r=>`\\`${r}\\``).join(\", \")}.\n\n      If the \\`--json\\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.\n\n      If certain packages produce false positives for a particular environment, the \\`--exclude\\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \\`npmAuditExcludePackages\\` option.\n\n      If particular advisories are needed to be ignored, the \\`--ignore\\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \\`npmAuditIgnoreAdvisories\\` option.\n\n      To understand the dependency tree requiring vulnerable packages, check the raw report with the \\`--json\\` flag or use \\`yarn why package\\` to get more information as to who depends on them.\n    `,examples:[[\"Checks for known security issues with the installed packages. The output is a list of known issues.\",\"yarn npm audit\"],[\"Audit dependencies in all workspaces\",\"yarn npm audit --all\"],[\"Limit auditing to `dependencies` (excludes `devDependencies`)\",\"yarn npm audit --environment production\"],[\"Show audit report as valid JSON\",\"yarn npm audit --json\"],[\"Audit all direct and transitive dependencies\",\"yarn npm audit --recursive\"],[\"Output moderate (or more severe) vulnerabilities\",\"yarn npm audit --severity moderate\"],[\"Exclude certain packages\",\"yarn npm audit --exclude package1 --exclude package2\"],[\"Ignore specific advisories\",\"yarn npm audit --ignore 1234567 --ignore 7654321\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=Cz(s,a,{all:this.all,environment:this.environment}),c=wz(s,n,{recursive:this.recursive}),f=Array.from(new Set([...r.get(\"npmAuditExcludePackages\"),...this.excludes])),p=Object.create(null);for(let[N,U]of c)f.some(W=>Bz.default.isMatch(N,W))||(p[N]=[...U.keys()]);let h=pi.getAuditRegistry({configuration:r}),E,C=await uA.start({configuration:r,stdout:this.context.stdout},async()=>{let N=an.post(\"/-/npm/v1/security/advisories/bulk\",p,{authType:an.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([te,ie])=>{let Ae=await an.getPackageMetadata(q.parseIdent(te),{project:s});return je.mapAndFilter(ie,ce=>{let{deprecated:me}=Ae.versions[ce];return me?[te,ce,me]:je.mapAndFilter.skip})})),W=await N;for(let[te,ie,Ae]of U.flat(1))Object.hasOwn(W,te)&&W[te].some(ce=>Or.satisfiesWithPrereleases(ie,ce.vulnerable_versions))||(W[te]??=[],W[te].push({id:`${te} (deprecation)`,title:(typeof Ae==\"string\"?Ae:\"\").trim()||\"This package has been deprecated.\",severity:\"moderate\",vulnerable_versions:ie}));E=W});if(C.hasErrors())return C.exitCode();let S=Ez(this.severity),P=Array.from(new Set([...r.get(\"npmAuditIgnoreAdvisories\"),...this.ignores])),I=Object.create(null);for(let[N,U]of Object.entries(E)){let W=U.filter(te=>!Bz.default.isMatch(`${te.id}`,P)&&S.has(te.severity));W.length>0&&(I[N]=W.map(te=>{let ie=c.get(N);if(typeof ie>\"u\")throw new Error(\"Assertion failed: Expected the registry to only return packages that were requested\");let Ae=[...ie.keys()].filter(me=>Or.satisfiesWithPrereleases(me,te.vulnerable_versions)),ce=new Map;for(let me of Ae)for(let pe of ie.get(me))ce.set(pe.locatorHash,pe);return{...te,versions:Ae,dependents:[...ce.values()]}}))}let R=Object.keys(I).length>0;return R?(ks.emitTree(Iz(I),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async N=>{N.reportInfo(1,\"No audit suggestions\")}),R?1:0)}};Ve();Ve();bt();Wt();var vz=et(fi()),Sz=ye(\"util\"),x1=class extends ut{constructor(){super(...arguments);this.fields=ge.String(\"-f,--fields\",{description:\"A comma-separated list of manifest fields that should be displayed\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.packages=ge.Rest()}static{this.paths=[[\"npm\",\"info\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"show information about a package\",details:\"\\n      This command fetches information about a package from the npm registry and prints it in a tree format.\\n\\n      The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\\n\\n      Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\\n\\n      If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\\n\\n      By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\\n    \",examples:[[\"Show all available information about react (except the `dist`, `readme`, and `users` fields)\",\"yarn npm info react\"],[\"Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)\",\"yarn npm info react --json\"],[\"Show all available information about react@16.12.0\",\"yarn npm info react@16.12.0\"],[\"Show all available information about react@next\",\"yarn npm info react@next\"],[\"Show the description of react\",\"yarn npm info react --fields description\"],[\"Show all available versions of react\",\"yarn npm info react --fields versions\"],[\"Show the readme of react\",\"yarn npm info react --fields readme\"],[\"Show a few fields of react\",\"yarn npm info react --fields homepage,repository\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.fields<\"u\"?new Set([\"name\",...this.fields.split(/\\s*,\\s*/)]):null,n=[],c=!1,f=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let E;if(h===\".\"){let ie=s.topLevelWorkspace;if(!ie.manifest.name)throw new nt(`Missing ${he.pretty(r,\"name\",he.Type.CODE)} field in ${ue.fromPortablePath(K.join(ie.cwd,Er.manifest))}`);E=q.makeDescriptor(ie.manifest.name,\"unknown\")}else E=q.parseDescriptor(h);let C=an.getIdentUrl(E),S=Dz(await an.get(C,{configuration:r,ident:E,jsonResponse:!0,customErrorMessage:an.customPackageError})),P=Object.keys(S.versions).sort(vz.default.compareLoose),R=S[\"dist-tags\"].latest||P[P.length-1],N=Or.validRange(E.range);if(N){let ie=vz.default.maxSatisfying(P,N);ie!==null?R=ie:(p.reportWarning(0,`Unmet range ${q.prettyRange(r,E.range)}; falling back to the latest version`),c=!0)}else Object.hasOwn(S[\"dist-tags\"],E.range)?R=S[\"dist-tags\"][E.range]:E.range!==\"unknown\"&&(p.reportWarning(0,`Unknown tag ${q.prettyRange(r,E.range)}; falling back to the latest version`),c=!0);let U=S.versions[R],W={...S,...U,version:R,versions:P},te;if(a!==null){te={};for(let ie of a){let Ae=W[ie];if(typeof Ae<\"u\")te[ie]=Ae;else{p.reportWarning(1,`The ${he.pretty(r,ie,he.Type.CODE)} field doesn't exist inside ${q.prettyIdent(r,E)}'s information`),c=!0;continue}}}else this.json||(delete W.dist,delete W.readme,delete W.users),te=W;p.reportJson(te),this.json||n.push(te)}});Sz.inspect.styles.name=\"cyan\";for(let p of n)(p!==n[0]||c)&&this.context.stdout.write(`\n`),this.context.stdout.write(`${(0,Sz.inspect)(p,{depth:1/0,colors:!0,compact:!1})}\n`);return f.exitCode()}};function Dz(t){if(Array.isArray(t)){let e=[];for(let r of t)r=Dz(r),r&&e.push(r);return e}else if(typeof t==\"object\"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith(\"_\"))continue;let s=Dz(t[r]);s&&(e[r]=s)}return e}else return t||null}Ve();Ve();Wt();var BOe=et(lS()),k1=class extends ut{constructor(){super(...arguments);this.scope=ge.String(\"-s,--scope\",{description:\"Login to the registry configured for a given scope\"});this.publish=ge.Boolean(\"--publish\",!1,{description:\"Login to the publish registry\"});this.alwaysAuth=ge.Boolean(\"--always-auth\",{description:\"Set the npmAlwaysAuth configuration\"})}static{this.paths=[[\"npm\",\"login\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"store new login info to access the npm registry\",details:\"\\n      This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\\n\\n      Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\\n\\n      Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\\n    \",examples:[[\"Login to the default registry\",\"yarn npm login\"],[\"Login to the registry linked to the @my-scope registry\",\"yarn npm login --scope my-scope\"],[\"Login to the publish registry for the current package\",\"yarn npm login --publish\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await _L({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ot.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let c=await Gjt({configuration:r,registry:s,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),f=await jjt(s,c,r);return await qjt(s,f,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,\"Successfully logged in\")})).exitCode()}};async function _L({scope:t,publish:e,configuration:r,cwd:s}){return t&&e?pi.getScopeRegistry(t,{configuration:r,type:pi.RegistryType.PUBLISH_REGISTRY}):t?pi.getScopeRegistry(t,{configuration:r}):e?pi.getPublishRegistry((await rC(r,s)).manifest,{configuration:r}):pi.getDefaultRegistry({configuration:r})}async function jjt(t,e,r){let s=`/-/user/org.couchdb.user:${encodeURIComponent(e.name)}`,a={_id:`org.couchdb.user:${e.name}`,name:e.name,password:e.password,type:\"user\",roles:[],date:new Date().toISOString()},n={attemptedAs:e.name,configuration:r,registry:t,jsonResponse:!0,authType:an.AuthType.NO_AUTH};try{return(await an.put(s,a,n)).token}catch(E){if(!(E.originalError?.name===\"HTTPError\"&&E.originalError?.response.statusCode===409))throw E}let c={...n,authType:an.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${e.name}:${e.password}`).toString(\"base64\")}`}},f=await an.get(s,c);for(let[E,C]of Object.entries(f))(!a[E]||E===\"roles\")&&(a[E]=C);let p=`${s}/-rev/${a._rev}`;return(await an.put(p,a,c)).token}async function qjt(t,e,{alwaysAuth:r,scope:s}){let a=c=>f=>{let p=je.isIndexableObject(f)?f:{},h=p[c],E=je.isIndexableObject(h)?h:{};return{...p,[c]:{...E,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=s?{npmScopes:a(s)}:{npmRegistries:a(t)};return await ze.updateHomeConfiguration(n)}async function Gjt({configuration:t,registry:e,report:r,stdin:s,stdout:a}){r.reportInfo(0,`Logging in to ${he.pretty(t,e,he.Type.URL)}`);let n=!1;if(e.match(/^https:\\/\\/npm\\.pkg\\.github\\.com(\\/|$)/)&&(r.reportInfo(0,\"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions.\"),n=!0),r.reportSeparator(),t.env.YARN_IS_TEST_ENV)return{name:t.env.YARN_INJECT_NPM_USER||\"\",password:t.env.YARN_INJECT_NPM_PASSWORD||\"\"};let c=await(0,BOe.prompt)([{type:\"input\",name:\"name\",message:\"Username:\",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a},{type:\"password\",name:\"password\",message:n?\"Token:\":\"Password:\",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a}]);return r.reportSeparator(),c}Ve();Ve();Wt();var Q1=new Set([\"npmAuthIdent\",\"npmAuthToken\"]),T1=class extends ut{constructor(){super(...arguments);this.scope=ge.String(\"-s,--scope\",{description:\"Logout of the registry configured for a given scope\"});this.publish=ge.Boolean(\"--publish\",!1,{description:\"Logout of the publish registry\"});this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Logout of all registries\"})}static{this.paths=[[\"npm\",\"logout\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"logout of the npm registry\",details:\"\\n      This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\\n\\n      Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\\n\\n      Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\\n\\n      Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\\n    \",examples:[[\"Logout of the default registry\",\"yarn npm logout\"],[\"Logout of the @my-scope scope\",\"yarn npm logout --scope my-scope\"],[\"Logout of the publish registry for the current package\",\"yarn npm logout --publish\"],[\"Logout of all registries\",\"yarn npm logout --all\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=async()=>{let n=await _L({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),c=await ze.find(this.context.cwd,this.context.plugins),f=q.makeIdent(this.scope??null,\"pkg\");return!pi.getAuthConfiguration(n,{configuration:c,ident:f}).get(\"npmAuthToken\")};return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{if(this.all&&(await Yjt(),n.reportInfo(0,\"Successfully logged out from everything\")),this.scope){await vOe(\"npmScopes\",this.scope),await s()?n.reportInfo(0,`Successfully logged out from ${this.scope}`):n.reportWarning(0,\"Scope authentication settings removed, but some other ones settings still apply to it\");return}let c=await _L({configuration:r,cwd:this.context.cwd,publish:this.publish});await vOe(\"npmRegistries\",c),await s()?n.reportInfo(0,`Successfully logged out from ${c}`):n.reportWarning(0,\"Registry authentication settings removed, but some other ones settings still apply to it\")})).exitCode()}};function Wjt(t,e){let r=t[e];if(!je.isIndexableObject(r))return!1;let s=new Set(Object.keys(r));if([...Q1].every(n=>!s.has(n)))return!1;for(let n of Q1)s.delete(n);if(s.size===0)return t[e]=void 0,!0;let a={...r};for(let n of Q1)delete a[n];return t[e]=a,!0}async function Yjt(){let t=e=>{let r=!1,s=je.isIndexableObject(e)?{...e}:{};s.npmAuthToken&&(delete s.npmAuthToken,r=!0);for(let a of Object.keys(s))Wjt(s,a)&&(r=!0);if(Object.keys(s).length!==0)return r?s:e};return await ze.updateHomeConfiguration({npmRegistries:t,npmScopes:t})}async function vOe(t,e){return await ze.updateHomeConfiguration({[t]:r=>{let s=je.isIndexableObject(r)?r:{};if(!Object.hasOwn(s,e))return r;let a=s[e],n=je.isIndexableObject(a)?a:{},c=new Set(Object.keys(n));if([...Q1].every(p=>!c.has(p)))return r;for(let p of Q1)c.delete(p);if(c.size===0)return Object.keys(s).length===1?void 0:{...s,[e]:void 0};let f={};for(let p of Q1)f[p]=void 0;return{...s,[e]:{...n,...f}}}})}Ve();Wt();var R1=class extends ut{constructor(){super(...arguments);this.access=ge.String(\"--access\",{description:\"The access for the published package (public or restricted)\"});this.tag=ge.String(\"--tag\",\"latest\",{description:\"The tag on the registry that the package should be attached to\"});this.tolerateRepublish=ge.Boolean(\"--tolerate-republish\",!1,{description:\"Warn and exit when republishing an already existing version of a package\"});this.otp=ge.String(\"--otp\",{description:\"The OTP token to use with the command\"});this.provenance=ge.Boolean(\"--provenance\",!1,{description:\"Generate provenance for the package. Only available in GitHub Actions and GitLab CI. Can be set globally through the `npmPublishProvenance` setting or the `YARN_NPM_CONFIG_PROVENANCE` environment variable, or per-package through the `publishConfig.provenance` field in package.json.\"})}static{this.paths=[[\"npm\",\"publish\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"publish the active workspace to the npm registry\",details:'\\n      This command will pack the active workspace into a fresh archive and upload it to the npm registry.\\n\\n      The package will by default be attached to the `latest` tag on the registry, but this behavior can be overridden by using the `--tag` option.\\n\\n      Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka \"private packages\"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\\n    ',examples:[[\"Publish the active workspace\",\"yarn npm publish\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);if(a.manifest.private)throw new nt(\"Private workspaces cannot be published\");if(a.manifest.name===null||a.manifest.version===null)throw new nt(\"Workspaces must have valid names and versions to be published on an external registry\");await s.restoreInstallState();let n=a.manifest.name,c=a.manifest.version,f=pi.getPublishRegistry(a.manifest,{configuration:r});return(await Ot.start({configuration:r,stdout:this.context.stdout},async h=>{if(this.tolerateRepublish)try{let E=await an.get(an.getIdentUrl(n),{configuration:r,registry:f,ident:n,jsonResponse:!0});if(!Object.hasOwn(E,\"versions\"))throw new Yt(15,'Registry returned invalid data for - missing \"versions\" field');if(Object.hasOwn(E.versions,c)){h.reportWarning(0,`Registry already knows about version ${c}; skipping.`);return}}catch(E){if(E.originalError?.response?.statusCode!==404)throw E}await In.maybeExecuteWorkspaceLifecycleScript(a,\"prepublish\",{report:h}),await IA.prepareForPack(a,{report:h},async()=>{let E=await IA.genPackList(a);for(let N of E)h.reportInfo(null,N);let C=await IA.genPackStream(a,E),S=await je.bufferStream(C),P=await D1.getGitHead(a.cwd),I=!1;a.manifest.publishConfig&&\"provenance\"in a.manifest.publishConfig?(I=!!a.manifest.publishConfig.provenance,I?h.reportInfo(null,\"Generating provenance statement because `publishConfig.provenance` field is set.\"):h.reportInfo(null,\"Skipping provenance statement because `publishConfig.provenance` field is set to false.\")):this.provenance?(I=!0,h.reportInfo(null,\"Generating provenance statement because `--provenance` flag is set.\")):r.get(\"npmPublishProvenance\")&&(I=!0,h.reportInfo(null,\"Generating provenance statement because `npmPublishProvenance` setting is set.\"));let R=await D1.makePublishBody(a,S,{access:this.access,tag:this.tag,registry:f,gitHead:P,provenance:I});await an.put(an.getIdentUrl(n),R,{configuration:r,registry:f,ident:n,otp:this.otp,jsonResponse:!0})}),h.reportInfo(0,\"Package archive published\")})).exitCode()}};Ve();Wt();var SOe=et(fi());Ve();bt();Wt();var F1=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.package=ge.String({required:!1})}static{this.paths=[[\"npm\",\"tag\",\"list\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"list all dist-tags of a package\",details:`\n      This command will list all tags of a package from the npm registry.\n\n      If the package is not specified, Yarn will default to the current workspace.\n    `,examples:[[\"List all tags of package `my-pkg`\",\"yarn npm tag list my-pkg\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n;if(typeof this.package<\"u\")n=q.parseIdent(this.package);else{if(!a)throw new ar(s.cwd,this.context.cwd);if(!a.manifest.name)throw new nt(`Missing 'name' field in ${ue.fromPortablePath(K.join(a.cwd,Er.manifest))}`);n=a.manifest.name}let c=await AP(n,r),p={children:je.sortMap(Object.entries(c),([h])=>h).map(([h,E])=>({value:he.tuple(he.Type.RESOLUTION,{descriptor:q.makeDescriptor(n,h),locator:q.makeLocator(n,E)})}))};return ks.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function AP(t,e){let r=`/-/package${an.getIdentUrl(t)}/dist-tags`;return an.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:an.customPackageError})}var N1=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[[\"npm\",\"tag\",\"add\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"add a tag for a specific version of a package\",details:`\n      This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.\n    `,examples:[[\"Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`\",\"yarn npm tag add my-pkg@2.3.4-beta.4 beta\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=q.parseDescriptor(this.package,!0),c=n.range;if(!SOe.default.valid(c))throw new nt(`The range ${he.pretty(r,n.range,he.Type.RANGE)} must be a valid semver version`);let f=pi.getPublishRegistry(a.manifest,{configuration:r}),p=he.pretty(r,n,he.Type.IDENT),h=he.pretty(r,c,he.Type.RANGE),E=he.pretty(r,this.tag,he.Type.CODE);return(await Ot.start({configuration:r,stdout:this.context.stdout},async S=>{let P=await AP(n,r);Object.hasOwn(P,this.tag)&&P[this.tag]===c&&S.reportWarning(0,`Tag ${E} is already set to version ${h}`);let I=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.put(I,c,{configuration:r,registry:f,ident:n,jsonRequest:!0,jsonResponse:!0}),S.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};Ve();Wt();var O1=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[[\"npm\",\"tag\",\"remove\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"remove a tag from a package\",details:`\n      This command will remove a tag from a package from the npm registry.\n    `,examples:[[\"Remove the `beta` tag from package `my-pkg`\",\"yarn npm tag remove my-pkg beta\"]]})}async execute(){if(this.tag===\"latest\")throw new nt(\"The 'latest' tag cannot be removed.\");let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=q.parseIdent(this.package),c=pi.getPublishRegistry(a.manifest,{configuration:r}),f=he.pretty(r,this.tag,he.Type.CODE),p=he.pretty(r,n,he.Type.IDENT),h=await AP(n,r);if(!Object.hasOwn(h,this.tag))throw new nt(`${f} is not a tag of package ${p}`);return(await Ot.start({configuration:r,stdout:this.context.stdout},async C=>{let S=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.del(S,{configuration:r,registry:c,ident:n,jsonResponse:!0}),C.reportInfo(0,`Tag ${f} removed from package ${p}`)})).exitCode()}};Ve();Ve();Wt();var L1=class extends ut{constructor(){super(...arguments);this.scope=ge.String(\"-s,--scope\",{description:\"Print username for the registry configured for a given scope\"});this.publish=ge.Boolean(\"--publish\",!1,{description:\"Print username for the publish registry\"})}static{this.paths=[[\"npm\",\"whoami\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"display the name of the authenticated user\",details:\"\\n      Print the username associated with the current authentication settings to the standard output.\\n\\n      When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\\n\\n      When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\\n    \",examples:[[\"Print username for the default registry\",\"yarn npm whoami\"],[\"Print username for the registry on a given scope\",\"yarn npm whoami --scope company\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s;return this.scope&&this.publish?s=pi.getScopeRegistry(this.scope,{configuration:r,type:pi.RegistryType.PUBLISH_REGISTRY}):this.scope?s=pi.getScopeRegistry(this.scope,{configuration:r}):this.publish?s=pi.getPublishRegistry((await rC(r,this.context.cwd)).manifest,{configuration:r}):s=pi.getDefaultRegistry({configuration:r}),(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c;try{c=await an.get(\"/-/whoami\",{configuration:r,registry:s,authType:an.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?q.makeIdent(this.scope,\"\"):void 0})}catch(f){if(f.response?.statusCode===401||f.response?.statusCode===403){n.reportError(41,\"Authentication failed - your credentials may have expired\");return}else throw f}n.reportInfo(0,c.username)})).exitCode()}};var Vjt={configuration:{npmPublishAccess:{description:\"Default access of the published packages\",type:\"STRING\",default:null},npmPublishProvenance:{description:\"Whether to generate provenance for the published packages\",type:\"BOOLEAN\",default:!1},npmAuditExcludePackages:{description:\"Array of glob patterns of packages to exclude from npm audit\",type:\"STRING\",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:\"Array of glob patterns of advisory IDs to exclude from npm audit\",type:\"STRING\",default:[],isArray:!0}},commands:[P1,x1,k1,T1,R1,N1,F1,O1,L1]},Kjt=Vjt;var Fz={};Vt(Fz,{PatchCommand:()=>q1,PatchCommitCommand:()=>j1,PatchFetcher:()=>mP,PatchResolver:()=>yP,default:()=>A6t,patchUtils:()=>dy});Ve();Ve();bt();rA();var dy={};Vt(dy,{applyPatchFile:()=>HL,diffFolders:()=>Tz,ensureUnpatchedDescriptor:()=>Pz,ensureUnpatchedLocator:()=>qL,extractPackageToDisk:()=>Qz,extractPatchFlags:()=>TOe,isParentRequired:()=>kz,isPatchDescriptor:()=>jL,isPatchLocator:()=>Fg,loadPatchFiles:()=>dP,makeDescriptor:()=>WL,makeLocator:()=>xz,makePatchHash:()=>Rz,parseDescriptor:()=>hP,parseLocator:()=>gP,parsePatchFile:()=>pP,unpatchDescriptor:()=>c6t,unpatchLocator:()=>u6t});Ve();bt();Ve();bt();var Jjt=/^@@ -(\\d+)(,(\\d+))? \\+(\\d+)(,(\\d+))? @@.*/;function M1(t){return K.relative(vt.root,K.resolve(vt.root,ue.toPortablePath(t)))}function zjt(t){let e=t.trim().match(Jjt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var Zjt=420,Xjt=493;var DOe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),$jt=t=>({header:zjt(t),parts:[]}),e6t={\"@\":\"header\",\"-\":\"deletion\",\"+\":\"insertion\",\" \":\"context\",\"\\\\\":\"pragma\",undefined:\"context\"};function t6t(t){let e=[],r=DOe(),s=\"parsing header\",a=null,n=null;function c(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function f(){c(),e.push(r),r=DOe()}for(let p=0;p<t.length;p++){let h=t[p];if(s===\"parsing header\")if(h.startsWith(\"@@\"))s=\"parsing hunks\",r.hunks=[],p-=1;else if(h.startsWith(\"diff --git \")){r&&r.diffLineFromPath&&f();let E=h.match(/^diff --git a\\/(.*?) b\\/(.*?)\\s*$/);if(!E)throw new Error(`Bad diff line: ${h}`);r.diffLineFromPath=E[1],r.diffLineToPath=E[2]}else if(h.startsWith(\"old mode \"))r.oldMode=h.slice(9).trim();else if(h.startsWith(\"new mode \"))r.newMode=h.slice(9).trim();else if(h.startsWith(\"deleted file mode \"))r.deletedFileMode=h.slice(18).trim();else if(h.startsWith(\"new file mode \"))r.newFileMode=h.slice(14).trim();else if(h.startsWith(\"rename from \"))r.renameFrom=h.slice(12).trim();else if(h.startsWith(\"rename to \"))r.renameTo=h.slice(10).trim();else if(h.startsWith(\"index \")){let E=h.match(/(\\w+)\\.\\.(\\w+)/);if(!E)continue;r.beforeHash=E[1],r.afterHash=E[2]}else h.startsWith(\"semver exclusivity \")?r.semverExclusivity=h.slice(19).trim():h.startsWith(\"--- \")?r.fromPath=h.slice(6).trim():h.startsWith(\"+++ \")&&(r.toPath=h.slice(6).trim());else{let E=e6t[h[0]]||null;switch(E){case\"header\":c(),a=$jt(h);break;case null:s=\"parsing header\",f(),p-=1;break;case\"pragma\":{if(!h.startsWith(\"\\\\ No newline at end of file\"))throw new Error(`Unrecognized pragma in patch file: ${h}`);if(!n)throw new Error(\"Bad parser state: No newline at EOF pragma encountered without context\");n.noNewlineAtEndOfFile=!0}break;case\"context\":case\"deletion\":case\"insertion\":{if(!a)throw new Error(\"Bad parser state: Hunk lines encountered before hunk header\");n&&n.type!==E&&(a.parts.push(n),n=null),n||(n={type:E,lines:[],noNewlineAtEndOfFile:!1}),n.lines.push(h.slice(1))}break;default:je.assertNever(E);break}}}f();for(let{hunks:p}of e)if(p)for(let h of p)n6t(h);return e}function r6t(t){let e=[];for(let r of t){let{semverExclusivity:s,diffLineFromPath:a,diffLineToPath:n,oldMode:c,newMode:f,deletedFileMode:p,newFileMode:h,renameFrom:E,renameTo:C,beforeHash:S,afterHash:P,fromPath:I,toPath:R,hunks:N}=r,U=E?\"rename\":p?\"file deletion\":h?\"file creation\":N&&N.length>0?\"patch\":\"mode change\",W=null;switch(U){case\"rename\":{if(!E||!C)throw new Error(\"Bad parser state: rename from & to not given\");e.push({type:\"rename\",semverExclusivity:s,fromPath:M1(E),toPath:M1(C)}),W=C}break;case\"file deletion\":{let te=a||I;if(!te)throw new Error(\"Bad parse state: no path given for file deletion\");e.push({type:\"file deletion\",semverExclusivity:s,hunk:N&&N[0]||null,path:M1(te),mode:UL(p),hash:S})}break;case\"file creation\":{let te=n||R;if(!te)throw new Error(\"Bad parse state: no path given for file creation\");e.push({type:\"file creation\",semverExclusivity:s,hunk:N&&N[0]||null,path:M1(te),mode:UL(h),hash:P})}break;case\"patch\":case\"mode change\":W=R||n;break;default:je.assertNever(U);break}W&&c&&f&&c!==f&&e.push({type:\"mode change\",semverExclusivity:s,path:M1(W),oldMode:UL(c),newMode:UL(f)}),W&&N&&N.length&&e.push({type:\"patch\",semverExclusivity:s,path:M1(W),hunks:N,beforeHash:S,afterHash:P})}if(e.length===0)throw new Error(\"Unable to parse patch file: No changes found. Make sure the patch is a valid UTF8 encoded string\");return e}function UL(t){let e=parseInt(t,8)&511;if(e!==Zjt&&e!==Xjt)throw new Error(`Unexpected file mode string: ${t}`);return e}function pP(t){let e=t.split(/\\n/g);return e[e.length-1]===\"\"&&e.pop(),r6t(t6t(e))}function n6t(t){let e=0,r=0;for(let{type:s,lines:a}of t.parts)switch(s){case\"context\":r+=a.length,e+=a.length;break;case\"deletion\":e+=a.length;break;case\"insertion\":r+=a.length;break;default:je.assertNever(s);break}if(e!==t.header.original.length||r!==t.header.patched.length){let s=a=>a<0?a:`+${a}`;throw new Error(`hunk header integrity check failed (expected @@ ${s(t.header.original.length)} ${s(t.header.patched.length)} @@, got @@ ${s(e)} ${s(r)} @@)`)}}Ve();bt();var _1=class extends Error{constructor(r,s){super(`Cannot apply hunk #${r+1}`);this.hunk=s}};async function U1(t,e,r){let s=await t.lstatPromise(e),a=await r();typeof a<\"u\"&&(e=a),await t.lutimesPromise(e,s.atime,s.mtime)}async function HL(t,{baseFs:e=new Yn,dryRun:r=!1,version:s=null}={}){for(let a of t)if(!(a.semverExclusivity!==null&&s!==null&&!Or.satisfiesWithPrereleases(s,a.semverExclusivity)))switch(a.type){case\"file deletion\":if(r){if(!e.existsSync(a.path))throw new Error(`Trying to delete a file that doesn't exist: ${a.path}`)}else await U1(e,K.dirname(a.path),async()=>{await e.unlinkPromise(a.path)});break;case\"rename\":if(r){if(!e.existsSync(a.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${a.fromPath}`)}else await U1(e,K.dirname(a.fromPath),async()=>{await U1(e,K.dirname(a.toPath),async()=>{await U1(e,a.fromPath,async()=>(await e.movePromise(a.fromPath,a.toPath),a.toPath))})});break;case\"file creation\":if(r){if(e.existsSync(a.path))throw new Error(`Trying to create a file that already exists: ${a.path}`)}else{let n=a.hunk?a.hunk.parts[0].lines.join(`\n`)+(a.hunk.parts[0].noNewlineAtEndOfFile?\"\":`\n`):\"\";await e.mkdirpPromise(K.dirname(a.path),{chmod:493,utimes:[ui.SAFE_TIME,ui.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,ui.SAFE_TIME,ui.SAFE_TIME)}break;case\"patch\":await U1(e,a.path,async()=>{await o6t(a,{baseFs:e,dryRun:r})});break;case\"mode change\":{let c=(await e.statPromise(a.path)).mode;if(bOe(a.newMode)!==bOe(c))continue;await U1(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:je.assertNever(a);break}}function bOe(t){return(t&64)>0}function POe(t){return t.replace(/\\s+$/,\"\")}function s6t(t,e){return POe(t)===POe(e)}async function o6t({hunks:t,path:e},{baseFs:r,dryRun:s=!1}){let a=await r.statSync(e).mode,c=(await r.readFileSync(e,\"utf8\")).split(/\\n/),f=[],p=0,h=0;for(let C of t){let S=Math.max(h,C.header.patched.start+p),P=Math.max(0,S-h),I=Math.max(0,c.length-S-C.header.original.length),R=Math.max(P,I),N=0,U=0,W=null;for(;N<=R;){if(N<=P&&(U=S-N,W=xOe(C,c,U),W!==null)){N=-N;break}if(N<=I&&(U=S+N,W=xOe(C,c,U),W!==null))break;N+=1}if(W===null)throw new _1(t.indexOf(C),C);f.push(W),p+=N,h=U+C.header.original.length}if(s)return;let E=0;for(let C of f)for(let S of C)switch(S.type){case\"splice\":{let P=S.index+E;c.splice(P,S.numToDelete,...S.linesToInsert),E+=S.linesToInsert.length-S.numToDelete}break;case\"pop\":c.pop();break;case\"push\":c.push(S.line);break;default:je.assertNever(S);break}await r.writeFilePromise(e,c.join(`\n`),{mode:a})}function xOe(t,e,r){let s=[];for(let a of t.parts)switch(a.type){case\"context\":case\"deletion\":{for(let n of a.lines){let c=e[r];if(c==null||!s6t(c,n))return null;r+=1}a.type===\"deletion\"&&(s.push({type:\"splice\",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&s.push({type:\"push\",line:\"\"}))}break;case\"insertion\":s.push({type:\"splice\",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&s.push({type:\"pop\"});break;default:je.assertNever(a.type);break}return s}var l6t=/^builtin<([^>]+)>$/;function H1(t,e){let{protocol:r,source:s,selector:a,params:n}=q.parseRange(t);if(r!==\"patch:\")throw new Error(\"Invalid patch range\");if(s===null)throw new Error(\"Patch locators must explicitly define their source\");let c=a?a.split(/&/).map(E=>ue.toPortablePath(E)):[],f=n&&typeof n.locator==\"string\"?q.parseLocator(n.locator):null,p=n&&typeof n.version==\"string\"?n.version:null,h=e(s);return{parentLocator:f,sourceItem:h,patchPaths:c,sourceVersion:p}}function jL(t){return t.range.startsWith(\"patch:\")}function Fg(t){return t.reference.startsWith(\"patch:\")}function hP(t){let{sourceItem:e,...r}=H1(t.range,q.parseDescriptor);return{...r,sourceDescriptor:e}}function gP(t){let{sourceItem:e,...r}=H1(t.reference,q.parseLocator);return{...r,sourceLocator:e}}function c6t(t){let{sourceItem:e}=H1(t.range,q.parseDescriptor);return e}function u6t(t){let{sourceItem:e}=H1(t.reference,q.parseLocator);return e}function Pz(t){if(!jL(t))return t;let{sourceItem:e}=H1(t.range,q.parseDescriptor);return e}function qL(t){if(!Fg(t))return t;let{sourceItem:e}=H1(t.reference,q.parseLocator);return e}function kOe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:s,patchHash:a},n){let c=t!==null?{locator:q.stringifyLocator(t)}:{},f=typeof s<\"u\"?{version:s}:{},p=typeof a<\"u\"?{hash:a}:{};return q.makeRange({protocol:\"patch:\",source:n(e),selector:r.join(\"&\"),params:{...f,...p,...c}})}function WL(t,{parentLocator:e,sourceDescriptor:r,patchPaths:s}){return q.makeDescriptor(t,kOe({parentLocator:e,sourceItem:r,patchPaths:s},q.stringifyDescriptor))}function xz(t,{parentLocator:e,sourcePackage:r,patchPaths:s,patchHash:a}){return q.makeLocator(t,kOe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:a},q.stringifyLocator))}function QOe({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:s},a){let n=a.lastIndexOf(\"!\");n!==-1&&(a=a.slice(n+1));let c=a.match(l6t);return c!==null?s(c[1]):a.startsWith(\"~/\")?r(a.slice(2)):K.isAbsolute(a)?t(a):e(a)}function TOe(t){let e=t.lastIndexOf(\"!\");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has(\"optional\")}}function kz(t){return QOe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function dP(t,e,r){let s=t!==null?await r.fetcher.fetch(t,r):null,a=s&&s.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,s.localPath)}:s;s&&s!==a&&s.releaseFs&&s.releaseFs();let n=await je.releaseAfterUseAsync(async()=>await Promise.all(e.map(async c=>{let f=TOe(c),p=await QOe({onAbsolute:async h=>await le.readFilePromise(h,\"utf8\"),onRelative:async h=>{if(a===null)throw new Error(\"Assertion failed: The parent locator should have been fetched\");return await a.packageFs.readFilePromise(K.join(a.prefixPath,h),\"utf8\")},onProject:async h=>await le.readFilePromise(K.join(r.project.cwd,h),\"utf8\"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},c);return{...f,source:p}})));for(let c of n)typeof c.source==\"string\"&&(c.source=c.source.replace(/\\r\\n?/g,`\n`));return n}async function Qz(t,{cache:e,project:r}){let s=r.storedPackages.get(t.locatorHash);if(typeof s>\"u\")throw new Error(\"Assertion failed: Expected the package to be registered\");let a=qL(t),n=r.storedChecksums,c=new Wi,f=await le.mktempPromise(),p=K.join(f,\"source\"),h=K.join(f,\"user\"),E=K.join(f,\".yarn-patch.json\"),C=r.configuration.makeFetcher(),S=[];try{let P,I;if(t.locatorHash===a.locatorHash){let R=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c});S.push(()=>R.releaseFs?.()),P=R,I=R}else P=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>P.releaseFs?.()),I=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>I.releaseFs?.());await Promise.all([le.copyPromise(p,P.prefixPath,{baseFs:P.packageFs}),le.copyPromise(h,I.prefixPath,{baseFs:I.packageFs}),le.writeJsonPromise(E,{locator:q.stringifyLocator(t),version:s.version})])}finally{for(let P of S)P()}return le.detachTemp(f),h}async function Tz(t,e){let r=ue.fromPortablePath(t).replace(/\\\\/g,\"/\"),s=ue.fromPortablePath(e).replace(/\\\\/g,\"/\"),{stdout:a,stderr:n}=await Gr.execvp(\"git\",[\"-c\",\"core.safecrlf=false\",\"diff\",\"--src-prefix=a/\",\"--dst-prefix=b/\",\"--ignore-cr-at-eol\",\"--full-index\",\"--no-index\",\"--no-renames\",\"--text\",r,s],{cwd:ue.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:\"1\",HOME:\"\",XDG_CONFIG_HOME:\"\",USERPROFILE:\"\"}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.\nThe following error was reported by 'git':\n${n}`);let c=r.startsWith(\"/\")?f=>f.slice(1):f=>f;return a.replace(new RegExp(`(a|b)(${je.escapeRegExp(`/${c(r)}/`)})`,\"g\"),\"$1/\").replace(new RegExp(`(a|b)${je.escapeRegExp(`/${c(s)}/`)}`,\"g\"),\"$1/\").replace(new RegExp(je.escapeRegExp(`${r}/`),\"g\"),\"\").replace(new RegExp(je.escapeRegExp(`${s}/`),\"g\"),\"\")}function Rz(t,e){let r=[];for(let{source:s}of t){if(s===null)continue;let a=pP(s);for(let n of a){let{semverExclusivity:c,...f}=n;c!==null&&e!==null&&!Or.satisfiesWithPrereleases(e,c)||r.push(JSON.stringify(f))}}return Nn.makeHash(`${3}`,...r).slice(0,6)}Ve();function ROe(t,{configuration:e,report:r}){for(let s of t.parts)for(let a of s.lines)switch(s.type){case\"context\":r.reportInfo(null,`  ${he.pretty(e,a,\"grey\")}`);break;case\"deletion\":r.reportError(28,`- ${he.pretty(e,a,he.Type.REMOVED)}`);break;case\"insertion\":r.reportError(28,`+ ${he.pretty(e,a,he.Type.ADDED)}`);break;default:je.assertNever(s.type)}}var mP=class{supports(e,r){return!!Fg(e)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async patchPackage(e,r){let{parentLocator:s,sourceLocator:a,sourceVersion:n,patchPaths:c}=gP(e),f=await dP(s,c,r),p=await le.mktempPromise(),h=K.join(p,\"current.zip\"),E=await r.fetcher.fetch(a,r),C=q.getIdentVendorPath(e),S=new ps(h,{create:!0,level:r.project.configuration.get(\"compressionLevel\")});await je.releaseAfterUseAsync(async()=>{await S.copyPromise(C,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),S.saveAndClose();for(let{source:P,optional:I}of f){if(P===null)continue;let R=new ps(h,{level:r.project.configuration.get(\"compressionLevel\")}),N=new Sn(K.resolve(vt.root,C),{baseFs:R});try{await HL(pP(P),{baseFs:N,version:n})}catch(U){if(!(U instanceof _1))throw U;let W=r.project.configuration.get(\"enableInlineHunks\"),te=!W&&!I?\" (set enableInlineHunks for details)\":\"\",ie=`${q.prettyLocator(r.project.configuration,e)}: ${U.message}${te}`,Ae=ce=>{W&&ROe(U.hunk,{configuration:r.project.configuration,report:ce})};if(R.discardAndClose(),I){r.report.reportWarningOnce(66,ie,{reportExtra:Ae});continue}else throw new Yt(66,ie,Ae)}R.saveAndClose()}return new ps(h,{level:r.project.configuration.get(\"compressionLevel\")})}};Ve();var yP=class{supportsDescriptor(e,r){return!!jL(e)}supportsLocator(e,r){return!!Fg(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){let{patchPaths:a}=hP(e);return a.every(n=>!kz(n))?e:q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:s}=hP(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{parentLocator:a,patchPaths:n}=hP(e),c=await dP(a,n,s.fetchOptions),f=r.sourceDescriptor;if(typeof f>\"u\")throw new Error(\"Assertion failed: The dependency should have been resolved\");let p=Rz(c,f.version);return[xz(e,{parentLocator:a,sourcePackage:f,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:s}=gP(e);return{...await r.resolver.resolve(s,r),...e}}};Ve();bt();Wt();var j1=class extends ut{constructor(){super(...arguments);this.save=ge.Boolean(\"-s,--save\",!1,{description:\"Add the patch to your resolution entries\"});this.patchFolder=ge.String()}static{this.paths=[[\"patch-commit\"]]}static{this.usage=ot.Usage({description:\"generate a patch out of a directory\",details:\"\\n      By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\\n\\n      With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\\n\\n      Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=K.resolve(this.context.cwd,ue.toPortablePath(this.patchFolder)),c=K.join(n,\"../source\"),f=K.join(n,\"../.yarn-patch.json\");if(!le.existsSync(c))throw new nt(\"The argument folder didn't get created by 'yarn patch'\");let p=await Tz(c,n),h=await le.readJsonPromise(f),E=q.parseLocator(h.locator,!0);if(!s.storedPackages.has(E.locatorHash))throw new nt(\"No package found in the project for the given locator\");if(!this.save){this.context.stdout.write(p);return}let C=r.get(\"patchFolder\"),S=K.join(C,`${q.slugifyLocator(E)}.patch`);await le.mkdirPromise(C,{recursive:!0}),await le.writeFilePromise(S,p);let P=[],I=new Map;for(let R of s.storedPackages.values()){if(q.isVirtualLocator(R))continue;let N=R.dependencies.get(E.identHash);if(!N)continue;let U=q.ensureDevirtualizedDescriptor(N),W=Pz(U),te=s.storedResolutions.get(W.descriptorHash);if(!te)throw new Error(\"Assertion failed: Expected the resolution to have been registered\");if(!s.storedPackages.get(te))throw new Error(\"Assertion failed: Expected the package to have been registered\");let Ae=s.tryWorkspaceByLocator(R);if(Ae)P.push(Ae);else{let ce=s.originalPackages.get(R.locatorHash);if(!ce)throw new Error(\"Assertion failed: Expected the original package to have been registered\");let me=ce.dependencies.get(N.identHash);if(!me)throw new Error(\"Assertion failed: Expected the original dependency to have been registered\");I.set(me.descriptorHash,me)}}for(let R of P)for(let N of Ht.hardDependencies){let U=R.manifest[N].get(E.identHash);if(!U)continue;let W=WL(U,{parentLocator:null,sourceDescriptor:q.convertLocatorToDescriptor(E),patchPaths:[K.join(Er.home,K.relative(s.cwd,S))]});R.manifest[N].set(U.identHash,W)}for(let R of I.values()){let N=WL(R,{parentLocator:null,sourceDescriptor:q.convertLocatorToDescriptor(E),patchPaths:[K.join(Er.home,K.relative(s.cwd,S))]});s.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:q.stringifyIdent(N),description:R.range}},reference:N.range})}await s.persist()}};Ve();bt();Wt();var q1=class extends ut{constructor(){super(...arguments);this.update=ge.Boolean(\"-u,--update\",!1,{description:\"Reapply local patches that already apply to this packages\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.package=ge.String()}static{this.paths=[[\"patch\"]]}static{this.usage=ot.Usage({description:\"prepare a package for patching\",details:\"\\n      This command will cause a package to be extracted in a temporary directory intended to be editable at will.\\n\\n      Once you're done with your changes, run `yarn patch-commit -s path` (with `path` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\\n\\n      Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=q.parseLocator(this.package);if(c.reference===\"unknown\"){let f=je.mapAndFilter([...s.storedPackages.values()],p=>p.identHash!==c.identHash?je.mapAndFilter.skip:q.isVirtualLocator(p)?je.mapAndFilter.skip:Fg(p)!==this.update?je.mapAndFilter.skip:p);if(f.length===0)throw new nt(\"No package found in the project for the given locator\");if(f.length>1)throw new nt(`Multiple candidate packages found; explicitly choose one of them (use \\`yarn why <package>\\` to get more information as to who depends on them):\n${f.map(p=>`\n- ${q.prettyLocator(r,p)}`).join(\"\")}`);c=f[0]}if(!s.storedPackages.has(c.locatorHash))throw new nt(\"No package found in the project for the given locator\");await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=qL(c),h=await Qz(c,{cache:n,project:s});f.reportJson({locator:q.stringifyLocator(p),path:ue.fromPortablePath(h)});let E=this.update?\" along with its current modifications\":\"\";f.reportInfo(0,`Package ${q.prettyLocator(r,p)} got extracted with success${E}!`),f.reportInfo(0,`You can now edit the following folder: ${he.pretty(r,ue.fromPortablePath(h),\"magenta\")}`),f.reportInfo(0,`Once you are done run ${he.pretty(r,`yarn patch-commit -s ${process.platform===\"win32\"?'\"':\"\"}${ue.fromPortablePath(h)}${process.platform===\"win32\"?'\"':\"\"}`,\"cyan\")} and Yarn will store a patchfile based on your changes.`)})}};var f6t={configuration:{enableInlineHunks:{description:\"If true, the installs will print unmatched patch hunks\",type:\"BOOLEAN\",default:!1},patchFolder:{description:\"Folder where the patch files must be written\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/patches\"}},commands:[j1,q1],fetchers:[mP],resolvers:[yP]},A6t=f6t;var Lz={};Vt(Lz,{PnpmLinker:()=>EP,default:()=>y6t});Ve();bt();Wt();var EP=class{getCustomDataKey(){return JSON.stringify({name:\"PnpmLinker\",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error(\"Assertion failed: Expected the pnpm linker to be enabled\");let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>\"u\")throw new nt(`Couldn't find ${q.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\\/node_modules\\/(@[^/]*\\/)?[^/]+)(\\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let c=e,f=e;do{f=c,c=K.dirname(f);let p=a.locatorByPath.get(f);if(p)return p}while(c!==f);return null}makeInstaller(e){return new Nz(e)}isEnabled(e){return e.project.configuration.get(\"nodeLinker\")===\"pnpm\"}},Nz=class{constructor(e){this.opts=e;this.asyncActions=new je.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=px(le,{indexPath:K.join(e.project.configuration.get(\"globalFolder\"),\"index\")})}attachCustomData(e){}async installPackage(e,r,s){switch(e.linkType){case\"SOFT\":return this.installPackageSoft(e,r,s);case\"HARD\":return this.installPackageHard(e,r,s)}throw new Error(\"Assertion failed: Unsupported package link type\")}async installPackageSoft(e,r,s){let a=K.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?K.join(a,Er.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(e,r,s){let a=h6t(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,q.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await le.mkdirPromise(n,{recursive:!0}),await le.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:\"HardlinkFromIndex\",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let f=q.isVirtualLocator(e)?q.devirtualizeLocator(e):e,p={manifest:await Ht.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Ht,misc:{hasBindingGyp:mA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(f,e.version),E=mA.extractBuildRequest(e,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get(\"nodeLinker\")!==\"pnpm\"||!FOe(e,{project:this.opts.project}))return;let s=this.customData.pathsByLocator.get(e.locatorHash);if(typeof s>\"u\")throw new Error(`Assertion failed: Expected the package to have been registered (${q.stringifyLocator(e)})`);let{dependenciesLocation:a}=s;a&&this.asyncActions.reduce(e.locatorHash,async n=>{await le.mkdirPromise(a,{recursive:!0});let c=await g6t(a),f=new Map(c),p=[n],h=(C,S)=>{let P=S;FOe(S,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,\"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies\"),P=q.devirtualizeLocator(S));let I=this.customData.pathsByLocator.get(P.locatorHash);if(typeof I>\"u\")throw new Error(`Assertion failed: Expected the package to have been registered (${q.stringifyLocator(S)})`);let R=q.stringifyIdent(C),N=K.join(a,R),U=K.relative(K.dirname(N),I.packageLocation),W=f.get(R);f.delete(R),p.push(Promise.resolve().then(async()=>{if(W){if(W.isSymbolicLink()&&await le.readlinkPromise(N)===U)return;await le.removePromise(N)}await le.mkdirpPromise(K.dirname(N)),process.platform==\"win32\"&&this.opts.project.configuration.get(\"winLinkType\")===\"junctions\"?await le.symlinkPromise(I.packageLocation,N,\"junction\"):await le.symlinkPromise(U,N)}))},E=!1;for(let[C,S]of r)C.identHash===e.identHash&&(E=!0),h(C,S);!E&&!this.opts.project.tryWorkspaceByLocator(e)&&h(q.convertLocatorToDescriptor(e),e),p.push(d6t(a,f)),await Promise.all(p)})}async attachExternalDependents(e,r){throw new Error(\"External dependencies haven't been implemented for the pnpm linker\")}async finalizeInstall(){let e=NOe(this.opts.project);if(this.opts.project.configuration.get(\"nodeLinker\")!==\"pnpm\")await le.removePromise(e);else{let r;try{r=new Set(await le.readdirPromise(e))}catch{r=new Set}for(let{dependenciesLocation:s}of this.customData.pathsByLocator.values()){if(!s)continue;let a=K.contains(e,s);if(a===null)continue;let[n]=a.split(K.sep);r.delete(n)}await Promise.all([...r].map(async s=>{await le.removePromise(K.join(e,s))}))}return await this.asyncActions.wait(),await Oz(e),this.opts.project.configuration.get(\"nodeLinker\")!==\"node-modules\"&&await Oz(p6t(this.opts.project)),{customData:this.customData}}};function p6t(t){return K.join(t.cwd,Er.nodeModules)}function NOe(t){return t.configuration.get(\"pnpmStoreFolder\")}function h6t(t,{project:e}){let r=q.slugifyLocator(t),s=NOe(e),a=K.join(s,r,\"package\"),n=K.join(s,r,Er.nodeModules);return{packageLocation:a,dependenciesLocation:n}}function FOe(t,{project:e}){return!q.isVirtualLocator(t)||!e.tryWorkspaceByLocator(t)}async function g6t(t){let e=new Map,r=[];try{r=await le.readdirPromise(t,{withFileTypes:!0})}catch(s){if(s.code!==\"ENOENT\")throw s}try{for(let s of r)if(!s.name.startsWith(\".\"))if(s.name.startsWith(\"@\")){let a=await le.readdirPromise(K.join(t,s.name),{withFileTypes:!0});if(a.length===0)e.set(s.name,s);else for(let n of a)e.set(`${s.name}/${n.name}`,n)}else e.set(s.name,s)}catch(s){if(s.code!==\"ENOENT\")throw s}return e}async function d6t(t,e){let r=[],s=new Set;for(let a of e.keys()){r.push(le.removePromise(K.join(t,a)));let n=q.tryParseIdent(a)?.scope;n&&s.add(`@${n}`)}return Promise.all(r).then(()=>Promise.all([...s].map(a=>Oz(K.join(t,a)))))}async function Oz(t){try{await le.rmdirPromise(t)}catch(e){if(e.code!==\"ENOENT\"&&e.code!==\"ENOTEMPTY\")throw e}}var m6t={configuration:{pnpmStoreFolder:{description:\"By default, the store is stored in the 'node_modules/.store' of the project. Sometimes in CI scenario's it is convenient to store this in a different location so it can be cached and reused.\",type:\"ABSOLUTE_PATH\",default:\"./node_modules/.store\"}},linkers:[EP]},y6t=m6t;var Gz={};Vt(Gz,{StageCommand:()=>G1,default:()=>x6t,stageUtils:()=>VL});Ve();bt();Wt();Ve();bt();var VL={};Vt(VL,{ActionType:()=>Mz,checkConsensus:()=>YL,expandDirectory:()=>Hz,findConsensus:()=>jz,findVcsRoot:()=>_z,genCommitMessage:()=>qz,getCommitPrefix:()=>OOe,isYarnFile:()=>Uz});bt();var Mz=(n=>(n[n.CREATE=0]=\"CREATE\",n[n.DELETE=1]=\"DELETE\",n[n.ADD=2]=\"ADD\",n[n.REMOVE=3]=\"REMOVE\",n[n.MODIFY=4]=\"MODIFY\",n))(Mz||{});async function _z(t,{marker:e}){do if(!le.existsSync(K.join(t,e)))t=K.dirname(t);else return t;while(t!==\"/\");return null}function Uz(t,{roots:e,names:r}){if(r.has(K.basename(t)))return!0;do if(!e.has(t))t=K.dirname(t);else return!0;while(t!==\"/\");return!1}function Hz(t){let e=[],r=[t];for(;r.length>0;){let s=r.pop(),a=le.readdirSync(s);for(let n of a){let c=K.resolve(s,n);le.lstatSync(c).isDirectory()?r.push(c):e.push(c)}}return e}function YL(t,e){let r=0,s=0;for(let a of t)a!==\"wip\"&&(e.test(a)?r+=1:s+=1);return r>=s}function jz(t){let e=YL(t,/^(\\w\\(\\w+\\):\\s*)?\\w+s/),r=YL(t,/^(\\w\\(\\w+\\):\\s*)?[A-Z]/),s=YL(t,/^\\w\\(\\w+\\):/);return{useThirdPerson:e,useUpperCase:r,useComponent:s}}function OOe(t){return t.useComponent?\"chore(yarn): \":\"\"}var E6t=new Map([[0,\"create\"],[1,\"delete\"],[2,\"add\"],[3,\"remove\"],[4,\"update\"]]);function qz(t,e){let r=OOe(t),s=[],a=e.slice().sort((n,c)=>n[0]-c[0]);for(;a.length>0;){let[n,c]=a.shift(),f=E6t.get(n);t.useUpperCase&&s.length===0&&(f=`${f[0].toUpperCase()}${f.slice(1)}`),t.useThirdPerson&&(f+=\"s\");let p=[c];for(;a.length>0&&a[0][0]===n;){let[,E]=a.shift();p.push(E)}p.sort();let h=p.shift();p.length===1?h+=\" (and one other)\":p.length>1&&(h+=` (and ${p.length} others)`),s.push(`${f} ${h}`)}return`${r}${s.join(\", \")}`}var I6t=\"Commit generated via `yarn stage`\",C6t=11;async function LOe(t){let{code:e,stdout:r}=await Gr.execvp(\"git\",[\"log\",\"-1\",\"--pretty=format:%H\"],{cwd:t});return e===0?r.trim():null}async function w6t(t,e){let r=[],s=e.filter(h=>K.basename(h.path)===\"package.json\");for(let{action:h,path:E}of s){let C=K.relative(t,E);if(h===4){let S=await LOe(t),{stdout:P}=await Gr.execvp(\"git\",[\"show\",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ht.fromText(P),R=await Ht.fromFile(E),N=new Map([...R.dependencies,...R.devDependencies]),U=new Map([...I.dependencies,...I.devDependencies]);for(let[W,te]of U){let ie=q.stringifyIdent(te),Ae=N.get(W);Ae?Ae.range!==te.range&&r.push([4,`${ie} to ${Ae.range}`]):r.push([3,ie])}for(let[W,te]of N)U.has(W)||r.push([2,q.stringifyIdent(te)])}else if(h===0){let S=await Ht.fromFile(E);S.name?r.push([0,q.stringifyIdent(S.name)]):r.push([0,\"a package\"])}else if(h===1){let S=await LOe(t),{stdout:P}=await Gr.execvp(\"git\",[\"show\",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ht.fromText(P);I.name?r.push([1,q.stringifyIdent(I.name)]):r.push([1,\"a package\"])}else throw new Error(\"Assertion failed: Unsupported action type\")}let{code:a,stdout:n}=await Gr.execvp(\"git\",[\"log\",`-${C6t}`,\"--pretty=format:%s\"],{cwd:t}),c=a===0?n.split(/\\n/g).filter(h=>h!==\"\"):[],f=jz(c);return qz(f,r)}var B6t={0:[\" A \",\"?? \"],4:[\" M \"],1:[\" D \"]},v6t={0:[\"A  \"],4:[\"M  \"],1:[\"D  \"]},MOe={async findRoot(t){return await _z(t,{marker:\".git\"})},async filterChanges(t,e,r,s){let{stdout:a}=await Gr.execvp(\"git\",[\"status\",\"-s\"],{cwd:t,strict:!0}),n=a.toString().split(/\\n/g),c=s?.staged?v6t:B6t;return[].concat(...n.map(p=>{if(p===\"\")return[];let h=p.slice(0,3),E=K.resolve(t,p.slice(3));if(!s?.staged&&h===\"?? \"&&p.endsWith(\"/\"))return Hz(E).map(C=>({action:0,path:C}));{let S=[0,4,1].find(P=>c[P].includes(h));return S!==void 0?[{action:S,path:E}]:[]}})).filter(p=>Uz(p.path,{roots:e,names:r}))},async genCommitMessage(t,e){return await w6t(t,e)},async makeStage(t,e){let r=e.map(s=>ue.fromPortablePath(s.path));await Gr.execvp(\"git\",[\"add\",\"--\",...r],{cwd:t,strict:!0})},async makeCommit(t,e,r){let s=e.map(a=>ue.fromPortablePath(a.path));await Gr.execvp(\"git\",[\"add\",\"-N\",\"--\",...s],{cwd:t,strict:!0}),await Gr.execvp(\"git\",[\"commit\",\"-m\",`${r}\n\n${I6t}\n`,\"--\",...s],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(s=>ue.fromPortablePath(s.path));await Gr.execvp(\"git\",[\"reset\",\"HEAD\",\"--\",...r],{cwd:t,strict:!0})}};var S6t=[MOe],G1=class extends ut{constructor(){super(...arguments);this.commit=ge.Boolean(\"-c,--commit\",!1,{description:\"Commit the staged files\"});this.reset=ge.Boolean(\"-r,--reset\",!1,{description:\"Remove all files from the staging area\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"Print the commit message and the list of modified files without staging / committing\"});this.update=ge.Boolean(\"-u,--update\",!1,{hidden:!0})}static{this.paths=[[\"stage\"]]}static{this.usage=ot.Usage({description:\"add all yarn files to your vcs\",details:\"\\n      This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\\n\\n      Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\\n\\n      Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\\n    \",examples:[[\"Adds all modified project files to the staging area\",\"yarn stage\"],[\"Creates a new commit containing all modified project files\",\"yarn stage --commit\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),{driver:a,root:n}=await D6t(s.cwd),c=[r.get(\"cacheFolder\"),r.get(\"globalFolder\"),r.get(\"virtualFolder\"),r.get(\"yarnPath\")];await r.triggerHook(C=>C.populateYarnPaths,s,C=>{c.push(C)});let f=new Set;for(let C of c)for(let S of b6t(n,C))f.add(S);let p=new Set([r.get(\"rcFilename\"),Er.lockfile,Er.manifest]),h=await a.filterChanges(n,f,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}\n`);else for(let C of h)this.context.stdout.write(`${ue.fromPortablePath(C.path)}\n`);else if(this.reset){let C=await a.filterChanges(n,f,p,{staged:!0});C.length===0?this.context.stdout.write(\"No staged changes found!\"):await a.makeReset(n,C)}else h.length===0?this.context.stdout.write(\"No changes found!\"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function D6t(t){let e=null,r=null;for(let s of S6t)if((r=await s.findRoot(t))!==null){e=s;break}if(e===null||r===null)throw new nt(\"No stage driver has been found for your current project\");return{driver:e,root:r}}function b6t(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let s;try{s=le.statSync(e)}catch{break}if(s.isSymbolicLink())e=K.resolve(K.dirname(e),le.readlinkSync(e));else break}return r}var P6t={commands:[G1]},x6t=P6t;var Wz={};Vt(Wz,{default:()=>L6t});Ve();Ve();bt();var HOe=et(fi());Ve();var _Oe=et(Z9()),k6t=\"e8e1bd300d860104bb8c58453ffa1eb4\",Q6t=\"OFCNCOG2CU\",UOe=async(t,e)=>{let r=q.stringifyIdent(t),a=T6t(e).initIndex(\"npm-search\");try{return(await a.getObject(r,{attributesToRetrieve:[\"types\"]})).types?.ts===\"definitely-typed\"}catch{return!1}},T6t=t=>(0,_Oe.default)(Q6t,k6t,{requester:{async send(r){try{let s=await An.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var jOe=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,R6t=async(t,e,r,s)=>{if(r.scope===\"types\")return;let{project:a}=t,{configuration:n}=a;if(!(n.get(\"tsEnableAutoTypes\")??(le.existsSync(K.join(t.cwd,\"tsconfig.json\"))||le.existsSync(K.join(a.cwd,\"tsconfig.json\")))))return;let f=n.makeResolver(),p={project:a,resolver:f,report:new Wi};if(!await UOe(r,n))return;let E=jOe(r),C=q.parseRange(r.range).selector;if(!Or.validRange(C)){let N=n.normalizeDependency(r),U=await f.getCandidates(N,{},p);C=q.parseRange(U[0].reference).selector}let S=HOe.default.coerce(C);if(S===null)return;let P=`${Xu.Modifier.CARET}${S.major}`,I=q.makeDescriptor(q.makeIdent(\"types\",E),P),R=je.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,W=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&W!==r.descriptorHash)return je.mapAndFind.skip;let te=[];for(let ie of Ht.allDependencies){let Ae=N.manifest[ie].get(I.identHash);typeof Ae>\"u\"||te.push([ie,Ae])}return te.length===0?je.mapAndFind.skip:te});if(typeof R<\"u\")for(let[N,U]of R)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(I);if((await f.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Xu.Target.DEVELOPMENT].set(I.identHash,I)}},F6t=async(t,e,r)=>{if(r.scope===\"types\")return;let{project:s}=t,{configuration:a}=s;if(!(a.get(\"tsEnableAutoTypes\")??(le.existsSync(K.join(t.cwd,\"tsconfig.json\"))||le.existsSync(K.join(s.cwd,\"tsconfig.json\")))))return;let c=jOe(r),f=q.makeIdent(\"types\",c);for(let p of Ht.allDependencies)typeof t.manifest[p].get(f.identHash)>\"u\"||t.manifest[p].delete(f.identHash)},N6t=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},O6t={configuration:{tsEnableAutoTypes:{description:\"Whether Yarn should auto-install @types/ dependencies on 'yarn add'\",type:\"BOOLEAN\",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:R6t,afterWorkspaceDependencyRemoval:F6t,beforeWorkspacePacking:N6t}},L6t=O6t;var zz={};Vt(zz,{VersionApplyCommand:()=>J1,VersionCheckCommand:()=>z1,VersionCommand:()=>Z1,default:()=>rqt,versionUtils:()=>K1});Ve();Ve();Wt();var K1={};Vt(K1,{Decision:()=>Y1,applyPrerelease:()=>KOe,applyReleases:()=>Jz,applyStrategy:()=>JL,clearVersionFiles:()=>Yz,getUndecidedDependentWorkspaces:()=>CP,getUndecidedWorkspaces:()=>KL,openVersionFile:()=>V1,requireMoreDecisions:()=>$6t,resolveVersionFiles:()=>IP,suggestStrategy:()=>Kz,updateVersionFiles:()=>Vz,validateReleaseDecision:()=>W1});Ve();bt();Bc();Wt();var VOe=et(YOe()),TA=et(fi()),X6t=/^(>=|[~^]|)(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$/,Y1=(c=>(c.UNDECIDED=\"undecided\",c.DECLINE=\"decline\",c.MAJOR=\"major\",c.MINOR=\"minor\",c.PATCH=\"patch\",c.PRERELEASE=\"prerelease\",c))(Y1||{});function W1(t){let e=TA.default.valid(t);return e||je.validateEnum((0,VOe.default)(Y1,\"UNDECIDED\"),t)}async function IP(t,{prerelease:e=null}={}){let r=new Map,s=t.configuration.get(\"deferredVersionFolder\");if(!le.existsSync(s))return r;let a=await le.readdirPromise(s);for(let n of a){if(!n.endsWith(\".yml\"))continue;let c=K.join(s,n),f=await le.readFilePromise(c,\"utf8\"),p=ls(f);for(let[h,E]of Object.entries(p.releases||{})){if(E===\"decline\")continue;let C=q.parseIdent(h),S=t.tryWorkspaceByIdent(C);if(S===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${K.basename(c)} references ${h})`);if(S.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${q.prettyLocator(t.configuration,S.anchoredLocator)})`);let P=S.manifest.raw.stableVersion??S.manifest.version,I=r.get(S),R=JL(P,W1(E));if(R===null)throw new Error(`Assertion failed: Expected ${P} to support being bumped via strategy ${E}`);let N=typeof I<\"u\"?TA.default.gt(R,I)?R:I:R;r.set(S,N)}}return e&&(r=new Map([...r].map(([n,c])=>[n,KOe(c,{current:n.manifest.version,prerelease:e})]))),r}async function Yz(t){let e=t.configuration.get(\"deferredVersionFolder\");le.existsSync(e)&&await le.removePromise(e)}async function Vz(t,e){let r=new Set(e),s=t.configuration.get(\"deferredVersionFolder\");if(!le.existsSync(s))return;let a=await le.readdirPromise(s);for(let n of a){if(!n.endsWith(\".yml\"))continue;let c=K.join(s,n),f=await le.readFilePromise(c,\"utf8\"),p=ls(f),h=p?.releases;if(h){for(let E of Object.keys(h)){let C=q.parseIdent(E),S=t.tryWorkspaceByIdent(C);(S===null||r.has(S))&&delete p.releases[E]}Object.keys(p.releases).length>0?await le.changeFilePromise(c,il(new il.PreserveOrdering(p))):await le.unlinkPromise(c)}}}async function V1(t,{allowEmpty:e=!1}={}){let r=t.configuration;if(r.projectCwd===null)throw new nt(\"This command can only be run from within a Yarn project\");let s=await Qa.fetchRoot(r.projectCwd),a=s!==null?await Qa.fetchBase(s,{baseRefs:r.get(\"changesetBaseRefs\")}):null,n=s!==null?await Qa.fetchChangedFiles(s,{base:a.hash,project:t}):[],c=r.get(\"deferredVersionFolder\"),f=n.filter(P=>K.contains(c,P)!==null);if(f.length>1)throw new nt(`Your current branch contains multiple versioning files; this isn't supported:\n- ${f.map(P=>ue.fromPortablePath(P)).join(`\n- `)}`);let p=new Set(je.mapAndFilter(n,P=>{let I=t.tryWorkspaceByFilePath(P);return I===null?je.mapAndFilter.skip:I}));if(f.length===0&&p.size===0&&!e)return null;let h=f.length===1?f[0]:K.join(c,`${Nn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=le.existsSync(h)?await le.readFilePromise(h,\"utf8\"):\"{}\",C=ls(E),S=new Map;for(let P of C.declined||[]){let I=q.parseIdent(P),R=t.getWorkspaceByIdent(I);S.set(R,\"decline\")}for(let[P,I]of Object.entries(C.releases||{})){let R=q.parseIdent(P),N=t.getWorkspaceByIdent(R);S.set(N,W1(I))}return{project:t,root:s,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(P=>P.manifest.version!==null)),releases:S,async saveAll(){let P={},I=[],R=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=q.stringifyIdent(N.anchoredLocator),W=S.get(N);W===\"decline\"?I.push(U):typeof W<\"u\"?P[U]=W1(W):p.has(N)&&R.push(U)}await le.mkdirPromise(K.dirname(h),{recursive:!0}),await le.changeFilePromise(h,il(new il.PreserveOrdering({releases:Object.keys(P).length>0?P:void 0,declined:I.length>0?I:void 0,undecided:R.length>0?R:void 0})))}}}function $6t(t){return KL(t).size>0||CP(t).length>0}function KL(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function CP(t,{include:e=new Set}={}){let r=[],s=new Map(je.mapAndFilter([...t.releases],([n,c])=>c===\"decline\"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(je.mapAndFilter([...t.releases],([n,c])=>c!==\"decline\"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let c of Ht.hardDependencies)for(let f of n.manifest.getForScope(c).values()){let p=t.project.tryWorkspaceByDescriptor(f);p!==null&&s.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function Kz(t,e){let r=TA.default.clean(e);for(let s of Object.values(Y1))if(s!==\"undecided\"&&s!==\"decline\"&&TA.default.inc(t,s)===r)return s;return null}function JL(t,e){if(TA.default.valid(e))return e;if(t===null)throw new nt(`Cannot apply the release strategy \"${e}\" unless the workspace already has a valid version`);if(!TA.default.valid(t))throw new nt(`Cannot apply the release strategy \"${e}\" on a non-semver version (${t})`);let r=TA.default.inc(t,e);if(r===null)throw new nt(`Cannot apply the release strategy \"${e}\" on the specified version (${t})`);return r}function Jz(t,e,{report:r,exact:s}){let a=new Map;for(let n of t.workspaces)for(let c of Ht.allDependencies)for(let f of n.manifest[c].values()){let p=t.tryWorkspaceByDescriptor(f);if(p===null||!e.has(p))continue;je.getArrayWithDefault(a,p).push([n,c,f.identHash])}for(let[n,c]of e){let f=n.manifest.version;n.manifest.version=c,TA.default.prerelease(c)===null?delete n.manifest.raw.stableVersion:n.manifest.raw.stableVersion||(n.manifest.raw.stableVersion=f);let p=n.manifest.name!==null?q.stringifyIdent(n.manifest.name):null;r.reportInfo(0,`${q.prettyLocator(t.configuration,n.anchoredLocator)}: Bumped to ${c}`),r.reportJson({cwd:ue.fromPortablePath(n.cwd),ident:p,oldVersion:f,newVersion:c});let h=a.get(n);if(!(typeof h>\"u\"))for(let[E,C,S]of h){let P=E.manifest[C].get(S);if(typeof P>\"u\")throw new Error(\"Assertion failed: The dependency should have existed\");let I=P.range,R=!1;if(I.startsWith(yi.protocol)&&(I=I.slice(yi.protocol.length),R=!0,I===n.relativeCwd))continue;let N=I.match(X6t);if(!N){r.reportWarning(0,`Couldn't auto-upgrade range ${I} (in ${q.prettyLocator(t.configuration,E.anchoredLocator)})`);continue}let U=s?`${c}`:`${N[1]}${c}`;R&&(U=`${yi.protocol}${U}`);let W=q.makeDescriptor(P,U);E.manifest[C].set(S,W)}}}var eqt=new Map([[\"%n\",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function KOe(t,{current:e,prerelease:r}){let s=new TA.default.SemVer(e),a=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==t&&(a.length=0);let c=!0,f=r.split(/\\./g);for(let p of f){let h=eqt.get(p);if(typeof h>\"u\")n.push(p),a[0]===p?a.shift():c=!1;else{let E=c?h.extract(a):null;E!==null&&typeof E[0]==\"number\"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),c=!1)}}return s.prerelease&&(s.prerelease=[]),`${t}-${n.join(\".\")}`}var J1=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean(\"--all\",!1,{description:\"Apply the deferred version changes on all workspaces\"});this.dryRun=ge.Boolean(\"--dry-run\",!1,{description:\"Print the versions without actually generating the package archive\"});this.prerelease=ge.String(\"--prerelease\",{description:\"Add a prerelease identifier to new versions\",tolerateBoolean:!0});this.exact=ge.Boolean(\"--exact\",!1,{description:\"Use the exact version of each package, removes any range. Useful for nightly releases where the range might match another version.\"});this.recursive=ge.Boolean(\"-R,--recursive\",{description:\"Release the transitive workspaces as well\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"version\",\"apply\"]]}static{this.usage=ot.Usage({category:\"Release-related commands\",description:\"apply all the deferred version bumps at once\",details:`\n      This command will apply the deferred version changes and remove their definitions from the repository.\n\n      Note that if \\`--prerelease\\` is set, the given prerelease identifier (by default \\`rc.%n\\`) will be used on all new versions and the version definitions will be kept as-is.\n\n      By default only the current workspace will be bumped, but you can configure this behavior by using one of:\n\n      - \\`--recursive\\` to also apply the version bump on its dependencies\n      - \\`--all\\` to apply the version bump on all packages in the repository\n\n      Note that this command will also update the \\`workspace:\\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.\n    `,examples:[[\"Apply the version change to the local workspace\",\"yarn version apply\"],[\"Apply the version change to all the workspaces in the local workspace\",\"yarn version apply --all\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=this.prerelease?typeof this.prerelease!=\"boolean\"?this.prerelease:\"rc.%n\":null,h=await IP(s,{prerelease:p}),E=new Map;if(this.all)E=h;else{let C=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let S of C){let P=h.get(S);typeof P<\"u\"&&E.set(S,P)}}if(E.size===0){let C=h.size>0?\" Did you want to add --all?\":\"\";f.reportWarning(0,`The current workspace doesn't seem to require a version bump.${C}`);return}Jz(s,E,{report:f,exact:this.exact}),this.dryRun||(p||(this.all?await Yz(s):await Vz(s,[...E.keys()])),f.reportSeparator())});return this.dryRun||c.hasErrors()?c.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Ve();bt();Wt();var zL=et(fi());var z1=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean(\"-i,--interactive\",{description:\"Open an interactive interface used to set version bumps\"})}static{this.paths=[[\"version\",\"check\"]]}static{this.usage=ot.Usage({category:\"Release-related commands\",description:\"check that all the relevant packages have been bumped\",details:\"\\n      **Warning:** This command currently requires Git.\\n\\n      This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\\n\\n      In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\\n\\n      In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\\n    \",examples:[[\"Check whether the modified packages need a bump\",\"yarn version check\"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){ow(this.context);let{Gem:r}=await Promise.resolve().then(()=>($F(),CY)),{ScrollableItems:s}=await Promise.resolve().then(()=>(nN(),rN)),{FocusRequest:a}=await Promise.resolve().then(()=>(BY(),XPe)),{useListInput:n}=await Promise.resolve().then(()=>(tN(),$Pe)),{renderForm:c}=await Promise.resolve().then(()=>(aN(),oN)),{Box:f,Text:p}=await Promise.resolve().then(()=>et(Vc())),{default:h,useCallback:E,useState:C}=await Promise.resolve().then(()=>et(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState();let R=await V1(P);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new nt(\"This command can only be run on Git repositories\");let N=()=>h.createElement(f,{flexDirection:\"row\",paddingBottom:1},h.createElement(f,{flexDirection:\"column\",width:60},h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<up>\"),\"/\",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<down>\"),\" to select workspaces.\")),h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<left>\"),\"/\",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<right>\"),\" to select release strategies.\"))),h.createElement(f,{flexDirection:\"column\"},h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<enter>\"),\" to save.\")),h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<ctrl+c>\"),\" to abort.\")))),U=({workspace:me,active:pe,decision:Be,setDecision:Ce})=>{let g=me.manifest.raw.stableVersion??me.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${q.prettyLocator(S,me.anchoredLocator)})`);if(zL.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let we=[\"undecided\",\"decline\",\"patch\",\"minor\",\"major\"];n(Be,we,{active:pe,minus:\"left\",plus:\"right\",set:Ce});let Ee=Be===\"undecided\"?h.createElement(p,{color:\"yellow\"},g):Be===\"decline\"?h.createElement(p,{color:\"green\"},g):h.createElement(p,null,h.createElement(p,{color:\"magenta\"},g),\" \\u2192 \",h.createElement(p,{color:\"green\"},zL.default.valid(Be)?Be:zL.default.inc(g,Be)));return h.createElement(f,{flexDirection:\"column\"},h.createElement(f,null,h.createElement(p,null,q.prettyLocator(S,me.anchoredLocator),\" - \",Ee)),h.createElement(f,null,we.map(fe=>h.createElement(f,{key:fe,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:fe===Be}),\" \",fe)))))},W=me=>{let pe=new Set(R.releaseRoots),Be=new Map([...me].filter(([Ce])=>pe.has(Ce)));for(;;){let Ce=CP({project:R.project,releases:Be}),g=!1;if(Ce.length>0){for(let[we]of Ce)if(!pe.has(we)){pe.add(we),g=!0;let Ee=me.get(we);typeof Ee<\"u\"&&Be.set(we,Ee)}}if(!g)break}return{relevantWorkspaces:pe,relevantReleases:Be}},te=()=>{let[me,pe]=C(()=>new Map(R.releases)),Be=E((Ce,g)=>{let we=new Map(me);g!==\"undecided\"?we.set(Ce,g):we.delete(Ce);let{relevantReleases:Ee}=W(we);pe(Ee)},[me,pe]);return[me,Be]},ie=({workspaces:me,releases:pe})=>{let Be=[];Be.push(`${me.size} total`);let Ce=0,g=0;for(let we of me){let Ee=pe.get(we);typeof Ee>\"u\"?g+=1:Ee!==\"decline\"&&(Ce+=1)}return Be.push(`${Ce} release${Ce===1?\"\":\"s\"}`),Be.push(`${g} remaining`),h.createElement(p,{color:\"yellow\"},Be.join(\", \"))},ce=await c(({useSubmit:me})=>{let[pe,Be]=te();me(pe);let{relevantWorkspaces:Ce}=W(pe),g=new Set([...Ce].filter(se=>!R.releaseRoots.has(se))),[we,Ee]=C(0),fe=E(se=>{switch(se){case a.BEFORE:Ee(we-1);break;case a.AFTER:Ee(we+1);break}},[we,Ee]);return h.createElement(f,{flexDirection:\"column\"},h.createElement(N,null),h.createElement(f,null,h.createElement(p,{wrap:\"wrap\"},\"The following files have been modified in your local checkout.\")),h.createElement(f,{flexDirection:\"column\",marginTop:1,paddingLeft:2},[...R.changedFiles].map(se=>h.createElement(f,{key:se},h.createElement(p,null,h.createElement(p,{color:\"grey\"},ue.fromPortablePath(R.root)),ue.sep,ue.relative(ue.fromPortablePath(R.root),ue.fromPortablePath(se)))))),R.releaseRoots.size>0&&h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:\"wrap\"},\"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):\")),g.size>3?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:R.releaseRoots,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:\"column\"},h.createElement(s,{active:we%2===0,radius:1,size:2,onFocusRequest:fe},[...R.releaseRoots].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||\"undecided\",setDecision:X=>Be(se,X)}))))),g.size>0?h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:\"wrap\"},\"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:\")),h.createElement(f,null,h.createElement(p,null,\"(Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<tab>\"),\" to move the focus between the workspace groups.)\")),g.size>5?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:g,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:\"column\"},h.createElement(s,{active:we%2===1,radius:2,size:2,onFocusRequest:fe},[...g].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||\"undecided\",setDecision:X=>Be(se,X)}))))):null)},{versionFile:R},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ce>\"u\")return 1;R.releases.clear();for(let[me,pe]of ce)R.releases.set(me,pe);await R.saveAll()}async executeStandard(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return await s.restoreInstallState(),(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{let f=await V1(s);if(f===null||f.releaseRoots.size===0)return;if(f.root===null)throw new nt(\"This command can only be run on Git repositories\");if(c.reportInfo(0,`Your PR was started right after ${he.pretty(r,f.baseHash.slice(0,7),\"yellow\")} ${he.pretty(r,f.baseTitle,\"magenta\")}`),f.changedFiles.size>0){c.reportInfo(0,\"You have changed the following files since then:\"),c.reportSeparator();for(let S of f.changedFiles)c.reportInfo(null,`${he.pretty(r,ue.fromPortablePath(f.root),\"gray\")}${ue.sep}${ue.relative(ue.fromPortablePath(f.root),ue.fromPortablePath(S))}`)}let p=!1,h=!1,E=KL(f);if(E.size>0){p||c.reportSeparator();for(let S of E)c.reportError(0,`${q.prettyLocator(r,S.anchoredLocator)} has been modified but doesn't have a release strategy attached`);p=!0}let C=CP(f);for(let[S,P]of C)h||c.reportSeparator(),c.reportError(0,`${q.prettyLocator(r,S.anchoredLocator)} doesn't have a release strategy attached, but depends on ${q.prettyWorkspace(r,P)} which is planned for release.`),h=!0;(p||h)&&(c.reportSeparator(),c.reportInfo(0,\"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed).\"),c.reportInfo(0,\"To correct these errors, run `yarn version check --interactive` then follow the instructions.\"))})).exitCode()}};Ve();Wt();var ZL=et(fi());var Z1=class extends ut{constructor(){super(...arguments);this.deferred=ge.Boolean(\"-d,--deferred\",{description:\"Prepare the version to be bumped during the next release cycle\"});this.immediate=ge.Boolean(\"-i,--immediate\",{description:\"Bump the version immediately\"});this.strategy=ge.String()}static{this.paths=[[\"version\"]]}static{this.usage=ot.Usage({category:\"Release-related commands\",description:\"apply a new version to the current package\",details:\"\\n      This command will bump the version number for the given package, following the specified strategy:\\n\\n      - If `major`, the first number from the semver range will be increased (`X.0.0`).\\n      - If `minor`, the second number from the semver range will be increased (`0.X.0`).\\n      - If `patch`, the third number from the semver range will be increased (`0.0.X`).\\n      - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\\n      - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\\n      - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\\n      - If a valid semver range, it will be used as new version.\\n      - If unspecified, Yarn will ask you for guidance.\\n\\n      For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\\n    \",examples:[[\"Immediately bump the version to the next major\",\"yarn version major\"],[\"Prepare the version to be bumped to the next major\",\"yarn version major --deferred\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=r.get(\"preferDeferredVersions\");this.deferred&&(n=!0),this.immediate&&(n=!1);let c=ZL.default.valid(this.strategy),f=this.strategy===\"decline\",p;if(c)if(a.manifest.version!==null){let E=Kz(a.manifest.version,this.strategy);E!==null?p=E:p=this.strategy}else p=this.strategy;else{let E=a.manifest.version;if(!f){if(E===null)throw new nt(\"Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.\");if(typeof E!=\"string\"||!ZL.default.valid(E))throw new nt(`Can't bump the version (${E}) if it's not valid semver`)}p=W1(this.strategy)}if(!n){let C=(await IP(s)).get(a);if(typeof C<\"u\"&&p!==\"decline\"){let S=JL(a.manifest.version,p);if(ZL.default.lt(S,C))throw new nt(`Can't bump the version to one that would be lower than the current deferred one (${C})`)}}let h=await V1(s,{allowEmpty:!0});return h.releases.set(a,p),await h.saveAll(),n?0:await this.cli.run([\"version\",\"apply\"])}};var tqt={configuration:{deferredVersionFolder:{description:\"Folder where are stored the versioning files\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/versions\"},preferDeferredVersions:{description:\"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set\",type:\"BOOLEAN\",default:!1}},commands:[J1,z1,Z1]},rqt=tqt;var Zz={};Vt(Zz,{WorkspacesFocusCommand:()=>X1,WorkspacesForeachCommand:()=>e2,default:()=>sqt});Ve();Ve();Wt();var X1=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.production=ge.Boolean(\"--production\",!1,{description:\"Only install regular dependencies by omitting dev dependencies\"});this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Install the entire project\"});this.workspaces=ge.Rest()}static{this.paths=[[\"workspaces\",\"focus\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"install a single workspace and its dependencies\",details:\"\\n      This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\\n\\n      Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\\n\\n      If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);await s.restoreInstallState({restoreResolutions:!1});let c;if(this.all)c=new Set(s.workspaces);else if(this.workspaces.length===0){if(!a)throw new ar(s.cwd,this.context.cwd);c=new Set([a])}else c=new Set(this.workspaces.map(f=>s.getWorkspaceByIdent(q.parseIdent(f))));for(let f of c)for(let p of this.production?[\"dependencies\"]:Ht.hardDependencies)for(let h of f.manifest.getForScope(p).values()){let E=s.tryWorkspaceByDescriptor(h);E!==null&&c.add(E)}for(let f of s.workspaces)c.has(f)?this.production&&f.manifest.devDependencies.clear():(f.manifest.installConfig=f.manifest.installConfig||{},f.manifest.installConfig.selfReferences=!1,f.manifest.dependencies.clear(),f.manifest.devDependencies.clear(),f.manifest.peerDependencies.clear(),f.manifest.scripts.clear());return await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n,persistProject:!1})}};Ve();Ve();Ve();Wt();var $1=et(Sa()),zOe=et(Md());Ul();var e2=class extends ut{constructor(){super(...arguments);this.from=ge.Array(\"--from\",{description:\"An array of glob pattern idents or paths from which to base any recursion\"});this.all=ge.Boolean(\"-A,--all\",{description:\"Run the command on all workspaces of a project\"});this.recursive=ge.Boolean(\"-R,--recursive\",{description:\"Run the command on the current workspace and all of its recursive dependencies\"});this.worktree=ge.Boolean(\"-W,--worktree\",{description:\"Run the command on all workspaces of the current worktree\"});this.verbose=ge.Counter(\"-v,--verbose\",{description:\"Increase level of logging verbosity up to 2 times\"});this.parallel=ge.Boolean(\"-p,--parallel\",!1,{description:\"Run the commands in parallel\"});this.interlaced=ge.Boolean(\"-i,--interlaced\",!1,{description:\"Print the output of commands in real-time instead of buffering it\"});this.jobs=ge.String(\"-j,--jobs\",{description:\"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`\",validator:vU([Ao([\"unlimited\"]),rB(BU(),[DU(),SU(1)])])});this.topological=ge.Boolean(\"-t,--topological\",!1,{description:\"Run the command after all workspaces it depends on (regular) have finished\"});this.topologicalDev=ge.Boolean(\"--topological-dev\",!1,{description:\"Run the command after all workspaces it depends on (regular + dev) have finished\"});this.include=ge.Array(\"--include\",[],{description:\"An array of glob pattern idents or paths; only matching workspaces will be traversed\"});this.exclude=ge.Array(\"--exclude\",[],{description:\"An array of glob pattern idents or paths; matching workspaces won't be traversed\"});this.publicOnly=ge.Boolean(\"--no-private\",{description:\"Avoid running the command on private workspaces\"});this.since=ge.String(\"--since\",{description:\"Only include workspaces that have been changed since the specified ref.\",tolerateBoolean:!0});this.dryRun=ge.Boolean(\"-n,--dry-run\",{description:\"Print the commands that would be run, without actually running them\"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"workspaces\",\"foreach\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"run a command on all workspaces\",details:\"\\n      This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\\n\\n      - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\\n\\n      - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\\n\\n      - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\\n\\n      - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project.\\n\\n      - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\\n\\n      - If `-W,--worktree` is set, Yarn will find workspaces to run the command on by looking at the current worktree.\\n\\n      - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\\n\\n      - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\\n\\n      - If `--dry-run` is set, Yarn will explain what it would do without actually doing anything.\\n\\n      - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. You can also use the `--no-private` flag to avoid running the command in private workspaces.\\n\\n      The `-v,--verbose` flag can be passed up to twice: once to prefix output lines with the originating workspace's name, and again to include start/finish/timing log lines. Maximum verbosity is enabled by default in terminal environments.\\n\\n      If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\\n    \",examples:[[\"Publish all packages\",\"yarn workspaces foreach -A --no-private npm publish --tolerate-republish\"],[\"Run the build script on all descendant packages\",\"yarn workspaces foreach -A run build\"],[\"Run the build script on current and all descendant packages in parallel, building package dependencies first\",\"yarn workspaces foreach -Apt run build\"],[\"Run the build script on several packages and all their dependencies, building dependencies first\",\"yarn workspaces foreach -Rpt --from '{workspace-a,workspace-b}' run build\"]]})}static{this.schema=[iB(\"all\",Wf.Forbids,[\"from\",\"recursive\",\"since\",\"worktree\"],{missingIf:\"undefined\"}),bU([\"all\",\"recursive\",\"since\",\"worktree\"],{missingIf:\"undefined\"})]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!this.all&&!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=this.cli.process([this.commandName,...this.args]),c=n.path.length===1&&n.path[0]===\"run\"&&typeof n.scriptName<\"u\"?n.scriptName:null;if(n.path.length===0)throw new nt(\"Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script\");let f=Ce=>{this.dryRun&&this.context.stdout.write(`${Ce}\n`)},p=()=>{let Ce=this.from.map(g=>$1.default.matcher(g));return s.workspaces.filter(g=>{let we=q.stringifyIdent(g.anchoredLocator),Ee=g.relativeCwd;return Ce.some(fe=>fe(we)||fe(Ee))})},h=[];if(this.since?(f(\"Option --since is set; selecting the changed workspaces as root for workspace selection\"),h=Array.from(await Qa.fetchChangedWorkspaces({ref:this.since,project:s}))):this.from?(f(\"Option --from is set; selecting the specified workspaces\"),h=[...p()]):this.worktree?(f(\"Option --worktree is set; selecting the current workspace\"),h=[a]):this.recursive?(f(\"Option --recursive is set; selecting the current workspace\"),h=[a]):this.all&&(f(\"Option --all is set; selecting all workspaces\"),h=[...s.workspaces]),this.dryRun&&!this.all){for(let Ce of h)f(`\n- ${Ce.relativeCwd}\n  ${q.prettyLocator(r,Ce.anchoredLocator)}`);h.length>0&&f(\"\")}let E;if(this.recursive?this.since?(f(\"Option --recursive --since is set; recursively selecting all dependent workspaces\"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependents()]).flat())):(f(\"Option --recursive is set; recursively selecting all transitive dependencies\"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(f(\"Option --worktree is set; recursively selecting all nested workspaces\"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ce of E)f(`\n- ${Ce.relativeCwd}\n  ${q.prettyLocator(r,Ce.anchoredLocator)}`);let C=[],S=!1;if(c?.includes(\":\")){for(let Ce of s.workspaces)if(Ce.manifest.scripts.has(c)&&(S=!S,S===!1))break}for(let Ce of h){if(c&&!Ce.manifest.scripts.has(c)&&!S&&!(await In.getWorkspaceAccessibleBinaries(Ce)).has(c)){f(`Excluding ${Ce.relativeCwd} because it doesn't have a \"${c}\" script`);continue}if(!(c===r.env.npm_lifecycle_event&&Ce.cwd===a.cwd)){if(this.include.length>0&&!$1.default.isMatch(q.stringifyIdent(Ce.anchoredLocator),this.include)&&!$1.default.isMatch(Ce.relativeCwd,this.include)){f(`Excluding ${Ce.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&($1.default.isMatch(q.stringifyIdent(Ce.anchoredLocator),this.exclude)||$1.default.isMatch(Ce.relativeCwd,this.exclude))){f(`Excluding ${Ce.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ce.manifest.private===!0){f(`Excluding ${Ce.relativeCwd} because it's a private workspace and --no-private was set`);continue}C.push(Ce)}}if(this.dryRun)return 0;let P=this.verbose??(this.context.stdout.isTTY?1/0:0),I=P>0,R=P>1,N=this.parallel?this.jobs===\"unlimited\"?1/0:Number(this.jobs)||Math.ceil(As.availableParallelism()/2):1,U=N===1?!1:this.parallel,W=U?this.interlaced:!0,te=(0,zOe.default)(N),ie=new Map,Ae=new Set,ce=0,me=null,pe=!1,Be=await Ot.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ce=>{let g=async(we,{commandIndex:Ee})=>{if(pe)return-1;!U&&R&&Ee>1&&Ce.reportSeparator();let fe=nqt(we,{configuration:r,label:I,commandIndex:Ee}),[se,X]=JOe(Ce,{prefix:fe,interlaced:W}),[De,Re]=JOe(Ce,{prefix:fe,interlaced:W});try{R&&Ce.reportInfo(null,`${fe?`${fe} `:\"\"}Process started`);let gt=Date.now(),j=await this.cli.run([this.commandName,...this.args],{cwd:we.cwd,stdout:se,stderr:De})||0;se.end(),De.end(),await X,await Re;let rt=Date.now();if(R){let Fe=r.get(\"enableTimers\")?`, completed in ${he.pretty(r,rt-gt,he.Type.DURATION)}`:\"\";Ce.reportInfo(null,`${fe?`${fe} `:\"\"}Process exited (exit code ${j})${Fe}`)}return j===130&&(pe=!0,me=j),j}catch(gt){throw se.end(),De.end(),await X,await Re,gt}};for(let we of C)ie.set(we.anchoredLocator.locatorHash,we);for(;ie.size>0&&!Ce.hasErrors();){let we=[];for(let[X,De]of ie){if(Ae.has(De.anchoredDescriptor.descriptorHash))continue;let Re=!0;if(this.topological||this.topologicalDev){let gt=this.topologicalDev?new Map([...De.manifest.dependencies,...De.manifest.devDependencies]):De.manifest.dependencies;for(let j of gt.values()){let rt=s.tryWorkspaceByDescriptor(j);if(Re=rt===null||!ie.has(rt.anchoredLocator.locatorHash),!Re)break}}if(Re&&(Ae.add(De.anchoredDescriptor.descriptorHash),we.push(te(async()=>{let gt=await g(De,{commandIndex:++ce});return ie.delete(X),Ae.delete(De.anchoredDescriptor.descriptorHash),{workspace:De,exitCode:gt}})),!U))break}if(we.length===0){let X=Array.from(ie.values()).map(De=>q.prettyLocator(r,De.anchoredLocator)).join(\", \");Ce.reportError(3,`Dependency cycle detected (${X})`);return}let Ee=await Promise.all(we);Ee.forEach(({workspace:X,exitCode:De})=>{De!==0&&Ce.reportError(0,`The command failed in workspace ${q.prettyLocator(r,X.anchoredLocator)} with exit code ${De}`)});let se=Ee.map(X=>X.exitCode).find(X=>X!==0);(this.topological||this.topologicalDev)&&typeof se<\"u\"&&Ce.reportError(0,\"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph\")}});return me!==null?me:Be.exitCode()}};function JOe(t,{prefix:e,interlaced:r}){let s=t.createStreamReporter(e),a=new je.DefaultStream;a.pipe(s,{end:!1}),a.on(\"finish\",()=>{s.end()});let n=new Promise(f=>{s.on(\"finish\",()=>{f(a.active)})});if(r)return[a,n];let c=new je.BufferStream;return c.pipe(a,{end:!1}),c.on(\"finish\",()=>{a.end()}),[c,n]}function nqt(t,{configuration:e,commandIndex:r,label:s}){if(!s)return null;let n=`[${q.stringifyIdent(t.anchoredLocator)}]:`,c=[\"#2E86AB\",\"#A23B72\",\"#F18F01\",\"#C73E1D\",\"#CCE2A3\"],f=c[r%c.length];return he.pretty(e,n,f)}var iqt={commands:[X1,e2]},sqt=iqt;var nC=()=>({modules:new Map([[\"@yarnpkg/cli\",iS],[\"@yarnpkg/core\",nS],[\"@yarnpkg/fslib\",q2],[\"@yarnpkg/libzip\",Sv],[\"@yarnpkg/parsers\",Z2],[\"@yarnpkg/shell\",Qv],[\"clipanion\",cB],[\"semver\",oqt],[\"typanion\",Ia],[\"@yarnpkg/plugin-essentials\",$5],[\"@yarnpkg/plugin-compat\",i9],[\"@yarnpkg/plugin-constraints\",w9],[\"@yarnpkg/plugin-dlx\",B9],[\"@yarnpkg/plugin-exec\",D9],[\"@yarnpkg/plugin-file\",P9],[\"@yarnpkg/plugin-git\",X5],[\"@yarnpkg/plugin-github\",Q9],[\"@yarnpkg/plugin-http\",T9],[\"@yarnpkg/plugin-init\",R9],[\"@yarnpkg/plugin-interactive-tools\",TY],[\"@yarnpkg/plugin-jsr\",FY],[\"@yarnpkg/plugin-link\",NY],[\"@yarnpkg/plugin-nm\",yV],[\"@yarnpkg/plugin-npm\",yz],[\"@yarnpkg/plugin-npm-cli\",bz],[\"@yarnpkg/plugin-pack\",f7],[\"@yarnpkg/plugin-patch\",Fz],[\"@yarnpkg/plugin-pnp\",oV],[\"@yarnpkg/plugin-pnpm\",Lz],[\"@yarnpkg/plugin-stage\",Gz],[\"@yarnpkg/plugin-typescript\",Wz],[\"@yarnpkg/plugin-version\",zz],[\"@yarnpkg/plugin-workspace-tools\",Zz]]),plugins:new Set([\"@yarnpkg/plugin-essentials\",\"@yarnpkg/plugin-compat\",\"@yarnpkg/plugin-constraints\",\"@yarnpkg/plugin-dlx\",\"@yarnpkg/plugin-exec\",\"@yarnpkg/plugin-file\",\"@yarnpkg/plugin-git\",\"@yarnpkg/plugin-github\",\"@yarnpkg/plugin-http\",\"@yarnpkg/plugin-init\",\"@yarnpkg/plugin-interactive-tools\",\"@yarnpkg/plugin-jsr\",\"@yarnpkg/plugin-link\",\"@yarnpkg/plugin-nm\",\"@yarnpkg/plugin-npm\",\"@yarnpkg/plugin-npm-cli\",\"@yarnpkg/plugin-pack\",\"@yarnpkg/plugin-patch\",\"@yarnpkg/plugin-pnp\",\"@yarnpkg/plugin-pnpm\",\"@yarnpkg/plugin-stage\",\"@yarnpkg/plugin-typescript\",\"@yarnpkg/plugin-version\",\"@yarnpkg/plugin-workspace-tools\"])});function $Oe({cwd:t,pluginConfiguration:e}){let r=new wa({binaryLabel:\"Yarn Package Manager\",binaryName:\"yarn\",binaryVersion:un??\"<unknown>\"});return Object.assign(r,{defaultContext:{...wa.defaultContext,cwd:t,plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr}})}function aqt(t){if(je.parseOptionalBoolean(process.env.YARN_IGNORE_NODE))return!0;let r=process.versions.node,s=\">=18.12.0\";if(Or.satisfiesWithPrereleases(r,s))return!0;let a=new nt(`This tool requires a Node version compatible with ${s} (got ${r}). Upgrade Node, or set \\`YARN_IGNORE_NODE=1\\` in your environment.`);return wa.defaultContext.stdout.write(t.error(a)),!1}async function eLe({selfPath:t,pluginConfiguration:e}){return await ze.find(ue.toPortablePath(process.cwd()),e,{strict:!1,usePathCheck:t})}function lqt(t,e,{yarnPath:r}){if(!le.existsSync(r))return t.error(new Error(`The \"yarn-path\" option has been set, but the specified location doesn't exist (${r}).`)),1;process.on(\"SIGINT\",()=>{});let s={stdio:\"inherit\",env:{...process.env,YARN_IGNORE_PATH:\"1\"}};try{(0,ZOe.execFileSync)(process.execPath,[ue.fromPortablePath(r),...e],s)}catch(a){return a.status??1}return 0}function cqt(t,e){let r=null,s=e;return e.length>=2&&e[0]===\"--cwd\"?(r=ue.toPortablePath(e[1]),s=e.slice(2)):e.length>=1&&e[0].startsWith(\"--cwd=\")?(r=ue.toPortablePath(e[0].slice(6)),s=e.slice(1)):e[0]===\"add\"&&e[e.length-2]===\"--cwd\"&&(r=ue.toPortablePath(e[e.length-1]),s=e.slice(0,e.length-2)),t.defaultContext.cwd=r!==null?K.resolve(r):K.cwd(),s}function uqt(t,{configuration:e}){if(!e.get(\"enableTelemetry\")||XOe.isCI||!process.stdout.isTTY)return;ze.telemetry=new eC(e,\"puba9cdc10ec5790a2cf4969dd413a47270\");let s=/^@yarnpkg\\/plugin-(.*)$/;for(let a of e.plugins.keys())tC.has(a.match(s)?.[1]??\"\")&&ze.telemetry?.reportPluginName(a);t.binaryVersion&&ze.telemetry.reportVersion(t.binaryVersion)}function tLe(t,{configuration:e}){for(let r of e.plugins.values())for(let s of r.commands||[])t.register(s)}async function fqt(t,e,{selfPath:r,pluginConfiguration:s}){if(!aqt(t))return 1;let a=await eLe({selfPath:r,pluginConfiguration:s}),n=a.get(\"yarnPath\"),c=a.get(\"ignorePath\");if(n&&!c)return lqt(t,e,{yarnPath:n});delete process.env.YARN_IGNORE_PATH;let f=cqt(t,e);uqt(t,{configuration:a}),tLe(t,{configuration:a});let p=t.process(f,t.defaultContext);return p.help||ze.telemetry?.reportCommandName(p.path.join(\" \")),await t.run(p,t.defaultContext)}async function cwe({cwd:t=K.cwd(),pluginConfiguration:e=nC()}={}){let r=$Oe({cwd:t,pluginConfiguration:e}),s=await eLe({pluginConfiguration:e,selfPath:null});return tLe(r,{configuration:s}),r}async function zR(t,{cwd:e=K.cwd(),selfPath:r,pluginConfiguration:s}){let a=$Oe({cwd:e,pluginConfiguration:s});function n(){wa.defaultContext.stdout.write(`ERROR: Yarn is terminating due to an unexpected empty event loop.\nPlease report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once(\"beforeExit\",n);try{process.exitCode=42,process.exitCode=await fqt(a,t,{selfPath:r,pluginConfiguration:s})}catch(c){wa.defaultContext.stdout.write(a.error(c)),process.exitCode=1}finally{process.off(\"beforeExit\",n),await le.rmtempPromise()}}zR(process.argv.slice(2),{cwd:K.cwd(),selfPath:ue.toPortablePath(ue.resolve(process.argv[1])),pluginConfiguration:nC()});})();\n/**\n  @license\n  Copyright (c) 2015, Rebecca Turner\n\n  Permission to use, copy, modify, and/or distribute this software for any\n  purpose with or without fee is hereby granted, provided that the above\n  copyright notice and this permission notice appear in all copies.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n  FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n  PERFORMANCE OF THIS SOFTWARE.\n */\n/**\n  @license\n  Copyright Node.js contributors. All rights reserved.\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to\n  deal in the Software without restriction, including without limitation the\n  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n  sell copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n  IN THE SOFTWARE.\n*/\n/**\n  @license\n  The MIT License (MIT)\n\n  Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n  THE SOFTWARE.\n*/\n/**\n  @license\n  Copyright Joyent, Inc. and other Node contributors.\n\n  Permission is hereby granted, free of charge, to any person obtaining a\n  copy of this software and associated documentation files (the\n  \"Software\"), to deal in the Software without restriction, including\n  without limitation the rights to use, copy, modify, merge, publish,\n  distribute, sublicense, and/or sell copies of the Software, and to permit\n  persons to whom the Software is furnished to do so, subject to the\n  following conditions:\n\n  The above copyright notice and this permission notice shall be included\n  in all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n  NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n  USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n/*! Bundled license information:\n\nis-number/index.js:\n  (*!\n   * is-number <https://github.com/jonschlinkert/is-number>\n   *\n   * Copyright (c) 2014-present, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\nto-regex-range/index.js:\n  (*!\n   * to-regex-range <https://github.com/micromatch/to-regex-range>\n   *\n   * Copyright (c) 2015-present, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\nfill-range/index.js:\n  (*!\n   * fill-range <https://github.com/jonschlinkert/fill-range>\n   *\n   * Copyright (c) 2014-present, Jon Schlinkert.\n   * Licensed under the MIT License.\n   *)\n\nis-extglob/index.js:\n  (*!\n   * is-extglob <https://github.com/jonschlinkert/is-extglob>\n   *\n   * Copyright (c) 2014-2016, Jon Schlinkert.\n   * Licensed under the MIT License.\n   *)\n\nis-glob/index.js:\n  (*!\n   * is-glob <https://github.com/jonschlinkert/is-glob>\n   *\n   * Copyright (c) 2014-2017, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\nqueue-microtask/index.js:\n  (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n\nrun-parallel/index.js:\n  (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n\ngit-url-parse/lib/index.js:\n  (*!\n   * buildToken\n   * Builds OAuth token prefix (helper function)\n   *\n   * @name buildToken\n   * @function\n   * @param {GitUrl} obj The parsed Git url object.\n   * @return {String} token prefix\n   *)\n\nobject-assign/index.js:\n  (*\n  object-assign\n  (c) Sindre Sorhus\n  @license MIT\n  *)\n\nreact/cjs/react.production.min.js:\n  (** @license React v17.0.2\n   * react.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *)\n\nscheduler/cjs/scheduler.production.min.js:\n  (** @license React v0.20.2\n   * scheduler.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *)\n\nreact-reconciler/cjs/react-reconciler.production.min.js:\n  (** @license React v0.26.2\n   * react-reconciler.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *)\n\nis-windows/index.js:\n  (*!\n   * is-windows <https://github.com/jonschlinkert/is-windows>\n   *\n   * Copyright © 2015-2018, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n*/\n"
  },
  {
    "path": ".yarnrc.yml",
    "content": "nodeLinker: node-modules\n\nyarnPath: .yarn/releases/yarn-4.9.1.cjs\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to Parcel will be documented in this file.\n\nThe format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)\nand Parcel adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).\n\n## [2.16.4] – 2026-02-01\n\n### Fixed\n\n- Dev server\n  - Add `--no-cors` option to disable CORS headers – [Details](https://github.com/parcel-bundler/parcel/pull/10268)\n\n## [2.16.3] – 2025-12-06\n\n### Fixed\n\n- React Server Components\n  - Fix `react-dom` import (bug in 2.16.2)\n\n## [2.16.2] – 2025-12-06\n\n### Fixed\n\n- HTML\n\n  - Fix siblings after `<svg>` being removed by HTML minifier – [Details](https://github.com/parcel-bundler/parcel/pull/10234)\n\n- React Server Components\n  - Bump `react-server-dom-parcel` to `^19.1.1` to fix vulnerability\n  - Fix cache key clash in `@parcel/packager-react-static` – [Details](https://github.com/parcel-bundler/parcel/pull/10245)\n  - Fix using inline string transformers with `@parcel/packager-react-static` – [Details](https://github.com/parcel-bundler/parcel/pull/10245)\n  - Preload CSS as soon as the RSC payload loads, without waiting for it to mount. This is useful for pre-fetching. – [Details](https://github.com/parcel-bundler/parcel/pull/10245)\n\n## [2.16.1] – 2025-11-04\n\n### Fixed\n\n- JavaScript\n\n  - Fix macro location information – [Details](https://github.com/parcel-bundler/parcel/pull/10224)\n\n- React Server Components\n  Improve performance of RSC builds – [Details](https://github.com/parcel-bundler/parcel/pull/10233)\n\n## [2.16.0] – 2025-09-18\n\n### Added\n\n- JavaScript\n  - Code split re-exports when scope hoisting is disabled – [Details](https://github.com/parcel-bundler/parcel/pull/10207)\n\n### Fixed\n\n- JavaScript\n  - Scope macro asset unique keys to the parent asset – [Details](https://github.com/parcel-bundler/parcel/pull/10215)\n\n## [2.15.3] – 2025-06-20\n\n### Fixed\n\n- JavaScript\n\n  - Expose line and column number to macros – [Details](https://github.com/parcel-bundler/parcel/pull/10171)\n\n- React Server Components\n  - Invalidate cache in ReactStaticPackager when pages are added or client components change – [Details](https://github.com/parcel-bundler/parcel/commit/3405c22220ce40a161964af76893554ddc25c03e)\n  - Fix lazy mode with React Server Components – [Details](https://github.com/parcel-bundler/parcel/commit/a76b47ec65b30cb13f649f6cab807479ca4ad139)\n  - Fix `@parcel/rsc` duplicate types – [Details](https://github.com/parcel-bundler/parcel/commit/9cb4b8660cbcd13f01e1efac88757de2bedb0895)\n  - Ensure publicUrl ends with a slash in react-static packager – [Details](https://github.com/parcel-bundler/parcel/commit/a90f06a2fb97716f01e86664b45f952648172ba3)\n  - Fix hash reference replacement in react-static packager – [Details](https://github.com/parcel-bundler/parcel/commit/4c3226fe522c8283dcf2186db8adf26eae96046b)\n\n## [2.15.2] - 2025-05-24\n\n### Fixed\n\n- Core\n\n  - Change minimum required glibc version to 2.26 – [Details](https://github.com/parcel-bundler/parcel/pull/10164)\n  - Cache inline bundle packaging – [Details](https://github.com/parcel-bundler/parcel/commit/a993f9811de6934387f2ae6c77f4e4ace038b30b)\n  - Use stable id for package requests – [Details](https://github.com/parcel-bundler/parcel/commit/afc86c24eec20a12be00be9965546595fc2c6bfc)\n\n- HTML\n  - Do not remove `<meta charset=\"utf-8\">` – [Details](https://github.com/parcel-bundler/parcel/commit/69c06862c4fdb0d9005179dc914e5da8e6d67d63)\n- MDX\n  - Make URL dependencies in MDX files optional – [Details](https://github.com/parcel-bundler/parcel/commit/67e4fe0b6666656c2913655a830bb6f50c660200)\n- React Server Components\n  - Fix memory leak in react-static packager – [Details](https://github.com/parcel-bundler/parcel/commit/638b12d8ddf7f5f833db815e832c9de5c457299e)\n- Resolver\n  - Fix resolving source package exports condition from self reference – [Details](https://github.com/parcel-bundler/parcel/commit/6820335b0f6ff77c301a26dffbed09751e80deed)\n- SVG\n  - Update oxvg – [Details](https://github.com/parcel-bundler/parcel/commit/7576cfaf38fc074533e28aab4832010496445593)\n- Compressors\n  - Use max level compression for brotli compressor – [Details](https://github.com/parcel-bundler/parcel/pull/10128)\n\n## [2.15.1] - 2025-05-15\n\n### Fixed\n\n- HTML\n\n  - Fix serializing `<template>` element contents – [Details](https://github.com/parcel-bundler/parcel/commit/e6fe231b037457cc16f9b7603836d39dfb6f91be)\n\n- JavaScript\n  - Skip optional dependencies in ESM externals – [Details](https://github.com/parcel-bundler/parcel/commit/a12ed0ce5a000bad9fb158c1b8740435784201a8)\n\n## [2.15.0] - 2025-05-11\n\n### Added\n\n- Core\n\n  - Distribute Rust binaries for each architecture as separate npm packages – [Details](https://github.com/parcel-bundler/parcel/commit/396c3941f74dc509ee7fe4c60bff8b2c7ecf78a4)\n\n- HTML and SVG\n\n  - Add Rust-based transformer/packager/optimizer for HTML and SVG – [Details](https://github.com/parcel-bundler/parcel/pull/10090)\n\n- Resolver\n  - Support `cloudflare:` scheme and no longer rewrite node: scheme – [Details](https://github.com/parcel-bundler/parcel/commit/ccd4d462f27856f9ef4adbd9ac31d0b2e8092aee)\n\n### Fixed\n\n- Core\n\n  - Avoid segmentation fault on thread exit on Linux – [Details](https://github.com/parcel-bundler/parcel/pull/10144)\n  - Support older GLIBC versions on Linux – [Details](https://github.com/parcel-bundler/parcel/pull/10145)\n\n- JavaScript\n  - Include all symbols in non-browser entries – [Details](https://github.com/parcel-bundler/parcel/commit/40ebdcd87a4bb51df3b060a05aad005595de8558)\n  - Update swc and mdx-rs – [Details](https://github.com/parcel-bundler/parcel/commit/3d72dd007ba377c037bd66ca5fa20db6e5a09fcb)\n  - Fix exporting objects with non-configurable prototypes from React Server Components – [Details](https://github.com/parcel-bundler/parcel/commit/f7d5ffd735f723f639f7cb863c899d09e95d46c9)\n\n## [2.14.4] - 2025-03-29\n\n### Fixed\n\n- Core\n\n  - Fix duplicate bundles error message – [Details](https://github.com/parcel-bundler/parcel/pull/10119)\n\n- JavaScript\n  - Support ESM externals and exports in dev packager – [Details](https://github.com/parcel-bundler/parcel/commit/424604880be6c20c1a11044bffad3fd02628d43d)\n  - Treat Deno's jsr: dependencies as external – [Details](https://github.com/parcel-bundler/parcel/commit/f08c0d60649be751c77672c1810cface016a6fcd)\n\n## [2.14.3] - 2025-03-28\n\n### Fixed\n\n- JavaScript\n  - Updated to React 19.1, which enables Server Components to be used with stable React instead of only canary – [Details](https://github.com/parcel-bundler/parcel/commit/104abbe96a1f357411bac113e821cbc0454f41a4)\n\n## [2.14.2] - 2025-03-23\n\n### Fixed\n\n- Core\n\n  - Enable resolving source field in dev dependencies – [Details](https://github.com/parcel-bundler/parcel/commit/432ee45517905d6284adfa7da42feb2ac7afaad6)\n  - Error when building a library target in serve mode – [Details](https://github.com/parcel-bundler/parcel/commit/3a566fd69830e43daa849c60b596c31dec5e3aff)\n\n- JavaScript\n\n  - Fix MDX inline assets in static RSCs – [Details](https://github.com/parcel-bundler/parcel/commit/fbcd624f4bca70b48d6c61af8c842591bb1de188)\n  - Fix symbol collection with multiple exports of same function (e.g. date-fns) – [Details](https://github.com/parcel-bundler/parcel/commit/aca7f9c89d9531580f0d6e9cd8461634c894d0dc)\n\n- REPL\n\n  - Fix error overlay resolution in REPL – [Details](https://github.com/parcel-bundler/parcel/commit/9dec3d8a5c6ff99aec83492fae8ef6b7c305dad5)\n\n- create-parcel\n  - Fix gitignore in create-parcel – [Details](https://github.com/parcel-bundler/parcel/commit/d8053053dfd7f712d85ab7d883fff603baec00a6)\n  - Fix create-parcel on windows – [Details](https://github.com/parcel-bundler/parcel/commit/02e8fa8eaed7a009cfd4d77501f6dbb18361a912)\n\n## [2.14.1] - 2025-03-19\n\n### Fixed\n\n- Resolver\n  - Fix resolving package self references – [Details](https://github.com/parcel-bundler/parcel/pull/10114)\n\n## [2.14.0] - 2025-03-18\n\n### Added\n\n- Core\n\n  - Add a CLI to create new Parcel apps – [Details](https://github.com/parcel-bundler/parcel/pull/10069)\n\n- JavaScript\n\n  - React Server Components – [Details](https://github.com/parcel-bundler/parcel/pull/10043), [Details](https://github.com/parcel-bundler/parcel/pull/10067), [Details](https://github.com/parcel-bundler/parcel/pull/10074), [Details](https://github.com/parcel-bundler/parcel/pull/10093), [Details](https://github.com/parcel-bundler/parcel/pull/10104)\n  - Add RSC-based static site generator – [Details](https://github.com/parcel-bundler/parcel/pull/10057)\n  - First-class MDX support – [Details](https://github.com/parcel-bundler/parcel/pull/10064)\n  - Merge React Refresh runtime and transformer – [Details](https://github.com/parcel-bundler/parcel/pull/10056)\n  - Modernize React error overlay – [Details](https://github.com/parcel-bundler/parcel/pull/10082)\n  - Support bundling node native modules – [Details](https://github.com/parcel-bundler/parcel/pull/10066)\n  - Use import maps for bundle manifest – [Details](https://github.com/parcel-bundler/parcel/pull/10073)\n\n- Dev Server\n  - Support running node bundles in dev server – [Details](https://github.com/parcel-bundler/parcel/pull/10055)\n  - Apply HMR updates via node worker thread – [Details](https://github.com/parcel-bundler/parcel/pull/10071)\n\n### Fixed\n\n- Core\n  - Fix dev dep request missing 'invalidateOnCreate' – [Details](https://github.com/parcel-bundler/parcel/commit/d6a4df3700bc2364eca18c25c42aa5f220c4b8db)\n  - Add napi-wasm as optional peer dependency in @parcel/rust – [Details](https://github.com/parcel-bundler/parcel/pull/10101)\n\n## [2.13.3] - 2024-12-16\n\n### Fixed\n\n- Resolver\n  - Ignore invalid package.json fields – [Details](https://github.com/parcel-bundler/parcel/pull/10053)\n\n## [2.13.2] - 2024-11-25\n\n### Fixed\n\n- JavaScript\n\n  - Fix HMR when asset is duplicated between multiple bundles – [Details](https://github.com/parcel-bundler/parcel/commit/bc43a4d9e7c6f3b2dc28bf115710fe8b2bf535cc)\n\n- SASS\n  - Fix SASS resolution with non `file:` URLs – [Details](https://github.com/parcel-bundler/parcel/commit/2a6bbc56d2ecad904a6a0dea4208b8cc6e6a3f07)\n\n## [2.13.1] - 2024-11-24\n\n### Fixed\n\n- JavaScript\n\n  - Improve HMR with dynamic imports – [Details](https://github.com/parcel-bundler/parcel/pull/10017)\n  - Update SWC – [Details](https://github.com/parcel-bundler/parcel/commit/15c77cbe7557fb441df5d0fc09dab220f55fa4db)\n\n- SASS\n  - Fix SASS resolution rules for modern API – [Details](https://github.com/parcel-bundler/parcel/pull/10018)\n\n## [2.13.0] - 2024-11-12\n\n### Added\n\n- Core\n\n  - Expose watcher ignore and watcher backend options – [Details](https://github.com/parcel-bundler/parcel/pull/9547)\n  - Improve large watcher events payload experience – [Details](https://github.com/parcel-bundler/parcel/pull/9583)\n  - Add support for globs in package.json#source – [Details](https://github.com/parcel-bundler/parcel/pull/9590)\n  - Add config key invalidation – [Details](https://github.com/parcel-bundler/parcel/pull/9597)\n\n- Bundler\n\n  - Add library bundler – [Details](https://github.com/parcel-bundler/parcel/pull/9489)\n\n- Dev Server\n\n  - Support .proxyrc.ts – [Details](https://github.com/parcel-bundler/parcel/pull/9654)\n\n- Resolver\n  - 12x faster resolver cache – [Details](https://github.com/parcel-bundler/parcel/pull/9984)\n  - Correctly handle empty resolver diagnostics array – [Details](https://github.com/parcel-bundler/parcel/pull/9407)\n\n### Fixed\n\n- Core\n\n  - Remove abortcontroller-polyfill – [Details](https://github.com/parcel-bundler/parcel/pull/9592)\n  - Fix missing content key in symbol propagation when asset is removed – [Details](https://github.com/parcel-bundler/parcel/pull/9627)\n  - Update minimum supported node version to 16 – [Details](https://github.com/parcel-bundler/parcel/pull/9645)\n  - Ensure the snapshot directory matches the watch dir – [Details](https://github.com/parcel-bundler/parcel/pull/9653)\n  - Add parcel version to PluginOptions – [Details](https://github.com/parcel-bundler/parcel/pull/9671)\n  - Fix possible race condition in the caching of request graph – [Details](https://github.com/parcel-bundler/parcel/pull/9675)\n  - Ensure empty extended config throws a diagnostic – [Details](https://github.com/parcel-bundler/parcel/pull/9701)\n  - Ensure Asset public ids are assigned deterministically – [Details](https://github.com/parcel-bundler/parcel/pull/9706)\n  - Directories ignored by watcher should be relative to the watch directory – [Details](https://github.com/parcel-bundler/parcel/pull/9703)\n  - Fix request tracker incremental cache write for new nodes – [Details](https://github.com/parcel-bundler/parcel/pull/9719)\n  - Improve request graph cache reading – [Details](https://github.com/parcel-bundler/parcel/pull/9721)\n  - Exit process with error code when reporters fail – [Details](https://github.com/parcel-bundler/parcel/pull/9735)\n  - Write tmp files to the OS tmp directory - [Details](https://github.com/parcel-bundler/parcel/pull/9580)\n  - Fix small HMR issues – [Details](https://github.com/parcel-bundler/parcel/pull/9869)\n  - Fix crash in EntryRequest with multiple globs in the source field – [Details](https://github.com/parcel-bundler/parcel/pull/9901)\n  - Revert split manifest runtime bundles – [Details](https://github.com/parcel-bundler/parcel/pull/9955)\n  - Revert chunked cache blobs for improved stability – [Details](https://github.com/parcel-bundler/parcel/pull/9965)\n  - Update dependencies – [Details](https://github.com/parcel-bundler/parcel/pull/9968)\n\n- Bundler\n\n  - Fix assets outside project root with Manual Shared Bundles – [Details](https://github.com/parcel-bundler/parcel/pull/9734)\n\n- JavaScript\n\n  - Avoid non-identifier export names in non-entry library bundles – [Details](https://github.com/parcel-bundler/parcel/pull/9587)\n  - Relax react-refresh version range – [Details](https://github.com/parcel-bundler/parcel/pull/9624)\n  - Also emit swc recoverable errors – [Details](https://github.com/parcel-bundler/parcel/pull/9650)\n  - Bump swc – [Details](https://github.com/parcel-bundler/parcel/pull/9574), [Details](https://github.com/parcel-bundler/parcel/pull/9818), [Details](https://github.com/parcel-bundler/parcel/pull/9967), [Details](https://github.com/parcel-bundler/parcel/commit/cfd26ec900b2dc8f85818d2a5a212d60b1036d39)\n  - Bump swc and browserslist-rs – [Details](https://github.com/parcel-bundler/parcel/pull/9838)\n  - Replace std::sync locks with parking_lot locks for better stability – [Details](https://github.com/parcel-bundler/parcel/pull/9731)\n  - Ensure const modules in async bundles are wrapped – [Details](https://github.com/parcel-bundler/parcel/pull/9740)\n  - Fix dev packager global reference – [Details](https://github.com/parcel-bundler/parcel/pull/9814)\n  - Fix import usage tracking for destructure defaulting – [Details](https://github.com/parcel-bundler/parcel/pull/9842)\n  - Update Node.js globals replacer to use SWC VisitMut – [Details](https://github.com/parcel-bundler/parcel/pull/9830)\n  - Update `process.env` replacer to use SWC VisitMut – [Details](https://github.com/parcel-bundler/parcel/pull/9852)\n  - Update Node.js `__filename` and `__dirname` replace to use SWC VisitMut – [Details](https://github.com/parcel-bundler/parcel/pull/9855)\n  - Fix parcelRequire being added to multi-target libraries – [Details](https://github.com/parcel-bundler/parcel/pull/9904)\n  - Handle TypeScript expressions in macro evaluator – [Details](https://github.com/parcel-bundler/parcel/commit/0bebfa6c53d0cc7b50c12a384ccc8fb13dc4de31)\n\n- Resolver\n\n  - Fix NUL byte crash in resolver – [Details](https://github.com/parcel-bundler/parcel/pull/9640)\n  - Change default resolver error message for custom specifiers – [Details](https://github.com/parcel-bundler/parcel/pull/9378)\n\n- TypeScript\n\n  - Handle dynamic import type references in TS types transformer – [Details](https://github.com/parcel-bundler/parcel/pull/9573)\n  - Correctly handle qualified names in TS types import() – [Details](https://github.com/parcel-bundler/parcel/pull/9579)\n\n- SASS\n\n  - Migrate to new sass API – [Details](https://github.com/parcel-bundler/parcel/pull/9966)\n\n- SVG\n\n  - Load svgo version from project – [Details](https://github.com/parcel-bundler/parcel/pull/9969)\n  - Update svgr and use project svgo version – [Details](https://github.com/parcel-bundler/parcel/commit/71acf875ede7dfcf3d12b8d25fd50b56339aa43a)\n\n- Image\n\n  - Bump oxipng – [Details](https://github.com/parcel-bundler/parcel/commit/6b8c8643a5f3aa44723bcde3c1318b68cd5f6999)\n\n- Vue\n\n  - Upgrade consolidate to v1 – [Details](https://github.com/parcel-bundler/parcel/pull/9570)\n\n- Web Extensions\n  - Allow both service_worker and scripts in MV3 Web Extensions – [Details](https://github.com/parcel-bundler/parcel/pull/9673)\n\n## [2.12.0] - 2024-02-28\n\n### Added\n\n- Core\n\n  - Add REPL playground for Parcel to the website – [Details](https://github.com/parcel-bundler/parcel/pull/9365)\n  - Improve package manager detection for auto install – [Details](https://github.com/parcel-bundler/parcel/pull/9505)\n\n- JavaScript\n\n  - Add support for JS macros – [Details](https://github.com/parcel-bundler/parcel/pull/9299)\n  - Statically evaluate constants referenced by macros – [Details](https://github.com/parcel-bundler/parcel/pull/9487)\n  - Upgrade to ESLint 8 – [Details](https://github.com/parcel-bundler/parcel/pull/8580)\n  - Bump swc – [Details](https://github.com/parcel-bundler/parcel/pull/9498)\n\n- CSS\n\n  - Use lightningcss to implement CSS packager – [Details](https://github.com/parcel-bundler/parcel/pull/8492)\n\n- Bundler\n\n  - Rename \"parentAsset\" to \"root\" for Manual Shared Bundle config and remove unstable prefix – [Details](https://github.com/parcel-bundler/parcel/pull/9486)\n\n- Web Extensions\n\n  - Add content script world property to manifest schema validation – [Details](https://github.com/parcel-bundler/parcel/pull/9510)\n\n- Performance\n  - Adjacency list optimizations – [Details](https://github.com/parcel-bundler/parcel/pull/9444)\n  - Break up request graph cache serialisation and run after build completion – [Details](https://github.com/parcel-bundler/parcel/pull/9384)\n\n### Fixed\n\n- Core\n\n  - Drop per-pipeline transformation cache – [Details](https://github.com/parcel-bundler/parcel/pull/9459)\n  - Clippy and use napi's Either3 – [Details](https://github.com/parcel-bundler/parcel/pull/9047)\n  - Add lazy/eager cache key to avoid invalid change when switching modes – [Details](https://github.com/parcel-bundler/parcel/pull/9518)\n\n- JavaScript\n\n  - Remove decl_collector pass and use SWC's unresolved_mark instead – [Details](https://github.com/parcel-bundler/parcel/pull/9520)\n\n- Bundler\n  - Fix multiple css bundles in entry bundle groups issue – [Details](https://github.com/parcel-bundler/parcel/pull/9023)\n  - Allow parallel type change bundles to be reused by async siblings – [Details](https://github.com/parcel-bundler/parcel/pull/9504)\n  - Skip on missing parent asset for manual shared bundles – [Details](https://github.com/parcel-bundler/parcel/pull/9538)\n\n### Unstable\n\n- Add source map support to the inline-require optimizer – [Details](https://github.com/parcel-bundler/parcel/pull/9511)\n\n## [2.11.0] - 2023-12-19\n\n### Added\n\n- Dev\n\n  - Log build phase times for dev builds [Details](https://github.com/parcel-bundler/parcel/pull/9371)\n  - Progress messages for writing to cache [Details](https://github.com/parcel-bundler/parcel/pull/9368)\n  - VSC Extension JSON schema [Details](https://github.com/parcel-bundler/parcel/pull/9386)\n  - Print phase times on development builds [Details](https://github.com/parcel-bundler/parcel/pull/9417)\n  - Publish bundle-stats-cli and parcel-query [Details](https://github.com/parcel-bundler/parcel/pull/9431)\n\n### Fixed\n\n- Dev\n\n  - Increase threshold for showing progress bar to 500k nodes [Details](https://github.com/parcel-bundler/parcel/pull/9421)\n  - Fix parcel-query [Details](https://github.com/parcel-bundler/parcel/pull/9425)\n  - FIX[dev-server]: Fix html file matching from URL [Details](https://github.com/parcel-bundler/parcel/pull/9347)\n  - Fix parcel query's inspect cache [Details](https://github.com/parcel-bundler/parcel/pull/9436)\n  - Bug fix for exiting early when identifying requestGraph in loadGraphs [Details](https://github.com/parcel-bundler/parcel/pull/9437)\n  - Fix HMR on .localhost domains [Details](https://github.com/parcel-bundler/parcel/pull/9435)\n  - Modify parcel query to not require all graphs on startup [Details](https://github.com/parcel-bundler/parcel/pull/9426)\n  - Bug fix for async Parcel-query [Details](https://github.com/parcel-bundler/parcel/pull/9442)\n  - Remove reliance on requestTracker in loadGraphs [Details](https://github.com/parcel-bundler/parcel/pull/9440)\n\n- Core\n\n  - Reduce redundancy in the RequestGraph's Request, Env, and Option nodes [Details](https://github.com/parcel-bundler/parcel/pull/9383)\n  - Move registerCoreWithSerializer to its own file [Details](https://github.com/parcel-bundler/parcel/pull/9396)\n  - Filter --expose-gc and --max-semi-space-size execArgv Node args from workers [Details](https://github.com/parcel-bundler/parcel/pull/9399)\n  - Optimize Symbol Propagation (propagateSymbolsUp) [Details](https://github.com/parcel-bundler/parcel/pull/9337)\n  - Convert Request Graph node types + request node requestTypes to numbers [Details](https://github.com/parcel-bundler/parcel/pull/9412)\n  - fsFixture: ignore empty lines in fixtures [Details](https://github.com/parcel-bundler/parcel/pull/9423)\n  - Unstable File Invalidations [Details](https://github.com/parcel-bundler/parcel/pull/9420)\n  - Configurable watch root [Details](https://github.com/parcel-bundler/parcel/pull/9424)\n\n- Resolver\n\n  - Add ~ and / support to the glob resolver [Details](https://github.com/parcel-bundler/parcel/pull/9188)\n\n- JavaScript\n\n  - Bump swc [Details](https://github.com/parcel-bundler/parcel/pull/9389)\n  - Bumping lightningcss to 1.22.1 [Details](https://github.com/parcel-bundler/parcel/pull/9401)\n  - Fix CI [Details](https://github.com/parcel-bundler/parcel/pull/9404)\n  - Change inline-requires to only run when optimizing [Details](https://github.com/parcel-bundler/parcel/pull/9403)\n  - Fix tsconfig extends from node_modules [Details](https://github.com/parcel-bundler/parcel/pull/9419)\n  - Bump some deps [Details](https://github.com/parcel-bundler/parcel/pull/9406)\n  - Bump swc and napi-rs [Details](https://github.com/parcel-bundler/parcel/pull/9408)\n  - Fix references to packages.atlassian.com [Details](https://github.com/parcel-bundler/parcel/pull/9430)\n  - Fix build-ts step [Details](https://github.com/parcel-bundler/parcel/pull/9439)\n  - Bump rimraf version to ^5.05 [Details](https://github.com/parcel-bundler/parcel/pull/9438)\n  - Use centos image with newer Node 16 [Details](https://github.com/parcel-bundler/parcel/pull/9447)\n\n## [2.10.3] - 2023-11-14\n\n### Added\n\n- Dev\n  - Added `cacheInfo` to Parcel Query - [Details](https://github.com/parcel-bundler/parcel/pull/9361)\n  - Add `parcel-link` and `parcel-unlink` dev CLIs - [Details](https://github.com/parcel-bundler/parcel/pull/8618)\n\n### Fixed\n\n- Core\n\n  - Mark previously deferred assets as dirty for symbol prop - [Details](https://github.com/parcel-bundler/parcel/pull/9369)\n  - Write bundle graph to cache if error occurs during bundling - [Details](https://github.com/parcel-bundler/parcel/pull/9366)\n  - Fixing issues when `import * as` is used with `export *` - [Details](https://github.com/parcel-bundler/parcel/pull/9331)\n  - Writing cache in chunks - [Details](https://github.com/parcel-bundler/parcel/pull/9355)\n  - Reduce redundancy in the RequestGraph's file nodes - [Details](https://github.com/parcel-bundler/parcel/pull/9360)\n  - Fix dependency retargeting with ambiguous reexports - [Details](https://github.com/parcel-bundler/parcel/pull/9380)\n\n- JavaScript\n\n  - Fixing behavior for `hasOwnProperty` in modules exporting member with same name - [Details](https://github.com/parcel-bundler/parcel/pull/9362)\n\n- WebbExtension\n\n  - Don't crash if WebExt has no content_scripts - [Details](https://github.com/parcel-bundler/parcel/pull/9341)\n\n- PostHTML, Pug, Stylus\n  - Simplified calls to `invalidateOnFileChange` - [Details](https://github.com/parcel-bundler/parcel/pull/9379)\n\n## [2.10.2] - 2023-11-01\n\n### Fixed\n\n- Core\n\n  - Use clz32 for counting trailing zeroes – [Details](https://github.com/parcel-bundler/parcel/pull/9340)\n\n- JavaScript\n  - Do not wrap duplicated assets when they are in different targets – [Details](https://github.com/parcel-bundler/parcel/pull/9348)\n\n## [2.10.1] – 2023-10-23\n\n### Fixed\n\n- Core\n\n  - Use modern node versions in CI [Details](https://github.com/parcel-bundler/parcel/pull/9323)\n  - Support multiple workspaces/clients in Parcel for VSCode [Details](https://github.com/parcel-bundler/parcel/pull/9278)\n\n- Bundler\n\n  - Make sure to set unique key [Details](https://github.com/parcel-bundler/parcel/pull/9326)\n  - Fix bundler tests assertions on Windows [Details](https://github.com/parcel-bundler/parcel/pull/9333)\n\n- JavaScript\n\n  - Add logic to disable scope hoisting if the `this` key word is pointing to an export module [Details](https://github.com/parcel-bundler/parcel/pull/9291)\n  - Detect TSC polyfills to avoid marking them as CJS [Details](https://github.com/parcel-bundler/parcel/pull/9318)\n  - Remove `this` exports tracking for files with module syntax [Details](https://github.com/parcel-bundler/parcel/pull/9330)\n  - Bump swc [Details](https://github.com/parcel-bundler/parcel/pull/9306)\n\n### Unstable\n\n- Bundler\n\n  - Fix inline constants in shared bundles [Details](https://github.com/parcel-bundler/parcel/pull/9313)\n  - Ensure manualSharedBundles have unique names [Details](https://github.com/parcel-bundler/parcel/pull/9298)\n  - Simplify MSB code for code split bundle creation section [Details](https://github.com/parcel-bundler/parcel/pull/9312)\n\n## [2.10.0] – 2023-10-11\n\n### Added\n\n- Core\n\n  - Add support for include and exclude globs for `--lazy` mode – [Details](https://github.com/parcel-bundler/parcel/pull/9166), [Details](https://github.com/parcel-bundler/parcel/pull/9260)\n  - Merge all native Rust modules into one package – [Details](https://github.com/parcel-bundler/parcel/pull/9146)\n  - Add async resolver and JS transformer functions using rayon – [Details](https://github.com/parcel-bundler/parcel/pull/9147)\n  - Support \"register\" tools in module loader (e.g. `@babel/register`, `esbuild-register`, `ts-node`) – [Details](https://github.com/parcel-bundler/parcel/pull/9285)\n  - Limit default number of JS workers to 4 to improve memory usage/performance – [Details](https://github.com/parcel-bundler/parcel/pull/9300)\n\n- Bundler\n\n  - Optimize bundler performance – [Details](https://github.com/parcel-bundler/parcel/pull/9266)\n  - Add disableSharedBundles config option – [Details](https://github.com/parcel-bundler/parcel/pull/9209)\n\n- Resolver\n\n  - Support node: prefix for CJS dependencies – [Details](https://github.com/parcel-bundler/parcel/pull/9244), [Details](https://github.com/parcel-bundler/parcel/pull/9250)\n\n- JavaScript\n\n  - Add import helper to decrease ESM loader runtime footprint – [Details](https://github.com/parcel-bundler/parcel/pull/9148)\n  - Support parallel bundle imports in libraries – [Details](https://github.com/parcel-bundler/parcel/pull/9156)\n  - Only include `globalThis` polyfill for old browsers – [Details](https://github.com/parcel-bundler/parcel/pull/9199)\n  - Updated parcelRequire.register to be minifiable – [Details](https://github.com/parcel-bundler/parcel/pull/9216)\n\n- CSS\n\n  - Add include and exclude globs for CSS modules – [Details](https://github.com/parcel-bundler/parcel/pull/9301)\n\n- WASM\n\n  - Add WASM packager with source map support – [Details](https://github.com/parcel-bundler/parcel/pull/9009)\n\n- XML\n\n  - Transform xml-stylesheet processing instructions – [Details](https://github.com/parcel-bundler/parcel/pull/9102)\n\n- Web Extensions\n\n  - Add support for Chrome Extension manifest V3 side_panel property – [Details](https://github.com/parcel-bundler/parcel/pull/9178)\n  - Improve HMR for web extensions – [Details](https://github.com/parcel-bundler/parcel/pull/9068)\n\n- Web Manifest\n  - Add support for icons in file_handlers – [Details](https://github.com/parcel-bundler/parcel/pull/9152)\n\n### Fixed\n\n- Core\n\n  - Query glibc version only once to speed up JSTransformer on Linux – [Details](https://github.com/parcel-bundler/parcel/pull/9117)\n  - Refresh cache before writing contents to bundle – [Details](https://github.com/parcel-bundler/parcel/pull/9123)\n  - Fix `--lazy` mode bugs – [Details](https://github.com/parcel-bundler/parcel/pull/9093)\n  - Ignore no-opt command line option – [Details](https://github.com/parcel-bundler/parcel/pull/9239)\n  - Bump lmdb – [Details](https://github.com/parcel-bundler/parcel/pull/9253)\n  - Don't hide error when diagnostic is malformed – [Details](https://github.com/parcel-bundler/parcel/pull/9283)\n  - Don't autoinstall local files in package manager – [Details](https://github.com/parcel-bundler/parcel/pull/9242)\n  - Fix bug with cache and glob entries – [Details](https://github.com/parcel-bundler/parcel/pull/9264)\n\n- JavaScript\n\n  - Migrate to swc_core – [Details](https://github.com/parcel-bundler/parcel/pull/9131)\n  - Move ESM loader runtime to absolute URLs – [Details](https://github.com/parcel-bundler/parcel/pull/9172)\n  - Fix duplicate asset references – [Details](https://github.com/parcel-bundler/parcel/pull/9109)\n  - Bump swc – [Details](https://github.com/parcel-bundler/parcel/pull/9200), [Details](https://github.com/parcel-bundler/parcel/pull/9234), [Details](https://github.com/parcel-bundler/parcel/pull/9271)\n  - Fix shorthand identifier import usage – [Details](https://github.com/parcel-bundler/parcel/pull/9222)\n  - Ensure nested member expressions are marked used in dev mode – [Details](https://github.com/parcel-bundler/parcel/pull/9258)\n  - Set ascii_only for swc emit – [Details](https://github.com/parcel-bundler/parcel/pull/9243)\n  - Add tests for non-identifier symbol names – [Details](https://github.com/parcel-bundler/parcel/pull/8388)\n\n- Bundler\n\n  - Exclude inline assests from parallel request limit – [Details](https://github.com/parcel-bundler/parcel/pull/9194)\n  - Fix unexpected undefined when creating shared bundles – [Details](https://github.com/parcel-bundler/parcel/pull/9195)\n\n- Images\n\n  - Bump oxipng from 6.0.0 -> 8.0.0 – [Details](https://github.com/parcel-bundler/parcel/pull/9135)\n\n- Sass\n\n  - Fix sass import edge case – [Details](https://github.com/parcel-bundler/parcel/pull/9256)\n\n- Dev Server\n  - Fix index page loading in dev server when bundle type isn't html – [Details](https://github.com/parcel-bundler/parcel/pull/9282)\n\n### Unstable\n\n- Core\n\n  - Expose unstable_transform and unstable_resolve APIs – [Details](https://github.com/parcel-bundler/parcel/pull/9193)\n\n- Bundler\n\n  - Add unstable manual shared bundles config – [Details](https://github.com/parcel-bundler/parcel/pull/9251)\n\n- JavaScript\n  - Experimental inline / deferred requires optimiser – [Details](https://github.com/parcel-bundler/parcel/pull/9221)\n  - Add constants inlining optimization – [Details](https://github.com/parcel-bundler/parcel/pull/9241)\n  - Add unstable async bundle runtime to the JS Packager – [Details](https://github.com/parcel-bundler/parcel/pull/9227)\n\n## [2.9.3] – 2023-06-24\n\n### Fixed\n\n- Resolver\n\n  - Fix the development and production package conditions – [Details](https://github.com/parcel-bundler/parcel/pull/9108)\n\n- JavaScript\n  - Update SWC to fix generics in JSX elements – [Details](https://github.com/parcel-bundler/parcel/pull/9104)\n\n## [2.9.2] - 2023-06-08\n\n### Fixed\n\n- Core\n\n  - Fix infinite loop when entries look like globs – [Details](https://github.com/parcel-bundler/parcel/pull/9020)\n  - Fix proxyrc require from path – [Details](https://github.com/parcel-bundler/parcel/pull/9069)\n\n- JavaScript\n\n  - Treat re-exports of `*` from empty files with `sideEffects: false` as ESM – [Details](https://github.com/parcel-bundler/parcel/pull/9079)\n\n- CSS\n\n  - Fix self references error in CSS module JS assets causing \"Bundle group cannot have more than one entry bundle of the same type\" – [Details](https://github.com/parcel-bundler/parcel/pull/9080)\n\n- Dev server\n\n  - Serve folder's index when requesting folder without slash – [Details](https://github.com/parcel-bundler/parcel/pull/9066)\n\n- Web extensions\n\n  - Allow source maps files in webextension – [Details](https://github.com/parcel-bundler/parcel/pull/8541)\n\n- Image\n  - Add core as peerdep to image optimizer – [Details](https://github.com/parcel-bundler/parcel/pull/9070)\n\n## [2.9.1] - 2023-06-07\n\n### Fixed\n\n- Resolver\n  - Ignore invalid package.json \"type\" field values – [Details](https://github.com/parcel-bundler/parcel/pull/9049)\n  - Ignore duplicate slashes at the start of relative path specifiers – [Details](https://github.com/parcel-bundler/parcel/pull/9048)\n\n## [2.9.0] - 2023-05-26\n\n### Added\n\n- Core\n\n  - Add support for ESM plugins and configs – [Details](https://github.com/parcel-bundler/parcel/pull/8913)\n  - Add support for local parcel plugins – [Details](https://github.com/parcel-bundler/parcel/pull/8925)\n  - Incremental Symbol Propagation for improved performance and improved export errors in development – [Details](https://github.com/parcel-bundler/parcel/pull/8723)\n  - Add support for plugin tracing, which shows where time is being spent during a Parcel build – [Details](https://github.com/parcel-bundler/parcel/pull/8695)\n  - Support `.proxyrc.cjs` config files – [Details](https://github.com/parcel-bundler/parcel/pull/8833)\n  - Add support for `loadConfig` function to resolver plugins – [Details](https://github.com/parcel-bundler/parcel/pull/8847)\n\n- Resolver\n\n  - New resolver implementation in Rust supporting package.json \"exports\" and \"imports\", and tsconfig.json \"baseUrl\", \"paths\", and \"moduleSuffixes\" – [Details](https://github.com/parcel-bundler/parcel/pull/8807)\n\n- JavaScript\n\n  - Switch to SWC minifier instead of Terser by default – [Details](https://github.com/parcel-bundler/parcel/pull/8860)\n  - Split large runtime manifest into separate bundles to reduce cache invalidations – [Details](https://github.com/parcel-bundler/parcel/pull/8837)\n  - Respect `addExternalDependency` in Babel plugins – [Details](https://github.com/parcel-bundler/parcel/pull/7820)\n\n- Bundler\n\n  - Use BitSet for bundler intersections for improved performance – [Details](https://github.com/parcel-bundler/parcel/pull/8862)\n\n- Web Extensions\n  - Add support for `chrome_style` field – [Details](https://github.com/parcel-bundler/parcel/pull/8867)\n\n### Fixed\n\n- Core\n\n  - Improve error message when bundles do not have unique file names – [Details](https://github.com/parcel-bundler/parcel/pull/8784)\n  - Bump napi-rs to latest – [Details](https://github.com/parcel-bundler/parcel/pull/8838), [Details](https://github.com/parcel-bundler/parcel/pull/8918)\n  - Fix pnpm autoinstall – [Details](https://github.com/parcel-bundler/parcel/pull/8788)\n  - Fix \"does not exports\" error for multiple assets returned by transformers – [Details](https://github.com/parcel-bundler/parcel/pull/8947)\n  - Remove v8-compile-cache – [Details](https://github.com/parcel-bundler/parcel/pull/8990)\n  - Update fast-glob – [Details](https://github.com/parcel-bundler/parcel/pull/8996)\n  - Update lmdb – [Details](https://github.com/parcel-bundler/parcel/pull/8999)\n  - Fixup DiagnosticCodeHighlight and SourceLocation columns – [Details](https://github.com/parcel-bundler/parcel/pull/8965)\n  - Bump `fastest-levenshtein` and `xmldom` dependencies – [Details](https://github.com/parcel-bundler/parcel/pull/9017)\n\n- JavaScript\n\n  - Sort global deps before injecting imports to reduce cache invalidations – [Details](https://github.com/parcel-bundler/parcel/pull/8818)\n  - Only add export setter for non-ESM exports – [Details](https://github.com/parcel-bundler/parcel/pull/8910)\n  - Bump SWC – [Details](https://github.com/parcel-bundler/parcel/pull/8881), [Details](https://github.com/parcel-bundler/parcel/pull/8933), [Details](https://github.com/parcel-bundler/parcel/pull/8983), [Details](https://github.com/parcel-bundler/parcel/pull/9010),\n    [Details](https://github.com/parcel-bundler/parcel/pull/9034)\n  - Deduplicate imports in hoist transformer – [Details](https://github.com/parcel-bundler/parcel/pull/8954)\n  - Allow buffer polyfill v5 or v6 – [Details](https://github.com/parcel-bundler/parcel/pull/8959)\n  - Fix packaging of synchronous reused bundles – [Details](https://github.com/parcel-bundler/parcel/pull/8934)\n  - Support eslint ^7.0.0 in `@parcel/validator-eslint` – [Details](https://github.com/parcel-bundler/parcel/pull/8997)\n  - Improve `inlineEnvironment` performance – [Details](https://github.com/parcel-bundler/parcel/pull/9014)\n  - Hoist exports to allow circular dependencies – [Details](https://github.com/parcel-bundler/parcel/pull/9024)\n\n- TypeScript\n\n  - Throw diagnostics as error on empty emit - [Details](https://github.com/parcel-bundler/parcel/pull/8914)\n\n- CSS\n\n  - Sort CSS module exports to reduce cache invalidations – [Details](https://github.com/parcel-bundler/parcel/pull/8817)\n\n- Bundler\n\n  - Fix missing edge error when using for multiple targets – [Details](https://github.com/parcel-bundler/parcel/pull/8854)\n  - Fix non-deterministic builds between project directories – [Details](https://github.com/parcel-bundler/parcel/pull/8869)\n  - Fix css-module related build error in bundling – [Details](https://github.com/parcel-bundler/parcel/pull/8885)\n  - Fix multiple entries pointing to wrong bundle in dist – [Details](https://github.com/parcel-bundler/parcel/pull/8991)\n\n- Dev server\n\n  - Don't error during HMR on `<link>` elements without hrefs – [Details](https://github.com/parcel-bundler/parcel/pull/8800)\n  - Improve server index file matching – [Details](https://github.com/parcel-bundler/parcel/pull/8957)\n  - Don't send HMR updates before packaging in watch mode – [Details](https://github.com/parcel-bundler/parcel/pull/9026)\n\n- Elm\n  - Fix error when formatting build errors – [Details](https://github.com/parcel-bundler/parcel/pull/8882)\n\n# [2.8.3] - 2023-01-18\n\n- Core\n  - filter out title execArgv to workers – [Details](https://github.com/parcel-bundler/parcel/pull/8719)\n- Bundler\n  - Fix CSS order when merging type change bundles – [Details](https://github.com/parcel-bundler/parcel/pull/8766)\n  - Fix assertion error when mixing CSS modules and non-modules – [Details](https://github.com/parcel-bundler/parcel/pull/8762)\n  - Fix set diff – [Details](https://github.com/parcel-bundler/parcel/pull/8699)\n  - Recursively check reachability when removing asset graphs from bundles in deduplication – [Details](https://github.com/parcel-bundler/parcel/pull/6004)\n- JavaScript\n  - Don't retarget dependencies if a symbol is imported multiple times with different local names – [Details](https://github.com/parcel-bundler/parcel/pull/8738)\n  - Fix assigning to `this` in CommonJS – [Details](https://github.com/parcel-bundler/parcel/pull/8737)\n  - Bump SWC to fix dead branch removal bug – [Details](https://github.com/parcel-bundler/parcel/pull/8742\n  - Bump swc to fix sourcemaps with Windows line endings – [Details](https://github.com/parcel-bundler/parcel/pull/8756)\n  - Add test cases for ESM initialization problems – [Details](https://github.com/parcel-bundler/parcel/pull/7350)\n- TypeScript\n  - Fix TSC sourcemaps metadata – [Details](https://github.com/parcel-bundler/parcel/pull/8734)\n- HTML\n  - Fix `srcset` parsing – [Details](https://github.com/parcel-bundler/parcel/pull/8671)\n- Dev server\n  - Apply HMR updates in topological order – [Details](https://github.com/parcel-bundler/parcel/pull/8752)\n  - Fixed the hmr connection with host 0.0.0.0 – [Details](https://github.com/parcel-bundler/parcel/pull/7357)\n\n## [2.8.2] - 2022-12-14\n\n- Core\n  - Ensure maxListeners for process.stdout accounts for workers – [Details](https://github.com/parcel-bundler/parcel/pull/8689)\n- JavaScript\n  - Bump SWC to fix scoping issue with block-less loops – [Details](https://github.com/parcel-bundler/parcel/pull/8686)\n  - Fix requires of external CommonJS SWC helpers – [Details](https://github.com/parcel-bundler/parcel/pull/8693)\n\n## [2.8.1] - 2022-12-07\n\n### Fixed\n\n- Core\n  - fix: remove @parcel/utils dep in @parcel/graph – [Details](https://github.com/parcel-bundler/parcel/pull/8630)\n- JavaScript\n  - Don't retarget dependencies with `*` – [Details](https://github.com/parcel-bundler/parcel/pull/8645)\n  - Fix overriding single export of a `export *` – [Details](https://github.com/parcel-bundler/parcel/pull/8653)\n  - Add mjs and cjs to resolver extensions – [Details](https://github.com/parcel-bundler/parcel/pull/8667)\n- TypeScript\n  - Make ts-types transformer work with TS >= 4.8 – [Details](https://github.com/parcel-bundler/parcel/pull/8661)\n- Web manifest\n  - Parse shortcut icons in web app manifests – [Details](https://github.com/parcel-bundler/parcel/pull/8660)\n- SVG\n  - Fix transformer-svg-react not finding `.svgrrc` – [Details](https://github.com/parcel-bundler/parcel/pull/7741)\n\n## [2.8.0] - 2022-11-09\n\n### Added\n\n- Core\n  - Code splitting across reexports using symbol data by splitting dependencies – [Details](https://github.com/parcel-bundler/parcel/pull/8432)\n  - Update without bundling for non-dependency related changes – [Details](https://github.com/parcel-bundler/parcel/pull/6514)\n  - Improve performance of incremental bundling – [Details](https://github.com/parcel-bundler/parcel/pull/8583)\n  - Only serialize and send shared references to workers that need them – [Details](https://github.com/parcel-bundler/parcel/pull/8589)\n  - Improve performance of HMR by not waiting for packaging – [Details](https://github.com/parcel-bundler/parcel/pull/8582)\n- JavaScript\n  - Verify version when resolving Node builtin polyfills – [Details](https://github.com/parcel-bundler/parcel/pull/8387)\n  - Add `loadBundleConfig` method to Packager plugins – [Details](https://github.com/parcel-bundler/parcel/pull/8370)\n- SVG\n  - Generate typescript for SVGs when using svgr and typescript option – [Details](https://github.com/parcel-bundler/parcel/pull/8411)\n- Bundler\n  - Move experimental bundler to default – [Details](https://github.com/parcel-bundler/parcel/pull/8607)\n\n### Fixed\n\n- Core\n  - Fix verbose warning: reexport all doesn't include default – [Details](https://github.com/parcel-bundler/parcel/pull/8451)\n  - Support multiple edge types in Graph.hasEdge – [Details](https://github.com/parcel-bundler/parcel/pull/8550)\n  - Ensure edge exists before removal in Graph.removeEdge – [Details](https://github.com/parcel-bundler/parcel/pull/8554)\n  - Disable splitting dependencies on symbols for non-scope hoisted bundles – [Details](https://github.com/parcel-bundler/parcel/pull/8565)\n  - Fix TypeScript definitions for Parcel config API – [Details](https://github.com/parcel-bundler/parcel/pull/8362)\n  - Use traverseAssets in packager to improve performance – [Details](https://github.com/parcel-bundler/parcel/pull/8592)\n  - Make uniqueKey undefined by default – [Details](https://github.com/parcel-bundler/parcel/pull/8601)\n  - Catch uncaught promise build abort race – [Details](https://github.com/parcel-bundler/parcel/pull/8600)\n  - Bump parcel dependencies – [Details](https://github.com/parcel-bundler/parcel/pull/8611)\n- JavaScript\n  - Bump SWC - [Details](https://github.com/parcel-bundler/parcel/pull/8390), [Details](https://github.com/parcel-bundler/parcel/pull/8537)\n  - Fix Chrome Android browserslist support check – [Details](https://github.com/parcel-bundler/parcel/pull/8447)\n  - Fix CommonJS symbol collection without scope hoisting – [Details](https://github.com/parcel-bundler/parcel/pull/8555)\n  - Make React Refresh debounce call on the leading edge – [Details](https://github.com/parcel-bundler/parcel/pull/8593)\n  - Retain correct dependency order between imports and reexports without scopehoisting – [Details](https://github.com/parcel-bundler/parcel/pull/8591)\n- Bundler\n  - Consider sibling in available assets to younger sibling for parallel deps – [Details](https://github.com/parcel-bundler/parcel/pull/8414)\n  - Don't merge isolated child assets – [Details](https://github.com/parcel-bundler/parcel/pull/8527)\n  - Do not merge isolated bundles in experimental bundler – [Details](https://github.com/parcel-bundler/parcel/pull/8566)\n  - Implement min bundles configuration – [Details](https://github.com/parcel-bundler/parcel/pull/8599)\n- Dev server\n  - Include `Content-Length` header in HEAD requests – [Details](https://github.com/parcel-bundler/parcel/pull/8416)\n- Vue\n  - Fix errors displaying errors when compiling Vue SFCs – [Details](https://github.com/parcel-bundler/parcel/pull/8497)\n  - Add file path to error code frames – [Details](https://github.com/parcel-bundler/parcel/pull/8499)\n  - Fix location of errors – [Details](https://github.com/parcel-bundler/parcel/pull/8501)\n- Image\n  - Upgrade sharp – [Details](https://github.com/parcel-bundler/parcel/pull/8568)\n- TypeScript\n  - Allow configuring module resolution – [Details](https://github.com/parcel-bundler/parcel/pull/8448)\n- Web extensions\n  - Fix service worker packaging in web extensions – [Details](https://github.com/parcel-bundler/parcel/pull/8424)\n\n## [2.7.0] - 2022-08-03\n\n### Added\n\n- Core\n  - Log resolved targets in verbose log level for debugging - [Details](https://github.com/parcel-bundler/parcel/pull/8254)\n  - Allow plugin configs to be written with `.cjs` extension - [Details](https://github.com/parcel-bundler/parcel/pull/8253)\n- JavaScript\n  - Support react refresh for `@emotion/react` - [Details](https://github.com/parcel-bundler/parcel/pull/8205)\n  - Inject script for hmr when there is only normal script in html - [Details](https://github.com/parcel-bundler/parcel/pull/8330)\n- Elm\n  - Add support for compiling multiple modules at once via `with` query param - [Details](https://github.com/parcel-bundler/parcel/pull/8076)\n- CSS\n  - Add support for `errorRecovery` option in `@parcel/transformer-css` - [Details](https://github.com/parcel-bundler/parcel/pull/8352)\n- Experimental bundler - [Details](https://github.com/parcel-bundler/parcel/pull/8180)\n  - Implement bundling for multiple targets\n  - Internalize async dependencies\n  - Merge bundles of the same type\n  - Fix missing module - [Details](https://github.com/parcel-bundler/parcel/pull/8303)\n\n### Fixed\n\n- JavaScript\n  - Default interop missing when importing a CommonJS module - [Details](https://github.com/parcel-bundler/parcel/pull/7991)\n  - Add missing imports for external dependencies in skipped assets - [Details](https://github.com/parcel-bundler/parcel/pull/8299)\n  - Bump SWC to fix undefined variables - [Details](https://github.com/parcel-bundler/parcel/pull/8276)\n  - Remove charset from JS loaded script to avoid double fetching in Firefox - [Details](https://github.com/parcel-bundler/parcel/pull/8346)\n  - Use placeholder expression when replacing unused symbols - [Details](https://github.com/parcel-bundler/parcel/pull/8358)\n- Core\n  - Fix atomic writestream handling on Windows - [Details](https://github.com/parcel-bundler/parcel/pull/8337)\n  - Fix non-deterministic bundle hashes between builds due to symbol propagation - [Details](https://github.com/parcel-bundler/parcel/pull/8212)\n  - Fix TypeScript types for `@parcel/package-manager` - [Details](https://github.com/parcel-bundler/parcel/pull/8293)\n- Dependencies\n  - Bump terser to 5.14.2 - [Details](https://github.com/parcel-bundler/parcel/pull/8322)\n  - Bump node-forge to 1.3.0 - [Details](https://github.com/parcel-bundler/parcel/pull/8271)\n\n## [2.6.2] - 2022-06-21\n\n### Fixed\n\n- Core\n  - Fix race condition between writing and reading from cache - [Details](https://github.com/parcel-bundler/parcel/pull/8235)\n\n## [2.6.1] - 2022-06-17\n\n### Fixed\n\n- JavaScript\n  - Fix issue with conditional dependencies based on `process.env` - [Details](https://github.com/parcel-bundler/parcel/pull/8151)\n  - Fix transformation of import/requires wrapped into `Promise.resolve()` - [Details](https://github.com/parcel-bundler/parcel/pull/8167)\n  - Fix object literal shorthand with imported variables - [Details](https://github.com/parcel-bundler/parcel/issues/7955)\n  - Fix imported values in computed optional member expressions - [Details](https://github.com/parcel-bundler/parcel/pull/8187)\n  - Bump SWC to fix issue with missing parenthesis in optional chaining call - [Details](https://github.com/parcel-bundler/parcel/pull/8200)\n  - Bump SWC to fix helper imports in Node ESM libraries - [Details](https://github.com/parcel-bundler/parcel/pull/8213)\n- Resolution\n  - Add missing `invalidateOnEnvChange` to resolver - [Details](https://github.com/parcel-bundler/parcel/pull/8103)\n  - Fix importing node_modules packages in glob resolver with sub-paths - [Details](https://github.com/parcel-bundler/parcel/pull/8169)\n  - Error when external dependencies in libraries have incompatible semver ranges - [Details](https://github.com/parcel-bundler/parcel/pull/8224)\n- Web Extensions\n  - Fix HMR for web extensions - [Details](https://github.com/parcel-bundler/parcel/pull/8145)\n  - Fix web extensions issues with Safari - [Details](https://github.com/parcel-bundler/parcel/pull/8175)\n  - Fix `declarative_net_request` property in web extension manifest - [Details](https://github.com/parcel-bundler/parcel/pull/8189)\n- Dev Server\n  - Fix browser caching issues with dev server - [Details](https://github.com/parcel-bundler/parcel/pull/8166)\n- TypeScript\n  - Fix path separators on Windows - [Details](https://github.com/parcel-bundler/parcel/pull/8149)\n- CSS\n  - Bump Parcel CSS to fix issues with `libc` field in package.json - [Details](https://github.com/parcel-bundler/parcel/pull/8220)\n- Core\n  - Fix atomic file writing race condition - [Details](https://github.com/parcel-bundler/parcel/pull/8194)\n  - Bump lmdb dependency to fix multi-threading issue - [Details](https://github.com/parcel-bundler/parcel/pull/8204)\n\n## [2.6.0] - 2022-05-25\n\n### Added\n\n- Add React error overlay to display pretty runtime errors like Create React App - [Details](https://github.com/parcel-bundler/parcel/pull/8034)\n- Support for source maps in HMR updates - [Details](https://github.com/parcel-bundler/parcel/pull/8034)\n- Support for scoping variables in CSS modules - [Details](https://github.com/parcel-bundler/parcel/pull/8122)\n- Support for custom CSS modules naming patterns - [Details](https://github.com/parcel-bundler/parcel-css/pull/180)\n- Support for node_modules packages in `@parcel/resolver-glob` - [Details](https://github.com/parcel-bundler/parcel/pull/8097)\n- Add support for defining `compilerOptions` in Vue config - [Details](https://github.com/parcel-bundler/parcel/pull/8031)\n- Add support for Vue 3 `<script setup>` - [Details](https://github.com/parcel-bundler/parcel/pull/8045)\n- Add support for gif, tiff, avif, heic, and heif images in `@parcel/transformer-image` - [Details](https://github.com/parcel-bundler/parcel/pull/8028)\n- Add support for animated images (i.e. gifs, webp, etc.) in `@parcel/transformer-image` - [Details](https://github.com/parcel-bundler/parcel/pull/8018)\n- Support for missing fields in web extensions manifest v3 - [Details](https://github.com/parcel-bundler/parcel/pull/8037), [Details](https://github.com/parcel-bundler/parcel/pull/8043)\n- Improve elm compiler error output - [Details](https://github.com/parcel-bundler/parcel/pull/7994)\n- Support for `useDefineForClassFields` option in `tsconfig.json` - [Details](https://github.com/parcel-bundler/parcel/pull/8107)\n- Add `--hmr-host` CLI option to set HMR host independently from dev server - [Details](https://github.com/parcel-bundler/parcel/pull/8101)\n\n### Fixed\n\n- Update lmdb-js. Fixes Node 18 support - [Details](https://github.com/parcel-bundler/parcel/pull/7979), [Details](https://github.com/parcel-bundler/parcel/pull/8098)\n- Update napi-rs to v2 - [Details](https://github.com/parcel-bundler/parcel/pull/7995)\n- Fix SWC targets for older browsers - [Details](https://github.com/parcel-bundler/parcel/pull/8020)\n- Add SWC error handler to fix panic during transpilation - [Details](https://github.com/parcel-bundler/parcel/pull/8032)\n- Update SWC. Fixes issue with `Symbol.toStringTag` - [Details](https://github.com/parcel-bundler/parcel/pull/8029)\n- Bump SWC to fix spreads of imported symbols - [Details](https://github.com/parcel-bundler/parcel/pull/8135)\n- Correctly emit warnings for unnecessary PostCSS plugins in package.json - [Details](https://github.com/parcel-bundler/parcel/pull/8024)\n- Fix typo in error message - [Details](https://github.com/parcel-bundler/parcel/pull/8002)\n- Remove duplicate values in graph APIs when getting connected node ids - [Details](https://github.com/parcel-bundler/parcel/pull/8054)\n- Fix Pug support in Vue files - [Details](https://github.com/parcel-bundler/parcel/pull/8051)\n- Fix `export declare` syntax in generated TypeScript definitions - [Details](https://github.com/parcel-bundler/parcel/pull/8085)\n- Preserve correct `this` for named/default imports - [Details](https://github.com/parcel-bundler/parcel/pull/7956)\n- Fix hoisting for optional chaining member expressions - [Details](https://github.com/parcel-bundler/parcel/pull/8121)\n- Fix issues with web extensions - [Details](https://github.com/parcel-bundler/parcel/pull/8000)\n- Reload the closest package.json to an asset if it's a package entry to fix `sideEffects` - [Details](https://github.com/parcel-bundler/parcel/pull/7909)\n- Only emit non static import bailout warnings for variables which correspond to a \\* import - [Details](https://github.com/parcel-bundler/parcel/pull/8136)\n\n## [2.5.0] - 2022-04-21\n\n### Added\n\n- Add support for Web Extension manifest v3 - [Details](https://github.com/parcel-bundler/parcel/pull/7050)\n- Rewrite `__dirname` and `__filename` to refer to the original path when building for Node.js targets - [Details](https://github.com/parcel-bundler/parcel/pull/7727)\n- Generate codeframe positions for JSON5 - [Details](https://github.com/parcel-bundler/parcel/pull/7933)\n- Add `$schema` support in web extension manifest - [Details](https://github.com/parcel-bundler/parcel/pull/7975)\n- Add support for `in` expressions with `process.env`, e.g. `'foo' in process.env` - [Details](https://github.com/parcel-bundler/parcel/pull/7954)\n\n### Fixed\n\n- Updated SWC. - [Details](https://github.com/parcel-bundler/parcel/pull/7886) + [Details](https://github.com/parcel-bundler/parcel/pull/7931)\n- Update Parcel CSS to v1.8.1 - [Details](https://github.com/parcel-bundler/parcel-css/releases/tag/v1.8.0) + [Details](https://github.com/parcel-bundler/parcel-css/releases/tag/v1.8.1)\n- Fix diagnostic message - [Details](https://github.com/parcel-bundler/parcel/pull/7850)\n- Disable react refresh for library targets. Fixes \"Asset was skipped or not found\" error. - [Details](https://github.com/parcel-bundler/parcel/pull/7914)\n- Don't process inline `<style>` elements as CSS modules - [Details](https://github.com/parcel-bundler/parcel/pull/7921)\n- Fix issue with multiple images in `srcset` attribute - [Details](https://github.com/parcel-bundler/parcel/pull/7918)\n- Fix peer dependencies - [Details](https://github.com/parcel-bundler/parcel/pull/7939) + [Details](https://github.com/parcel-bundler/parcel/pull/7977)\n- Scope hoisting: Fix wrapping when any ancestor asset is wrapped - [Details](https://github.com/parcel-bundler/parcel/pull/7883)\n- Scope hoisting: Don't insert unused requires that aren't registered anywhere - [Details](https://github.com/parcel-bundler/parcel/pull/7764)\n- Scope hoisting: Fix wrapped assets importing their own namespace - [Details](https://github.com/parcel-bundler/parcel/pull/7978)\n- Fix issues with resolving symbols - [Details](https://github.com/parcel-bundler/parcel/pull/7944)\n- Fix loading `.env` files when entries are specified using `\"source\"` field in package.json - [Details](https://github.com/parcel-bundler/parcel/pull/7537)\n- Correctly remove orphaned non-tree subgraphs - [Details](https://github.com/parcel-bundler/parcel/pull/7927)\n\n## [2.4.1] - 2022-03-31\n\n### Fixed\n\n- Fix `:export` in CSS modules\n- Don't remove unused classes or `@keyframes` when a CSS module is processed by postcss\n- Fix bundling issue with CSS modules where unintended side effects from a different page could be run\n- Fix crash with CSS in multiple environments\n- Update Parcel CSS. Fixes issues with `::-webkit-scrollbar`, list styles in CSS modules, `@-moz-document`, and more. See [release notes](https://github.com/parcel-bundler/parcel-css/releases/tag/v1.7.4).\n- Update SWC. Fixes an issue with parenthesized expressions following a return statement.\n\n## [2.4.0] - 2022-03-22\n\n### Added\n\n- Replace default CSS transformer and minifier with `@parcel/css` - [Details](https://github.com/parcel-bundler/parcel/pull/7821)\n- Replace `typeof` before dead code elimination to improve bundle size - [Details](https://github.com/parcel-bundler/parcel/pull/7788)\n- Human readable file size in bundle analyzer report - [Details](https://github.com/parcel-bundler/parcel/pull/7766)\n- Improve emoji support detection - [Details](https://github.com/parcel-bundler/parcel/pull/7775)\n- Enable parsing static class initialization blocks - [Details](https://github.com/parcel-bundler/parcel/pull/7839)\n- Use `PORT` environment variable from `.env` files - [Details](https://github.com/parcel-bundler/parcel/pull/7819)\n- Use new react-jsx transform in React 16.14.0 - [Details](https://github.com/parcel-bundler/parcel/pull/7728)\n- Use relative path for bundle labels in bundle analysis - [Details](https://github.com/parcel-bundler/parcel/pull/7737)\n- Load dynamic imports at higher network priority in non-ESM builds - [Details](https://github.com/parcel-bundler/parcel/pull/7061)\n\n### Fixed\n\n- Pin lmdb to 2.2.3 - [Details](https://github.com/parcel-bundler/parcel/pull/7763)\n- Prevent term-size from being bundled - [Details](https://github.com/parcel-bundler/parcel/pull/7750)\n- Fix cache when non-ascii chars are used in path - [Details](https://github.com/parcel-bundler/parcel/pull/7797)\n- Bump SWC. Fixes issue with `String` constructor. - [Details](https://github.com/parcel-bundler/parcel/pull/7777)\n- Fix DCE with PURE comments - [Details](https://github.com/parcel-bundler/parcel/pull/7833)\n- Escape double quote of url value in CSS `url()` - [Details](https://github.com/parcel-bundler/parcel/pull/7718)\n- Fix documentation comment in API - [Details](https://github.com/parcel-bundler/parcel/pull/7689)\n- Fix package.json `source` field resolution with pnpm - [Details](https://github.com/parcel-bundler/parcel/pull/7846)\n- Fix `errors.map is not a function` - [Details](https://github.com/parcel-bundler/parcel/pull/7672)\n\n## [2.3.1] - 2022-02-09\n\n## Fixed\n\n- Add diagnostic for failed autoinstall of node polyfill - [Details](https://github.com/parcel-bundler/parcel/pull/7682)\n\n## [2.3.0] - 2022-02-09\n\n## Added\n\n- Reduce the number of npm dependencies needed by parcel [Details](https://github.com/parcel-bundler/parcel/pull/7576)\n- Support React 18 prereleases and experimental versions with automatic JSX runtime - [Details](https://github.com/parcel-bundler/parcel/pull/7642)\n\n## Fixed\n\n- Fix `@swc/helpers` in non-module scripts - [Details](https://github.com/parcel-bundler/parcel/pull/7599)\n- Fix auto installing dependencies in PNPM monorepos - [Details](https://github.com/parcel-bundler/parcel/pull/7566)\n\n## [2.2.1] - 2022-01-17\n\n### Fixed\n\n- Fix background image data urls missing quotes - [Details](https://github.com/parcel-bundler/parcel/pull/7564)\n- Fix development builds not downleveling nested selectors with `@parcel/css`. Now Parcel has default modern browser targets. - [Details](https://github.com/parcel-bundler/parcel/pull/7564)\n- Upgrades htmlnano to v2 to remove uncss which had a dependency on a vulnerable old version of PostCSS - [Details](https://github.com/parcel-bundler/parcel/pull/7564)\n- Upgrades postcss-modules and removes css-module-loader-core with old PostCSS dependencies - [Details](https://github.com/parcel-bundler/parcel/pull/7564)\n- Upgrade Vue compiler - [Details](https://github.com/parcel-bundler/parcel/pull/7564)\n- Upgrade SVGR to v6 - [Details](https://github.com/parcel-bundler/parcel/pull/7564)\n- Upgrade JSON5 to v2 - [Details](https://github.com/parcel-bundler/parcel/pull/7564)\n- Don't discard invalidations when transformer throws an error - [Details](https://github.com/parcel-bundler/parcel/pull/7547)\n\n## [2.2.0] - 2022-01-12\n\n### Added\n\n- New `@parcel/transformer-css-experimental` plugin, which is powered by [@parcel/css](https://github.com/parcel-bundler/parcel-css) - [Details](https://github.com/parcel-bundler/parcel/pull/7538)\n\n### Fixed\n\n- Updated `node-forge` to 1.0.0 to fix security vulnerability\n\n## [2.1.1] - 2022-01-06\n\n### Fixed\n\n- Do not transpile @swc/helpers. Fixes infinite recursion in typeof helper. - [Details](https://github.com/parcel-bundler/parcel/pull/7529)\n- Include invalidation hash in asset content keys - [Details](https://github.com/parcel-bundler/parcel/pull/7526)\n- Fix loading index.html in dev server when packager/optimizer changes bundle type - [Details](https://github.com/parcel-bundler/parcel/pull/7527)\n\n## [2.1.0] - 2022-01-05\n\n### Added\n\n- Enable transpiling node_modules by default - [Details](https://github.com/parcel-bundler/parcel/pull/7399)\n- Rewrite core graph data structure to be backed by SharedArrayBuffer - [Details](https://github.com/parcel-bundler/parcel/pull/6922)\n- Statically analyze symbols and enable deferred compilation of re-exported modules in development - [Details](https://github.com/parcel-bundler/parcel/pull/7222)\n- Store large blobs as separate files in the cache rather than in LMDB - [Details](https://github.com/parcel-bundler/parcel/pull/7198)\n- Add `@parcel/optimizer-css` for new work in progress CSS minifier - [Details](https://github.com/parcel-bundler/parcel/pull/7340)\n- Add `@parcel/bundler-experimental`, a much faster work in progress rewrite of Parcel's bundling algorithm - [Details](https://github.com/parcel-bundler/parcel/pull/6975)\n- Support `href` attribute in SVG `<image>` tags within HTML - [Details](https://github.com/parcel-bundler/parcel/pull/7482)\n- Throw diagnostic with code frame when loading JSON5 configs - [Details](https://github.com/parcel-bundler/parcel/pull/7451)\n\n### Fixed\n\n- Fix HMR behavior with CSS Modules - [Details](https://github.com/parcel-bundler/parcel/pull/7434)\n- Fix HMR full page reload when not accepted - [Details](https://github.com/parcel-bundler/parcel/pull/7514)\n- Fix HMR when an asset has multiple ancestries - [Details](https://github.com/parcel-bundler/parcel/pull/7514)\n- Fix source maps in `@parcel/transformer-typescript-tsc` - [Details](https://github.com/parcel-bundler/parcel/pull/7287)\n- Fix TypeScript module augmentation in `@parcel/transformers-typescript-types` - [Details](https://github.com/parcel-bundler/parcel/pull/7315)\n- Fix TypeScript type generation when tsconfig's \"incremental\" option is true - [Details](https://github.com/parcel-bundler/parcel/pull/7352)\n- Fix `createImportSpecifier` with TypeScript 4.5+ - [Details](https://github.com/parcel-bundler/parcel/pull/7426)\n- Fix error on re-exported type when building TypeScript definitions - [Details](https://github.com/parcel-bundler/parcel/pull/7424)\n- Fix error when displaying \"does not export\" errors - [Details](https://github.com/parcel-bundler/parcel/pull/7295)\n- Ensure \"does not export\" error is shown during cached builds - [Details](https://github.com/parcel-bundler/parcel/pull/7337)\n- Fix glob matching in package.json `\"sideEffects\"` field - [Details](https://github.com/parcel-bundler/parcel/pull/7288)\n- Fix `semver` dependency version range - [Details](https://github.com/parcel-bundler/parcel/pull/7334)\n- Do not error on external Node builtins in libraries - [Details](https://github.com/parcel-bundler/parcel/pull/7348)\n- Reject browser js loader promise with `Error` object - [Details](https://github.com/parcel-bundler/parcel/pull/7236)\n- Show diagnostics for Elm compiler errors - [Details](https://github.com/parcel-bundler/parcel/pull/7326)\n- Don't fail build on empty dependency attributes in HTML - [Details](https://github.com/parcel-bundler/parcel/pull/7318)\n- Fix require statements with plain template literals - [Details](https://github.com/parcel-bundler/parcel/pull/7369)\n- Update `lmdb-store` to v2 - [Details](https://github.com/parcel-bundler/parcel/pull/7364)\n- Bump swc - [Details](https://github.com/parcel-bundler/parcel/pull/7394)\n- Correctly pad numbers in `@parcel/hash` browser polyfill - [Details](https://github.com/parcel-bundler/parcel/pull/7415)\n- Upstream some changes from the REPL - [Details](https://github.com/parcel-bundler/parcel/pull/7208)\n- Allow empty string in TOML config - [Details](https://github.com/parcel-bundler/parcel/pull/7418)\n- Make `BundleGraph#getReferencedBundle` faster - [Details](https://github.com/parcel-bundler/parcel/pull/7416)\n- Workaround segfault with old glibc versions on CentOS 7 - [Details](https://github.com/parcel-bundler/parcel/pull/7457)\n- Use modern JSX runtime when React is aliased to Preact - [Details](https://github.com/parcel-bundler/parcel/pull/7435)\n- Fix React version check when dependency is a URL - [Details](https://github.com/parcel-bundler/parcel/pull/7484)\n- Sync peer dependency versions when releasing Parcel - [Details](https://github.com/parcel-bundler/parcel/pull/7489)\n- Fix Tailwind in SASS - [Details](https://github.com/parcel-bundler/parcel/pull/7448)\n- Don't run Gzip and Brotli compressors in development - [Details](https://github.com/parcel-bundler/parcel/pull/7510)\n- Use level 9 Zlib compression by default - [Details](https://github.com/parcel-bundler/parcel/pull/7513)\n\n## [2.0.1] - 2021-11-08\n\n### Fixed\n\n- Don't load PostCSS and PostHTML config when inside node_modules - [Details](https://github.com/parcel-bundler/parcel/pull/7088)\n- Fix unknown language in Vue templates with external scripts/styles - [Details](https://github.com/parcel-bundler/parcel/pull/7056)\n- Fix \"Callback must be a function\" error when auto installing - [Details](https://github.com/parcel-bundler/parcel/pull/7103)\n- Fix issue with named imports and object properties of the same name - [Details](https://github.com/parcel-bundler/parcel/issues/7094) and [follow up](https://github.com/parcel-bundler/parcel/pull/7228)\n- Bump SWC - [Details](https://github.com/parcel-bundler/parcel/pull/7114)\n- Fix issue with `@tailwindcss/forms` and PostCSS nodes missing a `source` property - [Details](https://github.com/parcel-bundler/parcel/pull/7079)\n- Fix issue with ESM default interop and `new` expressions - [Details](https://github.com/parcel-bundler/parcel/pull/7113)\n- Support `.yml` for YAML files, in addition to `.yaml` - [Details](https://github.com/parcel-bundler/parcel/pull/7192)\n- Log warning instead of crash if image optimizer fails - [Details](https://github.com/parcel-bundler/parcel/pull/7119)\n- Add missing dependency to `@parcel/config-webextension` - [Details](https://github.com/parcel-bundler/parcel/pull/7193)\n- Update package.json to include the repository - [Details](https://github.com/parcel-bundler/parcel/pull/7184)\n- Fix serve mode with target override and target source fields [Details](https://github.com/parcel-bundler/parcel/pull/7187)\n- Improve performance of webpack loader detection, which affected large data urls - [Details](https://github.com/parcel-bundler/parcel/pull/7226)\n- Update SWC to properly retain `this` context - [Details](https://github.com/parcel-bundler/parcel/pull/7216)\n- Sync `engines.parcel` with core version when releasing nightlies - [Details](https://github.com/parcel-bundler/parcel/pull/7207)\n- Fix export in TypeScript type definitions for `@parcel/core` - [Details](https://github.com/parcel-bundler/parcel/pull/7250)\n- Add missing dependency on `@parcel/diagnostic` to `@parcel/transformer-typescript-types` - [Details](https://github.com/parcel-bundler/parcel/pull/7248)\n- Resolve GLSL relative to the importer, not the asset - [Details](https://github.com/parcel-bundler/parcel/pull/7263)\n\n### Experiments\n\n- Update esbuild dependency in `@parcel/optimizer-esbuild` plugin - [Details](https://github.com/parcel-bundler/parcel/pull/7233)\n- Add experimental `@parcel/optimizer-swc` plugin - [Details](https://github.com/parcel-bundler/parcel/pull/7212)\n\n## [2.0.0] - 2021-10-13\n\nSee the [blog post](https://parceljs.org/blog/v2/).\n\n## [1.12.3] - 2019-03-20\n\n- Downgrade all internal Babel packages to `<7.4.0` because of bugs in that release.\n\n## [1.12.2] - 2019-03-13\n\n- Fix depth option for detailed report\n\n## [1.12.1] - 2019-03-12\n\n### Fixed\n\n- Correctly build dependency URLs (for CSS) [Details](https://github.com/parcel-bundler/parcel/pull/2740)\n- Fix bug with original null mappings [Details](https://github.com/parcel-bundler/parcel/pull/2748)\n- Regenerate all bundles and trigger an HMR page reload when a new bundle is created [Details](https://github.com/parcel-bundler/parcel/pull/2762)\n- Unescaped \".\" in regex for JSAsset [Details](https://github.com/parcel-bundler/parcel/pull/2759)\n- Open the specified host [Details](https://github.com/parcel-bundler/parcel/pull/2763)\n\n## [1.12.0] - 2019-03-06\n\n### Added\n\n- CSS/Sass/LESS sourcemaps [Details](https://github.com/parcel-bundler/parcel/pull/2489)\n- Add Markdown support [Details](https://github.com/parcel-bundler/parcel/pull/2538)\n- Unhandled HMR updates should cause a page reload [Details](https://github.com/parcel-bundler/parcel/pull/2676)\n- Enables jsx plugin in case jsx syntax is used in js files [Details](https://github.com/parcel-bundler/parcel/pull/2530)\n- Add disabling of autoinstall globally via environment variable [Details](https://github.com/parcel-bundler/parcel/pull/2152)\n- Add support for `chrome-extension://` protocol to bundle-url.js [Details](https://github.com/parcel-bundler/parcel/pull/2434)\n- Add support for Firefox's 'moz-extension://' protocol, to bundle-url.js [Details](https://github.com/parcel-bundler/parcel/pull/2465)\n- Generate source map files with long extensions (e.g. .js.map) [Details](https://github.com/parcel-bundler/parcel/pull/2472)\n- upgrade htmlnano dep [Details](https://github.com/parcel-bundler/parcel/pull/2506)\n- Default port to process.env.PORT [Details](https://github.com/parcel-bundler/parcel/pull/2559)\n- Inline process.browser for better code elimination [Details](https://github.com/parcel-bundler/parcel/pull/2583)\n- Detect files added to/removed from directories. [Details](https://github.com/parcel-bundler/parcel/pull/2615)\n- Implement depth option for detailed report [Details](https://github.com/parcel-bundler/parcel/pull/2466)\n\n### Fixed\n\n- Resolve package.browser in subfolders (with backslashes) [Details](https://github.com/parcel-bundler/parcel/pull/2445)\n- fix chokidar ignored regex [Details](https://github.com/parcel-bundler/parcel/pull/2479)\n- Defer throwing asset errors until after dependencies are handled. [Details](https://github.com/parcel-bundler/parcel/pull/2475)\n- fix(sourcemaps): Handle null mappings properly [Details](https://github.com/parcel-bundler/parcel/pull/2149)\n- Use Buffer.from [Details](https://github.com/parcel-bundler/parcel/pull/2512)\n- addURLDependency: use always relative path [Details](https://github.com/parcel-bundler/parcel/pull/2518)\n- reexporting + renaming when scopehoisting [Details](https://github.com/parcel-bundler/parcel/pull/2491)\n- Fix and re-enable windows scope-hoisting tests [Details](https://github.com/parcel-bundler/parcel/pull/2537)\n- Fix for typescript asset invalidation [Details](https://github.com/parcel-bundler/parcel/pull/2485)\n- Fix hang up when a lot of parallel operation request the file system [Details](https://github.com/parcel-bundler/parcel/pull/2452)\n- Fix localRequire with package/path requests [Details](https://github.com/parcel-bundler/parcel/pull/2425)\n- Refactor htmlnano tests to test for filesize [Details](https://github.com/parcel-bundler/parcel/pull/2591)\n- pug Deprecated pretty [Details](https://github.com/parcel-bundler/parcel/pull/2582)\n- Fix pug test [Details](https://github.com/parcel-bundler/parcel/pull/2600)\n- Use the test to assert this.child.killed rather than checking time difference [Details](https://github.com/parcel-bundler/parcel/pull/2612)\n- Improve tests: symlink tests, Kotlin tests, and maybe test-util module [Details](https://github.com/parcel-bundler/parcel/pull/2605)\n- Handle empty html files [Details](https://github.com/parcel-bundler/parcel/pull/2621)\n- Fix HTMLAsset dependency tag with empty src value [Details](https://github.com/parcel-bundler/parcel/pull/2553)\n- Allow dotfiles to be served [Details](https://github.com/parcel-bundler/parcel/pull/2641)\n- Fix sourceMappingURL for bundles with multiple entry points [Details](https://github.com/parcel-bundler/parcel/pull/2645)\n- Fix absolute path importing in sass [Details](https://github.com/parcel-bundler/parcel/pull/2432)\n- Fix dependency list parsing in RustAsset for paths on Windows [Details](https://github.com/parcel-bundler/parcel/pull/2651)\n- For scope hoisting, Asset IDs cannot contain + or / (base64) [Details](https://github.com/parcel-bundler/parcel/pull/2681)\n- Send CORS headers when a file does not exist [Details](https://github.com/parcel-bundler/parcel/pull/2669)\n- Prevent circular deps from causing a stack overflow in HMR runtime [Details](https://github.com/parcel-bundler/parcel/pull/2660)\n- Fix postcss modules composes imports [Details](https://github.com/parcel-bundler/parcel/pull/2642)\n- fix: set default pragmaFrag option for JSX [Details](https://github.com/parcel-bundler/parcel/pull/2486)\n- Remove unnecessary return await [Details](https://github.com/parcel-bundler/parcel/pull/2705)\n- Fix scopehositing with nested dynamic imports [Details](https://github.com/parcel-bundler/parcel/pull/2712)\n- eslint: enable no-return-await [Details](https://github.com/parcel-bundler/parcel/pull/2707)\n- Throw meaningful error on undefined exports [Details](https://github.com/parcel-bundler/parcel/pull/2693)\n- Add helpful plugin errors [Details](https://github.com/parcel-bundler/parcel/pull/2691)\n- Fix HMR failure with js error on load [Details](https://github.com/parcel-bundler/parcel/pull/2531)\n\n## [1.11.0] - 2018-12-18\n\n### Added\n\n- Add Kotlin asset support [Details](https://github.com/parcel-bundler/parcel/pull/2210)\n- Add --host option [Details](https://github.com/parcel-bundler/parcel/pull/2181)\n- Add support for HMR with elm-hot [Details](https://github.com/parcel-bundler/parcel/pull/2388)\n- Log dev server access for log level verbose or more [Details](https://github.com/parcel-bundler/parcel/pull/2402)\n- Process array of assets for JSON-LD [Details](https://github.com/parcel-bundler/parcel/pull/2319)\n- Extract workerfarm into separate package [Details](https://github.com/parcel-bundler/parcel/pull/2162)\n- Extract Logger into its own package [Details](https://github.com/parcel-bundler/parcel/pull/2165)\n- Extract watcher into its own package [Details](https://github.com/parcel-bundler/parcel/pull/2176)\n- Merge fs-watcher-child into Parcel's monorepo [Details](https://github.com/parcel-bundler/parcel/pull/2197)\n\n### Fixed\n\n- Use this.write and super.end for JSPackager [Details](https://github.com/parcel-bundler/parcel/pull/2126)\n- Make dynamic import name relative to the file importing it [Details](https://github.com/parcel-bundler/parcel/pull/2174)\n- update postcss and deps [Details](https://github.com/parcel-bundler/parcel/pull/2203)\n- catch css file not found [Details](https://github.com/parcel-bundler/parcel/pull/2206)\n- Treat webmanifest as an entry module [Details](https://github.com/parcel-bundler/parcel/pull/2254)\n- add debugger flag for non production builds in Elm [Details](https://github.com/parcel-bundler/parcel/pull/2225)\n- refactor: JSON.stringify replacer can not be boolean [Details](https://github.com/parcel-bundler/parcel/pull/2276)\n- Fix debug log files for certain locales [Details](https://github.com/parcel-bundler/parcel/pull/2288)\n- Scope hoisting renaming after babel transforms [Details](https://github.com/parcel-bundler/parcel/pull/2292)\n- Switch from toml to @iarna/toml [Details](https://github.com/parcel-bundler/parcel/pull/2298)\n- Update deasync to 0.1.14 (Node 11 fix) [Details](https://github.com/parcel-bundler/parcel/pull/2337)\n- Skip external imports from processing [Details](https://github.com/parcel-bundler/parcel/pull/2380)\n- Don't lowercase attributes in html files [Details](https://github.com/parcel-bundler/parcel/pull/2367)\n- refactor: remove unnecessary not null check [Details](https://github.com/parcel-bundler/parcel/pull/2349)\n- Don't cache dynamic bundles that had a network error [Details](https://github.com/parcel-bundler/parcel/pull/2400)\n- Treeshake functions properly [Details](https://github.com/parcel-bundler/parcel/pull/2418)\n- Fix autoinstall of cssnano [Details](https://github.com/parcel-bundler/parcel/pull/2415)\n- Fix server when there is a dot in the path [Details](https://github.com/parcel-bundler/parcel/pull/2429)\n\n## [1.10.3] - 2018-10-11\n\n### Fixed\n\n- Don't dedupe assets that are depended on in more than one bundle [Details](https://github.com/parcel-bundler/parcel/pull/2122)\n\n## [1.10.2] - 2018-10-06\n\n### Added\n\n- Add `<image>` as a valid element type to bundle in `<svg>` tags [Details](https://github.com/parcel-bundler/parcel/pull/2113)\n- Resolving `.postcssrc.json` as a PostCSS config [Details](https://github.com/parcel-bundler/parcel/pull/2115)\n- Add loaders when bundling workers [Details](https://github.com/parcel-bundler/parcel/pull/2092)\n\n### Fixed\n\n- Fix hoist of modules with multiple aliases [Details](https://github.com/parcel-bundler/parcel/pull/2077)\n- Fix hoisting of optional require calls [Details](https://github.com/parcel-bundler/parcel/pull/2078)\n- Fix safari 10 compatibility for terser [Details](https://github.com/parcel-bundler/parcel/pull/2103)\n- Fix HMR for Pug assets [Details](https://github.com/parcel-bundler/parcel/pull/2091)\n- Don't load existing sourcemaps if sourcemaps are disabled [Details](https://github.com/parcel-bundler/parcel/pull/2089)\n- add missing --no-autoinstall flag to build command [Details](https://github.com/parcel-bundler/parcel/pull/2076)\n\n## [1.10.1] - 2018-09-26\n\n### Fixed\n\n- Fix error when node.id is undefined instead of null\n\n## [1.10.0] - 2018-09-25\n\n### Added\n\n- Babel 7 support [Details](https://github.com/parcel-bundler/parcel/pull/1955)\n- HTML Bundle loader [Details](https://github.com/parcel-bundler/parcel/pull/1732)\n- Process inline scripts and styles [Details](https://github.com/parcel-bundler/parcel/pull/1456)\n- Added LD+JSON asset [Details](https://github.com/parcel-bundler/parcel/pull/1936)\n- Add support for Elm assets [Details](https://github.com/parcel-bundler/parcel/pull/1968)\n- Support optionally bundling node_modules for `--target=node` [Details](https://github.com/parcel-bundler/parcel/pull/1690)\n- Import existing sourcemaps [Details](https://github.com/parcel-bundler/parcel/pull/1349)\n- Import GraphQL files from other GraphQL files [Details](https://github.com/parcel-bundler/parcel/pull/1892)\n- Automatically strip flow types [Details](https://github.com/parcel-bundler/parcel/pull/1864)\n- SugarSS Support [Details](https://github.com/parcel-bundler/parcel/pull/1941)\n- Minimal verbose/debug mode [Details](https://github.com/parcel-bundler/parcel/pull/1834)\n- User friendly error on failed entrypoint resolving [Details](https://github.com/parcel-bundler/parcel/pull/1848)\n- Support for SharedWorkers [Details](https://github.com/parcel-bundler/parcel/pull/1907)\n- Add Object Spread to default Babel transforms [Details](https://github.com/parcel-bundler/parcel/pull/1835)\n- Update help message for `--public-url` [Details](https://github.com/parcel-bundler/parcel/pull/1846)\n- Support HTML5 history mode routing [Details](https://github.com/parcel-bundler/parcel/pull/1788)\n- Split cache into multiple folders for faster FS [Details](https://github.com/parcel-bundler/parcel/pull/1322)\n- Support array in package.json's sideEffects property [Details](https://github.com/parcel-bundler/parcel/pull/1766)\n- Added stub for require.cache [Details](https://github.com/parcel-bundler/parcel/pull/1960)\n- Added dotenv-expand to expand env vars [Details](https://github.com/parcel-bundler/parcel/pull/2014)\n- Update Typescript to v3.0.0 [Details](https://github.com/parcel-bundler/parcel/pull/1840)\n- Add `--no-content-hash` option to build cli [Details](https://github.com/parcel-bundler/parcel/pull/1934)\n\n### Fixed\n\n- Exit process on Error [Details](https://github.com/parcel-bundler/parcel/pull/1933)\n- Fix non updating asset hashes [Details](https://github.com/parcel-bundler/parcel/pull/1861)\n- Fix Sass url resolving [Details](https://github.com/parcel-bundler/parcel/pull/1909)\n- WorkerFarm Cleanup [Details](https://github.com/parcel-bundler/parcel/pull/1918)\n- Fix infinite loop in resolver when using `~/...` imports [Details](https://github.com/parcel-bundler/parcel/pull/1881)\n- Default to Dart-Sass and add backwards compatibility for node-sass [Details](https://github.com/parcel-bundler/parcel/pull/1847)\n- Validate if a PostCSS config is an object [Details](https://github.com/parcel-bundler/parcel/pull/1862)\n- VSCode syntax highlight with PostCSS in Vue Component style tag [Details](https://github.com/parcel-bundler/parcel/pull/1897)\n- Glob support in less imports [Details](https://github.com/parcel-bundler/parcel/pull/1845)\n- Generate unique certificate serial number [Details](https://github.com/parcel-bundler/parcel/pull/1830)\n- Keep name in sourcemaps mappings [Details](https://github.com/parcel-bundler/parcel/pull/1804)\n- Replace slack with spectrum badge [Details](https://github.com/parcel-bundler/parcel/pull/1785)\n- Use esnext with typescript and scope hoisting [Details](https://github.com/parcel-bundler/parcel/pull/1781)\n- Fix sourcemaps failing on refresh/hmr [Details](https://github.com/parcel-bundler/parcel/pull/1755)\n- Support sideEffect: false with CommonJS [Details](https://github.com/parcel-bundler/parcel/pull/1770)\n- Get only existing package main [Details](https://github.com/parcel-bundler/parcel/pull/1577)\n- Load minified built-in if available [Details](https://github.com/parcel-bundler/parcel/pull/1749)\n- Support error strings in workers [Details](https://github.com/parcel-bundler/parcel/pull/1761)\n- Terminate workerfarm when using the API [Details](https://github.com/parcel-bundler/parcel/pull/1760)\n- Fix comment typo [Details](https://github.com/parcel-bundler/parcel/pull/1739/files)\n- Fix dotenv package error [Details](https://github.com/parcel-bundler/parcel/pull/1953)\n- Don't resolve slash and tilde paths twice [Details](https://github.com/parcel-bundler/parcel/pull/1993)\n- bundle name hash-key generation is not environment independent [Details](https://github.com/parcel-bundler/parcel/pull/2002)\n- Don't modify script nodes with text/html type [Details](https://github.com/parcel-bundler/parcel/pull/1924)\n- Fix various windows bugs & tests [Details](https://github.com/parcel-bundler/parcel/pull/1965)\n- Cross-platform deterministic asset ids [Details](https://github.com/parcel-bundler/parcel/pull/2020)\n- allow empty string in meta [Details](https://github.com/parcel-bundler/parcel/pull/2027)\n- fixed watch not working when NODE_ENV is production [Details](https://github.com/parcel-bundler/parcel/pull/2024)\n- Incorrect casing for Logger require [Details](https://github.com/parcel-bundler/parcel/pull/2021)\n- fix security vuln [Details](https://github.com/parcel-bundler/parcel/pull/1794)\n- Remove wasm-gc from RustAsset [Details](https://github.com/parcel-bundler/parcel/pull/2048)\n\n## [1.9.7] - 2018-07-15\n\n### Fixed\n\n- Fix nested async imports from a shared module [Details](https://github.com/parcel-bundler/parcel/pull/1724)\n- Prevent nameclashes with internal variables with tree shaking [Details](https://github.com/parcel-bundler/parcel/pull/1737)\n\n## [1.9.6] - 2018-07-11\n\n### Fixed\n\n- Fix ora spinner in CI environments [Details](https://github.com/parcel-bundler/parcel/commit/8670fd6962b0813f6cf82bc6a6e5430376ffc037)\n\n## [1.9.5] - 2018-07-11\n\n### Added\n\n- Use fast-glob [Details](https://github.com/parcel-bundler/parcel/commit/06fb3c807218d0ee40446f56d4fb12c280894756)\n- Use user installation of `cssnano` [Details](https://github.com/parcel-bundler/parcel/commit/8cee316877d65ec8c1e57bee2e25630db0cad1fa)\n- Upgrade to cssnano v4 [Details](https://github.com/parcel-bundler/parcel/commit/5e924b466d5998a20afd2e8290f67878511f4cb7)\n- Logger improvements [Details](https://github.com/parcel-bundler/parcel/commit/c96612087e4dc6576b2cc5367ff0e66219f7147a)\n- Watch PostHTML plugins dependencies [Details](https://github.com/parcel-bundler/parcel/commit/038ade609e8dcd89ac21548adea541ca99e6a7ba)\n- Add support for node 10 [Details](https://github.com/parcel-bundler/parcel/commit/cae25f6fc0f1d35de39b1d5603094b784e8ecd9e)\n- Workerfarm improvements [Details](https://github.com/parcel-bundler/parcel/commit/7b38f4f2c2b1d426131335b56f7bc50b8230c53c)\n- Use minify prelude only minify option [Details](https://github.com/parcel-bundler/parcel/commit/b52548b02e47215e668e509919e8fd962141e8a9)\n- Deterministic asset ids [Details](https://github.com/parcel-bundler/parcel/commit/e34a4d097ef0624890589f471e4a977367da568a)\n\n### Fixed\n\n- JSPackager deduplication now accounts for differences in absolute dependency paths [Details](https://github.com/parcel-bundler/parcel/commit/f699e812eab5276af22052f3ace1e4fd651f4f72)\n- Fix worker bundle hoisting [Details](https://github.com/parcel-bundler/parcel/commit/1ab05580396774f44b587d8ec3dc2d12ca13c2a0)\n- Prioritize browser field over module [Details](https://github.com/parcel-bundler/parcel/commit/96856bacd75bedcf1a09e89a66ee7083d8e069d0)\n- Fix aliasing of folder relative to project folder [Details](https://github.com/parcel-bundler/parcel/commit/69b64cc76530ea038f54bda239b1d271c6a09562)\n- Only watch directories on macOS [Details](https://github.com/parcel-bundler/parcel/commit/57f4c4592dcfc008bbdc107386f3448c2e75e820)\n- Fix generating names when outside of the entry directory [Details](https://github.com/parcel-bundler/parcel/commit/2bc6ed9ab63a35533c1637f558f64253defd789b)\n- Handle invalidating cache if dependency is a glob [Details](https://github.com/parcel-bundler/parcel/commit/ec3aea90dc5c122184e24a4f57e25dbaa99a8935)\n- Fix import deep wildcards with tree-shaking [Details](https://github.com/parcel-bundler/parcel/commit/23ee7c2a5ff806aac605a2bca95ac48310ef9a11)\n- Fix tree-shaking named import on wrapped module [Details](https://github.com/parcel-bundler/parcel/commit/a42dfeba6f79175028a7227c920b18d21271066a)\n- Fix circular deps in isolated bundles (e.g. workers) [Details](https://github.com/parcel-bundler/parcel/commit/f2deb5cbbdf1381b6202d56e3884e14423bd860c)\n- Fix tree-shaking wildcards with sideEffects: false [Details](https://github.com/parcel-bundler/parcel/commit/764f568993a11689b7014df1977c18f6bda42e4c)\n- Fix 'buildStart' event is not firing [Details](https://github.com/parcel-bundler/parcel/commit/2fa38c1874fb6b279449b3eb317d5f1e678769d7)\n\n## [1.9.4] - 2018-07-01\n\n### Added\n\n- Upgrade Typescript to 2.9 [Details](https://github.com/parcel-bundler/parcel/commit/3a8f38cc0d8b5d71d158eeb7c7526e01be746c28)\n- Upgrade DEFAULT_ENGINES node to Node 8 [Details](https://github.com/parcel-bundler/parcel/commit/fd2294a586b24b9d9a76c86afbde3664698d86d2)\n- Add a buildError event to bundler [Details](https://github.com/parcel-bundler/parcel/commit/ead365ca4f481e9163345a849d02aff4934d448e)\n- Use process.env.PARCEL_MAX_CONCURRENT_CALLS environment variable [Details](https://github.com/parcel-bundler/parcel/commit/4808c0c03370e475a4303df5ef532f68d59a09d1)\n\n### Fixed\n\n- Fix Sass dependencies can not be watched when includePaths is a relative path [Details](https://github.com/parcel-bundler/parcel/commit/6ccaf6db73b0d800d3db7fbbab2555f5b1f8c526)\n- Replaced fwd slashes with backslashes for win to fix sass deps watch [Details](https://github.com/parcel-bundler/parcel/commit/9200e9a4d2f882a7549d21fdda8e5ce3e4af4397)\n- Fix sourcemap file size in report [Details](https://github.com/parcel-bundler/parcel/commit/729f252cf90262356b9c93b9e003b8bce2a03cd3)\n- fix build not exiting in dev env [Details](https://github.com/parcel-bundler/parcel/commit/14fabe9df341a9b6bba6349f5c1c3607ee1b570d)\n- Prevent postcss-modules plugin config from being deleted after first run [Details](https://github.com/parcel-bundler/parcel/commit/859975165e2417f036014438907bf8c241dcbeaf)\n\n## [1.9.3] - 2018-06-24\n\n### Fixed\n\n- Set user provided NODE_ENV if provided with build command [Details](https://github.com/parcel-bundler/parcel/commit/1b6a93f3efa1d8a4e9e04beda1a5545770e9fb07)\n- Fix bugs related to watching symlinks [Details](https://github.com/parcel-bundler/parcel/commit/7f4049d379f5083634ab63e59c51eebaabdc4b7a)\n- add cache-dir option to cli [Details](https://github.com/parcel-bundler/parcel/commit/12ddda778cc5283ab1409443aab42340f08b4cb7)\n- Fix tree-shaking DCE [Details](https://github.com/parcel-bundler/parcel/commit/b62132ceaf8d3c2019d7e86a9e987e13ee196c75)\n- Fix writing hashed bundle names to the cache [Details](https://github.com/parcel-bundler/parcel/commit/1bd5fcc9038e47fcc233543e32903b6e02aeb3a1)\n\n## [1.9.2] - 2018-06-18\n\n### Fixed\n\n- Fix unintended Vue asset supplemental code insertion [Details](https://github.com/parcel-bundler/parcel/commit/1701f9bbc365f1aaa945603a64c57b07d3afee5e)\n- fix 'Cannot read property 'posthtml' of null [Details](https://github.com/parcel-bundler/parcel/commit/c94624ec976d63aa5da4db78d20985ec15ec5435)\n\n## [1.9.1] - 2018-06-16\n\n### Fixed\n\n- fix relative paths being the same as node modules [Details](https://github.com/parcel-bundler/parcel/commit/f536e8bf8d8212bb314328458c8da2b4bcd8c15f)\n- Fix ES6 re-export of CommonJS modules with tree shaking [Details](https://github.com/parcel-bundler/parcel/commit/9e2f9abc2066e4c5aac05db001cf6279655bcee7)\n\n## [1.9.0] - 2018-06-14\n\n### Added\n\n- Tree shaking + scope hoisting for ES6 and CommonJS modules [Details](https://github.com/parcel-bundler/parcel/commit/0ac4e297adf95cff78de361fc4867fd412ec3b60)\n- Put filewatcher in a worker, for better stability and performance [Details](https://github.com/parcel-bundler/parcel/commit/af4cd330e91197fd88d826fd17440452f64e5c8a)\n- Cache resolved paths of dependencies [Details](https://github.com/parcel-bundler/parcel/commit/adeee429b60da2c7073d0e3b280b588cf22ce03e)\n- Custom less filemanager [Details](https://github.com/parcel-bundler/parcel/commit/87b1ea9818ae0bafaf05b5cd57bdb7d8d96dfbe8)\n- support for sass specific import syntax [Details](https://github.com/parcel-bundler/parcel/commit/099a98ed46fcad8f0ad9725a2d8976c8b9d4a448)\n- Allow --https for watch [Details](https://github.com/parcel-bundler/parcel/commit/98a293f79bf822bca5f97db9155ee30ddaa03632)\n- Fix browser entry-point resolution [Details](https://github.com/parcel-bundler/parcel/commit/98a293f79bf822bca5f97db9155ee30ddaa03632)\n- Use config.locals to render pug template [Details](https://github.com/parcel-bundler/parcel/commit/15eb885f5b696f831194199dc75e5dc91b84d5e0)\n- Use async modules when possibles [Details](https://github.com/parcel-bundler/parcel/commit/83dfa3ea00fc1538a9e0d770f37454ca2d558d65)\n- Add a bundlestart event [Details](https://github.com/parcel-bundler/parcel/commit/304eb5f660cfa2630e34cc60848f875a15a3ed18)\n- Add unit tests for line counter [Details](https://github.com/parcel-bundler/parcel/commit/dc113250ce25674395c292a66184f35bbd5db04c)\n- Use async FS in tests [Details](https://github.com/parcel-bundler/parcel/commit/181a63f156e1d55056fee96ea5841b749a55470f)\n- Use async fs on new linecounter tests [Details](https://github.com/parcel-bundler/parcel/commit/9861c46b2cff1c32c5d20f33ff59441b2630ec0e)\n- Make CSS assets async [Details](https://github.com/parcel-bundler/parcel/commit/0d63879d8e68db3618b0f57637d03a9a8b2b6259)\n- Enable posthtml-parse options in posthtmlrc [Details](https://github.com/parcel-bundler/parcel/commit/c600d4471bf584045b3edc0a7b080584d11d8a97)\n- Enforce Prettier (check if prettier is run in lint script) [Details](https://github.com/parcel-bundler/parcel/commit/523ee0fcabd194e2daf79f13ab7dd9d0b23203e1)\n- Add support for Cargo workspaces in Rust integration [Details](https://github.com/parcel-bundler/parcel/commit/24f28bc5d7dd4324841209379d2823654ab9c8e7)\n- Surface Bundler error to browser [Details](https://github.com/parcel-bundler/parcel/commit/82a80bbf6518b526d99cd1bac34be9f53494dd68)\n- Programmatically pass env vars as a whitelist [Details](https://github.com/parcel-bundler/parcel/commit/a662f90a93f2b5b61eebc2aea67c5a77467963e7)\n\n### Fixed\n\n- Fix bundle hoisting when asset is already in the common bundle [Details](https://github.com/parcel-bundler/parcel/commit/d8db6bae08342764b3989187ad868c4717310481)\n- Only resolve env vars on bundling when --target=browser [Details](https://github.com/parcel-bundler/parcel/commit/db07fa5f4d5ee7405fec3ca17e86ed451b27d63a)\n- improve the time reported by the bundler [Details](https://github.com/parcel-bundler/parcel/commit/59626051d0be7335147703d31d65212cd2d5eeaa)\n- clear console before accepting updates, not after [Details](https://github.com/parcel-bundler/parcel/commit/08f938919e4c4008d810170e0b8a4a3fccf27242)\n- Lookup correct generated output for bundle type in RawPackager [Details](https://github.com/parcel-bundler/parcel/commit/b2a08c4ac1e05b182e5cde73f8dc0e9f4dcdf133)\n- Remove extra argument passed to addAssetToBundle in JSPackager [Details](https://github.com/parcel-bundler/parcel/commit/33ed91349d32a4011acf1bd90d4e3c362998118b)\n- Fix indented syntax type for single file vue components [Details](https://github.com/parcel-bundler/parcel/commit/f74331721479e29af84dc72487672aeabfaf8657)\n- Fix Vue asset supplemental code concatenation [Details](https://github.com/parcel-bundler/parcel/commit/46fb97a2d079e1769422f8525eb5d3d1eac0bfcc)\n- Add dependencies referenced by posthtml-include [Details](https://github.com/parcel-bundler/parcel/commit/3988ffcf66033722c41d767e714ed1a01b572b27)\n- node-sass accepts importer as single function or array of functions [Details](https://github.com/parcel-bundler/parcel/commit/1e9556c0054e749a1659d222f2816956949654ff)\n- Get mtime of folder on wildcard imports [Details](https://github.com/parcel-bundler/parcel/commit/d689fde1ba2d7953264b012874010238bbcdc9a9)\n- Fix vue test [Details](https://github.com/parcel-bundler/parcel/commit/83907d8b4e2855406964b02b336c85ac6ab0fa26)\n- Fix absolute and tilde paths for url dependencies [Details](https://github.com/parcel-bundler/parcel/commit/16149185bdd386cf478b08629fd2776dce76c943)\n- Fix failing appveyor test [Details](https://github.com/parcel-bundler/parcel/commit/1cb05e036482bee05a4fef619a9a4b7a9c62b416)\n- Fix worker environment variable [Details](https://github.com/parcel-bundler/parcel/commit/d3e04b5bcb9f930dfe0ce9d0891de579d5bde5cf)\n- Add `test/dist` to .prettierignore [Details](https://github.com/parcel-bundler/parcel/commit/fc4a9f67c364830ca998e95cf0c00e15cc396fc2)\n- Fix typo in uglify.js [Details](https://github.com/parcel-bundler/parcel/commit/dc10531e27c4ba6cb33ff52d49eddf57b2d17b8b)\n- Pass compiler of @vue/component-compiler-utils to parser. [Details](https://github.com/parcel-bundler/parcel/commit/40fb76f8d12fe17b4e8e3eebe1a988d11d31e106)\n- Fix package.json configs [Details](https://github.com/parcel-bundler/parcel/commit/eda41e1ca9c3c8dd083196d0c6c54c52444b82cb)\n- change Uglify to Terser [Details](https://github.com/parcel-bundler/parcel/commit/86731cc5b3c678844605b60c7247ae424b07125a)\n\n### Removed\n\n- Don’t pass package.json and options over IPC [Details](https://github.com/parcel-bundler/parcel/commit/2f7be14aa9eea3fa9e8ee61591c001937d9757a1)\n\n## [1.8.1] - 2018-05-04\n\n### Fixed\n\n- Loading modules with AMD Defines [Details](https://github.com/parcel-bundler/parcel/commit/674b17d732c492c847fbbc943ab44adab2e78625)\n\n## [1.8.0] - 2018-05-03\n\n### Added\n\n- Add support for multiple entry points [Details](https://github.com/parcel-bundler/parcel/commit/7cbbeef2bf5b6e2d83af55344218da72006d325c)\n- Support source field in package.json to enable babel on symlinked modules [Details](https://github.com/parcel-bundler/parcel/commit/d517132890318586c0ccd45905dc66bf52425844)\n- Expose modules as UMD [Details](https://github.com/parcel-bundler/parcel/commit/2af3fe3bb6d241d077f216c4bb711c59aa4069d0)\n- Use parcel's resolver for sass imports [Details](https://github.com/parcel-bundler/parcel/commit/31190cff9444f8907bb1e854db1af1be68363f39)\n- Update default browser engines to > 0.25% marketshare [Details](https://github.com/parcel-bundler/parcel/commit/e9b249cdc3b9b819c324077c61bd94ac9c429ce3)\n- Ignore dependencies in falsy branches [Details](https://github.com/parcel-bundler/parcel/commit/a176dedc3ec60e88f8899614377d3f1fabe54ef7)\n- Clear the console in browser on each HMR [Details](https://github.com/parcel-bundler/parcel/commit/1a688cd7684262d55f37eebe6993506f3040ecf6)\n- Watch directories instead of individual files to fix EMFILE errors [Details](https://github.com/parcel-bundler/parcel/commit/d67b76c8c62792f37ca5e5071be533198093f1ae)\n\n### Fixed\n\n- Prevent build from breaking when .scss file is empty [Details](https://github.com/parcel-bundler/parcel/commit/7a2ba16de58a11f84e37b62537c4a1cc54f3f478)\n- Handle empty config files [Details](https://github.com/parcel-bundler/parcel/commit/11a788247c4e4d2abfba33d56e47c8422b75c447)\n- Update dependency with security vuln [Details](https://github.com/parcel-bundler/parcel/commit/06999a08f252b40344f75c5956c04c107d5502f5)\n- Minor change to mkHandle in workerfarm [Details](https://github.com/parcel-bundler/parcel/commit/0d984a563f72798cc0c08e9a27bc0e6e077a0b47)\n- Don't start server if target isn't browser [Details](https://github.com/parcel-bundler/parcel/commit/9064b3b6b34cba08d6c33e5d88298485b1ee87f7)\n- Let worker return early instead of throw on unknown messages [Details](https://github.com/parcel-bundler/parcel/commit/3fe54a690bc8a33ddf0f458893ba108af3329db3)\n- change default behaviour to keep default values of HTML form elements [Details](https://github.com/parcel-bundler/parcel/commit/ac3f8ca61b5045d3a3e77a136befe0ac48f81176)\n- Fix autoinstall infinite loop [Details](https://github.com/parcel-bundler/parcel/commit/19b9fc67878f189df3a8b8e104245ddcb644436d)\n- Allow spaces in filenames [Details](https://github.com/parcel-bundler/parcel/commit/fb6912da20b377be33ea82442579a0244f27ad37)\n- Update deps [Details](https://github.com/parcel-bundler/parcel/commit/ec98a951393587a6e1002035c56b3e41134be844)\n- Fix reference pass error in package config [Details](https://github.com/parcel-bundler/parcel/commit/a36b9124b559d65a724da74f2611a15d3122626f)\n- Remove `eval` usage. Fixes CSP cases. [Details](https://github.com/parcel-bundler/parcel/commit/b032b859a1bcc4f3e734576c704afb52821235fc)\n- Remove jsnext:main [Details](https://github.com/parcel-bundler/parcel/commit/f75941c3cfeb189578e3f2f9579dc9909da1d7c0)\n- fix for outFile option; respect file-extension [Details](https://github.com/parcel-bundler/parcel/commit/55e27e0b9f83f3588685de8bcba18167e49c3b1f)\n\n## [1.7.1] - 2018-04-15\n\n### Fixed\n\n- Fix scoped plugin packages [Details](https://github.com/parcel-bundler/parcel/commit/9792f48a8f8e9a18ea3d46521f742b36ceffbd04)\n- Fix writing files in subfolders inside dist directory [Details](https://github.com/parcel-bundler/parcel/commit/0e1863bd348c03563f7e6d9a0ba0b1c07fcdbe12)\n- Update addBundleLoader to accept multiple targets [Details](https://github.com/parcel-bundler/parcel/commit/9f3f30a209c3a9e7534088065cfad16dcf4b9fff)\n- Fix sourcemap reference in JS output [Details](https://github.com/parcel-bundler/parcel/commit/28b87cf03425ca4214639bde9fbc334ed04d25b8)\n- Sourcemap sourceRoot [Details](https://github.com/parcel-bundler/parcel/commit/3b1a5853b83d0246b3b467b86619019f3884a08f)\n- Fix serving files with query params [Details](https://github.com/parcel-bundler/parcel/commit/3435c4c10c7234f292ac6809c5fbd680c6a915c8)\n- Give priority to styl files in StylusAsset resolver [Details](https://github.com/parcel-bundler/parcel/commit/89952d70dd98042ce86c39e066f3f4edd5afbaf3)\n- Bump dependencies [Details](https://github.com/parcel-bundler/parcel/commit/41895634469a958a0c98f8178a623f91380264fb)\n- Fix asset size always be zero when building vue project [Detailds](https://github.com/parcel-bundler/parcel/commit/25a054f30670ffd3ef12890fed145a0bf21c0883)\n- Custom workerfarm, BI-Directional IPC - run all npm/yarn installs on the main process [Details](https://github.com/parcel-bundler/parcel/commit/69625e057f350e5f7cbfd6e2f2b162180a289a67)\n\n## [1.7.0] - 2018-03-28\n\n### Added\n\n- Add `.vue` file support [Details](https://github.com/parcel-bundler/parcel/commit/ba93b875f9503646b175890501d199b022ba54b9)\n- New faster resolver supporting absolute and tilde paths, and aliases [Details](https://github.com/parcel-bundler/parcel/commit/32c38e599161372cd47924f0f4cf2aae32eb5b83)\n- Content hash output file names in production [Details](https://github.com/parcel-bundler/parcel/commit/76fa1edb69af12853743f04488b2b925c058c328)\n- Automatically install missing dependencies that you `require` in your code [Details](https://github.com/parcel-bundler/parcel/commit/fc654d76dc5b5691219ba441985bcf71178c1cf3)\n- Production sourcemaps support via uglify [Details](https://github.com/parcel-bundler/parcel/commit/d9f3c259c08770ee370ed2b50909c333f9557bdf)\n- Add Pug and Jade support [Details](https://github.com/parcel-bundler/parcel/commit/09a959d31bcaa9329f591bace573e2956ce27c7c)\n- Add GLSL assets support [Details](https://github.com/parcel-bundler/parcel/commit/01e7c448f5f3a4ccdb832448ab549fdc2acebc92)\n- Add overlay for build errors when using HMR [Details](https://github.com/parcel-bundler/parcel/commit/32c796dde989f7a76a8a6c332edf8c77940bd189)\n- Implement pipelines to compose multiple asset types together [Details](https://github.com/parcel-bundler/parcel/commit/8a95f70ff04da6cc32c92278155b112cb37105f0)\n- Add --hmr-port and --hmr-hostname options to parcel watch [Details](https://github.com/parcel-bundler/parcel/commit/cafb6ef8f96f0159f22de9e3eb89773709ec9e50)\n- Add support for specifying SSL certificate & key [Details](https://github.com/parcel-bundler/parcel/commit/e7f9c64016b3f5dc53230bddf36d0d04b0389590)\n- Allow specifying which browser to open with `--open` option [Details](https://github.com/parcel-bundler/parcel/commit/9858937e187b2c1d7ce27fcdfb944b168063aab4)\n- Add `data` config option so it is possible to include global scss variables [Details](https://github.com/parcel-bundler/parcel/commit/86045d3b81062ddd0e66075182f237d6f7ba883e)\n- Add `--log-level` option [Details](https://github.com/parcel-bundler/parcel/commit/fc041d03c36bf41ea73c398e8d177de1a456e796)\n- Add support for data attr of object element [Details](https://github.com/parcel-bundler/parcel/commit/6e8ae0d97c8bb1114b3b53cf6ce0a082b066e51d)\n- Add useBuiltIns babel-preset-env option [Details](https://github.com/parcel-bundler/parcel/commit/e26d443c3f9327bae3e89a08517789ce00bcf1f0)\n- Support code splitting and loading WASM with --target=node [Details](https://github.com/parcel-bundler/parcel/commit/9d6061c2ede15af601764ec102389ba8f3f5f790)\n\n### Fixed\n\n- Fix hmr runtime error [Details](https://github.com/parcel-bundler/parcel/commit/842b9d8ddc449ca5e9b0b2b324229dd6c85b5c27)\n- Add server reference to bundler [Details](https://github.com/parcel-bundler/parcel/commit/a24247155e1a21f431d39c9c1c66a782d4353e5f)\n- Fix error when no \"targets\" options in .babelrc [Details](https://github.com/parcel-bundler/parcel/commit/69f7c6d2211ddc30dfbdfb4a8567da4542f094f1)\n- Refactor prettifySize [Details](https://github.com/parcel-bundler/parcel/commit/f897bf72819ea0a3bfe6522fc5aa73f47b84f6c2)\n- Fix property descriptor of config.internal in transforms/babel.js [Details](https://github.com/parcel-bundler/parcel/commit/eaf51d01462b353aeaf78ebe80d797477ae1938d)\n- only transform safe cssnano minifiers [Details](https://github.com/parcel-bundler/parcel/commit/55814c0da0be226924d6f3077d0c2d5f62cc8335)\n- fix electron hmr bug [Details](https://github.com/parcel-bundler/parcel/commit/88630f2a7aebf141ae060f9dc6edaa1dc2089f37)\n- Fix HMR hostname in browser [Details](https://github.com/parcel-bundler/parcel/commit/0dc062f77e36a19297dac542be33cded04580e89)\n- Fix srcset not working for `source` element [Details](https://github.com/parcel-bundler/parcel/commit/c469751e145a426fee2f1de27ccb2a747c7f5d1e)\n- Update htmlnano [Details](https://github.com/parcel-bundler/parcel/commit/a7b72f25e275a596e98716cdc15d78fdb23f9992)\n- Fix svg dependencies not being found when using minification [Details](https://github.com/parcel-bundler/parcel/commit/e3c90c40f2d7d951b1d6e59f8455d0071a539163)\n- Set TypeScript option esModuleInterop to true by default [Details](https://github.com/parcel-bundler/parcel/commit/800268435a8465660f8569f7ba30a94c2b1f75a1)\n- HTML bundle serving bug [Details](https://github.com/parcel-bundler/parcel/commit/43cab32ece825e9d38b3abe55fa0fde06052864d)\n- Change default public-url to / [Details](https://github.com/parcel-bundler/parcel/commit/3d704c69835f2e7e663dd982851d6a11587f5596)\n- Make --help same as help command [Details](https://github.com/parcel-bundler/parcel/commit/59c8d8d57c0a5b7432a37ac5b011f43455e7e228)\n- Make -h same as help command [Details](https://github.com/parcel-bundler/parcel/commit/96f1e4abcefe0c5bc127d15a2d8041972f679568)\n- Close hmr server when HMRServer.stop() is called [Details](https://github.com/parcel-bundler/parcel/commit/4bd32f2f52dc7fec7af15d4b45a7582926bd27a6)\n- Fix methods of LazyPromise [Details](https://github.com/parcel-bundler/parcel/commit/74438d43ed88954c3be9da290df648ff6df1463c)\n- Ignore require if it is defined as a local variable [Details](https://github.com/parcel-bundler/parcel/commit/12b649b914901ea0c92700288e57b68da55aafd4)\n- Check browserslist prop in package.json for environments [Details](https://github.com/parcel-bundler/parcel/commit/39e4f7a254ae639c67410e6c4daa7de8e557bd33)\n\n## [1.6.2] - 2018-02-19\n\n### Added\n\n- JSX support for Nerv [Details](https://github.com/parcel-bundler/parcel/commit/1e1297509c50016b16ac6d9f9ec67bf9f63ec4db)\n- Add JSX support for Hyperapp. [Details](https://github.com/parcel-bundler/parcel/commit/246edd4fdc2682704ea9b19d97bd4fbf5f72c017)\n\n### Fixed\n\n- Fix babel handling for node: DEFAULT_ENGINES [Details](https://github.com/parcel-bundler/parcel/commit/c7ba56a96d2a135d6b95ec458789e5831e1c0828)\n- Remove unnecessary files from npm [Details](https://github.com/parcel-bundler/parcel/commit/6d9e68cbdb06f2c8a05ba31fbc9dde01f0f83d96)\n- Use babel-register for tests only with node < 8 [Details](https://github.com/parcel-bundler/parcel/commit/83d4e3b3d7357a1765c2dfc3f802f9ca983ec08b)\n- remove call to window.location [Details](https://github.com/parcel-bundler/parcel/commit/6e0a7f678b3938f0c59f0a5f0a77c32b9dd48fb5)\n\n## [1.6.1] - 2018-02-15\n\n### Fixed\n\n- Update HMRServer handleSocketError for ErrorEvent [Details](https://github.com/parcel-bundler/parcel/commit/52aec8a44d26dc1a1b54fc7131668caa374df9d9)\n\n## [1.6.0] - 2018-02-15\n\n### Added\n\n- Automatically transpile dependencies with babel-preset-env [Details](https://github.com/parcel-bundler/parcel/commit/665e6b1b81e279f5efa5840c99c565a6befcf8d5)\n- Add no-config support for jsx [Details](https://github.com/parcel-bundler/parcel/commit/5e224bd7f03d71e84512400329542424acf136b5)\n- Add \"--target=node\" and \"--target=electron\" option to produce Node/electron friendly bundles [Details](https://github.com/parcel-bundler/parcel/commit/420ed63ed18c6a09e8b25754d0142b3b87ebcd71)\n- Log bundle metrics [Details](https://github.com/parcel-bundler/parcel/commit/6deec80b3491dc5ac690da6550323b51deec6530)\n- Node 6 support [Details](https://github.com/parcel-bundler/parcel/commit/95a6ebfd82ad29a8edb091943950f257320a04c9)\n- Add WebManifestAsset to handle W3C webmanifest [Details](https://github.com/parcel-bundler/parcel/commit/1d49e4789a4556455ee43bda23fe903f6966f5b9)\n- Add support for optional dependencies [Details](https://github.com/parcel-bundler/parcel/commit/47f252bfea604e1e9090076c573cfd6b0e91a077)\n- support svg `<use>` elements [Details](https://github.com/parcel-bundler/parcel/commit/f9be8201130c27e7498b98a5b873e9ac1a7c8e98)\n- Auto-install peerDependencies [Details](https://github.com/parcel-bundler/parcel/commit/93315f2b2860b7d3a66ff3af1f3d4ef958f3510e)\n- Inject HTML tag if missing [Details](https://github.com/parcel-bundler/parcel/commit/5a3732296f8ca1c6c46fc9f8f3de54f67221fa2d)\n- Add JSON5 support [Details](https://github.com/parcel-bundler/parcel/commit/9310641bcd11f891657fb02f2e3acd641153a99b)\n- Implement support for `<img srcset=\"...\">` [Details](https://github.com/parcel-bundler/parcel/commit/29ac70b0cdf5174237996dd26d59891a5a543bbf)\n- Add `.toml` asset support [Details](https://github.com/parcel-bundler/parcel/commit/55b96406644f9f84b34dab2f98c3a6e5d61c7045)\n- Warn instead of error when an fs call cannot be evaluated [Details](https://github.com/parcel-bundler/parcel/commit/6d23efd81bd7e2467fd063c15a5fa5610a568f60)\n- Add support for HTML meta assets [Details](https://github.com/parcel-bundler/parcel/commit/c1d8d756cf044dfe0077a92770d31591ba270180)\n- Add `--out-file` option [Details](https://github.com/parcel-bundler/parcel/commit/96162771397909367479e0af49c52eb228704a5c)\n- Add Access-Control header for CORS [Details](https://github.com/parcel-bundler/parcel/commit/1c761fd5683d9bf195ee5eb6fd04bd494ecb6162)\n\n### Fixed\n\n- Remove `-h` alias for `hmr-port` option [Details](https://github.com/parcel-bundler/parcel/commit/c2022b3ee5d62449bebb03589847c389f0cebda6)\n- Add 'id' to the module variable [Details](https://github.com/parcel-bundler/parcel/commit/8d51fdcf650088e586a48babce318354113e974b)\n- Preserve asset's search and hash [Details](https://github.com/parcel-bundler/parcel/commit/d7098ce5664c3b04edf291bf96187db8a3434c5b)\n- Always add bundle-loader module to the bundle [Details](https://github.com/parcel-bundler/parcel/commit/deba5ef50c5fd630dd7d983b4359b743c4b719a9)\n- Launch https websocket server is --https [Details](https://github.com/parcel-bundler/parcel/commit/391e17f60fb4bf5a73ddd352883647fe6541d1cc)\n- Fix PromiseQueue returning null when there are no jobs [Details](https://github.com/parcel-bundler/parcel/commit/f27d2695e1a709a7f7fc665c8287c3fa4a0ebec1)\n- Correctly serialize YAML to JS [Details](https://github.com/parcel-bundler/parcel/commit/58f89002fc719e0b54216f367ec7e04130412c16)\n- Update parser to treat file extensions as case-insensitive [Details](https://github.com/parcel-bundler/parcel/commit/ab713a32a5053c48f83c6503016880369ea65c18)\n- Add babel-template and babel-types to package.json [Details](https://github.com/parcel-bundler/parcel/commit/74d70f8467ab131b67f85bf821610234a9c5b1a9)\n- Improve Code Coverage [Details](https://github.com/parcel-bundler/parcel/commit/fc641fa7988c8c93fd152d45ef94857fb1662f90)\n- Safe cssnano transforms by default [Details](https://github.com/parcel-bundler/parcel/commit/fddfdb907f393991a68ca15e48cf02a600e84840)\n- Make sure bundles is an array in loadBundlesLazy [Details](https://github.com/parcel-bundler/parcel/commit/e3fcfa0148d8ccb06577701d91ea066e21842c6e)\n- Bump dependencies [Details](https://github.com/parcel-bundler/parcel/commit/13864d17058a2018e083ce1c2688026779a95694)\n- Allows for dots in lazyloaded file names [Details](https://github.com/parcel-bundler/parcel/commit/dc4313579b9dffd429b59c880b9fe22ba4d460d7)\n- Add missing packages for pnpm to work [Details](https://github.com/parcel-bundler/parcel/commit/d3ae5f69eb3a44b4ca94b36ba2e7033fc69872a3)\n- pass lowerCaseAttributeNames: true to posthtml-parser (fix version bump) [Details](https://github.com/parcel-bundler/parcel/commit/1d2f82d2e1b76efe9b806f77fde5dcf1e1b0b063)\n\n## [1.5.1] - 2018-01-25\n\n### Added\n\n- Support .htm extension [Details](https://github.com/parcel-bundler/parcel/commit/3d6709142f702a92b04b065de1d05b211855966b)\n\n### Fixed\n\n- Fix rust projects with hyphenated names [Details](https://github.com/parcel-bundler/parcel/commit/e78baca1d0ffc499fffdd21883df1d43e0ab16f1)\n- Purify sourcemaps (Prevent babel from giving invalid mappings) [Details](https://github.com/parcel-bundler/parcel/commit/03291804ec9e73b147548a4e89e6d7079f4595d4)\n- Don't drop console statements by default in uglifyjs [Details](https://github.com/parcel-bundler/parcel/commit/8d7339aea1965b929ca8186ce8b617d5c46f218e)\n- Fix for ipc closed error in tests [Details](https://github.com/parcel-bundler/parcel/commit/aee8510b7bfb856d7a9b49efd897c7de30cd134c)\n\n## [1.5.0] - 2018-01-23\n\n### Added\n\n- SourceMap support [Details](https://github.com/parcel-bundler/parcel/commit/5c5d5f8af634c0e0aa8e8a3542892febe7c27e85)\n- Custom bundleloader and wasm support [Details](https://github.com/parcel-bundler/parcel/commit/244f274f710048682505351fbed777ac7bc49406)\n- Rust support [Details](https://github.com/parcel-bundler/parcel/commit/a429c52bb4e53effe586d677d53704a78c8d302b)\n- Ability to set HMR port [Details](https://github.com/parcel-bundler/parcel/commit/065a49e8f673922e514c5279d79df74f052a1558)\n- Support .env files [Details](https://github.com/parcel-bundler/parcel/commit/50de97fb1239b7079f36c3897fe0c0c5f2e39070)\n- Hotreload css requires in html [Details](https://github.com/parcel-bundler/parcel/commit/fb3f9d7a5e120766dd3656ce00b4bb07e76d6af1)\n- Minify JSON [Details](https://github.com/parcel-bundler/parcel/commit/c858843bb0e72c6ad46a2349b36843e00b86ea76)\n- Ability to set HMR hostname [Details](https://github.com/parcel-bundler/parcel/commit/b56b2a9f3c3ff6db2dd27a086b409a8d4af6f2bd)\n- Ability to specify amount of workers using `PARCEL_WORKERS` environment variable [Details](https://github.com/parcel-bundler/parcel/commit/0a2f554080db7f7b3f077e07ac62ade9170d1372)\n- Warning emoji [Details](https://github.com/parcel-bundler/parcel/commit/25cf21709a0829131311281cb369d792cf666aa3)\n\n### Fixed\n\n- Virtualpaths, throw file not found error [Details](https://github.com/parcel-bundler/parcel/commit/e09575d495d2ac5282671eab88b827191eee7fa7)\n- Transform HTML prior to collecting dependencies [Details](https://github.com/parcel-bundler/parcel/commit/2fbba629eaa83d7de5ccba79e01faa1187393f16)\n- Find a[href] dependencies when attrs precede it [Details](https://github.com/parcel-bundler/parcel/commit/39c5cfe377be603b16561f914cb9a07c7e5fdd6c)\n- Resolve URI-encoded assets [Details](https://github.com/parcel-bundler/parcel/commit/9770acfb7576572715dd672195180d5fec8156a9)\n- Public-url not an os path [Details](https://github.com/parcel-bundler/parcel/commit/a852dd2cd0dc856121ebc2e6cbc2589525a3d435)\n- Invalidate cache when parent dependencies change [Details](https://github.com/parcel-bundler/parcel/commit/b8e897341e942b04967a1d44f462375292d5b990)\n- Invalidate cache on config change [Details](https://github.com/parcel-bundler/parcel/commit/6c3d34f2215a46dd7845193a6f4036930eaddf48)\n- Circular bundles [Details](https://github.com/parcel-bundler/parcel/commit/dd26db34fb70b3e40826bf3c4878172eb60afe91)\n- Possibly ignore fs using browser-resolve config [Details](https://github.com/parcel-bundler/parcel/commit/bd9fd9f6193c3f18efa03f897a33906869808b96)\n- Do not use global window inside hmr, fixes web worker issues [Details](https://github.com/parcel-bundler/parcel/commit/6962a9a96cdedafbf27715bc74b93e6c8ad7eb19)\n- Improved worker startup times [Details](https://github.com/parcel-bundler/parcel/commit/072d799d48bb3639c628687937f3641fe2cff74d)\n- Parse `//` as a valid url [Details](https://github.com/parcel-bundler/parcel/commit/a78280affa7e02cb142e51259ea4076ed036600a)\n- Improve windows emoji console detections [Details](https://github.com/parcel-bundler/parcel/commit/dba3d49be2d30dfe47a9bd9c88d6fba9015be968)\n\n## [1.4.1] - 2017-12-31\n\n### Added\n\n- Changelog [Details](https://github.com/parcel-bundler/parcel/commit/dc4acd8efebf76116b9e06e89827e56cfa217013)\n\n### Fixed\n\n- http hot reload server printing location as `https://...` [Details](https://github.com/parcel-bundler/parcel/commit/0fcdeb9a9feac10be3ff2485e2487588734a6754)\n- Execute bundle() when calling Bundler.middleware() [Details](https://github.com/parcel-bundler/parcel/commit/b9004fc3a0092cdfa0b18e196ab25a79e582b2d1)\n- Always parse dependencies if babel ran. [Details](https://github.com/parcel-bundler/parcel/commit/c6991116f0759b865f1a55336c32ba0793fa09c3)\n\n## [1.4.0] - 2017-12-31\n\n### Added\n\n- HTTPS server support [Details](https://github.com/parcel-bundler/parcel/commit/90b968432592f38ecca0ad3b2cb5f7fbfbcd684c)\n- GraphQL Support [Details](https://github.com/parcel-bundler/parcel/commit/8f1f497945d4e5102c401e3036c4bc30fd692348)\n- Webworker Support [Details](https://github.com/parcel-bundler/parcel/commit/c8a1156d4c2dd5902ba500aa9c25547bfab53eac)\n- CSSNano configuration [Details](https://github.com/parcel-bundler/parcel/commit/14e7880be2a147503999e21d4c1114874cc500d7)\n- HTMLNano configuration [Details](https://github.com/parcel-bundler/parcel/commit/d11a15e1636ea7c7f291d0cfbf73b75cc719e839)\n- Support async plugin loading [Details](https://github.com/parcel-bundler/parcel/commit/bb6e6044b7569fd6745ab915dfd49327d0cbb955)\n- Add code sample section to `ISSUE_TEMPLATE` [Details](https://github.com/parcel-bundler/parcel/commit/8a65676023f88a53372ab4bf0b6daada49de6b49)\n- Add url dependency for serviceWorker.register calls [Details](https://github.com/parcel-bundler/parcel/commit/0ab0acaecece829392cd452f83014df7c470fc83)\n- Fix ignored babel files [Details](https://github.com/parcel-bundler/parcel/commit/22478d368216b24da3bd3e94439b02e356fd4310)\n\n### Fixed\n\n- log-symbols fallback for cross-platform emoji compatibility [Details](https://github.com/parcel-bundler/parcel/commit/0eb4487491fd70390697ad413aeac994fca4309c)\n- Use hostname for websocket connection [Details](https://github.com/parcel-bundler/parcel/commit/06d5ffc33dac19fa9ca730bbf939052b500a34ec)\n- Standardize empty implementation comment [Details](https://github.com/parcel-bundler/parcel/commit/d763a1aaca70a7892cb4c6611c2540ca1506d107)\n- Handle appstore url scheme [Details](https://github.com/parcel-bundler/parcel/commit/494fafc33ec0a3c66b423670a24539896015855f)\n- bundling issues when asset parent & commonBundle types differ [Details](https://github.com/parcel-bundler/parcel/commit/127c9b72d20847734049a7db27683279c6784ab6)\n- Handle empty assets [Details](https://github.com/parcel-bundler/parcel/commit/4c67f03808dca6cf9b9a47bcd92477e09005da75)\n- Minify `Prelude.js` [Details](https://github.com/parcel-bundler/parcel/commit/a0ede06395807cc0f7f6caad7aee2cb1463d41ac)\n\n## [1.3.1] - 2017-12-24\n\n### Fixed\n\n- Maintain html spacing between tags when minimizing [Details](https://github.com/parcel-bundler/parcel/commit/0f40da9bd4249b43d22597f80d0306791e9203f6)\n- Incorrect bundle path for raw Assets [Details](https://github.com/parcel-bundler/parcel/commit/38f8aaf173a8ff501ddd02741969089576b42bd6)\n\n## [1.3.0] - 2017-12-22\n\n### Added\n\n- Reason Asset Type [Details](https://github.com/parcel-bundler/parcel/commit/47e91926f1d9ed763ad11cbd39a9b9fbc1986b20)\n- Automatically install parser dependencies [Details](https://github.com/parcel-bundler/parcel/commit/6f493f030852f557c299b2c26a565c99e1e9de66)\n- UglifyES config support [Details](https://github.com/parcel-bundler/parcel/commit/1947a15d40cc2b7dd91bdc64d02a5d79604ba550)\n- Display absolute path on failed dependency resolve [Details](https://github.com/parcel-bundler/parcel/commit/dffeb7d81ea14e9739b372132fd32d8d74d9b368)\n- Support `.editorconfig` [Details](https://github.com/parcel-bundler/parcel/commit/6c96b6588afc1b774551c5eda3487c2d0fab6dc0)\n- Tests for ES6 Modules resolver [Details](https://github.com/parcel-bundler/parcel/commit/76186779b2a24ce1befc7c5d5b3e783c7b9f5c94)\n- ESLint [Details](https://github.com/parcel-bundler/parcel/commit/434b86c92b19e2c7de13a121600d0533c1138169)\n\n### Fixed\n\n- Parse port option as integer [Details](https://github.com/parcel-bundler/parcel/commit/1fa9fef1d1165630b0beabba5d546ee3ccffbec1)\n- Make cli.js Node 6 compatible [Details](https://github.com/parcel-bundler/parcel/commit/ac0fbaf40b9cc93b3f428c2b6c124027f56e6e78)\n- Remove arrow function from hmr-runtime - IE support [Details](https://github.com/parcel-bundler/parcel/commit/9f5b334d6e04136d93ae428a5eef899371b400e0)\n- Start server before bundling [Details](https://github.com/parcel-bundler/parcel/commit/44d0bd6633b71ce3b36b4faeee514182dcc9334a)\n- Deterministic bundle trees [Details](https://github.com/parcel-bundler/parcel/commit/539ade1820c3e644586e3161f6b2357a68784142)\n- Resolve \"module\", \"jsnext:main\" and \"browser\" before \"main\" in Package.json [Details](https://github.com/parcel-bundler/parcel/commit/7fcae064b205ab30c2393c3ce68171fd9f47ffc1)\n- Remove filename unsafe characters [Details](https://github.com/parcel-bundler/parcel/commit/df021967900fd60d7a58a79191daa26caf68c2b5)\n- Don't hash root file [Details](https://github.com/parcel-bundler/parcel/commit/075190c9868c5dd01ec4a935a187e21ae00662e5)\n- Use cross-spawn for autoinstalling dependencies on windows [Details](https://github.com/parcel-bundler/parcel/commit/ab3a7d61a4f3e19b129583914fb9fad4c54d8dc6)\n\n## [1.2.1] - 2017-12-18\n\n### Added\n\n- Opencollective [Details](https://github.com/parcel-bundler/parcel/commit/0f554dc2f5c8f2557ec84eee5301b90ffb279764)\n- Use `JSON5` to parse config files [Details](https://github.com/parcel-bundler/parcel/commit/bd458660ce38e7a1d25bd9758084acc24418e054)\n- Move JSAsset options gathering into separate function [Details](https://github.com/parcel-bundler/parcel/commit/333c3aa5d20f98a5f3c52635751032d12854c13c)\n\n### Fixed\n\n- Don't use template literals in builtins - IE support [Details](https://github.com/parcel-bundler/parcel/commit/b7b2991d69b960d9f2951828b8145a6d9396ee4e)\n- Merge `tsconfig.json` with defaults [Details](https://github.com/parcel-bundler/parcel/commit/86835793a513b43af906a02083eed72b7eb9e0d2)\n- Change `parse-json` requires to `JSON5` [Details](https://github.com/parcel-bundler/parcel/commit/ed35a0994d34dfead6b8895ae981d9b05edac361)\n- Register `.pcss` extension to CSSAsset [Details](https://github.com/parcel-bundler/parcel/commit/f62d47686698807e43923893affb6f4ce22337ac)\n- Websocket error handling [Details](https://github.com/parcel-bundler/parcel/commit/9f27e15bfcefc2e629a97c154ec2391e2a962623)\n- Development server index file [Details](https://github.com/parcel-bundler/parcel/commit/c008bb0ac492dbac38e2f13017e3143f40359934)\n\n## [1.2.0] - 2017-12-12\n\n### Added\n\n- Coffeescript support [Details](https://github.com/parcel-bundler/parcel/commit/2d680c0e968cbdda46455ae792b4dbac33dc9753)\n- Reload html on change [Details](https://github.com/parcel-bundler/parcel/commit/0ff76bea36135a4b1edbd85a588a4e26c86dcc19)\n- `--open` option to automatically launch in default browser [Details](https://github.com/parcel-bundler/parcel/commit/f8b3d55288f4c4a15330daf7d950cc496fde47ed)\n- Prettier [Details](https://github.com/parcel-bundler/parcel/commit/548eef92e11711db007b7613ba5530de508d21a0)\n- Code of conduct [Details](https://github.com/parcel-bundler/parcel/commit/72c4d47a77d0b4419d54130e2ea2f39ae40b74da)\n- User friendly server errors and automatic port switching [Details](https://github.com/parcel-bundler/parcel/commit/87350f44223ea77597f5d2f50c3886ebd6126a42)\n- Version option to command description [Details](https://github.com/parcel-bundler/parcel/commit/35c65a34ac41508c3a3bed8944bb478cebc3e071)\n- Add badges to readme [Details](https://github.com/parcel-bundler/parcel/commit/644f195341c1a47d49af101716ce2fa8b323a0fe)\n- Support JSON comments [Details](https://github.com/parcel-bundler/parcel/commit/7bfe232ba1db4f27278025175cf3818fbc34e65f)\n- Add AppVeyor CI [Details](https://github.com/parcel-bundler/parcel/commit/0eb7a930ffcd4fc77b5b6c75e490299f92ca8a8e)\n- Use `UglifyES` instead of `UglifyJS` [Details](https://github.com/parcel-bundler/parcel/commit/70663cced00e5f98d3e8e3affbc0ee40a9ab4566)\n\n### Fixed\n\n- Bundle-loader when using esModule [Details](https://github.com/parcel-bundler/parcel/commit/7d1f384122431b90e715161e50a5abf39dc8fd9d)\n- Use var over let in builtins for IE support [Details](https://github.com/parcel-bundler/parcel/commit/29515f4f713b093bad9cf8fedd796c4eacb4f38b)\n- Add jsm to javascript extensions [Details](https://github.com/parcel-bundler/parcel/commit/cdda0442cc9a00dde5f54ffc643a32e58390034f)\n- Log pluginload errors [Details](https://github.com/parcel-bundler/parcel/commit/acdf9792ed53a5909cc5ab638ad0f27403b41957)\n- Global env problem [Details](https://github.com/parcel-bundler/parcel/commit/355c63bc956bf24dd7d040e52dd3be2fda47ad9c)\n- Exit on build error when using build command [Details](https://github.com/parcel-bundler/parcel/commit/34b84e44573fd583689ccefde5a8bd9f46de203b)\n- Remove circular require in Asset.js [Details](https://github.com/parcel-bundler/parcel/commit/7c0acb32bc7374a294f53d758e330c52966919dd)\n- Give high priority to extension of parent [Details](https://github.com/parcel-bundler/parcel/commit/2e3266242f7f2dd01fd21c3ba58d0fb575635e43)\n- Fallback to `os.cpus()` for cpu count [Details](https://github.com/parcel-bundler/parcel/commit/9d319afd7683468361dc2f04b253aaca38e779ee)\n- Windows test issues [Details](https://github.com/parcel-bundler/parcel/commit/0eb7a930ffcd4fc77b5b6c75e490299f92ca8a8e)\n- Raw Asset loading [Details](https://github.com/parcel-bundler/parcel/commit/51b90d7458fca5b10dbaa0605c33223b8884b6e1)\n- Normalize path on windows [Details](https://github.com/parcel-bundler/parcel/commit/0479dee763fc9d79c057c86233cb660c6022a92c)\n- Make hmr-runtime ES3 compatible [Details](https://github.com/parcel-bundler/parcel/commit/d17dccccf4480e440c1898911f304efe6040439f)\n- Dynamically importing js assets with raw assets children [Details](https://github.com/parcel-bundler/parcel/commit/dc52638a27d41b1eadf25ecc5d93bfe6727182c7)\n- Package.json loading issues for plugin loading [Details](https://github.com/parcel-bundler/parcel/commit/7469a150bf5accecdcfc430365572601527302b9)\n\n## [1.1.0] - 2017-12-08\n\n### Added\n\n- Typescript support [Details](https://github.com/parcel-bundler/parcel/commit/757b67362e1fce076241fa31afe2179db93cff18)\n- Browser gets notified of errors [Details](https://github.com/parcel-bundler/parcel/commit/d9d8bab2a9bcd2efd23bd824d4c24af1d66a3f77)\n- Community section to Readme [Details](https://github.com/parcel-bundler/parcel/commit/11d109b4b4e03f8ab5da253f9c70b0e6e11e8f3b)\n- More helpful json parsing error messages using `parse-json` [Details](https://github.com/parcel-bundler/parcel/commit/2b26f9691d3dc489c509476718fa852b231ffde1)\n- Issue template [Details](https://github.com/parcel-bundler/parcel/commit/f8dd2f2aea167f011a5c885b20390521798c8c9f)\n\n### Fixed\n\n- Print stack traces on error [Details](https://github.com/parcel-bundler/parcel/commit/4ab9b878a2b1ea280afaac690fb0990947c4323e)\n- Merge `postcss-modules` config [Details](https://github.com/parcel-bundler/parcel/commit/582f8db1f735ecbbd4f5c93202ba0f6a6c24f8ca)\n- Default to `NODE_ENV` development on serve [Details](https://github.com/parcel-bundler/parcel/commit/29f8df78788061a7f406059bc55c8ede428a020d)\n- Disable flakey macOS FS events in watcher in the tests [Details](https://github.com/parcel-bundler/parcel/commit/e69c83d9db38fac8d1e525bdf03a883b551f506d)\n- Sort child bundles by asset names to avoid race condition in tests [Details](https://github.com/parcel-bundler/parcel/commit/c49e43a5a6f4b602d07f72f76b8443bf37203a3f)\n\n## [1.0.3] - 2017-12-07\n\n### Added\n\n- Add version to cache key [Details](https://github.com/parcel-bundler/parcel/commit/f3287ab76f5921d1ec7273bee42871179fe3ca85)\n- Travis tests environment, build script and contribution docs [Details](https://github.com/parcel-bundler/parcel/commit/90f69ff30b9b239b537ca1b01f8ce7fb1d08ce6a)\n\n### Fixed\n\n- File url bugfix for Firefox [Details](https://github.com/parcel-bundler/parcel/commit/90a5373d629bebdc9761ddb784e683190bdcc35a#diff-78cb52acd60299e5f6fd26a716d97293)\n- Windows path bugfix [Details](https://github.com/parcel-bundler/parcel/commit/67cd3b0678b835f3a21134800bc0f9c9b8d599e2)\n- Default only exports [Details](https://github.com/parcel-bundler/parcel/commit/860a748898f8a0fee749aec2e6bdc3eaabf0ce87)\n- Public URL in normalizeOptions [Details](https://github.com/parcel-bundler/parcel/commit/9b066122ed40afc05f5eb20ea0cc1ec9e748592b)\n- Do not try to import data:, tel:, mailto:, something: URLS [Details](https://github.com/parcel-bundler/parcel/commit/781b7ecd114edd63fe6ad04dfc1408c9a611f2f5)\n\n## [1.0.2] - 2017-12-06\n\n### Added\n\n- Add github repository to `package.json` [Details](https://github.com/parcel-bundler/parcel/commit/88bdf1e474d8bc8af3f770b431d011239f1ede14)\n\n### Fixed\n\n- Improved public url checking using `is-url` instead of regex [Details](https://github.com/parcel-bundler/parcel/commit/92be140ad55fcdef7b34baa6718bc356274e5e8f)\n\n### Removed\n\n- `babel-preset-es2015` removed from dev dependencies [Details](https://github.com/parcel-bundler/parcel/commit/4d87814f7201d70cfa5db3b457915c508378c9e6)\n\n## [1.0.1] - 2017-12-05\n\n- Initial Parcel-bundler core\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, gender identity and expression, level of experience,\neducation, socio-economic status, nationality, personal appearance, race,\nreligion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n  advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at devongovett@gmail.com. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\nWelcome, we really appreciate if you're considering to contribute, the joint effort of our contributors make projects like this possible!\n\nThe goal of this document is to provide guidance on how you can get involved.\n\n## Asking questions\n\nHave a question or feature request? Rather than opening an issue, use the [Discussions](https://github.com/parcel-bundler/parcel/discussions) board.\n\nPlease be polite and take the time to write a well-worded question so our community members can easily assist you.\n\n## Prerequisites\n\nBefore starting make sure you have the following installed:\n\n- [git](https://git-scm.com)\n- [Node](https://nodejs.org) at LTS\n- [Yarn](https://yarnpkg.com) at v4 and/or enable corepack\n- [Rust](https://www.rust-lang.org/tools/install) stable\n- [Flow](https://flow.org/en/docs/editors) IDE autocompletion and type-checking\n\n## Getting started\n\nIn order to make it easier to get familiar with the codebase we labeled simpler issues using [Good First Issue](https://github.com/parcel-bundler/parcel/issues?q=is%3Aopen+is%3Aissue+label%3A%22%E2%9C%A8+Parcel+2%22+label%3A%22%3Ababy%3A+Good+First+Issue%22) and [Help Wanted](https://github.com/parcel-bundler/parcel/issues?q=is%3Aopen+is%3Aissue+label%3A%22%E2%9C%A8+Parcel+2%22+label%3A%22%3Apray%3A+Help+Wanted%22). You can learn the internals by reading the [documentation](https://parceljs.org/docs) or by starting from `packages/core/core/src/Parcel.js`\n\n## Pull requests\n\nFor significant changes, it is recommended that you first [propose your solution](https://github.com/parcel-bundler/parcel/discussions) and gather feedback.\n\n**Before submitting a pull request,** you can follow this step by step guide:\n\n1. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the repository and setup a new branch to work in.\n\n> It's important that the changes are made in separate branches to ensure a pull request only includes the commits related to a bug or feature.\n\n2. Run `yarn` and `yarn build-native` in the repository root to install dependencies.\n3. If you fix a bug or introduce a new feature, add tests or ask for help if the use-case is more complex.\n4. Commit the `yarn.lock` file if it has changed.\n5. Check the steps used in [ci](https://github.com/parcel-bundler/parcel/blob/v2/.github/workflows/ci.yml) pass locally.\n\n```sh\n$ yarn build-ts\n$ yarn flow check\n$ yarn lint\n$ yarn test\n```\n\n⚠️ Don't modify the `package.json` versioning\n\nOnce you are ready to create a pull request, provide relevant details about the change; examples; and test cases. All submissions require review, so please be patient!\n\n## Development workflow\n\nThe following commands are available:\n\n- `yarn build-ts` generates the TypeScript type definitions.\n- `yarn flow check` runs the [Flow](https://flow.org) type checking.\n- `yarn format` keeps the code formatting consistent.\n- `yarn lint` checks for stylistic or unwanted errors.\n- `yarn test` runs all the unit and integration tests.\n- `yarn test:integration` runs the integration tests.\n- `yarn test:unit` runs the unit tests.\n\n### Debugging\n\nBoth VSCode and CLion can be used to debug commands such as the integration test suite.\n\n- **CLion** is well supported, using default configurations for the relevant language.\n- **VSCode** users can use the JavaScript Debug Terminal or Node.js launch configuration to debug JavaScript. Rust debugging requires a [LLDB](https://lldb.llvm.org/) powered launch configuration, which is available by installing the [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) extension.\n\n**Breakpoints not triggering?** Try passing in `PARCEL_WORKERS=0` to make all code run on the main thread, instead of in worker processes. Similarly, you can set `PARCEL_MAX_CONCURRENT_CALLS` to change the limit of concurrent calls per worker.\n\n### Plugins\n\nWhen developing plugins, you should disable caching with the `--no-cache` CLI or `shouldDisableCache: true` Parcel option. This will ensure you do not see stale or incomplete results.\n\n### Working from an example\n\n_Please don't commit these examples._\n\nYou can create a temporary example for debugging in the folder `packages/examples`. Start by copying the `simple` example and try to reproduce the bug. It has everything setup for working on local changes and you can run `yarn build` to build the project. If you're re-using another example or creating one from scratch, make sure to use the `--no-cache` flag for `parcel build` to see your local changes reflected.\n\n### Testing outside of the monorepo\n\nYou can run `/path/to/monorepo/packages/core/parcel/src/bin.js build src/index.html` provided that you don't have any `@parcel/*` plugins installed in this project.\n\n## Releasing a new version\n\nWhen releasing a new version of Parcel a couple steps should be followed:\n\n1. Run `yarn tag:prerelease 2.0.0-alpha.1` or `yarn tag:release 2.4.5` based on whether it is a prerelease (alpha, beta, nightly, ...) or a stable release\n2. Open a PR (or commit directly to the default branch)\n3. Wait for the PR to get merged\n4. Create a [GitHub release](https://github.com/parcel-bundler/parcel/releases) and publish it (this should automatically trigger an npm release, with the current state of the default branch and versions defined in the `package.json` files)\n\nAfter these steps are completed there should be a new version of Parcel published on npm.\n\nIn case the automatic npm release failed, or you want to do a manual release for any other reason you can also run `yarn run release`\n\n## Become a backer or sponsor\n\nShowing appreciation makes us happy, donations help us grow.\n\nOur financial situation is fully transparent on our [open collective](https://opencollective.com/parcel).\n\nAnyone can file an expense. If the expense makes sense for the development of the community, it will be \"merged\" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.\n\n## Credits\n\n### Contributors\n\nThank you to all the people who have already contributed to parcel!\n<a href=\"https://github.com/parcel-bundler/parcel/graphs/contributors\"><img src=\"https://opencollective.com/parcel/contributors.svg?width=890\" /></a>\n\n### Backers\n\nThank you to all our backers! [[Become a backer](https://opencollective.com/parcel#backer)]\n\n<a href=\"https://opencollective.com/parcel#backers\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/backers.svg?width=890\"></a>\n\n### Sponsors\n\nThank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/parcel#sponsor))\n\n<a href=\"https://opencollective.com/parcel/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/9/avatar.svg\"></a>\n"
  },
  {
    "path": "Cargo.toml",
    "content": "[workspace]\nresolver = \"2\"\nmembers = [\n  \"crates/*\",\n  \"packages/transformers/js/core\"\n]\n\n[profile.canary]\ninherits = \"release\"\ndebug = true\n\n[profile.release]\nstrip = \"symbols\"\n\n[patch.crates-io]\nhtml5ever = { git = \"https://github.com/devongovett/html5ever.git\", branch = \"xmlns-attrs\" }\nxml5ever = { git = \"https://github.com/devongovett/html5ever.git\", branch = \"xmlns-attrs\" }\nmarkup5ever = { git = \"https://github.com/devongovett/html5ever.git\", branch = \"xmlns-attrs\" }\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2017-present Devon Govett\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "babel.config.json",
    "content": "{\n  \"presets\": [\"@parcel/babel-preset\"]\n}\n"
  },
  {
    "path": "crates/core/Cargo.toml",
    "content": "[package]\nauthors = [\"Devon Govett <devongovett@gmail.com>\"]\nname = \"parcel-core\"\nversion = \"0.1.0\"\nedition = \"2024\"\n\n[dependencies]\nbitflags = { version = \"2.7.0\", features = [\"serde\"] }\nbrowserslist-rs = \"0.18.1\"\njson-sourcemap = \"0.2.0\"\nnode-semver = \"2.2.0\"\nserde = { version = \"1.0.123\", features = [\"derive\", \"rc\"] }\nserde_bytes = \"0.11.5\"\nserde-value = \"0.7.0\"\n"
  },
  {
    "path": "crates/core/src/asset.rs",
    "content": "use std::sync::Arc;\n\nuse bitflags::bitflags;\nuse serde::{Deserialize, Serialize};\n\nuse crate::{BundleBehavior, Environment, SourceLocation, impl_bitflags_serde};\n\n#[derive(Debug, Clone, Serialize, Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct Asset {\n  // pub file_path: Interned<PathBuf>,\n  pub loc: Option<SourceLocation>,\n  #[serde(rename = \"type\")]\n  pub ty: AssetType,\n  #[serde(with = \"serde_bytes\")]\n  pub content: Vec<u8>,\n  pub env: Arc<Environment>,\n  // pub query: Option<String>,\n  // pub pipeline: Option<String>,\n  pub bundle_behavior: BundleBehavior,\n  pub flags: AssetFlags,\n  // pub symbols: Vec<Symbol>,\n  pub unique_key: Option<String>,\n}\n\n#[derive(Debug, Clone, PartialEq, Hash)]\npub enum AssetType {\n  Js,\n  Jsx,\n  Ts,\n  Tsx,\n  Css,\n  Html,\n  Xhtml,\n  Svg,\n  Json,\n  Jsonld,\n  Other(Box<str>),\n}\n\nimpl Serialize for AssetType {\n  fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n  where\n    S: serde::Serializer,\n  {\n    self.extension().serialize(serializer)\n  }\n}\n\nimpl<'de> Deserialize<'de> for AssetType {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    let ext: String = Deserialize::deserialize(deserializer)?;\n    Ok(Self::from_extension(&ext))\n  }\n}\n\nimpl AssetType {\n  pub fn extension(&self) -> &str {\n    match self {\n      AssetType::Js => \"js\",\n      AssetType::Jsx => \"jsx\",\n      AssetType::Ts => \"ts\",\n      AssetType::Tsx => \"tsx\",\n      AssetType::Css => \"css\",\n      AssetType::Html => \"html\",\n      AssetType::Xhtml => \"xhtml\",\n      AssetType::Svg => \"svg\",\n      AssetType::Json => \"json\",\n      AssetType::Jsonld => \"jsonld\",\n      AssetType::Other(s) => s,\n    }\n  }\n\n  pub fn from_extension(ext: &str) -> AssetType {\n    match ext {\n      \"js\" => AssetType::Js,\n      \"jsx\" => AssetType::Jsx,\n      \"ts\" => AssetType::Ts,\n      \"tsx\" => AssetType::Tsx,\n      \"css\" => AssetType::Css,\n      \"html\" => AssetType::Html,\n      \"xhtml\" => AssetType::Xhtml,\n      \"svg\" => AssetType::Svg,\n      \"json\" => AssetType::Json,\n      \"jsonld\" => AssetType::Jsonld,\n      ext => AssetType::Other(ext.to_owned().into_boxed_str()),\n    }\n  }\n\n  pub fn from_mime(mime: &str) -> AssetType {\n    match mime {\n      // https://mimesniff.spec.whatwg.org/#javascript-mime-type\n      \"application/ecmascript\" => AssetType::Js,\n      \"application/javascript\" => AssetType::Js,\n      \"application/x-ecmascript\" => AssetType::Js,\n      \"application/x-javascript\" => AssetType::Js,\n      \"text/ecmascript\" => AssetType::Js,\n      \"text/javascript\" => AssetType::Js,\n      \"text/javascript1.0\" => AssetType::Js,\n      \"text/javascript1.1\" => AssetType::Js,\n      \"text/javascript1.2\" => AssetType::Js,\n      \"text/javascript1.3\" => AssetType::Js,\n      \"text/javascript1.4\" => AssetType::Js,\n      \"text/javascript1.5\" => AssetType::Js,\n      \"text/jscript\" => AssetType::Js,\n      \"text/livescript\" => AssetType::Js,\n      \"text/x-ecmascript\" => AssetType::Js,\n      \"text/x-javascript\" => AssetType::Js,\n      \"module\" => AssetType::Js,\n      \"application/json\" => AssetType::Json,\n      \"application/ld+json\" => AssetType::Jsonld,\n      \"text/css\" => AssetType::Css,\n      \"text/html\" => AssetType::Html,\n      \"application/xhtml+xml\" => AssetType::Xhtml,\n      \"image/svg+xml\" => AssetType::Svg,\n      mime => AssetType::Other(\n        mime\n          .split('/')\n          .nth(1)\n          .map(|m| m.to_owned())\n          .unwrap_or_else(|| mime.to_owned())\n          .into_boxed_str(),\n      ),\n    }\n  }\n}\n\nbitflags! {\n  #[derive(Debug, Clone, Copy)]\n  pub struct AssetFlags: u32 {\n    const IS_SOURCE = 1 << 0;\n    const SIDE_EFFECTS = 1 << 1;\n    const IS_BUNDLE_SPLITTABLE = 1 << 2;\n    const LARGE_BLOB = 1 << 3;\n    const HAS_CJS_EXPORTS = 1 << 4;\n    const STATIC_EXPORTS = 1 << 5;\n    const SHOULD_WRAP = 1 << 6;\n    const IS_CONSTANT_MODULE = 1 << 7;\n    const HAS_NODE_REPLACEMENTS = 1 << 8;\n    const HAS_SYMBOLS = 1 << 9;\n    const IS_HTML_ATTR = 1 << 10;\n    const IS_HTML_TAG = 1 << 11;\n  }\n}\n\nimpl_bitflags_serde!(AssetFlags);\n"
  },
  {
    "path": "crates/core/src/dependency.rs",
    "content": "use std::{\n  hash::{DefaultHasher, Hash, Hasher},\n  path::PathBuf,\n  sync::Arc,\n};\n\nuse crate::{BundleBehavior, environment::Environment};\nuse crate::{SourceLocation, impl_bitflags_serde};\nuse bitflags::bitflags;\nuse serde::{Deserialize, Serialize};\n\n#[derive(Debug, Clone, Serialize, Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct Dependency {\n  pub specifier: String,\n  pub specifier_type: SpecifierType,\n  pub priority: Priority,\n  pub bundle_behavior: BundleBehavior,\n  pub flags: DependencyFlags,\n  pub env: Arc<Environment>,\n  #[serde(default)]\n  pub loc: Option<SourceLocation>,\n  #[serde(default)]\n  pub placeholder: Option<String>,\n  pub resolve_from: Option<PathBuf>,\n  pub range: Option<String>,\n}\n\nimpl Dependency {\n  pub fn set_placeholder(&mut self) -> &str {\n    let mut hasher = DefaultHasher::new();\n    self.specifier.hash(&mut hasher);\n    self.specifier_type.hash(&mut hasher);\n    self.flags.hash(&mut hasher);\n    self.priority.hash(&mut hasher);\n    self.env.output_format.hash(&mut hasher);\n    self.env.source_type.hash(&mut hasher);\n    self.bundle_behavior.hash(&mut hasher);\n    self.placeholder = Some(format!(\"{:x}\", hasher.finish()));\n    self.placeholder.as_ref().unwrap()\n  }\n}\n\n#[derive(Clone, Copy, Default, PartialEq, Eq, Hash, Debug, Serialize, Deserialize)]\n#[serde(rename_all = \"lowercase\")]\npub enum SpecifierType {\n  #[default]\n  Esm,\n  Commonjs,\n  Url,\n  Custom,\n}\n\n#[derive(Clone, Copy, Default, PartialEq, Eq, Hash, Debug, Serialize, Deserialize)]\n#[serde(rename_all = \"lowercase\")]\npub enum Priority {\n  #[default]\n  Sync,\n  Parallel,\n  Lazy,\n}\n\nbitflags! {\n  #[derive(Debug, Clone, Copy, Hash)]\n  pub struct DependencyFlags: u8 {\n    const ENTRY    = 1 << 0;\n    const OPTIONAL = 1 << 1;\n    const NEEDS_STABLE_NAME = 1 << 2;\n    const SHOULD_WRAP = 1 << 3;\n    const IS_ESM = 1 << 4;\n    const IS_WEBWORKER = 1 << 5;\n    const HAS_SYMBOLS = 1 << 6;\n  }\n}\n\nimpl_bitflags_serde!(DependencyFlags);\n"
  },
  {
    "path": "crates/core/src/diagnostic.rs",
    "content": "use std::path::PathBuf;\n\nuse serde::{Deserialize, Serialize};\n\nuse crate::{AssetType, Location, SourceLocation};\n\n#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]\n#[serde(rename_all = \"camelCase\")]\npub struct Diagnostic {\n  /// The message to log.\n  pub message: String,\n  /// Name of plugin or file that threw this error.\n  pub origin: Option<String>,\n  pub code_frames: Vec<CodeFrame>,\n  pub hints: Vec<String>,\n  pub severity: DiagnosticSeverity,\n  #[serde(rename = \"documentationURL\")]\n  pub documentation_url: Option<String>,\n}\n\n#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]\n#[serde(rename_all = \"camelCase\")]\npub struct CodeFrame {\n  pub code: Option<String>,\n  pub file_path: Option<PathBuf>,\n  pub language: Option<AssetType>,\n  pub code_highlights: Vec<CodeHighlight>,\n}\n\n#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]\npub struct CodeHighlight {\n  pub message: Option<String>,\n  pub start: Location,\n  pub end: Location,\n}\n\n#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Clone)]\npub enum DiagnosticSeverity {\n  /// Fails the build with an error.\n  Error,\n  /// Logs a warning, but the build does not fail.\n  Warning,\n  /// An error if this is source code in the project, or a warning if in node_modules.\n  SourceError,\n  /// An informative message.\n  Info,\n}\n\nimpl CodeHighlight {\n  pub fn from_loc(loc: &SourceLocation, message: Option<String>) -> CodeHighlight {\n    CodeHighlight {\n      message,\n      start: loc.start.clone(),\n      end: Location {\n        line: loc.end.line,\n        column: loc.end.column - 1,\n      },\n    }\n  }\n\n  pub fn from_json(\n    start: json_sourcemap::Location,\n    end: json_sourcemap::Location,\n    message: Option<&str>,\n  ) -> Self {\n    CodeHighlight {\n      message: message.map(|m| m.to_owned()),\n      start: Location {\n        line: start.line as u32 + 1,\n        column: start.column as u32 + 1,\n      },\n      end: Location {\n        line: end.line as u32 + 1,\n        column: end.column as u32,\n      },\n    }\n  }\n}\n\nimpl std::fmt::Display for Diagnostic {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    f.write_str(&self.message)\n  }\n}\n\nimpl std::error::Error for Diagnostic {}\n\nimpl From<std::io::Error> for Diagnostic {\n  fn from(value: std::io::Error) -> Self {\n    Diagnostic {\n      origin: Some(\"@parcel/core\".into()),\n      message: value.to_string(),\n      code_frames: Vec::new(),\n      hints: Vec::new(),\n      severity: DiagnosticSeverity::Error,\n      documentation_url: None,\n    }\n  }\n}\n\nimpl From<json_sourcemap::Error> for Diagnostic {\n  fn from(value: json_sourcemap::Error) -> Self {\n    Diagnostic {\n      origin: Some(\"@parcel/core\".into()),\n      message: value.to_string(),\n      code_frames: Vec::new(),\n      hints: Vec::new(),\n      severity: DiagnosticSeverity::Error,\n      documentation_url: None,\n    }\n  }\n}\n\n// pub(crate) struct EscapeMarkdown<'a, T>(pub &'a T);\n\n// fn escape_markdown(s: &str) -> Cow<'_, str> {\n//   let mut result = Cow::Borrowed(\"\");\n//   let mut start = 0;\n//   for (index, matched) in s.match_indices(&['*', '_', '~', '\\\\']) {\n//     result += &s[start..index];\n//     result += \"\\\\\";\n//     result += matched;\n//     start = index + 1;\n//   }\n\n//   result += &s[start..];\n//   result\n// }\n\n// impl<'a, T: std::fmt::Debug> std::fmt::Debug for EscapeMarkdown<'a, T> {\n//   fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n//     let res = format!(\"{:?}\", self.0);\n//     escape_markdown(&res).fmt(f)\n//   }\n// }\n\n// impl<'a, T: std::fmt::Display> std::fmt::Display for EscapeMarkdown<'a, T> {\n//   fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n//     let res = format!(\"{}\", self.0);\n//     escape_markdown(&res).fmt(f)\n//   }\n// }\n\n// macro_rules! format_markdown {\n//   ($s: literal, $($arg: expr),+) => {\n//     format!($s, $(crate::diagnostic::EscapeMarkdown(&$arg)),+)\n//   };\n// }\n\n// pub(crate) use format_markdown;\n\n// pub(crate) struct EscapeJSONKeyComponent<'a, T>(pub &'a T);\n\n// fn escape_json_key_component(s: &str) -> Cow<'_, str> {\n//   let mut result = Cow::Borrowed(\"\");\n//   let mut start = 0;\n//   for (index, matched) in s.match_indices(&['~', '/']) {\n//     result += &s[start..index];\n//     result += match matched {\n//       \"~\" => \"~0\",\n//       \"/\" => \"~1\",\n//       _ => unreachable!(),\n//     };\n//     start = index + 1;\n//   }\n\n//   result += &s[start..];\n//   result\n// }\n\n// impl<'a, T: std::fmt::Debug> std::fmt::Debug for EscapeJSONKeyComponent<'a, T> {\n//   fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n//     let res = format!(\"{:?}\", self.0);\n//     escape_json_key_component(&res).fmt(f)\n//   }\n// }\n\n// impl<'a, T: std::fmt::Display> std::fmt::Display for EscapeJSONKeyComponent<'a, T> {\n//   fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n//     let res = format!(\"{}\", self.0);\n//     escape_json_key_component(&res).fmt(f)\n//   }\n// }\n\n// macro_rules! json_key {\n//   ($s: literal, $($arg: expr),+) => {\n//     format!($s, $(crate::diagnostic::EscapeJSONKeyComponent(&$arg)),+)\n//   };\n// }\n\n// pub(crate) use json_key;\n"
  },
  {
    "path": "crates/core/src/environment.rs",
    "content": "use std::{collections::HashMap, num::NonZeroU16, str::FromStr};\n\nuse crate::{SourceLocation, impl_bitflags_serde};\nuse bitflags::bitflags;\nuse browserslist::Distrib;\nuse serde::{Deserialize, Serialize};\n\n#[derive(Clone, Debug, Default, Serialize, Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct Environment {\n  pub context: EnvironmentContext,\n  pub output_format: OutputFormat,\n  pub source_type: SourceType,\n  pub flags: EnvironmentFlags,\n  pub source_map: Option<TargetSourceMapOptions>,\n  pub loc: Option<SourceLocation>,\n  pub include_node_modules: IncludeNodeModules,\n  pub engines: Engines,\n}\n\nimpl Environment {\n  pub fn should_scope_hoist(&self) -> bool {\n    self.flags.contains(EnvironmentFlags::SHOULD_SCOPE_HOIST)\n  }\n}\n\n#[derive(PartialEq, Eq, Clone, Debug, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct TargetSourceMapOptions {\n  source_root: Option<String>,\n  inline: Option<bool>,\n  inline_sources: Option<bool>,\n}\n\n/// Describes which modules in node_modules should be resolved.\n#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(untagged)]\npub enum IncludeNodeModules {\n  /// Whether or not to include all node_modules.\n  Bool(bool),\n  /// An array of node_modules to include.\n  Array(Vec<String>),\n  /// A mapping of node_modules and whether to include them.\n  Map(HashMap<String, bool>),\n}\n\nimpl Default for IncludeNodeModules {\n  fn default() -> Self {\n    IncludeNodeModules::Bool(true)\n  }\n}\n\n#[derive(PartialEq, Eq, Clone, Debug, Hash, Default, Serialize, Deserialize)]\npub struct Engines {\n  #[serde(default)]\n  pub browsers: Browsers,\n  pub electron: Option<Version>,\n  pub node: Option<Version>,\n  pub parcel: Option<Version>,\n}\n\n#[derive(PartialEq, Clone, Copy, PartialOrd, Ord, Eq, Hash)]\npub struct Version(NonZeroU16);\n\nimpl Version {\n  pub fn new(major: NonZeroU16, minor: u16) -> Self {\n    Version(NonZeroU16::new((major.get() & 0xff) << 8 | (minor & 0xff)).unwrap())\n  }\n\n  pub fn major(&self) -> u16 {\n    self.0.get() >> 8\n  }\n\n  pub fn minor(&self) -> u16 {\n    self.0.get() & 0xff\n  }\n}\n\nimpl FromStr for Version {\n  type Err = ();\n\n  fn from_str(version: &str) -> Result<Self, Self::Err> {\n    let version = version.split('-').next();\n    if version.is_none() {\n      return Err(());\n    }\n\n    let mut version = version.unwrap().split('.');\n    let major = version.next().and_then(|v| v.parse::<NonZeroU16>().ok());\n    if let Some(major) = major {\n      let minor = version\n        .next()\n        .and_then(|v| v.parse::<u16>().ok())\n        .unwrap_or(0);\n      // let patch = version.next().and_then(|v| v.parse::<u32>().ok()).unwrap_or(0);\n      return Ok(Version::new(major, minor));\n    }\n\n    Err(())\n  }\n}\n\nimpl std::fmt::Display for Version {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    write!(f, \">= {}\", self.major())?;\n    if self.minor() > 0 {\n      write!(f, \"{}\", self.minor())?;\n    }\n    Ok(())\n  }\n}\n\nimpl std::fmt::Debug for Version {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    write!(f, \"{}\", self.major())?;\n    if self.minor() > 0 {\n      write!(f, \"{}\", self.minor())?;\n    }\n    Ok(())\n  }\n}\n\nimpl serde::Serialize for Version {\n  fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n  where\n    S: serde::Serializer,\n  {\n    format!(\"{}\", self).serialize(serializer)\n  }\n}\n\nimpl<'de> serde::Deserialize<'de> for Version {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    let v: String = serde::Deserialize::deserialize(deserializer)?;\n    if let Some(version) = node_semver::Range::parse(v.as_str())\n      .ok()\n      .and_then(|r| r.min_version())\n    {\n      Ok(Version(\n        NonZeroU16::new((version.major as u16) << 8 | (version.minor as u16))\n          .ok_or(serde::de::Error::custom(\"version must be > 0\"))?,\n      ))\n    } else {\n      Err(serde::de::Error::custom(\"invalid semver range\"))\n    }\n  }\n}\n\n#[derive(Default, PartialEq, Eq, Clone, Debug, Hash)]\npub struct Browsers {\n  pub android: Option<Version>,\n  pub chrome: Option<Version>,\n  pub edge: Option<Version>,\n  pub firefox: Option<Version>,\n  pub ie: Option<Version>,\n  pub ios_saf: Option<Version>,\n  pub opera: Option<Version>,\n  pub safari: Option<Version>,\n  pub samsung: Option<Version>,\n}\n\nimpl std::fmt::Display for Browsers {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    let mut first = true;\n    macro_rules! browser {\n      ($b: ident) => {\n        if let Some(v) = self.$b {\n          if !first {\n            write!(f, \", \")?;\n          }\n          #[allow(unused_assignments)]\n          {\n            first = false;\n          }\n          write!(f, \"{} {}\", stringify!($b), v)?;\n        }\n      };\n    }\n\n    browser!(android);\n    browser!(chrome);\n    browser!(edge);\n    browser!(firefox);\n    browser!(ie);\n    browser!(ios_saf);\n    browser!(opera);\n    browser!(safari);\n    browser!(samsung);\n    Ok(())\n  }\n}\n\nimpl From<Vec<Distrib>> for Browsers {\n  fn from(distribs: Vec<Distrib>) -> Self {\n    let mut browsers = Browsers::default();\n    for distrib in distribs {\n      macro_rules! browser {\n        ($browser: ident) => {{\n          if let Ok(v) = distrib.version().parse() {\n            if browsers.$browser.is_none() || v < browsers.$browser.unwrap() {\n              browsers.$browser = Some(v);\n            }\n          }\n        }};\n      }\n\n      match distrib.name() {\n        \"android\" => browser!(android),\n        \"chrome\" | \"and_chr\" => browser!(chrome),\n        \"edge\" => browser!(edge),\n        \"firefox\" | \"and_ff\" => browser!(firefox),\n        \"ie\" => browser!(ie),\n        \"ios_saf\" => browser!(ios_saf),\n        \"opera\" | \"op_mob\" => browser!(opera),\n        \"safari\" => browser!(safari),\n        \"samsung\" => browser!(samsung),\n        _ => {}\n      }\n    }\n\n    browsers\n  }\n}\n\n#[derive(Serialize, Deserialize)]\nstruct SerializedBrowsers {\n  pub android: Option<Version>,\n  pub chrome: Option<Version>,\n  pub edge: Option<Version>,\n  pub firefox: Option<Version>,\n  pub ie: Option<Version>,\n  pub ios_saf: Option<Version>,\n  pub opera: Option<Version>,\n  pub safari: Option<Version>,\n  pub samsung: Option<Version>,\n}\n\nimpl serde::Serialize for Browsers {\n  fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n  where\n    S: serde::Serializer,\n  {\n    if serializer.is_human_readable() {\n      format!(\"{}\", self).serialize(serializer)\n    } else {\n      let s = SerializedBrowsers {\n        android: self.android,\n        chrome: self.chrome,\n        edge: self.edge,\n        firefox: self.firefox,\n        ie: self.ie,\n        ios_saf: self.ios_saf,\n        opera: self.opera,\n        safari: self.safari,\n        samsung: self.samsung,\n      };\n      s.serialize(serializer)\n    }\n  }\n}\n\nimpl<'de> serde::Deserialize<'de> for Browsers {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    if deserializer.is_human_readable() {\n      let value = serde_value::Value::deserialize(deserializer)?;\n      let browsers = match value {\n        serde_value::Value::String(s) => vec![s],\n        value => Vec::<String>::deserialize(serde_value::ValueDeserializer::new(value))?,\n      };\n      let distribs = browserslist::resolve(browsers, &Default::default()).unwrap_or(Vec::new());\n      Ok(distribs.into())\n    } else {\n      let s = SerializedBrowsers::deserialize(deserializer)?;\n      Ok(Browsers {\n        android: s.android,\n        chrome: s.chrome,\n        edge: s.edge,\n        firefox: s.firefox,\n        ie: s.ie,\n        ios_saf: s.ios_saf,\n        opera: s.opera,\n        safari: s.safari,\n        samsung: s.samsung,\n      })\n    }\n  }\n}\n\n// List of browsers to exclude when the esmodule target is specified.\n// Based on https://caniuse.com/#feat=es6-module\nconst ESMODULE_BROWSERS: &'static [&'static str] = &[\n  \"not ie <= 11\",\n  \"not edge < 16\",\n  \"not firefox < 60\",\n  \"not chrome < 61\",\n  \"not safari < 11\",\n  \"not opera < 48\",\n  \"not ios_saf < 11\",\n  \"not op_mini all\",\n  \"not android < 76\",\n  \"not blackberry > 0\",\n  \"not op_mob > 0\",\n  \"not and_chr < 76\",\n  \"not and_ff < 68\",\n  \"not ie_mob > 0\",\n  \"not and_uc > 0\",\n  \"not samsung < 8.2\",\n  \"not and_qq > 0\",\n  \"not baidu > 0\",\n  \"not kaios > 0\",\n];\n\npub enum EnvironmentFeature {\n  Esmodules,\n  DynamicImport,\n  WorkerModule,\n  ServiceWorkerModule,\n  ImportMetaUrl,\n  ArrowFunctions,\n  GlobalThis,\n}\n\nimpl EnvironmentFeature {\n  pub fn engines(&self) -> Engines {\n    match self {\n      EnvironmentFeature::WorkerModule => Engines {\n        browsers: Browsers {\n          edge: Some(Version::new(NonZeroU16::new(80).unwrap(), 0)),\n          chrome: Some(Version::new(NonZeroU16::new(80).unwrap(), 0)),\n          opera: Some(Version::new(NonZeroU16::new(67).unwrap(), 0)),\n          android: Some(Version::new(NonZeroU16::new(81).unwrap(), 0)),\n          ..Default::default()\n        },\n        ..Default::default()\n      },\n      EnvironmentFeature::DynamicImport => Engines {\n        browsers: Browsers {\n          edge: Some(Version::new(NonZeroU16::new(76).unwrap(), 0)),\n          firefox: Some(Version::new(NonZeroU16::new(67).unwrap(), 0)),\n          chrome: Some(Version::new(NonZeroU16::new(63).unwrap(), 0)),\n          safari: Some(Version::new(NonZeroU16::new(11).unwrap(), 1)),\n          opera: Some(Version::new(NonZeroU16::new(50).unwrap(), 0)),\n          ios_saf: Some(Version::new(NonZeroU16::new(11).unwrap(), 3)),\n          android: Some(Version::new(NonZeroU16::new(63).unwrap(), 0)),\n          samsung: Some(Version::new(NonZeroU16::new(8).unwrap(), 0)),\n          ..Default::default()\n        },\n        ..Default::default()\n      },\n      EnvironmentFeature::Esmodules => Engines {\n        browsers: Browsers {\n          edge: Some(Version::new(NonZeroU16::new(16).unwrap(), 0)),\n          firefox: Some(Version::new(NonZeroU16::new(60).unwrap(), 0)),\n          chrome: Some(Version::new(NonZeroU16::new(61).unwrap(), 0)),\n          safari: Some(Version::new(NonZeroU16::new(10).unwrap(), 1)),\n          opera: Some(Version::new(NonZeroU16::new(48).unwrap(), 0)),\n          ios_saf: Some(Version::new(NonZeroU16::new(10).unwrap(), 3)),\n          android: Some(Version::new(NonZeroU16::new(76).unwrap(), 0)),\n          samsung: Some(Version::new(NonZeroU16::new(8).unwrap(), 2)),\n          ..Default::default()\n        },\n        ..Default::default()\n      },\n      _ => todo!(),\n    }\n  }\n}\n\nimpl Engines {\n  pub fn from_browserslist(browserslist: &str, output_format: OutputFormat) -> Engines {\n    let browsers = if output_format == OutputFormat::Esmodule {\n      // If the output format is esmodule, exclude browsers\n      // that support them natively so that we transpile less.\n      browserslist::resolve(\n        std::iter::once(browserslist).chain(ESMODULE_BROWSERS.iter().map(|s| *s)),\n        &Default::default(),\n      )\n    } else {\n      browserslist::resolve(std::iter::once(browserslist), &Default::default())\n    };\n\n    Engines {\n      browsers: browsers.map(|b| b.into()).unwrap_or_default(),\n      electron: None,\n      node: None,\n      parcel: None,\n    }\n  }\n\n  pub fn supports(&self, feature: EnvironmentFeature) -> bool {\n    let min = feature.engines();\n    macro_rules! check {\n      ($p: ident$(. $x: ident)*) => {{\n        if let Some(v) = self.$p$(.$x)* {\n          match min.$p$(.$x)* {\n            None => return false,\n            Some(v2) if v < v2 => return false,\n            _ => {}\n          }\n        }\n      }};\n    }\n\n    check!(browsers.android);\n    check!(browsers.chrome);\n    check!(browsers.edge);\n    check!(browsers.firefox);\n    check!(browsers.ie);\n    check!(browsers.ios_saf);\n    check!(browsers.opera);\n    check!(browsers.safari);\n    check!(browsers.samsung);\n    true\n  }\n}\n\nbitflags! {\n  #[derive(Clone, Copy, Hash, Debug, PartialEq, Eq, Default)]\n  pub struct EnvironmentFlags: u8 {\n    const IS_LIBRARY = 1 << 0;\n    const SHOULD_OPTIMIZE = 1 << 1;\n    const SHOULD_SCOPE_HOIST = 1 << 2;\n  }\n}\n\nimpl_bitflags_serde!(EnvironmentFlags);\n\n#[derive(PartialEq, Eq, Clone, Copy, Debug, Hash, Default, Serialize, Deserialize)]\n#[serde(rename_all = \"kebab-case\")]\npub enum EnvironmentContext {\n  #[default]\n  Browser,\n  WebWorker,\n  ServiceWorker,\n  Worklet,\n  Node,\n  ElectronMain,\n  ElectronRenderer,\n  ReactClient,\n  ReactServer,\n}\n\nimpl EnvironmentContext {\n  pub fn is_node(&self) -> bool {\n    use EnvironmentContext::*;\n    matches!(self, Node | ElectronMain | ElectronRenderer)\n  }\n\n  pub fn is_browser(&self) -> bool {\n    use EnvironmentContext::*;\n    matches!(\n      self,\n      Browser | WebWorker | ServiceWorker | Worklet | ElectronRenderer\n    )\n  }\n\n  pub fn is_worker(&self) -> bool {\n    use EnvironmentContext::*;\n    matches!(self, WebWorker | ServiceWorker)\n  }\n\n  pub fn is_electron(&self) -> bool {\n    use EnvironmentContext::*;\n    matches!(self, ElectronMain | ElectronRenderer)\n  }\n}\n\n#[derive(PartialEq, Eq, Clone, Copy, Debug, Hash, Default, Serialize, Deserialize)]\n#[serde(rename_all = \"lowercase\")]\npub enum SourceType {\n  #[default]\n  Module,\n  Script,\n}\n\n#[derive(PartialEq, Eq, Clone, Copy, Debug, Hash, Default, Serialize, Deserialize)]\n#[serde(rename_all = \"lowercase\")]\npub enum OutputFormat {\n  #[default]\n  Global,\n  Commonjs,\n  Esmodule,\n}\n"
  },
  {
    "path": "crates/core/src/lib.rs",
    "content": "use std::{hash::Hash, path::PathBuf};\n\nuse serde::{Deserialize, Serialize};\n\nmod asset;\nmod dependency;\nmod diagnostic;\nmod environment;\n\npub use asset::*;\npub use dependency::*;\npub use diagnostic::*;\npub use environment::*;\n\n// By default, bitflags serializes as a string, but we want the raw number instead.\nmacro_rules! impl_bitflags_serde {\n  ($t: ty) => {\n    impl Serialize for $t {\n      fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n      where\n        S: serde::Serializer,\n      {\n        self.bits().serialize(serializer)\n      }\n    }\n\n    impl<'de> Deserialize<'de> for $t {\n      fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n      where\n        D: serde::Deserializer<'de>,\n      {\n        let bits = Deserialize::deserialize(deserializer)?;\n        Ok(<$t>::from_bits_truncate(bits))\n      }\n    }\n  };\n}\n\npub(crate) use impl_bitflags_serde;\n\n#[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct SourceLocation {\n  pub file_path: PathBuf,\n  pub start: Location,\n  pub end: Location,\n}\n\n#[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize)]\npub struct Location {\n  pub line: u32,\n  pub column: u32,\n}\n\n#[derive(Debug, Default, PartialEq, Eq, Hash, Clone, Copy, Serialize, Deserialize)]\n#[serde(rename_all = \"lowercase\")]\npub enum BundleBehavior {\n  #[default]\n  None,\n  Inline,\n  Isolated,\n}\n"
  },
  {
    "path": "crates/dev-dep-resolver/Cargo.toml",
    "content": "[package]\nauthors = [\"Devon Govett <devongovett@gmail.com>\"]\nname = \"parcel-dev-dep-resolver\"\nversion = \"0.1.0\"\nedition = \"2024\"\n\n[dependencies]\nparcel-resolver = { path = \"../parcel-resolver\" }\nes-module-lexer = { git = \"https://github.com/devongovett/es-module-lexer\" }\nserde_json = \"1.0.91\"\nrayon = \"1.7.0\"\ndashmap = \"6.1.0\"\nglob = \"0.3.1\"\n"
  },
  {
    "path": "crates/dev-dep-resolver/src/lib.rs",
    "content": "use std::{\n  borrow::Cow,\n  path::{Component, Path, PathBuf},\n};\n\nuse dashmap::{DashMap, DashSet};\nuse es_module_lexer::{ImportKind, lex};\nuse parcel_resolver::{\n  Invalidations, ModuleType, Resolution, ResolutionAndQuery, ResolveOptions, Resolver,\n  ResolverError, Specifier, SpecifierError, SpecifierType,\n};\n// use rayon::prelude::{ParallelBridge, ParallelIterator};\n\n#[derive(Debug)]\npub enum EsmGraphBuilderError {\n  IOError(std::io::Error),\n  ParseError,\n  ResolverError(ResolverError),\n  Dynamic,\n  PatternError(glob::PatternError),\n  GlobError(glob::GlobError),\n  SpecifierError(SpecifierError),\n}\n\nimpl From<std::io::Error> for EsmGraphBuilderError {\n  fn from(e: std::io::Error) -> Self {\n    EsmGraphBuilderError::IOError(e)\n  }\n}\n\nimpl From<usize> for EsmGraphBuilderError {\n  fn from(_: usize) -> Self {\n    EsmGraphBuilderError::ParseError\n  }\n}\n\nimpl From<ResolverError> for EsmGraphBuilderError {\n  fn from(e: ResolverError) -> Self {\n    EsmGraphBuilderError::ResolverError(e)\n  }\n}\n\nimpl From<glob::PatternError> for EsmGraphBuilderError {\n  fn from(value: glob::PatternError) -> Self {\n    EsmGraphBuilderError::PatternError(value)\n  }\n}\n\nimpl From<glob::GlobError> for EsmGraphBuilderError {\n  fn from(value: glob::GlobError) -> Self {\n    EsmGraphBuilderError::GlobError(value)\n  }\n}\n\nimpl From<SpecifierError> for EsmGraphBuilderError {\n  fn from(value: SpecifierError) -> Self {\n    EsmGraphBuilderError::SpecifierError(value)\n  }\n}\n\n#[derive(Default)]\npub struct Cache {\n  entries: DashMap<PathBuf, Invalidations>,\n}\n\nstruct EsmGraphBuilder<'a> {\n  visited: DashSet<PathBuf>,\n  visited_globs: DashSet<PathBuf>,\n  invalidations: Invalidations,\n  cjs_resolver: Resolver<'a>,\n  esm_resolver: Resolver<'a>,\n  cache: &'a Cache,\n}\n\nimpl<'a> EsmGraphBuilder<'a> {\n  pub fn build(&self, file: &Path) -> Result<(), EsmGraphBuilderError> {\n    if self.visited.contains(file) {\n      return Ok(());\n    }\n\n    self.visited.insert(file.to_owned());\n\n    if let Some(ext) = file.extension() {\n      if ext != \"js\" && ext != \"cjs\" && ext != \"mjs\" {\n        // Ignore.\n        return Ok(());\n      }\n    }\n\n    if let Some(invalidations) = self.cache.entries.get(file) {\n      self.invalidations.extend(&invalidations);\n      for p in invalidations.invalidate_on_file_change.borrow().iter() {\n        self.build(p.as_path())?;\n      }\n      return Ok(());\n    }\n\n    let invalidations = Invalidations::default();\n    let module_type = self\n      .esm_resolver\n      .resolve_module_type(file, &invalidations)?;\n    let resolver = match module_type {\n      ModuleType::CommonJs | ModuleType::Json => &self.cjs_resolver,\n      ModuleType::Module => &self.esm_resolver,\n    };\n    let contents = resolver.cache().fs.read_to_string(file)?;\n    let module = lex(&contents)?;\n    #[allow(clippy::map_collect_result_unit)]\n    module\n      .imports()\n      // .par_bridge()\n      .map(|import| -> Result<(), EsmGraphBuilderError> {\n        match import.kind() {\n          ImportKind::DynamicExpression => {\n            if let Some(glob) = specifier_to_glob(&import.specifier()) {\n              // println!(\"GLOB {:?} {:?}\", import.specifier(), glob);\n              self.expand_glob(&glob, file, resolver, &invalidations)?;\n            } else {\n              // println!(\"DYNAMIC: {} {:?}\", import.specifier(), file);\n              invalidations.invalidate_on_startup();\n            }\n          }\n          ImportKind::DynamicString | ImportKind::Standard => {\n            // Skip flow type imports.\n            if import.statement().starts_with(\"import type \") {\n              return Ok(());\n            }\n\n            if let Ok(ResolutionAndQuery {\n              resolution: Resolution::Path(p),\n              ..\n            }) = resolver.resolve_with_invalidations(\n              &import.specifier(),\n              file,\n              SpecifierType::Esm,\n              &invalidations,\n              ResolveOptions::default(),\n            ) {\n              // println!(\n              //   \"IMPORT {} {:?} {:?} {:?}\",\n              //   import.specifier(),\n              //   import.kind(),\n              //   file,\n              //   p\n              // );\n              invalidations.invalidate_on_file_change(resolver.cache().get(&p));\n              self.build(&p)?;\n            } else {\n              // Ignore dependencies that don't resolve to anything.\n              // The resolver calls invalidate_on_file_create already.\n            }\n          }\n          ImportKind::Meta => {}\n        }\n\n        Ok(())\n      })\n      .collect::<Result<(), _>>()?;\n\n    self.invalidations.extend(&invalidations);\n    self.cache.entries.insert(file.to_owned(), invalidations);\n    Ok(())\n  }\n\n  pub fn expand_glob(\n    &self,\n    pattern: &str,\n    from: &Path,\n    resolver: &Resolver<'a>,\n    invalidations: &Invalidations,\n  ) -> Result<(), EsmGraphBuilderError> {\n    // Parse the specifier. If it is a bare specifier, resolve the package first\n    // and append the subpath back on to generate the final glob. Otherwise, convert\n    // the glob to an absolute path.\n    let specifier = Specifier::parse(pattern, SpecifierType::Esm, resolver.flags)?;\n    let pattern = match specifier {\n      (Specifier::Absolute(path), _) => path,\n      (Specifier::Relative(relative), _) => Cow::Owned(resolve_path(from, relative)),\n      (Specifier::Package(mut package, subpath), _) => {\n        // Resolve the package.json file within the package rather than the package entry.\n        // TODO: how should we handle package exports?\n        package += \"/package.json\";\n        match resolver.resolve_with_invalidations(\n          &package,\n          from,\n          SpecifierType::Esm,\n          invalidations,\n          ResolveOptions::default(),\n        ) {\n          Ok(ResolutionAndQuery {\n            resolution: Resolution::Path(p),\n            ..\n          }) => Cow::Owned(p.parent().unwrap().join(subpath.as_ref())),\n          _ => return Ok(()),\n        }\n      }\n      _ => return Ok(()),\n    };\n\n    // Invalidate when new files match the glob.\n    invalidations.invalidate_on_glob_create(pattern.to_string_lossy());\n\n    if self.visited_globs.contains(pattern.as_ref()) {\n      return Ok(());\n    }\n\n    self.visited_globs.insert(pattern.to_path_buf());\n\n    for path in glob::glob(pattern.to_string_lossy().as_ref())? {\n      let path = path?;\n      invalidations.invalidate_on_file_change(resolver.cache().get(&path));\n      self.build(&path)?;\n    }\n\n    Ok(())\n  }\n}\n\n/// Attempts to convert a dynamic specifier with string interpolations into a glob.\n/// The expression must either start with a string literal with string concatenations,\n/// or be a template literal.\nfn specifier_to_glob(specifier: &str) -> Option<String> {\n  let mut bytes = specifier.as_bytes();\n  let mut result = String::new();\n  while let Some((s, b)) = read_string(bytes) {\n    if result.ends_with(\"**\") && !s.starts_with('/') {\n      result.push_str(\"/*\");\n    }\n    result.push_str(&s);\n    bytes = skip_comments_and_whitespace(b);\n    if bytes.is_empty() {\n      break;\n    }\n\n    if bytes[0] == b'+' {\n      let mut added = false;\n      loop {\n        bytes = skip_comments_and_whitespace(&bytes[1..]);\n        let ptr = bytes.as_ptr();\n        let rest = skip_expression(bytes);\n        if !added && ptr != rest.as_ptr() {\n          if result.ends_with('/') {\n            result.push_str(\"**\");\n          } else {\n            result.push_str(\"*/**\");\n          }\n          added = true;\n        }\n        bytes = skip_comments_and_whitespace(rest);\n        if bytes.is_empty() || matches!(bytes[0], b'\"' | b'\\'') {\n          break;\n        }\n      }\n    } else {\n      return None;\n    }\n  }\n\n  if result.is_empty() {\n    None\n  } else {\n    Some(result)\n  }\n}\n\nfn read_string(bytes: &[u8]) -> Option<(Cow<'_, str>, &[u8])> {\n  if bytes.is_empty() {\n    return None;\n  }\n\n  let quote = bytes[0];\n  if quote == b'`' {\n    return read_template_string(bytes);\n  }\n\n  if quote != b'\\'' && quote != b'\"' {\n    return None;\n  }\n\n  let mut i = 1;\n  while i < bytes.len() {\n    match bytes[i] {\n      b'\\\\' => {\n        i += 1;\n        if i + 1 < bytes.len() && bytes[i] == b'\\r' && bytes[i + 1] == b'\\n' {\n          i += 1;\n        }\n      }\n      b'\\r' | b'\\n' => break,\n      c if c == quote => {\n        return Some((\n          escape_glob(unsafe { std::str::from_utf8_unchecked(&bytes[1..i]) }),\n          &bytes[i + 1..],\n        ));\n      }\n      _ => {}\n    }\n\n    i += 1;\n  }\n\n  None\n}\n\nfn read_template_string(mut bytes: &[u8]) -> Option<(Cow<'_, str>, &[u8])> {\n  let mut i = 1;\n  let mut braces = 0;\n  let mut result = Cow::Borrowed(\"\");\n  let mut start = 1;\n  while i < bytes.len() {\n    match bytes[i] {\n      b'$' if braces == 0 && i + 1 < bytes.len() && bytes[i + 1] == b'{' => {\n        // Add current segment.\n        let s = unsafe { std::str::from_utf8_unchecked(&bytes[start..i]) };\n        if !s.is_empty() {\n          if result.ends_with(\"**\") && !s.starts_with('/') {\n            result += \"/*\";\n          }\n          result += escape_glob(unsafe { std::str::from_utf8_unchecked(&bytes[start..i]) });\n        } else if result.is_empty() {\n          return None;\n        }\n\n        if result.ends_with('/') {\n          result += \"**\";\n        } else {\n          result += \"*/**\";\n        }\n        i += 1;\n        braces += 1;\n      }\n      b'}' if braces > 0 => {\n        braces -= 1;\n        if braces == 0 {\n          start = i + 1;\n        }\n      }\n      b'\\\\' if braces == 0 => {\n        i += 1;\n      }\n      b'`' if braces == 0 => {\n        // String end. Add last segment.\n        let s = escape_glob(unsafe { std::str::from_utf8_unchecked(&bytes[start..i]) });\n        if !s.is_empty() {\n          if result.ends_with(\"**\") && !s.starts_with('/') {\n            result += \"/*\";\n          }\n          if result.is_empty() {\n            return Some((s, &bytes[i + 1..]));\n          }\n          result += s;\n        }\n        return Some((result, &bytes[i + 1..]));\n      }\n      _ => {}\n    }\n\n    i += 1;\n    if braces > 0 {\n      bytes = skip_comments_and_whitespace(&bytes[i..]);\n      i = 0;\n    }\n  }\n\n  None\n}\n\nfn escape_glob(s: &str) -> Cow<'_, str> {\n  let mut result = Cow::Borrowed(\"\");\n  let mut start = 0;\n  for (index, matched) in s.match_indices(&['*', '?', '[', ']', '{', '}', '(', ')', '!', '\\\\']) {\n    result += &s[start..index];\n    result += \"\\\\\";\n    result += matched;\n    start = index + 1;\n  }\n\n  result += &s[start..];\n  result\n}\n\nfn skip_comments_and_whitespace(bytes: &[u8]) -> &[u8] {\n  let mut i = 0;\n  while i < bytes.len() {\n    let ch = bytes[i];\n    if ch == b'/' {\n      if i + 1 < bytes.len() {\n        let next_ch = bytes[i + 1];\n        i += 2;\n        if next_ch == b'/' {\n          while i < bytes.len() {\n            let ch = bytes[i];\n            if matches!(ch, b'\\n' | b'\\r') {\n              break;\n            }\n            i += 1;\n          }\n        } else if next_ch == b'*' {\n          while i < bytes.len() {\n            let ch = bytes[i];\n            if ch == b'*' && i + 1 < bytes.len() && bytes[i + 1] == b'/' {\n              i += 2;\n              break;\n            }\n            i += 1;\n          }\n        }\n      }\n    } else if !is_br_or_ws(ch) {\n      return &bytes[i..];\n    }\n    i += 1;\n  }\n\n  &bytes[i..]\n}\n\nfn skip_expression(mut bytes: &[u8]) -> &[u8] {\n  let mut stack: [u8; 1024] = [0; 1024];\n  let mut stack_len = 0;\n  while !bytes.is_empty() {\n    bytes = skip_comments_and_whitespace(bytes);\n    if !bytes.is_empty() {\n      let ch = bytes[0];\n\n      match ch {\n        b'{' | b'(' | b'[' => {\n          if stack_len >= stack.len() {\n            return bytes;\n          }\n\n          stack[stack_len] = ch;\n          stack_len += 1;\n        }\n        ch @ (b'}' | b')' | b']') => {\n          let opposite = match ch {\n            b'}' => b'{',\n            b')' => b'(',\n            b']' => b'[',\n            _ => unreachable!(),\n          };\n          if stack_len > 0 && opposite == stack[stack_len - 1] {\n            stack_len -= 1;\n          } else {\n            return bytes;\n          }\n        }\n        b'+' if stack_len == 0 && bytes.len() > 1 => return &bytes[1..],\n        b'\\'' | b'\"' if stack_len == 0 => return bytes,\n        _ => {}\n      }\n    }\n    bytes = &bytes[1..]\n  }\n\n  bytes\n}\n\n#[inline]\nfn is_br_or_ws(c: u8) -> bool {\n  c > 8 && c < 14 || c == 32 || c == 160\n}\n\npub fn resolve_path<A: AsRef<Path>, B: AsRef<Path>>(base: A, subpath: B) -> PathBuf {\n  let subpath = subpath.as_ref();\n  let mut components = subpath.components().peekable();\n  if subpath.is_absolute() || matches!(components.peek(), Some(Component::Prefix(..))) {\n    return subpath.to_path_buf();\n  }\n\n  let mut ret = base.as_ref().to_path_buf();\n  ret.pop();\n  for component in subpath.components() {\n    match component {\n      Component::Prefix(..) | Component::RootDir => unreachable!(),\n      Component::CurDir => {}\n      Component::ParentDir => {\n        ret.pop();\n      }\n      Component::Normal(c) => {\n        ret.push(c);\n      }\n    }\n  }\n\n  ret\n}\n\npub fn build_esm_graph(\n  file: &Path,\n  project_root: &Path,\n  resolver_cache: &parcel_resolver::Cache,\n  cache: &Cache,\n) -> Result<Invalidations, EsmGraphBuilderError> {\n  let visitor = EsmGraphBuilder {\n    visited: DashSet::new(),\n    visited_globs: DashSet::new(),\n    invalidations: Invalidations::default(),\n    cjs_resolver: Resolver::node(project_root, resolver_cache),\n    esm_resolver: Resolver::node_esm(project_root, resolver_cache),\n    cache,\n  };\n\n  visitor.build(file)?;\n  Ok(visitor.invalidations)\n}\n\n#[cfg(test)]\nmod tests {\n  use super::*;\n\n  #[test]\n  fn test_glob() {\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + name + '.js'\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features' + name + '.js'\"),\n      Some(\"caniuse-lite/data/features*/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + name + '/index.js'\"),\n      Some(\"caniuse-lite/data/features/**/index.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + (a + b) + '.js'\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + (a ? 'foo' : 'bar') + '.js'\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + a + b + '.js'\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + a + 'test' + '.js'\"),\n      Some(\"caniuse-lite/data/features/**/*test.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + a + /* 'hello' */ + '.js'\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + a + \\n // 'hello'\\n + '.js'\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + foo('hi') + '.js'\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' + 'hi' + '.js'\"),\n      Some(\"caniuse-lite/data/features/hi.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/[features]/' + name + '.js'\"),\n      Some(\"caniuse-lite/data/\\\\[features\\\\]/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"`caniuse-lite/data/features/${name}.js`\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"`caniuse-lite/data/features${name}.js`\"),\n      Some(\"caniuse-lite/data/features*/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"`caniuse-lite/data/[features]/${name}.js`\"),\n      Some(\"caniuse-lite/data/\\\\[features\\\\]/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"`caniuse-lite/data/features/${/* } */ name}.js`\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(\n      specifier_to_glob(\"`caniuse-lite/data/features/${\\n// }\\n name}.js`\"),\n      Some(\"caniuse-lite/data/features/**/*.js\".into())\n    );\n    assert_eq!(specifier_to_glob(\"file\"), None);\n    assert_eq!(specifier_to_glob(\"file + '.js'\"), None);\n    assert_eq!(specifier_to_glob(\"test\"), None);\n    assert_eq!(specifier_to_glob(\"name + 'test'\"), None);\n    assert_eq!(specifier_to_glob(\"`${name}/test`\"), None);\n    assert_eq!(\n      specifier_to_glob(\"'caniuse-lite/data/features/' - '.js'\"),\n      None\n    );\n  }\n}\n"
  },
  {
    "path": "crates/dev-dep-resolver/src/main.rs",
    "content": "use parcel_dev_dep_resolver::build_esm_graph;\nuse parcel_resolver::{Cache, Resolution, Resolver, SpecifierType};\n\nfn main() {\n  let contents = std::fs::read_to_string(\"package.json\").unwrap();\n  let pkg: serde_json::Value = serde_json::from_str(&contents).unwrap();\n  let deps = pkg.get(\"dependencies\").unwrap().as_object().unwrap();\n  let cwd = std::env::current_dir().unwrap();\n\n  let cache = Cache::default();\n  let cjs_resolver = Resolver::node(&cwd, &cache);\n  let esm_graph_cache = parcel_dev_dep_resolver::Cache::default();\n\n  deps.keys().for_each(|dep| {\n    #[cfg(debug_assertions)]\n    println!(\"------------ {} -----------\", dep);\n    let resolved = match cjs_resolver.resolve(dep, &cwd, SpecifierType::Esm).result {\n      Ok(res) => res.resolution,\n      Err(e) => {\n        #[cfg(debug_assertions)]\n        println!(\"FAILED TO RESOLVE {} {:?}\", dep, e);\n        return;\n      }\n    };\n\n    if let Resolution::Path(p) = resolved {\n      match build_esm_graph(&p, &cwd, &cache, &esm_graph_cache) {\n        Ok(_res) => {\n          // #[cfg(debug_assertions)]\n          // println!(\"{:?}\", res)\n        }\n        Err(err) => {\n          #[cfg(debug_assertions)]\n          println!(\"FAIL: {:?}\", err)\n        }\n      }\n    }\n\n    #[cfg(debug_assertions)]\n    println!();\n  });\n}\n"
  },
  {
    "path": "crates/html/Cargo.toml",
    "content": "[package]\nauthors = [\"Devon Govett <devongovett@gmail.com>\"]\nname = \"parcel-html\"\nversion = \"0.1.0\"\nedition = \"2024\"\n\n[dependencies]\nhtml5ever = { git = \"https://github.com/devongovett/html5ever.git\", branch = \"xmlns-attrs\" }\nserde = { version = \"1.0.123\", features = [\"derive\"] }\nserde_bytes = \"0.11.5\"\nserde_json = \"1.0.91\"\ntyped-arena = \"2.0.2\"\nxml5ever = { git = \"https://github.com/devongovett/html5ever.git\", branch = \"xmlns-attrs\" }\ncssparser = \"0.34.0\"\noxvg_ast = { git = \"https://github.com/noahbald/oxvg.git\" }\noxvg_optimiser = { git = \"https://github.com/noahbald/oxvg.git\" }\nanyhow = \"*\"\nselectors = \"0.26\"\nswc_core = { version = \"21\", features = [\n  \"common\",\n  \"ecma_parser\",\n  \"ecma_ast\",\n  \"ecma_codegen\",\n] }\nlightningcss = \"1.0.0-alpha.63\"\nconvert_case = \"0.6.0\"\nindexmap = { version = \"1.9.2\", features = [\"serde\"] }\nref-cast = \"1.0\"\nparcel-core = { path = \"../core\" }\n\n[dev-dependencies]\nindoc = \"1.0.3\"\n"
  },
  {
    "path": "crates/html/src/arena.rs",
    "content": "// Copyright 2014-2017 The html5ever Project Developers. See the\n// COPYRIGHT file at the top-level directory of this distribution.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n// option. This file may not be copied, modified, or distributed\n// except according to those terms.\n\nuse html5ever::interface::tree_builder::{ElementFlags, NodeOrText, QuirksMode, TreeSink};\nuse html5ever::serialize::{Serialize, Serializer, TraversalScope};\nuse html5ever::tendril::StrTendril;\nuse html5ever::{Attribute, ExpandedName, QualName};\nuse std::borrow::Cow;\nuse std::cell::{Cell, RefCell};\nuse std::collections::{HashSet, VecDeque};\nuse std::io;\nuse std::ptr;\n\npub type Arena<'arena> = &'arena typed_arena::Arena<Node<'arena>>;\npub type Ref<'arena> = &'arena Node<'arena>;\ntype Link<'arena> = Cell<Option<Ref<'arena>>>;\n\n/// Sink struct is responsible for handling how the data that comes out of the HTML parsing\n/// unit (TreeBuilder in our case) is handled.\npub struct Sink<'arena> {\n  arena: Arena<'arena>,\n  document: Ref<'arena>,\n  quirks_mode: Cell<QuirksMode>,\n  line: Cell<u32>,\n}\n\nimpl<'arena> Sink<'arena> {\n  pub fn new(arena: Arena<'arena>) -> Self {\n    Sink {\n      arena,\n      document: arena.alloc(Node::new(NodeData::Document, 1)),\n      quirks_mode: Cell::new(QuirksMode::NoQuirks),\n      line: Cell::new(1),\n    }\n  }\n}\n\n/// DOM node which contains links to other nodes in the tree.\npub struct Node<'arena> {\n  pub parent: Link<'arena>,\n  pub next_sibling: Link<'arena>,\n  pub previous_sibling: Link<'arena>,\n  pub first_child: Link<'arena>,\n  pub last_child: Link<'arena>,\n  pub data: NodeData<'arena>,\n  pub line: u32,\n}\n\n/// HTML node data which can be an element, a comment, a string, a DOCTYPE, etc...\n#[derive(Clone, PartialEq)]\npub enum NodeData<'arena> {\n  Document,\n  Doctype {\n    name: StrTendril,\n    public_id: StrTendril,\n    system_id: StrTendril,\n  },\n  Text {\n    contents: RefCell<StrTendril>,\n  },\n  Comment {\n    contents: StrTendril,\n  },\n  Element {\n    name: QualName,\n    attrs: RefCell<Vec<Attribute>>,\n    template_contents: Option<Ref<'arena>>,\n    mathml_annotation_xml_integration_point: bool,\n    selector_flags: SelectorFlags,\n  },\n  ProcessingInstruction {\n    target: StrTendril,\n    contents: RefCell<StrTendril>,\n  },\n}\n\n#[derive(Clone)]\npub struct SelectorFlags(pub Cell<Option<selectors::matching::ElementSelectorFlags>>);\n\nimpl PartialEq<SelectorFlags> for SelectorFlags {\n  fn eq(&self, _other: &SelectorFlags) -> bool {\n    true\n  }\n}\n\nimpl<'arena> std::fmt::Debug for Node<'arena> {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    let mut s = Vec::new();\n    html5ever::serialize::serialize(\n      &mut s,\n      &SerializableHandle(self),\n      html5ever::serialize::SerializeOpts::default(),\n    )\n    .map_err(|_| std::fmt::Error)?;\n    write!(f, \"{}\", String::from_utf8(s).unwrap())\n  }\n}\n\nimpl<'arena> PartialEq<Node<'arena>> for Node<'arena> {\n  fn eq(&self, other: &Node<'arena>) -> bool {\n    if self.data != other.data {\n      return false;\n    }\n\n    let mut self_child = self.first_child.get();\n    let mut other_child = other.first_child.get();\n    loop {\n      match (self_child, other_child) {\n        (None, None) => return true,\n        (None, Some(_)) => return false,\n        (Some(_), None) => return false,\n        (Some(a), Some(b)) => {\n          if a != b {\n            return false;\n          }\n          self_child = a.next_sibling.get();\n          other_child = b.next_sibling.get();\n        }\n      }\n    }\n  }\n}\n\nimpl<'arena> Node<'arena> {\n  pub fn new(data: NodeData<'arena>, line: u32) -> Self {\n    Node {\n      parent: Cell::new(None),\n      previous_sibling: Cell::new(None),\n      next_sibling: Cell::new(None),\n      first_child: Cell::new(None),\n      last_child: Cell::new(None),\n      data,\n      line,\n    }\n  }\n\n  pub fn create_element(name: ExpandedName) -> Self {\n    Node::new(\n      NodeData::Element {\n        name: QualName::new(None, name.ns.clone(), name.local.clone()),\n        attrs: RefCell::new(Vec::new()),\n        template_contents: None,\n        mathml_annotation_xml_integration_point: false,\n        selector_flags: SelectorFlags(Cell::new(None)),\n      },\n      1,\n    )\n  }\n\n  pub fn detach(&self) {\n    let parent = self.parent.take();\n    let previous_sibling = self.previous_sibling.take();\n    let next_sibling = self.next_sibling.take();\n\n    if let Some(next_sibling) = next_sibling {\n      next_sibling.previous_sibling.set(previous_sibling);\n    } else if let Some(parent) = parent {\n      parent.last_child.set(previous_sibling);\n    }\n\n    if let Some(previous_sibling) = previous_sibling {\n      previous_sibling.next_sibling.set(next_sibling);\n    } else if let Some(parent) = parent {\n      parent.first_child.set(next_sibling);\n    }\n  }\n\n  pub fn append(&'arena self, new_child: &'arena Self) {\n    new_child.detach();\n    new_child.parent.set(Some(self));\n    if let Some(last_child) = self.last_child.take() {\n      new_child.previous_sibling.set(Some(last_child));\n      debug_assert!(last_child.next_sibling.get().is_none());\n      last_child.next_sibling.set(Some(new_child));\n    } else {\n      debug_assert!(self.first_child.get().is_none());\n      self.first_child.set(Some(new_child));\n    }\n    self.last_child.set(Some(new_child));\n  }\n\n  pub fn prepend(&'arena self, new_child: &'arena Self) {\n    new_child.detach();\n    new_child.parent.set(Some(self));\n    if let Some(first_child) = self.first_child.take() {\n      new_child.next_sibling.set(Some(first_child));\n      debug_assert!(first_child.previous_sibling.get().is_none());\n      first_child.previous_sibling.set(Some(new_child));\n    } else {\n      debug_assert!(self.last_child.get().is_none());\n      self.last_child.set(Some(new_child));\n    }\n    self.first_child.set(Some(new_child));\n  }\n\n  pub fn insert_before(&'arena self, new_sibling: &'arena Self) {\n    new_sibling.detach();\n    new_sibling.parent.set(self.parent.get());\n    new_sibling.next_sibling.set(Some(self));\n    if let Some(previous_sibling) = self.previous_sibling.take() {\n      new_sibling.previous_sibling.set(Some(previous_sibling));\n      debug_assert!(ptr::eq::<Node>(\n        previous_sibling.next_sibling.get().unwrap(),\n        self\n      ));\n      previous_sibling.next_sibling.set(Some(new_sibling));\n    } else if let Some(parent) = self.parent.get() {\n      debug_assert!(ptr::eq::<Node>(parent.first_child.get().unwrap(), self));\n      parent.first_child.set(Some(new_sibling));\n    }\n    self.previous_sibling.set(Some(new_sibling));\n  }\n\n  pub fn insert_after(&'arena self, new_sibling: &'arena Self) {\n    new_sibling.detach();\n    new_sibling.parent.set(self.parent.get());\n    new_sibling.previous_sibling.set(Some(self));\n    if let Some(next_sibling) = self.next_sibling.take() {\n      new_sibling.next_sibling.set(Some(next_sibling));\n      debug_assert!(ptr::eq::<Node>(\n        next_sibling.previous_sibling.get().unwrap(),\n        self\n      ));\n      next_sibling.previous_sibling.set(Some(new_sibling));\n    } else if let Some(parent) = self.parent.get() {\n      debug_assert!(ptr::eq::<Node>(parent.last_child.get().unwrap(), self));\n      parent.last_child.set(Some(new_sibling));\n    }\n    self.next_sibling.set(Some(new_sibling));\n  }\n\n  pub fn walk<Visit: FnMut(Ref<'arena>)>(&'arena self, visit: &mut Visit) {\n    visit(self);\n    if let NodeData::Element {\n      template_contents: Some(template_contents),\n      ..\n    } = &self.data\n    {\n      template_contents.walk(visit);\n    }\n\n    let mut node = self.first_child.get();\n    while let Some(n) = node {\n      node = n.next_sibling.get();\n      n.walk(visit);\n    }\n  }\n\n  pub fn text_content(&'arena self) -> String {\n    let mut code = String::new();\n    let mut child: Option<&Node<'arena>> = self.first_child.get();\n    while let Some(c) = child {\n      match &c.data {\n        NodeData::Text { contents } => {\n          code += contents.borrow().as_ref();\n        }\n        _ => {}\n      }\n      child = c.next_sibling.get();\n    }\n    code\n  }\n\n  pub fn set_text_content(&'arena self, arena: Arena<'arena>, content: StrTendril) {\n    let text = arena.alloc(Node::new(\n      NodeData::Text {\n        contents: RefCell::new(content),\n      },\n      0,\n    ));\n    self.first_child.set(Some(text));\n    self.last_child.set(Some(text));\n  }\n\n  pub fn find(&'arena self, element: ExpandedName) -> Option<Ref<'arena>> {\n    if let NodeData::Element { name, .. } = &self.data {\n      if name.expanded() == element {\n        return Some(self);\n      }\n    }\n\n    let mut node = self.first_child.get();\n    while let Some(n) = node {\n      if let Some(found) = n.find(element) {\n        return Some(found);\n      }\n      node = n.next_sibling.get();\n    }\n    None\n  }\n\n  pub fn get_attribute(&'arena self, name: ExpandedName) -> Option<StrTendril> {\n    if let NodeData::Element { attrs, .. } = &self.data {\n      attrs.borrow().iter().find_map(|a| {\n        if a.name.expanded() == name {\n          Some(a.value.clone())\n        } else {\n          None\n        }\n      })\n    } else {\n      None\n    }\n  }\n\n  pub fn set_attribute(&'arena self, name: ExpandedName, value: &str) {\n    if let NodeData::Element { attrs, .. } = &self.data {\n      let mut attrs = attrs.borrow_mut();\n      if let Some(attr) = attrs.iter_mut().find(|a| a.name.expanded() == name) {\n        attr.value = value.into();\n      } else {\n        attrs.push(Attribute {\n          name: QualName::new(None, name.ns.clone(), name.local.clone()),\n          value: value.into(),\n        })\n      }\n    }\n  }\n\n  pub fn remove_attribute(&'arena self, name: ExpandedName) {\n    if let NodeData::Element { attrs, .. } = &self.data {\n      let mut attrs = attrs.borrow_mut();\n      if let Some(idx) = attrs.iter().position(|a| a.name.expanded() == name) {\n        attrs.remove(idx);\n      }\n    }\n  }\n\n  pub fn starts_with_whitespace(&self) -> bool {\n    if let NodeData::Text { contents } = &self.data {\n      match contents.borrow().chars().next() {\n        None => false,\n        Some(c) => c.is_whitespace(),\n      }\n    } else {\n      false\n    }\n  }\n\n  pub fn next_sibling_is_comment(&self) -> bool {\n    match self.next_sibling.get() {\n      None => false,\n      Some(next) => matches!(next.data, NodeData::Comment { .. }),\n    }\n  }\n\n  pub fn next_sibling_is_comment_or_whitespace(&self) -> bool {\n    match self.next_sibling.get() {\n      None => false,\n      Some(next) => matches!(next.data, NodeData::Comment { .. }) || next.starts_with_whitespace(),\n    }\n  }\n\n  pub fn is_last_child(&self) -> bool {\n    self.next_sibling.get().is_none()\n  }\n\n  pub fn next_sibling_is(&self, tag: ExpandedName) -> bool {\n    match self.next_sibling.get() {\n      None => false,\n      Some(next) => {\n        matches!(&next.data, NodeData::Element{ name, .. } if name.expanded() == tag)\n      }\n    }\n  }\n\n  pub fn first_child_is_comment(&self) -> bool {\n    match self.first_child.get() {\n      None => false,\n      Some(next) => matches!(next.data, NodeData::Comment { .. }),\n    }\n  }\n\n  pub fn first_child_is(&self, tag: ExpandedName) -> bool {\n    match self.first_child.get() {\n      None => false,\n      Some(next) => {\n        matches!(&next.data, NodeData::Element{ name, .. } if name.expanded() == tag)\n      }\n    }\n  }\n}\n\nimpl<'arena> Sink<'arena> {\n  fn new_node(&self, data: NodeData<'arena>) -> Ref<'arena> {\n    self.arena.alloc(Node::new(data, self.line.get()))\n  }\n\n  fn append_common<P, A>(&self, child: NodeOrText<Ref<'arena>>, previous: P, append: A)\n  where\n    P: FnOnce() -> Option<Ref<'arena>>,\n    A: FnOnce(Ref<'arena>),\n  {\n    let new_node = match child {\n      NodeOrText::AppendText(text) => {\n        // Append to an existing Text node if we have one.\n        if let Some(&Node {\n          data: NodeData::Text { ref contents },\n          ..\n        }) = previous()\n        {\n          contents.borrow_mut().push_tendril(&text);\n          return;\n        }\n        self.new_node(NodeData::Text {\n          contents: RefCell::new(text),\n        })\n      }\n      NodeOrText::AppendNode(node) => node,\n    };\n\n    append(new_node)\n  }\n}\n\n/// By implementing the TreeSink trait we determine how the data from the tree building step\n/// is processed. In our case, our data is allocated in the arena and added to the Node data\n/// structure.\n///\n/// For deeper understating of each function go to the TreeSink declaration.\nimpl<'arena> TreeSink for Sink<'arena> {\n  type Handle = Ref<'arena>;\n  type Output = Ref<'arena>;\n  type ElemName<'a>\n    = &'a QualName\n  where\n    Self: 'a;\n\n  fn finish(self) -> Ref<'arena> {\n    self.document\n  }\n\n  fn parse_error(&self, _: Cow<'static, str>) {}\n\n  fn get_document(&self) -> Ref<'arena> {\n    self.document\n  }\n\n  fn set_quirks_mode(&self, mode: QuirksMode) {\n    self.quirks_mode.set(mode);\n  }\n\n  fn set_current_line(&self, line: u64) {\n    self.line.set(line as u32);\n  }\n\n  fn same_node(&self, x: &Ref<'arena>, y: &Ref<'arena>) -> bool {\n    ptr::eq::<Node>(*x, *y)\n  }\n\n  fn elem_name(&self, target: &Ref<'arena>) -> Self::ElemName<'_> {\n    match target.data {\n      NodeData::Element { ref name, .. } => name,\n      _ => panic!(\"not an element!\"),\n    }\n  }\n\n  fn get_template_contents(&self, target: &Ref<'arena>) -> Ref<'arena> {\n    if let NodeData::Element {\n      template_contents: Some(contents),\n      ..\n    } = target.data\n    {\n      contents\n    } else {\n      panic!(\"not a template element!\")\n    }\n  }\n\n  fn is_mathml_annotation_xml_integration_point(&self, target: &Ref<'arena>) -> bool {\n    if let NodeData::Element {\n      mathml_annotation_xml_integration_point,\n      ..\n    } = target.data\n    {\n      mathml_annotation_xml_integration_point\n    } else {\n      panic!(\"not an element!\")\n    }\n  }\n\n  fn create_element(\n    &self,\n    name: QualName,\n    attrs: Vec<Attribute>,\n    flags: ElementFlags,\n  ) -> Ref<'arena> {\n    self.new_node(NodeData::Element {\n      name,\n      attrs: RefCell::new(attrs),\n      template_contents: if flags.template {\n        Some(self.new_node(NodeData::Document))\n      } else {\n        None\n      },\n      mathml_annotation_xml_integration_point: flags.mathml_annotation_xml_integration_point,\n      selector_flags: SelectorFlags(Cell::new(None)),\n    })\n  }\n\n  fn create_comment(&self, text: StrTendril) -> Ref<'arena> {\n    self.new_node(NodeData::Comment { contents: text })\n  }\n\n  fn create_pi(&self, target: StrTendril, data: StrTendril) -> Ref<'arena> {\n    self.new_node(NodeData::ProcessingInstruction {\n      target,\n      contents: RefCell::new(data),\n    })\n  }\n\n  fn append(&self, parent: &Ref<'arena>, child: NodeOrText<Ref<'arena>>) {\n    self.append_common(\n      child,\n      || parent.last_child.get(),\n      |new_node| parent.append(new_node),\n    )\n  }\n\n  fn append_before_sibling(&self, sibling: &Ref<'arena>, child: NodeOrText<Ref<'arena>>) {\n    self.append_common(\n      child,\n      || sibling.previous_sibling.get(),\n      |new_node| sibling.insert_before(new_node),\n    )\n  }\n\n  fn append_based_on_parent_node(\n    &self,\n    element: &Ref<'arena>,\n    prev_element: &Ref<'arena>,\n    child: NodeOrText<Ref<'arena>>,\n  ) {\n    if element.parent.get().is_some() {\n      self.append_before_sibling(element, child)\n    } else {\n      self.append(prev_element, child)\n    }\n  }\n\n  fn append_doctype_to_document(\n    &self,\n    name: StrTendril,\n    public_id: StrTendril,\n    system_id: StrTendril,\n  ) {\n    self.document.append(self.new_node(NodeData::Doctype {\n      name,\n      public_id,\n      system_id,\n    }))\n  }\n\n  fn add_attrs_if_missing(&self, target: &Ref<'arena>, attrs: Vec<Attribute>) {\n    let mut existing = if let NodeData::Element { ref attrs, .. } = target.data {\n      attrs.borrow_mut()\n    } else {\n      panic!(\"not an element\")\n    };\n\n    let existing_names = existing\n      .iter()\n      .map(|e| e.name.clone())\n      .collect::<HashSet<_>>();\n    existing.extend(\n      attrs\n        .into_iter()\n        .filter(|attr| !existing_names.contains(&attr.name)),\n    );\n  }\n\n  fn remove_from_parent(&self, target: &Ref<'arena>) {\n    target.detach()\n  }\n\n  fn reparent_children(&self, node: &Ref<'arena>, new_parent: &Ref<'arena>) {\n    let mut next_child = node.first_child.get();\n    while let Some(child) = next_child {\n      debug_assert!(ptr::eq::<Node>(child.parent.get().unwrap(), *node));\n      next_child = child.next_sibling.get();\n      new_parent.append(child)\n    }\n  }\n}\n\nenum SerializeOp<'a, 'arena> {\n  Open(&'a Node<'arena>),\n  Close(QualName),\n}\n\npub struct SerializableHandle<'a, 'arena>(pub &'a Node<'arena>);\n\nimpl<'a, 'arena> From<Ref<'arena>> for SerializableHandle<'a, 'arena> {\n  fn from(h: &'a Node<'arena>) -> SerializableHandle<'a, 'arena> {\n    SerializableHandle(h)\n  }\n}\n\nimpl<'a, 'arena> Serialize for SerializableHandle<'a, 'arena> {\n  fn serialize<S>(&self, serializer: &mut S, traversal_scope: TraversalScope) -> io::Result<()>\n  where\n    S: Serializer,\n  {\n    use TraversalScope::*;\n    let mut ops = VecDeque::new();\n    match traversal_scope {\n      IncludeNode => ops.push_back(SerializeOp::Open(self.0)),\n      ChildrenOnly(_) => {\n        let mut child = self.0.first_child.get();\n        while let Some(c) = child {\n          ops.push_back(SerializeOp::Open(c));\n          child = c.next_sibling.get();\n        }\n      }\n    }\n\n    while let Some(op) = ops.pop_front() {\n      match op {\n        SerializeOp::Open(handle) => match handle.data {\n          NodeData::Element {\n            ref name,\n            ref attrs,\n            ref template_contents,\n            ..\n          } => {\n            serializer.start_elem(\n              name.clone(),\n              attrs.borrow().iter().map(|at| (&at.name, &at.value[..])),\n            )?;\n\n            ops.push_front(SerializeOp::Close(name.clone()));\n\n            let mut child = handle.last_child.get();\n            while let Some(c) = child {\n              ops.push_front(SerializeOp::Open(c));\n              child = c.previous_sibling.get();\n            }\n\n            if let Some(template) = template_contents {\n              ops.push_front(SerializeOp::Open(template));\n            }\n          }\n\n          NodeData::Doctype { ref name, .. } => serializer.write_doctype(name)?,\n\n          NodeData::Text { ref contents } => serializer.write_text(&contents.borrow())?,\n\n          NodeData::Comment { ref contents } => serializer.write_comment(contents)?,\n\n          NodeData::ProcessingInstruction {\n            ref target,\n            ref contents,\n          } => serializer.write_processing_instruction(target, &*contents.borrow())?,\n\n          NodeData::Document => {\n            let mut child = handle.last_child.get();\n            while let Some(c) = child {\n              ops.push_front(SerializeOp::Open(c));\n              child = c.previous_sibling.get();\n            }\n          }\n        },\n\n        SerializeOp::Close(name) => {\n          serializer.end_elem(name)?;\n        }\n      }\n    }\n\n    Ok(())\n  }\n}\n"
  },
  {
    "path": "crates/html/src/dependencies.rs",
    "content": "use std::borrow::{Borrow, Cow};\nuse std::cell::{Cell, RefCell};\nuse std::hash::{DefaultHasher, Hash, Hasher};\nuse std::path::PathBuf;\nuse std::sync::Arc;\n\nuse crate::arena::{Node, NodeData, SelectorFlags};\nuse crate::srcset::{parse_srcset, serialize_srcset};\nuse html5ever::tendril::{StrTendril, format_tendril};\nuse html5ever::{Attribute, ExpandedName, QualName, expanded_name, local_name, namespace_url, ns};\nuse parcel_core::{\n  Asset, AssetFlags, AssetType, BundleBehavior, CodeFrame, CodeHighlight, Dependency,\n  DependencyFlags, Diagnostic, DiagnosticSeverity, Environment, EnvironmentFeature, Location,\n  OutputFormat, Priority, SourceLocation, SourceType, SpecifierType,\n};\nuse typed_arena::Arena;\n\npub fn collect_dependencies<'arena>(\n  arena: &'arena Arena<Node<'arena>>,\n  dom: &'arena Node<'arena>,\n  file_path: PathBuf,\n  ty: AssetType,\n  env: Arc<Environment>,\n  hmr: bool,\n) -> (Vec<Dependency>, Vec<Asset>, Vec<Diagnostic>) {\n  let mut collector = DependencyCollector::new(arena, file_path, ty, env);\n\n  dom.walk(&mut |node| match &node.data {\n    NodeData::Element { name, .. } => {\n      collector.visit_element(node, name);\n    }\n    NodeData::ProcessingInstruction { target, contents } => {\n      let mut contents = contents.borrow_mut();\n      if target.as_ref() == \"xml-stylesheet\" {\n        if let Ok(mut attrs) = parse_xml_stylesheet(contents.borrow().as_ref()) {\n          for attr in &mut attrs {\n            if attr.name.expanded() == expanded_name!(\"\", \"href\") {\n              attr.value =\n                collector.add_dep(attr.value.clone(), false, Priority::Parallel, node.line);\n            }\n          }\n\n          *contents = serialize_xml_stylesheet(attrs);\n        }\n      }\n    }\n    _ => {}\n  });\n\n  for asset in &collector.assets {\n    collector.deps.push(Dependency {\n      specifier: asset.unique_key.clone().unwrap(),\n      specifier_type: SpecifierType::Esm,\n      flags: DependencyFlags::empty(),\n      priority: Priority::Sync,\n      env: asset.env.clone(),\n      bundle_behavior: BundleBehavior::None,\n      placeholder: asset.unique_key.clone(),\n      loc: None,\n      resolve_from: None,\n      range: None,\n    });\n  }\n\n  if hmr && !collector.has_module_scripts {\n    if let Some(body) = dom.find(expanded_name!(html \"body\")) {\n      let key: StrTendril = \"hmr.js\".into();\n      let src = collector.add_dep(key.clone(), false, Priority::Parallel, 0);\n      collector.assets.push(Asset {\n        ty: AssetType::Js,\n        content: Vec::new(),\n        unique_key: Some(key.into()),\n        flags: AssetFlags::empty(),\n        env: collector.env.clone(),\n        bundle_behavior: BundleBehavior::None,\n        loc: None,\n      });\n\n      let script = NodeData::Element {\n        name: QualName::new(None, ns!(html), local_name!(\"script\")),\n        attrs: RefCell::new(vec![Attribute {\n          name: QualName::new(None, ns!(), local_name!(\"src\")),\n          value: src,\n        }]),\n        template_contents: None,\n        mathml_annotation_xml_integration_point: false,\n        selector_flags: SelectorFlags(Cell::new(None)),\n      };\n\n      body.append(arena.alloc(Node::new(script, 0)));\n    }\n  }\n\n  (collector.deps, collector.assets, collector.errors)\n}\n\nstruct DependencyCollector<'arena> {\n  arena: &'arena Arena<Node<'arena>>,\n  file_path: PathBuf,\n  ty: AssetType,\n  env: Arc<Environment>,\n  deps: Vec<Dependency>,\n  assets: Vec<Asset>,\n  key: u32,\n  has_module_scripts: bool,\n  errors: Vec<Diagnostic>,\n}\n\nimpl<'arena> DependencyCollector<'arena> {\n  fn new(\n    arena: &'arena Arena<Node<'arena>>,\n    file_path: PathBuf,\n    ty: AssetType,\n    env: Arc<Environment>,\n  ) -> Self {\n    DependencyCollector {\n      arena,\n      file_path,\n      ty,\n      env,\n      deps: Vec::new(),\n      assets: Vec::new(),\n      key: 0,\n      has_module_scripts: false,\n      errors: Vec::new(),\n    }\n  }\n\n  fn create_env(\n    &self,\n    output_format: OutputFormat,\n    source_type: SourceType,\n    line: u32,\n  ) -> Arc<Environment> {\n    Arc::new(Environment {\n      output_format,\n      source_type,\n      loc: self.create_loc(line),\n      ..(*self.env).clone()\n    })\n  }\n\n  fn create_loc(&self, line: u32) -> Option<SourceLocation> {\n    Some(SourceLocation {\n      file_path: self.file_path.clone(),\n      start: Location { line, column: 1 },\n      end: Location { line, column: 2 },\n    })\n  }\n\n  fn add_diagnostic(&mut self, message: &str, line: u32) {\n    self.errors.push(Diagnostic {\n      message: message.into(),\n      origin: None,\n      code_frames: vec![CodeFrame {\n        file_path: Some(self.file_path.clone()),\n        code: None,\n        language: Some(self.ty.clone()),\n        code_highlights: vec![CodeHighlight::from_loc(\n          &self.create_loc(line).unwrap(),\n          None,\n        )],\n      }],\n      hints: vec![],\n      severity: DiagnosticSeverity::Error,\n      documentation_url: None,\n    });\n  }\n\n  fn visit_element(&mut self, node: &'arena Node<'arena>, name: &QualName) {\n    match name.expanded() {\n      expanded_name!(html \"link\") => {\n        let href = node.get_attribute(expanded_name!(\"\", \"href\"));\n\n        if let Some(mut href) = href {\n          // Check for empty string\n          if href.is_empty() {\n            self.add_diagnostic(\"'href' should not be empty string\".into(), node.line);\n            return;\n          }\n\n          let mut flags = DependencyFlags::empty();\n          let mut priority = Priority::Lazy;\n          if let Some(rel) = node.get_attribute(expanded_name!(\"\", \"rel\")) {\n            if rel.as_ref() == \"canonical\" || rel.as_ref() == \"manifest\" {\n              flags |= DependencyFlags::NEEDS_STABLE_NAME;\n              if rel.as_ref() == \"manifest\" && !href.contains(':') {\n                // A hack to allow manifest.json rather than manifest.webmanifest.\n                // If a custom pipeline is used, it is responsible for running @parcel/transformer-webmanifest.\n                href = format_tendril!(\"webmanifest:{}\", href);\n              }\n            } else if rel.as_ref() == \"stylesheet\" {\n              // Keep in the same bundle group as the HTML.\n              priority = Priority::Parallel;\n            } else if rel.as_ref() == \"alternate\" {\n              if let Some(t) = node.get_attribute(expanded_name!(\"\", \"type\")) {\n                if t.as_ref() == \"application/rss+xml\" || t.as_ref() == \"application/atom+xml\" {\n                  flags |= DependencyFlags::NEEDS_STABLE_NAME;\n                }\n              }\n            }\n          }\n\n          let mut dep = Dependency {\n            specifier: href.into(),\n            specifier_type: SpecifierType::Url,\n            flags,\n            priority,\n            env: self.env.clone(),\n            bundle_behavior: BundleBehavior::None,\n            placeholder: Default::default(),\n            loc: self.create_loc(node.line),\n            resolve_from: None,\n            range: None,\n          };\n\n          node.set_attribute(expanded_name!(\"\", \"href\"), dep.set_placeholder());\n          self.deps.push(dep);\n        }\n\n        let imagesrcset = ExpandedName {\n          ns: &ns!(),\n          local: &\"imagesrcset\".into(),\n        };\n\n        self.handle_srcset(node, imagesrcset, node.line);\n      }\n      expanded_name!(html \"script\") | expanded_name!(svg \"script\") => {\n        let is_svg = name.ns == ns!(svg);\n        let href = expanded_name!(xlink \"href\");\n        let src_attr = if is_svg {\n          if node.get_attribute(href).is_some() {\n            href\n          } else {\n            expanded_name!(\"\", \"href\")\n          }\n        } else {\n          expanded_name!(\"\", \"src\")\n        };\n        let src = node.get_attribute(src_attr);\n        let ty = node.get_attribute(expanded_name!(\"\", \"type\"));\n        let mut output_format = OutputFormat::Global;\n        let source_type = match &ty {\n          Some(t) if t.as_ref() == \"module\" => {\n            self.has_module_scripts = true;\n            SourceType::Module\n          }\n          _ => SourceType::Script,\n        };\n\n        if let Some(src) = src {\n          // Check for empty string\n          if src.is_empty() {\n            self.add_diagnostic(\"'src' should not be empty string\".into(), node.line);\n            return;\n          }\n\n          if source_type == SourceType::Module\n            && (self.env.should_scope_hoist()\n              || self.env.engines.supports(EnvironmentFeature::Esmodules))\n            && !is_svg\n          {\n            output_format = OutputFormat::Esmodule;\n          }\n\n          if output_format != OutputFormat::Esmodule {\n            if source_type == SourceType::Module && !is_svg {\n              node.set_attribute(expanded_name!(\"\", \"defer\"), \"\");\n            }\n            node.remove_attribute(expanded_name!(\"\", \"type\"));\n          }\n\n          // If the script is async it can be executed in any order, so it cannot depend\n          // on any sibling scripts for dependencies. Keep all dependencies together.\n          // Also, don't share dependencies between classic scripts and nomodule scripts\n          // because nomodule scripts won't run when modules are supported.\n          let mut bundle_behavior = BundleBehavior::None;\n          if source_type == SourceType::Script\n            || node.get_attribute(expanded_name!(\"\", \"async\")).is_some()\n          {\n            bundle_behavior = BundleBehavior::Isolated;\n          }\n\n          // If this is a <script type=\"module\">, and not all of the browser targets support ESM natively,\n          // add a copy of the script tag with a nomodule attribute.\n          if output_format == OutputFormat::Esmodule\n            && !self.env.engines.supports(EnvironmentFeature::Esmodules)\n          {\n            let copy = self.arena.alloc(Node::new(node.data.clone(), node.line));\n            copy.remove_attribute(expanded_name!(\"\", \"type\"));\n            copy.set_attribute(expanded_name!(\"\", \"nomodule\"), \"\");\n            copy.set_attribute(expanded_name!(\"\", \"defer\"), \"\");\n\n            let mut dep = Dependency {\n              specifier: src.clone().into(),\n              specifier_type: SpecifierType::Url,\n              priority: Priority::Parallel,\n              env: self.create_env(OutputFormat::Global, source_type, node.line),\n              flags: DependencyFlags::empty(),\n              bundle_behavior,\n              placeholder: Default::default(),\n              loc: self.create_loc(node.line),\n              resolve_from: None,\n              range: None,\n            };\n\n            copy.set_attribute(src_attr, dep.set_placeholder());\n            self.deps.push(dep);\n            node.insert_before(copy);\n          }\n\n          let mut dep = Dependency {\n            specifier: src.into(),\n            specifier_type: SpecifierType::Url,\n            priority: Priority::Parallel,\n            env: self.create_env(output_format, source_type, node.line),\n            flags: DependencyFlags::empty(),\n            bundle_behavior,\n            placeholder: Default::default(),\n            loc: self.create_loc(node.line),\n            resolve_from: None,\n            range: None,\n          };\n\n          node.set_attribute(src_attr, dep.set_placeholder());\n          self.deps.push(dep);\n        } else {\n          if let Some(ty) = &ty {\n            if ty.as_ref() == \"application/json\"\n              || ty.as_ref() == \"text/html\"\n              || ty.as_ref() == \"importmap\"\n            {\n              return;\n            }\n          }\n\n          let code = node.text_content();\n\n          if source_type == SourceType::Module {\n            if self.env.should_scope_hoist()\n              && self.env.engines.supports(EnvironmentFeature::Esmodules)\n              && !is_svg\n            {\n              output_format = OutputFormat::Esmodule;\n            } else {\n              node.remove_attribute(expanded_name!(\"\", \"type\"));\n            }\n          }\n\n          let data_parcel_key = ExpandedName {\n            ns: &ns!(),\n            local: &\"data-parcel-key\".into(),\n          };\n\n          let key = if let Some(key) = node.get_attribute(data_parcel_key.clone()) {\n            key\n          } else {\n            let key: StrTendril = format_tendril!(\"asset-{}\", self.key);\n            node.set_attribute(data_parcel_key, &key);\n            self.key += 1;\n            key\n          };\n\n          self.assets.push(Asset {\n            ty: ty\n              .map(|ty| AssetType::from_mime(&ty))\n              .unwrap_or(AssetType::Js),\n            content: code.into_bytes(),\n            unique_key: Some(key.into()),\n            flags: AssetFlags::IS_HTML_TAG,\n            env: self.create_env(output_format, source_type, node.line),\n            bundle_behavior: BundleBehavior::Inline,\n            loc: self.create_loc(node.line),\n          });\n        }\n      }\n      expanded_name!(html \"style\") | expanded_name!(svg \"style\") => {\n        let code = node.text_content();\n        let data_parcel_key = ExpandedName {\n          ns: &ns!(),\n          local: &\"data-parcel-key\".into(),\n        };\n\n        let key = if let Some(key) = node.get_attribute(data_parcel_key.clone()) {\n          key\n        } else {\n          let key: StrTendril = format_tendril!(\"asset-{}\", self.key);\n          node.set_attribute(data_parcel_key, &key);\n          self.key += 1;\n          key\n        };\n\n        let ty = if let Some(ty) = node.get_attribute(expanded_name!(\"\", \"type\")) {\n          node.remove_attribute(expanded_name!(\"\", \"type\"));\n          AssetType::from_mime(&ty)\n        } else {\n          AssetType::Css\n        };\n\n        self.assets.push(Asset {\n          ty,\n          content: code.into_bytes(),\n          unique_key: Some(key.into()),\n          flags: AssetFlags::IS_HTML_TAG,\n          env: self.env.clone(),\n          bundle_behavior: BundleBehavior::Inline,\n          loc: self.create_loc(node.line),\n        });\n      }\n      expanded_name!(html \"meta\") => {\n        // A list of metadata that should produce a dependency\n        // Based on:\n        // - http://schema.org/\n        // - http://ogp.me\n        // - https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup\n        // - https://msdn.microsoft.com/en-us/library/dn255024.aspx\n        // - https://vk.com/dev/publications\n        let mut is_dep = false;\n        let mut needs_stable_name = true;\n        if let Some(property) = node.get_attribute(expanded_name!(\"\", \"property\")) {\n          is_dep = matches!(\n            property.as_ref(),\n            \"og:image\"\n              | \"og:image:url\"\n              | \"og:image:secure_url\"\n              | \"og:audio\"\n              | \"og:audio:secure_url\"\n              | \"og:video\"\n              | \"og:video:secure_url\"\n              | \"vk:image\"\n          );\n        } else if let Some(name) = node.get_attribute(expanded_name!(\"\", \"name\")) {\n          if name.as_ref() == \"twitter:image\" {\n            is_dep = true;\n          } else if name.as_ref() == \"msapplication-config\" {\n            if let Some(content) = node.get_attribute(expanded_name!(\"\", \"content\")) {\n              is_dep = content.as_ref() != \"none\";\n            }\n          } else {\n            is_dep = matches!(\n              name.as_ref(),\n              \"msapplication-square150x150logo\"\n                | \"msapplication-square310x310logo\"\n                | \"msapplication-square70x70logo\"\n                | \"msapplication-wide310x150logo\"\n                | \"msapplication-TileImage\"\n            );\n            needs_stable_name = false;\n          }\n        } else if let Some(itemprop) = node.get_attribute(expanded_name!(\"\", \"itemprop\")) {\n          is_dep = matches!(\n            itemprop.as_ref(),\n            \"image\" | \"logo\" | \"screenshot\" | \"thumbnailUrl\" | \"contentUrl\" | \"downloadUrl\"\n          );\n        }\n\n        if is_dep {\n          let content = node.get_attribute(expanded_name!(\"\", \"content\"));\n          if let Some(content) = content {\n            if !content.is_empty() {\n              let placeholder = self.add_dep(content, needs_stable_name, Priority::Lazy, node.line);\n              node.set_attribute(expanded_name!(\"\", \"content\"), &placeholder);\n            }\n          }\n        }\n      }\n      expanded_name!(html \"img\") | expanded_name!(html \"source\") => {\n        self.handle_attr(node, expanded_name!(\"\", \"src\"), false, node.line);\n        self.handle_srcset(node, expanded_name!(\"\", \"srcset\"), node.line);\n      }\n      expanded_name!(html \"audio\")\n      | expanded_name!(html \"track\")\n      | expanded_name!(html \"embed\") => {\n        self.handle_attr(node, expanded_name!(\"\", \"src\"), false, node.line);\n      }\n      expanded_name!(html \"video\") => {\n        self.handle_attr(node, expanded_name!(\"\", \"src\"), false, node.line);\n        self.handle_attr(node, expanded_name!(\"\", \"poster\"), false, node.line);\n      }\n      expanded_name!(html \"iframe\") => {\n        self.handle_attr(node, expanded_name!(\"\", \"src\"), true, node.line);\n      }\n      expanded_name!(html \"object\") => {\n        self.handle_attr(node, expanded_name!(\"\", \"data\"), false, node.line);\n      }\n      expanded_name!(html \"a\") => {\n        if let Some(href) = node.get_attribute(expanded_name!(\"\", \"href\")) {\n          // Check for id references\n          if href.is_empty() || href.starts_with('#') {\n            return;\n          }\n\n          // Check for virtual paths\n          let path = href.split_once('#').map_or(href.as_ref(), |p| p.0);\n          if path.rfind('.').unwrap_or(0) < 1 {\n            return;\n          }\n\n          let placeholder = self.add_dep(href, true, Priority::Lazy, node.line);\n          node.set_attribute(expanded_name!(\"\", \"href\"), &placeholder);\n        }\n      }\n      // A list of all SVG elements that create a dependency\n      // Based on https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute\n      // See also https://www.w3.org/TR/SVG/attindex.html and https://www.w3.org/TR/SVG11/attindex.html\n      // SVG animation elements are excluded because they may only reference elements in the same document: https://www.w3.org/TR/SVG/linking.html#processingURL-fetch\n      expanded_name!(svg \"a\") => {\n        self.handle_attr(node, expanded_name!(\"\", \"href\"), true, node.line);\n        self.handle_attr(node, expanded_name!(xlink \"href\"), true, node.line);\n      }\n      expanded_name!(svg \"use\")\n      | expanded_name!(svg \"image\")\n      | expanded_name!(svg \"feImage\")\n      | expanded_name!(svg \"linearGradient\")\n      | expanded_name!(svg \"radialGradient\")\n      | expanded_name!(svg \"pattern\")\n      | expanded_name!(svg \"mpath\")\n      | expanded_name!(svg \"textPath\") => {\n        self.handle_attr(node, expanded_name!(\"\", \"href\"), false, node.line);\n        self.handle_attr(node, expanded_name!(xlink \"href\"), false, node.line);\n      }\n      expanded_name!(svg \"altGlyph\")\n      | expanded_name!(svg \"cursor\")\n      | expanded_name!(svg \"filter\")\n      | expanded_name!(svg \"font-face-uri\")\n      | expanded_name!(svg \"glyphRef\")\n      | expanded_name!(svg \"tref\")\n      | expanded_name!(svg \"color-profile\") => {\n        self.handle_attr(node, expanded_name!(xlink \"href\"), false, node.line);\n      }\n      _ => {}\n    }\n\n    if let Some(style) = node.get_attribute(expanded_name!(\"\", \"style\")) {\n      let mut hash = DefaultHasher::new();\n      style.hash(&mut hash);\n      let key: StrTendril = format!(\"{:x}\", hash.finish()).into();\n      node.set_attribute(expanded_name!(\"\", \"style\"), &key);\n\n      self.assets.push(Asset {\n        ty: AssetType::Css,\n        content: style.to_string().into_bytes(),\n        unique_key: Some(key.into()),\n        flags: AssetFlags::IS_HTML_ATTR,\n        env: self.env.clone(),\n        bundle_behavior: BundleBehavior::Inline,\n        loc: self.create_loc(node.line),\n      });\n    }\n\n    // Attributes that allow url() to reference another element, either in the same document or a different one.\n    // https://www.w3.org/TR/SVG11/linking.html#processingIRI\n    // SVG2 - https://www.w3.org/TR/SVG/linking.html#processingURL-validity\n    if name.ns == ns!(svg) {\n      if let NodeData::Element { attrs, .. } = &node.data {\n        for attr in attrs.borrow_mut().iter_mut() {\n          if is_func_iri_attr(&attr.name) && attr.value.starts_with(\"url(\") {\n            let mut input = cssparser::ParserInput::new(&attr.value);\n            let mut parser = cssparser::Parser::new(&mut input);\n            let placeholder = if let Ok(url) = parser.expect_url() {\n              Some(self.add_dep(url.as_ref().into(), false, Priority::Lazy, node.line))\n            } else {\n              None\n            };\n            drop(input);\n            if let Some(placeholder) = placeholder {\n              attr.value = placeholder;\n            }\n          }\n        }\n      }\n    }\n  }\n\n  fn handle_attr(\n    &mut self,\n    node: &'arena Node<'arena>,\n    name: ExpandedName,\n    needs_stable_name: bool,\n    line: u32,\n  ) {\n    let src = node.get_attribute(name.clone());\n    if let Some(src) = src {\n      // Check for empty string\n      if src.is_empty() {\n        self.add_diagnostic(\n          &format!(\"'{}' should not be empty string\", name.local),\n          line,\n        );\n        return;\n      }\n\n      // Check for id references\n      if src.starts_with('#') {\n        return;\n      }\n\n      let placeholder = self.add_dep(src, needs_stable_name, Priority::Lazy, line);\n      node.set_attribute(name, &placeholder);\n    }\n  }\n\n  fn handle_srcset(&mut self, node: &'arena Node<'arena>, name: ExpandedName, line: u32) {\n    let srcset = node.get_attribute(name.clone());\n    if let Some(srcset) = srcset {\n      let mut srcset = parse_srcset(srcset.as_ref());\n      for img in &mut srcset {\n        let mut dep = Dependency {\n          specifier: img.url.clone().into(),\n          specifier_type: SpecifierType::Url,\n          priority: Priority::Lazy,\n          env: self.env.clone(),\n          flags: DependencyFlags::empty(),\n          bundle_behavior: BundleBehavior::None,\n          placeholder: None,\n          loc: self.create_loc(line),\n          resolve_from: None,\n          range: None,\n        };\n\n        img.url = dep.set_placeholder().into();\n        self.deps.push(dep);\n      }\n\n      node.set_attribute(name, &serialize_srcset(srcset));\n    }\n  }\n\n  fn add_dep(\n    &mut self,\n    src: StrTendril,\n    needs_stable_name: bool,\n    priority: Priority,\n    line: u32,\n  ) -> StrTendril {\n    let mut dep = Dependency {\n      specifier: src.into(),\n      specifier_type: SpecifierType::Url,\n      priority,\n      env: self.env.clone(),\n      flags: {\n        let mut flags = DependencyFlags::empty();\n        flags.set(DependencyFlags::NEEDS_STABLE_NAME, needs_stable_name);\n        flags\n      },\n      bundle_behavior: BundleBehavior::None,\n      placeholder: Default::default(),\n      loc: self.create_loc(line),\n      range: None,\n      resolve_from: None,\n    };\n\n    let placeholder = dep.set_placeholder().into();\n    self.deps.push(dep);\n    placeholder\n  }\n}\n\npub fn is_func_iri_attr(name: &QualName) -> bool {\n  match name.expanded() {\n    expanded_name!(\"\", \"fill\")\n    | expanded_name!(\"\", \"stroke\")\n    | expanded_name!(\"\", \"clip-path\")\n    | expanded_name!(\"\", \"color-profile\")\n    | expanded_name!(\"\", \"cursor\")\n    | expanded_name!(\"\", \"filter\")\n    | expanded_name!(\"\", \"marker\")\n    | expanded_name!(\"\", \"marker-start\")\n    | expanded_name!(\"\", \"marker-mid\")\n    | expanded_name!(\"\", \"marker-end\")\n    | expanded_name!(\"\", \"mask\") => true,\n    name => {\n      let local = name.local.as_ref();\n      local == \"shape-inside\" || local == \"shape-subtract\" || local == \"mask-image\"\n    }\n  }\n}\n\n/// Parses an <?xml-stylesheet ?> processing instruction.\n/// https://www.w3.org/TR/xml-stylesheet/\npub fn parse_xml_stylesheet(contents: &str) -> Result<Vec<Attribute>, Cow<'static, str>> {\n  use xml5ever::{buffer_queue::*, tokenizer::*};\n\n  struct Sink(RefCell<Result<Vec<Attribute>, Cow<'static, str>>>);\n  impl TokenSink for Sink {\n    fn process_token(&self, token: Token) {\n      match token {\n        Token::TagToken(tag) => {\n          *self.0.borrow_mut() = Ok(tag.attrs);\n        }\n        Token::ParseError(err) => {\n          *self.0.borrow_mut() = Err(err);\n        }\n        _ => {}\n      }\n    }\n  }\n\n  let sink = Sink(RefCell::new(Err(Cow::Borrowed(\"Invalid xml-stylesheet\"))));\n  let tokenizer = XmlTokenizer::new(sink, Default::default());\n\n  let mut buf = BufferQueue::default();\n  buf.push_back(format_tendril!(\"<xml-stylesheet {} />\", contents));\n  tokenizer.run(&mut buf);\n\n  tokenizer.sink.0.into_inner()\n}\n\npub fn serialize_xml_stylesheet(attrs: Vec<Attribute>) -> StrTendril {\n  let mut s = StrTendril::new();\n\n  let mut first = true;\n  for attr in attrs {\n    if first {\n      first = false;\n    } else {\n      s.push_char(' ');\n    }\n\n    if let Some(ref prefix) = attr.name.prefix {\n      s.push_slice(prefix.as_ref());\n      s.push_char(':');\n    }\n    s.push_slice(attr.name.local.as_ref());\n    s.push_char('=');\n    s.push_char('\"');\n    for c in attr.value.chars() {\n      match c {\n        '&' => s.push_slice(\"&amp;\"),\n        '\\'' => s.push_slice(\"&apos;\"),\n        '\"' => s.push_slice(\"&quot;\"),\n        c => s.push_char(c),\n      }\n    }\n    s.push_char('\"');\n  }\n\n  s\n}\n"
  },
  {
    "path": "crates/html/src/jsx.rs",
    "content": "use crate::{\n  arena::{Node, NodeData},\n  oxvg::OxvgConfig,\n};\nuse convert_case::{Case, Casing};\nuse indexmap::IndexMap;\nuse serde::Deserialize;\nuse swc_core::{\n  atoms::Atom,\n  common::{DUMMY_SP, SourceMap, sync::Lrc},\n  ecma::{\n    ast::*,\n    parser::{Parser, StringInput, lexer::Lexer},\n  },\n};\nuse xml5ever::{ExpandedName, expanded_name, local_name, namespace_url, ns};\n\nfn to_jsx<'arena>(dom: &'arena Node<'arena>) -> JSXElementChild {\n  match &dom.data {\n    NodeData::Element { name, attrs, .. } => {\n      let opening = JSXOpeningElement {\n        name: JSXElementName::Ident(Ident::new_no_ctxt(name.local.as_ref().into(), DUMMY_SP)),\n        attrs: attrs\n          .borrow()\n          .iter()\n          .map(|attr| {\n            JSXAttrOrSpread::JSXAttr(JSXAttr {\n              name: JSXAttrName::Ident(IdentName::new(\n                jsx_attr_name(&attr.name.expanded()).into(),\n                DUMMY_SP,\n              )),\n              span: DUMMY_SP,\n              value: Some(jsx_attr_value(attr.name.expanded(), &attr.value)),\n            })\n          })\n          .collect(),\n        self_closing: dom.first_child.get().is_none(),\n        span: DUMMY_SP,\n        type_args: None,\n      };\n\n      let mut children = Vec::new();\n      let mut child = dom.first_child.get();\n      while let Some(c) = child {\n        children.push(to_jsx(c));\n        child = c.next_sibling.get();\n      }\n\n      JSXElementChild::JSXElement(Box::new(JSXElement {\n        opening,\n        children,\n        closing: dom.first_child.get().map(|_| JSXClosingElement {\n          name: JSXElementName::Ident(Ident::new_no_ctxt(name.local.as_ref().into(), DUMMY_SP)),\n          span: DUMMY_SP,\n        }),\n        span: DUMMY_SP,\n      }))\n    }\n    NodeData::Text { contents } => {\n      let value: Atom = contents.borrow().as_ref().into();\n      JSXElementChild::JSXText(JSXText {\n        value: value.clone(),\n        raw: value,\n        span: DUMMY_SP,\n      })\n    }\n    NodeData::Document => {\n      let mut children = Vec::new();\n      let mut child = dom.first_child.get();\n      while let Some(c) = child {\n        if matches!(c.data, NodeData::Element { .. } | NodeData::Text { .. }) {\n          children.push(to_jsx(c));\n        }\n        child = c.next_sibling.get();\n      }\n\n      if children.len() == 1 {\n        children.remove(0)\n      } else {\n        JSXElementChild::JSXFragment(JSXFragment {\n          children,\n          span: DUMMY_SP,\n          opening: JSXOpeningFragment { span: DUMMY_SP },\n          closing: JSXClosingFragment { span: DUMMY_SP },\n        })\n      }\n    }\n    _ => JSXElementChild::JSXExprContainer(JSXExprContainer {\n      expr: JSXExpr::JSXEmptyExpr(JSXEmptyExpr { span: DUMMY_SP }),\n      span: DUMMY_SP,\n    }),\n  }\n}\n\nfn jsx_attr_name<'a>(name: &'a ExpandedName) -> &'a str {\n  // https://github.com/facebook/react/blob/7c908bcf4e6b46135164be961972f0d756378517/packages/react-dom-bindings/src/shared/possibleStandardNames.js#L268\n  match name {\n    // HTML\n    expanded_name!(\"\", \"accept\") => \"accept\",\n    expanded_name!(\"\", \"accept-charset\") => \"acceptCharset\",\n    expanded_name!(\"\", \"accesskey\") => \"accessKey\",\n    expanded_name!(\"\", \"action\") => \"action\",\n    expanded_name!(\"\", \"allowfullscreen\") => \"allowFullScreen\",\n    expanded_name!(\"\", \"alt\") => \"alt\",\n    expanded_name!(\"\", \"as\") => \"as\",\n    expanded_name!(\"\", \"async\") => \"async\",\n    // expanded_name!(\"\", \"autocapitalize\") => \"autoCapitalize\",\n    expanded_name!(\"\", \"autocomplete\") => \"autoComplete\",\n    // expanded_name!(\"\", \"autocorrect\") => \"autoCorrect\",\n    expanded_name!(\"\", \"autofocus\") => \"autoFocus\",\n    expanded_name!(\"\", \"autoplay\") => \"autoPlay\",\n    // expanded_name!(\"\", \"autosave\") => \"autoSave\",\n    expanded_name!(\"\", \"cellpadding\") => \"cellPadding\",\n    expanded_name!(\"\", \"cellspacing\") => \"cellSpacing\",\n    expanded_name!(\"\", \"charset\") => \"charSet\",\n    expanded_name!(\"\", \"checked\") => \"checked\",\n    expanded_name!(\"\", \"cite\") => \"cite\",\n    expanded_name!(\"\", \"class\") => \"className\",\n    expanded_name!(\"\", \"classid\") => \"classID\",\n    expanded_name!(\"\", \"cols\") => \"cols\",\n    expanded_name!(\"\", \"colspan\") => \"colSpan\",\n    expanded_name!(\"\", \"content\") => \"content\",\n    expanded_name!(\"\", \"contenteditable\") => \"contentEditable\",\n    expanded_name!(\"\", \"contextmenu\") => \"contextMenu\",\n    expanded_name!(\"\", \"controls\") => \"controls\",\n    // expanded_name!(\"\", \"controlslist\") => \"controlsList\",\n    expanded_name!(\"\", \"coords\") => \"coords\",\n    expanded_name!(\"\", \"crossorigin\") => \"crossOrigin\",\n    expanded_name!(\"\", \"data\") => \"data\",\n    expanded_name!(\"\", \"datetime\") => \"dateTime\",\n    expanded_name!(\"\", \"default\") => \"default\",\n    expanded_name!(\"\", \"defer\") => \"defer\",\n    expanded_name!(\"\", \"dir\") => \"dir\",\n    expanded_name!(\"\", \"disabled\") => \"disabled\",\n    // expanded_name!(\"\", \"disablepictureinpicture\") => \"disablePictureInPicture\",\n    // expanded_name!(\"\", \"disableremoteplayback\") => \"disableRemotePlayback\",\n    expanded_name!(\"\", \"download\") => \"download\",\n    expanded_name!(\"\", \"draggable\") => \"draggable\",\n    expanded_name!(\"\", \"enctype\") => \"encType\",\n    // expanded_name!(\"\", \"enterkeyhint\") => \"enterKeyHint\",\n    expanded_name!(\"\", \"fetchpriority\") => \"fetchPriority\",\n    expanded_name!(\"\", \"for\") => \"htmlFor\",\n    expanded_name!(\"\", \"form\") => \"form\",\n    expanded_name!(\"\", \"formmethod\") => \"formMethod\",\n    expanded_name!(\"\", \"formaction\") => \"formAction\",\n    expanded_name!(\"\", \"formenctype\") => \"formEncType\",\n    expanded_name!(\"\", \"formnovalidate\") => \"formNoValidate\",\n    expanded_name!(\"\", \"formtarget\") => \"formTarget\",\n    expanded_name!(\"\", \"frameborder\") => \"frameBorder\",\n    expanded_name!(\"\", \"headers\") => \"headers\",\n    expanded_name!(\"\", \"height\") => \"height\",\n    expanded_name!(\"\", \"hidden\") => \"hidden\",\n    expanded_name!(\"\", \"high\") => \"high\",\n    expanded_name!(\"\", \"href\") => \"href\",\n    expanded_name!(\"\", \"hreflang\") => \"hrefLang\",\n    // expanded_name!(\"\", \"httpequiv\") => \"httpEquiv\",\n    expanded_name!(\"\", \"http-equiv\") => \"httpEquiv\",\n    expanded_name!(\"\", \"icon\") => \"icon\",\n    expanded_name!(\"\", \"id\") => \"id\",\n    // expanded_name!(\"\", \"imagesizes\") => \"imageSizes\",\n    // expanded_name!(\"\", \"imagesrcset\") => \"imageSrcSet\",\n    // expanded_name!(\"\", \"inert\") => \"inert\",\n    expanded_name!(\"\", \"inputmode\") => \"inputMode\",\n    expanded_name!(\"\", \"integrity\") => \"integrity\",\n    expanded_name!(\"\", \"itemid\") => \"itemID\",\n    expanded_name!(\"\", \"itemprop\") => \"itemProp\",\n    expanded_name!(\"\", \"itemref\") => \"itemRef\",\n    expanded_name!(\"\", \"itemscope\") => \"itemScope\",\n    expanded_name!(\"\", \"itemtype\") => \"itemType\",\n    // expanded_name!(\"\", \"keyparams\") => \"keyParams\",\n    // expanded_name!(\"\", \"keytype\") => \"keyType\",\n    expanded_name!(\"\", \"kind\") => \"kind\",\n    expanded_name!(\"\", \"label\") => \"label\",\n    expanded_name!(\"\", \"lang\") => \"lang\",\n    expanded_name!(\"\", \"list\") => \"list\",\n    expanded_name!(\"\", \"loop\") => \"loop\",\n    expanded_name!(\"\", \"low\") => \"low\",\n    expanded_name!(\"\", \"manifest\") => \"manifest\",\n    expanded_name!(\"\", \"marginwidth\") => \"marginWidth\",\n    expanded_name!(\"\", \"marginheight\") => \"marginHeight\",\n    expanded_name!(\"\", \"max\") => \"max\",\n    expanded_name!(\"\", \"maxlength\") => \"maxLength\",\n    expanded_name!(\"\", \"media\") => \"media\",\n    // expanded_name!(\"\", \"mediagroup\") => \"mediaGroup\",\n    expanded_name!(\"\", \"method\") => \"method\",\n    expanded_name!(\"\", \"min\") => \"min\",\n    expanded_name!(\"\", \"minlength\") => \"minLength\",\n    expanded_name!(\"\", \"multiple\") => \"multiple\",\n    expanded_name!(\"\", \"muted\") => \"muted\",\n    expanded_name!(\"\", \"name\") => \"name\",\n    expanded_name!(\"\", \"nomodule\") => \"noModule\",\n    expanded_name!(\"\", \"nonce\") => \"nonce\",\n    expanded_name!(\"\", \"novalidate\") => \"noValidate\",\n    expanded_name!(\"\", \"open\") => \"open\",\n    expanded_name!(\"\", \"optimum\") => \"optimum\",\n    expanded_name!(\"\", \"pattern\") => \"pattern\",\n    expanded_name!(\"\", \"placeholder\") => \"placeholder\",\n    // expanded_name!(\"\", \"playsinline\") => \"playsInline\",\n    expanded_name!(\"\", \"poster\") => \"poster\",\n    expanded_name!(\"\", \"preload\") => \"preload\",\n    expanded_name!(\"\", \"profile\") => \"profile\",\n    expanded_name!(\"\", \"radiogroup\") => \"radioGroup\",\n    expanded_name!(\"\", \"readonly\") => \"readOnly\",\n    expanded_name!(\"\", \"referrerpolicy\") => \"referrerPolicy\",\n    expanded_name!(\"\", \"rel\") => \"rel\",\n    expanded_name!(\"\", \"required\") => \"required\",\n    expanded_name!(\"\", \"reversed\") => \"reversed\",\n    expanded_name!(\"\", \"role\") => \"role\",\n    expanded_name!(\"\", \"rows\") => \"rows\",\n    expanded_name!(\"\", \"rowspan\") => \"rowSpan\",\n    expanded_name!(\"\", \"sandbox\") => \"sandbox\",\n    expanded_name!(\"\", \"scope\") => \"scope\",\n    expanded_name!(\"\", \"scoped\") => \"scoped\",\n    expanded_name!(\"\", \"scrolling\") => \"scrolling\",\n    expanded_name!(\"\", \"seamless\") => \"seamless\",\n    expanded_name!(\"\", \"selected\") => \"selected\",\n    expanded_name!(\"\", \"shape\") => \"shape\",\n    expanded_name!(\"\", \"size\") => \"size\",\n    expanded_name!(\"\", \"sizes\") => \"sizes\",\n    expanded_name!(\"\", \"span\") => \"span\",\n    expanded_name!(\"\", \"spellcheck\") => \"spellCheck\",\n    expanded_name!(\"\", \"src\") => \"src\",\n    expanded_name!(\"\", \"srcdoc\") => \"srcDoc\",\n    expanded_name!(\"\", \"srclang\") => \"srcLang\",\n    expanded_name!(\"\", \"srcset\") => \"srcSet\",\n    expanded_name!(\"\", \"start\") => \"start\",\n    expanded_name!(\"\", \"step\") => \"step\",\n    expanded_name!(\"\", \"style\") => \"style\",\n    expanded_name!(\"\", \"summary\") => \"summary\",\n    expanded_name!(\"\", \"tabindex\") => \"tabIndex\",\n    expanded_name!(\"\", \"target\") => \"target\",\n    expanded_name!(\"\", \"title\") => \"title\",\n    expanded_name!(\"\", \"type\") => \"type\",\n    expanded_name!(\"\", \"usemap\") => \"useMap\",\n    expanded_name!(\"\", \"value\") => \"value\",\n    expanded_name!(\"\", \"width\") => \"width\",\n    expanded_name!(\"\", \"wrap\") => \"wrap\",\n\n    // SVG\n    expanded_name!(\"\", \"accent-height\") => \"accentHeight\",\n    expanded_name!(\"\", \"accumulate\") => \"accumulate\",\n    expanded_name!(\"\", \"additive\") => \"additive\",\n    expanded_name!(\"\", \"alignment-baseline\") => \"alignmentBaseline\",\n    // expanded_name!(\"\", \"allowreorder\") => \"allowReorder\",\n    expanded_name!(\"\", \"alphabetic\") => \"alphabetic\",\n    expanded_name!(\"\", \"amplitude\") => \"amplitude\",\n    // expanded_name!(\"\", \"arabicform\") => \"arabicForm\",\n    expanded_name!(\"\", \"arabic-form\") => \"arabicForm\",\n    expanded_name!(\"\", \"ascent\") => \"ascent\",\n    expanded_name!(\"\", \"attributename\") => \"attributeName\",\n    expanded_name!(\"\", \"attributetype\") => \"attributeType\",\n    // expanded_name!(\"\", \"autoreverse\") => \"autoReverse\",\n    expanded_name!(\"\", \"azimuth\") => \"azimuth\",\n    expanded_name!(\"\", \"basefrequency\") => \"baseFrequency\",\n    expanded_name!(\"\", \"baseline-shift\") => \"baselineShift\",\n    expanded_name!(\"\", \"baseprofile\") => \"baseProfile\",\n    expanded_name!(\"\", \"bbox\") => \"bbox\",\n    expanded_name!(\"\", \"begin\") => \"begin\",\n    expanded_name!(\"\", \"bias\") => \"bias\",\n    expanded_name!(\"\", \"by\") => \"by\",\n    expanded_name!(\"\", \"calcmode\") => \"calcMode\",\n    expanded_name!(\"\", \"cap-height\") => \"capHeight\",\n    expanded_name!(\"\", \"clip\") => \"clip\",\n    expanded_name!(\"\", \"clippath\") => \"clipPath\",\n    expanded_name!(\"\", \"clip-path\") => \"clipPath\",\n    expanded_name!(\"\", \"clippathunits\") => \"clipPathUnits\",\n    expanded_name!(\"\", \"clip-rule\") => \"clipRule\",\n    expanded_name!(\"\", \"color\") => \"color\",\n    expanded_name!(\"\", \"color-interpolation\") => \"colorInterpolation\",\n    expanded_name!(\"\", \"color-interpolation-filters\") => \"colorInterpolationFilters\",\n    expanded_name!(\"\", \"color-profile\") => \"colorProfile\",\n    expanded_name!(\"\", \"color-rendering\") => \"colorRendering\",\n    expanded_name!(\"\", \"contentscripttype\") => \"contentScriptType\",\n    expanded_name!(\"\", \"contentstyletype\") => \"contentStyleType\",\n    expanded_name!(\"\", \"cursor\") => \"cursor\",\n    expanded_name!(\"\", \"cx\") => \"cx\",\n    expanded_name!(\"\", \"cy\") => \"cy\",\n    expanded_name!(\"\", \"d\") => \"d\",\n    expanded_name!(\"\", \"descent\") => \"descent\",\n    expanded_name!(\"\", \"diffuseconstant\") => \"diffuseConstant\",\n    expanded_name!(\"\", \"direction\") => \"direction\",\n    expanded_name!(\"\", \"display\") => \"display\",\n    expanded_name!(\"\", \"divisor\") => \"divisor\",\n    expanded_name!(\"\", \"dominant-baseline\") => \"dominantBaseline\",\n    expanded_name!(\"\", \"dur\") => \"dur\",\n    expanded_name!(\"\", \"dx\") => \"dx\",\n    expanded_name!(\"\", \"dy\") => \"dy\",\n    expanded_name!(\"\", \"edgemode\") => \"edgeMode\",\n    expanded_name!(\"\", \"elevation\") => \"elevation\",\n    expanded_name!(\"\", \"enable-background\") => \"enableBackground\",\n    expanded_name!(\"\", \"end\") => \"end\",\n    expanded_name!(\"\", \"exponent\") => \"exponent\",\n    expanded_name!(\"\", \"externalresourcesrequired\") => \"externalResourcesRequired\",\n    expanded_name!(\"\", \"fill\") => \"fill\",\n    expanded_name!(\"\", \"fill-opacity\") => \"fillOpacity\",\n    expanded_name!(\"\", \"fill-rule\") => \"fillRule\",\n    expanded_name!(\"\", \"filter\") => \"filter\",\n    expanded_name!(\"\", \"filterres\") => \"filterRes\",\n    expanded_name!(\"\", \"filterunits\") => \"filterUnits\",\n    expanded_name!(\"\", \"flood-opacity\") => \"floodOpacity\",\n    expanded_name!(\"\", \"flood-color\") => \"floodColor\",\n    expanded_name!(\"\", \"fontfamily\") => \"fontFamily\",\n    expanded_name!(\"\", \"font-family\") => \"fontFamily\",\n    expanded_name!(\"\", \"fontsize\") => \"fontSize\",\n    expanded_name!(\"\", \"font-size\") => \"fontSize\",\n    expanded_name!(\"\", \"font-size-adjust\") => \"fontSizeAdjust\",\n    expanded_name!(\"\", \"font-stretch\") => \"fontStretch\",\n    expanded_name!(\"\", \"fontstyle\") => \"fontStyle\",\n    expanded_name!(\"\", \"font-style\") => \"fontStyle\",\n    expanded_name!(\"\", \"font-variant\") => \"fontVariant\",\n    expanded_name!(\"\", \"fontweight\") => \"fontWeight\",\n    expanded_name!(\"\", \"font-weight\") => \"fontWeight\",\n    expanded_name!(\"\", \"format\") => \"format\",\n    expanded_name!(\"\", \"from\") => \"from\",\n    expanded_name!(\"\", \"fx\") => \"fx\",\n    expanded_name!(\"\", \"fy\") => \"fy\",\n    expanded_name!(\"\", \"g1\") => \"g1\",\n    expanded_name!(\"\", \"g2\") => \"g2\",\n    expanded_name!(\"\", \"glyph-name\") => \"glyphName\",\n    expanded_name!(\"\", \"glyph-orientation-horizontal\") => \"glyphOrientationHorizontal\",\n    expanded_name!(\"\", \"glyph-orientation-vertical\") => \"glyphOrientationVertical\",\n    expanded_name!(\"\", \"glyphref\") => \"glyphRef\",\n    expanded_name!(\"\", \"gradienttransform\") => \"gradientTransform\",\n    expanded_name!(\"\", \"gradientunits\") => \"gradientUnits\",\n    expanded_name!(\"\", \"hanging\") => \"hanging\",\n    expanded_name!(\"\", \"horiz-adv-x\") => \"horizAdvX\",\n    expanded_name!(\"\", \"horiz-origin-x\") => \"horizOriginX\",\n    expanded_name!(\"\", \"ideographic\") => \"ideographic\",\n    expanded_name!(\"\", \"image-rendering\") => \"imageRendering\",\n    expanded_name!(\"\", \"in2\") => \"in2\",\n    expanded_name!(\"\", \"in\") => \"in\",\n    expanded_name!(\"\", \"intercept\") => \"intercept\",\n    expanded_name!(\"\", \"k1\") => \"k1\",\n    expanded_name!(\"\", \"k2\") => \"k2\",\n    expanded_name!(\"\", \"k3\") => \"k3\",\n    expanded_name!(\"\", \"k4\") => \"k4\",\n    expanded_name!(\"\", \"k\") => \"k\",\n    expanded_name!(\"\", \"kernelmatrix\") => \"kernelMatrix\",\n    expanded_name!(\"\", \"kernelunitlength\") => \"kernelUnitLength\",\n    expanded_name!(\"\", \"kerning\") => \"kerning\",\n    expanded_name!(\"\", \"keypoints\") => \"keyPoints\",\n    expanded_name!(\"\", \"keysplines\") => \"keySplines\",\n    expanded_name!(\"\", \"keytimes\") => \"keyTimes\",\n    expanded_name!(\"\", \"lengthadjust\") => \"lengthAdjust\",\n    expanded_name!(\"\", \"letter-spacing\") => \"letterSpacing\",\n    expanded_name!(\"\", \"lighting-color\") => \"lightingColor\",\n    expanded_name!(\"\", \"limitingconeangle\") => \"limitingConeAngle\",\n    expanded_name!(\"\", \"local\") => \"local\",\n    expanded_name!(\"\", \"marker-end\") => \"markerEnd\",\n    expanded_name!(\"\", \"markerheight\") => \"markerHeight\",\n    expanded_name!(\"\", \"marker-mid\") => \"markerMid\",\n    expanded_name!(\"\", \"marker-start\") => \"markerStart\",\n    expanded_name!(\"\", \"markerunits\") => \"markerUnits\",\n    expanded_name!(\"\", \"markerwidth\") => \"markerWidth\",\n    expanded_name!(\"\", \"mask\") => \"mask\",\n    expanded_name!(\"\", \"maskcontentunits\") => \"maskContentUnits\",\n    expanded_name!(\"\", \"maskunits\") => \"maskUnits\",\n    expanded_name!(\"\", \"mathematical\") => \"mathematical\",\n    expanded_name!(\"\", \"mode\") => \"mode\",\n    expanded_name!(\"\", \"numoctaves\") => \"numOctaves\",\n    expanded_name!(\"\", \"offset\") => \"offset\",\n    expanded_name!(\"\", \"opacity\") => \"opacity\",\n    expanded_name!(\"\", \"operator\") => \"operator\",\n    expanded_name!(\"\", \"order\") => \"order\",\n    expanded_name!(\"\", \"orient\") => \"orient\",\n    expanded_name!(\"\", \"orientation\") => \"orientation\",\n    expanded_name!(\"\", \"origin\") => \"origin\",\n    expanded_name!(\"\", \"overflow\") => \"overflow\",\n    expanded_name!(\"\", \"overline-position\") => \"overlinePosition\",\n    expanded_name!(\"\", \"overline-thickness\") => \"overlineThickness\",\n    // expanded_name!(\"\", \"paint-order\") => \"paintOrder\",\n    expanded_name!(\"\", \"panose-1\") => \"panose1\",\n    expanded_name!(\"\", \"pathlength\") => \"pathLength\",\n    expanded_name!(\"\", \"patterncontentunits\") => \"patternContentUnits\",\n    expanded_name!(\"\", \"patterntransform\") => \"patternTransform\",\n    expanded_name!(\"\", \"patternunits\") => \"patternUnits\",\n    expanded_name!(\"\", \"pointer-events\") => \"pointerEvents\",\n    expanded_name!(\"\", \"points\") => \"points\",\n    expanded_name!(\"\", \"pointsatx\") => \"pointsAtX\",\n    expanded_name!(\"\", \"pointsaty\") => \"pointsAtY\",\n    expanded_name!(\"\", \"pointsatz\") => \"pointsAtZ\",\n    // expanded_name!(\"\", \"popover\") => \"popover\",\n    // expanded_name!(\"\", \"popovertarget\") => \"popoverTarget\",\n    // expanded_name!(\"\", \"popovertargetaction\") => \"popoverTargetAction\",\n    expanded_name!(\"\", \"preservealpha\") => \"preserveAlpha\",\n    expanded_name!(\"\", \"preserveaspectratio\") => \"preserveAspectRatio\",\n    expanded_name!(\"\", \"primitiveunits\") => \"primitiveUnits\",\n    expanded_name!(\"\", \"property\") => \"property\",\n    expanded_name!(\"\", \"r\") => \"r\",\n    expanded_name!(\"\", \"radius\") => \"radius\",\n    expanded_name!(\"\", \"refx\") => \"refX\",\n    expanded_name!(\"\", \"refy\") => \"refY\",\n    expanded_name!(\"\", \"rendering-intent\") => \"renderingIntent\",\n    expanded_name!(\"\", \"repeatcount\") => \"repeatCount\",\n    expanded_name!(\"\", \"repeatdur\") => \"repeatDur\",\n    expanded_name!(\"\", \"requiredextensions\") => \"requiredExtensions\",\n    expanded_name!(\"\", \"requiredfeatures\") => \"requiredFeatures\",\n    expanded_name!(\"\", \"restart\") => \"restart\",\n    expanded_name!(\"\", \"result\") => \"result\",\n    expanded_name!(\"\", \"rotate\") => \"rotate\",\n    expanded_name!(\"\", \"rx\") => \"rx\",\n    expanded_name!(\"\", \"ry\") => \"ry\",\n    expanded_name!(\"\", \"scale\") => \"scale\",\n    expanded_name!(\"\", \"seed\") => \"seed\",\n    expanded_name!(\"\", \"shape-rendering\") => \"shapeRendering\",\n    expanded_name!(\"\", \"slope\") => \"slope\",\n    expanded_name!(\"\", \"spacing\") => \"spacing\",\n    expanded_name!(\"\", \"specularconstant\") => \"specularConstant\",\n    expanded_name!(\"\", \"specularexponent\") => \"specularExponent\",\n    expanded_name!(\"\", \"speed\") => \"speed\",\n    expanded_name!(\"\", \"spreadmethod\") => \"spreadMethod\",\n    expanded_name!(\"\", \"startoffset\") => \"startOffset\",\n    expanded_name!(\"\", \"stddeviation\") => \"stdDeviation\",\n    expanded_name!(\"\", \"stemh\") => \"stemh\",\n    expanded_name!(\"\", \"stemv\") => \"stemv\",\n    expanded_name!(\"\", \"stitchtiles\") => \"stitchTiles\",\n    expanded_name!(\"\", \"stop-color\") => \"stopColor\",\n    expanded_name!(\"\", \"stop-opacity\") => \"stopOpacity\",\n    expanded_name!(\"\", \"strikethrough-position\") => \"strikethroughPosition\",\n    expanded_name!(\"\", \"strikethrough-thickness\") => \"strikethroughThickness\",\n    expanded_name!(\"\", \"string\") => \"string\",\n    expanded_name!(\"\", \"stroke\") => \"stroke\",\n    expanded_name!(\"\", \"stroke-dasharray\") => \"strokeDasharray\",\n    expanded_name!(\"\", \"stroke-dashoffset\") => \"strokeDashoffset\",\n    expanded_name!(\"\", \"stroke-linecap\") => \"strokeLinecap\",\n    expanded_name!(\"\", \"stroke-linejoin\") => \"strokeLinejoin\",\n    expanded_name!(\"\", \"stroke-miterlimit\") => \"strokeMiterlimit\",\n    expanded_name!(\"\", \"stroke-width\") => \"strokeWidth\",\n    expanded_name!(\"\", \"stroke-opacity\") => \"strokeOpacity\",\n    expanded_name!(\"\", \"surfacescale\") => \"surfaceScale\",\n    expanded_name!(\"\", \"systemlanguage\") => \"systemLanguage\",\n    expanded_name!(\"\", \"tablevalues\") => \"tableValues\",\n    expanded_name!(\"\", \"targetx\") => \"targetX\",\n    expanded_name!(\"\", \"targety\") => \"targetY\",\n    expanded_name!(\"\", \"text-anchor\") => \"textAnchor\",\n    expanded_name!(\"\", \"text-decoration\") => \"textDecoration\",\n    expanded_name!(\"\", \"textlength\") => \"textLength\",\n    expanded_name!(\"\", \"text-rendering\") => \"textRendering\",\n    expanded_name!(\"\", \"to\") => \"to\",\n    expanded_name!(\"\", \"transform\") => \"transform\",\n    // expanded_name!(\"\", \"transform-origin\") => \"transformOrigin\",\n    expanded_name!(\"\", \"u1\") => \"u1\",\n    expanded_name!(\"\", \"u2\") => \"u2\",\n    expanded_name!(\"\", \"underline-position\") => \"underlinePosition\",\n    expanded_name!(\"\", \"underline-thickness\") => \"underlineThickness\",\n    expanded_name!(\"\", \"unicode\") => \"unicode\",\n    expanded_name!(\"\", \"unicode-bidi\") => \"unicodeBidi\",\n    expanded_name!(\"\", \"unicode-range\") => \"unicodeRange\",\n    expanded_name!(\"\", \"units-per-em\") => \"unitsPerEm\",\n    expanded_name!(\"\", \"unselectable\") => \"unselectable\",\n    expanded_name!(\"\", \"v-alphabetic\") => \"vAlphabetic\",\n    expanded_name!(\"\", \"values\") => \"values\",\n    // expanded_name!(\"\", \"vector-effect\") => \"vectorEffect\",\n    expanded_name!(\"\", \"version\") => \"version\",\n    expanded_name!(\"\", \"vert-adv-y\") => \"vertAdvY\",\n    expanded_name!(\"\", \"vert-origin-x\") => \"vertOriginX\",\n    expanded_name!(\"\", \"vert-origin-y\") => \"vertOriginY\",\n    expanded_name!(\"\", \"v-hanging\") => \"vHanging\",\n    expanded_name!(\"\", \"v-ideographic\") => \"vIdeographic\",\n    expanded_name!(\"\", \"viewbox\") => \"viewBox\",\n    expanded_name!(\"\", \"viewtarget\") => \"viewTarget\",\n    expanded_name!(\"\", \"visibility\") => \"visibility\",\n    expanded_name!(\"\", \"v-mathematical\") => \"vMathematical\",\n    expanded_name!(\"\", \"widths\") => \"widths\",\n    expanded_name!(\"\", \"word-spacing\") => \"wordSpacing\",\n    expanded_name!(\"\", \"writing-mode\") => \"writingMode\",\n    expanded_name!(\"\", \"x1\") => \"x1\",\n    expanded_name!(\"\", \"x2\") => \"x2\",\n    expanded_name!(\"\", \"x\") => \"x\",\n    expanded_name!(\"\", \"xchannelselector\") => \"xChannelSelector\",\n    expanded_name!(\"\", \"x-height\") => \"xHeight\",\n    expanded_name!(xlink \"actuate\") => \"xlinkActuate\",\n    expanded_name!(xlink \"arcrole\") => \"xlinkArcrole\",\n    expanded_name!(xlink \"href\") => \"xlinkHref\",\n    expanded_name!(xlink \"role\") => \"xlinkRole\",\n    expanded_name!(xlink \"show\") => \"xlinkShow\",\n    expanded_name!(xlink \"title\") => \"xlinkTitle\",\n    expanded_name!(xlink \"type\") => \"xlinkType\",\n    expanded_name!(xml \"base\") => \"xmlBase\",\n    expanded_name!(xml \"lang\") => \"xmlLang\",\n    expanded_name!(xmlns \"xmlns\") => \"xmlns\",\n    expanded_name!(xml \"space\") => \"xmlSpace\",\n    expanded_name!(xmlns \"xlink\") => \"xmlnsXlink\",\n    expanded_name!(\"\", \"y1\") => \"y1\",\n    expanded_name!(\"\", \"y2\") => \"y2\",\n    expanded_name!(\"\", \"y\") => \"y\",\n    expanded_name!(\"\", \"ychannelselector\") => \"yChannelSelector\",\n    expanded_name!(\"\", \"z\") => \"z\",\n    expanded_name!(\"\", \"zoomandpan\") => \"zoomAndPan\",\n    _ => name.local.as_ref(),\n  }\n}\n\nfn jsx_attr_value(name: ExpandedName, value: &str) -> JSXAttrValue {\n  match name {\n    expanded_name!(\"\", \"style\") => {\n      if let Ok(attr) = lightningcss::stylesheet::StyleAttribute::parse(value, Default::default()) {\n        let properties = attr\n          .declarations\n          .declarations\n          .into_iter()\n          .map(|decl| {\n            let name = match decl.property_id() {\n              lightningcss::properties::PropertyId::Custom(\n                lightningcss::properties::custom::CustomPropertyName::Custom(name),\n              ) => name.0.as_ref().to_string(),\n              id => {\n                let name = id.name();\n                name.to_case(Case::Camel)\n              }\n            };\n\n            PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp {\n              key: if Ident::verify_symbol(&name).is_err() {\n                PropName::Str(name.into())\n              } else {\n                PropName::Ident(IdentName::new(name.into(), DUMMY_SP))\n              },\n              value: Box::new(\n                decl\n                  .value_to_css_string(Default::default())\n                  .unwrap_or_default()\n                  .into(),\n              ),\n            })))\n          })\n          .collect();\n\n        JSXAttrValue::JSXExprContainer(JSXExprContainer {\n          span: DUMMY_SP,\n          expr: JSXExpr::Expr(Box::new(Expr::Object(ObjectLit {\n            props: properties,\n            span: DUMMY_SP,\n          }))),\n        })\n      } else {\n        JSXAttrValue::JSXExprContainer(JSXExprContainer {\n          span: DUMMY_SP,\n          expr: JSXExpr::Expr(Box::new(Expr::Object(ObjectLit {\n            props: vec![],\n            span: DUMMY_SP,\n          }))),\n        })\n      }\n    }\n    _ => {\n      if let Ok(num) = value.parse::<f64>() {\n        return JSXAttrValue::JSXExprContainer(JSXExprContainer {\n          span: DUMMY_SP,\n          expr: JSXExpr::Expr(Box::new(Expr::Lit(Lit::Num(num.into())))),\n        });\n      } else if value.ends_with(\"px\") {\n        if let Ok(num) = value[0..value.len() - 2].parse::<f64>() {\n          return JSXAttrValue::JSXExprContainer(JSXExprContainer {\n            span: DUMMY_SP,\n            expr: JSXExpr::Expr(Box::new(Expr::Lit(Lit::Num(num.into())))),\n          });\n        }\n      } else if value.starts_with(\"{\") && value.ends_with(\"}\") {\n        let source_map = Lrc::new(SourceMap::default());\n        let source_file = source_map.new_source_file(\n          Lrc::new(swc_core::common::FileName::Anon),\n          value[1..value.len() - 1].into(),\n        );\n        let lexer = Lexer::new(\n          Default::default(),\n          Default::default(),\n          StringInput::from(&*source_file),\n          None,\n        );\n\n        let mut parser = Parser::new_from(lexer);\n        match parser.parse_expr() {\n          Ok(expr) => {\n            return JSXAttrValue::JSXExprContainer(JSXExprContainer {\n              span: DUMMY_SP,\n              expr: JSXExpr::Expr(expr),\n            });\n          }\n          Err(_) => {}\n        }\n      }\n\n      JSXAttrValue::Lit(Lit::Str(value.into()))\n    }\n  }\n}\n\n#[derive(Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct JsxOptions {\n  #[serde(default)]\n  pub icon: Icon,\n  #[serde(default)]\n  pub expand_props: ExpandProps,\n  #[serde(default = \"default_true\")]\n  pub svgo: bool,\n  #[serde(default)]\n  pub svgo_config: OxvgConfig,\n  #[serde(default = \"default_true\")]\n  pub dimensions: bool,\n  #[serde(default, rename = \"ref\")]\n  add_ref: bool,\n  #[serde(default)]\n  memo: bool,\n  #[serde(default)]\n  replace_attr_values: IndexMap<String, String>,\n  #[serde(default)]\n  svg_props: IndexMap<String, String>,\n  #[serde(default)]\n  title_prop: bool,\n  #[serde(default)]\n  desc_prop: bool,\n}\n\nfn default_true() -> bool {\n  true\n}\n\nimpl Default for JsxOptions {\n  fn default() -> Self {\n    JsxOptions {\n      icon: Icon::default(),\n      expand_props: ExpandProps::default(),\n      svgo: true,\n      svgo_config: OxvgConfig::default(),\n      dimensions: true,\n      add_ref: false,\n      memo: false,\n      replace_attr_values: IndexMap::new(),\n      svg_props: IndexMap::new(),\n      title_prop: false,\n      desc_prop: false,\n    }\n  }\n}\n\n#[derive(Default)]\npub enum Icon {\n  #[default]\n  None,\n  String(String),\n  Number(f64),\n}\n\nimpl Icon {\n  pub fn is_some(&self) -> bool {\n    !matches!(self, Icon::None)\n  }\n}\n\nimpl<'de> Deserialize<'de> for Icon {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    let value: serde_json::Value = Deserialize::deserialize(deserializer)?;\n    Ok(match value {\n      serde_json::Value::Bool(value) => {\n        if value {\n          Icon::String(\"1em\".into())\n        } else {\n          Icon::None\n        }\n      }\n      serde_json::Value::String(value) => Icon::String(value),\n      serde_json::Value::Number(num) => num\n        .as_f64()\n        .map(Icon::Number)\n        .unwrap_or_else(|| Icon::String(\"1em\".into())),\n      _ => Icon::None,\n    })\n  }\n}\n\n#[derive(Default)]\npub enum ExpandProps {\n  Start,\n  #[default]\n  End,\n  None,\n}\n\nimpl<'de> Deserialize<'de> for ExpandProps {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    let value: serde_json::Value = Deserialize::deserialize(deserializer)?;\n    Ok(match value {\n      serde_json::Value::Bool(value) => {\n        if value {\n          ExpandProps::End\n        } else {\n          ExpandProps::None\n        }\n      }\n      serde_json::Value::String(value) => match value.as_str() {\n        \"start\" => ExpandProps::Start,\n        \"end\" => ExpandProps::End,\n        \"none\" => ExpandProps::None,\n        _ => ExpandProps::End,\n      },\n      _ => ExpandProps::None,\n    })\n  }\n}\n\npub fn to_component<'arena>(dom: &'arena Node<'arena>, options: JsxOptions) -> Program {\n  if let Some(svg) = dom.find(expanded_name!(svg \"svg\")) {\n    svg.remove_attribute(expanded_name!(xmlns \"xmlns\"));\n  }\n\n  if options.dimensions {\n    match &options.icon {\n      Icon::None => {}\n      Icon::String(value) => {\n        if let Some(svg) = dom.find(expanded_name!(svg \"svg\")) {\n          svg.set_attribute(expanded_name!(\"\", \"width\"), &value);\n          svg.set_attribute(expanded_name!(\"\", \"height\"), &value);\n        }\n      }\n      Icon::Number(value) => {\n        if let Some(svg) = dom.find(expanded_name!(svg \"svg\")) {\n          let value = value.to_string();\n          svg.set_attribute(expanded_name!(\"\", \"width\"), &value);\n          svg.set_attribute(expanded_name!(\"\", \"height\"), &value);\n        }\n      }\n    }\n  } else {\n    if let Some(svg) = dom.find(expanded_name!(svg \"svg\")) {\n      svg.remove_attribute(expanded_name!(\"\", \"width\"));\n      svg.remove_attribute(expanded_name!(\"\", \"height\"));\n    }\n  }\n\n  if !options.svg_props.is_empty() {\n    if let Some(svg) = dom.find(expanded_name!(svg \"svg\")) {\n      for (key, value) in options.svg_props {\n        svg.set_attribute(\n          ExpandedName {\n            ns: &ns!(),\n            local: &key.into(),\n          },\n          &value,\n        );\n      }\n    }\n  }\n\n  if !options.replace_attr_values.is_empty() {\n    dom.walk(&mut |node| {\n      if let NodeData::Element { attrs, .. } = &node.data {\n        for attr in attrs.borrow_mut().iter_mut() {\n          if let Some(replacement) = options.replace_attr_values.get(attr.value.as_ref()) {\n            attr.value = replacement.clone().into();\n          }\n        }\n      }\n    });\n  }\n\n  let jsx = to_jsx(dom);\n  let mut params = Vec::new();\n  let expr = match jsx {\n    JSXElementChild::JSXElement(mut el) => {\n      // Add extra props to the root <svg> element if needed.\n      if options.add_ref\n        || !matches!(options.expand_props, ExpandProps::None)\n        || options.title_prop\n        || options.desc_prop\n      {\n        let props = Ident::new_private(\"props\".into(), DUMMY_SP);\n        let ref_ = Ident::new_private(\"ref\".into(), DUMMY_SP);\n        let title = if options.title_prop {\n          Some(Ident::new_private(\"title\".into(), DUMMY_SP))\n        } else {\n          None\n        };\n        let desc = if options.desc_prop {\n          Some(Ident::new_private(\"desc\".into(), DUMMY_SP))\n        } else {\n          None\n        };\n\n        let mut pat = Pat::Ident(BindingIdent {\n          id: props.clone(),\n          type_ann: None,\n        });\n\n        if options.title_prop || options.desc_prop {\n          let mut props = Vec::new();\n          if let Some(title) = title {\n            props.push(ObjectPatProp::Assign(AssignPatProp {\n              span: DUMMY_SP,\n              key: BindingIdent {\n                id: title.clone(),\n                type_ann: None,\n              },\n              value: None,\n            }));\n\n            el.children.insert(0, conditional_el(\"title\", title));\n          }\n          if let Some(desc) = desc {\n            props.push(ObjectPatProp::Assign(AssignPatProp {\n              span: DUMMY_SP,\n              key: BindingIdent {\n                id: desc.clone(),\n                type_ann: None,\n              },\n              value: None,\n            }));\n\n            el.children.insert(0, conditional_el(\"desc\", desc));\n          }\n\n          props.push(ObjectPatProp::Rest(RestPat {\n            span: DUMMY_SP,\n            dot3_token: DUMMY_SP,\n            arg: Box::new(pat),\n            type_ann: None,\n          }));\n\n          pat = Pat::Object(ObjectPat {\n            span: DUMMY_SP,\n            props,\n            optional: false,\n            type_ann: None,\n          })\n        }\n\n        params.push(Param {\n          pat,\n          decorators: vec![],\n          span: DUMMY_SP,\n        });\n\n        if options.add_ref {\n          params.push(Param {\n            pat: Pat::Ident(BindingIdent {\n              id: ref_.clone(),\n              type_ann: None,\n            }),\n            decorators: vec![],\n            span: DUMMY_SP,\n          });\n\n          el.opening.attrs.push(JSXAttrOrSpread::JSXAttr(JSXAttr {\n            span: DUMMY_SP,\n            name: JSXAttrName::Ident(IdentName::new(\"ref\".into(), DUMMY_SP)),\n            value: Some(JSXAttrValue::JSXExprContainer(JSXExprContainer {\n              span: DUMMY_SP,\n              expr: JSXExpr::Expr(Box::new(Expr::Ident(ref_))),\n            })),\n          }));\n        }\n\n        if !matches!(options.expand_props, ExpandProps::None) {\n          let spread = JSXAttrOrSpread::SpreadElement(SpreadElement {\n            expr: Box::new(Expr::Ident(props)),\n            dot3_token: DUMMY_SP,\n          });\n\n          match options.expand_props {\n            ExpandProps::Start => el.opening.attrs.insert(0, spread),\n            ExpandProps::End => el.opening.attrs.push(spread),\n            ExpandProps::None => unreachable!(),\n          }\n        }\n      }\n\n      Expr::JSXElement(el)\n    }\n    JSXElementChild::JSXExprContainer(expr) => match expr.expr {\n      JSXExpr::Expr(expr) => *expr,\n      JSXExpr::JSXEmptyExpr(_) => Expr::Lit(Lit::Null(Null { span: DUMMY_SP })),\n    },\n    JSXElementChild::JSXText(text) => Expr::Lit(Lit::Str(text.value.into())),\n    JSXElementChild::JSXFragment(frag) => Expr::JSXFragment(frag),\n    JSXElementChild::JSXSpreadChild(_) => unreachable!(),\n  };\n\n  let function = FnExpr {\n    ident: Some(Ident::new_private(\"SvgComponent\".into(), DUMMY_SP)),\n    function: Box::new(Function {\n      params,\n      body: Some(BlockStmt {\n        stmts: vec![Stmt::Return(ReturnStmt {\n          arg: Some(Box::new(expr)),\n          ..Default::default()\n        })],\n        ..Default::default()\n      }),\n      ..Default::default()\n    }),\n  };\n\n  let mut import_specifiers = Vec::new();\n\n  // Add forwardRef and memo wrappers if needed.\n  let export = if options.add_ref || options.memo {\n    let mut expr = Expr::Fn(function);\n\n    if options.add_ref {\n      let forward_ref = Ident::new_private(\"forwardRef\".into(), DUMMY_SP);\n      expr = Expr::Call(CallExpr {\n        callee: Callee::Expr(Box::new(Expr::Ident(forward_ref.clone()))),\n        args: vec![ExprOrSpread {\n          expr: Box::new(expr),\n          spread: None,\n        }],\n        ..Default::default()\n      });\n\n      import_specifiers.push(ImportSpecifier::Named(ImportNamedSpecifier {\n        local: forward_ref,\n        imported: None,\n        is_type_only: false,\n        span: DUMMY_SP,\n      }));\n    }\n\n    if options.memo {\n      let memo = Ident::new_private(\"memo\".into(), DUMMY_SP);\n      expr = Expr::Call(CallExpr {\n        callee: Callee::Expr(Box::new(Expr::Ident(memo.clone()))),\n        args: vec![ExprOrSpread {\n          expr: Box::new(expr),\n          spread: None,\n        }],\n        ..Default::default()\n      });\n\n      import_specifiers.push(ImportSpecifier::Named(ImportNamedSpecifier {\n        local: memo,\n        imported: None,\n        is_type_only: false,\n        span: DUMMY_SP,\n      }));\n    }\n\n    ModuleDecl::ExportDefaultExpr(ExportDefaultExpr {\n      expr: Box::new(expr),\n      span: DUMMY_SP,\n    })\n  } else {\n    ModuleDecl::ExportDefaultDecl(ExportDefaultDecl {\n      span: DUMMY_SP,\n      decl: DefaultDecl::Fn(function),\n    })\n  };\n\n  let mut body = Vec::new();\n  if !import_specifiers.is_empty() {\n    body.push(ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {\n      src: Box::new(\"react\".into()),\n      specifiers: import_specifiers,\n      span: DUMMY_SP,\n      type_only: false,\n      phase: ImportPhase::default(),\n      with: None,\n    })));\n  }\n\n  body.push(ModuleItem::ModuleDecl(export));\n\n  Program::Module(Module {\n    body,\n    ..Default::default()\n  })\n}\n\nfn conditional_el(name: &str, children: Ident) -> JSXElementChild {\n  let desc_ident = JSXElementName::Ident(Ident::new_no_ctxt(name.into(), DUMMY_SP));\n  JSXElementChild::JSXExprContainer(JSXExprContainer {\n    span: DUMMY_SP,\n    expr: JSXExpr::Expr(Box::new(Expr::Bin(BinExpr {\n      span: DUMMY_SP,\n      op: BinaryOp::LogicalAnd,\n      left: Box::new(Expr::Ident(children.clone())),\n      right: Box::new(Expr::JSXElement(Box::new(JSXElement {\n        span: DUMMY_SP,\n        opening: JSXOpeningElement {\n          name: desc_ident.clone(),\n          attrs: Vec::new(),\n          self_closing: false,\n          span: DUMMY_SP,\n          type_args: None,\n        },\n        children: vec![JSXElementChild::JSXExprContainer(JSXExprContainer {\n          span: DUMMY_SP,\n          expr: JSXExpr::Expr(Box::new(Expr::Ident(children))),\n        })],\n        closing: Some(JSXClosingElement {\n          name: desc_ident,\n          span: DUMMY_SP,\n        }),\n      }))),\n    }))),\n  })\n}\n\n#[cfg(test)]\nmod tests {\n  use super::*;\n  use crate::arena::Sink;\n  use html5ever::tendril::TendrilSink;\n  use indoc::indoc;\n  use swc_core::ecma::codegen::to_code;\n  use typed_arena::Arena;\n\n  fn test(input: &str, expected: &str, options: JsxOptions) {\n    let arena = Arena::new();\n    let dom = xml5ever::driver::parse_document(\n      Sink::new(&arena),\n      xml5ever::driver::XmlParseOpts::default(),\n    )\n    .from_utf8()\n    .one(input.as_bytes());\n\n    swc_core::common::GLOBALS.set(&swc_core::common::Globals::new(), || {\n      let program = to_component(dom, options);\n      let code = to_code(&program);\n\n      assert_eq!(code, expected);\n    });\n  }\n\n  #[test]\n  fn test_default() {\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent(props) {\n        return <svg viewBox=\"0 0 100 100\" {...props}>\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      Default::default(),\n    );\n\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\">\n      <rect style=\"fill: rgb(255, 0, 0); stroke: yellow; font-family: Helvetica; --foo-bar: test\"></rect>\n    </svg>\n    \"#,\n      indoc! {r##\"\n    export default function SvgComponent(props) {\n        return <svg {...props}>\n          <rect style={{\n            fill: \"red\",\n            stroke: \"#ff0\",\n            fontFamily: \"Helvetica\",\n            \"--foo-bar\": \"test\"\n        }}/>\n        </svg>;\n    }\n    \"##},\n      Default::default(),\n    );\n  }\n\n  #[test]\n  fn test_ref() {\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    import { forwardRef } from \"react\";\n    export default forwardRef(function SvgComponent(props, ref) {\n        return <svg ref={ref} {...props}>\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    });\n    \"#},\n      JsxOptions {\n        add_ref: true,\n        ..Default::default()\n      },\n    );\n  }\n\n  #[test]\n  fn test_memo() {\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    import { memo } from \"react\";\n    export default memo(function SvgComponent(props) {\n        return <svg {...props}>\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    });\n    \"#},\n      JsxOptions {\n        memo: true,\n        ..Default::default()\n      },\n    );\n\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    import { forwardRef, memo } from \"react\";\n    export default memo(forwardRef(function SvgComponent(props, ref) {\n        return <svg ref={ref} {...props}>\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }));\n    \"#},\n      JsxOptions {\n        memo: true,\n        add_ref: true,\n        ..Default::default()\n      },\n    );\n  }\n\n  #[test]\n  fn test_props() {\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent(props) {\n        return <svg {...props} viewBox=\"0 0 100 100\">\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        expand_props: ExpandProps::Start,\n        ..Default::default()\n      },\n    );\n\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent() {\n        return <svg viewBox=\"0 0 100 100\">\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        expand_props: ExpandProps::None,\n        ..Default::default()\n      },\n    );\n\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    import { forwardRef } from \"react\";\n    export default forwardRef(function SvgComponent(props, ref) {\n        return <svg viewBox=\"0 0 100 100\" ref={ref}>\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    });\n    \"#},\n      JsxOptions {\n        expand_props: ExpandProps::None,\n        add_ref: true,\n        ..Default::default()\n      },\n    );\n\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <text xml:space=\"preserve\"> foo </text>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent(props) {\n        return <svg viewBox=\"0 0 100 100\" {...props}>\n          <text xmlSpace=\"preserve\"> foo </text>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        ..Default::default()\n      },\n    );\n  }\n\n  #[test]\n  fn test_icon() {\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent(props) {\n        return <svg viewBox=\"0 0 100 100\" width=\"1em\" height=\"1em\" {...props}>\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        icon: Icon::String(\"1em\".into()),\n        ..Default::default()\n      },\n    );\n\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent(props) {\n        return <svg viewBox=\"0 0 100 100\" {...props}>\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        icon: Icon::String(\"1em\".into()),\n        dimensions: false,\n        ..Default::default()\n      },\n    );\n\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" width=\"24\" height=\"24\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent(props) {\n        return <svg viewBox=\"0 0 100 100\" {...props}>\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        dimensions: false,\n        ..Default::default()\n      },\n    );\n  }\n\n  #[test]\n  fn test_title() {\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent({ title, ...props }) {\n        return <svg viewBox=\"0 0 100 100\" {...props}>{title && <title>{title}</title>}\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        title_prop: true,\n        ..Default::default()\n      },\n    );\n  }\n\n  #[test]\n  fn test_desc() {\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent({ desc, ...props }) {\n        return <svg viewBox=\"0 0 100 100\" {...props}>{desc && <desc>{desc}</desc>}\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        desc_prop: true,\n        ..Default::default()\n      },\n    );\n\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent({ title, desc, ...props }) {\n        return <svg viewBox=\"0 0 100 100\" {...props}>{desc && <desc>{desc}</desc>}{title && <title>{title}</title>}\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        title_prop: true,\n        desc_prop: true,\n        ..Default::default()\n      },\n    );\n  }\n\n  #[test]\n  fn test_svg_props() {\n    test(\n      r#\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect x=\"25\" y=\"36\" width=\"48\" height=\"1\" aria-label=\"Test\" class=\"rect\"></rect>\n    </svg>\n    \"#,\n      indoc! {r#\"\n    export default function SvgComponent(props) {\n        return <svg viewBox=\"0 0 100 100\" role=\"img\" {...props}>\n          <rect x={25} y={36} width={48} height={1} aria-label=\"Test\" className=\"rect\"/>\n        </svg>;\n    }\n    \"#},\n      JsxOptions {\n        svg_props: IndexMap::from([(\"role\".into(), \"img\".into())]),\n        ..Default::default()\n      },\n    );\n  }\n\n  #[test]\n  fn test_replace_attr_values() {\n    test(\n      r##\"\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n      <rect fill=\"#ff0\"></rect>\n    </svg>\n    \"##,\n      indoc! {r##\"\n    export default function SvgComponent(props) {\n        return <svg viewBox=\"0 0 100 100\" {...props}>\n          <rect fill={props.fill}/>\n        </svg>;\n    }\n    \"##},\n      JsxOptions {\n        replace_attr_values: IndexMap::from([(\"#ff0\".into(), \"{props.fill}\".into())]),\n        ..Default::default()\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "crates/html/src/lib.rs",
    "content": "use std::{collections::HashMap, path::PathBuf, sync::Arc};\n\nuse arena::{SerializableHandle, Sink};\nuse dependencies::collect_dependencies;\nuse html5ever::tendril::{StrTendril, TendrilSink};\nuse jsx::{JsxOptions, to_component};\nuse optimize::optimize;\nuse oxvg::ConfigItem;\nuse package::{BundleReference, InlineBundle, insert_bundle_references};\nuse parcel_core::{Asset, AssetType, Dependency, Diagnostic, Environment};\nuse serde::{Deserialize, Serialize, Serializer};\nuse swc_core::ecma::codegen::to_code;\nuse typed_arena::Arena;\n\nmod arena;\nmod dependencies;\nmod jsx;\nmod optimize;\nmod oxvg;\nmod package;\nmod serialize_html;\nmod serialize_xml;\nmod srcset;\n\n#[derive(Hash, PartialEq, Eq, PartialOrd, Ord, Default, Clone)]\npub struct SerializableTendril(StrTendril);\n\nimpl serde::Serialize for SerializableTendril {\n  fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n  where\n    S: Serializer,\n  {\n    serializer.serialize_str(self.0.as_ref())\n  }\n}\n\nimpl<'de> serde::Deserialize<'de> for SerializableTendril {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    let s: String = Deserialize::deserialize(deserializer)?;\n    Ok(SerializableTendril(s.into()))\n  }\n}\n\n#[derive(Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct TransformOptions {\n  #[serde(with = \"serde_bytes\")]\n  pub code: Vec<u8>,\n  pub file_path: PathBuf,\n  pub xml: bool,\n  pub env: Arc<Environment>,\n  pub hmr: bool,\n}\n\n#[derive(Serialize)]\npub struct TransformResult {\n  dependencies: Vec<Dependency>,\n  #[serde(with = \"serde_bytes\")]\n  code: Vec<u8>,\n  assets: Vec<Asset>,\n  errors: Vec<Diagnostic>,\n}\n\npub fn transform_html(options: TransformOptions) -> TransformResult {\n  let arena = Arena::new();\n  let dom = if options.xml {\n    xml5ever::driver::parse_document(Sink::new(&arena), xml5ever::driver::XmlParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice())\n  } else {\n    html5ever::driver::parse_document(Sink::new(&arena), html5ever::ParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice())\n  };\n\n  let (deps, assets, mut errors) = collect_dependencies(\n    &arena,\n    &dom,\n    options.file_path,\n    AssetType::Html,\n    options.env,\n    options.hmr,\n  );\n\n  let mut vec = Vec::new();\n  let res = if options.xml {\n    serialize_xml::serialize(&mut vec, dom)\n  } else {\n    let handle: SerializableHandle = dom.into();\n    html5ever::serialize::serialize(\n      &mut vec,\n      &handle,\n      html5ever::serialize::SerializeOpts::default(),\n    )\n  };\n  if let Err(err) = res {\n    errors.push(err.into());\n  }\n\n  TransformResult {\n    code: vec,\n    dependencies: deps,\n    assets,\n    errors,\n  }\n}\n\npub fn transform_svg(options: TransformOptions) -> TransformResult {\n  let arena = Arena::new();\n  let dom =\n    xml5ever::driver::parse_document(Sink::new(&arena), xml5ever::driver::XmlParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice());\n  let (deps, assets, mut errors) = collect_dependencies(\n    &arena,\n    &dom,\n    options.file_path,\n    AssetType::Svg,\n    options.env,\n    options.hmr,\n  );\n\n  let mut vec = Vec::new();\n  if let Err(err) = serialize_xml::serialize(&mut vec, dom) {\n    errors.push(err.into());\n  }\n\n  TransformResult {\n    code: vec,\n    dependencies: deps,\n    assets,\n    errors,\n  }\n}\n\n#[derive(Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct PackageOptions {\n  #[serde(with = \"serde_bytes\")]\n  pub code: Vec<u8>,\n  pub xml: bool,\n  pub bundles: Vec<BundleReference>,\n  pub inline_bundles: HashMap<SerializableTendril, InlineBundle>,\n  pub import_map: serde_json::Map<String, serde_json::Value>,\n}\n\n#[derive(Serialize)]\npub struct PackageResult {\n  #[serde(with = \"serde_bytes\")]\n  pub code: Vec<u8>,\n}\n\npub fn package_html(options: PackageOptions) -> Result<PackageResult, ()> {\n  let arena = Arena::new();\n  let dom = if options.xml {\n    xml5ever::driver::parse_document(Sink::new(&arena), xml5ever::driver::XmlParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice())\n  } else {\n    html5ever::driver::parse_document(Sink::new(&arena), html5ever::ParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice())\n  };\n\n  insert_bundle_references(\n    &arena,\n    dom,\n    options.bundles,\n    options.inline_bundles,\n    options.import_map,\n  );\n\n  let mut vec = Vec::new();\n  if options.xml {\n    serialize_xml::serialize(&mut vec, dom).map_err(|_| ())?;\n  } else {\n    html5ever::serialize::serialize(\n      &mut vec,\n      &SerializableHandle(dom),\n      html5ever::serialize::SerializeOpts::default(),\n    )\n    .map_err(|_| ())?;\n  }\n\n  Ok(PackageResult { code: vec })\n}\n\npub fn package_svg(options: PackageOptions) -> Result<PackageResult, ()> {\n  let arena = Arena::new();\n  let dom =\n    xml5ever::driver::parse_document(Sink::new(&arena), xml5ever::driver::XmlParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice());\n\n  insert_bundle_references(\n    &arena,\n    dom,\n    options.bundles,\n    options.inline_bundles,\n    options.import_map,\n  );\n\n  let mut vec = Vec::new();\n  serialize_xml::serialize(&mut vec, dom).map_err(|_| ())?;\n\n  Ok(PackageResult { code: vec })\n}\n\n#[derive(Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct OptimizeHtmlOptions {\n  #[serde(with = \"serde_bytes\")]\n  pub code: Vec<u8>,\n  pub xml: bool,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub config: optimize::OptimizeOptions,\n}\n\nfn ok_or_default<'de, T, D>(deserializer: D) -> Result<T, D::Error>\nwhere\n  T: serde::Deserialize<'de> + Default,\n  D: serde::Deserializer<'de>,\n{\n  Ok(T::deserialize(deserializer).unwrap_or_default())\n}\n\npub fn optimize_html(options: OptimizeHtmlOptions) -> Result<PackageResult, ()> {\n  let arena = Arena::new();\n  let dom = if options.xml {\n    xml5ever::driver::parse_document(Sink::new(&arena), xml5ever::driver::XmlParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice())\n  } else {\n    html5ever::driver::parse_document(Sink::new(&arena), html5ever::ParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice())\n  };\n\n  optimize(&arena, dom, options.config);\n\n  let mut vec: Vec<u8> = Vec::new();\n  if options.xml {\n    serialize_xml::serialize(&mut vec, dom).map_err(|_| ())?;\n  } else {\n    serialize_html::serialize(&mut vec, dom, serialize_html::SerializeOpts::default())\n      .map_err(|_| ())?;\n  }\n\n  Ok(PackageResult { code: vec })\n}\n\n#[derive(Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct OptimizeSvgOptions {\n  #[serde(with = \"serde_bytes\")]\n  pub code: Vec<u8>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub config: oxvg::OxvgConfig,\n}\n\npub fn optimize_svg(options: OptimizeSvgOptions) -> Result<PackageResult, ()> {\n  let arena = Arena::new();\n  let dom =\n    xml5ever::driver::parse_document(Sink::new(&arena), xml5ever::driver::XmlParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice());\n\n  optimize::optimize_svg(&arena, dom, &options.config);\n\n  let mut vec = Vec::new();\n  serialize_xml::serialize(&mut vec, dom).map_err(|_| ())?;\n\n  Ok(PackageResult { code: vec })\n}\n\n#[derive(Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct SvgReactOptions {\n  #[serde(with = \"serde_bytes\")]\n  pub code: Vec<u8>,\n  pub config: JsxOptions,\n}\n\npub fn svg_react(mut options: SvgReactOptions) -> Result<PackageResult, ()> {\n  let arena = Arena::new();\n  let dom =\n    xml5ever::driver::parse_document(Sink::new(&arena), xml5ever::driver::XmlParseOpts::default())\n      .from_utf8()\n      .one(options.code.as_slice());\n\n  if options.config.svgo {\n    if options.config.icon.is_some() || !options.config.dimensions {\n      options.config.svgo_config.remove_view_box = ConfigItem::Bool(false);\n    }\n\n    optimize::optimize_svg(&arena, dom, &options.config.svgo_config);\n  }\n\n  swc_core::common::GLOBALS.set(&swc_core::common::Globals::new(), || {\n    let program = to_component(dom, options.config);\n    let code = to_code(&program);\n\n    Ok(PackageResult {\n      code: code.into_bytes(),\n    })\n  })\n}\n\n#[cfg(test)]\nmod tests {\n  use crate::transform_html;\n\n  #[test]\n  fn test_transform() {\n    let res = transform_html(crate::TransformOptions {\n      code: \"<html><body><template><div>test</div><span>hi</span></template></body></html>\".into(),\n      file_path: \"foo.html\".into(),\n      xml: false,\n      env: Default::default(),\n      hmr: false,\n    });\n\n    assert_eq!(\n      std::str::from_utf8(&res.code).unwrap(),\n      \"<html><head></head><body><template><div>test</div><span>hi</span></template></body></html>\"\n    );\n  }\n}\n"
  },
  {
    "path": "crates/html/src/optimize.rs",
    "content": "use std::collections::HashSet;\n\nuse html5ever::{ExpandedName, expanded_name, local_name, namespace_url, ns};\nuse typed_arena::Arena;\nuse xml5ever::tendril::StrTendril;\n\nuse crate::{\n  arena::{Node, NodeData, Ref},\n  oxvg::{OxvgConfig, OxvgKind},\n};\n\n#[derive(serde::Deserialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct OptimizeOptions {\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  collapse_attribute_whitespace: bool,\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  collapse_whitespace: bool,\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  deduplicate_attribute_values: bool,\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  remove_comments: bool,\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  remove_empty_attributes: bool,\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  minify_json: bool,\n  #[serde(default)]\n  minify_svg: OxvgConfig,\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  remove_redundant_attributes: bool,\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  collapse_boolean_attributes: bool,\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  normalize_attribute_values: bool,\n  #[serde(default = \"default_true\", deserialize_with = \"ok_or_default\")]\n  sort_attributes_with_lists: bool,\n}\n\nfn default_true() -> bool {\n  true\n}\n\nfn ok_or_default<'de, D>(deserializer: D) -> Result<bool, D::Error>\nwhere\n  D: serde::Deserializer<'de>,\n{\n  Ok(serde::Deserialize::deserialize(deserializer).unwrap_or(true))\n}\n\nimpl Default for OptimizeOptions {\n  fn default() -> Self {\n    OptimizeOptions {\n      collapse_attribute_whitespace: true,\n      collapse_whitespace: true,\n      deduplicate_attribute_values: true,\n      remove_comments: true,\n      remove_empty_attributes: true,\n      minify_json: true,\n      minify_svg: Default::default(),\n      remove_redundant_attributes: true,\n      collapse_boolean_attributes: true,\n      normalize_attribute_values: true,\n      sort_attributes_with_lists: true,\n    }\n  }\n}\n\npub fn optimize<'arena>(\n  arena: &'arena Arena<Node<'arena>>,\n  dom: &'arena Node<'arena>,\n  options: OptimizeOptions,\n) {\n  let should_optimize_svg = options.minify_svg.has_any_jobs();\n\n  dom.walk(&mut |node| match &node.data {\n    NodeData::Element { name, .. } => {\n      // https://html.spec.whatwg.org/#elements-3\n      match name.expanded() {\n        expanded_name!(html \"a\") => {\n          trim(node, expanded_name!(\"\", \"href\"), &options);\n          space_separated(node, expanded_name!(\"\", \"ping\"), &options);\n          unordered_space_separated_set(node, expanded_name!(\"\", \"rel\"), &options);\n          enumerated(node, expanded_name!(\"\", \"target\"), \"_self\", &options);\n        }\n        expanded_name!(html \"area\") => {\n          trim(node, expanded_name!(\"\", \"href\"), &options);\n          space_separated(node, expanded_name!(\"\", \"ping\"), &options);\n          unordered_space_separated_set(node, expanded_name!(\"\", \"rel\"), &options);\n          enumerated(node, expanded_name!(\"\", \"shape\"), \"rect\", &options);\n          enumerated(node, expanded_name!(\"\", \"target\"), \"_self\", &options);\n        }\n        expanded_name!(html \"audio\") => {\n          trim(node, expanded_name!(\"\", \"src\"), &options);\n          case_insensitive(node, expanded_name!(\"\", \"preload\"), &options);\n          case_insensitive(node, expanded_name!(\"\", \"crossorigin\"), &options);\n          boolean(node, expanded_name!(\"\", \"autoplay\"), &options);\n          boolean(node, expanded_name!(\"\", \"loop\"), &options);\n          boolean(node, expanded_name!(\"\", \"muted\"), &options);\n          boolean(node, expanded_name!(\"\", \"controls\"), &options);\n        }\n        expanded_name!(html \"base\") => {\n          trim(node, expanded_name!(\"\", \"href\"), &options);\n          enumerated(node, expanded_name!(\"\", \"target\"), \"_self\", &options);\n        }\n        expanded_name!(html \"blockquote\") => {\n          trim(node, expanded_name!(\"\", \"cite\"), &options);\n        }\n        expanded_name!(html \"button\") => {\n          trim(node, expanded_name!(\"\", \"formaction\"), &options);\n          enumerated(\n            node,\n            expanded_name!(\"\", \"formenctype\"),\n            \"application/x-www-form-urlencoded\",\n            &options,\n          );\n          enumerated(node, expanded_name!(\"\", \"formmethod\"), \"get\", &options);\n          // enumerated(node, expanded_name!(\"\", \"popovertargetaction\"), \"toggle\", &options);\n          enumerated(node, expanded_name!(\"\", \"type\"), \"submit\", &options);\n          boolean(node, expanded_name!(\"\", \"disabled\"), &options);\n          boolean(node, expanded_name!(\"\", \"formnovalidate\"), &options);\n        }\n        expanded_name!(html \"canvas\") => {\n          trim_with_default(node, expanded_name!(\"\", \"height\"), \"150\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"width\"), \"300\", &options);\n        }\n        expanded_name!(html \"col\") => {\n          trim_with_default(node, expanded_name!(\"\", \"span\"), \"1\", &options);\n        }\n        expanded_name!(html \"colgroup\") => {\n          trim_with_default(node, expanded_name!(\"\", \"span\"), \"1\", &options);\n        }\n        expanded_name!(html \"del\") => {\n          trim(node, expanded_name!(\"\", \"cite\"), &options);\n        }\n        expanded_name!(html \"details\") => {\n          boolean(node, expanded_name!(\"\", \"open\"), &options);\n        }\n        expanded_name!(html \"dialog\") => {\n          boolean(node, expanded_name!(\"\", \"open\"), &options);\n        }\n        expanded_name!(html \"embed\") => {\n          trim(node, expanded_name!(\"\", \"src\"), &options);\n          trim(node, expanded_name!(\"\", \"height\"), &options);\n          trim(node, expanded_name!(\"\", \"width\"), &options);\n        }\n        expanded_name!(html \"fieldset\") => {\n          boolean(node, expanded_name!(\"\", \"disabled\"), &options);\n        }\n        expanded_name!(html \"form\") => {\n          case_insensitive(node, expanded_name!(\"\", \"accept-charset\"), &options);\n          trim(node, expanded_name!(\"\", \"action\"), &options);\n          enumerated(node, expanded_name!(\"\", \"autocomplete\"), \"on\", &options);\n          enumerated(\n            node,\n            expanded_name!(\"\", \"enctype\"),\n            \"application/x-www-form-urlencoded\",\n            &options,\n          );\n          enumerated(node, expanded_name!(\"\", \"method\"), \"get\", &options);\n          unordered_space_separated_set(node, expanded_name!(\"\", \"rel\"), &options);\n          enumerated(node, expanded_name!(\"\", \"target\"), \"_self\", &options);\n          boolean(node, expanded_name!(\"\", \"novalidate\"), &options);\n        }\n        expanded_name!(html \"head\") => {\n          remove_whitespace(node, &options);\n        }\n        expanded_name!(html \"html\") => {\n          remove_whitespace(node, &options);\n        }\n        expanded_name!(html \"iframe\") => {\n          trim(node, expanded_name!(\"\", \"src\"), &options);\n          unordered_space_separated_set(node, expanded_name!(\"\", \"sandbox\"), &options);\n          enumerated(node, expanded_name!(\"\", \"referrerpolicy\"), \"\", &options);\n          enumerated(node, expanded_name!(\"\", \"loading\"), \"eager\", &options);\n          trim(node, expanded_name!(\"\", \"height\"), &options);\n          trim(node, expanded_name!(\"\", \"width\"), &options);\n          boolean(node, expanded_name!(\"\", \"allowfullscreen\"), &options);\n        }\n        expanded_name!(html \"img\") => {\n          trim(node, expanded_name!(\"\", \"src\"), &options);\n          comma_separated(node, expanded_name!(\"\", \"srcset\"), &options);\n          comma_separated(node, expanded_name!(\"\", \"sizes\"), &options);\n          enumerated(node, expanded_name!(\"\", \"referrerpolicy\"), \"\", &options);\n          enumerated(node, expanded_name!(\"\", \"decoding\"), \"auto\", &options);\n          enumerated(node, expanded_name!(\"\", \"loading\"), \"eager\", &options);\n          enumerated(node, expanded_name!(\"\", \"fetchpriority\"), \"auto\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"height\"), \"150\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"width\"), \"300\", &options);\n          case_insensitive(node, expanded_name!(\"\", \"crossorigin\"), &options);\n          boolean(node, expanded_name!(\"\", \"ismap\"), &options);\n        }\n        expanded_name!(html \"input\") => {\n          comma_separated(node, expanded_name!(\"\", \"accept\"), &options);\n          ordered_space_separated_set(node, expanded_name!(\"\", \"autocomplete\"), &options);\n          // enumerated(node, expanded_name!(\"\", \"colorspace\"), \"limited-srgb\", &options);\n          trim(node, expanded_name!(\"\", \"formaction\"), &options);\n          // boolean(node, expanded_name!(\"\", \"alpha\"), &options);\n          enumerated(\n            node,\n            expanded_name!(\"\", \"formenctype\"),\n            \"application/x-www-form-urlencoded\",\n            &options,\n          );\n          enumerated(node, expanded_name!(\"\", \"formmethod\"), \"get\", &options);\n          trim(node, expanded_name!(\"\", \"src\"), &options);\n          enumerated(node, expanded_name!(\"\", \"type\"), \"text\", &options);\n          trim(node, expanded_name!(\"\", \"height\"), &options);\n          trim(node, expanded_name!(\"\", \"width\"), &options);\n          trim(node, expanded_name!(\"\", \"minlength\"), &options);\n          trim_with_default(node, expanded_name!(\"\", \"size\"), \"20\", &options);\n          case_insensitive(node, expanded_name!(\"\", \"inputmode\"), &options);\n          boolean(node, expanded_name!(\"\", \"checked\"), &options);\n          boolean(node, expanded_name!(\"\", \"disabled\"), &options);\n          boolean(node, expanded_name!(\"\", \"formnovalidate\"), &options);\n          boolean(node, expanded_name!(\"\", \"multiple\"), &options);\n          boolean(node, expanded_name!(\"\", \"readonly\"), &options);\n          boolean(node, expanded_name!(\"\", \"required\"), &options);\n        }\n        expanded_name!(html \"ins\") => {\n          trim(node, expanded_name!(\"\", \"cite\"), &options);\n        }\n        expanded_name!(html \"link\") => {\n          trim(node, expanded_name!(\"\", \"href\"), &options);\n          unordered_space_separated_set(node, expanded_name!(\"\", \"rel\"), &options);\n          enumerated(node, expanded_name!(\"\", \"referrerpolicy\"), \"\", &options);\n          // unordered_space_separated_set(node, expanded_name!(\"\", \"blocking\"), &options);\n          enumerated(node, expanded_name!(\"\", \"fetchpriority\"), \"auto\", &options);\n          unordered_space_separated_set(node, expanded_name!(\"\", \"sizes\"), &options);\n          comma_separated(node, expanded_name!(\"\", \"media\"), &options);\n          case_insensitive(node, expanded_name!(\"\", \"crossorigin\"), &options);\n          boolean(node, expanded_name!(\"\", \"disabled\"), &options);\n          if let Some(rel) = node.get_attribute(expanded_name!(\"\", \"rel\")) {\n            if rel.as_ref() == \"stylesheet\" {\n              trim_with_default(node, expanded_name!(\"\", \"type\"), \"text/css\", &options);\n              trim_with_default(node, expanded_name!(\"\", \"media\"), \"all\", &options);\n            }\n          }\n        }\n        expanded_name!(html \"meta\") => {\n          if let NodeData::Element { attrs, .. } = &node.data {\n            if attrs.borrow().is_empty() {\n              node.detach();\n            }\n          }\n        }\n        expanded_name!(html \"meter\") => {\n          trim(node, expanded_name!(\"\", \"high\"), &options);\n          trim(node, expanded_name!(\"\", \"low\"), &options);\n          trim_with_default(node, expanded_name!(\"\", \"min\"), \"0\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"max\"), \"1\", &options);\n          trim(node, expanded_name!(\"\", \"optimum\"), &options);\n        }\n        expanded_name!(html \"object\") => {\n          trim(node, expanded_name!(\"\", \"data\"), &options);\n          trim(node, expanded_name!(\"\", \"height\"), &options);\n          trim(node, expanded_name!(\"\", \"width\"), &options);\n        }\n        expanded_name!(html \"ol\") => {\n          trim_with_default(node, expanded_name!(\"\", \"start\"), \"1\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"type\"), \"1\", &options);\n          boolean(node, expanded_name!(\"\", \"reversed\"), &options);\n        }\n        expanded_name!(html \"optgroup\") => {\n          boolean(node, expanded_name!(\"\", \"disabled\"), &options);\n        }\n        expanded_name!(html \"option\") => {\n          boolean(node, expanded_name!(\"\", \"disabled\"), &options);\n          boolean(node, expanded_name!(\"\", \"selected\"), &options);\n        }\n        expanded_name!(html \"output\") => {\n          unordered_space_separated_set(node, expanded_name!(\"\", \"for\"), &options);\n        }\n        expanded_name!(html \"progress\") => {\n          trim_with_default(node, expanded_name!(\"\", \"max\"), \"1\", &options);\n        }\n        expanded_name!(html \"q\") => {\n          trim(node, expanded_name!(\"\", \"cite\"), &options);\n        }\n        expanded_name!(html \"script\") => {\n          trim(node, expanded_name!(\"\", \"src\"), &options);\n          if let Some(ty) = node.get_attribute(expanded_name!(\"\", \"type\")) {\n            // https://mimesniff.spec.whatwg.org/#javascript-mime-type\n            if (ty.is_empty() && options.remove_empty_attributes)\n              || ((ty.eq_ignore_ascii_case(\"application/ecmascript\")\n                || ty.eq_ignore_ascii_case(\"application/javascript\")\n                || ty.eq_ignore_ascii_case(\"application/x-ecmascript\")\n                || ty.eq_ignore_ascii_case(\"application/x-javascript\")\n                || ty.eq_ignore_ascii_case(\"text/ecmascript\")\n                || ty.eq_ignore_ascii_case(\"text/javascript\")\n                || ty.eq_ignore_ascii_case(\"text/javascript1.0\")\n                || ty.eq_ignore_ascii_case(\"text/javascript1.1\")\n                || ty.eq_ignore_ascii_case(\"text/javascript1.2\")\n                || ty.eq_ignore_ascii_case(\"text/javascript1.3\")\n                || ty.eq_ignore_ascii_case(\"text/javascript1.4\")\n                || ty.eq_ignore_ascii_case(\"text/javascript1.5\")\n                || ty.eq_ignore_ascii_case(\"text/jscript\")\n                || ty.eq_ignore_ascii_case(\"text/livescript\")\n                || ty.eq_ignore_ascii_case(\"text/x-ecmascript\")\n                || ty.eq_ignore_ascii_case(\"text/x-javascript\"))\n                && options.remove_redundant_attributes)\n            {\n              node.remove_attribute(expanded_name!(\"\", \"type\"));\n            } else if options.minify_json\n              && (ty.ends_with(\"/json\") || ty.ends_with(\"+json\"))\n              && node.get_attribute(expanded_name!(\"\", \"src\")).is_none()\n              && node\n                .get_attribute(expanded_name!(\"\", \"integrity\"))\n                .is_none()\n            {\n              let content: Result<serde_json::Value, _> =\n                serde_json::from_str(&node.text_content());\n              if let Ok(content) = content {\n                if let Ok(json) = serde_json::to_string(&content) {\n                  node.set_text_content(arena, json.into());\n                }\n              }\n            }\n          }\n          enumerated(node, expanded_name!(\"\", \"referrerpolicy\"), \"\", &options);\n          // unordered_space_separated_set(node, expanded_name!(\"\", \"blocking\"), &options);\n          enumerated(node, expanded_name!(\"\", \"fetchpriority\"), \"auto\", &options);\n          enumerated(node, expanded_name!(\"\", \"charset\"), \"utf-8\", &options);\n          case_insensitive(node, expanded_name!(\"\", \"crossorigin\"), &options);\n          boolean(node, expanded_name!(\"\", \"async\"), &options);\n          boolean(node, expanded_name!(\"\", \"defer\"), &options);\n          boolean(node, expanded_name!(\"\", \"nomodule\"), &options);\n        }\n        expanded_name!(html \"select\") => {\n          trim(node, expanded_name!(\"\", \"size\"), &options);\n          boolean(node, expanded_name!(\"\", \"disabled\"), &options);\n          boolean(node, expanded_name!(\"\", \"multiple\"), &options);\n          boolean(node, expanded_name!(\"\", \"required\"), &options);\n        }\n        expanded_name!(html \"source\") => {\n          trim(node, expanded_name!(\"\", \"src\"), &options);\n          comma_separated(node, expanded_name!(\"\", \"srcset\"), &options);\n          comma_separated(node, expanded_name!(\"\", \"sizes\"), &options);\n          trim(node, expanded_name!(\"\", \"height\"), &options);\n          trim(node, expanded_name!(\"\", \"width\"), &options);\n          comma_separated(node, expanded_name!(\"\", \"media\"), &options);\n        }\n        expanded_name!(html \"style\") => {\n          comma_separated(node, expanded_name!(\"\", \"media\"), &options);\n          trim_with_default(node, expanded_name!(\"\", \"type\"), \"text/css\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"media\"), \"all\", &options);\n        }\n        expanded_name!(html \"td\") => {\n          trim_with_default(node, expanded_name!(\"\", \"colspan\"), \"1\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"rowspan\"), \"1\", &options);\n          unordered_space_separated_set(node, expanded_name!(\"\", \"headers\"), &options);\n          case_insensitive(node, expanded_name!(\"\", \"scope\"), &options);\n        }\n        expanded_name!(html \"textarea\") => {\n          ordered_space_separated_set(node, expanded_name!(\"\", \"autocomplete\"), &options);\n          enumerated(node, expanded_name!(\"\", \"wrap\"), \"soft\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"cols\"), \"20\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"rows\"), \"2\", &options);\n          trim(node, expanded_name!(\"\", \"minlength\"), &options);\n          case_insensitive(node, expanded_name!(\"\", \"inputmode\"), &options);\n          boolean(node, expanded_name!(\"\", \"disabled\"), &options);\n          boolean(node, expanded_name!(\"\", \"readonly\"), &options);\n          boolean(node, expanded_name!(\"\", \"required\"), &options);\n        }\n        expanded_name!(html \"th\") => {\n          trim_with_default(node, expanded_name!(\"\", \"colspan\"), \"1\", &options);\n          trim_with_default(node, expanded_name!(\"\", \"rowspan\"), \"1\", &options);\n          unordered_space_separated_set(node, expanded_name!(\"\", \"headers\"), &options);\n          case_insensitive(node, expanded_name!(\"\", \"scope\"), &options);\n        }\n        expanded_name!(html \"track\") => {\n          enumerated(node, expanded_name!(\"\", \"kind\"), \"metadata\", &options);\n          trim(node, expanded_name!(\"\", \"src\"), &options);\n          boolean(node, expanded_name!(\"\", \"default\"), &options);\n        }\n        expanded_name!(html \"video\") => {\n          trim(node, expanded_name!(\"\", \"src\"), &options);\n          trim(node, expanded_name!(\"\", \"poster\"), &options);\n          trim(node, expanded_name!(\"\", \"height\"), &options);\n          trim(node, expanded_name!(\"\", \"width\"), &options);\n          case_insensitive(node, expanded_name!(\"\", \"crossorigin\"), &options);\n          case_insensitive(node, expanded_name!(\"\", \"preload\"), &options);\n          boolean(node, expanded_name!(\"\", \"autoplay\"), &options);\n          boolean(node, expanded_name!(\"\", \"controls\"), &options);\n          boolean(node, expanded_name!(\"\", \"loop\"), &options);\n          boolean(node, expanded_name!(\"\", \"muted\"), &options);\n          // boolean(node, expanded_name!(\"\", \"playsinline\"), &options);\n        }\n        expanded_name!(svg \"svg\") => {\n          remove_whitespace(node, &options);\n\n          if should_optimize_svg {\n            // Detach the node to prevent Oxvg from altering following siblings.\n            let parent = node.parent.take();\n            let previous_sibling = node.previous_sibling.take();\n            let next_sibling = node.next_sibling.take();\n\n            // Synthesize a fake document node to act as the root of the SVG.\n            let document = arena.alloc(Node::new(NodeData::Document, 0));\n            document.append(node);\n\n            let jobs = options.minify_svg.into_jobs(OxvgKind::Html);\n            match jobs.run(\n              &&*document,\n              &oxvg_ast::visitor::Info::<crate::oxvg::Element>::new(arena),\n            ) {\n              Err(_err) => {}\n              Ok(()) => {}\n            }\n\n            // Reattach in original position.\n            node.parent.set(parent);\n            node.previous_sibling.set(previous_sibling);\n            node.next_sibling.set(next_sibling);\n          }\n        }\n        _ => {\n          if name.ns == ns!(svg)\n            && !matches!(\n              name.local,\n              local_name!(\"text\")\n                | local_name!(\"textPath\")\n                | local_name!(\"tspan\")\n                | local_name!(\"script\")\n                | local_name!(\"style\")\n            )\n          {\n            remove_whitespace(node, &options);\n          }\n        }\n      }\n\n      // https://html.spec.whatwg.org/#global-attributes\n      ordered_space_separated_set(node, expanded_name!(\"\", \"accesskey\"), &options);\n      boolean(node, expanded_name!(\"\", \"autofocus\"), &options);\n      unordered_space_separated_set(node, expanded_name!(\"\", \"class\"), &options);\n      trim(node, expanded_name!(\"\", \"style\"), &options);\n      // enumerated(node, expanded_name!(\"\", \"autocorrect\"), \"on\", &options);\n      // boolean(node, expanded_name!(\"\", \"inert\"), &options);\n      trim(node, expanded_name!(\"\", \"itemid\"), &options);\n      unordered_space_separated_set(node, expanded_name!(\"\", \"itemprop\"), &options);\n      unordered_space_separated_set(node, expanded_name!(\"\", \"itemref\"), &options);\n      boolean(node, expanded_name!(\"\", \"itemscope\"), &options);\n      unordered_space_separated_set(node, expanded_name!(\"\", \"itemtype\"), &options);\n\n      if let Some(value) = node.get_attribute(expanded_name!(\"\", \"contenteditable\")) {\n        if value.as_ref() == \"true\" && options.normalize_attribute_values {\n          node.set_attribute(expanded_name!(\"\", \"contenteditable\"), \"\");\n        }\n      }\n    }\n    NodeData::Comment { contents } => {\n      if options.remove_comments {\n        let is_conditional_comment = (contents.starts_with(\"[if \") && contents.ends_with(\"]\"))\n          || contents.as_ref() == \"[endif]\";\n        if !is_conditional_comment {\n          node.detach();\n        }\n      }\n    }\n    _ => {}\n  });\n}\n\npub fn optimize_svg<'arena>(\n  arena: &'arena Arena<Node<'arena>>,\n  dom: &'arena Node<'arena>,\n  options: &OxvgConfig,\n) {\n  if options.has_any_jobs() {\n    let jobs = options.into_jobs(OxvgKind::Svg);\n    match jobs.run(\n      &dom,\n      &oxvg_ast::visitor::Info::<crate::oxvg::Element>::new(arena),\n    ) {\n      Err(_err) => {}\n      Ok(()) => {}\n    }\n  }\n\n  dom.walk(&mut |node| match &node.data {\n    NodeData::Element { name, .. } => {\n      if !matches!(\n        name.local,\n        local_name!(\"text\")\n          | local_name!(\"textPath\")\n          | local_name!(\"tspan\")\n          | local_name!(\"script\")\n          | local_name!(\"style\")\n      ) {\n        remove_whitespace(node, &Default::default());\n      }\n    }\n    _ => {}\n  });\n}\n\nfn trim<'arena>(node: Ref<'arena>, attr: ExpandedName, options: &OptimizeOptions) {\n  if !options.collapse_attribute_whitespace {\n    return;\n  }\n\n  if let Some(value) = node.get_attribute(attr.clone()) {\n    let trimmed = value.trim();\n    if trimmed.is_empty() && options.remove_empty_attributes {\n      node.remove_attribute(attr);\n    } else if trimmed.len() != value.len() {\n      node.set_attribute(attr, trimmed);\n    }\n  }\n}\n\nfn trim_with_default<'arena>(\n  node: Ref<'arena>,\n  attr: ExpandedName,\n  default: &str,\n  options: &OptimizeOptions,\n) {\n  if !options.collapse_attribute_whitespace {\n    return;\n  }\n\n  if let Some(value) = node.get_attribute(attr.clone()) {\n    let trimmed = value.trim();\n    if (trimmed.is_empty() && options.remove_empty_attributes)\n      || (trimmed == default && options.remove_redundant_attributes)\n    {\n      node.remove_attribute(attr);\n    } else if trimmed.len() != value.len() {\n      node.set_attribute(attr, trimmed);\n    }\n  }\n}\n\n// https://html.spec.whatwg.org/#space-separated-tokens\nfn space_separated<'arena>(node: Ref<'arena>, attr: ExpandedName, options: &OptimizeOptions) {\n  if !options.collapse_attribute_whitespace {\n    return;\n  }\n\n  if let Some(value) = node.get_attribute(attr.clone()) {\n    let result = serialize_space_separated(value.split_whitespace(), value.len());\n    if result.is_empty() && options.remove_empty_attributes {\n      node.remove_attribute(attr);\n    } else {\n      node.set_attribute(attr, &result);\n    }\n  }\n}\n\nfn serialize_space_separated<'a>(\n  items: impl Iterator<Item = &'a str> + 'a,\n  capacity: usize,\n) -> StrTendril {\n  let mut result = StrTendril::with_capacity(capacity as u32);\n  for item in items {\n    if !result.is_empty() {\n      result.push_char(' ');\n    }\n    result.push_slice(item);\n  }\n  result\n}\n\nfn unordered_space_separated_set<'arena>(\n  node: Ref<'arena>,\n  attr: ExpandedName,\n  options: &OptimizeOptions,\n) {\n  if !options.collapse_attribute_whitespace {\n    return;\n  }\n\n  if let Some(value) = node.get_attribute(attr.clone()) {\n    let mut items = value.split_whitespace().collect::<Vec<_>>();\n    if options.sort_attributes_with_lists {\n      items.sort();\n      if options.deduplicate_attribute_values {\n        items.dedup();\n      }\n    }\n    if items.is_empty() && options.remove_empty_attributes {\n      node.remove_attribute(attr);\n      return;\n    }\n\n    let result = serialize_space_separated(items.into_iter(), value.len());\n    node.set_attribute(attr, &result);\n  }\n}\n\nfn ordered_space_separated_set<'arena>(\n  node: Ref<'arena>,\n  attr: ExpandedName,\n  options: &OptimizeOptions,\n) {\n  if !options.collapse_attribute_whitespace {\n    return;\n  }\n\n  if let Some(value) = node.get_attribute(attr.clone()) {\n    let mut items = value.split_whitespace().collect::<Vec<_>>();\n    if options.deduplicate_attribute_values {\n      let mut seen = HashSet::new();\n      items.retain(|item| seen.insert(*item));\n    }\n\n    if items.is_empty() && options.remove_empty_attributes {\n      node.remove_attribute(attr);\n      return;\n    }\n\n    let result = serialize_space_separated(items.into_iter(), value.len());\n    node.set_attribute(attr, &result);\n  }\n}\n\nfn comma_separated<'arena>(node: Ref<'arena>, attr: ExpandedName, options: &OptimizeOptions) {\n  if !options.collapse_attribute_whitespace {\n    return;\n  }\n\n  if let Some(value) = node.get_attribute(attr.clone()) {\n    let mut result = StrTendril::with_capacity(value.len() as u32);\n    for item in value.split(',') {\n      if !result.is_empty() {\n        result.push_char(',');\n      }\n      let item = item.trim();\n      if item.is_empty() {\n        continue;\n      }\n      result.push_slice(item);\n    }\n    if result.is_empty() && options.remove_empty_attributes {\n      node.remove_attribute(attr);\n    } else {\n      node.set_attribute(attr, &result);\n    }\n  }\n}\n\nfn case_insensitive<'arena>(node: Ref<'arena>, attr: ExpandedName, options: &OptimizeOptions) {\n  if !options.normalize_attribute_values {\n    return;\n  }\n\n  if let Some(value) = node.get_attribute(attr.clone()) {\n    let lower = value.to_lowercase();\n    if value.as_ref() != lower {\n      node.set_attribute(attr, &lower);\n    }\n  }\n}\n\nfn enumerated<'arena>(\n  node: Ref<'arena>,\n  attr: ExpandedName,\n  default: &str,\n  options: &OptimizeOptions,\n) {\n  if let Some(value) = node.get_attribute(attr.clone()) {\n    if value.eq_ignore_ascii_case(default) && options.remove_redundant_attributes {\n      node.remove_attribute(attr);\n      return;\n    }\n\n    if options.normalize_attribute_values {\n      let lower = value.to_lowercase();\n      if value.as_ref() != lower {\n        node.set_attribute(attr, &lower);\n      }\n    }\n  }\n}\n\nfn boolean<'arena>(node: Ref<'arena>, attr: ExpandedName, options: &OptimizeOptions) {\n  if !options.collapse_boolean_attributes {\n    return;\n  }\n\n  if let Some(value) = node.get_attribute(attr.clone()) {\n    if value.eq_ignore_ascii_case(&attr.local) {\n      node.set_attribute(attr, \"\");\n    }\n  }\n}\n\nfn remove_whitespace<'arena>(node: Ref<'arena>, options: &OptimizeOptions) {\n  if !options.collapse_whitespace {\n    return;\n  }\n\n  let mut child = node.first_child.get();\n  while let Some(c) = child {\n    child = c.next_sibling.get();\n    if let NodeData::Text { contents } = &c.data {\n      let text = contents.borrow();\n      let trimmed = text.trim();\n      if trimmed.is_empty() {\n        c.detach();\n      } else {\n        let mut result = StrTendril::with_capacity(trimmed.len() as u32);\n        for word in trimmed.split_whitespace() {\n          if !result.is_empty() {\n            result.push_char(' ');\n          }\n          result.push_slice(word);\n        }\n        drop(text);\n        *contents.borrow_mut() = result;\n      }\n    }\n  }\n}\n\n#[cfg(test)]\nmod tests {\n  use super::*;\n  use crate::arena::Sink;\n  use html5ever::tendril::TendrilSink;\n  use html5ever::{ParseOpts, parse_document};\n  use typed_arena::Arena;\n\n  fn test(input: &str, expected: &str) {\n    let arena = Arena::new();\n    let dom = parse_document(Sink::new(&arena), ParseOpts::default())\n      .from_utf8()\n      .one(input.as_bytes());\n\n    optimize(&arena, dom, Default::default());\n\n    let arena = Arena::new();\n    let expected = parse_document(Sink::new(&arena), ParseOpts::default())\n      .from_utf8()\n      .one(expected.as_bytes());\n\n    assert_eq!(dom, expected);\n  }\n\n  #[test]\n  fn test_optimize() {\n    test(\n      \"<a href=' http://google.com ' ping = '  a   b c' rel='  b  a  c ' target='_self'>Test</a>\",\n      \"<a href='http://google.com' ping='a b c' rel='a b c'>Test</a>\",\n    );\n    test(\n      \"<a class=' foo  bar baz '>click</a>\",\n      \"<a class='bar baz foo'>click</a>\",\n    );\n    test(\n      \"<a class='foo bar foo'>click</a>\",\n      \"<a class='bar foo'>click</a>\",\n    );\n    test(\n      \"<area href=' http://google.com ' ping = '  a   b c' rel='  b  a  c ' target='_self' shape='rect'>Test</area>\",\n      \"<area href='http://google.com' ping='a b c' rel='a b c'>Test</area>\",\n    );\n    test(\n      \"<audio loop='' autoplay='autoplay' muted>\",\n      \"<audio loop autoplay muted>\",\n    );\n    test(\n      \"<base href='  foo.html ' target='_blank'>\",\n      \"<base href='foo.html' target=_blank>\",\n    );\n    test(\n      \"<blockquote cite=' foo.html  '>Test</blockquote>\",\n      \"<blockquote cite='foo.html'>Test</blockquote>\",\n    );\n    test(\n      \"<button formaction=' yoo.cgi ' formenctype='application/x-www-form-urlencoded' formmethod='GET' type='submit' disabled='disabled'>Test</button>\",\n      \"<button formaction='yoo.cgi' disabled>Test</button>\",\n    );\n    test(\n      \"<canvas width=300 height=150></canvas>\",\n      \"<canvas></canvas>\",\n    );\n    test(\n      \"<form method=GET target=_self novalidate='novalidate'></form>\",\n      \"<form novalidate></form>\",\n    );\n    test(\"<input type=text>\", \"<input>\");\n    test(\n      \"<script type='application/javascript'></script>\",\n      \"<script></script>\",\n    );\n    test(\"<style type='text/css'></style>\", \"<style></style>\");\n    test(\"<style media=all></style>\", \"<style></style>\");\n    test(\n      \"<link rel=stylesheet media=all href=foo.css>\",\n      \"<link rel=stylesheet href=foo.css>\",\n    );\n    test(\"<div><!-- foo -->Test</div>\", \"<div>Test</div>\");\n    test(\n      \"<!--[if IE 8]><link href='ie8only.css' rel='stylesheet'><![endif]-->\",\n      \"<!--[if IE 8]><link href='ie8only.css' rel='stylesheet'><![endif]-->\",\n    );\n    test(\"<div class='' style=''>Test</div>\", \"<div>Test</div>\");\n  }\n\n  #[test]\n  fn test_whitespace() {\n    // Remove whitespace in the html and head elements.\n    // Extra lines at the end are due to the parser adding whitespace outside the body/html to the body.\n    test(\n      r#\"<!doctype html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <title>Test</title>\n  </head>\n  <body>\n    <p>Test</p>\n    <p>Foo</p>\n  </body>\n</html>\n\"#,\n      r#\"<!doctype html><html><head><meta charset=\"utf-8\"><title>Test</title></head><body>\n    <p>Test</p>\n    <p>Foo</p>\n  \n\n</body></html>\"#,\n    );\n  }\n\n  #[test]\n  fn test_svg() {\n    test(\n      \"<svg><style>.foo{fill:red}</style><rect width=100 height=100 class=foo /></svg>\",\n      \"<svg><rect width=100 height=100 style=fill:red /></svg>\",\n    );\n    test(\n      \"<p>a</p><svg></svg><p>b</p><p>c</p>\",\n      \"<p>a</p><svg></svg><p>b</p><p>c</p>\",\n    );\n    test(\n      \"<main><svg><style>.foo{fill:red}</style><rect width=100 height=100 class=foo /></svg><span>after</span></main>\",\n      \"<main><svg><rect width=100 height=100 style=fill:red /></svg><span>after</span></main>\",\n    );\n    test(\n      r#\"<svg xmlns:editor2=\"link2\" fill=\"\" b=\"\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" class=\"foo\" xmlns:editor1=\"link1\" xmlns=\"\" d=\"\">\n        <rect editor2:b=\"\" editor1:b=\"\" editor2:a=\"\" editor1:a=\"\" />\n      </svg>\n      <div>\n        <svg fill=\"\" id=\"a\"></svg>\n      </div>\"#,\n      \"<svg class=foo><rect></rect></svg>\\n      <div>\\n        <svg id=a></svg>\\n      </div>\",\n    );\n  }\n}\n"
  },
  {
    "path": "crates/html/src/oxvg.rs",
    "content": "use std::{\n  borrow::Cow,\n  cell::{Cell, RefCell, RefMut},\n  collections::VecDeque,\n  fmt::Debug,\n  hash::Hash,\n};\n\nuse crate::arena::{Arena, Node, NodeData, Ref, SelectorFlags};\nuse ref_cast::RefCast;\nuse serde::Deserialize;\nuse xml5ever::{Attribute, QualName, local_name, tendril::StrTendril};\n\nuse oxvg_ast::{attribute::Attr as _, element::Element as _, name::Name, node::Node as _};\n\nimpl<'arena> oxvg_ast::node::Node<'arena> for Ref<'arena> {\n  type Arena = Arena<'arena>;\n  type Name = QName;\n  type Atom = StrTendril;\n  type Child = Ref<'arena>;\n  type ParentChild = Ref<'arena>;\n  type Parent = Element<'arena>;\n\n  fn id(&self) -> usize {\n    *self as *const _ as usize\n  }\n\n  fn child_nodes_iter(&self) -> impl DoubleEndedIterator<Item = Self::Child> {\n    ChildNodes {\n      front: self.first_child(),\n      end: self.last_child(),\n    }\n  }\n\n  #[allow(refining_impl_trait)]\n  fn element(&self) -> Option<Element<'arena>> {\n    match self.node_type() {\n      oxvg_ast::node::Type::Element | oxvg_ast::node::Type::Document => Element::new(*self),\n      _ => None,\n    }\n  }\n\n  fn empty(&self) {\n    self.first_child.set(None);\n    self.last_child.set(None);\n  }\n\n  #[allow(refining_impl_trait)]\n  fn find_element(&self) -> Option<Element<'arena>> {\n    <Element as oxvg_ast::element::Element<'arena>>::find_element(*self)\n  }\n\n  fn first_child(&self) -> Option<Self::Child> {\n    self.first_child.get()\n  }\n\n  fn insert_before(&mut self, new_node: Self::Child, reference_node: &Self::Child) {\n    new_node.remove();\n    new_node.parent.set(Some(self));\n    let Some(prev_child) = reference_node.previous_sibling.replace(Some(new_node)) else {\n      self.first_child.set(Some(new_node));\n      new_node.next_sibling.set(Some(reference_node));\n      return;\n    };\n    prev_child.next_sibling.set(Some(new_node));\n    new_node.previous_sibling.set(Some(prev_child));\n    new_node.next_sibling.set(Some(reference_node));\n    debug_assert!(new_node.parent.get() == Some(*self));\n    debug_assert!(new_node.next_sibling.get() == Some(*reference_node));\n    debug_assert!(reference_node.previous_sibling.get() == Some(new_node));\n  }\n\n  fn insert_after(&mut self, new_node: Self::Child, reference_node: &Self::Child) {\n    new_node.remove();\n    new_node.parent.set(Some(self));\n    let Some(next_child) = reference_node.next_sibling.replace(Some(new_node)) else {\n      self.last_child.set(Some(new_node));\n      new_node.previous_sibling.set(Some(reference_node));\n      return;\n    };\n    next_child.previous_sibling.set(Some(new_node));\n    new_node.next_sibling.set(Some(next_child));\n    new_node.previous_sibling.set(Some(reference_node));\n    debug_assert!(new_node.parent.get() == Some(*self));\n    debug_assert!(new_node.previous_sibling.get() == Some(*reference_node));\n    debug_assert!(reference_node.next_sibling.get() == Some(new_node));\n  }\n\n  fn retain_children<F>(&self, mut f: F)\n  where\n    F: FnMut(Self::Child) -> bool,\n  {\n    self.last_child.set(None);\n    let mut current = self.first_child.take();\n    let mut previously_retained = None;\n    while let Some(child) = current {\n      current = child.next_sibling.get();\n      let retain = f(child);\n      if retain {\n        child.previous_sibling.set(previously_retained);\n        if previously_retained.is_none() {\n          self.first_child.set(Some(child));\n        }\n        previously_retained = Some(child);\n        self.last_child.set(Some(child));\n      } else {\n        child.parent.set(None);\n        child.previous_sibling.set(None);\n        child.next_sibling.set(None);\n      }\n    }\n  }\n\n  fn last_child(&self) -> Option<Self::Child> {\n    self.last_child.get()\n  }\n\n  fn next_sibling(&self) -> Option<Self::ParentChild> {\n    self.next_sibling.get()\n  }\n\n  fn node_type(&self) -> oxvg_ast::node::Type {\n    match &self.data {\n      NodeData::Document => oxvg_ast::node::Type::Document,\n      NodeData::Element { .. } => oxvg_ast::node::Type::Element,\n      NodeData::ProcessingInstruction { .. } => oxvg_ast::node::Type::ProcessingInstruction,\n      NodeData::Text { .. } => oxvg_ast::node::Type::Text,\n      NodeData::Comment { .. } => oxvg_ast::node::Type::Comment,\n      NodeData::Doctype { .. } => oxvg_ast::node::Type::DocumentType,\n    }\n  }\n\n  fn previous_sibling(&self) -> Option<Self::ParentChild> {\n    self.previous_sibling.get()\n  }\n\n  fn parent_node(&self) -> Option<Self::Parent> {\n    self.parent.get().and_then(Element::new)\n  }\n\n  fn set_parent_node(&self, new_parent: &Self::Parent) -> Option<Self::Parent> {\n    self\n      .parent\n      .replace(Some(new_parent.node))\n      .and_then(Element::new)\n  }\n\n  fn append_child(&self, a_child: Self::Child) {\n    a_child.parent.set(Some(self));\n    if let Some(child) = self.last_child.replace(Some(a_child)) {\n      child.next_sibling.set(Some(a_child));\n      a_child.previous_sibling.set(Some(child));\n    } else {\n      self.first_child.set(Some(a_child));\n    }\n    debug_assert!(a_child.parent.get() == Some(*self));\n    debug_assert!(a_child.next_sibling.get().is_none());\n    debug_assert!(self.last_child.get() == Some(a_child));\n  }\n\n  fn item(&self, index: usize) -> Option<Self::Child> {\n    self.child_nodes_iter().nth(index)\n  }\n\n  fn node_name(&self) -> Self::Atom {\n    match &self.data {\n      NodeData::Comment { .. } => \"#comment\".into(),\n      NodeData::Doctype { name, .. } => name.clone(),\n      NodeData::Document => \"#document\".into(),\n      NodeData::Element { name, .. } => name.local.to_uppercase().into(),\n      NodeData::ProcessingInstruction { target, .. } => target.clone(),\n      NodeData::Text { .. } => \"#text\".into(),\n    }\n  }\n\n  fn node_value(&self) -> Option<Self::Atom> {\n    Some(match &self.data {\n      NodeData::Comment { contents } => contents.clone(),\n      NodeData::ProcessingInstruction { contents, .. } => contents.borrow().clone(),\n      NodeData::Text { contents } => contents.borrow().clone(),\n      _ => return None,\n    })\n  }\n\n  fn processing_instruction(&self) -> Option<(Self::Atom, Self::Atom)> {\n    match &self.data {\n      NodeData::ProcessingInstruction { target, contents } => {\n        Some((target.clone(), contents.borrow().clone()))\n      }\n      _ => None,\n    }\n  }\n\n  fn try_set_node_value(&self, value: Self::Atom) -> Option<()> {\n    match &self.data {\n      NodeData::Text { contents } => {\n        contents.replace(value);\n        Some(())\n      }\n      _ => None,\n    }\n  }\n\n  fn text_content(&self) -> Option<Self::Atom> {\n    match &self.data {\n      NodeData::Text { contents: value }\n      | NodeData::ProcessingInstruction {\n        contents: value, ..\n      } => Some(value.borrow().clone()),\n      NodeData::Comment { contents: value } => Some(value.clone()),\n      NodeData::Document | NodeData::Doctype { .. } => None,\n      NodeData::Element { .. } => Some(\n        self\n          .child_nodes_iter()\n          .filter_map(|el| Self::text_content(&el))\n          .fold(StrTendril::default(), |mut acc, item| {\n            acc.push_tendril(&item);\n            acc\n          }),\n      ),\n    }\n  }\n\n  fn set_text_content(&self, content: Self::Atom, arena: &Self::Arena) {\n    match self.data {\n      NodeData::Text { ref contents } => {\n        contents.replace(content);\n      }\n      NodeData::Element { .. } => {\n        self.empty();\n        self.append_child(self.text(content, arena));\n      }\n      _ => {}\n    }\n  }\n\n  fn text(&self, content: Self::Atom, arena: &Self::Arena) -> Self::Child {\n    arena.alloc(Node::new(\n      NodeData::Text {\n        contents: RefCell::new(content),\n      },\n      0,\n    ))\n  }\n\n  fn remove(&self) {\n    let parent = self.parent.take();\n    let previous_sibling = self.previous_sibling.take();\n    let next_sibling = self.next_sibling.take();\n    if let Some(previous_sibling) = previous_sibling {\n      if let Some(next_sibling) = next_sibling {\n        // prev -> ~self~ -> next\n        next_sibling.previous_sibling.set(Some(previous_sibling));\n      } else if let Some(parent) = parent {\n        // prev -> ~self~ -> None\n        parent.last_child.set(Some(previous_sibling));\n      }\n      previous_sibling.next_sibling.set(next_sibling);\n    } else if let Some(next_sibling) = next_sibling {\n      next_sibling.previous_sibling.set(None);\n      if let Some(parent) = parent {\n        // None -> ~self~ -> next\n        parent.first_child.set(Some(next_sibling));\n      }\n    } else if let Some(parent) = parent {\n      // None -> ~self~ -> None\n      parent.first_child.set(None);\n      parent.last_child.set(None);\n    }\n    debug_assert!(previous_sibling.is_none_or(|n| n.next_sibling.get() == next_sibling));\n    debug_assert!(next_sibling.is_none_or(|n| n.previous_sibling.get() == previous_sibling));\n    debug_assert!(parent.is_none_or(|n| n.first_child.get() != Some(*self)));\n    debug_assert!(parent.is_none_or(|n| n.last_child.get() != Some(*self)));\n  }\n\n  fn remove_child_at(&mut self, index: usize) -> Option<Self::Child> {\n    let child = self.child_nodes_iter().nth(index);\n    child?.remove();\n    child\n  }\n\n  fn clone_node(&self) -> Self {\n    todo!(\"needs arena\")\n  }\n\n  fn replace_child(\n    &mut self,\n    new_child: Self::Child,\n    old_child: &Self::Child,\n  ) -> Option<Self::Child> {\n    debug_assert_eq!(old_child.parent.get(), Some(*self));\n    // debug_assert!(self.child_nodes_iter().contains(old_child));\n\n    let previous_sibling = old_child.previous_sibling.take();\n    let next_sibling = old_child.next_sibling.take();\n    old_child.parent.set(None);\n\n    new_child.previous_sibling.set(previous_sibling);\n    new_child.next_sibling.set(next_sibling);\n    new_child.parent.set(Some(*self));\n\n    if let Some(previous_sibling) = previous_sibling {\n      previous_sibling.next_sibling.set(Some(new_child));\n    } else {\n      self.first_child.set(Some(new_child));\n    }\n    if let Some(next_sibling) = next_sibling {\n      next_sibling.previous_sibling.set(Some(new_child));\n    } else {\n      self.last_child.set(Some(new_child));\n    }\n    Some(*old_child)\n  }\n\n  // TODO: deprecate\n  fn to_owned(&self) -> Self {\n    self\n  }\n\n  fn as_child(&self) -> Self::Child {\n    self\n  }\n\n  fn as_impl(&self) -> impl oxvg_ast::node::Node<'arena> {\n    *self\n  }\n\n  fn as_parent_child(&self) -> Self::ParentChild {\n    self\n  }\n}\n\n#[derive(RefCast, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]\n#[repr(transparent)]\npub struct QName(QualName);\n\nimpl oxvg_ast::name::Name for QName {\n  type LocalName = xml5ever::LocalName;\n  type Prefix = xml5ever::Prefix;\n  type Namespace = xml5ever::Namespace;\n\n  fn new(prefix: Option<Self::Prefix>, local: Self::LocalName) -> Self {\n    QName(QualName {\n      prefix,\n      local,\n      ns: Self::Namespace::default(),\n    })\n  }\n\n  fn local_name(&self) -> &Self::LocalName {\n    &self.0.local\n  }\n\n  fn prefix(&self) -> &Option<Self::Prefix> {\n    &self.0.prefix\n  }\n\n  fn ns(&self) -> &Self::Namespace {\n    &self.0.ns\n  }\n}\n\n#[derive(RefCast, Clone, Debug, PartialEq)]\n#[repr(transparent)]\npub struct Attr(Attribute);\n\nimpl<'arena> oxvg_ast::attribute::Attr for Attr {\n  type Atom = StrTendril;\n  type Name = QName;\n\n  fn new(name: Self::Name, value: Self::Atom) -> Self {\n    Attr(Attribute {\n      name: name.0,\n      value,\n    })\n  }\n\n  fn name(&self) -> &Self::Name {\n    QName::ref_cast(&self.0.name)\n  }\n\n  fn name_mut(&mut self) -> &mut Self::Name {\n    QName::ref_cast_mut(&mut self.0.name)\n  }\n\n  fn local_name(&self) -> &<Self::Name as Name>::LocalName {\n    &self.0.name.local\n  }\n\n  fn prefix(&self) -> &Option<<Self::Name as Name>::Prefix> {\n    &self.0.name.prefix\n  }\n\n  fn value(&self) -> &Self::Atom {\n    &self.0.value\n  }\n\n  fn value_mut(&mut self) -> &mut Self::Atom {\n    &mut self.0.value\n  }\n\n  fn set_value(&mut self, value: Self::Atom) -> Self::Atom {\n    std::mem::replace(&mut self.0.value, value)\n  }\n\n  fn push(&mut self, value: &Self::Atom) {\n    self.0.value.push_tendril(value);\n  }\n\n  fn sub_value(&self, offset: u32, length: u32) -> Self::Atom {\n    self.0.value.subtendril(offset, length)\n  }\n}\n#[derive(Debug, Clone)]\n/// The list of attributes of an element.\npub struct Attributes<'arena>(pub &'arena RefCell<Vec<Attribute>>);\n\nimpl<'arena> oxvg_ast::attribute::Attributes<'arena> for Attributes<'arena> {\n  type Attribute = Attr;\n\n  fn len(&self) -> usize {\n    self.0.borrow().len()\n  }\n\n  fn item(&self, index: usize) -> Option<std::cell::Ref<'arena, Self::Attribute>> {\n    std::cell::Ref::filter_map(self.0.borrow(), |v| v.get(index).map(Attr::ref_cast)).ok()\n  }\n\n  fn item_mut(&self, index: usize) -> Option<std::cell::RefMut<'arena, Self::Attribute>> {\n    std::cell::RefMut::filter_map(self.0.borrow_mut(), |v| {\n      v.get_mut(index).map(Attr::ref_cast_mut)\n    })\n    .ok()\n  }\n\n  fn get_named_item(\n    &self,\n    name: &<Self::Attribute as oxvg_ast::attribute::Attr>::Name,\n  ) -> Option<std::cell::Ref<'arena, Self::Attribute>> {\n    std::cell::Ref::filter_map(self.0.borrow(), |v| {\n      v.iter()\n        .find(|a| a.name.prefix == *name.prefix() && a.name.local == *name.local_name())\n        .map(Attr::ref_cast)\n    })\n    .ok()\n  }\n\n  fn get_named_item_mut(\n    &self,\n    name: &<Self::Attribute as oxvg_ast::attribute::Attr>::Name,\n  ) -> Option<RefMut<'arena, Self::Attribute>> {\n    RefMut::filter_map(self.0.borrow_mut(), |v| {\n      v.iter_mut()\n        .find(|a| a.name.prefix == *name.prefix() && a.name.local == *name.local_name())\n        .map(Attr::ref_cast_mut)\n    })\n    .ok()\n  }\n\n  fn get_named_item_local(\n    &self,\n    name: &<<Self::Attribute as oxvg_ast::attribute::Attr>::Name as Name>::LocalName,\n  ) -> Option<std::cell::Ref<'arena, Self::Attribute>> {\n    std::cell::Ref::filter_map(self.0.borrow(), |v| {\n      v.iter()\n        .find(|a| a.name.prefix.is_none() && a.name.local == *name)\n        .map(Attr::ref_cast)\n    })\n    .ok()\n  }\n\n  fn get_named_item_local_mut(\n    &self,\n    name: &<<Self::Attribute as oxvg_ast::attribute::Attr>::Name as Name>::LocalName,\n  ) -> Option<RefMut<'arena, Self::Attribute>> {\n    RefMut::filter_map(self.0.borrow_mut(), |v| {\n      v.iter_mut()\n        .find(|a| a.name.prefix.is_none() && a.name.local == *name)\n        .map(Attr::ref_cast_mut)\n    })\n    .ok()\n  }\n\n  fn get_named_item_ns(\n    &self,\n    namespace: &<<Self::Attribute as oxvg_ast::attribute::Attr>::Name as Name>::Namespace,\n    name: &<<Self::Attribute as oxvg_ast::attribute::Attr>::Name as Name>::LocalName,\n  ) -> Option<std::cell::Ref<'arena, Self::Attribute>> {\n    std::cell::Ref::filter_map(self.0.borrow(), |v| {\n      v.iter()\n        .find(|a| a.name.local == *name && a.name.ns == *namespace)\n        .map(Attr::ref_cast)\n    })\n    .ok()\n  }\n\n  fn remove_named_item(\n    &self,\n    name: &<Self::Attribute as oxvg_ast::attribute::Attr>::Name,\n  ) -> Option<Self::Attribute> {\n    let mut attrs = self.0.borrow_mut();\n    let index = attrs\n      .iter()\n      .position(|a| a.name.prefix == *name.prefix() && a.name.local == *name.local_name())?;\n    Some(Attr(attrs.remove(index)))\n  }\n\n  fn remove_named_item_local(\n    &self,\n    name: &<<Self::Attribute as oxvg_ast::attribute::Attr>::Name as Name>::LocalName,\n  ) -> Option<Self::Attribute> {\n    let mut attrs = self.0.borrow_mut();\n    let index = attrs\n      .iter()\n      .position(|a| a.name.prefix.is_none() && a.name.local == *name)?;\n    Some(Attr(attrs.remove(index)))\n  }\n\n  fn set_named_item(&self, attr: Self::Attribute) -> Option<Self::Attribute> {\n    let attrs = &mut *self.0.borrow_mut();\n    if let Some(index) = attrs\n      .iter()\n      .position(|a| a.name.prefix == *attr.prefix() && a.name.local == *attr.local_name())\n    {\n      Some(Attr(std::mem::replace(&mut attrs[index], attr.0)))\n    } else {\n      attrs.push(attr.0);\n      None\n    }\n  }\n\n  fn sort(&self, order: &[String], xmlns_front: bool) {\n    fn get_ns_priority(name: &QualName, xmlns_front: bool) -> usize {\n      if xmlns_front {\n        if name.prefix.is_none() && name.local.as_ref() == \"xmlns\" {\n          return 3;\n        }\n        if name.prefix.as_ref().is_some_and(|p| p.as_ref() == \"xmlns\") {\n          return 2;\n        }\n      }\n      if name.prefix.is_some() {\n        return 1;\n      }\n      0\n    }\n\n    self.0.borrow_mut().sort_by(|a, b| {\n      let a_priority = get_ns_priority(&a.name, xmlns_front);\n      let b_priority = get_ns_priority(&b.name, xmlns_front);\n      let priority_ord = b_priority.cmp(&a_priority);\n      if priority_ord != std::cmp::Ordering::Equal {\n        return priority_ord;\n      }\n\n      let a_part = a\n        .name\n        .local\n        .split_once('-')\n        .map_or_else(|| a.name.local.as_ref(), |p| p.0);\n      let b_part = b\n        .name\n        .local\n        .split_once('-')\n        .map_or_else(|| b.name.local.as_ref(), |p| p.0);\n      if a_part != b_part {\n        let a_in_order = order.iter().position(|x| x == a_part);\n        let b_in_order = order.iter().position(|x| x == b_part);\n        if a_in_order.is_some() && b_in_order.is_some() {\n          return a_in_order.cmp(&b_in_order);\n        }\n        if a_in_order.is_some() {\n          return std::cmp::Ordering::Less;\n        }\n        if b_in_order.is_some() {\n          return std::cmp::Ordering::Greater;\n        }\n      }\n\n      a.name.cmp(&b.name)\n    });\n  }\n\n  fn retain<F>(&self, mut f: F)\n  where\n    F: FnMut(&Self::Attribute) -> bool,\n  {\n    self.0.borrow_mut().retain(|attr| f(Attr::ref_cast(attr)));\n  }\n}\n\nimpl<'arena> oxvg_ast::node::Node<'arena> for Element<'arena> {\n  type Arena = Arena<'arena>;\n  type Name = QName;\n  type Atom = StrTendril;\n  type Child = Ref<'arena>;\n  type ParentChild = Ref<'arena>;\n  type Parent = Element<'arena>;\n\n  fn id(&self) -> usize {\n    self.node.id()\n  }\n\n  fn child_nodes_iter(&self) -> impl DoubleEndedIterator<Item = Self::Child> {\n    self.node.child_nodes_iter()\n  }\n\n  fn element(&self) -> Option<impl oxvg_ast::element::Element<'arena, Name = QName>> {\n    Some(self.clone())\n  }\n\n  fn empty(&self) {\n    self.node.empty();\n  }\n\n  #[allow(refining_impl_trait)]\n  fn find_element(&self) -> Option<Self> {\n    if self.node_type() == oxvg_ast::node::Type::Element {\n      Some(self.clone())\n    } else {\n      self.node.find_element()\n    }\n  }\n\n  fn first_child(&self) -> Option<Self::Child> {\n    self.node.first_child()\n  }\n\n  fn insert_before(&mut self, new_node: Self::Child, reference_node: &Self::Child) {\n    oxvg_ast::node::Node::insert_before(&mut self.node, new_node, reference_node);\n  }\n\n  fn insert_after(&mut self, new_node: Self::Child, reference_node: &Self::Child) {\n    oxvg_ast::node::Node::insert_after(&mut self.node, new_node, reference_node);\n  }\n\n  fn retain_children<F>(&self, f: F)\n  where\n    F: FnMut(Self::Child) -> bool,\n  {\n    self.node.retain_children(f);\n  }\n\n  fn last_child(&self) -> Option<Self::Child> {\n    self.node.last_child()\n  }\n\n  fn node_type(&self) -> oxvg_ast::node::Type {\n    self.node.node_type()\n  }\n\n  fn next_sibling(&self) -> Option<Self::ParentChild> {\n    self.node.next_sibling()\n  }\n\n  fn parent_node(&self) -> Option<Self::Parent> {\n    self.node.parent_node()\n  }\n\n  fn previous_sibling(&self) -> Option<Self::ParentChild> {\n    self.node.previous_sibling()\n  }\n\n  fn set_parent_node(&self, new_parent: &Self::Parent) -> Option<Self::Parent> {\n    self.node.set_parent_node(new_parent)\n  }\n\n  fn append_child(&self, a_child: Self::Child) {\n    self.node.append_child(a_child);\n  }\n\n  fn item(&self, index: usize) -> Option<Self::Child> {\n    self.node.item(index)\n  }\n\n  fn node_name(&self) -> Self::Atom {\n    self.node.node_name()\n  }\n\n  fn node_value(&self) -> Option<Self::Atom> {\n    None\n  }\n\n  fn processing_instruction(&self) -> Option<(Self::Atom, Self::Atom)> {\n    None\n  }\n\n  fn try_set_node_value(&self, _value: Self::Atom) -> Option<()> {\n    None\n  }\n\n  fn text_content(&self) -> Option<Self::Atom> {\n    oxvg_ast::node::Node::text_content(&self.node)\n  }\n\n  fn set_text_content(&self, content: Self::Atom, arena: &Self::Arena) {\n    oxvg_ast::node::Node::set_text_content(&self.node, content, arena);\n  }\n\n  fn text(&self, content: Self::Atom, arena: &Self::Arena) -> Self::Child {\n    self.node.text(content, arena)\n  }\n\n  fn remove(&self) {\n    self.node.remove();\n  }\n\n  fn remove_child_at(&mut self, index: usize) -> Option<Self::Child> {\n    self.node.remove_child_at(index)\n  }\n\n  fn clone_node(&self) -> Self {\n    oxvg_ast::element::Element::new(self.node.clone_node()).unwrap()\n  }\n\n  fn replace_child(\n    &mut self,\n    new_child: Self::Child,\n    old_child: &Self::Child,\n  ) -> Option<Self::Child> {\n    self.node.replace_child(new_child, old_child)\n  }\n\n  fn to_owned(&self) -> Self {\n    self.clone()\n  }\n\n  fn as_child(&self) -> Self::Child {\n    self.node.as_child()\n  }\n\n  fn as_impl(&self) -> impl oxvg_ast::node::Node<'arena> {\n    self.node.as_impl()\n  }\n\n  fn as_parent_child(&self) -> Self::ParentChild {\n    self.node.as_parent_child()\n  }\n}\n\n#[derive(Clone)]\n/// An XML element type.\npub struct Element<'arena> {\n  node: Ref<'arena>,\n}\n\nimpl<'arena> oxvg_ast::element::Element<'arena> for Element<'arena> {\n  type Attributes<'a> = Attributes<'a>;\n  type Attr = Attr;\n  type Lifetimed<'a> = Element<'a>;\n\n  fn new(node: Ref<'arena>) -> Option<Self> {\n    if !matches!(\n      node.node_type(),\n      oxvg_ast::node::Type::Element | oxvg_ast::node::Type::Document\n    ) {\n      return None;\n    }\n    Some(Self { node })\n  }\n\n  fn as_document(&self) -> impl oxvg_ast::document::Document<'arena, Root = Self> {\n    Document(self.clone())\n  }\n\n  fn from_parent(node: Self::ParentChild) -> Option<Self> {\n    Self::new(node)\n  }\n\n  fn tag_name(&self) -> Self::Atom {\n    self.node.node_name()\n  }\n\n  fn qual_name(&self) -> &Self::Name {\n    if let NodeData::Element { name, .. } = &self.node.data {\n      QName::ref_cast(&name)\n    } else {\n      unreachable!()\n    }\n  }\n\n  fn replace_children(&self, children: Vec<Self::Child>) {\n    self.node.first_child.set(children.first().copied());\n    self.node.last_child.set(children.last().copied());\n    for i in 0..children.len() {\n      let current = children.get(i).expect(\"`i` should be within len\");\n      current.parent.set(Some(self.node));\n      if i > 0 {\n        current.previous_sibling.set(children.get(i - 1).copied());\n      } else {\n        current.previous_sibling.set(None);\n      }\n      current.next_sibling.set(children.get(i + 1).copied());\n    }\n  }\n\n  fn set_local_name(&self, new_name: <Self::Name as Name>::LocalName, arena: &Self::Arena) {\n    let NodeData::Element { attrs, .. } = &self.node.data else {\n      panic!(\"expected an element!\");\n    };\n    let replacement = arena.alloc(Node::new(\n      NodeData::Element {\n        name: QualName::new(None, Default::default(), new_name),\n        attrs: attrs.clone(),\n        selector_flags: SelectorFlags(Cell::new(None)),\n        mathml_annotation_xml_integration_point: false,\n        template_contents: None,\n      },\n      0,\n    ));\n    self.replace_with(replacement);\n  }\n\n  fn append(&self, node: Self::Child) {\n    node.remove();\n    if let Some(last_node) = self.node.last_child.get() {\n      last_node.next_sibling.set(Some(node));\n      self.node.last_child.set(Some(node));\n    } else {\n      debug_assert!(self.node.first_child.get().is_none());\n      self.node.first_child.set(Some(node));\n      self.node.last_child.set(Some(node));\n    }\n  }\n\n  fn attributes(&self) -> Self::Attributes<'_> {\n    if let NodeData::Element { attrs, .. } = &self.node.data {\n      Attributes(attrs)\n    } else {\n      unreachable!()\n    }\n  }\n\n  fn set_attributes(&self, new_attrs: Self::Attributes<'_>) {\n    if let NodeData::Element { attrs, .. } = &self.node.data {\n      attrs.replace(new_attrs.0.take());\n    }\n  }\n\n  fn parent_element(&self) -> Option<Self> {\n    self.node.parent_node()\n  }\n\n  fn class_list(\n    &self,\n  ) -> impl oxvg_ast::class_list::ClassList<\n    Attribute = <Self::Attributes<'_> as oxvg_ast::attribute::Attributes>::Attribute,\n  > {\n    use oxvg_ast::attribute::Attributes;\n    ClassList {\n      attrs: self.attributes(),\n      tokens: self\n        .attributes()\n        .get_named_item_local(&local_name!(\"class\"))\n        .map(|a| a.value().split_whitespace().map(Into::into).collect())\n        .unwrap_or_default(),\n    }\n  }\n\n  fn document(&self) -> Option<Self> {\n    let Some(parent) = self.parent_node() else {\n      return Some(self.clone());\n    };\n    match self.node.data {\n      NodeData::Element { .. } => parent.document(),\n      NodeData::Document => Some(parent),\n      _ => None,\n    }\n  }\n\n  fn flatten(&self) {\n    let parent = self.node.parent.take();\n    let mut current = self.node.first_child.get();\n    while let Some(current_child) = current {\n      current_child.parent.set(parent);\n      current = current_child.next_sibling.get();\n    }\n\n    let previous_sibling = self.node.previous_sibling.take();\n    let next_sibling = self.node.next_sibling.take();\n    let first_child = self.node.first_child.take();\n    let last_child = self.node.last_child.take();\n\n    if let Some(first_child) = first_child {\n      if let Some(previous_sibling) = previous_sibling {\n        previous_sibling.next_sibling.set(Some(first_child));\n        first_child.previous_sibling.set(Some(previous_sibling));\n      } else if let Some(parent) = parent {\n        parent.first_child.set(Some(first_child));\n      }\n    } else if let Some(previous_sibling) = previous_sibling {\n      previous_sibling.next_sibling.set(next_sibling);\n      next_sibling.inspect(|n| n.previous_sibling.set(Some(previous_sibling)));\n    } else if let Some(parent) = parent {\n      parent.first_child.set(next_sibling);\n    }\n    if let Some(last_child) = last_child {\n      if let Some(next_sibling) = next_sibling {\n        last_child.next_sibling.set(Some(next_sibling));\n        next_sibling.previous_sibling.set(Some(last_child));\n      } else if let Some(parent) = parent {\n        parent.last_child.set(Some(last_child));\n      }\n    } else if let Some(next_sibling) = next_sibling {\n      next_sibling.previous_sibling.set(previous_sibling);\n    } else if let Some(parent) = parent {\n      parent.last_child.set(previous_sibling);\n    }\n  }\n\n  fn find_element(node: <Self as oxvg_ast::node::Node<'arena>>::ParentChild) -> Option<Self> {\n    let mut queue = VecDeque::new();\n    queue.push_back(node);\n\n    while let Some(current) = queue.pop_front() {\n      let maybe_element = current.element();\n      if maybe_element\n        .as_ref()\n        .is_some_and(|n| n.node_type() == oxvg_ast::node::Type::Element)\n      {\n        return maybe_element;\n      }\n\n      for child in current.child_nodes_iter() {\n        queue.push_back(child);\n      }\n    }\n    None\n  }\n\n  fn sort_child_elements<F>(&self, mut f: F)\n  where\n    F: FnMut(Self, Self) -> std::cmp::Ordering,\n  {\n    let mut children: Vec<_> = self.child_nodes_iter().collect();\n    children.sort_by(|a, b| {\n      let Some(a) = Element::new(a) else {\n        return std::cmp::Ordering::Less;\n      };\n      let Some(b) = Element::new(b) else {\n        return std::cmp::Ordering::Greater;\n      };\n      f(a, b)\n    });\n\n    self.node.first_child.set(children.first().copied());\n    self.node.last_child.set(children.last().copied());\n    for i in 0..children.len() {\n      let child = children[i];\n      if i > 0 {\n        child.previous_sibling.set(children.get(i - 1).copied());\n      }\n      child.next_sibling.set(children.get(i + 1).copied());\n    }\n  }\n\n  fn set_selector_flags(&self, flags: selectors::matching::ElementSelectorFlags) {\n    let NodeData::Element {\n      ref selector_flags, ..\n    } = self.node.data\n    else {\n      return;\n    };\n    selector_flags.0.set(Some(flags));\n  }\n}\n\nimpl Debug for Element<'_> {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    if self.node_type() != oxvg_ast::node::Type::Element {\n      return (&self.node).fmt(f);\n    }\n    let name = self.qual_name().formatter();\n    let attributes = self.attributes();\n    let child_node_count = self.child_node_count();\n    let text = match child_node_count {\n      1 => self\n        .text_content()\n        .map(|s| s.trim().to_string())\n        .map(Cow::Owned)\n        .unwrap_or_default(),\n      _ => Cow::Borrowed(\"\"),\n    };\n    let child_count = match child_node_count {\n      0 => String::from(\"/>\"),\n      len => format!(\">{len} child nodes</{name}>\"),\n    };\n    f.debug_tuple(\"Element\")\n      .field(&format!(\"<{name} {attributes:?}{child_count} {text}\"))\n      .finish()\n  }\n}\n\nimpl std::hash::Hash for Element<'_> {\n  fn hash<H: std::hash::Hasher>(&self, state: &mut H) {\n    self.node.id().hash(state);\n  }\n}\n\nimpl Eq for Element<'_> {}\n\nimpl PartialEq for Element<'_> {\n  fn eq(&self, other: &Self) -> bool {\n    self.id_eq(other)\n  }\n}\n\n/// A whitespace seperated set of tokens of a class attribute's value.\npub struct ClassList<'arena> {\n  attrs: Attributes<'arena>,\n  tokens: Vec<StrTendril>,\n}\n\nimpl oxvg_ast::class_list::ClassList for ClassList<'_> {\n  type Attribute = Attr;\n\n  fn length(&self) -> usize {\n    self.tokens.len()\n  }\n\n  fn value(&self) -> <Self::Attribute as oxvg_ast::attribute::Attr>::Atom {\n    use oxvg_ast::attribute::Attributes;\n    self\n      .attrs\n      .get_named_item_local(&\"class\".into())\n      .map(|a| a.value().clone())\n      .unwrap_or_default()\n  }\n\n  fn add(&mut self, token: <Self::Attribute as oxvg_ast::attribute::Attr>::Atom) {\n    use oxvg_ast::attribute::Attributes;\n    if self.contains(&token) {\n      return;\n    };\n    let Some(mut attr) = self.attrs.get_named_item_local_mut(&\"class\".into()) else {\n      self\n        .attrs\n        .set_named_item(Attr::new(Name::new(None, \"class\".into()), token.clone()));\n      self.tokens.push(token);\n      return;\n    };\n\n    attr.push(&token);\n  }\n\n  fn contains(&self, token: &<Self::Attribute as oxvg_ast::attribute::Attr>::Atom) -> bool {\n    self.tokens.contains(token)\n  }\n\n  fn item(&self, index: usize) -> Option<&<Self::Attribute as oxvg_ast::attribute::Attr>::Atom> {\n    self.tokens.get(index)\n  }\n\n  fn remove(&mut self, token: &<Self::Attribute as oxvg_ast::attribute::Attr>::Atom) {\n    use oxvg_ast::attribute::Attributes;\n    let Some(index) = self.tokens.iter().position(|t| t == token) else {\n      return;\n    };\n    self.tokens.remove(index);\n\n    let mut attr = self\n      .attrs\n      .get_named_item_local_mut(&\"class\".into())\n      .expect(\"had token\");\n    if self.tokens.is_empty() {\n      drop(attr);\n      self.attrs.remove_named_item_local(&\"class\".into());\n    } else {\n      let mut s = StrTendril::with_capacity(attr.value().len() as u32);\n      let mut first = false;\n      for token in &self.tokens {\n        if !first {\n          s.push_char(' ');\n        }\n        s.push_tendril(token);\n        first = false;\n      }\n      attr.set_value(s);\n    }\n  }\n\n  fn replace(\n    &mut self,\n    old_token: <Self::Attribute as oxvg_ast::attribute::Attr>::Atom,\n    new_token: <Self::Attribute as oxvg_ast::attribute::Attr>::Atom,\n  ) -> bool {\n    use oxvg_ast::attribute::Attributes;\n    let Some(index) = self.tokens.iter().position(|t| t == &old_token) else {\n      return false;\n    };\n\n    let mut attr = self\n      .attrs\n      .get_named_item_local_mut(&\"class\".into())\n      .expect(\"had token\");\n\n    let mut s = StrTendril::with_capacity(attr.value().len() as u32);\n    let mut first = false;\n    for token in &self.tokens {\n      if !first {\n        s.push_char(' ');\n      }\n      s.push_tendril(token);\n      first = false;\n    }\n    attr.set_value(s);\n\n    drop(attr);\n    self.tokens[index] = new_token;\n    true\n  }\n\n  fn iter(\n    &self,\n  ) -> impl DoubleEndedIterator<Item = &<Self::Attribute as oxvg_ast::attribute::Attr>::Atom> {\n    self.tokens.iter()\n  }\n}\n\n#[derive(Clone)]\n/// An XML document type with a root element\npub struct Document<'arena>(Element<'arena>);\n\nimpl<'arena> oxvg_ast::document::Document<'arena> for Document<'arena> {\n  type Root = Element<'arena>;\n\n  fn document_element(&self) -> &Self::Root {\n    &self.0\n  }\n\n  fn create_c_data_section(\n    &self,\n    data: <Self::Root as oxvg_ast::node::Node<'arena>>::Atom,\n    arena: &<Self::Root as oxvg_ast::node::Node<'arena>>::Arena,\n  ) -> <Self::Root as oxvg_ast::node::Node<'arena>>::Child {\n    self.create_text_node(data, arena)\n  }\n\n  fn create_element(\n    &self,\n    tag_name: <Self::Root as oxvg_ast::node::Node<'arena>>::Name,\n    arena: &<Self::Root as oxvg_ast::node::Node<'arena>>::Arena,\n  ) -> Self::Root {\n    Element::new(arena.alloc(Node::new(\n      NodeData::Element {\n        name: tag_name.0,\n        attrs: RefCell::new(vec![]),\n        selector_flags: SelectorFlags(Cell::new(None)),\n        mathml_annotation_xml_integration_point: false,\n        template_contents: None,\n      },\n      0,\n    )))\n    .expect(\"created element should be an element\")\n  }\n\n  fn create_processing_instruction(\n    &self,\n    target: <Self::Root as oxvg_ast::node::Node<'arena>>::Atom,\n    data: <Self::Root as oxvg_ast::node::Node<'arena>>::Atom,\n    arena: &<Self::Root as oxvg_ast::node::Node<'arena>>::Arena,\n  ) -> <<Self::Root as oxvg_ast::node::Node<'arena>>::Child as oxvg_ast::node::Node<'arena>>::ParentChild{\n    arena.alloc(Node::new(\n      NodeData::ProcessingInstruction {\n        target,\n        contents: RefCell::new(data),\n      },\n      0,\n    ))\n  }\n\n  fn create_text_node(\n    &self,\n    data: <Self::Root as oxvg_ast::node::Node<'arena>>::Atom,\n    arena: <Self::Root as oxvg_ast::node::Node<'arena>>::Arena,\n  ) -> <Self::Root as oxvg_ast::node::Node<'arena>>::Child {\n    arena.alloc(Node::new(\n      NodeData::Text {\n        contents: RefCell::new(data),\n      },\n      0,\n    ))\n  }\n}\n\nstruct ChildNodes<'arena> {\n  front: Option<Ref<'arena>>,\n  end: Option<Ref<'arena>>,\n}\n\nimpl<'arena> Iterator for ChildNodes<'arena> {\n  type Item = Ref<'arena>;\n\n  fn next(&mut self) -> Option<Self::Item> {\n    if let Some(current) = self.front {\n      self.front = current.next_sibling();\n      return Some(current);\n    }\n\n    None\n  }\n}\n\nimpl DoubleEndedIterator for ChildNodes<'_> {\n  fn next_back(&mut self) -> Option<Self::Item> {\n    if let Some(current) = self.end {\n      self.end = current.previous_sibling();\n      return Some(current);\n    }\n\n    None\n  }\n}\n\nimpl ExactSizeIterator for ChildNodes<'_> {\n  fn len(&self) -> usize {\n    let mut current = self.front;\n    let mut len = 0;\n    while let Some(node) = current {\n      current = node.next_sibling();\n      len += 1;\n    }\n    len\n  }\n}\n\n#[derive(Deserialize, Default, Debug)]\n#[serde(rename_all = \"camelCase\")]\npub struct PrefixIdsOptions {\n  pub delim: Option<String>,\n  #[serde(default)]\n  pub prefix: Option<String>,\n  #[serde(default)]\n  pub prefix_ids: Option<bool>,\n  #[serde(default)]\n  pub prefix_class_names: Option<bool>,\n}\n\n#[derive(Deserialize, Default, Debug)]\n#[serde(rename_all = \"camelCase\")]\npub struct OxvgConfig {\n  #[serde(deserialize_with = \"ok_or_default\")]\n  pub default: DefaultTrue,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub add_attributes_to_svg_element: ConfigItem<oxvg_optimiser::AddAttributesToSVGElement>,\n  #[serde(\n    default,\n    deserialize_with = \"ok_or_default\",\n    rename = \"addClassesToSVGElement\"\n  )]\n  pub add_classes_to_svg: ConfigItem<oxvg_optimiser::AddClassesToSVG>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub cleanup_list_of_values: ConfigItem<oxvg_optimiser::CleanupListOfValues>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub prefix_ids: ConfigItem<PrefixIdsOptions>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_attributes_by_selector: ConfigItem<oxvg_optimiser::RemoveAttributesBySelector>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_attrs: ConfigItem<oxvg_optimiser::RemoveAttrs>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_dimensions: ConfigItem<oxvg_optimiser::RemoveDimensions>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_elements_by_attr: ConfigItem<oxvg_optimiser::RemoveElementsByAttr>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_off_canvas_paths: ConfigItem<oxvg_optimiser::RemoveOffCanvasPaths>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_raster_images: ConfigItem<oxvg_optimiser::RemoveRasterImages>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_scripts: ConfigItem<oxvg_optimiser::RemoveScripts>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_style_element: ConfigItem<oxvg_optimiser::RemoveStyleElement>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_title: ConfigItem<oxvg_optimiser::RemoveTitle>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_view_box: ConfigItem<oxvg_optimiser::RemoveViewBox>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub reuse_paths: ConfigItem<()>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_doctype: ConfigItem<oxvg_optimiser::RemoveDoctype>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_xml_proc_inst: ConfigItem<oxvg_optimiser::RemoveXMLProcInst>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_comments: ConfigItem<oxvg_optimiser::RemoveComments>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_deprecated_attrs: ConfigItem<oxvg_optimiser::RemoveDeprecatedAttrs>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_metadata: ConfigItem<oxvg_optimiser::RemoveMetadata>,\n  #[serde(default, deserialize_with = \"ok_or_default\", rename = \"cleanupAttrs\")]\n  pub cleanup_attributes: ConfigItem<oxvg_optimiser::CleanupAttributes>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub merge_styles: ConfigItem<()>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub inline_styles: ConfigItem<oxvg_optimiser::InlineStyles>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub minify_styles: ConfigItem<oxvg_optimiser::MinifyStyles>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub cleanup_ids: ConfigItem<oxvg_optimiser::CleanupIds>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_useless_defs: ConfigItem<oxvg_optimiser::RemoveUselessDefs>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub cleanup_numeric_values: ConfigItem<oxvg_optimiser::CleanupNumericValues>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub convert_colors: ConfigItem<oxvg_optimiser::ConvertColors>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_unknowns_and_defaults: ConfigItem<oxvg_optimiser::RemoveUnknownsAndDefaults>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_non_inheritable_group_attrs:\n    ConfigItem<oxvg_optimiser::RemoveNonInheritableGroupAttrs>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_useless_stroke_and_fill: ConfigItem<oxvg_optimiser::RemoveUselessStrokeAndFill>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub cleanup_enable_background: ConfigItem<oxvg_optimiser::CleanupEnableBackground>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_hidden_elems: ConfigItem<oxvg_optimiser::RemoveHiddenElems>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_empty_text: ConfigItem<oxvg_optimiser::RemoveEmptyText>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub convert_shape_to_path: ConfigItem<oxvg_optimiser::ConvertShapeToPath>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub convert_ellipse_to_circle: ConfigItem<oxvg_optimiser::ConvertEllipseToCircle>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub move_elems_attrs_to_group: ConfigItem<oxvg_optimiser::MoveElemsAttrsToGroup>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub move_group_attrs_to_elems: ConfigItem<oxvg_optimiser::MoveGroupAttrsToElems>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub collapse_groups: ConfigItem<oxvg_optimiser::CollapseGroups>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub apply_transforms: ConfigItem<oxvg_optimiser::ApplyTransforms>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub convert_path_data: ConfigItem<oxvg_optimiser::ConvertPathData>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub convert_transform: ConfigItem<oxvg_optimiser::ConvertTransform>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_empty_attrs: ConfigItem<oxvg_optimiser::RemoveEmptyAttrs>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_empty_containers: ConfigItem<oxvg_optimiser::RemoveEmptyContainers>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub merge_paths: ConfigItem<oxvg_optimiser::MergePaths>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub sort_attrs: ConfigItem<oxvg_optimiser::SortAttrs>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub sort_defs_children: ConfigItem<oxvg_optimiser::SortDefsChildren>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_desc: ConfigItem<oxvg_optimiser::RemoveDesc>,\n  #[serde(\n    default,\n    deserialize_with = \"ok_or_default\",\n    rename = \"removeEditorsNSData\"\n  )]\n  pub remove_editors_ns_data: ConfigItem<oxvg_optimiser::RemoveEditorsNSData>,\n  #[serde(default, deserialize_with = \"ok_or_default\", rename = \"removeUnusedNS\")]\n  pub remove_unused_n_s: ConfigItem<oxvg_optimiser::RemoveUnusedNS>,\n  #[serde(default, deserialize_with = \"ok_or_default\", rename = \"removeXMLNS\")]\n  pub remove_x_m_l_n_s: ConfigItem<oxvg_optimiser::RemoveXMLNS>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub remove_xlink: ConfigItem<oxvg_optimiser::RemoveXlink>,\n}\n\n#[derive(Deserialize, Debug)]\n#[serde(transparent)]\npub struct DefaultTrue(bool);\n\nimpl Default for DefaultTrue {\n  fn default() -> Self {\n    DefaultTrue(true)\n  }\n}\n\n#[derive(Deserialize, Default, Debug)]\n#[serde(untagged)]\npub enum ConfigItem<C> {\n  #[serde(skip)]\n  #[default]\n  None,\n  Bool(bool),\n  Config(C),\n}\n\nimpl<C> ConfigItem<C> {\n  fn is_some(&self) -> bool {\n    match self {\n      ConfigItem::Bool(true) => true,\n      ConfigItem::Config(_) => true,\n      _ => false,\n    }\n  }\n}\n\nfn ok_or_default<'de, T, D>(deserializer: D) -> Result<T, D::Error>\nwhere\n  T: serde::Deserialize<'de> + Default,\n  D: serde::Deserializer<'de>,\n{\n  Ok(T::deserialize(deserializer).unwrap_or_default())\n}\n\npub enum OxvgKind {\n  Html,\n  Svg,\n}\n\nimpl OxvgConfig {\n  pub fn into_jobs(&self, kind: OxvgKind) -> oxvg_optimiser::Jobs {\n    let mut jobs = if self.default.0 {\n      match kind {\n        OxvgKind::Html => {\n          oxvg_optimiser::Jobs {\n            // These defaults can break CSS selectors.\n            convert_shape_to_path: None,\n            // Additional defaults to preserve accessibility information.\n            remove_title: None,\n            remove_desc: None,\n            remove_unknowns_and_defaults: Some(oxvg_optimiser::RemoveUnknownsAndDefaults {\n              keep_aria_attrs: true,\n              keep_role_attr: true,\n              ..Default::default()\n            }),\n            // Do not minify ids or remove unreferenced elements in\n            // inline SVGs because they could actually be referenced\n            // by a separate inline SVG.\n            cleanup_ids: None,\n            remove_hidden_elems: None,\n            ..Default::default()\n          }\n        }\n        OxvgKind::Svg => {\n          oxvg_optimiser::Jobs {\n            // Removing ids could break SVG sprites.\n            cleanup_ids: None,\n            ..Default::default()\n          }\n        }\n      }\n    } else {\n      oxvg_optimiser::Jobs::none()\n    };\n\n    macro_rules! job {\n      ($name: ident) => {\n        jobs.$name = match &self.$name {\n          ConfigItem::None => jobs.$name,\n          ConfigItem::Bool(true) => Some(Default::default()),\n          ConfigItem::Bool(false) => None,\n          ConfigItem::Config(c) => Some(c.clone().into()),\n        };\n      };\n    }\n\n    job!(add_attributes_to_svg_element);\n    job!(add_classes_to_svg);\n    job!(cleanup_list_of_values);\n\n    jobs.prefix_ids = match &self.prefix_ids {\n      ConfigItem::None => jobs.prefix_ids,\n      ConfigItem::Bool(true) => Some(Default::default()),\n      ConfigItem::Bool(false) => None,\n      ConfigItem::Config(c) => Some(oxvg_optimiser::PrefixIds {\n        delim: c\n          .delim\n          .as_ref()\n          .map(|c| c.clone())\n          .unwrap_or_else(|| oxvg_optimiser::PrefixIds::default().delim),\n        prefix: match &c.prefix {\n          None => Default::default(),\n          Some(c) => oxvg_optimiser::PrefixGenerator::Prefix(c.clone()),\n        },\n        prefix_ids: c\n          .prefix_ids\n          .unwrap_or_else(|| oxvg_optimiser::PrefixIds::default().prefix_ids),\n        prefix_class_names: c\n          .prefix_class_names\n          .unwrap_or_else(|| oxvg_optimiser::PrefixIds::default().prefix_class_names),\n      }),\n    };\n\n    job!(remove_attributes_by_selector);\n    job!(remove_attrs);\n    job!(remove_dimensions);\n    job!(remove_elements_by_attr);\n    job!(remove_off_canvas_paths);\n    job!(remove_raster_images);\n    job!(remove_scripts);\n    job!(remove_style_element);\n    job!(remove_title);\n    job!(remove_view_box);\n\n    jobs.reuse_paths = match self.reuse_paths {\n      ConfigItem::None => jobs.reuse_paths,\n      ConfigItem::Bool(true) => Some(Default::default()),\n      ConfigItem::Bool(false) => None,\n      ConfigItem::Config(()) => unreachable!(),\n    };\n\n    job!(remove_doctype);\n    job!(remove_xml_proc_inst);\n    job!(remove_comments);\n    job!(remove_deprecated_attrs);\n    job!(remove_metadata);\n    job!(cleanup_attributes);\n\n    jobs.merge_styles = match self.merge_styles {\n      ConfigItem::None => jobs.merge_styles,\n      ConfigItem::Bool(true) => Some(Default::default()),\n      ConfigItem::Bool(false) => None,\n      ConfigItem::Config(()) => unreachable!(),\n    };\n\n    job!(inline_styles);\n    job!(minify_styles);\n    job!(cleanup_ids);\n    job!(remove_useless_defs);\n    job!(cleanup_numeric_values);\n    job!(convert_colors);\n    job!(remove_unknowns_and_defaults);\n    job!(remove_non_inheritable_group_attrs);\n    job!(remove_useless_stroke_and_fill);\n    job!(cleanup_enable_background);\n    job!(remove_hidden_elems);\n    job!(remove_empty_text);\n    job!(convert_shape_to_path);\n    job!(convert_ellipse_to_circle);\n    job!(move_elems_attrs_to_group);\n    job!(move_group_attrs_to_elems);\n    job!(collapse_groups);\n    job!(apply_transforms);\n    job!(convert_path_data);\n    job!(convert_transform);\n    job!(remove_empty_attrs);\n    job!(remove_empty_containers);\n    job!(merge_paths);\n    job!(sort_attrs);\n    job!(sort_defs_children);\n    job!(remove_desc);\n    job!(remove_editors_ns_data);\n    job!(remove_unused_n_s);\n    job!(remove_x_m_l_n_s);\n    job!(remove_xlink);\n\n    jobs\n  }\n\n  pub fn has_any_jobs(&self) -> bool {\n    return self.default.0\n      || self.add_attributes_to_svg_element.is_some()\n      || self.add_classes_to_svg.is_some()\n      || self.cleanup_list_of_values.is_some()\n      || self.prefix_ids.is_some()\n      || self.remove_attributes_by_selector.is_some()\n      || self.remove_attrs.is_some()\n      || self.remove_dimensions.is_some()\n      || self.remove_elements_by_attr.is_some()\n      || self.remove_off_canvas_paths.is_some()\n      || self.remove_raster_images.is_some()\n      || self.remove_scripts.is_some()\n      || self.remove_style_element.is_some()\n      || self.remove_title.is_some()\n      || self.remove_view_box.is_some()\n      || self.reuse_paths.is_some()\n      || self.remove_doctype.is_some()\n      || self.remove_xml_proc_inst.is_some()\n      || self.remove_comments.is_some()\n      || self.remove_deprecated_attrs.is_some()\n      || self.remove_metadata.is_some()\n      || self.cleanup_attributes.is_some()\n      || self.merge_styles.is_some()\n      || self.inline_styles.is_some()\n      || self.minify_styles.is_some()\n      || self.cleanup_ids.is_some()\n      || self.remove_useless_defs.is_some()\n      || self.cleanup_numeric_values.is_some()\n      || self.convert_colors.is_some()\n      || self.remove_unknowns_and_defaults.is_some()\n      || self.remove_non_inheritable_group_attrs.is_some()\n      || self.remove_useless_stroke_and_fill.is_some()\n      || self.cleanup_enable_background.is_some()\n      || self.remove_hidden_elems.is_some()\n      || self.remove_empty_text.is_some()\n      || self.convert_shape_to_path.is_some()\n      || self.convert_ellipse_to_circle.is_some()\n      || self.move_elems_attrs_to_group.is_some()\n      || self.move_group_attrs_to_elems.is_some()\n      || self.collapse_groups.is_some()\n      || self.apply_transforms.is_some()\n      || self.convert_path_data.is_some()\n      || self.convert_transform.is_some()\n      || self.remove_empty_attrs.is_some()\n      || self.remove_empty_containers.is_some()\n      || self.merge_paths.is_some()\n      || self.sort_attrs.is_some()\n      || self.sort_defs_children.is_some()\n      || self.remove_desc.is_some()\n      || self.remove_editors_ns_data.is_some()\n      || self.remove_unused_n_s.is_some()\n      || self.remove_x_m_l_n_s.is_some()\n      || self.remove_xlink.is_some();\n  }\n}\n"
  },
  {
    "path": "crates/html/src/package.rs",
    "content": "use std::{cell::RefCell, collections::HashMap};\n\nuse crate::{\n  SerializableTendril,\n  arena::{Node, NodeData},\n  dependencies::{is_func_iri_attr, parse_xml_stylesheet, serialize_xml_stylesheet},\n  srcset::{parse_srcset, serialize_srcset},\n};\nuse html5ever::{ExpandedName, expanded_name, local_name, namespace_url, ns};\nuse serde::Deserialize;\nuse typed_arena::Arena;\n\n#[derive(Deserialize)]\n#[serde(tag = \"type\", content = \"value\")]\npub enum BundleReference {\n  StyleSheet {\n    href: SerializableTendril,\n  },\n  Script {\n    src: SerializableTendril,\n    module: bool,\n    nomodule: bool,\n  },\n}\n\n#[derive(Deserialize)]\npub struct InlineBundle {\n  contents: SerializableTendril,\n  module: bool,\n}\n\npub fn insert_bundle_references<'arena>(\n  arena: &'arena Arena<Node<'arena>>,\n  dom: &'arena Node<'arena>,\n  bundles: Vec<BundleReference>,\n  inline_bundles: HashMap<SerializableTendril, InlineBundle>,\n  mut import_map: serde_json::map::Map<String, serde_json::Value>,\n) {\n  let data_parcel_key = ExpandedName {\n    ns: &ns!(),\n    local: &\"data-parcel-key\".into(),\n  };\n\n  let mut import_map_node = None;\n\n  dom.walk(&mut |node| {\n    if let NodeData::Element { name, attrs, .. } = &node.data {\n      match name.expanded() {\n        expanded_name!(html \"script\") | expanded_name!(svg \"script\") => {\n          if let Some(key) = node.get_attribute(data_parcel_key.clone()) {\n            if let Some(bundle) = inline_bundles.get(&SerializableTendril(key)) {\n              node.remove_attribute(data_parcel_key.clone());\n              node.set_text_content(arena, bundle.contents.0.clone());\n              if bundle.module {\n                node.set_attribute(expanded_name!(\"\", \"type\"), \"module\");\n              }\n            }\n          } else if let Some(t) = node.get_attribute(expanded_name!(\"\", \"type\")) {\n            if t.as_ref() == \"importmap\" {\n              import_map_node = Some(node);\n            }\n          }\n        }\n        expanded_name!(html \"style\") | expanded_name!(svg \"style\") => {\n          if let Some(key) = node.get_attribute(data_parcel_key.clone()) {\n            if let Some(bundle) = inline_bundles.get(&SerializableTendril(key)) {\n              node.remove_attribute(data_parcel_key.clone());\n              node.set_text_content(arena, bundle.contents.0.clone());\n            }\n          }\n        }\n        _ => {}\n      }\n\n      for attr in attrs.borrow_mut().iter_mut() {\n        if attr.name.expanded() == expanded_name!(\"\", \"srcset\")\n          || attr.name.local.as_ref() == \"imagesrcset\"\n        {\n          let mut srcset = parse_srcset(&attr.value);\n          for img in &mut srcset {\n            if let Some(bundle) = inline_bundles.get(&SerializableTendril(img.url.clone().into())) {\n              img.url = bundle.contents.0.clone().into();\n            }\n          }\n\n          attr.value = serialize_srcset(srcset).into();\n        } else if let Some(bundle) = inline_bundles.get(&SerializableTendril(attr.value.clone())) {\n          if is_func_iri_attr(&attr.name) {\n            use cssparser::ToCss;\n            let placeholder =\n              cssparser::Token::UnquotedUrl(cssparser::CowRcStr::from(bundle.contents.0.as_ref()))\n                .to_css_string()\n                .into();\n            attr.value = placeholder;\n          } else {\n            attr.value = bundle.contents.0.clone();\n          }\n        }\n      }\n    } else if let NodeData::ProcessingInstruction { target, contents } = &node.data {\n      if target.as_ref() == \"xml-stylesheet\" {\n        let mut contents = contents.borrow_mut();\n        if let Ok(mut attrs) = parse_xml_stylesheet(&contents) {\n          for attr in &mut attrs {\n            if let Some(bundle) = inline_bundles.get(&SerializableTendril(attr.value.clone())) {\n              attr.value = bundle.contents.0.clone();\n            }\n          }\n\n          *contents = serialize_xml_stylesheet(attrs);\n        }\n      }\n    }\n  });\n\n  if let Some(head) = dom.find(expanded_name!(html \"head\")) {\n    for bundle in bundles.into_iter().rev() {\n      match bundle {\n        BundleReference::StyleSheet { href } => {\n          let node = arena.alloc(Node::create_element(expanded_name!(html \"link\")));\n          node.set_attribute(expanded_name!(\"\", \"rel\"), \"stylesheet\");\n          node.set_attribute(expanded_name!(\"\", \"href\"), &href.0);\n          head.prepend(node);\n        }\n        BundleReference::Script {\n          src,\n          module,\n          nomodule,\n        } => {\n          let node = arena.alloc(Node::create_element(expanded_name!(html \"script\")));\n          if module {\n            node.set_attribute(expanded_name!(\"\", \"type\"), \"module\");\n          }\n          if nomodule {\n            node.set_attribute(expanded_name!(\"\", \"nomodule\"), \"\");\n            node.set_attribute(expanded_name!(\"\", \"defer\"), \"\");\n          }\n          node.set_attribute(expanded_name!(\"\", \"src\"), &src.0);\n          head.prepend(node);\n        }\n      }\n    }\n\n    if !import_map.is_empty() {\n      // If there is an existing <script type=\"importmap\">, merge with that.\n      // This will remove the existing node so it is moved before all other scripts.\n      if let Some(import_map_node) = import_map_node {\n        let content: Result<serde_json::Value, _> =\n          serde_json::from_str(&import_map_node.text_content());\n        if let Ok(serde_json::Value::Object(mut obj)) = content {\n          if let Some(serde_json::Value::Object(imports)) = obj.get_mut(\"imports\") {\n            imports.append(&mut import_map);\n            if let Ok(json) = serde_json::to_string(&obj) {\n              import_map_node.set_text_content(arena, json.into());\n            }\n          }\n        }\n        head.prepend(import_map_node);\n      } else {\n        let node = arena.alloc(Node::create_element(expanded_name!(html \"script\")));\n        node.set_attribute(expanded_name!(\"\", \"type\"), \"importmap\");\n        let mut map = serde_json::Map::new();\n        map.insert(\"imports\".into(), serde_json::Value::Object(import_map));\n        if let Ok(json) = serde_json::to_string(&map) {\n          node.set_text_content(arena, json.into());\n        }\n        head.prepend(node);\n      }\n    }\n  } else if let Some(svg) = dom.find(expanded_name!(svg \"svg\")) {\n    for bundle in bundles.into_iter().rev() {\n      match bundle {\n        BundleReference::StyleSheet { href } => {\n          let node = arena.alloc(Node::new(\n            NodeData::ProcessingInstruction {\n              target: \"xml-stylesheet\".into(),\n              contents: RefCell::new(serialize_xml_stylesheet(vec![xml5ever::Attribute {\n                name: xml5ever::QualName::new(None, ns!(), local_name!(\"href\")),\n                value: href.0,\n              }])),\n            },\n            1,\n          ));\n          dom.prepend(node);\n        }\n        BundleReference::Script { src, .. } => {\n          let node = arena.alloc(Node::create_element(expanded_name!(svg \"script\")));\n          node.set_attribute(expanded_name!(\"\", \"href\"), &src.0);\n          svg.prepend(node);\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "crates/html/src/serialize_html.rs",
    "content": "// Copyright 2014-2017 The html5ever Project Developers. See the\n// COPYRIGHT file at the top-level directory of this distribution.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n// option. This file may not be copied, modified, or distributed\n// except according to those terms.\n\n// Modified from html5ever to add minification support.\n\nuse crate::arena::{NodeData, Ref};\nuse html5ever::{Attribute, LocalName, QualName, expanded_name};\nuse html5ever::{local_name, namespace_url, ns};\nuse std::io::{self, Write};\n\npub fn serialize<'arena, Wr>(writer: Wr, node: Ref<'arena>, opts: SerializeOpts) -> io::Result<()>\nwhere\n  Wr: Write,\n{\n  let mut ser = HtmlSerializer::new(writer, opts.clone());\n  ser.serialize_node(node)\n}\n\n#[derive(Clone)]\npub struct SerializeOpts {\n  /// Is scripting enabled? Default: true\n  pub scripting_enabled: bool,\n\n  /// If the serializer is asked to serialize an invalid tree, the default\n  /// behavior is to panic in the event that an `end_elem` is created without a\n  /// matching `start_elem`. Setting this to true will prevent those panics by\n  /// creating a default parent on the element stack. No extra start elem will\n  /// actually be written. Default: false\n  pub create_missing_parent: bool,\n}\n\nimpl Default for SerializeOpts {\n  fn default() -> SerializeOpts {\n    SerializeOpts {\n      scripting_enabled: true,\n      create_missing_parent: false,\n    }\n  }\n}\n\n#[derive(Default)]\nstruct ElemInfo {\n  html_name: Option<LocalName>,\n  ignore_children: bool,\n}\n\npub struct HtmlSerializer<Wr: Write> {\n  pub writer: Wr,\n  opts: SerializeOpts,\n  stack: Vec<ElemInfo>,\n}\n\nfn tagname(name: &QualName) -> LocalName {\n  match name.ns {\n    ns!(html) | ns!(mathml) | ns!(svg) => (),\n    _ => {\n      // FIXME(#122)\n      // warn!(\"node with weird namespace {:?}\", ns);\n    }\n  }\n\n  name.local.clone()\n}\n\nimpl<Wr: Write> HtmlSerializer<Wr> {\n  pub fn new(writer: Wr, opts: SerializeOpts) -> Self {\n    HtmlSerializer {\n      writer,\n      opts,\n      stack: vec![ElemInfo {\n        html_name: None,\n        ignore_children: false,\n      }],\n    }\n  }\n\n  fn parent(&mut self) -> &mut ElemInfo {\n    if self.stack.is_empty() {\n      if self.opts.create_missing_parent {\n        // warn!(\"ElemInfo stack empty, creating new parent\");\n        self.stack.push(Default::default());\n      } else {\n        panic!(\"no parent ElemInfo\")\n      }\n    }\n    self.stack.last_mut().unwrap()\n  }\n\n  fn write_escaped(&mut self, text: &str, attr_mode: bool) -> io::Result<()> {\n    for c in text.chars() {\n      match c {\n        '&' => self.writer.write_all(b\"&amp;\"),\n        '\\u{00A0}' => self.writer.write_all(b\"&nbsp;\"),\n        '\"' if attr_mode => self.writer.write_all(b\"&quot;\"),\n        '<' if !attr_mode => self.writer.write_all(b\"&lt;\"),\n        '>' if !attr_mode => self.writer.write_all(b\"&gt;\"),\n        c => self.writer.write_fmt(format_args!(\"{c}\")),\n      }?;\n    }\n    Ok(())\n  }\n\n  fn serialize_node<'arena>(&mut self, node: Ref<'arena>) -> io::Result<()> {\n    match &node.data {\n      NodeData::Element {\n        name,\n        attrs,\n        template_contents,\n        ..\n      } => {\n        self.start_elem(node, name, &*attrs.borrow())?;\n\n        let mut child = node.first_child.get();\n        while let Some(n) = child {\n          self.serialize_node(n)?;\n          child = n.next_sibling.get();\n        }\n\n        if let Some(template_contents) = template_contents {\n          self.serialize_node(template_contents)?;\n        }\n\n        self.end_elem(node, name)?;\n      }\n      NodeData::Comment { contents } => {\n        self.write_comment(contents)?;\n      }\n      NodeData::Doctype { name, .. } => {\n        self.write_doctype(name)?;\n      }\n      NodeData::Document => {\n        let mut child = node.first_child.get();\n        while let Some(n) = child {\n          self.serialize_node(n)?;\n          child = n.next_sibling.get();\n        }\n      }\n      NodeData::ProcessingInstruction { target, contents } => {\n        self.write_processing_instruction(target, contents.borrow().as_ref())?;\n      }\n      NodeData::Text { contents } => {\n        self.write_text(contents.borrow().as_ref())?;\n      }\n    }\n    Ok(())\n  }\n\n  fn start_elem<'arena, 'a>(\n    &mut self,\n    node: Ref<'arena>,\n    name: &QualName,\n    attrs: &Vec<Attribute>,\n  ) -> io::Result<()> {\n    let html_name = match name.ns {\n      ns!(html) => Some(name.local.clone()),\n      _ => None,\n    };\n\n    if self.parent().ignore_children {\n      self.stack.push(ElemInfo {\n        html_name,\n        ignore_children: true,\n      });\n      return Ok(());\n    }\n\n    if attrs.is_empty() && can_omit_start_tag(node, name) {\n      self.stack.push(ElemInfo {\n        html_name,\n        ignore_children: false,\n      });\n      return Ok(());\n    }\n\n    self.writer.write_all(b\"<\")?;\n    self.writer.write_all(tagname(&name).as_bytes())?;\n    let mut quoted = false;\n    for attr in attrs {\n      self.writer.write_all(b\" \")?;\n\n      match attr.name.ns {\n        ns!() => (),\n        ns!(xml) => self.writer.write_all(b\"xml:\")?,\n        ns!(xmlns) => {\n          if name.local != local_name!(\"xmlns\") {\n            self.writer.write_all(b\"xmlns:\")?;\n          }\n        }\n        ns!(xlink) => self.writer.write_all(b\"xlink:\")?,\n        _ => {\n          // FIXME(#122)\n          // warn!(\"attr with weird namespace {:?}\", ns);\n          self.writer.write_all(b\"unknown_namespace:\")?;\n        }\n      }\n\n      self.writer.write_all(attr.name.local.as_bytes())?;\n      if !attr.value.is_empty() {\n        if !attr.value.contains(|c: char| {\n          c.is_ascii_whitespace() || matches!(c, '\"' | '\\'' | '=' | '<' | '>' | '`' | '\\u{00A0}')\n        }) {\n          self.writer.write_all(b\"=\")?;\n          self.writer.write_all(attr.value.as_bytes())?;\n          quoted = false;\n        } else {\n          self.writer.write_all(b\"=\\\"\")?;\n          self.write_escaped(&attr.value, true)?;\n          self.writer.write_all(b\"\\\"\")?;\n          quoted = true;\n        }\n      }\n    }\n\n    let self_closing =\n      (name.ns == ns!(svg) || name.ns == ns!(mathml)) && node.first_child.get().is_none();\n    if self_closing {\n      // If last attribute is not quoted, a space is required.\n      // Otherwise the / will be parsed as part of the attribute value.\n      if !quoted {\n        self.writer.write_all(b\" />\")?;\n      } else {\n        self.writer.write_all(b\"/>\")?;\n      }\n    } else {\n      self.writer.write_all(b\">\")?;\n    }\n\n    let ignore_children = name.ns == ns!(html)\n      && matches!(\n        name.local,\n        local_name!(\"area\")\n          | local_name!(\"base\")\n          | local_name!(\"basefont\")\n          | local_name!(\"bgsound\")\n          | local_name!(\"br\")\n          | local_name!(\"col\")\n          | local_name!(\"embed\")\n          | local_name!(\"frame\")\n          | local_name!(\"hr\")\n          | local_name!(\"img\")\n          | local_name!(\"input\")\n          | local_name!(\"keygen\")\n          | local_name!(\"link\")\n          | local_name!(\"meta\")\n          | local_name!(\"param\")\n          | local_name!(\"source\")\n          | local_name!(\"track\")\n          | local_name!(\"wbr\")\n      );\n\n    self.stack.push(ElemInfo {\n      html_name,\n      ignore_children: self_closing || ignore_children,\n    });\n\n    Ok(())\n  }\n\n  fn end_elem<'a>(&mut self, node: Ref<'a>, name: &QualName) -> io::Result<()> {\n    let info = match self.stack.pop() {\n      Some(info) => info,\n      None if self.opts.create_missing_parent => {\n        // warn!(\"missing ElemInfo, creating default.\");\n        Default::default()\n      }\n      _ => panic!(\"no ElemInfo\"),\n    };\n    if info.ignore_children {\n      return Ok(());\n    }\n\n    if can_omit_end_tag(node, name) {\n      return Ok(());\n    }\n\n    self.writer.write_all(b\"</\")?;\n    self.writer.write_all(tagname(&name).as_bytes())?;\n    self.writer.write_all(b\">\")\n  }\n\n  fn write_text(&mut self, text: &str) -> io::Result<()> {\n    let escape = match self.parent().html_name {\n      Some(local_name!(\"style\"))\n      | Some(local_name!(\"script\"))\n      | Some(local_name!(\"xmp\"))\n      | Some(local_name!(\"iframe\"))\n      | Some(local_name!(\"noembed\"))\n      | Some(local_name!(\"noframes\"))\n      | Some(local_name!(\"plaintext\")) => false,\n\n      Some(local_name!(\"noscript\")) => !self.opts.scripting_enabled,\n\n      _ => true,\n    };\n\n    if escape {\n      self.write_escaped(text, false)\n    } else {\n      self.writer.write_all(text.as_bytes())\n    }\n  }\n\n  fn write_comment(&mut self, text: &str) -> io::Result<()> {\n    self.writer.write_all(b\"<!--\")?;\n    self.writer.write_all(text.as_bytes())?;\n    self.writer.write_all(b\"-->\")\n  }\n\n  fn write_doctype(&mut self, name: &str) -> io::Result<()> {\n    self.writer.write_all(b\"<!DOCTYPE \")?;\n    self.writer.write_all(name.as_bytes())?;\n    self.writer.write_all(b\">\")\n  }\n\n  fn write_processing_instruction(&mut self, target: &str, data: &str) -> io::Result<()> {\n    self.writer.write_all(b\"<?\")?;\n    self.writer.write_all(target.as_bytes())?;\n    self.writer.write_all(b\" \")?;\n    self.writer.write_all(data.as_bytes())?;\n    self.writer.write_all(b\">\")\n  }\n}\n\n// https://html.spec.whatwg.org/multipage/syntax.html#optional-tags\nfn can_omit_start_tag(node: Ref<'_>, name: &QualName) -> bool {\n  match name.expanded() {\n    expanded_name!(html \"html\") => !node.first_child_is_comment(),\n    expanded_name!(html \"head\") => match node.first_child.get() {\n      None => true,\n      Some(first) => matches!(first.data, NodeData::Element { .. }),\n    },\n    expanded_name!(html \"body\") => match node.first_child.get() {\n      None => true,\n      Some(first) => {\n        !(matches!(first.data, NodeData::Comment { .. }) || first.starts_with_whitespace())\n          && !matches!(&node.data, NodeData::Element { name, .. }  if matches!(name.expanded(), expanded_name!(html \"meta\") | expanded_name!(html \"noscript\") | expanded_name!(html \"link\") | expanded_name!(html \"script\") | expanded_name!(html \"style\") | expanded_name!(html \"template\")))\n      }\n    },\n    expanded_name!(html \"colgroup\") => {\n      // A colgroup element's start tag may be omitted if the first thing inside the colgroup element is a col element,\n      // and if the element is not immediately preceded by another colgroup element whose end tag has been omitted.\n      // (It can't be omitted if the element is empty.)\n      if node.first_child_is(expanded_name!(html \"col\")) {\n        let prev_omitted = match node.previous_sibling.get() {\n          None => false,\n          Some(prev) => {\n            if let NodeData::Element { name, .. } = &prev.data {\n              name.expanded() == expanded_name!(html \"colgroup\") && can_omit_end_tag(prev, name)\n            } else {\n              false\n            }\n          }\n        };\n        !prev_omitted\n      } else {\n        false\n      }\n    }\n    expanded_name!(html \"tbody\") => {\n      // A tbody element's start tag may be omitted if the first thing inside the tbody element is a tr element,\n      // and if the element is not immediately preceded by a tbody, thead, or tfoot element whose end tag has\n      // been omitted. (It can't be omitted if the element is empty.)\n      if node.first_child_is(expanded_name!(html \"tr\")) {\n        let prev_omitted = match node.previous_sibling.get() {\n          None => false,\n          Some(prev) => {\n            if let NodeData::Element { name, .. } = &prev.data {\n              matches!(\n                name.expanded(),\n                expanded_name!(html \"tbody\")\n                  | expanded_name!(html \"thead\")\n                  | expanded_name!(html \"tfoot\")\n              ) && can_omit_end_tag(prev, name)\n            } else {\n              false\n            }\n          }\n        };\n        !prev_omitted\n      } else {\n        false\n      }\n    }\n    _ => false,\n  }\n}\n\n// https://html.spec.whatwg.org/multipage/syntax.html#optional-tags\nfn can_omit_end_tag(node: Ref<'_>, name: &QualName) -> bool {\n  match name.expanded() {\n    expanded_name!(html \"html\") => !node.next_sibling_is_comment(),\n    expanded_name!(html \"head\") => !node.next_sibling_is_comment_or_whitespace(),\n    expanded_name!(html \"body\") => !node.next_sibling_is_comment(),\n    expanded_name!(html \"li\") => {\n      node.is_last_child() || node.next_sibling_is(expanded_name!(html \"li\"))\n    }\n    expanded_name!(html \"dt\") => {\n      node.next_sibling_is(expanded_name!(html \"dt\"))\n        || node.next_sibling_is(expanded_name!(html \"dd\"))\n    }\n    expanded_name!(html \"dd\") => {\n      node.is_last_child()\n        || node.next_sibling_is(expanded_name!(html \"dd\"))\n        || node.next_sibling_is(expanded_name!(html \"dt\"))\n    }\n    expanded_name!(html \"p\") => match node.next_sibling.get() {\n      None => {\n        if let Some(parent) = node.parent.get() {\n          if let NodeData::Element { name, .. } = &parent.data {\n            !matches!(\n              name.expanded(),\n              expanded_name!(html \"a\")\n                | expanded_name!(html \"audio\")\n                | expanded_name!(html \"del\")\n                | expanded_name!(html \"ins\")\n                | expanded_name!(html \"map\")\n                | expanded_name!(html \"noscript\")\n                | expanded_name!(html \"video\")\n            ) || name.local.contains('-')\n          } else {\n            false\n          }\n        } else {\n          false\n        }\n      }\n      Some(next) => {\n        if let NodeData::Element { name, .. } = &next.data {\n          matches!(\n            name.expanded(),\n            expanded_name!(html \"address\")\n              | expanded_name!(html \"article\")\n              | expanded_name!(html \"aside\")\n              | expanded_name!(html \"blockquote\")\n              | expanded_name!(html \"details\")\n              | expanded_name!(html \"dialog\")\n              | expanded_name!(html \"div\")\n              | expanded_name!(html \"dl\")\n              | expanded_name!(html \"fieldset\")\n              | expanded_name!(html \"figcaption\")\n              | expanded_name!(html \"figure\")\n              | expanded_name!(html \"footer\")\n              | expanded_name!(html \"form\")\n              | expanded_name!(html \"h1\")\n              | expanded_name!(html \"h2\")\n              | expanded_name!(html \"h3\")\n              | expanded_name!(html \"h4\")\n              | expanded_name!(html \"h5\")\n              | expanded_name!(html \"h6\")\n              | expanded_name!(html \"header\")\n              | expanded_name!(html \"hgroup\")\n              | expanded_name!(html \"hr\")\n              | expanded_name!(html \"main\")\n              | expanded_name!(html \"menu\")\n              | expanded_name!(html \"nav\")\n              | expanded_name!(html \"ol\")\n              | expanded_name!(html \"p\")\n              | expanded_name!(html \"pre\")\n              | expanded_name!(html \"search\")\n              | expanded_name!(html \"section\")\n              | expanded_name!(html \"table\")\n              | expanded_name!(html \"ul\")\n          )\n        } else {\n          false\n        }\n      }\n    },\n    expanded_name!(html \"rt\") => {\n      node.is_last_child()\n        || node.next_sibling_is(expanded_name!(html \"rt\"))\n        || node.next_sibling_is(expanded_name!(html \"rp\"))\n    }\n    expanded_name!(html \"rp\") => {\n      node.is_last_child()\n        || node.next_sibling_is(expanded_name!(html \"rt\"))\n        || node.next_sibling_is(expanded_name!(html \"rp\"))\n    }\n    expanded_name!(html \"optgroup\") => {\n      node.is_last_child()\n        || node.next_sibling_is(expanded_name!(html \"optgroup\"))\n        || node.next_sibling_is(expanded_name!(html \"hr\"))\n    }\n    expanded_name!(html \"option\") => {\n      node.is_last_child()\n        || node.next_sibling_is(expanded_name!(html \"option\"))\n        || node.next_sibling_is(expanded_name!(html \"optgroup\"))\n        || node.next_sibling_is(expanded_name!(html \"hr\"))\n    }\n    expanded_name!(html \"colgroup\") => !node.next_sibling_is_comment_or_whitespace(),\n    expanded_name!(html \"caption\") => !node.next_sibling_is_comment_or_whitespace(),\n    expanded_name!(html \"thead\") => {\n      node.next_sibling_is(expanded_name!(html \"tbody\"))\n        || node.next_sibling_is(expanded_name!(html \"tfoot\"))\n    }\n    expanded_name!(html \"tbody\") => {\n      node.is_last_child()\n        || node.next_sibling_is(expanded_name!(html \"tbody\"))\n        || node.next_sibling_is(expanded_name!(html \"tfoot\"))\n    }\n    expanded_name!(html \"tfoot\") => node.is_last_child(),\n    expanded_name!(html \"tr\") => {\n      node.is_last_child() || node.next_sibling_is(expanded_name!(html \"tr\"))\n    }\n    expanded_name!(html \"td\") => {\n      node.is_last_child()\n        || node.next_sibling_is(expanded_name!(html \"td\"))\n        || node.next_sibling_is(expanded_name!(html \"th\"))\n    }\n    expanded_name!(html \"th\") => {\n      node.is_last_child()\n        || node.next_sibling_is(expanded_name!(html \"td\"))\n        || node.next_sibling_is(expanded_name!(html \"th\"))\n    }\n\n    _ => false,\n  }\n}\n\n#[cfg(test)]\nmod tests {\n  use super::*;\n  use crate::arena::Sink;\n  use html5ever::tendril::TendrilSink;\n  use html5ever::{ParseOpts, parse_document};\n  use typed_arena::Arena;\n\n  fn test(input: &str, expected: &str) {\n    let arena = Arena::new();\n    let dom = parse_document(Sink::new(&arena), ParseOpts::default())\n      .from_utf8()\n      .one(input.as_bytes());\n\n    let mut vec = Vec::new();\n    serialize(&mut vec, dom, SerializeOpts::default()).expect(\"Serialize error\");\n    assert_eq!(std::str::from_utf8(&vec).unwrap(), expected);\n\n    let arena = Arena::new();\n    let result = parse_document(Sink::new(&arena), ParseOpts::default())\n      .from_utf8()\n      .one(vec.as_slice());\n\n    assert_eq!(dom, result);\n  }\n\n  #[test]\n  fn test_serialize() {\n    test(\n      \"<!DOCTYPE HTML><html><head><title>Hello</title></head><body><p>Welcome to this example.</p></body></html>\",\n      \"<!DOCTYPE html><title>Hello</title><p>Welcome to this example.\",\n    );\n    test(\n      \"<!DOCTYPE HTML><html lang=\\\"en\\\"><head><title>Hello</title></head><body class=\\\"demo\\\"><p>Welcome to this example.</p></body></html>\",\n      \"<!DOCTYPE html><html lang=en><title>Hello</title><body class=demo><p>Welcome to this example.\",\n    );\n    test(\n      \"<!DOCTYPE HTML><html><!-- comment --><head><title>Hello</title></head><body><p>Welcome to this example.</p></body></html>\",\n      \"<!DOCTYPE html><html><!-- comment --><title>Hello</title><p>Welcome to this example.\",\n    );\n    test(\n      \"<!DOCTYPE HTML><html><head><title>Hello</title></head><body><p>Welcome to this example.</p></body></html><!-- comment -->\",\n      \"<!DOCTYPE html><title>Hello</title><p>Welcome to this example.</html><!-- comment -->\",\n    );\n    test(\"<html><head></head><body>Test</body></html>\", \"Test\");\n    test(\n      \"<html><head> <title>Test</title> </head><body>Test</body></html>\",\n      \"<head> <title>Test</title> Test\",\n    );\n    test(\n      \"<!DOCTYPE HTML><html><body><ul><li>Foo</li><li>Bar</li></ul></body></html>\",\n      \"<!DOCTYPE html><ul><li>Foo<li>Bar</ul>\",\n    );\n    test(\n      \"<!DOCTYPE HTML><html><body><dl><dt>Foo</dt><dd>Bar</dd><dt>Baz</dt><dd>Qux</dd></dl></body></html>\",\n      \"<!DOCTYPE html><dl><dt>Foo<dd>Bar<dt>Baz<dd>Qux</dl>\",\n    );\n    test(\n      \"<!DOCTYPE HTML><html><body><select><option>Foo</option><option>Bar</option></select></body></html>\",\n      \"<!DOCTYPE html><select><option>Foo<option>Bar</select>\",\n    );\n    test(\n      \"<!DOCTYPE HTML><html><body><table><caption>Test</caption><colgroup><col><col></colgroup><thead><tr><th>Foo</th><th>Bar</th></tr></thead><tbody><tr><td>A</td><td>B</td></tr><tr><td>A</td><td>B</td></tr></tbody></table></body></html>\",\n      \"<!DOCTYPE html><table><caption>Test<col><col><thead><tr><th>Foo<th>Bar<tbody><tr><td>A<td>B<tr><td>A<td>B</table>\",\n    );\n    test(\n      \"<template><div>test</div></template>\",\n      \"<template><div>test</div></template>\",\n    );\n  }\n\n  #[test]\n  fn test_attrs() {\n    test(\n      \"<button disabled=''>Test</button>\",\n      \"<button disabled>Test</button>\",\n    );\n    test(\n      \"<div class='foo bar'>Test</div>\",\n      \"<div class=\\\"foo bar\\\">Test</div>\",\n    );\n    test(\"<div class='foo'>Test</div>\", \"<div class=foo>Test</div>\");\n  }\n\n  #[test]\n  fn test_svg() {\n    test(\n      \"<body><svg><rect width=100 height=100></rect></svg></body>\",\n      \"<svg><rect width=100 height=100 /></svg>\",\n    );\n  }\n}\n"
  },
  {
    "path": "crates/html/src/serialize_xml.rs",
    "content": "// Copyright 2014-2017 The html5ever Project Developers. See the\n// COPYRIGHT file at the top-level directory of this distribution.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n// option. This file may not be copied, modified, or distributed\n// except according to those terms.\n\n// Modified from xml5ever to support self closing tags.\n\nuse crate::arena::{NodeData, Ref};\nuse std::io::{self, Write};\nuse xml5ever::tree_builder::NamespaceMap;\nuse xml5ever::{Attribute, QualName};\n\n/// Method for serializing generic node to a given writer.\npub fn serialize<'arena, Wr>(writer: Wr, node: Ref<'arena>) -> io::Result<()>\nwhere\n  Wr: Write,\n{\n  let mut ser = XmlSerializer::new(writer);\n  ser.serialize_node(node)\n}\n\n/// Struct used for serializing nodes into a text that other XML\n/// parses can read.\n///\n/// Serializer contains a set of functions (start_elem, end_elem...)\n/// that make parsing nodes easier.\npub struct XmlSerializer<Wr> {\n  writer: Wr,\n  namespace_stack: NamespaceMapStack,\n}\n\n#[derive(Debug)]\nstruct NamespaceMapStack(Vec<NamespaceMap>);\n\nimpl NamespaceMapStack {\n  fn new() -> NamespaceMapStack {\n    NamespaceMapStack(vec![])\n  }\n\n  fn push(&mut self, namespace: NamespaceMap) {\n    self.0.push(namespace);\n  }\n\n  fn pop(&mut self) {\n    self.0.pop();\n  }\n}\n\n/// Writes given text into the Serializer, escaping it,\n/// depending on where the text is written inside the tag or attribute value.\n///\n/// For example\n///```text\n///    <tag>'&-quotes'</tag>   becomes      <tag>'&amp;-quotes'</tag>\n///    <tag = \"'&-quotes'\">    becomes      <tag = \"&apos;&amp;-quotes&apos;\"\n///```\nfn write_to_buf_escaped<W: Write>(writer: &mut W, text: &str, attr_mode: bool) -> io::Result<()> {\n  for c in text.chars() {\n    match c {\n      '&' => writer.write_all(b\"&amp;\"),\n      '\\'' if attr_mode => writer.write_all(b\"&apos;\"),\n      '\"' if attr_mode => writer.write_all(b\"&quot;\"),\n      '<' if !attr_mode => writer.write_all(b\"&lt;\"),\n      '>' if !attr_mode => writer.write_all(b\"&gt;\"),\n      c => writer.write_fmt(format_args!(\"{c}\")),\n    }?;\n  }\n  Ok(())\n}\n\n#[inline]\nfn write_qual_name<W: Write>(writer: &mut W, name: &QualName) -> io::Result<()> {\n  if let Some(ref prefix) = name.prefix {\n    writer.write_all(prefix.as_bytes())?;\n    writer.write_all(b\":\")?;\n  }\n\n  writer.write_all(name.local.as_bytes())?;\n  Ok(())\n}\n\nimpl<Wr: Write> XmlSerializer<Wr> {\n  /// Creates a new Serializier from a writer and given serialization options.\n  pub fn new(writer: Wr) -> Self {\n    XmlSerializer {\n      writer,\n      namespace_stack: NamespaceMapStack::new(),\n    }\n  }\n\n  #[inline(always)]\n  fn qual_name(&mut self, name: &QualName) -> io::Result<()> {\n    self.find_or_insert_ns(name);\n    write_qual_name(&mut self.writer, name)\n  }\n\n  #[inline(always)]\n  fn qual_attr_name(&mut self, name: &QualName) -> io::Result<()> {\n    self.find_or_insert_ns(name);\n    write_qual_name(&mut self.writer, name)\n  }\n\n  fn find_uri(&self, name: &QualName) -> bool {\n    let mut found = false;\n    for stack in self.namespace_stack.0.iter().rev() {\n      if let Some(Some(el)) = stack.get(&name.prefix) {\n        found = *el == name.ns;\n        break;\n      }\n    }\n    found\n  }\n\n  fn find_or_insert_ns(&mut self, name: &QualName) {\n    if (name.prefix.is_some() || !name.ns.is_empty()) && !self.find_uri(name) {\n      if let Some(last_ns) = self.namespace_stack.0.last_mut() {\n        last_ns.insert(name);\n      }\n    }\n  }\n\n  fn serialize_node<'arena>(&mut self, node: Ref<'arena>) -> io::Result<()> {\n    match &node.data {\n      NodeData::Element {\n        name,\n        attrs,\n        template_contents,\n        ..\n      } => {\n        self.start_elem(node, name, &*attrs.borrow())?;\n\n        let mut child = node.first_child.get();\n        while let Some(n) = child {\n          self.serialize_node(n)?;\n          child = n.next_sibling.get();\n        }\n\n        if let Some(template_contents) = template_contents {\n          self.serialize_node(template_contents)?;\n        }\n\n        self.end_elem(node, name)?;\n      }\n      NodeData::Comment { contents } => {\n        self.write_comment(contents)?;\n      }\n      NodeData::Doctype { name, .. } => {\n        self.write_doctype(name)?;\n      }\n      NodeData::Document => {\n        let mut child = node.first_child.get();\n        while let Some(n) = child {\n          self.serialize_node(n)?;\n          child = n.next_sibling.get();\n        }\n      }\n      NodeData::ProcessingInstruction { target, contents } => {\n        self.write_processing_instruction(target, contents.borrow().as_ref())?;\n      }\n      NodeData::Text { contents } => {\n        self.write_text(contents.borrow().as_ref())?;\n      }\n    }\n    Ok(())\n  }\n\n  /// Serializes given start element into text. Start element contains\n  /// qualified name and an attributes iterator.\n  fn start_elem<'arena>(\n    &mut self,\n    node: Ref<'arena>,\n    name: &QualName,\n    attrs: &Vec<Attribute>,\n  ) -> io::Result<()> {\n    self.namespace_stack.push(NamespaceMap::empty());\n\n    self.writer.write_all(b\"<\")?;\n    self.qual_name(name)?;\n    for attr in attrs.iter() {\n      self.writer.write_all(b\" \")?;\n      self.qual_attr_name(&attr.name)?;\n      self.writer.write_all(b\"=\\\"\")?;\n      write_to_buf_escaped(&mut self.writer, &attr.value, true)?;\n      self.writer.write_all(b\"\\\"\")?;\n    }\n    if node.first_child.get().is_some() {\n      self.writer.write_all(b\">\")?;\n    } else {\n      self.writer.write_all(b\"/>\")?;\n    }\n    Ok(())\n  }\n\n  /// Serializes given end element into text.\n  fn end_elem<'arena>(&mut self, node: Ref<'arena>, name: &QualName) -> io::Result<()> {\n    self.namespace_stack.pop();\n    if node.first_child.get().is_none() {\n      return Ok(());\n    }\n    self.writer.write_all(b\"</\")?;\n    self.qual_name(&name)?;\n    self.writer.write_all(b\">\")\n  }\n\n  /// Serializes comment into text.\n  fn write_comment(&mut self, text: &str) -> io::Result<()> {\n    self.writer.write_all(b\"<!--\")?;\n    self.writer.write_all(text.as_bytes())?;\n    self.writer.write_all(b\"-->\")\n  }\n\n  /// Serializes given doctype\n  fn write_doctype(&mut self, name: &str) -> io::Result<()> {\n    self.writer.write_all(b\"<!DOCTYPE \")?;\n    self.writer.write_all(name.as_bytes())?;\n    self.writer.write_all(b\">\")\n  }\n\n  /// Serializes text for a node or an attributes.\n  fn write_text(&mut self, text: &str) -> io::Result<()> {\n    write_to_buf_escaped(&mut self.writer, text, false)\n  }\n\n  /// Serializes given processing instruction.\n  fn write_processing_instruction(&mut self, target: &str, data: &str) -> io::Result<()> {\n    self.writer.write_all(b\"<?\")?;\n    self.writer.write_all(target.as_bytes())?;\n    self.writer.write_all(b\" \")?;\n    self.writer.write_all(data.as_bytes())?;\n    self.writer.write_all(b\"?>\")\n  }\n}\n"
  },
  {
    "path": "crates/html/src/srcset.rs",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\nuse std::iter::Peekable;\n\n#[derive(Clone, Copy, Debug)]\nenum ParseState {\n  InDescriptor,\n  InParens,\n  AfterDescriptor,\n}\n\n#[derive(Clone, Debug, PartialEq)]\npub struct ImageSource {\n  pub url: String,\n  pub descriptor: Descriptor,\n}\n\n#[derive(Clone, Debug, PartialEq)]\npub struct Descriptor {\n  pub width: Option<u32>,\n  pub density: Option<f64>,\n}\n\nimpl std::fmt::Display for ImageSource {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    f.write_str(&self.url)?;\n    if self.descriptor.width.is_some() || self.descriptor.density.is_some() {\n      write!(f, \" {}\", self.descriptor)?;\n    }\n    Ok(())\n  }\n}\n\nimpl std::fmt::Display for Descriptor {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    if let Some(width) = self.width {\n      write!(f, \"{}w\", width)?;\n    }\n    if let Some(density) = self.density {\n      write!(f, \"{}x\", density)?;\n    }\n    Ok(())\n  }\n}\n\n/// Parse an `srcset` attribute:\n/// <https://html.spec.whatwg.org/multipage/#parsing-a-srcset-attribute>.\npub fn parse_srcset(input: &str) -> Vec<ImageSource> {\n  // > 1. Let input be the value passed to this algorithm.\n  // > 2. Let position be a pointer into input, initially pointing at the start of the string.\n  let mut current_index = 0;\n\n  // > 3. Let candidates be an initially empty source set.\n  let mut candidates = vec![];\n  while current_index < input.len() {\n    let remaining_string = &input[current_index..];\n\n    // > 4. Splitting loop: Collect a sequence of code points that are ASCII whitespace or\n    // > U+002C COMMA characters from input given position. If any U+002C COMMA\n    // > characters were collected, that is a parse error.\n    let mut collected_comma = false;\n    let (collected_characters, string_after_whitespace) =\n      collect_sequence_characters(remaining_string, |character| {\n        if *character == ',' {\n          collected_comma = true;\n        }\n        *character == ',' || character.is_ascii_whitespace()\n      });\n    if collected_comma {\n      return Vec::new();\n    }\n\n    // Add the length of collected whitespace, to find the start of the URL we are going\n    // to parse.\n    current_index += collected_characters.len();\n\n    // > 5. If position is past the end of input, return candidates.\n    if string_after_whitespace.is_empty() {\n      return candidates;\n    }\n\n    // 6. Collect a sequence of code points that are not ASCII whitespace from input\n    // given position, and let that be url.\n    let (url, _) =\n      collect_sequence_characters(string_after_whitespace, |c| !char::is_ascii_whitespace(c));\n\n    // Add the length of `url` that we will parse to advance the index of the next part\n    // of the string to prase.\n    current_index += url.len();\n\n    // 7. Let descriptors be a new empty list.\n    let mut descriptors = Vec::new();\n\n    // > 8. If url ends with U+002C (,), then:\n    // >    1. Remove all trailing U+002C COMMA characters from url. If this removed\n    // >       more than one character, that is a parse error.\n    if url.ends_with(',') {\n      let image_source = ImageSource {\n        url: url.trim_end_matches(',').into(),\n        descriptor: Descriptor {\n          width: None,\n          density: None,\n        },\n      };\n      candidates.push(image_source);\n      continue;\n    }\n\n    // Otherwise:\n    // > 8.1. Descriptor tokenizer: Skip ASCII whitespace within input given position.\n    let descriptors_string = &input[current_index..];\n    let (spaces, descriptors_string) =\n      collect_sequence_characters(descriptors_string, |character| {\n        character.is_ascii_whitespace()\n      });\n    current_index += spaces.len();\n\n    // > 8.2. Let current descriptor be the empty string.\n    let mut current_descriptor = String::new();\n\n    // > 8.3. Let state be \"in descriptor\".\n    let mut state = ParseState::InDescriptor;\n\n    // > 8.4. Let c be the character at position. Do the following depending on the value of\n    // > state. For the purpose of this step, \"EOF\" is a special character representing\n    // > that position is past the end of input.\n    let mut characters = descriptors_string.chars();\n    let mut character = characters.next();\n    if let Some(character) = character {\n      current_index += character.len_utf8();\n    }\n\n    loop {\n      match (state, character) {\n        (ParseState::InDescriptor, Some(character)) if character.is_ascii_whitespace() => {\n          // > If current descriptor is not empty, append current descriptor to\n          // > descriptors and let current descriptor be the empty string. Set\n          // > state to after descriptor.\n          if !current_descriptor.is_empty() {\n            descriptors.push(current_descriptor);\n            current_descriptor = String::new();\n            state = ParseState::AfterDescriptor;\n          }\n        }\n        (ParseState::InDescriptor, Some(',')) => {\n          // > Advance position to the next character in input. If current descriptor\n          // > is not empty, append current descriptor to descriptors. Jump to the\n          // > step labeled descriptor parser.\n          if !current_descriptor.is_empty() {\n            descriptors.push(current_descriptor);\n          }\n          break;\n        }\n        (ParseState::InDescriptor, Some('(')) => {\n          // > Append c to current descriptor. Set state to in parens.\n          current_descriptor.push('(');\n          state = ParseState::InParens;\n        }\n        (ParseState::InDescriptor, Some(character)) => {\n          // > Append c to current descriptor.\n          current_descriptor.push(character);\n        }\n        (ParseState::InDescriptor, None) => {\n          // > If current descriptor is not empty, append current descriptor to\n          // > descriptors. Jump to the step labeled descriptor parser.\n          if !current_descriptor.is_empty() {\n            descriptors.push(current_descriptor);\n          }\n          break;\n        }\n        (ParseState::InParens, Some(')')) => {\n          // > Append c to current descriptor. Set state to in descriptor.\n          current_descriptor.push(')');\n          state = ParseState::InDescriptor;\n        }\n        (ParseState::InParens, Some(character)) => {\n          // Append c to current descriptor.\n          current_descriptor.push(character);\n        }\n        (ParseState::InParens, None) => {\n          // > Append current descriptor to descriptors. Jump to the step\n          // > labeled descriptor parser.\n          descriptors.push(current_descriptor);\n          break;\n        }\n        (ParseState::AfterDescriptor, Some(character)) if character.is_ascii_whitespace() => {\n          // > Stay in this state.\n        }\n        (ParseState::AfterDescriptor, Some(_)) => {\n          // > Set state to in descriptor. Set position to the previous\n          // > character in input.\n          state = ParseState::InDescriptor;\n          continue;\n        }\n        (ParseState::AfterDescriptor, None) => {\n          // > Jump to the step labeled descriptor parser.\n          break;\n        }\n      }\n\n      character = characters.next();\n      if let Some(character) = character {\n        current_index += character.len_utf8();\n      }\n    }\n\n    // > 9. Descriptor parser: Let error be no.\n    let mut error = false;\n    // > 10. Let width be absent.\n    let mut width: Option<u32> = None;\n    // > 11. Let density be absent.\n    let mut density: Option<f64> = None;\n    // > 12. Let future-compat-h be absent.\n    let mut future_compat_h: Option<u32> = None;\n\n    // > 13. For each descriptor in descriptors, run the appropriate set of steps from\n    // > the following list:\n    for descriptor in descriptors.into_iter() {\n      let Some(last_character) = descriptor.chars().last() else {\n        break;\n      };\n\n      let first_part_of_string = &descriptor[0..descriptor.len() - last_character.len_utf8()];\n      match last_character {\n        // > If the descriptor consists of a valid non-negative integer followed by a\n        // > U+0077 LATIN SMALL LETTER W character\n        // > 1. If the user agent does not support the sizes attribute, let error be yes.\n        // > 2. If width and density are not both absent, then let error be yes.\n        // > 3. Apply the rules for parsing non-negative integers to the descriptor.\n        // >    If the result is 0, let error be yes. Otherwise, let width be the result.\n        'w' if density.is_none() && width.is_none() => {\n          match parse_integer(first_part_of_string.chars()) {\n            Ok(number) if number > 0 => {\n              width = Some(number as u32);\n              continue;\n            }\n            _ => error = true,\n          }\n        }\n\n        // > If the descriptor consists of a valid floating-point number followed by a\n        // > U+0078 LATIN SMALL LETTER X character\n        // > 1. If width, density and future-compat-h are not all absent, then let\n        // >    error be yes.\n        // > 2. Apply the rules for parsing floating-point number values to the\n        // >    descriptor. If the result is less than 0, let error be yes. Otherwise, let\n        // >    density be the result.\n        //\n        // The HTML specification has a procedure for parsing floats that is different enough from\n        // the one that stylo uses, that it's better to use Rust's float parser here. This is\n        // what Gecko does, but it also checks to see if the number is a valid HTML-spec compliant\n        // number first. Not doing that means that we might be parsing numbers that otherwise\n        // wouldn't parse.\n        // TODO: Do what Gecko does and first validate the number passed to the Rust float parser.\n        'x' if width.is_none() && density.is_none() && future_compat_h.is_none() => {\n          match first_part_of_string.parse::<f64>() {\n            Ok(number) if number.is_normal() && number > 0. => {\n              density = Some(number);\n              continue;\n            }\n            _ => error = true,\n          }\n        }\n\n        // > If the descriptor consists of a valid non-negative integer followed by a\n        // > U+0068 LATIN SMALL LETTER H character\n        // >   This is a parse error.\n        // > 1. If future-compat-h and density are not both absent, then let error be\n        // >    yes.\n        // > 2. Apply the rules for parsing non-negative integers to the descriptor.\n        // >    If the result is 0, let error be yes. Otherwise, let future-compat-h be the\n        // >    result.\n        'h' if future_compat_h.is_none() && density.is_none() => {\n          match parse_integer(first_part_of_string.chars()) {\n            Ok(number) if number > 0 => {\n              future_compat_h = Some(number as u32);\n              continue;\n            }\n            _ => error = true,\n          }\n        }\n\n        // > Anything else\n        // >  Let error be yes.\n        _ => error = true,\n      }\n\n      if error {\n        break;\n      }\n    }\n\n    // > 14. If future-compat-h is not absent and width is absent, let error be yes.\n    if future_compat_h.is_some() && width.is_none() {\n      error = true;\n    }\n\n    if !error {\n      let image_source = ImageSource {\n        url: url.into(),\n        descriptor: Descriptor { width, density },\n      };\n      candidates.push(image_source);\n    }\n  }\n  candidates\n}\n\nfn collect_sequence_characters(s: &str, mut predicate: impl FnMut(&char) -> bool) -> (&str, &str) {\n  let i = s.find(|ch| !predicate(&ch)).unwrap_or(s.len());\n  (&s[0..i], &s[i..])\n}\n\n/// A static slice of characters.\ntype StaticCharVec = &'static [char];\n\n/// A \"space character\" according to:\n///\n/// <https://html.spec.whatwg.org/multipage/#space-character>\nstatic HTML_SPACE_CHARACTERS: StaticCharVec =\n  &['\\u{0020}', '\\u{0009}', '\\u{000a}', '\\u{000c}', '\\u{000d}'];\n\n/// Parse an integer according to\n/// <https://html.spec.whatwg.org/multipage/#rules-for-parsing-integers> or\n/// <https://html.spec.whatwg.org/multipage/#rules-for-parsing-non-negative-integers>\nfn parse_integer<T: Iterator<Item = char>>(input: T) -> Result<i64, ()> {\n  let mut input = input\n    .skip_while(|c| HTML_SPACE_CHARACTERS.iter().any(|s| s == c))\n    .peekable();\n\n  let sign = match input.peek() {\n    None => return Err(()),\n    Some(&'-') => {\n      input.next();\n      -1\n    }\n    Some(&'+') => {\n      input.next();\n      1\n    }\n    Some(_) => 1,\n  };\n\n  let (value, _) = read_numbers(input);\n\n  value.and_then(|value| value.checked_mul(sign)).ok_or(())\n}\n\n/// Read a set of ascii digits and read them into a number.\nfn read_numbers<I: Iterator<Item = char>>(mut iter: Peekable<I>) -> (Option<i64>, usize) {\n  match iter.peek() {\n    Some(c) if is_ascii_digit(c) => (),\n    _ => return (None, 0),\n  }\n\n  iter\n    .take_while(is_ascii_digit)\n    .map(|d| d as i64 - '0' as i64)\n    .fold((Some(0i64), 0), |accumulator, d| {\n      let digits = accumulator\n        .0\n        .and_then(|accumulator| accumulator.checked_mul(10))\n        .and_then(|accumulator| accumulator.checked_add(d));\n      (digits, accumulator.1 + 1)\n    })\n}\n\n/// Character is ascii digit\nfn is_ascii_digit(c: &char) -> bool {\n  match *c {\n    '0'..='9' => true,\n    _ => false,\n  }\n}\n\npub fn serialize_srcset(srcset: Vec<ImageSource>) -> String {\n  use std::fmt::Write;\n\n  let mut res = String::with_capacity(srcset.len());\n  for img in srcset {\n    if !res.is_empty() {\n      res.push_str(\", \");\n    }\n    if write!(&mut res, \"{}\", img).is_err() {\n      break;\n    }\n  }\n\n  res\n}\n"
  },
  {
    "path": "crates/macros/Cargo.toml",
    "content": "[package]\nauthors = [\"Devon Govett <devongovett@gmail.com>\"]\nname = \"parcel-macros\"\nversion = \"0.1.0\"\nedition = \"2024\"\n\n[features]\nnapi = [\"dep:napi\", \"dep:napi-derive\", \"dep:crossbeam-channel\"]\n\n[dependencies]\nindexmap = \"1.9.2\"\nswc_core = { version = \"21\", features = [\n  \"common\",\n  \"common_sourcemap\",\n  \"ecma_ast\",\n  \"ecma_parser\",\n  \"ecma_visit\",\n  \"stacker\"\n] }\nserde = \"1.0.123\"\nnapi-derive = { version = \"2.12.5\", optional = true }\nnapi = { version =  \"2.16.4\", features = [\"serde-json\", \"napi4\", \"napi5\"], optional = true }\ncrossbeam-channel = { version = \"0.5.6\", optional = true }\n"
  },
  {
    "path": "crates/macros/src/lib.rs",
    "content": "#![deny(unused_crate_dependencies)]\n\nuse serde::{Deserialize, Serialize};\nuse std::{\n  collections::{HashMap, HashSet},\n  sync::Arc,\n};\nuse swc_core::ecma::utils::stack_size::maybe_grow_default;\n\nuse indexmap::IndexMap;\nuse swc_core::{\n  common::{DUMMY_SP, SourceMap, Span, sync::Lrc, util::take::Take},\n  ecma::{\n    ast::*,\n    atoms::Atom as JsWord,\n    parser::{Parser, StringInput, error::Error, lexer::Lexer},\n    visit::{Fold, FoldWith},\n  },\n};\n\n#[cfg(feature = \"napi\")]\npub mod napi;\n\n#[derive(PartialEq)]\npub enum MacroError {\n  /// Could not statically evaluate macro argument.\n  EvaluationError(Span),\n  /// An error occurred loading a macro (e.g. resolution or syntax error).\n  LoadError(String, Span),\n  /// An error was thrown when executing a macro.\n  ExecutionError(String, Span),\n  /// Could not parse the result of a function returned by a macro.\n  ParseError(Error),\n}\n\n#[derive(serde::Serialize)]\npub struct Location {\n  pub line: u32,\n  pub col: u32,\n}\n\npub type MacroCallback =\n  Arc<dyn Fn(String, String, Vec<JsValue>, Location) -> Result<JsValue, MacroError> + Send + Sync>;\n\npub struct Macros<'a> {\n  /// Mapping of imported identifiers to import metadata.\n  macros: HashMap<Id, MacroImport>,\n  evaluator: Evaluator<'a>,\n  callback: MacroCallback,\n  errors: &'a mut Vec<MacroError>,\n  load_errors: HashSet<String>,\n  assignment_span: Option<Span>,\n  in_call: bool,\n}\n\nstruct MacroImport {\n  /// The import specifier.\n  src: JsWord,\n  /// The imported identifier. None if this is a namespace import.\n  imported: Option<JsWord>,\n  /// The location of the import specifier.\n  span: Span,\n}\n\nimpl<'a> Macros<'a> {\n  pub fn new(\n    callback: MacroCallback,\n    source_map: &'a SourceMap,\n    errors: &'a mut Vec<MacroError>,\n  ) -> Self {\n    Macros {\n      macros: HashMap::new(),\n      evaluator: Evaluator::new(source_map),\n      load_errors: HashSet::new(),\n      callback,\n      errors,\n      assignment_span: None,\n      in_call: false,\n    }\n  }\n\n  fn add_macro(&mut self, import: &ImportDecl) {\n    for specifier in &import.specifiers {\n      match specifier {\n        ImportSpecifier::Named(named) => {\n          let imported = match &named.imported {\n            Some(ModuleExportName::Ident(id)) => id.sym.clone(),\n            Some(ModuleExportName::Str(s)) => s.value.clone(),\n            None => named.local.sym.clone(),\n          };\n          self.macros.insert(\n            named.local.to_id(),\n            MacroImport {\n              src: import.src.value.clone(),\n              imported: Some(imported),\n              span: import.span,\n            },\n          );\n        }\n        ImportSpecifier::Default(default) => {\n          self.macros.insert(\n            default.local.to_id(),\n            MacroImport {\n              src: import.src.value.clone(),\n              imported: Some(\"default\".into()),\n              span: import.span,\n            },\n          );\n        }\n        ImportSpecifier::Namespace(namespace) => {\n          self.macros.insert(\n            namespace.local.to_id(),\n            MacroImport {\n              src: import.src.value.clone(),\n              imported: None,\n              span: import.span,\n            },\n          );\n        }\n      }\n    }\n  }\n\n  fn call_macro(\n    &mut self,\n    src: String,\n    export: String,\n    call: CallExpr,\n    import_span: Span,\n  ) -> Result<Expr, MacroError> {\n    // If a macro already errorered during loading, don't try calling it again.\n    if self.load_errors.contains(&src) {\n      return Ok(Expr::Lit(Lit::Null(Null::dummy())));\n    }\n\n    // Try to statically evaluate all of the function arguments.\n    let mut args = Vec::with_capacity(call.args.len());\n    for arg in &call.args {\n      match self.evaluator.eval(&*arg.expr) {\n        Ok(val) => {\n          if arg.spread.is_none() {\n            args.push(val);\n          } else if let JsValue::Array(val) = val {\n            args.extend(val);\n          } else {\n            return Err(MacroError::EvaluationError(call.span));\n          }\n        }\n        Err(span) => {\n          return Err(MacroError::EvaluationError(span));\n        }\n      }\n    }\n\n    // If that was successful, call the function callback (on the JS thread).\n    let loc = self.evaluator.source_map.lookup_char_pos(call.span.lo);\n    let loc = Location {\n      line: loc.line as u32,\n      col: loc.col_display as u32,\n    };\n    match (self.callback)(src.clone(), export, args, loc) {\n      Ok(val) => Ok(self.evaluator.value_to_expr(val)?),\n      Err(err) => match err {\n        MacroError::LoadError(err, _) => {\n          self.load_errors.insert(src);\n          Err(MacroError::LoadError(err, import_span))\n        }\n        MacroError::ExecutionError(err, _) => Err(MacroError::ExecutionError(err, call.span)),\n        err => Err(err),\n      },\n    }\n  }\n}\n\nimpl<'a> Fold for Macros<'a> {\n  fn fold_module(&mut self, mut node: Module) -> Module {\n    // Pre-pass to find all macro imports.\n    node.body.retain(|item| {\n      if let ModuleItem::ModuleDecl(decl) = &item {\n        if let ModuleDecl::Import(import) = &decl {\n          if matches!(&import.with, Some(with) if is_macro(with)) {\n            self.add_macro(import);\n            return false;\n          }\n        }\n      }\n\n      true\n    });\n\n    // Only process the rest of the AST if we found any macro imports.\n    if !self.macros.is_empty() {\n      node = node.fold_children_with(self);\n    }\n\n    node\n  }\n\n  fn fold_expr(&mut self, node: Expr) -> Expr {\n    if let Expr::Call(call) = node {\n      if let Callee::Expr(expr) = &call.callee {\n        match &**expr {\n          Expr::Ident(ident) => {\n            if let Some(specifier) = self.macros.get(&ident.to_id()) {\n              if let Some(imported) = &specifier.imported {\n                let src = specifier.src.to_string();\n                let imported = imported.to_string();\n                let span = specifier.span;\n                let in_call = std::mem::take(&mut self.in_call);\n                let call = call.fold_with(self);\n                self.in_call = in_call;\n                return handle_error(self.call_macro(src, imported, call, span), &mut self.errors);\n              }\n            }\n          }\n          Expr::Member(member) => 'block: {\n            // e.g. ns.macro()\n            if let Expr::Ident(ident) = &*member.obj {\n              // Check that this is a namespace import.\n              if let Some(specifier @ MacroImport { imported: None, .. }) =\n                self.macros.get(&ident.to_id())\n              {\n                let imported = match &member.prop {\n                  MemberProp::Ident(id) => id.sym.to_string(),\n                  MemberProp::Computed(s) => {\n                    if let Ok(JsValue::String(s)) = self.evaluator.eval(&s.expr) {\n                      s\n                    } else {\n                      break 'block;\n                    }\n                  }\n                  MemberProp::PrivateName(_) => break 'block,\n                };\n\n                let src = specifier.src.to_string();\n                let span = specifier.span;\n                let in_call = std::mem::take(&mut self.in_call);\n                let call = call.fold_with(self);\n                self.in_call = in_call;\n                return handle_error(self.call_macro(src, imported, call, span), &mut self.errors);\n              }\n            }\n          }\n          _ => {}\n        }\n      }\n\n      // Not a macro. Track if we're in a call so we can error if constant\n      // objects are referenced that might be mutated.\n      self.in_call = true;\n      let call = call.fold_with(self);\n      self.in_call = false;\n      return Expr::Call(call);\n    }\n\n    maybe_grow_default(|| node.fold_children_with(self))\n  }\n\n  fn fold_var_decl(&mut self, mut node: VarDecl) -> VarDecl {\n    node = node.fold_children_with(self);\n\n    if node.kind == VarDeclKind::Const {\n      for decl in &node.decls {\n        if let Some(expr) = &decl.init {\n          let val = self.evaluator.eval(&*expr);\n          self.evaluator.eval_pat(val, &decl.name);\n        }\n      }\n    }\n\n    node\n  }\n\n  fn fold_assign_expr(&mut self, mut node: AssignExpr) -> AssignExpr {\n    self.assignment_span = Some(node.span.clone());\n    node.left = node.left.fold_with(self);\n    self.assignment_span = None;\n\n    node.right = node.right.fold_with(self);\n    node\n  }\n\n  fn fold_member_expr(&mut self, node: MemberExpr) -> MemberExpr {\n    if let Some(assignment_span) = self.assignment_span {\n      // Error when re-assigning a property of a constant that's used in a macro.\n      let node = node.fold_children_with(self);\n      if let Expr::Ident(id) = &*node.obj {\n        if let Some(constant) = self.evaluator.constants.get_mut(&id.to_id()) {\n          if constant.is_ok() {\n            *constant = Err(assignment_span.clone());\n          }\n        }\n      }\n\n      return node;\n    } else if self.in_call {\n      // We need to error when passing a constant object into a non-macro call, since it might be mutated.\n      // If the member expression evaluates to an object, continue traversing so we error in fold_ident.\n      // Otherwise, return early to allow other properties to be accessed without error.\n      let value = self\n        .evaluator\n        .eval(&*node.obj)\n        .and_then(|obj| self.evaluator.eval_member_prop(obj, &node));\n      if !matches!(\n        value,\n        Err(..) | Ok(JsValue::Object(..) | JsValue::Array(..))\n      ) {\n        return node;\n      }\n    }\n\n    node.fold_children_with(self)\n  }\n\n  fn fold_ident(&mut self, node: Ident) -> Ident {\n    if self.in_call {\n      if let Some(constant) = self.evaluator.constants.get_mut(&node.to_id()) {\n        if matches!(constant, Ok(JsValue::Object(..) | JsValue::Array(..))) {\n          // Mark access to constant object inside a call as an error since it could potentially be mutated.\n          *constant = Err(node.span.clone());\n        }\n      }\n    }\n\n    node\n  }\n}\n\n/// Checks if an object literal (from import attributes) has type: 'macro'.\nfn is_macro(with: &ObjectLit) -> bool {\n  for prop in &with.props {\n    if let PropOrSpread::Prop(prop) = &prop {\n      if let Prop::KeyValue(kv) = &**prop {\n        let k = match &kv.key {\n          PropName::Ident(IdentName { sym, .. }) | PropName::Str(Str { value: sym, .. }) => {\n            sym.clone()\n          }\n          _ => continue,\n        };\n        if &k == \"type\"\n          && matches!(&*kv.value, Expr::Lit(Lit::Str(Str { value, .. })) if value == \"macro\")\n        {\n          return true;\n        }\n      }\n    }\n  }\n\n  false\n}\n\nfn handle_error(result: Result<Expr, MacroError>, errors: &mut Vec<MacroError>) -> Expr {\n  match result {\n    Ok(expr) => expr,\n    Err(err) => {\n      if !errors.iter().any(|d| *d == err) {\n        errors.push(err);\n      }\n      Expr::Lit(Lit::Null(Null::dummy()))\n    }\n  }\n}\n\n/// A type that represents a basic JS value.\n#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]\n#[serde(untagged)]\npub enum JsValue {\n  Undefined,\n  Null,\n  Bool(bool),\n  Number(f64),\n  String(String),\n  Regex { source: String, flags: String },\n  Array(Vec<JsValue>),\n  Object(IndexMap<String, JsValue>),\n  Function(String),\n}\n\npub struct Evaluator<'a> {\n  pub constants: HashMap<Id, Result<JsValue, Span>>,\n  source_map: &'a SourceMap,\n}\n\nimpl<'a> Evaluator<'a> {\n  pub fn new(source_map: &'a SourceMap) -> Evaluator<'a> {\n    Evaluator {\n      constants: HashMap::new(),\n      source_map,\n    }\n  }\n\n  /// Statically evaluate a JS expression to a value, if possible.\n  pub fn eval(&self, expr: &Expr) -> Result<JsValue, Span> {\n    match expr.unwrap_parens() {\n      Expr::Lit(lit) => match lit {\n        Lit::Null(_) => Ok(JsValue::Null),\n        Lit::Bool(v) => Ok(JsValue::Bool(v.value)),\n        Lit::Num(v) => Ok(JsValue::Number(v.value)),\n        Lit::Str(v) => Ok(JsValue::String(v.value.to_string())),\n        Lit::JSXText(v) => Ok(JsValue::String(v.value.to_string())),\n        Lit::Regex(v) => Ok(JsValue::Regex {\n          source: v.exp.to_string(),\n          flags: v.flags.to_string(),\n        }),\n        Lit::BigInt(v) => Err(v.span),\n      },\n      Expr::Tpl(tpl) => {\n        let exprs: Vec<_> = tpl\n          .exprs\n          .iter()\n          .filter_map(|expr| self.eval(&*expr).ok())\n          .collect();\n        if exprs.len() == tpl.exprs.len() {\n          let mut res = String::new();\n          let mut expr_iter = exprs.iter();\n          for quasi in &tpl.quasis {\n            res.push_str(&quasi.raw);\n            match expr_iter.next() {\n              None => {}\n              Some(JsValue::String(s)) => res.push_str(s),\n              Some(JsValue::Number(n)) => res.push_str(&n.to_string()),\n              Some(JsValue::Bool(b)) => res.push_str(&b.to_string()),\n              _ => return Err(tpl.span),\n            }\n          }\n\n          Ok(JsValue::String(res))\n        } else {\n          Err(tpl.span)\n        }\n      }\n      Expr::Array(arr) => {\n        let mut res = Vec::with_capacity(arr.elems.len());\n        for elem in &arr.elems {\n          if let Some(elem) = elem {\n            let val = self.eval(&*elem.expr)?;\n            if elem.spread.is_some() {\n              match val {\n                JsValue::Array(arr) => {\n                  res.extend(arr);\n                }\n                _ => return Err(arr.span),\n              }\n            } else {\n              res.push(val);\n            }\n          } else {\n            res.push(JsValue::Undefined);\n          }\n        }\n        Ok(JsValue::Array(res))\n      }\n      Expr::Object(obj) => self.eval_object(obj),\n      Expr::Bin(bin) => match (bin.op, self.eval(&*bin.left), self.eval(&*bin.right)) {\n        (BinaryOp::Add, Ok(JsValue::String(a)), Ok(JsValue::String(b))) => {\n          Ok(JsValue::String(format!(\"{}{}\", a, b)))\n        }\n        (BinaryOp::Add, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(a + b))\n        }\n        (BinaryOp::Add, Ok(JsValue::String(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::String(format!(\"{}{}\", a, b)))\n        }\n        (BinaryOp::Add, Ok(JsValue::Number(a)), Ok(JsValue::String(b))) => {\n          Ok(JsValue::String(format!(\"{}{}\", a, b)))\n        }\n        (BinaryOp::BitAnd, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(((a as i32) & (b as i32)) as f64))\n        }\n        (BinaryOp::BitOr, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(((a as i32) | (b as i32)) as f64))\n        }\n        (BinaryOp::BitXor, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(((a as i32) ^ (b as i32)) as f64))\n        }\n        (BinaryOp::LShift, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(((a as i32) << (b as i32)) as f64))\n        }\n        (BinaryOp::RShift, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(((a as i32) >> (b as i32)) as f64))\n        }\n        (BinaryOp::ZeroFillRShift, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(((a as i32) >> (b as u32)) as f64))\n        }\n        (BinaryOp::Sub, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(a - b))\n        }\n        (BinaryOp::Div, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(a / b))\n        }\n        (BinaryOp::Mul, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(a * b))\n        }\n        (BinaryOp::Mod, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(a % b))\n        }\n        (BinaryOp::Exp, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Number(a.powf(b)))\n        }\n        (BinaryOp::EqEq, Ok(JsValue::Bool(a)), Ok(JsValue::Bool(b))) => Ok(JsValue::Bool(a == b)),\n        (BinaryOp::EqEqEq, Ok(JsValue::Bool(a)), Ok(JsValue::Bool(b))) => Ok(JsValue::Bool(a == b)),\n        (BinaryOp::NotEq, Ok(JsValue::Bool(a)), Ok(JsValue::Bool(b))) => Ok(JsValue::Bool(a != b)),\n        (BinaryOp::NotEqEq, Ok(JsValue::Bool(a)), Ok(JsValue::Bool(b))) => {\n          Ok(JsValue::Bool(a != b))\n        }\n        (BinaryOp::EqEq, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Bool(a == b))\n        }\n        (BinaryOp::EqEqEq, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Bool(a == b))\n        }\n        (BinaryOp::NotEq, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Bool(a != b))\n        }\n        (BinaryOp::NotEqEq, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Bool(a != b))\n        }\n        (BinaryOp::EqEq, Ok(JsValue::String(a)), Ok(JsValue::String(b))) => {\n          Ok(JsValue::Bool(a == b))\n        }\n        (BinaryOp::EqEqEq, Ok(JsValue::String(a)), Ok(JsValue::String(b))) => {\n          Ok(JsValue::Bool(a == b))\n        }\n        (BinaryOp::NotEq, Ok(JsValue::String(a)), Ok(JsValue::String(b))) => {\n          Ok(JsValue::Bool(a != b))\n        }\n        (BinaryOp::NotEqEq, Ok(JsValue::String(a)), Ok(JsValue::String(b))) => {\n          Ok(JsValue::Bool(a != b))\n        }\n        (BinaryOp::Gt, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => Ok(JsValue::Bool(a > b)),\n        (BinaryOp::GtEq, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Bool(a >= b))\n        }\n        (BinaryOp::Lt, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => Ok(JsValue::Bool(a < b)),\n        (BinaryOp::LtEq, Ok(JsValue::Number(a)), Ok(JsValue::Number(b))) => {\n          Ok(JsValue::Bool(a <= b))\n        }\n        (BinaryOp::LogicalAnd, Ok(JsValue::Bool(a)), Ok(JsValue::Bool(b))) => {\n          Ok(JsValue::Bool(a && b))\n        }\n        (BinaryOp::LogicalOr, Ok(JsValue::Bool(a)), Ok(JsValue::Bool(b))) => {\n          Ok(JsValue::Bool(a || b))\n        }\n        (BinaryOp::NullishCoalescing, Ok(JsValue::Null | JsValue::Undefined), Ok(b)) => Ok(b),\n        (BinaryOp::NullishCoalescing, Ok(a), Ok(_)) => Ok(a),\n        _ => Err(bin.span),\n      },\n      Expr::Unary(unary) => match (unary.op, self.eval(&*unary.arg)) {\n        (UnaryOp::Bang, Ok(JsValue::Bool(v))) => Ok(JsValue::Bool(!v)),\n        (UnaryOp::Minus, Ok(JsValue::Number(v))) => Ok(JsValue::Number(-v)),\n        (UnaryOp::Plus, Ok(JsValue::Number(v))) => Ok(JsValue::Number(v)),\n        (UnaryOp::Plus, Ok(JsValue::String(v))) => {\n          if let Ok(v) = v.parse() {\n            Ok(JsValue::Number(v))\n          } else {\n            Err(unary.span)\n          }\n        }\n        (UnaryOp::Tilde, Ok(JsValue::Number(v))) => Ok(JsValue::Number((!(v as i32)) as f64)),\n        (UnaryOp::Void, Ok(_)) => Ok(JsValue::Undefined),\n        (UnaryOp::TypeOf, Ok(JsValue::Bool(_))) => Ok(JsValue::String(\"boolean\".to_string())),\n        (UnaryOp::TypeOf, Ok(JsValue::Number(_))) => Ok(JsValue::String(\"number\".to_string())),\n        (UnaryOp::TypeOf, Ok(JsValue::String(_))) => Ok(JsValue::String(\"string\".to_string())),\n        (UnaryOp::TypeOf, Ok(JsValue::Object(_))) => Ok(JsValue::String(\"object\".to_string())),\n        (UnaryOp::TypeOf, Ok(JsValue::Array(_))) => Ok(JsValue::String(\"object\".to_string())),\n        (UnaryOp::TypeOf, Ok(JsValue::Regex { .. })) => Ok(JsValue::String(\"object\".to_string())),\n        (UnaryOp::TypeOf, Ok(JsValue::Null)) => Ok(JsValue::String(\"object\".to_string())),\n        (UnaryOp::TypeOf, Ok(JsValue::Undefined)) => Ok(JsValue::String(\"undefined\".to_string())),\n        _ => Err(unary.span),\n      },\n      Expr::Cond(cond) => match self.eval(&*&cond.test) {\n        Ok(JsValue::Bool(v)) => {\n          if v {\n            self.eval(&*&cond.cons)\n          } else {\n            self.eval(&*cond.alt)\n          }\n        }\n        Ok(JsValue::Null) | Ok(JsValue::Undefined) => self.eval(&*cond.alt),\n        Ok(JsValue::Object(_))\n        | Ok(JsValue::Array(_))\n        | Ok(JsValue::Function(_))\n        | Ok(JsValue::Regex { .. }) => self.eval(&*cond.cons),\n        Ok(JsValue::String(s)) => {\n          if s.is_empty() {\n            self.eval(&*cond.alt)\n          } else {\n            self.eval(&*cond.cons)\n          }\n        }\n        Ok(JsValue::Number(n)) => {\n          if n == 0.0 {\n            self.eval(&*cond.alt)\n          } else {\n            self.eval(&*cond.cons)\n          }\n        }\n        Err(e) => Err(e),\n      },\n      Expr::Ident(id) if &id.sym == \"undefined\" => Ok(JsValue::Undefined),\n      Expr::Ident(id) => {\n        if let Some(val) = self.constants.get(&id.to_id()) {\n          val.clone()\n        } else {\n          Err(id.span)\n        }\n      }\n      Expr::Member(member) => {\n        let obj = self.eval(&*member.obj)?;\n        self.eval_member_prop(obj, &member)\n      }\n      Expr::OptChain(opt) => {\n        if let OptChainBase::Member(member) = &*opt.base {\n          let obj = self.eval(&*member.obj)?;\n          match obj {\n            JsValue::Undefined | JsValue::Null => Ok(JsValue::Undefined),\n            _ => self.eval_member_prop(obj, &member),\n          }\n        } else {\n          Err(opt.span)\n        }\n      }\n      Expr::TsAs(TsAsExpr { expr, .. })\n      | Expr::TsNonNull(TsNonNullExpr { expr, .. })\n      | Expr::TsSatisfies(TsSatisfiesExpr { expr, .. })\n      | Expr::TsTypeAssertion(TsTypeAssertion { expr, .. })\n      | Expr::TsInstantiation(TsInstantiation { expr, .. })\n      | Expr::TsConstAssertion(TsConstAssertion { expr, .. }) => self.eval(expr),\n      Expr::Fn(FnExpr { function, .. }) => Err(function.span),\n      Expr::Class(ClassExpr { class, .. }) => Err(class.span),\n      Expr::JSXElement(el) => Err(el.span),\n      Expr::This(ThisExpr { span, .. })\n      | Expr::Update(UpdateExpr { span, .. })\n      | Expr::Assign(AssignExpr { span, .. })\n      | Expr::Call(CallExpr { span, .. })\n      | Expr::New(NewExpr { span, .. })\n      | Expr::Seq(SeqExpr { span, .. })\n      | Expr::TaggedTpl(TaggedTpl { span, .. })\n      | Expr::Arrow(ArrowExpr { span, .. })\n      | Expr::Yield(YieldExpr { span, .. })\n      | Expr::Await(AwaitExpr { span, .. })\n      | Expr::JSXFragment(JSXFragment { span, .. })\n      | Expr::PrivateName(PrivateName { span, .. })\n      | Expr::SuperProp(SuperPropExpr { span, .. })\n      | Expr::MetaProp(MetaPropExpr { span, .. }) => Err(*span),\n      _ => Err(DUMMY_SP),\n    }\n  }\n\n  pub fn eval_object(&self, obj: &ObjectLit) -> Result<JsValue, Span> {\n    let mut res = IndexMap::with_capacity(obj.props.len());\n    for prop in &obj.props {\n      match prop {\n        PropOrSpread::Prop(prop) => match &**prop {\n          Prop::KeyValue(kv) => {\n            let v = self.eval(&*kv.value)?;\n            let k = match &kv.key {\n              PropName::Ident(IdentName { sym, .. }) | PropName::Str(Str { value: sym, .. }) => {\n                sym.to_string()\n              }\n              PropName::Num(n) => n.value.to_string(),\n              PropName::Computed(c) => match self.eval(&*c.expr) {\n                Err(e) => return Err(e),\n                Ok(JsValue::String(s)) => s,\n                Ok(JsValue::Number(n)) => n.to_string(),\n                Ok(JsValue::Bool(b)) => b.to_string(),\n                _ => return Err(c.span),\n              },\n              PropName::BigInt(v) => return Err(v.span),\n            };\n\n            res.insert(k.to_string(), v);\n          }\n          Prop::Shorthand(s) => {\n            if let Some(val) = self.constants.get(&s.to_id()) {\n              res.insert(s.sym.to_string(), val.clone()?);\n            } else {\n              return Err(s.span);\n            }\n          }\n          _ => return Err(obj.span),\n        },\n        PropOrSpread::Spread(spread) => {\n          let v = self.eval(&*spread.expr)?;\n          match v {\n            JsValue::Object(o) => res.extend(o),\n            _ => return Err(obj.span),\n          }\n        }\n      }\n    }\n    Ok(JsValue::Object(res))\n  }\n\n  pub fn eval_member_prop(&self, obj: JsValue, member: &MemberExpr) -> Result<JsValue, Span> {\n    match &member.prop {\n      MemberProp::Ident(id) => obj.get_id(id.as_ref()).ok_or(member.span),\n      MemberProp::Computed(prop) => {\n        let k = self.eval(&*prop.expr)?;\n        obj.get(&k).ok_or(prop.span)\n      }\n      _ => Err(member.span),\n    }\n  }\n\n  /// Convert JS value to AST.\n  pub fn value_to_expr(&self, value: JsValue) -> Result<Expr, MacroError> {\n    Ok(match value {\n      JsValue::Null => Expr::Lit(Lit::Null(Null::dummy())),\n      JsValue::Undefined => Expr::Ident(Ident::new_no_ctxt(\"undefined\".into(), DUMMY_SP)),\n      JsValue::Bool(b) => Expr::Lit(Lit::Bool(Bool {\n        value: b,\n        span: DUMMY_SP,\n      })),\n      JsValue::Number(n) => Expr::Lit(Lit::Num(Number {\n        value: n,\n        span: DUMMY_SP,\n        raw: None,\n      })),\n      JsValue::String(s) => Expr::Lit(Lit::Str(Str {\n        span: DUMMY_SP,\n        value: s.into(),\n        raw: None,\n      })),\n      JsValue::Regex { source, flags } => Expr::Lit(Lit::Regex(Regex {\n        span: DUMMY_SP,\n        exp: source.into(),\n        flags: flags.into(),\n      })),\n      JsValue::Array(arr) => Expr::Array(ArrayLit {\n        span: DUMMY_SP,\n        elems: arr\n          .into_iter()\n          .map(|elem| -> Result<_, MacroError> {\n            Ok(Some(ExprOrSpread {\n              spread: None,\n              expr: Box::new(self.value_to_expr(elem)?),\n            }))\n          })\n          .collect::<Result<Vec<_>, MacroError>>()?,\n      }),\n      JsValue::Object(obj) => Expr::Object(ObjectLit {\n        span: DUMMY_SP,\n        props: obj\n          .into_iter()\n          .map(|(k, v)| -> Result<_, MacroError> {\n            Ok(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp {\n              key: if Ident::verify_symbol(&k).is_ok() {\n                PropName::Ident(IdentName::new(k.into(), DUMMY_SP))\n              } else {\n                PropName::Str(Str {\n                  value: k.into(),\n                  span: DUMMY_SP,\n                  raw: None,\n                })\n              },\n              value: Box::new(self.value_to_expr(v)?),\n            }))))\n          })\n          .collect::<Result<Vec<_>, MacroError>>()?,\n      }),\n      JsValue::Function(source) => {\n        let source_file = self.source_map.new_source_file(\n          Lrc::new(swc_core::common::FileName::MacroExpansion),\n          source.into(),\n        );\n        let lexer = Lexer::new(\n          Default::default(),\n          Default::default(),\n          StringInput::from(&*source_file),\n          None,\n        );\n\n        let mut parser = Parser::new_from(lexer);\n        match parser.parse_expr() {\n          Ok(expr) => *expr,\n          Err(err) => return Err(MacroError::ParseError(err)),\n        }\n      }\n    })\n  }\n\n  pub fn eval_pat(&mut self, value: Result<JsValue, Span>, pat: &Pat) {\n    match pat {\n      Pat::Ident(name) => {\n        self.constants.insert(name.to_id(), value);\n      }\n      Pat::Array(arr) => {\n        for (index, elem) in arr.elems.iter().enumerate() {\n          if let Some(elem) = elem {\n            match elem {\n              Pat::Array(ArrayPat { span, .. })\n              | Pat::Object(ObjectPat { span, .. })\n              | Pat::Ident(BindingIdent {\n                id: Ident { span, .. },\n                ..\n              }) => self.eval_pat(\n                value\n                  .as_ref()\n                  .and_then(|v| v.get_index(index).ok_or(span))\n                  .map_err(|s| *s),\n                elem,\n              ),\n              Pat::Rest(rest) => self.eval_pat(\n                value\n                  .as_ref()\n                  .and_then(|v| v.rest(index).ok_or(&rest.span))\n                  .map_err(|s| *s),\n                &*rest.arg,\n              ),\n              Pat::Assign(assign) => self.eval_pat(\n                value.as_ref().map_err(|e| *e).and_then(|v| {\n                  v.get_index(index)\n                    .ok_or(assign.span)\n                    .or_else(|_| self.eval(&*assign.right))\n                }),\n                &*assign.left,\n              ),\n              _ => {}\n            }\n          }\n        }\n      }\n      Pat::Object(obj) => {\n        let mut consumed = HashSet::new();\n        for prop in &obj.props {\n          match prop {\n            ObjectPatProp::KeyValue(kv) => {\n              let val = value\n                .as_ref()\n                .map_err(|e| *e)\n                .and_then(|value| match &kv.key {\n                  PropName::Ident(id) => {\n                    consumed.insert(id.sym.clone());\n                    value.get_id(id.sym.as_str()).ok_or(id.span)\n                  }\n                  PropName::Str(s) => {\n                    consumed.insert(s.value.clone());\n                    value.get_id(s.value.as_str()).ok_or(s.span)\n                  }\n                  PropName::Num(n) => {\n                    consumed.insert(n.value.to_string().into());\n                    value.get_index(n.value as usize).ok_or(n.span)\n                  }\n                  PropName::Computed(c) => {\n                    let k = &self.eval(&*c.expr)?;\n                    match k {\n                      JsValue::String(s) => {\n                        consumed.insert(s.clone().into());\n                      }\n                      JsValue::Number(n) => {\n                        consumed.insert(n.to_string().into());\n                      }\n                      _ => {}\n                    }\n                    value.get(&k).ok_or(c.span)\n                  }\n                  PropName::BigInt(v) => Err(v.span),\n                });\n              self.eval_pat(val, &*kv.value)\n            }\n            ObjectPatProp::Assign(assign) => {\n              let val = value.as_ref().map_err(|e| *e).and_then(|value| {\n                value\n                  .get_id(assign.key.sym.as_str())\n                  .ok_or(assign.span)\n                  .or_else(|_| {\n                    assign\n                      .value\n                      .as_ref()\n                      .map_or(Err(assign.span), |v| self.eval(&*v))\n                  })\n              });\n              self.constants.insert(assign.key.to_id(), val);\n              consumed.insert(assign.key.sym.clone());\n            }\n            ObjectPatProp::Rest(rest) => {\n              let val = value.as_ref().map_err(|e| *e).and_then(|value| {\n                if let JsValue::Object(obj) = value {\n                  let filtered = obj\n                    .iter()\n                    .filter(|(k, _)| !consumed.contains(&k.as_str().into()))\n                    .map(|(k, v)| (k.clone(), v.clone()))\n                    .collect();\n                  Ok(JsValue::Object(filtered))\n                } else {\n                  Err(rest.span)\n                }\n              });\n              self.eval_pat(val, &*rest.arg);\n            }\n          }\n        }\n      }\n      _ => {}\n    }\n  }\n}\n\nimpl JsValue {\n  fn get(&self, prop: &JsValue) -> Option<JsValue> {\n    match self {\n      JsValue::Array(arr) => {\n        if let JsValue::Number(n) = prop {\n          arr.get(*n as usize).cloned()\n        } else {\n          None\n        }\n      }\n      JsValue::Object(_) => match prop {\n        JsValue::Number(n) => {\n          let index = n.to_string();\n          self.get_id(&index)\n        }\n        JsValue::String(s) => self.get_id(s),\n        _ => None,\n      },\n      JsValue::String(s) => match prop {\n        JsValue::String(prop) => self.get_id(prop),\n        JsValue::Number(n) => s\n          .get(*n as usize..=*n as usize)\n          .map(|c| JsValue::String(c.to_owned())),\n        _ => None,\n      },\n      _ => None,\n    }\n  }\n\n  fn get_index(&self, index: usize) -> Option<JsValue> {\n    if let JsValue::Array(arr) = self {\n      arr.get(index).cloned()\n    } else {\n      None\n    }\n  }\n\n  fn get_id(&self, prop: &str) -> Option<JsValue> {\n    match self {\n      JsValue::Object(obj) => obj.get(prop).cloned(),\n      JsValue::String(s) => match prop {\n        \"length\" => Some(JsValue::Number(s.len() as f64)),\n        _ => None,\n      },\n      _ => None,\n    }\n  }\n\n  fn rest(&self, index: usize) -> Option<JsValue> {\n    if let JsValue::Array(arr) = self {\n      arr.get(index..).map(|s| JsValue::Array(s.to_vec()))\n    } else {\n      None\n    }\n  }\n}\n"
  },
  {
    "path": "crates/macros/src/napi.rs",
    "content": "use std::sync::Arc;\n\nuse crossbeam_channel::{Receiver, Sender};\nuse indexmap::IndexMap;\nuse napi::{\n  Env, JsBoolean, JsFunction, JsNumber, JsObject, JsString, JsUnknown, ValueType,\n  threadsafe_function::{ThreadSafeCallContext, ThreadsafeFunctionCallMode},\n};\nuse napi_derive::napi;\nuse swc_core::common::DUMMY_SP;\n\nuse crate::{JsValue, Location, MacroCallback, MacroError};\n\nstruct CallMacroMessage {\n  src: String,\n  export: String,\n  args: Vec<JsValue>,\n  loc: Location,\n}\n\n#[napi(object)]\nstruct JsMacroError {\n  pub kind: u32,\n  pub message: String,\n}\n\n// Allocate a single channel per thread to communicate with the JS thread.\nthread_local! {\n  static CHANNEL: (Sender<Result<JsValue, MacroError>>, Receiver<Result<JsValue, MacroError>>) = crossbeam_channel::unbounded();\n}\n\n/// Creates a macro callback from a JS function.\npub fn create_macro_callback(function: JsFunction, env: Env) -> napi::Result<MacroCallback> {\n  let call_macro_tsfn = env.create_threadsafe_function(\n    &function,\n    0,\n    |ctx: ThreadSafeCallContext<CallMacroMessage>| {\n      let src = ctx.env.create_string(&ctx.value.src)?.into_unknown();\n      let export = ctx.env.create_string(&ctx.value.export)?.into_unknown();\n      let args = js_value_to_napi(JsValue::Array(ctx.value.args), ctx.env)?;\n      let loc = ctx.env.to_js_value(&ctx.value.loc)?;\n      Ok(vec![src, export, args, loc])\n    },\n  )?;\n\n  // Get around Env not being Send. See safety note below.\n  let unsafe_env = env.raw() as usize;\n\n  Ok(Arc::new(move |src, export, args, loc| {\n    CHANNEL.with(|channel| {\n      // Call JS function to run the macro.\n      let tx = channel.0.clone();\n      call_macro_tsfn.call_with_return_value(\n        Ok(CallMacroMessage {\n          src,\n          export,\n          args,\n          loc,\n        }),\n        ThreadsafeFunctionCallMode::Blocking,\n        move |v: JsUnknown| {\n          // When the JS function returns, await the promise, and send the result\n          // through the channel back to the native thread.\n          // SAFETY: this function is called from the JS thread.\n          await_promise(unsafe { Env::from_raw(unsafe_env as _) }, v, tx)?;\n          Ok(())\n        },\n      );\n      // Lock the transformer thread until the JS thread returns a result.\n      channel.1.recv().expect(\"receive failure\")\n    })\n  }))\n}\n\n/// Convert a JsValue macro argument from the transformer to a napi value.\nfn js_value_to_napi(value: JsValue, env: Env) -> napi::Result<napi::JsUnknown> {\n  match value {\n    JsValue::Undefined => Ok(env.get_undefined()?.into_unknown()),\n    JsValue::Null => Ok(env.get_null()?.into_unknown()),\n    JsValue::Bool(b) => Ok(env.get_boolean(b)?.into_unknown()),\n    JsValue::Number(n) => Ok(env.create_double(n)?.into_unknown()),\n    JsValue::String(s) => Ok(env.create_string_from_std(s)?.into_unknown()),\n    JsValue::Regex { source, flags } => {\n      let regexp_class: JsFunction = env.get_global()?.get_named_property(\"RegExp\")?;\n      let source = env.create_string_from_std(source)?;\n      let flags = env.create_string_from_std(flags)?;\n      let re = regexp_class.new_instance(&[source, flags])?;\n      Ok(re.into_unknown())\n    }\n    JsValue::Array(arr) => {\n      let mut res = env.create_array(arr.len() as u32)?;\n      for (i, val) in arr.into_iter().enumerate() {\n        res.set(i as u32, js_value_to_napi(val, env)?)?;\n      }\n      Ok(res.coerce_to_object()?.into_unknown())\n    }\n    JsValue::Object(obj) => {\n      let mut res = env.create_object()?;\n      for (k, v) in obj {\n        res.set_named_property(&k, js_value_to_napi(v, env)?)?;\n      }\n      Ok(res.into_unknown())\n    }\n    JsValue::Function(_) => {\n      // Functions can only be returned from macros, not passed in.\n      unreachable!()\n    }\n  }\n}\n\n/// Convert a napi value returned as a result of a macro to a JsValue for the transformer.\nfn napi_to_js_value(value: napi::JsUnknown, env: Env) -> napi::Result<JsValue> {\n  match value.get_type()? {\n    ValueType::Undefined => Ok(JsValue::Undefined),\n    ValueType::Null => Ok(JsValue::Null),\n    ValueType::Number => Ok(JsValue::Number(\n      unsafe { value.cast::<JsNumber>() }.get_double()?,\n    )),\n    ValueType::Boolean => Ok(JsValue::Bool(\n      unsafe { value.cast::<JsBoolean>() }.get_value()?,\n    )),\n    ValueType::String => Ok(JsValue::String(\n      unsafe { value.cast::<JsString>() }\n        .into_utf8()?\n        .into_owned()?,\n    )),\n    ValueType::Object => {\n      let obj = unsafe { value.cast::<JsObject>() };\n      if obj.is_array()? {\n        let len = obj.get_array_length()?;\n        let mut arr = Vec::with_capacity(len as usize);\n        for i in 0..len {\n          let elem = napi_to_js_value(obj.get_element(i)?, env)?;\n          arr.push(elem);\n        }\n        Ok(JsValue::Array(arr))\n      } else {\n        let regexp_class: JsFunction = env.get_global()?.get_named_property(\"RegExp\")?;\n        if obj.instanceof(regexp_class)? {\n          let source: JsString = obj.get_named_property(\"source\")?;\n          let flags: JsString = obj.get_named_property(\"flags\")?;\n          return Ok(JsValue::Regex {\n            source: source.into_utf8()?.into_owned()?,\n            flags: flags.into_utf8()?.into_owned()?,\n          });\n        }\n\n        let names = obj.get_property_names()?;\n        let len = names.get_array_length()?;\n        let mut props = IndexMap::with_capacity(len as usize);\n        for i in 0..len {\n          let prop = names.get_element::<JsString>(i)?;\n          let name = prop.into_utf8()?.into_owned()?;\n          let value = napi_to_js_value(obj.get_property(prop)?, env)?;\n          props.insert(name, value);\n        }\n        Ok(JsValue::Object(props))\n      }\n    }\n    ValueType::Function => {\n      let f = unsafe { value.cast::<JsFunction>() };\n      let source = f.coerce_to_string()?.into_utf8()?.into_owned()?;\n      Ok(JsValue::Function(source))\n    }\n    ValueType::Symbol | ValueType::External | ValueType::Unknown => Err(napi::Error::new(\n      napi::Status::GenericFailure,\n      \"Could not convert value returned from macro to AST.\",\n    )),\n  }\n}\n\nfn await_promise(\n  env: Env,\n  result: JsUnknown,\n  tx: Sender<Result<JsValue, MacroError>>,\n) -> napi::Result<()> {\n  // If the result is a promise, wait for it to resolve, and send the result to the channel.\n  // Otherwise, send the result immediately.\n  if result.is_promise()? {\n    let result: JsObject = result.try_into()?;\n    let then: JsFunction = result.get_named_property(\"then\")?;\n    let tx2 = tx.clone();\n    let cb = env.create_function_from_closure(\"callback\", move |ctx| {\n      let res = napi_to_js_value(ctx.get::<JsUnknown>(0)?, env)?;\n      tx.send(Ok(res)).expect(\"send failure\");\n      ctx.env.get_undefined()\n    })?;\n    let eb = env.create_function_from_closure(\"error_callback\", move |ctx| {\n      let res = ctx.get::<JsMacroError>(0)?;\n      let err = match res.kind {\n        1 => MacroError::LoadError(res.message, DUMMY_SP),\n        2 => MacroError::ExecutionError(res.message, DUMMY_SP),\n        _ => MacroError::LoadError(\"Invalid error kind\".into(), DUMMY_SP),\n      };\n      tx2.send(Err(err)).expect(\"send failure\");\n      ctx.env.get_undefined()\n    })?;\n    then.call(Some(&result), &[cb, eb])?;\n  } else {\n    tx.send(Ok(napi_to_js_value(result, env)?))\n      .expect(\"send failure\");\n  }\n\n  Ok(())\n}\n"
  },
  {
    "path": "crates/node-bindings/.cargo/config.toml",
    "content": "[target.wasm32-unknown-unknown]\nrustflags = [\"-C\", \"link-arg=--export-table\"]\n"
  },
  {
    "path": "crates/node-bindings/Cargo.toml",
    "content": "[package]\nauthors = [\"Devon Govett <devongovett@gmail.com>\"]\nname = \"parcel-node-bindings\"\nversion = \"0.1.0\"\nedition = \"2024\"\n\n[lib]\ncrate-type = [\"cdylib\"]\n\n[dependencies]\nnapi-derive = \"2.16.3\"\nparcel-js-swc-core = { path = \"../../packages/transformers/js/core\" }\nparcel-resolver = { path = \"../parcel-resolver\" }\nparcel-html = { path = \"../html\" }\ndashmap = \"6.1.0\"\nxxhash-rust = { version = \"0.8.2\", features = [\"xxh3\"] }\n\n[target.'cfg(not(target_arch = \"wasm32\"))'.dependencies]\nnapi = { version = \"2.16.4\", features = [\"serde-json\", \"napi4\", \"napi5\"] }\nparcel-dev-dep-resolver = { path = \"../dev-dep-resolver\" }\nparcel-macros = { path = \"../macros\", features = [\"napi\"] }\noxipng = \"9.1.2\"\nmozjpeg-sys = \"2.0.0\"\nlibc = \"0.2\"\nrayon = \"1.7.0\"\ncrossbeam-channel = \"0.5.6\"\nindexmap = \"1.9.2\"\n\n[target.'cfg(target_arch = \"wasm32\")'.dependencies]\nnapi = { version = \"2.16.4\", features = [\"serde-json\"] }\ngetrandom = { version = \"0.2\", features = [\"custom\"], default-features = false }\n\n[target.'cfg(target_os = \"macos\")'.dependencies]\njemallocator = { version = \"0.3.2\", features = [\"disable_initial_exec_tls\"] }\n\n[target.'cfg(windows)'.dependencies]\nmimalloc = { version = \"0.1.25\", default-features = false }\n\n[build-dependencies]\nnapi-build = \"2.1.3\"\n"
  },
  {
    "path": "crates/node-bindings/build.rs",
    "content": "#[cfg(not(target_arch = \"wasm32\"))]\nextern crate napi_build;\n\nfn main() {\n  #[cfg(not(target_arch = \"wasm32\"))]\n  napi_build::setup();\n}\n"
  },
  {
    "path": "crates/node-bindings/src/fs_search.rs",
    "content": "use std::path::Path;\n\nuse napi_derive::napi;\n\n#[napi]\npub fn find_ancestor_file(filenames: Vec<String>, from: String, root: String) -> Option<String> {\n  let from = Path::new(&from);\n  let root = Path::new(&root);\n\n  for dir in from.ancestors() {\n    // Break if we hit a node_modules directory\n    if let Some(filename) = dir.file_name() {\n      if filename == \"node_modules\" {\n        break;\n      }\n    }\n\n    for name in &filenames {\n      let fullpath = dir.join(name);\n      if fullpath.is_file() {\n        return Some(fullpath.to_string_lossy().into_owned());\n      }\n    }\n\n    if dir == root {\n      break;\n    }\n  }\n\n  None\n}\n\n#[napi]\npub fn find_first_file(names: Vec<String>) -> Option<String> {\n  for name in names {\n    let path = Path::new(&name);\n\n    if path.is_file() {\n      return Some(name);\n    }\n  }\n\n  None\n}\n\n#[napi]\npub fn find_node_module(module: String, from: String) -> Option<String> {\n  let module = Path::new(&module);\n  let from = Path::new(&from);\n\n  for dir in from.ancestors() {\n    // Skip over node_modules directories\n    if let Some(filename) = dir.file_name() {\n      if filename == \"node_modules\" {\n        continue;\n      }\n    }\n\n    let fullpath = dir.join(\"node_modules\").join(module);\n    if fullpath.is_dir() {\n      return Some(fullpath.to_string_lossy().into_owned());\n    }\n  }\n\n  None\n}\n"
  },
  {
    "path": "crates/node-bindings/src/hash.rs",
    "content": "#![allow(clippy::new_without_default)]\n\nuse std::hash::Hasher;\n\nuse napi::bindgen_prelude::Buffer;\nuse napi_derive::napi;\nuse xxhash_rust::xxh3::{Xxh3, xxh3_64};\n\n#[napi]\npub fn hash_string(s: String) -> String {\n  let s = s.as_bytes();\n  let res = xxh3_64(s);\n  format!(\"{:016x}\", res)\n}\n\n#[napi]\npub fn hash_buffer(buf: Buffer) -> String {\n  let res = xxh3_64(&buf);\n  format!(\"{:016x}\", res)\n}\n\n#[napi]\npub struct Hash {\n  hash: Xxh3,\n}\n\n#[napi]\nimpl Hash {\n  #[napi(constructor)]\n  pub fn new() -> Self {\n    Hash { hash: Xxh3::new() }\n  }\n\n  #[napi]\n  pub fn write_string(&mut self, s: String) {\n    self.hash.write(s.as_bytes());\n  }\n\n  #[napi]\n  pub fn write_buffer(&mut self, buf: Buffer) {\n    self.hash.write(&buf);\n  }\n\n  #[napi]\n  pub fn finish(&mut self) -> String {\n    let res = self.hash.finish();\n    format!(\"{:016x}\", res)\n  }\n}\n"
  },
  {
    "path": "crates/node-bindings/src/html.rs",
    "content": "use napi::{Env, JsObject, JsUnknown};\nuse napi_derive::napi;\n\n#[napi]\npub fn transform_html(opts: JsObject, env: Env) -> napi::Result<JsUnknown> {\n  let options: parcel_html::TransformOptions = env.from_js_value(opts)?;\n  let result = parcel_html::transform_html(options);\n  env.to_js_value(&result)\n}\n\n#[napi]\npub fn package_html(opts: JsObject, env: Env) -> napi::Result<JsUnknown> {\n  let options: parcel_html::PackageOptions = env.from_js_value(opts)?;\n  let result = parcel_html::package_html(options)\n    .map_err(|_| napi::Error::new(napi::Status::GenericFailure, \"An unexpected error occurred\"))?;\n  env.to_js_value(&result)\n}\n\n#[napi]\npub fn optimize_html(opts: JsObject, env: Env) -> napi::Result<JsUnknown> {\n  let options: parcel_html::OptimizeHtmlOptions = env.from_js_value(opts)?;\n  let result = parcel_html::optimize_html(options)\n    .map_err(|_| napi::Error::new(napi::Status::GenericFailure, \"An unexpected error occurred\"))?;\n  env.to_js_value(&result)\n}\n\n#[napi]\npub fn transform_svg(opts: JsObject, env: Env) -> napi::Result<JsUnknown> {\n  let options: parcel_html::TransformOptions = env.from_js_value(opts)?;\n  let result = parcel_html::transform_svg(options);\n  env.to_js_value(&result)\n}\n\n#[napi]\npub fn package_svg(opts: JsObject, env: Env) -> napi::Result<JsUnknown> {\n  let options: parcel_html::PackageOptions = env.from_js_value(opts)?;\n  let result = parcel_html::package_svg(options)\n    .map_err(|_| napi::Error::new(napi::Status::GenericFailure, \"An unexpected error occurred\"))?;\n  env.to_js_value(&result)\n}\n\n#[napi]\npub fn optimize_svg(opts: JsObject, env: Env) -> napi::Result<JsUnknown> {\n  let options: parcel_html::OptimizeSvgOptions = env.from_js_value(opts)?;\n  let result = parcel_html::optimize_svg(options)\n    .map_err(|_| napi::Error::new(napi::Status::GenericFailure, \"An unexpected error occurred\"))?;\n  env.to_js_value(&result)\n}\n\n#[napi]\npub fn svg_react(opts: JsObject, env: Env) -> napi::Result<JsUnknown> {\n  let options: parcel_html::SvgReactOptions = env.from_js_value(opts)?;\n  let result = parcel_html::svg_react(options)\n    .map_err(|_| napi::Error::new(napi::Status::GenericFailure, \"An unexpected error occurred\"))?;\n  env.to_js_value(&result)\n}\n"
  },
  {
    "path": "crates/node-bindings/src/image.rs",
    "content": "use std::{mem, ptr, slice};\n\nuse mozjpeg_sys::*;\nuse napi::{Env, Error, JsBuffer, Result, bindgen_prelude::*};\nuse napi_derive::napi;\nuse oxipng::optimize_from_memory;\n\n#[napi]\npub fn optimize_image(kind: String, buf: Buffer, env: Env) -> Result<JsBuffer> {\n  let slice = buf.as_ref();\n\n  match kind.as_ref() {\n    \"png\" => match optimize_from_memory(slice, &Default::default()) {\n      Ok(res) => Ok(env.create_buffer_with_data(res)?.into_raw()),\n      Err(err) => Err(Error::from_reason(format!(\"{}\", err))),\n    },\n    \"jpg\" | \"jpeg\" => unsafe {\n      match optimize_jpeg(slice) {\n        Ok(res) => Ok(\n          env\n            .create_buffer_with_borrowed_data(\n              res.as_mut_ptr(),\n              res.len(),\n              res.as_mut_ptr(),\n              finalize,\n            )?\n            .into_raw(),\n        ),\n        Err(err) => {\n          if let Some(msg) = err.downcast_ref::<String>() {\n            Err(Error::from_reason(msg.to_string()))\n          } else {\n            Err(Error::from_reason(\"Unknown libjpeg error\"))\n          }\n        }\n      }\n    },\n    _ => Err(Error::from_reason(format!(\"Unknown image type {}\", kind))),\n  }\n}\n\nfn finalize(ptr: *mut u8, _env: Env) {\n  unsafe {\n    libc::free(ptr as *mut c_void);\n  }\n}\n\nstruct JPEGOptimizer {\n  srcinfo: jpeg_decompress_struct,\n  dstinfo: jpeg_compress_struct,\n}\n\nimpl JPEGOptimizer {\n  unsafe fn new() -> JPEGOptimizer {\n    JPEGOptimizer {\n      srcinfo: unsafe { mem::zeroed() },\n      dstinfo: unsafe { mem::zeroed() },\n    }\n  }\n}\n\nimpl Drop for JPEGOptimizer {\n  fn drop(&mut self) {\n    unsafe {\n      jpeg_destroy_decompress(&mut self.srcinfo);\n      jpeg_destroy_compress(&mut self.dstinfo);\n    }\n  }\n}\n\n// This function losslessly optimizes jpegs.\n// Based on the jpegtran.c example program in libjpeg.\nunsafe fn optimize_jpeg(bytes: &[u8]) -> std::thread::Result<&mut [u8]> {\n  std::panic::catch_unwind(|| unsafe {\n    let mut info = JPEGOptimizer::new();\n    let mut err = create_error_handler();\n    info.srcinfo.common.err = &mut err;\n    jpeg_create_decompress(&mut info.srcinfo);\n    jpeg_mem_src(&mut info.srcinfo, bytes.as_ptr(), bytes.len() as c_ulong);\n\n    info.dstinfo.optimize_coding = 1;\n    info.dstinfo.common.err = &mut err;\n    jpeg_create_compress(&mut info.dstinfo);\n    jpeg_read_header(&mut info.srcinfo, 1);\n\n    let src_coef_arrays = jpeg_read_coefficients(&mut info.srcinfo);\n    jpeg_copy_critical_parameters(&info.srcinfo, &mut info.dstinfo);\n\n    let mut buf = ptr::null_mut();\n    let mut outsize: c_ulong = 0;\n    jpeg_mem_dest(&mut info.dstinfo, &mut buf, &mut outsize);\n\n    jpeg_write_coefficients(&mut info.dstinfo, src_coef_arrays);\n\n    jpeg_finish_compress(&mut info.dstinfo);\n    jpeg_finish_decompress(&mut info.srcinfo);\n\n    slice::from_raw_parts_mut(buf, outsize as usize)\n  })\n}\n\nunsafe fn create_error_handler() -> jpeg_error_mgr {\n  unsafe {\n    let mut err: jpeg_error_mgr = mem::zeroed();\n    jpeg_std_error(&mut err);\n    err.error_exit = Some(unwind_error_exit);\n    err.emit_message = Some(silence_message);\n    err\n  }\n}\n\nextern \"C-unwind\" fn unwind_error_exit(cinfo: &mut jpeg_common_struct) {\n  let message = unsafe {\n    let err = cinfo.err.as_ref().unwrap();\n    match err.format_message {\n      Some(fmt) => {\n        let buffer = mem::zeroed();\n        fmt(cinfo, &buffer);\n        let len = buffer.iter().take_while(|&&c| c != 0).count();\n        String::from_utf8_lossy(&buffer[..len]).into()\n      }\n      None => format!(\"libjpeg error: {}\", err.msg_code),\n    }\n  };\n  std::panic::resume_unwind(Box::new(message))\n}\n\nextern \"C-unwind\" fn silence_message(_cinfo: &mut jpeg_common_struct, _level: c_int) {}\n"
  },
  {
    "path": "crates/node-bindings/src/lib.rs",
    "content": "#![allow(dead_code)]\n\n#[cfg(target_arch = \"wasm32\")]\nuse std::alloc::Layout;\n#[cfg(target_arch = \"wasm32\")]\nuse std::alloc::alloc;\n\n#[cfg(all(target_os = \"macos\", not(miri)))]\n#[global_allocator]\nstatic GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;\n\n#[cfg(all(windows, not(miri)))]\n#[global_allocator]\nstatic ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;\n\n#[cfg(not(target_arch = \"wasm32\"))]\nmod fs_search;\nmod hash;\n#[cfg(not(target_arch = \"wasm32\"))]\nmod image;\n\nmod html;\nmod resolver;\nmod transformer;\n\n#[cfg(target_arch = \"wasm32\")]\n#[unsafe(no_mangle)]\npub extern \"C\" fn napi_wasm_malloc(size: usize) -> *mut u8 {\n  let align = std::mem::align_of::<usize>();\n  if let Ok(layout) = Layout::from_size_align(size, align) {\n    unsafe {\n      if layout.size() > 0 {\n        let ptr = alloc(layout);\n        if !ptr.is_null() {\n          return ptr;\n        }\n      } else {\n        return align as *mut u8;\n      }\n    }\n  }\n\n  std::process::abort();\n}\n\n#[cfg(target_arch = \"wasm32\")]\nmod wasm {\n  use napi_derive::napi;\n\n  #[link(wasm_import_module = \"env\")]\n  unsafe extern \"C\" {\n    fn log(ptr: *const u8, len: usize);\n  }\n\n  #[napi]\n  pub fn init_panic_hook() {\n    std::panic::set_hook(Box::new(|p| {\n      let s = p.to_string();\n      unsafe {\n        log(s.as_ptr(), s.len());\n      }\n    }));\n  }\n}\n"
  },
  {
    "path": "crates/node-bindings/src/resolver.rs",
    "content": "use std::{\n  borrow::Cow,\n  collections::HashMap,\n  path::{Path, PathBuf},\n  sync::Arc,\n};\n\nuse napi::{\n  Env, JsBuffer, JsFunction, JsNumber, JsObject, JsString, JsUnknown, Ref, Result,\n  bindgen_prelude::Either3,\n};\nuse napi_derive::napi;\n\n#[cfg(not(target_arch = \"wasm32\"))]\nuse parcel_resolver::OsFileSystem;\nuse parcel_resolver::{\n  ExportsCondition, Extensions, Fields, FileCreateInvalidation, FileKind, FileSystem, Flags,\n  IncludeNodeModules, Invalidations, ModuleType, Resolution, ResolutionAndQuery, ResolverError,\n  SpecifierType,\n};\n\ntype NapiSideEffectsVariants = Either3<bool, Vec<String>, HashMap<String, bool>>;\n\n#[napi(object)]\npub struct JsFileSystemOptions {\n  pub read: JsFunction,\n  pub read_link: JsFunction,\n  pub kind: JsFunction,\n  pub include_node_modules: Option<NapiSideEffectsVariants>,\n}\n\n#[napi(object, js_name = \"FileSystem\")]\npub struct JsResolverOptions {\n  pub fs: Option<JsFileSystemOptions>,\n  pub include_node_modules: Option<NapiSideEffectsVariants>,\n  pub conditions: Option<u32>,\n  pub module_dir_resolver: Option<JsFunction>,\n  pub mode: u8,\n  pub entries: Option<u8>,\n  pub extensions: Option<Vec<String>>,\n  pub package_exports: bool,\n  pub typescript: Option<bool>,\n}\n\npub struct FunctionRef {\n  env: Env,\n  reference: Ref<()>,\n}\n\n// We don't currently call functions from multiple threads, but we'll need to change this when we do.\nunsafe impl Send for FunctionRef {}\nunsafe impl Sync for FunctionRef {}\n\nimpl FunctionRef {\n  fn new(env: Env, f: JsFunction) -> napi::Result<Self> {\n    Ok(Self {\n      env,\n      reference: env.create_reference(f)?,\n    })\n  }\n\n  fn get(&self) -> napi::Result<JsFunction> {\n    self.env.get_reference_value(&self.reference)\n  }\n}\n\nimpl Drop for FunctionRef {\n  fn drop(&mut self) {\n    drop(self.reference.unref(self.env))\n  }\n}\n\npub struct JsFileSystem {\n  pub read: FunctionRef,\n  pub kind: FunctionRef,\n  pub read_link: FunctionRef,\n}\n\nimpl FileSystem for JsFileSystem {\n  fn read_to_string(&self, path: &Path) -> std::io::Result<String> {\n    let read = || -> napi::Result<_> {\n      let path = path.to_string_lossy();\n      let path = self.read.env.create_string(path.as_ref())?;\n      let res: JsBuffer = self.read.get()?.call(None, &[path])?.try_into()?;\n      let value = res.into_value()?;\n      Ok(unsafe { String::from_utf8_unchecked(value.to_vec()) })\n    };\n\n    read().map_err(|err| std::io::Error::new(std::io::ErrorKind::NotFound, err.to_string()))\n  }\n\n  fn kind(&self, path: &Path) -> FileKind {\n    let kind = || -> napi::Result<u32> {\n      let path = path.to_string_lossy();\n      let p = self.kind.env.create_string(path.as_ref())?;\n      let res: JsNumber = self.kind.get()?.call(None, &[p])?.try_into()?;\n      res.get_uint32()\n    };\n\n    match kind() {\n      Ok(num) => FileKind::from_bits_truncate(num as u8),\n      _ => FileKind::empty(),\n    }\n  }\n\n  fn read_link(&self, path: &Path) -> std::io::Result<PathBuf> {\n    let canonicalize = || -> napi::Result<_> {\n      let path = path.to_string_lossy();\n      let path = self.read_link.env.create_string(path.as_ref())?;\n      let res: JsString = self.read_link.get()?.call(None, &[path])?.try_into()?;\n      let utf8 = res.into_utf8()?;\n      Ok(utf8.into_owned()?.into())\n    };\n\n    canonicalize().map_err(|err| std::io::Error::new(std::io::ErrorKind::NotFound, err.to_string()))\n  }\n}\n\n#[napi(object)]\npub struct ResolveOptions {\n  pub filename: String,\n  pub specifier_type: String,\n  pub parent: String,\n  pub package_conditions: Option<Vec<String>>,\n}\n\n#[napi(object)]\npub struct FilePathCreateInvalidation {\n  pub file_path: String,\n}\n\n#[napi(object)]\npub struct FileNameCreateInvalidation {\n  pub file_name: String,\n  pub above_file_path: String,\n}\n\n#[napi(object)]\npub struct GlobCreateInvalidation {\n  pub glob: String,\n}\n\n#[napi(object)]\npub struct ResolveResult {\n  pub resolution: JsUnknown,\n  pub invalidate_on_file_change: Vec<String>,\n  pub invalidate_on_file_create:\n    Vec<Either3<FilePathCreateInvalidation, FileNameCreateInvalidation, GlobCreateInvalidation>>,\n  pub query: Option<String>,\n  pub side_effects: bool,\n  pub error: JsUnknown,\n  pub module_type: u8,\n}\n\n#[napi(object)]\npub struct JsInvalidations {\n  pub invalidate_on_file_change: Vec<String>,\n  pub invalidate_on_file_create:\n    Vec<Either3<FilePathCreateInvalidation, FileNameCreateInvalidation, GlobCreateInvalidation>>,\n  pub invalidate_on_startup: bool,\n}\n\n#[napi]\npub struct Resolver {\n  mode: u8,\n  resolver: parcel_resolver::Resolver<'static>,\n  #[cfg(not(target_arch = \"wasm32\"))]\n  invalidations_cache: parcel_dev_dep_resolver::Cache,\n  supports_async: bool,\n}\n\n#[napi]\nimpl Resolver {\n  #[napi(constructor)]\n  pub fn new(project_root: String, options: JsResolverOptions, env: Env) -> Result<Self> {\n    let mut supports_async = false;\n    #[cfg(not(target_arch = \"wasm32\"))]\n    let fs: Arc<dyn FileSystem> = if let Some(fs) = options.fs {\n      Arc::new(JsFileSystem {\n        read: FunctionRef::new(env, fs.read)?,\n        kind: FunctionRef::new(env, fs.kind)?,\n        read_link: FunctionRef::new(env, fs.read_link)?,\n      })\n    } else {\n      supports_async = true;\n      Arc::new(OsFileSystem)\n    };\n    #[cfg(target_arch = \"wasm32\")]\n    let fs = {\n      let fsjs = options.fs.unwrap();\n      Arc::new(JsFileSystem {\n        read: FunctionRef::new(env, fsjs.read)?,\n        kind: FunctionRef::new(env, fsjs.kind)?,\n        read_link: FunctionRef::new(env, fsjs.read_link)?,\n      })\n    };\n\n    let mut resolver = match options.mode {\n      1 => {\n        parcel_resolver::Resolver::parcel(Path::new(&project_root), parcel_resolver::Cache::new(fs))\n      }\n      2 => {\n        parcel_resolver::Resolver::node(Path::new(&project_root), parcel_resolver::Cache::new(fs))\n      }\n      _ => return Err(napi::Error::new(napi::Status::InvalidArg, \"Invalid mode\")),\n    };\n\n    if let Some(include_node_modules) = options.include_node_modules {\n      resolver.include_node_modules = Cow::Owned(match include_node_modules {\n        Either3::A(b) => IncludeNodeModules::Bool(b),\n        Either3::B(v) => IncludeNodeModules::Array(v),\n        Either3::C(v) => IncludeNodeModules::Map(v),\n      });\n    }\n\n    if let Some(conditions) = options.conditions {\n      resolver.conditions = ExportsCondition::from_bits_truncate(conditions);\n    }\n\n    if let Some(entries) = options.entries {\n      resolver.entries = Fields::from_bits_truncate(entries);\n    }\n\n    if let Some(extensions) = options.extensions {\n      resolver.extensions = Extensions::Owned(extensions);\n    }\n\n    resolver.flags.set(Flags::EXPORTS, options.package_exports);\n\n    if matches!(options.typescript, Some(true)) {\n      resolver.flags |= Flags::TYPESCRIPT;\n    }\n\n    if let Some(module_dir_resolver) = options.module_dir_resolver {\n      let module_dir_resolver = FunctionRef::new(env, module_dir_resolver)?;\n      resolver.module_dir_resolver = Some(Arc::new(move |module: &str, from: &Path| {\n        let call = |module: &str| -> napi::Result<PathBuf> {\n          let env = module_dir_resolver.env;\n          let s = env.create_string(module)?;\n          let f = env.create_string(from.to_string_lossy().as_ref())?;\n          let res: JsString = module_dir_resolver.get()?.call(None, &[s, f])?.try_into()?;\n          let utf8 = res.into_utf8()?;\n          Ok(utf8.into_owned()?.into())\n        };\n\n        let r = call(module);\n        r.map_err(|_| ResolverError::ModuleNotFound {\n          module: module.to_owned(),\n        })\n      }));\n    }\n\n    Ok(Self {\n      mode: options.mode,\n      resolver,\n      supports_async,\n      #[cfg(not(target_arch = \"wasm32\"))]\n      invalidations_cache: Default::default(),\n    })\n  }\n\n  #[napi]\n  pub fn resolve(&self, options: ResolveOptions, env: Env) -> Result<ResolveResult> {\n    let (res, invalidations, side_effects, module_type) =\n      resolve_internal(&self.resolver, self.mode, options)?;\n    resolve_result_to_js(env, res, invalidations, side_effects, module_type)\n  }\n\n  #[cfg(target_arch = \"wasm32\")]\n  #[napi]\n  pub fn resolve_async(&'static self) -> Result<JsObject> {\n    panic!(\"resolveAsync() is not supported in Wasm builds\")\n  }\n\n  #[cfg(not(target_arch = \"wasm32\"))]\n  #[napi]\n  pub fn resolve_async(&'static self, options: ResolveOptions, env: Env) -> Result<JsObject> {\n    let (deferred, promise) = env.create_deferred()?;\n    let resolver = &self.resolver;\n    let mode = self.mode;\n\n    if !self.supports_async || resolver.module_dir_resolver.is_some() {\n      return Err(napi::Error::new(\n        napi::Status::GenericFailure,\n        \"resolveAsync does not support custom fs or module_dir_resolver\",\n      ));\n    }\n\n    rayon::spawn(move || {\n      let (res, invalidations, side_effects, module_type) =\n        match resolve_internal(&resolver, mode, options) {\n          Ok(r) => r,\n          Err(e) => return deferred.reject(e),\n        };\n\n      deferred.resolve(move |env| {\n        resolve_result_to_js(env, res, invalidations, side_effects, module_type)\n      });\n    });\n\n    Ok(promise)\n  }\n\n  #[cfg(target_arch = \"wasm32\")]\n  #[napi]\n  pub fn get_invalidations(&self, _path: String) -> napi::Result<JsInvalidations> {\n    panic!(\"getInvalidations() is not supported in Wasm builds\")\n  }\n\n  #[cfg(not(target_arch = \"wasm32\"))]\n  #[napi]\n  pub fn get_invalidations(&self, path: String) -> napi::Result<JsInvalidations> {\n    let path = Path::new(&path);\n    match parcel_dev_dep_resolver::build_esm_graph(\n      path,\n      &self.resolver.project_root.as_path(),\n      self.resolver.cache(),\n      &self.invalidations_cache,\n    ) {\n      Ok(invalidations) => {\n        let invalidate_on_startup = invalidations.invalidate_on_startup.get();\n        let (invalidate_on_file_change, invalidate_on_file_create) =\n          convert_invalidations(invalidations);\n        Ok(JsInvalidations {\n          invalidate_on_file_change,\n          invalidate_on_file_create,\n          invalidate_on_startup,\n        })\n      }\n      Err(_) => Err(napi::Error::new(\n        napi::Status::GenericFailure,\n        \"Failed to resolve invalidations\",\n      )),\n    }\n  }\n}\n\nfn resolve_internal(\n  resolver: &parcel_resolver::Resolver,\n  mode: u8,\n  options: ResolveOptions,\n) -> napi::Result<(\n  std::result::Result<ResolutionAndQuery, ResolverError>,\n  ConvertedInvalidations,\n  bool,\n  u8,\n)> {\n  let mut res = resolver.resolve_with_options(\n    &options.filename,\n    Path::new(&options.parent),\n    match options.specifier_type.as_ref() {\n      \"esm\" => SpecifierType::Esm,\n      \"commonjs\" => SpecifierType::Cjs,\n      \"url\" => SpecifierType::Url,\n      \"custom\" => {\n        return Err(napi::Error::new(\n          napi::Status::InvalidArg,\n          \"Unsupported specifier type: custom\",\n        ));\n      }\n      _ => {\n        return Err(napi::Error::new(\n          napi::Status::InvalidArg,\n          format!(\"Invalid specifier type: {}\", options.specifier_type),\n        ));\n      }\n    },\n    if let Some(conditions) = options.package_conditions {\n      get_resolve_options(conditions)\n    } else {\n      Default::default()\n    },\n  );\n\n  let side_effects = if let Ok(ResolutionAndQuery {\n    resolution: Resolution::Path(p),\n    ..\n  }) = &res.result\n  {\n    match resolver.resolve_side_effects(p, &res.invalidations) {\n      Ok(side_effects) => side_effects,\n      Err(err) => {\n        res.result = Err(err);\n        true\n      }\n    }\n  } else {\n    true\n  };\n\n  let mut module_type = 0;\n\n  if mode == 2 {\n    if let Ok(ResolutionAndQuery {\n      resolution: Resolution::Path(p),\n      ..\n    }) = &res.result\n    {\n      module_type = match resolver.resolve_module_type(p, &res.invalidations) {\n        Ok(t) => match t {\n          ModuleType::CommonJs | ModuleType::Json => 1,\n          ModuleType::Module => 2,\n        },\n        Err(err) => {\n          res.result = Err(err);\n          0\n        }\n      }\n    }\n  }\n\n  Ok((\n    res.result,\n    convert_invalidations(res.invalidations),\n    side_effects,\n    module_type,\n  ))\n}\n\nfn resolve_result_to_js(\n  env: Env,\n  res: std::result::Result<ResolutionAndQuery, ResolverError>,\n  invalidations: ConvertedInvalidations,\n  side_effects: bool,\n  module_type: u8,\n) -> napi::Result<ResolveResult> {\n  let (invalidate_on_file_change, invalidate_on_file_create) = invalidations;\n\n  match res {\n    Ok(res) => Ok(ResolveResult {\n      resolution: env.to_js_value(&res.resolution)?,\n      invalidate_on_file_change,\n      invalidate_on_file_create,\n      side_effects,\n      query: res.query,\n      error: env.get_undefined()?.into_unknown(),\n      module_type,\n    }),\n    Err(err) => Ok(ResolveResult {\n      resolution: env.get_undefined()?.into_unknown(),\n      invalidate_on_file_change,\n      invalidate_on_file_create,\n      side_effects: true,\n      query: None,\n      error: env.to_js_value(&err)?,\n      module_type: 0,\n    }),\n  }\n}\n\ntype ConvertedInvalidations = (\n  Vec<String>,\n  Vec<Either3<FilePathCreateInvalidation, FileNameCreateInvalidation, GlobCreateInvalidation>>,\n);\n\nfn convert_invalidations(invalidations: Invalidations) -> ConvertedInvalidations {\n  let invalidate_on_file_change = invalidations\n    .invalidate_on_file_change\n    .borrow()\n    .iter()\n    .map(|p| p.as_path().to_string_lossy().into_owned())\n    .collect();\n  let invalidate_on_file_create = invalidations\n    .invalidate_on_file_create\n    .borrow()\n    .iter()\n    .map(|i| match i {\n      FileCreateInvalidation::Path(p) => Either3::A(FilePathCreateInvalidation {\n        file_path: p.as_path().to_string_lossy().into_owned(),\n      }),\n      FileCreateInvalidation::FileName { file_name, above } => {\n        Either3::B(FileNameCreateInvalidation {\n          file_name: file_name.clone(),\n          above_file_path: above.as_path().to_string_lossy().into_owned(),\n        })\n      }\n      FileCreateInvalidation::Glob(glob) => {\n        Either3::C(GlobCreateInvalidation { glob: glob.clone() })\n      }\n    })\n    .collect();\n  (invalidate_on_file_change, invalidate_on_file_create)\n}\n\nfn get_resolve_options(mut custom_conditions: Vec<String>) -> parcel_resolver::ResolveOptions {\n  let mut conditions = ExportsCondition::empty();\n  custom_conditions.retain(|condition| {\n    if let Ok(cond) = ExportsCondition::try_from(condition.as_ref()) {\n      conditions |= cond;\n      false\n    } else {\n      true\n    }\n  });\n\n  parcel_resolver::ResolveOptions {\n    conditions,\n    custom_conditions,\n  }\n}\n"
  },
  {
    "path": "crates/node-bindings/src/transformer.rs",
    "content": "use napi::{Env, JsObject, JsUnknown};\nuse napi_derive::napi;\n\n#[napi]\npub fn transform(opts: JsObject, env: Env) -> napi::Result<JsUnknown> {\n  let config: parcel_js_swc_core::Config = env.from_js_value(opts)?;\n\n  let result = parcel_js_swc_core::transform(config, None)?;\n  env.to_js_value(&result)\n}\n\n#[cfg(not(target_arch = \"wasm32\"))]\nmod native_only {\n  use parcel_macros::napi::create_macro_callback;\n\n  use super::*;\n\n  #[napi]\n  pub fn transform_async(opts: JsObject, env: Env) -> napi::Result<JsObject> {\n    let call_macro = if opts.has_named_property(\"callMacro\")? {\n      let func = opts.get_named_property::<JsUnknown>(\"callMacro\")?;\n      if let Ok(func) = func.try_into() {\n        Some(create_macro_callback(func, env)?)\n      } else {\n        None\n      }\n    } else {\n      None\n    };\n\n    let config: parcel_js_swc_core::Config = env.from_js_value(opts)?;\n    let (deferred, promise) = env.create_deferred()?;\n\n    rayon::spawn(move || {\n      let res = parcel_js_swc_core::transform(config, call_macro);\n      match res {\n        Ok(result) => deferred.resolve(move |env| env.to_js_value(&result)),\n        Err(err) => deferred.reject(err.into()),\n      }\n    });\n\n    Ok(promise)\n  }\n}\n"
  },
  {
    "path": "crates/parcel-resolver/Cargo.toml",
    "content": "[package]\nauthors = [\"Devon Govett <devongovett@gmail.com>\"]\nname = \"parcel-resolver\"\nversion = \"0.1.1\"\nlicense = \"MIT\"\nrepository = \"https://github.com/parcel-bundler/parcel\"\nkeywords = [\"resolver\", \"node\", \"cjs\", \"esm\", \"bundler\"]\ndescription = \"Node.js compatible module resolver used by the Parcel bundler\"\nedition = \"2024\"\n\n[dependencies]\nbitflags = { version = \"2.7.0\", features = [\"serde\"] }\ndashmap = { version = \"6.1.0\", features = [\"raw-api\"] }\nglob-match = \"0.2.1\"\nindexmap = { version = \"1.9.2\", features = [\"serde\"] }\nitertools = \"0.10.5\"\nparking_lot = \"0.12\"\npercent-encoding = \"2.2.0\"\nserde = { version = \"1.0.152\", features = [\"derive\"] }\nserde_json = \"1.0.91\"\nurl = \"2.5.4\"\nrustc-hash = \"2.0.0\"\n\n[dev-dependencies]\nassert_fs = \"1.0\"\noxc_resolver = \"2\"\n# node_resolver = \"0.15.0\"\ncriterion = { version = \"*\", features = [\"html_reports\"] }\ndeno_package_json = \"0.1.2\"\nrspack_resolver = \"*\"\n\n[target.'cfg(windows)'.dev-dependencies]\nis_elevated = \"0.1.2\"\n\n\n[[bench]]\nname = \"benchmark\"\nharness = false\n"
  },
  {
    "path": "crates/parcel-resolver/README.md",
    "content": "# parcel-resolver\n\nparcel-resolver implements the Node.js module resolution algorithm.\nIt supports both CommonJS and ES module resolution, along with many\nadditional features supported by various tools in the JavaScript ecosystem,\nsuch as TypeScript's tsconfig paths and extension rewriting, the \"alias\"\nand \"browser\" fields used by bundlers, absolute and tilde paths, and more.\nThese can be individually turned on or off using feature flags.\n\nFor a full description of all supported resolution features, see [Parcel's documentation](https://parceljs.org/features/dependency-resolution/).\n\n# Example\n\nTo create a resolver, first create a [Cache]. This stores information about the files\nin a [FileSystem], and can be reused between multiple resolvers. A fresh cache\nshould generally be created once per build to ensure information is up to date.\n\nNext, create a [Resolver] using one of the constructors. For example, `Resolver::node`\ncreates a Node.js compatible CommonJS resolver, `Resolver::node_esm` creates an ESM resolver,\nand `Resolver::parcel` creates a Parcel-compatible resolver. From there you can customize individual\nfeatures such as extensions or index files by setting properties on the resolver.\n\nFinally, call `resolver.resolve` to resolve a specifier. This returns a result, along with [Invalidations]\ndescribing the files that should invalidate any resolution caches.\n\n```rust\nuse parcel_resolver::{Cache, Resolver, SpecifierType, ResolutionAndQuery};\nuse std::path::Path;\n\nlet cache = Cache::default();\nlet resolver = Resolver::node_esm(Path::new(\"/path/to/project-root\"), &cache);\n\nlet res = resolver.resolve(\n  \"lodash\",\n  Path::new(\"/path/to/project-root/index.js\"),\n  SpecifierType::Esm\n);\n\nif let Ok(ResolutionAndQuery { resolution, query }) = res.result {\n  // Do something with the resolution!\n}\n```\n"
  },
  {
    "path": "crates/parcel-resolver/benches/benchmark.rs",
    "content": "use criterion::{Criterion, criterion_group, criterion_main};\nuse node_resolver::{\n  PackageJsonResolver,\n  errors::{PackageFolderResolveError, PackageFolderResolveIoError, PackageNotFoundError},\n};\nuse std::{\n  borrow::Cow,\n  hint::black_box,\n  path::{Path, PathBuf},\n  rc::Rc,\n  sync::Arc,\n};\n\nfn parcel(from: &Path, resolver: &parcel_resolver::Resolver) {\n  for specifier in &[\n    \"./nested/index.js\",\n    \"@parcel/core\",\n    \"axios\",\n    \"@babel/parser\",\n  ] {\n    let _ = black_box(resolver.resolve(\n      black_box(specifier),\n      &from,\n      parcel_resolver::SpecifierType::Esm,\n    ));\n  }\n}\n\nfn oxc_resolve(from: &Path, resolver: &oxc_resolver::Resolver) {\n  for specifier in &[\n    \"./nested/index.js\",\n    \"@parcel/core\",\n    \"axios\",\n    \"@babel/parser\",\n  ] {\n    let _ = black_box(resolver.resolve(&from, black_box(specifier)));\n  }\n}\n\nfn rspack_resolve(from: &Path, resolver: &rspack_resolver::Resolver) {\n  for specifier in &[\n    \"./nested/index.js\",\n    \"@parcel/core\",\n    \"axios\",\n    \"@babel/parser\",\n  ] {\n    let _ = black_box(resolver.resolve(&from, black_box(specifier)));\n  }\n}\n\n#[derive(Debug)]\nstruct Env;\n\nimpl node_resolver::env::NodeResolverEnv for Env {\n  fn is_builtin_node_module(&self, _specifier: &str) -> bool {\n    false\n  }\n\n  fn realpath_sync(&self, path: &Path) -> std::io::Result<std::path::PathBuf> {\n    path.canonicalize()\n  }\n\n  fn stat_sync(&self, path: &Path) -> std::io::Result<node_resolver::env::NodeResolverFsStat> {\n    let metadata = path.symlink_metadata()?;\n    if metadata.is_symlink() {\n      let metadata = path.metadata()?;\n      return Ok(node_resolver::env::NodeResolverFsStat {\n        is_file: metadata.is_file(),\n        is_dir: metadata.is_dir(),\n        is_symlink: true,\n      });\n    }\n    return Ok(node_resolver::env::NodeResolverFsStat {\n      is_file: metadata.is_file(),\n      is_dir: metadata.is_dir(),\n      is_symlink: false,\n    });\n  }\n\n  fn exists_sync(&self, path: &Path) -> bool {\n    path.exists()\n  }\n\n  fn pkg_json_fs(&self) -> &dyn deno_package_json::fs::DenoPkgJsonFs {\n    self\n  }\n}\n\nimpl deno_package_json::fs::DenoPkgJsonFs for Env {\n  fn read_to_string_lossy(&self, path: &Path) -> Result<String, std::io::Error> {\n    std::fs::read_to_string(path)\n  }\n}\n\nimpl node_resolver::InNpmPackageChecker for Env {\n  fn in_npm_package(&self, specifier: &url::Url) -> bool {\n    specifier.scheme() == \"file\"\n      && specifier\n        .path()\n        .to_ascii_lowercase()\n        .contains(\"/node_modules/\")\n  }\n}\n\nfn join_package_name(path: &Path, package_name: &str) -> PathBuf {\n  let mut path = path.to_path_buf();\n  // ensure backslashes are used on windows\n  for part in package_name.split('/') {\n    path = path.join(part);\n  }\n  path\n}\n\nimpl node_resolver::NpmResolver for Env {\n  fn resolve_package_folder_from_package(\n    &self,\n    specifier: &str,\n    referrer: &url::Url,\n  ) -> Result<std::path::PathBuf, node_resolver::errors::PackageFolderResolveError> {\n    fn inner(name: &str, referrer: &url::Url) -> Result<PathBuf, PackageFolderResolveError> {\n      let maybe_referrer_file = referrer.to_file_path().unwrap();\n      let maybe_start_folder = maybe_referrer_file.parent();\n      if let Some(start_folder) = maybe_start_folder {\n        for current_folder in start_folder.ancestors() {\n          let node_modules_folder = if current_folder.ends_with(\"node_modules\") {\n            Cow::Borrowed(current_folder)\n          } else {\n            Cow::Owned(current_folder.join(\"node_modules\"))\n          };\n\n          let sub_dir = join_package_name(&node_modules_folder, name);\n          if sub_dir.is_dir() {\n            return Ok(sub_dir);\n          }\n        }\n      }\n\n      Err(\n        PackageNotFoundError {\n          package_name: name.to_string(),\n          referrer: referrer.clone(),\n          referrer_extra: None,\n        }\n        .into(),\n      )\n    }\n\n    let path = inner(specifier, referrer)?;\n    path.canonicalize().map_err(|err| {\n      PackageFolderResolveIoError {\n        package_name: specifier.to_string(),\n        referrer: referrer.clone(),\n        source: err,\n      }\n      .into()\n    })\n  }\n}\n\nfn deno_resolve(from: &url::Url, resolver: &node_resolver::NodeResolver<Env>) {\n  for specifier in &[\n    \"./nested/index.js\",\n    \"@parcel/core\",\n    \"axios\",\n    \"@babel/parser\",\n  ] {\n    let _ = black_box(resolver.resolve(\n      black_box(specifier),\n      from,\n      node_resolver::NodeModuleKind::Esm,\n      node_resolver::NodeResolutionMode::Execution,\n    ));\n  }\n}\n\nfn bench_uncached(c: &mut Criterion) {\n  let root = Path::new(env!(\"CARGO_MANIFEST_DIR\"))\n    .parent()\n    .unwrap()\n    .parent()\n    .unwrap()\n    .join(\"packages/utils/node-resolver-core/test/fixture\");\n  let from = root.join(\"foo.js\");\n  let fs: Arc<dyn parcel_resolver::FileSystem> = Arc::new(parcel_resolver::OsFileSystem::default());\n  c.bench_function(\"uncached/parcel_resolver\", |b| {\n    b.iter(|| {\n      let cache = parcel_resolver::Cache::new(Arc::clone(&fs));\n      let resolver = parcel_resolver::Resolver::node_esm(&root, &cache);\n      parcel(&from, &resolver)\n    })\n  });\n\n  c.bench_function(\"uncached/oxc_resolver\", |b| {\n    b.iter(|| {\n      let oxc = oxc_resolver::Resolver::new(Default::default());\n      oxc_resolve(&from, &oxc)\n    })\n  });\n\n  c.bench_function(\"uncached/rspack_resolver\", |b| {\n    b.iter(|| {\n      let rspack = rspack_resolver::Resolver::new(Default::default());\n      rspack_resolve(&from, &rspack)\n    })\n  });\n\n  let from_url = url::Url::from_file_path(from).unwrap();\n  c.bench_function(\"uncached/deno\", |b| {\n    b.iter(|| {\n      node_resolver::PackageJsonThreadLocalCache::clear();\n      let deno = node_resolver::NodeResolver::new(\n        Env,\n        Rc::new(Env),\n        Rc::new(Env),\n        Rc::new(PackageJsonResolver::new(Env)),\n      );\n      deno_resolve(&from_url, &deno)\n    })\n  });\n}\n\nfn bench_cached(c: &mut Criterion) {\n  let root = Path::new(env!(\"CARGO_MANIFEST_DIR\"))\n    .parent()\n    .unwrap()\n    .parent()\n    .unwrap()\n    .join(\"packages/utils/node-resolver-core/test/fixture\");\n  let from = root.join(\"foo.js\");\n  let fs: Arc<dyn parcel_resolver::FileSystem> = Arc::new(parcel_resolver::OsFileSystem::default());\n  let cache = parcel_resolver::Cache::new(Arc::clone(&fs));\n  let resolver = parcel_resolver::Resolver::node_esm(&root, &cache);\n  c.bench_function(\"cached/parcel_resolver\", |b| {\n    b.iter(|| parcel(&from, &resolver))\n  });\n\n  let oxc = oxc_resolver::Resolver::new(Default::default());\n  c.bench_function(\"cached/oxc_resolver\", |b| {\n    b.iter(|| oxc_resolve(&from, &oxc))\n  });\n\n  let rspack = rspack_resolver::Resolver::new(Default::default());\n  c.bench_function(\"cached/rspack_resolver\", |b| {\n    b.iter(|| rspack_resolve(&from, &rspack))\n  });\n\n  let from_url = url::Url::from_file_path(from).unwrap();\n  let deno = node_resolver::NodeResolver::new(\n    Env,\n    Rc::new(Env),\n    Rc::new(Env),\n    Rc::new(PackageJsonResolver::new(Env)),\n  );\n  c.bench_function(\"cached/deno\", |b| b.iter(|| deno_resolve(&from_url, &deno)));\n}\n\ncriterion_group!(benches, bench_uncached, bench_cached);\ncriterion_main!(benches);\n"
  },
  {
    "path": "crates/parcel-resolver/src/builtins.rs",
    "content": "// node -p \"[...require('module').builtinModules].map(b => JSON.stringify(b)).join(',\\n')\"\npub const BUILTINS: &[&str] = &[\n  \"_http_agent\",\n  \"_http_client\",\n  \"_http_common\",\n  \"_http_incoming\",\n  \"_http_outgoing\",\n  \"_http_server\",\n  \"_stream_duplex\",\n  \"_stream_passthrough\",\n  \"_stream_readable\",\n  \"_stream_transform\",\n  \"_stream_wrap\",\n  \"_stream_writable\",\n  \"_tls_common\",\n  \"_tls_wrap\",\n  \"assert\",\n  \"assert/strict\",\n  \"async_hooks\",\n  \"buffer\",\n  \"child_process\",\n  \"cluster\",\n  \"console\",\n  \"constants\",\n  \"crypto\",\n  \"dgram\",\n  \"diagnostics_channel\",\n  \"dns\",\n  \"dns/promises\",\n  \"domain\",\n  \"events\",\n  \"fs\",\n  \"fs/promises\",\n  \"http\",\n  \"http2\",\n  \"https\",\n  \"inspector\",\n  \"module\",\n  \"net\",\n  \"os\",\n  \"path\",\n  \"path/posix\",\n  \"path/win32\",\n  \"perf_hooks\",\n  \"process\",\n  \"punycode\",\n  \"querystring\",\n  \"readline\",\n  \"repl\",\n  \"stream\",\n  \"stream/consumers\",\n  \"stream/promises\",\n  \"stream/web\",\n  \"string_decoder\",\n  \"sys\",\n  \"timers\",\n  \"timers/promises\",\n  \"tls\",\n  \"trace_events\",\n  \"tty\",\n  \"url\",\n  \"util\",\n  \"util/types\",\n  \"v8\",\n  \"vm\",\n  \"worker_threads\",\n  \"zlib\",\n];\n"
  },
  {
    "path": "crates/parcel-resolver/src/cache.rs",
    "content": "use bitflags::bitflags;\nuse dashmap::DashSet;\nuse rustc_hash::FxHasher;\n\nuse crate::{\n  FileSystem, ResolverError,\n  fs::FileKind,\n  package_json::PackageJson,\n  tsconfig::{TsConfig, TsConfigWrapper},\n};\nuse std::{\n  cell::UnsafeCell,\n  ffi::OsStr,\n  hash::{BuildHasherDefault, Hash, Hasher},\n  ops::Deref,\n  path::{Component, Path, PathBuf, is_separator},\n  sync::{\n    Arc, OnceLock,\n    atomic::{AtomicU64, Ordering},\n  },\n};\n\n/// Stores various cached info about file paths.\npub struct Cache {\n  pub fs: Arc<dyn FileSystem>,\n  paths: DashSet<PathEntry<'static>, BuildHasherDefault<IdentityHasher>>,\n}\n\n/// An entry in the path cache. Can also be borrowed for lookups without allocations.\nenum PathEntry<'a> {\n  Owned(Arc<PathInfo>),\n  Borrowed { hash: u64, path: &'a Path },\n}\n\nimpl<'a> Hash for PathEntry<'a> {\n  fn hash<H: Hasher>(&self, state: &mut H) {\n    match self {\n      PathEntry::Owned(info) => {\n        info.hash.hash(state);\n      }\n      PathEntry::Borrowed { hash, .. } => {\n        hash.hash(state);\n      }\n    }\n  }\n}\n\nimpl<'a> PartialEq for PathEntry<'a> {\n  fn eq(&self, other: &Self) -> bool {\n    let self_path = match self {\n      PathEntry::Owned(info) => &info.path,\n      PathEntry::Borrowed { path, .. } => *path,\n    };\n    let other_path = match other {\n      PathEntry::Owned(info) => &info.path,\n      PathEntry::Borrowed { path, .. } => *path,\n    };\n    self_path.as_os_str() == other_path.as_os_str()\n  }\n}\n\nimpl<'a> Eq for PathEntry<'a> {}\n\n#[cfg(not(target_arch = \"wasm32\"))]\nimpl Default for Cache {\n  fn default() -> Self {\n    Cache::new(Arc::new(crate::fs::OsFileSystem))\n  }\n}\n\nimpl Cache {\n  /// Creates an empty cache with the given file system.\n  pub fn new(fs: Arc<dyn FileSystem>) -> Cache {\n    Cache {\n      fs,\n      paths: DashSet::default(),\n    }\n  }\n\n  /// Returns cached info for a pre-normalized path.\n  pub fn get<P: AsRef<Path>>(&self, path: P) -> CachedPath {\n    self.get_path(path.as_ref())\n  }\n\n  /// Normalizes the given path and returns its cached info.\n  pub fn get_normalized<P: AsRef<Path>>(&self, path: P) -> CachedPath {\n    self.get_path(&normalize_path(path.as_ref()))\n  }\n\n  fn get_path(&self, path: &Path) -> CachedPath {\n    let mut hasher = FxHasher::default();\n    path.as_os_str().hash(&mut hasher);\n    let hash = hasher.finish();\n\n    let key = PathEntry::Borrowed { hash, path };\n\n    // A DashMap is just an array of RwLock<HashSet>, sharded by hash to reduce lock contention.\n    // This uses the low level raw API to avoid cloning the value when using the `entry` method.\n    // First, find which shard the value is in, and check to see if we already have a value in the map.\n    let shard = self.paths.determine_shard(hash as usize);\n    {\n      // Scope the read lock.\n      let map = self.paths.shards()[shard].read();\n      if let Some((PathEntry::Owned(entry), _)) = map.get(hash, |v| v.0 == key) {\n        return CachedPath(Arc::clone(entry));\n      }\n    }\n\n    // If that wasn't found, we need to create a new entry.\n    let parent = path\n      .parent()\n      .map(|p| CachedPath(Arc::clone(&self.get(p).0)));\n    let mut flags = parent.as_ref().map_or(PathFlags::empty(), |p| {\n      p.0.flags & PathFlags::IN_NODE_MODULES\n    });\n    if matches!(path.file_name(), Some(f) if f == \"node_modules\") {\n      flags |= PathFlags::IS_NODE_MODULES | PathFlags::IN_NODE_MODULES;\n    }\n\n    let info = Arc::new(PathInfo {\n      hash,\n      path: path.to_path_buf(),\n      parent,\n      flags,\n      kind: OnceLock::new(),\n      canonical: OnceLock::new(),\n      canonicalizing: AtomicU64::new(0),\n      package_json: OnceLock::new(),\n      tsconfig: OnceLock::new(),\n    });\n\n    self.paths.insert(PathEntry::Owned(Arc::clone(&info)));\n    CachedPath(info)\n  }\n}\n\npub(crate) mod private {\n  use super::*;\n\n  #[allow(clippy::large_enum_variant)]\n  /// Special Cow implementation for a Cache that doesn't require Clone.\n  pub enum CacheCow<'a> {\n    Borrowed(&'a Cache),\n    Owned(Cache),\n  }\n\n  impl<'a> Deref for CacheCow<'a> {\n    type Target = Cache;\n\n    fn deref(&self) -> &Self::Target {\n      match self {\n        CacheCow::Borrowed(c) => c,\n        CacheCow::Owned(c) => c,\n      }\n    }\n  }\n\n  impl<'a> From<Cache> for CacheCow<'a> {\n    fn from(value: Cache) -> Self {\n      CacheCow::Owned(value)\n    }\n  }\n\n  impl<'a> From<&'a Cache> for CacheCow<'a> {\n    fn from(value: &'a Cache) -> Self {\n      CacheCow::Borrowed(value)\n    }\n  }\n}\n\nbitflags! {\n  #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]\n  struct PathFlags: u8 {\n    /// Whether this path is inside a node_modules directory.\n    const IN_NODE_MODULES = 1 << 0;\n    /// Whether this path is a node_modules directory.\n    const IS_NODE_MODULES = 1 << 1;\n  }\n}\n\n/// Cached info about a file path.\nstruct PathInfo {\n  hash: u64,\n  path: PathBuf,\n  flags: PathFlags,\n  parent: Option<CachedPath>,\n  kind: OnceLock<FileKind>,\n  canonical: OnceLock<Result<CachedPath, ResolverError>>,\n  canonicalizing: AtomicU64,\n  package_json: OnceLock<Arc<Result<PackageJson, ResolverError>>>,\n  tsconfig: OnceLock<Arc<Result<TsConfigWrapper, ResolverError>>>,\n}\n\n#[derive(Clone)]\npub struct CachedPath(Arc<PathInfo>);\n\nimpl CachedPath {\n  /// Returns a std Path.\n  pub fn as_path(&self) -> &Path {\n    self.0.path.as_path()\n  }\n\n  /// Returns the parent path.\n  pub fn parent(&self) -> Option<&CachedPath> {\n    self.0.parent.as_ref()\n  }\n\n  fn kind(&self, fs: &dyn FileSystem) -> FileKind {\n    *self.0.kind.get_or_init(|| fs.kind(self.as_path()))\n  }\n\n  /// Returns whether the path is a file.\n  pub fn is_file(&self, fs: &dyn FileSystem) -> bool {\n    self.kind(fs).contains(FileKind::IS_FILE)\n  }\n\n  /// Returns whether the path is a directory.\n  pub fn is_dir(&self, fs: &dyn FileSystem) -> bool {\n    self.kind(fs).contains(FileKind::IS_DIR)\n  }\n\n  /// Returns whether the path is a node_modules directory.\n  pub fn is_node_modules(&self) -> bool {\n    self.0.flags.contains(PathFlags::IS_NODE_MODULES)\n  }\n\n  /// Returns whether the path is inside a node_modules directory.\n  pub fn in_node_modules(&self) -> bool {\n    self.0.flags.contains(PathFlags::IN_NODE_MODULES)\n  }\n\n  /// Returns the canonical path, resolving all symbolic links.\n  pub fn canonicalize(&self, cache: &Cache) -> Result<CachedPath, ResolverError> {\n    // Check if this thread is already canonicalizing. If so, we have found a circular symlink.\n    // If a different thread is canonicalizing, OnceLock will queue this thread to wait for the result.\n    let tid = THREAD_ID.with(|t| *t);\n    if self.0.canonicalizing.load(Ordering::Acquire) == tid {\n      return Err(std::io::Error::new(std::io::ErrorKind::NotFound, \"Circular symlink\").into());\n    }\n\n    self\n      .0\n      .canonical\n      .get_or_init(|| {\n        self.0.canonicalizing.store(tid, Ordering::Release);\n\n        let res = self\n          .parent()\n          .map(|parent| {\n            parent.canonicalize(cache).and_then(|parent_canonical| {\n              let path = parent_canonical.join(\n                self\n                  .as_path()\n                  .strip_prefix(parent.as_path())\n                  .map_err(|_| ResolverError::UnknownError)?,\n                cache,\n              );\n\n              if self.kind(&*cache.fs).contains(FileKind::IS_SYMLINK) {\n                let link = cache.fs.read_link(path.as_path())?;\n                if link.is_absolute() {\n                  return cache.get(&normalize_path(&link)).canonicalize(cache);\n                } else {\n                  return path.resolve(&link, cache).canonicalize(cache);\n                }\n              }\n\n              Ok(path)\n            })\n          })\n          .unwrap_or_else(|| Ok(self.clone()));\n\n        self.0.canonicalizing.store(0, Ordering::Release);\n        res\n      })\n      .clone()\n  }\n\n  /// Returns an iterator over all ancestor paths.\n  pub fn ancestors<'a>(&'a self) -> impl Iterator<Item = &'a CachedPath> {\n    std::iter::successors(Some(self), |p| p.parent())\n  }\n\n  /// Returns the file name of this path (the final path component).\n  pub fn file_name(&self) -> Option<&OsStr> {\n    self.as_path().file_name()\n  }\n\n  /// Returns the file extension of this path.\n  pub fn extension(&self) -> Option<&OsStr> {\n    self.as_path().extension()\n  }\n\n  /// Returns a new path with the given path segment appended to this path.\n  pub fn join<P: AsRef<OsStr>>(&self, segment: P, cache: &Cache) -> CachedPath {\n    SCRATCH_PATH.with(|path| {\n      let path = unsafe { &mut *path.get() };\n      path.clear();\n      path.as_mut_os_string().push(self.as_path().as_os_str());\n      push_normalized(path, segment.as_ref());\n      cache.get(path)\n    })\n  }\n\n  /// Returns a new path with the given node_modules directory appended to this path.\n  pub fn join_module(&self, module: &str, cache: &Cache) -> CachedPath {\n    SCRATCH_PATH.with(|path| {\n      let path = unsafe { &mut *path.get() };\n      path.clear();\n      path.as_mut_os_string().push(self.as_path().as_os_str());\n      path.push(\"node_modules\");\n      push_normalized(path, module);\n      cache.get(path)\n    })\n  }\n\n  /// Returns a new path with the given node_modules directory and package subpath appended to this path.\n  pub fn join_package(&self, module: &str, subpath: &str, cache: &Cache) -> CachedPath {\n    SCRATCH_PATH.with(|path| {\n      let path = unsafe { &mut *path.get() };\n      path.clear();\n      path.as_mut_os_string().push(self.as_path().as_os_str());\n      push_normalized(path, module);\n      push_normalized(path, subpath);\n      cache.get(path)\n    })\n  }\n\n  /// Returns a new path by resolving the given subpath (including \".\" and \"..\" components) with this path.\n  pub fn resolve(&self, subpath: &Path, cache: &Cache) -> CachedPath {\n    SCRATCH_PATH.with(|path| {\n      let path = unsafe { &mut *path.get() };\n      path.clear();\n      if let Some(parent) = self.0.parent.as_ref() {\n        path.as_mut_os_string().push(parent.0.path.as_os_str());\n      }\n\n      for component in subpath.components() {\n        match component {\n          Component::Prefix(..) | Component::RootDir => unreachable!(),\n          Component::CurDir => {}\n          Component::ParentDir => {\n            path.pop();\n          }\n          Component::Normal(c) => {\n            path.push(c);\n          }\n        }\n      }\n\n      cache.get(path)\n    })\n  }\n\n  /// Returns a new path by appending the given file extension (without leading \".\") with this path.\n  pub fn add_extension(&self, ext: &str, cache: &Cache) -> CachedPath {\n    SCRATCH_PATH.with(|path| {\n      let path = unsafe { &mut *path.get() };\n      path.clear();\n      let s = path.as_mut_os_string();\n      s.push(self.as_path().as_os_str());\n      s.push(\".\");\n      s.push(ext);\n      cache.get(path)\n    })\n  }\n\n  /// Returns the parsed package.json at this path.\n  pub fn package_json(&self, cache: &Cache) -> Arc<Result<PackageJson, ResolverError>> {\n    self\n      .0\n      .package_json\n      .get_or_init(|| Arc::new(PackageJson::read(self, cache)))\n      .clone()\n  }\n\n  /// Returns the parsed tsconfig.json at this path.\n  pub fn tsconfig<F: FnOnce(&mut TsConfigWrapper) -> Result<(), ResolverError>>(\n    &self,\n    cache: &Cache,\n    process: F,\n  ) -> Arc<Result<TsConfigWrapper, ResolverError>> {\n    self\n      .0\n      .tsconfig\n      .get_or_init(|| Arc::new(TsConfig::read(self, process, cache)))\n      .clone()\n  }\n}\n\nstatic THREAD_COUNT: AtomicU64 = AtomicU64::new(1);\n\n// Per-thread pre-allocated path that is used to perform operations on paths more quickly.\nthread_local! {\n  pub static SCRATCH_PATH: UnsafeCell<PathBuf> = UnsafeCell::new(PathBuf::with_capacity(256));\n  pub static THREAD_ID: u64 = THREAD_COUNT.fetch_add(1, Ordering::SeqCst);\n}\n\n#[cfg(windows)]\n#[inline]\nfn push_normalized<S: AsRef<OsStr>>(path: &mut PathBuf, s: S) {\n  // PathBuf::push does not normalize separators, so on Windows, push each part separately.\n  // Note that this does not use Path::components because that also strips the trailing separator.\n  let bytes = s.as_ref().as_encoded_bytes();\n  for part in bytes.split(|b| *b == b'/') {\n    path.push(unsafe { OsStr::from_encoded_bytes_unchecked(part) });\n  }\n}\n\n#[cfg(not(windows))]\n#[inline]\nfn push_normalized<S: AsRef<OsStr>>(path: &mut PathBuf, s: S) {\n  path.push(s.as_ref());\n}\n\nimpl Hash for CachedPath {\n  fn hash<H: Hasher>(&self, state: &mut H) {\n    self.0.hash.hash(state);\n  }\n}\n\nimpl PartialEq for CachedPath {\n  fn eq(&self, other: &Self) -> bool {\n    // Cached paths always point to unique values, so we only need to compare the pointers.\n    std::ptr::eq(Arc::as_ptr(&self.0), Arc::as_ptr(&other.0))\n  }\n}\n\nimpl Eq for CachedPath {}\n\nimpl std::fmt::Debug for CachedPath {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    self.0.path.fmt(f)\n  }\n}\n\n/// A hasher that just passes through a value that is already a hash.\n#[derive(Default)]\npub struct IdentityHasher {\n  hash: u64,\n}\n\nimpl Hasher for IdentityHasher {\n  fn write(&mut self, bytes: &[u8]) {\n    if bytes.len() == 8 {\n      self.hash = u64::from_ne_bytes([\n        bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7],\n      ])\n    } else {\n      unreachable!()\n    }\n  }\n\n  fn finish(&self) -> u64 {\n    self.hash\n  }\n}\n\npub fn normalize_path(path: &Path) -> PathBuf {\n  // Normalize path components to resolve \"..\" and \".\" segments.\n  // https://github.com/rust-lang/cargo/blob/fede83ccf973457de319ba6fa0e36ead454d2e20/src/cargo/util/paths.rs#L61\n  let mut components = path.components().peekable();\n  let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().cloned() {\n    components.next();\n    PathBuf::from(c.as_os_str())\n  } else {\n    PathBuf::new()\n  };\n\n  for component in components {\n    match component {\n      Component::Prefix(..) => unreachable!(),\n      Component::RootDir => {\n        ret.push(component.as_os_str());\n      }\n      Component::CurDir => {}\n      Component::ParentDir => {\n        ret.pop();\n      }\n      Component::Normal(c) => {\n        ret.push(c);\n      }\n    }\n  }\n\n  // If the path ends with a separator, add an additional empty component.\n  if matches!(path.as_os_str().as_encoded_bytes().last(), Some(b) if is_separator(*b as char)) {\n    ret.push(\"\");\n  }\n\n  ret\n}\n\n#[cfg(test)]\nmod test {\n  use crate::OsFileSystem;\n\n  use super::*;\n  use assert_fs::prelude::*;\n\n  #[test]\n  fn test_canonicalize() -> Result<(), Box<dyn std::error::Error>> {\n    #[cfg(windows)]\n    if !is_elevated::is_elevated() {\n      println!(\"skipping symlink tests due to missing permissions\");\n      return Ok(());\n    }\n\n    let dir = assert_fs::TempDir::new()?;\n    dir.child(\"foo/bar.js\").write_str(\"\")?;\n    dir.child(\"root.js\").write_str(\"\")?;\n\n    dir\n      .child(\"symlink\")\n      .symlink_to_file(Path::new(\"foo\").join(\"bar.js\"))?;\n    dir\n      .child(\"foo/symlink\")\n      .symlink_to_file(Path::new(\"..\").join(\"root.js\"))?;\n    dir\n      .child(\"absolute\")\n      .symlink_to_file(dir.child(\"root.js\").path())?;\n    dir\n      .child(\"recursive\")\n      .symlink_to_file(Path::new(\"foo\").join(\"symlink\"))?;\n    dir.child(\"cycle\").symlink_to_file(\"cycle1\")?;\n    dir.child(\"cycle1\").symlink_to_file(\"cycle\")?;\n    dir\n      .child(\"absolute_cycle\")\n      .symlink_to_file(dir.child(\"absolute_cycle1\").path())?;\n    dir\n      .child(\"absolute_cycle1\")\n      .symlink_to_file(dir.child(\"absolute_cycle\").path())?;\n    dir.child(\"a/b/c\").create_dir_all()?;\n    dir.child(\"a/b/e\").symlink_to_file(\"..\")?;\n    dir.child(\"a/d\").symlink_to_file(\"..\")?;\n    dir.child(\"a/b/c/x.txt\").write_str(\"\")?;\n    dir\n      .child(\"a/link\")\n      .symlink_to_file(dir.child(\"a/b\").path())?;\n\n    let fs = OsFileSystem::default();\n    let cache = Cache::new(Arc::new(fs));\n\n    assert_eq!(\n      cache\n        .get(dir.child(\"symlink\").path())\n        .canonicalize(&cache)?,\n      cache\n        .get(dir.child(\"foo/bar.js\").path())\n        .canonicalize(&cache)?\n    );\n    assert_eq!(\n      cache\n        .get(dir.child(\"foo/symlink\").path())\n        .canonicalize(&cache)?,\n      cache\n        .get(dir.child(\"root.js\").path())\n        .canonicalize(&cache)?\n    );\n    assert_eq!(\n      cache\n        .get(dir.child(\"absolute\").path())\n        .canonicalize(&cache)?,\n      cache\n        .get(dir.child(\"root.js\").path())\n        .canonicalize(&cache)?\n    );\n    assert_eq!(\n      cache\n        .get(dir.child(\"recursive\").path())\n        .canonicalize(&cache)?,\n      cache\n        .get(dir.child(\"root.js\").path())\n        .canonicalize(&cache)?\n    );\n    assert!(\n      cache\n        .get(dir.child(\"cycle\").path())\n        .canonicalize(&cache)\n        .is_err()\n    );\n    assert!(\n      cache\n        .get(dir.child(\"absolute_cycle\").path())\n        .canonicalize(&cache)\n        .is_err()\n    );\n    assert_eq!(\n      cache\n        .get(dir.child(\"a/b/e/d/a/b/e/d/a\").path())\n        .canonicalize(&cache)?,\n      cache.get(dir.child(\"a\").path()).canonicalize(&cache)?\n    );\n    assert_eq!(\n      cache\n        .get(dir.child(\"a/link/c/x.txt\").path())\n        .canonicalize(&cache)?,\n      cache\n        .get(dir.child(\"a/b/c/x.txt\").path())\n        .canonicalize(&cache)?\n    );\n\n    Ok(())\n  }\n}\n"
  },
  {
    "path": "crates/parcel-resolver/src/error.rs",
    "content": "use crate::PackageJsonError;\nuse crate::specifier::SpecifierError;\nuse std::path::PathBuf;\nuse std::sync::Arc;\n\n/// An error that occcured during resolution.\n#[derive(Debug, Clone, PartialEq, serde::Serialize)]\n#[serde(tag = \"type\")]\npub enum ResolverError {\n  /// An unknown URL scheme was found in the specifier.\n  UnknownScheme { scheme: String },\n  /// An unknown error occurred.\n  UnknownError,\n  /// A file was not found.\n  FileNotFound { relative: PathBuf, from: PathBuf },\n  /// A node_modules directory was not found.\n  ModuleNotFound { module: String },\n  /// A package.json entry field pointed to a non-existent file.\n  ModuleEntryNotFound {\n    /// The node_modules package name.\n    module: String,\n    /// Path of the entry found in package.json.\n    entry_path: PathBuf,\n    /// Path of the package.json.\n    package_path: PathBuf,\n    /// Package.json field name.\n    field: &'static str,\n  },\n  /// A sub-path could not be found within a node_modules package.\n  ModuleSubpathNotFound {\n    /// The node_modules package name.\n    module: String,\n    /// Path of the non-existent file.\n    path: PathBuf,\n    /// Path of the package.json.\n    package_path: PathBuf,\n  },\n  /// An error parsing JSON.\n  JsonError(JsonError),\n  /// An I/O error.\n  IOError(IOError),\n  /// A sub-path was not exported from a package.json.\n  PackageJsonError {\n    /// The node_modules package name.\n    module: String,\n    /// The path of the file that is not exported.\n    path: PathBuf,\n    /// Reason the path was not exported.\n    error: PackageJsonError,\n  },\n  /// A package.json file could not be found above the given path.\n  PackageJsonNotFound { from: PathBuf },\n  /// Could not parse the specifier.\n  InvalidSpecifier(SpecifierError),\n  /// Could not find an extended tsconfig.json file.\n  TsConfigExtendsNotFound {\n    /// Path of the tsconfig.json with the \"extends\" field.\n    tsconfig: PathBuf,\n    /// Original error resolving the tsconfig.json extends specifier.\n    error: Box<ResolverError>,\n  },\n}\n\n/// An error parsing JSON.\n#[derive(Debug, Clone, PartialEq, serde::Serialize)]\npub struct JsonError {\n  /// Path of the JSON file.\n  pub path: PathBuf,\n  /// Line number of the error.\n  pub line: usize,\n  /// Column number of the error.\n  pub column: usize,\n  /// Reason for the error.\n  pub message: String,\n}\n\nimpl JsonError {\n  pub fn new(path: PathBuf, err: serde_json::Error) -> JsonError {\n    JsonError {\n      path,\n      line: err.line(),\n      column: err.column(),\n      message: err.to_string(),\n    }\n  }\n}\n\n#[derive(Debug, Clone)]\npub struct IOError(Arc<std::io::Error>);\n\nimpl serde::Serialize for IOError {\n  fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n  where\n    S: serde::Serializer,\n  {\n    #[derive(serde::Serialize)]\n    struct IOErrorMessage {\n      message: String,\n    }\n\n    let msg = IOErrorMessage {\n      message: self.0.to_string(),\n    };\n\n    msg.serialize(serializer)\n  }\n}\n\nimpl PartialEq for IOError {\n  fn eq(&self, other: &Self) -> bool {\n    self.0.kind() == other.0.kind()\n  }\n}\n\nimpl From<()> for ResolverError {\n  fn from(_: ()) -> Self {\n    ResolverError::UnknownError\n  }\n}\n\nimpl From<std::str::Utf8Error> for ResolverError {\n  fn from(_: std::str::Utf8Error) -> Self {\n    ResolverError::UnknownError\n  }\n}\n\nimpl From<JsonError> for ResolverError {\n  fn from(e: JsonError) -> Self {\n    ResolverError::JsonError(e)\n  }\n}\n\nimpl From<std::io::Error> for ResolverError {\n  fn from(e: std::io::Error) -> Self {\n    ResolverError::IOError(IOError(Arc::new(e)))\n  }\n}\n\nimpl From<SpecifierError> for ResolverError {\n  fn from(value: SpecifierError) -> Self {\n    ResolverError::InvalidSpecifier(value)\n  }\n}\n\nimpl std::fmt::Display for ResolverError {\n  fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n    write!(f, \"{:?}\", self)\n  }\n}\n\nimpl std::error::Error for ResolverError {}\n"
  },
  {
    "path": "crates/parcel-resolver/src/fs.rs",
    "content": "use std::{\n  io::Result,\n  path::{Path, PathBuf},\n};\n\nuse bitflags::bitflags;\n\nbitflags! {\n  /// Bitflags that describe path metadata.\n  #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]\n  pub struct FileKind: u8 {\n    /// If set, the path is a file.\n    const IS_FILE = 1 << 0;\n    /// If set, the path is a directory.\n    const IS_DIR = 1 << 1;\n    /// If set, the path is a symbolic link.\n    const IS_SYMLINK = 1 << 2;\n  }\n}\n\n/// A trait that provides the functions needed to read files and retrieve metadata from a file system.\npub trait FileSystem: Send + Sync {\n  /// Reads the given path as a string.\n  fn read_to_string(&self, path: &Path) -> Result<String>;\n  /// Returns the kind of file or directory that the given path represents.\n  fn kind(&self, path: &Path) -> FileKind;\n  /// Returns the resolution of a symbolic link.\n  fn read_link(&self, path: &Path) -> Result<PathBuf>;\n}\n\n/// Default operating system file system implementation.\n#[cfg(not(target_arch = \"wasm32\"))]\n#[derive(Default)]\npub struct OsFileSystem;\n\n#[cfg(not(target_arch = \"wasm32\"))]\nimpl FileSystem for OsFileSystem {\n  fn read_to_string(&self, path: &Path) -> Result<String> {\n    std::fs::read_to_string(path)\n  }\n\n  fn kind(&self, path: &Path) -> FileKind {\n    let mut flags = FileKind::empty();\n\n    // A majority of paths are not symlinks. symlink_metadata will tell us whether a path is a symlink,\n    // and if not, also whether the path is a file or directory. If it was a symlink we'll need to make\n    // another call to get the metadata of the underlying path, but this is rare.\n    if let Ok(metadata) = path.symlink_metadata() {\n      if metadata.is_symlink() {\n        flags.set(FileKind::IS_SYMLINK, true);\n        if let Ok(metadata) = path.metadata() {\n          flags.set(FileKind::IS_FILE, metadata.is_file());\n          flags.set(FileKind::IS_DIR, metadata.is_dir());\n        }\n      } else {\n        flags.set(FileKind::IS_FILE, metadata.is_file());\n        flags.set(FileKind::IS_DIR, metadata.is_dir());\n      }\n    }\n\n    flags\n  }\n\n  fn read_link(&self, path: &Path) -> Result<PathBuf> {\n    path.read_link()\n  }\n}\n"
  },
  {
    "path": "crates/parcel-resolver/src/invalidations.rs",
    "content": "use std::{\n  cell::{Cell, RefCell},\n  collections::HashSet,\n  hash::BuildHasherDefault,\n  sync::Arc,\n};\n\nuse rustc_hash::FxHasher;\n\nuse crate::{\n  ResolverError,\n  cache::{CachedPath, IdentityHasher},\n};\n\n/// Files that should invalidate the cache when they are created.\n#[derive(PartialEq, Eq, Hash, Debug, Clone)]\npub enum FileCreateInvalidation {\n  /// Invalidate the cache if this path is created.\n  Path(CachedPath),\n  /// Invalidate the cache if a file of the given name is created\n  /// above the given path in the file hierarchy.\n  FileName {\n    file_name: String,\n    above: CachedPath,\n  },\n  /// Invalidate the cache if a file matching the given glob is created.\n  Glob(String),\n}\n\n/// Tracks the files that are involved with a resolution, in order to invalidate caches.\n#[derive(Default, Debug)]\npub struct Invalidations {\n  /// Files that should invalidate the cache when they are created.\n  pub invalidate_on_file_create:\n    RefCell<HashSet<FileCreateInvalidation, BuildHasherDefault<FxHasher>>>,\n  /// Files that should invalidate the cache when they are updated.\n  pub invalidate_on_file_change: RefCell<HashSet<CachedPath, BuildHasherDefault<IdentityHasher>>>,\n  /// Whether the resolution is non-deterministic, and should invalidate on process restart.\n  pub invalidate_on_startup: Cell<bool>,\n}\n\nimpl Invalidations {\n  /// Invalidate the cache if this path is created.\n  pub fn invalidate_on_file_create(&self, path: CachedPath) {\n    self\n      .invalidate_on_file_create\n      .borrow_mut()\n      .insert(FileCreateInvalidation::Path(path));\n  }\n\n  /// Invalidate the cache if a file of the given name is created\n  /// above the given path in the file hierarchy.\n  pub fn invalidate_on_file_create_above<S: Into<String>>(&self, file_name: S, above: CachedPath) {\n    self\n      .invalidate_on_file_create\n      .borrow_mut()\n      .insert(FileCreateInvalidation::FileName {\n        file_name: file_name.into(),\n        above,\n      });\n  }\n\n  /// Invalidate the cache if a file matching the given glob is created.\n  pub fn invalidate_on_glob_create<S: Into<String>>(&self, glob: S) {\n    self\n      .invalidate_on_file_create\n      .borrow_mut()\n      .insert(FileCreateInvalidation::Glob(glob.into()));\n  }\n\n  /// Invalidate the cache if the given file changes.\n  pub fn invalidate_on_file_change(&self, invalidation: CachedPath) {\n    self\n      .invalidate_on_file_change\n      .borrow_mut()\n      .insert(invalidation);\n  }\n\n  /// Invalidate the cache whenever the process restarts.\n  pub fn invalidate_on_startup(&self) {\n    self.invalidate_on_startup.set(true)\n  }\n\n  /// Extend these invalidations with the given invalidations.\n  pub fn extend(&self, other: &Invalidations) {\n    for f in other.invalidate_on_file_create.borrow().iter() {\n      self\n        .invalidate_on_file_create\n        .borrow_mut()\n        .insert(f.clone());\n    }\n\n    for f in other.invalidate_on_file_change.borrow().iter() {\n      self\n        .invalidate_on_file_change\n        .borrow_mut()\n        .insert(f.clone());\n    }\n\n    if other.invalidate_on_startup.get() {\n      self.invalidate_on_startup();\n    }\n  }\n\n  pub(crate) fn read<V, F: FnOnce() -> Arc<Result<V, ResolverError>>>(\n    &self,\n    path: &CachedPath,\n    f: F,\n  ) -> Arc<Result<V, ResolverError>> {\n    let res = f();\n    match &*res {\n      Ok(_) => {\n        self.invalidate_on_file_change(path.clone());\n      }\n      Err(e) => {\n        if matches!(e, ResolverError::IOError(..)) {\n          self.invalidate_on_file_create(path.clone());\n        }\n      }\n    }\n    res\n  }\n}\n"
  },
  {
    "path": "crates/parcel-resolver/src/json_comments_rs/LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "crates/parcel-resolver/src/json_comments_rs/README.md",
    "content": "# json-comments-rs\n\n[![Build Status](https://github.com/tmccombs/json-comments-rs/actions/workflows/build/badge.svg?branch=main)](https://github.com/tmccombs/json-comments-rs/actions)\n[![Docs](https://docs.rs/json_comments/badge.svg)](https://docs.rs/json_comments/)\n\n`json_comments` is a library to strip out comments from JSON-like text. By processing text\nthrough a [`StripComments`] adapter first, it is possible to use a standard JSON parser (such\nas [serde_json](https://crates.io/crates/serde_json) with quasi-json input that contains\ncomments.\n\nIn fact, this code makes few assumptions about the input and could probably be used to strip\ncomments out of other types of code as well, provided that strings use double quotes and\nbackslashes are used for escapes in strings.\n\nThe following types of comments are supported:\n\n- C style block comments (`/* ... */`)\n- C style line comments (`// ...`)\n- Shell style line comments (`# ...`)\n\n## Example using serde_json\n\n```rust\nuse serde_json::{Result, Value};\nuse json_comments::StripComments;\n\nfn main() -> Result<()> {\n// Some JSON input data as a &str. Maybe this comes form the user.\nlet data = r#\"\n    {\n        \"name\": /* full */ \"John Doe\",\n        \"age\": 43,\n        \"phones\": [\n            \"+44 1234567\", // work phone\n            \"+44 2345678\"  // home phone\n        ]\n    }\"#;\n\n// Strip the comments from the input (use `as_bytes()` to get a `Read`).\nlet stripped = StripComments::new(data.as_bytes());\n// Parse the string of data into serde_json::Value.\nlet v: Value = serde_json::from_reader(stripped)?;\n\nprintln!(\"Please call {} at the number {}\", v[\"name\"], v[\"phones\"][0]);\n\nOk(())\n}\n```\n"
  },
  {
    "path": "crates/parcel-resolver/src/json_comments_rs/mod.rs",
    "content": "#![allow(dead_code)]\n//! `json_comments` is a library to strip out comments from JSON-like test. By processing text\n//! through a [`StripComments`] adapter first, it is possible to use a standard JSON parser (such\n//! as [serde_json](https://crates.io/crates/serde_json) with quasi-json input that contains\n//! comments.\n//!\n//! In fact, this code makes few assumptions about the input and could probably be used to strip\n//! comments out of other types of code as well, provided that strings use double quotes and\n//! backslashes are used for escapes in strings.\n//!\n//! The following types of comments are supported:\n//!   - C style block comments (`/* ... */`)\n//!   - C style line comments (`// ...`)\n//!   - Shell style line comments (`# ...`)\n//!\nuse std::{\n  io::{ErrorKind, Read, Result},\n  slice::IterMut,\n};\n\n#[derive(Eq, PartialEq, Copy, Clone, Debug)]\nenum State {\n  Top,\n  InString,\n  StringEscape,\n  InComment,\n  InBlockComment,\n  MaybeCommentEnd,\n  InLineComment,\n}\n\nuse State::*;\n\n/// A [`Read`] that transforms another [`Read`] so that it changes all comments to spaces so that a downstream json parser\n/// (such as json-serde) doesn't choke on them.\n///\n/// The supported comments are:\n///   - C style block comments (`/* ... */`)\n///   - C style line comments (`// ...`)\n///   - Shell style line comments (`# ...`)\npub struct StripComments<T: Read> {\n  inner: T,\n  state: State,\n  settings: CommentSettings,\n}\n\nimpl<T> StripComments<T>\nwhere\n  T: Read,\n{\n  pub fn new(input: T) -> Self {\n    Self {\n      inner: input,\n      state: Top,\n      settings: CommentSettings::default(),\n    }\n  }\n\n  /// Create a new `StripComments` with settings which may be different from the default.\n  ///\n  /// This is useful if you wish to disable allowing certain kinds of comments.\n  #[inline]\n  pub fn with_settings(settings: CommentSettings, input: T) -> Self {\n    Self {\n      inner: input,\n      state: Top,\n      settings,\n    }\n  }\n}\n\nmacro_rules! invalid_data {\n  () => {\n    return Err(ErrorKind::InvalidData.into())\n  };\n}\n\nimpl<T> Read for StripComments<T>\nwhere\n  T: Read,\n{\n  fn read(&mut self, buf: &mut [u8]) -> Result<usize> {\n    let count = self.inner.read(buf)?;\n    if count > 0 {\n      strip_buf(&mut self.state, &mut buf[..count], &self.settings, false)?;\n    } else if self.state != Top && self.state != InLineComment {\n      invalid_data!();\n    }\n    Ok(count)\n  }\n}\n\nfn consume_comment_whitespace_until_maybe_bracket(\n  state: &mut State,\n  it: &mut IterMut<u8>,\n  settings: &CommentSettings,\n) -> Result<bool> {\n  for c in it.by_ref() {\n    *state = match state {\n      Top => {\n        *state = top(c, settings);\n        if c.is_ascii_whitespace() {\n          continue;\n        } else {\n          return Ok(*c == b'}' || *c == b']');\n        }\n      }\n      InString => in_string(*c),\n      StringEscape => InString,\n      InComment => in_comment(c, settings)?,\n      InBlockComment => in_block_comment(c),\n      MaybeCommentEnd => maybe_comment_end(c),\n      InLineComment => in_line_comment(c),\n    };\n  }\n  Ok(false)\n}\n\nfn strip_buf(\n  state: &mut State,\n  buf: &mut [u8],\n  settings: &CommentSettings,\n  remove_trailing_commas: bool,\n) -> Result<()> {\n  let mut it = buf.iter_mut();\n  while let Some(c) = it.next() {\n    if matches!(state, Top) {\n      *state = top(c, settings);\n      if remove_trailing_commas\n        && *c == b','\n        && consume_comment_whitespace_until_maybe_bracket(state, &mut it, settings)?\n      {\n        *c = b' ';\n      }\n    } else {\n      *state = match state {\n        Top => unreachable!(),\n        InString => in_string(*c),\n        StringEscape => InString,\n        InComment => in_comment(c, settings)?,\n        InBlockComment => in_block_comment(c),\n        MaybeCommentEnd => maybe_comment_end(c),\n        InLineComment => in_line_comment(c),\n      }\n    }\n  }\n  Ok(())\n}\n\n/// Strips comments from a string in place, replacing it with whitespaces.\npub fn strip_comments_in_place(\n  s: &mut str,\n  settings: CommentSettings,\n  remove_trailing_commas: bool,\n) -> Result<()> {\n  strip_buf(\n    &mut Top,\n    unsafe { s.as_bytes_mut() },\n    &settings,\n    remove_trailing_commas,\n  )\n}\n\n/// Settings for `StripComments`\n///\n/// The default is for all comment types to be enabled.\n#[derive(Copy, Clone, Debug)]\npub struct CommentSettings {\n  /// True if c-style block comments (`/* ... */`) are allowed\n  block_comments: bool,\n  /// True if c-style `//` line comments are allowed\n  slash_line_comments: bool,\n  /// True if shell-style `#` line comments are allowed\n  hash_line_comments: bool,\n}\n\nimpl Default for CommentSettings {\n  fn default() -> Self {\n    Self::all()\n  }\n}\n\nimpl CommentSettings {\n  /// Enable all comment Styles\n  pub const fn all() -> Self {\n    Self {\n      block_comments: true,\n      slash_line_comments: true,\n      hash_line_comments: true,\n    }\n  }\n  /// Only allow line comments starting with `#`\n  pub const fn hash_only() -> Self {\n    Self {\n      hash_line_comments: true,\n      block_comments: false,\n      slash_line_comments: false,\n    }\n  }\n  /// Only allow \"c-style\" comments.\n  ///\n  /// Specifically, line comments beginning with `//` and\n  /// block comment like `/* ... */`.\n  pub const fn c_style() -> Self {\n    Self {\n      block_comments: true,\n      slash_line_comments: true,\n      hash_line_comments: false,\n    }\n  }\n\n  /// Create a new `StripComments` for `input`, using these settings.\n  ///\n  /// Transform `input` into a [`Read`] that strips out comments.\n  /// The types of comments to support are determined by the configuration of\n  /// `self`.\n  #[inline]\n  pub fn strip_comments<I: Read>(self, input: I) -> StripComments<I> {\n    StripComments::with_settings(self, input)\n  }\n}\n\nfn top(c: &mut u8, settings: &CommentSettings) -> State {\n  match *c {\n    b'\"' => InString,\n    b'/' => {\n      *c = b' ';\n      InComment\n    }\n    b'#' if settings.hash_line_comments => {\n      *c = b' ';\n      InLineComment\n    }\n    _ => Top,\n  }\n}\n\nfn in_string(c: u8) -> State {\n  match c {\n    b'\"' => Top,\n    b'\\\\' => StringEscape,\n    _ => InString,\n  }\n}\n\nfn in_comment(c: &mut u8, settings: &CommentSettings) -> Result<State> {\n  let new_state = match c {\n    b'*' if settings.block_comments => InBlockComment,\n    b'/' if settings.slash_line_comments => InLineComment,\n    _ => invalid_data!(),\n  };\n  *c = b' ';\n  Ok(new_state)\n}\n\nfn in_block_comment(c: &mut u8) -> State {\n  let old = *c;\n  *c = b' ';\n  if old == b'*' {\n    MaybeCommentEnd\n  } else {\n    InBlockComment\n  }\n}\n\nfn maybe_comment_end(c: &mut u8) -> State {\n  let old = *c;\n  *c = b' ';\n  if old == b'/' {\n    *c = b' ';\n    Top\n  } else {\n    InBlockComment\n  }\n}\n\nfn in_line_comment(c: &mut u8) -> State {\n  if *c == b'\\n' {\n    Top\n  } else {\n    *c = b' ';\n    InLineComment\n  }\n}\n\n#[cfg(test)]\nmod tests {\n  use std::io::{ErrorKind, Read};\n\n  use super::*;\n\n  fn strip_string(input: &str) -> String {\n    let mut out = String::new();\n    let count = StripComments::new(input.as_bytes())\n      .read_to_string(&mut out)\n      .unwrap();\n    assert_eq!(count, input.len());\n    out\n  }\n\n  #[test]\n  fn block_comments() {\n    let json = r#\"{/* Comment */\"hi\": /** abc */ \"bye\"}\"#;\n    let stripped = strip_string(json);\n    assert_eq!(stripped, r#\"{             \"hi\":            \"bye\"}\"#);\n  }\n\n  #[test]\n  fn block_comments_with_possible_end() {\n    let json = r#\"{/* Comment*PossibleEnd */\"hi\": /** abc */ \"bye\"}\"#;\n    let stripped = strip_string(json);\n    assert_eq!(\n      stripped,\n      r#\"{                         \"hi\":            \"bye\"}\"#\n    );\n  }\n\n  #[test]\n  fn line_comments() {\n    let json = r#\"{\n            // line comment\n            \"a\": 4,\n            # another\n        }\"#;\n\n    let expected = \"{\n                           \\n            \\\"a\\\": 4,\n                     \\n        }\";\n\n    assert_eq!(strip_string(json), expected);\n  }\n\n  #[test]\n  fn incomplete_string() {\n    let json = r#\"\"foo\"#;\n    let mut stripped = String::new();\n\n    let err = StripComments::new(json.as_bytes())\n      .read_to_string(&mut stripped)\n      .unwrap_err();\n    assert_eq!(err.kind(), ErrorKind::InvalidData);\n  }\n\n  #[test]\n  fn incomplete_comment() {\n    let json = r#\"/* foo \"#;\n    let mut stripped = String::new();\n\n    let err = StripComments::new(json.as_bytes())\n      .read_to_string(&mut stripped)\n      .unwrap_err();\n    assert_eq!(err.kind(), ErrorKind::InvalidData);\n  }\n\n  #[test]\n  fn incomplete_comment2() {\n    let json = r#\"/* foo *\"#;\n    let mut stripped = String::new();\n\n    let err = StripComments::new(json.as_bytes())\n      .read_to_string(&mut stripped)\n      .unwrap_err();\n    assert_eq!(err.kind(), ErrorKind::InvalidData);\n  }\n\n  #[test]\n  fn no_hash_comments() {\n    let json = r#\"# bad comment\n        {\"a\": \"b\"}\"#;\n    let mut stripped = String::new();\n    CommentSettings::c_style()\n      .strip_comments(json.as_bytes())\n      .read_to_string(&mut stripped)\n      .unwrap();\n    assert_eq!(stripped, json);\n  }\n\n  #[test]\n  fn no_slash_line_comments() {\n    let json = r#\"// bad comment\n        {\"a\": \"b\"}\"#;\n    let mut stripped = String::new();\n    let err = CommentSettings::hash_only()\n      .strip_comments(json.as_bytes())\n      .read_to_string(&mut stripped)\n      .unwrap_err();\n    assert_eq!(err.kind(), ErrorKind::InvalidData);\n  }\n\n  #[test]\n  fn no_block_comments() {\n    let json = r#\"/* bad comment */ {\"a\": \"b\"}\"#;\n    let mut stripped = String::new();\n    let err = CommentSettings::hash_only()\n      .strip_comments(json.as_bytes())\n      .read_to_string(&mut stripped)\n      .unwrap_err();\n    assert_eq!(err.kind(), ErrorKind::InvalidData);\n  }\n\n  #[test]\n  fn strip_in_place() {\n    let mut json = String::from(r#\"{/* Comment */\"hi\": /** abc */ \"bye\"}\"#);\n    strip_comments_in_place(&mut json, Default::default(), false).unwrap();\n    assert_eq!(json, r#\"{             \"hi\":            \"bye\"}\"#);\n  }\n\n  #[test]\n  fn trailing_comma() {\n    let mut json = String::from(\n      r#\"{\n            \"a1\": [1,],\n            \"a2\": [1,/* x */],\n            \"a3\": [\n                1, // x\n            ],\n            \"o1\": {v:1,},\n            \"o2\": {v:1,/* x */},\n            \"o3\": {\n                \"v\":1, // x\n            },\n            # another\n        }\"#,\n    );\n    strip_comments_in_place(&mut json, Default::default(), true).unwrap();\n\n    let expected = r#\"{\n            \"a1\": [1 ],\n            \"a2\": [1        ],\n            \"a3\": [\n                1      \n            ],\n            \"o1\": {v:1 },\n            \"o2\": {v:1        },\n            \"o3\": {\n                \"v\":1      \n            } \n                     \n        }\"#;\n\n    assert_eq!(json, expected);\n  }\n}\n"
  },
  {
    "path": "crates/parcel-resolver/src/lib.rs",
    "content": "//! parcel-resolver implements the Node.js module resolution algorithm.\n//! It supports both CommonJS and ES module resolution, along with many\n//! additional features supported by various tools in the JavaScript ecosystem,\n//! such as TypeScript's tsconfig paths and extension rewriting, the \"alias\"\n//! and \"browser\" fields used by bundlers, absolute and tilde paths, and more.\n//! These can be individually turned on or off using feature flags.\n//!\n//! For a full description of all supported resolution features, see [Parcel's documentation](https://parceljs.org/features/dependency-resolution/).\n//!\n//! # Example\n//!\n//! To create a resolver, first create a [Cache]. This stores information about the files\n//! in a [FileSystem], and can be reused between multiple resolvers. A fresh cache\n//! should generally be created once per build to ensure information is up to date.\n//!\n//! Next, create a [Resolver] using one of the constructors. For example, `Resolver::node`\n//! creates a Node.js compatible CommonJS resolver, `Resolver::node_esm` creates an ESM resolver,\n//! and `Resolver::parcel` creates a Parcel-compatible resolver. From there you can customize individual\n//! features such as extensions or index files by setting properties on the resolver.\n//!\n//! Finally, call `resolver.resolve` to resolve a specifier. This returns a result, along with [Invalidations]\n//! describing the files that should invalidate any resolution caches.\n//!\n//! ```\n//! use parcel_resolver::{Cache, Resolver, SpecifierType, ResolutionAndQuery};\n//! use std::path::Path;\n//!\n//! let cache = Cache::default();\n//! let resolver = Resolver::node_esm(Path::new(\"/path/to/project-root\"), &cache);\n//!\n//! let res = resolver.resolve(\n//!   \"lodash\",\n//!   Path::new(\"/path/to/project-root/index.js\"),\n//!   SpecifierType::Esm\n//! );\n//!\n//! if let Ok(ResolutionAndQuery { resolution, query }) = res.result {\n//!   // Do something with the resolution!\n//! }\n//! ```\n\nuse std::{\n  borrow::Cow,\n  cell::OnceCell,\n  collections::HashMap,\n  path::{Path, PathBuf, is_separator},\n  sync::Arc,\n};\n\nuse bitflags::bitflags;\n\npub use cache::Cache;\nuse cache::CachedPath;\nuse cache::private::CacheCow;\npub use error::ResolverError;\n#[cfg(not(target_arch = \"wasm32\"))]\npub use fs::OsFileSystem;\npub use fs::{FileKind, FileSystem};\npub use invalidations::*;\nuse package_json::{AliasValue, ExportsResolution, PackageJson};\npub use package_json::{ExportsCondition, Fields, ModuleType, PackageJsonError};\npub use specifier::{Specifier, SpecifierError, SpecifierType};\nuse specifier::{parse_package_specifier, parse_scheme};\nuse tsconfig::TsConfigWrapper;\n\nmod builtins;\nmod cache;\nmod error;\nmod fs;\nmod invalidations;\nmod json_comments_rs;\nmod package_json;\nmod specifier;\nmod tsconfig;\nmod url_to_path;\n\nbitflags! {\n  /// Resolution features to enable.\n  #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]\n  pub struct Flags: u16 {\n    /// Parcel-style absolute paths resolved relative to project root.\n    const ABSOLUTE_SPECIFIERS = 1 << 0;\n    /// Parcel-style tilde specifiers resolved relative to nearest module root.\n    const TILDE_SPECIFIERS = 1 << 1;\n    /// The `npm:` scheme.\n    const NPM_SCHEME = 1 << 2;\n    /// The \"alias\" field in package.json.\n    const ALIASES = 1 << 3;\n    /// The settings in tsconfig.json.\n    const TSCONFIG = 1 << 4;\n    /// The \"exports\" and \"imports\" fields in package.json.\n    const EXPORTS = 1 << 5;\n    /// Directory index files, e.g. index.js.\n    const DIR_INDEX = 1 << 6;\n    /// Optional extensions in specifiers, using the `extensions` setting.\n    const OPTIONAL_EXTENSIONS = 1 << 7;\n    /// Whether extensions are replaced in specifiers, e.g. `./foo.js` -> `./foo.ts`.\n    /// This also allows omitting the `.ts` and `.tsx` extensions when outside node_modules.\n    const TYPESCRIPT_EXTENSIONS = 1 << 8;\n    /// Whether to allow omitting the extension when resolving the same file type.\n    const PARENT_EXTENSION = 1 << 9;\n    /// Whether to allow optional extensions in the \"exports\" field.\n    const EXPORTS_OPTIONAL_EXTENSIONS = 1 << 10;\n\n    /// Default Node settings for CommonJS.\n    const NODE_CJS = Self::EXPORTS.bits() | Self::DIR_INDEX.bits() | Self::OPTIONAL_EXTENSIONS.bits();\n    /// Default Node settings for ESM.\n    const NODE_ESM = Self::EXPORTS.bits();\n    /// Default TypeScript settings.\n    const TYPESCRIPT = Self::TSCONFIG.bits() | Self::EXPORTS.bits() | Self::DIR_INDEX.bits() | Self::OPTIONAL_EXTENSIONS.bits() | Self::TYPESCRIPT_EXTENSIONS.bits() | Self::EXPORTS_OPTIONAL_EXTENSIONS.bits();\n  }\n}\n\n/// Describes which modules in node_modules should be resolved.\n#[derive(Clone)]\npub enum IncludeNodeModules {\n  /// Whether or not to include all node_modules.\n  Bool(bool),\n  /// An array of node_modules to include.\n  Array(Vec<String>),\n  /// A mapping of node_modules and whether to include them.\n  Map(HashMap<String, bool>),\n}\n\nimpl Default for IncludeNodeModules {\n  fn default() -> Self {\n    IncludeNodeModules::Bool(true)\n  }\n}\n\ntype ResolveModuleDir = dyn Fn(&str, &Path) -> Result<PathBuf, ResolverError> + Send + Sync;\n\n/// Implements the Node.js module resolution algorithm.\npub struct Resolver<'a> {\n  /// The root path of the project.\n  pub project_root: CachedPath,\n  /// A list of file extensions to try when resolving.\n  pub extensions: Extensions<'a>,\n  /// A file name (without extension) for the index file of a directory.\n  pub index_file: &'a str,\n  /// package.json entry fields to try.\n  pub entries: Fields,\n  /// Resolution features to enable.\n  pub flags: Flags,\n  /// Configures which node_modules should be resolved.\n  pub include_node_modules: Cow<'a, IncludeNodeModules>,\n  /// package.json \"exports\" conditions to enable.\n  pub conditions: ExportsCondition,\n  /// A custom module directory resolution function, e.g. Yarn PnP.\n  pub module_dir_resolver: Option<Arc<ResolveModuleDir>>,\n  cache: CacheCow<'a>,\n}\n\n/// A list of file extensions to try when resolving.\npub enum Extensions<'a> {\n  Borrowed(&'a [&'a str]),\n  Owned(Vec<String>),\n}\n\nimpl<'a> Extensions<'a> {\n  fn iter(&self) -> impl Iterator<Item = &str> {\n    match self {\n      Extensions::Borrowed(v) => itertools::Either::Left(v.iter().copied()),\n      Extensions::Owned(v) => itertools::Either::Right(v.iter().map(|s| s.as_str())),\n    }\n  }\n}\n\n/// Options for individual resolution requests.\n#[derive(Default, Debug)]\npub struct ResolveOptions {\n  /// Known condition flags.\n  pub conditions: ExportsCondition,\n  /// Custom conditions.\n  pub custom_conditions: Vec<String>,\n}\n\n/// Describes the result of a resolution request.\n#[derive(Debug, PartialEq, Eq, Clone, serde::Serialize)]\n#[serde(tag = \"type\", content = \"value\")]\npub enum Resolution {\n  /// Resolved to a file path.\n  Path(PathBuf),\n  /// Resolved to a runtime builtin module.\n  Builtin { scheme: String, module: String },\n  /// Resolved to an external module that should not be bundled.\n  External,\n  /// Resolved to an empty module (e.g. `false` in the package.json#browser field).\n  Empty,\n  /// Resolved to a global variable.\n  Global(String),\n}\n\n/// The resolved path and query string from the original specifier, if any.\n#[derive(Debug, PartialEq, Eq, Clone, serde::Serialize)]\npub struct ResolutionAndQuery {\n  /// The result of the resolution request.\n  pub resolution: Resolution,\n  /// The query string from the original specifier, if any.\n  pub query: Option<String>,\n}\n\n/// The result of a resolution request, and list of files that should invalidate the cache.\npub struct ResolveResult {\n  /// The resolution result.\n  pub result: Result<ResolutionAndQuery, ResolverError>,\n  /// List of files that should invalidate the cache.\n  pub invalidations: Invalidations,\n}\n\nimpl<'a> Resolver<'a> {\n  /// Creates a resolver with Node.js CommonJS settings.\n  pub fn node<C: Into<CacheCow<'a>>>(project_root: &Path, cache: C) -> Self {\n    let cache: CacheCow = cache.into();\n    Self {\n      project_root: cache.get(&project_root),\n      extensions: Extensions::Borrowed(&[\"js\", \"json\", \"node\"]),\n      index_file: \"index\",\n      entries: Fields::MAIN,\n      flags: Flags::NODE_CJS,\n      cache,\n      include_node_modules: Cow::Owned(IncludeNodeModules::default()),\n      conditions: ExportsCondition::NODE,\n      module_dir_resolver: None,\n    }\n  }\n\n  /// Creates a resolver with Node.js ESM settings.\n  pub fn node_esm<C: Into<CacheCow<'a>>>(project_root: &Path, cache: C) -> Self {\n    let cache: CacheCow = cache.into();\n    Self {\n      project_root: cache.get(&project_root),\n      extensions: Extensions::Borrowed(&[]),\n      index_file: \"index\",\n      entries: Fields::MAIN,\n      flags: Flags::NODE_ESM,\n      cache,\n      include_node_modules: Cow::Owned(IncludeNodeModules::default()),\n      conditions: ExportsCondition::NODE,\n      module_dir_resolver: None,\n    }\n  }\n\n  /// Creates a resolver with Parcel settings.\n  pub fn parcel<C: Into<CacheCow<'a>>>(project_root: &Path, cache: C) -> Self {\n    let cache: CacheCow = cache.into();\n    Self {\n      project_root: cache.get(&project_root),\n      extensions: Extensions::Borrowed(&[\"mjs\", \"js\", \"jsx\", \"cjs\", \"json\"]),\n      index_file: \"index\",\n      entries: Fields::MAIN | Fields::SOURCE | Fields::BROWSER | Fields::MODULE,\n      flags: Flags::all(),\n      cache,\n      include_node_modules: Cow::Owned(IncludeNodeModules::default()),\n      conditions: ExportsCondition::empty(),\n      module_dir_resolver: None,\n    }\n  }\n\n  /// Resolves a specifier relative to the given path, with default options.\n  pub fn resolve(\n    &self,\n    specifier: &str,\n    from: &Path,\n    specifier_type: SpecifierType,\n  ) -> ResolveResult {\n    self.resolve_with_options(specifier, from, specifier_type, Default::default())\n  }\n\n  /// Resolves a specifier relative to the given path, with custom options.\n  pub fn resolve_with_options(\n    &self,\n    specifier: &str,\n    from: &Path,\n    specifier_type: SpecifierType,\n    options: ResolveOptions,\n  ) -> ResolveResult {\n    let invalidations = Invalidations::default();\n    let result =\n      self.resolve_with_invalidations(specifier, from, specifier_type, &invalidations, options);\n\n    ResolveResult {\n      result,\n      invalidations,\n    }\n  }\n\n  /// Resolves a specifier with pre-existing Invalidations.\n  pub fn resolve_with_invalidations(\n    &self,\n    specifier: &str,\n    from: &Path,\n    specifier_type: SpecifierType,\n    invalidations: &Invalidations,\n    options: ResolveOptions,\n  ) -> Result<ResolutionAndQuery, ResolverError> {\n    let (specifier, query) = match Specifier::parse(specifier, specifier_type, self.flags) {\n      Ok(s) => s,\n      Err(e) => return Err(e.into()),\n    };\n    let from = self.cache.get(from);\n    let mut request = ResolveRequest::new(self, &specifier, specifier_type, &from, invalidations);\n    if !options.conditions.is_empty() || !options.custom_conditions.is_empty() {\n      // If custom conditions are defined, these override the default conditions inferred from the specifier type.\n      request.conditions = self.conditions | options.conditions;\n      request.custom_conditions = options.custom_conditions.as_slice();\n    }\n\n    match request.resolve() {\n      Ok(r) => Ok(ResolutionAndQuery {\n        resolution: r,\n        query: query.map(|q| q.to_owned()),\n      }),\n      Err(r) => Err(r),\n    }\n  }\n\n  /// Returns whether the given path has side effects, according to its parent package.json.\n  pub fn resolve_side_effects(\n    &self,\n    path: &Path,\n    invalidations: &Invalidations,\n  ) -> Result<bool, ResolverError> {\n    if let Some(package) = self.find_package(&self.cache.get(path.parent().unwrap()), invalidations)\n    {\n      Ok(unwrap_arc(&package)?.has_side_effects(path))\n    } else {\n      Ok(true)\n    }\n  }\n\n  /// Returns the module type (CommonJS, ESM, or JSON) of the given path,\n  /// according to either its extension or the package.json `type` field.\n  pub fn resolve_module_type(\n    &self,\n    path: &Path,\n    invalidations: &Invalidations,\n  ) -> Result<ModuleType, ResolverError> {\n    if let Some(ext) = path.extension() {\n      if ext == \"mjs\" {\n        return Ok(ModuleType::Module);\n      }\n\n      if ext == \"cjs\" || ext == \"node\" {\n        return Ok(ModuleType::CommonJs);\n      }\n\n      if ext == \"json\" {\n        return Ok(ModuleType::Json);\n      }\n\n      if ext == \"js\" {\n        if let Some(package) =\n          self.find_package(&self.cache.get(path.parent().unwrap()), invalidations)\n        {\n          return Ok(unwrap_arc(&package)?.module_type);\n        }\n      }\n    }\n\n    Ok(ModuleType::CommonJs)\n  }\n\n  fn find_package(\n    &self,\n    from: &CachedPath,\n    invalidations: &Invalidations,\n  ) -> Option<Arc<Result<PackageJson, ResolverError>>> {\n    if let Some(path) = self.find_ancestor_file(from, \"package.json\", invalidations) {\n      let package = path.package_json(&self.cache);\n      return Some(package);\n    }\n\n    None\n  }\n\n  fn find_ancestor_file(\n    &self,\n    from: &CachedPath,\n    filename: &str,\n    invalidations: &Invalidations,\n  ) -> Option<CachedPath> {\n    let mut first = true;\n    for dir in from.ancestors() {\n      if dir.is_node_modules() {\n        break;\n      }\n\n      let file = dir.join(filename, &self.cache);\n      if file.is_file(&*self.cache.fs) {\n        invalidations.invalidate_on_file_change(file.clone());\n        return Some(file);\n      }\n\n      if *dir == self.project_root {\n        break;\n      }\n\n      if first {\n        invalidations.invalidate_on_file_create_above(filename, from.clone());\n      }\n\n      first = false;\n    }\n\n    None\n  }\n\n  /// Returns the resolution cache.\n  pub fn cache(&self) -> &Cache {\n    &self.cache\n  }\n}\n\nstruct ResolveRequest<'a> {\n  resolver: &'a Resolver<'a>,\n  specifier: &'a Specifier<'a>,\n  specifier_type: SpecifierType,\n  from: &'a CachedPath,\n  flags: RequestFlags,\n  tsconfig: OnceCell<Option<Arc<Result<TsConfigWrapper, ResolverError>>>>,\n  root_package: OnceCell<Option<Arc<Result<PackageJson, ResolverError>>>>,\n  invalidations: &'a Invalidations,\n  conditions: ExportsCondition,\n  custom_conditions: &'a [String],\n  priority_extension: Option<&'a str>,\n}\n\nbitflags! {\n  struct RequestFlags: u8 {\n    const IN_TS_FILE = 1 << 0;\n    const IN_JS_FILE = 1 << 1;\n    const IN_NODE_MODULES = 1 << 2;\n  }\n}\n\nimpl<'a> ResolveRequest<'a> {\n  fn new(\n    resolver: &'a Resolver<'a>,\n    specifier: &'a Specifier<'a>,\n    mut specifier_type: SpecifierType,\n    from: &'a CachedPath,\n    invalidations: &'a Invalidations,\n  ) -> Self {\n    let mut flags = RequestFlags::empty();\n    let ext = from.extension();\n    if let Some(ext) = ext {\n      if ext == \"ts\" || ext == \"tsx\" || ext == \"mts\" || ext == \"cts\" {\n        flags |= RequestFlags::IN_TS_FILE;\n      } else if ext == \"js\" || ext == \"jsx\" || ext == \"mjs\" || ext == \"cjs\" {\n        flags |= RequestFlags::IN_JS_FILE;\n      }\n    }\n\n    if from.in_node_modules() {\n      flags |= RequestFlags::IN_NODE_MODULES;\n    }\n\n    // Replace the specifier type for `npm:` URLs so we resolve it like a module.\n    if specifier_type == SpecifierType::Url && matches!(specifier, Specifier::Package(..)) {\n      specifier_type = SpecifierType::Esm;\n    }\n\n    // Add \"import\" or \"require\" condition to global conditions based on specifier type.\n    // Also add the \"module\" condition if the \"module\" entry field is enabled.\n    let mut conditions = resolver.conditions;\n    let module_condition = if resolver.entries.contains(Fields::MODULE) {\n      ExportsCondition::MODULE\n    } else {\n      ExportsCondition::empty()\n    };\n    match specifier_type {\n      SpecifierType::Esm => conditions |= ExportsCondition::IMPORT | module_condition,\n      SpecifierType::Cjs => conditions |= ExportsCondition::REQUIRE | module_condition,\n      _ => {}\n    }\n\n    // Store the parent file extension so we can prioritize it even in sub-requests.\n    let priority_extension = if resolver.flags.contains(Flags::PARENT_EXTENSION) {\n      ext.and_then(|ext| ext.to_str())\n    } else {\n      None\n    };\n\n    Self {\n      resolver,\n      specifier,\n      specifier_type,\n      from,\n      flags,\n      tsconfig: OnceCell::new(),\n      root_package: OnceCell::new(),\n      invalidations,\n      conditions,\n      custom_conditions: &[],\n      priority_extension,\n    }\n  }\n\n  fn resolve_aliases(\n    &self,\n    package: &PackageJson,\n    specifier: &Specifier,\n    fields: Fields,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    // Don't resolve alias if it came from the package.json itself (i.e. another alias).\n    if *self.from == package.path {\n      return Ok(None);\n    }\n\n    match package.resolve_aliases(specifier, fields) {\n      Some(alias) => match alias.as_ref() {\n        AliasValue::Specifier(specifier) => {\n          let mut req = ResolveRequest::new(\n            self.resolver,\n            specifier,\n            SpecifierType::Cjs,\n            &package.path,\n            self.invalidations,\n          );\n          req.priority_extension = self.priority_extension;\n          req.conditions = self.conditions;\n          req.custom_conditions = self.custom_conditions;\n          let resolved = req.resolve()?;\n          Ok(Some(resolved))\n        }\n        AliasValue::Bool(false) => Ok(Some(Resolution::Empty)),\n        AliasValue::Bool(true) => Ok(None),\n        AliasValue::Global { global } => Ok(Some(Resolution::Global((*global).to_owned()))),\n      },\n      None => Ok(None),\n    }\n  }\n\n  fn root_package(&self) -> &Option<Arc<Result<PackageJson, ResolverError>>> {\n    self\n      .root_package\n      .get_or_init(|| self.find_package(&self.resolver.project_root))\n  }\n\n  fn resolve(&self) -> Result<Resolution, ResolverError> {\n    match &self.specifier {\n      Specifier::Relative(specifier) => {\n        // Relative path\n        self.resolve_relative(specifier, self.from)\n      }\n      Specifier::Tilde(specifier) if self.resolver.flags.contains(Flags::TILDE_SPECIFIERS) => {\n        // Tilde path. Resolve relative to nearest node_modules directory,\n        // the nearest directory with package.json or the project root - whichever comes first.\n        if let Some(p) = self.find_ancestor_file(self.from, \"package.json\") {\n          return self.resolve_relative(specifier, &p);\n        }\n\n        Err(ResolverError::PackageJsonNotFound {\n          from: self.from.as_path().to_owned(),\n        })\n      }\n      Specifier::Absolute(specifier) => {\n        // In Parcel mode, absolute paths are actually relative to the project root.\n        if self.resolver.flags.contains(Flags::ABSOLUTE_SPECIFIERS) {\n          self.resolve_relative(\n            specifier.strip_prefix(\"/\").unwrap(),\n            &self\n              .resolver\n              .project_root\n              .join(\"index\", &self.resolver.cache),\n          )\n        } else if let Some(res) = self.load_path(&self.resolver.cache.get(&specifier), None)? {\n          Ok(res)\n        } else {\n          Err(ResolverError::FileNotFound {\n            relative: specifier.as_ref().to_owned(),\n            from: PathBuf::from(\"/\"),\n          })\n        }\n      }\n      Specifier::Hash(hash) => {\n        if self.specifier_type == SpecifierType::Url {\n          // An ID-only URL, e.g. `url(#clip-path)` for CSS rules. Ignore.\n          Ok(Resolution::External)\n        } else if self.specifier_type == SpecifierType::Esm\n          && self.resolver.flags.contains(Flags::EXPORTS)\n        {\n          // An internal package #import specifier.\n          let package = self.find_package(self.from.parent().unwrap_or_else(|| self.from));\n          if let Some(package) = package {\n            let package = unwrap_arc(&package)?;\n            let res = package\n              .resolve_package_imports(\n                hash,\n                self.conditions,\n                self.custom_conditions,\n                &self.resolver.cache,\n              )\n              .map_err(|error| ResolverError::PackageJsonError {\n                error,\n                module: package.name.to_owned(),\n                path: package.path.as_path().into(),\n              })?;\n            match res {\n              ExportsResolution::Path(path) => {\n                // Extensionless specifiers are not supported in the imports field.\n                if let Some(res) = self.try_file_without_aliases(&path)? {\n                  return Ok(res);\n                }\n              }\n              ExportsResolution::Package(specifier) => {\n                let (module, subpath) = parse_package_specifier(&specifier)?;\n                // TODO: should this follow aliases??\n                return self.resolve_bare(module, subpath);\n              }\n              _ => {}\n            }\n          }\n\n          Err(ResolverError::PackageJsonNotFound {\n            from: self.from.as_path().to_owned(),\n          })\n        } else {\n          Err(ResolverError::UnknownError)\n        }\n      }\n      Specifier::Package(module, subpath) => {\n        // Bare specifier.\n        self.resolve_bare(module, subpath)\n      }\n      Specifier::Builtin(scheme, module) => {\n        if let Some(res) = self.resolve_package_aliases_and_tsconfig_paths(self.specifier)? {\n          return Ok(res);\n        }\n        Ok(Resolution::Builtin {\n          scheme: scheme.as_ref().to_owned(),\n          module: module.as_ref().to_owned(),\n        })\n      }\n      Specifier::Url(url) => {\n        if self.specifier_type == SpecifierType::Url {\n          Ok(Resolution::External)\n        } else {\n          let (scheme, _) = parse_scheme(url)?;\n          Err(ResolverError::UnknownScheme {\n            scheme: scheme.into_owned(),\n          })\n        }\n      }\n      _ => Err(ResolverError::UnknownError),\n    }\n  }\n\n  fn find_ancestor_file(&self, from: &CachedPath, filename: &str) -> Option<CachedPath> {\n    let from = from.parent().unwrap();\n    self\n      .resolver\n      .find_ancestor_file(&from, filename, self.invalidations)\n  }\n\n  fn find_package(&self, from: &CachedPath) -> Option<Arc<Result<PackageJson, ResolverError>>> {\n    self.resolver.find_package(from, self.invalidations)\n  }\n\n  fn resolve_relative(\n    &self,\n    specifier: &Path,\n    from: &CachedPath,\n  ) -> Result<Resolution, ResolverError> {\n    // Resolve aliases from the nearest package.json.\n    let path = from.resolve(specifier, &self.resolver.cache);\n    let package = if self.resolver.flags.contains(Flags::ALIASES) {\n      self.find_package(&path.parent().unwrap())\n    } else {\n      None\n    };\n\n    let package = match &package {\n      Some(pkg) => Some(unwrap_arc(pkg)?),\n      None => None,\n    };\n\n    if let Some(res) = self.load_path(&path, package)? {\n      return Ok(res);\n    }\n\n    Err(ResolverError::FileNotFound {\n      relative: specifier.to_owned(),\n      from: from.as_path().to_owned(),\n    })\n  }\n\n  fn resolve_bare(&self, module: &str, subpath: &str) -> Result<Resolution, ResolverError> {\n    let include = match self.resolver.include_node_modules.as_ref() {\n      IncludeNodeModules::Bool(b) => *b,\n      IncludeNodeModules::Array(a) => a.iter().any(|v| v == module),\n      IncludeNodeModules::Map(m) => *m.get(module).unwrap_or(&true),\n    };\n\n    if !include {\n      return Ok(Resolution::External);\n    }\n\n    // Try aliases and tsconfig paths first.\n    let specifier = Specifier::Package(Cow::Borrowed(module), Cow::Borrowed(subpath));\n    if let Some(res) = self.resolve_package_aliases_and_tsconfig_paths(&specifier)? {\n      return Ok(res);\n    }\n\n    // Check for self references to the current package.\n    if let Some(res) = self.resolve_package_self(&specifier)? {\n      return Ok(res);\n    }\n\n    self.resolve_node_module(module, subpath)\n  }\n\n  fn resolve_package_aliases_and_tsconfig_paths(\n    &self,\n    specifier: &Specifier,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    if self.resolver.flags.contains(Flags::ALIASES) {\n      // First, check for an alias in the root package.json.\n      if let Some(package) = self.root_package() {\n        if let Some(res) = self.resolve_aliases(unwrap_arc(package)?, specifier, Fields::ALIAS)? {\n          return Ok(Some(res));\n        }\n      }\n\n      // Next, try the local package.json.\n      if let Some(package) = self.find_package(self.from.parent().unwrap_or_else(|| self.from)) {\n        let mut fields = Fields::ALIAS;\n        if self.resolver.entries.contains(Fields::BROWSER) {\n          fields |= Fields::BROWSER;\n        }\n        if let Some(res) = self.resolve_aliases(unwrap_arc(&package)?, specifier, fields)? {\n          return Ok(Some(res));\n        }\n      }\n    }\n\n    // Next, check tsconfig.json for the paths and baseUrl options.\n    self.resolve_tsconfig_paths()\n  }\n\n  fn resolve_package_self(\n    &self,\n    specifier: &Specifier,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    if self.resolver.flags.contains(Flags::EXPORTS) {\n      if let Specifier::Package(pkg_name, subpath) = specifier {\n        if let Some(package) = self.find_package(self.from.parent().unwrap_or_else(|| self.from)) {\n          let package = unwrap_arc(&package)?;\n          if package.has_exports() && package.name.as_str() == pkg_name {\n            return self.resolve_package_exports(package, subpath).map(Some);\n          }\n        }\n      }\n    }\n\n    Ok(None)\n  }\n\n  fn resolve_node_module(&self, module: &str, subpath: &str) -> Result<Resolution, ResolverError> {\n    // If there is a custom module directory resolver (e.g. Yarn PnP), use that.\n    if let Some(module_dir_resolver) = &self.resolver.module_dir_resolver {\n      let package_dir = module_dir_resolver(module, self.from.as_path())?;\n      return self.resolve_package(self.resolver.cache.get(&package_dir), module, subpath);\n    } else {\n      let mut file_name = String::with_capacity(module.len() + 13);\n      file_name.push_str(\"node_modules/\");\n      file_name.push_str(module);\n      self.invalidations.invalidate_on_file_create_above(\n        file_name,\n        self\n          .from\n          .parent()\n          .cloned()\n          .unwrap_or_else(|| self.from.clone()),\n      );\n\n      for dir in self.from.ancestors() {\n        // Skip over node_modules directories\n        if dir.is_node_modules() {\n          continue;\n        }\n\n        let package_dir = dir.join_module(module, &self.resolver.cache);\n        if package_dir.is_dir(&*self.resolver.cache.fs) {\n          return self.resolve_package(package_dir, module, subpath);\n        }\n      }\n    }\n\n    // NODE_PATH??\n\n    Err(ResolverError::ModuleNotFound {\n      module: module.to_owned(),\n    })\n  }\n\n  fn resolve_package(\n    &self,\n    package_dir: CachedPath,\n    module: &str,\n    subpath: &str,\n  ) -> Result<Resolution, ResolverError> {\n    let package_path = package_dir.join(\"package.json\", &self.resolver.cache);\n    let package = self.invalidations.read(&package_path, || {\n      package_path.package_json(&self.resolver.cache)\n    });\n\n    let package = match &*package {\n      Ok(package) => package,\n      Err(ResolverError::IOError(_)) => {\n        // No package.json in node_modules is probably invalid but we have tests for it...\n        if self.resolver.flags.contains(Flags::DIR_INDEX) {\n          if let Some(res) = self.load_file(\n            &package_dir.join(self.resolver.index_file, &self.resolver.cache),\n            None,\n          )? {\n            return Ok(res);\n          }\n        }\n\n        return Err(ResolverError::ModuleNotFound {\n          module: module.to_owned(),\n        });\n      }\n      Err(err) => return Err(err.clone()),\n    };\n\n    // Try the \"source\" field first, if present.\n    if self.resolver.entries.contains(Fields::SOURCE) && subpath.is_empty() {\n      if let Some(source) = package.source(&self.resolver.cache) {\n        if let Some(res) = self.load_path(&source, Some(&*package))? {\n          return Ok(res);\n        }\n      }\n    }\n\n    // If the exports field is present, use the Node ESM algorithm.\n    // Otherwise, fall back to classic CJS resolution.\n    if self.resolver.flags.contains(Flags::EXPORTS) && package.has_exports() {\n      return self.resolve_package_exports(package, subpath);\n    } else if !subpath.is_empty() {\n      let package_dir = package_dir.join(subpath, &self.resolver.cache);\n      if let Some(res) = self.load_path(&package_dir, Some(&*package))? {\n        return Ok(res);\n      }\n\n      Err(ResolverError::ModuleSubpathNotFound {\n        module: module.to_owned(),\n        path: package_dir.as_path().to_owned(),\n        package_path: package.path.as_path().to_path_buf(),\n      })\n    } else {\n      let res = self.try_package_entries(&*package);\n      if let Ok(Some(res)) = res {\n        return Ok(res);\n      }\n\n      // Node ESM doesn't allow directory imports.\n      if self.resolver.flags.contains(Flags::DIR_INDEX) {\n        if let Some(res) = self.load_file(\n          &package_dir.join(self.resolver.index_file, &self.resolver.cache),\n          Some(&*package),\n        )? {\n          return Ok(res);\n        }\n      }\n\n      res?;\n\n      Err(ResolverError::ModuleSubpathNotFound {\n        module: module.to_owned(),\n        path: package_dir.as_path().join(self.resolver.index_file),\n        package_path: package.path.as_path().to_path_buf(),\n      })\n    }\n  }\n\n  fn resolve_package_exports(\n    &self,\n    package: &PackageJson,\n    subpath: &str,\n  ) -> Result<Resolution, ResolverError> {\n    let path = package\n      .resolve_package_exports(\n        subpath,\n        self.conditions,\n        self.custom_conditions,\n        &self.resolver.cache,\n      )\n      .map_err(|e| ResolverError::PackageJsonError {\n        module: package.name.to_owned(),\n        path: package.path.as_path().to_path_buf(),\n        error: e,\n      })?;\n\n    // Extensionless specifiers are not supported in the exports field\n    // according to the Node spec (for both ESM and CJS). However, webpack\n    // didn't follow this, so there are many packages that rely on it (e.g. underscore).\n    if self\n      .resolver\n      .flags\n      .contains(Flags::EXPORTS_OPTIONAL_EXTENSIONS)\n    {\n      if let Some(res) = self.load_file(&path, Some(&*package))? {\n        return Ok(res);\n      }\n    } else if let Some(res) = self.try_file_without_aliases(&path)? {\n      return Ok(res);\n    }\n\n    // TODO: track location of resolved field\n    Err(ResolverError::ModuleSubpathNotFound {\n      module: package.name.to_owned(),\n      path: path.as_path().to_path_buf(),\n      package_path: package.path.as_path().to_path_buf(),\n    })\n  }\n\n  fn try_package_entries(\n    &self,\n    package: &PackageJson,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    // Try all entry fields.\n    if let Some((entry, field)) = package\n      .entries(self.resolver.entries, &self.resolver.cache)\n      .next()\n    {\n      if let Some(res) = self.load_path(&entry, Some(package))? {\n        return Ok(Some(res));\n      } else {\n        return Err(ResolverError::ModuleEntryNotFound {\n          module: package.name.to_owned(),\n          entry_path: entry.as_path().to_path_buf(),\n          package_path: package.path.as_path().to_path_buf(),\n          field,\n        });\n      }\n    }\n\n    Ok(None)\n  }\n\n  fn load_path(\n    &self,\n    path: &CachedPath,\n    package: Option<&PackageJson>,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    // Urls and Node ESM do not resolve directory index files.\n    let can_load_directory =\n      self.resolver.flags.contains(Flags::DIR_INDEX) && self.specifier_type != SpecifierType::Url;\n\n    // If path ends with / only try loading as a directory.\n    let is_directory = can_load_directory\n      && path\n        .as_path()\n        .as_os_str()\n        .to_str()\n        .map(|s| s.ends_with(is_separator))\n        .unwrap_or(false);\n\n    if !is_directory {\n      if let Some(res) = self.load_file(path, package)? {\n        return Ok(Some(res));\n      }\n    }\n\n    // Urls and Node ESM do not resolve directory index files.\n    if can_load_directory {\n      return self.load_directory(path, package);\n    }\n\n    Ok(None)\n  }\n\n  fn load_file(\n    &self,\n    path: &CachedPath,\n    package: Option<&PackageJson>,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    // First try the path as is.\n    // TypeScript only supports resolving specifiers ending with `.ts` or `.tsx`\n    // in a certain mode, but we always allow it.\n    // If there is no extension in the original specifier, only check aliases\n    // here and delay checking for an extensionless file until later (since this is unlikely).\n    if let Some(res) = self.try_suffixes(path, \"\", package, path.extension().is_none())? {\n      return Ok(Some(res));\n    }\n\n    // TypeScript allows a specifier like \"./foo.js\" to resolve to \"./foo.ts\".\n    // TSC does this before trying to append an extension. We match this\n    // rather than matching \"./foo.js.ts\", which seems more unlikely.\n    // However, if \"./foo.js\" exists we will resolve to it (above), unlike TSC.\n    // This is to match Node and other bundlers.\n    if self.resolver.flags.contains(Flags::TYPESCRIPT_EXTENSIONS)\n      && self.flags.contains(RequestFlags::IN_TS_FILE)\n      && !self.flags.contains(RequestFlags::IN_NODE_MODULES)\n      && self.specifier_type != SpecifierType::Url\n    {\n      if let Some(ext) = path.extension() {\n        // TODO: would be nice if there was a way to do this without cloning\n        // but OsStr doesn't let you create a slice.\n        let without_extension = &path.as_path().with_extension(\"\");\n        let extensions: Option<&[&str]> = if ext == \"js\" || ext == \"jsx\" {\n          // TSC always prioritizes .ts over .tsx, even when the original extension was .jsx.\n          Some(&[\"ts\", \"tsx\"])\n        } else if ext == \"mjs\" {\n          Some(&[\"mts\"])\n        } else if ext == \"cjs\" {\n          Some(&[\"cts\"])\n        } else {\n          None\n        };\n\n        let res = if let Some(extensions) = extensions {\n          self.try_extensions(\n            &self.resolver.cache.get(without_extension),\n            package,\n            &Extensions::Borrowed(extensions),\n            false,\n          )?\n        } else {\n          None\n        };\n\n        if res.is_some() {\n          return Ok(res);\n        }\n      }\n    }\n\n    // Try adding the same extension as in the parent file first.\n    if let Some(ext) = self.priority_extension {\n      // Use try_suffixes here to skip the specifier_type check.\n      // This is reproducing a bug in the old version of the Parcel resolver\n      // where URL dependencies could omit the extension if it was the same as the parent.\n      // TODO: Revert this in the next major version.\n      if let Some(res) = self.try_suffixes(path, ext, package, false)? {\n        return Ok(Some(res));\n      }\n    }\n\n    // Try adding typescript extensions if outside node_modules.\n    if self\n      .resolver\n      .flags\n      .contains(Flags::TYPESCRIPT_EXTENSIONS | Flags::OPTIONAL_EXTENSIONS)\n      && !self.flags.contains(RequestFlags::IN_NODE_MODULES)\n    {\n      if let Some(res) =\n        self.try_extensions(path, package, &Extensions::Borrowed(&[\"ts\", \"tsx\"]), true)?\n      {\n        return Ok(Some(res));\n      }\n    }\n\n    // Try appending the configured extensions.\n    if let Some(res) = self.try_extensions(path, package, &self.resolver.extensions, true)? {\n      return Ok(Some(res));\n    }\n\n    // If there is no extension in the specifier, try an extensionless file as a last resort.\n    if path.extension().is_none() {\n      if let Some(res) = self.try_suffixes(path, \"\", package, false)? {\n        return Ok(Some(res));\n      }\n    }\n\n    Ok(None)\n  }\n\n  fn try_extensions(\n    &self,\n    path: &CachedPath,\n    package: Option<&PackageJson>,\n    extensions: &Extensions,\n    skip_parent: bool,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    if self.resolver.flags.contains(Flags::OPTIONAL_EXTENSIONS)\n      && self.specifier_type != SpecifierType::Url\n    {\n      // Try appending each extension.\n      for ext in extensions.iter() {\n        // Skip parent extension if we already tried it.\n        if skip_parent\n          && self.resolver.flags.contains(Flags::PARENT_EXTENSION)\n          && matches!(self.from.extension(), Some(e) if e == ext)\n        {\n          continue;\n        }\n\n        if let Some(res) = self.try_suffixes(path, ext, package, false)? {\n          return Ok(Some(res));\n        }\n      }\n    }\n\n    Ok(None)\n  }\n\n  fn try_suffixes(\n    &self,\n    path: &CachedPath,\n    ext: &str,\n    package: Option<&PackageJson>,\n    alias_only: bool,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    // TypeScript supports a moduleSuffixes option in tsconfig.json which allows suffixes\n    // such as \".ios\" to be appended just before the last extension.\n    let tsconfig = self.tsconfig();\n    let default_module_suffixes = [String::new()];\n    let mut module_suffixes = default_module_suffixes.as_slice();\n    if let Some(tsconfig) = &tsconfig {\n      let tsconfig = unwrap_arc(tsconfig)?;\n      if let Some(suffixes) = &tsconfig.compiler_options.module_suffixes {\n        module_suffixes = suffixes.as_slice();\n      }\n    }\n\n    for suffix in module_suffixes {\n      let mut p = if !suffix.is_empty() {\n        // The suffix is placed before the _last_ extension. If we will be appending\n        // another extension later, then we only need to append the suffix first.\n        // Otherwise, we need to remove the original extension so we can add the suffix.\n        // TODO: TypeScript only removes certain extensions here...\n        let original_ext = path.extension();\n        let mut s = if ext.is_empty() && original_ext.is_some() {\n          path.as_path().with_extension(\"\").into_os_string()\n        } else {\n          path.as_path().into()\n        };\n\n        // Append the suffix (this is not necessarily an extension).\n        s.push(suffix);\n\n        // Re-add the original extension if we removed it earlier.\n        if ext.is_empty() {\n          if let Some(original_ext) = original_ext {\n            s.push(\".\");\n            s.push(original_ext);\n          }\n        }\n\n        Cow::Owned(self.resolver.cache.get(Path::new(&s)))\n      } else {\n        Cow::Borrowed(path)\n      };\n\n      if !ext.is_empty() {\n        // Append the extension.\n        p = Cow::Owned(p.into_owned().add_extension(ext, &self.resolver.cache));\n      }\n\n      if let Some(res) = self.try_file(&p, package, alias_only)? {\n        return Ok(Some(res));\n      }\n    }\n\n    Ok(None)\n  }\n\n  fn try_file(\n    &self,\n    path: &CachedPath,\n    package: Option<&PackageJson>,\n    alias_only: bool,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    if self.resolver.flags.contains(Flags::ALIASES) {\n      // Check the project root package.json first.\n      if let Some(package) = self.root_package() {\n        let package = unwrap_arc(package)?;\n        if let Ok(s) = path\n          .as_path()\n          .strip_prefix(package.path.parent().unwrap().as_path())\n        {\n          let specifier = Specifier::Relative(Cow::Borrowed(s));\n          if let Some(res) = self.resolve_aliases(&*package, &specifier, Fields::ALIAS)? {\n            return Ok(Some(res));\n          }\n        }\n      }\n\n      // Next try the local package.json.\n      if let Some(package) = package {\n        if let Ok(s) = path\n          .as_path()\n          .strip_prefix(package.path.parent().unwrap().as_path())\n        {\n          let specifier = Specifier::Relative(Cow::Borrowed(s));\n          let mut fields = Fields::ALIAS;\n          if self.resolver.entries.contains(Fields::BROWSER) {\n            fields |= Fields::BROWSER;\n          }\n          if let Some(res) = self.resolve_aliases(package, &specifier, fields)? {\n            return Ok(Some(res));\n          }\n        }\n      }\n    }\n\n    if alias_only {\n      return Ok(None);\n    }\n\n    self.try_file_without_aliases(path)\n  }\n\n  fn try_file_without_aliases(\n    &self,\n    path: &CachedPath,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    if path.is_file(&*self.resolver.cache.fs) {\n      Ok(Some(Resolution::Path(\n        path\n          .canonicalize(&self.resolver.cache)?\n          .as_path()\n          .to_owned(),\n      )))\n    } else {\n      self.invalidations.invalidate_on_file_create(path.clone());\n      Ok(None)\n    }\n  }\n\n  fn load_directory(\n    &self,\n    dir: &CachedPath,\n    parent_package: Option<&PackageJson>,\n  ) -> Result<Option<Resolution>, ResolverError> {\n    // Check if there is a package.json in this directory, and if so, use its entries.\n    // Note that the \"exports\" field is NOT used here - only in resolve_node_module.\n    let path = dir.join(\"package.json\", &self.resolver.cache);\n    let mut res = Ok(None);\n    let pkg = self\n      .invalidations\n      .read(&path, || path.package_json(&self.resolver.cache));\n    let package = if let Ok(package) = &*pkg {\n      res = self.try_package_entries(&*package);\n      if matches!(res, Ok(Some(_))) {\n        return res;\n      }\n      Some(package)\n    } else {\n      None\n    };\n\n    // If no package.json, or no entries, try an index file with all possible extensions.\n    if self.resolver.flags.contains(Flags::DIR_INDEX) && dir.is_dir(&*self.resolver.cache.fs) {\n      return self.load_file(\n        &dir.join(self.resolver.index_file, &self.resolver.cache),\n        package.as_deref().or(parent_package),\n      );\n    }\n\n    res\n  }\n\n  fn resolve_tsconfig_paths(&self) -> Result<Option<Resolution>, ResolverError> {\n    if let Some(tsconfig) = self.tsconfig() {\n      for path in unwrap_arc(tsconfig)?\n        .compiler_options\n        .paths(self.specifier, &self.resolver.cache)\n      {\n        // TODO: should aliases apply to tsconfig paths??\n        if let Some(res) = self.load_path(&path, None)? {\n          return Ok(Some(res));\n        }\n      }\n    }\n\n    Ok(None)\n  }\n\n  fn tsconfig(&self) -> &Option<Arc<Result<TsConfigWrapper, ResolverError>>> {\n    if self.resolver.flags.contains(Flags::TSCONFIG)\n      && self\n        .flags\n        .intersects(RequestFlags::IN_TS_FILE | RequestFlags::IN_JS_FILE)\n      && !self.flags.contains(RequestFlags::IN_NODE_MODULES)\n    {\n      self.tsconfig.get_or_init(|| {\n        if let Some(path) = self.find_ancestor_file(self.from, \"tsconfig.json\") {\n          return Some(self.read_tsconfig(path));\n        }\n\n        None\n      })\n    } else {\n      &None\n    }\n  }\n\n  fn read_tsconfig(&self, path: CachedPath) -> Arc<Result<TsConfigWrapper, ResolverError>> {\n    self.invalidations.read(&path, || {\n      path.tsconfig(&self.resolver.cache, |tsconfig| {\n        for i in 0..tsconfig.extends.len() {\n          let path = match &tsconfig.extends[i] {\n            Specifier::Absolute(path) => self.resolver.cache.get(path),\n            Specifier::Relative(path) => {\n              let mut absolute_path = tsconfig\n                .compiler_options\n                .path\n                .resolve(path, &self.resolver.cache);\n\n              // TypeScript allows \".\" and \"..\" to implicitly refer to a tsconfig.json file.\n              if path == Path::new(\".\") || path == Path::new(\"..\") {\n                absolute_path = absolute_path.join(\"tsconfig.json\", &self.resolver.cache);\n              }\n\n              let mut exists = absolute_path.is_file(&*self.resolver.cache.fs);\n\n              // If the file doesn't exist, and doesn't end with `.json`, try appending the extension.\n              if !exists {\n                let try_extension = match absolute_path.extension() {\n                  None => true,\n                  Some(ext) => ext != \"json\",\n                };\n\n                if try_extension {\n                  absolute_path = absolute_path.add_extension(\"json\", &self.resolver.cache);\n                  exists = absolute_path.is_file(&*self.resolver.cache.fs);\n                }\n              }\n\n              if !exists {\n                return Err(ResolverError::TsConfigExtendsNotFound {\n                  tsconfig: tsconfig.compiler_options.path.as_path().to_path_buf(),\n                  error: Box::new(ResolverError::FileNotFound {\n                    relative: path.to_path_buf(),\n                    from: tsconfig.compiler_options.path.as_path().to_path_buf(),\n                  }),\n                });\n              }\n\n              absolute_path\n            }\n            specifier @ Specifier::Package(..) => {\n              let resolver = Resolver {\n                project_root: self.resolver.project_root.clone(),\n                extensions: Extensions::Borrowed(&[\"json\"]),\n                index_file: \"tsconfig.json\",\n                entries: Fields::TSCONFIG,\n                flags: Flags::NODE_CJS,\n                cache: CacheCow::Borrowed(&self.resolver.cache),\n                include_node_modules: Cow::Owned(IncludeNodeModules::default()),\n                conditions: ExportsCondition::TYPES,\n                module_dir_resolver: self.resolver.module_dir_resolver.clone(),\n              };\n\n              let req = ResolveRequest::new(\n                &resolver,\n                specifier,\n                SpecifierType::Cjs,\n                &tsconfig.compiler_options.path,\n                self.invalidations,\n              );\n\n              let res = req\n                .resolve()\n                .map_err(|err| ResolverError::TsConfigExtendsNotFound {\n                  tsconfig: tsconfig.compiler_options.path.as_path().to_path_buf(),\n                  error: Box::new(err),\n                })?;\n\n              if let Resolution::Path(res) = res {\n                self.resolver.cache.get(&res)\n              } else {\n                return Err(ResolverError::TsConfigExtendsNotFound {\n                  tsconfig: tsconfig.compiler_options.path.as_path().to_path_buf(),\n                  error: Box::new(ResolverError::UnknownError),\n                });\n              }\n            }\n            _ => return Ok(()),\n          };\n\n          let extended = self.read_tsconfig(path);\n          match &*extended {\n            Ok(extended) => {\n              tsconfig.compiler_options.extend(&extended.compiler_options);\n            }\n            Err(e) => return Err(e.clone()),\n          }\n        }\n\n        Ok(())\n      })\n    })\n  }\n}\n\nfn unwrap_arc<T, E: Clone>(arc: &Arc<Result<T, E>>) -> Result<&T, E> {\n  match &**arc {\n    Ok(v) => Ok(v),\n    Err(e) => Err(e.clone()),\n  }\n}\n\n#[cfg(test)]\nmod tests {\n  use std::collections::{HashMap, HashSet};\n\n  use super::*;\n\n  #[derive(PartialEq, Eq, Hash, Debug, Clone)]\n  pub enum UncachedFileCreateInvalidation {\n    Path(PathBuf),\n    FileName { file_name: String, above: PathBuf },\n    Glob(String),\n  }\n\n  impl From<FileCreateInvalidation> for UncachedFileCreateInvalidation {\n    fn from(value: FileCreateInvalidation) -> Self {\n      match value {\n        FileCreateInvalidation::Path(cached_path) => {\n          UncachedFileCreateInvalidation::Path(cached_path.as_path().to_owned())\n        }\n        FileCreateInvalidation::FileName { file_name, above } => {\n          UncachedFileCreateInvalidation::FileName {\n            file_name,\n            above: above.as_path().to_owned(),\n          }\n        }\n        FileCreateInvalidation::Glob(glob) => UncachedFileCreateInvalidation::Glob(glob),\n      }\n    }\n  }\n\n  fn root() -> PathBuf {\n    Path::new(env!(\"CARGO_MANIFEST_DIR\"))\n      .parent()\n      .unwrap()\n      .parent()\n      .unwrap()\n      .join(\"packages/utils/node-resolver-core/test/fixture\")\n  }\n\n  fn test_resolver<'a>() -> Resolver<'a> {\n    Resolver::parcel(&root(), Cache::default())\n  }\n\n  fn node_resolver<'a>() -> Resolver<'a> {\n    Resolver::node(&root(), Cache::default())\n  }\n\n  #[test]\n  fn relative() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\"./bar.js\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\".///bar.js\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"./bar\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"~/bar\", &root().join(\"nested/test.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"~bar\", &root().join(\"nested/test.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"~/bar\",\n          &root().join(\"node_modules/foo/nested/baz.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"./nested\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"nested/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"./bar?foo=2\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"./bar?foo=2\", &root().join(\"foo.js\"), SpecifierType::Cjs)\n        .result\n        .unwrap_err(),\n      ResolverError::FileNotFound {\n        relative: \"bar?foo=2\".into(),\n        from: root().join(\"foo.js\")\n      },\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./foo\",\n          &root().join(\"priority/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"priority/foo.js\"))\n    );\n\n    let invalidations = test_resolver()\n      .resolve(\"./bar\", &root().join(\"foo.js\"), SpecifierType::Esm)\n      .invalidations;\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_create\n        .borrow()\n        .iter()\n        .collect::<HashSet<_>>(),\n      HashSet::new()\n    );\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_change\n        .borrow()\n        .iter()\n        .map(|p| p.as_path().to_owned())\n        .collect::<HashSet<_>>(),\n      HashSet::from([root().join(\"package.json\"), root().join(\"tsconfig.json\")])\n    );\n  }\n\n  #[test]\n  fn test_absolute() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\"/bar\", &root().join(\"nested/test.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"/bar\",\n          &root().join(\"node_modules/foo/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n\n    #[cfg(not(windows))]\n    {\n      assert_eq!(\n        test_resolver()\n          .resolve(\n            \"file:///bar\",\n            &root().join(\"nested/test.js\"),\n            SpecifierType::Esm\n          )\n          .result\n          .unwrap()\n          .resolution,\n        Resolution::Path(root().join(\"bar.js\"))\n      );\n      assert_eq!(\n        node_resolver()\n          .resolve(\n            root().join(\"foo.js\").to_str().unwrap(),\n            &root().join(\"nested/test.js\"),\n            SpecifierType::Esm\n          )\n          .result\n          .unwrap()\n          .resolution,\n        Resolution::Path(root().join(\"foo.js\"))\n      );\n      assert_eq!(\n        node_resolver()\n          .resolve(\n            &format!(\"file://{}\", root().join(\"foo.js\").to_str().unwrap()),\n            &root().join(\"nested/test.js\"),\n            SpecifierType::Esm\n          )\n          .result\n          .unwrap()\n          .resolution,\n        Resolution::Path(root().join(\"foo.js\"))\n      );\n    }\n  }\n\n  #[test]\n  fn node_modules() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\"foo\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"package-main\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-main/main.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"package-module\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-module/module.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-browser\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-browser/browser.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-fallback\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-fallback/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-main-directory\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-main-directory/nested/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"foo/nested/baz\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/nested/baz.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"@scope/pkg\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/@scope/pkg/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"@scope/pkg/foo/bar\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/@scope/pkg/foo/bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"foo/with space.mjs\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/with space.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"foo/with%20space.mjs\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/with space.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"foo/with space.mjs\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Cjs\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/with space.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"foo/with%20space.mjs\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Cjs\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::ModuleSubpathNotFound {\n        module: \"foo\".into(),\n        path: root().join(\"node_modules/foo/with%20space.mjs\"),\n        package_path: root().join(\"node_modules/foo/package.json\")\n      },\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"@scope/pkg?foo=2\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/@scope/pkg/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"@scope/pkg?foo=2\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Cjs\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::ModuleNotFound {\n        module: \"@scope/pkg?foo=2\".into()\n      },\n    );\n\n    let invalidations = test_resolver()\n      .resolve(\"foo\", &root().join(\"foo.js\"), SpecifierType::Esm)\n      .invalidations;\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_create\n        .borrow()\n        .iter()\n        .map(|p| p.clone().into())\n        .collect::<HashSet<_>>(),\n      HashSet::from([UncachedFileCreateInvalidation::FileName {\n        file_name: \"node_modules/foo\".into(),\n        above: root()\n      },])\n    );\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_change\n        .borrow()\n        .iter()\n        .map(|p| p.as_path().to_owned())\n        .collect::<HashSet<_>>(),\n      HashSet::from([\n        root().join(\"node_modules/foo/package.json\"),\n        root().join(\"package.json\"),\n        root().join(\"tsconfig.json\")\n      ])\n    );\n  }\n\n  #[test]\n  fn browser_field() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-browser-alias\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-browser-alias/browser.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-browser-alias/foo\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-browser-alias/bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./foo\",\n          &root().join(\"node_modules/package-browser-alias/browser.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-browser-alias/bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./nested\",\n          &root().join(\"node_modules/package-browser-alias/browser.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(\n        root().join(\"node_modules/package-browser-alias/subfolder1/subfolder2/subfile.js\")\n      )\n    );\n  }\n\n  #[test]\n  fn local_aliases() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-alias/foo\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-alias/bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./foo\",\n          &root().join(\"node_modules/package-alias/browser.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-alias/bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./lib/test\",\n          &root().join(\"node_modules/package-alias-glob/browser.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-alias-glob/src/test.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-browser-exclude\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Empty\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./lib/test\",\n          &root().join(\"node_modules/package-alias-glob/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-alias-glob/src/test.js\"))\n    );\n\n    let invalidations = test_resolver()\n      .resolve(\n        \"package-alias/foo\",\n        &root().join(\"foo.js\"),\n        SpecifierType::Esm,\n      )\n      .invalidations;\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_create\n        .borrow()\n        .iter()\n        .map(|p| p.clone().into())\n        .collect::<HashSet<_>>(),\n      HashSet::from([UncachedFileCreateInvalidation::FileName {\n        file_name: \"node_modules/package-alias\".into(),\n        above: root()\n      },])\n    );\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_change\n        .borrow()\n        .iter()\n        .map(|p| p.as_path().to_owned())\n        .collect::<HashSet<_>>(),\n      HashSet::from([\n        root().join(\"node_modules/package-alias/package.json\"),\n        root().join(\"package.json\"),\n        root().join(\"tsconfig.json\")\n      ])\n    );\n  }\n\n  #[test]\n  fn global_aliases() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\"aliased\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"aliased\",\n          &root().join(\"node_modules/package-alias/foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"aliased/bar\",\n          &root().join(\"node_modules/package-alias/foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"aliased-file\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"aliased-file\",\n          &root().join(\"node_modules/package-alias/foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"aliasedfolder/test.js\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"nested/test.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"aliasedfolder\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"nested/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"aliasedabsolute/test.js\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"nested/test.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"aliasedabsolute\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"nested/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"foo/bar\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"glob/bar/test\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"nested/test.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"something\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"nested/test.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"something\",\n          &root().join(\"node_modules/package-alias/foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"nested/test.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-alias-exclude\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Empty\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"./baz\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"../baz\", &root().join(\"x/foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"~/baz\", &root().join(\"x/foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./baz\",\n          &root().join(\"node_modules/foo/bar.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/baz.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"~/baz\",\n          &root().join(\"node_modules/foo/bar.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/baz.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"/baz\",\n          &root().join(\"node_modules/foo/bar.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"url\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Empty\n    );\n  }\n\n  #[test]\n  fn test_urls() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"http://example.com/foo.png\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Url\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::External\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"//example.com/foo.png\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Url\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::External\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"#hash\", &root().join(\"foo.js\"), SpecifierType::Url)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::External\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"http://example.com/foo.png\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::UnknownScheme {\n        scheme: \"http\".into()\n      },\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"bar.js\", &root().join(\"foo.js\"), SpecifierType::Url)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    // Reproduce bug for now\n    // assert_eq!(\n    //   test_resolver()\n    //     .resolve(\"bar\", &root().join(\"foo.js\"), SpecifierType::Url)\n    //     .result\n    //     .unwrap_err(),\n    //   ResolverError::FileNotFound {\n    //     relative: \"bar\".into(),\n    //     from: root().join(\"foo.js\")\n    //   }\n    // );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"bar\", &root().join(\"foo.js\"), SpecifierType::Url)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"bar.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"npm:foo\", &root().join(\"foo.js\"), SpecifierType::Url)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/index.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"npm:@scope/pkg\", &root().join(\"foo.js\"), SpecifierType::Url)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/@scope/pkg/index.js\"))\n    );\n  }\n\n  #[test]\n  fn test_exports() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-exports/main.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/foo\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      // \"browser\" field is NOT used.\n      Resolution::Path(root().join(\"node_modules/package-exports/foo.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/features/test\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-exports/features/test.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/extensionless-features/test\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-exports/features/test.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/extensionless-features/test.mjs\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-exports/features/test.mjs\"))\n    );\n    assert_eq!(\n      node_resolver()\n        .resolve(\n          \"package-exports/extensionless-features/test\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::ModuleSubpathNotFound {\n        module: \"package-exports\".into(),\n        package_path: root().join(\"node_modules/package-exports/package.json\"),\n        path: root().join(\"node_modules/package-exports/features/test\"),\n      },\n    );\n    assert_eq!(\n      node_resolver()\n        .resolve(\n          \"package-exports/extensionless-features/test\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Cjs\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::ModuleSubpathNotFound {\n        module: \"package-exports\".into(),\n        package_path: root().join(\"node_modules/package-exports/package.json\"),\n        path: root().join(\"node_modules/package-exports/features/test\"),\n      },\n    );\n    assert_eq!(\n      node_resolver()\n        .resolve(\n          \"package-exports/extensionless-features/test.mjs\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-exports/features/test.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/space\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-exports/with space.mjs\"))\n    );\n    // assert_eq!(\n    //   test_resolver().resolve(\"package-exports/with%20space\", &root().join(\"foo.js\"), SpecifierType::Esm).unwrap().resolution,\n    //   Resolution::Path(root().join(\"node_modules/package-exports/with space.mjs\"))\n    // );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/with space\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::PackageJsonError {\n        module: \"package-exports\".into(),\n        path: root().join(\"node_modules/package-exports/package.json\"),\n        error: PackageJsonError::PackagePathNotExported\n      },\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/internal\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::PackageJsonError {\n        module: \"package-exports\".into(),\n        path: root().join(\"node_modules/package-exports/package.json\"),\n        error: PackageJsonError::PackagePathNotExported\n      },\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/internal.mjs\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::PackageJsonError {\n        module: \"package-exports\".into(),\n        path: root().join(\"node_modules/package-exports/package.json\"),\n        error: PackageJsonError::PackagePathNotExported\n      },\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/invalid\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::PackageJsonError {\n        module: \"package-exports\".into(),\n        path: root().join(\"node_modules/package-exports/package.json\"),\n        error: PackageJsonError::InvalidPackageTarget\n      }\n    );\n  }\n\n  #[test]\n  fn test_self_reference() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports\",\n          &root().join(\"node_modules/package-exports/foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-exports/main.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"package-exports/foo\",\n          &root().join(\"node_modules/package-exports/foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-exports/foo.mjs\"))\n    );\n  }\n\n  #[test]\n  fn test_imports() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"#internal\",\n          &root().join(\"node_modules/package-exports/main.mjs\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/package-exports/internal.mjs\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"#foo\",\n          &root().join(\"node_modules/package-exports/main.mjs\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/index.js\"))\n    );\n  }\n\n  #[test]\n  fn test_builtins() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\"zlib\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Builtin {\n        scheme: \"\".into(),\n        module: \"zlib\".into()\n      }\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"node:zlib\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Builtin {\n        scheme: \"node\".into(),\n        module: \"zlib\".into()\n      }\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"node:fs/promises\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Cjs\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Builtin {\n        scheme: \"node\".into(),\n        module: \"fs/promises\".into()\n      }\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"jsr:@std/http/file-server\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Builtin {\n        scheme: \"jsr\".into(),\n        module: \"@std/http/file-server\".into()\n      }\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"cloudflare:workers\",\n          &root().join(\"foo.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Builtin {\n        scheme: \"cloudflare\".into(),\n        module: \"workers\".into()\n      }\n    );\n  }\n\n  #[test]\n  fn test_tsconfig() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\"ts-path\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"foo.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"ts-path\",\n          &root().join(\"nested/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"nested/test.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"foo\",\n          &root().join(\"tsconfig/index/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/tsconfig-index/foo.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"foo\",\n          &root().join(\"tsconfig/field/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/tsconfig-field/foo.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"foo\",\n          &root().join(\"tsconfig/exports/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/tsconfig-exports/foo.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"foo\",\n          &root().join(\"tsconfig/extends-extension/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"tsconfig/extends-extension/foo.js\"))\n    );\n\n    let mut extends_node_module_resolver = test_resolver();\n    extends_node_module_resolver.include_node_modules = Cow::Owned(IncludeNodeModules::Bool(false));\n    assert_eq!(\n      extends_node_module_resolver\n        .resolve(\n          \"./bar\",\n          &root().join(\"tsconfig/extends-node-module/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"tsconfig/extends-node-module/bar.ts\"))\n    );\n\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"ts-path\",\n          &root().join(\"node_modules/tsconfig-not-used/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::ModuleNotFound {\n        module: \"ts-path\".into()\n      },\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\"ts-path\", &root().join(\"foo.css\"), SpecifierType::Esm)\n        .result\n        .unwrap_err(),\n      ResolverError::ModuleNotFound {\n        module: \"ts-path\".into()\n      },\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"zlib\",\n          &root().join(\"tsconfig/builtins/thing.js\"),\n          SpecifierType::Cjs\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Builtin {\n        scheme: \"\".into(),\n        module: \"zlib\".into()\n      }\n    );\n\n    let invalidations = test_resolver()\n      .resolve(\"ts-path\", &root().join(\"foo.js\"), SpecifierType::Esm)\n      .invalidations;\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_create\n        .borrow()\n        .iter()\n        .collect::<HashSet<_>>(),\n      HashSet::new()\n    );\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_change\n        .borrow()\n        .iter()\n        .map(|p| p.as_path().to_owned())\n        .collect::<HashSet<_>>(),\n      HashSet::from([root().join(\"package.json\"), root().join(\"tsconfig.json\")])\n    );\n  }\n\n  #[test]\n  fn test_module_suffixes() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./a\",\n          &root().join(\"tsconfig/suffixes/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"tsconfig/suffixes/a.ios.ts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./a.ts\",\n          &root().join(\"tsconfig/suffixes/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"tsconfig/suffixes/a.ios.ts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./b\",\n          &root().join(\"tsconfig/suffixes/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"tsconfig/suffixes/b.ts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./b.ts\",\n          &root().join(\"tsconfig/suffixes/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"tsconfig/suffixes/b.ts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./c\",\n          &root().join(\"tsconfig/suffixes/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"tsconfig/suffixes/c-test.ts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./c.ts\",\n          &root().join(\"tsconfig/suffixes/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"tsconfig/suffixes/c-test.ts\"))\n    );\n  }\n\n  #[test]\n  fn test_tsconfig_parsing() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"foo\",\n          &root().join(\"tsconfig/trailing-comma/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"tsconfig/trailing-comma/bar.js\"))\n    );\n  }\n\n  #[test]\n  fn test_ts_extensions() {\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./a.js\",\n          &root().join(\"ts-extensions/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"ts-extensions/a.ts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./a.jsx\",\n          &root().join(\"ts-extensions/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      // TSC always prioritizes .ts over .tsx\n      Resolution::Path(root().join(\"ts-extensions/a.ts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./a.mjs\",\n          &root().join(\"ts-extensions/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"ts-extensions/a.mts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./a.cjs\",\n          &root().join(\"ts-extensions/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"ts-extensions/a.cts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./b.js\",\n          &root().join(\"ts-extensions/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      // We deviate from TSC here to match Node/bundlers.\n      Resolution::Path(root().join(\"ts-extensions/b.js\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./c.js\",\n          &root().join(\"ts-extensions/index.ts\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap()\n        .resolution,\n      // This matches TSC. c.js.ts seems kinda unlikely?\n      Resolution::Path(root().join(\"ts-extensions/c.ts\"))\n    );\n    assert_eq!(\n      test_resolver()\n        .resolve(\n          \"./a.js\",\n          &root().join(\"ts-extensions/index.js\"),\n          SpecifierType::Esm\n        )\n        .result\n        .unwrap_err(),\n      ResolverError::FileNotFound {\n        relative: \"a.js\".into(),\n        from: root().join(\"ts-extensions/index.js\")\n      },\n    );\n\n    let invalidations = test_resolver()\n      .resolve(\n        \"./a.js\",\n        &root().join(\"ts-extensions/index.ts\"),\n        SpecifierType::Esm,\n      )\n      .invalidations;\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_create\n        .borrow()\n        .iter()\n        .map(|p| p.clone().into())\n        .collect::<HashSet<_>>(),\n      HashSet::from([\n        UncachedFileCreateInvalidation::Path(root().join(\"ts-extensions/a.js\")),\n        UncachedFileCreateInvalidation::FileName {\n          file_name: \"package.json\".into(),\n          above: root().join(\"ts-extensions\")\n        },\n        UncachedFileCreateInvalidation::FileName {\n          file_name: \"tsconfig.json\".into(),\n          above: root().join(\"ts-extensions\")\n        },\n      ])\n    );\n    assert_eq!(\n      invalidations\n        .invalidate_on_file_change\n        .borrow()\n        .iter()\n        .map(|p| p.as_path().to_owned())\n        .collect::<HashSet<_>>(),\n      HashSet::from([root().join(\"package.json\"), root().join(\"tsconfig.json\")])\n    );\n  }\n\n  fn resolve_side_effects(specifier: &str, from: &Path) -> bool {\n    let resolver = test_resolver();\n    let resolved = resolver\n      .resolve(specifier, from, SpecifierType::Esm)\n      .result\n      .unwrap()\n      .resolution;\n\n    if let Resolution::Path(path) = resolved {\n      resolver\n        .resolve_side_effects(&path, &Invalidations::default())\n        .unwrap()\n    } else {\n      unreachable!()\n    }\n  }\n\n  #[test]\n  fn test_side_effects() {\n    assert!(!resolve_side_effects(\n      \"side-effects-false/src/index.js\",\n      &root().join(\"foo.js\")\n    ));\n    assert!(!resolve_side_effects(\n      \"side-effects-false/src/index\",\n      &root().join(\"foo.js\")\n    ));\n    assert!(!resolve_side_effects(\n      \"side-effects-false/src/\",\n      &root().join(\"foo.js\")\n    ));\n    assert!(!resolve_side_effects(\n      \"side-effects-false\",\n      &root().join(\"foo.js\")\n    ));\n    assert!(!resolve_side_effects(\n      \"side-effects-package-redirect-up/foo/bar\",\n      &root().join(\"foo.js\")\n    ));\n    assert!(!resolve_side_effects(\n      \"side-effects-package-redirect-down/foo/bar\",\n      &root().join(\"foo.js\")\n    ));\n    assert!(resolve_side_effects(\n      \"side-effects-false-glob/a/index\",\n      &root().join(\"foo.js\")\n    ));\n    assert!(!resolve_side_effects(\n      \"side-effects-false-glob/b/index.js\",\n      &root().join(\"foo.js\")\n    ));\n    assert!(!resolve_side_effects(\n      \"side-effects-false-glob/sub/a/index.js\",\n      &root().join(\"foo.js\")\n    ));\n    assert!(resolve_side_effects(\n      \"side-effects-false-glob/sub/index.json\",\n      &root().join(\"foo.js\")\n    ));\n  }\n\n  #[test]\n  fn test_include_node_modules() {\n    let mut resolver = test_resolver();\n    resolver.include_node_modules = Cow::Owned(IncludeNodeModules::Bool(false));\n\n    assert_eq!(\n      resolver\n        .resolve(\"foo\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::External\n    );\n    assert_eq!(\n      resolver\n        .resolve(\"@scope/pkg\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::External\n    );\n\n    resolver.include_node_modules = Cow::Owned(IncludeNodeModules::Array(vec![\"foo\".into()]));\n    assert_eq!(\n      resolver\n        .resolve(\"foo\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/foo/index.js\"))\n    );\n    assert_eq!(\n      resolver\n        .resolve(\"@scope/pkg\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::External\n    );\n\n    resolver.include_node_modules = Cow::Owned(IncludeNodeModules::Map(HashMap::from([\n      (\"foo\".into(), false),\n      (\"@scope/pkg\".into(), true),\n    ])));\n    assert_eq!(\n      resolver\n        .resolve(\"foo\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::External\n    );\n    assert_eq!(\n      resolver\n        .resolve(\"@scope/pkg\", &root().join(\"foo.js\"), SpecifierType::Esm)\n        .result\n        .unwrap()\n        .resolution,\n      Resolution::Path(root().join(\"node_modules/@scope/pkg/index.js\"))\n    );\n  }\n\n  // #[test]\n  // fn test_visitor() {\n  //   let resolved = test_resolver().resolve(\"unified\", &root(), SpecifierType::Esm).unwrap();\n  //   println!(\"{:?}\", resolved);\n  //   if let Resolution::Path(p) = resolved {\n  //     let res = build_esm_graph(\n  //       &p,\n  //       root()\n  //     ).unwrap();\n  //     println!(\"{:?}\", res);\n  //   }\n  // }\n}\n"
  },
  {
    "path": "crates/parcel-resolver/src/package_json.rs",
    "content": "use std::{\n  borrow::Cow,\n  cmp::Ordering,\n  ops::Range,\n  path::{Component, Path, PathBuf},\n};\n\nuse bitflags::bitflags;\nuse glob_match::{glob_match, glob_match_with_captures};\nuse indexmap::IndexMap;\nuse serde::Deserialize;\n\nuse crate::{\n  ResolverError,\n  cache::{Cache, CachedPath},\n  error::JsonError,\n  specifier::{Specifier, SpecifierType, decode_path},\n};\n\nbitflags! {\n  /// A package.json top-level entry field.\n  #[derive(Clone, Copy)]\n  pub struct Fields: u8 {\n    /// The \"main\" field.\n    const MAIN = 1 << 0;\n    /// The \"module\" field.\n    const MODULE = 1 << 1;\n    /// The \"source\" field.\n    const SOURCE = 1 << 2;\n    /// The \"browser\" field.\n    const BROWSER = 1 << 3;\n    /// The \"alias\" field.\n    const ALIAS = 1 << 4;\n    /// The \"tsconfig\" field.\n    const TSCONFIG = 1 << 5;\n    /// The \"types\" field.\n    const TYPES = 1 << 6;\n  }\n}\n\nimpl serde::Serialize for Fields {\n  fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n  where\n    S: serde::Serializer,\n  {\n    self.bits().serialize(serializer)\n  }\n}\n\n#[derive(serde::Deserialize, Debug, Default)]\n#[serde(rename_all = \"camelCase\")]\nstruct SerializedPackageJson {\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub name: String,\n  #[serde(rename = \"type\", default, deserialize_with = \"ok_or_default\")]\n  pub module_type: ModuleType,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  main: Option<PathBuf>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  module: Option<PathBuf>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  tsconfig: Option<PathBuf>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  types: Option<PathBuf>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  pub source: SourceField,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  browser: BrowserField,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  alias: IndexMap<Specifier<'static>, AliasValue<'static>>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  exports: ExportsField,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  imports: IndexMap<ExportsKey<'static>, ExportsField>,\n  #[serde(default, deserialize_with = \"ok_or_default\")]\n  side_effects: SideEffects,\n}\n\nfn ok_or_default<'de, T, D>(deserializer: D) -> Result<T, D::Error>\nwhere\n  T: serde::Deserialize<'de> + Default,\n  D: serde::Deserializer<'de>,\n{\n  Ok(T::deserialize(deserializer).unwrap_or_default())\n}\n\n#[derive(Debug)]\npub struct PackageJson {\n  pub path: CachedPath,\n  pub name: String,\n  pub module_type: ModuleType,\n  main: Option<CachedPath>,\n  module: Option<CachedPath>,\n  tsconfig: Option<CachedPath>,\n  types: Option<CachedPath>,\n  pub source: SourceField,\n  browser: BrowserField,\n  alias: IndexMap<Specifier<'static>, AliasValue<'static>>,\n  exports: ExportsField,\n  imports: IndexMap<ExportsKey<'static>, ExportsField>,\n  side_effects: SideEffects,\n}\n\n/// Whether the module is ESM, CommonJS, or JSON according to its extension or the package.json \"type\" field.\n#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, Copy, Default, PartialEq)]\n#[serde(rename_all = \"lowercase\")]\npub enum ModuleType {\n  Module,\n  Json,\n  #[default]\n  #[serde(other)]\n  CommonJs,\n}\n\n#[derive(serde::Deserialize, Debug, Default)]\n#[serde(untagged)]\npub enum BrowserField {\n  #[default]\n  None,\n  String(String),\n  Map(IndexMap<Specifier<'static>, AliasValue<'static>>),\n}\n\n#[derive(serde::Deserialize, Debug, Default)]\n#[serde(untagged)]\npub enum SourceField {\n  #[default]\n  None,\n  String(String),\n  Map(IndexMap<Specifier<'static>, AliasValue<'static>>),\n  Array(Vec<String>),\n  Bool(bool),\n}\n\n#[derive(serde::Deserialize, Debug, Default, PartialEq)]\n#[serde(untagged)]\npub enum ExportsField {\n  #[default]\n  None,\n  String(String),\n  #[serde(skip)]\n  Path(CachedPath),\n  Array(Vec<ExportsField>),\n  Map(IndexMap<ExportsKey<'static>, ExportsField>),\n}\n\nimpl ExportsField {\n  fn convert_paths<F: FnMut() -> bool>(\n    &mut self,\n    base: &CachedPath,\n    cache: &Cache,\n    is_source: &mut F,\n  ) {\n    match self {\n      ExportsField::String(target) => {\n        if target.starts_with(\"./\") && !target.contains('*') {\n          // If target split on \"/\" or \"\\\" contains any \"\", \".\", \"..\", or \"node_modules\" segments after\n          // the first \".\" segment, case insensitive and including percent encoded variants,\n          // throw an Invalid Package Target error.\n          let target_path = decode_path(target.as_ref(), SpecifierType::Esm).0;\n          if target_path\n            .components()\n            .enumerate()\n            .any(|(index, c)| match c {\n              Component::ParentDir => true,\n              Component::CurDir => index > 0,\n              Component::Normal(c) => c.eq_ignore_ascii_case(\"node_modules\"),\n              _ => false,\n            })\n          {\n            return;\n          }\n\n          *self = ExportsField::Path(base.resolve(&target_path, cache));\n        }\n      }\n      ExportsField::Array(arr) => {\n        for item in arr {\n          item.convert_paths(base, cache, is_source);\n        }\n      }\n      ExportsField::Map(map) => {\n        for (key, val) in map.iter_mut() {\n          if matches!(key, ExportsKey::Condition(ExportsCondition::SOURCE)) && !is_source() {\n            *val = ExportsField::None;\n          } else {\n            val.convert_paths(base, cache, is_source);\n          }\n        }\n      }\n      _ => {}\n    }\n  }\n}\n\nbitflags! {\n  /// A common package.json \"exports\" field.\n  #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]\n  pub struct ExportsCondition: u32 {\n    /// The \"import\" condition. True when the package was referenced using the ESM `import` syntax.\n    const IMPORT = 1 << 0;\n    /// The \"require\" condition. True when the package was referenced using the CommonJS `require` function.\n    const REQUIRE = 1 << 1;\n    /// The \"module\" condition. True when the package was referenced from either the ESM `import` syntax or the CommonJS `require` function/\n    const MODULE = 1 << 2;\n    /// The \"node\" condition. True when the module will run in a Node environment.\n    const NODE = 1 << 3;\n    /// The \"browser\" condition. True when the module will run in a browser environment.\n    const BROWSER = 1 << 4;\n    /// The \"worker\" condition. True when the module will run in a web worker or service worker environment.\n    const WORKER = 1 << 5;\n    /// The \"worklet\" condition. True when the module will run in a worklet environment.\n    const WORKLET = 1 << 6;\n    /// The \"electron\" condition. True when the module will run in an Electron environment.\n    const ELECTRON = 1 << 7;\n    /// The \"development\" condition. True when the module will run in a development environment.\n    const DEVELOPMENT = 1 << 8;\n    /// The \"production\" condition. True when the module will run in a production environment.\n    const PRODUCTION = 1 << 9;\n    /// The \"types\" condition. True when loading TypeScript types.\n    const TYPES = 1 << 10;\n    /// The \"default\" condition when no other conditions matched.\n    const DEFAULT = 1 << 11;\n    /// The \"style\" condition. True when the package was referenced from a stylesheet (e.g. CSS, Sass, Stylus, etc.).\n    const STYLE = 1 << 12;\n    /// The \"sass\" condition. True when the package was referenced from a Sass stylesheet.\n    const SASS = 1 << 13;\n    /// The \"less\" condition. True when the package was referenced from a Less stylesheet.\n    const LESS = 1 << 14;\n    /// The \"stylus\" condition. True when the package was referenced from a Stylus stylesheet.\n    const STYLUS = 1 << 15;\n    /// The \"react-server\" condition.\n    const REACT_SERVER = 1 << 16;\n    /// The \"source\" condition.\n    const SOURCE = 1 << 17;\n  }\n}\n\nimpl Default for ExportsCondition {\n  fn default() -> Self {\n    ExportsCondition::empty()\n  }\n}\n\nimpl TryFrom<&str> for ExportsCondition {\n  type Error = ();\n  fn try_from(value: &str) -> Result<Self, Self::Error> {\n    Ok(match value {\n      \"import\" => ExportsCondition::IMPORT,\n      \"require\" => ExportsCondition::REQUIRE,\n      \"module\" => ExportsCondition::MODULE,\n      \"node\" => ExportsCondition::NODE,\n      \"browser\" => ExportsCondition::BROWSER,\n      \"worker\" => ExportsCondition::WORKER,\n      \"worklet\" => ExportsCondition::WORKLET,\n      \"electron\" => ExportsCondition::ELECTRON,\n      \"development\" => ExportsCondition::DEVELOPMENT,\n      \"production\" => ExportsCondition::PRODUCTION,\n      \"types\" => ExportsCondition::TYPES,\n      \"default\" => ExportsCondition::DEFAULT,\n      \"style\" => ExportsCondition::STYLE,\n      \"sass\" => ExportsCondition::SASS,\n      \"less\" => ExportsCondition::LESS,\n      \"stylus\" => ExportsCondition::STYLUS,\n      \"react-server\" => ExportsCondition::REACT_SERVER,\n      \"source\" => ExportsCondition::SOURCE,\n      _ => return Err(()),\n    })\n  }\n}\n\n#[derive(Debug, PartialEq, Eq, Hash)]\npub enum ExportsKey<'a> {\n  Main,\n  Pattern(Cow<'a, str>),\n  Condition(ExportsCondition),\n  CustomCondition(String),\n}\n\nimpl<'a> From<&str> for ExportsKey<'a> {\n  fn from(key: &str) -> Self {\n    if key == \".\" {\n      ExportsKey::Main\n    } else if let Some(key) = key.strip_prefix(\"./\") {\n      ExportsKey::Pattern(Cow::Owned(key.to_owned()))\n    } else if let Some(key) = key.strip_prefix('#') {\n      ExportsKey::Pattern(Cow::Owned(key.to_owned()))\n    } else if let Ok(c) = ExportsCondition::try_from(key) {\n      ExportsKey::Condition(c)\n    } else {\n      ExportsKey::CustomCondition(key.to_owned())\n    }\n  }\n}\n\nimpl<'de> Deserialize<'de> for ExportsKey<'static> {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    let s: &'de str = Deserialize::deserialize(deserializer)?;\n    Ok(ExportsKey::from(s))\n  }\n}\n\n#[derive(serde::Deserialize, Clone, PartialEq, Debug)]\n#[serde(untagged)]\npub enum AliasValue<'a> {\n  #[serde(bound(deserialize = \"'a: 'static\"))]\n  Specifier(Specifier<'a>),\n  Bool(bool),\n  Global {\n    global: String,\n  },\n}\n\n#[derive(serde::Deserialize, Clone, Default, PartialEq, Debug)]\n#[serde(untagged)]\npub enum SideEffects {\n  #[default]\n  None,\n  Boolean(bool),\n  String(String),\n  Array(Vec<String>),\n}\n\n/// An error that occurred in a package.json.\n#[derive(Debug, Clone, PartialEq, serde::Serialize)]\npub enum PackageJsonError {\n  /// An invalid package.json \"exports\" or \"imports\" target.\n  InvalidPackageTarget,\n  /// The requested subpath of a package.json was not exported.\n  PackagePathNotExported,\n  /// An invalid specifier was requested.\n  InvalidSpecifier,\n  /// A package import was not defined.\n  ImportNotDefined,\n}\n\n#[derive(Debug, PartialEq)]\npub enum ExportsResolution<'a> {\n  None,\n  Path(CachedPath),\n  Package(Cow<'a, str>),\n}\n\nimpl PackageJson {\n  pub fn read(path: &CachedPath, cache: &Cache) -> Result<PackageJson, ResolverError> {\n    let contents = cache.fs.read_to_string(path.as_path())?;\n    let pkg = PackageJson::parse(path.clone(), contents, cache)\n      .map_err(|e| JsonError::new(path.as_path().into(), e))?;\n    Ok(pkg)\n  }\n\n  pub fn parse(path: CachedPath, data: String, cache: &Cache) -> serde_json::Result<PackageJson> {\n    let parsed: SerializedPackageJson = serde_json::from_str(&data)?;\n    Ok(PackageJson::from_serialized(path, parsed, cache))\n  }\n\n  fn from_serialized(\n    path: CachedPath,\n    mut parsed: SerializedPackageJson,\n    cache: &Cache,\n  ) -> PackageJson {\n    // If the package has a `source` field, make sure\n    // - the package is behind symlinks\n    // - and the realpath to the packages does not includes `node_modules`.\n    // Since such package is likely a pre-compiled module\n    // installed with package managers, rather than including a source code.\n    let mut is_source = None;\n\n    let mut check_in_source = || {\n      if let Some(is_source) = is_source {\n        return is_source;\n      }\n\n      if let Ok(realpath) = path.canonicalize(&cache) {\n        let is_src = !realpath.in_node_modules();\n        is_source = Some(is_src);\n        is_src\n      } else {\n        is_source = Some(false);\n        false\n      }\n    };\n\n    if !matches!(parsed.source, SourceField::None) {\n      if !check_in_source() {\n        parsed.source = SourceField::None;\n      }\n    }\n\n    parsed\n      .exports\n      .convert_paths(&path, cache, &mut check_in_source);\n\n    PackageJson {\n      name: parsed.name,\n      module_type: parsed.module_type,\n      main: parsed.main.map(|main| path.resolve(&main, cache)),\n      module: parsed.module.map(|module| path.resolve(&module, cache)),\n      tsconfig: parsed\n        .tsconfig\n        .map(|tsconfig| path.resolve(&tsconfig, cache)),\n      types: parsed.types.map(|types| path.resolve(&types, cache)),\n      source: parsed.source,\n      browser: parsed.browser,\n      alias: parsed.alias,\n      exports: parsed.exports,\n      imports: parsed.imports,\n      side_effects: parsed.side_effects,\n      path,\n    }\n  }\n\n  pub fn entries<'a>(&'a self, fields: Fields, cache: &'a Cache) -> EntryIter<'a> {\n    EntryIter {\n      package: self,\n      fields,\n      cache,\n    }\n  }\n\n  pub fn source(&self, cache: &Cache) -> Option<CachedPath> {\n    match &self.source {\n      SourceField::None | SourceField::Array(_) | SourceField::Bool(_) => None,\n      SourceField::String(source) => Some(self.path.resolve(Path::new(source), cache)),\n      SourceField::Map(map) => match map.get(&Specifier::Package(\n        Cow::Borrowed(self.name.as_str()),\n        Cow::Borrowed(\"\"),\n      )) {\n        Some(AliasValue::Specifier(Specifier::Relative(s))) => Some(self.path.resolve(s, cache)),\n        _ => None,\n      },\n    }\n  }\n\n  pub fn has_exports(&self) -> bool {\n    self.exports != ExportsField::None\n  }\n\n  pub fn resolve_package_exports(\n    &self,\n    subpath: &str,\n    conditions: ExportsCondition,\n    custom_conditions: &[String],\n    paths: &Cache,\n  ) -> Result<CachedPath, PackageJsonError> {\n    // If exports is an Object with both a key starting with \".\" and a key not starting with \".\", throw an Invalid Package Configuration error.\n    if let ExportsField::Map(map) = &self.exports {\n      let mut has_conditions = false;\n      let mut has_patterns = false;\n      for key in map.keys() {\n        has_conditions = has_conditions\n          || matches!(\n            key,\n            ExportsKey::Condition(..) | ExportsKey::CustomCondition(..)\n          );\n        has_patterns = has_patterns || matches!(key, ExportsKey::Pattern(..) | ExportsKey::Main);\n        if has_conditions && has_patterns {\n          return Err(PackageJsonError::InvalidPackageTarget);\n        }\n      }\n    }\n\n    if subpath.is_empty() {\n      let mut main_export = &ExportsField::None;\n      match &self.exports {\n        ExportsField::None\n        | ExportsField::String(_)\n        | ExportsField::Path(_)\n        | ExportsField::Array(_) => {\n          main_export = &self.exports;\n        }\n        ExportsField::Map(map) => {\n          if let Some(v) = map.get(&ExportsKey::Main) {\n            main_export = v;\n          } else if !map.keys().any(|k| matches!(k, ExportsKey::Pattern(_))) {\n            main_export = &self.exports;\n          }\n        }\n      }\n\n      if main_export != &ExportsField::None {\n        match self.resolve_package_target(\n          main_export,\n          \"\",\n          false,\n          conditions,\n          custom_conditions,\n          paths,\n        )? {\n          ExportsResolution::Path(path) => return Ok(path),\n          ExportsResolution::None | ExportsResolution::Package(..) => {}\n        }\n      }\n    } else if let ExportsField::Map(exports) = &self.exports {\n      // All exports must start with \".\" at this point.\n      match self.resolve_package_imports_exports(\n        subpath,\n        exports,\n        false,\n        conditions,\n        custom_conditions,\n        paths,\n      )? {\n        ExportsResolution::Path(path) => return Ok(path),\n        ExportsResolution::None | ExportsResolution::Package(..) => {}\n      }\n    }\n\n    Err(PackageJsonError::PackagePathNotExported)\n  }\n\n  pub fn resolve_package_imports<'a>(\n    &'a self,\n    specifier: &'a str,\n    conditions: ExportsCondition,\n    custom_conditions: &[String],\n    paths: &Cache,\n  ) -> Result<ExportsResolution<'a>, PackageJsonError> {\n    if specifier == \"#\" || specifier.starts_with(\"#/\") {\n      return Err(PackageJsonError::InvalidSpecifier);\n    }\n\n    match self.resolve_package_imports_exports(\n      specifier,\n      &self.imports,\n      true,\n      conditions,\n      custom_conditions,\n      paths,\n    )? {\n      ExportsResolution::None => {}\n      res => return Ok(res),\n    }\n\n    Err(PackageJsonError::ImportNotDefined)\n  }\n\n  fn resolve_package_target<'a>(\n    &'a self,\n    target: &'a ExportsField,\n    pattern_match: &str,\n    is_imports: bool,\n    conditions: ExportsCondition,\n    custom_conditions: &[String],\n    paths: &Cache,\n  ) -> Result<ExportsResolution<'a>, PackageJsonError> {\n    match target {\n      ExportsField::String(target) => {\n        if !target.starts_with(\"./\") {\n          if !is_imports || target.starts_with(\"../\") || target.starts_with('/') {\n            return Err(PackageJsonError::InvalidPackageTarget);\n          }\n\n          if !pattern_match.is_empty() {\n            let target = target.replace('*', pattern_match);\n            return Ok(ExportsResolution::Package(Cow::Owned(target)));\n          }\n\n          return Ok(ExportsResolution::Package(Cow::Borrowed(target)));\n        }\n\n        let target = if pattern_match.is_empty() {\n          Cow::Borrowed(target.as_str())\n        } else {\n          Cow::Owned(target.replace('*', pattern_match))\n        };\n\n        // If target split on \"/\" or \"\\\" contains any \"\", \".\", \"..\", or \"node_modules\" segments after\n        // the first \".\" segment, case insensitive and including percent encoded variants,\n        // throw an Invalid Package Target error.\n        let target_path = decode_path(target.as_ref(), SpecifierType::Esm).0;\n        if target_path\n          .components()\n          .enumerate()\n          .any(|(index, c)| match c {\n            Component::ParentDir => true,\n            Component::CurDir => index > 0,\n            Component::Normal(c) => c.eq_ignore_ascii_case(\"node_modules\"),\n            _ => false,\n          })\n        {\n          return Err(PackageJsonError::InvalidPackageTarget);\n        }\n\n        let resolved_target = self.path.resolve(&target_path, paths);\n        return Ok(ExportsResolution::Path(resolved_target));\n      }\n      ExportsField::Path(target) => return Ok(ExportsResolution::Path(target.clone())),\n      ExportsField::Map(target) => {\n        // We must iterate in object insertion order.\n        for (key, value) in target {\n          let matches = match key {\n            ExportsKey::Condition(key) => {\n              *key == ExportsCondition::DEFAULT || conditions.contains(*key)\n            }\n            ExportsKey::CustomCondition(key) => custom_conditions.iter().any(|k| k == key),\n            _ => false,\n          };\n          if matches {\n            match self.resolve_package_target(\n              value,\n              pattern_match,\n              is_imports,\n              conditions,\n              custom_conditions,\n              paths,\n            )? {\n              ExportsResolution::None => continue,\n              res => return Ok(res),\n            }\n          }\n        }\n      }\n      ExportsField::Array(target) => {\n        if target.is_empty() {\n          return Err(PackageJsonError::PackagePathNotExported);\n        }\n\n        for item in target {\n          match self.resolve_package_target(\n            item,\n            pattern_match,\n            is_imports,\n            conditions,\n            custom_conditions,\n            paths,\n          ) {\n            Err(_) | Ok(ExportsResolution::None) => continue,\n            Ok(res) => return Ok(res),\n          }\n        }\n      }\n      ExportsField::None => return Ok(ExportsResolution::None),\n    }\n\n    Ok(ExportsResolution::None)\n  }\n\n  fn resolve_package_imports_exports<'a>(\n    &'a self,\n    match_key: &'a str,\n    match_obj: &'a IndexMap<ExportsKey, ExportsField>,\n    is_imports: bool,\n    conditions: ExportsCondition,\n    custom_conditions: &[String],\n    paths: &Cache,\n  ) -> Result<ExportsResolution<'a>, PackageJsonError> {\n    let pattern = ExportsKey::Pattern(Cow::Borrowed(match_key));\n    if let Some(target) = match_obj.get(&pattern) {\n      if !match_key.contains('*') {\n        return self.resolve_package_target(\n          target,\n          \"\",\n          is_imports,\n          conditions,\n          custom_conditions,\n          paths,\n        );\n      }\n    }\n\n    let mut best_key = \"\";\n    let mut best_match = \"\";\n    for key in match_obj.keys() {\n      if let ExportsKey::Pattern(key) = key {\n        if let Some((pattern_base, pattern_trailer)) = key.split_once('*') {\n          if match_key.starts_with(pattern_base)\n            && !pattern_trailer.contains('*')\n            && (pattern_trailer.is_empty()\n              || (match_key.len() >= key.len() && match_key.ends_with(pattern_trailer)))\n            && pattern_key_compare(best_key, key) == Ordering::Greater\n          {\n            best_key = key;\n            best_match = &match_key[pattern_base.len()..match_key.len() - pattern_trailer.len()];\n          }\n        }\n      }\n    }\n\n    if !best_key.is_empty() {\n      return self.resolve_package_target(\n        &match_obj[&ExportsKey::Pattern(Cow::Borrowed(best_key))],\n        best_match,\n        is_imports,\n        conditions,\n        custom_conditions,\n        paths,\n      );\n    }\n\n    Ok(ExportsResolution::None)\n  }\n\n  pub fn resolve_aliases<'a>(\n    &'a self,\n    specifier: &Specifier<'a>,\n    fields: Fields,\n  ) -> Option<Cow<'a, AliasValue<'a>>> {\n    if fields.contains(Fields::SOURCE) {\n      if let SourceField::Map(source) = &self.source {\n        match self.resolve_alias(source, specifier) {\n          None => {}\n          res => return res,\n        }\n      }\n    }\n\n    if fields.contains(Fields::ALIAS) {\n      match self.resolve_alias(&self.alias, specifier) {\n        None => {}\n        res => return res,\n      }\n    }\n\n    if fields.contains(Fields::BROWSER) {\n      if let BrowserField::Map(browser) = &self.browser {\n        match self.resolve_alias(browser, specifier) {\n          None => {}\n          res => return res,\n        }\n      }\n    }\n\n    None\n  }\n\n  fn resolve_alias<'a>(\n    &'a self,\n    map: &'a IndexMap<Specifier<'a>, AliasValue<'a>>,\n    specifier: &Specifier<'a>,\n  ) -> Option<Cow<'a, AliasValue<'a>>> {\n    if let Some(alias) = self.lookup_alias(map, specifier) {\n      return Some(alias);\n    }\n\n    if let Specifier::Package(package, subpath) = specifier {\n      if let Some(alias) =\n        self.lookup_alias(map, &Specifier::Package(package.clone(), Cow::Borrowed(\"\")))\n      {\n        match alias.as_ref() {\n          AliasValue::Specifier(base) => {\n            // Join the subpath back onto the resolved alias.\n            match base {\n              Specifier::Package(base_pkg, base_subpath) => {\n                let subpath = if !base_subpath.is_empty() && !subpath.is_empty() {\n                  let mut full_subpath =\n                    String::with_capacity(base_subpath.len() + subpath.len() + 1);\n                  full_subpath.push_str(base_subpath);\n                  full_subpath.push('/');\n                  full_subpath.push_str(subpath);\n                  Cow::Owned(full_subpath)\n                } else if !subpath.is_empty() {\n                  subpath.clone()\n                } else {\n                  return Some(alias);\n                };\n                return Some(Cow::Owned(AliasValue::Specifier(Specifier::Package(\n                  base_pkg.clone(),\n                  subpath,\n                ))));\n              }\n              Specifier::Relative(path) => {\n                if subpath.is_empty() {\n                  return Some(alias);\n                } else {\n                  return Some(Cow::Owned(AliasValue::Specifier(Specifier::Relative(\n                    Cow::Owned(path.join(subpath.as_ref())),\n                  ))));\n                }\n              }\n              Specifier::Absolute(path) => {\n                if subpath.is_empty() {\n                  return Some(alias);\n                } else {\n                  return Some(Cow::Owned(AliasValue::Specifier(Specifier::Absolute(\n                    Cow::Owned(path.join(subpath.as_ref())),\n                  ))));\n                }\n              }\n              Specifier::Tilde(path) => {\n                if subpath.is_empty() {\n                  return Some(alias);\n                } else {\n                  return Some(Cow::Owned(AliasValue::Specifier(Specifier::Tilde(\n                    Cow::Owned(path.join(subpath.as_ref())),\n                  ))));\n                }\n              }\n              _ => return Some(alias),\n            }\n          }\n          _ => return Some(alias),\n        };\n      }\n    }\n\n    None\n  }\n\n  fn lookup_alias<'a>(\n    &'a self,\n    map: &'a IndexMap<Specifier<'a>, AliasValue<'a>>,\n    specifier: &Specifier<'a>,\n  ) -> Option<Cow<'a, AliasValue<'a>>> {\n    if let Some(value) = map.get(specifier) {\n      return Some(Cow::Borrowed(value));\n    }\n\n    // Match glob aliases.\n    for (key, value) in map {\n      let (glob, path) = match (key, specifier) {\n        (Specifier::Relative(glob), Specifier::Relative(path))\n        | (Specifier::Absolute(glob), Specifier::Absolute(path))\n        | (Specifier::Tilde(glob), Specifier::Tilde(path)) => (\n          glob.as_os_str().to_string_lossy(),\n          path.as_os_str().to_string_lossy(),\n        ),\n        (Specifier::Package(module_a, glob), Specifier::Package(module_b, path))\n          if module_a == module_b =>\n        {\n          (Cow::Borrowed(glob.as_ref()), Cow::Borrowed(path.as_ref()))\n        }\n        (pkg_a @ Specifier::Package(..), pkg_b @ Specifier::Package(..)) => {\n          // Glob could be in the package name, e.g. \"@internal/*\"\n          (pkg_a.to_string(), pkg_b.to_string())\n        }\n        _ => continue,\n      };\n\n      if let Some(captures) = glob_match_with_captures(&glob, &path) {\n        let res = match value {\n          AliasValue::Specifier(specifier) => AliasValue::Specifier(match specifier {\n            Specifier::Relative(r) => {\n              Specifier::Relative(replace_path_captures(r, &path, &captures)?)\n            }\n            Specifier::Absolute(r) => {\n              Specifier::Absolute(replace_path_captures(r, &path, &captures)?)\n            }\n            Specifier::Tilde(r) => Specifier::Tilde(replace_path_captures(r, &path, &captures)?),\n            Specifier::Package(module, subpath) => {\n              Specifier::Package(module.clone(), replace_captures(subpath, &path, &captures))\n            }\n            _ => return Some(Cow::Borrowed(value)),\n          }),\n          _ => return Some(Cow::Borrowed(value)),\n        };\n\n        return Some(Cow::Owned(res));\n      }\n    }\n\n    None\n  }\n\n  pub fn has_side_effects(&self, path: &Path) -> bool {\n    let path = path\n      .strip_prefix(self.path.as_path().parent().unwrap())\n      .ok()\n      .and_then(|path| path.as_os_str().to_str());\n\n    let path = match path {\n      Some(p) => p,\n      None => return true,\n    };\n\n    fn side_effects_glob_matches(glob: &str, path: &str) -> bool {\n      // Trim leading \"./\"\n      let glob = glob.strip_prefix(\"./\").unwrap_or(glob);\n\n      // If the glob does not contain any '/' characters, prefix with \"**/\" to match webpack.\n      let glob = if !glob.contains('/') {\n        Cow::Owned(format!(\"**/{}\", glob))\n      } else {\n        Cow::Borrowed(glob)\n      };\n\n      glob_match(glob.as_ref(), path)\n    }\n\n    match &self.side_effects {\n      SideEffects::None => true,\n      SideEffects::Boolean(b) => *b,\n      SideEffects::String(glob) => side_effects_glob_matches(glob, path),\n      SideEffects::Array(globs) => globs\n        .iter()\n        .any(|glob| side_effects_glob_matches(glob, path)),\n    }\n  }\n}\n\nfn replace_path_captures<'a>(\n  s: &'a Path,\n  path: &str,\n  captures: &Vec<Range<usize>>,\n) -> Option<Cow<'a, Path>> {\n  Some(\n    match replace_captures(s.as_os_str().to_str()?, path, captures) {\n      Cow::Borrowed(b) => Cow::Borrowed(Path::new(b)),\n      Cow::Owned(b) => Cow::Owned(PathBuf::from(b)),\n    },\n  )\n}\n\n/// Inserts captures matched in a glob against `path` using a pattern string.\n/// Replacements are inserted using JS-like $N syntax, e.g. $1 for the first capture.\nfn replace_captures<'a>(s: &'a str, path: &str, captures: &Vec<Range<usize>>) -> Cow<'a, str> {\n  let mut res = Cow::Borrowed(s);\n  let bytes = s.as_bytes();\n  for (idx, _) in s.match_indices('$').rev() {\n    let mut end = idx;\n    while end + 1 < bytes.len() && bytes[end + 1].is_ascii_digit() {\n      end += 1;\n    }\n\n    if end != idx {\n      if let Ok(capture_index) = s[idx + 1..end + 1].parse::<usize>() {\n        if capture_index > 0 && capture_index - 1 < captures.len() {\n          res\n            .to_mut()\n            .replace_range(idx..end + 1, &path[captures[capture_index - 1].clone()]);\n        }\n      }\n    }\n  }\n\n  res\n}\n\nfn pattern_key_compare(a: &str, b: &str) -> Ordering {\n  let a_pos = a.chars().position(|c| c == '*');\n  let b_pos = b.chars().position(|c| c == '*');\n  let base_length_a = a_pos.map_or(a.len(), |p| p + 1);\n  let base_length_b = b_pos.map_or(b.len(), |p| p + 1);\n  let cmp = base_length_b.cmp(&base_length_a);\n  if cmp != Ordering::Equal {\n    return cmp;\n  }\n\n  if a_pos.is_none() {\n    return Ordering::Greater;\n  }\n\n  if b_pos.is_none() {\n    return Ordering::Less;\n  }\n\n  b.len().cmp(&a.len())\n}\n\npub struct EntryIter<'a> {\n  package: &'a PackageJson,\n  fields: Fields,\n  cache: &'a Cache,\n}\n\nimpl<'a> Iterator for EntryIter<'a> {\n  type Item = (CachedPath, &'static str);\n\n  fn next(&mut self) -> Option<Self::Item> {\n    if self.fields.contains(Fields::SOURCE) {\n      self.fields.remove(Fields::SOURCE);\n      if let Some(source) = self.package.source(&self.cache) {\n        return Some((source, \"source\"));\n      }\n    }\n\n    if self.fields.contains(Fields::TYPES) {\n      self.fields.remove(Fields::TYPES);\n      if let Some(types) = &self.package.types {\n        return Some((types.clone(), \"types\"));\n      }\n    }\n\n    if self.fields.contains(Fields::BROWSER) {\n      self.fields.remove(Fields::BROWSER);\n      match &self.package.browser {\n        BrowserField::None => {}\n        BrowserField::String(browser) => {\n          return Some((\n            self.package.path.resolve(Path::new(browser), self.cache),\n            \"browser\",\n          ));\n        }\n        BrowserField::Map(map) => {\n          if let Some(AliasValue::Specifier(Specifier::Relative(s))) = map.get(&Specifier::Package(\n            Cow::Borrowed(&self.package.name),\n            Cow::Borrowed(\"\"),\n          )) {\n            return Some((self.package.path.resolve(s, self.cache), \"browser\"));\n          }\n        }\n      }\n    }\n\n    if self.fields.contains(Fields::MODULE) {\n      self.fields.remove(Fields::MODULE);\n      if let Some(module) = &self.package.module {\n        return Some((module.clone(), \"module\"));\n      }\n    }\n\n    if self.fields.contains(Fields::MAIN) {\n      self.fields.remove(Fields::MAIN);\n      if let Some(main) = &self.package.main {\n        return Some((main.clone(), \"main\"));\n      }\n    }\n\n    if self.fields.contains(Fields::TSCONFIG) {\n      self.fields.remove(Fields::TSCONFIG);\n      if let Some(tsconfig) = &self.package.tsconfig {\n        return Some((tsconfig.clone(), \"tsconfig\"));\n      }\n    }\n\n    None\n  }\n}\n\n#[cfg(test)]\nmod tests {\n  use super::*;\n  use indexmap::indexmap;\n\n  // Based on https://github.com/lukeed/resolve.exports/blob/master/test/resolve.js,\n  // https://github.com/privatenumber/resolve-pkg-maps/tree/develop/tests, and\n  // https://github.com/webpack/enhanced-resolve/blob/main/test/exportsField.js\n\n  #[test]\n  fn exports_string() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::String(\"./exports.js\".into()),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/exports.js\")\n    );\n    // assert_eq!(pkg.resolve_package_exports(\"./exports.js\", &[]).unwrap(), cache.get_normalized(\"/foo/exports.js\"), &cache);\n    // assert_eq!(pkg.resolve_package_exports(\"foobar\", &[]).unwrap(), cache.get_normalized(\"/foo/exports.js\"), &cache);\n  }\n\n  #[test]\n  fn exports_dot() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \".\".into() => ExportsField::String(\"./exports.js\".into())\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/exports.js\")\n    );\n    assert!(matches!(\n      pkg.resolve_package_exports(\".\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n    // assert_eq!(pkg.resolve_package_exports(\"foobar\", &[]).unwrap(), cache.get_normalized(\"/foo/exports.js\"), &cache);\n  }\n\n  #[test]\n  fn exports_dot_conditions() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \".\".into() => ExportsField::Map(indexmap! {\n            \"import\".into() => ExportsField::String(\"./import.js\".into()),\n            \"require\".into() => ExportsField::String(\"./require.js\".into())\n          })\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"\",\n          ExportsCondition::IMPORT | ExportsCondition::REQUIRE,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/import.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::REQUIRE, &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/require.js\")\n    );\n    assert!(matches!(\n      pkg.resolve_package_exports(\"\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"\", ExportsCondition::NODE, &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n  }\n\n  #[test]\n  fn exports_map_string() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"./foo\".into() => ExportsField::String(\"./exports.js\".into()),\n          \"./.invisible\".into() => ExportsField::String(\"./.invisible.js\".into()),\n          \"./\".into() => ExportsField::String(\"./\".into()),\n          \"./*\".into() => ExportsField::String(\"./*.js\".into())\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"foo\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/exports.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\".invisible\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/.invisible.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"file\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/file.js\")\n    );\n  }\n\n  #[test]\n  fn exports_map_conditions() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"./foo\".into() => ExportsField::Map(indexmap! {\n            \"import\".into() => ExportsField::String(\"./import.js\".into()),\n            \"require\".into() => ExportsField::String(\"./require.js\".into())\n          })\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"foo\",\n          ExportsCondition::IMPORT | ExportsCondition::REQUIRE,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/import.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"foo\", ExportsCondition::REQUIRE, &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/require.js\")\n    );\n    assert!(matches!(\n      pkg.resolve_package_exports(\"foo\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"foo\", ExportsCondition::NODE, &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n  }\n\n  #[test]\n  fn nested_conditions() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"node\".into() => ExportsField::Map(indexmap! {\n            \"import\".into() => ExportsField::String(\"./import.js\".into()),\n            \"require\".into() => ExportsField::String(\"./require.js\".into())\n          }),\n          \"default\".into() => ExportsField::String(\"./default.js\".into())\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"\",\n          ExportsCondition::NODE | ExportsCondition::IMPORT,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/import.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"\",\n          ExportsCondition::NODE | ExportsCondition::REQUIRE,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/require.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::IMPORT, &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/default.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/default.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::NODE, &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/default.js\")\n    );\n  }\n\n  #[test]\n  fn custom_conditions() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"custom\".into() => ExportsField::String(\"./custom.js\".into()),\n          \"default\".into() => ExportsField::String(\"./default.js\".into())\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::NODE, &[\"custom\".into()], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/custom.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::NODE, &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/default.js\")\n    );\n  }\n\n  #[test]\n  fn subpath_nested_conditions() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"./lite\".into() => ExportsField::Map(indexmap! {\n            \"node\".into() => ExportsField::Map(indexmap! {\n              \"import\".into() => ExportsField::String(\"./node_import.js\".into()),\n              \"require\".into() => ExportsField::String(\"./node_require.js\".into())\n            }),\n            \"browser\".into() => ExportsField::Map(indexmap! {\n              \"import\".into() => ExportsField::String(\"./browser_import.js\".into()),\n              \"require\".into() => ExportsField::String(\"./browser_require.js\".into())\n            }),\n          })\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"lite\",\n          ExportsCondition::NODE | ExportsCondition::IMPORT,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/node_import.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"lite\",\n          ExportsCondition::NODE | ExportsCondition::REQUIRE,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/node_require.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"lite\",\n          ExportsCondition::BROWSER | ExportsCondition::IMPORT,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/browser_import.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"lite\",\n          ExportsCondition::BROWSER | ExportsCondition::REQUIRE,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/browser_require.js\")\n    );\n    assert!(matches!(\n      pkg.resolve_package_exports(\"lite\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n  }\n\n  #[test]\n  fn subpath_star() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"./*\".into() => ExportsField::String(\"./cheese/*.mjs\".into()),\n          \"./pizza/*\".into() => ExportsField::String(\"./pizza/*.mjs\".into()),\n          \"./burritos/*\".into() => ExportsField::String(\"./burritos/*/*.mjs\".into()),\n          \"./literal\".into() => ExportsField::String(\"./literal/*.js\".into()),\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"hello\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/cheese/hello.mjs\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"hello/world\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/cheese/hello/world.mjs\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"hello.js\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/cheese/hello.js.mjs\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"pizza/test\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/pizza/test.mjs\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"burritos/test\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/burritos/test/test.mjs\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"literal\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/literal/*.js\")\n    );\n\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"./*\".into() => ExportsField::String(\"./*.js\".into()),\n          \"./*.js\".into() => ExportsField::None,\n          \"./internal/*\".into() => ExportsField::None,\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"file\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/file.js\")\n    );\n    assert!(matches!(\n      pkg.resolve_package_exports(\"file.js\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"internal/file\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n  }\n\n  #[test]\n  fn exports_null() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"./features/*.js\".into() => ExportsField::String(\"./src/features/*.js\".into()),\n          \"./features/private-internal/*\".into() => ExportsField::None,\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"features/foo.js\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/src/features/foo.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"features/foo/bar.js\",\n          ExportsCondition::empty(),\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/src/features/foo/bar.js\")\n    );\n    assert!(matches!(\n      pkg.resolve_package_exports(\n        \"features/private-internal/foo.js\",\n        ExportsCondition::empty(),\n        &[],\n        &cache\n      ),\n      Err(PackageJsonError::PackagePathNotExported)\n    ),);\n  }\n\n  #[test]\n  fn exports_array() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"./utils/*\".into() => ExportsField::Map(indexmap! {\n            \"browser\".into() => ExportsField::Map(indexmap! {\n              \"worklet\".into() => ExportsField::Array(vec![ExportsField::String(\"./*\".into()), ExportsField::String(\"./node/*\".into())]),\n              \"default\".into() => ExportsField::Map(indexmap! {\n                \"node\".into() => ExportsField::String(\"./node/*\".into())\n              })\n            })\n          }),\n          \"./test/*\".into() => ExportsField::Array(vec![ExportsField::String(\"lodash/*\".into()), ExportsField::String(\"./bar/*\".into())]),\n          \"./file\".into() => ExportsField::Array(vec![ExportsField::String(\"http://a.com\".into()), ExportsField::String(\"./file.js\".into())])\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"utils/index.js\",\n          ExportsCondition::BROWSER | ExportsCondition::WORKLET,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/index.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\n          \"utils/index.js\",\n          ExportsCondition::BROWSER | ExportsCondition::NODE,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      cache.get_normalized(\"/foo/node/index.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"test/index.js\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/bar/index.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"file\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/file.js\")\n    );\n    assert!(matches!(\n      pkg.resolve_package_exports(\"utils/index.js\", ExportsCondition::BROWSER, &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"dir/file.js\", ExportsCondition::BROWSER, &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Array(vec![\n          ExportsField::Map(indexmap! {\n            \"node\".into() => ExportsField::String(\"./a.js\".into())\n          }),\n          ExportsField::String(\"./b.js\".into()),\n        ]),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/b.js\")\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_exports(\"\", ExportsCondition::NODE, &[], &cache)\n        .unwrap(),\n      cache.get_normalized(\"/foo/a.js\")\n    );\n  }\n\n  #[test]\n  fn exports_invalid() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \"./invalid\".into() => ExportsField::String(\"../invalid\".into()),\n          \"./absolute\".into() => ExportsField::String(\"/absolute\".into()),\n          \"./package\".into() => ExportsField::String(\"package\".into()),\n          \"./utils/index\".into() => ExportsField::String(\"./src/../index.js\".into()),\n          \"./dist/*\".into() => ExportsField::String(\"./src/../../*\".into()),\n          \"./modules/*\".into() => ExportsField::String(\"./node_modules/*\".into()),\n          \"./modules2/*\".into() => ExportsField::String(\"./NODE_MODULES/*\".into()),\n          \"./*/*\".into() => ExportsField::String(\"./file.js\".into())\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert!(matches!(\n      pkg.resolve_package_exports(\"invalid\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::InvalidPackageTarget)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"absolute\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::InvalidPackageTarget)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"package\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::InvalidPackageTarget)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"utils/index\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::InvalidPackageTarget)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"dist/foo\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::InvalidPackageTarget)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"modules/foo\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::InvalidPackageTarget)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"a/b\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"a/*\", ExportsCondition::empty(), &[], &cache),\n      Err(PackageJsonError::PackagePathNotExported)\n    ));\n\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        exports: ExportsField::Map(indexmap! {\n          \".\".into() => ExportsField::String(\"./foo.js\".into()),\n          \"node\".into() => ExportsField::String(\"./bar.js\".into()),\n        }),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert!(matches!(\n      pkg.resolve_package_exports(\"\", ExportsCondition::NODE, &[], &cache),\n      Err(PackageJsonError::InvalidPackageTarget)\n    ));\n    assert!(matches!(\n      pkg.resolve_package_exports(\"\", ExportsCondition::NODE, &[], &cache),\n      Err(PackageJsonError::InvalidPackageTarget)\n    ));\n  }\n\n  #[test]\n  fn imports() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        imports: indexmap! {\n          \"#foo\".into() => ExportsField::String(\"./foo.mjs\".into()),\n          \"#internal/*\".into() => ExportsField::String(\"./src/internal/*.mjs\".into()),\n          \"#bar\".into() => ExportsField::String(\"bar\".into()),\n        },\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg\n        .resolve_package_imports(\"foo\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      ExportsResolution::Path(cache.get_normalized(\"/foo/foo.mjs\"))\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_imports(\"internal/foo\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      ExportsResolution::Path(cache.get_normalized(\"/foo/src/internal/foo.mjs\"))\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_imports(\"bar\", ExportsCondition::empty(), &[], &cache)\n        .unwrap(),\n      ExportsResolution::Package(\"bar\".into())\n    );\n  }\n\n  #[test]\n  fn import_conditions() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        imports: indexmap! {\n          \"#entry/*\".into() => ExportsField::Map(indexmap! {\n            \"node\".into() => ExportsField::String(\"./node/*.js\".into()),\n            \"browser\".into() => ExportsField::String(\"./browser/*.js\".into())\n          })\n        },\n        ..Default::default()\n      },\n      &cache,\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_imports(\"entry/foo\", ExportsCondition::NODE, &[], &cache)\n        .unwrap(),\n      ExportsResolution::Path(cache.get_normalized(\"/foo/node/foo.js\"))\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_imports(\"entry/foo\", ExportsCondition::BROWSER, &[], &cache)\n        .unwrap(),\n      ExportsResolution::Path(cache.get_normalized(\"/foo/browser/foo.js\"))\n    );\n    assert_eq!(\n      pkg\n        .resolve_package_imports(\n          \"entry/foo\",\n          ExportsCondition::NODE | ExportsCondition::BROWSER,\n          &[],\n          &cache\n        )\n        .unwrap(),\n      ExportsResolution::Path(cache.get_normalized(\"/foo/node/foo.js\"))\n    );\n  }\n\n  #[test]\n  fn aliases() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        alias: indexmap! {\n          \"./foo.js\".into() => AliasValue::Specifier(\"./foo-alias.js\".into()),\n          \"bar\".into()  => AliasValue::Specifier(\"./bar-alias.js\".into()),\n          \"lodash\".into()  => AliasValue::Specifier(\"my-lodash\".into()),\n          \"lodash/clone\".into()  => AliasValue::Specifier(\"./clone.js\".into()),\n          \"test\".into() => AliasValue::Specifier(\"./test\".into()),\n          \"foo/*\".into() => AliasValue::Specifier(\"bar/$1\".into()),\n          \"./foo/src/**\".into() => AliasValue::Specifier(\"./foo/lib/$1\".into()),\n          \"/foo/src/**\".into() => AliasValue::Specifier(\"/foo/lib/$1\".into()),\n          \"~/foo/src/**\".into() => AliasValue::Specifier(\"~/foo/lib/$1\".into()),\n          \"url\".into() => AliasValue::Bool(false),\n          \"@internal/**\".into() => AliasValue::Specifier(\"./internal/$1\".into()),\n          \"@foo/*/bar/*\".into() => AliasValue::Specifier(\"./test/$1/$2\".into()),\n        },\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert_eq!(\n      pkg.resolve_aliases(&\"./foo.js\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"./foo-alias.js\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"bar\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"./bar-alias.js\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"lodash\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"my-lodash\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"lodash/foo\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"my-lodash/foo\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"lodash/clone\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"./clone.js\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"test\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"./test\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"test/foo\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"./test/foo\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"foo/hi\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"bar/hi\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"./foo/src/a/b\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"./foo/lib/a/b\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"/foo/src/a/b\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"/foo/lib/a/b\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"~/foo/src/a/b\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"~/foo/lib/a/b\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"url\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Bool(false)))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"@internal/foo\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"./internal/foo\".into())))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"@internal/foo/bar\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\n        \"./internal/foo/bar\".into()\n      )))\n    );\n    assert_eq!(\n      pkg.resolve_aliases(&\"@foo/a/bar/b\".into(), Fields::ALIAS),\n      Some(Cow::Owned(AliasValue::Specifier(\"./test/a/b\".into())))\n    );\n  }\n\n  #[allow(clippy::single_range_in_vec_init)]\n  #[test]\n  fn test_replace_captures() {\n    assert_eq!(\n      replace_captures(\"test/$1/$2\", \"foo/bar/baz\", &vec![4..7, 8..11]),\n      Cow::Borrowed(\"test/bar/baz\")\n    );\n    assert_eq!(\n      replace_captures(\"test/$1/$2\", \"foo/bar/baz\", &vec![4..7]),\n      Cow::Borrowed(\"test/bar/$2\")\n    );\n    assert_eq!(\n      replace_captures(\"test/$1/$2/$3\", \"foo/bar/baz\", &vec![4..7, 8..11]),\n      Cow::Borrowed(\"test/bar/baz/$3\")\n    );\n    assert_eq!(\n      replace_captures(\"test/$1/$2/$\", \"foo/bar/baz\", &vec![4..7, 8..11]),\n      Cow::Borrowed(\"test/bar/baz/$\")\n    );\n    assert_eq!(\n      replace_captures(\"te$st/$1/$2\", \"foo/bar/baz\", &vec![4..7, 8..11]),\n      Cow::Borrowed(\"te$st/bar/baz\")\n    );\n  }\n\n  #[test]\n  fn side_effects_none() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert!(pkg.has_side_effects(Path::new(\"/foo/index.js\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/index.js\")));\n    assert!(pkg.has_side_effects(Path::new(\"/index.js\")));\n  }\n\n  #[test]\n  fn side_effects_bool() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        side_effects: SideEffects::Boolean(false),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/index.js\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/bar/index.js\")));\n    assert!(pkg.has_side_effects(Path::new(\"/index.js\")));\n\n    let pkg = PackageJson {\n      side_effects: SideEffects::Boolean(true),\n      ..pkg\n    };\n\n    assert!(pkg.has_side_effects(Path::new(\"/foo/index.js\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/index.js\")));\n    assert!(pkg.has_side_effects(Path::new(\"/index.js\")));\n  }\n\n  #[test]\n  fn side_effects_glob() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        side_effects: SideEffects::String(\"*.css\".into()),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert!(pkg.has_side_effects(Path::new(\"/foo/a.css\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/baz.css\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/x/baz.css\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/a.js\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/bar/baz.js\")));\n    assert!(pkg.has_side_effects(Path::new(\"/index.js\")));\n\n    let pkg = PackageJson {\n      side_effects: SideEffects::String(\"bar/*.css\".into()),\n      ..pkg\n    };\n\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/a.css\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/baz.css\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/bar/x/baz.css\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/a.js\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/bar/baz.js\")));\n    assert!(pkg.has_side_effects(Path::new(\"/index.js\")));\n\n    let pkg = PackageJson {\n      side_effects: SideEffects::String(\"./bar/*.css\".into()),\n      ..pkg\n    };\n\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/a.css\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/baz.css\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/bar/x/baz.css\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/a.js\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/bar/baz.js\")));\n    assert!(pkg.has_side_effects(Path::new(\"/index.js\")));\n  }\n\n  #[test]\n  fn side_effects_array() {\n    let cache = Cache::default();\n    let pkg = PackageJson::from_serialized(\n      cache.get_normalized(\"/foo/package.json\"),\n      SerializedPackageJson {\n        name: \"foobar\".into(),\n        side_effects: SideEffects::Array(vec![\"*.css\".into(), \"*.html\".into()]),\n        ..Default::default()\n      },\n      &cache,\n    );\n\n    assert!(pkg.has_side_effects(Path::new(\"/foo/a.css\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/baz.css\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/x/baz.css\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/a.html\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/baz.html\")));\n    assert!(pkg.has_side_effects(Path::new(\"/foo/bar/x/baz.html\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/a.js\")));\n    assert!(!pkg.has_side_effects(Path::new(\"/foo/bar/baz.js\")));\n    assert!(pkg.has_side_effects(Path::new(\"/index.js\")));\n  }\n\n  #[test]\n  fn parsing() {\n    let pkg: SerializedPackageJson = serde_json::from_str(r#\"{\"type\":\"script\"}\"#).unwrap();\n    assert_eq!(pkg.module_type, ModuleType::CommonJs);\n    let pkg: SerializedPackageJson = serde_json::from_str(r#\"{\"name\":\"foo\"}\"#).unwrap();\n    assert_eq!(pkg.module_type, ModuleType::CommonJs);\n    let pkg: SerializedPackageJson = serde_json::from_str(r#\"{\"main\":false}\"#).unwrap();\n    assert_eq!(pkg.main, None);\n  }\n}\n"
  },
  {
    "path": "crates/parcel-resolver/src/specifier.rs",
    "content": "use std::{\n  borrow::Cow,\n  path::{Path, PathBuf, is_separator},\n};\n\nuse percent_encoding::percent_decode_str;\n\nuse crate::{Flags, builtins::BUILTINS, url_to_path::url_to_path};\n\n/// Indicates how a specifier should be parsed.\n#[derive(Debug, PartialEq, Eq, Clone, Copy)]\npub enum SpecifierType {\n  /// Parse the specifier as an ES module specifier.\n  /// This treats the specifier like a URL, but with support for bare module specifiers.\n  Esm,\n  /// Parse the specifier as a CommonJS specifier.\n  Cjs,\n  /// Parse the specifier as a URL.\n  /// Bare specifiers are treated like relative URLs.\n  Url,\n}\n\n/// An error that occurred while parsing a specifier.\n#[derive(Debug, Clone, PartialEq, serde::Serialize)]\n#[serde(tag = \"kind\", content = \"value\")]\npub enum SpecifierError {\n  /// Specifier was an empty string.\n  EmptySpecifier,\n  /// Invalid specifier for an npm package.\n  InvalidPackageSpecifier,\n  /// Error parsing a URL.\n  #[serde(serialize_with = \"serialize_url_error\")]\n  UrlError(url::ParseError),\n  /// Invalid `file://` URL.\n  InvalidFileUrl,\n}\n\nimpl From<url::ParseError> for SpecifierError {\n  fn from(value: url::ParseError) -> Self {\n    SpecifierError::UrlError(value)\n  }\n}\n\nfn serialize_url_error<S>(value: &url::ParseError, serializer: S) -> Result<S::Ok, S::Error>\nwhere\n  S: serde::Serializer,\n{\n  use serde::Serialize;\n  value.to_string().serialize(serializer)\n}\n\n/// Represents a module specifier.\n#[derive(PartialEq, Eq, Hash, Clone, Debug)]\npub enum Specifier<'a> {\n  /// A relative specifier, e.g. './foo'.\n  Relative(Cow<'a, Path>),\n  /// An absolute specifier, e.g. '/foo/bar'.\n  Absolute(Cow<'a, Path>),\n  /// A tilde specifier, e.g. '~/foo'.\n  Tilde(Cow<'a, Path>),\n  /// A hash specifier, e.g. '#foo'.\n  Hash(Cow<'a, str>),\n  /// A package specifier and subpath, e.g. 'lodash/clone'.\n  Package(Cow<'a, str>, Cow<'a, str>),\n  /// A Node builtin module, e.g. 'path' or 'node:path'.\n  Builtin(Cow<'a, str>, Cow<'a, str>),\n  /// A URL specifier.\n  Url(&'a str),\n}\n\nimpl<'a> Specifier<'a> {\n  /// Parses a specifier.\n  pub fn parse(\n    specifier: &'a str,\n    specifier_type: SpecifierType,\n    flags: Flags,\n  ) -> Result<(Specifier<'a>, Option<&'a str>), SpecifierError> {\n    if specifier.is_empty() {\n      return Err(SpecifierError::EmptySpecifier);\n    }\n\n    Ok(match specifier.as_bytes()[0] {\n      b'.' => {\n        let specifier = if let Some(specifier) = specifier.strip_prefix(\"./\") {\n          specifier.trim_start_matches('/')\n        } else {\n          specifier\n        };\n        let (path, query) = decode_path(specifier, specifier_type);\n        (Specifier::Relative(path), query)\n      }\n      b'~' => {\n        let mut specifier = &specifier[1..];\n        if !specifier.is_empty() && is_separator(specifier.as_bytes()[0] as char) {\n          specifier = &specifier[1..];\n        }\n        let (path, query) = decode_path(specifier, specifier_type);\n        (Specifier::Tilde(path), query)\n      }\n      b'/' => {\n        if specifier.starts_with(\"//\") && specifier_type == SpecifierType::Url {\n          // A protocol-relative URL, e.g `url('//example.com/foo.png')`.\n          (Specifier::Url(specifier), None)\n        } else {\n          let (path, query) = decode_path(specifier, specifier_type);\n          (Specifier::Absolute(path), query)\n        }\n      }\n      b'#' => (Specifier::Hash(Cow::Borrowed(&specifier[1..])), None),\n      _ => {\n        // Bare specifier.\n        match specifier_type {\n          SpecifierType::Url | SpecifierType::Esm => {\n            // Check if there is a scheme first.\n            if let Ok((scheme, rest)) = parse_scheme(specifier) {\n              let (path, rest) = parse_path(rest);\n              let (query, _) = parse_query(rest);\n              match scheme.as_ref() {\n                \"npm\" if flags.contains(Flags::NPM_SCHEME) => {\n                  if BUILTINS.contains(&path) {\n                    return Ok((\n                      Specifier::Builtin(Cow::Borrowed(\"\"), Cow::Borrowed(path)),\n                      None,\n                    ));\n                  }\n\n                  (\n                    parse_package(percent_decode_str(path).decode_utf8_lossy())?,\n                    query,\n                  )\n                }\n                // Treat Deno's \"jsr:\" dependencies as builtins so they get marked as external.\n                // Also Cloudflare schemes: https://github.com/cloudflare/workerd/blob/b7bcb543812dfd9fdc0d9b391801ec1bc4f0973a/src/workerd/jsg/commonjs.c%2B%2B#L27\n                \"node\" | \"jsr\" | \"cloudflare\" | \"workerd\" => {\n                  // Node does not URL decode or support query params here.\n                  // See https://github.com/nodejs/node/issues/39710.\n                  (Specifier::Builtin(scheme, Cow::Borrowed(path)), None)\n                }\n                \"file\" => (\n                  Specifier::Absolute(Cow::Owned(url_to_path(specifier)?)),\n                  query,\n                ),\n                _ => (Specifier::Url(specifier), None),\n              }\n            } else {\n              // If not, then parse as an npm package if this is an ESM specifier,\n              // otherwise treat this as a relative path.\n              let (path, rest) = parse_path(specifier);\n              if specifier_type == SpecifierType::Esm {\n                if BUILTINS.contains(&path) {\n                  return Ok((\n                    Specifier::Builtin(Cow::Borrowed(\"\"), Cow::Borrowed(path)),\n                    None,\n                  ));\n                }\n\n                let (query, _) = parse_query(rest);\n                (\n                  parse_package(percent_decode_str(path).decode_utf8_lossy())?,\n                  query,\n                )\n              } else {\n                let (path, query) = decode_path(specifier, specifier_type);\n                (Specifier::Relative(path), query)\n              }\n            }\n          }\n          SpecifierType::Cjs => {\n            if let Some((scheme, module)) = specifier.split_once(':') {\n              if matches!(scheme, \"node\" | \"jsr\" | \"cloudflare\" | \"workerd\") {\n                return Ok((\n                  Specifier::Builtin(Cow::Borrowed(scheme), Cow::Borrowed(module)),\n                  None,\n                ));\n              }\n            }\n\n            if BUILTINS.contains(&specifier) {\n              (\n                Specifier::Builtin(Cow::Borrowed(\"\"), Cow::Borrowed(specifier)),\n                None,\n              )\n            } else {\n              #[cfg(windows)]\n              if !flags.contains(Flags::ABSOLUTE_SPECIFIERS) {\n                let path = Path::new(specifier);\n                if path.is_absolute() {\n                  return Ok((Specifier::Absolute(Cow::Borrowed(path)), None));\n                }\n              }\n\n              (parse_package(Cow::Borrowed(specifier))?, None)\n            }\n          }\n        }\n      }\n    })\n  }\n\n  /// Converts the specifier to a string.\n  pub fn to_string(&'a self) -> Cow<'a, str> {\n    match self {\n      Specifier::Relative(path) | Specifier::Absolute(path) | Specifier::Tilde(path) => {\n        path.as_os_str().to_string_lossy()\n      }\n      Specifier::Hash(path) => path.clone(),\n      Specifier::Package(module, subpath) => {\n        if subpath.is_empty() {\n          Cow::Borrowed(module)\n        } else {\n          let mut res = String::with_capacity(module.len() + subpath.len() + 1);\n          res.push_str(module);\n          res.push('/');\n          res.push_str(subpath);\n          Cow::Owned(res)\n        }\n      }\n      Specifier::Builtin(scheme, builtin) => {\n        if scheme.is_empty() {\n          return Cow::Borrowed(builtin);\n        }\n        let mut res = String::with_capacity(scheme.len() + builtin.len() + 1);\n        res.push_str(scheme);\n        res.push(':');\n        res.push_str(builtin);\n        Cow::Owned(res)\n      }\n      Specifier::Url(url) => Cow::Borrowed(url),\n    }\n  }\n}\n\n// https://url.spec.whatwg.org/#scheme-state\n// https://github.com/servo/rust-url/blob/1c1e406874b3d2aa6f36c5d2f3a5c2ea74af9efb/url/src/parser.rs#L387\npub(crate) fn parse_scheme(input: &str) -> Result<(Cow<'_, str>, &str), ()> {\n  if input.is_empty() || !input.starts_with(ascii_alpha) {\n    return Err(());\n  }\n  let mut is_lowercase = true;\n  for (i, c) in input.chars().enumerate() {\n    match c {\n      'A'..='Z' => {\n        is_lowercase = false;\n      }\n      'a'..='z' | '0'..='9' | '+' | '-' | '.' => {}\n      ':' => {\n        let scheme = &input[0..i];\n        let rest = &input[i + 1..];\n        return Ok(if is_lowercase {\n          (Cow::Borrowed(scheme), rest)\n        } else {\n          (Cow::Owned(scheme.to_ascii_lowercase()), rest)\n        });\n      }\n      _ => {\n        return Err(());\n      }\n    }\n  }\n\n  // EOF before ':'\n  Err(())\n}\n\n// https://url.spec.whatwg.org/#path-state\nfn parse_path(input: &str) -> (&str, &str) {\n  // We don't really want to normalize the path (e.g. replacing \"..\" and \".\" segments).\n  // That is done later. For now, we just need to find the end of the path.\n  if let Some(pos) = input.chars().position(|c| c == '?' || c == '#') {\n    (&input[0..pos], &input[pos..])\n  } else {\n    (input, \"\")\n  }\n}\n\n// https://url.spec.whatwg.org/#query-state\nfn parse_query(input: &str) -> (Option<&str>, &str) {\n  if !input.is_empty() && input.as_bytes()[0] == b'?' {\n    if let Some(pos) = input.chars().position(|c| c == '#') {\n      (Some(&input[0..pos]), &input[pos..])\n    } else {\n      (Some(input), \"\")\n    }\n  } else {\n    (None, input)\n  }\n}\n\n/// https://url.spec.whatwg.org/#ascii-alpha\n#[inline]\nfn ascii_alpha(ch: char) -> bool {\n  ch.is_ascii_alphabetic()\n}\n\nfn parse_package(specifier: Cow<'_, str>) -> Result<Specifier, SpecifierError> {\n  match specifier {\n    Cow::Borrowed(specifier) => {\n      let (module, subpath) = parse_package_specifier(specifier)?;\n      Ok(Specifier::Package(\n        Cow::Borrowed(module),\n        Cow::Borrowed(subpath),\n      ))\n    }\n    Cow::Owned(specifier) => {\n      let (module, subpath) = parse_package_specifier(&specifier)?;\n      Ok(Specifier::Package(\n        Cow::Owned(module.to_owned()),\n        Cow::Owned(subpath.to_owned()),\n      ))\n    }\n  }\n}\n\npub fn parse_package_specifier(specifier: &str) -> Result<(&str, &str), SpecifierError> {\n  let idx = specifier.chars().position(|p| p == '/');\n  if specifier.starts_with('@') {\n    let idx = idx.ok_or(SpecifierError::InvalidPackageSpecifier)?;\n    if let Some(next) = &specifier[idx + 1..].chars().position(|p| p == '/') {\n      Ok((\n        &specifier[0..idx + 1 + *next],\n        &specifier[idx + *next + 2..],\n      ))\n    } else {\n      Ok((specifier, \"\"))\n    }\n  } else if let Some(idx) = idx {\n    Ok((&specifier[0..idx], &specifier[idx + 1..]))\n  } else {\n    Ok((specifier, \"\"))\n  }\n}\n\npub(crate) fn decode_path(\n  specifier: &str,\n  specifier_type: SpecifierType,\n) -> (Cow<'_, Path>, Option<&str>) {\n  match specifier_type {\n    SpecifierType::Url | SpecifierType::Esm => {\n      let (path, rest) = parse_path(specifier);\n      let (query, _) = parse_query(rest);\n      let path = match percent_decode_str(path).decode_utf8_lossy() {\n        Cow::Borrowed(v) => Cow::Borrowed(Path::new(v)),\n        Cow::Owned(v) => Cow::Owned(PathBuf::from(v)),\n      };\n      (path, query)\n    }\n    SpecifierType::Cjs => (Cow::Borrowed(Path::new(specifier)), None),\n  }\n}\n\nimpl<'a> From<&'a str> for Specifier<'a> {\n  fn from(specifier: &'a str) -> Self {\n    Specifier::parse(specifier, SpecifierType::Cjs, Flags::empty())\n      .unwrap()\n      .0\n  }\n}\n\nimpl<'de> serde::Deserialize<'de> for Specifier<'static> {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    use serde::Deserialize;\n    let s: String = Deserialize::deserialize(deserializer)?;\n    // Specifiers are only deserialized as part of the \"alias\" and \"browser\" fields,\n    // so we assume CJS specifiers in Parcel mode.\n    Specifier::parse(&s, SpecifierType::Cjs, Flags::empty())\n      .map(|s| match s.0 {\n        Specifier::Relative(a) => Specifier::Relative(Cow::Owned(a.into_owned())),\n        Specifier::Absolute(a) => Specifier::Absolute(Cow::Owned(a.into_owned())),\n        Specifier::Tilde(a) => Specifier::Tilde(Cow::Owned(a.into_owned())),\n        Specifier::Hash(a) => Specifier::Hash(Cow::Owned(a.into_owned())),\n        Specifier::Package(a, b) => {\n          Specifier::Package(Cow::Owned(a.into_owned()), Cow::Owned(b.into_owned()))\n        }\n        Specifier::Builtin(scheme, module) => Specifier::Builtin(\n          Cow::Owned(scheme.into_owned()),\n          Cow::Owned(module.into_owned()),\n        ),\n        Specifier::Url(_) => todo!(),\n      })\n      .map_err(|_| serde::de::Error::custom(\"Invalid specifier\"))\n  }\n}\n"
  },
  {
    "path": "crates/parcel-resolver/src/tsconfig.rs",
    "content": "use std::{\n  borrow::Cow,\n  path::{Path, PathBuf},\n};\n\nuse crate::json_comments_rs::strip_comments_in_place;\nuse indexmap::IndexMap;\nuse itertools::Either;\n\nuse crate::{\n  ResolverError,\n  cache::{Cache, CachedPath},\n  error::JsonError,\n  specifier::Specifier,\n};\n\n#[derive(serde::Deserialize, Debug, Default)]\n#[serde(rename_all = \"camelCase\")]\nstruct SerializedTsConfig {\n  base_url: Option<PathBuf>,\n  paths: Option<IndexMap<Specifier<'static>, Vec<String>>>,\n  pub module_suffixes: Option<Vec<String>>,\n  // rootDirs??\n}\n\npub struct TsConfig {\n  pub path: CachedPath,\n  base_url: Option<CachedPath>,\n  paths: Option<IndexMap<Specifier<'static>, Vec<String>>>,\n  paths_base: CachedPath,\n  pub module_suffixes: Option<Vec<String>>,\n}\n\nfn deserialize_extends<'de, D>(deserializer: D) -> Result<Vec<Specifier<'static>>, D::Error>\nwhere\n  D: serde::Deserializer<'de>,\n{\n  use serde::Deserialize;\n\n  #[derive(serde::Deserialize)]\n  #[serde(untagged)]\n  enum StringOrArray {\n    String(Specifier<'static>),\n    Array(Vec<Specifier<'static>>),\n  }\n\n  Ok(match StringOrArray::deserialize(deserializer)? {\n    StringOrArray::String(s) => vec![s],\n    StringOrArray::Array(a) => a,\n  })\n}\n\n#[derive(serde::Deserialize, Debug)]\n#[serde(rename_all = \"camelCase\")]\nstruct SerializedTsConfigWrapper {\n  #[serde(default, deserialize_with = \"deserialize_extends\")]\n  pub extends: Vec<Specifier<'static>>,\n  #[serde(default)]\n  pub compiler_options: SerializedTsConfig,\n}\n\npub struct TsConfigWrapper {\n  pub extends: Vec<Specifier<'static>>,\n  pub compiler_options: TsConfig,\n}\n\nimpl TsConfig {\n  pub fn read<F: FnOnce(&mut TsConfigWrapper) -> Result<(), ResolverError>>(\n    path: &CachedPath,\n    process: F,\n    cache: &Cache,\n  ) -> Result<TsConfigWrapper, ResolverError> {\n    let data = cache.fs.read_to_string(path.as_path())?;\n    let mut tsconfig = TsConfig::parse(path.clone(), data, &cache)\n      .map_err(|e| JsonError::new(path.as_path().to_owned(), e))?;\n    process(&mut tsconfig)?;\n    Ok(tsconfig)\n  }\n\n  pub fn parse(\n    path: CachedPath,\n    mut data: String,\n    cache: &Cache,\n  ) -> serde_json::Result<TsConfigWrapper> {\n    let _ = strip_comments_in_place(data.as_mut_str(), Default::default(), true);\n    let wrapper: SerializedTsConfigWrapper = serde_json::from_str(&data)?;\n    Ok(TsConfigWrapper {\n      extends: wrapper.extends,\n      compiler_options: TsConfig::from_serialized(path, wrapper.compiler_options, cache),\n    })\n  }\n\n  fn from_serialized(path: CachedPath, serialized: SerializedTsConfig, cache: &Cache) -> TsConfig {\n    let base_url = serialized\n      .base_url\n      .map(|base_url| path.resolve(&base_url, cache));\n\n    TsConfig {\n      paths_base: if serialized.paths.is_some() {\n        base_url\n          .clone()\n          .unwrap_or_else(|| path.parent().unwrap().clone())\n      } else {\n        cache.get(Path::new(\"\"))\n      },\n      path,\n      base_url,\n      paths: serialized.paths,\n      module_suffixes: serialized.module_suffixes,\n    }\n  }\n\n  pub fn extend(&mut self, extended: &TsConfig) {\n    if self.base_url.is_none() {\n      self.base_url = extended.base_url.clone();\n    }\n\n    if self.paths.is_none() {\n      self.paths_base = extended.paths_base.clone();\n      self.paths = extended.paths.clone();\n    }\n\n    if self.module_suffixes.is_none() {\n      self.module_suffixes = extended.module_suffixes.clone();\n    }\n  }\n\n  pub fn paths<'a>(\n    &'a self,\n    specifier: &'a Specifier,\n    cache: &'a Cache,\n  ) -> impl Iterator<Item = CachedPath> + 'a {\n    if !matches!(specifier, Specifier::Package(..) | Specifier::Builtin(..)) {\n      return Either::Right(Either::Right(std::iter::empty()));\n    }\n\n    // If there is a base url setting, resolve it relative to the tsconfig.json file.\n    // Otherwise, the base for paths is implicitly the directory containing the tsconfig.\n    let base_url_iter = if let Some(base_url) = &self.base_url {\n      Either::Left(base_url_iter(base_url, specifier, cache))\n    } else {\n      Either::Right(std::iter::empty())\n    };\n\n    if let Some(paths) = &self.paths {\n      // Check exact match first.\n      if let Some(paths) = paths.get(specifier) {\n        return Either::Left(join_paths(&self.paths_base, paths, None, cache).chain(base_url_iter));\n      }\n\n      // Check patterns\n      let mut longest_prefix_length = 0;\n      let mut longest_suffix_length = 0;\n      let mut best_key = None;\n      let full_specifier = specifier.to_string();\n\n      for key in paths.keys() {\n        let path = key.to_string();\n        if let Some((prefix, suffix)) = path.split_once('*') {\n          if (best_key.is_none() || prefix.len() > longest_prefix_length)\n            && full_specifier.starts_with(prefix)\n            && full_specifier.ends_with(suffix)\n          {\n            longest_prefix_length = prefix.len();\n            longest_suffix_length = suffix.len();\n            best_key = Some(key);\n          }\n        }\n      }\n\n      if let Some(key) = best_key {\n        let paths = paths.get(key).unwrap();\n        return Either::Left(\n          join_paths(\n            &self.paths_base,\n            paths,\n            Some((full_specifier, longest_prefix_length, longest_suffix_length)),\n            cache,\n          )\n          .chain(base_url_iter),\n        );\n      }\n    }\n\n    if matches!(specifier, Specifier::Builtin(..)) {\n      // If specifier is a builtin then there's no match\n      return Either::Right(Either::Right(std::iter::empty()));\n    }\n\n    // If no paths were found, try relative to the base url.\n    Either::Right(base_url_iter)\n  }\n}\n\nfn join_paths<'a>(\n  base_url: &'a CachedPath,\n  paths: &'a [String],\n  replacement: Option<(Cow<'a, str>, usize, usize)>,\n  cache: &'a Cache,\n) -> impl Iterator<Item = CachedPath> + 'a {\n  paths\n    .iter()\n    .filter(|p| !p.ends_with(\".d.ts\"))\n    .map(move |path| {\n      if let Some((replacement, start, end)) = &replacement {\n        let path = path.replace('*', &replacement[*start..replacement.len() - *end]);\n        base_url.join(&path, cache)\n      } else {\n        base_url.join(path, cache)\n      }\n    })\n}\n\nfn base_url_iter<'a>(\n  base_url: &'a CachedPath,\n  specifier: &'a Specifier,\n  cache: &'a Cache,\n) -> impl Iterator<Item = CachedPath> + 'a {\n  std::iter::once_with(move || {\n    if let Specifier::Package(module, subpath) = specifier {\n      base_url.join_package(module, subpath, cache)\n    } else {\n      base_url.clone()\n    }\n  })\n}\n\n#[cfg(test)]\nmod tests {\n  use super::*;\n  use indexmap::indexmap;\n\n  #[test]\n  fn test_paths() {\n    let cache = Cache::default();\n    let tsconfig = TsConfig::from_serialized(\n      cache.get_normalized(\"/foo/tsconfig.json\"),\n      SerializedTsConfig {\n        base_url: None,\n        paths: Some(indexmap! {\n          \"jquery\".into() => vec![\"node_modules/jquery/dist/jquery\".into()],\n          \"*\".into() => vec![\"generated/*\".into()],\n          \"bar/*\".into() => vec![\"test/*\".into()],\n          \"bar/baz/*\".into() => vec![\"baz/*\".into(), \"yo/*\".into()],\n          \"@/components/*\".into() => vec![\"components/*\".into()],\n          \"url\".into() => vec![\"node_modules/my-url\".into()],\n        }),\n        module_suffixes: None,\n      },\n      &cache,\n    );\n\n    let test = |specifier: &str| {\n      tsconfig\n        .paths(&specifier.into(), &cache)\n        .collect::<Vec<CachedPath>>()\n    };\n\n    assert_eq!(\n      test(\"jquery\"),\n      vec![cache.get_normalized(\"/foo/node_modules/jquery/dist/jquery\")]\n    );\n    assert_eq!(\n      test(\"test\"),\n      vec![cache.get_normalized(\"/foo/generated/test\")]\n    );\n    assert_eq!(\n      test(\"test/hello\"),\n      vec![cache.get_normalized(\"/foo/generated/test/hello\")]\n    );\n    assert_eq!(test(\"bar/hi\"), vec![cache.get_normalized(\"/foo/test/hi\")]);\n    assert_eq!(\n      test(\"bar/baz/hi\"),\n      vec![\n        cache.get_normalized(\"/foo/baz/hi\"),\n        cache.get_normalized(\"/foo/yo/hi\")\n      ]\n    );\n    assert_eq!(\n      test(\"@/components/button\"),\n      vec![cache.get_normalized(\"/foo/components/button\")]\n    );\n    assert_eq!(test(\"./jquery\"), Vec::<CachedPath>::new());\n    assert_eq!(\n      test(\"url\"),\n      vec![cache.get_normalized(\"/foo/node_modules/my-url\")]\n    );\n  }\n\n  #[test]\n  fn test_base_url() {\n    let cache = Cache::default();\n    let tsconfig = TsConfig::from_serialized(\n      cache.get_normalized(\"/foo/tsconfig.json\"),\n      SerializedTsConfig {\n        base_url: Some(PathBuf::from(\"src\")),\n        paths: None,\n        module_suffixes: None,\n      },\n      &cache,\n    );\n\n    let test = |specifier: &str| {\n      tsconfig\n        .paths(&specifier.into(), &cache)\n        .collect::<Vec<CachedPath>>()\n    };\n\n    assert_eq!(test(\"foo\"), vec![cache.get_normalized(\"/foo/src/foo/\")]);\n    assert_eq!(\n      test(\"components/button\"),\n      vec![cache.get_normalized(\"/foo/src/components/button\")]\n    );\n    assert_eq!(test(\"./jquery\"), Vec::<CachedPath>::new());\n  }\n\n  #[test]\n  fn test_paths_and_base_url() {\n    let cache = Cache::default();\n    let tsconfig = TsConfig::from_serialized(\n      cache.get_normalized(\"/foo/tsconfig.json\"),\n      SerializedTsConfig {\n        base_url: Some(Path::new(\"src\").into()),\n        paths: Some(indexmap! {\n          \"*\".into() => vec![\"generated/*\".into()],\n          \"bar/*\".into() => vec![\"test/*\".into()],\n          \"bar/baz/*\".into() => vec![\"baz/*\".into(), \"yo/*\".into()],\n          \"@/components/*\".into() => vec![\"components/*\".into()],\n        }),\n        module_suffixes: None,\n      },\n      &cache,\n    );\n\n    let test = |specifier: &str| {\n      tsconfig\n        .paths(&specifier.into(), &cache)\n        .collect::<Vec<CachedPath>>()\n    };\n\n    assert_eq!(\n      test(\"test\"),\n      vec![\n        cache.get_normalized(\"/foo/src/generated/test\"),\n        cache.get_normalized(\"/foo/src/test/\")\n      ]\n    );\n    assert_eq!(\n      test(\"test/hello\"),\n      vec![\n        cache.get_normalized(\"/foo/src/generated/test/hello\"),\n        cache.get_normalized(\"/foo/src/test/hello\")\n      ]\n    );\n    assert_eq!(\n      test(\"bar/hi\"),\n      vec![\n        cache.get_normalized(\"/foo/src/test/hi\"),\n        cache.get_normalized(\"/foo/src/bar/hi\")\n      ]\n    );\n    assert_eq!(\n      test(\"bar/baz/hi\"),\n      vec![\n        cache.get_normalized(\"/foo/src/baz/hi\"),\n        cache.get_normalized(\"/foo/src/yo/hi\"),\n        cache.get_normalized(\"/foo/src/bar/baz/hi\")\n      ]\n    );\n    assert_eq!(\n      test(\"@/components/button\"),\n      vec![\n        cache.get_normalized(\"/foo/src/components/button\"),\n        cache.get_normalized(\"/foo/src/@/components/button\")\n      ]\n    );\n    assert_eq!(test(\"./jquery\"), Vec::<CachedPath>::new());\n  }\n}\n"
  },
  {
    "path": "crates/parcel-resolver/src/url_to_path.rs",
    "content": "//! An implementation url.to_file_path that behaves like Unix on Wasm\n#![allow(clippy::items_after_test_module)]\n\n#[cfg(any(target_arch = \"wasm32\", test))]\nuse std::ffi::OsStr;\nuse std::path::PathBuf;\n\nuse url::Url;\n\nuse crate::specifier::SpecifierError;\n\npub fn url_to_path(input: &str) -> Result<PathBuf, SpecifierError> {\n  let url = Url::parse(input)?;\n\n  #[cfg(target_arch = \"wasm32\")]\n  {\n    Ok(to_file_path(&url).map_err(|_| SpecifierError::InvalidFileUrl)?)\n  }\n\n  #[cfg(not(target_arch = \"wasm32\"))]\n  {\n    url\n      .to_file_path()\n      .map_err(|_| SpecifierError::InvalidFileUrl)\n  }\n}\n\n// From std::os::unix::ffi::os_str.rs (also used on WASI)\n#[cfg(any(target_arch = \"wasm32\", test))]\n#[inline]\nfn os_str_from_bytes(slice: &[u8]) -> &OsStr {\n  unsafe { std::mem::transmute(slice) }\n}\n\n#[cfg(test)]\nmod test {\n  use std::path::PathBuf;\n\n  use url::Url;\n\n  use crate::url_to_path::to_file_path;\n\n  #[test]\n  fn test() {\n    let f = \"/x/y/z/foo.js\";\n    assert_eq!(\n      to_file_path(&Url::parse(&format!(\"file://{f}\")).unwrap()),\n      Ok(PathBuf::from(f))\n    );\n    let f = \"/bar.js\";\n    assert_eq!(\n      to_file_path(&Url::parse(&format!(\"file://{f}\")).unwrap()),\n      Ok(PathBuf::from(f))\n    );\n  }\n}\n\n// The functions below are copied from https://github.com/servo/rust-url/blob/74b8694568d8eb936e339a7d726bda46881dcd9d/url/src/lib.rs\n\n// Copyright (c) 2013-2022 The rust-url developers\n\n// Permission is hereby granted, free of charge, to any\n// person obtaining a copy of this software and associated\n// documentation files (the \"Software\"), to deal in the\n// Software without restriction, including without\n// limitation the rights to use, copy, modify, merge,\n// publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software\n// is furnished to do so, subject to the following\n// conditions:\n\n// The above copyright notice and this permission notice\n// shall be included in all copies or substantial portions\n// of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF\n// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\n// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n// DEALINGS IN THE SOFTWARE.\n\n#[cfg(any(target_arch = \"wasm32\", test))]\npub fn to_file_path(this: &Url) -> Result<PathBuf, ()> {\n  use url::Host;\n\n  if let Some(segments) = this.path_segments() {\n    let host = match this.host() {\n      None | Some(Host::Domain(\"localhost\")) => None,\n      // Some(_) if cfg!(windows) && this.scheme() == \"file\" => {\n      //   Some(&this.serialization[this.host_start as usize..this.host_end as usize])\n      // }\n      _ => return Err(()),\n    };\n\n    return file_url_segments_to_pathbuf(host, segments);\n  }\n  Err(())\n}\n\n#[allow(clippy::manual_is_ascii_check)]\n#[cfg(any(target_arch = \"wasm32\", test))]\nfn file_url_segments_to_pathbuf(\n  host: Option<&str>,\n  segments: core::str::Split<'_, char>,\n) -> Result<PathBuf, ()> {\n  use percent_encoding::percent_decode;\n\n  if host.is_some() {\n    return Err(());\n  }\n\n  let mut bytes =\n  // if cfg!(target_os = \"redox\") {\n  //   b\"file:\".to_vec()\n  // } else {\n    Vec::new()\n  // }\n  ;\n\n  for segment in segments {\n    bytes.push(b'/');\n    bytes.extend(percent_decode(segment.as_bytes()));\n  }\n\n  // A windows drive letter must end with a slash.\n  if bytes.len() > 2\n    && matches!(bytes[bytes.len() - 2], b'a'..=b'z' | b'A'..=b'Z')\n    && matches!(bytes[bytes.len() - 1], b':' | b'|')\n  {\n    bytes.push(b'/');\n  }\n\n  let os_str = os_str_from_bytes(&bytes);\n  let path = PathBuf::from(os_str);\n\n  debug_assert!(\n    path.has_root(), // path.is_absolute(),\n    \"to_file_path() failed to produce an absolute Path\"\n  );\n\n  Ok(path)\n}\n"
  },
  {
    "path": "docs/AdjacencyList.md",
    "content": "# AdjacencyList\n\nThe `AdjacencyList` in Parcel is a complex implementation of\nan otherwise [straightforward data structure](https://en.wikipedia.org/wiki/Adjacency_list).\nThe core ideas behind the `AdjacencyList` are:\n\n- Any two **nodes** that are connected by an **edge** are said to be _adjacent_\n- For _any_ node in the graph, every _adjacent node_ should be discoverable\n  in _linear time_.\n\nConceptually, this is achieved by associating each edge that is added\n_to or from_ a node with a previous edge that was added to or from that node.\n\nWhere Parcel's `AdjacencyList` gets complex is in its _data layer_, which is\ndesigned for:\n\n- shared access in a multithreaded runtime\n- fast serialization and deserialization\n\n## A list of lists\n\nThe simplest way of thinking about `AdjacencyList` is as a _list of lists_.\nThe primary list contains (conceptually) _node_ structs (ordered by numeric id),\nwith each field on the struct pointing to _doubly linked lists_ of (again, conceptual)\n_edge_ structs that also connect to or from the same node (ordered by insertion).\n\nThis looks something like:\n\n```js\n// NOTE: Not a real type, just an illustration!\ntype AdjacencyList<{\n  id: NodeId,\n  incoming?: EdgeList,\n  incomingReverse?: EdgeList,\n  outgoing?: EdgeList,\n  outgoingReverse?: EdgeList,\n}>\n\ntype EdgeList<{\n  from: NodeId,\n  to: NodeId,\n}>\n```\n\n<table>\n<tr><th>So, given a graph like:</th><th>you can imagine doubly linked lists like:</th></tr>\n<tr><td width=\"25%\">\n\n```mermaid\ngraph TD;\n  0 --> |a| 1\n  0 --> |b| 2\n  1 --> |c| 2\n```\n\n</td>\n<td>\n\n```mermaid\ngraph LR\n  subgraph 0[Node 0]\n    direction LR\n    0o([outgoing]) --- 0oa[[a]] <--> 0ob[[b]] --- 0or([outgoingReverse])\n  end\n\n  subgraph 1[Node 1]\n    direction LR\n    1i([incoming]) --- 1ia[[a]] --- 1ir([incomingReverse])\n    1o([outgoing]) --- 1oc[[c]] --- 1or([outgoingReverse])\n  end\n\n  subgraph 2[Node 2]\n    direction LR\n    2i([incoming]) --- 2ib[[b]] <--> 2ic[[c]] --- 2ir([incomingReverse])\n  end\n```\n\nThis makes traversal of every edge of the graph _from any node_\na straightforward process of following the links.\n\n</td></tr>\n</table>\n\n## SharedTypeMap\n\nUnder the hood, things are less straightforward.\n\nSince Parcel is multi-threaded, its implementation of `AdjacencyList`\nfeatures another core idea:\n\n- The data stored in the `AdjacencyList` should be accessible\n  from multiple threads with _no overhead_\n\nHere, _overhead_ refers to the serialization costs that add up\nin multi-threading scenarios.\n\nTo accommodate this, `AdjacencyList` features a custom data structure called\nthe `SharedTypeMap`:\n\n- **Shared** because it is a [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array)\n  backed by a [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer)\n- **Type** because each item has a `TYPE` field\n- **Map** because it is an implementation of a [hash map](https://en.wikipedia.org/wiki/Hash_table),\n  using a [coalesced hashing](https://en.wikipedia.org/wiki/Coalesced_hashing) strategy\n\nThis means that data being added to `SharedTypeMap` gets a pass through\na hash function to produce stable key for storing and retrieving that data.\n\n### Why _Type_, though?\n\nTwo nodes in a Parcel graph may be related to in each other in more than one way.\nIn order to represent multiple relationships between the same two nodes,\neach _edge_ that connects the nodes has a _type_.\n\nThus, when storing data about connections between adjacent nodes,\n`AdjacencyList` uses the _type_ as part of the identifying information.\n\n### Uint32Array partitions\n\nAs mentioned above, to deal with collisions, `SharedTypeMap` employs a version\nof a coalesced hashing strategy. In this version:\n\n- A contiguous array of memory is maintained for storing the data\n- A portion of the array is designated as the hash table\n- The rest of the array is the addressable space, which is where values are stored\n- the hash table stores pointers into the addressable space\n\nThe `SharedTypeMap` is partitioned into 3 subarrays:\n\n```mermaid\ngraph LR\n  header ~~~ hashtable ~~~ items\n\n  subgraph header\n    direction LR\n    0[0: CAPACITY] ~~~ 1[1: COUNT]\n  end\n\n  subgraph hashtable[hash table]\n    direction LR\n    2[2: hash 0] ~~~ 3[3: hash 1] ~~~ 4[4: hash 2]\n  end\n\n  subgraph items[addressable space]\n    direction LR\n    item1 ~~~ item2 ~~~ item3 ~~~ item4\n\n    subgraph item1[item 1]\n      direction LR\n      5([5: NEXT]) ~~~ 6[6: TYPE]\n    end\n\n    subgraph item2[item 2]\n      direction LR\n      7([7: NEXT]) ~~~ 8[8: TYPE]\n    end\n\n    subgraph item3[item 3]\n      direction LR\n      9([9: NEXT]) ~~~ 10[10: TYPE]\n    end\n\n    subgraph item4[item 4]\n      direction LR\n      11([11: NEXT]) ~~~ 12[12: TYPE]\n    end\n  end\n```\n\n- The _header_ partition stores metadata:\n  - `CAPACITY`: the total number of items that can fit in the array.\n    This is always equal to the length of the _hash table_.\n  - `COUNT`: the number of items that are currently in\n    the _addressable space_ partition.\n- The _hash table_ partition stores _addresses_, which are pointers\n  into the _addressable space_ partition\n  - each index represents the head of a linked list known as a _bucket_\n- The _addressable space_ partition stores contiguous slices of _item data_:\n  - `NEXT`: the _address_ of the next item with the same hash as this item;\n    this is a _link_ in the hash _bucket_.\n  - `TYPE`: the item's type\n\nNote that the fields described above are _inherited_ by `NodeTypeMap`\nand `EdgeTypeMap`. They both extend this base set with fields of their own.\n\nWhen there is a hash collision, the previous value is augmented with a link\nto the address of the colliding value.\n\nThese linked lists of values that have hash collisions are known as _buckets_.\n\n## Hash buckets: another list of lists\n\nThough `SharedTypeMap` stores data in a _hash table_, it presents\nan API that is more like a _linked list_. Instead of adding an item\nto the `SharedTypeMap` through something like an `add` method,\n`SharedTypeMap` has a method called `link`:\n\n```js\n  link(hash: THash, item: TAddress, type: TItemType): void;\n```\n\nThis method pairs with `getNextAddress`:\n\n```js\n  getNextAddress(): TAddress\n```\n\nThis is because `SharedTypeMap` is really a _base class_ implementation;\nits subclasses (See [NodeTypeMap](#nodetypemap) and [EdgeTypeMap](#edgetypemap))\nextend this API with more map-like `add` methods.\n\nAs `link` implies, each index in the hash table can be thought of\nas the head of a _linked list_.\n\nWhen an item is added to a `SharedTypeMap` (or rather, to one of its subclasses),\nthe `getNextAddress` method is invoked to find the next location in the\n_addressable space_ that is unoccupied. The next address is always computed\nin constant time by adding the current item count (multiplied by the item size)\nto the offset of the first addressable space. This has the effect of storing items\nin the addressable space _in insertion order_.\n\nFor example, here we see that hash `0` has 1 collision:\n\n<table>\n<tr><th>given an insertion order:</th><th>imagine a list like:</th><tr>\n<tr><td width=\"25%\">\n\n```\n// map.link(hash, address, type)\nmap.link(0, map.getNextAddress(), 1)\nmap.link(1, map.getNextAddress(), 2)\nmap.link(2, map.getNextAddress(), 3)\nmap.link(0, map.getNextAddress(), 1)\n```\n\n</td>\n<td>\n\n```mermaid\ngraph LR\n  2[2: hash 0] -- head --> 5([5: NEXT]) -- next --> 11([11: NEXT])\n  3[3: hash 1] -- head --> 7([7: NEXT])\n  4[4: hash 2] -- head --> 9([9: NEXT])\n\n```\n\n</td></tr>\n</table>\n\nOr, as raw `Uint32Array` data:\n\n| label | CAPACITY | COUNT | #   | #   | #   | NEXT | TYPE | NEXT | TYPE | NEXT | TYPE | NEXT | TYPE |\n| ----- | -------- | ----- | --- | --- | --- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |\n| index | 0        | 1     | 2   | 3   | 4   | 5    | 6    | 7    | 8    | 9    | 10   | 11   | 12   |\n| value | 4        | 4     | 5   | 7   | 9   | 11   | 1    | 0    | 2    | 0    | 3    | 0    | 1    |\n\nNotice that, thanks to `getNextAddress()`, the items are stored\nin _insertion order_, not by type or hash!\n\nAlso notice that the hashes we used to `link` are mapped to indices in the hash table\n(the `#` above), and that the values stored at those indices are the _addresses_\nreturned by `getNextAddress`.\n\nYou may have also noticed that our last `link` has a _collision_ with our first `link`\n(they both use hash `0`). In that case, the `address` for our last `link` is stored\nin the `NEXT` field of the item at the `address` that is currently stored for hash `0`:\n\n```mermaid\ngraph LR\n  hash0[hash 0] -- HEADER_SIZE + 0 --> index2[2]\n  hash1[hash 1] -- HEADER_SIZE + 1 --> index3[3]\n  hash2[hash 2] -- HEADER_SIZE + 2 --> index4[4]\n  index2[2] -- head --> address5[5] -- next --> address11[11]\n  index3[3] -- head --> address7[7]\n  index4[4] -- head --> address9[9]\n```\n\n## How AdjacencyList uses SharedTypeMap\n\nAs mentioned above, `SharedTypeMap` is a _base implementation_; it isn't used\ndirectly. `AdjacencyList` uses two subclasses of `SharedTypeMap`:\n\n- `NodeTypeMap`, which is referred to internally as `nodes`\n- `EdgeTypeMap`, which is referred to internally as `edges`\n\nThe business of `AdjacencyList` is therefore interacting with these two maps when:\n\n- **adding** edges by _linking_ records in `nodes` with records in `edges`\n- **deleting** edges by _unlinking_ records in `nodes` from records in `edges`\n- **resizing** either map when they run low on space\n- **traversing** edges by following the links from records in `nodes`\n  to records in `edges` (and back)\n\n## EdgeTypeMap\n\nThe `EdgeTypeMap` extends `SharedTypeMap` with API for:\n\n- **adding** edges\n- **deleting** edges\n- **linking** adjacent edges\n- **unlinking** adjacent edges\n\n### Edge hashes\n\nEdges are identified by a hash of their `to`, `from`, and `type` values.\n\nFor any given set of these values, the hash function deterministically produces\na number that that fits within the **current capacity** of the `EdgeTypeMap`.\n\nThat hash number is then the index in the hash table where the _head_\nof the linked list of edges with this hash is stored.\n\nSee [Hash buckets: another list of lists](#hash-buckets-another-list-of-lists) for more.\n\n### Edge records\n\nThe `EdgeTypeMap` records can be thought of as the links\nin the linked lists of edges connected to or from a given node.\nAs described in [Node records](#node-records), There is a linked list _per edge type_, and also _per direction_:\n\n<table>\n<tr><th>given a graph like:</th><th>imagine lists like:</th><tr>\n<tr><td width=\"25%\">\n\n```mermaid\ngraph TD;\n  0 --> |1| 1\n  0 --> |2| 1\n  1 --> |1| 2\n  0 --> |2| 2\n  1 --> |2| 2\n```\n\n</td>\n<td>\n\n```mermaid\ngraph LR\n  subgraph e4[edge 4]\n    direction LR\n    e4n1[1] -- 2 --> e4n2[2]\n  end\n  subgraph e3[edge 3]\n    direction LR\n    e3n1[1] -- 1 --> e3n2[2]\n  end\n  subgraph e2[edge 2]\n    direction LR\n    e2n0[0] -- 2 --> e2n2[2]\n  end\n  subgraph e1[edge 1]\n    direction LR\n    e1n0[0] -- 2 --> e1n1[1]\n  end\n  subgraph e0[edge 0]\n    direction LR\n    e0n0[0] -- 1 --> e0n1[1]\n  end\n\n  e1 -- next out --> e2 -- prev out --> e1\n  e2 -- next in  --> e4 -- prev in  --> e2\n```\n\nBecause edge records are only created once per unique pair of node ids\nand edge type, and deleted edges do not get reclaimed (without a resize\nand rehash of every edge, see [Resizing the `EdgeTypeMap`](#resizing-the-edgetypemap)),\nthe maximum number of edge records that will be stored is `d + n * n * e`,\nwhere `n` is the number of nodes and `e` is the number of _unique_ edge types,\nand `d` is the number of deleted edges.\n\n</td></tr>\n</table>\n\n### Edge fields\n\nEdge records occupy **32 bytes** of contiguous space,\nlabelled as the following **`uint32` (4 byte)** fields:\n\n- `NEXT`: The next edge record with the same hash\n- `TYPE`: The edge type\n- `FROM`: The id of the originating node\n- `TO`: The id of the terminating node\n- `NEXT_IN`: The address of the next incoming edge of the same type to the same terminating node\n- `PREV_IN`: The address of the previous incoming edge of the same type to the same terminating node\n- `NEXT_OUT`: The address of the next outgoing edge of the same type from the same originating node\n- `PREV_OUT`: The address of the previous outgoing edge of the same type from the same originating node\n\n#### Sizing the EdgeTypeMap\n\nThe capacity of `EdgeTypeMap` is always _at least_ the total number of edges\nin the graph.\n\nNote that between any two nodes, there my only be one edge per unique edge type.\n\nRecalling that the `Uint32Array` is partitioned into 3 subarrays:\n\n| header | hash table | addressable space |\n| ------ | ---------- | ----------------- |\n\nGiven a capacity of `c`:\n\n- The first 3 values in the `Uint32Array` are the header: `HEADER_SIZE = 3`\n- The hash table is always equal to the capacity: `c`\n- The addressable space is equal to the capacity times the item size: `ITEM_SIZE * c`\n- The item size is equal to the number of fields on an edge record: `ITEM_SIZE = 8`\n\nThe size of the `Uint32Array` is therefore `3 + 9c`.\n\n#### Resizing the EdgeTypeMap\n\nThe `EdgeTypeMap` is resized on demand in `addEdge`.\nThere are two scenarios in which the `EdgeTypeMap` is resized:\n\n- if there is not enough capacity in the addressable space\n  to accommodate an additional edge\n\n- if there are enough deletes that the capacity\n  can be reduced and still fit the number of edges plus an additional edge.\n\nIn the first case, the capacity must increase. This is accomplished by\ncomputing a next capacity from the current capacity. The next capacity\nfollows a linear progression, starting from the `maxGrowFactor (defaulting to 8)`,\nand scaled inversely linearly the `minGrowFactor (defaulting to 2)` from capacity\n0 to `peakCapacity`. Roughly the following formula:\n\n```js\nmaxGrowFactor + (minGrowFactor - maxGrowFactor) * (capacity / peakCapacity);\n```\n\nOnce the `capacity` exceeds `peakCapacity`, the capacity grows by the `minGrowFactor`.\n\nIn the second case, the capacity can decrease. This is accomplished by _halving_ the capacity.\n\nIn both cases, after computing the next capacity, a new `EdgeTypeMap`\nis created with that new capacity along with a new `NodeTypeMap` that retains\nits current capacity. Every edge in the current `EdgeTypeMap` is then\n_rehashed_ and _relinked_ into the new maps.\n\n## NodeTypeMap\n\nThe `NodeTypeMap` extends `SharedTypeMap` with API for:\n\n- **adding** nodes\n- **linking** nodes to edges\n- **unlinking** nodes from edges\n\n### Node records\n\nThe `NodeTypeMap` records can be thought of as the heads of\nlinked lists of edges connected to or from a given node.\nThere is a linked list _per edge type_, and also _per direction_:\n\n<table>\n<tr><th>given a graph like:</th><th>imagine lists like:</th><tr>\n<tr><td width=\"25%\">\n\n```mermaid\ngraph TD;\n  0 --> |1| 1\n  0 --> |2| 1\n  1 --> |1| 2\n  0 --> |2| 2\n```\n\n</td>\n<td>\n\n```mermaid\ngraph LR\n  subgraph n0[node 0]\n    et1(edge type 1)\n    et2(edge type 2)\n  end\n\n  subgraph edges\n    subgraph e0[edge 0]\n      direction LR\n      e0n0[0] -- 1 --> e0n1[1]\n    end\n\n    subgraph e1[edge 1]\n      direction LR\n      e1n0[0] -- 2 --> e1n1[1]\n    end\n\n    subgraph e2[edge 2]\n      direction LR\n      e2n0[0] -- 2 --> e2n2[2]\n    end\n  end\n\n  et1 -- first out --> e0\n  et1 -- last out --> e0\n\n  et2 -- first out --> e1\n  et2 -- last out --> e1\n\n  e1 -- next out --> e2\n  e2 -- prev out --> e1\n```\n\n```mermaid\ngraph LR\n  subgraph n1[node 1]\n    et1(edge type 1)\n    et2(edge type 2)\n  end\n\n\n  subgraph edges\n    subgraph e0[edge 0]\n      direction LR\n      e0n0[0] -- 1 --> e0n1[1]\n    end\n\n    subgraph e1[edge 1]\n      direction LR\n      e1n0[0] -- 2 --> e1n1[1]\n    end\n\n    subgraph e3[edge 3]\n      direction LR\n      e3n1[1] -- 1 --> e3n2[2]\n    end\n  end\n\n  et1 -- first in --> e0\n  et1 -- last in --> e0\n  et1 -- first out --> e3\n  et1 -- last out --> e3\n\n  et2 -- first in --> e1\n  et2 -- last in --> e1\n```\n\n```mermaid\ngraph LR\n  subgraph n2[node 2]\n    et1(edge type 1)\n    et2(edge type 2)\n  end\n\n\n  subgraph edges\n    subgraph e2[edge 2]\n      direction LR\n      e2n0[0] -- 2 --> e2n2[2]\n    end\n\n    subgraph e3[edge 3]\n      direction LR\n      e3n1[1] -- 1 --> e3n2[2]\n    end\n  end\n\n  et1 -- first in --> e3\n  et1 -- last in --> e3\n\n  et2 -- first in --> e2\n  et2 -- last in --> e2\n```\n\nBecause node records are only created once per unique node id and edge type,\nthe maximum number of node records that will be stored is `n * e`,\nwhere `n` is the number of nodes (the count of _node ids_ issued)\nand `e` is the number of _unique_ edge types in the graph.\n\n</td></tr>\n</table>\n\n### Node fields\n\nNode records occupy **24 bytes** of contiguous space,\nlabelled as the following **`uint32` (4 byte)** fields:\n\n- `NEXT`: The next node record with the same node id, but a different `TYPE`\n- `TYPE`: The edge type for edges linked to or from the node via this record\n- `FIRST_IN`: The address in `EdgeTypeMap` of the first edge of this type **to** this node\n- `FIRST_OUT`: The address in `EdgeTypeMap `of the first edge of this type **from** this node\n- `LAST_IN`: The address in `EdgeTypeMap` of the last edge of this type **to** this node\n- `LAST_OUT`: The address in `EdgeTypeMap` of the last edge of this type **from** this node\n\n#### Sizing the NodeTypeMap\n\nAs implied above, adding a node to `AdjacencyList` does not actually increment\nthe count of nodes in the `NodeTypeMap`, it only increments the `nodeId`.\nThis means that the number of nodes in the graph is _not the same as_\nthe number of node records in the `AdjacencyList`.\n\nHowever, the capacity of `NodeTypeMap` is always _at least_ the larger of the total\nnumber of node ids issued (`nextId`) or the number of node records in the map (`count`).\n\nThe reasons that the capacity must consider both `nextId` and `count` are:\n\n- when a node is connected to an edge, the node id is used\n  as the hash in the `NodeTypeMap`, so the hash table must have\n  _at least_ enough capacity to fit the highest node id.\n- when a node is connected to edges of more than one unique type,\n  the additional types require additional node records, which increase the `count`\n  and may require additional addressable space (e.g., if most nodes are already connected).\n\nRecalling that the `Uint32Array` is partitioned into 3 subarrays:\n\n| header | hash table | addressable space |\n| ------ | ---------- | ----------------- |\n\nGiven a capacity of `c`:\n\n- The first 3 values in the `Uint32Array` are the header: `HEADER_SIZE = 3`\n  - `NEXT` and\n  - `TYPE` have the same meaning as in `SharedTypeMap`\n  - `NEXT_ID` tracks the number of unique node ids issued by `addNode`\n- The hash table is always equal to the capacity: `c`\n- The addressable space is equal to the capacity times the item size: `ITEM_SIZE * c`\n- The item size is equal to the number of fields on a node record: `ITEM_SIZE = 6`\n  - these are the 6 fields describe in [Node fields](#node-fields)\n\nThe size of the `Uint32Array` is therefore `3 + 7c`.\n\n#### Resizing the NodeTypeMap\n\nThere are two scenarios in which the `NodeTypeMap` is resized:\n\n- in `addNode`, if there is not enough capacity in the hash table\n  to accommodate the number of nodes implied by the next node id.\n\n- in `addEdge`, if the edge being added is the first of its type for\n  either node, _and_ there is not enough capacity in the addressable space\n  to accommodate the additional count of node records required.\n\nIn either case, the resizing is accomplished by creating a new `NodeTypeMap`\nwith double the capacity of the current one, and then copying the data\nin the hash table and addressable space directly into the new map.\n\nTo account for the increase in the size of the hash table (remember that\nthe size of the hash table is always equal to the capacity), all pointers\ninto the addressable space are adjusted by the delta between\nthe old map capacity and the new capacity, e.g., if the old capacity was 4,\nand now it's 8, all of the internal addresses would be shifted by 4.\n\nThis works because the node ids are sequential and immutable, so no rehashing\nis necessary. The internal addresses can all be safely incremented by\nthe capacity delta, while the addresses to edges, which point to the `EdgeTypMap`,\ndon't need to change at all (as its size hasn't changed).\n\n## What AdjacencyList really looks like\n\n<table style=\"white-space: nowrap\">\n<tr><th>given a graph like:</th><th>AdjacencyList looks like:</th><tr>\n<tr><td>\n\n```mermaid\ngraph TD;\n  0 --> |1| 1\n  0 --> |2| 1\n  1 --> |1| 2\n  0 --> |2| 2\n```\n\nAdjacencyList looks like:\n\n```mermaid\ngraph LR\n\n  subgraph nodes\n    subgraph n0[node 0]\n      na17[(type 1)]\n      na29[(type 2)]\n      na17 -- next --> na29\n    end\n\n    subgraph n1[node 1]\n      na11[(type 1)]\n      na23[(type 2)]\n      na11 -- next --> na23\n    end\n\n    subgraph n2[node 2]\n      na35[(type 2)]\n      na41[(type 1)]\n      na35 -- next --> na41\n    end\n\n  end\n\n  subgraph edges\n    subgraph e0[hash 0]\n      ea7[(type 1)]\n    end\n\n    subgraph e1[hash 1]\n      ea15[(type 2)]\n    end\n\n    subgraph e2[hash 2]\n      ea31[(type 1)]\n    end\n\n    subgraph e3[hash 3]\n      ea23[(type 2)]\n    end\n\n    ea15 -- next out --> ea23\n    ea23 -- prev out --> ea15\n  end\n\n\n  ea7  -- from --> n0\n  ea7  -- to   --> n1\n  ea15 -- from --> n0\n  ea15 -- to   --> n1\n  ea23 -- from --> n0\n  ea23 -- to   --> n2\n  ea31 -- from --> n1\n  ea31 -- to   --> n2\n\n  na11 -- first in  --> ea7\n  na11 -- first out --> ea31\n  na11 -- last in   --> ea7\n  na11 -- last out  --> ea31\n  na17 -- first out --> ea7\n  na17 -- last out  --> ea7\n  na23 -- first in  --> ea15\n  na23 -- last in   --> ea15\n  na29 -- first out --> ea15\n  na29 -- last out  --> ea23\n  na35 -- first in  --> ea23\n  na35 -- last in   --> ea23\n  na41 -- first out --> ea31\n  na41 -- last out  --> ea31\n```\n\nOr, as raw `Uint32Array` data:\n\n```\nnodes:\n  header     hash table                    addressable space\n  0  1  2    3   4   5   6  7  8  9  10    11 [ 23  1   7  31   7  31 ]\n  8  6  3    17  11  35  0  0  0  0  0     17 [ 29  1   0   7   0   7 ]\n                                           23 [  0  2  15   0  15   0 ]\n                                           29 [  0  2   0  15   0  23 ]\n                                           35 [ 41  2  23   0  23   0 ]\n                                           41 [  0  1  31   0  31   0 ]\n                                           47 [  0  0   0   0   0   0 ]\n                                           53 [  0  0   0   0   0   0 ]\nedges:\n  header     hash table       addressable space\n  0  1  2    3   4  5   6     7  [ 0  1  0  1  0  0   0   0 ]\n  4  4  0    15  7  31  23    15 [ 0  2  0  1  0  0  23   0 ]\n                              23 [ 0  2  0  2  0  0   0  15 ]\n                              31 [ 0  1  1  2  0  0   0   0 ]\n\n```\n"
  },
  {
    "path": "docs/BundlerExamples.md",
    "content": "## Targets\n\nTo configure multiple targets, a user can specify them in their `package.json`\n\n```json5\n\"targets\": {\n    \"main1\": {\n      \"distDir\": \"./dist/main1\",\n      \"source\": \"./src/main1/index.html\",\n      \"publicUrl\": \"./\"\n    },\n    \"main2\": {\n      \"distDir\": \"./dist/main2\",\n      \"source\": \"./src/main2/index.html\",\n      \"publicUrl\": \"./\"\n    }\n  },\n```\n\nThis will then be interpreted from the `AssetGraph` into a map of targets, which contains the target as the key, and the value a map of entries to the dependencies with matching targets.\n\n```\n[Target Map] {\n  '/dist/main1' => Map(1) {\n    Asset(/main1/index.html) => Dependency(null -> src/main1/index.html)\n  },\n  'dist/main2' => Map(1) {\n    Asset(/main2/index.html) => Dependency(null -> src/main2/index.html)\n  }\n```\n\n`bundle()` is then called for **each** entry in the Map, creating two distinct `IdealGraphs`, and in this case, identical graphs. `createIdealGraph` skips any subtrees of another target.\n\n```js\nif (!entries.has(node.value)) {\n  actions.skipChildren();\n}\n```\n\nThe sample file tree below represents the output created by the final `bundleGraph`\n\n```\n> dist\n    > main1\n        index.html\n        index.a05w6.js\n        shared.123.js\n    > main2\n        index.html\n        index.b80d3.js\n        shared.123.js\n```\n\n_The full test case can be found in the `supports multiple dist targets` case in `html.js` integration test file._\n\n## Two CSS imports\n\nHere we'll go through what occurs in an example where two entries to a project import different css files.\n\nConsider an entry with imports to two css files, and an async file importing 1 of them\n\n<table><tr>\n<td>\n\n```js\n//entry.js\n\nimport './main.css';\n\nimport './Foo/foo.css';\nimport('./Foo');\n```\n\n</td><td>\n\n```js\n// Foo/foo.js\n\nimport './foo.css';\n\nexport default function () {\n  return 'foo';\n}\n```\n\n</td>\n</tr></table>\n\nGiven one `js` entry, an async `js` import, and two `css` imports, we generate the following Assetgraph.\n![image info](./BundlerGraphs/css-merging/AssetGraph-css-merging.png)\n\nBelow is the local bundleGraph generated after **Step Create Bundles**. **Node 1** is generated in the first step because it is specified as an entry to the project.\n\n![image info](./BundlerGraphs/css-merging/bundleGraph-premerge.png)\n\nAfter **Step Create Bundles**, we have generated a bundle per entry, code-split points, and type-change bundles. We have four bundles, two of which are **bundleGroups**.\n\n```\nentry.js bundle -> BundleGroups [entry.js]\nfoo.js bundle -> BundleGroups [foo.js]\nfoo.css bundle -> BundleGroups [entry.js, index.js]\nmain.css bundle -> BundleGroups [entry.js]\n```\n\nIn the state above, the `entry.js` bundle loads (or is connected to) two `.css` bundles, which is not correct. In order to maintain the constraint of one bundle of a different type per bundlegroup, we need to merge bundles together. However, merging `foo.css` and `main.css` will result in `index.js` over-fetching `main.css`\n\nIn order to maintain correctness, we may need to duplicate assets, and end up with the final `idealGraph` below.\n\n![image info](./BundlerGraphs/css-merging/bundlegraph-postmerge.png)\n\n_The full test case can be found in the `multi-css-multi-entry-bug/src/` integration test._\n\n## Reused Bundle\n\nReused bundles are a special type of shared bundle. Consider the following code. (taken from the 'should reuse a bundle when its main asset (aka bundleroot) is imported synchronously' test case in `javascript.js`)\n\n<table><tr>\n<td>\n\n```js\n//index.js\n\nimport('./foo');\nimport('./bar');\n```\n\n</td>\n<td>\n\n```js\n//a.js\n\nimport foo from './foo';\n```\n\n</td>\n<td>\n\n```js\n//bar.js\nimport foo from './a';\nimport bar from './b';\nimport styles from './styles.css';\nimport html from './local.html';\n```\n\n</td>\n<td>\n\n```js\n// foo.js\n\nimport a from './a';\nimport b from './b';\n\nexport default a;\n```\n\n</td>\n</tr></table>\n\nWe know we'll have bundles created for the entry, the two async imports, and the type change, which is reflected in the graph below. (A snapshot taken after **Step Create Bundles** )\n![image info](./BundlerGraphs/steps/create-bundles-bundleGraph.png)\n\nBut where do we place `a.js`, and `b.js` ? We will consult `reachableRoots`.\n\n```\n// ReachableRoots\nfoo => [a,b]\nbar => [a, b, foo]\n```\n\nFrom the availability above, it should be clear that the best way to place `a` and `b` would be to place them into our existing `foo` bundle, and simply connect `bar` to it, since `bar` requires `foo` as well. That is exactly what we do.\n\n![image info](./BundlerGraphs/steps/idealBundleGraph_final_reusedFoo.png)\n\n### Reused Code Deep Dive\n\nHere I will explain line by line how we actually place assets in the case of reused bundles.\n\nDuring placement, we go through each asset, one by one, and determine the set of bundles it must be placed in.\n\n```\nfor (let i = 0; i < assets.length; i++) { ... }\n```\n\nThen we handle placement for entries and manual shared assets, see [DefaultBundler.md](DefaultBundler.md) for a more detailed look at that section.\n\n`ReachableNonEntries` is the set of bundleRoots needed by our asset, a, that are _not_ entries, isolated, etc.\n\nWe loop through them, searching for a `candidate`. Since we don't know which asset we will process first, we need to make sure we draw that connection between the bundles regardless of if we hit `a.js`, `b.js`, or `foo.js` first. There are two cases to consider.\n\n1. Asset is a bundleRoot, in this case `foo.js`.\n2. Asset is not a bundleRoot, in this case `a.js` or `b.js`\n\nIn the first case, we simply draw an edge and delete the `candidate` from this asset's reachable. We must delete it because this loop does not terminate asset placement, if reachable was still populated, we would go on to try to place our asset in the remaining reachable bundleroots.\n\n```js\n  let reuseableBundleId = bundles.get(asset.id);\n\n  if (reuseableBundleId != null) { // asset is a bundleRoot\n          reachable.delete(candidateId);\n          bundleGraph.addEdge(candidateSourceBundleId, reuseableBundleId);\n\n```\n\nThe second case is a bit more involved. Say we are trying to place `a.js`, we know `bar.js` and `foo.js` are both bundleRoots in our `reachable`, but we do not know which is a subtree of the other. i.e. which direction the edge should go. So we need to consult `reachableAssets`, which is an inverse mapping of `reachableRoots`. This exists because bitSets are not bidirectional.\n\nSo, we take the assets that are reachable from our candidate bundleRoot (in this case bar), and intersect it with our reachable.\n\n```js\nreachableIntersection.intersect(\n  reachableAssets[\n    nullthrows(assetToBundleRootNodeId.get(candidateSourceBundleRoot))\n  ],\n);\n```\n\nThe above essentially translates to\n\n```\n\nreachable(a) ∩ reachable(candidateBundleRoot)\n\n```\n\nSo when the `candidate = bar` and `asset` we are placing is `a`, we are able to intersect to get the actual reusable bundle, `foo.js`. Below is an example of the values we'd be intersecting in this particular test case, in the event that `a` is processed before `foo`.\n\n```\n\nreachableAssets\nfoo => {a,b}\nbar => {foo,a,b}\n\nreachableNonEntries of a\na => {bar, foo}\n```\n\nWe draw an edge from our `reusableBundle` to our `otherCandidateId`\n\n```js\nbundleGraph.addEdge(\n  nullthrows(bundles.get(candidateSourceBundleRoot.id)),\n  reusableBundleId,\n);\n```\n\n_The full test case can be found in the `shared-bundle-single-source/` case in `javascript.js` integration test file._\n\n## Manual Bundles\n\nManual Bundles override Parcel's automatic code splitting. Consider the code below, with the following config in `package.json`.\n\n```json\npackage.json:\n    {\n      \"@parcel/bundler-default\": {\n        \"manualSharedBundles\": [{\n          \"name\": \"vendor\",\n          \"root\": \"math/math.js\",\n          \"assets\": [\"math/!(divide).js\"]\n        }]\n      }\n    }\n\n```\n\nFrom the above, the pertinent data structures will be populated as such:\n\n```json\nmanualSharedObject =\n  {\n    \"name\": \"vendor\",\n    \"root\": \"math/math.js\",\n    \"assets\": [\"math/!(divide).js\"]\n  }\n\nparentsToConfig =\n{\n  \"math/math.js\": {\n    \"name\": \"vendor\"\n    \"root\": etc ...\n  }\n}\n\nmanualAssetToConfig = {\n  \"project/math/math.js\": {\n    {manualSharedObject}\n  },\n  \"project/add.js\": {\n    {manualSharedObject}\n  },\n  \"project/subtract.js\": {\n    {manualSharedObject}\n  }\n}\n```\n\nThis allows us to look up any asset's `manualSharedObject`.\n\nBelow are the relevant files, our root, `math.js`, and `index.js`, which imports it. Please refer to the full test case in `bundler.js` for all source code.\n\n<table><tr>\n<td>\n<td>\n\n```js\n//math:\nmath.js:\nexport * from './add';\nexport * from './subtract';\nexport * from './divide';\n```\n\n</td>\n<td>\n\n```js\nindex.js:\n        import {add, subtract, divide} from './math/math';\n        sideEffectNoop(divide(subtract(add(1, 2), 3), 4));\n\n```\n\n</td>\n</tr></table>\n\nAfter **Step Create Bundles**, we are left with two bundles, one bundle group. There are no manual bundles in the graph below because the config does not math any explicit code split point.\n\n![image info](./BundlerGraphs/manual-bundles/msb_step1.png)\n\nThe remaining assets left to place during asset placement are, `math.js`, `add.js`, `subtract.js`, and `divide.js`. From `reachable` you can infer what Parcel would/should do. Simply place all remaining assets into `index.js`, right?\n\nHowever, we've specified via config that we want `math` and its imports which match the glob `!(divide)` in one bundle with nothing else.\n\n```\n//reachable\n\nmath =>     [index.js]\nadd =>      [index.js]\nsubtract => [index.js]\ndivide =>   [index.js]\n```\n\nSo that is exactly what happens. Looking up assets in the `manualAssetToConfig`, we place them into their own bundle, and connect it via edge and property `sourceBundles`. Source bundles property is equivalent to `reachable`.\n![image info](./BundlerGraphs/manual-bundles/msb_stepfinal.png)\n\n_The full test case can be found in the `bundler.js` test suite._\n\n## Debugging Notes\n\nThere are many more intricate and complex cases than what I've discussed above within Parcel's test suite. To understand the algorithm fully, debugging and visualizing the idealGraph structure is extremely beneficial. To do so, you may add the following in between steps within `DefaultBundler.js`,\n\n```\ndumpGraphToGraphViz(\n    // $FlowFixMe\n    bundleGraph,\n    'IdealGraph-Step1',\n  );\n```\n\nand run your example test case with the command below.\n\n` PARCEL_DUMP_GRAPHVIZ=1yarn test test/<testsuite>`\n"
  },
  {
    "path": "docs/Continuous Integration/Native Binary Builds.md",
    "content": "# Parcel • Continuous Integration • Native Binary Builds\n\nParcel relies on a few native artifacts that need to be built for multiple target platforms and architectures.\n\nTo support this, there are a number of different runner jobs running on different images/os:\n\n- macos-latest is used for arm / x86 builds of the macOS targets\n- windows-latest is used for windows builds\n- linux builds\n  - Debian bookworm is used for x86 builds\n  - Ubuntu 20.04 is used for armhf 32-bit, arm64\n  - What looks like Alpine linux in napi-rs/napi-rs/nodejs-rust is used for MUSL x86 64-bit and MUSL arm64\n\n## Testing builds locally\n\nWe can use `act` to test CI jobs locally:\n\n- [Install the GitHub CLI](https://cli.github.com/)\n- [Install `act` - `gh extension install https://github.com/nektos/gh-act`](https://nektosact.com/installation/gh.html)\n\nRun the desired GitHub actions job:\n\n```\ngh act --input profile=release --job \"build-linux-gnu-x64\"\n```\n\n## GLIBC Versions\n\n- x86 builds rely on minimum GLIBC 2.31 in Debian 11 - bullseye https://packages.debian.org/bullseye/libc6\n"
  },
  {
    "path": "docs/DefaultBundler.md",
    "content": "## `bundle()`\n\nDuring the bundling phase, we hand over control to the bundler plugin via `bundle()`. This mutative function is called in the `BundleGraphRequest`, and is passed in a stripped version of the AssetGraph, called the `mutableBundleGraph`. Users can specify custom bundler plugins in their `.parcelrc`. In this document we will go through the default bundler plugin.\n\n```\nawait bundler.bundle({\n          bundleGraph: mutableBundleGraph,\n          config: this.configs.get(plugin.name)?.result,\n          options: this.pluginOptions,\n          logger,\n          tracer,\n        });\n```\n\n### Targets\n\nTargets are specified in the `package.json`. Read more about targets [here](https://parceljs.org/features/targets). For the bundler, this means that the final graph output must be completely disjoint between targets, because those bundles will be separately packaged. Shared bundles cannot exist between separate targets. To remedy this constraint, we create a target map, representing targets mapped to entry assets and what dependencies are part of that target.\n\n```js\ntargetMap: DefaultMap<string, Map<Asset, Dependency>>\n```\n\nWe create one IdealGraph per target, but mutations are applied to the same mutableBundleGraph. This ensures that we can return a singular bundleGraph, but generate bundles that **only** reference assets available to them within that target. See \"targets\" example in [Bundler Examples](./BundlerExamples.md)\n\n# Default Bundler Plugin\n\nThe goal of the bundler is to mutate the Assetgraph into a BundleGraph by adding bundles and edges. These bundles can be thought of as groupings of assets, which will be executed together in the browser at runtime. The bundler ensures two things, correct temporal order of assets, and optimizing bundles to favor less duplication.\n\nThe DefaultBundler can be divided into two main parts, `CreateIdealGraph` and `decorate()`. In order to write the bundling algorithm in distinct, disjoint steps, we defer mutating the AssetGraph to a step called `decorate()`. The bulk of the algorithm is executed on a localized, smaller _IdealGraph_ that only represents bundles, and a few other supplementary structures ultimately passed to decorate as an `IdealGraph` object, containing our local representation of the bundleGraph.\n\n```\n  type IdealGraph = {|\n    assets: Array<Asset>,\n    dependencyBundleGraph: DependencyBundleGraph,\n    bundleGraph: Graph<Bundle | 'root'>,\n    bundleGroupBundleIds: Set<NodeId>,\n    assetReference: DefaultMap<Asset, Array<[Dependency, Bundle]>>,\n    manualAssetToBundle: Map<Asset, NodeId>,\n  |};\n```\n\nNote: Within `createIdealGraph()`, the local IdealGraph is referred to simply as the bundleGraph, while the `mutableBundleGraph` passed in, is referred to as assetGraph. This is because we don't actually add bundles to the `mutableBundleGraph` until `decorate()`. Until that point it is just an assetgraph.\n\n## Step: Create Entries\n\nCreate bundles for each entry to the project. Entries can be specified in the build command by the user.\n\nTo create an entry bundle we just need to provide the actual asset, target, and `needsStableName`. `needsStableName` refers to the bundle name. If set, the name will not have a hash for loading purposes.\n\n```js\nlet bundle = createBundle({\n  asset,\n  target: nullthrows(dependency.target),\n  needsStableName: dependency.isEntry,\n});\n```\n\nEntries are a type of **bundleGroup** and are thus added to the graph with a connection to the root to denote this. You'll notice some redundancies throughout the algorithm. Here is one such case. `bundleGroupBundleIds` tracks **bundleGroups**, all of which are connected to the root of the `bundleGraph`. An optimization here would be to replace all usage of `bundleGroupBundleIds` with a look up to the graph.\n\n### How to create a bundle\n\nA bundle is just a representation of a asset or assets with information about how to package them. Below are the options you may pass in. Different bundle types require different information. For example, some bundles have a `mainEntryAsset`, like entries, and some do not. We'll get into what bundles contain what information later.\n\n```js\n    uniqueKey: opts.uniqueKey, // can be read by namers for more functionality\n    assets: new Set([asset]), // The set of all assets in the bundle\n    mainEntryAsset: asset, // The main or initial asset of the bundle, can be null\n    size: asset.stats.size, // size\n    sourceBundles: new Set(), // The bundles which load and require this bundle\n    target: opts.target, // Target for output purposes\n    type: opts.type ?? asset.type, // type, js, html etc\n    env: opts.env ?? asset.env,\n    needsStableName: Boolean(opts.needsStableName), // whether to hash the final name\n    bundleBehavior: opts.bundleBehavior ?? asset.bundleBehavior,\n    manualSharedBundle: opts.manualSharedBundle,\n```\n\n## Step: Create Bundles for explicit code split points\n\n### Overview\n\nThis step creates bundles for explicit code split points. These are…\n\n- Asynchronous: this bundle does not need to load automatically, it can load in tandem with others\n\n- Isolated: Cannot share any assets with other bundles\n\n  - Example: A URL import import url from 'url:./resource.txt';\n\n  - A key difference between bundlers (past and present) here is that we’ve implicitly created a relationship of one asset to one bundle, and so if a dependency is isolated for example, then we mark that bundle isolated for all purposes. This means it cannot share any assets with other bundles.\n\n- A type change: If the parent asset is a different type than the child. Assets of different types do not belong in the same bundle.\n\n- Parallel: Separate bundle but loaded with the parent.\n\n- Inline: Separate bundle, which is placed into the parent bundle before writing to dist.\n\n  - SVG image inlined into html: `<img src=\"data-url:./img.svg\"/>`\n\nMore on code splitting: [Code Splitting](https://parceljs.org/features/code-splitting/).\n\n### Deep Dive: Traverse The AssetGraph\n\nAfter creating our entry points, we traverse the assetGraph, skipping any entries of different targets. On an asset, we begin to populate `assetIndex`, a mapping by which to look up any `bitSet` values. Then, we grab the `bundleIdTuple` from the `bundleRoots` structure.\n\n- `bundleRoots: Map<Asset,[NodeId, NodeId]` is a mapping of bundle-root assets. This means they are roots of a bundle. Think of these assets as assets which triggered the creation of a bundle, and are the **main entry** of a bundle. All explicit code-split points (all of which are handled in this step), are \"bundleRoots\"\n\nWe use the `stack` to track what bundleGroup we are currently in, so that we can accurately draw edges between bundles. `BundleIds` and `BundleGroupIds` are not the same, but can be. This is how we are able to reduce node bloat in the graph. In `createIdealGraph`, \"bundleGroups\" are simply represented by bundles that are attached to the root. Thus, when `bundleId === bundleGroupId`, or in this case, the tuple values are equivalent, we know we have entered a new bundleGroup.\n\n```js\nif (bundleIdTuple[0] === bundleIdTuple[1]) {\n  // Push to the stack on a new bundle group\n  stack.push([node.value, bundleIdTuple[0]]);\n}\n```\n\nThe top of the stack will track what bundleGroup we are currently on.\n\n#### Code Split for Lazy and isolated Dependencies\n\nConsider the below code obtained from `integration/shared-bundle-single-source/index.js`\n\n<table><tr>\n<td>\n\n```js\n//index.js (project entry)\nimport('./foo'); //async imports\nimport('./bar'); //async\n```\n\n</td><td>\n\n```js\n//bar.js\nimport styles from './styles.css';\nimport html from './local.html'; //isolated\n```\n\n<td>\n</tr></table>\n\n![image info](./BundlerGraphs/steps/create-bundles-bundleGraph.png)\n\nIdealBundleGraph from `integration/shared-bundle-single-source/index.js`\n\nAll the bundles above are explicit code-split points, but not all of them are \"bundleGroups\". As a rule of thumb, only Entry bundles, Async Bundles, and \"isolated\" Assets are bundleGroups. `Isolated` is found on the `bundleBehavior` property of bundles, which is typically set in a Transformer. `HTML` and images tend to be `isolated`.\n\n#### Code Split for Type Change, Parallel, and Inline Dependencies\n\nWe also create bundles for type change assets, parallel dependencies, and inline assets.\n\n```js\nparentAsset.type !== childAsset.type ||\n  dependency.priority === 'parallel' ||\n  childAsset.bundleBehavior === 'inline';\n```\n\nBundles created by this path are **not** bundleGroups, and can also be merged with bundles of the same type. The stack not only tracks what bundleGroup we're in, but also the last \"parent\" bundle, or `referencingBundleRoot`. We draw an edge from the `referencingBundleRoot` to our new bundle. We preemptively attempt to merge this bundle into any existing bundle of the same type **within our bundleGroup**. Merging is also handled in the next step, we track what bundles are eligible for merging via `typeChangeIds`.\n\n## Step: Merge Type Change Bundles\n\nType change bundles are a special case of bundle, because they require consistent or “stable” names, when in an entry bundleGroup, meaning they are directly connected to an entry of the project. As a result, we only allow one bundle of another type per bundleGroup. So, we need to merge bundles that exist within the same bundleGroups. (i.e. siblings)\n\nSee CSS example in [BundlerExamples.md](./BundlerExamples.md) for a step-by-step example of how we merge type change bundles.\n\n## Step: Determine Reachability\n\nHere is where we begin building up the graphs required to determine where to place assets. The first is called reachableRoots. ReachableRoots maintains all bundleRoots and what assets are available to them synchronously.\n\nFrom the above example:\n\n<table><tr>\n<td>\n\n```js\n//bar.js\nimport a from './a';\nimport b from './b';\nimport styles from './styles.css';\nimport html from './local.html'; //isolated\n```\n\n</td><td>\n\n```js\n//a.js\nimport foo from './foo';\n```\n\n<td>\n</tr></table>\n\nGiven those imports, here are our synchronous relationships. This means `bar.js` synchronously requires `foo`, `b.js`, and `a.js`. Leaf nodes (Nodes with **only** incoming connections), are **not** bundleRoots and will therefore be placed into a number of existing bundles. Nodes with **outgoing** edges **are** bundleRoots and correspond to a bundle we've already created.\n![image info](./BundlerGraphs/steps/reachableRoots_sharedsinglesource.png)\n\nWe also begin building up the **bundleRootGraph** which maintains bundleRoots and their **parallel** and **async** relationships via different edge types.\n\nFrom the same example, here are the asynchronous and parallel relationships. Below shows that `index.js` requires `foo.js` and `bar.js` bundles.\n![image info](./BundlerGraphs/steps/bundleRootGraph.png)\n\nThis graph does utilize edge types to differentiate between parallel and async relationships, so querying the graph may look something like this:\n\n```\nbundleRootGraph.getNodeIdsConnectedTo(id, ALL_EDGE_TYPES);\n```\n\n_Note: In order to optimize structures, ReachableRoots is a bitSet and bundleRootGraph is a graph of numbers, as of the writing of this document. Both, however, represent assets and used to be graphs of asset nodes. The above example uses a graph representation of reachableRoots and BundleRoot graphs. To produce such a graph for developmental purposes, the graph visualizer at `dumpGraphToGraphViz.js` could be expanded to translate these bitSets or graph of numbers._\n\n## Step: Determine Availability\n\nNow, in order to know where to place assets, we construct a mapping of all assets available to a bundleRoot (or bundle). This is called ancestorAssets and it is populated with assets available via older siblings, assets within the same bundleGroup, and parent and ancestor bundles.\n\nIn general, this is the formula we follow for populating the assets available to a particular bundle:\n\n```\n  (assets(P1) ∩ assets(P2) ..... ∩ assets(Pn)) U\n  (assets(S1) ..... U assets(Sn)) U\n```\n\nWhere _P_ is parent, and _S_ is an **older** sibling, i.e. first in load order. And the assets of a parent can be defined as the following, where _B_ is a bundle in the current bundleGroup defined as a bundle connected **directly** to the Parent bundle we are currently processing\n\n```\nassets(B1) U assets(B2) .... assets(Bn)\n```\n\nAt each bundleRoot, we first determine the assets that would be available via bundleGroup, since the bundles in a bundleGroup are loaded together. This is the bundles in the bundleGroup (BundleRoot Assets + Synchronously available Assets).\n\nNext, we “peek ahead” to the children, and propagate the available assets down, intersecting as we go since that will be the set of assets available by any “path”.\n\nIn the case of sibling parallel dependencies, the younger siblings have access to the assets of the older siblings, since they load in order, so we must propagate those too. This ensures we can extract shared code between siblings\n\nFor Example, integration/html-js-dedup/index.html\n\n```html\n<!DOCTYPE html>\n<script type=\"module\" src=\"component-1.js\"></script>\n<script type=\"module\" src=\"component-2.js\"></script>\n```\n\n![image info](./BundlerGraphs/steps/idealBundleGraph_htmldedup.png)\n\n![image info](./BundlerGraphs/steps/reachableRoots_htmldedup.png)\n\nWhat is ancestorAssets ? What about the output ?\n\n```// ancestorAssets\nindex.html => {},\ncomponent1 => {},\ncomponent2 => {html-js-dedup/component-1.js}\n```\n\nBecause component1 bundle loads first, there is no need to add `obj` to both siblings. `Index.html` is isolated and thus its availability is not propagated down to the children.\n\n```\nEntry Bundle =>     [index.html]\nSibling Bundle 1 => [component1, obj.js]\nSibling Bundle 2 => [component2]\n```\n\n## Step: Internalize Async Bundles\n\nInternalization is when some bundle requires an asset synchronously, but also asynchronously. This is redundant so we do not load the extra (async) bundle. We mark this in `bundle.internalizedAssetIds`, and an internalized asset is ultimately displayed as an orange edge.\n\nIn previous iterations of the bundler, this step would have been costly, since to determine if an asset is available synchronously, we would've traversed the graph upwards in search of it. Now we simply consult `reachableRoots` and `ancestorAssets`, which tells us if the asset we want to load via asynchronous bundle is either available to us synchronously or via our ancestors.\n\n```js\nif (\n  reachableAssets[parentId].has(bundleRootId) ||\n  ancestorAssets[parentId]?.has(bundleRootId)\n) {\n  // internalize\n}\n```\n\nA bundle can be **deleted** in this step if we determine that all those who request this particular asynchronous bundle already have it available to them by some other means. We denote this with `canDelete`.\n\n## Step: Insert or Share\n\nHere, we finally place assets into bundles which require them. All of the previous work we've done assumes all synchronous assets will be available to the bundle that needs it, but we haven't actually placed those assets in yet. If an asset is “reachable” from many bundles, we can extract it into a shared bundle.\n\nYou may think of reachable as all the bundles that still need an asset by some means. We filter it down to ensure we only place assets where they need to be. Any bundle that contains the asset in question in its ancestorAssets is filtered out, & entries are filtered out.\n\n### Reused Bundles\n\nThere’s a special case here, which is reusing bundles. We noticed sometimes, if two or more bundles shared the whole contents of another bundle, reusing that bundle is as simple as drawing an edge, as opposed to creating a shared bundle that would essentially be a copy of another.\n\n![image info](./BundlerGraphs/steps/idealBundleGraph_final_reusedFoo.png)\n\nIn the above example, foo.js is a reused bundle. You can tell a bundle is reused if it has both an entry asset and source bundles.\n\nFor a step by step explanation through the code and example, checkout the \"Reused Example\" in [BundlerExamples.md](BundlerExamples.md)\n\n### Other special cases\n\nThroughout the `DefaultBundler` There are references to `ManualSharedBundles`, this is an unstable feature, please see [Manual Bundling](ManualBundling.md) for contributor notes on that feature.\n\n### Other special cases\n\nFinally, after we've considered our asset for the above special cases, we're now left to create shared bundles. Generally, the rule is that if our `reachable(asset) > 1`, we can place our asset into a shared bundles and draw an edge to those `reachable` bundleRoots.\n\nConfig can change this behavior, so beware. Since we process assets one by one, we need a key by which to look up if this particular set of `bundleRoots` already has a shared bundles.\n\n```js\nlet key = reachableArray.map(a => a.id).join(',');\n```\n\nThe key-to-bundle mapping is stored at `bundles`. That way if we have the following reachable, we can create a shared bundle the first time we need some sharing between bundleRoots `foo.js` and `bar.js` and the second time we hit that exact reachable, we can simple add in `b.js`.\n\n```\nreachable\na => {bar, foo}\nb => {bar, foo}\n```\n\nShared bundles can also have internalized assets, so we need to update upon creation of this bundle.\n\n```\nsharedInternalizedAssets.intersect(parentBundle.internalizedAssets);\n```\n\nThat's it! The next few steps only kick in if your bundler config specifies.\n\n## Step: Merge Shared Bundles\n\nUsers of Parcel can specify a bundler config, which sets `minbundleSize`, `maxParallelRequests`, and `minBundles`. In this step we merge back and shared bundles that are smaller than `minBundleSize`.\n\nThese config options only affect shared bundles. For more on the config options, visit the [Parcel Docs on Shared Bundles](https://parceljs.org/features/code-splitting/#shared-bundles).\n\n## Step: Remove Shared Bundles\n\nFinally, we remove shared bundles to abide by `maxParallelRequests`. `maxParallelRequests` semantically affects how many bundles are to be loaded at once, and syntactically affects how many bundles can be in a bundle group.\n\nOne difference between the previous implementation and the current is here, where we also merge back “reused” bundles. Unlike shared bundles, reused bundles may have children, so we must update the graph accordingly. Below is an example graph from shared-bundle-reused-bundle-remove-reuse/index.js\n\n# BundleGraph Decoration\n\nBundleGraph decoration takes an idealGraph and mutates the passed-in assetGraph aka Mutable bundleGraph, in order to back port our idealGraph to what Parcel expects.\n\n## Definitions\n\n- **Asset:** A file or representation of a file with some information about how it should be bundled\n\n- **Bundle:** A grouping of assets which are loaded together and within the same location\n\n- **BundleGroup:** Group of bundles which will load together, which has an entry bundle (the first bundle to load out of the group)\n\n  - _Note the existence of LegacyBundle which refers to the old Bundle structure_\n\n- **AssetGraph:** A Graph representing Assets and their Dependencies as they appear in a user’s project\n\n- **BundleGraph:** A Graph maintaining Bundles, Assets, Dependencies, and Entries as Nodes, with relationships as edge types\n\n- **local BundleGraph:** Within `CreateIdealGraph()`, we maintain a local BundleGraph which represents only bundles that load in parallel, represented by being attached to the root dummy node.\n\n- **Default:** The Default BundleGraph (which you will most commonly see throughout Parcel) maintains the nodes mentioned above and is a modified version of the AssetGraph.\n\n- **IdealGraph:** Structure which contains the local bundleGraph, dependencyBundleGraph, BundleGroupIds, and a mapping of asset references. This stores all info needed to back-port our structures to the “standard” bundleGraph\n\n- **dependencyBundleGraph:** Maps bundles to their dependencies\n\n- **bundleRoots:** An Asset which is an entry to a Bundle\n\n- **reachableBundles:** A graph maintaining Synchronous relationships between bundleRoots\n\n- **BundleRootGraph:** A graph maintaining Async and Parallel relationships between bundleRoots\n\n- **Entries**\n\n  - **Entry to Project:** A file the user points Parcel at, in the bundler, this is a set of assets\n\n  - **Entry to A Bundle:** The main or first asset in a bundle\n\n  - **Entry to A BundleGroup:** The main or first bundle in a bundleGroup, which triggers the bundleGroup to be loaded\n\n- assetReference: For bundles within the same bundleGroup as their parent, reference edges are drawn between bundles and dependencies\n"
  },
  {
    "path": "docs/Deferring.md",
    "content": "# Deferring Assets\n\n(The core idea and benefits are described in [Scopehoisting](Scopehoisting.md)).\n\nEven if the usual way to describe deferring is via dependencies (and this is also how the API exposes it), the entity that's actually getting deferred is the asset group node. This is because the dependency is just the dependency \"request\" (though not as in \"request\" graph) and doesn't know yet whether the resolved asset is side-effect free. That is only known after the resolver ran (and the resolver result is stored in the asset group node).\n\n## Deferring\n\nThis might be the current state of the asset graph during transformation, only the \"Button\" reexport of the library is used so far, and the other reexport \"Switch\" wasn't imported anywhere (yet). So the \"Switch\" asset was deferred.\n\nThe `deferred`/`hasDeferred` properties respond to the asset graph node properties.\n\n```mermaid\ngraph TD;\n  AssetA\n    -->DependencyLibA[DependencyLibA:Button]\n    -->AssetGroupLib[AssetGroupLib<br>hasDeferred]\n    -->AssetLib[AssetLib<br>hasDeferred];\n  AssetLib\n    -->DependencyLibButton[DependencyLibButton:Button]\n    -->AssetGroupLibButton\n    -->AssetLibButton;\n  AssetLib\n    -->DependencyLibSwitch[DependencyLibSwitch:Switch<br>hasDeferred]\n    -->AssetGroupLibSwitch[AssetGroupLibSwitch<br>deferred];\n\n  classDef asset fill:orange,stroke:orange;\n  classDef dep fill:lime,stroke:lime;\n  class AssetA asset;\n  class AssetLib asset;\n  class AssetLibButton asset;\n  class DependencyLibA dep;\n  class DependencyLibButton dep;\n  class DependencyLibSwitch dep;\n```\n\nThis is detected in [`assetGraph.shouldVisitChild(DependencyLibSwitch, AssetGroupLibSwitch)`](https://github.com/parcel-bundler/parcel/blob/9e5d05586577e89991ccf90400f2c741dca11aa3/packages/core/core/src/AssetGraph.js#L305) which calls `assetGraph.shouldDeferDependency` (reads the symbol information and determines if the dependency is unused). Then `markParentsWithHasDeferred(DependencyLibSwitch)` is called to add the `hasDeferred=true` flags for the parent asset and asset group nodes.\n\nBecause `shouldVisitChild` returns false, the graph traversal never visits the asset group node and also never transforms the corresponding asset.\n\n### Undeferring\n\nNow another dependency is added/discovered during transformation, the asset group should be undeferred and the asset should get transformed:\n\n```mermaid\ngraph TD;\n  AssetA\n    -->DependencyLibA[DependencyLibA:Button]\n    -->AssetGroupLib;\n  AssetB\n    -->DependencyLibB[DependencyLibB:Switch]\n    -->AssetGroupLib;\n  AssetGroupLib[AssetGroupLib<br>hasDeferred]\n    -->AssetLib[AssetLib<br>hasDeferred];\n  AssetLib\n    -->DependencyLibButton[DependencyLibButton:Button]\n    -->AssetGroupLibButton\n    -->AssetLibButton;\n  AssetLib\n    -->DependencyLibSwitch[DependencyLibSwitch:Switch<br>hasDeferred]\n    -->AssetGroupLibSwitch[AssetGroupLibSwitch<br>deferred];\n  AssetGroupLibSwitch\n    -->AssetLibSwitch\n\n  classDef asset fill:orange,stroke:orange;\n  classDef dep fill:lime,stroke:lime;\n  class AssetA,AssetB,AssetLib,AssetLibButton asset;\n  class DependencyLibA,DependencyLibB,DependencyLibButton,DependencyLibSwitch dep;\n  style AssetLibSwitch fill:transparent,stroke-dasharray: 5 5,stroke:orange;\n  linkStyle 10 stroke-dasharray: 5 5,stroke-width: 1.5;\n```\n\n`DependencyLibB` got added to the graph and now all its children are considered: in the asset graph request traversal's `visitChildren` wrapped, there's [an override to revisit nodes if they have `hasDeferred=true`](https://github.com/parcel-bundler/parcel/blob/9e5d05586577e89991ccf90400f2c741dca11aa3/packages/core/core/src/requests/AssetGraphRequest.js#L169). This causes `AssetLib` and in turn `DependencyLibSwitch` to be revisited.\n\n`shouldVisitChild` and `shouldDeferDependency` then determine that `AssetLibSwitch` is now used and call `unmarkParentsWithHasDeferred(AssetGroupLibSwitch)` which clears `DependencyLibSwitch.hasDeferred`, clears `AssetLib.hasDeferred` (but only if there is no other sibling dependency that is still deferred), and sets `AssetGroupLib.hasDeferered = AssetLib.hasDeferred`.\n\n`shouldVisitChild` returns true and `AssetGroupLibSwitch` gets visited for the first time, also transforming the asset and creating the asset node.\n"
  },
  {
    "path": "docs/ManualBundling.md",
    "content": "## Manual Bundles\n\n_Note: This feature is EXPERIMENTAL, meaning it may act strange in unusual cases, and may not have full test coverage._\n\nParcel automatically code splits for certain import types, and automatically generates shared bundles based on a deduplication approach. Manual Bundles allow the user to specify their own custom bundles and their contents.\n\nThis document aims to explain the current implementation of Manual Bundling, for information on using the feature visit the Parcel Docs.\n\n### Generate Asset Lookups\n\nFirst, we generate a look up, `manualAssetToConfig`, which contains an Asset Node as a key, mapped to which config object the asset is valid for. Consider the config below.\n\n```json\n{\n  \"@parcel/bundler-default\": {\n    \"unstable_manualSharedBundles\": [\n      {\n        \"name\": \"\",\n        \"root\": \"manual.js\",\n        \"assets\": [\"**/*\"],\n        \"types\": [\"js\"]\n      },\n      {\n        \"name\": \"\",\n        \"root\": \"manual.js\",\n        \"assets\": [\"foo.js\"],\n        \"types\": [\"js\"]\n      }\n    ]\n  }\n}\n```\n\nTo generate the `manualAssetToConfig` we need to track which parents or roots (if any) exist in the project. Users specify the root based on file name, so we need to find `parentToAssetConfig`, which would look something like this:\n\n- \"root\" refers to the property on the config, however, within the code we call this the \"parent\". \"parent\" refers to the relationship between the imports that match the glob and the asset specified by the \"root\" property. This is because the word \"root\" has become overloaded, since we call any entry to a bundle, a \"bundleRoot\".\n\n```json\nparentsToConfig =  {\n  \"project/root/manual.js\" => {\n    {\n        \"name\": \"\",\n        \"root\": \"manual.js\",\n        \"assets\": [\"**/*\"],\n        \"types\": [\"js\"]\n    },\n    {\n        \"name\": \"\",\n        \"root\": \"manual.js\",\n        \"assets\": [\"foo.js\"],\n        \"types\": [\"js\"]\n    }\n  }\n}\n\n```\n\nOnce we've obtained the `parentsToConfig`, we traverse the assetgraph from each parent, searching for assets that match the specified glob. If a user did not specify a \"root\", we will simply traverse the entire `AssetGraph` in search of assets that match the glob.\n\n```js\nassetGraph.traverse((node, _, actions) => {\n        ...\n        // find matched node\n      }, parentAsset);\n```\n\nAnd the manualAssetToConfig would then looks something like this:\n\n```json\nmanualAssetsToConfig =  {\n  \"project/root/a.js\" => {\n    {\n        \"name\": \"\",\n        \"root\": \"manual.js\",\n        \"assets\": [\"**/*\"],\n        \"types\": [\"js\"]\n    },\n  }\n  \"project/root/foo.js\" => {\n    {\n        \"name\": \"\",\n        \"root\": \"manual.js\",\n        \"assets\": [\"foo.js\"],\n        \"types\": [\"js\"]\n    }\n  }\n}\n```\n\nThe config object in the value of the above map is referred to as the \"manualSharedObject\".\n\n### Override Traditional Code Split Bundles\n\nDuring **Step Create Bundles**, bundles are created for explicit code split points. We must override any assets which match any manual globs.\n\n```js\n// MSB Step 1: Match glob on file path and type for any asset\nlet manualSharedBundleKey;\nlet manualSharedObject = manualAssetToConfig.get(childAsset);\n```\n\nSince we have a lookup, we attempt to grab the `manualSharedObject` for an asset, and then generate a key with which we can index the bundle later.\n\n```js\nif (manualSharedObject) {\n  // MSB Step 2: Generate a key for which to look up this manual bundle with\n  manualSharedBundleKey = manualSharedObject.name + ',' + childAsset.type;\n}\n```\n\nThe key will be used to find the manual bundle for this exact asset, and then we add the asset to the bundle as usual.\n\n#### Internalized Bundles for Manual Shared Bundles\n\nWhen creating bundles for explicit code split points, there is a possibility of multiple asynchronous assets being placed into a singular manual bundle. Because of this, we need to track the excess and internalize them.\n\n```js\nif (manualSharedObject) {\n  // MSB Step 4: If this was the first instance of a match, mark mainAsset for internalization\n  // since MSBs should not have main entry assets\n  manualBundleToInternalizedAsset.get(bundleId).push(childAsset);\n}\n```\n\nTo do this we collect all async assets in a manual bundle, and set the appropriate bundle property (`bundle.internalizedAssets`) afterwards. Internalization marks async assets that should now be loaded as synchronous assets.\n\n### Override Traditional Shared Bundles\n\nDuring asset placement (see Asset Placement in [DefaultBundler.md](DefaultBundler.md) for more info), we override shared bundles. Assets needed by entries are still placed in entries, but before we consider our asset, `a`, for reused or shared bundles, we check if it should be placed in a manualSharedBundle.\n\n```\n\nif (manualSharedObject && !reachable.empty()) {\n\n```\n\nNext we generate our `manualSharedBundleKey` which is just the config name and asset type, and look up the `bundleId` in the `manualSharedMap`. Then we simply process the asset as usual: create a bundle if it doesn't exist, otherwise just add it on.\n\n```\n\nbundle = createBundle({\nuniqueKey: manualSharedObject.name + firstSourceBundle.type,\ntarget: firstSourceBundle.target,\ntype: firstSourceBundle.type,\nenv: firstSourceBundle.env,\nmanualSharedBundle: manualSharedObject?.name,\n});\n\n```\n\nThe `manualSharedBundle` property and the `uniqueKey` property both store the name of the bundle, and can be read in namers or other plugins to influence your manual shared bundle.\n\n### More Info\n\nFor config information visit the Parcel documentation's section on MSBs. For a more detailed example, check out the Manual Bundles Example in [Bundler Examples](BundlerExamples.md)\n"
  },
  {
    "path": "docs/Scopehoisting Packager.md",
    "content": "# Scopehoisting Packager - Overview\n\n(The skipping of single assets is described in [Scopehoisting](Scopehoisting.md)).\n\n## Starting point `package()`:\n\n1. `loadAssets()`: Load the assets contents from cache and determine which assets are wrapped.\n2. `processAsset()`/`visitAsset()` which call `buildAsset()`: These will recursively resolve dependency specifiers and inline dependencies, and append the result to the top level `res` string.\n3. Kick off the process by calling `processAsset()` for all assets (and skip some to only process assets once if it was already inlined somewhere else).\n\n## `buildAsset()`:\n\n1. If the asset should be skipped: ignore the current asset, call `buildAsset()` for dependency assets and concatenate only them together.\n2. Call `buildReplacements()`, generating the `Map`s used during the text replacement:\n   - The dependency map which is used to resolve `import \"...\";` declarations inserted by the transformer: `${assetId}:${specifier}${specifiertype} -> Dependency`\n   - Import replacements: the local part of a dependency symbol (`$id$import$foo`) -> result of `getSymbolResolution` (e.g. `$id$export$bar` or `parcelRequire(\"id\").bar`)\n3. Call `buildAssetPrelude()`:\n   - generates `$parcel$defineInteropFlag($id$exports)` call for this asset if needed.\n   - synthesizes the exports object if needed (including generation of the `$parcel$export` and `$parcel$exportWildcard` calls only for used re/exports)\n4. Perform the replacements with `REPLACEMENT_RE` matching one of\n   - `import \"id\";`\n     - will be replaced with the source code of the asset (call `buildAsset()` recursively ). If the referenced asset is wrapped, don't inline but place it after the current asset (into `depContent`).\n     - calls `getHoistedParcelRequires` to read the `hoistedRequires` list from `getSymbolResolution` and prepend needed requires.\n   - `$id$exports`\n     - `module.exports` inside the asset gets replaced with `$id$exports` in the transformer, but for wrapped assets, this has to be replaced back to `module.exports`\n   - `$id$import|importAsync|require$foo`\n     - will be looked up in the replacements and replaced with the resolved identifier\n5. If necessary, wrap the result up until now with `parcelRequire.register(\"id\", ...)`.\n\n## `getSymbolResolution()`:\n\nThis is a wrapper around `bundleGraph.getSymbolResolution()`.\n\nThe additional dependency argument is used to determine whether CJS interop has to be applied (if it's a ESM import), or whether it's a non-conditional import (and a hoisted `parcelRequire` call has to be generated).\n\nCompared to the bundle graph's method, the `parentAsset` is used to make wrapped assets using their own namespace object refer to `module.exports` instead of `$id$exports`.\n\n- It returns the resolved expression for the specified symbol:\n  - `$id$export$bar` (e.g. same-bundle ESM import),\n  - `$id$exports` (e.g. same-bundle ESM import),\n  - `id$exports.bar` (e.g. non statically analyzable exports) or\n  - `parcelRequire(\"id\").bar` (wrapped/in another bundle)\n  - `$parcel$interopDefault` (if an ESM default import resolved to a non-statically analyzable CJS asset)\n- also handles interop (if the default symbol is imported and the resolved asset is CJS, use the namespace instead)\n- tracks imports of wrapped assets (which will need `parcelRequire` call) by mutating the `hoistedRequires` list\n\n## `bundleGraph.getSymbolResolution()`\n\nThis method transitively/recursively traverses the reexports of the asset to find the specified export. This enables resolving some import to the actual value and not just some reexporting binding.\n\nThe result is an `asset`, the `exportSymbol` string, and `symbol`. The value can be accessed from `$asset.id$exports[exportSymbol]`, which is potentially also already (or only) available via the top-level variable `symbol`. So for the add/square example above, `getSymbolResolution(math.js, \"add\")` would return `{asset: \"math.js\", exportSymbol: \"add\", symbol: \"$fa6943ce8a6b29$export$add\"}`.\n\nWhile this improves code size, an imperfection with this system is that it actually means that an asset A can use a value from asset B (which is usually modelled with a dependency from A to B) without there actually being a dependency between the two. Dependencies are also used to determine if an asset is required from another bundle and has to therefore be registered with `parcelRequiree`. This discrepancy can be handled inside of a single bundle, but not across multiple bundles, so the `boundary` parameter makes the resolution stop once the bundle is left.\n\nThere are three possible resolution results:\n\n- the export has been found (with top level variable `symbol`).\n- the export has not been found (`symbol === undefined`), this should have been caught already by symbol propagation\n- the export has been found and is unused (`symbol === false`)\n- it had to bailout because there are multiple possibilities (`symbol === null`), and the caller should fallback to `$resolvedAsset$exports[exportsSymbol]`. Some examples for bailouts are:\n\n  - `export * from \"./nonstatic-cjs1.js\"; export * from \"./nonstatic-cjs1.js\";`, so the decision between which reexport to follow should happen at runtime.\n  - if the `resolvedAsset` is a non-static cjs asset itself, then `module.exports[exportsSymbol]` should be used anyway.\n"
  },
  {
    "path": "docs/Scopehoisting Transformer.md",
    "content": "# Scopehoisting Transformer\n\n(Be sure to read [swc Visitors](swc%20Visitors.md) beforehand.)\n\n(\"Non-static\" refers to a variable being used in a way that cannot be optimized, such as `module.exports[someVariable] = 2`, or `import * as x from \"..:\"; console.log(x[someVariable]);`.)\n\nThe task of the hoist transformer is, in the simplest case, rewriting imports and exports, renaming the uses of the imports. The packager can then detect these `import \"id:...\";` statements to inline dependencies, replace `$id$import$foo` with the resolved expression, and generate necessary `$parcel$export(..., () => $id$export$b)` statements.\n\n<table>\n<tr><td>\n\n```js\n// a.js\nimport {b} from './b';\nb();\n\n// b.js\nexport let b = 2;\n```\n\n</td><td>\n\n```js\n// a.js\nimport 'id:./b';\n$id$import$b$b();\n\n// b.js\nlet $id$export$b = 2;\n```\n\n</td></tr>\n</table>\n\nWhile this is rather straight forward for pure ESM, a major source of complexity is having to handle arbitrary CJS while still optimizing as much as possible (non-static `module` accesses, non-top-level `require` calls, ...).\n\nIn addition to the code, it sets the symbols and various meta properties on both the asset and the dependencies:\n\n- `asset.meta.id`: depending on which transformers run after the JS transformer, the value of `asset.id` will be different in packager from the id used for the various variables like `$id$export$foo`. The current asset id in the JS transformer is therefore stored.\n- `asset.meta.hasCJSExports`: true if there is at least one CJS export\n- `asset.meta.staticExports`: true if there is at least one CJS export that doesn't follow the pattern `module.exports.foo = ...`\n- `asset.meta.shouldWrap`: Some constructs require this asset being wrapped in a `parcelRequire.register` block: top-level returns, non-static uses of `module`, eval, reassigning `module` or `exports`\n- `dep.meta.shouldWrap`: this is a conditional require\n- `dep.meta.promiseSymbol`: see the \"Dynamic Imports\" section\n\n## Detecting non-static CJS imports/exports\n\nA commonly used pattern is detecting some special case patterns such as top-level `var x = require(\"...\");` or `aNamespaceObject.foo` or top-level `module.exports.foo = ...;` as high up in the visitor functions as possible and not traversing the children at all if there's a match.\n\nSo there is check for static top-level requires in `visit_module`, and if the `visit_expr` visitor is reached for `require(\"...\")`, it is definitely a non-static (and conditional) require.\n\nThe `typeof` visitor doesn't traverse the children if the argument is `module`, so that `typeof module` doesn't count towards the non-static accesses to `module`.\n\n## Self References\n\nBecause even `module.exports.foo = ...;` statements are detected and turned into symbols just like ESM exports, reading `module.exports` or `module.exports.foo` would naively not cause all of the exports to be preserved nor an namespace object to be generated (because looking at the graph and the symbol data, they are unused).\n\nSo instead, reading `module.exports` is expressed just like it is in ESM: by adding an import to the asset itself with the symbols being used. This is called a \"self reference\".\n\n## Identifier Names\n\nThere are names to uniquely identify an import, the actual format doesn't actually matter for the code, as long as its used consistently (Parcel never re-parses these names to retrieve the parts again):\n\n- `$x$import$y` = Asset with id `x` imported the namespace of the dependency with hashed source `y`\n- `$x$import$y$z` = Asset with id `x` imported the hashed export `z` of the dependency with hashed source `y`\n- `$x$require$y` = Asset with id `x` required the namespace the dependency with hashed source `y`\n\nand to unique identify an export:\n\n- `$x$exports` = The namespace exports object of the asset with id `x`\n- `$x$exports$y` = The hashed export `y` of the asset with id `x`\n\n(The symbol names are hashed because it's possible to have export names that are invalid Javascript identifiers: `module.exports[\"a b\"] = 1;` or `export {x as \"a b\"}`, or via CSS modules.)\n\n## Dynamic Imports\n\nDynamic imports such as `import(\"..\").then(({ foo }) => log(foo));` will only cause `foo` to be used and not the entire asset. But at runtime, we still need a namespace object from which to access `off`. For this reason,\n\n```js\nimport('./other.js').then(({foo}) => log(foo));\n```\n\nthe dependency:\n\n```\n{\n  promiseSymbol: '$assetId$importAsync$other'\n  symbols: {\n    'foo' => {\n      local: '$assetId$importAsync$other$90a7f3efeed30595',\n    }\n  }\n}\n```\n\nthe generated code:\n\n```js\nimport 'assetId:21eb38ddd81971f9';\n$assetId$importAsync$other.then(({foo}) => log(foo));\n```\n\nSo `import()` is replaced by an identifier that isn't actually listed in the symbols (because otherwise a symbol for `*` would prevent removing unused symbols), and this is the identifier stored in `dep.meta.promiseSymbol` which is then used for replacement in the packager.\n\n## Preceding analysis pass: `Collect`\n\n[This analysis](https://github.com/parcel-bundler/parcel/blob/9e2d5d0d60d08d65b5ae6cd765c907a8753bbf39/packages/transformers/js/core/src/hoist.rs#L1291) runs is used even without scope-hoisting, to generate symbols in development for deferring.\n\n- collect which variable refers to an import/export\n- find evals, non-static accesses of `module`, `exports`, ...,\n\n## Actual transformation pass: `Hoist`\n\nSome of the following steps are skipped when the asset was determined to be wrapped during `Collect` (stored in `self.collect.should_wrap`), since `module` and `exports` will be available in that case anyway and no rewriting has to happen for uses of these.\n\n[fold_module](https://github.com/parcel-bundler/parcel/blob/9e2d5d0d60d08d65b5ae6cd765c907a8753bbf39/packages/transformers/js/core/src/hoist.rs#L138):\n\n- match ESM import/export decls\n  - store in `self.hoisted_import` and `self.reexports`, `self.exported_symbols`\n  - imports are replaced with `import \"...\";`\n  - for exports, just a `var $id$export = xyz` is left, the info what is imported/exported is kept in the maps\n- match statically analyzable `var x = require(\"y\");`.\n  - similarly, the whole statement gets removed and replaced with `import \"...\";`,\n\nThen, various replacements happen:\n\n- [fold_ident](https://github.com/parcel-bundler/parcel/blob/9e2d5d0d60d08d65b5ae6cd765c907a8753bbf39/packages/transformers/js/core/src/hoist.rs#L756) looks up in `collect.imports` whether that identifier refers to an import (this renames expressions that refer to the variable as well as the names of the variable declarations themselves)\n\n- fold_assign_expr\n\n  - replace `module.exports = ...;` with `$id$exports = ...;`\n  - replace `module.exports.foo = ...;` with `$id$exports$foo = ...;` and generate a corresponding hoisted `var $id$exports$x;` declaration.\n\n- fold_expr:\n  - replace `module.exports.foo` with `$id$export` identifier\n  - replace `importedNs.foo` with `$id$import$foo` identifier\n  - replace `require(\"x\").foo` with `$id$import$foo` identifier\n  - replace `require(\"x\")` with `$id$import` identifier\n  - replace `import(\"x\")` with `$id$import` identifier\n  - top-level `this` in ESM -> `undefined`\n  - top-level `this` in CJS -> `module.exports`\n  - wrap ESM imports with `(0, ...)` for correct `this`\n"
  },
  {
    "path": "docs/Scopehoisting.md",
    "content": "# Symbols and Scope Hoisting\n\n## Concepts\n\n### Tree Shaking and Scope Hoisting\n\nTree shaking refers to the general principle of removing dead code. With a naive browserify-style bundling (= what Parcel does in development builds), exports that are never used in the project are still \"used\" in a syntactical sense (= not dead), but not in a runtime code coverage sense (= unused).\n\nSome ways to improve this are:\n\n- Determine which exports are used, and drop the `export` statement during the build. Then the exported value becomes an unused variable and a minifier can remove it. This is what symbol propagation and the conditional generation of only used `$parcel$export()` calls achieves.\n  This is also why `/*#__PURE__*/` comments are important:\n\n```js\nfunction Button() {...}\n$parcelRequire(exports, \"Button\"; () => Button); // was: export { Button };\n\n// The export was removed during the build, and the function will be dropped by the minifier:\nfunction Select() {...}\n// export {Select};\n\n// Without the pure comment, minifiers wouldn't be able to remove the right hand side.\n// (Note: Babel/swc add this comment automatically when transpiling JSX)\nconst MyContext = /*#__PURE__*/ React.createContext();\n// export {MyContext};\n```\n\n- Determining used exports covers almost all tree shaking needs, but it would still leave the module registry (\"prelude\").\n\n  By concatenating assets into a single scope, the function calls for `parcelRequire(\"id\").foo` can be replaced with a regular variable access `$id$export$foo` (ESM import are live bindings, so accessing an imported value in a function would perform this function call every single time, though it's just an object lookup anyway). And these `parcelRequire.register(() => {...})` wrappers plus `parcelRequire` calls also have some bundle size overhead.\n\n  It can also improve the effectiveness of the minifier, especially regarding function inlining and constant evaluation, but this really depends on the actual code.\n\n<table><tr>\n<td>\n\n```js\n// math.js\nexport function add(a, b) {\n  return a + b;\n}\n\nexport function square(a) {\n  return a * a;\n}\n\n// index.js\nimport {add} from './math';\nconsole.log(add(2, 3));\n```\n\n</td><td>\n\n```js\nfunction $fa6943ce8a6b29$export$add(a, b) {\n  return a + b;\n}\n\n// dead code\nfunction $fa6943ce8a6b29$export$square(a) {\n  return a * a;\n}\n\nconsole.log($fa6943ce8a6b29$export$add(2, 3));\n```\n\n</td>\n</tr></table>\n\n### Skipping assets (deferring and skipping during bundling)\n\n(An asset or a dependency being unused means `getUsedSymbols(asset or dep).size === 0`).\n\nThere are two ways in which assets can be skipped (not included in the output):\n\n**Subgraph**: if a reexport is unused, then the whole subgraph of that dependency can be ignored. This system is built into core because this should be safe in any case.\n\n- _Deferring_: This can happen during the graph visit when building the asset graph. There is effectively a one-reexports-level lookahead, so if an reexports some symbol `x` and no incoming dependency requests `x`, then the reexport (and the corresponding dependency) is skipped. This doesn't work for `export *`.\n\n  Another benefit of deferring is that deferred assets don't get transformed in the first place. So something like `import {Button} from \"design-system\";` would only process that single `export {Button} from \"./button\";` and completely ignore all other exports in `design-system/index.js`.\n\n  Deferring can also happen without scopehoisting (as the non-scopehoisting JS transformer also sets symbols).\n\n- _Unused dependency_: This is the same principle as deferring, but for an unlimited reexport depth and also for `export *`. Instead of checking the incoming dependencies and matching with non-star reexports, `bundleGraph.getUsedSymbols(dep).size === 0` is used (this information comes from symbol propagation).\n\n  Symbol propagation currently only runs when scope hoisting is enabled.\n\n**Single Asset**: if a side-effect free asset only has reexports and doesn't export a value itself (and is also not imported from other bundles), then it can be skipped since the reexports will be resolved to their original assets anyway. This is handled in the JS packager only, and not in core.\n\n```js\nimport {a} from './lib.js';\nconsole.log(a);\n\n// lib.js, asset gets skipped\nexport * from './exports-a.js'; // dep used, not skipped\nexport * from './exports-b.js'; // dep skipped with symbol propagation\nexport {c} from './exports-c.js'; // dep skipped with deferring\n```\n\n### Symbols\n\nBoth assets and dependencies have attached symbol information. These are maps that describe what an asset (re)exports, and what a dependency imports/reexports.\n\nCore (so symbol propagation and `getSymbolResolution`) rely on the following convention (plugins can store custom information in the per-symbol meta properties):\n\n- `asset.symbols` is a map of export names (= what the export was called in the source) to the local names (whatever Parcel renamed the variable to, e.g. `$id$export$foo`). `*` represents the namespace object and is only set for CJS assets (which makes `getSymbolResolution` fall back to a property access).\n\n- `dependency.symbols` is a map of import names (= which binding was imported) to the local name (= the identifier that the imported binding got replaced by, e.g. `$id$import$bar`). The whole namespace can be imported by using `*` as the import name. A dependency with a `* -> *` mapping corresponds to `export * from`.\n\nAll CommonJS assets have a `* -> $id$exports` symbol, which serves as a fallback when importing a symbol that is not explicitly listed. This is also what prevents symbol propagation from throwing a `some-commonjs.js does not export foo` error, as this can't be done reliably for CommonJS assets (e.g. symbols can be added from outside the asset by writing to the module object).\n\n`module.exports = ...;` or some other non-statically analyzable syntax like accessing `module` freely causes the asset to have a `*`.\n\nThese two types of mapping can be used together to model reexports:\n\n- `export {a as b} from \"x\";` is turned into a `a -> $id$import$x$a` mapping on the dependency and a `b -> $id$import$x$a` mapping on the asset.\n- `export * as a from \"x\";` is turned into a `* -> $id$import$x` mapping on the dependency and a `a -> $id$import$x` mapping on the asset.\n- (`export *` just have that `* -> *` on the dependency)\n\nExamples:\n\n<table>\n<tr><td>\n\n```js\nexport const foo = 2;\n```\n\n</td><td>\n\n```\nasset.symbols = {\n  foo -> $assetId$export$a829fe\n}\n```\n\n</td></tr>\n<tr><td>\n\n```js\nimport {foo} from './other.js';\n```\n\n</td><td>\n\n```\ndependencies[\"./other.js\"].symbols = {\n  foo -> $assetId$import$8128f$281fa (isWeak: false)\n}\n```\n\n</td></tr>\n<tr><td>\n\n```js\nexport {foo as bar} from './other.js';\n```\n\n</td><td>\n\n```\nasset.symbols = {\n  bar -> $assetId$import$8128f$281fa\n}\ndependencies[\"./other.js\"].symbols = {\n  foo -> $assetId$import$8128f$281fa (isWeak: true)\n}\n```\n\n</td></tr>\n<tr><td>\n\n```js\nexport * from './other.js';\n```\n\n</td><td>\n\n```\nasset.symbols = {}\ndependencies[\"./other.js\"].symbols = {\n  * -> * (isWeak: true)\n}\n```\n\n</td></tr>\n</table>\n\n#### Used Symbols\n\nThe used symbols are determined by symbol propagation, and have slightly different meanings for dependencies and assets:\n\n- `getUsedSymbols(asset)` is the set of symbols that were resolved to this specific asset (so excluding eventual reexports).\n- `getUsedSymbols(dependency)` is the set of symbols that are imported through the dependency (so both including reexports). So for an `export {a, b} from \"...\";` it is a subset of `a,b` and for `export * from \"...\";` it is the set of symbols that are actually resolved through that reexport.\n\n### Integrating ESM and CJS with parcelRequire: Circular Imports and Conditional Requires\n\n#### ESM\n\nThe ES module system behaves exactly like assets getting concatenated and imports getting resolved to their actual bindings.\n\n```js\n// index.js\nimport {func} from './other.js';\nfunc(); // ReferenceError: Cannot access 'value' before initialization\nexport const value = 1;\n\n// other.js\nimport {value} from './index.js';\nexport function func() {\n  return value + 1;\n}\n```\n\nIf `value` were instead a function, calling it would work correctly (functions are still hoisted). So circular imports are why `$parcel$export` calls also have to be hoisted to the top of the asset.\n\n#### Limitations\n\nThe reasons why the `parcelRequire` registry is needed are assets being accessed from other bundles (and potentially being duplicated), and conditional requires (which are impossible with pure ESM declarations).\n\nSo assets that have at least one conditional incoming dependency or are used by some other bundle, are wrapped in a `parcelRequire.register`. `require(\"foo\")` calls inside ifs or functions are replaced with the appropriate `parcelRequire(\"id\")` call.\n\nBut since the whole subgraph is conditionally executed, all assets have to be wrapped and inside of that subgraph, imports cannot be replaced with the top level variables anymore, but instead get replaced with the CommonJS equivalent (so `var $id = parcelRequire(\"id\");` and then `$id.foo`) which also runs the side effects.\n\n### Runtime Deduplication\n\nOne part of scope hoisting is getting rid of the registry that is used in development/browserify, but the registry is unfortunately still needed whenever an asset is included in multiple bundles. This ensures that an asset is only ever evaluated at most once, so that side-effects don't run twice, and that the identity of the exports is retained:\n\n```js\n// index.js\nconst a = await import(\"./async1.js\");\nconst b = await import(\"./async2.js\");\nconsole.log(a.constructor === b.constructor) // or using `instanceof`, ...\n\n// async1.js (becomes an async bundle together with a copy of \"lib\")\nimport {SomeClass} from 'lib';\nexport default new SomeClass();\n\n// async2.js (becomes an async bundle together with a copy of \"lib\")\nimport {SomeClass} from 'lib';\nexport default new SomeClass();\n```\n\n### Interop\n\nThe usual way for importing CommonJS using synchronous ESM imports is via an default export, which then contains the exports namespace object of the CommonJS asset.\n\n```js\nimport v from './other';\n// v == { x: 2, y: 3 }\n\n// other.js\nmodule.exports.x = 2;\nmodule.exports.y = 3;\n```\n\nBut by convention (with Babel, tsc, ...), this should not happen if the imported asset is actually an ESM file that was transpiled to CommonJS beforehand (and e.g. published to npm). In that case, the default import should refer to original default export (which was transpiled to `exports.default = ...;`). Without interop, the default export would be `{ default: ... }`.\n\nSo instead, transpilers add an additional \"export\" with `exports.__esModule = true;` which declares a file to be ESM-transpiled-to-CommonJS.\n\nAn asset with a default import of a (maybe)-CommonJS file now needs to do a lookup:\n\n```js\nfunction interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {default: obj};\n}\nvar _x = interopRequireDefault(require('./x'));\n```\n\nWith scope hoisting, Parcel can omit this call in many cases when the importee was determined to be ESM or ESM-transpiled-to-CommonJS via static analysis.\n"
  },
  {
    "path": "docs/Symbol Propagation.md",
    "content": "# Symbol Propagation\n\nThe goal of symbol propagation is generating the sets of (transitively) used symbols based on the symbols set on assets and dependencies (see [Scopehoisting](Scopehoisting.md)).\n\n## Two Passes\n\nIn the most basic case, the used symbols can be determined by traversing through all assets, and repeatedly forwarding the symbols of incoming dependencies down through the reexports corresponding to outgoing dependencies (and always matching them to the correct reexport, potentially also renaming the symbol).\n\nBut with `export *`, there is no unique reexport to match an incoming symbol request to:\n\n```js\n// index.js\nimport {a} from './other.js';\n\n// other.js\nexport * from './x.js'; // Is `a` reexported here...\nexport * from './y.js'; // ... or here? Or neither?\n\n// x.js\nexport const a = 1;\n// y.js\nexport const b = 2;\n```\n\nInstead, there are two passes:\n\n- in the first (\"down\") pass, the incoming used symbols are matched to the correct reexport (if there is one), or to _all_ `export *`. So after this pass, the symbol will be marked as used in all potentially relevant dependencies (one of which will be the correct one).\n\n- in the second (\"up\") pass, the set of requested symbols (from the down pass) is intersected with the set of actual exports and copied back from the outgoing dependencies to the incoming dependencies. There are multiple cases that can occur:\n  - There is exactly one dependency that can provide the export.\n  - There is no dependency that can provide the export, which leads to a [\"x does not export y\" error](https://github.com/parcel-bundler/parcel/blob/f65889ebd768e9b2e146537b47d4d5d82ff177b8/packages/core/core/src/requests/AssetGraphRequest.js#L754-L776).\n  - (For `export *`:) There are multiple dependencies that can provide the export. This can happen with valid ESM (and the first value will be used), or with non-statically analyzable CJS modules where we have to determine at runtime which value to use. [There's a verbose warning in this case](https://github.com/parcel-bundler/parcel/blob/f65889ebd768e9b2e146537b47d4d5d82ff177b8/packages/core/core/src/requests/AssetGraphRequest.js#L560-L569).\n\n<table>\n<tr><th>Data Flow in Down Traversal</th><th>Data Flow in Up Traversal</th></tr>\n<tr><td>\n\n```mermaid\ngraph TD;\n  DepIn1[Incoming dep] --> Asset;\n  DepIn2[Incoming dep] --> Asset;\n  DepIn3[Incoming dep] --> Asset;\n  Asset;\n  Asset --> DepOut1[Outgoing dep];\n  Asset --> DepOut2[Outgoing dep];\n  Asset --> DepOut3[Outgoing dep];\n\n  classDef asset fill:orange,stroke:orange;\n  classDef dep fill:lime,stroke:lime;\n  class Asset asset;\n  class DepIn1,DepIn2,DepIn3,DepOut1,DepOut2,DepOut3 dep;\n```\n\n</td><td>\n\n```mermaid\ngraph BT;\n  Asset --> DepIn1[Incoming dep];\n  Asset --> DepIn2[Incoming dep];\n  Asset --> DepIn3[Incoming dep];\n  Asset;\n  DepOut1[Outgoing dep] --> Asset;\n  DepOut2[Outgoing dep] --> Asset;\n  DepOut3[Outgoing dep] --> Asset;\n\n  classDef asset fill:orange,stroke:orange;\n  classDef dep fill:lime,stroke:lime;\n  class Asset asset;\n  class DepIn1,DepIn2,DepIn3,DepOut1,DepOut2,DepOut3 dep;\n```\n\n</td></tr>\n\n<tr><th>After Down Traversal</th><th>After Up Traversal</th></tr>\n<tr><td>\n\n```js\n// index.js\nimport {a} from './other.js'; // used down: a\n\n// other.js, used down:\nexport * from './x.js'; // used down: a\nexport * from './y.js'; // used down: a (!)\n\n// x.js, used down: a\nexport const a = 1;\n// y.js, used down:\nexport const b = 2;\n```\n\n</td><td>\n\n```js\n// index.js\nimport {a} from './other.js'; // used down: a, used up: a\n\n// other.js, used down:\nexport * from './x.js'; // used down: a, used up: a\nexport * from './y.js'; // used down: a, used up:\n\n// x.js, used: a\nexport const a = 1;\n// y.js, used:\nexport const b = 2;\n```\n\n</tr>\n</table>\n\nThis is why `DependencyNode#usedSymbolsUp` are the actual used symbols, and `DependencyNode#usedSymbolsDown` is just an implementation detail.\n\n## Circular Imports/Reexports\n\nIn both cases, circular reexports also have to be considered:\n\n```js\n// index.js\nimport {b} from './other.js';\nexport const a = 1;\nconsole.log(b);\n\n// other.js\nexport {a as b} from './index.js';\n```\n\nThis traversal logic is abstracted away into the `propagateSymbolsDown` and `propagateSymbolsUp` methods in [AssetGraphRequest.js](../packages/core/core/src/requests/AssetGraphRequest.js), while the visitor function that handles the actual symbol data is passed as a visitor callback.\n\nThe down pass (`propagateSymbolsDown(...)`) performs a queue-based BFS which will continue re-traversing parts of the graph if they are marked dirty (the flags are described in the next sections). The traversal starts with the changed assets and asset groups that had incoming edges removed (which can lead to less used symbols).\n\nThe up pass (`propagateSymbolsUp(...)`) is a post-order recursive DFS if more than half of all assets changed, or a queue-based \"reverse\" BFS (which covers both incremental updates and circular imports by traversing until nothing is marked dirty anymore).\n\nAnother result of having to handle circular imports is error handling. Error cannot be thrown immediately when a missing reexport is encountered, as this situation also occurs when walking dependency cycles (and continuing just a bit longer might cause an outgoing dependency to get updated with the export that was previously missing):\n\nThe traversal starts at the leaves (other.js): the incoming `index -> other (down: b)` dependency requests b, but the outgoing `other -> index` dependency which provides `b` doesn't have `a` in the up set yet. So an error is stored for the other.js asset.\n\nNext, index.js is visited, and the incoming dependency `other -> index (down: a)` can indeed be satisfied with the export and is therefore added into `usedSymbolsUp`.\n\nBecause `other -> index` was changed, the parent asset is revisited (other.js), and the incoming `index -> other (down: b)` request for `b` is again matched to `a` in the reexport, and the outgoing dependency does indeed have `a` in `outgoing.usedSymbolsUp` so `b` is added to `incoming.usedSymbolsUp`. Since no error was generated when processing other.js, the error from the previous iteration gets discarded.\n\n| up iteration          | `import {b}`           | `export {a as b}`                                                          |\n| --------------------- | ---------------------- | -------------------------------------------------------------------------- |\n| start                 | `usedSymbolsDown`: `b` | `usedSymbolsDown`: `a`                                                     |\n| 1, asset=other.js     |                        | Error: `a` not found in `usedSymbolsUp` of outgoing dep (the `import {b}`) |\n| 2, asset=index.js     |                        | `usedSymbolsUp`: `a`                                                       |\n| **3, asset=other.js** | `usedSymbolsUp`: `b`   | `usedSymbolsUp`: `a`                                                       |\n| 3, asset = index.js   | `usedSymbolsUp`: `b`   | `usedSymbolsUp`: `a`                                                       |\n\nFurthermore, it's possible that there are multiple errors for missing exports. But it's hard to determine which of these have the same cause (because in such a circular reexporting chain, all nodes would show an error, there is no \"first\" one), so it simply throws the first error in the list. This has the downside of only showing one error at a time even if the code contains multiple (unrelated) problematic imports in different assets.\n\n## Down Traversal\n\n1. Categorize incoming usedSymbols into `asset.usedSymbols` or the `namespaceReexportedSymbols` based on whether they're listed in `asset.symbols`. So `asset.usedSymbols` now also contains reexports, which will be removed again in the next step.\n2. If the asset has no side effects and also nothing is requested by the incoming dependencies, then the entire subgraph is unused and no symbol will be used.\n\n   Otherwise the `namespaceReexportedSymbols` are redistributed to the `export *` dependencies' `usedSymbolsDown` , and the contents of `asset.usedSymbols` are forwarded to individual dependencies' `usedSymbolsDown` where possible (= a reexport = where there's a symbol in the dependency matching the one in the asset symbols).\n\nIf some outgoing dependency was changed by these steps, it's marked as dirty:\n\n- `dep.usedSymbolsDownDirty = true` so that the dependency resolution will be revisited later in this traversal.\n- `dep.usedSymbolsUpDirtyDown = true` so that the up traversal knows that this dependency now requests some other set of symbols, which could potentially require updates or throw an error.\n\n## Up Traversal\n\n1. Go through outgoing dependencies and collect all symbols that are reexported from them in `usedSymbolsUp`.\n2. Go through incoming dependencies:\n\n   1. Each symbol that is requested by that dependency (`usedSymbolsDown`) has to be exported by the asset or reexported by some outgoing dependency.\n\n      If a requested symbol cannot be found as a (re)export, then an error \"x.js does not export y\" is generated. (Unless the incoming dependency is a `export *`, then throwing here would could cause an error for a symbol that was only speculatively added as described above.)\n\n   2. If an incoming dependency is completely unused and also side-effect free, then it's marked as excluded (and now behaves like a deferred dependency).\n\nIf some incoming dependency was changed by these steps, it's marked as dirty:\n\n- `dep.usedSymbolsUpDirtyUp = true` so that the asset which has `dep` as an outgoing dependency will be revisited.\n\n## [Storing dependency resolution in the used symbols](https://github.com/parcel-bundler/parcel/pull/8432)\n\nFor better codesplitting and to hide the fact that symbol propagation runs on the whole project and not per bundle, dependencies are split to have one symbol per dependency and then retargeted to the asset that this symbol is originally exported from.\n\nTo compute this information of where a symbol resolves to, the up traversal doesn't work with sets of symbols anymore but with a [map that lists the symbols together with the asset that symbol resolves to](https://github.com/parcel-bundler/parcel/blob/f65889ebd768e9b2e146537b47d4d5d82ff177b8/packages/core/core/src/types.js#L324-L333). The rules are:\n\n- if a symbol is exported directly (not reexported), then this is stored as the map entry value.\n- if a symbol is reexported and the reexporting asset is side-effect free and the symbol unambigously resolves to a single reexport, then the map entry value is just copied over from the outgoing dependency (and still points to the original asset).\n- otherwise if a symbol is reexported, then the map entry value is instead the reexporting asset (which will lead to a correct lookup at runtime, as described [above](#two-passes)).\n\nThe rewriting of dependencies then happens in [`BundleGraph.fromAssetGraph`.](https://github.com/parcel-bundler/parcel/blob/6211c79f30e8fe2a1e079339277f11dba4acab2c/packages/core/core/src/BundleGraph.js#L210-L226)\n\n## (Optional side note: Data Flow Analysis)\n\nIn the big picture, there are some parallels here with [data-flow analysis](https://en.wikipedia.org/wiki/Data-flow_analysis) (which powers unused variable detection or hoisting of common sub-expressions in compilers): a graph is traversed (and parts are revisited) and some local operation is performed for the current node until the node values stabilize (a fixpoint is reached).\n"
  },
  {
    "path": "docs/swc Visitors.md",
    "content": "# swc Visitors\n\n> If you're reading this and want to use swc for something other than the existing Parcel transformer, then you might find this template useful which contains all of the boilerplate to parse some input, give you the AST to work with, and finally also stringify it again: https://github.com/mischnic/swc-example\n\nAn swc visitor is a Rust struct that implements the Visit/Fold/VisitMut trait. Then you can take some AST node (e.g. the top-level `module`) and call `visit_with`:\n\n```rust\nstruct Foo {\n  some_state: Vec<JsWord>\n}\n\nimpl Visit for Foo {\n  // Default implementation for all other nodes:\n  // fn visit_module(&mut self, node: &Ident) {\n  //   node.visit_children_with(self);\n  // }\n  fn visit_expr(&mut self, node: &Expr) {\n    println!(\"Some expression!\");\n    node.visit_children_with(self);\n  }\n  fn visit_ident(&mut self, node: &Ident) {\n    self.some_state.push(node.sym);\n  }\n}\n\nfunc main(){\n  // ...\n  let myVisitor = Foo { some_state: vec![] };\n  module.visit_with(&mut myVisitor);\n  // ...\n}\n```\n\nIf a function for some node type isn't declared, the default implementation uses `visit_children_with` to then visit all respective child nodes (and eventually also the functions declared in the impl).\n\nSimilarly, overriding such a function but not calling `visit_*` on some child nodes explicitly will then not visit the subtree at all (this really is a straight-forward recursive traversal).\n\nThese are all of the types of visitors (at least the ones used by Parcel):\n\n- `Visit` (and then `visit_with`/`visit_children_with`):\n\n  The function signatures are `fn visit_expr(&mut self, node: &Expr)`, so you get an immutable reference. This is useful for doing some analysis and no changes.\n\n- `Fold` (and then `fold_with`/`fold_children_with`):\n\n  The function signatures are `fn visit_expr(&mut self, node: Expr) -> Expr`, so you get the value and not just a reference to the node and also have to return the same node type again.\n\n- `VisitMut` (and then `visit_mut_with`/`visit_mut_children_with`)\n\n  The function signatures are `fn visit_mut_ident(&mut self, node: &mut Expr)` (so you get the value and not just a reference to the node), and also have to return the same node type again.\n\n  At least in theory, this is faster than `Fold` because `Fold` has to copy the node values around even if nothing changes.\n\n## Removing a node or replacing with a different node type\n\nLet's try to replace `export function Foo(){}` with `function Foo(){}` in swc: first of all it's not possible to straight-up return a `VarDecl` in a `fn fold_export_decl(self, node: ExportDecl)`.\n\nInstead, this logic need to be pulled up one level to the `ModuleItem`s\n\n```rust\nfn fold_module_item(&mut self, node: ModuleItem) -> ModuleItem {\n  match node {\n    ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl {\n      decl: func @ Decl::Fn(_),\n      ..\n    })) => {\n      return ModuleItem::Stmt(Stmt::Decl(func));\n    },\n    _ => {\n      return node;\n    },\n  }\n}\n```\n\nIt's also not possible to return multiple nodes, so to add or remove nodes (be it statements, variable declarators), also visit the parent and access the array of children (`body` in the case of the module).\n\n```rust\nfn fold_module(&mut self, node: Module) -> Module {\n  let mut res = node.fold_children_with(self);\n  if let Some(foo) = self.something {\n    res.body.insert(0, ast::ModuleItem::Stmt(foo));\n  }\n  res\n}\n```\n\n## Identifiers/scopes\n\nThe type used to represent identifiers is `JsWord` (as opposed to a regular `String` or `&str`). This is a special interned string, to construct it for an arbitrary string, you can use `.into()`. Strings that are part of the hard-coded [list of interned words](https://github.com/swc-project/swc/blob/a8748a9191a249fd2a97207cbcf0c3317b1bc1e3/crates/swc_atoms/words.txt#L1) can be retrieved more efficiently by using the `js_word!` macros, trying to use that macro with a string that is not part of the list results in a compile time error.\n\n```rust\n  let x: JsWord = \"something\".into();\n  let y: JsWord = js_word!(\"require\") // or \"URL\", \"default\", \"eval\", ...\n\n  let ident: Ident; // the ast node\n  ident.sym // the JsWord \"string\"\n  ident.span.ctxt // the syntax context\n```\n\n`@babel/traverse` has the concept of scopes to determine if variables refer to the same binding. swc uses `SyntaxContext` (which is internally just a unique number), with the idea that the pair `(JsWord, SyntaxContext)` refers to the unique (and correct) variable binding (even if there are some `Ident` nodes that have the same string). swc's `hygiene()` visitor then \"flushes\" this information by renaming identifiers to have unique names (which has to happen before codegen because the actual, textual Javascript format of course doesn't know about syntax contexts).\n\nThat means to store a list of variable bindings somewhere (e.g. if you know that it's a top level binding and want to store that information), instead of just `JsWord`, the pair of `(JsWord, SyntaxContext)` should be used. (swc has a type for this pair: `Id`, and `ident.to_id()` is a useful helper here).\n\n## `visit_ident`\n\nNode that the `Ident` visitor function has be used with caution as these nodes are not just identifiers that refer to a variable binding, but any kind of \"name\" in the AST (e.g. when destructuring, for member accesses, private class variables).\n\n```rust\nfn fold_ident(&mut self, node: &Ident) -> Ident {\n  Ident::new(\"foo\".into(), DUMMY_SP)\n}\n// and the other visit, visit_mut variants...\n```\n\nwill result in\n\n```js\nfunction foo(foo) {\n  foo.foo(foo);\n}\nconst foo = {foo: foo};\nclass foo {\n  #foo;\n  foo() {\n    foo(this.#foo);\n  }\n}\n```\n\n## Logic based on existence of an ancestor\n\nIn some cases, it's only necessary to know whether there exists some parent node matching a condition, but it doesn't have to be actually read or modified (e.g. when replacing `this` but only when not inside a function).\n\nA pattern for this use case is a variable on the struct that is modified when this condition changes.\n\n```rust\nstruct Foo {\n  in_function_scope: bool,\n}\n\nimpl Visit for Foo {\n  fn visit_function(&mut self, node: &Function) {\n      let old = self.in_function_scope;\n      self.in_function_scope = true;\n      node.visit_children_with(self);\n      self.in_function_scope = old;\n  }\n\n  fn visit_expr(&mut self, node: &Expr) {\n    if let Expr::This(_this) = node {\n      println!(self.in_function_scope);\n    }\n  }\n}\n```\n"
  },
  {
    "path": "flow-libs/ansi-html.js.flow",
    "content": "// @flow\n\ndeclare module 'ansi-html-community' {\n  declare module.exports: (input: string) => string;\n}\n"
  },
  {
    "path": "flow-libs/babel-core.js.flow",
    "content": "// @flow\n\ndeclare module \"@babel/core\" {\n  import type { Node, File } from \"@babel/types\";\n  import type { Options as ParserOptions } from \"@babel/parser\";\n  import type {\n    Options as GeneratorOptions,\n    SourceMap,\n  } from \"@babel/generator\";\n\n  declare export type MatchPattern =\n    | string\n    | RegExp\n    | ((\n        filename: string | void,\n        context: {| callee: { name: string, ... } |} | void,\n        envName: string\n      ) => boolean);\n\n  declare export type EntryTarget = string | any | Function;\n  declare export type EntryOptions = false | { ... };\n\n  declare export type Entry =\n    | EntryTarget\n    | [EntryTarget, EntryOptions]\n    | [EntryTarget, EntryOptions, string]\n    | ConfigItem;\n\n  declare type Options = {|\n    cwd?: string,\n    caller?: { name: string, ... },\n    filename?: string,\n    filenameRelative?: string,\n    code?: boolean,\n    ast?: boolean,\n    root?: string,\n    rootMode?: \"root\" | \"upward\" | \"upward-optional\",\n    envName?: string,\n    configFile?: string | boolean,\n    babelrc?: boolean,\n    babelrcRoots?: boolean | MatchPattern | Array<MatchPattern>,\n    plugins?: Array<Entry>,\n    presets?: Array<Entry>,\n    extends?: string,\n    env?: { [envKey: string]: Options, ... },\n    overrides?: Array<Options>,\n    test?: MatchPattern | Array<MatchPattern>,\n    include?: MatchPattern | Array<MatchPattern>,\n    exclude?: MatchPattern | Array<MatchPattern>,\n    ignore?: Array<MatchPattern>,\n    only?: Array<MatchPattern>,\n    inputSourceMap?: boolean | SourceMap,\n    sourceMaps?: boolean | \"inline\" | \"both\",\n    sourceFileName?: string,\n    sourceRoot?: string,\n    sourceType?: \"script\" | \"module\" | \"unambiguous\",\n    highlightCode?: boolean,\n    wrapPluginVisitorMethod?: (\n      key: string,\n      nodeType: string,\n      fn: Function\n    ) => Function,\n    parserOpts?: ParserOptions,\n    generatorOpts?: GeneratorOptions,\n    retainLines?: boolean,\n    compact?: boolean | \"auto\",\n    minified?: boolean,\n    auxiliaryCommentBefore?: string,\n    auxiliaryCommentAfter?: string,\n    comments?: boolean,\n    shouldPrintComment?: (value: string) => boolean,\n    moduleIds?: boolean,\n    moduleId?: string,\n    getModuleId?: (name: string) => string,\n    moduleRoot?: string,\n  |};\n  declare type Result = {| code: string, map: ?SourceMap, ast: File, externalDependencies: Set<string> |};\n\n  declare export function transform(\n    code: string,\n    options?: Options,\n    callback: (\n      Error,\n      typeof undefined\n    ) => void | ((typeof undefined, Result) => void)\n  ): void;\n\n  declare export function transformSync(\n    code: string,\n    options?: Options\n  ): Result;\n\n  declare export function transformAsync(\n    code: string,\n    options?: Options\n  ): Promise<Result>;\n\n  declare export function transformFile(\n    code: string,\n    options?: Options,\n    callback: (\n      Error,\n      typeof undefined\n    ) => void | ((typeof undefined, Result) => void)\n  ): void;\n\n  declare export function transformFileSync(\n    code: string,\n    options?: Options\n  ): Result;\n\n  declare export function transformFileAsync(\n    code: string,\n    options?: Options\n  ): Promise<Result>;\n\n  declare export function transformFromAst(\n    ast: Node,\n    code?: string,\n    options?: Options,\n    callback: (\n      Error,\n      typeof undefined\n    ) => void | ((typeof undefined, Result) => void)\n  ): void;\n\n  declare export function transformFromAstSync(\n    ast: Node,\n    code?: string,\n    options?: Options\n  ): Result;\n\n  declare export function transformFromAstAsync(\n    ast: Node,\n    code?: string,\n    options?: Options\n  ): Promise<Result>;\n\n  declare export function parse(\n    code: string,\n    options?: Options,\n    callback: (\n      Error,\n      typeof undefined\n    ) => void | ((typeof undefined, File) => void)\n  ): void;\n\n  declare export function parseSync(code: string, options?: Options): File;\n\n  declare export function parseAsync(\n    code: string,\n    options?: Options\n  ): Promise<File>;\n\n  declare type ConfigItem = {|\n    value: { ... } | Function,\n    options: { ... } | void,\n    dirname: string,\n    name: string | void,\n    file: {| request: string, resolved: string |} | void,\n  |};\n\n  declare export function loadOptions(options?: Options): Options;\n  declare export function loadPartialConfig(options?: Object): any;\n  declare export function loadPartialConfigAsync(options?: Object): Promise<any>;\n  declare export function createConfigItem(\n    value:\n      | string\n      | { ... }\n      | Function\n      | [string | { ... } | Function, { ... } | void],\n    {| dirname?: string, type?: \"preset\" | \"plugin\" |}\n  ): ConfigItem;\n  declare export * as types from \"@babel/types\";\n}\n"
  },
  {
    "path": "flow-libs/babel-generator.js.flow",
    "content": "// @flow strict-local\n\ndeclare module \"@babel/generator\" {\n  import type { Node } from \"@babel/types\";\n\n  declare export type SourceMap = {|\n    version: number,\n    sources: Array<string>,\n    names: Array<string>,\n    mappings: string,\n    sourcesContent: Array<string>,\n  |};\n\n  declare export type Options = {|\n    auxiliaryCommentBefore?: string,\n    auxiliaryCommentAfter?: string,\n    shouldPrintComment?: function,\n    retainLines?: boolean,\n    retainFunctionParens?: boolean,\n    comments?: boolean,\n    compact?: boolean | \"auto\",\n    minified?: boolean,\n    concise?: boolean,\n    filename?: string,\n    jsonCompatibleStrings?: boolean,\n    sourceMaps?: boolean,\n    sourceRoot?: string,\n    sourceFileName?: string,\n  |};\n\n  declare export default (\n    ast: Node,\n    opts?: Options,\n    source?: string\n  ) => {| code: string, map: ?any, rawMappings: ?any |};\n}\n"
  },
  {
    "path": "flow-libs/babel-parser.js.flow",
    "content": "// @flow strict-local\n\ndeclare module '@babel/parser' {\n  import type {File, Expression} from '@babel/types';\n\n  declare export type ParserPlugin =\n    | 'estree'\n    | 'flow'\n    | 'flowComments'\n    | 'jsx'\n    | 'typescript'\n    | 'v8intrinsic'\n    | 'asyncGenerators'\n    | 'bigInt'\n    | 'classProperties'\n    | 'classPrivateProperties'\n    | 'classPrivateMethods'\n    | 'decorators'\n    | 'doExpressions'\n    | 'dynamicImport'\n    | 'exportDefaultFrom'\n    | 'exportNamespaceFrom'\n    | 'functionBind'\n    | 'functionSent'\n    | 'importMeta'\n    | 'logicalAssignment'\n    | 'nullishCoalescingOperator'\n    | 'numericSeparator'\n    | 'objectRestSpread'\n    | 'optionalCatchBinding'\n    | 'optionalChaining'\n    | 'partialApplication'\n    | 'pipelineOperator'\n    | 'throwExpressions'\n    | 'topLevelAwait'\n    | ['moduleAttributes', {|version: string|}];\n\n  declare export type Options = {|\n    allowImportExportEverywhere?: boolean,\n    allowAwaitOutsideFunction?: boolean,\n    allowReturnOutsideFunction?: boolean,\n    allowSuperOutsideMethod?: boolean,\n    allowUndeclaredExports?: boolean,\n    createParenthesizedExpressions?: boolean,\n    errorRecovery?: boolean,\n    plugins?: Array<ParserPlugin>,\n    sourceType?: \"script\" | \"module\" | \"unambiguous\",\n    sourceFilename?: string,\n    startLine?: number,\n    strictMode?: boolean,\n    ranges?: boolean,\n    tokens?: boolean,\n  |};\n\n  declare export function parse(code: string, opts?: Options): File;\n  declare export function parseExpression(\n    code: string,\n    opts?: Options\n  ): Expression;\n}\n"
  },
  {
    "path": "flow-libs/babel-preset-env.js.flow",
    "content": "// @flow strict-local\n\ndeclare module '@babel/preset-env' {\n  declare export type Targets = {\n    browsers?: string | Array<string>,\n    esmodules?: boolean,\n    [string]: string,\n    ...\n  };\n\n  declare export type PresetEnvPlugin = [mixed, mixed];\n\n  declare export default (\n    {assertVersion: () => boolean, ...},\n    {targets: Targets, ...},\n  ) => {plugins: Array<PresetEnvPlugin>, ...};\n}\n"
  },
  {
    "path": "flow-libs/babel-template.js.flow",
    "content": "// @flow strict-local\n\ndeclare module \"@babel/template\" {\n  import type { Program, Expression, Statement, Node } from \"@babel/types\";\n  import type { Options as ParserOptions } from \"@babel/parser\";\n\n  declare type Options = {|\n    ...ParserOptions,\n    syntacticPlaceholders?: boolean,\n    preserveComments?: boolean,\n  |};\n\n  // (R === null) ? () => T : (R) => T\n  declare type Template<\n    R: null | { +[string]: BabelNode | $ReadOnlyArray<BabelNode>, ... },\n    T: BabelNode | Array<Statement>\n  > = $Call<(null => () => T) & (({ ... }) => (replacements: R) => T), R>;\n\n  declare module.exports: {|\n    <R, T>(code: string, opts?: Options): Template<R, T>,\n    smart<R, T>(code: string, opts?: Options): Template<R, T>,\n    statement<R, T: Statement>(code: string, opts?: Options): Template<R, T>,\n    statements<R>(code: string, opts?: Options): Template<R, Array<Statement>>,\n    expression<R, T: Expression>(code: string, opts?: Options): Template<R, T>,\n    program<R, T: Program>(code: string, opts?: Options): Template<R, T>,\n\n    ast(code: string): string,\n    ast(callSite: Array<string>, ...substitutions: Array<string>): string,\n  |};\n}\n"
  },
  {
    "path": "flow-libs/babel-traverse.js.flow",
    "content": "// @flow\ndeclare module \"@babel/traverse\" {\n  import type { Node,\n                Function as BabelFunction,\n                Class as BabelClass,\n                ArrayExpression,\n                AssignmentExpression,\n                BinaryExpression,\n                InterpreterDirective,\n                Directive,\n                DirectiveLiteral,\n                BlockStatement,\n                BreakStatement,\n                CallExpression,\n                CatchClause,\n                ConditionalExpression,\n                ContinueStatement,\n                DebuggerStatement,\n                DoWhileStatement,\n                EmptyStatement,\n                ExpressionStatement,\n                File,\n                ForInStatement,\n                ForStatement,\n                FunctionDeclaration,\n                FunctionExpression,\n                Identifier,\n                IfStatement,\n                LabeledStatement,\n                StringLiteral,\n                NumericLiteral,\n                NullLiteral,\n                BooleanLiteral,\n                RegExpLiteral,\n                LogicalExpression,\n                MemberExpression,\n                NewExpression,\n                Program,\n                ObjectExpression,\n                ObjectMethod,\n                ObjectProperty,\n                RestElement,\n                ReturnStatement,\n                SequenceExpression,\n                ParenthesizedExpression,\n                SwitchCase,\n                SwitchStatement,\n                ThisExpression,\n                ThrowStatement,\n                TryStatement,\n                UnaryExpression,\n                UpdateExpression,\n                VariableDeclaration,\n                VariableDeclarator,\n                WhileStatement,\n                WithStatement,\n                AssignmentPattern,\n                ArrayPattern,\n                ArrowFunctionExpression,\n                ClassBody,\n                ClassExpression,\n                ClassDeclaration,\n                ExportAllDeclaration,\n                ExportDefaultDeclaration,\n                ExportNamedDeclaration,\n                ExportSpecifier,\n                ForOfStatement,\n                ImportDeclaration,\n                ImportDefaultSpecifier,\n                ImportNamespaceSpecifier,\n                ImportSpecifier,\n                MetaProperty,\n                ClassMethod,\n                ObjectPattern,\n                SpreadElement,\n                Super,\n                TaggedTemplateExpression,\n                TemplateElement,\n                TemplateLiteral,\n                YieldExpression,\n                AnyTypeAnnotation,\n                ArrayTypeAnnotation,\n                BooleanTypeAnnotation,\n                BooleanLiteralTypeAnnotation,\n                NullLiteralTypeAnnotation,\n                ClassImplements,\n                DeclareClass,\n                DeclareFunction,\n                DeclareInterface,\n                DeclareModule,\n                DeclareModuleExports,\n                DeclareTypeAlias,\n                DeclareOpaqueType,\n                DeclareVariable,\n                DeclareExportDeclaration,\n                DeclareExportAllDeclaration,\n                DeclaredPredicate,\n                ExistsTypeAnnotation,\n                FunctionTypeAnnotation,\n                FunctionTypeParam,\n                GenericTypeAnnotation,\n                InferredPredicate,\n                InterfaceExtends,\n                InterfaceDeclaration,\n                InterfaceTypeAnnotation,\n                IntersectionTypeAnnotation,\n                MixedTypeAnnotation,\n                EmptyTypeAnnotation,\n                NullableTypeAnnotation,\n                NumberLiteralTypeAnnotation,\n                NumberTypeAnnotation,\n                ObjectTypeAnnotation,\n                ObjectTypeInternalSlot,\n                ObjectTypeCallProperty,\n                ObjectTypeIndexer,\n                ObjectTypeProperty,\n                ObjectTypeSpreadProperty,\n                OpaqueType,\n                QualifiedTypeIdentifier,\n                StringLiteralTypeAnnotation,\n                StringTypeAnnotation,\n                ThisTypeAnnotation,\n                TupleTypeAnnotation,\n                TypeofTypeAnnotation,\n                TypeAlias,\n                TypeAnnotation,\n                TypeCastExpression,\n                TypeParameter,\n                TypeParameterDeclaration,\n                TypeParameterInstantiation,\n                UnionTypeAnnotation,\n                Variance,\n                VoidTypeAnnotation,\n                EnumDeclaration,\n                EnumBooleanBody,\n                EnumNumberBody,\n                EnumStringBody,\n                EnumSymbolBody,\n                EnumBooleanMember,\n                EnumNumberMember,\n                EnumStringMember,\n                EnumDefaultedMember,\n                JSXAttribute,\n                JSXClosingElement,\n                JSXElement,\n                JSXEmptyExpression,\n                JSXExpressionContainer,\n                JSXSpreadChild,\n                JSXIdentifier,\n                JSXMemberExpression,\n                JSXNamespacedName,\n                JSXOpeningElement,\n                JSXSpreadAttribute,\n                JSXText,\n                JSXFragment,\n                JSXOpeningFragment,\n                JSXClosingFragment,\n                Noop,\n                Placeholder,\n                V8IntrinsicIdentifier,\n                ArgumentPlaceholder,\n                AwaitExpression,\n                BindExpression,\n                ClassProperty,\n                OptionalMemberExpression,\n                PipelineTopicExpression,\n                PipelineBareFunction,\n                PipelinePrimaryTopicReference,\n                OptionalCallExpression,\n                ClassPrivateProperty,\n                ClassPrivateMethod,\n                Import,\n                Decorator,\n                DoExpression,\n                ExportDefaultSpecifier,\n                ExportNamespaceSpecifier,\n                PrivateName,\n                BigIntLiteral,\n                TSParameterProperty,\n                TSDeclareFunction,\n                TSDeclareMethod,\n                TSQualifiedName,\n                TSCallSignatureDeclaration,\n                TSConstructSignatureDeclaration,\n                TSPropertySignature,\n                TSMethodSignature,\n                TSIndexSignature,\n                TSAnyKeyword,\n                TSBooleanKeyword,\n                TSBigIntKeyword,\n                TSNeverKeyword,\n                TSNullKeyword,\n                TSNumberKeyword,\n                TSObjectKeyword,\n                TSStringKeyword,\n                TSSymbolKeyword,\n                TSUndefinedKeyword,\n                TSUnknownKeyword,\n                TSVoidKeyword,\n                TSThisType,\n                TSFunctionType,\n                TSConstructorType,\n                TSTypeReference,\n                TSTypePredicate,\n                TSTypeQuery,\n                TSTypeLiteral,\n                TSArrayType,\n                TSTupleType,\n                TSOptionalType,\n                TSRestType,\n                TSUnionType,\n                TSIntersectionType,\n                TSConditionalType,\n                TSInferType,\n                TSParenthesizedType,\n                TSTypeOperator,\n                TSIndexedAccessType,\n                TSMappedType,\n                TSLiteralType,\n                TSExpressionWithTypeArguments,\n                TSInterfaceDeclaration,\n                TSInterfaceBody,\n                TSTypeAliasDeclaration,\n                TSAsExpression,\n                TSTypeAssertion,\n                TSEnumDeclaration,\n                TSEnumMember,\n                TSModuleDeclaration,\n                TSModuleBlock,\n                TSImportType,\n                TSImportEqualsDeclaration,\n                TSExternalModuleReference,\n                TSNonNullExpression,\n                TSExportAssignment,\n                TSNamespaceExportDeclaration,\n                TSTypeAnnotation,\n                TSTypeParameterInstantiation,\n                TSTypeParameterDeclaration,\n                TSTypeParameter,\n                Expression,\n                Binary,\n                Scopable,\n                BlockParent,\n                Block,\n                Statement,\n                Terminatorless,\n                CompletionStatement,\n                Conditional,\n                Loop,\n                While,\n                ExpressionWrapper,\n                For,\n                ForXStatement,\n                FunctionParent,\n                Pureish,\n                Declaration,\n                PatternLike,\n                LVal,\n                TSEntityName,\n                Literal,\n                Immutable,\n                UserWhitespacable,\n                Method,\n                ObjectMember,\n                Property,\n                UnaryLike,\n                Pattern,\n                ModuleDeclaration,\n                ExportDeclaration,\n                ModuleSpecifier,\n                Flow,\n                FlowType,\n                FlowBaseAnnotation,\n                FlowDeclaration,\n                FlowPredicate,\n                EnumBody,\n                EnumMember,\n                JSX,\n                Private,\n                TSTypeElement,\n                TSType } from \"@babel/types\";\n\n  declare export type VariableDeclarationKind =\n    | \"var\"\n    | \"let\"\n    | \"const\"\n    | \"module\"\n    | \"hoisted\";\n\n  declare export interface Binding {\n    block: Node;\n    path: NodePath<\n      | VariableDeclarator\n      | ClassDeclaration\n      | FunctionDeclaration\n      | ModuleSpecifier\n    >;\n    referencePaths: Array<NodePath<Identifier | ExportDefaultDeclaration | ExportNamedDeclaration>>;\n    constantViolations: Array<\n      NodePath<AssignmentExpression | UpdateExpression>\n    >;\n    identifier: Identifier;\n    scope: Scope;\n    kind: VariableDeclarationKind;\n    referenced: boolean;\n    references: number;\n    constant: boolean;\n    reference(NodePath<Identifier | ExportDefaultDeclaration | ExportNamedDeclaration>): void;\n    reassign(NodePath<AssignmentExpression | UpdateExpression>): void;\n    dereference(): void;\n  }\n\n  declare export interface Scope {\n    parent: Scope;\n    path: NodePath<Node>;\n    references: { [string]: boolean, ... };\n    generateUidIdentifier(name?: string): Identifier;\n    generateUid(name?: string): string;\n    rename(oldName: string, newName?: string): void;\n\n    setData(key: string, value: mixed): void;\n    getData(key: string): ?any;\n    removeData(key: string): void;\n\n    getBinding(name: string): ?Binding;\n    getOwnBinding(name: string): ?Binding;\n    getBindingIdentifier(name: string): ?Identifier;\n    getOwnBindingIdentifier(name: string): ?Identifier;\n    hasOwnBinding(name: string): boolean;\n    hasBinding(name: string, noGlobals?: boolean): boolean;\n    parentHasBinding(name: string, noGlobals?: boolean): boolean;\n    removeBinding(name: string): void;\n\n    removeOwnBinding(string): boolean;\n    removeBinding(string): boolean;\n    registerDeclaration(path: NodePath<Declaration>): void;\n    registerBinding(\n      kind: VariableDeclarationKind,\n      path: NodePath<VariableDeclaration | VariableDeclarator>\n    ): void;\n    bindings: {[name: string]: Binding, ...};\n    getAllBindings(): {[name: string]: Binding, ...};\n    getAllBindingsOfKind(...kinds: Array<string>): {[name: string]: Binding, ...};\n    push(opts: {|\n      id: LVal,\n      init?: Expression | null,\n      unique?: boolean,\n      kind?: VariableDeclarationKind\n    |}): void;\n\n    addGlobal(node: Node): void;\n    hasGlobal(name: string): boolean;\n    hasReference(name: string): boolean;\n    isPure(node: Node, constantsOnly?: boolean): boolean;\n\n    crawl(): void;\n    getProgramParent(): Scope;\n    getFunctionParent(): Scope;\n    getBlockParent(): Scope;\n  }\n\n  declare export interface NodePath<+T: Node> {\n    node: T;\n    scope: Scope;\n    parent: Node;\n    parentPath: NodePath<Node>;\n    removed: boolean;\n    key: string;\n    container: ?NodePath<Node> | Array<NodePath<Node>>;\n    get<U: NodePath<Node> | $ReadOnlyArray<NodePath<Node>>>(string): U;\n    getStatementParent(): NodePath<Statement>;\n    findParent(cb: (NodePath<Node>) => boolean): ?NodePath<Node>;\n    find(cb: (NodePath<Node>) => boolean): ?NodePath<Node>;\n    getFunctionParent(): NodePath<BabelFunction>;\n    getAncestry(): Array<NodePath<Node>>;\n    isAncestor(NodePath<Node>): boolean;\n    isDescendant(NodePath<Node>): boolean;\n\n    remove(): void;\n    replaceWith<U: Node>(U): $ReadOnlyArray<NodePath<U>>;\n    replaceWithMultiple<U: Node>(Array<U>): $ReadOnlyArray<NodePath<U>>;\n    insertBefore<U: Node>(\n      Array<U> | U\n    ): $ReadOnlyArray<NodePath<U>>;\n    insertAfter<U: Node>(\n      Array<U> | U\n    ): $ReadOnlyArray<NodePath<U>>;\n    unshiftContainer<U: Node>(\n      string,\n      Array<U> | U\n    ): $ReadOnlyArray<NodePath<U>>;\n    pushContainer<U: Node>(\n      string,\n      Array<U> | U\n    ): $ReadOnlyArray<NodePath<U>>;\n    matchesPattern(\n      match: string | Array<string>,\n      allowPartial?: boolean\n    ): boolean;\n\n    getPrevSibling(): NodePath<Node>;\n    getNextSibling(): NodePath<Node>;\n    getAllNextSiblings(): $ReadOnlyArray<NodePath<Node>>;\n    getAllPrevSiblings(): $ReadOnlyArray<NodePath<Node>>;\n\n    getBindingIdentifiers(\n      duplicates?: boolean\n    ): { [string]: Identifier, ... };\n    getOuterBindingIdentifiers(\n      duplicates?: boolean\n    ): { [string]: Identifier, ... };\n    getBindingIdentifierPaths(\n      duplicates?: boolean,\n      outer?: boolean\n    ): { [string]: NodePath<Identifier>, ... };\n    getOuterBindingIdentifierPaths(\n      duplicates?: boolean\n    ): { [string]: NodePath<Identifier>, ... };\n\n    evaluateTruthy(): ?boolean;\n    evaluate(): {| confident: boolean, value: any |};\n\n    arrowFunctionToExpression({|\n      allowInsertArrow?: boolean,\n      specCompliant?: boolean\n    |}): void;\n    ensureBlock(): BlockStatement;\n\n    addComment(type: string, content: string, line?: boolean): void;\n    addComments(type: string, comments: Array<string>): void;\n\n    setData(string, any): void;\n    getData(string): any;\n\n    isPure(): boolean;\n    isGenerated(): boolean;\n    isUser(): boolean;\n    isVar(): boolean;\n    isBlockScoped(): boolean;\n    isReferenced(): boolean;\n    isScope(): boolean;\n    isBindingIdentifier(): boolean;\n    isReferencedMemberExpression(): boolean;\n\n    traverse<S>(visitor: Visitor<S>, state?: S): void;\n    stop(): void;\n    skip(): void;\n    requeue(pathToQueue?: NodePath<Node>): void;\n\n    isArrayExpression(): boolean;\n    isAssignmentExpression(): boolean;\n    isBinaryExpression(): boolean;\n    isInterpreterDirective(): boolean;\n    isDirective(): boolean;\n    isDirectiveLiteral(): boolean;\n    isBlockStatement(): boolean;\n    isBreakStatement(): boolean;\n    isCallExpression(): boolean;\n    isCatchClause(): boolean;\n    isConditionalExpression(): boolean;\n    isContinueStatement(): boolean;\n    isDebuggerStatement(): boolean;\n    isDoWhileStatement(): boolean;\n    isEmptyStatement(): boolean;\n    isExpressionStatement(): boolean;\n    isFile(): boolean;\n    isForInStatement(): boolean;\n    isForStatement(): boolean;\n    isFunctionDeclaration(): boolean;\n    isFunctionExpression(): boolean;\n    isIdentifier(): boolean;\n    isIfStatement(): boolean;\n    isLabeledStatement(): boolean;\n    isStringLiteral(): boolean;\n    isNumericLiteral(): boolean;\n    isNullLiteral(): boolean;\n    isBooleanLiteral(): boolean;\n    isRegExpLiteral(): boolean;\n    isLogicalExpression(): boolean;\n    isMemberExpression(): boolean;\n    isNewExpression(): boolean;\n    isProgram(): boolean;\n    isObjectExpression(): boolean;\n    isObjectMethod(): boolean;\n    isObjectProperty(): boolean;\n    isRestElement(): boolean;\n    isReturnStatement(): boolean;\n    isSequenceExpression(): boolean;\n    isParenthesizedExpression(): boolean;\n    isSwitchCase(): boolean;\n    isSwitchStatement(): boolean;\n    isThisExpression(): boolean;\n    isThrowStatement(): boolean;\n    isTryStatement(): boolean;\n    isUnaryExpression(): boolean;\n    isUpdateExpression(): boolean;\n    isVariableDeclaration(): boolean;\n    isVariableDeclarator(): boolean;\n    isWhileStatement(): boolean;\n    isWithStatement(): boolean;\n    isAssignmentPattern(): boolean;\n    isArrayPattern(): boolean;\n    isArrowFunctionExpression(): boolean;\n    isClassBody(): boolean;\n    isClassExpression(): boolean;\n    isClassDeclaration(): boolean;\n    isExportAllDeclaration(): boolean;\n    isExportDefaultDeclaration(): boolean;\n    isExportNamedDeclaration(): boolean;\n    isExportSpecifier(): boolean;\n    isForOfStatement(): boolean;\n    isImportDeclaration(): boolean;\n    isImportDefaultSpecifier(): boolean;\n    isImportNamespaceSpecifier(): boolean;\n    isImportSpecifier(): boolean;\n    isMetaProperty(): boolean;\n    isClassMethod(): boolean;\n    isObjectPattern(): boolean;\n    isSpreadElement(): boolean;\n    isSuper(): boolean;\n    isTaggedTemplateExpression(): boolean;\n    isTemplateElement(): boolean;\n    isTemplateLiteral(): boolean;\n    isYieldExpression(): boolean;\n    isAnyTypeAnnotation(): boolean;\n    isArrayTypeAnnotation(): boolean;\n    isBooleanTypeAnnotation(): boolean;\n    isBooleanLiteralTypeAnnotation(): boolean;\n    isNullLiteralTypeAnnotation(): boolean;\n    isClassImplements(): boolean;\n    isDeclareClass(): boolean;\n    isDeclareFunction(): boolean;\n    isDeclareInterface(): boolean;\n    isDeclareModule(): boolean;\n    isDeclareModuleExports(): boolean;\n    isDeclareTypeAlias(): boolean;\n    isDeclareOpaqueType(): boolean;\n    isDeclareVariable(): boolean;\n    isDeclareExportDeclaration(): boolean;\n    isDeclareExportAllDeclaration(): boolean;\n    isDeclaredPredicate(): boolean;\n    isExistsTypeAnnotation(): boolean;\n    isFunctionTypeAnnotation(): boolean;\n    isFunctionTypeParam(): boolean;\n    isGenericTypeAnnotation(): boolean;\n    isInferredPredicate(): boolean;\n    isInterfaceExtends(): boolean;\n    isInterfaceDeclaration(): boolean;\n    isInterfaceTypeAnnotation(): boolean;\n    isIntersectionTypeAnnotation(): boolean;\n    isMixedTypeAnnotation(): boolean;\n    isEmptyTypeAnnotation(): boolean;\n    isNullableTypeAnnotation(): boolean;\n    isNumberLiteralTypeAnnotation(): boolean;\n    isNumberTypeAnnotation(): boolean;\n    isObjectTypeAnnotation(): boolean;\n    isObjectTypeInternalSlot(): boolean;\n    isObjectTypeCallProperty(): boolean;\n    isObjectTypeIndexer(): boolean;\n    isObjectTypeProperty(): boolean;\n    isObjectTypeSpreadProperty(): boolean;\n    isOpaqueType(): boolean;\n    isQualifiedTypeIdentifier(): boolean;\n    isStringLiteralTypeAnnotation(): boolean;\n    isStringTypeAnnotation(): boolean;\n    isThisTypeAnnotation(): boolean;\n    isTupleTypeAnnotation(): boolean;\n    isTypeofTypeAnnotation(): boolean;\n    isTypeAlias(): boolean;\n    isTypeAnnotation(): boolean;\n    isTypeCastExpression(): boolean;\n    isTypeParameter(): boolean;\n    isTypeParameterDeclaration(): boolean;\n    isTypeParameterInstantiation(): boolean;\n    isUnionTypeAnnotation(): boolean;\n    isVariance(): boolean;\n    isVoidTypeAnnotation(): boolean;\n    isEnumDeclaration(): boolean;\n    isEnumBooleanBody(): boolean;\n    isEnumNumberBody(): boolean;\n    isEnumStringBody(): boolean;\n    isEnumSymbolBody(): boolean;\n    isEnumBooleanMember(): boolean;\n    isEnumNumberMember(): boolean;\n    isEnumStringMember(): boolean;\n    isEnumDefaultedMember(): boolean;\n    isJSXAttribute(): boolean;\n    isJSXClosingElement(): boolean;\n    isJSXElement(): boolean;\n    isJSXEmptyExpression(): boolean;\n    isJSXExpressionContainer(): boolean;\n    isJSXSpreadChild(): boolean;\n    isJSXIdentifier(): boolean;\n    isJSXMemberExpression(): boolean;\n    isJSXNamespacedName(): boolean;\n    isJSXOpeningElement(): boolean;\n    isJSXSpreadAttribute(): boolean;\n    isJSXText(): boolean;\n    isJSXFragment(): boolean;\n    isJSXOpeningFragment(): boolean;\n    isJSXClosingFragment(): boolean;\n    isNoop(): boolean;\n    isPlaceholder(): boolean;\n    isV8IntrinsicIdentifier(): boolean;\n    isArgumentPlaceholder(): boolean;\n    isAwaitExpression(): boolean;\n    isBindExpression(): boolean;\n    isClassProperty(): boolean;\n    isOptionalMemberExpression(): boolean;\n    isPipelineTopicExpression(): boolean;\n    isPipelineBareFunction(): boolean;\n    isPipelinePrimaryTopicReference(): boolean;\n    isOptionalCallExpression(): boolean;\n    isClassPrivateProperty(): boolean;\n    isClassPrivateMethod(): boolean;\n    isImport(): boolean;\n    isDecorator(): boolean;\n    isDoExpression(): boolean;\n    isExportDefaultSpecifier(): boolean;\n    isExportNamespaceSpecifier(): boolean;\n    isPrivateName(): boolean;\n    isBigIntLiteral(): boolean;\n    isTSParameterProperty(): boolean;\n    isTSDeclareFunction(): boolean;\n    isTSDeclareMethod(): boolean;\n    isTSQualifiedName(): boolean;\n    isTSCallSignatureDeclaration(): boolean;\n    isTSConstructSignatureDeclaration(): boolean;\n    isTSPropertySignature(): boolean;\n    isTSMethodSignature(): boolean;\n    isTSIndexSignature(): boolean;\n    isTSAnyKeyword(): boolean;\n    isTSBooleanKeyword(): boolean;\n    isTSBigIntKeyword(): boolean;\n    isTSNeverKeyword(): boolean;\n    isTSNullKeyword(): boolean;\n    isTSNumberKeyword(): boolean;\n    isTSObjectKeyword(): boolean;\n    isTSStringKeyword(): boolean;\n    isTSSymbolKeyword(): boolean;\n    isTSUndefinedKeyword(): boolean;\n    isTSUnknownKeyword(): boolean;\n    isTSVoidKeyword(): boolean;\n    isTSThisType(): boolean;\n    isTSFunctionType(): boolean;\n    isTSConstructorType(): boolean;\n    isTSTypeReference(): boolean;\n    isTSTypePredicate(): boolean;\n    isTSTypeQuery(): boolean;\n    isTSTypeLiteral(): boolean;\n    isTSArrayType(): boolean;\n    isTSTupleType(): boolean;\n    isTSOptionalType(): boolean;\n    isTSRestType(): boolean;\n    isTSUnionType(): boolean;\n    isTSIntersectionType(): boolean;\n    isTSConditionalType(): boolean;\n    isTSInferType(): boolean;\n    isTSParenthesizedType(): boolean;\n    isTSTypeOperator(): boolean;\n    isTSIndexedAccessType(): boolean;\n    isTSMappedType(): boolean;\n    isTSLiteralType(): boolean;\n    isTSExpressionWithTypeArguments(): boolean;\n    isTSInterfaceDeclaration(): boolean;\n    isTSInterfaceBody(): boolean;\n    isTSTypeAliasDeclaration(): boolean;\n    isTSAsExpression(): boolean;\n    isTSTypeAssertion(): boolean;\n    isTSEnumDeclaration(): boolean;\n    isTSEnumMember(): boolean;\n    isTSModuleDeclaration(): boolean;\n    isTSModuleBlock(): boolean;\n    isTSImportType(): boolean;\n    isTSImportEqualsDeclaration(): boolean;\n    isTSExternalModuleReference(): boolean;\n    isTSNonNullExpression(): boolean;\n    isTSExportAssignment(): boolean;\n    isTSNamespaceExportDeclaration(): boolean;\n    isTSTypeAnnotation(): boolean;\n    isTSTypeParameterInstantiation(): boolean;\n    isTSTypeParameterDeclaration(): boolean;\n    isTSTypeParameter(): boolean;\n    isExpression(): boolean;\n    isBinary(): boolean;\n    isScopable(): boolean;\n    isBlockParent(): boolean;\n    isBlock(): boolean;\n    isStatement(): boolean;\n    isTerminatorless(): boolean;\n    isCompletionStatement(): boolean;\n    isConditional(): boolean;\n    isLoop(): boolean;\n    isWhile(): boolean;\n    isExpressionWrapper(): boolean;\n    isFor(): boolean;\n    isForXStatement(): boolean;\n    isFunctionParent(): boolean;\n    isFunction(): boolean;\n    isPureish(): boolean;\n    isDeclaration(): boolean;\n    isPatternLike(): boolean;\n    isLVal(): boolean;\n    isTSEntityName(): boolean;\n    isLiteral(): boolean;\n    isImmutable(): boolean;\n    isUserWhitespacable(): boolean;\n    isMethod(): boolean;\n    isObjectMember(): boolean;\n    isProperty(): boolean;\n    isUnaryLike(): boolean;\n    isPattern(): boolean;\n    isModuleDeclaration(): boolean;\n    isExportDeclaration(): boolean;\n    isModuleSpecifier(): boolean;\n    isFlow(): boolean;\n    isFlowType(): boolean;\n    isFlowBaseAnnotation(): boolean;\n    isFlowDeclaration(): boolean;\n    isFlowPredicate(): boolean;\n    isEnumBody(): boolean;\n    isEnumMember(): boolean;\n    isJSX(): boolean;\n    isPrivate(): boolean;\n    isTSTypeElement(): boolean;\n    isTSType(): boolean;\n    isNumberLiteral(): boolean;\n    isRegexLiteral(): boolean;\n    isRestProperty(): boolean;\n    isSpreadProperty(): boolean;\n  }\n  declare export default {|\n    <S>(\n      node: Node,\n      visitor: Visitor<S>,\n      scope?: Object,\n      state?: S,\n      parentPath?: Node\n    ): void,\n    cache: {|\n      clear(): void,\n      clearPath(): void,\n      clearScope(): void\n    |}\n  |};\n\n  declare type VisitorFunc<N: Node, S> = (NodePath<N>, S) => void;\n  declare type SingleVisitor<N: Node, S> =\n    | VisitorFunc<N, S>\n    | {|\n        enter?: VisitorFunc<N, S>,\n        exit?: VisitorFunc<N, S>\n      |};\n\n  declare export type Visitor<S> = {\n    noScope?: boolean,\n    blacklist?: Array<string>,\n    shouldSkip?: (NodePath<Node>) => boolean,\n    ReferencedIdentifier?: SingleVisitor<Identifier, S>,\n    Function?: SingleVisitor<BabelFunction, S>,\n    Class?: SingleVisitor<BabelClass, S>,\n    ArrayExpression?: SingleVisitor<ArrayExpression, S>,\n    AssignmentExpression?: SingleVisitor<AssignmentExpression, S>,\n    BinaryExpression?: SingleVisitor<BinaryExpression, S>,\n    InterpreterDirective?: SingleVisitor<InterpreterDirective, S>,\n    Directive?: SingleVisitor<Directive, S>,\n    DirectiveLiteral?: SingleVisitor<DirectiveLiteral, S>,\n    BlockStatement?: SingleVisitor<BlockStatement, S>,\n    BreakStatement?: SingleVisitor<BreakStatement, S>,\n    CallExpression?: SingleVisitor<CallExpression, S>,\n    CatchClause?: SingleVisitor<CatchClause, S>,\n    ConditionalExpression?: SingleVisitor<ConditionalExpression, S>,\n    ContinueStatement?: SingleVisitor<ContinueStatement, S>,\n    DebuggerStatement?: SingleVisitor<DebuggerStatement, S>,\n    DoWhileStatement?: SingleVisitor<DoWhileStatement, S>,\n    EmptyStatement?: SingleVisitor<EmptyStatement, S>,\n    ExpressionStatement?: SingleVisitor<ExpressionStatement, S>,\n    File?: SingleVisitor<File, S>,\n    ForInStatement?: SingleVisitor<ForInStatement, S>,\n    ForStatement?: SingleVisitor<ForStatement, S>,\n    FunctionDeclaration?: SingleVisitor<FunctionDeclaration, S>,\n    FunctionExpression?: SingleVisitor<FunctionExpression, S>,\n    Identifier?: SingleVisitor<Identifier, S>,\n    IfStatement?: SingleVisitor<IfStatement, S>,\n    LabeledStatement?: SingleVisitor<LabeledStatement, S>,\n    StringLiteral?: SingleVisitor<StringLiteral, S>,\n    NumericLiteral?: SingleVisitor<NumericLiteral, S>,\n    NullLiteral?: SingleVisitor<NullLiteral, S>,\n    BooleanLiteral?: SingleVisitor<BooleanLiteral, S>,\n    RegExpLiteral?: SingleVisitor<RegExpLiteral, S>,\n    LogicalExpression?: SingleVisitor<LogicalExpression, S>,\n    MemberExpression?: SingleVisitor<MemberExpression, S>,\n    NewExpression?: SingleVisitor<NewExpression, S>,\n    Program?: SingleVisitor<Program, S>,\n    ObjectExpression?: SingleVisitor<ObjectExpression, S>,\n    ObjectMethod?: SingleVisitor<ObjectMethod, S>,\n    ObjectProperty?: SingleVisitor<ObjectProperty, S>,\n    RestElement?: SingleVisitor<RestElement, S>,\n    ReturnStatement?: SingleVisitor<ReturnStatement, S>,\n    SequenceExpression?: SingleVisitor<SequenceExpression, S>,\n    ParenthesizedExpression?: SingleVisitor<ParenthesizedExpression, S>,\n    SwitchCase?: SingleVisitor<SwitchCase, S>,\n    SwitchStatement?: SingleVisitor<SwitchStatement, S>,\n    ThisExpression?: SingleVisitor<ThisExpression, S>,\n    ThrowStatement?: SingleVisitor<ThrowStatement, S>,\n    TryStatement?: SingleVisitor<TryStatement, S>,\n    UnaryExpression?: SingleVisitor<UnaryExpression, S>,\n    UpdateExpression?: SingleVisitor<UpdateExpression, S>,\n    VariableDeclaration?: SingleVisitor<VariableDeclaration, S>,\n    VariableDeclarator?: SingleVisitor<VariableDeclarator, S>,\n    WhileStatement?: SingleVisitor<WhileStatement, S>,\n    WithStatement?: SingleVisitor<WithStatement, S>,\n    AssignmentPattern?: SingleVisitor<AssignmentPattern, S>,\n    ArrayPattern?: SingleVisitor<ArrayPattern, S>,\n    ArrowFunctionExpression?: SingleVisitor<ArrowFunctionExpression, S>,\n    ClassBody?: SingleVisitor<ClassBody, S>,\n    ClassExpression?: SingleVisitor<ClassExpression, S>,\n    ClassDeclaration?: SingleVisitor<ClassDeclaration, S>,\n    ExportAllDeclaration?: SingleVisitor<ExportAllDeclaration, S>,\n    ExportDefaultDeclaration?: SingleVisitor<ExportDefaultDeclaration, S>,\n    ExportNamedDeclaration?: SingleVisitor<ExportNamedDeclaration, S>,\n    ExportSpecifier?: SingleVisitor<ExportSpecifier, S>,\n    ForOfStatement?: SingleVisitor<ForOfStatement, S>,\n    ImportDeclaration?: SingleVisitor<ImportDeclaration, S>,\n    ImportDefaultSpecifier?: SingleVisitor<ImportDefaultSpecifier, S>,\n    ImportNamespaceSpecifier?: SingleVisitor<ImportNamespaceSpecifier, S>,\n    ImportSpecifier?: SingleVisitor<ImportSpecifier, S>,\n    MetaProperty?: SingleVisitor<MetaProperty, S>,\n    ClassMethod?: SingleVisitor<ClassMethod, S>,\n    ObjectPattern?: SingleVisitor<ObjectPattern, S>,\n    SpreadElement?: SingleVisitor<SpreadElement, S>,\n    Super?: SingleVisitor<Super, S>,\n    TaggedTemplateExpression?: SingleVisitor<TaggedTemplateExpression, S>,\n    TemplateElement?: SingleVisitor<TemplateElement, S>,\n    TemplateLiteral?: SingleVisitor<TemplateLiteral, S>,\n    YieldExpression?: SingleVisitor<YieldExpression, S>,\n    AnyTypeAnnotation?: SingleVisitor<AnyTypeAnnotation, S>,\n    ArrayTypeAnnotation?: SingleVisitor<ArrayTypeAnnotation, S>,\n    BooleanTypeAnnotation?: SingleVisitor<BooleanTypeAnnotation, S>,\n    BooleanLiteralTypeAnnotation?: SingleVisitor<BooleanLiteralTypeAnnotation, S>,\n    NullLiteralTypeAnnotation?: SingleVisitor<NullLiteralTypeAnnotation, S>,\n    ClassImplements?: SingleVisitor<ClassImplements, S>,\n    DeclareClass?: SingleVisitor<DeclareClass, S>,\n    DeclareFunction?: SingleVisitor<DeclareFunction, S>,\n    DeclareInterface?: SingleVisitor<DeclareInterface, S>,\n    DeclareModule?: SingleVisitor<DeclareModule, S>,\n    DeclareModuleExports?: SingleVisitor<DeclareModuleExports, S>,\n    DeclareTypeAlias?: SingleVisitor<DeclareTypeAlias, S>,\n    DeclareOpaqueType?: SingleVisitor<DeclareOpaqueType, S>,\n    DeclareVariable?: SingleVisitor<DeclareVariable, S>,\n    DeclareExportDeclaration?: SingleVisitor<DeclareExportDeclaration, S>,\n    DeclareExportAllDeclaration?: SingleVisitor<DeclareExportAllDeclaration, S>,\n    DeclaredPredicate?: SingleVisitor<DeclaredPredicate, S>,\n    ExistsTypeAnnotation?: SingleVisitor<ExistsTypeAnnotation, S>,\n    FunctionTypeAnnotation?: SingleVisitor<FunctionTypeAnnotation, S>,\n    FunctionTypeParam?: SingleVisitor<FunctionTypeParam, S>,\n    GenericTypeAnnotation?: SingleVisitor<GenericTypeAnnotation, S>,\n    InferredPredicate?: SingleVisitor<InferredPredicate, S>,\n    InterfaceExtends?: SingleVisitor<InterfaceExtends, S>,\n    InterfaceDeclaration?: SingleVisitor<InterfaceDeclaration, S>,\n    InterfaceTypeAnnotation?: SingleVisitor<InterfaceTypeAnnotation, S>,\n    IntersectionTypeAnnotation?: SingleVisitor<IntersectionTypeAnnotation, S>,\n    MixedTypeAnnotation?: SingleVisitor<MixedTypeAnnotation, S>,\n    EmptyTypeAnnotation?: SingleVisitor<EmptyTypeAnnotation, S>,\n    NullableTypeAnnotation?: SingleVisitor<NullableTypeAnnotation, S>,\n    NumberLiteralTypeAnnotation?: SingleVisitor<NumberLiteralTypeAnnotation, S>,\n    NumberTypeAnnotation?: SingleVisitor<NumberTypeAnnotation, S>,\n    ObjectTypeAnnotation?: SingleVisitor<ObjectTypeAnnotation, S>,\n    ObjectTypeInternalSlot?: SingleVisitor<ObjectTypeInternalSlot, S>,\n    ObjectTypeCallProperty?: SingleVisitor<ObjectTypeCallProperty, S>,\n    ObjectTypeIndexer?: SingleVisitor<ObjectTypeIndexer, S>,\n    ObjectTypeProperty?: SingleVisitor<ObjectTypeProperty, S>,\n    ObjectTypeSpreadProperty?: SingleVisitor<ObjectTypeSpreadProperty, S>,\n    OpaqueType?: SingleVisitor<OpaqueType, S>,\n    QualifiedTypeIdentifier?: SingleVisitor<QualifiedTypeIdentifier, S>,\n    StringLiteralTypeAnnotation?: SingleVisitor<StringLiteralTypeAnnotation, S>,\n    StringTypeAnnotation?: SingleVisitor<StringTypeAnnotation, S>,\n    ThisTypeAnnotation?: SingleVisitor<ThisTypeAnnotation, S>,\n    TupleTypeAnnotation?: SingleVisitor<TupleTypeAnnotation, S>,\n    TypeofTypeAnnotation?: SingleVisitor<TypeofTypeAnnotation, S>,\n    TypeAlias?: SingleVisitor<TypeAlias, S>,\n    TypeAnnotation?: SingleVisitor<TypeAnnotation, S>,\n    TypeCastExpression?: SingleVisitor<TypeCastExpression, S>,\n    TypeParameter?: SingleVisitor<TypeParameter, S>,\n    TypeParameterDeclaration?: SingleVisitor<TypeParameterDeclaration, S>,\n    TypeParameterInstantiation?: SingleVisitor<TypeParameterInstantiation, S>,\n    UnionTypeAnnotation?: SingleVisitor<UnionTypeAnnotation, S>,\n    Variance?: SingleVisitor<Variance, S>,\n    VoidTypeAnnotation?: SingleVisitor<VoidTypeAnnotation, S>,\n    EnumDeclaration?: SingleVisitor<EnumDeclaration, S>,\n    EnumBooleanBody?: SingleVisitor<EnumBooleanBody, S>,\n    EnumNumberBody?: SingleVisitor<EnumNumberBody, S>,\n    EnumStringBody?: SingleVisitor<EnumStringBody, S>,\n    EnumSymbolBody?: SingleVisitor<EnumSymbolBody, S>,\n    EnumBooleanMember?: SingleVisitor<EnumBooleanMember, S>,\n    EnumNumberMember?: SingleVisitor<EnumNumberMember, S>,\n    EnumStringMember?: SingleVisitor<EnumStringMember, S>,\n    EnumDefaultedMember?: SingleVisitor<EnumDefaultedMember, S>,\n    JSXAttribute?: SingleVisitor<JSXAttribute, S>,\n    JSXClosingElement?: SingleVisitor<JSXClosingElement, S>,\n    JSXElement?: SingleVisitor<JSXElement, S>,\n    JSXEmptyExpression?: SingleVisitor<JSXEmptyExpression, S>,\n    JSXExpressionContainer?: SingleVisitor<JSXExpressionContainer, S>,\n    JSXSpreadChild?: SingleVisitor<JSXSpreadChild, S>,\n    JSXIdentifier?: SingleVisitor<JSXIdentifier, S>,\n    JSXMemberExpression?: SingleVisitor<JSXMemberExpression, S>,\n    JSXNamespacedName?: SingleVisitor<JSXNamespacedName, S>,\n    JSXOpeningElement?: SingleVisitor<JSXOpeningElement, S>,\n    JSXSpreadAttribute?: SingleVisitor<JSXSpreadAttribute, S>,\n    JSXText?: SingleVisitor<JSXText, S>,\n    JSXFragment?: SingleVisitor<JSXFragment, S>,\n    JSXOpeningFragment?: SingleVisitor<JSXOpeningFragment, S>,\n    JSXClosingFragment?: SingleVisitor<JSXClosingFragment, S>,\n    Noop?: SingleVisitor<Noop, S>,\n    Placeholder?: SingleVisitor<Placeholder, S>,\n    V8IntrinsicIdentifier?: SingleVisitor<V8IntrinsicIdentifier, S>,\n    ArgumentPlaceholder?: SingleVisitor<ArgumentPlaceholder, S>,\n    AwaitExpression?: SingleVisitor<AwaitExpression, S>,\n    BindExpression?: SingleVisitor<BindExpression, S>,\n    ClassProperty?: SingleVisitor<ClassProperty, S>,\n    OptionalMemberExpression?: SingleVisitor<OptionalMemberExpression, S>,\n    PipelineTopicExpression?: SingleVisitor<PipelineTopicExpression, S>,\n    PipelineBareFunction?: SingleVisitor<PipelineBareFunction, S>,\n    PipelinePrimaryTopicReference?: SingleVisitor<PipelinePrimaryTopicReference, S>,\n    OptionalCallExpression?: SingleVisitor<OptionalCallExpression, S>,\n    ClassPrivateProperty?: SingleVisitor<ClassPrivateProperty, S>,\n    ClassPrivateMethod?: SingleVisitor<ClassPrivateMethod, S>,\n    Import?: SingleVisitor<Import, S>,\n    Decorator?: SingleVisitor<Decorator, S>,\n    DoExpression?: SingleVisitor<DoExpression, S>,\n    ExportDefaultSpecifier?: SingleVisitor<ExportDefaultSpecifier, S>,\n    ExportNamespaceSpecifier?: SingleVisitor<ExportNamespaceSpecifier, S>,\n    PrivateName?: SingleVisitor<PrivateName, S>,\n    BigIntLiteral?: SingleVisitor<BigIntLiteral, S>,\n    TSParameterProperty?: SingleVisitor<TSParameterProperty, S>,\n    TSDeclareFunction?: SingleVisitor<TSDeclareFunction, S>,\n    TSDeclareMethod?: SingleVisitor<TSDeclareMethod, S>,\n    TSQualifiedName?: SingleVisitor<TSQualifiedName, S>,\n    TSCallSignatureDeclaration?: SingleVisitor<TSCallSignatureDeclaration, S>,\n    TSConstructSignatureDeclaration?: SingleVisitor<TSConstructSignatureDeclaration, S>,\n    TSPropertySignature?: SingleVisitor<TSPropertySignature, S>,\n    TSMethodSignature?: SingleVisitor<TSMethodSignature, S>,\n    TSIndexSignature?: SingleVisitor<TSIndexSignature, S>,\n    TSAnyKeyword?: SingleVisitor<TSAnyKeyword, S>,\n    TSBooleanKeyword?: SingleVisitor<TSBooleanKeyword, S>,\n    TSBigIntKeyword?: SingleVisitor<TSBigIntKeyword, S>,\n    TSNeverKeyword?: SingleVisitor<TSNeverKeyword, S>,\n    TSNullKeyword?: SingleVisitor<TSNullKeyword, S>,\n    TSNumberKeyword?: SingleVisitor<TSNumberKeyword, S>,\n    TSObjectKeyword?: SingleVisitor<TSObjectKeyword, S>,\n    TSStringKeyword?: SingleVisitor<TSStringKeyword, S>,\n    TSSymbolKeyword?: SingleVisitor<TSSymbolKeyword, S>,\n    TSUndefinedKeyword?: SingleVisitor<TSUndefinedKeyword, S>,\n    TSUnknownKeyword?: SingleVisitor<TSUnknownKeyword, S>,\n    TSVoidKeyword?: SingleVisitor<TSVoidKeyword, S>,\n    TSThisType?: SingleVisitor<TSThisType, S>,\n    TSFunctionType?: SingleVisitor<TSFunctionType, S>,\n    TSConstructorType?: SingleVisitor<TSConstructorType, S>,\n    TSTypeReference?: SingleVisitor<TSTypeReference, S>,\n    TSTypePredicate?: SingleVisitor<TSTypePredicate, S>,\n    TSTypeQuery?: SingleVisitor<TSTypeQuery, S>,\n    TSTypeLiteral?: SingleVisitor<TSTypeLiteral, S>,\n    TSArrayType?: SingleVisitor<TSArrayType, S>,\n    TSTupleType?: SingleVisitor<TSTupleType, S>,\n    TSOptionalType?: SingleVisitor<TSOptionalType, S>,\n    TSRestType?: SingleVisitor<TSRestType, S>,\n    TSUnionType?: SingleVisitor<TSUnionType, S>,\n    TSIntersectionType?: SingleVisitor<TSIntersectionType, S>,\n    TSConditionalType?: SingleVisitor<TSConditionalType, S>,\n    TSInferType?: SingleVisitor<TSInferType, S>,\n    TSParenthesizedType?: SingleVisitor<TSParenthesizedType, S>,\n    TSTypeOperator?: SingleVisitor<TSTypeOperator, S>,\n    TSIndexedAccessType?: SingleVisitor<TSIndexedAccessType, S>,\n    TSMappedType?: SingleVisitor<TSMappedType, S>,\n    TSLiteralType?: SingleVisitor<TSLiteralType, S>,\n    TSExpressionWithTypeArguments?: SingleVisitor<TSExpressionWithTypeArguments, S>,\n    TSInterfaceDeclaration?: SingleVisitor<TSInterfaceDeclaration, S>,\n    TSInterfaceBody?: SingleVisitor<TSInterfaceBody, S>,\n    TSTypeAliasDeclaration?: SingleVisitor<TSTypeAliasDeclaration, S>,\n    TSAsExpression?: SingleVisitor<TSAsExpression, S>,\n    TSTypeAssertion?: SingleVisitor<TSTypeAssertion, S>,\n    TSEnumDeclaration?: SingleVisitor<TSEnumDeclaration, S>,\n    TSEnumMember?: SingleVisitor<TSEnumMember, S>,\n    TSModuleDeclaration?: SingleVisitor<TSModuleDeclaration, S>,\n    TSModuleBlock?: SingleVisitor<TSModuleBlock, S>,\n    TSImportType?: SingleVisitor<TSImportType, S>,\n    TSImportEqualsDeclaration?: SingleVisitor<TSImportEqualsDeclaration, S>,\n    TSExternalModuleReference?: SingleVisitor<TSExternalModuleReference, S>,\n    TSNonNullExpression?: SingleVisitor<TSNonNullExpression, S>,\n    TSExportAssignment?: SingleVisitor<TSExportAssignment, S>,\n    TSNamespaceExportDeclaration?: SingleVisitor<TSNamespaceExportDeclaration, S>,\n    TSTypeAnnotation?: SingleVisitor<TSTypeAnnotation, S>,\n    TSTypeParameterInstantiation?: SingleVisitor<TSTypeParameterInstantiation, S>,\n    TSTypeParameterDeclaration?: SingleVisitor<TSTypeParameterDeclaration, S>,\n    TSTypeParameter?: SingleVisitor<TSTypeParameter, S>,\n    Expression?: SingleVisitor<Expression, S>,\n    Binary?: SingleVisitor<Binary, S>,\n    Scopable?: SingleVisitor<Scopable, S>,\n    BlockParent?: SingleVisitor<BlockParent, S>,\n    Block?: SingleVisitor<Block, S>,\n    Statement?: SingleVisitor<Statement, S>,\n    Terminatorless?: SingleVisitor<Terminatorless, S>,\n    CompletionStatement?: SingleVisitor<CompletionStatement, S>,\n    Conditional?: SingleVisitor<Conditional, S>,\n    Loop?: SingleVisitor<Loop, S>,\n    While?: SingleVisitor<While, S>,\n    ExpressionWrapper?: SingleVisitor<ExpressionWrapper, S>,\n    For?: SingleVisitor<For, S>,\n    ForXStatement?: SingleVisitor<ForXStatement, S>,\n    FunctionParent?: SingleVisitor<FunctionParent, S>,\n    Pureish?: SingleVisitor<Pureish, S>,\n    Declaration?: SingleVisitor<Declaration, S>,\n    PatternLike?: SingleVisitor<PatternLike, S>,\n    LVal?: SingleVisitor<LVal, S>,\n    TSEntityName?: SingleVisitor<TSEntityName, S>,\n    Literal?: SingleVisitor<Literal, S>,\n    Immutable?: SingleVisitor<Immutable, S>,\n    UserWhitespacable?: SingleVisitor<UserWhitespacable, S>,\n    Method?: SingleVisitor<Method, S>,\n    ObjectMember?: SingleVisitor<ObjectMember, S>,\n    Property?: SingleVisitor<Property, S>,\n    UnaryLike?: SingleVisitor<UnaryLike, S>,\n    Pattern?: SingleVisitor<Pattern, S>,\n    ModuleDeclaration?: SingleVisitor<ModuleDeclaration, S>,\n    ExportDeclaration?: SingleVisitor<ExportDeclaration, S>,\n    ModuleSpecifier?: SingleVisitor<ModuleSpecifier, S>,\n    Flow?: SingleVisitor<Flow, S>,\n    FlowType?: SingleVisitor<FlowType, S>,\n    FlowBaseAnnotation?: SingleVisitor<FlowBaseAnnotation, S>,\n    FlowDeclaration?: SingleVisitor<FlowDeclaration, S>,\n    FlowPredicate?: SingleVisitor<FlowPredicate, S>,\n    EnumBody?: SingleVisitor<EnumBody, S>,\n    EnumMember?: SingleVisitor<EnumMember, S>,\n    JSX?: SingleVisitor<JSX, S>,\n    Private?: SingleVisitor<Private, S>,\n    TSTypeElement?: SingleVisitor<TSTypeElement, S>,\n    TSType?: SingleVisitor<TSType, S>,\n    NumberLiteral?: SingleVisitor<Node, S>,\n    RegexLiteral?: SingleVisitor<Node, S>,\n    RestProperty?: SingleVisitor<Node, S>,\n    SpreadProperty?: SingleVisitor<Node, S>,\n    [string]: SingleVisitor<Node, S>,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/babel-types.js.flow",
    "content": "// @flow strict-local\n// NOTE: This file is autogenerated. Do not modify.\n// See packages/babel-types/scripts/generators/flow.js for script used.\n\n\ndeclare class BabelNodeComment {\n  value: string;\n  start?: number;\n  end?: number;\n  loc?: BabelNodeSourceLocation;\n}\n\ndeclare class BabelNodeCommentBlock extends BabelNodeComment {\n  type: \"CommentBlock\";\n}\n\ndeclare class BabelNodeCommentLine extends BabelNodeComment {\n  type: \"CommentLine\";\n}\n\ndeclare type BabelNodeSourceLocation = {|\n  filename: ?string;\n\n  start: {|\n    line: number;\n    column: number;\n  |};\n\n  end: {|\n    line: number;\n    column: number;\n  |};\n|}\n\ndeclare class BabelNode {\n  leadingComments?: Array<BabelNodeComment>;\n  innerComments?: Array<BabelNodeComment>;\n  trailingComments?: Array<BabelNodeComment>;\n  start: ?number;\n  end: ?number;\n  loc: ?BabelNodeSourceLocation;\n  +type: string;\n}\n\ndeclare class BabelNodeArrayExpression extends BabelNode {\n  type: \"ArrayExpression\";\n  elements: Array<null | BabelNodeExpression | BabelNodeSpreadElement>;\n}\n\ndeclare class BabelNodeAssignmentExpression extends BabelNode {\n  type: \"AssignmentExpression\";\n  operator: string;\n  left: BabelNodeLVal;\n  right: BabelNodeExpression;\n}\n\ndeclare class BabelNodeBinaryExpression extends BabelNode {\n  type: \"BinaryExpression\";\n  operator: \"+\" | \"-\" | \"/\" | \"%\" | \"*\" | \"**\" | \"&\" | \"|\" | \">>\" | \">>>\" | \"<<\" | \"^\" | \"==\" | \"===\" | \"!=\" | \"!==\" | \"in\" | \"instanceof\" | \">\" | \"<\" | \">=\" | \"<=\";\n  left: BabelNodeExpression;\n  right: BabelNodeExpression;\n}\n\ndeclare class BabelNodeInterpreterDirective extends BabelNode {\n  type: \"InterpreterDirective\";\n  value: string;\n}\n\ndeclare class BabelNodeDirective extends BabelNode {\n  type: \"Directive\";\n  value: BabelNodeDirectiveLiteral;\n}\n\ndeclare class BabelNodeDirectiveLiteral extends BabelNode {\n  type: \"DirectiveLiteral\";\n  value: string;\n}\n\ndeclare class BabelNodeBlockStatement extends BabelNode {\n  type: \"BlockStatement\";\n  body: Array<BabelNodeStatement>;\n  directives: Array<BabelNodeDirective>;\n}\n\ndeclare class BabelNodeBreakStatement extends BabelNode {\n  type: \"BreakStatement\";\n  label?: ?BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeCallExpression extends BabelNode {\n  type: \"CallExpression\";\n  callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier;\n  arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>;\n  optional?: ?true | false;\n  typeArguments?: ?BabelNodeTypeParameterInstantiation;\n  typeParameters?: ?BabelNodeTSTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeCatchClause extends BabelNode {\n  type: \"CatchClause\";\n  param?: ?BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern;\n  body: BabelNodeBlockStatement;\n}\n\ndeclare class BabelNodeConditionalExpression extends BabelNode {\n  type: \"ConditionalExpression\";\n  test: BabelNodeExpression;\n  consequent: BabelNodeExpression;\n  alternate: BabelNodeExpression;\n}\n\ndeclare class BabelNodeContinueStatement extends BabelNode {\n  type: \"ContinueStatement\";\n  label?: ?BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeDebuggerStatement extends BabelNode {\n  type: \"DebuggerStatement\";\n}\n\ndeclare class BabelNodeDoWhileStatement extends BabelNode {\n  type: \"DoWhileStatement\";\n  test: BabelNodeExpression;\n  body: BabelNodeStatement;\n}\n\ndeclare class BabelNodeEmptyStatement extends BabelNode {\n  type: \"EmptyStatement\";\n}\n\ndeclare class BabelNodeExpressionStatement extends BabelNode {\n  type: \"ExpressionStatement\";\n  expression: BabelNodeExpression;\n}\n\ndeclare class BabelNodeFile extends BabelNode {\n  type: \"File\";\n  program: BabelNodeProgram;\n  comments: any;\n  tokens: any;\n}\n\ndeclare class BabelNodeForInStatement extends BabelNode {\n  type: \"ForInStatement\";\n  left: BabelNodeVariableDeclaration | BabelNodeLVal;\n  right: BabelNodeExpression;\n  body: BabelNodeStatement;\n}\n\ndeclare class BabelNodeForStatement extends BabelNode {\n  type: \"ForStatement\";\n  init?: ?BabelNodeVariableDeclaration | BabelNodeExpression;\n  test?: ?BabelNodeExpression;\n  update?: ?BabelNodeExpression;\n  body: BabelNodeStatement;\n}\n\ndeclare class BabelNodeFunctionDeclaration extends BabelNode {\n  type: \"FunctionDeclaration\";\n  id?: ?BabelNodeIdentifier;\n  params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;\n  body: BabelNodeBlockStatement;\n  generator?: ?boolean;\n  async?: ?boolean;\n  declare?: ?boolean;\n  returnType?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;\n}\n\ndeclare class BabelNodeFunctionExpression extends BabelNode {\n  type: \"FunctionExpression\";\n  id?: ?BabelNodeIdentifier;\n  params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;\n  body: BabelNodeBlockStatement;\n  generator?: ?boolean;\n  async?: ?boolean;\n  returnType?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;\n}\n\ndeclare class BabelNodeIdentifier extends BabelNode {\n  type: \"Identifier\";\n  name: string;\n  decorators: Array<BabelNodeDecorator>;\n  optional?: ?boolean;\n  typeAnnotation?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n}\n\ndeclare class BabelNodeIfStatement extends BabelNode {\n  type: \"IfStatement\";\n  test: BabelNodeExpression;\n  consequent: BabelNodeStatement;\n  alternate?: ?BabelNodeStatement;\n}\n\ndeclare class BabelNodeLabeledStatement extends BabelNode {\n  type: \"LabeledStatement\";\n  label: BabelNodeIdentifier;\n  body: BabelNodeStatement;\n}\n\ndeclare class BabelNodeStringLiteral extends BabelNode {\n  type: \"StringLiteral\";\n  value: string;\n}\n\ndeclare class BabelNodeNumericLiteral extends BabelNode {\n  type: \"NumericLiteral\";\n  value: number;\n}\n\ndeclare class BabelNodeNullLiteral extends BabelNode {\n  type: \"NullLiteral\";\n}\n\ndeclare class BabelNodeBooleanLiteral extends BabelNode {\n  type: \"BooleanLiteral\";\n  value: boolean;\n}\n\ndeclare class BabelNodeRegExpLiteral extends BabelNode {\n  type: \"RegExpLiteral\";\n  pattern: string;\n  flags?: ?any;\n}\n\ndeclare class BabelNodeLogicalExpression extends BabelNode {\n  type: \"LogicalExpression\";\n  operator: \"||\" | \"&&\" | \"??\";\n  left: BabelNodeExpression;\n  right: BabelNodeExpression;\n}\n\ndeclare class BabelNodeMemberExpression extends BabelNode {\n  type: \"MemberExpression\";\n  object: BabelNodeExpression;\n  property: BabelNodeExpression | BabelNodeIdentifier;\n  computed?: ?boolean;\n  optional?: ?true | false;\n}\n\ndeclare class BabelNodeNewExpression extends BabelNode {\n  type: \"NewExpression\";\n  callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier;\n  arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>;\n  optional?: ?true | false;\n  typeArguments?: ?BabelNodeTypeParameterInstantiation;\n  typeParameters?: ?BabelNodeTSTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeProgram extends BabelNode {\n  type: \"Program\";\n  body: Array<BabelNodeStatement>;\n  directives: Array<BabelNodeDirective>;\n  sourceType?: ?\"script\" | \"module\";\n  interpreter?: ?BabelNodeInterpreterDirective;\n  sourceFile: string;\n}\n\ndeclare class BabelNodeObjectExpression extends BabelNode {\n  type: \"ObjectExpression\";\n  properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>;\n}\n\ndeclare class BabelNodeObjectMethod extends BabelNode {\n  type: \"ObjectMethod\";\n  kind?: ?\"method\" | \"get\" | \"set\";\n  key: any;\n  params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;\n  body: BabelNodeBlockStatement;\n  computed?: ?boolean;\n  generator?: ?boolean;\n  async?: ?boolean;\n  decorators: Array<BabelNodeDecorator>;\n  returnType?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;\n}\n\ndeclare class BabelNodeObjectProperty extends BabelNode {\n  type: \"ObjectProperty\";\n  key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeLiteral;\n  value: BabelNodeExpression | BabelNodePatternLike;\n  computed?: ?boolean;\n  shorthand?: ?any;\n  decorators: Array<BabelNodeDecorator>;\n}\n\ndeclare class BabelNodeRestElement extends BabelNode {\n  type: \"RestElement\";\n  argument: BabelNodeLVal;\n  decorators: Array<BabelNodeDecorator>;\n  typeAnnotation?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n}\n\ndeclare class BabelNodeReturnStatement extends BabelNode {\n  type: \"ReturnStatement\";\n  argument?: ?BabelNodeExpression;\n}\n\ndeclare class BabelNodeSequenceExpression extends BabelNode {\n  type: \"SequenceExpression\";\n  expressions: Array<BabelNodeExpression>;\n}\n\ndeclare class BabelNodeParenthesizedExpression extends BabelNode {\n  type: \"ParenthesizedExpression\";\n  expression: BabelNodeExpression;\n}\n\ndeclare class BabelNodeSwitchCase extends BabelNode {\n  type: \"SwitchCase\";\n  test?: ?BabelNodeExpression;\n  consequent: Array<BabelNodeStatement>;\n}\n\ndeclare class BabelNodeSwitchStatement extends BabelNode {\n  type: \"SwitchStatement\";\n  discriminant: BabelNodeExpression;\n  cases: Array<BabelNodeSwitchCase>;\n}\n\ndeclare class BabelNodeThisExpression extends BabelNode {\n  type: \"ThisExpression\";\n}\n\ndeclare class BabelNodeThrowStatement extends BabelNode {\n  type: \"ThrowStatement\";\n  argument: BabelNodeExpression;\n}\n\ndeclare class BabelNodeTryStatement extends BabelNode {\n  type: \"TryStatement\";\n  block: any;\n  handler?: ?BabelNodeCatchClause;\n  finalizer?: ?BabelNodeBlockStatement;\n}\n\ndeclare class BabelNodeUnaryExpression extends BabelNode {\n  type: \"UnaryExpression\";\n  operator: \"void\" | \"throw\" | \"delete\" | \"!\" | \"+\" | \"-\" | \"~\" | \"typeof\";\n  argument: BabelNodeExpression;\n  prefix?: ?boolean;\n}\n\ndeclare class BabelNodeUpdateExpression extends BabelNode {\n  type: \"UpdateExpression\";\n  operator: \"++\" | \"--\";\n  argument: BabelNodeExpression;\n  prefix?: ?boolean;\n}\n\ndeclare class BabelNodeVariableDeclaration extends BabelNode {\n  type: \"VariableDeclaration\";\n  kind: \"var\" | \"let\" | \"const\";\n  declarations: Array<BabelNodeVariableDeclarator>;\n  declare?: ?boolean;\n}\n\ndeclare class BabelNodeVariableDeclarator extends BabelNode {\n  type: \"VariableDeclarator\";\n  id: BabelNodeLVal;\n  init?: ?BabelNodeExpression;\n  definite?: ?boolean;\n}\n\ndeclare class BabelNodeWhileStatement extends BabelNode {\n  type: \"WhileStatement\";\n  test: BabelNodeExpression;\n  body: BabelNodeStatement;\n}\n\ndeclare class BabelNodeWithStatement extends BabelNode {\n  type: \"WithStatement\";\n  object: BabelNodeExpression;\n  body: BabelNodeStatement;\n}\n\ndeclare class BabelNodeAssignmentPattern extends BabelNode {\n  type: \"AssignmentPattern\";\n  left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression;\n  right: BabelNodeExpression;\n  decorators: Array<BabelNodeDecorator>;\n  typeAnnotation?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n}\n\ndeclare class BabelNodeArrayPattern extends BabelNode {\n  type: \"ArrayPattern\";\n  elements: Array<null | BabelNodePatternLike>;\n  decorators: Array<BabelNodeDecorator>;\n  typeAnnotation?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n}\n\ndeclare class BabelNodeArrowFunctionExpression extends BabelNode {\n  type: \"ArrowFunctionExpression\";\n  params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;\n  body: BabelNodeBlockStatement | BabelNodeExpression;\n  async?: ?boolean;\n  expression: boolean;\n  generator?: ?boolean;\n  returnType?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;\n}\n\ndeclare class BabelNodeClassBody extends BabelNode {\n  type: \"ClassBody\";\n  body: Array<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature>;\n}\n\ndeclare class BabelNodeClassExpression extends BabelNode {\n  type: \"ClassExpression\";\n  id?: ?BabelNodeIdentifier;\n  superClass?: ?BabelNodeExpression;\n  body: BabelNodeClassBody;\n  decorators: Array<BabelNodeDecorator>;\n  mixins: any;\n  superTypeParameters?: ?BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;\n}\n\ndeclare class BabelNodeClassDeclaration extends BabelNode {\n  type: \"ClassDeclaration\";\n  id: ?BabelNodeIdentifier;\n  superClass: any;\n  body: any;\n  decorators: any;\n  abstract?: ?boolean;\n  declare?: ?boolean;\n  mixins: any;\n  superTypeParameters: any;\n  typeParameters: any;\n}\n\ndeclare class BabelNodeExportAllDeclaration extends BabelNode {\n  type: \"ExportAllDeclaration\";\n  source: BabelNodeStringLiteral;\n}\n\ndeclare class BabelNodeExportDefaultDeclaration extends BabelNode {\n  type: \"ExportDefaultDeclaration\";\n  declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression;\n}\n\ndeclare class BabelNodeExportNamedDeclaration extends BabelNode {\n  type: \"ExportNamedDeclaration\";\n  declaration?: ?any;\n  specifiers: Array<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>;\n  source?: ?BabelNodeStringLiteral;\n  exportKind?: ?\"type\" | \"value\";\n}\n\ndeclare class BabelNodeExportSpecifier extends BabelNode {\n  type: \"ExportSpecifier\";\n  local: BabelNodeIdentifier;\n  exported: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeForOfStatement extends BabelNode {\n  type: \"ForOfStatement\";\n  left: BabelNodeVariableDeclaration | BabelNodeLVal;\n  right: BabelNodeExpression;\n  body: BabelNodeStatement;\n}\n\ndeclare class BabelNodeImportDeclaration extends BabelNode {\n  type: \"ImportDeclaration\";\n  specifiers: Array<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>;\n  source: BabelNodeStringLiteral;\n  importKind?: ?\"type\" | \"typeof\" | \"value\";\n}\n\ndeclare class BabelNodeImportDefaultSpecifier extends BabelNode {\n  type: \"ImportDefaultSpecifier\";\n  local: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeImportNamespaceSpecifier extends BabelNode {\n  type: \"ImportNamespaceSpecifier\";\n  local: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeImportSpecifier extends BabelNode {\n  type: \"ImportSpecifier\";\n  local: BabelNodeIdentifier;\n  imported: BabelNodeIdentifier;\n  importKind?: ?\"type\" | \"typeof\";\n}\n\ndeclare class BabelNodeMetaProperty extends BabelNode {\n  type: \"MetaProperty\";\n  meta: any;\n  property: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeClassMethod extends BabelNode {\n  type: \"ClassMethod\";\n  kind?: ?\"get\" | \"set\" | \"method\" | \"constructor\";\n  key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;\n  params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;\n  body: BabelNodeBlockStatement;\n  computed?: ?boolean;\n  generator?: ?boolean;\n  async?: ?boolean;\n  abstract?: ?boolean;\n  access?: ?\"public\" | \"private\" | \"protected\";\n  accessibility?: ?\"public\" | \"private\" | \"protected\";\n  decorators: Array<BabelNodeDecorator>;\n  optional?: ?boolean;\n  returnType?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;\n}\n\ndeclare class BabelNodeObjectPattern extends BabelNode {\n  type: \"ObjectPattern\";\n  properties: Array<BabelNodeRestElement | BabelNodeObjectProperty>;\n  decorators: Array<BabelNodeDecorator>;\n  typeAnnotation?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n}\n\ndeclare class BabelNodeSpreadElement extends BabelNode {\n  type: \"SpreadElement\";\n  argument: BabelNodeExpression;\n}\n\ndeclare class BabelNodeSuper extends BabelNode {\n  type: \"Super\";\n}\n\ndeclare class BabelNodeTaggedTemplateExpression extends BabelNode {\n  type: \"TaggedTemplateExpression\";\n  tag: BabelNodeExpression;\n  quasi: BabelNodeTemplateLiteral;\n  typeParameters?: ?BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeTemplateElement extends BabelNode {\n  type: \"TemplateElement\";\n  value: {| raw: string, cooked?: string |};\n  tail?: ?boolean;\n}\n\ndeclare class BabelNodeTemplateLiteral extends BabelNode {\n  type: \"TemplateLiteral\";\n  quasis: Array<BabelNodeTemplateElement>;\n  expressions: Array<BabelNodeExpression>;\n}\n\ndeclare class BabelNodeYieldExpression extends BabelNode {\n  type: \"YieldExpression\";\n  argument?: ?BabelNodeExpression;\n  delegate?: ?any;\n}\n\ndeclare class BabelNodeAnyTypeAnnotation extends BabelNode {\n  type: \"AnyTypeAnnotation\";\n}\n\ndeclare class BabelNodeArrayTypeAnnotation extends BabelNode {\n  type: \"ArrayTypeAnnotation\";\n  elementType: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeBooleanTypeAnnotation extends BabelNode {\n  type: \"BooleanTypeAnnotation\";\n}\n\ndeclare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode {\n  type: \"BooleanLiteralTypeAnnotation\";\n  value: boolean;\n}\n\ndeclare class BabelNodeNullLiteralTypeAnnotation extends BabelNode {\n  type: \"NullLiteralTypeAnnotation\";\n}\n\ndeclare class BabelNodeClassImplements extends BabelNode {\n  type: \"ClassImplements\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeDeclareClass extends BabelNode {\n  type: \"DeclareClass\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration;\n  body: BabelNodeObjectTypeAnnotation;\n  mixins: Array<BabelNodeInterfaceExtends>;\n}\n\ndeclare class BabelNodeDeclareFunction extends BabelNode {\n  type: \"DeclareFunction\";\n  id: BabelNodeIdentifier;\n  predicate?: ?BabelNodeDeclaredPredicate;\n}\n\ndeclare class BabelNodeDeclareInterface extends BabelNode {\n  type: \"DeclareInterface\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration;\n  body: BabelNodeObjectTypeAnnotation;\n  mixins: Array<BabelNodeInterfaceExtends>;\n}\n\ndeclare class BabelNodeDeclareModule extends BabelNode {\n  type: \"DeclareModule\";\n  id: BabelNodeIdentifier | BabelNodeStringLiteral;\n  body: BabelNodeBlockStatement;\n  kind?: ?\"CommonJS\" | \"ES\";\n}\n\ndeclare class BabelNodeDeclareModuleExports extends BabelNode {\n  type: \"DeclareModuleExports\";\n  typeAnnotation: BabelNodeTypeAnnotation;\n}\n\ndeclare class BabelNodeDeclareTypeAlias extends BabelNode {\n  type: \"DeclareTypeAlias\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration;\n  right: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeDeclareOpaqueType extends BabelNode {\n  type: \"DeclareOpaqueType\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration;\n  supertype?: ?BabelNodeFlowType;\n}\n\ndeclare class BabelNodeDeclareVariable extends BabelNode {\n  type: \"DeclareVariable\";\n  id: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeDeclareExportDeclaration extends BabelNode {\n  type: \"DeclareExportDeclaration\";\n  declaration?: ?BabelNodeFlow;\n  specifiers: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>;\n  source?: ?BabelNodeStringLiteral;\n}\n\ndeclare class BabelNodeDeclareExportAllDeclaration extends BabelNode {\n  type: \"DeclareExportAllDeclaration\";\n  source: BabelNodeStringLiteral;\n  exportKind?: ?\"type\" | \"value\";\n}\n\ndeclare class BabelNodeDeclaredPredicate extends BabelNode {\n  type: \"DeclaredPredicate\";\n  value: BabelNodeFlow;\n}\n\ndeclare class BabelNodeExistsTypeAnnotation extends BabelNode {\n  type: \"ExistsTypeAnnotation\";\n}\n\ndeclare class BabelNodeFunctionTypeAnnotation extends BabelNode {\n  type: \"FunctionTypeAnnotation\";\n  typeParameters?: ?BabelNodeTypeParameterDeclaration;\n  params: Array<BabelNodeFunctionTypeParam>;\n  rest?: ?BabelNodeFunctionTypeParam;\n  returnType: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeFunctionTypeParam extends BabelNode {\n  type: \"FunctionTypeParam\";\n  name?: ?BabelNodeIdentifier;\n  typeAnnotation: BabelNodeFlowType;\n  optional?: ?boolean;\n}\n\ndeclare class BabelNodeGenericTypeAnnotation extends BabelNode {\n  type: \"GenericTypeAnnotation\";\n  id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeInferredPredicate extends BabelNode {\n  type: \"InferredPredicate\";\n}\n\ndeclare class BabelNodeInterfaceExtends extends BabelNode {\n  type: \"InterfaceExtends\";\n  id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeInterfaceDeclaration extends BabelNode {\n  type: \"InterfaceDeclaration\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration;\n  body: BabelNodeObjectTypeAnnotation;\n  mixins: Array<BabelNodeInterfaceExtends>;\n}\n\ndeclare class BabelNodeInterfaceTypeAnnotation extends BabelNode {\n  type: \"InterfaceTypeAnnotation\";\n  body: BabelNodeObjectTypeAnnotation;\n}\n\ndeclare class BabelNodeIntersectionTypeAnnotation extends BabelNode {\n  type: \"IntersectionTypeAnnotation\";\n  types: Array<BabelNodeFlowType>;\n}\n\ndeclare class BabelNodeMixedTypeAnnotation extends BabelNode {\n  type: \"MixedTypeAnnotation\";\n}\n\ndeclare class BabelNodeEmptyTypeAnnotation extends BabelNode {\n  type: \"EmptyTypeAnnotation\";\n}\n\ndeclare class BabelNodeNullableTypeAnnotation extends BabelNode {\n  type: \"NullableTypeAnnotation\";\n  typeAnnotation: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode {\n  type: \"NumberLiteralTypeAnnotation\";\n  value: number;\n}\n\ndeclare class BabelNodeNumberTypeAnnotation extends BabelNode {\n  type: \"NumberTypeAnnotation\";\n}\n\ndeclare class BabelNodeObjectTypeAnnotation extends BabelNode {\n  type: \"ObjectTypeAnnotation\";\n  properties: Array<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>;\n  indexers: Array<BabelNodeObjectTypeIndexer>;\n  callProperties: Array<BabelNodeObjectTypeCallProperty>;\n  internalSlots: Array<BabelNodeObjectTypeInternalSlot>;\n  exact?: ?boolean;\n  inexact?: ?boolean;\n}\n\ndeclare class BabelNodeObjectTypeInternalSlot extends BabelNode {\n  type: \"ObjectTypeInternalSlot\";\n  id: BabelNodeIdentifier;\n  value: BabelNodeFlowType;\n  optional: boolean;\n  method: boolean;\n}\n\ndeclare class BabelNodeObjectTypeCallProperty extends BabelNode {\n  type: \"ObjectTypeCallProperty\";\n  value: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeObjectTypeIndexer extends BabelNode {\n  type: \"ObjectTypeIndexer\";\n  id?: ?BabelNodeIdentifier;\n  key: BabelNodeFlowType;\n  value: BabelNodeFlowType;\n  variance?: ?BabelNodeVariance;\n}\n\ndeclare class BabelNodeObjectTypeProperty extends BabelNode {\n  type: \"ObjectTypeProperty\";\n  key: BabelNodeIdentifier | BabelNodeStringLiteral;\n  value: BabelNodeFlowType;\n  variance?: ?BabelNodeVariance;\n  kind: \"init\" | \"get\" | \"set\";\n  optional: boolean;\n  proto: boolean;\n}\n\ndeclare class BabelNodeObjectTypeSpreadProperty extends BabelNode {\n  type: \"ObjectTypeSpreadProperty\";\n  argument: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeOpaqueType extends BabelNode {\n  type: \"OpaqueType\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration;\n  supertype?: ?BabelNodeFlowType;\n  impltype: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeQualifiedTypeIdentifier extends BabelNode {\n  type: \"QualifiedTypeIdentifier\";\n  id: BabelNodeIdentifier;\n  qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;\n}\n\ndeclare class BabelNodeStringLiteralTypeAnnotation extends BabelNode {\n  type: \"StringLiteralTypeAnnotation\";\n  value: string;\n}\n\ndeclare class BabelNodeStringTypeAnnotation extends BabelNode {\n  type: \"StringTypeAnnotation\";\n}\n\ndeclare class BabelNodeThisTypeAnnotation extends BabelNode {\n  type: \"ThisTypeAnnotation\";\n}\n\ndeclare class BabelNodeTupleTypeAnnotation extends BabelNode {\n  type: \"TupleTypeAnnotation\";\n  types: Array<BabelNodeFlowType>;\n}\n\ndeclare class BabelNodeTypeofTypeAnnotation extends BabelNode {\n  type: \"TypeofTypeAnnotation\";\n  argument: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeTypeAlias extends BabelNode {\n  type: \"TypeAlias\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTypeParameterDeclaration;\n  right: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeTypeAnnotation extends BabelNode {\n  type: \"TypeAnnotation\";\n  typeAnnotation: BabelNodeFlowType;\n}\n\ndeclare class BabelNodeTypeCastExpression extends BabelNode {\n  type: \"TypeCastExpression\";\n  expression: BabelNodeExpression;\n  typeAnnotation: BabelNodeTypeAnnotation;\n}\n\ndeclare class BabelNodeTypeParameter extends BabelNode {\n  type: \"TypeParameter\";\n  bound?: ?BabelNodeTypeAnnotation;\n  variance?: ?BabelNodeVariance;\n  name: string;\n}\n\ndeclare class BabelNodeTypeParameterDeclaration extends BabelNode {\n  type: \"TypeParameterDeclaration\";\n  params: Array<BabelNodeTypeParameter>;\n}\n\ndeclare class BabelNodeTypeParameterInstantiation extends BabelNode {\n  type: \"TypeParameterInstantiation\";\n  params: Array<BabelNodeFlowType>;\n}\n\ndeclare class BabelNodeUnionTypeAnnotation extends BabelNode {\n  type: \"UnionTypeAnnotation\";\n  types: Array<BabelNodeFlowType>;\n}\n\ndeclare class BabelNodeVariance extends BabelNode {\n  type: \"Variance\";\n  kind: \"minus\" | \"plus\";\n}\n\ndeclare class BabelNodeVoidTypeAnnotation extends BabelNode {\n  type: \"VoidTypeAnnotation\";\n}\n\ndeclare class BabelNodeEnumDeclaration extends BabelNode {\n  type: \"EnumDeclaration\";\n  id: BabelNodeIdentifier;\n  body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody;\n}\n\ndeclare class BabelNodeEnumBooleanBody extends BabelNode {\n  type: \"EnumBooleanBody\";\n  members: Array<BabelNodeEnumBooleanMember>;\n  explicit: boolean;\n}\n\ndeclare class BabelNodeEnumNumberBody extends BabelNode {\n  type: \"EnumNumberBody\";\n  members: Array<BabelNodeEnumNumberMember>;\n  explicit: boolean;\n}\n\ndeclare class BabelNodeEnumStringBody extends BabelNode {\n  type: \"EnumStringBody\";\n  members: Array<BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember>;\n  explicit: boolean;\n}\n\ndeclare class BabelNodeEnumSymbolBody extends BabelNode {\n  type: \"EnumSymbolBody\";\n  members: Array<BabelNodeEnumDefaultedMember>;\n}\n\ndeclare class BabelNodeEnumBooleanMember extends BabelNode {\n  type: \"EnumBooleanMember\";\n  id: BabelNodeIdentifier;\n  init: BabelNodeBooleanLiteral;\n}\n\ndeclare class BabelNodeEnumNumberMember extends BabelNode {\n  type: \"EnumNumberMember\";\n  id: BabelNodeIdentifier;\n  init: BabelNodeNumericLiteral;\n}\n\ndeclare class BabelNodeEnumStringMember extends BabelNode {\n  type: \"EnumStringMember\";\n  id: BabelNodeIdentifier;\n  init: BabelNodeStringLiteral;\n}\n\ndeclare class BabelNodeEnumDefaultedMember extends BabelNode {\n  type: \"EnumDefaultedMember\";\n  id: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeJSXAttribute extends BabelNode {\n  type: \"JSXAttribute\";\n  name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName;\n  value?: ?BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer;\n}\n\ndeclare class BabelNodeJSXClosingElement extends BabelNode {\n  type: \"JSXClosingElement\";\n  name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName;\n}\n\ndeclare class BabelNodeJSXElement extends BabelNode {\n  type: \"JSXElement\";\n  openingElement: BabelNodeJSXOpeningElement;\n  closingElement?: ?BabelNodeJSXClosingElement;\n  children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>;\n  selfClosing: any;\n}\n\ndeclare class BabelNodeJSXEmptyExpression extends BabelNode {\n  type: \"JSXEmptyExpression\";\n}\n\ndeclare class BabelNodeJSXExpressionContainer extends BabelNode {\n  type: \"JSXExpressionContainer\";\n  expression: BabelNodeExpression | BabelNodeJSXEmptyExpression;\n}\n\ndeclare class BabelNodeJSXSpreadChild extends BabelNode {\n  type: \"JSXSpreadChild\";\n  expression: BabelNodeExpression;\n}\n\ndeclare class BabelNodeJSXIdentifier extends BabelNode {\n  type: \"JSXIdentifier\";\n  name: string;\n}\n\ndeclare class BabelNodeJSXMemberExpression extends BabelNode {\n  type: \"JSXMemberExpression\";\n  object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier;\n  property: BabelNodeJSXIdentifier;\n}\n\ndeclare class BabelNodeJSXNamespacedName extends BabelNode {\n  type: \"JSXNamespacedName\";\n  namespace: BabelNodeJSXIdentifier;\n  name: BabelNodeJSXIdentifier;\n}\n\ndeclare class BabelNodeJSXOpeningElement extends BabelNode {\n  type: \"JSXOpeningElement\";\n  name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName;\n  attributes: Array<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>;\n  selfClosing?: ?boolean;\n  typeParameters?: ?BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeJSXSpreadAttribute extends BabelNode {\n  type: \"JSXSpreadAttribute\";\n  argument: BabelNodeExpression;\n}\n\ndeclare class BabelNodeJSXText extends BabelNode {\n  type: \"JSXText\";\n  value: string;\n}\n\ndeclare class BabelNodeJSXFragment extends BabelNode {\n  type: \"JSXFragment\";\n  openingFragment: BabelNodeJSXOpeningFragment;\n  closingFragment: BabelNodeJSXClosingFragment;\n  children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>;\n}\n\ndeclare class BabelNodeJSXOpeningFragment extends BabelNode {\n  type: \"JSXOpeningFragment\";\n}\n\ndeclare class BabelNodeJSXClosingFragment extends BabelNode {\n  type: \"JSXClosingFragment\";\n}\n\ndeclare class BabelNodeNoop extends BabelNode {\n  type: \"Noop\";\n}\n\ndeclare class BabelNodePlaceholder extends BabelNode {\n  type: \"Placeholder\";\n  expectedNode: \"Identifier\" | \"StringLiteral\" | \"Expression\" | \"Statement\" | \"Declaration\" | \"BlockStatement\" | \"ClassBody\" | \"Pattern\";\n  name: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeV8IntrinsicIdentifier extends BabelNode {\n  type: \"V8IntrinsicIdentifier\";\n  name: string;\n}\n\ndeclare class BabelNodeArgumentPlaceholder extends BabelNode {\n  type: \"ArgumentPlaceholder\";\n}\n\ndeclare class BabelNodeAwaitExpression extends BabelNode {\n  type: \"AwaitExpression\";\n  argument: BabelNodeExpression;\n}\n\ndeclare class BabelNodeBindExpression extends BabelNode {\n  type: \"BindExpression\";\n  object: any;\n  callee: any;\n}\n\ndeclare class BabelNodeClassProperty extends BabelNode {\n  type: \"ClassProperty\";\n  key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;\n  value?: ?BabelNodeExpression;\n  typeAnnotation?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;\n  decorators: Array<BabelNodeDecorator>;\n  computed?: ?boolean;\n  abstract?: ?boolean;\n  accessibility?: ?\"public\" | \"private\" | \"protected\";\n  declare?: ?boolean;\n  definite?: ?boolean;\n  optional?: ?boolean;\n  readonly?: ?boolean;\n}\n\ndeclare class BabelNodeOptionalMemberExpression extends BabelNode {\n  type: \"OptionalMemberExpression\";\n  object: BabelNodeExpression;\n  property: any;\n  computed?: ?boolean;\n  optional: boolean;\n}\n\ndeclare class BabelNodePipelineTopicExpression extends BabelNode {\n  type: \"PipelineTopicExpression\";\n  expression: BabelNodeExpression;\n}\n\ndeclare class BabelNodePipelineBareFunction extends BabelNode {\n  type: \"PipelineBareFunction\";\n  callee: BabelNodeExpression;\n}\n\ndeclare class BabelNodePipelinePrimaryTopicReference extends BabelNode {\n  type: \"PipelinePrimaryTopicReference\";\n}\n\ndeclare class BabelNodeOptionalCallExpression extends BabelNode {\n  type: \"OptionalCallExpression\";\n  callee: BabelNodeExpression;\n  arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName>;\n  optional: boolean;\n  typeArguments?: ?BabelNodeTypeParameterInstantiation;\n  typeParameters?: ?BabelNodeTSTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeClassPrivateProperty extends BabelNode {\n  type: \"ClassPrivateProperty\";\n  key: BabelNodePrivateName;\n  value?: ?BabelNodeExpression;\n  decorators: Array<BabelNodeDecorator>;\n}\n\ndeclare class BabelNodeClassPrivateMethod extends BabelNode {\n  type: \"ClassPrivateMethod\";\n  kind?: ?\"get\" | \"set\" | \"method\" | \"constructor\";\n  key: BabelNodePrivateName;\n  params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;\n  body: BabelNodeBlockStatement;\n  abstract?: ?boolean;\n  access?: ?\"public\" | \"private\" | \"protected\";\n  accessibility?: ?\"public\" | \"private\" | \"protected\";\n  async?: ?boolean;\n  computed?: ?boolean;\n  decorators: Array<BabelNodeDecorator>;\n  generator?: ?boolean;\n  optional?: ?boolean;\n  returnType: any;\n  typeParameters: any;\n}\n\ndeclare class BabelNodeImport extends BabelNode {\n  type: \"Import\";\n}\n\ndeclare class BabelNodeDecorator extends BabelNode {\n  type: \"Decorator\";\n  expression: BabelNodeExpression;\n}\n\ndeclare class BabelNodeDoExpression extends BabelNode {\n  type: \"DoExpression\";\n  body: BabelNodeBlockStatement;\n}\n\ndeclare class BabelNodeExportDefaultSpecifier extends BabelNode {\n  type: \"ExportDefaultSpecifier\";\n  exported: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeExportNamespaceSpecifier extends BabelNode {\n  type: \"ExportNamespaceSpecifier\";\n  exported: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodePrivateName extends BabelNode {\n  type: \"PrivateName\";\n  id: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeBigIntLiteral extends BabelNode {\n  type: \"BigIntLiteral\";\n  value: string;\n}\n\ndeclare class BabelNodeTSParameterProperty extends BabelNode {\n  type: \"TSParameterProperty\";\n  parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern;\n  accessibility?: ?\"public\" | \"private\" | \"protected\";\n  readonly?: ?boolean;\n}\n\ndeclare class BabelNodeTSDeclareFunction extends BabelNode {\n  type: \"TSDeclareFunction\";\n  id?: ?BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;\n  params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;\n  returnType?: ?BabelNodeTSTypeAnnotation | BabelNodeNoop;\n  async?: ?boolean;\n  declare?: ?boolean;\n  generator?: ?boolean;\n}\n\ndeclare class BabelNodeTSDeclareMethod extends BabelNode {\n  type: \"TSDeclareMethod\";\n  decorators: Array<BabelNodeDecorator>;\n  key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;\n  typeParameters?: ?BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;\n  params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;\n  returnType?: ?BabelNodeTSTypeAnnotation | BabelNodeNoop;\n  abstract?: ?boolean;\n  access?: ?\"public\" | \"private\" | \"protected\";\n  accessibility?: ?\"public\" | \"private\" | \"protected\";\n  async?: ?boolean;\n  computed?: ?boolean;\n  generator?: ?boolean;\n  kind?: ?\"get\" | \"set\" | \"method\" | \"constructor\";\n  optional?: ?boolean;\n}\n\ndeclare class BabelNodeTSQualifiedName extends BabelNode {\n  type: \"TSQualifiedName\";\n  left: BabelNodeTSEntityName;\n  right: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeTSCallSignatureDeclaration extends BabelNode {\n  type: \"TSCallSignatureDeclaration\";\n  typeParameters?: ?BabelNodeTSTypeParameterDeclaration;\n  parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;\n  typeAnnotation?: ?BabelNodeTSTypeAnnotation;\n}\n\ndeclare class BabelNodeTSConstructSignatureDeclaration extends BabelNode {\n  type: \"TSConstructSignatureDeclaration\";\n  typeParameters?: ?BabelNodeTSTypeParameterDeclaration;\n  parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;\n  typeAnnotation?: ?BabelNodeTSTypeAnnotation;\n}\n\ndeclare class BabelNodeTSPropertySignature extends BabelNode {\n  type: \"TSPropertySignature\";\n  key: BabelNodeExpression;\n  typeAnnotation?: ?BabelNodeTSTypeAnnotation;\n  initializer?: ?BabelNodeExpression;\n  computed?: ?boolean;\n  optional?: ?boolean;\n  readonly?: ?boolean;\n}\n\ndeclare class BabelNodeTSMethodSignature extends BabelNode {\n  type: \"TSMethodSignature\";\n  key: BabelNodeExpression;\n  typeParameters?: ?BabelNodeTSTypeParameterDeclaration;\n  parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;\n  typeAnnotation?: ?BabelNodeTSTypeAnnotation;\n  computed?: ?boolean;\n  optional?: ?boolean;\n}\n\ndeclare class BabelNodeTSIndexSignature extends BabelNode {\n  type: \"TSIndexSignature\";\n  parameters: Array<BabelNodeIdentifier>;\n  typeAnnotation?: ?BabelNodeTSTypeAnnotation;\n  readonly?: ?boolean;\n}\n\ndeclare class BabelNodeTSAnyKeyword extends BabelNode {\n  type: \"TSAnyKeyword\";\n}\n\ndeclare class BabelNodeTSBooleanKeyword extends BabelNode {\n  type: \"TSBooleanKeyword\";\n}\n\ndeclare class BabelNodeTSBigIntKeyword extends BabelNode {\n  type: \"TSBigIntKeyword\";\n}\n\ndeclare class BabelNodeTSNeverKeyword extends BabelNode {\n  type: \"TSNeverKeyword\";\n}\n\ndeclare class BabelNodeTSNullKeyword extends BabelNode {\n  type: \"TSNullKeyword\";\n}\n\ndeclare class BabelNodeTSNumberKeyword extends BabelNode {\n  type: \"TSNumberKeyword\";\n}\n\ndeclare class BabelNodeTSObjectKeyword extends BabelNode {\n  type: \"TSObjectKeyword\";\n}\n\ndeclare class BabelNodeTSStringKeyword extends BabelNode {\n  type: \"TSStringKeyword\";\n}\n\ndeclare class BabelNodeTSSymbolKeyword extends BabelNode {\n  type: \"TSSymbolKeyword\";\n}\n\ndeclare class BabelNodeTSUndefinedKeyword extends BabelNode {\n  type: \"TSUndefinedKeyword\";\n}\n\ndeclare class BabelNodeTSUnknownKeyword extends BabelNode {\n  type: \"TSUnknownKeyword\";\n}\n\ndeclare class BabelNodeTSVoidKeyword extends BabelNode {\n  type: \"TSVoidKeyword\";\n}\n\ndeclare class BabelNodeTSThisType extends BabelNode {\n  type: \"TSThisType\";\n}\n\ndeclare class BabelNodeTSFunctionType extends BabelNode {\n  type: \"TSFunctionType\";\n  typeParameters?: ?BabelNodeTSTypeParameterDeclaration;\n  parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;\n  typeAnnotation?: ?BabelNodeTSTypeAnnotation;\n}\n\ndeclare class BabelNodeTSConstructorType extends BabelNode {\n  type: \"TSConstructorType\";\n  typeParameters?: ?BabelNodeTSTypeParameterDeclaration;\n  parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;\n  typeAnnotation?: ?BabelNodeTSTypeAnnotation;\n}\n\ndeclare class BabelNodeTSTypeReference extends BabelNode {\n  type: \"TSTypeReference\";\n  typeName: BabelNodeTSEntityName;\n  typeParameters?: ?BabelNodeTSTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeTSTypePredicate extends BabelNode {\n  type: \"TSTypePredicate\";\n  parameterName: BabelNodeIdentifier | BabelNodeTSThisType;\n  typeAnnotation?: ?BabelNodeTSTypeAnnotation;\n  asserts?: ?boolean;\n}\n\ndeclare class BabelNodeTSTypeQuery extends BabelNode {\n  type: \"TSTypeQuery\";\n  exprName: BabelNodeTSEntityName | BabelNodeTSImportType;\n}\n\ndeclare class BabelNodeTSTypeLiteral extends BabelNode {\n  type: \"TSTypeLiteral\";\n  members: Array<BabelNodeTSTypeElement>;\n}\n\ndeclare class BabelNodeTSArrayType extends BabelNode {\n  type: \"TSArrayType\";\n  elementType: BabelNodeTSType;\n}\n\ndeclare class BabelNodeTSTupleType extends BabelNode {\n  type: \"TSTupleType\";\n  elementTypes: Array<BabelNodeTSType>;\n}\n\ndeclare class BabelNodeTSOptionalType extends BabelNode {\n  type: \"TSOptionalType\";\n  typeAnnotation: BabelNodeTSType;\n}\n\ndeclare class BabelNodeTSRestType extends BabelNode {\n  type: \"TSRestType\";\n  typeAnnotation: BabelNodeTSType;\n}\n\ndeclare class BabelNodeTSUnionType extends BabelNode {\n  type: \"TSUnionType\";\n  types: Array<BabelNodeTSType>;\n}\n\ndeclare class BabelNodeTSIntersectionType extends BabelNode {\n  type: \"TSIntersectionType\";\n  types: Array<BabelNodeTSType>;\n}\n\ndeclare class BabelNodeTSConditionalType extends BabelNode {\n  type: \"TSConditionalType\";\n  checkType: BabelNodeTSType;\n  extendsType: BabelNodeTSType;\n  trueType: BabelNodeTSType;\n  falseType: BabelNodeTSType;\n}\n\ndeclare class BabelNodeTSInferType extends BabelNode {\n  type: \"TSInferType\";\n  typeParameter: BabelNodeTSTypeParameter;\n}\n\ndeclare class BabelNodeTSParenthesizedType extends BabelNode {\n  type: \"TSParenthesizedType\";\n  typeAnnotation: BabelNodeTSType;\n}\n\ndeclare class BabelNodeTSTypeOperator extends BabelNode {\n  type: \"TSTypeOperator\";\n  typeAnnotation: BabelNodeTSType;\n  operator: string;\n}\n\ndeclare class BabelNodeTSIndexedAccessType extends BabelNode {\n  type: \"TSIndexedAccessType\";\n  objectType: BabelNodeTSType;\n  indexType: BabelNodeTSType;\n}\n\ndeclare class BabelNodeTSMappedType extends BabelNode {\n  type: \"TSMappedType\";\n  typeParameter: BabelNodeTSTypeParameter;\n  typeAnnotation?: ?BabelNodeTSType;\n  optional?: ?boolean;\n  readonly?: ?boolean;\n}\n\ndeclare class BabelNodeTSLiteralType extends BabelNode {\n  type: \"TSLiteralType\";\n  literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral;\n}\n\ndeclare class BabelNodeTSExpressionWithTypeArguments extends BabelNode {\n  type: \"TSExpressionWithTypeArguments\";\n  expression: BabelNodeTSEntityName;\n  typeParameters?: ?BabelNodeTSTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeTSInterfaceDeclaration extends BabelNode {\n  type: \"TSInterfaceDeclaration\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTSTypeParameterDeclaration;\n  body: BabelNodeTSInterfaceBody;\n  declare?: ?boolean;\n}\n\ndeclare class BabelNodeTSInterfaceBody extends BabelNode {\n  type: \"TSInterfaceBody\";\n  body: Array<BabelNodeTSTypeElement>;\n}\n\ndeclare class BabelNodeTSTypeAliasDeclaration extends BabelNode {\n  type: \"TSTypeAliasDeclaration\";\n  id: BabelNodeIdentifier;\n  typeParameters?: ?BabelNodeTSTypeParameterDeclaration;\n  typeAnnotation: BabelNodeTSType;\n  declare?: ?boolean;\n}\n\ndeclare class BabelNodeTSAsExpression extends BabelNode {\n  type: \"TSAsExpression\";\n  expression: BabelNodeExpression;\n  typeAnnotation: BabelNodeTSType;\n}\n\ndeclare class BabelNodeTSTypeAssertion extends BabelNode {\n  type: \"TSTypeAssertion\";\n  typeAnnotation: BabelNodeTSType;\n  expression: BabelNodeExpression;\n}\n\ndeclare class BabelNodeTSEnumDeclaration extends BabelNode {\n  type: \"TSEnumDeclaration\";\n  id: BabelNodeIdentifier;\n  members: Array<BabelNodeTSEnumMember>;\n  declare?: ?boolean;\n  initializer?: ?BabelNodeExpression;\n}\n\ndeclare class BabelNodeTSEnumMember extends BabelNode {\n  type: \"TSEnumMember\";\n  id: BabelNodeIdentifier | BabelNodeStringLiteral;\n  initializer?: ?BabelNodeExpression;\n}\n\ndeclare class BabelNodeTSModuleDeclaration extends BabelNode {\n  type: \"TSModuleDeclaration\";\n  id: BabelNodeIdentifier | BabelNodeStringLiteral;\n  body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration;\n  declare?: ?boolean;\n  global?: ?boolean;\n}\n\ndeclare class BabelNodeTSModuleBlock extends BabelNode {\n  type: \"TSModuleBlock\";\n  body: Array<BabelNodeStatement>;\n}\n\ndeclare class BabelNodeTSImportType extends BabelNode {\n  type: \"TSImportType\";\n  argument: BabelNodeStringLiteral;\n  qualifier?: ?BabelNodeTSEntityName;\n  typeParameters?: ?BabelNodeTSTypeParameterInstantiation;\n}\n\ndeclare class BabelNodeTSImportEqualsDeclaration extends BabelNode {\n  type: \"TSImportEqualsDeclaration\";\n  id: BabelNodeIdentifier;\n  moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference;\n  isExport: boolean;\n}\n\ndeclare class BabelNodeTSExternalModuleReference extends BabelNode {\n  type: \"TSExternalModuleReference\";\n  expression: BabelNodeStringLiteral;\n}\n\ndeclare class BabelNodeTSNonNullExpression extends BabelNode {\n  type: \"TSNonNullExpression\";\n  expression: BabelNodeExpression;\n}\n\ndeclare class BabelNodeTSExportAssignment extends BabelNode {\n  type: \"TSExportAssignment\";\n  expression: BabelNodeExpression;\n}\n\ndeclare class BabelNodeTSNamespaceExportDeclaration extends BabelNode {\n  type: \"TSNamespaceExportDeclaration\";\n  id: BabelNodeIdentifier;\n}\n\ndeclare class BabelNodeTSTypeAnnotation extends BabelNode {\n  type: \"TSTypeAnnotation\";\n  typeAnnotation: BabelNodeTSType;\n}\n\ndeclare class BabelNodeTSTypeParameterInstantiation extends BabelNode {\n  type: \"TSTypeParameterInstantiation\";\n  params: Array<BabelNodeTSType>;\n}\n\ndeclare class BabelNodeTSTypeParameterDeclaration extends BabelNode {\n  type: \"TSTypeParameterDeclaration\";\n  params: Array<BabelNodeTSTypeParameter>;\n}\n\ndeclare class BabelNodeTSTypeParameter extends BabelNode {\n  type: \"TSTypeParameter\";\n  constraint?: ?BabelNodeTSType;\n  name: string;\n}\n\ndeclare type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeAwaitExpression | BabelNodeBindExpression | BabelNodeOptionalMemberExpression | BabelNodePipelinePrimaryTopicReference | BabelNodeOptionalCallExpression | BabelNodeImport | BabelNodeDoExpression | BabelNodeBigIntLiteral | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression;\ndeclare type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression;\ndeclare type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock;\ndeclare type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock;\ndeclare type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock;\ndeclare type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration;\ndeclare type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression;\ndeclare type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement;\ndeclare type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement;\ndeclare type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement;\ndeclare type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement;\ndeclare type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression;\ndeclare type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement;\ndeclare type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement;\ndeclare type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod;\ndeclare type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod;\ndeclare type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeBigIntLiteral;\ndeclare type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration;\ndeclare type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;\ndeclare type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty;\ndeclare type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName;\ndeclare type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral;\ndeclare type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeBigIntLiteral;\ndeclare type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty;\ndeclare type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod;\ndeclare type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty;\ndeclare type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty;\ndeclare type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement;\ndeclare type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;\ndeclare type BabelNodeClass = BabelNodeClassExpression | BabelNodeClassDeclaration;\ndeclare type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration;\ndeclare type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration;\ndeclare type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier;\ndeclare type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation;\ndeclare type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation;\ndeclare type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation;\ndeclare type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias;\ndeclare type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate;\ndeclare type BabelNodeEnumBody = BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody;\ndeclare type BabelNodeEnumMember = BabelNodeEnumBooleanMember | BabelNodeEnumNumberMember | BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember;\ndeclare type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment;\ndeclare type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName;\ndeclare type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature;\ndeclare type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType;\n\ndeclare module \"@babel/types\" {\n  declare export type SourceLocation = {|\n    filename: ?string;\n\n    start: {|\n      line: number;\n      column: number;\n    |};\n\n    end: {|\n      line: number;\n      column: number;\n    |};\n  |}\n\n  declare export {\n    BabelNode as Node,\n    BabelNodeArrayExpression as ArrayExpression,\n    BabelNodeAssignmentExpression as AssignmentExpression,\n    BabelNodeBinaryExpression as BinaryExpression,\n    BabelNodeInterpreterDirective as InterpreterDirective,\n    BabelNodeDirective as Directive,\n    BabelNodeDirectiveLiteral as DirectiveLiteral,\n    BabelNodeBlockStatement as BlockStatement,\n    BabelNodeBreakStatement as BreakStatement,\n    BabelNodeCallExpression as CallExpression,\n    BabelNodeCatchClause as CatchClause,\n    BabelNodeConditionalExpression as ConditionalExpression,\n    BabelNodeContinueStatement as ContinueStatement,\n    BabelNodeDebuggerStatement as DebuggerStatement,\n    BabelNodeDoWhileStatement as DoWhileStatement,\n    BabelNodeEmptyStatement as EmptyStatement,\n    BabelNodeExpressionStatement as ExpressionStatement,\n    BabelNodeFile as File,\n    BabelNodeForInStatement as ForInStatement,\n    BabelNodeForStatement as ForStatement,\n    BabelNodeFunctionDeclaration as FunctionDeclaration,\n    BabelNodeFunctionExpression as FunctionExpression,\n    BabelNodeIdentifier as Identifier,\n    BabelNodeIfStatement as IfStatement,\n    BabelNodeLabeledStatement as LabeledStatement,\n    BabelNodeStringLiteral as StringLiteral,\n    BabelNodeNumericLiteral as NumericLiteral,\n    BabelNodeNullLiteral as NullLiteral,\n    BabelNodeBooleanLiteral as BooleanLiteral,\n    BabelNodeRegExpLiteral as RegExpLiteral,\n    BabelNodeLogicalExpression as LogicalExpression,\n    BabelNodeMemberExpression as MemberExpression,\n    BabelNodeNewExpression as NewExpression,\n    BabelNodeProgram as Program,\n    BabelNodeObjectExpression as ObjectExpression,\n    BabelNodeObjectMethod as ObjectMethod,\n    BabelNodeObjectProperty as ObjectProperty,\n    BabelNodeRestElement as RestElement,\n    BabelNodeReturnStatement as ReturnStatement,\n    BabelNodeSequenceExpression as SequenceExpression,\n    BabelNodeParenthesizedExpression as ParenthesizedExpression,\n    BabelNodeSwitchCase as SwitchCase,\n    BabelNodeSwitchStatement as SwitchStatement,\n    BabelNodeThisExpression as ThisExpression,\n    BabelNodeThrowStatement as ThrowStatement,\n    BabelNodeTryStatement as TryStatement,\n    BabelNodeUnaryExpression as UnaryExpression,\n    BabelNodeUpdateExpression as UpdateExpression,\n    BabelNodeVariableDeclaration as VariableDeclaration,\n    BabelNodeVariableDeclarator as VariableDeclarator,\n    BabelNodeWhileStatement as WhileStatement,\n    BabelNodeWithStatement as WithStatement,\n    BabelNodeAssignmentPattern as AssignmentPattern,\n    BabelNodeArrayPattern as ArrayPattern,\n    BabelNodeArrowFunctionExpression as ArrowFunctionExpression,\n    BabelNodeClassBody as ClassBody,\n    BabelNodeClassExpression as ClassExpression,\n    BabelNodeClassDeclaration as ClassDeclaration,\n    BabelNodeExportAllDeclaration as ExportAllDeclaration,\n    BabelNodeExportDefaultDeclaration as ExportDefaultDeclaration,\n    BabelNodeExportNamedDeclaration as ExportNamedDeclaration,\n    BabelNodeExportSpecifier as ExportSpecifier,\n    BabelNodeForOfStatement as ForOfStatement,\n    BabelNodeImportDeclaration as ImportDeclaration,\n    BabelNodeImportDefaultSpecifier as ImportDefaultSpecifier,\n    BabelNodeImportNamespaceSpecifier as ImportNamespaceSpecifier,\n    BabelNodeImportSpecifier as ImportSpecifier,\n    BabelNodeMetaProperty as MetaProperty,\n    BabelNodeClassMethod as ClassMethod,\n    BabelNodeObjectPattern as ObjectPattern,\n    BabelNodeSpreadElement as SpreadElement,\n    BabelNodeSuper as Super,\n    BabelNodeTaggedTemplateExpression as TaggedTemplateExpression,\n    BabelNodeTemplateElement as TemplateElement,\n    BabelNodeTemplateLiteral as TemplateLiteral,\n    BabelNodeYieldExpression as YieldExpression,\n    BabelNodeAnyTypeAnnotation as AnyTypeAnnotation,\n    BabelNodeArrayTypeAnnotation as ArrayTypeAnnotation,\n    BabelNodeBooleanTypeAnnotation as BooleanTypeAnnotation,\n    BabelNodeBooleanLiteralTypeAnnotation as BooleanLiteralTypeAnnotation,\n    BabelNodeNullLiteralTypeAnnotation as NullLiteralTypeAnnotation,\n    BabelNodeClassImplements as ClassImplements,\n    BabelNodeDeclareClass as DeclareClass,\n    BabelNodeDeclareFunction as DeclareFunction,\n    BabelNodeDeclareInterface as DeclareInterface,\n    BabelNodeDeclareModule as DeclareModule,\n    BabelNodeDeclareModuleExports as DeclareModuleExports,\n    BabelNodeDeclareTypeAlias as DeclareTypeAlias,\n    BabelNodeDeclareOpaqueType as DeclareOpaqueType,\n    BabelNodeDeclareVariable as DeclareVariable,\n    BabelNodeDeclareExportDeclaration as DeclareExportDeclaration,\n    BabelNodeDeclareExportAllDeclaration as DeclareExportAllDeclaration,\n    BabelNodeDeclaredPredicate as DeclaredPredicate,\n    BabelNodeExistsTypeAnnotation as ExistsTypeAnnotation,\n    BabelNodeFunctionTypeAnnotation as FunctionTypeAnnotation,\n    BabelNodeFunctionTypeParam as FunctionTypeParam,\n    BabelNodeGenericTypeAnnotation as GenericTypeAnnotation,\n    BabelNodeInferredPredicate as InferredPredicate,\n    BabelNodeInterfaceExtends as InterfaceExtends,\n    BabelNodeInterfaceDeclaration as InterfaceDeclaration,\n    BabelNodeInterfaceTypeAnnotation as InterfaceTypeAnnotation,\n    BabelNodeIntersectionTypeAnnotation as IntersectionTypeAnnotation,\n    BabelNodeMixedTypeAnnotation as MixedTypeAnnotation,\n    BabelNodeEmptyTypeAnnotation as EmptyTypeAnnotation,\n    BabelNodeNullableTypeAnnotation as NullableTypeAnnotation,\n    BabelNodeNumberLiteralTypeAnnotation as NumberLiteralTypeAnnotation,\n    BabelNodeNumberTypeAnnotation as NumberTypeAnnotation,\n    BabelNodeObjectTypeAnnotation as ObjectTypeAnnotation,\n    BabelNodeObjectTypeInternalSlot as ObjectTypeInternalSlot,\n    BabelNodeObjectTypeCallProperty as ObjectTypeCallProperty,\n    BabelNodeObjectTypeIndexer as ObjectTypeIndexer,\n    BabelNodeObjectTypeProperty as ObjectTypeProperty,\n    BabelNodeObjectTypeSpreadProperty as ObjectTypeSpreadProperty,\n    BabelNodeOpaqueType as OpaqueType,\n    BabelNodeQualifiedTypeIdentifier as QualifiedTypeIdentifier,\n    BabelNodeStringLiteralTypeAnnotation as StringLiteralTypeAnnotation,\n    BabelNodeStringTypeAnnotation as StringTypeAnnotation,\n    BabelNodeThisTypeAnnotation as ThisTypeAnnotation,\n    BabelNodeTupleTypeAnnotation as TupleTypeAnnotation,\n    BabelNodeTypeofTypeAnnotation as TypeofTypeAnnotation,\n    BabelNodeTypeAlias as TypeAlias,\n    BabelNodeTypeAnnotation as TypeAnnotation,\n    BabelNodeTypeCastExpression as TypeCastExpression,\n    BabelNodeTypeParameter as TypeParameter,\n    BabelNodeTypeParameterDeclaration as TypeParameterDeclaration,\n    BabelNodeTypeParameterInstantiation as TypeParameterInstantiation,\n    BabelNodeUnionTypeAnnotation as UnionTypeAnnotation,\n    BabelNodeVariance as Variance,\n    BabelNodeVoidTypeAnnotation as VoidTypeAnnotation,\n    BabelNodeEnumDeclaration as EnumDeclaration,\n    BabelNodeEnumBooleanBody as EnumBooleanBody,\n    BabelNodeEnumNumberBody as EnumNumberBody,\n    BabelNodeEnumStringBody as EnumStringBody,\n    BabelNodeEnumSymbolBody as EnumSymbolBody,\n    BabelNodeEnumBooleanMember as EnumBooleanMember,\n    BabelNodeEnumNumberMember as EnumNumberMember,\n    BabelNodeEnumStringMember as EnumStringMember,\n    BabelNodeEnumDefaultedMember as EnumDefaultedMember,\n    BabelNodeJSXAttribute as JSXAttribute,\n    BabelNodeJSXClosingElement as JSXClosingElement,\n    BabelNodeJSXElement as JSXElement,\n    BabelNodeJSXEmptyExpression as JSXEmptyExpression,\n    BabelNodeJSXExpressionContainer as JSXExpressionContainer,\n    BabelNodeJSXSpreadChild as JSXSpreadChild,\n    BabelNodeJSXIdentifier as JSXIdentifier,\n    BabelNodeJSXMemberExpression as JSXMemberExpression,\n    BabelNodeJSXNamespacedName as JSXNamespacedName,\n    BabelNodeJSXOpeningElement as JSXOpeningElement,\n    BabelNodeJSXSpreadAttribute as JSXSpreadAttribute,\n    BabelNodeJSXText as JSXText,\n    BabelNodeJSXFragment as JSXFragment,\n    BabelNodeJSXOpeningFragment as JSXOpeningFragment,\n    BabelNodeJSXClosingFragment as JSXClosingFragment,\n    BabelNodeNoop as Noop,\n    BabelNodePlaceholder as Placeholder,\n    BabelNodeV8IntrinsicIdentifier as V8IntrinsicIdentifier,\n    BabelNodeArgumentPlaceholder as ArgumentPlaceholder,\n    BabelNodeAwaitExpression as AwaitExpression,\n    BabelNodeBindExpression as BindExpression,\n    BabelNodeClassProperty as ClassProperty,\n    BabelNodeOptionalMemberExpression as OptionalMemberExpression,\n    BabelNodePipelineTopicExpression as PipelineTopicExpression,\n    BabelNodePipelineBareFunction as PipelineBareFunction,\n    BabelNodePipelinePrimaryTopicReference as PipelinePrimaryTopicReference,\n    BabelNodeOptionalCallExpression as OptionalCallExpression,\n    BabelNodeClassPrivateProperty as ClassPrivateProperty,\n    BabelNodeClassPrivateMethod as ClassPrivateMethod,\n    BabelNodeImport as Import,\n    BabelNodeDecorator as Decorator,\n    BabelNodeDoExpression as DoExpression,\n    BabelNodeExportDefaultSpecifier as ExportDefaultSpecifier,\n    BabelNodeExportNamespaceSpecifier as ExportNamespaceSpecifier,\n    BabelNodePrivateName as PrivateName,\n    BabelNodeBigIntLiteral as BigIntLiteral,\n    BabelNodeTSParameterProperty as TSParameterProperty,\n    BabelNodeTSDeclareFunction as TSDeclareFunction,\n    BabelNodeTSDeclareMethod as TSDeclareMethod,\n    BabelNodeTSQualifiedName as TSQualifiedName,\n    BabelNodeTSCallSignatureDeclaration as TSCallSignatureDeclaration,\n    BabelNodeTSConstructSignatureDeclaration as TSConstructSignatureDeclaration,\n    BabelNodeTSPropertySignature as TSPropertySignature,\n    BabelNodeTSMethodSignature as TSMethodSignature,\n    BabelNodeTSIndexSignature as TSIndexSignature,\n    BabelNodeTSAnyKeyword as TSAnyKeyword,\n    BabelNodeTSBooleanKeyword as TSBooleanKeyword,\n    BabelNodeTSBigIntKeyword as TSBigIntKeyword,\n    BabelNodeTSNeverKeyword as TSNeverKeyword,\n    BabelNodeTSNullKeyword as TSNullKeyword,\n    BabelNodeTSNumberKeyword as TSNumberKeyword,\n    BabelNodeTSObjectKeyword as TSObjectKeyword,\n    BabelNodeTSStringKeyword as TSStringKeyword,\n    BabelNodeTSSymbolKeyword as TSSymbolKeyword,\n    BabelNodeTSUndefinedKeyword as TSUndefinedKeyword,\n    BabelNodeTSUnknownKeyword as TSUnknownKeyword,\n    BabelNodeTSVoidKeyword as TSVoidKeyword,\n    BabelNodeTSThisType as TSThisType,\n    BabelNodeTSFunctionType as TSFunctionType,\n    BabelNodeTSConstructorType as TSConstructorType,\n    BabelNodeTSTypeReference as TSTypeReference,\n    BabelNodeTSTypePredicate as TSTypePredicate,\n    BabelNodeTSTypeQuery as TSTypeQuery,\n    BabelNodeTSTypeLiteral as TSTypeLiteral,\n    BabelNodeTSArrayType as TSArrayType,\n    BabelNodeTSTupleType as TSTupleType,\n    BabelNodeTSOptionalType as TSOptionalType,\n    BabelNodeTSRestType as TSRestType,\n    BabelNodeTSUnionType as TSUnionType,\n    BabelNodeTSIntersectionType as TSIntersectionType,\n    BabelNodeTSConditionalType as TSConditionalType,\n    BabelNodeTSInferType as TSInferType,\n    BabelNodeTSParenthesizedType as TSParenthesizedType,\n    BabelNodeTSTypeOperator as TSTypeOperator,\n    BabelNodeTSIndexedAccessType as TSIndexedAccessType,\n    BabelNodeTSMappedType as TSMappedType,\n    BabelNodeTSLiteralType as TSLiteralType,\n    BabelNodeTSExpressionWithTypeArguments as TSExpressionWithTypeArguments,\n    BabelNodeTSInterfaceDeclaration as TSInterfaceDeclaration,\n    BabelNodeTSInterfaceBody as TSInterfaceBody,\n    BabelNodeTSTypeAliasDeclaration as TSTypeAliasDeclaration,\n    BabelNodeTSAsExpression as TSAsExpression,\n    BabelNodeTSTypeAssertion as TSTypeAssertion,\n    BabelNodeTSEnumDeclaration as TSEnumDeclaration,\n    BabelNodeTSEnumMember as TSEnumMember,\n    BabelNodeTSModuleDeclaration as TSModuleDeclaration,\n    BabelNodeTSModuleBlock as TSModuleBlock,\n    BabelNodeTSImportType as TSImportType,\n    BabelNodeTSImportEqualsDeclaration as TSImportEqualsDeclaration,\n    BabelNodeTSExternalModuleReference as TSExternalModuleReference,\n    BabelNodeTSNonNullExpression as TSNonNullExpression,\n    BabelNodeTSExportAssignment as TSExportAssignment,\n    BabelNodeTSNamespaceExportDeclaration as TSNamespaceExportDeclaration,\n    BabelNodeTSTypeAnnotation as TSTypeAnnotation,\n    BabelNodeTSTypeParameterInstantiation as TSTypeParameterInstantiation,\n    BabelNodeTSTypeParameterDeclaration as TSTypeParameterDeclaration,\n    BabelNodeTSTypeParameter as TSTypeParameter\n  };\n\n  declare export type Expression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeAwaitExpression | BabelNodeBindExpression | BabelNodeOptionalMemberExpression | BabelNodePipelinePrimaryTopicReference | BabelNodeOptionalCallExpression | BabelNodeImport | BabelNodeDoExpression | BabelNodeBigIntLiteral | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression;\n  declare export type Binary = BabelNodeBinaryExpression | BabelNodeLogicalExpression;\n  declare export type Scopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock;\n  declare export type BlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock;\n  declare export type Block = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock;\n  declare export type Statement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration;\n  declare export type Terminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression;\n  declare export type CompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement;\n  declare export type Conditional = BabelNodeConditionalExpression | BabelNodeIfStatement;\n  declare export type Loop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement;\n  declare export type While = BabelNodeDoWhileStatement | BabelNodeWhileStatement;\n  declare export type ExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression;\n  declare export type For = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement;\n  declare export type ForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement;\n  declare export type Function = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod;\n  declare export type FunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod;\n  declare export type Pureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeBigIntLiteral;\n  declare export type Declaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration;\n  declare export type PatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;\n  declare export type LVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty;\n  declare export type TSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName;\n  declare export type Literal = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral;\n  declare export type Immutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeBigIntLiteral;\n  declare export type UserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty;\n  declare export type Method = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod;\n  declare export type ObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty;\n  declare export type Property = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty;\n  declare export type UnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement;\n  declare export type Pattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;\n  declare export type Class = BabelNodeClassExpression | BabelNodeClassDeclaration;\n  declare export type ModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration;\n  declare export type ExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration;\n  declare export type ModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier;\n  declare export type Flow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation;\n  declare export type FlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation;\n  declare export type FlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation;\n  declare export type FlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias;\n  declare export type FlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate;\n  declare export type EnumBody = BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody;\n  declare export type EnumMember = BabelNodeEnumBooleanMember | BabelNodeEnumNumberMember | BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember;\n  declare export type JSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment;\n  declare export type Private = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName;\n  declare export type TSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature;\n  declare export type TSType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType;\n\n  declare export function arrayExpression(elements?: ?$ReadOnlyArray<null | BabelNodeExpression | BabelNodeSpreadElement>): BabelNodeArrayExpression;\n  declare export function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression;\n  declare export function binaryExpression(operator: \"+\" | \"-\" | \"/\" | \"%\" | \"*\" | \"**\" | \"&\" | \"|\" | \">>\" | \">>>\" | \"<<\" | \"^\" | \"==\" | \"===\" | \"!=\" | \"!==\" | \"in\" | \"instanceof\" | \">\" | \"<\" | \">=\" | \"<=\", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeBinaryExpression;\n  declare export function interpreterDirective(value: string): BabelNodeInterpreterDirective;\n  declare export function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective;\n  declare export function directiveLiteral(value: string): BabelNodeDirectiveLiteral;\n  declare export function blockStatement(body: $ReadOnlyArray<BabelNodeStatement>, directives?: ?$ReadOnlyArray<BabelNodeDirective>): BabelNodeBlockStatement;\n  declare export function breakStatement(label?: ?BabelNodeIdentifier): BabelNodeBreakStatement;\n  declare export function callExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: $ReadOnlyArray<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>): BabelNodeCallExpression;\n  declare export function catchClause(param?: ?BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern, body: BabelNodeBlockStatement): BabelNodeCatchClause;\n  declare export function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression;\n  declare export function continueStatement(label?: ?BabelNodeIdentifier): BabelNodeContinueStatement;\n  declare export function debuggerStatement(): BabelNodeDebuggerStatement;\n  declare export function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement;\n  declare export function emptyStatement(): BabelNodeEmptyStatement;\n  declare export function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement;\n  declare export function file(program: BabelNodeProgram, comments: any, tokens: any): BabelNodeFile;\n  declare export function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement;\n  declare export function forStatement(init?: ?BabelNodeVariableDeclaration | BabelNodeExpression, test?: ?BabelNodeExpression, update?: ?BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement;\n  declare export function functionDeclaration(id?: ?BabelNodeIdentifier, params: $ReadOnlyArray<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, generator?: ?boolean, async?: ?boolean): BabelNodeFunctionDeclaration;\n  declare export function functionExpression(id?: ?BabelNodeIdentifier, params: $ReadOnlyArray<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, generator?: ?boolean, async?: ?boolean): BabelNodeFunctionExpression;\n  declare export function identifier(name: string): BabelNodeIdentifier;\n  declare export function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: ?BabelNodeStatement): BabelNodeIfStatement;\n  declare export function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement;\n  declare export function stringLiteral(value: string): BabelNodeStringLiteral;\n  declare export function numericLiteral(value: number): BabelNodeNumericLiteral;\n  declare export function nullLiteral(): BabelNodeNullLiteral;\n  declare export function booleanLiteral(value: boolean): BabelNodeBooleanLiteral;\n  declare export function regExpLiteral(pattern: string, flags?: ?any): BabelNodeRegExpLiteral;\n  declare export function logicalExpression(operator: \"||\" | \"&&\" | \"??\", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression;\n  declare export function memberExpression(object: BabelNodeExpression, property: BabelNodeExpression | BabelNodeIdentifier, computed?: ?boolean, optional?: ?true | false): BabelNodeMemberExpression;\n  declare export function newExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: $ReadOnlyArray<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>): BabelNodeNewExpression;\n  declare export function program(body: $ReadOnlyArray<BabelNodeStatement>, directives?: ?$ReadOnlyArray<BabelNodeDirective>, sourceType?: ?\"script\" | \"module\", interpreter?: ?BabelNodeInterpreterDirective): BabelNodeProgram;\n  declare export function objectExpression(properties: $ReadOnlyArray<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeObjectExpression;\n  declare export function objectMethod(kind?: ?\"method\" | \"get\" | \"set\", key: any, params: $ReadOnlyArray<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, computed?: ?boolean, generator?: ?boolean, async?: ?boolean): BabelNodeObjectMethod;\n  declare export function objectProperty(key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeLiteral, value: BabelNodeExpression | BabelNodePatternLike, computed?: ?boolean, shorthand?: ?any, decorators?: ?$ReadOnlyArray<BabelNodeDecorator>): BabelNodeObjectProperty;\n  declare export function restElement(argument: BabelNodeLVal): BabelNodeRestElement;\n  declare export function returnStatement(argument?: ?BabelNodeExpression): BabelNodeReturnStatement;\n  declare export function sequenceExpression(expressions: $ReadOnlyArray<BabelNodeExpression>): BabelNodeSequenceExpression;\n  declare export function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression;\n  declare export function switchCase(test?: ?BabelNodeExpression, consequent: $ReadOnlyArray<BabelNodeStatement>): BabelNodeSwitchCase;\n  declare export function switchStatement(discriminant: BabelNodeExpression, cases: $ReadOnlyArray<BabelNodeSwitchCase>): BabelNodeSwitchStatement;\n  declare export function thisExpression(): BabelNodeThisExpression;\n  declare export function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement;\n  declare export function tryStatement(block: any, handler?: ?BabelNodeCatchClause, finalizer?: ?BabelNodeBlockStatement): BabelNodeTryStatement;\n  declare export function unaryExpression(operator: \"void\" | \"throw\" | \"delete\" | \"!\" | \"+\" | \"-\" | \"~\" | \"typeof\", argument: BabelNodeExpression, prefix?: ?boolean): BabelNodeUnaryExpression;\n  declare export function updateExpression(operator: \"++\" | \"--\", argument: BabelNodeExpression, prefix?: ?boolean): BabelNodeUpdateExpression;\n  declare export function variableDeclaration(kind: \"var\" | \"let\" | \"const\", declarations: $ReadOnlyArray<BabelNodeVariableDeclarator>): BabelNodeVariableDeclaration;\n  declare export function variableDeclarator(id: BabelNodeLVal, init?: ?BabelNodeExpression): BabelNodeVariableDeclarator;\n  declare export function whileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWhileStatement;\n  declare export function withStatement(object: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWithStatement;\n  declare export function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression): BabelNodeAssignmentPattern;\n  declare export function arrayPattern(elements: $ReadOnlyArray<null | BabelNodePatternLike>): BabelNodeArrayPattern;\n  declare export function arrowFunctionExpression(params: $ReadOnlyArray<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement | BabelNodeExpression, async?: ?boolean): BabelNodeArrowFunctionExpression;\n  declare export function classBody(body: $ReadOnlyArray<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature>): BabelNodeClassBody;\n  declare export function classExpression(id?: ?BabelNodeIdentifier, superClass?: ?BabelNodeExpression, body: BabelNodeClassBody, decorators?: ?$ReadOnlyArray<BabelNodeDecorator>): BabelNodeClassExpression;\n  declare export function classDeclaration(id: ?BabelNodeIdentifier, superClass: any, body: any, decorators: any): BabelNodeClassDeclaration;\n  declare export function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration;\n  declare export function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration;\n  declare export function exportNamedDeclaration(declaration?: ?any, specifiers?: ?$ReadOnlyArray<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>, source?: ?BabelNodeStringLiteral): BabelNodeExportNamedDeclaration;\n  declare export function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier): BabelNodeExportSpecifier;\n  declare export function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: ?boolean): BabelNodeForOfStatement;\n  declare export function importDeclaration(specifiers: $ReadOnlyArray<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>, source: BabelNodeStringLiteral): BabelNodeImportDeclaration;\n  declare export function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier;\n  declare export function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier;\n  declare export function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier): BabelNodeImportSpecifier;\n  declare export function metaProperty(meta: any, property: BabelNodeIdentifier): BabelNodeMetaProperty;\n  declare export function classMethod(kind?: ?\"get\" | \"set\" | \"method\" | \"constructor\", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: $ReadOnlyArray<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, computed?: ?boolean, _static?: ?boolean, generator?: ?boolean, async?: ?boolean): BabelNodeClassMethod;\n  declare export function objectPattern(properties: $ReadOnlyArray<BabelNodeRestElement | BabelNodeObjectProperty>): BabelNodeObjectPattern;\n  declare export function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement;\n  declare function _super(): BabelNodeSuper;\n  declare export { _super as super }\n  declare export function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral): BabelNodeTaggedTemplateExpression;\n  declare export function templateElement(value: {| raw: string, cooked?: string |}, tail?: ?boolean): BabelNodeTemplateElement;\n  declare export function templateLiteral(quasis: $ReadOnlyArray<BabelNodeTemplateElement>, expressions: $ReadOnlyArray<BabelNodeExpression>): BabelNodeTemplateLiteral;\n  declare export function yieldExpression(argument?: ?BabelNodeExpression, delegate?: ?any): BabelNodeYieldExpression;\n  declare export function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation;\n  declare export function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation;\n  declare export function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation;\n  declare export function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation;\n  declare export function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation;\n  declare export function classImplements(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTypeParameterInstantiation): BabelNodeClassImplements;\n  declare export function declareClass(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTypeParameterDeclaration, _extends?: ?$ReadOnlyArray<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareClass;\n  declare export function declareFunction(id: BabelNodeIdentifier): BabelNodeDeclareFunction;\n  declare export function declareInterface(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTypeParameterDeclaration, _extends?: ?$ReadOnlyArray<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareInterface;\n  declare export function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: ?\"CommonJS\" | \"ES\"): BabelNodeDeclareModule;\n  declare export function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports;\n  declare export function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias;\n  declare export function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTypeParameterDeclaration, supertype?: ?BabelNodeFlowType): BabelNodeDeclareOpaqueType;\n  declare export function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable;\n  declare export function declareExportDeclaration(declaration?: ?BabelNodeFlow, specifiers?: ?$ReadOnlyArray<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>, source?: ?BabelNodeStringLiteral): BabelNodeDeclareExportDeclaration;\n  declare export function declareExportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeDeclareExportAllDeclaration;\n  declare export function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate;\n  declare export function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation;\n  declare export function functionTypeAnnotation(typeParameters?: ?BabelNodeTypeParameterDeclaration, params: $ReadOnlyArray<BabelNodeFunctionTypeParam>, rest?: ?BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation;\n  declare export function functionTypeParam(name?: ?BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType): BabelNodeFunctionTypeParam;\n  declare export function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: ?BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation;\n  declare export function inferredPredicate(): BabelNodeInferredPredicate;\n  declare export function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: ?BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends;\n  declare export function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTypeParameterDeclaration, _extends?: ?$ReadOnlyArray<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceDeclaration;\n  declare export function interfaceTypeAnnotation(_extends?: ?$ReadOnlyArray<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation;\n  declare export function intersectionTypeAnnotation(types: $ReadOnlyArray<BabelNodeFlowType>): BabelNodeIntersectionTypeAnnotation;\n  declare export function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation;\n  declare export function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation;\n  declare export function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation;\n  declare export function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation;\n  declare export function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation;\n  declare export function objectTypeAnnotation(properties: $ReadOnlyArray<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>, indexers?: ?$ReadOnlyArray<BabelNodeObjectTypeIndexer>, callProperties?: ?$ReadOnlyArray<BabelNodeObjectTypeCallProperty>, internalSlots?: ?$ReadOnlyArray<BabelNodeObjectTypeInternalSlot>, exact?: ?boolean): BabelNodeObjectTypeAnnotation;\n  declare export function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot;\n  declare export function objectTypeCallProperty(value: BabelNodeFlowType): BabelNodeObjectTypeCallProperty;\n  declare export function objectTypeIndexer(id?: ?BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: ?BabelNodeVariance): BabelNodeObjectTypeIndexer;\n  declare export function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: ?BabelNodeVariance): BabelNodeObjectTypeProperty;\n  declare export function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty;\n  declare export function opaqueType(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTypeParameterDeclaration, supertype?: ?BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType;\n  declare export function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier;\n  declare export function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation;\n  declare export function stringTypeAnnotation(): BabelNodeStringTypeAnnotation;\n  declare export function thisTypeAnnotation(): BabelNodeThisTypeAnnotation;\n  declare export function tupleTypeAnnotation(types: $ReadOnlyArray<BabelNodeFlowType>): BabelNodeTupleTypeAnnotation;\n  declare export function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation;\n  declare export function typeAlias(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias;\n  declare export function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation;\n  declare export function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression;\n  declare export function typeParameter(bound?: ?BabelNodeTypeAnnotation, _default?: ?BabelNodeFlowType, variance?: ?BabelNodeVariance): BabelNodeTypeParameter;\n  declare export function typeParameterDeclaration(params: $ReadOnlyArray<BabelNodeTypeParameter>): BabelNodeTypeParameterDeclaration;\n  declare export function typeParameterInstantiation(params: $ReadOnlyArray<BabelNodeFlowType>): BabelNodeTypeParameterInstantiation;\n  declare export function unionTypeAnnotation(types: $ReadOnlyArray<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation;\n  declare export function variance(kind: \"minus\" | \"plus\"): BabelNodeVariance;\n  declare export function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation;\n  declare export function enumDeclaration(id: BabelNodeIdentifier, body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody): BabelNodeEnumDeclaration;\n  declare export function enumBooleanBody(members: $ReadOnlyArray<BabelNodeEnumBooleanMember>): BabelNodeEnumBooleanBody;\n  declare export function enumNumberBody(members: $ReadOnlyArray<BabelNodeEnumNumberMember>): BabelNodeEnumNumberBody;\n  declare export function enumStringBody(members: $ReadOnlyArray<BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember>): BabelNodeEnumStringBody;\n  declare export function enumSymbolBody(members: $ReadOnlyArray<BabelNodeEnumDefaultedMember>): BabelNodeEnumSymbolBody;\n  declare export function enumBooleanMember(id: BabelNodeIdentifier): BabelNodeEnumBooleanMember;\n  declare export function enumNumberMember(id: BabelNodeIdentifier, init: BabelNodeNumericLiteral): BabelNodeEnumNumberMember;\n  declare export function enumStringMember(id: BabelNodeIdentifier, init: BabelNodeStringLiteral): BabelNodeEnumStringMember;\n  declare export function enumDefaultedMember(id: BabelNodeIdentifier): BabelNodeEnumDefaultedMember;\n  declare export function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: ?BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute;\n  declare export function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName): BabelNodeJSXClosingElement;\n  declare export function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: ?BabelNodeJSXClosingElement, children: $ReadOnlyArray<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>, selfClosing: any): BabelNodeJSXElement;\n  declare export function jsxEmptyExpression(): BabelNodeJSXEmptyExpression;\n  declare export function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer;\n  declare export function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild;\n  declare export function jsxIdentifier(name: string): BabelNodeJSXIdentifier;\n  declare export function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression;\n  declare export function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName;\n  declare export function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName, attributes: $ReadOnlyArray<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>, selfClosing?: ?boolean): BabelNodeJSXOpeningElement;\n  declare export function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute;\n  declare export function jsxText(value: string): BabelNodeJSXText;\n  declare export function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: $ReadOnlyArray<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>): BabelNodeJSXFragment;\n  declare export function jsxOpeningFragment(): BabelNodeJSXOpeningFragment;\n  declare export function jsxClosingFragment(): BabelNodeJSXClosingFragment;\n  declare export function noop(): BabelNodeNoop;\n  declare export function placeholder(expectedNode: \"Identifier\" | \"StringLiteral\" | \"Expression\" | \"Statement\" | \"Declaration\" | \"BlockStatement\" | \"ClassBody\" | \"Pattern\", name: BabelNodeIdentifier): BabelNodePlaceholder;\n  declare export function v8IntrinsicIdentifier(name: string): BabelNodeV8IntrinsicIdentifier;\n  declare export function argumentPlaceholder(): BabelNodeArgumentPlaceholder;\n  declare export function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression;\n  declare export function bindExpression(object: any, callee: any): BabelNodeBindExpression;\n  declare export function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: ?BabelNodeExpression, typeAnnotation?: ?BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: ?$ReadOnlyArray<BabelNodeDecorator>, computed?: ?boolean, _static?: ?boolean): BabelNodeClassProperty;\n  declare export function optionalMemberExpression(object: BabelNodeExpression, property: any, computed?: ?boolean, optional: boolean): BabelNodeOptionalMemberExpression;\n  declare export function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression;\n  declare export function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction;\n  declare export function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference;\n  declare export function optionalCallExpression(callee: BabelNodeExpression, _arguments: $ReadOnlyArray<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName>, optional: boolean): BabelNodeOptionalCallExpression;\n  declare export function classPrivateProperty(key: BabelNodePrivateName, value?: ?BabelNodeExpression, decorators?: ?$ReadOnlyArray<BabelNodeDecorator>): BabelNodeClassPrivateProperty;\n  declare export function classPrivateMethod(kind?: ?\"get\" | \"set\" | \"method\" | \"constructor\", key: BabelNodePrivateName, params: $ReadOnlyArray<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, _static?: ?boolean): BabelNodeClassPrivateMethod;\n  declare function _import(): BabelNodeImport;\n  declare export { _import as import }\n  declare export function decorator(expression: BabelNodeExpression): BabelNodeDecorator;\n  declare export function doExpression(body: BabelNodeBlockStatement): BabelNodeDoExpression;\n  declare export function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier;\n  declare export function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier;\n  declare export function privateName(id: BabelNodeIdentifier): BabelNodePrivateName;\n  declare export function bigIntLiteral(value: string): BabelNodeBigIntLiteral;\n  declare export function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern): BabelNodeTSParameterProperty;\n  declare export function tsDeclareFunction(id?: ?BabelNodeIdentifier, typeParameters?: ?BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: $ReadOnlyArray<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, returnType?: ?BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareFunction;\n  declare export function tsDeclareMethod(decorators?: ?$ReadOnlyArray<BabelNodeDecorator>, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: ?BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: $ReadOnlyArray<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, returnType?: ?BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareMethod;\n  declare export function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName;\n  declare export function tsCallSignatureDeclaration(typeParameters?: ?BabelNodeTSTypeParameterDeclaration, parameters: $ReadOnlyArray<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: ?BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration;\n  declare export function tsConstructSignatureDeclaration(typeParameters?: ?BabelNodeTSTypeParameterDeclaration, parameters: $ReadOnlyArray<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: ?BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration;\n  declare export function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: ?BabelNodeTSTypeAnnotation, initializer?: ?BabelNodeExpression): BabelNodeTSPropertySignature;\n  declare export function tsMethodSignature(key: BabelNodeExpression, typeParameters?: ?BabelNodeTSTypeParameterDeclaration, parameters: $ReadOnlyArray<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: ?BabelNodeTSTypeAnnotation): BabelNodeTSMethodSignature;\n  declare export function tsIndexSignature(parameters: $ReadOnlyArray<BabelNodeIdentifier>, typeAnnotation?: ?BabelNodeTSTypeAnnotation): BabelNodeTSIndexSignature;\n  declare export function tsAnyKeyword(): BabelNodeTSAnyKeyword;\n  declare export function tsBooleanKeyword(): BabelNodeTSBooleanKeyword;\n  declare export function tsBigIntKeyword(): BabelNodeTSBigIntKeyword;\n  declare export function tsNeverKeyword(): BabelNodeTSNeverKeyword;\n  declare export function tsNullKeyword(): BabelNodeTSNullKeyword;\n  declare export function tsNumberKeyword(): BabelNodeTSNumberKeyword;\n  declare export function tsObjectKeyword(): BabelNodeTSObjectKeyword;\n  declare export function tsStringKeyword(): BabelNodeTSStringKeyword;\n  declare export function tsSymbolKeyword(): BabelNodeTSSymbolKeyword;\n  declare export function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword;\n  declare export function tsUnknownKeyword(): BabelNodeTSUnknownKeyword;\n  declare export function tsVoidKeyword(): BabelNodeTSVoidKeyword;\n  declare export function tsThisType(): BabelNodeTSThisType;\n  declare export function tsFunctionType(typeParameters?: ?BabelNodeTSTypeParameterDeclaration, parameters: $ReadOnlyArray<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: ?BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType;\n  declare export function tsConstructorType(typeParameters?: ?BabelNodeTSTypeParameterDeclaration, parameters: $ReadOnlyArray<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: ?BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType;\n  declare export function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: ?BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference;\n  declare export function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation?: ?BabelNodeTSTypeAnnotation, asserts?: ?boolean): BabelNodeTSTypePredicate;\n  declare export function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery;\n  declare export function tsTypeLiteral(members: $ReadOnlyArray<BabelNodeTSTypeElement>): BabelNodeTSTypeLiteral;\n  declare export function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType;\n  declare export function tsTupleType(elementTypes: $ReadOnlyArray<BabelNodeTSType>): BabelNodeTSTupleType;\n  declare export function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType;\n  declare export function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType;\n  declare export function tsUnionType(types: $ReadOnlyArray<BabelNodeTSType>): BabelNodeTSUnionType;\n  declare export function tsIntersectionType(types: $ReadOnlyArray<BabelNodeTSType>): BabelNodeTSIntersectionType;\n  declare export function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType;\n  declare export function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType;\n  declare export function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType;\n  declare export function tsTypeOperator(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeOperator;\n  declare export function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType;\n  declare export function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: ?BabelNodeTSType): BabelNodeTSMappedType;\n  declare export function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral): BabelNodeTSLiteralType;\n  declare export function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: ?BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments;\n  declare export function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTSTypeParameterDeclaration, _extends?: ?$ReadOnlyArray<BabelNodeTSExpressionWithTypeArguments>, body: BabelNodeTSInterfaceBody): BabelNodeTSInterfaceDeclaration;\n  declare export function tsInterfaceBody(body: $ReadOnlyArray<BabelNodeTSTypeElement>): BabelNodeTSInterfaceBody;\n  declare export function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: ?BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAliasDeclaration;\n  declare export function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression;\n  declare export function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion;\n  declare export function tsEnumDeclaration(id: BabelNodeIdentifier, members: $ReadOnlyArray<BabelNodeTSEnumMember>): BabelNodeTSEnumDeclaration;\n  declare export function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: ?BabelNodeExpression): BabelNodeTSEnumMember;\n  declare export function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration): BabelNodeTSModuleDeclaration;\n  declare export function tsModuleBlock(body: $ReadOnlyArray<BabelNodeStatement>): BabelNodeTSModuleBlock;\n  declare export function tsImportType(argument: BabelNodeStringLiteral, qualifier?: ?BabelNodeTSEntityName, typeParameters?: ?BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType;\n  declare export function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference): BabelNodeTSImportEqualsDeclaration;\n  declare export function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference;\n  declare export function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression;\n  declare export function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment;\n  declare export function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration;\n  declare export function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation;\n  declare export function tsTypeParameterInstantiation(params: $ReadOnlyArray<BabelNodeTSType>): BabelNodeTSTypeParameterInstantiation;\n  declare export function tsTypeParameterDeclaration(params: $ReadOnlyArray<BabelNodeTSTypeParameter>): BabelNodeTSTypeParameterDeclaration;\n  declare export function tsTypeParameter(constraint?: ?BabelNodeTSType, _default?: ?BabelNodeTSType, name: string): BabelNodeTSTypeParameter;\n  declare export function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression)\n  declare export function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression)\n  declare export function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression)\n  declare export function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective)\n  declare export function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective)\n  declare export function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral)\n  declare export function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement)\n  declare export function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement)\n  declare export function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression)\n  declare export function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause)\n  declare export function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression)\n  declare export function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement)\n  declare export function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement)\n  declare export function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement)\n  declare export function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement)\n  declare export function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement)\n  declare export function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile)\n  declare export function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement)\n  declare export function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement)\n  declare export function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration)\n  declare export function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression)\n  declare export function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier)\n  declare export function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement)\n  declare export function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement)\n  declare export function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral)\n  declare export function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral)\n  declare export function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral)\n  declare export function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral)\n  declare export function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral)\n  declare export function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression)\n  declare export function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression)\n  declare export function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression)\n  declare export function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram)\n  declare export function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression)\n  declare export function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod)\n  declare export function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty)\n  declare export function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement)\n  declare export function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement)\n  declare export function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression)\n  declare export function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression)\n  declare export function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase)\n  declare export function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement)\n  declare export function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression)\n  declare export function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement)\n  declare export function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement)\n  declare export function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression)\n  declare export function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression)\n  declare export function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration)\n  declare export function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator)\n  declare export function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement)\n  declare export function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement)\n  declare export function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern)\n  declare export function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern)\n  declare export function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression)\n  declare export function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody)\n  declare export function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression)\n  declare export function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration)\n  declare export function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration)\n  declare export function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration)\n  declare export function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration)\n  declare export function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier)\n  declare export function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement)\n  declare export function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration)\n  declare export function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier)\n  declare export function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier)\n  declare export function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier)\n  declare export function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty)\n  declare export function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod)\n  declare export function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern)\n  declare export function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement)\n  declare export function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper)\n  declare export function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression)\n  declare export function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement)\n  declare export function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral)\n  declare export function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression)\n  declare export function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation)\n  declare export function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation)\n  declare export function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation)\n  declare export function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation)\n  declare export function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation)\n  declare export function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements)\n  declare export function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass)\n  declare export function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction)\n  declare export function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface)\n  declare export function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule)\n  declare export function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports)\n  declare export function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias)\n  declare export function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType)\n  declare export function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable)\n  declare export function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration)\n  declare export function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration)\n  declare export function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate)\n  declare export function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation)\n  declare export function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation)\n  declare export function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam)\n  declare export function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation)\n  declare export function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate)\n  declare export function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends)\n  declare export function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration)\n  declare export function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation)\n  declare export function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation)\n  declare export function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation)\n  declare export function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation)\n  declare export function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation)\n  declare export function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation)\n  declare export function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation)\n  declare export function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation)\n  declare export function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot)\n  declare export function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty)\n  declare export function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer)\n  declare export function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty)\n  declare export function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty)\n  declare export function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType)\n  declare export function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier)\n  declare export function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation)\n  declare export function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation)\n  declare export function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation)\n  declare export function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation)\n  declare export function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation)\n  declare export function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias)\n  declare export function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation)\n  declare export function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression)\n  declare export function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter)\n  declare export function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration)\n  declare export function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation)\n  declare export function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation)\n  declare export function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance)\n  declare export function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation)\n  declare export function isEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDeclaration)\n  declare export function isEnumBooleanBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanBody)\n  declare export function isEnumNumberBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberBody)\n  declare export function isEnumStringBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringBody)\n  declare export function isEnumSymbolBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumSymbolBody)\n  declare export function isEnumBooleanMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanMember)\n  declare export function isEnumNumberMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberMember)\n  declare export function isEnumStringMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringMember)\n  declare export function isEnumDefaultedMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDefaultedMember)\n  declare export function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute)\n  declare export function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement)\n  declare export function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement)\n  declare export function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression)\n  declare export function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer)\n  declare export function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild)\n  declare export function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier)\n  declare export function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression)\n  declare export function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName)\n  declare export function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement)\n  declare export function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute)\n  declare export function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText)\n  declare export function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment)\n  declare export function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment)\n  declare export function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment)\n  declare export function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop)\n  declare export function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder)\n  declare export function isV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeV8IntrinsicIdentifier)\n  declare export function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder)\n  declare export function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression)\n  declare export function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression)\n  declare export function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty)\n  declare export function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression)\n  declare export function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression)\n  declare export function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction)\n  declare export function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference)\n  declare export function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression)\n  declare export function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty)\n  declare export function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod)\n  declare export function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport)\n  declare export function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator)\n  declare export function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression)\n  declare export function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier)\n  declare export function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier)\n  declare export function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName)\n  declare export function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral)\n  declare export function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty)\n  declare export function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction)\n  declare export function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod)\n  declare export function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName)\n  declare export function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration)\n  declare export function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration)\n  declare export function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature)\n  declare export function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature)\n  declare export function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature)\n  declare export function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword)\n  declare export function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword)\n  declare export function isTSBigIntKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBigIntKeyword)\n  declare export function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword)\n  declare export function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword)\n  declare export function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword)\n  declare export function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword)\n  declare export function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword)\n  declare export function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword)\n  declare export function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword)\n  declare export function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword)\n  declare export function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword)\n  declare export function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType)\n  declare export function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType)\n  declare export function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType)\n  declare export function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference)\n  declare export function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate)\n  declare export function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery)\n  declare export function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral)\n  declare export function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType)\n  declare export function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType)\n  declare export function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType)\n  declare export function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType)\n  declare export function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType)\n  declare export function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType)\n  declare export function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType)\n  declare export function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType)\n  declare export function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType)\n  declare export function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator)\n  declare export function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType)\n  declare export function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType)\n  declare export function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType)\n  declare export function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments)\n  declare export function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration)\n  declare export function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody)\n  declare export function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration)\n  declare export function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression)\n  declare export function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion)\n  declare export function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration)\n  declare export function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember)\n  declare export function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration)\n  declare export function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock)\n  declare export function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType)\n  declare export function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration)\n  declare export function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference)\n  declare export function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression)\n  declare export function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment)\n  declare export function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration)\n  declare export function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation)\n  declare export function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation)\n  declare export function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration)\n  declare export function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter)\n  declare export function isExpression(node: ?Object, opts?: ?Object): boolean\n  declare export function isBinary(node: ?Object, opts?: ?Object): boolean\n  declare export function isScopable(node: ?Object, opts?: ?Object): boolean\n  declare export function isBlockParent(node: ?Object, opts?: ?Object): boolean\n  declare export function isBlock(node: ?Object, opts?: ?Object): boolean\n  declare export function isStatement(node: ?Object, opts?: ?Object): boolean\n  declare export function isTerminatorless(node: ?Object, opts?: ?Object): boolean\n  declare export function isCompletionStatement(node: ?Object, opts?: ?Object): boolean\n  declare export function isConditional(node: ?Object, opts?: ?Object): boolean\n  declare export function isLoop(node: ?Object, opts?: ?Object): boolean\n  declare export function isWhile(node: ?Object, opts?: ?Object): boolean\n  declare export function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean\n  declare export function isFor(node: ?Object, opts?: ?Object): boolean\n  declare export function isForXStatement(node: ?Object, opts?: ?Object): boolean\n  declare export function isFunction(node: ?Object, opts?: ?Object): boolean\n  declare export function isFunctionParent(node: ?Object, opts?: ?Object): boolean\n  declare export function isPureish(node: ?Object, opts?: ?Object): boolean\n  declare export function isDeclaration(node: ?Object, opts?: ?Object): boolean\n  declare export function isPatternLike(node: ?Object, opts?: ?Object): boolean\n  declare export function isLVal(node: ?Object, opts?: ?Object): boolean\n  declare export function isTSEntityName(node: ?Object, opts?: ?Object): boolean\n  declare export function isLiteral(node: ?Object, opts?: ?Object): boolean\n  declare export function isImmutable(node: ?Object, opts?: ?Object): boolean\n  declare export function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean\n  declare export function isMethod(node: ?Object, opts?: ?Object): boolean\n  declare export function isObjectMember(node: ?Object, opts?: ?Object): boolean\n  declare export function isProperty(node: ?Object, opts?: ?Object): boolean\n  declare export function isUnaryLike(node: ?Object, opts?: ?Object): boolean\n  declare export function isPattern(node: ?Object, opts?: ?Object): boolean\n  declare export function isClass(node: ?Object, opts?: ?Object): boolean\n  declare export function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean\n  declare export function isExportDeclaration(node: ?Object, opts?: ?Object): boolean\n  declare export function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean\n  declare export function isFlow(node: ?Object, opts?: ?Object): boolean\n  declare export function isFlowType(node: ?Object, opts?: ?Object): boolean\n  declare export function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean\n  declare export function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean\n  declare export function isFlowPredicate(node: ?Object, opts?: ?Object): boolean\n  declare export function isEnumBody(node: ?Object, opts?: ?Object): boolean\n  declare export function isEnumMember(node: ?Object, opts?: ?Object): boolean\n  declare export function isJSX(node: ?Object, opts?: ?Object): boolean\n  declare export function isPrivate(node: ?Object, opts?: ?Object): boolean\n  declare export function isTSTypeElement(node: ?Object, opts?: ?Object): boolean\n  declare export function isTSType(node: ?Object, opts?: ?Object): boolean\n  declare export function isNumberLiteral(node: ?Object, opts?: ?Object): boolean\n  declare export function isRegexLiteral(node: ?Object, opts?: ?Object): boolean\n  declare export function isRestProperty(node: ?Object, opts?: ?Object): boolean\n  declare export function isSpreadProperty(node: ?Object, opts?: ?Object): boolean\n  declare export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): BabelNodeTypeAnnotation\n  declare export function createUnionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation\n  declare export function buildChildren(node: {| children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeJSXEmptyExpression> |}): Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>\n  declare export function clone<T: BabelNode>(n: T): T;\n  declare export function cloneDeep<T: BabelNode>(n: T): T;\n  declare export function cloneNode<T: BabelNode>(n: T, deep?: boolean): T;\n  declare export function cloneWithoutLoc<T: BabelNode>(n: T): T;\n  declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing';\n  declare export function addComment<T: BabelNode>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T;\n  declare export function addComments<T: BabelNode>(node: T, type: CommentTypeShorthand, comments: Array<BabelNodeComment>): T;\n  declare export function inheritInnerComments(node: BabelNode, parent: BabelNode): void\n  declare export function inheritLeadingComments(node: BabelNode, parent: BabelNode): void\n  declare export function inheritsComments(node: BabelNode, parent: BabelNode): void\n  declare export function inheritTrailingComments(node: BabelNode, parent: BabelNode): void\n  declare export function removeComments<T: BabelNode>(node: T): T;\n  declare export function ensureBlock(node: BabelNode, key: string): BabelNodeBlockStatement;\n  declare export function toBindingIdentifierName(name?: ?string): string;\n  declare export function toBlock(node: BabelNodeStatement | BabelNodeExpression, parent?: BabelNodeFunction | null): BabelNodeBlockStatement;\n  declare export function toComputedKey(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNodeExpression | BabelNodeIdentifier): BabelNodeExpression;\n  declare export function toExpression(node: BabelNodeFunctionDeclaration | BabelNodeFunctionExpression): BabelNodeFunctionExpression;\n  declare export function toExpression(node: BabelNodeClassDeclaration | BabelNodeClassExpression): BabelNodeClassExpression;\n  declare export function toExpression(node: BabelNodeExpressionStatement | BabelNodeExpression): BabelNodeExpression;\n  declare export function toIdentifier(name?: ?string): string\n  declare export function toKeyAlias(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNode): string;\n  declare export function toStatement(node: BabelNodeStatement | BabelNodeClass | BabelNodeFunction | BabelNodeAssignmentExpression, ignore?: boolean): BabelNodeStatement | void\n  declare export function valueToNode(value: typeof undefined): BabelNodeIdentifier\n  declare export function valueToNode(value: boolean): BabelNodeBooleanLiteral\n  declare export function valueToNode(value: null): BabelNodeNullLiteral\n  declare export function valueToNode(value: string): BabelNodeStringLiteral\n  declare export function valueToNode(value: number): BabelNodeNumericLiteral\n  declare export function valueToNode(value: RegExp): BabelNodeRegExpLiteral\n  declare export function valueToNode(value: $ReadOnlyArray<typeof undefined | boolean | null | string | number | RegExp | {[any]: any, ...}>): BabelNodeArrayExpression\n  declare export function valueToNode(value: {[any]: any, ...}): BabelNodeObjectExpression\n  declare export function removeTypeDuplicates(types: Array<BabelNodeFlowType>): Array<BabelNodeFlowType>\n  declare export function appendToMemberExpression(member: BabelNodeMemberExpression, append: BabelNode, computed?: boolean): BabelNodeMemberExpression\n  declare export function inherits<T: BabelNode>(child: T, parent: BabelNode | null | void): T\n  declare export function prependToMemberExpression(member: BabelNodeMemberExpression, prepend: BabelNodeExpression): BabelNodeMemberExpression\n  declare export function removeProperties<T>(n: T, opts?: {| preserveComments?: boolean |}): void;\n  declare export function removePropertiesDeep<T>(n: T, opts?: {| preserveComments?: boolean |}): T;\n  declare export function getBindingIdentifiers(node: BabelNode): { [key: string]: BabelNodeIdentifier, ... }\n  declare export function getBindingIdentifiers(node: BabelNode, duplicates: false, outerOnly?: boolean): { [key: string]: BabelNodeIdentifier, ... }\n  declare export function getBindingIdentifiers(node: BabelNode, duplicates: true, outerOnly?: boolean): { [key: string]: BabelNodeIdentifier | Array<BabelNodeIdentifier>, ... }\n  declare export function getOuterBindingIdentifiers(node: BabelNode, duplicates?: boolean): { [key: string]: BabelNodeIdentifier | Array<BabelNodeIdentifier>, ... }\n  declare export type TraversalAncestors = Array<{|\n    node: BabelNode,\n    key: string,\n    index?: number,\n  |}>;\n  declare export type TraversalHandler<T> = (BabelNode, TraversalAncestors, T) => void;\n  declare export type TraversalHandlers<T> = {|\n    enter?: TraversalHandler<T>,\n    exit?: TraversalHandler<T>,\n  |};\n  declare export function traverse<T>(n: BabelNode, TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;\n  declare export function traverseFast<T>(n: BabelNode, h: TraversalHandler<T>, state?: T): void;\n  declare export function shallowEqual(actual: Object, expected: Object): boolean;\n  declare export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean;\n  declare export function is(type: string, n: BabelNode, opts: Object): boolean;\n  declare export function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean;\n  declare export function isBlockScoped(node: BabelNode): boolean;\n  declare export function isImmutable(node: BabelNode): boolean;\n  declare export function isLet(node: BabelNode): boolean;\n  declare export function isNode(node: ?Object): boolean;\n  declare export function isNodesEquivalent(a: any, b: any): boolean;\n  declare export function isPlaceholderType(placeholderType: string, targetType: string): boolean;\n  declare export function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean;\n  declare export function isScope(node: BabelNode, parent?: BabelNode): boolean;\n  declare export function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean;\n  declare export function isType(nodetype: ?string, targetType: string): boolean;\n  declare export function isValidES3Identifier(name: string): boolean;\n  declare export function isValidES3Identifier(name: string): boolean;\n  declare export function isValidIdentifier(name: string, reserved?: boolean): boolean;\n  declare export function isVar(node: BabelNode): boolean;\n  declare export function matchesPattern(node: ?BabelNode, match: string | Array<string>, allowPartial?: boolean): boolean;\n  declare export function validate(n: BabelNode, key: string, value: mixed): void;\n\n  declare export var TYPES: Array<string>;\n  declare export var VISITOR_KEYS: {[string]: string, ...};\n  declare export var FLIPPED_ALIAS_KEYS: {[string]: Array<string>, ...};\n  declare export var DEPRECATED_KEYS: {[string]: string, ...};\n}\n"
  },
  {
    "path": "flow-libs/base-x.js.flow",
    "content": "// @flow\n\n// Derived from the base-x source available at:\n// https://github.com/cryptocoinjs/base-x\n// Which is licensed MIT\n\ndeclare module 'base-x' {\n  declare type BaseX = {|\n    decode(encoded: string): Buffer,\n    encode(buffer: Buffer): string,\n  |};\n\n  declare module.exports: (alphabet: string) => BaseX;\n}\n"
  },
  {
    "path": "flow-libs/browserslist.js.flow",
    "content": "// @flow strict-local\n\ndeclare module 'browserslist' {\n  declare type BrowserslistConfig = {|[string]: string | Array<string>|};\n  declare type Options = {|\n    path?: string,\n    env?: string,\n    stats?: string,\n    config?: string,\n    ignoreUnknownVersions?: boolean,\n    dangerousExtend?: boolean,\n    mobileToDesktop?: boolean,\n  |};\n\n  declare module.exports: {|\n    (query?: string | Array<string>, opts?: Options): Array<string>,\n    parseConfig(configResult: string): BrowserslistConfig,\n    loadConfig(opts: {|[path: string]: string|}): string,\n  |};\n}\n"
  },
  {
    "path": "flow-libs/chrome-trace-event.js.flow",
    "content": "// @flow\n\n// Based on https://github.com/samccone/chrome-trace-event/blob/master/lib/trace-event.ts\ndeclare module 'chrome-trace-event' {\n  declare type TracerOptions = {|\n    parent?: Tracer | null,\n    fields?: Fields | null,\n    objectMode?: boolean | null,\n    noStream?: boolean\n  |};\n\n  declare type Fields = {\n    cat?: any,\n    args?: any,\n    ...\n  };\n\n  declare export class Tracer extends stream$Readable {\n    constructor(opts?: TracerOptions): Tracer;\n    begin(fields: Fields): void;\n    completeEvent(fields: Fields): void;\n    instantEvent(fields: Fields): void;\n    flush(): void;\n  }\n}\n"
  },
  {
    "path": "flow-libs/cli-spinners.js.flow",
    "content": "// @flow\n\ndeclare module 'cli-spinners' {\n  declare export type SpinnerName =\n\t\t| 'dots'\n\t\t| 'dots2'\n\t\t| 'dots3'\n\t\t| 'dots4'\n\t\t| 'dots5'\n\t\t| 'dots6'\n\t\t| 'dots7'\n\t\t| 'dots8'\n\t\t| 'dots9'\n\t\t| 'dots10'\n\t\t| 'dots11'\n\t\t| 'dots12'\n\t\t| 'dots8Bit'\n\t\t| 'line'\n\t\t| 'line2'\n\t\t| 'pipe'\n\t\t| 'simpleDots'\n\t\t| 'simpleDotsScrolling'\n\t\t| 'star'\n\t\t| 'star2'\n\t\t| 'flip'\n\t\t| 'hamburger'\n\t\t| 'growVertical'\n\t\t| 'growHorizontal'\n\t\t| 'balloon'\n\t\t| 'balloon2'\n\t\t| 'noise'\n\t\t| 'bounce'\n\t\t| 'boxBounce'\n\t\t| 'boxBounce2'\n\t\t| 'triangle'\n\t\t| 'arc'\n\t\t| 'circle'\n\t\t| 'squareCorners'\n\t\t| 'circleQuarters'\n\t\t| 'circleHalves'\n\t\t| 'squish'\n\t\t| 'toggle'\n\t\t| 'toggle2'\n\t\t| 'toggle3'\n\t\t| 'toggle4'\n\t\t| 'toggle5'\n\t\t| 'toggle6'\n\t\t| 'toggle7'\n\t\t| 'toggle8'\n\t\t| 'toggle9'\n\t\t| 'toggle10'\n\t\t| 'toggle11'\n\t\t| 'toggle12'\n\t\t| 'toggle13'\n\t\t| 'arrow'\n\t\t| 'arrow2'\n\t\t| 'arrow3'\n\t\t| 'bouncingBar'\n\t\t| 'bouncingBall'\n\t\t| 'smiley'\n\t\t| 'monkey'\n\t\t| 'hearts'\n\t\t| 'clock'\n\t\t| 'earth'\n\t\t| 'material'\n\t\t| 'moon'\n\t\t| 'runner'\n\t\t| 'pong'\n\t\t| 'shark'\n\t\t| 'dqpb'\n\t\t| 'weather'\n\t\t| 'christmas'\n\t\t| 'grenade'\n\t\t| 'point'\n\t\t| 'layer'\n\t\t| 'betaWave';\n\n  declare export type CLISpinner = {\n    interval: number,\n    frames: Array<number>,\n    ...\n  };\n  declare type CLISpinners = {|\n    [SpinnerName]: CLISpinner,\n  |};\n  declare export default CLISpinners;\n}\n"
  },
  {
    "path": "flow-libs/command-exists.js.flow",
    "content": "// @flow\n\ndeclare module 'command-exists' {\n  declare module.exports: {\n    (commandName: string): string,\n    (commandName: string, callback: (mixed, string) => mixed): string,\n    sync(commandName: string): string,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/commander.js.flow",
    "content": "/**\n * Flowtype definitions for commander\n * Generated by Flowgen from a Typescript Definition\n * Flowgen v1.13.0\n * @flow\n */\n\ndeclare module 'commander' {\n  // manually added\n  declare var commander: typeof npm$namespace$commander;\n\n  declare var npm$namespace$commander: {|\n    CommanderError: Class<commander$CommanderError>,\n    InvalidOptionArgumentError: Class<commander$InvalidOptionArgumentError>,\n    Option: Class<commander$Option>,\n    Help: Class<commander$Help>,\n    ParseOptions: Class<commander$ParseOptions>,\n    HelpContext: Class<commander$HelpContext>,\n    AddHelpTextContext: Class<commander$AddHelpTextContext>,\n    OutputConfiguration: Class<commander$OutputConfiguration>,\n    OptionValues: Class<commander$OptionValues>,\n    Command: Class<commander$Command>,\n    CommandOptions: Class<commander$CommandOptions>,\n    ExecutableCommandOptions: Class<commander$ExecutableCommandOptions>,\n    ParseOptionsResult: Class<commander$ParseOptionsResult>,\n    CommanderStatic: Class<commander$CommanderStatic>,\n  |};\n\n  declare class commander$CommanderError {\n    code: string;\n    exitCode: number;\n    message: string;\n    nestedError?: string;\n\n    constructor(\n      exitCode: number,\n      code: string,\n      message: string,\n    ): commander$CommanderError;\n  }\n\n  declare class commander$InvalidOptionArgumentError\n    extends commander$CommanderError\n  {\n    constructor(message: string): commander$InvalidOptionArgumentError;\n  }\n\n  declare class commander$Option {\n    flags: string;\n    description: string;\n    required: boolean;\n    optional: boolean;\n    variadic: boolean;\n    mandatory: boolean;\n    optionFlags: string;\n    short?: string;\n    long?: string;\n    negate: boolean;\n    defaultValue?: any;\n    defaultValueDescription?: string;\n    parseArg?: <T>(value: string, previous: T) => T;\n    hidden: boolean;\n    argChoices?: string[];\n\n    constructor(flags: string, description?: string): commander$Option;\n\n    /**\n     * Set the default value, and optionally supply the description to be displayed in the help.\n     */\n    default(value: any, description?: string): commander$Option;\n\n    /**\n     * Calculate the full description, including defaultValue etc.\n     */\n    fullDescription(): string;\n\n    /**\n     * Set the custom handler for processing CLI option arguments into option values.\n     */\n    argParser<T>(fn: (value: string, previous: T) => T): commander$Option;\n\n    /**\n     * Whether the option is mandatory and must have a value after parsing.\n     */\n    makeOptionMandatory(mandatory?: boolean): commander$Option;\n\n    /**\n     * Hide option in help.\n     */\n    hideHelp(hide?: boolean): commander$Option;\n\n    /**\n     * Validation of option argument failed.\n     * Intended for use from custom argument processing functions.\n     */\n    argumentRejected(messsage: string): empty;\n\n    /**\n     * Only allow option value to be one of choices.\n     */\n    choices(values: string[]): commander$Option;\n\n    /**\n     * Return option name.\n     */\n    name(): string;\n  }\n\n  declare interface commander$Help {\n    /**\n     * output helpWidth, long lines are wrapped to fit\n     */\n    helpWidth?: number;\n    sortSubcommands: boolean;\n    sortOptions: boolean;\n\n    /**\n     * Get the command term to show in the list of subcommands.\n     */\n    subcommandTerm(cmd: commander$Command): string;\n\n    /**\n     * Get the command description to show in the list of subcommands.\n     */\n    subcommandDescription(cmd: commander$Command): string;\n\n    /**\n     * Get the option term to show in the list of options.\n     */\n    optionTerm(option: commander$Option): string;\n\n    /**\n     * Get the option description to show in the list of options.\n     */\n    optionDescription(option: commander$Option): string;\n\n    /**\n     * Get the command usage to be displayed at the top of the built-in help.\n     */\n    commandUsage(cmd: commander$Command): string;\n\n    /**\n     * Get the description for the command.\n     */\n    commandDescription(cmd: commander$Command): string;\n\n    /**\n     * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.\n     */\n    visibleCommands(cmd: commander$Command): commander$Command[];\n\n    /**\n     * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.\n     */\n    visibleOptions(cmd: commander$Command): commander$Option[];\n\n    /**\n     * Get an array of the arguments which have descriptions.\n     */\n    visibleArguments(cmd: commander$Command): Array<{\n      term: string,\n      description: string,\n      ...\n    }>;\n\n    /**\n     * Get the longest command term length.\n     */\n    longestSubcommandTermLength(\n      cmd: commander$Command,\n      helper: commander$Help,\n    ): number;\n\n    /**\n     * Get the longest option term length.\n     */\n    longestOptionTermLength(\n      cmd: commander$Command,\n      helper: commander$Help,\n    ): number;\n\n    /**\n     * Get the longest argument term length.\n     */\n    longestArgumentTermLength(\n      cmd: commander$Command,\n      helper: commander$Help,\n    ): number;\n\n    /**\n     * Calculate the pad width from the maximum term length.\n     */\n    padWidth(cmd: commander$Command, helper: commander$Help): number;\n\n    /**\n     * Wrap the given string to width characters per line, with lines after the first indented.\n     * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.\n     */\n    wrap(\n      str: string,\n      width: number,\n      indent: number,\n      minColumnWidth?: number,\n    ): string;\n\n    /**\n     * Generate the built-in help text.\n     */\n    formatHelp(cmd: commander$Command, helper: commander$Help): string;\n  }\n\n  declare type commander$HelpConstructor = () => commander$Help;\n\n  declare type commander$HelpConfiguration = $Rest<commander$Help, {...}>;\n\n  declare interface commander$ParseOptions {\n    from: 'node' | 'electron' | 'user';\n  }\n\n  declare interface commander$HelpContext {\n    error: boolean;\n  }\n\n  declare interface commander$AddHelpTextContext {\n    error: boolean;\n    command: commander$Command;\n  }\n\n  declare interface commander$OutputConfiguration {\n    writeOut?: (str: string) => void;\n    writeErr?: (str: string) => void;\n    getOutHelpWidth?: () => number;\n    getErrHelpWidth?: () => number;\n    outputError?: (str: string, write: (str: string) => void) => void;\n  }\n\n  declare type commander$AddHelpTextPosition =\n    | 'beforeAll'\n    | 'before'\n    | 'after'\n    | 'afterAll';\n\n  declare interface commander$OptionValues {\n    [key: string]: any;\n  }\n\n  declare export class commander$Command {\n    constructor(name?: string): commander$Command;\n\n    args: string[];\n    commands: commander$Command[];\n\n    /**\n     * Set the program version to `str`.\n     *\n     * This method auto-registers the \"-V, --version\" flag\n     * which will print the version number when passed.\n     *\n     * You can optionally supply the  flags and description to override the defaults.\n     */\n    version(\n      str: string,\n      flags?: string,\n      description?: string,\n    ): commander$Command;\n\n    /**\n     * Define a command, implemented using an action handler.\n     * @remarks The command description is supplied using `.description`, not as a parameter to `.command`.\n     * @example ```ts\n     *  program\n     *    .command('clone <source> [destination]')\n     *    .description('clone a repository into a newly created directory')\n     *    .action((source, destination) => {\n     *      console.log('clone command called');\n     *    });\n     * ```\n     * @param nameAndArgs - command name and arguments, args are  `<required>` or `[optional]` and last may also be `variadic...`\n     * @param opts - configuration options\n     * @returns new command\n     */\n    command(\n      nameAndArgs: string,\n      opts?: commander$CommandOptions,\n    ): commander$Command;\n\n    /**\n     * Define a command, implemented in a separate executable file.\n     * @remarks The command description is supplied as the second parameter to `.command`.\n     * @example ```ts\n     *  program\n     *    .command('start <service>', 'start named service')\n     *    .command('stop [service]', 'stop named service, or all if no name supplied');\n     * ```\n     * @param nameAndArgs - command name and arguments, args are  `<required>` or `[optional]` and last may also be `variadic...`\n     * @param description - description of executable command\n     * @param opts - configuration options\n     * @returns `this` command for chaining\n     */\n    command(\n      nameAndArgs: string,\n      description: string,\n      opts?: commander$ExecutableCommandOptions,\n    ): commander$Command;\n\n    /**\n     * Factory routine to create a new unattached command.\n     *\n     * See .command() for creating an attached subcommand, which uses this routine to\n     * create the command. You can override createCommand to customise subcommands.\n     */\n    createCommand(name?: string): commander$Command;\n\n    /**\n     * Add a prepared subcommand.\n     *\n     * See .command() for creating an attached subcommand which inherits settings from its parent.\n     * @returns `this` command for chaining\n     */\n    addCommand(\n      cmd: commander$Command,\n      opts?: commander$CommandOptions,\n    ): commander$Command;\n\n    /**\n     * Define argument syntax for command.\n     * @returns `this` command for chaining\n     */\n    arguments(desc: string): commander$Command;\n\n    /**\n     * Override default decision whether to add implicit help command.\n     *\n     *    addHelpCommand() // force on\n     *    addHelpCommand(false); // force off\n     *    addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details\n     * @returns `this` command for chaining\n     */\n    addHelpCommand(\n      enableOrNameAndArgs?: string | boolean,\n      description?: string,\n    ): commander$Command;\n\n    /**\n     * Register callback to use as replacement for calling process.exit.\n     */\n    exitOverride(\n      callback?: (err: commander$CommanderError) => empty | void,\n    ): commander$Command;\n\n    /**\n     * You can customise the help with a subclass of Help by overriding createHelp,\n     * or by overriding Help properties using configureHelp().\n     */\n    createHelp(): commander$Help;\n\n    /**\n     * You can customise the help by overriding Help properties using configureHelp(),\n     * or with a subclass of Help by overriding createHelp().\n     */\n    configureHelp(\n      configuration: commander$HelpConfiguration,\n    ): commander$Command;\n\n    /**\n     * Get configuration\n     */\n    configureHelp(): commander$HelpConfiguration;\n\n    /**\n     * The default output goes to stdout and stderr. You can customise this for special\n     * applications. You can also customise the display of errors by overriding outputError.\n     *\n     * The configuration properties are all functions:\n     *\n     *    // functions to change where being written, stdout and stderr\n     *    writeOut(str)\n     *    writeErr(str)\n     *    // matching functions to specify width for wrapping help\n     *    getOutHelpWidth()\n     *    getErrHelpWidth()\n     *    // functions based on what is being written out\n     *    outputError(str, write) // used for displaying errors, and not used for displaying help\n     */\n    configureOutput(\n      configuration: commander$OutputConfiguration,\n    ): commander$Command;\n\n    /**\n     * Get configuration\n     */\n    configureOutput(): commander$OutputConfiguration;\n\n    /**\n     * Register callback `fn` for the command.\n     * @example      program\n     *        .command('help')\n     *        .description('display verbose help')\n     *        .action(function() {\n     *           // output help here\n     *        });\n     * @returns `this` command for chaining\n     */\n    action(fn: (...args: any[]) => void | Promise<void>): commander$Command;\n\n    /**\n     * Define option with `flags`, `description` and optional\n     * coercion `fn`.\n     *\n     * The `flags` string contains the short and/or long flags,\n     * separated by comma, a pipe or space. The following are all valid\n     * all will output this way when `--help` is used.\n     *\n     *    \"-p, --pepper\"\n     *    \"-p|--pepper\"\n     *    \"-p --pepper\"\n     * @example     // simple boolean defaulting to false\n     *     program.option('-p, --pepper', 'add pepper');\n     *\n     *     --pepper\n     *     program.pepper\n     *     // => Boolean\n     *\n     *     // simple boolean defaulting to true\n     *     program.option('-C, --no-cheese', 'remove cheese');\n     *\n     *     program.cheese\n     *     // => true\n     *\n     *     --no-cheese\n     *     program.cheese\n     *     // => false\n     *\n     *     // required argument\n     *     program.option('-C, --chdir <path>', 'change the working directory');\n     *\n     *     --chdir /tmp\n     *     program.chdir\n     *     // => \"/tmp\"\n     *\n     *     // optional argument\n     *     program.option('-c, --cheese [type]', 'add cheese [marble]');\n     * @returns `this` command for chaining\n     */\n    option(\n      flags: string,\n      description?: string,\n      defaultValue?: string | boolean,\n    ): commander$Command;\n    option<T>(\n      flags: string,\n      description: string,\n      fn: (value: string, previous: T) => T,\n      defaultValue?: T,\n    ): commander$Command;\n\n    /**\n     * @deprecated since v7, instead use choices or a custom function\n     */\n    option(\n      flags: string,\n      description: string,\n      regexp: RegExp,\n      defaultValue?: string | boolean,\n    ): commander$Command;\n\n    /**\n     * Define a required option, which must have a value after parsing. This usually means\n     * the option must be specified on the command line. (Otherwise the same as .option().)\n     *\n     * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.\n     */\n    requiredOption(\n      flags: string,\n      description?: string,\n      defaultValue?: string | boolean,\n    ): commander$Command;\n    requiredOption<T>(\n      flags: string,\n      description: string,\n      fn: (value: string, previous: T) => T,\n      defaultValue?: T,\n    ): commander$Command;\n\n    /**\n     * @deprecated since v7, instead use choices or a custom function\n     */\n    requiredOption(\n      flags: string,\n      description: string,\n      regexp: RegExp,\n      defaultValue?: string | boolean,\n    ): commander$Command;\n\n    /**\n     * Factory routine to create a new unattached option.\n     *\n     * See .option() for creating an attached option, which uses this routine to\n     * create the option. You can override createOption to return a custom option.\n     */\n    createOption(flags: string, description?: string): commander$Option;\n\n    /**\n     * Add a prepared Option.\n     *\n     * See .option() and .requiredOption() for creating and attaching an option in a single call.\n     */\n    addOption(option: commander$Option): commander$Command;\n\n    /**\n     * Whether to store option values as properties on command object,\n     * or store separately (specify false). In both cases the option values can be accessed using .opts().\n     * @returns `this` command for chaining\n     */\n    storeOptionsAsProperties(): commander$Command & commander$OptionValues;\n    storeOptionsAsProperties(\n      storeAsProperties: true,\n    ): commander$Command & commander$OptionValues;\n    storeOptionsAsProperties(storeAsProperties?: boolean): commander$Command;\n\n    /**\n     * Alter parsing of short flags with optional values.\n     * @example    // for `.option('-f,--flag [value]'):\n     *   .combineFlagAndOptionalValue(true)  // `-f80` is treated like `--flag=80`, this is the default behaviour\n     *   .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`\n     * @returns `this` command for chaining\n     */\n    combineFlagAndOptionalValue(combine?: boolean): commander$Command;\n\n    /**\n     * Allow unknown options on the command line.\n     * @returns `this` command for chaining\n     */\n    allowUnknownOption(allowUnknown?: boolean): commander$Command;\n\n    /**\n     * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.\n     * @returns `this` command for chaining\n     */\n    allowExcessArguments(allowExcess?: boolean): commander$Command;\n\n    /**\n     * Enable positional options. Positional means global options are specified before subcommands which lets\n     * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.\n     *\n     * The default behaviour is non-positional and global options may appear anywhere on the command line.\n     * @returns `this` command for chaining\n     */\n    enablePositionalOptions(positional?: boolean): commander$Command;\n\n    /**\n     * Pass through options that come after command-arguments rather than treat them as command-options,\n     * so actual command-options come before command-arguments. Turning this on for a subcommand requires\n     * positional options to have been enabled on the program (parent commands).\n     *\n     * The default behaviour is non-positional and options may appear before or after command-arguments.\n     * @returns `this` command for chaining\n     */\n    passThroughOptions(passThrough?: boolean): commander$Command;\n\n    /**\n     * Parse `argv`, setting options and invoking commands when defined.\n     *\n     * The default expectation is that the arguments are from node and have the application as argv[0]\n     * and the script being run in argv[1], with user parameters after that.\n     *\n     * Examples:\n     *\n     *      program.parse(process.argv);\n     *      program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions\n     *      program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n     * @returns `this` command for chaining\n     */\n    parse(argv?: string[], options?: commander$ParseOptions): commander$Command;\n\n    /**\n     * Parse `argv`, setting options and invoking commands when defined.\n     *\n     * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise.\n     *\n     * The default expectation is that the arguments are from node and have the application as argv[0]\n     * and the script being run in argv[1], with user parameters after that.\n     *\n     * Examples:\n     *\n     *      program.parseAsync(process.argv);\n     *      program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions\n     *      program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n     * @returns Promise\n     */\n    parseAsync(\n      argv?: string[],\n      options?: commander$ParseOptions,\n    ): Promise<commander$Command>;\n\n    /**\n     * Parse options from `argv` removing known options,\n     * and return argv split into operands and unknown arguments.\n     * @example    argv => operands, unknown\n     *    --known kkk op => [op], []\n     *    op --known kkk => [op], []\n     *    sub --unknown uuu op => [sub], [--unknown uuu op]\n     *    sub -- --unknown uuu op => [sub --unknown uuu op], []\n     */\n    parseOptions(argv: string[]): commander$ParseOptionsResult;\n\n    /**\n     * Return an object containing options as key-value pairs\n     */\n    opts(): commander$OptionValues;\n\n    /**\n     * Set the description.\n     * @returns `this` command for chaining\n     */\n    description(\n      str: string,\n      argsDescription?: {\n        [argName: string]: string,\n        ...\n      },\n    ): commander$Command;\n\n    /**\n     * Get the description.\n     */\n    description(): string;\n\n    /**\n     * Set an alias for the command.\n     *\n     * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.\n     * @returns `this` command for chaining\n     */\n    alias(alias: string): commander$Command;\n\n    /**\n     * Get alias for the command.\n     */\n    alias(): string;\n\n    /**\n     * Set aliases for the command.\n     *\n     * Only the first alias is shown in the auto-generated help.\n     * @returns `this` command for chaining\n     */\n    aliases(aliases: string[]): commander$Command;\n\n    /**\n     * Get aliases for the command.\n     */\n    aliases(): string[];\n\n    /**\n     * Set the command usage.\n     * @returns `this` command for chaining\n     */\n    usage(str: string): commander$Command;\n\n    /**\n     * Get the command usage.\n     */\n    usage(): string;\n\n    /**\n     * Set the name of the command.\n     * @returns `this` command for chaining\n     */\n    name(str: string): commander$Command;\n\n    /**\n     * Get the name of the command.\n     */\n    name(): string;\n\n    /**\n     * Output help information for this command.\n     *\n     * Outputs built-in help, and custom text added using `.addHelpText()`.\n     */\n    outputHelp(context?: commander$HelpContext): void;\n\n    /**\n     * @deprecated since v7\n     */\n    outputHelp(cb?: (str: string) => string): void;\n\n    /**\n     * Return command help documentation.\n     */\n    helpInformation(context?: commander$HelpContext): string;\n\n    /**\n     * You can pass in flags and a description to override the help\n     * flags and help description for your command. Pass in false\n     * to disable the built-in help option.\n     */\n    helpOption(\n      flags?: string | boolean,\n      description?: string,\n    ): commander$Command;\n\n    /**\n     * Output help information and exit.\n     *\n     * Outputs built-in help, and custom text added using `.addHelpText()`.\n     */\n    help(context?: commander$HelpContext): empty;\n\n    /**\n     * @deprecated since v7\n     */\n    help(cb?: (str: string) => string): empty;\n\n    /**\n     * Add additional text to be displayed with the built-in help.\n     *\n     * Position is 'before' or 'after' to affect just this command,\n     * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.\n     */\n    addHelpText(\n      position: commander$AddHelpTextPosition,\n      text: string,\n    ): commander$Command;\n    addHelpText(\n      position: commander$AddHelpTextPosition,\n      text: (context: commander$AddHelpTextContext) => string | void,\n    ): commander$Command;\n\n    /**\n     * Add a listener (callback) for when events occur. (Implemented using EventEmitter.)\n     */\n    on(\n      event: string | Symbol,\n      listener: (...args: any[]) => void,\n    ): commander$Command;\n  }\n\n  declare interface commander$CommandOptions {\n    hidden?: boolean;\n    isDefault?: boolean;\n\n    /**\n     * @deprecated since v7, replaced by hidden\n     */\n    noHelp?: boolean;\n  }\n\n  declare type commander$ExecutableCommandOptions = {\n    executableFile?: string,\n    ...\n  } & commander$CommandOptions;\n\n  declare interface commander$ParseOptionsResult {\n    operands: string[];\n    unknown: string[];\n  }\n\n  declare type commander$CommanderStatic = {\n    program: commander$Command,\n    Command: Class<commander$Command>,\n    Option: Class<commander$Option>,\n    CommanderError: Class<commander$CommanderError>,\n    InvalidOptionArgumentError: Class<commander$InvalidOptionArgumentError>,\n    Help: commander$HelpConstructor,\n    ...\n  } & commander$Command;\n\n  declare var commanderDefault: commander$CommanderStatic;\n  declare export default typeof commanderDefault;\n}\n"
  },
  {
    "path": "flow-libs/cross-spawn.js.flow",
    "content": "// @flow\n\ndeclare module 'cross-spawn' {\n  declare module.exports: {\n    // Mirrors the child_process.spawn API:\n    // https://github.com/facebook/flow/blob/v0.94.0/lib/node.js#L314\n\n    // Callable export is the same as `spawn` below.\n    (\n      command: string,\n      args: Array<string> | child_process$spawnOpts,\n      options?: child_process$spawnOpts\n    ): child_process$ChildProcess,\n    spawn(\n      command: string,\n      args: Array<string> | child_process$spawnOpts,\n      options?: child_process$spawnOpts\n    ): child_process$ChildProcess,\n    spawnSync(\n      command: string,\n      args: Array<string> | child_process$spawnSyncOpts,\n      options?: child_process$spawnSyncOpts\n    ): child_process$spawnSyncRet,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/cssnano.js.flow",
    "content": "// @flow strict-local\n\n// Modified from the source of cssnano located at\n// https://github.com/cssnano/cssnano and its types at\n// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/cssnano/index.d.ts\n\ndeclare module 'cssnano' {\n  import type { Plugin } from \"postcss\"\n  declare interface CSSNanoOptions {\n    configFile?: string;\n    preset?: [string, mixed] | string;\n  }\n  declare module.exports: (?CSSNanoOptions) => Plugin;\n}\n"
  },
  {
    "path": "flow-libs/deasync.js",
    "content": "// @flow\n\ndeclare module 'deasync' {\n  declare module.exports: {\n    // TODO: Main callable signature\n    loopWhile(() => boolean): void,\n    runLoopOnce(): void,\n    sleep(sleepTimeMs: number): void,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/dotenv-expand.js.flow",
    "content": "// @flow strict-local\n\ndeclare module 'dotenv-expand' {\n  // Must stay in sync with dotenv's type:\n  // https://github.com/motdotla/dotenv/blob/72fb66b051280ef5c2cc40ce4962ac4601f7f515/lib/main.js\n  declare type DotenvConfig = {\n    error?: Error,\n    parsed?: { [string]: string, ... },\n    processEnv?: {...},\n    ...\n  };\n\n  // See: https://github.com/motdotla/dotenv-expand/blob/ddb73d02322fe8522b4e05b73e1c1ad24ea7c14a/lib/main.js\n  declare module.exports: {\n    expand: (config: DotenvConfig) => void,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/fast-glob.js.flow",
    "content": "// @flow\n\n// Derived from TypeScript typings and source code from\n// https://github.com/mrmlnc/fast-glob\n// which is MIT licensed (see LICENSE in root of repo)\n\ndeclare module 'fast-glob' {\n  import type {Stats} from 'fs';\n\n  declare interface IEntry extends Stats {\n    path: string;\n    depth: number;\n  }\n  declare type EntryItem = string | IEntry;\n\n  declare type FastGlobOptions<T: EntryItem> = {|\n    cwd?: string,\n    deep?: number | boolean,\n    ignore?: Array<string>,\n    dot?: boolean,\n    stats?: boolean,\n    onlyFiles?: boolean,\n    onlyDirectories?: boolean,\n    followSymlinkedDirectories?: boolean,\n    unique?: boolean,\n    markDirectories?: boolean,\n    absolute?: boolean,\n    nobrace?: boolean,\n    brace?: boolean,\n    noglobstar?: boolean,\n    globstar?: boolean,\n    noext?: boolean,\n    matchBase?: boolean,\n    transform?: ?() => T\n  |};\n\n  declare module.exports: {\n    <T: EntryItem>(\n      patterns: string | Array<string>,\n      options: FastGlobOptions<T>\n    ): Promise<Array<T>>,\n    sync<T: EntryItem>(\n      patterns: string | Array<string>,\n      options: FastGlobOptions<T>\n    ): Array<T>,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/fastest-levenshtein.js.flow",
    "content": "// @flow strict-local\n\ndeclare module 'fastest-levenshtein' {\n  declare export function distance(a: string, b: string): number;\n}\n"
  },
  {
    "path": "flow-libs/fb-watchman.js.flow",
    "content": "// @flow\n\n// Derived from TypeScript typings and source code from\n// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/fb-watchman/index.d.ts\n\ndeclare module 'fb-watchman' {\n  // Emit the responses to these when they get sent down to us\n  declare type UnilateralTags = \"unilateralTags\" | \"log\";\n\n  declare interface ClientOptions {\n      /**\n      * Absolute path to the watchman binary.\n      * If not provided, the Client locates the binary using the PATH specified\n      * by the node child_process's default env.\n      */\n      watchmanBinaryPath?: string | void;\n  }\n\n  declare interface Capabilities {\n      optional: any[];\n      required: any[];\n  }\n\n  declare type doneCallback = (error?: Error | null, resp?: any) => any;\n\n  declare class Client extends events$EventEmitter {\n      constructor(options?: ClientOptions): this;\n      sendNextCommand(): void;\n      cancelCommands(why: string): void;\n      connect(): void;\n      command(args: any, done: doneCallback): void;\n      capabilityCheck(\n          caps: Capabilities,\n          done: doneCallback,\n      ): void;\n      end(): void;\n  }\n}\n"
  },
  {
    "path": "flow-libs/filesize.js.flow",
    "content": "/**\n * Flowtype definitions for filesize\n * Generated by Flowgen from a Typescript Definition\n * Flowgen v1.13.0\n * @flow\n */\n\ndeclare module 'fileSize' { // manually added\n\ndeclare var fileSize: Filesize$Filesize;\ndeclare export default typeof fileSize;\n\n\ndeclare var npm$namespace$Filesize: {|\n  SiJedecBits: Class<Filesize$SiJedecBits>,\n  SiJedecBytes: Class<Filesize$SiJedecBytes>,\n  Options: Class<Filesize$Options>,\n  Filesize: Class<Filesize$Filesize>,\n|};\ndeclare interface Filesize$SiJedecBits {\n  b?: string;\n  Kb?: string;\n  Mb?: string;\n  Gb?: string;\n  Tb?: string;\n  Pb?: string;\n  Eb?: string;\n  Zb?: string;\n  Yb?: string;\n}\n\ndeclare interface Filesize$SiJedecBytes {\n  B?: string;\n  KB?: string;\n  MB?: string;\n  GB?: string;\n  TB?: string;\n  PB?: string;\n  EB?: string;\n  ZB?: string;\n  YB?: string;\n}\n\ndeclare type Filesize$SiJedec = Filesize$SiJedecBits &\n  Filesize$SiJedecBytes & {\n    [name: string]: string,\n    ...\n  };\n\ndeclare interface Filesize$Options {\n  /**\n   * Number base, default is 2\n   */\n  base?: number;\n\n  /**\n   * Enables bit sizes, default is false\n   */\n  bits?: boolean;\n\n  /**\n   * Specifies the SI suffix via exponent, e.g. 2 is MB for bytes, default is -1\n   */\n  exponent?: number;\n\n  /**\n   * Enables full form of unit of measure, default is false\n   */\n  fullform?: boolean;\n\n  /**\n   * Array of full form overrides, default is []\n   */\n  fullforms?: string[];\n\n  /**\n   * BCP 47 language tag to specify a locale, or true to use default locale, default is \"\"\n   */\n  locale?: string | boolean;\n\n  /**\n   * ECMA-402 number format option overrides, default is \"{}\"\n   */\n  localeOptions?: Intl$NumberFormatOptions;\n\n  /**\n   * Output of function (array, exponent, object, or string), default is string\n   */\n  output?: \"array\" | \"exponent\" | \"object\" | \"string\";\n\n  /**\n   * Decimal place, default is 2\n   */\n  round?: number;\n\n  /**\n   * Decimal separator character, default is `.`\n   */\n  separator?: string;\n\n  /**\n   * Character between the result and suffix, default is ` `\n   */\n  spacer?: string;\n\n  /**\n   * Standard unit of measure, can be iec or jedec, default is jedec; can be overruled by base\n   */\n  standard?: \"iec\" | \"jedec\";\n\n  /**\n   * Dictionary of SI/JEDEC symbols to replace for localization, defaults to english if no match is found\n   */\n  symbols?: Filesize$SiJedec;\n\n  /**\n   * Enables unix style human readable output, e.g ls -lh, default is false\n   */\n  unix?: boolean;\n}\n\ndeclare interface Filesize$Filesize {\n  (bytes: number, options?: Filesize$Options): string;\n  partial: (options: Filesize$Options) => (bytes: number) => string;\n}\n\n\n}\n"
  },
  {
    "path": "flow-libs/get-port.js.flow",
    "content": "// @flow strict-local\n\n// Derived from the source of get-port located at\n// https://github.com/sindresorhus/get-port\n\ndeclare module 'get-port' {\n  declare interface Options {\n    /**\n\t\tA preferred port or an iterable of preferred ports to use.\n\t\t*/\n    port?: number | Iterable<number>;\n\n    /**\n\t\tThe host on which port resolution should be performed. Can be either an IPv4 or IPv6 address.\n\t\t*/\n    host?: string;\n  }\n\n  declare module.exports: {|\n    (options?: Options): Promise<number>,\n    makeRange(from: number, to: number): Iterable<number>,\n  |};\n}\n"
  },
  {
    "path": "flow-libs/grapheme-breaker.js.flow",
    "content": "// @flow\n\ndeclare module 'grapheme-breaker' {\n  declare module.exports: {\n    break(str: string): Array<string>,\n    countBreaks(str: string): number,\n    previousBreak(str: string, index: number): number,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/htmlnano.js.flow",
    "content": "// @flow\n\ndeclare module 'htmlnano' {\n  declare type Options = {\n    minifyJs?: boolean,\n    minifyCss?: boolean,\n    ...\n  };\n\n  declare module.exports: (input: Options) => ?Array<Function>;\n}\n"
  },
  {
    "path": "flow-libs/ink.js.flow",
    "content": "// @flow\n\n// Derived from the ink source available at:\n// https://github.com/vadimdemedes/ink\n// Which is licensed MIT\n\ndeclare module 'ink' {\n  declare export interface StdoutLike {\n    columns: number;\n    write(chunk: string | Buffer | Uint8Array): mixed;\n  }\n\n  declare type RenderOptions =\n    | StdoutLike\n    | {|\n        stdout?: StdoutLike\n      |};\n\n  declare type ColorProps = {|\n    bold?: boolean,\n    children: React$Node,\n    dim?: boolean,\n    gray?: boolean,\n    green?: boolean,\n    keyword?: string,\n    cyan?: boolean,\n    magenta?: boolean,\n    reset?: boolean,\n    yellow?: boolean,\n    blue?: boolean,\n    blackBright?: boolean,\n    redBright?: boolean,\n    greenBright?: boolean,\n    yellowBright?: boolean,\n    blueBright?: boolean,\n    magentaBright?: boolean,\n    cyanBright?: boolean,\n    whiteBright?: boolean,\n  |};\n  declare export var Color: React$ComponentType<ColorProps>;\n  // https://github.com/vadimdemedes/ink#static\n  declare export var Static: React$ComponentType<{ children: React$Node, ... }>;\n\n  declare type TextProps = {|\n    children: React$Node\n  |};\n  declare export var Text: React$ComponentType<TextProps>;\n\n  declare type BoxProps = {|\n    children: React$Node\n  |};\n  declare export var Box: React$ComponentType<BoxProps>;\n\n  declare export type RerenderFunc = (node: React$Node) => void;\n\n  declare export function render(\n    node: React$Node,\n    options?: RenderOptions\n  ): {|\n    rerender: RerenderFunc,\n    unmount: () => void,\n    waitUntilExit: Promise<void>\n  |};\n}\n"
  },
  {
    "path": "flow-libs/inspector.js.flow",
    "content": "// @flow\n\n// based on https://nodejs.org/api/inspector.html\ndeclare module 'inspector' {\n  declare export class Session extends events$EventEmitter {\n    connect(): void;\n    disconnect(): void;\n    post(\n      method: string,\n      params?: mixed,\n      callback?: (err: Error, result: any) => void,\n    ): void;\n  }\n}\n"
  },
  {
    "path": "flow-libs/isbinaryfile.js.flow",
    "content": "// @flow\n\n// Derived from the README for isbinaryfile, available at:\n// https://github.com/gjtorikian/isBinaryFile#readme\n// Which is licensed MIT.\n\ndeclare module 'isbinaryfile' {\n  declare export function isBinaryFile(\n    buffer: Buffer,\n    bytesToRead?: number\n  ): Promise<boolean>;\n  declare export function isBinaryFileSync(\n    buffer: Buffer,\n    bytesToRead?: number\n  ): boolean;\n}\n"
  },
  {
    "path": "flow-libs/json5.js.flow",
    "content": "// @flow\n\n// Derived from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/json5/index.d.ts\n// And https://github.com/DefinitelyTyped/DefinitelyTyped#readme\n// Which is licensed MIT\n\ndeclare module 'json5' {\n  declare type JSONReplacer = (\n    key: string,\n    value: mixed,\n  ) => mixed | (number | string)[] | null;\n\n  declare type Reviver = (key: mixed, value: mixed) => mixed;\n  declare type Options = {|\n    space?: number | string,\n    quote?: string,\n    replacer?: JSONReplacer,\n  |};\n\n  declare module.exports: {|\n    parse(text: string, reviver?: Reviver): any, // Not type safe !\n    stringify(\n      value: mixed,\n      replacer?:\n        | (number | string)[]\n        | null\n        | ((key: string, value: mixed) => mixed),\n      space?: string | number,\n    ): string,\n    stringify(value: mixed, options?: Options): string,\n  |};\n}\n"
  },
  {
    "path": "flow-libs/less.js.flow",
    "content": "// @flow\n\n// These types are much more than what Parcel is currently using, and much less\n// than a complete typing of Less. The cutoff was pretty arbitrary; I tried to\n// err on the side of inclusion for class members and exclusion for everything\n// else, but ultimately there's no principle for what's in and what's out of the\n// bits that Parcel doesn't need.\n\ndeclare module 'less' {\n  declare type FileInfo = {|\n    rewriteUrls?: boolean,\n    filename: string,\n    rootpath: string,\n    currentDirectory: string,\n    rootFilename: string,\n    entryPath: string,\n    reference?: boolean,\n  |};\n\n  declare type Context = {...};\n\n  declare type Visitor = {\n    visit(value: Node): Node,\n    ...\n  };\n\n  // Derived manually from\n  // https://github.com/less/less.js/blob/2c5e4dd9b9fbe6e5a4ef0c57c827e1ac3443ef0c/packages/less/src/less/tree/node.js\n  declare class Node {\n    parent: ?Node;\n    visibilityBlocks: ?number;\n    nodeVisible: ?boolean;\n    rootNode: ?Node;\n    parsed: ?boolean;\n\n    +currentFileInfo: FileInfo;\n    +index: number;\n\n    setParent(nodes: Node | Array<Node>, parent: Node): void;\n\n    getIndex(): number;\n    fileInfo(): FileInfo;\n    isRulesetLike(): boolean;\n\n    toCSS(context: Context): string;\n    genCSS(context: Context, output: mixed): void;\n    accept(visitor: Visitor): void;\n    eval(): mixed;\n\n    fround(context: Context, value: number): number;\n    blocksVisibility(): boolean;\n    addVisibilityBlock(): void;\n    removeVisibilityBlock(): void;\n    ensureVisibility(): void;\n    ensureInvisibility(): void;\n    isVisible(): ?boolean;\n    visibilityInfo(): {|visibilityBlocks: ?number, nodeVisible: ?boolean|};\n    copyVisibilityInfo(info: {\n      visibilityBlocks: ?number,\n      nodeVisible: ?boolean,\n      ...\n    }): void;\n  }\n\n  // Derived manually from\n  // https://github.com/less/less.js/blob/2c5e4dd9b9fbe6e5a4ef0c57c827e1ac3443ef0c/packages/less/src/less/tree/url.js\n  declare class URL extends Node {\n    value: Node;\n    isEvald: boolean;\n  }\n\n  // This is very ad-hoc, based on current Parcel usage instead of the actual\n  // class in Less.\n  declare class visitors$Visitor {\n    constructor({\n      visitUrl?: (node: URL) => Node,\n      ...\n    }): visitors$Visitor;\n    visit(node: Node): Node;\n    run?: Node => Node;\n  }\n\n  // Obviously an extremely incomplete type definition.\n  declare module.exports: {\n    tree: {\n      Node: typeof Node,\n      URL: typeof URL,\n      ...\n    },\n    visitors: {\n      Visitor: typeof visitors$Visitor,\n      ...\n    },\n    render(string, any): Promise<{|map: string, css: string|}>,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/micromatch.js.flow",
    "content": "// @flow\n\n// Type definitions for micromatch 4.0\n// Project: https://github.com/micromatch/micromatch\n// Definitions by: glen-84 <https://github.com/glen-84>\n//                 vemoo <https://github.com/vemoo>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n\ndeclare module 'micromatch' {\n  declare type Item = {|\n    glob: string,\n    regex: RegExp,\n    input: string,\n    output: string,\n  |};\n  declare type Options = {|\n    /**\n     * Allow glob patterns without slashes to match a file path based on its basename. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `matchBase`.\n     *\n     * @default false\n     *\n     * @example\n     * ```js\n     * mm(['a/b.js', 'a/c.md'], '*.js');\n     * //=> []\n     *\n     * mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true});\n     * //=> ['a/b.js']\n     * ```\n     */\n    basename?: boolean,\n    /**\n     * Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression.\n     * Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**.\n     * Instead, the star is treated the same as an other star.\n     *\n     * @default true\n     *\n     * @example\n     * ```js\n     * var files = ['abc', 'ajz'];\n     * console.log(mm(files, '[a-c]*'));\n     * //=> ['abc', 'ajz']\n     *\n     * console.log(mm(files, '[a-c]*', {bash: false}));\n     * ```\n     */\n    bash?: boolean,\n    /**\n     * Return regex matches in supporting methods.\n     *\n     * @default undefined\n     */\n    capture?: boolean,\n    /**\n     * Allows glob to match any part of the given string(s).\n     *\n     * @default undefined\n     */\n    contains?: boolean,\n    /**\n     * Current working directory. Used by `picomatch.split()`\n     *\n     * @default process.cwd()\n     */\n    cwd?: string,\n    /**\n     * Debug regular expressions when an error is thrown.\n     *\n     * @default undefined\n     */\n    debug?: boolean,\n    /**\n     * Match dotfiles. Otherwise dotfiles are ignored unless a `.` is explicitly defined in the pattern.\n     *\n     * @default false\n     */\n    dot?: boolean,\n    /**\n     * Custom function for expanding ranges in brace patterns, such as `{a..z}`.\n     * The function receives the range values as two arguments, and it must return a string to be used in the generated regex.\n     * It's recommended that returned strings be wrapped in parentheses. This option is overridden by the expandBrace option.\n     *\n     * @default undefined\n     */\n    expandRange?: (left: string, right: string, options: Options) => string,\n    /**\n     * Similar to the `--failglob` behavior in Bash, throws an error when no matches are found.\n     *\n     * @default false\n     */\n    failglob?: boolean,\n    /**\n     * To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to false.\n     *\n     * @default true\n     */\n    fastpaths?: boolean,\n    /**\n     * Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden.\n     *\n     * @default undefined\n     */\n    flags?: boolean,\n    /**\n     * Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc.\n     *\n     * @default undefined\n     */\n    format?: (returnedString: string) => string,\n    /**\n     * One or more glob patterns for excluding strings that should not be matched from the result.\n     *\n     * @default undefined\n     */\n    ignore?: string | $ReadOnlyArray<string>,\n    /**\n     * Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes.\n     *\n     * @default false\n     */\n    keepQuotes?: boolean,\n    /**\n     * When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched.\n     *\n     * @default undefined\n     */\n    literalBrackets?: boolean,\n    /**\n     * Support regex positive and negative lookbehinds. Note that you must be using Node 8.1.10 or higher to enable regex lookbehinds.\n     *\n     * @default true\n     */\n    lookbehinds?: boolean,\n    /**\n     * Alias for `basename`.\n     *\n     * @default false\n     */\n    matchBase?: boolean,\n    /**\n     * Limit the max length of the input string. An error is thrown if the input string is longer than this value.\n     *\n     * @default 65536\n     */\n    maxLength?: number,\n    /**\n     * Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters.\n     *\n     * @default false\n     */\n    nobrace?: boolean,\n    /**\n     * Disable matching with regex brackets.\n     *\n     * @default undefined\n     */\n    nobracket?: boolean,\n    /**\n     * Perform case-insensitive matching. Equivalent to the regex `i` flag.\n     * Note that this option is ignored when the `flags` option is defined.\n     *\n     * @default false\n     */\n    nocase?: boolean,\n    /**\n     * Alias for `noextglob`\n     *\n     * @default false\n     */\n    noext?: boolean,\n    /**\n     * Disable support for matching with extglobs (like `+(a|b)`)\n     *\n     * @default false\n     */\n    noextglob?: boolean,\n    /**\n     * Disable matching with globstars (`**`).\n     *\n     * @default undefined\n     */\n    noglobstar?: boolean,\n    /**\n     * Disallow negation (`!`) patterns, and treat leading `!` as a literal character to match.\n     *\n     * @default undefined\n     */\n    nonegate?: boolean,\n    /**\n     * Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded.\n     *\n     * @default false\n     */\n    noquantifiers?: boolean,\n    /**\n     * Function to be called on ignored items.\n     *\n     * @default undefined\n     */\n    onIgnore?: (item: Item) => void,\n    /**\n     * Function to be called on matched items.\n     *\n     * @default undefined\n     */\n    onMatch?: (item: Item) => void,\n    /**\n     * Function to be called on all items, regardless of whether or not they are matched or ignored.\n     *\n     * @default undefined\n     */\n    onResult?: (item: Item) => void,\n    /**\n     * Support POSIX character classes (\"posix brackets\").\n     *\n     * @default false\n     */\n    posix?: boolean,\n    /**\n     * String to prepend to the generated regex used for matching.\n     *\n     * @default undefined\n     */\n    prepend?: boolean,\n    /**\n     * Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`).\n     *\n     * @default false\n     */\n    regex?: boolean,\n    /**\n     * Throw an error if brackets, braces, or parens are imbalanced.\n     *\n     * @default undefined\n     */\n    strictBrackets?: boolean,\n    /**\n     * When true, picomatch won't match trailing slashes with single stars.\n     *\n     * @default undefined\n     */\n    strictSlashes?: boolean,\n    /**\n     * Remove backslashes from returned matches.\n     *\n     * @default undefined\n     *\n     * @example\n     * In this example we want to match a literal `*`:\n     *\n     * ```js\n     * mm.match(['abc', 'a\\\\*c'], 'a\\\\*c');\n     * //=> ['a\\\\*c']\n     *\n     * mm.match(['abc', 'a\\\\*c'], 'a\\\\*c', {unescape: true});\n     * //=> ['a*c']\n     * ```\n     */\n    unescape?: boolean,\n    /**\n     * Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself\n     *\n     * @default undefined\n     */\n    windows?: boolean,\n  |};\n\n  declare type ScanOptions = {|\n    ...Options,\n    /**\n     * When `true`, the returned object will include an array of `tokens` (objects), representing each path \"segment\" in the scanned glob pattern.\n     *\n     * @default false\n     */\n    tokens?: boolean,\n    /**\n     * When `true`, the returned object will include an array of strings representing each path \"segment\" in the scanned glob pattern.\n     * This is automatically enabled when `options.tokens` is `true`.\n     *\n     * @default false\n     */\n    parts?: boolean,\n  |};\n\n  declare interface ScanInfo {\n    prefix: string;\n    input: string;\n    start: number;\n    base: string;\n    glob: string;\n    isBrace: boolean;\n    isBracket: boolean;\n    isGlob: boolean;\n    isExtglob: boolean;\n    isGlobstar: boolean;\n    negated: boolean;\n  }\n\n  declare interface ScanInfoToken {\n    value: string;\n    depth: number;\n    isGlob: boolean;\n\n    backslashes?: boolean;\n    isBrace?: boolean;\n    isBracket?: boolean;\n    isExtglob?: boolean;\n    isGlobstar?: boolean;\n    isPrefix?: boolean;\n    negated?: boolean;\n  }\n\n  declare interface ScanInfoWithParts extends ScanInfo {\n    slashes: number[];\n    parts: string[];\n  }\n\n  declare interface ScanInfoWithTokens extends ScanInfoWithParts {\n    maxDepth: number;\n    tokens: ScanInfoToken[];\n  }\n\n  declare module.exports: {|\n    /**\n     * The main function takes a list of strings and one or more glob patterns to use for matching.\n     *\n     * @param list A list of strings to match\n     * @param patterns One or more glob patterns to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns an array of matches\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm(list, patterns[, options]);\n     *\n     * console.log(mm(['a.js', 'a.txt'], ['*.js']));\n     * //=> [ 'a.js' ]\n     * ```\n     */\n    (\n      list: $ReadOnlyArray<string>,\n      patterns: string | $ReadOnlyArray<string>,\n      options?: Options,\n    ): string[],\n\n    /**\n     * Similar to the main function, but `pattern` must be a string.\n     *\n     * @param list Array of strings to match\n     * @param pattern Glob pattern to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns an array of matches\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.match(list, pattern[, options]);\n     *\n     * console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a'));\n     * //=> ['a.a', 'a.aa']\n     * ```\n     */\n    match(\n      list: $ReadOnlyArray<string>,\n      pattern: string,\n      options?: Options,\n    ): string[],\n\n    /**\n     * Returns true if the specified `string` matches the given glob `pattern`.\n     *\n     * @param string String to match\n     * @param pattern Glob pattern to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns true if the string matches the glob pattern.\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.isMatch(string, pattern[, options]);\n     *\n     * console.log(mm.isMatch('a.a', '*.a'));\n     * //=> true\n     * console.log(mm.isMatch('a.b', '*.a'));\n     * //=> false\n     * ```\n     */\n    isMatch(\n      string: string,\n      pattern: string | $ReadOnlyArray<string>,\n      options?: Options,\n    ): boolean,\n\n    /**\n     * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.\n     *\n     * @param list The string or array of strings to test. Returns as soon as the first match is found.\n     * @param patterns One or more glob patterns to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns true if any patterns match `str`\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.some(list, patterns[, options]);\n     *\n     * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n     * // true\n     * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));\n     * // false\n     * ```\n     */\n    some(\n      list: string | $ReadOnlyArray<string>,\n      patterns: string | $ReadOnlyArray<string>,\n      options?: Options,\n    ): boolean,\n\n    /**\n     * Returns true if every string in the given `list` matches any of the given glob `patterns`.\n     *\n     * @param list The string or array of strings to test.\n     * @param patterns One or more glob patterns to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns true if any patterns match `str`\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.every(list, patterns[, options]);\n     *\n     * console.log(mm.every('foo.js', ['foo.js']));\n     * // true\n     * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));\n     * // true\n     * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n     * // false\n     * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));\n     * // false\n     * ```\n     */\n    every(\n      list: string | $ReadOnlyArray<string>,\n      patterns: string | $ReadOnlyArray<string>,\n      options?: Options,\n    ): boolean,\n\n    /**\n     * Returns true if **any** of the given glob `patterns` match the specified `string`.\n     *\n     * @param str The string to test.\n     * @param patterns One or more glob patterns to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns true if any patterns match `str`\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.any(string, patterns[, options]);\n     *\n     * console.log(mm.any('a.a', ['b.*', '*.a']));\n     * //=> true\n     * console.log(mm.any('a.a', 'b.*'));\n     * //=> false\n     * ```\n     */\n    any(\n      str: string | $ReadOnlyArray<string>,\n      patterns: string | $ReadOnlyArray<string>,\n      options?: Options,\n    ): boolean,\n\n    /**\n     * Returns true if **all** of the given `patterns` match the specified string.\n     *\n     * @param str The string to test.\n     * @param patterns One or more glob patterns to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns true if any patterns match `str`\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.all(string, patterns[, options]);\n     *\n     * console.log(mm.all('foo.js', ['foo.js']));\n     * // true\n     *\n     * console.log(mm.all('foo.js', ['*.js', '!foo.js']));\n     * // false\n     *\n     * console.log(mm.all('foo.js', ['*.js', 'foo.js']));\n     * // true\n     *\n     * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));\n     * // true\n     * ```\n     */\n    all(\n      str: string | $ReadOnlyArray<string>,\n      patterns: string | $ReadOnlyArray<string>,\n      options?: Options,\n    ): boolean,\n\n    /**\n     * Returns a list of strings that _**do not match any**_ of the given `patterns`.\n     *\n     * @param list Array of strings to match.\n     * @param patterns One or more glob pattern to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns an array of strings that **do not match** the given patterns.\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.not(list, patterns[, options]);\n     *\n     * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));\n     * //=> ['b.b', 'c.c']\n     * ```\n     */\n    not(\n      list: $ReadOnlyArray<string>,\n      patterns: string | $ReadOnlyArray<string>,\n      options?: Options,\n    ): string[],\n\n    /**\n     * Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string.\n     *\n     * @param str The string to match.\n     * @param patterns Glob pattern to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns true if the patter matches any part of `str`.\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.contains(string, pattern[, options]);\n     *\n     * console.log(mm.contains('aa/bb/cc', '*b'));\n     * //=> true\n     * console.log(mm.contains('aa/bb/cc', '*d'));\n     * //=> false\n     * ```\n     */\n    contains(\n      str: string,\n      patterns: string | $ReadOnlyArray<string>,\n      options?: Options,\n    ): boolean,\n\n    /**\n     * Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys.\n     * If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead.\n     *\n     * @param object The object with keys to filter.\n     * @param patterns One or more glob patterns to use for matching.\n     * @param options See available options for changing how matches are performed\n     * @returns Returns an object with only keys that match the given patterns.\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.matchKeys(object, patterns[, options]);\n     *\n     * var obj = { aa: 'a', ab: 'b', ac: 'c' };\n     * console.log(mm.matchKeys(obj, '*b'));\n     * //=> { ab: 'b' }\n     * ```\n     */\n    matchKeys<T>(\n      object: T,\n      patterns: string | $ReadOnlyArray<string>,\n      options?: Options,\n    ): $Shape<T>,\n\n    /**\n     * Returns a memoized matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match.\n     *\n     * @param pattern Glob pattern\n     * @param options See available options for changing how matches are performed.\n     * @returns Returns a matcher function.\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.matcher(pattern[, options]);\n     *\n     * var isMatch = mm.matcher('*.!(*a)');\n     * console.log(isMatch('a.a'));\n     * //=> false\n     * console.log(isMatch('a.b'));\n     * //=> true\n     * ```\n     */\n    matcher(pattern: string, options?: Options): (str: string) => boolean,\n\n    /**\n     * Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match.\n     *\n     * @param pattern Glob pattern to use for matching.\n     * @param string String to match\n     * @param options See available options for changing how matches are performed\n     * @returns Returns an array of captures if the string matches the glob pattern, otherwise `null`.\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.capture(pattern, string[, options]);\n     *\n     * console.log(mm.capture('test/*.js', 'test/foo.js'));\n     * //=> ['foo']\n     * console.log(mm.capture('test/*.js', 'foo/bar.css'));\n     * //=> null\n     * ```\n     */\n    capture(\n      pattern: string,\n      string: string,\n      options?: Options,\n    ): string[] | null,\n\n    /**\n     * Create a regular expression from the given glob `pattern`.\n     *\n     * @param pattern A glob pattern to convert to regex.\n     * @param options See available options for changing how matches are performed.\n     * @returns Returns a regex created from the given pattern.\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.makeRe(pattern[, options]);\n     *\n     * console.log(mm.makeRe('*.js'));\n     * //=> /^(?:(\\.[\\\\\\/])?(?!\\.)(?=.)[^\\/]*?\\.js)$/\n     * ```\n     */\n    makeRe(pattern: string, options?: Options): RegExp,\n\n    /**\n     * Expand the given brace `pattern`.\n     *\n     * @param pattern String with brace pattern to expand.\n     * @param options Any options to change how expansion is performed. See the [braces](https://github.com/micromatch/braces) library for all available options.\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * console.log(mm.braces('foo/{a,b}/bar'));\n     * //=> ['foo/(a|b)/bar']\n     *\n     * console.log(mm.braces('foo/{a,b}/bar', {expand: true}));\n     * //=> ['foo/(a|b)/bar']\n     * ```\n     */\n    braces(pattern: string, options?: mixed): string[],\n\n    /**\n     * Parse a glob pattern to create the source string for a regular expression.\n     *\n     * @returns Returns an AST\n     *\n     * @example\n     * ```js\n     * var mm = require('micromatch');\n     * mm.parse(pattern[, options]);\n     *\n     * var ast = mm.parse('a/{b,c}/d');\n     * console.log(ast);\n     * // { type: 'root',\n     * //   errors: [],\n     * //   input: 'a/{b,c}/d',\n     * //   nodes:\n     * //    [ { type: 'bos', val: '' },\n     * //      { type: 'text', val: 'a/' },\n     * //      { type: 'brace',\n     * //        nodes:\n     * //         [ { type: 'brace.open', val: '{' },\n     * //           { type: 'text', val: 'b,c' },\n     * //           { type: 'brace.close', val: '}' } ] },\n     * //      { type: 'text', val: '/d' },\n     * //      { type: 'eos', val: '' } ] }\n     * ```\n     */\n    parse(glob: string, options?: Options): any,\n\n    /**\n     * Scan a glob pattern to separate the pattern into segments.\n     */\n    scan(\n      pattern: string,\n      options: {|...ScanOptions, parts: true|},\n    ): ScanInfoWithParts,\n    scan(\n      pattern: string,\n      options: {|...ScanOptions, tokens: true|},\n    ): ScanInfoWithTokens,\n    scan(pattern: string, options?: ScanOptions): ScanInfo,\n  |};\n}\n"
  },
  {
    "path": "flow-libs/ncp.js.flow",
    "content": "// @flow\n\n// Derived from the README and source of ncp located at\n// https://github.com/AvianFlu/ncp and\n// https://github.com/AvianFlu/ncp/blob/6820b0fbe3f7400fdb283c741ef88b6d8e2d4994/lib/ncp.js\n// Which is licensed MIT\n\ndeclare module 'ncp' {\n  import type {Readable, Writable} from 'stream';\n\n  declare type NcpOptions = {\n    filter?: RegExp,\n    transform?: (\n      readable: Readable,\n      writable: Writable,\n      filePath: string\n    ) => mixed,\n    clobber?: boolean,\n    dereference?: boolean,\n    stopOnErr?: boolean,\n    errs?: Writable,\n    ...\n  };\n\n  declare module.exports: (\n    source: string,\n    destination: string,\n    callback: (errors: Array<Error>) => void\n  ) => void &\n    ((\n      source: string,\n      destination: string,\n      options: NcpOptions,\n      callback: (errors: Array<Error>) => void\n    ) => void);\n}\n"
  },
  {
    "path": "flow-libs/node-ipc.js.flow",
    "content": "// @flow strict-local\n\n// Based on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/38f29378a16e729ebb9827dc06357bf1d24ea5dd/types/node-ipc/index.d.ts\n\n// Type definitions for node-ipc 9.2\n// Project: http://riaevangelist.github.io/node-ipc/\n// Definitions by: Arvitaly <https://github.com/arvitaly>, gjurgens <https://github.com/gjurgens>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n\ndeclare module 'node-ipc' {\n  import type {Socket} from 'net';\n\n  declare class IPC {\n    /**\n     * Set these variables in the ipc.config scope to overwrite or set default values\n     */\n    config: Config;\n    /**\n     * https://www.npmjs.com/package/node-ipc#log\n     */\n    log(...args: any[]): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#connectto\n     * Used for connecting as a client to local Unix Sockets and Windows Sockets.\n     * This is the fastest way for processes on the same machine to communicate\n     * because it bypasses the network card which TCP and UDP must both use.\n     * @param id is the string id of the socket being connected to.\n     * The socket with this id is added to the ipc.of object when created.\n     * @param path is the path of the Unix Domain Socket File, if the System is Windows,\n     * this will automatically be converted to an appropriate pipe with the same information as the Unix Domain Socket File.\n     * If not set this will default to ipc.config.socketRoot+ipc.config.appspace+id\n     * @param callback this is the function to execute when the socket has been created\n     */\n    connectTo(id: string, path?: string, callback?: () => void): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#connectto\n     * Used for connecting as a client to local Unix Sockets and Windows Sockets.\n     * This is the fastest way for processes on the same machine to communicate\n     * because it bypasses the network card which TCP and UDP must both use.\n     * @param id is the string id of the socket being connected to.\n     * The socket with this id is added to the ipc.of object when created.\n     * @param callback this is the function to execute when the socket has been created\n     */\n    connectTo(id: string, callback?: () => void): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#connecttonet\n     * Used to connect as a client to a TCP or TLS socket via the network card.\n     * This can be local or remote, if local, it is recommended that you use the Unix\n     * and Windows Socket Implementaion of connectTo instead as it is much faster since it avoids the network card altogether.\n     * For TLS and SSL Sockets see the node-ipc TLS and SSL docs.\n     * They have a few additional requirements, and things to know about and so have their own doc.\n     * @param id is the string id of the socket being connected to. For TCP & TLS sockets,\n     * this id is added to the ipc.of object when the socket is created with a reference to the socket\n     * @param host is the host on which the TCP or TLS socket resides.\n     * This will default to ipc.config.networkHost if not specified\n     * @param port the port on which the TCP or TLS socket resides\n     * @param callback     this is the function to execute when the socket has been created\n     */\n    connectToNet(\n      id: string,\n      host?: string,\n      port?: number,\n      callback?: () => void,\n    ): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#connecttonet\n     * Used to connect as a client to a TCP or TLS socket via the network card.\n     * This can be local or remote, if local, it is recommended that you use the Unix\n     * and Windows Socket Implementaion of connectTo instead as it is much faster since it avoids the network card altogether.\n     * For TLS and SSL Sockets see the node-ipc TLS and SSL docs.\n     * They have a few additional requirements, and things to know about and so have their own doc.\n     * @param id is the string id of the socket being connected to. For TCP & TLS sockets,\n     * this id is added to the ipc.of object when the socket is created with a reference to the socket\n     * @param callback     this is the function to execute when the socket has been created\n     */\n    connectToNet(id: string, callback?: () => void): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#connecttonet\n     * Used to connect as a client to a TCP or TLS socket via the network card.\n     * This can be local or remote, if local, it is recommended that you use the Unix\n     * and Windows Socket Implementaion of connectTo instead as it is much faster since it avoids the network card altogether.\n     * For TLS and SSL Sockets see the node-ipc TLS and SSL docs.\n     * They have a few additional requirements, and things to know about and so have their own doc.\n     * @param id is the string id of the socket being connected to.\n     * For TCP & TLS sockets, this id is added to the ipc.of object when the socket is created with a reference to the socket\n     * @param host is the host on which the TCP or TLS socket resides. This will default to ipc.config.networkHost if not specified\n     * @param port the port on which the TCP or TLS socket resides\n     * @param callback     this is the function to execute when the socket has been created\n     */\n    connectToNet(\n      id: string,\n      hostOrPort: number | string,\n      callback?: () => void,\n    ): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#disconnect\n     * Used to disconnect a client from a Unix, Windows, TCP or TLS socket.\n     * The socket and its refrence will be removed from memory and the ipc.of scope.\n     * This can be local or remote. UDP clients do not maintain connections and so there are no Clients and this method has no value to them\n     * @param id is the string id of the socket from which to disconnect\n     */\n    disconnect(id: string): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#serve\n     * Used to create local Unix Socket Server or Windows Socket Server to which Clients can bind.\n     * The server can emit events to specific Client Sockets, or broadcast events to all known Client Sockets\n     * @param path This is the path of the Unix Domain Socket File, if the System is Windows,\n     * this will automatically be converted to an appropriate pipe with the same information as the Unix Domain Socket File.\n     * If not set this will default to ipc.config.socketRoot+ipc.config.appspace+id\n     * @param callback This is a function to be called after the Server has started.\n     * This can also be done by binding an event to the start event like ipc.server.on('start',function(){});\n     */\n    serve(path: string, callback?: () => void): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#serve\n     * Used to create local Unix Socket Server or Windows Socket Server to which Clients can bind.\n     * The server can emit events to specific Client Sockets, or broadcast events to all known Client Sockets\n     * @param callback This is a function to be called after the Server has started.\n     * This can also be done by binding an event to the start event like ipc.server.on('start',function(){});\n     */\n    serve(callback?: () => void): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#serve\n     * Used to create local Unix Socket Server or Windows Socket Server to which Clients can bind.\n     * The server can emit events to specific Client Sockets, or broadcast events to all known Client Sockets\n     */\n    serve(callback: null): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#servenet\n     * @param host If not specified this defaults to the first address in os.networkInterfaces().\n     * For TCP, TLS & UDP servers this is most likely going to be 127.0.0.1 or ::1\n     * @param port The port on which the TCP, UDP, or TLS Socket server will be bound, this defaults to 8000 if not specified\n     * @param UDPType If set this will create the server as a UDP socket. 'udp4' or 'udp6' are valid values.\n     * This defaults to not being set. When using udp6 make sure to specify a valid IPv6 host, like ::1\n     * @param callback Function to be called when the server is created\n     */\n    serveNet(\n      host?: string,\n      port?: number,\n      UDPType?: 'udp4' | 'udp6',\n      callback?: () => void,\n    ): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#servenet\n     * @param UDPType If set this will create the server as a UDP socket. 'udp4' or 'udp6' are valid values.\n     * This defaults to not being set. When using udp6 make sure to specify a valid IPv6 host, like ::1\n     * @param callback Function to be called when the server is created\n     */\n    serveNet(UDPType: 'udp4' | 'udp6', callback?: () => void): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#servenet\n     * @param callback Function to be called when the server is created\n     * @param port The port on which the TCP, UDP, or TLS Socket server will be bound, this defaults to 8000 if not specified\n     */\n    serveNet(callbackOrPort: EmptyCallback | number): void;\n    /**\n     * https://www.npmjs.com/package/node-ipc#servenet\n     * @param host If not specified this defaults to the first address in os.networkInterfaces().\n     * For TCP, TLS & UDP servers this is most likely going to be 127.0.0.1 or ::1\n     * @param port The port on which the TCP, UDP, or TLS Socket server will be bound, this defaults to 8000 if not specified\n     * @param callback Function to be called when the server is created\n     */\n    serveNet(host: string, port: number, callback?: () => void): void;\n    /**\n     * This is where socket connection references will be stored when connecting to them as a client via the ipc.connectTo\n     * or iupc.connectToNet. They will be stored based on the ID used to create them, eg : ipc.of.mySocket\n     */\n    of: {[string]: Client};\n    /**\n     * This is a refrence to the server created by ipc.serve or ipc.serveNet\n     */\n    server: Server;\n  }\n  declare type EmptyCallback = () => void;\n  declare interface Client {\n    /**\n     * triggered when a JSON message is received. The event name will be the type string from your message\n     * and the param will be the data object from your message eg : { type:'myEvent',data:{a:1}}\n     */\n    on(event: string, callback: (...args: any[]) => void): Client;\n    /**\n     * triggered when an error has occured\n     */\n    on(event: 'error', callback: (err: any) => void): Client;\n    /**\n     * connect - triggered when socket connected\n     * disconnect - triggered by client when socket has disconnected from server\n     * destroy - triggered when socket has been totally destroyed, no further auto retries will happen and all references are gone\n     */\n    on(\n      event: 'connect' | 'disconnect' | 'destroy',\n      callback: () => void,\n    ): Client;\n    /**\n     * triggered by server when a client socket has disconnected\n     */\n    on(\n      event: 'socket.disconnected',\n      callback: (socket: Socket, destroyedSocketID: string) => void,\n    ): Client;\n    /**\n     * triggered when ipc.config.rawBuffer is true and a message is received\n     */\n    on(event: 'data', callback: (buffer: Buffer) => void): Client;\n    emit(event: string, value?: any): Client;\n    /**\n     * Unbind subscribed events\n     */\n    off(event: string, handler: any): Client;\n  }\n  declare interface Server extends Client {\n    /**\n     * start serving need top call serve or serveNet first to set up the server\n     */\n    start(): void;\n    /**\n     * close the server and stop serving\n     */\n    stop(): void;\n    emit(value: any): Client;\n    emit(event: string, value: any): Client;\n    emit(socket: Socket | SocketConfig, event: string, value?: any): Server;\n    emit(socketConfig: Socket | SocketConfig, value?: any): Server;\n    broadcast(event: string, value?: any): Client;\n  }\n  declare interface SocketConfig {\n    address?: string | void;\n    port?: number | void;\n  }\n  declare interface Config {\n    /**\n     * Default: 'app.'\n     * Used for Unix Socket (Unix Domain Socket) namespacing.\n     * If not set specifically, the Unix Domain Socket will combine the socketRoot, appspace,\n     * and id to form the Unix Socket Path for creation or binding.\n     * This is available incase you have many apps running on your system, you may have several sockets with the same id,\n     * but if you change the appspace, you will still have app specic unique sockets\n     */\n    appspace: string;\n    /**\n     * Default: '/tmp/'\n     * The directory in which to create or bind to a Unix Socket\n     */\n    socketRoot: string;\n    /**\n     * Default: os.hostname()\n     * The id of this socket or service\n     */\n    id: string;\n    /**\n     * Default: 'localhost'\n     * The local or remote host on which TCP, TLS or UDP Sockets should connect\n     * Should resolve to 127.0.0.1 or ::1 see the table below related to this\n     */\n    networkHost: string;\n    /**\n     * Default: 8000\n     * The default port on which TCP, TLS, or UDP sockets should connect\n     */\n    networkPort: number;\n    /**\n     * Default: false\n     * Makes the pipe readable for all users including windows services\n     */\n    readableAll: boolean;\n    /**\n     * Default: false\n     * Makes the pipe writable for all users including windows services\n     */\n    writableAll: boolean;\n    /**\n     * Default: 'utf8'\n     * the default encoding for data sent on sockets. Mostly used if rawBuffer is set to true.\n     * Valid values are : ascii utf8 utf16le ucs2 base64 hex\n     */\n    encoding: 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'base64' | 'hex';\n    /**\n     * Default: false\n     * If true, data will be sent and received as a raw node Buffer NOT an Object as JSON.\n     * This is great for Binary or hex IPC, and communicating with other processes in languages like C and C++\n     */\n    rawBuffer: boolean;\n    /**\n     * Default: false\n     * Synchronous requests. Clients will not send new requests until the server answers\n     */\n    sync: boolean;\n    /**\n     * Default: false\n     * Turn on/off logging default is false which means logging is on\n     */\n    silent: boolean;\n    /**\n     * Default: true\n     * Turn on/off util.inspect colors for ipc.log\n     */\n    logInColor: boolean;\n    /**\n     * Default: 5\n     * Set the depth for util.inspect during ipc.log\n     */\n    logDepth: number;\n    /**\n     * Default: console.log\n     * The function which receives the output from ipc.log; should take a single string argument\n     */\n    logger: (msg: string) => void;\n    /**\n     * Default: 100\n     * This is the max number of connections allowed to a socket. It is currently only being set on Unix Sockets.\n     * Other Socket types are using the system defaults\n     */\n    maxConnections: number;\n    /**\n     * Default: 500\n     * This is the time in milliseconds a client will wait before trying to reconnect to a server if the connection is lost.\n     * This does not effect UDP sockets since they do not have a client server relationship like Unix Sockets and TCP Sockets\n     */\n    retry: number;\n    /*  */\n    /**\n     * Default: false\n     * if set, it represents the maximum number of retries after each disconnect before giving up\n     * and completely killing a specific connection\n     */\n    maxRetries: boolean | number;\n    /**\n     * Default: false\n     * Defaults to false meaning clients will continue to retry to connect to servers indefinitely at the retry interval.\n     * If set to any number the client will stop retrying when that number is exceeded after each disconnect.\n     * If set to true in real time it will immediately stop trying to connect regardless of maxRetries.\n     * If set to 0, the client will NOT try to reconnect\n     */\n    stopRetrying: boolean;\n    /**\n     * Default: true\n     * Defaults to true meaning that the module will take care of deleting the IPC socket prior to startup.\n     * If you use node-ipc in a clustered environment where there will be multiple listeners on the same socket,\n     * you must set this to false and then take care of deleting the socket in your own code.\n     */\n    unlink: boolean;\n    /**\n     * Primarily used when specifying which interface a client should connect through.\n     * see the socket.connect documentation in the node.js api https://nodejs.org/api/net.html#net_socket_connect_options_connectlistener\n     */\n    interfaces: {|\n      /**\n       * Default: false\n       */\n      localAddress?: boolean | void,\n      /**\n       * Default: false\n       */\n      localPort?: boolean | void,\n      /**\n       * Default: false\n       */\n      family?: boolean | void,\n      /**\n       * Default: false\n       */\n      hints?: boolean | void,\n      /**\n       * Default: false\n       */\n      lookup?: boolean | void,\n    |};\n    tls: {|\n      rejectUnauthorized?: boolean | void,\n      public?: string | void,\n      private?: string | void,\n    |};\n  }\n\n  declare module.exports: IPC;\n}\n"
  },
  {
    "path": "flow-libs/ora.js.flow",
    "content": "/**\n * Flowtype definitions for index\n * Generated by Flowgen from a Typescript Definition\n * Flowgen v1.13.0\n * @flow\n */\n\ndeclare module 'ora' { // manually added\n\nimport type { SpinnerName } from \"cli-spinners\";\n\ndeclare var npm$namespace$ora: {|\n  Spinner: Class<ora$Spinner>,\n  Options: Class<ora$Options>,\n  PersistOptions: Class<ora$PersistOptions>,\n  Ora: Class<ora$Ora>,\n|};\ndeclare interface ora$Spinner {\n  +interval?: number;\n  +frames: string[];\n}\n\ndeclare type ora$Color =\n  | \"black\"\n  | \"red\"\n  | \"green\"\n  | \"yellow\"\n  | \"blue\"\n  | \"magenta\"\n  | \"cyan\"\n  | \"white\"\n  | \"gray\";\n\ndeclare type ora$PrefixTextGenerator = () => string;\n\ndeclare interface ora$Options {\n  /**\n   * Text to display after the spinner.\n   */\n  +text?: string;\n\n  /**\n   * Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.\n   */\n  +prefixText?: string | ora$PrefixTextGenerator;\n\n  /**\n   * Name of one of the provided spinners. See [`example.js`](https://github.com/BendingBender/ora/blob/master/example.js) in this repo if you want to test out different spinners. On Windows, it will always use the line spinner as the Windows command-line doesn't have proper Unicode support.\n   * @default 'dots'\n   *\n   * Or an object like:\n   * @example ```\n   * {\n   * \tinterval: 80, // Optional\n   * \tframes: ['-', '+', '-']\n   * }\n   * ```\n   */\n  +spinner?: SpinnerName | ora$Spinner;\n\n  /**\n   * Color of the spinner.\n   * @default 'cyan'\n   */\n  +color?: ora$Color;\n\n  /**\n   * Set to `false` to stop Ora from hiding the cursor.\n   * @default true\n   */\n  +hideCursor?: boolean;\n\n  /**\n   * Indent the spinner with the given number of spaces.\n   * @default 0\n   */\n  +indent?: number;\n\n  /**\n   * Interval between each frame.\n   *\n   * Spinners provide their own recommended interval, so you don't really need to specify this.\n   *\n   * Default: Provided by the spinner or `100`.\n   */\n  +interval?: number;\n\n  /**\n   * Stream to write the output.\n   *\n   * You could for example set this to `process.stdout` instead.\n   * @default process.stderr\n   */\n  +stream?: stream$Writable;\n\n  /**\n   * Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.\n   *\n   * Note that `{isEnabled: false}` doesn't mean it won't output anything. It just means it won't output the spinner, colors, and other ansi escape codes. It will still log text.\n   */\n  +isEnabled?: boolean;\n\n  /**\n   * Disable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.\n   * @default false\n   */\n  +isSilent?: boolean;\n\n  /**\n   * Discard stdin input (except Ctrl+C) while running if it's TTY. This prevents the spinner from twitching on input, outputting broken lines on `Enter` key presses, and prevents buffering of input while the spinner is running.\n   *\n   * This has no effect on Windows as there's no good way to implement discarding stdin properly there.\n   * @default true\n   */\n  +discardStdin?: boolean;\n}\n\ndeclare interface ora$PersistOptions {\n  /**\n   * Symbol to replace the spinner with.\n   * @default ' '\n   */\n  +symbol?: string;\n\n  /**\n   * Text to be persisted after the symbol.\n   *\n   * Default: Current `text`.\n   */\n  +text?: string;\n\n  /**\n   * Text or a function that returns text to be persisted before the symbol. No prefix text will be displayed if set to an empty string.\n   *\n   * Default: Current `prefixText`.\n   */\n  +prefixText?: string | ora$PrefixTextGenerator;\n}\n\ndeclare interface ora$Ora {\n  /**\n   * A boolean of whether the instance is currently spinning.\n   */\n  +isSpinning: boolean;\n\n  /**\n   * Change the text after the spinner.\n   */\n  text: string;\n\n  /**\n   * Change the text or function that returns text before the spinner. No prefix text will be displayed if set to an empty string.\n   */\n  prefixText: string | ora$PrefixTextGenerator;\n\n  /**\n   * Change the spinner color.\n   */\n  color: ora$Color;\n\n  /**\n   * Change the spinner.\n   */\n  spinner: SpinnerName | ora$Spinner;\n\n  /**\n   * Change the spinner indent.\n   */\n  indent: number;\n\n  /**\n   * Start the spinner.\n   * @param text - Set the current text.\n   * @returns The spinner instance.\n   */\n  start(text?: string): ora$Ora;\n\n  /**\n   * Stop and clear the spinner.\n   * @returns The spinner instance.\n   */\n  stop(): ora$Ora;\n\n  /**\n   * Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided.\n   * @param text - Will persist text if provided.\n   * @returns The spinner instance.\n   */\n  succeed(text?: string): ora$Ora;\n\n  /**\n   * Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided.\n   * @param text - Will persist text if provided.\n   * @returns The spinner instance.\n   */\n  fail(text?: string): ora$Ora;\n\n  /**\n   * Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided.\n   * @param text - Will persist text if provided.\n   * @returns The spinner instance.\n   */\n  warn(text?: string): ora$Ora;\n\n  /**\n   * Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided.\n   * @param text - Will persist text if provided.\n   * @returns The spinner instance.\n   */\n  info(text?: string): ora$Ora;\n\n  /**\n   * Stop the spinner and change the symbol or text.\n   * @returns The spinner instance.\n   */\n  stopAndPersist(options?: ora$PersistOptions): ora$Ora;\n\n  /**\n   * Clear the spinner.\n   * @returns The spinner instance.\n   */\n  clear(): ora$Ora;\n\n  /**\n   * Manually render a new frame.\n   * @returns The spinner instance.\n   */\n  render(): ora$Ora;\n\n  /**\n   * Get a new frame.\n   * @returns The spinner instance text.\n   */\n  frame(): string;\n}\ndeclare var ora: {\n  /**\n   * Elegant terminal spinner.\n   * @param options - If a string is provided, it is treated as a shortcut for `options.text`.\n   * @example ```\n   * import ora = require('ora');\n   *\n   * const spinner = ora('Loading unicorns').start();\n   *\n   * setTimeout(() => {\n   * \tspinner.color = 'yellow';\n   * \tspinner.text = 'Loading rainbows';\n   * }, 1000);\n   * ```\n   */\n  (options?: ora$Options | string): ora$Ora,\n\n  /**\n   * Starts a spinner for a promise. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects.\n   * @param action - The promise to start the spinner for.\n   * @param options - If a string is provided, it is treated as a shortcut for `options.text`.\n   * @returns The spinner instance.\n   */\n  promise(action: Promise<mixed>, options?: ora$Options | string): ora$Ora,\n  ...\n};\ndeclare export default typeof ora;\n\n}\n"
  },
  {
    "path": "flow-libs/parcel-watcher.js.flow",
    "content": "// @flow\n\n// Derived from the README and source of @parcel/watcher located at\n// https://github.com/parcel-bundler/watcher and\n// https://github.com/parcel-bundler/watcher/blob/411903f55462dd93350edb18088476f775381921/index.js\n// Which is licensed MIT\n\ndeclare module '@parcel/watcher' {\n  declare type FilePath = string;\n  declare type Options = {|\n    ignore?: Array<FilePath>,\n    backend?: 'fs-events' | 'watchman' | 'inotify' | 'windows' | 'brute-force'\n  |};\n  declare type AsyncSubscription = {|unsubscribe: () => Promise<mixed>|};\n  declare type Event = {|\n    +path: FilePath,\n    +type: 'create' | 'update' | 'delete'\n  |};\n\n  declare module.exports: {\n    getEventsSince(\n      dir: FilePath,\n      snapshot: FilePath,\n      opts: Options\n    ): Promise<Array<Event>>,\n    subscribe(\n      dir: FilePath,\n      fn: (err: Error, events: Array<Event>) => mixed,\n      opts: Options\n    ): Promise<AsyncSubscription>,\n    unsubscribe(\n      dir: FilePath,\n      fn: (err: Error, events: Array<Event>) => mixed,\n      opts: Options\n    ): Promise<mixed>,\n    writeSnapshot(\n      dir: FilePath,\n      snapshot: FilePath,\n      opts: Options\n    ): Promise<FilePath>,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/perf_hooks.js.flow",
    "content": "// @flow\n\n// Converted from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/7a7dd9277ea9272a3d36eba617b6a56c97ba1c52/types/node/perf_hooks.d.ts\n\n/**\n * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for\n * Node.js-specific performance measurements.\n *\n * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/):\n *\n * * [High Resolution Time](https://www.w3.org/TR/hr-time-2)\n * * [Performance Timeline](https://w3c.github.io/performance-timeline/)\n * * [User Timing](https://www.w3.org/TR/user-timing/)\n * * [Resource Timing](https://www.w3.org/TR/resource-timing-2/)\n *\n * ```js\n * const { PerformanceObserver, performance } = require('node:perf_hooks');\n *\n * const obs = new PerformanceObserver((items) => {\n *   console.log(items.getEntries()[0].duration);\n *   performance.clearMarks();\n * });\n * obs.observe({ type: 'measure' });\n * performance.measure('Start to Now');\n *\n * performance.mark('A');\n * doSomeLongRunningProcess(() => {\n *   performance.measure('A to Now', 'A');\n *\n *   performance.mark('B');\n *   performance.measure('A to B', 'A', 'B');\n * });\n * ```\n * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/perf_hooks.js)\n */\ndeclare module 'perf_hooks' {\n  // import type {AsyncResource} from 'async_hooks';\n\n  declare type EntryType =\n    | 'node'\n    | 'mark'\n    | 'measure'\n    | 'gc'\n    | 'function'\n    | 'http2'\n    | 'http'\n    | 'dns'\n    | 'net';\n  declare interface NodeGCPerformanceDetail {\n    /**\n     * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies\n     * the type of garbage collection operation that occurred.\n     * See perf_hooks.constants for valid values.\n     */\n    +kind?: number | void;\n    /**\n     * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`\n     * property contains additional information about garbage collection operation.\n     * See perf_hooks.constants for valid values.\n     */\n    +flags?: number | void;\n  }\n  /**\n   * The constructor of this class is not exposed to users directly.\n   * @since v8.5.0\n   */\n  declare class PerformanceEntry {\n    /**\n     * The total number of milliseconds elapsed for this entry. This value will not\n     * be meaningful for all Performance Entry types.\n     * @since v8.5.0\n     */\n    +duration: number;\n    /**\n     * The name of the performance entry.\n     * @since v8.5.0\n     */\n    +name: string;\n    /**\n     * The high resolution millisecond timestamp marking the starting time of the\n     * Performance Entry.\n     * @since v8.5.0\n     */\n    +startTime: number;\n    /**\n     * The type of the performance entry. It may be one of:\n     *\n     * * `'node'` (Node.js only)\n     * * `'mark'` (available on the Web)\n     * * `'measure'` (available on the Web)\n     * * `'gc'` (Node.js only)\n     * * `'function'` (Node.js only)\n     * * `'http2'` (Node.js only)\n     * * `'http'` (Node.js only)\n     * @since v8.5.0\n     */\n    +entryType: EntryType;\n    /**\n     * Additional detail specific to the `entryType`.\n     * @since v16.0.0\n     */\n    +detail?: NodeGCPerformanceDetail | mixed | void; // TODO: Narrow this based on entry type.\n    toJSON(): any;\n  }\n  /**\n   * Exposes marks created via the `Performance.mark()` method.\n   * @since v18.2.0, v16.17.0\n   */\n  declare class PerformanceMark extends PerformanceEntry {\n    +duration: 0;\n    +entryType: 'mark';\n  }\n  /**\n   * Exposes measures created via the `Performance.measure()` method.\n   *\n   * The constructor of this class is not exposed to users directly.\n   * @since v18.2.0, v16.17.0\n   */\n  declare class PerformanceMeasure extends PerformanceEntry {\n    +entryType: 'measure';\n  }\n  /**\n   * _This property is an extension by Node.js. It is not available in Web browsers._\n   *\n   * Provides timing details for Node.js itself. The constructor of this class\n   * is not exposed to users.\n   * @since v8.5.0\n   */\n  declare class PerformanceNodeTiming extends PerformanceEntry {\n    /**\n     * The high resolution millisecond timestamp at which the Node.js process\n     * completed bootstrapping. If bootstrapping has not yet finished, the property\n     * has the value of -1.\n     * @since v8.5.0\n     */\n    +bootstrapComplete: number;\n    /**\n     * The high resolution millisecond timestamp at which the Node.js environment was\n     * initialized.\n     * @since v8.5.0\n     */\n    +environment: number;\n    /**\n     * The high resolution millisecond timestamp of the amount of time the event loop\n     * has been idle within the event loop's event provider (e.g. `epoll_wait`). This\n     * does not take CPU usage into consideration. If the event loop has not yet\n     * started (e.g., in the first tick of the main script), the property has the\n     * value of 0.\n     * @since v14.10.0, v12.19.0\n     */\n    +idleTime: number;\n    /**\n     * The high resolution millisecond timestamp at which the Node.js event loop\n     * exited. If the event loop has not yet exited, the property has the value of -1\\.\n     * It can only have a value of not -1 in a handler of the `'exit'` event.\n     * @since v8.5.0\n     */\n    +loopExit: number;\n    /**\n     * The high resolution millisecond timestamp at which the Node.js event loop\n     * started. If the event loop has not yet started (e.g., in the first tick of the\n     * main script), the property has the value of -1.\n     * @since v8.5.0\n     */\n    +loopStart: number;\n    /**\n     * The high resolution millisecond timestamp at which the V8 platform was\n     * initialized.\n     * @since v8.5.0\n     */\n    +v8Start: number;\n  }\n  declare interface EventLoopUtilization {\n    idle: number;\n    active: number;\n    utilization: number;\n  }\n  /**\n   * @param util1 The result of a previous call to eventLoopUtilization()\n   * @param util2 The result of a previous call to eventLoopUtilization() prior to util1\n   */\n  declare type EventLoopUtilityFunction = (\n    util1?: EventLoopUtilization,\n    util2?: EventLoopUtilization,\n  ) => EventLoopUtilization;\n  declare interface MarkOptions {\n    /**\n     * Additional optional detail to include with the mark.\n     */\n    detail?: mixed | void;\n    /**\n     * An optional timestamp to be used as the mark time.\n     * @default `performance.now()`.\n     */\n    startTime?: number | void;\n  }\n  declare interface MeasureOptions {\n    /**\n     * Additional optional detail to include with the mark.\n     */\n    detail?: mixed | void;\n    /**\n     * Duration between start and end times.\n     */\n    duration?: number | void;\n    /**\n     * Timestamp to be used as the end time, or a string identifying a previously recorded mark.\n     */\n    end?: number | string | void;\n    /**\n     * Timestamp to be used as the start time, or a string identifying a previously recorded mark.\n     */\n    start?: number | string | void;\n  }\n  declare interface TimerifyOptions {\n    /**\n     * A histogram object created using\n     * `perf_hooks.createHistogram()` that will record runtime durations in\n     * nanoseconds.\n     */\n    histogram?: RecordableHistogram | void;\n  }\n  declare interface Performance {\n    /**\n     * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.\n     * If name is provided, removes only the named mark.\n     * @param name\n     */\n    clearMarks(name?: string): void;\n    /**\n     * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.\n     * If name is provided, removes only the named measure.\n     * @param name\n     * @since v16.7.0\n     */\n    clearMeasures(name?: string): void;\n    /**\n     * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.\n     * If you are only interested in performance entries of certain types or that have certain names, see\n     * `performance.getEntriesByType()` and `performance.getEntriesByName()`.\n     * @since v16.7.0\n     */\n    getEntries(): PerformanceEntry[];\n    /**\n     * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`\n     * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`.\n     * @param name\n     * @param type\n     * @since v16.7.0\n     */\n    getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];\n    /**\n     * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`\n     * whose `performanceEntry.entryType` is equal to `type`.\n     * @param type\n     * @since v16.7.0\n     */\n    getEntriesByType(type: EntryType): PerformanceEntry[];\n    /**\n     * Creates a new PerformanceMark entry in the Performance Timeline.\n     * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',\n     * and whose performanceEntry.duration is always 0.\n     * Performance marks are used to mark specific significant moments in the Performance Timeline.\n     * @param name\n     * @return The PerformanceMark entry that was created\n     */\n    mark(name?: string, options?: MarkOptions): PerformanceMark;\n    /**\n     * Creates a new PerformanceMeasure entry in the Performance Timeline.\n     * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',\n     * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.\n     *\n     * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify\n     * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,\n     * then startMark is set to timeOrigin by default.\n     *\n     * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp\n     * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.\n     * @param name\n     * @param startMark\n     * @param endMark\n     * @return The PerformanceMeasure entry that was created\n     */\n    measure(\n      name: string,\n      startMark?: string,\n      endMark?: string,\n    ): PerformanceMeasure;\n    measure(name: string, options: MeasureOptions): PerformanceMeasure;\n    /**\n     * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.\n     */\n    +nodeTiming: PerformanceNodeTiming;\n    /**\n     * @return the current high resolution millisecond timestamp\n     */\n    now(): number;\n    /**\n     * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.\n     */\n    +timeOrigin: number;\n    /**\n     * Wraps a function within a new function that measures the running time of the wrapped function.\n     * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.\n     * @param fn\n     */\n    timerify<T: (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;\n    /**\n     * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.\n     * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).\n     * No other CPU idle time is taken into consideration.\n     */\n    eventLoopUtilization: EventLoopUtilityFunction;\n  }\n  declare interface PerformanceObserverEntryList {\n    /**\n     * Returns a list of `PerformanceEntry` objects in chronological order\n     * with respect to `performanceEntry.startTime`.\n     *\n     * ```js\n     * const {\n     *   performance,\n     *   PerformanceObserver,\n     * } = require('node:perf_hooks');\n     *\n     * const obs = new PerformanceObserver((perfObserverList, observer) => {\n     *   console.log(perfObserverList.getEntries());\n     *\n     *    * [\n     *    *   PerformanceEntry {\n     *    *     name: 'test',\n     *    *     entryType: 'mark',\n     *    *     startTime: 81.465639,\n     *    *     duration: 0\n     *    *   },\n     *    *   PerformanceEntry {\n     *    *     name: 'meow',\n     *    *     entryType: 'mark',\n     *    *     startTime: 81.860064,\n     *    *     duration: 0\n     *    *   }\n     *    * ]\n     *\n     *   performance.clearMarks();\n     *   performance.clearMeasures();\n     *   observer.disconnect();\n     * });\n     * obs.observe({ type: 'mark' });\n     *\n     * performance.mark('test');\n     * performance.mark('meow');\n     * ```\n     * @since v8.5.0\n     */\n    getEntries(): PerformanceEntry[];\n    /**\n     * Returns a list of `PerformanceEntry` objects in chronological order\n     * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is\n     * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`.\n     *\n     * ```js\n     * const {\n     *   performance,\n     *   PerformanceObserver,\n     * } = require('node:perf_hooks');\n     *\n     * const obs = new PerformanceObserver((perfObserverList, observer) => {\n     *   console.log(perfObserverList.getEntriesByName('meow'));\n     *\n     *    * [\n     *    *   PerformanceEntry {\n     *    *     name: 'meow',\n     *    *     entryType: 'mark',\n     *    *     startTime: 98.545991,\n     *    *     duration: 0\n     *    *   }\n     *    * ]\n     *\n     *   console.log(perfObserverList.getEntriesByName('nope')); // []\n     *\n     *   console.log(perfObserverList.getEntriesByName('test', 'mark'));\n     *\n     *    * [\n     *    *   PerformanceEntry {\n     *    *     name: 'test',\n     *    *     entryType: 'mark',\n     *    *     startTime: 63.518931,\n     *    *     duration: 0\n     *    *   }\n     *    * ]\n     *\n     *   console.log(perfObserverList.getEntriesByName('test', 'measure')); // []\n     *\n     *   performance.clearMarks();\n     *   performance.clearMeasures();\n     *   observer.disconnect();\n     * });\n     * obs.observe({ entryTypes: ['mark', 'measure'] });\n     *\n     * performance.mark('test');\n     * performance.mark('meow');\n     * ```\n     * @since v8.5.0\n     */\n    getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];\n    /**\n     * Returns a list of `PerformanceEntry` objects in chronological order\n     * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`.\n     *\n     * ```js\n     * const {\n     *   performance,\n     *   PerformanceObserver,\n     * } = require('node:perf_hooks');\n     *\n     * const obs = new PerformanceObserver((perfObserverList, observer) => {\n     *   console.log(perfObserverList.getEntriesByType('mark'));\n     *\n     *    * [\n     *    *   PerformanceEntry {\n     *    *     name: 'test',\n     *    *     entryType: 'mark',\n     *    *     startTime: 55.897834,\n     *    *     duration: 0\n     *    *   },\n     *    *   PerformanceEntry {\n     *    *     name: 'meow',\n     *    *     entryType: 'mark',\n     *    *     startTime: 56.350146,\n     *    *     duration: 0\n     *    *   }\n     *    * ]\n     *\n     *   performance.clearMarks();\n     *   performance.clearMeasures();\n     *   observer.disconnect();\n     * });\n     * obs.observe({ type: 'mark' });\n     *\n     * performance.mark('test');\n     * performance.mark('meow');\n     * ```\n     * @since v8.5.0\n     */\n    getEntriesByType(type: EntryType): PerformanceEntry[];\n  }\n  declare type PerformanceObserverCallback = (\n    list: PerformanceObserverEntryList,\n    observer: PerformanceObserver,\n  ) => void;\n  /**\n   * @since v8.5.0\n   */\n  declare class PerformanceObserver /* extends AsyncResource */ {\n    constructor(callback: PerformanceObserverCallback): this;\n    /**\n     * Disconnects the `PerformanceObserver` instance from all notifications.\n     * @since v8.5.0\n     */\n    disconnect(): void;\n    /**\n     * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:\n     *\n     * ```js\n     * const {\n     *   performance,\n     *   PerformanceObserver,\n     * } = require('node:perf_hooks');\n     *\n     * const obs = new PerformanceObserver((list, observer) => {\n     *   // Called once asynchronously. `list` contains three items.\n     * });\n     * obs.observe({ type: 'mark' });\n     *\n     * for (let n = 0; n < 3; n++)\n     *   performance.mark(`test${n}`);\n     * ```\n     * @since v8.5.0\n     */\n    observe(\n      options:\n        | {|\n            +entryTypes: EntryType[],\n            buffered?: boolean | void,\n          |}\n        | {|\n            type: EntryType,\n            buffered?: boolean | void,\n          |},\n    ): void;\n  }\n  declare var constants: {|\n    +NODE_PERFORMANCE_GC_MAJOR: number,\n    +NODE_PERFORMANCE_GC_MINOR: number,\n    +NODE_PERFORMANCE_GC_INCREMENTAL: number,\n    +NODE_PERFORMANCE_GC_WEAKCB: number,\n    +NODE_PERFORMANCE_GC_FLAGS_NO: number,\n    +NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number,\n    +NODE_PERFORMANCE_GC_FLAGS_FORCED: number,\n    +NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number,\n    +NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number,\n    +NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number,\n    +NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number,\n  |};\n  declare var performance: Performance;\n  declare interface EventLoopMonitorOptions {\n    /**\n     * The sampling rate in milliseconds.\n     * Must be greater than zero.\n     * @default 10\n     */\n    resolution?: number | void;\n  }\n  declare interface Histogram {\n    /**\n     * Returns a `Map` object detailing the accumulated percentile distribution.\n     * @since v11.10.0\n     */\n    +percentiles: Map<number, number>;\n    /**\n     * The number of times the event loop delay exceeded the maximum 1 hour event\n     * loop delay threshold.\n     * @since v11.10.0\n     */\n    +exceeds: number;\n    /**\n     * The minimum recorded event loop delay.\n     * @since v11.10.0\n     */\n    +min: number;\n    /**\n     * The maximum recorded event loop delay.\n     * @since v11.10.0\n     */\n    +max: number;\n    /**\n     * The mean of the recorded event loop delays.\n     * @since v11.10.0\n     */\n    +mean: number;\n    /**\n     * The standard deviation of the recorded event loop delays.\n     * @since v11.10.0\n     */\n    +stddev: number;\n    /**\n     * Resets the collected histogram data.\n     * @since v11.10.0\n     */\n    reset(): void;\n    /**\n     * Returns the value at the given percentile.\n     * @since v11.10.0\n     * @param percentile A percentile value in the range (0, 100].\n     */\n    percentile(percentile: number): number;\n  }\n  declare interface IntervalHistogram extends Histogram {\n    /**\n     * Enables the update interval timer. Returns `true` if the timer was\n     * started, `false` if it was already started.\n     * @since v11.10.0\n     */\n    enable(): boolean;\n    /**\n     * Disables the update interval timer. Returns `true` if the timer was\n     * stopped, `false` if it was already stopped.\n     * @since v11.10.0\n     */\n    disable(): boolean;\n  }\n  declare interface RecordableHistogram extends Histogram {\n    /**\n     * @since v15.9.0, v14.18.0\n     * @param val The amount to record in the histogram.\n     */\n    record(val: number /* | bigint */): void;\n    /**\n     * Calculates the amount of time (in nanoseconds) that has passed since the\n     * previous call to `recordDelta()` and records that amount in the histogram.\n     *\n     * ## Examples\n     * @since v15.9.0, v14.18.0\n     */\n    recordDelta(): void;\n    /**\n     * Adds the values from `other` to this histogram.\n     * @since v17.4.0, v16.14.0\n     */\n    add(other: RecordableHistogram): void;\n  }\n  /**\n   * _This property is an extension by Node.js. It is not available in Web browsers._\n   *\n   * Creates an `IntervalHistogram` object that samples and reports the event loop\n   * delay over time. The delays will be reported in nanoseconds.\n   *\n   * Using a timer to detect approximate event loop delay works because the\n   * execution of timers is tied specifically to the lifecycle of the libuv\n   * event loop. That is, a delay in the loop will cause a delay in the execution\n   * of the timer, and those delays are specifically what this API is intended to\n   * detect.\n   *\n   * ```js\n   * const { monitorEventLoopDelay } = require('node:perf_hooks');\n   * const h = monitorEventLoopDelay({ resolution: 20 });\n   * h.enable();\n   * // Do something.\n   * h.disable();\n   * console.log(h.min);\n   * console.log(h.max);\n   * console.log(h.mean);\n   * console.log(h.stddev);\n   * console.log(h.percentiles);\n   * console.log(h.percentile(50));\n   * console.log(h.percentile(99));\n   * ```\n   * @since v11.10.0\n   */\n  declare function monitorEventLoopDelay(\n    options?: EventLoopMonitorOptions,\n  ): IntervalHistogram;\n  declare interface CreateHistogramOptions {\n    /**\n     * The minimum recordable value. Must be an integer value greater than 0.\n     * @default 1\n     */\n    min?: number /* | bigint */ | void;\n    /**\n     * The maximum recordable value. Must be an integer value greater than min.\n     * @default Number.MAX_SAFE_INTEGER\n     */\n    max?: number /* | bigint */ | void;\n    /**\n     * The number of accuracy digits. Must be a number between 1 and 5.\n     * @default 3\n     */\n    figures?: number | void;\n  }\n  /**\n   * Returns a `RecordableHistogram`.\n   * @since v15.9.0, v14.18.0\n   */\n  declare function createHistogram(\n    options?: CreateHistogramOptions,\n  ): RecordableHistogram;\n  // import type { performance as _performance } from \"perf_hooks\";\n  // global {\n  //     /**\n  //      * `performance` is a global reference for `require('perf_hooks').performance`\n  //      * https://nodejs.org/api/globals.html#performance\n  //      * @since v16.0.0\n  //      */\n  //     var performance: typeof globalThis extends {\n  //         onmessage: any;\n  //         performance: infer T;\n  //     } ? T\n  //         : typeof _performance;\n  // }\n}\n"
  },
  {
    "path": "flow-libs/pirates.js.flow",
    "content": "// @flow\n\n// Derived from : https://github.com/ariporad/pirates/blob/master/index.d.ts\n// Which is licensed MIT.\n\ndeclare module 'pirates' {\n  declare type Options = {|\n    matcher?: Matcher,\n    exts?: Array<string>,\n    ignoreNodeModules?: boolean,\n  |};\n\n  declare export type Hook = (code: string, filename: string) => string;\n  declare export type Matcher = (code: string) => boolean;\n  declare export type RevertFunction = () => void;\n  declare export function addHook(hook: Hook, opts?: Options): RevertFunction;\n}\n"
  },
  {
    "path": "flow-libs/postcss.js.flow",
    "content": "// @flow\n\n// (Only covers the API that Parcel uses)\n// Derived from the PostCSS docs available at\n// http://api.postcss.org/postcss.html.\n\ndeclare module 'postcss' {\n  // eslint-disable-next-line import/no-extraneous-dependencies\n  import type {SourceMapGenerator} from 'source-map';\n\n  declare type Callback<T> = (T, number) => false | void;\n\n  declare interface Input {\n    file?: string;\n  }\n\n  declare interface Position {\n    offset: number;\n    column: number;\n    line: number;\n  }\n\n  declare interface Source {\n    input: Input;\n    start?: Position;\n    end?: Position;\n  }\n\n  declare interface Node {\n    parent: Container;\n    source: Source;\n    +type: 'atrule' | 'comment' | 'decl' | 'root' | 'rule';\n    toJSON(): mixed;\n  }\n\n  declare interface Decl extends Container {\n    type: 'decl';\n    prop: string;\n    value: string;\n    source: Source;\n  }\n\n  declare interface Rule extends Container {\n    selector: string;\n    type: 'rule';\n    remove(): void;\n  }\n\n  declare interface AtRule extends Container {\n    name: string;\n    params: string;\n    type: 'atrule';\n    remove(): void;\n  }\n\n  declare interface Container extends Node {\n    each(callback: Callback<Node>): false | void;\n    nodes: Array<Node>;\n    walk(callback: Callback<Node>): false | void;\n    walkRules(callback: Callback<Rule>): false | void;\n    walkDecls(nameFilter: string | RegExp, callback: Callback<Decl>): void;\n    walkDecls(callback: Callback<Decl>): void;\n    walkAtRules(nameFilter: string | RegExp, callback: Callback<AtRule>): void;\n    walkAtRules(callback: Callback<AtRule>): void;\n  }\n\n  declare interface Root extends Container {}\n\n  declare class Processor {\n    process(\n      css: string | Result | Root,\n      opts?: ProcessOptions,\n    ): Promise<Result>;\n  }\n\n  declare type ProcessOptions = $Shape<{|\n    from: string,\n    to: string,\n    map: MapOptions,\n    parser: Parser,\n    stringifier: Stringifier,\n    syntax: {|\n      parser: Parser,\n      stringifier: Stringifier,\n    |},\n  |}>;\n\n  declare type MapOptions = {|\n    inline?: boolean,\n    prev?: string | any | false | function,\n    sourcesContent?: boolean,\n    annotation?: false | string,\n    from?: string,\n  |};\n\n  declare type Parser = (\n    css: string,\n    optsopt: {|from?: string, map?: MapOptions|},\n  ) => Root;\n\n  declare type Plugin = {|\n    postcss(...args: Array<any>): void,\n  |};\n\n  declare type PluginFunction = (root: Root, result: Result) => void;\n\n  declare type Result = {\n    content: string,\n    css: string,\n    map: SourceMapGenerator,\n    messages: Array<Message>,\n    opts: ProcessOptions,\n    processor: Processor,\n    root: Root,\n    toString(): string,\n    ...\n  };\n\n  declare type Message = {|\n    type: string,\n    plugin: string,\n    file: string,\n  |};\n\n  declare type Builder = (\n    part: string,\n    node: Root,\n    typeopt?: 'start' | 'end',\n  ) => void;\n\n  declare type Stringifier = (root: Root, builder: Builder) => void;\n\n  declare module.exports: {\n    (plugins?: Array<Plugin | PluginFunction> | Processor): Processor,\n    parse: Parser,\n    stringify: Stringifier,\n    root: ($Shape<Node>) => Root,\n    atRule: ($Shape<Node>) => Container,\n    comment: ($Shape<Node>) => Node,\n    decl: ($Shape<Node>) => Node,\n    rule: ($Shape<Node>) => Container,\n    fromJSON: <T: Node>(mixed) => T,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/posthtml-parser.js.flow",
    "content": "// @flow\n\n// Derived from the PostHTML sources available at\n// https://github.com/posthtml/posthtml-parser/blob/41df54c0ae3061cc6f417826676fda5a3d4806c0/index.js\n// which is licensed MIT.\n\ndeclare module 'posthtml-parser' {\n  declare type PostHTMLNode = {\n    tag: string,\n    attrs?: { [string]: string, ... },\n    content?: Array<string>,\n    ...\n  };\n\n  declare var parser: (\n    html: string,\n    options?: {\n      lowerCaseAttributeNames?: boolean,\n      lowerCaseTags?: boolean,\n      sourceLocations?: boolean,\n      ...\n    }\n  ) => PostHTMLNode;\n\n  declare module.exports: {\n    parser: typeof parser;\n    ...\n  }\n}\n"
  },
  {
    "path": "flow-libs/posthtml-render.js.flow",
    "content": "// @flow\n\n// Derived from the PostHTML sources available at\n// https://github.com/posthtml/posthtml-render/blob/53d746430e78a865c6177fff557bbbf324af40e3/lib/index.js\n// which is licensed MIT.\n\ndeclare module 'posthtml-render' {\n  declare type PostHTMLNode = {\n    tag: string,\n    attrs?: { [string]: string, ... },\n    content?: Array<string>,\n    ...\n  };\n\n  declare var render: (\n    tree: PostHTMLNode,\n    options?: {\n      singleTags?: Array<string | RegExp>,\n      closingSingleTag?: string,\n      ...\n    }\n  ) => string;\n\n  declare module.exports: {\n    render: typeof render;\n    ...\n  }\n}\n"
  },
  {
    "path": "flow-libs/posthtml.js.flow",
    "content": "// @flow\n\n// Derived from the PostHTML sources available at\n// https://github.com/posthtml/posthtml-parser/blob/41df54c0ae3061cc6f417826676fda5a3d4806c0/index.js\n// https://github.com/posthtml/posthtml/blob/881d4a5b170109789a5245a379229afb4793e21a/lib/index.js\n// https://github.com/posthtml/posthtml/blob/881d4a5b170109789a5245a379229afb4793e21a/lib/api.js\n// which is licensed MIT.\n\ndeclare module 'posthtml' {\n  declare type PostHTMLNode = {\n    tag: string,\n    attrs?: {[string]: string, ...},\n    content?: Array<string | PostHTMLNode>,\n    location?: {\n       start: {|line: number, column: number|},\n       end: {|line: number, column: number|},\n       ...\n     },\n    ...\n  };\n\n  declare type PostHTMLTree = Array<PostHTMLNode>;\n  declare type PostHTMLOptions = {\n    sync?: Boolean,\n    skipParse?: Boolean,\n    ...\n  };\n  declare type PostHTMLMessage = {\n    type: 'dependency',\n    file: string,\n    ...\n  };\n\n  declare type PostHTMLExpression = $Shape<PostHTMLNode> | $Shape<PostHTMLNode>[]\n\n  declare var walk: (fn: (node: PostHTMLNode) => PostHTMLNode | PostHTMLNode[]) => void;\n  declare var process: (\n    tree: PostHTMLTree | string,\n    options: ?PostHTMLOptions,\n  ) => Promise<{\n    html: string,\n    tree: PostHTMLTree,\n    messages: Array<PostHTMLMessage>,\n    ...\n  }>;\n  declare var match: (expression: PostHTMLExpression, fn: (node: PostHTMLNode) => PostHTMLNode) => void;\n\n  declare class Api {\n    static walk: typeof walk;\n    walk: typeof walk;\n    process: typeof process;\n    match: typeof match;\n  }\n\n  declare class PostHTML extends Api {\n    name: string;\n    version: number;\n  }\n\n  declare module.exports: (plugins: ?Array<Function>) => PostHTML;\n}\n"
  },
  {
    "path": "flow-libs/preact.js.flow",
    "content": "// @flow\n\ndeclare module 'preact/hooks' {\n  declare export function useState<T>(\n    initialState: T | (() => T),\n  ): [T, (T) => void];\n  declare export function useMemo<T>(cb: T, deps: Array<mixed>): T;\n  declare export function useCallback<T>(cb: T, deps: Array<mixed>): T;\n  declare export function useEffect(\n    () => void | Promise<void> | (() => mixed),\n    Array<mixed>,\n  ): void;\n  declare export function useRef<T>(T): {|current: T|};\n  declare export function useReducer<S, A>(\n    reducer: (S, A) => S,\n    initialState: ?S,\n    getInitialState: ?(?S) => S,\n  ): [S, (A) => void];\n}\n"
  },
  {
    "path": "flow-libs/ps-node.js.flow",
    "content": "// @flow strict-local\n\n// Based on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/38f29378a16e729ebb9827dc06357bf1d24ea5dd/types/ps-node/index.d.ts\n\n// Type definitions for ps-node 0.1\n// Project: https://github.com/neekey/ps#readme\n// Definitions by: Kyle Hensel <https://github.com/k-yle>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n\ndeclare module 'ps-node' {\n  declare export interface Program {\n    arguments: string[];\n    command: string;\n    pid: number;\n  }\n\n  declare export interface Query {\n    pid?: string | string[] | number | void;\n    ppid?: number | void;\n    command?: string | RegExp | void;\n    arguments?: string | RegExp | void;\n    psargs?: string | string[] | void;\n  }\n\n  declare export interface Signal {\n    signal: string;\n    timeout: number;\n  }\n\n  /** Query Process: Focus on pid & cmd */\n  declare export function lookup(\n    query: Query,\n    cb: (err: Error, list: Program[]) => void,\n  ): void;\n\n  declare export function kill(\n    pID: number | string,\n    cb?: (err?: Error) => void,\n  ): void;\n  declare export function kill(\n    pID: number | string,\n    signal?: string | Signal,\n    cb?: (err?: Error) => void,\n  ): void;\n}\n"
  },
  {
    "path": "flow-libs/resolve.js.flow",
    "content": "// @flow\n\ndeclare module 'resolve' {\n  declare type ResolveOptions = {|\n    basedir?: string,\n    extensions?: Array<string>\n  |};\n\n  declare module.exports: { (\n    id: string,\n    opts?: ResolveOptions,\n    cb: (err: Error, res: string, pkg?: { [string]: any, ... }) => mixed\n  ): void, ... };\n}\n"
  },
  {
    "path": "flow-libs/serialize-to-js.js.flow",
    "content": "// @flow\n\ndeclare module 'serialize-to-js' {\n  declare type SerializeOptions = {|\n    ignoreCircular?: boolean,\n    reference?: boolean,\n    references?: Array<string>,\n    unsafe?: boolean\n  |};\n\n  declare type SerializeToModuleOptions = SerializeOptions & {|\n    beautify?: boolean,\n    comment?: string\n  |};\n\n  declare module.exports: (source: mixed, opts?: SerializeOptions) => string;\n}\n"
  },
  {
    "path": "flow-libs/split2.js.flow",
    "content": "// @flow\n\ndeclare module 'split2' {\n  import type {Transform} from 'stream';\n\n  declare module.exports: () => Transform;\n}\n"
  },
  {
    "path": "flow-libs/srcset.js.flow",
    "content": "// @flow\ndeclare module 'srcset' {\n  declare type SrcSetDefinition = {|\n    url: string,\n    width?: number,\n    density?: number,\n  |};\n\n  declare type Options = {|\n    strict?: boolean,\n  |};\n\n  declare export function parse(\n    srcset: string,\n    options?: Options,\n  ): SrcSetDefinition[];\n\n  declare export function stringify(\n    srcSetDefinitions: SrcSetDefinition[],\n    options?: Options,\n  ): string;\n}\n"
  },
  {
    "path": "flow-libs/strip-ansi.js.flow",
    "content": "// @flow\n\ndeclare module 'strip-ansi' {\n  declare module.exports: (input: string) => string;\n}\n"
  },
  {
    "path": "flow-libs/stylus.js.flow",
    "content": "// @flow\n\n// This doesn't cover most of the API; it only defines some node types that are\n// useful for Parcel.\n\ndeclare module 'stylus' {\n  // Derived manually from\n  // https://github.com/stylus/stylus/blob/59bc665db295981d4e3f702e7275c5589a3c6d15/lib/nodes/node.js\n  declare class Node {\n    lineno: number;\n    column: number;\n    filename: string;\n    +first: Node;\n    +hash: string;\n    +nodeName: string;\n    clone(): Node;\n    toJSON(): {lineno: number, column: number, filename: string, ...};\n    eval(): mixed;\n    toBoolean(): boolean;\n    toExpression(): Node;\n    operate(op: string, right: Node): Node;\n    coerce(other: Node): Node;\n  }\n\n  // Derived manually from\n  // https://github.com/stylus/stylus/blob/59bc665db295981d4e3f702e7275c5589a3c6d15/lib/nodes/literal.js\n  declare class Literal extends Node {\n    constructor(str: string): Literal;\n    val: string;\n    string: string;\n    prefixed: false;\n  }\n\n  // Derived manually from\n  // https://github.com/stylus/stylus/blob/59bc665db295981d4e3f702e7275c5589a3c6d15/lib/nodes/string.js\n  declare class String extends Node {\n    constructor(val: string, quote?: string): String;\n    val: string;\n    string: string;\n    prefixed: false;\n    quote: string;\n  }\n\n  // Obviously an extremely incomplete type definition.\n  declare module.exports: ((...args: Array<mixed>) => any) & {\n    nodes: {\n      Node: typeof Node,\n      Literal: typeof Literal,\n      String: typeof String,\n      ...\n    },\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/term-size.js.flow",
    "content": "/**\n * Flowtype definitions for index\n * Generated by Flowgen from a Typescript Definition\n * Flowgen v1.13.0\n * @flow\n */\n\ndeclare module 'term-size' { // manually added\n\ndeclare var npm$namespace$terminalSize: {|\n  Size: Class<terminalSize$Size>,\n|};\ndeclare interface terminalSize$Size {\n  columns: number;\n  rows: number;\n}\n/**\n * Reliably get the terminal window size.\n * @example ```\n * import terminalSize = require('term-size');\n *\n * terminalSize();\n * //=> {columns: 143, rows: 24}\n * ```\n */\ndeclare function terminalSize(): terminalSize$Size;\ndeclare export default typeof terminalSize;\n\n}\n"
  },
  {
    "path": "flow-libs/terser.js.flow",
    "content": "// @flow\n\n// Derived from documentation and source of\n// Terser JS: https://github.com/terser-js/terser\n\n// TypeScript definitions exist at\n// https://github.com/terser-js/terser/blob/ab6e5cbe022e55546f65da225691c94a48d86c18/tools/terser.d.ts\n\ndeclare module 'terser' {\n  declare type ECMAVersion = 5 | 6 | 7 | 8 | 9;\n\n  declare type CompressOptions =\n    | boolean\n    | {|\n        arrows?: boolean,\n        arguments?: boolean,\n        booleans?: boolean,\n        booleans_as_integers?: boolean,\n        collapse_vars?: boolean,\n        comparisons?: boolean,\n        computed_props?: boolean,\n        conditionals?: boolean,\n        dead_code?: boolean,\n        defaults?: boolean,\n        directives?: boolean,\n        drop_console?: boolean,\n        drop_debugger?: boolean,\n        ecma?: ECMAVersion,\n        evaluate?: boolean,\n        expression?: boolean,\n        global_defs?: {[string]: string, ...},\n        hoist_funs?: boolean,\n        hoist_props?: boolean,\n        hoist_vars?: boolean,\n        if_return?: boolean,\n        inline?: boolean | 0 | 1 | 2 | 3,\n        join_vars?: boolean,\n        keep_classnames?: boolean,\n        keep_fargs?: boolean,\n        keep_fnames?: boolean,\n        keep_infinity?: boolean,\n        loops?: boolean,\n        module?: boolean,\n        negate_iife?: boolean,\n        passes?: number,\n        properties?: boolean,\n        pure_funcs?: ?Array<string>,\n        pure_getters?: boolean | 'strict',\n        reduce_funcs?: boolean,\n        reduce_vars?: boolean,\n        sequences?: boolean,\n        side_effects?: boolean,\n        switches?: boolean,\n        toplevel?: boolean,\n        top_retain?:\n          | null\n          | Array<string>\n          | string\n          | RegExp\n          | (() => null | Array<string> | string | RegExp),\n        typeofs?: boolean,\n        unsafe?: boolean,\n        unsafe_arrows?: boolean,\n        unsafe_comps?: boolean,\n        unsafe_Function?: boolean,\n        unsafe_math?: boolean,\n        unsafe_methods?: boolean,\n        unsafe_proto?: boolean,\n        unsafe_regexp?: boolean,\n        unsafe_undefined?: boolean,\n        unused?: boolean,\n        warnings?: boolean,\n      |};\n\n  declare type MangleOptions =\n    | boolean\n    | {|\n        eval?: boolean,\n        keep_classnames?: boolean,\n        keep_fnames?: boolean,\n        module?: boolean,\n        reserved?: Array<string>,\n        safari10?: boolean,\n        toplevel?: boolean,\n        properties?:\n          | boolean\n          | {|\n              builtins?: boolean,\n              debug?: boolean,\n              keep_quoted?: boolean | 'strict',\n              regex?: ?RegExp,\n              reserved?: Array<string>,\n            |},\n      |};\n\n  declare type OutputOptions = {|\n    ascii_only?: boolean,\n    beautify?: boolean,\n    brances?: boolean,\n    comments?:\n      | boolean\n      | 'all'\n      | 'some'\n      | RegExp\n      | (() => boolean | 'all' | 'some' | RegExp),\n    ecma?: ECMAVersion,\n    indent_level?: number,\n    indent_start?: number,\n    inline_script?: boolean,\n    keep_quoted_props?: boolean,\n    max_line_len?: boolean,\n    preamble?: string,\n    quote_keys?: boolean,\n    quote_style?: 0 | 1 | 2 | 3,\n    safari10?: boolean,\n    semicolons?: boolean,\n    shebang?: boolean,\n    webkit?: boolean,\n    wrap_iife?: boolean,\n  |};\n\n  declare type ParseOptions = {|\n    bare_returns?: boolean,\n    ecma?: ECMAVersion,\n    html5_comments?: boolean,\n    shebang?: boolean,\n  |};\n\n  declare type SourceMapOptions = {|\n    filename?: string,\n    url?: string,\n    content?: any,\n    root?: string,\n    asObject?: boolean,\n  |};\n\n  declare type MinifyOptions = {|\n    compress?: CompressOptions,\n    ecma?: ECMAVersion,\n    keep_classnames?: boolean,\n    keep_fnames?: boolean,\n    ie8?: boolean,\n    mangle?: MangleOptions,\n    module?: boolean,\n    output?: ?OutputOptions,\n    parse?: ParseOptions,\n    nameCache?: ?{[string]: string, ...},\n    safari10?: boolean,\n    toplevel?: boolean,\n    warnings?: boolean,\n    sourceMap?: false | SourceMapOptions,\n  |};\n\n  declare type RawSourceMap = {|\n    +version: number,\n    +sources: string[],\n    +names: string[],\n    +sourceRoot?: string,\n    +sourcesContent?: string[],\n    +mappings: string,\n    +file: string,\n  |};\n\n  declare module.exports: {\n    minify(\n      source: string,\n      options?: MinifyOptions,\n    ): Promise<{|code?: string, error?: Error, map?: string | RawSourceMap|}>,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-libs/vscode-jsonrpc.js.flow",
    "content": "// @flow\ndeclare module 'vscode-jsonrpc/node' {\n  import type {Socket} from 'net';\n  import type {Readable, Writable} from 'stream';\n\n  declare type MessageBufferEncoding = 'ascii' | 'utf-8';\n\n  declare type Logger = {|\n    error: (message: string) => void,\n    warn: (message: string) => void,\n    info: (message: string) => void,\n    log: (message: string) => void,\n  |};\n\n  declare type Disposable = {|\n    /**\n     * Dispose this object.\n     */\n    dispose(): void,\n  |};\n\n  declare interface Event<T> {\n    /**\n     *\n     * @param listener The listener function will be call when the event happens.\n     * @param thisArgs The 'this' which will be used when calling the event listener.\n     * @param disposables An array to which a {{IDisposable}} will be added. The\n     * @return\n     */\n    (\n      listener: (e: T) => any,\n      thisArgs?: any,\n      disposables?: Disposable[],\n    ): Disposable;\n  }\n\n  declare type PartialMessageInfo = {|\n    +messageToken: number,\n    +waitingTime: number,\n  |};\n\n  declare type DataCallback = {|\n    (data: Message): void,\n  |};\n\n  declare interface Message {\n    jsonrpc: string;\n  }\n\n  declare interface NotificationMessage extends Message {\n    /**\n     * The method to be invoked.\n     */\n    method: string;\n    /**\n     * The notification's params.\n     */\n    params?: [] | mixed;\n  }\n\n  declare export class MessageReader {\n    /** Raised whenever an error occurs while reading a message. */\n    +onError: Event<Error>;\n    /** An event raised when the end of the underlying transport has been reached. */\n    +onClose: Event<void>;\n    /**\n     * An event that *may* be raised to inform the owner that only part of a message has been received.\n     * A MessageReader implementation may choose to raise this event after a timeout elapses while waiting for more of a partially received message to be received.\n     */\n    +onPartialMessage: Event<PartialMessageInfo>;\n    /**\n     * Begins listening for incoming messages. To be called at most once.\n     * @param callback A callback for receiving decoded messages.\n     */\n    listen(callback: DataCallback): Disposable;\n    /** Releases resources incurred from reading or raising events. Does NOT close the underlying transport, if any. */\n    dispose(): void;\n  }\n\n  declare export class MessageWriter {\n    /** Raised whenever an error occurs while writing a message. */\n    +onError: Event<[Error, Message | void, number | void]>;\n    /** An event raised when the underlying transport has closed and writing is no longer possible. */\n    +onClose: Event<void>;\n    /**\n     * Sends a JSON-RPC message.\n     * @param msg The JSON-RPC message to be sent.\n     * @description Implementations should guarantee messages are transmitted in the same order that they are received by this method.\n     */\n    write(msg: Message): Promise<void>;\n    end(): void;\n    /** Releases resources incurred from writing or raising events. Does NOT close the underlying transport, if any. */\n    dispose(): void;\n  }\n\n  declare export function createServerPipeTransport(\n    pipeName: string,\n    encoding?: MessageBufferEncoding,\n  ): [MessageReader, MessageWriter];\n\n  declare export function createMessageConnection(\n    reader: MessageReader,\n    writer: MessageWriter,\n    logger?: Logger,\n  ): MessageConnection;\n  declare export function createMessageConnection(\n    inputStream: Readable,\n    outputStream: Writable,\n    logger?: Logger,\n  ): MessageConnection;\n\n  declare interface CancellationToken {\n    /**\n     * Is `true` when the token has been cancelled, `false` otherwise.\n     */\n    +isCancellationRequested: boolean;\n    /**\n     * An [event](#Event) which fires upon cancellation.\n     */\n    +onCancellationRequested: Event<any>;\n  }\n\n  declare export class ParameterStructures {\n    /**\n     * The parameter structure is automatically inferred on the number of parameters\n     * and the parameter type in case of a single param.\n     */\n    static +auto: ParameterStructures;\n    /**\n     * Forces `byPosition` parameter structure. This is useful if you have a single\n     * parameter which has a literal type.\n     */\n    static +byPosition: ParameterStructures;\n    /**\n     * Forces `byName` parameter structure. This is only useful when having a single\n     * parameter. The library will report errors if used with a different number of\n     * parameters.\n     */\n    static +byName: ParameterStructures;\n    static is(value: any): Boolean;\n    toString(): string;\n  }\n\n  declare interface MessageSignature {\n    +method: string;\n    +numberOfParams: number;\n    +parameterStructures: ParameterStructures;\n  }\n\n  declare class AbstractMessageSignature implements MessageSignature {\n    +method: string;\n    +numberOfParams: number;\n    constructor(method: string, numberOfParams: number): this;\n    get parameterStructures(): ParameterStructures;\n  }\n\n  // prettier-ignore\n  declare export class RequestType0<R, E> extends AbstractMessageSignature {\n    constructor(method: string): this;\n  }\n  // prettier-ignore\n  declare export class RequestType<P, R, E> extends AbstractMessageSignature {\n    constructor(method: string, _parameterStructures?: ParameterStructures): this;\n    get parameterStructures(): ParameterStructures;\n  }\n  // prettier-ignore\n  declare export class RequestType1<P1, R, E> extends AbstractMessageSignature {\n    constructor(method: string, _parameterStructures?: ParameterStructures): this;\n    get parameterStructures(): ParameterStructures;\n  }\n  // prettier-ignore\n  declare export class RequestType2<P1, P2, R, E> extends AbstractMessageSignature {\n    constructor(method: string): this;\n  }\n\n  // prettier-ignore\n  declare export class NotificationType<P> extends AbstractMessageSignature {\n    constructor(method: string, _parameterStructures?: ParameterStructures): this;\n    get parameterStructures(): ParameterStructures;\n  }\n  // prettier-ignore\n  declare export class NotificationType0 extends AbstractMessageSignature {\n    constructor(method: string): this;\n  }\n  // prettier-ignore\n  declare export class NotificationType1<P1> extends AbstractMessageSignature {\n    constructor(method: string, _parameterStructures?: ParameterStructures): this;\n    get parameterStructures(): ParameterStructures;\n  }\n  // prettier-ignore\n  declare export class NotificationType2<P1, P2> extends AbstractMessageSignature {\n    constructor(method: string): this;\n  }\n\n  declare interface ResponseErrorLiteral<D> {\n    /**\n     * A number indicating the error type that occured.\n     */\n    code: number;\n    /**\n     * A string providing a short decription of the error.\n     */\n    message: string;\n    /**\n     * A Primitive or Structured value that contains additional\n     * information about the error. Can be omitted.\n     */\n    data?: D;\n  }\n  declare class ResponseError<D> extends Error {\n    +code: number;\n    +data: D | void;\n    constructor(code: number, message: string, data?: D): this;\n    toJson(): ResponseErrorLiteral<D>;\n  }\n\n  declare type HandlerResult<R, E> =\n    | R\n    | ResponseError<E>\n    | Promise<R>\n    | Promise<ResponseError<E>>\n    | Promise<R | ResponseError<E>>;\n\n  declare interface RequestHandler0<R, E> {\n    (token: CancellationToken): HandlerResult<R, E>;\n  }\n  declare interface RequestHandler<P, R, E> {\n    (params: P, token: CancellationToken): HandlerResult<R, E>;\n  }\n  declare interface RequestHandler1<P1, R, E> {\n    (p1: P1, token: CancellationToken): HandlerResult<R, E>;\n  }\n  declare interface RequestHandler2<P1, P2, R, E> {\n    (p1: P1, p2: P2, token: CancellationToken): HandlerResult<R, E>;\n  }\n  declare interface GenericRequestHandler<R, E> {\n    (...params: any[]): HandlerResult<R, E>;\n  }\n  // prettier-ignore\n  declare interface StarRequestHandler {\n    (method: string, params: any[] | mixed | void, token: CancellationToken): HandlerResult<any, any>;\n  }\n  declare interface NotificationHandler0 {\n    (): void;\n  }\n  declare interface NotificationHandler<P> {\n    (params: P): void;\n  }\n  declare interface NotificationHandler1<P1> {\n    (p1: P1): void;\n  }\n  declare interface NotificationHandler2<P1, P2> {\n    (p1: P1, p2: P2): void;\n  }\n  declare interface StarNotificationHandler {\n    (method: string, params: any[] | mixed | void): void;\n  }\n  declare interface GenericNotificationHandler {\n    (...params: any[]): void;\n  }\n\n  declare export class ProgressType<PR> {\n    /**\n     * Clients must not use these properties. They are here to ensure correct typing.\n     * in TypeScript\n     */\n    constructor(): this;\n  }\n\n  declare type ProgressToken = number | string;\n  declare interface ProgressParams<T> {\n    /**\n     * The progress token provided by the client or server.\n     */\n    token: ProgressToken;\n    /**\n     * The progress data.\n     */\n    value: T;\n  }\n\n  // prettier-ignore\n  declare export interface MessageConnection {\n    sendRequest<R, E>(type: RequestType0<R, E>, token?: CancellationToken): Promise<R>;\n    sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken): Promise<R>;\n    sendRequest<P1, R, E>(type: RequestType1<P1, R, E>, p1: P1, token?: CancellationToken): Promise<R>;\n    sendRequest<P1, P2, R, E>(type: RequestType2<P1, P2, R, E>, p1: P1, p2: P2, token?: CancellationToken): Promise<R>;\n    sendRequest<R>(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise<R>;\n    onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E>): Disposable;\n    onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E>): Disposable;\n    onRequest<P1, R, E>(type: RequestType1<P1, R, E>, handler: RequestHandler1<P1, R, E>): Disposable;\n    onRequest<P1, P2, R, E>(type: RequestType2<P1, P2, R, E>, handler: RequestHandler2<P1, P2, R, E>): Disposable;\n    onRequest<R, E>(method: string, handler: GenericRequestHandler<R, E>): Disposable;\n    onRequest(handler: StarRequestHandler): Disposable;\n    sendNotification(type: NotificationType0): void;\n    sendNotification<P>(type: NotificationType<P>, params?: P): void;\n    sendNotification<P1>(type: NotificationType1<P1>, p1: P1): void;\n    sendNotification<P1, P2>(type: NotificationType2<P1, P2>, p1: P1, p2: P2): void;\n    sendNotification(method: string, r0?: ParameterStructures | any, ...rest: any[]): void;\n    onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable;\n    onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable;\n    onNotification<P1>(type: NotificationType1<P1>, handler: NotificationHandler1<P1>): Disposable;\n    onNotification<P1, P2>(type: NotificationType2<P1, P2>, handler: NotificationHandler2<P1, P2>): Disposable;\n    onNotification(method: string, handler: GenericNotificationHandler): Disposable;\n    onNotification(handler: StarNotificationHandler): Disposable;\n    onUnhandledNotification: Event<NotificationMessage>;\n    onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable;\n    sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): void;\n    onUnhandledProgress: Event<ProgressParams<any>>;\n    // trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void;\n    // trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): void;\n    onError: Event<[Error, Message | void, number | void]>;\n    onClose: Event<void>;\n    listen(): void;\n    end(): void;\n    onDispose: Event<void>;\n    dispose(): void;\n    inspect(): void;\n  }\n\n  declare export class SocketMessageReader\n    extends /* ReadableStream */ MessageReader\n  {\n    constructor(socket: Socket, encoding?: MessageBufferEncoding): this;\n  }\n\n  declare export class SocketMessageWriter\n    extends /* WriteableStream */ MessageWriter\n  {\n    constructor(\n      socket: Socket,\n      options?: MessageBufferEncoding /* | MessageWriterOptions */,\n    ): this;\n    dispose(): void;\n  }\n}\n"
  },
  {
    "path": "flow-libs/vscode-languageserver.js.flow",
    "content": "// @flow\ndeclare module 'vscode-languageserver' {\n  declare export opaque type ODiagnosticTag;\n  declare export opaque type ODiagnosticSeverity;\n\n  /**\n   * The diagnostic tags.\n   *\n   * @since 3.15.0\n   */\n  declare export var DiagnosticTag: {|\n    /**\n     * Unused or unnecessary code.\n     *\n     * Clients are allowed to render diagnostics with this tag faded out instead of having\n     * an error squiggle.\n     */\n    Unnecessary: ODiagnosticTag,\n    /**\n     * Deprecated or obsolete code.\n     *\n     * Clients are allowed to rendered diagnostics with this tag strike through.\n     */\n    Deprecated: ODiagnosticTag,\n  |};\n\n  /**\n   * The diagnostic's severity.\n   */\n  declare export var DiagnosticSeverity: {|\n    /**\n     * Reports an error.\n     */\n    Error: ODiagnosticSeverity,\n    /**\n     * Reports a warning.\n     */\n    Warning: ODiagnosticSeverity,\n    /**\n     * Reports an information.\n     */\n    Information: ODiagnosticSeverity,\n    /**\n     * Reports a hint.\n     */\n    Hint: ODiagnosticSeverity,\n  |};\n\n  declare export type DocumentUri = string;\n\n  /**\n   * A literal to identify a text document in the client.\n   */\n  declare export type TextDocumentIdentifier = {|\n    uri: DocumentUri,\n  |};\n\n  /**\n   * Position in a text document expressed as zero-based line and character\n   * offset. Prior to 3.17 the offsets were always based on a UTF-16 string\n   * representation. So a string of the form `a𐐀b` the character offset of the\n   * character `a` is 0, the character offset of `𐐀` is 1 and the character\n   * offset of b is 3 since `𐐀` is represented using two code units in UTF-16.\n   * Since 3.17 clients and servers can agree on a different string encoding\n   * representation (e.g. UTF-8). The client announces it's supported encoding\n   * via the client capability [`general.positionEncodings`](#clientCapabilities).\n   * The value is an array of position encodings the client supports, with\n   * decreasing preference (e.g. the encoding at index `0` is the most preferred\n   * one). To stay backwards compatible the only mandatory encoding is UTF-16\n   * represented via the string `utf-16`. The server can pick one of the\n   * encodings offered by the client and signals that encoding back to the\n   * client via the initialize result's property\n   * [`capabilities.positionEncoding`](#serverCapabilities). If the string value\n   * `utf-16` is missing from the client's capability `general.positionEncodings`\n   * servers can safely assume that the client supports UTF-16. If the server\n   * omits the position encoding in its initialize result the encoding defaults\n   * to the string value `utf-16`. Implementation considerations: since the\n   * conversion from one encoding into another requires the content of the\n   * file / line the conversion is best done where the file is read which is\n   * usually on the server side.\n   *\n   * Positions are line end character agnostic. So you can not specify a position\n   * that denotes `\\r|\\n` or `\\n|` where `|` represents the character offset.\n   *\n   * @since 3.17.0 - support for negotiated position encoding.\n   */\n  declare export type Position = {|line: number, character: number|};\n\n  /**\n   * A range in a text document expressed as (zero-based) start and end positions.\n   *\n   * If you want to specify a range that contains a line including the line ending\n   * character(s) then use an end position denoting the start of the next line.\n   * For example:\n   * ```ts\n   * {\n   *     start: { line: 5, character: 23 }\n   *     end : { line 6, character : 0 }\n   * }\n   * ```\n   */\n  declare export type Range = {|start: Position, end: Position|};\n\n  /**\n   * Structure to capture a description for an error code.\n   *\n   * @since 3.16.0\n   */\n  declare export type CodeDescription = {|href: string|};\n\n  /**\n   * Represents a location inside a resource, such as a line\n   * inside a text file.\n   */\n  declare export type Location = {|uri: string, range: Range|};\n\n  /**\n   * The DiagnosticRelatedInformation namespace provides helper functions to work with\n   * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.\n   */\n  declare export type DiagnosticRelatedInformation = {|\n    location: Location,\n    message: string,\n  |};\n\n  /**\n   * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects\n   * are only valid in the scope of a resource.\n   */\n  declare export type Diagnostic = {|\n    range: Range,\n    severity?: ODiagnosticSeverity,\n    code?: number | string,\n    codeDescription?: CodeDescription,\n    source?: string,\n    message: string,\n    tags?: ODiagnosticTag[],\n    relatedInformation?: DiagnosticRelatedInformation[],\n    data?: mixed,\n  |};\n\n  /**\n   * A parameter literal used in requests to pass a text document and a position inside that\n   * document.\n   */\n  declare export type TextDocumentPositionParams = {\n    textDocument: TextDocumentIdentifier,\n    position: Position,\n    ...\n  };\n\n  /**\n   * Represents the connection of two locations. Provides additional metadata over normal [locations](#Location),\n   * including an origin range.\n   */\n  declare export type LocationLink = {|\n    /**\n     * Span of the origin of this link.\n     *\n     * Used as the underlined span for mouse interaction. Defaults to the word range at\n     * the definition position.\n     */\n    originSelectionRange?: Range,\n    /**\n     * The target resource identifier of this link.\n     */\n    targetUri: DocumentUri,\n    /**\n     * The full target range of this link. If the target for example is a symbol then target range is the\n     * range enclosing this symbol not including leading/trailing whitespace but everything else\n     * like comments. This information is typically used to highlight the range in the editor.\n     */\n    targetRange: Range,\n    /**\n     * The range that should be selected and revealed when this link is being followed, e.g the name of a function.\n     * Must be contained by the `targetRange`. See also `DocumentSymbol#range`\n     */\n    targetSelectionRange: Range,\n  |};\n\n  /**\n   * Information about where a symbol is defined.\n   *\n   * Provides additional metadata over normal [location](#Location) definitions, including the range of\n   * the defining symbol\n   */\n  declare export type DefinitionLink = LocationLink;\n}\n"
  },
  {
    "path": "flow-libs/worker_threads.js.flow",
    "content": "// @flow\n\n// Derived from the TypeScript definitions https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/worker_threads.d.ts\n// TODO: contribute this to flow core\n\ndeclare module \"worker_threads\" {\n  declare var isMainThread: boolean;\n  declare var parentPort: null | MessagePort;\n  declare var threadId: number;\n  declare var workerData: any;\n\n  declare class MessageChannel {\n    +port1: MessagePort;\n    +port2: MessagePort;\n  }\n\n  declare class MessagePort extends events$EventEmitter {\n    close(): void;\n    postMessage(value: any, transferList?: Array<ArrayBuffer | MessagePort>): void;\n    ref(): void;\n    unref(): void;\n    start(): void;\n\n    addListener(event: \"close\", listener: () => void): this;\n    addListener(event: \"message\", listener: (value: any) => void): this;\n    addListener(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    emit(event: \"close\"): boolean;\n    emit(event: \"message\", value: any): boolean;\n    emit(event: string | Symbol, ...args: any[]): boolean;\n\n    on(event: \"close\", listener: () => void): this;\n    on(event: \"message\", listener: (value: any) => void): this;\n    on(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    once(event: \"close\", listener: () => void): this;\n    once(event: \"message\", listener: (value: any) => void): this;\n    once(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    prependListener(event: \"close\", listener: () => void): this;\n    prependListener(event: \"message\", listener: (value: any) => void): this;\n    prependListener(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    prependOnceListener(event: \"close\", listener: () => void): this;\n    prependOnceListener(event: \"message\", listener: (value: any) => void): this;\n    prependOnceListener(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    removeListener(event: \"close\", listener: () => void): this;\n    removeListener(event: \"message\", listener: (value: any) => void): this;\n    removeListener(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    off(event: \"close\", listener: () => void): this;\n    off(event: \"message\", listener: (value: any) => void): this;\n    off(event: string | Symbol, listener: (...args: any[]) => void): this;\n  }\n\n  declare type WorkerOptions = {|\n    env?: Object,\n    eval?: boolean,\n    workerData?: any,\n    stdin?: boolean,\n    stdout?: boolean,\n    stderr?: boolean,\n    execArgv?: string[]\n  |}\n\n  declare class Worker extends events$EventEmitter {\n    +stdin: stream$Writable | null;\n    +stdout: stream$Readable;\n    +stderr: stream$Readable;\n    +threadId: number;\n\n    constructor(filename: string, options?: WorkerOptions): void;\n\n    postMessage(value: any, transferList?: Array<ArrayBuffer | MessagePort>): void;\n    ref(): void;\n    unref(): void;\n    terminate(callback?: (err: Error, exitCode: number) => void): void;\n    /**\n     * Transfer a `MessagePort` to a different `vm` Context. The original `port`\n     * object will be rendered unusable, and the returned `MessagePort` instance will\n     * take its place.\n     *\n     * The returned `MessagePort` will be an object in the target context, and will\n     * inherit from its global `Object` class. Objects passed to the\n     * `port.onmessage()` listener will also be created in the target context\n     * and inherit from its global `Object` class.\n     *\n     * However, the created `MessagePort` will no longer inherit from\n     * `EventEmitter`, and only `port.onmessage()` can be used to receive\n     * events using it.\n     */\n    moveMessagePortToContext(port: MessagePort, context: vm$Context): MessagePort;\n\n    addListener(event: \"error\", listener: (err: Error) => void): this;\n    addListener(event: \"exit\", listener: (exitCode: number) => void): this;\n    addListener(event: \"message\", listener: (value: any) => void): this;\n    addListener(event: \"online\", listener: () => void): this;\n    addListener(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    emit(event: \"error\", err: Error): boolean;\n    emit(event: \"exit\", exitCode: number): boolean;\n    emit(event: \"message\", value: any): boolean;\n    emit(event: \"online\"): boolean;\n    emit(event: string | Symbol, ...args: any[]): boolean;\n\n    on(event: \"error\", listener: (err: Error) => void): this;\n    on(event: \"exit\", listener: (exitCode: number) => void): this;\n    on(event: \"message\", listener: (value: any) => void): this;\n    on(event: \"online\", listener: () => void): this;\n    on(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    once(event: \"error\", listener: (err: Error) => void): this;\n    once(event: \"exit\", listener: (exitCode: number) => void): this;\n    once(event: \"message\", listener: (value: any) => void): this;\n    once(event: \"online\", listener: () => void): this;\n    once(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    prependListener(event: \"error\", listener: (err: Error) => void): this;\n    prependListener(event: \"exit\", listener: (exitCode: number) => void): this;\n    prependListener(event: \"message\", listener: (value: any) => void): this;\n    prependListener(event: \"online\", listener: () => void): this;\n    prependListener(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    prependOnceListener(event: \"error\", listener: (err: Error) => void): this;\n    prependOnceListener(event: \"exit\", listener: (exitCode: number) => void): this;\n    prependOnceListener(event: \"message\", listener: (value: any) => void): this;\n    prependOnceListener(event: \"online\", listener: () => void): this;\n    prependOnceListener(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    removeListener(event: \"error\", listener: (err: Error) => void): this;\n    removeListener(event: \"exit\", listener: (exitCode: number) => void): this;\n    removeListener(event: \"message\", listener: (value: any) => void): this;\n    removeListener(event: \"online\", listener: () => void): this;\n    removeListener(event: string | Symbol, listener: (...args: any[]) => void): this;\n\n    off(event: \"error\", listener: (err: Error) => void): this;\n    off(event: \"exit\", listener: (exitCode: number) => void): this;\n    off(event: \"message\", listener: (value: any) => void): this;\n    off(event: \"online\", listener: () => void): this;\n    off(event: string | Symbol, listener: (...args: any[]) => void): this;\n  }\n}\n"
  },
  {
    "path": "flow-libs/ws.js.flow",
    "content": "// Adapated from flow-typed\n\n/* eslint-disable */\ndeclare type ws$PerMessageDeflateOptions = {|\n  serverNoContextTakeover?: boolean,\n  clientNoContextTakeover?: boolean,\n  serverMaxWindowBits?: boolean | number,\n  clientMaxWindowBits?: boolean | number,\n  zlibDeflateOptions?: zlib$options,\n  zlibInflateOptions?: zlib$options,\n  threshold?: number,\n  concurrencyLimit?: number,\n  isServer?: boolean,\n  maxPayload?: number,\n|};\n\n// $FlowFixMe[incompatible-extend]\ndeclare class ws$WebSocketServer extends events$EventEmitter {\n  /**\n   * Create a `WebSocketServer` instance.\n   */\n  constructor(\n    options: {|\n      backlog?: number,\n      clientTracking?: boolean,\n      handleProtocols?: () => mixed,\n      host?: string,\n      maxPayload?: number,\n      noServer?: boolean,\n      path?: string,\n      perMessageDeflate?: boolean | ws$PerMessageDeflateOptions,\n      port: number,\n      server?: http$Server | https$Server,\n      verifyClient?: () => mixed,\n    |},\n    callback?: () => mixed\n  ): this;\n  constructor(\n    options: {|\n      backlog?: number,\n      clientTracking?: boolean,\n      handleProtocols?: () => mixed,\n      host?: string,\n      maxPayload?: number,\n      noServer?: boolean,\n      path?: string,\n      perMessageDeflate?: boolean | ws$PerMessageDeflateOptions,\n      port?: number,\n      server: http$Server | https$Server,\n      verifyClient?: () => mixed,\n    |},\n    callback?: () => mixed\n  ): this;\n  constructor(\n    options: {|\n      backlog?: number,\n      clientTracking?: boolean,\n      handleProtocols?: () => mixed,\n      host?: string,\n      maxPayload?: number,\n      noServer: boolean,\n      path?: string,\n      perMessageDeflate?: boolean | ws$PerMessageDeflateOptions,\n      port?: number,\n      server?: http$Server | https$Server,\n      verifyClient?: () => mixed,\n    |},\n    callback?: () => mixed\n  ): this;\n\n  /**\n   * Emitted when the server closes.\n   */\n  on(event: 'close', () => mixed): this;\n\n  /**\n   * Emitted when the handshake is complete.\n   */\n  on(\n    event: 'connection',\n    (socket: ws$WebSocket, request: http$IncomingMessage<>) => mixed\n  ): this;\n\n  /**\n   * Emitted when an error occurs on the underlying server.\n   */\n  on(event: 'error', (error: Error) => mixed): this;\n\n  /**\n   * Emitted before the response headers are written to the socket as part of\n   * the handshake.\n   */\n  on(\n    event: 'headers',\n    (headers: Array<string>, request: http$IncomingMessage<>) => mixed\n  ): this;\n\n  /**\n   * Emitted when the underlying server has been bound.\n   */\n  on(event: 'listening', () => mixed): this;\n\n  /**\n   * Returns the bound address, the address family name, and port of the server\n   * as reported by the operating system if listening on an IP socket.\n   * If the server is listening on a pipe or UNIX domain socket, the name is\n   * returned as a string.\n   */\n  address():\n    | null\n    | string\n    | {| port?: number, family?: string, address?: string |};\n\n  /**\n   * A set that stores all connected clients. Please note that this property is\n   * only added when the `clientTracking` is truthy.\n   */\n  clients: Set<ws$WebSocket>;\n\n  /**\n   * Close the server.\n   */\n  close(callback?: () => mixed): void;\n\n  /**\n   * Handle a HTTP Upgrade request.\n   */\n  handleUpgrade(\n    request: http$IncomingMessage<>,\n    socket: net$Socket,\n    head: Buffer,\n    callback: (?ws$WebSocket) => mixed\n  ): void;\n\n  /**\n   * See if a given request should be handled by this server instance.\n   */\n  shouldHandle(request: http$IncomingMessage<>): boolean;\n}\n\ndeclare type ws$WebSocketOptions = {\n  followRedirects?: boolean,\n  handshakeTimeout?: number,\n  maxRedirects?: number,\n  perMessageDeflate?: boolean | ws$PerMessageDeflateOptions,\n  protocolVersion?: number,\n  origin?: string,\n  maxPayload?: number,\n  ...requestOptions,\n  agent?: boolean | http$Agent<> | http$Agent<tls$TLSSocket>,\n  createConnection?:\n    | ((options: net$connectOptions, callback?: () => mixed) => net$Socket)\n    | ((options: tls$connectOptions, callback?: () => mixed) => tls$TLSSocket),\n  ...\n};\n\ndeclare type ws$CloseListener = (code: number, reason: string) => mixed;\ndeclare type ws$ErrorListener = (error: Error) => mixed;\ndeclare type ws$MessageListener = (\n  data: string | Buffer | ArrayBuffer | Array<Buffer>\n) => mixed;\ndeclare type ws$OpenListener = () => mixed;\ndeclare type ws$PingListener = (Buffer) => mixed;\ndeclare type ws$PongListener = (Buffer) => mixed;\ndeclare type ws$UnexpectedResponseListener = (\n  request: http$ClientRequest<>,\n  response: http$IncomingMessage<>\n) => mixed;\ndeclare type ws$UpgradeListener = (response: http$IncomingMessage<>) => mixed;\n\n// $FlowFixMe[incompatible-extend]\ndeclare class ws$WebSocket extends events$EventEmitter {\n  static Server: typeof ws$WebSocketServer;\n\n  static createWebSocketStream: (\n    WebSocket: ws$WebSocket,\n    options?: duplexStreamOptions\n  ) => stream$Duplex;\n\n  static CONNECTING: number;\n  static OPEN: number;\n  static CLOSING: number;\n  static CLOSED: number;\n\n  /**\n   * Create a `WebSocket` instance.\n   */\n  constructor(\n    address: string | URL,\n    protocols?: string | Array<string>,\n    options?: ws$WebSocketOptions\n  ): this;\n  constructor(address: string | URL, options: ws$WebSocketOptions): this;\n\n  /*\n   * Emitted when the connection is closed.\n   */\n  on('close', ws$CloseListener): this;\n\n  /*\n   * Emitted when an error occurs.\n   */\n  on('error', ws$ErrorListener): this;\n\n  /*\n   * Emitted when a message is received from the server.\n   */\n  on('message', ws$MessageListener): this;\n\n  /*\n   * Emitted when the connection is established.\n   */\n  on('open', ws$OpenListener): this;\n\n  /*\n   * Emitted when a ping is received from the server.\n   */\n  on('ping', ws$PingListener): this;\n\n  /*\n   * Emitted when a pong is received from the server.\n   */\n  on('pong', ws$PongListener): this;\n\n  /*\n   * Emitted when the server response is not the expected one,\n   * for example a 401 response.\n   */\n  on('unexpected-response', ws$UnexpectedResponseListener): this;\n\n  /*\n   * Emitted when response headers are received from the server as part of the\n   * handshake.\n   */\n  on('upgrade', ws$UpgradeListener): this;\n\n  /**\n   * Register an event listener emulating the `EventTarget` interface.\n   */\n  addEventListener(\n    type: 'close',\n    listener: ws$CloseListener,\n    options?: {| once?: boolean |}\n  ): this;\n  addEventListener(\n    type: 'error',\n    listener: ws$ErrorListener,\n    options?: {| once?: boolean |}\n  ): this;\n  addEventListener(\n    type: 'message',\n    listener: ws$MessageListener,\n    options?: {| once?: boolean |}\n  ): this;\n  addEventListener(\n    type: 'open',\n    listener: ws$OpenListener,\n    options?: {| once?: boolean |}\n  ): this;\n  addEventListener(\n    type: 'ping',\n    listener: ws$PingListener,\n    options?: {| once?: boolean |}\n  ): this;\n  addEventListener(\n    type: 'pong',\n    listener: ws$PongListener,\n    options?: {| once?: boolean |}\n  ): this;\n  addEventListener(\n    type: 'unexpected-response',\n    ws$UnexpectedResponseListener,\n    options?: {| once?: boolean |}\n  ): this;\n  addEventListener(\n    type: 'upgrade',\n    listener: ws$UpgradeListener,\n    options?: {| once?: boolean |}\n  ): this;\n\n  /**\n   * A string indicating the type of binary data being transmitted by the\n   * connection.\n   */\n  binaryType: string;\n\n  /**\n   * The number of bytes of data that have been queued using calls to send()\n   * but not yet transmitted to the network.\n   */\n  bufferedAmount: number;\n\n  /**\n   * Initiate a closing handshake.\n   */\n  close(code?: number, reason?: string): void;\n\n  /**\n   * The negotiated extensions.\n   */\n  extensions: string;\n\n  /**\n   * Send a ping.\n   */\n  ping(data?: any, mask?: boolean, callback?: () => mixed): void;\n  ping(data: any, callback: () => mixed): void;\n  ping(callback: () => mixed): void;\n\n  /**\n   * Send a pong.\n   */\n  pong(data?: any, mask?: boolean, callback?: () => mixed): void;\n  pong(data: any, callback: () => mixed): void;\n  pong(callback: () => mixed): void;\n\n  /**\n   * The subprotocol selected by the server.\n   */\n  protocol: string;\n\n  /**\n   * The current state of the connection.\n   */\n  readyState: number;\n\n  /**\n   * Removes an event listener emulating the `EventTarget` interface.\n   */\n  removeEventListener(type: 'close', listener: ws$CloseListener): this;\n  removeEventListener(type: 'error', listener: ws$ErrorListener): this;\n  removeEventListener(type: 'message', listener: ws$MessageListener): this;\n  removeEventListener(type: 'open', listener: ws$OpenListener): this;\n  removeEventListener(type: 'ping', listener: ws$PingListener): this;\n  removeEventListener(type: 'pong', listener: ws$PongListener): this;\n  removeEventListener(\n    type: 'unexpected-response',\n    ws$UnexpectedResponseListener\n  ): this;\n  removeEventListener(type: 'upgrade', listener: ws$UpgradeListener): this;\n\n  /**\n   * Send a data message.\n   */\n  send(\n    data?: any,\n    options?: {|\n      compress?: boolean,\n      binary?: boolean,\n      mask?: boolean,\n      fin?: boolean,\n    |},\n    callback?: () => mixed\n  ): void;\n  send(data: any, callback: () => mixed): void;\n\n  /**\n   * Forcibly close the connection.\n   */\n  terminate(): void;\n}\n\ndeclare module 'ws' {\n  declare module.exports: typeof ws$WebSocket;\n}\n"
  },
  {
    "path": "flow-typed/npm/@swc/core_v1.x.x.js",
    "content": "// @flow\n\ndeclare module '@swc/core' {\n  /**\n   * Flowtype definitions for types\n   * Generated by Flowgen from a Typescript Definition\n   * Flowgen v1.21.0\n   */\n\n  // see https://gist.github.com/thecotne/6e5969f4aaf8f253985ed36b30ac9fe0\n  declare type $FlowGen$If<X: boolean, Then, Else = empty> = $Call<\n    ((true, Then, Else) => Then) & ((false, Then, Else) => Else),\n    X,\n    Then,\n    Else,\n  >;\n\n  declare type $FlowGen$Assignable<A, B> = $Call<\n    ((...r: [B]) => true) & ((...r: [A]) => false),\n    A,\n  >;\n\n  declare export type Plugin = {|\n    (module: Program): Program,\n  |};\n  declare export type ParseOptions = {|\n    ...ParserConfig,\n    ...{|\n      comments?: boolean,\n      script?: boolean,\n\n      /**\n       * Defaults to es3.\n       */\n      target?: JscTarget,\n    |},\n  |};\n  declare export type TerserEcmaVersion = 5 | 2015 | 2016 | string | number;\n  declare export type JsMinifyOptions = {|\n    compress?: TerserCompressOptions | boolean,\n    format?: {|\n      ...JsFormatOptions /*...ToSnakeCaseProperties<JsFormatOptions>*/,\n    |},\n    mangle?: TerserMangleOptions | boolean,\n    ecma?: TerserEcmaVersion,\n    keep_classnames?: boolean,\n    keep_fnames?: boolean,\n    module?: boolean,\n    safari10?: boolean,\n    toplevel?: boolean,\n    sourceMap?: boolean,\n    outputPath?: string,\n    inlineSourcesContent?: boolean,\n  |};\n\n  /**\n   * @example ToSnakeCase<'indentLevel'> == 'indent_level'\n   */\n  // declare type ToSnakeCase<T: string> = $FlowGen$If<$FlowGen$Assignable<T,undefined: /* NO PRINT IMPLEMENTED: TemplateLiteralType */ any>,undefined: /* NO PRINT IMPLEMENTED: TemplateLiteralType */ any,T>;\n  /**\n   * @example ToSnakeCaseProperties<{indentLevel: 3}> == {indent_level: 3}\n   */\n  // declare type ToSnakeCaseProperties<T> = $ObjMapi<T, <K>(K) => $ElementType<T, K>>;\n  /**\n   * These properties are mostly not implemented yet,\n   * but it exists to support passing terser config to swc minify\n   * without modification.\n   */\n  declare export type JsFormatOptions = {|\n    /**\n     * Currently noop.\n     * @default false\n     * @alias ascii_only\n     */\n    asciiOnly?: boolean,\n\n    /**\n     * Currently noop.\n     * @default false\n     */\n    beautify?: boolean,\n\n    /**\n     * Currently noop.\n     * @default false\n     */\n    braces?: boolean,\n\n    /**\n     * - `false`: removes all comments\n     * - `'some'`: preserves some comments\n     * - `'all'`: preserves all comments\n     * @default false\n     */\n    comments?: false | 'some' | 'all',\n\n    /**\n     * Currently noop.\n     * @default 5\n     */\n    ecma?: TerserEcmaVersion,\n\n    /**\n     * Currently noop.\n     * @alias indent_level\n     */\n    indentLevel?: number,\n\n    /**\n     * Currently noop.\n     * @alias indent_start\n     */\n    indentStart?: number,\n\n    /**\n     * Currently noop.\n     * @alias inline_script\n     */\n    inlineScript?: number,\n\n    /**\n     * Currently noop.\n     * @alias keep_numbers\n     */\n    keepNumbers?: number,\n\n    /**\n     * Currently noop.\n     * @alias keep_quoted_props\n     */\n    keepQuotedProps?: boolean,\n\n    /**\n     * Currently noop.\n     * @alias max_line_len\n     */\n    maxLineLen?: number | false,\n\n    /**\n     * Currently noop.\n     */\n    preamble?: string,\n\n    /**\n     * Currently noop.\n     * @alias quote_keys\n     */\n    quoteKeys?: boolean,\n\n    /**\n     * Currently noop.\n     * @alias quote_style\n     */\n    quoteStyle?: boolean,\n\n    /**\n     * Currently noop.\n     * @alias preserve_annotations\n     */\n    preserveAnnotations?: boolean,\n\n    /**\n     * Currently noop.\n     */\n    safari10?: boolean,\n\n    /**\n     * Currently noop.\n     */\n    semicolons?: boolean,\n\n    /**\n     * Currently noop.\n     */\n    shebang?: boolean,\n\n    /**\n     * Currently noop.\n     */\n    webkit?: boolean,\n\n    /**\n     * Currently noop.\n     * @alias wrap_iife\n     */\n    wrapIife?: boolean,\n\n    /**\n     * Currently noop.\n     * @alias wrap_func_args\n     */\n    wrapFuncArgs?: boolean,\n  |};\n  declare export type TerserCompressOptions = {|\n    arguments?: boolean,\n    arrows?: boolean,\n    booleans?: boolean,\n    booleans_as_integers?: boolean,\n    collapse_vars?: boolean,\n    comparisons?: boolean,\n    computed_props?: boolean,\n    conditionals?: boolean,\n    dead_code?: boolean,\n    defaults?: boolean,\n    directives?: boolean,\n    drop_console?: boolean,\n    drop_debugger?: boolean,\n    ecma?: TerserEcmaVersion,\n    evaluate?: boolean,\n    expression?: boolean,\n    global_defs?: any,\n    hoist_funs?: boolean,\n    hoist_props?: boolean,\n    hoist_vars?: boolean,\n    ie8?: boolean,\n    if_return?: boolean,\n    inline?: 0 | 1 | 2 | 3,\n    join_vars?: boolean,\n    keep_classnames?: boolean,\n    keep_fargs?: boolean,\n    keep_fnames?: boolean,\n    keep_infinity?: boolean,\n    loops?: boolean,\n    negate_iife?: boolean,\n    passes?: number,\n    properties?: boolean,\n    pure_getters?: any,\n    pure_funcs?: string[],\n    reduce_funcs?: boolean,\n    reduce_vars?: boolean,\n    sequences?: any,\n    side_effects?: boolean,\n    switches?: boolean,\n    top_retain?: any,\n    toplevel?: any,\n    typeofs?: boolean,\n    unsafe?: boolean,\n    unsafe_passes?: boolean,\n    unsafe_arrows?: boolean,\n    unsafe_comps?: boolean,\n    unsafe_function?: boolean,\n    unsafe_math?: boolean,\n    unsafe_symbols?: boolean,\n    unsafe_methods?: boolean,\n    unsafe_proto?: boolean,\n    unsafe_regexp?: boolean,\n    unsafe_undefined?: boolean,\n    unused?: boolean,\n    const_to_let?: boolean,\n    module?: boolean,\n  |};\n  declare export type TerserMangleOptions = {|\n    props?: TerserManglePropertiesOptions,\n    toplevel?: boolean,\n    keep_classnames?: boolean,\n    keep_fnames?: boolean,\n    keep_private_props?: boolean,\n    ie8?: boolean,\n    safari10?: boolean,\n    reserved?: string[],\n  |};\n  declare export type TerserManglePropertiesOptions = {||};\n\n  /**\n   * Programmatic options.\n   */\n  declare export type Options = {|\n    ...$Exact<Config>,\n\n    /**\n     * If true, a file is parsed as a script instead of module.\n     */\n    script?: boolean,\n\n    /**\n     * The working directory that all paths in the programmatic\n     * options will be resolved relative to.\n     *\n     * Defaults to `process.cwd()`.\n     */\n    cwd?: string,\n    caller?: CallerOptions,\n\n    /**\n     * The filename associated with the code currently being compiled,\n     * if there is one. The filename is optional, but not all of Swc's\n     * functionality is available when the filename is unknown, because a\n     * subset of options rely on the filename for their functionality.\n     *\n     * The three primary cases users could run into are:\n     *\n     * - The filename is exposed to plugins. Some plugins may require the\n     * presence of the filename.\n     * - Options like \"test\", \"exclude\", and \"ignore\" require the filename\n     * for string/RegExp matching.\n     * - .swcrc files are loaded relative to the file being compiled.\n     * If this option is omitted, Swc will behave as if swcrc: false has been set.\n     */\n    filename?: string,\n\n    /**\n     * The initial path that will be processed based on the \"rootMode\" to\n     * determine the conceptual root folder for the current Swc project.\n     * This is used in two primary cases:\n     *\n     * - The base directory when checking for the default \"configFile\" value\n     * - The default value for \"swcrcRoots\".\n     *\n     * Defaults to `opts.cwd`\n     */\n    root?: string,\n\n    /**\n     * This option, combined with the \"root\" value, defines how Swc chooses\n     * its project root. The different modes define different ways that Swc\n     * can process the \"root\" value to get the final project root.\n     *\n     * \"root\" - Passes the \"root\" value through as unchanged.\n     * \"upward\" - Walks upward from the \"root\" directory, looking for a directory\n     * containing a swc.config.js file, and throws an error if a swc.config.js\n     * is not found.\n     * \"upward-optional\" - Walk upward from the \"root\" directory, looking for\n     * a directory containing a swc.config.js file, and falls back to \"root\"\n     *  if a swc.config.js is not found.\n     *\n     *\n     * \"root\" is the default mode because it avoids the risk that Swc\n     * will accidentally load a swc.config.js that is entirely outside\n     * of the current project folder. If you use \"upward-optional\",\n     * be aware that it will walk up the directory structure all the\n     * way to the filesystem root, and it is always possible that someone\n     * will have a forgotten swc.config.js in their home directory,\n     * which could cause unexpected errors in your builds.\n     *\n     *\n     * Users with monorepo project structures that run builds/tests on a\n     * per-package basis may well want to use \"upward\" since monorepos\n     * often have a swc.config.js in the project root. Running Swc\n     * in a monorepo subdirectory without \"upward\", will cause Swc\n     * to skip loading any swc.config.js files in the project root,\n     * which can lead to unexpected errors and compilation failure.\n     */\n    rootMode?: 'root' | 'upward' | 'upward-optional',\n\n    /**\n     * The current active environment used during configuration loading.\n     * This value is used as the key when resolving \"env\" configs,\n     * and is also available inside configuration functions, plugins,\n     * and presets, via the api.env() function.\n     *\n     * Defaults to `process.env.SWC_ENV || process.env.NODE_ENV || \"development\"`\n     */\n    envName?: string,\n\n    /**\n     * Defaults to searching for a default `.swcrc` file, but can\n     * be passed the path of any JS or JSON5 config file.\n     *\n     *\n     * NOTE: This option does not affect loading of .swcrc files,\n     * so while it may be tempting to do configFile: \"./foo/.swcrc\",\n     * it is not recommended. If the given .swcrc is loaded via the\n     * standard file-relative logic, you'll end up loading the same\n     * config file twice, merging it with itself. If you are linking\n     * a specific config file, it is recommended to stick with a\n     * naming scheme that is independent of the \"swcrc\" name.\n     *\n     * Defaults to `path.resolve(opts.root, \".swcrc\")`\n     */\n    configFile?: string | boolean,\n\n    /**\n     * true will enable searching for configuration files relative to the \"filename\" provided to Swc.\n     *\n     * A swcrc value passed in the programmatic options will override one set within a configuration file.\n     *\n     * Note: .swcrc files are only loaded if the current \"filename\" is inside of\n     *  a package that matches one of the \"swcrcRoots\" packages.\n     *\n     *\n     * Defaults to true as long as the filename option has been specified\n     */\n    swcrc?: boolean,\n\n    /**\n     * By default, Babel will only search for .babelrc files within the \"root\" package\n     *  because otherwise Babel cannot know if a given .babelrc is meant to be loaded,\n     *  or if it's \"plugins\" and \"presets\" have even been installed, since the file\n     *  being compiled could be inside node_modules, or have been symlinked into the project.\n     *\n     *\n     * This option allows users to provide a list of other packages that should be\n     * considered \"root\" packages when considering whether to load .babelrc files.\n     *\n     *\n     * For example, a monorepo setup that wishes to allow individual packages\n     * to have their own configs might want to do\n     *\n     *\n     *\n     * Defaults to `opts.root`\n     */\n    swcrcRoots?: boolean | MatchPattern | MatchPattern[],\n\n    /**\n     * `true` will attempt to load an input sourcemap from the file itself, if it\n     * contains a //# sourceMappingURL=... comment. If no map is found, or the\n     * map fails to load and parse, it will be silently discarded.\n     *\n     *  If an object is provided, it will be treated as the source map object itself.\n     *\n     * Defaults to `true`.\n     */\n    inputSourceMap?: boolean | string,\n\n    /**\n     * The name to use for the file inside the source map object.\n     *\n     * Defaults to `path.basename(opts.filenameRelative)` when available, or `\"unknown\"`.\n     */\n    sourceFileName?: string,\n\n    /**\n     * The sourceRoot fields to set in the generated source map, if one is desired.\n     */\n    sourceRoot?: string,\n    plugin?: Plugin,\n    isModule?: boolean | 'unknown',\n\n    /**\n     * Destination path. Note that this value is used only to fix source path\n     * of source map files and swc does not write output to this path.\n     */\n    outputPath?: string,\n  |};\n  declare type BundleInput = BundleOptions | BundleOptions[];\n  declare export function compileBundleOptions(\n    config: BundleInput | string | void,\n  ): Promise<BundleInput>;\n\n  /**\n   * Usage: In `spack.config.js` / `spack.config.ts`, you can utilize type annotations (to get autocompletions) like\n   *\n   * ```ts\n   * import { config } from '@swc/core/spack';\n   *\n   * export default config({\n   *      name: 'web',\n   * });\n   * ```\n   */\n  declare export function config(c: BundleInput): BundleInput;\n  declare export type BundleOptions = {|\n    ...$Exact<SpackConfig>,\n\n    workingDir?: string,\n  |};\n\n  /**\n   * `spack.config,js`\n   */\n  declare export type SpackConfig = {|\n    /**\n     * @default process.env.NODE_ENV\n     */\n    mode?: Mode,\n    target?: Target,\n    entry: EntryConfig,\n    output: OutputConfig,\n    module: ModuleConfig,\n    options?: Options,\n\n    /**\n     * Modules to exclude from bundle.\n     */\n    externalModules?: string[],\n  |};\n  declare export type OutputConfig = {|\n    name: string,\n    path: string,\n  |};\n  declare export type Mode = 'production' | 'development' | 'none';\n  declare export type Target = 'browser' | 'node';\n  declare export type EntryConfig =\n    | string\n    | string[]\n    | {\n        [name: string]: string,\n      };\n\n  declare export type CallerOptions = {|\n    name: string,\n    [key: string]: any,\n  |};\n  declare export type Swcrc = Config | Config[];\n  /**\n   * .swcrc\n   */\n  declare export type Config = {|\n    /**\n     * Note: The type is string because it follows rust's regex syntax.\n     */\n    test?: string | string[],\n\n    /**\n     * Note: The type is string because it follows rust's regex syntax.\n     */\n    exclude?: string | string[],\n    env?: EnvConfig,\n    jsc?: JscConfig,\n    module?: ModuleConfig,\n    minify?: boolean,\n\n    /**\n     * - true to generate a sourcemap for the code and include it in the result object.\n     * - \"inline\" to generate a sourcemap and append it as a data URL to the end of the code, but not include it in the result object.\n     *\n     * `swc-cli` overloads some of these to also affect how maps are written to disk:\n     *\n     * - true will write the map to a .map file on disk\n     * - \"inline\" will write the file directly, so it will have a data: containing the map\n     * - Note: These options are bit weird, so it may make the most sense to just use true\n     *  and handle the rest in your own code, depending on your use case.\n     */\n    sourceMaps?: boolean | 'inline',\n    inlineSourcesContent?: boolean,\n  |};\n\n  /**\n   * Configuration ported from babel-preset-env\n   */\n  declare export type EnvConfig = {|\n    mode?: 'usage' | 'entry',\n    debug?: boolean,\n    dynamicImport?: boolean,\n    loose?: boolean,\n    skip?: string[],\n    include?: string[],\n    exclude?: string[],\n\n    /**\n     * The version of the used core js.\n     */\n    coreJs?: string,\n    targets?: any,\n    path?: string,\n    shippedProposals?: boolean,\n\n    /**\n     * Enable all transforms\n     */\n    forceAllTransforms?: boolean,\n  |};\n  declare export type JscConfig = {|\n    loose?: boolean,\n\n    /**\n     * Defaults to EsParserConfig\n     */\n    parser?: ParserConfig,\n    transform?: TransformConfig,\n\n    /**\n     * Use `@swc/helpers` instead of inline helpers.\n     */\n    externalHelpers?: boolean,\n\n    /**\n     * Defaults to `es3` (which enabled **all** pass).\n     */\n    target?: JscTarget,\n\n    /**\n     * Keep class names.\n     */\n    keepClassNames?: boolean,\n    experimental?: {|\n      optimizeHygiene?: boolean,\n      keepImportAssertions?: boolean,\n\n      /**\n       * Specify the location where SWC stores its intermediate cache files.\n       * Currently only transform plugin uses this. If not specified, SWC will\n       * create `.swc` directories.\n       */\n      cacheRoot?: string,\n\n      /**\n       * List of custom transform plugins written in WebAssembly.\n       * First parameter of tuple indicates the name of the plugin - it can be either\n       * a name of the npm package can be resolved, or absolute path to .wasm binary.\n       *\n       * Second parameter of tuple is JSON based configuration for the plugin.\n       */\n      plugins?: Array<[string, {[key: string]: any}]>,\n    |},\n    baseUrl?: string,\n    paths?: {\n      [from: string]: string[],\n    },\n    minify?: JsMinifyOptions,\n    preserveAllComments?: boolean,\n  |};\n  declare export type JscTarget =\n    | 'es3'\n    | 'es5'\n    | 'es2015'\n    | 'es2016'\n    | 'es2017'\n    | 'es2018'\n    | 'es2019'\n    | 'es2020'\n    | 'es2021'\n    | 'es2022'\n    | 'esnext';\n  declare export type ParserConfig = TsParserConfig | EsParserConfig;\n  declare export type TsParserConfig = {|\n    syntax: 'typescript',\n\n    /**\n     * Defaults to `false`.\n     */\n    tsx?: boolean,\n\n    /**\n     * Defaults to `false`.\n     */\n    decorators?: boolean,\n\n    /**\n     * Defaults to `false`\n     */\n    dynamicImport?: boolean,\n  |};\n  declare export type EsParserConfig = {|\n    syntax: 'ecmascript',\n\n    /**\n     * Defaults to false.\n     */\n    jsx?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    numericSeparator?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    classPrivateProperty?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    privateMethod?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    classProperty?: boolean,\n\n    /**\n     * Defaults to `false`\n     */\n    functionBind?: boolean,\n\n    /**\n     * Defaults to `false`\n     */\n    decorators?: boolean,\n\n    /**\n     * Defaults to `false`\n     */\n    decoratorsBeforeExport?: boolean,\n\n    /**\n     * Defaults to `false`\n     */\n    exportDefaultFrom?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    exportNamespaceFrom?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    dynamicImport?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    nullishCoalescing?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    optionalChaining?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    importMeta?: boolean,\n\n    /**\n     * @deprecated Always true because it's in ecmascript spec.\n     */\n    topLevelAwait?: boolean,\n\n    /**\n     * Defaults to `false`\n     */\n    importAssertions?: boolean,\n  |};\n\n  /**\n   * Options for transform.\n   */\n  declare export type TransformConfig = {|\n    /**\n     * Effective only if `syntax` supports ƒ.\n     */\n    react?: ReactConfig,\n    constModules?: ConstModulesConfig,\n\n    /**\n     * Defaults to null, which skips optimizer pass.\n     */\n    optimizer?: OptimizerConfig,\n\n    /**\n     * https://swc.rs/docs/configuring-swc.html#jsctransformlegacydecorator\n     */\n    legacyDecorator?: boolean,\n\n    /**\n     * https://swc.rs/docs/configuring-swc.html#jsctransformdecoratormetadata\n     */\n    decoratorMetadata?: boolean,\n    treatConstEnumAsEnum?: boolean,\n    useDefineForClassFields?: boolean,\n  |};\n  declare export type ReactConfig = {|\n    /**\n     * Replace the function used when compiling JSX expressions.\n     *\n     * Defaults to `React.createElement`.\n     */\n    pragma?: string,\n\n    /**\n     * Replace the component used when compiling JSX fragments.\n     *\n     * Defaults to `React.Fragment`\n     */\n    pragmaFrag?: string,\n\n    /**\n     * Toggles whether or not to throw an error if a XML namespaced tag name is used. For example:\n     * `<f:image />`\n     *\n     * Though the JSX spec allows this, it is disabled by default since React's\n     * JSX does not currently have support for it.\n     */\n    throwIfNamespace?: boolean,\n\n    /**\n     * Toggles plugins that aid in development, such as @swc/plugin-transform-react-jsx-self\n     * and @swc/plugin-transform-react-jsx-source.\n     *\n     * Defaults to `false`,\n     */\n    development?: boolean,\n\n    /**\n     * Use `Object.assign()` instead of `_extends`. Defaults to false.\n     */\n    useBuiltins?: boolean,\n\n    /**\n     * Enable fast refresh feature for React app\n     */\n    refresh?: boolean,\n\n    /**\n     * jsx runtime\n     */\n    runtime?: 'automatic' | 'classic',\n\n    /**\n     * Declares the module specifier to be used for importing the `jsx` and `jsxs` factory functions when using `runtime` 'automatic'\n     */\n    importSource?: string,\n  |};\n\n  /**\n   * - `import { DEBUG } from '@ember/env-flags';`\n   * - `import { FEATURE_A, FEATURE_B } from '@ember/features';`\n   *\n   * See: https://github.com/swc-project/swc/issues/18#issuecomment-466272558\n   */\n  declare export type ConstModulesConfig = {|\n    globals?: {\n      [module: string]: {\n        [name: string]: string,\n      },\n    },\n  |};\n  declare export type OptimizerConfig = {|\n    simplify?: boolean,\n    globals?: GlobalPassOption,\n    jsonify?: {|\n      minCost: number,\n    |},\n  |};\n\n  /**\n   * Options for inline-global pass.\n   */\n  declare export type GlobalPassOption = {|\n    /**\n     * Global variables that should be inlined with passed value.\n     *\n     * e.g. `{ __DEBUG__: true }`\n     */\n    vars?: {[key: string]: string},\n\n    /**\n     * Names of environment variables that should be inlined with the value of corresponding env during build.\n     *\n     * Defaults to `[\"NODE_ENV\", \"SWC_ENV\"]`\n     */\n    envs?: string[],\n\n    /**\n     * Replaces typeof calls for passed variables with corresponding value\n     *\n     * e.g. `{ window: 'object' }`\n     */\n    typeofs?: {[key: string]: string},\n  |};\n  declare export type ModuleConfig =\n    | Es6Config\n    | CommonJsConfig\n    | UmdConfig\n    | AmdConfig\n    | NodeNextConfig\n    | SystemjsConfig;\n  declare export type BaseModuleConfig = {|\n    /**\n     * By default, when using exports with babel a non-enumerable `__esModule`\n     * property is exported. In some cases this property is used to determine\n     * if the import is the default export or if it contains the default export.\n     *\n     * In order to prevent the __esModule property from being exported, you\n     *  can set the strict option to true.\n     *\n     * Defaults to `false`.\n     */\n    strict?: boolean,\n\n    /**\n     * Emits 'use strict' directive.\n     *\n     * Defaults to `true`.\n     */\n    strictMode?: boolean,\n\n    /**\n     * Changes Babel's compiled import statements to be lazily evaluated when their imported bindings are used for the first time.\n     *\n     * This can improve initial load time of your module because evaluating dependencies up\n     *  front is sometimes entirely un-necessary. This is especially the case when implementing\n     *  a library module.\n     *\n     *\n     * The value of `lazy` has a few possible effects:\n     *\n     *  - `false` - No lazy initialization of any imported module.\n     *  - `true` - Do not lazy-initialize local `./foo` imports, but lazy-init `foo` dependencies.\n     *\n     * Local paths are much more likely to have circular dependencies, which may break if loaded lazily,\n     * so they are not lazy by default, whereas dependencies between independent modules are rarely cyclical.\n     *\n     *  - `Array<string>` - Lazy-initialize all imports with source matching one of the given strings.\n     *\n     * -----\n     *\n     * The two cases where imports can never be lazy are:\n     *\n     *  - `import \"foo\";`\n     *\n     * Side-effect imports are automatically non-lazy since their very existence means\n     *  that there is no binding to later kick off initialization.\n     *\n     *  - `export * from \"foo\"`\n     *\n     * Re-exporting all names requires up-front execution because otherwise there is no\n     * way to know what names need to be exported.\n     *\n     * Defaults to `false`.\n     */\n    lazy?: boolean | string[],\n\n    /**\n     * @deprecated Use the `importInterop` option instead.\n     *\n     * By default, when using exports with swc a non-enumerable __esModule property is exported.\n     * This property is then used to determine if the import is the default export or if\n     * it contains the default export.\n     *\n     * In cases where the auto-unwrapping of default is not needed, you can set the noInterop option\n     * to true to avoid the usage of the interopRequireDefault helper (shown in inline form above).\n     *\n     * Defaults to `false`.\n     */\n    noInterop?: boolean,\n\n    /**\n     * Defaults to `swc`.\n     *\n     * CommonJS modules and ECMAScript modules are not fully compatible.\n     * However, compilers, bundlers and JavaScript runtimes developed different strategies\n     * to make them work together as well as possible.\n     *\n     * - `swc` (alias: `babel`)\n     *\n     * When using exports with `swc` a non-enumerable `__esModule` property is exported\n     * This property is then used to determine if the import is the default export\n     * or if it contains the default export.\n     *\n     * ```javascript\n     * import foo from \"foo\";\n     * import { bar } from \"bar\";\n     * foo;\n     * bar;\n     *\n     * // Is compiled to ...\n     *\n     * \"use strict\";\n     *\n     * function _interopRequireDefault(obj) {\n     *   return obj && obj.__esModule ? obj : { default: obj };\n     * }\n     *\n     * var _foo = _interopRequireDefault(require(\"foo\"));\n     * var _bar = require(\"bar\");\n     *\n     * _foo.default;\n     * _bar.bar;\n     * ```\n     *\n     * When this import interop is used, if both the imported and the importer module are compiled\n     * with swc they behave as if none of them was compiled.\n     *\n     * This is the default behavior.\n     *\n     * - `node`\n     *\n     * When importing CommonJS files (either directly written in CommonJS, or generated with a compiler)\n     * Node.js always binds the `default` export to the value of `module.exports`.\n     *\n     * ```javascript\n     * import foo from \"foo\";\n     * import { bar } from \"bar\";\n     * foo;\n     * bar;\n     *\n     * // Is compiled to ...\n     *\n     * \"use strict\";\n     *\n     * var _foo = require(\"foo\");\n     * var _bar = require(\"bar\");\n     *\n     * _foo;\n     * _bar.bar;\n     * ```\n     * This is not exactly the same as what Node.js does since swc allows accessing any property of `module.exports`\n     * as a named export, while Node.js only allows importing statically analyzable properties of `module.exports`.\n     * However, any import working in Node.js will also work when compiled with swc using `importInterop: \"node\"`.\n     *\n     * - `none`\n     *\n     * If you know that the imported file has been transformed with a compiler that stores the `default` export on\n     * `exports.default` (such as swc or Babel), you can safely omit the `_interopRequireDefault` helper.\n     *\n     * ```javascript\n     * import foo from \"foo\";\n     * import { bar } from \"bar\";\n     * foo;\n     * bar;\n     *\n     * // Is compiled to ...\n     *\n     * \"use strict\";\n     *\n     * var _foo = require(\"foo\");\n     * var _bar = require(\"bar\");\n     *\n     * _foo.default;\n     * _bar.bar;\n     * ```\n     */\n    importInterop?: 'swc' | 'babel' | 'node' | 'none',\n\n    /**\n     * If set to true, dynamic imports will be preserved.\n     */\n    ignoreDynamic?: boolean,\n    allowTopLevelThis?: boolean,\n    preserveImportMeta?: boolean,\n  |};\n  declare export type Es6Config = {|\n    ...$Exact<BaseModuleConfig>,\n\n    type: 'es6',\n  |};\n  declare export type NodeNextConfig = {|\n    ...$Exact<BaseModuleConfig>,\n\n    type: 'nodenext',\n  |};\n  declare export type CommonJsConfig = {|\n    ...$Exact<BaseModuleConfig>,\n\n    type: 'commonjs',\n  |};\n  declare export type UmdConfig = {|\n    ...$Exact<BaseModuleConfig>,\n\n    type: 'umd',\n    globals?: {\n      [key: string]: string,\n    },\n  |};\n  declare export type AmdConfig = {|\n    ...$Exact<BaseModuleConfig>,\n\n    type: 'amd',\n    moduleId?: string,\n  |};\n  declare export type SystemjsConfig = {|\n    type: 'systemjs',\n    allowTopLevelThis?: boolean,\n  |};\n  declare export type Output = {|\n    /**\n     * Transformed code\n     */\n    code: string,\n\n    /**\n     * Sourcemap (**not** base64 encoded)\n     */\n    map?: string,\n  |};\n  declare export type MatchPattern = {||};\n\n  /**\n   * Version of the swc binding.\n   */\n  declare export var version: string;\n  declare export function plugins(ps: Plugin[]): Plugin;\n  declare export class Compiler {\n    minify(src: string, opts?: JsMinifyOptions): Promise<Output>;\n    minifySync(src: string, opts?: JsMinifyOptions): Output;\n    parse(\n      src: string,\n      options: {|\n        ...ParseOptions,\n        ...{|\n          isModule: false,\n        |},\n      |},\n    ): Promise<Script>;\n    parse(\n      src: string,\n      options?: ParseOptions,\n      filename?: string,\n    ): Promise<Module>;\n    parseSync(\n      src: string,\n      options: {|\n        ...ParseOptions,\n        ...{|\n          isModule: false,\n        |},\n      |},\n    ): Script;\n    parseSync(src: string, options?: ParseOptions, filename?: string): Module;\n    parseFile(\n      path: string,\n      options: {|\n        ...ParseOptions,\n        ...{|\n          isModule: false,\n        |},\n      |},\n    ): Promise<Script>;\n    parseFile(path: string, options?: ParseOptions): Promise<Module>;\n    parseFileSync(\n      path: string,\n      options: {|\n        ...ParseOptions,\n        ...{|\n          isModule: false,\n        |},\n      |},\n    ): Script;\n    parseFileSync(path: string, options?: ParseOptions): Module;\n\n    /**\n     * Note: this method should be invoked on the compiler instance used\n     *  for `parse()` / `parseSync()`.\n     */\n    print(m: Program, options?: Options): Promise<Output>;\n\n    /**\n     * Note: this method should be invoked on the compiler instance used\n     *  for `parse()` / `parseSync()`.\n     */\n    printSync(m: Program, options?: Options): Output;\n    transform(src: string | Program, options?: Options): Promise<Output>;\n    transformSync(src: string | Program, options?: Options): Output;\n    transformFile(path: string, options?: Options): Promise<Output>;\n    transformFileSync(path: string, options?: Options): Output;\n    bundle(options?: BundleInput | string): Promise<{\n      [name: string]: Output,\n    }>;\n  }\n  declare export function parse(\n    src: string,\n    options: {|\n      ...ParseOptions,\n      ...{|\n        isModule: false,\n      |},\n    |},\n  ): Promise<Script>;\n  declare export function parse(\n    src: string,\n    options?: ParseOptions,\n  ): Promise<Module>;\n  declare export function parseSync(\n    src: string,\n    options: {|\n      ...ParseOptions,\n      ...{|\n        isModule: false,\n      |},\n    |},\n  ): Script;\n  declare export function parseSync(\n    src: string,\n    options?: ParseOptions,\n  ): Module;\n  declare export function parseFile(\n    path: string,\n    options: {|\n      ...ParseOptions,\n      ...{|\n        isModule: false,\n      |},\n    |},\n  ): Promise<Script>;\n  declare export function parseFile(\n    path: string,\n    options?: ParseOptions,\n  ): Promise<Module>;\n  declare export function parseFileSync(\n    path: string,\n    options: {|\n      ...ParseOptions,\n      ...{|\n        isModule: false,\n      |},\n    |},\n  ): Script;\n  declare export function parseFileSync(\n    path: string,\n    options?: ParseOptions,\n  ): Module;\n  declare export function print(m: Program, options?: Options): Promise<Output>;\n  declare export function printSync(m: Program, options?: Options): Output;\n  declare export function transform(\n    src: string | Program,\n    options?: Options,\n  ): Promise<Output>;\n  declare export function transformSync(\n    src: string | Program,\n    options?: Options,\n  ): Output;\n  declare export function transformFile(\n    path: string,\n    options?: Options,\n  ): Promise<Output>;\n  declare export function transformFileSync(\n    path: string,\n    options?: Options,\n  ): Output;\n  declare export function bundle(options?: BundleInput | string): Promise<{\n    [name: string]: Output,\n  }>;\n  declare export function minify(\n    src: string,\n    opts?: JsMinifyOptions,\n  ): Promise<Output>;\n  declare export function minifySync(\n    src: string,\n    opts?: JsMinifyOptions,\n  ): Output;\n\n  /**\n   * Configure custom trace configuration runs for a process lifecycle.\n   * Currently only chromium's trace event format is supported.\n   * (https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview)\n   *\n   * This should be called before calling any binding interfaces exported in `@swc/core`, such as\n   * `transform*`, or `parse*` or anything. To avoid breaking changes, each binding fn internally\n   * sets default trace subscriber if not set.\n   *\n   * Unlike other configuration, this does not belong to individual api surface using swcrc\n   * or api's parameters (`transform(..., {trace})`). This is due to current tracing subscriber\n   * can be configured only once for the global scope. Calling `registerGlobalTraceConfig` multiple\n   * time won't cause error, subsequent calls will be ignored.\n   *\n   * As name implies currently this is experimental interface may change over time without semver\n   * major breaking changes. Please provide feedbacks,\n   * or bug report at https://github.com/swc-project/swc/discussions.\n   */\n  declare export function __experimental_registerGlobalTraceConfig(traceConfig: {|\n    type: 'traceEvent',\n    fileName?: string,\n  |}): void;\n\n  /**\n   * @ignore Returns current binary's metadata to determine which binary is actually loaded.\n   *\n   * This is undocumented interface, does not guarantee stability across `@swc/core`'s semver\n   * as internal representation may change anytime. Use it with caution.\n   */\n  declare export function getBinaryMetadata(): {|\n    target: string | void,\n  |};\n  declare export var DEFAULT_EXTENSIONS: $ReadOnlyArray<string>;\n\n  // AST related\n  declare export type Span = {|\n    start: number,\n    end: number,\n    ctxt: number,\n  |};\n  declare export type Node = {|\n    type: string,\n  |};\n  declare export type HasSpan = {|\n    span: Span,\n  |};\n  declare export type HasDecorator = {|\n    decorators?: Decorator[],\n  |};\n  declare export type Klass = {|\n    ...$Exact<HasSpan>,\n    ...$Exact<HasDecorator>,\n\n    body: ClassMember[],\n    superClass?: Expression,\n    isAbstract: boolean,\n    typeParams?: TsTypeParameterDeclaration,\n    superTypeParams?: TsTypeParameterInstantiation,\n    implements: TsExpressionWithTypeArguments[],\n  |};\n  declare export type ClassMember =\n    | Constructor\n    | ClassMethod\n    | PrivateMethod\n    | ClassProperty\n    | PrivateProperty\n    | TsIndexSignature\n    | EmptyStatement\n    | StaticBlock;\n  declare export type ClassPropertyBase = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n    ...$Exact<HasDecorator>,\n\n    value?: Expression,\n    typeAnnotation?: TsTypeAnnotation,\n    isStatic: boolean,\n    accessibility?: Accessibility,\n    isOptional: boolean,\n    isOverride: boolean,\n    readonly: boolean,\n    definite: boolean,\n  |};\n  declare export type ClassProperty = {|\n    ...$Exact<ClassPropertyBase>,\n\n    type: 'ClassProperty',\n    key: PropertyName,\n    isAbstract: boolean,\n    declare: boolean,\n  |};\n  declare export type PrivateProperty = {|\n    ...$Exact<ClassPropertyBase>,\n\n    type: 'PrivateProperty',\n    key: PrivateName,\n  |};\n  declare export type Param = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n    ...$Exact<HasDecorator>,\n\n    type: 'Parameter',\n    pat: Pattern,\n  |};\n  declare export type Constructor = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'Constructor',\n    key: PropertyName,\n    params: (TsParameterProperty | Param)[],\n    body?: BlockStatement,\n    accessibility?: Accessibility,\n    isOptional: boolean,\n  |};\n  declare export type ClassMethodBase = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    function: Fn,\n    kind: MethodKind,\n    isStatic: boolean,\n    accessibility?: Accessibility,\n    isAbstract: boolean,\n    isOptional: boolean,\n    isOverride: boolean,\n  |};\n  declare export type ClassMethod = {|\n    ...$Exact<ClassMethodBase>,\n\n    type: 'ClassMethod',\n    key: PropertyName,\n  |};\n  declare export type PrivateMethod = {|\n    ...$Exact<ClassMethodBase>,\n\n    type: 'PrivateMethod',\n    key: PrivateName,\n  |};\n  declare export type StaticBlock = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'StaticBlock',\n    body: BlockStatement,\n  |};\n  declare export type Decorator = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'Decorator',\n    expression: Expression,\n  |};\n  declare export type MethodKind = 'method' | 'getter' | 'setter';\n  declare export type Declaration =\n    | ClassDeclaration\n    | FunctionDeclaration\n    | VariableDeclaration\n    | TsInterfaceDeclaration\n    | TsTypeAliasDeclaration\n    | TsEnumDeclaration\n    | TsModuleDeclaration;\n  declare export type FunctionDeclaration = {|\n    ...$Exact<Fn>,\n\n    type: 'FunctionDeclaration',\n    identifier: Identifier,\n    declare: boolean,\n  |};\n  declare export type ClassDeclaration = {|\n    ...$Exact<Klass>,\n    ...$Exact<Node>,\n\n    type: 'ClassDeclaration',\n    identifier: Identifier,\n    declare: boolean,\n  |};\n  declare export type VariableDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'VariableDeclaration',\n    kind: VariableDeclarationKind,\n    declare: boolean,\n    declarations: VariableDeclarator[],\n  |};\n  declare export type VariableDeclarationKind = 'var' | 'let' | 'const';\n  declare export type VariableDeclarator = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'VariableDeclarator',\n    id: Pattern,\n    init?: Expression,\n    definite: boolean,\n  |};\n  declare export type Expression =\n    | ThisExpression\n    | ArrayExpression\n    | ObjectExpression\n    | FunctionExpression\n    | UnaryExpression\n    | UpdateExpression\n    | BinaryExpression\n    | AssignmentExpression\n    | MemberExpression\n    | SuperPropExpression\n    | ConditionalExpression\n    | CallExpression\n    | NewExpression\n    | SequenceExpression\n    | Identifier\n    | Literal\n    | TemplateLiteral\n    | TaggedTemplateExpression\n    | ArrowFunctionExpression\n    | ClassExpression\n    | YieldExpression\n    | MetaProperty\n    | AwaitExpression\n    | ParenthesisExpression\n    | JSXMemberExpression\n    | JSXNamespacedName\n    | JSXEmptyExpression\n    | JSXElement\n    | JSXFragment\n    | TsTypeAssertion\n    | TsConstAssertion\n    | TsNonNullExpression\n    | TsAsExpression\n    | TsInstantiation\n    | PrivateName\n    | OptionalChainingExpression\n    | Invalid;\n  declare type ExpressionBase = {|...$Exact<Node>, ...$Exact<HasSpan>|};\n  declare export type Identifier = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'Identifier',\n    value: string,\n    optional: boolean,\n  |};\n  declare export type OptionalChainingExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'OptionalChainingExpression',\n    questionDotToken: Span,\n\n    /**\n     * Call expression or member expression.\n     */\n    base: MemberExpression | OptionalChainingCall,\n  |};\n  declare export type OptionalChainingCall = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'CallExpression',\n    callee: Expression,\n    arguments: ExprOrSpread[],\n    typeArguments?: TsTypeParameterInstantiation,\n  |};\n  declare export type ThisExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'ThisExpression',\n  |};\n  declare export type ArrayExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'ArrayExpression',\n    elements: (ExprOrSpread | void)[],\n  |};\n  declare export type ExprOrSpread = {|\n    spread?: Span,\n    expression: Expression,\n  |};\n  declare export type ObjectExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'ObjectExpression',\n    properties: (SpreadElement | Property)[],\n  |};\n  declare export type Argument = {|\n    spread?: Span,\n    expression: Expression,\n  |};\n  declare export type SpreadElement = {|\n    ...$Exact<Node>,\n\n    type: 'SpreadElement',\n    spread: Span,\n    arguments: Expression,\n  |};\n  declare export type UnaryExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'UnaryExpression',\n    operator: UnaryOperator,\n    argument: Expression,\n  |};\n  declare export type UpdateExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'UpdateExpression',\n    operator: UpdateOperator,\n    prefix: boolean,\n    argument: Expression,\n  |};\n  declare export type BinaryExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'BinaryExpression',\n    operator: BinaryOperator,\n    left: Expression,\n    right: Expression,\n  |};\n  declare export type FunctionExpression = {|\n    ...$Exact<Fn>,\n    ...$Exact<ExpressionBase>,\n\n    type: 'FunctionExpression',\n    identifier?: Identifier,\n  |};\n  declare export type ClassExpression = {|\n    ...$Exact<Klass>,\n    ...$Exact<ExpressionBase>,\n\n    type: 'ClassExpression',\n    identifier?: Identifier,\n  |};\n  declare export type AssignmentExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'AssignmentExpression',\n    operator: AssignmentOperator,\n    left: Expression | Pattern,\n    right: Expression,\n  |};\n  declare export type MemberExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'MemberExpression',\n    object: Expression,\n    property: Identifier | PrivateName | ComputedPropName,\n  |};\n  declare export type SuperPropExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'SuperPropExpression',\n    obj: Super,\n    property: Identifier | ComputedPropName,\n  |};\n  declare export type ConditionalExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'ConditionalExpression',\n    test: Expression,\n    consequent: Expression,\n    alternate: Expression,\n  |};\n  declare export type Super = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'Super',\n  |};\n  declare export type Import = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'Import',\n  |};\n  declare export type CallExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'CallExpression',\n    callee: Super | Import | Expression,\n    arguments: Argument[],\n    typeArguments?: TsTypeParameterInstantiation,\n  |};\n  declare export type NewExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'NewExpression',\n    callee: Expression,\n    arguments?: Argument[],\n    typeArguments?: TsTypeParameterInstantiation,\n  |};\n  declare export type SequenceExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'SequenceExpression',\n    expressions: Expression[],\n  |};\n  declare export type ArrowFunctionExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'ArrowFunctionExpression',\n    params: Pattern[],\n    body: BlockStatement | Expression,\n    async: boolean,\n    generator: boolean,\n    typeParameters?: TsTypeParameterDeclaration,\n    returnType?: TsTypeAnnotation,\n  |};\n  declare export type YieldExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'YieldExpression',\n    argument?: Expression,\n    delegate: boolean,\n  |};\n  declare export type MetaProperty = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'MetaProperty',\n    kind: 'new.target' | 'import.meta',\n  |};\n  declare export type AwaitExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'AwaitExpression',\n    argument: Expression,\n  |};\n  declare export type TemplateLiteral = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'TemplateLiteral',\n    expressions: Expression[],\n    quasis: TemplateElement[],\n  |};\n  declare export type TaggedTemplateExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'TaggedTemplateExpression',\n    tag: Expression,\n    typeParameters?: TsTypeParameterInstantiation,\n    template: TemplateLiteral,\n  |};\n  declare export type TemplateElement = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'TemplateElement',\n    tail: boolean,\n    cooked?: string,\n    raw: string,\n  |};\n  declare export type ParenthesisExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'ParenthesisExpression',\n    expression: Expression,\n  |};\n  declare export type Fn = {|\n    ...$Exact<HasSpan>,\n    ...$Exact<HasDecorator>,\n\n    params: Param[],\n    body?: BlockStatement,\n    generator: boolean,\n    async: boolean,\n    typeParameters?: TsTypeParameterDeclaration,\n    returnType?: TsTypeAnnotation,\n  |};\n  declare type PatternBase = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    typeAnnotation?: TsTypeAnnotation,\n  |};\n  declare export type PrivateName = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'PrivateName',\n    id: Identifier,\n  |};\n  declare export type JSXObject = JSXMemberExpression | Identifier;\n  declare export type JSXMemberExpression = {|\n    ...$Exact<Node>,\n\n    type: 'JSXMemberExpression',\n    object: JSXObject,\n    property: Identifier,\n  |};\n\n  /**\n   * XML-based namespace syntax:\n   */\n  declare export type JSXNamespacedName = {|\n    ...$Exact<Node>,\n\n    type: 'JSXNamespacedName',\n    namespace: Identifier,\n    name: Identifier,\n  |};\n  declare export type JSXEmptyExpression = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXEmptyExpression',\n  |};\n  declare export type JSXExpressionContainer = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXExpressionContainer',\n    expression: JSXExpression,\n  |};\n  declare export type JSXExpression = JSXEmptyExpression | Expression;\n  declare export type JSXSpreadChild = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXSpreadChild',\n    expression: Expression,\n  |};\n  declare export type JSXElementName =\n    | Identifier\n    | JSXMemberExpression\n    | JSXNamespacedName;\n  declare export type JSXOpeningElement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXOpeningElement',\n    name: JSXElementName,\n    attributes: JSXAttributeOrSpread[],\n    selfClosing: boolean,\n    typeArguments?: TsTypeParameterInstantiation,\n  |};\n  declare export type JSXAttributeOrSpread = JSXAttribute | SpreadElement;\n  declare export type JSXClosingElement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXClosingElement',\n    name: JSXElementName,\n  |};\n  declare export type JSXAttribute = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXAttribute',\n    name: JSXAttributeName,\n    value?: JSXAttrValue,\n  |};\n  declare export type JSXAttributeName = Identifier | JSXNamespacedName;\n  declare export type JSXAttrValue =\n    | Literal\n    | JSXExpressionContainer\n    | JSXElement\n    | JSXFragment;\n  declare export type JSXText = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXText',\n    value: string,\n    raw: string,\n  |};\n  declare export type JSXElement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXElement',\n    opening: JSXOpeningElement,\n    children: JSXElementChild[],\n    closing?: JSXClosingElement,\n  |};\n  declare export type JSXElementChild =\n    | JSXText\n    | JSXExpressionContainer\n    | JSXSpreadChild\n    | JSXElement\n    | JSXFragment;\n  declare export type JSXFragment = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXFragment',\n    opening: JSXOpeningFragment,\n    children: JSXElementChild[],\n    closing: JSXClosingFragment,\n  |};\n  declare export type JSXOpeningFragment = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXOpeningFragment',\n  |};\n  declare export type JSXClosingFragment = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'JSXClosingFragment',\n  |};\n  declare export type Literal =\n    | StringLiteral\n    | BooleanLiteral\n    | NullLiteral\n    | NumericLiteral\n    | BigIntLiteral\n    | RegExpLiteral\n    | JSXText;\n  declare export type StringLiteral = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'StringLiteral',\n    value: string,\n    raw?: string,\n  |};\n  declare export type BooleanLiteral = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'BooleanLiteral',\n    value: boolean,\n  |};\n  declare export type NullLiteral = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'NullLiteral',\n  |};\n  declare export type RegExpLiteral = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'RegExpLiteral',\n    pattern: string,\n    flags: string,\n  |};\n  declare export type NumericLiteral = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'NumericLiteral',\n    value: number,\n    raw?: string,\n  |};\n\n  // $FlowFixMe borrowed this from packages/core/utils/src/BitSet.js\n  declare type TmpBigInt = bigint;\n\n  declare export type BigIntLiteral = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'BigIntLiteral',\n    value: TmpBigInt,\n    raw?: string,\n  |};\n  declare export type ModuleDeclaration =\n    | ImportDeclaration\n    | ExportDeclaration\n    | ExportNamedDeclaration\n    | ExportDefaultDeclaration\n    | ExportDefaultExpression\n    | ExportAllDeclaration\n    | TsImportEqualsDeclaration\n    | TsExportAssignment\n    | TsNamespaceExportDeclaration;\n  declare export type ExportDefaultExpression = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ExportDefaultExpression',\n    expression: Expression,\n  |};\n  declare export type ExportDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ExportDeclaration',\n    declaration: Declaration,\n  |};\n  declare export type ImportDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ImportDeclaration',\n    specifiers: ImportSpecifier[],\n    source: StringLiteral,\n    typeOnly: boolean,\n    asserts?: ObjectExpression,\n  |};\n  declare export type ExportAllDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ExportAllDeclaration',\n    source: StringLiteral,\n    asserts?: ObjectExpression,\n  |};\n\n  /**\n   * - `export { foo } from 'mod'`\n   * - `export { foo as bar } from 'mod'`\n   */\n  declare export type ExportNamedDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ExportNamedDeclaration',\n    specifiers: ExportSpecifier[],\n    source?: StringLiteral,\n    typeOnly: boolean,\n    asserts?: ObjectExpression,\n  |};\n  declare export type ExportDefaultDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ExportDefaultDeclaration',\n    decl: DefaultDecl,\n  |};\n  declare export type DefaultDecl =\n    | ClassExpression\n    | FunctionExpression\n    | TsInterfaceDeclaration;\n  declare export type ImportSpecifier =\n    | NamedImportSpecifier\n    | ImportDefaultSpecifier\n    | ImportNamespaceSpecifier;\n  /**\n   * e.g. `import foo from 'mod.js'`\n   */\n  declare export type ImportDefaultSpecifier = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ImportDefaultSpecifier',\n    local: Identifier,\n  |};\n\n  /**\n   * e.g. `import * as foo from 'mod.js'`.\n   */\n  declare export type ImportNamespaceSpecifier = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ImportNamespaceSpecifier',\n    local: Identifier,\n  |};\n\n  /**\n   * e.g. - `import { foo } from 'mod.js'`\n   *\n   * local = foo, imported = None\n   *\n   * e.g. `import { foo as bar } from 'mod.js'`\n   *\n   * local = bar, imported = Some(foo) for\n   */\n  declare export type NamedImportSpecifier = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ImportSpecifier',\n    local: Identifier,\n    imported?: ModuleExportName,\n    isTypeOnly: boolean,\n  |};\n  declare export type ModuleExportName = Identifier | StringLiteral;\n  declare export type ExportSpecifier =\n    | ExportNamespaceSpecifier\n    | ExportDefaultSpecifier\n    | NamedExportSpecifier;\n  /**\n   * `export * as foo from 'src';`\n   */\n  declare export type ExportNamespaceSpecifier = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ExportNamespaceSpecifier',\n    name: ModuleExportName,\n  |};\n  declare export type ExportDefaultSpecifier = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ExportDefaultSpecifier',\n    exported: Identifier,\n  |};\n  declare export type NamedExportSpecifier = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ExportSpecifier',\n    orig: ModuleExportName,\n\n    /**\n     * `Some(bar)` in `export { foo as bar }`\n     */\n    exported?: ModuleExportName,\n    isTypeOnly: boolean,\n  |};\n  declare type HasInterpreter = {|\n    /**\n     * e.g. `/usr/bin/node` for `#!/usr/bin/node`\n     */\n    interpreter: string,\n  |};\n  declare export type Program = Module | Script;\n  declare export type Module = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n    ...$Exact<HasInterpreter>,\n\n    type: 'Module',\n    body: ModuleItem[],\n  |};\n  declare export type Script = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n    ...$Exact<HasInterpreter>,\n\n    type: 'Script',\n    body: Statement[],\n  |};\n  declare export type ModuleItem = ModuleDeclaration | Statement;\n  declare export type BinaryOperator =\n    | '=='\n    | '!='\n    | '==='\n    | '!=='\n    | '<'\n    | '<='\n    | '>'\n    | '>='\n    | '<<'\n    | '>>'\n    | '>>>'\n    | '+'\n    | '-'\n    | '*'\n    | '/'\n    | '%'\n    | '|'\n    | '^'\n    | '&'\n    | '||'\n    | '&&'\n    | 'in'\n    | 'instanceof'\n    | '**'\n    | '??';\n  declare export type AssignmentOperator =\n    | '='\n    | '+='\n    | '-='\n    | '*='\n    | '/='\n    | '%='\n    | '<<='\n    | '>>='\n    | '>>>='\n    | '|='\n    | '^='\n    | '&='\n    | '**='\n    | '&&='\n    | '||='\n    | '??=';\n  declare export type UpdateOperator = '++' | '--';\n  declare export type UnaryOperator =\n    | '-'\n    | '+'\n    | '!'\n    | '~'\n    | 'typeof'\n    | 'void'\n    | 'delete';\n  declare export type Pattern =\n    | BindingIdentifier\n    | ArrayPattern\n    | RestElement\n    | ObjectPattern\n    | AssignmentPattern\n    | Invalid\n    | Expression;\n  declare export type BindingIdentifier = {|\n    ...$Exact<PatternBase>,\n\n    type: 'Identifier',\n    value: string,\n    optional: boolean,\n  |};\n  declare export type ArrayPattern = {|\n    ...$Exact<PatternBase>,\n\n    type: 'ArrayPattern',\n    elements: (Pattern | void)[],\n    optional: boolean,\n  |};\n  declare export type ObjectPattern = {|\n    ...$Exact<PatternBase>,\n\n    type: 'ObjectPattern',\n    properties: ObjectPatternProperty[],\n    optional: boolean,\n  |};\n  declare export type AssignmentPattern = {|\n    ...$Exact<PatternBase>,\n\n    type: 'AssignmentPattern',\n    left: Pattern,\n    right: Expression,\n  |};\n  declare export type RestElement = {|\n    ...$Exact<PatternBase>,\n\n    type: 'RestElement',\n    rest: Span,\n    argument: Pattern,\n  |};\n  declare export type ObjectPatternProperty =\n    | KeyValuePatternProperty\n    | AssignmentPatternProperty\n    | RestElement;\n  /**\n   * `{key: value}`\n   */\n  declare export type KeyValuePatternProperty = {|\n    ...$Exact<Node>,\n\n    type: 'KeyValuePatternProperty',\n    key: PropertyName,\n    value: Pattern,\n  |};\n\n  /**\n   * `{key}` or `{key = value}`\n   */\n  declare export type AssignmentPatternProperty = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'AssignmentPatternProperty',\n    key: Identifier,\n    value?: Expression,\n  |};\n\n  /**\n   * Identifier is `a` in `{ a, }`\n   */\n  declare export type Property =\n    | Identifier\n    | KeyValueProperty\n    | AssignmentProperty\n    | GetterProperty\n    | SetterProperty\n    | MethodProperty;\n  declare type PropBase = {|\n    ...$Exact<Node>,\n\n    key: PropertyName,\n  |};\n  declare export type KeyValueProperty = {|\n    ...$Exact<PropBase>,\n\n    type: 'KeyValueProperty',\n    value: Expression,\n  |};\n  declare export type AssignmentProperty = {|\n    ...$Exact<Node>,\n\n    type: 'AssignmentProperty',\n    key: Identifier,\n    value: Expression,\n  |};\n  declare export type GetterProperty = {|\n    ...$Exact<PropBase>,\n    ...$Exact<HasSpan>,\n\n    type: 'GetterProperty',\n    typeAnnotation?: TsTypeAnnotation,\n    body?: BlockStatement,\n  |};\n  declare export type SetterProperty = {|\n    ...$Exact<PropBase>,\n    ...$Exact<HasSpan>,\n\n    type: 'SetterProperty',\n    param: Pattern,\n    body?: BlockStatement,\n  |};\n  declare export type MethodProperty = {|\n    ...$Exact<PropBase>,\n    ...$Exact<Fn>,\n\n    type: 'MethodProperty',\n  |};\n  declare export type PropertyName =\n    | Identifier\n    | StringLiteral\n    | NumericLiteral\n    | ComputedPropName\n    | BigIntLiteral;\n  declare export type ComputedPropName = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'Computed',\n    expression: Expression,\n  |};\n  declare export type BlockStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'BlockStatement',\n    stmts: Statement[],\n  |};\n  declare export type ExpressionStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ExpressionStatement',\n    expression: Expression,\n  |};\n  declare export type Statement =\n    | BlockStatement\n    | EmptyStatement\n    | DebuggerStatement\n    | WithStatement\n    | ReturnStatement\n    | LabeledStatement\n    | BreakStatement\n    | ContinueStatement\n    | IfStatement\n    | SwitchStatement\n    | ThrowStatement\n    | TryStatement\n    | WhileStatement\n    | DoWhileStatement\n    | ForStatement\n    | ForInStatement\n    | ForOfStatement\n    | Declaration\n    | ExpressionStatement;\n  declare export type EmptyStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'EmptyStatement',\n  |};\n  declare export type DebuggerStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'DebuggerStatement',\n  |};\n  declare export type WithStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'WithStatement',\n    object: Expression,\n    body: Statement,\n  |};\n  declare export type ReturnStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ReturnStatement',\n    argument?: Expression,\n  |};\n  declare export type LabeledStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'LabeledStatement',\n    label: Identifier,\n    body: Statement,\n  |};\n  declare export type BreakStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'BreakStatement',\n    label?: Identifier,\n  |};\n  declare export type ContinueStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ContinueStatement',\n    label?: Identifier,\n  |};\n  declare export type IfStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'IfStatement',\n    test: Expression,\n    consequent: Statement,\n    alternate?: Statement,\n  |};\n  declare export type SwitchStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'SwitchStatement',\n    discriminant: Expression,\n    cases: SwitchCase[],\n  |};\n  declare export type ThrowStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ThrowStatement',\n    argument: Expression,\n  |};\n  declare export type TryStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TryStatement',\n    block: BlockStatement,\n    handler?: CatchClause,\n    finalizer?: BlockStatement,\n  |};\n  declare export type WhileStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'WhileStatement',\n    test: Expression,\n    body: Statement,\n  |};\n  declare export type DoWhileStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'DoWhileStatement',\n    test: Expression,\n    body: Statement,\n  |};\n  declare export type ForStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ForStatement',\n    init?: VariableDeclaration | Expression,\n    test?: Expression,\n    update?: Expression,\n    body: Statement,\n  |};\n  declare export type ForInStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ForInStatement',\n    left: VariableDeclaration | Pattern,\n    right: Expression,\n    body: Statement,\n  |};\n  declare export type ForOfStatement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'ForOfStatement',\n\n    /**\n     * Span of the await token.\n     *\n     * es2018 for-await-of statements, e.g., `for await (const x of xs) {`\n     */\n    await?: Span,\n    left: VariableDeclaration | Pattern,\n    right: Expression,\n    body: Statement,\n  |};\n  declare export type SwitchCase = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'SwitchCase',\n\n    /**\n     * Undefined for default case\n     */\n    test?: Expression,\n    consequent: Statement[],\n  |};\n  declare export type CatchClause = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'CatchClause',\n\n    /**\n     * The param is `undefined` if the catch binding is omitted. E.g., `try { foo() } catch {}`\n     */\n    param?: Pattern,\n    body: BlockStatement,\n  |};\n  declare export type TsTypeAnnotation = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypeAnnotation',\n    typeAnnotation: TsType,\n  |};\n  declare export type TsTypeParameterDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypeParameterDeclaration',\n    parameters: TsTypeParameter[],\n  |};\n  declare export type TsTypeParameter = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypeParameter',\n    name: Identifier,\n    in: boolean,\n    out: boolean,\n    constraint?: TsType,\n    default?: TsType,\n  |};\n  declare export type TsTypeParameterInstantiation = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypeParameterInstantiation',\n    params: TsType[],\n  |};\n  declare export type TsParameterProperty = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n    ...$Exact<HasDecorator>,\n\n    type: 'TsParameterProperty',\n    accessibility?: Accessibility,\n    override: boolean,\n    readonly: boolean,\n    param: TsParameterPropertyParameter,\n  |};\n  declare export type TsParameterPropertyParameter =\n    | BindingIdentifier\n    | AssignmentPattern;\n  declare export type TsQualifiedName = {|\n    ...$Exact<Node>,\n\n    type: 'TsQualifiedName',\n    left: TsEntityName,\n    right: Identifier,\n  |};\n  declare export type TsEntityName = TsQualifiedName | Identifier;\n  declare export type TsTypeElement =\n    | TsCallSignatureDeclaration\n    | TsConstructSignatureDeclaration\n    | TsPropertySignature\n    | TsGetterSignature\n    | TsSetterSignature\n    | TsMethodSignature\n    | TsIndexSignature;\n  declare export type TsCallSignatureDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsCallSignatureDeclaration',\n    params: TsFnParameter[],\n    typeAnnotation?: TsTypeAnnotation,\n    typeParams?: TsTypeParameterDeclaration,\n  |};\n  declare export type TsConstructSignatureDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsConstructSignatureDeclaration',\n    params: TsFnParameter[],\n    typeAnnotation?: TsTypeAnnotation,\n    typeParams?: TsTypeParameterDeclaration,\n  |};\n  declare export type TsPropertySignature = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsPropertySignature',\n    readonly: boolean,\n    key: Expression,\n    computed: boolean,\n    optional: boolean,\n    init?: Expression,\n    params: TsFnParameter[],\n    typeAnnotation?: TsTypeAnnotation,\n    typeParams?: TsTypeParameterDeclaration,\n  |};\n  declare export type TsGetterSignature = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsGetterSignature',\n    readonly: boolean,\n    key: Expression,\n    computed: boolean,\n    optional: boolean,\n    typeAnnotation?: TsTypeAnnotation,\n  |};\n  declare export type TsSetterSignature = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsSetterSignature',\n    readonly: boolean,\n    key: Expression,\n    computed: boolean,\n    optional: boolean,\n    param: TsFnParameter,\n  |};\n  declare export type TsMethodSignature = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsMethodSignature',\n    readonly: boolean,\n    key: Expression,\n    computed: boolean,\n    optional: boolean,\n    params: TsFnParameter[],\n    typeAnn?: TsTypeAnnotation,\n    typeParams?: TsTypeParameterDeclaration,\n  |};\n  declare export type TsIndexSignature = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsIndexSignature',\n    params: TsFnParameter[],\n    typeAnnotation?: TsTypeAnnotation,\n    readonly: boolean,\n    static: boolean,\n  |};\n  declare export type TsType =\n    | TsKeywordType\n    | TsThisType\n    | TsFnOrConstructorType\n    | TsTypeReference\n    | TsTypeQuery\n    | TsTypeLiteral\n    | TsArrayType\n    | TsTupleType\n    | TsOptionalType\n    | TsRestType\n    | TsUnionOrIntersectionType\n    | TsConditionalType\n    | TsInferType\n    | TsParenthesizedType\n    | TsTypeOperator\n    | TsIndexedAccessType\n    | TsMappedType\n    | TsLiteralType\n    | TsTypePredicate\n    | TsImportType;\n  declare export type TsFnOrConstructorType =\n    | TsFunctionType\n    | TsConstructorType;\n  declare export type TsKeywordType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsKeywordType',\n    kind: TsKeywordTypeKind,\n  |};\n  declare export type TsKeywordTypeKind =\n    | 'any'\n    | 'unknown'\n    | 'number'\n    | 'object'\n    | 'boolean'\n    | 'bigint'\n    | 'string'\n    | 'symbol'\n    | 'void'\n    | 'undefined'\n    | 'null'\n    | 'never'\n    | 'intrinsic';\n  declare export type TsThisType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsThisType',\n  |};\n  declare export type TsFnParameter =\n    | BindingIdentifier\n    | ArrayPattern\n    | RestElement\n    | ObjectPattern;\n  declare export type TsFunctionType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsFunctionType',\n    params: TsFnParameter[],\n    typeParams?: TsTypeParameterDeclaration,\n    typeAnnotation: TsTypeAnnotation,\n  |};\n  declare export type TsConstructorType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsConstructorType',\n    params: TsFnParameter[],\n    typeParams?: TsTypeParameterDeclaration,\n    typeAnnotation: TsTypeAnnotation,\n    isAbstract: boolean,\n  |};\n  declare export type TsTypeReference = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypeReference',\n    typeName: TsEntityName,\n    typeParams?: TsTypeParameterInstantiation,\n  |};\n  declare export type TsTypePredicate = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypePredicate',\n    asserts: boolean,\n    paramName: TsThisTypeOrIdent,\n    typeAnnotation?: TsTypeAnnotation,\n  |};\n  declare export type TsThisTypeOrIdent = TsThisType | Identifier;\n  declare export type TsImportType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsImportType',\n    argument: StringLiteral,\n    qualifier?: TsEntityName,\n    typeArguments?: TsTypeParameterInstantiation,\n  |};\n\n  /**\n   * `typeof` operator\n   */\n  declare export type TsTypeQuery = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypeQuery',\n    exprName: TsTypeQueryExpr,\n    typeArguments?: TsTypeParameterInstantiation,\n  |};\n  declare export type TsTypeQueryExpr = TsEntityName | TsImportType;\n  declare export type TsTypeLiteral = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypeLiteral',\n    members: TsTypeElement[],\n  |};\n  declare export type TsArrayType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsArrayType',\n    elemType: TsType,\n  |};\n  declare export type TsTupleType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTupleType',\n    elemTypes: TsTupleElement[],\n  |};\n  declare export type TsTupleElement = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTupleElement',\n    label?: Pattern,\n    ty: TsType,\n  |};\n  declare export type TsOptionalType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsOptionalType',\n    typeAnnotation: TsType,\n  |};\n  declare export type TsRestType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsRestType',\n    typeAnnotation: TsType,\n  |};\n  declare export type TsUnionOrIntersectionType =\n    | TsUnionType\n    | TsIntersectionType;\n  declare export type TsUnionType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsUnionType',\n    types: TsType[],\n  |};\n  declare export type TsIntersectionType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsIntersectionType',\n    types: TsType[],\n  |};\n  declare export type TsConditionalType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsConditionalType',\n    checkType: TsType,\n    extendsType: TsType,\n    trueType: TsType,\n    falseType: TsType,\n  |};\n  declare export type TsInferType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsInferType',\n    typeParam: TsTypeParameter,\n  |};\n  declare export type TsParenthesizedType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsParenthesizedType',\n    typeAnnotation: TsType,\n  |};\n  declare export type TsTypeOperator = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypeOperator',\n    op: TsTypeOperatorOp,\n    typeAnnotation: TsType,\n  |};\n  declare export type TsTypeOperatorOp = 'keyof' | 'unique' | 'readonly';\n  declare export type TsIndexedAccessType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsIndexedAccessType',\n    readonly: boolean,\n    objectType: TsType,\n    indexType: TsType,\n  |};\n  declare export type TruePlusMinus = true | '+' | '-';\n  declare export type TsMappedType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsMappedType',\n    readonly?: TruePlusMinus,\n    typeParam: TsTypeParameter,\n    nameType?: TsType,\n    optional?: TruePlusMinus,\n    typeAnnotation?: TsType,\n  |};\n  declare export type TsLiteralType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsLiteralType',\n    literal: TsLiteral,\n  |};\n  declare export type TsLiteral =\n    | NumericLiteral\n    | StringLiteral\n    | BooleanLiteral\n    | BigIntLiteral\n    | TsTemplateLiteralType;\n  declare export type TsTemplateLiteralType = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TemplateLiteral',\n    types: TsType[],\n    quasis: TemplateElement[],\n  |};\n  declare export type TsInterfaceDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsInterfaceDeclaration',\n    id: Identifier,\n    declare: boolean,\n    typeParams?: TsTypeParameterDeclaration,\n    extends: TsExpressionWithTypeArguments[],\n    body: TsInterfaceBody,\n  |};\n  declare export type TsInterfaceBody = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsInterfaceBody',\n    body: TsTypeElement[],\n  |};\n  declare export type TsExpressionWithTypeArguments = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsExpressionWithTypeArguments',\n    expression: Expression,\n    typeArguments?: TsTypeParameterInstantiation,\n  |};\n  declare export type TsTypeAliasDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsTypeAliasDeclaration',\n    declare: boolean,\n    id: Identifier,\n    typeParams?: TsTypeParameterDeclaration,\n    typeAnnotation: TsType,\n  |};\n  declare export type TsEnumDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsEnumDeclaration',\n    declare: boolean,\n    isConst: boolean,\n    id: Identifier,\n    members: TsEnumMember[],\n  |};\n  declare export type TsEnumMember = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsEnumMember',\n    id: TsEnumMemberId,\n    init?: Expression,\n  |};\n  declare export type TsEnumMemberId = Identifier | StringLiteral;\n  declare export type TsModuleDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsModuleDeclaration',\n    declare: boolean,\n    global: boolean,\n    id: TsModuleName,\n    body?: TsNamespaceBody,\n  |};\n\n  /**\n   * `namespace A.B { }` is a namespace named `A` with another TsNamespaceDecl as its body.\n   */\n  declare export type TsNamespaceBody = TsModuleBlock | TsNamespaceDeclaration;\n  declare export type TsModuleBlock = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsModuleBlock',\n    body: ModuleItem[],\n  |};\n  declare export type TsNamespaceDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsNamespaceDeclaration',\n    declare: boolean,\n    global: boolean,\n    id: Identifier,\n    body: TsNamespaceBody,\n  |};\n  declare export type TsModuleName = Identifier | StringLiteral;\n  declare export type TsImportEqualsDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsImportEqualsDeclaration',\n    declare: boolean,\n    isExport: boolean,\n    isTypeOnly: boolean,\n    id: Identifier,\n    moduleRef: TsModuleReference,\n  |};\n  declare export type TsModuleReference =\n    | TsEntityName\n    | TsExternalModuleReference;\n  declare export type TsExternalModuleReference = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsExternalModuleReference',\n    expression: StringLiteral,\n  |};\n  declare export type TsExportAssignment = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsExportAssignment',\n    expression: Expression,\n  |};\n  declare export type TsNamespaceExportDeclaration = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsNamespaceExportDeclaration',\n    id: Identifier,\n  |};\n  declare export type TsAsExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'TsAsExpression',\n    expression: Expression,\n    typeAnnotation: TsType,\n  |};\n  declare export type TsInstantiation = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'TsInstantiation',\n    expression: Expression,\n    typeArguments: TsTypeParameterInstantiation,\n  |};\n  declare export type TsTypeAssertion = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'TsTypeAssertion',\n    expression: Expression,\n    typeAnnotation: TsType,\n  |};\n  declare export type TsConstAssertion = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'TsConstAssertion',\n    expression: Expression,\n  |};\n  declare export type TsNonNullExpression = {|\n    ...$Exact<ExpressionBase>,\n\n    type: 'TsNonNullExpression',\n    expression: Expression,\n  |};\n  declare export type Accessibility = 'public' | 'protected' | 'private';\n  declare export type Invalid = {|\n    ...$Exact<Node>,\n    ...$Exact<HasSpan>,\n\n    type: 'Invalid',\n  |};\n}\n\ndeclare module '@swc/core/Visitor' {\n  import type {\n    Accessibility,\n    ArrayExpression,\n    ArrayPattern,\n    ArrowFunctionExpression,\n    Argument,\n    AssignmentExpression,\n    AssignmentPattern,\n    AssignmentPatternProperty,\n    AssignmentProperty,\n    AwaitExpression,\n    BigIntLiteral,\n    BinaryExpression,\n    BlockStatement,\n    BooleanLiteral,\n    BreakStatement,\n    CallExpression,\n    CatchClause,\n    Klass,\n    ClassDeclaration,\n    ClassExpression,\n    ClassMember,\n    ClassMethod,\n    ClassProperty,\n    ComputedPropName,\n    ConditionalExpression,\n    Constructor,\n    ContinueStatement,\n    DebuggerStatement,\n    Declaration,\n    Decorator,\n    DefaultDecl,\n    DoWhileStatement,\n    EmptyStatement,\n    ExportAllDeclaration,\n    ExportDeclaration,\n    ExportDefaultDeclaration,\n    ExportDefaultExpression,\n    ExportDefaultSpecifier,\n    ExportNamedDeclaration,\n    ExportNamespaceSpecifier,\n    ExportSpecifier,\n    Expression,\n    ExpressionStatement,\n    Fn,\n    ForInStatement,\n    ForOfStatement,\n    ForStatement,\n    FunctionDeclaration,\n    FunctionExpression,\n    GetterProperty,\n    Identifier,\n    IfStatement,\n    ImportDeclaration,\n    ImportDefaultSpecifier,\n    ImportNamespaceSpecifier,\n    ImportSpecifier,\n    JSXAttribute,\n    JSXAttributeName,\n    JSXAttributeOrSpread,\n    JSXAttrValue,\n    JSXClosingElement,\n    JSXClosingFragment,\n    JSXElement,\n    JSXElementChild,\n    JSXElementName,\n    JSXEmptyExpression,\n    JSXExpressionContainer,\n    JSXFragment,\n    JSXMemberExpression,\n    JSXNamespacedName,\n    JSXObject,\n    JSXOpeningElement,\n    JSXOpeningFragment,\n    JSXSpreadChild,\n    JSXText,\n    KeyValuePatternProperty,\n    KeyValueProperty,\n    LabeledStatement,\n    MemberExpression,\n    MetaProperty,\n    MethodProperty,\n    Module,\n    ModuleDeclaration,\n    ModuleExportName,\n    ModuleItem,\n    NamedExportSpecifier,\n    NamedImportSpecifier,\n    NewExpression,\n    NullLiteral,\n    NumericLiteral,\n    ObjectExpression,\n    ObjectPattern,\n    ObjectPatternProperty,\n    OptionalChainingCall,\n    OptionalChainingExpression,\n    ParenthesisExpression,\n    Pattern,\n    PrivateMethod,\n    PrivateName,\n    PrivateProperty,\n    Program,\n    Property,\n    PropertyName,\n    RegExpLiteral,\n    RestElement,\n    ReturnStatement,\n    Script,\n    SequenceExpression,\n    SetterProperty,\n    SpreadElement,\n    Statement,\n    StaticBlock,\n    StringLiteral,\n    Super,\n    SwitchCase,\n    SwitchStatement,\n    TaggedTemplateExpression,\n    TemplateLiteral,\n    ThisExpression,\n    ThrowStatement,\n    TryStatement,\n    TsAsExpression,\n    TsCallSignatureDeclaration,\n    TsConstructSignatureDeclaration,\n    TsEntityName,\n    TsEnumDeclaration,\n    TsEnumMember,\n    TsEnumMemberId,\n    TsExportAssignment,\n    TsExpressionWithTypeArguments,\n    TsExternalModuleReference,\n    TsFnParameter,\n    TsGetterSignature,\n    TsImportEqualsDeclaration,\n    TsIndexSignature,\n    TsInstantiation,\n    TsInterfaceBody,\n    TsInterfaceDeclaration,\n    TsMethodSignature,\n    TsModuleBlock,\n    TsModuleDeclaration,\n    TsModuleName,\n    TsModuleReference,\n    TsNamespaceBody,\n    TsNamespaceDeclaration,\n    TsNamespaceExportDeclaration,\n    TsNonNullExpression,\n    TsParameterProperty,\n    TsParameterPropertyParameter,\n    TsPropertySignature,\n    TsQualifiedName,\n    TsSetterSignature,\n    TsType,\n    TsTypeAliasDeclaration,\n    TsTypeAnnotation,\n    TsTypeAssertion,\n    TsTypeElement,\n    TsTypeParameter,\n    TsTypeParameterDeclaration,\n    TsTypeParameterInstantiation,\n    UnaryExpression,\n    UpdateExpression,\n    VariableDeclaration,\n    VariableDeclarator,\n    WhileStatement,\n    WithStatement,\n    YieldExpression,\n    Param,\n    ExprOrSpread,\n    TsConstAssertion,\n    Import,\n    SuperPropExpression,\n  } from '@swc/core';\n  declare export class Visitor {\n    visitProgram(n: Program): Program;\n    visitModule(m: Module): Module;\n    visitScript(m: Script): Script;\n    visitModuleItems(items: ModuleItem[]): ModuleItem[];\n    visitModuleItem(n: ModuleItem): ModuleItem;\n    visitModuleDeclaration(n: ModuleDeclaration): ModuleDeclaration;\n    visitTsNamespaceExportDeclaration(\n      n: TsNamespaceExportDeclaration,\n    ): ModuleDeclaration;\n    visitTsExportAssignment(n: TsExportAssignment): TsExportAssignment;\n    visitTsImportEqualsDeclaration(\n      n: TsImportEqualsDeclaration,\n    ): ModuleDeclaration;\n    visitTsModuleReference(n: TsModuleReference): TsModuleReference;\n    visitTsExternalModuleReference(\n      n: TsExternalModuleReference,\n    ): TsExternalModuleReference;\n    visitExportAllDeclaration(n: ExportAllDeclaration): ModuleDeclaration;\n    visitExportDefaultExpression(n: ExportDefaultExpression): ModuleDeclaration;\n    visitExportNamedDeclaration(n: ExportNamedDeclaration): ModuleDeclaration;\n    visitExportSpecifiers(nodes: ExportSpecifier[]): ExportSpecifier[];\n    visitExportSpecifier(n: ExportSpecifier): ExportSpecifier;\n    visitNamedExportSpecifier(n: NamedExportSpecifier): ExportSpecifier;\n    visitModuleExportName(n: ModuleExportName): ModuleExportName;\n    visitExportNamespaceSpecifier(n: ExportNamespaceSpecifier): ExportSpecifier;\n    visitExportDefaultSpecifier(n: ExportDefaultSpecifier): ExportSpecifier;\n    visitOptionalStringLiteral(n: StringLiteral | void): StringLiteral | void;\n    visitExportDefaultDeclaration(\n      n: ExportDefaultDeclaration,\n    ): ModuleDeclaration;\n    visitDefaultDeclaration(n: DefaultDecl): DefaultDecl;\n    visitFunctionExpression(n: FunctionExpression): FunctionExpression;\n    visitClassExpression(n: ClassExpression): ClassExpression;\n    visitExportDeclaration(n: ExportDeclaration): ModuleDeclaration;\n    visitArrayExpression(e: ArrayExpression): Expression;\n    visitArrayElement(e: ExprOrSpread | void): ExprOrSpread | void;\n    visitExprOrSpread(e: ExprOrSpread): ExprOrSpread;\n    visitExprOrSpreads(nodes: ExprOrSpread[]): ExprOrSpread[];\n    visitSpreadElement(e: SpreadElement): SpreadElement;\n    visitOptionalExpression(e: Expression | void): Expression | void;\n    visitArrowFunctionExpression(e: ArrowFunctionExpression): Expression;\n    visitArrowBody(\n      body: BlockStatement | Expression,\n    ): BlockStatement | Expression;\n    visitBlockStatement(block: BlockStatement): BlockStatement;\n    visitStatements(stmts: Statement[]): Statement[];\n    visitStatement(stmt: Statement): Statement;\n    visitSwitchStatement(stmt: SwitchStatement): Statement;\n    visitSwitchCases(cases: SwitchCase[]): SwitchCase[];\n    visitSwitchCase(c: SwitchCase): SwitchCase;\n    visitIfStatement(stmt: IfStatement): Statement;\n    visitOptionalStatement(stmt: Statement | void): Statement | void;\n    visitBreakStatement(stmt: BreakStatement): Statement;\n    visitWhileStatement(stmt: WhileStatement): Statement;\n    visitTryStatement(stmt: TryStatement): Statement;\n    visitCatchClause(handler: CatchClause | void): CatchClause | void;\n    visitThrowStatement(stmt: ThrowStatement): Statement;\n    visitReturnStatement(stmt: ReturnStatement): Statement;\n    visitLabeledStatement(stmt: LabeledStatement): Statement;\n    visitForStatement(stmt: ForStatement): Statement;\n    visitForOfStatement(stmt: ForOfStatement): Statement;\n    visitForInStatement(stmt: ForInStatement): Statement;\n    visitEmptyStatement(stmt: EmptyStatement): EmptyStatement;\n    visitDoWhileStatement(stmt: DoWhileStatement): Statement;\n    visitDebuggerStatement(stmt: DebuggerStatement): Statement;\n    visitWithStatement(stmt: WithStatement): Statement;\n    visitDeclaration(decl: Declaration): Declaration;\n    visitVariableDeclaration(n: VariableDeclaration): VariableDeclaration;\n    visitVariableDeclarators(nodes: VariableDeclarator[]): VariableDeclarator[];\n    visitVariableDeclarator(n: VariableDeclarator): VariableDeclarator;\n    visitTsTypeAliasDeclaration(n: TsTypeAliasDeclaration): Declaration;\n    visitTsModuleDeclaration(n: TsModuleDeclaration): Declaration;\n    visitTsModuleName(n: TsModuleName): TsModuleName;\n    visitTsNamespaceBody(n: TsNamespaceBody): TsNamespaceBody | void;\n    visitTsNamespaceDeclaration(\n      n: TsNamespaceDeclaration,\n    ): TsModuleBlock | TsNamespaceDeclaration;\n    visitTsModuleBlock(\n      n: TsModuleBlock,\n    ): TsModuleBlock | TsNamespaceDeclaration;\n    visitTsInterfaceDeclaration(\n      n: TsInterfaceDeclaration,\n    ): TsInterfaceDeclaration;\n    visitTsInterfaceBody(n: TsInterfaceBody): TsInterfaceBody;\n    visitTsTypeElements(nodes: TsTypeElement[]): TsTypeElement[];\n    visitTsTypeElement(n: TsTypeElement): TsTypeElement;\n    visitTsCallSignatureDeclaration(\n      n: TsCallSignatureDeclaration,\n    ): TsCallSignatureDeclaration;\n    visitTsConstructSignatureDeclaration(\n      n: TsConstructSignatureDeclaration,\n    ): TsConstructSignatureDeclaration;\n    visitTsPropertySignature(n: TsPropertySignature): TsPropertySignature;\n    visitTsGetterSignature(n: TsGetterSignature): TsGetterSignature;\n    visitTsSetterSignature(n: TsSetterSignature): TsSetterSignature;\n    visitTsMethodSignature(n: TsMethodSignature): TsMethodSignature;\n    visitTsEnumDeclaration(n: TsEnumDeclaration): Declaration;\n    visitTsEnumMembers(nodes: TsEnumMember[]): TsEnumMember[];\n    visitTsEnumMember(n: TsEnumMember): TsEnumMember;\n    visitTsEnumMemberId(n: TsEnumMemberId): TsEnumMemberId;\n    visitFunctionDeclaration(decl: FunctionDeclaration): Declaration;\n    visitClassDeclaration(decl: ClassDeclaration): Declaration;\n    visitClassBody(members: ClassMember[]): ClassMember[];\n    visitClassMember(member: ClassMember): ClassMember;\n    visitTsIndexSignature(n: TsIndexSignature): TsIndexSignature;\n    visitTsFnParameters(params: TsFnParameter[]): TsFnParameter[];\n    visitTsFnParameter(n: TsFnParameter): TsFnParameter;\n    visitPrivateProperty(n: PrivateProperty): ClassMember;\n    visitPrivateMethod(n: PrivateMethod): ClassMember;\n    visitPrivateName(n: PrivateName): PrivateName;\n    visitConstructor(n: Constructor): ClassMember;\n    visitConstructorParameters(\n      nodes: (Param | TsParameterProperty)[],\n    ): (Param | TsParameterProperty)[];\n    visitConstructorParameter(\n      n: Param | TsParameterProperty,\n    ): Param | TsParameterProperty;\n    visitStaticBlock(n: StaticBlock): StaticBlock;\n    visitTsParameterProperty(\n      n: TsParameterProperty,\n    ): TsParameterProperty | Param;\n    visitTsParameterPropertyParameter(\n      n: TsParameterPropertyParameter,\n    ): TsParameterPropertyParameter;\n    visitPropertyName(key: PropertyName): PropertyName;\n    visitAccessibility(n: Accessibility | void): Accessibility | void;\n    visitClassProperty(n: ClassProperty): ClassMember;\n    visitClassMethod(n: ClassMethod): ClassMember;\n    visitComputedPropertyKey(n: ComputedPropName): ComputedPropName;\n    visitClass<T: Klass>(n: T): T;\n    visitFunction<T: Fn>(n: T): T;\n    visitTsExpressionsWithTypeArguments(\n      nodes: TsExpressionWithTypeArguments[],\n    ): TsExpressionWithTypeArguments[];\n    visitTsExpressionWithTypeArguments(\n      n: TsExpressionWithTypeArguments,\n    ): TsExpressionWithTypeArguments;\n    visitTsTypeParameterInstantiation(\n      n: TsTypeParameterInstantiation | void,\n    ): TsTypeParameterInstantiation | void;\n    visitTsTypes(nodes: TsType[]): TsType[];\n    visitTsEntityName(n: TsEntityName): TsEntityName;\n    visitTsQualifiedName(n: TsQualifiedName): TsQualifiedName;\n    visitDecorators(nodes: Decorator[] | void): Decorator[] | void;\n    visitDecorator(n: Decorator): Decorator;\n    visitExpressionStatement(stmt: ExpressionStatement): Statement;\n    visitContinueStatement(stmt: ContinueStatement): Statement;\n    visitExpression(n: Expression): Expression;\n    visitOptionalChainingExpression(n: OptionalChainingExpression): Expression;\n    visitMemberExpressionOrOptionalChainingCall(\n      n: MemberExpression | OptionalChainingCall,\n    ): MemberExpression | OptionalChainingCall;\n    visitOptionalChainingCall(n: OptionalChainingCall): OptionalChainingCall;\n    visitAssignmentExpression(n: AssignmentExpression): Expression;\n    visitPatternOrExpression(n: Pattern | Expression): Pattern | Expression;\n    visitYieldExpression(n: YieldExpression): Expression;\n    visitUpdateExpression(n: UpdateExpression): Expression;\n    visitUnaryExpression(n: UnaryExpression): Expression;\n    visitTsTypeAssertion(n: TsTypeAssertion): Expression;\n    visitTsConstAssertion(n: TsConstAssertion): Expression;\n    visitTsInstantiation(n: TsInstantiation): TsInstantiation;\n    visitTsNonNullExpression(n: TsNonNullExpression): Expression;\n    visitTsAsExpression(n: TsAsExpression): Expression;\n    visitThisExpression(n: ThisExpression): Expression;\n    visitTemplateLiteral(n: TemplateLiteral): Expression;\n    visitParameters(n: Param[]): Param[];\n    visitParameter(n: Param): Param;\n    visitTaggedTemplateExpression(n: TaggedTemplateExpression): Expression;\n    visitSequenceExpression(n: SequenceExpression): Expression;\n    visitRegExpLiteral(n: RegExpLiteral): Expression;\n    visitParenthesisExpression(n: ParenthesisExpression): Expression;\n    visitObjectExpression(n: ObjectExpression): Expression;\n    visitObjectProperties(\n      nodes: (Property | SpreadElement)[],\n    ): (Property | SpreadElement)[];\n    visitObjectProperty(n: Property | SpreadElement): Property | SpreadElement;\n    visitProperty(n: Property): Property | SpreadElement;\n    visitSetterProperty(n: SetterProperty): Property | SpreadElement;\n    visitMethodProperty(n: MethodProperty): Property | SpreadElement;\n    visitKeyValueProperty(n: KeyValueProperty): Property | SpreadElement;\n    visitGetterProperty(n: GetterProperty): Property | SpreadElement;\n    visitAssignmentProperty(n: AssignmentProperty): Property | SpreadElement;\n    visitNullLiteral(n: NullLiteral): NullLiteral;\n    visitNewExpression(n: NewExpression): Expression;\n    visitTsTypeArguments(\n      n: TsTypeParameterInstantiation | void,\n    ): TsTypeParameterInstantiation | void;\n    visitArguments(nodes: Argument[]): Argument[];\n    visitArgument(n: Argument): Argument;\n    visitMetaProperty(n: MetaProperty): Expression;\n    visitMemberExpression(n: MemberExpression): MemberExpression;\n    visitSuperPropExpression(n: SuperPropExpression): Expression;\n    visitCallee(n: Expression | Super | Import): Expression | Super | Import;\n    visitJSXText(n: JSXText): JSXText;\n    visitJSXNamespacedName(n: JSXNamespacedName): JSXNamespacedName;\n    visitJSXMemberExpression(n: JSXMemberExpression): JSXMemberExpression;\n    visitJSXObject(n: JSXObject): JSXObject;\n    visitJSXFragment(n: JSXFragment): JSXFragment;\n    visitJSXClosingFragment(n: JSXClosingFragment): JSXClosingFragment;\n    visitJSXElementChildren(nodes: JSXElementChild[]): JSXElementChild[];\n    visitJSXElementChild(n: JSXElementChild): JSXElementChild;\n    visitJSXExpressionContainer(\n      n: JSXExpressionContainer,\n    ): JSXExpressionContainer;\n    visitJSXSpreadChild(n: JSXSpreadChild): JSXElementChild;\n    visitJSXOpeningFragment(n: JSXOpeningFragment): JSXOpeningFragment;\n    visitJSXEmptyExpression(n: JSXEmptyExpression): Expression;\n    visitJSXElement(n: JSXElement): JSXElement;\n    visitJSXClosingElement(\n      n: JSXClosingElement | void,\n    ): JSXClosingElement | void;\n    visitJSXElementName(n: JSXElementName): JSXElementName;\n    visitJSXOpeningElement(n: JSXOpeningElement): JSXOpeningElement;\n    visitJSXAttributes(\n      attrs: JSXAttributeOrSpread[] | void,\n    ): JSXAttributeOrSpread[] | void;\n    visitJSXAttributeOrSpread(n: JSXAttributeOrSpread): JSXAttributeOrSpread;\n    visitJSXAttributeOrSpreads(\n      nodes: JSXAttributeOrSpread[],\n    ): JSXAttributeOrSpread[];\n    visitJSXAttribute(n: JSXAttribute): JSXAttributeOrSpread;\n    visitJSXAttributeValue(n: JSXAttrValue | void): JSXAttrValue | void;\n    visitJSXAttributeName(n: JSXAttributeName): JSXAttributeName;\n    visitConditionalExpression(n: ConditionalExpression): Expression;\n    visitCallExpression(n: CallExpression): Expression;\n    visitBooleanLiteral(n: BooleanLiteral): BooleanLiteral;\n    visitBinaryExpression(n: BinaryExpression): Expression;\n    visitAwaitExpression(n: AwaitExpression): Expression;\n    visitTsTypeParameterDeclaration(\n      n: TsTypeParameterDeclaration | void,\n    ): TsTypeParameterDeclaration | void;\n    visitTsTypeParameters(nodes: TsTypeParameter[]): TsTypeParameter[];\n    visitTsTypeParameter(n: TsTypeParameter): TsTypeParameter;\n    visitTsTypeAnnotation(a: TsTypeAnnotation | void): TsTypeAnnotation | void;\n    visitTsType(n: TsType): TsType;\n    visitPatterns(nodes: Pattern[]): Pattern[];\n    visitImportDeclaration(n: ImportDeclaration): ImportDeclaration;\n    visitImportSpecifiers(nodes: ImportSpecifier[]): ImportSpecifier[];\n    visitImportSpecifier(node: ImportSpecifier): ImportSpecifier;\n    visitNamedImportSpecifier(node: NamedImportSpecifier): NamedImportSpecifier;\n    visitImportNamespaceSpecifier(\n      node: ImportNamespaceSpecifier,\n    ): ImportNamespaceSpecifier;\n    visitImportDefaultSpecifier(node: ImportDefaultSpecifier): ImportSpecifier;\n    visitBindingIdentifier(i: Identifier): Identifier;\n    visitIdentifierReference(i: Identifier): Identifier;\n    visitLabelIdentifier(label: Identifier): Identifier;\n    visitIdentifier(n: Identifier): Identifier;\n    visitStringLiteral(n: StringLiteral): StringLiteral;\n    visitNumericLiteral(n: NumericLiteral): NumericLiteral;\n    visitBigIntLiteral(n: BigIntLiteral): BigIntLiteral;\n    visitPattern(n: Pattern): Pattern;\n    visitRestElement(n: RestElement): RestElement;\n    visitAssignmentPattern(n: AssignmentPattern): Pattern;\n    visitObjectPattern(n: ObjectPattern): Pattern;\n    visitObjectPatternProperties(\n      nodes: ObjectPatternProperty[],\n    ): ObjectPatternProperty[];\n    visitObjectPatternProperty(n: ObjectPatternProperty): ObjectPatternProperty;\n    visitKeyValuePatternProperty(\n      n: KeyValuePatternProperty,\n    ): ObjectPatternProperty;\n    visitAssignmentPatternProperty(\n      n: AssignmentPatternProperty,\n    ): ObjectPatternProperty;\n    visitArrayPattern(n: ArrayPattern): Pattern;\n    visitArrayPatternElements(nodes: (Pattern | void)[]): (Pattern | void)[];\n    visitArrayPatternElement(n: Pattern | void): Pattern | void;\n  }\n  declare export default typeof Visitor;\n}\n"
  },
  {
    "path": "flow-typed/npm/chalk_v4.x.x.js",
    "content": "// flow-typed signature: 79cfa6bcaa67fdb60f10d320da0470fc\n// flow-typed version: 6cecea2e51/chalk_v4.x.x/flow_>=v0.104.x\n\n// From: https://github.com/chalk/chalk/blob/master/index.d.ts\n\ndeclare module \"chalk\" {\n  declare type ForegroundColor =\n    | 'black'\n    | 'red'\n    | 'green'\n    | 'yellow'\n    | 'blue'\n    | 'magenta'\n    | 'cyan'\n    | 'white'\n    | 'gray'\n    | 'grey'\n    | 'blackBright'\n    | 'redBright'\n    | 'greenBright'\n    | 'yellowBright'\n    | 'blueBright'\n    | 'magentaBright'\n    | 'cyanBright'\n    | 'whiteBright';\n\n  declare type BackgroundColor =\n    | 'bgBlack'\n    | 'bgRed'\n    | 'bgGreen'\n    | 'bgYellow'\n    | 'bgBlue'\n    | 'bgMagenta'\n    | 'bgCyan'\n    | 'bgWhite'\n    | 'bgGray'\n    | 'bgGrey'\n    | 'bgBlackBright'\n    | 'bgRedBright'\n    | 'bgGreenBright'\n    | 'bgYellowBright'\n    | 'bgBlueBright'\n    | 'bgMagentaBright'\n    | 'bgCyanBright'\n    | 'bgWhiteBright';\n\n  declare type Color = ForegroundColor | BackgroundColor;\n\n  declare type Modifiers =\n    | 'reset'\n    | 'bold'\n    | 'dim'\n    | 'italic'\n    | 'underline'\n    | 'inverse'\n    | 'hidden'\n    | 'strikethrough'\n    | 'visible';\n\n  declare type TemplateStringsArray = $ReadOnlyArray<string>;\n\n  declare type Level = $Values<{\n    None: 0,\n    Basic: 1,\n    Ansi256: 2,\n    TrueColor: 3,\n    ...\n  }>;\n\n  declare type ChalkOptions = {|\n    level?: Level\n  |};\n\n  declare type ColorSupport = {|\n    level: Level,\n    hasBasic: boolean,\n    has256: boolean,\n    has16m: boolean\n  |};\n\n  declare class Instance implements Chalk {\n    constructor(options?: ChalkOptions): this;\n\n    (...text: string[]): string,\n    (text: TemplateStringsArray, ...placeholders: string[]): string,\n    Instance: typeof Instance,\n    level: Level,\n    rgb(r: number, g: number, b: number): Chalk,\n    hsl(h: number, s: number, l: number): Chalk,\n    hsv(h: number, s: number, v: number): Chalk,\n    hwb(h: number, w: number, b: number): Chalk,\n    bgHex(color: string): Chalk,\n    bgKeyword(color: string): Chalk,\n    bgRgb(r: number, g: number, b: number): Chalk,\n    bgHsl(h: number, s: number, l: number): Chalk,\n    bgHsv(h: number, s: number, v: number): Chalk,\n    bgHwb(h: number, w: number, b: number): Chalk,\n    hex(color: string): Chalk,\n    keyword(color: string): Chalk,\n\n    +reset: Chalk,\n    +bold: Chalk,\n    +dim: Chalk,\n    +italic: Chalk,\n    +underline: Chalk,\n    +inverse: Chalk,\n    +hidden: Chalk,\n    +strikethrough: Chalk,\n\n    +visible: Chalk,\n\n    +black: Chalk,\n    +red: Chalk,\n    +green: Chalk,\n    +yellow: Chalk,\n    +blue: Chalk,\n    +magenta: Chalk,\n    +cyan: Chalk,\n    +white: Chalk,\n    +gray: Chalk,\n    +grey: Chalk,\n    +blackBright: Chalk,\n    +redBright: Chalk,\n    +greenBright: Chalk,\n    +yellowBright: Chalk,\n    +blueBright: Chalk,\n    +magentaBright: Chalk,\n    +cyanBright: Chalk,\n    +whiteBright: Chalk,\n\n    +bgBlack: Chalk,\n    +bgRed: Chalk,\n    +bgGreen: Chalk,\n    +bgYellow: Chalk,\n    +bgBlue: Chalk,\n    +bgMagenta: Chalk,\n    +bgCyan: Chalk,\n    +bgWhite: Chalk,\n    +bgBlackBright: Chalk,\n    +bgRedBright: Chalk,\n    +bgGreenBright: Chalk,\n    +bgYellowBright: Chalk,\n    +bgBlueBright: Chalk,\n    +bgMagentaBright: Chalk,\n    +bgCyanBright: Chalk,\n    +bgWhiteBright: Chalk,\n\n    supportsColor: ColorSupport\n  }\n\n  declare interface Chalk {\n    (...text: string[]): string,\n    (text: TemplateStringsArray, ...placeholders: string[]): string,\n    Instance: typeof Instance,\n    level: Level,\n    rgb(r: number, g: number, b: number): Chalk,\n    hsl(h: number, s: number, l: number): Chalk,\n    hsv(h: number, s: number, v: number): Chalk,\n    hwb(h: number, w: number, b: number): Chalk,\n    bgHex(color: string): Chalk,\n    bgKeyword(color: string): Chalk,\n    bgRgb(r: number, g: number, b: number): Chalk,\n    bgHsl(h: number, s: number, l: number): Chalk,\n    bgHsv(h: number, s: number, v: number): Chalk,\n    bgHwb(h: number, w: number, b: number): Chalk,\n    hex(color: string): Chalk,\n    keyword(color: string): Chalk,\n\n    +reset: Chalk,\n    +bold: Chalk,\n    +dim: Chalk,\n    +italic: Chalk,\n    +underline: Chalk,\n    +inverse: Chalk,\n    +hidden: Chalk,\n    +strikethrough: Chalk,\n\n    +visible: Chalk,\n\n    +black: Chalk,\n    +red: Chalk,\n    +green: Chalk,\n    +yellow: Chalk,\n    +blue: Chalk,\n    +magenta: Chalk,\n    +cyan: Chalk,\n    +white: Chalk,\n    +gray: Chalk,\n    +grey: Chalk,\n    +blackBright: Chalk,\n    +redBright: Chalk,\n    +greenBright: Chalk,\n    +yellowBright: Chalk,\n    +blueBright: Chalk,\n    +magentaBright: Chalk,\n    +cyanBright: Chalk,\n    +whiteBright: Chalk,\n\n    +bgBlack: Chalk,\n    +bgRed: Chalk,\n    +bgGreen: Chalk,\n    +bgYellow: Chalk,\n    +bgBlue: Chalk,\n    +bgMagenta: Chalk,\n    +bgCyan: Chalk,\n    +bgWhite: Chalk,\n    +bgBlackBright: Chalk,\n    +bgRedBright: Chalk,\n    +bgGreenBright: Chalk,\n    +bgYellowBright: Chalk,\n    +bgBlueBright: Chalk,\n    +bgMagentaBright: Chalk,\n    +bgCyanBright: Chalk,\n    +bgWhiteBright: Chalk,\n\n    supportsColor: ColorSupport\n  }\n\n  declare module.exports: Chalk;\n}\n"
  },
  {
    "path": "flow-typed/npm/clone_v2.x.x.js",
    "content": "// flow-typed signature: e65d25838d862100b2564dec170532b3\n// flow-typed version: da30fe6876/clone_v2.x.x/flow_>=v0.25.x\n\n// @flow\n\ndeclare module 'clone' {\n  declare module.exports: <T>(object: T) => T;\n}\n"
  },
  {
    "path": "flow-typed/npm/express_v4.x.x.js",
    "content": "// flow-typed signature: 5c17cfda258a9db73cd2282d14ff18d0\n// flow-typed version: 2f514ea8dd/express_v4.x.x/flow_>=v0.104.x\n\ndeclare type express$RouterOptions = {\n  caseSensitive?: boolean,\n  mergeParams?: boolean,\n  strict?: boolean,\n  ...\n};\n\ndeclare class express$RequestResponseBase {\n  app: express$Application<any, any>;\n  get(field: string): string | void;\n}\n\ndeclare type express$RequestParams = { [param: string]: string, ... }\n\n/*\n  NOTE: Use caution when extending `express$Request` or `express$Response`. When\n  a request first hits the server, its `req` and `res` will not have any\n  additional properties, even if you explicitly type them with your custom\n  subclass. Subsequent middleware may assign these properties, but you must be\n  cognizant of this ordering. One way to handle this is marking all properties\n  as optional to force refinement every time a property is accessed. Therefore,\n  we advise that you always mark properties as _optional_ in `express$Request`\n  and `express$Response` subclasses.\n\n  You may decide not to do this, in which case the typings will be unsound and\n  the behavior will be similar to how arrays work in Flow. See here for more\n  information: https://flow.org/en/docs/types/arrays/#toc-array-access-is-unsafe\n\n  See #3578 and #3337 for additional discussion. If you have ideas on how to\n  improve these typings, please share them in #3578 or open a new issue.\n\n  **BAD**\n  declare class test_express$CustomRequest extends express$Request {\n    foo: string;\n  }\n\n  **GOOD**\n  declare class test_express$CustomRequest extends express$Request {\n    foo: string | void;\n  }\n*/\ndeclare class express$Request extends http$IncomingMessage mixins express$RequestResponseBase {\n  baseUrl: string;\n  body: mixed;\n  cookies: { [cookie: string]: string, ... };\n  connection: net$Socket;\n  fresh: boolean;\n  hostname: string;\n  ip: string;\n  ips: Array<string>;\n  method: string;\n  originalUrl: string;\n  params: express$RequestParams;\n  path: string;\n  protocol: 'https' | 'http';\n  query: { [name: string]: string | Array<string>, ... };\n  route: string;\n  secure: boolean;\n  signedCookies: { [signedCookie: string]: string, ... };\n  stale: boolean;\n  subdomains: Array<string>;\n  xhr: boolean;\n  accepts(types: string): string | false;\n  accepts(types: Array<string>): string | false;\n  acceptsCharsets(...charsets: Array<string>): string | false;\n  acceptsEncodings(...encoding: Array<string>): string | false;\n  acceptsLanguages(...lang: Array<string>): string | false;\n  header(field: string): string | void;\n  is(type: string): string | false;\n  param(name: string, defaultValue?: string): string | void;\n}\n\ndeclare type express$CookieOptions = {\n  domain?: string,\n  encode?: (value: string) => string,\n  expires?: Date,\n  httpOnly?: boolean,\n  maxAge?: number,\n  path?: string,\n  secure?: boolean,\n  signed?: boolean,\n  ...\n};\n\ndeclare type express$Path = string | RegExp;\n\ndeclare type express$RenderCallback = (err: Error | null, html?: string) => mixed;\n\ndeclare type express$SendFileOptions = {\n  maxAge?: number,\n  root?: string,\n  lastModified?: boolean,\n  headers?: { [name: string]: string, ... },\n  dotfiles?: 'allow' | 'deny' | 'ignore',\n  ...\n};\n\ndeclare class express$Response extends http$ServerResponse mixins express$RequestResponseBase {\n  headersSent: boolean;\n  locals: { [name: string]: mixed, ... };\n  append(field: string, value?: string): this;\n  attachment(filename?: string): this;\n  cookie(name: string, value: string, options?: express$CookieOptions): this;\n  clearCookie(name: string, options?: express$CookieOptions): this;\n  download(path: string, filename?: string, callback?: (err?: ?Error) => void): this;\n  format(typesObject: { [type: string]: Function, ... }): this;\n  json(body?: mixed): this;\n  jsonp(body?: mixed): this;\n  links(links: { [name: string]: string, ... }): this;\n  location(path: string): this;\n  redirect(url: string, ...args: Array<void>): this;\n  redirect(status: number, url: string, ...args: Array<void>): this;\n  render(view: string, locals?: { [name: string]: mixed, ... }, callback?: express$RenderCallback): this;\n  send(body?: mixed): this;\n  sendFile(path: string, options?: express$SendFileOptions, callback?: (err?: ?Error) => mixed): this;\n  sendStatus(statusCode: number): this;\n  header(field: string, value?: string): this;\n  header(headers: { [name: string]: string, ... }): this;\n  set(field: string, value?: string|string[]): this;\n  set(headers: { [name: string]: string, ... }): this;\n  status(statusCode: number): this;\n  type(type: string): this;\n  vary(field: string): this;\n  req: express$Request;\n}\n\ndeclare type express$NextFunction = (err?: ?Error | 'route') => mixed;\ndeclare type express$Middleware<\n  Req: express$Request = express$Request,\n  Res: express$Response = express$Response,\n> =\n  ((req: Req, res: Res, next: express$NextFunction) => mixed) |\n  ((error: Error, req: Req, res: Res, next: express$NextFunction) => mixed);\n\ndeclare interface express$RouteMethodType<\n  T,\n  Req: express$Request = express$Request,\n  Res: express$Response = express$Response,\n> {\n  (middleware: express$Middleware<Req, Res>): T;\n  (...middleware: Array<express$Middleware<Req, Res>>): T;\n  (\n    path: express$Path | $ReadOnlyArray<express$Path>,\n    ...middleware: Array<express$Middleware<Req, Res>>\n  ): T;\n}\n\ndeclare class express$Route<\n  Req: express$Request = express$Request,\n  Res: express$Response = express$Response,\n> {\n  all: express$RouteMethodType<this, Req, Res>;\n  get: express$RouteMethodType<this, Req, Res>;\n  post: express$RouteMethodType<this, Req, Res>;\n  put: express$RouteMethodType<this, Req, Res>;\n  head: express$RouteMethodType<this, Req, Res>;\n  delete: express$RouteMethodType<this, Req, Res>;\n  options: express$RouteMethodType<this, Req, Res>;\n  trace: express$RouteMethodType<this, Req, Res>;\n  copy: express$RouteMethodType<this, Req, Res>;\n  lock: express$RouteMethodType<this, Req, Res>;\n  mkcol: express$RouteMethodType<this, Req, Res>;\n  move: express$RouteMethodType<this, Req, Res>;\n  purge: express$RouteMethodType<this, Req, Res>;\n  propfind: express$RouteMethodType<this, Req, Res>;\n  proppatch: express$RouteMethodType<this, Req, Res>;\n  unlock: express$RouteMethodType<this, Req, Res>;\n  report: express$RouteMethodType<this, Req, Res>;\n  mkactivity: express$RouteMethodType<this, Req, Res>;\n  checkout: express$RouteMethodType<this, Req, Res>;\n  merge: express$RouteMethodType<this, Req, Res>;\n\n  // @TODO Missing 'm-search' but get flow illegal name error.\n\n  notify: express$RouteMethodType<this, Req, Res>;\n  subscribe: express$RouteMethodType<this, Req, Res>;\n  unsubscribe: express$RouteMethodType<this, Req, Res>;\n  patch: express$RouteMethodType<this, Req, Res>;\n  search: express$RouteMethodType<this, Req, Res>;\n  connect: express$RouteMethodType<this, Req, Res>;\n}\n\ndeclare class express$Router<\n  Req: express$Request = express$Request,\n  Res: express$Response = express$Response,\n> extends express$Route<Req, Res> {\n  constructor(options?: express$RouterOptions): void;\n  route(path: string): express$Route<Req, Res>;\n  static <Req2: express$Request, Res2: express$Response>(\n    options?: express$RouterOptions,\n  ): express$Router<Req2, Res2>;\n  use(middleware: express$Middleware<Req, Res>): this;\n  use(...middleware: Array<express$Middleware<Req, Res>>): this;\n  use(\n    path: express$Path | $ReadOnlyArray<express$Path>,\n    ...middleware: Array<express$Middleware<Req, Res>>\n  ): this;\n  use(path: string, router: express$Router<Req, Res>): this;\n  handle(req: http$IncomingMessage<>, res: http$ServerResponse, next: express$NextFunction): void;\n  param(\n    param: string,\n    callback: (\n      req: Req,\n      res: Res,\n      next: express$NextFunction,\n      value: string,\n      paramName: string,\n    ) => mixed\n  ): void;\n  (req: http$IncomingMessage<>, res: http$ServerResponse, next?: ?express$NextFunction): void;\n}\n\ndeclare class express$Application<\n  Req: express$Request = express$Request,\n  Res: express$Response = express$Response,\n> extends express$Router<Req, Res> mixins events$EventEmitter {\n  constructor(): void;\n  locals: { [name: string]: mixed, ... };\n  mountpath: string;\n  listen(port: number, hostname?: string, backlog?: number, callback?: (err?: ?Error) => mixed): ?http$Server;\n  listen(port: number, hostname?: string, callback?: (err?: ?Error) => mixed): ?http$Server;\n  listen(port: number, callback?: (err?: ?Error) => mixed): ?http$Server;\n  listen(path: string, callback?: (err?: ?Error) => mixed): ?http$Server;\n  listen(handle: Object, callback?: (err?: ?Error) => mixed): ?http$Server;\n  disable(name: string): void;\n  disabled(name: string): boolean;\n  enable(name: string): this;\n  enabled(name: string): boolean;\n  engine(name: string, callback: Function): void;\n  /**\n   * Mixed will not be taken as a value option. Issue around using the GET http method name and the get for settings.\n   */\n  //   get(name: string): mixed;\n  set(name: string, value: mixed): mixed;\n  render(name: string, optionsOrFunction: { [name: string]: mixed, ... }, callback: express$RenderCallback): void;\n  handle(req: http$IncomingMessage<>, res: http$ServerResponse, next?: ?express$NextFunction): void;\n  // callable signature is not inherited\n  (req: http$IncomingMessage<>, res: http$ServerResponse, next?: ?express$NextFunction): void;\n}\n\ndeclare module 'express' {\n  declare export type RouterOptions = express$RouterOptions;\n  declare export type CookieOptions = express$CookieOptions;\n  declare export type Middleware<\n    Req: express$Request = express$Request,\n    Res: express$Response = express$Response,\n  > = express$Middleware<Req, Res>;\n  declare export type NextFunction = express$NextFunction;\n  declare export type RequestParams = express$RequestParams;\n  declare export type $Response = express$Response;\n  declare export type $Request = express$Request;\n  declare export type $Application<\n    Req: express$Request = express$Request,\n    Res: express$Response = express$Response,\n  > = express$Application<Req, Res>;\n\n  declare module.exports: {\n    // If you try to call like a function, it will use this signature\n    <Req: express$Request, Res: express$Response>(): express$Application<Req, Res>,\n    // `static` property on the function\n    static: <Req: express$Request, Res: express$Response>(root: string, options?: Object) => express$Middleware<Req, Res>,\n    // `Router` property on the function\n    Router: typeof express$Router,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-typed/npm/is-url_v1.x.x.js",
    "content": "// flow-typed signature: ea5cb9dfe7dceda7305dd7cb03175302\n// flow-typed version: 94e9f7e0a4/is-url_v1.x.x/flow_>=v0.25.x\n\ndeclare module 'is-url' {\n  declare module.exports: (url: string) => boolean;\n}\n"
  },
  {
    "path": "flow-typed/npm/mime_v2.x.x.js",
    "content": "// flow-typed signature: 31e500511ae049defd391e018e0d8fa9\n// flow-typed version: c6154227d1/mime_v2.x.x/flow_>=v0.104.x\n\ndeclare type $npm$mime$TypeMap = { [mime: string]: Array<string>, ... };\n\ndeclare class $npm$mime$Mime {\n  constructor(...typeMap: Array<$npm$mime$TypeMap>): void;\n\n  define(typeMap: $npm$mime$TypeMap, force?: boolean): void;\n  getExtension(mime: string): ?string;\n  getType(path: string): ?string;\n}\n\ndeclare module 'mime' {\n  declare type TypeMap = $npm$mime$TypeMap;\n  declare module.exports: $npm$mime$Mime;\n}\n\ndeclare module 'mime/lite' {\n  declare type TypeMap = $npm$mime$TypeMap;\n  declare module.exports: $npm$mime$Mime;\n}\n\ndeclare module 'mime/Mime' {\n  declare type TypeMap = $npm$mime$TypeMap;\n  declare module.exports: typeof $npm$mime$Mime;\n}\n"
  },
  {
    "path": "flow-typed/npm/mkdirp_v0.5.x.js",
    "content": "// flow-typed signature: b1b274e8ae71623bf11c20224c446842\n// flow-typed version: c6154227d1/mkdirp_v0.5.x/flow_>=v0.104.x\n\ndeclare module 'mkdirp' {\n  declare type Options = number | {\n    mode?: number,\n    fs?: mixed,\n    ...\n  };\n\n  declare type Callback = (err: ?Error, path: ?string) => void;\n\n  declare module.exports: {\n    (path: string, options?: Options | Callback, callback?: Callback): void,\n    sync(path: string, options?: Options): void,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-typed/npm/mocha_v8.x.x.js",
    "content": "// flow-typed signature: a9c051e037cdcce97b16e692321e6856\n// flow-typed version: b074eb3e38/mocha_v8.x.x/flow_>=v0.104.x\n\ndeclare interface $npm$mocha$SetupOptions {\n  slow?: number;\n  timeout?: number;\n  ui?: string;\n  globals?: Array<any>;\n  reporter?: any;\n  bail?: boolean;\n  ignoreLeaks?: boolean;\n  grep?: any;\n}\n\ndeclare type $npm$mocha$done = (error?: any) => any;\n\n// declare interface $npm$mocha$SuiteCallbackContext {\n//   timeout(ms: number): void;\n//   retries(n: number): void;\n//   slow(ms: number): void;\n// }\n\n// declare interface $npm$mocha$TestCallbackContext {\n//   skip(): void;\n//   timeout(ms: number): void;\n//   retries(n: number): void;\n//   slow(ms: number): void;\n//   [index: string]: any;\n// }\n\ndeclare interface $npm$mocha$Suite {\n  parent: $npm$mocha$Suite;\n  title: string;\n  fullTitle(): string;\n}\n\ndeclare type $npm$mocha$ContextDefinition = {|\n  (description: string, callback: (/* this: $npm$mocha$SuiteCallbackContext */) => void): $npm$mocha$Suite;\n  only(description: string, callback: (/* this: $npm$mocha$SuiteCallbackContext */) => void): $npm$mocha$Suite;\n  skip(description: string, callback: (/* this: $npm$mocha$SuiteCallbackContext */) => void): void;\n  timeout(ms: number): void;\n|}\n\ndeclare type $npm$mocha$TestDefinition = {|\n  (expectation: string, callback?: (/* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done) => mixed): $npm$mocha$Test;\n  only(expectation: string, callback?: (/* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done) => mixed): $npm$mocha$Test;\n  skip(expectation: string, callback?: (/* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done) => mixed): void;\n  timeout(ms: number): void;\n  state: 'failed' | 'passed';\n|}\n\ndeclare interface $npm$mocha$Runner {}\n\ndeclare class $npm$mocha$BaseReporter {\n  stats: {\n    suites: number,\n    tests: number,\n    passes: number,\n    pending: number,\n    failures: number,\n    ...\n  };\n\n  constructor(runner: $npm$mocha$Runner): $npm$mocha$BaseReporter;\n}\n\ndeclare class $npm$mocha$DocReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$DotReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$HTMLReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$HTMLCovReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$JSONReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$JSONCovReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$JSONStreamReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$LandingReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$ListReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$MarkdownReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$MinReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$NyanReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$ProgressReporter extends $npm$mocha$BaseReporter {\n  constructor(runner: $npm$mocha$Runner, options?: {\n    open?: string,\n    complete?: string,\n    incomplete?: string,\n    close?: string,\n    ...\n  }): $npm$mocha$ProgressReporter;\n}\ndeclare class $npm$mocha$SpecReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$TAPReporter extends $npm$mocha$BaseReporter {}\ndeclare class $npm$mocha$XUnitReporter extends $npm$mocha$BaseReporter {\n  constructor(runner: $npm$mocha$Runner, options?: any): $npm$mocha$XUnitReporter;\n}\n\ndeclare class $npm$mocha$Mocha {\n  currentTest: $npm$mocha$TestDefinition;\n  constructor(options?: {\n    grep?: RegExp,\n    ui?: string,\n    reporter?: string,\n    timeout?: number,\n    reporterOptions?: any,\n    slow?: number,\n    bail?: boolean,\n    ...\n  }): $npm$mocha$Mocha;\n  setup(options: $npm$mocha$SetupOptions): this;\n  bail(value?: boolean): this;\n  addFile(file: string): this;\n  reporter(name: string): this;\n  reporter(reporter: (runner: $npm$mocha$Runner, options: any) => any): this;\n  ui(value: string): this;\n  grep(value: string): this;\n  grep(value: RegExp): this;\n  invert(): this;\n  ignoreLeaks(value: boolean): this;\n  checkLeaks(): this;\n  throwError(error: Error): void;\n  growl(): this;\n  globals(value: string): this;\n  globals(values: Array<string>): this;\n  useColors(value: boolean): this;\n  useInlineDiffs(value: boolean): this;\n  timeout(value: number): this;\n  slow(value: number): this;\n  enableTimeouts(value: boolean): this;\n  asyncOnly(value: boolean): this;\n  noHighlighting(value: boolean): this;\n  run(onComplete?: (failures: number) => void): $npm$mocha$Runner;\n\n  static reporters: {\n    Doc: $npm$mocha$DocReporter,\n    Dot: $npm$mocha$DotReporter,\n    HTML: $npm$mocha$HTMLReporter,\n    HTMLCov: $npm$mocha$HTMLCovReporter,\n    JSON: $npm$mocha$JSONReporter,\n    JSONCov: $npm$mocha$JSONCovReporter,\n    JSONStream: $npm$mocha$JSONStreamReporter,\n    Landing: $npm$mocha$LandingReporter,\n    List: $npm$mocha$ListReporter,\n    Markdown: $npm$mocha$MarkdownReporter,\n    Min: $npm$mocha$MinReporter,\n    Nyan: $npm$mocha$NyanReporter,\n    Progress: $npm$mocha$ProgressReporter,\n    ...\n  };\n}\n\n// declare interface $npm$mocha$HookCallbackContext {\n//   skip(): void;\n//   timeout(ms: number): void;\n//   [index: string]: any;\n// }\n\ndeclare interface $npm$mocha$Runnable {\n  title: string;\n  fn: Function;\n  async: boolean;\n  sync: boolean;\n  timedOut: boolean;\n}\n\ndeclare interface $npm$mocha$Test extends $npm$mocha$Runnable {\n  parent: $npm$mocha$Suite;\n  pending: boolean;\n  state: 'failed' | 'passed' | void;\n  fullTitle(): string;\n  timeout(ms: number): void;\n}\n\n// declare interface $npm$mocha$BeforeAndAfterContext extends $npm$mocha$HookCallbackContext {\n//   currentTest: $npm$mocha$Test;\n// }\n\ndeclare var mocha: $npm$mocha$Mocha;\ndeclare var describe: $npm$mocha$ContextDefinition;\ndeclare var xdescribe: $npm$mocha$ContextDefinition;\ndeclare var context: $npm$mocha$ContextDefinition;\ndeclare var suite: $npm$mocha$ContextDefinition;\ndeclare var it: $npm$mocha$TestDefinition;\ndeclare var xit: $npm$mocha$TestDefinition;\ndeclare var test: $npm$mocha$TestDefinition;\ndeclare var specify: $npm$mocha$TestDefinition;\n\ntype Run = () => void;\n\ndeclare var run: Run;\n\ntype Setup = (callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void;\ntype Teardown = (callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void;\ntype SuiteSetup = (callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void;\ntype SuiteTeardown = (callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void;\ntype Before =\n  | (callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void\n  | (description: string, callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void;\ntype After =\n  | (callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void\n  | (description: string, callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void;\ntype BeforeEach =\n  | (callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void\n  | (description: string, callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void;\ntype AfterEach =\n  | (callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void\n  | (description: string, callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void;\n\n\ndeclare var setup: Setup;\ndeclare var teardown: Teardown;\ndeclare var suiteSetup: SuiteSetup;\ndeclare var suiteTeardown: SuiteTeardown;\ndeclare var before: Before\ndeclare var after: After;\ndeclare var beforeEach: BeforeEach;\ndeclare var afterEach: AfterEach;\n\ndeclare module \"mocha\" {\n  declare export var mocha: $npm$mocha$TestDefinition;\n  declare export var describe: $npm$mocha$ContextDefinition;\n  declare export var xdescribe: $npm$mocha$ContextDefinition;\n  declare export var context: $npm$mocha$ContextDefinition;\n  declare export var suite: $npm$mocha$ContextDefinition;\n  declare export var it: $npm$mocha$TestDefinition;\n  declare export var xit: $npm$mocha$TestDefinition;\n  declare export var test: $npm$mocha$TestDefinition;\n  declare export var specify: $npm$mocha$TestDefinition;\n\n  declare export var run: Run;\n\n  declare export var setup: Setup;\n  declare export var teardown: Teardown;\n  declare export var suiteSetup: SuiteSetup;\n  declare export var suiteTeardown: SuiteTeardown;\n  declare export var before: Before;\n  declare export var after: After;\n  declare export var beforeEach: BeforeEach;\n  declare export var afterEach: AfterEach;\n\n  declare export default $npm$mocha$Mocha;\n}\n"
  },
  {
    "path": "flow-typed/npm/rimraf_v5.x.x.js",
    "content": "// https://github.com/flow-typed/flow-typed/pull/4556\n\ndeclare module 'rimraf' {\n  declare type Options = {\n    maxRetries?: number,\n    glob?: boolean,\n    ...\n  };\n\n  declare module.exports: {\n    (f: string, opts?: Options): Promise<boolean>,\n    sync(path: string, opts?: Options): boolean,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-typed/npm/semver_v6.2.x.js",
    "content": "// flow-typed signature: 0f3a5488505547a0a71d5b49cf5c2954\n// flow-typed version: 01cfe946d5/semver_v6.2.x/flow_>=v0.104.x\n\ndeclare module \"semver\" {\n  declare type Release =\n    | \"major\"\n    | \"premajor\"\n    | \"minor\"\n    | \"preminor\"\n    | \"patch\"\n    | \"prepatch\"\n    | \"prerelease\";\n\n  // The supported comparators are taken from the source here:\n  // https://github.com/npm/node-semver/blob/8bd070b550db2646362c9883c8d008d32f66a234/semver.js#L623\n  declare type Operator =\n    | \"===\"\n    | \"!==\"\n    | \"==\"\n    | \"=\"\n    | \"\" // Not sure why you would want this, but whatever.\n    | \"!=\"\n    | \">\"\n    | \">=\"\n    | \"<\"\n    | \"<=\";\n\n  declare class SemVer {\n    build: Array<string>;\n    loose: ?boolean;\n    major: number;\n    minor: number;\n    patch: number;\n    prerelease: Array<string | number>;\n    raw: string;\n    version: string;\n\n    constructor(version: string | SemVer, options?: Options): SemVer;\n    compare(other: string | SemVer): -1 | 0 | 1;\n    compareMain(other: string | SemVer): -1 | 0 | 1;\n    comparePre(other: string | SemVer): -1 | 0 | 1;\n    compareBuild(other: string | SemVer): -1 | 0 | 1;\n    format(): string;\n    inc(release: Release, identifier: string): this;\n  }\n\n  declare class Comparator {\n    options?: Options;\n    operator: Operator;\n    semver: SemVer;\n    value: string;\n\n    constructor(comp: string | Comparator, options?: Options): Comparator;\n    parse(comp: string): void;\n    test(version: string): boolean;\n  }\n\n  declare class Range {\n    loose: ?boolean;\n    raw: string;\n    set: Array<Array<Comparator>>;\n\n    constructor(range: string | Range, options?: Options): Range;\n    format(): string;\n    parseRange(range: string): Array<Comparator>;\n    test(version: string): boolean;\n    toString(): string;\n  }\n\n  declare var SEMVER_SPEC_VERSION: string;\n  declare var re: Array<RegExp>;\n  declare var src: Array<string>;\n\n  declare type Options = {\n    options?: Options,\n    includePrerelease?: boolean,\n    ...\n  } | boolean;\n\n  // Functions\n  declare function valid(v: string | SemVer, options?: Options): string | null;\n  declare function clean(v: string | SemVer, options?: Options): string | null;\n  declare function inc(\n    v: string | SemVer,\n    release: Release,\n    options?: Options,\n    identifier?: string\n  ): string | null;\n  declare function inc(\n    v: string | SemVer,\n    release: Release,\n    identifier: string\n  ): string | null;\n  declare function major(v: string | SemVer, options?: Options): number;\n  declare function minor(v: string | SemVer, options?: Options): number;\n  declare function patch(v: string | SemVer, options?: Options): number;\n  declare function intersects(r1: string | SemVer, r2: string | SemVer, loose?: boolean): boolean;\n  declare function minVersion(r: string | Range): Range | null;\n\n  // Comparison\n  declare function gt(\n    v1: string | SemVer,\n    v2: string | SemVer,\n    options?: Options\n  ): boolean;\n  declare function gte(\n    v1: string | SemVer,\n    v2: string | SemVer,\n    options?: Options\n  ): boolean;\n  declare function lt(\n    v1: string | SemVer,\n    v2: string | SemVer,\n    options?: Options\n  ): boolean;\n  declare function lte(\n    v1: string | SemVer,\n    v2: string | SemVer,\n    options?: Options\n  ): boolean;\n  declare function eq(\n    v1: string | SemVer,\n    v2: string | SemVer,\n    options?: Options\n  ): boolean;\n  declare function neq(\n    v1: string | SemVer,\n    v2: string | SemVer,\n    options?: Options\n  ): boolean;\n  declare function cmp(\n    v1: string | SemVer,\n    comparator: Operator,\n    v2: string | SemVer,\n    options?: Options\n  ): boolean;\n  declare function compare(\n    v1: string | SemVer,\n    v2: string | SemVer,\n    options?: Options\n  ): -1 | 0 | 1;\n  declare function rcompare(\n    v1: string | SemVer,\n    v2: string | SemVer,\n    options?: Options\n  ): -1 | 0 | 1;\n  declare function diff(v1: string | SemVer, v2: string | SemVer): ?Release;\n  declare function intersects(comparator: Comparator): boolean;\n  declare function sort(\n    list: Array<string | SemVer>,\n    options?: Options\n  ): Array<string | SemVer>;\n  declare function rsort(\n    list: Array<string | SemVer>,\n    options?: Options\n  ): Array<string | SemVer>;\n  declare function compareIdentifiers(\n    v1: string | SemVer,\n    v2: string | SemVer\n  ): -1 | 0 | 1;\n  declare function rcompareIdentifiers(\n    v1: string | SemVer,\n    v2: string | SemVer\n  ): -1 | 0 | 1;\n\n  // Ranges\n  declare function validRange(\n    range: string | Range,\n    options?: Options\n  ): string | null;\n  declare function satisfies(\n    version: string | SemVer,\n    range: string | Range,\n    options?: Options\n  ): boolean;\n  declare function maxSatisfying(\n    versions: Array<string | SemVer>,\n    range: string | Range,\n    options?: Options\n  ): string | SemVer | null;\n  declare function minSatisfying(\n    versions: Array<string | SemVer>,\n    range: string | Range,\n    options?: Options\n  ): string | SemVer | null;\n  declare function gtr(\n    version: string | SemVer,\n    range: string | Range,\n    options?: Options\n  ): boolean;\n  declare function ltr(\n    version: string | SemVer,\n    range: string | Range,\n    options?: Options\n  ): boolean;\n  declare function outside(\n    version: string | SemVer,\n    range: string | Range,\n    hilo: \">\" | \"<\",\n    options?: Options\n  ): boolean;\n  declare function intersects(\n    range: Range\n  ): boolean;\n\n  // Coercion\n  declare function coerce(\n    version: string | SemVer,\n    options?: Options\n  ): ?SemVer\n\n  // Not explicitly documented, or deprecated\n  declare function parse(version: string, options?: Options): ?SemVer;\n  declare function toComparators(\n    range: string | Range,\n    options?: Options\n  ): Array<Array<string>>;\n}\n"
  },
  {
    "path": "flow-typed/npm/sinon_v7.x.x.js",
    "content": "// flow-typed signature: b8dbe7970939676d2e1e0478e2bb77e5\n// flow-typed version: c87d478d4c/sinon_v7.x.x/flow_>=v0.80.x\n\ndeclare module 'sinon' {\n  declare interface SinonFakeCallApi {\n    thisValue: any;\n    args: Array<any>;\n    exception: any;\n    returnValue: any;\n    calledOn(obj: any): boolean;\n    calledWith(...args: Array<any>): boolean;\n    calledWithExactly(...args: Array<any>): boolean;\n    calledWithMatch(...args: Array<any>): boolean;\n    notCalledWith(...args: Array<any>): boolean;\n    notCalledWithMatch(...args: Array<any>): boolean;\n    returned(value: any): boolean;\n    threw(): boolean;\n    threw(type: string): boolean;\n    threw(obj: any): boolean;\n  }\n\n  declare interface SinonFake extends SinonFakeCallApi {\n    (...args: Array<any>): any;\n    callCount: number;\n    called: boolean;\n    notCalled: boolean;\n    calledOnce: boolean;\n    calledTwice: boolean;\n    calledThrice: boolean;\n    firstCall: SinonSpyCall;\n    secondCall: SinonSpyCall;\n    thirdCall: SinonSpyCall;\n    lastCall: SinonSpyCall;\n    thisValues: Array<any>;\n    args: Array<any>[];\n    exceptions: Array<any>;\n    returnValues: Array<any>;\n    calledBefore(anotherSpy: SinonSpy): boolean;\n    calledAfter(anotherSpy: SinonSpy): boolean;\n    calledImmediatelyBefore(anotherSpy: SinonSpy): boolean;\n    calledImmediatelyAfter(anotherSpy: SinonSpy): boolean;\n    calledWithNew(): boolean;\n    alwaysCalledOn(obj: any): boolean;\n    alwaysCalledWith(...args: Array<any>): boolean;\n    alwaysCalledWithExactly(...args: Array<any>): boolean;\n    alwaysCalledWithMatch(...args: Array<any>): boolean;\n    neverCalledWith(...args: Array<any>): boolean;\n    neverCalledWithMatch(...args: Array<any>): boolean;\n    alwaysThrew(): boolean;\n    alwaysThrew(type: string): boolean;\n    alwaysThrew(obj: any): boolean;\n    alwaysReturned(): boolean;\n    getCall(n: number): SinonSpyCall;\n    getCalls(): Array<SinonSpyCall>;\n    resetHistory(): void;\n    printf(format: string, ...args: Array<any>): string;\n    restore(): void;\n  }\n\n  declare interface SinonFakeStatic {\n    (): SinonSpy;\n    (func: any): SinonSpy;\n    (obj: any, method: string): SinonSpy;\n    returns(obj: any): SinonFake;\n    throws(type?: string): SinonFake;\n    throws(obj: any): SinonFake;\n    resolves(value?: any): SinonFake;\n    rejects(): SinonFake;\n    rejects(errorType: string): SinonFake;\n    rejects(value: any): SinonFake;\n    yields(...args: Array<any>): SinonFake;\n    yieldsAsync(...args: Array<any>): SinonFake;\n  }\n\n  declare interface SinonSpyCallApi extends SinonFakeCallApi {\n    thisValue: any;\n    args: Array<any>;\n    exception: any;\n    returnValue: any;\n    calledOn(obj: any): boolean;\n    calledWith(...args: Array<any>): boolean;\n    calledWithExactly(...args: Array<any>): boolean;\n    calledWithMatch(...args: Array<any>): boolean;\n    notCalledWith(...args: Array<any>): boolean;\n    notCalledWithMatch(...args: Array<any>): boolean;\n    returned(value: any): boolean;\n    threw(): boolean;\n    threw(type: string): boolean;\n    threw(obj: any): boolean;\n    callArg(pos: number): void;\n    callArgOn(pos: number, obj: any, ...args: Array<any>): void;\n    callArgWith(pos: number, ...args: Array<any>): void;\n    callArgOnWith(pos: number, obj: any, ...args: Array<any>): void;\n    yield(...args: Array<any>): void;\n    yieldOn(obj: any, ...args: Array<any>): void;\n    yieldTo(property: string, ...args: Array<any>): void;\n    yieldToOn(property: string, obj: any, ...args: Array<any>): void;\n  }\n\n  declare interface SinonSpyCall extends SinonSpyCallApi {\n    calledBefore(call: SinonSpyCall): boolean;\n    calledAfter(call: SinonSpyCall): boolean;\n    calledWithNew(call: SinonSpyCall): boolean;\n    lastArg: mixed;\n  }\n\n  declare interface SinonSpy extends SinonSpyCallApi, SinonFake {\n    // This blows everything up... idk why\n    (...args: Array<any>): any;\n    withArgs(...args: Array<any>): SinonSpy;\n    invokeCallback(...args: Array<any>): void;\n    calledOnceWithExactly(...args: Array<any>): boolean;\n  }\n\n  declare interface SinonSpyStatic {\n    (): SinonSpy;\n    (func: any): SinonSpy;\n    (obj: any, method: string): SinonSpy;\n  }\n\n  declare interface SinonStub extends SinonSpy {\n    (...args?: Array<any>): any;\n    resetBehavior(): void;\n    resetHistory(): void;\n    usingPromise(promiseLibrary: any): SinonStub;\n    returns(obj: any): SinonStub;\n    returnsArg(index: number): SinonStub;\n    returnsThis(): SinonStub;\n    resolves(value?: any): SinonStub;\n    throws(type?: string): SinonStub;\n    throws(obj: any): SinonStub;\n    throwsArg(index: number): SinonStub;\n    throwsException(type?: string): SinonStub;\n    throwsException(obj: any): SinonStub;\n    rejects(): SinonStub;\n    rejects(errorType: string): SinonStub;\n    rejects(value: any): SinonStub;\n    callsArg(index: number): SinonStub;\n    callThrough(): SinonStub;\n    callsArgOn(index: number, context: any): SinonStub;\n    callsArgWith(index: number, ...args: Array<any>): SinonStub;\n    callsArgOnWith(index: number, context: any, ...args: Array<any>): SinonStub;\n    callsArgAsync(index: number): SinonStub;\n    callsArgOnAsync(index: number, context: any): SinonStub;\n    callsArgWithAsync(index: number, ...args: Array<any>): SinonStub;\n    callsArgOnWithAsync(index: number, context: any, ...args: Array<any>): SinonStub;\n    callsFake(func: (...args: Array<any>) => void): SinonStub;\n    get(func: () => any): SinonStub;\n    set(func: (v: any) => mixed): SinonStub;\n    onCall(n: number): SinonStub;\n    onFirstCall(): SinonStub;\n    onSecondCall(): SinonStub;\n    onThirdCall(): SinonStub;\n    value(val: any): SinonStub;\n    yields(...args: Array<any>): SinonStub;\n    yieldsOn(context: any, ...args: Array<any>): SinonStub;\n    yieldsRight(...args: any[]): SinonStub;\n    yieldsTo(property: string, ...args: Array<any>): SinonStub;\n    yieldsToOn(property: string, context: any, ...args: Array<any>): SinonStub;\n    yieldsAsync(...args: Array<any>): SinonStub;\n    yieldsOnAsync(context: any, ...args: Array<any>): SinonStub;\n    yieldsToAsync(property: string, ...args: Array<any>): SinonStub;\n    yieldsToOnAsync(property: string, context: any, ...args: Array<any>): SinonStub;\n    withArgs(...args: Array<any>): SinonStub;\n  }\n\n  declare interface SinonStubStatic {\n    (): SinonStub;\n    (obj: any): SinonStub;\n    (obj: any, method: string): SinonStub;\n  }\n\n  declare interface SinonExpectation extends SinonStub {\n    atLeast(n: number): SinonExpectation;\n    atMost(n: number): SinonExpectation;\n    never(): SinonExpectation;\n    once(): SinonExpectation;\n    twice(): SinonExpectation;\n    thrice(): SinonExpectation;\n    exactly(n: number): SinonExpectation;\n    withArgs(...args: Array<any>): SinonExpectation;\n    withExactArgs(...args: Array<any>): SinonExpectation;\n    on(obj: any): SinonExpectation;\n    verify(): SinonExpectation;\n    restore(): void;\n  }\n\n  declare interface SinonExpectationStatic {\n    create(methodName?: string): SinonExpectation;\n  }\n\n  declare interface SinonMock {\n    expects(method: string): SinonExpectation;\n    restore(): void;\n    verify(): void;\n  }\n\n  declare interface SinonMockStatic {\n    (obj: any): SinonMock;\n    (): SinonExpectation;\n  }\n\n  declare interface SinonFakeTimers {\n    now: number;\n    create(now: number): SinonFakeTimers;\n    setTimeout(callback: (...args: Array<any>) => void, timeout: number, ...args: Array<any>): number;\n    clearTimeout(id: number): void;\n    setInterval(callback: (...args: Array<any>) => void, timeout: number, ...args: Array<any>): number;\n    clearInterval(id: number): void;\n    tick(ms: number): number;\n    reset(): void;\n    Date(): Date;\n    Date(year: number): Date;\n    Date(year: number, month: number): Date;\n    Date(year: number, month: number, day: number): Date;\n    Date(year: number, month: number, day: number, hour: number): Date;\n    Date(year: number, month: number, day: number, hour: number, minute: number): Date;\n    Date(year: number, month: number, day: number, hour: number, minute: number, second: number): Date;\n    Date(year: number, month: number, day: number, hour: number, minute: number, second: number, ms: number): Date;\n    restore(): void;\n\n    /**\n     * Simulate the user changing the system clock while your program is running. It changes the 'now' timestamp\n     * without affecting timers, intervals or immediates.\n     * @param now The new 'now' in unix milliseconds\n     */\n    setSystemTime(now: number): void;\n\n    /**\n     * Simulate the user changing the system clock while your program is running. It changes the 'now' timestamp\n     * without affecting timers, intervals or immediates.\n     * @param now The new 'now' as a JavaScript Date\n     */\n    setSystemTime(date: Date): void;\n  }\n\n  declare interface SinonFakeTimersStatic {\n    (): SinonFakeTimers;\n    (config: SinonFakeTimersConfig): SinonFakeTimers;\n    (now: number): SinonFakeTimers;\n  }\n\n  declare interface SinonFakeTimersConfig {\n    now: number | Date;\n    toFake: string[];\n    shouldAdvanceTime: boolean;\n\n  }\n\n  declare interface SinonFakeUploadProgress {\n    eventListeners: {|\n      progress: Array<any>;\n      load: Array<any>;\n      abort: Array<any>;\n      error: Array<any>;\n    |};\n\n    addEventListener(event: string, listener: (e: Event) => any): void;\n    removeEventListener(event: string, listener: (e: Event) => any): void;\n    dispatchEvent(event: Event): void;\n  }\n\n  declare interface SinonFakeXMLHttpRequest {\n    onCreate: (xhr: SinonFakeXMLHttpRequest) => void;\n    url: string;\n    method: string;\n    requestHeaders: any;\n    requestBody: string;\n    status: number;\n    statusText: string;\n    async: boolean;\n    username: string;\n    password: string;\n    withCredentials: boolean;\n    upload: SinonFakeUploadProgress;\n    responseXML: Document;\n    getResponseHeader(header: string): string;\n    getAllResponseHeaders(): any;\n    restore(): void;\n    useFilters: boolean;\n    addFilter(filter: (method: string, url: string, async: boolean, username: string, password: string) => boolean): void;\n    setResponseHeaders(headers: any): void;\n    setResponseBody(body: string): void;\n    respond(status: number, headers: any, body: string): void;\n    autoRespond(ms: number): void;\n    error(): void;\n    onerror(): void;\n  }\n\n  declare type SinonFakeXMLHttpRequestStatic = () => SinonFakeXMLHttpRequest;\n\n  declare interface SinonFakeServerConfig {\n    autoRespond?: boolean;\n    autoRespondAfter?: number;\n    respondImmediately?: boolean;\n    fakeHTTPMethods?: boolean;\n  }\n\n  declare interface SinonFakeServer {\n    autoRespond: boolean;\n    autoRespondAfter: number;\n    configure(config: SinonFakeServerConfig): void;\n    fakeHTTPMethods: boolean;\n    getHTTPMethod: (request: SinonFakeXMLHttpRequest) => string;\n    requests: SinonFakeXMLHttpRequest[];\n    respondImmediately: boolean;\n    respondWith(body: string): void;\n    respondWith(response: Array<any>): void;\n    respondWith(fn: (xhr: SinonFakeXMLHttpRequest) => void): void;\n    respondWith(url: string, body: string): void;\n    respondWith(url: string, response: Array<any>): void;\n    respondWith(url: string, fn: (xhr: SinonFakeXMLHttpRequest) => void): void;\n    respondWith(method: string, url: string, body: string): void;\n    respondWith(method: string, url: string, response: Array<any>): void;\n    respondWith(method: string, url: string, fn: (xhr: SinonFakeXMLHttpRequest) => void): void;\n    respondWith(url: RegExp, body: string): void;\n    respondWith(url: RegExp, response: Array<any>): void;\n    respondWith(url: RegExp, fn: (xhr: SinonFakeXMLHttpRequest) => void): void;\n    respondWith(method: string, url: RegExp, body: string): void;\n    respondWith(method: string, url: RegExp, response: Array<any>): void;\n    respondWith(method: string, url: RegExp, fn: (xhr: SinonFakeXMLHttpRequest) => void): void;\n    respond(): void;\n    restore(): void;\n  }\n\n  declare interface SinonFakeServerStatic {\n    create(): SinonFakeServer;\n  }\n\n  declare interface SinonExposeOptions {\n    prefix?: string;\n    includeFail?: boolean;\n  }\n\n  declare interface SinonAssert {\n    failException: string;\n    fail: (message?: string) => void;\n    pass: (assertion: any) => void;\n    notCalled(spy: SinonSpy): void;\n    called(spy: SinonSpy): void;\n    calledOnce(spy: SinonSpy): void;\n    calledTwice(spy: SinonSpy): void;\n    calledThrice(spy: SinonSpy): void;\n    callCount(spy: SinonSpy, count: number): void;\n    callOrder(...spies: SinonSpy[]): void;\n    calledOn(spy: SinonSpy, obj: any): void;\n    alwaysCalledOn(spy: SinonSpy, obj: any): void;\n    calledWith(spy: SinonSpy, ...args: Array<any>): void;\n    alwaysCalledWith(spy: SinonSpy, ...args: Array<any>): void;\n    neverCalledWith(spy: SinonSpy, ...args: Array<any>): void;\n    calledWithExactly(spy: SinonSpy, ...args: Array<any>): void;\n    alwaysCalledWithExactly(spy: SinonSpy, ...args: Array<any>): void;\n    calledWithMatch(spy: SinonSpy, ...args: Array<any>): void;\n    alwaysCalledWithMatch(spy: SinonSpy, ...args: Array<any>): void;\n    neverCalledWithMatch(spy: SinonSpy, ...args: Array<any>): void;\n    threw(spy: SinonSpy): void;\n    threw(spy: SinonSpy, exception: string): void;\n    threw(spy: SinonSpy, exception: any): void;\n    alwaysThrew(spy: SinonSpy): void;\n    alwaysThrew(spy: SinonSpy, exception: string): void;\n    alwaysThrew(spy: SinonSpy, exception: any): void;\n    expose(obj: any, options?: SinonExposeOptions): void;\n  }\n\n  declare interface SinonMatcher {\n    and(expr: SinonMatcher): SinonMatcher;\n    or(expr: SinonMatcher): SinonMatcher;\n  }\n\n  declare interface SinonArrayMatcher extends SinonMatcher {\n    /**\n     * Requires an Array to be deep equal another one.\n     */\n    deepEquals(expected: Array<any>): SinonMatcher;\n    /**\n     * Requires an Array to start with the same values as another one.\n     */\n    startsWith(expected: Array<any>): SinonMatcher;\n    /**\n     * Requires an Array to end with the same values as another one.\n     */\n    endsWith(expected: Array<any>): SinonMatcher;\n    /**\n     * Requires an Array to contain each one of the values the given array has.\n     */\n    contains(expected: Array<any>): SinonMatcher;\n  }\n\n  declare interface SinonMapMatcher extends SinonMatcher {\n    /**\n     * Requires a Map to be deep equal another one.\n     */\n    deepEquals(expected: Map<any, any>): SinonMatcher;\n    /**\n     * Requires a Map to contain each one of the items the given map has.\n     */\n    contains(expected: Map<any, any>): SinonMatcher;\n  }\n\n  declare interface SinonSetMatcher extends SinonMatcher {\n    /**\n     *  Requires a Set to be deep equal another one.\n     */\n    deepEquals(expected: Set<any>): SinonMatcher;\n    /**\n     * Requires a Set to contain each one of the items the given set has.\n     */\n    contains(expected: Set<any>): SinonMatcher;\n  }\n\n  declare interface SinonMatch {\n    (value: number): SinonMatcher;\n    (value: string): SinonMatcher;\n    (expr: RegExp): SinonMatcher;\n    (obj: any): SinonMatcher;\n    (callback: (value: any) => boolean): SinonMatcher;\n    any: SinonMatcher;\n    defined: SinonMatcher;\n    truthy: SinonMatcher;\n    falsy: SinonMatcher;\n    bool: SinonMatcher;\n    number: SinonMatcher;\n    string: SinonMatcher;\n    object: SinonMatcher;\n    func: SinonMatcher;\n    /**\n     * Requires the value to be a Map.\n     */\n    map: SinonMapMatcher;\n    /**\n     * Requires the value to be a Set.\n     */\n    set: SinonSetMatcher;\n    /**\n     * Requires the value to be an Array.\n     */\n    array: SinonArrayMatcher;\n    regexp: SinonMatcher;\n    date: SinonMatcher;\n    symbol: SinonMatcher;\n    same(obj: any): SinonMatcher;\n    typeOf(type: string): SinonMatcher;\n    instanceOf(type: any): SinonMatcher;\n    has(property: string, expect?: any): SinonMatcher;\n    hasOwn(property: string, expect?: any): SinonMatcher;\n  }\n\n  declare interface SinonSandboxConfig {\n    injectInto?: any;\n    properties?: string[];\n    useFakeTimers?: SinonFakeTimersConfig;\n    useFakeServer?: any;\n  }\n\n  declare interface SinonSandbox {\n    assert: SinonAssert;\n    clock: SinonFakeTimers;\n    requests: SinonFakeXMLHttpRequest;\n    server: SinonFakeServer;\n    spy: SinonSpyStatic;\n    stub: SinonStubStatic;\n    mock: SinonMockStatic;\n    useFakeTimers: SinonFakeTimersStatic;\n    useFakeXMLHttpRequest: SinonFakeXMLHttpRequestStatic;\n    useFakeServer(): SinonFakeServer;\n    restore(): void;\n    reset(): void;\n    resetHistory(): void;\n    resetBehavior(): void;\n    usingPromise(promiseLibrary: any): SinonSandbox;\n    verify(): void;\n    verifyAndRestore(): void;\n  }\n\n  declare interface SinonSandboxStatic {\n    create(): SinonSandbox;\n    create(config: SinonSandboxConfig): SinonSandbox;\n  }\n\n  declare interface SinonXMLHttpRequestStatic {\n    XMLHttpRequest: XMLHttpRequest;\n  }\n\n  declare module.exports: {|\n    createFakeServer(config?: SinonFakeServerConfig): SinonFakeServer;\n    createFakeServerWithClock(): SinonFakeServer;\n    createSandbox(config?: SinonSandboxConfig): SinonSandbox;\n    defaultConfig: SinonSandboxConfig;\n    spy: SinonSpyStatic;\n    stub: SinonStubStatic;\n    expectation: SinonExpectationStatic;\n    mock: SinonMockStatic;\n    useFakeTimers: SinonFakeTimersStatic;\n    clock: SinonFakeTimers;\n    useFakeXMLHttpRequest: SinonFakeXMLHttpRequestStatic;\n    FakeXMLHttpRequest: SinonFakeXMLHttpRequest;\n    fakeServer: SinonFakeServerStatic;\n    fakeServerWithClock: SinonFakeServerStatic;\n    assert: SinonAssert;\n    match: SinonMatch;\n    sandbox: SinonSandboxStatic;\n    createStubInstance<T>(constructor: any): any;\n    format(obj: any): string;\n    setFormatter(aCustomFormatter: (obj: any) => string): void;\n    restore(object: any): void;\n    fake: SinonFakeStatic;\n    xhr: SinonXMLHttpRequestStatic;\n    spyCall(spy: any,\n      thisValue: any,\n      args: Array<any>,\n      returnValue: any,\n      exception: any,\n      id: number,\n      errorWithCallStack: any): SinonSpyCall;\n  |};\n}\n"
  },
  {
    "path": "flow-typed/npm/source-map_v0.7.x.js",
    "content": "// flow-typed signature: df79a314b7d0c7ec7dd9f01a8fcd37cf\n// flow-typed version: 4f76a29260/source-map_v0.7.x/flow_>=v0.104.x\n\ndeclare module 'source-map' {\n  declare export type SourceMapUrl = string;\n  declare export type StartOfSourceMap = {|\n    +file?: string,\n    +sourceRoot?: string,\n    +skipValidation?: boolean,\n  |};\n  declare export type RawSourceMap = {|\n    +version: number,\n    +sources: string[],\n    +names: string[],\n    +sourceRoot?: string,\n    +sourcesContent?: string[],\n    +mappings: string,\n    +file: string,\n  |};\n  declare export type RawIndexMap = {|\n    +file?: string,\n    +sourceRoot?: string,\n    +skipValidation?: boolean,\n    +version: number,\n    +sections: RawSection[],\n  |};\n\n  declare export type RawSection = {|\n    +offset: Position,\n    +map: RawSourceMap,\n  |};\n  declare export type Position = {|\n    +line: number,\n    +column: number,\n  |};\n  declare export type NullablePosition = {|\n    +line: number | null,\n    +column: number | null,\n    +lastColumn: number | null,\n  |};\n  declare export type MappedPosition = {|\n    +source: string,\n    +line: number,\n    +column: number,\n    +name?: string,\n  |};\n  declare export type NullableMappedPosition = {|\n    +source: string | null,\n    +line: number | null,\n    +column: number | null,\n    +name: string | null,\n  |};\n  declare export type MappingItem =\n    | {|\n        +source: string,\n        +name: string,\n        +generatedLine: number,\n        +generatedColumn: number,\n        +lastGeneratedColumn?: number,\n        +originalLine: number,\n        +originalColumn: number\n      |}\n    | {|\n        +source: null,\n        +name: null,\n        +generatedLine: number,\n        +generatedColumn: number,\n        +lastGeneratedColumn?: number,\n        +originalLine: null,\n        +originalColumn: null\n      |};\n  declare export type Mapping =\n    | {|\n        +generated: Position,\n        +original: Position,\n        +source: string,\n        +name?: string\n      |}\n    | {|\n        +generated: Position\n      |};\n  declare export type CodeWithSourceMap = {|\n    +code: string,\n    +map: SourceMapGenerator,\n  |};\n  declare export class SourceMapConsumer {\n    static +GENERATED_ORDER: number;\n    static +ORIGINAL_ORDER: number;\n    static +GREATEST_LOWER_BOUND: number;\n    static +LEAST_UPPER_BOUND: number;\n    constructor(\n      rawSourceMap: RawSourceMap,\n      sourceMapUrl?: SourceMapUrl\n    ): Promise<BasicSourceMapConsumer>;\n    constructor(\n      rawSourceMap: RawIndexMap,\n      sourceMapUrl?: SourceMapUrl\n    ): Promise<IndexedSourceMapConsumer>;\n    constructor(\n      rawSourceMap: RawSourceMap | RawIndexMap | string,\n      sourceMapUrl?: SourceMapUrl\n    ): Promise<BasicSourceMapConsumer | IndexedSourceMapConsumer>;\n\n    /**\n     * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n     * @param sourceMap The source map that will be consumed.\n     */\n    static fromSourceMap(\n      sourceMap: SourceMapGenerator,\n      sourceMapUrl?: SourceMapUrl\n    ): Promise<BasicSourceMapConsumer>;\n\n    /**\n     * Construct a new `SourceMapConsumer` from `rawSourceMap` and `sourceMapUrl`\n     * (see the `SourceMapConsumer` constructor for details. Then, invoke the `async\n     *      * function f(SourceMapConsumer) -> T` with the newly constructed consumer, wait\n     * for `f` to complete, call `destroy` on the consumer, and return `f`'s return\n     * value.\n     *\n     * You must not use the consumer after `f` completes!\n     *\n     * By using `with`, you do not have to remember to manually call `destroy` on\n     * the consumer, since it will be called automatically once `f` completes.\n     *\n     * ```js\n     *      * const xSquared = await SourceMapConsumer.with(\n     *      *   myRawSourceMap,\n     *      *   null,\n     *      *   async function (consumer) {\n     *      *     // Use `consumer` inside here and don't worry about remembering\n     *      *     // to call `destroy`.\n     *      *\n     *      *     const x = await whatever(consumer);\n     *      *     return x * x;\n     *      *   }\n     *      * );\n     *      *\n     *      * // You may not use that `consumer` anymore out here; it has\n     *      * // been destroyed. But you can use `xSquared`.\n     *      * console.log(xSquared);\n     *      * ```\n     */\n    static with<T>(\n      rawSourceMap: RawSourceMap | RawIndexMap | string,\n      sourceMapUrl: SourceMapUrl | null | void,\n      callback: (\n        consumer: BasicSourceMapConsumer | IndexedSourceMapConsumer\n      ) => Promise<T> | T\n    ): Promise<T>;\n\n    /**\n     * Compute the last column for each generated mapping. The last column is\n     * inclusive.\n     */\n    computeColumnSpans(): void;\n\n    /**\n     * Returns the original source, line, and column information for the generated\n     * source's line and column positions provided. The only argument is an object\n     * with the following properties:\n     *\n     *    - line: The line number in the generated source.\n     *    - column: The column number in the generated source.\n     *    - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n     *      'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n     *      closest element that is smaller than or greater than the one we are\n     *      searching for, respectively, if the exact element cannot be found.\n     *      Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n     *\n     * and an object is returned with the following properties:\n     *\n     *    - source: The original source file, or null.\n     *    - line: The line number in the original source, or null.\n     *    - column: The column number in the original source, or null.\n     *    - name: The original identifier, or null.\n     */\n    originalPositionFor(\n      generatedPosition: Position & { bias?: number, ... }\n    ): NullableMappedPosition;\n\n    /**\n     * Returns the generated line and column information for the original source,\n     * line, and column positions provided. The only argument is an object with\n     * the following properties:\n     *\n     *    - source: The filename of the original source.\n     *    - line: The line number in the original source.\n     *    - column: The column number in the original source.\n     *    - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n     *      'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n     *      closest element that is smaller than or greater than the one we are\n     *      searching for, respectively, if the exact element cannot be found.\n     *      Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n     *\n     * and an object is returned with the following properties:\n     *\n     *    - line: The line number in the generated source, or null.\n     *    - column: The column number in the generated source, or null.\n     */\n    generatedPositionFor(\n      originalPosition: MappedPosition & { bias?: number, ... }\n    ): NullablePosition;\n\n    /**\n     * Returns all generated line and column information for the original source,\n     * line, and column provided. If no column is provided, returns all mappings\n     * corresponding to a either the line we are searching for or the next\n     * closest line that has any mappings. Otherwise, returns all mappings\n     * corresponding to the given line and either the column we are searching for\n     * or the next closest column that has any offsets.\n     *\n     * The only argument is an object with the following properties:\n     *\n     *    - source: The filename of the original source.\n     *    - line: The line number in the original source.\n     *    - column: Optional. the column number in the original source.\n     *\n     * and an array of objects is returned, each with the following properties:\n     *\n     *    - line: The line number in the generated source, or null.\n     *    - column: The column number in the generated source, or null.\n     */\n    allGeneratedPositionsFor(\n      originalPosition: MappedPosition\n    ): NullablePosition[];\n\n    /**\n     * Return true if we have the source content for every source in the source\n     * map, false otherwise.\n     */\n    hasContentsOfAllSources(): boolean;\n\n    /**\n     * Returns the original source content. The only argument is the url of the\n     * original source file. Returns null if no original source content is\n     * available.\n     */\n    sourceContentFor(\n      source: string,\n      returnNullOnMissing?: boolean\n    ): string | null;\n\n    /**\n     * Iterate over each mapping between an original source/line/column and a\n     * generated line/column in this source map.\n     * @param callback The function that is called with each mapping.\n     * @param context Optional. If specified, this object will be the value of `this` every\n     * time that `aCallback` is called.\n     * @param order Either `SourceMapConsumer.GENERATED_ORDER` or\n     * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n     * iterate over the mappings sorted by the generated file's line/column\n     * order or the original's source/line/column order, respectively. Defaults to\n     * `SourceMapConsumer.GENERATED_ORDER`.\n     */\n    eachMapping(\n      callback: (mapping: MappingItem) => void,\n      context?: any,\n      order?: number\n    ): void;\n\n    /**\n     * Free this source map consumer's associated wasm data that is manually-managed.\n     * Alternatively, you can use SourceMapConsumer.with to avoid needing to remember to call destroy.\n     */\n    destroy(): void;\n  }\n\n  declare export class BasicSourceMapConsumer mixins SourceMapConsumer {\n    +file: string;\n    +sourceRoot: string;\n    +sources: string[];\n    +sourcesContent: string[];\n\n    constructor(\n      rawSourceMap: RawSourceMap | string\n    ): Promise<BasicSourceMapConsumer>;\n\n    /**\n     * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n     * @param sourceMap The source map that will be consumed.\n     */\n    static fromSourceMap(\n      sourceMap: SourceMapGenerator\n    ): Promise<BasicSourceMapConsumer>;\n  }\n  declare export class IndexedSourceMapConsumer mixins SourceMapConsumer {\n    +sources: string[];\n    constructor(\n      rawSourceMap: RawIndexMap | string\n    ): Promise<IndexedSourceMapConsumer>;\n  }\n  declare export class SourceMapGenerator {\n    constructor(startOfSourceMap?: StartOfSourceMap): this;\n\n    /**\n     * Creates a new SourceMapGenerator based on a SourceMapConsumer\n     * @param sourceMapConsumer The SourceMap.\n     */\n    static fromSourceMap(\n      sourceMapConsumer: SourceMapConsumer\n    ): SourceMapGenerator;\n\n    /**\n     * Add a single mapping from original source line and column to the generated\n     * source's line and column for this source map being created. The mapping\n     * object should have the following properties:\n     *\n     *    - generated: An object with the generated line and column positions.\n     *    - original: An object with the original line and column positions.\n     *    - source: The original source file (relative to the sourceRoot).\n     *    - name: An optional original token name for this mapping.\n     */\n    addMapping(mapping: Mapping): void;\n\n    /**\n     * Set the source content for a source file.\n     */\n    setSourceContent(sourceFile: string, sourceContent: string): void;\n\n    /**\n     * Applies the mappings of a sub-source-map for a specific source file to the\n     * source map being generated. Each mapping to the supplied source file is\n     * rewritten using the supplied source map. Note: The resolution for the\n     * resulting mappings is the minimium of this map and the supplied map.\n     * @param sourceMapConsumer The source map to be applied.\n     * @param sourceFile Optional. The filename of the source file.\n     * If omitted, SourceMapConsumer's file property will be used.\n     * @param sourceMapPath Optional. The dirname of the path to the source map\n     * to be applied. If relative, it is relative to the SourceMapConsumer.\n     * This parameter is needed when the two source maps aren't in the same\n     * directory, and the source map to be applied contains relative source\n     * paths. If so, those relative source paths need to be rewritten\n     * relative to the SourceMapGenerator.\n     */\n    applySourceMap(\n      sourceMapConsumer: SourceMapConsumer,\n      sourceFile?: string,\n      sourceMapPath?: string\n    ): void;\n    toString(): string;\n    toJSON(): RawSourceMap;\n  }\n  declare export class SourceNode {\n    +children: SourceNode[];\n    +sourceContents: any;\n    +line: number;\n    +column: number;\n    +source: string;\n    +name: string;\n\n    constructor(): this;\n    constructor(\n      line: number | null,\n      column: number | null,\n      source: string | null,\n      chunks?: Array<string | SourceNode> | SourceNode | string,\n      name?: string\n    ): this;\n\n    static fromStringWithSourceMap(\n      code: string,\n      sourceMapConsumer: SourceMapConsumer,\n      relativePath?: string\n    ): SourceNode;\n    add(chunk: Array<string | SourceNode> | SourceNode | string): SourceNode;\n    prepend(\n      chunk: Array<string | SourceNode> | SourceNode | string\n    ): SourceNode;\n    setSourceContent(sourceFile: string, sourceContent: string): void;\n    walk(fn: (chunk: string, mapping: MappedPosition) => void): void;\n    walkSourceContents(fn: (file: string, content: string) => void): void;\n    join(sep: string): SourceNode;\n    replaceRight(pattern: RegExp | string, replacement: string): SourceNode;\n    toString(): string;\n    toStringWithSourceMap(\n      startOfSourceMap?: StartOfSourceMap\n    ): CodeWithSourceMap;\n  }\n}\n"
  },
  {
    "path": "flow-typed/npm/tempy_v0.x.x.js",
    "content": "// flow-typed signature: 4c5b8e467850f482876c1b4ee92e2cba\n// flow-typed version: c6154227d1/tempy_v0.x.x/flow_>=v0.104.x\n\ntype $npm$tempy$Options = {\n  extension?: string,\n  name?: string,\n  ...\n};\n\ndeclare module \"tempy\" {\n  declare module.exports: {\n    directory: () => string,\n    file: (options?: $npm$tempy$Options) => string,\n    root: string,\n    ...\n  };\n}\n"
  },
  {
    "path": "flow-typed/npm/typescript_v3.3.x.js",
    "content": "// flow-typed signature: 1cfd67767aab1e3b8debc8321518b5a0\n// flow-typed version: 3069537731/typescript_v3.3.x/flow_>=v0.104.x\n\ndeclare module \"typescript\" {\n  declare var versionMajorMinor: \"3.3\"; // \"3.3\";\n  declare var version: string;\n  declare type MapLike<T> = { [index: string]: T, ... };\n\n  declare class SortedReadonlyArray<T> extends $ReadOnlyArray<T> {\n    __sortedArrayBrand: any\n  }\n\n  declare class SortedArray<T> extends Array<T> {\n    __sortedArrayBrand: any\n  }\n\n  declare class ReadonlyMap<T> {\n    get(key: string): T | void,\n    has(key: string): boolean,\n    forEach(action: (value: T, key: string) => void): void,\n    +size: number,\n    keys(): Iterator<string>,\n    values(): Iterator<T>,\n    entries(): Iterator<[string, T]>\n  }\n\n  declare class Map<T> extends ReadonlyMap<T> {\n    set(key: string, value: T): this,\n    delete(key: string): boolean,\n    clear(): void\n  }\n\n  declare type Iterator<T> = { next():\n    | {\n    value: T,\n    done: false,\n    ...\n  }\n    | {\n    value: empty,\n    done: true,\n    ...\n  }, ... };\n\n  declare type Push<T> = { push(...values: T[]): void, ... };\n\n  declare type Path = string & { __pathBrand: any, ... };\n  declare type TextRange = {\n    pos: number,\n    end: number,\n    ...\n  };\n\n  declare type JsDocSyntaxKind =\n    | typeof SyntaxKind.EndOfFileToken\n    | typeof SyntaxKind.WhitespaceTrivia\n    | typeof SyntaxKind.AtToken\n    | typeof SyntaxKind.NewLineTrivia\n    | typeof SyntaxKind.AsteriskToken\n    | typeof SyntaxKind.OpenBraceToken\n    | typeof SyntaxKind.CloseBraceToken\n    | typeof SyntaxKind.LessThanToken\n    | typeof SyntaxKind.OpenBracketToken\n    | typeof SyntaxKind.CloseBracketToken\n    | typeof SyntaxKind.EqualsToken\n    | typeof SyntaxKind.CommaToken\n    | typeof SyntaxKind.DotToken\n    | typeof SyntaxKind.Identifier\n    | typeof SyntaxKind.NoSubstitutionTemplateLiteral\n    | typeof SyntaxKind.Unknown\n    | KeywordSyntaxKind;\n  declare type KeywordSyntaxKind =\n    | typeof SyntaxKind.AbstractKeyword\n    | typeof SyntaxKind.AnyKeyword\n    | typeof SyntaxKind.AsKeyword\n    | typeof SyntaxKind.BigIntKeyword\n    | typeof SyntaxKind.BooleanKeyword\n    | typeof SyntaxKind.BreakKeyword\n    | typeof SyntaxKind.CaseKeyword\n    | typeof SyntaxKind.CatchKeyword\n    | typeof SyntaxKind.ClassKeyword\n    | typeof SyntaxKind.ContinueKeyword\n    | typeof SyntaxKind.ConstKeyword\n    | typeof SyntaxKind.ConstructorKeyword\n    | typeof SyntaxKind.DebuggerKeyword\n    | typeof SyntaxKind.DeclareKeyword\n    | typeof SyntaxKind.DefaultKeyword\n    | typeof SyntaxKind.DeleteKeyword\n    | typeof SyntaxKind.DoKeyword\n    | typeof SyntaxKind.ElseKeyword\n    | typeof SyntaxKind.EnumKeyword\n    | typeof SyntaxKind.ExportKeyword\n    | typeof SyntaxKind.ExtendsKeyword\n    | typeof SyntaxKind.FalseKeyword\n    | typeof SyntaxKind.FinallyKeyword\n    | typeof SyntaxKind.ForKeyword\n    | typeof SyntaxKind.FromKeyword\n    | typeof SyntaxKind.FunctionKeyword\n    | typeof SyntaxKind.GetKeyword\n    | typeof SyntaxKind.IfKeyword\n    | typeof SyntaxKind.ImplementsKeyword\n    | typeof SyntaxKind.ImportKeyword\n    | typeof SyntaxKind.InKeyword\n    | typeof SyntaxKind.InferKeyword\n    | typeof SyntaxKind.InstanceOfKeyword\n    | typeof SyntaxKind.InterfaceKeyword\n    | typeof SyntaxKind.IsKeyword\n    | typeof SyntaxKind.KeyOfKeyword\n    | typeof SyntaxKind.LetKeyword\n    | typeof SyntaxKind.ModuleKeyword\n    | typeof SyntaxKind.NamespaceKeyword\n    | typeof SyntaxKind.NeverKeyword\n    | typeof SyntaxKind.NewKeyword\n    | typeof SyntaxKind.NullKeyword\n    | typeof SyntaxKind.NumberKeyword\n    | typeof SyntaxKind.ObjectKeyword\n    | typeof SyntaxKind.PackageKeyword\n    | typeof SyntaxKind.PrivateKeyword\n    | typeof SyntaxKind.ProtectedKeyword\n    | typeof SyntaxKind.PublicKeyword\n    | typeof SyntaxKind.ReadonlyKeyword\n    | typeof SyntaxKind.RequireKeyword\n    | typeof SyntaxKind.GlobalKeyword\n    | typeof SyntaxKind.ReturnKeyword\n    | typeof SyntaxKind.SetKeyword\n    | typeof SyntaxKind.StaticKeyword\n    | typeof SyntaxKind.StringKeyword\n    | typeof SyntaxKind.SuperKeyword\n    | typeof SyntaxKind.SwitchKeyword\n    | typeof SyntaxKind.SymbolKeyword\n    | typeof SyntaxKind.ThisKeyword\n    | typeof SyntaxKind.ThrowKeyword\n    | typeof SyntaxKind.TrueKeyword\n    | typeof SyntaxKind.TryKeyword\n    | typeof SyntaxKind.TypeKeyword\n    | typeof SyntaxKind.TypeOfKeyword\n    | typeof SyntaxKind.UndefinedKeyword\n    | typeof SyntaxKind.UniqueKeyword\n    | typeof SyntaxKind.UnknownKeyword\n    | typeof SyntaxKind.VarKeyword\n    | typeof SyntaxKind.VoidKeyword\n    | typeof SyntaxKind.WhileKeyword\n    | typeof SyntaxKind.WithKeyword\n    | typeof SyntaxKind.YieldKeyword\n    | typeof SyntaxKind.AsyncKeyword\n    | typeof SyntaxKind.AwaitKeyword\n    | typeof SyntaxKind.OfKeyword;\n  declare type JsxTokenSyntaxKind =\n    | typeof SyntaxKind.LessThanSlashToken\n    | typeof SyntaxKind.EndOfFileToken\n    | typeof SyntaxKind.ConflictMarkerTrivia\n    | typeof SyntaxKind.JsxText\n    | typeof SyntaxKind.JsxTextAllWhiteSpaces\n    | typeof SyntaxKind.OpenBraceToken\n    | typeof SyntaxKind.LessThanToken;\n\n  declare var SyntaxKind: {\n    // 0\n    +Unknown: 0,\n    // 1\n    +EndOfFileToken: 1,\n    // 2\n    +SingleLineCommentTrivia: 2,\n    // 3\n    +MultiLineCommentTrivia: 3,\n    // 4\n    +NewLineTrivia: 4,\n    // 5\n    +WhitespaceTrivia: 5,\n    // 6\n    +ShebangTrivia: 6,\n    // 7\n    +ConflictMarkerTrivia: 7,\n    // 8\n    +NumericLiteral: 8,\n    // 9\n    +BigIntLiteral: 9,\n    // 10\n    +StringLiteral: 10,\n    // 11\n    +JsxText: 11,\n    // 12\n    +JsxTextAllWhiteSpaces: 12,\n    // 13\n    +RegularExpressionLiteral: 13,\n    // 14\n    +NoSubstitutionTemplateLiteral: 14,\n    // 15\n    +TemplateHead: 15,\n    // 16\n    +TemplateMiddle: 16,\n    // 17\n    +TemplateTail: 17,\n    // 18\n    +OpenBraceToken: 18,\n    // 19\n    +CloseBraceToken: 19,\n    // 20\n    +OpenParenToken: 20,\n    // 21\n    +CloseParenToken: 21,\n    // 22\n    +OpenBracketToken: 22,\n    // 23\n    +CloseBracketToken: 23,\n    // 24\n    +DotToken: 24,\n    // 25\n    +DotDotDotToken: 25,\n    // 26\n    +SemicolonToken: 26,\n    // 27\n    +CommaToken: 27,\n    // 28\n    +LessThanToken: 28,\n    // 29\n    +LessThanSlashToken: 29,\n    // 30\n    +GreaterThanToken: 30,\n    // 31\n    +LessThanEqualsToken: 31,\n    // 32\n    +GreaterThanEqualsToken: 32,\n    // 33\n    +EqualsEqualsToken: 33,\n    // 34\n    +ExclamationEqualsToken: 34,\n    // 35\n    +EqualsEqualsEqualsToken: 35,\n    // 36\n    +ExclamationEqualsEqualsToken: 36,\n    // 37\n    +EqualsGreaterThanToken: 37,\n    // 38\n    +PlusToken: 38,\n    // 39\n    +MinusToken: 39,\n    // 40\n    +AsteriskToken: 40,\n    // 41\n    +AsteriskAsteriskToken: 41,\n    // 42\n    +SlashToken: 42,\n    // 43\n    +PercentToken: 43,\n    // 44\n    +PlusPlusToken: 44,\n    // 45\n    +MinusMinusToken: 45,\n    // 46\n    +LessThanLessThanToken: 46,\n    // 47\n    +GreaterThanGreaterThanToken: 47,\n    // 48\n    +GreaterThanGreaterThanGreaterThanToken: 48,\n    // 49\n    +AmpersandToken: 49,\n    // 50\n    +BarToken: 50,\n    // 51\n    +CaretToken: 51,\n    // 52\n    +ExclamationToken: 52,\n    // 53\n    +TildeToken: 53,\n    // 54\n    +AmpersandAmpersandToken: 54,\n    // 55\n    +BarBarToken: 55,\n    // 56\n    +QuestionToken: 56,\n    // 57\n    +ColonToken: 57,\n    // 58\n    +AtToken: 58,\n    // 59\n    +EqualsToken: 59,\n    // 60\n    +PlusEqualsToken: 60,\n    // 61\n    +MinusEqualsToken: 61,\n    // 62\n    +AsteriskEqualsToken: 62,\n    // 63\n    +AsteriskAsteriskEqualsToken: 63,\n    // 64\n    +SlashEqualsToken: 64,\n    // 65\n    +PercentEqualsToken: 65,\n    // 66\n    +LessThanLessThanEqualsToken: 66,\n    // 67\n    +GreaterThanGreaterThanEqualsToken: 67,\n    // 68\n    +GreaterThanGreaterThanGreaterThanEqualsToken: 68,\n    // 69\n    +AmpersandEqualsToken: 69,\n    // 70\n    +BarEqualsToken: 70,\n    // 71\n    +CaretEqualsToken: 71,\n    // 72\n    +Identifier: 72,\n    // 73\n    +BreakKeyword: 73,\n    // 74\n    +CaseKeyword: 74,\n    // 75\n    +CatchKeyword: 75,\n    // 76\n    +ClassKeyword: 76,\n    // 77\n    +ConstKeyword: 77,\n    // 78\n    +ContinueKeyword: 78,\n    // 79\n    +DebuggerKeyword: 79,\n    // 80\n    +DefaultKeyword: 80,\n    // 81\n    +DeleteKeyword: 81,\n    // 82\n    +DoKeyword: 82,\n    // 83\n    +ElseKeyword: 83,\n    // 84\n    +EnumKeyword: 84,\n    // 85\n    +ExportKeyword: 85,\n    // 86\n    +ExtendsKeyword: 86,\n    // 87\n    +FalseKeyword: 87,\n    // 88\n    +FinallyKeyword: 88,\n    // 89\n    +ForKeyword: 89,\n    // 90\n    +FunctionKeyword: 90,\n    // 91\n    +IfKeyword: 91,\n    // 92\n    +ImportKeyword: 92,\n    // 93\n    +InKeyword: 93,\n    // 94\n    +InstanceOfKeyword: 94,\n    // 95\n    +NewKeyword: 95,\n    // 96\n    +NullKeyword: 96,\n    // 97\n    +ReturnKeyword: 97,\n    // 98\n    +SuperKeyword: 98,\n    // 99\n    +SwitchKeyword: 99,\n    // 100\n    +ThisKeyword: 100,\n    // 101\n    +ThrowKeyword: 101,\n    // 102\n    +TrueKeyword: 102,\n    // 103\n    +TryKeyword: 103,\n    // 104\n    +TypeOfKeyword: 104,\n    // 105\n    +VarKeyword: 105,\n    // 106\n    +VoidKeyword: 106,\n    // 107\n    +WhileKeyword: 107,\n    // 108\n    +WithKeyword: 108,\n    // 109\n    +ImplementsKeyword: 109,\n    // 110\n    +InterfaceKeyword: 110,\n    // 111\n    +LetKeyword: 111,\n    // 112\n    +PackageKeyword: 112,\n    // 113\n    +PrivateKeyword: 113,\n    // 114\n    +ProtectedKeyword: 114,\n    // 115\n    +PublicKeyword: 115,\n    // 116\n    +StaticKeyword: 116,\n    // 117\n    +YieldKeyword: 117,\n    // 118\n    +AbstractKeyword: 118,\n    // 119\n    +AsKeyword: 119,\n    // 120\n    +AnyKeyword: 120,\n    // 121\n    +AsyncKeyword: 121,\n    // 122\n    +AwaitKeyword: 122,\n    // 123\n    +BooleanKeyword: 123,\n    // 124\n    +ConstructorKeyword: 124,\n    // 125\n    +DeclareKeyword: 125,\n    // 126\n    +GetKeyword: 126,\n    // 127\n    +InferKeyword: 127,\n    // 128\n    +IsKeyword: 128,\n    // 129\n    +KeyOfKeyword: 129,\n    // 130\n    +ModuleKeyword: 130,\n    // 131\n    +NamespaceKeyword: 131,\n    // 132\n    +NeverKeyword: 132,\n    // 133\n    +ReadonlyKeyword: 133,\n    // 134\n    +RequireKeyword: 134,\n    // 135\n    +NumberKeyword: 135,\n    // 136\n    +ObjectKeyword: 136,\n    // 137\n    +SetKeyword: 137,\n    // 138\n    +StringKeyword: 138,\n    // 139\n    +SymbolKeyword: 139,\n    // 140\n    +TypeKeyword: 140,\n    // 141\n    +UndefinedKeyword: 141,\n    // 142\n    +UniqueKeyword: 142,\n    // 143\n    +UnknownKeyword: 143,\n    // 144\n    +FromKeyword: 144,\n    // 145\n    +GlobalKeyword: 145,\n    // 146\n    +BigIntKeyword: 146,\n    // 147\n    +OfKeyword: 147,\n    // 148\n    +QualifiedName: 148,\n    // 149\n    +ComputedPropertyName: 149,\n    // 150\n    +TypeParameter: 150,\n    // 151\n    +Parameter: 151,\n    // 152\n    +Decorator: 152,\n    // 153\n    +PropertySignature: 153,\n    // 154\n    +PropertyDeclaration: 154,\n    // 155\n    +MethodSignature: 155,\n    // 156\n    +MethodDeclaration: 156,\n    // 157\n    +Constructor: 157,\n    // 158\n    +GetAccessor: 158,\n    // 159\n    +SetAccessor: 159,\n    // 160\n    +CallSignature: 160,\n    // 161\n    +ConstructSignature: 161,\n    // 162\n    +IndexSignature: 162,\n    // 163\n    +TypePredicate: 163,\n    // 164\n    +TypeReference: 164,\n    // 165\n    +FunctionType: 165,\n    // 166\n    +ConstructorType: 166,\n    // 167\n    +TypeQuery: 167,\n    // 168\n    +TypeLiteral: 168,\n    // 169\n    +ArrayType: 169,\n    // 170\n    +TupleType: 170,\n    // 171\n    +OptionalType: 171,\n    // 172\n    +RestType: 172,\n    // 173\n    +UnionType: 173,\n    // 174\n    +IntersectionType: 174,\n    // 175\n    +ConditionalType: 175,\n    // 176\n    +InferType: 176,\n    // 177\n    +ParenthesizedType: 177,\n    // 178\n    +ThisType: 178,\n    // 179\n    +TypeOperator: 179,\n    // 180\n    +IndexedAccessType: 180,\n    // 181\n    +MappedType: 181,\n    // 182\n    +LiteralType: 182,\n    // 183\n    +ImportType: 183,\n    // 184\n    +ObjectBindingPattern: 184,\n    // 185\n    +ArrayBindingPattern: 185,\n    // 186\n    +BindingElement: 186,\n    // 187\n    +ArrayLiteralExpression: 187,\n    // 188\n    +ObjectLiteralExpression: 188,\n    // 189\n    +PropertyAccessExpression: 189,\n    // 190\n    +ElementAccessExpression: 190,\n    // 191\n    +CallExpression: 191,\n    // 192\n    +NewExpression: 192,\n    // 193\n    +TaggedTemplateExpression: 193,\n    // 194\n    +TypeAssertionExpression: 194,\n    // 195\n    +ParenthesizedExpression: 195,\n    // 196\n    +FunctionExpression: 196,\n    // 197\n    +ArrowFunction: 197,\n    // 198\n    +DeleteExpression: 198,\n    // 199\n    +TypeOfExpression: 199,\n    // 200\n    +VoidExpression: 200,\n    // 201\n    +AwaitExpression: 201,\n    // 202\n    +PrefixUnaryExpression: 202,\n    // 203\n    +PostfixUnaryExpression: 203,\n    // 204\n    +BinaryExpression: 204,\n    // 205\n    +ConditionalExpression: 205,\n    // 206\n    +TemplateExpression: 206,\n    // 207\n    +YieldExpression: 207,\n    // 208\n    +SpreadElement: 208,\n    // 209\n    +ClassExpression: 209,\n    // 210\n    +OmittedExpression: 210,\n    // 211\n    +ExpressionWithTypeArguments: 211,\n    // 212\n    +AsExpression: 212,\n    // 213\n    +NonNullExpression: 213,\n    // 214\n    +MetaProperty: 214,\n    // 215\n    +SyntheticExpression: 215,\n    // 216\n    +TemplateSpan: 216,\n    // 217\n    +SemicolonClassElement: 217,\n    // 218\n    +Block: 218,\n    // 219\n    +VariableStatement: 219,\n    // 220\n    +EmptyStatement: 220,\n    // 221\n    +ExpressionStatement: 221,\n    // 222\n    +IfStatement: 222,\n    // 223\n    +DoStatement: 223,\n    // 224\n    +WhileStatement: 224,\n    // 225\n    +ForStatement: 225,\n    // 226\n    +ForInStatement: 226,\n    // 227\n    +ForOfStatement: 227,\n    // 228\n    +ContinueStatement: 228,\n    // 229\n    +BreakStatement: 229,\n    // 230\n    +ReturnStatement: 230,\n    // 231\n    +WithStatement: 231,\n    // 232\n    +SwitchStatement: 232,\n    // 233\n    +LabeledStatement: 233,\n    // 234\n    +ThrowStatement: 234,\n    // 235\n    +TryStatement: 235,\n    // 236\n    +DebuggerStatement: 236,\n    // 237\n    +VariableDeclaration: 237,\n    // 238\n    +VariableDeclarationList: 238,\n    // 239\n    +FunctionDeclaration: 239,\n    // 240\n    +ClassDeclaration: 240,\n    // 241\n    +InterfaceDeclaration: 241,\n    // 242\n    +TypeAliasDeclaration: 242,\n    // 243\n    +EnumDeclaration: 243,\n    // 244\n    +ModuleDeclaration: 244,\n    // 245\n    +ModuleBlock: 245,\n    // 246\n    +CaseBlock: 246,\n    // 247\n    +NamespaceExportDeclaration: 247,\n    // 248\n    +ImportEqualsDeclaration: 248,\n    // 249\n    +ImportDeclaration: 249,\n    // 250\n    +ImportClause: 250,\n    // 251\n    +NamespaceImport: 251,\n    // 252\n    +NamedImports: 252,\n    // 253\n    +ImportSpecifier: 253,\n    // 254\n    +ExportAssignment: 254,\n    // 255\n    +ExportDeclaration: 255,\n    // 256\n    +NamedExports: 256,\n    // 257\n    +ExportSpecifier: 257,\n    // 258\n    +MissingDeclaration: 258,\n    // 259\n    +ExternalModuleReference: 259,\n    // 260\n    +JsxElement: 260,\n    // 261\n    +JsxSelfClosingElement: 261,\n    // 262\n    +JsxOpeningElement: 262,\n    // 263\n    +JsxClosingElement: 263,\n    // 264\n    +JsxFragment: 264,\n    // 265\n    +JsxOpeningFragment: 265,\n    // 266\n    +JsxClosingFragment: 266,\n    // 267\n    +JsxAttribute: 267,\n    // 268\n    +JsxAttributes: 268,\n    // 269\n    +JsxSpreadAttribute: 269,\n    // 270\n    +JsxExpression: 270,\n    // 271\n    +CaseClause: 271,\n    // 272\n    +DefaultClause: 272,\n    // 273\n    +HeritageClause: 273,\n    // 274\n    +CatchClause: 274,\n    // 275\n    +PropertyAssignment: 275,\n    // 276\n    +ShorthandPropertyAssignment: 276,\n    // 277\n    +SpreadAssignment: 277,\n    // 278\n    +EnumMember: 278,\n    // 279\n    +SourceFile: 279,\n    // 280\n    +Bundle: 280,\n    // 281\n    +UnparsedSource: 281,\n    // 282\n    +InputFiles: 282,\n    // 283\n    +JSDocTypeExpression: 283,\n    // 284\n    +JSDocAllType: 284,\n    // 285\n    +JSDocUnknownType: 285,\n    // 286\n    +JSDocNullableType: 286,\n    // 287\n    +JSDocNonNullableType: 287,\n    // 288\n    +JSDocOptionalType: 288,\n    // 289\n    +JSDocFunctionType: 289,\n    // 290\n    +JSDocVariadicType: 290,\n    // 291\n    +JSDocComment: 291,\n    // 292\n    +JSDocTypeLiteral: 292,\n    // 293\n    +JSDocSignature: 293,\n    // 294\n    +JSDocTag: 294,\n    // 295\n    +JSDocAugmentsTag: 295,\n    // 296\n    +JSDocClassTag: 296,\n    // 297\n    +JSDocCallbackTag: 297,\n    // 298\n    +JSDocEnumTag: 298,\n    // 299\n    +JSDocParameterTag: 299,\n    // 300\n    +JSDocReturnTag: 300,\n    // 301\n    +JSDocThisTag: 301,\n    // 302\n    +JSDocTypeTag: 302,\n    // 303\n    +JSDocTemplateTag: 303,\n    // 304\n    +JSDocTypedefTag: 304,\n    // 305\n    +JSDocPropertyTag: 305,\n    // 306\n    +SyntaxList: 306,\n    // 307\n    +NotEmittedStatement: 307,\n    // 308\n    +PartiallyEmittedExpression: 308,\n    // 309\n    +CommaListExpression: 309,\n    // 310\n    +MergeDeclarationMarker: 310,\n    // 311\n    +EndOfDeclarationMarker: 311,\n    // 312\n    +Count: 312,\n    // 59\n    +FirstAssignment: 59,\n    // 71\n    +LastAssignment: 71,\n    // 60\n    +FirstCompoundAssignment: 60,\n    // 71\n    +LastCompoundAssignment: 71,\n    // 73\n    +FirstReservedWord: 73,\n    // 108\n    +LastReservedWord: 108,\n    // 73\n    +FirstKeyword: 73,\n    // 147\n    +LastKeyword: 147,\n    // 109\n    +FirstFutureReservedWord: 109,\n    // 117\n    +LastFutureReservedWord: 117,\n    // 163\n    +FirstTypeNode: 163,\n    // 183\n    +LastTypeNode: 183,\n    // 18\n    +FirstPunctuation: 18,\n    // 71\n    +LastPunctuation: 71,\n    // 0\n    +FirstToken: 0,\n    // 147\n    +LastToken: 147,\n    // 2\n    +FirstTriviaToken: 2,\n    // 7\n    +LastTriviaToken: 7,\n    // 8\n    +FirstLiteralToken: 8,\n    // 14\n    +LastLiteralToken: 14,\n    // 14\n    +FirstTemplateToken: 14,\n    // 17\n    +LastTemplateToken: 17,\n    // 28\n    +FirstBinaryOperator: 28,\n    // 71\n    +LastBinaryOperator: 71,\n    // 148\n    +FirstNode: 148,\n    // 283\n    +FirstJSDocNode: 283,\n    // 305\n    +LastJSDocNode: 305,\n    // 294\n    +FirstJSDocTagNode: 294,\n    // 305\n    +LastJSDocTagNode: 305,\n    ...\n  };\n\n  declare var NodeFlags: {\n    // 0\n    +None: 0,\n    // 1\n    +Let: 1,\n    // 2\n    +Const: 2,\n    // 4\n    +NestedNamespace: 4,\n    // 8\n    +Synthesized: 8,\n    // 16\n    +Namespace: 16,\n    // 32\n    +ExportContext: 32,\n    // 64\n    +ContainsThis: 64,\n    // 128\n    +HasImplicitReturn: 128,\n    // 256\n    +HasExplicitReturn: 256,\n    // 512\n    +GlobalAugmentation: 512,\n    // 1024\n    +HasAsyncFunctions: 1024,\n    // 2048\n    +DisallowInContext: 2048,\n    // 4096\n    +YieldContext: 4096,\n    // 8192\n    +DecoratorContext: 8192,\n    // 16384\n    +AwaitContext: 16384,\n    // 32768\n    +ThisNodeHasError: 32768,\n    // 65536\n    +JavaScriptFile: 65536,\n    // 131072\n    +ThisNodeOrAnySubNodesHasError: 131072,\n    // 262144\n    +HasAggregatedChildData: 262144,\n    // 2097152\n    +JSDoc: 2097152,\n    // 16777216\n    +JsonFile: 16777216,\n    // 3\n    +BlockScoped: 3,\n    // 384\n    +ReachabilityCheckFlags: 384,\n    // 1408\n    +ReachabilityAndEmitFlags: 1408,\n    // 12679168\n    +ContextFlags: 12679168,\n    // 20480\n    +TypeExcludesFlags: 20480,\n    ...\n  };\n\n  declare var ModifierFlags: {\n    // 0\n    +None: 0,\n    // 1\n    +Export: 1,\n    // 2\n    +Ambient: 2,\n    // 4\n    +Public: 4,\n    // 8\n    +Private: 8,\n    // 16\n    +Protected: 16,\n    // 32\n    +Static: 32,\n    // 64\n    +Readonly: 64,\n    // 128\n    +Abstract: 128,\n    // 256\n    +Async: 256,\n    // 512\n    +Default: 512,\n    // 2048\n    +Const: 2048,\n    // 536870912\n    +HasComputedFlags: 536870912,\n    // 28\n    +AccessibilityModifier: 28,\n    // 92\n    +ParameterPropertyModifier: 92,\n    // 24\n    +NonPublicAccessibilityModifier: 24,\n    // 2270\n    +TypeScriptModifier: 2270,\n    // 513\n    +ExportDefault: 513,\n    // 3071\n    +All: 3071,\n    ...\n  };\n\n  declare var JsxFlags: {\n    // 0\n    +None: 0,\n    // 1\n    +IntrinsicNamedElement: 1,\n    // 2\n    +IntrinsicIndexedElement: 2,\n    // 3\n    +IntrinsicElement: 3,\n    ...\n  };\n\n  declare type Node = {\n    ...$Exact<TextRange>,\n    kind: $Values<typeof SyntaxKind>,\n    flags: $Values<typeof NodeFlags>,\n    decorators?: NodeArray<Decorator>,\n    modifiers?: ModifiersArray,\n    parent: any,\n    getSourceFile(): SourceFile,\n    getChildCount(sourceFile?: SourceFile): number,\n    getChildAt(index: number, sourceFile?: SourceFile): Node,\n    getChildren(sourceFile?: SourceFile): Node[],\n    getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number,\n    getFullStart(): number,\n    getEnd(): number,\n    getWidth(sourceFile?: SourceFileLike): number,\n    getFullWidth(): number,\n    getLeadingTriviaWidth(sourceFile?: SourceFile): number,\n    getFullText(sourceFile?: SourceFile): string,\n    getText(sourceFile?: SourceFile): string,\n    getFirstToken(sourceFile?: SourceFile): Node | void,\n    getLastToken(sourceFile?: SourceFile): Node | void,\n    forEachChild<T>(\n      cbNode: (node: Node) => T | void,\n      cbNodeArray?: (nodes: NodeArray<Node>) => T | void\n    ): T | void,\n    ...\n  };\n\n  declare type JSDocContainer = {...};\n\n  declare type HasJSDoc =\n    | ParameterDeclaration\n    | CallSignatureDeclaration\n    | ConstructSignatureDeclaration\n    | MethodSignature\n    | PropertySignature\n    | ArrowFunction\n    | ParenthesizedExpression\n    | SpreadAssignment\n    | ShorthandPropertyAssignment\n    | PropertyAssignment\n    | FunctionExpression\n    | LabeledStatement\n    | ExpressionStatement\n    | VariableStatement\n    | FunctionDeclaration\n    | ConstructorDeclaration\n    | MethodDeclaration\n    | PropertyDeclaration\n    | AccessorDeclaration\n    | ClassLikeDeclaration\n    | InterfaceDeclaration\n    | TypeAliasDeclaration\n    | EnumMember\n    | EnumDeclaration\n    | ModuleDeclaration\n    | ImportEqualsDeclaration\n    | IndexSignatureDeclaration\n    | FunctionTypeNode\n    | ConstructorTypeNode\n    | JSDocFunctionType\n    | ExportDeclaration\n    | EndOfFileToken;\n  declare type HasType =\n    | SignatureDeclaration\n    | VariableDeclaration\n    | ParameterDeclaration\n    | PropertySignature\n    | PropertyDeclaration\n    | TypePredicateNode\n    | ParenthesizedTypeNode\n    | TypeOperatorNode\n    | MappedTypeNode\n    | AssertionExpression\n    | TypeAliasDeclaration\n    | JSDocTypeExpression\n    | JSDocNonNullableType\n    | JSDocNullableType\n    | JSDocOptionalType\n    | JSDocVariadicType;\n  declare type HasInitializer =\n    | HasExpressionInitializer\n    | ForStatement\n    | ForInStatement\n    | ForOfStatement\n    | JsxAttribute;\n  declare type HasExpressionInitializer =\n    | VariableDeclaration\n    | ParameterDeclaration\n    | BindingElement\n    | PropertySignature\n    | PropertyDeclaration\n    | PropertyAssignment\n    | EnumMember;\n  declare type NodeArray<T: $ReadOnly<Node>> = {\n    ...$Exact<TextRange>,\n    hasTrailingComma?: boolean,\n    ...\n  } & $ReadOnlyArray<T>;\n\n  declare type Token<TKind: $Values<typeof SyntaxKind>> = {\n    ...$Exact<Node>,\n    kind: TKind,\n    ...\n  };\n\n  declare type DotDotDotToken = Token<typeof SyntaxKind.DotDotDotToken>;\n  declare type QuestionToken = Token<typeof SyntaxKind.QuestionToken>;\n  declare type ExclamationToken = Token<typeof SyntaxKind.ExclamationToken>;\n  declare type ColonToken = Token<typeof SyntaxKind.ColonToken>;\n  declare type EqualsToken = Token<typeof SyntaxKind.EqualsToken>;\n  declare type AsteriskToken = Token<typeof SyntaxKind.AsteriskToken>;\n  declare type EqualsGreaterThanToken = Token<\n    typeof SyntaxKind.EqualsGreaterThanToken\n  >;\n  declare type EndOfFileToken = Token<typeof SyntaxKind.EndOfFileToken> &\n    JSDocContainer;\n  declare type ReadonlyToken = Token<typeof SyntaxKind.ReadonlyKeyword>;\n  declare type AwaitKeywordToken = Token<typeof SyntaxKind.AwaitKeyword>;\n  declare type PlusToken = Token<typeof SyntaxKind.PlusToken>;\n  declare type MinusToken = Token<typeof SyntaxKind.MinusToken>;\n  declare type Modifier =\n    | Token<typeof SyntaxKind.AbstractKeyword>\n    | Token<typeof SyntaxKind.AsyncKeyword>\n    | Token<typeof SyntaxKind.ConstKeyword>\n    | Token<typeof SyntaxKind.DeclareKeyword>\n    | Token<typeof SyntaxKind.DefaultKeyword>\n    | Token<typeof SyntaxKind.ExportKeyword>\n    | Token<typeof SyntaxKind.PublicKeyword>\n    | Token<typeof SyntaxKind.PrivateKeyword>\n    | Token<typeof SyntaxKind.ProtectedKeyword>\n    | Token<typeof SyntaxKind.ReadonlyKeyword>\n    | Token<typeof SyntaxKind.StaticKeyword>;\n  declare type ModifiersArray = NodeArray<Modifier>;\n  declare type Identifier = {\n    ...$Exact<PrimaryExpression>,\n    ...$Exact<Declaration>,\n    kind: typeof SyntaxKind.Identifier,\n    escapedText: __String,\n    originalKeywordKind?: $Values<typeof SyntaxKind>,\n    isInJSDocNamespace?: boolean,\n    +text: string,\n    ...\n  };\n\n  declare type TransientIdentifier = {\n    ...$Exact<Identifier>,\n    resolvedSymbol: Symbol,\n    ...\n  };\n\n  declare type QualifiedName = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.QualifiedName,\n    left: EntityName,\n    right: Identifier,\n    ...\n  };\n\n  declare type EntityName = Identifier | QualifiedName;\n  declare type PropertyName =\n    | Identifier\n    | StringLiteral\n    | NumericLiteral\n    | ComputedPropertyName;\n  declare type DeclarationName =\n    | Identifier\n    | StringLiteralLike\n    | NumericLiteral\n    | ComputedPropertyName\n    | BindingPattern;\n  declare type Declaration = {\n    ...$Exact<Node>,\n    _declarationBrand: any,\n    ...\n  };\n\n  declare type NamedDeclaration = {\n    ...$Exact<Declaration>,\n    name?: DeclarationName,\n    ...\n  };\n\n  declare type DeclarationStatement = {\n    ...$Exact<NamedDeclaration>,\n    ...$Exact<Statement>,\n    name?: Identifier | StringLiteral | NumericLiteral,\n    ...\n  };\n\n  declare type ComputedPropertyName = {\n    ...$Exact<Node>,\n    parent: Declaration,\n    kind: typeof SyntaxKind.ComputedPropertyName,\n    expression: Expression,\n    ...\n  };\n\n  declare type Decorator = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.Decorator,\n    parent: NamedDeclaration,\n    expression: LeftHandSideExpression,\n    ...\n  };\n\n  declare type TypeParameterDeclaration = {\n    ...$Exact<NamedDeclaration>,\n    kind: typeof SyntaxKind.TypeParameter,\n    parent: DeclarationWithTypeParameterChildren | InferTypeNode,\n    name: Identifier,\n    constraint?: TypeNode,\n    default?: TypeNode,\n    expression?: Expression,\n    ...\n  };\n\n  declare type SignatureDeclarationBase = {\n    ...$Exact<NamedDeclaration>,\n    ...$Exact<JSDocContainer>,\n    kind: $ElementType<SignatureDeclaration, \"kind\">,\n    name?: PropertyName,\n    typeParameters?: NodeArray<TypeParameterDeclaration>,\n    parameters: NodeArray<ParameterDeclaration>,\n    type?: TypeNode,\n    ...\n  };\n\n  declare type SignatureDeclaration =\n    | CallSignatureDeclaration\n    | ConstructSignatureDeclaration\n    | MethodSignature\n    | IndexSignatureDeclaration\n    | FunctionTypeNode\n    | ConstructorTypeNode\n    | JSDocFunctionType\n    | FunctionDeclaration\n    | MethodDeclaration\n    | ConstructorDeclaration\n    | AccessorDeclaration\n    | FunctionExpression\n    | ArrowFunction;\n  declare type CallSignatureDeclaration = {\n    ...$Exact<SignatureDeclarationBase>,\n    ...$Exact<TypeElement>,\n    kind: typeof SyntaxKind.CallSignature,\n    ...\n  };\n\n  declare type ConstructSignatureDeclaration = {\n    ...$Exact<SignatureDeclarationBase>,\n    ...$Exact<TypeElement>,\n    kind: typeof SyntaxKind.ConstructSignature,\n    ...\n  };\n\n  declare type BindingName = Identifier | BindingPattern;\n  declare type VariableDeclaration = {\n    ...$Exact<NamedDeclaration>,\n    kind: typeof SyntaxKind.VariableDeclaration,\n    parent: VariableDeclarationList | CatchClause,\n    name: BindingName,\n    exclamationToken?: ExclamationToken,\n    type?: TypeNode,\n    initializer?: Expression,\n    ...\n  };\n\n  declare type VariableDeclarationList = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.VariableDeclarationList,\n    parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement,\n    declarations: NodeArray<VariableDeclaration>,\n    ...\n  };\n\n  declare type ParameterDeclaration = {\n    ...$Exact<NamedDeclaration>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.Parameter,\n    parent: SignatureDeclaration,\n    dotDotDotToken?: DotDotDotToken,\n    name: BindingName,\n    questionToken?: QuestionToken,\n    type?: TypeNode,\n    initializer?: Expression,\n    ...\n  };\n\n  declare type BindingElement = {\n    ...$Exact<NamedDeclaration>,\n    kind: typeof SyntaxKind.BindingElement,\n    parent: BindingPattern,\n    propertyName?: PropertyName,\n    dotDotDotToken?: DotDotDotToken,\n    name: BindingName,\n    initializer?: Expression,\n    ...\n  };\n\n  declare type PropertySignature = {\n    ...$Exact<TypeElement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.PropertySignature,\n    name: PropertyName,\n    questionToken?: QuestionToken,\n    type?: TypeNode,\n    initializer?: Expression,\n    ...\n  };\n\n  declare type PropertyDeclaration = {\n    ...$Exact<ClassElement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.PropertyDeclaration,\n    parent: ClassLikeDeclaration,\n    name: PropertyName,\n    questionToken?: QuestionToken,\n    exclamationToken?: ExclamationToken,\n    type?: TypeNode,\n    initializer?: Expression,\n    ...\n  };\n\n  declare type ObjectLiteralElement = {\n    ...$Exact<NamedDeclaration>,\n    _objectLiteralBrandBrand: any,\n    name?: PropertyName,\n    ...\n  };\n\n  declare type ObjectLiteralElementLike =\n    | PropertyAssignment\n    | ShorthandPropertyAssignment\n    | SpreadAssignment\n    | MethodDeclaration\n    | AccessorDeclaration;\n  declare type PropertyAssignment = {\n    ...$Exact<ObjectLiteralElement>,\n    ...$Exact<JSDocContainer>,\n    parent: ObjectLiteralExpression,\n    kind: typeof SyntaxKind.PropertyAssignment,\n    name: PropertyName,\n    questionToken?: QuestionToken,\n    initializer: Expression,\n    ...\n  };\n\n  declare type ShorthandPropertyAssignment = {\n    ...$Exact<ObjectLiteralElement>,\n    ...$Exact<JSDocContainer>,\n    parent: ObjectLiteralExpression,\n    kind: typeof SyntaxKind.ShorthandPropertyAssignment,\n    name: Identifier,\n    questionToken?: QuestionToken,\n    exclamationToken?: ExclamationToken,\n    equalsToken?: Token<typeof SyntaxKind.EqualsToken>,\n    objectAssignmentInitializer?: Expression,\n    ...\n  };\n\n  declare type SpreadAssignment = {\n    ...$Exact<ObjectLiteralElement>,\n    ...$Exact<JSDocContainer>,\n    parent: ObjectLiteralExpression,\n    kind: typeof SyntaxKind.SpreadAssignment,\n    expression: Expression,\n    ...\n  };\n\n  declare type VariableLikeDeclaration =\n    | VariableDeclaration\n    | ParameterDeclaration\n    | BindingElement\n    | PropertyDeclaration\n    | PropertyAssignment\n    | PropertySignature\n    | JsxAttribute\n    | ShorthandPropertyAssignment\n    | EnumMember\n    | JSDocPropertyTag\n    | JSDocParameterTag;\n  declare type PropertyLikeDeclaration = {\n    ...$Exact<NamedDeclaration>,\n    name: PropertyName,\n    ...\n  };\n\n  declare type ObjectBindingPattern = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.ObjectBindingPattern,\n    parent: VariableDeclaration | ParameterDeclaration | BindingElement,\n    elements: NodeArray<BindingElement>,\n    ...\n  };\n\n  declare type ArrayBindingPattern = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.ArrayBindingPattern,\n    parent: VariableDeclaration | ParameterDeclaration | BindingElement,\n    elements: NodeArray<ArrayBindingElement>,\n    ...\n  };\n\n  declare type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;\n  declare type ArrayBindingElement = BindingElement | OmittedExpression;\n  declare type FunctionLikeDeclarationBase = {\n    ...$Exact<SignatureDeclarationBase>,\n    _functionLikeDeclarationBrand: any,\n    asteriskToken?: AsteriskToken,\n    questionToken?: QuestionToken,\n    exclamationToken?: ExclamationToken,\n    body?: Block | Expression,\n    ...\n  };\n\n  declare type FunctionLikeDeclaration =\n    | FunctionDeclaration\n    | MethodDeclaration\n    | GetAccessorDeclaration\n    | SetAccessorDeclaration\n    | ConstructorDeclaration\n    | FunctionExpression\n    | ArrowFunction;\n  declare type FunctionLike = SignatureDeclaration;\n  declare type FunctionDeclaration = {\n    ...$Exact<FunctionLikeDeclarationBase>,\n    ...$Exact<DeclarationStatement>,\n    kind: typeof SyntaxKind.FunctionDeclaration,\n    name?: Identifier,\n    body?: FunctionBody,\n    ...\n  };\n\n  declare type MethodSignature = {\n    ...$Exact<SignatureDeclarationBase>,\n    ...$Exact<TypeElement>,\n    kind: typeof SyntaxKind.MethodSignature,\n    parent: ObjectTypeDeclaration,\n    name: PropertyName,\n    ...\n  };\n\n  declare type MethodDeclaration = {\n    ...$Exact<FunctionLikeDeclarationBase>,\n    ...$Exact<ClassElement>,\n    ...$Exact<ObjectLiteralElement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.MethodDeclaration,\n    parent: ClassLikeDeclaration | ObjectLiteralExpression,\n    name: PropertyName,\n    body?: FunctionBody,\n    ...\n  };\n\n  declare type ConstructorDeclaration = {\n    ...$Exact<FunctionLikeDeclarationBase>,\n    ...$Exact<ClassElement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.Constructor,\n    parent: ClassLikeDeclaration,\n    body?: FunctionBody,\n    ...\n  };\n\n  declare type SemicolonClassElement = {\n    ...$Exact<ClassElement>,\n    kind: typeof SyntaxKind.SemicolonClassElement,\n    parent: ClassLikeDeclaration,\n    ...\n  };\n\n  declare type GetAccessorDeclaration = {\n    ...$Exact<FunctionLikeDeclarationBase>,\n    ...$Exact<ClassElement>,\n    ...$Exact<ObjectLiteralElement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.GetAccessor,\n    parent: ClassLikeDeclaration | ObjectLiteralExpression,\n    name: PropertyName,\n    body?: FunctionBody,\n    ...\n  };\n\n  declare type SetAccessorDeclaration = {\n    ...$Exact<FunctionLikeDeclarationBase>,\n    ...$Exact<ClassElement>,\n    ...$Exact<ObjectLiteralElement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.SetAccessor,\n    parent: ClassLikeDeclaration | ObjectLiteralExpression,\n    name: PropertyName,\n    body?: FunctionBody,\n    ...\n  };\n\n  declare type AccessorDeclaration =\n    | GetAccessorDeclaration\n    | SetAccessorDeclaration;\n  declare type IndexSignatureDeclaration = {\n    ...$Exact<SignatureDeclarationBase>,\n    ...$Exact<ClassElement>,\n    ...$Exact<TypeElement>,\n    kind: typeof SyntaxKind.IndexSignature,\n    parent: ObjectTypeDeclaration,\n    ...\n  };\n\n  declare type TypeNode = {\n    ...$Exact<Node>,\n    _typeNodeBrand: any,\n    ...\n  };\n\n  declare type KeywordTypeNode = {\n    ...$Exact<TypeNode>,\n    kind:\n      | typeof SyntaxKind.AnyKeyword\n      | typeof SyntaxKind.UnknownKeyword\n      | typeof SyntaxKind.NumberKeyword\n      | typeof SyntaxKind.BigIntKeyword\n      | typeof SyntaxKind.ObjectKeyword\n      | typeof SyntaxKind.BooleanKeyword\n      | typeof SyntaxKind.StringKeyword\n      | typeof SyntaxKind.SymbolKeyword\n      | typeof SyntaxKind.ThisKeyword\n      | typeof SyntaxKind.VoidKeyword\n      | typeof SyntaxKind.UndefinedKeyword\n      | typeof SyntaxKind.NullKeyword\n      | typeof SyntaxKind.NeverKeyword,\n    ...\n  };\n\n  declare type ImportTypeNode = {\n    ...$Exact<NodeWithTypeArguments>,\n    kind: typeof SyntaxKind.ImportType,\n    isTypeOf?: boolean,\n    argument: TypeNode,\n    qualifier?: EntityName,\n    ...\n  };\n\n  declare type ThisTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.ThisType,\n    ...\n  };\n\n  declare type FunctionOrConstructorTypeNode =\n    | FunctionTypeNode\n    | ConstructorTypeNode;\n  declare type FunctionOrConstructorTypeNodeBase = {\n    ...$Exact<TypeNode>,\n    ...$Exact<SignatureDeclarationBase>,\n    kind: typeof SyntaxKind.FunctionType | typeof SyntaxKind.ConstructorType,\n    type: TypeNode,\n    ...\n  };\n\n  declare type FunctionTypeNode = {\n    ...$Exact<FunctionOrConstructorTypeNodeBase>,\n    kind: typeof SyntaxKind.FunctionType,\n    ...\n  };\n\n  declare type ConstructorTypeNode = {\n    ...$Exact<FunctionOrConstructorTypeNodeBase>,\n    kind: typeof SyntaxKind.ConstructorType,\n    ...\n  };\n\n  declare type NodeWithTypeArguments = {\n    ...$Exact<TypeNode>,\n    typeArguments?: NodeArray<TypeNode>,\n    ...\n  };\n\n  declare type TypeReferenceType =\n    | TypeReferenceNode\n    | ExpressionWithTypeArguments;\n  declare type TypeReferenceNode = {\n    ...$Exact<NodeWithTypeArguments>,\n    kind: typeof SyntaxKind.TypeReference,\n    typeName: EntityName,\n    ...\n  };\n\n  declare type TypePredicateNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.TypePredicate,\n    parent: SignatureDeclaration | JSDocTypeExpression,\n    parameterName: Identifier | ThisTypeNode,\n    type: TypeNode,\n    ...\n  };\n\n  declare type TypeQueryNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.TypeQuery,\n    exprName: EntityName,\n    ...\n  };\n\n  declare type TypeLiteralNode = {\n    ...$Exact<TypeNode>,\n    ...$Exact<Declaration>,\n    kind: typeof SyntaxKind.TypeLiteral,\n    members: NodeArray<TypeElement>,\n    ...\n  };\n\n  declare type ArrayTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.ArrayType,\n    elementType: TypeNode,\n    ...\n  };\n\n  declare type TupleTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.TupleType,\n    elementTypes: NodeArray<TypeNode>,\n    ...\n  };\n\n  declare type OptionalTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.OptionalType,\n    type: TypeNode,\n    ...\n  };\n\n  declare type RestTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.RestType,\n    type: TypeNode,\n    ...\n  };\n\n  declare type UnionOrIntersectionTypeNode =\n    | UnionTypeNode\n    | IntersectionTypeNode;\n  declare type UnionTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.UnionType,\n    types: NodeArray<TypeNode>,\n    ...\n  };\n\n  declare type IntersectionTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.IntersectionType,\n    types: NodeArray<TypeNode>,\n    ...\n  };\n\n  declare type ConditionalTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.ConditionalType,\n    checkType: TypeNode,\n    extendsType: TypeNode,\n    trueType: TypeNode,\n    falseType: TypeNode,\n    ...\n  };\n\n  declare type InferTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.InferType,\n    typeParameter: TypeParameterDeclaration,\n    ...\n  };\n\n  declare type ParenthesizedTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.ParenthesizedType,\n    type: TypeNode,\n    ...\n  };\n\n  declare type TypeOperatorNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.TypeOperator,\n    operator: typeof SyntaxKind.KeyOfKeyword | typeof SyntaxKind.UniqueKeyword,\n    type: TypeNode,\n    ...\n  };\n\n  declare type IndexedAccessTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.IndexedAccessType,\n    objectType: TypeNode,\n    indexType: TypeNode,\n    ...\n  };\n\n  declare type MappedTypeNode = {\n    ...$Exact<TypeNode>,\n    ...$Exact<Declaration>,\n    kind: typeof SyntaxKind.MappedType,\n    readonlyToken?: ReadonlyToken | PlusToken | MinusToken,\n    typeParameter: TypeParameterDeclaration,\n    questionToken?: QuestionToken | PlusToken | MinusToken,\n    type?: TypeNode,\n    ...\n  };\n\n  declare type LiteralTypeNode = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.LiteralType,\n    literal: BooleanLiteral | LiteralExpression | PrefixUnaryExpression,\n    ...\n  };\n\n  declare type StringLiteral = {\n    ...$Exact<LiteralExpression>,\n    kind: typeof SyntaxKind.StringLiteral,\n    ...\n  };\n\n  declare type StringLiteralLike =\n    | StringLiteral\n    | NoSubstitutionTemplateLiteral;\n  declare type Expression = {\n    ...$Exact<Node>,\n    _expressionBrand: any,\n    ...\n  };\n\n  declare type OmittedExpression = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.OmittedExpression,\n    ...\n  };\n\n  declare type PartiallyEmittedExpression = {\n    ...$Exact<LeftHandSideExpression>,\n    kind: typeof SyntaxKind.PartiallyEmittedExpression,\n    expression: Expression,\n    ...\n  };\n\n  declare type UnaryExpression = {\n    ...$Exact<Expression>,\n    _unaryExpressionBrand: any,\n    ...\n  };\n\n  declare type IncrementExpression = UpdateExpression;\n  declare type UpdateExpression = {\n    ...$Exact<UnaryExpression>,\n    _updateExpressionBrand: any,\n    ...\n  };\n\n  declare type PrefixUnaryOperator =\n    | typeof SyntaxKind.PlusPlusToken\n    | typeof SyntaxKind.MinusMinusToken\n    | typeof SyntaxKind.PlusToken\n    | typeof SyntaxKind.MinusToken\n    | typeof SyntaxKind.TildeToken\n    | typeof SyntaxKind.ExclamationToken;\n  declare type PrefixUnaryExpression = {\n    ...$Exact<UpdateExpression>,\n    kind: typeof SyntaxKind.PrefixUnaryExpression,\n    operator: PrefixUnaryOperator,\n    operand: UnaryExpression,\n    ...\n  };\n\n  declare type PostfixUnaryOperator =\n    | typeof SyntaxKind.PlusPlusToken\n    | typeof SyntaxKind.MinusMinusToken;\n  declare type PostfixUnaryExpression = {\n    ...$Exact<UpdateExpression>,\n    kind: typeof SyntaxKind.PostfixUnaryExpression,\n    operand: LeftHandSideExpression,\n    operator: PostfixUnaryOperator,\n    ...\n  };\n\n  declare type LeftHandSideExpression = {\n    ...$Exact<UpdateExpression>,\n    _leftHandSideExpressionBrand: any,\n    ...\n  };\n\n  declare type MemberExpression = {\n    ...$Exact<LeftHandSideExpression>,\n    _memberExpressionBrand: any,\n    ...\n  };\n\n  declare type PrimaryExpression = {\n    ...$Exact<MemberExpression>,\n    _primaryExpressionBrand: any,\n    ...\n  };\n\n  declare type NullLiteral = {\n    ...$Exact<PrimaryExpression>,\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.NullKeyword,\n    ...\n  };\n\n  declare type BooleanLiteral = {\n    ...$Exact<PrimaryExpression>,\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.TrueKeyword | typeof SyntaxKind.FalseKeyword,\n    ...\n  };\n\n  declare type ThisExpression = {\n    ...$Exact<PrimaryExpression>,\n    ...$Exact<KeywordTypeNode>,\n    kind: typeof SyntaxKind.ThisKeyword,\n    ...\n  };\n\n  declare type SuperExpression = {\n    ...$Exact<PrimaryExpression>,\n    kind: typeof SyntaxKind.SuperKeyword,\n    ...\n  };\n\n  declare type ImportExpression = {\n    ...$Exact<PrimaryExpression>,\n    kind: typeof SyntaxKind.ImportKeyword,\n    ...\n  };\n\n  declare type DeleteExpression = {\n    ...$Exact<UnaryExpression>,\n    kind: typeof SyntaxKind.DeleteExpression,\n    expression: UnaryExpression,\n    ...\n  };\n\n  declare type TypeOfExpression = {\n    ...$Exact<UnaryExpression>,\n    kind: typeof SyntaxKind.TypeOfExpression,\n    expression: UnaryExpression,\n    ...\n  };\n\n  declare type VoidExpression = {\n    ...$Exact<UnaryExpression>,\n    kind: typeof SyntaxKind.VoidExpression,\n    expression: UnaryExpression,\n    ...\n  };\n\n  declare type AwaitExpression = {\n    ...$Exact<UnaryExpression>,\n    kind: typeof SyntaxKind.AwaitExpression,\n    expression: UnaryExpression,\n    ...\n  };\n\n  declare type YieldExpression = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.YieldExpression,\n    asteriskToken?: AsteriskToken,\n    expression?: Expression,\n    ...\n  };\n\n  declare type SyntheticExpression = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.SyntheticExpression,\n    isSpread: boolean,\n    type: Type,\n    ...\n  };\n\n  declare type ExponentiationOperator = typeof SyntaxKind.AsteriskAsteriskToken;\n  declare type MultiplicativeOperator =\n    | typeof SyntaxKind.AsteriskToken\n    | typeof SyntaxKind.SlashToken\n    | typeof SyntaxKind.PercentToken;\n  declare type MultiplicativeOperatorOrHigher =\n    | ExponentiationOperator\n    | MultiplicativeOperator;\n  declare type AdditiveOperator =\n    | typeof SyntaxKind.PlusToken\n    | typeof SyntaxKind.MinusToken;\n  declare type AdditiveOperatorOrHigher =\n    | MultiplicativeOperatorOrHigher\n    | AdditiveOperator;\n  declare type ShiftOperator =\n    | typeof SyntaxKind.LessThanLessThanToken\n    | typeof SyntaxKind.GreaterThanGreaterThanToken\n    | typeof SyntaxKind.GreaterThanGreaterThanGreaterThanToken;\n  declare type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator;\n  declare type RelationalOperator =\n    | typeof SyntaxKind.LessThanToken\n    | typeof SyntaxKind.LessThanEqualsToken\n    | typeof SyntaxKind.GreaterThanToken\n    | typeof SyntaxKind.GreaterThanEqualsToken\n    | typeof SyntaxKind.InstanceOfKeyword\n    | typeof SyntaxKind.InKeyword;\n  declare type RelationalOperatorOrHigher =\n    | ShiftOperatorOrHigher\n    | RelationalOperator;\n  declare type EqualityOperator =\n    | typeof SyntaxKind.EqualsEqualsToken\n    | typeof SyntaxKind.EqualsEqualsEqualsToken\n    | typeof SyntaxKind.ExclamationEqualsEqualsToken\n    | typeof SyntaxKind.ExclamationEqualsToken;\n  declare type EqualityOperatorOrHigher =\n    | RelationalOperatorOrHigher\n    | EqualityOperator;\n  declare type BitwiseOperator =\n    | typeof SyntaxKind.AmpersandToken\n    | typeof SyntaxKind.BarToken\n    | typeof SyntaxKind.CaretToken;\n  declare type BitwiseOperatorOrHigher =\n    | EqualityOperatorOrHigher\n    | BitwiseOperator;\n  declare type LogicalOperator =\n    | typeof SyntaxKind.AmpersandAmpersandToken\n    | typeof SyntaxKind.BarBarToken;\n  declare type LogicalOperatorOrHigher =\n    | BitwiseOperatorOrHigher\n    | LogicalOperator;\n  declare type CompoundAssignmentOperator =\n    | typeof SyntaxKind.PlusEqualsToken\n    | typeof SyntaxKind.MinusEqualsToken\n    | typeof SyntaxKind.AsteriskAsteriskEqualsToken\n    | typeof SyntaxKind.AsteriskEqualsToken\n    | typeof SyntaxKind.SlashEqualsToken\n    | typeof SyntaxKind.PercentEqualsToken\n    | typeof SyntaxKind.AmpersandEqualsToken\n    | typeof SyntaxKind.BarEqualsToken\n    | typeof SyntaxKind.CaretEqualsToken\n    | typeof SyntaxKind.LessThanLessThanEqualsToken\n    | typeof SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken\n    | typeof SyntaxKind.GreaterThanGreaterThanEqualsToken;\n  declare type AssignmentOperator =\n    | typeof SyntaxKind.EqualsToken\n    | CompoundAssignmentOperator;\n  declare type AssignmentOperatorOrHigher =\n    | LogicalOperatorOrHigher\n    | AssignmentOperator;\n  declare type BinaryOperator =\n    | AssignmentOperatorOrHigher\n    | typeof SyntaxKind.CommaToken;\n  declare type BinaryOperatorToken = Token<BinaryOperator>;\n  declare type BinaryExpression = {\n    ...$Exact<Expression>,\n    ...$Exact<Declaration>,\n    kind: typeof SyntaxKind.BinaryExpression,\n    left: Expression,\n    operatorToken: BinaryOperatorToken,\n    right: Expression,\n    ...\n  };\n\n  declare type AssignmentOperatorToken = Token<AssignmentOperator>;\n  declare type AssignmentExpression<TOperator: AssignmentOperatorToken> = {\n    ...$Exact<BinaryExpression>,\n    left: LeftHandSideExpression,\n    operatorToken: TOperator,\n    ...\n  };\n\n  declare type ObjectDestructuringAssignment = {\n    ...$Exact<AssignmentExpression<EqualsToken>>,\n    left: ObjectLiteralExpression,\n    ...\n  };\n\n  declare type ArrayDestructuringAssignment = {\n    ...$Exact<AssignmentExpression<EqualsToken>>,\n    left: ArrayLiteralExpression,\n    ...\n  };\n\n  declare type DestructuringAssignment =\n    | ObjectDestructuringAssignment\n    | ArrayDestructuringAssignment;\n  declare type BindingOrAssignmentElement =\n    | VariableDeclaration\n    | ParameterDeclaration\n    | BindingElement\n    | PropertyAssignment\n    | ShorthandPropertyAssignment\n    | SpreadAssignment\n    | OmittedExpression\n    | SpreadElement\n    | ArrayLiteralExpression\n    | ObjectLiteralExpression\n    | AssignmentExpression<EqualsToken>\n    | Identifier\n    | PropertyAccessExpression\n    | ElementAccessExpression;\n  declare type BindingOrAssignmentElementRestIndicator =\n    | DotDotDotToken\n    | SpreadElement\n    | SpreadAssignment;\n  declare type BindingOrAssignmentElementTarget =\n    | BindingOrAssignmentPattern\n    | Identifier\n    | PropertyAccessExpression\n    | ElementAccessExpression\n    | OmittedExpression;\n  declare type ObjectBindingOrAssignmentPattern =\n    | ObjectBindingPattern\n    | ObjectLiteralExpression;\n  declare type ArrayBindingOrAssignmentPattern =\n    | ArrayBindingPattern\n    | ArrayLiteralExpression;\n  declare type AssignmentPattern =\n    | ObjectLiteralExpression\n    | ArrayLiteralExpression;\n  declare type BindingOrAssignmentPattern =\n    | ObjectBindingOrAssignmentPattern\n    | ArrayBindingOrAssignmentPattern;\n  declare type ConditionalExpression = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.ConditionalExpression,\n    condition: Expression,\n    questionToken: QuestionToken,\n    whenTrue: Expression,\n    colonToken: ColonToken,\n    whenFalse: Expression,\n    ...\n  };\n\n  declare type FunctionBody = Block;\n  declare type ConciseBody = FunctionBody | Expression;\n  declare type FunctionExpression = {\n    ...$Exact<PrimaryExpression>,\n    ...$Exact<FunctionLikeDeclarationBase>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.FunctionExpression,\n    name?: Identifier,\n    body: FunctionBody,\n    ...\n  };\n\n  declare type ArrowFunction = {\n    ...$Exact<Expression>,\n    ...$Exact<FunctionLikeDeclarationBase>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.ArrowFunction,\n    equalsGreaterThanToken: EqualsGreaterThanToken,\n    body: ConciseBody,\n    name: empty,\n    ...\n  };\n\n  declare type LiteralLikeNode = {\n    ...$Exact<Node>,\n    text: string,\n    isUnterminated?: boolean,\n    hasExtendedUnicodeEscape?: boolean,\n    ...\n  };\n\n  declare type LiteralExpression = {\n    ...$Exact<LiteralLikeNode>,\n    ...$Exact<PrimaryExpression>,\n    _literalExpressionBrand: any,\n    ...\n  };\n\n  declare type RegularExpressionLiteral = {\n    ...$Exact<LiteralExpression>,\n    kind: typeof SyntaxKind.RegularExpressionLiteral,\n    ...\n  };\n\n  declare type NoSubstitutionTemplateLiteral = {\n    ...$Exact<LiteralExpression>,\n    kind: typeof SyntaxKind.NoSubstitutionTemplateLiteral,\n    ...\n  };\n\n  declare type NumericLiteral = {\n    ...$Exact<LiteralExpression>,\n    kind: typeof SyntaxKind.NumericLiteral,\n    ...\n  };\n\n  declare type BigIntLiteral = {\n    ...$Exact<LiteralExpression>,\n    kind: typeof SyntaxKind.BigIntLiteral,\n    ...\n  };\n\n  declare type TemplateHead = {\n    ...$Exact<LiteralLikeNode>,\n    kind: typeof SyntaxKind.TemplateHead,\n    parent: TemplateExpression,\n    ...\n  };\n\n  declare type TemplateMiddle = {\n    ...$Exact<LiteralLikeNode>,\n    kind: typeof SyntaxKind.TemplateMiddle,\n    parent: TemplateSpan,\n    ...\n  };\n\n  declare type TemplateTail = {\n    ...$Exact<LiteralLikeNode>,\n    kind: typeof SyntaxKind.TemplateTail,\n    parent: TemplateSpan,\n    ...\n  };\n\n  declare type TemplateLiteral =\n    | TemplateExpression\n    | NoSubstitutionTemplateLiteral;\n  declare type TemplateExpression = {\n    ...$Exact<PrimaryExpression>,\n    kind: typeof SyntaxKind.TemplateExpression,\n    head: TemplateHead,\n    templateSpans: NodeArray<TemplateSpan>,\n    ...\n  };\n\n  declare type TemplateSpan = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.TemplateSpan,\n    parent: TemplateExpression,\n    expression: Expression,\n    literal: TemplateMiddle | TemplateTail,\n    ...\n  };\n\n  declare type ParenthesizedExpression = {\n    ...$Exact<PrimaryExpression>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.ParenthesizedExpression,\n    expression: Expression,\n    ...\n  };\n\n  declare type ArrayLiteralExpression = {\n    ...$Exact<PrimaryExpression>,\n    kind: typeof SyntaxKind.ArrayLiteralExpression,\n    elements: NodeArray<Expression>,\n    ...\n  };\n\n  declare type SpreadElement = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.SpreadElement,\n    parent: ArrayLiteralExpression | CallExpression | NewExpression,\n    expression: Expression,\n    ...\n  };\n\n  declare type ObjectLiteralExpressionBase<T: ObjectLiteralElement> = {\n    ...$Exact<PrimaryExpression>,\n    ...$Exact<Declaration>,\n    properties: NodeArray<T>,\n    ...\n  };\n\n  declare type ObjectLiteralExpression = {\n    ...$Exact<ObjectLiteralExpressionBase<ObjectLiteralElementLike>>,\n    kind: typeof SyntaxKind.ObjectLiteralExpression,\n    ...\n  };\n\n  declare type EntityNameExpression =\n    | Identifier\n    | PropertyAccessEntityNameExpression;\n  declare type EntityNameOrEntityNameExpression =\n    | EntityName\n    | EntityNameExpression;\n  declare type PropertyAccessExpression = {\n    ...$Exact<MemberExpression>,\n    ...$Exact<NamedDeclaration>,\n    kind: typeof SyntaxKind.PropertyAccessExpression,\n    expression: LeftHandSideExpression,\n    name: Identifier,\n    ...\n  };\n\n  declare type SuperPropertyAccessExpression = {\n    ...$Exact<PropertyAccessExpression>,\n    expression: SuperExpression,\n    ...\n  };\n\n  declare type PropertyAccessEntityNameExpression = {\n    ...$Exact<PropertyAccessExpression>,\n    _propertyAccessExpressionLikeQualifiedNameBrand?: any,\n    expression: EntityNameExpression,\n    ...\n  };\n\n  declare type ElementAccessExpression = {\n    ...$Exact<MemberExpression>,\n    kind: typeof SyntaxKind.ElementAccessExpression,\n    expression: LeftHandSideExpression,\n    argumentExpression: Expression,\n    ...\n  };\n\n  declare type SuperElementAccessExpression = {\n    ...$Exact<ElementAccessExpression>,\n    expression: SuperExpression,\n    ...\n  };\n\n  declare type SuperProperty =\n    | SuperPropertyAccessExpression\n    | SuperElementAccessExpression;\n  declare type CallExpression = {\n    ...$Exact<LeftHandSideExpression>,\n    ...$Exact<Declaration>,\n    kind: typeof SyntaxKind.CallExpression,\n    expression: LeftHandSideExpression,\n    typeArguments?: NodeArray<TypeNode>,\n    arguments: NodeArray<Expression>,\n    ...\n  };\n\n  declare type SuperCall = {\n    ...$Exact<CallExpression>,\n    expression: SuperExpression,\n    ...\n  };\n\n  declare type ImportCall = {\n    ...$Exact<CallExpression>,\n    expression: ImportExpression,\n    ...\n  };\n\n  declare type ExpressionWithTypeArguments = {\n    ...$Exact<NodeWithTypeArguments>,\n    kind: typeof SyntaxKind.ExpressionWithTypeArguments,\n    parent: HeritageClause | JSDocAugmentsTag,\n    expression: LeftHandSideExpression,\n    ...\n  };\n\n  declare type NewExpression = {\n    ...$Exact<PrimaryExpression>,\n    ...$Exact<Declaration>,\n    kind: typeof SyntaxKind.NewExpression,\n    expression: LeftHandSideExpression,\n    typeArguments?: NodeArray<TypeNode>,\n    arguments?: NodeArray<Expression>,\n    ...\n  };\n\n  declare type TaggedTemplateExpression = {\n    ...$Exact<MemberExpression>,\n    kind: typeof SyntaxKind.TaggedTemplateExpression,\n    tag: LeftHandSideExpression,\n    typeArguments?: NodeArray<TypeNode>,\n    template: TemplateLiteral,\n    ...\n  };\n\n  declare type CallLikeExpression =\n    | CallExpression\n    | NewExpression\n    | TaggedTemplateExpression\n    | Decorator\n    | JsxOpeningLikeElement;\n  declare type AsExpression = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.AsExpression,\n    expression: Expression,\n    type: TypeNode,\n    ...\n  };\n\n  declare type TypeAssertion = {\n    ...$Exact<UnaryExpression>,\n    kind: typeof SyntaxKind.TypeAssertionExpression,\n    type: TypeNode,\n    expression: UnaryExpression,\n    ...\n  };\n\n  declare type AssertionExpression = TypeAssertion | AsExpression;\n  declare type NonNullExpression = {\n    ...$Exact<LeftHandSideExpression>,\n    kind: typeof SyntaxKind.NonNullExpression,\n    expression: Expression,\n    ...\n  };\n\n  declare type MetaProperty = {\n    ...$Exact<PrimaryExpression>,\n    kind: typeof SyntaxKind.MetaProperty,\n    keywordToken:\n      | typeof SyntaxKind.NewKeyword\n      | typeof SyntaxKind.ImportKeyword,\n    name: Identifier,\n    ...\n  };\n\n  declare type JsxElement = {\n    ...$Exact<PrimaryExpression>,\n    kind: typeof SyntaxKind.JsxElement,\n    openingElement: JsxOpeningElement,\n    children: NodeArray<JsxChild>,\n    closingElement: JsxClosingElement,\n    ...\n  };\n\n  declare type JsxOpeningLikeElement =\n    | JsxSelfClosingElement\n    | JsxOpeningElement;\n  declare type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;\n  declare type JsxTagNameExpression =\n    | Identifier\n    | ThisExpression\n    | JsxTagNamePropertyAccess;\n  declare type JsxTagNamePropertyAccess = {\n    ...$Exact<PropertyAccessExpression>,\n    expression: JsxTagNameExpression,\n    ...\n  };\n\n  declare type JsxAttributes = {\n    ...$Exact<ObjectLiteralExpressionBase<JsxAttributeLike>>,\n    parent: JsxOpeningLikeElement,\n    ...\n  };\n\n  declare type JsxOpeningElement = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.JsxOpeningElement,\n    parent: JsxElement,\n    tagName: JsxTagNameExpression,\n    typeArguments?: NodeArray<TypeNode>,\n    attributes: JsxAttributes,\n    ...\n  };\n\n  declare type JsxSelfClosingElement = {\n    ...$Exact<PrimaryExpression>,\n    kind: typeof SyntaxKind.JsxSelfClosingElement,\n    tagName: JsxTagNameExpression,\n    typeArguments?: NodeArray<TypeNode>,\n    attributes: JsxAttributes,\n    ...\n  };\n\n  declare type JsxFragment = {\n    ...$Exact<PrimaryExpression>,\n    kind: typeof SyntaxKind.JsxFragment,\n    openingFragment: JsxOpeningFragment,\n    children: NodeArray<JsxChild>,\n    closingFragment: JsxClosingFragment,\n    ...\n  };\n\n  declare type JsxOpeningFragment = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.JsxOpeningFragment,\n    parent: JsxFragment,\n    ...\n  };\n\n  declare type JsxClosingFragment = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.JsxClosingFragment,\n    parent: JsxFragment,\n    ...\n  };\n\n  declare type JsxAttribute = {\n    ...$Exact<ObjectLiteralElement>,\n    kind: typeof SyntaxKind.JsxAttribute,\n    parent: JsxAttributes,\n    name: Identifier,\n    initializer?: StringLiteral | JsxExpression,\n    ...\n  };\n\n  declare type JsxSpreadAttribute = {\n    ...$Exact<ObjectLiteralElement>,\n    kind: typeof SyntaxKind.JsxSpreadAttribute,\n    parent: JsxAttributes,\n    expression: Expression,\n    ...\n  };\n\n  declare type JsxClosingElement = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.JsxClosingElement,\n    parent: JsxElement,\n    tagName: JsxTagNameExpression,\n    ...\n  };\n\n  declare type JsxExpression = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.JsxExpression,\n    parent: JsxElement | JsxAttributeLike,\n    dotDotDotToken?: Token<typeof SyntaxKind.DotDotDotToken>,\n    expression?: Expression,\n    ...\n  };\n\n  declare type JsxText = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.JsxText,\n    containsOnlyWhiteSpaces: boolean,\n    parent: JsxElement,\n    ...\n  };\n\n  declare type JsxChild =\n    | JsxText\n    | JsxExpression\n    | JsxElement\n    | JsxSelfClosingElement\n    | JsxFragment;\n  declare type Statement = {\n    ...$Exact<Node>,\n    _statementBrand: any,\n    ...\n  };\n\n  declare type NotEmittedStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.NotEmittedStatement,\n    ...\n  };\n\n  declare type CommaListExpression = {\n    ...$Exact<Expression>,\n    kind: typeof SyntaxKind.CommaListExpression,\n    elements: NodeArray<Expression>,\n    ...\n  };\n\n  declare type EmptyStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.EmptyStatement,\n    ...\n  };\n\n  declare type DebuggerStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.DebuggerStatement,\n    ...\n  };\n\n  declare type MissingDeclaration = {\n    ...$Exact<DeclarationStatement>,\n    kind: typeof SyntaxKind.MissingDeclaration,\n    name?: Identifier,\n    ...\n  };\n\n  declare type BlockLike =\n    | SourceFile\n    | Block\n    | ModuleBlock\n    | CaseOrDefaultClause;\n  declare type Block = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.Block,\n    statements: NodeArray<Statement>,\n    ...\n  };\n\n  declare type VariableStatement = {\n    ...$Exact<Statement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.VariableStatement,\n    declarationList: VariableDeclarationList,\n    ...\n  };\n\n  declare type ExpressionStatement = {\n    ...$Exact<Statement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.ExpressionStatement,\n    expression: Expression,\n    ...\n  };\n\n  declare type IfStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.IfStatement,\n    expression: Expression,\n    thenStatement: Statement,\n    elseStatement?: Statement,\n    ...\n  };\n\n  declare type IterationStatement = {\n    ...$Exact<Statement>,\n    statement: Statement,\n    ...\n  };\n\n  declare type DoStatement = {\n    ...$Exact<IterationStatement>,\n    kind: typeof SyntaxKind.DoStatement,\n    expression: Expression,\n    ...\n  };\n\n  declare type WhileStatement = {\n    ...$Exact<IterationStatement>,\n    kind: typeof SyntaxKind.WhileStatement,\n    expression: Expression,\n    ...\n  };\n\n  declare type ForInitializer = VariableDeclarationList | Expression;\n  declare type ForStatement = {\n    ...$Exact<IterationStatement>,\n    kind: typeof SyntaxKind.ForStatement,\n    initializer?: ForInitializer,\n    condition?: Expression,\n    incrementor?: Expression,\n    ...\n  };\n\n  declare type ForInOrOfStatement = ForInStatement | ForOfStatement;\n  declare type ForInStatement = {\n    ...$Exact<IterationStatement>,\n    kind: typeof SyntaxKind.ForInStatement,\n    initializer: ForInitializer,\n    expression: Expression,\n    ...\n  };\n\n  declare type ForOfStatement = {\n    ...$Exact<IterationStatement>,\n    kind: typeof SyntaxKind.ForOfStatement,\n    awaitModifier?: AwaitKeywordToken,\n    initializer: ForInitializer,\n    expression: Expression,\n    ...\n  };\n\n  declare type BreakStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.BreakStatement,\n    label?: Identifier,\n    ...\n  };\n\n  declare type ContinueStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.ContinueStatement,\n    label?: Identifier,\n    ...\n  };\n\n  declare type BreakOrContinueStatement = BreakStatement | ContinueStatement;\n  declare type ReturnStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.ReturnStatement,\n    expression?: Expression,\n    ...\n  };\n\n  declare type WithStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.WithStatement,\n    expression: Expression,\n    statement: Statement,\n    ...\n  };\n\n  declare type SwitchStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.SwitchStatement,\n    expression: Expression,\n    caseBlock: CaseBlock,\n    possiblyExhaustive?: boolean,\n    ...\n  };\n\n  declare type CaseBlock = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.CaseBlock,\n    parent: SwitchStatement,\n    clauses: NodeArray<CaseOrDefaultClause>,\n    ...\n  };\n\n  declare type CaseClause = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.CaseClause,\n    parent: CaseBlock,\n    expression: Expression,\n    statements: NodeArray<Statement>,\n    ...\n  };\n\n  declare type DefaultClause = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.DefaultClause,\n    parent: CaseBlock,\n    statements: NodeArray<Statement>,\n    ...\n  };\n\n  declare type CaseOrDefaultClause = CaseClause | DefaultClause;\n  declare type LabeledStatement = {\n    ...$Exact<Statement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.LabeledStatement,\n    label: Identifier,\n    statement: Statement,\n    ...\n  };\n\n  declare type ThrowStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.ThrowStatement,\n    expression?: Expression,\n    ...\n  };\n\n  declare type TryStatement = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.TryStatement,\n    tryBlock: Block,\n    catchClause?: CatchClause,\n    finallyBlock?: Block,\n    ...\n  };\n\n  declare type CatchClause = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.CatchClause,\n    parent: TryStatement,\n    variableDeclaration?: VariableDeclaration,\n    block: Block,\n    ...\n  };\n\n  declare type ObjectTypeDeclaration =\n    | ClassLikeDeclaration\n    | InterfaceDeclaration\n    | TypeLiteralNode;\n  declare type DeclarationWithTypeParameters =\n    | DeclarationWithTypeParameterChildren\n    | JSDocTypedefTag\n    | JSDocCallbackTag\n    | JSDocSignature;\n  declare type DeclarationWithTypeParameterChildren =\n    | SignatureDeclaration\n    | ClassLikeDeclaration\n    | InterfaceDeclaration\n    | TypeAliasDeclaration\n    | JSDocTemplateTag;\n  declare type ClassLikeDeclarationBase = {\n    ...$Exact<NamedDeclaration>,\n    ...$Exact<JSDocContainer>,\n    kind:\n      | typeof SyntaxKind.ClassDeclaration\n      | typeof SyntaxKind.ClassExpression,\n    name?: Identifier,\n    typeParameters?: NodeArray<TypeParameterDeclaration>,\n    heritageClauses?: NodeArray<HeritageClause>,\n    members: NodeArray<ClassElement>,\n    ...\n  };\n\n  declare type ClassDeclaration = {\n    ...$Exact<ClassLikeDeclarationBase>,\n    ...$Exact<DeclarationStatement>,\n    kind: typeof SyntaxKind.ClassDeclaration,\n    name?: Identifier,\n    ...\n  };\n\n  declare type ClassExpression = {\n    ...$Exact<ClassLikeDeclarationBase>,\n    ...$Exact<PrimaryExpression>,\n    kind: typeof SyntaxKind.ClassExpression,\n    ...\n  };\n\n  declare type ClassLikeDeclaration = ClassDeclaration | ClassExpression;\n  declare type ClassElement = {\n    ...$Exact<NamedDeclaration>,\n    _classElementBrand: any,\n    name?: PropertyName,\n    ...\n  };\n\n  declare type TypeElement = {\n    ...$Exact<NamedDeclaration>,\n    _typeElementBrand: any,\n    name?: PropertyName,\n    questionToken?: QuestionToken,\n    ...\n  };\n\n  declare type InterfaceDeclaration = {\n    ...$Exact<DeclarationStatement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.InterfaceDeclaration,\n    name: Identifier,\n    typeParameters?: NodeArray<TypeParameterDeclaration>,\n    heritageClauses?: NodeArray<HeritageClause>,\n    members: NodeArray<TypeElement>,\n    ...\n  };\n\n  declare type HeritageClause = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.HeritageClause,\n    parent: InterfaceDeclaration | ClassLikeDeclaration,\n    token:\n      | typeof SyntaxKind.ExtendsKeyword\n      | typeof SyntaxKind.ImplementsKeyword,\n    types: NodeArray<ExpressionWithTypeArguments>,\n    ...\n  };\n\n  declare type TypeAliasDeclaration = {\n    ...$Exact<DeclarationStatement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.TypeAliasDeclaration,\n    name: Identifier,\n    typeParameters?: NodeArray<TypeParameterDeclaration>,\n    type: TypeNode,\n    ...\n  };\n\n  declare type EnumMember = {\n    ...$Exact<NamedDeclaration>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.EnumMember,\n    parent: EnumDeclaration,\n    name: PropertyName,\n    initializer?: Expression,\n    ...\n  };\n\n  declare type EnumDeclaration = {\n    ...$Exact<DeclarationStatement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.EnumDeclaration,\n    name: Identifier,\n    members: NodeArray<EnumMember>,\n    ...\n  };\n\n  declare type ModuleName = Identifier | StringLiteral;\n  declare type ModuleBody = NamespaceBody | JSDocNamespaceBody;\n  declare type ModuleDeclaration = {\n    ...$Exact<DeclarationStatement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.ModuleDeclaration,\n    parent: ModuleBody | SourceFile,\n    name: ModuleName,\n    body?: ModuleBody | JSDocNamespaceDeclaration,\n    ...\n  };\n\n  declare type NamespaceBody = ModuleBlock | NamespaceDeclaration;\n  declare type NamespaceDeclaration = {\n    ...$Exact<ModuleDeclaration>,\n    name: Identifier,\n    body: NamespaceBody,\n    ...\n  };\n\n  declare type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration;\n  declare type JSDocNamespaceDeclaration = {\n    ...$Exact<ModuleDeclaration>,\n    name: Identifier,\n    body?: JSDocNamespaceBody,\n    ...\n  };\n\n  declare type ModuleBlock = {\n    ...$Exact<Node>,\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.ModuleBlock,\n    parent: ModuleDeclaration,\n    statements: NodeArray<Statement>,\n    ...\n  };\n\n  declare type ModuleReference = EntityName | ExternalModuleReference;\n  declare type ImportEqualsDeclaration = {\n    ...$Exact<DeclarationStatement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.ImportEqualsDeclaration,\n    parent: SourceFile | ModuleBlock,\n    name: Identifier,\n    moduleReference: ModuleReference,\n    ...\n  };\n\n  declare type ExternalModuleReference = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.ExternalModuleReference,\n    parent: ImportEqualsDeclaration,\n    expression: Expression,\n    ...\n  };\n\n  declare type ImportDeclaration = {\n    ...$Exact<Statement>,\n    kind: typeof SyntaxKind.ImportDeclaration,\n    parent: SourceFile | ModuleBlock,\n    importClause?: ImportClause,\n    moduleSpecifier: Expression,\n    ...\n  };\n\n  declare type NamedImportBindings = NamespaceImport | NamedImports;\n  declare type ImportClause = {\n    ...$Exact<NamedDeclaration>,\n    kind: typeof SyntaxKind.ImportClause,\n    parent: ImportDeclaration,\n    name?: Identifier,\n    namedBindings?: NamedImportBindings,\n    ...\n  };\n\n  declare type NamespaceImport = {\n    ...$Exact<NamedDeclaration>,\n    kind: typeof SyntaxKind.NamespaceImport,\n    parent: ImportClause,\n    name: Identifier,\n    ...\n  };\n\n  declare type NamespaceExportDeclaration = {\n    ...$Exact<DeclarationStatement>,\n    kind: typeof SyntaxKind.NamespaceExportDeclaration,\n    name: Identifier,\n    ...\n  };\n\n  declare type ExportDeclaration = {\n    ...$Exact<DeclarationStatement>,\n    ...$Exact<JSDocContainer>,\n    kind: typeof SyntaxKind.ExportDeclaration,\n    parent: SourceFile | ModuleBlock,\n    exportClause?: NamedExports,\n    moduleSpecifier?: Expression,\n    ...\n  };\n\n  declare type NamedImports = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.NamedImports,\n    parent: ImportClause,\n    elements: NodeArray<ImportSpecifier>,\n    ...\n  };\n\n  declare type NamedExports = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.NamedExports,\n    parent: ExportDeclaration,\n    elements: NodeArray<ExportSpecifier>,\n    ...\n  };\n\n  declare type NamedImportsOrExports = NamedImports | NamedExports;\n  declare type ImportSpecifier = {\n    ...$Exact<NamedDeclaration>,\n    kind: typeof SyntaxKind.ImportSpecifier,\n    parent: NamedImports,\n    propertyName?: Identifier,\n    name: Identifier,\n    ...\n  };\n\n  declare type ExportSpecifier = {\n    ...$Exact<NamedDeclaration>,\n    kind: typeof SyntaxKind.ExportSpecifier,\n    parent: NamedExports,\n    propertyName?: Identifier,\n    name: Identifier,\n    ...\n  };\n\n  declare type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;\n  declare type ExportAssignment = {\n    ...$Exact<DeclarationStatement>,\n    kind: typeof SyntaxKind.ExportAssignment,\n    parent: SourceFile,\n    isExportEquals?: boolean,\n    expression: Expression,\n    ...\n  };\n\n  declare type FileReference = {\n    ...$Exact<TextRange>,\n    fileName: string,\n    ...\n  };\n\n  declare type CheckJsDirective = {\n    ...$Exact<TextRange>,\n    enabled: boolean,\n    ...\n  };\n\n  declare type CommentKind =\n    | typeof SyntaxKind.SingleLineCommentTrivia\n    | typeof SyntaxKind.MultiLineCommentTrivia;\n  declare type CommentRange = {\n    ...$Exact<TextRange>,\n    hasTrailingNewLine?: boolean,\n    kind: CommentKind,\n    ...\n  };\n\n  declare type SynthesizedComment = {\n    ...$Exact<CommentRange>,\n    text: string,\n    pos: -1,\n    end: -1,\n    ...\n  };\n\n  declare type JSDocTypeExpression = {\n    ...$Exact<TypeNode>,\n    kind: typeof SyntaxKind.JSDocTypeExpression,\n    type: TypeNode,\n    ...\n  };\n\n  declare type JSDocType = {\n    ...$Exact<TypeNode>,\n    _jsDocTypeBrand: any,\n    ...\n  };\n\n  declare type JSDocAllType = {\n    ...$Exact<JSDocType>,\n    kind: typeof SyntaxKind.JSDocAllType,\n    ...\n  };\n\n  declare type JSDocUnknownType = {\n    ...$Exact<JSDocType>,\n    kind: typeof SyntaxKind.JSDocUnknownType,\n    ...\n  };\n\n  declare type JSDocNonNullableType = {\n    ...$Exact<JSDocType>,\n    kind: typeof SyntaxKind.JSDocNonNullableType,\n    type: TypeNode,\n    ...\n  };\n\n  declare type JSDocNullableType = {\n    ...$Exact<JSDocType>,\n    kind: typeof SyntaxKind.JSDocNullableType,\n    type: TypeNode,\n    ...\n  };\n\n  declare type JSDocOptionalType = {\n    ...$Exact<JSDocType>,\n    kind: typeof SyntaxKind.JSDocOptionalType,\n    type: TypeNode,\n    ...\n  };\n\n  declare type JSDocFunctionType = {\n    ...$Exact<JSDocType>,\n    ...$Exact<SignatureDeclarationBase>,\n    kind: typeof SyntaxKind.JSDocFunctionType,\n    ...\n  };\n\n  declare type JSDocVariadicType = {\n    ...$Exact<JSDocType>,\n    kind: typeof SyntaxKind.JSDocVariadicType,\n    type: TypeNode,\n    ...\n  };\n\n  declare type JSDocTypeReferencingNode =\n    | JSDocVariadicType\n    | JSDocOptionalType\n    | JSDocNullableType\n    | JSDocNonNullableType;\n  declare type JSDoc = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.JSDocComment,\n    parent: HasJSDoc,\n    tags?: NodeArray<JSDocTag>,\n    comment?: string,\n    ...\n  };\n\n  declare type JSDocTag = {\n    ...$Exact<Node>,\n    parent: JSDoc | JSDocTypeLiteral,\n    tagName: Identifier,\n    comment?: string,\n    ...\n  };\n\n  declare type JSDocUnknownTag = {\n    ...$Exact<JSDocTag>,\n    kind: typeof SyntaxKind.JSDocTag,\n    ...\n  };\n\n  declare type JSDocAugmentsTag = {\n    ...$Exact<JSDocTag>,\n    kind: typeof SyntaxKind.JSDocAugmentsTag,\n    class: ExpressionWithTypeArguments & { expression: Identifier | PropertyAccessEntityNameExpression, ... },\n    ...\n  };\n\n  declare type JSDocClassTag = {\n    ...$Exact<JSDocTag>,\n    kind: typeof SyntaxKind.JSDocClassTag,\n    ...\n  };\n\n  declare type JSDocEnumTag = {\n    ...$Exact<JSDocTag>,\n    kind: typeof SyntaxKind.JSDocEnumTag,\n    typeExpression?: JSDocTypeExpression,\n    ...\n  };\n\n  declare type JSDocThisTag = {\n    ...$Exact<JSDocTag>,\n    kind: typeof SyntaxKind.JSDocThisTag,\n    typeExpression?: JSDocTypeExpression,\n    ...\n  };\n\n  declare type JSDocTemplateTag = {\n    ...$Exact<JSDocTag>,\n    kind: typeof SyntaxKind.JSDocTemplateTag,\n    constraint: JSDocTypeExpression | void,\n    typeParameters: NodeArray<TypeParameterDeclaration>,\n    ...\n  };\n\n  declare type JSDocReturnTag = {\n    ...$Exact<JSDocTag>,\n    kind: typeof SyntaxKind.JSDocReturnTag,\n    typeExpression?: JSDocTypeExpression,\n    ...\n  };\n\n  declare type JSDocTypeTag = {\n    ...$Exact<JSDocTag>,\n    kind: typeof SyntaxKind.JSDocTypeTag,\n    typeExpression?: JSDocTypeExpression,\n    ...\n  };\n\n  declare type JSDocTypedefTag = {\n    ...$Exact<JSDocTag>,\n    ...$Exact<NamedDeclaration>,\n    parent: JSDoc,\n    kind: typeof SyntaxKind.JSDocTypedefTag,\n    fullName?: JSDocNamespaceDeclaration | Identifier,\n    name?: Identifier,\n    typeExpression?: JSDocTypeExpression | JSDocTypeLiteral,\n    ...\n  };\n\n  declare type JSDocCallbackTag = {\n    ...$Exact<JSDocTag>,\n    ...$Exact<NamedDeclaration>,\n    parent: JSDoc,\n    kind: typeof SyntaxKind.JSDocCallbackTag,\n    fullName?: JSDocNamespaceDeclaration | Identifier,\n    name?: Identifier,\n    typeExpression: JSDocSignature,\n    ...\n  };\n\n  declare type JSDocSignature = {\n    ...$Exact<JSDocType>,\n    ...$Exact<Declaration>,\n    kind: typeof SyntaxKind.JSDocSignature,\n    typeParameters?: $ReadOnlyArray<JSDocTemplateTag>,\n    parameters: $ReadOnlyArray<JSDocParameterTag>,\n    type: JSDocReturnTag | void,\n    ...\n  };\n\n  declare type JSDocPropertyLikeTag = {\n    ...$Exact<JSDocTag>,\n    ...$Exact<Declaration>,\n    parent: JSDoc,\n    name: EntityName,\n    typeExpression?: JSDocTypeExpression,\n    isNameFirst: boolean,\n    isBracketed: boolean,\n    ...\n  };\n\n  declare type JSDocPropertyTag = {\n    ...$Exact<JSDocPropertyLikeTag>,\n    kind: typeof SyntaxKind.JSDocPropertyTag,\n    ...\n  };\n\n  declare type JSDocParameterTag = {\n    ...$Exact<JSDocPropertyLikeTag>,\n    kind: typeof SyntaxKind.JSDocParameterTag,\n    ...\n  };\n\n  declare type JSDocTypeLiteral = {\n    ...$Exact<JSDocType>,\n    kind: typeof SyntaxKind.JSDocTypeLiteral,\n    jsDocPropertyTags?: $ReadOnlyArray<JSDocPropertyLikeTag>,\n    isArrayType?: boolean,\n    ...\n  };\n\n  declare var FlowFlags: {\n    // 1\n    +Unreachable: 1,\n    // 2\n    +Start: 2,\n    // 4\n    +BranchLabel: 4,\n    // 8\n    +LoopLabel: 8,\n    // 16\n    +Assignment: 16,\n    // 32\n    +TrueCondition: 32,\n    // 64\n    +FalseCondition: 64,\n    // 128\n    +SwitchClause: 128,\n    // 256\n    +ArrayMutation: 256,\n    // 512\n    +Referenced: 512,\n    // 1024\n    +Shared: 1024,\n    // 2048\n    +PreFinally: 2048,\n    // 4096\n    +AfterFinally: 4096,\n    // 12\n    +Label: 12,\n    // 96\n    +Condition: 96,\n    ...\n  };\n\n  declare type FlowLock = { locked?: boolean, ... };\n\n  declare type AfterFinallyFlow = {\n    ...$Exact<FlowNodeBase>,\n    ...$Exact<FlowLock>,\n    antecedent: FlowNode,\n    ...\n  };\n\n  declare type PreFinallyFlow = {\n    ...$Exact<FlowNodeBase>,\n    antecedent: FlowNode,\n    lock: FlowLock,\n    ...\n  };\n\n  declare type FlowNode =\n    | AfterFinallyFlow\n    | PreFinallyFlow\n    | FlowStart\n    | FlowLabel\n    | FlowAssignment\n    | FlowCondition\n    | FlowSwitchClause\n    | FlowArrayMutation;\n  declare type FlowNodeBase = {\n    flags: $Values<typeof FlowFlags>,\n    id?: number,\n    ...\n  };\n\n  declare type FlowStart = {\n    ...$Exact<FlowNodeBase>,\n    container?: FunctionExpression | ArrowFunction | MethodDeclaration,\n    ...\n  };\n\n  declare type FlowLabel = {\n    ...$Exact<FlowNodeBase>,\n    antecedents: FlowNode[] | void,\n    ...\n  };\n\n  declare type FlowAssignment = {\n    ...$Exact<FlowNodeBase>,\n    node: Expression | VariableDeclaration | BindingElement,\n    antecedent: FlowNode,\n    ...\n  };\n\n  declare type FlowCondition = {\n    ...$Exact<FlowNodeBase>,\n    expression: Expression,\n    antecedent: FlowNode,\n    ...\n  };\n\n  declare type FlowSwitchClause = {\n    ...$Exact<FlowNodeBase>,\n    switchStatement: SwitchStatement,\n    clauseStart: number,\n    clauseEnd: number,\n    antecedent: FlowNode,\n    ...\n  };\n\n  declare type FlowArrayMutation = {\n    ...$Exact<FlowNodeBase>,\n    node: CallExpression | BinaryExpression,\n    antecedent: FlowNode,\n    ...\n  };\n\n  declare type FlowType = Type | IncompleteType;\n  declare type IncompleteType = {\n    flags: $Values<typeof TypeFlags>,\n    type: Type,\n    ...\n  };\n\n  declare type AmdDependency = {\n    path: string,\n    name?: string,\n    ...\n  };\n\n  declare type SourceFile = {\n    ...$Exact<Declaration>,\n    kind: typeof SyntaxKind.SourceFile,\n    statements: NodeArray<Statement>,\n    endOfFileToken: Token<typeof SyntaxKind.EndOfFileToken>,\n    fileName: string,\n    text: string,\n    amdDependencies: $ReadOnlyArray<AmdDependency>,\n    moduleName?: string,\n    referencedFiles: $ReadOnlyArray<FileReference>,\n    typeReferenceDirectives: $ReadOnlyArray<FileReference>,\n    libReferenceDirectives: $ReadOnlyArray<FileReference>,\n    languageVariant: $Values<typeof LanguageVariant>,\n    isDeclarationFile: boolean,\n    hasNoDefaultLib: boolean,\n    languageVersion: $Values<typeof ScriptTarget>,\n    getLineAndCharacterOfPosition(pos: number): LineAndCharacter,\n    getLineEndOfPosition(pos: number): number,\n    getLineStarts(): $ReadOnlyArray<number>,\n    getPositionOfLineAndCharacter(line: number, character: number): number,\n    update(newText: string, textChangeRange: TextChangeRange): SourceFile,\n    ...\n  };\n\n  declare type Bundle = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.Bundle,\n    prepends: $ReadOnlyArray<InputFiles | UnparsedSource>,\n    sourceFiles: $ReadOnlyArray<SourceFile>,\n    ...\n  };\n\n  declare type InputFiles = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.InputFiles,\n    javascriptPath?: string,\n    javascriptText: string,\n    javascriptMapPath?: string,\n    javascriptMapText?: string,\n    declarationPath?: string,\n    declarationText: string,\n    declarationMapPath?: string,\n    declarationMapText?: string,\n    ...\n  };\n\n  declare type UnparsedSource = {\n    ...$Exact<Node>,\n    kind: typeof SyntaxKind.UnparsedSource,\n    fileName?: string,\n    text: string,\n    sourceMapPath?: string,\n    sourceMapText?: string,\n    ...\n  };\n\n  declare type JsonSourceFile = {\n    ...$Exact<SourceFile>,\n    statements: NodeArray<JsonObjectExpressionStatement>,\n    ...\n  };\n\n  declare type TsConfigSourceFile = {\n    ...$Exact<JsonSourceFile>,\n    extendedSourceFiles?: string[],\n    ...\n  };\n\n  declare type JsonMinusNumericLiteral = {\n    ...$Exact<PrefixUnaryExpression>,\n    kind: typeof SyntaxKind.PrefixUnaryExpression,\n    operator: typeof SyntaxKind.MinusToken,\n    operand: NumericLiteral,\n    ...\n  };\n\n  declare type JsonObjectExpressionStatement = {\n    ...$Exact<ExpressionStatement>,\n    expression:\n      | ObjectLiteralExpression\n      | ArrayLiteralExpression\n      | JsonMinusNumericLiteral\n      | NumericLiteral\n      | StringLiteral\n      | BooleanLiteral\n      | NullLiteral,\n    ...\n  };\n\n  declare type ScriptReferenceHost = {\n    getCompilerOptions(): CompilerOptions,\n    getSourceFile(fileName: string): SourceFile | void,\n    getSourceFileByPath(path: Path): SourceFile | void,\n    getCurrentDirectory(): string,\n    ...\n  };\n\n  declare interface ParseConfigHost {\n    useCaseSensitiveFileNames: boolean,\n    readDirectory(\n      rootDir: string,\n      extensions: $ReadOnlyArray<string>,\n      excludes: $ReadOnlyArray<string> | void,\n      includes: $ReadOnlyArray<string>,\n      depth?: number\n    ): $ReadOnlyArray<string>,\n    fileExists(path: string): boolean,\n    readFile(path: string): string | void,\n    trace?: (s: string) => void\n  }\n\n  declare type ResolvedConfigFileName = string & { _isResolvedConfigFileName: empty, ... };\n  declare type WriteFileCallback = (\n    fileName: string,\n    data: string,\n    writeByteOrderMark: boolean,\n    onError?: (message: string) => void,\n    sourceFiles?: $ReadOnlyArray<SourceFile>\n  ) => void;\n  declare class OperationCanceledException {}\n  declare type CancellationToken = {\n    isCancellationRequested(): boolean,\n    throwIfCancellationRequested(): void,\n    ...\n  };\n\n  declare type Program = {\n    ...$Exact<ScriptReferenceHost>,\n    getRootFileNames(): $ReadOnlyArray<string>,\n    getSourceFiles(): $ReadOnlyArray<SourceFile>,\n    emit(\n      targetSourceFile?: SourceFile,\n      writeFile?: WriteFileCallback,\n      cancellationToken?: CancellationToken,\n      emitOnlyDtsFiles?: boolean,\n      customTransformers?: CustomTransformers\n    ): EmitResult,\n    getOptionsDiagnostics(\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<Diagnostic>,\n    getGlobalDiagnostics(\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<Diagnostic>,\n    getSyntacticDiagnostics(\n      sourceFile?: SourceFile,\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<DiagnosticWithLocation>,\n    getSemanticDiagnostics(\n      sourceFile?: SourceFile,\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<Diagnostic>,\n    getDeclarationDiagnostics(\n      sourceFile?: SourceFile,\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<DiagnosticWithLocation>,\n    getConfigFileParsingDiagnostics(): $ReadOnlyArray<Diagnostic>,\n    getTypeChecker(): TypeChecker,\n    isSourceFileFromExternalLibrary(file: SourceFile): boolean,\n    isSourceFileDefaultLibrary(file: SourceFile): boolean,\n    getProjectReferences(): $ReadOnlyArray<ProjectReference> | void,\n    getResolvedProjectReferences(): $ReadOnlyArray<ResolvedProjectReference | void> | void,\n    ...\n  };\n\n  declare type ResolvedProjectReference = {\n    commandLine: ParsedCommandLine,\n    sourceFile: SourceFile,\n    references?: $ReadOnlyArray<ResolvedProjectReference | void>,\n    ...\n  };\n\n  declare type CustomTransformers = {\n    before?: TransformerFactory<SourceFile>[],\n    after?: TransformerFactory<SourceFile>[],\n    afterDeclarations?: TransformerFactory<Bundle | SourceFile>[],\n    ...\n  };\n\n  declare type SourceMapSpan = {\n    emittedLine: number,\n    emittedColumn: number,\n    sourceLine: number,\n    sourceColumn: number,\n    nameIndex?: number,\n    sourceIndex: number,\n    ...\n  };\n\n  declare var ExitStatus: {\n    // 0\n    +Success: 0,\n    // 1\n    +DiagnosticsPresent_OutputsSkipped: 1,\n    // 2\n    +DiagnosticsPresent_OutputsGenerated: 2,\n    ...\n  };\n\n  declare type EmitResult = {\n    emitSkipped: boolean,\n    diagnostics: $ReadOnlyArray<Diagnostic>,\n    emittedFiles?: string[],\n    ...\n  };\n\n  declare type TypeChecker = {\n    getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type,\n    getDeclaredTypeOfSymbol(symbol: Symbol): Type,\n    getPropertiesOfType(type: Type): Symbol[],\n    getPropertyOfType(type: Type, propertyName: string): Symbol | void,\n    getIndexInfoOfType(\n      type: Type,\n      kind: $Values<typeof IndexKind>\n    ): IndexInfo | void,\n    getSignaturesOfType(\n      type: Type,\n      kind: $Values<typeof SignatureKind>\n    ): $ReadOnlyArray<Signature>,\n    getIndexTypeOfType(\n      type: Type,\n      kind: $Values<typeof IndexKind>\n    ): Type | void,\n    getBaseTypes(type: InterfaceType): BaseType[],\n    getBaseTypeOfLiteralType(type: Type): Type,\n    getWidenedType(type: Type): Type,\n    getReturnTypeOfSignature(signature: Signature): Type,\n    getNullableType(type: Type, flags: $Values<typeof TypeFlags>): Type,\n    getNonNullableType(type: Type): Type,\n    typeToTypeNode(\n      type: Type,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof NodeBuilderFlags>\n    ): TypeNode | void,\n    signatureToSignatureDeclaration(\n      signature: Signature,\n      kind: $Values<typeof SyntaxKind>,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof NodeBuilderFlags>\n    ):\n      | (SignatureDeclaration & { typeArguments?: NodeArray<TypeNode>, ... })\n      | void,\n    indexInfoToIndexSignatureDeclaration(\n      indexInfo: IndexInfo,\n      kind: $Values<typeof IndexKind>,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof NodeBuilderFlags>\n    ): IndexSignatureDeclaration | void,\n    symbolToEntityName(\n      symbol: Symbol,\n      meaning: $Values<typeof SymbolFlags>,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof NodeBuilderFlags>\n    ): EntityName | void,\n    symbolToExpression(\n      symbol: Symbol,\n      meaning: $Values<typeof SymbolFlags>,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof NodeBuilderFlags>\n    ): Expression | void,\n    symbolToTypeParameterDeclarations(\n      symbol: Symbol,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof NodeBuilderFlags>\n    ): NodeArray<TypeParameterDeclaration> | void,\n    symbolToParameterDeclaration(\n      symbol: Symbol,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof NodeBuilderFlags>\n    ): ParameterDeclaration | void,\n    typeParameterToDeclaration(\n      parameter: TypeParameter,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof NodeBuilderFlags>\n    ): TypeParameterDeclaration | void,\n    getSymbolsInScope(\n      location: Node,\n      meaning: $Values<typeof SymbolFlags>\n    ): Symbol[],\n    getSymbolAtLocation(node: Node): Symbol | void,\n    getSymbolsOfParameterPropertyDeclaration(\n      parameter: ParameterDeclaration,\n      parameterName: string\n    ): Symbol[],\n    getShorthandAssignmentValueSymbol(location: Node): Symbol | void,\n    getExportSpecifierLocalTargetSymbol(\n      location: ExportSpecifier\n    ): Symbol | void,\n    getExportSymbolOfSymbol(symbol: Symbol): Symbol,\n    getPropertySymbolOfDestructuringAssignment(\n      location: Identifier\n    ): Symbol | void,\n    getTypeAtLocation(node: Node): Type,\n    getTypeFromTypeNode(node: TypeNode): Type,\n    signatureToString(\n      signature: Signature,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof TypeFormatFlags>,\n      kind?: $Values<typeof SignatureKind>\n    ): string,\n    typeToString(\n      type: Type,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof TypeFormatFlags>\n    ): string,\n    symbolToString(\n      symbol: Symbol,\n      enclosingDeclaration?: Node,\n      meaning?: $Values<typeof SymbolFlags>,\n      flags?: $Values<typeof SymbolFormatFlags>\n    ): string,\n    typePredicateToString(\n      predicate: TypePredicate,\n      enclosingDeclaration?: Node,\n      flags?: $Values<typeof TypeFormatFlags>\n    ): string,\n    getFullyQualifiedName(symbol: Symbol): string,\n    getAugmentedPropertiesOfType(type: Type): Symbol[],\n    getRootSymbols(symbol: Symbol): $ReadOnlyArray<Symbol>,\n    getContextualType(node: Expression): Type | void,\n    getResolvedSignature(\n      node: CallLikeExpression,\n      candidatesOutArray?: Signature[],\n      argumentCount?: number\n    ): Signature | void,\n    getSignatureFromDeclaration(\n      declaration: SignatureDeclaration\n    ): Signature | void,\n    isImplementationOfOverload(node: SignatureDeclaration): boolean | void,\n    isUndefinedSymbol(symbol: Symbol): boolean,\n    isArgumentsSymbol(symbol: Symbol): boolean,\n    isUnknownSymbol(symbol: Symbol): boolean,\n    getConstantValue(\n      node: EnumMember | PropertyAccessExpression | ElementAccessExpression\n    ): string | number | void,\n    isValidPropertyAccess(\n      node: PropertyAccessExpression | QualifiedName | ImportTypeNode,\n      propertyName: string\n    ): boolean,\n    getAliasedSymbol(symbol: Symbol): Symbol,\n    getExportsOfModule(moduleSymbol: Symbol): Symbol[],\n    getJsxIntrinsicTagNamesAt(location: Node): Symbol[],\n    isOptionalParameter(node: ParameterDeclaration): boolean,\n    getAmbientModules(): Symbol[],\n    tryGetMemberInModuleExports(\n      memberName: string,\n      moduleSymbol: Symbol\n    ): Symbol | void,\n    getApparentType(type: Type): Type,\n    getBaseConstraintOfType(type: Type): Type | void,\n    getDefaultFromTypeParameter(type: Type): Type | void,\n    runWithCancellationToken<T>(\n      token: CancellationToken,\n      cb: (checker: TypeChecker) => T\n    ): T,\n    ...\n  };\n\n  declare var NodeBuilderFlags: {\n    // 0\n    +None: 0,\n    // 1\n    +NoTruncation: 1,\n    // 2\n    +WriteArrayAsGenericType: 2,\n    // 4\n    +GenerateNamesForShadowedTypeParams: 4,\n    // 8\n    +UseStructuralFallback: 8,\n    // 16\n    +ForbidIndexedAccessSymbolReferences: 16,\n    // 32\n    +WriteTypeArgumentsOfSignature: 32,\n    // 64\n    +UseFullyQualifiedType: 64,\n    // 128\n    +UseOnlyExternalAliasing: 128,\n    // 256\n    +SuppressAnyReturnType: 256,\n    // 512\n    +WriteTypeParametersInQualifiedName: 512,\n    // 1024\n    +MultilineObjectLiterals: 1024,\n    // 2048\n    +WriteClassExpressionAsTypeLiteral: 2048,\n    // 4096\n    +UseTypeOfFunction: 4096,\n    // 8192\n    +OmitParameterModifiers: 8192,\n    // 16384\n    +UseAliasDefinedOutsideCurrentScope: 16384,\n    // 32768\n    +AllowThisInObjectLiteral: 32768,\n    // 65536\n    +AllowQualifedNameInPlaceOfIdentifier: 65536,\n    // 131072\n    +AllowAnonymousIdentifier: 131072,\n    // 262144\n    +AllowEmptyUnionOrIntersection: 262144,\n    // 524288\n    +AllowEmptyTuple: 524288,\n    // 1048576\n    +AllowUniqueESSymbolType: 1048576,\n    // 2097152\n    +AllowEmptyIndexInfoType: 2097152,\n    // 67108864\n    +AllowNodeModulesRelativePaths: 67108864,\n    // 70221824\n    +IgnoreErrors: 70221824,\n    // 4194304\n    +InObjectTypeLiteral: 4194304,\n    // 8388608\n    +InTypeAlias: 8388608,\n    // 16777216\n    +InInitialEntityName: 16777216,\n    // 33554432\n    +InReverseMappedType: 33554432,\n    ...\n  };\n\n  declare var TypeFormatFlags: {\n    // 0\n    +None: 0,\n    // 1\n    +NoTruncation: 1,\n    // 2\n    +WriteArrayAsGenericType: 2,\n    // 8\n    +UseStructuralFallback: 8,\n    // 32\n    +WriteTypeArgumentsOfSignature: 32,\n    // 64\n    +UseFullyQualifiedType: 64,\n    // 256\n    +SuppressAnyReturnType: 256,\n    // 1024\n    +MultilineObjectLiterals: 1024,\n    // 2048\n    +WriteClassExpressionAsTypeLiteral: 2048,\n    // 4096\n    +UseTypeOfFunction: 4096,\n    // 8192\n    +OmitParameterModifiers: 8192,\n    // 16384\n    +UseAliasDefinedOutsideCurrentScope: 16384,\n    // 1048576\n    +AllowUniqueESSymbolType: 1048576,\n    // 131072\n    +AddUndefined: 131072,\n    // 262144\n    +WriteArrowStyleSignature: 262144,\n    // 524288\n    +InArrayType: 524288,\n    // 2097152\n    +InElementType: 2097152,\n    // 4194304\n    +InFirstTypeArgument: 4194304,\n    // 8388608\n    +InTypeAlias: 8388608,\n    // 0\n    +WriteOwnNameForAnyLike: 0,\n    // 9469291\n    +NodeBuilderFlagsMask: 9469291,\n    ...\n  };\n\n  declare var SymbolFormatFlags: {\n    // 0\n    +None: 0,\n    // 1\n    +WriteTypeParametersOrArguments: 1,\n    // 2\n    +UseOnlyExternalAliasing: 2,\n    // 4\n    +AllowAnyNodeKind: 4,\n    // 8\n    +UseAliasDefinedOutsideCurrentScope: 8,\n    ...\n  };\n\n  declare var TypePredicateKind: {\n    // 0\n    +This: 0,\n    // 1\n    +Identifier: 1,\n    ...\n  };\n\n  declare type TypePredicateBase = {\n    kind: $Values<typeof TypePredicateKind>,\n    type: Type,\n    ...\n  };\n\n  declare type ThisTypePredicate = {\n    ...$Exact<TypePredicateBase>,\n    kind: typeof TypePredicateKind.This,\n    ...\n  };\n\n  declare type IdentifierTypePredicate = {\n    ...$Exact<TypePredicateBase>,\n    kind: typeof TypePredicateKind.Identifier,\n    parameterName: string,\n    parameterIndex: number,\n    ...\n  };\n\n  declare type TypePredicate = IdentifierTypePredicate | ThisTypePredicate;\n\n  declare var SymbolFlags: {\n    // 0\n    +None: 0,\n    // 1\n    +FunctionScopedVariable: 1,\n    // 2\n    +BlockScopedVariable: 2,\n    // 4\n    +Property: 4,\n    // 8\n    +EnumMember: 8,\n    // 16\n    +Function: 16,\n    // 32\n    +Class: 32,\n    // 64\n    +Interface: 64,\n    // 128\n    +ConstEnum: 128,\n    // 256\n    +RegularEnum: 256,\n    // 512\n    +ValueModule: 512,\n    // 1024\n    +NamespaceModule: 1024,\n    // 2048\n    +TypeLiteral: 2048,\n    // 4096\n    +ObjectLiteral: 4096,\n    // 8192\n    +Method: 8192,\n    // 16384\n    +Constructor: 16384,\n    // 32768\n    +GetAccessor: 32768,\n    // 65536\n    +SetAccessor: 65536,\n    // 131072\n    +Signature: 131072,\n    // 262144\n    +TypeParameter: 262144,\n    // 524288\n    +TypeAlias: 524288,\n    // 1048576\n    +ExportValue: 1048576,\n    // 2097152\n    +Alias: 2097152,\n    // 4194304\n    +Prototype: 4194304,\n    // 8388608\n    +ExportStar: 8388608,\n    // 16777216\n    +Optional: 16777216,\n    // 33554432\n    +Transient: 33554432,\n    // 67108864\n    +Assignment: 67108864,\n    // 134217728\n    +ModuleExports: 134217728,\n    // 384\n    +Enum: 384,\n    // 3\n    +Variable: 3,\n    // 67220415\n    +Value: 67220415,\n    // 67897832\n    +Type: 67897832,\n    // 1920\n    +Namespace: 1920,\n    // 1536\n    +Module: 1536,\n    // 98304\n    +Accessor: 98304,\n    // 67220414\n    +FunctionScopedVariableExcludes: 67220414,\n    // 67220415\n    +BlockScopedVariableExcludes: 67220415,\n    // 67220415\n    +ParameterExcludes: 67220415,\n    // 0\n    +PropertyExcludes: 0,\n    // 68008959\n    +EnumMemberExcludes: 68008959,\n    // 67219887\n    +FunctionExcludes: 67219887,\n    // 68008383\n    +ClassExcludes: 68008383,\n    // 67897736\n    +InterfaceExcludes: 67897736,\n    // 68008191\n    +RegularEnumExcludes: 68008191,\n    // 68008831\n    +ConstEnumExcludes: 68008831,\n    // 110735\n    +ValueModuleExcludes: 110735,\n    // 0\n    +NamespaceModuleExcludes: 0,\n    // 67212223\n    +MethodExcludes: 67212223,\n    // 67154879\n    +GetAccessorExcludes: 67154879,\n    // 67187647\n    +SetAccessorExcludes: 67187647,\n    // 67635688\n    +TypeParameterExcludes: 67635688,\n    // 67897832\n    +TypeAliasExcludes: 67897832,\n    // 2097152\n    +AliasExcludes: 2097152,\n    // 2623475\n    +ModuleMember: 2623475,\n    // 944\n    +ExportHasLocal: 944,\n    // 418\n    +BlockScoped: 418,\n    // 98308\n    +PropertyOrAccessor: 98308,\n    // 106500\n    +ClassMember: 106500,\n    ...\n  };\n\n  declare type Symbol = {\n    flags: $Values<typeof SymbolFlags>,\n    escapedName: __String,\n    declarations: Declaration[],\n    valueDeclaration: Declaration,\n    members?: SymbolTable,\n    exports?: SymbolTable,\n    globalExports?: SymbolTable,\n    +name: string,\n    getFlags(): $Values<typeof SymbolFlags>,\n    getEscapedName(): __String,\n    getName(): string,\n    getDeclarations(): Declaration[] | void,\n    getDocumentationComment(\n      typeChecker: TypeChecker | void\n    ): SymbolDisplayPart[],\n    getJsDocTags(): JSDocTagInfo[],\n    ...\n  };\n\n  declare var InternalSymbolName: {\n    // \"__call\"\n    +Call: \"__call\",\n    // \"__constructor\"\n    +Constructor: \"__constructor\",\n    // \"__new\"\n    +New: \"__new\",\n    // \"__index\"\n    +Index: \"__index\",\n    // \"__export\"\n    +ExportStar: \"__export\",\n    // \"__global\"\n    +Global: \"__global\",\n    // \"__missing\"\n    +Missing: \"__missing\",\n    // \"__type\"\n    +Type: \"__type\",\n    // \"__object\"\n    +Object: \"__object\",\n    // \"__jsxAttributes\"\n    +JSXAttributes: \"__jsxAttributes\",\n    // \"__class\"\n    +Class: \"__class\",\n    // \"__function\"\n    +Function: \"__function\",\n    // \"__computed\"\n    +Computed: \"__computed\",\n    // \"__resolving__\"\n    +Resolving: \"__resolving__\",\n    // \"export=\"\n    +ExportEquals: \"export=\",\n    // \"default\"\n    +Default: \"default\",\n    // \"this\"\n    +This: \"this\",\n    ...\n  };\n\n  declare type __String =\n    | (string & { __escapedIdentifier: void, ... })\n    | (void & { __escapedIdentifier: void, ... })\n    | $Values<typeof InternalSymbolName>;\n\n  declare class ReadonlyUnderscoreEscapedMap<T> {\n    get(key: __String): T | void,\n    has(key: __String): boolean,\n    forEach(action: (value: T, key: __String) => void): void,\n    +size: number,\n    keys(): Iterator<__String>,\n    values(): Iterator<T>,\n    entries(): Iterator<[__String, T]>\n  }\n\n  declare class UnderscoreEscapedMap<T> extends ReadonlyUnderscoreEscapedMap<T> {\n    set(key: __String, value: T): this,\n    delete(key: __String): boolean,\n    clear(): void\n  }\n\n  declare type SymbolTable = UnderscoreEscapedMap<Symbol>;\n\n  declare var TypeFlags: {\n    // 1\n    +Any: 1,\n    // 2\n    +Unknown: 2,\n    // 4\n    +String: 4,\n    // 8\n    +Number: 8,\n    // 16\n    +Boolean: 16,\n    // 32\n    +Enum: 32,\n    // 64\n    +BigInt: 64,\n    // 128\n    +StringLiteral: 128,\n    // 256\n    +NumberLiteral: 256,\n    // 512\n    +BooleanLiteral: 512,\n    // 1024\n    +EnumLiteral: 1024,\n    // 2048\n    +BigIntLiteral: 2048,\n    // 4096\n    +ESSymbol: 4096,\n    // 8192\n    +UniqueESSymbol: 8192,\n    // 16384\n    +Void: 16384,\n    // 32768\n    +Undefined: 32768,\n    // 65536\n    +Null: 65536,\n    // 131072\n    +Never: 131072,\n    // 262144\n    +TypeParameter: 262144,\n    // 524288\n    +Object: 524288,\n    // 1048576\n    +Union: 1048576,\n    // 2097152\n    +Intersection: 2097152,\n    // 4194304\n    +Index: 4194304,\n    // 8388608\n    +IndexedAccess: 8388608,\n    // 16777216\n    +Conditional: 16777216,\n    // 33554432\n    +Substitution: 33554432,\n    // 67108864\n    +NonPrimitive: 67108864,\n    // 2944\n    +Literal: 2944,\n    // 109440\n    +Unit: 109440,\n    // 384\n    +StringOrNumberLiteral: 384,\n    // 117724\n    +PossiblyFalsy: 117724,\n    // 132\n    +StringLike: 132,\n    // 296\n    +NumberLike: 296,\n    // 2112\n    +BigIntLike: 2112,\n    // 528\n    +BooleanLike: 528,\n    // 1056\n    +EnumLike: 1056,\n    // 12288\n    +ESSymbolLike: 12288,\n    // 49152\n    +VoidLike: 49152,\n    // 3145728\n    +UnionOrIntersection: 3145728,\n    // 3670016\n    +StructuredType: 3670016,\n    // 8650752\n    +TypeVariable: 8650752,\n    // 58982400\n    +InstantiableNonPrimitive: 58982400,\n    // 4194304\n    +InstantiablePrimitive: 4194304,\n    // 63176704\n    +Instantiable: 63176704,\n    // 66846720\n    +StructuredOrInstantiable: 66846720,\n    // 133970943\n    +Narrowable: 133970943,\n    // 67637251\n    +NotUnionOrUnit: 67637251,\n    ...\n  };\n\n  declare type DestructuringPattern =\n    | BindingPattern\n    | ObjectLiteralExpression\n    | ArrayLiteralExpression;\n  declare type Type = {\n    flags: $Values<typeof TypeFlags>,\n    symbol: Symbol,\n    pattern?: DestructuringPattern,\n    aliasSymbol?: Symbol,\n    aliasTypeArguments?: $ReadOnlyArray<Type>,\n    getFlags(): $Values<typeof TypeFlags>,\n    getSymbol(): Symbol | void,\n    getProperties(): Symbol[],\n    getProperty(propertyName: string): Symbol | void,\n    getApparentProperties(): Symbol[],\n    getCallSignatures(): $ReadOnlyArray<Signature>,\n    getConstructSignatures(): $ReadOnlyArray<Signature>,\n    getStringIndexType(): Type | void,\n    getNumberIndexType(): Type | void,\n    getBaseTypes(): BaseType[] | void,\n    getNonNullableType(): Type,\n    getConstraint(): Type | void,\n    getDefault(): Type | void,\n    isUnion(): boolean,\n    isIntersection(): boolean,\n    isUnionOrIntersection(): boolean,\n    isLiteral(): boolean,\n    isStringLiteral(): boolean,\n    isNumberLiteral(): boolean,\n    isTypeParameter(): boolean,\n    isClassOrInterface(): boolean,\n    isClass(): boolean,\n    ...\n  };\n\n  declare type LiteralType = {\n    ...$Exact<Type>,\n    value: string | number | PseudoBigInt,\n    freshType: LiteralType,\n    regularType: LiteralType,\n    ...\n  };\n\n  declare type UniqueESSymbolType = {\n    ...$Exact<Type>,\n    symbol: Symbol,\n    escapedName: __String,\n    ...\n  };\n\n  declare type StringLiteralType = {\n    ...$Exact<LiteralType>,\n    value: string,\n    ...\n  };\n\n  declare type NumberLiteralType = {\n    ...$Exact<LiteralType>,\n    value: number,\n    ...\n  };\n\n  declare type BigIntLiteralType = {\n    ...$Exact<LiteralType>,\n    value: PseudoBigInt,\n    ...\n  };\n\n  declare type EnumType = { ...$Exact<Type>, ... };\n\n  declare var ObjectFlags: {\n    // 1\n    +Class: 1,\n    // 2\n    +Interface: 2,\n    // 4\n    +Reference: 4,\n    // 8\n    +Tuple: 8,\n    // 16\n    +Anonymous: 16,\n    // 32\n    +Mapped: 32,\n    // 64\n    +Instantiated: 64,\n    // 128\n    +ObjectLiteral: 128,\n    // 256\n    +EvolvingArray: 256,\n    // 512\n    +ObjectLiteralPatternWithComputedProperties: 512,\n    // 1024\n    +ContainsSpread: 1024,\n    // 2048\n    +ReverseMapped: 2048,\n    // 4096\n    +JsxAttributes: 4096,\n    // 8192\n    +MarkerType: 8192,\n    // 16384\n    +JSLiteral: 16384,\n    // 32768\n    +FreshLiteral: 32768,\n    // 3\n    +ClassOrInterface: 3,\n    ...\n  };\n\n  declare type ObjectType = {\n    ...$Exact<Type>,\n    objectFlags: $Values<typeof ObjectFlags>,\n    ...\n  };\n\n  declare type InterfaceType = {\n    ...$Exact<ObjectType>,\n    typeParameters: TypeParameter[] | void,\n    outerTypeParameters: TypeParameter[] | void,\n    localTypeParameters: TypeParameter[] | void,\n    thisType: TypeParameter | void,\n    ...\n  };\n\n  declare type BaseType = ObjectType | IntersectionType;\n  declare type InterfaceTypeWithDeclaredMembers = {\n    ...$Exact<InterfaceType>,\n    declaredProperties: Symbol[],\n    declaredCallSignatures: Signature[],\n    declaredConstructSignatures: Signature[],\n    declaredStringIndexInfo?: IndexInfo,\n    declaredNumberIndexInfo?: IndexInfo,\n    ...\n  };\n\n  declare type TypeReference = {\n    ...$Exact<ObjectType>,\n    target: GenericType,\n    typeArguments?: $ReadOnlyArray<Type>,\n    ...\n  };\n\n  declare type GenericType = {\n    ...$Exact<InterfaceType>,\n    ...$Exact<TypeReference>,\n    ...\n  };\n\n  declare type TupleType = {\n    ...$Exact<GenericType>,\n    minLength: number,\n    hasRestElement: boolean,\n    associatedNames?: __String[],\n    ...\n  };\n\n  declare type TupleTypeReference = {\n    ...$Exact<TypeReference>,\n    target: TupleType,\n    ...\n  };\n\n  declare type UnionOrIntersectionType = {\n    ...$Exact<Type>,\n    types: Type[],\n    ...\n  };\n\n  declare type UnionType = { ...$Exact<UnionOrIntersectionType>, ... };\n\n  declare type IntersectionType = { ...$Exact<UnionOrIntersectionType>, ... };\n\n  declare type StructuredType = ObjectType | UnionType | IntersectionType;\n  declare type EvolvingArrayType = {\n    ...$Exact<ObjectType>,\n    elementType: Type,\n    finalArrayType?: Type,\n    ...\n  };\n\n  declare type InstantiableType = { ...$Exact<Type>, ... };\n\n  declare type TypeParameter = { ...$Exact<InstantiableType>, ... };\n\n  declare type IndexedAccessType = {\n    ...$Exact<InstantiableType>,\n    objectType: Type,\n    indexType: Type,\n    constraint?: Type,\n    simplified?: Type,\n    ...\n  };\n\n  declare type TypeVariable = TypeParameter | IndexedAccessType;\n  declare type IndexType = {\n    ...$Exact<InstantiableType>,\n    type: InstantiableType | UnionOrIntersectionType,\n    ...\n  };\n\n  declare type ConditionalRoot = {\n    node: ConditionalTypeNode,\n    checkType: Type,\n    extendsType: Type,\n    trueType: Type,\n    falseType: Type,\n    isDistributive: boolean,\n    inferTypeParameters?: TypeParameter[],\n    outerTypeParameters?: TypeParameter[],\n    instantiations?: Map<Type>,\n    aliasSymbol?: Symbol,\n    aliasTypeArguments?: Type[],\n    ...\n  };\n\n  declare type ConditionalType = {\n    ...$Exact<InstantiableType>,\n    root: ConditionalRoot,\n    checkType: Type,\n    extendsType: Type,\n    resolvedTrueType?: Type,\n    resolvedFalseType?: Type,\n    ...\n  };\n\n  declare type SubstitutionType = {\n    ...$Exact<InstantiableType>,\n    typeVariable: TypeVariable,\n    substitute: Type,\n    ...\n  };\n\n  declare var SignatureKind: {\n    // 0\n    +Call: 0,\n    // 1\n    +Construct: 1,\n    ...\n  };\n\n  declare type Signature = {\n    declaration?: SignatureDeclaration | JSDocSignature,\n    typeParameters?: $ReadOnlyArray<TypeParameter>,\n    parameters: $ReadOnlyArray<Symbol>,\n    getDeclaration(): SignatureDeclaration,\n    getTypeParameters(): TypeParameter[] | void,\n    getParameters(): Symbol[],\n    getReturnType(): Type,\n    getDocumentationComment(\n      typeChecker: TypeChecker | void\n    ): SymbolDisplayPart[],\n    getJsDocTags(): JSDocTagInfo[],\n    ...\n  };\n\n  declare var IndexKind: {\n    // 0\n    +String: 0,\n    // 1\n    +Number: 1,\n    ...\n  };\n\n  declare type IndexInfo = {\n    type: Type,\n    isReadonly: boolean,\n    declaration?: IndexSignatureDeclaration,\n    ...\n  };\n\n  declare var InferencePriority: {\n    // 1\n    +NakedTypeVariable: 1,\n    // 2\n    +HomomorphicMappedType: 2,\n    // 4\n    +MappedTypeConstraint: 4,\n    // 8\n    +ReturnType: 8,\n    // 16\n    +LiteralKeyof: 16,\n    // 32\n    +NoConstraints: 32,\n    // 64\n    +AlwaysStrict: 64,\n    // 28\n    +PriorityImpliesCombination: 28,\n    ...\n  };\n\n  declare type JsFileExtensionInfo = FileExtensionInfo;\n  declare type FileExtensionInfo = {\n    extension: string,\n    isMixedContent: boolean,\n    scriptKind?: $Values<typeof ScriptKind>,\n    ...\n  };\n\n  declare type DiagnosticMessage = {\n    key: string,\n    category: $Values<typeof DiagnosticCategory>,\n    code: number,\n    message: string,\n    reportsUnnecessary?: {...},\n    ...\n  };\n\n  declare type DiagnosticMessageChain = {\n    messageText: string,\n    category: $Values<typeof DiagnosticCategory>,\n    code: number,\n    next?: DiagnosticMessageChain,\n    ...\n  };\n\n  declare type Diagnostic = {\n    ...$Exact<DiagnosticRelatedInformation>,\n    reportsUnnecessary?: {...},\n    source?: string,\n    relatedInformation?: DiagnosticRelatedInformation[],\n    ...\n  };\n\n  declare type DiagnosticRelatedInformation = {\n    category: $Values<typeof DiagnosticCategory>,\n    code: number,\n    file: SourceFile | void,\n    start: number | void,\n    length: number | void,\n    messageText: string | DiagnosticMessageChain,\n    ...\n  };\n\n  declare type DiagnosticWithLocation = {\n    ...$Exact<Diagnostic>,\n    file: SourceFile,\n    start: number,\n    length: number,\n    ...\n  };\n\n  declare var DiagnosticCategory: {\n    // 0\n    +Warning: 0,\n    // 1\n    +Error: 1,\n    // 2\n    +Suggestion: 2,\n    // 3\n    +Message: 3,\n    ...\n  };\n\n  declare var ModuleResolutionKind: {\n    // 1\n    +Classic: 1,\n    // 2\n    +NodeJs: 2,\n    ...\n  };\n\n  declare type PluginImport = { name: string, ... };\n\n  declare type ProjectReference = {\n    path: string,\n    originalPath?: string,\n    prepend?: boolean,\n    circular?: boolean,\n    ...\n  };\n\n  declare type CompilerOptionsValue =\n    | string\n    | number\n    | boolean\n    | (string | number)[]\n    | string[]\n    | MapLike<string[]>\n    | PluginImport[]\n    | ProjectReference[]\n    | null\n    | void;\n  declare type CompilerOptions = {\n    [option: string]: CompilerOptionsValue | TsConfigSourceFile | void,\n    allowJs?: boolean,\n    allowSyntheticDefaultImports?: boolean,\n    allowUnreachableCode?: boolean,\n    allowUnusedLabels?: boolean,\n    alwaysStrict?: boolean,\n    baseUrl?: string,\n    charset?: string,\n    checkJs?: boolean,\n    declaration?: boolean,\n    declarationMap?: boolean,\n    emitDeclarationOnly?: boolean,\n    declarationDir?: string,\n    disableSizeLimit?: boolean,\n    downlevelIteration?: boolean,\n    emitBOM?: boolean,\n    emitDecoratorMetadata?: boolean,\n    experimentalDecorators?: boolean,\n    forceConsistentCasingInFileNames?: boolean,\n    importHelpers?: boolean,\n    inlineSourceMap?: boolean,\n    inlineSources?: boolean,\n    isolatedModules?: boolean,\n    jsx?: $Values<typeof JsxEmit>,\n    keyofStringsOnly?: boolean,\n    lib?: string[],\n    locale?: string,\n    mapRoot?: string,\n    maxNodeModuleJsDepth?: number,\n    module?: $Values<typeof ModuleKind>,\n    moduleResolution?: $Values<typeof ModuleResolutionKind>,\n    newLine?: $Values<typeof NewLineKind>,\n    noEmit?: boolean,\n    noEmitHelpers?: boolean,\n    noEmitOnError?: boolean,\n    noErrorTruncation?: boolean,\n    noFallthroughCasesInSwitch?: boolean,\n    noImplicitAny?: boolean,\n    noImplicitReturns?: boolean,\n    noImplicitThis?: boolean,\n    noStrictGenericChecks?: boolean,\n    noUnusedLocals?: boolean,\n    noUnusedParameters?: boolean,\n    noImplicitUseStrict?: boolean,\n    noLib?: boolean,\n    noResolve?: boolean,\n    out?: string,\n    outDir?: string,\n    outFile?: string,\n    paths?: MapLike<string[]>,\n    preserveConstEnums?: boolean,\n    preserveSymlinks?: boolean,\n    project?: string,\n    reactNamespace?: string,\n    jsxFactory?: string,\n    composite?: boolean,\n    removeComments?: boolean,\n    rootDir?: string,\n    rootDirs?: string[],\n    skipLibCheck?: boolean,\n    skipDefaultLibCheck?: boolean,\n    sourceMap?: boolean,\n    sourceRoot?: string,\n    strict?: boolean,\n    strictFunctionTypes?: boolean,\n    strictBindCallApply?: boolean,\n    strictNullChecks?: boolean,\n    strictPropertyInitialization?: boolean,\n    stripInternal?: boolean,\n    suppressExcessPropertyErrors?: boolean,\n    suppressImplicitAnyIndexErrors?: boolean,\n    target?: $Values<typeof ScriptTarget>,\n    traceResolution?: boolean,\n    resolveJsonModule?: boolean,\n    types?: string[],\n    typeRoots?: string[],\n    esModuleInterop?: boolean,\n    ...\n  };\n\n  declare type TypeAcquisition = {\n    [option: string]: string[] | boolean | void,\n    enableAutoDiscovery?: boolean,\n    enable?: boolean,\n    include?: string[],\n    exclude?: string[],\n    ...\n  };\n\n  declare var ModuleKind: {\n    // 0\n    +None: 0,\n    // 1\n    +CommonJS: 1,\n    // 2\n    +AMD: 2,\n    // 3\n    +UMD: 3,\n    // 4\n    +System: 4,\n    // 5\n    +ES2015: 5,\n    // 6\n    +ESNext: 6,\n    ...\n  };\n\n  declare var JsxEmit: {\n    // 0\n    +None: 0,\n    // 1\n    +Preserve: 1,\n    // 2\n    +React: 2,\n    // 3\n    +ReactNative: 3,\n    ...\n  };\n\n  declare var NewLineKind: {\n    // 0\n    +CarriageReturnLineFeed: 0,\n    // 1\n    +LineFeed: 1,\n    ...\n  };\n\n  declare type LineAndCharacter = {\n    line: number,\n    character: number,\n    ...\n  };\n\n  declare var ScriptKind: {\n    // 0\n    +Unknown: 0,\n    // 1\n    +JS: 1,\n    // 2\n    +JSX: 2,\n    // 3\n    +TS: 3,\n    // 4\n    +TSX: 4,\n    // 5\n    +External: 5,\n    // 6\n    +JSON: 6,\n    // 7\n    +Deferred: 7,\n    ...\n  };\n\n  declare var ScriptTarget: {\n    // 0\n    +ES3: 0,\n    // 1\n    +ES5: 1,\n    // 2\n    +ES2015: 2,\n    // 3\n    +ES2016: 3,\n    // 4\n    +ES2017: 4,\n    // 5\n    +ES2018: 5,\n    // 6\n    +ESNext: 6,\n    // 100\n    +JSON: 100,\n    // 6\n    +Latest: 6,\n    ...\n  };\n\n  declare var LanguageVariant: {\n    // 0\n    +Standard: 0,\n    // 1\n    +JSX: 1,\n    ...\n  };\n\n  declare type ParsedCommandLine = {\n    options: CompilerOptions,\n    typeAcquisition?: TypeAcquisition,\n    fileNames: string[],\n    projectReferences?: $ReadOnlyArray<ProjectReference>,\n    raw?: any,\n    errors: Diagnostic[],\n    wildcardDirectories?: MapLike<$Values<typeof WatchDirectoryFlags>>,\n    compileOnSave?: boolean,\n    ...\n  };\n\n  declare var WatchDirectoryFlags: {\n    // 0\n    +None: 0,\n    // 1\n    +Recursive: 1,\n    ...\n  };\n\n  declare type ExpandResult = {\n    fileNames: string[],\n    wildcardDirectories: MapLike<$Values<typeof WatchDirectoryFlags>>,\n    ...\n  };\n\n  declare type CreateProgramOptions = {\n    rootNames: $ReadOnlyArray<string>,\n    options: CompilerOptions,\n    projectReferences?: $ReadOnlyArray<ProjectReference>,\n    host?: CompilerHost,\n    oldProgram?: Program,\n    configFileParsingDiagnostics?: $ReadOnlyArray<Diagnostic>,\n    ...\n  };\n\n  declare type ModuleResolutionHost = {\n    fileExists(fileName: string): boolean,\n    readFile(fileName: string): string | void,\n    trace?: (s: string) => void,\n    directoryExists?: (directoryName: string) => boolean,\n    realpath?: (path: string) => string,\n    getCurrentDirectory?: () => string,\n    getDirectories?: (path: string) => string[],\n    ...\n  };\n\n  declare type ResolvedModule = {\n    resolvedFileName: string,\n    isExternalLibraryImport?: boolean,\n    ...\n  };\n\n  declare type ResolvedModuleFull = {\n    ...$Exact<ResolvedModule>,\n    extension: $Values<typeof Extension>,\n    packageId?: PackageId,\n    ...\n  };\n\n  declare type PackageId = {\n    name: string,\n    subModuleName: string,\n    version: string,\n    ...\n  };\n\n  declare var Extension: {\n    // \".ts\"\n    +Ts: \".ts\",\n    // \".tsx\"\n    +Tsx: \".tsx\",\n    // \".d.ts\"\n    +Dts: \".d.ts\",\n    // \".js\"\n    +Js: \".js\",\n    // \".jsx\"\n    +Jsx: \".jsx\",\n    // \".json\"\n    +Json: \".json\",\n    ...\n  };\n\n  declare type ResolvedModuleWithFailedLookupLocations = { +resolvedModule: ResolvedModuleFull | void, ... };\n\n  declare type ResolvedTypeReferenceDirective = {\n    primary: boolean,\n    resolvedFileName: string | void,\n    packageId?: PackageId,\n    isExternalLibraryImport?: boolean,\n    ...\n  };\n\n  declare type ResolvedTypeReferenceDirectiveWithFailedLookupLocations = {\n    +resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | void,\n    +failedLookupLocations: $ReadOnlyArray<string>,\n    ...\n  };\n\n  declare type CompilerHost = {\n    ...$Exact<ModuleResolutionHost>,\n    getSourceFile(\n      fileName: string,\n      languageVersion: $Values<typeof ScriptTarget>,\n      onError?: (message: string) => void,\n      shouldCreateNewSourceFile?: boolean\n    ): SourceFile | void,\n    getSourceFileByPath?: (\n      fileName: string,\n      path: Path,\n      languageVersion: $Values<typeof ScriptTarget>,\n      onError?: (message: string) => void,\n      shouldCreateNewSourceFile?: boolean\n    ) => SourceFile | void,\n    getCancellationToken?: () => CancellationToken,\n    getDefaultLibFileName(options: CompilerOptions): string,\n    getDefaultLibLocation?: () => string,\n    writeFile: WriteFileCallback,\n    getCurrentDirectory(): string,\n    getCanonicalFileName(fileName: string): string,\n    useCaseSensitiveFileNames(): boolean,\n    getNewLine(): string,\n    readDirectory?: (\n      rootDir: string,\n      extensions: $ReadOnlyArray<string>,\n      excludes: $ReadOnlyArray<string> | void,\n      includes: $ReadOnlyArray<string>,\n      depth?: number\n    ) => string[],\n    resolveModuleNames?: (\n      moduleNames: string[],\n      containingFile: string,\n      reusedNames?: string[],\n      redirectedReference?: ResolvedProjectReference\n    ) => (ResolvedModule | void)[],\n    resolveTypeReferenceDirectives?: (\n      typeReferenceDirectiveNames: string[],\n      containingFile: string,\n      redirectedReference?: ResolvedProjectReference\n    ) => (ResolvedTypeReferenceDirective | void)[],\n    getEnvironmentVariable?: (name: string) => string | void,\n    createHash?: (data: string) => string,\n    ...\n  };\n\n  declare type SourceMapRange = {\n    ...$Exact<TextRange>,\n    source?: SourceMapSource,\n    ...\n  };\n\n  declare type SourceMapSource = {\n    fileName: string,\n    text: string,\n    skipTrivia?: (pos: number) => number,\n    getLineAndCharacterOfPosition(pos: number): LineAndCharacter,\n    ...\n  };\n\n  declare var EmitFlags: {\n    // 0\n    +None: 0,\n    // 1\n    +SingleLine: 1,\n    // 2\n    +AdviseOnEmitNode: 2,\n    // 4\n    +NoSubstitution: 4,\n    // 8\n    +CapturesThis: 8,\n    // 16\n    +NoLeadingSourceMap: 16,\n    // 32\n    +NoTrailingSourceMap: 32,\n    // 48\n    +NoSourceMap: 48,\n    // 64\n    +NoNestedSourceMaps: 64,\n    // 128\n    +NoTokenLeadingSourceMaps: 128,\n    // 256\n    +NoTokenTrailingSourceMaps: 256,\n    // 384\n    +NoTokenSourceMaps: 384,\n    // 512\n    +NoLeadingComments: 512,\n    // 1024\n    +NoTrailingComments: 1024,\n    // 1536\n    +NoComments: 1536,\n    // 2048\n    +NoNestedComments: 2048,\n    // 4096\n    +HelperName: 4096,\n    // 8192\n    +ExportName: 8192,\n    // 16384\n    +LocalName: 16384,\n    // 32768\n    +InternalName: 32768,\n    // 65536\n    +Indented: 65536,\n    // 131072\n    +NoIndentation: 131072,\n    // 262144\n    +AsyncFunctionBody: 262144,\n    // 524288\n    +ReuseTempVariableScope: 524288,\n    // 1048576\n    +CustomPrologue: 1048576,\n    // 2097152\n    +NoHoisting: 2097152,\n    // 4194304\n    +HasEndOfDeclarationMarker: 4194304,\n    // 8388608\n    +Iterator: 8388608,\n    // 16777216\n    +NoAsciiEscaping: 16777216,\n    ...\n  };\n\n  declare type EmitHelper = {\n    +name: string,\n    +scoped: boolean,\n    +text: string | ((node: EmitHelperUniqueNameCallback) => string),\n    +priority?: number,\n    ...\n  };\n\n  declare type EmitHelperUniqueNameCallback = (name: string) => string;\n\n  declare var EmitHint: {\n    // 0\n    +SourceFile: 0,\n    // 1\n    +Expression: 1,\n    // 2\n    +IdentifierName: 2,\n    // 3\n    +MappedTypeParameter: 3,\n    // 4\n    +Unspecified: 4,\n    // 5\n    +EmbeddedStatement: 5,\n    ...\n  };\n\n  declare type TransformationContext = {\n    getCompilerOptions(): CompilerOptions,\n    startLexicalEnvironment(): void,\n    suspendLexicalEnvironment(): void,\n    resumeLexicalEnvironment(): void,\n    endLexicalEnvironment(): Statement[] | void,\n    hoistFunctionDeclaration(node: FunctionDeclaration): void,\n    hoistVariableDeclaration(node: Identifier): void,\n    requestEmitHelper(helper: EmitHelper): void,\n    readEmitHelpers(): EmitHelper[] | void,\n    enableSubstitution(kind: $Values<typeof SyntaxKind>): void,\n    isSubstitutionEnabled(node: Node): boolean,\n    onSubstituteNode: (hint: $Values<typeof EmitHint>, node: Node) => Node,\n    enableEmitNotification(kind: $Values<typeof SyntaxKind>): void,\n    isEmitNotificationEnabled(node: Node): boolean,\n    onEmitNode: (\n      hint: $Values<typeof EmitHint>,\n      node: Node,\n      emitCallback: (hint: $Values<typeof EmitHint>, node: Node) => void\n    ) => void,\n    ...\n  };\n\n  declare type TransformationResult<T: Node> = {\n    transformed: T[],\n    diagnostics?: DiagnosticWithLocation[],\n    substituteNode(hint: $Values<typeof EmitHint>, node: Node): Node,\n    emitNodeWithNotification(\n      hint: $Values<typeof EmitHint>,\n      node: Node,\n      emitCallback: (hint: $Values<typeof EmitHint>, node: Node) => void\n    ): void,\n    dispose(): void,\n    ...\n  };\n\n  declare type TransformerFactory<T: Node> = (\n    context: TransformationContext\n  ) => Transformer<T>;\n  declare type Transformer<T: Node> = (node: T) => T;\n  declare type Visitor = (node: Node) => VisitResult<Node>;\n  declare type VisitResult<T: Node> = T | T[] | void;\n  declare type Printer = {\n    printNode(\n      hint: $Values<typeof EmitHint>,\n      node: Node,\n      sourceFile: SourceFile\n    ): string,\n    printList<T: Node>(\n      format: $Values<typeof ListFormat>,\n      list: NodeArray<T>,\n      sourceFile: SourceFile\n    ): string,\n    printFile(sourceFile: SourceFile): string,\n    printBundle(bundle: Bundle): string,\n    ...\n  };\n\n  declare type PrintHandlers = {\n    hasGlobalName?: (name: string) => boolean,\n    onEmitNode?: (\n      hint: $Values<typeof EmitHint>,\n      node: Node | void,\n      emitCallback: (hint: $Values<typeof EmitHint>, node: Node | void) => void\n    ) => void,\n    substituteNode?: (hint: $Values<typeof EmitHint>, node: Node) => Node,\n    ...\n  };\n\n  declare type PrinterOptions = {\n    removeComments?: boolean,\n    newLine?: $Values<typeof NewLineKind>,\n    omitTrailingSemicolon?: boolean,\n    noEmitHelpers?: boolean,\n    ...\n  };\n\n  declare interface GetEffectiveTypeRootsHost {\n    +directoryExists?: (directoryName: string) => boolean,\n    +getCurrentDirectory?: () => string\n  }\n\n  declare type TextSpan = {\n    start: number,\n    length: number,\n    ...\n  };\n\n  declare type TextChangeRange = {\n    span: TextSpan,\n    newLength: number,\n    ...\n  };\n\n  declare type SyntaxList = {\n    ...$Exact<Node>,\n    _children: Node[],\n    ...\n  };\n\n  declare var ListFormat: {\n    // 0\n    +None: 0,\n    // 0\n    +SingleLine: 0,\n    // 1\n    +MultiLine: 1,\n    // 2\n    +PreserveLines: 2,\n    // 3\n    +LinesMask: 3,\n    // 0\n    +NotDelimited: 0,\n    // 4\n    +BarDelimited: 4,\n    // 8\n    +AmpersandDelimited: 8,\n    // 16\n    +CommaDelimited: 16,\n    // 32\n    +AsteriskDelimited: 32,\n    // 60\n    +DelimitersMask: 60,\n    // 64\n    +AllowTrailingComma: 64,\n    // 128\n    +Indented: 128,\n    // 256\n    +SpaceBetweenBraces: 256,\n    // 512\n    +SpaceBetweenSiblings: 512,\n    // 1024\n    +Braces: 1024,\n    // 2048\n    +Parenthesis: 2048,\n    // 4096\n    +AngleBrackets: 4096,\n    // 8192\n    +SquareBrackets: 8192,\n    // 15360\n    +BracketsMask: 15360,\n    // 16384\n    +OptionalIfUndefined: 16384,\n    // 32768\n    +OptionalIfEmpty: 32768,\n    // 49152\n    +Optional: 49152,\n    // 65536\n    +PreferNewLine: 65536,\n    // 131072\n    +NoTrailingNewLine: 131072,\n    // 262144\n    +NoInterveningComments: 262144,\n    // 524288\n    +NoSpaceIfEmpty: 524288,\n    // 1048576\n    +SingleElement: 1048576,\n    // 262656\n    +Modifiers: 262656,\n    // 512\n    +HeritageClauses: 512,\n    // 768\n    +SingleLineTypeLiteralMembers: 768,\n    // 32897\n    +MultiLineTypeLiteralMembers: 32897,\n    // 528\n    +TupleTypeElements: 528,\n    // 516\n    +UnionTypeConstituents: 516,\n    // 520\n    +IntersectionTypeConstituents: 520,\n    // 525136\n    +ObjectBindingPatternElements: 525136,\n    // 524880\n    +ArrayBindingPatternElements: 524880,\n    // 526226\n    +ObjectLiteralExpressionProperties: 526226,\n    // 8914\n    +ArrayLiteralExpressionElements: 8914,\n    // 528\n    +CommaListElements: 528,\n    // 2576\n    +CallExpressionArguments: 2576,\n    // 18960\n    +NewExpressionArguments: 18960,\n    // 262144\n    +TemplateExpressionSpans: 262144,\n    // 768\n    +SingleLineBlockStatements: 768,\n    // 129\n    +MultiLineBlockStatements: 129,\n    // 528\n    +VariableDeclarationList: 528,\n    // 768\n    +SingleLineFunctionBodyStatements: 768,\n    // 1\n    +MultiLineFunctionBodyStatements: 1,\n    // 0\n    +ClassHeritageClauses: 0,\n    // 129\n    +ClassMembers: 129,\n    // 129\n    +InterfaceMembers: 129,\n    // 145\n    +EnumMembers: 145,\n    // 129\n    +CaseBlockClauses: 129,\n    // 525136\n    +NamedImportsOrExportsElements: 525136,\n    // 262144\n    +JsxElementOrFragmentChildren: 262144,\n    // 262656\n    +JsxElementAttributes: 262656,\n    // 163969\n    +CaseOrDefaultClauseStatements: 163969,\n    // 528\n    +HeritageClauseTypes: 528,\n    // 131073\n    +SourceFileStatements: 131073,\n    // 49153\n    +Decorators: 49153,\n    // 53776\n    +TypeArguments: 53776,\n    // 53776\n    +TypeParameters: 53776,\n    // 2576\n    +Parameters: 2576,\n    // 8848\n    +IndexSignatureParameters: 8848,\n    // 33\n    +JSDocComment: 33,\n    ...\n  };\n\n  declare type UserPreferences = {\n    +disableSuggestions?: boolean,\n    +quotePreference?: \"auto\" | \"double\" | \"single\",\n    +includeCompletionsForModuleExports?: boolean,\n    +includeCompletionsWithInsertText?: boolean,\n    +importModuleSpecifierPreference?: \"relative\" | \"non-relative\",\n    +importModuleSpecifierEnding?: \"minimal\" | \"index\" | \"js\",\n    +allowTextChangesInNewFiles?: boolean,\n    +providePrefixAndSuffixTextForRename?: boolean,\n    ...\n  };\n\n  declare type PseudoBigInt = {\n    negative: boolean,\n    base10Value: string,\n    ...\n  };\n\n  declare var FileWatcherEventKind: {\n    // 0\n    +Created: 0,\n    // 1\n    +Changed: 1,\n    // 2\n    +Deleted: 2,\n    ...\n  };\n\n  declare type FileWatcherCallback = (\n    fileName: string,\n    eventKind: $Values<typeof FileWatcherEventKind>\n  ) => void;\n  declare type DirectoryWatcherCallback = (fileName: string) => void;\n  declare type System = {\n    args: string[],\n    newLine: string,\n    useCaseSensitiveFileNames: boolean,\n    write(s: string): void,\n    writeOutputIsTTY?: () => boolean,\n    readFile(path: string, encoding?: string): string | void,\n    getFileSize?: (path: string) => number,\n    writeFile(path: string, data: string, writeByteOrderMark?: boolean): void,\n    watchFile?: (\n      path: string,\n      callback: FileWatcherCallback,\n      pollingInterval?: number\n    ) => FileWatcher,\n    watchDirectory?: (\n      path: string,\n      callback: DirectoryWatcherCallback,\n      recursive?: boolean\n    ) => FileWatcher,\n    resolvePath(path: string): string,\n    fileExists(path: string): boolean,\n    directoryExists(path: string): boolean,\n    createDirectory(path: string): void,\n    getExecutingFilePath(): string,\n    getCurrentDirectory(): string,\n    getDirectories(path: string): string[],\n    readDirectory(\n      path: string,\n      extensions?: $ReadOnlyArray<string>,\n      exclude?: $ReadOnlyArray<string>,\n      include?: $ReadOnlyArray<string>,\n      depth?: number\n    ): string[],\n    getModifiedTime?: (path: string) => Date | void,\n    setModifiedTime?: (path: string, time: Date) => void,\n    deleteFile?: (path: string) => void,\n    createHash?: (data: string) => string,\n    createSHA256Hash?: (data: string) => string,\n    getMemoryUsage?: () => number,\n    exit(exitCode?: number): void,\n    realpath?: (path: string) => string,\n    setTimeout?: (\n      callback: (...args: any[]) => void,\n      ms: number,\n      ...args: any[]\n    ) => any,\n    clearTimeout?: (timeoutId: any) => void,\n    clearScreen?: () => void,\n    base64decode?: (input: string) => string,\n    base64encode?: (input: string) => string,\n    ...\n  };\n\n  declare type FileWatcher = { close(): void, ... };\n\n  declare function getNodeMajorVersion(): number | void;\n\n  declare var sys: System;\n  declare type ErrorCallback = (\n    message: DiagnosticMessage,\n    length: number\n  ) => void;\n  declare type Scanner = {\n    getStartPos(): number,\n    getToken(): $Values<typeof SyntaxKind>,\n    getTextPos(): number,\n    getTokenPos(): number,\n    getTokenText(): string,\n    getTokenValue(): string,\n    hasExtendedUnicodeEscape(): boolean,\n    hasPrecedingLineBreak(): boolean,\n    isIdentifier(): boolean,\n    isReservedWord(): boolean,\n    isUnterminated(): boolean,\n    reScanGreaterToken(): $Values<typeof SyntaxKind>,\n    reScanSlashToken(): $Values<typeof SyntaxKind>,\n    reScanTemplateToken(): $Values<typeof SyntaxKind>,\n    scanJsxIdentifier(): $Values<typeof SyntaxKind>,\n    scanJsxAttributeValue(): $Values<typeof SyntaxKind>,\n    reScanJsxToken(): JsxTokenSyntaxKind,\n    reScanLessThanToken(): $Values<typeof SyntaxKind>,\n    scanJsxToken(): JsxTokenSyntaxKind,\n    scanJSDocToken(): JsDocSyntaxKind,\n    scan(): $Values<typeof SyntaxKind>,\n    getText(): string,\n    setText(text: string | void, start?: number, length?: number): void,\n    setOnError(onError: ErrorCallback | void): void,\n    setScriptTarget(scriptTarget: $Values<typeof ScriptTarget>): void,\n    setLanguageVariant(variant: $Values<typeof LanguageVariant>): void,\n    setTextPos(textPos: number): void,\n    lookAhead<T>(callback: () => T): T,\n    scanRange<T>(start: number, length: number, callback: () => T): T,\n    tryScan<T>(callback: () => T): T,\n    ...\n  };\n\n  declare function tokenToString(t: $Values<typeof SyntaxKind>): string | void;\n\n  declare function getPositionOfLineAndCharacter(\n    sourceFile: SourceFileLike,\n    line: number,\n    character: number\n  ): number;\n\n  declare function getLineAndCharacterOfPosition(\n    sourceFile: SourceFileLike,\n    position: number\n  ): LineAndCharacter;\n\n  declare function isWhiteSpaceLike(ch: number): boolean;\n\n  declare function isWhiteSpaceSingleLine(ch: number): boolean;\n\n  declare function isLineBreak(ch: number): boolean;\n\n  declare function couldStartTrivia(text: string, pos: number): boolean;\n\n  declare function forEachLeadingCommentRange<U>(\n    text: string,\n    pos: number,\n    cb: (\n      pos: number,\n      end: number,\n      kind: CommentKind,\n      hasTrailingNewLine: boolean\n    ) => U\n  ): U | void;\n\n  declare function forEachLeadingCommentRange<T, U>(\n    text: string,\n    pos: number,\n    cb: (\n      pos: number,\n      end: number,\n      kind: CommentKind,\n      hasTrailingNewLine: boolean,\n      state: T\n    ) => U,\n    state: T\n  ): U | void;\n\n  declare function forEachTrailingCommentRange<U>(\n    text: string,\n    pos: number,\n    cb: (\n      pos: number,\n      end: number,\n      kind: CommentKind,\n      hasTrailingNewLine: boolean\n    ) => U\n  ): U | void;\n\n  declare function forEachTrailingCommentRange<T, U>(\n    text: string,\n    pos: number,\n    cb: (\n      pos: number,\n      end: number,\n      kind: CommentKind,\n      hasTrailingNewLine: boolean,\n      state: T\n    ) => U,\n    state: T\n  ): U | void;\n\n  declare function reduceEachLeadingCommentRange<T, U>(\n    text: string,\n    pos: number,\n    cb: (\n      pos: number,\n      end: number,\n      kind: CommentKind,\n      hasTrailingNewLine: boolean,\n      state: T,\n      memo: U\n    ) => U,\n    state: T,\n    initial: U\n  ): U | void;\n\n  declare function reduceEachTrailingCommentRange<T, U>(\n    text: string,\n    pos: number,\n    cb: (\n      pos: number,\n      end: number,\n      kind: CommentKind,\n      hasTrailingNewLine: boolean,\n      state: T,\n      memo: U\n    ) => U,\n    state: T,\n    initial: U\n  ): U | void;\n\n  declare function getLeadingCommentRanges(\n    text: string,\n    pos: number\n  ): CommentRange[] | void;\n\n  declare function getTrailingCommentRanges(\n    text: string,\n    pos: number\n  ): CommentRange[] | void;\n\n  declare function getShebang(text: string): string | void;\n\n  declare function isIdentifierStart(\n    ch: number,\n    languageVersion: $Values<typeof ScriptTarget> | void\n  ): boolean;\n\n  declare function isIdentifierPart(\n    ch: number,\n    languageVersion: $Values<typeof ScriptTarget> | void\n  ): boolean;\n\n  declare function createScanner(\n    languageVersion: $Values<typeof ScriptTarget>,\n    skipTrivia: boolean,\n    languageVariant?: $Values<typeof LanguageVariant>,\n    textInitial?: string,\n    onError?: ErrorCallback,\n    start?: number,\n    length?: number\n  ): Scanner;\n\n  declare function isExternalModuleNameRelative(moduleName: string): boolean;\n\n  declare function sortAndDeduplicateDiagnostics<T: Diagnostic>(\n    diagnostics: $ReadOnlyArray<T>\n  ): SortedReadonlyArray<T>;\n\n  declare function getDefaultLibFileName(options: CompilerOptions): string;\n\n  declare function textSpanEnd(span: TextSpan): number;\n\n  declare function textSpanIsEmpty(span: TextSpan): boolean;\n\n  declare function textSpanContainsPosition(\n    span: TextSpan,\n    position: number\n  ): boolean;\n\n  declare function textSpanContainsTextSpan(\n    span: TextSpan,\n    other: TextSpan\n  ): boolean;\n\n  declare function textSpanOverlapsWith(\n    span: TextSpan,\n    other: TextSpan\n  ): boolean;\n\n  declare function textSpanOverlap(\n    span1: TextSpan,\n    span2: TextSpan\n  ): TextSpan | void;\n\n  declare function textSpanIntersectsWithTextSpan(\n    span: TextSpan,\n    other: TextSpan\n  ): boolean;\n\n  declare function textSpanIntersectsWith(\n    span: TextSpan,\n    start: number,\n    length: number\n  ): boolean;\n\n  declare function decodedTextSpanIntersectsWith(\n    start1: number,\n    length1: number,\n    start2: number,\n    length2: number\n  ): boolean;\n\n  declare function textSpanIntersectsWithPosition(\n    span: TextSpan,\n    position: number\n  ): boolean;\n\n  declare function textSpanIntersection(\n    span1: TextSpan,\n    span2: TextSpan\n  ): TextSpan | void;\n\n  declare function createTextSpan(start: number, length: number): TextSpan;\n\n  declare function createTextSpanFromBounds(\n    start: number,\n    end: number\n  ): TextSpan;\n\n  declare function textChangeRangeNewSpan(range: TextChangeRange): TextSpan;\n\n  declare function textChangeRangeIsUnchanged(range: TextChangeRange): boolean;\n\n  declare function createTextChangeRange(\n    span: TextSpan,\n    newLength: number\n  ): TextChangeRange;\n\n  declare var unchangedTextChangeRange: TextChangeRange;\n  declare function collapseTextChangeRangesAcrossMultipleVersions(\n    changes: $ReadOnlyArray<TextChangeRange>\n  ): TextChangeRange;\n\n  declare function getTypeParameterOwner(d: Declaration): Declaration | void;\n\n  declare type ParameterPropertyDeclaration = ParameterDeclaration & {\n    parent: ConstructorDeclaration,\n    name: Identifier,\n    ...\n  };\n  declare function isParameterPropertyDeclaration(node: Node): boolean;\n\n  declare function isEmptyBindingPattern(node: BindingName): boolean;\n\n  declare function isEmptyBindingElement(node: BindingElement): boolean;\n\n  declare function walkUpBindingElementsAndPatterns(\n    binding: BindingElement\n  ): VariableDeclaration | ParameterDeclaration;\n\n  declare function getCombinedModifierFlags(\n    node: Declaration\n  ): $Values<typeof ModifierFlags>;\n\n  declare function getCombinedNodeFlags(node: Node): $Values<typeof NodeFlags>;\n\n  declare function validateLocaleAndSetLanguage(\n    locale: string,\n    sys: {\n      getExecutingFilePath(): string,\n      resolvePath(path: string): string,\n      fileExists(fileName: string): boolean,\n      readFile(fileName: string): string | void,\n      ...\n    },\n    errors?: Push<Diagnostic>\n  ): void;\n\n  declare function getOriginalNode(node: Node): Node;\n\n  declare function getOriginalNode<T: Node>(\n    node: Node,\n    nodeTest: (node: Node) => boolean\n  ): T;\n\n  declare function getOriginalNode(node: Node | void): Node | void;\n\n  declare function getOriginalNode<T: Node>(\n    node: Node | void,\n    nodeTest: (node: Node | void) => boolean\n  ): T | void;\n\n  declare function isParseTreeNode(node: Node): boolean;\n\n  declare function getParseTreeNode(node: Node): Node;\n\n  declare function getParseTreeNode<T: Node>(\n    node: Node | void,\n    nodeTest?: (node: Node) => boolean\n  ): T | void;\n\n  declare function escapeLeadingUnderscores(identifier: string): __String;\n\n  declare function unescapeLeadingUnderscores(identifier: __String): string;\n\n  declare function idText(identifier: Identifier): string;\n\n  declare function symbolName(symbol: Symbol): string;\n\n  declare function getNameOfJSDocTypedef(\n    declaration: JSDocTypedefTag\n  ): Identifier | void;\n\n  declare function getNameOfDeclaration(\n    declaration: Declaration | Expression\n  ): DeclarationName | void;\n\n  declare function getJSDocParameterTags(\n    param: ParameterDeclaration\n  ): $ReadOnlyArray<JSDocParameterTag>;\n\n  declare function getJSDocTypeParameterTags(\n    param: TypeParameterDeclaration\n  ): $ReadOnlyArray<JSDocTemplateTag>;\n\n  declare function hasJSDocParameterTags(\n    node: FunctionLikeDeclaration | SignatureDeclaration\n  ): boolean;\n\n  declare function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | void;\n\n  declare function getJSDocClassTag(node: Node): JSDocClassTag | void;\n\n  declare function getJSDocEnumTag(node: Node): JSDocEnumTag | void;\n\n  declare function getJSDocThisTag(node: Node): JSDocThisTag | void;\n\n  declare function getJSDocReturnTag(node: Node): JSDocReturnTag | void;\n\n  declare function getJSDocTemplateTag(node: Node): JSDocTemplateTag | void;\n\n  declare function getJSDocTypeTag(node: Node): JSDocTypeTag | void;\n\n  declare function getJSDocType(node: Node): TypeNode | void;\n\n  declare function getJSDocReturnType(node: Node): TypeNode | void;\n\n  declare function getJSDocTags(node: Node): $ReadOnlyArray<JSDocTag>;\n\n  declare function getAllJSDocTagsOfKind(\n    node: Node,\n    kind: $Values<typeof SyntaxKind>\n  ): $ReadOnlyArray<JSDocTag>;\n\n  declare function getEffectiveTypeParameterDeclarations(\n    node: DeclarationWithTypeParameters\n  ): $ReadOnlyArray<TypeParameterDeclaration>;\n\n  declare function getEffectiveConstraintOfTypeParameter(\n    node: TypeParameterDeclaration\n  ): TypeNode | void;\n\n  declare function isNumericLiteral(node: Node): boolean;\n\n  declare function isBigIntLiteral(node: Node): boolean;\n\n  declare function isStringLiteral(node: Node): boolean;\n\n  declare function isJsxText(node: Node): boolean;\n\n  declare function isRegularExpressionLiteral(node: Node): boolean;\n\n  declare function isNoSubstitutionTemplateLiteral(node: Node): boolean;\n\n  declare function isTemplateHead(node: Node): boolean;\n\n  declare function isTemplateMiddle(node: Node): boolean;\n\n  declare function isTemplateTail(node: Node): boolean;\n\n  declare function isIdentifier(node: Node): boolean;\n\n  declare function isQualifiedName(node: Node): boolean;\n\n  declare function isComputedPropertyName(node: Node): boolean;\n\n  declare function isTypeParameterDeclaration(node: Node): boolean;\n\n  declare function isParameter(node: Node): boolean;\n\n  declare function isDecorator(node: Node): boolean;\n\n  declare function isPropertySignature(node: Node): boolean;\n\n  declare function isPropertyDeclaration(node: Node): boolean;\n\n  declare function isMethodSignature(node: Node): boolean;\n\n  declare function isMethodDeclaration(node: Node): boolean;\n\n  declare function isConstructorDeclaration(node: Node): boolean;\n\n  declare function isGetAccessorDeclaration(node: Node): boolean;\n\n  declare function isSetAccessorDeclaration(node: Node): boolean;\n\n  declare function isCallSignatureDeclaration(node: Node): boolean;\n\n  declare function isConstructSignatureDeclaration(node: Node): boolean;\n\n  declare function isIndexSignatureDeclaration(node: Node): boolean;\n\n  declare function isTypePredicateNode(node: Node): boolean;\n\n  declare function isTypeReferenceNode(node: Node): boolean;\n\n  declare function isFunctionTypeNode(node: Node): boolean;\n\n  declare function isConstructorTypeNode(node: Node): boolean;\n\n  declare function isTypeQueryNode(node: Node): boolean;\n\n  declare function isTypeLiteralNode(node: Node): boolean;\n\n  declare function isArrayTypeNode(node: Node): boolean;\n\n  declare function isTupleTypeNode(node: Node): boolean;\n\n  declare function isUnionTypeNode(node: Node): boolean;\n\n  declare function isIntersectionTypeNode(node: Node): boolean;\n\n  declare function isConditionalTypeNode(node: Node): boolean;\n\n  declare function isInferTypeNode(node: Node): boolean;\n\n  declare function isParenthesizedTypeNode(node: Node): boolean;\n\n  declare function isThisTypeNode(node: Node): boolean;\n\n  declare function isTypeOperatorNode(node: Node): boolean;\n\n  declare function isIndexedAccessTypeNode(node: Node): boolean;\n\n  declare function isMappedTypeNode(node: Node): boolean;\n\n  declare function isLiteralTypeNode(node: Node): boolean;\n\n  declare function isImportTypeNode(node: Node): boolean;\n\n  declare function isObjectBindingPattern(node: Node): boolean;\n\n  declare function isArrayBindingPattern(node: Node): boolean;\n\n  declare function isBindingElement(node: Node): boolean;\n\n  declare function isArrayLiteralExpression(node: Node): boolean;\n\n  declare function isObjectLiteralExpression(node: Node): boolean;\n\n  declare function isPropertyAccessExpression(node: Node): boolean;\n\n  declare function isElementAccessExpression(node: Node): boolean;\n\n  declare function isCallExpression(node: Node): boolean;\n\n  declare function isNewExpression(node: Node): boolean;\n\n  declare function isTaggedTemplateExpression(node: Node): boolean;\n\n  declare function isTypeAssertion(node: Node): boolean;\n\n  declare function isParenthesizedExpression(node: Node): boolean;\n\n  declare function skipPartiallyEmittedExpressions(\n    node: Expression\n  ): Expression;\n\n  declare function skipPartiallyEmittedExpressions(node: Node): Node;\n\n  declare function isFunctionExpression(node: Node): boolean;\n\n  declare function isArrowFunction(node: Node): boolean;\n\n  declare function isDeleteExpression(node: Node): boolean;\n\n  declare function isTypeOfExpression(node: Node): boolean;\n\n  declare function isVoidExpression(node: Node): boolean;\n\n  declare function isAwaitExpression(node: Node): boolean;\n\n  declare function isPrefixUnaryExpression(node: Node): boolean;\n\n  declare function isPostfixUnaryExpression(node: Node): boolean;\n\n  declare function isBinaryExpression(node: Node): boolean;\n\n  declare function isConditionalExpression(node: Node): boolean;\n\n  declare function isTemplateExpression(node: Node): boolean;\n\n  declare function isYieldExpression(node: Node): boolean;\n\n  declare function isSpreadElement(node: Node): boolean;\n\n  declare function isClassExpression(node: Node): boolean;\n\n  declare function isOmittedExpression(node: Node): boolean;\n\n  declare function isExpressionWithTypeArguments(node: Node): boolean;\n\n  declare function isAsExpression(node: Node): boolean;\n\n  declare function isNonNullExpression(node: Node): boolean;\n\n  declare function isMetaProperty(node: Node): boolean;\n\n  declare function isTemplateSpan(node: Node): boolean;\n\n  declare function isSemicolonClassElement(node: Node): boolean;\n\n  declare function isBlock(node: Node): boolean;\n\n  declare function isVariableStatement(node: Node): boolean;\n\n  declare function isEmptyStatement(node: Node): boolean;\n\n  declare function isExpressionStatement(node: Node): boolean;\n\n  declare function isIfStatement(node: Node): boolean;\n\n  declare function isDoStatement(node: Node): boolean;\n\n  declare function isWhileStatement(node: Node): boolean;\n\n  declare function isForStatement(node: Node): boolean;\n\n  declare function isForInStatement(node: Node): boolean;\n\n  declare function isForOfStatement(node: Node): boolean;\n\n  declare function isContinueStatement(node: Node): boolean;\n\n  declare function isBreakStatement(node: Node): boolean;\n\n  declare function isBreakOrContinueStatement(node: Node): boolean;\n\n  declare function isReturnStatement(node: Node): boolean;\n\n  declare function isWithStatement(node: Node): boolean;\n\n  declare function isSwitchStatement(node: Node): boolean;\n\n  declare function isLabeledStatement(node: Node): boolean;\n\n  declare function isThrowStatement(node: Node): boolean;\n\n  declare function isTryStatement(node: Node): boolean;\n\n  declare function isDebuggerStatement(node: Node): boolean;\n\n  declare function isVariableDeclaration(node: Node): boolean;\n\n  declare function isVariableDeclarationList(node: Node): boolean;\n\n  declare function isFunctionDeclaration(node: Node): boolean;\n\n  declare function isClassDeclaration(node: Node): boolean;\n\n  declare function isInterfaceDeclaration(node: Node): boolean;\n\n  declare function isTypeAliasDeclaration(node: Node): boolean;\n\n  declare function isEnumDeclaration(node: Node): boolean;\n\n  declare function isModuleDeclaration(node: Node): boolean;\n\n  declare function isModuleBlock(node: Node): boolean;\n\n  declare function isCaseBlock(node: Node): boolean;\n\n  declare function isNamespaceExportDeclaration(node: Node): boolean;\n\n  declare function isImportEqualsDeclaration(node: Node): boolean;\n\n  declare function isImportDeclaration(node: Node): boolean;\n\n  declare function isImportClause(node: Node): boolean;\n\n  declare function isNamespaceImport(node: Node): boolean;\n\n  declare function isNamedImports(node: Node): boolean;\n\n  declare function isImportSpecifier(node: Node): boolean;\n\n  declare function isExportAssignment(node: Node): boolean;\n\n  declare function isExportDeclaration(node: Node): boolean;\n\n  declare function isNamedExports(node: Node): boolean;\n\n  declare function isExportSpecifier(node: Node): boolean;\n\n  declare function isMissingDeclaration(node: Node): boolean;\n\n  declare function isExternalModuleReference(node: Node): boolean;\n\n  declare function isJsxElement(node: Node): boolean;\n\n  declare function isJsxSelfClosingElement(node: Node): boolean;\n\n  declare function isJsxOpeningElement(node: Node): boolean;\n\n  declare function isJsxClosingElement(node: Node): boolean;\n\n  declare function isJsxFragment(node: Node): boolean;\n\n  declare function isJsxOpeningFragment(node: Node): boolean;\n\n  declare function isJsxClosingFragment(node: Node): boolean;\n\n  declare function isJsxAttribute(node: Node): boolean;\n\n  declare function isJsxAttributes(node: Node): boolean;\n\n  declare function isJsxSpreadAttribute(node: Node): boolean;\n\n  declare function isJsxExpression(node: Node): boolean;\n\n  declare function isCaseClause(node: Node): boolean;\n\n  declare function isDefaultClause(node: Node): boolean;\n\n  declare function isHeritageClause(node: Node): boolean;\n\n  declare function isCatchClause(node: Node): boolean;\n\n  declare function isPropertyAssignment(node: Node): boolean;\n\n  declare function isShorthandPropertyAssignment(node: Node): boolean;\n\n  declare function isSpreadAssignment(node: Node): boolean;\n\n  declare function isEnumMember(node: Node): boolean;\n\n  declare function isSourceFile(node: Node): boolean;\n\n  declare function isBundle(node: Node): boolean;\n\n  declare function isUnparsedSource(node: Node): boolean;\n\n  declare function isJSDocTypeExpression(node: Node): boolean;\n\n  declare function isJSDocAllType(node: JSDocAllType): boolean;\n\n  declare function isJSDocUnknownType(node: Node): boolean;\n\n  declare function isJSDocNullableType(node: Node): boolean;\n\n  declare function isJSDocNonNullableType(node: Node): boolean;\n\n  declare function isJSDocOptionalType(node: Node): boolean;\n\n  declare function isJSDocFunctionType(node: Node): boolean;\n\n  declare function isJSDocVariadicType(node: Node): boolean;\n\n  declare function isJSDoc(node: Node): boolean;\n\n  declare function isJSDocAugmentsTag(node: Node): boolean;\n\n  declare function isJSDocClassTag(node: Node): boolean;\n\n  declare function isJSDocEnumTag(node: Node): boolean;\n\n  declare function isJSDocThisTag(node: Node): boolean;\n\n  declare function isJSDocParameterTag(node: Node): boolean;\n\n  declare function isJSDocReturnTag(node: Node): boolean;\n\n  declare function isJSDocTypeTag(node: Node): boolean;\n\n  declare function isJSDocTemplateTag(node: Node): boolean;\n\n  declare function isJSDocTypedefTag(node: Node): boolean;\n\n  declare function isJSDocPropertyTag(node: Node): boolean;\n\n  declare function isJSDocPropertyLikeTag(node: Node): boolean;\n\n  declare function isJSDocTypeLiteral(node: Node): boolean;\n\n  declare function isJSDocCallbackTag(node: Node): boolean;\n\n  declare function isJSDocSignature(node: Node): boolean;\n\n  declare function isToken(n: Node): boolean;\n\n  declare function isLiteralExpression(node: Node): boolean;\n\n  declare type TemplateLiteralToken =\n    | NoSubstitutionTemplateLiteral\n    | TemplateHead\n    | TemplateMiddle\n    | TemplateTail;\n  declare function isTemplateLiteralToken(node: Node): boolean;\n\n  declare function isTemplateMiddleOrTemplateTail(node: Node): boolean;\n\n  declare function isImportOrExportSpecifier(node: Node): boolean;\n\n  declare function isStringTextContainingNode(node: Node): boolean;\n\n  declare function isModifier(node: Node): boolean;\n\n  declare function isEntityName(node: Node): boolean;\n\n  declare function isPropertyName(node: Node): boolean;\n\n  declare function isBindingName(node: Node): boolean;\n\n  declare function isFunctionLike(node: Node): boolean;\n\n  declare function isClassElement(node: Node): boolean;\n\n  declare function isClassLike(node: Node): boolean;\n\n  declare function isAccessor(node: Node): boolean;\n\n  declare function isTypeElement(node: Node): boolean;\n\n  declare function isClassOrTypeElement(node: Node): boolean;\n\n  declare function isObjectLiteralElementLike(node: Node): boolean;\n\n  declare function isTypeNode(node: Node): boolean;\n\n  declare function isFunctionOrConstructorTypeNode(node: Node): boolean;\n\n  declare function isPropertyAccessOrQualifiedName(node: Node): boolean;\n\n  declare function isCallLikeExpression(node: Node): boolean;\n\n  declare function isCallOrNewExpression(node: Node): boolean;\n\n  declare function isTemplateLiteral(node: Node): boolean;\n\n  declare function isAssertionExpression(node: Node): boolean;\n\n  declare function isIterationStatement(\n    node: Node,\n    lookInLabeledStatements: false\n  ): boolean;\n\n  declare function isIterationStatement(\n    node: Node,\n    lookInLabeledStatements: boolean\n  ): boolean;\n\n  declare function isJsxOpeningLikeElement(node: Node): boolean;\n\n  declare function isCaseOrDefaultClause(node: Node): boolean;\n\n  declare function isJSDocCommentContainingNode(node: Node): boolean;\n\n  declare function isSetAccessor(node: Node): boolean;\n\n  declare function isGetAccessor(node: Node): boolean;\n\n  declare function isObjectLiteralElement(node: Node): boolean;\n\n  declare function isStringLiteralLike(node: Node): boolean;\n\n  declare function createNode(\n    kind: $Values<typeof SyntaxKind>,\n    pos?: number,\n    end?: number\n  ): Node;\n\n  declare function forEachChild<T>(\n    node: Node,\n    cbNode: (node: Node) => T | void,\n    cbNodes?: (nodes: NodeArray<Node>) => T | void\n  ): T | void;\n\n  declare function createSourceFile(\n    fileName: string,\n    sourceText: string,\n    languageVersion: $Values<typeof ScriptTarget>,\n    setParentNodes?: boolean,\n    scriptKind?: $Values<typeof ScriptKind>\n  ): SourceFile;\n\n  declare function parseIsolatedEntityName(\n    text: string,\n    languageVersion: $Values<typeof ScriptTarget>\n  ): EntityName | void;\n\n  declare function parseJsonText(\n    fileName: string,\n    sourceText: string\n  ): JsonSourceFile;\n\n  declare function isExternalModule(file: SourceFile): boolean;\n\n  declare function updateSourceFile(\n    sourceFile: SourceFile,\n    newText: string,\n    textChangeRange: TextChangeRange,\n    aggressiveChecks?: boolean\n  ): SourceFile;\n\n  declare function parseCommandLine(\n    commandLine: $ReadOnlyArray<string>,\n    readFile?: (path: string) => string | void\n  ): ParsedCommandLine;\n\n  declare type DiagnosticReporter = (diagnostic: Diagnostic) => void;\n  declare type ConfigFileDiagnosticsReporter = { onUnRecoverableConfigFileDiagnostic: DiagnosticReporter, ... };\n\n  declare type ParseConfigFileHost = {\n    ...$Exact<ParseConfigHost>,\n    ...$Exact<ConfigFileDiagnosticsReporter>,\n    getCurrentDirectory(): string,\n    ...\n  };\n\n  declare function getParsedCommandLineOfConfigFile(\n    configFileName: string,\n    optionsToExtend: CompilerOptions,\n    host: ParseConfigFileHost\n  ): ParsedCommandLine | void;\n\n  declare function readConfigFile(\n    fileName: string,\n    readFile: (path: string) => string | void\n  ): {\n    config?: any,\n    error?: Diagnostic,\n    ...\n  };\n\n  declare function parseConfigFileTextToJson(\n    fileName: string,\n    jsonText: string\n  ): {\n    config?: any,\n    error?: Diagnostic,\n    ...\n  };\n\n  declare function readJsonConfigFile(\n    fileName: string,\n    readFile: (path: string) => string | void\n  ): TsConfigSourceFile;\n\n  declare function convertToObject(\n    sourceFile: JsonSourceFile,\n    errors: Push<Diagnostic>\n  ): any;\n\n  declare function parseJsonConfigFileContent(\n    json: any,\n    host: ParseConfigHost,\n    basePath: string,\n    existingOptions?: CompilerOptions,\n    configFileName?: string,\n    resolutionStack?: Path[],\n    extraFileExtensions?: $ReadOnlyArray<FileExtensionInfo>\n  ): ParsedCommandLine;\n\n  declare function parseJsonSourceFileConfigFileContent(\n    sourceFile: TsConfigSourceFile,\n    host: ParseConfigHost,\n    basePath: string,\n    existingOptions?: CompilerOptions,\n    configFileName?: string,\n    resolutionStack?: Path[],\n    extraFileExtensions?: $ReadOnlyArray<FileExtensionInfo>\n  ): ParsedCommandLine;\n\n  declare function convertCompilerOptionsFromJson(\n    jsonOptions: any,\n    basePath: string,\n    configFileName?: string\n  ): {\n    options: CompilerOptions,\n    errors: Diagnostic[],\n    ...\n  };\n\n  declare function convertTypeAcquisitionFromJson(\n    jsonOptions: any,\n    basePath: string,\n    configFileName?: string\n  ): {\n    options: TypeAcquisition,\n    errors: Diagnostic[],\n    ...\n  };\n\n  declare function getEffectiveTypeRoots(\n    options: CompilerOptions,\n    host: GetEffectiveTypeRootsHost\n  ): string[] | void;\n\n  declare function resolveTypeReferenceDirective(\n    typeReferenceDirectiveName: string,\n    containingFile: string | void,\n    options: CompilerOptions,\n    host: ModuleResolutionHost,\n    redirectedReference?: ResolvedProjectReference\n  ): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;\n\n  declare function getAutomaticTypeDirectiveNames(\n    options: CompilerOptions,\n    host: ModuleResolutionHost\n  ): string[];\n\n  declare type ModuleResolutionCache = {\n    ...$Exact<NonRelativeModuleNameResolutionCache>,\n    getOrCreateCacheForDirectory(\n      directoryName: string,\n      redirectedReference?: ResolvedProjectReference\n    ): Map<ResolvedModuleWithFailedLookupLocations>,\n    ...\n  };\n\n  declare type NonRelativeModuleNameResolutionCache = { getOrCreateCacheForModuleName(\n    nonRelativeModuleName: string,\n    redirectedReference?: ResolvedProjectReference\n  ): PerModuleNameCache, ... };\n\n  declare type PerModuleNameCache = {\n    get(directory: string): ResolvedModuleWithFailedLookupLocations | void,\n    set(\n      directory: string,\n      result: ResolvedModuleWithFailedLookupLocations\n    ): void,\n    ...\n  };\n\n  declare function createModuleResolutionCache(\n    currentDirectory: string,\n    getCanonicalFileName: (s: string) => string\n  ): ModuleResolutionCache;\n\n  declare function resolveModuleNameFromCache(\n    moduleName: string,\n    containingFile: string,\n    cache: ModuleResolutionCache\n  ): ResolvedModuleWithFailedLookupLocations | void;\n\n  declare function resolveModuleName(\n    moduleName: string,\n    containingFile: string,\n    compilerOptions: CompilerOptions,\n    host: ModuleResolutionHost,\n    cache?: ModuleResolutionCache,\n    redirectedReference?: ResolvedProjectReference\n  ): ResolvedModuleWithFailedLookupLocations;\n\n  declare function nodeModuleNameResolver(\n    moduleName: string,\n    containingFile: string,\n    compilerOptions: CompilerOptions,\n    host: ModuleResolutionHost,\n    cache?: ModuleResolutionCache,\n    redirectedReference?: ResolvedProjectReference\n  ): ResolvedModuleWithFailedLookupLocations;\n\n  declare function classicNameResolver(\n    moduleName: string,\n    containingFile: string,\n    compilerOptions: CompilerOptions,\n    host: ModuleResolutionHost,\n    cache?: NonRelativeModuleNameResolutionCache,\n    redirectedReference?: ResolvedProjectReference\n  ): ResolvedModuleWithFailedLookupLocations;\n\n  declare function createNodeArray<T: Node>(\n    elements?: $ReadOnlyArray<T>,\n    hasTrailingComma?: boolean\n  ): NodeArray<T>;\n\n  declare function createLiteral(\n    value:\n      | string\n      | StringLiteral\n      | NoSubstitutionTemplateLiteral\n      | NumericLiteral\n      | Identifier\n  ): StringLiteral;\n\n  declare function createLiteral(value: number | PseudoBigInt): NumericLiteral;\n\n  declare function createLiteral(value: boolean): BooleanLiteral;\n\n  declare function createLiteral(\n    value: string | number | PseudoBigInt | boolean\n  ): PrimaryExpression;\n\n  declare function createNumericLiteral(value: string): NumericLiteral;\n\n  declare function createBigIntLiteral(value: string): BigIntLiteral;\n\n  declare function createStringLiteral(text: string): StringLiteral;\n\n  declare function createRegularExpressionLiteral(\n    text: string\n  ): RegularExpressionLiteral;\n\n  declare function createIdentifier(text: string): Identifier;\n\n  declare function updateIdentifier(node: Identifier): Identifier;\n\n  declare function createTempVariable(\n    recordTempVariable: ((node: Identifier) => void) | void\n  ): Identifier;\n\n  declare function createLoopVariable(): Identifier;\n\n  declare function createUniqueName(text: string): Identifier;\n\n  declare function createOptimisticUniqueName(text: string): Identifier;\n\n  declare function createFileLevelUniqueName(text: string): Identifier;\n\n  declare function getGeneratedNameForNode(node: Node | void): Identifier;\n\n  declare function createToken<TKind: $Values<typeof SyntaxKind>>(\n    token: TKind\n  ): Token<TKind>;\n\n  declare function createSuper(): SuperExpression;\n\n  declare function createThis(): ThisExpression &\n    Token<typeof SyntaxKind.ThisKeyword>;\n\n  declare function createNull(): NullLiteral &\n    Token<typeof SyntaxKind.NullKeyword>;\n\n  declare function createTrue(): BooleanLiteral &\n    Token<typeof SyntaxKind.TrueKeyword>;\n\n  declare function createFalse(): BooleanLiteral &\n    Token<typeof SyntaxKind.FalseKeyword>;\n\n  declare function createModifier<T: $ElementType<Modifier, \"kind\">>(\n    kind: T\n  ): Token<T>;\n\n  declare function createModifiersFromModifierFlags(\n    flags: $Values<typeof ModifierFlags>\n  ): Modifier[];\n\n  declare function createQualifiedName(\n    left: EntityName,\n    right: string | Identifier\n  ): QualifiedName;\n\n  declare function updateQualifiedName(\n    node: QualifiedName,\n    left: EntityName,\n    right: Identifier\n  ): QualifiedName;\n\n  declare function createComputedPropertyName(\n    expression: Expression\n  ): ComputedPropertyName;\n\n  declare function updateComputedPropertyName(\n    node: ComputedPropertyName,\n    expression: Expression\n  ): ComputedPropertyName;\n\n  declare function createTypeParameterDeclaration(\n    name: string | Identifier,\n    constraint?: TypeNode,\n    defaultType?: TypeNode\n  ): TypeParameterDeclaration;\n\n  declare function updateTypeParameterDeclaration(\n    node: TypeParameterDeclaration,\n    name: Identifier,\n    constraint: TypeNode | void,\n    defaultType: TypeNode | void\n  ): TypeParameterDeclaration;\n\n  declare function createParameter(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    dotDotDotToken: DotDotDotToken | void,\n    name: string | BindingName,\n    questionToken?: QuestionToken,\n    type?: TypeNode,\n    initializer?: Expression\n  ): ParameterDeclaration;\n\n  declare function updateParameter(\n    node: ParameterDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    dotDotDotToken: DotDotDotToken | void,\n    name: string | BindingName,\n    questionToken: QuestionToken | void,\n    type: TypeNode | void,\n    initializer: Expression | void\n  ): ParameterDeclaration;\n\n  declare function createDecorator(expression: Expression): Decorator;\n\n  declare function updateDecorator(\n    node: Decorator,\n    expression: Expression\n  ): Decorator;\n\n  declare function createPropertySignature(\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: PropertyName | string,\n    questionToken: QuestionToken | void,\n    type: TypeNode | void,\n    initializer: Expression | void\n  ): PropertySignature;\n\n  declare function updatePropertySignature(\n    node: PropertySignature,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: PropertyName,\n    questionToken: QuestionToken | void,\n    type: TypeNode | void,\n    initializer: Expression | void\n  ): PropertySignature;\n\n  declare function createProperty(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | PropertyName,\n    questionOrExclamationToken: QuestionToken | ExclamationToken | void,\n    type: TypeNode | void,\n    initializer: Expression | void\n  ): PropertyDeclaration;\n\n  declare function updateProperty(\n    node: PropertyDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | PropertyName,\n    questionOrExclamationToken: QuestionToken | ExclamationToken | void,\n    type: TypeNode | void,\n    initializer: Expression | void\n  ): PropertyDeclaration;\n\n  declare function createMethodSignature(\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    name: string | PropertyName,\n    questionToken: QuestionToken | void\n  ): MethodSignature;\n\n  declare function updateMethodSignature(\n    node: MethodSignature,\n    typeParameters: NodeArray<TypeParameterDeclaration> | void,\n    parameters: NodeArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    name: PropertyName,\n    questionToken: QuestionToken | void\n  ): MethodSignature;\n\n  declare function createMethod(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    asteriskToken: AsteriskToken | void,\n    name: string | PropertyName,\n    questionToken: QuestionToken | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    body: Block | void\n  ): MethodDeclaration;\n\n  declare function updateMethod(\n    node: MethodDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    asteriskToken: AsteriskToken | void,\n    name: PropertyName,\n    questionToken: QuestionToken | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    body: Block | void\n  ): MethodDeclaration;\n\n  declare function createConstructor(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    body: Block | void\n  ): ConstructorDeclaration;\n\n  declare function updateConstructor(\n    node: ConstructorDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    body: Block | void\n  ): ConstructorDeclaration;\n\n  declare function createGetAccessor(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | PropertyName,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    body: Block | void\n  ): GetAccessorDeclaration;\n\n  declare function updateGetAccessor(\n    node: GetAccessorDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: PropertyName,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    body: Block | void\n  ): GetAccessorDeclaration;\n\n  declare function createSetAccessor(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | PropertyName,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    body: Block | void\n  ): SetAccessorDeclaration;\n\n  declare function updateSetAccessor(\n    node: SetAccessorDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: PropertyName,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    body: Block | void\n  ): SetAccessorDeclaration;\n\n  declare function createCallSignature(\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void\n  ): CallSignatureDeclaration;\n\n  declare function updateCallSignature(\n    node: CallSignatureDeclaration,\n    typeParameters: NodeArray<TypeParameterDeclaration> | void,\n    parameters: NodeArray<ParameterDeclaration>,\n    type: TypeNode | void\n  ): CallSignatureDeclaration;\n\n  declare function createConstructSignature(\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void\n  ): ConstructSignatureDeclaration;\n\n  declare function updateConstructSignature(\n    node: ConstructSignatureDeclaration,\n    typeParameters: NodeArray<TypeParameterDeclaration> | void,\n    parameters: NodeArray<ParameterDeclaration>,\n    type: TypeNode | void\n  ): ConstructSignatureDeclaration;\n\n  declare function createIndexSignature(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode\n  ): IndexSignatureDeclaration;\n\n  declare function updateIndexSignature(\n    node: IndexSignatureDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode\n  ): IndexSignatureDeclaration;\n\n  declare function createKeywordTypeNode(\n    kind: $ElementType<KeywordTypeNode, \"kind\">\n  ): KeywordTypeNode;\n\n  declare function createTypePredicateNode(\n    parameterName: Identifier | ThisTypeNode | string,\n    type: TypeNode\n  ): TypePredicateNode;\n\n  declare function updateTypePredicateNode(\n    node: TypePredicateNode,\n    parameterName: Identifier | ThisTypeNode,\n    type: TypeNode\n  ): TypePredicateNode;\n\n  declare function createTypeReferenceNode(\n    typeName: string | EntityName,\n    typeArguments: $ReadOnlyArray<TypeNode> | void\n  ): TypeReferenceNode;\n\n  declare function updateTypeReferenceNode(\n    node: TypeReferenceNode,\n    typeName: EntityName,\n    typeArguments: NodeArray<TypeNode> | void\n  ): TypeReferenceNode;\n\n  declare function createFunctionTypeNode(\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void\n  ): FunctionTypeNode;\n\n  declare function updateFunctionTypeNode(\n    node: FunctionTypeNode,\n    typeParameters: NodeArray<TypeParameterDeclaration> | void,\n    parameters: NodeArray<ParameterDeclaration>,\n    type: TypeNode | void\n  ): FunctionTypeNode;\n\n  declare function createConstructorTypeNode(\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void\n  ): ConstructorTypeNode;\n\n  declare function updateConstructorTypeNode(\n    node: ConstructorTypeNode,\n    typeParameters: NodeArray<TypeParameterDeclaration> | void,\n    parameters: NodeArray<ParameterDeclaration>,\n    type: TypeNode | void\n  ): ConstructorTypeNode;\n\n  declare function createTypeQueryNode(exprName: EntityName): TypeQueryNode;\n\n  declare function updateTypeQueryNode(\n    node: TypeQueryNode,\n    exprName: EntityName\n  ): TypeQueryNode;\n\n  declare function createTypeLiteralNode(\n    members: $ReadOnlyArray<TypeElement> | void\n  ): TypeLiteralNode;\n\n  declare function updateTypeLiteralNode(\n    node: TypeLiteralNode,\n    members: NodeArray<TypeElement>\n  ): TypeLiteralNode;\n\n  declare function createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;\n\n  declare function updateArrayTypeNode(\n    node: ArrayTypeNode,\n    elementType: TypeNode\n  ): ArrayTypeNode;\n\n  declare function createTupleTypeNode(\n    elementTypes: $ReadOnlyArray<TypeNode>\n  ): TupleTypeNode;\n\n  declare function updateTupleTypeNode(\n    node: TupleTypeNode,\n    elementTypes: $ReadOnlyArray<TypeNode>\n  ): TupleTypeNode;\n\n  declare function createOptionalTypeNode(type: TypeNode): OptionalTypeNode;\n\n  declare function updateOptionalTypeNode(\n    node: OptionalTypeNode,\n    type: TypeNode\n  ): OptionalTypeNode;\n\n  declare function createRestTypeNode(type: TypeNode): RestTypeNode;\n\n  declare function updateRestTypeNode(\n    node: RestTypeNode,\n    type: TypeNode\n  ): RestTypeNode;\n\n  declare function createUnionTypeNode(\n    types: $ReadOnlyArray<TypeNode>\n  ): UnionTypeNode;\n\n  declare function updateUnionTypeNode(\n    node: UnionTypeNode,\n    types: NodeArray<TypeNode>\n  ): UnionTypeNode;\n\n  declare function createIntersectionTypeNode(\n    types: $ReadOnlyArray<TypeNode>\n  ): IntersectionTypeNode;\n\n  declare function updateIntersectionTypeNode(\n    node: IntersectionTypeNode,\n    types: NodeArray<TypeNode>\n  ): IntersectionTypeNode;\n\n  declare function createUnionOrIntersectionTypeNode(\n    kind: typeof SyntaxKind.UnionType | typeof SyntaxKind.IntersectionType,\n    types: $ReadOnlyArray<TypeNode>\n  ): UnionOrIntersectionTypeNode;\n\n  declare function createConditionalTypeNode(\n    checkType: TypeNode,\n    extendsType: TypeNode,\n    trueType: TypeNode,\n    falseType: TypeNode\n  ): ConditionalTypeNode;\n\n  declare function updateConditionalTypeNode(\n    node: ConditionalTypeNode,\n    checkType: TypeNode,\n    extendsType: TypeNode,\n    trueType: TypeNode,\n    falseType: TypeNode\n  ): ConditionalTypeNode;\n\n  declare function createInferTypeNode(\n    typeParameter: TypeParameterDeclaration\n  ): InferTypeNode;\n\n  declare function updateInferTypeNode(\n    node: InferTypeNode,\n    typeParameter: TypeParameterDeclaration\n  ): InferTypeNode;\n\n  declare function createImportTypeNode(\n    argument: TypeNode,\n    qualifier?: EntityName,\n    typeArguments?: $ReadOnlyArray<TypeNode>,\n    isTypeOf?: boolean\n  ): ImportTypeNode;\n\n  declare function updateImportTypeNode(\n    node: ImportTypeNode,\n    argument: TypeNode,\n    qualifier?: EntityName,\n    typeArguments?: $ReadOnlyArray<TypeNode>,\n    isTypeOf?: boolean\n  ): ImportTypeNode;\n\n  declare function createParenthesizedType(\n    type: TypeNode\n  ): ParenthesizedTypeNode;\n\n  declare function updateParenthesizedType(\n    node: ParenthesizedTypeNode,\n    type: TypeNode\n  ): ParenthesizedTypeNode;\n\n  declare function createThisTypeNode(): ThisTypeNode;\n\n  declare function createTypeOperatorNode(type: TypeNode): TypeOperatorNode;\n\n  declare function createTypeOperatorNode(\n    operator: typeof SyntaxKind.KeyOfKeyword | typeof SyntaxKind.UniqueKeyword,\n    type: TypeNode\n  ): TypeOperatorNode;\n\n  declare function updateTypeOperatorNode(\n    node: TypeOperatorNode,\n    type: TypeNode\n  ): TypeOperatorNode;\n\n  declare function createIndexedAccessTypeNode(\n    objectType: TypeNode,\n    indexType: TypeNode\n  ): IndexedAccessTypeNode;\n\n  declare function updateIndexedAccessTypeNode(\n    node: IndexedAccessTypeNode,\n    objectType: TypeNode,\n    indexType: TypeNode\n  ): IndexedAccessTypeNode;\n\n  declare function createMappedTypeNode(\n    readonlyToken: ReadonlyToken | PlusToken | MinusToken | void,\n    typeParameter: TypeParameterDeclaration,\n    questionToken: QuestionToken | PlusToken | MinusToken | void,\n    type: TypeNode | void\n  ): MappedTypeNode;\n\n  declare function updateMappedTypeNode(\n    node: MappedTypeNode,\n    readonlyToken: ReadonlyToken | PlusToken | MinusToken | void,\n    typeParameter: TypeParameterDeclaration,\n    questionToken: QuestionToken | PlusToken | MinusToken | void,\n    type: TypeNode | void\n  ): MappedTypeNode;\n\n  declare function createLiteralTypeNode(\n    literal: $ElementType<LiteralTypeNode, \"literal\">\n  ): LiteralTypeNode;\n\n  declare function updateLiteralTypeNode(\n    node: LiteralTypeNode,\n    literal: $ElementType<LiteralTypeNode, \"literal\">\n  ): LiteralTypeNode;\n\n  declare function createObjectBindingPattern(\n    elements: $ReadOnlyArray<BindingElement>\n  ): ObjectBindingPattern;\n\n  declare function updateObjectBindingPattern(\n    node: ObjectBindingPattern,\n    elements: $ReadOnlyArray<BindingElement>\n  ): ObjectBindingPattern;\n\n  declare function createArrayBindingPattern(\n    elements: $ReadOnlyArray<ArrayBindingElement>\n  ): ArrayBindingPattern;\n\n  declare function updateArrayBindingPattern(\n    node: ArrayBindingPattern,\n    elements: $ReadOnlyArray<ArrayBindingElement>\n  ): ArrayBindingPattern;\n\n  declare function createBindingElement(\n    dotDotDotToken: DotDotDotToken | void,\n    propertyName: string | PropertyName | void,\n    name: string | BindingName,\n    initializer?: Expression\n  ): BindingElement;\n\n  declare function updateBindingElement(\n    node: BindingElement,\n    dotDotDotToken: DotDotDotToken | void,\n    propertyName: PropertyName | void,\n    name: BindingName,\n    initializer: Expression | void\n  ): BindingElement;\n\n  declare function createArrayLiteral(\n    elements?: $ReadOnlyArray<Expression>,\n    multiLine?: boolean\n  ): ArrayLiteralExpression;\n\n  declare function updateArrayLiteral(\n    node: ArrayLiteralExpression,\n    elements: $ReadOnlyArray<Expression>\n  ): ArrayLiteralExpression;\n\n  declare function createObjectLiteral(\n    properties?: $ReadOnlyArray<ObjectLiteralElementLike>,\n    multiLine?: boolean\n  ): ObjectLiteralExpression;\n\n  declare function updateObjectLiteral(\n    node: ObjectLiteralExpression,\n    properties: $ReadOnlyArray<ObjectLiteralElementLike>\n  ): ObjectLiteralExpression;\n\n  declare function createPropertyAccess(\n    expression: Expression,\n    name: string | Identifier | void\n  ): PropertyAccessExpression;\n\n  declare function updatePropertyAccess(\n    node: PropertyAccessExpression,\n    expression: Expression,\n    name: Identifier\n  ): PropertyAccessExpression;\n\n  declare function createElementAccess(\n    expression: Expression,\n    index: number | Expression\n  ): ElementAccessExpression;\n\n  declare function updateElementAccess(\n    node: ElementAccessExpression,\n    expression: Expression,\n    argumentExpression: Expression\n  ): ElementAccessExpression;\n\n  declare function createCall(\n    expression: Expression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    argumentsArray: $ReadOnlyArray<Expression> | void\n  ): CallExpression;\n\n  declare function updateCall(\n    node: CallExpression,\n    expression: Expression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    argumentsArray: $ReadOnlyArray<Expression>\n  ): CallExpression;\n\n  declare function createNew(\n    expression: Expression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    argumentsArray: $ReadOnlyArray<Expression> | void\n  ): NewExpression;\n\n  declare function updateNew(\n    node: NewExpression,\n    expression: Expression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    argumentsArray: $ReadOnlyArray<Expression> | void\n  ): NewExpression;\n\n  declare function createTaggedTemplate(\n    tag: Expression,\n    template: TemplateLiteral\n  ): TaggedTemplateExpression;\n\n  declare function createTaggedTemplate(\n    tag: Expression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    template: TemplateLiteral\n  ): TaggedTemplateExpression;\n\n  declare function updateTaggedTemplate(\n    node: TaggedTemplateExpression,\n    tag: Expression,\n    template: TemplateLiteral\n  ): TaggedTemplateExpression;\n\n  declare function updateTaggedTemplate(\n    node: TaggedTemplateExpression,\n    tag: Expression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    template: TemplateLiteral\n  ): TaggedTemplateExpression;\n\n  declare function createTypeAssertion(\n    type: TypeNode,\n    expression: Expression\n  ): TypeAssertion;\n\n  declare function updateTypeAssertion(\n    node: TypeAssertion,\n    type: TypeNode,\n    expression: Expression\n  ): TypeAssertion;\n\n  declare function createParen(expression: Expression): ParenthesizedExpression;\n\n  declare function updateParen(\n    node: ParenthesizedExpression,\n    expression: Expression\n  ): ParenthesizedExpression;\n\n  declare function createFunctionExpression(\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    asteriskToken: AsteriskToken | void,\n    name: string | Identifier | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration> | void,\n    type: TypeNode | void,\n    body: Block\n  ): FunctionExpression;\n\n  declare function updateFunctionExpression(\n    node: FunctionExpression,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    asteriskToken: AsteriskToken | void,\n    name: Identifier | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    body: Block\n  ): FunctionExpression;\n\n  declare function createArrowFunction(\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    equalsGreaterThanToken: EqualsGreaterThanToken | void,\n    body: ConciseBody\n  ): ArrowFunction;\n\n  declare function updateArrowFunction(\n    node: ArrowFunction,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    equalsGreaterThanToken: Token<typeof SyntaxKind.EqualsGreaterThanToken>,\n    body: ConciseBody\n  ): ArrowFunction;\n\n  declare function createDelete(expression: Expression): DeleteExpression;\n\n  declare function updateDelete(\n    node: DeleteExpression,\n    expression: Expression\n  ): DeleteExpression;\n\n  declare function createTypeOf(expression: Expression): TypeOfExpression;\n\n  declare function updateTypeOf(\n    node: TypeOfExpression,\n    expression: Expression\n  ): TypeOfExpression;\n\n  declare function createVoid(expression: Expression): VoidExpression;\n\n  declare function updateVoid(\n    node: VoidExpression,\n    expression: Expression\n  ): VoidExpression;\n\n  declare function createAwait(expression: Expression): AwaitExpression;\n\n  declare function updateAwait(\n    node: AwaitExpression,\n    expression: Expression\n  ): AwaitExpression;\n\n  declare function createPrefix(\n    operator: PrefixUnaryOperator,\n    operand: Expression\n  ): PrefixUnaryExpression;\n\n  declare function updatePrefix(\n    node: PrefixUnaryExpression,\n    operand: Expression\n  ): PrefixUnaryExpression;\n\n  declare function createPostfix(\n    operand: Expression,\n    operator: PostfixUnaryOperator\n  ): PostfixUnaryExpression;\n\n  declare function updatePostfix(\n    node: PostfixUnaryExpression,\n    operand: Expression\n  ): PostfixUnaryExpression;\n\n  declare function createBinary(\n    left: Expression,\n    operator: BinaryOperator | BinaryOperatorToken,\n    right: Expression\n  ): BinaryExpression;\n\n  declare function updateBinary(\n    node: BinaryExpression,\n    left: Expression,\n    right: Expression,\n    operator?: BinaryOperator | BinaryOperatorToken\n  ): BinaryExpression;\n\n  declare function createConditional(\n    condition: Expression,\n    whenTrue: Expression,\n    whenFalse: Expression\n  ): ConditionalExpression;\n\n  declare function createConditional(\n    condition: Expression,\n    questionToken: QuestionToken,\n    whenTrue: Expression,\n    colonToken: ColonToken,\n    whenFalse: Expression\n  ): ConditionalExpression;\n\n  declare function updateConditional(\n    node: ConditionalExpression,\n    condition: Expression,\n    questionToken: Token<typeof SyntaxKind.QuestionToken>,\n    whenTrue: Expression,\n    colonToken: Token<typeof SyntaxKind.ColonToken>,\n    whenFalse: Expression\n  ): ConditionalExpression;\n\n  declare function createTemplateExpression(\n    head: TemplateHead,\n    templateSpans: $ReadOnlyArray<TemplateSpan>\n  ): TemplateExpression;\n\n  declare function updateTemplateExpression(\n    node: TemplateExpression,\n    head: TemplateHead,\n    templateSpans: $ReadOnlyArray<TemplateSpan>\n  ): TemplateExpression;\n\n  declare function createTemplateHead(text: string): TemplateHead;\n\n  declare function createTemplateMiddle(text: string): TemplateMiddle;\n\n  declare function createTemplateTail(text: string): TemplateTail;\n\n  declare function createNoSubstitutionTemplateLiteral(\n    text: string\n  ): NoSubstitutionTemplateLiteral;\n\n  declare function createYield(expression?: Expression): YieldExpression;\n\n  declare function createYield(\n    asteriskToken: AsteriskToken | void,\n    expression: Expression\n  ): YieldExpression;\n\n  declare function updateYield(\n    node: YieldExpression,\n    asteriskToken: AsteriskToken | void,\n    expression: Expression\n  ): YieldExpression;\n\n  declare function createSpread(expression: Expression): SpreadElement;\n\n  declare function updateSpread(\n    node: SpreadElement,\n    expression: Expression\n  ): SpreadElement;\n\n  declare function createClassExpression(\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | Identifier | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    heritageClauses: $ReadOnlyArray<HeritageClause> | void,\n    members: $ReadOnlyArray<ClassElement>\n  ): ClassExpression;\n\n  declare function updateClassExpression(\n    node: ClassExpression,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: Identifier | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    heritageClauses: $ReadOnlyArray<HeritageClause> | void,\n    members: $ReadOnlyArray<ClassElement>\n  ): ClassExpression;\n\n  declare function createOmittedExpression(): OmittedExpression;\n\n  declare function createExpressionWithTypeArguments(\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    expression: Expression\n  ): ExpressionWithTypeArguments;\n\n  declare function updateExpressionWithTypeArguments(\n    node: ExpressionWithTypeArguments,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    expression: Expression\n  ): ExpressionWithTypeArguments;\n\n  declare function createAsExpression(\n    expression: Expression,\n    type: TypeNode\n  ): AsExpression;\n\n  declare function updateAsExpression(\n    node: AsExpression,\n    expression: Expression,\n    type: TypeNode\n  ): AsExpression;\n\n  declare function createNonNullExpression(\n    expression: Expression\n  ): NonNullExpression;\n\n  declare function updateNonNullExpression(\n    node: NonNullExpression,\n    expression: Expression\n  ): NonNullExpression;\n\n  declare function createMetaProperty(\n    keywordToken: $ElementType<MetaProperty, \"keywordToken\">,\n    name: Identifier\n  ): MetaProperty;\n\n  declare function updateMetaProperty(\n    node: MetaProperty,\n    name: Identifier\n  ): MetaProperty;\n\n  declare function createTemplateSpan(\n    expression: Expression,\n    literal: TemplateMiddle | TemplateTail\n  ): TemplateSpan;\n\n  declare function updateTemplateSpan(\n    node: TemplateSpan,\n    expression: Expression,\n    literal: TemplateMiddle | TemplateTail\n  ): TemplateSpan;\n\n  declare function createSemicolonClassElement(): SemicolonClassElement;\n\n  declare function createBlock(\n    statements: $ReadOnlyArray<Statement>,\n    multiLine?: boolean\n  ): Block;\n\n  declare function updateBlock(\n    node: Block,\n    statements: $ReadOnlyArray<Statement>\n  ): Block;\n\n  declare function createVariableStatement(\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    declarationList:\n      | VariableDeclarationList\n      | $ReadOnlyArray<VariableDeclaration>\n  ): VariableStatement;\n\n  declare function updateVariableStatement(\n    node: VariableStatement,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    declarationList: VariableDeclarationList\n  ): VariableStatement;\n\n  declare function createEmptyStatement(): EmptyStatement;\n\n  declare function createExpressionStatement(\n    expression: Expression\n  ): ExpressionStatement;\n\n  declare function updateExpressionStatement(\n    node: ExpressionStatement,\n    expression: Expression\n  ): ExpressionStatement;\n\n  declare var createStatement: typeof createExpressionStatement;\n  declare var updateStatement: typeof updateExpressionStatement;\n  declare function createIf(\n    expression: Expression,\n    thenStatement: Statement,\n    elseStatement?: Statement\n  ): IfStatement;\n\n  declare function updateIf(\n    node: IfStatement,\n    expression: Expression,\n    thenStatement: Statement,\n    elseStatement: Statement | void\n  ): IfStatement;\n\n  declare function createDo(\n    statement: Statement,\n    expression: Expression\n  ): DoStatement;\n\n  declare function updateDo(\n    node: DoStatement,\n    statement: Statement,\n    expression: Expression\n  ): DoStatement;\n\n  declare function createWhile(\n    expression: Expression,\n    statement: Statement\n  ): WhileStatement;\n\n  declare function updateWhile(\n    node: WhileStatement,\n    expression: Expression,\n    statement: Statement\n  ): WhileStatement;\n\n  declare function createFor(\n    initializer: ForInitializer | void,\n    condition: Expression | void,\n    incrementor: Expression | void,\n    statement: Statement\n  ): ForStatement;\n\n  declare function updateFor(\n    node: ForStatement,\n    initializer: ForInitializer | void,\n    condition: Expression | void,\n    incrementor: Expression | void,\n    statement: Statement\n  ): ForStatement;\n\n  declare function createForIn(\n    initializer: ForInitializer,\n    expression: Expression,\n    statement: Statement\n  ): ForInStatement;\n\n  declare function updateForIn(\n    node: ForInStatement,\n    initializer: ForInitializer,\n    expression: Expression,\n    statement: Statement\n  ): ForInStatement;\n\n  declare function createForOf(\n    awaitModifier: AwaitKeywordToken | void,\n    initializer: ForInitializer,\n    expression: Expression,\n    statement: Statement\n  ): ForOfStatement;\n\n  declare function updateForOf(\n    node: ForOfStatement,\n    awaitModifier: AwaitKeywordToken | void,\n    initializer: ForInitializer,\n    expression: Expression,\n    statement: Statement\n  ): ForOfStatement;\n\n  declare function createContinue(\n    label?: string | Identifier\n  ): ContinueStatement;\n\n  declare function updateContinue(\n    node: ContinueStatement,\n    label: Identifier | void\n  ): ContinueStatement;\n\n  declare function createBreak(label?: string | Identifier): BreakStatement;\n\n  declare function updateBreak(\n    node: BreakStatement,\n    label: Identifier | void\n  ): BreakStatement;\n\n  declare function createReturn(expression?: Expression): ReturnStatement;\n\n  declare function updateReturn(\n    node: ReturnStatement,\n    expression: Expression | void\n  ): ReturnStatement;\n\n  declare function createWith(\n    expression: Expression,\n    statement: Statement\n  ): WithStatement;\n\n  declare function updateWith(\n    node: WithStatement,\n    expression: Expression,\n    statement: Statement\n  ): WithStatement;\n\n  declare function createSwitch(\n    expression: Expression,\n    caseBlock: CaseBlock\n  ): SwitchStatement;\n\n  declare function updateSwitch(\n    node: SwitchStatement,\n    expression: Expression,\n    caseBlock: CaseBlock\n  ): SwitchStatement;\n\n  declare function createLabel(\n    label: string | Identifier,\n    statement: Statement\n  ): LabeledStatement;\n\n  declare function updateLabel(\n    node: LabeledStatement,\n    label: Identifier,\n    statement: Statement\n  ): LabeledStatement;\n\n  declare function createThrow(expression: Expression): ThrowStatement;\n\n  declare function updateThrow(\n    node: ThrowStatement,\n    expression: Expression\n  ): ThrowStatement;\n\n  declare function createTry(\n    tryBlock: Block,\n    catchClause: CatchClause | void,\n    finallyBlock: Block | void\n  ): TryStatement;\n\n  declare function updateTry(\n    node: TryStatement,\n    tryBlock: Block,\n    catchClause: CatchClause | void,\n    finallyBlock: Block | void\n  ): TryStatement;\n\n  declare function createDebuggerStatement(): DebuggerStatement;\n\n  declare function createVariableDeclaration(\n    name: string | BindingName,\n    type?: TypeNode,\n    initializer?: Expression\n  ): VariableDeclaration;\n\n  declare function updateVariableDeclaration(\n    node: VariableDeclaration,\n    name: BindingName,\n    type: TypeNode | void,\n    initializer: Expression | void\n  ): VariableDeclaration;\n\n  declare function createVariableDeclarationList(\n    declarations: $ReadOnlyArray<VariableDeclaration>,\n    flags?: $Values<typeof NodeFlags>\n  ): VariableDeclarationList;\n\n  declare function updateVariableDeclarationList(\n    node: VariableDeclarationList,\n    declarations: $ReadOnlyArray<VariableDeclaration>\n  ): VariableDeclarationList;\n\n  declare function createFunctionDeclaration(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    asteriskToken: AsteriskToken | void,\n    name: string | Identifier | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    body: Block | void\n  ): FunctionDeclaration;\n\n  declare function updateFunctionDeclaration(\n    node: FunctionDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    asteriskToken: AsteriskToken | void,\n    name: Identifier | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    parameters: $ReadOnlyArray<ParameterDeclaration>,\n    type: TypeNode | void,\n    body: Block | void\n  ): FunctionDeclaration;\n\n  declare function createClassDeclaration(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | Identifier | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    heritageClauses: $ReadOnlyArray<HeritageClause> | void,\n    members: $ReadOnlyArray<ClassElement>\n  ): ClassDeclaration;\n\n  declare function updateClassDeclaration(\n    node: ClassDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: Identifier | void,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    heritageClauses: $ReadOnlyArray<HeritageClause> | void,\n    members: $ReadOnlyArray<ClassElement>\n  ): ClassDeclaration;\n\n  declare function createInterfaceDeclaration(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | Identifier,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    heritageClauses: $ReadOnlyArray<HeritageClause> | void,\n    members: $ReadOnlyArray<TypeElement>\n  ): InterfaceDeclaration;\n\n  declare function updateInterfaceDeclaration(\n    node: InterfaceDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: Identifier,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    heritageClauses: $ReadOnlyArray<HeritageClause> | void,\n    members: $ReadOnlyArray<TypeElement>\n  ): InterfaceDeclaration;\n\n  declare function createTypeAliasDeclaration(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | Identifier,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    type: TypeNode\n  ): TypeAliasDeclaration;\n\n  declare function updateTypeAliasDeclaration(\n    node: TypeAliasDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: Identifier,\n    typeParameters: $ReadOnlyArray<TypeParameterDeclaration> | void,\n    type: TypeNode\n  ): TypeAliasDeclaration;\n\n  declare function createEnumDeclaration(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | Identifier,\n    members: $ReadOnlyArray<EnumMember>\n  ): EnumDeclaration;\n\n  declare function updateEnumDeclaration(\n    node: EnumDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: Identifier,\n    members: $ReadOnlyArray<EnumMember>\n  ): EnumDeclaration;\n\n  declare function createModuleDeclaration(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: ModuleName,\n    body: ModuleBody | void,\n    flags?: $Values<typeof NodeFlags>\n  ): ModuleDeclaration;\n\n  declare function updateModuleDeclaration(\n    node: ModuleDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: ModuleName,\n    body: ModuleBody | void\n  ): ModuleDeclaration;\n\n  declare function createModuleBlock(\n    statements: $ReadOnlyArray<Statement>\n  ): ModuleBlock;\n\n  declare function updateModuleBlock(\n    node: ModuleBlock,\n    statements: $ReadOnlyArray<Statement>\n  ): ModuleBlock;\n\n  declare function createCaseBlock(\n    clauses: $ReadOnlyArray<CaseOrDefaultClause>\n  ): CaseBlock;\n\n  declare function updateCaseBlock(\n    node: CaseBlock,\n    clauses: $ReadOnlyArray<CaseOrDefaultClause>\n  ): CaseBlock;\n\n  declare function createNamespaceExportDeclaration(\n    name: string | Identifier\n  ): NamespaceExportDeclaration;\n\n  declare function updateNamespaceExportDeclaration(\n    node: NamespaceExportDeclaration,\n    name: Identifier\n  ): NamespaceExportDeclaration;\n\n  declare function createImportEqualsDeclaration(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: string | Identifier,\n    moduleReference: ModuleReference\n  ): ImportEqualsDeclaration;\n\n  declare function updateImportEqualsDeclaration(\n    node: ImportEqualsDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    name: Identifier,\n    moduleReference: ModuleReference\n  ): ImportEqualsDeclaration;\n\n  declare function createImportDeclaration(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    importClause: ImportClause | void,\n    moduleSpecifier: Expression\n  ): ImportDeclaration;\n\n  declare function updateImportDeclaration(\n    node: ImportDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    importClause: ImportClause | void,\n    moduleSpecifier: Expression\n  ): ImportDeclaration;\n\n  declare function createImportClause(\n    name: Identifier | void,\n    namedBindings: NamedImportBindings | void\n  ): ImportClause;\n\n  declare function updateImportClause(\n    node: ImportClause,\n    name: Identifier | void,\n    namedBindings: NamedImportBindings | void\n  ): ImportClause;\n\n  declare function createNamespaceImport(name: Identifier): NamespaceImport;\n\n  declare function updateNamespaceImport(\n    node: NamespaceImport,\n    name: Identifier\n  ): NamespaceImport;\n\n  declare function createNamedImports(\n    elements: $ReadOnlyArray<ImportSpecifier>\n  ): NamedImports;\n\n  declare function updateNamedImports(\n    node: NamedImports,\n    elements: $ReadOnlyArray<ImportSpecifier>\n  ): NamedImports;\n\n  declare function createImportSpecifier(\n    propertyName: Identifier | void,\n    name: Identifier\n  ): ImportSpecifier;\n\n  declare function updateImportSpecifier(\n    node: ImportSpecifier,\n    propertyName: Identifier | void,\n    name: Identifier\n  ): ImportSpecifier;\n\n  declare function createExportAssignment(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    isExportEquals: boolean | void,\n    expression: Expression\n  ): ExportAssignment;\n\n  declare function updateExportAssignment(\n    node: ExportAssignment,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    expression: Expression\n  ): ExportAssignment;\n\n  declare function createExportDeclaration(\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    exportClause: NamedExports | void,\n    moduleSpecifier?: Expression\n  ): ExportDeclaration;\n\n  declare function updateExportDeclaration(\n    node: ExportDeclaration,\n    decorators: $ReadOnlyArray<Decorator> | void,\n    modifiers: $ReadOnlyArray<Modifier> | void,\n    exportClause: NamedExports | void,\n    moduleSpecifier: Expression | void\n  ): ExportDeclaration;\n\n  declare function createNamedExports(\n    elements: $ReadOnlyArray<ExportSpecifier>\n  ): NamedExports;\n\n  declare function updateNamedExports(\n    node: NamedExports,\n    elements: $ReadOnlyArray<ExportSpecifier>\n  ): NamedExports;\n\n  declare function createExportSpecifier(\n    propertyName: string | Identifier | void,\n    name: string | Identifier\n  ): ExportSpecifier;\n\n  declare function updateExportSpecifier(\n    node: ExportSpecifier,\n    propertyName: Identifier | void,\n    name: Identifier\n  ): ExportSpecifier;\n\n  declare function createExternalModuleReference(\n    expression: Expression\n  ): ExternalModuleReference;\n\n  declare function updateExternalModuleReference(\n    node: ExternalModuleReference,\n    expression: Expression\n  ): ExternalModuleReference;\n\n  declare function createJsxElement(\n    openingElement: JsxOpeningElement,\n    children: $ReadOnlyArray<JsxChild>,\n    closingElement: JsxClosingElement\n  ): JsxElement;\n\n  declare function updateJsxElement(\n    node: JsxElement,\n    openingElement: JsxOpeningElement,\n    children: $ReadOnlyArray<JsxChild>,\n    closingElement: JsxClosingElement\n  ): JsxElement;\n\n  declare function createJsxSelfClosingElement(\n    tagName: JsxTagNameExpression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    attributes: JsxAttributes\n  ): JsxSelfClosingElement;\n\n  declare function updateJsxSelfClosingElement(\n    node: JsxSelfClosingElement,\n    tagName: JsxTagNameExpression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    attributes: JsxAttributes\n  ): JsxSelfClosingElement;\n\n  declare function createJsxOpeningElement(\n    tagName: JsxTagNameExpression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    attributes: JsxAttributes\n  ): JsxOpeningElement;\n\n  declare function updateJsxOpeningElement(\n    node: JsxOpeningElement,\n    tagName: JsxTagNameExpression,\n    typeArguments: $ReadOnlyArray<TypeNode> | void,\n    attributes: JsxAttributes\n  ): JsxOpeningElement;\n\n  declare function createJsxClosingElement(\n    tagName: JsxTagNameExpression\n  ): JsxClosingElement;\n\n  declare function updateJsxClosingElement(\n    node: JsxClosingElement,\n    tagName: JsxTagNameExpression\n  ): JsxClosingElement;\n\n  declare function createJsxFragment(\n    openingFragment: JsxOpeningFragment,\n    children: $ReadOnlyArray<JsxChild>,\n    closingFragment: JsxClosingFragment\n  ): JsxFragment;\n\n  declare function updateJsxFragment(\n    node: JsxFragment,\n    openingFragment: JsxOpeningFragment,\n    children: $ReadOnlyArray<JsxChild>,\n    closingFragment: JsxClosingFragment\n  ): JsxFragment;\n\n  declare function createJsxAttribute(\n    name: Identifier,\n    initializer: StringLiteral | JsxExpression\n  ): JsxAttribute;\n\n  declare function updateJsxAttribute(\n    node: JsxAttribute,\n    name: Identifier,\n    initializer: StringLiteral | JsxExpression\n  ): JsxAttribute;\n\n  declare function createJsxAttributes(\n    properties: $ReadOnlyArray<JsxAttributeLike>\n  ): JsxAttributes;\n\n  declare function updateJsxAttributes(\n    node: JsxAttributes,\n    properties: $ReadOnlyArray<JsxAttributeLike>\n  ): JsxAttributes;\n\n  declare function createJsxSpreadAttribute(\n    expression: Expression\n  ): JsxSpreadAttribute;\n\n  declare function updateJsxSpreadAttribute(\n    node: JsxSpreadAttribute,\n    expression: Expression\n  ): JsxSpreadAttribute;\n\n  declare function createJsxExpression(\n    dotDotDotToken: DotDotDotToken | void,\n    expression: Expression | void\n  ): JsxExpression;\n\n  declare function updateJsxExpression(\n    node: JsxExpression,\n    expression: Expression | void\n  ): JsxExpression;\n\n  declare function createCaseClause(\n    expression: Expression,\n    statements: $ReadOnlyArray<Statement>\n  ): CaseClause;\n\n  declare function updateCaseClause(\n    node: CaseClause,\n    expression: Expression,\n    statements: $ReadOnlyArray<Statement>\n  ): CaseClause;\n\n  declare function createDefaultClause(\n    statements: $ReadOnlyArray<Statement>\n  ): DefaultClause;\n\n  declare function updateDefaultClause(\n    node: DefaultClause,\n    statements: $ReadOnlyArray<Statement>\n  ): DefaultClause;\n\n  declare function createHeritageClause(\n    token: $ElementType<HeritageClause, \"token\">,\n    types: $ReadOnlyArray<ExpressionWithTypeArguments>\n  ): HeritageClause;\n\n  declare function updateHeritageClause(\n    node: HeritageClause,\n    types: $ReadOnlyArray<ExpressionWithTypeArguments>\n  ): HeritageClause;\n\n  declare function createCatchClause(\n    variableDeclaration: string | VariableDeclaration | void,\n    block: Block\n  ): CatchClause;\n\n  declare function updateCatchClause(\n    node: CatchClause,\n    variableDeclaration: VariableDeclaration | void,\n    block: Block\n  ): CatchClause;\n\n  declare function createPropertyAssignment(\n    name: string | PropertyName,\n    initializer: Expression\n  ): PropertyAssignment;\n\n  declare function updatePropertyAssignment(\n    node: PropertyAssignment,\n    name: PropertyName,\n    initializer: Expression\n  ): PropertyAssignment;\n\n  declare function createShorthandPropertyAssignment(\n    name: string | Identifier,\n    objectAssignmentInitializer?: Expression\n  ): ShorthandPropertyAssignment;\n\n  declare function updateShorthandPropertyAssignment(\n    node: ShorthandPropertyAssignment,\n    name: Identifier,\n    objectAssignmentInitializer: Expression | void\n  ): ShorthandPropertyAssignment;\n\n  declare function createSpreadAssignment(\n    expression: Expression\n  ): SpreadAssignment;\n\n  declare function updateSpreadAssignment(\n    node: SpreadAssignment,\n    expression: Expression\n  ): SpreadAssignment;\n\n  declare function createEnumMember(\n    name: string | PropertyName,\n    initializer?: Expression\n  ): EnumMember;\n\n  declare function updateEnumMember(\n    node: EnumMember,\n    name: PropertyName,\n    initializer: Expression | void\n  ): EnumMember;\n\n  declare function updateSourceFileNode(\n    node: SourceFile,\n    statements: $ReadOnlyArray<Statement>,\n    isDeclarationFile?: boolean,\n    referencedFiles?: $ElementType<SourceFile, \"referencedFiles\">,\n    typeReferences?: $ElementType<SourceFile, \"typeReferenceDirectives\">,\n    hasNoDefaultLib?: boolean,\n    libReferences?: $ElementType<SourceFile, \"libReferenceDirectives\">\n  ): SourceFile;\n\n  declare function getMutableClone<T: Node>(node: T): T;\n\n  declare function createNotEmittedStatement(\n    original: Node\n  ): NotEmittedStatement;\n\n  declare function createPartiallyEmittedExpression(\n    expression: Expression,\n    original?: Node\n  ): PartiallyEmittedExpression;\n\n  declare function updatePartiallyEmittedExpression(\n    node: PartiallyEmittedExpression,\n    expression: Expression\n  ): PartiallyEmittedExpression;\n\n  declare function createCommaList(\n    elements: $ReadOnlyArray<Expression>\n  ): CommaListExpression;\n\n  declare function updateCommaList(\n    node: CommaListExpression,\n    elements: $ReadOnlyArray<Expression>\n  ): CommaListExpression;\n\n  declare function createBundle(\n    sourceFiles: $ReadOnlyArray<SourceFile>,\n    prepends?: $ReadOnlyArray<UnparsedSource | InputFiles>\n  ): Bundle;\n\n  declare function createUnparsedSourceFile(text: string): UnparsedSource;\n\n  declare function createUnparsedSourceFile(\n    inputFile: InputFiles,\n    type: \"js\" | \"dts\"\n  ): UnparsedSource;\n\n  declare function createUnparsedSourceFile(\n    text: string,\n    mapPath: string | void,\n    map: string | void\n  ): UnparsedSource;\n\n  declare function createInputFiles(\n    javascriptText: string,\n    declarationText: string\n  ): InputFiles;\n\n  declare function createInputFiles(\n    readFileText: (path: string) => string | void,\n    javascriptPath: string,\n    javascriptMapPath: string | void,\n    declarationPath: string,\n    declarationMapPath: string | void\n  ): InputFiles;\n\n  declare function createInputFiles(\n    javascriptText: string,\n    declarationText: string,\n    javascriptMapPath: string | void,\n    javascriptMapText: string | void,\n    declarationMapPath: string | void,\n    declarationMapText: string | void\n  ): InputFiles;\n\n  declare function updateBundle(\n    node: Bundle,\n    sourceFiles: $ReadOnlyArray<SourceFile>,\n    prepends?: $ReadOnlyArray<UnparsedSource>\n  ): Bundle;\n\n  declare function createImmediatelyInvokedFunctionExpression(\n    statements: $ReadOnlyArray<Statement>\n  ): CallExpression;\n\n  declare function createImmediatelyInvokedFunctionExpression(\n    statements: $ReadOnlyArray<Statement>,\n    param: ParameterDeclaration,\n    paramValue: Expression\n  ): CallExpression;\n\n  declare function createImmediatelyInvokedArrowFunction(\n    statements: $ReadOnlyArray<Statement>\n  ): CallExpression;\n\n  declare function createImmediatelyInvokedArrowFunction(\n    statements: $ReadOnlyArray<Statement>,\n    param: ParameterDeclaration,\n    paramValue: Expression\n  ): CallExpression;\n\n  declare function createComma(left: Expression, right: Expression): Expression;\n\n  declare function createLessThan(\n    left: Expression,\n    right: Expression\n  ): Expression;\n\n  declare function createAssignment(\n    left: ObjectLiteralExpression | ArrayLiteralExpression,\n    right: Expression\n  ): DestructuringAssignment;\n\n  declare function createAssignment(\n    left: Expression,\n    right: Expression\n  ): BinaryExpression;\n\n  declare function createStrictEquality(\n    left: Expression,\n    right: Expression\n  ): BinaryExpression;\n\n  declare function createStrictInequality(\n    left: Expression,\n    right: Expression\n  ): BinaryExpression;\n\n  declare function createAdd(\n    left: Expression,\n    right: Expression\n  ): BinaryExpression;\n\n  declare function createSubtract(\n    left: Expression,\n    right: Expression\n  ): BinaryExpression;\n\n  declare function createPostfixIncrement(\n    operand: Expression\n  ): PostfixUnaryExpression;\n\n  declare function createLogicalAnd(\n    left: Expression,\n    right: Expression\n  ): BinaryExpression;\n\n  declare function createLogicalOr(\n    left: Expression,\n    right: Expression\n  ): BinaryExpression;\n\n  declare function createLogicalNot(operand: Expression): PrefixUnaryExpression;\n\n  declare function createVoidZero(): VoidExpression;\n\n  declare function createExportDefault(\n    expression: Expression\n  ): ExportAssignment;\n\n  declare function createExternalModuleExport(\n    exportName: Identifier\n  ): ExportDeclaration;\n\n  declare function disposeEmitNodes(sourceFile: SourceFile): void;\n\n  declare function setTextRange<T: TextRange>(\n    range: T,\n    location: TextRange | void\n  ): T;\n\n  declare function setEmitFlags<T: Node>(\n    node: T,\n    emitFlags: $Values<typeof EmitFlags>\n  ): T;\n\n  declare function getSourceMapRange(node: Node): SourceMapRange;\n\n  declare function setSourceMapRange<T: Node>(\n    node: T,\n    range: SourceMapRange | void\n  ): T;\n\n  declare function createSourceMapSource(\n    fileName: string,\n    text: string,\n    skipTrivia?: (pos: number) => number\n  ): SourceMapSource;\n\n  declare function getTokenSourceMapRange(\n    node: Node,\n    token: $Values<typeof SyntaxKind>\n  ): SourceMapRange | void;\n\n  declare function setTokenSourceMapRange<T: Node>(\n    node: T,\n    token: $Values<typeof SyntaxKind>,\n    range: SourceMapRange | void\n  ): T;\n\n  declare function getCommentRange(node: Node): TextRange;\n\n  declare function setCommentRange<T: Node>(node: T, range: TextRange): T;\n\n  declare function getSyntheticLeadingComments(\n    node: Node\n  ): SynthesizedComment[] | void;\n\n  declare function setSyntheticLeadingComments<T: Node>(\n    node: T,\n    comments: SynthesizedComment[] | void\n  ): T;\n\n  declare function addSyntheticLeadingComment<T: Node>(\n    node: T,\n    kind:\n      | typeof SyntaxKind.SingleLineCommentTrivia\n      | typeof SyntaxKind.MultiLineCommentTrivia,\n    text: string,\n    hasTrailingNewLine?: boolean\n  ): T;\n\n  declare function getSyntheticTrailingComments(\n    node: Node\n  ): SynthesizedComment[] | void;\n\n  declare function setSyntheticTrailingComments<T: Node>(\n    node: T,\n    comments: SynthesizedComment[] | void\n  ): T;\n\n  declare function addSyntheticTrailingComment<T: Node>(\n    node: T,\n    kind:\n      | typeof SyntaxKind.SingleLineCommentTrivia\n      | typeof SyntaxKind.MultiLineCommentTrivia,\n    text: string,\n    hasTrailingNewLine?: boolean\n  ): T;\n\n  declare function moveSyntheticComments<T: Node>(node: T, original: Node): T;\n\n  declare function getConstantValue(\n    node: PropertyAccessExpression | ElementAccessExpression\n  ): string | number | void;\n\n  declare function setConstantValue(\n    node: PropertyAccessExpression | ElementAccessExpression,\n    value: string | number\n  ): PropertyAccessExpression | ElementAccessExpression;\n\n  declare function addEmitHelper<T: Node>(node: T, helper: EmitHelper): T;\n\n  declare function addEmitHelpers<T: Node>(\n    node: T,\n    helpers: EmitHelper[] | void\n  ): T;\n\n  declare function removeEmitHelper(node: Node, helper: EmitHelper): boolean;\n\n  declare function getEmitHelpers(node: Node): EmitHelper[] | void;\n\n  declare function moveEmitHelpers(\n    source: Node,\n    target: Node,\n    predicate: (helper: EmitHelper) => boolean\n  ): void;\n\n  declare function setOriginalNode<T: Node>(node: T, original: Node | void): T;\n\n  declare function visitNode<T: Node>(\n    node: T | void,\n    visitor: Visitor | void,\n    test?: (node: Node) => boolean,\n    lift?: (node: NodeArray<Node>) => T\n  ): T;\n\n  declare function visitNode<T: Node>(\n    node: T | void,\n    visitor: Visitor | void,\n    test?: (node: Node) => boolean,\n    lift?: (node: NodeArray<Node>) => T\n  ): T | void;\n\n  declare function visitNodes<T: Node>(\n    nodes: NodeArray<T> | void,\n    visitor: Visitor,\n    test?: (node: Node) => boolean,\n    start?: number,\n    count?: number\n  ): NodeArray<T>;\n\n  declare function visitNodes<T: Node>(\n    nodes: NodeArray<T> | void,\n    visitor: Visitor,\n    test?: (node: Node) => boolean,\n    start?: number,\n    count?: number\n  ): NodeArray<T> | void;\n\n  declare function visitLexicalEnvironment(\n    statements: NodeArray<Statement>,\n    visitor: Visitor,\n    context: TransformationContext,\n    start?: number,\n    ensureUseStrict?: boolean\n  ): NodeArray<Statement>;\n\n  declare function visitParameterList(\n    nodes: NodeArray<ParameterDeclaration> | void,\n    visitor: Visitor,\n    context: TransformationContext,\n    nodesVisitor?: typeof visitNodes\n  ): NodeArray<ParameterDeclaration>;\n\n  declare function visitFunctionBody(\n    node: FunctionBody,\n    visitor: Visitor,\n    context: TransformationContext\n  ): FunctionBody;\n\n  declare function visitFunctionBody(\n    node: FunctionBody | void,\n    visitor: Visitor,\n    context: TransformationContext\n  ): FunctionBody | void;\n\n  declare function visitFunctionBody(\n    node: ConciseBody,\n    visitor: Visitor,\n    context: TransformationContext\n  ): ConciseBody;\n\n  declare function visitEachChild<T: Node>(\n    node: T,\n    visitor: Visitor,\n    context: TransformationContext\n  ): T;\n\n  declare function visitEachChild<T: Node>(\n    node: T | void,\n    visitor: Visitor,\n    context: TransformationContext,\n    nodesVisitor?: typeof visitNodes,\n    tokenVisitor?: Visitor\n  ): T | void;\n\n  declare function createPrinter(\n    printerOptions?: PrinterOptions,\n    handlers?: PrintHandlers\n  ): Printer;\n\n  declare function findConfigFile(\n    searchPath: string,\n    fileExists: (fileName: string) => boolean,\n    configName?: string\n  ): string | void;\n\n  declare function resolveTripleslashReference(\n    moduleName: string,\n    containingFile: string\n  ): string;\n\n  declare function createCompilerHost(\n    options: CompilerOptions,\n    setParentNodes?: boolean\n  ): CompilerHost;\n\n  declare function getPreEmitDiagnostics(\n    program: Program,\n    sourceFile?: SourceFile,\n    cancellationToken?: CancellationToken\n  ): $ReadOnlyArray<Diagnostic>;\n\n  declare type FormatDiagnosticsHost = {\n    getCurrentDirectory(): string,\n    getCanonicalFileName(fileName: string): string,\n    getNewLine(): string,\n    ...\n  };\n\n  declare function formatDiagnostics(\n    diagnostics: $ReadOnlyArray<Diagnostic>,\n    host: FormatDiagnosticsHost\n  ): string;\n\n  declare function formatDiagnostic(\n    diagnostic: Diagnostic,\n    host: FormatDiagnosticsHost\n  ): string;\n\n  declare function formatDiagnosticsWithColorAndContext(\n    diagnostics: $ReadOnlyArray<Diagnostic>,\n    host: FormatDiagnosticsHost\n  ): string;\n\n  declare function flattenDiagnosticMessageText(\n    messageText: string | DiagnosticMessageChain | void,\n    newLine: string\n  ): string;\n\n  declare function getConfigFileParsingDiagnostics(\n    configFileParseResult: ParsedCommandLine\n  ): $ReadOnlyArray<Diagnostic>;\n\n  declare function createProgram(\n    createProgramOptions: CreateProgramOptions\n  ): Program;\n\n  declare function createProgram(\n    rootNames: $ReadOnlyArray<string>,\n    options: CompilerOptions,\n    host?: CompilerHost,\n    oldProgram?: Program,\n    configFileParsingDiagnostics?: $ReadOnlyArray<Diagnostic>\n  ): Program;\n\n  declare type ResolveProjectReferencePathHost = { fileExists(fileName: string): boolean, ... };\n\n  declare function resolveProjectReferencePath(\n    ref: ProjectReference\n  ): ResolvedConfigFileName;\n\n  declare function resolveProjectReferencePath(\n    host: ResolveProjectReferencePathHost,\n    ref: ProjectReference\n  ): ResolvedConfigFileName;\n\n  declare type EmitOutput = {\n    outputFiles: OutputFile[],\n    emitSkipped: boolean,\n    ...\n  };\n\n  declare type OutputFile = {\n    name: string,\n    writeByteOrderMark: boolean,\n    text: string,\n    ...\n  };\n\n  declare type AffectedFileResult<T> = {\n    result: T,\n    affected: SourceFile | Program,\n    ...\n  } | void;\n  declare type BuilderProgramHost = {\n    useCaseSensitiveFileNames(): boolean,\n    createHash?: (data: string) => string,\n    writeFile?: WriteFileCallback,\n    ...\n  };\n\n  declare type BuilderProgram = {\n    getProgram(): Program,\n    getCompilerOptions(): CompilerOptions,\n    getSourceFile(fileName: string): SourceFile | void,\n    getSourceFiles(): $ReadOnlyArray<SourceFile>,\n    getOptionsDiagnostics(\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<Diagnostic>,\n    getGlobalDiagnostics(\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<Diagnostic>,\n    getConfigFileParsingDiagnostics(): $ReadOnlyArray<Diagnostic>,\n    getSyntacticDiagnostics(\n      sourceFile?: SourceFile,\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<Diagnostic>,\n    getDeclarationDiagnostics(\n      sourceFile?: SourceFile,\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<DiagnosticWithLocation>,\n    getAllDependencies(sourceFile: SourceFile): $ReadOnlyArray<string>,\n    getSemanticDiagnostics(\n      sourceFile?: SourceFile,\n      cancellationToken?: CancellationToken\n    ): $ReadOnlyArray<Diagnostic>,\n    emit(\n      targetSourceFile?: SourceFile,\n      writeFile?: WriteFileCallback,\n      cancellationToken?: CancellationToken,\n      emitOnlyDtsFiles?: boolean,\n      customTransformers?: CustomTransformers\n    ): EmitResult,\n    getCurrentDirectory(): string,\n    ...\n  };\n\n  declare type SemanticDiagnosticsBuilderProgram = {\n    ...$Exact<BuilderProgram>,\n    getSemanticDiagnosticsOfNextAffectedFile(\n      cancellationToken?: CancellationToken,\n      ignoreSourceFile?: (sourceFile: SourceFile) => boolean\n    ): AffectedFileResult<$ReadOnlyArray<Diagnostic>>,\n    ...\n  };\n\n  declare type EmitAndSemanticDiagnosticsBuilderProgram = {\n    ...$Exact<BuilderProgram>,\n    emitNextAffectedFile(\n      writeFile?: WriteFileCallback,\n      cancellationToken?: CancellationToken,\n      emitOnlyDtsFiles?: boolean,\n      customTransformers?: CustomTransformers\n    ): AffectedFileResult<EmitResult>,\n    ...\n  };\n\n  declare function createSemanticDiagnosticsBuilderProgram(\n    newProgram: Program,\n    host: BuilderProgramHost,\n    oldProgram?: SemanticDiagnosticsBuilderProgram,\n    configFileParsingDiagnostics?: $ReadOnlyArray<Diagnostic>\n  ): SemanticDiagnosticsBuilderProgram;\n\n  declare function createSemanticDiagnosticsBuilderProgram(\n    rootNames: $ReadOnlyArray<string> | void,\n    options: CompilerOptions | void,\n    host?: CompilerHost,\n    oldProgram?: SemanticDiagnosticsBuilderProgram,\n    configFileParsingDiagnostics?: $ReadOnlyArray<Diagnostic>,\n    projectReferences?: $ReadOnlyArray<ProjectReference>\n  ): SemanticDiagnosticsBuilderProgram;\n\n  declare function createEmitAndSemanticDiagnosticsBuilderProgram(\n    newProgram: Program,\n    host: BuilderProgramHost,\n    oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram,\n    configFileParsingDiagnostics?: $ReadOnlyArray<Diagnostic>\n  ): EmitAndSemanticDiagnosticsBuilderProgram;\n\n  declare function createEmitAndSemanticDiagnosticsBuilderProgram(\n    rootNames: $ReadOnlyArray<string> | void,\n    options: CompilerOptions | void,\n    host?: CompilerHost,\n    oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram,\n    configFileParsingDiagnostics?: $ReadOnlyArray<Diagnostic>,\n    projectReferences?: $ReadOnlyArray<ProjectReference>\n  ): EmitAndSemanticDiagnosticsBuilderProgram;\n\n  declare function createAbstractBuilder(\n    newProgram: Program,\n    host: BuilderProgramHost,\n    oldProgram?: BuilderProgram,\n    configFileParsingDiagnostics?: $ReadOnlyArray<Diagnostic>\n  ): BuilderProgram;\n\n  declare function createAbstractBuilder(\n    rootNames: $ReadOnlyArray<string> | void,\n    options: CompilerOptions | void,\n    host?: CompilerHost,\n    oldProgram?: BuilderProgram,\n    configFileParsingDiagnostics?: $ReadOnlyArray<Diagnostic>,\n    projectReferences?: $ReadOnlyArray<ProjectReference>\n  ): BuilderProgram;\n\n  declare type WatchStatusReporter = (\n    diagnostic: Diagnostic,\n    newLine: string,\n    options: CompilerOptions\n  ) => void;\n  declare type CreateProgram<T: BuilderProgram> = (\n    rootNames: $ReadOnlyArray<string> | void,\n    options: CompilerOptions | void,\n    host?: CompilerHost,\n    oldProgram?: T,\n    configFileParsingDiagnostics?: $ReadOnlyArray<Diagnostic>,\n    projectReferences?: $ReadOnlyArray<ProjectReference> | void\n  ) => T;\n  declare type WatchHost = {\n    onWatchStatusChange?: (\n      diagnostic: Diagnostic,\n      newLine: string,\n      options: CompilerOptions\n    ) => void,\n    watchFile(\n      path: string,\n      callback: FileWatcherCallback,\n      pollingInterval?: number\n    ): FileWatcher,\n    watchDirectory(\n      path: string,\n      callback: DirectoryWatcherCallback,\n      recursive?: boolean\n    ): FileWatcher,\n    setTimeout?: (\n      callback: (...args: any[]) => void,\n      ms: number,\n      ...args: any[]\n    ) => any,\n    clearTimeout?: (timeoutId: any) => void,\n    ...\n  };\n\n  declare type ProgramHost<T: BuilderProgram> = {\n    createProgram: CreateProgram<T>,\n    useCaseSensitiveFileNames(): boolean,\n    getNewLine(): string,\n    getCurrentDirectory(): string,\n    getDefaultLibFileName(options: CompilerOptions): string,\n    getDefaultLibLocation?: () => string,\n    createHash?: (data: string) => string,\n    fileExists(path: string): boolean,\n    readFile(path: string, encoding?: string): string | void,\n    directoryExists?: (path: string) => boolean,\n    getDirectories?: (path: string) => string[],\n    readDirectory?: (\n      path: string,\n      extensions?: $ReadOnlyArray<string>,\n      exclude?: $ReadOnlyArray<string>,\n      include?: $ReadOnlyArray<string>,\n      depth?: number\n    ) => string[],\n    realpath?: (path: string) => string,\n    trace?: (s: string) => void,\n    getEnvironmentVariable?: (name: string) => string | void,\n    resolveModuleNames?: (\n      moduleNames: string[],\n      containingFile: string,\n      reusedNames?: string[],\n      redirectedReference?: ResolvedProjectReference\n    ) => (ResolvedModule | void)[],\n    resolveTypeReferenceDirectives?: (\n      typeReferenceDirectiveNames: string[],\n      containingFile: string,\n      redirectedReference?: ResolvedProjectReference\n    ) => (ResolvedTypeReferenceDirective | void)[],\n    ...\n  };\n\n  declare type WatchCompilerHost<T: BuilderProgram> = {\n    ...$Exact<ProgramHost<T>>,\n    ...$Exact<WatchHost>,\n    afterProgramCreate?: (program: T) => void,\n    ...\n  };\n\n  declare type WatchCompilerHostOfFilesAndCompilerOptions<T: BuilderProgram> = {\n    ...$Exact<WatchCompilerHost<T>>,\n    rootFiles: string[],\n    options: CompilerOptions,\n    projectReferences?: $ReadOnlyArray<ProjectReference>,\n    ...\n  };\n\n  declare type WatchCompilerHostOfConfigFile<T: BuilderProgram> = {\n    ...$Exact<WatchCompilerHost<T>>,\n    ...$Exact<ConfigFileDiagnosticsReporter>,\n    configFileName: string,\n    optionsToExtend?: CompilerOptions,\n    readDirectory(\n      path: string,\n      extensions?: $ReadOnlyArray<string>,\n      exclude?: $ReadOnlyArray<string>,\n      include?: $ReadOnlyArray<string>,\n      depth?: number\n    ): string[],\n    ...\n  };\n\n  declare type Watch<T> = { getProgram(): T, ... };\n\n  declare type WatchOfConfigFile<T> = { ...$Exact<Watch<T>>, ... };\n\n  declare type WatchOfFilesAndCompilerOptions<T> = {\n    ...$Exact<Watch<T>>,\n    updateRootFileNames(fileNames: string[]): void,\n    ...\n  };\n\n  declare function createWatchCompilerHost<T: BuilderProgram>(\n    configFileName: string,\n    optionsToExtend: CompilerOptions | void,\n    system: System,\n    createProgram?: CreateProgram<T>,\n    reportDiagnostic?: DiagnosticReporter,\n    reportWatchStatus?: WatchStatusReporter\n  ): WatchCompilerHostOfConfigFile<T>;\n\n  declare function createWatchCompilerHost<T: BuilderProgram>(\n    rootFiles: string[],\n    options: CompilerOptions,\n    system: System,\n    createProgram?: CreateProgram<T>,\n    reportDiagnostic?: DiagnosticReporter,\n    reportWatchStatus?: WatchStatusReporter,\n    projectReferences?: $ReadOnlyArray<ProjectReference>\n  ): WatchCompilerHostOfFilesAndCompilerOptions<T>;\n\n  declare function createWatchProgram<T: BuilderProgram>(\n    host: WatchCompilerHostOfFilesAndCompilerOptions<T>\n  ): WatchOfFilesAndCompilerOptions<T>;\n\n  declare function createWatchProgram<T: BuilderProgram>(\n    host: WatchCompilerHostOfConfigFile<T>\n  ): WatchOfConfigFile<T>;\n\n  declare type SourceFileLike = { getLineAndCharacterOfPosition(pos: number): LineAndCharacter, ... };\n\n  declare type IScriptSnapshot = {\n    getText(start: number, end: number): string,\n    getLength(): number,\n    getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | void,\n    dispose?: () => void,\n    ...\n  };\n\n  declare function ScriptSnapshot$fromString(text: string): IScriptSnapshot;\n\n  declare type PreProcessedFileInfo = {\n    referencedFiles: FileReference[],\n    typeReferenceDirectives: FileReference[],\n    libReferenceDirectives: FileReference[],\n    importedFiles: FileReference[],\n    ambientExternalModules?: string[],\n    isLibFile: boolean,\n    ...\n  };\n\n  declare type HostCancellationToken = { isCancellationRequested(): boolean, ... };\n\n  declare type InstallPackageOptions = {\n    fileName: Path,\n    packageName: string,\n    ...\n  };\n\n  declare interface LanguageServiceHost extends GetEffectiveTypeRootsHost {\n    getCompilationSettings(): CompilerOptions,\n    +getNewLine?: () => string,\n    +getProjectVersion?: () => string,\n    getScriptFileNames(): string[],\n    +getScriptKind?: (fileName: string) => $Values<typeof ScriptKind>,\n    getScriptVersion(fileName: string): string,\n    getScriptSnapshot(fileName: string): IScriptSnapshot | void,\n    +getProjectReferences?: () => $ReadOnlyArray<ProjectReference> | void,\n    +getLocalizedDiagnosticMessages?: () => any,\n    +getCancellationToken?: () => HostCancellationToken,\n    +getCurrentDirectory: () => string,\n    getDefaultLibFileName(options: CompilerOptions): string,\n    +log?: (s: string) => void,\n    +trace?: (s: string) => void,\n    +error?: (s: string) => void,\n    +useCaseSensitiveFileNames?: () => boolean,\n    +readDirectory?: (\n      path: string,\n      extensions?: $ReadOnlyArray<string>,\n      exclude?: $ReadOnlyArray<string>,\n      include?: $ReadOnlyArray<string>,\n      depth?: number\n    ) => string[],\n    +readFile?: (path: string, encoding?: string) => string | void,\n    +realpath?: (path: string) => string,\n    +fileExists?: (path: string) => boolean,\n    +getTypeRootsVersion?: () => number,\n    +resolveModuleNames?: (\n      moduleNames: string[],\n      containingFile: string,\n      reusedNames?: string[],\n      redirectedReference?: ResolvedProjectReference\n    ) => (ResolvedModule | void)[],\n    +getResolvedModuleWithFailedLookupLocationsFromCache?: (\n      modulename: string,\n      containingFile: string\n    ) => ResolvedModuleWithFailedLookupLocations | void,\n    +resolveTypeReferenceDirectives?: (\n      typeDirectiveNames: string[],\n      containingFile: string,\n      redirectedReference?: ResolvedProjectReference\n    ) => (ResolvedTypeReferenceDirective | void)[],\n    +getDirectories?: (directoryName: string) => string[],\n    +getCustomTransformers?: () => CustomTransformers | void,\n    +isKnownTypesPackageName?: (name: string) => boolean,\n    +installPackage?: (\n      options: InstallPackageOptions\n    ) => Promise<ApplyCodeActionCommandResult>,\n    +writeFile?: (fileName: string, content: string) => void\n  }\n\n  declare type WithMetadata<T> = T & { metadata?: mixed, ... };\n  declare type LanguageService = {\n    cleanupSemanticCache(): void,\n    getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[],\n    getSemanticDiagnostics(fileName: string): Diagnostic[],\n    getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[],\n    getCompilerOptionsDiagnostics(): Diagnostic[],\n    getSyntacticClassifications(\n      fileName: string,\n      span: TextSpan\n    ): ClassifiedSpan[],\n    getSemanticClassifications(\n      fileName: string,\n      span: TextSpan\n    ): ClassifiedSpan[],\n    getEncodedSyntacticClassifications(\n      fileName: string,\n      span: TextSpan\n    ): Classifications,\n    getEncodedSemanticClassifications(\n      fileName: string,\n      span: TextSpan\n    ): Classifications,\n    getCompletionsAtPosition(\n      fileName: string,\n      position: number,\n      options: GetCompletionsAtPositionOptions | void\n    ): WithMetadata<CompletionInfo> | void,\n    getCompletionEntryDetails(\n      fileName: string,\n      position: number,\n      name: string,\n      formatOptions: FormatCodeOptions | FormatCodeSettings | void,\n      source: string | void,\n      preferences: UserPreferences | void\n    ): CompletionEntryDetails | void,\n    getCompletionEntrySymbol(\n      fileName: string,\n      position: number,\n      name: string,\n      source: string | void\n    ): Symbol | void,\n    getQuickInfoAtPosition(\n      fileName: string,\n      position: number\n    ): QuickInfo | void,\n    getNameOrDottedNameSpan(\n      fileName: string,\n      startPos: number,\n      endPos: number\n    ): TextSpan | void,\n    getBreakpointStatementAtPosition(\n      fileName: string,\n      position: number\n    ): TextSpan | void,\n    getSignatureHelpItems(\n      fileName: string,\n      position: number,\n      options: SignatureHelpItemsOptions | void\n    ): SignatureHelpItems | void,\n    getRenameInfo(\n      fileName: string,\n      position: number,\n      options?: RenameInfoOptions\n    ): RenameInfo,\n    findRenameLocations(\n      fileName: string,\n      position: number,\n      findInStrings: boolean,\n      findInComments: boolean,\n      providePrefixAndSuffixTextForRename?: boolean\n    ): $ReadOnlyArray<RenameLocation> | void,\n    getDefinitionAtPosition(\n      fileName: string,\n      position: number\n    ): $ReadOnlyArray<DefinitionInfo> | void,\n    getDefinitionAndBoundSpan(\n      fileName: string,\n      position: number\n    ): DefinitionInfoAndBoundSpan | void,\n    getTypeDefinitionAtPosition(\n      fileName: string,\n      position: number\n    ): $ReadOnlyArray<DefinitionInfo> | void,\n    getImplementationAtPosition(\n      fileName: string,\n      position: number\n    ): $ReadOnlyArray<ImplementationLocation> | void,\n    getReferencesAtPosition(\n      fileName: string,\n      position: number\n    ): ReferenceEntry[] | void,\n    findReferences(\n      fileName: string,\n      position: number\n    ): ReferencedSymbol[] | void,\n    getDocumentHighlights(\n      fileName: string,\n      position: number,\n      filesToSearch: string[]\n    ): DocumentHighlights[] | void,\n    getOccurrencesAtPosition(\n      fileName: string,\n      position: number\n    ): $ReadOnlyArray<ReferenceEntry> | void,\n    getNavigateToItems(\n      searchValue: string,\n      maxResultCount?: number,\n      fileName?: string,\n      excludeDtsFiles?: boolean\n    ): NavigateToItem[],\n    getNavigationBarItems(fileName: string): NavigationBarItem[],\n    getNavigationTree(fileName: string): NavigationTree,\n    getOutliningSpans(fileName: string): OutliningSpan[],\n    getTodoComments(\n      fileName: string,\n      descriptors: TodoCommentDescriptor[]\n    ): TodoComment[],\n    getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[],\n    getIndentationAtPosition(\n      fileName: string,\n      position: number,\n      options: EditorOptions | EditorSettings\n    ): number,\n    getFormattingEditsForRange(\n      fileName: string,\n      start: number,\n      end: number,\n      options: FormatCodeOptions | FormatCodeSettings\n    ): TextChange[],\n    getFormattingEditsForDocument(\n      fileName: string,\n      options: FormatCodeOptions | FormatCodeSettings\n    ): TextChange[],\n    getFormattingEditsAfterKeystroke(\n      fileName: string,\n      position: number,\n      key: string,\n      options: FormatCodeOptions | FormatCodeSettings\n    ): TextChange[],\n    getDocCommentTemplateAtPosition(\n      fileName: string,\n      position: number\n    ): TextInsertion | void,\n    isValidBraceCompletionAtPosition(\n      fileName: string,\n      position: number,\n      openingBrace: number\n    ): boolean,\n    getJsxClosingTagAtPosition(\n      fileName: string,\n      position: number\n    ): JsxClosingTagInfo | void,\n    getSpanOfEnclosingComment(\n      fileName: string,\n      position: number,\n      onlyMultiLine: boolean\n    ): TextSpan | void,\n    toLineColumnOffset?: (\n      fileName: string,\n      position: number\n    ) => LineAndCharacter,\n    getCodeFixesAtPosition(\n      fileName: string,\n      start: number,\n      end: number,\n      errorCodes: $ReadOnlyArray<number>,\n      formatOptions: FormatCodeSettings,\n      preferences: UserPreferences\n    ): $ReadOnlyArray<CodeFixAction>,\n    getCombinedCodeFix(\n      scope: CombinedCodeFixScope,\n      fixId: {...},\n      formatOptions: FormatCodeSettings,\n      preferences: UserPreferences\n    ): CombinedCodeActions,\n    applyCodeActionCommand(\n      action: CodeActionCommand,\n      formatSettings?: FormatCodeSettings\n    ): Promise<ApplyCodeActionCommandResult>,\n    applyCodeActionCommand(\n      action: CodeActionCommand[],\n      formatSettings?: FormatCodeSettings\n    ): Promise<ApplyCodeActionCommandResult[]>,\n    applyCodeActionCommand(\n      action: CodeActionCommand | CodeActionCommand[],\n      formatSettings?: FormatCodeSettings\n    ): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>,\n    applyCodeActionCommand(\n      fileName: string,\n      action: CodeActionCommand\n    ): Promise<ApplyCodeActionCommandResult>,\n    applyCodeActionCommand(\n      fileName: string,\n      action: CodeActionCommand[]\n    ): Promise<ApplyCodeActionCommandResult[]>,\n    applyCodeActionCommand(\n      fileName: string,\n      action: CodeActionCommand | CodeActionCommand[]\n    ): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>,\n    getApplicableRefactors(\n      fileName: string,\n      positionOrRange: number | TextRange,\n      preferences: UserPreferences | void\n    ): ApplicableRefactorInfo[],\n    getEditsForRefactor(\n      fileName: string,\n      formatOptions: FormatCodeSettings,\n      positionOrRange: number | TextRange,\n      refactorName: string,\n      actionName: string,\n      preferences: UserPreferences | void\n    ): RefactorEditInfo | void,\n    organizeImports(\n      scope: OrganizeImportsScope,\n      formatOptions: FormatCodeSettings,\n      preferences: UserPreferences | void\n    ): $ReadOnlyArray<FileTextChanges>,\n    getEditsForFileRename(\n      oldFilePath: string,\n      newFilePath: string,\n      formatOptions: FormatCodeSettings,\n      preferences: UserPreferences | void\n    ): $ReadOnlyArray<FileTextChanges>,\n    getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput,\n    getProgram(): Program | void,\n    dispose(): void,\n    ...\n  };\n\n  declare type JsxClosingTagInfo = { +newText: string, ... };\n\n  declare type CombinedCodeFixScope = {\n    type: \"file\",\n    fileName: string,\n    ...\n  };\n\n  declare type OrganizeImportsScope = CombinedCodeFixScope;\n  declare type CompletionsTriggerCharacter =\n    | \".\"\n    | '\"'\n    | \"'\"\n    | \"`\"\n    | \"/\"\n    | \"@\"\n    | \"<\";\n  declare type GetCompletionsAtPositionOptions = {\n    ...$Exact<UserPreferences>,\n    triggerCharacter?: CompletionsTriggerCharacter,\n    includeExternalModuleExports?: boolean,\n    includeInsertTextCompletions?: boolean,\n    ...\n  };\n\n  declare type SignatureHelpTriggerCharacter = \",\" | \"(\" | \"<\";\n  declare type SignatureHelpRetriggerCharacter =\n    | SignatureHelpTriggerCharacter\n    | \")\";\n  declare type SignatureHelpItemsOptions = { triggerReason?: SignatureHelpTriggerReason, ... };\n\n  declare type SignatureHelpTriggerReason =\n    | SignatureHelpInvokedReason\n    | SignatureHelpCharacterTypedReason\n    | SignatureHelpRetriggeredReason;\n  declare type SignatureHelpInvokedReason = {\n    kind: \"invoked\",\n    triggerCharacter?: void,\n    ...\n  };\n\n  declare type SignatureHelpCharacterTypedReason = {\n    kind: \"characterTyped\",\n    triggerCharacter: SignatureHelpTriggerCharacter,\n    ...\n  };\n\n  declare type SignatureHelpRetriggeredReason = {\n    kind: \"retrigger\",\n    triggerCharacter?: SignatureHelpRetriggerCharacter,\n    ...\n  };\n\n  declare type ApplyCodeActionCommandResult = { successMessage: string, ... };\n\n  declare type Classifications = {\n    spans: number[],\n    endOfLineState: $Values<typeof EndOfLineState>,\n    ...\n  };\n\n  declare type ClassifiedSpan = {\n    textSpan: TextSpan,\n    classificationType: $Values<typeof ClassificationTypeNames>,\n    ...\n  };\n\n  declare type NavigationBarItem = {\n    text: string,\n    kind: $Values<typeof ScriptElementKind>,\n    kindModifiers: string,\n    spans: TextSpan[],\n    childItems: NavigationBarItem[],\n    indent: number,\n    bolded: boolean,\n    grayed: boolean,\n    ...\n  };\n\n  declare type NavigationTree = {\n    text: string,\n    kind: $Values<typeof ScriptElementKind>,\n    kindModifiers: string,\n    spans: TextSpan[],\n    nameSpan: TextSpan | void,\n    childItems?: NavigationTree[],\n    ...\n  };\n\n  declare type TodoCommentDescriptor = {\n    text: string,\n    priority: number,\n    ...\n  };\n\n  declare type TodoComment = {\n    descriptor: TodoCommentDescriptor,\n    message: string,\n    position: number,\n    ...\n  };\n\n  declare type TextChange = {\n    span: TextSpan,\n    newText: string,\n    ...\n  };\n\n  declare type FileTextChanges = {\n    fileName: string,\n    textChanges: TextChange[],\n    isNewFile?: boolean,\n    ...\n  };\n\n  declare type CodeAction = {\n    description: string,\n    changes: FileTextChanges[],\n    commands?: CodeActionCommand[],\n    ...\n  };\n\n  declare type CodeFixAction = {\n    ...$Exact<CodeAction>,\n    fixName: string,\n    fixId?: {...},\n    fixAllDescription?: string,\n    ...\n  };\n\n  declare type CombinedCodeActions = {\n    changes: $ReadOnlyArray<FileTextChanges>,\n    commands?: $ReadOnlyArray<CodeActionCommand>,\n    ...\n  };\n\n  declare type CodeActionCommand = InstallPackageAction | GenerateTypesAction;\n  declare type InstallPackageAction = {...};\n\n  declare type GenerateTypesAction = { ...$Exact<GenerateTypesOptions>, ... };\n\n  declare type GenerateTypesOptions = {\n    +file: string,\n    +fileToGenerateTypesFor: string,\n    +outputFileName: string,\n    ...\n  };\n\n  declare type ApplicableRefactorInfo = {\n    name: string,\n    description: string,\n    inlineable?: boolean,\n    actions: RefactorActionInfo[],\n    ...\n  };\n\n  declare type RefactorActionInfo = {\n    name: string,\n    description: string,\n    ...\n  };\n\n  declare type RefactorEditInfo = {\n    edits: FileTextChanges[],\n    renameFilename?: string,\n    renameLocation?: number,\n    commands?: CodeActionCommand[],\n    ...\n  };\n\n  declare type TextInsertion = {\n    newText: string,\n    caretOffset: number,\n    ...\n  };\n\n  declare type DocumentSpan = {\n    textSpan: TextSpan,\n    fileName: string,\n    originalTextSpan?: TextSpan,\n    originalFileName?: string,\n    ...\n  };\n\n  declare type RenameLocation = {\n    ...$Exact<DocumentSpan>,\n    +prefixText?: string,\n    +suffixText?: string,\n    ...\n  };\n\n  declare type ReferenceEntry = {\n    ...$Exact<DocumentSpan>,\n    isWriteAccess: boolean,\n    isDefinition: boolean,\n    isInString?: true,\n    ...\n  };\n\n  declare type ImplementationLocation = {\n    ...$Exact<DocumentSpan>,\n    kind: $Values<typeof ScriptElementKind>,\n    displayParts: SymbolDisplayPart[],\n    ...\n  };\n\n  declare type DocumentHighlights = {\n    fileName: string,\n    highlightSpans: HighlightSpan[],\n    ...\n  };\n\n  declare var HighlightSpanKind: {\n    // \"none\"\n    +none: \"none\",\n    // \"definition\"\n    +definition: \"definition\",\n    // \"reference\"\n    +reference: \"reference\",\n    // \"writtenReference\"\n    +writtenReference: \"writtenReference\",\n    ...\n  };\n\n  declare type HighlightSpan = {\n    fileName?: string,\n    isInString?: true,\n    textSpan: TextSpan,\n    kind: $Values<typeof HighlightSpanKind>,\n    ...\n  };\n\n  declare type NavigateToItem = {\n    name: string,\n    kind: $Values<typeof ScriptElementKind>,\n    kindModifiers: string,\n    matchKind: \"exact\" | \"prefix\" | \"substring\" | \"camelCase\",\n    isCaseSensitive: boolean,\n    fileName: string,\n    textSpan: TextSpan,\n    containerName: string,\n    containerKind: $Values<typeof ScriptElementKind>,\n    ...\n  };\n\n  declare var IndentStyle: {\n    // 0\n    +None: 0,\n    // 1\n    +Block: 1,\n    // 2\n    +Smart: 2,\n    ...\n  };\n\n  declare type EditorOptions = {\n    BaseIndentSize?: number,\n    IndentSize: number,\n    TabSize: number,\n    NewLineCharacter: string,\n    ConvertTabsToSpaces: boolean,\n    IndentStyle: $Values<typeof IndentStyle>,\n    ...\n  };\n\n  declare type EditorSettings = {\n    baseIndentSize?: number,\n    indentSize?: number,\n    tabSize?: number,\n    newLineCharacter?: string,\n    convertTabsToSpaces?: boolean,\n    indentStyle?: $Values<typeof IndentStyle>,\n    ...\n  };\n\n  declare type FormatCodeOptions = {\n    ...$Exact<EditorOptions>,\n    InsertSpaceAfterCommaDelimiter: boolean,\n    InsertSpaceAfterSemicolonInForStatements: boolean,\n    InsertSpaceBeforeAndAfterBinaryOperators: boolean,\n    InsertSpaceAfterConstructor?: boolean,\n    InsertSpaceAfterKeywordsInControlFlowStatements: boolean,\n    InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean,\n    InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean,\n    InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean,\n    InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean,\n    InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean,\n    InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean,\n    InsertSpaceAfterTypeAssertion?: boolean,\n    InsertSpaceBeforeFunctionParenthesis?: boolean,\n    PlaceOpenBraceOnNewLineForFunctions: boolean,\n    PlaceOpenBraceOnNewLineForControlBlocks: boolean,\n    insertSpaceBeforeTypeAnnotation?: boolean,\n    ...\n  };\n\n  declare type FormatCodeSettings = {\n    ...$Exact<EditorSettings>,\n    +insertSpaceAfterCommaDelimiter?: boolean,\n    +insertSpaceAfterSemicolonInForStatements?: boolean,\n    +insertSpaceBeforeAndAfterBinaryOperators?: boolean,\n    +insertSpaceAfterConstructor?: boolean,\n    +insertSpaceAfterKeywordsInControlFlowStatements?: boolean,\n    +insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean,\n    +insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean,\n    +insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean,\n    +insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean,\n    +insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean,\n    +insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean,\n    +insertSpaceAfterTypeAssertion?: boolean,\n    +insertSpaceBeforeFunctionParenthesis?: boolean,\n    +placeOpenBraceOnNewLineForFunctions?: boolean,\n    +placeOpenBraceOnNewLineForControlBlocks?: boolean,\n    +insertSpaceBeforeTypeAnnotation?: boolean,\n    +indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean,\n    ...\n  };\n\n  declare function getDefaultFormatCodeSettings(\n    newLineCharacter?: string\n  ): FormatCodeSettings;\n\n  declare type DefinitionInfo = {\n    ...$Exact<DocumentSpan>,\n    kind: $Values<typeof ScriptElementKind>,\n    name: string,\n    containerKind: $Values<typeof ScriptElementKind>,\n    containerName: string,\n    ...\n  };\n\n  declare type DefinitionInfoAndBoundSpan = {\n    definitions?: $ReadOnlyArray<DefinitionInfo>,\n    textSpan: TextSpan,\n    ...\n  };\n\n  declare type ReferencedSymbolDefinitionInfo = {\n    ...$Exact<DefinitionInfo>,\n    displayParts: SymbolDisplayPart[],\n    ...\n  };\n\n  declare type ReferencedSymbol = {\n    definition: ReferencedSymbolDefinitionInfo,\n    references: ReferenceEntry[],\n    ...\n  };\n\n  declare var SymbolDisplayPartKind: {\n    // 0\n    +aliasName: 0,\n    // 1\n    +className: 1,\n    // 2\n    +enumName: 2,\n    // 3\n    +fieldName: 3,\n    // 4\n    +interfaceName: 4,\n    // 5\n    +keyword: 5,\n    // 6\n    +lineBreak: 6,\n    // 7\n    +numericLiteral: 7,\n    // 8\n    +stringLiteral: 8,\n    // 9\n    +localName: 9,\n    // 10\n    +methodName: 10,\n    // 11\n    +moduleName: 11,\n    // 12\n    +operator: 12,\n    // 13\n    +parameterName: 13,\n    // 14\n    +propertyName: 14,\n    // 15\n    +punctuation: 15,\n    // 16\n    +space: 16,\n    // 17\n    +text: 17,\n    // 18\n    +typeParameterName: 18,\n    // 19\n    +enumMemberName: 19,\n    // 20\n    +functionName: 20,\n    // 21\n    +regularExpressionLiteral: 21,\n    ...\n  };\n\n  declare type SymbolDisplayPart = {\n    text: string,\n    kind: string,\n    ...\n  };\n\n  declare type JSDocTagInfo = {\n    name: string,\n    text?: string,\n    ...\n  };\n\n  declare type QuickInfo = {\n    kind: $Values<typeof ScriptElementKind>,\n    kindModifiers: string,\n    textSpan: TextSpan,\n    displayParts?: SymbolDisplayPart[],\n    documentation?: SymbolDisplayPart[],\n    tags?: JSDocTagInfo[],\n    ...\n  };\n\n  declare type RenameInfo = RenameInfoSuccess | RenameInfoFailure;\n  declare type RenameInfoSuccess = {\n    canRename: true,\n    fileToRename?: string,\n    displayName: string,\n    fullDisplayName: string,\n    kind: $Values<typeof ScriptElementKind>,\n    kindModifiers: string,\n    triggerSpan: TextSpan,\n    ...\n  };\n\n  declare type RenameInfoFailure = {\n    canRename: false,\n    localizedErrorMessage: string,\n    ...\n  };\n\n  declare type RenameInfoOptions = { +allowRenameOfImportPath?: boolean, ... };\n\n  declare type SignatureHelpParameter = {\n    name: string,\n    documentation: SymbolDisplayPart[],\n    displayParts: SymbolDisplayPart[],\n    isOptional: boolean,\n    ...\n  };\n\n  declare type SignatureHelpItem = {\n    isVariadic: boolean,\n    prefixDisplayParts: SymbolDisplayPart[],\n    suffixDisplayParts: SymbolDisplayPart[],\n    separatorDisplayParts: SymbolDisplayPart[],\n    parameters: SignatureHelpParameter[],\n    documentation: SymbolDisplayPart[],\n    tags: JSDocTagInfo[],\n    ...\n  };\n\n  declare type SignatureHelpItems = {\n    items: SignatureHelpItem[],\n    applicableSpan: TextSpan,\n    selectedItemIndex: number,\n    argumentIndex: number,\n    argumentCount: number,\n    ...\n  };\n\n  declare type CompletionInfo = {\n    isGlobalCompletion: boolean,\n    isMemberCompletion: boolean,\n    isNewIdentifierLocation: boolean,\n    entries: CompletionEntry[],\n    ...\n  };\n\n  declare type CompletionEntry = {\n    name: string,\n    kind: $Values<typeof ScriptElementKind>,\n    kindModifiers?: string,\n    sortText: string,\n    insertText?: string,\n    replacementSpan?: TextSpan,\n    hasAction?: true,\n    source?: string,\n    isRecommended?: true,\n    ...\n  };\n\n  declare type CompletionEntryDetails = {\n    name: string,\n    kind: $Values<typeof ScriptElementKind>,\n    kindModifiers: string,\n    displayParts: SymbolDisplayPart[],\n    documentation?: SymbolDisplayPart[],\n    tags?: JSDocTagInfo[],\n    codeActions?: CodeAction[],\n    source?: SymbolDisplayPart[],\n    ...\n  };\n\n  declare type OutliningSpan = {\n    textSpan: TextSpan,\n    hintSpan: TextSpan,\n    bannerText: string,\n    autoCollapse: boolean,\n    kind: $Values<typeof OutliningSpanKind>,\n    ...\n  };\n\n  declare var OutliningSpanKind: {\n    // \"comment\"\n    +Comment: \"comment\",\n    // \"region\"\n    +Region: \"region\",\n    // \"code\"\n    +Code: \"code\",\n    // \"imports\"\n    +Imports: \"imports\",\n    ...\n  };\n\n  declare var OutputFileType: {\n    // 0\n    +JavaScript: 0,\n    // 1\n    +SourceMap: 1,\n    // 2\n    +Declaration: 2,\n    ...\n  };\n\n  declare var EndOfLineState: {\n    // 0\n    +None: 0,\n    // 1\n    +InMultiLineCommentTrivia: 1,\n    // 2\n    +InSingleQuoteStringLiteral: 2,\n    // 3\n    +InDoubleQuoteStringLiteral: 3,\n    // 4\n    +InTemplateHeadOrNoSubstitutionTemplate: 4,\n    // 5\n    +InTemplateMiddleOrTail: 5,\n    // 6\n    +InTemplateSubstitutionPosition: 6,\n    ...\n  };\n\n  declare var TokenClass: {\n    // 0\n    +Punctuation: 0,\n    // 1\n    +Keyword: 1,\n    // 2\n    +Operator: 2,\n    // 3\n    +Comment: 3,\n    // 4\n    +Whitespace: 4,\n    // 5\n    +Identifier: 5,\n    // 6\n    +NumberLiteral: 6,\n    // 7\n    +BigIntLiteral: 7,\n    // 8\n    +StringLiteral: 8,\n    // 9\n    +RegExpLiteral: 9,\n    ...\n  };\n\n  declare type ClassificationResult = {\n    finalLexState: $Values<typeof EndOfLineState>,\n    entries: ClassificationInfo[],\n    ...\n  };\n\n  declare type ClassificationInfo = {\n    length: number,\n    classification: $Values<typeof TokenClass>,\n    ...\n  };\n\n  declare type Classifier = {\n    getClassificationsForLine(\n      text: string,\n      lexState: $Values<typeof EndOfLineState>,\n      syntacticClassifierAbsent: boolean\n    ): ClassificationResult,\n    getEncodedLexicalClassifications(\n      text: string,\n      endOfLineState: $Values<typeof EndOfLineState>,\n      syntacticClassifierAbsent: boolean\n    ): Classifications,\n    ...\n  };\n\n  declare var ScriptElementKind: {\n    // \"\"\n    +unknown: \"\",\n    // \"warning\"\n    +warning: \"warning\",\n    // \"keyword\"\n    +keyword: \"keyword\",\n    // \"script\"\n    +scriptElement: \"script\",\n    // \"module\"\n    +moduleElement: \"module\",\n    // \"class\"\n    +classElement: \"class\",\n    // \"local class\"\n    +localClassElement: \"local class\",\n    // \"interface\"\n    +interfaceElement: \"interface\",\n    // \"type\"\n    +typeElement: \"type\",\n    // \"enum\"\n    +enumElement: \"enum\",\n    // \"enum member\"\n    +enumMemberElement: \"enum member\",\n    // \"var\"\n    +variableElement: \"var\",\n    // \"local var\"\n    +localVariableElement: \"local var\",\n    // \"function\"\n    +functionElement: \"function\",\n    // \"local function\"\n    +localFunctionElement: \"local function\",\n    // \"method\"\n    +memberFunctionElement: \"method\",\n    // \"getter\"\n    +memberGetAccessorElement: \"getter\",\n    // \"setter\"\n    +memberSetAccessorElement: \"setter\",\n    // \"property\"\n    +memberVariableElement: \"property\",\n    // \"constructor\"\n    +constructorImplementationElement: \"constructor\",\n    // \"call\"\n    +callSignatureElement: \"call\",\n    // \"index\"\n    +indexSignatureElement: \"index\",\n    // \"construct\"\n    +constructSignatureElement: \"construct\",\n    // \"parameter\"\n    +parameterElement: \"parameter\",\n    // \"type parameter\"\n    +typeParameterElement: \"type parameter\",\n    // \"primitive type\"\n    +primitiveType: \"primitive type\",\n    // \"label\"\n    +label: \"label\",\n    // \"alias\"\n    +alias: \"alias\",\n    // \"const\"\n    +constElement: \"const\",\n    // \"let\"\n    +letElement: \"let\",\n    // \"directory\"\n    +directory: \"directory\",\n    // \"external module name\"\n    +externalModuleName: \"external module name\",\n    // \"JSX attribute\"\n    +jsxAttribute: \"JSX attribute\",\n    // \"string\"\n    +string: \"string\",\n    ...\n  };\n\n  declare var ScriptElementKindModifier: {\n    // \"\"\n    +none: \"\",\n    // \"public\"\n    +publicMemberModifier: \"public\",\n    // \"private\"\n    +privateMemberModifier: \"private\",\n    // \"protected\"\n    +protectedMemberModifier: \"protected\",\n    // \"export\"\n    +exportedModifier: \"export\",\n    // \"declare\"\n    +ambientModifier: \"declare\",\n    // \"static\"\n    +staticModifier: \"static\",\n    // \"abstract\"\n    +abstractModifier: \"abstract\",\n    // \"optional\"\n    +optionalModifier: \"optional\",\n    // \".d.ts\"\n    +dtsModifier: \".d.ts\",\n    // \".ts\"\n    +tsModifier: \".ts\",\n    // \".tsx\"\n    +tsxModifier: \".tsx\",\n    // \".js\"\n    +jsModifier: \".js\",\n    // \".jsx\"\n    +jsxModifier: \".jsx\",\n    // \".json\"\n    +jsonModifier: \".json\",\n    ...\n  };\n\n  declare var ClassificationTypeNames: {\n    // \"comment\"\n    +comment: \"comment\",\n    // \"identifier\"\n    +identifier: \"identifier\",\n    // \"keyword\"\n    +keyword: \"keyword\",\n    // \"number\"\n    +numericLiteral: \"number\",\n    // \"bigint\"\n    +bigintLiteral: \"bigint\",\n    // \"operator\"\n    +operator: \"operator\",\n    // \"string\"\n    +stringLiteral: \"string\",\n    // \"whitespace\"\n    +whiteSpace: \"whitespace\",\n    // \"text\"\n    +text: \"text\",\n    // \"punctuation\"\n    +punctuation: \"punctuation\",\n    // \"class name\"\n    +className: \"class name\",\n    // \"enum name\"\n    +enumName: \"enum name\",\n    // \"interface name\"\n    +interfaceName: \"interface name\",\n    // \"module name\"\n    +moduleName: \"module name\",\n    // \"type parameter name\"\n    +typeParameterName: \"type parameter name\",\n    // \"type alias name\"\n    +typeAliasName: \"type alias name\",\n    // \"parameter name\"\n    +parameterName: \"parameter name\",\n    // \"doc comment tag name\"\n    +docCommentTagName: \"doc comment tag name\",\n    // \"jsx open tag name\"\n    +jsxOpenTagName: \"jsx open tag name\",\n    // \"jsx close tag name\"\n    +jsxCloseTagName: \"jsx close tag name\",\n    // \"jsx self closing tag name\"\n    +jsxSelfClosingTagName: \"jsx self closing tag name\",\n    // \"jsx attribute\"\n    +jsxAttribute: \"jsx attribute\",\n    // \"jsx text\"\n    +jsxText: \"jsx text\",\n    // \"jsx attribute string literal value\"\n    +jsxAttributeStringLiteralValue: \"jsx attribute string literal value\",\n    ...\n  };\n\n  declare var ClassificationType: {\n    // 1\n    +comment: 1,\n    // 2\n    +identifier: 2,\n    // 3\n    +keyword: 3,\n    // 4\n    +numericLiteral: 4,\n    // 5\n    +operator: 5,\n    // 6\n    +stringLiteral: 6,\n    // 7\n    +regularExpressionLiteral: 7,\n    // 8\n    +whiteSpace: 8,\n    // 9\n    +text: 9,\n    // 10\n    +punctuation: 10,\n    // 11\n    +className: 11,\n    // 12\n    +enumName: 12,\n    // 13\n    +interfaceName: 13,\n    // 14\n    +moduleName: 14,\n    // 15\n    +typeParameterName: 15,\n    // 16\n    +typeAliasName: 16,\n    // 17\n    +parameterName: 17,\n    // 18\n    +docCommentTagName: 18,\n    // 19\n    +jsxOpenTagName: 19,\n    // 20\n    +jsxCloseTagName: 20,\n    // 21\n    +jsxSelfClosingTagName: 21,\n    // 22\n    +jsxAttribute: 22,\n    // 23\n    +jsxText: 23,\n    // 24\n    +jsxAttributeStringLiteralValue: 24,\n    // 25\n    +bigintLiteral: 25,\n    ...\n  };\n\n  declare function createClassifier(): Classifier;\n\n  declare type DocumentRegistry = {\n    acquireDocument(\n      fileName: string,\n      compilationSettings: CompilerOptions,\n      scriptSnapshot: IScriptSnapshot,\n      version: string,\n      scriptKind?: $Values<typeof ScriptKind>\n    ): SourceFile,\n    acquireDocumentWithKey(\n      fileName: string,\n      path: Path,\n      compilationSettings: CompilerOptions,\n      key: DocumentRegistryBucketKey,\n      scriptSnapshot: IScriptSnapshot,\n      version: string,\n      scriptKind?: $Values<typeof ScriptKind>\n    ): SourceFile,\n    updateDocument(\n      fileName: string,\n      compilationSettings: CompilerOptions,\n      scriptSnapshot: IScriptSnapshot,\n      version: string,\n      scriptKind?: $Values<typeof ScriptKind>\n    ): SourceFile,\n    updateDocumentWithKey(\n      fileName: string,\n      path: Path,\n      compilationSettings: CompilerOptions,\n      key: DocumentRegistryBucketKey,\n      scriptSnapshot: IScriptSnapshot,\n      version: string,\n      scriptKind?: $Values<typeof ScriptKind>\n    ): SourceFile,\n    getKeyForCompilationSettings(\n      settings: CompilerOptions\n    ): DocumentRegistryBucketKey,\n    releaseDocument(\n      fileName: string,\n      compilationSettings: CompilerOptions\n    ): void,\n    releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void,\n    reportStats(): string,\n    ...\n  };\n\n  declare type DocumentRegistryBucketKey = string & { __bucketKey: any, ... };\n  declare function createDocumentRegistry(\n    useCaseSensitiveFileNames?: boolean,\n    currentDirectory?: string\n  ): DocumentRegistry;\n\n  declare function preProcessFile(\n    sourceText: string,\n    readImportFiles?: boolean,\n    detectJavaScriptImports?: boolean\n  ): PreProcessedFileInfo;\n\n  declare type TranspileOptions = {\n    compilerOptions?: CompilerOptions,\n    fileName?: string,\n    reportDiagnostics?: boolean,\n    moduleName?: string,\n    renamedDependencies?: MapLike<string>,\n    transformers?: CustomTransformers,\n    ...\n  };\n\n  declare type TranspileOutput = {\n    outputText: string,\n    diagnostics?: Diagnostic[],\n    sourceMapText?: string,\n    ...\n  };\n\n  declare function transpileModule(\n    input: string,\n    transpileOptions: TranspileOptions\n  ): TranspileOutput;\n\n  declare function transpile(\n    input: string,\n    compilerOptions?: CompilerOptions,\n    fileName?: string,\n    diagnostics?: Diagnostic[],\n    moduleName?: string\n  ): string;\n\n  declare function generateTypesForModule(\n    name: string,\n    moduleValue: mixed,\n    formatSettings: FormatCodeSettings\n  ): string;\n\n  declare function generateTypesForGlobal(\n    name: string,\n    globalValue: mixed,\n    formatSettings: FormatCodeSettings\n  ): string;\n\n  declare var servicesVersion: any; // \"0.8\";\n  declare function toEditorSettings(\n    options: EditorOptions | EditorSettings\n  ): EditorSettings;\n\n  declare function displayPartsToString(\n    displayParts: SymbolDisplayPart[] | void\n  ): string;\n\n  declare function getDefaultCompilerOptions(): CompilerOptions;\n\n  declare function getSupportedCodeFixes(): string[];\n\n  declare function createLanguageServiceSourceFile(\n    fileName: string,\n    scriptSnapshot: IScriptSnapshot,\n    scriptTarget: $Values<typeof ScriptTarget>,\n    version: string,\n    setNodeParents: boolean,\n    scriptKind?: $Values<typeof ScriptKind>\n  ): SourceFile;\n\n  declare var disableIncrementalParsing: boolean;\n  declare function updateLanguageServiceSourceFile(\n    sourceFile: SourceFile,\n    scriptSnapshot: IScriptSnapshot,\n    version: string,\n    textChangeRange: TextChangeRange | void,\n    aggressiveChecks?: boolean\n  ): SourceFile;\n\n  declare function createLanguageService(\n    host: LanguageServiceHost,\n    documentRegistry?: DocumentRegistry,\n    syntaxOnly?: boolean\n  ): LanguageService;\n\n  declare function getDefaultLibFilePath(options: CompilerOptions): string;\n\n  declare function transform<T: Node>(\n    source: T | T[],\n    transformers: TransformerFactory<T>[],\n    compilerOptions?: CompilerOptions\n  ): TransformationResult<T>;\n  declare type ActionSet = \"action::set\";\n  declare type ActionInvalidate = \"action::invalidate\";\n  declare type ActionPackageInstalled = \"action::packageInstalled\";\n  declare type ActionValueInspected = \"action::valueInspected\";\n  declare type EventTypesRegistry = \"event::typesRegistry\";\n  declare type EventBeginInstallTypes = \"event::beginInstallTypes\";\n  declare type EventEndInstallTypes = \"event::endInstallTypes\";\n  declare type EventInitializationFailed = \"event::initializationFailed\";\n  declare type TypingInstallerResponse = { +kind:\n    | ActionSet\n    | ActionInvalidate\n    | EventTypesRegistry\n    | ActionPackageInstalled\n    | ActionValueInspected\n    | EventBeginInstallTypes\n    | EventEndInstallTypes\n    | EventInitializationFailed, ... };\n\n  declare type TypingInstallerRequestWithProjectName = { +projectName: string, ... };\n\n  declare type DiscoverTypings = {\n    ...$Exact<TypingInstallerRequestWithProjectName>,\n    +fileNames: string[],\n    +projectRootPath: Path,\n    +compilerOptions: CompilerOptions,\n    +typeAcquisition: TypeAcquisition,\n    +unresolvedImports: SortedReadonlyArray<string>,\n    +cachePath?: string,\n    +kind: \"discover\",\n    ...\n  };\n\n  declare type CloseProject = {\n    ...$Exact<TypingInstallerRequestWithProjectName>,\n    +kind: \"closeProject\",\n    ...\n  };\n\n  declare type TypesRegistryRequest = { +kind: \"typesRegistry\", ... };\n\n  declare type InstallPackageRequest = {\n    ...$Exact<TypingInstallerRequestWithProjectName>,\n    +kind: \"installPackage\",\n    +fileName: Path,\n    +packageName: string,\n    +projectRootPath: Path,\n    ...\n  };\n\n  declare type PackageInstalledResponse = {\n    ...$Exact<ProjectResponse>,\n    +kind: ActionPackageInstalled,\n    +success: boolean,\n    +message: string,\n    ...\n  };\n\n  declare type InitializationFailedResponse = {\n    ...$Exact<TypingInstallerResponse>,\n    +kind: EventInitializationFailed,\n    +message: string,\n    ...\n  };\n\n  declare type ProjectResponse = {\n    ...$Exact<TypingInstallerResponse>,\n    +projectName: string,\n    ...\n  };\n\n  declare type InvalidateCachedTypings = {\n    ...$Exact<ProjectResponse>,\n    +kind: ActionInvalidate,\n    ...\n  };\n\n  declare type InstallTypes = {\n    ...$Exact<ProjectResponse>,\n    +kind: EventBeginInstallTypes | EventEndInstallTypes,\n    +eventId: number,\n    +typingsInstallerVersion: string,\n    +packagesToInstall: $ReadOnlyArray<string>,\n    ...\n  };\n\n  declare type BeginInstallTypes = {\n    ...$Exact<InstallTypes>,\n    +kind: EventBeginInstallTypes,\n    ...\n  };\n\n  declare type EndInstallTypes = {\n    ...$Exact<InstallTypes>,\n    +kind: EventEndInstallTypes,\n    +installSuccess: boolean,\n    ...\n  };\n\n  declare type SetTypings = {\n    ...$Exact<ProjectResponse>,\n    +typeAcquisition: TypeAcquisition,\n    +compilerOptions: CompilerOptions,\n    +typings: string[],\n    +unresolvedImports: SortedReadonlyArray<string>,\n    +kind: ActionSet,\n    ...\n  };\n}\n"
  },
  {
    "path": "gulpfile.js",
    "content": "const {Transform} = require('stream');\nconst babel = require('gulp-babel');\nconst gulp = require('gulp');\nconst path = require('path');\nconst {rimraf} = require('rimraf');\nconst swc = require('@swc/core');\nconst babelConfig = require('./babel.config.json');\n\nconst IGNORED_PACKAGES = [\n  '!packages/examples/**',\n  '!packages/core/integration-tests/**',\n  '!packages/core/workers/test/integration/**',\n  '!packages/core/test-utils/**',\n  '!packages/core/types/**',\n  '!packages/core/types-internal/**',\n\n  // These packages are bundled.\n  '!packages/core/codeframe/**',\n  '!packages/core/fs/**',\n  '!packages/core/package-manager/**',\n  '!packages/core/utils/**',\n  '!packages/reporters/cli/**',\n  '!packages/reporters/dev-server/**',\n  '!packages/utils/error-overlay/**',\n];\n\nconst paths = {\n  packageSrc: [\n    'packages/*/*/src/**/*.js',\n    '!**/dev-prelude.js',\n    ...IGNORED_PACKAGES,\n  ],\n  packageOther: ['packages/*/*/src/**/dev-prelude.js'],\n  packageJson: [\n    'packages/core/parcel/package.json',\n    'packages/utils/create-react-app/package.json',\n    'packages/utils/create-parcel/package.json',\n    'packages/dev/query/package.json',\n    'packages/dev/bundle-stats-cli/package.json',\n  ],\n  packages: 'packages/',\n};\n\n/*\n * \"Taps\" into the contents of a flowing stream, yielding chunks to the passed\n * callback. Continues to pass data chunks down the stream.\n */\nclass TapStream extends Transform {\n  constructor(tap, options) {\n    super({...options, objectMode: true});\n    this._tap = tap;\n  }\n\n  _transform(chunk, encoding, callback) {\n    try {\n      this._tap(chunk);\n      callback(null, chunk);\n    } catch (err) {\n      callback(err);\n    }\n  }\n}\n\nexports.clean = function clean(cb) {\n  rimraf('packages/*/*/lib/**').then(\n    () => cb(),\n    err => cb(err),\n  );\n};\n\nexports.default = exports.build = gulp.series(\n  gulp.parallel(buildBabel, buildRSC, copyOthers),\n  // Babel reads from package.json so update these after babel has run\n  paths.packageJson.map(\n    packageJsonPath =>\n      function updatePackageJson() {\n        return _updatePackageJson(packageJsonPath);\n      },\n  ),\n);\n\nfunction buildBabel() {\n  return gulp\n    .src(paths.packageSrc)\n    .pipe(babel({...babelConfig, babelrcRoots: [__dirname + '/packages/*/*']}))\n    .pipe(renameStream(relative => relative.replace('src', 'lib')))\n    .pipe(gulp.dest(paths.packages));\n}\n\nfunction copyOthers() {\n  return gulp\n    .src(paths.packageOther)\n    .pipe(renameStream(relative => relative.replace('src', 'lib')))\n    .pipe(gulp.dest(paths.packages));\n}\n\nfunction buildRSC() {\n  return gulp\n    .src('packages/utils/rsc/src/*.tsx')\n    .pipe(\n      new TapStream(vinyl => {\n        let result = swc.transformSync(vinyl.contents.toString(), {\n          filename: vinyl.path,\n          jsc: {\n            parser: {\n              syntax: 'typescript',\n              tsx: true,\n            },\n            target: 'esnext',\n            experimental: {\n              emitIsolatedDts: true,\n            },\n          },\n        });\n\n        let output = JSON.parse(result.output);\n        vinyl.contents = Buffer.from(output.__swc_isolated_declarations__);\n      }),\n    )\n    .pipe(renameStream(relative => relative.replace('.tsx', '.d.ts')))\n    .pipe(gulp.dest('packages/utils/rsc/lib'));\n}\n\nfunction _updatePackageJson(file) {\n  return gulp\n    .src(file)\n    .pipe(\n      new TapStream(vinyl => {\n        let json = JSON.parse(vinyl.contents);\n        // Replace all references to `src` in package.json bin entries\n        // `lib` equivalents.\n        if (typeof json.bin === 'object' && json.bin != null) {\n          for (let [binName, binPath] of Object.entries(json.bin)) {\n            json.bin[binName] = binPath.replace('src', 'lib');\n          }\n        } else if (typeof json.bin === 'string') {\n          json.bin = json.bin.replace('src', 'lib');\n        }\n\n        vinyl.contents = Buffer.from(JSON.stringify(json, null, 2));\n      }),\n    )\n    .pipe(gulp.dest(path.dirname(file)));\n}\n\nfunction renameStream(fn) {\n  return new TapStream(vinyl => {\n    let relative = path.relative(vinyl.base, vinyl.path);\n    vinyl.path = path.join(vinyl.base, fn(relative));\n  });\n}\n"
  },
  {
    "path": "lerna.json",
    "content": "{\n  \"packages\": [\"packages/*/*\"],\n  \"version\": \"independent\"\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"@parcel/monorepo\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"private\": true,\n  \"workspaces\": [\n    \"packages/*/*\"\n  ],\n  \"scripts\": {\n    \"build\": \"yarn build-bundles && cross-env NODE_ENV=production PARCEL_BUILD_ENV=production gulp\",\n    \"build-bundles\": \"rimraf --glob 'packages/*/*/lib' && cross-env NODE_ENV=production PARCEL_BUILD_ENV=production PARCEL_SELF_BUILD=true ./node_modules/.bin/parcel build --no-cache 'packages/core/{fs,codeframe,package-manager,utils}' 'packages/reporters/{cli,dev-server}' 'packages/utils/{parcel-lsp,parcel-lsp-protocol,parcel-watcher-watchman-js,error-overlay}'\",\n    \"build-ts\": \"lerna run build-ts && lerna run check-ts\",\n    \"build-native\": \"node scripts/build-native.js\",\n    \"build-native-release\": \"node scripts/build-native.js --release\",\n    \"build-native-canary\": \"node scripts/build-native.js --canary\",\n    \"build-native-wasm\": \"node scripts/build-native.js --release --wasm\",\n    \"build-repl\": \"yarn build-native-release && yarn build-native-wasm && yarn workspace @parcel/repl build\",\n    \"clean-test\": \"rimraf packages/core/integration-tests/.parcel-cache && rimraf packages/core/integration-tests/dist\",\n    \"clean\": \"yarn clean-test && lerna clean --yes && lerna exec -- rimraf ./lib && yarn\",\n    \"format\": \"prettier --write \\\"./packages/*/*/{src,bin,test}/**/*.{js,json,md}\\\" && cargo +nightly fmt --all\",\n    \"link-all\": \"node scripts/link-all.js packages\",\n    \"unlink-all\": \"node scripts/unlink-all.js packages\",\n    \"check\": \"flow check\",\n    \"lint\": \"eslint . && prettier \\\"./packages/*/*/{src,bin,test}/**/*.{js,json,md}\\\" --list-different && cargo fmt --all -- --check\",\n    \"prepublishOnly\": \"yarn adjust-versions && yarn build && yarn build-ts\",\n    \"test:unit\": \"cross-env NODE_ENV=test mocha --timeout 5000 && cargo test --workspace --exclude parcel-node-bindings\",\n    \"test:integration\": \"yarn workspace @parcel/integration-tests test\",\n    \"test:integration-ci\": \"yarn workspace @parcel/integration-tests test-ci\",\n    \"test\": \"yarn test:unit && yarn test:integration\",\n    \"dev:release\": \"SKIP_PLUGIN_COMPATIBILITY_CHECK=true lerna publish -y --canary --preid dev --dist-tag=dev --exact --force-publish='*' --no-git-tag-version --no-push\",\n    \"canary:release\": \"SKIP_PLUGIN_COMPATIBILITY_CHECK=true lerna publish -y --canary --preid canary --dist-tag=canary --exact --force-publish='*' --no-git-tag-version --no-push\",\n    \"tag:prerelease\": \"lerna version --exact --force-publish='*' --no-git-tag-version --no-push && yarn adjust-versions --exact\",\n    \"tag:release\": \"lerna version --exact --force-publish='*' --no-git-tag-version --no-push && yarn adjust-versions\",\n    \"adjust-versions\": \"node scripts/update-config-dependencies.js && node scripts/update-engines-peerdeps.js\",\n    \"release\": \"lerna publish -y from-package --pre-dist-tag=next --no-git-tag-version --no-push\",\n    \"prepare\": \"husky install\",\n    \"postinstall\": \"patch-package\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@khanacademy/flow-to-ts\": \"^0.5.2\",\n    \"@napi-rs/cli\": \"^2.18.3\",\n    \"@parcel/babel-register\": \"*\",\n    \"@swc/core\": \"^1.11.24\",\n    \"@types/node\": \"^22.15.17\",\n    \"buffer\": \"mischnic/buffer#b8a4fa94\",\n    \"cross-env\": \"^7.0.3\",\n    \"eslint\": \"^8.57.1\",\n    \"fast-glob\": \"^3.3.3\",\n    \"flow-bin\": \"0.184.0\",\n    \"gulp\": \"^4.0.2\",\n    \"gulp-babel\": \"^8.0.0\",\n    \"husky\": \"^6.0.0\",\n    \"lerna\": \"^6.6.2\",\n    \"lint-staged\": \"^10.5.4\",\n    \"mocha\": \"^8.4.0\",\n    \"mocha-junit-reporter\": \"^2.2.1\",\n    \"mocha-multi-reporters\": \"^1.5.1\",\n    \"prettier\": \"2.4.1\",\n    \"punycode\": \"^2.3.1\",\n    \"rimraf\": \"^5.0.10\",\n    \"semver\": \"^7.7.1\",\n    \"sinon\": \"^7.5.0\"\n  },\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"lint-staged\": {\n    \"*.{js,json,md,ts}\": \"prettier --write\",\n    \"*.rs\": \"rustfmt\"\n  },\n  \"collective\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"packageManager\": \"yarn@4.9.1\",\n  \"browser\": {\n    \"react\": \"preact/compat\",\n    \"react-dom\": \"preact/compat\",\n    \"scheduler\": false\n  },\n  \"dependencies\": {\n    \"patch-package\": \"^8.0.0\"\n  },\n  \"_\": \"See issue #9405 for the Vue problem\",\n  \"__\": \"The watcher complains about non-existing dirs in the integration tests on >=2.3.0\",\n  \"resolutions\": {\n    \"@parcel/watcher\": \"~2.2.0\",\n    \"@vue/compiler-sfc\": \"~3.2.47\",\n    \"vue\": \"~3.2.47\"\n  }\n}\n"
  },
  {
    "path": "packages/bundlers/default/package.json",
    "content": "{\n  \"name\": \"@parcel/bundler-default\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/DefaultBundler.js\",\n  \"source\": \"src/DefaultBundler.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/graph\": \"3.6.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/bundlers/default/src/DefaultBundler.js",
    "content": "// @flow strict-local\nimport type {\n  Asset,\n  Bundle as LegacyBundle,\n  BundleBehavior,\n  BundleGroup,\n  Dependency,\n  Environment,\n  Config,\n  MutableBundleGraph,\n  PluginOptions,\n  Target,\n  BuildMode,\n  PluginLogger,\n} from '@parcel/types';\nimport type {NodeId} from '@parcel/graph';\nimport type {SchemaEntity} from '@parcel/utils';\nimport {ContentGraph, Graph, BitSet, ALL_EDGE_TYPES} from '@parcel/graph';\n\nimport invariant from 'assert';\nimport {Bundler} from '@parcel/plugin';\nimport {validateSchema, DefaultMap, globToRegex} from '@parcel/utils';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport {encodeJSONKeyComponent} from '@parcel/diagnostic';\n\ntype Glob = string;\n\ntype ManualSharedBundles = Array<{|\n  name: string,\n  assets: Array<Glob>,\n  types?: Array<string>,\n  root?: string,\n  split?: number,\n|}>;\n\ntype BaseBundlerConfig = {|\n  http?: number,\n  minBundles?: number,\n  minBundleSize?: number,\n  maxParallelRequests?: number,\n  disableSharedBundles?: boolean,\n  manualSharedBundles?: ManualSharedBundles,\n|};\n\ntype BundlerConfig = {|\n  [mode: BuildMode]: BaseBundlerConfig,\n|} & BaseBundlerConfig;\n\ntype ResolvedBundlerConfig = {|\n  minBundles: number,\n  minBundleSize: number,\n  maxParallelRequests: number,\n  projectRoot: string,\n  disableSharedBundles: boolean,\n  manualSharedBundles: ManualSharedBundles,\n|};\n\n// Default options by http version.\nconst HTTP_OPTIONS = {\n  '1': {\n    minBundles: 1,\n    manualSharedBundles: [],\n    minBundleSize: 30000,\n    maxParallelRequests: 6,\n    disableSharedBundles: false,\n  },\n  '2': {\n    minBundles: 1,\n    manualSharedBundles: [],\n    minBundleSize: 20000,\n    maxParallelRequests: 25,\n    disableSharedBundles: false,\n  },\n};\n\n/* BundleRoot - An asset that is the main entry of a Bundle. */\ntype BundleRoot = Asset;\nexport type Bundle = {|\n  uniqueKey: ?string,\n  assets: Set<Asset>,\n  internalizedAssets?: BitSet,\n  bundleBehavior?: ?BundleBehavior,\n  needsStableName: boolean,\n  mainEntryAsset: ?Asset,\n  size: number,\n  sourceBundles: Set<NodeId>,\n  target: Target,\n  env: Environment,\n  type: string,\n  manualSharedBundle: ?string, // for naming purposes\n|};\n\nconst dependencyPriorityEdges = {\n  sync: 1,\n  parallel: 2,\n  lazy: 3,\n};\n\ntype DependencyBundleGraph = ContentGraph<\n  | {|\n      value: Bundle,\n      type: 'bundle',\n    |}\n  | {|\n      value: Dependency,\n      type: 'dependency',\n    |},\n  number,\n>;\n// IdealGraph is the structure we will pass to decorate,\n// which mutates the assetGraph into the bundleGraph we would\n// expect from default bundler\ntype IdealGraph = {|\n  assets: Array<Asset>,\n  dependencyBundleGraph: DependencyBundleGraph,\n  bundleGraph: Graph<Bundle | 'root'>,\n  bundleGroupBundleIds: Set<NodeId>,\n  assetReference: DefaultMap<Asset, Array<[Dependency, Bundle]>>,\n  manualAssetToBundle: Map<Asset, NodeId>,\n|};\n\n/**\n *\n * The Bundler works by creating an IdealGraph, which contains a BundleGraph that models bundles\n * connected to other bundles by what references them, and thus models BundleGroups.\n *\n * First, we enter `bundle({bundleGraph, config})`. Here, \"bundleGraph\" is actually just the\n * assetGraph turned into a type `MutableBundleGraph`, which will then be mutated in decorate,\n * and turned into what we expect the bundleGraph to be as per the old (default) bundler structure\n *  & what the rest of Parcel expects a BundleGraph to be.\n *\n * `bundle({bundleGraph, config})` First gets a Mapping of target to entries, In most cases there is\n *  only one target, and one or more entries. (Targets are pertinent in monorepos or projects where you\n *  will have two or more distDirs, or output folders.) Then calls create IdealGraph and Decorate per target.\n *\n */\nexport default (new Bundler({\n  loadConfig({config, options, logger}) {\n    return loadBundlerConfig(config, options, logger);\n  },\n\n  bundle({bundleGraph, config, logger}) {\n    let targetMap = getEntryByTarget(bundleGraph); // Organize entries by target output folder/ distDir\n    let graphs = [];\n    for (let entries of targetMap.values()) {\n      // Create separate bundleGraphs per distDir\n      graphs.push(createIdealGraph(bundleGraph, config, entries, logger));\n    }\n    for (let g of graphs) {\n      decorateLegacyGraph(g, bundleGraph); //mutate original graph\n    }\n  },\n  optimize() {},\n}): Bundler);\n\nfunction decorateLegacyGraph(\n  idealGraph: IdealGraph,\n  bundleGraph: MutableBundleGraph,\n): void {\n  let idealBundleToLegacyBundle: Map<Bundle, LegacyBundle> = new Map();\n\n  let {\n    bundleGraph: idealBundleGraph,\n    dependencyBundleGraph,\n    bundleGroupBundleIds,\n    manualAssetToBundle,\n  } = idealGraph;\n  let entryBundleToBundleGroup: Map<NodeId, BundleGroup> = new Map();\n  // Step Create Bundles: Create bundle groups, bundles, and shared bundles and add assets to them\n  for (let [bundleNodeId, idealBundle] of idealBundleGraph.nodes.entries()) {\n    if (!idealBundle || idealBundle === 'root') continue;\n    let entryAsset = idealBundle.mainEntryAsset;\n    let bundleGroups = [];\n    let bundleGroup;\n    let bundle;\n\n    if (bundleGroupBundleIds.has(bundleNodeId)) {\n      invariant(\n        idealBundle.manualSharedBundle == null,\n        'Unstable Manual Shared Bundle feature is processing a manualSharedBundle as a BundleGroup',\n      );\n      let dependencies = dependencyBundleGraph\n        .getNodeIdsConnectedTo(\n          dependencyBundleGraph.getNodeIdByContentKey(String(bundleNodeId)),\n          ALL_EDGE_TYPES,\n        )\n        .map(nodeId => {\n          let dependency = nullthrows(dependencyBundleGraph.getNode(nodeId));\n          invariant(dependency.type === 'dependency');\n          return dependency.value;\n        });\n      invariant(\n        entryAsset != null,\n        'Processing a bundleGroup with no entry asset',\n      );\n      for (let dependency of dependencies) {\n        bundleGroup = bundleGraph.createBundleGroup(\n          dependency,\n          idealBundle.target,\n        );\n        bundleGroups.push(bundleGroup);\n      }\n      invariant(bundleGroup);\n      entryBundleToBundleGroup.set(bundleNodeId, bundleGroup);\n\n      bundle = nullthrows(\n        bundleGraph.createBundle({\n          entryAsset: nullthrows(entryAsset),\n          needsStableName: idealBundle.needsStableName,\n          bundleBehavior: idealBundle.bundleBehavior,\n          target: idealBundle.target,\n          manualSharedBundle: idealBundle.manualSharedBundle,\n        }),\n      );\n\n      bundleGraph.addBundleToBundleGroup(bundle, bundleGroup);\n    } else if (\n      idealBundle.sourceBundles.size > 0 &&\n      !idealBundle.mainEntryAsset\n    ) {\n      let uniqueKey =\n        idealBundle.uniqueKey != null\n          ? idealBundle.uniqueKey\n          : [...idealBundle.assets].map(asset => asset.id).join(',');\n\n      bundle = nullthrows(\n        bundleGraph.createBundle({\n          uniqueKey,\n          needsStableName: idealBundle.needsStableName,\n          bundleBehavior: idealBundle.bundleBehavior,\n          type: idealBundle.type,\n          target: idealBundle.target,\n          env: idealBundle.env,\n          manualSharedBundle: idealBundle.manualSharedBundle,\n        }),\n      );\n    } else if (idealBundle.uniqueKey != null) {\n      bundle = nullthrows(\n        bundleGraph.createBundle({\n          uniqueKey: idealBundle.uniqueKey,\n          needsStableName: idealBundle.needsStableName,\n          bundleBehavior: idealBundle.bundleBehavior,\n          type: idealBundle.type,\n          target: idealBundle.target,\n          env: idealBundle.env,\n          manualSharedBundle: idealBundle.manualSharedBundle,\n        }),\n      );\n    } else {\n      invariant(entryAsset != null);\n      bundle = nullthrows(\n        bundleGraph.createBundle({\n          entryAsset,\n          needsStableName: idealBundle.needsStableName,\n          bundleBehavior: idealBundle.bundleBehavior,\n          target: idealBundle.target,\n          manualSharedBundle: idealBundle.manualSharedBundle,\n        }),\n      );\n    }\n\n    idealBundleToLegacyBundle.set(idealBundle, bundle);\n\n    for (let asset of idealBundle.assets) {\n      bundleGraph.addAssetToBundle(asset, bundle);\n    }\n  }\n  // Step Internalization: Internalize dependencies for bundles\n  for (let idealBundle of idealBundleGraph.nodes) {\n    if (!idealBundle || idealBundle === 'root') continue;\n    let bundle = nullthrows(idealBundleToLegacyBundle.get(idealBundle));\n    if (idealBundle.internalizedAssets) {\n      idealBundle.internalizedAssets.forEach(internalized => {\n        let incomingDeps = bundleGraph.getIncomingDependencies(\n          idealGraph.assets[internalized],\n        );\n        for (let incomingDep of incomingDeps) {\n          if (\n            incomingDep.priority === 'lazy' &&\n            incomingDep.specifierType !== 'url' &&\n            bundle.hasDependency(incomingDep)\n          ) {\n            bundleGraph.internalizeAsyncDependency(bundle, incomingDep);\n          }\n        }\n      });\n    }\n  }\n  // Unstable Manual Shared Bundles\n  // NOTE: This only works under the assumption that manual shared bundles would have\n  // always already been loaded before the bundle that requires internalization.\n  for (let manualSharedAsset of manualAssetToBundle.keys()) {\n    let incomingDeps = bundleGraph.getIncomingDependencies(manualSharedAsset);\n    for (let incomingDep of incomingDeps) {\n      if (\n        incomingDep.priority === 'lazy' &&\n        incomingDep.specifierType !== 'url'\n      ) {\n        let bundles = bundleGraph.getBundlesWithDependency(incomingDep);\n        for (let bundle of bundles) {\n          bundleGraph.internalizeAsyncDependency(bundle, incomingDep);\n        }\n      }\n    }\n  }\n\n  // Step Add to BundleGroups: Add bundles to their bundle groups\n  idealBundleGraph.traverse((nodeId, _, actions) => {\n    let node = idealBundleGraph.getNode(nodeId);\n    if (node === 'root') {\n      return;\n    }\n    actions.skipChildren();\n\n    let outboundNodeIds = idealBundleGraph.getNodeIdsConnectedFrom(nodeId);\n    let entryBundle = nullthrows(idealBundleGraph.getNode(nodeId));\n    invariant(entryBundle !== 'root');\n    let legacyEntryBundle = nullthrows(\n      idealBundleToLegacyBundle.get(entryBundle),\n    );\n\n    for (let id of outboundNodeIds) {\n      let siblingBundle = nullthrows(idealBundleGraph.getNode(id));\n      invariant(siblingBundle !== 'root');\n      let legacySiblingBundle = nullthrows(\n        idealBundleToLegacyBundle.get(siblingBundle),\n      );\n      bundleGraph.createBundleReference(legacyEntryBundle, legacySiblingBundle);\n    }\n  });\n\n  // Step References: Add references to all bundles\n  for (let [asset, references] of idealGraph.assetReference) {\n    for (let [dependency, bundle] of references) {\n      let legacyBundle = nullthrows(idealBundleToLegacyBundle.get(bundle));\n      bundleGraph.createAssetReference(dependency, asset, legacyBundle);\n    }\n  }\n\n  for (let {from, to} of idealBundleGraph.getAllEdges()) {\n    let sourceBundle = nullthrows(idealBundleGraph.getNode(from));\n    if (sourceBundle === 'root') {\n      continue;\n    }\n    invariant(sourceBundle !== 'root');\n\n    let legacySourceBundle = nullthrows(\n      idealBundleToLegacyBundle.get(sourceBundle),\n    );\n\n    let targetBundle = nullthrows(idealBundleGraph.getNode(to));\n    if (targetBundle === 'root') {\n      continue;\n    }\n    invariant(targetBundle !== 'root');\n    let legacyTargetBundle = nullthrows(\n      idealBundleToLegacyBundle.get(targetBundle),\n    );\n    bundleGraph.createBundleReference(legacySourceBundle, legacyTargetBundle);\n  }\n}\n\nfunction createIdealGraph(\n  assetGraph: MutableBundleGraph,\n  config: ResolvedBundlerConfig,\n  entries: Map<Asset, Dependency>,\n  logger: PluginLogger,\n): IdealGraph {\n  // Asset to the bundle and group it's an entry of\n  let bundleRoots: Map<BundleRoot, [NodeId, NodeId]> = new Map();\n  let bundles: Map<string, NodeId> = new Map();\n  let dependencyBundleGraph: DependencyBundleGraph = new ContentGraph();\n  let assetReference: DefaultMap<\n    Asset,\n    Array<[Dependency, Bundle]>,\n  > = new DefaultMap(() => []);\n\n  // A Graph of Bundles and a root node (dummy string), which models only Bundles, and connections to their\n  // referencing Bundle. There are no actual BundleGroup nodes, just bundles that take on that role.\n  let bundleGraph: Graph<Bundle | 'root'> = new Graph();\n  let stack: Array<[BundleRoot, NodeId]> = [];\n\n  let bundleRootEdgeTypes = {\n    parallel: 1,\n    lazy: 2,\n  };\n  // Graph that models bundleRoots, with parallel & async deps only to inform reachability\n  let bundleRootGraph: Graph<\n    number, // asset index\n    $Values<typeof bundleRootEdgeTypes>,\n  > = new Graph();\n  let assetToBundleRootNodeId = new Map<BundleRoot, number>();\n\n  let bundleGroupBundleIds: Set<NodeId> = new Set();\n\n  let bundleGraphRootNodeId = nullthrows(bundleGraph.addNode('root'));\n  bundleGraph.setRootNodeId(bundleGraphRootNodeId);\n  // Step Create Entry Bundles\n  for (let [asset, dependency] of entries) {\n    let bundle = createBundle({\n      asset,\n      target: nullthrows(dependency.target),\n      needsStableName: dependency.isEntry,\n    });\n    let nodeId = bundleGraph.addNode(bundle);\n    bundles.set(asset.id, nodeId);\n    bundleRoots.set(asset, [nodeId, nodeId]);\n    bundleGraph.addEdge(bundleGraphRootNodeId, nodeId);\n\n    dependencyBundleGraph.addEdge(\n      dependencyBundleGraph.addNodeByContentKeyIfNeeded(dependency.id, {\n        value: dependency,\n        type: 'dependency',\n      }),\n      dependencyBundleGraph.addNodeByContentKeyIfNeeded(String(nodeId), {\n        value: bundle,\n        type: 'bundle',\n      }),\n      dependencyPriorityEdges[dependency.priority],\n    );\n    bundleGroupBundleIds.add(nodeId);\n  }\n\n  let assets = [];\n  let assetToIndex = new Map<Asset, number>();\n\n  function makeManualAssetToConfigLookup() {\n    let manualAssetToConfig = new Map();\n    let constantModuleToMSB = new DefaultMap(() => []);\n\n    if (config.manualSharedBundles.length === 0) {\n      return {manualAssetToConfig, constantModuleToMSB};\n    }\n\n    let parentsToConfig = new DefaultMap(() => []);\n\n    for (let c of config.manualSharedBundles) {\n      if (c.root != null) {\n        parentsToConfig.get(path.join(config.projectRoot, c.root)).push(c);\n      }\n    }\n    let numParentsToFind = parentsToConfig.size;\n    let configToParentAsset = new Map();\n\n    assetGraph.traverse((node, _, actions) => {\n      if (node.type === 'asset' && parentsToConfig.has(node.value.filePath)) {\n        for (let c of parentsToConfig.get(node.value.filePath)) {\n          configToParentAsset.set(c, node.value);\n        }\n\n        numParentsToFind--;\n\n        if (numParentsToFind === 0) {\n          // If we've found all parents we can stop traversal\n          actions.stop();\n        }\n      }\n    });\n\n    // Process in reverse order so earlier configs take precedence\n    for (let c of config.manualSharedBundles.reverse()) {\n      if (c.root != null && !configToParentAsset.has(c)) {\n        logger.warn({\n          origin: '@parcel/bundler-default',\n          message: `Manual shared bundle \"${c.name}\" skipped, no root asset found`,\n        });\n        continue;\n      }\n\n      let parentAsset = configToParentAsset.get(c);\n      let assetRegexes = c.assets.map(glob => globToRegex(glob));\n\n      assetGraph.traverse((node, _, actions) => {\n        if (\n          node.type === 'asset' &&\n          (!Array.isArray(c.types) || c.types.includes(node.value.type))\n        ) {\n          let projectRelativePath = path.relative(\n            config.projectRoot,\n            node.value.filePath,\n          );\n          if (!assetRegexes.some(regex => regex.test(projectRelativePath))) {\n            return;\n          }\n\n          // We track all matching MSB's for constant modules as they are never duplicated\n          // and need to be assigned to all matching bundles\n          if (node.value.meta.isConstantModule === true) {\n            constantModuleToMSB.get(node.value).push(c);\n          }\n          manualAssetToConfig.set(node.value, c);\n          return;\n        }\n\n        if (\n          node.type === 'dependency' &&\n          node.value.priority === 'lazy' &&\n          parentAsset\n        ) {\n          // Don't walk past the bundle group assets\n          actions.skipChildren();\n        }\n      }, parentAsset);\n    }\n\n    return {manualAssetToConfig, constantModuleToMSB};\n  }\n\n  //Manual is a map of the user-given name to the bundle node Id that corresponds to ALL the assets that match any glob in that user-specified array\n  let manualSharedMap: Map<string, NodeId> = new Map();\n  // May need a map to be able to look up NON- bundle root assets which need special case instructions\n  // Use this when placing assets into bundles, to avoid duplication\n  let manualAssetToBundle: Map<Asset, NodeId> = new Map();\n  let {manualAssetToConfig, constantModuleToMSB} =\n    makeManualAssetToConfigLookup();\n  let manualBundleToInternalizedAsset: DefaultMap<\n    NodeId,\n    Array<Asset>,\n  > = new DefaultMap(() => []);\n\n  /**\n   * Step Create Bundles: Traverse the assetGraph (aka MutableBundleGraph) and create bundles\n   * for asset type changes, parallel, inline, and async or lazy dependencies,\n   * adding only that asset to each bundle, not its entire subgraph.\n   */\n  assetGraph.traverse(\n    {\n      enter(node, context, actions) {\n        if (node.type === 'asset') {\n          if (\n            context?.type === 'dependency' &&\n            context?.value.isEntry &&\n            !entries.has(node.value)\n          ) {\n            // Skip whole subtrees of other targets by skipping those entries\n            actions.skipChildren();\n            return node;\n          }\n          assetToIndex.set(node.value, assets.length);\n          assets.push(node.value);\n\n          let bundleIdTuple = bundleRoots.get(node.value);\n          if (bundleIdTuple && bundleIdTuple[0] === bundleIdTuple[1]) {\n            // Push to the stack (only) when a new bundle is created\n            stack.push([node.value, bundleIdTuple[0]]);\n          } else if (bundleIdTuple) {\n            // Otherwise, push on the last bundle that marks the start of a BundleGroup\n            stack.push([node.value, stack[stack.length - 1][1]]);\n          }\n        } else if (node.type === 'dependency') {\n          if (context == null) {\n            return node;\n          }\n          let dependency = node.value;\n\n          invariant(context?.type === 'asset');\n\n          let assets = assetGraph.getDependencyAssets(dependency);\n          if (assets.length === 0) {\n            return node;\n          }\n\n          for (let childAsset of assets) {\n            let bundleId = bundles.get(childAsset.id);\n            let bundle;\n\n            // MSB Step 1: Match glob on filepath and type for any asset\n            let manualSharedBundleKey;\n            let manualSharedObject = manualAssetToConfig.get(childAsset);\n\n            if (manualSharedObject) {\n              // MSB Step 2: Generate a key for which to look up this manual bundle with\n              manualSharedBundleKey =\n                manualSharedObject.name + ',' + childAsset.type;\n            }\n\n            if (\n              // MSB Step 3: If a bundle for these globs already exsits, use it\n              manualSharedBundleKey != null &&\n              manualSharedMap.has(manualSharedBundleKey)\n            ) {\n              bundleId = nullthrows(manualSharedMap.get(manualSharedBundleKey));\n            }\n            if (\n              dependency.priority === 'lazy' ||\n              (dependency.priority !== 'parallel' &&\n                (dependency.bundleBehavior === 'isolated' ||\n                  childAsset.bundleBehavior === 'isolated')) // An isolated Dependency, or Bundle must contain all assets it needs to load.\n            ) {\n              if (bundleId == null) {\n                let firstBundleGroup = nullthrows(\n                  bundleGraph.getNode(stack[0][1]),\n                );\n                invariant(firstBundleGroup !== 'root');\n                bundle = createBundle({\n                  asset: childAsset,\n                  target: firstBundleGroup.target,\n                  needsStableName:\n                    dependency.bundleBehavior === 'inline' ||\n                    childAsset.bundleBehavior === 'inline'\n                      ? false\n                      : dependency.isEntry || dependency.needsStableName,\n                  bundleBehavior:\n                    dependency.bundleBehavior ?? childAsset.bundleBehavior,\n                });\n                bundleId = bundleGraph.addNode(bundle);\n                bundles.set(childAsset.id, bundleId);\n                bundleRoots.set(childAsset, [bundleId, bundleId]);\n                bundleGroupBundleIds.add(bundleId);\n                bundleGraph.addEdge(bundleGraphRootNodeId, bundleId);\n                if (manualSharedObject) {\n                  // MSB Step 4: If this was the first instance of a match, mark mainAsset for internalization\n                  // since MSBs should not have main entry assets\n                  manualBundleToInternalizedAsset\n                    .get(bundleId)\n                    .push(childAsset);\n                }\n              } else {\n                bundle = nullthrows(bundleGraph.getNode(bundleId));\n                invariant(bundle !== 'root');\n\n                if (\n                  // If this dependency requests isolated, but the bundle is not,\n                  // make the bundle isolated for all uses.\n                  dependency.bundleBehavior === 'isolated' &&\n                  bundle.bundleBehavior == null\n                ) {\n                  bundle.bundleBehavior = dependency.bundleBehavior;\n                }\n              }\n\n              dependencyBundleGraph.addEdge(\n                dependencyBundleGraph.addNodeByContentKeyIfNeeded(\n                  dependency.id,\n                  {\n                    value: dependency,\n                    type: 'dependency',\n                  },\n                ),\n                dependencyBundleGraph.addNodeByContentKeyIfNeeded(\n                  String(bundleId),\n                  {\n                    value: bundle,\n                    type: 'bundle',\n                  },\n                ),\n                dependencyPriorityEdges[dependency.priority],\n              );\n\n              // If this is a sync dependency on a JS asset that won't be replaced with a URL runtime,\n              // add a reference so the bundle is loaded by the parent. This happens with React Server Components.\n              if (\n                dependency.priority === 'sync' &&\n                childAsset.type === 'js' &&\n                childAsset?.meta.jsRuntime !== 'url'\n              ) {\n                assetReference.get(childAsset).push([dependency, bundle]);\n              }\n            } else if (\n              dependency.priority === 'parallel' ||\n              childAsset.bundleBehavior === 'inline'\n            ) {\n              // The referencing bundleRoot is the root of a Bundle that first brings in another bundle (essentially the FIRST parent of a bundle, this may or may not be a bundleGroup)\n              let [referencingBundleRoot, bundleGroupNodeId] = nullthrows(\n                stack[stack.length - 1],\n              );\n              let bundleGroup = nullthrows(\n                bundleGraph.getNode(bundleGroupNodeId),\n              );\n              invariant(bundleGroup !== 'root');\n\n              let referencingBundleId = nullthrows(\n                bundleRoots.get(referencingBundleRoot),\n              )[0];\n              let referencingBundle = nullthrows(\n                bundleGraph.getNode(referencingBundleId),\n              );\n              invariant(referencingBundle !== 'root');\n\n              if (bundleId == null) {\n                bundle = createBundle({\n                  // Bundles created from type changes shouldn't have an entry asset.\n                  asset: childAsset,\n                  type: childAsset.type,\n                  env: childAsset.env,\n                  bundleBehavior:\n                    dependency.bundleBehavior ?? childAsset.bundleBehavior,\n                  target: referencingBundle.target,\n                  needsStableName:\n                    childAsset.bundleBehavior === 'inline' ||\n                    dependency.bundleBehavior === 'inline' ||\n                    (dependency.priority === 'parallel' &&\n                      !dependency.needsStableName)\n                      ? false\n                      : referencingBundle.needsStableName,\n                });\n                bundleId = bundleGraph.addNode(bundle);\n              } else {\n                bundle = bundleGraph.getNode(bundleId);\n                invariant(bundle != null && bundle !== 'root');\n\n                if (\n                  // If this dependency requests isolated, but the bundle is not,\n                  // make the bundle isolated for all uses.\n                  dependency.bundleBehavior === 'isolated' &&\n                  bundle.bundleBehavior == null\n                ) {\n                  bundle.bundleBehavior = dependency.bundleBehavior;\n                }\n              }\n\n              bundles.set(childAsset.id, bundleId);\n\n              // A bundle can belong to multiple bundlegroups, all the bundle groups of it's\n              // ancestors, and all async and entry bundles before it are \"bundle groups\"\n              // TODO: We may need to track bundles to all bundleGroups it belongs to in the future.\n              bundleRoots.set(childAsset, [bundleId, bundleGroupNodeId]);\n              bundleGraph.addEdge(referencingBundleId, bundleId);\n\n              if (bundleId != bundleGroupNodeId) {\n                dependencyBundleGraph.addEdge(\n                  dependencyBundleGraph.addNodeByContentKeyIfNeeded(\n                    dependency.id,\n                    {\n                      value: dependency,\n                      type: 'dependency',\n                    },\n                  ),\n                  dependencyBundleGraph.addNodeByContentKeyIfNeeded(\n                    String(bundleId),\n                    {\n                      value: bundle,\n                      type: 'bundle',\n                    },\n                  ),\n                  dependencyPriorityEdges.parallel,\n                );\n              }\n\n              assetReference.get(childAsset).push([dependency, bundle]);\n            } else {\n              bundleId = null;\n            }\n            if (manualSharedObject && bundleId != null) {\n              // MSB Step 5:  At this point we've either created or found an existing MSB bundle\n              // add the asset if it doesn't already have it and set key\n\n              invariant(\n                bundle !== 'root' && bundle != null && bundleId != null,\n              );\n\n              manualAssetToBundle.set(childAsset, bundleId);\n\n              if (!bundle.assets.has(childAsset)) {\n                // Add asset to bundle\n                bundle.assets.add(childAsset);\n                bundle.size += childAsset.stats.size;\n              }\n\n              bundles.set(childAsset.id, bundleId);\n              bundleRoots.set(childAsset, [bundleId, bundleId]);\n\n              invariant(manualSharedBundleKey != null);\n              // Ensure we set key to BundleId so the next glob match uses the appropriate bundle\n              if (!manualSharedMap.has(manualSharedBundleKey)) {\n                manualSharedMap.set(manualSharedBundleKey, bundleId);\n              }\n              bundle.manualSharedBundle = manualSharedObject.name;\n              bundle.uniqueKey = manualSharedObject.name + childAsset.type;\n            }\n          }\n        }\n        return node;\n      },\n      exit(node) {\n        if (stack[stack.length - 1]?.[0] === node.value) {\n          stack.pop();\n        }\n      },\n    },\n    null,\n    {skipUnusedDependencies: true},\n  );\n\n  // Strip MSBs of entries\n  for (let [\n    nodeId,\n    internalizedAssets,\n  ] of manualBundleToInternalizedAsset.entries()) {\n    let bundle = bundleGraph.getNode(nodeId);\n    invariant(bundle != null && bundle !== 'root');\n\n    if (!bundle.internalizedAssets) {\n      bundle.internalizedAssets = new BitSet(assets.length);\n    }\n    for (let asset of internalizedAssets) {\n      bundle.internalizedAssets.add(nullthrows(assetToIndex.get(asset)));\n    }\n    bundle.mainEntryAsset = null;\n    bundleGroupBundleIds.delete(nodeId); // manual bundles can now act as shared, non-bundle group, should they be non-bundleRoots as well?\n  }\n\n  /**\n   *  Step Determine Reachability: Determine reachability for every asset from each bundleRoot.\n   * This is later used to determine which bundles to place each asset in. We build up two\n   * structures, one traversal each. ReachableRoots to store sync relationships,\n   * and bundleRootGraph to store the minimal availability through `parallel` and `async` relationships.\n   * The two graphs, are used to build up ancestorAssets, a structure which holds all availability by\n   * all means for each asset.\n   */\n  let rootNodeId = bundleRootGraph.addNode(-1);\n  bundleRootGraph.setRootNodeId(rootNodeId);\n\n  for (let [root] of bundleRoots) {\n    let nodeId = bundleRootGraph.addNode(nullthrows(assetToIndex.get(root)));\n    assetToBundleRootNodeId.set(root, nodeId);\n    if (entries.has(root)) {\n      bundleRootGraph.addEdge(rootNodeId, nodeId);\n    }\n  }\n\n  // reachableRoots is an array of bit sets for each asset. Each bit set\n  // indicates which bundle roots are reachable from that asset synchronously.\n  let reachableRoots = [];\n  for (let i = 0; i < assets.length; i++) {\n    reachableRoots.push(new BitSet(bundleRootGraph.nodes.length));\n  }\n\n  // reachableAssets is the inverse mapping of reachableRoots. For each bundle root,\n  // it contains a bit set that indicates which assets are reachable from it.\n  let reachableAssets = [];\n\n  // ancestorAssets maps bundle roots to the set of all assets available to it at runtime,\n  // including in earlier parallel bundles. These are intersected through all paths to\n  // the bundle to ensure that the available assets are always present no matter in which\n  // order the bundles are loaded.\n  let ancestorAssets = [];\n\n  let inlineConstantDeps = new DefaultMap(() => new Set());\n\n  for (let [bundleRootId, assetId] of bundleRootGraph.nodes.entries()) {\n    let reachable = new BitSet(assets.length);\n    reachableAssets.push(reachable);\n    ancestorAssets.push(null);\n\n    if (bundleRootId == rootNodeId || assetId == null) continue;\n    // Add sync relationships to ReachableRoots\n    let root = assets[assetId];\n    assetGraph.traverse(\n      (node, _, actions) => {\n        if (node.value === root) {\n          return;\n        }\n        if (node.type === 'dependency') {\n          let dependency = node.value;\n\n          if (\n            dependency.priority !== 'sync' &&\n            dependencyBundleGraph.hasContentKey(dependency.id)\n          ) {\n            let assets = assetGraph.getDependencyAssets(dependency);\n            if (assets.length === 0) {\n              return;\n            }\n            invariant(assets.length === 1);\n            let bundleRoot = assets[0];\n            let bundle = nullthrows(\n              bundleGraph.getNode(nullthrows(bundles.get(bundleRoot.id))),\n            );\n            if (\n              bundle !== 'root' &&\n              bundle.bundleBehavior == null &&\n              !bundle.env.isIsolated() &&\n              bundle.env.context === root.env.context\n            ) {\n              bundleRootGraph.addEdge(\n                bundleRootId,\n                nullthrows(assetToBundleRootNodeId.get(bundleRoot)),\n                dependency.priority === 'parallel'\n                  ? bundleRootEdgeTypes.parallel\n                  : bundleRootEdgeTypes.lazy,\n              );\n            }\n          }\n\n          if (dependency.priority !== 'sync') {\n            actions.skipChildren();\n          }\n          return;\n        }\n        //asset node type\n        let asset = node.value;\n        if (asset.bundleBehavior != null) {\n          actions.skipChildren();\n          return;\n        }\n        let assetIndex = nullthrows(assetToIndex.get(node.value));\n        reachable.add(assetIndex);\n        reachableRoots[assetIndex].add(bundleRootId);\n\n        if (asset.meta.isConstantModule === true) {\n          let parents = assetGraph\n            .getIncomingDependencies(asset)\n            .map(dep => nullthrows(assetGraph.getAssetWithDependency(dep)));\n\n          for (let parent of parents) {\n            inlineConstantDeps.get(parent).add(asset);\n          }\n        }\n\n        return;\n      },\n      root,\n      {skipUnusedDependencies: true},\n    );\n  }\n\n  for (let entry of entries.keys()) {\n    // Initialize an empty set of ancestors available to entries\n    let entryId = nullthrows(assetToBundleRootNodeId.get(entry));\n    ancestorAssets[entryId] = new BitSet(assets.length);\n  }\n\n  // Step Determine Availability\n  // Visit nodes in a topological order, visiting parent nodes before child nodes.\n\n  // This allows us to construct an understanding of which assets will already be\n  // loaded and available when a bundle runs, by pushing available assets downwards and\n  // computing the intersection of assets available through all possible paths to a bundle.\n  // We call this structure ancestorAssets, a Map that tracks a bundleRoot,\n  // to all assets available to it (meaning they will exist guaranteed when the bundleRoot is loaded)\n  //  The topological sort ensures all parents are visited before the node we want to process.\n  for (let nodeId of bundleRootGraph.topoSort(ALL_EDGE_TYPES)) {\n    if (nodeId === rootNodeId) continue;\n    const bundleRoot = assets[nullthrows(bundleRootGraph.getNode(nodeId))];\n    let bundleGroupId = nullthrows(bundleRoots.get(bundleRoot))[1];\n\n    // At a BundleRoot, we access it's available assets (via ancestorAssets),\n    // and add to that all assets within the bundles in that BundleGroup.\n\n    // This set is available to all bundles in a particular bundleGroup because\n    // bundleGroups are just bundles loaded at the same time. However it is\n    // not true that a bundle's available assets = all assets of all the bundleGroups\n    // it belongs to. It's the intersection of those sets.\n    let available;\n    if (bundleRoot.bundleBehavior === 'isolated') {\n      available = new BitSet(assets.length);\n    } else {\n      available = nullthrows(ancestorAssets[nodeId]).clone();\n      for (let bundleIdInGroup of [\n        bundleGroupId,\n        ...bundleGraph.getNodeIdsConnectedFrom(bundleGroupId),\n      ]) {\n        let bundleInGroup = nullthrows(bundleGraph.getNode(bundleIdInGroup));\n        invariant(bundleInGroup !== 'root');\n        if (bundleInGroup.bundleBehavior != null) {\n          continue;\n        }\n\n        for (let bundleRoot of bundleInGroup.assets) {\n          // Assets directly connected to current bundleRoot\n          available.add(nullthrows(assetToIndex.get(bundleRoot)));\n          available.union(\n            reachableAssets[\n              nullthrows(assetToBundleRootNodeId.get(bundleRoot))\n            ],\n          );\n        }\n      }\n    }\n\n    //  Now that we have bundleGroup availability, we will propagate that down to all the children\n    //  of this bundleGroup. For a child, we also must maintain parallel availability. If it has\n    //  parallel siblings that come before it, those, too, are available to it. Add those parallel\n    //  available assets to the set of available assets for this child as well.\n    let children = bundleRootGraph.getNodeIdsConnectedFrom(\n      nodeId,\n      ALL_EDGE_TYPES,\n    );\n    let parallelAvailability = new BitSet(assets.length);\n\n    for (let childId of children) {\n      let assetId = nullthrows(bundleRootGraph.getNode(childId));\n      let child = assets[assetId];\n      let bundleBehavior = getBundleFromBundleRoot(child).bundleBehavior;\n      if (bundleBehavior != null) {\n        continue;\n      }\n      let isParallel = bundleRootGraph.hasEdge(\n        nodeId,\n        childId,\n        bundleRootEdgeTypes.parallel,\n      );\n\n      // Most of the time, a child will have many parent bundleGroups,\n      // so the next time we peek at a child from another parent, we will\n      // intersect the availability built there with the previously computed\n      // availability. this ensures no matter which bundleGroup loads a particular bundle,\n      // it will only assume availability of assets it has under any circumstance\n      const childAvailableAssets = ancestorAssets[childId];\n      let currentChildAvailable = isParallel\n        ? BitSet.union(parallelAvailability, available)\n        : available;\n      if (childAvailableAssets != null) {\n        childAvailableAssets.intersect(currentChildAvailable);\n      } else {\n        ancestorAssets[childId] = currentChildAvailable.clone();\n      }\n      if (isParallel) {\n        parallelAvailability.union(reachableAssets[childId]);\n        parallelAvailability.add(assetId); //The next sibling should have older sibling available via parallel\n      }\n    }\n  }\n  // Step Internalize async bundles - internalize Async bundles if and only if,\n  // the bundle is synchronously available elsewhere.\n  // We can query sync assets available via reachableRoots. If the parent has\n  // the bundleRoot by reachableRoots AND ancestorAssets, internalize it.\n  for (let [id, bundleRootId] of bundleRootGraph.nodes.entries()) {\n    if (bundleRootId == null || id === rootNodeId) continue;\n    let bundleRoot = assets[bundleRootId];\n\n    if (manualAssetToConfig.has(bundleRoot)) {\n      // We internalize for MSBs later, we should never delete MSBs\n      continue;\n    }\n\n    let parentRoots = bundleRootGraph.getNodeIdsConnectedTo(id, ALL_EDGE_TYPES);\n    let canDelete =\n      getBundleFromBundleRoot(bundleRoot).bundleBehavior !== 'isolated';\n    if (parentRoots.length === 0) continue;\n    for (let parentId of parentRoots) {\n      if (parentId === rootNodeId) {\n        // connected to root.\n        canDelete = false;\n        continue;\n      }\n      if (\n        reachableAssets[parentId].has(bundleRootId) ||\n        ancestorAssets[parentId]?.has(bundleRootId)\n      ) {\n        let parentAssetId = nullthrows(bundleRootGraph.getNode(parentId));\n        let parent = assets[parentAssetId];\n        let parentBundle = bundleGraph.getNode(\n          nullthrows(bundles.get(parent.id)),\n        );\n        invariant(parentBundle != null && parentBundle !== 'root');\n        if (!parentBundle.internalizedAssets) {\n          parentBundle.internalizedAssets = new BitSet(assets.length);\n        }\n\n        parentBundle.internalizedAssets.add(bundleRootId);\n      } else {\n        canDelete = false;\n      }\n    }\n    if (canDelete) {\n      deleteBundle(bundleRoot);\n    }\n  }\n\n  function assignInlineConstants(parentAsset: Asset, bundle: Bundle) {\n    for (let inlineConstant of inlineConstantDeps.get(parentAsset)) {\n      if (!bundle.assets.has(inlineConstant)) {\n        bundle.assets.add(inlineConstant);\n        bundle.size += inlineConstant.stats.size;\n      }\n    }\n  }\n\n  // Step Insert Or Share: Place all assets into bundles or create shared bundles. Each asset\n  // is placed into a single bundle based on the bundle entries it is reachable from.\n  // This creates a maximally code split bundle graph with no duplication.\n  let reachable = new BitSet(assets.length);\n  let reachableNonEntries = new BitSet(assets.length);\n  let reachableIntersection = new BitSet(assets.length);\n  for (let i = 0; i < assets.length; i++) {\n    let asset = assets[i];\n    let manualSharedObject = manualAssetToConfig.get(asset);\n\n    if (bundleRoots.has(asset) && inlineConstantDeps.get(asset).size > 0) {\n      let entryBundleId = nullthrows(bundleRoots.get(asset))[0];\n      let entryBundle = nullthrows(bundleGraph.getNode(entryBundleId));\n      invariant(entryBundle !== 'root');\n      assignInlineConstants(asset, entryBundle);\n    }\n\n    if (asset.meta.isConstantModule === true) {\n      // Ignore constant modules as they are placed with their direct parents\n      continue;\n    }\n\n    // Unreliable bundleRoot assets which need to pulled in by shared bundles or other means.\n    // Filter out entries, since they can't have shared bundles.\n    // Neither can non-splittable, isolated, or needing of stable name bundles.\n    // Reserve those filtered out bundles since we add the asset back into them.\n    reachableNonEntries.clear();\n    reachableRoots[i].forEach(nodeId => {\n      let assetId = bundleRootGraph.getNode(nodeId);\n      if (assetId == null) return; // deleted\n      let a = assets[assetId];\n      if (\n        !a.isBundleSplittable ||\n        (bundleRoots.get(a) &&\n          getBundleFromBundleRoot(a).needsStableName &&\n          a.env.context === asset.env.context)\n      ) {\n        // Add asset to non-splittable bundles.\n        addAssetToBundleRoot(asset, a);\n      } else if (!ancestorAssets[nodeId]?.has(i)) {\n        // Filter out bundles from this asset's reachable array if\n        // bundle does not contain the asset in its ancestry\n        reachableNonEntries.add(assetId);\n      }\n    });\n\n    reachable.bits.set(reachableNonEntries.bits);\n\n    // If we encounter a \"manual\" asset, draw an edge from reachable to its MSB\n    if (manualSharedObject && !reachable.empty()) {\n      let bundle;\n      let bundleId;\n      let manualSharedBundleKey = manualSharedObject.name + ',' + asset.type;\n      let sourceBundles = [];\n      reachable.forEach(id => {\n        sourceBundles.push(nullthrows(bundleRoots.get(assets[id]))[0]);\n      });\n\n      if (!manualSharedMap.has(manualSharedBundleKey)) {\n        let firstSourceBundle = nullthrows(\n          bundleGraph.getNode(sourceBundles[0]),\n        );\n        invariant(firstSourceBundle !== 'root');\n\n        bundle = createBundle({\n          uniqueKey: manualSharedBundleKey,\n          target: firstSourceBundle.target,\n          type: asset.type,\n          env: asset.env,\n          manualSharedBundle: manualSharedObject?.name,\n        });\n        bundle.sourceBundles = new Set(sourceBundles);\n        bundle.assets.add(asset);\n        bundleId = bundleGraph.addNode(bundle);\n        manualSharedMap.set(manualSharedBundleKey, bundleId);\n      } else {\n        bundleId = nullthrows(manualSharedMap.get(manualSharedBundleKey));\n        bundle = nullthrows(bundleGraph.getNode(bundleId));\n        invariant(\n          bundle != null && bundle !== 'root',\n          'We tried to use the root incorrectly',\n        );\n\n        if (!bundle.assets.has(asset)) {\n          bundle.assets.add(asset);\n          bundle.size += asset.stats.size;\n        }\n\n        for (let s of sourceBundles) {\n          if (s != bundleId) {\n            bundle.sourceBundles.add(s);\n          }\n        }\n      }\n\n      for (let sourceBundleId of sourceBundles) {\n        if (bundleId !== sourceBundleId) {\n          bundleGraph.addEdge(sourceBundleId, bundleId);\n        }\n      }\n\n      dependencyBundleGraph.addNodeByContentKeyIfNeeded(String(bundleId), {\n        value: bundle,\n        type: 'bundle',\n      });\n      continue;\n    }\n\n    // Finally, filter out bundleRoots (bundles) from this assets\n    // reachable if they are subgraphs, and reuse that subgraph bundle\n    // by drawing an edge. Essentially, if two bundles within an asset's\n    // reachable array, have an ancestor-subgraph relationship, draw that edge.\n    // This allows for us to reuse a bundle instead of making a shared bundle if\n    // a bundle represents the exact set of assets a set of bundles would share\n\n    // if a bundle b is a subgraph of another bundle f, reuse it, drawing an edge between the two\n    if (config.disableSharedBundles === false) {\n      reachableNonEntries.forEach(candidateId => {\n        let candidateSourceBundleRoot = assets[candidateId];\n        let candidateSourceBundleId = nullthrows(\n          bundleRoots.get(candidateSourceBundleRoot),\n        )[0];\n        if (candidateSourceBundleRoot.env.isIsolated()) {\n          return;\n        }\n        let reuseableBundleId = bundles.get(asset.id);\n        if (reuseableBundleId != null) {\n          reachable.delete(candidateId);\n          bundleGraph.addEdge(candidateSourceBundleId, reuseableBundleId);\n\n          let reusableBundle = bundleGraph.getNode(reuseableBundleId);\n          invariant(reusableBundle !== 'root' && reusableBundle != null);\n          reusableBundle.sourceBundles.add(candidateSourceBundleId);\n        } else {\n          // Asset is not a bundleRoot, but if its ancestor bundle (in the asset's reachable) can be\n          // reused as a subgraph of another bundleRoot in its reachable, reuse it\n          reachableIntersection.bits.set(reachableNonEntries.bits);\n          reachableIntersection.intersect(\n            reachableAssets[\n              nullthrows(assetToBundleRootNodeId.get(candidateSourceBundleRoot))\n            ],\n          );\n\n          reachableIntersection.forEach(otherCandidateId => {\n            let otherReuseCandidate = assets[otherCandidateId];\n            if (candidateSourceBundleRoot === otherReuseCandidate) return;\n            let reusableBundleId = nullthrows(\n              bundles.get(otherReuseCandidate.id),\n            );\n            reachable.delete(candidateId);\n            bundleGraph.addEdge(\n              nullthrows(bundles.get(candidateSourceBundleRoot.id)),\n              reusableBundleId,\n            );\n            let reusableBundle = bundleGraph.getNode(reusableBundleId);\n            invariant(reusableBundle !== 'root' && reusableBundle != null);\n            reusableBundle.sourceBundles.add(candidateSourceBundleId);\n          });\n        }\n      });\n    }\n\n    let reachableArray = [];\n    reachable.forEach(id => {\n      reachableArray.push(assets[id]);\n    });\n\n    // Create shared bundles for splittable bundles.\n    if (\n      config.disableSharedBundles === false &&\n      reachableArray.length > config.minBundles\n    ) {\n      let sourceBundles = reachableArray.map(\n        a => nullthrows(bundleRoots.get(a))[0],\n      );\n      let key =\n        reachableArray.map(a => a.id).join(',') +\n        '.' +\n        asset.env.context +\n        '.' +\n        asset.type;\n      let bundleId = bundles.get(key);\n      let bundle;\n      if (bundleId == null) {\n        let firstSourceBundle = nullthrows(\n          bundleGraph.getNode(sourceBundles[0]),\n        );\n        invariant(firstSourceBundle !== 'root');\n        bundle = createBundle({\n          target: firstSourceBundle.target,\n          type: asset.type,\n          env: asset.env,\n        });\n        bundle.sourceBundles = new Set(sourceBundles);\n        let sharedInternalizedAssets = firstSourceBundle.internalizedAssets\n          ? firstSourceBundle.internalizedAssets.clone()\n          : new BitSet(assets.length);\n\n        for (let p of sourceBundles) {\n          let parentBundle = nullthrows(bundleGraph.getNode(p));\n          invariant(parentBundle !== 'root');\n          if (parentBundle === firstSourceBundle) continue;\n\n          if (parentBundle.internalizedAssets) {\n            sharedInternalizedAssets.intersect(parentBundle.internalizedAssets);\n          } else {\n            sharedInternalizedAssets.clear();\n          }\n        }\n        bundle.internalizedAssets = sharedInternalizedAssets;\n        bundleId = bundleGraph.addNode(bundle);\n        bundles.set(key, bundleId);\n      } else {\n        bundle = nullthrows(bundleGraph.getNode(bundleId));\n        invariant(bundle !== 'root');\n      }\n      bundle.assets.add(asset);\n      bundle.size += asset.stats.size;\n\n      assignInlineConstants(asset, bundle);\n\n      for (let sourceBundleId of sourceBundles) {\n        if (bundleId !== sourceBundleId) {\n          bundleGraph.addEdge(sourceBundleId, bundleId);\n        }\n      }\n\n      dependencyBundleGraph.addNodeByContentKeyIfNeeded(String(bundleId), {\n        value: bundle,\n        type: 'bundle',\n      });\n    } else if (\n      config.disableSharedBundles === true ||\n      reachableArray.length <= config.minBundles\n    ) {\n      for (let root of reachableArray) {\n        addAssetToBundleRoot(asset, root);\n      }\n    }\n  }\n\n  let manualSharedBundleIds = new Set([...manualSharedMap.values()]);\n  // Step split manual shared bundles for those that have the \"split\" property set\n  let remainderMap = new DefaultMap(() => []);\n  for (let id of manualSharedMap.values()) {\n    let manualBundle = bundleGraph.getNode(id);\n    invariant(manualBundle !== 'root' && manualBundle != null);\n\n    if (manualBundle.sourceBundles.size > 0) {\n      let firstSourceBundle = nullthrows(\n        bundleGraph.getNode([...manualBundle.sourceBundles][0]),\n      );\n      invariant(firstSourceBundle !== 'root');\n      let firstAsset = [...manualBundle.assets][0];\n      let manualSharedObject = manualAssetToConfig.get(firstAsset);\n      invariant(manualSharedObject != null);\n      let modNum = manualAssetToConfig.get(firstAsset)?.split;\n      if (modNum != null) {\n        for (let a of [...manualBundle.assets]) {\n          let numRep = getBigIntFromContentKey(a.id);\n          // $FlowFixMe Flow doesn't know about BigInt\n          let r = Number(numRep % BigInt(modNum));\n\n          remainderMap.get(r).push(a);\n        }\n\n        for (let i = 1; i < [...remainderMap.keys()].length; i++) {\n          let bundle = createBundle({\n            uniqueKey: manualSharedObject.name + firstSourceBundle.type + i,\n            target: firstSourceBundle.target,\n            type: firstSourceBundle.type,\n            env: firstSourceBundle.env,\n            manualSharedBundle: manualSharedObject.name,\n          });\n          bundle.sourceBundles = manualBundle.sourceBundles;\n          bundle.internalizedAssets = manualBundle.internalizedAssets;\n          let bundleId = bundleGraph.addNode(bundle);\n          manualSharedBundleIds.add(bundleId);\n          for (let sourceBundleId of manualBundle.sourceBundles) {\n            if (bundleId !== sourceBundleId) {\n              bundleGraph.addEdge(sourceBundleId, bundleId);\n            }\n          }\n          for (let sp of remainderMap.get(i)) {\n            bundle.assets.add(sp);\n            bundle.size += sp.stats.size;\n            manualBundle.assets.delete(sp);\n            manualBundle.size -= sp.stats.size;\n          }\n        }\n      }\n    }\n  }\n\n  // Step insert constant modules into manual shared bundles.\n  // We have to do this separately as they're the only case where a single asset can\n  // match multiple MSB's\n  for (let [asset, msbs] of constantModuleToMSB.entries()) {\n    for (let manualSharedObject of msbs) {\n      let bundleId = manualSharedMap.get(manualSharedObject.name + ',js');\n      if (bundleId == null) continue;\n      let bundle = nullthrows(bundleGraph.getNode(bundleId));\n      invariant(\n        bundle != null && bundle !== 'root',\n        'We tried to use the root incorrectly',\n      );\n\n      if (!bundle.assets.has(asset)) {\n        bundle.assets.add(asset);\n        bundle.size += asset.stats.size;\n      }\n    }\n  }\n\n  // Step Merge Share Bundles: Merge any shared bundles under the minimum bundle size back into\n  // their source bundles, and remove the bundle.\n  // We should include \"bundle reuse\" as shared bundles that may be removed but the bundle itself would have to be retained\n  for (let [bundleNodeId, bundle] of bundleGraph.nodes.entries()) {\n    if (!bundle || bundle === 'root') continue;\n    if (\n      bundle.sourceBundles.size > 0 &&\n      bundle.mainEntryAsset == null &&\n      bundle.size < config.minBundleSize &&\n      !manualSharedBundleIds.has(bundleNodeId)\n    ) {\n      removeBundle(bundleGraph, bundleNodeId, assetReference);\n    }\n  }\n\n  let modifiedSourceBundles = new Set();\n\n  // Step Remove Shared Bundles: Remove shared bundles from bundle groups that hit the parallel request limit.\n  if (config.disableSharedBundles === false) {\n    for (let bundleGroupId of bundleGraph.getNodeIdsConnectedFrom(rootNodeId)) {\n      // Find shared bundles in this bundle group.\n      let bundleId = bundleGroupId;\n\n      // We should include \"bundle reuse\" as shared bundles that may be removed but the bundle itself would have to be retained\n      let bundleIdsInGroup = getBundlesForBundleGroup(bundleId); //get all bundlegrups this bundle is an ancestor of\n\n      // Filter out inline assests as they should not contribute to PRL\n      let numBundlesContributingToPRL = bundleIdsInGroup.reduce((count, b) => {\n        let bundle = nullthrows(bundleGraph.getNode(b));\n        invariant(bundle !== 'root');\n        return count + (bundle.bundleBehavior !== 'inline');\n      }, 0);\n\n      if (numBundlesContributingToPRL > config.maxParallelRequests) {\n        let sharedBundleIdsInBundleGroup = bundleIdsInGroup.filter(b => {\n          let bundle = nullthrows(bundleGraph.getNode(b));\n          // shared bundles must have source bundles, we could have a bundle\n          // connected to another bundle that isnt a shared bundle, so check\n          return (\n            bundle !== 'root' &&\n            bundle.sourceBundles.size > 0 &&\n            bundleId != b &&\n            !manualSharedBundleIds.has(b)\n          );\n        });\n\n        // Sort the bundles so the smallest ones are removed first.\n        let sharedBundlesInGroup = sharedBundleIdsInBundleGroup\n          .map(id => ({\n            id,\n            bundle: nullthrows(bundleGraph.getNode(id)),\n          }))\n          .map(({id, bundle}) => {\n            // For Flow\n            invariant(bundle !== 'root');\n            return {id, bundle};\n          })\n          .sort((a, b) => b.bundle.size - a.bundle.size);\n\n        // Remove bundles until the bundle group is within the parallel request limit.\n        while (\n          sharedBundlesInGroup.length > 0 &&\n          numBundlesContributingToPRL > config.maxParallelRequests\n        ) {\n          let bundleTuple = sharedBundlesInGroup.pop();\n          let bundleToRemove = bundleTuple.bundle;\n          let bundleIdToRemove = bundleTuple.id;\n          //TODO add integration test where bundles in bunlde group > max parallel request limit & only remove a couple shared bundles\n          // but total # bundles still exceeds limit due to non shared bundles\n\n          // Add all assets in the shared bundle into the source bundles that are within this bundle group.\n          let sourceBundles = [...bundleToRemove.sourceBundles].filter(b =>\n            bundleIdsInGroup.includes(b),\n          );\n\n          for (let sourceBundleId of sourceBundles) {\n            let sourceBundle = nullthrows(bundleGraph.getNode(sourceBundleId));\n            invariant(sourceBundle !== 'root');\n            modifiedSourceBundles.add(sourceBundle);\n            bundleToRemove.sourceBundles.delete(sourceBundleId);\n            for (let asset of bundleToRemove.assets) {\n              addAssetToBundleRoot(\n                asset,\n                nullthrows(sourceBundle.mainEntryAsset),\n              );\n            }\n            //This case is specific to reused bundles, which can have shared bundles attached to it\n            for (let childId of bundleGraph.getNodeIdsConnectedFrom(\n              bundleIdToRemove,\n            )) {\n              let child = bundleGraph.getNode(childId);\n              invariant(child !== 'root' && child != null);\n              child.sourceBundles.add(sourceBundleId);\n              bundleGraph.addEdge(sourceBundleId, childId);\n            }\n            // needs to add test case where shared bundle is removed from ONE bundlegroup but not from the whole graph!\n            // Remove the edge from this bundle group to the shared bundle.\n            // If there is now only a single bundle group that contains this bundle,\n            // merge it into the remaining source bundles. If it is orphaned entirely, remove it.\n            let incomingNodeCount =\n              bundleGraph.getNodeIdsConnectedTo(bundleIdToRemove).length;\n\n            if (\n              incomingNodeCount <= 2 &&\n              //Never fully remove reused bundles\n              bundleToRemove.mainEntryAsset == null\n            ) {\n              // If one bundle group removes a shared bundle, but the other *can* keep it, still remove because that shared bundle is pointless (only one source bundle)\n              removeBundle(bundleGraph, bundleIdToRemove, assetReference);\n              // Stop iterating through bundleToRemove's sourceBundles as the bundle has been removed.\n              break;\n            } else {\n              bundleGraph.removeEdge(sourceBundleId, bundleIdToRemove);\n            }\n          }\n          numBundlesContributingToPRL--;\n        }\n      }\n    }\n  }\n\n  function getBigIntFromContentKey(contentKey) {\n    let b = Buffer.alloc(64);\n    b.write(contentKey);\n    // $FlowFixMe Flow doesn't have BigInt types in this version\n    return b.readBigInt64BE();\n  }\n  // Fix asset order in source bundles as they are likely now incorrect after shared bundle deletion\n  if (modifiedSourceBundles.size > 0) {\n    let assetOrderMap = new Map(assets.map((a, index) => [a, index]));\n\n    for (let bundle of modifiedSourceBundles) {\n      bundle.assets = new Set(\n        [...bundle.assets].sort((a, b) => {\n          let aIndex = nullthrows(assetOrderMap.get(a));\n          let bIndex = nullthrows(assetOrderMap.get(b));\n\n          return aIndex - bIndex;\n        }),\n      );\n    }\n  }\n  function deleteBundle(bundleRoot: BundleRoot) {\n    bundleGraph.removeNode(nullthrows(bundles.get(bundleRoot.id)));\n    bundleRoots.delete(bundleRoot);\n    bundles.delete(bundleRoot.id);\n    let bundleRootId = assetToBundleRootNodeId.get(bundleRoot);\n    if (bundleRootId != null && bundleRootGraph.hasNode(bundleRootId)) {\n      bundleRootGraph.removeNode(bundleRootId);\n    }\n  }\n  function getBundlesForBundleGroup(bundleGroupId) {\n    let bundlesInABundleGroup = [];\n    bundleGraph.traverse(nodeId => {\n      bundlesInABundleGroup.push(nodeId);\n    }, bundleGroupId);\n    return bundlesInABundleGroup;\n  }\n\n  function getBundleFromBundleRoot(bundleRoot: BundleRoot): Bundle {\n    let bundle = bundleGraph.getNode(\n      nullthrows(bundleRoots.get(bundleRoot))[0],\n    );\n    invariant(bundle !== 'root' && bundle != null);\n    return bundle;\n  }\n\n  function addAssetToBundleRoot(asset: Asset, bundleRoot: Asset) {\n    let [bundleId, bundleGroupId] = nullthrows(bundleRoots.get(bundleRoot));\n    let bundle = nullthrows(bundleGraph.getNode(bundleId));\n    invariant(bundle !== 'root');\n\n    if (\n      asset.type !== bundle.type ||\n      asset.env.context !== bundle.env.context\n    ) {\n      let bundleGroup = nullthrows(bundleGraph.getNode(bundleGroupId));\n      invariant(bundleGroup !== 'root');\n      let key =\n        nullthrows(bundleGroup.mainEntryAsset).id +\n        '.' +\n        asset.env.context +\n        '.' +\n        asset.type;\n      let typeChangeBundleId = bundles.get(key);\n      if (typeChangeBundleId == null) {\n        let typeChangeBundle = createBundle({\n          uniqueKey: key,\n          needsStableName:\n            asset.env.context !== bundle.env.context\n              ? false\n              : bundle.needsStableName,\n          type: asset.type,\n          target: bundle.target,\n          env: asset.env,\n        });\n        typeChangeBundleId = bundleGraph.addNode(typeChangeBundle);\n        bundleGraph.addEdge(bundleId, typeChangeBundleId);\n        bundles.set(key, typeChangeBundleId);\n        bundle = typeChangeBundle;\n      } else {\n        bundle = nullthrows(bundleGraph.getNode(typeChangeBundleId));\n        invariant(bundle !== 'root');\n      }\n    }\n\n    bundle.assets.add(asset);\n    bundle.size += asset.stats.size;\n    assignInlineConstants(asset, bundle);\n  }\n\n  function removeBundle(\n    bundleGraph: Graph<Bundle | 'root'>,\n    bundleId: NodeId,\n    assetReference: DefaultMap<Asset, Array<[Dependency, Bundle]>>,\n  ) {\n    let bundle = nullthrows(bundleGraph.getNode(bundleId));\n    invariant(bundle !== 'root');\n    for (let asset of bundle.assets) {\n      assetReference.set(\n        asset,\n        assetReference.get(asset).filter(t => !t.includes(bundle)),\n      );\n      for (let sourceBundleId of bundle.sourceBundles) {\n        let sourceBundle = nullthrows(bundleGraph.getNode(sourceBundleId));\n        invariant(sourceBundle !== 'root');\n        addAssetToBundleRoot(asset, nullthrows(sourceBundle.mainEntryAsset));\n      }\n    }\n\n    bundleGraph.removeNode(bundleId);\n  }\n\n  return {\n    assets,\n    bundleGraph,\n    dependencyBundleGraph,\n    bundleGroupBundleIds,\n    assetReference,\n    manualAssetToBundle,\n  };\n}\n\nconst CONFIG_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    http: {\n      type: 'number',\n      enum: Object.keys(HTTP_OPTIONS).map(k => Number(k)),\n    },\n    manualSharedBundles: {\n      type: 'array',\n      items: {\n        type: 'object',\n        properties: {\n          name: {\n            type: 'string',\n          },\n          assets: {\n            type: 'array',\n            items: {\n              type: 'string',\n            },\n          },\n          types: {\n            type: 'array',\n            items: {\n              type: 'string',\n            },\n          },\n          root: {\n            type: 'string',\n          },\n          split: {\n            type: 'number',\n          },\n        },\n        required: ['name', 'assets'],\n        additionalProperties: false,\n      },\n    },\n    minBundles: {\n      type: 'number',\n    },\n    minBundleSize: {\n      type: 'number',\n    },\n    maxParallelRequests: {\n      type: 'number',\n    },\n    disableSharedBundles: {\n      type: 'boolean',\n    },\n  },\n  additionalProperties: false,\n};\n\nfunction createBundle(opts: {|\n  uniqueKey?: string,\n  target: Target,\n  asset?: Asset,\n  env?: Environment,\n  type?: string,\n  needsStableName?: boolean,\n  bundleBehavior?: ?BundleBehavior,\n  manualSharedBundle?: ?string,\n|}): Bundle {\n  if (opts.asset == null) {\n    return {\n      uniqueKey: opts.uniqueKey,\n      assets: new Set(),\n      mainEntryAsset: null,\n      size: 0,\n      sourceBundles: new Set(),\n      target: opts.target,\n      type: nullthrows(opts.type),\n      env: nullthrows(opts.env),\n      needsStableName: Boolean(opts.needsStableName),\n      bundleBehavior: opts.bundleBehavior,\n      manualSharedBundle: opts.manualSharedBundle,\n    };\n  }\n\n  let asset = nullthrows(opts.asset);\n  return {\n    uniqueKey: opts.uniqueKey,\n    assets: new Set([asset]),\n    mainEntryAsset: asset,\n    size: asset.stats.size,\n    sourceBundles: new Set(),\n    target: opts.target,\n    type: opts.type ?? asset.type,\n    env: opts.env ?? asset.env,\n    needsStableName: Boolean(opts.needsStableName),\n    bundleBehavior: opts.bundleBehavior ?? asset.bundleBehavior,\n    manualSharedBundle: opts.manualSharedBundle,\n  };\n}\n\nfunction resolveModeConfig(\n  config: BundlerConfig,\n  mode: BuildMode,\n): BaseBundlerConfig {\n  let generalConfig = {};\n  let modeConfig = {};\n\n  for (const key of Object.keys(config)) {\n    if (key === 'development' || key === 'production') {\n      if (key === mode) {\n        modeConfig = config[key];\n      }\n    } else {\n      generalConfig[key] = config[key];\n    }\n  }\n\n  // $FlowFixMe Not sure how to convince flow here...\n  return {\n    ...generalConfig,\n    ...modeConfig,\n  };\n}\n\nasync function loadBundlerConfig(\n  config: Config,\n  options: PluginOptions,\n  logger: PluginLogger,\n): Promise<ResolvedBundlerConfig> {\n  let conf = await config.getConfig<BundlerConfig>([], {\n    packageKey: '@parcel/bundler-default',\n  });\n\n  if (!conf) {\n    const modDefault = {\n      ...HTTP_OPTIONS['2'],\n      projectRoot: options.projectRoot,\n    };\n    return modDefault;\n  }\n\n  invariant(conf?.contents != null);\n\n  let modeConfig = resolveModeConfig(conf.contents, options.mode);\n\n  // minBundles will be ignored if shared bundles are disabled\n  if (\n    modeConfig.minBundles != null &&\n    modeConfig.disableSharedBundles === true\n  ) {\n    logger.warn({\n      origin: '@parcel/bundler-default',\n      message: `The value of \"${modeConfig.minBundles}\" set for minBundles will not be used as shared bundles have been disabled`,\n    });\n  }\n\n  // minBundleSize will be ignored if shared bundles are disabled\n  if (\n    modeConfig.minBundleSize != null &&\n    modeConfig.disableSharedBundles === true\n  ) {\n    logger.warn({\n      origin: '@parcel/bundler-default',\n      message: `The value of \"${modeConfig.minBundleSize}\" set for minBundleSize will not be used as shared bundles have been disabled`,\n    });\n  }\n\n  // maxParallelRequests will be ignored if shared bundles are disabled\n  if (\n    modeConfig.maxParallelRequests != null &&\n    modeConfig.disableSharedBundles === true\n  ) {\n    logger.warn({\n      origin: '@parcel/bundler-default',\n      message: `The value of \"${modeConfig.maxParallelRequests}\" set for maxParallelRequests will not be used as shared bundles have been disabled`,\n    });\n  }\n\n  if (modeConfig.manualSharedBundles) {\n    let nameArray = modeConfig.manualSharedBundles.map(a => a.name);\n    let nameSet = new Set(nameArray);\n    invariant(\n      nameSet.size == nameArray.length,\n      'The name field must be unique for property manualSharedBundles',\n    );\n  }\n\n  validateSchema.diagnostic(\n    CONFIG_SCHEMA,\n    {\n      data: modeConfig,\n      source: await options.inputFS.readFile(conf.filePath, 'utf8'),\n      filePath: conf.filePath,\n      prependKey: `/${encodeJSONKeyComponent('@parcel/bundler-default')}`,\n    },\n    '@parcel/bundler-default',\n    'Invalid config for @parcel/bundler-default',\n  );\n\n  let http = modeConfig.http ?? 2;\n  let defaults = HTTP_OPTIONS[http];\n\n  return {\n    minBundles: modeConfig.minBundles ?? defaults.minBundles,\n    minBundleSize: modeConfig.minBundleSize ?? defaults.minBundleSize,\n    maxParallelRequests:\n      modeConfig.maxParallelRequests ?? defaults.maxParallelRequests,\n    projectRoot: options.projectRoot,\n    disableSharedBundles:\n      modeConfig.disableSharedBundles ?? defaults.disableSharedBundles,\n    manualSharedBundles:\n      modeConfig.manualSharedBundles ?? defaults.manualSharedBundles,\n  };\n}\n\nfunction getEntryByTarget(\n  bundleGraph: MutableBundleGraph,\n): DefaultMap<string, Map<Asset, Dependency>> {\n  // Find entries from assetGraph per target\n  let targets: DefaultMap<string, Map<Asset, Dependency>> = new DefaultMap(\n    () => new Map(),\n  );\n  bundleGraph.traverse({\n    enter(node, context, actions) {\n      if (node.type !== 'asset') {\n        return node;\n      }\n      invariant(\n        context != null &&\n          context.type === 'dependency' &&\n          context.value.isEntry &&\n          context.value.target != null,\n      );\n      targets\n        .get(context.value.target.loc?.filePath ?? context.value.target.distDir)\n        .set(node.value, context.value);\n      actions.skipChildren();\n      return node;\n    },\n  });\n  return targets;\n}\n"
  },
  {
    "path": "packages/bundlers/library/package.json",
    "content": "{\n  \"name\": \"@parcel/bundler-library\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/LibraryBundler.js\",\n  \"source\": \"src/LibraryBundler.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/bundlers/library/src/LibraryBundler.js",
    "content": "// @flow strict-local\nimport {Bundler} from '@parcel/plugin';\nimport nullthrows from 'nullthrows';\n\n// This bundler plugin is designed specifically for library builds. It outputs a bundle for\n// each input asset, which ensures that the library can be effectively tree shaken and code\n// split by an application bundler.\nexport default (new Bundler({\n  bundle({bundleGraph}) {\n    // Collect dependencies from the graph.\n    // We do not want to mutate the graph while traversing, so this must be done first.\n    let dependencies = [];\n    let entryDeps = [];\n    bundleGraph.traverse((node, context) => {\n      if (node.type === 'dependency') {\n        let dependency = node.value;\n        if (bundleGraph.isDependencySkipped(dependency)) {\n          return;\n        }\n        let assets = bundleGraph.getDependencyAssets(dependency);\n        dependencies.push([\n          dependency,\n          nullthrows(dependency.target ?? context),\n          assets,\n        ]);\n        if (dependency.target) {\n          entryDeps.push(dependency);\n          return dependency.target;\n        }\n      }\n    });\n\n    let bundleGroupsByTarget = new Map();\n    for (let dep of entryDeps) {\n      let target = nullthrows(dep.target);\n      let bundleGroup = bundleGraph.createBundleGroup(dep, target);\n      bundleGroupsByTarget.set(target, bundleGroup);\n    }\n\n    // Create bundles for each asset.\n    let bundles = new Map();\n    for (let [dependency, target, assets] of dependencies) {\n      if (assets.length === 0) {\n        continue;\n      }\n\n      let parentAsset = bundleGraph.getAssetWithDependency(dependency);\n      let parentBundle;\n      if (parentAsset) {\n        let parentKey = getBundleKey(parentAsset, target);\n        parentBundle = bundles.get(parentKey);\n      }\n\n      // Create a separate bundle group/bundle for each asset.\n      for (let asset of assets) {\n        let key = getBundleKey(asset, target);\n        let bundle = bundles.get(key);\n        if (!bundle) {\n          let bundleGroup = nullthrows(bundleGroupsByTarget.get(target));\n          bundle = bundleGraph.createBundle({\n            entryAsset: asset,\n            needsStableName: dependency.isEntry,\n            target,\n            bundleBehavior: dependency.bundleBehavior ?? asset.bundleBehavior,\n          });\n          bundleGraph.addBundleToBundleGroup(bundle, bundleGroup);\n          bundles.set(key, bundle);\n        }\n\n        if (!bundle.hasAsset(asset)) {\n          bundleGraph.addAssetToBundle(asset, bundle);\n        }\n\n        // Reference the parent bundle so we create dependencies between them.\n        if (parentBundle && parentBundle !== bundle) {\n          bundleGraph.createBundleReference(parentBundle, bundle);\n          bundleGraph.createAssetReference(dependency, asset, bundle);\n        }\n      }\n    }\n  },\n  optimize() {},\n}): Bundler);\n\nfunction getBundleKey(asset, target) {\n  // Group by type and file path so CSS generated by macros is combined together by parent JS file.\n  // Also group by environment/target to ensure bundles cannot be shared between packages.\n  return `${asset.type}:${asset.filePath}:${asset.env.id}:${\n    target.loc?.filePath ?? target.distDir\n  }`;\n}\n"
  },
  {
    "path": "packages/compressors/brotli/package.json",
    "content": "{\n  \"name\": \"@parcel/compressor-brotli\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/BrotliCompressor.js\",\n  \"source\": \"src/BrotliCompressor.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/compressors/brotli/src/BrotliCompressor.js",
    "content": "// @flow strict-local\nimport {Compressor} from '@parcel/plugin';\nimport zlib from 'zlib';\n\nexport default (new Compressor({\n  compress({options, stream}) {\n    if (options.mode !== 'production') {\n      return null;\n    }\n\n    return {\n      stream: stream.pipe(\n        zlib.createBrotliCompress({\n          [zlib.constants.BROTLI_PARAM_QUALITY]:\n            zlib.constants.BROTLI_MAX_QUALITY,\n        }),\n      ),\n      type: 'br',\n    };\n  },\n}): Compressor);\n"
  },
  {
    "path": "packages/compressors/gzip/package.json",
    "content": "{\n  \"name\": \"@parcel/compressor-gzip\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/GzipCompressor.js\",\n  \"source\": \"src/GzipCompressor.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/compressors/gzip/src/GzipCompressor.js",
    "content": "// @flow strict-local\nimport {Compressor} from '@parcel/plugin';\nimport zlib from 'zlib';\n\nexport default (new Compressor({\n  compress({options, stream}) {\n    if (options.mode !== 'production') {\n      return null;\n    }\n\n    return {\n      stream: stream.pipe(zlib.createGzip({level: 9})),\n      type: 'gz',\n    };\n  },\n}): Compressor);\n"
  },
  {
    "path": "packages/compressors/raw/package.json",
    "content": "{\n  \"name\": \"@parcel/compressor-raw\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/RawCompressor.js\",\n  \"source\": \"src/RawCompressor.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/compressors/raw/src/RawCompressor.js",
    "content": "// @flow\nimport {Compressor} from '@parcel/plugin';\n\nexport default (new Compressor({\n  compress({stream}) {\n    return {stream};\n  },\n}): Compressor);\n"
  },
  {
    "path": "packages/configs/default/index.json",
    "content": "{\n  \"bundler\": \"@parcel/bundler-default\",\n  \"transformers\": {\n    \"types:*.{ts,tsx}\": [\"@parcel/transformer-typescript-types\"],\n    \"bundle-text:*\": [\"...\", \"@parcel/transformer-inline-string\"],\n    \"data-url:*\": [\"...\", \"@parcel/transformer-inline-string\"],\n    \"worklet:*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}\": [\n      \"@parcel/transformer-worklet\",\n      \"...\"\n    ],\n    \"react-static:*\": [\"@parcel/transformer-react-static\", \"...\"],\n    \"*.mdx\": [\n      // For backward compatibility, include the old transformer\n      // so it is used if already installed in the project.\n      // Otherwise, the JS transformer will handle MDX.\n      \"@parcel/transformer-mdx\",\n      \"@parcel/transformer-js\"\n    ],\n    \"*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}\": [\n      \"@parcel/transformer-babel\",\n      \"@parcel/transformer-js\",\n      \"@parcel/transformer-react-refresh-wrap\"\n    ],\n    \"*.{json,json5}\": [\"@parcel/transformer-json\"],\n    \"*.jsonld\": [\"@parcel/transformer-jsonld\"],\n    \"*.toml\": [\"@parcel/transformer-toml\"],\n    \"*.webmanifest\": [\"@parcel/transformer-webmanifest\"],\n    \"webmanifest:*.{json,webmanifest}\": [\"@parcel/transformer-webmanifest\"],\n    \"*.{yaml,yml}\": [\"@parcel/transformer-yaml\"],\n    \"*.{glsl,vert,frag}\": [\"@parcel/transformer-glsl\"],\n    \"*.{gql,graphql}\": [\"@parcel/transformer-graphql\"],\n    \"*.{styl,stylus}\": [\"@parcel/transformer-stylus\"],\n    \"*.{sass,scss}\": [\"@parcel/transformer-sass\"],\n    \"*.less\": [\"@parcel/transformer-less\"],\n    \"*.{css,pcss}\": [\"@parcel/transformer-postcss\", \"@parcel/transformer-css\"],\n    \"*.sss\": [\"@parcel/transformer-sugarss\"],\n    \"*.{htm,html,xhtml}\": [\n      \"@parcel/transformer-posthtml\",\n      \"@parcel/transformer-html\"\n    ],\n    \"*.pug\": [\"@parcel/transformer-pug\"],\n    \"*.coffee\": [\"@parcel/transformer-coffeescript\"],\n    \"*.elm\": [\"@parcel/transformer-elm\"],\n    \"*.vue\": [\"@parcel/transformer-vue\"],\n    \"template:*.vue\": [\"@parcel/transformer-vue\"],\n    \"script:*.vue\": [\"@parcel/transformer-vue\"],\n    \"style:*.vue\": [\"@parcel/transformer-vue\"],\n    \"custom:*.vue\": [\"@parcel/transformer-vue\"],\n    \"*.{png,jpg,jpeg,webp,gif,tiff,avif,heic,heif}\": [\n      \"@parcel/transformer-image\"\n    ],\n    \"*.svg\": [\"@parcel/transformer-svg\"],\n    \"*.{xml,rss,atom}\": [\"@parcel/transformer-xml\"],\n    \"*.node\": [\"@parcel/transformer-node\"],\n    \"url:*\": [\"...\", \"@parcel/transformer-raw\"]\n  },\n  \"namers\": [\"@parcel/namer-default\"],\n  \"runtimes\": [\n    \"@parcel/runtime-rsc\",\n    \"@parcel/runtime-js\",\n    \"@parcel/runtime-browser-hmr\",\n    \"@parcel/runtime-service-worker\"\n  ],\n  \"optimizers\": {\n    \"data-url:*\": [\"...\", \"@parcel/optimizer-data-url\"],\n    \"*.css\": [\"@parcel/optimizer-css\"],\n    \"*.{html,xhtml}\": [\"@parcel/optimizer-html\"],\n    \"*.{js,mjs,cjs}\": [\"@parcel/optimizer-swc\"],\n    \"*.svg\": [\"@parcel/optimizer-svg\"],\n    \"*.{jpg,jpeg,png}\": [\"@parcel/optimizer-image\"]\n  },\n  \"packagers\": {\n    \"react-static:*.html\": \"@parcel/packager-react-static\",\n    \"*.{html,xhtml}\": \"@parcel/packager-html\",\n    \"*.css\": \"@parcel/packager-css\",\n    \"*.{js,mjs,cjs}\": \"@parcel/packager-js\",\n    \"*.svg\": \"@parcel/packager-svg\",\n    \"*.{xml,rss,atom}\": \"@parcel/packager-xml\",\n    \"*.ts\": \"@parcel/packager-ts\",\n    \"*.wasm\": \"@parcel/packager-wasm\",\n    \"*.{jsonld,svg,webmanifest}\": \"@parcel/packager-raw-url\",\n    \"*\": \"@parcel/packager-raw\"\n  },\n  \"compressors\": {\n    \"*\": [\"@parcel/compressor-raw\"]\n  },\n  \"resolvers\": [\"@parcel/resolver-default\"],\n  \"reporters\": [\"@parcel/reporter-dev-server\"]\n}\n"
  },
  {
    "path": "packages/configs/default/package.json",
    "content": "{\n  \"name\": \"@parcel/config-default\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"index.json\",\n  \"scripts\": {\n    \"test-ci\": \"mocha\"\n  },\n  \"dependencies\": {\n    \"@parcel/bundler-default\": \"2.16.4\",\n    \"@parcel/compressor-raw\": \"2.16.4\",\n    \"@parcel/namer-default\": \"2.16.4\",\n    \"@parcel/optimizer-css\": \"2.16.4\",\n    \"@parcel/optimizer-html\": \"2.16.4\",\n    \"@parcel/optimizer-image\": \"2.16.4\",\n    \"@parcel/optimizer-svg\": \"2.16.4\",\n    \"@parcel/optimizer-swc\": \"2.16.4\",\n    \"@parcel/packager-css\": \"2.16.4\",\n    \"@parcel/packager-html\": \"2.16.4\",\n    \"@parcel/packager-js\": \"2.16.4\",\n    \"@parcel/packager-raw\": \"2.16.4\",\n    \"@parcel/packager-svg\": \"2.16.4\",\n    \"@parcel/packager-wasm\": \"2.16.4\",\n    \"@parcel/reporter-dev-server\": \"2.16.4\",\n    \"@parcel/resolver-default\": \"2.16.4\",\n    \"@parcel/runtime-browser-hmr\": \"2.16.4\",\n    \"@parcel/runtime-js\": \"2.16.4\",\n    \"@parcel/runtime-rsc\": \"2.16.4\",\n    \"@parcel/runtime-service-worker\": \"2.16.4\",\n    \"@parcel/transformer-babel\": \"2.16.4\",\n    \"@parcel/transformer-css\": \"2.16.4\",\n    \"@parcel/transformer-html\": \"2.16.4\",\n    \"@parcel/transformer-image\": \"2.16.4\",\n    \"@parcel/transformer-js\": \"2.16.4\",\n    \"@parcel/transformer-json\": \"2.16.4\",\n    \"@parcel/transformer-node\": \"2.16.4\",\n    \"@parcel/transformer-postcss\": \"2.16.4\",\n    \"@parcel/transformer-posthtml\": \"2.16.4\",\n    \"@parcel/transformer-raw\": \"2.16.4\",\n    \"@parcel/transformer-react-refresh-wrap\": \"2.16.4\",\n    \"@parcel/transformer-svg\": \"2.16.4\"\n  },\n  \"parcelDependencies\": {\n    \"@parcel/optimizer-data-url\": \"2.16.4\",\n    \"@parcel/packager-raw-url\": \"2.16.4\",\n    \"@parcel/packager-react-static\": \"2.16.4\",\n    \"@parcel/packager-ts\": \"2.16.4\",\n    \"@parcel/packager-xml\": \"2.16.4\",\n    \"@parcel/transformer-coffeescript\": \"2.16.4\",\n    \"@parcel/transformer-elm\": \"2.16.4\",\n    \"@parcel/transformer-glsl\": \"2.16.4\",\n    \"@parcel/transformer-graphql\": \"2.16.4\",\n    \"@parcel/transformer-inline-string\": \"2.16.4\",\n    \"@parcel/transformer-jsonld\": \"2.16.4\",\n    \"@parcel/transformer-less\": \"2.16.4\",\n    \"@parcel/transformer-pug\": \"2.16.4\",\n    \"@parcel/transformer-react-static\": \"2.16.4\",\n    \"@parcel/transformer-sass\": \"2.16.4\",\n    \"@parcel/transformer-stylus\": \"2.16.4\",\n    \"@parcel/transformer-sugarss\": \"2.16.4\",\n    \"@parcel/transformer-toml\": \"2.16.4\",\n    \"@parcel/transformer-typescript-types\": \"2.16.4\",\n    \"@parcel/transformer-vue\": \"2.16.4\",\n    \"@parcel/transformer-webmanifest\": \"2.16.4\",\n    \"@parcel/transformer-worklet\": \"2.16.4\",\n    \"@parcel/transformer-xml\": \"2.16.4\",\n    \"@parcel/transformer-yaml\": \"2.16.4\"\n  },\n  \"optionalParcelDependencies\": [\n    \"@parcel/transformer-mdx\"\n  ],\n  \"peerDependencies\": {\n    \"@parcel/core\": \"^2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/configs/default/test/.babelrc",
    "content": "{\n  \"presets\": [\"@parcel/babel-preset\"]\n}\n"
  },
  {
    "path": "packages/configs/default/test/config.test.js",
    "content": "// @flow\n\nimport assert from 'assert';\n\nimport packageJson from '../package.json';\nimport json5 from 'json5';\nimport fs from 'fs';\n\ndescribe('@parcel/config-default', () => {\n  let packageJsonDependencyNames: Set<string>;\n  let configPackageReferences: Set<string>;\n\n  before(() => {\n    packageJsonDependencyNames = new Set([\n      ...Object.keys(packageJson.dependencies || {}),\n      ...Object.keys(packageJson.parcelDependencies || {}),\n      ...packageJson.optionalParcelDependencies,\n    ]);\n    let config = json5.parse(\n      fs.readFileSync(__dirname + '/../index.json', 'utf8'),\n    );\n    configPackageReferences = collectConfigPackageReferences(config);\n  });\n\n  describe('package.json', () => {\n    it('includes every package referenced in the config', () => {\n      let missingReferences = [];\n      for (let reference of configPackageReferences) {\n        if (!packageJsonDependencyNames.has(reference)) {\n          missingReferences.push(reference);\n        }\n      }\n\n      // Assert with deepEqual rather than e.g. missingReferences.size as the\n      // assertion message with deepEqual enumerates the differences nicely\n      assert.deepEqual(missingReferences, []);\n    });\n\n    it('does not include packages not referenced in the config', () => {\n      let unnecessaryDependencies = [];\n      for (let dependency of packageJsonDependencyNames) {\n        if (!configPackageReferences.has(dependency)) {\n          unnecessaryDependencies.push(dependency);\n        }\n      }\n\n      assert.deepEqual(unnecessaryDependencies, []);\n    });\n  });\n});\n\nfunction collectConfigPackageReferences(\n  configSection: mixed,\n  references: Set<string> = new Set(),\n): Set<string> {\n  if (configSection == null || typeof configSection !== 'object') {\n    throw new TypeError('Expected config section to be an object or an array');\n  }\n\n  for (let value of Object.values(configSection)) {\n    if (typeof value === 'string') {\n      if (value === '...') {\n        continue;\n      }\n\n      references.add(value);\n    } else if (configSection != null && typeof configSection === 'object') {\n      collectConfigPackageReferences(value, references);\n    } else {\n      throw new Error(\n        'Parcel configs must contain only strings, arrays, or objects in value positions',\n      );\n    }\n  }\n\n  return references;\n}\n"
  },
  {
    "path": "packages/configs/repl/index.json",
    "content": "{\n  \"bundler\": \"@parcel/bundler-default\",\n  \"transformers\": {\n    \"bundle-text:*\": [\"@parcel/transformer-inline-string\", \"...\"],\n    \"*.{js,mjs,jsm,jsx,es6,ts,tsx}\": [\n      \"@parcel/transformer-babel\",\n      \"@parcel/transformer-js\",\n      \"@parcel/transformer-react-refresh-wrap\"\n    ],\n    \"*.{json,json5}\": [\"@parcel/transformer-json\"],\n    \"*.css\": [\"@parcel/transformer-postcss\", \"@parcel/transformer-css\"],\n    \"*.{htm,html}\": [\n      \"@parcel/transformer-posthtml\",\n      \"@parcel/transformer-html\"\n    ],\n    \"url:*\": [\"@parcel/transformer-raw\"]\n  },\n  \"namers\": [\"@parcel/namer-default\"],\n  \"runtimes\": [\"@parcel/runtime-js\", \"@parcel/runtime-browser-hmr\"],\n  \"optimizers\": {\n    \"*.{js,mjs,cjs}\": [\"@parcel/optimizer-terser\"],\n    \"*.css\": [\"@parcel/optimizer-css\"]\n  },\n  \"packagers\": {\n    \"*.{html,xhtml}\": \"@parcel/packager-html\",\n    \"*.css\": \"@parcel/packager-css\",\n    \"*.{js,mjs,cjs}\": \"@parcel/packager-js\",\n    \"*\": \"@parcel/packager-raw\"\n  },\n  \"compressors\": {\n    \"*\": [\"@parcel/compressor-raw\"]\n  },\n  \"resolvers\": [\"@parcel/resolver-repl-runtimes\", \"@parcel/resolver-default\"],\n  \"reporters\": [\"@parcel/reporter-dev-server-sw\"]\n}\n"
  },
  {
    "path": "packages/configs/repl/package.json",
    "content": "{\n  \"name\": \"@parcel/config-repl\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"index.json\",\n  \"scripts\": {\n    \"test-ci\": \"mocha\"\n  },\n  \"dependencies\": {\n    \"@parcel/bundler-default\": \"2.16.4\",\n    \"@parcel/compressor-raw\": \"2.16.4\",\n    \"@parcel/namer-default\": \"2.16.4\",\n    \"@parcel/optimizer-terser\": \"2.16.4\",\n    \"@parcel/packager-css\": \"2.16.4\",\n    \"@parcel/packager-html\": \"2.16.4\",\n    \"@parcel/packager-js\": \"2.16.4\",\n    \"@parcel/packager-raw\": \"2.16.4\",\n    \"@parcel/reporter-dev-server-sw\": \"2.16.4\",\n    \"@parcel/reporter-json\": \"2.16.4\",\n    \"@parcel/resolver-default\": \"2.16.4\",\n    \"@parcel/resolver-repl-runtimes\": \"2.16.4\",\n    \"@parcel/runtime-browser-hmr\": \"2.16.4\",\n    \"@parcel/runtime-js\": \"2.16.4\",\n    \"@parcel/transformer-babel\": \"2.16.4\",\n    \"@parcel/transformer-css\": \"2.16.4\",\n    \"@parcel/transformer-html\": \"2.16.4\",\n    \"@parcel/transformer-inline-string\": \"2.16.4\",\n    \"@parcel/transformer-js\": \"2.16.4\",\n    \"@parcel/transformer-json\": \"2.16.4\",\n    \"@parcel/transformer-postcss\": \"2.16.4\",\n    \"@parcel/transformer-posthtml\": \"2.16.4\",\n    \"@parcel/transformer-raw\": \"2.16.4\",\n    \"@parcel/transformer-react-refresh-wrap\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/configs/webextension/index.json",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"manifest.json\": [\"@parcel/transformer-webextension\"],\n    \"raw:*\": [\"@parcel/transformer-raw\"]\n  },\n  \"runtimes\": [\"...\", \"@parcel/runtime-webextension\"],\n  \"packagers\": {\n    \"manifest.json\": \"@parcel/packager-webextension\"\n  }\n}\n"
  },
  {
    "path": "packages/configs/webextension/package.json",
    "content": "{\n  \"name\": \"@parcel/config-webextension\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"index.json\",\n  \"dependencies\": {\n    \"@parcel/config-default\": \"2.16.4\",\n    \"@parcel/packager-webextension\": \"2.16.4\",\n    \"@parcel/runtime-webextension\": \"2.16.4\",\n    \"@parcel/transformer-raw\": \"2.16.4\",\n    \"@parcel/transformer-webextension\": \"2.16.4\"\n  },\n  \"peerDependencies\": {\n    \"@parcel/core\": \"^2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/core/cache/index.d.ts",
    "content": "import type {FilePath} from '@parcel/types';\nimport type {Cache} from './lib/types';\n\nexport type {Cache} from './lib/types';\nexport const FSCache: {\n  new (cacheDir: FilePath): Cache;\n};\n\nexport const LMDBCache: {\n  new (cacheDir: FilePath): Cache;\n};\n"
  },
  {
    "path": "packages/core/cache/package.json",
    "content": "{\n  \"name\": \"@parcel/cache\",\n  \"description\": \"Interface for defining caches and file-system, IDB and LMDB implementations.\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"types\": \"index.d.ts\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"scripts\": {\n    \"build-ts\": \"mkdir -p lib && flow-to-ts src/types.js > lib/types.d.ts\",\n    \"check-ts\": \"tsc --noEmit index.d.ts\"\n  },\n  \"dependencies\": {\n    \"@parcel/fs\": \"2.16.4\",\n    \"@parcel/logger\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"lmdb\": \"2.8.5\"\n  },\n  \"peerDependencies\": {\n    \"@parcel/core\": \"^2.16.4\"\n  },\n  \"devDependencies\": {\n    \"idb\": \"^5.0.8\"\n  },\n  \"browser\": {\n    \"./src/IDBCache.js\": \"./src/IDBCache.browser.js\",\n    \"./src/LMDBCache.js\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/cache/src/FSCache.js",
    "content": "// @flow strict-local\n\nimport type {Readable, Writable} from 'stream';\nimport type {FilePath} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {Cache} from './types';\n\nimport stream from 'stream';\nimport path from 'path';\nimport {promisify} from 'util';\nimport logger from '@parcel/logger';\nimport {serialize, deserialize, registerSerializableClass} from '@parcel/core';\n// flowlint-next-line untyped-import:off\nimport packageJson from '../package.json';\n\nconst pipeline: (Readable, Writable) => Promise<void> = promisify(\n  stream.pipeline,\n);\n\nexport class FSCache implements Cache {\n  fs: FileSystem;\n  dir: FilePath;\n\n  constructor(fs: FileSystem, cacheDir: FilePath) {\n    this.fs = fs;\n    this.dir = cacheDir;\n  }\n\n  async ensure(): Promise<void> {\n    // First, create the main cache directory if necessary.\n    await this.fs.mkdirp(this.dir);\n\n    // In parallel, create sub-directories for every possible hex value\n    // This speeds up large caches on many file systems since there are fewer files in a single directory.\n    let dirPromises = [];\n    for (let i = 0; i < 256; i++) {\n      dirPromises.push(\n        this.fs.mkdirp(path.join(this.dir, ('00' + i.toString(16)).slice(-2))),\n      );\n    }\n\n    await Promise.all(dirPromises);\n  }\n\n  _getCachePath(cacheId: string): FilePath {\n    return path.join(this.dir, cacheId.slice(0, 2), cacheId.slice(2));\n  }\n\n  getStream(key: string): Readable {\n    return this.fs.createReadStream(this._getCachePath(`${key}-large`));\n  }\n\n  setStream(key: string, stream: Readable): Promise<void> {\n    return pipeline(\n      stream,\n      this.fs.createWriteStream(this._getCachePath(`${key}-large`)),\n    );\n  }\n\n  has(key: string): Promise<boolean> {\n    return this.fs.exists(this._getCachePath(key));\n  }\n\n  getBlob(key: string): Promise<Buffer> {\n    return this.fs.readFile(this._getCachePath(key));\n  }\n\n  async setBlob(key: string, contents: Buffer | string): Promise<void> {\n    await this.fs.writeFile(this._getCachePath(key), contents);\n  }\n\n  async getBuffer(key: string): Promise<?Buffer> {\n    try {\n      return await this.fs.readFile(this._getCachePath(key));\n    } catch (err) {\n      if (err.code === 'ENOENT') {\n        return null;\n      } else {\n        throw err;\n      }\n    }\n  }\n\n  hasLargeBlob(key: string): Promise<boolean> {\n    return this.fs.exists(this._getCachePath(`${key}-large`));\n  }\n\n  getLargeBlob(key: string): Promise<Buffer> {\n    return this.fs.readFile(this._getCachePath(`${key}-large`));\n  }\n\n  async setLargeBlob(\n    key: string,\n    contents: Buffer | string,\n    options?: {|signal?: AbortSignal|},\n  ): Promise<void> {\n    await this.fs.writeFile(this._getCachePath(`${key}-large`), contents, {\n      signal: options?.signal,\n    });\n  }\n\n  async deleteLargeBlob(key: string): Promise<void> {\n    await this.fs.rimraf(this._getCachePath(`${key}-large`));\n  }\n\n  async get<T>(key: string): Promise<?T> {\n    try {\n      let data = await this.fs.readFile(this._getCachePath(key));\n      return deserialize(data);\n    } catch (err) {\n      if (err.code === 'ENOENT') {\n        return null;\n      } else {\n        throw err;\n      }\n    }\n  }\n\n  async set(key: string, value: mixed): Promise<void> {\n    try {\n      let blobPath = this._getCachePath(key);\n      let data = serialize(value);\n\n      await this.fs.writeFile(blobPath, data);\n    } catch (err) {\n      logger.error(err, '@parcel/cache');\n    }\n  }\n\n  refresh(): void {\n    // NOOP\n  }\n}\n\nregisterSerializableClass(`${packageJson.version}:FSCache`, FSCache);\n"
  },
  {
    "path": "packages/core/cache/src/IDBCache.browser.js",
    "content": "// @flow strict-local\nimport type {Cache} from './types';\n\nimport {Readable} from 'stream';\nimport {serialize, deserialize, registerSerializableClass} from '@parcel/core';\nimport {bufferStream} from '@parcel/utils';\n// $FlowFixMe[untyped-import]\nimport packageJson from '../package.json';\n// $FlowFixMe[untyped-import]\nimport {openDB} from 'idb';\n\nconst STORE_NAME = 'cache';\n\nexport class IDBCache implements Cache {\n  // $FlowFixMe\n  store: any;\n\n  constructor() {\n    this.store = openDB('REPL-parcel-cache', 1, {\n      upgrade(db) {\n        db.createObjectStore(STORE_NAME);\n      },\n      blocked() {},\n      blocking() {},\n      terminated() {},\n    });\n  }\n\n  ensure(): Promise<void> {\n    return Promise.resolve();\n  }\n\n  serialize(): {||} {\n    return {\n      /*::...null*/\n    };\n  }\n\n  static deserialize(): IDBCache {\n    return new IDBCache();\n  }\n\n  has(key: string): Promise<boolean> {\n    return Promise.resolve(this.store.get(key) != null);\n  }\n\n  async get<T>(key: string): Promise<?T> {\n    let data = await (await this.store).get(STORE_NAME, key);\n    if (data == null) {\n      return null;\n    }\n\n    return Promise.resolve(deserialize(data));\n  }\n\n  async set(key: string, value: mixed): Promise<void> {\n    await (await this.store).put(STORE_NAME, serialize(value), key);\n  }\n\n  getStream(key: string): Readable {\n    let dataPromise = this.store\n      .then(s => s.get(STORE_NAME, key))\n      .then(d => Buffer.from(d))\n      .catch(e => e);\n    const stream = new Readable({\n      // $FlowFixMe(incompatible-call)\n      async read() {\n        let data = await dataPromise;\n        if (data instanceof Error) {\n          stream.emit('error', data);\n        } else {\n          stream.push(Buffer.from(data));\n          stream.push(null);\n        }\n      },\n    });\n\n    return stream;\n  }\n\n  async setStream(key: string, stream: Readable): Promise<void> {\n    let buf = await bufferStream(stream);\n    await (await this.store).put(STORE_NAME, buf, key);\n  }\n\n  async getBlob(key: string): Promise<Buffer> {\n    let data = await (await this.store).get(STORE_NAME, key);\n    if (data == null) {\n      return Promise.reject(new Error(`Key ${key} not found in cache`));\n    }\n    return Buffer.from(data.buffer);\n  }\n\n  async setBlob(key: string, contents: Buffer | string): Promise<void> {\n    let data =\n      contents instanceof Uint8Array ? contents : Buffer.from(contents);\n    await (await this.store).put(STORE_NAME, data, key);\n  }\n\n  // async setBlobs(\n  //   entries: $ReadOnlyArray<[string, Buffer | string]>,\n  // ): Promise<void> {\n  //   const tx = (await this.store).transaction(STORE_NAME, 'readwrite');\n  //   await Promise.all([\n  //     ...entries.map(([key, value]) =>\n  //       tx.store.put(\n  //         value instanceof Uint8Array ? value : Buffer.from(value),\n  //         key,\n  //       ),\n  //     ),\n  //     tx.done,\n  //   ]);\n  // }\n\n  async getBuffer(key: string): Promise<?Buffer> {\n    let data = await (await this.store).get(STORE_NAME, key);\n    if (data == null) {\n      return null;\n    }\n\n    return Buffer.from(data.buffer);\n  }\n\n  hasLargeBlob(key: string): Promise<boolean> {\n    return this.has(key);\n  }\n\n  getLargeBlob(key: string): Promise<Buffer> {\n    return this.getBlob(key);\n  }\n\n  setLargeBlob(key: string, contents: Buffer | string): Promise<void> {\n    return this.setBlob(key, contents);\n  }\n\n  async deleteLargeBlob(key: string): Promise<void> {\n    await (await this.store).delete(STORE_NAME, key);\n  }\n\n  refresh(): void {\n    // NOOP\n  }\n}\n\nregisterSerializableClass(`${packageJson.version}:IDBCache`, IDBCache);\n"
  },
  {
    "path": "packages/core/cache/src/IDBCache.js",
    "content": "// @flow strict-local\nimport type {Cache} from './types';\n\n// $FlowFixMe\nexport class IDBCache implements Cache {\n  constructor() {\n    throw new Error('IDBCache is only supported in the browser');\n  }\n}\n"
  },
  {
    "path": "packages/core/cache/src/LMDBCache.js",
    "content": "// @flow strict-local\nimport type {FilePath} from '@parcel/types';\nimport type {Cache} from './types';\nimport type {Readable, Writable} from 'stream';\n\nimport stream from 'stream';\nimport path from 'path';\nimport {promisify} from 'util';\nimport {serialize, deserialize, registerSerializableClass} from '@parcel/core';\nimport {NodeFS} from '@parcel/fs';\n// flowlint-next-line untyped-import:off\nimport packageJson from '../package.json';\n// $FlowFixMe\nimport lmdb from 'lmdb';\n\nconst pipeline: (Readable, Writable) => Promise<void> = promisify(\n  stream.pipeline,\n);\n\nexport class LMDBCache implements Cache {\n  fs: NodeFS;\n  dir: FilePath;\n  // $FlowFixMe\n  store: any;\n\n  constructor(cacheDir: FilePath) {\n    this.fs = new NodeFS();\n    this.dir = cacheDir;\n\n    this.store = lmdb.open(cacheDir, {\n      name: 'parcel-cache',\n      encoding: 'binary',\n      compression: true,\n    });\n  }\n\n  ensure(): Promise<void> {\n    return Promise.resolve();\n  }\n\n  serialize(): {|dir: FilePath|} {\n    return {\n      dir: this.dir,\n    };\n  }\n\n  static deserialize(opts: {|dir: FilePath|}): LMDBCache {\n    return new LMDBCache(opts.dir);\n  }\n\n  has(key: string): Promise<boolean> {\n    return Promise.resolve(this.store.get(key) != null);\n  }\n\n  get<T>(key: string): Promise<?T> {\n    let data = this.store.get(key);\n    if (data == null) {\n      return Promise.resolve(null);\n    }\n\n    return Promise.resolve(deserialize(data));\n  }\n\n  async set(key: string, value: mixed): Promise<void> {\n    await this.setBlob(key, serialize(value));\n  }\n\n  getStream(key: string): Readable {\n    return this.fs.createReadStream(path.join(this.dir, key));\n  }\n\n  setStream(key: string, stream: Readable): Promise<void> {\n    return pipeline(\n      stream,\n      this.fs.createWriteStream(path.join(this.dir, key)),\n    );\n  }\n\n  getBlob(key: string): Promise<Buffer> {\n    let buffer = this.store.get(key);\n    return buffer != null\n      ? Promise.resolve(buffer)\n      : Promise.reject(new Error(`Key ${key} not found in cache`));\n  }\n\n  async setBlob(key: string, contents: Buffer | string): Promise<void> {\n    await this.store.put(key, contents);\n  }\n\n  getBuffer(key: string): Promise<?Buffer> {\n    return Promise.resolve(this.store.get(key));\n  }\n\n  hasLargeBlob(key: string): Promise<boolean> {\n    return this.fs.exists(path.join(this.dir, key));\n  }\n\n  // eslint-disable-next-line require-await\n  async getLargeBlob(key: string): Promise<Buffer> {\n    return this.fs.readFile(path.join(this.dir, key));\n  }\n\n  // eslint-disable-next-line require-await\n  async setLargeBlob(\n    key: string,\n    contents: Buffer | string,\n    options?: {|signal?: AbortSignal|},\n  ): Promise<void> {\n    await this.fs.writeFile(path.join(this.dir, key), contents, {\n      signal: options?.signal,\n    });\n  }\n\n  async deleteLargeBlob(key: string): Promise<void> {\n    await this.fs.rimraf(path.join(this.dir, key));\n  }\n\n  refresh(): void {\n    // Reset the read transaction for the store. This guarantees that\n    // the next read will see the latest changes to the store.\n    // Useful in scenarios where reads and writes are multi-threaded.\n    // See https://github.com/kriszyp/lmdb-js#resetreadtxn-void\n    this.store.resetReadTxn();\n  }\n}\n\nregisterSerializableClass(`${packageJson.version}:LMDBCache`, LMDBCache);\n"
  },
  {
    "path": "packages/core/cache/src/index.js",
    "content": "// @flow\nexport type {Cache} from './types';\nexport * from './LMDBCache';\nexport * from './FSCache';\nexport * from './IDBCache';\n"
  },
  {
    "path": "packages/core/cache/src/types.js",
    "content": "// @flow\nimport type {Cache} from '@parcel/types';\n\nexport type {Cache};\n"
  },
  {
    "path": "packages/core/codeframe/package.json",
    "content": "{\n  \"name\": \"@parcel/codeframe\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/codeframe.js\",\n  \"source\": \"src/codeframe.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"targets\": {\n    \"main\": {\n      \"includeNodeModules\": {\n        \"chalk\": false\n      }\n    }\n  },\n  \"dependencies\": {\n    \"chalk\": \"^4.1.2\"\n  },\n  \"devDependencies\": {\n    \"emphasize\": \"^4.2.0\",\n    \"slice-ansi\": \"^4.0.0\",\n    \"string-width\": \"^4.2.3\"\n  }\n}\n"
  },
  {
    "path": "packages/core/codeframe/src/codeframe.js",
    "content": "// @flow\nimport type {DiagnosticCodeHighlight} from '@parcel/diagnostic';\n\nimport chalk from 'chalk';\nimport emphasize from 'emphasize';\nimport stringWidth from 'string-width';\nimport sliceAnsi from 'slice-ansi';\n\ntype CodeFramePadding = {|\n  before: number,\n  after: number,\n|};\n\ntype CodeFrameOptionsInput = $Shape<CodeFrameOptions>;\n\ntype CodeFrameOptions = {|\n  useColor: boolean,\n  syntaxHighlighting: boolean,\n  maxLines: number,\n  padding: CodeFramePadding,\n  terminalWidth: number,\n  language?: string,\n|};\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nconst TAB_REPLACE_REGEX = /\\t/g;\nconst TAB_REPLACEMENT = '  ';\nconst DEFAULT_TERMINAL_WIDTH = 80;\n\nconst highlightSyntax = (txt: string, lang?: string): string => {\n  if (lang) {\n    try {\n      return emphasize.highlight(lang, txt).value;\n    } catch (e) {\n      // fallback for unknown languages...\n    }\n  }\n\n  return emphasize.highlightAuto(txt).value;\n};\n\nexport default function codeFrame(\n  code: string,\n  highlights: Array<DiagnosticCodeHighlight>,\n  inputOpts: CodeFrameOptionsInput = {},\n): string {\n  if (highlights.length < 1) return '';\n\n  let opts: CodeFrameOptions = {\n    useColor: !!inputOpts.useColor,\n    syntaxHighlighting: !!inputOpts.syntaxHighlighting,\n    language: inputOpts.language,\n    maxLines: inputOpts.maxLines ?? 12,\n    terminalWidth: inputOpts.terminalWidth || DEFAULT_TERMINAL_WIDTH,\n    padding: inputOpts.padding || {\n      before: 1,\n      after: 2,\n    },\n  };\n\n  // Highlights messages and prefixes when colors are enabled\n  const highlighter = (s: string, bold?: boolean) => {\n    if (opts.useColor) {\n      let redString = chalk.red(s);\n      return bold ? chalk.bold(redString) : redString;\n    }\n\n    return s;\n  };\n\n  // Prefix lines with the line number\n  const lineNumberPrefixer = (params: {|\n    lineNumber?: string,\n    lineNumberLength: number,\n    isHighlighted: boolean,\n  |}) => {\n    let {lineNumber, lineNumberLength, isHighlighted} = params;\n\n    return `${isHighlighted ? highlighter('>') : ' '} ${\n      lineNumber\n        ? lineNumber.padStart(lineNumberLength, ' ')\n        : ' '.repeat(lineNumberLength)\n    } | `;\n  };\n\n  // Make columns/lines start at 1\n  let originalHighlights = highlights;\n  highlights = highlights.map(h => {\n    return {\n      start: {\n        column: h.start.column - 1,\n        line: h.start.line - 1,\n      },\n      end: {\n        column: h.end.column - 1,\n        line: h.end.line - 1,\n      },\n      message: h.message,\n    };\n  });\n\n  // Find first and last highlight\n  let firstHighlight =\n    highlights.length > 1\n      ? highlights.sort((a, b) => a.start.line - b.start.line)[0]\n      : highlights[0];\n  let lastHighlight =\n    highlights.length > 1\n      ? highlights.sort((a, b) => b.end.line - a.end.line)[0]\n      : highlights[0];\n\n  // Calculate first and last line index of codeframe\n  let startLine = firstHighlight.start.line - opts.padding.before;\n  startLine = startLine < 0 ? 0 : startLine;\n  let endLineIndex = lastHighlight.end.line + opts.padding.after;\n  let tail;\n  if (endLineIndex - startLine > opts.maxLines) {\n    let maxLine = startLine + opts.maxLines - 1;\n    highlights = highlights.filter(h => h.start.line < maxLine);\n    lastHighlight = highlights[0];\n    endLineIndex = Math.min(\n      maxLine,\n      lastHighlight.end.line + opts.padding.after,\n    );\n    tail = originalHighlights.filter(h => h.start.line > endLineIndex);\n  }\n\n  let lineNumberLength = (endLineIndex + 1).toString(10).length;\n\n  // Split input into lines and highlight syntax\n  let lines = code.split(NEWLINE);\n  let visibleLines = lines\n    .slice(startLine, endLineIndex + 1)\n    .map(l => l.replace(TAB_REPLACE_REGEX, TAB_REPLACEMENT));\n  if (opts.syntaxHighlighting) {\n    visibleLines = highlightSyntax(\n      visibleLines.join('\\n'),\n      opts.language,\n    ).split(NEWLINE);\n  }\n  let syntaxHighlightedLines = lines\n    .slice(0, startLine)\n    .concat(visibleLines)\n    .concat(lines.slice(endLineIndex + 2));\n\n  // Loop over all lines and create codeframe\n  let resultLines = [];\n  for (\n    let currentLineIndex = startLine;\n    currentLineIndex < syntaxHighlightedLines.length;\n    currentLineIndex++\n  ) {\n    if (currentLineIndex > endLineIndex) break;\n    if (currentLineIndex > syntaxHighlightedLines.length - 1) break;\n\n    // Find highlights that need to get rendered on the current line\n    let lineHighlights = highlights\n      .filter(\n        highlight =>\n          highlight.start.line <= currentLineIndex &&\n          highlight.end.line >= currentLineIndex,\n      )\n      .sort(\n        (a, b) =>\n          (a.start.line < currentLineIndex ? 0 : a.start.column) -\n          (b.start.line < currentLineIndex ? 0 : b.start.column),\n      );\n\n    // Check if this line has a full line highlight\n    let isWholeLine =\n      lineHighlights.length &&\n      !!lineHighlights.find(\n        h => h.start.line < currentLineIndex && h.end.line > currentLineIndex,\n      );\n\n    let lineLengthLimit =\n      opts.terminalWidth > lineNumberLength + 7\n        ? opts.terminalWidth - (lineNumberLength + 5)\n        : 10;\n\n    // Split the line into line parts that will fit the provided terminal width\n    let colOffset = 0;\n    let lineEndCol = lineLengthLimit;\n    let syntaxHighlightedLine = syntaxHighlightedLines[currentLineIndex];\n    if (stringWidth(syntaxHighlightedLine) > lineLengthLimit) {\n      if (lineHighlights.length > 0) {\n        if (lineHighlights[0].start.line === currentLineIndex) {\n          colOffset = lineHighlights[0].start.column - 5;\n        } else if (lineHighlights[0].end.line === currentLineIndex) {\n          colOffset = lineHighlights[0].end.column - 5;\n        }\n      }\n\n      colOffset = colOffset > 0 ? colOffset : 0;\n      lineEndCol = colOffset + lineLengthLimit;\n\n      syntaxHighlightedLine = sliceAnsi(\n        syntaxHighlightedLine,\n        colOffset,\n        lineEndCol,\n      );\n    }\n\n    // Write the syntax highlighted line part\n    resultLines.push(\n      lineNumberPrefixer({\n        lineNumber: (currentLineIndex + 1).toString(10),\n        lineNumberLength,\n        isHighlighted: lineHighlights.length > 0,\n      }) + syntaxHighlightedLine,\n    );\n\n    let lineWidth = stringWidth(syntaxHighlightedLine);\n    let highlightLine = '';\n    if (isWholeLine) {\n      highlightLine = highlighter('^'.repeat(lineWidth));\n    } else if (lineHighlights.length > 0) {\n      let lastCol = 0;\n      let highlight = null;\n      let highlightHasEnded = false;\n\n      for (\n        let highlightIndex = 0;\n        highlightIndex < lineHighlights.length;\n        highlightIndex++\n      ) {\n        // Set highlight to current highlight\n        highlight = lineHighlights[highlightIndex];\n        highlightHasEnded = false;\n\n        // Calculate the startColumn and get the real width by doing a substring of the original\n        // line and replacing tabs with our tab replacement to support tab handling\n        let startCol = 0;\n        if (\n          highlight.start.line === currentLineIndex &&\n          highlight.start.column > colOffset\n        ) {\n          startCol = lines[currentLineIndex]\n            .substring(colOffset, highlight.start.column)\n            .replace(TAB_REPLACE_REGEX, TAB_REPLACEMENT).length;\n        }\n\n        // Calculate the endColumn and get the real width by doing a substring of the original\n        // line and replacing tabs with our tab replacement to support tab handling\n        let endCol = lineWidth - 1;\n        if (highlight.end.line === currentLineIndex) {\n          endCol = lines[currentLineIndex]\n            .substring(colOffset, highlight.end.column)\n            .replace(TAB_REPLACE_REGEX, TAB_REPLACEMENT).length;\n\n          // If the endCol is too big for this line part, trim it so we can handle it in the next one\n          if (endCol > lineWidth) {\n            endCol = lineWidth - 1;\n          }\n\n          highlightHasEnded = true;\n        }\n\n        // If endcol is smaller than lastCol it overlaps with another highlight and is no longer visible, we can skip those\n        if (endCol >= lastCol) {\n          let characters = endCol - startCol + 1;\n          if (startCol > lastCol) {\n            // startCol is before lastCol, so add spaces as padding before the highlight indicators\n            highlightLine += ' '.repeat(startCol - lastCol);\n          } else if (lastCol > startCol) {\n            // If last column is larger than the start, there's overlap in highlights\n            // This line adjusts the characters count to ensure we don't add too many characters\n            characters += startCol - lastCol;\n          }\n\n          // Don't crash (and swallow the original message) if the diagnostic is malformed (end is before start).\n          characters = Math.max(1, characters);\n\n          // Append the highlight indicators\n          highlightLine += highlighter('^'.repeat(characters));\n\n          // Set the lastCol equal to character count between start of line part and highlight end-column\n          lastCol = endCol + 1;\n        }\n\n        // There's no point in processing more highlights if we reached the end of the line\n        if (endCol >= lineEndCol - 1) {\n          break;\n        }\n      }\n\n      // Append the highlight message if the current highlights ends on this line part\n      if (highlight && highlight.message && highlightHasEnded) {\n        highlightLine += ' ' + highlighter(highlight.message, true);\n      }\n    }\n\n    if (highlightLine) {\n      resultLines.push(\n        lineNumberPrefixer({\n          lineNumberLength,\n          isHighlighted: true,\n        }) + highlightLine,\n      );\n    }\n  }\n\n  let result = resultLines.join('\\n');\n\n  if (tail && tail.length > 0) {\n    result += '\\n\\n' + codeFrame(code, tail, inputOpts);\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "packages/core/codeframe/test/codeframe.test.js",
    "content": "import assert from 'assert';\nimport {readFileSync} from 'fs';\nimport {join as joinPath} from 'path';\n\nimport codeframe from '../src/codeframe';\n\nconst LINE_END = '\\n';\n\ndescribe('codeframe', () => {\n  it('should create a codeframe', () => {\n    let codeframeString = codeframe(\n      'hello world',\n      [\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 1,\n            line: 1,\n          },\n        },\n        {\n          start: {\n            column: 3,\n            line: 1,\n          },\n          end: {\n            column: 5,\n            line: 1,\n          },\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   | ^ ^^^');\n  });\n\n  it('should create a codeframe with multiple lines', () => {\n    let codeframeString = codeframe(\n      'hello world\\nEnjoy this nice codeframe',\n      [\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 1,\n            line: 1,\n          },\n        },\n        {\n          start: {\n            column: 7,\n            line: 1,\n          },\n          end: {\n            column: 10,\n            line: 2,\n          },\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   | ^     ^^^^^');\n    assert.equal(lines[2], '> 2 | Enjoy this nice codeframe');\n    assert.equal(lines[3], '>   | ^^^^^^^^^^');\n  });\n\n  it('should handle unordered overlapping highlights properly', () => {\n    let codeframeString = codeframe(\n      'hello world\\nEnjoy this nice codeframe',\n      [\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 1,\n            line: 1,\n          },\n        },\n        {\n          start: {\n            column: 7,\n            line: 1,\n          },\n          end: {\n            column: 10,\n            line: 2,\n          },\n        },\n        {\n          start: {\n            column: 4,\n            line: 2,\n          },\n          end: {\n            column: 7,\n            line: 2,\n          },\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   | ^     ^^^^^');\n    assert.equal(lines[2], '> 2 | Enjoy this nice codeframe');\n    assert.equal(lines[3], '>   | ^^^^^^^^^^');\n  });\n\n  it('should handle partial overlapping highlights properly', () => {\n    let codeframeString = codeframe(\n      'hello world\\nEnjoy this nice codeframe',\n      [\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 1,\n            line: 1,\n          },\n        },\n        {\n          start: {\n            column: 7,\n            line: 1,\n          },\n          end: {\n            column: 10,\n            line: 2,\n          },\n        },\n        {\n          start: {\n            column: 4,\n            line: 2,\n          },\n          end: {\n            column: 12,\n            line: 2,\n          },\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   | ^     ^^^^^');\n    assert.equal(lines[2], '> 2 | Enjoy this nice codeframe');\n    assert.equal(lines[3], '>   | ^^^^^^^^^^^^');\n  });\n\n  it('should be able to render inline messages', () => {\n    let codeframeString = codeframe(\n      'hello world\\nEnjoy this nice codeframe',\n      [\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 6,\n            line: 1,\n          },\n          message: 'test',\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   | ^^^^^^ test');\n    assert.equal(lines[2], '  2 | Enjoy this nice codeframe');\n  });\n\n  it('should only render last inline message of a column', () => {\n    let codeframeString = codeframe(\n      'hello world\\nEnjoy this nice codeframe',\n      [\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 3,\n            line: 1,\n          },\n          message: 'test',\n        },\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 6,\n            line: 1,\n          },\n          message: 'this should be printed',\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   | ^^^^^^ this should be printed');\n    assert.equal(lines[2], '  2 | Enjoy this nice codeframe');\n  });\n\n  it('should only render last inline message of a column with space', () => {\n    let codeframeString = codeframe(\n      'hello world\\nEnjoy this nice codeframe',\n      [\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 1,\n            line: 1,\n          },\n          message: 'test',\n        },\n        {\n          start: {\n            column: 3,\n            line: 1,\n          },\n          end: {\n            column: 7,\n            line: 1,\n          },\n          message: 'this should be printed',\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   | ^ ^^^^^ this should be printed');\n    assert.equal(lines[2], '  2 | Enjoy this nice codeframe');\n  });\n\n  it('should only render last inline message of a column with multiple lines and space', () => {\n    let codeframeString = codeframe(\n      'hello world\\nEnjoy this nice codeframe\\nThis is another line',\n      [\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 1,\n            line: 1,\n          },\n          message: 'test',\n        },\n        {\n          start: {\n            column: 3,\n            line: 1,\n          },\n          end: {\n            column: 7,\n            line: 1,\n          },\n          message: 'this should be printed',\n        },\n        {\n          start: {\n            column: 3,\n            line: 2,\n          },\n          end: {\n            column: 7,\n            line: 3,\n          },\n          message: 'message line 2',\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   | ^ ^^^^^ this should be printed');\n    assert.equal(lines[2], '> 2 | Enjoy this nice codeframe');\n    assert.equal(lines[3], '>   |   ^^^^^^^^^^^^^^^^^^^^^^^');\n    assert.equal(lines[4], '> 3 | This is another line');\n    assert.equal(lines[5], '>   | ^^^^^^^ message line 2');\n  });\n\n  it('should only render last inline message of a column with multiple lines and space', () => {\n    let codeframeString = codeframe(\n      'hello world\\nEnjoy this nice codeframe\\nThis is another line',\n      [\n        {\n          start: {\n            column: 1,\n            line: 1,\n          },\n          end: {\n            column: 1,\n            line: 1,\n          },\n          message: 'test',\n        },\n        {\n          start: {\n            column: 3,\n            line: 1,\n          },\n          end: {\n            column: 7,\n            line: 1,\n          },\n          message: 'this should be printed',\n        },\n        {\n          start: {\n            column: 3,\n            line: 2,\n          },\n          end: {\n            column: 7,\n            line: 3,\n          },\n          message: 'message line 2',\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   | ^ ^^^^^ this should be printed');\n    assert.equal(lines[2], '> 2 | Enjoy this nice codeframe');\n    assert.equal(lines[3], '>   |   ^^^^^^^^^^^^^^^^^^^^^^^');\n    assert.equal(lines[4], '> 3 | This is another line');\n    assert.equal(lines[5], '>   | ^^^^^^^ message line 2');\n  });\n\n  it('should properly use padding', () => {\n    let codeframeString = codeframe(\n      'test\\n'.repeat(100),\n      [\n        {\n          start: {\n            column: 2,\n            line: 5,\n          },\n          end: {\n            column: 2,\n            line: 5,\n          },\n          message: 'test',\n        },\n      ],\n      {\n        useColor: false,\n        padding: {\n          before: 2,\n          after: 4,\n        },\n      },\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines.length, 8);\n    assert.equal(lines[0], '  3 | test');\n    assert.equal(lines[2], '> 5 | test');\n    assert.equal(lines[3], '>   |  ^ test');\n    assert.equal(lines[7], '  9 | test');\n  });\n\n  it('should properly pad numbers for large files', () => {\n    let codeframeString = codeframe('test\\n'.repeat(1000), [\n      {\n        start: {\n          column: 2,\n          line: 99,\n        },\n        end: {\n          column: 2,\n          line: 99,\n        },\n        message: 'test',\n      },\n      {\n        start: {\n          column: 2,\n          line: 100,\n        },\n        end: {\n          column: 2,\n          line: 100,\n        },\n        message: 'test 2',\n      },\n    ]);\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines.length, 7);\n    assert.equal(lines[0], '   98 | test');\n    assert.equal(lines[1], '>  99 | test');\n    assert.equal(lines[2], '>     |  ^ test');\n    assert.equal(lines[3], '> 100 | test');\n    assert.equal(lines[4], '>     |  ^ test 2');\n    assert.equal(lines[5], '  101 | test');\n    assert.equal(lines[6], '  102 | test');\n  });\n\n  it('should properly pad numbers for short files', () => {\n    let codeframeString = codeframe('test\\n'.repeat(1000), [\n      {\n        start: {\n          column: 2,\n          line: 7,\n        },\n        end: {\n          column: 2,\n          line: 7,\n        },\n        message: 'test',\n      },\n      {\n        start: {\n          column: 2,\n          line: 12,\n        },\n        end: {\n          column: 2,\n          line: 12,\n        },\n        message: 'test',\n      },\n    ]);\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines.length, 11);\n    assert.equal(lines[0], '   6 | test');\n    assert.equal(lines[4], '   9 | test');\n    assert.equal(lines[5], '  10 | test');\n    assert.equal(lines[6], '  11 | test');\n    assert.equal(lines[10], '  14 | test');\n  });\n\n  it('should properly use maxLines', () => {\n    let line = 'test '.repeat(100);\n    let codeframeString = codeframe(\n      `${line}\\n`.repeat(100),\n      [\n        {\n          start: {\n            column: 2,\n            line: 5,\n          },\n          end: {\n            column: 2,\n            line: 5,\n          },\n          message: 'test',\n        },\n        {\n          start: {\n            column: 2,\n            line: 12,\n          },\n          end: {\n            column: 2,\n            line: 20,\n          },\n          message: 'test',\n        },\n      ],\n      {\n        useColor: false,\n        maxLines: 10,\n        terminalWidth: 5,\n      },\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines.length, 13);\n    assert.equal(lines[0], '   4 | test test ');\n    assert.equal(lines[7], '  10 | test test ');\n    assert.equal(lines[11], '> 13 | test test ');\n    assert.equal(lines[12], '>    | ^^^^^^^^^^');\n  });\n\n  it('should be able to handle tabs', () => {\n    let codeframeString = codeframe(\n      'hel\\tlo wor\\tld\\nEnjoy thi\\ts nice cod\\teframe',\n      [\n        {\n          start: {\n            column: 5,\n            line: 1,\n          },\n          end: {\n            column: 8,\n            line: 1,\n          },\n          message: 'test',\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hel  lo wor  ld');\n    assert.equal(lines[1], '>   |      ^^^^ test');\n    assert.equal(lines[2], '  2 | Enjoy thi  s nice cod  eframe');\n  });\n\n  it('should be able to handle tabs with multiple highlights', () => {\n    let codeframeString = codeframe(\n      'hel\\tlo wor\\tld\\nEnjoy thi\\ts nice cod\\teframe',\n      [\n        {\n          start: {\n            column: 3,\n            line: 1,\n          },\n          end: {\n            column: 5,\n            line: 1,\n          },\n          message: 'test',\n        },\n        {\n          start: {\n            column: 7,\n            line: 1,\n          },\n          end: {\n            column: 8,\n            line: 1,\n          },\n          message: 'test',\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hel  lo wor  ld');\n    assert.equal(lines[1], '>   |   ^^^^ ^^ test');\n    assert.equal(lines[2], '  2 | Enjoy thi  s nice cod  eframe');\n  });\n\n  it('multiline highlights with tabs', () => {\n    let codeframeString = codeframe(\n      'hel\\tlo wor\\tld\\nEnjoy thi\\ts nice cod\\teframe\\ntest',\n      [\n        {\n          start: {\n            column: 3,\n            line: 1,\n          },\n          end: {\n            column: 2,\n            line: 3,\n          },\n          message: 'test',\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hel  lo wor  ld');\n    assert.equal(lines[1], '>   |   ^^^^^^^^^^^^^');\n    assert.equal(lines[2], '> 2 | Enjoy thi  s nice cod  eframe');\n    assert.equal(lines[3], '>   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^');\n    assert.equal(lines[4], '> 3 | test');\n    assert.equal(lines[5], '>   | ^^ test');\n  });\n\n  it('Should truncate long lines and print message', () => {\n    let originalLine = 'hello world '.repeat(1000);\n    let codeframeString = codeframe(\n      originalLine,\n      [\n        {\n          start: {\n            column: 1000,\n            line: 1,\n          },\n          end: {\n            column: 1200,\n            line: 1,\n          },\n          message: 'This is a message',\n        },\n      ],\n      {useColor: false, terminalWidth: 25},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines.length, 2);\n    assert.equal(lines[0], '> 1 | d hello world hello');\n    assert.equal(lines[1], '>   |      ^^^^^^^^^^^^^^ This is a message');\n  });\n\n  it('Truncation across multiple lines', () => {\n    let originalLine =\n      'hello world '.repeat(100) + '\\n' + 'new line '.repeat(100);\n    let codeframeString = codeframe(\n      originalLine,\n      [\n        {\n          start: {\n            column: 15,\n            line: 1,\n          },\n          end: {\n            column: 400,\n            line: 1,\n          },\n          message: 'This is the first line',\n        },\n        {\n          start: {\n            column: 2,\n            line: 2,\n          },\n          end: {\n            column: 100,\n            line: 2,\n          },\n          message: 'This is the second line',\n        },\n      ],\n      {useColor: false, terminalWidth: 25},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines.length, 4);\n    assert.equal(lines[0], '> 1 | ld hello world hell');\n    assert.equal(lines[1], '>   |      ^^^^^^^^^^^^^^ This is the first line');\n    assert.equal(lines[2], '> 2 | new line new line n');\n    assert.equal(lines[3], '>   |  ^^^^^^^^^^^^^^^^^^ This is the second line');\n  });\n\n  it('Truncation across various types and positions of highlights', () => {\n    let originalLine =\n      'hello world '.repeat(100) + '\\n' + 'new line '.repeat(100);\n    let codeframeString = codeframe(\n      originalLine,\n      [\n        {\n          start: {\n            column: 2,\n            line: 1,\n          },\n          end: {\n            column: 5,\n            line: 1,\n          },\n        },\n        {\n          start: {\n            column: 6,\n            line: 1,\n          },\n          end: {\n            column: 10,\n            line: 1,\n          },\n          message: 'I have a message',\n        },\n        {\n          start: {\n            column: 15,\n            line: 1,\n          },\n          end: {\n            column: 25,\n            line: 1,\n          },\n          message: 'I also have a message',\n        },\n        {\n          start: {\n            column: 2,\n            line: 2,\n          },\n          end: {\n            column: 5,\n            line: 2,\n          },\n          message: 'This is the second line',\n        },\n      ],\n      {useColor: false, terminalWidth: 25},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines.length, 4);\n    assert.equal(lines[0], '> 1 | hello world hello w');\n    assert.equal(lines[1], '>   |  ^^^^^^^^^    ^^^^^ I also have a message');\n    assert.equal(lines[2], '> 2 | new line new line n');\n    assert.equal(lines[3], '>   |  ^^^^ This is the second line');\n  });\n\n  it('Multi-line highlight w/ truncation', () => {\n    let originalLine =\n      'hello world '.repeat(100) + '\\n' + 'new line '.repeat(100);\n    let codeframeString = codeframe(\n      originalLine,\n      [\n        {\n          start: {\n            column: 2,\n            line: 1,\n          },\n          end: {\n            column: 151,\n            line: 2,\n          },\n          message: 'I have a message',\n        },\n      ],\n      {useColor: false, terminalWidth: 25},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines.length, 4);\n    assert.equal(lines[0], '> 1 | hello world hello w');\n    assert.equal(lines[1], '>   |  ^^^^^^^^^^^^^^^^^^');\n    assert.equal(lines[2], '> 2 | ew line new line ne');\n    assert.equal(lines[3], '>   | ^^^^^^ I have a message');\n  });\n\n  it('Should pad properly, T-650', () => {\n    let fileContent = readFileSync(\n      joinPath(__dirname, './fixtures/a.js'),\n      'utf8',\n    );\n    let codeframeString = codeframe(\n      fileContent,\n      [\n        {\n          start: {\n            line: 8,\n            column: 10,\n          },\n          end: {\n            line: 8,\n            column: 48,\n          },\n        },\n      ],\n      {\n        useColor: false,\n        syntaxHighlighting: false,\n        language: 'js',\n        terminalWidth: 100,\n      },\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines.length, 5);\n    assert.equal(lines[0], `   7 | import Tooltip from '../tooltip';`);\n    assert.equal(\n      lines[1],\n      `>  8 | import VisuallyHidden from '../visually-hidden';`,\n    );\n    assert.equal(\n      lines[2],\n      '>    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^',\n    );\n    assert.equal(lines[3], '   9 | ');\n    assert.equal(lines[4], '  10 | /**');\n  });\n\n  it('should still generate a codeframe when end is before start', () => {\n    let codeframeString = codeframe(\n      'hello world',\n      [\n        {\n          start: {\n            column: 5,\n            line: 1,\n          },\n          end: {\n            column: 1,\n            line: 1,\n          },\n        },\n      ],\n      {useColor: false},\n    );\n\n    let lines = codeframeString.split(LINE_END);\n    assert.equal(lines[0], '> 1 | hello world');\n    assert.equal(lines[1], '>   |     ^');\n  });\n});\n"
  },
  {
    "path": "packages/core/codeframe/test/fixtures/a.js",
    "content": "import test from 'test';\nimport component from './component';\n\n/**\n * This is a comment\n */\nimport Tooltip from '../tooltip';\nimport VisuallyHidden from '../visually-hidden';\n\n/**\n * This is another comment\n */\nimport {Label} from './label';\n"
  },
  {
    "path": "packages/core/core/index.d.ts",
    "content": "import type {\n  InitialParcelOptions,\n  BuildEvent,\n  BuildSuccessEvent,\n  AsyncSubscription,\n} from '@parcel/types';\nimport type {FarmOptions} from '@parcel/workers';\nimport type WorkerFarm from '@parcel/workers';\n\nexport class Parcel {\n  constructor(options: InitialParcelOptions);\n  run(): Promise<BuildSuccessEvent>;\n  watch(\n    cb?: (err: Error | null | undefined, buildEvent?: BuildEvent) => unknown,\n  ): Promise<AsyncSubscription>;\n}\n\nexport declare function createWorkerFarm(\n  options?: Partial<FarmOptions>,\n): WorkerFarm;\n\nexport default Parcel;\n"
  },
  {
    "path": "packages/core/core/package.json",
    "content": "{\n  \"name\": \"@parcel/core\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"scripts\": {\n    \"test\": \"mocha\",\n    \"test-ci\": \"mocha\",\n    \"check-ts\": \"tsc --noEmit index.d.ts\"\n  },\n  \"dependencies\": {\n    \"@mischnic/json-sourcemap\": \"^0.1.1\",\n    \"@parcel/cache\": \"2.16.4\",\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/events\": \"2.16.4\",\n    \"@parcel/feature-flags\": \"2.16.4\",\n    \"@parcel/fs\": \"2.16.4\",\n    \"@parcel/graph\": \"3.6.4\",\n    \"@parcel/logger\": \"2.16.4\",\n    \"@parcel/package-manager\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/profiler\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@parcel/workers\": \"2.16.4\",\n    \"base-x\": \"^3.0.11\",\n    \"browserslist\": \"^4.24.5\",\n    \"clone\": \"^2.1.2\",\n    \"dotenv\": \"^16.5.0\",\n    \"dotenv-expand\": \"^11.0.7\",\n    \"json5\": \"^2.2.3\",\n    \"msgpackr\": \"^1.11.2\",\n    \"nullthrows\": \"^1.1.1\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"devDependencies\": {\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"@types/node\": \"^22.15.17\",\n    \"graphviz\": \"^0.0.9\",\n    \"tempy\": \"^0.2.1\"\n  },\n  \"browser\": {\n    \"./src/serializerCore.js\": \"./src/serializerCore.browser.js\"\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/AssetGraph.js",
    "content": "// @flow strict-local\n\nimport type {GraphVisitor} from '@parcel/types';\nimport type {\n  ContentGraphOpts,\n  ContentKey,\n  NodeId,\n  SerializedContentGraph,\n} from '@parcel/graph';\nimport type {\n  Asset,\n  AssetGraphNode,\n  AssetGroup,\n  AssetGroupNode,\n  AssetNode,\n  Dependency,\n  DependencyNode,\n  Entry,\n  EntryFileNode,\n  EntrySpecifierNode,\n  Environment,\n  Target,\n} from './types';\n\nimport invariant from 'assert';\nimport {hashString, Hash} from '@parcel/rust';\nimport {hashObject} from '@parcel/utils';\nimport nullthrows from 'nullthrows';\nimport {ContentGraph} from '@parcel/graph';\nimport {createDependency} from './Dependency';\nimport {type ProjectPath, fromProjectPathRelative} from './projectPath';\nimport {BROWSER_ENVS} from './public/Environment';\n\ntype InitOpts = {|\n  entries?: Array<ProjectPath>,\n  targets?: Array<Target>,\n  assetGroups?: Array<AssetGroup>,\n|};\n\ntype AssetGraphOpts = {|\n  ...ContentGraphOpts<AssetGraphNode>,\n  hash?: ?string,\n|};\n\ntype SerializedAssetGraph = {|\n  ...SerializedContentGraph<AssetGraphNode>,\n  hash?: ?string,\n|};\n\nexport function nodeFromDep(dep: Dependency): DependencyNode {\n  return {\n    id: dep.id,\n    type: 'dependency',\n    value: dep,\n    deferred: false,\n    excluded: false,\n    usedSymbolsDown: new Set(),\n    usedSymbolsUp: new Map(),\n    usedSymbolsDownDirty: true,\n    usedSymbolsUpDirtyDown: true,\n    usedSymbolsUpDirtyUp: true,\n  };\n}\n\nexport function nodeFromAssetGroup(assetGroup: AssetGroup): AssetGroupNode {\n  return {\n    id: hashString(\n      fromProjectPathRelative(assetGroup.filePath) +\n        assetGroup.env.id +\n        String(assetGroup.isSource) +\n        String(assetGroup.sideEffects) +\n        (assetGroup.code ?? '') +\n        ':' +\n        (assetGroup.pipeline ?? '') +\n        ':' +\n        (assetGroup.query ?? ''),\n    ),\n    type: 'asset_group',\n    value: assetGroup,\n    usedSymbolsDownDirty: true,\n  };\n}\n\nexport function nodeFromAsset(asset: Asset): AssetNode {\n  return {\n    id: asset.id,\n    type: 'asset',\n    value: asset,\n    usedSymbols: new Set(),\n    usedSymbolsDownDirty: true,\n    usedSymbolsUpDirty: true,\n  };\n}\n\nexport function nodeFromEntrySpecifier(entry: ProjectPath): EntrySpecifierNode {\n  return {\n    id: 'entry_specifier:' + fromProjectPathRelative(entry),\n    type: 'entry_specifier',\n    value: entry,\n  };\n}\n\nexport function nodeFromEntryFile(entry: Entry): EntryFileNode {\n  return {\n    id: 'entry_file:' + hashObject(entry),\n    type: 'entry_file',\n    value: entry,\n  };\n}\n\nexport default class AssetGraph extends ContentGraph<AssetGraphNode> {\n  onNodeRemoved: ?(nodeId: NodeId) => mixed;\n  hash: ?string;\n  envCache: Map<string, Environment>;\n  safeToIncrementallyBundle: boolean = true;\n  undeferredDependencies: Set<Dependency>;\n\n  constructor(opts: ?AssetGraphOpts) {\n    if (opts) {\n      let {hash, ...rest} = opts;\n      super(rest);\n      this.hash = hash;\n    } else {\n      super();\n      this.setRootNodeId(\n        this.addNode({\n          id: '@@root',\n          type: 'root',\n          value: null,\n        }),\n      );\n    }\n\n    this.undeferredDependencies = new Set();\n    this.envCache = new Map();\n  }\n\n  // $FlowFixMe[prop-missing]\n  static deserialize(opts: AssetGraphOpts): AssetGraph {\n    return new AssetGraph(opts);\n  }\n\n  // $FlowFixMe[prop-missing]\n  serialize(): SerializedAssetGraph {\n    return {\n      ...super.serialize(),\n      hash: this.hash,\n    };\n  }\n\n  // Deduplicates Environments by making them referentially equal\n  normalizeEnvironment(input: Asset | Dependency | AssetGroup) {\n    let {id, context} = input.env;\n    let idAndContext = `${id}-${context}`;\n\n    let env = this.envCache.get(idAndContext);\n    if (env) {\n      input.env = env;\n    } else {\n      this.envCache.set(idAndContext, input.env);\n    }\n  }\n\n  setRootConnections({entries, assetGroups}: InitOpts) {\n    let nodes = [];\n    if (entries) {\n      for (let entry of entries) {\n        let node = nodeFromEntrySpecifier(entry);\n        nodes.push(node);\n      }\n    } else if (assetGroups) {\n      nodes.push(\n        ...assetGroups.map(assetGroup => nodeFromAssetGroup(assetGroup)),\n      );\n    }\n    this.replaceNodeIdsConnectedTo(\n      nullthrows(this.rootNodeId),\n      nodes.map(node => this.addNode(node)),\n    );\n  }\n\n  addNode(node: AssetGraphNode): NodeId {\n    this.hash = null;\n    let existing = this.getNodeByContentKey(node.id);\n    if (existing != null) {\n      invariant(existing.type === node.type);\n      // $FlowFixMe[incompatible-type] Checked above\n      // $FlowFixMe[prop-missing]\n      existing.value = node.value;\n      let existingId = this.getNodeIdByContentKey(node.id);\n      this.updateNode(existingId, existing);\n      return existingId;\n    }\n    return super.addNodeByContentKey(node.id, node);\n  }\n\n  removeNode(nodeId: NodeId): void {\n    this.hash = null;\n    this.onNodeRemoved && this.onNodeRemoved(nodeId);\n    return super.removeNode(nodeId);\n  }\n\n  resolveEntry(\n    entry: ProjectPath,\n    resolved: Array<Entry>,\n    correspondingRequest: ContentKey,\n  ) {\n    let entrySpecifierNodeId = this.getNodeIdByContentKey(\n      nodeFromEntrySpecifier(entry).id,\n    );\n    let entrySpecifierNode = nullthrows(this.getNode(entrySpecifierNodeId));\n    invariant(entrySpecifierNode.type === 'entry_specifier');\n    entrySpecifierNode.correspondingRequest = correspondingRequest;\n\n    this.replaceNodeIdsConnectedTo(\n      entrySpecifierNodeId,\n      resolved.map(file => this.addNode(nodeFromEntryFile(file))),\n    );\n  }\n\n  resolveTargets(\n    entry: Entry,\n    targets: Array<Target>,\n    correspondingRequest: string,\n  ) {\n    let depNodes = targets.map(target => {\n      // In library mode, all of the entry's symbols are \"used\"\n      // In non-browser environments, exports may also be used (e.g. serverless request handlers).\n      let includeAllSymbols =\n        target.env.isLibrary || !BROWSER_ENVS.has(target.env.context);\n      let node = nodeFromDep(\n        // The passed project path is ignored in this case, because there is no `loc`\n        createDependency('', {\n          specifier: fromProjectPathRelative(entry.filePath),\n          specifierType: 'esm', // ???\n          pipeline: target.pipeline,\n          target: target,\n          env: target.env,\n          isEntry: true,\n          needsStableName: true,\n          symbols: includeAllSymbols\n            ? new Map([['*', {local: '*', isWeak: true, loc: null}]])\n            : undefined,\n        }),\n      );\n\n      if (includeAllSymbols) {\n        node.usedSymbolsDown.add('*');\n        node.usedSymbolsUp.set('*', undefined);\n      }\n      return node;\n    });\n\n    let entryNodeId = this.getNodeIdByContentKey(nodeFromEntryFile(entry).id);\n    let entryNode = nullthrows(this.getNode(entryNodeId));\n    invariant(entryNode.type === 'entry_file');\n    entryNode.correspondingRequest = correspondingRequest;\n\n    this.replaceNodeIdsConnectedTo(\n      entryNodeId,\n      depNodes.map(node => this.addNode(node)),\n    );\n  }\n\n  resolveDependency(\n    dependency: Dependency,\n    assetGroup: ?AssetGroup,\n    correspondingRequest: string,\n  ) {\n    let depNodeId = this.getNodeIdByContentKey(dependency.id);\n    let depNode = nullthrows(this.getNode(depNodeId));\n    invariant(depNode.type === 'dependency');\n    depNode.correspondingRequest = correspondingRequest;\n\n    if (!assetGroup) {\n      return;\n    }\n\n    let assetGroupNode = nodeFromAssetGroup(assetGroup);\n    let existing = this.getNodeByContentKey(assetGroupNode.id);\n    if (existing != null) {\n      invariant(existing.type === 'asset_group');\n      assetGroupNode.value.canDefer =\n        assetGroupNode.value.canDefer && existing.value.canDefer;\n    }\n\n    let assetGroupNodeId = this.addNode(assetGroupNode);\n    this.replaceNodeIdsConnectedTo(this.getNodeIdByContentKey(dependency.id), [\n      assetGroupNodeId,\n    ]);\n\n    this.replaceNodeIdsConnectedTo(depNodeId, [assetGroupNodeId]);\n  }\n\n  shouldVisitChild(nodeId: NodeId, childNodeId: NodeId): boolean {\n    let node = nullthrows(this.getNode(nodeId));\n    let childNode = nullthrows(this.getNode(childNodeId));\n    if (\n      node.type !== 'dependency' ||\n      childNode.type !== 'asset_group' ||\n      childNode.deferred === false\n    ) {\n      return true;\n    }\n    // Node types are proved above\n    let dependencyNode = node;\n    let assetGroupNode = childNode;\n\n    let {sideEffects, canDefer = true} = assetGroupNode.value;\n    let dependency = dependencyNode.value;\n    let dependencyPreviouslyDeferred = dependencyNode.hasDeferred;\n    let assetGroupPreviouslyDeferred = assetGroupNode.deferred;\n    let defer = this.shouldDeferDependency(dependency, sideEffects, canDefer);\n    dependencyNode.hasDeferred = defer;\n    assetGroupNode.deferred = defer;\n\n    if (!dependencyPreviouslyDeferred && defer) {\n      this.markParentsWithHasDeferred(nodeId);\n    } else if (assetGroupPreviouslyDeferred && !defer) {\n      this.unmarkParentsWithHasDeferred(childNodeId);\n    }\n\n    return !defer;\n  }\n\n  // Dependency: mark parent Asset <- AssetGroup with hasDeferred true\n  markParentsWithHasDeferred(nodeId: NodeId) {\n    this.traverseAncestors(nodeId, (traversedNodeId, _, actions) => {\n      let traversedNode = nullthrows(this.getNode(traversedNodeId));\n      if (traversedNode.type === 'asset') {\n        traversedNode.hasDeferred = true;\n      } else if (traversedNode.type === 'asset_group') {\n        traversedNode.hasDeferred = true;\n        actions.skipChildren();\n      } else if (nodeId !== traversedNodeId) {\n        actions.skipChildren();\n      }\n    });\n  }\n\n  // AssetGroup: update hasDeferred of all parent Dependency <- Asset <- AssetGroup\n  unmarkParentsWithHasDeferred(nodeId: NodeId) {\n    this.traverseAncestors(nodeId, (traversedNodeId, ctx, actions) => {\n      let traversedNode = nullthrows(this.getNode(traversedNodeId));\n      if (traversedNode.type === 'asset') {\n        let hasDeferred = this.getNodeIdsConnectedFrom(traversedNodeId).some(\n          childNodeId => {\n            let childNode = nullthrows(this.getNode(childNodeId));\n            return childNode.hasDeferred == null\n              ? false\n              : childNode.hasDeferred;\n          },\n        );\n        if (!hasDeferred) {\n          delete traversedNode.hasDeferred;\n        }\n        return {hasDeferred};\n      } else if (\n        traversedNode.type === 'asset_group' &&\n        nodeId !== traversedNodeId\n      ) {\n        if (!ctx?.hasDeferred) {\n          this.safeToIncrementallyBundle = false;\n          delete traversedNode.hasDeferred;\n        }\n        actions.skipChildren();\n      } else if (traversedNode.type === 'dependency') {\n        this.safeToIncrementallyBundle = false;\n        traversedNode.hasDeferred = false;\n      } else if (nodeId !== traversedNodeId) {\n        actions.skipChildren();\n      }\n    });\n  }\n\n  // Defer transforming this dependency if it is marked as weak, there are no side effects,\n  // no re-exported symbols are used by ancestor dependencies and the re-exporting asset isn't\n  // using a wildcard and isn't an entry (in library mode).\n  // This helps with performance building large libraries like `lodash-es`, which re-exports\n  // a huge number of functions since we can avoid even transforming the files that aren't used.\n  shouldDeferDependency(\n    dependency: Dependency,\n    sideEffects: ?boolean,\n    canDefer: boolean,\n  ): boolean {\n    let dependencySymbols = dependency.symbols;\n\n    // Doing this separately keeps Flow happy further down\n    if (!dependencySymbols) {\n      return false;\n    }\n\n    let isDeferrable =\n      [...dependencySymbols].every(([, {isWeak}]) => isWeak) &&\n      sideEffects === false &&\n      canDefer &&\n      !dependencySymbols.has('*');\n\n    if (!isDeferrable) {\n      return false;\n    }\n\n    let depNodeId = this.getNodeIdByContentKey(dependency.id);\n    let depNode = this.getNode(depNodeId);\n    invariant(depNode);\n\n    let assets = this.getNodeIdsConnectedTo(depNodeId);\n    let symbols = new Map(\n      [...dependencySymbols].map(([key, val]) => [val.local, key]),\n    );\n    invariant(assets.length === 1);\n    let firstAsset = nullthrows(this.getNode(assets[0]));\n    invariant(firstAsset.type === 'asset');\n    let resolvedAsset = firstAsset.value;\n\n    // This doesn't change from here, so checking it now saves\n    // us some calls to `getIncomingDependency`\n    if (!resolvedAsset.symbols) {\n      return true;\n    }\n\n    let deps = this.getIncomingDependencies(resolvedAsset);\n\n    return deps.every(d => {\n      // If this dependency has already been through this process, and we\n      // know it's not deferrable, then there's no need to re-check\n      if (this.undeferredDependencies.has(d)) {\n        return false;\n      }\n\n      let depIsDeferrable =\n        d.symbols &&\n        !(d.env.isLibrary && d.isEntry) &&\n        !d.symbols.has('*') &&\n        ![...d.symbols.keys()].some(symbol => {\n          let assetSymbol = resolvedAsset.symbols?.get(symbol)?.local;\n          return assetSymbol != null && symbols.has(assetSymbol);\n        });\n\n      if (!depIsDeferrable) {\n        // Mark this dep as not deferrable so it doesn't have to be re-checked\n        this.undeferredDependencies.add(d);\n        return false;\n      }\n    });\n  }\n\n  resolveAssetGroup(\n    assetGroup: AssetGroup,\n    assets: Array<Asset>,\n    correspondingRequest: ContentKey,\n  ) {\n    this.normalizeEnvironment(assetGroup);\n    let assetGroupNode = nodeFromAssetGroup(assetGroup);\n    assetGroupNode = this.getNodeByContentKey(assetGroupNode.id);\n    if (!assetGroupNode) {\n      return;\n    }\n    invariant(assetGroupNode.type === 'asset_group');\n    assetGroupNode.correspondingRequest = correspondingRequest;\n\n    let assetsByKey = new Map();\n    for (let asset of assets) {\n      if (asset.uniqueKey != null) {\n        assetsByKey.set(asset.uniqueKey, asset);\n      }\n    }\n\n    let dependentAssetKeys = new Set();\n    for (let asset of assets) {\n      for (let dep of asset.dependencies.values()) {\n        if (assetsByKey.has(dep.specifier)) {\n          dependentAssetKeys.add(dep.specifier);\n        }\n      }\n    }\n\n    let assetObjects: Array<{|\n      assetNodeId: NodeId,\n      dependentAssets: Array<Asset>,\n    |}> = [];\n    let assetNodeIds = [];\n    for (let asset of assets) {\n      this.normalizeEnvironment(asset);\n      let isDirect = !dependentAssetKeys.has(asset.uniqueKey);\n\n      let dependentAssets = [];\n      for (let dep of asset.dependencies.values()) {\n        let dependentAsset = assetsByKey.get(dep.specifier);\n        if (dependentAsset) {\n          dependentAssets.push(dependentAsset);\n          if (dependentAsset.id === asset.id) {\n            // Don't orphan circular dependencies.\n            isDirect = true;\n          }\n        }\n      }\n      let id = this.addNode(nodeFromAsset(asset));\n      assetObjects.push({\n        assetNodeId: id,\n        dependentAssets,\n      });\n\n      if (isDirect) {\n        assetNodeIds.push(id);\n      }\n    }\n\n    this.replaceNodeIdsConnectedTo(\n      this.getNodeIdByContentKey(assetGroupNode.id),\n      assetNodeIds,\n    );\n    for (let {assetNodeId, dependentAssets} of assetObjects) {\n      // replaceNodesConnectedTo has merged the value into the existing node, retrieve\n      // the actual current node.\n      let assetNode = nullthrows(this.getNode(assetNodeId));\n      invariant(assetNode.type === 'asset');\n      this.resolveAsset(assetNode, dependentAssets);\n    }\n  }\n\n  resolveAsset(assetNode: AssetNode, dependentAssets: Array<Asset>) {\n    let depNodeIds: Array<NodeId> = [];\n    let depNodesWithAssets = [];\n    for (let dep of assetNode.value.dependencies.values()) {\n      this.normalizeEnvironment(dep);\n      let depNode = nodeFromDep(dep);\n      let existing = this.getNodeByContentKey(depNode.id);\n      if (\n        existing?.type === 'dependency' &&\n        existing.value.resolverMeta != null\n      ) {\n        depNode.value.meta = {\n          ...depNode.value.meta,\n          ...existing.value.resolverMeta,\n        };\n        depNode.value.resolverMeta = existing.value.resolverMeta;\n      }\n      if (\n        existing?.type === 'dependency' &&\n        existing.value.resolverPriority != null\n      ) {\n        depNode.value.priority = existing.value.resolverPriority;\n        depNode.value.resolverPriority = existing.value.resolverPriority;\n      }\n      let dependentAsset = dependentAssets.find(\n        a => a.uniqueKey === dep.specifier,\n      );\n      if (dependentAsset) {\n        depNode.complete = true;\n        depNodesWithAssets.push([depNode, nodeFromAsset(dependentAsset)]);\n      }\n      depNode.value.sourceAssetType = assetNode.value.type;\n      depNodeIds.push(this.addNode(depNode));\n    }\n\n    assetNode.usedSymbolsUpDirty = true;\n    assetNode.usedSymbolsDownDirty = true;\n    this.replaceNodeIdsConnectedTo(\n      this.getNodeIdByContentKey(assetNode.id),\n      depNodeIds,\n    );\n\n    for (let [depNode, dependentAssetNode] of depNodesWithAssets) {\n      let depAssetNodeId = this.addNode(dependentAssetNode);\n\n      this.replaceNodeIdsConnectedTo(this.getNodeIdByContentKey(depNode.id), [\n        depAssetNodeId,\n      ]);\n    }\n  }\n\n  getIncomingDependencies(asset: Asset): Array<Dependency> {\n    let nodeId = this.getNodeIdByContentKey(asset.id);\n    let assetGroupIds = this.getNodeIdsConnectedTo(nodeId);\n    let dependencies = [];\n    for (let i = 0; i < assetGroupIds.length; i++) {\n      let assetGroupId = assetGroupIds[i];\n\n      // Sometimes assets are connected directly to dependencies\n      // rather than through an asset group. This happens due to\n      // inline dependencies on assets via uniqueKey. See resolveAsset.\n      let node = this.getNode(assetGroupId);\n      if (node?.type === 'dependency') {\n        dependencies.push(node.value);\n        continue;\n      }\n\n      let assetIds = this.getNodeIdsConnectedTo(assetGroupId);\n      for (let j = 0; j < assetIds.length; j++) {\n        let node = this.getNode(assetIds[j]);\n        if (!node || node.type !== 'dependency') {\n          continue;\n        }\n\n        dependencies.push(node.value);\n      }\n    }\n\n    return dependencies;\n  }\n\n  traverseAssets<TContext>(\n    visit: GraphVisitor<Asset, TContext>,\n    startNodeId: ?NodeId,\n  ): ?TContext {\n    return this.filteredTraverse(\n      nodeId => {\n        let node = nullthrows(this.getNode(nodeId));\n        return node.type === 'asset' ? node.value : null;\n      },\n      visit,\n      startNodeId,\n    );\n  }\n\n  getEntryAssetGroupNodes(): Array<AssetGroupNode> {\n    let entryNodes = [];\n    this.traverse((nodeId, _, actions) => {\n      let node = nullthrows(this.getNode(nodeId));\n      if (node.type === 'asset_group') {\n        entryNodes.push(node);\n        actions.skipChildren();\n      }\n    });\n    return entryNodes;\n  }\n\n  getEntryAssets(): Array<Asset> {\n    let entries = [];\n    this.traverseAssets((asset, ctx, traversal) => {\n      entries.push(asset);\n      traversal.skipChildren();\n    });\n\n    return entries;\n  }\n\n  getHash(): string {\n    if (this.hash != null) {\n      return this.hash;\n    }\n\n    let hash = new Hash();\n    // TODO: sort??\n    this.traverse(nodeId => {\n      let node = nullthrows(this.getNode(nodeId));\n      if (node.type === 'asset') {\n        hash.writeString(nullthrows(node.value.outputHash));\n      } else if (node.type === 'dependency' && node.value.target) {\n        hash.writeString(JSON.stringify(node.value.target));\n      }\n    });\n\n    this.hash = hash.finish();\n    return this.hash;\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/BundleGraph.js",
    "content": "// @flow strict-local\n\nimport type {\n  GraphVisitor,\n  FilePath,\n  Symbol,\n  TraversalActions,\n} from '@parcel/types';\nimport type {\n  ContentKey,\n  ContentGraphOpts,\n  NodeId,\n  SerializedContentGraph,\n} from '@parcel/graph';\n\nimport type {\n  Asset,\n  AssetNode,\n  Bundle,\n  BundleGraphNode,\n  BundleGroup,\n  Dependency,\n  DependencyNode,\n  InternalSourceLocation,\n  Target,\n} from './types';\nimport type AssetGraph from './AssetGraph';\nimport type {ProjectPath} from './projectPath';\n\nimport assert from 'assert';\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport {ContentGraph, ALL_EDGE_TYPES, mapVisitor} from '@parcel/graph';\nimport {Hash, hashString} from '@parcel/rust';\nimport {DefaultMap, objectSortedEntriesDeep, getRootDir} from '@parcel/utils';\n\nimport {Priority, BundleBehavior, SpecifierType} from './types';\nimport {getBundleGroupId, getPublicId} from './utils';\nimport {ISOLATED_ENVS} from './public/Environment';\nimport {fromProjectPath} from './projectPath';\n\nexport const bundleGraphEdgeTypes = {\n  // A lack of an edge type indicates to follow the edge while traversing\n  // the bundle's contents, e.g. `bundle.traverse()` during packaging.\n  null: 1,\n  // Used for constant-time checks of presence of a dependency or asset in a bundle,\n  // avoiding bundle traversal in cases like `isAssetInAncestors`\n  contains: 2,\n  // Connections between bundles and bundle groups, for quick traversal of the\n  // bundle hierarchy.\n  bundle: 3,\n  // When dependency -> asset: Indicates that the asset a dependency references\n  //                           is contained in another bundle.\n  // When dependency -> bundle: Indicates the bundle is necessary for any bundles\n  //                           with the dependency.\n  // When bundle -> bundle:    Indicates the target bundle is necessary for the\n  //                           source bundle.\n  // This type prevents referenced assets from being traversed from dependencies\n  // along the untyped edge, and enables traversal to referenced bundles that are\n  // not directly connected to bundle group nodes.\n  references: 4,\n  // Signals that the dependency is internally resolvable via the bundle's ancestry,\n  // and that the bundle connected to the dependency is not necessary for the source bundle.\n  internal_async: 5,\n};\n\nexport type BundleGraphEdgeType = $Values<typeof bundleGraphEdgeTypes>;\n\ntype InternalSymbolResolution = {|\n  asset: Asset,\n  exportSymbol: string,\n  symbol: ?Symbol | false,\n  loc: ?InternalSourceLocation,\n|};\n\ntype InternalExportSymbolResolution = {|\n  ...InternalSymbolResolution,\n  +exportAs: Symbol | string,\n|};\n\ntype BundleGraphOpts = {|\n  graph: ContentGraphOpts<BundleGraphNode, BundleGraphEdgeType>,\n  bundleContentHashes: Map<string, string>,\n  assetPublicIds: Set<string>,\n  publicIdByAssetId: Map<string, string>,\n|};\n\ntype SerializedBundleGraph = {|\n  $$raw: true,\n  graph: SerializedContentGraph<BundleGraphNode, BundleGraphEdgeType>,\n  bundleContentHashes: Map<string, string>,\n  assetPublicIds: Set<string>,\n  publicIdByAssetId: Map<string, string>,\n|};\n\nfunction makeReadOnlySet<T>(set: Set<T>): $ReadOnlySet<T> {\n  return new Proxy(set, {\n    get(target, property) {\n      if (property === 'delete' || property === 'add' || property === 'clear') {\n        return undefined;\n      } else {\n        // $FlowFixMe[incompatible-type]\n        let value = target[property];\n        return typeof value === 'function' ? value.bind(target) : value;\n      }\n    },\n  });\n}\n\n/**\n * Stores assets, dependencies, bundle groups, bundles, and the relationships between them.\n * The BundleGraph is passed to the bundler plugin wrapped in a MutableBundleGraph,\n * and is passed to packagers and optimizers wrapped in the public BundleGraph object, both\n * of which implement public api for this structure. This is the internal structure.\n */\nexport default class BundleGraph {\n  /** A set of all existing concise asset ids present in the BundleGraph */\n  _assetPublicIds: Set<string>;\n  /** Maps full asset ids (currently 32-character strings) to concise ids (minimum of 5 character strings) */\n  _publicIdByAssetId: Map<string, string>;\n  /**\n   * A cache of bundle hashes by bundle id.\n   *\n   * TODO: These hashes are being invalidated in mutative methods, but this._graph is not a private\n   * property so it is possible to reach in and mutate the graph without invalidating these hashes.\n   * It needs to be exposed in BundlerRunner for now based on how applying runtimes works and the\n   * BundlerRunner takes care of invalidating hashes when runtimes are applied, but this is not ideal.\n   */\n  _bundleContentHashes: Map<string, string>;\n  _targetEntryRoots: Map<ProjectPath, FilePath> = new Map();\n  /** The internal core Graph structure */\n  _graph: ContentGraph<BundleGraphNode, BundleGraphEdgeType>;\n  _bundlePublicIds /*: Set<string> */ = new Set<string>();\n\n  constructor({\n    graph,\n    publicIdByAssetId,\n    assetPublicIds,\n    bundleContentHashes,\n  }: {|\n    graph: ContentGraph<BundleGraphNode, BundleGraphEdgeType>,\n    publicIdByAssetId: Map<string, string>,\n    assetPublicIds: Set<string>,\n    bundleContentHashes: Map<string, string>,\n  |}) {\n    this._graph = graph;\n    this._assetPublicIds = assetPublicIds;\n    this._publicIdByAssetId = publicIdByAssetId;\n    this._bundleContentHashes = bundleContentHashes;\n  }\n\n  /**\n   * Produce a BundleGraph from an AssetGraph by removing asset groups and retargeting dependencies\n   * based on the symbol data (resolving side-effect free reexports).\n   */\n  static fromAssetGraph(\n    assetGraph: AssetGraph,\n    isProduction: boolean,\n    publicIdByAssetId: Map<string, string> = new Map(),\n    assetPublicIds: Set<string> = new Set(),\n  ): BundleGraph {\n    let graph = new ContentGraph<BundleGraphNode, BundleGraphEdgeType>();\n    let assetGroupIds = new Map();\n    let dependencies = new Map();\n    let assetGraphNodeIdToBundleGraphNodeId = new Map<NodeId, NodeId>();\n\n    let assetGraphRootNode =\n      assetGraph.rootNodeId != null\n        ? assetGraph.getNode(assetGraph.rootNodeId)\n        : null;\n    invariant(assetGraphRootNode != null && assetGraphRootNode.type === 'root');\n\n    assetGraph.dfsFast(nodeId => {\n      let node = assetGraph.getNode(nodeId);\n\n      if (node != null && node.type === 'asset') {\n        let {id: assetId} = node.value;\n        // Generate a new, short public id for this asset to use.\n        // If one already exists, use it.\n        let publicId = publicIdByAssetId.get(assetId);\n        if (publicId == null) {\n          publicId = getPublicId(assetId, existing =>\n            assetPublicIds.has(existing),\n          );\n          publicIdByAssetId.set(assetId, publicId);\n          assetPublicIds.add(publicId);\n        }\n      } else if (node != null && node.type === 'asset_group') {\n        assetGroupIds.set(nodeId, assetGraph.getNodeIdsConnectedFrom(nodeId));\n      }\n    });\n\n    let walkVisited = new Set();\n    function walk(nodeId) {\n      if (walkVisited.has(nodeId)) return;\n      walkVisited.add(nodeId);\n\n      let node = nullthrows(assetGraph.getNode(nodeId));\n      if (\n        node.type === 'dependency' &&\n        node.value.symbols != null &&\n        // Disable in dev mode because this feature is at odds with safeToIncrementallyBundle\n        isProduction\n      ) {\n        let nodeValueSymbols = node.value.symbols;\n\n        // asset -> symbols that should be imported directly from that asset\n        let targets = new DefaultMap<ContentKey, Map<Symbol, Symbol>>(\n          () => new Map(),\n        );\n        let externalSymbols = new Set();\n        let hasAmbiguousSymbols = false;\n\n        for (let [symbol, resolvedSymbol] of node.usedSymbolsUp) {\n          if (resolvedSymbol) {\n            targets\n              .get(resolvedSymbol.asset)\n              .set(symbol, resolvedSymbol.symbol ?? symbol);\n          } else if (resolvedSymbol === null) {\n            externalSymbols.add(symbol);\n          } else if (resolvedSymbol === undefined) {\n            hasAmbiguousSymbols = true;\n            break;\n          }\n        }\n\n        if (\n          // Only perform retargeting when there is an imported symbol\n          // - If the target is side-effect-free, the symbols point to the actual target and removing\n          //   the original dependency resolution is fine\n          // - Otherwise, keep this dependency unchanged for its potential side effects\n          node.usedSymbolsUp.size > 0 &&\n          // Only perform retargeting if the dependency only points to a single asset (e.g. CSS modules)\n          !hasAmbiguousSymbols &&\n          // It doesn't make sense to retarget dependencies where `*` is used, because the\n          // retargeting won't enable any benefits in that case (apart from potentially even more\n          // code being generated).\n          !node.usedSymbolsUp.has('*') &&\n          // TODO We currently can't rename imports in async imports, e.g. from\n          //      (parcelRequire(\"...\")).then(({ a }) => a);\n          // to\n          //      (parcelRequire(\"...\")).then(({ a: b }) => a);\n          // or\n          //      (parcelRequire(\"...\")).then((a)=>a);\n          // if the reexporting asset did `export {a as b}` or `export * as a`\n          node.value.priority === Priority.sync &&\n          // For every asset, no symbol is imported multiple times (with a different local name).\n          // Don't retarget because this cannot be resolved without also changing the asset symbols\n          // (and the asset content itself).\n          [...targets].every(\n            ([, t]) => new Set([...t.values()]).size === t.size,\n          )\n        ) {\n          let isReexportAll = nodeValueSymbols.get('*')?.local === '*';\n          let reexportAllLoc = isReexportAll\n            ? nullthrows(nodeValueSymbols.get('*')).loc\n            : undefined;\n\n          // TODO adjust sourceAssetIdNode.value.dependencies ?\n          let deps = [\n            // Keep the original dependency\n            {\n              asset: null,\n              dep: graph.addNodeByContentKey(node.id, {\n                ...node,\n                value: {\n                  ...node.value,\n                  symbols: new Map(\n                    [...nodeValueSymbols].filter(([k]) =>\n                      externalSymbols.has(k),\n                    ),\n                  ),\n                },\n                usedSymbolsUp: new Map(\n                  [...node.usedSymbolsUp].filter(([k]) =>\n                    externalSymbols.has(k),\n                  ),\n                ),\n                usedSymbolsDown: new Set(),\n                excluded: externalSymbols.size === 0,\n              }),\n            },\n            ...[...targets].map(([asset, target]) => {\n              let newNodeId = hashString(\n                node.id + [...target.keys()].join(','),\n              );\n\n              let symbols = new Map();\n              for (let [as, from] of target) {\n                let existing = nodeValueSymbols.get(as);\n                if (existing) {\n                  symbols.set(from, {...existing, meta: {rewritten: as}});\n                } else {\n                  invariant(isReexportAll);\n                  if (as === from) {\n                    // Keep the export-all for non-renamed reexports, this still correctly models\n                    // ambiguous resolution with multiple export-alls.\n                    symbols.set('*', {\n                      isWeak: true,\n                      local: '*',\n                      loc: reexportAllLoc,\n                    });\n                  } else {\n                    let local = `${node.value.id}$rewrite$${asset}$${from}`;\n                    symbols.set(from, {\n                      isWeak: true,\n                      local,\n                      loc: reexportAllLoc,\n                    });\n                    if (node.value.sourceAssetId != null) {\n                      let sourceAssetId = nullthrows(\n                        assetGraphNodeIdToBundleGraphNodeId.get(\n                          assetGraph.getNodeIdByContentKey(\n                            node.value.sourceAssetId,\n                          ),\n                        ),\n                      );\n                      let sourceAsset = nullthrows(\n                        graph.getNode(sourceAssetId),\n                      );\n                      invariant(sourceAsset.type === 'asset');\n                      let sourceAssetSymbols = sourceAsset.value.symbols;\n                      if (sourceAssetSymbols) {\n                        // The `as == from` case above should handle multiple export-alls causing\n                        // ambiguous resolution. So the current symbol is unambiguous and shouldn't\n                        // already exist on the importer.\n                        invariant(!sourceAssetSymbols.has(as));\n                        sourceAssetSymbols.set(as, {\n                          loc: reexportAllLoc,\n                          local: local,\n                        });\n                      }\n                    }\n                  }\n                }\n              }\n              let usedSymbolsUp = new Map(\n                [...node.usedSymbolsUp]\n                  .filter(([k]) => target.has(k) || k === '*')\n                  .map(([k, v]) => [target.get(k) ?? k, v]),\n              );\n              return {\n                asset,\n                dep: graph.addNodeByContentKey(newNodeId, {\n                  ...node,\n                  id: newNodeId,\n                  value: {\n                    ...node.value,\n                    id: newNodeId,\n                    symbols,\n                  },\n                  usedSymbolsUp,\n                  // This is only a temporary helper needed during symbol propagation and is never\n                  // read afterwards (and also not exposed through the public API).\n                  usedSymbolsDown: new Set(),\n                }),\n              };\n            }),\n          ];\n\n          dependencies.set(nodeId, deps);\n\n          // Jump to the dependencies that are used in this dependency\n          for (let id of targets.keys()) {\n            walk(assetGraph.getNodeIdByContentKey(id));\n          }\n          return;\n        } else {\n          // No special handling\n          let bundleGraphNodeId = graph.addNodeByContentKey(node.id, node);\n          assetGraphNodeIdToBundleGraphNodeId.set(nodeId, bundleGraphNodeId);\n        }\n      }\n      // Don't copy over asset groups into the bundle graph.\n      else if (node.type !== 'asset_group') {\n        let nodeToAdd =\n          node.type === 'asset'\n            ? {\n                ...node,\n                value: {...node.value, symbols: new Map(node.value.symbols)},\n              }\n            : node;\n        let bundleGraphNodeId = graph.addNodeByContentKey(node.id, nodeToAdd);\n        if (node.id === assetGraphRootNode?.id) {\n          graph.setRootNodeId(bundleGraphNodeId);\n        }\n        assetGraphNodeIdToBundleGraphNodeId.set(nodeId, bundleGraphNodeId);\n      }\n\n      for (let id of assetGraph.getNodeIdsConnectedFrom(nodeId)) {\n        walk(id);\n      }\n    }\n    walk(nullthrows(assetGraph.rootNodeId));\n\n    for (let edge of assetGraph.getAllEdges()) {\n      if (assetGroupIds.has(edge.from)) {\n        continue;\n      }\n      if (dependencies.has(edge.from)) {\n        // Discard previous edge, insert outgoing edges for all split dependencies\n        for (let {asset, dep} of nullthrows(dependencies.get(edge.from))) {\n          if (asset != null) {\n            graph.addEdge(\n              dep,\n              nullthrows(\n                assetGraphNodeIdToBundleGraphNodeId.get(\n                  assetGraph.getNodeIdByContentKey(asset),\n                ),\n              ),\n            );\n          }\n        }\n        continue;\n      }\n      if (!assetGraphNodeIdToBundleGraphNodeId.has(edge.from)) {\n        continue;\n      }\n\n      let to: Array<NodeId> = dependencies.get(edge.to)?.map(v => v.dep) ??\n        assetGroupIds\n          .get(edge.to)\n          ?.map(id =>\n            nullthrows(assetGraphNodeIdToBundleGraphNodeId.get(id)),\n          ) ?? [nullthrows(assetGraphNodeIdToBundleGraphNodeId.get(edge.to))];\n\n      for (let t of to) {\n        graph.addEdge(\n          nullthrows(assetGraphNodeIdToBundleGraphNodeId.get(edge.from)),\n          t,\n        );\n      }\n    }\n    return new BundleGraph({\n      graph,\n      assetPublicIds,\n      bundleContentHashes: new Map(),\n      publicIdByAssetId,\n    });\n  }\n\n  serialize(): SerializedBundleGraph {\n    return {\n      $$raw: true,\n      graph: this._graph.serialize(),\n      assetPublicIds: this._assetPublicIds,\n      bundleContentHashes: this._bundleContentHashes,\n      publicIdByAssetId: this._publicIdByAssetId,\n    };\n  }\n\n  static deserialize(serialized: BundleGraphOpts): BundleGraph {\n    return new BundleGraph({\n      graph: ContentGraph.deserialize(serialized.graph),\n      assetPublicIds: serialized.assetPublicIds,\n      bundleContentHashes: serialized.bundleContentHashes,\n      publicIdByAssetId: serialized.publicIdByAssetId,\n    });\n  }\n\n  addAssetToBundle(asset: Asset, bundle: Bundle) {\n    let bundleNodeId = this._graph.getNodeIdByContentKey(bundle.id);\n    this._graph.addEdge(\n      bundleNodeId,\n      this._graph.getNodeIdByContentKey(asset.id),\n      bundleGraphEdgeTypes.contains,\n    );\n    this._graph.addEdge(\n      bundleNodeId,\n      this._graph.getNodeIdByContentKey(asset.id),\n    );\n\n    let dependencies = this.getDependencies(asset);\n    for (let dependency of dependencies) {\n      let dependencyNodeId = this._graph.getNodeIdByContentKey(dependency.id);\n      this._graph.addEdge(\n        bundleNodeId,\n        dependencyNodeId,\n        bundleGraphEdgeTypes.contains,\n      );\n\n      for (let [bundleGroupNodeId, bundleGroupNode] of this._graph\n        .getNodeIdsConnectedFrom(dependencyNodeId)\n        .map(id => [id, nullthrows(this._graph.getNode(id))])\n        .filter(([, node]) => node.type === 'bundle_group')) {\n        invariant(bundleGroupNode.type === 'bundle_group');\n        this._graph.addEdge(\n          bundleNodeId,\n          bundleGroupNodeId,\n          bundleGraphEdgeTypes.bundle,\n        );\n      }\n      // If the dependency references a target bundle, add a reference edge from\n      // the source bundle to the dependency for easy traversal.\n      // TODO: Consider bundle being created from dependency\n      if (\n        this._graph\n          .getNodeIdsConnectedFrom(\n            dependencyNodeId,\n            bundleGraphEdgeTypes.references,\n          )\n          .map(id => nullthrows(this._graph.getNode(id)))\n          .some(node => node.type === 'bundle')\n      ) {\n        this._graph.addEdge(\n          bundleNodeId,\n          dependencyNodeId,\n          bundleGraphEdgeTypes.references,\n        );\n      }\n    }\n  }\n\n  addAssetGraphToBundle(\n    asset: Asset,\n    bundle: Bundle,\n    shouldSkipDependency: Dependency => boolean = d =>\n      this.isDependencySkipped(d),\n  ) {\n    let assetNodeId = this._graph.getNodeIdByContentKey(asset.id);\n    let bundleNodeId = this._graph.getNodeIdByContentKey(bundle.id);\n\n    // The root asset should be reached directly from the bundle in traversal.\n    // Its children will be traversed from there.\n    this._graph.addEdge(bundleNodeId, assetNodeId);\n    this._graph.traverse((nodeId, _, actions) => {\n      let node = nullthrows(this._graph.getNode(nodeId));\n      if (node.type === 'bundle_group') {\n        actions.skipChildren();\n        return;\n      }\n\n      if (node.type === 'dependency' && shouldSkipDependency(node.value)) {\n        actions.skipChildren();\n        return;\n      }\n\n      if (node.type === 'asset' || node.type === 'dependency') {\n        this._graph.addEdge(\n          bundleNodeId,\n          nodeId,\n          bundleGraphEdgeTypes.contains,\n        );\n      }\n\n      if (node.type === 'dependency') {\n        for (let [bundleGroupNodeId, bundleGroupNode] of this._graph\n          .getNodeIdsConnectedFrom(nodeId)\n          .map(id => [id, nullthrows(this._graph.getNode(id))])\n          .filter(([, node]) => node.type === 'bundle_group')) {\n          invariant(bundleGroupNode.type === 'bundle_group');\n          this._graph.addEdge(\n            bundleNodeId,\n            bundleGroupNodeId,\n            bundleGraphEdgeTypes.bundle,\n          );\n        }\n\n        // If the dependency references a target bundle, add a reference edge from\n        // the source bundle to the dependency for easy traversal.\n        if (\n          this._graph\n            .getNodeIdsConnectedFrom(nodeId, bundleGraphEdgeTypes.references)\n            .map(id => nullthrows(this._graph.getNode(id)))\n            .some(node => node.type === 'bundle')\n        ) {\n          this._graph.addEdge(\n            bundleNodeId,\n            nodeId,\n            bundleGraphEdgeTypes.references,\n          );\n          this.markDependencyReferenceable(node.value);\n          //all bundles that have this dependency need to have an edge from bundle to that dependency\n        }\n      }\n    }, assetNodeId);\n    this._bundleContentHashes.delete(bundle.id);\n  }\n\n  markDependencyReferenceable(dependency: Dependency) {\n    for (let bundle of this.getBundlesWithDependency(dependency)) {\n      this._graph.addEdge(\n        this._graph.getNodeIdByContentKey(bundle.id),\n        this._graph.getNodeIdByContentKey(dependency.id),\n        bundleGraphEdgeTypes.references,\n      );\n    }\n  }\n\n  addEntryToBundle(\n    asset: Asset,\n    bundle: Bundle,\n    shouldSkipDependency?: Dependency => boolean,\n  ) {\n    this.addAssetGraphToBundle(asset, bundle, shouldSkipDependency);\n    if (!bundle.entryAssetIds.includes(asset.id)) {\n      bundle.entryAssetIds.push(asset.id);\n    }\n  }\n\n  internalizeAsyncDependency(bundle: Bundle, dependency: Dependency) {\n    if (dependency.priority === Priority.sync) {\n      throw new Error('Expected an async dependency');\n    }\n\n    // It's possible for internalized async dependencies to not have\n    // reference edges and still have untyped edges.\n    // TODO: Maybe don't use internalized async edges at all?\n    let dependencyNodeId = this._graph.getNodeIdByContentKey(dependency.id);\n    let resolved = this.getResolvedAsset(dependency);\n    if (resolved) {\n      let resolvedNodeId = this._graph.getNodeIdByContentKey(resolved.id);\n\n      if (\n        !this._graph.hasEdge(\n          dependencyNodeId,\n          resolvedNodeId,\n          bundleGraphEdgeTypes.references,\n        )\n      ) {\n        this._graph.addEdge(\n          dependencyNodeId,\n          resolvedNodeId,\n          bundleGraphEdgeTypes.references,\n        );\n        this._graph.removeEdge(dependencyNodeId, resolvedNodeId);\n      }\n    }\n\n    this._graph.addEdge(\n      this._graph.getNodeIdByContentKey(bundle.id),\n      this._graph.getNodeIdByContentKey(dependency.id),\n      bundleGraphEdgeTypes.internal_async,\n    );\n    this._removeExternalDependency(bundle, dependency);\n  }\n\n  isDependencySkipped(dependency: Dependency): boolean {\n    let node = this._graph.getNodeByContentKey(dependency.id);\n    invariant(node && node.type === 'dependency');\n    return !!node.hasDeferred || node.excluded;\n  }\n\n  getParentBundlesOfBundleGroup(bundleGroup: BundleGroup): Array<Bundle> {\n    return this._graph\n      .getNodeIdsConnectedTo(\n        this._graph.getNodeIdByContentKey(getBundleGroupId(bundleGroup)),\n        bundleGraphEdgeTypes.bundle,\n      )\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .filter(node => node.type === 'bundle')\n      .map(node => {\n        invariant(node.type === 'bundle');\n        return node.value;\n      });\n  }\n\n  resolveAsyncDependency(\n    dependency: Dependency,\n    bundle: ?Bundle,\n  ): ?(\n    | {|type: 'bundle_group', value: BundleGroup|}\n    | {|type: 'asset', value: Asset|}\n  ) {\n    let depNodeId = this._graph.getNodeIdByContentKey(dependency.id);\n    let bundleNodeId =\n      bundle != null ? this._graph.getNodeIdByContentKey(bundle.id) : null;\n\n    if (\n      bundleNodeId != null &&\n      this._graph.hasEdge(\n        bundleNodeId,\n        depNodeId,\n        bundleGraphEdgeTypes.internal_async,\n      )\n    ) {\n      let referencedAssetNodeIds = this._graph.getNodeIdsConnectedFrom(\n        depNodeId,\n        bundleGraphEdgeTypes.references,\n      );\n\n      let resolved;\n      if (referencedAssetNodeIds.length === 0) {\n        resolved = this.getResolvedAsset(dependency, bundle);\n      } else if (referencedAssetNodeIds.length === 1) {\n        let referencedAssetNode = this._graph.getNode(\n          referencedAssetNodeIds[0],\n        );\n        // If a referenced asset already exists, resolve this dependency to it.\n        invariant(referencedAssetNode?.type === 'asset');\n        resolved = referencedAssetNode.value;\n      } else {\n        throw new Error('Dependencies can only reference one asset');\n      }\n\n      if (resolved == null) {\n        return;\n      } else {\n        return {\n          type: 'asset',\n          value: resolved,\n        };\n      }\n    }\n\n    let node = this._graph\n      .getNodeIdsConnectedFrom(this._graph.getNodeIdByContentKey(dependency.id))\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .find(node => node.type === 'bundle_group');\n\n    if (node == null) {\n      return;\n    }\n\n    invariant(node.type === 'bundle_group');\n    return {\n      type: 'bundle_group',\n      value: node.value,\n    };\n  }\n\n  // eslint-disable-next-line no-unused-vars\n  getReferencedBundle(dependency: Dependency, fromBundle: Bundle): ?Bundle {\n    let dependencyNodeId = this._graph.getNodeIdByContentKey(dependency.id);\n\n    // Find an attached bundle via a reference edge (e.g. from createAssetReference).\n    let bundleNodes = this._graph\n      .getNodeIdsConnectedFrom(\n        dependencyNodeId,\n        bundleGraphEdgeTypes.references,\n      )\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .filter(node => node.type === 'bundle');\n\n    if (bundleNodes.length) {\n      let bundleNode =\n        bundleNodes.find(\n          b => b.type === 'bundle' && b.value.type === fromBundle.type,\n        ) || bundleNodes[0];\n      invariant(bundleNode.type === 'bundle');\n      return bundleNode.value;\n    }\n\n    // If this dependency is async, there will be a bundle group attached to it.\n    let node = this._graph\n      .getNodeIdsConnectedFrom(dependencyNodeId)\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .find(node => node.type === 'bundle_group');\n\n    if (node != null) {\n      invariant(node.type === 'bundle_group');\n      return this.getBundlesInBundleGroup(node.value, {\n        includeInline: true,\n      }).find(b => {\n        let mainEntryId = b.entryAssetIds[b.entryAssetIds.length - 1];\n        return mainEntryId != null && node.value.entryAssetId === mainEntryId;\n      });\n    }\n  }\n\n  removeAssetGraphFromBundle(asset: Asset, bundle: Bundle) {\n    let bundleNodeId = this._graph.getNodeIdByContentKey(bundle.id);\n    let assetNodeId = this._graph.getNodeIdByContentKey(asset.id);\n\n    // Remove all contains edges from the bundle to the nodes in the asset's\n    // subgraph.\n    this._graph.traverse((nodeId, context, actions) => {\n      let node = nullthrows(this._graph.getNode(nodeId));\n\n      if (node.type === 'bundle_group') {\n        actions.skipChildren();\n        return;\n      }\n\n      if (node.type !== 'dependency' && node.type !== 'asset') {\n        return;\n      }\n\n      if (\n        this._graph.hasEdge(bundleNodeId, nodeId, bundleGraphEdgeTypes.contains)\n      ) {\n        this._graph.removeEdge(\n          bundleNodeId,\n          nodeId,\n          bundleGraphEdgeTypes.contains,\n          // Removing this contains edge should not orphan the connected node. This\n          // is disabled for performance reasons as these edges are removed as part\n          // of a traversal, and checking for orphans becomes quite expensive in\n          // aggregate.\n          false /* removeOrphans */,\n        );\n      } else {\n        actions.skipChildren();\n      }\n\n      if (node.type === 'asset' && this._graph.hasEdge(bundleNodeId, nodeId)) {\n        // Remove the untyped edge from the bundle to the node (it's an entry)\n        this._graph.removeEdge(bundleNodeId, nodeId);\n\n        let entryIndex = bundle.entryAssetIds.indexOf(node.value.id);\n        if (entryIndex >= 0) {\n          // Shared bundles have untyped edges to their asset graphs but don't\n          // have entry assets. For those that have entry asset ids, remove them.\n          bundle.entryAssetIds.splice(entryIndex, 1);\n        }\n      }\n\n      if (node.type === 'dependency') {\n        this._removeExternalDependency(bundle, node.value);\n        if (\n          this._graph.hasEdge(\n            bundleNodeId,\n            nodeId,\n            bundleGraphEdgeTypes.references,\n          )\n        ) {\n          this._graph.addEdge(\n            bundleNodeId,\n            nodeId,\n            bundleGraphEdgeTypes.references,\n          );\n          this.markDependencyReferenceable(node.value);\n        }\n        if (\n          this._graph.hasEdge(\n            bundleNodeId,\n            nodeId,\n            bundleGraphEdgeTypes.internal_async,\n          )\n        ) {\n          this._graph.removeEdge(\n            bundleNodeId,\n            nodeId,\n            bundleGraphEdgeTypes.internal_async,\n          );\n        }\n      }\n    }, assetNodeId);\n\n    // Remove bundle node if it no longer has any entry assets\n    if (this._graph.getNodeIdsConnectedFrom(bundleNodeId).length === 0) {\n      this.removeBundle(bundle);\n    }\n\n    this._bundleContentHashes.delete(bundle.id);\n  }\n\n  /**\n   * Remove a bundle from the bundle graph. Remove its bundle group if it is\n   * the only bundle in the group.\n   */\n  removeBundle(bundle: Bundle): Set<BundleGroup> {\n    // Remove bundle node if it no longer has any entry assets\n    let bundleNodeId = this._graph.getNodeIdByContentKey(bundle.id);\n\n    let bundleGroupNodeIds = this._graph.getNodeIdsConnectedTo(\n      bundleNodeId,\n      bundleGraphEdgeTypes.bundle,\n    );\n    this._graph.removeNode(bundleNodeId);\n\n    let removedBundleGroups: Set<BundleGroup> = new Set();\n    // Remove bundle group node if it no longer has any bundles\n    for (let bundleGroupNodeId of bundleGroupNodeIds) {\n      let bundleGroupNode = nullthrows(this._graph.getNode(bundleGroupNodeId));\n      invariant(bundleGroupNode.type === 'bundle_group');\n      let bundleGroup = bundleGroupNode.value;\n\n      if (\n        // If the bundle group's entry asset belongs to this bundle, the group\n        // was created because of this bundle. Remove the group.\n        bundle.entryAssetIds.includes(bundleGroup.entryAssetId) ||\n        // If the bundle group is now empty, remove it.\n        this.getBundlesInBundleGroup(bundleGroup, {includeInline: true})\n          .length === 0\n      ) {\n        removedBundleGroups.add(bundleGroup);\n        this.removeBundleGroup(bundleGroup);\n      }\n    }\n\n    this._bundleContentHashes.delete(bundle.id);\n    return removedBundleGroups;\n  }\n\n  removeBundleGroup(bundleGroup: BundleGroup) {\n    let bundleGroupNode = nullthrows(\n      this._graph.getNodeByContentKey(getBundleGroupId(bundleGroup)),\n    );\n    invariant(bundleGroupNode.type === 'bundle_group');\n\n    let bundlesInGroup = this.getBundlesInBundleGroup(bundleGroupNode.value, {\n      includeInline: true,\n    });\n    for (let bundle of bundlesInGroup) {\n      if (this.getBundleGroupsContainingBundle(bundle).length === 1) {\n        let removedBundleGroups = this.removeBundle(bundle);\n        if (removedBundleGroups.has(bundleGroup)) {\n          // This function can be reentered through removeBundle above. In the case this\n          // bundle group has already been removed, stop.\n          return;\n        }\n      }\n    }\n\n    // This function can be reentered through removeBundle above. In this case,\n    // the node may already been removed.\n    if (this._graph.hasContentKey(bundleGroupNode.id)) {\n      this._graph.removeNode(\n        this._graph.getNodeIdByContentKey(bundleGroupNode.id),\n      );\n    }\n\n    assert(\n      bundlesInGroup.every(\n        bundle => this.getBundleGroupsContainingBundle(bundle).length > 0,\n      ),\n    );\n  }\n\n  _removeExternalDependency(bundle: Bundle, dependency: Dependency) {\n    let bundleNodeId = this._graph.getNodeIdByContentKey(bundle.id);\n    for (let bundleGroupNode of this._graph\n      .getNodeIdsConnectedFrom(this._graph.getNodeIdByContentKey(dependency.id))\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .filter(node => node.type === 'bundle_group')) {\n      let bundleGroupNodeId = this._graph.getNodeIdByContentKey(\n        bundleGroupNode.id,\n      );\n\n      if (\n        !this._graph.hasEdge(\n          bundleNodeId,\n          bundleGroupNodeId,\n          bundleGraphEdgeTypes.bundle,\n        )\n      ) {\n        continue;\n      }\n\n      let inboundDependencies = this._graph\n        .getNodeIdsConnectedTo(bundleGroupNodeId)\n        .map(id => nullthrows(this._graph.getNode(id)))\n        .filter(node => node.type === 'dependency')\n        .map(node => {\n          invariant(node.type === 'dependency');\n          return node.value;\n        });\n\n      // If every inbound dependency to this bundle group does not belong to this bundle,\n      // or the dependency is internal to the bundle, then the connection between\n      // this bundle and the group is safe to remove.\n      if (\n        inboundDependencies.every(\n          dependency =>\n            dependency.specifierType !== SpecifierType.url &&\n            (!this.bundleHasDependency(bundle, dependency) ||\n              this._graph.hasEdge(\n                bundleNodeId,\n                this._graph.getNodeIdByContentKey(dependency.id),\n                bundleGraphEdgeTypes.internal_async,\n              )),\n        )\n      ) {\n        this._graph.removeEdge(\n          bundleNodeId,\n          bundleGroupNodeId,\n          bundleGraphEdgeTypes.bundle,\n        );\n      }\n    }\n  }\n\n  createAssetReference(\n    dependency: Dependency,\n    asset: Asset,\n    bundle: Bundle,\n  ): void {\n    let dependencyId = this._graph.getNodeIdByContentKey(dependency.id);\n    let assetId = this._graph.getNodeIdByContentKey(asset.id);\n    let bundleId = this._graph.getNodeIdByContentKey(bundle.id);\n    this._graph.addEdge(dependencyId, assetId, bundleGraphEdgeTypes.references);\n\n    this._graph.addEdge(\n      dependencyId,\n      bundleId,\n      bundleGraphEdgeTypes.references,\n    );\n    this.markDependencyReferenceable(dependency);\n    if (this._graph.hasEdge(dependencyId, assetId)) {\n      this._graph.removeEdge(dependencyId, assetId);\n    }\n  }\n\n  createBundleReference(from: Bundle, to: Bundle): void {\n    this._graph.addEdge(\n      this._graph.getNodeIdByContentKey(from.id),\n      this._graph.getNodeIdByContentKey(to.id),\n      bundleGraphEdgeTypes.references,\n    );\n  }\n\n  getBundlesWithAsset(asset: Asset): Array<Bundle> {\n    return this._graph\n      .getNodeIdsConnectedTo(\n        this._graph.getNodeIdByContentKey(asset.id),\n        bundleGraphEdgeTypes.contains,\n      )\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .filter(node => node.type === 'bundle')\n      .map(node => {\n        invariant(node.type === 'bundle');\n        return node.value;\n      });\n  }\n\n  getBundlesWithDependency(dependency: Dependency): Array<Bundle> {\n    return this._graph\n      .getNodeIdsConnectedTo(\n        nullthrows(this._graph.getNodeIdByContentKey(dependency.id)),\n        bundleGraphEdgeTypes.contains,\n      )\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .filter(node => node.type === 'bundle')\n      .map(node => {\n        invariant(node.type === 'bundle');\n        return node.value;\n      });\n  }\n\n  getDependencyAssets(dependency: Dependency): Array<Asset> {\n    return this._graph\n      .getNodeIdsConnectedFrom(this._graph.getNodeIdByContentKey(dependency.id))\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .filter(node => node.type === 'asset')\n      .map(node => {\n        invariant(node.type === 'asset');\n        return node.value;\n      });\n  }\n\n  getResolvedAsset(dep: Dependency, bundle: ?Bundle): ?Asset {\n    let assets = this.getDependencyAssets(dep);\n    let firstAsset = assets[0];\n    let resolved =\n      // If no bundle is specified, use the first concrete asset.\n      bundle == null\n        ? firstAsset\n        : // Otherwise, find the first asset that belongs to this bundle.\n          assets.find(asset => this.bundleHasAsset(bundle, asset)) ||\n          assets.find(a => a.type === bundle.type) ||\n          firstAsset;\n\n    // If a resolution still hasn't been found, return the first referenced asset.\n    if (resolved == null) {\n      let potential = [];\n      this._graph.traverse(\n        (nodeId, _, traversal) => {\n          let node = nullthrows(this._graph.getNode(nodeId));\n          if (node.type === 'asset') {\n            potential.push(node.value);\n          } else if (node.id !== dep.id) {\n            traversal.skipChildren();\n          }\n        },\n        this._graph.getNodeIdByContentKey(dep.id),\n        bundleGraphEdgeTypes.references,\n      );\n\n      if (bundle) {\n        resolved = potential.find(a => a.type === bundle.type);\n      }\n      resolved ||= potential[0];\n    }\n\n    return resolved;\n  }\n\n  getDependencies(asset: Asset): Array<Dependency> {\n    let nodeId = this._graph.getNodeIdByContentKey(asset.id);\n    return this._graph.getNodeIdsConnectedFrom(nodeId).map(id => {\n      let node = nullthrows(this._graph.getNode(id));\n      invariant(node.type === 'dependency');\n      return node.value;\n    });\n  }\n\n  traverseAssets<TContext>(\n    bundle: Bundle,\n    visit: GraphVisitor<Asset, TContext>,\n    startAsset?: Asset,\n  ): ?TContext {\n    return this.traverseBundle(\n      bundle,\n      mapVisitor(node => (node.type === 'asset' ? node.value : null), visit),\n      startAsset,\n    );\n  }\n\n  isAssetReferenced(bundle: Bundle, asset: Asset): boolean {\n    // If the asset is available in multiple bundles in the same target, it's referenced.\n    if (\n      this.getBundlesWithAsset(asset).filter(\n        b =>\n          b.target.name === bundle.target.name &&\n          b.target.distDir === bundle.target.distDir,\n      ).length > 1\n    ) {\n      return true;\n    }\n\n    let assetNodeId = nullthrows(this._graph.getNodeIdByContentKey(asset.id));\n\n    if (\n      this._graph\n        .getNodeIdsConnectedTo(assetNodeId, bundleGraphEdgeTypes.references)\n        .some(id => {\n          let node = this._graph.getNode(id);\n          return (\n            node?.type === 'dependency' &&\n            !node.value.isEntry &&\n            (this._graph\n              .getNodeIdsConnectedFrom(id)\n              .some(id => this._graph.getNode(id)?.type === 'bundle_group') ||\n              this._graph.getNodeIdsConnectedTo(\n                id,\n                bundleGraphEdgeTypes.internal_async,\n              ).length > 0)\n          );\n        })\n    ) {\n      // If this asset is referenced by any async dependency, it's referenced.\n      return true;\n    }\n\n    let dependencies = this._graph\n      .getNodeIdsConnectedTo(assetNodeId)\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .filter(node => node.type === 'dependency')\n      .map(node => {\n        invariant(node.type === 'dependency');\n        return node.value;\n      });\n\n    const bundleHasReference = (bundle: Bundle) => {\n      return (\n        !this.bundleHasAsset(bundle, asset) &&\n        dependencies.some(dependency =>\n          this.bundleHasDependency(bundle, dependency),\n        )\n      );\n    };\n\n    let visitedBundles: Set<Bundle> = new Set();\n    let siblingBundles = new Set(\n      this.getBundleGroupsContainingBundle(bundle).flatMap(bundleGroup =>\n        this.getBundlesInBundleGroup(bundleGroup, {includeInline: true}),\n      ),\n    );\n\n    // Check if any of this bundle's descendants, referencers, bundles referenced\n    // by referencers, or descendants of its referencers use the asset without\n    // an explicit reference edge. This can happen if e.g. the asset has been\n    // deduplicated.\n    return [...siblingBundles].some(referencer => {\n      let isReferenced = false;\n      this.traverseBundles((descendant, _, actions) => {\n        if (descendant.id === bundle.id) {\n          return;\n        }\n\n        if (visitedBundles.has(descendant)) {\n          actions.skipChildren();\n          return;\n        }\n\n        visitedBundles.add(descendant);\n\n        if (\n          descendant.type !== bundle.type ||\n          ISOLATED_ENVS.has(descendant.env.context)\n        ) {\n          actions.skipChildren();\n          return;\n        }\n\n        if (bundleHasReference(descendant)) {\n          isReferenced = true;\n          actions.stop();\n          return;\n        }\n      }, referencer);\n\n      return isReferenced;\n    });\n  }\n\n  hasParentBundleOfType(bundle: Bundle, type: string): boolean {\n    let parents = this.getParentBundles(bundle);\n    return (\n      parents.length > 0 &&\n      parents.every(\n        parent =>\n          parent.type === type && parent.env.context === bundle.env.context,\n      )\n    );\n  }\n\n  getParentBundles(bundle: Bundle): Array<Bundle> {\n    let parentBundles: Set<Bundle> = new Set();\n    for (let bundleGroup of this.getBundleGroupsContainingBundle(bundle)) {\n      for (let parentBundle of this.getParentBundlesOfBundleGroup(\n        bundleGroup,\n      )) {\n        parentBundles.add(parentBundle);\n      }\n    }\n\n    return [...parentBundles];\n  }\n\n  isAssetReachableFromBundle(asset: Asset, bundle: Bundle): boolean {\n    // If a bundle's environment is isolated, it can't access assets present\n    // in any ancestor bundles. Don't consider any assets reachable.\n    if (\n      ISOLATED_ENVS.has(bundle.env.context) ||\n      !bundle.isSplittable ||\n      bundle.bundleBehavior === BundleBehavior.isolated ||\n      bundle.bundleBehavior === BundleBehavior.inline\n    ) {\n      return false;\n    }\n\n    // For an asset to be reachable from a bundle, it must either exist in a sibling bundle,\n    // or in an ancestor bundle group reachable from all parent bundles.\n    let bundleGroups = this.getBundleGroupsContainingBundle(bundle);\n    return bundleGroups.every(bundleGroup => {\n      // If the asset is in any sibling bundles of the original bundle, it is reachable.\n      let bundles = this.getBundlesInBundleGroup(bundleGroup);\n      if (\n        bundles.some(\n          b =>\n            b.id !== bundle.id &&\n            b.bundleBehavior !== BundleBehavior.isolated &&\n            b.bundleBehavior !== BundleBehavior.inline &&\n            this.bundleHasAsset(b, asset),\n        )\n      ) {\n        return true;\n      }\n\n      // Get a list of parent bundle nodes pointing to the bundle group\n      let parentBundleNodes = this._graph.getNodeIdsConnectedTo(\n        this._graph.getNodeIdByContentKey(getBundleGroupId(bundleGroup)),\n        bundleGraphEdgeTypes.bundle,\n      );\n\n      // Check that every parent bundle has a bundle group in its ancestry that contains the asset.\n      return parentBundleNodes.every(bundleNodeId => {\n        let bundleNode = nullthrows(this._graph.getNode(bundleNodeId));\n        if (\n          bundleNode.type !== 'bundle' ||\n          bundleNode.value.bundleBehavior === BundleBehavior.isolated ||\n          bundleNode.value.bundleBehavior === BundleBehavior.inline\n        ) {\n          return false;\n        }\n\n        let isReachable = true;\n        this._graph.traverseAncestors(\n          bundleNodeId,\n          (nodeId, ctx, actions) => {\n            let node = nullthrows(this._graph.getNode(nodeId));\n            // If we've reached the root or a context change without\n            // finding this asset in the ancestry, it is not reachable.\n            if (\n              node.type === 'root' ||\n              (node.type === 'bundle' &&\n                (node.value.id === bundle.id ||\n                  ISOLATED_ENVS.has(node.value.env.context)))\n            ) {\n              isReachable = false;\n              actions.stop();\n              return;\n            }\n\n            if (node.type === 'bundle_group') {\n              let childBundles = this.getBundlesInBundleGroup(node.value);\n              if (\n                childBundles.some(\n                  b =>\n                    b.id !== bundle.id &&\n                    b.bundleBehavior !== BundleBehavior.isolated &&\n                    b.bundleBehavior !== BundleBehavior.inline &&\n                    this.bundleHasAsset(b, asset),\n                )\n              ) {\n                actions.skipChildren();\n                return;\n              }\n            }\n          },\n          [bundleGraphEdgeTypes.references, bundleGraphEdgeTypes.bundle],\n        );\n\n        return isReachable;\n      });\n    });\n  }\n\n  /**\n   * TODO: Document why this works like this & why visitor order matters\n   * on these use-cases.\n   */\n  traverseBundle<TContext>(\n    bundle: Bundle,\n    visit: GraphVisitor<AssetNode | DependencyNode, TContext>,\n    startAsset?: Asset,\n  ): ?TContext {\n    let entries = !startAsset;\n    let bundleNodeId = this._graph.getNodeIdByContentKey(bundle.id);\n\n    // A modified DFS traversal which traverses entry assets in the same order\n    // as their ids appear in `bundle.entryAssetIds`.\n    return this._graph.dfs({\n      visit: mapVisitor((nodeId, actions) => {\n        let node = nullthrows(this._graph.getNode(nodeId));\n\n        if (nodeId === bundleNodeId) {\n          return;\n        }\n\n        if (node.type === 'dependency' || node.type === 'asset') {\n          if (\n            this._graph.hasEdge(\n              bundleNodeId,\n              nodeId,\n              bundleGraphEdgeTypes.contains,\n            )\n          ) {\n            return node;\n          }\n        }\n\n        actions.skipChildren();\n      }, visit),\n      startNodeId: startAsset\n        ? this._graph.getNodeIdByContentKey(startAsset.id)\n        : bundleNodeId,\n      getChildren: nodeId => {\n        let children = this._graph\n          .getNodeIdsConnectedFrom(nodeId)\n          .map(id => [id, nullthrows(this._graph.getNode(id))]);\n\n        let sorted =\n          entries && bundle.entryAssetIds.length > 0\n            ? children.sort(([, a], [, b]) => {\n                let aIndex = bundle.entryAssetIds.indexOf(a.id);\n                let bIndex = bundle.entryAssetIds.indexOf(b.id);\n\n                if (aIndex === bIndex) {\n                  // If both don't exist in the entry asset list, or\n                  // otherwise have the same index.\n                  return 0;\n                } else if (aIndex === -1) {\n                  return 1;\n                } else if (bIndex === -1) {\n                  return -1;\n                }\n\n                return aIndex - bIndex;\n              })\n            : children;\n\n        entries = false;\n        return sorted.map(([id]) => id);\n      },\n    });\n  }\n\n  traverse<TContext>(\n    visit: GraphVisitor<AssetNode | DependencyNode, TContext>,\n    start?: Asset,\n  ): ?TContext {\n    return this._graph.filteredTraverse(\n      nodeId => {\n        let node = nullthrows(this._graph.getNode(nodeId));\n        if (node.type === 'asset' || node.type === 'dependency') {\n          return node;\n        }\n      },\n      visit,\n      start ? this._graph.getNodeIdByContentKey(start.id) : undefined, // start with root\n      ALL_EDGE_TYPES,\n    );\n  }\n\n  getChildBundles(bundle: Bundle): Array<Bundle> {\n    let siblings = new Set(this.getReferencedBundles(bundle));\n    let bundles = [];\n    this.traverseBundles((b, _, actions) => {\n      if (bundle.id === b.id) {\n        return;\n      }\n\n      if (!siblings.has(b)) {\n        bundles.push(b);\n      }\n\n      actions.skipChildren();\n    }, bundle);\n    return bundles;\n  }\n\n  traverseBundles<TContext>(\n    visit: GraphVisitor<Bundle, TContext>,\n    startBundle: ?Bundle,\n  ): ?TContext {\n    return this._graph.filteredTraverse(\n      nodeId => {\n        let node = nullthrows(this._graph.getNode(nodeId));\n        return node.type === 'bundle' ? node.value : null;\n      },\n      visit,\n      startBundle ? this._graph.getNodeIdByContentKey(startBundle.id) : null,\n      [bundleGraphEdgeTypes.bundle, bundleGraphEdgeTypes.references],\n    );\n  }\n\n  getBundles(opts?: {|includeInline: boolean|}): Array<Bundle> {\n    let bundles = [];\n    this.traverseBundles(bundle => {\n      if (\n        opts?.includeInline ||\n        bundle.bundleBehavior !== BundleBehavior.inline\n      ) {\n        bundles.push(bundle);\n      }\n    });\n\n    return bundles;\n  }\n\n  getTotalSize(asset: Asset): number {\n    let size = 0;\n    this._graph.traverse((nodeId, _, actions) => {\n      let node = nullthrows(this._graph.getNode(nodeId));\n      if (node.type === 'bundle_group') {\n        actions.skipChildren();\n        return;\n      }\n\n      if (node.type === 'asset') {\n        size += node.value.stats.size;\n      }\n    }, this._graph.getNodeIdByContentKey(asset.id));\n    return size;\n  }\n\n  getReferencingBundles(bundle: Bundle): Array<Bundle> {\n    let referencingBundles: Set<Bundle> = new Set();\n\n    this._graph.traverseAncestors(\n      this._graph.getNodeIdByContentKey(bundle.id),\n      nodeId => {\n        let node = nullthrows(this._graph.getNode(nodeId));\n        if (node.type === 'bundle' && node.value.id !== bundle.id) {\n          referencingBundles.add(node.value);\n        }\n      },\n      bundleGraphEdgeTypes.references,\n    );\n\n    return [...referencingBundles];\n  }\n\n  getBundleGroupsContainingBundle(bundle: Bundle): Array<BundleGroup> {\n    let bundleGroups: Set<BundleGroup> = new Set();\n\n    for (let currentBundle of [bundle, ...this.getReferencingBundles(bundle)]) {\n      for (let bundleGroup of this.getDirectParentBundleGroups(currentBundle)) {\n        bundleGroups.add(bundleGroup);\n      }\n    }\n\n    return [...bundleGroups];\n  }\n\n  getDirectParentBundleGroups(bundle: Bundle): Array<BundleGroup> {\n    return this._graph\n      .getNodeIdsConnectedTo(\n        nullthrows(this._graph.getNodeIdByContentKey(bundle.id)),\n        bundleGraphEdgeTypes.bundle,\n      )\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .filter(node => node.type === 'bundle_group')\n      .map(node => {\n        invariant(node.type === 'bundle_group');\n        return node.value;\n      });\n  }\n\n  getBundlesInBundleGroup(\n    bundleGroup: BundleGroup,\n    opts?: {|\n      recursive?: boolean,\n      includeInline?: boolean,\n      includeIsolated?: boolean,\n    |},\n  ): Array<Bundle> {\n    let recursive = opts?.recursive ?? true;\n    let includeInline = opts?.includeInline ?? false;\n    let includeIsolated = opts?.includeIsolated ?? true;\n    let bundles: Set<Bundle> = new Set();\n    for (let bundleNodeId of this._graph.getNodeIdsConnectedFrom(\n      this._graph.getNodeIdByContentKey(getBundleGroupId(bundleGroup)),\n      bundleGraphEdgeTypes.bundle,\n    )) {\n      let bundleNode = nullthrows(this._graph.getNode(bundleNodeId));\n      invariant(bundleNode.type === 'bundle');\n      let bundle = bundleNode.value;\n      if (\n        bundle.bundleBehavior == null ||\n        (includeInline && bundle.bundleBehavior === BundleBehavior.inline) ||\n        (includeIsolated && bundle.bundleBehavior === BundleBehavior.isolated)\n      ) {\n        bundles.add(bundle);\n      }\n\n      if (recursive) {\n        for (let referencedBundle of this.getReferencedBundles(bundle, opts)) {\n          bundles.add(referencedBundle);\n        }\n      }\n    }\n\n    return [...bundles];\n  }\n\n  getReferencedBundles(\n    bundle: Bundle,\n    opts?: {|\n      recursive?: boolean,\n      includeInline?: boolean,\n      includeIsolated?: boolean,\n    |},\n  ): Array<Bundle> {\n    let recursive = opts?.recursive ?? true;\n    let includeInline = opts?.includeInline ?? false;\n    let includeIsolated = opts?.includeIsolated ?? true;\n    let referencedBundles = new Set();\n    this._graph.dfs({\n      visit: (nodeId, _, actions) => {\n        let node = nullthrows(this._graph.getNode(nodeId));\n        if (node.type !== 'bundle') {\n          return;\n        }\n\n        if (node.value.id === bundle.id) {\n          return;\n        }\n\n        if (\n          node.value.bundleBehavior == null ||\n          (includeInline &&\n            node.value.bundleBehavior === BundleBehavior.inline) ||\n          (includeIsolated &&\n            node.value.bundleBehavior === BundleBehavior.isolated)\n        ) {\n          referencedBundles.add(node.value);\n        } else if (node.value.bundleBehavior === BundleBehavior.isolated) {\n          actions.skipChildren();\n        }\n\n        if (!recursive) {\n          actions.skipChildren();\n        }\n      },\n      startNodeId: this._graph.getNodeIdByContentKey(bundle.id),\n      getChildren: nodeId =>\n        // Shared bundles seem to depend on being used in the opposite order\n        // they were added.\n        // TODO: Should this be the case?\n        this._graph.getNodeIdsConnectedFrom(\n          nodeId,\n          bundleGraphEdgeTypes.references,\n        ),\n    });\n\n    return [...referencedBundles];\n  }\n\n  getIncomingDependencies(asset: Asset): Array<Dependency> {\n    if (!this._graph.hasContentKey(asset.id)) {\n      return [];\n    }\n    // Dependencies can be a a parent node via an untyped edge (like in the AssetGraph but without AssetGroups)\n    // or they can be parent nodes via a 'references' edge\n    return this._graph\n      .getNodeIdsConnectedTo(\n        this._graph.getNodeIdByContentKey(asset.id),\n        ALL_EDGE_TYPES,\n      )\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .filter(n => n.type === 'dependency')\n      .map(n => {\n        invariant(n.type === 'dependency');\n        return n.value;\n      });\n  }\n\n  getAssetWithDependency(dep: Dependency): ?Asset {\n    if (!this._graph.hasContentKey(dep.id)) {\n      return null;\n    }\n\n    let res = this._graph.getNodeIdsConnectedTo(\n      this._graph.getNodeIdByContentKey(dep.id),\n    );\n    invariant(\n      res.length <= 1,\n      'Expected a single asset to be connected to a dependency',\n    );\n    let resNode = this._graph.getNode(res[0]);\n    if (resNode?.type === 'asset') {\n      return resNode.value;\n    }\n  }\n\n  bundleHasAsset(bundle: Bundle, asset: Asset): boolean {\n    let bundleNodeId = this._graph.getNodeIdByContentKey(bundle.id);\n    let assetNodeId = this._graph.getNodeIdByContentKey(asset.id);\n    return this._graph.hasEdge(\n      bundleNodeId,\n      assetNodeId,\n      bundleGraphEdgeTypes.contains,\n    );\n  }\n\n  bundleHasDependency(bundle: Bundle, dependency: Dependency): boolean {\n    let bundleNodeId = this._graph.getNodeIdByContentKey(bundle.id);\n    let dependencyNodeId = this._graph.getNodeIdByContentKey(dependency.id);\n    return this._graph.hasEdge(\n      bundleNodeId,\n      dependencyNodeId,\n      bundleGraphEdgeTypes.contains,\n    );\n  }\n\n  filteredTraverse<TValue, TContext>(\n    bundleNodeId: NodeId,\n    filter: (NodeId, TraversalActions) => ?TValue,\n    visit: GraphVisitor<TValue, TContext>,\n  ): ?TContext {\n    return this._graph.filteredTraverse(filter, visit, bundleNodeId);\n  }\n\n  getSymbolResolution(\n    asset: Asset,\n    symbol: Symbol,\n    boundary: ?Bundle,\n  ): InternalSymbolResolution {\n    let assetOutside = boundary && !this.bundleHasAsset(boundary, asset);\n\n    let identifier = asset.symbols?.get(symbol)?.local;\n    if (symbol === '*') {\n      return {\n        asset,\n        exportSymbol: '*',\n        symbol: identifier ?? null,\n        loc: asset.symbols?.get(symbol)?.loc,\n      };\n    }\n\n    let found = false;\n    let nonStaticDependency = false;\n    let skipped = false;\n    let deps = this.getDependencies(asset).reverse();\n    let potentialResults = [];\n    for (let dep of deps) {\n      let depSymbols = dep.symbols;\n      if (!depSymbols) {\n        nonStaticDependency = true;\n        continue;\n      }\n      // If this is a re-export, find the original module.\n      let symbolLookup = new Map(\n        [...depSymbols].map(([key, val]) => [val.local, key]),\n      );\n      let depSymbol = symbolLookup.get(identifier);\n      if (depSymbol != null) {\n        let resolved = this.getResolvedAsset(dep, boundary);\n        if (!resolved || resolved.id === asset.id) {\n          // External module or self-reference\n          return {\n            asset,\n            exportSymbol: symbol,\n            symbol: identifier,\n            loc: asset.symbols?.get(symbol)?.loc,\n          };\n        }\n\n        if (assetOutside) {\n          // We found the symbol, but `asset` is outside, return `asset` and the original symbol\n          found = true;\n          break;\n        }\n\n        if (this.isDependencySkipped(dep)) {\n          // We found the symbol and `dep` was skipped\n          skipped = true;\n          break;\n        }\n\n        let {\n          asset: resolvedAsset,\n          symbol: resolvedSymbol,\n          exportSymbol,\n          loc,\n        } = this.getSymbolResolution(resolved, depSymbol, boundary);\n\n        if (!loc) {\n          // Remember how we got there\n          loc = asset.symbols?.get(symbol)?.loc;\n        }\n\n        return {\n          asset: resolvedAsset,\n          symbol: resolvedSymbol,\n          exportSymbol,\n          loc,\n        };\n      }\n      // If this module exports wildcards, resolve the original module.\n      // Default exports are excluded from wildcard exports.\n      // Wildcard reexports are never listed in the reexporting asset's symbols.\n      if (\n        identifier == null &&\n        depSymbols.get('*')?.local === '*' &&\n        symbol !== 'default'\n      ) {\n        let resolved = this.getResolvedAsset(dep, boundary);\n        if (!resolved) {\n          continue;\n        }\n        let result = this.getSymbolResolution(resolved, symbol, boundary);\n\n        // We found the symbol\n        if (result.symbol != undefined) {\n          if (assetOutside) {\n            // ..., but `asset` is outside, return `asset` and the original symbol\n            found = true;\n            break;\n          }\n          if (this.isDependencySkipped(dep)) {\n            // We found the symbol and `dep` was skipped\n            skipped = true;\n            break;\n          }\n\n          return {\n            asset: result.asset,\n            symbol: result.symbol,\n            exportSymbol: result.exportSymbol,\n            loc: resolved.symbols?.get(symbol)?.loc,\n          };\n        }\n        if (result.symbol === null) {\n          found = true;\n          if (boundary && !this.bundleHasAsset(boundary, result.asset)) {\n            // If the returned asset is outside (and it's the first asset that is outside), return it.\n            if (!assetOutside) {\n              return {\n                asset: result.asset,\n                symbol: result.symbol,\n                exportSymbol: result.exportSymbol,\n                loc: resolved.symbols?.get(symbol)?.loc,\n              };\n            } else {\n              // Otherwise the original asset will be returned at the end.\n              break;\n            }\n          } else {\n            // We didn't find it in this dependency, but it might still be there: bailout.\n            // Continue searching though, with the assumption that there are no conficting reexports\n            // and there might be a another (re)export (where we might statically find the symbol).\n            potentialResults.push({\n              asset: result.asset,\n              symbol: result.symbol,\n              exportSymbol: result.exportSymbol,\n              loc: resolved.symbols?.get(symbol)?.loc,\n            });\n          }\n        }\n      }\n    }\n\n    // We didn't find the exact symbol...\n    if (potentialResults.length == 1) {\n      // ..., but if it does exist, it has to be behind this one reexport.\n      return potentialResults[0];\n    } else {\n      let result = identifier;\n      if (skipped) {\n        // ... and it was excluded (by symbol propagation) or deferred.\n        result = false;\n      } else {\n        // ... and there is no single reexport, but it might still be exported:\n        if (found) {\n          // Fallback to namespace access, because of a bundle boundary.\n          result = null;\n        } else if (result === undefined) {\n          // If not exported explicitly by the asset (= would have to be in * or a reexport-all) ...\n          if (nonStaticDependency || asset.symbols?.has('*')) {\n            // ... and if there are non-statically analyzable dependencies or it's a CJS asset,\n            // fallback to namespace access.\n            result = null;\n          }\n          // (It shouldn't be possible for the symbol to be in a reexport-all and to end up here).\n          // Otherwise return undefined to report that the symbol wasn't found.\n        }\n      }\n\n      return {\n        asset,\n        exportSymbol: symbol,\n        symbol: result,\n        loc: asset.symbols?.get(symbol)?.loc,\n      };\n    }\n  }\n  getAssetById(contentKey: string): Asset {\n    let node = this._graph.getNodeByContentKey(contentKey);\n    if (node == null) {\n      throw new Error('Node not found');\n    } else if (node.type !== 'asset') {\n      throw new Error('Node was not an asset');\n    }\n\n    return node.value;\n  }\n\n  getAssetPublicId(asset: Asset): string {\n    let publicId = this._publicIdByAssetId.get(asset.id);\n    if (publicId == null) {\n      throw new Error(\"Asset or it's public id not found\");\n    }\n\n    return publicId;\n  }\n\n  getExportedSymbols(\n    asset: Asset,\n    boundary: ?Bundle,\n  ): Array<InternalExportSymbolResolution> {\n    if (!asset.symbols) {\n      return [];\n    }\n\n    let symbols = [];\n\n    for (let symbol of asset.symbols.keys()) {\n      symbols.push({\n        ...this.getSymbolResolution(asset, symbol, boundary),\n        exportAs: symbol,\n      });\n    }\n\n    let deps = this.getDependencies(asset);\n    for (let dep of deps) {\n      let depSymbols = dep.symbols;\n      if (!depSymbols) continue;\n\n      if (depSymbols.get('*')?.local === '*') {\n        let resolved = this.getResolvedAsset(dep, boundary);\n        if (!resolved) continue;\n        let exported = this.getExportedSymbols(resolved, boundary)\n          .filter(s => s.exportSymbol !== 'default')\n          .map(s =>\n            s.exportSymbol !== '*' ? {...s, exportAs: s.exportSymbol} : s,\n          );\n        symbols.push(...exported);\n      }\n    }\n\n    return symbols;\n  }\n\n  getContentHash(bundle: Bundle): string {\n    let existingHash = this._bundleContentHashes.get(bundle.id);\n    if (existingHash != null) {\n      return existingHash;\n    }\n\n    let hash = new Hash();\n    // TODO: sort??\n    this.traverseAssets(bundle, asset => {\n      {\n        hash.writeString(\n          [this.getAssetPublicId(asset), asset.id, asset.outputHash].join(':'),\n        );\n      }\n    });\n\n    let hashHex = hash.finish();\n    this._bundleContentHashes.set(bundle.id, hashHex);\n    return hashHex;\n  }\n\n  getInlineBundles(bundle: Bundle): Array<Bundle> {\n    let bundles = [];\n    let seen = new Set();\n    let addReferencedBundles = bundle => {\n      if (seen.has(bundle.id)) {\n        return;\n      }\n\n      seen.add(bundle.id);\n\n      let referencedBundles = this.getReferencedBundles(bundle, {\n        includeInline: true,\n      });\n      for (let referenced of referencedBundles) {\n        if (referenced.bundleBehavior === BundleBehavior.inline) {\n          bundles.push(referenced);\n          addReferencedBundles(referenced);\n        }\n      }\n    };\n\n    addReferencedBundles(bundle);\n\n    this.traverseBundles((childBundle, _, traversal) => {\n      if (childBundle.id === bundle.id) {\n        return;\n      }\n\n      if (childBundle.bundleBehavior === BundleBehavior.inline) {\n        bundles.push(childBundle);\n      } else {\n        traversal.skipChildren();\n      }\n    }, bundle);\n\n    return bundles;\n  }\n\n  getHash(bundle: Bundle): string {\n    let hash = new Hash();\n    hash.writeString(\n      bundle.id + JSON.stringify(bundle.target) + this.getContentHash(bundle),\n    );\n\n    if (bundle.isPlaceholder) {\n      hash.writeString('placeholder');\n    }\n\n    let inlineBundles = this.getInlineBundles(bundle);\n    for (let inlineBundle of inlineBundles) {\n      hash.writeString(this.getContentHash(inlineBundle));\n    }\n\n    for (let referencedBundle of this.getReferencedBundles(bundle)) {\n      hash.writeString(referencedBundle.id);\n    }\n\n    hash.writeString(JSON.stringify(objectSortedEntriesDeep(bundle.env)));\n    return hash.finish();\n  }\n\n  getBundleGraphHash(): string {\n    let hashes = '';\n    for (let bundle of this.getBundles()) {\n      hashes += this.getHash(bundle);\n    }\n\n    return hashString(hashes);\n  }\n\n  addBundleToBundleGroup(bundle: Bundle, bundleGroup: BundleGroup) {\n    let bundleGroupNodeId = this._graph.getNodeIdByContentKey(\n      getBundleGroupId(bundleGroup),\n    );\n    let bundleNodeId = this._graph.getNodeIdByContentKey(bundle.id);\n    if (\n      this._graph.hasEdge(\n        bundleGroupNodeId,\n        bundleNodeId,\n        bundleGraphEdgeTypes.bundle,\n      )\n    ) {\n      // Bundle group already has bundle\n      return;\n    }\n\n    this._graph.addEdge(bundleGroupNodeId, bundleNodeId);\n    this._graph.addEdge(\n      bundleGroupNodeId,\n      bundleNodeId,\n      bundleGraphEdgeTypes.bundle,\n    );\n\n    for (let entryAssetId of bundle.entryAssetIds) {\n      let entryAssetNodeId = this._graph.getNodeIdByContentKey(entryAssetId);\n      if (this._graph.hasEdge(bundleGroupNodeId, entryAssetNodeId)) {\n        this._graph.removeEdge(bundleGroupNodeId, entryAssetNodeId);\n      }\n    }\n  }\n\n  getUsedSymbolsAsset(asset: Asset): ?$ReadOnlySet<Symbol> {\n    let node = this._graph.getNodeByContentKey(asset.id);\n    invariant(node && node.type === 'asset');\n    return node.value.symbols\n      ? makeReadOnlySet(new Set(node.usedSymbols.keys()))\n      : null;\n  }\n\n  getUsedSymbolsDependency(dep: Dependency): ?$ReadOnlySet<Symbol> {\n    let node = this._graph.getNodeByContentKey(dep.id);\n    invariant(node && node.type === 'dependency');\n    return node.value.symbols\n      ? makeReadOnlySet(new Set(node.usedSymbolsUp.keys()))\n      : null;\n  }\n\n  merge(other: BundleGraph) {\n    let otherGraphIdToThisNodeId = new Map<NodeId, NodeId>();\n    for (let [otherNodeId, otherNode] of other._graph.nodes.entries()) {\n      if (!otherNode) continue;\n      if (this._graph.hasContentKey(otherNode.id)) {\n        let existingNodeId = this._graph.getNodeIdByContentKey(otherNode.id);\n        otherGraphIdToThisNodeId.set(otherNodeId, existingNodeId);\n\n        let existingNode = nullthrows(this._graph.getNode(existingNodeId));\n        // Merge symbols, recompute dep.excluded based on that\n        if (existingNode.type === 'asset') {\n          invariant(otherNode.type === 'asset');\n          existingNode.usedSymbols = new Set([\n            ...existingNode.usedSymbols,\n            ...otherNode.usedSymbols,\n          ]);\n        } else if (existingNode.type === 'dependency') {\n          invariant(otherNode.type === 'dependency');\n          existingNode.usedSymbolsDown = new Set([\n            ...existingNode.usedSymbolsDown,\n            ...otherNode.usedSymbolsDown,\n          ]);\n          existingNode.usedSymbolsUp = new Map([\n            ...existingNode.usedSymbolsUp,\n            ...otherNode.usedSymbolsUp,\n          ]);\n\n          existingNode.excluded =\n            (existingNode.excluded || Boolean(existingNode.hasDeferred)) &&\n            (otherNode.excluded || Boolean(otherNode.hasDeferred));\n        }\n      } else {\n        let updateNodeId = this._graph.addNodeByContentKey(\n          otherNode.id,\n          otherNode,\n        );\n        otherGraphIdToThisNodeId.set(otherNodeId, updateNodeId);\n      }\n    }\n\n    for (let edge of other._graph.getAllEdges()) {\n      this._graph.addEdge(\n        nullthrows(otherGraphIdToThisNodeId.get(edge.from)),\n        nullthrows(otherGraphIdToThisNodeId.get(edge.to)),\n        edge.type,\n      );\n    }\n  }\n\n  isEntryBundleGroup(bundleGroup: BundleGroup): boolean {\n    return this._graph\n      .getNodeIdsConnectedTo(\n        nullthrows(\n          this._graph.getNodeIdByContentKey(getBundleGroupId(bundleGroup)),\n        ),\n        bundleGraphEdgeTypes.bundle,\n      )\n      .map(id => nullthrows(this._graph.getNode(id)))\n      .some(n => n.type === 'root');\n  }\n\n  /**\n   * Update the asset in a Bundle Graph and clear the associated Bundle hash.\n   */\n  updateAsset(asset: AssetNode) {\n    this._graph.updateNode(this._graph.getNodeIdByContentKey(asset.id), asset);\n    let bundles = this.getBundlesWithAsset(asset.value);\n    for (let bundle of bundles) {\n      // the bundle content will change with a modified asset\n      this._bundleContentHashes.delete(bundle.id);\n    }\n  }\n\n  getEntryRoot(projectRoot: FilePath, target: Target): FilePath {\n    let cached = this._targetEntryRoots.get(target.distDir);\n    if (cached != null) {\n      return cached;\n    }\n\n    let entryBundleGroupIds = this._graph.getNodeIdsConnectedFrom(\n      nullthrows(this._graph.rootNodeId),\n      bundleGraphEdgeTypes.bundle,\n    );\n\n    let entries = [];\n    for (let bundleGroupId of entryBundleGroupIds) {\n      let bundleGroupNode = this._graph.getNode(bundleGroupId);\n      invariant(bundleGroupNode?.type === 'bundle_group');\n\n      if (bundleGroupNode.value.target.distDir === target.distDir) {\n        let entryAssetNode = this._graph.getNodeByContentKey(\n          bundleGroupNode.value.entryAssetId,\n        );\n        invariant(entryAssetNode?.type === 'asset');\n        entries.push(\n          fromProjectPath(projectRoot, entryAssetNode.value.filePath),\n        );\n      }\n    }\n\n    let root = getRootDir(entries);\n    this._targetEntryRoots.set(target.distDir, root);\n    return root;\n  }\n\n  getEntryBundles(): Array<Bundle> {\n    let entryBundleGroupIds = this._graph.getNodeIdsConnectedFrom(\n      nullthrows(this._graph.rootNodeId),\n      bundleGraphEdgeTypes.bundle,\n    );\n\n    let entries = [];\n    for (let bundleGroupId of entryBundleGroupIds) {\n      let bundleGroupNode = this._graph.getNode(bundleGroupId);\n      invariant(bundleGroupNode?.type === 'bundle_group');\n\n      let entryBundle = this.getBundlesInBundleGroup(\n        bundleGroupNode.value,\n      ).find(b => {\n        let mainEntryId = b.entryAssetIds[b.entryAssetIds.length - 1];\n        return (\n          mainEntryId != null &&\n          bundleGroupNode.value.entryAssetId === mainEntryId\n        );\n      });\n\n      if (entryBundle) {\n        entries.push(entryBundle);\n      }\n    }\n\n    return entries;\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/CommittedAsset.js",
    "content": "// @flow strict-local\n\nimport type {AST, Blob} from '@parcel/types';\nimport type {Asset, Dependency, ParcelOptions} from './types';\n\nimport {Readable} from 'stream';\nimport SourceMap from '@parcel/source-map';\nimport {bufferStream, blobToStream, streamFromPromise} from '@parcel/utils';\nimport {generateFromAST} from './assetUtils';\nimport {deserializeRaw} from './serializer';\n\nexport default class CommittedAsset {\n  key: ?string;\n  value: Asset;\n  options: ParcelOptions;\n  content: ?Promise<Buffer | string>;\n  mapBuffer: ?Promise<?Buffer>;\n  map: ?Promise<?SourceMap>;\n  ast: ?Promise<AST>;\n  idBase: ?string;\n  generatingPromise: ?Promise<void>;\n\n  constructor(value: Asset, options: ParcelOptions) {\n    this.value = value;\n    this.key = this.value.contentKey;\n    this.options = options;\n  }\n\n  getContent(): Blob | Promise<Buffer | string> {\n    if (this.content == null) {\n      if (this.key != null) {\n        if (this.value.isLargeBlob) {\n          return this.options.cache.getStream(this.key);\n        } else {\n          return this.options.cache.getBlob(this.key);\n        }\n      } else if (this.value.astKey != null) {\n        return streamFromPromise(\n          generateFromAST(this).then(({content}) => {\n            if (!(content instanceof Readable)) {\n              this.content = Promise.resolve(content);\n            }\n            return content;\n          }),\n        );\n      } else {\n        throw new Error('Asset has no content');\n      }\n    }\n\n    return this.content;\n  }\n\n  async getCode(): Promise<string> {\n    let content;\n    if (this.content == null && this.key != null) {\n      this.content = this.options.cache.getBlob(this.key);\n      content = await this.content;\n    } else {\n      content = await this.getContent();\n    }\n\n    if (typeof content === 'string' || content instanceof Buffer) {\n      return content.toString();\n    } else if (content != null) {\n      this.content = bufferStream(content);\n      return (await this.content).toString();\n    }\n\n    return '';\n  }\n\n  async getBuffer(): Promise<Buffer> {\n    let content = await this.getContent();\n\n    if (content == null) {\n      return Buffer.alloc(0);\n    } else if (typeof content === 'string' || content instanceof Buffer) {\n      return Buffer.from(content);\n    }\n\n    this.content = bufferStream(content);\n    return this.content;\n  }\n\n  getStream(): Readable {\n    let content = this.getContent();\n    return content instanceof Promise\n      ? streamFromPromise(content)\n      : blobToStream(content);\n  }\n\n  getMapBuffer(): Promise<?Buffer> {\n    let mapKey = this.value.mapKey;\n    if (mapKey != null && this.mapBuffer == null) {\n      this.mapBuffer = (async () => {\n        try {\n          return await this.options.cache.getBlob(mapKey);\n        } catch (err) {\n          if (err.code === 'ENOENT' && this.value.astKey != null) {\n            return (await generateFromAST(this)).map?.toBuffer();\n          } else {\n            throw err;\n          }\n        }\n      })();\n    }\n\n    return this.mapBuffer ?? Promise.resolve();\n  }\n\n  getMap(): Promise<?SourceMap> {\n    if (this.map == null) {\n      this.map = (async () => {\n        let mapBuffer = await this.getMapBuffer();\n        if (mapBuffer) {\n          // Get sourcemap from flatbuffer\n          return new SourceMap(this.options.projectRoot, mapBuffer);\n        }\n      })();\n    }\n\n    return this.map;\n  }\n\n  getAST(): Promise<?AST> {\n    if (this.value.astKey == null) {\n      return Promise.resolve(null);\n    }\n\n    if (this.ast == null) {\n      this.ast = this.options.cache\n        .getBlob(this.value.astKey)\n        .then(serializedAst => deserializeRaw(serializedAst));\n    }\n\n    return this.ast;\n  }\n\n  getDependencies(): Array<Dependency> {\n    return Array.from(this.value.dependencies.values());\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/Dependency.js",
    "content": "// @flow\nimport type {\n  FilePath,\n  Meta,\n  DependencySpecifier,\n  SourceLocation,\n  Symbol,\n  BundleBehavior as IBundleBehavior,\n  SemverRange,\n} from '@parcel/types';\nimport type {Dependency, Environment, Target} from './types';\nimport {hashString} from '@parcel/rust';\nimport {\n  SpecifierType,\n  Priority,\n  BundleBehavior,\n  ExportsCondition,\n} from './types';\n\nimport {toInternalSourceLocation} from './utils';\nimport {toProjectPath} from './projectPath';\n\ntype DependencyOpts = {|\n  id?: string,\n  sourcePath?: FilePath,\n  sourceAssetId?: string,\n  specifier: DependencySpecifier,\n  specifierType: $Keys<typeof SpecifierType>,\n  priority?: $Keys<typeof Priority>,\n  needsStableName?: boolean,\n  bundleBehavior?: ?IBundleBehavior,\n  isEntry?: boolean,\n  isOptional?: boolean,\n  loc?: ?SourceLocation,\n  env: Environment,\n  packageConditions?: Array<string>,\n  meta?: Meta,\n  resolveFrom?: ?FilePath,\n  range?: ?SemverRange,\n  target?: Target,\n  symbols?: ?Map<\n    Symbol,\n    {|local: Symbol, loc: ?SourceLocation, isWeak: boolean, meta?: ?Meta|},\n  >,\n  pipeline?: ?string,\n|};\n\nexport function createDependency(\n  projectRoot: FilePath,\n  opts: DependencyOpts,\n): Dependency {\n  let id =\n    opts.id ||\n    hashString(\n      (opts.sourceAssetId ?? '') +\n        opts.specifier +\n        opts.env.id +\n        (opts.target ? JSON.stringify(opts.target) : '') +\n        (opts.pipeline ?? '') +\n        opts.specifierType +\n        (opts.bundleBehavior ?? '') +\n        (opts.priority ?? 'sync') +\n        (opts.packageConditions ? JSON.stringify(opts.packageConditions) : ''),\n    );\n\n  let dep: Dependency = {\n    id,\n    specifier: opts.specifier,\n    specifierType: SpecifierType[opts.specifierType],\n    priority: Priority[opts.priority ?? 'sync'],\n    needsStableName: opts.needsStableName ?? false,\n    bundleBehavior: opts.bundleBehavior\n      ? BundleBehavior[opts.bundleBehavior]\n      : null,\n    isEntry: opts.isEntry ?? false,\n    isOptional: opts.isOptional ?? false,\n    loc: toInternalSourceLocation(projectRoot, opts.loc),\n    env: opts.env,\n    meta: opts.meta || {},\n    target: opts.target,\n    sourceAssetId: opts.sourceAssetId,\n    sourcePath: toProjectPath(projectRoot, opts.sourcePath),\n    resolveFrom: toProjectPath(projectRoot, opts.resolveFrom),\n    range: opts.range,\n    symbols:\n      opts.symbols &&\n      new Map(\n        [...opts.symbols].map(([k, v]) => [\n          k,\n          {\n            local: v.local,\n            meta: v.meta,\n            isWeak: v.isWeak,\n            loc: toInternalSourceLocation(projectRoot, v.loc),\n          },\n        ]),\n      ),\n    pipeline: opts.pipeline,\n  };\n\n  if (opts.packageConditions) {\n    convertConditions(opts.packageConditions, dep);\n  }\n\n  return dep;\n}\n\nexport function mergeDependencies(a: Dependency, b: Dependency): void {\n  let {meta, symbols, needsStableName, isEntry, isOptional, ...other} = b;\n  Object.assign(a, other);\n  Object.assign(a.meta, meta);\n  if (a.symbols && symbols) {\n    for (let [k, v] of symbols) {\n      a.symbols.set(k, v);\n    }\n  }\n  if (needsStableName) a.needsStableName = true;\n  if (isEntry) a.isEntry = true;\n  if (!isOptional) a.isOptional = false;\n}\n\nfunction convertConditions(conditions: Array<string>, dep: Dependency) {\n  // Store common package conditions as bit flags to reduce size.\n  // Custom conditions are stored as strings.\n  let packageConditions = 0;\n  let customConditions = [];\n  for (let condition of conditions) {\n    if (ExportsCondition[condition]) {\n      packageConditions |= ExportsCondition[condition];\n    } else {\n      customConditions.push(condition);\n    }\n  }\n\n  if (packageConditions) {\n    dep.packageConditions = packageConditions;\n  }\n\n  if (customConditions.length) {\n    dep.customPackageConditions = customConditions;\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/Environment.js",
    "content": "// @flow\nimport type {\n  EnvironmentOptions,\n  Environment as IEnvironment,\n  FilePath,\n} from '@parcel/types';\nimport type {Environment, InternalSourceLocation} from './types';\nimport {hashString} from '@parcel/rust';\nimport {toInternalSourceLocation} from './utils';\nimport PublicEnvironment from './public/Environment';\nimport {environmentToInternalEnvironment} from './public/Environment';\n\nconst DEFAULT_ENGINES = {\n  browsers: ['> 0.25%'],\n  node: '>= 18.0.0',\n};\n\ntype EnvironmentOpts = {|\n  ...EnvironmentOptions,\n  loc?: ?InternalSourceLocation,\n|};\n\nexport function createEnvironment({\n  context,\n  engines,\n  includeNodeModules,\n  outputFormat,\n  sourceType = 'module',\n  shouldOptimize = false,\n  isLibrary = false,\n  shouldScopeHoist = false,\n  sourceMap,\n  loc,\n}: EnvironmentOpts = {\n  /*::...null*/\n}): Environment {\n  if (context == null) {\n    if (engines?.node) {\n      context = 'node';\n    } else if (engines?.browsers) {\n      context = 'browser';\n    } else {\n      context = 'browser';\n    }\n  }\n\n  if (engines == null) {\n    switch (context) {\n      case 'node':\n      case 'electron-main':\n      case 'react-server':\n        engines = {\n          node: DEFAULT_ENGINES.node,\n        };\n        break;\n      case 'browser':\n      case 'web-worker':\n      case 'service-worker':\n      case 'electron-renderer':\n      case 'react-client':\n        engines = {\n          browsers: DEFAULT_ENGINES.browsers,\n        };\n        break;\n      default:\n        engines = {};\n    }\n  }\n\n  if (includeNodeModules == null) {\n    switch (context) {\n      case 'node':\n      case 'electron-main':\n      case 'electron-renderer':\n        includeNodeModules = false;\n        break;\n      case 'browser':\n      case 'web-worker':\n      case 'service-worker':\n      default:\n        includeNodeModules = true;\n        break;\n    }\n  }\n\n  if (outputFormat == null) {\n    switch (context) {\n      case 'node':\n      case 'electron-main':\n      case 'electron-renderer':\n      case 'react-server':\n        outputFormat = 'commonjs';\n        break;\n      default:\n        outputFormat = 'global';\n        break;\n    }\n  }\n\n  let res: Environment = {\n    id: '',\n    context,\n    engines,\n    includeNodeModules,\n    outputFormat,\n    sourceType,\n    isLibrary,\n    shouldOptimize,\n    shouldScopeHoist,\n    sourceMap,\n    loc,\n  };\n\n  res.id = getEnvironmentHash(res);\n  return res;\n}\n\nexport function mergeEnvironments(\n  projectRoot: FilePath,\n  a: Environment,\n  b: ?(EnvironmentOptions | IEnvironment),\n): Environment {\n  // If merging the same object, avoid copying.\n  if (a === b || !b) {\n    return a;\n  }\n\n  if (b instanceof PublicEnvironment) {\n    return environmentToInternalEnvironment(b);\n  }\n\n  return createEnvironment({\n    context: b.context ?? a.context,\n    engines: b.engines ?? a.engines,\n    includeNodeModules: b.includeNodeModules ?? a.includeNodeModules,\n    outputFormat: b.outputFormat ?? a.outputFormat,\n    sourceType: b.sourceType ?? a.sourceType,\n    isLibrary: b.isLibrary ?? a.isLibrary,\n    shouldOptimize: b.shouldOptimize ?? a.shouldOptimize,\n    shouldScopeHoist: b.shouldScopeHoist ?? a.shouldScopeHoist,\n    sourceMap: b.sourceMap ?? a.sourceMap,\n    loc: b.loc ? toInternalSourceLocation(projectRoot, b.loc) : a.loc,\n  });\n}\n\nfunction getEnvironmentHash(env: Environment): string {\n  return hashString(\n    JSON.stringify([\n      env.context,\n      env.engines,\n      env.includeNodeModules,\n      env.outputFormat,\n      env.sourceType,\n      env.isLibrary,\n      env.shouldOptimize,\n      env.shouldScopeHoist,\n      env.sourceMap,\n    ]),\n  );\n}\n"
  },
  {
    "path": "packages/core/core/src/InternalConfig.js",
    "content": "// @flow strict-local\n\nimport type {PackageName, ConfigResult} from '@parcel/types';\nimport type {\n  Config,\n  Environment,\n  InternalFileCreateInvalidation,\n  InternalDevDepOptions,\n} from './types';\nimport type {ProjectPath} from './projectPath';\n\nimport {fromProjectPathRelative} from './projectPath';\nimport {createEnvironment} from './Environment';\nimport {hashString} from '@parcel/rust';\n\ntype ConfigOpts = {|\n  plugin: PackageName,\n  searchPath: ProjectPath,\n  isSource?: boolean,\n  env?: Environment,\n  result?: ConfigResult,\n  invalidateOnFileChange?: Set<ProjectPath>,\n  invalidateOnConfigKeyChange?: Array<{|\n    filePath: ProjectPath,\n    configKey: string,\n  |}>,\n  invalidateOnFileCreate?: Array<InternalFileCreateInvalidation>,\n  invalidateOnEnvChange?: Set<string>,\n  invalidateOnOptionChange?: Set<string>,\n  devDeps?: Array<InternalDevDepOptions>,\n  invalidateOnStartup?: boolean,\n  invalidateOnBuild?: boolean,\n|};\n\nexport function createConfig({\n  plugin,\n  isSource,\n  searchPath,\n  env,\n  result,\n  invalidateOnFileChange,\n  invalidateOnConfigKeyChange,\n  invalidateOnFileCreate,\n  invalidateOnEnvChange,\n  invalidateOnOptionChange,\n  devDeps,\n  invalidateOnStartup,\n  invalidateOnBuild,\n}: ConfigOpts): Config {\n  let environment = env ?? createEnvironment();\n  return {\n    id: hashString(\n      plugin +\n        fromProjectPathRelative(searchPath) +\n        environment.id +\n        String(isSource),\n    ),\n    isSource: isSource ?? false,\n    searchPath,\n    env: environment,\n    result: result ?? null,\n    cacheKey: null,\n    invalidateOnFileChange: invalidateOnFileChange ?? new Set(),\n    invalidateOnConfigKeyChange: invalidateOnConfigKeyChange ?? [],\n    invalidateOnFileCreate: invalidateOnFileCreate ?? [],\n    invalidateOnEnvChange: invalidateOnEnvChange ?? new Set(),\n    invalidateOnOptionChange: invalidateOnOptionChange ?? new Set(),\n    devDeps: devDeps ?? [],\n    invalidateOnStartup: invalidateOnStartup ?? false,\n    invalidateOnBuild: invalidateOnBuild ?? false,\n  };\n}\n"
  },
  {
    "path": "packages/core/core/src/PackagerRunner.js",
    "content": "// @flow strict-local\n\nimport type {\n  Blob,\n  FilePath,\n  BundleResult,\n  Bundle as BundleType,\n  BundleGraph as BundleGraphType,\n  NamedBundle as NamedBundleType,\n  Async,\n} from '@parcel/types';\nimport type SourceMap from '@parcel/source-map';\nimport type {\n  Bundle as InternalBundle,\n  Config,\n  DevDepRequest,\n  DevDepRequestRef,\n  ParcelOptions,\n  ReportFn,\n  RequestInvalidation,\n} from './types';\nimport type ParcelConfig, {LoadedPlugin} from './ParcelConfig';\nimport type InternalBundleGraph from './BundleGraph';\nimport type {ConfigRequest} from './requests/ConfigRequest';\nimport type {DevDepSpecifier} from './requests/DevDepRequest';\n\nimport invariant from 'assert';\nimport {blobToStream, bufferStream, TapStream} from '@parcel/utils';\nimport {PluginLogger} from '@parcel/logger';\nimport ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';\nimport {Readable} from 'stream';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport url from 'url';\nimport {hashString, hashBuffer, Hash} from '@parcel/rust';\n\nimport {NamedBundle, bundleToInternalBundle} from './public/Bundle';\nimport BundleGraph, {\n  bundleGraphToInternalBundleGraph,\n} from './public/BundleGraph';\nimport PluginOptions from './public/PluginOptions';\nimport PublicConfig from './public/Config';\nimport {PARCEL_VERSION, HASH_REF_PREFIX, HASH_REF_REGEX} from './constants';\nimport {\n  fromProjectPath,\n  toProjectPathUnsafe,\n  fromProjectPathRelative,\n  joinProjectPath,\n} from './projectPath';\nimport {createConfig} from './InternalConfig';\nimport {\n  loadPluginConfig,\n  getConfigHash,\n  getConfigRequests,\n  type PluginWithBundleConfig,\n} from './requests/ConfigRequest';\nimport {\n  createDevDependency,\n  getWorkerDevDepRequests,\n} from './requests/DevDepRequest';\nimport {createBuildCache} from './buildCache';\nimport {getInvalidationId, getInvalidationHash} from './assetUtils';\nimport {optionsProxy} from './utils';\nimport {invalidateDevDeps} from './requests/DevDepRequest';\nimport {tracer, PluginTracer} from '@parcel/profiler';\n\ntype Opts = {|\n  config: ParcelConfig,\n  options: ParcelOptions,\n  report: ReportFn,\n  previousDevDeps: Map<string, string>,\n  previousInvalidations: Array<RequestInvalidation>,\n|};\n\nexport type RunPackagerRunnerResult = {|\n  bundleInfo: BundleInfo[],\n  configRequests: Array<ConfigRequest>,\n  devDepRequests: Array<DevDepRequest | DevDepRequestRef>,\n  invalidations: Array<RequestInvalidation>,\n|};\n\nexport type BundleInfo = {|\n  +type: string,\n  +size: number,\n  +hash: string,\n  +hashReferences: Array<string>,\n  +time?: number,\n  +cacheKeys: CacheKeyMap,\n  +isLargeBlob: boolean,\n|};\n\ntype BundleContent = {|\n  type: string,\n  contents: Blob,\n  map: ?string,\n|};\n\ntype CacheKeyMap = {|\n  content: string,\n  map: string,\n|};\n\nconst BOUNDARY_LENGTH = HASH_REF_PREFIX.length + 32 - 1;\n\n// Packager/optimizer configs are not bundle-specific, so we only need to\n// load them once per build.\nconst pluginConfigs = createBuildCache();\n\nexport default class PackagerRunner {\n  config: ParcelConfig;\n  options: ParcelOptions;\n  pluginOptions: PluginOptions;\n  distDir: FilePath;\n  distExists: Set<FilePath>;\n  report: ReportFn;\n  previousDevDeps: Map<string, string>;\n  devDepRequests: Map<string, DevDepRequest | DevDepRequestRef>;\n  invalidations: Map<string, RequestInvalidation>;\n  previousInvalidations: Array<RequestInvalidation>;\n\n  constructor({\n    config,\n    options,\n    report,\n    previousDevDeps,\n    previousInvalidations,\n  }: Opts) {\n    this.config = config;\n    this.options = options;\n    this.report = report;\n    this.previousDevDeps = previousDevDeps;\n    this.devDepRequests = new Map();\n    this.previousInvalidations = previousInvalidations;\n    this.invalidations = new Map();\n    this.pluginOptions = new PluginOptions(\n      optionsProxy(this.options, option => {\n        let invalidation: RequestInvalidation = {\n          type: 'option',\n          key: option,\n        };\n\n        this.invalidations.set(getInvalidationId(invalidation), invalidation);\n      }),\n    );\n  }\n\n  async run(\n    bundleGraph: InternalBundleGraph,\n    bundle: InternalBundle,\n    invalidDevDeps: Array<DevDepSpecifier>,\n  ): Promise<RunPackagerRunnerResult> {\n    invalidateDevDeps(invalidDevDeps, this.options, this.config);\n\n    let {configs, bundleConfigs} = await this.loadConfigs(bundleGraph, bundle);\n    let bundleInfo = await this.getBundleInfoFromCache(\n      bundleGraph,\n      bundle,\n      configs,\n      bundleConfigs,\n    );\n\n    if (bundleInfo.length === 0) {\n      bundleInfo = await this.getBundleInfo(\n        bundle,\n        bundleGraph,\n        configs,\n        bundleConfigs,\n      );\n    }\n\n    let configRequests = getConfigRequests([\n      ...configs.values(),\n      ...bundleConfigs.values(),\n    ]);\n    let devDepRequests = getWorkerDevDepRequests([\n      ...this.devDepRequests.values(),\n    ]);\n\n    return {\n      bundleInfo,\n      configRequests,\n      devDepRequests,\n      invalidations: [...this.invalidations.values()],\n    };\n  }\n\n  async loadConfigs(\n    bundleGraph: InternalBundleGraph,\n    bundle: InternalBundle,\n  ): Promise<{|\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n  |}> {\n    let configs = new Map();\n    let bundleConfigs = new Map();\n\n    await this.loadConfig(bundleGraph, bundle, configs, bundleConfigs);\n    for (let inlineBundle of bundleGraph.getInlineBundles(bundle)) {\n      await this.loadConfig(bundleGraph, inlineBundle, configs, bundleConfigs);\n    }\n\n    return {configs, bundleConfigs};\n  }\n\n  async loadConfig(\n    bundleGraph: InternalBundleGraph,\n    bundle: InternalBundle,\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n  ): Promise<void> {\n    let name = nullthrows(bundle.name);\n    let plugin = await this.config.getPackager(name, bundle.pipeline);\n    await this.loadPluginConfig(\n      bundleGraph,\n      bundle,\n      plugin,\n      configs,\n      bundleConfigs,\n    );\n\n    let optimizers = await this.config.getOptimizers(name, bundle.pipeline);\n    for (let optimizer of optimizers) {\n      await this.loadPluginConfig(\n        bundleGraph,\n        bundle,\n        optimizer,\n        configs,\n        bundleConfigs,\n      );\n    }\n  }\n\n  async loadPluginConfig<T: PluginWithBundleConfig>(\n    bundleGraph: InternalBundleGraph,\n    bundle: InternalBundle,\n    plugin: LoadedPlugin<T>,\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n  ): Promise<void> {\n    if (!configs.has(plugin.name)) {\n      // Only load config for a plugin once per build.\n      let existing = pluginConfigs.get(plugin.name);\n      if (existing != null) {\n        configs.set(plugin.name, existing);\n      } else {\n        if (plugin.plugin.loadConfig != null) {\n          let config = createConfig({\n            plugin: plugin.name,\n            searchPath: toProjectPathUnsafe('index'),\n          });\n\n          await loadPluginConfig(plugin, config, this.options);\n\n          for (let devDep of config.devDeps) {\n            let devDepRequest = await createDevDependency(\n              devDep,\n              this.previousDevDeps,\n              this.options,\n            );\n            let key = `${devDep.specifier}:${fromProjectPath(\n              this.options.projectRoot,\n              devDep.resolveFrom,\n            )}`;\n            this.devDepRequests.set(key, devDepRequest);\n          }\n\n          pluginConfigs.set(plugin.name, config);\n          configs.set(plugin.name, config);\n        }\n      }\n    }\n\n    let loadBundleConfig = plugin.plugin.loadBundleConfig;\n    if (!bundleConfigs.has(plugin.name) && loadBundleConfig != null) {\n      let config = createConfig({\n        plugin: plugin.name,\n        searchPath: joinProjectPath(\n          bundle.target.distDir,\n          bundle.name ?? bundle.id,\n        ),\n      });\n      config.result = await loadBundleConfig({\n        bundle: NamedBundle.get(bundle, bundleGraph, this.options),\n        bundleGraph: new BundleGraph<NamedBundleType>(\n          bundleGraph,\n          NamedBundle.get.bind(NamedBundle),\n          this.options,\n        ),\n        config: new PublicConfig(config, this.options),\n        options: new PluginOptions(this.options),\n        logger: new PluginLogger({origin: plugin.name}),\n        tracer: new PluginTracer({origin: plugin.name, category: 'loadConfig'}),\n      });\n      bundleConfigs.set(plugin.name, config);\n    }\n  }\n\n  async getBundleInfoFromCache(\n    bundleGraph: InternalBundleGraph,\n    bundle: InternalBundle,\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n  ): Promise<BundleInfo[]> {\n    if (this.options.shouldDisableCache) {\n      return [];\n    }\n\n    let cacheKey = await this.getCacheKey(\n      bundle,\n      bundleGraph,\n      configs,\n      bundleConfigs,\n      this.previousInvalidations,\n    );\n    let infoKey = PackagerRunner.getInfoKey(cacheKey);\n    let res = await this.options.cache.get<BundleInfo[]>(infoKey);\n    return res ?? [];\n  }\n\n  async getBundleInfo(\n    bundle: InternalBundle,\n    bundleGraph: InternalBundleGraph,\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n  ): Promise<BundleInfo[]> {\n    let results = await this.getBundleResult(\n      bundle,\n      bundleGraph,\n      configs,\n      bundleConfigs,\n    );\n\n    // Recompute cache keys as they may have changed due to dev dependencies.\n    let cacheKey = await this.getCacheKey(\n      bundle,\n      bundleGraph,\n      configs,\n      bundleConfigs,\n      [...this.invalidations.values()],\n    );\n\n    return this.writeToCache(cacheKey, results);\n  }\n\n  async getInlineBundleContents(\n    bundle: InternalBundle,\n    bundleGraph: InternalBundleGraph,\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n  ): Promise<Blob> {\n    let bundleInfo = await this.getBundleInfoFromCache(\n      bundleGraph,\n      bundle,\n      configs,\n      bundleConfigs,\n    );\n\n    if (bundleInfo.length > 0) {\n      return this.options.cache.getBlob(bundleInfo[0].cacheKeys.content);\n    }\n\n    let results = await this.getBundleResult(\n      bundle,\n      bundleGraph,\n      configs,\n      bundleConfigs,\n    );\n\n    // Writing to the cache consumes the stream, but we need to also return it to the calling packager.\n    // Buffer the stream into memory first.\n    if (results[0].contents instanceof Readable) {\n      results[0].contents = await bufferStream(results[0].contents);\n    }\n\n    // Recompute cache keys as they may have changed due to dev dependencies.\n    let cacheKey = await this.getCacheKey(\n      bundle,\n      bundleGraph,\n      configs,\n      bundleConfigs,\n      [...this.invalidations.values()],\n    );\n\n    await this.writeToCache(cacheKey, results);\n    return results[0].contents;\n  }\n\n  async getBundleResult(\n    bundle: InternalBundle,\n    bundleGraph: InternalBundleGraph,\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n  ): Promise<BundleContent[]> {\n    let packagedResults = await this.package(\n      bundle,\n      bundleGraph,\n      configs,\n      bundleConfigs,\n    );\n    return Promise.all(\n      packagedResults.map(async packaged => {\n        let type = packaged.type ?? bundle.type;\n        let res = await this.optimize(\n          bundle,\n          bundleGraph,\n          type,\n          packaged.contents,\n          packaged.map,\n          configs,\n          bundleConfigs,\n        );\n\n        let map =\n          res.map != null\n            ? await this.generateSourceMap(bundle, res.map)\n            : null;\n        return {\n          type: res.type ?? type,\n          contents: res.contents,\n          map,\n        };\n      }),\n    );\n  }\n\n  getSourceMapReference(bundle: NamedBundle, map: ?SourceMap): Async<?string> {\n    if (map && bundle.env.sourceMap && bundle.bundleBehavior !== 'inline') {\n      if (bundle.env.sourceMap && bundle.env.sourceMap.inline) {\n        return this.generateSourceMap(bundleToInternalBundle(bundle), map);\n      } else {\n        return path.basename(bundle.name) + '.map';\n      }\n    } else {\n      return null;\n    }\n  }\n\n  async package(\n    internalBundle: InternalBundle,\n    bundleGraph: InternalBundleGraph,\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n  ): Promise<BundleResult[]> {\n    let bundle = NamedBundle.get(internalBundle, bundleGraph, this.options);\n    this.report({\n      type: 'buildProgress',\n      phase: 'packaging',\n      bundle,\n    });\n\n    let packager = await this.config.getPackager(\n      bundle.name,\n      internalBundle.pipeline,\n    );\n    let {name, resolveFrom, plugin} = packager;\n    let measurement;\n    try {\n      measurement = tracer.createMeasurement(name, 'packaging', bundle.name, {\n        type: bundle.type,\n      });\n      let res = await plugin.package({\n        config: configs.get(name)?.result,\n        bundleConfig: bundleConfigs.get(name)?.result,\n        bundle,\n        bundleGraph: new BundleGraph<NamedBundleType>(\n          bundleGraph,\n          NamedBundle.get.bind(NamedBundle),\n          this.options,\n        ),\n        getSourceMapReference: map => {\n          return this.getSourceMapReference(bundle, map);\n        },\n        options: this.pluginOptions,\n        logger: new PluginLogger({origin: name}),\n        tracer: new PluginTracer({origin: name, category: 'package'}),\n        getInlineBundleContents: async (\n          bundle: BundleType,\n          bundleGraph: BundleGraphType<NamedBundleType>,\n        ) => {\n          if (bundle.bundleBehavior !== 'inline') {\n            throw new Error(\n              'Bundle is not inline and unable to retrieve contents',\n            );\n          }\n\n          let contents = await this.getInlineBundleContents(\n            bundleToInternalBundle(bundle),\n            // $FlowFixMe\n            bundleGraphToInternalBundleGraph(bundleGraph),\n            configs,\n            bundleConfigs,\n          );\n          return {contents};\n        },\n      });\n      if (Array.isArray(res)) {\n        return res;\n      }\n      return [res];\n    } catch (e) {\n      throw new ThrowableDiagnostic({\n        diagnostic: errorToDiagnostic(e, {\n          origin: name,\n          filePath: path.join(bundle.target.distDir, bundle.name),\n        }),\n      });\n    } finally {\n      measurement && measurement.end();\n      // Add dev dependency for the packager. This must be done AFTER running it due to\n      // the potential for lazy require() that aren't executed until the request runs.\n      let devDepRequest = await createDevDependency(\n        {\n          specifier: name,\n          resolveFrom,\n        },\n        this.previousDevDeps,\n        this.options,\n      );\n      this.devDepRequests.set(\n        `${name}:${fromProjectPathRelative(resolveFrom)}`,\n        devDepRequest,\n      );\n    }\n  }\n\n  async optimize(\n    internalBundle: InternalBundle,\n    internalBundleGraph: InternalBundleGraph,\n    type: string,\n    contents: Blob,\n    map?: ?SourceMap,\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n  ): Promise<BundleResult> {\n    let bundle = NamedBundle.get(\n      internalBundle,\n      internalBundleGraph,\n      this.options,\n    );\n    let bundleGraph = new BundleGraph<NamedBundleType>(\n      internalBundleGraph,\n      NamedBundle.get.bind(NamedBundle),\n      this.options,\n    );\n    let name = bundle.name;\n    if (type !== bundle.type) {\n      name = name.slice(0, -path.extname(name).length) + '.' + type;\n    }\n    let optimizers = await this.config.getOptimizers(\n      name,\n      internalBundle.pipeline,\n    );\n    if (!optimizers.length) {\n      return {type, contents, map};\n    }\n\n    this.report({\n      type: 'buildProgress',\n      phase: 'optimizing',\n      bundle,\n    });\n\n    let optimized = {\n      type,\n      contents,\n      map,\n    };\n\n    for (let optimizer of optimizers) {\n      let measurement;\n      try {\n        measurement = tracer.createMeasurement(\n          optimizer.name,\n          'optimize',\n          bundle.name,\n        );\n        let next = await optimizer.plugin.optimize({\n          config: configs.get(optimizer.name)?.result,\n          bundleConfig: bundleConfigs.get(optimizer.name)?.result,\n          bundle,\n          bundleGraph,\n          contents: optimized.contents,\n          map: optimized.map,\n          getSourceMapReference: map => {\n            return this.getSourceMapReference(bundle, map);\n          },\n          options: this.pluginOptions,\n          logger: new PluginLogger({origin: optimizer.name}),\n          tracer: new PluginTracer({\n            origin: optimizer.name,\n            category: 'optimize',\n          }),\n        });\n\n        optimized.type = next.type ?? optimized.type;\n        optimized.contents = next.contents;\n        optimized.map = next.map;\n      } catch (e) {\n        throw new ThrowableDiagnostic({\n          diagnostic: errorToDiagnostic(e, {\n            origin: optimizer.name,\n            filePath: path.join(bundle.target.distDir, bundle.name),\n          }),\n        });\n      } finally {\n        measurement && measurement.end();\n        // Add dev dependency for the optimizer. This must be done AFTER running it due to\n        // the potential for lazy require() that aren't executed until the request runs.\n        let devDepRequest = await createDevDependency(\n          {\n            specifier: optimizer.name,\n            resolveFrom: optimizer.resolveFrom,\n          },\n          this.previousDevDeps,\n          this.options,\n        );\n        this.devDepRequests.set(\n          `${optimizer.name}:${fromProjectPathRelative(optimizer.resolveFrom)}`,\n          devDepRequest,\n        );\n      }\n    }\n\n    return optimized;\n  }\n\n  async generateSourceMap(\n    bundle: InternalBundle,\n    map: SourceMap,\n  ): Promise<string> {\n    // sourceRoot should be a relative path between outDir and rootDir for node.js targets\n    let filePath = joinProjectPath(\n      bundle.target.distDir,\n      nullthrows(bundle.name),\n    );\n    let fullPath = fromProjectPath(this.options.projectRoot, filePath);\n    let sourceRoot: string = path.relative(\n      path.dirname(fullPath),\n      this.options.projectRoot,\n    );\n    let inlineSources = false;\n\n    if (bundle.target) {\n      if (\n        bundle.env.sourceMap &&\n        bundle.env.sourceMap.sourceRoot !== undefined\n      ) {\n        sourceRoot = bundle.env.sourceMap.sourceRoot;\n      } else if (\n        this.options.serveOptions &&\n        bundle.target.env.context === 'browser'\n      ) {\n        sourceRoot = '/__parcel_source_root';\n      }\n\n      if (\n        bundle.env.sourceMap &&\n        bundle.env.sourceMap.inlineSources !== undefined\n      ) {\n        inlineSources = bundle.env.sourceMap.inlineSources;\n      } else if (bundle.target.env.context !== 'node') {\n        // inlining should only happen in production for browser targets by default\n        inlineSources = this.options.mode === 'production';\n      }\n    }\n\n    let mapFilename = fullPath + '.map';\n    let isInlineMap = bundle.env.sourceMap && bundle.env.sourceMap.inline;\n\n    let stringified = await map.stringify({\n      file: path.basename(mapFilename),\n      // $FlowFixMe\n      fs: this.options.inputFS,\n      rootDir: this.options.projectRoot,\n      sourceRoot: !inlineSources\n        ? url.format(url.parse(sourceRoot + '/'))\n        : undefined,\n      inlineSources,\n      format: isInlineMap ? 'inline' : 'string',\n    });\n\n    invariant(typeof stringified === 'string');\n    return stringified;\n  }\n\n  async getCacheKey(\n    bundle: InternalBundle,\n    bundleGraph: InternalBundleGraph,\n    configs: Map<string, Config>,\n    bundleConfigs: Map<string, Config>,\n    invalidations: Array<RequestInvalidation>,\n  ): Promise<string> {\n    let configResults = {};\n    for (let [pluginName, config] of configs) {\n      if (config) {\n        configResults[pluginName] = await getConfigHash(\n          config,\n          pluginName,\n          this.options,\n        );\n      }\n    }\n    let globalInfoResults = {};\n    for (let [pluginName, config] of bundleConfigs) {\n      if (config) {\n        globalInfoResults[pluginName] = await getConfigHash(\n          config,\n          pluginName,\n          this.options,\n        );\n      }\n    }\n\n    let devDepHashes = await this.getDevDepHashes(bundle);\n    for (let inlineBundle of bundleGraph.getInlineBundles(bundle)) {\n      devDepHashes += await this.getDevDepHashes(inlineBundle);\n    }\n\n    let invalidationHash = await getInvalidationHash(\n      invalidations,\n      this.options,\n    );\n\n    return hashString(\n      PARCEL_VERSION +\n        devDepHashes +\n        invalidationHash +\n        bundle.target.publicUrl +\n        bundleGraph.getHash(bundle) +\n        JSON.stringify(configResults) +\n        JSON.stringify(globalInfoResults) +\n        this.options.mode +\n        (this.options.shouldBuildLazily ? 'lazy' : 'eager'),\n    );\n  }\n\n  async getDevDepHashes(bundle: InternalBundle): Promise<string> {\n    let name = nullthrows(bundle.name);\n    let packager = await this.config.getPackager(name, bundle.pipeline);\n    let optimizers = await this.config.getOptimizers(name, bundle.pipeline);\n\n    let key = `${packager.name}:${fromProjectPathRelative(\n      packager.resolveFrom,\n    )}`;\n    let devDepHashes =\n      this.devDepRequests.get(key)?.hash ?? this.previousDevDeps.get(key) ?? '';\n    for (let {name, resolveFrom} of optimizers) {\n      let key = `${name}:${fromProjectPathRelative(resolveFrom)}`;\n      devDepHashes +=\n        this.devDepRequests.get(key)?.hash ??\n        this.previousDevDeps.get(key) ??\n        '';\n    }\n\n    return devDepHashes;\n  }\n\n  async writeToCache(\n    cacheKey: string,\n    results: Array<{|\n      contents: Blob,\n      map: ?string,\n      type: string,\n    |}>,\n  ): Promise<BundleInfo[]> {\n    let info = await Promise.all(\n      results.map(async ({contents, map, type}, index) => {\n        let size = 0;\n        let hash;\n        let hashReferences = [];\n        let isLargeBlob = false;\n        let cacheKeys = {\n          content: PackagerRunner.getContentKey(cacheKey, index),\n          map: PackagerRunner.getMapKey(cacheKey, index),\n        };\n\n        // TODO: don't replace hash references in binary files??\n        if (contents instanceof Readable) {\n          isLargeBlob = true;\n          let boundaryStr = '';\n          let h = new Hash();\n          await this.options.cache.setStream(\n            cacheKeys.content,\n            blobToStream(contents).pipe(\n              new TapStream(buf => {\n                let str = boundaryStr + buf.toString();\n                hashReferences = hashReferences.concat(\n                  str.match(HASH_REF_REGEX) ?? [],\n                );\n                size += buf.length;\n                h.writeBuffer(buf);\n                boundaryStr = str.slice(str.length - BOUNDARY_LENGTH);\n              }),\n            ),\n          );\n          hash = h.finish();\n        } else if (typeof contents === 'string') {\n          let buffer = Buffer.from(contents);\n          size = buffer.byteLength;\n          hash = hashBuffer(buffer);\n          hashReferences = contents.match(HASH_REF_REGEX) ?? [];\n          await this.options.cache.setBlob(cacheKeys.content, buffer);\n        } else {\n          size = contents.length;\n          hash = hashBuffer(contents);\n          hashReferences = contents.toString().match(HASH_REF_REGEX) ?? [];\n          await this.options.cache.setBlob(cacheKeys.content, contents);\n        }\n\n        if (map != null) {\n          await this.options.cache.setBlob(cacheKeys.map, map);\n        }\n        let info: BundleInfo = {\n          type,\n          size,\n          hash,\n          hashReferences,\n          cacheKeys,\n          isLargeBlob,\n        };\n        return info;\n      }),\n    );\n    await this.options.cache.set(PackagerRunner.getInfoKey(cacheKey), info);\n    return info;\n  }\n\n  static getContentKey(cacheKey: string, index: number): string {\n    return hashString(`${cacheKey}:${index}:content`);\n  }\n\n  static getMapKey(cacheKey: string, index: number): string {\n    return hashString(`${cacheKey}:${index}:map`);\n  }\n\n  static getInfoKey(cacheKey: string): string {\n    return hashString(`${cacheKey}:info`);\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/Parcel.js",
    "content": "// @flow strict-local\n\nimport type {\n  Asset,\n  AsyncSubscription,\n  BuildEvent,\n  BuildSuccessEvent,\n  InitialParcelOptions,\n  PackagedBundle as IPackagedBundle,\n  ParcelTransformOptions,\n  ParcelResolveOptions,\n  ParcelResolveResult,\n} from '@parcel/types';\nimport path from 'path';\nimport type {ParcelOptions} from './types';\n// eslint-disable-next-line no-unused-vars\nimport type {FarmOptions, SharedReference} from '@parcel/workers';\nimport type {Diagnostic} from '@parcel/diagnostic';\n\nimport invariant from 'assert';\nimport ThrowableDiagnostic, {anyToDiagnostic} from '@parcel/diagnostic';\nimport {assetFromValue} from './public/Asset';\nimport {PackagedBundle} from './public/Bundle';\nimport BundleGraph from './public/BundleGraph';\nimport WorkerFarm from '@parcel/workers';\nimport nullthrows from 'nullthrows';\nimport {BuildAbortError} from './utils';\nimport {loadParcelConfig} from './requests/ParcelConfigRequest';\nimport ReporterRunner from './ReporterRunner';\nimport dumpGraphToGraphViz from './dumpGraphToGraphViz';\nimport resolveOptions from './resolveOptions';\nimport {ValueEmitter} from '@parcel/events';\nimport {registerCoreWithSerializer} from './registerCoreWithSerializer';\nimport {PromiseQueue} from '@parcel/utils';\nimport ParcelConfig from './ParcelConfig';\nimport logger from '@parcel/logger';\nimport RequestTracker, {\n  getWatcherOptions,\n  requestGraphEdgeTypes,\n} from './RequestTracker';\nimport createValidationRequest from './requests/ValidationRequest';\nimport createParcelBuildRequest from './requests/ParcelBuildRequest';\nimport createAssetRequest from './requests/AssetRequest';\nimport createPathRequest from './requests/PathRequest';\nimport {createEnvironment} from './Environment';\nimport {createDependency} from './Dependency';\nimport {Disposable} from '@parcel/events';\nimport {init as initSourcemaps} from '@parcel/source-map';\nimport {init as initRust} from '@parcel/rust';\nimport {\n  fromProjectPath,\n  toProjectPath,\n  fromProjectPathRelative,\n} from './projectPath';\nimport {tracer} from '@parcel/profiler';\nimport {setFeatureFlags} from '@parcel/feature-flags';\n\nregisterCoreWithSerializer();\n\nexport const INTERNAL_TRANSFORM: symbol = Symbol('internal_transform');\nexport const INTERNAL_RESOLVE: symbol = Symbol('internal_resolve');\n\nexport default class Parcel {\n  #requestTracker /*: RequestTracker*/;\n  #config /*: ParcelConfig*/;\n  #farm /*: WorkerFarm*/;\n  #initialized /*: boolean*/ = false;\n  #disposable /*: Disposable */;\n  #initialOptions /*: InitialParcelOptions */;\n  #reporterRunner /*: ReporterRunner*/;\n  #resolvedOptions /*: ?ParcelOptions*/ = null;\n  #optionsRef /*: SharedReference */;\n  #watchAbortController /*: AbortController*/;\n  #watchQueue /*: PromiseQueue<?BuildEvent>*/ = new PromiseQueue<?BuildEvent>({\n    maxConcurrent: 1,\n  });\n  #watchEvents /*: ValueEmitter<\n    | {|\n        +error: Error,\n        +buildEvent?: void,\n      |}\n    | {|\n        +buildEvent: BuildEvent,\n        +error?: void,\n      |},\n  > */;\n  #watcherSubscription /*: ?AsyncSubscription*/;\n  #watcherCount /*: number*/ = 0;\n  #requestedAssetIds /*: Set<string>*/ = new Set();\n\n  isProfiling /*: boolean */;\n\n  constructor(options: InitialParcelOptions) {\n    this.#initialOptions = options;\n  }\n\n  async _init(): Promise<void> {\n    if (this.#initialized) {\n      return;\n    }\n\n    await initSourcemaps;\n    await initRust?.();\n\n    let resolvedOptions: ParcelOptions = await resolveOptions(\n      this.#initialOptions,\n    );\n    this.#resolvedOptions = resolvedOptions;\n\n    let {config} = await loadParcelConfig(resolvedOptions);\n    this.#config = new ParcelConfig(config, resolvedOptions);\n\n    setFeatureFlags(resolvedOptions.featureFlags);\n\n    if (this.#initialOptions.workerFarm) {\n      if (this.#initialOptions.workerFarm.ending) {\n        throw new Error('Supplied WorkerFarm is ending');\n      }\n      this.#farm = this.#initialOptions.workerFarm;\n    } else {\n      this.#farm = createWorkerFarm({\n        shouldPatchConsole: resolvedOptions.shouldPatchConsole,\n        shouldTrace: resolvedOptions.shouldTrace,\n      });\n    }\n\n    await resolvedOptions.cache.ensure();\n\n    let {dispose: disposeOptions, ref: optionsRef} =\n      await this.#farm.createSharedReference(resolvedOptions, false);\n    this.#optionsRef = optionsRef;\n\n    this.#disposable = new Disposable();\n    if (this.#initialOptions.workerFarm) {\n      // If we don't own the farm, dispose of only these references when\n      // Parcel ends.\n      this.#disposable.add(disposeOptions);\n    } else {\n      // Otherwise, when shutting down, end the entire farm we created.\n      this.#disposable.add(() => this.#farm.end());\n    }\n\n    this.#watchEvents = new ValueEmitter();\n    this.#disposable.add(() => this.#watchEvents.dispose());\n\n    this.#reporterRunner = new ReporterRunner({\n      options: resolvedOptions,\n      reporters: await this.#config.getReporters(),\n      workerFarm: this.#farm,\n    });\n    this.#disposable.add(this.#reporterRunner);\n\n    logger.verbose({\n      origin: '@parcel/core',\n      message: 'Intializing request tracker...',\n    });\n\n    this.#requestTracker = await RequestTracker.init({\n      farm: this.#farm,\n      options: resolvedOptions,\n    });\n\n    this.#initialized = true;\n  }\n\n  async run(): Promise<BuildSuccessEvent> {\n    let startTime = Date.now();\n    if (!this.#initialized) {\n      await this._init();\n    }\n\n    let result = await this._build({startTime});\n\n    await this._end();\n\n    if (result.type === 'buildFailure') {\n      throw new BuildError(result.diagnostics);\n    }\n\n    return result;\n  }\n\n  async _end(): Promise<void> {\n    this.#initialized = false;\n\n    await this.#requestTracker.writeToCache();\n    await this.#disposable.dispose();\n  }\n\n  async _startNextBuild(): Promise<?BuildEvent> {\n    this.#watchAbortController = new AbortController();\n    await this.#farm.callAllWorkers('clearConfigCache', []);\n\n    try {\n      let buildEvent = await this._build({\n        signal: this.#watchAbortController.signal,\n      });\n\n      this.#watchEvents.emit({\n        buildEvent,\n      });\n\n      return buildEvent;\n    } catch (err) {\n      // Ignore BuildAbortErrors and only emit critical errors.\n      if (!(err instanceof BuildAbortError)) {\n        throw err;\n      }\n    }\n  }\n\n  async watch(\n    cb?: (err: ?Error, buildEvent?: BuildEvent) => mixed,\n  ): Promise<AsyncSubscription> {\n    if (!this.#initialized) {\n      await this._init();\n    }\n\n    let watchEventsDisposable;\n    if (cb) {\n      watchEventsDisposable = this.#watchEvents.addListener(\n        ({error, buildEvent}) => cb(error, buildEvent),\n      );\n    }\n\n    if (this.#watcherCount === 0) {\n      this.#watcherSubscription = await this._getWatcherSubscription();\n      await this.#reporterRunner.report({type: 'watchStart'});\n\n      // Kick off a first build, but don't await its results. Its results will\n      // be provided to the callback.\n      this.#watchQueue.add(() => this._startNextBuild());\n      this.#watchQueue.run();\n    }\n\n    this.#watcherCount++;\n\n    let unsubscribePromise;\n    const unsubscribe = async () => {\n      if (watchEventsDisposable) {\n        watchEventsDisposable.dispose();\n      }\n\n      this.#watcherCount--;\n      if (this.#watcherCount === 0) {\n        await nullthrows(this.#watcherSubscription).unsubscribe();\n        this.#watcherSubscription = null;\n        await this.#reporterRunner.report({type: 'watchEnd'});\n        this.#watchAbortController.abort();\n        await this.#watchQueue.run();\n        await this._end();\n      }\n    };\n\n    return {\n      unsubscribe() {\n        if (unsubscribePromise == null) {\n          unsubscribePromise = unsubscribe();\n        }\n\n        return unsubscribePromise;\n      },\n    };\n  }\n\n  async _build({\n    signal,\n    startTime = Date.now(),\n  }: {|\n    signal?: AbortSignal,\n    startTime?: number,\n  |} = {\n    /*::...null*/\n  }): Promise<BuildEvent> {\n    this.#requestTracker.setSignal(signal);\n    let options = nullthrows(this.#resolvedOptions);\n    try {\n      if (options.shouldProfile) {\n        await this.startProfiling();\n      }\n      if (options.shouldTrace) {\n        tracer.enable();\n      }\n      await this.#reporterRunner.report({\n        type: 'buildStart',\n      });\n\n      this.#requestTracker.graph.invalidateOnBuildNodes();\n\n      let request = createParcelBuildRequest({\n        optionsRef: this.#optionsRef,\n        requestedAssetIds: this.#requestedAssetIds,\n        signal,\n      });\n\n      let {bundleGraph, bundleInfo, changedAssets, assetRequests} =\n        await this.#requestTracker.runRequest(request, {force: true});\n\n      this.#requestedAssetIds.clear();\n\n      await dumpGraphToGraphViz(\n        // $FlowFixMe\n        this.#requestTracker.graph,\n        'RequestGraph',\n        requestGraphEdgeTypes,\n      );\n\n      let event = {\n        type: 'buildSuccess',\n        changedAssets: new Map(\n          Array.from(changedAssets).map(([id, asset]) => [\n            id,\n            assetFromValue(asset, options),\n          ]),\n        ),\n        bundleGraph: new BundleGraph<IPackagedBundle>(\n          bundleGraph,\n          (bundle, bundleGraph, options) =>\n            PackagedBundle.getWithInfo(\n              bundle,\n              bundleGraph,\n              options,\n              bundleInfo.get(bundle.id),\n            ),\n          options,\n        ),\n        buildTime: Date.now() - startTime,\n        requestBundle: async bundle => {\n          let bundleNode = bundleGraph._graph.getNodeByContentKey(bundle.id);\n          invariant(bundleNode?.type === 'bundle', 'Bundle does not exist');\n\n          if (!bundleNode.value.isPlaceholder) {\n            // Nothing to do.\n            return {\n              type: 'buildSuccess',\n              changedAssets: new Map(),\n              bundleGraph: event.bundleGraph,\n              buildTime: 0,\n              requestBundle: event.requestBundle,\n              unstable_requestStats: {},\n            };\n          }\n\n          for (let assetId of bundleNode.value.entryAssetIds) {\n            this.#requestedAssetIds.add(assetId);\n          }\n\n          if (this.#watchQueue.getNumWaiting() === 0) {\n            if (this.#watchAbortController) {\n              this.#watchAbortController.abort();\n            }\n\n            this.#watchQueue.add(() => this._startNextBuild());\n          }\n\n          let results = await this.#watchQueue.run();\n          let result = results.filter(Boolean).pop();\n          if (result.type === 'buildFailure') {\n            throw new BuildError(result.diagnostics);\n          }\n\n          return result;\n        },\n        unstable_requestStats: this.#requestTracker.flushStats(),\n      };\n\n      await this.#reporterRunner.report(event);\n      await this.#requestTracker.runRequest(\n        createValidationRequest({optionsRef: this.#optionsRef, assetRequests}),\n        {force: assetRequests.length > 0},\n      );\n\n      if (this.#reporterRunner.errors.length) {\n        throw this.#reporterRunner.errors;\n      }\n\n      return event;\n    } catch (e) {\n      if (e instanceof BuildAbortError) {\n        throw e;\n      }\n\n      let diagnostic = anyToDiagnostic(e);\n      let event = {\n        type: 'buildFailure',\n        diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic],\n        unstable_requestStats: this.#requestTracker.flushStats(),\n      };\n\n      await this.#reporterRunner.report(event);\n      return event;\n    } finally {\n      if (this.isProfiling) {\n        await this.stopProfiling();\n      }\n\n      await this.#farm.callAllWorkers('clearConfigCache', []);\n    }\n  }\n\n  async _getWatcherSubscription(): Promise<AsyncSubscription> {\n    invariant(this.#watcherSubscription == null);\n\n    let resolvedOptions = nullthrows(this.#resolvedOptions);\n    let opts = getWatcherOptions(resolvedOptions);\n    let sub = await resolvedOptions.inputFS.watch(\n      resolvedOptions.watchDir,\n      async (err, events) => {\n        if (err) {\n          logger.verbose({\n            message: `File watch event error occured`,\n            meta: {err},\n          });\n          this.#watchEvents.emit({error: err});\n          return;\n        }\n\n        logger.verbose({\n          message: `File watch event emitted with ${events.length} events. Sample event: [${events[0]?.type}] ${events[0]?.path}`,\n        });\n\n        let isInvalid = await this.#requestTracker.respondToFSEvents(\n          events,\n          Number.POSITIVE_INFINITY,\n        );\n        if (isInvalid && this.#watchQueue.getNumWaiting() === 0) {\n          if (this.#watchAbortController) {\n            this.#watchAbortController.abort();\n          }\n\n          this.#watchQueue.add(() => this._startNextBuild());\n          this.#watchQueue.run();\n        }\n      },\n      opts,\n    );\n    return {unsubscribe: () => sub.unsubscribe()};\n  }\n\n  // This is mainly for integration tests and it not public api!\n  _getResolvedParcelOptions(): ParcelOptions {\n    return nullthrows(\n      this.#resolvedOptions,\n      'Resolved options is null, please let parcel initialize before accessing this.',\n    );\n  }\n\n  async startProfiling(): Promise<void> {\n    if (this.isProfiling) {\n      throw new Error('Parcel is already profiling');\n    }\n\n    logger.info({origin: '@parcel/core', message: 'Starting profiling...'});\n    this.isProfiling = true;\n    await this.#farm.startProfile();\n  }\n\n  stopProfiling(): Promise<void> {\n    if (!this.isProfiling) {\n      throw new Error('Parcel is not profiling');\n    }\n\n    logger.info({origin: '@parcel/core', message: 'Stopping profiling...'});\n    this.isProfiling = false;\n    return this.#farm.endProfile();\n  }\n\n  takeHeapSnapshot(): Promise<void> {\n    logger.info({origin: '@parcel/core', message: 'Taking heap snapshot...'});\n    return this.#farm.takeHeapSnapshot();\n  }\n\n  async unstable_transform(\n    options: ParcelTransformOptions,\n  ): Promise<Array<Asset>> {\n    if (!this.#initialized) {\n      await this._init();\n    }\n\n    let projectRoot = nullthrows(this.#resolvedOptions).projectRoot;\n    let request = createAssetRequest({\n      ...options,\n      filePath: toProjectPath(projectRoot, options.filePath),\n      optionsRef: this.#optionsRef,\n      env: createEnvironment({\n        ...options.env,\n        loc:\n          options.env?.loc != null\n            ? {\n                ...options.env.loc,\n                filePath: toProjectPath(projectRoot, options.env.loc.filePath),\n              }\n            : undefined,\n      }),\n    });\n\n    let res = await this.#requestTracker.runRequest(request, {\n      force: true,\n    });\n    return res.map(asset =>\n      assetFromValue(asset, nullthrows(this.#resolvedOptions)),\n    );\n  }\n\n  async unstable_resolve(\n    request: ParcelResolveOptions,\n  ): Promise<?ParcelResolveResult> {\n    if (!this.#initialized) {\n      await this._init();\n    }\n\n    let projectRoot = nullthrows(this.#resolvedOptions).projectRoot;\n    if (request.resolveFrom == null && path.isAbsolute(request.specifier)) {\n      request.specifier = fromProjectPathRelative(\n        toProjectPath(projectRoot, request.specifier),\n      );\n    }\n\n    let dependency = createDependency(projectRoot, {\n      ...request,\n      env: createEnvironment({\n        ...request.env,\n        loc:\n          request.env?.loc != null\n            ? {\n                ...request.env.loc,\n                filePath: toProjectPath(projectRoot, request.env.loc.filePath),\n              }\n            : undefined,\n      }),\n    });\n\n    let req = createPathRequest({\n      dependency,\n      name: request.specifier,\n    });\n\n    let res = await this.#requestTracker.runRequest(req, {\n      force: true,\n    });\n    if (!res) {\n      return null;\n    }\n\n    return {\n      filePath: fromProjectPath(projectRoot, res.filePath),\n      code: res.code,\n      query: res.query,\n      sideEffects: res.sideEffects,\n    };\n  }\n}\n\nexport class BuildError extends ThrowableDiagnostic {\n  constructor(diagnostic: Array<Diagnostic> | Diagnostic) {\n    super({diagnostic});\n    this.name = 'BuildError';\n  }\n}\n\nexport function createWorkerFarm(\n  options: $Shape<FarmOptions> = {},\n): WorkerFarm {\n  return new WorkerFarm({\n    ...options,\n    // $FlowFixMe\n    workerPath: process.browser\n      ? '@parcel/core/src/worker.js'\n      : require.resolve('./worker'),\n  });\n}\n"
  },
  {
    "path": "packages/core/core/src/ParcelConfig.js",
    "content": "// @flow\nimport type {\n  Glob,\n  Transformer,\n  Resolver,\n  Bundler,\n  Namer,\n  Runtime,\n  PackageName,\n  Optimizer,\n  Compressor,\n  Packager,\n  Reporter,\n  Semver,\n  SemverRange,\n  Validator,\n  FilePath,\n} from '@parcel/types';\nimport type {\n  ProcessedParcelConfig,\n  ParcelPluginNode,\n  PureParcelConfigPipeline,\n  ExtendableParcelConfigPipeline,\n  ParcelOptions,\n} from './types';\nimport ThrowableDiagnostic, {\n  md,\n  generateJSONCodeHighlights,\n} from '@parcel/diagnostic';\nimport json5 from 'json5';\nimport nullthrows from 'nullthrows';\n\nimport {globToRegex} from '@parcel/utils';\nimport {basename} from 'path';\nimport loadPlugin from './loadParcelPlugin';\nimport {\n  type ProjectPath,\n  fromProjectPath,\n  fromProjectPathRelative,\n  toProjectPathUnsafe,\n} from './projectPath';\n\ntype GlobMap<T> = {[Glob]: T, ...};\ntype SerializedParcelConfig = {|\n  $$raw: boolean,\n  config: ProcessedParcelConfig,\n  options: ParcelOptions,\n|};\n\nexport type LoadedPlugin<T> = {|\n  name: string,\n  version: Semver,\n  plugin: T,\n  resolveFrom: ProjectPath,\n  keyPath?: string,\n  range?: ?SemverRange,\n|};\n\nexport default class ParcelConfig {\n  options: ParcelOptions;\n  filePath: ProjectPath;\n  resolvers: PureParcelConfigPipeline;\n  transformers: GlobMap<ExtendableParcelConfigPipeline>;\n  bundler: ?ParcelPluginNode;\n  namers: PureParcelConfigPipeline;\n  runtimes: PureParcelConfigPipeline;\n  packagers: GlobMap<ParcelPluginNode>;\n  validators: GlobMap<ExtendableParcelConfigPipeline>;\n  optimizers: GlobMap<ExtendableParcelConfigPipeline>;\n  compressors: GlobMap<ExtendableParcelConfigPipeline>;\n  reporters: PureParcelConfigPipeline;\n  pluginCache: Map<PackageName, any>;\n  regexCache: Map<string, RegExp>;\n\n  constructor(config: ProcessedParcelConfig, options: ParcelOptions) {\n    this.options = options;\n    this.filePath = config.filePath;\n    this.resolvers = config.resolvers || [];\n    this.transformers = config.transformers || {};\n    this.runtimes = config.runtimes || [];\n    this.bundler = config.bundler;\n    this.namers = config.namers || [];\n    this.packagers = config.packagers || {};\n    this.optimizers = config.optimizers || {};\n    this.compressors = config.compressors || {};\n    this.reporters = config.reporters || [];\n    this.validators = config.validators || {};\n    this.pluginCache = new Map();\n    this.regexCache = new Map();\n  }\n\n  static deserialize(serialized: SerializedParcelConfig): ParcelConfig {\n    return new ParcelConfig(serialized.config, serialized.options);\n  }\n\n  getConfig(): ProcessedParcelConfig {\n    return {\n      filePath: this.filePath,\n      resolvers: this.resolvers,\n      transformers: this.transformers,\n      validators: this.validators,\n      runtimes: this.runtimes,\n      bundler: this.bundler,\n      namers: this.namers,\n      packagers: this.packagers,\n      optimizers: this.optimizers,\n      compressors: this.compressors,\n      reporters: this.reporters,\n    };\n  }\n\n  serialize(): SerializedParcelConfig {\n    return {\n      $$raw: false,\n      config: this.getConfig(),\n      options: this.options,\n    };\n  }\n\n  _loadPlugin<T>(node: ParcelPluginNode): Promise<{|\n    plugin: T,\n    version: Semver,\n    resolveFrom: ProjectPath,\n    range: ?SemverRange,\n  |} | null> {\n    let plugin = this.pluginCache.get(node.packageName);\n    if (plugin) {\n      return plugin;\n    }\n\n    plugin = loadPlugin<T>(\n      node.packageName,\n      fromProjectPath(this.options.projectRoot, node.resolveFrom),\n      node.keyPath,\n      this.options,\n    );\n\n    this.pluginCache.set(node.packageName, plugin);\n    return plugin;\n  }\n\n  async loadPlugin<T>(node: ParcelPluginNode): Promise<LoadedPlugin<T> | null> {\n    let plugin = await this._loadPlugin(node);\n    if (!plugin) {\n      return null;\n    }\n    return {\n      ...plugin,\n      name: node.packageName,\n      keyPath: node.keyPath,\n    };\n  }\n\n  invalidatePlugin(packageName: PackageName) {\n    this.pluginCache.delete(packageName);\n  }\n\n  async loadPlugins<T>(\n    plugins: PureParcelConfigPipeline,\n  ): Promise<Array<LoadedPlugin<T>>> {\n    return (await Promise.all(plugins.map(p => this.loadPlugin<T>(p)))).filter(\n      Boolean,\n    );\n  }\n\n  async getResolvers(): Promise<Array<LoadedPlugin<Resolver<mixed>>>> {\n    if (this.resolvers.length === 0) {\n      throw await this.missingPluginError(\n        this.resolvers,\n        'No resolver plugins specified in .parcelrc config',\n        '/resolvers',\n      );\n    }\n\n    return this.loadPlugins<Resolver<mixed>>(this.resolvers);\n  }\n\n  _getValidatorNodes(filePath: ProjectPath): $ReadOnlyArray<ParcelPluginNode> {\n    let validators: PureParcelConfigPipeline =\n      this.matchGlobMapPipelines(filePath, this.validators) || [];\n\n    return validators;\n  }\n\n  getValidatorNames(filePath: ProjectPath): Array<string> {\n    let validators: PureParcelConfigPipeline =\n      this._getValidatorNodes(filePath);\n    return validators.map(v => v.packageName);\n  }\n\n  getValidators(\n    filePath: ProjectPath,\n  ): Promise<Array<LoadedPlugin<Validator>>> {\n    let validators = this._getValidatorNodes(filePath);\n    return this.loadPlugins<Validator>(validators);\n  }\n\n  getNamedPipelines(): $ReadOnlyArray<string> {\n    return Object.keys(this.transformers)\n      .filter(glob => glob.includes(':'))\n      .map(glob => glob.split(':')[0]);\n  }\n\n  async getTransformers(\n    filePath: ProjectPath,\n    pipeline?: ?string,\n    allowEmpty?: boolean,\n  ): Promise<Array<LoadedPlugin<Transformer<mixed>>>> {\n    let transformers: PureParcelConfigPipeline | null =\n      this.matchGlobMapPipelines(filePath, this.transformers, pipeline);\n    if (!transformers || transformers.length === 0) {\n      if (allowEmpty) {\n        return [];\n      }\n\n      throw await this.missingPluginError(\n        this.transformers,\n        md`No transformers found for __${fromProjectPathRelative(filePath)}__` +\n          (pipeline != null ? ` with pipeline: '${pipeline}'` : '') +\n          '.',\n        '/transformers',\n      );\n    }\n\n    return this.loadPlugins<Transformer<mixed>>(transformers);\n  }\n\n  async getBundler(): Promise<LoadedPlugin<Bundler<mixed>>> {\n    if (!this.bundler) {\n      throw await this.missingPluginError(\n        [],\n        'No bundler specified in .parcelrc config',\n        '/bundler',\n      );\n    }\n\n    return nullthrows(await this.loadPlugin<Bundler<mixed>>(this.bundler));\n  }\n\n  async getNamers(): Promise<Array<LoadedPlugin<Namer<mixed>>>> {\n    if (this.namers.length === 0) {\n      throw await this.missingPluginError(\n        this.namers,\n        'No namer plugins specified in .parcelrc config',\n        '/namers',\n      );\n    }\n\n    return this.loadPlugins<Namer<mixed>>(this.namers);\n  }\n\n  getRuntimes(): Promise<Array<LoadedPlugin<Runtime<mixed>>>> {\n    if (!this.runtimes) {\n      return Promise.resolve([]);\n    }\n\n    return this.loadPlugins<Runtime<mixed>>(this.runtimes);\n  }\n\n  async getPackager(\n    filePath: FilePath,\n    pipeline: ?string,\n  ): Promise<LoadedPlugin<Packager<mixed, mixed>>> {\n    // If a pipeline is specified, but it doesn't exist in the optimizers config, ignore it.\n    // Pipelines for bundles come from their entry assets, so the pipeline likely exists in transformers.\n    if (pipeline) {\n      let prefix = pipeline + ':';\n      if (!Object.keys(this.packagers).some(glob => glob.startsWith(prefix))) {\n        pipeline = null;\n      }\n    }\n\n    let packager = this.matchGlobMap(\n      toProjectPathUnsafe(filePath),\n      this.packagers,\n      pipeline,\n    );\n    if (!packager) {\n      throw await this.missingPluginError(\n        this.packagers,\n        md`No packager found for __${filePath}__.`,\n        '/packagers',\n      );\n    }\n    return nullthrows(await this.loadPlugin<Packager<mixed, mixed>>(packager));\n  }\n\n  _getOptimizerNodes(\n    filePath: FilePath,\n    pipeline: ?string,\n  ): PureParcelConfigPipeline {\n    // If a pipeline is specified, but it doesn't exist in the optimizers config, ignore it.\n    // Pipelines for bundles come from their entry assets, so the pipeline likely exists in transformers.\n    if (pipeline) {\n      let prefix = pipeline + ':';\n      if (!Object.keys(this.optimizers).some(glob => glob.startsWith(prefix))) {\n        pipeline = null;\n      }\n    }\n\n    return (\n      this.matchGlobMapPipelines(\n        toProjectPathUnsafe(filePath),\n        this.optimizers,\n        pipeline,\n      ) ?? []\n    );\n  }\n\n  getOptimizerNames(filePath: FilePath, pipeline: ?string): Array<string> {\n    let optimizers = this._getOptimizerNodes(filePath, pipeline);\n    return optimizers.map(o => o.packageName);\n  }\n\n  getOptimizers(\n    filePath: FilePath,\n    pipeline: ?string,\n  ): Promise<Array<LoadedPlugin<Optimizer<mixed, mixed>>>> {\n    let optimizers = this._getOptimizerNodes(filePath, pipeline);\n    if (optimizers.length === 0) {\n      return Promise.resolve([]);\n    }\n\n    return this.loadPlugins<Optimizer<mixed, mixed>>(optimizers);\n  }\n\n  async getCompressors(\n    filePath: FilePath,\n  ): Promise<Array<LoadedPlugin<Compressor>>> {\n    let compressors =\n      this.matchGlobMapPipelines(\n        toProjectPathUnsafe(filePath),\n        this.compressors,\n      ) ?? [];\n\n    if (compressors.length === 0) {\n      throw await this.missingPluginError(\n        this.compressors,\n        md`No compressors found for __${filePath}__.`,\n        '/compressors',\n      );\n    }\n\n    return this.loadPlugins<Compressor>(compressors);\n  }\n\n  getReporters(): Promise<Array<LoadedPlugin<Reporter>>> {\n    return this.loadPlugins<Reporter>(this.reporters);\n  }\n\n  isGlobMatch(\n    projectPath: ProjectPath,\n    pattern: Glob,\n    pipeline?: ?string,\n  ): boolean {\n    // glob's shouldn't be dependant on absolute paths anyway\n    let filePath = fromProjectPathRelative(projectPath);\n\n    let [patternPipeline, patternGlob] = pattern.split(':');\n    if (!patternGlob) {\n      patternGlob = patternPipeline;\n      patternPipeline = null;\n    }\n\n    let re = this.regexCache.get(patternGlob);\n    if (!re) {\n      re = globToRegex(patternGlob, {dot: true, nocase: true});\n      this.regexCache.set(patternGlob, re);\n    }\n\n    return (\n      (pipeline === patternPipeline || (!pipeline && !patternPipeline)) &&\n      (re.test(filePath) || re.test(basename(filePath)))\n    );\n  }\n\n  matchGlobMap<T>(\n    filePath: ProjectPath,\n    globMap: {|[Glob]: T|},\n    pipeline?: ?string,\n  ): ?T {\n    for (let pattern in globMap) {\n      if (this.isGlobMatch(filePath, pattern, pipeline)) {\n        return globMap[pattern];\n      }\n    }\n\n    return null;\n  }\n\n  matchGlobMapPipelines(\n    filePath: ProjectPath,\n    globMap: {|[Glob]: ExtendableParcelConfigPipeline|},\n    pipeline?: ?string,\n  ): PureParcelConfigPipeline {\n    let matches = [];\n    if (pipeline) {\n      // If a pipeline is requested, a the glob needs to match exactly\n      let exactMatch;\n      for (let pattern in globMap) {\n        if (this.isGlobMatch(filePath, pattern, pipeline)) {\n          exactMatch = globMap[pattern];\n          break;\n        }\n      }\n      if (!exactMatch) {\n        return [];\n      } else {\n        matches.push(exactMatch);\n      }\n    }\n\n    for (let pattern in globMap) {\n      if (this.isGlobMatch(filePath, pattern)) {\n        matches.push(globMap[pattern]);\n      }\n    }\n\n    let flatten = () => {\n      let pipeline = matches.shift() || [];\n      let spreadIndex = pipeline.indexOf('...');\n      if (spreadIndex >= 0) {\n        pipeline = [\n          ...pipeline.slice(0, spreadIndex),\n          ...flatten(),\n          ...pipeline.slice(spreadIndex + 1),\n        ];\n      }\n\n      if (pipeline.includes('...')) {\n        throw new Error(\n          'Only one spread parameter can be included in a config pipeline',\n        );\n      }\n\n      return pipeline;\n    };\n\n    let res = flatten();\n    // $FlowFixMe afaik this should work\n    return res;\n  }\n\n  async missingPluginError(\n    plugins:\n      | GlobMap<ExtendableParcelConfigPipeline>\n      | GlobMap<ParcelPluginNode>\n      | PureParcelConfigPipeline,\n    message: string,\n    key: string,\n  ): Promise<ThrowableDiagnostic> {\n    let configsWithPlugin;\n    if (Array.isArray(plugins)) {\n      configsWithPlugin = new Set(getConfigPaths(this.options, plugins));\n    } else {\n      configsWithPlugin = new Set(\n        Object.keys(plugins).flatMap(k =>\n          Array.isArray(plugins[k])\n            ? getConfigPaths(this.options, plugins[k])\n            : [getConfigPath(this.options, plugins[k])],\n        ),\n      );\n    }\n\n    if (configsWithPlugin.size === 0) {\n      configsWithPlugin.add(\n        fromProjectPath(this.options.projectRoot, this.filePath),\n      );\n    }\n\n    let seenKey = false;\n    let codeFrames = await Promise.all(\n      [...configsWithPlugin].map(async filePath => {\n        let configContents = await this.options.inputFS.readFile(\n          filePath,\n          'utf8',\n        );\n        if (!json5.parse(configContents)[key.slice(1)]) {\n          key = '';\n        } else {\n          seenKey = true;\n        }\n        return {\n          filePath,\n          code: configContents,\n          codeHighlights: generateJSONCodeHighlights(configContents, [{key}]),\n        };\n      }),\n    );\n    return new ThrowableDiagnostic({\n      diagnostic: {\n        message,\n        origin: '@parcel/core',\n        codeFrames,\n        hints: !seenKey ? ['Try extending __@parcel/config-default__'] : [],\n      },\n    });\n  }\n}\n\nfunction getConfigPaths(options, nodes) {\n  return nodes\n    .map(node => (node !== '...' ? getConfigPath(options, node) : null))\n    .filter(Boolean);\n}\n\nfunction getConfigPath(options, node) {\n  return fromProjectPath(options.projectRoot, node.resolveFrom);\n}\n"
  },
  {
    "path": "packages/core/core/src/ParcelConfig.schema.js",
    "content": "// @flow strict-local\nimport type {PackageName} from '@parcel/types';\nimport type {SchemaEntity} from '@parcel/utils';\nimport assert from 'assert';\n\n// Reasoning behind this validation:\n// https://github.com/parcel-bundler/parcel/issues/3397#issuecomment-521353931\nexport function validatePackageName(\n  pkg: ?PackageName,\n  pluginType: string,\n  key: string,\n) {\n  // $FlowFixMe\n  if (!pkg) {\n    return;\n  }\n\n  assert(typeof pkg === 'string', `\"${key}\" must be a string`);\n\n  if (pkg.startsWith('@parcel')) {\n    assert(\n      pkg.replace(/^@parcel\\//, '').startsWith(`${pluginType}-`),\n      `Official parcel ${pluginType} packages must be named according to \"@parcel/${pluginType}-{name}\"`,\n    );\n  } else if (pkg.startsWith('@')) {\n    let [scope, name] = pkg.split('/');\n    assert(\n      name.startsWith(`parcel-${pluginType}-`) ||\n        name === `parcel-${pluginType}`,\n      `Scoped parcel ${pluginType} packages must be named according to \"${scope}/parcel-${pluginType}[-{name}]\"`,\n    );\n  } else if (!pkg.startsWith('.')) {\n    assert(\n      pkg.startsWith(`parcel-${pluginType}-`),\n      `Parcel ${pluginType} packages must be named according to \"parcel-${pluginType}-{name}\"`,\n    );\n  }\n}\n\nconst validatePluginName = (pluginType: string, key: string) => {\n  return (val: string) => {\n    // allow plugin spread...\n    if (val === '...') return;\n\n    try {\n      validatePackageName(val, pluginType, key);\n    } catch (e) {\n      return e.message;\n    }\n  };\n};\n\nconst validateExtends = (val: string): void => {\n  // allow relative paths...\n  if (val.startsWith('.')) return;\n\n  try {\n    validatePackageName(val, 'config', 'extends');\n  } catch (e) {\n    return e.message;\n  }\n};\n\nconst pipelineSchema = (pluginType: string, key: string): SchemaEntity => {\n  return {\n    type: 'array',\n    items: {\n      type: 'string',\n      __validate: validatePluginName(pluginType, key),\n    },\n  };\n};\n\nconst mapPipelineSchema = (pluginType: string, key: string): SchemaEntity => {\n  return {\n    type: 'object',\n    properties: {},\n    additionalProperties: pipelineSchema(pluginType, key),\n  };\n};\n\nconst mapStringSchema = (pluginType: string, key: string): SchemaEntity => {\n  return {\n    type: 'object',\n    properties: {},\n    additionalProperties: {\n      type: 'string',\n      __validate: validatePluginName(pluginType, key),\n    },\n  };\n};\n\nexport default {\n  type: 'object',\n  properties: {\n    $schema: {\n      type: 'string',\n    },\n    extends: {\n      oneOf: [\n        {\n          type: 'string',\n          __validate: validateExtends,\n        },\n        {\n          type: 'array',\n          items: {\n            type: 'string',\n            __validate: validateExtends,\n          },\n        },\n      ],\n    },\n    bundler: {\n      type: 'string',\n      __validate: (validatePluginName('bundler', 'bundler'): string => void),\n    },\n    resolvers: (pipelineSchema('resolver', 'resolvers'): SchemaEntity),\n    transformers: (mapPipelineSchema(\n      'transformer',\n      'transformers',\n    ): SchemaEntity),\n    validators: (mapPipelineSchema('validator', 'validators'): SchemaEntity),\n    namers: (pipelineSchema('namer', 'namers'): SchemaEntity),\n    packagers: (mapStringSchema('packager', 'packagers'): SchemaEntity),\n    optimizers: (mapPipelineSchema('optimizer', 'optimizers'): SchemaEntity),\n    compressors: (mapPipelineSchema('compressor', 'compressors'): SchemaEntity),\n    reporters: (pipelineSchema('reporter', 'reporters'): SchemaEntity),\n    runtimes: (pipelineSchema('runtime', 'runtimes'): SchemaEntity),\n    filePath: {\n      type: 'string',\n    },\n    resolveFrom: {\n      type: 'string',\n    },\n  },\n  additionalProperties: false,\n};\n"
  },
  {
    "path": "packages/core/core/src/ReporterRunner.js",
    "content": "// @flow strict-local\n\nimport type {ReporterEvent, Reporter} from '@parcel/types';\nimport type {WorkerApi} from '@parcel/workers';\nimport type {Bundle as InternalBundle, ParcelOptions} from './types';\nimport type {LoadedPlugin} from './ParcelConfig';\n\nimport invariant from 'assert';\nimport {\n  bundleToInternalBundle,\n  bundleToInternalBundleGraph,\n  NamedBundle,\n} from './public/Bundle';\nimport WorkerFarm, {bus} from '@parcel/workers';\nimport logger, {\n  patchConsole,\n  unpatchConsole,\n  PluginLogger,\n  INTERNAL_ORIGINAL_CONSOLE,\n} from '@parcel/logger';\nimport PluginOptions from './public/PluginOptions';\nimport BundleGraph from './BundleGraph';\nimport {tracer, PluginTracer} from '@parcel/profiler';\nimport {anyToDiagnostic} from '@parcel/diagnostic';\n\ntype Opts = {|\n  options: ParcelOptions,\n  reporters: Array<LoadedPlugin<Reporter>>,\n  workerFarm: WorkerFarm,\n|};\n\nconst instances: Set<ReporterRunner> = new Set();\n\nexport default class ReporterRunner {\n  workerFarm: WorkerFarm;\n  errors: Error[];\n  options: ParcelOptions;\n  pluginOptions: PluginOptions;\n  reporters: Array<LoadedPlugin<Reporter>>;\n\n  constructor(opts: Opts) {\n    this.errors = [];\n    this.options = opts.options;\n    this.reporters = opts.reporters;\n    this.workerFarm = opts.workerFarm;\n    this.pluginOptions = new PluginOptions(this.options);\n\n    logger.onLog(event => this.report(event));\n    tracer.onTrace(event => this.report(event));\n\n    bus.on('reporterEvent', this.eventHandler);\n    instances.add(this);\n\n    if (this.options.shouldPatchConsole) {\n      patchConsole();\n    } else {\n      unpatchConsole();\n    }\n  }\n\n  eventHandler: ReporterEvent => void = (event): void => {\n    if (\n      event.type === 'buildProgress' &&\n      (event.phase === 'optimizing' || event.phase === 'packaging') &&\n      !(event.bundle instanceof NamedBundle)\n    ) {\n      // $FlowFixMe[prop-missing]\n      let bundleGraphRef = event.bundleGraphRef;\n      // $FlowFixMe[incompatible-exact]\n      let bundle: InternalBundle = event.bundle;\n      // Convert any internal bundles back to their public equivalents as reporting\n      // is public api\n      let bundleGraph = this.workerFarm.workerApi.getSharedReference(\n        // $FlowFixMe\n        bundleGraphRef,\n      );\n      invariant(bundleGraph instanceof BundleGraph);\n      // $FlowFixMe[incompatible-call]\n      this.report({\n        ...event,\n        bundle: NamedBundle.get(bundle, bundleGraph, this.options),\n      });\n      return;\n    }\n\n    this.report(event);\n  };\n\n  async report(unsanitisedEvent: ReporterEvent) {\n    let event: ReporterEvent = unsanitisedEvent;\n    if (event.diagnostics) {\n      // Sanitise input before passing to reporters\n      // $FlowFixMe too complex to narrow down by type\n      event = {\n        ...event,\n        diagnostics: anyToDiagnostic(event.diagnostics),\n      };\n    }\n    for (let reporter of this.reporters) {\n      let measurement;\n      try {\n        // To avoid an infinite loop we don't measure trace events, as they'll\n        // result in another trace!\n        if (event.type !== 'trace') {\n          measurement = tracer.createMeasurement(reporter.name, 'reporter');\n        }\n        await reporter.plugin.report({\n          // $FlowFixMe\n          event,\n          options: this.pluginOptions,\n          logger: new PluginLogger({origin: reporter.name}),\n          tracer: new PluginTracer({\n            origin: reporter.name,\n            category: 'reporter',\n          }),\n        });\n      } catch (reportError) {\n        if (event.type !== 'buildSuccess') {\n          // This will be captured by consumers\n          INTERNAL_ORIGINAL_CONSOLE.error(reportError);\n        }\n\n        this.errors.push(reportError);\n      } finally {\n        measurement && measurement.end();\n      }\n    }\n  }\n\n  dispose() {\n    bus.off('reporterEvent', this.eventHandler);\n    instances.delete(this);\n  }\n}\n\nexport function reportWorker(workerApi: WorkerApi, event: ReporterEvent) {\n  if (\n    event.type === 'buildProgress' &&\n    (event.phase === 'optimizing' || event.phase === 'packaging')\n  ) {\n    // Convert any public api bundles to their internal equivalents for\n    // easy serialization\n    bus.emit('reporterEvent', {\n      ...event,\n      bundle: bundleToInternalBundle(event.bundle),\n      bundleGraphRef: workerApi.resolveSharedReference(\n        bundleToInternalBundleGraph(event.bundle),\n      ),\n    });\n    return;\n  }\n\n  bus.emit('reporterEvent', event);\n}\n\nexport async function report(event: ReporterEvent): Promise<void> {\n  await Promise.all([...instances].map(instance => instance.report(event)));\n}\n"
  },
  {
    "path": "packages/core/core/src/RequestTracker.js",
    "content": "// @flow strict-local\n\nimport invariant, {AssertionError} from 'assert';\nimport path from 'path';\n\nimport {ContentGraph} from '@parcel/graph';\nimport type {\n  ContentGraphOpts,\n  ContentKey,\n  NodeId,\n  SerializedContentGraph,\n} from '@parcel/graph';\nimport logger from '@parcel/logger';\nimport {hashString} from '@parcel/rust';\nimport type {Async, EnvMap} from '@parcel/types';\nimport {\n  type Deferred,\n  isGlobMatch,\n  isDirectoryInside,\n  makeDeferredWithPromise,\n} from '@parcel/utils';\nimport type {Options as WatcherOptions, Event} from '@parcel/watcher';\nimport type WorkerFarm from '@parcel/workers';\nimport nullthrows from 'nullthrows';\n\nimport {\n  PARCEL_VERSION,\n  VALID,\n  INITIAL_BUILD,\n  FILE_CREATE,\n  FILE_UPDATE,\n  FILE_DELETE,\n  ENV_CHANGE,\n  OPTION_CHANGE,\n  STARTUP,\n  ERROR,\n} from './constants';\nimport {\n  type ProjectPath,\n  fromProjectPathRelative,\n  toProjectPathUnsafe,\n  toProjectPath,\n} from './projectPath';\nimport {getConfigKeyContentHash} from './requests/ConfigRequest';\nimport type {AssetGraphRequestResult} from './requests/AssetGraphRequest';\nimport type {PackageRequestResult} from './requests/PackageRequest';\nimport type {ConfigRequestResult} from './requests/ConfigRequest';\nimport type {DevDepRequestResult} from './requests/DevDepRequest';\nimport type {WriteBundlesRequestResult} from './requests/WriteBundlesRequest';\nimport type {WriteBundleRequestResult} from './requests/WriteBundleRequest';\nimport type {TargetRequestResult} from './requests/TargetRequest';\nimport type {PathRequestResult} from './requests/PathRequest';\nimport type {ParcelConfigRequestResult} from './requests/ParcelConfigRequest';\nimport type {ParcelBuildRequestResult} from './requests/ParcelBuildRequest';\nimport type {EntryRequestResult} from './requests/EntryRequest';\nimport type {BundleGraphResult} from './requests/BundleGraphRequest';\nimport {deserialize, serialize} from './serializer';\nimport type {\n  AssetRequestResult,\n  ParcelOptions,\n  RequestInvalidation,\n  InternalFileCreateInvalidation,\n  InternalGlob,\n} from './types';\nimport {BuildAbortError, assertSignalNotAborted, hashFromOption} from './utils';\n\nexport const requestGraphEdgeTypes = {\n  subrequest: 2,\n  invalidated_by_update: 3,\n  invalidated_by_delete: 4,\n  invalidated_by_create: 5,\n  invalidated_by_create_above: 6,\n  dirname: 7,\n};\n\nclass FSBailoutError extends Error {\n  name: string = 'FSBailoutError';\n}\n\nexport type RequestGraphEdgeType = $Values<typeof requestGraphEdgeTypes>;\n\ntype RequestGraphOpts = {|\n  ...ContentGraphOpts<RequestGraphNode, RequestGraphEdgeType>,\n  invalidNodeIds: Set<NodeId>,\n  incompleteNodeIds: Set<NodeId>,\n  globNodeIds: Set<NodeId>,\n  envNodeIds: Set<NodeId>,\n  optionNodeIds: Set<NodeId>,\n  unpredicatableNodeIds: Set<NodeId>,\n  invalidateOnBuildNodeIds: Set<NodeId>,\n  configKeyNodes: Map<ProjectPath, Set<NodeId>>,\n|};\n\ntype SerializedRequestGraph = {|\n  ...SerializedContentGraph<RequestGraphNode, RequestGraphEdgeType>,\n  invalidNodeIds: Set<NodeId>,\n  incompleteNodeIds: Set<NodeId>,\n  globNodeIds: Set<NodeId>,\n  envNodeIds: Set<NodeId>,\n  optionNodeIds: Set<NodeId>,\n  unpredicatableNodeIds: Set<NodeId>,\n  invalidateOnBuildNodeIds: Set<NodeId>,\n  configKeyNodes: Map<ProjectPath, Set<NodeId>>,\n|};\n\nconst FILE: 0 = 0;\nconst REQUEST: 1 = 1;\nconst FILE_NAME: 2 = 2;\nconst ENV: 3 = 3;\nconst OPTION: 4 = 4;\nconst GLOB: 5 = 5;\nconst CONFIG_KEY: 6 = 6;\n\ntype FileNode = {|id: ContentKey, +type: typeof FILE|};\n\ntype GlobNode = {|id: ContentKey, +type: typeof GLOB, value: InternalGlob|};\n\ntype FileNameNode = {|\n  id: ContentKey,\n  +type: typeof FILE_NAME,\n|};\n\ntype EnvNode = {|\n  id: ContentKey,\n  +type: typeof ENV,\n  value: string | void,\n|};\n\ntype OptionNode = {|\n  id: ContentKey,\n  +type: typeof OPTION,\n  hash: string,\n|};\n\ntype ConfigKeyNode = {|\n  id: ContentKey,\n  +type: typeof CONFIG_KEY,\n  configKey: string,\n  contentHash: string,\n|};\n\ntype Request<TInput, TResult> = {|\n  id: string,\n  +type: RequestType,\n  input: TInput,\n  run: ({|input: TInput, ...StaticRunOpts<TResult>|}) => Async<TResult>,\n|};\n\nexport type RequestResult =\n  | AssetGraphRequestResult\n  | PackageRequestResult\n  | ConfigRequestResult\n  | DevDepRequestResult\n  | WriteBundlesRequestResult\n  | WriteBundleRequestResult\n  | TargetRequestResult\n  | PathRequestResult\n  | ParcelConfigRequestResult\n  | ParcelBuildRequestResult\n  | EntryRequestResult\n  | BundleGraphResult\n  | AssetRequestResult;\n\ntype InvalidateReason = number;\ntype RequestNode = {|\n  id: ContentKey,\n  +type: typeof REQUEST,\n  +requestType: RequestType,\n  invalidateReason: InvalidateReason,\n  result?: RequestResult,\n  resultCacheKey?: ?string,\n  hash?: string,\n|};\n\nexport const requestTypes = {\n  parcel_build_request: 1,\n  bundle_graph_request: 2,\n  asset_graph_request: 3,\n  entry_request: 4,\n  target_request: 5,\n  parcel_config_request: 6,\n  path_request: 7,\n  dev_dep_request: 8,\n  asset_request: 9,\n  config_request: 10,\n  write_bundles_request: 11,\n  package_request: 12,\n  write_bundle_request: 13,\n  validation_request: 14,\n};\n\ntype RequestType = $Values<typeof requestTypes>;\ntype RequestTypeName = $Keys<typeof requestTypes>;\n\ntype RequestGraphNode =\n  | RequestNode\n  | FileNode\n  | GlobNode\n  | FileNameNode\n  | EnvNode\n  | OptionNode\n  | ConfigKeyNode;\n\nexport type RunAPI<TResult: RequestResult> = {|\n  invalidateOnFileCreate: InternalFileCreateInvalidation => void,\n  invalidateOnFileDelete: ProjectPath => void,\n  invalidateOnFileUpdate: ProjectPath => void,\n  invalidateOnConfigKeyChange: (\n    filePath: ProjectPath,\n    configKey: string,\n    contentHash: string,\n  ) => void,\n  invalidateOnStartup: () => void,\n  invalidateOnBuild: () => void,\n  invalidateOnEnvChange: string => void,\n  invalidateOnOptionChange: string => void,\n  getInvalidations(): Array<RequestInvalidation>,\n  storeResult(result: TResult, cacheKey?: string): void,\n  getRequestResult<T: RequestResult>(contentKey: ContentKey): Async<?T>,\n  getPreviousResult<T: RequestResult>(ifMatch?: string): Async<?T>,\n  getSubRequests(): Array<RequestNode>,\n  getInvalidSubRequests(): Array<RequestNode>,\n  canSkipSubrequest(ContentKey): boolean,\n  runRequest: <TInput, TResult: RequestResult>(\n    subRequest: Request<TInput, TResult>,\n    opts?: RunRequestOpts,\n  ) => Promise<TResult>,\n|};\n\ntype RunRequestOpts = {|\n  force: boolean,\n|};\n\nexport type StaticRunOpts<TResult> = {|\n  api: RunAPI<TResult>,\n  farm: WorkerFarm,\n  invalidateReason: InvalidateReason,\n  options: ParcelOptions,\n|};\n\nconst nodeFromFilePath = (filePath: ProjectPath): RequestGraphNode => ({\n  id: fromProjectPathRelative(filePath),\n  type: FILE,\n});\nconst nodeFromGlob = (glob: InternalGlob): RequestGraphNode => ({\n  id: fromProjectPathRelative(glob),\n  type: GLOB,\n  value: glob,\n});\nconst nodeFromFileName = (fileName: string): RequestGraphNode => ({\n  id: 'file_name:' + fileName,\n  type: FILE_NAME,\n});\n\nconst nodeFromRequest = (request: RequestNode): RequestGraphNode => ({\n  id: request.id,\n  type: REQUEST,\n  requestType: request.requestType,\n  invalidateReason: INITIAL_BUILD,\n});\n\nconst nodeFromEnv = (env: string, value: string | void): RequestGraphNode => ({\n  id: 'env:' + env,\n  type: ENV,\n  value,\n});\n\nconst nodeFromOption = (option: string, value: mixed): RequestGraphNode => ({\n  id: 'option:' + option,\n  type: OPTION,\n  hash: hashFromOption(value),\n});\n\nconst nodeFromConfigKey = (\n  fileName: ProjectPath,\n  configKey: string,\n  contentHash: string,\n): RequestGraphNode => ({\n  id: `config_key:${fromProjectPathRelative(fileName)}:${configKey}`,\n  type: CONFIG_KEY,\n  configKey,\n  contentHash,\n});\n\nconst keyFromEnvContentKey = (contentKey: ContentKey): string =>\n  contentKey.slice('env:'.length);\n\nconst keyFromOptionContentKey = (contentKey: ContentKey): string =>\n  contentKey.slice('option:'.length);\nexport class RequestGraph extends ContentGraph<\n  RequestGraphNode,\n  RequestGraphEdgeType,\n> {\n  invalidNodeIds: Set<NodeId> = new Set();\n  incompleteNodeIds: Set<NodeId> = new Set();\n  incompleteNodePromises: Map<NodeId, Promise<boolean>> = new Map();\n  globNodeIds: Set<NodeId> = new Set();\n  envNodeIds: Set<NodeId> = new Set();\n  optionNodeIds: Set<NodeId> = new Set();\n  // Unpredictable nodes are requests that cannot be predicted whether they should rerun based on\n  // filesystem changes alone. They should rerun on each startup of Parcel.\n  unpredicatableNodeIds: Set<NodeId> = new Set();\n  invalidateOnBuildNodeIds: Set<NodeId> = new Set();\n  configKeyNodes: Map<ProjectPath, Set<NodeId>> = new Map();\n\n  // $FlowFixMe[prop-missing]\n  static deserialize(opts: RequestGraphOpts): RequestGraph {\n    // $FlowFixMe[prop-missing]\n    let deserialized = new RequestGraph(opts);\n    deserialized.invalidNodeIds = opts.invalidNodeIds;\n    deserialized.incompleteNodeIds = opts.incompleteNodeIds;\n    deserialized.globNodeIds = opts.globNodeIds;\n    deserialized.envNodeIds = opts.envNodeIds;\n    deserialized.optionNodeIds = opts.optionNodeIds;\n    deserialized.unpredicatableNodeIds = opts.unpredicatableNodeIds;\n    deserialized.invalidateOnBuildNodeIds = opts.invalidateOnBuildNodeIds;\n    deserialized.configKeyNodes = opts.configKeyNodes;\n    return deserialized;\n  }\n\n  // $FlowFixMe[prop-missing]\n  serialize(): SerializedRequestGraph {\n    return {\n      ...super.serialize(),\n      invalidNodeIds: this.invalidNodeIds,\n      incompleteNodeIds: this.incompleteNodeIds,\n      globNodeIds: this.globNodeIds,\n      envNodeIds: this.envNodeIds,\n      optionNodeIds: this.optionNodeIds,\n      unpredicatableNodeIds: this.unpredicatableNodeIds,\n      invalidateOnBuildNodeIds: this.invalidateOnBuildNodeIds,\n      configKeyNodes: this.configKeyNodes,\n    };\n  }\n\n  // addNode for RequestGraph should not override the value if added multiple times\n  addNode(node: RequestGraphNode): NodeId {\n    let nodeId = this._contentKeyToNodeId.get(node.id);\n    if (nodeId != null) {\n      return nodeId;\n    }\n\n    nodeId = super.addNodeByContentKey(node.id, node);\n    if (node.type === GLOB) {\n      this.globNodeIds.add(nodeId);\n    } else if (node.type === ENV) {\n      this.envNodeIds.add(nodeId);\n    } else if (node.type === OPTION) {\n      this.optionNodeIds.add(nodeId);\n    }\n\n    return nodeId;\n  }\n\n  removeNode(nodeId: NodeId): void {\n    this.invalidNodeIds.delete(nodeId);\n    this.incompleteNodeIds.delete(nodeId);\n    this.incompleteNodePromises.delete(nodeId);\n    this.unpredicatableNodeIds.delete(nodeId);\n    this.invalidateOnBuildNodeIds.delete(nodeId);\n    let node = nullthrows(this.getNode(nodeId));\n    if (node.type === GLOB) {\n      this.globNodeIds.delete(nodeId);\n    } else if (node.type === ENV) {\n      this.envNodeIds.delete(nodeId);\n    } else if (node.type === OPTION) {\n      this.optionNodeIds.delete(nodeId);\n    } else if (node.type === CONFIG_KEY) {\n      for (let configKeyNodes of this.configKeyNodes.values()) {\n        configKeyNodes.delete(nodeId);\n      }\n    }\n    return super.removeNode(nodeId);\n  }\n\n  getRequestNode(nodeId: NodeId): RequestNode {\n    let node = nullthrows(this.getNode(nodeId));\n\n    if (node.type === REQUEST) {\n      return node;\n    }\n\n    throw new AssertionError({\n      message: `Expected a request node: ${\n        node.type\n      } (${typeof node.type}) does not equal ${REQUEST} (${typeof REQUEST}).`,\n      expected: REQUEST,\n      actual: node.type,\n    });\n  }\n\n  replaceSubrequests(\n    requestNodeId: NodeId,\n    subrequestContentKeys: Array<ContentKey>,\n  ) {\n    let subrequestNodeIds = [];\n    for (let key of subrequestContentKeys) {\n      if (this.hasContentKey(key)) {\n        subrequestNodeIds.push(this.getNodeIdByContentKey(key));\n      }\n    }\n\n    this.replaceNodeIdsConnectedTo(\n      requestNodeId,\n      subrequestNodeIds,\n      null,\n      requestGraphEdgeTypes.subrequest,\n    );\n  }\n\n  invalidateNode(nodeId: NodeId, reason: InvalidateReason) {\n    let node = nullthrows(this.getNode(nodeId));\n    invariant(node.type === REQUEST);\n    node.invalidateReason |= reason;\n    this.invalidNodeIds.add(nodeId);\n\n    let parentNodes = this.getNodeIdsConnectedTo(\n      nodeId,\n      requestGraphEdgeTypes.subrequest,\n    );\n    for (let parentNode of parentNodes) {\n      this.invalidateNode(parentNode, reason);\n    }\n  }\n\n  invalidateUnpredictableNodes() {\n    for (let nodeId of this.unpredicatableNodeIds) {\n      let node = nullthrows(this.getNode(nodeId));\n      invariant(node.type !== FILE && node.type !== GLOB);\n      this.invalidateNode(nodeId, STARTUP);\n    }\n  }\n\n  invalidateOnBuildNodes() {\n    for (let nodeId of this.invalidateOnBuildNodeIds) {\n      let node = nullthrows(this.getNode(nodeId));\n      invariant(node.type !== FILE && node.type !== GLOB);\n      this.invalidateNode(nodeId, STARTUP);\n    }\n  }\n\n  invalidateEnvNodes(env: EnvMap) {\n    for (let nodeId of this.envNodeIds) {\n      let node = nullthrows(this.getNode(nodeId));\n      invariant(node.type === ENV);\n      if (env[keyFromEnvContentKey(node.id)] !== node.value) {\n        let parentNodes = this.getNodeIdsConnectedTo(\n          nodeId,\n          requestGraphEdgeTypes.invalidated_by_update,\n        );\n        for (let parentNode of parentNodes) {\n          this.invalidateNode(parentNode, ENV_CHANGE);\n        }\n      }\n    }\n  }\n\n  invalidateOptionNodes(options: ParcelOptions) {\n    for (let nodeId of this.optionNodeIds) {\n      let node = nullthrows(this.getNode(nodeId));\n      invariant(node.type === OPTION);\n      if (\n        hashFromOption(options[keyFromOptionContentKey(node.id)]) !== node.hash\n      ) {\n        let parentNodes = this.getNodeIdsConnectedTo(\n          nodeId,\n          requestGraphEdgeTypes.invalidated_by_update,\n        );\n        for (let parentNode of parentNodes) {\n          this.invalidateNode(parentNode, OPTION_CHANGE);\n        }\n      }\n    }\n  }\n\n  invalidateOnConfigKeyChange(\n    requestNodeId: NodeId,\n    filePath: ProjectPath,\n    configKey: string,\n    contentHash: string,\n  ) {\n    let configKeyNodeId = this.addNode(\n      nodeFromConfigKey(filePath, configKey, contentHash),\n    );\n    let nodes = this.configKeyNodes.get(filePath);\n\n    if (!nodes) {\n      nodes = new Set();\n      this.configKeyNodes.set(filePath, nodes);\n    }\n\n    nodes.add(configKeyNodeId);\n\n    if (\n      !this.hasEdge(\n        requestNodeId,\n        configKeyNodeId,\n        requestGraphEdgeTypes.invalidated_by_update,\n      )\n    ) {\n      this.addEdge(\n        requestNodeId,\n        configKeyNodeId,\n        // Store as an update edge, but file deletes are handled too\n        requestGraphEdgeTypes.invalidated_by_update,\n      );\n    }\n  }\n\n  invalidateOnFileUpdate(requestNodeId: NodeId, filePath: ProjectPath) {\n    let fileNodeId = this.addNode(nodeFromFilePath(filePath));\n\n    if (\n      !this.hasEdge(\n        requestNodeId,\n        fileNodeId,\n        requestGraphEdgeTypes.invalidated_by_update,\n      )\n    ) {\n      this.addEdge(\n        requestNodeId,\n        fileNodeId,\n        requestGraphEdgeTypes.invalidated_by_update,\n      );\n    }\n  }\n\n  invalidateOnFileDelete(requestNodeId: NodeId, filePath: ProjectPath) {\n    let fileNodeId = this.addNode(nodeFromFilePath(filePath));\n\n    if (\n      !this.hasEdge(\n        requestNodeId,\n        fileNodeId,\n        requestGraphEdgeTypes.invalidated_by_delete,\n      )\n    ) {\n      this.addEdge(\n        requestNodeId,\n        fileNodeId,\n        requestGraphEdgeTypes.invalidated_by_delete,\n      );\n    }\n  }\n\n  invalidateOnFileCreate(\n    requestNodeId: NodeId,\n    input: InternalFileCreateInvalidation,\n  ) {\n    let node;\n    if (input.glob != null) {\n      node = nodeFromGlob(input.glob);\n    } else if (input.fileName != null && input.aboveFilePath != null) {\n      let aboveFilePath = input.aboveFilePath;\n\n      // Create nodes and edges for each part of the filename pattern.\n      // For example, 'node_modules/foo' would create two nodes and one edge.\n      // This creates a sort of trie structure within the graph that can be\n      // quickly matched by following the edges. This is also memory efficient\n      // since common sub-paths (e.g. 'node_modules') are deduplicated.\n      let parts = input.fileName.split('/').reverse();\n      let lastNodeId;\n      for (let part of parts) {\n        let fileNameNode = nodeFromFileName(part);\n\n        let fileNameNodeId = this.addNode(fileNameNode);\n        if (\n          lastNodeId != null &&\n          !this.hasEdge(\n            lastNodeId,\n            fileNameNodeId,\n            requestGraphEdgeTypes.dirname,\n          )\n        ) {\n          this.addEdge(\n            lastNodeId,\n            fileNameNodeId,\n            requestGraphEdgeTypes.dirname,\n          );\n        }\n\n        lastNodeId = fileNameNodeId;\n      }\n\n      // The `aboveFilePath` condition asserts that requests are only invalidated\n      // if the file being created is \"above\" it in the filesystem (e.g. the file\n      // is created in a parent directory). There is likely to already be a node\n      // for this file in the graph (e.g. the source file) that we can reuse for this.\n      node = nodeFromFilePath(aboveFilePath);\n      let nodeId = this.addNode(node);\n\n      // Now create an edge from the `aboveFilePath` node to the first file_name node\n      // in the chain created above, and an edge from the last node in the chain back to\n      // the `aboveFilePath` node. When matching, we will start from the first node in\n      // the chain, and continue following it to parent directories until there is an\n      // edge pointing an `aboveFilePath` node that also points to the start of the chain.\n      // This indicates a complete match, and any requests attached to the `aboveFilePath`\n      // node will be invalidated.\n      let firstId = 'file_name:' + parts[0];\n      let firstNodeId = this.getNodeIdByContentKey(firstId);\n      if (\n        !this.hasEdge(\n          nodeId,\n          firstNodeId,\n          requestGraphEdgeTypes.invalidated_by_create_above,\n        )\n      ) {\n        this.addEdge(\n          nodeId,\n          firstNodeId,\n          requestGraphEdgeTypes.invalidated_by_create_above,\n        );\n      }\n\n      invariant(lastNodeId != null);\n      if (\n        !this.hasEdge(\n          lastNodeId,\n          nodeId,\n          requestGraphEdgeTypes.invalidated_by_create_above,\n        )\n      ) {\n        this.addEdge(\n          lastNodeId,\n          nodeId,\n          requestGraphEdgeTypes.invalidated_by_create_above,\n        );\n      }\n    } else if (input.filePath != null) {\n      node = nodeFromFilePath(input.filePath);\n    } else {\n      throw new Error('Invalid invalidation');\n    }\n\n    let nodeId = this.addNode(node);\n    if (\n      !this.hasEdge(\n        requestNodeId,\n        nodeId,\n        requestGraphEdgeTypes.invalidated_by_create,\n      )\n    ) {\n      this.addEdge(\n        requestNodeId,\n        nodeId,\n        requestGraphEdgeTypes.invalidated_by_create,\n      );\n    }\n  }\n\n  invalidateOnStartup(requestNodeId: NodeId) {\n    this.getRequestNode(requestNodeId);\n    this.unpredicatableNodeIds.add(requestNodeId);\n  }\n\n  invalidateOnBuild(requestNodeId: NodeId) {\n    this.getRequestNode(requestNodeId);\n    this.invalidateOnBuildNodeIds.add(requestNodeId);\n  }\n\n  invalidateOnEnvChange(\n    requestNodeId: NodeId,\n    env: string,\n    value: string | void,\n  ) {\n    let envNode = nodeFromEnv(env, value);\n    let envNodeId = this.addNode(envNode);\n\n    if (\n      !this.hasEdge(\n        requestNodeId,\n        envNodeId,\n        requestGraphEdgeTypes.invalidated_by_update,\n      )\n    ) {\n      this.addEdge(\n        requestNodeId,\n        envNodeId,\n        requestGraphEdgeTypes.invalidated_by_update,\n      );\n    }\n  }\n\n  invalidateOnOptionChange(\n    requestNodeId: NodeId,\n    option: string,\n    value: mixed,\n  ) {\n    let optionNode = nodeFromOption(option, value);\n    let optionNodeId = this.addNode(optionNode);\n\n    if (\n      !this.hasEdge(\n        requestNodeId,\n        optionNodeId,\n        requestGraphEdgeTypes.invalidated_by_update,\n      )\n    ) {\n      this.addEdge(\n        requestNodeId,\n        optionNodeId,\n        requestGraphEdgeTypes.invalidated_by_update,\n      );\n    }\n  }\n\n  clearInvalidations(nodeId: NodeId) {\n    this.unpredicatableNodeIds.delete(nodeId);\n    this.invalidateOnBuildNodeIds.delete(nodeId);\n    this.replaceNodeIdsConnectedTo(\n      nodeId,\n      [],\n      null,\n      requestGraphEdgeTypes.invalidated_by_update,\n    );\n    this.replaceNodeIdsConnectedTo(\n      nodeId,\n      [],\n      null,\n      requestGraphEdgeTypes.invalidated_by_delete,\n    );\n    this.replaceNodeIdsConnectedTo(\n      nodeId,\n      [],\n      null,\n      requestGraphEdgeTypes.invalidated_by_create,\n    );\n  }\n\n  getInvalidations(requestNodeId: NodeId): Array<RequestInvalidation> {\n    if (!this.hasNode(requestNodeId)) {\n      return [];\n    }\n\n    // For now just handling updates. Could add creates/deletes later if needed.\n    let invalidations = this.getNodeIdsConnectedFrom(\n      requestNodeId,\n      requestGraphEdgeTypes.invalidated_by_update,\n    );\n    return invalidations\n      .map(nodeId => {\n        let node = nullthrows(this.getNode(nodeId));\n        switch (node.type) {\n          case FILE:\n            return {type: 'file', filePath: toProjectPathUnsafe(node.id)};\n          case ENV:\n            return {type: 'env', key: keyFromEnvContentKey(node.id)};\n          case OPTION:\n            return {\n              type: 'option',\n              key: keyFromOptionContentKey(node.id),\n            };\n        }\n      })\n      .filter(Boolean);\n  }\n\n  getSubRequests(requestNodeId: NodeId): Array<RequestNode> {\n    if (!this.hasNode(requestNodeId)) {\n      return [];\n    }\n\n    let subRequests = this.getNodeIdsConnectedFrom(\n      requestNodeId,\n      requestGraphEdgeTypes.subrequest,\n    );\n\n    return subRequests.map(nodeId => {\n      let node = nullthrows(this.getNode(nodeId));\n      invariant(node.type === REQUEST);\n      return node;\n    });\n  }\n\n  getInvalidSubRequests(requestNodeId: NodeId): Array<RequestNode> {\n    if (!this.hasNode(requestNodeId)) {\n      return [];\n    }\n\n    let subRequests = this.getNodeIdsConnectedFrom(\n      requestNodeId,\n      requestGraphEdgeTypes.subrequest,\n    );\n\n    return subRequests\n      .filter(id => this.invalidNodeIds.has(id))\n      .map(nodeId => {\n        let node = nullthrows(this.getNode(nodeId));\n        invariant(node.type === REQUEST);\n        return node;\n      });\n  }\n\n  invalidateFileNameNode(\n    node: FileNameNode,\n    filePath: ProjectPath,\n    matchNodes: Array<FileNode>,\n  ) {\n    // If there is an edge between this file_name node and one of the original file nodes pointed to\n    // by the original file_name node, and the matched node is inside the current directory, invalidate\n    // all connected requests pointed to by the file node.\n    let dirname = path.dirname(fromProjectPathRelative(filePath));\n\n    let nodeId = this.getNodeIdByContentKey(node.id);\n    for (let matchNode of matchNodes) {\n      let matchNodeId = this.getNodeIdByContentKey(matchNode.id);\n      if (\n        this.hasEdge(\n          nodeId,\n          matchNodeId,\n          requestGraphEdgeTypes.invalidated_by_create_above,\n        ) &&\n        isDirectoryInside(\n          fromProjectPathRelative(toProjectPathUnsafe(matchNode.id)),\n          dirname,\n        )\n      ) {\n        let connectedNodes = this.getNodeIdsConnectedTo(\n          matchNodeId,\n          requestGraphEdgeTypes.invalidated_by_create,\n        );\n        for (let connectedNode of connectedNodes) {\n          this.invalidateNode(connectedNode, FILE_CREATE);\n        }\n      }\n    }\n\n    // Find the `file_name` node for the parent directory and\n    // recursively invalidate connected requests as described above.\n    let basename = path.basename(dirname);\n    let contentKey = 'file_name:' + basename;\n    if (this.hasContentKey(contentKey)) {\n      if (\n        this.hasEdge(\n          nodeId,\n          this.getNodeIdByContentKey(contentKey),\n          requestGraphEdgeTypes.dirname,\n        )\n      ) {\n        let parent = nullthrows(this.getNodeByContentKey(contentKey));\n        invariant(parent.type === FILE_NAME);\n        this.invalidateFileNameNode(\n          parent,\n          toProjectPathUnsafe(dirname),\n          matchNodes,\n        );\n      }\n    }\n  }\n\n  async respondToFSEvents(\n    events: Array<Event>,\n    options: ParcelOptions,\n    threshold: number,\n  ): Async<boolean> {\n    let didInvalidate = false;\n    let count = 0;\n    let predictedTime = 0;\n    let startTime = Date.now();\n\n    for (let {path: _path, type} of events) {\n      if (++count === 256) {\n        let duration = Date.now() - startTime;\n        predictedTime = duration * (events.length >> 8);\n        if (predictedTime > threshold) {\n          logger.warn({\n            origin: '@parcel/core',\n            message:\n              'Building with clean cache. Cache invalidation took too long.',\n            meta: {\n              trackableEvent: 'cache_invalidation_timeout',\n              watcherEventCount: events.length,\n              predictedTime,\n            },\n          });\n          throw new FSBailoutError(\n            'Responding to file system events exceeded threshold, start with empty cache.',\n          );\n        }\n      }\n\n      let _filePath = toProjectPath(options.projectRoot, _path);\n      let filePath = fromProjectPathRelative(_filePath);\n      let hasFileRequest = this.hasContentKey(filePath);\n\n      // If we see a 'create' event for the project root itself,\n      // this means the project root was moved and we need to\n      // re-run all requests.\n      if (type === 'create' && filePath === '') {\n        logger.verbose({\n          origin: '@parcel/core',\n          message:\n            'Watcher reported project root create event. Invalidate all nodes.',\n          meta: {\n            trackableEvent: 'project_root_create',\n          },\n        });\n        for (let [id, node] of this.nodes.entries()) {\n          if (node?.type === REQUEST) {\n            this.invalidNodeIds.add(id);\n          }\n        }\n        return true;\n      }\n\n      // sometimes mac os reports update events as create events.\n      // if it was a create event, but the file already exists in the graph,\n      // then also invalidate nodes connected by invalidated_by_update edges.\n      if (hasFileRequest && (type === 'create' || type === 'update')) {\n        let nodeId = this.getNodeIdByContentKey(filePath);\n        let nodes = this.getNodeIdsConnectedTo(\n          nodeId,\n          requestGraphEdgeTypes.invalidated_by_update,\n        );\n\n        for (let connectedNode of nodes) {\n          didInvalidate = true;\n          this.invalidateNode(connectedNode, FILE_UPDATE);\n        }\n\n        if (type === 'create') {\n          let nodes = this.getNodeIdsConnectedTo(\n            nodeId,\n            requestGraphEdgeTypes.invalidated_by_create,\n          );\n          for (let connectedNode of nodes) {\n            didInvalidate = true;\n            this.invalidateNode(connectedNode, FILE_CREATE);\n          }\n        }\n      } else if (type === 'create') {\n        let basename = path.basename(filePath);\n        let fileNameNode = this.getNodeByContentKey('file_name:' + basename);\n        if (fileNameNode != null && fileNameNode.type === FILE_NAME) {\n          let fileNameNodeId = this.getNodeIdByContentKey(\n            'file_name:' + basename,\n          );\n\n          // Find potential file nodes to be invalidated if this file name pattern matches\n          let above: Array<FileNode> = [];\n          for (const nodeId of this.getNodeIdsConnectedTo(\n            fileNameNodeId,\n            requestGraphEdgeTypes.invalidated_by_create_above,\n          )) {\n            let node = nullthrows(this.getNode(nodeId));\n            // these might also be `glob` nodes which get handled below, we only care about files here.\n            if (node.type === FILE) {\n              above.push(node);\n            }\n          }\n\n          if (above.length > 0) {\n            didInvalidate = true;\n            this.invalidateFileNameNode(fileNameNode, _filePath, above);\n          }\n        }\n\n        for (let globeNodeId of this.globNodeIds) {\n          let globNode = this.getNode(globeNodeId);\n          invariant(globNode && globNode.type === GLOB);\n\n          if (isGlobMatch(filePath, fromProjectPathRelative(globNode.value))) {\n            let connectedNodes = this.getNodeIdsConnectedTo(\n              globeNodeId,\n              requestGraphEdgeTypes.invalidated_by_create,\n            );\n            for (let connectedNode of connectedNodes) {\n              didInvalidate = true;\n              this.invalidateNode(connectedNode, FILE_CREATE);\n            }\n          }\n        }\n      } else if (hasFileRequest && type === 'delete') {\n        let nodeId = this.getNodeIdByContentKey(filePath);\n        for (let connectedNode of this.getNodeIdsConnectedTo(\n          nodeId,\n          requestGraphEdgeTypes.invalidated_by_delete,\n        )) {\n          didInvalidate = true;\n          this.invalidateNode(connectedNode, FILE_DELETE);\n        }\n\n        // Delete the file node since it doesn't exist anymore.\n        // This ensures that files that don't exist aren't sent\n        // to requests as invalidations for future requests.\n        this.removeNode(nodeId);\n      }\n\n      let configKeyNodes = this.configKeyNodes.get(_filePath);\n      if (configKeyNodes && (type === 'delete' || type === 'update')) {\n        for (let nodeId of configKeyNodes) {\n          let isInvalid = type === 'delete';\n\n          if (type === 'update') {\n            let node = this.getNode(nodeId);\n            invariant(node && node.type === CONFIG_KEY);\n\n            let contentHash = await getConfigKeyContentHash(\n              _filePath,\n              node.configKey,\n              options,\n            );\n\n            isInvalid = node.contentHash !== contentHash;\n          }\n\n          if (isInvalid) {\n            for (let connectedNode of this.getNodeIdsConnectedTo(\n              nodeId,\n              requestGraphEdgeTypes.invalidated_by_update,\n            )) {\n              this.invalidateNode(\n                connectedNode,\n                type === 'delete' ? FILE_DELETE : FILE_UPDATE,\n              );\n            }\n            didInvalidate = true;\n            this.removeNode(nodeId);\n          }\n        }\n      }\n    }\n\n    let duration = Date.now() - startTime;\n    logger.verbose({\n      origin: '@parcel/core',\n      message: `RequestGraph.respondToFSEvents duration: ${duration}`,\n      meta: {\n        trackableEvent: 'fsevent_response_time',\n        duration,\n        predictedTime,\n      },\n    });\n\n    return didInvalidate && this.invalidNodeIds.size > 0;\n  }\n}\n\nexport default class RequestTracker {\n  graph: RequestGraph;\n  farm: WorkerFarm;\n  options: ParcelOptions;\n  signal: ?AbortSignal;\n  stats: Map<RequestType, number> = new Map();\n\n  constructor({\n    graph,\n    farm,\n    options,\n  }: {|\n    graph?: RequestGraph,\n    farm: WorkerFarm,\n    options: ParcelOptions,\n  |}) {\n    this.graph = graph || new RequestGraph();\n    this.farm = farm;\n    this.options = options;\n  }\n\n  // TODO: refactor (abortcontroller should be created by RequestTracker)\n  setSignal(signal?: AbortSignal) {\n    this.signal = signal;\n  }\n\n  startRequest(request: RequestNode): {|\n    requestNodeId: NodeId,\n    deferred: Deferred<boolean>,\n  |} {\n    let didPreviouslyExist = this.graph.hasContentKey(request.id);\n    let requestNodeId;\n    if (didPreviouslyExist) {\n      requestNodeId = this.graph.getNodeIdByContentKey(request.id);\n      // Clear existing invalidations for the request so that the new\n      // invalidations created during the request replace the existing ones.\n      this.graph.clearInvalidations(requestNodeId);\n    } else {\n      requestNodeId = this.graph.addNode(nodeFromRequest(request));\n    }\n\n    this.graph.incompleteNodeIds.add(requestNodeId);\n    this.graph.invalidNodeIds.delete(requestNodeId);\n\n    let {promise, deferred} = makeDeferredWithPromise();\n    this.graph.incompleteNodePromises.set(requestNodeId, promise);\n\n    return {requestNodeId, deferred};\n  }\n\n  // If a cache key is provided, the result will be removed from the node and stored in a separate cache entry\n  storeResult(nodeId: NodeId, result: RequestResult, cacheKey: ?string) {\n    let node = this.graph.getNode(nodeId);\n    if (node && node.type === REQUEST) {\n      node.result = result;\n      node.resultCacheKey = cacheKey;\n    }\n  }\n\n  hasValidResult(nodeId: NodeId): boolean {\n    return (\n      this.graph.hasNode(nodeId) &&\n      !this.graph.invalidNodeIds.has(nodeId) &&\n      !this.graph.incompleteNodeIds.has(nodeId)\n    );\n  }\n\n  async getRequestResult<T: RequestResult>(\n    contentKey: ContentKey,\n    ifMatch?: string,\n  ): Promise<?T> {\n    let node = nullthrows(this.graph.getNodeByContentKey(contentKey));\n    invariant(node.type === REQUEST);\n\n    if (ifMatch != null && node.resultCacheKey !== ifMatch) {\n      return null;\n    }\n\n    if (node.result != undefined) {\n      // $FlowFixMe\n      let result: T = (node.result: any);\n      return result;\n    } else if (node.resultCacheKey != null && ifMatch == null) {\n      let key = node.resultCacheKey;\n      invariant(this.options.cache.hasLargeBlob(key));\n      let cachedResult: T = deserialize(\n        await this.options.cache.getLargeBlob(key),\n      );\n      node.result = cachedResult;\n      return cachedResult;\n    }\n  }\n\n  completeRequest(nodeId: NodeId) {\n    this.graph.invalidNodeIds.delete(nodeId);\n    this.graph.incompleteNodeIds.delete(nodeId);\n    this.graph.incompleteNodePromises.delete(nodeId);\n    let node = this.graph.getNode(nodeId);\n    if (node && node.type === REQUEST) {\n      node.invalidateReason = VALID;\n    }\n  }\n\n  rejectRequest(nodeId: NodeId) {\n    this.graph.incompleteNodeIds.delete(nodeId);\n    this.graph.incompleteNodePromises.delete(nodeId);\n\n    let node = this.graph.getNode(nodeId);\n    if (node?.type === REQUEST) {\n      this.graph.invalidateNode(nodeId, ERROR);\n    }\n  }\n\n  respondToFSEvents(events: Array<Event>, threshold: number): Async<boolean> {\n    return this.graph.respondToFSEvents(events, this.options, threshold);\n  }\n\n  hasInvalidRequests(): boolean {\n    return this.graph.invalidNodeIds.size > 0;\n  }\n\n  getInvalidRequests(): Array<RequestNode> {\n    let invalidRequests = [];\n    for (let id of this.graph.invalidNodeIds) {\n      let node = nullthrows(this.graph.getNode(id));\n      invariant(node.type === REQUEST);\n      invalidRequests.push(node);\n    }\n    return invalidRequests;\n  }\n\n  replaceSubrequests(\n    requestNodeId: NodeId,\n    subrequestContextKeys: Array<ContentKey>,\n  ) {\n    this.graph.replaceSubrequests(requestNodeId, subrequestContextKeys);\n  }\n\n  async runRequest<TInput, TResult: RequestResult>(\n    request: Request<TInput, TResult>,\n    opts?: ?RunRequestOpts,\n  ): Promise<TResult> {\n    let hasKey = this.graph.hasContentKey(request.id);\n    let requestId = hasKey\n      ? this.graph.getNodeIdByContentKey(request.id)\n      : undefined;\n    let hasValidResult = requestId != null && this.hasValidResult(requestId);\n\n    if (!opts?.force && hasValidResult) {\n      // $FlowFixMe[incompatible-type]\n      return this.getRequestResult<TResult>(request.id);\n    }\n\n    if (requestId != null) {\n      let incompletePromise = this.graph.incompleteNodePromises.get(requestId);\n      if (incompletePromise != null) {\n        // There is a another instance of this request already running, wait for its completion and reuse its result\n        try {\n          if (await incompletePromise) {\n            // $FlowFixMe[incompatible-type]\n            return this.getRequestResult<TResult>(request.id);\n          }\n        } catch (e) {\n          // Rerun this request\n        }\n      }\n    }\n\n    let previousInvalidations =\n      requestId != null ? this.graph.getInvalidations(requestId) : [];\n    let {requestNodeId, deferred} = this.startRequest({\n      id: request.id,\n      type: REQUEST,\n      requestType: request.type,\n      invalidateReason: INITIAL_BUILD,\n    });\n\n    let {api, subRequestContentKeys} = this.createAPI(\n      requestNodeId,\n      previousInvalidations,\n    );\n\n    try {\n      let node = this.graph.getRequestNode(requestNodeId);\n\n      this.stats.set(request.type, (this.stats.get(request.type) ?? 0) + 1);\n\n      let result = await request.run({\n        input: request.input,\n        api,\n        farm: this.farm,\n        invalidateReason: node.invalidateReason,\n        options: this.options,\n      });\n\n      assertSignalNotAborted(this.signal);\n      this.completeRequest(requestNodeId);\n\n      deferred.resolve(true);\n      return result;\n    } catch (err) {\n      if (\n        !(err instanceof BuildAbortError) &&\n        request.type === requestTypes.dev_dep_request\n      ) {\n        logger.verbose({\n          origin: '@parcel/core',\n          message: `Failed DevDepRequest`,\n          meta: {\n            trackableEvent: 'failed_dev_dep_request',\n            hasKey,\n            hasValidResult,\n          },\n        });\n      }\n\n      this.rejectRequest(requestNodeId);\n      deferred.resolve(false);\n      throw err;\n    } finally {\n      this.graph.replaceSubrequests(requestNodeId, [...subRequestContentKeys]);\n    }\n  }\n\n  flushStats(): {[requestType: string]: number} {\n    let requestTypeEntries = {};\n\n    for (let key of (Object.keys(requestTypes): RequestTypeName[])) {\n      requestTypeEntries[requestTypes[key]] = key;\n    }\n\n    let formattedStats = {};\n\n    for (let [requestType, count] of this.stats.entries()) {\n      let requestTypeName = requestTypeEntries[requestType];\n      formattedStats[requestTypeName] = count;\n    }\n\n    this.stats = new Map();\n\n    return formattedStats;\n  }\n\n  createAPI<TResult: RequestResult>(\n    requestId: NodeId,\n    previousInvalidations: Array<RequestInvalidation>,\n  ): {|api: RunAPI<TResult>, subRequestContentKeys: Set<ContentKey>|} {\n    let subRequestContentKeys = new Set<ContentKey>();\n    let api: RunAPI<TResult> = {\n      invalidateOnFileCreate: input =>\n        this.graph.invalidateOnFileCreate(requestId, input),\n      invalidateOnConfigKeyChange: (filePath, configKey, contentHash) =>\n        this.graph.invalidateOnConfigKeyChange(\n          requestId,\n          filePath,\n          configKey,\n          contentHash,\n        ),\n      invalidateOnFileDelete: filePath =>\n        this.graph.invalidateOnFileDelete(requestId, filePath),\n      invalidateOnFileUpdate: filePath =>\n        this.graph.invalidateOnFileUpdate(requestId, filePath),\n      invalidateOnStartup: () => this.graph.invalidateOnStartup(requestId),\n      invalidateOnBuild: () => this.graph.invalidateOnBuild(requestId),\n      invalidateOnEnvChange: env =>\n        this.graph.invalidateOnEnvChange(requestId, env, this.options.env[env]),\n      invalidateOnOptionChange: option =>\n        this.graph.invalidateOnOptionChange(\n          requestId,\n          option,\n          this.options[option],\n        ),\n      getInvalidations: () => previousInvalidations,\n      storeResult: (result, cacheKey) => {\n        this.storeResult(requestId, result, cacheKey);\n      },\n      getSubRequests: () => this.graph.getSubRequests(requestId),\n      getInvalidSubRequests: () => this.graph.getInvalidSubRequests(requestId),\n      getPreviousResult: <T: RequestResult>(ifMatch?: string): Async<?T> => {\n        let contentKey = nullthrows(this.graph.getNode(requestId)?.id);\n        return this.getRequestResult<T>(contentKey, ifMatch);\n      },\n      getRequestResult: <T: RequestResult>(id): Async<?T> =>\n        this.getRequestResult<T>(id),\n      canSkipSubrequest: contentKey => {\n        if (\n          this.graph.hasContentKey(contentKey) &&\n          this.hasValidResult(this.graph.getNodeIdByContentKey(contentKey))\n        ) {\n          subRequestContentKeys.add(contentKey);\n          return true;\n        }\n\n        return false;\n      },\n      runRequest: <TInput, TResult: RequestResult>(\n        subRequest: Request<TInput, TResult>,\n        opts?: RunRequestOpts,\n      ): Promise<TResult> => {\n        subRequestContentKeys.add(subRequest.id);\n        return this.runRequest<TInput, TResult>(subRequest, opts);\n      },\n    };\n\n    return {api, subRequestContentKeys};\n  }\n\n  async writeToCache(signal?: AbortSignal) {\n    let cacheKey = getCacheKey(this.options);\n    let requestGraphKey = `${cacheKey}-RequestGraph`;\n    let snapshotKey = `snapshot-${cacheKey}`;\n\n    if (this.options.shouldDisableCache) {\n      return;\n    }\n\n    let keys = [requestGraphKey];\n    let promises = [];\n    for (let node of this.graph.nodes) {\n      if (!node || node.type !== REQUEST) {\n        continue;\n      }\n\n      let resultCacheKey = node.resultCacheKey;\n      if (resultCacheKey != null && node.result != null) {\n        keys.push(resultCacheKey);\n        promises.push(\n          this.options.cache.setLargeBlob(\n            resultCacheKey,\n            serialize(node.result),\n            {signal},\n          ),\n        );\n        delete node.result;\n      }\n    }\n\n    promises.push(\n      this.options.cache.setLargeBlob(requestGraphKey, serialize(this.graph), {\n        signal,\n      }),\n    );\n\n    let opts = getWatcherOptions(this.options);\n    let snapshotPath = path.join(this.options.cacheDir, snapshotKey + '.txt');\n    promises.push(\n      this.options.inputFS.writeSnapshot(\n        this.options.watchDir,\n        snapshotPath,\n        opts,\n      ),\n    );\n\n    try {\n      await Promise.all(promises);\n    } catch (err) {\n      if (signal?.aborted) {\n        // If writing to the cache was aborted, delete all of the keys to avoid inconsistent states.\n        for (let key of keys) {\n          try {\n            await this.options.cache.deleteLargeBlob(key);\n          } catch (err) {\n            // ignore.\n          }\n        }\n      } else {\n        throw err;\n      }\n    }\n  }\n\n  static async init({\n    farm,\n    options,\n  }: {|\n    farm: WorkerFarm,\n    options: ParcelOptions,\n  |}): Async<RequestTracker> {\n    let graph = await loadRequestGraph(options);\n    return new RequestTracker({farm, graph, options});\n  }\n}\n\nexport function getWatcherOptions({\n  watchIgnore = [],\n  cacheDir,\n  watchDir,\n  watchBackend,\n}: ParcelOptions): WatcherOptions {\n  const vcsDirs = ['.git', '.hg'];\n  const uniqueDirs = [...new Set([...watchIgnore, ...vcsDirs, cacheDir])];\n  const ignore = uniqueDirs.map(dir => path.resolve(watchDir, dir));\n\n  return {ignore, backend: watchBackend};\n}\n\nfunction getCacheKey(options) {\n  return hashString(\n    `${PARCEL_VERSION}:${JSON.stringify(options.entries)}:${options.mode}:${\n      options.shouldBuildLazily ? 'lazy' : 'eager'\n    }:${options.watchBackend ?? ''}`,\n  );\n}\n\nasync function loadRequestGraph(options): Async<RequestGraph> {\n  if (options.shouldDisableCache) {\n    return new RequestGraph();\n  }\n\n  let cacheKey = getCacheKey(options);\n  let requestGraphKey = `${cacheKey}-RequestGraph`;\n  const snapshotKey = `snapshot-${cacheKey}`;\n  const snapshotPath = path.join(options.cacheDir, snapshotKey + '.txt');\n  if (await options.cache.hasLargeBlob(requestGraphKey)) {\n    try {\n      let requestGraph: RequestGraph = deserialize(\n        await options.cache.getLargeBlob(requestGraphKey),\n      );\n\n      let opts = getWatcherOptions(options);\n      let events = await options.inputFS.getEventsSince(\n        options.watchDir,\n        snapshotPath,\n        opts,\n      );\n\n      requestGraph.invalidateUnpredictableNodes();\n      requestGraph.invalidateOnBuildNodes();\n      requestGraph.invalidateEnvNodes(options.env);\n      requestGraph.invalidateOptionNodes(options);\n\n      await requestGraph.respondToFSEvents(\n        options.unstableFileInvalidations || events,\n        options,\n        10000,\n      );\n      return requestGraph;\n    } catch (e) {\n      // Prevent logging fs events took too long warning\n      logErrorOnBailout(options, snapshotPath, e);\n      // This error means respondToFSEvents timed out handling the invalidation events\n      // In this case we'll return a fresh RequestGraph\n      return new RequestGraph();\n    }\n  }\n\n  return new RequestGraph();\n}\nfunction logErrorOnBailout(\n  options: ParcelOptions,\n  snapshotPath: string,\n  e: Error,\n): void {\n  if (e.message && e.message.includes('invalid clockspec')) {\n    const snapshotContents = options.inputFS.readFileSync(\n      snapshotPath,\n      'utf-8',\n    );\n    logger.warn({\n      origin: '@parcel/core',\n      message: `Error reading clockspec from snapshot, building with clean cache.`,\n      meta: {\n        snapshotContents: snapshotContents,\n        trackableEvent: 'invalid_clockspec_error',\n      },\n    });\n  } else if (!(e instanceof FSBailoutError)) {\n    logger.warn({\n      origin: '@parcel/core',\n      message: `Unexpected error loading cache from disk, building with clean cache.`,\n      meta: {\n        errorMessage: e.message,\n        errorStack: e.stack,\n        trackableEvent: 'cache_load_error',\n      },\n    });\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/SymbolPropagation.js",
    "content": "// @flow\n\nimport type {ContentKey, NodeId} from '@parcel/graph';\nimport type {Meta, Symbol} from '@parcel/types';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {\n  AssetNode,\n  DependencyNode,\n  InternalSourceLocation,\n  ParcelOptions,\n} from './types';\nimport {type default as AssetGraph} from './AssetGraph';\n\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport {setEqual} from '@parcel/utils';\nimport logger from '@parcel/logger';\nimport {md, convertSourceLocationToHighlight} from '@parcel/diagnostic';\nimport {BundleBehavior} from './types';\nimport {fromProjectPathRelative, fromProjectPath} from './projectPath';\n\nexport function propagateSymbols({\n  options,\n  assetGraph,\n  changedAssetsPropagation,\n  assetGroupsWithRemovedParents,\n  previousErrors,\n}: {|\n  options: ParcelOptions,\n  assetGraph: AssetGraph,\n  changedAssetsPropagation: Set<string>,\n  assetGroupsWithRemovedParents: Set<NodeId>,\n  previousErrors?: ?Map<NodeId, Array<Diagnostic>>,\n|}): Map<NodeId, Array<Diagnostic>> {\n  let changedAssets = new Set(\n    [...changedAssetsPropagation].map(id =>\n      assetGraph.getNodeIdByContentKey(id),\n    ),\n  );\n\n  // To reorder once at the end\n  let changedDeps = new Set<DependencyNode>();\n\n  // For the down traversal, the nodes with `usedSymbolsDownDirty = true` are exactly\n  // `changedAssetsPropagation` (= asset and therefore potentially dependencies changed) or the\n  // asset children of `assetGroupsWithRemovedParents` (= fewer incoming dependencies causing less\n  // used symbols).\n  //\n  // The up traversal has to consider all nodes that changed in the down traversal\n  // (`useSymbolsUpDirtyDown = true`) which are listed in `changedDepsUsedSymbolsUpDirtyDown`\n  // (more or less requested symbols) and in `changedAssetsPropagation` (changing an asset might\n  // change exports).\n\n  // The dependencies that changed in the down traversal causing an update in the up traversal.\n  let changedDepsUsedSymbolsUpDirtyDown = new Set<ContentKey>();\n\n  // Propagate the requested symbols down from the root to the leaves\n  propagateSymbolsDown(\n    assetGraph,\n    changedAssets,\n    assetGroupsWithRemovedParents,\n    (assetNode, incomingDeps, outgoingDeps) => {\n      // exportSymbol -> identifier\n      let assetSymbols: ?$ReadOnlyMap<\n        Symbol,\n        {|local: Symbol, loc: ?InternalSourceLocation, meta?: ?Meta|},\n      > = assetNode.value.symbols;\n      // identifier -> exportSymbol\n      let assetSymbolsInverse;\n      if (assetSymbols) {\n        assetSymbolsInverse = new Map<Symbol, Set<Symbol>>();\n        for (let [s, {local}] of assetSymbols) {\n          let set = assetSymbolsInverse.get(local);\n\n          if (!set) {\n            set = new Set();\n            assetSymbolsInverse.set(local, set);\n          }\n          set.add(s);\n        }\n      }\n      let hasNamespaceOutgoingDeps = outgoingDeps.some(\n        d => d.value.symbols?.get('*')?.local === '*',\n      );\n\n      // 1) Determine what the incomingDeps requests from the asset\n      // ----------------------------------------------------------\n\n      let isEntry = false;\n      let addAll = false;\n\n      // Used symbols that are exported or reexported (symbol will be removed again later) by asset.\n      assetNode.usedSymbols = new Set();\n\n      // Symbols that have to be namespace reexported by outgoingDeps.\n      let namespaceReexportedSymbols = new Set<Symbol>();\n\n      if (incomingDeps.length === 0) {\n        // Root in the runtimes Graph\n        assetNode.usedSymbols.add('*');\n        namespaceReexportedSymbols.add('*');\n      } else {\n        for (let incomingDep of incomingDeps) {\n          if (incomingDep.value.symbols == null) {\n            if (incomingDep.value.sourceAssetId == null) {\n              // The root dependency on non-library builds\n              isEntry = true;\n            } else {\n              // A regular dependency with cleared symbols\n              addAll = true;\n            }\n            continue;\n          }\n\n          for (let exportSymbol of incomingDep.usedSymbolsDown) {\n            if (exportSymbol === '*') {\n              assetNode.usedSymbols.add('*');\n              namespaceReexportedSymbols.add('*');\n            }\n            if (\n              !assetSymbols ||\n              assetSymbols.has(exportSymbol) ||\n              assetSymbols.has('*')\n            ) {\n              // An own symbol or a non-namespace reexport\n              assetNode.usedSymbols.add(exportSymbol);\n            }\n            // A namespace reexport\n            // (but only if we actually have namespace-exporting outgoing dependencies,\n            // This usually happens with a reexporting asset with many namespace exports which means that\n            // we cannot match up the correct asset with the used symbol at this level.)\n            else if (hasNamespaceOutgoingDeps && exportSymbol !== 'default') {\n              namespaceReexportedSymbols.add(exportSymbol);\n            }\n          }\n        }\n      }\n\n      // Incomding dependency with cleared symbols, add everything\n      if (addAll) {\n        assetSymbols?.forEach((_, exportSymbol) =>\n          assetNode.usedSymbols.add(exportSymbol),\n        );\n      }\n\n      // 2) Distribute the symbols to the outgoing dependencies\n      // ----------------------------------------------------------\n      for (let dep of outgoingDeps) {\n        let depUsedSymbolsDownOld = dep.usedSymbolsDown;\n        let depUsedSymbolsDown = new Set();\n        dep.usedSymbolsDown = depUsedSymbolsDown;\n        if (\n          assetNode.value.sideEffects ||\n          // Incoming dependency with cleared symbols\n          addAll ||\n          // For entries, we still need to add dep.value.symbols of the entry (which are \"used\" but not according to the symbols data)\n          isEntry ||\n          // If not a single symbol is used, we can say the entire subgraph is not used.\n          // This is e.g. needed when some symbol is imported and then used for a export which isn't used (= \"semi-weak\" reexport)\n          //    index.js:     `import {bar} from \"./lib\"; ...`\n          //    lib/index.js: `export * from \"./foo.js\"; export * from \"./bar.js\";`\n          //    lib/foo.js:   `import { data } from \"./bar.js\"; export const foo = data + \" esm2\";`\n          assetNode.usedSymbols.size > 0 ||\n          namespaceReexportedSymbols.size > 0\n        ) {\n          let depSymbols = dep.value.symbols;\n          if (!depSymbols) continue;\n\n          if (depSymbols.get('*')?.local === '*') {\n            if (addAll) {\n              depUsedSymbolsDown.add('*');\n            } else {\n              for (let s of namespaceReexportedSymbols) {\n                // We need to propagate the namespaceReexportedSymbols to all namespace dependencies (= even wrong ones because we don't know yet)\n                depUsedSymbolsDown.add(s);\n              }\n            }\n          }\n\n          for (let [symbol, {local}] of depSymbols) {\n            // Was already handled above\n            if (local === '*') continue;\n\n            if (!assetSymbolsInverse || !depSymbols.get(symbol)?.isWeak) {\n              // Bailout or non-weak symbol (= used in the asset itself = not a reexport)\n              depUsedSymbolsDown.add(symbol);\n            } else {\n              let reexportedExportSymbols = assetSymbolsInverse.get(local);\n              if (reexportedExportSymbols == null) {\n                // not reexported = used in asset itself\n                depUsedSymbolsDown.add(symbol);\n              } else if (assetNode.usedSymbols.has('*')) {\n                // we need everything\n                depUsedSymbolsDown.add(symbol);\n\n                [...reexportedExportSymbols].forEach(s =>\n                  assetNode.usedSymbols.delete(s),\n                );\n              } else {\n                let usedReexportedExportSymbols = [\n                  ...reexportedExportSymbols,\n                ].filter(s => assetNode.usedSymbols.has(s));\n                if (usedReexportedExportSymbols.length > 0) {\n                  // The symbol is indeed a reexport, so it's not used from the asset itself\n                  depUsedSymbolsDown.add(symbol);\n\n                  usedReexportedExportSymbols.forEach(s =>\n                    assetNode.usedSymbols.delete(s),\n                  );\n                }\n              }\n            }\n          }\n        } else {\n          depUsedSymbolsDown.clear();\n        }\n        if (!setEqual(depUsedSymbolsDownOld, depUsedSymbolsDown)) {\n          dep.usedSymbolsDownDirty = true;\n          dep.usedSymbolsUpDirtyDown = true;\n          changedDepsUsedSymbolsUpDirtyDown.add(dep.id);\n        }\n        if (dep.usedSymbolsUpDirtyDown) {\n          // Set on node creation\n          changedDepsUsedSymbolsUpDirtyDown.add(dep.id);\n        }\n      }\n    },\n  );\n\n  const logFallbackNamespaceInsertion = (\n    assetNode,\n    symbol: Symbol,\n    depNode1,\n    depNode2,\n  ) => {\n    if (options.logLevel === 'verbose') {\n      logger.warn({\n        message: `${fromProjectPathRelative(\n          assetNode.value.filePath,\n        )} reexports \"${symbol}\", which could be resolved either to the dependency \"${\n          depNode1.value.specifier\n        }\" or \"${\n          depNode2.value.specifier\n        }\" at runtime. Adding a namespace object to fall back on.`,\n        origin: '@parcel/core',\n      });\n    }\n  };\n\n  // Because namespace reexports introduce ambiguity, go up the graph from the leaves to the\n  // root and remove requested symbols that aren't actually exported\n  let errors = propagateSymbolsUp(\n    assetGraph,\n    changedAssets,\n    changedDepsUsedSymbolsUpDirtyDown,\n    previousErrors,\n    (assetNode, incomingDeps, outgoingDeps) => {\n      let assetSymbols: ?$ReadOnlyMap<\n        Symbol,\n        {|local: Symbol, loc: ?InternalSourceLocation, meta?: ?Meta|},\n      > = assetNode.value.symbols;\n\n      let assetSymbolsInverse = null;\n      if (assetSymbols) {\n        assetSymbolsInverse = new Map<Symbol, Set<Symbol>>();\n        for (let [s, {local}] of assetSymbols) {\n          let set = assetSymbolsInverse.get(local);\n          if (!set) {\n            set = new Set();\n            assetSymbolsInverse.set(local, set);\n          }\n          set.add(s);\n        }\n      }\n\n      // the symbols that are reexported (not used in `asset`) -> asset they resolved to\n      let reexportedSymbols = new Map<\n        Symbol,\n        ?{|asset: ContentKey, symbol: ?Symbol|},\n      >();\n      // the symbols that are reexported (not used in `asset`) -> the corresponding outgoingDep(s)\n      // To generate the diagnostic when there are multiple dependencies with non-statically\n      // analyzable exports\n      let reexportedSymbolsSource = new Map<Symbol, DependencyNode>();\n      for (let outgoingDep of outgoingDeps) {\n        let outgoingDepSymbols = outgoingDep.value.symbols;\n        if (!outgoingDepSymbols) continue;\n\n        let isExcluded =\n          assetGraph.getNodeIdsConnectedFrom(\n            assetGraph.getNodeIdByContentKey(outgoingDep.id),\n          ).length === 0;\n        // excluded, assume everything that is requested exists\n        if (isExcluded) {\n          outgoingDep.usedSymbolsDown.forEach((_, s) =>\n            outgoingDep.usedSymbolsUp.set(s, null),\n          );\n        }\n\n        if (outgoingDepSymbols.get('*')?.local === '*') {\n          outgoingDep.usedSymbolsUp.forEach((sResolved, s) => {\n            if (s === 'default') {\n              return;\n            }\n\n            // If the symbol could come from multiple assets at runtime, assetNode's\n            // namespace will be needed at runtime to perform the lookup on.\n            if (reexportedSymbols.has(s)) {\n              if (!assetNode.usedSymbols.has('*')) {\n                logFallbackNamespaceInsertion(\n                  assetNode,\n                  s,\n                  nullthrows(reexportedSymbolsSource.get(s)),\n                  outgoingDep,\n                );\n              }\n              assetNode.usedSymbols.add('*');\n              reexportedSymbols.set(s, {asset: assetNode.id, symbol: s});\n            } else {\n              reexportedSymbols.set(s, sResolved);\n              reexportedSymbolsSource.set(s, outgoingDep);\n            }\n          });\n        }\n\n        for (let [s, sResolved] of outgoingDep.usedSymbolsUp) {\n          if (!outgoingDep.usedSymbolsDown.has(s)) {\n            // usedSymbolsDown is a superset of usedSymbolsUp\n            continue;\n          }\n\n          let local = outgoingDepSymbols.get(s)?.local;\n\n          if (local == null) {\n            // Caused by '*' => '*', already handled\n            continue;\n          }\n\n          let reexported = assetSymbolsInverse?.get(local);\n          if (reexported != null) {\n            reexported.forEach(s => {\n              // see same code above\n              if (reexportedSymbols.has(s)) {\n                if (!assetNode.usedSymbols.has('*')) {\n                  logFallbackNamespaceInsertion(\n                    assetNode,\n                    s,\n                    nullthrows(reexportedSymbolsSource.get(s)),\n                    outgoingDep,\n                  );\n                }\n                assetNode.usedSymbols.add('*');\n                reexportedSymbols.set(s, {asset: assetNode.id, symbol: s});\n              } else {\n                reexportedSymbols.set(s, sResolved);\n                reexportedSymbolsSource.set(s, outgoingDep);\n              }\n            });\n          }\n        }\n      }\n\n      let errors: Array<Diagnostic> = [];\n\n      function usedSymbolsUpAmbiguous(old, current, s, value) {\n        if (old.has(s)) {\n          let valueOld = old.get(s);\n          if (\n            valueOld !== value &&\n            !(\n              valueOld?.asset === value.asset &&\n              valueOld?.symbol === value.symbol\n            )\n          ) {\n            // The dependency points to multiple assets (via an asset group).\n            current.set(s, undefined);\n            return;\n          }\n        }\n        current.set(s, value);\n      }\n\n      for (let incomingDep of incomingDeps) {\n        let incomingDepUsedSymbolsUpOld = incomingDep.usedSymbolsUp;\n        incomingDep.usedSymbolsUp = new Map();\n        let incomingDepSymbols = incomingDep.value.symbols;\n        if (!incomingDepSymbols) continue;\n\n        let hasNamespaceReexport = incomingDepSymbols.get('*')?.local === '*';\n        for (let s of incomingDep.usedSymbolsDown) {\n          if (\n            assetSymbols == null || // Assume everything could be provided if symbols are cleared\n            assetNode.value.bundleBehavior === BundleBehavior.isolated ||\n            assetNode.value.bundleBehavior === BundleBehavior.inline ||\n            s === '*' ||\n            assetNode.usedSymbols.has(s)\n          ) {\n            usedSymbolsUpAmbiguous(\n              incomingDepUsedSymbolsUpOld,\n              incomingDep.usedSymbolsUp,\n              s,\n              {\n                asset: assetNode.id,\n                symbol: s,\n              },\n            );\n          } else if (reexportedSymbols.has(s)) {\n            let reexport = reexportedSymbols.get(s);\n            let v =\n              // Forward a reexport only if the current asset is side-effect free and not external\n              !assetNode.value.sideEffects && reexport != null\n                ? reexport\n                : {\n                    asset: assetNode.id,\n                    symbol: s,\n                  };\n            usedSymbolsUpAmbiguous(\n              incomingDepUsedSymbolsUpOld,\n              incomingDep.usedSymbolsUp,\n              s,\n              v,\n            );\n          } else if (!hasNamespaceReexport) {\n            let loc = incomingDep.value.symbols?.get(s)?.loc;\n            let [resolutionNodeId] = assetGraph.getNodeIdsConnectedFrom(\n              assetGraph.getNodeIdByContentKey(incomingDep.id),\n            );\n            let resolution = nullthrows(assetGraph.getNode(resolutionNodeId));\n            invariant(\n              resolution &&\n                (resolution.type === 'asset_group' ||\n                  resolution.type === 'asset'),\n            );\n\n            errors.push({\n              message: md`${fromProjectPathRelative(\n                resolution.value.filePath,\n              )} does not export '${s}'`,\n              origin: '@parcel/core',\n              codeFrames: loc\n                ? [\n                    {\n                      filePath:\n                        fromProjectPath(options.projectRoot, loc?.filePath) ??\n                        undefined,\n                      language: incomingDep.value.sourceAssetType ?? undefined,\n                      codeHighlights: [convertSourceLocationToHighlight(loc)],\n                    },\n                  ]\n                : undefined,\n            });\n          }\n        }\n\n        if (!equalMap(incomingDepUsedSymbolsUpOld, incomingDep.usedSymbolsUp)) {\n          changedDeps.add(incomingDep);\n          incomingDep.usedSymbolsUpDirtyUp = true;\n        }\n\n        incomingDep.excluded = false;\n        if (\n          incomingDep.value.symbols != null &&\n          incomingDep.usedSymbolsUp.size === 0\n        ) {\n          let assetGroups = assetGraph.getNodeIdsConnectedFrom(\n            assetGraph.getNodeIdByContentKey(incomingDep.id),\n          );\n          if (assetGroups.length === 1) {\n            let [assetGroupId] = assetGroups;\n            let assetGroup = nullthrows(assetGraph.getNode(assetGroupId));\n            if (\n              assetGroup.type === 'asset_group' &&\n              assetGroup.value.sideEffects === false\n            ) {\n              incomingDep.excluded = true;\n            }\n          } else {\n            invariant(assetGroups.length === 0);\n          }\n        }\n      }\n      return errors;\n    },\n  );\n\n  // Sort usedSymbolsUp so they are a consistent order across builds.\n  // This ensures a consistent ordering of these symbols when packaging.\n  // See https://github.com/parcel-bundler/parcel/pull/8212\n  for (let dep of changedDeps) {\n    dep.usedSymbolsUp = new Map(\n      [...dep.usedSymbolsUp].sort(([a], [b]) => a.localeCompare(b)),\n    );\n  }\n\n  return errors;\n}\n\nfunction propagateSymbolsDown(\n  assetGraph: AssetGraph,\n  changedAssets: Set<NodeId>,\n  assetGroupsWithRemovedParents: Set<NodeId>,\n  visit: (\n    assetNode: AssetNode,\n    incoming: $ReadOnlyArray<DependencyNode>,\n    outgoing: $ReadOnlyArray<DependencyNode>,\n  ) => void,\n) {\n  if (changedAssets.size === 0 && assetGroupsWithRemovedParents.size === 0) {\n    return;\n  }\n\n  // We care about changed assets and their changed dependencies. So start with the first changed\n  // asset or dependency and continue while the symbols change. If the queue becomes empty,\n  // continue with the next unvisited changed asset.\n  //\n  // In the end, nodes, which are neither listed in changedAssets nor in\n  // assetGroupsWithRemovedParents nor reached via a dirty flag, don't have to be visited at all.\n  //\n  // In the worst case, some nodes have to be revisited because we don't want to sort the assets\n  // into topological order. For example in a diamond graph where the join point is visited twice\n  // via each parent (the numbers signifiying the order of re/visiting, `...` being unvisited).\n  // However, this only continues as long as there are changes in the used symbols that influence\n  // child nodes.\n  //\n  //             |\n  //            ...\n  //          /     \\\n  //          1     4\n  //          \\     /\n  //            2+5\n  //             |\n  //            3+6\n  //             |\n  //            ...\n  //             |\n  //\n\n  let unreachedAssets = new Set([\n    ...changedAssets,\n    ...assetGroupsWithRemovedParents,\n  ]);\n  let queue = new Set([setPop(unreachedAssets)]);\n\n  while (queue.size > 0) {\n    let queuedNodeId = setPop(queue);\n    unreachedAssets.delete(queuedNodeId);\n\n    let outgoing = assetGraph.getNodeIdsConnectedFrom(queuedNodeId);\n    let node = nullthrows(assetGraph.getNode(queuedNodeId));\n\n    let wasNodeDirty = false;\n    if (node.type === 'dependency' || node.type === 'asset_group') {\n      wasNodeDirty = node.usedSymbolsDownDirty;\n      node.usedSymbolsDownDirty = false;\n    } else if (node.type === 'asset' && node.usedSymbolsDownDirty) {\n      visit(\n        node,\n        assetGraph.getIncomingDependencies(node.value).map(d => {\n          let dep = assetGraph.getNodeByContentKey(d.id);\n          invariant(dep && dep.type === 'dependency');\n          return dep;\n        }),\n        outgoing.map(dep => {\n          let depNode = nullthrows(assetGraph.getNode(dep));\n          invariant(depNode.type === 'dependency');\n          return depNode;\n        }),\n      );\n      node.usedSymbolsDownDirty = false;\n    }\n\n    for (let child of outgoing) {\n      let childNode = nullthrows(assetGraph.getNode(child));\n      let childDirty = false;\n      if (\n        (childNode.type === 'asset' || childNode.type === 'asset_group') &&\n        wasNodeDirty\n      ) {\n        childNode.usedSymbolsDownDirty = true;\n        childDirty = true;\n      } else if (childNode.type === 'dependency') {\n        childDirty = childNode.usedSymbolsDownDirty;\n      }\n      if (childDirty) {\n        queue.add(child);\n      }\n    }\n\n    if (queue.size === 0 && unreachedAssets.size > 0) {\n      queue.add(setPop(unreachedAssets));\n    }\n  }\n}\n\nfunction propagateSymbolsUp(\n  assetGraph: AssetGraph,\n  changedAssets: Set<NodeId>,\n  changedDepsUsedSymbolsUpDirtyDown: Set<ContentKey>,\n  previousErrors: ?Map<NodeId, Array<Diagnostic>>,\n  visit: (\n    assetNode: AssetNode,\n    incoming: $ReadOnlyArray<DependencyNode>,\n    outgoing: $ReadOnlyArray<DependencyNode>,\n  ) => Array<Diagnostic>,\n): Map<NodeId, Array<Diagnostic>> {\n  // For graphs in general (so with cyclic dependencies), some nodes will have to be revisited. So\n  // run a regular queue-based BFS for anything that's still dirty.\n  //\n  // (Previously, there was first a recursive post-order DFS, with the idea that all children of a\n  // node should be processed first. With a tree, this would result in a minimal amount of work by\n  // processing every asset exactly once and then the remaining cycles would have been handled\n  // with the loop. This was slightly faster for initial builds but had O(project) instead of\n  // O(changes).)\n\n  let errors: Map<NodeId, Array<Diagnostic>> = previousErrors\n    ? // Some nodes might have been removed since the last build\n      new Map([...previousErrors].filter(([n]) => assetGraph.hasNode(n)))\n    : new Map();\n\n  let changedDepsUsedSymbolsUpDirtyDownAssets = new Set([\n    ...[...changedDepsUsedSymbolsUpDirtyDown]\n      .reverse()\n      .flatMap(id => getDependencyResolution(assetGraph, id)),\n    ...changedAssets,\n  ]);\n\n  // Do a more efficient full traversal (less recomputations) if more than half of the assets\n  // changed.\n  let runFullPass =\n    // If there are n nodes in the graph, then the asset count is approximately\n    // n/6 (for every asset, there are ~4 dependencies and ~1 asset_group).\n    assetGraph.nodes.length * (1 / 6) * 0.5 <\n    changedDepsUsedSymbolsUpDirtyDownAssets.size;\n\n  let dirtyDeps;\n  if (runFullPass) {\n    dirtyDeps = new Set<NodeId>();\n    let rootNodeId = nullthrows(\n      assetGraph.rootNodeId,\n      'A root node is required to traverse',\n    );\n\n    const nodeVisitor = nodeId => {\n      let node = nullthrows(assetGraph.getNode(nodeId));\n      let outgoing = assetGraph.getNodeIdsConnectedFrom(nodeId);\n\n      for (let childId of outgoing) {\n        let child = nullthrows(assetGraph.getNode(childId));\n        if (node.type === 'asset') {\n          invariant(child.type === 'dependency');\n          if (child.usedSymbolsUpDirtyUp) {\n            node.usedSymbolsUpDirty = true;\n            child.usedSymbolsUpDirtyUp = false;\n          }\n        }\n      }\n\n      if (node.type === 'asset') {\n        let incoming = assetGraph.getIncomingDependencies(node.value).map(d => {\n          let n = assetGraph.getNodeByContentKey(d.id);\n          invariant(n && n.type === 'dependency');\n          return n;\n        });\n        for (let dep of incoming) {\n          if (dep.usedSymbolsUpDirtyDown) {\n            dep.usedSymbolsUpDirtyDown = false;\n            node.usedSymbolsUpDirty = true;\n          }\n        }\n        if (node.usedSymbolsUpDirty) {\n          let e = visit(\n            node,\n            incoming,\n            outgoing.map(depNodeId => {\n              let depNode = nullthrows(assetGraph.getNode(depNodeId));\n              invariant(depNode.type === 'dependency');\n              return depNode;\n            }),\n          );\n          if (e.length > 0) {\n            node.usedSymbolsUpDirty = true;\n            errors.set(nodeId, e);\n          } else {\n            node.usedSymbolsUpDirty = false;\n            errors.delete(nodeId);\n          }\n        }\n      } else {\n        if (node.type === 'dependency') {\n          if (node.usedSymbolsUpDirtyUp) {\n            dirtyDeps.add(nodeId);\n          } else {\n            dirtyDeps.delete(nodeId);\n          }\n        }\n      }\n    };\n    assetGraph.postOrderDfsFast(nodeVisitor, rootNodeId);\n  }\n\n  let queue = dirtyDeps ?? changedDepsUsedSymbolsUpDirtyDownAssets;\n  while (queue.size > 0) {\n    let queuedNodeId = setPop(queue);\n    let node = nullthrows(assetGraph.getNode(queuedNodeId));\n    if (node.type === 'asset') {\n      let incoming = assetGraph.getIncomingDependencies(node.value).map(dep => {\n        let depNode = assetGraph.getNodeByContentKey(dep.id);\n        invariant(depNode && depNode.type === 'dependency');\n        return depNode;\n      });\n      for (let dep of incoming) {\n        if (dep.usedSymbolsUpDirtyDown) {\n          dep.usedSymbolsUpDirtyDown = false;\n          node.usedSymbolsUpDirty = true;\n        }\n      }\n      let outgoing = assetGraph\n        .getNodeIdsConnectedFrom(queuedNodeId)\n        .map(depNodeId => {\n          let depNode = nullthrows(assetGraph.getNode(depNodeId));\n          invariant(depNode.type === 'dependency');\n          return depNode;\n        });\n      for (let dep of outgoing) {\n        if (dep.usedSymbolsUpDirtyUp) {\n          node.usedSymbolsUpDirty = true;\n          dep.usedSymbolsUpDirtyUp = false;\n        }\n      }\n\n      if (node.usedSymbolsUpDirty) {\n        let e = visit(node, incoming, outgoing);\n        if (e.length > 0) {\n          node.usedSymbolsUpDirty = true;\n          errors.set(queuedNodeId, e);\n        } else {\n          node.usedSymbolsUpDirty = false;\n          errors.delete(queuedNodeId);\n        }\n      }\n\n      for (let i of incoming) {\n        if (i.usedSymbolsUpDirtyUp) {\n          queue.add(assetGraph.getNodeIdByContentKey(i.id));\n        }\n      }\n    } else {\n      let connectedNodes = assetGraph.getNodeIdsConnectedTo(queuedNodeId);\n      if (connectedNodes.length > 0) {\n        queue.add(...connectedNodes);\n      }\n    }\n  }\n\n  return errors;\n}\n\nfunction getDependencyResolution(\n  graph: AssetGraph,\n  depId: ContentKey,\n): Array<NodeId> {\n  let depNodeId = graph.getNodeIdByContentKey(depId);\n  let connected = graph.getNodeIdsConnectedFrom(depNodeId);\n  invariant(connected.length <= 1);\n  let child = connected[0];\n  if (child) {\n    let childNode = nullthrows(graph.getNode(child));\n    if (childNode.type === 'asset_group') {\n      return graph.getNodeIdsConnectedFrom(child);\n    } else {\n      return [child];\n    }\n  }\n  return [];\n}\n\nfunction equalMap<K>(\n  a: $ReadOnlyMap<K, ?{|asset: ContentKey, symbol: ?Symbol|}>,\n  b: $ReadOnlyMap<K, ?{|asset: ContentKey, symbol: ?Symbol|}>,\n) {\n  if (a.size !== b.size) return false;\n  for (let [k, v] of a) {\n    if (!b.has(k)) return false;\n    let vB = b.get(k);\n    if (vB?.asset !== v?.asset || vB?.symbol !== v?.symbol) return false;\n  }\n  return true;\n}\n\nfunction setPop<T>(set: Set<T>): T {\n  let v = nullthrows(set.values().next().value);\n  set.delete(v);\n  return v;\n}\n"
  },
  {
    "path": "packages/core/core/src/TargetDescriptor.schema.js",
    "content": "// @flow strict-local\nimport type {SchemaEntity, SchemaObject} from '@parcel/utils';\n\nexport const ENGINES_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    browsers: {\n      oneOf: [\n        {\n          type: 'array',\n          items: {\n            type: 'string',\n          },\n        },\n        {\n          type: 'string',\n        },\n      ],\n    },\n  },\n  __forbiddenProperties: ['browser'],\n  additionalProperties: {\n    type: 'string',\n  },\n};\n\nexport const PACKAGE_DESCRIPTOR_SCHEMA: SchemaObject = {\n  type: 'object',\n  properties: {\n    context: {\n      type: 'string',\n      enum: [\n        'node',\n        'browser',\n        'web-worker',\n        'electron-main',\n        'electron-renderer',\n        'service-worker',\n        'react-server',\n        'react-client',\n      ],\n    },\n    includeNodeModules: {\n      oneOf: [\n        {\n          type: 'boolean',\n        },\n        {\n          type: 'array',\n          items: {\n            type: 'string',\n            __type: 'a wildcard or filepath',\n          },\n        },\n        {\n          type: 'object',\n          properties: {},\n          additionalProperties: {\n            type: 'boolean',\n          },\n        },\n      ],\n    },\n    outputFormat: {\n      type: 'string',\n      enum: ['global', 'esmodule', 'commonjs'],\n    },\n    distDir: {\n      type: 'string',\n    },\n    publicUrl: {\n      type: 'string',\n    },\n    isLibrary: {\n      type: 'boolean',\n    },\n    source: {\n      oneOf: [\n        {\n          type: 'string',\n        },\n        {\n          type: 'array',\n          items: {type: 'string'},\n        },\n      ],\n    },\n    sourceMap: {\n      oneOf: [\n        {\n          type: 'boolean',\n        },\n        {\n          type: 'object',\n          properties: {\n            inlineSources: {\n              type: 'boolean',\n            },\n            sourceRoot: {\n              type: 'string',\n            },\n            inline: {\n              type: 'boolean',\n            },\n          },\n          additionalProperties: false,\n        },\n      ],\n    },\n    engines: ENGINES_SCHEMA,\n    optimize: {\n      type: 'boolean',\n    },\n    scopeHoist: {\n      type: 'boolean',\n    },\n  },\n  additionalProperties: false,\n};\n\nexport const DESCRIPTOR_SCHEMA: SchemaEntity = {\n  ...PACKAGE_DESCRIPTOR_SCHEMA,\n  properties: {\n    ...PACKAGE_DESCRIPTOR_SCHEMA.properties,\n    distEntry: {\n      type: 'string',\n    },\n  },\n};\n\nexport const COMMON_TARGET_DESCRIPTOR_SCHEMA: SchemaEntity = {\n  oneOf: [\n    PACKAGE_DESCRIPTOR_SCHEMA,\n    {\n      enum: [false],\n    },\n  ],\n};\n"
  },
  {
    "path": "packages/core/core/src/Transformation.js",
    "content": "// @flow strict-local\n\nimport type {\n  FilePath,\n  GenerateOutput,\n  Transformer,\n  TransformerResult,\n  PackageName,\n  ResolveOptions,\n  SemverRange,\n} from '@parcel/types';\nimport type {WorkerApi} from '@parcel/workers';\nimport type {\n  Asset as AssetValue,\n  TransformationRequest,\n  Config,\n  DevDepRequest,\n  DevDepRequestRef,\n  ParcelOptions,\n  InternalDevDepOptions,\n  Invalidations,\n} from './types';\nimport type {LoadedPlugin} from './ParcelConfig';\n\nimport path from 'path';\nimport {Readable} from 'stream';\nimport nullthrows from 'nullthrows';\nimport logger, {PluginLogger} from '@parcel/logger';\nimport ThrowableDiagnostic, {\n  anyToDiagnostic,\n  errorToDiagnostic,\n  escapeMarkdown,\n  md,\n  type Diagnostic,\n} from '@parcel/diagnostic';\nimport {SOURCEMAP_EXTENSIONS} from '@parcel/utils';\nimport {hashString} from '@parcel/rust';\n\nimport {createDependency} from './Dependency';\nimport ParcelConfig from './ParcelConfig';\n// TODO: eventually call path request as sub requests\nimport {ResolverRunner} from './requests/PathRequest';\nimport {\n  Asset,\n  MutableAsset,\n  mutableAssetToUncommittedAsset,\n} from './public/Asset';\nimport UncommittedAsset from './UncommittedAsset';\nimport {createAsset} from './assetUtils';\nimport summarizeRequest from './summarizeRequest';\nimport PluginOptions from './public/PluginOptions';\nimport {optionsProxy} from './utils';\nimport {createConfig} from './InternalConfig';\nimport {\n  loadPluginConfig,\n  getConfigRequests,\n  type ConfigRequest,\n} from './requests/ConfigRequest';\nimport {\n  createDevDependency,\n  invalidateDevDeps,\n  getWorkerDevDepRequests,\n} from './requests/DevDepRequest';\nimport {\n  type ProjectPath,\n  fromProjectPath,\n  fromProjectPathRelative,\n  toProjectPathUnsafe,\n  toProjectPath,\n} from './projectPath';\nimport {invalidateOnFileCreateToInternal, createInvalidations} from './utils';\nimport invariant from 'assert';\nimport {tracer, PluginTracer} from '@parcel/profiler';\n\ntype GenerateFunc = (input: UncommittedAsset) => Promise<GenerateOutput>;\n\ntype PostProcessFunc = (\n  Array<UncommittedAsset>,\n) => Promise<Array<UncommittedAsset> | null>;\n\nexport type TransformationOpts = {|\n  options: ParcelOptions,\n  config: ParcelConfig,\n  request: TransformationRequest,\n  workerApi: WorkerApi,\n|};\n\nexport type TransformationResult = {|\n  assets?: Array<AssetValue>,\n  error?: Array<Diagnostic>,\n  configRequests: Array<ConfigRequest>,\n  invalidations: Invalidations,\n  devDepRequests: Array<DevDepRequest | DevDepRequestRef>,\n|};\n\nexport default class Transformation {\n  request: TransformationRequest;\n  configs: Map<string, Config>;\n  devDepRequests: Map<string, DevDepRequest | DevDepRequestRef>;\n  pluginDevDeps: Array<InternalDevDepOptions>;\n  options: ParcelOptions;\n  pluginOptions: PluginOptions;\n  workerApi: WorkerApi;\n  parcelConfig: ParcelConfig;\n  invalidations: Invalidations;\n  resolverRunner: ResolverRunner;\n\n  constructor({request, options, config, workerApi}: TransformationOpts) {\n    this.configs = new Map();\n    this.parcelConfig = config;\n    this.options = options;\n    this.request = request;\n    this.workerApi = workerApi;\n    this.invalidations = createInvalidations();\n    this.devDepRequests = new Map();\n    this.pluginDevDeps = [];\n    this.resolverRunner = new ResolverRunner({\n      config,\n      options,\n      previousDevDeps: request.devDeps,\n    });\n\n    this.pluginOptions = new PluginOptions(\n      optionsProxy(\n        this.options,\n        option => {\n          this.invalidations.invalidateOnOptionChange.add(option);\n        },\n        devDep => {\n          this.pluginDevDeps.push(devDep);\n        },\n      ),\n    );\n  }\n\n  async run(): Promise<TransformationResult> {\n    let asset = await this.loadAsset();\n    let existing;\n\n    if (!asset.mapBuffer && SOURCEMAP_EXTENSIONS.has(asset.value.type)) {\n      // Load existing sourcemaps, this automatically runs the source contents extraction\n      try {\n        existing = await asset.loadExistingSourcemap();\n      } catch (err) {\n        logger.verbose([\n          {\n            origin: '@parcel/core',\n            message: md`Could not load existing source map for ${fromProjectPathRelative(\n              asset.value.filePath,\n            )}`,\n          },\n          {\n            origin: '@parcel/core',\n            message: escapeMarkdown(err.message),\n          },\n        ]);\n      }\n    }\n\n    if (\n      existing == null &&\n      // Don't buffer an entire stream into memory since it may not need sourceContent,\n      // e.g. large binary files\n      !(asset.content instanceof Readable)\n    ) {\n      // If no existing sourcemap was found, initialize asset.sourceContent\n      // with the original contents. This will be used when the transformer\n      // calls setMap to ensure the source content is in the sourcemap.\n      asset.sourceContent = await asset.getCode();\n    }\n\n    invalidateDevDeps(\n      this.request.invalidDevDeps,\n      this.options,\n      this.parcelConfig,\n    );\n\n    let pipeline = await this.loadPipeline(\n      this.request.filePath,\n      asset.value.isSource,\n      asset.value.pipeline,\n    );\n    let assets, error;\n    try {\n      let results = await this.runPipelines(pipeline, asset);\n      await Promise.all(results.map(asset => asset.commit()));\n      assets = results.map(a => a.value);\n    } catch (e) {\n      error = e;\n    }\n\n    let configRequests = getConfigRequests([\n      ...this.configs.values(),\n      ...this.resolverRunner.configs.values(),\n    ]);\n    let devDepRequests = getWorkerDevDepRequests([\n      ...this.devDepRequests.values(),\n      ...this.resolverRunner.devDepRequests.values(),\n    ]);\n\n    // $FlowFixMe because of $$raw\n    return {\n      $$raw: true,\n      assets,\n      configRequests,\n      // When throwing an error, this (de)serialization is done automatically by the WorkerFarm\n      error: error ? anyToDiagnostic(error) : undefined,\n      invalidations: this.invalidations,\n      devDepRequests,\n    };\n  }\n\n  async loadAsset(): Promise<UncommittedAsset> {\n    let {\n      filePath,\n      env,\n      code,\n      pipeline,\n      isSource: isSourceOverride,\n      sideEffects,\n      query,\n    } = this.request;\n    let {\n      content,\n      size,\n      isSource: summarizedIsSource,\n    } = await summarizeRequest(this.options.inputFS, {\n      filePath: fromProjectPath(this.options.projectRoot, filePath),\n      code,\n    });\n\n    // Prefer `isSource` originating from the AssetRequest.\n    let isSource = isSourceOverride ?? summarizedIsSource;\n\n    // If the transformer request passed code, use a hash in addition\n    // to the filename as the base for the id to ensure it is unique.\n    let idBase = fromProjectPathRelative(filePath);\n    if (code != null) {\n      idBase += hashString(code);\n    }\n    return new UncommittedAsset({\n      idBase,\n      value: createAsset(this.options.projectRoot, {\n        idBase,\n        filePath,\n        isSource,\n        type: path.extname(fromProjectPathRelative(filePath)).slice(1),\n        pipeline,\n        env,\n        query,\n        stats: {\n          time: 0,\n          size,\n        },\n        sideEffects,\n      }),\n      options: this.options,\n      content,\n      invalidations: this.invalidations,\n    });\n  }\n\n  async runPipelines(\n    pipeline: Pipeline,\n    initialAsset: UncommittedAsset,\n  ): Promise<Array<UncommittedAsset>> {\n    let initialType = initialAsset.value.type;\n    let assets: Array<UncommittedAsset>;\n    try {\n      assets = await this.runPipeline(pipeline, initialAsset);\n    } finally {\n      // Add dev dep requests for each transformer\n      for (let transformer of pipeline.transformers) {\n        await this.addDevDependency({\n          specifier: transformer.name,\n          resolveFrom: transformer.resolveFrom,\n          range: transformer.range,\n        });\n      }\n\n      // Add dev dep requests for dependencies of transformer plugins\n      // (via proxied packageManager.require calls).\n      for (let devDep of this.pluginDevDeps) {\n        await this.addDevDependency(devDep);\n      }\n    }\n\n    let finalAssets: Array<UncommittedAsset> = [];\n    for (let asset of assets) {\n      let nextPipeline;\n      if (asset.value.type !== initialType) {\n        nextPipeline = await this.loadNextPipeline({\n          filePath: initialAsset.value.filePath,\n          isSource: asset.value.isSource,\n          newType: asset.value.type,\n          newPipeline: asset.value.pipeline,\n          currentPipeline: pipeline,\n        });\n      }\n\n      if (nextPipeline) {\n        let nextPipelineAssets = await this.runPipelines(nextPipeline, asset);\n        finalAssets = finalAssets.concat(nextPipelineAssets);\n      } else {\n        finalAssets.push(asset);\n      }\n    }\n\n    if (!pipeline.postProcess) {\n      return finalAssets;\n    }\n\n    invariant(pipeline.postProcess != null);\n    let processedFinalAssets: Array<UncommittedAsset> =\n      (await pipeline.postProcess(finalAssets)) ?? [];\n\n    return processedFinalAssets;\n  }\n\n  async addDevDependency(opts: InternalDevDepOptions): Promise<void> {\n    let {specifier, resolveFrom, range} = opts;\n    let key = `${specifier}:${fromProjectPathRelative(resolveFrom)}`;\n    if (this.devDepRequests.has(key)) {\n      return;\n    }\n\n    // Ensure that the package manager has an entry for this resolution.\n    try {\n      await this.options.packageManager.resolve(\n        specifier,\n        fromProjectPath(this.options.projectRoot, opts.resolveFrom),\n        {\n          range,\n        },\n      );\n    } catch (err) {\n      // ignore\n    }\n\n    let devDepRequest = await createDevDependency(\n      opts,\n      this.request.devDeps,\n      this.options,\n    );\n    this.devDepRequests.set(key, devDepRequest);\n  }\n\n  async runPipeline(\n    pipeline: Pipeline,\n    initialAsset: UncommittedAsset,\n  ): Promise<Array<UncommittedAsset>> {\n    if (pipeline.transformers.length === 0) {\n      return [initialAsset];\n    }\n\n    let initialType = initialAsset.value.type;\n    let inputAssets = [initialAsset];\n    let resultingAssets = [];\n    let finalAssets = [];\n    for (let transformer of pipeline.transformers) {\n      resultingAssets = [];\n      for (let asset of inputAssets) {\n        if (\n          asset.value.type !== initialType &&\n          (await this.loadNextPipeline({\n            filePath: initialAsset.value.filePath,\n            isSource: asset.value.isSource,\n            newType: asset.value.type,\n            newPipeline: asset.value.pipeline,\n            currentPipeline: pipeline,\n          }))\n        ) {\n          finalAssets.push(asset);\n          continue;\n        }\n\n        try {\n          const measurement = tracer.createMeasurement(\n            transformer.name,\n            'transform',\n            fromProjectPathRelative(initialAsset.value.filePath),\n          );\n\n          let transformerResults = await this.runTransformer(\n            pipeline,\n            asset,\n            transformer.plugin,\n            transformer.name,\n            transformer.config,\n            transformer.configKeyPath,\n            this.parcelConfig,\n          );\n\n          measurement && measurement.end();\n\n          for (let result of transformerResults) {\n            if (result instanceof UncommittedAsset) {\n              resultingAssets.push(result);\n              continue;\n            }\n            resultingAssets.push(\n              asset.createChildAsset(\n                result,\n                transformer.name,\n                this.parcelConfig.filePath,\n                transformer.configKeyPath,\n              ),\n            );\n          }\n        } catch (e) {\n          let diagnostic = errorToDiagnostic(e, {\n            origin: transformer.name,\n            filePath: fromProjectPath(\n              this.options.projectRoot,\n              asset.value.filePath,\n            ),\n          });\n\n          // If this request is a virtual asset that might not exist on the filesystem,\n          // add the `code` property to each code frame in the diagnostics that match the\n          // request's filepath. This can't be done by the transformer because it might not\n          // have access to the original code (e.g. an inline script tag in HTML).\n          if (this.request.code != null) {\n            for (let d of diagnostic) {\n              if (d.codeFrames) {\n                for (let codeFrame of d.codeFrames) {\n                  if (\n                    codeFrame.code == null &&\n                    codeFrame.filePath === this.request.filePath\n                  ) {\n                    codeFrame.code = this.request.code;\n                  }\n                }\n              }\n            }\n          }\n\n          throw new ThrowableDiagnostic({\n            diagnostic,\n          });\n        }\n      }\n      inputAssets = resultingAssets;\n    }\n\n    // Make assets with ASTs generate unless they are CSS modules. This parallelizes generation\n    // and distributes work more evenly across workers than if one worker needed to\n    // generate all assets in a large bundle during packaging.\n    await Promise.all(\n      resultingAssets\n        .filter(\n          asset =>\n            asset.ast != null &&\n            !(\n              this.options.mode === 'production' &&\n              asset.value.type === 'css' &&\n              asset.value.symbols\n            ),\n        )\n        .map(async asset => {\n          if (asset.isASTDirty && asset.generate) {\n            let output = await asset.generate();\n            asset.content = output.content;\n            asset.mapBuffer = output.map?.toBuffer();\n          }\n\n          asset.clearAST();\n        }),\n    );\n\n    return finalAssets.concat(resultingAssets);\n  }\n\n  async loadPipeline(\n    filePath: ProjectPath,\n    isSource: boolean,\n    pipeline: ?string,\n  ): Promise<Pipeline> {\n    let transformers = await this.parcelConfig.getTransformers(\n      filePath,\n      pipeline,\n      this.request.isURL,\n    );\n\n    for (let transformer of transformers) {\n      let config = await this.loadTransformerConfig(transformer, isSource);\n      if (config) {\n        this.configs.set(transformer.name, config);\n      }\n    }\n\n    return {\n      id: transformers.map(t => t.name).join(':'),\n      transformers: transformers.map(transformer => ({\n        name: transformer.name,\n        resolveFrom: transformer.resolveFrom,\n        config: this.configs.get(transformer.name)?.result,\n        configKeyPath: transformer.keyPath,\n        plugin: transformer.plugin,\n      })),\n      options: this.options,\n      pluginOptions: this.pluginOptions,\n      workerApi: this.workerApi,\n    };\n  }\n\n  async loadNextPipeline({\n    filePath,\n    isSource,\n    newType,\n    newPipeline,\n    currentPipeline,\n  }: {|\n    filePath: ProjectPath,\n    isSource: boolean,\n    newType: string,\n    newPipeline: ?string,\n    currentPipeline: Pipeline,\n  |}): Promise<?Pipeline> {\n    let filePathRelative = fromProjectPathRelative(filePath);\n    let nextFilePath = toProjectPathUnsafe(\n      filePathRelative.slice(0, -path.extname(filePathRelative).length) +\n        '.' +\n        newType,\n    );\n    let nextPipeline = await this.loadPipeline(\n      nextFilePath,\n      isSource,\n      newPipeline,\n    );\n\n    if (nextPipeline.id === currentPipeline.id) {\n      return null;\n    }\n\n    return nextPipeline;\n  }\n\n  async loadTransformerConfig(\n    transformer: LoadedPlugin<Transformer<mixed>>,\n    isSource: boolean,\n  ): Promise<?Config> {\n    let loadConfig = transformer.plugin.loadConfig;\n    if (!loadConfig) {\n      return;\n    }\n\n    let config = createConfig({\n      plugin: transformer.name,\n      isSource,\n      searchPath: this.request.filePath,\n      env: this.request.env,\n    });\n\n    await loadPluginConfig(transformer, config, this.options);\n\n    for (let devDep of config.devDeps) {\n      await this.addDevDependency(devDep);\n    }\n\n    return config;\n  }\n\n  async runTransformer(\n    pipeline: Pipeline,\n    asset: UncommittedAsset,\n    transformer: Transformer<mixed>,\n    transformerName: string,\n    preloadedConfig: ?Config,\n    configKeyPath?: string,\n    parcelConfig: ParcelConfig,\n  ): Promise<$ReadOnlyArray<TransformerResult | UncommittedAsset>> {\n    if (asset.transformers.has(transformerName)) {\n      return [asset];\n    }\n    asset.transformers.add(transformerName);\n\n    const logger = new PluginLogger({origin: transformerName});\n    const tracer = new PluginTracer({\n      origin: transformerName,\n      category: 'transform',\n    });\n\n    const resolve = async (\n      from: FilePath,\n      to: string,\n      options?: ResolveOptions,\n    ): Promise<FilePath> => {\n      let result = await this.resolverRunner.resolve(\n        createDependency(this.options.projectRoot, {\n          env: asset.value.env,\n          specifier: to,\n          specifierType: options?.specifierType || 'esm',\n          packageConditions: options?.packageConditions,\n          sourcePath: from,\n        }),\n      );\n\n      if (result.invalidateOnFileCreate) {\n        this.invalidations.invalidateOnFileCreate.push(\n          ...result.invalidateOnFileCreate.map(i =>\n            invalidateOnFileCreateToInternal(this.options.projectRoot, i),\n          ),\n        );\n      }\n\n      if (result.invalidateOnFileChange) {\n        for (let filePath of result.invalidateOnFileChange) {\n          this.invalidations.invalidateOnFileChange.add(\n            toProjectPath(this.options.projectRoot, filePath),\n          );\n        }\n      }\n\n      if (result.diagnostics && result.diagnostics.length > 0) {\n        throw new ThrowableDiagnostic({diagnostic: result.diagnostics});\n      }\n\n      return fromProjectPath(\n        this.options.projectRoot,\n        nullthrows(result.assetGroup).filePath,\n      );\n    };\n\n    // If an ast exists on the asset, but we cannot reuse it,\n    // use the previous transform to generate code that we can re-parse.\n    if (\n      asset.ast &&\n      asset.isASTDirty &&\n      (!transformer.canReuseAST ||\n        !transformer.canReuseAST({\n          ast: asset.ast,\n          options: pipeline.pluginOptions,\n          logger,\n          tracer,\n        })) &&\n      asset.generate\n    ) {\n      let output = await asset.generate();\n      asset.content = output.content;\n      asset.mapBuffer = output.map?.toBuffer();\n    }\n\n    // Load config for the transformer.\n    let config = preloadedConfig;\n\n    // Parse if there is no AST available from a previous transform.\n    let parse = transformer.parse?.bind(transformer);\n    if (!asset.ast && parse) {\n      let ast = await parse({\n        asset: new Asset(asset),\n        config,\n        options: pipeline.pluginOptions,\n        resolve,\n        logger,\n        tracer,\n      });\n      if (ast) {\n        asset.setAST(ast);\n        asset.isASTDirty = false;\n      }\n    }\n\n    // Transform.\n    let transfomerResult: Array<TransformerResult | MutableAsset> =\n      // $FlowFixMe the returned IMutableAsset really is a MutableAsset\n      await transformer.transform({\n        asset: new MutableAsset(asset),\n        config,\n        options: pipeline.pluginOptions,\n        resolve,\n        logger,\n        tracer,\n      });\n    let results = await normalizeAssets(this.options, transfomerResult);\n\n    // Create generate and postProcess function that can be called later\n    asset.generate = (): Promise<GenerateOutput> => {\n      let publicAsset = new Asset(asset);\n      if (transformer.generate && asset.ast) {\n        let generated = transformer.generate({\n          asset: publicAsset,\n          ast: asset.ast,\n          options: pipeline.pluginOptions,\n          logger,\n          tracer,\n        });\n        asset.clearAST();\n        return Promise.resolve(generated);\n      }\n\n      throw new Error(\n        'Asset has an AST but no generate method is available on the transform',\n      );\n    };\n\n    let postProcess = transformer.postProcess;\n    if (postProcess) {\n      pipeline.postProcess = async (\n        assets: Array<UncommittedAsset>,\n      ): Promise<Array<UncommittedAsset> | null> => {\n        let results = await postProcess.call(transformer, {\n          assets: assets.map(asset => new MutableAsset(asset)),\n          config,\n          options: pipeline.pluginOptions,\n          resolve,\n          logger,\n          tracer,\n        });\n\n        return Promise.all(\n          results.map(result =>\n            asset.createChildAsset(\n              result,\n              transformerName,\n              parcelConfig.filePath,\n              // configKeyPath,\n            ),\n          ),\n        );\n      };\n    }\n\n    return results;\n  }\n}\n\ntype Pipeline = {|\n  id: string,\n  transformers: Array<TransformerWithNameAndConfig>,\n  options: ParcelOptions,\n  pluginOptions: PluginOptions,\n  workerApi: WorkerApi,\n  postProcess?: PostProcessFunc,\n  generate?: GenerateFunc,\n|};\n\ntype TransformerWithNameAndConfig = {|\n  name: PackageName,\n  plugin: Transformer<mixed>,\n  config: ?Config,\n  configKeyPath?: string,\n  resolveFrom: ProjectPath,\n  range?: ?SemverRange,\n|};\n\nfunction normalizeAssets(\n  options,\n  results: Array<TransformerResult | MutableAsset>,\n): Array<TransformerResult | UncommittedAsset> {\n  return results.map(result => {\n    if (result instanceof MutableAsset) {\n      return mutableAssetToUncommittedAsset(result);\n    }\n\n    return result;\n  });\n}\n"
  },
  {
    "path": "packages/core/core/src/UncommittedAsset.js",
    "content": "// @flow strict-local\n\nimport type {\n  AST,\n  Blob,\n  DependencyOptions,\n  FileCreateInvalidation,\n  GenerateOutput,\n  PackageName,\n  TransformerResult,\n} from '@parcel/types';\nimport type {Asset, Dependency, ParcelOptions, Invalidations} from './types';\n\nimport invariant from 'assert';\nimport {Readable} from 'stream';\nimport SourceMap from '@parcel/source-map';\nimport {\n  blobToStream,\n  bufferStream,\n  streamFromPromise,\n  TapStream,\n  loadSourceMap,\n  SOURCEMAP_RE,\n} from '@parcel/utils';\nimport {hashString, hashBuffer, Hash} from '@parcel/rust';\nimport {serializeRaw} from './serializer';\nimport {createDependency, mergeDependencies} from './Dependency';\nimport {mergeEnvironments} from './Environment';\nimport {PARCEL_VERSION} from './constants';\nimport {createAsset, createAssetIdFromOptions} from './assetUtils';\nimport {BundleBehaviorNames} from './types';\nimport {invalidateOnFileCreateToInternal, createInvalidations} from './utils';\nimport {type ProjectPath, fromProjectPath} from './projectPath';\n\ntype UncommittedAssetOptions = {|\n  value: Asset,\n  options: ParcelOptions,\n  content?: ?Blob,\n  mapBuffer?: ?Buffer,\n  ast?: ?AST,\n  isASTDirty?: ?boolean,\n  idBase?: ?string,\n  invalidations?: Invalidations,\n|};\n\nexport default class UncommittedAsset {\n  value: Asset;\n  options: ParcelOptions;\n  content: ?(Blob | Promise<Buffer>);\n  mapBuffer: ?Buffer;\n  sourceContent: ?string;\n  map: ?SourceMap;\n  ast: ?AST;\n  isASTDirty: boolean;\n  idBase: ?string;\n  invalidations: Invalidations;\n  generate: ?() => Promise<GenerateOutput>;\n  transformers: Set<string>;\n\n  constructor({\n    value,\n    options,\n    content,\n    mapBuffer,\n    ast,\n    isASTDirty,\n    idBase,\n    invalidations,\n  }: UncommittedAssetOptions) {\n    this.value = value;\n    this.options = options;\n    this.content = content;\n    this.mapBuffer = mapBuffer;\n    this.ast = ast;\n    this.isASTDirty = isASTDirty || false;\n    this.idBase = idBase;\n    this.invalidations = invalidations || createInvalidations();\n    this.transformers = new Set();\n  }\n\n  /*\n   * Prepares the asset for being serialized to the cache by committing its\n   * content and map of the asset to the cache.\n   */\n  async commit(): Promise<void> {\n    // If there is a dirty AST, clear out any old content and map as these\n    // must be regenerated later and shouldn't be committed.\n    if (this.ast != null && this.isASTDirty) {\n      this.content = null;\n      this.mapBuffer = null;\n    }\n\n    let size = 0;\n    let outputHash = '';\n    let contentKey = this.content == null ? null : this.getCacheKey('content');\n    let mapKey = this.mapBuffer == null ? null : this.getCacheKey('map');\n    let astKey = this.ast == null ? null : this.getCacheKey('ast');\n\n    // Since we can only read from the stream once, compute the content length\n    // and hash while it's being written to the cache.\n    await Promise.all([\n      contentKey != null &&\n        this.commitContent(contentKey).then(\n          s => ((size = s.size), (outputHash = s.hash)),\n        ),\n      this.mapBuffer != null &&\n        mapKey != null &&\n        this.options.cache.setBlob(mapKey, this.mapBuffer),\n      astKey != null &&\n        this.options.cache.setBlob(astKey, serializeRaw(this.ast)),\n    ]);\n    this.value.contentKey = contentKey;\n    this.value.mapKey = mapKey;\n    this.value.astKey = astKey;\n    this.value.outputHash = outputHash;\n\n    if (this.content != null) {\n      this.value.stats.size = size;\n    }\n\n    this.value.isLargeBlob = this.content instanceof Readable;\n    this.value.committed = true;\n  }\n\n  async commitContent(\n    contentKey: string,\n  ): Promise<{|size: number, hash: string|}> {\n    let content = await this.content;\n    if (content == null) {\n      return {size: 0, hash: ''};\n    }\n\n    let size = 0;\n    if (content instanceof Readable) {\n      let hash = new Hash();\n      await this.options.cache.setStream(\n        contentKey,\n        content.pipe(\n          new TapStream(buf => {\n            hash.writeBuffer(buf);\n            size += buf.length;\n          }),\n        ),\n      );\n\n      return {size, hash: hash.finish()};\n    }\n\n    let hash;\n    if (typeof content === 'string') {\n      hash = hashString(content);\n      size = Buffer.byteLength(content);\n    } else {\n      hash = hashBuffer(content);\n      size = content.length;\n    }\n\n    await this.options.cache.setBlob(contentKey, content);\n    return {size, hash};\n  }\n\n  async getCode(): Promise<string> {\n    if (this.ast != null && this.isASTDirty) {\n      throw new Error(\n        'Cannot call getCode() on an asset with a dirty AST. For transformers, implement canReuseAST() and check asset.isASTDirty.',\n      );\n    }\n\n    let content = await this.content;\n    if (typeof content === 'string' || content instanceof Buffer) {\n      return content.toString();\n    } else if (content != null) {\n      this.content = bufferStream(content);\n      return (await this.content).toString();\n    }\n\n    invariant(false, 'Internal error: missing content');\n  }\n\n  async getBuffer(): Promise<Buffer> {\n    let content = await this.content;\n    if (content == null) {\n      return Buffer.alloc(0);\n    } else if (content instanceof Buffer) {\n      return content;\n    } else if (typeof content === 'string') {\n      return Buffer.from(content);\n    }\n\n    this.content = bufferStream(content);\n    return this.content;\n  }\n\n  getStream(): Readable {\n    if (this.content instanceof Readable) {\n      // Remove content if it's a stream, as it should not be reused.\n      let content = this.content;\n      this.content = null;\n      return content;\n    }\n\n    if (this.content instanceof Promise) {\n      return streamFromPromise(this.content);\n    }\n\n    return blobToStream(this.content ?? Buffer.alloc(0));\n  }\n\n  setCode(code: string) {\n    this.content = code;\n    this.clearAST();\n  }\n\n  setBuffer(buffer: Buffer) {\n    this.content = buffer;\n    this.clearAST();\n  }\n\n  setStream(stream: Readable) {\n    this.content = stream;\n    this.clearAST();\n  }\n\n  async loadExistingSourcemap(): Promise<?SourceMap> {\n    if (this.map) {\n      return this.map;\n    }\n\n    let code = await this.getCode();\n    let map = await loadSourceMap(\n      fromProjectPath(this.options.projectRoot, this.value.filePath),\n      code,\n      {\n        fs: this.options.inputFS,\n        projectRoot: this.options.projectRoot,\n      },\n    );\n\n    if (map) {\n      this.map = map;\n      this.mapBuffer = map.toBuffer();\n      this.setCode(code.replace(SOURCEMAP_RE, ''));\n    }\n\n    return this.map;\n  }\n\n  getMapBuffer(): Promise<?Buffer> {\n    return Promise.resolve(this.mapBuffer);\n  }\n\n  async getMap(): Promise<?SourceMap> {\n    if (this.map == null) {\n      let mapBuffer = this.mapBuffer ?? (await this.getMapBuffer());\n      if (mapBuffer) {\n        // Get sourcemap from flatbuffer\n        this.map = new SourceMap(this.options.projectRoot, mapBuffer);\n      }\n    }\n\n    return this.map;\n  }\n\n  setMap(map: ?SourceMap): void {\n    // If we have sourceContent available, it means this asset is source code without\n    // a previous source map. Ensure that the map set by the transformer has the original\n    // source content available.\n    if (map != null && this.sourceContent != null) {\n      map.setSourceContent(\n        fromProjectPath(this.options.projectRoot, this.value.filePath),\n        // $FlowFixMe\n        this.sourceContent,\n      );\n      this.sourceContent = null;\n    }\n\n    this.map = map;\n    this.mapBuffer = this.map?.toBuffer();\n  }\n\n  getAST(): Promise<?AST> {\n    return Promise.resolve(this.ast);\n  }\n\n  setAST(ast: AST): void {\n    this.ast = ast;\n    this.isASTDirty = true;\n    this.value.astGenerator = {\n      type: ast.type,\n      version: ast.version,\n    };\n  }\n\n  clearAST() {\n    this.ast = null;\n    this.isASTDirty = false;\n    this.value.astGenerator = null;\n  }\n\n  getCacheKey(key: string): string {\n    return hashString(PARCEL_VERSION + key + this.value.id);\n  }\n\n  addDependency(opts: DependencyOptions): string {\n    // eslint-disable-next-line no-unused-vars\n    let {env, symbols, ...rest} = opts;\n    let dep = createDependency(this.options.projectRoot, {\n      ...rest,\n      // $FlowFixMe \"convert\" the $ReadOnlyMaps to the interal mutable one\n      symbols,\n      env: mergeEnvironments(this.options.projectRoot, this.value.env, env),\n      sourceAssetId: this.value.id,\n      sourcePath: fromProjectPath(\n        this.options.projectRoot,\n        this.value.filePath,\n      ),\n    });\n    let existing = this.value.dependencies.get(dep.id);\n    if (existing) {\n      mergeDependencies(existing, dep);\n    } else {\n      this.value.dependencies.set(dep.id, dep);\n    }\n    return dep.id;\n  }\n\n  invalidateOnFileChange(filePath: ProjectPath) {\n    this.invalidations.invalidateOnFileChange.add(filePath);\n  }\n\n  invalidateOnFileCreate(invalidation: FileCreateInvalidation) {\n    this.invalidations.invalidateOnFileCreate.push(\n      invalidateOnFileCreateToInternal(this.options.projectRoot, invalidation),\n    );\n  }\n\n  invalidateOnEnvChange(key: string) {\n    this.invalidations.invalidateOnEnvChange.add(key);\n  }\n\n  invalidateOnBuild() {\n    this.invalidations.invalidateOnBuild = true;\n  }\n\n  invalidateOnStartup() {\n    this.invalidations.invalidateOnStartup = true;\n  }\n\n  getDependencies(): Array<Dependency> {\n    return Array.from(this.value.dependencies.values());\n  }\n\n  createChildAsset(\n    result: TransformerResult,\n    plugin: PackageName,\n    configPath: ProjectPath,\n    configKeyPath?: string,\n  ): UncommittedAsset {\n    let content = result.content ?? null;\n\n    let asset = new UncommittedAsset({\n      value: createAsset(this.options.projectRoot, {\n        idBase: this.idBase,\n        filePath: this.value.filePath,\n        type: result.type,\n        bundleBehavior:\n          result.bundleBehavior === undefined\n            ? this.value.bundleBehavior == null\n              ? null\n              : BundleBehaviorNames[this.value.bundleBehavior]\n            : result.bundleBehavior,\n        isBundleSplittable:\n          result.isBundleSplittable ?? this.value.isBundleSplittable,\n        isSource: this.value.isSource,\n        env: mergeEnvironments(\n          this.options.projectRoot,\n          this.value.env,\n          result.env,\n        ),\n        dependencies:\n          this.value.type === result.type\n            ? new Map(this.value.dependencies)\n            : new Map(),\n        meta: {\n          ...this.value.meta,\n          ...result.meta,\n        },\n        pipeline:\n          result.pipeline ??\n          (this.value.type === result.type ? this.value.pipeline : null),\n        stats: {\n          time: 0,\n          size: this.value.stats.size,\n        },\n        // $FlowFixMe\n        symbols: result.symbols,\n        sideEffects: result.sideEffects ?? this.value.sideEffects,\n        uniqueKey: result.uniqueKey,\n        astGenerator: result.ast\n          ? {type: result.ast.type, version: result.ast.version}\n          : null,\n        plugin,\n        configPath,\n        configKeyPath,\n      }),\n      options: this.options,\n      content,\n      ast: result.ast,\n      isASTDirty: result.ast === this.ast ? this.isASTDirty : true,\n      mapBuffer: result.map ? result.map.toBuffer() : null,\n      idBase: this.idBase,\n      invalidations: this.invalidations,\n    });\n\n    let dependencies = result.dependencies;\n    if (dependencies) {\n      for (let dep of dependencies) {\n        asset.addDependency(dep);\n      }\n    }\n\n    return asset;\n  }\n\n  updateId() {\n    // $FlowFixMe - this is fine\n    this.value.id = createAssetIdFromOptions(this.value);\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/Validation.js",
    "content": "// @flow strict-local\n\nimport type {WorkerApi} from '@parcel/workers';\nimport type {AssetGroup, ParcelOptions, ReportFn} from './types';\nimport type {Validator, ValidateResult} from '@parcel/types';\nimport type {Diagnostic} from '@parcel/diagnostic';\n\nimport path from 'path';\nimport {resolveConfig} from '@parcel/utils';\nimport logger, {PluginLogger} from '@parcel/logger';\nimport ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';\nimport ParcelConfig from './ParcelConfig';\nimport UncommittedAsset from './UncommittedAsset';\nimport {createAsset} from './assetUtils';\nimport {Asset} from './public/Asset';\nimport PluginOptions from './public/PluginOptions';\nimport summarizeRequest from './summarizeRequest';\nimport {fromProjectPath, fromProjectPathRelative} from './projectPath';\nimport {PluginTracer} from '@parcel/profiler';\nimport {hashString} from '@parcel/rust';\n\nexport type ValidationOpts = {|\n  config: ParcelConfig,\n  /**\n   * If true, this Validation instance will run all validators that implement the single-threaded \"validateAll\" method.\n   * If falsy, it will run validators that implement the one-asset-at-a-time \"validate\" method.\n   */\n  dedicatedThread?: boolean,\n  options: ParcelOptions,\n  requests: AssetGroup[],\n  report: ReportFn,\n  workerApi?: WorkerApi,\n|};\n\nexport default class Validation {\n  allAssets: {[validatorName: string]: UncommittedAsset[], ...} = {};\n  allValidators: {[validatorName: string]: Validator, ...} = {};\n  dedicatedThread: boolean;\n  impactfulOptions: $Shape<ParcelOptions>;\n  options: ParcelOptions;\n  parcelConfig: ParcelConfig;\n  report: ReportFn;\n  requests: AssetGroup[];\n  workerApi: ?WorkerApi;\n\n  constructor({\n    config,\n    dedicatedThread,\n    options,\n    requests,\n    report,\n    workerApi,\n  }: ValidationOpts) {\n    this.dedicatedThread = dedicatedThread ?? false;\n    this.options = options;\n    this.parcelConfig = config;\n    this.report = report;\n    this.requests = requests;\n    this.workerApi = workerApi;\n  }\n\n  async run(): Promise<void> {\n    let pluginOptions = new PluginOptions(this.options);\n    await this.buildAssetsAndValidators();\n    await Promise.all(\n      Object.keys(this.allValidators).map(async validatorName => {\n        let assets = this.allAssets[validatorName];\n        if (assets) {\n          let plugin = this.allValidators[validatorName];\n          let validatorLogger = new PluginLogger({origin: validatorName});\n          let validatorTracer = new PluginTracer({\n            origin: validatorName,\n            category: 'validator',\n          });\n          let validatorResults: Array<?ValidateResult> = [];\n          try {\n            // If the plugin supports the single-threading validateAll method, pass all assets to it.\n            if (plugin.validateAll && this.dedicatedThread) {\n              validatorResults = await plugin.validateAll({\n                assets: assets.map(asset => new Asset(asset)),\n                options: pluginOptions,\n                logger: validatorLogger,\n                tracer: validatorTracer,\n                resolveConfigWithPath: (\n                  configNames: Array<string>,\n                  assetFilePath: string,\n                ) =>\n                  resolveConfig(\n                    this.options.inputFS,\n                    assetFilePath,\n                    configNames,\n                    this.options.projectRoot,\n                  ),\n              });\n            }\n\n            // Otherwise, pass the assets one-at-a-time\n            else if (plugin.validate && !this.dedicatedThread) {\n              await Promise.all(\n                assets.map(async input => {\n                  let config = null;\n                  let publicAsset = new Asset(input);\n                  if (plugin.getConfig) {\n                    config = await plugin.getConfig({\n                      asset: publicAsset,\n                      options: pluginOptions,\n                      logger: validatorLogger,\n                      tracer: validatorTracer,\n                      resolveConfig: (configNames: Array<string>) =>\n                        resolveConfig(\n                          this.options.inputFS,\n                          publicAsset.filePath,\n                          configNames,\n                          this.options.projectRoot,\n                        ),\n                    });\n                  }\n\n                  let validatorResult = await plugin.validate({\n                    asset: publicAsset,\n                    options: pluginOptions,\n                    config,\n                    logger: validatorLogger,\n                    tracer: validatorTracer,\n                  });\n                  validatorResults.push(validatorResult);\n                }),\n              );\n            }\n            this.handleResults(validatorResults);\n          } catch (e) {\n            throw new ThrowableDiagnostic({\n              diagnostic: errorToDiagnostic(e, {\n                origin: validatorName,\n              }),\n            });\n          }\n        }\n      }),\n    );\n  }\n\n  async buildAssetsAndValidators() {\n    // Figure out what validators need to be run, and group the assets by the relevant validators.\n    await Promise.all(\n      this.requests.map(async request => {\n        this.report({\n          type: 'validation',\n          filePath: fromProjectPath(this.options.projectRoot, request.filePath),\n        });\n\n        let asset = await this.loadAsset(request);\n\n        let validators = await this.parcelConfig.getValidators(\n          request.filePath,\n        );\n\n        for (let validator of validators) {\n          this.allValidators[validator.name] = validator.plugin;\n          if (this.allAssets[validator.name]) {\n            this.allAssets[validator.name].push(asset);\n          } else {\n            this.allAssets[validator.name] = [asset];\n          }\n        }\n      }),\n    );\n  }\n\n  handleResults(validatorResults: Array<?ValidateResult>) {\n    let warnings: Array<Diagnostic> = [];\n    let errors: Array<Diagnostic> = [];\n    validatorResults.forEach(result => {\n      if (result) {\n        warnings.push(...result.warnings);\n        errors.push(...result.errors);\n      }\n    });\n\n    if (errors.length > 0) {\n      throw new ThrowableDiagnostic({\n        diagnostic: errors,\n      });\n    }\n\n    if (warnings.length > 0) {\n      logger.warn(warnings);\n    }\n  }\n\n  async loadAsset(request: AssetGroup): Promise<UncommittedAsset> {\n    let {filePath, env, code, sideEffects, query} = request;\n    let {content, size, isSource} = await summarizeRequest(\n      this.options.inputFS,\n      {\n        filePath: fromProjectPath(this.options.projectRoot, request.filePath),\n      },\n    );\n\n    // If the transformer request passed code rather than a filename,\n    // use a hash as the base for the id to ensure it is unique.\n    let idBase =\n      code != null ? hashString(code) : fromProjectPathRelative(filePath);\n    return new UncommittedAsset({\n      idBase,\n      value: createAsset(this.options.projectRoot, {\n        idBase,\n        filePath: filePath,\n        isSource,\n        type: path.extname(fromProjectPathRelative(filePath)).slice(1),\n        query,\n        env: env,\n        stats: {\n          time: 0,\n          size,\n        },\n        sideEffects: sideEffects,\n      }),\n      options: this.options,\n      content,\n    });\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/applyRuntimes.js",
    "content": "// @flow strict-local\n\nimport type {ContentKey} from '@parcel/graph';\nimport type {Dependency, NamedBundle as INamedBundle} from '@parcel/types';\nimport type {SharedReference} from '@parcel/workers';\nimport type {\n  Asset,\n  AssetGroup,\n  Bundle as InternalBundle,\n  Config,\n  DevDepRequest,\n  DevDepRequestRef,\n  ParcelOptions,\n} from './types';\nimport type ParcelConfig from './ParcelConfig';\nimport type PluginOptions from './public/PluginOptions';\nimport type {RequestResult, RunAPI} from './RequestTracker';\n\nimport path from 'path';\nimport assert from 'assert';\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport {nodeFromAssetGroup} from './AssetGraph';\nimport BundleGraph from './public/BundleGraph';\nimport InternalBundleGraph, {bundleGraphEdgeTypes} from './BundleGraph';\nimport {NamedBundle} from './public/Bundle';\nimport {PluginLogger} from '@parcel/logger';\nimport {hashString} from '@parcel/rust';\nimport ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';\nimport {dependencyToInternalDependency} from './public/Dependency';\nimport {mergeEnvironments} from './Environment';\nimport createAssetGraphRequest from './requests/AssetGraphRequest';\nimport {createDevDependency, runDevDepRequest} from './requests/DevDepRequest';\nimport {toProjectPath, fromProjectPathRelative} from './projectPath';\nimport {tracer, PluginTracer} from '@parcel/profiler';\n\ntype RuntimeConnection = {|\n  bundle: InternalBundle,\n  assetGroup: AssetGroup,\n  dependency: ?Dependency,\n  isEntry: ?boolean,\n  shouldReplaceResolution: ?boolean,\n|};\n\nexport default async function applyRuntimes<TResult: RequestResult>({\n  bundleGraph,\n  config,\n  options,\n  pluginOptions,\n  api,\n  optionsRef,\n  previousDevDeps,\n  devDepRequests,\n  configs,\n}: {|\n  bundleGraph: InternalBundleGraph,\n  config: ParcelConfig,\n  options: ParcelOptions,\n  optionsRef: SharedReference,\n  pluginOptions: PluginOptions,\n  api: RunAPI<TResult>,\n  previousDevDeps: Map<string, string>,\n  devDepRequests: Map<string, DevDepRequest | DevDepRequestRef>,\n  configs: Map<string, Config>,\n|}): Promise<Map<string, Asset>> {\n  let runtimes = await config.getRuntimes();\n  let connections: Array<RuntimeConnection> = [];\n\n  let bundles = bundleGraph.getBundles({includeInline: true});\n  let publicBundleGraph = new BundleGraph<INamedBundle>(\n    bundleGraph,\n    NamedBundle.get.bind(NamedBundle),\n    options,\n  );\n  for (let bundle of bundles) {\n    for (let runtime of runtimes) {\n      let measurement;\n      try {\n        const namedBundle = NamedBundle.get(bundle, bundleGraph, options);\n        measurement = tracer.createMeasurement(\n          runtime.name,\n          'applyRuntime',\n          namedBundle.displayName,\n        );\n        let applied = await runtime.plugin.apply({\n          bundle: namedBundle,\n          bundleGraph: publicBundleGraph,\n          config: configs.get(runtime.name)?.result,\n          options: pluginOptions,\n          logger: new PluginLogger({origin: runtime.name}),\n          tracer: new PluginTracer({\n            origin: runtime.name,\n            category: 'applyRuntime',\n          }),\n        });\n\n        if (applied) {\n          let runtimeAssets = Array.isArray(applied) ? applied : [applied];\n          for (let {\n            code,\n            dependency,\n            filePath,\n            isEntry,\n            env,\n            shouldReplaceResolution,\n          } of runtimeAssets) {\n            let sourceName = path.join(\n              path.dirname(filePath),\n              `runtime-${hashString(code)}${path.extname(filePath)}`,\n            );\n\n            let assetGroup = {\n              code,\n              filePath: toProjectPath(options.projectRoot, sourceName),\n              env: mergeEnvironments(options.projectRoot, bundle.env, env),\n              // Runtime assets should be considered source, as they should be\n              // e.g. compiled to run in the target environment\n              isSource: true,\n            };\n\n            connections.push({\n              bundle,\n              assetGroup,\n              dependency,\n              isEntry,\n              shouldReplaceResolution,\n            });\n          }\n        }\n      } catch (e) {\n        throw new ThrowableDiagnostic({\n          diagnostic: errorToDiagnostic(e, {\n            origin: runtime.name,\n          }),\n        });\n      } finally {\n        measurement && measurement.end();\n      }\n    }\n  }\n\n  // Add dev deps for runtime plugins AFTER running them, to account for lazy require().\n  for (let runtime of runtimes) {\n    let devDepRequest = await createDevDependency(\n      {\n        specifier: runtime.name,\n        resolveFrom: runtime.resolveFrom,\n      },\n      previousDevDeps,\n      options,\n    );\n    devDepRequests.set(\n      `${devDepRequest.specifier}:${fromProjectPathRelative(\n        devDepRequest.resolveFrom,\n      )}`,\n      devDepRequest,\n    );\n    await runDevDepRequest(api, devDepRequest);\n  }\n\n  let {assetGraph: runtimesAssetGraph, changedAssets} =\n    await reconcileNewRuntimes(api, connections, optionsRef);\n\n  let runtimesGraph = InternalBundleGraph.fromAssetGraph(\n    runtimesAssetGraph,\n    options.mode === 'production',\n    bundleGraph._publicIdByAssetId,\n    bundleGraph._assetPublicIds,\n  );\n\n  // Merge the runtimes graph into the main bundle graph.\n  bundleGraph.merge(runtimesGraph);\n  for (let [assetId, publicId] of runtimesGraph._publicIdByAssetId) {\n    bundleGraph._publicIdByAssetId.set(assetId, publicId);\n    bundleGraph._assetPublicIds.add(publicId);\n  }\n\n  for (let {\n    bundle,\n    assetGroup,\n    dependency,\n    isEntry,\n    shouldReplaceResolution,\n  } of connections) {\n    let assetGroupNode = nodeFromAssetGroup(assetGroup);\n    let assetGroupAssetNodeIds = runtimesAssetGraph.getNodeIdsConnectedFrom(\n      runtimesAssetGraph.getNodeIdByContentKey(assetGroupNode.id),\n    );\n    invariant(assetGroupAssetNodeIds.length === 1);\n    let runtimeNodeId = assetGroupAssetNodeIds[0];\n    let runtimeNode = nullthrows(runtimesAssetGraph.getNode(runtimeNodeId));\n    invariant(runtimeNode.type === 'asset');\n\n    let resolution =\n      dependency &&\n      bundleGraph.getResolvedAsset(\n        dependencyToInternalDependency(dependency),\n        bundle,\n      );\n\n    let runtimesGraphRuntimeNodeId = runtimesGraph._graph.getNodeIdByContentKey(\n      runtimeNode.id,\n    );\n    let duplicatedContentKeys: Set<ContentKey> = new Set();\n    runtimesGraph._graph.traverse((nodeId, _, actions) => {\n      let node = nullthrows(runtimesGraph._graph.getNode(nodeId));\n      if (node.type !== 'dependency') {\n        return;\n      }\n\n      let assets = runtimesGraph._graph\n        .getNodeIdsConnectedFrom(nodeId)\n        .map(assetNodeId => {\n          let assetNode = nullthrows(runtimesGraph._graph.getNode(assetNodeId));\n          invariant(assetNode.type === 'asset');\n          return assetNode.value;\n        });\n\n      for (let asset of assets) {\n        if (\n          bundleGraph.isAssetReachableFromBundle(asset, bundle) ||\n          resolution?.id === asset.id\n        ) {\n          duplicatedContentKeys.add(asset.id);\n          actions.skipChildren();\n        }\n      }\n    }, runtimesGraphRuntimeNodeId);\n\n    let bundleNodeId = bundleGraph._graph.getNodeIdByContentKey(bundle.id);\n    let bundleGraphRuntimeNodeId = bundleGraph._graph.getNodeIdByContentKey(\n      runtimeNode.id,\n    ); // the node id is not constant between graphs\n\n    runtimesGraph._graph.traverse((nodeId, _, actions) => {\n      let node = nullthrows(runtimesGraph._graph.getNode(nodeId));\n      if (node.type === 'asset' || node.type === 'dependency') {\n        if (duplicatedContentKeys.has(node.id)) {\n          actions.skipChildren();\n          return;\n        }\n\n        const bundleGraphNodeId = bundleGraph._graph.getNodeIdByContentKey(\n          node.id,\n        ); // the node id is not constant between graphs\n        bundleGraph._graph.addEdge(\n          bundleNodeId,\n          bundleGraphNodeId,\n          bundleGraphEdgeTypes.contains,\n        );\n      }\n    }, runtimesGraphRuntimeNodeId);\n\n    if (isEntry) {\n      bundleGraph._graph.addEdge(bundleNodeId, bundleGraphRuntimeNodeId);\n      bundle.entryAssetIds.unshift(runtimeNode.id);\n    }\n\n    if (dependency == null) {\n      // Verify this asset won't become an island\n      assert(\n        bundleGraph._graph.getNodeIdsConnectedTo(bundleGraphRuntimeNodeId)\n          .length > 0,\n        'Runtime must have an inbound dependency or be an entry',\n      );\n    } else {\n      let dependencyNodeId = bundleGraph._graph.getNodeIdByContentKey(\n        dependency.id,\n      );\n      bundleGraph._graph.addEdge(dependencyNodeId, bundleGraphRuntimeNodeId);\n\n      if (shouldReplaceResolution && resolution) {\n        let resolutionNodeId = bundleGraph._graph.getNodeIdByContentKey(\n          resolution.id,\n        );\n        bundleGraph._graph.removeEdge(dependencyNodeId, resolutionNodeId);\n        bundleGraph._graph.addEdge(dependencyNodeId, resolutionNodeId);\n        // TODO: remove asset from bundle?\n      }\n    }\n  }\n\n  return changedAssets;\n}\n\nfunction reconcileNewRuntimes<TResult: RequestResult>(\n  api: RunAPI<TResult>,\n  connections: Array<RuntimeConnection>,\n  optionsRef: SharedReference,\n) {\n  let assetGroups = connections.map(t => t.assetGroup);\n  let request = createAssetGraphRequest({\n    name: 'Runtimes',\n    assetGroups,\n    optionsRef,\n  });\n\n  // rebuild the graph\n  return api.runRequest(request, {force: true});\n}\n"
  },
  {
    "path": "packages/core/core/src/assetUtils.js",
    "content": "// @flow strict-local\n\nimport type {\n  ASTGenerator,\n  BundleBehavior,\n  FilePath,\n  GenerateOutput,\n  Meta,\n  PackageName,\n  Stats,\n  Symbol,\n  SourceLocation,\n  Transformer,\n} from '@parcel/types';\nimport type {\n  Asset,\n  RequestInvalidation,\n  Dependency,\n  Environment,\n  ParcelOptions,\n} from './types';\n\nimport {Readable} from 'stream';\nimport {PluginLogger} from '@parcel/logger';\nimport nullthrows from 'nullthrows';\nimport CommittedAsset from './CommittedAsset';\nimport UncommittedAsset from './UncommittedAsset';\nimport loadPlugin from './loadParcelPlugin';\nimport {Asset as PublicAsset} from './public/Asset';\nimport PluginOptions from './public/PluginOptions';\nimport {blobToStream, hashFile} from '@parcel/utils';\nimport {hashFromOption, toInternalSourceLocation} from './utils';\nimport {createBuildCache} from './buildCache';\nimport {\n  type ProjectPath,\n  fromProjectPath,\n  fromProjectPathRelative,\n} from './projectPath';\nimport {hashString} from '@parcel/rust';\nimport {BundleBehavior as BundleBehaviorMap} from './types';\nimport {PluginTracer} from '@parcel/profiler';\n\ntype AssetOptions = {|\n  id?: string,\n  committed?: boolean,\n  idBase?: ?string,\n  filePath: ProjectPath,\n  query?: ?string,\n  type: string,\n  contentKey?: ?string,\n  mapKey?: ?string,\n  astKey?: ?string,\n  astGenerator?: ?ASTGenerator,\n  dependencies?: Map<string, Dependency>,\n  bundleBehavior?: ?BundleBehavior,\n  isBundleSplittable?: ?boolean,\n  isSource: boolean,\n  env: Environment,\n  meta?: Meta,\n  outputHash?: ?string,\n  pipeline?: ?string,\n  stats: Stats,\n  symbols?: ?Map<Symbol, {|local: Symbol, loc: ?SourceLocation, meta?: ?Meta|}>,\n  sideEffects?: boolean,\n  uniqueKey?: ?string,\n  plugin?: PackageName,\n  configPath?: ProjectPath,\n  configKeyPath?: string,\n|};\n\nexport function createAssetIdFromOptions(options: AssetOptions): string {\n  let uniqueKey = options.uniqueKey ?? '';\n  let idBase =\n    options.idBase != null\n      ? options.idBase\n      : fromProjectPathRelative(options.filePath);\n\n  return hashString(\n    idBase +\n      options.type +\n      options.env.id +\n      uniqueKey +\n      ':' +\n      (options.pipeline ?? '') +\n      ':' +\n      (options.query ?? ''),\n  );\n}\n\nexport function createAsset(\n  projectRoot: FilePath,\n  options: AssetOptions,\n): Asset {\n  return {\n    id: options.id != null ? options.id : createAssetIdFromOptions(options),\n    committed: options.committed ?? false,\n    filePath: options.filePath,\n    query: options.query,\n    bundleBehavior: options.bundleBehavior\n      ? BundleBehaviorMap[options.bundleBehavior]\n      : null,\n    isBundleSplittable: options.isBundleSplittable ?? true,\n    type: options.type,\n    contentKey: options.contentKey,\n    mapKey: options.mapKey,\n    astKey: options.astKey,\n    astGenerator: options.astGenerator,\n    dependencies: options.dependencies || new Map(),\n    isSource: options.isSource,\n    outputHash: options.outputHash,\n    pipeline: options.pipeline,\n    env: options.env,\n    meta: options.meta || {},\n    stats: options.stats,\n    symbols:\n      options.symbols &&\n      new Map(\n        [...options.symbols].map(([k, v]) => [\n          k,\n          {\n            local: v.local,\n            meta: v.meta,\n            loc: toInternalSourceLocation(projectRoot, v.loc),\n          },\n        ]),\n      ),\n    sideEffects: options.sideEffects ?? true,\n    uniqueKey: options.uniqueKey,\n    plugin: options.plugin,\n    configPath: options.configPath,\n    configKeyPath: options.configKeyPath,\n  };\n}\n\nconst generateResults: WeakMap<Asset, Promise<GenerateOutput>> = new WeakMap();\n\nexport function generateFromAST(\n  asset: CommittedAsset | UncommittedAsset,\n): Promise<GenerateOutput> {\n  let output = generateResults.get(asset.value);\n  if (output == null) {\n    output = _generateFromAST(asset);\n    generateResults.set(asset.value, output);\n  }\n  return output;\n}\n\nasync function _generateFromAST(asset: CommittedAsset | UncommittedAsset) {\n  let ast = await asset.getAST();\n  if (ast == null) {\n    throw new Error('Asset has no AST');\n  }\n\n  let pluginName = nullthrows(asset.value.plugin);\n  let {plugin} = nullthrows(\n    await loadPlugin<Transformer<mixed>>(\n      pluginName,\n      fromProjectPath(\n        asset.options.projectRoot,\n        nullthrows(asset.value.configPath),\n      ),\n      nullthrows(asset.value.configKeyPath),\n      asset.options,\n    ),\n  );\n  let generate = plugin.generate?.bind(plugin);\n  if (!generate) {\n    throw new Error(`${pluginName} does not have a generate method`);\n  }\n\n  let {content, map} = await generate({\n    asset: new PublicAsset(asset),\n    ast,\n    options: new PluginOptions(asset.options),\n    logger: new PluginLogger({origin: pluginName}),\n    tracer: new PluginTracer({origin: pluginName, category: 'asset-generate'}),\n  });\n\n  let mapBuffer = map?.toBuffer();\n  // Store the results in the cache so we can avoid generating again next time\n  await Promise.all([\n    asset.options.cache.setStream(\n      nullthrows(asset.value.contentKey),\n      blobToStream(content),\n    ),\n    mapBuffer != null &&\n      asset.options.cache.setBlob(nullthrows(asset.value.mapKey), mapBuffer),\n  ]);\n\n  return {\n    content:\n      content instanceof Readable\n        ? asset.options.cache.getStream(nullthrows(asset.value.contentKey))\n        : content,\n    map,\n  };\n}\n\nexport function getInvalidationId(invalidation: RequestInvalidation): string {\n  switch (invalidation.type) {\n    case 'file':\n      return 'file:' + fromProjectPathRelative(invalidation.filePath);\n    case 'env':\n      return 'env:' + invalidation.key;\n    case 'option':\n      return 'option:' + invalidation.key;\n    default:\n      throw new Error('Unknown invalidation type: ' + invalidation.type);\n  }\n}\n\nconst hashCache = createBuildCache();\n\nexport async function getInvalidationHash(\n  invalidations: Array<RequestInvalidation>,\n  options: ParcelOptions,\n): Promise<string> {\n  if (invalidations.length === 0) {\n    return '';\n  }\n\n  let sortedInvalidations = invalidations\n    .slice()\n    .sort((a, b) => (getInvalidationId(a) < getInvalidationId(b) ? -1 : 1));\n\n  let hashes = '';\n  for (let invalidation of sortedInvalidations) {\n    switch (invalidation.type) {\n      case 'file': {\n        // Only recompute the hash of this file if we haven't seen it already during this build.\n        let fileHash = hashCache.get(invalidation.filePath);\n        if (fileHash == null) {\n          fileHash = hashFile(\n            options.inputFS,\n            fromProjectPath(options.projectRoot, invalidation.filePath),\n          );\n          hashCache.set(invalidation.filePath, fileHash);\n        }\n        hashes += await fileHash;\n        break;\n      }\n      case 'env':\n        hashes +=\n          invalidation.key + ':' + (options.env[invalidation.key] || '');\n        break;\n      case 'option':\n        hashes +=\n          invalidation.key + ':' + hashFromOption(options[invalidation.key]);\n        break;\n      default:\n        throw new Error('Unknown invalidation type: ' + invalidation.type);\n    }\n  }\n\n  return hashString(hashes);\n}\n"
  },
  {
    "path": "packages/core/core/src/buildCache.js",
    "content": "// @flow\n\nconst buildCaches: Array<Map<any, any>> = [];\n\nexport function createBuildCache<K, V>(): Map<K, V> {\n  let cache = new Map<K, V>();\n  buildCaches.push(cache);\n  return cache;\n}\n\nexport function clearBuildCaches() {\n  for (let cache of buildCaches) {\n    cache.clear();\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/constants.js",
    "content": "// @flow strict-local\n\n// $FlowFixMe\nimport {version} from '../package.json';\n\nexport const PARCEL_VERSION = version;\nexport const HASH_REF_PREFIX = 'HASH_REF_';\nexport const HASH_REF_HASH_LEN = 16;\nexport const HASH_REF_REGEX: RegExp = new RegExp(\n  `${HASH_REF_PREFIX}\\\\w{${HASH_REF_HASH_LEN}}`,\n  'g',\n);\n\nexport const VALID = 0;\nexport const INITIAL_BUILD = 1 << 0;\nexport const FILE_CREATE = 1 << 1;\nexport const FILE_UPDATE = 1 << 2;\nexport const FILE_DELETE = 1 << 3;\nexport const ENV_CHANGE = 1 << 4;\nexport const OPTION_CHANGE = 1 << 5;\nexport const STARTUP = 1 << 6;\nexport const ERROR = 1 << 7;\n"
  },
  {
    "path": "packages/core/core/src/dumpGraphToGraphViz.js",
    "content": "// @flow\n\nimport type {Asset, BundleBehavior} from '@parcel/types';\nimport type {Graph} from '@parcel/graph';\nimport type {AssetGraphNode, BundleGraphNode, Environment} from './types';\nimport {bundleGraphEdgeTypes} from './BundleGraph';\nimport {requestGraphEdgeTypes} from './RequestTracker';\n\nimport path from 'path';\nimport {fromNodeId} from '@parcel/graph';\nimport {fromProjectPathRelative} from './projectPath';\nimport {SpecifierType, Priority} from './types';\n\nconst COLORS = {\n  root: 'gray',\n  asset: 'green',\n  dependency: 'orange',\n  transformer_request: 'cyan',\n  file: 'gray',\n  default: 'white',\n};\n\nconst TYPE_COLORS = {\n  // bundle graph\n  bundle: 'blue',\n  contains: 'grey',\n  internal_async: 'orange',\n  references: 'red',\n  sibling: 'green',\n  // asset graph\n  // request graph\n  invalidated_by_create: 'green',\n  invalidated_by_create_above: 'orange',\n  invalidate_by_update: 'cyan',\n  invalidated_by_delete: 'red',\n};\n\nexport default async function dumpGraphToGraphViz(\n  graph:\n    | Graph<AssetGraphNode>\n    | Graph<{|\n        assets: Set<Asset>,\n        sourceBundles: Set<number>,\n        bundleBehavior?: ?BundleBehavior,\n      |}>\n    | Graph<BundleGraphNode>,\n  name: string,\n  edgeTypes?: typeof bundleGraphEdgeTypes | typeof requestGraphEdgeTypes,\n): Promise<void> {\n  if (\n    process.env.PARCEL_BUILD_ENV === 'production' &&\n    !process.env.PARCEL_BUILD_REPL\n  ) {\n    return;\n  }\n\n  let mode: ?string = process.env.PARCEL_BUILD_REPL\n    ? // $FlowFixMe\n      globalThis.PARCEL_DUMP_GRAPHVIZ?.mode\n    : process.env.PARCEL_DUMP_GRAPHVIZ;\n\n  // $FlowFixMe[invalid-compare]\n  if (mode == null || mode == false) {\n    return;\n  }\n\n  let detailedSymbols = mode === 'symbols';\n\n  let GraphVizGraph = require('graphviz/lib/deps/graph').Graph;\n  let g = new GraphVizGraph(null, 'G');\n  g.type = 'digraph';\n  // $FlowFixMe\n  for (let [id, node] of graph.nodes.entries()) {\n    if (node == null) continue;\n    let n = g.addNode(nodeId(id));\n    // $FlowFixMe default is fine. Not every type needs to be in the map.\n    n.set('color', COLORS[node.type || 'default']);\n    n.set('shape', 'box');\n    n.set('style', 'filled');\n    let label;\n    if (typeof node === 'string') {\n      label = node;\n    } else if (node.assets) {\n      label = `(${nodeId(id)}), (assetIds: ${[...node.assets]\n        .map(a => {\n          let arr = a.filePath.split('/');\n          return arr[arr.length - 1];\n        })\n        .join(', ')}) (sourceBundles: ${[...node.sourceBundles].join(\n        ', ',\n      )}) (bb ${node.bundleBehavior ?? 'none'})`;\n    } else if (node.type) {\n      label = `[${fromNodeId(id)}] ${node.type || 'No Type'}: [${node.id}]: `;\n      if (node.type === 'dependency') {\n        label += node.value.specifier;\n        let parts = [];\n        if (node.value.priority !== Priority.sync) {\n          parts.push(\n            Object.entries(Priority).find(\n              ([, v]) => v === node.value.priority,\n            )?.[0],\n          );\n        }\n        if (node.value.isOptional) parts.push('optional');\n        if (node.value.specifierType === SpecifierType.url) parts.push('url');\n        if (node.hasDeferred) parts.push('deferred');\n        if (node.deferred) parts.push('deferred');\n        if (node.excluded) parts.push('excluded');\n        if (parts.length) label += ' (' + parts.join(', ') + ')';\n        if (node.value.env) label += ` (${getEnvDescription(node.value.env)})`;\n        let depSymbols = node.value.symbols;\n        if (detailedSymbols) {\n          if (depSymbols) {\n            if (depSymbols.size) {\n              label +=\n                '\\\\nsymbols: ' +\n                [...depSymbols].map(([e, {local}]) => [e, local]).join(';');\n            }\n            let weakSymbols = [...depSymbols]\n              .filter(([, {isWeak}]) => isWeak)\n              .map(([s]) => s);\n            if (weakSymbols.length) {\n              label += '\\\\nweakSymbols: ' + weakSymbols.join(',');\n            }\n            if (node.usedSymbolsUp.size > 0) {\n              label +=\n                '\\\\nusedSymbolsUp: ' +\n                [...node.usedSymbolsUp]\n                  .map(([s, sAsset]) =>\n                    sAsset\n                      ? `${s}(${sAsset.asset}.${sAsset.symbol ?? ''})`\n                      : sAsset === null\n                      ? `${s}(external)`\n                      : `${s}(ambiguous)`,\n                  )\n                  .join(',');\n            }\n            if (node.usedSymbolsDown.size > 0) {\n              label +=\n                '\\\\nusedSymbolsDown: ' + [...node.usedSymbolsDown].join(',');\n            }\n            // if (node.usedSymbolsDownDirty) label += '\\\\nusedSymbolsDownDirty';\n            // if (node.usedSymbolsUpDirtyDown)\n            //   label += '\\\\nusedSymbolsUpDirtyDown';\n            // if (node.usedSymbolsUpDirtyUp) label += '\\\\nusedSymbolsUpDirtyUp';\n          } else {\n            label += '\\\\nsymbols: cleared';\n          }\n        }\n      } else if (node.type === 'asset') {\n        label +=\n          path.basename(fromProjectPathRelative(node.value.filePath)) +\n          '#' +\n          node.value.type;\n        if (detailedSymbols) {\n          if (!node.value.symbols) {\n            label += '\\\\nsymbols: cleared';\n          } else if (node.value.symbols.size) {\n            label +=\n              '\\\\nsymbols: ' +\n              [...node.value.symbols]\n                .map(([e, {local}]) => [e, local])\n                .join(';');\n          }\n          if (node.usedSymbols.size) {\n            label += '\\\\nusedSymbols: ' + [...node.usedSymbols].join(',');\n          }\n          // if (node.usedSymbolsDownDirty) label += '\\\\nusedSymbolsDownDirty';\n          // if (node.usedSymbolsUpDirty) label += '\\\\nusedSymbolsUpDirty';\n        } else {\n          label += '\\\\nsymbols: cleared';\n        }\n      } else if (node.type === 'asset_group') {\n        if (node.deferred) label += '(deferred)';\n      } else if (node.type === 'file') {\n        label += path.basename(node.id);\n      } else if (node.type === 'transformer_request') {\n        label +=\n          path.basename(node.value.filePath) +\n          ` (${getEnvDescription(node.value.env)})`;\n      } else if (node.type === 'bundle') {\n        let parts = [];\n        if (node.value.needsStableName) parts.push('stable name');\n        parts.push(node.value.name);\n        parts.push('bb:' + (node.value.bundleBehavior ?? 'null'));\n        if (node.value.isPlaceholder) parts.push('placeholder');\n        if (parts.length) label += ' (' + parts.join(', ') + ')';\n        if (node.value.env) label += ` (${getEnvDescription(node.value.env)})`;\n      } else if (node.type === 'request') {\n        label = node.requestType + ':' + node.id;\n      }\n    }\n    n.set('label', label);\n  }\n\n  let edgeNames;\n  if (edgeTypes) {\n    edgeNames = Object.fromEntries(\n      Object.entries(edgeTypes).map(([k, v]) => [v, k]),\n    );\n  }\n\n  for (let edge of graph.getAllEdges()) {\n    let gEdge = g.addEdge(nodeId(edge.from), nodeId(edge.to));\n    let color = null;\n    if (edge.type != 1 && edgeNames) {\n      color = TYPE_COLORS[edgeNames[edge.type]];\n    }\n    if (color != null) {\n      gEdge.set('color', color);\n    }\n  }\n\n  if (process.env.PARCEL_BUILD_REPL) {\n    // $FlowFixMe\n    globalThis.PARCEL_DUMP_GRAPHVIZ?.(name, g.to_dot());\n  } else {\n    const tempy = require('tempy');\n    let tmp = tempy.file({name: `parcel-${name}.png`});\n    await g.output('png', tmp);\n    // eslint-disable-next-line no-console\n    console.log('Dumped', tmp);\n  }\n}\n\nfunction nodeId(id) {\n  // $FlowFixMe\n  return `node${id}`;\n}\n\nfunction getEnvDescription(env: Environment) {\n  let description;\n  if (typeof env.engines.browsers === 'string') {\n    description = `${env.context}: ${env.engines.browsers}`;\n  } else if (Array.isArray(env.engines.browsers)) {\n    description = `${env.context}: ${env.engines.browsers.join(', ')}`;\n  } else if (env.engines.node) {\n    description = `node: ${env.engines.node}`;\n  } else if (env.engines.electron) {\n    description = `electron: ${env.engines.electron}`;\n  }\n\n  return description ?? '';\n}\n"
  },
  {
    "path": "packages/core/core/src/index.js",
    "content": "// @flow\n\n// Needs to be exported first because of circular imports\nexport {\n  registerSerializableClass,\n  unregisterSerializableClass,\n  prepareForSerialization,\n  restoreDeserializedObject,\n  serialize,\n  deserialize,\n} from './serializer';\n\nexport {\n  default,\n  default as Parcel,\n  BuildError,\n  createWorkerFarm,\n  INTERNAL_RESOLVE,\n  INTERNAL_TRANSFORM,\n} from './Parcel';\n"
  },
  {
    "path": "packages/core/core/src/loadDotEnv.js",
    "content": "// @flow strict-local\n\nimport type {FileSystem} from '@parcel/fs';\nimport type {EnvMap, FilePath} from '@parcel/types';\n\nimport {resolveConfig} from '@parcel/utils';\n// $FlowFixMe\nimport dotenv from 'dotenv';\nimport variableExpansion from 'dotenv-expand';\n\nexport default async function loadEnv(\n  env: EnvMap,\n  fs: FileSystem,\n  filePath: FilePath,\n  projectRoot: FilePath,\n): Promise<EnvMap> {\n  const NODE_ENV = env.NODE_ENV ?? 'development';\n\n  const dotenvFiles = [\n    '.env',\n    // Don't include `.env.local` for `test` environment\n    // since normally you expect tests to produce the same\n    // results for everyone\n    NODE_ENV === 'test' ? null : '.env.local',\n    `.env.${NODE_ENV}`,\n    `.env.${NODE_ENV}.local`,\n  ].filter(Boolean);\n\n  let envs = await Promise.all(\n    dotenvFiles.map(async dotenvFile => {\n      const envPath = await resolveConfig(\n        fs,\n        filePath,\n        [dotenvFile],\n        projectRoot,\n      );\n      if (envPath == null) {\n        return;\n      }\n\n      // `ignoreProcessEnv` prevents dotenv-expand from writing values into `process.env`:\n      // https://github.com/motdotla/dotenv-expand/blob/ddb73d02322fe8522b4e05b73e1c1ad24ea7c14a/lib/main.js#L5\n      let output = {};\n      variableExpansion.expand({\n        processEnv: output,\n        parsed: dotenv.parse(await fs.readFile(envPath)),\n        ignoreProcessEnv: true,\n      });\n\n      return output;\n    }),\n  );\n\n  return Object.assign({}, ...envs);\n}\n"
  },
  {
    "path": "packages/core/core/src/loadParcelPlugin.js",
    "content": "// @flow\nimport type {FilePath, PackageName, Semver, SemverRange} from '@parcel/types';\nimport type {ParcelOptions} from './types';\n\nimport path from 'path';\nimport semver from 'semver';\nimport logger from '@parcel/logger';\nimport nullthrows from 'nullthrows';\nimport ThrowableDiagnostic, {\n  generateJSONCodeHighlights,\n  md,\n} from '@parcel/diagnostic';\nimport {\n  findAlternativeNodeModules,\n  loadConfig,\n  resolveConfig,\n} from '@parcel/utils';\nimport {type ProjectPath, toProjectPath} from './projectPath';\nimport {version as PARCEL_VERSION} from '../package.json';\n\nconst NODE_MODULES = `${path.sep}node_modules${path.sep}`;\nconst CONFIG = Symbol.for('parcel-plugin-config');\n\nexport default async function loadPlugin<T>(\n  pluginName: PackageName,\n  configPath: FilePath,\n  keyPath?: string,\n  options: ParcelOptions,\n): Promise<{|\n  plugin: T,\n  version: Semver,\n  resolveFrom: ProjectPath,\n  range: ?SemverRange,\n|} | null> {\n  let resolveFrom = configPath;\n  let range;\n  let isOptional = false;\n  if (\n    resolveFrom.includes(NODE_MODULES) ||\n    (process.env.PARCEL_BUILD_ENV !== 'production' &&\n      /packages[/\\\\]configs/.test(resolveFrom))\n  ) {\n    // Config packages can reference plugins, but cannot contain other plugins within them.\n    // This forces every published plugin to be published separately so they can be mixed and matched if needed.\n    if (pluginName.startsWith('.')) {\n      let configContents = await options.inputFS.readFile(configPath, 'utf8');\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: md`Local plugins are not supported in Parcel config packages. Please publish \"${pluginName}\" as a separate npm package.`,\n          origin: '@parcel/core',\n          codeFrames: keyPath\n            ? [\n                {\n                  filePath: configPath,\n                  language: 'json5',\n                  code: configContents,\n                  codeHighlights: generateJSONCodeHighlights(configContents, [\n                    {\n                      key: keyPath,\n                      type: 'value',\n                    },\n                  ]),\n                },\n              ]\n            : undefined,\n        },\n      });\n    }\n\n    let configPkg = await loadConfig(\n      options.inputFS,\n      resolveFrom,\n      ['package.json'],\n      options.projectRoot,\n    );\n    if (\n      configPkg != null &&\n      configPkg.config.dependencies?.[pluginName] == null\n    ) {\n      // If not in the config's dependencies, the plugin will be auto installed with\n      // the version declared in \"parcelDependencies\".\n      range = configPkg.config.parcelDependencies?.[pluginName];\n      isOptional =\n        Array.isArray(configPkg.config.optionalParcelDependencies) &&\n        configPkg.config.optionalParcelDependencies.includes(pluginName);\n\n      if (range == null && !isOptional) {\n        let contents = await options.inputFS.readFile(\n          configPkg.files[0].filePath,\n          'utf8',\n        );\n        throw new ThrowableDiagnostic({\n          diagnostic: {\n            message: md`Could not determine version of ${pluginName} in ${path.relative(\n              process.cwd(),\n              resolveFrom,\n            )}. Either include it in \"dependencies\" or \"parcelDependencies\".`,\n            origin: '@parcel/core',\n            codeFrames:\n              configPkg.config.dependencies ||\n              configPkg.config.parcelDependencies\n                ? [\n                    {\n                      filePath: configPkg.files[0].filePath,\n                      language: 'json5',\n                      code: contents,\n                      codeHighlights: generateJSONCodeHighlights(contents, [\n                        {\n                          key: configPkg.config.parcelDependencies\n                            ? '/parcelDependencies'\n                            : '/dependencies',\n                          type: 'key',\n                        },\n                      ]),\n                    },\n                  ]\n                : undefined,\n          },\n        });\n      }\n\n      // Resolve from project root if not in the config's dependencies.\n      resolveFrom = path.join(options.projectRoot, 'index');\n    }\n  }\n\n  let resolved, pkg;\n  try {\n    ({resolved, pkg} = await options.packageManager.resolve(\n      pluginName,\n      resolveFrom,\n      {\n        shouldAutoInstall: options.shouldAutoInstall && !isOptional,\n        range,\n      },\n    ));\n  } catch (err) {\n    if (err.code !== 'MODULE_NOT_FOUND') {\n      throw err;\n    }\n\n    if (isOptional) {\n      return null;\n    }\n\n    let configContents = await options.inputFS.readFile(configPath, 'utf8');\n    let alternatives = await findAlternativeNodeModules(\n      options.inputFS,\n      pluginName,\n      path.dirname(resolveFrom),\n    );\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: md`Cannot find Parcel plugin \"${pluginName}\"`,\n        origin: '@parcel/core',\n        codeFrames: keyPath\n          ? [\n              {\n                filePath: configPath,\n                language: 'json5',\n                code: configContents,\n                codeHighlights: generateJSONCodeHighlights(configContents, [\n                  {\n                    key: keyPath,\n                    type: 'value',\n                    message: md`Cannot find module \"${pluginName}\"${\n                      alternatives[0]\n                        ? `, did you mean \"${alternatives[0]}\"?`\n                        : ''\n                    }`,\n                  },\n                ]),\n              },\n            ]\n          : undefined,\n      },\n    });\n  }\n\n  // Remove plugin version compatiblility validation in canary builds as they don't use semver\n  if (!process.env.SKIP_PLUGIN_COMPATIBILITY_CHECK) {\n    if (!pluginName.startsWith('.')) {\n      // Validate the engines.parcel field in the plugin's package.json\n      let parcelVersionRange = pkg && pkg.engines && pkg.engines.parcel;\n      if (!parcelVersionRange) {\n        logger.warn({\n          origin: '@parcel/core',\n          message: `The plugin \"${pluginName}\" needs to specify a \\`package.json#engines.parcel\\` field with the supported Parcel version range.`,\n        });\n      }\n\n      if (\n        parcelVersionRange &&\n        !semver.satisfies(PARCEL_VERSION, parcelVersionRange)\n      ) {\n        let pkgFile = nullthrows(\n          await resolveConfig(\n            options.inputFS,\n            resolved,\n            ['package.json'],\n            options.projectRoot,\n          ),\n        );\n        let pkgContents = await options.inputFS.readFile(pkgFile, 'utf8');\n        throw new ThrowableDiagnostic({\n          diagnostic: {\n            message: md`The plugin \"${pluginName}\" is not compatible with the current version of Parcel. Requires \"${parcelVersionRange}\" but the current version is \"${PARCEL_VERSION}\".`,\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: pkgFile,\n                language: 'json5',\n                code: pkgContents,\n                codeHighlights: generateJSONCodeHighlights(pkgContents, [\n                  {\n                    key: '/engines/parcel',\n                  },\n                ]),\n              },\n            ],\n          },\n        });\n      }\n    }\n  }\n\n  let plugin = await options.packageManager.require(pluginName, resolveFrom, {\n    shouldAutoInstall: options.shouldAutoInstall,\n  });\n  plugin = plugin.default ? plugin.default : plugin;\n  if (!plugin) {\n    throw new Error(`Plugin ${pluginName} has no exports.`);\n  }\n  plugin = plugin[CONFIG];\n  if (!plugin) {\n    throw new Error(\n      `Plugin ${pluginName} is not a valid Parcel plugin, should export an instance of a Parcel plugin ex. \"export default new Reporter({ ... })\".`,\n    );\n  }\n  return {\n    plugin,\n    version: nullthrows(pkg).version,\n    resolveFrom: toProjectPath(options.projectRoot, resolveFrom),\n    range,\n  };\n}\n"
  },
  {
    "path": "packages/core/core/src/projectPath.js",
    "content": "// @flow strict-local\nimport type {FilePath} from '@parcel/types';\nimport path from 'path';\nimport {relativePath, normalizeSeparators} from '@parcel/utils';\n\n/**\n * A path that's relative to the project root.\n */\nexport opaque type ProjectPath = string;\n\nfunction toProjectPath_(projectRoot: FilePath, p: FilePath): ProjectPath {\n  if (p == null) {\n    return p;\n  }\n\n  // If the file is outside the project root, store an absolute path rather\n  // than a relative one. This way if the project root is moved, the file\n  // references still work. Accessing files outside the project root is not\n  // portable anyway.\n  let relative = relativePath(projectRoot, p, false);\n  if (relative.startsWith('..')) {\n    return process.platform === 'win32' ? normalizeSeparators(p) : p;\n  }\n\n  return relative;\n}\n\nexport const toProjectPath: ((\n  projectRoot: FilePath,\n  p: FilePath,\n) => ProjectPath) &\n  ((projectRoot: FilePath, p: FilePath | void) => ProjectPath | void) &\n  // $FlowFixMe Not sure how to type properly\n  ((projectRoot: FilePath, p: ?FilePath) => ?ProjectPath) = toProjectPath_;\n\nfunction fromProjectPath_(projectRoot: FilePath, p: ?ProjectPath): ?FilePath {\n  if (p == null) {\n    return null;\n  }\n\n  // Project paths use normalized unix separators, so we only need to\n  // convert them on Windows.\n  let projectPath = process.platform === 'win32' ? path.normalize(p) : p;\n\n  // If the path is absolute (e.g. outside the project root), just return it.\n  if (path.isAbsolute(projectPath)) {\n    return projectPath;\n  }\n\n  // Add separator if needed. Doing this manunally is much faster than path.join.\n  if (projectRoot[projectRoot.length - 1] !== path.sep) {\n    return projectRoot + path.sep + projectPath;\n  }\n\n  return projectRoot + projectPath;\n}\n\nexport const fromProjectPath: ((\n  projectRoot: FilePath,\n  p: ProjectPath,\n) => FilePath) &\n  // $FlowFixMe Not sure how to type properly\n  ((projectRoot: FilePath, p: ?ProjectPath) => ?FilePath) = fromProjectPath_;\n\n/**\n * Returns a path relative to the project root. This should be used when computing cache keys\n */\nexport function fromProjectPathRelative(p: ProjectPath): FilePath {\n  return p;\n}\n\n/**\n * This function should be avoided, it doesn't change the actual value.\n */\nexport function toProjectPathUnsafe(p: FilePath): ProjectPath {\n  return p;\n}\n\n/**\n * Joins a project root with relative paths (similar to `path.join`)\n */\nexport function joinProjectPath(\n  a: ProjectPath,\n  ...b: Array<FilePath>\n): ProjectPath {\n  return path.posix.join(a, ...b);\n}\n"
  },
  {
    "path": "packages/core/core/src/public/Asset.js",
    "content": "// @flow strict-local\n\nimport type SourceMap from '@parcel/source-map';\nimport type {Readable} from 'stream';\nimport type {FileSystem} from '@parcel/fs';\n\nimport type {\n  Asset as IAsset,\n  AST,\n  ASTGenerator,\n  Dependency as IDependency,\n  DependencyOptions,\n  Environment as IEnvironment,\n  EnvironmentOptions,\n  FileCreateInvalidation,\n  FilePath,\n  Meta,\n  MutableAsset as IMutableAsset,\n  Stats,\n  MutableAssetSymbols as IMutableAssetSymbols,\n  AssetSymbols as IAssetSymbols,\n  BundleBehavior,\n} from '@parcel/types';\nimport type {Asset as AssetValue, ParcelOptions} from '../types';\n\nimport nullthrows from 'nullthrows';\nimport Environment from './Environment';\nimport {getPublicDependency} from './Dependency';\nimport {AssetSymbols, MutableAssetSymbols} from './Symbols';\nimport UncommittedAsset from '../UncommittedAsset';\nimport CommittedAsset from '../CommittedAsset';\nimport {createEnvironment} from '../Environment';\nimport {fromProjectPath, toProjectPath} from '../projectPath';\nimport {\n  BundleBehavior as BundleBehaviorMap,\n  BundleBehaviorNames,\n} from '../types';\nimport {toInternalSourceLocation} from '../utils';\n\nconst inspect = Symbol.for('nodejs.util.inspect.custom');\n\nconst uncommittedAssetValueToAsset: WeakMap<AssetValue, Asset> = new WeakMap();\nconst committedAssetValueToAsset: WeakMap<AssetValue, Asset> = new WeakMap();\nconst assetValueToMutableAsset: WeakMap<AssetValue, MutableAsset> =\n  new WeakMap();\n\nconst _assetToAssetValue: WeakMap<\n  IAsset | IMutableAsset | BaseAsset,\n  AssetValue,\n> = new WeakMap();\n\nconst _mutableAssetToUncommittedAsset: WeakMap<\n  IMutableAsset,\n  UncommittedAsset,\n> = new WeakMap();\n\nexport function assetToAssetValue(asset: IAsset | IMutableAsset): AssetValue {\n  return nullthrows(_assetToAssetValue.get(asset));\n}\n\nexport function mutableAssetToUncommittedAsset(\n  mutableAsset: IMutableAsset,\n): UncommittedAsset {\n  return nullthrows(_mutableAssetToUncommittedAsset.get(mutableAsset));\n}\n\nexport function assetFromValue(\n  value: AssetValue,\n  options: ParcelOptions,\n): Asset {\n  return new Asset(\n    value.committed\n      ? new CommittedAsset(value, options)\n      : new UncommittedAsset({\n          value,\n          options,\n        }),\n  );\n}\n\nclass BaseAsset {\n  #asset: CommittedAsset | UncommittedAsset;\n  #query /*: ?URLSearchParams */;\n\n  constructor(asset: CommittedAsset | UncommittedAsset) {\n    this.#asset = asset;\n    _assetToAssetValue.set(this, asset.value);\n  }\n\n  // $FlowFixMe[unsupported-syntax]\n  [inspect](): string {\n    return `Asset(${this.filePath})`;\n  }\n\n  get id(): string {\n    return this.#asset.value.id;\n  }\n\n  get type(): string {\n    return this.#asset.value.type;\n  }\n\n  get env(): IEnvironment {\n    return new Environment(this.#asset.value.env, this.#asset.options);\n  }\n\n  get fs(): FileSystem {\n    return this.#asset.options.inputFS;\n  }\n\n  get filePath(): FilePath {\n    return fromProjectPath(\n      this.#asset.options.projectRoot,\n      this.#asset.value.filePath,\n    );\n  }\n\n  get query(): URLSearchParams {\n    if (!this.#query) {\n      this.#query = new URLSearchParams(this.#asset.value.query ?? '');\n    }\n    return this.#query;\n  }\n\n  get meta(): Meta {\n    return this.#asset.value.meta;\n  }\n\n  get bundleBehavior(): ?BundleBehavior {\n    let bundleBehavior = this.#asset.value.bundleBehavior;\n    return bundleBehavior == null ? null : BundleBehaviorNames[bundleBehavior];\n  }\n\n  get isBundleSplittable(): boolean {\n    return this.#asset.value.isBundleSplittable;\n  }\n\n  get isSource(): boolean {\n    return this.#asset.value.isSource;\n  }\n\n  get sideEffects(): boolean {\n    return this.#asset.value.sideEffects;\n  }\n\n  get symbols(): IAssetSymbols {\n    return new AssetSymbols(this.#asset.options, this.#asset.value);\n  }\n\n  get uniqueKey(): ?string {\n    return this.#asset.value.uniqueKey;\n  }\n\n  get astGenerator(): ?ASTGenerator {\n    return this.#asset.value.astGenerator;\n  }\n\n  get pipeline(): ?string {\n    return this.#asset.value.pipeline;\n  }\n\n  getDependencies(): $ReadOnlyArray<IDependency> {\n    return this.#asset\n      .getDependencies()\n      .map(dep => getPublicDependency(dep, this.#asset.options));\n  }\n\n  getCode(): Promise<string> {\n    return this.#asset.getCode();\n  }\n\n  getBuffer(): Promise<Buffer> {\n    return this.#asset.getBuffer();\n  }\n\n  getStream(): Readable {\n    return this.#asset.getStream();\n  }\n\n  getMap(): Promise<?SourceMap> {\n    return this.#asset.getMap();\n  }\n\n  getAST(): Promise<?AST> {\n    return this.#asset.getAST();\n  }\n\n  getMapBuffer(): Promise<?Buffer> {\n    return this.#asset.getMapBuffer();\n  }\n}\n\nexport class Asset extends BaseAsset implements IAsset {\n  #asset /*: CommittedAsset | UncommittedAsset */;\n  #env /*: ?Environment */;\n\n  constructor(asset: CommittedAsset | UncommittedAsset): Asset {\n    let assetValueToAsset = asset.value.committed\n      ? committedAssetValueToAsset\n      : uncommittedAssetValueToAsset;\n    let existing = assetValueToAsset.get(asset.value);\n    if (existing != null) {\n      return existing;\n    }\n\n    super(asset);\n    this.#asset = asset;\n    assetValueToAsset.set(asset.value, this);\n    return this;\n  }\n\n  get env(): IEnvironment {\n    this.#env ??= new Environment(this.#asset.value.env, this.#asset.options);\n    return this.#env;\n  }\n\n  get stats(): Stats {\n    return this.#asset.value.stats;\n  }\n}\n\nexport class MutableAsset extends BaseAsset implements IMutableAsset {\n  #asset /*: UncommittedAsset */;\n\n  constructor(asset: UncommittedAsset): MutableAsset {\n    let existing = assetValueToMutableAsset.get(asset.value);\n    if (existing != null) {\n      return existing;\n    }\n\n    super(asset);\n    this.#asset = asset;\n    assetValueToMutableAsset.set(asset.value, this);\n    _mutableAssetToUncommittedAsset.set(this, asset);\n    return this;\n  }\n\n  setMap(map: ?SourceMap): void {\n    this.#asset.setMap(map);\n  }\n\n  get type(): string {\n    return this.#asset.value.type;\n  }\n\n  set type(type: string): void {\n    if (type !== this.#asset.value.type) {\n      this.#asset.value.type = type;\n      this.#asset.updateId();\n    }\n  }\n\n  get bundleBehavior(): ?BundleBehavior {\n    let bundleBehavior = this.#asset.value.bundleBehavior;\n    return bundleBehavior == null ? null : BundleBehaviorNames[bundleBehavior];\n  }\n\n  set bundleBehavior(bundleBehavior: ?BundleBehavior): void {\n    this.#asset.value.bundleBehavior = bundleBehavior\n      ? BundleBehaviorMap[bundleBehavior]\n      : null;\n  }\n\n  get isBundleSplittable(): boolean {\n    return this.#asset.value.isBundleSplittable;\n  }\n\n  set isBundleSplittable(isBundleSplittable: boolean): void {\n    this.#asset.value.isBundleSplittable = isBundleSplittable;\n  }\n\n  get sideEffects(): boolean {\n    return this.#asset.value.sideEffects;\n  }\n\n  set sideEffects(sideEffects: boolean): void {\n    this.#asset.value.sideEffects = sideEffects;\n  }\n\n  get uniqueKey(): ?string {\n    return this.#asset.value.uniqueKey;\n  }\n\n  set uniqueKey(uniqueKey: ?string): void {\n    if (this.#asset.value.uniqueKey != null) {\n      throw new Error(\n        \"Cannot change an asset's uniqueKey after it has been set.\",\n      );\n    }\n    this.#asset.value.uniqueKey = uniqueKey;\n  }\n\n  get symbols(): IMutableAssetSymbols {\n    return new MutableAssetSymbols(this.#asset.options, this.#asset.value);\n  }\n\n  addDependency(dep: DependencyOptions): string {\n    return this.#asset.addDependency(dep);\n  }\n\n  invalidateOnFileChange(filePath: FilePath): void {\n    this.#asset.invalidateOnFileChange(\n      toProjectPath(this.#asset.options.projectRoot, filePath),\n    );\n  }\n\n  invalidateOnFileCreate(invalidation: FileCreateInvalidation): void {\n    this.#asset.invalidateOnFileCreate(invalidation);\n  }\n\n  invalidateOnEnvChange(env: string): void {\n    this.#asset.invalidateOnEnvChange(env);\n  }\n\n  invalidateOnStartup(): void {\n    this.#asset.invalidateOnStartup();\n  }\n\n  invalidateOnBuild(): void {\n    this.#asset.invalidateOnBuild();\n  }\n\n  isASTDirty(): boolean {\n    return this.#asset.isASTDirty;\n  }\n\n  setBuffer(buffer: Buffer): void {\n    this.#asset.setBuffer(buffer);\n  }\n\n  setCode(code: string): void {\n    this.#asset.setCode(code);\n  }\n\n  setStream(stream: Readable): void {\n    this.#asset.setStream(stream);\n  }\n\n  setAST(ast: AST): void {\n    return this.#asset.setAST(ast);\n  }\n\n  addURLDependency(url: string, opts: $Shape<DependencyOptions>): string {\n    return this.addDependency({\n      specifier: url,\n      specifierType: 'url',\n      priority: 'lazy',\n      ...opts,\n    });\n  }\n\n  setEnvironment(env: EnvironmentOptions): void {\n    this.#asset.value.env = createEnvironment({\n      ...env,\n      loc: toInternalSourceLocation(this.#asset.options.projectRoot, env.loc),\n    });\n    this.#asset.updateId();\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/public/Bundle.js",
    "content": "// @flow strict-local\n\nimport type {\n  Bundle as InternalBundle,\n  ParcelOptions,\n  PackagedBundleInfo,\n} from '../types';\nimport type {\n  Asset as IAsset,\n  Bundle as IBundle,\n  BundleTraversable,\n  Dependency as IDependency,\n  Environment as IEnvironment,\n  GraphVisitor,\n  NamedBundle as INamedBundle,\n  PackagedBundle as IPackagedBundle,\n  Stats,\n  Target as ITarget,\n  BundleBehavior,\n  PackagedBundleFile,\n} from '@parcel/types';\nimport type BundleGraph from '../BundleGraph';\n\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport {DefaultWeakMap} from '@parcel/utils';\n\nimport {assetToAssetValue, assetFromValue} from './Asset';\nimport {mapVisitor} from '@parcel/graph';\nimport Environment from './Environment';\nimport {\n  dependencyToInternalDependency,\n  getPublicDependency,\n} from './Dependency';\nimport Target from './Target';\nimport {BundleBehaviorNames} from '../types';\nimport {fromProjectPath} from '../projectPath';\n\nconst internalBundleToBundle: DefaultWeakMap<\n  ParcelOptions,\n  DefaultWeakMap<BundleGraph, WeakMap<InternalBundle, Bundle>>,\n> = new DefaultWeakMap(() => new DefaultWeakMap(() => new WeakMap()));\nconst internalBundleToNamedBundle: DefaultWeakMap<\n  ParcelOptions,\n  DefaultWeakMap<BundleGraph, WeakMap<InternalBundle, NamedBundle>>,\n> = new DefaultWeakMap(() => new DefaultWeakMap(() => new WeakMap()));\nconst internalBundleToPackagedBundle: DefaultWeakMap<\n  ParcelOptions,\n  DefaultWeakMap<BundleGraph, WeakMap<InternalBundle, PackagedBundle>>,\n> = new DefaultWeakMap(() => new DefaultWeakMap(() => new WeakMap()));\n\n// Friendly access for other modules within this package that need access\n// to the internal bundle.\nconst _bundleToInternalBundle: WeakMap<IBundle, InternalBundle> = new WeakMap();\nexport function bundleToInternalBundle(bundle: IBundle): InternalBundle {\n  return nullthrows(_bundleToInternalBundle.get(bundle));\n}\nconst _bundleToInternalBundleGraph: WeakMap<IBundle, BundleGraph> =\n  new WeakMap();\nexport function bundleToInternalBundleGraph(bundle: IBundle): BundleGraph {\n  return nullthrows(_bundleToInternalBundleGraph.get(bundle));\n}\n\n// Require this private object to be present when invoking these constructors,\n// preventing others from using them. They should use the static `get` method.\nlet _private = {};\n\nexport class Bundle implements IBundle {\n  #bundle /*: InternalBundle */;\n  #bundleGraph /*: BundleGraph */;\n  #options /*: ParcelOptions */;\n\n  constructor(\n    sentinel: mixed,\n    bundle: InternalBundle,\n    bundleGraph: BundleGraph,\n    options: ParcelOptions,\n  ) {\n    if (sentinel !== _private) {\n      throw new Error('Unexpected public usage');\n    }\n\n    this.#bundle = bundle;\n    this.#bundleGraph = bundleGraph;\n    this.#options = options;\n  }\n\n  static get(\n    internalBundle: InternalBundle,\n    bundleGraph: BundleGraph,\n    options: ParcelOptions,\n  ): Bundle {\n    let existingMap = internalBundleToBundle.get(options).get(bundleGraph);\n    let existing = existingMap.get(internalBundle);\n    if (existing != null) {\n      return existing;\n    }\n\n    let bundle = new Bundle(_private, internalBundle, bundleGraph, options);\n    _bundleToInternalBundle.set(bundle, internalBundle);\n    _bundleToInternalBundleGraph.set(bundle, bundleGraph);\n    existingMap.set(internalBundle, bundle);\n\n    return bundle;\n  }\n\n  get id(): string {\n    return this.#bundle.id;\n  }\n\n  get hashReference(): string {\n    return this.#bundle.hashReference;\n  }\n\n  get type(): string {\n    return this.#bundle.type;\n  }\n\n  get env(): IEnvironment {\n    return new Environment(this.#bundle.env, this.#options);\n  }\n\n  get needsStableName(): ?boolean {\n    return this.#bundle.needsStableName;\n  }\n\n  get bundleBehavior(): ?BundleBehavior {\n    let bundleBehavior = this.#bundle.bundleBehavior;\n    return bundleBehavior != null ? BundleBehaviorNames[bundleBehavior] : null;\n  }\n\n  get isSplittable(): ?boolean {\n    return this.#bundle.isSplittable;\n  }\n\n  get manualSharedBundle(): ?string {\n    return this.#bundle.manualSharedBundle;\n  }\n\n  get target(): ITarget {\n    return new Target(this.#bundle.target, this.#options);\n  }\n\n  hasAsset(asset: IAsset): boolean {\n    return this.#bundleGraph.bundleHasAsset(\n      this.#bundle,\n      assetToAssetValue(asset),\n    );\n  }\n\n  hasDependency(dep: IDependency): boolean {\n    return this.#bundleGraph.bundleHasDependency(\n      this.#bundle,\n      dependencyToInternalDependency(dep),\n    );\n  }\n\n  getEntryAssets(): Array<IAsset> {\n    return this.#bundle.entryAssetIds.map(id => {\n      let assetNode = this.#bundleGraph._graph.getNodeByContentKey(id);\n      invariant(assetNode != null && assetNode.type === 'asset');\n      return assetFromValue(assetNode.value, this.#options);\n    });\n  }\n\n  getMainEntry(): ?IAsset {\n    if (this.#bundle.mainEntryId != null) {\n      let assetNode = this.#bundleGraph._graph.getNodeByContentKey(\n        this.#bundle.mainEntryId,\n      );\n      invariant(assetNode != null && assetNode.type === 'asset');\n      return assetFromValue(assetNode.value, this.#options);\n    }\n  }\n\n  traverse<TContext>(\n    visit: GraphVisitor<BundleTraversable, TContext>,\n  ): ?TContext {\n    return this.#bundleGraph.traverseBundle(\n      this.#bundle,\n      mapVisitor(node => {\n        if (node.type === 'asset') {\n          return {\n            type: 'asset',\n            value: assetFromValue(node.value, this.#options),\n          };\n        } else if (node.type === 'dependency') {\n          return {\n            type: 'dependency',\n            value: getPublicDependency(node.value, this.#options),\n          };\n        }\n      }, visit),\n    );\n  }\n\n  traverseAssets<TContext>(\n    visit: GraphVisitor<IAsset, TContext>,\n    startAsset?: IAsset,\n  ): ?TContext {\n    return this.#bundleGraph.traverseAssets(\n      this.#bundle,\n      mapVisitor(asset => assetFromValue(asset, this.#options), visit),\n      startAsset ? assetToAssetValue(startAsset) : undefined,\n    );\n  }\n\n  getContentHash(): string {\n    return this.#bundleGraph.getContentHash(this.#bundle);\n  }\n}\n\nexport class NamedBundle extends Bundle implements INamedBundle {\n  #bundle /*: InternalBundle */;\n  #bundleGraph /*: BundleGraph */;\n  #options /*: ParcelOptions */;\n\n  constructor(\n    sentinel: mixed,\n    bundle: InternalBundle,\n    bundleGraph: BundleGraph,\n    options: ParcelOptions,\n  ) {\n    super(sentinel, bundle, bundleGraph, options);\n    this.#bundle = bundle; // Repeating for flow\n    this.#bundleGraph = bundleGraph; // Repeating for flow\n    this.#options = options;\n  }\n\n  static get(\n    internalBundle: InternalBundle,\n    bundleGraph: BundleGraph,\n    options: ParcelOptions,\n  ): NamedBundle {\n    let existingMap = internalBundleToNamedBundle.get(options).get(bundleGraph);\n    let existing = existingMap.get(internalBundle);\n    if (existing != null) {\n      return existing;\n    }\n\n    let namedBundle = new NamedBundle(\n      _private,\n      internalBundle,\n      bundleGraph,\n      options,\n    );\n    _bundleToInternalBundle.set(namedBundle, internalBundle);\n    _bundleToInternalBundleGraph.set(namedBundle, bundleGraph);\n    existingMap.set(internalBundle, namedBundle);\n\n    return namedBundle;\n  }\n\n  get name(): string {\n    return nullthrows(this.#bundle.name);\n  }\n\n  get displayName(): string {\n    return nullthrows(this.#bundle.displayName);\n  }\n\n  get publicId(): string {\n    return nullthrows(this.#bundle.publicId);\n  }\n}\n\nexport class PackagedBundle extends NamedBundle implements IPackagedBundle {\n  #bundle /*: InternalBundle */;\n  #bundleGraph /*: BundleGraph */;\n  #options /*: ParcelOptions */;\n  #bundleInfo /*: ?PackagedBundleInfo[] */;\n\n  constructor(\n    sentinel: mixed,\n    bundle: InternalBundle,\n    bundleGraph: BundleGraph,\n    options: ParcelOptions,\n  ) {\n    super(sentinel, bundle, bundleGraph, options);\n    this.#bundle = bundle; // Repeating for flow\n    this.#bundleGraph = bundleGraph; // Repeating for flow\n    this.#options = options; // Repeating for flow\n  }\n\n  static get(\n    internalBundle: InternalBundle,\n    bundleGraph: BundleGraph,\n    options: ParcelOptions,\n  ): PackagedBundle {\n    let existingMap = internalBundleToPackagedBundle\n      .get(options)\n      .get(bundleGraph);\n    let existing = existingMap.get(internalBundle);\n    if (existing != null) {\n      return existing;\n    }\n\n    let packagedBundle = new PackagedBundle(\n      _private,\n      internalBundle,\n      bundleGraph,\n      options,\n    );\n    _bundleToInternalBundle.set(packagedBundle, internalBundle);\n    _bundleToInternalBundleGraph.set(packagedBundle, bundleGraph);\n    existingMap.set(internalBundle, packagedBundle);\n\n    return packagedBundle;\n  }\n\n  static getWithInfo(\n    internalBundle: InternalBundle,\n    bundleGraph: BundleGraph,\n    options: ParcelOptions,\n    bundleInfo: ?(PackagedBundleInfo[]),\n  ): PackagedBundle {\n    let packagedBundle = PackagedBundle.get(\n      internalBundle,\n      bundleGraph,\n      options,\n    );\n    packagedBundle.#bundleInfo = bundleInfo;\n    return packagedBundle;\n  }\n\n  get filePath(): string {\n    return fromProjectPath(\n      this.#options.projectRoot,\n      nullthrows(this.#bundleInfo)[0].filePath,\n    );\n  }\n\n  get type(): string {\n    // The bundle type may be overridden in the packager.\n    // However, inline bundles will not have a bundleInfo here since they are not written to the filesystem.\n    return this.#bundleInfo ? this.#bundleInfo[0].type : this.#bundle.type;\n  }\n\n  get stats(): Stats {\n    return nullthrows(this.#bundleInfo)[0].stats;\n  }\n\n  get files(): PackagedBundleFile[] {\n    return this.#bundleInfo\n      ? this.#bundleInfo.map(i => ({\n          filePath: fromProjectPath(this.#options.projectRoot, i.filePath),\n          stats: i.stats,\n        }))\n      : [];\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/public/BundleGraph.js",
    "content": "// @flow strict-local\n\nimport type {\n  Asset as IAsset,\n  Bundle as IBundle,\n  BundleGraph as IBundleGraph,\n  BundleGraphTraversable,\n  BundleGroup as IBundleGroup,\n  Dependency as IDependency,\n  ExportSymbolResolution,\n  FilePath,\n  GraphVisitor,\n  Symbol,\n  SymbolResolution,\n  Target,\n} from '@parcel/types';\nimport type {Bundle as InternalBundle, ParcelOptions} from '../types';\nimport type InternalBundleGraph from '../BundleGraph';\n\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\n\nimport {mapVisitor} from '@parcel/graph';\nimport {assetFromValue, assetToAssetValue, Asset} from './Asset';\nimport {bundleToInternalBundle} from './Bundle';\nimport Dependency, {\n  dependencyToInternalDependency,\n  getPublicDependency,\n} from './Dependency';\nimport {targetToInternalTarget} from './Target';\nimport {fromInternalSourceLocation} from '../utils';\nimport BundleGroup, {bundleGroupToInternalBundleGroup} from './BundleGroup';\n\n// Friendly access for other modules within this package that need access\n// to the internal bundle.\nconst _bundleGraphToInternalBundleGraph: WeakMap<\n  IBundleGraph<IBundle>,\n  InternalBundleGraph,\n> = new WeakMap();\nexport function bundleGraphToInternalBundleGraph(\n  bundleGraph: IBundleGraph<IBundle>,\n): InternalBundleGraph {\n  return nullthrows(_bundleGraphToInternalBundleGraph.get(bundleGraph));\n}\n\ntype BundleFactory<TBundle: IBundle> = (\n  InternalBundle,\n  InternalBundleGraph,\n  ParcelOptions,\n) => TBundle;\n\nexport default class BundleGraph<TBundle: IBundle>\n  implements IBundleGraph<TBundle>\n{\n  #graph: InternalBundleGraph;\n  #options: ParcelOptions;\n  #createBundle: BundleFactory<TBundle>;\n\n  constructor(\n    graph: InternalBundleGraph,\n    createBundle: BundleFactory<TBundle>,\n    options: ParcelOptions,\n  ) {\n    this.#graph = graph;\n    this.#options = options;\n    this.#createBundle = createBundle;\n    // $FlowFixMe\n    _bundleGraphToInternalBundleGraph.set(this, graph);\n  }\n\n  getAssetById(id: string): Asset {\n    return assetFromValue(this.#graph.getAssetById(id), this.#options);\n  }\n\n  getAssetPublicId(asset: IAsset): string {\n    return this.#graph.getAssetPublicId(assetToAssetValue(asset));\n  }\n\n  isDependencySkipped(dep: IDependency): boolean {\n    return this.#graph.isDependencySkipped(dependencyToInternalDependency(dep));\n  }\n\n  getResolvedAsset(dep: IDependency, bundle: ?IBundle): ?IAsset {\n    let resolution = this.#graph.getResolvedAsset(\n      dependencyToInternalDependency(dep),\n      bundle && bundleToInternalBundle(bundle),\n    );\n    if (resolution) {\n      return assetFromValue(resolution, this.#options);\n    }\n  }\n\n  getIncomingDependencies(asset: IAsset): Array<IDependency> {\n    return this.#graph\n      .getIncomingDependencies(assetToAssetValue(asset))\n      .map(dep => getPublicDependency(dep, this.#options));\n  }\n\n  getAssetWithDependency(dep: IDependency): ?IAsset {\n    let asset = this.#graph.getAssetWithDependency(\n      dependencyToInternalDependency(dep),\n    );\n    if (asset) {\n      return assetFromValue(asset, this.#options);\n    }\n  }\n\n  getBundleGroupsContainingBundle(bundle: IBundle): Array<IBundleGroup> {\n    return this.#graph\n      .getBundleGroupsContainingBundle(bundleToInternalBundle(bundle))\n      .map(bundleGroup => new BundleGroup(bundleGroup, this.#options));\n  }\n\n  getReferencedBundles(\n    bundle: IBundle,\n    opts?: {|\n      recursive?: boolean,\n      includeInline?: boolean,\n      includeIsolated?: boolean,\n    |},\n  ): Array<TBundle> {\n    return this.#graph\n      .getReferencedBundles(bundleToInternalBundle(bundle), opts)\n      .map(bundle => this.#createBundle(bundle, this.#graph, this.#options));\n  }\n\n  getReferencingBundles(bundle: IBundle): Array<TBundle> {\n    return this.#graph\n      .getReferencingBundles(bundleToInternalBundle(bundle))\n      .map(bundle => this.#createBundle(bundle, this.#graph, this.#options));\n  }\n\n  resolveAsyncDependency(\n    dependency: IDependency,\n    bundle: ?IBundle,\n  ): ?(\n    | {|type: 'bundle_group', value: IBundleGroup|}\n    | {|type: 'asset', value: IAsset|}\n  ) {\n    let resolved = this.#graph.resolveAsyncDependency(\n      dependencyToInternalDependency(dependency),\n      bundle && bundleToInternalBundle(bundle),\n    );\n\n    if (resolved == null) {\n      return;\n    } else if (resolved.type === 'bundle_group') {\n      return {\n        type: 'bundle_group',\n        value: new BundleGroup(resolved.value, this.#options),\n      };\n    }\n\n    return {\n      type: 'asset',\n      value: assetFromValue(resolved.value, this.#options),\n    };\n  }\n\n  getReferencedBundle(dependency: IDependency, bundle: IBundle): ?TBundle {\n    let result = this.#graph.getReferencedBundle(\n      dependencyToInternalDependency(dependency),\n      bundleToInternalBundle(bundle),\n    );\n\n    if (result != null) {\n      return this.#createBundle(result, this.#graph, this.#options);\n    }\n  }\n\n  getDependencies(asset: IAsset): Array<IDependency> {\n    return this.#graph\n      .getDependencies(assetToAssetValue(asset))\n      .map(dep => getPublicDependency(dep, this.#options));\n  }\n\n  isAssetReachableFromBundle(asset: IAsset, bundle: IBundle): boolean {\n    return this.#graph.isAssetReachableFromBundle(\n      assetToAssetValue(asset),\n      bundleToInternalBundle(bundle),\n    );\n  }\n\n  isAssetReferenced(bundle: IBundle, asset: IAsset): boolean {\n    return this.#graph.isAssetReferenced(\n      bundleToInternalBundle(bundle),\n      assetToAssetValue(asset),\n    );\n  }\n\n  hasParentBundleOfType(bundle: IBundle, type: string): boolean {\n    return this.#graph.hasParentBundleOfType(\n      bundleToInternalBundle(bundle),\n      type,\n    );\n  }\n\n  getBundlesInBundleGroup(\n    bundleGroup: IBundleGroup,\n    opts?: {|\n      recursive?: boolean,\n      includeInline?: boolean,\n      includeIsolated?: boolean,\n    |},\n  ): Array<TBundle> {\n    return this.#graph\n      .getBundlesInBundleGroup(\n        bundleGroupToInternalBundleGroup(bundleGroup),\n        opts,\n      )\n      .map(bundle => this.#createBundle(bundle, this.#graph, this.#options));\n  }\n\n  getBundles(opts?: {|includeInline: boolean|}): Array<TBundle> {\n    return this.#graph\n      .getBundles(opts)\n      .map(bundle => this.#createBundle(bundle, this.#graph, this.#options));\n  }\n\n  isEntryBundleGroup(bundleGroup: IBundleGroup): boolean {\n    return this.#graph.isEntryBundleGroup(\n      bundleGroupToInternalBundleGroup(bundleGroup),\n    );\n  }\n\n  getChildBundles(bundle: IBundle): Array<TBundle> {\n    return this.#graph\n      .getChildBundles(bundleToInternalBundle(bundle))\n      .map(bundle => this.#createBundle(bundle, this.#graph, this.#options));\n  }\n\n  getParentBundles(bundle: IBundle): Array<TBundle> {\n    return this.#graph\n      .getParentBundles(bundleToInternalBundle(bundle))\n      .map(bundle => this.#createBundle(bundle, this.#graph, this.#options));\n  }\n\n  getSymbolResolution(\n    asset: IAsset,\n    symbol: Symbol,\n    boundary: ?IBundle,\n  ): SymbolResolution {\n    let res = this.#graph.getSymbolResolution(\n      assetToAssetValue(asset),\n      symbol,\n      boundary ? bundleToInternalBundle(boundary) : null,\n    );\n    return {\n      asset: assetFromValue(res.asset, this.#options),\n      exportSymbol: res.exportSymbol,\n      symbol: res.symbol,\n      loc: fromInternalSourceLocation(this.#options.projectRoot, res.loc),\n    };\n  }\n\n  getExportedSymbols(\n    asset: IAsset,\n    boundary: ?IBundle,\n  ): Array<ExportSymbolResolution> {\n    let res = this.#graph.getExportedSymbols(\n      assetToAssetValue(asset),\n      boundary ? bundleToInternalBundle(boundary) : null,\n    );\n    return res.map(e => ({\n      asset: assetFromValue(e.asset, this.#options),\n      exportSymbol: e.exportSymbol,\n      symbol: e.symbol,\n      loc: fromInternalSourceLocation(this.#options.projectRoot, e.loc),\n      exportAs: e.exportAs,\n    }));\n  }\n\n  traverse<TContext>(\n    visit: GraphVisitor<BundleGraphTraversable, TContext>,\n    start?: ?IAsset,\n    opts?: ?{|skipUnusedDependencies?: boolean|},\n  ): ?TContext {\n    return this.#graph.traverse(\n      mapVisitor((node, actions) => {\n        // Skipping unused dependencies here is faster than doing an isDependencySkipped check inside the visitor\n        // because the node needs to be re-looked up by id from the hashmap.\n        if (\n          opts?.skipUnusedDependencies &&\n          node.type === 'dependency' &&\n          (node.hasDeferred || node.excluded)\n        ) {\n          actions.skipChildren();\n          return null;\n        }\n        return node.type === 'asset'\n          ? {type: 'asset', value: assetFromValue(node.value, this.#options)}\n          : {\n              type: 'dependency',\n              value: getPublicDependency(node.value, this.#options),\n            };\n      }, visit),\n      start ? assetToAssetValue(start) : undefined,\n    );\n  }\n\n  traverseBundles<TContext>(\n    visit: GraphVisitor<TBundle, TContext>,\n    startBundle: ?IBundle,\n  ): ?TContext {\n    return this.#graph.traverseBundles(\n      mapVisitor(\n        bundle => this.#createBundle(bundle, this.#graph, this.#options),\n        visit,\n      ),\n      startBundle == null ? undefined : bundleToInternalBundle(startBundle),\n    );\n  }\n\n  getBundlesWithAsset(asset: IAsset): Array<TBundle> {\n    return this.#graph\n      .getBundlesWithAsset(assetToAssetValue(asset))\n      .map(bundle => this.#createBundle(bundle, this.#graph, this.#options));\n  }\n\n  getBundlesWithDependency(dependency: IDependency): Array<TBundle> {\n    return this.#graph\n      .getBundlesWithDependency(dependencyToInternalDependency(dependency))\n      .map(bundle => this.#createBundle(bundle, this.#graph, this.#options));\n  }\n\n  getUsedSymbols(v: IAsset | IDependency): ?$ReadOnlySet<Symbol> {\n    if (v instanceof Asset) {\n      return this.#graph.getUsedSymbolsAsset(assetToAssetValue(v));\n    } else {\n      invariant(v instanceof Dependency);\n      return this.#graph.getUsedSymbolsDependency(\n        dependencyToInternalDependency(v),\n      );\n    }\n  }\n\n  getEntryRoot(target: Target): FilePath {\n    return this.#graph.getEntryRoot(\n      this.#options.projectRoot,\n      targetToInternalTarget(target),\n    );\n  }\n\n  getEntryBundles(): Array<TBundle> {\n    return this.#graph\n      .getEntryBundles()\n      .map(b => this.#createBundle(b, this.#graph, this.#options));\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/public/BundleGroup.js",
    "content": "// @flow\nimport type {\n  BundleGroup as IBundleGroup,\n  Target as ITarget,\n} from '@parcel/types';\nimport type {BundleGroup as InternalBundleGroup, ParcelOptions} from '../types';\n\nimport nullthrows from 'nullthrows';\nimport Target from './Target';\n\nconst internalBundleGroupToBundleGroup: WeakMap<\n  InternalBundleGroup,\n  BundleGroup,\n> = new WeakMap();\nconst _bundleGroupToInternalBundleGroup: WeakMap<\n  IBundleGroup,\n  InternalBundleGroup,\n> = new WeakMap();\nexport function bundleGroupToInternalBundleGroup(\n  target: IBundleGroup,\n): InternalBundleGroup {\n  return nullthrows(_bundleGroupToInternalBundleGroup.get(target));\n}\n\nexport default class BundleGroup implements IBundleGroup {\n  #bundleGroup /*: InternalBundleGroup */;\n  #options /*: ParcelOptions */;\n\n  constructor(\n    bundleGroup: InternalBundleGroup,\n    options: ParcelOptions,\n  ): BundleGroup {\n    let existing = internalBundleGroupToBundleGroup.get(bundleGroup);\n    if (existing != null) {\n      return existing;\n    }\n\n    this.#bundleGroup = bundleGroup;\n    this.#options = options;\n    _bundleGroupToInternalBundleGroup.set(this, bundleGroup);\n    internalBundleGroupToBundleGroup.set(bundleGroup, this);\n    return this;\n  }\n\n  get target(): ITarget {\n    return new Target(this.#bundleGroup.target, this.#options);\n  }\n\n  get entryAssetId(): string {\n    return this.#bundleGroup.entryAssetId;\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/public/Config.js",
    "content": "// @flow strict-local\nimport type {\n  Config as IConfig,\n  ConfigResult,\n  FileCreateInvalidation,\n  FilePath,\n  PackageJSON,\n  ConfigResultWithFilePath,\n  DevDepOptions,\n} from '@parcel/types';\nimport type {Config, ParcelOptions} from '../types';\n\nimport invariant from 'assert';\nimport path from 'path';\nimport {\n  DefaultWeakMap,\n  resolveConfig,\n  readConfig,\n  relativePath,\n} from '@parcel/utils';\nimport Environment from './Environment';\nimport {fromProjectPath, toProjectPath} from '../projectPath';\n\nconst internalConfigToConfig: DefaultWeakMap<\n  ParcelOptions,\n  WeakMap<Config, PublicConfig>,\n> = new DefaultWeakMap(() => new WeakMap());\n\nexport default class PublicConfig implements IConfig {\n  #config /*: Config */;\n  #pkg /*: ?PackageJSON */;\n  #pkgFilePath /*: ?FilePath */;\n  #options /*: ParcelOptions */;\n\n  constructor(config: Config, options: ParcelOptions): PublicConfig {\n    let existing = internalConfigToConfig.get(options).get(config);\n    if (existing != null) {\n      return existing;\n    }\n\n    this.#config = config;\n    this.#options = options;\n    internalConfigToConfig.get(options).set(config, this);\n    return this;\n  }\n\n  get env(): Environment {\n    return new Environment(this.#config.env, this.#options);\n  }\n\n  get searchPath(): FilePath {\n    return fromProjectPath(this.#options.projectRoot, this.#config.searchPath);\n  }\n\n  get result(): ConfigResult {\n    return this.#config.result;\n  }\n\n  get isSource(): boolean {\n    return this.#config.isSource;\n  }\n\n  // $FlowFixMe\n  setResult(result: any): void {\n    this.#config.result = result;\n  }\n\n  setCacheKey(cacheKey: string) {\n    this.#config.cacheKey = cacheKey;\n  }\n\n  invalidateOnFileChange(filePath: FilePath) {\n    this.#config.invalidateOnFileChange.add(\n      toProjectPath(this.#options.projectRoot, filePath),\n    );\n  }\n\n  invalidateOnConfigKeyChange(filePath: FilePath, configKey: string) {\n    this.#config.invalidateOnConfigKeyChange.push({\n      filePath: toProjectPath(this.#options.projectRoot, filePath),\n      configKey,\n    });\n  }\n\n  addDevDependency(devDep: DevDepOptions) {\n    this.#config.devDeps.push({\n      ...devDep,\n      resolveFrom: toProjectPath(this.#options.projectRoot, devDep.resolveFrom),\n      additionalInvalidations: devDep.additionalInvalidations?.map(i => ({\n        ...i,\n        resolveFrom: toProjectPath(this.#options.projectRoot, i.resolveFrom),\n      })),\n    });\n  }\n\n  invalidateOnFileCreate(invalidation: FileCreateInvalidation) {\n    if (invalidation.glob != null) {\n      // $FlowFixMe\n      this.#config.invalidateOnFileCreate.push(invalidation);\n    } else if (invalidation.filePath != null) {\n      this.#config.invalidateOnFileCreate.push({\n        filePath: toProjectPath(\n          this.#options.projectRoot,\n          invalidation.filePath,\n        ),\n      });\n    } else {\n      invariant(invalidation.aboveFilePath != null);\n      this.#config.invalidateOnFileCreate.push({\n        // $FlowFixMe\n        fileName: invalidation.fileName,\n        aboveFilePath: toProjectPath(\n          this.#options.projectRoot,\n          invalidation.aboveFilePath,\n        ),\n      });\n    }\n  }\n\n  invalidateOnEnvChange(env: string) {\n    this.#config.invalidateOnEnvChange.add(env);\n  }\n\n  invalidateOnStartup() {\n    this.#config.invalidateOnStartup = true;\n  }\n\n  invalidateOnBuild() {\n    this.#config.invalidateOnBuild = true;\n  }\n\n  async getConfigFrom<T>(\n    searchPath: FilePath,\n    fileNames: Array<string>,\n    options: ?{|\n      packageKey?: string,\n      parse?: boolean,\n      exclude?: boolean,\n    |},\n  ): Promise<?ConfigResultWithFilePath<T>> {\n    let packageKey = options?.packageKey;\n    if (packageKey != null) {\n      let pkg = await this.getConfigFrom(searchPath, ['package.json'], {\n        exclude: true,\n      });\n\n      if (pkg && pkg.contents[packageKey]) {\n        // Invalidate only when the package key changes\n        this.invalidateOnConfigKeyChange(pkg.filePath, packageKey);\n\n        return {\n          contents: pkg.contents[packageKey],\n          filePath: pkg.filePath,\n        };\n      }\n    }\n\n    if (fileNames.length === 0) {\n      return null;\n    }\n\n    // Invalidate when any of the file names are created above the search path.\n    for (let fileName of fileNames) {\n      this.invalidateOnFileCreate({\n        fileName,\n        aboveFilePath: searchPath,\n      });\n    }\n\n    let parse = options && options.parse;\n    let configFilePath = await resolveConfig(\n      this.#options.inputFS,\n      searchPath,\n      fileNames,\n      this.#options.projectRoot,\n    );\n    if (configFilePath == null) {\n      return null;\n    }\n\n    if (!options || !options.exclude) {\n      this.invalidateOnFileChange(configFilePath);\n    }\n\n    // If this is a JavaScript file, load it with the package manager.\n    let extname = path.extname(configFilePath);\n    if (extname === '.js' || extname === '.cjs' || extname === '.mjs') {\n      let specifier = relativePath(path.dirname(searchPath), configFilePath);\n\n      // Add dev dependency so we reload the config and any dependencies in watch mode.\n      this.addDevDependency({\n        specifier,\n        resolveFrom: searchPath,\n      });\n\n      // Invalidate on startup in case the config is non-deterministic,\n      // e.g. uses unknown environment variables, reads from the filesystem, etc.\n      this.invalidateOnStartup();\n\n      let config = await this.#options.packageManager.require(\n        specifier,\n        searchPath,\n      );\n\n      if (\n        // $FlowFixMe\n        Object.prototype.toString.call(config) === '[object Module]' &&\n        config.default != null\n      ) {\n        // Native ESM config. Try to use a default export, otherwise fall back to the whole namespace.\n        config = config.default;\n      }\n\n      return {\n        contents: config,\n        filePath: configFilePath,\n      };\n    }\n\n    let conf = await readConfig(\n      this.#options.inputFS,\n      configFilePath,\n      parse == null ? null : {parse},\n    );\n    if (conf == null) {\n      return null;\n    }\n\n    return {\n      contents: conf.config,\n      filePath: configFilePath,\n    };\n  }\n\n  getConfig<T>(\n    filePaths: Array<FilePath>,\n    options: ?{|\n      packageKey?: string,\n      parse?: boolean,\n      exclude?: boolean,\n    |},\n  ): Promise<?ConfigResultWithFilePath<T>> {\n    return this.getConfigFrom(this.searchPath, filePaths, options);\n  }\n\n  async getPackage(): Promise<?PackageJSON> {\n    if (this.#pkg) {\n      return this.#pkg;\n    }\n\n    let pkgConfig = await this.getConfig<PackageJSON>(['package.json']);\n    if (!pkgConfig) {\n      return null;\n    }\n\n    this.#pkg = pkgConfig.contents;\n    this.#pkgFilePath = pkgConfig.filePath;\n\n    return this.#pkg;\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/public/Dependency.js",
    "content": "// @flow\nimport type {\n  Dependency as IDependency,\n  Environment as IEnvironment,\n  FilePath,\n  Meta,\n  MutableDependencySymbols as IMutableDependencySymbols,\n  SourceLocation,\n  SpecifierType,\n  DependencyPriority,\n  BundleBehavior,\n} from '@parcel/types';\nimport type {Dependency as InternalDependency, ParcelOptions} from '../types';\nimport {BundleBehaviorNames} from '../types';\n\nimport nullthrows from 'nullthrows';\nimport Environment from './Environment';\nimport Target from './Target';\nimport {MutableDependencySymbols} from './Symbols';\nimport {\n  SpecifierType as SpecifierTypeMap,\n  Priority,\n  ExportsCondition,\n} from '../types';\nimport {fromProjectPath} from '../projectPath';\nimport {fromInternalSourceLocation} from '../utils';\n\nconst SpecifierTypeNames = Object.keys(SpecifierTypeMap);\nconst PriorityNames = Object.keys(Priority);\n\nconst inspect = Symbol.for('nodejs.util.inspect.custom');\n\nconst internalDependencyToDependency: WeakMap<InternalDependency, Dependency> =\n  new WeakMap();\nconst _dependencyToInternalDependency: WeakMap<\n  IDependency,\n  InternalDependency,\n> = new WeakMap();\nexport function dependencyToInternalDependency(\n  dependency: IDependency,\n): InternalDependency {\n  return nullthrows(_dependencyToInternalDependency.get(dependency));\n}\n\nexport function getPublicDependency(\n  dep: InternalDependency,\n  options: ParcelOptions,\n): Dependency {\n  let existing = internalDependencyToDependency.get(dep);\n  if (existing != null) {\n    return existing;\n  }\n\n  return new Dependency(dep, options);\n}\n\nexport default class Dependency implements IDependency {\n  #dep /*: InternalDependency */;\n  #options /*: ParcelOptions */;\n\n  constructor(dep: InternalDependency, options: ParcelOptions): Dependency {\n    this.#dep = dep;\n    this.#options = options;\n    _dependencyToInternalDependency.set(this, dep);\n    internalDependencyToDependency.set(dep, this);\n    return this;\n  }\n\n  // $FlowFixMe\n  [inspect](): string {\n    return `Dependency(${String(this.sourcePath)} -> ${this.specifier})`;\n  }\n\n  get id(): string {\n    return this.#dep.id;\n  }\n\n  get specifier(): string {\n    return this.#dep.specifier;\n  }\n\n  get specifierType(): SpecifierType {\n    return SpecifierTypeNames[this.#dep.specifierType];\n  }\n\n  get priority(): DependencyPriority {\n    return PriorityNames[this.#dep.priority];\n  }\n\n  get needsStableName(): boolean {\n    return this.#dep.needsStableName;\n  }\n\n  get bundleBehavior(): ?BundleBehavior {\n    let bundleBehavior = this.#dep.bundleBehavior;\n    return bundleBehavior == null ? null : BundleBehaviorNames[bundleBehavior];\n  }\n\n  get isEntry(): boolean {\n    return this.#dep.isEntry;\n  }\n\n  get isOptional(): boolean {\n    return this.#dep.isOptional;\n  }\n\n  get loc(): ?SourceLocation {\n    return fromInternalSourceLocation(this.#options.projectRoot, this.#dep.loc);\n  }\n\n  get env(): IEnvironment {\n    return new Environment(this.#dep.env, this.#options);\n  }\n\n  get packageConditions(): ?Array<string> {\n    // Merge custom conditions with conditions stored as bitflags.\n    // Order is not important because exports conditions are resolved\n    // in the order they are declared in the package.json.\n    let conditions = this.#dep.customPackageConditions;\n    if (this.#dep.packageConditions) {\n      conditions = conditions ? [...conditions] : [];\n      for (let key in ExportsCondition) {\n        if (this.#dep.packageConditions & ExportsCondition[key]) {\n          conditions.push(key);\n        }\n      }\n    }\n\n    return conditions;\n  }\n\n  get meta(): Meta {\n    return this.#dep.meta;\n  }\n\n  get symbols(): IMutableDependencySymbols {\n    return new MutableDependencySymbols(this.#options, this.#dep);\n  }\n\n  get target(): ?Target {\n    let target = this.#dep.target;\n    return target ? new Target(target, this.#options) : null;\n  }\n\n  get sourceAssetId(): ?string {\n    // TODO: does this need to be public?\n    return this.#dep.sourceAssetId;\n  }\n\n  get sourcePath(): ?FilePath {\n    // TODO: does this need to be public?\n    return fromProjectPath(this.#options.projectRoot, this.#dep.sourcePath);\n  }\n\n  get sourceAssetType(): ?string {\n    return this.#dep.sourceAssetType;\n  }\n\n  get resolveFrom(): ?string {\n    return fromProjectPath(\n      this.#options.projectRoot,\n      this.#dep.resolveFrom ?? this.#dep.sourcePath,\n    );\n  }\n\n  get range(): ?string {\n    return this.#dep.range;\n  }\n\n  get pipeline(): ?string {\n    return this.#dep.pipeline;\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/public/Environment.js",
    "content": "// @flow strict-local\nimport type {\n  Environment as IEnvironment,\n  EnvironmentContext,\n  EnvironmentFeature,\n  Engines,\n  OutputFormat,\n  PackageName,\n  VersionMap,\n  SourceLocation,\n  SourceType,\n  TargetSourceMapOptions,\n} from '@parcel/types';\nimport type {Environment as InternalEnvironment, ParcelOptions} from '../types';\nimport nullthrows from 'nullthrows';\nimport browserslist from 'browserslist';\nimport semver from 'semver';\nimport {fromInternalSourceLocation} from '../utils';\n\nconst inspect = Symbol.for('nodejs.util.inspect.custom');\n\nexport const BROWSER_ENVS: Set<string> = new Set<string>([\n  'browser',\n  'web-worker',\n  'service-worker',\n  'worklet',\n  'electron-renderer',\n  'react-client',\n]);\nconst ELECTRON_ENVS = new Set(['electron-main', 'electron-renderer']);\nconst NODE_ENVS = new Set(['node', 'react-server', ...ELECTRON_ENVS]);\nconst WORKER_ENVS = new Set(['web-worker', 'service-worker']);\nexport const ISOLATED_ENVS: Set<string> = new Set([...WORKER_ENVS, 'worklet']);\nconst SERVER_ENVS = new Set(['node', 'react-server']);\n\nconst ALL_BROWSERS = [\n  'chrome',\n  'and_chr',\n  'edge',\n  'firefox',\n  'and_ff',\n  'safari',\n  'ios',\n  'samsung',\n  'opera',\n  'ie',\n  'op_mini',\n  'blackberry',\n  'op_mob',\n  'ie_mob',\n  'and_uc',\n  'and_qq',\n  'baidu',\n  'kaios',\n];\n\n// See require(\"caniuse-api\").getSupport(<feature name>)\nconst supportData = {\n  esmodules: {\n    edge: '16',\n    firefox: '60',\n    chrome: '61',\n    safari: '10.1',\n    opera: '48',\n    ios: '10.3',\n    android: '76',\n    and_chr: '76',\n    and_ff: '68',\n    samsung: '8.2',\n    and_qq: '10.4',\n    op_mob: '64',\n  },\n  'dynamic-import': {\n    edge: '76',\n    firefox: '67',\n    chrome: '63',\n    safari: '11.1',\n    opera: '50',\n    ios: '11.3',\n    android: '63',\n    and_chr: '63',\n    and_ff: '67',\n    samsung: '8',\n    and_qq: '10.4',\n    op_mob: '64',\n    node: '13.2.0',\n  },\n  'worker-module': {\n    edge: '80',\n    chrome: '80',\n    opera: '67',\n    android: '81',\n    and_chr: '86',\n  },\n  'service-worker-module': {\n    // TODO: Safari 14.1??\n  },\n  'import-meta-url': {\n    edge: '79',\n    firefox: '62',\n    chrome: '64',\n    safari: '11.1',\n    opera: '51',\n    ios: '12',\n    android: '64',\n    and_chr: '64',\n    and_ff: '62',\n    samsung: '9.2',\n    and_qq: '10.4',\n    op_mob: '64',\n    node: '10.4.0',\n  },\n  'import-meta-resolve': {\n    edge: '105',\n    chrome: '105',\n    firefox: '106',\n    safari: '16.4',\n    opera: '91',\n    ios: '16.4',\n    android: '105',\n    and_chr: '105',\n    and_ff: '106',\n    op_mob: '72',\n    samsung: '20.0',\n    node: '20.8.0',\n  },\n  'arrow-functions': {\n    chrome: '47',\n    opera: '34',\n    edge: '13',\n    firefox: '45',\n    safari: '10',\n    node: '6',\n    ios: '10',\n    samsung: '5',\n    electron: '0.36',\n    android: '50',\n    qq: '10.4',\n    baidu: '7.12',\n    kaios: '2.5',\n    and_chr: '50',\n    and_qq: '12.12',\n    op_mob: '64',\n  },\n  'global-this': {\n    chrome: '75',\n    edge: '79',\n    safari: '12.1',\n    firefox: '65',\n    opera: '58',\n    node: '12',\n    and_chr: '71',\n    ios: '12.2',\n    android: '71',\n    samsung: '10.1',\n  },\n};\n\nconst internalEnvironmentToEnvironment: WeakMap<\n  InternalEnvironment,\n  Environment,\n> = new WeakMap();\nconst _environmentToInternalEnvironment: WeakMap<\n  IEnvironment,\n  InternalEnvironment,\n> = new WeakMap();\nexport function environmentToInternalEnvironment(\n  environment: IEnvironment,\n): InternalEnvironment {\n  return nullthrows(_environmentToInternalEnvironment.get(environment));\n}\n\nexport default class Environment implements IEnvironment {\n  #environment /*: InternalEnvironment */;\n  #options /*: ParcelOptions */;\n\n  constructor(env: InternalEnvironment, options: ParcelOptions): Environment {\n    let existing = internalEnvironmentToEnvironment.get(env);\n    if (existing != null) {\n      return existing;\n    }\n\n    this.#environment = env;\n    this.#options = options;\n    _environmentToInternalEnvironment.set(this, env);\n    internalEnvironmentToEnvironment.set(env, this);\n    return this;\n  }\n\n  get id(): string {\n    return this.#environment.id;\n  }\n\n  get context(): EnvironmentContext {\n    return this.#environment.context;\n  }\n\n  get engines(): Engines {\n    return this.#environment.engines;\n  }\n\n  get includeNodeModules():\n    | boolean\n    | Array<PackageName>\n    | {[PackageName]: boolean, ...} {\n    return this.#environment.includeNodeModules;\n  }\n\n  get outputFormat(): OutputFormat {\n    return this.#environment.outputFormat;\n  }\n\n  get sourceType(): SourceType {\n    return this.#environment.sourceType;\n  }\n\n  get isLibrary(): boolean {\n    return this.#environment.isLibrary;\n  }\n\n  get shouldOptimize(): boolean {\n    return this.#environment.shouldOptimize;\n  }\n\n  get shouldScopeHoist(): boolean {\n    return this.#environment.shouldScopeHoist;\n  }\n\n  get sourceMap(): ?TargetSourceMapOptions {\n    return this.#environment.sourceMap;\n  }\n\n  get loc(): ?SourceLocation {\n    return fromInternalSourceLocation(\n      this.#options.projectRoot,\n      this.#environment.loc,\n    );\n  }\n\n  // $FlowFixMe[unsupported-syntax]\n  [inspect](): string {\n    return `Env(${this.#environment.context})`;\n  }\n\n  isBrowser(): boolean {\n    return BROWSER_ENVS.has(this.#environment.context);\n  }\n\n  isNode(): boolean {\n    return NODE_ENVS.has(this.#environment.context);\n  }\n\n  isServer(): boolean {\n    return SERVER_ENVS.has(this.#environment.context);\n  }\n\n  isElectron(): boolean {\n    return ELECTRON_ENVS.has(this.#environment.context);\n  }\n\n  isIsolated(): boolean {\n    return ISOLATED_ENVS.has(this.#environment.context);\n  }\n\n  isWorker(): boolean {\n    return WORKER_ENVS.has(this.#environment.context);\n  }\n\n  isWorklet(): boolean {\n    return this.#environment.context === 'worklet';\n  }\n\n  matchesEngines(\n    minVersions: VersionMap,\n    defaultValue?: boolean = false,\n  ): boolean {\n    // Determine if the environment matches some minimum version requirements.\n    // For browsers, we run a browserslist query with and without the minimum\n    // required browsers and compare the lists. For node, we just check semver.\n    if (this.isBrowser() && this.engines.browsers != null) {\n      let targetBrowsers = this.engines.browsers;\n      let browsers =\n        targetBrowsers != null && !Array.isArray(targetBrowsers)\n          ? [targetBrowsers]\n          : targetBrowsers;\n\n      // If outputting esmodules, exclude browsers without support.\n      if (this.outputFormat === 'esmodule') {\n        browsers = [...browsers, ...getExcludedBrowsers(supportData.esmodules)];\n      }\n\n      let matchedBrowsers = browserslist(browsers);\n      if (matchedBrowsers.length === 0) {\n        return false;\n      }\n\n      let minBrowsers = getExcludedBrowsers(minVersions);\n      let withoutMinBrowsers = browserslist([...browsers, ...minBrowsers]);\n      return matchedBrowsers.length === withoutMinBrowsers.length;\n    } else if (this.isNode() && this.engines.node != null) {\n      return (\n        minVersions.node != null &&\n        !semver.intersects(`< ${minVersions.node}`, this.engines.node)\n      );\n    }\n\n    return defaultValue;\n  }\n\n  supports(feature: EnvironmentFeature, defaultValue?: boolean): boolean {\n    let engines = supportData[feature];\n    if (!engines) {\n      throw new Error('Unknown environment feature: ' + feature);\n    }\n\n    return this.matchesEngines(engines, defaultValue);\n  }\n}\n\nfunction getExcludedBrowsers(minVersions: VersionMap) {\n  let browsers = [];\n  for (let browser of ALL_BROWSERS) {\n    let version = minVersions[browser];\n    if (version) {\n      browsers.push(`not ${browser} < ${version}`);\n    } else {\n      browsers.push(`not ${browser} > 0`);\n    }\n  }\n\n  return browsers;\n}\n"
  },
  {
    "path": "packages/core/core/src/public/MutableBundleGraph.js",
    "content": "// @flow strict-local\n\nimport type {\n  Asset as IAsset,\n  Bundle as IBundle,\n  BundleGroup as IBundleGroup,\n  CreateBundleOpts,\n  Dependency as IDependency,\n  MutableBundleGraph as IMutableBundleGraph,\n  Target,\n} from '@parcel/types';\nimport type {\n  ParcelOptions,\n  BundleGroup as InternalBundleGroup,\n  BundleNode,\n} from '../types';\n\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport {hashString} from '@parcel/rust';\nimport BundleGraph from './BundleGraph';\nimport InternalBundleGraph, {bundleGraphEdgeTypes} from '../BundleGraph';\nimport {Bundle, bundleToInternalBundle} from './Bundle';\nimport {assetFromValue, assetToAssetValue} from './Asset';\nimport {getBundleGroupId, getPublicId} from '../utils';\nimport Dependency, {dependencyToInternalDependency} from './Dependency';\nimport {environmentToInternalEnvironment} from './Environment';\nimport {targetToInternalTarget} from './Target';\nimport {HASH_REF_PREFIX} from '../constants';\nimport {fromProjectPathRelative} from '../projectPath';\nimport {BundleBehavior} from '../types';\nimport BundleGroup, {bundleGroupToInternalBundleGroup} from './BundleGroup';\n\nexport default class MutableBundleGraph\n  extends BundleGraph<IBundle>\n  implements IMutableBundleGraph\n{\n  #graph /*: InternalBundleGraph */;\n  #options /*: ParcelOptions */;\n  #bundlePublicIds /*: Set<string> */ = new Set<string>();\n\n  constructor(graph: InternalBundleGraph, options: ParcelOptions) {\n    super(graph, Bundle.get.bind(Bundle), options);\n    this.#graph = graph;\n    this.#options = options;\n  }\n\n  addAssetToBundle(asset: IAsset, bundle: IBundle) {\n    this.#graph.addAssetToBundle(\n      assetToAssetValue(asset),\n      bundleToInternalBundle(bundle),\n    );\n  }\n\n  addAssetGraphToBundle(\n    asset: IAsset,\n    bundle: IBundle,\n    shouldSkipDependency?: IDependency => boolean,\n  ) {\n    this.#graph.addAssetGraphToBundle(\n      assetToAssetValue(asset),\n      bundleToInternalBundle(bundle),\n      shouldSkipDependency\n        ? d => shouldSkipDependency(new Dependency(d, this.#options))\n        : undefined,\n    );\n  }\n\n  addEntryToBundle(\n    asset: IAsset,\n    bundle: IBundle,\n    shouldSkipDependency?: IDependency => boolean,\n  ) {\n    this.#graph.addEntryToBundle(\n      assetToAssetValue(asset),\n      bundleToInternalBundle(bundle),\n      shouldSkipDependency\n        ? d => shouldSkipDependency(new Dependency(d, this.#options))\n        : undefined,\n    );\n  }\n\n  createBundleGroup(dependency: IDependency, target: Target): IBundleGroup {\n    let dependencyNode = this.#graph._graph.getNodeByContentKey(dependency.id);\n    if (!dependencyNode) {\n      throw new Error('Dependency not found');\n    }\n\n    invariant(dependencyNode.type === 'dependency');\n\n    let resolved = this.#graph.getResolvedAsset(\n      dependencyToInternalDependency(dependency),\n    );\n    if (!resolved) {\n      throw new Error(\n        'Dependency did not resolve to an asset ' + dependency.id,\n      );\n    }\n\n    let bundleGroup: InternalBundleGroup = {\n      target: targetToInternalTarget(target),\n      entryAssetId: resolved.id,\n    };\n\n    let bundleGroupKey = getBundleGroupId(bundleGroup);\n    let bundleGroupNodeId = this.#graph._graph.hasContentKey(bundleGroupKey)\n      ? this.#graph._graph.getNodeIdByContentKey(bundleGroupKey)\n      : this.#graph._graph.addNodeByContentKey(bundleGroupKey, {\n          id: bundleGroupKey,\n          type: 'bundle_group',\n          value: bundleGroup,\n        });\n\n    let dependencyNodeId = this.#graph._graph.getNodeIdByContentKey(\n      dependencyNode.id,\n    );\n    let resolvedNodeId = this.#graph._graph.getNodeIdByContentKey(resolved.id);\n    let assetNodes =\n      this.#graph._graph.getNodeIdsConnectedFrom(dependencyNodeId);\n    this.#graph._graph.addEdge(dependencyNodeId, bundleGroupNodeId);\n    this.#graph._graph.replaceNodeIdsConnectedTo(bundleGroupNodeId, assetNodes);\n    this.#graph._graph.addEdge(\n      dependencyNodeId,\n      resolvedNodeId,\n      bundleGraphEdgeTypes.references,\n    );\n    if (\n      // This check is needed for multiple targets, when we go over the same nodes twice\n      this.#graph._graph.hasEdge(\n        dependencyNodeId,\n        resolvedNodeId,\n        bundleGraphEdgeTypes.null,\n      )\n    ) {\n      //nullEdgeType\n      this.#graph._graph.removeEdge(dependencyNodeId, resolvedNodeId);\n    }\n\n    if (dependency.isEntry) {\n      this.#graph._graph.addEdge(\n        nullthrows(this.#graph._graph.rootNodeId),\n        bundleGroupNodeId,\n        bundleGraphEdgeTypes.bundle,\n      );\n    } else {\n      let inboundBundleNodeIds = this.#graph._graph.getNodeIdsConnectedTo(\n        dependencyNodeId,\n        bundleGraphEdgeTypes.contains,\n      );\n      for (let inboundBundleNodeId of inboundBundleNodeIds) {\n        invariant(\n          this.#graph._graph.getNode(inboundBundleNodeId)?.type === 'bundle',\n        );\n        this.#graph._graph.addEdge(\n          inboundBundleNodeId,\n          bundleGroupNodeId,\n          bundleGraphEdgeTypes.bundle,\n        );\n      }\n    }\n\n    return new BundleGroup(bundleGroup, this.#options);\n  }\n\n  removeBundleGroup(bundleGroup: IBundleGroup): void {\n    this.#graph.removeBundleGroup(\n      bundleGroupToInternalBundleGroup(bundleGroup),\n    );\n  }\n\n  internalizeAsyncDependency(bundle: IBundle, dependency: IDependency): void {\n    this.#graph.internalizeAsyncDependency(\n      bundleToInternalBundle(bundle),\n      dependencyToInternalDependency(dependency),\n    );\n  }\n\n  createBundle(opts: CreateBundleOpts): Bundle {\n    let entryAsset = opts.entryAsset\n      ? assetToAssetValue(opts.entryAsset)\n      : null;\n\n    let target = targetToInternalTarget(opts.target);\n    let bundleId = hashString(\n      'bundle:' +\n        (opts.entryAsset ? opts.entryAsset.id : opts.uniqueKey) +\n        fromProjectPathRelative(target.distDir) +\n        (opts.bundleBehavior ?? ''),\n    );\n\n    let existing = this.#graph._graph.getNodeByContentKey(bundleId);\n    if (existing != null) {\n      invariant(existing.type === 'bundle');\n      return Bundle.get(existing.value, this.#graph, this.#options);\n    }\n\n    let publicId = getPublicId(bundleId, existing =>\n      this.#bundlePublicIds.has(existing),\n    );\n    this.#bundlePublicIds.add(publicId);\n\n    let isPlaceholder = false;\n    if (entryAsset) {\n      let entryAssetNode = this.#graph._graph.getNodeByContentKey(\n        entryAsset.id,\n      );\n      invariant(entryAssetNode?.type === 'asset', 'Entry asset does not exist');\n      isPlaceholder = entryAssetNode.requested === false;\n    }\n\n    let bundleNode: BundleNode = {\n      type: 'bundle',\n      id: bundleId,\n      value: {\n        id: bundleId,\n        hashReference: this.#options.shouldContentHash\n          ? HASH_REF_PREFIX + bundleId\n          : bundleId.slice(-8),\n        type: opts.entryAsset ? opts.entryAsset.type : opts.type,\n        env: opts.env\n          ? environmentToInternalEnvironment(opts.env)\n          : nullthrows(entryAsset).env,\n        entryAssetIds: entryAsset ? [entryAsset.id] : [],\n        mainEntryId: entryAsset?.id,\n        pipeline: opts.entryAsset ? opts.entryAsset.pipeline : opts.pipeline,\n        needsStableName: opts.needsStableName,\n        bundleBehavior:\n          opts.bundleBehavior != null\n            ? BundleBehavior[opts.bundleBehavior]\n            : null,\n        isSplittable: opts.entryAsset\n          ? opts.entryAsset.isBundleSplittable\n          : opts.isSplittable,\n        isPlaceholder,\n        target,\n        name: null,\n        displayName: null,\n        publicId,\n        manualSharedBundle: opts.manualSharedBundle,\n      },\n    };\n\n    let bundleNodeId = this.#graph._graph.addNodeByContentKey(\n      bundleId,\n      bundleNode,\n    );\n\n    if (opts.entryAsset) {\n      this.#graph._graph.addEdge(\n        bundleNodeId,\n        this.#graph._graph.getNodeIdByContentKey(opts.entryAsset.id),\n      );\n    }\n    return Bundle.get(bundleNode.value, this.#graph, this.#options);\n  }\n\n  addBundleToBundleGroup(bundle: IBundle, bundleGroup: IBundleGroup) {\n    this.#graph.addBundleToBundleGroup(\n      bundleToInternalBundle(bundle),\n      bundleGroupToInternalBundleGroup(bundleGroup),\n    );\n  }\n\n  createAssetReference(\n    dependency: IDependency,\n    asset: IAsset,\n    bundle: IBundle,\n  ): void {\n    return this.#graph.createAssetReference(\n      dependencyToInternalDependency(dependency),\n      assetToAssetValue(asset),\n      bundleToInternalBundle(bundle),\n    );\n  }\n\n  createBundleReference(from: IBundle, to: IBundle): void {\n    return this.#graph.createBundleReference(\n      bundleToInternalBundle(from),\n      bundleToInternalBundle(to),\n    );\n  }\n\n  getDependencyAssets(dependency: IDependency): Array<IAsset> {\n    return this.#graph\n      .getDependencyAssets(dependencyToInternalDependency(dependency))\n      .map(asset => assetFromValue(asset, this.#options));\n  }\n\n  getBundleGroupsContainingBundle(bundle: IBundle): Array<IBundleGroup> {\n    return this.#graph\n      .getBundleGroupsContainingBundle(bundleToInternalBundle(bundle))\n      .map(bundleGroup => new BundleGroup(bundleGroup, this.#options));\n  }\n\n  getParentBundlesOfBundleGroup(bundleGroup: IBundleGroup): Array<IBundle> {\n    return this.#graph\n      .getParentBundlesOfBundleGroup(\n        bundleGroupToInternalBundleGroup(bundleGroup),\n      )\n      .map(bundle => Bundle.get(bundle, this.#graph, this.#options));\n  }\n\n  getTotalSize(asset: IAsset): number {\n    return this.#graph.getTotalSize(assetToAssetValue(asset));\n  }\n\n  isAssetReachableFromBundle(asset: IAsset, bundle: IBundle): boolean {\n    return this.#graph.isAssetReachableFromBundle(\n      assetToAssetValue(asset),\n      bundleToInternalBundle(bundle),\n    );\n  }\n\n  removeAssetGraphFromBundle(asset: IAsset, bundle: IBundle) {\n    this.#graph.removeAssetGraphFromBundle(\n      assetToAssetValue(asset),\n      bundleToInternalBundle(bundle),\n    );\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/public/PluginOptions.js",
    "content": "// @flow\nimport type {\n  BuildMode,\n  EnvMap,\n  FilePath,\n  LogLevel,\n  PluginOptions as IPluginOptions,\n  ServerOptions,\n  HMROptions,\n  DetailedReportOptions,\n} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {PackageManager} from '@parcel/package-manager';\nimport type {ParcelOptions} from '../types';\nimport {type FeatureFlags} from '@parcel/feature-flags';\n\nlet parcelOptionsToPluginOptions: WeakMap<ParcelOptions, PluginOptions> =\n  new WeakMap();\n\nexport default class PluginOptions implements IPluginOptions {\n  #options /*: ParcelOptions */;\n\n  constructor(options: ParcelOptions): PluginOptions {\n    let existing = parcelOptionsToPluginOptions.get(options);\n    if (existing != null) {\n      return existing;\n    }\n\n    this.#options = options;\n    parcelOptionsToPluginOptions.set(options, this);\n    return this;\n  }\n\n  get instanceId(): string {\n    return this.#options.instanceId;\n  }\n\n  get mode(): BuildMode {\n    return this.#options.mode;\n  }\n\n  get env(): EnvMap {\n    return this.#options.env;\n  }\n\n  get parcelVersion(): string {\n    return this.#options.parcelVersion;\n  }\n\n  get hmrOptions(): ?HMROptions {\n    return this.#options.hmrOptions;\n  }\n\n  get serveOptions(): ServerOptions | false {\n    return this.#options.serveOptions;\n  }\n\n  get shouldBuildLazily(): boolean {\n    return this.#options.shouldBuildLazily;\n  }\n\n  get shouldAutoInstall(): boolean {\n    return this.#options.shouldAutoInstall;\n  }\n\n  get logLevel(): LogLevel {\n    return this.#options.logLevel;\n  }\n\n  get cacheDir(): FilePath {\n    // TODO: remove this. Probably bad if there are other types of caches.\n    // Maybe expose the Cache object instead?\n    return this.#options.cacheDir;\n  }\n\n  get projectRoot(): FilePath {\n    return this.#options.projectRoot;\n  }\n\n  get inputFS(): FileSystem {\n    return this.#options.inputFS;\n  }\n\n  get outputFS(): FileSystem {\n    return this.#options.outputFS;\n  }\n\n  get packageManager(): PackageManager {\n    return this.#options.packageManager;\n  }\n\n  get detailedReport(): ?DetailedReportOptions {\n    return this.#options.detailedReport;\n  }\n\n  get featureFlags(): FeatureFlags {\n    return this.#options.featureFlags;\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/public/Symbols.js",
    "content": "// @flow\nimport type {\n  Symbol as ISymbol,\n  MutableAssetSymbols as IMutableAssetSymbols,\n  AssetSymbols as IAssetSymbols,\n  MutableDependencySymbols as IMutableDependencySymbols,\n  SourceLocation,\n  Meta,\n} from '@parcel/types';\nimport type {Asset, Dependency, ParcelOptions} from '../types';\n\nimport nullthrows from 'nullthrows';\nimport {fromInternalSourceLocation, toInternalSourceLocation} from '../utils';\n\nconst EMPTY_ITERABLE = {\n  [Symbol.iterator]() {\n    return EMPTY_ITERATOR;\n  },\n};\n\nconst EMPTY_ITERATOR = {\n  next() {\n    return {done: true};\n  },\n};\n\nconst inspect = Symbol.for('nodejs.util.inspect.custom');\n\nlet valueToSymbols: WeakMap<Asset, AssetSymbols> = new WeakMap();\nexport class AssetSymbols implements IAssetSymbols {\n  /*::\n  @@iterator(): Iterator<[ISymbol, {|local: ISymbol, loc: ?SourceLocation, meta?: ?Meta|}]> { return ({}: any); }\n  */\n  #value: Asset;\n  #options: ParcelOptions;\n\n  constructor(options: ParcelOptions, asset: Asset): AssetSymbols {\n    let existing = valueToSymbols.get(asset);\n    if (existing != null) {\n      return existing;\n    }\n\n    this.#value = asset;\n    this.#options = options;\n    valueToSymbols.set(asset, this);\n    return this;\n  }\n\n  hasExportSymbol(exportSymbol: ISymbol): boolean {\n    return Boolean(this.#value.symbols?.has(exportSymbol));\n  }\n\n  hasLocalSymbol(local: ISymbol): boolean {\n    if (this.#value.symbols == null) {\n      return false;\n    }\n    for (let s of this.#value.symbols.values()) {\n      if (local === s.local) return true;\n    }\n    return false;\n  }\n\n  get(\n    exportSymbol: ISymbol,\n  ): ?{|local: ISymbol, loc: ?SourceLocation, meta?: ?Meta|} {\n    return fromInternalAssetSymbol(\n      this.#options.projectRoot,\n      this.#value.symbols?.get(exportSymbol),\n    );\n  }\n\n  get isCleared(): boolean {\n    return this.#value.symbols == null;\n  }\n\n  exportSymbols(): Iterable<ISymbol> {\n    return this.#value.symbols?.keys() ?? [];\n  }\n  // $FlowFixMe\n  [Symbol.iterator]() {\n    return this.#value.symbols\n      ? this.#value.symbols[Symbol.iterator]()\n      : EMPTY_ITERATOR;\n  }\n\n  // $FlowFixMe\n  [inspect]() {\n    return `AssetSymbols(${\n      this.#value.symbols\n        ? [...this.#value.symbols]\n            .map(([s, {local}]) => `${s}:${local}`)\n            .join(', ')\n        : null\n    })`;\n  }\n}\n\nlet valueToMutableAssetSymbols: WeakMap<Asset, MutableAssetSymbols> =\n  new WeakMap();\nexport class MutableAssetSymbols implements IMutableAssetSymbols {\n  /*::\n  @@iterator(): Iterator<[ISymbol, {|local: ISymbol, loc: ?SourceLocation, meta?: ?Meta|}]> { return ({}: any); }\n  */\n  #value: Asset;\n  #options: ParcelOptions;\n\n  constructor(options: ParcelOptions, asset: Asset): MutableAssetSymbols {\n    let existing = valueToMutableAssetSymbols.get(asset);\n    if (existing != null) {\n      return existing;\n    }\n    this.#value = asset;\n    this.#options = options;\n    return this;\n  }\n\n  // immutable\n\n  hasExportSymbol(exportSymbol: ISymbol): boolean {\n    return Boolean(this.#value.symbols?.has(exportSymbol));\n  }\n\n  hasLocalSymbol(local: ISymbol): boolean {\n    if (this.#value.symbols == null) {\n      return false;\n    }\n    for (let s of this.#value.symbols.values()) {\n      if (local === s.local) return true;\n    }\n    return false;\n  }\n\n  get(\n    exportSymbol: ISymbol,\n  ): ?{|local: ISymbol, loc: ?SourceLocation, meta?: ?Meta|} {\n    return fromInternalAssetSymbol(\n      this.#options.projectRoot,\n      this.#value.symbols?.get(exportSymbol),\n    );\n  }\n\n  get isCleared(): boolean {\n    return this.#value.symbols == null;\n  }\n\n  exportSymbols(): Iterable<ISymbol> {\n    // $FlowFixMe\n    return this.#value.symbols.keys();\n  }\n  // $FlowFixMe\n  [Symbol.iterator]() {\n    return this.#value.symbols\n      ? this.#value.symbols[Symbol.iterator]()\n      : EMPTY_ITERATOR;\n  }\n\n  // $FlowFixMe\n  [inspect]() {\n    return `MutableAssetSymbols(${\n      this.#value.symbols\n        ? [...this.#value.symbols]\n            .map(([s, {local}]) => `${s}:${local}`)\n            .join(', ')\n        : null\n    })`;\n  }\n\n  // mutating\n\n  ensure(): void {\n    if (this.#value.symbols == null) {\n      this.#value.symbols = new Map();\n    }\n  }\n\n  set(\n    exportSymbol: ISymbol,\n    local: ISymbol,\n    loc: ?SourceLocation,\n    meta: ?Meta,\n  ) {\n    nullthrows(this.#value.symbols).set(exportSymbol, {\n      local,\n      loc: toInternalSourceLocation(this.#options.projectRoot, loc),\n      meta,\n    });\n  }\n\n  delete(exportSymbol: ISymbol) {\n    nullthrows(this.#value.symbols).delete(exportSymbol);\n  }\n}\n\nlet valueToMutableDependencySymbols: WeakMap<\n  Dependency,\n  MutableDependencySymbols,\n> = new WeakMap();\nexport class MutableDependencySymbols implements IMutableDependencySymbols {\n  /*::\n  @@iterator(): Iterator<[ISymbol, {|local: ISymbol, loc: ?SourceLocation, isWeak: boolean, meta?: ?Meta|}]> { return ({}: any); }\n  */\n  #value: Dependency;\n  #options: ParcelOptions;\n\n  constructor(\n    options: ParcelOptions,\n    dep: Dependency,\n  ): MutableDependencySymbols {\n    let existing = valueToMutableDependencySymbols.get(dep);\n    if (existing != null) {\n      return existing;\n    }\n    this.#value = dep;\n    this.#options = options;\n    return this;\n  }\n\n  // immutable:\n\n  hasExportSymbol(exportSymbol: ISymbol): boolean {\n    return Boolean(this.#value.symbols?.has(exportSymbol));\n  }\n\n  hasLocalSymbol(local: ISymbol): boolean {\n    if (this.#value.symbols) {\n      for (let s of this.#value.symbols.values()) {\n        if (local === s.local) return true;\n      }\n    }\n    return false;\n  }\n\n  get(\n    exportSymbol: ISymbol,\n  ): ?{|local: ISymbol, loc: ?SourceLocation, isWeak: boolean, meta?: ?Meta|} {\n    return fromInternalDependencySymbol(\n      this.#options.projectRoot,\n      nullthrows(this.#value.symbols).get(exportSymbol),\n    );\n  }\n\n  get isCleared(): boolean {\n    return this.#value.symbols == null;\n  }\n\n  exportSymbols(): Iterable<ISymbol> {\n    // $FlowFixMe\n    return this.#value.symbols ? this.#value.symbols.keys() : EMPTY_ITERABLE;\n  }\n\n  // $FlowFixMe\n  [Symbol.iterator]() {\n    return this.#value.symbols\n      ? this.#value.symbols[Symbol.iterator]()\n      : EMPTY_ITERATOR;\n  }\n\n  // $FlowFixMe\n  [inspect]() {\n    return `MutableDependencySymbols(${\n      this.#value.symbols\n        ? [...this.#value.symbols]\n            .map(([s, {local, isWeak}]) => `${s}:${local}${isWeak ? '?' : ''}`)\n            .join(', ')\n        : null\n    })`;\n  }\n\n  // mutating:\n\n  ensure(): void {\n    if (this.#value.symbols == null) {\n      this.#value.symbols = new Map();\n    }\n  }\n\n  set(\n    exportSymbol: ISymbol,\n    local: ISymbol,\n    loc: ?SourceLocation,\n    isWeak: ?boolean,\n  ) {\n    let symbols = nullthrows(this.#value.symbols);\n    symbols.set(exportSymbol, {\n      local,\n      loc: toInternalSourceLocation(this.#options.projectRoot, loc),\n      isWeak: (symbols.get(exportSymbol)?.isWeak ?? true) && (isWeak ?? false),\n    });\n  }\n\n  delete(exportSymbol: ISymbol) {\n    nullthrows(this.#value.symbols).delete(exportSymbol);\n  }\n}\n\nfunction fromInternalAssetSymbol(projectRoot: string, value) {\n  return (\n    value && {\n      local: value.local,\n      meta: value.meta,\n      loc: fromInternalSourceLocation(projectRoot, value.loc),\n    }\n  );\n}\n\nfunction fromInternalDependencySymbol(projectRoot: string, value) {\n  return (\n    value && {\n      local: value.local,\n      meta: value.meta,\n      isWeak: value.isWeak,\n      loc: fromInternalSourceLocation(projectRoot, value.loc),\n    }\n  );\n}\n"
  },
  {
    "path": "packages/core/core/src/public/Target.js",
    "content": "// @flow\nimport type {\n  FilePath,\n  Target as ITarget,\n  Environment as IEnvironment,\n  SourceLocation,\n} from '@parcel/types';\nimport type {Target as TargetValue, ParcelOptions} from '../types';\n\nimport nullthrows from 'nullthrows';\nimport Environment from './Environment';\nimport {fromProjectPath} from '../projectPath';\nimport {fromInternalSourceLocation} from '../utils';\n\nconst inspect = Symbol.for('nodejs.util.inspect.custom');\n\nconst internalTargetToTarget: WeakMap<TargetValue, Target> = new WeakMap();\nconst _targetToInternalTarget: WeakMap<ITarget, TargetValue> = new WeakMap();\nexport function targetToInternalTarget(target: ITarget): TargetValue {\n  return nullthrows(_targetToInternalTarget.get(target));\n}\n\nexport default class Target implements ITarget {\n  #target /*: TargetValue */;\n  #options /*: ParcelOptions */;\n\n  constructor(target: TargetValue, options: ParcelOptions): Target {\n    let existing = internalTargetToTarget.get(target);\n    if (existing != null) {\n      return existing;\n    }\n\n    this.#target = target;\n    this.#options = options;\n    _targetToInternalTarget.set(this, target);\n    internalTargetToTarget.set(target, this);\n    return this;\n  }\n\n  get distEntry(): ?FilePath {\n    return this.#target.distEntry;\n  }\n\n  get distDir(): FilePath {\n    return fromProjectPath(this.#options.projectRoot, this.#target.distDir);\n  }\n\n  get env(): IEnvironment {\n    return new Environment(this.#target.env, this.#options);\n  }\n\n  get name(): string {\n    return this.#target.name;\n  }\n\n  get publicUrl(): string {\n    return this.#target.publicUrl;\n  }\n\n  get loc(): ?SourceLocation {\n    return fromInternalSourceLocation(\n      this.#options.projectRoot,\n      this.#target.loc,\n    );\n  }\n\n  // $FlowFixMe[unsupported-syntax]\n  [inspect](): string {\n    return `Target(${this.name} - ${this.env[inspect]()})`;\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/registerCoreWithSerializer.js",
    "content": "// @flow\nimport {Graph} from '@parcel/graph';\nimport {registerSerializableClass} from './serializer';\nimport AssetGraph from './AssetGraph';\nimport BundleGraph from './BundleGraph';\nimport ParcelConfig from './ParcelConfig';\nimport {RequestGraph} from './RequestTracker';\nimport Config from './public/Config';\nimport packageJson from '../package.json';\n\nlet coreRegistered;\nexport function registerCoreWithSerializer() {\n  if (coreRegistered) {\n    return;\n  }\n  const packageVersion: mixed = packageJson.version;\n  if (typeof packageVersion !== 'string') {\n    throw new Error('Expected package version to be a string');\n  }\n\n  // $FlowFixMe[incompatible-cast]\n  for (let [name, ctor] of (Object.entries({\n    AssetGraph,\n    Config,\n    BundleGraph,\n    Graph,\n    ParcelConfig,\n    RequestGraph,\n    // $FlowFixMe[unclear-type]\n  }): Array<[string, Class<any>]>)) {\n    registerSerializableClass(packageVersion + ':' + name, ctor);\n  }\n  coreRegistered = true;\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/AssetGraphRequest.js",
    "content": "// @flow strict-local\n\nimport type {NodeId} from '@parcel/graph';\nimport type {Async} from '@parcel/types';\nimport type {SharedReference} from '@parcel/workers';\nimport type {\n  Asset,\n  AssetGroup,\n  AssetRequestInput,\n  Dependency,\n  Entry,\n  ParcelOptions,\n  Target,\n} from '../types';\nimport type {StaticRunOpts, RunAPI} from '../RequestTracker';\nimport type {EntryRequestResult} from './EntryRequest';\nimport type {PathRequestInput} from './PathRequest';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport logger from '@parcel/logger';\n\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport {PromiseQueue, setEqual} from '@parcel/utils';\nimport {hashString} from '@parcel/rust';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport {Priority} from '../types';\nimport AssetGraph from '../AssetGraph';\nimport {PARCEL_VERSION} from '../constants';\nimport createEntryRequest from './EntryRequest';\nimport createTargetRequest from './TargetRequest';\nimport createAssetRequest from './AssetRequest';\nimport createPathRequest from './PathRequest';\nimport {type ProjectPath, fromProjectPathRelative} from '../projectPath';\nimport dumpGraphToGraphViz from '../dumpGraphToGraphViz';\nimport {propagateSymbols} from '../SymbolPropagation';\nimport {requestTypes} from '../RequestTracker';\n\nexport type AssetGraphRequestInput = {|\n  entries?: Array<ProjectPath>,\n  assetGroups?: Array<AssetGroup>,\n  optionsRef: SharedReference,\n  name: string,\n  shouldBuildLazily?: boolean,\n  lazyIncludes?: RegExp[],\n  lazyExcludes?: RegExp[],\n  requestedAssetIds?: Set<string>,\n|};\n\nexport type AssetGraphRequestResult = {|\n  assetGraph: AssetGraph,\n  /** Assets added/modified since the last successful build. */\n  changedAssets: Map<string, Asset>,\n  /** Assets added/modified since the last symbol propagation invocation. */\n  changedAssetsPropagation: Set<string>,\n  assetGroupsWithRemovedParents: ?Set<NodeId>,\n  previousSymbolPropagationErrors: ?Map<NodeId, Array<Diagnostic>>,\n  assetRequests: Array<AssetGroup>,\n|};\n\ntype RunInput = {|\n  input: AssetGraphRequestInput,\n  ...StaticRunOpts<AssetGraphRequestResult>,\n|};\n\ntype AssetGraphRequest = {|\n  id: string,\n  +type: typeof requestTypes.asset_graph_request,\n  run: RunInput => Async<AssetGraphRequestResult>,\n  input: AssetGraphRequestInput,\n|};\n\nexport default function createAssetGraphRequest(\n  requestInput: AssetGraphRequestInput,\n): AssetGraphRequest {\n  return {\n    type: requestTypes.asset_graph_request,\n    id: requestInput.name,\n    run: async input => {\n      let prevResult =\n        await input.api.getPreviousResult<AssetGraphRequestResult>();\n\n      let builder = new AssetGraphBuilder(input, prevResult);\n      let assetGraphRequest = await await builder.build();\n\n      // early break for incremental bundling if production or flag is off;\n      if (\n        !input.options.shouldBundleIncrementally ||\n        input.options.mode === 'production'\n      ) {\n        assetGraphRequest.assetGraph.safeToIncrementallyBundle = false;\n      }\n\n      return assetGraphRequest;\n    },\n    input: requestInput,\n  };\n}\n\nconst typesWithRequests = new Set([\n  'entry_specifier',\n  'entry_file',\n  'dependency',\n  'asset_group',\n]);\n\nexport class AssetGraphBuilder {\n  assetGraph: AssetGraph;\n  assetRequests: Array<AssetGroup> = [];\n  queue: PromiseQueue<mixed>;\n  changedAssets: Map<string, Asset>;\n  changedAssetsPropagation: Set<string>;\n  prevChangedAssetsPropagation: ?Set<string>;\n  optionsRef: SharedReference;\n  options: ParcelOptions;\n  api: RunAPI<AssetGraphRequestResult>;\n  name: string;\n  cacheKey: string;\n  shouldBuildLazily: boolean;\n  lazyIncludes: RegExp[];\n  lazyExcludes: RegExp[];\n  requestedAssetIds: Set<string>;\n  isSingleChangeRebuild: boolean;\n  assetGroupsWithRemovedParents: Set<NodeId>;\n  previousSymbolPropagationErrors: Map<NodeId, Array<Diagnostic>>;\n\n  constructor(\n    {input, api, options}: RunInput,\n    prevResult: ?AssetGraphRequestResult,\n  ) {\n    let {\n      entries,\n      assetGroups,\n      optionsRef,\n      name,\n      requestedAssetIds,\n      shouldBuildLazily,\n      lazyIncludes,\n      lazyExcludes,\n    } = input;\n    let assetGraph = prevResult?.assetGraph ?? new AssetGraph();\n    assetGraph.safeToIncrementallyBundle = true;\n    assetGraph.setRootConnections({\n      entries,\n      assetGroups,\n    });\n    assetGraph.undeferredDependencies.clear();\n    this.assetGroupsWithRemovedParents =\n      prevResult?.assetGroupsWithRemovedParents ?? new Set();\n    this.previousSymbolPropagationErrors =\n      prevResult?.previousSymbolPropagationErrors ?? new Map();\n    this.changedAssets = prevResult?.changedAssets ?? new Map();\n    this.changedAssetsPropagation = new Set();\n    this.prevChangedAssetsPropagation = prevResult?.changedAssetsPropagation;\n\n    this.assetGraph = assetGraph;\n    this.optionsRef = optionsRef;\n    this.options = options;\n    this.api = api;\n    this.name = name;\n    this.requestedAssetIds = requestedAssetIds ?? new Set();\n    this.shouldBuildLazily = shouldBuildLazily ?? false;\n    this.lazyIncludes = lazyIncludes ?? [];\n    this.lazyExcludes = lazyExcludes ?? [];\n    this.cacheKey =\n      hashString(\n        `${PARCEL_VERSION}${name}${JSON.stringify(entries) ?? ''}${\n          options.mode\n        }${options.shouldBuildLazily ? 'lazy' : 'eager'}`,\n      ) + '-AssetGraph';\n\n    this.isSingleChangeRebuild =\n      api\n        .getInvalidSubRequests()\n        .filter(req => req.requestType === 'asset_request').length === 1;\n    this.queue = new PromiseQueue();\n\n    assetGraph.onNodeRemoved = nodeId => {\n      this.assetGroupsWithRemovedParents.delete(nodeId);\n\n      // This needs to mark all connected nodes that doesn't become orphaned\n      // due to replaceNodesConnectedTo to make sure that the symbols of\n      // nodes from which at least one parent was removed are updated.\n      let node = nullthrows(assetGraph.getNode(nodeId));\n      if (assetGraph.isOrphanedNode(nodeId) && node.type === 'dependency') {\n        let children = assetGraph.getNodeIdsConnectedFrom(nodeId);\n        for (let child of children) {\n          let childNode = nullthrows(assetGraph.getNode(child));\n          invariant(\n            childNode.type === 'asset_group' || childNode.type === 'asset',\n          );\n          childNode.usedSymbolsDownDirty = true;\n          this.assetGroupsWithRemovedParents.add(child);\n        }\n      }\n    };\n  }\n\n  async build(): Promise<AssetGraphRequestResult> {\n    let errors = [];\n    let rootNodeId = nullthrows(\n      this.assetGraph.rootNodeId,\n      'A root node is required to traverse',\n    );\n\n    let visitedAssetGroups = new Set();\n    let visited = new Set([rootNodeId]);\n\n    const visit = (nodeId: NodeId) => {\n      if (errors.length > 0) {\n        return;\n      }\n\n      if (this.shouldSkipRequest(nodeId)) {\n        visitChildren(nodeId);\n      } else {\n        // ? do we need to visit children inside of the promise that is queued?\n        this.queueCorrespondingRequest(nodeId, errors).then(() =>\n          visitChildren(nodeId),\n        );\n      }\n    };\n\n    const visitChildren = (nodeId: NodeId) => {\n      for (let childNodeId of this.assetGraph.getNodeIdsConnectedFrom(nodeId)) {\n        let child = nullthrows(this.assetGraph.getNode(childNodeId));\n        if (\n          (!visited.has(childNodeId) || child.hasDeferred) &&\n          this.shouldVisitChild(nodeId, childNodeId)\n        ) {\n          if (child.type === 'asset_group') {\n            visitedAssetGroups.add(childNodeId);\n          }\n\n          visited.add(childNodeId);\n          visit(childNodeId);\n        }\n      }\n    };\n\n    visit(rootNodeId);\n    await this.queue.run();\n\n    logger.verbose({\n      origin: '@parcel/core',\n      message: 'Asset graph walked',\n      meta: {\n        visitedAssetGroupsCount: visitedAssetGroups.size,\n      },\n    });\n\n    if (this.prevChangedAssetsPropagation) {\n      // Add any previously seen Assets that have not been propagated yet to\n      // 'this.changedAssetsPropagation', but only if they still remain in the graph\n      // as they could have been removed since the last build\n      for (let assetId of this.prevChangedAssetsPropagation) {\n        if (this.assetGraph.hasContentKey(assetId)) {\n          this.changedAssetsPropagation.add(assetId);\n        }\n      }\n    }\n\n    if (errors.length) {\n      this.api.storeResult(\n        {\n          assetGraph: this.assetGraph,\n          changedAssets: this.changedAssets,\n          changedAssetsPropagation: this.changedAssetsPropagation,\n          assetGroupsWithRemovedParents: this.assetGroupsWithRemovedParents,\n          previousSymbolPropagationErrors: undefined,\n          assetRequests: [],\n        },\n        this.cacheKey,\n      );\n\n      // TODO: eventually support multiple errors since requests could reject in parallel\n      throw errors[0];\n    }\n\n    if (this.assetGraph.nodes.length > 1) {\n      await dumpGraphToGraphViz(\n        this.assetGraph,\n        'AssetGraph_' + this.name + '_before_prop',\n      );\n      try {\n        let errors = propagateSymbols({\n          options: this.options,\n          assetGraph: this.assetGraph,\n          changedAssetsPropagation: this.changedAssetsPropagation,\n          assetGroupsWithRemovedParents: this.assetGroupsWithRemovedParents,\n          previousErrors: this.previousSymbolPropagationErrors,\n        });\n        this.changedAssetsPropagation.clear();\n\n        if (errors.size > 0) {\n          this.api.storeResult(\n            {\n              assetGraph: this.assetGraph,\n              changedAssets: this.changedAssets,\n              changedAssetsPropagation: this.changedAssetsPropagation,\n              assetGroupsWithRemovedParents: this.assetGroupsWithRemovedParents,\n              previousSymbolPropagationErrors: errors,\n              assetRequests: [],\n            },\n            this.cacheKey,\n          );\n\n          // Just throw the first error. Since errors can bubble (e.g. reexporting a reexported symbol also fails),\n          // determining which failing export is the root cause is nontrivial (because of circular dependencies).\n          throw new ThrowableDiagnostic({\n            diagnostic: [...errors.values()][0],\n          });\n        }\n      } catch (e) {\n        await dumpGraphToGraphViz(\n          this.assetGraph,\n          'AssetGraph_' + this.name + '_failed',\n        );\n        throw e;\n      }\n    }\n    await dumpGraphToGraphViz(this.assetGraph, 'AssetGraph_' + this.name);\n\n    this.api.storeResult(\n      {\n        assetGraph: this.assetGraph,\n        changedAssets: new Map(),\n        changedAssetsPropagation: this.changedAssetsPropagation,\n        assetGroupsWithRemovedParents: undefined,\n        previousSymbolPropagationErrors: undefined,\n        assetRequests: [],\n      },\n      this.cacheKey,\n    );\n\n    return {\n      assetGraph: this.assetGraph,\n      changedAssets: this.changedAssets,\n      changedAssetsPropagation: this.changedAssetsPropagation,\n      assetGroupsWithRemovedParents: undefined,\n      previousSymbolPropagationErrors: undefined,\n      assetRequests: this.assetRequests,\n    };\n  }\n\n  shouldVisitChild(nodeId: NodeId, childNodeId: NodeId): boolean {\n    if (this.shouldBuildLazily) {\n      let node = nullthrows(this.assetGraph.getNode(nodeId));\n      let childNode = nullthrows(this.assetGraph.getNode(childNodeId));\n\n      if (node.type === 'asset' && childNode.type === 'dependency') {\n        // This logic will set `node.requested` to `true` if the node is in the list of requested asset ids\n        // (i.e. this is an entry of a (probably) placeholder bundle that wasn't previously requested)\n        //\n        // Otherwise, if this node either is explicitly not requested, or has had it's requested attribute deleted,\n        // it will determine whether this node is an \"async child\" - that is, is it a (probably)\n        // dynamic import(). If so, it will explicitly have it's `node.requested` set to `false`\n        //\n        // If it's not requested, but it's not an async child then it's `node.requested` is deleted (undefined)\n\n        // by default with lazy compilation all nodes are lazy\n        let isNodeLazy = true;\n\n        // For conditional lazy building - if this node matches the `lazyInclude` globs that means we want\n        // only those nodes to be treated as lazy - that means if this node does _NOT_ match that glob, then we\n        // also consider it not lazy (so it gets marked as requested).\n        const relativePath = fromProjectPathRelative(node.value.filePath);\n        if (this.lazyIncludes.length > 0) {\n          isNodeLazy = this.lazyIncludes.some(lazyIncludeRegex =>\n            relativePath.match(lazyIncludeRegex),\n          );\n        }\n        // Excludes override includes, so a node is _not_ lazy if it is included in the exclude list.\n        if (this.lazyExcludes.length > 0 && isNodeLazy) {\n          isNodeLazy = !this.lazyExcludes.some(lazyExcludeRegex =>\n            relativePath.match(lazyExcludeRegex),\n          );\n        }\n\n        if (this.requestedAssetIds.has(node.value.id) || !isNodeLazy) {\n          node.requested = true;\n        } else if (!node.requested) {\n          let isAsyncChild = this.assetGraph\n            .getIncomingDependencies(node.value)\n            .every(dep => dep.isEntry || dep.priority !== Priority.sync);\n          if (isAsyncChild) {\n            node.requested = !isNodeLazy;\n          } else {\n            delete node.requested;\n          }\n        }\n\n        let previouslyDeferred = childNode.deferred;\n        childNode.deferred = node.requested === false;\n\n        // The child dependency node we're now evaluating should not be deferred if it's parent\n        // is explicitly not requested (requested = false, but not requested = undefined)\n        //\n        // if we weren't previously deferred but we are now, then this dependency node's parents should also\n        // be marked as deferred\n        //\n        // if we were previously deferred but we not longer are, then then all parents should no longer be\n        // deferred either\n        if (!previouslyDeferred && childNode.deferred) {\n          this.assetGraph.markParentsWithHasDeferred(childNodeId);\n        } else if (previouslyDeferred && !childNode.deferred) {\n          // Mark Asset and Dependency as dirty for symbol propagation as it was\n          // previously deferred and it's used symbols may have changed\n          this.changedAssetsPropagation.add(node.id);\n          node.usedSymbolsDownDirty = true;\n          this.changedAssetsPropagation.add(childNode.id);\n          childNode.usedSymbolsDownDirty = true;\n\n          this.assetGraph.unmarkParentsWithHasDeferred(childNodeId);\n        }\n\n        // We `shouldVisitChild` if the childNode is not deferred\n        return !childNode.deferred;\n      }\n    }\n\n    return this.assetGraph.shouldVisitChild(nodeId, childNodeId);\n  }\n\n  shouldSkipRequest(nodeId: NodeId): boolean {\n    let node = nullthrows(this.assetGraph.getNode(nodeId));\n    return (\n      node.complete === true ||\n      !typesWithRequests.has(node.type) ||\n      (node.correspondingRequest != null &&\n        this.api.canSkipSubrequest(node.correspondingRequest))\n    );\n  }\n\n  queueCorrespondingRequest(\n    nodeId: NodeId,\n    errors: Array<Error>,\n  ): Promise<mixed> {\n    let promise;\n    let node = nullthrows(this.assetGraph.getNode(nodeId));\n    switch (node.type) {\n      case 'entry_specifier':\n        promise = this.runEntryRequest(node.value);\n        break;\n      case 'entry_file':\n        promise = this.runTargetRequest(node.value);\n        break;\n      case 'dependency':\n        promise = this.runPathRequest(node.value);\n        break;\n      case 'asset_group':\n        promise = this.runAssetRequest(node.value);\n        break;\n      default:\n        throw new Error(\n          `Can not queue corresponding request of node with type ${node.type}`,\n        );\n    }\n    return this.queue.add(() =>\n      promise.then(null, error => errors.push(error)),\n    );\n  }\n\n  async runEntryRequest(input: ProjectPath) {\n    let prevEntries = this.assetGraph.safeToIncrementallyBundle\n      ? this.assetGraph\n          .getEntryAssets()\n          .map(asset => asset.id)\n          .sort()\n      : [];\n\n    let request = createEntryRequest(input);\n    let result = await this.api.runRequest<ProjectPath, EntryRequestResult>(\n      request,\n      {\n        force: true,\n      },\n    );\n    this.assetGraph.resolveEntry(request.input, result.entries, request.id);\n\n    if (this.assetGraph.safeToIncrementallyBundle) {\n      let currentEntries = this.assetGraph\n        .getEntryAssets()\n        .map(asset => asset.id)\n        .sort();\n      let didEntriesChange =\n        prevEntries.length !== currentEntries.length ||\n        prevEntries.every(\n          (entryId, index) => entryId === currentEntries[index],\n        );\n\n      if (didEntriesChange) {\n        this.assetGraph.safeToIncrementallyBundle = false;\n      }\n    }\n  }\n\n  async runTargetRequest(input: Entry) {\n    let request = createTargetRequest(input);\n    let targets = await this.api.runRequest<Entry, Array<Target>>(request, {\n      force: true,\n    });\n    this.assetGraph.resolveTargets(request.input, targets, request.id);\n  }\n\n  async runPathRequest(input: Dependency) {\n    let request = createPathRequest({dependency: input, name: this.name});\n    let result = await this.api.runRequest<PathRequestInput, ?AssetGroup>(\n      request,\n      {force: true},\n    );\n    this.assetGraph.resolveDependency(input, result, request.id);\n  }\n\n  async runAssetRequest(input: AssetGroup) {\n    this.assetRequests.push(input);\n    let request = createAssetRequest({\n      ...input,\n      name: this.name,\n      optionsRef: this.optionsRef,\n      isSingleChangeRebuild: this.isSingleChangeRebuild,\n    });\n\n    let assets = await this.api.runRequest<AssetRequestInput, Array<Asset>>(\n      request,\n      {force: true},\n    );\n\n    if (assets != null) {\n      for (let asset of assets) {\n        if (this.assetGraph.safeToIncrementallyBundle) {\n          let otherAsset = this.assetGraph.getNodeByContentKey(asset.id);\n          if (otherAsset != null) {\n            invariant(otherAsset.type === 'asset');\n            if (!this._areDependenciesEqualForAssets(asset, otherAsset.value)) {\n              this.assetGraph.safeToIncrementallyBundle = false;\n            }\n          } else {\n            // adding a new entry or dependency\n            this.assetGraph.safeToIncrementallyBundle = false;\n          }\n        }\n        this.changedAssets.set(asset.id, asset);\n        this.changedAssetsPropagation.add(asset.id);\n      }\n      this.assetGraph.resolveAssetGroup(input, assets, request.id);\n    } else {\n      this.assetGraph.safeToIncrementallyBundle = false;\n    }\n\n    this.isSingleChangeRebuild = false;\n  }\n\n  /**\n   * Used for incremental bundling of modified assets\n   */\n  _areDependenciesEqualForAssets(asset: Asset, otherAsset: Asset): boolean {\n    let assetDependencies = Array.from(asset?.dependencies.keys()).sort();\n    let otherAssetDependencies = Array.from(\n      otherAsset?.dependencies.keys(),\n    ).sort();\n\n    if (assetDependencies.length !== otherAssetDependencies.length) {\n      return false;\n    }\n\n    return assetDependencies.every((key, index) => {\n      if (key !== otherAssetDependencies[index]) {\n        return false;\n      }\n\n      return setEqual(\n        new Set(asset?.dependencies.get(key)?.symbols?.keys()),\n        new Set(otherAsset?.dependencies.get(key)?.symbols?.keys()),\n      );\n    });\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/AssetRequest.js",
    "content": "// @flow strict-local\n\nimport type {ContentKey} from '@parcel/graph';\nimport type {Async} from '@parcel/types';\nimport type {StaticRunOpts} from '../RequestTracker';\nimport type {\n  AssetRequestInput,\n  AssetRequestResult,\n  TransformationRequest,\n} from '../types';\nimport type {ConfigAndCachePath} from './ParcelConfigRequest';\nimport type {TransformationResult} from '../Transformation';\n\nimport nullthrows from 'nullthrows';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport {hashString} from '@parcel/rust';\nimport createParcelConfigRequest from './ParcelConfigRequest';\nimport {runDevDepRequest} from './DevDepRequest';\nimport {runConfigRequest} from './ConfigRequest';\nimport {fromProjectPath, fromProjectPathRelative} from '../projectPath';\nimport {report} from '../ReporterRunner';\nimport {requestTypes} from '../RequestTracker';\nimport type {DevDepRequestResult} from './DevDepRequest';\n\ntype RunInput<TResult> = {|\n  input: AssetRequestInput,\n  ...StaticRunOpts<TResult>,\n|};\n\nexport type AssetRequest = {|\n  id: ContentKey,\n  +type: typeof requestTypes.asset_request,\n  run: (RunInput<AssetRequestResult>) => Async<AssetRequestResult>,\n  input: AssetRequestInput,\n|};\n\nexport default function createAssetRequest(\n  input: AssetRequestInput,\n): AssetRequest {\n  return {\n    type: requestTypes.asset_request,\n    id: getId(input),\n    run,\n    input,\n  };\n}\n\nconst type = 'asset_request';\n\nfunction getId(input: AssetRequestInput) {\n  // eslint-disable-next-line no-unused-vars\n  let {optionsRef, ...hashInput} = input;\n  return hashString(\n    type +\n      fromProjectPathRelative(input.filePath) +\n      input.env.id +\n      String(input.isSource) +\n      String(input.sideEffects) +\n      (input.code ?? '') +\n      ':' +\n      (input.pipeline ?? '') +\n      ':' +\n      (input.query ?? ''),\n  );\n}\n\nasync function run({input, api, farm, invalidateReason, options}) {\n  report({\n    type: 'buildProgress',\n    phase: 'transforming',\n    filePath: fromProjectPath(options.projectRoot, input.filePath),\n  });\n\n  api.invalidateOnFileUpdate(input.filePath);\n  let start = Date.now();\n  let {optionsRef, ...rest} = input;\n  let {cachePath} = nullthrows(\n    await api.runRequest<null, ConfigAndCachePath>(createParcelConfigRequest()),\n  );\n\n  let previousDevDepRequests: Map<string, DevDepRequestResult> = new Map(\n    await Promise.all(\n      api\n        .getSubRequests()\n        .filter(req => req.requestType === requestTypes.dev_dep_request)\n        .map(async req => [\n          req.id,\n          nullthrows(await api.getRequestResult<DevDepRequestResult>(req.id)),\n        ]),\n    ),\n  );\n\n  let request: TransformationRequest = {\n    ...rest,\n    invalidateReason,\n    devDeps: new Map(\n      [...previousDevDepRequests.entries()]\n        .filter(([id]) => api.canSkipSubrequest(id))\n        .map(([, req]: [string, DevDepRequestResult]) => [\n          `${req.specifier}:${fromProjectPathRelative(req.resolveFrom)}`,\n          req.hash,\n        ]),\n    ),\n    invalidDevDeps: await Promise.all(\n      [...previousDevDepRequests.entries()]\n        .filter(([id]) => !api.canSkipSubrequest(id))\n        .flatMap(([, req]: [string, DevDepRequestResult]) => {\n          return [\n            {\n              specifier: req.specifier,\n              resolveFrom: req.resolveFrom,\n            },\n            ...(req.additionalInvalidations ?? []).map(i => ({\n              specifier: i.specifier,\n              resolveFrom: i.resolveFrom,\n            })),\n          ];\n        }),\n    ),\n  };\n\n  let {assets, configRequests, error, invalidations, devDepRequests} =\n    (await farm.createHandle(\n      'runTransform',\n      input.isSingleChangeRebuild,\n    )({\n      configCachePath: cachePath,\n      optionsRef,\n      request,\n    }): TransformationResult);\n\n  let time = Date.now() - start;\n  if (assets) {\n    for (let asset of assets) {\n      asset.stats.time = time;\n    }\n  }\n\n  for (let filePath of invalidations.invalidateOnFileChange) {\n    api.invalidateOnFileUpdate(filePath);\n    api.invalidateOnFileDelete(filePath);\n  }\n\n  for (let invalidation of invalidations.invalidateOnFileCreate) {\n    api.invalidateOnFileCreate(invalidation);\n  }\n\n  for (let env of invalidations.invalidateOnEnvChange) {\n    api.invalidateOnEnvChange(env);\n  }\n\n  for (let option of invalidations.invalidateOnOptionChange) {\n    api.invalidateOnOptionChange(option);\n  }\n\n  if (invalidations.invalidateOnStartup) {\n    api.invalidateOnStartup();\n  }\n\n  if (invalidations.invalidateOnBuild) {\n    api.invalidateOnBuild();\n  }\n\n  for (let devDepRequest of devDepRequests) {\n    await runDevDepRequest(api, devDepRequest);\n  }\n\n  for (let configRequest of configRequests) {\n    await runConfigRequest(api, configRequest);\n  }\n\n  if (error != null) {\n    throw new ThrowableDiagnostic({diagnostic: error});\n  } else {\n    return nullthrows(assets);\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/BundleGraphRequest.js",
    "content": "// @flow strict-local\n\nimport type {Async, Bundle as IBundle, Namer} from '@parcel/types';\nimport type {SharedReference} from '@parcel/workers';\nimport type ParcelConfig, {LoadedPlugin} from '../ParcelConfig';\nimport type {StaticRunOpts, RunAPI} from '../RequestTracker';\nimport type {\n  Asset,\n  AssetGroup,\n  Bundle as InternalBundle,\n  Config,\n  DevDepRequest,\n  DevDepRequestRef,\n  ParcelOptions,\n} from '../types';\nimport type {ConfigAndCachePath} from './ParcelConfigRequest';\n\nimport invariant from 'assert';\nimport assert from 'assert';\nimport nullthrows from 'nullthrows';\nimport {PluginLogger} from '@parcel/logger';\nimport ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';\nimport AssetGraph from '../AssetGraph';\nimport BundleGraph from '../public/BundleGraph';\nimport InternalBundleGraph, {bundleGraphEdgeTypes} from '../BundleGraph';\nimport MutableBundleGraph from '../public/MutableBundleGraph';\nimport {Bundle, NamedBundle} from '../public/Bundle';\nimport {report} from '../ReporterRunner';\nimport dumpGraphToGraphViz from '../dumpGraphToGraphViz';\nimport {hashString} from '@parcel/rust';\nimport PluginOptions from '../public/PluginOptions';\nimport applyRuntimes from '../applyRuntimes';\nimport {PARCEL_VERSION, OPTION_CHANGE} from '../constants';\nimport {assertSignalNotAborted, optionsProxy} from '../utils';\nimport createParcelConfigRequest, {\n  getCachedParcelConfig,\n} from './ParcelConfigRequest';\nimport {\n  createDevDependency,\n  getDevDepRequests,\n  invalidateDevDeps,\n  runDevDepRequest,\n} from './DevDepRequest';\nimport {createConfig} from '../InternalConfig';\nimport {\n  loadPluginConfig,\n  runConfigRequest,\n  type PluginWithLoadConfig,\n} from './ConfigRequest';\nimport {\n  joinProjectPath,\n  fromProjectPathRelative,\n  toProjectPathUnsafe,\n} from '../projectPath';\nimport createAssetGraphRequest from './AssetGraphRequest';\nimport {tracer, PluginTracer} from '@parcel/profiler';\nimport {requestTypes} from '../RequestTracker';\nimport type {ProjectPath} from '../projectPath';\n\ntype BundleGraphRequestInput = {|\n  requestedAssetIds: Set<string>,\n  signal?: AbortSignal,\n  optionsRef: SharedReference,\n|};\n\ntype BundleGraphRequestResult = {|\n  bundleGraph: InternalBundleGraph,\n|};\n\ntype RunInput = {|\n  input: BundleGraphRequestInput,\n  ...StaticRunOpts<BundleGraphResult>,\n|};\n\n// TODO: Rename to BundleGraphRequestResult\nexport type BundleGraphResult = {|\n  bundleGraph: InternalBundleGraph,\n  changedAssets: Map<string, Asset>,\n  assetRequests: Array<AssetGroup>,\n|};\n\ntype BundleGraphRequest = {|\n  id: string,\n  +type: typeof requestTypes.bundle_graph_request,\n  run: RunInput => Async<BundleGraphResult>,\n  input: BundleGraphRequestInput,\n|};\n\nexport default function createBundleGraphRequest(\n  input: BundleGraphRequestInput,\n): BundleGraphRequest {\n  return {\n    type: requestTypes.bundle_graph_request,\n    id: 'BundleGraph',\n    run: async input => {\n      let {options, api, invalidateReason} = input;\n      let {optionsRef, requestedAssetIds, signal} = input.input;\n      let measurement = tracer.createMeasurement('building');\n\n      let request = createAssetGraphRequest({\n        name: 'Main',\n        entries: options.entries,\n        optionsRef,\n        shouldBuildLazily: options.shouldBuildLazily,\n        lazyIncludes: options.lazyIncludes,\n        lazyExcludes: options.lazyExcludes,\n        requestedAssetIds,\n      });\n\n      let {assetGraph, changedAssets, assetRequests} = await api.runRequest(\n        request,\n        {\n          force: options.shouldBuildLazily && requestedAssetIds.size > 0,\n        },\n      );\n\n      measurement && measurement.end();\n      assertSignalNotAborted(signal);\n\n      // If any subrequests are invalid (e.g. dev dep requests or config requests),\n      // bail on incremental bundling. We also need to invalidate for option changes,\n      // which are hoisted to direct invalidations on the bundle graph request.\n      let subRequestsInvalid =\n        Boolean(invalidateReason & OPTION_CHANGE) ||\n        input.api\n          .getSubRequests()\n          .some(req => !input.api.canSkipSubrequest(req.id));\n\n      if (subRequestsInvalid) {\n        assetGraph.safeToIncrementallyBundle = false;\n      }\n\n      let configResult = nullthrows(\n        await input.api.runRequest<null, ConfigAndCachePath>(\n          createParcelConfigRequest(),\n        ),\n      );\n\n      assertSignalNotAborted(signal);\n\n      let parcelConfig = getCachedParcelConfig(configResult, input.options);\n      let {devDeps, invalidDevDeps} = await getDevDepRequests(input.api);\n      invalidateDevDeps(invalidDevDeps, input.options, parcelConfig);\n\n      let bundlingMeasurement = tracer.createMeasurement('bundling');\n      let builder = new BundlerRunner(input, parcelConfig, devDeps);\n      let res: BundleGraphResult = await builder.bundle({\n        graph: assetGraph,\n        changedAssets: changedAssets,\n        assetRequests,\n      });\n      bundlingMeasurement && bundlingMeasurement.end();\n      for (let [id, asset] of changedAssets) {\n        res.changedAssets.set(id, asset);\n      }\n\n      await dumpGraphToGraphViz(\n        // $FlowFixMe Added in Flow 0.121.0 upgrade in #4381 (Windows only)\n        res.bundleGraph._graph,\n        'BundleGraph',\n        bundleGraphEdgeTypes,\n      );\n\n      return res;\n    },\n    input,\n  };\n}\n\nclass BundlerRunner {\n  options: ParcelOptions;\n  optionsRef: SharedReference;\n  config: ParcelConfig;\n  pluginOptions: PluginOptions;\n  api: RunAPI<BundleGraphResult>;\n  previousDevDeps: Map<string, string>;\n  devDepRequests: Map<string, DevDepRequest | DevDepRequestRef>;\n  configs: Map<string, Config>;\n  cacheKey: string;\n\n  constructor(\n    {input, api, options}: RunInput,\n    config: ParcelConfig,\n    previousDevDeps: Map<string, string>,\n  ) {\n    this.options = options;\n    this.api = api;\n    this.optionsRef = input.optionsRef;\n    this.config = config;\n    this.previousDevDeps = previousDevDeps;\n    this.devDepRequests = new Map();\n    this.configs = new Map();\n    this.pluginOptions = new PluginOptions(\n      optionsProxy(this.options, api.invalidateOnOptionChange),\n    );\n    this.cacheKey =\n      hashString(\n        `${PARCEL_VERSION}:BundleGraph:${\n          JSON.stringify(options.entries) ?? ''\n        }${options.mode}${options.shouldBuildLazily ? 'lazy' : 'eager'}`,\n      ) + '-BundleGraph';\n  }\n\n  async loadConfigs() {\n    // Load all configs up front so we can use them in the cache key\n    let bundler = await this.config.getBundler();\n    await this.loadConfig(bundler);\n\n    let namers = await this.config.getNamers();\n    for (let namer of namers) {\n      await this.loadConfig(namer);\n    }\n\n    let runtimes = await this.config.getRuntimes();\n    for (let runtime of runtimes) {\n      await this.loadConfig(runtime);\n    }\n  }\n\n  async loadConfig<T: PluginWithLoadConfig>(plugin: LoadedPlugin<T>) {\n    let config = createConfig({\n      plugin: plugin.name,\n      searchPath: toProjectPathUnsafe('index'),\n    });\n\n    await loadPluginConfig(plugin, config, this.options);\n    await runConfigRequest(this.api, config);\n    for (let devDep of config.devDeps) {\n      let devDepRequest = await createDevDependency(\n        devDep,\n        this.previousDevDeps,\n        this.options,\n      );\n      await this.runDevDepRequest(devDepRequest);\n    }\n\n    this.configs.set(plugin.name, config);\n  }\n\n  async runDevDepRequest(devDepRequest: DevDepRequest | DevDepRequestRef) {\n    let {specifier, resolveFrom} = devDepRequest;\n    let key = `${specifier}:${fromProjectPathRelative(resolveFrom)}`;\n    this.devDepRequests.set(key, devDepRequest);\n    await runDevDepRequest(this.api, devDepRequest);\n  }\n\n  async bundle({\n    graph,\n    changedAssets,\n    assetRequests,\n  }: {|\n    graph: AssetGraph,\n    changedAssets: Map<string, Asset>,\n    assetRequests: Array<AssetGroup>,\n  |}): Promise<BundleGraphResult> {\n    report({\n      type: 'buildProgress',\n      phase: 'bundling',\n    });\n\n    await this.loadConfigs();\n\n    let plugin = await this.config.getBundler();\n    let {plugin: bundler, name, resolveFrom} = plugin;\n\n    // if a previous asset graph hash is passed in, check if the bundle graph is also available\n    let previousBundleGraphResult: ?BundleGraphRequestResult;\n    if (graph.safeToIncrementallyBundle) {\n      try {\n        previousBundleGraphResult = await this.api.getPreviousResult();\n      } catch {\n        // if the bundle graph had an error or was removed, don't fail the build\n      }\n    }\n    if (previousBundleGraphResult == null) {\n      graph.safeToIncrementallyBundle = false;\n    }\n\n    let internalBundleGraph;\n\n    let logger = new PluginLogger({origin: name});\n    let tracer = new PluginTracer({\n      origin: name,\n      category: 'bundle',\n    });\n    try {\n      if (previousBundleGraphResult) {\n        internalBundleGraph = previousBundleGraphResult.bundleGraph;\n        for (let changedAssetId of changedAssets.keys()) {\n          // Copy over the whole node to also have correct symbol data\n          let changedAssetNode = nullthrows(\n            graph.getNodeByContentKey(changedAssetId),\n          );\n          invariant(changedAssetNode.type === 'asset');\n          internalBundleGraph.updateAsset(changedAssetNode);\n        }\n      } else {\n        internalBundleGraph = InternalBundleGraph.fromAssetGraph(\n          graph,\n          this.options.mode === 'production',\n        );\n        invariant(internalBundleGraph != null); // ensures the graph was created\n\n        await dumpGraphToGraphViz(\n          // $FlowFixMe\n          internalBundleGraph._graph,\n          'before_bundle',\n          bundleGraphEdgeTypes,\n        );\n        let mutableBundleGraph = new MutableBundleGraph(\n          internalBundleGraph,\n          this.options,\n        );\n\n        let measurement;\n        let measurementFilename;\n        if (tracer.enabled) {\n          measurementFilename = graph\n            .getEntryAssets()\n            .map(asset => fromProjectPathRelative(asset.filePath))\n            .join(', ');\n          measurement = tracer.createMeasurement(\n            plugin.name,\n            'bundling:bundle',\n            measurementFilename,\n          );\n        }\n\n        // this the normal bundle workflow (bundle, optimizing, run-times, naming)\n        await bundler.bundle({\n          bundleGraph: mutableBundleGraph,\n          config: this.configs.get(plugin.name)?.result,\n          options: this.pluginOptions,\n          logger,\n          tracer,\n        });\n\n        measurement && measurement.end();\n\n        if (this.pluginOptions.mode === 'production') {\n          let optimizeMeasurement;\n          try {\n            if (tracer.enabled) {\n              optimizeMeasurement = tracer.createMeasurement(\n                plugin.name,\n                'bundling:optimize',\n                nullthrows(measurementFilename),\n              );\n            }\n            await bundler.optimize({\n              bundleGraph: mutableBundleGraph,\n              config: this.configs.get(plugin.name)?.result,\n              options: this.pluginOptions,\n              logger,\n            });\n          } catch (e) {\n            throw new ThrowableDiagnostic({\n              diagnostic: errorToDiagnostic(e, {\n                origin: plugin.name,\n              }),\n            });\n          } finally {\n            optimizeMeasurement && optimizeMeasurement.end();\n            await dumpGraphToGraphViz(\n              // $FlowFixMe[incompatible-call]\n              internalBundleGraph._graph,\n              'after_optimize',\n            );\n          }\n        }\n\n        // Add dev dependency for the bundler. This must be done AFTER running it due to\n        // the potential for lazy require() that aren't executed until the request runs.\n        let devDepRequest = await createDevDependency(\n          {\n            specifier: name,\n            resolveFrom,\n          },\n          this.previousDevDeps,\n          this.options,\n        );\n        await this.runDevDepRequest(devDepRequest);\n      }\n    } catch (e) {\n      if (internalBundleGraph != null) {\n        this.api.storeResult(\n          {\n            bundleGraph: internalBundleGraph,\n            changedAssets: new Map(),\n            assetRequests: [],\n          },\n          this.cacheKey,\n        );\n      }\n\n      throw new ThrowableDiagnostic({\n        diagnostic: errorToDiagnostic(e, {\n          origin: name,\n        }),\n      });\n    } finally {\n      invariant(internalBundleGraph != null); // ensures the graph was created\n      await dumpGraphToGraphViz(\n        // $FlowFixMe[incompatible-call]\n        internalBundleGraph._graph,\n        'after_bundle',\n        bundleGraphEdgeTypes,\n      );\n    }\n\n    let changedRuntimes = new Map();\n    if (!previousBundleGraphResult) {\n      let namers = await this.config.getNamers();\n      // inline bundles must still be named so the PackagerRunner\n      // can match them to the correct packager/optimizer plugins.\n      let bundles = internalBundleGraph.getBundles({includeInline: true});\n      await Promise.all(\n        bundles.map(bundle =>\n          this.nameBundle(namers, bundle, internalBundleGraph),\n        ),\n      );\n\n      changedRuntimes = await applyRuntimes({\n        bundleGraph: internalBundleGraph,\n        api: this.api,\n        config: this.config,\n        options: this.options,\n        optionsRef: this.optionsRef,\n        pluginOptions: this.pluginOptions,\n        previousDevDeps: this.previousDevDeps,\n        devDepRequests: this.devDepRequests,\n        configs: this.configs,\n      });\n\n      // Add dev deps for namers, AFTER running them to account for lazy require().\n      for (let namer of namers) {\n        let devDepRequest = await createDevDependency(\n          {\n            specifier: namer.name,\n            resolveFrom: namer.resolveFrom,\n          },\n          this.previousDevDeps,\n          this.options,\n        );\n        await this.runDevDepRequest(devDepRequest);\n      }\n\n      this.validateBundles(internalBundleGraph);\n\n      // Pre-compute the hashes for each bundle so they are only computed once and shared between workers.\n      internalBundleGraph.getBundleGraphHash();\n    }\n\n    await dumpGraphToGraphViz(\n      // $FlowFixMe\n      internalBundleGraph._graph,\n      'after_runtimes',\n      bundleGraphEdgeTypes,\n    );\n\n    this.api.storeResult(\n      {\n        bundleGraph: internalBundleGraph,\n        changedAssets: new Map(),\n        assetRequests: [],\n      },\n      this.cacheKey,\n    );\n\n    return {\n      bundleGraph: internalBundleGraph,\n      changedAssets: changedRuntimes,\n      assetRequests,\n    };\n  }\n\n  validateBundles(bundleGraph: InternalBundleGraph): void {\n    let bundles = bundleGraph.getBundles();\n    let bundleNames = bundles.map(b =>\n      joinProjectPath(b.target.distDir, nullthrows(b.name)),\n    );\n\n    let seenNames = new Set<ProjectPath>();\n    let duplicateNames = bundleNames.filter(name => {\n      let isDuplicate = seenNames.has(name);\n      seenNames.add(name);\n      return isDuplicate;\n    });\n\n    assert(\n      duplicateNames.length === 0,\n      'Bundles must have unique names. Conflicting names: ' +\n        duplicateNames.join(', '),\n    );\n  }\n\n  async nameBundle(\n    namers: Array<LoadedPlugin<Namer<mixed>>>,\n    internalBundle: InternalBundle,\n    internalBundleGraph: InternalBundleGraph,\n  ): Promise<void> {\n    let bundle = Bundle.get(internalBundle, internalBundleGraph, this.options);\n    let bundleGraph = new BundleGraph<IBundle>(\n      internalBundleGraph,\n      NamedBundle.get.bind(NamedBundle),\n      this.options,\n    );\n\n    for (let namer of namers) {\n      let measurement;\n      try {\n        measurement = tracer.createMeasurement(namer.name, 'namer', bundle.id);\n        let name = await namer.plugin.name({\n          bundle,\n          bundleGraph,\n          config: this.configs.get(namer.name)?.result,\n          options: this.pluginOptions,\n          logger: new PluginLogger({origin: namer.name}),\n          tracer: new PluginTracer({origin: namer.name, category: 'namer'}),\n        });\n\n        if (name != null) {\n          internalBundle.name = name;\n          let {hashReference} = internalBundle;\n          internalBundle.displayName = name.includes(hashReference)\n            ? name.replace(hashReference, '[hash]')\n            : name;\n\n          return;\n        }\n      } catch (e) {\n        throw new ThrowableDiagnostic({\n          diagnostic: errorToDiagnostic(e, {\n            origin: namer.name,\n          }),\n        });\n      } finally {\n        measurement && measurement.end();\n      }\n    }\n\n    throw new Error('Unable to name bundle');\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/ConfigRequest.js",
    "content": "// @flow\nimport type {\n  Async,\n  Config as IConfig,\n  PluginOptions as IPluginOptions,\n  PluginLogger as IPluginLogger,\n  PluginTracer as IPluginTracer,\n  NamedBundle as INamedBundle,\n  BundleGraph as IBundleGraph,\n} from '@parcel/types';\nimport {readConfig, hashObject} from '@parcel/utils';\nimport type {\n  Config,\n  ParcelOptions,\n  InternalFileCreateInvalidation,\n} from '../types';\nimport type {LoadedPlugin} from '../ParcelConfig';\nimport type {RequestResult, RunAPI} from '../RequestTracker';\nimport type {ProjectPath} from '../projectPath';\n\nimport {serializeRaw} from '../serializer.js';\nimport {PluginLogger} from '@parcel/logger';\nimport PluginOptions from '../public/PluginOptions';\nimport ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';\nimport PublicConfig from '../public/Config';\nimport {optionsProxy} from '../utils';\nimport {getInvalidationHash} from '../assetUtils';\nimport {hashString, Hash} from '@parcel/rust';\nimport {PluginTracer} from '@parcel/profiler';\nimport {requestTypes} from '../RequestTracker';\nimport {fromProjectPath, fromProjectPathRelative} from '../projectPath';\nimport {createBuildCache} from '../buildCache';\n\nexport type PluginWithLoadConfig = {\n  loadConfig?: ({|\n    config: IConfig,\n    options: IPluginOptions,\n    logger: IPluginLogger,\n    tracer: IPluginTracer,\n  |}) => Async<mixed>,\n  ...\n};\n\nexport type PluginWithBundleConfig = {\n  loadConfig?: ({|\n    config: IConfig,\n    options: IPluginOptions,\n    logger: IPluginLogger,\n    tracer: IPluginTracer,\n  |}) => Async<mixed>,\n  loadBundleConfig?: ({|\n    bundle: INamedBundle,\n    bundleGraph: IBundleGraph<INamedBundle>,\n    config: IConfig,\n    options: IPluginOptions,\n    logger: IPluginLogger,\n    tracer: IPluginTracer,\n  |}) => Async<mixed>,\n  ...\n};\n\nexport type ConfigRequest = {\n  id: string,\n  invalidateOnFileChange: Set<ProjectPath>,\n  invalidateOnConfigKeyChange: Array<{|\n    filePath: ProjectPath,\n    configKey: string,\n  |}>,\n  invalidateOnFileCreate: Array<InternalFileCreateInvalidation>,\n  invalidateOnEnvChange: Set<string>,\n  invalidateOnOptionChange: Set<string>,\n  invalidateOnStartup: boolean,\n  invalidateOnBuild: boolean,\n  ...\n};\n\nexport type ConfigRequestResult = void;\n\nexport async function loadPluginConfig<T: PluginWithLoadConfig>(\n  loadedPlugin: LoadedPlugin<T>,\n  config: Config,\n  options: ParcelOptions,\n): Promise<void> {\n  let loadConfig = loadedPlugin.plugin.loadConfig;\n  if (!loadConfig) {\n    return;\n  }\n\n  try {\n    config.result = await loadConfig({\n      config: new PublicConfig(config, options),\n      options: new PluginOptions(\n        optionsProxy(options, option => {\n          config.invalidateOnOptionChange.add(option);\n        }),\n      ),\n      logger: new PluginLogger({origin: loadedPlugin.name}),\n      tracer: new PluginTracer({\n        origin: loadedPlugin.name,\n        category: 'loadConfig',\n      }),\n    });\n  } catch (e) {\n    throw new ThrowableDiagnostic({\n      diagnostic: errorToDiagnostic(e, {\n        origin: loadedPlugin.name,\n      }),\n    });\n  }\n}\n\nconst configKeyCache = createBuildCache();\n\nexport async function getConfigKeyContentHash(\n  filePath: ProjectPath,\n  configKey: string,\n  options: ParcelOptions,\n): Async<string> {\n  let cacheKey = `${fromProjectPathRelative(filePath)}:${configKey}`;\n  let cachedValue = configKeyCache.get(cacheKey);\n\n  if (cachedValue) {\n    return cachedValue;\n  }\n\n  let conf = await readConfig(\n    options.inputFS,\n    fromProjectPath(options.projectRoot, filePath),\n  );\n\n  if (conf == null || conf.config[configKey] == null) {\n    // This can occur when a config key has been removed entirely during `respondToFSEvents`\n    return '';\n  }\n\n  let contentHash =\n    typeof conf.config[configKey] === 'object'\n      ? hashObject(conf.config[configKey])\n      : hashString(JSON.stringify(conf.config[configKey]));\n\n  configKeyCache.set(cacheKey, contentHash);\n\n  return contentHash;\n}\n\nexport async function runConfigRequest<TResult: RequestResult>(\n  api: RunAPI<TResult>,\n  configRequest: ConfigRequest,\n) {\n  let {\n    invalidateOnFileChange,\n    invalidateOnConfigKeyChange,\n    invalidateOnFileCreate,\n    invalidateOnEnvChange,\n    invalidateOnOptionChange,\n    invalidateOnStartup,\n    invalidateOnBuild,\n  } = configRequest;\n\n  // If there are no invalidations, then no need to create a node.\n  if (\n    invalidateOnFileChange.size === 0 &&\n    invalidateOnConfigKeyChange.length === 0 &&\n    invalidateOnFileCreate.length === 0 &&\n    invalidateOnOptionChange.size === 0 &&\n    invalidateOnEnvChange.size === 0 &&\n    !invalidateOnStartup &&\n    !invalidateOnBuild\n  ) {\n    return;\n  }\n\n  await api.runRequest<null, void>({\n    id: 'config_request:' + configRequest.id,\n    type: requestTypes.config_request,\n    run: async ({api, options}) => {\n      for (let filePath of invalidateOnFileChange) {\n        api.invalidateOnFileUpdate(filePath);\n        api.invalidateOnFileDelete(filePath);\n      }\n\n      for (let {filePath, configKey} of invalidateOnConfigKeyChange) {\n        let contentHash = await getConfigKeyContentHash(\n          filePath,\n          configKey,\n          options,\n        );\n\n        api.invalidateOnConfigKeyChange(filePath, configKey, contentHash);\n      }\n\n      for (let invalidation of invalidateOnFileCreate) {\n        api.invalidateOnFileCreate(invalidation);\n      }\n\n      for (let env of invalidateOnEnvChange) {\n        api.invalidateOnEnvChange(env);\n      }\n\n      for (let option of invalidateOnOptionChange) {\n        api.invalidateOnOptionChange(option);\n      }\n\n      if (invalidateOnStartup) {\n        api.invalidateOnStartup();\n      }\n\n      if (invalidateOnBuild) {\n        api.invalidateOnBuild();\n      }\n    },\n    input: null,\n  });\n}\n\nexport async function getConfigHash(\n  config: Config,\n  pluginName: string,\n  options: ParcelOptions,\n): Promise<string> {\n  if (config.result == null) {\n    return '';\n  }\n\n  let hash = new Hash();\n  hash.writeString(config.id);\n\n  // If there is no result hash set by the transformer, default to hashing the included\n  // files if any, otherwise try to hash the config result itself.\n  if (config.cacheKey == null) {\n    if (config.invalidateOnFileChange.size > 0) {\n      hash.writeString(\n        await getInvalidationHash(\n          [...config.invalidateOnFileChange].map(filePath => ({\n            type: 'file',\n            filePath,\n          })),\n          options,\n        ),\n      );\n    } else if (config.result != null) {\n      try {\n        hash.writeBuffer(serializeRaw(config.result));\n      } catch (err) {\n        throw new ThrowableDiagnostic({\n          diagnostic: {\n            message:\n              'Config result is not hashable because it contains non-serializable objects. Please use config.setCacheKey to set the hash manually.',\n            origin: pluginName,\n          },\n        });\n      }\n    }\n  } else {\n    hash.writeString(config.cacheKey ?? '');\n  }\n\n  return hash.finish();\n}\n\nexport function getConfigRequests(\n  configs: Array<Config>,\n): Array<ConfigRequest> {\n  return configs\n    .filter(config => {\n      // No need to send to the graph if there are no invalidations.\n      return (\n        config.invalidateOnFileChange.size > 0 ||\n        config.invalidateOnConfigKeyChange.length > 0 ||\n        config.invalidateOnFileCreate.length > 0 ||\n        config.invalidateOnEnvChange.size > 0 ||\n        config.invalidateOnOptionChange.size > 0 ||\n        config.invalidateOnStartup ||\n        config.invalidateOnBuild\n      );\n    })\n    .map(config => ({\n      id: config.id,\n      invalidateOnFileChange: config.invalidateOnFileChange,\n      invalidateOnConfigKeyChange: config.invalidateOnConfigKeyChange,\n      invalidateOnFileCreate: config.invalidateOnFileCreate,\n      invalidateOnEnvChange: config.invalidateOnEnvChange,\n      invalidateOnOptionChange: config.invalidateOnOptionChange,\n      invalidateOnStartup: config.invalidateOnStartup,\n      invalidateOnBuild: config.invalidateOnBuild,\n    }));\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/DevDepRequest.js",
    "content": "// @flow\nimport type {\n  DependencySpecifier,\n  SemverRange,\n  Invalidations,\n} from '@parcel/types';\nimport type ParcelConfig from '../ParcelConfig';\nimport type {\n  DevDepRequest,\n  DevDepRequestRef,\n  ParcelOptions,\n  InternalDevDepOptions,\n} from '../types';\nimport type {RequestResult, RunAPI} from '../RequestTracker';\nimport type {ProjectPath} from '../projectPath';\n\nimport nullthrows from 'nullthrows';\nimport {getInvalidationHash} from '../assetUtils';\nimport {createBuildCache} from '../buildCache';\nimport {invalidateOnFileCreateToInternal} from '../utils';\nimport {\n  fromProjectPath,\n  fromProjectPathRelative,\n  toProjectPath,\n} from '../projectPath';\nimport {requestTypes} from '../RequestTracker';\n\n// A cache of dev dep requests keyed by invalidations.\n// If the package manager returns the same invalidation object, then\n// we can reuse the dev dep request rather than recomputing the project\n// paths and hashes.\nconst devDepRequestCache: WeakMap<Invalidations, DevDepRequest> = new WeakMap();\n\nexport async function createDevDependency(\n  opts: InternalDevDepOptions,\n  requestDevDeps: Map<string, string>,\n  options: ParcelOptions,\n): Promise<DevDepRequest | DevDepRequestRef> {\n  let {specifier, resolveFrom, additionalInvalidations} = opts;\n  let key = `${specifier}:${fromProjectPathRelative(resolveFrom)}`;\n\n  // If the request sent us a hash, we know the dev dep and all of its dependencies didn't change.\n  // Reuse the same hash in the response. No need to send back invalidations as the request won't\n  // be re-run anyway.\n  let hash = requestDevDeps.get(key);\n  if (hash != null) {\n    return {\n      type: 'ref',\n      specifier,\n      resolveFrom,\n      hash,\n    };\n  }\n\n  let resolveFromAbsolute = fromProjectPath(options.projectRoot, resolveFrom);\n\n  // Ensure that the package manager has an entry for this resolution.\n  try {\n    await options.packageManager.resolve(specifier, resolveFromAbsolute);\n  } catch (err) {\n    // ignore\n  }\n\n  let invalidations = options.packageManager.getInvalidations(\n    specifier,\n    resolveFromAbsolute,\n  );\n\n  let cached = devDepRequestCache.get(invalidations);\n  if (cached != null) {\n    return cached;\n  }\n\n  let invalidateOnFileChangeProject = [\n    ...invalidations.invalidateOnFileChange,\n  ].map(f => toProjectPath(options.projectRoot, f));\n\n  // It is possible for a transformer to have multiple different hashes due to\n  // different dependencies (e.g. conditional requires) so we must always\n  // recompute the hash and compare rather than only sending a transformer\n  // dev dependency once.\n  hash = await getInvalidationHash(\n    invalidateOnFileChangeProject.map(f => ({\n      type: 'file',\n      filePath: f,\n    })),\n    options,\n  );\n\n  let devDepRequest: DevDepRequest = {\n    specifier,\n    resolveFrom,\n    hash,\n    invalidateOnFileCreate: invalidations.invalidateOnFileCreate.map(i =>\n      invalidateOnFileCreateToInternal(options.projectRoot, i),\n    ),\n    invalidateOnFileChange: new Set(invalidateOnFileChangeProject),\n    invalidateOnStartup: invalidations.invalidateOnStartup,\n    additionalInvalidations,\n  };\n\n  devDepRequestCache.set(invalidations, devDepRequest);\n  return devDepRequest;\n}\n\nexport type DevDepSpecifier = {|\n  specifier: DependencySpecifier,\n  resolveFrom: ProjectPath,\n|};\n\ntype DevDepRequests = {|\n  devDeps: Map<string, string>,\n  invalidDevDeps: Array<DevDepSpecifier>,\n|};\n\nexport async function getDevDepRequests<TResult: RequestResult>(\n  api: RunAPI<TResult>,\n): Promise<DevDepRequests> {\n  let previousDevDepRequests: Map<string, DevDepRequestResult> = new Map(\n    await Promise.all(\n      api\n        .getSubRequests()\n        .filter(req => req.requestType === requestTypes.dev_dep_request)\n        .map(async req => [\n          req.id,\n          nullthrows(await api.getRequestResult<DevDepRequestResult>(req.id)),\n        ]),\n    ),\n  );\n\n  return {\n    devDeps: new Map(\n      [...previousDevDepRequests.entries()]\n        .filter(([id]) => api.canSkipSubrequest(id))\n        .map(([, req]: [string, DevDepRequestResult]) => [\n          `${req.specifier}:${fromProjectPathRelative(req.resolveFrom)}`,\n          req.hash,\n        ]),\n    ),\n    invalidDevDeps: await Promise.all(\n      [...previousDevDepRequests.entries()]\n        .filter(([id]) => !api.canSkipSubrequest(id))\n        .flatMap(([, req]: [string, DevDepRequestResult]) => {\n          return [\n            {\n              specifier: req.specifier,\n              resolveFrom: req.resolveFrom,\n            },\n            ...(req.additionalInvalidations ?? []).map(i => ({\n              specifier: i.specifier,\n              resolveFrom: i.resolveFrom,\n            })),\n          ];\n        }),\n    ),\n  };\n}\n\n// Tracks dev deps that have been invalidated during this build\n// so we don't invalidate the require cache more than once.\nconst invalidatedDevDeps = createBuildCache();\n\nexport function invalidateDevDeps(\n  invalidDevDeps: Array<DevDepSpecifier>,\n  options: ParcelOptions,\n  config: ParcelConfig,\n) {\n  for (let {specifier, resolveFrom} of invalidDevDeps) {\n    let key = `${specifier}:${fromProjectPathRelative(resolveFrom)}`;\n    if (!invalidatedDevDeps.has(key)) {\n      config.invalidatePlugin(specifier);\n      options.packageManager.invalidate(\n        specifier,\n        fromProjectPath(options.projectRoot, resolveFrom),\n      );\n      invalidatedDevDeps.set(key, true);\n    }\n  }\n}\n\nexport type DevDepRequestResult = {|\n  specifier: DependencySpecifier,\n  resolveFrom: ProjectPath,\n  hash: string,\n  additionalInvalidations: void | Array<{|\n    range?: ?SemverRange,\n    resolveFrom: ProjectPath,\n    specifier: DependencySpecifier,\n  |}>,\n|};\n\nexport async function runDevDepRequest<TResult: RequestResult>(\n  api: RunAPI<TResult>,\n  devDepRequestRef: DevDepRequest | DevDepRequestRef,\n) {\n  await api.runRequest<null, DevDepRequestResult | void>({\n    id:\n      'dev_dep_request:' +\n      devDepRequestRef.specifier +\n      ':' +\n      devDepRequestRef.hash,\n    type: requestTypes.dev_dep_request,\n    run: ({api}) => {\n      let devDepRequest = resolveDevDepRequestRef(devDepRequestRef);\n      for (let filePath of nullthrows(\n        devDepRequest.invalidateOnFileChange,\n        'DevDepRequest missing invalidateOnFileChange',\n      )) {\n        api.invalidateOnFileUpdate(filePath);\n        api.invalidateOnFileDelete(filePath);\n      }\n\n      for (let invalidation of nullthrows(\n        devDepRequest.invalidateOnFileCreate,\n        'DevDepRequest missing invalidateOnFileCreate',\n      )) {\n        api.invalidateOnFileCreate(invalidation);\n      }\n\n      if (devDepRequest.invalidateOnStartup) {\n        api.invalidateOnStartup();\n      }\n\n      api.storeResult({\n        specifier: devDepRequest.specifier,\n        resolveFrom: devDepRequest.resolveFrom,\n        hash: devDepRequest.hash,\n        additionalInvalidations: devDepRequest.additionalInvalidations,\n      });\n    },\n    input: null,\n  });\n}\n\nconst devDepRequests: Map<string, DevDepRequest> = createBuildCache();\nexport function resolveDevDepRequestRef(\n  devDepRequestRef: DevDepRequest | DevDepRequestRef,\n): DevDepRequest {\n  const devDepRequest =\n    devDepRequestRef.type === 'ref'\n      ? devDepRequests.get(devDepRequestRef.hash)\n      : devDepRequestRef;\n  if (devDepRequest == null) {\n    throw new Error(\n      `Worker send back a reference to a missing dev dep request.\nThis might happen due to internal in-memory build caches not being cleared\nbetween builds or due a race condition.\nThis is a bug in Parcel.`,\n    );\n  }\n\n  if (devDepRequestRef.type !== 'ref') {\n    devDepRequests.set(devDepRequest.hash, devDepRequest);\n  }\n\n  return devDepRequest;\n}\n\n// A cache of plugin dependency hashes that we've already sent to the main thread.\n// Automatically cleared before each build.\nconst pluginCache = createBuildCache();\n\nexport function getWorkerDevDepRequests(\n  devDepRequests: Array<DevDepRequest | DevDepRequestRef>,\n): Array<DevDepRequest | DevDepRequestRef> {\n  return devDepRequests.map(devDepRequest => {\n    // If we've already sent a matching transformer + hash to the main thread during this build,\n    // there's no need to repeat ourselves.\n    let {specifier, resolveFrom, hash} = devDepRequest;\n    if (hash === pluginCache.get(specifier)) {\n      return {type: 'ref', specifier, resolveFrom, hash};\n    } else {\n      pluginCache.set(specifier, hash);\n      return devDepRequest;\n    }\n  });\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/EntryRequest.js",
    "content": "// @flow strict-local\n\nimport type {Async, FilePath, PackageJSON, Glob} from '@parcel/types';\nimport type {StaticRunOpts} from '../RequestTracker';\nimport type {Entry, InternalFile, ParcelOptions} from '../types';\nimport type {FileSystem} from '@parcel/fs';\n\nimport {\n  isDirectoryInside,\n  isGlob,\n  glob,\n  findAlternativeFiles,\n} from '@parcel/utils';\nimport ThrowableDiagnostic, {\n  md,\n  generateJSONCodeHighlights,\n  getJSONSourceLocation,\n} from '@parcel/diagnostic';\nimport path from 'path';\nimport {parse, type Mapping} from '@mischnic/json-sourcemap';\nimport {requestTypes} from '../RequestTracker';\nimport {\n  type ProjectPath,\n  fromProjectPath,\n  fromProjectPathRelative,\n  toProjectPath,\n} from '../projectPath';\n\ntype RunOpts<TResult> = {|\n  input: ProjectPath,\n  ...StaticRunOpts<TResult>,\n|};\n\nexport type EntryRequest = {|\n  id: string,\n  +type: typeof requestTypes.entry_request,\n  run: (RunOpts<EntryRequestResult>) => Async<EntryRequestResult>,\n  input: ProjectPath,\n|};\n\nexport type EntryRequestResult = {|\n  entries: Array<Entry>,\n  files: Array<InternalFile>,\n  globs: Array<Glob>,\n|};\n\nconst type = 'entry_request';\n\nexport default function createEntryRequest(input: ProjectPath): EntryRequest {\n  return {\n    id: `${type}:${fromProjectPathRelative(input)}`,\n    type: requestTypes.entry_request,\n    run,\n    input,\n  };\n}\n\nasync function run({input, api, options}): Promise<EntryRequestResult> {\n  let entryResolver = new EntryResolver(options);\n  let filePath = fromProjectPath(options.projectRoot, input);\n  let result = await entryResolver.resolveEntry(filePath);\n\n  // Connect files like package.json that affect the entry\n  // resolution so we invalidate when they change.\n  for (let file of result.files) {\n    api.invalidateOnFileUpdate(file.filePath);\n    api.invalidateOnFileDelete(file.filePath);\n  }\n\n  // If the entry specifier is a glob, add a glob node so\n  // we invalidate when a new file matches.\n  for (let glob of result.globs) {\n    api.invalidateOnFileCreate({\n      glob: toProjectPath(options.projectRoot, glob),\n    });\n  }\n\n  // Invalidate whenever an entry is deleted.\n  // If the entry was a glob, we'll re-evaluate it, and otherwise\n  // a proper entry error will be thrown.\n  for (let entry of result.entries) {\n    api.invalidateOnFileDelete(entry.filePath);\n  }\n\n  return result;\n}\n\nasync function assertFile(\n  fs: FileSystem,\n  entry: FilePath,\n  relativeSource: FilePath,\n  pkgFilePath: FilePath,\n  keyPath: string,\n  options: ParcelOptions,\n) {\n  let source = path.join(entry, relativeSource);\n  let stat;\n  try {\n    stat = await fs.stat(source);\n  } catch (err) {\n    let contents = await fs.readFile(pkgFilePath, 'utf8');\n    let alternatives = await findAlternativeFiles(\n      fs,\n      relativeSource,\n      entry,\n      options.projectRoot,\n      false,\n    );\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        origin: '@parcel/core',\n        message: md`${path.relative(process.cwd(), source)} does not exist.`,\n        codeFrames: [\n          {\n            filePath: pkgFilePath,\n            codeHighlights: generateJSONCodeHighlights(contents, [\n              {\n                key: keyPath,\n                type: 'value',\n              },\n            ]),\n          },\n        ],\n        hints: alternatives.map(r => {\n          return md`Did you mean '__${r}__'?`;\n        }),\n      },\n    });\n  }\n\n  if (!stat.isFile()) {\n    let contents = await fs.readFile(pkgFilePath, 'utf8');\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        origin: '@parcel/core',\n        message: md`${path.relative(process.cwd(), source)} is not a file.`,\n        codeFrames: [\n          {\n            filePath: pkgFilePath,\n            codeHighlights: generateJSONCodeHighlights(contents, [\n              {\n                key: keyPath,\n                type: 'value',\n              },\n            ]),\n          },\n        ],\n      },\n    });\n  }\n}\n\nexport class EntryResolver {\n  options: ParcelOptions;\n\n  constructor(options: ParcelOptions) {\n    this.options = options;\n  }\n\n  async resolveEntry(entry: FilePath): Promise<EntryRequestResult> {\n    let stat;\n    try {\n      stat = await this.options.inputFS.stat(entry);\n    } catch (err) {\n      if (!isGlob(entry)) {\n        throw new ThrowableDiagnostic({\n          diagnostic: {\n            message: md`Entry ${entry} does not exist`,\n          },\n        });\n      }\n      let files = await glob(entry, this.options.inputFS, {\n        absolute: true,\n        onlyFiles: false,\n      });\n      let results = await Promise.all(\n        files.map(f => this.resolveEntry(path.normalize(f))),\n      );\n      return results.reduce(\n        (p, res) => ({\n          entries: p.entries.concat(res.entries),\n          files: p.files.concat(res.files),\n          globs: p.globs.concat(res.globs),\n        }),\n        {entries: [], files: [], globs: [entry]},\n      );\n    }\n\n    if (stat.isDirectory()) {\n      let pkg = await this.readPackage(entry);\n\n      if (pkg) {\n        let {filePath} = pkg;\n        let entries = [];\n        let files = [\n          {\n            filePath: toProjectPath(this.options.projectRoot, filePath),\n          },\n        ];\n        let globs = [];\n\n        let targetsWithSources = 0;\n        if (pkg.targets) {\n          for (let targetName in pkg.targets) {\n            let target = pkg.targets[targetName];\n            if (target.source != null) {\n              targetsWithSources++;\n              let targetSources = Array.isArray(target.source)\n                ? target.source\n                : [target.source];\n              let i = 0;\n              for (let source of targetSources) {\n                let sources;\n                if (isGlob(source)) {\n                  globs.push(source);\n                  sources = await glob(source, this.options.inputFS, {\n                    onlyFiles: true,\n                    cwd: entry,\n                  });\n                } else {\n                  sources = [source];\n                }\n                let keyPath = `/targets/${targetName}/source${\n                  Array.isArray(target.source) ? `/${i}` : ''\n                }`;\n                for (let relativeSource of sources) {\n                  let source = path.join(entry, relativeSource);\n                  await assertFile(\n                    this.options.inputFS,\n                    entry,\n                    relativeSource,\n                    filePath,\n                    keyPath,\n                    this.options,\n                  );\n\n                  entries.push({\n                    filePath: toProjectPath(this.options.projectRoot, source),\n                    packagePath: toProjectPath(this.options.projectRoot, entry),\n                    target: targetName,\n                    loc: {\n                      filePath: toProjectPath(\n                        this.options.projectRoot,\n                        pkg.filePath,\n                      ),\n                      ...getJSONSourceLocation(\n                        pkg.map.pointers[keyPath],\n                        'value',\n                      ),\n                    },\n                  });\n                }\n                i++;\n              }\n            }\n          }\n        }\n\n        let allTargetsHaveSource =\n          targetsWithSources > 0 &&\n          pkg != null &&\n          pkg.targets != null &&\n          Object.keys(pkg.targets).length === targetsWithSources;\n\n        if (!allTargetsHaveSource && pkg.source != null) {\n          let pkgSources = Array.isArray(pkg.source)\n            ? pkg.source\n            : [pkg.source];\n          let i = 0;\n          for (let pkgSource of pkgSources) {\n            let sources;\n            if (isGlob(pkgSource)) {\n              globs.push(pkgSource);\n              sources = await glob(pkgSource, this.options.inputFS, {\n                onlyFiles: true,\n                cwd: path.dirname(filePath),\n              });\n            } else {\n              sources = [pkgSource];\n            }\n            let keyPath = `/source${Array.isArray(pkg.source) ? `/${i}` : ''}`;\n            for (let relativeSource of sources) {\n              let source = path.join(path.dirname(filePath), relativeSource);\n              await assertFile(\n                this.options.inputFS,\n                entry,\n                relativeSource,\n                filePath,\n                keyPath,\n                this.options,\n              );\n              entries.push({\n                filePath: toProjectPath(this.options.projectRoot, source),\n                packagePath: toProjectPath(this.options.projectRoot, entry),\n                loc: {\n                  filePath: toProjectPath(\n                    this.options.projectRoot,\n                    pkg.filePath,\n                  ),\n                  ...getJSONSourceLocation(pkg.map.pointers[keyPath], 'value'),\n                },\n              });\n            }\n            i++;\n          }\n        }\n\n        // Only return if we found any valid entries\n        if (entries.length && files.length) {\n          return {\n            entries,\n            files,\n            globs,\n          };\n        }\n      }\n\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: md`Could not find entry: ${entry}`,\n        },\n      });\n    } else if (stat.isFile()) {\n      let projectRoot = this.options.projectRoot;\n      let packagePath = isDirectoryInside(\n        this.options.inputFS.cwd(),\n        projectRoot,\n      )\n        ? this.options.inputFS.cwd()\n        : projectRoot;\n\n      return {\n        entries: [\n          {\n            filePath: toProjectPath(this.options.projectRoot, entry),\n            packagePath: toProjectPath(this.options.projectRoot, packagePath),\n          },\n        ],\n        files: [],\n        globs: [],\n      };\n    }\n\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: md`Unknown entry: ${entry}`,\n      },\n    });\n  }\n\n  async readPackage(entry: FilePath): Promise<?{\n    ...PackageJSON,\n    filePath: FilePath,\n    map: {|data: mixed, pointers: {|[string]: Mapping|}|},\n    ...\n  }> {\n    let content, pkg;\n    let pkgFile = path.join(entry, 'package.json');\n    try {\n      content = await this.options.inputFS.readFile(pkgFile, 'utf8');\n    } catch (err) {\n      return null;\n    }\n\n    try {\n      pkg = JSON.parse(content);\n    } catch (err) {\n      // TODO: code frame?\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: md`Error parsing ${path.relative(\n            this.options.inputFS.cwd(),\n            pkgFile,\n          )}: ${err.message}`,\n        },\n      });\n    }\n\n    return {\n      ...pkg,\n      filePath: pkgFile,\n      map: parse(content, undefined, {tabWidth: 1}),\n    };\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/PackageRequest.js",
    "content": "// @flow strict-local\n\nimport type {ContentKey} from '@parcel/graph';\nimport type {Async} from '@parcel/types';\nimport type {SharedReference} from '@parcel/workers';\n\nimport type {StaticRunOpts} from '../RequestTracker';\nimport {requestTypes, type RunAPI} from '../RequestTracker';\nimport type {Bundle} from '../types';\nimport type BundleGraph from '../BundleGraph';\nimport type {BundleInfo, RunPackagerRunnerResult} from '../PackagerRunner';\nimport type {ConfigAndCachePath} from './ParcelConfigRequest';\n\nimport nullthrows from 'nullthrows';\nimport {runConfigRequest} from './ConfigRequest';\nimport {getDevDepRequests, runDevDepRequest} from './DevDepRequest';\nimport createParcelConfigRequest from './ParcelConfigRequest';\nimport type {WriteBundlesRequestResult} from './WriteBundlesRequest';\n\ntype PackageRequestInput = {|\n  bundleGraph: BundleGraph,\n  bundle: Bundle,\n  bundleGraphReference: SharedReference,\n  optionsRef: SharedReference,\n  useMainThread?: boolean,\n|};\n\nexport type PackageRequestResult = {|\n  hash: string,\n  info: BundleInfo[],\n|};\n\ntype RunInput<TResult> = {|\n  input: PackageRequestInput,\n  ...StaticRunOpts<TResult>,\n|};\n\nexport type PackageRequest = {|\n  id: ContentKey,\n  +type: typeof requestTypes.package_request,\n  run: (RunInput<PackageRequestResult>) => Async<PackageRequestResult>,\n  input: PackageRequestInput,\n|};\n\nexport function createPackageRequest(\n  input: PackageRequestInput,\n): PackageRequest {\n  return {\n    type: requestTypes.package_request,\n    id: getPackageRequestId(input.bundle),\n    run,\n    input,\n  };\n}\n\nexport function getPackageRequestId(bundle: Bundle): string {\n  return 'package:' + bundle.id;\n}\n\nexport async function canSkipPackageRequest(\n  api: RunAPI<WriteBundlesRequestResult>,\n  request: PackageRequest,\n): Promise<boolean> {\n  return (\n    api.canSkipSubrequest(request.id) &&\n    (await api.getRequestResult<PackageRequestResult>(request.id))?.hash ===\n      request.input.bundleGraph.getHash(request.input.bundle)\n  );\n}\n\nasync function run({input, api, farm}) {\n  let {bundleGraphReference, optionsRef, bundle, useMainThread} = input;\n  let runPackage = farm.createHandle('runPackage', useMainThread);\n\n  let start = Date.now();\n  let {devDeps, invalidDevDeps} = await getDevDepRequests(api);\n  let {cachePath} = nullthrows(\n    await api.runRequest<null, ConfigAndCachePath>(createParcelConfigRequest()),\n  );\n\n  let {devDepRequests, configRequests, bundleInfo, invalidations} =\n    (await runPackage({\n      bundle,\n      bundleGraphReference,\n      optionsRef,\n      configCachePath: cachePath,\n      previousDevDeps: devDeps,\n      invalidDevDeps,\n      previousInvalidations: api.getInvalidations(),\n    }): RunPackagerRunnerResult);\n\n  for (let devDepRequest of devDepRequests) {\n    await runDevDepRequest(api, devDepRequest);\n  }\n\n  for (let configRequest of configRequests) {\n    await runConfigRequest(api, configRequest);\n  }\n\n  for (let invalidation of invalidations) {\n    switch (invalidation.type) {\n      case 'file':\n        api.invalidateOnFileUpdate(invalidation.filePath);\n        api.invalidateOnFileDelete(invalidation.filePath);\n        break;\n      case 'env':\n        api.invalidateOnEnvChange(invalidation.key);\n        break;\n      case 'option':\n        api.invalidateOnOptionChange(invalidation.key);\n        break;\n      default:\n        throw new Error(`Unknown invalidation type: ${invalidation.type}`);\n    }\n  }\n\n  for (let info of bundleInfo) {\n    // $FlowFixMe[cannot-write] time is marked read-only, but this is the exception\n    info.time = Date.now() - start;\n  }\n\n  let res = {\n    hash: input.bundleGraph.getHash(input.bundle),\n    info: bundleInfo,\n  };\n\n  api.storeResult(res);\n  return res;\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/ParcelBuildRequest.js",
    "content": "// @flow strict-local\n\nimport type {ContentKey} from '@parcel/graph';\nimport type {Async} from '@parcel/types';\nimport type {SharedReference} from '@parcel/workers';\n\nimport type {StaticRunOpts} from '../RequestTracker';\nimport type {Asset, AssetGroup, PackagedBundleInfo} from '../types';\nimport type BundleGraph from '../BundleGraph';\n\nimport createBundleGraphRequest, {\n  type BundleGraphResult,\n} from './BundleGraphRequest';\nimport createWriteBundlesRequest from './WriteBundlesRequest';\nimport {assertSignalNotAborted} from '../utils';\nimport dumpGraphToGraphViz from '../dumpGraphToGraphViz';\nimport {bundleGraphEdgeTypes} from '../BundleGraph';\nimport {report} from '../ReporterRunner';\nimport IBundleGraph from '../public/BundleGraph';\nimport {NamedBundle} from '../public/Bundle';\nimport {assetFromValue} from '../public/Asset';\n\nimport {tracer} from '@parcel/profiler';\nimport {requestTypes} from '../RequestTracker';\n\ntype ParcelBuildRequestInput = {|\n  optionsRef: SharedReference,\n  requestedAssetIds: Set<string>,\n  signal?: AbortSignal,\n|};\n\nexport type ParcelBuildRequestResult = {|\n  bundleGraph: BundleGraph,\n  bundleInfo: Map<string, PackagedBundleInfo[]>,\n  changedAssets: Map<string, Asset>,\n  assetRequests: Array<AssetGroup>,\n|};\n\ntype RunInput<TResult> = {|\n  input: ParcelBuildRequestInput,\n  ...StaticRunOpts<TResult>,\n|};\n\nexport type ParcelBuildRequest = {|\n  id: ContentKey,\n  +type: typeof requestTypes.parcel_build_request,\n  run: (RunInput<ParcelBuildRequestResult>) => Async<ParcelBuildRequestResult>,\n  input: ParcelBuildRequestInput,\n|};\n\nexport default function createParcelBuildRequest(\n  input: ParcelBuildRequestInput,\n): ParcelBuildRequest {\n  return {\n    type: requestTypes.parcel_build_request,\n    id: 'parcel_build_request',\n    run,\n    input,\n  };\n}\n\nasync function run({input, api, options}) {\n  let {optionsRef, requestedAssetIds, signal} = input;\n\n  let bundleGraphRequest = createBundleGraphRequest({\n    optionsRef,\n    requestedAssetIds,\n    signal,\n  });\n\n  let {bundleGraph, changedAssets, assetRequests}: BundleGraphResult =\n    await api.runRequest(bundleGraphRequest, {\n      force: options.shouldBuildLazily && requestedAssetIds.size > 0,\n    });\n\n  // $FlowFixMe Added in Flow 0.121.0 upgrade in #4381 (Windows only)\n  dumpGraphToGraphViz(bundleGraph._graph, 'BundleGraph', bundleGraphEdgeTypes);\n\n  await report({\n    type: 'buildProgress',\n    phase: 'bundled',\n    bundleGraph: new IBundleGraph(\n      bundleGraph,\n      (bundle, bundleGraph, options) =>\n        NamedBundle.get(bundle, bundleGraph, options),\n      options,\n    ),\n    changedAssets: new Map(\n      Array.from(changedAssets).map(([id, asset]) => [\n        id,\n        assetFromValue(asset, options),\n      ]),\n    ),\n  });\n\n  let packagingMeasurement = tracer.createMeasurement('packaging');\n  let writeBundlesRequest = createWriteBundlesRequest({\n    bundleGraph,\n    optionsRef,\n  });\n\n  let bundleInfo = await api.runRequest(writeBundlesRequest);\n  packagingMeasurement && packagingMeasurement.end();\n  assertSignalNotAborted(signal);\n\n  return {bundleGraph, bundleInfo, changedAssets, assetRequests};\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/ParcelConfigRequest.js",
    "content": "// @flow strict-local\nimport type {\n  Async,\n  FilePath,\n  PackageName,\n  RawParcelConfig,\n  ResolvedParcelConfigFile,\n} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {StaticRunOpts} from '../RequestTracker';\nimport type {\n  ExtendableParcelConfigPipeline,\n  PureParcelConfigPipeline,\n  ParcelOptions,\n  ProcessedParcelConfig,\n} from '../types';\n\nimport {\n  isDirectoryInside,\n  hashObject,\n  resolveConfig,\n  validateSchema,\n  findAlternativeNodeModules,\n  findAlternativeFiles,\n} from '@parcel/utils';\nimport ThrowableDiagnostic, {\n  generateJSONCodeHighlights,\n  escapeMarkdown,\n  md,\n  errorToDiagnostic,\n} from '@parcel/diagnostic';\nimport {parse} from 'json5';\nimport path from 'path';\nimport invariant from 'assert';\n\nimport ParcelConfigSchema from '../ParcelConfig.schema';\nimport {optionsProxy} from '../utils';\nimport ParcelConfig from '../ParcelConfig';\nimport {createBuildCache} from '../buildCache';\nimport {toProjectPath} from '../projectPath';\nimport {requestTypes} from '../RequestTracker';\n\ntype ConfigMap<K, V> = {[K]: V, ...};\n\nexport type ConfigAndCachePath = {|\n  config: ProcessedParcelConfig,\n  cachePath: string,\n|};\n\ntype RunOpts<TResult> = {|\n  input: null,\n  ...StaticRunOpts<TResult>,\n|};\n\nexport type ParcelConfigRequest = {|\n  id: string,\n  type: typeof requestTypes.parcel_config_request,\n  input: null,\n  run: (RunOpts<ParcelConfigRequestResult>) => Async<ParcelConfigRequestResult>,\n|};\n\nexport type ParcelConfigRequestResult = ConfigAndCachePath;\n\ntype ParcelConfigChain = {|\n  config: ProcessedParcelConfig,\n  extendedFiles: Array<FilePath>,\n|};\n\nconst type = 'parcel_config_request';\n\nexport default function createParcelConfigRequest(): ParcelConfigRequest {\n  return {\n    id: type,\n    type: requestTypes[type],\n    async run({api, options}) {\n      let {\n        config,\n        extendedFiles,\n        usedDefault,\n      }: {|\n        ...ParcelConfigChain,\n        usedDefault: boolean,\n      |} = await loadParcelConfig(\n        optionsProxy(options, api.invalidateOnOptionChange),\n      );\n\n      api.invalidateOnFileUpdate(config.filePath);\n      api.invalidateOnFileDelete(config.filePath);\n\n      for (let filePath of extendedFiles) {\n        let pp = toProjectPath(options.projectRoot, filePath);\n        api.invalidateOnFileUpdate(pp);\n        api.invalidateOnFileDelete(pp);\n      }\n\n      if (usedDefault) {\n        let resolveFrom = getResolveFrom(options.inputFS, options.projectRoot);\n        api.invalidateOnFileCreate({\n          fileName: '.parcelrc',\n          aboveFilePath: toProjectPath(options.projectRoot, resolveFrom),\n        });\n      }\n\n      let cachePath = hashObject(config);\n      await options.cache.set(cachePath, config);\n      let result = {config, cachePath};\n      // TODO: don't store config twice (once in the graph and once in a separate cache entry)\n      api.storeResult(result);\n      return result;\n    },\n    input: null,\n  };\n}\n\nconst parcelConfigCache = createBuildCache();\nexport function getCachedParcelConfig(\n  result: ConfigAndCachePath,\n  options: ParcelOptions,\n): ParcelConfig {\n  let {config: processedConfig, cachePath} = result;\n  let config = parcelConfigCache.get(cachePath);\n  if (config) {\n    return config;\n  }\n\n  config = new ParcelConfig(processedConfig, options);\n\n  parcelConfigCache.set(cachePath, config);\n  return config;\n}\n\nexport async function loadParcelConfig(\n  options: ParcelOptions,\n): Promise<{|...ParcelConfigChain, usedDefault: boolean|}> {\n  let parcelConfig = await resolveParcelConfig(options);\n\n  if (!parcelConfig) {\n    throw new Error('Could not find a .parcelrc');\n  }\n\n  return parcelConfig;\n}\n\nexport async function resolveParcelConfig(\n  options: ParcelOptions,\n): Promise<?{|...ParcelConfigChain, usedDefault: boolean|}> {\n  let resolveFrom = getResolveFrom(options.inputFS, options.projectRoot);\n  let configPath =\n    options.config != null\n      ? (await options.packageManager.resolve(options.config, resolveFrom))\n          .resolved\n      : await resolveConfig(\n          options.inputFS,\n          resolveFrom,\n          ['.parcelrc'],\n          options.projectRoot,\n        );\n\n  let usedDefault = false;\n  if (configPath == null && options.defaultConfig != null) {\n    usedDefault = true;\n    configPath = (\n      await options.packageManager.resolve(options.defaultConfig, resolveFrom)\n    ).resolved;\n  }\n\n  if (configPath == null) {\n    return null;\n  }\n\n  let contents;\n  try {\n    contents = await options.inputFS.readFile(configPath, 'utf8');\n  } catch (e) {\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: md`Could not find parcel config at ${path.relative(\n          options.projectRoot,\n          configPath,\n        )}`,\n        origin: '@parcel/core',\n      },\n    });\n  }\n\n  let {config, extendedFiles}: ParcelConfigChain = await parseAndProcessConfig(\n    configPath,\n    contents,\n    options,\n  );\n\n  if (options.additionalReporters.length > 0) {\n    config.reporters = [\n      ...options.additionalReporters.map(({packageName, resolveFrom}) => ({\n        packageName,\n        resolveFrom,\n      })),\n      ...(config.reporters ?? []),\n    ];\n  }\n\n  return {config, extendedFiles, usedDefault};\n}\n\nexport function create(\n  config: ResolvedParcelConfigFile,\n  options: ParcelOptions,\n): Promise<ParcelConfigChain> {\n  return processConfigChain(config, config.filePath, options);\n}\n\n// eslint-disable-next-line require-await\nexport async function parseAndProcessConfig(\n  configPath: FilePath,\n  contents: string,\n  options: ParcelOptions,\n): Promise<ParcelConfigChain> {\n  let config: RawParcelConfig;\n  try {\n    config = parse(contents);\n  } catch (e) {\n    let pos = {\n      line: e.lineNumber,\n      column: e.columnNumber,\n    };\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: `Failed to parse .parcelrc`,\n        origin: '@parcel/core',\n\n        codeFrames: [\n          {\n            filePath: configPath,\n            language: 'json5',\n            code: contents,\n            codeHighlights: [\n              {\n                start: pos,\n                end: pos,\n                message: escapeMarkdown(e.message),\n              },\n            ],\n          },\n        ],\n      },\n    });\n  }\n  return processConfigChain(config, configPath, options);\n}\n\nfunction processPipeline(\n  options: ParcelOptions,\n  pipeline: ?Array<PackageName>,\n  keyPath: string,\n  filePath: FilePath,\n) {\n  if (pipeline) {\n    return pipeline.map((pkg, i) => {\n      // $FlowFixMe\n      if (pkg === '...') return pkg;\n\n      return {\n        packageName: pkg,\n        resolveFrom: toProjectPath(options.projectRoot, filePath),\n        keyPath: `${keyPath}/${i}`,\n      };\n    });\n  }\n}\n\nconst RESERVED_PIPELINES = new Set([\n  'node:',\n  'npm:',\n  'http:',\n  'https:',\n  'data:',\n  'tel:',\n  'mailto:',\n]);\n\nasync function processMap(\n  // $FlowFixMe\n  map: ?ConfigMap<any, any>,\n  keyPath: string,\n  filePath: FilePath,\n  options: ParcelOptions,\n  // $FlowFixMe\n): Promise<ConfigMap<any, any> | typeof undefined> {\n  if (!map) return undefined;\n\n  // $FlowFixMe\n  let res: ConfigMap<any, any> = {};\n  for (let k in map) {\n    let i = k.indexOf(':');\n    if (i > 0 && RESERVED_PIPELINES.has(k.slice(0, i + 1))) {\n      let code = await options.inputFS.readFile(filePath, 'utf8');\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: `Named pipeline '${k.slice(0, i + 1)}' is reserved.`,\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: filePath,\n              language: 'json5',\n              code,\n              codeHighlights: generateJSONCodeHighlights(code, [\n                {\n                  key: `${keyPath}/${k}`,\n                  type: 'key',\n                },\n              ]),\n            },\n          ],\n          documentationURL:\n            'https://parceljs.org/features/dependency-resolution/#url-schemes',\n        },\n      });\n    }\n\n    if (typeof map[k] === 'string') {\n      res[k] = {\n        packageName: map[k],\n        resolveFrom: toProjectPath(options.projectRoot, filePath),\n        keyPath: `${keyPath}/${k}`,\n      };\n    } else {\n      res[k] = processPipeline(options, map[k], `${keyPath}/${k}`, filePath);\n    }\n  }\n\n  return res;\n}\n\nexport async function processConfig(\n  configFile: ResolvedParcelConfigFile,\n  options: ParcelOptions,\n): Promise<ProcessedParcelConfig> {\n  return {\n    filePath: toProjectPath(options.projectRoot, configFile.filePath),\n    ...(configFile.resolveFrom != null\n      ? {\n          resolveFrom: toProjectPath(\n            options.projectRoot,\n            configFile.resolveFrom,\n          ),\n        }\n      : {\n          /*::...null*/\n        }),\n    resolvers: processPipeline(\n      options,\n      configFile.resolvers,\n      '/resolvers',\n      configFile.filePath,\n    ),\n    transformers: await processMap(\n      configFile.transformers,\n      '/transformers',\n      configFile.filePath,\n      options,\n    ),\n    bundler:\n      configFile.bundler != null\n        ? {\n            packageName: configFile.bundler,\n            resolveFrom: toProjectPath(\n              options.projectRoot,\n              configFile.filePath,\n            ),\n            keyPath: '/bundler',\n          }\n        : undefined,\n    namers: processPipeline(\n      options,\n      configFile.namers,\n      '/namers',\n      configFile.filePath,\n    ),\n    runtimes: processPipeline(\n      options,\n      configFile.runtimes,\n      '/runtimes',\n      configFile.filePath,\n    ),\n    packagers: await processMap(\n      configFile.packagers,\n      '/packagers',\n      configFile.filePath,\n      options,\n    ),\n    optimizers: await processMap(\n      configFile.optimizers,\n      '/optimizers',\n      configFile.filePath,\n      options,\n    ),\n    compressors: await processMap(\n      configFile.compressors,\n      '/compressors',\n      configFile.filePath,\n      options,\n    ),\n    reporters: processPipeline(\n      options,\n      configFile.reporters,\n      '/reporters',\n      configFile.filePath,\n    ),\n    validators: await processMap(\n      configFile.validators,\n      '/validators',\n      configFile.filePath,\n      options,\n    ),\n  };\n}\n\nexport async function processConfigChain(\n  configFile: RawParcelConfig | ResolvedParcelConfigFile,\n  filePath: FilePath,\n  options: ParcelOptions,\n): Promise<ParcelConfigChain> {\n  // Validate config...\n  let relativePath = path.relative(options.inputFS.cwd(), filePath);\n  validateConfigFile(configFile, relativePath);\n\n  // Process config...\n  let config: ProcessedParcelConfig = await processConfig(\n    {\n      filePath,\n      ...configFile,\n    },\n    options,\n  );\n\n  let extendedFiles: Array<FilePath> = [];\n  if (configFile.extends != null) {\n    let exts = Array.isArray(configFile.extends)\n      ? configFile.extends\n      : [configFile.extends];\n    let errors = [];\n    if (exts.length !== 0) {\n      let extStartConfig;\n      let i = 0;\n      for (let ext of exts) {\n        try {\n          let key = Array.isArray(configFile.extends)\n            ? `/extends/${i}`\n            : '/extends';\n          let resolved = await resolveExtends(ext, filePath, key, options);\n          extendedFiles.push(resolved);\n          let {extendedFiles: moreExtendedFiles, config: nextConfig} =\n            await processExtendedConfig(filePath, key, ext, resolved, options);\n          extendedFiles = extendedFiles.concat(moreExtendedFiles);\n          extStartConfig = extStartConfig\n            ? mergeConfigs(extStartConfig, nextConfig)\n            : nextConfig;\n        } catch (err) {\n          errors.push(err);\n        }\n\n        i++;\n      }\n\n      // Merge with the inline config last\n      if (extStartConfig) {\n        config = mergeConfigs(extStartConfig, config);\n      }\n    }\n\n    if (errors.length > 0) {\n      throw new ThrowableDiagnostic({\n        diagnostic: errors.flatMap(e => e.diagnostics ?? errorToDiagnostic(e)),\n      });\n    }\n  }\n\n  return {config, extendedFiles};\n}\n\nexport async function resolveExtends(\n  ext: string,\n  configPath: FilePath,\n  extendsKey: string,\n  options: ParcelOptions,\n): Promise<FilePath> {\n  if (ext.startsWith('.')) {\n    return path.resolve(path.dirname(configPath), ext);\n  } else {\n    try {\n      let {resolved} = await options.packageManager.resolve(ext, configPath);\n      return options.inputFS.realpath(resolved);\n    } catch (err) {\n      let parentContents = await options.inputFS.readFile(configPath, 'utf8');\n      let alternatives = await findAlternativeNodeModules(\n        options.inputFS,\n        ext,\n        path.dirname(configPath),\n      );\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: `Cannot find extended parcel config`,\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: configPath,\n              language: 'json5',\n              code: parentContents,\n              codeHighlights: generateJSONCodeHighlights(parentContents, [\n                {\n                  key: extendsKey,\n                  type: 'value',\n                  message: md`Cannot find module \"${ext}\"${\n                    alternatives[0]\n                      ? `, did you mean \"${alternatives[0]}\"?`\n                      : ''\n                  }`,\n                },\n              ]),\n            },\n          ],\n        },\n      });\n    }\n  }\n}\n\nasync function processExtendedConfig(\n  configPath: FilePath,\n  extendsKey: string,\n  extendsSpecifier: string,\n  resolvedExtendedConfigPath: FilePath,\n  options: ParcelOptions,\n): Promise<ParcelConfigChain> {\n  let contents;\n  try {\n    contents = await options.inputFS.readFile(\n      resolvedExtendedConfigPath,\n      'utf8',\n    );\n  } catch (e) {\n    let parentContents = await options.inputFS.readFile(configPath, 'utf8');\n    let alternatives = await findAlternativeFiles(\n      options.inputFS,\n      extendsSpecifier,\n      path.dirname(resolvedExtendedConfigPath),\n      options.projectRoot,\n    );\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: 'Cannot find extended parcel config',\n        origin: '@parcel/core',\n        codeFrames: [\n          {\n            filePath: configPath,\n            language: 'json5',\n            code: parentContents,\n            codeHighlights: generateJSONCodeHighlights(parentContents, [\n              {\n                key: extendsKey,\n                type: 'value',\n                message: md`\"${extendsSpecifier}\" does not exist${\n                  alternatives[0] ? `, did you mean \"${alternatives[0]}\"?` : ''\n                }`,\n              },\n            ]),\n          },\n        ],\n      },\n    });\n  }\n\n  return parseAndProcessConfig(resolvedExtendedConfigPath, contents, options);\n}\n\nexport function validateConfigFile(\n  config: RawParcelConfig | ResolvedParcelConfigFile,\n  relativePath: FilePath,\n) {\n  try {\n    validateNotEmpty(config, relativePath);\n  } catch (e) {\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: e.message,\n        origin: '@parcel/core',\n      },\n    });\n  }\n\n  validateSchema.diagnostic(\n    ParcelConfigSchema,\n    {data: config, filePath: relativePath},\n    '@parcel/core',\n    'Invalid Parcel Config',\n  );\n}\n\nexport function validateNotEmpty(\n  config: RawParcelConfig | ResolvedParcelConfigFile,\n  relativePath: FilePath,\n) {\n  invariant.notDeepStrictEqual(config, {}, `${relativePath} can't be empty`);\n}\n\nexport function mergeConfigs(\n  base: ProcessedParcelConfig,\n  ext: ProcessedParcelConfig,\n): ProcessedParcelConfig {\n  return {\n    filePath: ext.filePath,\n    resolvers: assertPurePipeline(\n      mergePipelines(base.resolvers, ext.resolvers),\n    ),\n    transformers: mergeMaps(\n      base.transformers,\n      ext.transformers,\n      mergePipelines,\n    ),\n    validators: mergeMaps(base.validators, ext.validators, mergePipelines),\n    bundler: ext.bundler || base.bundler,\n    namers: assertPurePipeline(mergePipelines(base.namers, ext.namers)),\n    runtimes: assertPurePipeline(mergePipelines(base.runtimes, ext.runtimes)),\n    packagers: mergeMaps(base.packagers, ext.packagers),\n    optimizers: mergeMaps(base.optimizers, ext.optimizers, mergePipelines),\n    compressors: mergeMaps(base.compressors, ext.compressors, mergePipelines),\n    reporters: assertPurePipeline(\n      mergePipelines(base.reporters, ext.reporters),\n    ),\n  };\n}\n\nexport function getResolveFrom(\n  fs: FileSystem,\n  projectRoot: FilePath,\n): FilePath {\n  let cwd = fs.cwd();\n  let dir = isDirectoryInside(cwd, projectRoot) ? cwd : projectRoot;\n  return path.join(dir, 'index');\n}\n\nfunction assertPurePipeline(\n  pipeline: ExtendableParcelConfigPipeline,\n): PureParcelConfigPipeline {\n  return pipeline.map(s => {\n    invariant(typeof s !== 'string');\n    return s;\n  });\n}\n\nexport function mergePipelines(\n  base: ?ExtendableParcelConfigPipeline,\n  ext: ?ExtendableParcelConfigPipeline,\n): ExtendableParcelConfigPipeline {\n  if (ext == null) {\n    return base ?? [];\n  }\n\n  if (ext.filter(v => v === '...').length > 1) {\n    throw new Error(\n      'Only one spread element can be included in a config pipeline',\n    );\n  }\n\n  // Merge the base pipeline if a rest element is defined\n  let spreadIndex = ext.indexOf('...');\n  if (spreadIndex >= 0) {\n    return [\n      ...ext.slice(0, spreadIndex),\n      ...(base ?? []),\n      ...ext.slice(spreadIndex + 1),\n    ];\n  } else {\n    return ext;\n  }\n}\n\nexport function mergeMaps<K: string, V>(\n  base: ?ConfigMap<K, V>,\n  ext: ?ConfigMap<K, V>,\n  merger?: (a: V, b: V) => V,\n): ConfigMap<K, V> {\n  if (!ext || Object.keys(ext).length === 0) {\n    return base || {};\n  }\n\n  if (!base) {\n    return ext;\n  }\n\n  let res: ConfigMap<K, V> = {};\n  // Add the extension options first so they have higher precedence in the output glob map\n  for (let k in ext) {\n    //$FlowFixMe Flow doesn't correctly infer the type. See https://github.com/facebook/flow/issues/1736.\n    let key: K = (k: any);\n    res[key] =\n      merger && base[key] != null ? merger(base[key], ext[key]) : ext[key];\n  }\n\n  // Add base options that aren't defined in the extension\n  for (let k in base) {\n    // $FlowFixMe\n    let key: K = (k: any);\n    if (res[key] == null) {\n      res[key] = base[key];\n    }\n  }\n\n  return res;\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/PathRequest.js",
    "content": "// @flow strict-local\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {\n  Async,\n  FileCreateInvalidation,\n  FilePath,\n  Resolver,\n} from '@parcel/types';\nimport type {StaticRunOpts} from '../RequestTracker';\nimport type {\n  AssetGroup,\n  Config,\n  Dependency,\n  DevDepRequest,\n  DevDepRequestRef,\n  ParcelOptions,\n} from '../types';\nimport type {ConfigAndCachePath} from './ParcelConfigRequest';\n\nimport ThrowableDiagnostic, {\n  convertSourceLocationToHighlight,\n  errorToDiagnostic,\n  md,\n} from '@parcel/diagnostic';\nimport {PluginLogger} from '@parcel/logger';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport {normalizePath} from '@parcel/utils';\nimport {report} from '../ReporterRunner';\nimport {getPublicDependency} from '../public/Dependency';\nimport PluginOptions from '../public/PluginOptions';\nimport ParcelConfig from '../ParcelConfig';\nimport createParcelConfigRequest, {\n  getCachedParcelConfig,\n} from './ParcelConfigRequest';\nimport {invalidateOnFileCreateToInternal} from '../utils';\nimport {\n  fromProjectPath,\n  fromProjectPathRelative,\n  toProjectPath,\n  toProjectPathUnsafe,\n} from '../projectPath';\nimport {Priority} from '../types';\nimport {createBuildCache} from '../buildCache';\nimport type {LoadedPlugin} from '../ParcelConfig';\nimport {createConfig} from '../InternalConfig';\nimport {loadPluginConfig, runConfigRequest} from './ConfigRequest';\nimport {\n  createDevDependency,\n  getDevDepRequests,\n  invalidateDevDeps,\n  runDevDepRequest,\n} from './DevDepRequest';\nimport {tracer, PluginTracer} from '@parcel/profiler';\nimport {requestTypes} from '../RequestTracker';\n\nexport type PathRequest = {|\n  id: string,\n  +type: typeof requestTypes.path_request,\n  run: (RunOpts<PathRequestResult>) => Async<PathRequestResult>,\n  input: PathRequestInput,\n|};\n\nexport type PathRequestResult = null | void | AssetGroup;\n\nexport type PathRequestInput = {|\n  dependency: Dependency,\n  name: string,\n|};\n\ntype RunOpts<TResult> = {|\n  input: PathRequestInput,\n  ...StaticRunOpts<TResult>,\n|};\n\nconst PIPELINE_REGEX = /^([a-z0-9-]+?):(.*)$/i;\n\nexport default function createPathRequest(\n  input: PathRequestInput,\n): PathRequest {\n  return {\n    id: input.dependency.id + ':' + input.name,\n    type: requestTypes.path_request,\n    run,\n    input,\n  };\n}\n\nasync function run({input, api, options}): Promise<PathRequestResult> {\n  let configResult = nullthrows(\n    await api.runRequest<null, ConfigAndCachePath>(createParcelConfigRequest()),\n  );\n  let config = getCachedParcelConfig(configResult, options);\n  let {devDeps, invalidDevDeps} = await getDevDepRequests(api);\n  invalidateDevDeps(invalidDevDeps, options, config);\n  let resolverRunner = new ResolverRunner({\n    options,\n    config,\n    previousDevDeps: devDeps,\n  });\n  let result: ResolverResult = await resolverRunner.resolve(input.dependency);\n\n  if (result.invalidateOnEnvChange) {\n    for (let env of result.invalidateOnEnvChange) {\n      api.invalidateOnEnvChange(env);\n    }\n  }\n\n  if (result.invalidateOnFileCreate) {\n    for (let file of result.invalidateOnFileCreate) {\n      api.invalidateOnFileCreate(\n        invalidateOnFileCreateToInternal(options.projectRoot, file),\n      );\n    }\n  }\n\n  if (result.invalidateOnFileChange) {\n    for (let filePath of result.invalidateOnFileChange) {\n      let pp = toProjectPath(options.projectRoot, filePath);\n      api.invalidateOnFileUpdate(pp);\n      api.invalidateOnFileDelete(pp);\n    }\n  }\n\n  for (let config of resolverRunner.configs.values()) {\n    await runConfigRequest(api, config);\n  }\n\n  for (let devDepRequest of resolverRunner.devDepRequests.values()) {\n    await runDevDepRequest(api, devDepRequest);\n  }\n\n  if (result.assetGroup) {\n    api.invalidateOnFileDelete(result.assetGroup.filePath);\n    return result.assetGroup;\n  }\n\n  if (result.diagnostics && result.diagnostics.length > 0) {\n    let err = new ThrowableDiagnostic({diagnostic: result.diagnostics});\n    // $FlowFixMe[prop-missing]\n    err.code = 'MODULE_NOT_FOUND';\n    throw err;\n  }\n}\n\ntype ResolverRunnerOpts = {|\n  config: ParcelConfig,\n  options: ParcelOptions,\n  previousDevDeps: Map<string, string>,\n|};\n\ntype ResolverResult = {|\n  assetGroup: ?AssetGroup,\n  invalidateOnFileCreate?: Array<FileCreateInvalidation>,\n  invalidateOnFileChange?: Array<FilePath>,\n  invalidateOnEnvChange?: Array<string>,\n  diagnostics?: Array<Diagnostic>,\n|};\n\nconst configCache = createBuildCache();\n\nexport class ResolverRunner {\n  config: ParcelConfig;\n  options: ParcelOptions;\n  pluginOptions: PluginOptions;\n  previousDevDeps: Map<string, string>;\n  devDepRequests: Map<string, DevDepRequest | DevDepRequestRef>;\n  configs: Map<string, Config>;\n\n  constructor({config, options, previousDevDeps}: ResolverRunnerOpts) {\n    this.config = config;\n    this.options = options;\n    this.pluginOptions = new PluginOptions(this.options);\n    this.previousDevDeps = previousDevDeps;\n    this.devDepRequests = new Map();\n    this.configs = new Map();\n  }\n\n  async getDiagnostic(\n    dependency: Dependency,\n    message: string,\n  ): Async<Diagnostic> {\n    let diagnostic: Diagnostic = {\n      message,\n      origin: '@parcel/core',\n    };\n\n    if (dependency.loc && dependency.sourcePath != null) {\n      let filePath = fromProjectPath(\n        this.options.projectRoot,\n        dependency.sourcePath,\n      );\n      diagnostic.codeFrames = [\n        {\n          filePath,\n          code: await this.options.inputFS\n            .readFile(filePath, 'utf8')\n            .catch(() => ''),\n          codeHighlights: dependency.loc\n            ? [convertSourceLocationToHighlight(dependency.loc)]\n            : [],\n        },\n      ];\n    }\n\n    return diagnostic;\n  }\n\n  async loadConfigs(\n    resolvers: Array<LoadedPlugin<Resolver<mixed>>>,\n  ): Promise<void> {\n    for (let plugin of resolvers) {\n      // Only load config for a plugin once per build.\n      let config = configCache.get(plugin.name);\n      if (!config && plugin.plugin.loadConfig != null) {\n        config = createConfig({\n          plugin: plugin.name,\n          searchPath: toProjectPathUnsafe('index'),\n        });\n\n        await loadPluginConfig(plugin, config, this.options);\n        configCache.set(plugin.name, config);\n        this.configs.set(plugin.name, config);\n      }\n\n      if (config) {\n        for (let devDep of config.devDeps) {\n          let devDepRequest = await createDevDependency(\n            devDep,\n            this.previousDevDeps,\n            this.options,\n          );\n          this.runDevDepRequest(devDepRequest);\n        }\n\n        this.configs.set(plugin.name, config);\n      }\n    }\n  }\n\n  runDevDepRequest(devDepRequest: DevDepRequest | DevDepRequestRef) {\n    let {specifier, resolveFrom} = devDepRequest;\n    let key = `${specifier}:${fromProjectPathRelative(resolveFrom)}`;\n    this.devDepRequests.set(key, devDepRequest);\n  }\n\n  async resolve(dependency: Dependency): Promise<ResolverResult> {\n    let dep = getPublicDependency(dependency, this.options);\n    report({\n      type: 'buildProgress',\n      phase: 'resolving',\n      dependency: dep,\n    });\n\n    let resolvers = await this.config.getResolvers();\n    await this.loadConfigs(resolvers);\n\n    let pipeline;\n    let specifier;\n    let validPipelines = new Set(this.config.getNamedPipelines());\n    let match = dependency.specifier.match(PIPELINE_REGEX);\n    if (\n      match &&\n      // Don't consider absolute paths. Absolute paths are only supported for entries,\n      // and include e.g. `C:\\` on Windows, conflicting with pipelines.\n      !path.isAbsolute(dependency.specifier)\n    ) {\n      [, pipeline, specifier] = match;\n      if (!validPipelines.has(pipeline)) {\n        // This may be a url protocol or scheme rather than a pipeline, such as\n        // `url('http://example.com/foo.png')`. Pass it to resolvers to handle.\n        specifier = dependency.specifier;\n        pipeline = null;\n      }\n    } else {\n      specifier = dependency.specifier;\n    }\n\n    // Entrypoints, convert ProjectPath in module specifier to absolute path\n    if (dep.resolveFrom == null) {\n      specifier = path.join(this.options.projectRoot, specifier);\n    }\n    let diagnostics: Array<Diagnostic> = [];\n    let invalidateOnFileCreate = [];\n    let invalidateOnFileChange = [];\n    let invalidateOnEnvChange = [];\n    for (let resolver of resolvers) {\n      let measurement;\n      try {\n        measurement = tracer.createMeasurement(\n          resolver.name,\n          'resolve',\n          specifier,\n        );\n        let result = await resolver.plugin.resolve({\n          specifier,\n          pipeline,\n          dependency: dep,\n          options: this.pluginOptions,\n          logger: new PluginLogger({origin: resolver.name}),\n          tracer: new PluginTracer({\n            origin: resolver.name,\n            category: 'resolver',\n          }),\n          config: this.configs.get(resolver.name)?.result,\n        });\n        measurement && measurement.end();\n\n        if (result) {\n          if (result.meta) {\n            dependency.resolverMeta = result.meta;\n            dependency.meta = {\n              ...dependency.meta,\n              ...result.meta,\n            };\n          }\n\n          if (result.priority != null) {\n            dependency.priority = dependency.resolverPriority =\n              Priority[result.priority];\n          }\n\n          if (result.invalidateOnEnvChange) {\n            invalidateOnEnvChange.push(...result.invalidateOnEnvChange);\n          }\n\n          if (result.invalidateOnFileCreate) {\n            invalidateOnFileCreate.push(...result.invalidateOnFileCreate);\n          }\n\n          if (result.invalidateOnFileChange) {\n            invalidateOnFileChange.push(...result.invalidateOnFileChange);\n          }\n\n          if (result.isExcluded) {\n            return {\n              assetGroup: null,\n              invalidateOnFileCreate,\n              invalidateOnFileChange,\n              invalidateOnEnvChange,\n            };\n          }\n\n          if (result.filePath != null) {\n            let resultFilePath = result.filePath;\n            if (!path.isAbsolute(resultFilePath)) {\n              throw new Error(\n                md`Resolvers must return an absolute path, ${resolver.name} returned: ${resultFilePath}`,\n              );\n            }\n\n            return {\n              assetGroup: {\n                canDefer: result.canDefer,\n                filePath: toProjectPath(\n                  this.options.projectRoot,\n                  resultFilePath,\n                ),\n                query: result.query?.toString(),\n                sideEffects: result.sideEffects,\n                code: result.code,\n                env: dependency.env,\n                pipeline:\n                  result.pipeline === undefined\n                    ? pipeline ?? dependency.pipeline\n                    : result.pipeline,\n                isURL: dep.specifierType === 'url',\n              },\n              invalidateOnFileCreate,\n              invalidateOnFileChange,\n              invalidateOnEnvChange,\n            };\n          }\n\n          if (\n            result.diagnostics != null &&\n            !(\n              Array.isArray(result.diagnostics) &&\n              result.diagnostics.length === 0\n            )\n          ) {\n            let errorDiagnostic = errorToDiagnostic(\n              new ThrowableDiagnostic({diagnostic: result.diagnostics}),\n              {\n                origin: resolver.name,\n                filePath: specifier,\n              },\n            );\n            diagnostics.push(...errorDiagnostic);\n          }\n        }\n      } catch (e) {\n        // Add error to error map, we'll append these to the standard error if we can't resolve the asset\n        let errorDiagnostic = errorToDiagnostic(e, {\n          origin: resolver.name,\n          filePath: specifier,\n        });\n        if (Array.isArray(errorDiagnostic)) {\n          diagnostics.push(...errorDiagnostic);\n        } else {\n          diagnostics.push(errorDiagnostic);\n        }\n\n        break;\n      } finally {\n        measurement && measurement.end();\n\n        // Add dev dependency for the resolver. This must be done AFTER running it due to\n        // the potential for lazy require() that aren't executed until the request runs.\n        let devDepRequest = await createDevDependency(\n          {\n            specifier: resolver.name,\n            resolveFrom: resolver.resolveFrom,\n          },\n          this.previousDevDeps,\n          this.options,\n        );\n        this.runDevDepRequest(devDepRequest);\n      }\n    }\n\n    if (dep.isOptional) {\n      return {\n        assetGroup: null,\n        invalidateOnFileCreate,\n        invalidateOnFileChange,\n        invalidateOnEnvChange,\n      };\n    }\n\n    let resolveFrom = dependency.resolveFrom ?? dependency.sourcePath;\n    let dir =\n      resolveFrom != null\n        ? normalizePath(fromProjectPathRelative(resolveFrom))\n        : '';\n\n    let diagnostic = await this.getDiagnostic(\n      dependency,\n      md`Failed to resolve '${dependency.specifier}' ${\n        dir ? `from '${dir}'` : ''\n      }`,\n    );\n\n    diagnostics.unshift(diagnostic);\n\n    return {\n      assetGroup: null,\n      invalidateOnFileCreate,\n      invalidateOnFileChange,\n      invalidateOnEnvChange,\n      diagnostics,\n    };\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/TargetRequest.js",
    "content": "// @flow strict-local\n\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {FileSystem} from '@parcel/fs';\nimport type {\n  Async,\n  Engines,\n  FilePath,\n  PackageJSON,\n  PackageTargetDescriptor,\n  TargetDescriptor,\n  OutputFormat,\n} from '@parcel/types';\nimport type {StaticRunOpts, RunAPI} from '../RequestTracker';\nimport type {Entry, ParcelOptions, Target} from '../types';\nimport type {ConfigAndCachePath} from './ParcelConfigRequest';\n\nimport ThrowableDiagnostic, {\n  convertSourceLocationToHighlight,\n  generateJSONCodeHighlights,\n  getJSONSourceLocation,\n  encodeJSONKeyComponent,\n  md,\n} from '@parcel/diagnostic';\nimport path from 'path';\nimport {\n  loadConfig,\n  resolveConfig,\n  hashObject,\n  validateSchema,\n} from '@parcel/utils';\nimport logger from '@parcel/logger';\nimport {createEnvironment} from '../Environment';\nimport createParcelConfigRequest, {\n  getCachedParcelConfig,\n} from './ParcelConfigRequest';\n// $FlowFixMe\nimport browserslist from 'browserslist';\nimport {parse} from '@mischnic/json-sourcemap';\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport {\n  COMMON_TARGET_DESCRIPTOR_SCHEMA,\n  DESCRIPTOR_SCHEMA,\n  PACKAGE_DESCRIPTOR_SCHEMA,\n  ENGINES_SCHEMA,\n} from '../TargetDescriptor.schema';\nimport {optionsProxy, toInternalSourceLocation} from '../utils';\nimport {fromProjectPath, toProjectPath, joinProjectPath} from '../projectPath';\nimport {requestTypes} from '../RequestTracker';\nimport {BROWSER_ENVS} from '../public/Environment';\n\ntype RunOpts<TResult> = {|\n  input: Entry,\n  ...StaticRunOpts<TResult>,\n|};\n\nconst DEFAULT_DIST_DIRNAME = 'dist';\nconst JS_RE = /\\.[mc]?js$/;\nconst JS_EXTENSIONS = ['.js', '.mjs', '.cjs'];\nconst COMMON_TARGETS = {\n  main: {\n    match: JS_RE,\n    extensions: JS_EXTENSIONS,\n  },\n  module: {\n    // module field is always ESM. Don't allow .cjs extension here.\n    match: /\\.m?js$/,\n    extensions: ['.js', '.mjs'],\n  },\n  browser: {\n    match: JS_RE,\n    extensions: JS_EXTENSIONS,\n  },\n  types: {\n    match: /\\.d\\.ts$/,\n    extensions: ['.d.ts'],\n  },\n};\n\nconst DEFAULT_ENGINES = {\n  node: process.versions.node,\n  browsers: [\n    'last 1 Chrome version',\n    'last 1 Safari version',\n    'last 1 Firefox version',\n    'last 1 Edge version',\n  ],\n};\n\nexport type TargetRequest = {|\n  id: string,\n  +type: typeof requestTypes.target_request,\n  run: (RunOpts<TargetRequestResult>) => Async<TargetRequestResult>,\n  input: Entry,\n|};\n\nexport type TargetRequestResult = Target[];\n\nconst type = 'target_request';\n\nexport default function createTargetRequest(input: Entry): TargetRequest {\n  return {\n    id: `${type}:${hashObject(input)}`,\n    type: requestTypes.target_request,\n    run,\n    input,\n  };\n}\n\nexport function skipTarget(\n  targetName: string,\n  exclusiveTarget?: FilePath,\n  descriptorSource?: FilePath | Array<FilePath>,\n): boolean {\n  //  We skip targets if they have a descriptor.source and don't match the current exclusiveTarget\n  //  They will be handled by a separate resolvePackageTargets call from their Entry point\n  //  but with exclusiveTarget set.\n\n  return exclusiveTarget == null\n    ? descriptorSource != null\n    : targetName !== exclusiveTarget;\n}\n\nasync function run({input, api, options}) {\n  let targetResolver = new TargetResolver(\n    api,\n    optionsProxy(options, api.invalidateOnOptionChange),\n  );\n  let targets: TargetRequestResult = await targetResolver.resolve(\n    fromProjectPath(options.projectRoot, input.packagePath),\n    input.target,\n  );\n\n  assertTargetsAreNotEntries(targets, input, options);\n\n  let configResult = nullthrows(\n    await api.runRequest<null, ConfigAndCachePath>(createParcelConfigRequest()),\n  );\n  let parcelConfig = getCachedParcelConfig(configResult, options);\n\n  // Find named pipelines for each target.\n  let pipelineNames = new Set(parcelConfig.getNamedPipelines());\n  for (let target of targets) {\n    if (pipelineNames.has(target.name)) {\n      target.pipeline = target.name;\n    }\n  }\n\n  if (options.logLevel === 'verbose') {\n    await debugResolvedTargets(\n      input,\n      targets,\n      targetResolver.targetInfo,\n      options,\n    );\n  }\n\n  return targets;\n}\n\ntype TargetInfo = {|\n  output: TargetKeyInfo,\n  engines: TargetKeyInfo,\n  context: TargetKeyInfo,\n  includeNodeModules: TargetKeyInfo,\n  outputFormat: TargetKeyInfo,\n  isLibrary: TargetKeyInfo,\n  shouldOptimize: TargetKeyInfo,\n  shouldScopeHoist: TargetKeyInfo,\n|};\n\ntype TargetKeyInfo =\n  | {|\n      path: string,\n      type?: 'key' | 'value',\n    |}\n  | {|\n      inferred: string,\n      type?: 'key' | 'value',\n      message: string,\n    |}\n  | {|\n      message: string,\n    |};\n\nexport class TargetResolver {\n  fs: FileSystem;\n  api: RunAPI<Array<Target>>;\n  options: ParcelOptions;\n  targetInfo: Map<string, TargetInfo>;\n\n  constructor(api: RunAPI<Array<Target>>, options: ParcelOptions) {\n    this.api = api;\n    this.fs = options.inputFS;\n    this.options = options;\n    this.targetInfo = new Map();\n  }\n\n  async resolve(\n    rootDir: FilePath,\n    exclusiveTarget?: string,\n  ): Promise<Array<Target>> {\n    let optionTargets = this.options.targets;\n    if (exclusiveTarget != null && optionTargets == null) {\n      optionTargets = [exclusiveTarget];\n    }\n\n    let packageTargets: Map<string, Target | null> =\n      await this.resolvePackageTargets(rootDir, exclusiveTarget);\n    let targets: Array<Target>;\n    if (optionTargets) {\n      if (Array.isArray(optionTargets)) {\n        if (optionTargets.length === 0) {\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: `Targets option is an empty array`,\n              origin: '@parcel/core',\n            },\n          });\n        }\n\n        // Only build the intersection of the exclusive target and option targets.\n        if (exclusiveTarget != null) {\n          optionTargets = optionTargets.filter(\n            target => target === exclusiveTarget,\n          );\n        }\n\n        // If an array of strings is passed, it's a filter on the resolved package\n        // targets. Load them, and find the matching targets.\n        targets = optionTargets\n          .map(target => {\n            // null means skipped.\n            if (!packageTargets.has(target)) {\n              throw new ThrowableDiagnostic({\n                diagnostic: {\n                  message: md`Could not find target with name \"${target}\"`,\n                  origin: '@parcel/core',\n                },\n              });\n            }\n            return packageTargets.get(target);\n          })\n          .filter(Boolean);\n      } else {\n        // Otherwise, it's an object map of target descriptors (similar to those\n        // in package.json). Adapt them to native targets.\n        targets = Object.entries(optionTargets)\n          .map(([name, _descriptor]) => {\n            let {distDir, ...descriptor} = parseDescriptor(\n              name,\n              _descriptor,\n              null,\n              JSON.stringify({targets: optionTargets}, null, '\\t'),\n            );\n            if (distDir == null) {\n              let optionTargetsString = JSON.stringify(\n                optionTargets,\n                null,\n                '\\t',\n              );\n              throw new ThrowableDiagnostic({\n                diagnostic: {\n                  message: md`Missing distDir for target \"${name}\"`,\n                  origin: '@parcel/core',\n                  codeFrames: [\n                    {\n                      code: optionTargetsString,\n                      codeHighlights: generateJSONCodeHighlights(\n                        optionTargetsString || '',\n                        [\n                          {\n                            key: `/${name}`,\n                            type: 'value',\n                          },\n                        ],\n                      ),\n                    },\n                  ],\n                },\n              });\n            }\n            let target: Target = {\n              name,\n              distDir: toProjectPath(\n                this.options.projectRoot,\n                path.resolve(this.fs.cwd(), distDir),\n              ),\n              publicUrl:\n                descriptor.publicUrl ??\n                this.options.defaultTargetOptions.publicUrl,\n              env: createEnvironment({\n                engines: descriptor.engines,\n                context: descriptor.context,\n                isLibrary:\n                  descriptor.isLibrary ??\n                  this.options.defaultTargetOptions.isLibrary,\n                includeNodeModules: descriptor.includeNodeModules,\n                outputFormat:\n                  descriptor.outputFormat ??\n                  this.options.defaultTargetOptions.outputFormat,\n                shouldOptimize:\n                  this.options.defaultTargetOptions.shouldOptimize &&\n                  descriptor.optimize !== false,\n                shouldScopeHoist:\n                  this.options.defaultTargetOptions.shouldScopeHoist &&\n                  descriptor.scopeHoist !== false,\n                sourceMap: normalizeSourceMap(\n                  this.options,\n                  descriptor.sourceMap,\n                ),\n              }),\n            };\n\n            if (descriptor.distEntry != null) {\n              target.distEntry = descriptor.distEntry;\n            }\n\n            if (descriptor.source != null) {\n              target.source = descriptor.source;\n            }\n\n            return target;\n          })\n          .filter(\n            target => !skipTarget(target.name, exclusiveTarget, target.source),\n          );\n      }\n\n      let serve = this.options.serveOptions;\n      if (\n        serve &&\n        targets.length > 0 &&\n        targets.every(t => BROWSER_ENVS.has(t.env.context))\n      ) {\n        // In serve mode, we only support a single browser target. If the user\n        // provided more than one, or the matching target is not a browser, throw.\n        if (targets.length > 1) {\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: `More than one target is not supported in serve mode`,\n              origin: '@parcel/core',\n            },\n          });\n        }\n        targets[0].distDir = toProjectPath(\n          this.options.projectRoot,\n          serve.distDir,\n        );\n      }\n    } else {\n      targets = Array.from(packageTargets.values())\n        .filter(Boolean)\n        .filter(descriptor => {\n          return (\n            descriptor &&\n            !skipTarget(descriptor.name, exclusiveTarget, descriptor.source)\n          );\n        });\n\n      // Explicit targets were not provided. Either use a modern target for server\n      // mode, or simply use the package.json targets.\n      if (\n        this.options.serveOptions &&\n        targets.every(t => BROWSER_ENVS.has(t.env.context))\n      ) {\n        // In serve mode, we only support a single browser target. Since the user\n        // hasn't specified a target, use one targeting modern browsers for development\n        let distDir = toProjectPath(\n          this.options.projectRoot,\n          this.options.serveOptions.distDir,\n        );\n        let mainTarget = targets.length === 1 ? targets[0] : null;\n\n        if (mainTarget?.env.isLibrary) {\n          let loc = mainTarget.loc;\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              origin: '@parcel/core',\n              message: md`\nLibrary targets are not supported in serve mode.\n              `,\n              codeFrames: loc\n                ? [\n                    {\n                      filePath: fromProjectPath(\n                        this.options.projectRoot,\n                        loc.filePath,\n                      ),\n                      codeHighlights: [\n                        convertSourceLocationToHighlight(\n                          loc,\n                          'Target declared here',\n                        ),\n                      ],\n                    },\n                  ]\n                : [],\n              hints: [\n                `The \"${mainTarget.name}\" field is meant for libraries, not applications. Either remove the \"${mainTarget.name}\" field or choose a different target name.`,\n              ],\n              documentationURL:\n                'https://parceljs.org/features/targets/#library-targets',\n            },\n          });\n        }\n\n        let context = mainTarget?.env.context ?? 'browser';\n        let engines = BROWSER_ENVS.has(context)\n          ? {browsers: DEFAULT_ENGINES.browsers}\n          : {node: DEFAULT_ENGINES.node};\n        targets = [\n          {\n            name: 'default',\n            distDir,\n            publicUrl: this.options.defaultTargetOptions.publicUrl ?? '/',\n            env: createEnvironment({\n              context,\n              engines,\n              includeNodeModules: mainTarget?.env.includeNodeModules,\n              shouldOptimize: this.options.defaultTargetOptions.shouldOptimize,\n              outputFormat:\n                mainTarget?.env.outputFormat ??\n                this.options.defaultTargetOptions.outputFormat,\n              shouldScopeHoist:\n                this.options.defaultTargetOptions.shouldScopeHoist,\n              sourceMap: this.options.defaultTargetOptions.sourceMaps\n                ? {}\n                : undefined,\n            }),\n          },\n        ];\n      }\n    }\n\n    return targets;\n  }\n\n  async resolvePackageTargets(\n    rootDir: FilePath,\n    exclusiveTarget?: string,\n  ): Promise<Map<string, Target | null>> {\n    let rootFile = path.join(rootDir, 'index');\n    let conf = await loadConfig(\n      this.fs,\n      rootFile,\n      ['package.json'],\n      this.options.projectRoot,\n    );\n\n    let rootFileProject = toProjectPath(this.options.projectRoot, rootFile);\n\n    // Invalidate whenever a package.json file is added.\n    this.api.invalidateOnFileCreate({\n      fileName: 'package.json',\n      aboveFilePath: rootFileProject,\n    });\n\n    let pkg;\n    let pkgContents;\n    let pkgFilePath: ?FilePath;\n    let pkgDir: FilePath;\n    let pkgMap;\n    if (conf) {\n      pkg = (conf.config: PackageJSON);\n      let pkgFile = conf.files[0];\n      if (pkgFile == null) {\n        throw new ThrowableDiagnostic({\n          diagnostic: {\n            message: md`Expected package.json file in ${rootDir}`,\n            origin: '@parcel/core',\n          },\n        });\n      }\n      let _pkgFilePath = (pkgFilePath = pkgFile.filePath); // For Flow\n      pkgDir = path.dirname(_pkgFilePath);\n      pkgContents = await this.fs.readFile(_pkgFilePath, 'utf8');\n      pkgMap = parse(pkgContents, undefined, {tabWidth: 1});\n\n      let pp = toProjectPath(this.options.projectRoot, _pkgFilePath);\n      this.api.invalidateOnFileUpdate(pp);\n      this.api.invalidateOnFileDelete(pp);\n    } else {\n      pkg = {};\n      pkgDir = this.fs.cwd();\n    }\n\n    let pkgTargets = pkg.targets || {};\n    let pkgEngines: Engines =\n      parseEngines(\n        pkg.engines,\n        pkgFilePath,\n        pkgContents,\n        '/engines',\n        'Invalid engines in package.json',\n      ) || {};\n    let browsersLoc = {path: '/engines/browsers'};\n    let nodeLoc = {path: '/engines/node'};\n    if (pkgEngines.browsers == null) {\n      let env =\n        this.options.env.BROWSERSLIST_ENV ??\n        this.options.env.NODE_ENV ??\n        this.options.mode;\n\n      if (pkg.browserslist != null) {\n        let pkgBrowserslist = pkg.browserslist;\n        let browserslist =\n          typeof pkgBrowserslist === 'object' && !Array.isArray(pkgBrowserslist)\n            ? pkgBrowserslist[env]\n            : pkgBrowserslist;\n\n        pkgEngines = {\n          ...pkgEngines,\n          browsers: browserslist,\n        };\n\n        browsersLoc = {path: '/browserslist'};\n      } else {\n        let browserslistConfig = await resolveConfig(\n          this.fs,\n          path.join(rootDir, 'index'),\n          ['browserslist', '.browserslistrc'],\n          this.options.projectRoot,\n        );\n\n        this.api.invalidateOnFileCreate({\n          fileName: 'browserslist',\n          aboveFilePath: rootFileProject,\n        });\n\n        this.api.invalidateOnFileCreate({\n          fileName: '.browserslistrc',\n          aboveFilePath: rootFileProject,\n        });\n\n        if (browserslistConfig != null) {\n          let contents = await this.fs.readFile(browserslistConfig, 'utf8');\n          let config = browserslist.parseConfig(contents);\n          let browserslistBrowsers = config[env] || config.defaults;\n          let pp = toProjectPath(this.options.projectRoot, browserslistConfig);\n\n          if (browserslistBrowsers?.length > 0) {\n            pkgEngines = {\n              ...pkgEngines,\n              browsers: browserslistBrowsers,\n            };\n\n            browsersLoc = {\n              message: `(defined in ${path.relative(\n                process.cwd(),\n                browserslistConfig,\n              )})`,\n            };\n          }\n\n          // Invalidate whenever browserslist config file or relevant environment variables change\n          this.api.invalidateOnFileUpdate(pp);\n          this.api.invalidateOnFileDelete(pp);\n          this.api.invalidateOnEnvChange('BROWSERSLIST_ENV');\n          this.api.invalidateOnEnvChange('NODE_ENV');\n        }\n      }\n    }\n\n    let targets: Map<string, Target | null> = new Map();\n    let node = pkgEngines.node;\n    let browsers = pkgEngines.browsers;\n\n    let defaultEngines = this.options.defaultTargetOptions.engines;\n    let context = browsers ?? node == null ? 'browser' : 'node';\n    if (context === 'browser' && pkgEngines.browsers == null) {\n      pkgEngines = {\n        ...pkgEngines,\n        browsers: defaultEngines?.browsers ?? DEFAULT_ENGINES.browsers,\n      };\n      browsersLoc = {message: '(default)'};\n    } else if (context === 'node' && pkgEngines.node == null) {\n      pkgEngines = {\n        ...pkgEngines,\n        node: defaultEngines?.node ?? DEFAULT_ENGINES.node,\n      };\n      nodeLoc = {message: '(default)'};\n    }\n\n    // If there is a separate `browser` target, or an `engines.node` field but no browser targets, then\n    // the `main` and `module` targets refer to node, otherwise browser.\n    let mainContext =\n      pkg.browser ?? pkgTargets.browser ?? (node != null && browsers == null)\n        ? 'node'\n        : 'browser';\n    let mainContextLoc: TargetKeyInfo =\n      pkg.browser != null\n        ? {\n            inferred: '/browser',\n            message: '(because a browser field also exists)',\n            type: 'key',\n          }\n        : pkgTargets.browser\n        ? {\n            inferred: '/targets/browser',\n            message: '(because a browser target also exists)',\n            type: 'key',\n          }\n        : node != null && browsers == null\n        ? nodeLoc.path\n          ? {\n              inferred: nodeLoc.path,\n              message: '(because node engines were defined)',\n              type: 'key',\n            }\n          : nodeLoc\n        : {message: '(default)'};\n    let moduleContext =\n      pkg.browser ?? pkgTargets.browser ? 'browser' : mainContext;\n    let moduleContextLoc: TargetKeyInfo =\n      pkg.browser != null\n        ? {\n            inferred: '/browser',\n            message: '(because a browser field also exists)',\n            type: 'key',\n          }\n        : pkgTargets.browser\n        ? {\n            inferred: '/targets/browser',\n            message: '(becausea browser target also exists)',\n            type: 'key',\n          }\n        : mainContextLoc;\n\n    let getEnginesLoc = (targetName, descriptor): TargetKeyInfo => {\n      let enginesLoc = `/targets/${targetName}/engines`;\n      switch (context) {\n        case 'browser':\n        case 'web-worker':\n        case 'service-worker':\n        case 'worklet': {\n          if (descriptor.engines) {\n            return {path: enginesLoc + '/browsers'};\n          } else {\n            return browsersLoc;\n          }\n        }\n        case 'node': {\n          if (descriptor.engines) {\n            return {path: enginesLoc + '/node'};\n          } else {\n            return nodeLoc;\n          }\n        }\n        case 'electron-main':\n        case 'electron-renderer': {\n          if (descriptor.engines?.electron != null) {\n            return {path: enginesLoc + '/electron'};\n          } else if (pkgEngines?.electron != null) {\n            return {path: '/engines/electron'};\n          }\n        }\n      }\n\n      return {message: '(default)'};\n    };\n\n    for (let targetName in COMMON_TARGETS) {\n      let _targetDist;\n      let pointer;\n      if (\n        targetName === 'browser' &&\n        pkg[targetName] != null &&\n        typeof pkg[targetName] === 'object' &&\n        pkg.name\n      ) {\n        // The `browser` field can be a file path or an alias map.\n        _targetDist = pkg[targetName][pkg.name];\n        pointer = `/${targetName}/${encodeJSONKeyComponent(pkg.name)}`;\n      } else {\n        _targetDist = pkg[targetName];\n        pointer = `/${targetName}`;\n      }\n\n      // For Flow\n      let targetDist = _targetDist;\n      if (typeof targetDist === 'string' || pkgTargets[targetName]) {\n        let distDir;\n        let distEntry;\n        let loc;\n\n        invariant(pkgMap != null);\n\n        let _descriptor: mixed = pkgTargets[targetName] ?? {};\n        if (typeof targetDist === 'string') {\n          distDir = toProjectPath(\n            this.options.projectRoot,\n            path.resolve(pkgDir, path.dirname(targetDist)),\n          );\n          distEntry = path.basename(targetDist);\n          loc = {\n            filePath: nullthrows(pkgFilePath),\n            ...getJSONSourceLocation(pkgMap.pointers[pointer], 'value'),\n          };\n        } else {\n          distDir =\n            this.options.defaultTargetOptions.distDir ??\n            toProjectPath(\n              this.options.projectRoot,\n              path.join(pkgDir, DEFAULT_DIST_DIRNAME, targetName),\n            );\n        }\n\n        if (_descriptor == false) {\n          continue;\n        }\n\n        let descriptor = parseCommonTargetDescriptor(\n          targetName,\n          _descriptor,\n          pkgFilePath,\n          pkgContents,\n        );\n\n        if (skipTarget(targetName, exclusiveTarget, descriptor.source)) {\n          targets.set(targetName, null);\n          continue;\n        }\n\n        if (\n          distEntry != null &&\n          !COMMON_TARGETS[targetName].match.test(distEntry)\n        ) {\n          let contents: string =\n            typeof pkgContents === 'string'\n              ? pkgContents\n              : // $FlowFixMe\n                JSON.stringify(pkgContents, null, '\\t');\n          // $FlowFixMe\n          let listFormat = new Intl.ListFormat('en-US', {type: 'disjunction'});\n          let extensions = listFormat.format(\n            COMMON_TARGETS[targetName].extensions,\n          );\n          let ext = path.extname(distEntry);\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: md`Unexpected output file type ${ext} in target \"${targetName}\"`,\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  language: 'json',\n                  filePath: pkgFilePath ?? undefined,\n                  code: contents,\n                  codeHighlights: generateJSONCodeHighlights(contents, [\n                    {\n                      key: pointer,\n                      type: 'value',\n                      message: `File extension must be ${extensions}`,\n                    },\n                  ]),\n                },\n              ],\n              hints: [\n                `The \"${targetName}\" field is meant for libraries. If you meant to output a ${ext} file, either remove the \"${targetName}\" field or choose a different target name.`,\n              ],\n              documentationURL:\n                'https://parceljs.org/features/targets/#library-targets',\n            },\n          });\n        }\n\n        if (descriptor.outputFormat === 'global') {\n          let contents: string =\n            typeof pkgContents === 'string'\n              ? pkgContents\n              : // $FlowFixMe\n                JSON.stringify(pkgContents, null, '\\t');\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: md`The \"global\" output format is not supported in the \"${targetName}\" target.`,\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  language: 'json',\n                  filePath: pkgFilePath ?? undefined,\n                  code: contents,\n                  codeHighlights: generateJSONCodeHighlights(contents, [\n                    {\n                      key: `/targets/${targetName}/outputFormat`,\n                      type: 'value',\n                    },\n                  ]),\n                },\n              ],\n              hints: [\n                `The \"${targetName}\" field is meant for libraries. The outputFormat must be either \"commonjs\" or \"esmodule\". Either change or remove the declared outputFormat.`,\n              ],\n              documentationURL:\n                'https://parceljs.org/features/targets/#library-targets',\n            },\n          });\n        }\n\n        let [inferredOutputFormat, inferredOutputFormatField] =\n          this.inferOutputFormat(\n            distEntry,\n            descriptor,\n            targetName,\n            pkg,\n            pkgFilePath,\n            pkgContents,\n          );\n\n        let outputFormat =\n          descriptor.outputFormat ??\n          this.options.defaultTargetOptions.outputFormat ??\n          inferredOutputFormat ??\n          (targetName === 'module' ? 'esmodule' : 'commonjs');\n        let isModule = outputFormat === 'esmodule';\n\n        if (\n          targetName === 'main' &&\n          outputFormat === 'esmodule' &&\n          inferredOutputFormat !== 'esmodule'\n        ) {\n          let contents: string =\n            typeof pkgContents === 'string'\n              ? pkgContents\n              : // $FlowFixMe\n                JSON.stringify(pkgContents, null, '\\t');\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              // prettier-ignore\n              message: md`Output format \"esmodule\" cannot be used in the \"main\" target without a .mjs extension or \"type\": \"module\" field.`,\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  language: 'json',\n                  filePath: pkgFilePath ?? undefined,\n                  code: contents,\n                  codeHighlights: generateJSONCodeHighlights(contents, [\n                    {\n                      key: `/targets/${targetName}/outputFormat`,\n                      type: 'value',\n                      message: 'Declared output format defined here',\n                    },\n                    {\n                      key: '/main',\n                      type: 'value',\n                      message: 'Inferred output format defined here',\n                    },\n                  ]),\n                },\n              ],\n              hints: [\n                `Either change the output file extension to .mjs, add \"type\": \"module\" to package.json, or remove the declared outputFormat.`,\n              ],\n              documentationURL:\n                'https://parceljs.org/features/targets/#library-targets',\n            },\n          });\n        }\n\n        if (descriptor.scopeHoist === false) {\n          let contents: string =\n            typeof pkgContents === 'string'\n              ? pkgContents\n              : // $FlowFixMe\n                JSON.stringify(pkgContents, null, '\\t');\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: 'Scope hoisting cannot be disabled for library targets.',\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  language: 'json',\n                  filePath: pkgFilePath ?? undefined,\n                  code: contents,\n                  codeHighlights: generateJSONCodeHighlights(contents, [\n                    {\n                      key: `/targets/${targetName}/scopeHoist`,\n                      type: 'value',\n                    },\n                  ]),\n                },\n              ],\n              hints: [\n                `The \"${targetName}\" target is meant for libraries. Either remove the \"scopeHoist\" option, or use a different target name.`,\n              ],\n              documentationURL:\n                'https://parceljs.org/features/targets/#library-targets',\n            },\n          });\n        }\n\n        let context =\n          descriptor.context ??\n          (targetName === 'browser'\n            ? 'browser'\n            : isModule\n            ? moduleContext\n            : mainContext);\n\n        let engines = descriptor.engines ?? pkgEngines;\n        if (context === 'browser' && engines.browsers == null) {\n          engines = {\n            ...engines,\n            browsers: defaultEngines?.browsers ?? DEFAULT_ENGINES.browsers,\n          };\n        } else if (context === 'node' && engines.node == null) {\n          engines = {\n            ...engines,\n            node: defaultEngines?.node ?? DEFAULT_ENGINES.node,\n          };\n        }\n\n        targets.set(targetName, {\n          name: targetName,\n          distDir,\n          distEntry,\n          publicUrl:\n            descriptor.publicUrl ?? this.options.defaultTargetOptions.publicUrl,\n          env: createEnvironment({\n            engines,\n            context,\n            includeNodeModules: descriptor.includeNodeModules ?? false,\n            outputFormat,\n            isLibrary: true,\n            shouldOptimize:\n              this.options.defaultTargetOptions.shouldOptimize &&\n              descriptor.optimize === true,\n            shouldScopeHoist: true,\n            sourceMap: normalizeSourceMap(this.options, descriptor.sourceMap),\n          }),\n          loc: toInternalSourceLocation(this.options.projectRoot, loc),\n        });\n\n        this.targetInfo.set(targetName, {\n          output: {path: pointer},\n          engines: getEnginesLoc(targetName, descriptor),\n          context: descriptor.context\n            ? {path: `/targets/${targetName}/context`}\n            : targetName === 'browser'\n            ? {\n                message: '(inferred from target name)',\n                inferred: pointer,\n                type: 'key',\n              }\n            : isModule\n            ? moduleContextLoc\n            : mainContextLoc,\n          includeNodeModules: descriptor.includeNodeModules\n            ? {path: `/targets/${targetName}/includeNodeModules`, type: 'key'}\n            : {message: '(default)'},\n          outputFormat: descriptor.outputFormat\n            ? {path: `/targets/${targetName}/outputFormat`}\n            : inferredOutputFormatField === '/type'\n            ? {\n                message: `(inferred from package.json#type)`,\n                inferred: inferredOutputFormatField,\n              }\n            : inferredOutputFormatField != null\n            ? {\n                message: `(inferred from file extension)`,\n                inferred: inferredOutputFormatField,\n              }\n            : {message: '(default)'},\n          isLibrary: {message: '(default)'},\n          shouldOptimize: descriptor.optimize\n            ? {path: `/targets/${targetName}/optimize`}\n            : {message: '(default)'},\n          shouldScopeHoist: {message: '(default)'},\n        });\n      }\n    }\n\n    let customTargets = (Object.keys(pkgTargets): Array<string>).filter(\n      targetName => !COMMON_TARGETS[targetName],\n    );\n\n    // Custom targets\n    for (let targetName of customTargets) {\n      let distPath: mixed = pkg[targetName];\n      let distDir;\n      let distEntry;\n      let loc;\n      let pointer;\n      if (distPath == null) {\n        distDir =\n          fromProjectPath(\n            this.options.projectRoot,\n            this.options.defaultTargetOptions.distDir,\n          ) ?? path.join(pkgDir, DEFAULT_DIST_DIRNAME);\n        if (customTargets.length >= 2) {\n          distDir = path.join(distDir, targetName);\n        }\n        invariant(pkgMap != null);\n        invariant(typeof pkgFilePath === 'string');\n        loc = {\n          filePath: pkgFilePath,\n          ...getJSONSourceLocation(\n            pkgMap.pointers[`/targets/${targetName}`],\n            'key',\n          ),\n        };\n      } else {\n        if (typeof distPath !== 'string') {\n          let contents: string =\n            typeof pkgContents === 'string'\n              ? pkgContents\n              : // $FlowFixMe\n                JSON.stringify(pkgContents, null, '\\t');\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: md`Invalid distPath for target \"${targetName}\"`,\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  language: 'json',\n                  filePath: pkgFilePath ?? undefined,\n                  code: contents,\n                  codeHighlights: generateJSONCodeHighlights(contents, [\n                    {\n                      key: `/${targetName}`,\n                      type: 'value',\n                      message: 'Expected type string',\n                    },\n                  ]),\n                },\n              ],\n            },\n          });\n        }\n        distDir = path.resolve(pkgDir, path.dirname(distPath));\n        distEntry = path.basename(distPath);\n\n        invariant(typeof pkgFilePath === 'string');\n        invariant(pkgMap != null);\n        loc = {\n          filePath: pkgFilePath,\n          ...getJSONSourceLocation(pkgMap.pointers[`/${targetName}`], 'value'),\n        };\n        pointer = `/${targetName}`;\n      }\n\n      if (targetName in pkgTargets) {\n        let descriptor = parsePackageDescriptor(\n          targetName,\n          pkgTargets[targetName],\n          pkgFilePath,\n          pkgContents,\n        );\n        let pkgDir = path.dirname(nullthrows(pkgFilePath));\n        if (skipTarget(targetName, exclusiveTarget, descriptor.source)) {\n          targets.set(targetName, null);\n          continue;\n        }\n\n        let [inferredOutputFormat, inferredOutputFormatField] =\n          this.inferOutputFormat(\n            distEntry,\n            descriptor,\n            targetName,\n            pkg,\n            pkgFilePath,\n            pkgContents,\n          );\n\n        if (descriptor.scopeHoist === false && descriptor.isLibrary) {\n          let contents: string =\n            typeof pkgContents === 'string'\n              ? pkgContents\n              : // $FlowFixMe\n                JSON.stringify(pkgContents, null, '\\t');\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: 'Scope hoisting cannot be disabled for library targets.',\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  language: 'json',\n                  filePath: pkgFilePath ?? undefined,\n                  code: contents,\n                  codeHighlights: generateJSONCodeHighlights(contents, [\n                    {\n                      key: `/targets/${targetName}/scopeHoist`,\n                      type: 'value',\n                    },\n                    {\n                      key: `/targets/${targetName}/isLibrary`,\n                      type: 'value',\n                    },\n                  ]),\n                },\n              ],\n              hints: [`Either remove the \"scopeHoist\" or \"isLibrary\" option.`],\n              documentationURL:\n                'https://parceljs.org/features/targets/#library-targets',\n            },\n          });\n        }\n\n        let isLibrary =\n          descriptor.isLibrary ??\n          this.options.defaultTargetOptions.isLibrary ??\n          false;\n        let shouldScopeHoist = isLibrary\n          ? true\n          : this.options.defaultTargetOptions.shouldScopeHoist;\n\n        let engines = descriptor.engines ?? pkgEngines;\n        if (descriptor.context === 'browser' && engines.browsers == null) {\n          engines = {\n            ...engines,\n            browsers: defaultEngines?.browsers ?? DEFAULT_ENGINES.browsers,\n          };\n        } else if (descriptor.context === 'node' && engines.node == null) {\n          engines = {\n            ...engines,\n            node: defaultEngines?.node ?? DEFAULT_ENGINES.node,\n          };\n        }\n\n        targets.set(targetName, {\n          name: targetName,\n          distDir: toProjectPath(\n            this.options.projectRoot,\n            descriptor.distDir != null\n              ? path.resolve(pkgDir, descriptor.distDir)\n              : distDir,\n          ),\n          distEntry,\n          publicUrl:\n            descriptor.publicUrl ?? this.options.defaultTargetOptions.publicUrl,\n          env: createEnvironment({\n            engines,\n            context: descriptor.context,\n            includeNodeModules: descriptor.includeNodeModules,\n            outputFormat:\n              descriptor.outputFormat ??\n              this.options.defaultTargetOptions.outputFormat ??\n              inferredOutputFormat ??\n              undefined,\n            isLibrary,\n            shouldOptimize:\n              this.options.defaultTargetOptions.shouldOptimize &&\n              // Libraries are not optimized by default, users must explicitly configure this.\n              (isLibrary\n                ? descriptor.optimize === true\n                : descriptor.optimize !== false),\n            shouldScopeHoist:\n              shouldScopeHoist && descriptor.scopeHoist !== false,\n            sourceMap: normalizeSourceMap(this.options, descriptor.sourceMap),\n          }),\n          loc: toInternalSourceLocation(this.options.projectRoot, loc),\n        });\n\n        this.targetInfo.set(targetName, {\n          output: pointer != null ? {path: pointer} : {message: '(default)'},\n          engines: getEnginesLoc(targetName, descriptor),\n          context: descriptor.context\n            ? {path: `/targets/${targetName}/context`}\n            : {message: '(default)'},\n          includeNodeModules: descriptor.includeNodeModules\n            ? {path: `/targets/${targetName}/includeNodeModules`, type: 'key'}\n            : {message: '(default)'},\n          outputFormat: descriptor.outputFormat\n            ? {path: `/targets/${targetName}/outputFormat`}\n            : inferredOutputFormatField === '/type'\n            ? {\n                message: `(inferred from package.json#type)`,\n                inferred: inferredOutputFormatField,\n              }\n            : inferredOutputFormatField != null\n            ? {\n                message: `(inferred from file extension)`,\n                inferred: inferredOutputFormatField,\n              }\n            : {message: '(default)'},\n          isLibrary:\n            descriptor.isLibrary != null\n              ? {path: `/targets/${targetName}/isLibrary`}\n              : {message: '(default)'},\n          shouldOptimize:\n            descriptor.optimize != null\n              ? {path: `/targets/${targetName}/optimize`}\n              : {message: '(default)'},\n          shouldScopeHoist:\n            descriptor.scopeHoist != null\n              ? {path: `/targets/${targetName}/scopeHoist`}\n              : {message: '(default)'},\n        });\n      }\n    }\n\n    // If no explicit targets were defined, add a default.\n    if (targets.size === 0) {\n      targets.set('default', {\n        name: 'default',\n        distDir:\n          this.options.defaultTargetOptions.distDir ??\n          toProjectPath(\n            this.options.projectRoot,\n            path.join(pkgDir, DEFAULT_DIST_DIRNAME),\n          ),\n        publicUrl: this.options.defaultTargetOptions.publicUrl,\n        env: createEnvironment({\n          engines: pkgEngines,\n          context,\n          outputFormat: this.options.defaultTargetOptions.outputFormat,\n          isLibrary: this.options.defaultTargetOptions.isLibrary,\n          shouldOptimize: this.options.defaultTargetOptions.shouldOptimize,\n          shouldScopeHoist:\n            this.options.defaultTargetOptions.shouldScopeHoist ??\n            (this.options.mode === 'production' &&\n              !this.options.defaultTargetOptions.isLibrary),\n          sourceMap: this.options.defaultTargetOptions.sourceMaps\n            ? {}\n            : undefined,\n        }),\n      });\n    }\n\n    assertNoDuplicateTargets(this.options, targets, pkgFilePath, pkgContents);\n\n    return targets;\n  }\n\n  inferOutputFormat(\n    distEntry: ?FilePath,\n    descriptor: PackageTargetDescriptor,\n    targetName: string,\n    pkg: PackageJSON,\n    pkgFilePath: ?FilePath,\n    pkgContents: ?string,\n  ): [?OutputFormat, ?string] {\n    // Infer the outputFormat based on package.json properties.\n    // If the extension is .mjs it's always a module.\n    // If the extension is .cjs, it's always commonjs.\n    // If the \"type\" field is set to \"module\" and the extension is .js, it's a module.\n    let ext = distEntry != null ? path.extname(distEntry) : null;\n    let inferredOutputFormat, inferredOutputFormatField;\n    switch (ext) {\n      case '.mjs':\n        inferredOutputFormat = 'esmodule';\n        inferredOutputFormatField = `/${targetName}`;\n        break;\n      case '.cjs':\n        inferredOutputFormat = 'commonjs';\n        inferredOutputFormatField = `/${targetName}`;\n        break;\n      case '.js':\n        if (pkg.type === 'module') {\n          inferredOutputFormat = 'esmodule';\n          inferredOutputFormatField = '/type';\n        }\n        break;\n    }\n\n    if (\n      descriptor.outputFormat &&\n      inferredOutputFormat &&\n      descriptor.outputFormat !== inferredOutputFormat\n    ) {\n      let contents: string =\n        typeof pkgContents === 'string'\n          ? pkgContents\n          : // $FlowFixMe\n            JSON.stringify(pkgContents, null, '\\t');\n      let expectedExtensions;\n      switch (descriptor.outputFormat) {\n        case 'esmodule':\n          expectedExtensions = ['.mjs', '.js'];\n          break;\n        case 'commonjs':\n          expectedExtensions = ['.cjs', '.js'];\n          break;\n        case 'global':\n          expectedExtensions = ['.js'];\n          break;\n      }\n      // $FlowFixMe\n      let listFormat = new Intl.ListFormat('en-US', {type: 'disjunction'});\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: md`Declared output format \"${descriptor.outputFormat}\" does not match expected output format \"${inferredOutputFormat}\".`,\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              language: 'json',\n              filePath: pkgFilePath ?? undefined,\n              code: contents,\n              codeHighlights: generateJSONCodeHighlights(contents, [\n                {\n                  key: `/targets/${targetName}/outputFormat`,\n                  type: 'value',\n                  message: 'Declared output format defined here',\n                },\n                {\n                  key: nullthrows(inferredOutputFormatField),\n                  type: 'value',\n                  message: 'Inferred output format defined here',\n                },\n              ]),\n            },\n          ],\n          hints: [\n            inferredOutputFormatField === '/type'\n              ? 'Either remove the target\\'s declared \"outputFormat\" or remove the \"type\" field.'\n              : `Either remove the target's declared \"outputFormat\" or change the extension to ${listFormat.format(\n                  expectedExtensions,\n                )}.`,\n          ],\n          documentationURL:\n            'https://parceljs.org/features/targets/#library-targets',\n        },\n      });\n    }\n\n    return [inferredOutputFormat, inferredOutputFormatField];\n  }\n}\n\nfunction parseEngines(\n  engines: mixed,\n  pkgPath: ?FilePath,\n  pkgContents: ?string,\n  prependKey: string,\n  message: string,\n): Engines | typeof undefined {\n  if (engines === undefined) {\n    return engines;\n  } else {\n    validateSchema.diagnostic(\n      ENGINES_SCHEMA,\n      {data: engines, source: pkgContents, filePath: pkgPath, prependKey},\n      '@parcel/core',\n      message,\n    );\n    // $FlowFixMe we just verified this\n    return engines;\n  }\n}\n\nfunction parseDescriptor(\n  targetName: string,\n  descriptor: mixed,\n  pkgPath: ?FilePath,\n  pkgContents: ?string,\n): TargetDescriptor {\n  validateSchema.diagnostic(\n    DESCRIPTOR_SCHEMA,\n    {\n      data: descriptor,\n      source: pkgContents,\n      filePath: pkgPath,\n      prependKey: `/targets/${targetName}`,\n    },\n    '@parcel/core',\n    `Invalid target descriptor for target \"${targetName}\"`,\n  );\n\n  // $FlowFixMe we just verified this\n  return descriptor;\n}\n\nfunction parsePackageDescriptor(\n  targetName: string,\n  descriptor: mixed,\n  pkgPath: ?FilePath,\n  pkgContents: ?string,\n): PackageTargetDescriptor {\n  validateSchema.diagnostic(\n    PACKAGE_DESCRIPTOR_SCHEMA,\n    {\n      data: descriptor,\n      source: pkgContents,\n      filePath: pkgPath,\n      prependKey: `/targets/${targetName}`,\n    },\n    '@parcel/core',\n    `Invalid target descriptor for target \"${targetName}\"`,\n  );\n  // $FlowFixMe we just verified this\n  return descriptor;\n}\n\nfunction parseCommonTargetDescriptor(\n  targetName: string,\n  descriptor: mixed,\n  pkgPath: ?FilePath,\n  pkgContents: ?string,\n): PackageTargetDescriptor {\n  validateSchema.diagnostic(\n    COMMON_TARGET_DESCRIPTOR_SCHEMA,\n    {\n      data: descriptor,\n      source: pkgContents,\n      filePath: pkgPath,\n      prependKey: `/targets/${targetName}`,\n    },\n    '@parcel/core',\n    `Invalid target descriptor for target \"${targetName}\"`,\n  );\n\n  // $FlowFixMe we just verified this\n  return descriptor;\n}\n\nfunction assertNoDuplicateTargets(options, targets, pkgFilePath, pkgContents) {\n  // Detect duplicate targets by destination path and provide a nice error.\n  // Without this, an assertion is thrown much later after naming the bundles and finding duplicates.\n  let targetsByPath: Map<string, Array<string>> = new Map();\n  for (let target of targets.values()) {\n    if (!target) {\n      continue;\n    }\n\n    let {distEntry} = target;\n    if (distEntry != null) {\n      let distPath = path.join(\n        fromProjectPath(options.projectRoot, target.distDir),\n        distEntry,\n      );\n      if (!targetsByPath.has(distPath)) {\n        targetsByPath.set(distPath, []);\n      }\n      targetsByPath.get(distPath)?.push(target.name);\n    }\n  }\n\n  let diagnostics: Array<Diagnostic> = [];\n  for (let [targetPath, targetNames] of targetsByPath) {\n    if (targetNames.length > 1 && pkgContents != null && pkgFilePath != null) {\n      diagnostics.push({\n        message: md`Multiple targets have the same destination path \"${path.relative(\n          path.dirname(pkgFilePath),\n          targetPath,\n        )}\"`,\n        origin: '@parcel/core',\n        codeFrames: [\n          {\n            language: 'json',\n            filePath: pkgFilePath || undefined,\n            code: pkgContents,\n            codeHighlights: generateJSONCodeHighlights(\n              pkgContents,\n              targetNames.map(t => ({\n                key: `/${t}`,\n                type: 'value',\n              })),\n            ),\n          },\n        ],\n      });\n    }\n  }\n\n  if (diagnostics.length > 0) {\n    // Only add hints to the last diagnostic so it isn't duplicated on each one\n    diagnostics[diagnostics.length - 1].hints = [\n      'Try removing the duplicate targets, or changing the destination paths.',\n    ];\n\n    throw new ThrowableDiagnostic({\n      diagnostic: diagnostics,\n    });\n  }\n}\n\nfunction normalizeSourceMap(options: ParcelOptions, sourceMap) {\n  if (options.defaultTargetOptions.sourceMaps) {\n    if (typeof sourceMap === 'boolean') {\n      return sourceMap ? {} : undefined;\n    } else {\n      return sourceMap ?? {};\n    }\n  } else {\n    return undefined;\n  }\n}\n\nfunction assertTargetsAreNotEntries(\n  targets: Array<Target>,\n  input: Entry,\n  options: ParcelOptions,\n) {\n  for (const target of targets) {\n    if (\n      target.distEntry != null &&\n      joinProjectPath(target.distDir, target.distEntry) === input.filePath\n    ) {\n      let loc = target.loc;\n      let relativeEntry = path.relative(\n        process.cwd(),\n        fromProjectPath(options.projectRoot, input.filePath),\n      );\n      let codeFrames = [];\n      if (loc) {\n        codeFrames.push({\n          filePath: fromProjectPath(options.projectRoot, loc.filePath),\n          codeHighlights: [\n            convertSourceLocationToHighlight(loc, 'Target defined here'),\n          ],\n        });\n\n        let inputLoc = input.loc;\n        if (inputLoc) {\n          let highlight = convertSourceLocationToHighlight(\n            inputLoc,\n            'Entry defined here',\n          );\n\n          if (inputLoc.filePath === loc.filePath) {\n            codeFrames[0].codeHighlights.push(highlight);\n          } else {\n            codeFrames.push({\n              filePath: fromProjectPath(options.projectRoot, inputLoc.filePath),\n              codeHighlights: [highlight],\n            });\n          }\n        }\n      }\n\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          origin: '@parcel/core',\n          message: `Target \"${target.name}\" is configured to overwrite entry \"${relativeEntry}\".`,\n          codeFrames,\n          hints: [\n            (COMMON_TARGETS[target.name]\n              ? `The \"${target.name}\" field is an _output_ file path so that your build can be consumed by other tools. `\n              : '') +\n              `Change the \"${target.name}\" field to point to an output file rather than your source code.`,\n          ],\n          documentationURL: 'https://parceljs.org/features/targets/',\n        },\n      });\n    }\n  }\n}\n\nasync function debugResolvedTargets(input, targets, targetInfo, options) {\n  for (let target of targets) {\n    let info = targetInfo.get(target.name);\n    let loc = target.loc;\n    if (!loc || !info) {\n      continue;\n    }\n\n    let output = fromProjectPath(options.projectRoot, target.distDir);\n    if (target.distEntry != null) {\n      output = path.join(output, target.distEntry);\n    }\n\n    // Resolve relevant engines for context.\n    let engines;\n    switch (target.env.context) {\n      case 'browser':\n      case 'web-worker':\n      case 'service-worker':\n      case 'worklet': {\n        let browsers = target.env.engines.browsers;\n        engines = Array.isArray(browsers) ? browsers.join(', ') : browsers;\n        break;\n      }\n      case 'node':\n        engines = target.env.engines.node;\n        break;\n      case 'electron-main':\n      case 'electron-renderer':\n        engines = target.env.engines.electron;\n        break;\n    }\n\n    let highlights = [];\n    if (input.loc) {\n      highlights.push(\n        convertSourceLocationToHighlight(input.loc, 'entry defined here'),\n      );\n    }\n\n    // Read package.json where target is defined.\n    let targetFilePath = fromProjectPath(options.projectRoot, loc.filePath);\n    let contents = await options.inputFS.readFile(targetFilePath, 'utf8');\n\n    // Builds up map of code highlights for each defined/inferred path in the package.json.\n    let jsonHighlights = new Map();\n    for (let key in info) {\n      let keyInfo = info[key];\n      let path = keyInfo.path || keyInfo.inferred;\n      if (!path) {\n        continue;\n      }\n\n      let type = keyInfo.type || 'value';\n      let highlight = jsonHighlights.get(path);\n      if (!highlight) {\n        highlight = {\n          type: type,\n          defined: '',\n          inferred: [],\n        };\n        jsonHighlights.set(path, highlight);\n      } else if (highlight.type !== type) {\n        highlight.type = null;\n      }\n\n      if (keyInfo.path) {\n        highlight.defined = md`${key} defined here`;\n      }\n\n      if (keyInfo.inferred) {\n        highlight.inferred.push(\n          md`${key} to be ${JSON.stringify(target.env[key])}`,\n        );\n      }\n    }\n\n    // $FlowFixMe\n    let listFormat = new Intl.ListFormat('en-US');\n\n    // Generate human friendly messages for each field.\n    let highlightsWithMessages = [...jsonHighlights].map(([k, v]) => {\n      let message = v.defined;\n      if (v.inferred.length > 0) {\n        message += (message ? ', ' : '') + 'caused ';\n        message += listFormat.format(v.inferred);\n      }\n\n      return {\n        key: k,\n        type: v.type,\n        message,\n      };\n    });\n\n    // Get code highlights from JSON paths.\n    highlights.push(\n      ...generateJSONCodeHighlights(contents, highlightsWithMessages),\n    );\n\n    // Format includeNodeModules to be human readable.\n    let includeNodeModules;\n    if (typeof target.env.includeNodeModules === 'boolean') {\n      includeNodeModules = String(target.env.includeNodeModules);\n    } else if (Array.isArray(target.env.includeNodeModules)) {\n      includeNodeModules =\n        'only ' +\n        listFormat.format(\n          target.env.includeNodeModules.map(m => JSON.stringify(m)),\n        );\n    } else if (\n      target.env.includeNodeModules &&\n      typeof target.env.includeNodeModules === 'object'\n    ) {\n      includeNodeModules =\n        'all except ' +\n        listFormat.format(\n          Object.entries(target.env.includeNodeModules)\n            .filter(([, v]) => v === false)\n            .map(([k]) => JSON.stringify(k)),\n        );\n    }\n\n    let format = v => (v.message != null ? md.italic(v.message) : '');\n    logger.verbose({\n      origin: '@parcel/core',\n      message: md`**Target** \"${target.name}\"\n\n               **Entry**: ${path.relative(\n                 process.cwd(),\n                 fromProjectPath(options.projectRoot, input.filePath),\n               )}\n              **Output**: ${path.relative(process.cwd(), output)}\n              **Format**: ${target.env.outputFormat} ${format(\n        info.outputFormat,\n      )}\n             **Context**: ${target.env.context} ${format(info.context)}\n             **Engines**: ${engines || ''} ${format(info.engines)}\n        **Library Mode**: ${String(target.env.isLibrary)} ${format(\n        info.isLibrary,\n      )}\n**Include Node Modules**: ${includeNodeModules} ${format(\n        info.includeNodeModules,\n      )}\n            **Optimize**: ${String(target.env.shouldOptimize)} ${format(\n        info.shouldOptimize,\n      )}`,\n      codeFrames: target.loc\n        ? [\n            {\n              filePath: targetFilePath,\n              codeHighlights: highlights,\n            },\n          ]\n        : [],\n    });\n  }\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/ValidationRequest.js",
    "content": "// @flow strict-local\nimport type {Async} from '@parcel/types';\nimport type {SharedReference} from '@parcel/workers';\nimport type {StaticRunOpts} from '../RequestTracker';\nimport type {AssetGroup} from '../types';\nimport type {ConfigAndCachePath} from './ParcelConfigRequest';\n\nimport nullthrows from 'nullthrows';\nimport ParcelConfig from '../ParcelConfig';\nimport {report} from '../ReporterRunner';\nimport Validation from '../Validation';\nimport createParcelConfigRequest from './ParcelConfigRequest';\nimport {requestTypes} from '../RequestTracker';\n\ntype ValidationRequest = {|\n  id: string,\n  +type: typeof requestTypes.validation_request,\n  run: (RunOpts<void>) => Async<void>,\n  input: ValidationRequestInput,\n|};\n\ntype RunOpts<TResult> = {|\n  input: ValidationRequestInput,\n  ...StaticRunOpts<TResult>,\n|};\n\ntype ValidationRequestInput = {|\n  assetRequests: Array<AssetGroup>,\n  optionsRef: SharedReference,\n|};\n\nexport default function createValidationRequest(\n  input: ValidationRequestInput,\n): ValidationRequest {\n  return {\n    id: 'validation',\n    type: requestTypes.validation_request,\n    run: async ({input: {assetRequests, optionsRef}, api, options, farm}) => {\n      let {config: processedConfig, cachePath} = nullthrows(\n        await api.runRequest<null, ConfigAndCachePath>(\n          createParcelConfigRequest(),\n        ),\n      );\n\n      let config = new ParcelConfig(processedConfig, options);\n      let trackedRequestsDesc = assetRequests.filter(request => {\n        return config.getValidatorNames(request.filePath).length > 0;\n      });\n\n      // Schedule validations on workers for all plugins that implement the one-asset-at-a-time \"validate\" method.\n      let promises = trackedRequestsDesc.map(\n        async request =>\n          ((await farm.createHandle('runValidate'))({\n            requests: [request],\n            optionsRef: optionsRef,\n            configCachePath: cachePath,\n          }): void),\n      );\n\n      // Skip sending validation requests if no validators were configured\n      if (trackedRequestsDesc.length === 0) {\n        return;\n      }\n\n      // Schedule validations on the main thread for all validation plugins that implement \"validateAll\".\n      promises.push(\n        new Validation({\n          requests: trackedRequestsDesc,\n          options,\n          config,\n          report,\n          dedicatedThread: true,\n        }).run(),\n      );\n      await Promise.all(promises);\n    },\n    input,\n  };\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/WriteBundleRequest.js",
    "content": "// @flow strict-local\n\nimport type {FileSystem, FileOptions} from '@parcel/fs';\nimport type {ContentKey} from '@parcel/graph';\nimport type {Async, Compressor} from '@parcel/types';\n\nimport type {RunAPI, StaticRunOpts} from '../RequestTracker';\nimport type {Bundle, PackagedBundleInfo, ParcelOptions} from '../types';\nimport type BundleGraph from '../BundleGraph';\nimport type {BundleInfo} from '../PackagerRunner';\nimport type {ConfigAndCachePath} from './ParcelConfigRequest';\nimport type {LoadedPlugin} from '../ParcelConfig';\nimport type {ProjectPath} from '../projectPath';\n\nimport {HASH_REF_HASH_LEN, HASH_REF_PREFIX} from '../constants';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport {NamedBundle} from '../public/Bundle';\nimport {blobToStream, TapStream} from '@parcel/utils';\nimport {Readable, Transform, pipeline} from 'stream';\nimport {\n  fromProjectPath,\n  fromProjectPathRelative,\n  toProjectPath,\n  joinProjectPath,\n  toProjectPathUnsafe,\n} from '../projectPath';\nimport createParcelConfigRequest, {\n  getCachedParcelConfig,\n} from './ParcelConfigRequest';\nimport PluginOptions from '../public/PluginOptions';\nimport {PluginLogger} from '@parcel/logger';\nimport {\n  getDevDepRequests,\n  invalidateDevDeps,\n  createDevDependency,\n  runDevDepRequest,\n} from './DevDepRequest';\nimport ParcelConfig from '../ParcelConfig';\nimport ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';\nimport {PluginTracer, tracer} from '@parcel/profiler';\nimport {requestTypes} from '../RequestTracker';\n\nconst HASH_REF_PREFIX_LEN = HASH_REF_PREFIX.length;\nconst BOUNDARY_LENGTH = HASH_REF_PREFIX.length + 32 - 1;\n\ntype WriteBundleRequestInput = {|\n  bundleGraph: BundleGraph,\n  bundle: Bundle,\n  info: BundleInfo,\n  hashRefToNameHash: Map<string, string>,\n|};\n\nexport type WriteBundleRequestResult = PackagedBundleInfo[];\n\ntype RunInput<TResult> = {|\n  input: WriteBundleRequestInput,\n  ...StaticRunOpts<TResult>,\n|};\n\nexport type WriteBundleRequest = {|\n  id: ContentKey,\n  +type: typeof requestTypes.write_bundle_request,\n  run: (RunInput<PackagedBundleInfo[]>) => Async<PackagedBundleInfo[]>,\n  input: WriteBundleRequestInput,\n|};\n\n/**\n * Writes a bundle to the dist directory, replacing hash references with the final content hashes.\n */\nexport default function createWriteBundleRequest(\n  input: WriteBundleRequestInput,\n): WriteBundleRequest {\n  let name = nullthrows(input.bundle.name);\n  let nameHash = nullthrows(\n    input.hashRefToNameHash.get(input.bundle.hashReference),\n  );\n  return {\n    id: `${input.bundle.id}:${input.info.hash}:${nameHash}:${name}`,\n    type: requestTypes.write_bundle_request,\n    run,\n    input,\n  };\n}\n\nasync function run({input, options, api}) {\n  let {bundleGraph, bundle, info, hashRefToNameHash} = input;\n  let {inputFS, outputFS} = options;\n  let name = nullthrows(bundle.name);\n  let thisHashReference = bundle.hashReference;\n\n  if (info.type !== bundle.type) {\n    name = name.slice(0, -path.extname(name).length) + '.' + info.type;\n  }\n\n  if (name.includes(thisHashReference)) {\n    let thisNameHash = nullthrows(hashRefToNameHash.get(thisHashReference));\n    name = name.replace(thisHashReference, thisNameHash);\n  }\n\n  let filePath = joinProjectPath(bundle.target.distDir, name);\n\n  // Watch the bundle and source map for deletion.\n  // Also watch the dist dir because invalidateOnFileDelete does not currently\n  // invalidate when a parent directory is deleted.\n  // TODO: do we want to also watch for file edits?\n  api.invalidateOnFileDelete(bundle.target.distDir);\n  api.invalidateOnFileDelete(filePath);\n\n  let cacheKeys = info.cacheKeys;\n  let mapKey = cacheKeys.map;\n  let fullPath = fromProjectPath(options.projectRoot, filePath);\n  if (mapKey && bundle.env.sourceMap && !bundle.env.sourceMap.inline) {\n    api.invalidateOnFileDelete(\n      toProjectPath(options.projectRoot, fullPath + '.map'),\n    );\n  }\n\n  let dir = path.dirname(fullPath);\n  await outputFS.mkdirp(dir); // ? Got rid of dist exists, is this an expensive operation\n\n  // Use the file mode from the entry asset as the file mode for the bundle.\n  // Don't do this for browser builds, as the executable bit in particular is unnecessary.\n  let publicBundle = NamedBundle.get(bundle, bundleGraph, options);\n  let mainEntry = publicBundle.getMainEntry();\n  let writeOptions =\n    publicBundle.env.isBrowser() || !mainEntry\n      ? undefined\n      : {\n          mode: (await inputFS.stat(mainEntry.filePath)).mode,\n        };\n  let contentStream: Readable;\n  if (info.isLargeBlob) {\n    contentStream = options.cache.getStream(cacheKeys.content);\n  } else {\n    contentStream = blobToStream(\n      await options.cache.getBlob(cacheKeys.content),\n    );\n  }\n\n  let configResult = nullthrows(\n    await api.runRequest<null, ConfigAndCachePath>(createParcelConfigRequest()),\n  );\n  let config = getCachedParcelConfig(configResult, options);\n\n  let {devDeps, invalidDevDeps} = await getDevDepRequests(api);\n  invalidateDevDeps(invalidDevDeps, options, config);\n\n  let files = await writeFiles(\n    contentStream,\n    info,\n    hashRefToNameHash,\n    options,\n    config,\n    outputFS,\n    filePath,\n    writeOptions,\n    devDeps,\n    api,\n  );\n\n  if (\n    mapKey &&\n    bundle.env.sourceMap &&\n    !bundle.env.sourceMap.inline &&\n    (await options.cache.has(mapKey))\n  ) {\n    let mapFiles = await writeFiles(\n      blobToStream(await options.cache.getBlob(mapKey)),\n      info,\n      hashRefToNameHash,\n      options,\n      config,\n      outputFS,\n      toProjectPathUnsafe(fromProjectPathRelative(filePath) + '.map'),\n      writeOptions,\n      devDeps,\n      api,\n    );\n    files.push(...mapFiles);\n  }\n\n  api.storeResult(files);\n  return files;\n}\n\nasync function writeFiles(\n  inputStream: stream$Readable,\n  info: BundleInfo,\n  hashRefToNameHash: Map<string, string>,\n  options: ParcelOptions,\n  config: ParcelConfig,\n  outputFS: FileSystem,\n  filePath: ProjectPath,\n  writeOptions: ?FileOptions,\n  devDeps: Map<string, string>,\n  api: RunAPI<PackagedBundleInfo[]>,\n): Promise<PackagedBundleInfo[]> {\n  let compressors = await config.getCompressors(\n    fromProjectPathRelative(filePath),\n  );\n\n  let stream = info.hashReferences.length\n    ? inputStream.pipe(replaceStream(hashRefToNameHash))\n    : inputStream;\n\n  let promises = [];\n  for (let compressor of compressors) {\n    promises.push(\n      runCompressor(\n        compressor,\n        info,\n        cloneStream(stream),\n        options,\n        outputFS,\n        filePath,\n        writeOptions,\n        devDeps,\n        api,\n      ),\n    );\n  }\n\n  let results = await Promise.all(promises);\n  return results.filter(Boolean);\n}\n\nasync function runCompressor(\n  compressor: LoadedPlugin<Compressor>,\n  info: BundleInfo,\n  stream: stream$Readable,\n  options: ParcelOptions,\n  outputFS: FileSystem,\n  inputFilePath: ProjectPath,\n  writeOptions: ?FileOptions,\n  devDeps: Map<string, string>,\n  api: RunAPI<PackagedBundleInfo[]>,\n): Promise<PackagedBundleInfo | null> {\n  let measurement;\n  try {\n    measurement = tracer.createMeasurement(\n      compressor.name,\n      'compress',\n      fromProjectPathRelative(inputFilePath),\n    );\n    let res = await compressor.plugin.compress({\n      stream,\n      options: new PluginOptions(options),\n      logger: new PluginLogger({origin: compressor.name}),\n      tracer: new PluginTracer({origin: compressor.name, category: 'compress'}),\n    });\n\n    let filePath = inputFilePath;\n    if (res != null) {\n      if (res.type != null) {\n        let type = res.type;\n        filePath = toProjectPathUnsafe(\n          fromProjectPathRelative(filePath) + '.' + type,\n        );\n      }\n\n      let size = 0;\n      let stream = res.stream.pipe(\n        new TapStream(buf => {\n          size += buf.length;\n        }),\n      );\n\n      let fullPath = fromProjectPath(options.projectRoot, filePath);\n      await new Promise((resolve, reject) =>\n        pipeline(\n          stream,\n          outputFS.createWriteStream(fullPath, writeOptions),\n          err => {\n            if (err) reject(err);\n            else resolve();\n          },\n        ),\n      );\n\n      return {\n        filePath,\n        type: info.type,\n        stats: {\n          size,\n          time: info.time ?? 0,\n        },\n      };\n    }\n\n    return null;\n  } catch (err) {\n    throw new ThrowableDiagnostic({\n      diagnostic: errorToDiagnostic(err, {\n        origin: compressor.name,\n      }),\n    });\n  } finally {\n    measurement && measurement.end();\n    // Add dev deps for compressor plugins AFTER running them, to account for lazy require().\n    let devDepRequest = await createDevDependency(\n      {\n        specifier: compressor.name,\n        resolveFrom: compressor.resolveFrom,\n      },\n      devDeps,\n      options,\n    );\n    await runDevDepRequest(api, devDepRequest);\n  }\n}\n\nfunction replaceStream(hashRefToNameHash) {\n  let boundaryStr = Buffer.alloc(0);\n  let replaced = Buffer.alloc(0);\n  return new Transform({\n    transform(chunk, encoding, cb) {\n      let str = Buffer.concat([boundaryStr, Buffer.from(chunk)]);\n      let lastMatchI = 0;\n      if (replaced.length < str.byteLength) {\n        replaced = Buffer.alloc(str.byteLength);\n      }\n      let replacedLength = 0;\n\n      while (lastMatchI < str.byteLength) {\n        let matchI = str.indexOf(HASH_REF_PREFIX, lastMatchI);\n        if (matchI === -1) {\n          replaced.set(\n            str.subarray(lastMatchI, str.byteLength),\n            replacedLength,\n          );\n          replacedLength += str.byteLength - lastMatchI;\n          break;\n        } else {\n          let match = str\n            .subarray(matchI, matchI + HASH_REF_PREFIX_LEN + HASH_REF_HASH_LEN)\n            .toString();\n          let replacement = Buffer.from(hashRefToNameHash.get(match) ?? match);\n          replaced.set(str.subarray(lastMatchI, matchI), replacedLength);\n          replacedLength += matchI - lastMatchI;\n          replaced.set(replacement, replacedLength);\n          replacedLength += replacement.byteLength;\n          lastMatchI = matchI + HASH_REF_PREFIX_LEN + HASH_REF_HASH_LEN;\n        }\n      }\n\n      boundaryStr = replaced.subarray(\n        replacedLength - BOUNDARY_LENGTH,\n        replacedLength,\n      );\n      let strUpToBoundary = replaced.subarray(\n        0,\n        replacedLength - BOUNDARY_LENGTH,\n      );\n      cb(null, strUpToBoundary);\n    },\n\n    flush(cb) {\n      cb(null, boundaryStr);\n    },\n  });\n}\n\nfunction cloneStream(readable) {\n  let res = new Readable();\n  // $FlowFixMe\n  res._read = () => {};\n  readable.on('data', chunk => res.push(chunk));\n  readable.on('end', () => res.push(null));\n  readable.on('error', err => res.emit('error', err));\n  return res;\n}\n"
  },
  {
    "path": "packages/core/core/src/requests/WriteBundlesRequest.js",
    "content": "// @flow strict-local\n\nimport type {ContentKey} from '@parcel/graph';\nimport type {Async} from '@parcel/types';\nimport type {SharedReference} from '@parcel/workers';\nimport type {StaticRunOpts} from '../RequestTracker';\nimport {requestTypes} from '../RequestTracker';\nimport type {PackagedBundleInfo} from '../types';\nimport type BundleGraph from '../BundleGraph';\nimport type {BundleInfo} from '../PackagerRunner';\n\nimport {HASH_REF_PREFIX} from '../constants';\nimport {joinProjectPath} from '../projectPath';\nimport nullthrows from 'nullthrows';\nimport {hashString} from '@parcel/rust';\nimport {\n  canSkipPackageRequest,\n  createPackageRequest,\n  getPackageRequestId,\n} from './PackageRequest';\nimport createWriteBundleRequest from './WriteBundleRequest';\n\ntype WriteBundlesRequestInput = {|\n  bundleGraph: BundleGraph,\n  optionsRef: SharedReference,\n|};\n\nexport type WriteBundlesRequestResult = Map<string, PackagedBundleInfo[]>;\n\ntype RunInput<TResult> = {|\n  input: WriteBundlesRequestInput,\n  ...StaticRunOpts<TResult>,\n|};\n\nexport type WriteBundlesRequest = {|\n  id: ContentKey,\n  +type: typeof requestTypes.write_bundles_request,\n  run: (\n    RunInput<WriteBundlesRequestResult>,\n  ) => Async<WriteBundlesRequestResult>,\n  input: WriteBundlesRequestInput,\n|};\n\n/**\n * Packages, optimizes, and writes all bundles to the dist directory.\n */\nexport default function createWriteBundlesRequest(\n  input: WriteBundlesRequestInput,\n): WriteBundlesRequest {\n  return {\n    type: requestTypes.write_bundles_request,\n    id: 'write_bundles:' + input.bundleGraph.getBundleGraphHash(),\n    run,\n    input,\n  };\n}\n\nasync function run({input, api, farm, options}) {\n  let {bundleGraph, optionsRef} = input;\n  let {ref, dispose} = await farm.createSharedReference(bundleGraph);\n\n  api.invalidateOnOptionChange('shouldContentHash');\n\n  let res = new Map();\n  let bundleInfoMap: {|\n    [string]: BundleInfo[],\n  |} = {};\n  let writeEarlyPromises: {[string]: Promise<PackagedBundleInfo[]>} = {};\n  let hashRefToNameHash = new Map();\n  let bundles = bundleGraph.getBundles().filter(bundle => {\n    // Do not package and write placeholder bundles to disk. We just\n    // need to update the name so other bundles can reference it.\n    if (bundle.isPlaceholder) {\n      let hash = bundle.id.slice(-8);\n      hashRefToNameHash.set(bundle.hashReference, hash);\n      let name = nullthrows(\n        bundle.name,\n        `Expected ${bundle.type} bundle to have a name`,\n      ).replace(bundle.hashReference, hash);\n      res.set(bundle.id, [\n        {\n          filePath: joinProjectPath(bundle.target.distDir, name),\n          type: bundle.type, // FIXME: this is wrong if the packager changes the type...\n          stats: {\n            time: 0,\n            size: 0,\n          },\n        },\n      ]);\n      return false;\n    }\n\n    return true;\n  });\n\n  // Package on the main thread if there is only one bundle to package.\n  // This avoids the cost of serializing the bundle graph for single file change builds.\n  let useMainThread =\n    bundles.length === 1 ||\n    bundles.filter(b => !api.canSkipSubrequest(getPackageRequestId(b)))\n      .length === 1;\n\n  try {\n    await Promise.all(\n      bundles.map(async bundle => {\n        let request = createPackageRequest({\n          bundle,\n          bundleGraph,\n          bundleGraphReference: ref,\n          optionsRef,\n          useMainThread,\n        });\n\n        let {info: infos} = await api.runRequest(request, {\n          force: !(await canSkipPackageRequest(api, request)),\n        });\n\n        if (!useMainThread) {\n          // Force a refresh of the cache to avoid a race condition\n          // between threaded reads and writes that can result in an LMDB cache miss:\n          //   1. The main thread has read some value from cache, necessitating a read transaction.\n          //   2. Concurrently, Thread A finishes a packaging request.\n          //   3. Subsequently, the main thread is tasked with this request, but fails because the read transaction is stale.\n          // This only occurs if the reading thread has a transaction that was created before the writing thread committed,\n          // and the transaction is still live when the reading thread attempts to get the written value.\n          // See https://github.com/parcel-bundler/parcel/issues/9121\n          options.cache.refresh();\n        }\n\n        bundleInfoMap[bundle.id] = infos;\n        if (infos.every(info => info.hashReferences.length === 0)) {\n          hashRefToNameHash.set(\n            bundle.hashReference,\n            options.shouldContentHash\n              ? infos.length === 1\n                ? infos[0].hash.slice(-8)\n                : hashString(infos.map(i => i.hash).join(':')).slice(-8)\n              : bundle.id.slice(-8),\n          );\n          for (let info of infos) {\n            let writeBundleRequest = createWriteBundleRequest({\n              bundle,\n              info,\n              hashRefToNameHash,\n              bundleGraph,\n            });\n            let promise = api.runRequest(writeBundleRequest);\n            // If the promise rejects before we await it (below), we don't want to crash the build.\n            promise.catch(() => {});\n            writeEarlyPromises[info.cacheKeys.content] = promise;\n          }\n        }\n      }),\n    );\n    assignComplexNameHashes(hashRefToNameHash, bundles, bundleInfoMap, options);\n    await Promise.all(\n      bundles.map(bundle => {\n        let promise = Promise.all(\n          bundleInfoMap[bundle.id].map(info => {\n            return (\n              writeEarlyPromises[info.cacheKeys.content] ??\n              api.runRequest(\n                createWriteBundleRequest({\n                  bundle,\n                  info,\n                  hashRefToNameHash,\n                  bundleGraph,\n                }),\n              )\n            );\n          }),\n        );\n\n        return promise.then(r => res.set(bundle.id, r.flat()));\n      }),\n    );\n\n    api.storeResult(res);\n    return res;\n  } finally {\n    await dispose();\n  }\n}\n\nfunction assignComplexNameHashes(\n  hashRefToNameHash,\n  bundles,\n  bundleInfoMap,\n  options,\n) {\n  for (let bundle of bundles) {\n    if (hashRefToNameHash.get(bundle.hashReference) != null) {\n      continue;\n    }\n    hashRefToNameHash.set(\n      bundle.hashReference,\n      options.shouldContentHash\n        ? hashString(\n            [...getBundlesIncludedInHash(bundle.id, bundleInfoMap)]\n              .flatMap(bundleId => bundleInfoMap[bundleId].map(i => i.hash))\n              .join(':'),\n          ).slice(-8)\n        : bundle.id.slice(-8),\n    );\n  }\n}\n\nfunction getBundlesIncludedInHash(\n  bundleId,\n  bundleInfoMap,\n  included = new Set(),\n) {\n  included.add(bundleId);\n  for (let info of bundleInfoMap[bundleId]) {\n    for (let hashRef of info.hashReferences) {\n      let referencedId = getIdFromHashRef(hashRef);\n      if (!included.has(referencedId)) {\n        getBundlesIncludedInHash(referencedId, bundleInfoMap, included);\n      }\n    }\n  }\n\n  return included;\n}\n\nfunction getIdFromHashRef(hashRef: string) {\n  return hashRef.slice(HASH_REF_PREFIX.length);\n}\n"
  },
  {
    "path": "packages/core/core/src/resolveOptions.js",
    "content": "// @flow strict-local\n\nimport type {\n  FilePath,\n  InitialParcelOptions,\n  DependencySpecifier,\n  InitialServerOptions,\n} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {ParcelOptions} from './types';\n\nimport path from 'path';\nimport {hashString} from '@parcel/rust';\nimport {NodeFS} from '@parcel/fs';\nimport {LMDBCache, FSCache} from '@parcel/cache';\nimport {NodePackageManager} from '@parcel/package-manager';\nimport {\n  getRootDir,\n  relativePath,\n  resolveConfig,\n  isGlob,\n  globToRegex,\n} from '@parcel/utils';\nimport loadDotEnv from './loadDotEnv';\nimport {toProjectPath} from './projectPath';\nimport {getResolveFrom} from './requests/ParcelConfigRequest';\n\nimport {DEFAULT_FEATURE_FLAGS} from '@parcel/feature-flags';\nimport {PARCEL_VERSION} from './constants';\n\n// Default cache directory name\nconst DEFAULT_CACHE_DIRNAME = '.parcel-cache';\nconst LOCK_FILE_NAMES = ['yarn.lock', 'package-lock.json', 'pnpm-lock.yaml'];\n\n// Generate a unique instanceId, will change on every run of parcel\nfunction generateInstanceId(entries: Array<FilePath>): string {\n  return hashString(\n    `${entries.join(',')}-${Date.now()}-${Math.round(Math.random() * 100)}`,\n  );\n}\n\n// Compiles an array of globs to regex - used for lazy include/excludes\nfunction compileGlobs(globs: string[]): RegExp[] {\n  return globs.map(glob => globToRegex(glob));\n}\n\nexport default async function resolveOptions(\n  initialOptions: InitialParcelOptions,\n): Promise<ParcelOptions> {\n  let inputFS = initialOptions.inputFS || new NodeFS();\n  let outputFS = initialOptions.outputFS || new NodeFS();\n\n  let inputCwd = inputFS.cwd();\n  let outputCwd = outputFS.cwd();\n\n  let entries: Array<FilePath>;\n  if (initialOptions.entries == null || initialOptions.entries === '') {\n    entries = [];\n  } else if (Array.isArray(initialOptions.entries)) {\n    entries = initialOptions.entries.map(entry =>\n      path.resolve(inputCwd, entry),\n    );\n  } else {\n    entries = [path.resolve(inputCwd, initialOptions.entries)];\n  }\n\n  let shouldMakeEntryReferFolder = false;\n  if (entries.length === 1 && !isGlob(entries[0])) {\n    let [entry] = entries;\n    try {\n      shouldMakeEntryReferFolder = (await inputFS.stat(entry)).isDirectory();\n    } catch {\n      // ignore failing stat call\n    }\n  }\n\n  // getRootDir treats the input as files, so getRootDir([\"/home/user/myproject\"]) returns \"/home/user\".\n  // Instead we need to make the the entry refer to some file inside the specified folders if entries refers to the directory.\n  let entryRoot = getRootDir(\n    shouldMakeEntryReferFolder ? [path.join(entries[0], 'index')] : entries,\n  );\n  let projectRootFile =\n    (await resolveConfig(\n      inputFS,\n      path.join(entryRoot, 'index'),\n      [...LOCK_FILE_NAMES, '.git', '.hg'],\n      path.parse(entryRoot).root,\n    )) || path.join(inputCwd, 'index'); // ? Should this just be rootDir\n\n  let projectRoot = path.dirname(projectRootFile);\n\n  let packageManager =\n    initialOptions.packageManager ||\n    new NodePackageManager(inputFS, projectRoot);\n\n  let cacheDir =\n    // If a cacheDir is provided, resolve it relative to cwd. Otherwise,\n    // use a default directory resolved relative to the project root.\n    initialOptions.cacheDir != null\n      ? path.resolve(outputCwd, initialOptions.cacheDir)\n      : path.resolve(projectRoot, DEFAULT_CACHE_DIRNAME);\n\n  // Make the root watch directory configurable. This is useful in some cases\n  // where symlinked dependencies outside the project root need to trigger HMR\n  // updates. Default to the project root if not provided.\n  let watchDir =\n    initialOptions.watchDir != null\n      ? path.resolve(initialOptions.watchDir)\n      : projectRoot;\n\n  let cache =\n    initialOptions.cache ??\n    (outputFS instanceof NodeFS\n      ? new LMDBCache(cacheDir)\n      : new FSCache(outputFS, cacheDir));\n\n  let mode = initialOptions.mode ?? 'development';\n  let shouldOptimize =\n    initialOptions?.defaultTargetOptions?.shouldOptimize ??\n    mode === 'production';\n\n  let publicUrl = initialOptions?.defaultTargetOptions?.publicUrl ?? '/';\n  let distDir =\n    initialOptions?.defaultTargetOptions?.distDir != null\n      ? path.resolve(inputCwd, initialOptions?.defaultTargetOptions?.distDir)\n      : undefined;\n\n  let shouldBuildLazily = initialOptions.shouldBuildLazily ?? false;\n  let lazyIncludes = compileGlobs(initialOptions.lazyIncludes ?? []);\n  if (lazyIncludes.length > 0 && !shouldBuildLazily) {\n    throw new Error(\n      'Lazy includes can only be provided when lazy building is enabled',\n    );\n  }\n  let lazyExcludes = compileGlobs(initialOptions.lazyExcludes ?? []);\n  if (lazyExcludes.length > 0 && !shouldBuildLazily) {\n    throw new Error(\n      'Lazy excludes can only be provided when lazy building is enabled',\n    );\n  }\n\n  let shouldContentHash =\n    initialOptions.shouldContentHash ?? initialOptions.mode === 'production';\n  if (shouldBuildLazily && shouldContentHash) {\n    throw new Error('Lazy bundling does not work with content hashing');\n  }\n\n  let env = {\n    ...(await loadDotEnv(\n      initialOptions.env ?? {},\n      inputFS,\n      path.join(projectRoot, 'index'),\n      projectRoot,\n    )),\n    ...process.env,\n    ...initialOptions.env,\n  };\n\n  let port = determinePort(initialOptions.serveOptions, env.PORT);\n\n  return {\n    config: getRelativeConfigSpecifier(\n      inputFS,\n      projectRoot,\n      initialOptions.config,\n    ),\n    defaultConfig: getRelativeConfigSpecifier(\n      inputFS,\n      projectRoot,\n      initialOptions.defaultConfig,\n    ),\n    shouldPatchConsole: initialOptions.shouldPatchConsole ?? false,\n    env,\n    mode,\n    shouldAutoInstall: initialOptions.shouldAutoInstall ?? false,\n    hmrOptions: initialOptions.hmrOptions ?? null,\n    shouldBuildLazily,\n    lazyIncludes,\n    lazyExcludes,\n    unstableFileInvalidations: initialOptions.unstableFileInvalidations,\n    shouldBundleIncrementally: initialOptions.shouldBundleIncrementally ?? true,\n    shouldContentHash,\n    serveOptions: initialOptions.serveOptions\n      ? {\n          ...initialOptions.serveOptions,\n          distDir: distDir ?? path.join(outputCwd, 'dist'),\n          port,\n        }\n      : false,\n    shouldDisableCache: initialOptions.shouldDisableCache ?? false,\n    shouldProfile: initialOptions.shouldProfile ?? false,\n    shouldTrace: initialOptions.shouldTrace ?? false,\n    cacheDir,\n    watchDir,\n    watchBackend: initialOptions.watchBackend,\n    watchIgnore: initialOptions.watchIgnore,\n    entries: entries.map(e => toProjectPath(projectRoot, e)),\n    targets: initialOptions.targets,\n    logLevel: initialOptions.logLevel ?? 'info',\n    projectRoot,\n    inputFS,\n    outputFS,\n    cache,\n    packageManager,\n    additionalReporters:\n      initialOptions.additionalReporters?.map(({packageName, resolveFrom}) => ({\n        packageName,\n        resolveFrom: toProjectPath(projectRoot, resolveFrom),\n      })) ?? [],\n    instanceId: generateInstanceId(entries),\n    detailedReport: initialOptions.detailedReport,\n    defaultTargetOptions: {\n      shouldOptimize,\n      shouldScopeHoist: initialOptions?.defaultTargetOptions?.shouldScopeHoist,\n      sourceMaps: initialOptions?.defaultTargetOptions?.sourceMaps ?? true,\n      publicUrl,\n      ...(distDir != null\n        ? {distDir: toProjectPath(projectRoot, distDir)}\n        : {\n            /*::...null*/\n          }),\n      engines: initialOptions?.defaultTargetOptions?.engines,\n      outputFormat: initialOptions?.defaultTargetOptions?.outputFormat,\n      isLibrary: initialOptions?.defaultTargetOptions?.isLibrary,\n    },\n    featureFlags: {...DEFAULT_FEATURE_FLAGS, ...initialOptions?.featureFlags},\n    parcelVersion: PARCEL_VERSION,\n  };\n}\n\nfunction getRelativeConfigSpecifier(\n  fs: FileSystem,\n  projectRoot: FilePath,\n  specifier: ?DependencySpecifier,\n) {\n  if (specifier == null) {\n    return undefined;\n  } else if (path.isAbsolute(specifier)) {\n    let resolveFrom = getResolveFrom(fs, projectRoot);\n    let relative = relativePath(path.dirname(resolveFrom), specifier);\n    // If the config is outside the project root, use an absolute path so that if the project root\n    // moves the path still works. Otherwise, use a relative path so that the cache is portable.\n    return relative.startsWith('..') ? specifier : relative;\n  } else {\n    return specifier;\n  }\n}\n\nfunction determinePort(\n  initialServerOptions: InitialServerOptions | false | void,\n  portInEnv: string | void,\n  defaultPort: number = 1234,\n): number {\n  function parsePort(port: string): number | void {\n    let parsedPort = Number(port);\n\n    // return undefined if port number defined in .env is not valid integer\n    if (!Number.isInteger(parsedPort)) {\n      return undefined;\n    }\n    return parsedPort;\n  }\n\n  if (!initialServerOptions) {\n    return typeof portInEnv !== 'undefined'\n      ? parsePort(portInEnv) ?? defaultPort\n      : defaultPort;\n  }\n\n  // if initialServerOptions.port is equal to defaultPort, then this means that port number is provided via PORT=~~~~ on cli. In this case, we should ignore port number defined in .env.\n  if (initialServerOptions.port !== defaultPort) {\n    return initialServerOptions.port;\n  }\n\n  return typeof portInEnv !== 'undefined'\n    ? parsePort(portInEnv) ?? defaultPort\n    : defaultPort;\n}\n"
  },
  {
    "path": "packages/core/core/src/serializer.js",
    "content": "// @flow\nimport {createBuildCache} from './buildCache';\nimport {serializeRaw, deserializeRaw} from './serializerCore';\n\nexport {serializeRaw, deserializeRaw} from './serializerCore';\n\nconst nameToCtor: Map<string, Class<any>> = new Map();\nconst ctorToName: Map<Class<any>, string> = new Map();\n\nexport function registerSerializableClass(name: string, ctor: Class<any>) {\n  if (ctorToName.has(ctor)) {\n    throw new Error('Class already registered with serializer');\n  }\n\n  nameToCtor.set(name, ctor);\n  ctorToName.set(ctor, name);\n}\n\nexport function unregisterSerializableClass(name: string, ctor: Class<any>) {\n  if (nameToCtor.get(name) === ctor) {\n    nameToCtor.delete(name);\n  }\n\n  if (ctorToName.get(ctor) === name) {\n    ctorToName.delete(ctor);\n  }\n}\n\nfunction shallowCopy(object: any) {\n  if (object && typeof object === 'object') {\n    if (Array.isArray(object)) {\n      return [...object];\n    }\n\n    if (object instanceof Map) {\n      return new Map(object);\n    }\n\n    if (object instanceof Set) {\n      return new Set(object);\n    }\n\n    return Object.create(\n      Object.getPrototypeOf(object),\n      Object.getOwnPropertyDescriptors(object),\n    );\n  }\n\n  return object;\n}\n\nfunction isBuffer(object) {\n  return (\n    object.buffer instanceof ArrayBuffer ||\n    (typeof SharedArrayBuffer !== 'undefined' &&\n      object.buffer instanceof SharedArrayBuffer)\n  );\n}\n\nfunction shouldContinueMapping(value) {\n  return value && typeof value === 'object' && value.$$raw !== true;\n}\n\nfunction mapObject(object: any, fn: (val: any) => any, preOrder = false): any {\n  let cache = new Map();\n  let memo = new Map();\n\n  // Memoize the passed function to ensure it always returns the exact same\n  // output by reference for the same input. This is important to maintain\n  // reference integrity when deserializing rather than cloning.\n  let memoizedFn = (val: any) => {\n    let res = memo.get(val);\n    if (res == null) {\n      res = fn(val);\n      memo.set(val, res);\n    }\n\n    return res;\n  };\n\n  let walk = (object: any, shouldCopy = false) => {\n    // Check the cache first, both for performance and cycle detection.\n    if (cache.has(object)) {\n      return cache.get(object);\n    }\n\n    let result = object;\n    cache.set(object, result);\n\n    let processKey = (key: any, value: any) => {\n      let newValue = value;\n      if (preOrder && value && typeof value === 'object') {\n        newValue = memoizedFn(value);\n      }\n\n      // Recursively walk the children\n      if (\n        preOrder\n          ? shouldContinueMapping(newValue)\n          : newValue &&\n            typeof newValue === 'object' &&\n            shouldContinueMapping(object)\n      ) {\n        newValue = walk(newValue, newValue === value);\n      }\n\n      if (!preOrder && newValue && typeof newValue === 'object') {\n        newValue = memoizedFn(newValue);\n      }\n\n      if (newValue !== value) {\n        // Copy on write. We only need to do this when serializing, not deserializing.\n        if (object === result && preOrder && shouldCopy) {\n          result = shallowCopy(object);\n          cache.set(object, result);\n        }\n\n        // Replace the key with the new value\n        if (result instanceof Map) {\n          result.set(key, newValue);\n        } else if (result instanceof Set) {\n          let _result = result; // For Flow\n          // TODO: do we care about iteration order??\n          _result.delete(value);\n          _result.add(newValue);\n        } else {\n          result[key] = newValue;\n        }\n      }\n    };\n\n    // Iterate in various ways depending on type.\n    if (Array.isArray(object)) {\n      for (let i = 0; i < object.length; i++) {\n        processKey(i, object[i]);\n      }\n    } else if (object instanceof Map || object instanceof Set) {\n      for (let [key, val] of object.entries()) {\n        processKey(key, val);\n      }\n    } else if (!isBuffer(object)) {\n      for (let key in object) {\n        processKey(key, object[key]);\n      }\n    }\n\n    return result;\n  };\n\n  let mapped = memoizedFn(object);\n  if (\n    preOrder\n      ? shouldContinueMapping(mapped)\n      : mapped && typeof mapped === 'object' && shouldContinueMapping(object)\n  ) {\n    return walk(mapped, mapped === object);\n  }\n\n  return mapped;\n}\n\nexport function prepareForSerialization(object: any): any {\n  if (object?.$$raw) {\n    return object;\n  }\n\n  return mapObject(\n    object,\n    value => {\n      // Add a $$type property with the name of this class, if any is registered.\n      if (\n        value &&\n        typeof value === 'object' &&\n        typeof value.constructor === 'function'\n      ) {\n        let type = ctorToName.get(value.constructor);\n        if (type != null) {\n          let serialized = value;\n          let raw = false;\n          if (value && typeof value.serialize === 'function') {\n            // If the object has a serialize method, call it\n            serialized = value.serialize();\n            raw = (serialized && serialized.$$raw) ?? true;\n            if (serialized) {\n              delete serialized.$$raw;\n            }\n          }\n\n          return {\n            $$type: type,\n            $$raw: raw,\n            value: {...serialized},\n          };\n        }\n      }\n\n      return value;\n    },\n    true,\n  );\n}\n\nexport function restoreDeserializedObject(object: any): any {\n  return mapObject(object, value => {\n    // If the value has a $$type property, use it to restore the object type\n    if (value && value.$$type) {\n      let ctor = nameToCtor.get(value.$$type);\n      if (ctor == null) {\n        throw new Error(\n          `Expected constructor ${value.$$type} to be registered with serializer to deserialize`,\n        );\n      }\n\n      if (typeof ctor.deserialize === 'function') {\n        return ctor.deserialize(value.value);\n      }\n\n      value = value.value;\n      Object.setPrototypeOf(value, ctor.prototype);\n    }\n\n    return value;\n  });\n}\n\nconst serializeCache = createBuildCache();\n\nexport function serialize(object: any): Buffer {\n  let cached = serializeCache.get(object);\n  if (cached) {\n    return cached;\n  }\n\n  let mapped = prepareForSerialization(object);\n  return serializeRaw(mapped);\n}\n\nexport function deserialize(buffer: Buffer): any {\n  let obj = deserializeRaw(buffer);\n  return restoreDeserializedObject(obj);\n}\n\nexport function cacheSerializedObject(object: any, buffer?: Buffer): void {\n  serializeCache.set(object, buffer || serialize(object));\n}\n\nexport function deserializeToCache(buffer: Buffer): any {\n  let deserialized = deserialize(buffer);\n  serializeCache.set(deserialized, buffer);\n  return deserialized;\n}\n\nexport function removeSerializedObjectFromCache(object: any) {\n  serializeCache.delete(object);\n}\n"
  },
  {
    "path": "packages/core/core/src/serializerCore.browser.js",
    "content": "// @flow\nimport {Buffer} from 'buffer';\nimport * as msgpackr from 'msgpackr';\n\nlet encoder = new msgpackr.Encoder({structuredClone: true});\n\nexport let serializeRaw: any => Buffer = v => Buffer.from(encoder.encode(v));\nexport let deserializeRaw: Buffer => any = v => encoder.decode(v);\n"
  },
  {
    "path": "packages/core/core/src/serializerCore.js",
    "content": "// @flow\nimport v8 from 'v8';\n\nexport let serializeRaw: any => Buffer = v8.serialize;\nexport let deserializeRaw: Buffer => any = v8.deserialize;\n"
  },
  {
    "path": "packages/core/core/src/summarizeRequest.js",
    "content": "// @flow strict-local\nimport type {Blob, FilePath} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\n\nimport path from 'path';\n\nconst NODE_MODULES = `${path.sep}node_modules${path.sep}`;\n\nconst BUFFER_LIMIT = 5000000; // 5mb\n\nexport default async function summarizeRequest(\n  fs: FileSystem,\n  req: {|filePath: FilePath, code?: string|},\n): Promise<{|content: Blob, size: number, isSource: boolean|}> {\n  let {content, size} = await summarizeDiskRequest(fs, req);\n  let isSource = isFilePathSource(fs, req.filePath);\n  return {content, size, isSource};\n}\n\nfunction isFilePathSource(fs: FileSystem, filePath: FilePath) {\n  return !filePath.includes(NODE_MODULES);\n}\n\nasync function summarizeDiskRequest(\n  fs: FileSystem,\n  req: {|filePath: FilePath, code?: string|},\n): Promise<{|content: Blob, size: number|}> {\n  let code = req.code;\n  let content: Blob;\n  let size: number;\n  if (code == null) {\n    // Get the filesize. If greater than BUFFER_LIMIT, use a stream to\n    // compute the hash. In the common case, it's faster to just read the entire\n    // file first and do the hash all at once without the overhead of streams.\n    size = (await fs.stat(req.filePath)).size;\n    if (size > BUFFER_LIMIT) {\n      content = fs.createReadStream(req.filePath);\n    } else {\n      content = await fs.readFile(req.filePath);\n    }\n  } else {\n    content = code;\n    size = Buffer.byteLength(code);\n  }\n\n  return {content, size};\n}\n"
  },
  {
    "path": "packages/core/core/src/types.js",
    "content": "// @flow strict-local\n\nimport type {ContentKey} from '@parcel/graph';\nimport type {\n  ASTGenerator,\n  BuildMode,\n  Engines,\n  EnvironmentContext,\n  EnvMap,\n  FilePath,\n  Glob,\n  LogLevel,\n  Meta,\n  DependencySpecifier,\n  PackageName,\n  ReporterEvent,\n  SemverRange,\n  ServerOptions,\n  SourceType,\n  Stats,\n  Symbol,\n  TargetSourceMapOptions,\n  ConfigResult,\n  OutputFormat,\n  TargetDescriptor,\n  HMROptions,\n  DetailedReportOptions,\n} from '@parcel/types';\nimport type {SharedReference} from '@parcel/workers';\nimport type {FileSystem} from '@parcel/fs';\nimport type {Cache} from '@parcel/cache';\nimport type {PackageManager} from '@parcel/package-manager';\nimport type {ProjectPath} from './projectPath';\nimport type {Event} from '@parcel/watcher';\nimport type {FeatureFlags} from '@parcel/feature-flags';\nimport type {BackendType} from '@parcel/watcher';\n\nexport type ParcelPluginNode = {|\n  packageName: PackageName,\n  resolveFrom: ProjectPath,\n  keyPath?: string,\n|};\n\nexport type PureParcelConfigPipeline = $ReadOnlyArray<ParcelPluginNode>;\nexport type ExtendableParcelConfigPipeline = $ReadOnlyArray<\n  ParcelPluginNode | '...',\n>;\n\nexport type ProcessedParcelConfig = {|\n  resolvers?: PureParcelConfigPipeline,\n  transformers?: {[Glob]: ExtendableParcelConfigPipeline, ...},\n  bundler: ?ParcelPluginNode,\n  namers?: PureParcelConfigPipeline,\n  runtimes?: PureParcelConfigPipeline,\n  packagers?: {[Glob]: ParcelPluginNode, ...},\n  optimizers?: {[Glob]: ExtendableParcelConfigPipeline, ...},\n  compressors?: {[Glob]: ExtendableParcelConfigPipeline, ...},\n  reporters?: PureParcelConfigPipeline,\n  validators?: {[Glob]: ExtendableParcelConfigPipeline, ...},\n  filePath: ProjectPath,\n  resolveFrom?: ProjectPath,\n|};\n\nexport type Environment = {|\n  id: string,\n  context: EnvironmentContext,\n  engines: Engines,\n  includeNodeModules:\n    | boolean\n    | Array<PackageName>\n    | {[PackageName]: boolean, ...},\n  outputFormat: OutputFormat,\n  sourceType: SourceType,\n  isLibrary: boolean,\n  shouldOptimize: boolean,\n  shouldScopeHoist: boolean,\n  sourceMap: ?TargetSourceMapOptions,\n  loc: ?InternalSourceLocation,\n|};\n\nexport type InternalSourceLocation = {|\n  +filePath: ProjectPath,\n  /** inclusive */\n  +start: {|\n    +line: number,\n    +column: number,\n  |},\n  /** exclusive */\n  +end: {|\n    +line: number,\n    +column: number,\n  |},\n|};\n\nexport type Target = {|\n  distEntry?: ?FilePath,\n  distDir: ProjectPath,\n  env: Environment,\n  name: string,\n  publicUrl: string,\n  loc?: ?InternalSourceLocation,\n  pipeline?: string,\n  source?: FilePath | Array<FilePath>,\n|};\n\nexport const SpecifierType = {\n  esm: 0,\n  commonjs: 1,\n  url: 2,\n  custom: 3,\n};\n\nexport const Priority = {\n  sync: 0,\n  parallel: 1,\n  lazy: 2,\n};\n\n// Must match package_json.rs in the parcel-resolver crate.\nexport const ExportsCondition = {\n  import: 1 << 0,\n  require: 1 << 1,\n  module: 1 << 2,\n  style: 1 << 12,\n  sass: 1 << 13,\n  less: 1 << 14,\n  stylus: 1 << 15,\n};\n\nexport type Dependency = {|\n  id: string,\n  specifier: DependencySpecifier,\n  specifierType: $Values<typeof SpecifierType>,\n  priority: $Values<typeof Priority>,\n  needsStableName: boolean,\n  bundleBehavior: ?$Values<typeof BundleBehavior>,\n  isEntry: boolean,\n  isOptional: boolean,\n  loc: ?InternalSourceLocation,\n  env: Environment,\n  packageConditions?: number,\n  customPackageConditions?: Array<string>,\n  meta: Meta,\n  resolverMeta?: ?Meta,\n  resolverPriority?: $Values<typeof Priority>,\n  target: ?Target,\n  sourceAssetId: ?string,\n  sourcePath: ?ProjectPath,\n  sourceAssetType?: ?string,\n  resolveFrom: ?ProjectPath,\n  range: ?SemverRange,\n  symbols: ?Map<\n    Symbol,\n    {|\n      local: Symbol,\n      loc: ?InternalSourceLocation,\n      isWeak: boolean,\n      meta?: ?Meta,\n    |},\n  >,\n  pipeline?: ?string,\n|};\n\nexport const BundleBehavior = {\n  inline: 0,\n  isolated: 1,\n};\n\nexport const BundleBehaviorNames: Array<$Keys<typeof BundleBehavior>> =\n  Object.keys(BundleBehavior);\n\nexport type Asset = {|\n  id: ContentKey,\n  committed: boolean,\n  filePath: ProjectPath,\n  query: ?string,\n  type: string,\n  dependencies: Map<string, Dependency>,\n  bundleBehavior: ?$Values<typeof BundleBehavior>,\n  isBundleSplittable: boolean,\n  isSource: boolean,\n  env: Environment,\n  meta: Meta,\n  stats: Stats,\n  contentKey: ?string,\n  mapKey: ?string,\n  outputHash: ?string,\n  pipeline: ?string,\n  astKey: ?string,\n  astGenerator: ?ASTGenerator,\n  symbols: ?Map<\n    Symbol,\n    {|local: Symbol, loc: ?InternalSourceLocation, meta?: ?Meta|},\n  >,\n  sideEffects: boolean,\n  uniqueKey: ?string,\n  configPath?: ProjectPath,\n  plugin: ?PackageName,\n  configKeyPath?: string,\n  isLargeBlob?: boolean,\n|};\n\nexport type InternalGlob = ProjectPath;\n\nexport type InternalFile = {|\n  +filePath: ProjectPath,\n  +hash?: string,\n|};\n\nexport type FileInvalidation = {|\n  type: 'file',\n  filePath: ProjectPath,\n|};\n\nexport type EnvInvalidation = {|\n  type: 'env',\n  key: string,\n|};\n\nexport type OptionInvalidation = {|\n  type: 'option',\n  key: string,\n|};\n\nexport type RequestInvalidation =\n  | FileInvalidation\n  | EnvInvalidation\n  | OptionInvalidation;\n\nexport type InternalFileInvalidation = {|\n  filePath: ProjectPath,\n|};\n\nexport type InternalGlobInvalidation = {|\n  glob: InternalGlob,\n|};\n\nexport type InternalFileAboveInvalidation = {|\n  fileName: string,\n  aboveFilePath: ProjectPath,\n|};\n\nexport type InternalFileCreateInvalidation =\n  | InternalFileInvalidation\n  | InternalGlobInvalidation\n  | InternalFileAboveInvalidation;\n\nexport type Invalidations = {|\n  invalidateOnFileChange: Set<ProjectPath>,\n  invalidateOnFileCreate: Array<InternalFileCreateInvalidation>,\n  invalidateOnEnvChange: Set<string>,\n  invalidateOnOptionChange: Set<string>,\n  invalidateOnStartup: boolean,\n  invalidateOnBuild: boolean,\n|};\n\nexport type DevDepRequest = {|\n  specifier: DependencySpecifier,\n  resolveFrom: ProjectPath,\n  hash: string,\n  invalidateOnFileCreate: Array<InternalFileCreateInvalidation>,\n  invalidateOnFileChange: Set<ProjectPath>,\n  invalidateOnStartup: boolean,\n  additionalInvalidations?: Array<{|\n    specifier: DependencySpecifier,\n    resolveFrom: ProjectPath,\n    range?: ?SemverRange,\n  |}>,\n|};\n\nexport type DevDepRequestRef = {|\n  type: 'ref',\n  specifier: DependencySpecifier,\n  resolveFrom: ProjectPath,\n  hash: string,\n|};\n\ndeclare type GlobPattern = string;\n\nexport type ParcelOptions = {|\n  entries: Array<ProjectPath>,\n  config?: DependencySpecifier,\n  defaultConfig?: DependencySpecifier,\n  env: EnvMap,\n  parcelVersion: string,\n  targets: ?(Array<string> | {+[string]: TargetDescriptor, ...}),\n  shouldDisableCache: boolean,\n  cacheDir: FilePath,\n  watchDir: FilePath,\n  watchIgnore?: Array<FilePath | GlobPattern>,\n  watchBackend?: BackendType,\n  mode: BuildMode,\n  hmrOptions: ?HMROptions,\n  shouldContentHash: boolean,\n  serveOptions: ServerOptions | false,\n  shouldBuildLazily: boolean,\n  lazyIncludes: RegExp[],\n  lazyExcludes: RegExp[],\n  shouldBundleIncrementally: boolean,\n  shouldAutoInstall: boolean,\n  logLevel: LogLevel,\n  projectRoot: FilePath,\n  shouldProfile: boolean,\n  shouldTrace: boolean,\n  shouldPatchConsole: boolean,\n  detailedReport?: ?DetailedReportOptions,\n  unstableFileInvalidations?: Array<Event>,\n\n  inputFS: FileSystem,\n  outputFS: FileSystem,\n  cache: Cache,\n  packageManager: PackageManager,\n  additionalReporters: Array<{|\n    packageName: DependencySpecifier,\n    resolveFrom: ProjectPath,\n  |}>,\n\n  instanceId: string,\n\n  +defaultTargetOptions: {|\n    +shouldOptimize: boolean,\n    +shouldScopeHoist?: boolean,\n    +sourceMaps: boolean,\n    +publicUrl: string,\n    +distDir?: ProjectPath,\n    +engines?: Engines,\n    +outputFormat?: OutputFormat,\n    +isLibrary?: boolean,\n  |},\n\n  +featureFlags: FeatureFlags,\n|};\n\nexport type AssetNode = {|\n  id: ContentKey,\n  +type: 'asset',\n  value: Asset,\n  usedSymbols: Set<Symbol>,\n  hasDeferred?: boolean,\n  usedSymbolsDownDirty: boolean,\n  usedSymbolsUpDirty: boolean,\n  requested?: boolean,\n|};\n\nexport type DependencyNode = {|\n  id: ContentKey,\n  type: 'dependency',\n  value: Dependency,\n  complete?: boolean,\n  correspondingRequest?: string,\n  deferred: boolean,\n  /** dependency was deferred (= no used symbols (in immediate parents) & side-effect free) */\n  hasDeferred?: boolean,\n  usedSymbolsDown: Set<Symbol>,\n  /**\n   * a requested symbol -> either\n   *  - if ambiguous (e.g. dependency to asset group with both CSS modules and JS asset): undefined\n   *  - if external: null\n   *  - the asset it resolved to, and the potentially renamed export name\n   */\n  usedSymbolsUp: Map<\n    Symbol,\n    {|asset: ContentKey, symbol: ?Symbol|} | void | null,\n  >,\n  /*\n   * For the \"down\" pass, the resolutionAsset needs to be updated.\n   * This is set when the AssetGraphBuilder adds/removes/updates nodes.\n   */\n  usedSymbolsDownDirty: boolean,\n  /**\n   * In the down pass, `usedSymbolsDown` changed. This needs to be propagated to the resolutionAsset\n   * in the up pass.\n   */\n  usedSymbolsUpDirtyDown: boolean,\n  /**\n   * In the up pass, `usedSymbolsUp` changed. This needs to be propagated to the sourceAsset in the\n   * up pass.\n   */\n  usedSymbolsUpDirtyUp: boolean,\n  /** dependency was excluded (= no used symbols (globally) & side-effect free) */\n  excluded: boolean,\n|};\n\nexport type RootNode = {|id: ContentKey, +type: 'root', value: string | null|};\n\nexport type AssetRequestInput = {|\n  name?: string, // AssetGraph name, needed so that different graphs can isolated requests since the results are not stored\n  filePath: ProjectPath,\n  env: Environment,\n  isSource?: boolean,\n  canDefer?: boolean,\n  sideEffects?: boolean,\n  code?: string,\n  pipeline?: ?string,\n  optionsRef: SharedReference,\n  isURL?: boolean,\n  query?: ?string,\n  isSingleChangeRebuild?: boolean,\n|};\n\nexport type AssetRequestResult = Array<Asset>;\n// Asset group nodes are essentially used as placeholders for the results of an asset request\nexport type AssetGroup = $Rest<\n  AssetRequestInput,\n  {|optionsRef: SharedReference|},\n>;\nexport type AssetGroupNode = {|\n  id: ContentKey,\n  +type: 'asset_group',\n  value: AssetGroup,\n  correspondingRequest?: string,\n  /** this node was deferred (= no used symbols (in immediate parents) & side-effect free) */\n  deferred?: boolean,\n  hasDeferred?: boolean,\n  usedSymbolsDownDirty: boolean,\n|};\n\nexport type TransformationRequest = {|\n  ...AssetGroup,\n  invalidateReason: number,\n  devDeps: Map<PackageName, string>,\n  invalidDevDeps: Array<{|\n    specifier: DependencySpecifier,\n    resolveFrom: ProjectPath,\n  |}>,\n|};\n\nexport type DepPathRequestNode = {|\n  id: ContentKey,\n  +type: 'dep_path_request',\n  value: Dependency,\n|};\n\nexport type AssetRequestNode = {|\n  id: ContentKey,\n  +type: 'asset_request',\n  value: AssetRequestInput,\n|};\n\nexport type EntrySpecifierNode = {|\n  id: ContentKey,\n  +type: 'entry_specifier',\n  value: ProjectPath,\n  correspondingRequest?: string,\n|};\n\nexport type Entry = {|\n  filePath: ProjectPath,\n  packagePath: ProjectPath,\n  target?: string,\n  loc?: ?InternalSourceLocation,\n|};\n\nexport type EntryFileNode = {|\n  id: ContentKey,\n  +type: 'entry_file',\n  value: Entry,\n  correspondingRequest?: string,\n|};\n\nexport type AssetGraphNode =\n  | AssetGroupNode\n  | AssetNode\n  | DependencyNode\n  | EntrySpecifierNode\n  | EntryFileNode\n  | RootNode;\n\nexport type BundleGraphNode =\n  | AssetNode\n  | DependencyNode\n  | EntrySpecifierNode\n  | EntryFileNode\n  | RootNode\n  | BundleGroupNode\n  | BundleNode;\n\nexport type InternalDevDepOptions = {|\n  specifier: DependencySpecifier,\n  resolveFrom: ProjectPath,\n  range?: ?SemverRange,\n  additionalInvalidations?: Array<{|\n    specifier: DependencySpecifier,\n    resolveFrom: ProjectPath,\n    range?: ?SemverRange,\n  |}>,\n|};\n\nexport type Config = {|\n  id: string,\n  isSource: boolean,\n  searchPath: ProjectPath,\n  env: Environment,\n  cacheKey: ?string,\n  result: ConfigResult,\n  invalidateOnFileChange: Set<ProjectPath>,\n  invalidateOnConfigKeyChange: Array<{|\n    filePath: ProjectPath,\n    configKey: string,\n  |}>,\n  invalidateOnFileCreate: Array<InternalFileCreateInvalidation>,\n  invalidateOnEnvChange: Set<string>,\n  invalidateOnOptionChange: Set<string>,\n  devDeps: Array<InternalDevDepOptions>,\n  invalidateOnStartup: boolean,\n  invalidateOnBuild: boolean,\n|};\n\nexport type EntryRequest = {|\n  specifier: DependencySpecifier,\n  result?: ProjectPath,\n|};\n\nexport type EntryRequestNode = {|\n  id: ContentKey,\n  +type: 'entry_request',\n  value: string,\n|};\n\nexport type TargetRequestNode = {|\n  id: ContentKey,\n  +type: 'target_request',\n  value: ProjectPath,\n|};\n\nexport type CacheEntry = {|\n  filePath: ProjectPath,\n  env: Environment,\n  hash: string,\n  assets: Array<Asset>,\n  // Initial assets, pre-post processing\n  initialAssets: ?Array<Asset>,\n|};\n\nexport type Bundle = {|\n  id: ContentKey,\n  publicId: ?string,\n  hashReference: string,\n  type: string,\n  env: Environment,\n  entryAssetIds: Array<ContentKey>,\n  mainEntryId: ?ContentKey,\n  needsStableName: ?boolean,\n  bundleBehavior: ?$Values<typeof BundleBehavior>,\n  isSplittable: ?boolean,\n  isPlaceholder?: boolean,\n  target: Target,\n  name: ?string,\n  displayName: ?string,\n  pipeline: ?string,\n  manualSharedBundle?: ?string,\n|};\n\nexport type BundleNode = {|\n  id: ContentKey,\n  +type: 'bundle',\n  value: Bundle,\n|};\n\nexport type BundleGroup = {|\n  target: Target,\n  entryAssetId: string,\n|};\n\nexport type BundleGroupNode = {|\n  id: ContentKey,\n  +type: 'bundle_group',\n  value: BundleGroup,\n|};\n\nexport type PackagedBundleInfo = {|\n  filePath: ProjectPath,\n  type: string,\n  stats: Stats,\n|};\n\nexport type TransformationOpts = {|\n  request: AssetGroup,\n  optionsRef: SharedReference,\n  configCachePath: string,\n|};\n\nexport type ValidationOpts = {|\n  requests: AssetGroup[],\n  optionsRef: SharedReference,\n  configCachePath: string,\n|};\n\nexport type ReportFn = (event: ReporterEvent) => void | Promise<void>;\n"
  },
  {
    "path": "packages/core/core/src/utils.js",
    "content": "// @flow strict-local\n\nimport type {\n  FilePath,\n  FileCreateInvalidation,\n  SourceLocation,\n} from '@parcel/types';\nimport type {\n  BundleGroup,\n  ParcelOptions,\n  InternalFileCreateInvalidation,\n  InternalSourceLocation,\n  InternalDevDepOptions,\n  Invalidations,\n} from './types';\nimport type {PackageManager} from '@parcel/package-manager';\n\nimport invariant from 'assert';\nimport baseX from 'base-x';\nimport {hashObject} from '@parcel/utils';\nimport {fromProjectPath, toProjectPath} from './projectPath';\n\nconst base62 = baseX(\n  '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n);\n\nexport function getBundleGroupId(bundleGroup: BundleGroup): string {\n  return 'bundle_group:' + bundleGroup.target.name + bundleGroup.entryAssetId;\n}\n\nexport function assertSignalNotAborted(signal: ?AbortSignal): void {\n  if (signal && signal.aborted) {\n    throw new BuildAbortError();\n  }\n}\n\nexport class BuildAbortError extends Error {\n  name: string = 'BuildAbortError';\n}\n\nexport function getPublicId(\n  id: string,\n  alreadyExists: string => boolean,\n): string {\n  let encoded = base62.encode(Buffer.from(id, 'hex'));\n  for (let end = 5; end <= encoded.length; end++) {\n    let candidate = encoded.slice(0, end);\n    if (!alreadyExists(candidate)) {\n      return candidate;\n    }\n  }\n\n  throw new Error('Original id was not unique');\n}\n\n// These options don't affect compilation and should cause invalidations\nconst ignoreOptions = new Set([\n  'env', // handled by separate invalidateOnEnvChange\n  'inputFS',\n  'outputFS',\n  'workerFarm',\n  'packageManager',\n  'detailedReport',\n  'shouldDisableCache',\n  'cacheDir',\n  'shouldAutoInstall',\n  'logLevel',\n  'shouldProfile',\n  'shouldTrace',\n  'shouldPatchConsole',\n  'projectRoot',\n  'additionalReporters',\n]);\n\nexport function optionsProxy(\n  options: ParcelOptions,\n  invalidateOnOptionChange: string => void,\n  addDevDependency?: (devDep: InternalDevDepOptions) => void,\n): ParcelOptions {\n  let packageManager = addDevDependency\n    ? proxyPackageManager(\n        options.projectRoot,\n        options.packageManager,\n        addDevDependency,\n      )\n    : options.packageManager;\n  return new Proxy(options, {\n    get(target, prop) {\n      if (prop === 'packageManager') {\n        return packageManager;\n      }\n\n      if (!ignoreOptions.has(prop)) {\n        invalidateOnOptionChange(prop);\n      }\n\n      return target[prop];\n    },\n  });\n}\n\nfunction proxyPackageManager(\n  projectRoot: FilePath,\n  packageManager: PackageManager,\n  addDevDependency: (devDep: InternalDevDepOptions) => void,\n): PackageManager {\n  let require = (id: string, from: string, opts) => {\n    addDevDependency({\n      specifier: id,\n      resolveFrom: toProjectPath(projectRoot, from),\n      range: opts?.range,\n    });\n    return packageManager.require(id, from, opts);\n  };\n\n  return new Proxy(packageManager, {\n    get(target, prop) {\n      if (prop === 'require') {\n        return require;\n      }\n\n      // $FlowFixMe\n      return target[prop];\n    },\n  });\n}\n\nexport function hashFromOption(value: mixed): string {\n  if (typeof value === 'object' && value != null) {\n    return hashObject(value);\n  }\n\n  return String(value);\n}\n\nexport function invalidateOnFileCreateToInternal(\n  projectRoot: FilePath,\n  invalidation: FileCreateInvalidation,\n): InternalFileCreateInvalidation {\n  if (invalidation.glob != null) {\n    return {glob: toProjectPath(projectRoot, invalidation.glob)};\n  } else if (invalidation.filePath != null) {\n    return {\n      filePath: toProjectPath(projectRoot, invalidation.filePath),\n    };\n  } else {\n    invariant(\n      invalidation.aboveFilePath != null && invalidation.fileName != null,\n    );\n    return {\n      fileName: invalidation.fileName,\n      aboveFilePath: toProjectPath(projectRoot, invalidation.aboveFilePath),\n    };\n  }\n}\n\nexport function createInvalidations(): Invalidations {\n  return {\n    invalidateOnBuild: false,\n    invalidateOnStartup: false,\n    invalidateOnOptionChange: new Set(),\n    invalidateOnEnvChange: new Set(),\n    invalidateOnFileChange: new Set(),\n    invalidateOnFileCreate: [],\n  };\n}\n\nexport function fromInternalSourceLocation(\n  projectRoot: FilePath,\n  loc: ?InternalSourceLocation,\n): ?SourceLocation {\n  if (!loc) return loc;\n\n  return {\n    filePath: fromProjectPath(projectRoot, loc.filePath),\n    start: loc.start,\n    end: loc.end,\n  };\n}\n\nexport function toInternalSourceLocation(\n  projectRoot: FilePath,\n  loc: ?SourceLocation,\n): ?InternalSourceLocation {\n  if (!loc) return loc;\n\n  return {\n    filePath: toProjectPath(projectRoot, loc.filePath),\n    start: loc.start,\n    end: loc.end,\n  };\n}\nexport function toInternalSymbols<T: {|loc: ?SourceLocation|}>(\n  projectRoot: FilePath,\n  symbols: ?Map<Symbol, T>,\n): ?Map<\n  Symbol,\n  {|loc: ?InternalSourceLocation, ...$Rest<T, {|loc: ?SourceLocation|}>|},\n> {\n  if (!symbols) return symbols;\n\n  return new Map(\n    [...symbols].map(([k, {loc, ...v}]) => [\n      k,\n      {\n        ...v,\n        loc: toInternalSourceLocation(projectRoot, loc),\n      },\n    ]),\n  );\n}\n"
  },
  {
    "path": "packages/core/core/src/worker.js",
    "content": "// @flow strict-local\n\nimport type {\n  Bundle,\n  ParcelOptions,\n  ProcessedParcelConfig,\n  RequestInvalidation,\n} from './types';\nimport type {SharedReference, WorkerApi} from '@parcel/workers';\nimport {loadConfig as configCache} from '@parcel/utils';\nimport type {DevDepSpecifier} from './requests/DevDepRequest';\n\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport BundleGraph from './BundleGraph';\nimport Transformation, {\n  type TransformationOpts,\n  type TransformationResult,\n} from './Transformation';\nimport {reportWorker, report} from './ReporterRunner';\nimport PackagerRunner, {type RunPackagerRunnerResult} from './PackagerRunner';\nimport Validation, {type ValidationOpts} from './Validation';\nimport ParcelConfig from './ParcelConfig';\nimport {registerCoreWithSerializer} from './registerCoreWithSerializer';\nimport {clearBuildCaches} from './buildCache';\nimport {init as initSourcemaps} from '@parcel/source-map';\nimport {init as initRust} from '@parcel/rust';\nimport WorkerFarm from '@parcel/workers';\nimport {setFeatureFlags} from '@parcel/feature-flags';\n\nimport '@parcel/cache'; // register with serializer\nimport '@parcel/package-manager';\nimport '@parcel/fs';\n\n// $FlowFixMe\nif (process.env.PARCEL_BUILD_REPL && process.browser) {\n  /* eslint-disable import/no-extraneous-dependencies, monorepo/no-internal-import */\n  require('@parcel/repl/src/parcel/BrowserPackageManager.js');\n  // $FlowFixMe\n  require('@parcel/repl/src/parcel/ExtendedMemoryFS.js');\n  /* eslint-enable import/no-extraneous-dependencies, monorepo/no-internal-import */\n}\n\nregisterCoreWithSerializer();\n\n// Remove the workerApi type from the TransformationOpts and ValidationOpts types:\n// https://github.com/facebook/flow/issues/2835\ntype WorkerTransformationOpts = {|\n  ...$Diff<TransformationOpts, {|workerApi: mixed, options: ParcelOptions|}>,\n  optionsRef: SharedReference,\n  configCachePath: string,\n|};\ntype WorkerValidationOpts = {|\n  ...$Diff<ValidationOpts, {|workerApi: mixed, options: ParcelOptions|}>,\n  optionsRef: SharedReference,\n  configCachePath: string,\n|};\n\n// TODO: this should eventually be replaced by an in memory cache layer\nlet parcelConfigCache = new Map();\n\nfunction loadOptions(ref, workerApi) {\n  return nullthrows(\n    ((workerApi.getSharedReference(\n      ref,\n      // $FlowFixMe\n    ): any): ParcelOptions),\n  );\n}\n\nasync function loadConfig(cachePath, options) {\n  let config = parcelConfigCache.get(cachePath);\n  if (config && config.options === options) {\n    return config;\n  }\n\n  let processedConfig = nullthrows(\n    await options.cache.get<ProcessedParcelConfig>(cachePath),\n  );\n  config = new ParcelConfig(processedConfig, options);\n  parcelConfigCache.set(cachePath, config);\n\n  setFeatureFlags(options.featureFlags);\n\n  return config;\n}\n\nexport function clearConfigCache() {\n  configCache.clear();\n  clearBuildCaches();\n}\n\nexport async function runTransform(\n  workerApi: WorkerApi,\n  opts: WorkerTransformationOpts,\n): Promise<TransformationResult> {\n  let {optionsRef, configCachePath, ...rest} = opts;\n  let options = loadOptions(optionsRef, workerApi);\n  let config = await loadConfig(configCachePath, options);\n\n  return new Transformation({\n    workerApi,\n    options,\n    config,\n    ...rest,\n  }).run();\n}\n\nexport async function runValidate(\n  workerApi: WorkerApi,\n  opts: WorkerValidationOpts,\n): Promise<void> {\n  let {optionsRef, configCachePath, ...rest} = opts;\n  let options = loadOptions(optionsRef, workerApi);\n  let config = await loadConfig(configCachePath, options);\n\n  return new Validation({\n    workerApi,\n    report: reportWorker.bind(null, workerApi),\n    options,\n    config,\n    ...rest,\n  }).run();\n}\n\nexport async function runPackage(\n  workerApi: WorkerApi,\n  {\n    bundle,\n    bundleGraphReference,\n    configCachePath,\n    optionsRef,\n    previousDevDeps,\n    invalidDevDeps,\n    previousInvalidations,\n  }: {|\n    bundle: Bundle,\n    bundleGraphReference: SharedReference,\n    configCachePath: string,\n    optionsRef: SharedReference,\n    previousDevDeps: Map<string, string>,\n    invalidDevDeps: Array<DevDepSpecifier>,\n    previousInvalidations: Array<RequestInvalidation>,\n  |},\n): Promise<RunPackagerRunnerResult> {\n  let bundleGraph = workerApi.getSharedReference(bundleGraphReference);\n  invariant(bundleGraph instanceof BundleGraph);\n  let options = loadOptions(optionsRef, workerApi);\n  let parcelConfig = await loadConfig(configCachePath, options);\n\n  let runner = new PackagerRunner({\n    config: parcelConfig,\n    options,\n    report: WorkerFarm.isWorker() ? reportWorker.bind(null, workerApi) : report,\n    previousDevDeps,\n    previousInvalidations,\n  });\n\n  return runner.run(bundleGraph, bundle, invalidDevDeps);\n}\n\nexport async function childInit() {\n  await initSourcemaps;\n  await initRust?.();\n}\n\nconst PKG_RE =\n  /node_modules[/\\\\]((?:@[^/\\\\]+[/\\\\][^/\\\\]+)|[^/\\\\]+)(?!.*[/\\\\]node_modules[/\\\\])/;\nexport function invalidateRequireCache(workerApi: WorkerApi, file: string) {\n  if (process.env.PARCEL_BUILD_ENV === 'test') {\n    // Delete this module and all children in the same node_modules folder\n    let module = require.cache[file];\n    if (module) {\n      delete require.cache[file];\n\n      let pkg = file.match(PKG_RE)?.[1];\n      for (let child of module.children) {\n        if (pkg === child.id.match(PKG_RE)?.[1]) {\n          invalidateRequireCache(workerApi, child.id);\n        }\n      }\n    }\n\n    parcelConfigCache.clear();\n    return;\n  }\n\n  throw new Error('invalidateRequireCache is only for tests');\n}\n"
  },
  {
    "path": "packages/core/core/test/AssetGraph.test.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport AssetGraph, {\n  nodeFromAssetGroup,\n  nodeFromDep,\n  nodeFromEntryFile,\n  nodeFromAsset,\n} from '../src/AssetGraph';\nimport {createDependency as _createDependency} from '../src/Dependency';\nimport {createAsset as _createAsset} from '../src/assetUtils';\nimport {DEFAULT_ENV, DEFAULT_TARGETS} from './test-utils';\nimport {toProjectPath as _toProjectPath} from '../src/projectPath';\n\nconst stats = {size: 0, time: 0};\n\nfunction createAsset(opts) {\n  return _createAsset('/', opts);\n}\n\nfunction createDependency(opts) {\n  return _createDependency('/', opts);\n}\n\nfunction toProjectPath(p) {\n  return _toProjectPath('/', p);\n}\n\ndescribe('AssetGraph', () => {\n  it('initialization should create one root node with edges to entry_specifier nodes for each entry', () => {\n    let graph = new AssetGraph();\n    graph.setRootConnections({\n      entries: [\n        toProjectPath('/path/to/index1'),\n        toProjectPath('/path/to/index2'),\n      ],\n    });\n\n    assert(graph.hasNode(nullthrows(graph.rootNodeId)));\n    assert(graph.hasContentKey('entry_specifier:path/to/index1'));\n    assert(graph.hasContentKey('entry_specifier:path/to/index2'));\n  });\n\n  it('resolveEntry should connect an entry_specifier node to entry_file nodes', () => {\n    let graph = new AssetGraph();\n    graph.setRootConnections({\n      entries: [\n        toProjectPath('/path/to/index1'),\n        toProjectPath('/path/to/index2'),\n      ],\n    });\n\n    graph.resolveEntry(\n      toProjectPath('/path/to/index1'),\n      [\n        {\n          filePath: toProjectPath('/path/to/index1/src/main.js'),\n          packagePath: toProjectPath('/path/to/index1'),\n        },\n      ],\n      '123',\n    );\n\n    assert(\n      graph.hasContentKey(\n        nodeFromEntryFile({\n          filePath: toProjectPath('/path/to/index1/src/main.js'),\n          packagePath: toProjectPath('/path/to/index1'),\n        }).id,\n      ),\n    );\n    assert(\n      graph.hasEdge(\n        graph.getNodeIdByContentKey('entry_specifier:path/to/index1'),\n        graph.getNodeIdByContentKey(\n          nodeFromEntryFile({\n            filePath: toProjectPath('/path/to/index1/src/main.js'),\n            packagePath: toProjectPath('/path/to/index1'),\n          }).id,\n        ),\n      ),\n    );\n  });\n\n  it('resolveTargets should connect an entry_file node to dependencies for each target', () => {\n    let graph = new AssetGraph();\n    graph.setRootConnections({\n      entries: [\n        toProjectPath('/path/to/index1'),\n        toProjectPath('/path/to/index2'),\n      ],\n    });\n\n    graph.resolveEntry(\n      toProjectPath('/path/to/index1'),\n      [\n        {\n          filePath: toProjectPath('/path/to/index1/src/main.js'),\n          packagePath: toProjectPath('/path/to/index1'),\n        },\n      ],\n      '1',\n    );\n    graph.resolveEntry(\n      toProjectPath('/path/to/index2'),\n      [\n        {\n          filePath: toProjectPath('/path/to/index2/src/main.js'),\n          packagePath: toProjectPath('/path/to/index2'),\n        },\n      ],\n      '2',\n    );\n\n    graph.resolveTargets(\n      {\n        filePath: toProjectPath('/path/to/index1/src/main.js'),\n        packagePath: toProjectPath('/path/to/index1'),\n      },\n      DEFAULT_TARGETS,\n      '3',\n    );\n    graph.resolveTargets(\n      {\n        filePath: toProjectPath('/path/to/index2/src/main.js'),\n        packagePath: toProjectPath('/path/to/index2'),\n      },\n      DEFAULT_TARGETS,\n      '4',\n    );\n\n    assert(\n      graph.hasContentKey(\n        createDependency({\n          specifier: 'path/to/index1/src/main.js',\n          specifierType: 'esm',\n          target: DEFAULT_TARGETS[0],\n          env: DEFAULT_ENV,\n        }).id,\n      ),\n    );\n    assert(\n      graph.hasContentKey(\n        createDependency({\n          specifier: 'path/to/index2/src/main.js',\n          specifierType: 'esm',\n          target: DEFAULT_TARGETS[0],\n          env: DEFAULT_ENV,\n        }).id,\n      ),\n    );\n    assert.deepEqual(Array.from(graph.getAllEdges()), [\n      {\n        from: graph.rootNodeId,\n        to: graph.getNodeIdByContentKey('entry_specifier:path/to/index1'),\n        type: 1,\n      },\n      {\n        from: graph.rootNodeId,\n        to: graph.getNodeIdByContentKey('entry_specifier:path/to/index2'),\n        type: 1,\n      },\n      {\n        from: graph.getNodeIdByContentKey('entry_specifier:path/to/index1'),\n        to: graph.getNodeIdByContentKey(\n          nodeFromEntryFile({\n            filePath: toProjectPath('/path/to/index1/src/main.js'),\n            packagePath: toProjectPath('/path/to/index1'),\n          }).id,\n        ),\n        type: 1,\n      },\n      {\n        from: graph.getNodeIdByContentKey('entry_specifier:path/to/index2'),\n        to: graph.getNodeIdByContentKey(\n          nodeFromEntryFile({\n            filePath: toProjectPath('/path/to/index2/src/main.js'),\n            packagePath: toProjectPath('/path/to/index2'),\n          }).id,\n        ),\n        type: 1,\n      },\n      {\n        from: graph.getNodeIdByContentKey(\n          nodeFromEntryFile({\n            filePath: toProjectPath('/path/to/index1/src/main.js'),\n            packagePath: toProjectPath('/path/to/index1'),\n          }).id,\n        ),\n        to: graph.getNodeIdByContentKey(\n          createDependency({\n            specifier: 'path/to/index1/src/main.js',\n            specifierType: 'esm',\n            target: DEFAULT_TARGETS[0],\n            env: DEFAULT_ENV,\n          }).id,\n        ),\n        type: 1,\n      },\n      {\n        from: graph.getNodeIdByContentKey(\n          nodeFromEntryFile({\n            filePath: toProjectPath('/path/to/index2/src/main.js'),\n            packagePath: toProjectPath('/path/to/index2'),\n          }).id,\n        ),\n        to: graph.getNodeIdByContentKey(\n          createDependency({\n            specifier: 'path/to/index2/src/main.js',\n            specifierType: 'esm',\n            target: DEFAULT_TARGETS[0],\n            env: DEFAULT_ENV,\n          }).id,\n        ),\n        type: 1,\n      },\n    ]);\n  });\n\n  it('resolveDependency should update the file a dependency is connected to', () => {\n    let graph = new AssetGraph();\n    graph.setRootConnections({\n      targets: DEFAULT_TARGETS,\n      entries: [toProjectPath('/path/to/index')],\n    });\n\n    graph.resolveEntry(\n      toProjectPath('/path/to/index'),\n      [\n        {\n          filePath: toProjectPath('/path/to/index/src/main.js'),\n          packagePath: toProjectPath('/path/to/index'),\n        },\n      ],\n      '1',\n    );\n    graph.resolveTargets(\n      {\n        filePath: toProjectPath('/path/to/index/src/main.js'),\n        packagePath: toProjectPath('/path/to/index'),\n      },\n      DEFAULT_TARGETS,\n      '2',\n    );\n\n    let dep = createDependency({\n      specifier: 'path/to/index/src/main.js',\n      specifierType: 'esm',\n      target: DEFAULT_TARGETS[0],\n      env: DEFAULT_ENV,\n    });\n    let req = {\n      filePath: toProjectPath('/index.js'),\n      env: DEFAULT_ENV,\n    };\n\n    graph.resolveDependency(dep, req, '3');\n    let assetGroupNodeId = graph.getNodeIdByContentKey(\n      nodeFromAssetGroup(req).id,\n    );\n    let dependencyNodeId = graph.getNodeIdByContentKey(dep.id);\n    assert(graph.hasNode(assetGroupNodeId));\n    assert(graph.hasEdge(dependencyNodeId, assetGroupNodeId));\n\n    let req2 = {\n      filePath: toProjectPath('/index.jsx'),\n      env: DEFAULT_ENV,\n    };\n    graph.resolveDependency(dep, req2, '4');\n\n    let assetGroupNodeId2 = graph.getNodeIdByContentKey(\n      nodeFromAssetGroup(req2).id,\n    );\n    assert(!graph.hasNode(assetGroupNodeId));\n    assert(graph.hasNode(assetGroupNodeId2));\n    assert(graph.hasEdge(dependencyNodeId, assetGroupNodeId2));\n    assert(!graph.hasEdge(dependencyNodeId, assetGroupNodeId));\n\n    graph.resolveDependency(dep, req2, '5');\n    assert(graph.hasNode(assetGroupNodeId2));\n    assert(graph.hasEdge(dependencyNodeId, assetGroupNodeId2));\n  });\n\n  it('resolveAssetGroup should update the asset and dep nodes a file is connected to', () => {\n    let graph = new AssetGraph();\n    graph.setRootConnections({\n      targets: DEFAULT_TARGETS,\n      entries: [toProjectPath('/path/to/index')],\n    });\n\n    graph.resolveEntry(\n      toProjectPath('/path/to/index'),\n      [\n        {\n          filePath: toProjectPath('/path/to/index/src/main.js'),\n          packagePath: toProjectPath('/path/to/index'),\n        },\n      ],\n      '1',\n    );\n    graph.resolveTargets(\n      {\n        filePath: toProjectPath('/path/to/index/src/main.js'),\n        packagePath: toProjectPath('/path/to/index'),\n      },\n      DEFAULT_TARGETS,\n      '2',\n    );\n\n    let dep = createDependency({\n      specifier: 'path/to/index/src/main.js',\n      specifierType: 'esm',\n      target: DEFAULT_TARGETS[0],\n      env: DEFAULT_ENV,\n      sourcePath: '',\n    });\n    let sourcePath = '/index.js';\n    let filePath = toProjectPath(sourcePath);\n    let req = {filePath, env: DEFAULT_ENV};\n    graph.resolveDependency(dep, req, '3');\n    let assets = [\n      createAsset({\n        id: '1',\n        filePath,\n        type: 'js',\n        isSource: true,\n        stats,\n        dependencies: new Map([\n          [\n            'utils',\n            createDependency({\n              specifier: './utils',\n              specifierType: 'esm',\n              env: DEFAULT_ENV,\n              sourcePath,\n            }),\n          ],\n        ]),\n        env: DEFAULT_ENV,\n      }),\n      createAsset({\n        id: '2',\n        filePath,\n        type: 'js',\n        isSource: true,\n        stats,\n        dependencies: new Map([\n          [\n            'styles',\n            createDependency({\n              specifier: './styles',\n              specifierType: 'esm',\n              env: DEFAULT_ENV,\n              sourcePath,\n            }),\n          ],\n        ]),\n        env: DEFAULT_ENV,\n      }),\n      createAsset({\n        id: '3',\n        filePath,\n        type: 'js',\n        isSource: true,\n        dependencies: new Map(),\n        env: DEFAULT_ENV,\n        stats,\n      }),\n    ];\n\n    graph.resolveAssetGroup(req, assets, '4');\n\n    let nodeId1 = graph.getNodeIdByContentKey('1');\n    let nodeId2 = graph.getNodeIdByContentKey('2');\n    let nodeId3 = graph.getNodeIdByContentKey('3');\n\n    let assetGroupNode = graph.getNodeIdByContentKey(\n      nodeFromAssetGroup(req).id,\n    );\n\n    let dependencyNodeId1 = graph.getNodeIdByContentKey(\n      [...assets[0].dependencies.values()][0].id,\n    );\n    let dependencyNodeId2 = graph.getNodeIdByContentKey(\n      [...assets[1].dependencies.values()][0].id,\n    );\n\n    assert(graph.hasNode(nodeId1));\n    assert(graph.hasNode(nodeId2));\n    assert(graph.hasNode(nodeId3));\n    assert(graph.hasNode(dependencyNodeId1));\n    assert(graph.hasNode(dependencyNodeId2));\n    assert(graph.hasEdge(assetGroupNode, nodeId1));\n    assert(graph.hasEdge(assetGroupNode, nodeId2));\n    assert(graph.hasEdge(assetGroupNode, nodeId3));\n    assert(graph.hasEdge(nodeId1, dependencyNodeId1));\n    assert(graph.hasEdge(nodeId2, dependencyNodeId2));\n\n    let assets2 = [\n      createAsset({\n        id: '1',\n        filePath,\n        type: 'js',\n        isSource: true,\n        stats,\n        dependencies: new Map([\n          [\n            'utils',\n            createDependency({\n              specifier: './utils',\n              specifierType: 'esm',\n              env: DEFAULT_ENV,\n              sourcePath,\n            }),\n          ],\n        ]),\n        env: DEFAULT_ENV,\n      }),\n      createAsset({\n        id: '2',\n        filePath,\n        type: 'js',\n        isSource: true,\n        stats,\n        dependencies: new Map(),\n        env: DEFAULT_ENV,\n      }),\n    ];\n\n    graph.resolveAssetGroup(req, assets2, '5');\n\n    assert(graph.hasNode(nodeId1));\n    assert(graph.hasNode(nodeId2));\n    assert(!graph.hasNode(nodeId3));\n    assert(graph.hasNode(dependencyNodeId1));\n    assert(!graph.hasNode(dependencyNodeId2));\n    assert(graph.hasEdge(assetGroupNode, nodeId1));\n    assert(graph.hasEdge(assetGroupNode, nodeId2));\n    assert(!graph.hasEdge(assetGroupNode, nodeId3));\n    assert(graph.hasEdge(nodeId1, dependencyNodeId1));\n    assert(!graph.hasEdge(nodeId2, dependencyNodeId2));\n  });\n\n  // Assets can define dependent assets in the same asset group by declaring a dependency with a module\n  // specifier that matches the dependent asset's unique key. These dependent assets are then connected\n  // to the asset's dependency instead of the asset group.\n  it('resolveAssetGroup should handle dependent assets in asset groups', () => {\n    let graph = new AssetGraph();\n    graph.setRootConnections({\n      targets: DEFAULT_TARGETS,\n      entries: [toProjectPath('/index')],\n    });\n\n    graph.resolveEntry(\n      toProjectPath('/index'),\n      [\n        {\n          filePath: toProjectPath('/path/to/index/src/main.js'),\n          packagePath: toProjectPath('/path/to/index'),\n        },\n      ],\n      '1',\n    );\n    graph.resolveTargets(\n      {\n        filePath: toProjectPath('/path/to/index/src/main.js'),\n        packagePath: toProjectPath('/path/to/index'),\n      },\n      DEFAULT_TARGETS,\n      '2',\n    );\n\n    let dep = createDependency({\n      specifier: 'path/to/index/src/main.js',\n      specifierType: 'esm',\n      env: DEFAULT_ENV,\n      target: DEFAULT_TARGETS[0],\n    });\n    let sourcePath = '/index.js';\n    let filePath = toProjectPath(sourcePath);\n    let req = {filePath, env: DEFAULT_ENV};\n    graph.resolveDependency(dep, req, '123');\n    let dep1 = createDependency({\n      specifier: 'dependent-asset-1',\n      specifierType: 'esm',\n      env: DEFAULT_ENV,\n      sourcePath,\n    });\n    let dep2 = createDependency({\n      specifier: 'dependent-asset-2',\n      specifierType: 'esm',\n      env: DEFAULT_ENV,\n      sourcePath,\n    });\n    let assets = [\n      createAsset({\n        id: '1',\n        filePath,\n        type: 'js',\n        isSource: true,\n        stats,\n        dependencies: new Map([['dep1', dep1]]),\n        env: DEFAULT_ENV,\n      }),\n      createAsset({\n        id: '2',\n        uniqueKey: 'dependent-asset-1',\n        filePath,\n        type: 'js',\n        isSource: true,\n        stats,\n        dependencies: new Map([['dep2', dep2]]),\n        env: DEFAULT_ENV,\n      }),\n      createAsset({\n        id: '3',\n        uniqueKey: 'dependent-asset-2',\n        filePath,\n        type: 'js',\n        isSource: true,\n        stats,\n        env: DEFAULT_ENV,\n      }),\n    ];\n\n    graph.resolveAssetGroup(req, assets, '3');\n\n    let nodeId1 = graph.getNodeIdByContentKey('1');\n    let nodeId2 = graph.getNodeIdByContentKey('2');\n    let nodeId3 = graph.getNodeIdByContentKey('3');\n\n    let assetGroupNodeId = graph.getNodeIdByContentKey(\n      nodeFromAssetGroup(req).id,\n    );\n\n    let depNodeId1 = graph.getNodeIdByContentKey(nodeFromDep(dep1).id);\n    let depNodeId2 = graph.getNodeIdByContentKey(nodeFromDep(dep2).id);\n\n    assert(nodeId1);\n    assert(nodeId2);\n    assert(nodeId3);\n    assert(graph.hasEdge(assetGroupNodeId, nodeId1));\n    assert(!graph.hasEdge(assetGroupNodeId, nodeId2));\n    assert(!graph.hasEdge(assetGroupNodeId, nodeId3));\n    assert(graph.hasEdge(nodeId1, depNodeId1));\n    assert(graph.hasEdge(depNodeId1, nodeId2));\n    assert(graph.hasEdge(nodeId2, depNodeId2));\n    assert(graph.hasEdge(depNodeId2, nodeId3));\n  });\n\n  it('should support marking and unmarking all parents with hasDeferred', () => {\n    let graph = new AssetGraph();\n\n    // index\n    let indexAssetGroup = {\n      filePath: toProjectPath('/index.js'),\n      env: DEFAULT_ENV,\n    };\n    graph.setRootConnections({assetGroups: [indexAssetGroup]});\n    let indexFooDep = createDependency({\n      specifier: './foo',\n      specifierType: 'esm',\n      env: DEFAULT_ENV,\n      sourcePath: '/index.js',\n    });\n    let indexBarDep = createDependency({\n      specifier: './bar',\n      specifierType: 'esm',\n      env: DEFAULT_ENV,\n      sourcePath: '/index.js',\n    });\n    let indexAsset = createAsset({\n      id: 'assetIndex',\n      filePath: toProjectPath('/index.js'),\n      type: 'js',\n      isSource: true,\n      stats,\n      dependencies: new Map([\n        ['./foo', indexFooDep],\n        ['./bar', indexBarDep],\n      ]),\n      env: DEFAULT_ENV,\n    });\n    graph.resolveAssetGroup(indexAssetGroup, [indexAsset], '0');\n\n    // index imports foo\n    let fooAssetGroup = {\n      filePath: toProjectPath('/foo.js'),\n      env: DEFAULT_ENV,\n    };\n    graph.resolveDependency(indexFooDep, fooAssetGroup, '0');\n    let fooAssetGroupNode = nodeFromAssetGroup(fooAssetGroup);\n    let fooUtilsDep = createDependency({\n      specifier: './utils',\n      specifierType: 'esm',\n      env: DEFAULT_ENV,\n      sourcePath: '/foo.js',\n    });\n    let fooUtilsDepNode = nodeFromDep(fooUtilsDep);\n    let fooAsset = createAsset({\n      id: 'assetFoo',\n      filePath: toProjectPath('/foo.js'),\n      type: 'js',\n      isSource: true,\n      stats,\n      dependencies: new Map([['./utils', fooUtilsDep]]),\n      env: DEFAULT_ENV,\n    });\n    let fooAssetNode = nodeFromAsset(fooAsset);\n    graph.resolveAssetGroup(fooAssetGroup, [fooAsset], '0');\n    let utilsAssetGroup = {\n      filePath: toProjectPath('/utils.js'),\n      env: DEFAULT_ENV,\n    };\n    let utilsAssetGroupNode = nodeFromAssetGroup(utilsAssetGroup);\n    graph.resolveDependency(fooUtilsDep, utilsAssetGroup, '0');\n\n    // foo's dependency is deferred\n    graph.markParentsWithHasDeferred(\n      graph.getNodeIdByContentKey(fooUtilsDepNode.id),\n    );\n    let node = nullthrows(graph.getNodeByContentKey(fooAssetNode.id));\n    invariant(node.type === 'asset');\n    assert(node.hasDeferred);\n    node = nullthrows(graph.getNodeByContentKey(fooAssetGroupNode.id));\n    invariant(node.type === 'asset_group');\n    assert(node.hasDeferred);\n\n    // index also imports bar\n    let barAssetGroup = {\n      filePath: toProjectPath('/bar.js'),\n      env: DEFAULT_ENV,\n    };\n    graph.resolveDependency(indexBarDep, barAssetGroup, '0');\n    let barAssetGroupNode = nodeFromAssetGroup(barAssetGroup);\n    let barUtilsDep = createDependency({\n      specifier: './utils',\n      specifierType: 'esm',\n      env: DEFAULT_ENV,\n      sourcePath: '/bar.js',\n    });\n    let barAsset = createAsset({\n      id: 'assetBar',\n      filePath: toProjectPath('/bar.js'),\n      type: 'js',\n      isSource: true,\n      stats,\n      dependencies: new Map([['./utils', barUtilsDep]]),\n      env: DEFAULT_ENV,\n    });\n    let barAssetNode = nodeFromAsset(barAsset);\n    graph.resolveAssetGroup(barAssetGroup, [barAsset], '3');\n    graph.resolveDependency(barUtilsDep, utilsAssetGroup, '4');\n\n    // bar undeferres utils\n    graph.unmarkParentsWithHasDeferred(\n      graph.getNodeIdByContentKey(utilsAssetGroupNode.id),\n    );\n    node = nullthrows(graph.getNodeByContentKey(fooUtilsDep.id));\n    invariant(node.type === 'dependency');\n    assert(!node.hasDeferred);\n    node = nullthrows(graph.getNodeByContentKey(fooAssetNode.id));\n    invariant(node.type === 'asset');\n    assert(!node.hasDeferred);\n    node = nullthrows(graph.getNodeByContentKey(fooAssetGroupNode.id));\n    invariant(node.type === 'asset_group');\n    assert(!node.hasDeferred);\n    node = nullthrows(graph.getNodeByContentKey(barUtilsDep.id));\n    invariant(node.type === 'dependency');\n    assert(!node.hasDeferred);\n    node = nullthrows(graph.getNodeByContentKey(barAssetNode.id));\n    invariant(node.type === 'asset');\n    assert(!node.hasDeferred);\n    node = nullthrows(graph.getNodeByContentKey(barAssetGroupNode.id));\n    invariant(node.type === 'asset_group');\n    assert(!node.hasDeferred);\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/BundleGraph.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport BundleGraph from '../src/BundleGraph';\nimport {DEFAULT_ENV, DEFAULT_TARGETS} from './test-utils';\nimport AssetGraph, {nodeFromAssetGroup} from '../src/AssetGraph';\nimport {createAsset as _createAsset} from '../src/assetUtils';\nimport {createDependency as _createDependency} from '../src/Dependency';\nimport {toProjectPath} from '../src/projectPath';\n\nfunction createAsset(opts) {\n  return _createAsset('/', opts);\n}\n\nfunction createDependency(opts) {\n  return _createDependency('/', opts);\n}\n\nconst id1 = '0123456789abcdef0123456789abcdef';\nconst id2 = '9876543210fedcba9876543210fedcba';\n\ndescribe('BundleGraph', () => {\n  it('assigns publicIds to assets', () => {\n    let bundleGraph = BundleGraph.fromAssetGraph(\n      createMockAssetGraph([id1, id2]),\n      false,\n    );\n    assert.deepEqual(\n      getAssets(bundleGraph).map(a => bundleGraph.getAssetPublicId(a)),\n      ['296TI', '4DGUq'],\n    );\n  });\n\n  it('uses a longer publicId if there is a collision', () => {\n    let bundleGraph = BundleGraph.fromAssetGraph(\n      createMockAssetGraph([id1, id1.slice(0, 16) + '7' + id1.slice(17)]),\n      false,\n    );\n    assert.deepEqual(\n      getAssets(bundleGraph).map(a => bundleGraph.getAssetPublicId(a)),\n      ['296TI', '296TII'],\n    );\n  });\n});\n\nfunction getAssets(bundleGraph) {\n  let assets = [];\n  bundleGraph.traverse(node => {\n    if (node.type === 'asset') {\n      assets.push(node.value);\n    }\n  });\n  return assets;\n}\n\nconst stats = {size: 0, time: 0};\nfunction createMockAssetGraph(ids: [string, string]) {\n  let graph = new AssetGraph();\n  graph.setRootConnections({entries: [toProjectPath('/', '/index')]});\n\n  graph.resolveEntry(\n    toProjectPath('/', '/index'),\n    [\n      {\n        filePath: toProjectPath('/', '/path/to/index/src/main.js'),\n        packagePath: toProjectPath('/', '/path/to/index'),\n      },\n    ],\n    '1',\n  );\n  graph.resolveTargets(\n    {\n      filePath: toProjectPath('/', '/path/to/index/src/main.js'),\n      packagePath: toProjectPath('/', '/path/to/index'),\n    },\n    DEFAULT_TARGETS,\n    '2',\n  );\n\n  let dep = createDependency({\n    specifier: 'path/to/index/src/main.js',\n    specifierType: 'esm',\n    env: DEFAULT_ENV,\n    target: DEFAULT_TARGETS[0],\n  });\n  let sourcePath = '/index.js';\n  let filePath = toProjectPath('/', sourcePath);\n  let req = {filePath, env: DEFAULT_ENV};\n  graph.resolveDependency(dep, nodeFromAssetGroup(req).value, '3');\n\n  let dep1 = createDependency({\n    specifier: 'dependent-asset-1',\n    specifierType: 'esm',\n    env: DEFAULT_ENV,\n    sourcePath,\n  });\n\n  let assets = [\n    createAsset({\n      id: ids[0],\n      filePath,\n      type: 'js',\n      isSource: true,\n      stats,\n      dependencies: new Map([['dep1', dep1]]),\n      env: DEFAULT_ENV,\n    }),\n    createAsset({\n      id: ids[1],\n      filePath,\n      type: 'js',\n      isSource: true,\n      stats,\n      dependencies: new Map([['dep1', dep1]]),\n      env: DEFAULT_ENV,\n    }),\n  ];\n  graph.resolveAssetGroup(req, assets, '4');\n\n  return graph;\n}\n"
  },
  {
    "path": "packages/core/core/test/EntryRequest.test.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport path from 'path';\nimport {md} from '@parcel/diagnostic';\nimport {inputFS as fs} from '@parcel/test-utils';\nimport {EntryResolver} from '../src/requests/EntryRequest';\nimport {DEFAULT_OPTIONS as _DEFAULT_OPTIONS} from './test-utils';\n\nconst DEFAULT_OPTIONS = {\n  ..._DEFAULT_OPTIONS,\n  defaultTargetOptions: {\n    ..._DEFAULT_OPTIONS.defaultTargetOptions,\n    sourceMaps: true,\n  },\n};\n\nconst INVALID_SOURCE_MISSING_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/invalid-source-missing',\n);\n\nconst INVALID_SOURCE_NOT_FILE_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/invalid-source-not-file',\n);\n\nconst INVALID_TARGET_SOURCE_MISSING_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/invalid-target-source-missing',\n);\n\nconst INVALID_TARGET_SOURCE_NOT_FILE_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/invalid-target-source-not-file',\n);\n\nconst GLOB_LIKE_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/glob-like/[entry].js',\n);\n\ndescribe('EntryResolver', function () {\n  let entryResolver = new EntryResolver({...DEFAULT_OPTIONS});\n\n  it('rejects missing source in package.json', async function () {\n    this.timeout(10000);\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(\n      () => entryResolver.resolveEntry(INVALID_SOURCE_MISSING_FIXTURE_PATH),\n      {\n        diagnostics: [\n          {\n            origin: '@parcel/core',\n            message: md`${path.join(\n              path.relative(fs.cwd(), INVALID_SOURCE_MISSING_FIXTURE_PATH),\n              'missing.js',\n            )} does not exist.`,\n            codeFrames: [\n              {\n                filePath: path.join(\n                  INVALID_SOURCE_MISSING_FIXTURE_PATH,\n                  'package.json',\n                ),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 4,\n                      column: 13,\n                    },\n                    end: {\n                      line: 4,\n                      column: 24,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: [],\n          },\n        ],\n      },\n    );\n  });\n  it('rejects non-file source in package.json', async function () {\n    this.timeout(10000);\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(\n      () => entryResolver.resolveEntry(INVALID_SOURCE_NOT_FILE_FIXTURE_PATH),\n      {\n        diagnostics: [\n          {\n            origin: '@parcel/core',\n            message: md`${path.join(\n              path.relative(fs.cwd(), INVALID_SOURCE_NOT_FILE_FIXTURE_PATH),\n              'src',\n            )} is not a file.`,\n            codeFrames: [\n              {\n                filePath: path.join(\n                  INVALID_SOURCE_NOT_FILE_FIXTURE_PATH,\n                  'package.json',\n                ),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 4,\n                      column: 13,\n                    },\n                    end: {\n                      line: 4,\n                      column: 17,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n  it('rejects missing target source in package.json', async function () {\n    this.timeout(10000);\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(\n      () =>\n        entryResolver.resolveEntry(INVALID_TARGET_SOURCE_MISSING_FIXTURE_PATH),\n      {\n        diagnostics: [\n          {\n            origin: '@parcel/core',\n            message: md`${path.join(\n              path.relative(\n                fs.cwd(),\n                INVALID_TARGET_SOURCE_MISSING_FIXTURE_PATH,\n              ),\n              'missing.js',\n            )} does not exist.`,\n            codeFrames: [\n              {\n                filePath: path.join(\n                  INVALID_TARGET_SOURCE_MISSING_FIXTURE_PATH,\n                  'package.json',\n                ),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 6,\n                      column: 17,\n                    },\n                    end: {\n                      line: 6,\n                      column: 28,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: [],\n          },\n        ],\n      },\n    );\n  });\n  it('rejects non-file target source in package.json', async function () {\n    this.timeout(10000);\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(\n      () =>\n        entryResolver.resolveEntry(INVALID_TARGET_SOURCE_NOT_FILE_FIXTURE_PATH),\n      {\n        diagnostics: [\n          {\n            origin: '@parcel/core',\n            message: md`${path.join(\n              path.relative(\n                fs.cwd(),\n                INVALID_TARGET_SOURCE_NOT_FILE_FIXTURE_PATH,\n              ),\n              'src',\n            )} is not a file.`,\n            codeFrames: [\n              {\n                filePath: path.join(\n                  INVALID_TARGET_SOURCE_NOT_FILE_FIXTURE_PATH,\n                  'package.json',\n                ),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 6,\n                      column: 17,\n                    },\n                    end: {\n                      line: 6,\n                      column: 21,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n  it('does not time out on glob-like entry', async function () {\n    this.timeout(10000);\n    await entryResolver.resolveEntry(GLOB_LIKE_FIXTURE_PATH);\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/Environment.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {createEnvironment} from '../src/Environment';\n\ndescribe('Environment', () => {\n  it('assigns a default environment with nothing passed', () => {\n    assert.deepEqual(createEnvironment(), {\n      id: 'c242f987e3544367',\n      context: 'browser',\n      engines: {\n        browsers: ['> 0.25%'],\n      },\n      includeNodeModules: true,\n      outputFormat: 'global',\n      isLibrary: false,\n      shouldOptimize: false,\n      shouldScopeHoist: false,\n      sourceMap: undefined,\n      loc: undefined,\n      sourceType: 'module',\n    });\n  });\n\n  it('assigns a node context if a node engine is given', () => {\n    assert.deepEqual(createEnvironment({engines: {node: '>= 10.0.0'}}), {\n      id: '69e0ab7220ee8f7a',\n      context: 'node',\n      engines: {\n        node: '>= 10.0.0',\n      },\n      includeNodeModules: false,\n      outputFormat: 'commonjs',\n      isLibrary: false,\n      shouldOptimize: false,\n      shouldScopeHoist: false,\n      sourceMap: undefined,\n      loc: undefined,\n      sourceType: 'module',\n    });\n  });\n\n  it('assigns a browser context if browser engines are given', () => {\n    assert.deepEqual(\n      createEnvironment({engines: {browsers: ['last 1 version']}}),\n      {\n        id: '4b5c9005af8c5b19',\n        context: 'browser',\n        engines: {\n          browsers: ['last 1 version'],\n        },\n        includeNodeModules: true,\n        outputFormat: 'global',\n        isLibrary: false,\n        shouldOptimize: false,\n        shouldScopeHoist: false,\n        sourceMap: undefined,\n        loc: undefined,\n        sourceType: 'module',\n      },\n    );\n  });\n\n  it('assigns default engines for node', () => {\n    assert.deepEqual(createEnvironment({context: 'node'}), {\n      id: 'b9b60fc7dcc0ae9c',\n      context: 'node',\n      engines: {\n        node: '>= 18.0.0',\n      },\n      includeNodeModules: false,\n      outputFormat: 'commonjs',\n      isLibrary: false,\n      shouldOptimize: false,\n      shouldScopeHoist: false,\n      sourceMap: undefined,\n      loc: undefined,\n      sourceType: 'module',\n    });\n  });\n\n  it('assigns default engines for browsers', () => {\n    assert.deepEqual(createEnvironment({context: 'browser'}), {\n      id: 'c242f987e3544367',\n      context: 'browser',\n      engines: {\n        browsers: ['> 0.25%'],\n      },\n      includeNodeModules: true,\n      outputFormat: 'global',\n      isLibrary: false,\n      shouldOptimize: false,\n      shouldScopeHoist: false,\n      sourceMap: undefined,\n      loc: undefined,\n      sourceType: 'module',\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/InternalAsset.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport UncommittedAsset from '../src/UncommittedAsset';\nimport {createAsset as _createAsset} from '../src/assetUtils';\nimport {createEnvironment} from '../src/Environment';\nimport {DEFAULT_OPTIONS} from './test-utils';\nimport {toProjectPath} from '../src/projectPath';\n\nfunction createAsset(opts) {\n  return _createAsset('/', opts);\n}\n\nconst stats = {time: 0, size: 0};\n\ndescribe('InternalAsset', () => {\n  it('only includes connected files once per filePath', () => {\n    let asset = new UncommittedAsset({\n      value: createAsset({\n        filePath: toProjectPath('/', '/foo/asset.js'),\n        env: createEnvironment(),\n        stats,\n        type: 'js',\n        isSource: true,\n      }),\n      options: DEFAULT_OPTIONS,\n    });\n    asset.invalidateOnFileChange(toProjectPath('/', '/foo/file'));\n    asset.invalidateOnFileChange(toProjectPath('/', '/foo/file'));\n    assert.deepEqual(\n      asset.invalidations.invalidateOnFileChange,\n      new Set(['foo/file']),\n    );\n  });\n\n  it('only includes dependencies once per id', () => {\n    let asset = new UncommittedAsset({\n      value: createAsset({\n        filePath: toProjectPath('/', '/foo/asset.js'),\n        env: createEnvironment(),\n        stats,\n        type: 'js',\n        isSource: true,\n      }),\n      options: DEFAULT_OPTIONS,\n    });\n\n    asset.addDependency({specifier: './foo', specifierType: 'esm'});\n    asset.addDependency({specifier: './foo', specifierType: 'esm'});\n    let dependencies = asset.getDependencies();\n    assert(dependencies.length === 1);\n    assert(dependencies[0].specifier === './foo');\n  });\n\n  it('includes different dependencies if their id differs', () => {\n    let asset = new UncommittedAsset({\n      value: createAsset({\n        filePath: toProjectPath('/', '/foo/asset.js'),\n        env: createEnvironment(),\n        stats,\n        type: 'js',\n        isSource: true,\n      }),\n      options: DEFAULT_OPTIONS,\n    });\n\n    asset.addDependency({specifier: './foo', specifierType: 'esm'});\n    asset.addDependency({\n      specifier: './foo',\n      specifierType: 'esm',\n      env: {context: 'web-worker', engines: {}},\n    });\n    let dependencies = asset.getDependencies();\n    assert(dependencies.length === 2);\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/PackagerRunner.test.js",
    "content": "// // @flow\n// 'use strict';\n\n// const PackagerRunner = require('../src/PackagerRunner');\n// const assert = require('assert');\n// const path = require('path');\n\n// const config = require('@parcel/config-default');\n\n// describe('PackagerRunner', () => {\n//   it('works', async () => {\n//     let bundle = {\n//       destPath: path.join(__dirname, 'dist', 'bundle.js'),\n//       assets: [\n//         {blobs: {code: require.resolve('./fixtures/module-a')}},\n//         {blobs: {code: require.resolve('./fixtures/module-b')}},\n//       ],\n//     };\n\n//     let packagerRunner = new PackagerRunner({\n//       parcelConfig: config,\n//       options: {}\n//     });\n\n//     await packagerRunner.runPackager({ bundle });\n//   });\n// });\n"
  },
  {
    "path": "packages/core/core/test/Parcel.test.js",
    "content": "// @flow strict-local\n\nimport type {InitialParcelOptions} from '@parcel/types';\nimport WorkerFarm from '@parcel/workers';\n// flowlint-next-line untyped-import:off\nimport sinon from 'sinon';\nimport assert from 'assert';\nimport path from 'path';\nimport Parcel, {createWorkerFarm} from '../src/Parcel';\n\ndescribe('Parcel', function () {\n  this.timeout(75000);\n\n  let workerFarm;\n  before(() => {\n    workerFarm = createWorkerFarm();\n  });\n\n  after(() => workerFarm.end());\n\n  it('does not initialize when passed an ending farm', async () => {\n    workerFarm.ending = true;\n    let parcel = createParcel({workerFarm});\n\n    // $FlowFixMe\n    await assert.rejects(() => parcel.run(), {\n      name: 'Error',\n      message: 'Supplied WorkerFarm is ending',\n    });\n\n    workerFarm.ending = false;\n  });\n\n  describe('parcel.end()', () => {\n    let endSpy;\n    beforeEach(() => {\n      endSpy = sinon.spy(WorkerFarm.prototype, 'end');\n    });\n\n    afterEach(() => {\n      endSpy.restore();\n    });\n\n    it('ends any WorkerFarm it creates', async () => {\n      let parcel = createParcel();\n      await parcel.run();\n      assert.equal(endSpy.callCount, 1);\n    });\n\n    it('runs and constructs another farm for subsequent builds', async () => {\n      let parcel = createParcel();\n\n      await parcel.run();\n      await parcel.run();\n\n      assert.equal(endSpy.callCount, 2);\n    });\n\n    it('does not end passed WorkerFarms', async () => {\n      let parcel = createParcel({workerFarm});\n      await parcel.run();\n      assert.equal(endSpy.callCount, 0);\n\n      await workerFarm.end();\n    });\n\n    it('removes shared references it creates', async () => {\n      let parcel = createParcel({workerFarm});\n      await parcel.run();\n\n      assert.equal(workerFarm.sharedReferences.size, 0);\n      assert.equal(workerFarm.sharedReferencesByValue.size, 0);\n      await workerFarm.end();\n    });\n  });\n});\n\ndescribe('ParcelAPI', function () {\n  this.timeout(75000);\n\n  let workerFarm;\n  beforeEach(() => {\n    workerFarm = createWorkerFarm();\n  });\n\n  afterEach(() => workerFarm.end());\n\n  describe('parcel.unstable_transform()', () => {\n    it('should transform simple file', async () => {\n      let parcel = createParcel({workerFarm});\n      let res = await parcel.unstable_transform({\n        filePath: path.join(__dirname, 'fixtures/parcel/index.js'),\n      });\n      let code = await res[0].getCode();\n      assert(code.includes(`exports.default = 'test'`));\n    });\n\n    it('should transform with standalone mode', async () => {\n      let parcel = createParcel({workerFarm});\n      let res = await parcel.unstable_transform({\n        filePath: path.join(__dirname, 'fixtures/parcel/other.js'),\n        query: 'standalone=true',\n      });\n      let code = await res[0].getCode();\n\n      assert(code.includes(`require(\"./index.js\")`));\n      assert(code.includes(`new URL(\"index.js\", \"file:\" + __filename);`));\n      assert(code.includes(`import('index.js')`));\n    });\n  });\n\n  describe('parcel.resolve()', () => {\n    it('should resolve dependencies', async () => {\n      let parcel = createParcel({workerFarm});\n      let res = await parcel.unstable_resolve({\n        specifier: './other',\n        specifierType: 'esm',\n        resolveFrom: path.join(__dirname, 'fixtures/parcel/index.js'),\n      });\n\n      assert.deepEqual(res, {\n        filePath: path.join(__dirname, 'fixtures/parcel/other.js'),\n        code: undefined,\n        query: undefined,\n        sideEffects: true,\n      });\n    });\n  });\n});\n\nfunction createParcel(opts?: InitialParcelOptions) {\n  return new Parcel({\n    entries: [path.join(__dirname, 'fixtures/parcel/index.js')],\n    logLevel: 'info',\n    defaultConfig: path.join(\n      path.dirname(require.resolve('@parcel/test-utils')),\n      '.parcelrc-no-reporters',\n    ),\n    shouldDisableCache: true,\n    ...opts,\n  });\n}\n"
  },
  {
    "path": "packages/core/core/test/ParcelConfig.test.js",
    "content": "// @flow strict-local\n\nimport ParcelConfig from '../src/ParcelConfig';\nimport assert from 'assert';\nimport path from 'path';\nimport sinon from 'sinon';\nimport logger from '@parcel/logger';\nimport {inputFS} from '@parcel/test-utils';\nimport {parseAndProcessConfig} from '../src/requests/ParcelConfigRequest';\nimport {DEFAULT_OPTIONS} from './test-utils';\nimport {toProjectPath} from '../src/projectPath';\nimport nullthrows from 'nullthrows';\n\nconst PARCELRC_PATH = toProjectPath('/', '/.parcelrc');\n\ndescribe('ParcelConfig', () => {\n  describe('matchGlobMap', () => {\n    let config = new ParcelConfig(\n      {\n        filePath: PARCELRC_PATH,\n        bundler: undefined,\n        packagers: {\n          '*.css': {\n            packageName: 'parcel-packager-css',\n            resolveFrom: PARCELRC_PATH,\n            keyPath: '/packagers/*.css',\n          },\n          '*.js': {\n            packageName: 'parcel-packager-js',\n            resolveFrom: PARCELRC_PATH,\n            keyPath: '/packagers/*.js',\n          },\n        },\n      },\n      DEFAULT_OPTIONS,\n    );\n\n    it('should return null array if no glob matches', () => {\n      let result = config.matchGlobMap(\n        toProjectPath('/', '/foo.wasm'),\n        config.packagers,\n      );\n      assert.deepEqual(result, null);\n    });\n\n    it('should return a matching pipeline', () => {\n      let result = config.matchGlobMap(\n        toProjectPath('/', '/foo.js'),\n        config.packagers,\n      );\n      assert.deepEqual(result, {\n        packageName: 'parcel-packager-js',\n        resolveFrom: PARCELRC_PATH,\n        keyPath: '/packagers/*.js',\n      });\n    });\n  });\n\n  describe('matchGlobMapPipelines', () => {\n    let config = new ParcelConfig(\n      {\n        filePath: PARCELRC_PATH,\n        bundler: undefined,\n        transformers: {\n          '*.jsx': [\n            {\n              packageName: 'parcel-transform-jsx',\n              resolveFrom: PARCELRC_PATH,\n              keyPath: '/transformers/*.jsx/0',\n            },\n            '...',\n          ],\n          '*.{js,jsx}': [\n            {\n              packageName: 'parcel-transform-js',\n              resolveFrom: PARCELRC_PATH,\n              keyPath: '/transformers/*.{js,jsx}/0',\n            },\n          ],\n        },\n      },\n      DEFAULT_OPTIONS,\n    );\n\n    it('should return an empty array if no pipeline matches', () => {\n      let pipeline = config.matchGlobMapPipelines(\n        toProjectPath('/', '/foo.css'),\n        config.transformers,\n      );\n      assert.deepEqual(pipeline, []);\n    });\n\n    it('should return a matching pipeline', () => {\n      let pipeline = config.matchGlobMapPipelines(\n        toProjectPath('/', '/foo.js'),\n        config.transformers,\n      );\n      assert.deepEqual(pipeline, [\n        {\n          packageName: 'parcel-transform-js',\n          resolveFrom: PARCELRC_PATH,\n          keyPath: '/transformers/*.{js,jsx}/0',\n        },\n      ]);\n    });\n\n    it('should merge pipelines with spread elements', () => {\n      let pipeline = config.matchGlobMapPipelines(\n        toProjectPath('/', '/foo.jsx'),\n        config.transformers,\n      );\n      assert.deepEqual(pipeline, [\n        {\n          packageName: 'parcel-transform-jsx',\n          resolveFrom: PARCELRC_PATH,\n          keyPath: '/transformers/*.jsx/0',\n        },\n        {\n          packageName: 'parcel-transform-js',\n          resolveFrom: PARCELRC_PATH,\n          keyPath: '/transformers/*.{js,jsx}/0',\n        },\n      ]);\n    });\n  });\n\n  describe('loadPlugin', () => {\n    it('should warn if a plugin needs to specify an engines.parcel field in package.json', async () => {\n      let projectRoot = path.join(__dirname, 'fixtures', 'plugins');\n      let configFilePath = toProjectPath(\n        projectRoot,\n        path.join(__dirname, 'fixtures', 'plugins', '.parcelrc'),\n      );\n      let config = new ParcelConfig(\n        {\n          filePath: configFilePath,\n          bundler: undefined,\n          transformers: {\n            '*.js': [\n              {\n                packageName: 'parcel-transformer-no-engines',\n                resolveFrom: configFilePath,\n                keyPath: '/transformers/*.js/0',\n              },\n            ],\n          },\n        },\n        {...DEFAULT_OPTIONS, projectRoot},\n      );\n\n      let warnStub = sinon.stub(logger, 'warn');\n      let {plugin} = nullthrows(\n        await config.loadPlugin({\n          packageName: 'parcel-transformer-no-engines',\n          resolveFrom: configFilePath,\n          keyPath: '/transformers/*.js/0',\n        }),\n      );\n      assert(plugin);\n      assert.equal(typeof plugin.transform, 'function');\n      assert(warnStub.calledOnce);\n      assert.deepEqual(warnStub.getCall(0).args[0], {\n        origin: '@parcel/core',\n        message:\n          'The plugin \"parcel-transformer-no-engines\" needs to specify a `package.json#engines.parcel` field with the supported Parcel version range.',\n      });\n      warnStub.restore();\n    });\n\n    it('should error if a plugin specifies an invalid engines.parcel field in package.json', async () => {\n      let projectRoot = path.join(__dirname, 'fixtures', 'plugins');\n      let configFilePath = toProjectPath(\n        projectRoot,\n        path.join(__dirname, 'fixtures', 'plugins', '.parcelrc'),\n      );\n      let config = new ParcelConfig(\n        {\n          filePath: configFilePath,\n          bundler: undefined,\n          transformers: {\n            '*.js': [\n              {\n                packageName: 'parcel-transformer-not-found',\n                resolveFrom: configFilePath,\n                keyPath: '/transformers/*.js/0',\n              },\n            ],\n          },\n        },\n        {...DEFAULT_OPTIONS, projectRoot},\n      );\n      // $FlowFixMe[untyped-import]\n      let parcelVersion = require('../package.json').version;\n      let pkgJSON = path.join(\n        __dirname,\n        'fixtures',\n        'plugins',\n        'node_modules',\n        'parcel-transformer-bad-engines',\n        'package.json',\n      );\n      let code = inputFS.readFileSync(pkgJSON, 'utf8');\n\n      // $FlowFixMe\n      await assert.rejects(\n        () =>\n          config.loadPlugin({\n            packageName: 'parcel-transformer-bad-engines',\n            resolveFrom: configFilePath,\n            keyPath: '/transformers/*.js/0',\n          }),\n        {\n          name: 'Error',\n          diagnostics: [\n            {\n              message: `The plugin \"parcel-transformer-bad-engines\" is not compatible with the current version of Parcel. Requires \"5.x\" but the current version is \"${parcelVersion}\".`,\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: pkgJSON,\n                  language: 'json5',\n                  code,\n                  codeHighlights: [\n                    {\n                      start: {line: 5, column: 5},\n                      end: {line: 5, column: 19},\n                      message: undefined,\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n      );\n    });\n\n    it('should error with a codeframe if a plugin is not resolved', async () => {\n      let configFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'config-plugin-not-found',\n        '.parcelrc',\n      );\n      let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');\n      let {config} = await parseAndProcessConfig(\n        configFilePath,\n        code,\n        DEFAULT_OPTIONS,\n      );\n      let parcelConfig = new ParcelConfig(config, DEFAULT_OPTIONS);\n\n      // $FlowFixMe\n      await assert.rejects(() => parcelConfig.getTransformers('test.js'), {\n        name: 'Error',\n        diagnostics: [\n          {\n            message: 'Cannot find Parcel plugin \"@parcel/transformer-jj\"',\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: configFilePath,\n                language: 'json5',\n                code,\n                codeHighlights: [\n                  {\n                    start: {line: 4, column: 14},\n                    end: {line: 4, column: 37},\n                    message: `Cannot find module \"@parcel/transformer-jj\", did you mean \"@parcel/transformer-js\"?`,\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      });\n    });\n\n    it('should error when using a reserved pipeline name \"node:*\"', async () => {\n      let configFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'config-node-pipeline',\n        '.parcelrc',\n      );\n      let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');\n\n      // $FlowFixMe\n      await assert.rejects(\n        () => parseAndProcessConfig(configFilePath, code, DEFAULT_OPTIONS),\n        {\n          name: 'Error',\n          diagnostics: [\n            {\n              message: \"Named pipeline 'node:' is reserved.\",\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: configFilePath,\n                  language: 'json5',\n                  code,\n                  codeHighlights: [\n                    {\n                      message: undefined,\n                      start: {\n                        line: 4,\n                        column: 5,\n                      },\n                      end: {\n                        line: 4,\n                        column: 15,\n                      },\n                    },\n                  ],\n                },\n              ],\n              documentationURL:\n                'https://parceljs.org/features/dependency-resolution/#url-schemes',\n            },\n          ],\n        },\n      );\n    });\n\n    it('should support loading local plugins', async () => {\n      let projectRoot = path.join(__dirname, 'fixtures', 'plugins');\n      let configFilePath = toProjectPath(\n        projectRoot,\n        path.join(__dirname, 'fixtures', 'plugins', '.parcelrc'),\n      );\n      let config = new ParcelConfig(\n        {\n          filePath: configFilePath,\n          bundler: undefined,\n          transformers: {\n            '*.js': [\n              {\n                packageName: './local-plugin',\n                resolveFrom: configFilePath,\n                keyPath: '/transformers/*.js/0',\n              },\n            ],\n          },\n        },\n        {...DEFAULT_OPTIONS, projectRoot},\n      );\n\n      let [{plugin}] = await config.getTransformers(\n        toProjectPath('/', '/foo.js'),\n      );\n      assert(plugin);\n      assert.equal(typeof plugin.transform, 'function');\n    });\n\n    it('should error on local plugins inside config packages', async () => {\n      let configFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'local-plugin-config-pkg',\n        '.parcelrc',\n      );\n      let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');\n      let {config} = await parseAndProcessConfig(\n        configFilePath,\n        code,\n        DEFAULT_OPTIONS,\n      );\n      let parcelConfig = new ParcelConfig(config, DEFAULT_OPTIONS);\n      let extendedConfigPath = path.join(\n        __dirname,\n        'fixtures',\n        'local-plugin-config-pkg',\n        'node_modules',\n        'parcel-config-local',\n        'index.json',\n      );\n\n      // $FlowFixMe\n      await assert.rejects(() => parcelConfig.getTransformers('test.js'), {\n        name: 'Error',\n        diagnostics: [\n          {\n            message:\n              'Local plugins are not supported in Parcel config packages. Please publish \"./local-plugin\" as a separate npm package.',\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: extendedConfigPath,\n                language: 'json5',\n                code: await DEFAULT_OPTIONS.inputFS.readFile(\n                  extendedConfigPath,\n                  'utf8',\n                ),\n                codeHighlights: [\n                  {\n                    start: {line: 5, column: 7},\n                    end: {line: 5, column: 22},\n                    message: undefined,\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/ParcelConfigRequest.test.js",
    "content": "// @flow\nimport assert from 'assert';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport ParcelConfig from '../src/ParcelConfig';\nimport {\n  validateConfigFile,\n  mergePipelines,\n  mergeMaps,\n  mergeConfigs,\n  resolveExtends,\n  parseAndProcessConfig,\n  resolveParcelConfig,\n  processConfig,\n} from '../src/requests/ParcelConfigRequest';\nimport {validatePackageName} from '../src/ParcelConfig.schema';\nimport {DEFAULT_OPTIONS, relative} from './test-utils';\nimport {toProjectPath} from '../src/projectPath';\nimport json5 from 'json5';\nimport fs from 'fs';\n\ndescribe('ParcelConfigRequest', () => {\n  describe('validatePackageName', () => {\n    it('should error on an invalid official package', () => {\n      assert.throws(() => {\n        validatePackageName('@parcel/foo-bar', 'transform', 'transformers');\n      }, /Official parcel transform packages must be named according to \"@parcel\\/transform-{name}\"/);\n\n      assert.throws(() => {\n        validatePackageName('@parcel/transformer', 'transform', 'transformers');\n      }, /Official parcel transform packages must be named according to \"@parcel\\/transform-{name}\"/);\n    });\n\n    it('should succeed on a valid official package', () => {\n      validatePackageName('@parcel/transform-bar', 'transform', 'transformers');\n    });\n\n    it('should error on an invalid community package', () => {\n      assert.throws(() => {\n        validatePackageName('foo-bar', 'transform', 'transformers');\n      }, /Parcel transform packages must be named according to \"parcel-transform-{name}\"/);\n\n      assert.throws(() => {\n        validatePackageName('parcel-foo-bar', 'transform', 'transformers');\n      }, /Parcel transform packages must be named according to \"parcel-transform-{name}\"/);\n\n      assert.throws(() => {\n        validatePackageName('parcel-transform', 'transform', 'transformers');\n      }, /Parcel transform packages must be named according to \"parcel-transform-{name}\"/);\n    });\n\n    it('should succeed on a valid community package', () => {\n      validatePackageName('parcel-transform-bar', 'transform', 'transformers');\n    });\n\n    it('should error on an invalid scoped package', () => {\n      assert.throws(() => {\n        validatePackageName('@test/foo-bar', 'transform', 'transformers');\n      }, /Scoped parcel transform packages must be named according to \"@test\\/parcel-transform\\[-{name}\\]\"/);\n\n      assert.throws(() => {\n        validatePackageName(\n          '@test/parcel-foo-bar',\n          'transform',\n          'transformers',\n        );\n      }, /Scoped parcel transform packages must be named according to \"@test\\/parcel-transform\\[-{name}\\]\"/);\n    });\n\n    it('should succeed on a valid scoped package', () => {\n      validatePackageName(\n        '@test/parcel-transform-bar',\n        'transform',\n        'transformers',\n      );\n\n      validatePackageName(\n        '@test/parcel-transform',\n        'transform',\n        'transformers',\n      );\n    });\n\n    it('should succeed on a local package', () => {\n      validatePackageName(\n        './parcel-transform-bar',\n        'transform',\n        'transformers',\n      );\n      validatePackageName('./bar', 'transform', 'transformers');\n    });\n  });\n\n  describe('validateConfigFile', () => {\n    it('should throw on invalid config', () => {\n      assert.throws(() => {\n        validateConfigFile(\n          {\n            filePath: '.parcelrc',\n            extends: 'parcel-config-foo',\n            transformers: {\n              '*.js': ['parcel-invalid-plugin'],\n            },\n          },\n          '.parcelrc',\n        );\n      });\n    });\n\n    it('should require pipeline to be an array', () => {\n      assert.throws(() => {\n        validateConfigFile(\n          // $FlowExpectedError[incompatible-call]\n          {\n            filePath: '.parcelrc',\n            resolvers: '123',\n          },\n          '.parcelrc',\n        );\n      });\n    });\n\n    it('should require pipeline elements to be strings', () => {\n      assert.throws(() => {\n        validateConfigFile(\n          {\n            filePath: '.parcelrc',\n            // $FlowExpectedError[incompatible-call]\n            resolvers: [1, '123', 5],\n          },\n          '.parcelrc',\n        );\n      });\n    });\n\n    it('should require package names to be valid', () => {\n      assert.throws(() => {\n        validateConfigFile(\n          {\n            filePath: '.parcelrc',\n            resolvers: ['parcel-foo-bar'],\n          },\n          '.parcelrc',\n        );\n      });\n    });\n\n    it('should succeed with an array of valid package names', () => {\n      validateConfigFile(\n        {\n          filePath: '.parcelrc',\n          resolvers: ['parcel-resolver-test'],\n        },\n        '.parcelrc',\n      );\n    });\n\n    it('should support spread elements', () => {\n      validateConfigFile(\n        {\n          filePath: '.parcelrc',\n          resolvers: ['parcel-resolver-test', '...'],\n        },\n        '.parcelrc',\n      );\n    });\n\n    it('should require glob map to be an object', () => {\n      assert.throws(() => {\n        validateConfigFile(\n          {\n            filePath: '.parcelrc',\n            // $FlowExpectedError[incompatible-call]\n            transformers: ['parcel-transformer-test', '...'],\n          },\n          '.parcelrc',\n        );\n      });\n    });\n\n    it('should trigger the validator function for each key', () => {\n      assert.throws(() => {\n        validateConfigFile(\n          {\n            filePath: '.parcelrc',\n            transformers: {\n              'types:*.{ts,tsx}': ['@parcel/transformer-typescript-types'],\n              'bundle-text:*': ['-inline-string', '...'],\n            },\n          },\n          '.parcelrc',\n        );\n      });\n    });\n\n    it('should require extends to be a string or array of strings', () => {\n      assert.throws(() => {\n        validateConfigFile(\n          // $FlowExpectedError[incompatible-call]\n          {\n            filePath: '.parcelrc',\n            extends: 2,\n          },\n          '.parcelrc',\n        );\n      });\n\n      assert.throws(() => {\n        validateConfigFile(\n          {\n            filePath: '.parcelrc',\n            // $FlowExpectedError[incompatible-call]\n            extends: [2, 7],\n          },\n          '.parcelrc',\n        );\n      });\n    });\n\n    it('should support relative paths', () => {\n      validateConfigFile(\n        {\n          filePath: '.parcelrc',\n          extends: './foo',\n        },\n        '.parcelrc',\n      );\n\n      validateConfigFile(\n        {\n          filePath: '.parcelrc',\n          extends: ['./foo', './bar'],\n        },\n        '.parcelrc',\n      );\n    });\n\n    it('should validate package names', () => {\n      assert.throws(() => {\n        validateConfigFile(\n          {\n            filePath: '.parcelrc',\n            extends: 'foo',\n          },\n          '.parcelrc',\n        );\n      });\n\n      assert.throws(() => {\n        validateConfigFile(\n          {\n            filePath: '.parcelrc',\n            extends: ['foo', 'bar'],\n          },\n          '.parcelrc',\n        );\n      });\n\n      validateConfigFile(\n        {\n          filePath: '.parcelrc',\n          extends: 'parcel-config-foo',\n        },\n        '.parcelrc',\n      );\n\n      validateConfigFile(\n        {\n          filePath: '.parcelrc',\n          extends: ['parcel-config-foo', 'parcel-config-bar'],\n        },\n        '.parcelrc',\n      );\n    });\n\n    it('should throw for invalid top level keys', () => {\n      assert.throws(\n        () => {\n          validateConfigFile(\n            // $FlowExpectedError\n            {\n              extends: '@parcel/config-default',\n              '@parcel/transformer-js': {\n                inlineEnvironment: false,\n              },\n            },\n            '.parcelrc',\n          );\n        },\n        e => {\n          assert.strictEqual(\n            e.diagnostics[0].codeFrames[0].codeHighlights[0].message,\n            `Did you mean \"transformers\"?`,\n          );\n          return true;\n        },\n      );\n    });\n\n    it('should succeed on valid config', () => {\n      validateConfigFile(\n        {\n          filePath: '.parcelrc',\n          extends: 'parcel-config-foo',\n          transformers: {\n            '*.js': ['parcel-transformer-foo'],\n          },\n        },\n        '.parcelrc',\n      );\n    });\n\n    it('should throw error on empty config file', () => {\n      assert.throws(\n        () => {\n          validateConfigFile({}, '.parcelrc');\n        },\n        {name: 'Error', message: \".parcelrc can't be empty\"},\n      );\n    });\n  });\n\n  describe('mergePipelines', () => {\n    it('should return an empty array if base and extension are null', () => {\n      assert.deepEqual(mergePipelines(null, null), []);\n    });\n\n    it('should return base if extension is null', () => {\n      assert.deepEqual(\n        mergePipelines(\n          [\n            {\n              packageName: 'parcel-transform-foo',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/transformers/*.js/0',\n            },\n          ],\n          null,\n        ),\n        [\n          {\n            packageName: 'parcel-transform-foo',\n            resolveFrom: '.parcelrc',\n            keyPath: '/transformers/*.js/0',\n          },\n        ],\n      );\n    });\n\n    it('should return extension if base is null', () => {\n      assert.deepEqual(\n        mergePipelines(null, [\n          {\n            packageName: 'parcel-transform-bar',\n            resolveFrom: toProjectPath('/', '/.parcelrc'),\n            keyPath: '/transformers/*.js/0',\n          },\n        ]),\n        [\n          {\n            packageName: 'parcel-transform-bar',\n            resolveFrom: '.parcelrc',\n            keyPath: '/transformers/*.js/0',\n          },\n        ],\n      );\n    });\n\n    it('should return extension if there are no spread elements', () => {\n      assert.deepEqual(\n        mergePipelines(\n          [\n            {\n              packageName: 'parcel-transform-foo',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/transformers/*.js/0',\n            },\n          ],\n          [\n            {\n              packageName: 'parcel-transform-bar',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/transformers/*.js/0',\n            },\n          ],\n        ),\n        [\n          {\n            packageName: 'parcel-transform-bar',\n            resolveFrom: '.parcelrc',\n            keyPath: '/transformers/*.js/0',\n          },\n        ],\n      );\n    });\n\n    it('should return merge base into extension if there are spread elements', () => {\n      assert.deepEqual(\n        mergePipelines(\n          [\n            {\n              packageName: 'parcel-transform-foo',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/transformers/*.js/0',\n            },\n          ],\n          [\n            {\n              packageName: 'parcel-transform-bar',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/transformers/*.js/0',\n            },\n            '...',\n            {\n              packageName: 'parcel-transform-baz',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/transformers/*.js/2',\n            },\n          ],\n        ),\n        [\n          {\n            packageName: 'parcel-transform-bar',\n            resolveFrom: '.parcelrc',\n            keyPath: '/transformers/*.js/0',\n          },\n          {\n            packageName: 'parcel-transform-foo',\n            resolveFrom: '.parcelrc',\n            keyPath: '/transformers/*.js/0',\n          },\n          {\n            packageName: 'parcel-transform-baz',\n            resolveFrom: '.parcelrc',\n            keyPath: '/transformers/*.js/2',\n          },\n        ],\n      );\n    });\n\n    it('should throw if more than one spread element is in a pipeline', () => {\n      assert.throws(() => {\n        mergePipelines(\n          [\n            {\n              packageName: 'parcel-transform-foo',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/transformers/*.js/0',\n            },\n          ],\n          [\n            {\n              packageName: 'parcel-transform-bar',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/transformers/*.js/0',\n            },\n            '...',\n            {\n              packageName: 'parcel-transform-baz',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/transformers/*.js/2',\n            },\n            '...',\n          ],\n        );\n      }, /Only one spread element can be included in a config pipeline/);\n    });\n\n    it('should remove spread element even without a base map', () => {\n      assert.deepEqual(\n        mergePipelines(null, [\n          {\n            packageName: 'parcel-transform-bar',\n            resolveFrom: toProjectPath('/', '/.parcelrc'),\n            keyPath: '/transformers/*.js/0',\n          },\n          '...',\n          {\n            packageName: 'parcel-transform-baz',\n            resolveFrom: toProjectPath('/', '/.parcelrc'),\n            keyPath: '/transformers/*.js/2',\n          },\n        ]),\n        [\n          {\n            packageName: 'parcel-transform-bar',\n            resolveFrom: '.parcelrc',\n            keyPath: '/transformers/*.js/0',\n          },\n          {\n            packageName: 'parcel-transform-baz',\n            resolveFrom: '.parcelrc',\n            keyPath: '/transformers/*.js/2',\n          },\n        ],\n      );\n    });\n\n    it('should throw if more than one spread element is in a pipeline even without a base map', () => {\n      assert.throws(() => {\n        mergePipelines(null, [\n          {\n            packageName: 'parcel-transform-bar',\n            resolveFrom: toProjectPath('/', '/.parcelrc'),\n            keyPath: '/transformers/*.js/0',\n          },\n          '...',\n          {\n            packageName: 'parcel-transform-baz',\n            resolveFrom: toProjectPath('/', '/.parcelrc'),\n            keyPath: '/transformers/*.js/2',\n          },\n          '...',\n        ]);\n      }, /Only one spread element can be included in a config pipeline/);\n    });\n  });\n\n  describe('mergeMaps', () => {\n    it('should return an empty object if base and extension are null', () => {\n      assert.deepEqual(mergeMaps(null, null), {});\n    });\n\n    it('should return base if extension is null', () => {\n      assert.deepEqual(mergeMaps({'*.js': 'foo'}, null), {\n        '*.js': 'foo',\n      });\n    });\n\n    it('should return extension if base is null', () => {\n      assert.deepEqual(mergeMaps(null, {'*.js': 'foo'}), {\n        '*.js': 'foo',\n      });\n    });\n\n    it('should merge the objects', () => {\n      assert.deepEqual(\n        mergeMaps({'*.css': 'css', '*.js': 'base-js'}, {'*.js': 'ext-js'}),\n        {'*.js': 'ext-js', '*.css': 'css'},\n      );\n    });\n\n    it('should ensure that extension properties have a higher precedence than base properties', () => {\n      let merged = mergeMaps({'*.{js,jsx}': 'base-js'}, {'*.js': 'ext-js'});\n      assert.deepEqual(merged, {'*.js': 'ext-js', '*.{js,jsx}': 'base-js'});\n      assert.deepEqual(Object.keys(merged), ['*.js', '*.{js,jsx}']);\n    });\n\n    it('should call a merger function if provided', () => {\n      let merger = (a, b) => [a, b];\n      assert.deepEqual(\n        mergeMaps({'*.js': 'base-js'}, {'*.js': 'ext-js'}, merger),\n        {'*.js': ['base-js', 'ext-js']},\n      );\n    });\n  });\n\n  describe('mergeConfigs', () => {\n    it('should merge configs', () => {\n      let base = new ParcelConfig(\n        {\n          filePath: toProjectPath('/', '/.parcelrc'),\n          resolvers: [\n            {\n              packageName: 'parcel-resolver-base',\n              resolveFrom: toProjectPath('/', '/.parcelrc'),\n              keyPath: '/resolvers/0',\n            },\n          ],\n          transformers: {\n            '*.js': [\n              {\n                packageName: 'parcel-transform-base',\n                resolveFrom: toProjectPath('/', '/.parcelrc'),\n                keyPath: '/transformers/*.js/0',\n              },\n            ],\n            '*.css': [\n              {\n                packageName: 'parcel-transform-css',\n                resolveFrom: toProjectPath('/', '/.parcelrc'),\n                keyPath: '/transformers/*.css/0',\n              },\n            ],\n          },\n          bundler: {\n            packageName: 'parcel-bundler-base',\n            resolveFrom: toProjectPath('/', '/.parcelrc'),\n            keyPath: '/bundler',\n          },\n        },\n        DEFAULT_OPTIONS,\n      );\n\n      let ext = {\n        filePath: '.parcelrc',\n        resolvers: [\n          {\n            packageName: 'parcel-resolver-ext',\n            resolveFrom: '.parcelrc',\n            keyPath: '/resolvers/0',\n          },\n          '...',\n        ],\n        transformers: {\n          '*.js': [\n            {\n              packageName: 'parcel-transform-ext',\n              resolveFrom: '.parcelrc',\n              keyPath: '/transformers/*.js/0',\n            },\n            '...',\n          ],\n        },\n      };\n\n      let merged = {\n        filePath: '.parcelrc',\n        resolvers: [\n          {\n            packageName: 'parcel-resolver-ext',\n            resolveFrom: '.parcelrc',\n            keyPath: '/resolvers/0',\n          },\n          {\n            packageName: 'parcel-resolver-base',\n            resolveFrom: '.parcelrc',\n            keyPath: '/resolvers/0',\n          },\n        ],\n        transformers: {\n          '*.js': [\n            {\n              packageName: 'parcel-transform-ext',\n              resolveFrom: '.parcelrc',\n              keyPath: '/transformers/*.js/0',\n            },\n            {\n              packageName: 'parcel-transform-base',\n              resolveFrom: '.parcelrc',\n              keyPath: '/transformers/*.js/0',\n            },\n          ],\n          '*.css': [\n            {\n              packageName: 'parcel-transform-css',\n              resolveFrom: '.parcelrc',\n              keyPath: '/transformers/*.css/0',\n            },\n          ],\n        },\n        bundler: {\n          packageName: 'parcel-bundler-base',\n          resolveFrom: '.parcelrc',\n          keyPath: '/bundler',\n        },\n        runtimes: [],\n        namers: [],\n        optimizers: {},\n        compressors: {},\n        packagers: {},\n        reporters: [],\n        validators: {},\n      };\n\n      // $FlowFixMe\n      assert.deepEqual(mergeConfigs(base, ext), merged);\n    });\n  });\n\n  describe('resolveExtends', () => {\n    it('should resolve a relative path', async () => {\n      let resolved = await resolveExtends(\n        '../.parcelrc',\n        path.join(__dirname, 'fixtures', 'config', 'subfolder', '.parcelrc'),\n        '/extends',\n        DEFAULT_OPTIONS,\n      );\n      assert.equal(\n        resolved,\n        path.join(__dirname, 'fixtures', 'config', '.parcelrc'),\n      );\n    });\n\n    it('should resolve a package name', async () => {\n      let resolved = await resolveExtends(\n        '@parcel/config-default',\n        path.join(__dirname, 'fixtures', 'config', 'subfolder', '.parcelrc'),\n        '/extends',\n        DEFAULT_OPTIONS,\n      );\n      assert.equal(resolved, require.resolve('@parcel/config-default'));\n    });\n  });\n\n  describe('parseAndProcessConfig', () => {\n    it('should load and merge configs', async () => {\n      let defaultConfigPath = require.resolve('@parcel/config-default');\n      let defaultConfig = await processConfig(\n        {\n          ...json5.parse(fs.readFileSync(defaultConfigPath, 'utf8')),\n          filePath: defaultConfigPath,\n        },\n        DEFAULT_OPTIONS,\n      );\n      let configFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'config',\n        '.parcelrc',\n      );\n      let subConfigFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'config',\n        'subfolder',\n        '.parcelrc',\n      );\n      let {config} = await parseAndProcessConfig(\n        subConfigFilePath,\n        DEFAULT_OPTIONS.inputFS.readFileSync(subConfigFilePath, 'utf8'),\n        DEFAULT_OPTIONS,\n      );\n\n      let transformers = nullthrows(config.transformers);\n      assert.deepEqual(transformers['*.js'], [\n        {\n          packageName: 'parcel-transformer-sub',\n          resolveFrom: relative(subConfigFilePath),\n          keyPath: '/transformers/*.js/0',\n        },\n        {\n          packageName: 'parcel-transformer-base',\n          resolveFrom: relative(configFilePath),\n          keyPath: '/transformers/*.js/0',\n        },\n        '...',\n      ]);\n      assert(Object.keys(transformers).length > 1);\n      assert.deepEqual(config.resolvers, defaultConfig.resolvers);\n      assert.deepEqual(config.bundler, defaultConfig.bundler);\n      assert.deepEqual(config.namers, defaultConfig.namers || []);\n      assert.deepEqual(config.packagers, defaultConfig.packagers || {});\n      assert.deepEqual(config.optimizers, defaultConfig.optimizers || {});\n      assert.deepEqual(config.reporters, defaultConfig.reporters || []);\n    });\n\n    it('should emit a codeframe.codeHighlights when a malformed .parcelrc was found', async () => {\n      let configFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'config-malformed',\n        '.parcelrc',\n      );\n      let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');\n\n      let pos = {\n        line: 2,\n        column: 14,\n      };\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(\n        () => parseAndProcessConfig(configFilePath, code, DEFAULT_OPTIONS),\n        {\n          name: 'Error',\n          diagnostics: [\n            {\n              message: 'Failed to parse .parcelrc',\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: configFilePath,\n                  language: 'json5',\n                  code,\n                  codeHighlights: [\n                    {\n                      message: \"JSON5: invalid character 'b' at 2:14\",\n                      start: pos,\n                      end: pos,\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n      );\n    });\n\n    it('should emit a codeframe when an extended parcel config file is not found', async () => {\n      let configFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'config-extends-not-found',\n        '.parcelrc',\n      );\n      let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(\n        () => parseAndProcessConfig(configFilePath, code, DEFAULT_OPTIONS),\n        {\n          name: 'Error',\n          diagnostics: [\n            {\n              message: 'Cannot find extended parcel config',\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: configFilePath,\n                  language: 'json5',\n                  code,\n                  codeHighlights: [\n                    {\n                      message:\n                        '\"./.parclrc-node-modules\" does not exist, did you mean \"./.parcelrc-node-modules\"?',\n                      start: {line: 2, column: 14},\n                      end: {line: 2, column: 38},\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n      );\n    });\n\n    it('should emit a codeframe when an extended parcel config file is not found in JSON5', async () => {\n      let configFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'config-extends-not-found',\n        '.parcelrc-json5',\n      );\n      let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(\n        () => parseAndProcessConfig(configFilePath, code, DEFAULT_OPTIONS),\n        {\n          name: 'Error',\n          diagnostics: [\n            {\n              message: 'Cannot find extended parcel config',\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: configFilePath,\n                  language: 'json5',\n                  code,\n                  codeHighlights: [\n                    {\n                      message:\n                        '\"./.parclrc-node-modules\" does not exist, did you mean \"./.parcelrc-node-modules\"?',\n                      start: {line: 2, column: 12},\n                      end: {line: 2, column: 36},\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n      );\n    });\n\n    it('should emit a codeframe when an extended parcel config node module is not found', async () => {\n      let configFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'config-extends-not-found',\n        '.parcelrc-node-modules',\n      );\n      let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(\n        () => parseAndProcessConfig(configFilePath, code, DEFAULT_OPTIONS),\n        {\n          name: 'Error',\n          diagnostics: [\n            {\n              message: 'Cannot find extended parcel config',\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: configFilePath,\n                  language: 'json5',\n                  code,\n                  codeHighlights: [\n                    {\n                      message:\n                        'Cannot find module \"@parcel/config-deflt\", did you mean \"@parcel/config-default\"?',\n                      start: {line: 2, column: 14},\n                      end: {line: 2, column: 35},\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n      );\n    });\n\n    it('should emit multiple codeframes when multiple extended configs are not found', async () => {\n      let configFilePath = path.join(\n        __dirname,\n        'fixtures',\n        'config-extends-not-found',\n        '.parcelrc-multiple',\n      );\n      let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(\n        () => parseAndProcessConfig(configFilePath, code, DEFAULT_OPTIONS),\n        {\n          name: 'Error',\n          diagnostics: [\n            {\n              message: 'Cannot find extended parcel config',\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: configFilePath,\n                  language: 'json5',\n                  code,\n                  codeHighlights: [\n                    {\n                      message:\n                        'Cannot find module \"@parcel/config-deflt\", did you mean \"@parcel/config-default\"?',\n                      start: {line: 2, column: 15},\n                      end: {line: 2, column: 36},\n                    },\n                  ],\n                },\n              ],\n            },\n            {\n              message: 'Cannot find extended parcel config',\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: configFilePath,\n                  language: 'json5',\n                  code,\n                  codeHighlights: [\n                    {\n                      message:\n                        '\"./.parclrc\" does not exist, did you mean \"./.parcelrc\"?',\n                      start: {line: 2, column: 39},\n                      end: {line: 2, column: 50},\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n      );\n    });\n  });\n\n  describe('resolve', () => {\n    it('should return null if there is no .parcelrc file found', async () => {\n      let resolved = await resolveParcelConfig(DEFAULT_OPTIONS);\n      assert.equal(resolved, null);\n    });\n\n    it('should resolve a config if a .parcelrc file is found', async () => {\n      let resolved = await resolveParcelConfig({\n        ...DEFAULT_OPTIONS,\n        projectRoot: path.join(__dirname, 'fixtures', 'config', 'subfolder'),\n      });\n\n      assert(resolved !== null);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/PublicAsset.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {Asset, MutableAsset} from '../src/public/Asset';\nimport UncommittedAsset from '../src/UncommittedAsset';\nimport {createAsset as _createAsset} from '../src/assetUtils';\nimport {createEnvironment} from '../src/Environment';\nimport {DEFAULT_OPTIONS} from './test-utils';\nimport {toProjectPath} from '../src/projectPath';\n\nfunction createAsset(opts) {\n  return _createAsset('/', opts);\n}\n\ndescribe('Public Asset', () => {\n  let internalAsset;\n  beforeEach(() => {\n    internalAsset = new UncommittedAsset({\n      options: DEFAULT_OPTIONS,\n      value: createAsset({\n        filePath: toProjectPath('/', '/does/not/exist'),\n        type: 'js',\n        env: createEnvironment({}),\n        isSource: true,\n        stats: {size: 0, time: 0},\n      }),\n    });\n  });\n\n  it('returns the same public Asset given an internal asset', () => {\n    assert.equal(new Asset(internalAsset), new Asset(internalAsset));\n  });\n\n  it('returns the same public MutableAsset given an internal asset', () => {\n    assert.equal(\n      new MutableAsset(internalAsset),\n      new MutableAsset(internalAsset),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/PublicBundle.test.js",
    "content": "// @flow strict-local\nimport type {Bundle as InternalBundle} from '../src/types';\n\nimport assert from 'assert';\nimport {ContentGraph} from '@parcel/graph';\n\nimport {Bundle, NamedBundle, PackagedBundle} from '../src/public/Bundle';\nimport BundleGraph from '../src/BundleGraph';\nimport {createEnvironment} from '../src/Environment';\nimport {DEFAULT_OPTIONS} from './test-utils';\nimport {toProjectPath} from '../src/projectPath';\n\ndescribe('Public Bundle', () => {\n  let internalBundle: InternalBundle;\n  let bundleGraph;\n  beforeEach(() => {\n    let env = createEnvironment({});\n    internalBundle = {\n      id: '123',\n      hashReference: '@@HASH_REFERENCE_123',\n      entryAssetIds: [],\n      mainEntryId: null,\n      type: 'js',\n      env,\n      name: null,\n      displayName: null,\n      publicId: null,\n      pipeline: null,\n      needsStableName: null,\n      bundleBehavior: null,\n      isSplittable: true,\n      target: {\n        env,\n        distDir: toProjectPath('/', '/'),\n        name: '',\n        publicUrl: '',\n      },\n    };\n\n    bundleGraph = new BundleGraph({\n      graph: new ContentGraph(),\n      assetPublicIds: new Set(),\n      publicIdByAssetId: new Map(),\n      bundleContentHashes: new Map(),\n    });\n  });\n\n  it('returns the same public Bundle given an internal bundle', () => {\n    assert.equal(\n      Bundle.get(internalBundle, bundleGraph, DEFAULT_OPTIONS),\n      Bundle.get(internalBundle, bundleGraph, DEFAULT_OPTIONS),\n    );\n  });\n\n  it('returns the same public NamedBundle given an internal bundle', () => {\n    assert.equal(\n      NamedBundle.get(internalBundle, bundleGraph, DEFAULT_OPTIONS),\n      NamedBundle.get(internalBundle, bundleGraph, DEFAULT_OPTIONS),\n    );\n  });\n\n  it('returns the same public PackagedBundle given an internal bundle', () => {\n    assert.equal(\n      PackagedBundle.get(internalBundle, bundleGraph, DEFAULT_OPTIONS),\n      PackagedBundle.get(internalBundle, bundleGraph, DEFAULT_OPTIONS),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/PublicDependency.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {createEnvironment} from '../src/Environment';\nimport {createDependency} from '../src/Dependency';\nimport {getPublicDependency} from '../src/public/Dependency';\nimport {DEFAULT_OPTIONS} from './test-utils';\n\ndescribe('Public Dependency', () => {\n  it('returns the same public Dependency given an internal dependency', () => {\n    let internalDependency = createDependency('/', {\n      specifier: 'foo',\n      specifierType: 'esm',\n      env: createEnvironment({}),\n    });\n\n    assert.equal(\n      getPublicDependency(internalDependency, DEFAULT_OPTIONS),\n      getPublicDependency(internalDependency, DEFAULT_OPTIONS),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/PublicEnvironment.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {createEnvironment} from '../src/Environment';\nimport PublicEnvironment from '../src/public/Environment';\nimport {DEFAULT_OPTIONS} from './test-utils';\n\ndescribe('Public Environment', () => {\n  it('has correct support data for ChromeAndroid', () => {\n    let env = new PublicEnvironment(\n      createEnvironment({\n        context: 'browser',\n        engines: {\n          browsers: ['last 1 Chrome version', 'last 1 ChromeAndroid version'],\n        },\n        outputFormat: 'esmodule',\n      }),\n      DEFAULT_OPTIONS,\n    );\n\n    assert(env.supports('esmodules'));\n    assert(env.supports('dynamic-import'));\n    assert(env.supports('worker-module'));\n    assert(env.supports('import-meta-url'));\n    assert(env.supports('arrow-functions'));\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/PublicMutableBundleGraph.test.js",
    "content": "// @flow strict-local\n\nimport type {Dependency} from '@parcel/types';\n\nimport assert from 'assert';\nimport invariant from 'assert';\nimport InternalBundleGraph from '../src/BundleGraph';\nimport MutableBundleGraph from '../src/public/MutableBundleGraph';\nimport {DEFAULT_ENV, DEFAULT_TARGETS, DEFAULT_OPTIONS} from './test-utils';\nimport AssetGraph, {nodeFromAssetGroup} from '../src/AssetGraph';\nimport {createAsset as _createAsset} from '../src/assetUtils';\nimport {createDependency as _createDependency} from '../src/Dependency';\nimport nullthrows from 'nullthrows';\nimport {toProjectPath} from '../src/projectPath';\n\nfunction createAsset(opts) {\n  return _createAsset('/', opts);\n}\n\nfunction createDependency(opts) {\n  return _createDependency('/', opts);\n}\n\nconst id1 = '0123456789abcdef0123456789abcdef';\nconst id2 = '9876543210fedcba9876543210fedcba';\n\ndescribe('PublicMutableBundleGraph', () => {\n  it('creates publicIds for bundles', () => {\n    let internalBundleGraph = InternalBundleGraph.fromAssetGraph(\n      createMockAssetGraph(),\n      false,\n    );\n    let mutableBundleGraph = new MutableBundleGraph(\n      internalBundleGraph,\n      DEFAULT_OPTIONS,\n    );\n\n    mutableBundleGraph.traverse(node => {\n      if (\n        node.type === 'dependency' &&\n        mutableBundleGraph.getResolvedAsset(node.value)\n      ) {\n        let target = nullthrows(node.value.target);\n        let group = mutableBundleGraph.createBundleGroup(node.value, target);\n        let resolved = mutableBundleGraph.getResolvedAsset(node.value);\n        if (resolved != null) {\n          mutableBundleGraph.addBundleToBundleGroup(\n            mutableBundleGraph.createBundle({\n              entryAsset: resolved,\n              target,\n            }),\n            group,\n          );\n        }\n      }\n    });\n\n    assert.deepEqual(\n      internalBundleGraph.getBundles().map(b => b.publicId),\n      ['8LVYC', 'd7Pd5'],\n    );\n  });\n\n  it('is safe to add a bundle to a bundleGroup multiple times', () => {\n    let internalBundleGraph = InternalBundleGraph.fromAssetGraph(\n      createMockAssetGraph(),\n      false,\n    );\n    let mutableBundleGraph = new MutableBundleGraph(\n      internalBundleGraph,\n      DEFAULT_OPTIONS,\n    );\n\n    let dependency: Dependency;\n    mutableBundleGraph.traverse((node, _, actions) => {\n      if (node.type === 'dependency') {\n        dependency = node.value;\n        actions.stop();\n      }\n    });\n\n    invariant(dependency != null);\n\n    let target = nullthrows(dependency.target);\n    let bundleGroup = mutableBundleGraph.createBundleGroup(dependency, target);\n    let bundle = mutableBundleGraph.createBundle({\n      entryAsset: nullthrows(mutableBundleGraph.getResolvedAsset(dependency)),\n      target,\n    });\n\n    mutableBundleGraph.addBundleToBundleGroup(bundle, bundleGroup);\n    mutableBundleGraph.addBundleToBundleGroup(bundle, bundleGroup);\n  });\n});\n\nconst stats = {size: 0, time: 0};\nfunction createMockAssetGraph() {\n  let graph = new AssetGraph();\n  graph.setRootConnections({\n    entries: [toProjectPath('/', '/index'), toProjectPath('/', '/index2')],\n  });\n\n  graph.resolveEntry(\n    toProjectPath('/', '/index'),\n    [\n      {\n        filePath: toProjectPath('/', '/path/to/index/src/main.js'),\n        packagePath: toProjectPath('/', '/path/to/index'),\n      },\n    ],\n    '1',\n  );\n  graph.resolveEntry(\n    toProjectPath('/', '/index2'),\n    [\n      {\n        filePath: toProjectPath('/', '/path/to/index/src/main2.js'),\n        packagePath: toProjectPath('/', '/path/to/index'),\n      },\n    ],\n    '2',\n  );\n  graph.resolveTargets(\n    {\n      filePath: toProjectPath('/', '/path/to/index/src/main.js'),\n      packagePath: toProjectPath('/', '/path/to/index'),\n    },\n    DEFAULT_TARGETS,\n    '3',\n  );\n  graph.resolveTargets(\n    {\n      filePath: toProjectPath('/', '/path/to/index/src/main2.js'),\n      packagePath: toProjectPath('/', '/path/to/index'),\n    },\n    DEFAULT_TARGETS,\n    '4',\n  );\n\n  let dep1 = createDependency({\n    specifier: 'path/to/index/src/main.js',\n    specifierType: 'esm',\n    needsStableName: true,\n    env: DEFAULT_ENV,\n    target: DEFAULT_TARGETS[0],\n  });\n  let dep2 = createDependency({\n    specifier: 'path/to/index/src/main2.js',\n    specifierType: 'esm',\n    needsStableName: true,\n    env: DEFAULT_ENV,\n    target: DEFAULT_TARGETS[0],\n  });\n\n  let filePath = toProjectPath('/', '/index.js');\n  let req1 = {filePath, env: DEFAULT_ENV};\n  graph.resolveDependency(dep1, nodeFromAssetGroup(req1).value, '5');\n  graph.resolveAssetGroup(\n    req1,\n    [\n      createAsset({\n        id: id1,\n        filePath,\n        type: 'js',\n        isSource: true,\n        stats,\n        env: DEFAULT_ENV,\n      }),\n    ],\n    '6',\n  );\n\n  filePath = toProjectPath('/', '/index2.js');\n  let req2 = {filePath, env: DEFAULT_ENV};\n  graph.resolveDependency(dep2, nodeFromAssetGroup(req2).value, '7');\n  graph.resolveAssetGroup(\n    req2,\n    [\n      createAsset({\n        id: id2,\n        filePath,\n        type: 'js',\n        isSource: true,\n        stats,\n        env: DEFAULT_ENV,\n      }),\n    ],\n    '8',\n  );\n\n  return graph;\n}\n"
  },
  {
    "path": "packages/core/core/test/RequestTracker.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport nullthrows from 'nullthrows';\nimport RequestTracker, {type RunAPI} from '../src/RequestTracker';\nimport WorkerFarm from '@parcel/workers';\nimport {DEFAULT_OPTIONS} from './test-utils';\nimport {INITIAL_BUILD} from '../src/constants';\nimport {makeDeferredWithPromise} from '@parcel/utils';\n\nconst options = DEFAULT_OPTIONS;\nconst farm = new WorkerFarm({workerPath: require.resolve('../src/worker.js')});\n\ndescribe('RequestTracker', () => {\n  it('should not run requests that have not been invalidated', async () => {\n    let tracker = new RequestTracker({farm, options});\n    await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: () => {},\n      input: null,\n    });\n    let called = false;\n    await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: () => {\n        called = true;\n      },\n      input: null,\n    });\n    assert(called === false);\n  });\n\n  it('should rerun requests that have been invalidated', async () => {\n    let tracker = new RequestTracker({farm, options});\n    await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: () => {},\n      input: null,\n    });\n    tracker.graph.invalidateNode(\n      tracker.graph.getNodeIdByContentKey('abc'),\n      INITIAL_BUILD,\n    );\n    let called = false;\n    await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: () => {\n        called = true;\n      },\n      input: null,\n    });\n    assert(called === true);\n  });\n\n  it('should invalidate requests with invalidated subrequests', async () => {\n    let tracker = new RequestTracker({farm, options});\n    await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: async ({api}) => {\n        await api.runRequest({\n          id: 'xyz',\n          type: 7,\n          run: () => {},\n          input: null,\n        });\n      },\n      input: null,\n    });\n    tracker.graph.invalidateNode(\n      tracker.graph.getNodeIdByContentKey('xyz'),\n      INITIAL_BUILD,\n    );\n    assert(\n      tracker\n        .getInvalidRequests()\n        .map(req => req.id)\n        .includes('abc'),\n    );\n  });\n\n  it('should invalidate requests that failed', async () => {\n    let tracker = new RequestTracker({farm, options});\n    await tracker\n      .runRequest({\n        id: 'abc',\n        type: 7,\n        run: async () => {\n          await Promise.resolve();\n          throw new Error('woops');\n        },\n        input: null,\n      })\n      .then(null, () => {\n        /* do nothing */\n      });\n    assert(\n      tracker\n        .getInvalidRequests()\n        .map(req => req.id)\n        .includes('abc'),\n    );\n  });\n\n  it('should remove subrequests that are no longer called within a request', async () => {\n    let tracker = new RequestTracker({farm, options});\n    await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: async ({api}) => {\n        await api.runRequest({\n          id: 'xyz',\n          type: 7,\n          run: () => {},\n          input: null,\n        });\n      },\n      input: null,\n    });\n    let nodeId = nullthrows(tracker.graph.getNodeIdByContentKey('abc'));\n    tracker.graph.invalidateNode(nodeId, INITIAL_BUILD);\n    await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: async ({api}) => {\n        await api.runRequest({\n          id: '123',\n          type: 7,\n          run: () => {},\n          input: null,\n        });\n      },\n      input: null,\n    });\n    assert(!tracker.graph.hasContentKey('xyz'));\n  });\n\n  it('should return a cached result if it was stored', async () => {\n    let tracker = new RequestTracker({farm, options});\n    await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      // $FlowFixMe string isn't a valid result\n      run: async ({api}: {api: RunAPI<string | void>, ...}) => {\n        let result = await Promise.resolve('hello');\n        api.storeResult(result);\n      },\n      input: null,\n    });\n    let result = await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: async () => {},\n      input: null,\n    });\n    assert(result === 'hello');\n  });\n\n  it('should reject all in progress requests when the abort controller aborts', async () => {\n    let tracker = new RequestTracker({farm, options});\n    let p = tracker\n      .runRequest({\n        id: 'abc',\n        type: 7,\n        run: async () => {\n          await Promise.resolve('hello');\n        },\n        input: null,\n      })\n      .then(null, () => {\n        /* do nothing */\n      });\n    // $FlowFixMe\n    tracker.setSignal({aborted: true});\n    await p;\n    assert(\n      tracker\n        .getInvalidRequests()\n        .map(req => req.id)\n        .includes('abc'),\n    );\n  });\n\n  it('should not requeue requests if the previous request is still running', async () => {\n    let tracker = new RequestTracker({farm, options});\n\n    let lockA = makeDeferredWithPromise();\n    let lockB = makeDeferredWithPromise();\n\n    let requestA = tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      // $FlowFixMe string isn't a valid result\n      run: async ({api}: {api: RunAPI<string>, ...}) => {\n        await lockA.promise;\n        api.storeResult('a');\n        return 'a';\n      },\n      input: null,\n    });\n\n    let calledB = false;\n    let requestB = tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      // $FlowFixMe string isn't a valid result\n      run: async ({api}: {api: RunAPI<string>, ...}) => {\n        calledB = true;\n        await lockB.promise;\n        api.storeResult('b');\n        return 'b';\n      },\n      input: null,\n    });\n\n    lockA.deferred.resolve();\n    lockB.deferred.resolve();\n    let resultA = await requestA;\n    let resultB = await requestB;\n    assert.strictEqual(resultA, 'a');\n    assert.strictEqual(resultB, 'a');\n    assert.strictEqual(calledB, false);\n\n    let cachedResult = await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: () => {},\n      input: null,\n    });\n    assert.strictEqual(cachedResult, 'a');\n  });\n\n  it('should requeue requests if the previous request is still running but failed', async () => {\n    let tracker = new RequestTracker({farm, options});\n\n    let lockA = makeDeferredWithPromise();\n    let lockB = makeDeferredWithPromise();\n\n    let requestA = tracker\n      .runRequest({\n        id: 'abc',\n        type: 7,\n        run: async () => {\n          await lockA.promise;\n          throw new Error('whoops');\n        },\n        input: null,\n      })\n      .catch(() => {\n        // ignore\n      });\n\n    let requestB = tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      // $FlowFixMe string isn't a valid result\n      run: async ({api}: {api: RunAPI<string | void>, ...}) => {\n        await lockB.promise;\n        api.storeResult('b');\n      },\n      input: null,\n    });\n\n    lockA.deferred.resolve();\n    lockB.deferred.resolve();\n    await requestA;\n    await requestB;\n\n    let called = false;\n    let cachedResult = await tracker.runRequest({\n      id: 'abc',\n      type: 7,\n      run: () => {\n        called = true;\n      },\n      input: null,\n    });\n    assert.strictEqual(cachedResult, 'b');\n    assert.strictEqual(called, false);\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/SymbolPropagation.test.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport type {FilePath, SourceLocation, Meta, Symbol} from '@parcel/types';\nimport type {ContentKey, NodeId} from '@parcel/graph';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport {setEqual} from '@parcel/utils';\nimport AssetGraph, {\n  nodeFromAssetGroup,\n  nodeFromDep,\n  nodeFromEntryFile,\n  nodeFromAsset,\n} from '../src/AssetGraph';\nimport {createDependency as _createDependency} from '../src/Dependency';\nimport {createAsset as _createAsset} from '../src/assetUtils';\nimport {\n  toProjectPath as _toProjectPath,\n  type ProjectPath,\n} from '../src/projectPath';\nimport {propagateSymbols} from '../src/SymbolPropagation';\nimport dumpGraphToGraphViz from '../src/dumpGraphToGraphViz';\nimport {DEFAULT_ENV, DEFAULT_OPTIONS, DEFAULT_TARGETS} from './test-utils';\nimport type {\n  Asset,\n  AssetNode,\n  AssetGraphNode,\n  Dependency,\n  DependencyNode,\n} from '../src/types';\n\nconst stats = {size: 0, time: 0};\n\nfunction createAsset(opts) {\n  return _createAsset('/', opts);\n}\n\nfunction createDependency(opts) {\n  return _createDependency('/', opts);\n}\n\nfunction toProjectPath(p) {\n  return _toProjectPath('/', p);\n}\n\nfunction fromProjectPathUnix(p: ProjectPath) {\n  // $FlowFixMe\n  return '/' + p;\n}\n\nfunction nullthrowsAssetNode(v: ?AssetGraphNode): AssetNode {\n  invariant(v?.type === 'asset');\n  return v;\n}\nfunction nullthrowsDependencyNode(v: ?AssetGraphNode): DependencyNode {\n  invariant(v?.type === 'dependency');\n  return v;\n}\n\nfunction createAssetGraph(\n  assets: Array<\n    [\n      FilePath,\n      /* symbols (or cleared) */ ?Array<\n        [Symbol, {|local: Symbol, loc?: ?SourceLocation, meta?: ?Meta|}],\n      >,\n      /* sideEffects */ boolean,\n    ],\n  >,\n  dependencies: Array<\n    [\n      /* from */ FilePath,\n      /* to */ FilePath,\n      /* symbols (or cleared) */ ?Array<\n        [\n          Symbol,\n          {|\n            local: Symbol,\n            loc?: ?SourceLocation,\n            isWeak: boolean,\n            meta?: ?Meta,\n          |},\n        ],\n      >,\n    ],\n  >,\n  isLibrary?: boolean,\n) {\n  let graph = new AssetGraph();\n  let entryFilePath = '/index.js';\n  graph.setRootConnections({\n    entries: [toProjectPath(entryFilePath)],\n  });\n  let entry = {\n    filePath: toProjectPath(entryFilePath),\n    packagePath: toProjectPath('/'),\n  };\n  let entryNodeContentKey = nodeFromEntryFile(entry).id;\n  graph.resolveEntry(toProjectPath(entryFilePath), [entry], '1');\n  graph.resolveTargets(entry, DEFAULT_TARGETS, '2');\n  let entryDependencyId = graph.getNodeIdsConnectedFrom(\n    graph.getNodeIdByContentKey(entryNodeContentKey),\n  )[0];\n  if (isLibrary) {\n    let entryDependencyNode = nullthrows(graph.getNode(entryDependencyId));\n    invariant(entryDependencyNode.type === 'dependency');\n    entryDependencyNode.value.symbols = new Map([\n      ['*', {local: '*', isWeak: true, loc: null}],\n    ]);\n    entryDependencyNode.usedSymbolsDown.add('*');\n    entryDependencyNode.usedSymbolsUp.set('*', undefined);\n  }\n\n  let assetId = 1;\n  let changedAssets = new Map();\n  let assetGroupNodes = new Map<FilePath, NodeId>();\n  let assetNodes = new Map<FilePath, NodeId>();\n  for (let [filePath, symbols, sideEffects] of assets) {\n    let assetGroup = nodeFromAssetGroup({\n      filePath: toProjectPath(filePath),\n      env: DEFAULT_ENV,\n      sideEffects,\n    });\n    let assetGroupNodeId = graph.addNodeByContentKey(assetGroup.id, assetGroup);\n    assetGroupNodes.set(filePath, assetGroupNodeId);\n\n    let asset = nodeFromAsset(\n      createAsset({\n        id: String(assetId),\n        filePath: toProjectPath(filePath),\n        type: 'js',\n        isSource: true,\n        sideEffects,\n        stats,\n        symbols: symbols ? new Map(symbols) : symbols,\n        env: DEFAULT_ENV,\n      }),\n    );\n    let assetNodeId = graph.addNodeByContentKey(asset.id, asset);\n    assetNodes.set(filePath, assetNodeId);\n    changedAssets.set(String(assetId), asset.value);\n\n    graph.addEdge(assetGroupNodeId, assetNodeId);\n\n    assetId++;\n  }\n\n  for (let [from, to, symbols] of dependencies) {\n    let dependencyNode = nodeFromDep(\n      createDependency({\n        specifier: to,\n        specifierType: 'esm',\n        env: DEFAULT_ENV,\n        symbols: symbols ? new Map(symbols) : symbols,\n        sourcePath: from,\n        sourceAssetId: from,\n      }),\n    );\n    let dependencyNodeId = graph.addNodeByContentKey(\n      dependencyNode.id,\n      dependencyNode,\n    );\n    graph.addEdge(nullthrows(assetNodes.get(from)), dependencyNodeId);\n    graph.addEdge(dependencyNodeId, nullthrows(assetGroupNodes.get(to)));\n  }\n\n  let entryAssetGroup = nullthrows(assetGroupNodes.get(entryFilePath));\n  graph.addEdge(entryDependencyId, entryAssetGroup);\n\n  return {graph, changedAssets};\n}\n\nfunction assertUsedSymbols(\n  graph: AssetGraph,\n  _expectedAsset: Array<[FilePath, /* usedSymbols */ Array<Symbol>]>,\n  _expectedDependency: Array<\n    [\n      FilePath,\n      FilePath,\n      /* usedSymbols */ Array<[Symbol, ?[FilePath, ?Symbol]] | [Symbol]> | null,\n    ],\n  >,\n  isLibrary?: boolean,\n) {\n  let expectedAsset = new Map(\n    _expectedAsset.map(([f, symbols]) => [f, symbols]),\n  );\n  let expectedDependency = new Map(\n    _expectedDependency.map(([from, to, sym]) => [\n      from + ':' + to,\n      // $FlowFixMe[invalid-tuple-index]\n      sym ? sym.map(v => [v[0], v[1] ?? [to, v[0]]]) : sym,\n    ]),\n  );\n\n  if (isLibrary) {\n    let entryDep = nullthrows(\n      [...graph.nodes.values()].find(\n        n => n?.type === 'dependency' && n.value.sourceAssetId == null,\n      ),\n    );\n    invariant(entryDep.type === 'dependency');\n    assertDependencyUsedSymbols(\n      entryDep.usedSymbolsUp,\n      new Map([['*', undefined]]),\n      'entryDep',\n    );\n  }\n\n  function assertDependencyUsedSymbols(usedSymbolsUp, expectedMap, id) {\n    assertSetEqual(\n      new Set(usedSymbolsUp.keys()),\n      new Set(expectedMap.keys()),\n      id,\n    );\n\n    for (let [s, resolved] of usedSymbolsUp) {\n      let exp = expectedMap.get(s);\n      if (resolved && exp) {\n        let asset = nullthrows(graph.getNodeByContentKey(resolved.asset));\n        invariant(asset.type === 'asset');\n        assert.strictEqual(\n          fromProjectPathUnix(asset.value.filePath),\n          exp[0],\n          `dep ${id}@${s} resolved asset: ${fromProjectPathUnix(\n            asset.value.filePath,\n          )} !== ${exp[0]}`,\n        );\n        assert.strictEqual(\n          resolved.symbol,\n          exp[1],\n          `dep ${id}@${s} resolved symbol: ${String(\n            resolved.symbol,\n          )} !== ${String(exp[1])}`,\n        );\n      } else {\n        assert.equal(resolved, exp);\n      }\n    }\n  }\n\n  for (let [nodeId, node] of graph.nodes.entries()) {\n    if (node?.type === 'asset') {\n      let filePath = fromProjectPathUnix(node.value.filePath);\n      let expected = new Set(nullthrows(expectedAsset.get(filePath)));\n      assertSetEqual(node.usedSymbols, expected, filePath);\n    } else if (node?.type === 'dependency' && node.value.sourcePath != null) {\n      let resolutionId = graph.getNodeIdsConnectedFrom(nodeId)[0];\n      let resolution = nullthrows(graph.getNode(resolutionId));\n      invariant(resolution.type === 'asset_group');\n      let to = resolution.value.filePath;\n\n      let id =\n        fromProjectPathUnix(nullthrows(node.value.sourcePath)) +\n        ':' +\n        fromProjectPathUnix(nullthrows(to));\n      let expected = expectedDependency.get(id);\n      if (!expected) {\n        assert(expected === null);\n        assertSetEqual(new Set(node.usedSymbolsUp.keys()), new Set(), id);\n        assert(node.excluded, `${id} should be excluded`);\n      } else {\n        assert(!node.excluded, `${id} should not be excluded`);\n        let expectedMap = new Map(expected);\n\n        assertDependencyUsedSymbols(node.usedSymbolsUp, expectedMap, id);\n      }\n    }\n  }\n}\n\nfunction assertSetEqual<T>(\n  actual: $ReadOnlySet<T>,\n  expected: $ReadOnlySet<T>,\n  prefix?: string = '',\n) {\n  assert(\n    setEqual(actual, expected),\n    `${prefix} [${[...actual].join(',')}] wasn't [${[...expected].join(',')}]`,\n  );\n}\n\nasync function testPropagation(\n  assets: Array<\n    [\n      FilePath,\n      /* symbols (or cleared) */ ?Array<\n        [Symbol, {|local: Symbol, loc?: ?SourceLocation, meta?: ?Meta|}],\n      >,\n      /* sideEffects */ boolean,\n      /* usedSymbols */ Array<Symbol>,\n    ],\n  >,\n  dependencies: Array<\n    [\n      /* from */ FilePath,\n      /* to */ FilePath,\n      /* symbols (or cleared) */ ?Array<\n        [\n          Symbol,\n          {|\n            local: Symbol,\n            loc?: ?SourceLocation,\n            isWeak: boolean,\n            meta?: ?Meta,\n          |},\n        ],\n      >,\n      /* usedSymbols */ Array<\n        [Symbol, ?[FilePath, ?Symbol]] | [Symbol],\n      > | /* excluded */ null,\n    ],\n  >,\n  isLibrary?: boolean,\n): Promise<AssetGraph> {\n  let {graph, changedAssets} = createAssetGraph(\n    assets.map(([f, symbols, sideEffects]) => [f, symbols, sideEffects]),\n    dependencies.map(([from, to, symbols]) => [from, to, symbols]),\n    isLibrary,\n  );\n  await dumpGraphToGraphViz(graph, 'test_before');\n\n  handlePropagationErrors(\n    propagateSymbols({\n      options: DEFAULT_OPTIONS,\n      assetGraph: graph,\n      changedAssetsPropagation: new Set(changedAssets.keys()),\n      assetGroupsWithRemovedParents: new Set(),\n      previousErrors: undefined,\n    }),\n  );\n\n  await dumpGraphToGraphViz(graph, 'test_after');\n\n  assertUsedSymbols(\n    graph,\n    assets.map(([f, , , usedSymbols]) => [f, usedSymbols]),\n    dependencies.map(([from, to, , usedSymbols]) => [from, to, usedSymbols]),\n    isLibrary,\n  );\n\n  return graph;\n}\n\nfunction handlePropagationErrors(errors: Map<NodeId, Array<Diagnostic>>) {\n  if (errors.size > 0) {\n    throw new ThrowableDiagnostic({\n      diagnostic: [...errors.values()][0],\n    });\n  }\n}\n\nfunction assertPropagationErrors(\n  graph: AssetGraph,\n  actual: Map<NodeId, Array<Diagnostic>>,\n  expected: Iterable<[FilePath, Array<Diagnostic>]>,\n) {\n  assert.deepEqual(\n    [...actual].map(([k, v]) => [\n      nullthrowsAssetNode(graph.getNode(k)).value.filePath,\n      v,\n    ]),\n    [...expected],\n  );\n}\n\nfunction changeDependency(\n  graph: AssetGraph,\n  from: FilePath,\n  to: FilePath,\n  cb: ($NonMaybeType<Dependency['symbols']>) => void,\n): Iterable<[ContentKey, Asset]> {\n  let sourceAssetNode = nullthrowsAssetNode(\n    [...graph.nodes.values()].find(\n      n => n?.type === 'asset' && n.value.filePath === from,\n    ),\n  );\n  sourceAssetNode.usedSymbolsDownDirty = true;\n  let depNode = nullthrowsDependencyNode(\n    [...graph.nodes.values()].find(\n      n =>\n        n?.type === 'dependency' &&\n        n.value.sourcePath === from &&\n        n.value.specifier === to,\n    ),\n  );\n  cb(nullthrows(depNode.value.symbols));\n  return [[sourceAssetNode.id, sourceAssetNode.value]];\n}\n\nfunction changeAsset(\n  graph: AssetGraph,\n  asset: FilePath,\n  cb: ($NonMaybeType<Asset['symbols']>) => void,\n): Iterable<[ContentKey, Asset]> {\n  let node = nullthrowsAssetNode(\n    [...graph.nodes.values()].find(\n      n => n?.type === 'asset' && n.value.filePath === asset,\n    ),\n  );\n  node.usedSymbolsUpDirty = true;\n  node.usedSymbolsDownDirty = true;\n  cb(nullthrows(node.value.symbols));\n  return [[node.id, node.value]];\n}\n\n// process.env.PARCEL_DUMP_GRAPHVIZ = '';\n// process.env.PARCEL_DUMP_GRAPHVIZ = 'symbols';\n\ndescribe('SymbolPropagation', () => {\n  it('basic tree', async () => {\n    // prettier-ignore\n    await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/lib.js', [['f', {local: 'lib1$foo'}], ['b', {local: 'lib2$bar'}]], false, []],\n        ['/lib1.js', [['foo', {local: 'v'}]], false, ['foo']],\n        ['/lib2.js', [['bar', {local: 'v'}]], false, []],\n      ],\n      [\n        ['/index.js', '/lib.js', [['f', {local: 'f', isWeak: false}]], [['f', ['/lib1.js', 'foo']]]],\n        ['/lib.js', '/lib1.js', [['foo', {local: 'lib1$foo', isWeak: true}]], [['foo']]],\n        ['/lib.js', '/lib2.js', [['bar', {local: 'lib2$bar', isWeak: true}]], null],\n      ],\n    );\n  });\n\n  it('basic tree - dependency symbol change export', async () => {\n    // prettier-ignore\n    let graph = await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/lib.js', [['f', {local: 'f'}], ['b', {local: 'b'}]], true, ['f']],\n      ],\n      [\n        ['/index.js', '/lib.js', [['f', {local: 'f', isWeak: false}]], [['f']]],\n      ],\n    );\n\n    let changedAssets = [\n      ...changeDependency(graph, 'index.js', '/lib.js', symbols => {\n        symbols.set('b', {\n          local: 'b',\n          isWeak: false,\n          loc: undefined,\n        });\n      }),\n    ];\n    propagateSymbols({\n      options: DEFAULT_OPTIONS,\n      assetGraph: graph,\n      changedAssetsPropagation: new Set(new Map(changedAssets).keys()),\n      assetGroupsWithRemovedParents: new Set(),\n    });\n\n    // prettier-ignore\n    assertUsedSymbols(graph,\n      [\n        ['/index.js', []],\n        ['/lib.js', ['f', 'b']],\n      ],\n      [\n        ['/index.js', '/lib.js', [['f'], ['b']]],\n      ],\n    );\n  });\n\n  it('basic tree - dependency symbol change import and error', async () => {\n    // prettier-ignore\n    let graph = await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/lib.js', [['f', {local: 'f'}]], true, ['f']],\n      ],\n      [\n        ['/index.js', '/lib.js', [['f', {local: 'f', isWeak: false}]], [['f']]],\n      ],\n    );\n\n    let changedAssets = [\n      ...changeDependency(graph, 'index.js', '/lib.js', symbols => {\n        symbols.delete('f');\n        symbols.set('f2', {\n          local: 'f2',\n          isWeak: false,\n          loc: undefined,\n        });\n      }),\n    ];\n    let errors = propagateSymbols({\n      options: DEFAULT_OPTIONS,\n      assetGraph: graph,\n      changedAssetsPropagation: new Set(new Map(changedAssets).keys()),\n      assetGroupsWithRemovedParents: new Set(),\n    });\n\n    assertPropagationErrors(graph, errors, [\n      [\n        'lib.js',\n        [\n          {\n            message: \"lib.js does not export 'f2'\",\n            origin: '@parcel/core',\n            codeFrames: undefined,\n          },\n        ],\n      ],\n    ]);\n  });\n\n  it('basic tree - asset symbol change export and error', async () => {\n    // prettier-ignore\n    let graph = await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/lib.js', [['f', {local: 'f'}]], true, ['f']],\n      ],\n      [\n        ['/index.js', '/lib.js', [['f', {local: 'f', isWeak: false}]], [['f']]],\n      ],\n    );\n\n    let changedAssets = [\n      ...changeAsset(graph, 'lib.js', symbols => {\n        symbols.delete('f');\n        symbols.set('f2', {\n          local: 'f2',\n          loc: undefined,\n        });\n      }),\n    ];\n\n    let errors = propagateSymbols({\n      options: DEFAULT_OPTIONS,\n      assetGraph: graph,\n      changedAssetsPropagation: new Set(new Map(changedAssets).keys()),\n      assetGroupsWithRemovedParents: new Set(),\n    });\n\n    assertPropagationErrors(graph, errors, [\n      [\n        'lib.js',\n        [\n          {\n            message: \"lib.js does not export 'f'\",\n            origin: '@parcel/core',\n            codeFrames: undefined,\n          },\n        ],\n      ],\n    ]);\n  });\n\n  it('basic tree - dependency symbol change reexport', async () => {\n    // prettier-ignore\n    let graph = await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/lib.js', [['f', {local: 'lib1$foo'}], ['b', {local: 'lib2$bar'}]], true, []],\n        ['/lib1.js', [['foo', {local: 'v'}]], true, ['foo']],\n        ['/lib2.js', [['bar', {local: 'v'}]], true, []],\n      ],\n      [\n        ['/index.js', '/lib.js', [['f', {local: 'f', isWeak: false}]], [['f']]],\n        ['/lib.js', '/lib1.js', [['foo', {local: 'lib1$foo', isWeak: true}]], [['foo']]],\n        ['/lib.js', '/lib2.js', [['bar', {local: 'lib2$bar', isWeak: true}]], []],\n      ],\n    );\n\n    let changedAssets = [\n      ...changeDependency(graph, 'index.js', '/lib.js', symbols => {\n        symbols.set('b', {\n          local: 'b',\n          isWeak: false,\n          loc: undefined,\n        });\n      }),\n    ];\n    propagateSymbols({\n      options: DEFAULT_OPTIONS,\n      assetGraph: graph,\n      changedAssetsPropagation: new Set(new Map(changedAssets).keys()),\n      assetGroupsWithRemovedParents: new Set(),\n    });\n\n    // prettier-ignore\n    assertUsedSymbols(graph,\n      [\n        ['/index.js', []],\n        ['/lib.js', []],\n        ['/lib1.js', ['foo']],\n        ['/lib2.js', ['bar']],\n      ],\n      [\n        ['/index.js', '/lib.js', [['f'],['b']]],\n        ['/lib.js', '/lib1.js', [['foo']]],\n        ['/lib.js', '/lib2.js', [['bar']]],\n      ],\n    );\n  });\n\n  it('basic tree with reexport-all', async () => {\n    // prettier-ignore\n    await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/lib.js', [], false, []],\n        ['/lib1.js', [['foo', {local: 'v'}]], false, ['foo']],\n        ['/lib2.js', [['bar', {local: 'v'}]], false, []],\n      ],\n      [\n        ['/index.js', '/lib.js', [['foo', {local: 'foo', isWeak: false}]], [['foo', ['/lib1.js', 'foo']]]],\n        ['/lib.js', '/lib1.js', [['*', {local: '*', isWeak: true}]], [['foo']]],\n        ['/lib.js', '/lib2.js', [['*', {local: '*', isWeak: true}]], null],\n      ],\n    );\n  });\n\n  it('dependency with * imports everything', async () => {\n    // prettier-ignore\n    await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/lib.js', [['a', {local: 'lib1$foo'}], ['b', {local: 'lib1$b'}]], true, ['*']],\n        ['/lib1.js', [['b', {local: 'v'}]], true, ['b']],\n        ['/lib2.js', [['c', {local: 'v'}]], true, ['*']],\n      ],\n      [\n        ['/index.js', '/lib.js', [['*', {local: 'lib', isWeak: false}]], [['*']]],\n        ['/lib.js', '/lib1.js', [['b', {local: 'lib1$foo', isWeak: true}]], [['b']]],\n        // TODO should usedSymbolsUp actually list the individual symbols instead of '*'?\n        ['/lib.js', '/lib2.js', [['*', {local: '*', isWeak: true}]], [['*']]],\n      ],\n    );\n  });\n\n  it('dependency with cleared symbols imports side-effect-full parts', async () => {\n    // prettier-ignore\n    await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/lib.js', [['a', {local: 'lib1$foo'}], ['b', {local: 'lib$b'}]], true, ['b']],\n        ['/lib1.js', [['b', {local: 'v'}]], true, ['b']],\n        ['/lib2.js', [['c', {local: 'v'}]], false, ['*']],\n      ],\n      [\n        ['/index.js', '/lib.js', null, []],\n        ['/lib.js', '/lib1.js', [['b', {local: 'lib1$foo', isWeak: true}]], [['b']]],\n        ['/lib.js', '/lib2.js', [['*', {local: '*', isWeak: true}]], [['*']]],\n      ],\n    );\n  });\n\n  it('dependency with cleared symbols imports side-effect-free package', async () => {\n    // prettier-ignore\n    await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/lib.js', [['a', {local: 'lib$a'}], ['b', {local: 'lib1$b'}], ['c', {local: 'lib2$c'}]], false, ['a']],\n        ['/lib1.js', [['b', {local: 'v'}]], false, ['b']],\n        ['/lib2.js', [['c', {local: 'v'}]], false, ['c']],\n        ['/lib3.js', [['d', {local: 'v'}]], false, ['*']],\n      ],\n      [\n        ['/index.js', '/lib.js', null, []],\n        ['/lib.js', '/lib1.js', [['b', {local: 'lib1$b', isWeak: true}]], [['b']]],\n        ['/lib.js', '/lib2.js', [['c', {local: 'lib2$c', isWeak: true}]], [['c']]],\n        ['/lib.js', '/lib3.js', [['*', {local: '*', isWeak: true}]], [['*']]],\n      ],\n    );\n  });\n\n  it('library build with entry dependency', async () => {\n    // prettier-ignore\n    await testPropagation(\n      [\n        ['/index.js', [[\"foo\", {local: \"foo\"}], ['b', {local: 'b$b'}]], true, ['*']],\n      ],\n      [],\n      true\n    );\n  });\n\n  it('library build with entry dependency and reexport', async () => {\n    // prettier-ignore\n    await testPropagation(\n      [\n        ['/index.js', [[\"foo\", {local: \"foo\"}], ['b', {local: 'b$b'}]], true, ['*']],\n        ['/b.js', [['b', {local: 'b'}]], true, ['b']],\n      ],\n      [\n        ['/index.js', '/b.js', [['b', {local: 'b$b', isWeak: false}]], [['b']]],\n      ],\n      true\n    );\n  });\n\n  it('cyclic dependency', async () => {\n    // prettier-ignore\n    await testPropagation(\n      [\n        ['/index.js', [], true, []],\n        ['/a.js', [['a', {local: 'b$b'}], ['real', {local: 'real'}]], true, ['real']],\n        ['/b.js', [['b', {local: 'c$c'}]], true, []],\n        ['/c.js', [['c', {local: 'a$real'}]], true, []],\n      ],\n      [\n        ['/index.js', '/a.js', [['a', {local: 'a', isWeak: false}]], [['a']]],\n        ['/a.js', '/b.js', [['b', {local: 'b$b', isWeak: true}]], [['b']]],\n        ['/b.js', '/c.js', [['c', {local: 'c$c', isWeak: true}]], [['c']]],\n        ['/c.js', '/a.js', [['real', {local: 'a$real', isWeak: true}]], [['real']]],\n      ],\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/TargetRequest.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport path from 'path';\nimport tempy from 'tempy';\nimport {inputFS as fs} from '@parcel/test-utils';\nimport {md} from '@parcel/diagnostic';\nimport {normalizeSeparators} from '@parcel/utils';\nimport {TargetResolver} from '../src/requests/TargetRequest';\nimport {DEFAULT_OPTIONS as _DEFAULT_OPTIONS, relative} from './test-utils';\n\nconst DEFAULT_OPTIONS = {\n  ..._DEFAULT_OPTIONS,\n  defaultTargetOptions: {\n    ..._DEFAULT_OPTIONS.defaultTargetOptions,\n    sourceMaps: true,\n  },\n};\n\nconst COMMON_TARGETS_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/common-targets',\n);\n\nconst COMMON_TARGETS_IGNORE_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/common-targets-ignore',\n);\n\nconst CUSTOM_TARGETS_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/custom-targets',\n);\n\nconst CUSTOM_TARGETS_DISTDIR_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/custom-targets-distdir',\n);\n\nconst INVALID_TARGETS_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/invalid-targets',\n);\n\nconst INVALID_ENGINES_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/invalid-engines',\n);\n\nconst INVALID_DISTPATH_FIXTURE_PATH = path.join(\n  __dirname,\n  'fixtures/invalid-distpath',\n);\n\nconst DEFAULT_DISTPATH_FIXTURE_PATHS = {\n  none: path.join(__dirname, 'fixtures/targets-default-distdir-none'),\n  one: path.join(__dirname, 'fixtures/targets-default-distdir-one'),\n  two: path.join(__dirname, 'fixtures/targets-default-distdir-two'),\n};\n\nconst CONTEXT_FIXTURE_PATH = path.join(__dirname, 'fixtures/context');\n\ndescribe('TargetResolver', () => {\n  let cacheDir;\n  beforeEach(() => {\n    cacheDir = tempy.directory();\n  });\n\n  afterEach(() => {\n    return fs.rimraf(cacheDir);\n  });\n\n  let api = {\n    invalidateOnFileCreate() {},\n    invalidateOnFileUpdate() {},\n    invalidateOnConfigKeyChange() {},\n    invalidateOnFileDelete() {},\n    invalidateOnEnvChange() {},\n    invalidateOnOptionChange() {},\n    invalidateOnStartup() {},\n    invalidateOnBuild() {},\n    getInvalidations() {\n      return [];\n    },\n    runRequest() {\n      throw new Error('Not implemented');\n    },\n    storeResult() {},\n    canSkipSubrequest() {\n      return false;\n    },\n    getPreviousResult() {},\n    getRequestResult() {},\n    getSubRequests() {\n      return [];\n    },\n    getInvalidSubRequests() {\n      return [];\n    },\n  };\n\n  it('resolves exactly specified targets', async () => {\n    let targetResolver = new TargetResolver(api, {\n      ...DEFAULT_OPTIONS,\n      targets: {\n        customA: {\n          context: 'browser',\n          distDir: 'customA',\n        },\n        customB: {\n          distDir: 'customB',\n          distEntry: 'b.js',\n          engines: {\n            node: '>= 8.0.0',\n          },\n        },\n      },\n    });\n\n    assert.deepEqual(\n      await targetResolver.resolve(COMMON_TARGETS_FIXTURE_PATH),\n      [\n        {\n          name: 'customA',\n          publicUrl: '/',\n          distDir: normalizeSeparators(path.resolve('customA')),\n          env: {\n            id: '1d40417b63734b32',\n            context: 'browser',\n            includeNodeModules: true,\n            engines: {\n              browsers: ['> 0.25%'],\n            },\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n        },\n        {\n          name: 'customB',\n          publicUrl: '/',\n          distEntry: 'b.js',\n          distDir: normalizeSeparators(path.resolve('customB')),\n          env: {\n            id: '928f0d1c941b2e57',\n            context: 'node',\n            includeNodeModules: false,\n            engines: {\n              node: '>= 8.0.0',\n            },\n            outputFormat: 'commonjs',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n        },\n      ],\n    );\n  });\n\n  it('resolves common targets from package.json', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n\n    assert.deepEqual(\n      await targetResolver.resolve(COMMON_TARGETS_FIXTURE_PATH),\n      [\n        {\n          name: 'main',\n          distDir: 'fixtures/common-targets/dist/main',\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: 'b552bd32da37fa8b',\n            context: 'node',\n            engines: {\n              node: '>= 8.0.0',\n            },\n            includeNodeModules: false,\n            outputFormat: 'commonjs',\n            isLibrary: true,\n            shouldOptimize: false,\n            shouldScopeHoist: true,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(COMMON_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 11,\n              line: 2,\n            },\n            end: {\n              column: 31,\n              line: 2,\n            },\n          },\n        },\n        {\n          name: 'module',\n          distDir: 'fixtures/common-targets/dist/module',\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: '8804e4eb97e2703e',\n            context: 'browser',\n            engines: {\n              browsers: ['last 1 version'],\n            },\n            includeNodeModules: false,\n            outputFormat: 'esmodule',\n            isLibrary: true,\n            shouldOptimize: false,\n            shouldScopeHoist: true,\n            sourceMap: {\n              inlineSources: true,\n            },\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(COMMON_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 13,\n              line: 3,\n            },\n            end: {\n              column: 35,\n              line: 3,\n            },\n          },\n        },\n        {\n          name: 'browser',\n          distDir: 'fixtures/common-targets/dist/browser',\n          distEntry: 'index.js',\n          publicUrl: '/assets',\n          env: {\n            id: 'a7ed3e73c53f1923',\n            context: 'browser',\n            engines: {\n              browsers: ['last 1 version'],\n            },\n            includeNodeModules: false,\n            outputFormat: 'commonjs',\n            isLibrary: true,\n            shouldOptimize: false,\n            shouldScopeHoist: true,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(COMMON_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 14,\n              line: 4,\n            },\n            end: {\n              column: 37,\n              line: 4,\n            },\n          },\n        },\n      ],\n    );\n  });\n\n  it('allows ignoring common targets from package.json', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n\n    assert.deepEqual(\n      await targetResolver.resolve(COMMON_TARGETS_IGNORE_FIXTURE_PATH),\n      [\n        {\n          name: 'app',\n          distDir: relative(\n            path.join(COMMON_TARGETS_IGNORE_FIXTURE_PATH, 'dist'),\n          ),\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: 'f7c9644283a8698f',\n            context: 'node',\n            engines: {\n              node: '>= 8.0.0',\n            },\n            includeNodeModules: false,\n            outputFormat: 'commonjs',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: undefined,\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(COMMON_TARGETS_IGNORE_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 10,\n              line: 3,\n            },\n            end: {\n              column: 25,\n              line: 3,\n            },\n          },\n        },\n      ],\n    );\n  });\n\n  it('resolves custom targets from package.json', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    assert.deepEqual(\n      await targetResolver.resolve(CUSTOM_TARGETS_FIXTURE_PATH),\n      [\n        {\n          name: 'main',\n          distDir: 'fixtures/custom-targets/dist/main',\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: 'b552bd32da37fa8b',\n            context: 'node',\n            engines: {\n              node: '>= 8.0.0',\n            },\n            includeNodeModules: false,\n            outputFormat: 'commonjs',\n            isLibrary: true,\n            shouldOptimize: false,\n            shouldScopeHoist: true,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(CUSTOM_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 11,\n              line: 2,\n            },\n            end: {\n              column: 31,\n              line: 2,\n            },\n          },\n        },\n        {\n          name: 'browserModern',\n          distDir: 'fixtures/custom-targets/dist/browserModern',\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: '1f28e9ceaf633d83',\n            context: 'browser',\n            engines: {\n              browsers: ['last 1 version'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(CUSTOM_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 20,\n              line: 3,\n            },\n            end: {\n              column: 49,\n              line: 3,\n            },\n          },\n        },\n        {\n          name: 'browserLegacy',\n          distDir: 'fixtures/custom-targets/dist/browserLegacy',\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: '767bf6e6b675c4f3',\n            context: 'browser',\n            engines: {\n              browsers: ['ie11'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(CUSTOM_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 20,\n              line: 4,\n            },\n            end: {\n              column: 49,\n              line: 4,\n            },\n          },\n        },\n      ],\n    );\n  });\n\n  it('should not optimize libraries by default', async () => {\n    let targetResolver = new TargetResolver(api, {\n      ...DEFAULT_OPTIONS,\n      mode: 'production',\n      defaultTargetOptions: {\n        ...DEFAULT_OPTIONS.defaultTargetOptions,\n        shouldOptimize: true,\n      },\n    });\n\n    assert.deepEqual(\n      await targetResolver.resolve(CUSTOM_TARGETS_FIXTURE_PATH),\n      [\n        {\n          name: 'main',\n          distDir: 'fixtures/custom-targets/dist/main',\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: 'b552bd32da37fa8b',\n            context: 'node',\n            engines: {\n              node: '>= 8.0.0',\n            },\n            includeNodeModules: false,\n            outputFormat: 'commonjs',\n            isLibrary: true,\n            shouldOptimize: false,\n            shouldScopeHoist: true,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(CUSTOM_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 11,\n              line: 2,\n            },\n            end: {\n              column: 31,\n              line: 2,\n            },\n          },\n        },\n        {\n          name: 'browserModern',\n          distDir: 'fixtures/custom-targets/dist/browserModern',\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: 'ed7c0e65adee71c9',\n            context: 'browser',\n            engines: {\n              browsers: ['last 1 version'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: true,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(CUSTOM_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 20,\n              line: 3,\n            },\n            end: {\n              column: 49,\n              line: 3,\n            },\n          },\n        },\n        {\n          name: 'browserLegacy',\n          distDir: 'fixtures/custom-targets/dist/browserLegacy',\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: 'f7692543e59e4c0a',\n            context: 'browser',\n            engines: {\n              browsers: ['ie11'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: true,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(CUSTOM_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 20,\n              line: 4,\n            },\n            end: {\n              column: 49,\n              line: 4,\n            },\n          },\n        },\n      ],\n    );\n  });\n\n  it('resolves explicit distDir for custom targets from package.json', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    assert.deepEqual(\n      await targetResolver.resolve(CUSTOM_TARGETS_DISTDIR_FIXTURE_PATH),\n      [\n        {\n          name: 'app',\n          distDir: 'fixtures/custom-targets-distdir/www',\n          distEntry: undefined,\n          publicUrl: 'www',\n          env: {\n            id: 'ddb6ac7c9a3a9178',\n            context: 'browser',\n            engines: {\n              browsers: '> 0.25%',\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(CUSTOM_TARGETS_DISTDIR_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              line: 3,\n              column: 5,\n            },\n            end: {\n              line: 3,\n              column: 10,\n            },\n          },\n        },\n      ],\n    );\n  });\n\n  it('skips targets with custom entry source for default entry', async () => {\n    let targetResolver = new TargetResolver(api, {\n      ...DEFAULT_OPTIONS,\n      targets: {\n        customA: {\n          context: 'browser',\n          distDir: 'customA',\n          source: 'customA/index.js',\n        },\n        customB: {\n          distDir: 'customB',\n        },\n      },\n    });\n\n    assert.deepEqual(\n      await targetResolver.resolve(COMMON_TARGETS_FIXTURE_PATH),\n      [\n        {\n          name: 'customB',\n          distDir: normalizeSeparators(path.resolve('customB')),\n          publicUrl: '/',\n          env: {\n            id: '1d40417b63734b32',\n            context: 'browser',\n            engines: {\n              browsers: ['> 0.25%'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n        },\n      ],\n    );\n  });\n\n  it('skips other targets with custom entry', async () => {\n    let targetResolver = new TargetResolver(api, {\n      ...DEFAULT_OPTIONS,\n      targets: {\n        customA: {\n          context: 'browser',\n          distDir: 'customA',\n          source: 'customA/index.js',\n        },\n        customB: {\n          distDir: 'customB',\n        },\n      },\n    });\n\n    assert.deepEqual(\n      await targetResolver.resolve(COMMON_TARGETS_FIXTURE_PATH, 'customA'),\n      [\n        {\n          name: 'customA',\n          distDir: normalizeSeparators(path.resolve('customA')),\n          publicUrl: '/',\n          env: {\n            id: '1d40417b63734b32',\n            context: 'browser',\n            engines: {\n              browsers: ['> 0.25%'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          source: 'customA/index.js',\n        },\n      ],\n    );\n  });\n\n  it('resolves main target with context from package.json', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let res = await targetResolver.resolve(CONTEXT_FIXTURE_PATH);\n    assert.deepEqual(res, [\n      {\n        name: 'main',\n        distDir: 'fixtures/context/dist/main',\n        distEntry: 'index.js',\n        publicUrl: '/',\n        env: {\n          id: res[0].env.id,\n          context: 'node',\n          engines: {\n            browsers: [\n              'last 1 Chrome version',\n              'last 1 Safari version',\n              'last 1 Firefox version',\n              'last 1 Edge version',\n            ],\n            node: process.versions.node,\n          },\n          includeNodeModules: false,\n          isLibrary: true,\n          outputFormat: 'commonjs',\n          shouldOptimize: false,\n          shouldScopeHoist: true,\n          sourceMap: {},\n          loc: undefined,\n          sourceType: 'module',\n        },\n        loc: {\n          filePath: relative(path.join(CONTEXT_FIXTURE_PATH, 'package.json')),\n          start: {\n            column: 11,\n            line: 2,\n          },\n          end: {\n            column: 31,\n            line: 2,\n          },\n        },\n      },\n    ]);\n  });\n\n  it('errors when the main target contains a non-js extension', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let fixture = path.join(__dirname, 'fixtures/application-targets');\n    let code = await fs.readFile(path.join(fixture, 'package.json'), 'utf8');\n\n    // $FlowFixMe\n    await assert.rejects(() => targetResolver.resolve(fixture), {\n      diagnostics: [\n        {\n          message: 'Unexpected output file type .html in target \"main\"',\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: path.join(fixture, 'package.json'),\n              language: 'json',\n              code,\n              codeHighlights: [\n                {\n                  end: {\n                    column: 27,\n                    line: 2,\n                  },\n                  message: 'File extension must be .js, .mjs, or .cjs',\n                  start: {\n                    column: 11,\n                    line: 2,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: [\n            'The \"main\" field is meant for libraries. If you meant to output a .html file, either remove the \"main\" field or choose a different target name.',\n          ],\n          documentationURL:\n            'https://parceljs.org/features/targets/#library-targets',\n        },\n      ],\n    });\n  });\n\n  it('errors when the main target uses the global output format', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let fixture = path.join(__dirname, 'fixtures/main-global');\n    let code = await fs.readFile(path.join(fixture, 'package.json'), 'utf8');\n\n    // $FlowFixMe\n    await assert.rejects(() => targetResolver.resolve(fixture), {\n      diagnostics: [\n        {\n          message:\n            'The \"global\" output format is not supported in the \"main\" target.',\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: path.join(fixture, 'package.json'),\n              language: 'json',\n              code,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  end: {\n                    column: 30,\n                    line: 5,\n                  },\n                  start: {\n                    column: 23,\n                    line: 5,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: [\n            'The \"main\" field is meant for libraries. The outputFormat must be either \"commonjs\" or \"esmodule\". Either change or remove the declared outputFormat.',\n          ],\n          documentationURL:\n            'https://parceljs.org/features/targets/#library-targets',\n        },\n      ],\n    });\n  });\n\n  it('errors when the main target uses the esmodule output format without a .mjs extension or \"type\": \"module\" field', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let fixture = path.join(__dirname, 'fixtures/main-mjs');\n    let code = await fs.readFile(path.join(fixture, 'package.json'), 'utf8');\n\n    // $FlowFixMe\n    await assert.rejects(() => targetResolver.resolve(fixture), {\n      diagnostics: [\n        {\n          message:\n            'Output format \"esmodule\" cannot be used in the \"main\" target without a .mjs extension or \"type\": \"module\" field.',\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: path.join(fixture, 'package.json'),\n              language: 'json',\n              code,\n              codeHighlights: [\n                {\n                  message: 'Declared output format defined here',\n                  end: {\n                    column: 32,\n                    line: 5,\n                  },\n                  start: {\n                    column: 23,\n                    line: 5,\n                  },\n                },\n                {\n                  message: 'Inferred output format defined here',\n                  end: {\n                    column: 25,\n                    line: 2,\n                  },\n                  start: {\n                    column: 11,\n                    line: 2,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: [\n            'Either change the output file extension to .mjs, add \"type\": \"module\" to package.json, or remove the declared outputFormat.',\n          ],\n          documentationURL:\n            'https://parceljs.org/features/targets/#library-targets',\n        },\n      ],\n    });\n  });\n\n  it('errors when the inferred output format does not match the declared one in common targets', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let fixture = path.join(__dirname, 'fixtures/main-format-mismatch');\n    let code = await fs.readFile(path.join(fixture, 'package.json'), 'utf8');\n\n    // $FlowFixMe\n    await assert.rejects(() => targetResolver.resolve(fixture), {\n      diagnostics: [\n        {\n          message:\n            'Declared output format \"esmodule\" does not match expected output format \"commonjs\".',\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: path.join(fixture, 'package.json'),\n              language: 'json',\n              code,\n              codeHighlights: [\n                {\n                  message: 'Declared output format defined here',\n                  end: {\n                    column: 32,\n                    line: 5,\n                  },\n                  start: {\n                    column: 23,\n                    line: 5,\n                  },\n                },\n                {\n                  message: 'Inferred output format defined here',\n                  end: {\n                    column: 26,\n                    line: 2,\n                  },\n                  start: {\n                    column: 11,\n                    line: 2,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: [\n            'Either remove the target\\'s declared \"outputFormat\" or change the extension to .mjs or .js.',\n          ],\n          documentationURL:\n            'https://parceljs.org/features/targets/#library-targets',\n        },\n      ],\n    });\n  });\n\n  it('errors when the inferred output format does not match the declared one in custom targets', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let fixture = path.join(__dirname, 'fixtures/custom-format-mismatch');\n    let code = await fs.readFile(path.join(fixture, 'package.json'), 'utf8');\n\n    // $FlowFixMe\n    await assert.rejects(() => targetResolver.resolve(fixture), {\n      diagnostics: [\n        {\n          message:\n            'Declared output format \"commonjs\" does not match expected output format \"esmodule\".',\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: path.join(fixture, 'package.json'),\n              language: 'json',\n              code,\n              codeHighlights: [\n                {\n                  message: 'Declared output format defined here',\n                  end: {\n                    column: 32,\n                    line: 5,\n                  },\n                  start: {\n                    column: 23,\n                    line: 5,\n                  },\n                },\n                {\n                  message: 'Inferred output format defined here',\n                  end: {\n                    column: 26,\n                    line: 2,\n                  },\n                  start: {\n                    column: 11,\n                    line: 2,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: [\n            'Either remove the target\\'s declared \"outputFormat\" or change the extension to .cjs or .js.',\n          ],\n          documentationURL:\n            'https://parceljs.org/features/targets/#library-targets',\n        },\n      ],\n    });\n  });\n\n  it('errors when a common library target turns scope hoisting off', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let fixture = path.join(__dirname, 'fixtures/library-scopehoist');\n    let code = await fs.readFile(path.join(fixture, 'package.json'), 'utf8');\n\n    // $FlowFixMe\n    await assert.rejects(() => targetResolver.resolve(fixture), {\n      diagnostics: [\n        {\n          message: 'Scope hoisting cannot be disabled for library targets.',\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: path.join(fixture, 'package.json'),\n              language: 'json',\n              code,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  end: {\n                    column: 25,\n                    line: 5,\n                  },\n                  start: {\n                    column: 21,\n                    line: 5,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: [\n            'The \"main\" target is meant for libraries. Either remove the \"scopeHoist\" option, or use a different target name.',\n          ],\n          documentationURL:\n            'https://parceljs.org/features/targets/#library-targets',\n        },\n      ],\n    });\n  });\n\n  it('errors when a custom library target turns scope hoisting off', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let fixture = path.join(__dirname, 'fixtures/library-custom-scopehoist');\n    let code = await fs.readFile(path.join(fixture, 'package.json'), 'utf8');\n\n    // $FlowFixMe\n    await assert.rejects(() => targetResolver.resolve(fixture), {\n      diagnostics: [\n        {\n          message: 'Scope hoisting cannot be disabled for library targets.',\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: path.join(fixture, 'package.json'),\n              language: 'json',\n              code,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  end: {\n                    column: 25,\n                    line: 6,\n                  },\n                  start: {\n                    column: 21,\n                    line: 6,\n                  },\n                },\n                {\n                  message: undefined,\n                  end: {\n                    column: 23,\n                    line: 5,\n                  },\n                  start: {\n                    column: 20,\n                    line: 5,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: ['Either remove the \"scopeHoist\" or \"isLibrary\" option.'],\n          documentationURL:\n            'https://parceljs.org/features/targets/#library-targets',\n        },\n      ],\n    });\n  });\n\n  it('should infer output format for custom targets by extension', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let fixture = path.join(__dirname, 'fixtures/custom-format-infer-ext');\n\n    assert.deepEqual(await targetResolver.resolve(fixture), [\n      {\n        name: 'test',\n        distDir: relative(path.join(fixture, 'dist')),\n        distEntry: 'index.mjs',\n        publicUrl: '/',\n        env: {\n          id: '439701173a9199ea',\n          context: 'browser',\n          engines: {\n            browsers: [\n              'last 1 Chrome version',\n              'last 1 Safari version',\n              'last 1 Firefox version',\n              'last 1 Edge version',\n            ],\n          },\n          includeNodeModules: true,\n          outputFormat: 'esmodule',\n          isLibrary: false,\n          shouldOptimize: false,\n          shouldScopeHoist: false,\n          sourceMap: {},\n          loc: undefined,\n          sourceType: 'module',\n        },\n        loc: {\n          filePath: relative(path.join(fixture, 'package.json')),\n          start: {\n            column: 11,\n            line: 2,\n          },\n          end: {\n            column: 27,\n            line: 2,\n          },\n        },\n      },\n    ]);\n  });\n\n  it('should infer output format for custom targets by \"type\": \"module\" field', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let fixture = path.join(__dirname, 'fixtures/custom-format-infer-type');\n\n    assert.deepEqual(await targetResolver.resolve(fixture), [\n      {\n        name: 'test',\n        distDir: relative(path.join(fixture, 'dist')),\n        distEntry: 'index.js',\n        publicUrl: '/',\n        env: {\n          id: '439701173a9199ea',\n          context: 'browser',\n          engines: {\n            browsers: [\n              'last 1 Chrome version',\n              'last 1 Safari version',\n              'last 1 Firefox version',\n              'last 1 Edge version',\n            ],\n          },\n          includeNodeModules: true,\n          outputFormat: 'esmodule',\n          isLibrary: false,\n          shouldOptimize: false,\n          shouldScopeHoist: false,\n          sourceMap: {},\n          loc: undefined,\n          sourceType: 'module',\n        },\n        loc: {\n          filePath: relative(path.join(fixture, 'package.json')),\n          start: {\n            column: 11,\n            line: 3,\n          },\n          end: {\n            column: 26,\n            line: 3,\n          },\n        },\n      },\n    ]);\n  });\n\n  it('resolves a subset of package.json targets when given a list of names', async () => {\n    let targetResolver = new TargetResolver(api, {\n      ...DEFAULT_OPTIONS,\n      targets: ['main', 'browser'],\n    });\n\n    assert.deepEqual(\n      await targetResolver.resolve(COMMON_TARGETS_FIXTURE_PATH),\n      [\n        {\n          name: 'main',\n          distDir: 'fixtures/common-targets/dist/main',\n          distEntry: 'index.js',\n          publicUrl: '/',\n          env: {\n            id: 'b552bd32da37fa8b',\n            context: 'node',\n            engines: {\n              node: '>= 8.0.0',\n            },\n            includeNodeModules: false,\n            outputFormat: 'commonjs',\n            isLibrary: true,\n            shouldOptimize: false,\n            shouldScopeHoist: true,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(COMMON_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 11,\n              line: 2,\n            },\n            end: {\n              column: 31,\n              line: 2,\n            },\n          },\n        },\n        {\n          name: 'browser',\n          distDir: 'fixtures/common-targets/dist/browser',\n          distEntry: 'index.js',\n          publicUrl: '/assets',\n          env: {\n            id: 'a7ed3e73c53f1923',\n            context: 'browser',\n            engines: {\n              browsers: ['last 1 version'],\n            },\n            includeNodeModules: false,\n            outputFormat: 'commonjs',\n            isLibrary: true,\n            shouldOptimize: false,\n            shouldScopeHoist: true,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(COMMON_TARGETS_FIXTURE_PATH, 'package.json'),\n            ),\n            start: {\n              column: 14,\n              line: 4,\n            },\n            end: {\n              column: 37,\n              line: 4,\n            },\n          },\n        },\n      ],\n    );\n  });\n\n  it('generates a default target in serve mode', async () => {\n    let serveDistDir = path.join(DEFAULT_OPTIONS.cacheDir, 'dist');\n\n    let targetResolver = new TargetResolver(api, {\n      ...DEFAULT_OPTIONS,\n      serveOptions: {distDir: serveDistDir, port: 1234},\n    });\n\n    assert.deepEqual(\n      await targetResolver.resolve(\n        path.join(__dirname, 'fixtures/default-serve'),\n      ),\n      [\n        {\n          name: 'default',\n          distDir: '.parcel-cache/dist',\n          publicUrl: '/',\n          env: {\n            id: 'd6ea1d42532a7575',\n            context: 'browser',\n            engines: {\n              browsers: [\n                'last 1 Chrome version',\n                'last 1 Safari version',\n                'last 1 Firefox version',\n                'last 1 Edge version',\n              ],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n        },\n      ],\n    );\n  });\n\n  it('generates the correct distDir with no explicit targets', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n\n    assert.deepEqual(\n      await targetResolver.resolve(DEFAULT_DISTPATH_FIXTURE_PATHS.none),\n      [\n        {\n          name: 'default',\n          distDir: relative(\n            path.join(DEFAULT_DISTPATH_FIXTURE_PATHS.none, 'dist'),\n          ),\n          publicUrl: '/',\n          env: {\n            id: 'a9c07d094d038c73',\n            context: 'browser',\n            engines: {\n              browsers: ['Chrome 80'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n        },\n      ],\n    );\n  });\n\n  it('generates the correct distDir with one explicit target', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n\n    assert.deepEqual(\n      await targetResolver.resolve(DEFAULT_DISTPATH_FIXTURE_PATHS.one),\n      [\n        {\n          name: 'browserModern',\n          distDir: relative(\n            path.join(DEFAULT_DISTPATH_FIXTURE_PATHS.one, 'dist'),\n          ),\n          distEntry: undefined,\n          publicUrl: '/',\n          env: {\n            id: 'a9c07d094d038c73',\n            context: 'browser',\n            engines: {\n              browsers: ['Chrome 80'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(DEFAULT_DISTPATH_FIXTURE_PATHS.one, 'package.json'),\n            ),\n            start: {\n              line: 3,\n              column: 5,\n            },\n            end: {\n              line: 3,\n              column: 20,\n            },\n          },\n        },\n      ],\n    );\n  });\n\n  it('generates the correct distDirs with two explicit targets', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n\n    assert.deepEqual(\n      await targetResolver.resolve(DEFAULT_DISTPATH_FIXTURE_PATHS.two),\n      [\n        {\n          name: 'browserModern',\n          distDir: relative(\n            path.join(\n              DEFAULT_DISTPATH_FIXTURE_PATHS.two,\n              'dist',\n              'browserModern',\n            ),\n          ),\n          distEntry: undefined,\n          publicUrl: '/',\n          env: {\n            id: '1f28e9ceaf633d83',\n            context: 'browser',\n            engines: {\n              browsers: ['last 1 version'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(DEFAULT_DISTPATH_FIXTURE_PATHS.two, 'package.json'),\n            ),\n            start: {\n              line: 3,\n              column: 5,\n            },\n            end: {\n              line: 3,\n              column: 20,\n            },\n          },\n        },\n        {\n          name: 'browserLegacy',\n          distDir: relative(\n            path.join(\n              DEFAULT_DISTPATH_FIXTURE_PATHS.two,\n              'dist',\n              'browserLegacy',\n            ),\n          ),\n          distEntry: undefined,\n          publicUrl: '/',\n          env: {\n            id: '824e113c03cab3c8',\n            context: 'browser',\n            engines: {\n              browsers: ['IE 11'],\n            },\n            includeNodeModules: true,\n            outputFormat: 'global',\n            isLibrary: false,\n            shouldOptimize: false,\n            shouldScopeHoist: false,\n            sourceMap: {},\n            loc: undefined,\n            sourceType: 'module',\n          },\n          loc: {\n            filePath: relative(\n              path.join(DEFAULT_DISTPATH_FIXTURE_PATHS.two, 'package.json'),\n            ),\n            start: {\n              line: 10,\n              column: 5,\n            },\n            end: {\n              line: 10,\n              column: 20,\n            },\n          },\n        },\n      ],\n    );\n  });\n\n  it('rejects invalid or unknown fields', async () => {\n    let code =\n      '{\\n' +\n      '\\t\"targets\": {\\n' +\n      '\\t\\t\"main\": {\\n' +\n      '\\t\\t\\t\"includeNodeModules\": [\\n' +\n      '\\t\\t\\t\\t\"react\",\\n' +\n      '\\t\\t\\t\\ttrue\\n' +\n      '\\t\\t\\t],\\n' +\n      '\\t\\t\\t\"context\": \"nodes\",\\n' +\n      '\\t\\t\\t\"outputFormat\": \"module\",\\n' +\n      '\\t\\t\\t\"sourceMap\": {\\n' +\n      '\\t\\t\\t\\t\"sourceRoot\": \"asd\",\\n' +\n      '\\t\\t\\t\\t\"inline\": \"false\",\\n' +\n      '\\t\\t\\t\\t\"verbose\": true\\n' +\n      '\\t\\t\\t},\\n' +\n      '\\t\\t\\t\"engines\": {\\n' +\n      '\\t\\t\\t\\t\"node\": \"12\",\\n' +\n      '\\t\\t\\t\\t\"browser\": \"Chrome 70\"\\n' +\n      '\\t\\t\\t}\\n' +\n      '\\t\\t}\\n' +\n      '\\t}\\n' +\n      '}';\n    let targetResolver = new TargetResolver(api, {\n      ...DEFAULT_OPTIONS,\n      ...JSON.parse(code),\n    });\n\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(\n      () => targetResolver.resolve(COMMON_TARGETS_FIXTURE_PATH),\n      {\n        message: 'Invalid target descriptor for target \"main\"',\n        diagnostics: [\n          {\n            message: 'Invalid target descriptor for target \"main\"',\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: undefined,\n                language: 'json',\n                code,\n                codeHighlights: [\n                  {\n                    start: {line: 6, column: 5},\n                    end: {line: 6, column: 8},\n                    message: 'Expected a wildcard or filepath',\n                  },\n                  {\n                    start: {line: 8, column: 15},\n                    end: {line: 8, column: 21},\n                    message: 'Did you mean \"node\"?',\n                  },\n                  {\n                    start: {line: 9, column: 20},\n                    end: {line: 9, column: 27},\n                    message: 'Did you mean \"esmodule\"?',\n                  },\n                  {\n                    start: {line: 12, column: 15},\n                    end: {line: 12, column: 21},\n                    message: 'Expected type boolean',\n                  },\n                  {\n                    start: {line: 13, column: 5},\n                    end: {line: 13, column: 13},\n                    message: 'Possible values: \"inlineSources\"',\n                  },\n                  {\n                    start: {line: 17, column: 5},\n                    end: {line: 17, column: 13},\n                    message: 'Did you mean \"browsers\"?',\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n\n  it('rejects invalid or unknown fields in package.json', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let code = await fs.readFileSync(\n      path.join(INVALID_TARGETS_FIXTURE_PATH, 'package.json'),\n      'utf8',\n    );\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(\n      () => targetResolver.resolve(INVALID_TARGETS_FIXTURE_PATH),\n      {\n        diagnostics: [\n          {\n            message: 'Invalid target descriptor for target \"module\"',\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: path.join(\n                  INVALID_TARGETS_FIXTURE_PATH,\n                  'package.json',\n                ),\n                language: 'json',\n                code,\n                codeHighlights: [\n                  {\n                    start: {line: 9, column: 29},\n                    end: {line: 9, column: 35},\n                    message: 'Expected type boolean',\n                  },\n                  {\n                    start: {line: 11, column: 7},\n                    end: {line: 11, column: 17},\n                    message: 'Did you mean \"publicUrl\"?',\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n\n  it('rejects invalid engines in package.json', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let code = await fs.readFileSync(\n      path.join(INVALID_ENGINES_FIXTURE_PATH, 'package.json'),\n      'utf8',\n    );\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(\n      () => targetResolver.resolve(INVALID_ENGINES_FIXTURE_PATH),\n      {\n        diagnostics: [\n          {\n            message: 'Invalid engines in package.json',\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: path.join(\n                  INVALID_ENGINES_FIXTURE_PATH,\n                  'package.json',\n                ),\n                language: 'json',\n                code,\n                codeHighlights: [\n                  {\n                    end: {\n                      column: 13,\n                      line: 8,\n                    },\n                    message: 'Did you mean \"browsers\"?',\n                    start: {\n                      column: 5,\n                      line: 8,\n                    },\n                  },\n                  {\n                    end: {\n                      column: 5,\n                      line: 7,\n                    },\n                    message: 'Expected type string',\n                    start: {\n                      column: 13,\n                      line: 5,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n\n  it('rejects target distpath in package.json', async () => {\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let code = await fs.readFileSync(\n      path.join(INVALID_DISTPATH_FIXTURE_PATH, 'package.json'),\n      'utf8',\n    );\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(\n      () => targetResolver.resolve(INVALID_DISTPATH_FIXTURE_PATH),\n      {\n        diagnostics: [\n          {\n            message: 'Invalid distPath for target \"legacy\"',\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: path.join(\n                  INVALID_DISTPATH_FIXTURE_PATH,\n                  'package.json',\n                ),\n                language: 'json',\n                code,\n                codeHighlights: [\n                  {\n                    end: {\n                      column: 13,\n                      line: 2,\n                    },\n                    message: 'Expected type string',\n                    start: {\n                      column: 13,\n                      line: 2,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n\n  it('rejects duplicate target paths', async () => {\n    let fixture = path.join(__dirname, 'fixtures/duplicate-targets');\n    let targetResolver = new TargetResolver(api, DEFAULT_OPTIONS);\n    let code = await fs.readFileSync(\n      path.join(fixture, 'package.json'),\n      'utf8',\n    );\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(() => targetResolver.resolve(fixture), {\n      diagnostics: [\n        {\n          message: md`Multiple targets have the same destination path \"${path.normalize(\n            'dist/index.js',\n          )}\"`,\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: path.join(fixture, 'package.json'),\n              language: 'json',\n              code,\n              codeHighlights: [\n                {\n                  end: {\n                    column: 25,\n                    line: 2,\n                  },\n                  message: undefined,\n                  start: {\n                    column: 11,\n                    line: 2,\n                  },\n                },\n                {\n                  end: {\n                    column: 27,\n                    line: 3,\n                  },\n                  message: undefined,\n                  start: {\n                    column: 13,\n                    line: 3,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: [\n            'Try removing the duplicate targets, or changing the destination paths.',\n          ],\n        },\n      ],\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/fixtures/.gitignore",
    "content": "!node_modules\n"
  },
  {
    "path": "packages/core/core/test/fixtures/application-targets/package.json",
    "content": "{\n  \"main\": \"dist/index.html\"\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/bundle.js",
    "content": "// package intro\n// module intro\nrequire('./module-a.js');\nrequire('./module-b.js');\n// module outro\n\n// module intro\nconsole.log('hi'); // eslint-disable-line no-console\n// module outro\n// package outro\n"
  },
  {
    "path": "packages/core/core/test/fixtures/common-targets/package.json",
    "content": "{\n  \"main\": \"dist/main/index.js\",\n  \"module\": \"dist/module/index.js\",\n  \"browser\": \"dist/browser/index.js\",\n  \"engines\": {\n    \"node\": \">= 8.0.0\"\n  },\n  \"targets\": {\n    \"module\": {\n      \"engines\": {\n        \"browsers\": [\"last 1 version\"]\n      },\n      \"sourceMap\": {\n        \"inlineSources\": true\n      }\n    },\n    \"browser\": {\n      \"engines\": {\n        \"browsers\": [\"last 1 version\"]\n      },\n      \"publicUrl\": \"/assets\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/common-targets-ignore/package.json",
    "content": "{\n  \"main\": \"server.js\",\n  \"app\": \"dist/index.js\",\n  \"engines\": {\n    \"node\": \">= 8.0.0\"\n  },\n  \"targets\": {\n    \"main\": false,\n    \"app\": {\n      \"sourceMap\": false\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/config/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.js\": [\"parcel-transformer-base\", \"...\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/config/subfolder/.parcelrc",
    "content": "{\n  \"extends\": \"../.parcelrc\",\n  \"transformers\": {\n    \"*.js\": [\"parcel-transformer-sub\", \"...\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/config-extends-not-found/.parcelrc",
    "content": "{\n  \"extends\": \"./.parclrc-node-modules\"\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/config-extends-not-found/.parcelrc-json5",
    "content": "{\n  extends: \"./.parclrc-node-modules\"\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/config-extends-not-found/.parcelrc-multiple",
    "content": "{\n  \"extends\": [\"@parcel/config-deflt\", \"./.parclrc\"]\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/config-extends-not-found/.parcelrc-node-modules",
    "content": "{\n  \"extends\": \"@parcel/config-deflt\"\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/config-malformed/.parcelrc",
    "content": "{\n  \"extends\": bar\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/config-node-pipeline/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"node:*.js\": [\"@parcel/transformer-js\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/config-plugin-not-found/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.js\": [\"@parcel/transformer-jj\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/context/package.json",
    "content": "{\n  \"main\": \"dist/main/index.js\",\n  \"targets\": {\n    \"main\": {\n      \"context\": \"node\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/custom-format-infer-ext/package.json",
    "content": "{\n  \"test\": \"dist/index.mjs\",\n  \"targets\": {\n    \"test\": {}\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/custom-format-infer-type/package.json",
    "content": "{\n  \"type\": \"module\",\n  \"test\": \"dist/index.js\",\n  \"targets\": {\n    \"test\": {}\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/custom-format-mismatch/package.json",
    "content": "{\n  \"test\": \"dist/index.mjs\",\n  \"targets\": {\n    \"test\": {\n      \"outputFormat\": \"commonjs\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/custom-targets/package.json",
    "content": "{\n  \"main\": \"dist/main/index.js\",\n  \"browserModern\": \"dist/browserModern/index.js\",\n  \"browserLegacy\": \"dist/browserLegacy/index.js\",\n  \"engines\": {\n    \"node\": \">= 8.0.0\"\n  },\n  \"targets\": {\n    \"browserModern\": {\n      \"engines\": {\n        \"browsers\": [\"last 1 version\"]\n      }\n    },\n    \"browserLegacy\": {\n      \"engines\": {\n        \"browsers\": [\"ie11\"]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/custom-targets-distdir/package.json",
    "content": "{\n  \"targets\": {\n    \"app\": {\n      \"engines\": {\n        \"browsers\": \"> 0.25%\"\n      },\n      \"distDir\": \"www\",\n      \"publicUrl\": \"www\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/default-serve/package.json",
    "content": "{\n  \"foo\": \"dist/foo/index.js\",\n  \"bar\": \"dist/browser/index.js\",\n  \"engines\": {\n    \"node\": \">= 8.0.0\"\n  },\n  \"targets\": {\n    \"foo\": {\n      \"engines\": {\n        \"browsers\": [\"last 1 version\"]\n      },\n      \"sourceMap\": {\n        \"inlineSources\": true\n      }\n    },\n    \"bar\": {\n      \"engines\": {\n        \"browsers\": [\"last 1 version\"]\n      },\n      \"publicUrl\": \"/assets\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/duplicate-targets/package.json",
    "content": "{\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.js\"\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/glob-like/[entry].js",
    "content": ""
  },
  {
    "path": "packages/core/core/test/fixtures/invalid-distpath/package.json",
    "content": "{\n  \"legacy\": 2,\n  \"engines\": {\n    \"node\": \">= 8.0.0\"\n  },\n  \"targets\": {\n    \"legacy\": {\n      \"outputFormat\": \"global\"\n    }\n  }\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/invalid-engines/package.json",
    "content": "{\n  \"main\": \"dist/main/index.js\",\n  \"module\": \"dist/module/index.js\",\n  \"engines\": {\n    \"node\": [\n      \">= 8.0.0\"\n    ],\n    \"browser\": [\n      \"Chrome 70\"\n    ]\n  }\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/invalid-source-missing/package.json",
    "content": "{\n  \"main\": \"dist/main/index.js\",\n  \"module\": \"dist/module/index.js\",\n  \"source\": \"missing.js\"\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/invalid-source-not-file/package.json",
    "content": "{\n  \"main\": \"dist/main/index.js\",\n  \"module\": \"dist/module/index.js\",\n  \"source\": \"src\"\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/invalid-source-not-file/src/index.js",
    "content": "// empty"
  },
  {
    "path": "packages/core/core/test/fixtures/invalid-target-source-missing/package.json",
    "content": "{\n  \"main\": \"dist/main/index.js\",\n  \"module\": \"dist/module/index.js\",\n  \"targets\": {\n    \"a\": {\n      \"source\": \"missing.js\"\n    }\n  }\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/invalid-target-source-not-file/package.json",
    "content": "{\n  \"main\": \"dist/main/index.js\",\n  \"module\": \"dist/module/index.js\",\n  \"targets\": {\n    \"a\": {\n      \"source\": \"src\"\n    }\n  }\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/invalid-target-source-not-file/src/index.js",
    "content": "// empty"
  },
  {
    "path": "packages/core/core/test/fixtures/invalid-targets/package.json",
    "content": "{\n  \"main\": \"dist/main/index.js\",\n  \"module\": \"dist/module/index.js\",\n  \"engines\": {\n    \"node\": \">= 8.0.0\"\n  },\n  \"targets\": {\n    \"module\": {\n      \"includeNodeModules\": \"react\",\n      \"outputFormat\": \"esmodule\",\n      \"publicURL\": \"dist\",\n      \"engines\": {\n        \"browsers\": [\n          \"Chrome 70\"\n        ]\n      }\n    }\n  }\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/library-custom-scopehoist/package.json",
    "content": "{\n  \"test\": \"dist/index.js\",\n  \"targets\": {\n    \"test\": {\n      \"isLibrary\": true,\n      \"scopeHoist\": false\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/library-scopehoist/package.json",
    "content": "{\n  \"main\": \"dist/index.js\",\n  \"targets\": {\n    \"main\": {\n      \"scopeHoist\": false\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/local-plugin-config-pkg/.parcelrc",
    "content": "{\n  \"extends\": \"parcel-config-local\"\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/local-plugin-config-pkg/node_modules/parcel-config-local/index.json",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.js\": [\n      \"./local-plugin\"\n    ]\n  }\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/local-plugin-config-pkg/node_modules/parcel-config-local/local-plugin.js",
    "content": "const {Transformer} = require('@parcel/plugin');\n\nmodule.exports = new Transformer({\n  transform(asset) {\n    return [asset];\n  }\n});\n"
  },
  {
    "path": "packages/core/core/test/fixtures/local-plugin-config-pkg/node_modules/parcel-config-local/package.json",
    "content": "{\n  \"name\": \"parcel-config-local\",\n  \"version\": \"1.0.0\",\n  \"engines\": {\n    \"parcel\": \"2.x\"\n  }\n}"
  },
  {
    "path": "packages/core/core/test/fixtures/main-format-mismatch/package.json",
    "content": "{\n  \"main\": \"dist/index.cjs\",\n  \"targets\": {\n    \"main\": {\n      \"outputFormat\": \"esmodule\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/main-global/package.json",
    "content": "{\n  \"main\": \"dist/index.js\",\n  \"targets\": {\n    \"main\": {\n      \"outputFormat\": \"global\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/main-mjs/package.json",
    "content": "{\n  \"main\": \"dist/index.js\",\n  \"targets\": {\n    \"main\": {\n      \"outputFormat\": \"esmodule\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/module-a.js",
    "content": "require('./module-b.js');\n"
  },
  {
    "path": "packages/core/core/test/fixtures/module-b.js",
    "content": "console.log('hi'); // eslint-disable-line no-console\n"
  },
  {
    "path": "packages/core/core/test/fixtures/parcel/index.js",
    "content": "export default 'test';\n"
  },
  {
    "path": "packages/core/core/test/fixtures/parcel/other.js",
    "content": "import * as idx from './index.js';\nnew URL('index.js', import.meta.url);\nimport('index.js')\n"
  },
  {
    "path": "packages/core/core/test/fixtures/parcel/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/plugins/local-plugin.js",
    "content": "const {Transformer} = require('@parcel/plugin');\n\nmodule.exports = new Transformer({\n  transform(asset) {\n    return [asset];\n  }\n});\n"
  },
  {
    "path": "packages/core/core/test/fixtures/plugins/node_modules/parcel-transformer-bad-engines/index.js",
    "content": "const {Transformer} = require('@parcel/plugin');\n\nmodule.exports = new Transformer({\n  transform(asset) {\n    return [asset];\n  }\n});\n"
  },
  {
    "path": "packages/core/core/test/fixtures/plugins/node_modules/parcel-transformer-bad-engines/package.json",
    "content": "{\n  \"name\": \"parcel-transformer-bad-engines\",\n  \"version\": \"1.0.0\",\n  \"engines\": {\n    \"parcel\": \"5.x\"\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/plugins/node_modules/parcel-transformer-no-engines/index.js",
    "content": "const {Transformer} = require('@parcel/plugin');\n\nmodule.exports = new Transformer({\n  transform(asset) {\n    return [asset];\n  }\n});\n"
  },
  {
    "path": "packages/core/core/test/fixtures/plugins/node_modules/parcel-transformer-no-engines/package.json",
    "content": "{\n  \"name\": \"parcel-transformer-no-engines\",\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/targets-default-distdir-none/package.json",
    "content": "{\n    \"browserslist\": [\n        \"Chrome 80\"\n    ]\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/targets-default-distdir-one/package.json",
    "content": "{\n  \"targets\": {\n    \"browserModern\": {}\n  },\n  \"browserslist\": [\n    \"Chrome 80\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/core/test/fixtures/targets-default-distdir-two/package.json",
    "content": "{\n  \"targets\": {\n    \"browserModern\": {\n      \"engines\": {\n        \"browsers\": [\n          \"last 1 version\"\n        ]\n      }\n    },\n    \"browserLegacy\": {\n      \"engines\": {\n        \"browsers\": [\n          \"IE 11\"\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/core/test/requests/ConfigRequest.test.js",
    "content": "// @flow strict-local\n\nimport WorkerFarm from '@parcel/workers';\nimport path from 'path';\nimport assert from 'assert';\nimport sinon from 'sinon';\nimport {MemoryFS} from '@parcel/fs';\nimport {hashString} from '@parcel/rust';\n\nimport type {\n  ConfigRequest,\n  ConfigRequestResult,\n} from '../../src/requests/ConfigRequest';\nimport type {RunAPI} from '../../src/RequestTracker';\nimport {runConfigRequest} from '../../src/requests/ConfigRequest';\nimport {toProjectPath} from '../../src/projectPath';\n\n// $FlowFixMe unclear-type forgive me\nconst mockCast = (f: any): any => f;\n\ndescribe('ConfigRequest tests', () => {\n  const projectRoot = 'project_root';\n  const farm = new WorkerFarm({\n    workerPath: require.resolve('../../src/worker.js'),\n    maxConcurrentWorkers: 1,\n  });\n  let fs = new MemoryFS(farm);\n  beforeEach(() => {\n    fs = new MemoryFS(farm);\n  });\n\n  const getMockRunApi = (\n    options: mixed = {projectRoot, inputFS: fs},\n  ): RunAPI<ConfigRequestResult> => {\n    const mockRunApi = {\n      storeResult: sinon.spy(),\n      canSkipSubrequest: sinon.spy(),\n      invalidateOnFileCreate: sinon.spy(),\n      getInvalidSubRequests: sinon.spy(),\n      getInvalidations: sinon.spy(),\n      getPreviousResult: sinon.spy(),\n      getRequestResult: sinon.spy(),\n      getSubRequests: sinon.spy(),\n      invalidateOnBuild: sinon.spy(),\n      invalidateOnConfigKeyChange: sinon.spy(),\n      invalidateOnEnvChange: sinon.spy(),\n      invalidateOnFileDelete: sinon.spy(),\n      invalidateOnFileUpdate: sinon.spy(),\n      invalidateOnOptionChange: sinon.spy(),\n      invalidateOnStartup: sinon.spy(),\n      runRequest: sinon.spy(request => {\n        return request.run({\n          api: mockRunApi,\n          options,\n        });\n      }),\n    };\n    return mockRunApi;\n  };\n\n  const baseRequest: ConfigRequest = {\n    id: 'config_request_test',\n    invalidateOnBuild: false,\n    invalidateOnConfigKeyChange: [],\n    invalidateOnFileCreate: [],\n    invalidateOnEnvChange: new Set(),\n    invalidateOnOptionChange: new Set(),\n    invalidateOnStartup: false,\n    invalidateOnFileChange: new Set(),\n  };\n\n  it('can execute a config request', async () => {\n    const mockRunApi = getMockRunApi();\n    await runConfigRequest(mockRunApi, {\n      ...baseRequest,\n    });\n  });\n\n  it('forwards \"invalidateOnFileChange\" calls to runAPI', async () => {\n    const mockRunApi = getMockRunApi();\n    await runConfigRequest(mockRunApi, {\n      ...baseRequest,\n      invalidateOnFileChange: new Set([\n        toProjectPath(projectRoot, 'path1'),\n        toProjectPath(projectRoot, 'path2'),\n      ]),\n    });\n\n    assert(\n      mockCast(mockRunApi.invalidateOnFileUpdate).called,\n      'Invalidate was called',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnFileUpdate).calledWith('path1'),\n      'Invalidate was called with path1',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnFileUpdate).calledWith('path2'),\n      'Invalidate was called with path2',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnFileDelete).calledWith('path1'),\n      'Invalidate was called with path1',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnFileDelete).calledWith('path2'),\n      'Invalidate was called with path2',\n    );\n  });\n\n  it('forwards \"invalidateOnFileCreate\" calls to runAPI', async () => {\n    const mockRunApi = getMockRunApi();\n    await runConfigRequest(mockRunApi, {\n      ...baseRequest,\n      invalidateOnFileCreate: [\n        {filePath: toProjectPath(projectRoot, 'filePath')},\n        {glob: toProjectPath(projectRoot, 'glob')},\n        {\n          fileName: 'package.json',\n          aboveFilePath: toProjectPath(projectRoot, 'fileAbove'),\n        },\n      ],\n    });\n\n    assert(\n      mockCast(mockRunApi.invalidateOnFileCreate).called,\n      'Invalidate was called',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnFileCreate).calledWithMatch({\n        filePath: 'filePath',\n      }),\n      'Invalidate was called for path',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnFileCreate).calledWithMatch({\n        glob: 'glob',\n      }),\n      'Invalidate was called for glob',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnFileCreate).calledWithMatch({\n        fileName: 'package.json',\n        aboveFilePath: 'fileAbove',\n      }),\n      'Invalidate was called for fileAbove',\n    );\n  });\n\n  it('forwards \"invalidateOnEnvChange\" calls to runAPI', async () => {\n    const mockRunApi = getMockRunApi();\n    await runConfigRequest(mockRunApi, {\n      ...baseRequest,\n      invalidateOnEnvChange: new Set(['env1', 'env2']),\n    });\n\n    assert(\n      mockCast(mockRunApi.invalidateOnEnvChange).called,\n      'Invalidate was called',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnEnvChange).calledWithMatch('env1'),\n      'Invalidate was called for env1',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnEnvChange).calledWithMatch('env2'),\n      'Invalidate was called for env1',\n    );\n  });\n\n  it('forwards \"invalidateOnOptionChange\" calls to runAPI', async () => {\n    const mockRunApi = getMockRunApi();\n    await runConfigRequest(mockRunApi, {\n      ...baseRequest,\n      invalidateOnOptionChange: new Set(['option1', 'option2']),\n    });\n\n    assert(\n      mockCast(mockRunApi.invalidateOnOptionChange).called,\n      'Invalidate was called',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnOptionChange).calledWithMatch('option1'),\n      'Invalidate was called for option1',\n    );\n    assert(\n      mockCast(mockRunApi.invalidateOnOptionChange).calledWithMatch('option2'),\n      'Invalidate was called for option2',\n    );\n  });\n\n  it('forwards \"invalidateOnStartup\" calls to runAPI', async () => {\n    const mockRunApi = getMockRunApi();\n    await runConfigRequest(mockRunApi, {\n      ...baseRequest,\n      invalidateOnStartup: true,\n    });\n\n    assert(\n      mockCast(mockRunApi.invalidateOnStartup).called,\n      'Invalidate was called',\n    );\n  });\n\n  it('forwards \"invalidateOnBuild\" calls to runAPI', async () => {\n    const mockRunApi = getMockRunApi();\n    await runConfigRequest(mockRunApi, {\n      ...baseRequest,\n      invalidateOnBuild: true,\n    });\n\n    assert(\n      mockCast(mockRunApi.invalidateOnBuild).called,\n      'Invalidate was called',\n    );\n  });\n\n  it('forwards \"invalidateOnConfigKeyChange\" calls to runAPI', async () => {\n    await fs.mkdirp('/project_root');\n    await fs.writeFile(\n      '/project_root/config.json',\n      JSON.stringify({key1: 'value1'}),\n    );\n    sinon.spy(fs, 'readFile');\n    sinon.spy(fs, 'readFileSync');\n    const mockRunApi = getMockRunApi();\n    await runConfigRequest(mockRunApi, {\n      ...baseRequest,\n      invalidateOnConfigKeyChange: [\n        {\n          configKey: 'key1',\n          filePath: toProjectPath(\n            projectRoot,\n            path.join('project_root', 'config.json'),\n          ),\n        },\n      ],\n    });\n\n    const fsCall = mockCast(fs).readFile.getCall(0);\n    assert.deepEqual(\n      fsCall?.args,\n      [path.join('project_root', 'config.json'), 'utf8'],\n      'readFile was called',\n    );\n\n    const call = mockCast(mockRunApi.invalidateOnConfigKeyChange).getCall(0);\n    assert.deepEqual(\n      call.args,\n      ['config.json', 'key1', hashString('\"value1\"')],\n      'Invalidate was called for key1',\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/requests/DevDepRequest.test.js",
    "content": "// @flow strict-local\n\n// eslint-disable-next-line @parcel/no-self-package-imports\nimport {clearBuildCaches} from '@parcel/core/src/buildCache';\nimport {resolveDevDepRequestRef} from '../../src/requests/DevDepRequest';\nimport type {DevDepRequest, DevDepRequestRef} from '../../src/types';\nimport {toProjectPath} from '../../src/projectPath';\nimport assert from 'assert';\n\ndescribe('DevDepRequest', () => {\n  beforeEach(() => {\n    clearBuildCaches();\n  });\n\n  describe('resolveDevDepRequestRef', () => {\n    it('will return requests as is', () => {\n      const request: DevDepRequest = {\n        specifier: 'test',\n        hash: 'hash',\n        invalidateOnFileChange: new Set(),\n        invalidateOnFileCreate: [],\n        invalidateOnStartup: false,\n        resolveFrom: toProjectPath('', 'path.js'),\n      };\n      const result = resolveDevDepRequestRef(request);\n      assert.equal(result, request);\n    });\n\n    it('will return cached requests for refs', () => {\n      const request: DevDepRequest = {\n        specifier: 'test',\n        hash: 'hash',\n        invalidateOnFileChange: new Set(),\n        invalidateOnFileCreate: [],\n        invalidateOnStartup: false,\n        resolveFrom: toProjectPath('', 'path.js'),\n      };\n      resolveDevDepRequestRef(request);\n\n      const devDepRequestRef: DevDepRequestRef = {\n        type: 'ref',\n        specifier: 'test',\n        hash: 'hash',\n        resolveFrom: toProjectPath('', 'path.js'),\n      };\n      const result = resolveDevDepRequestRef(devDepRequestRef);\n      assert.equal(result, request);\n    });\n\n    it('will throw for uncached refs', () => {\n      const devDepRequestRef: DevDepRequestRef = {\n        type: 'ref',\n        specifier: 'test',\n        hash: 'hash',\n        resolveFrom: toProjectPath('', 'path.js'),\n      };\n      assert.throws(() => {\n        resolveDevDepRequestRef(devDepRequestRef);\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/serializer.test.js",
    "content": "// @flow\nimport {\n  serialize,\n  deserialize,\n  registerSerializableClass,\n  unregisterSerializableClass,\n} from '../src/serializer';\nimport assert from 'assert';\nimport sinon from 'sinon';\n\ndescribe('serializer', () => {\n  it('should serialize a basic object', () => {\n    let serialized = serialize({foo: 2, bar: 3});\n    assert(Buffer.isBuffer(serialized));\n    let deserialized = deserialize(serialized);\n    assert.equal(typeof deserialized, 'object');\n    assert.deepEqual(deserialized, {foo: 2, bar: 3});\n  });\n\n  it('should serialize an object with multiple references', () => {\n    let a = {foo: 2};\n    let b = {bar: a, baz: a};\n    let res = deserialize(serialize(b));\n    assert.deepEqual(res, b);\n    assert.equal(res.bar, res.baz);\n  });\n\n  it('should serialize a cyclic object', () => {\n    let a = {foo: 2, bar: {}};\n    a.bar = a;\n    let res = deserialize(serialize(a));\n    assert.deepEqual(res, a);\n    assert.equal(res.bar, res);\n    assert.equal(a.bar, a);\n  });\n\n  it('should serialize a Map', () => {\n    let a = new Map([[2, 3]]);\n    let res = deserialize(serialize(a));\n    assert(res instanceof Map);\n    assert.equal(res.get(2), 3);\n  });\n\n  it('should serialize a Set', () => {\n    let a = new Set([2, 3]);\n    let res = deserialize(serialize(a));\n    assert(res instanceof Set);\n    assert(res.has(2));\n    assert(res.has(3));\n  });\n\n  it('should serialize a class', () => {\n    class Test {\n      x: number;\n      constructor(x: number) {\n        this.x = x;\n      }\n    }\n\n    registerSerializableClass('Test', Test);\n\n    let x = new Test(2);\n    let res = deserialize(serialize(x));\n    assert(res instanceof Test);\n    assert.equal(res.x, x.x);\n\n    unregisterSerializableClass('Test', Test);\n  });\n\n  it('should serialize a class with a custom serialize method', () => {\n    class Test {\n      x: number;\n      constructor(x: number) {\n        this.x = x;\n      }\n\n      serialize() {\n        return {\n          x: this.x,\n          serialized: true,\n        };\n      }\n    }\n\n    registerSerializableClass('Test', Test);\n\n    let x = new Test(2);\n    let res = deserialize(serialize(x));\n    assert(res instanceof Test);\n    assert.equal(res.x, x.x);\n    assert.equal(res.serialized, true);\n\n    unregisterSerializableClass('Test', Test);\n  });\n\n  it('should serialize a class with a custom deserialize method', () => {\n    class Test {\n      x: number;\n      constructor(x: number) {\n        this.x = x;\n      }\n\n      static deserialize(x: any) {\n        return {\n          deserialized: true,\n          value: x,\n        };\n      }\n    }\n\n    registerSerializableClass('Test', Test);\n\n    let x = new Test(2);\n    let res = deserialize(serialize(x));\n    assert(!(res instanceof Test));\n    assert.equal(res.value.x, x.x);\n    assert.equal(res.deserialized, true);\n\n    unregisterSerializableClass('Test', Test);\n  });\n\n  it('should serialize a class recursively', () => {\n    class Foo {\n      x: number;\n      constructor(x: number) {\n        this.x = x;\n      }\n    }\n\n    class Bar {\n      foo: Foo;\n      constructor(foo: Foo) {\n        this.foo = foo;\n      }\n    }\n\n    registerSerializableClass('Foo', Foo);\n    registerSerializableClass('Bar', Bar);\n\n    let x = new Bar(new Foo(2));\n    let res = deserialize(serialize(x));\n    assert(res instanceof Bar);\n    assert(res.foo instanceof Foo);\n    assert.equal(res.foo.x, 2);\n\n    unregisterSerializableClass('Foo', Foo);\n    unregisterSerializableClass('Bar', Bar);\n  });\n\n  it('should serialize a cyclic class', () => {\n    class Foo {\n      x: ?Foo;\n      constructor(x: ?Foo) {\n        this.x = x;\n      }\n    }\n\n    registerSerializableClass('Foo', Foo);\n\n    let x = new Foo();\n    x.x = x;\n\n    let res = deserialize(serialize(x));\n    assert(res instanceof Foo);\n    assert(res.x instanceof Foo);\n    assert.equal(res.x, res);\n\n    assert.equal(x.x, x);\n\n    unregisterSerializableClass('Foo', Foo);\n  });\n\n  it('should copy on write', () => {\n    class Foo {\n      x: number;\n      constructor(x: number) {\n        this.x = x;\n      }\n    }\n\n    registerSerializableClass('Foo', Foo);\n\n    let x = {y: {foo: new Foo(2)}};\n\n    let res = deserialize(serialize(x));\n    assert(res.y.foo instanceof Foo);\n    assert(x.y.foo instanceof Foo);\n\n    unregisterSerializableClass('Foo', Foo);\n  });\n\n  it('should serialize a cyclic class and copy on write', () => {\n    class Foo {\n      x: ?Foo;\n      constructor(x: ?Foo) {\n        this.x = x;\n      }\n    }\n\n    registerSerializableClass('Foo', Foo);\n\n    let x = new Foo();\n    x.x = x;\n    let y = {x: {y: x}};\n\n    let res = deserialize(serialize(y));\n    assert(res.x.y instanceof Foo);\n    assert(res.x.y.x instanceof Foo);\n    assert(y.x.y instanceof Foo);\n    assert(y.x.y.x instanceof Foo);\n    assert.equal(res.x.y.x, res.x.y);\n\n    assert.equal(x.x, x);\n\n    unregisterSerializableClass('Foo', Foo);\n  });\n\n  it('should serialize a class inside a Map', () => {\n    class Test {\n      x: number;\n      constructor(x: number) {\n        this.x = x;\n      }\n    }\n\n    registerSerializableClass('Test', Test);\n\n    let x = new Map([[2, new Test(2)]]);\n    let res = deserialize(serialize(x));\n    assert(res instanceof Map);\n    assert(res.get(2) instanceof Test);\n\n    unregisterSerializableClass('Test', Test);\n  });\n\n  it('should serialize a class inside a Set', () => {\n    class Test {\n      x: number;\n      constructor(x: number) {\n        this.x = x;\n      }\n    }\n\n    registerSerializableClass('Test', Test);\n\n    let x = new Set([new Test(2)]);\n    let res = deserialize(serialize(x));\n    assert(res instanceof Set);\n    assert(res.values().next().value instanceof Test);\n\n    unregisterSerializableClass('Test', Test);\n  });\n\n  describe('raw values', () => {\n    class Outer {\n      inner: Inner;\n\n      constructor(inner) {\n        this.inner = inner;\n      }\n\n      serialize() {\n        return {\n          $$raw: true,\n          inner: this.inner,\n        };\n      }\n    }\n\n    class Inner {\n      x: number;\n\n      constructor(x) {\n        this.x = x;\n      }\n\n      static deserialize = sinon.spy();\n    }\n\n    beforeEach(() => {\n      registerSerializableClass('Outer', Outer);\n      registerSerializableClass('Inner', Inner);\n    });\n\n    afterEach(() => {\n      unregisterSerializableClass('Outer', Outer);\n      unregisterSerializableClass('Inner', Inner);\n    });\n\n    it('should not recursively serialize raw values', () => {\n      let res = deserialize(serialize(new Outer(new Inner(42))));\n      assert(res instanceof Outer);\n      assert(!(res.inner instanceof Inner));\n      assert.equal(res.inner.x, 42);\n    });\n\n    it('should not recursively deserialize raw values', () => {\n      deserialize(serialize(new Outer(new Inner(42))));\n      assert(Inner.deserialize.notCalled);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/core/test/test-utils.js",
    "content": "// @flow strict-local\n\nimport type {Environment, ParcelOptions, Target} from '../src/types';\n\nimport {FSCache} from '@parcel/cache';\nimport tempy from 'tempy';\nimport path from 'path';\nimport {inputFS, outputFS} from '@parcel/test-utils';\nimport {relativePath} from '@parcel/utils';\nimport {NodePackageManager} from '@parcel/package-manager';\nimport {createEnvironment} from '../src/Environment';\nimport {toProjectPath} from '../src/projectPath';\nimport {DEFAULT_FEATURE_FLAGS} from '@parcel/feature-flags';\n\nlet cacheDir = tempy.directory();\nexport let cache: FSCache = new FSCache(outputFS, cacheDir);\ncache.ensure();\n\nexport const DEFAULT_OPTIONS: ParcelOptions = {\n  cacheDir: path.join(__dirname, '.parcel-cache'),\n  parcelVersion: '',\n  watchDir: __dirname,\n  watchIgnore: undefined,\n  watchBackend: undefined,\n  entries: [],\n  logLevel: 'info',\n  targets: undefined,\n  projectRoot: __dirname,\n  shouldAutoInstall: false,\n  hmrOptions: undefined,\n  shouldContentHash: true,\n  shouldBuildLazily: false,\n  lazyIncludes: [],\n  lazyExcludes: [],\n  shouldBundleIncrementally: true,\n  serveOptions: false,\n  mode: 'development',\n  env: {},\n  shouldDisableCache: false,\n  shouldProfile: false,\n  shouldTrace: false,\n  inputFS,\n  outputFS,\n  cache,\n  shouldPatchConsole: false,\n  packageManager: new NodePackageManager(inputFS, '/'),\n  additionalReporters: [],\n  instanceId: 'test',\n  defaultTargetOptions: {\n    shouldScopeHoist: false,\n    shouldOptimize: false,\n    publicUrl: '/',\n    distDir: undefined,\n    sourceMaps: false,\n  },\n  featureFlags: {\n    ...DEFAULT_FEATURE_FLAGS,\n  },\n};\n\nexport const DEFAULT_ENV: Environment = createEnvironment({\n  context: 'browser',\n  engines: {\n    browsers: ['> 1%'],\n  },\n});\n\nexport const DEFAULT_TARGETS: Array<Target> = [\n  {\n    name: 'test',\n    distDir: toProjectPath('/', '/dist'),\n    distEntry: 'out.js',\n    env: DEFAULT_ENV,\n    publicUrl: '/',\n  },\n];\n\nexport function relative(f: string): string {\n  return relativePath(__dirname, f, false);\n}\n"
  },
  {
    "path": "packages/core/core/test/utils.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {getPublicId} from '../src/utils';\n\nconst id = '0123456789abcdef0123456789abcdef';\nconst fullPublicId = '296TIIbB3u904riPYGPJJ';\n\ndescribe('getPublicId', () => {\n  it('only accepts 32-character hexadecimal strings', () => {\n    assert.throws(() => {\n      getPublicId('abc', () => false);\n    });\n\n    let notHexadecimal = 'abcdefghiklmnopqrstuvwxyz1234567';\n    assert.equal(notHexadecimal.length, 32);\n    assert.throws(() => {\n      getPublicId(notHexadecimal, () => false);\n    });\n  });\n\n  it('if no collisions, returns the first 5 base62 characters of value represented by the input', () => {\n    assert.equal(\n      getPublicId(id, () => false),\n      fullPublicId.slice(0, 5),\n    );\n  });\n\n  it('uses more characters if there is a collision', () => {\n    assert.equal(\n      getPublicId(id, publicId =>\n        [fullPublicId.slice(0, 5), fullPublicId.slice(0, 6)].includes(publicId),\n      ),\n      fullPublicId.slice(0, 7),\n    );\n  });\n\n  it('fails if all characters collide', () => {\n    assert.throws(() => {\n      getPublicId(id, () => true);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/diagnostic/package.json",
    "content": "{\n  \"name\": \"@parcel/diagnostic\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Types and utilities for printing source-code located errors, warning and information messages.\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/diagnostic.js\",\n  \"source\": \"src/diagnostic.js\",\n  \"types\": \"lib/diagnostic.d.ts\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"scripts\": {\n    \"build-ts\": \"flow-to-ts src/*.js --write && tsc --emitDeclarationOnly --declaration --esModuleInterop src/*.ts && mkdir -p lib && mv src/*.d.ts lib/. && rm src/*.ts\",\n    \"check-ts\": \"tsc --noEmit lib/diagnostic.d.ts\"\n  },\n  \"dependencies\": {\n    \"@mischnic/json-sourcemap\": \"^0.1.1\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/core/diagnostic/src/diagnostic.js",
    "content": "// @flow strict-local\n\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport {parse, type Mapping} from '@mischnic/json-sourcemap';\n\n/** These positions are 1-based (so <code>1</code> is the first line/column) */\nexport type DiagnosticHighlightLocation = {|\n  +line: number,\n  +column: number,\n|};\n\nexport type DiagnosticSeverity = 'error' | 'warn' | 'info';\n\n/**\n * Note: A tab character is always counted as a single character\n * This is to prevent any mismatch of highlighting across machines\n */\nexport type DiagnosticCodeHighlight = {|\n  /** Location of the first character that should get highlighted for this highlight. */\n  start: DiagnosticHighlightLocation,\n  /** Location of the last character that should get highlighted for this highlight. */\n  end: DiagnosticHighlightLocation,\n  /** A message that should be displayed at this location in the code (optional). */\n  message?: string,\n|};\n\n/**\n * Describes how to format a code frame.\n * A code frame is a visualization of a piece of code with a certain amount of\n * code highlights that point to certain chunk(s) inside the code.\n */\nexport type DiagnosticCodeFrame = {|\n  /**\n   * The contents of the source file.\n   *\n   * If no code is passed, it will be read in from filePath, remember that\n   * the asset's current code could be different from the input contents.\n   *\n   */\n  code?: string,\n  /** Path to the file this code frame is about (optional, absolute or relative to the project root) */\n  filePath?: string,\n  /** Language of the file this code frame is about (optional) */\n  language?: string,\n  codeHighlights: Array<DiagnosticCodeHighlight>,\n|};\n\n/** A JSON object (as in \"map\") */\ntype JSONObject = {\n  // $FlowFixMe\n  [key: string]: any,\n};\n\n/**\n * A style agnostic way of emitting errors, warnings and info.\n * Reporters are responsible for rendering the message, codeframes, hints, ...\n */\nexport type Diagnostic = {|\n  /** This is the message you want to log. */\n  message: string,\n  /** Name of plugin or file that threw this error */\n  origin?: string,\n\n  /** A stacktrace of the error (optional) */\n  stack?: string,\n  /** Name of the error (optional) */\n  name?: string,\n\n  /** A code frame points to a certain location(s) in the file this diagnostic is linked to (optional) */\n  codeFrames?: ?Array<DiagnosticCodeFrame>,\n\n  /** An optional list of strings that suggest ways to resolve this issue */\n  hints?: Array<string>,\n\n  /** @private */\n  skipFormatting?: boolean,\n\n  /** A URL to documentation to learn more about the diagnostic. */\n  documentationURL?: string,\n\n  /** Diagnostic specific metadata (optional) */\n  meta?: JSONObject,\n|};\n\n// This type should represent all error formats Parcel can encounter...\nexport interface PrintableError extends Error {\n  fileName?: string;\n  filePath?: string;\n  codeFrame?: string;\n  highlightedCodeFrame?: string;\n  loc?: ?{\n    column: number,\n    line: number,\n    ...\n  };\n  source?: string;\n}\n\nexport type DiagnosticWithoutOrigin = {|\n  ...Diagnostic,\n  origin?: string,\n|};\n\n/** Something that can be turned into a diagnostic. */\nexport type Diagnostifiable =\n  | Diagnostic\n  | Array<Diagnostic>\n  | ThrowableDiagnostic\n  | PrintableError\n  | Error\n  | string;\n\n/** Normalize the given value into a diagnostic. */\nexport function anyToDiagnostic(input: Diagnostifiable): Array<Diagnostic> {\n  if (Array.isArray(input)) {\n    return input.flatMap(e => anyToDiagnostic(e));\n  } else if (input instanceof ThrowableDiagnostic) {\n    return input.diagnostics;\n  } else if (input instanceof Error) {\n    return errorToDiagnostic(input);\n  } else if (typeof input === 'string') {\n    return [{message: input}];\n  } else if (typeof input === 'object') {\n    return [input];\n  } else {\n    return errorToDiagnostic(input);\n  }\n}\n\n/** Normalize the given error into a diagnostic. */\nexport function errorToDiagnostic(\n  error: ThrowableDiagnostic | PrintableError | string,\n  defaultValues?: {|\n    origin?: ?string,\n    filePath?: ?string,\n  |},\n): Array<Diagnostic> {\n  let codeFrames: ?Array<DiagnosticCodeFrame> = undefined;\n\n  if (typeof error === 'string') {\n    return [\n      {\n        origin: defaultValues?.origin ?? 'Error',\n        message: escapeMarkdown(error),\n      },\n    ];\n  }\n\n  if (error instanceof ThrowableDiagnostic) {\n    return error.diagnostics.map(d => {\n      return {\n        ...d,\n        origin: d.origin ?? defaultValues?.origin ?? 'unknown',\n      };\n    });\n  }\n\n  if (error.loc && error.source != null) {\n    codeFrames = [\n      {\n        filePath:\n          error.filePath ??\n          error.fileName ??\n          defaultValues?.filePath ??\n          undefined,\n        code: error.source,\n        codeHighlights: [\n          {\n            start: {\n              line: error.loc.line,\n              column: error.loc.column,\n            },\n            end: {\n              line: error.loc.line,\n              column: error.loc.column,\n            },\n          },\n        ],\n      },\n    ];\n  }\n\n  return [\n    {\n      origin: defaultValues?.origin ?? 'Error',\n      message: escapeMarkdown(error.message),\n      name: error.name,\n      stack:\n        codeFrames == null\n          ? error.highlightedCodeFrame ?? error.codeFrame ?? error.stack\n          : undefined,\n      codeFrames,\n    },\n  ];\n}\n\ntype ThrowableDiagnosticOpts = {\n  diagnostic: Diagnostic | Array<Diagnostic>,\n  ...\n};\n\n/**\n * An error wrapper around a diagnostic that can be <code>throw</code>n (e.g. to signal a\n * build error).\n */\nexport default class ThrowableDiagnostic extends Error {\n  diagnostics: Array<Diagnostic>;\n\n  constructor(opts: ThrowableDiagnosticOpts) {\n    let diagnostics = Array.isArray(opts.diagnostic)\n      ? opts.diagnostic\n      : [opts.diagnostic];\n\n    // Construct error from diagnostics\n    super(diagnostics[0].message);\n    // @ts-ignore\n    this.stack = diagnostics[0].stack ?? super.stack;\n    // @ts-ignore\n    this.name = diagnostics[0].name ?? super.name;\n\n    this.diagnostics = diagnostics;\n  }\n}\n\n/**\n * Turns a list of positions in a JSON5 file with messages into a list of diagnostics.\n * Uses <a href=\"https://github.com/mischnic/json-sourcemap\">@mischnic/json-sourcemap</a>.\n *\n * @param code the JSON code\n * @param ids A list of JSON keypaths (<code>key: \"/some/parent/child\"</code>) with corresponding messages, \\\n * <code>type</code> signifies whether the key of the value in a JSON object should be highlighted.\n */\nexport function generateJSONCodeHighlights(\n  data:\n    | string\n    | {|\n        data: mixed,\n        pointers: {|[key: string]: Mapping|},\n      |},\n  ids: Array<{|key: string, type?: ?'key' | 'value', message?: string|}>,\n): Array<DiagnosticCodeHighlight> {\n  let map =\n    typeof data == 'string'\n      ? parse(data, undefined, {dialect: 'JSON5', tabWidth: 1})\n      : data;\n  return ids.map(({key, type, message}) => {\n    let pos = nullthrows(map.pointers[key]);\n    return {\n      ...getJSONHighlightLocation(pos, type),\n      message,\n    };\n  });\n}\n\n/**\n * Converts entries in <a href=\"https://github.com/mischnic/json-sourcemap\">@mischnic/json-sourcemap</a>'s\n * <code>result.pointers</code> array.\n */\nexport function getJSONHighlightLocation(\n  pos: Mapping,\n  type?: ?'key' | 'value',\n): {|\n  start: DiagnosticHighlightLocation,\n  end: DiagnosticHighlightLocation,\n|} {\n  let key = 'key' in pos ? pos.key : undefined;\n  let keyEnd = 'keyEnd' in pos ? pos.keyEnd : undefined;\n  if (!type && key && pos.value) {\n    // key and value\n    return {\n      start: {line: key.line + 1, column: key.column + 1},\n      end: {line: pos.valueEnd.line + 1, column: pos.valueEnd.column},\n    };\n  } else if (type == 'key' || !pos.value) {\n    invariant(key && keyEnd);\n    return {\n      start: {line: key.line + 1, column: key.column + 1},\n      end: {line: keyEnd.line + 1, column: keyEnd.column},\n    };\n  } else {\n    return {\n      start: {line: pos.value.line + 1, column: pos.value.column + 1},\n      end: {line: pos.valueEnd.line + 1, column: pos.valueEnd.column},\n    };\n  }\n}\n\n/** Result is 1-based, but end is exclusive */\nexport function getJSONSourceLocation(\n  pos: Mapping,\n  type?: ?'key' | 'value',\n): {|\n  start: {|\n    +line: number,\n    +column: number,\n  |},\n  end: {|\n    +line: number,\n    +column: number,\n  |},\n|} {\n  let v = getJSONHighlightLocation(pos, type);\n  return {start: v.start, end: {line: v.end.line, column: v.end.column + 1}};\n}\n\nexport function convertSourceLocationToHighlight<\n  Location: {\n    /** 1-based, inclusive */\n    +start: {|\n      +line: number,\n      +column: number,\n    |},\n    /** 1-based, exclusive */\n    +end: {|\n      +line: number,\n      +column: number,\n    |},\n    ...\n  },\n>({start, end}: Location, message?: string): DiagnosticCodeHighlight {\n  return {message, start, end: {line: end.line, column: end.column - 1}};\n}\n\n/** Sanitizes object keys before using them as <code>key</code> in generateJSONCodeHighlights */\nexport function encodeJSONKeyComponent(component: string): string {\n  return component.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n\nconst escapeCharacters = ['\\\\', '*', '_', '~'];\n\nexport function escapeMarkdown(s: string): string {\n  let result = s;\n  for (const char of escapeCharacters) {\n    result = result.replace(new RegExp(`\\\\${char}`, 'g'), `\\\\${char}`);\n  }\n\n  return result;\n}\n\ntype TemplateInput = $FlowFixMe;\n\nconst mdVerbatim = Symbol();\nexport function md(\n  strings: Array<string>,\n  ...params: Array<TemplateInput>\n): string {\n  let result = [];\n  for (let i = 0; i < params.length; i++) {\n    result.push(strings[i]);\n\n    let param = params[i];\n    if (Array.isArray(param)) {\n      for (let j = 0; j < param.length; j++) {\n        result.push(param[j]?.[mdVerbatim] ?? escapeMarkdown(`${param[j]}`));\n        if (j < param.length - 1) {\n          result.push(', ');\n        }\n      }\n    } else {\n      result.push(param?.[mdVerbatim] ?? escapeMarkdown(`${param}`));\n    }\n  }\n  return result.join('') + strings[strings.length - 1];\n}\n\nmd.bold = function (s: TemplateInput): TemplateInput {\n  // $FlowFixMe[invalid-computed-prop]\n  return {[mdVerbatim]: '**' + escapeMarkdown(`${s}`) + '**'};\n};\n\nmd.italic = function (s: TemplateInput): TemplateInput {\n  // $FlowFixMe[invalid-computed-prop]\n  return {[mdVerbatim]: '_' + escapeMarkdown(`${s}`) + '_'};\n};\n\nmd.underline = function (s: TemplateInput): TemplateInput {\n  // $FlowFixMe[invalid-computed-prop]\n  return {[mdVerbatim]: '__' + escapeMarkdown(`${s}`) + '__'};\n};\n\nmd.strikethrough = function (s: TemplateInput): TemplateInput {\n  // $FlowFixMe[invalid-computed-prop]\n  return {[mdVerbatim]: '~~' + escapeMarkdown(`${s}`) + '~~'};\n};\n"
  },
  {
    "path": "packages/core/diagnostic/test/JSONCodeHighlights.test.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\n\nimport {generateJSONCodeHighlights} from '../src/diagnostic';\n\ndescribe('generateJSONCodeHighlights', () => {\n  it('returns an escaped string 01', () => {\n    let result = generateJSONCodeHighlights(\n      `{\n  \"a\": 1\n}`,\n      [\n        {key: '/a', type: 'key', message: 'foo1'},\n        {key: '/a', type: 'value', message: 'foo2'},\n        {key: '/a', message: 'foo3'},\n      ],\n    );\n    assert.deepEqual(result, [\n      {\n        start: {line: 2, column: 3},\n        end: {line: 2, column: 5},\n        message: 'foo1',\n      },\n      {\n        start: {line: 2, column: 8},\n        end: {line: 2, column: 8},\n        message: 'foo2',\n      },\n      {\n        start: {line: 2, column: 3},\n        end: {line: 2, column: 8},\n        message: 'foo3',\n      },\n    ]);\n  });\n});\n"
  },
  {
    "path": "packages/core/diagnostic/test/markdown.test.js",
    "content": "// @flow\nimport assert from 'assert';\n\nimport {escapeMarkdown, md} from '../src/diagnostic';\n\ndescribe('escapeMarkdown', () => {\n  it('returns an escaped string 01', () => {\n    assert.strictEqual('\\\\*test\\\\*', escapeMarkdown('*test*'));\n  });\n\n  it('returns an escaped string 02', () => {\n    assert.strictEqual('\\\\_test\\\\_', escapeMarkdown('_test_'));\n  });\n\n  it('returns an escaped string 03', () => {\n    assert.strictEqual('\\\\~test\\\\~', escapeMarkdown('~test~'));\n  });\n\n  it('returns an escaped string 04', () => {\n    assert.strictEqual('\\\\*\\\\_\\\\~test\\\\~\\\\_\\\\*', escapeMarkdown('*_~test~_*'));\n  });\n\n  it('returns an escaped string with backslash 01', () => {\n    assert.strictEqual('\\\\\\\\test\\\\\\\\', escapeMarkdown('\\\\test\\\\'));\n  });\n\n  it('returns an escaped string with backslash 02', () => {\n    assert.strictEqual('\\\\\\\\\\\\*test\\\\*\\\\\\\\', escapeMarkdown('\\\\*test*\\\\'));\n  });\n});\n\ndescribe('md tagged template literal', () => {\n  it('bold placeholder', () => {\n    assert.strictEqual(\n      '*Test*: **\\\\_abc\\\\_**',\n      md`*Test*: ${md.bold('_abc_')}`,\n    );\n  });\n\n  it('italic placeholder', () => {\n    assert.strictEqual(\n      '*Test*: _\\\\_abc\\\\__',\n      md`*Test*: ${md.italic('_abc_')}`,\n    );\n  });\n\n  it('underline placeholder', () => {\n    assert.strictEqual(\n      '*Test*: __\\\\_abc\\\\___',\n      md`*Test*: ${md.underline('_abc_')}`,\n    );\n  });\n\n  it('strikethrough placeholder', () => {\n    assert.strictEqual(\n      '*Test*: ~~\\\\_abc\\\\_~~',\n      md`*Test*: ${md.strikethrough('_abc_')}`,\n    );\n  });\n\n  it('escapes only placeholders', () => {\n    assert.strictEqual('*Test*: \\\\_abc\\\\_', md`*Test*: ${'_abc_'}`);\n  });\n\n  it('behaves like native template literal', () => {\n    let v = {\n      toString() {\n        return 'a';\n      },\n      // $FlowFixMe[invalid-computed-prop]\n      [Symbol.toPrimitive]() {\n        return 'b';\n      },\n    };\n    assert.strictEqual('Test: b', md`Test: ${v}`);\n  });\n\n  it('supports null and undefined', () => {\n    assert.strictEqual('Test: undefined null', md`Test: ${undefined} ${null}`);\n  });\n});\n"
  },
  {
    "path": "packages/core/feature-flags/package.json",
    "content": "{\n  \"name\": \"@parcel/feature-flags\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Provides internal feature-flags for the parcel codebase.\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"types\": \"lib/types.d.ts\",\n  \"scripts\": {\n    \"build-ts\": \"mkdir -p lib && flow-to-ts src/types.js > lib/types.d.ts\",\n    \"check-ts\": \"tsc --noEmit lib/types.d.ts\"\n  },\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/feature-flags/src/index.js",
    "content": "// @flow strict\n\nimport type {FeatureFlags as _FeatureFlags} from './types';\n// We need to do these gymnastics as we don't want flow-to-ts to touch DEFAULT_FEATURE_FLAGS,\n// but we want to export FeatureFlags for Flow\nexport type FeatureFlags = _FeatureFlags;\n\nexport const DEFAULT_FEATURE_FLAGS: FeatureFlags = {\n  exampleFeature: false,\n  useWatchmanWatcher: false,\n};\n\nlet featureFlagValues: FeatureFlags = {...DEFAULT_FEATURE_FLAGS};\n\nexport function setFeatureFlags(flags: FeatureFlags) {\n  featureFlagValues = flags;\n}\n\nexport function getFeatureFlag(flagName: $Keys<FeatureFlags>): boolean {\n  return featureFlagValues[flagName];\n}\n"
  },
  {
    "path": "packages/core/feature-flags/src/types.js",
    "content": "// @flow strict\n\nexport type FeatureFlags = {|\n  // This feature flag mostly exists to test the feature flag system, and doesn't have any build/runtime effect\n  +exampleFeature: boolean,\n  /**\n   * Use node.js implementation of @parcel/watcher watchman backend\n   */\n  +useWatchmanWatcher: boolean,\n|};\n"
  },
  {
    "path": "packages/core/feature-flags/test/feature-flags.test.js",
    "content": "// @flow strict\nimport assert from 'assert';\nimport {getFeatureFlag, DEFAULT_FEATURE_FLAGS, setFeatureFlags} from '../src';\n\ndescribe('feature-flag test', () => {\n  beforeEach(() => {\n    setFeatureFlags(DEFAULT_FEATURE_FLAGS);\n  });\n\n  it('has defaults', () => {\n    assert.equal(\n      getFeatureFlag('exampleFeature'),\n      DEFAULT_FEATURE_FLAGS.exampleFeature,\n    );\n  });\n\n  it('can override', () => {\n    setFeatureFlags({...DEFAULT_FEATURE_FLAGS, exampleFeature: true});\n    assert.equal(getFeatureFlag('exampleFeature'), true);\n  });\n});\n"
  },
  {
    "path": "packages/core/fs/.gitignore",
    "content": "lib\n"
  },
  {
    "path": "packages/core/fs/index.d.ts",
    "content": "import type {FileSystem} from '@parcel/types-internal';\nimport type WorkerFarm from '@parcel/workers';\n\nexport type {\n  FileSystem,\n  FileOptions,\n  ReaddirOptions,\n  Stats,\n  Encoding,\n  Dirent,\n} from '@parcel/types-internal';\n\nexport const NodeFS: {\n  new (): FileSystem;\n};\n\nexport const MemoryFS: {\n  new (farm: WorkerFarm): FileSystem;\n};\n\nexport const OverlayFS: {\n  new (writable: FileSystem, readable: FileSystem): FileSystem;\n};\n"
  },
  {
    "path": "packages/core/fs/package.json",
    "content": "{\n  \"name\": \"@parcel/fs\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"types\": \"index.d.ts\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"targets\": {\n    \"types\": false,\n    \"main\": {\n      \"includeNodeModules\": {\n        \"@parcel/core\": false,\n        \"@parcel/feature-flags\": false,\n        \"@parcel/rust\": false,\n        \"@parcel/types-internal\": false,\n        \"@parcel/utils\": false,\n        \"@parcel/watcher\": false,\n        \"@parcel/watcher-watchman-js\": false,\n        \"@parcel/workers\": false\n      }\n    },\n    \"browser\": {\n      \"includeNodeModules\": {\n        \"@parcel/core\": false,\n        \"@parcel/feature-flags\": false,\n        \"@parcel/rust\": false,\n        \"@parcel/types-internal\": false,\n        \"@parcel/utils\": false,\n        \"@parcel/watcher\": false,\n        \"@parcel/watcher-watchman-js\": false,\n        \"@parcel/workers\": false\n      }\n    }\n  },\n  \"scripts\": {\n    \"build-ts\": \"mkdir -p lib && flow-to-ts src/types.js > lib/types.d.ts\",\n    \"check-ts\": \"tsc --noEmit index.d.ts\"\n  },\n  \"dependencies\": {\n    \"@parcel/feature-flags\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/types-internal\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@parcel/watcher\": \"^2.0.7\",\n    \"@parcel/workers\": \"2.16.4\"\n  },\n  \"devDependencies\": {\n    \"@parcel/watcher-watchman-js\": \"2.16.4\",\n    \"graceful-fs\": \"^4.2.11\",\n    \"ncp\": \"^2.0.0\",\n    \"nullthrows\": \"^1.1.1\",\n    \"utility-types\": \"^3.11.0\"\n  },\n  \"peerDependencies\": {\n    \"@parcel/core\": \"^2.16.4\"\n  },\n  \"browser\": {\n    \"./src/NodeFS.js\": \"./src/NodeFS.browser.js\",\n    \"@parcel/fs\": \"./lib/browser.js\"\n  }\n}\n"
  },
  {
    "path": "packages/core/fs/src/MemoryFS.js",
    "content": "// @flow\n\nimport type {\n  FilePath,\n  FileSystem,\n  FileOptions,\n  ReaddirOptions,\n  Encoding,\n} from '@parcel/types-internal';\nimport type {\n  Event,\n  Options as WatcherOptions,\n  AsyncSubscription,\n} from '@parcel/watcher';\n\nimport path from 'path';\nimport {Readable, Writable} from 'stream';\nimport {registerSerializableClass} from '@parcel/core';\nimport {SharedBuffer} from '@parcel/utils';\nimport packageJSON from '../package.json';\nimport WorkerFarm, {Handle} from '@parcel/workers';\nimport nullthrows from 'nullthrows';\nimport EventEmitter from 'events';\nimport {findAncestorFile, findNodeModule, findFirstFile} from './find';\n\nconst instances: Map<number, MemoryFS> = new Map();\nlet id = 0;\n\ntype HandleFunction = (...args: Array<any>) => any;\ntype SerializedMemoryFS = {\n  id: number,\n  handle: any,\n  dirs: Map<FilePath, Directory>,\n  files: Map<FilePath, File>,\n  symlinks: Map<FilePath, FilePath>,\n  ...\n};\n\ntype WorkerEvent = {|\n  type: 'writeFile' | 'unlink' | 'mkdir' | 'symlink',\n  path: FilePath,\n  entry?: Entry,\n  target?: FilePath,\n|};\n\ntype ResolveFunction = () => mixed;\n\nexport class MemoryFS implements FileSystem {\n  dirs: Map<FilePath, Directory>;\n  files: Map<FilePath, File>;\n  symlinks: Map<FilePath, FilePath>;\n  watchers: Map<FilePath, Set<Watcher>>;\n  events: Array<Event>;\n  id: number;\n  handle: Handle;\n  farm: WorkerFarm;\n  _cwd: FilePath;\n  _eventQueue: Array<Event>;\n  _watcherTimer: TimeoutID;\n  _numWorkerInstances: number = 0;\n  _workerHandles: Array<Handle>;\n  _workerRegisterResolves: Array<ResolveFunction> = [];\n  _emitter: EventEmitter = new EventEmitter();\n\n  constructor(workerFarm: WorkerFarm) {\n    this.farm = workerFarm;\n    this._cwd = path.resolve(path.sep);\n    this.dirs = new Map([[this._cwd, new Directory()]]);\n    this.files = new Map();\n    this.symlinks = new Map();\n    this.watchers = new Map();\n    this.events = [];\n    this.id = id++;\n    this._workerHandles = [];\n    this._eventQueue = [];\n    instances.set(this.id, this);\n    this._emitter.on('allWorkersRegistered', () => {\n      for (let resolve of this._workerRegisterResolves) {\n        resolve();\n      }\n      this._workerRegisterResolves = [];\n    });\n  }\n\n  static deserialize(opts: SerializedMemoryFS): MemoryFS | WorkerFS {\n    let existing = instances.get(opts.id);\n    if (existing != null) {\n      // Correct the count of worker instances since serialization assumes a new instance is created\n      WorkerFarm.getWorkerApi().runHandle(opts.handle, [\n        'decrementWorkerInstance',\n        [],\n      ]);\n      return existing;\n    }\n\n    let fs = new WorkerFS(opts.id, nullthrows(opts.handle));\n    fs.dirs = opts.dirs;\n    fs.files = opts.files;\n    fs.symlinks = opts.symlinks;\n    return fs;\n  }\n\n  serialize(): SerializedMemoryFS {\n    if (!this.handle) {\n      this.handle = this.farm.createReverseHandle(\n        (fn: string, args: Array<mixed>) => {\n          // $FlowFixMe\n          return this[fn](...args);\n        },\n      );\n    }\n\n    // If a worker instance already exists, it will decrement this number\n    this._numWorkerInstances++;\n\n    return {\n      $$raw: false,\n      id: this.id,\n      handle: this.handle,\n      dirs: this.dirs,\n      files: this.files,\n      symlinks: this.symlinks,\n    };\n  }\n\n  decrementWorkerInstance() {\n    this._numWorkerInstances--;\n    if (this._numWorkerInstances === this._workerHandles.length) {\n      this._emitter.emit('allWorkersRegistered');\n    }\n  }\n\n  cwd(): FilePath {\n    return this._cwd;\n  }\n\n  chdir(dir: FilePath) {\n    this._cwd = dir;\n  }\n\n  _normalizePath(filePath: FilePath, realpath: boolean = true): FilePath {\n    filePath = path.normalize(filePath);\n    if (!filePath.startsWith(this.cwd())) {\n      filePath = path.resolve(this.cwd(), filePath);\n    }\n\n    // get realpath by following symlinks\n    let {root, dir, base} = path.parse(filePath);\n    let parts = dir.slice(root.length).split(path.sep).concat(base);\n\n    // If the realpath option is not true, don't follow the final link\n    let last;\n    if (!realpath) {\n      last = parts[parts.length - 1];\n      parts = parts.slice(0, -1);\n    }\n\n    let res = root;\n    for (let part of parts) {\n      res = path.join(res, part);\n      let symlink = this.symlinks.get(res);\n      if (symlink) {\n        res = symlink;\n      }\n    }\n\n    if (last) {\n      res = path.join(res, last);\n    }\n\n    return res;\n  }\n\n  async writeFile(\n    filePath: FilePath,\n    contents: Buffer | string,\n    options?: ?FileOptions,\n  ) {\n    filePath = this._normalizePath(filePath);\n    if (this.dirs.has(filePath)) {\n      throw new FSError('EISDIR', filePath, 'is a directory');\n    }\n\n    let dir = path.dirname(filePath);\n    if (!this.dirs.has(dir)) {\n      throw new FSError('ENOENT', dir, 'does not exist');\n    }\n\n    let buffer = makeShared(contents);\n    let file = this.files.get(filePath);\n    let mode = (options && options.mode) || 0o666;\n    if (file) {\n      file.write(buffer, mode);\n      this.files.set(filePath, file);\n    } else {\n      this.files.set(filePath, new File(buffer, mode));\n    }\n\n    await this._sendWorkerEvent({\n      type: 'writeFile',\n      path: filePath,\n      entry: this.files.get(filePath),\n    });\n\n    this._triggerEvent({\n      type: file ? 'update' : 'create',\n      path: filePath,\n    });\n  }\n\n  // eslint-disable-next-line require-await\n  async readFile(filePath: FilePath, encoding?: Encoding): Promise<any> {\n    return this.readFileSync(filePath, encoding);\n  }\n\n  readFileSync(filePath: FilePath, encoding?: Encoding): any {\n    filePath = this._normalizePath(filePath);\n    let file = this.files.get(filePath);\n    if (file == null) {\n      throw new FSError('ENOENT', filePath, 'does not exist');\n    }\n\n    let buffer = file.read();\n    if (encoding) {\n      return buffer.toString(encoding);\n    }\n\n    return buffer;\n  }\n\n  async copyFile(source: FilePath, destination: FilePath) {\n    let contents = await this.readFile(source);\n    await this.writeFile(destination, contents);\n  }\n\n  statSync(filePath: FilePath): Stat {\n    filePath = this._normalizePath(filePath);\n\n    let dir = this.dirs.get(filePath);\n    if (dir) {\n      return dir.stat();\n    }\n\n    let file = this.files.get(filePath);\n    if (file == null) {\n      throw new FSError('ENOENT', filePath, 'does not exist');\n    }\n\n    return file.stat();\n  }\n\n  // eslint-disable-next-line require-await\n  async stat(filePath: FilePath): Promise<Stat> {\n    return this.statSync(filePath);\n  }\n\n  lstatSync(filePath: FilePath): Stat {\n    filePath = this._normalizePath(filePath, false);\n\n    if (this.symlinks.has(filePath)) {\n      let stat = new Stat();\n      stat.mode = S_IFLNK;\n      return stat;\n    }\n\n    let dir = this.dirs.get(filePath);\n    if (dir) {\n      return dir.stat();\n    }\n\n    let file = this.files.get(filePath);\n    if (file == null) {\n      throw new FSError('ENOENT', filePath, 'does not exist');\n    }\n\n    return file.stat();\n  }\n\n  // eslint-disable-next-line require-await\n  async lstat(filePath: FilePath): Promise<Stat> {\n    return this.lstatSync(filePath);\n  }\n\n  readdirSync(dir: FilePath, opts?: ReaddirOptions): any {\n    dir = this._normalizePath(dir);\n    if (!this.dirs.has(dir)) {\n      throw new FSError('ENOENT', dir, 'does not exist');\n    }\n\n    if (!dir.endsWith(path.sep)) {\n      dir += path.sep;\n    }\n\n    let res = [];\n    for (let [filePath, entry] of this.dirs) {\n      if (filePath === dir) {\n        continue;\n      }\n      if (\n        filePath.startsWith(dir) &&\n        filePath.indexOf(path.sep, dir.length) === -1\n      ) {\n        let name = filePath.slice(dir.length);\n        if (opts?.withFileTypes) {\n          res.push(new Dirent(name, entry));\n        } else {\n          res.push(name);\n        }\n      }\n    }\n\n    for (let [filePath, entry] of this.files) {\n      if (\n        filePath.startsWith(dir) &&\n        filePath.indexOf(path.sep, dir.length) === -1\n      ) {\n        let name = filePath.slice(dir.length);\n        if (opts?.withFileTypes) {\n          res.push(new Dirent(name, entry));\n        } else {\n          res.push(name);\n        }\n      }\n    }\n\n    for (let [from] of this.symlinks) {\n      if (from.startsWith(dir) && from.indexOf(path.sep, dir.length) === -1) {\n        let name = from.slice(dir.length);\n        if (opts?.withFileTypes) {\n          res.push(new Dirent(name, {mode: S_IFLNK}));\n        } else {\n          res.push(name);\n        }\n      }\n    }\n\n    return res;\n  }\n\n  // eslint-disable-next-line require-await\n  async readdir(dir: FilePath, opts?: ReaddirOptions): Promise<any> {\n    return this.readdirSync(dir, opts);\n  }\n\n  async unlink(filePath: FilePath): Promise<void> {\n    filePath = this._normalizePath(filePath);\n    if (!this.files.has(filePath) && !this.dirs.has(filePath)) {\n      throw new FSError('ENOENT', filePath, 'does not exist');\n    }\n\n    this.files.delete(filePath);\n    this.dirs.delete(filePath);\n    this.watchers.delete(filePath);\n\n    await this._sendWorkerEvent({\n      type: 'unlink',\n      path: filePath,\n    });\n\n    this._triggerEvent({\n      type: 'delete',\n      path: filePath,\n    });\n\n    return Promise.resolve();\n  }\n\n  async mkdirp(dir: FilePath): Promise<void> {\n    dir = this._normalizePath(dir);\n    if (this.dirs.has(dir)) {\n      return Promise.resolve();\n    }\n\n    if (this.files.has(dir)) {\n      throw new FSError('ENOENT', dir, 'is not a directory');\n    }\n\n    let root = path.parse(dir).root;\n    while (dir !== root) {\n      if (this.dirs.has(dir)) {\n        break;\n      }\n\n      this.dirs.set(dir, new Directory());\n      await this._sendWorkerEvent({\n        type: 'mkdir',\n        path: dir,\n      });\n\n      this._triggerEvent({\n        type: 'create',\n        path: dir,\n      });\n\n      dir = path.dirname(dir);\n    }\n\n    return Promise.resolve();\n  }\n\n  async rimraf(filePath: FilePath): Promise<void> {\n    filePath = this._normalizePath(filePath);\n\n    if (this.dirs.has(filePath)) {\n      let dir = filePath + path.sep;\n      for (let filePath of this.files.keys()) {\n        if (filePath.startsWith(dir)) {\n          this.files.delete(filePath);\n          await this._sendWorkerEvent({\n            type: 'unlink',\n            path: filePath,\n          });\n\n          this._triggerEvent({\n            type: 'delete',\n            path: filePath,\n          });\n        }\n      }\n\n      for (let dirPath of this.dirs.keys()) {\n        if (dirPath.startsWith(dir)) {\n          this.dirs.delete(dirPath);\n          this.watchers.delete(dirPath);\n          await this._sendWorkerEvent({\n            type: 'unlink',\n            path: filePath,\n          });\n\n          this._triggerEvent({\n            type: 'delete',\n            path: dirPath,\n          });\n        }\n      }\n\n      for (let filePath of this.symlinks.keys()) {\n        if (filePath.startsWith(dir)) {\n          this.symlinks.delete(filePath);\n          await this._sendWorkerEvent({\n            type: 'unlink',\n            path: filePath,\n          });\n        }\n      }\n\n      this.dirs.delete(filePath);\n      await this._sendWorkerEvent({\n        type: 'unlink',\n        path: filePath,\n      });\n\n      this._triggerEvent({\n        type: 'delete',\n        path: filePath,\n      });\n    } else if (this.files.has(filePath)) {\n      this.files.delete(filePath);\n      await this._sendWorkerEvent({\n        type: 'unlink',\n        path: filePath,\n      });\n\n      this._triggerEvent({\n        type: 'delete',\n        path: filePath,\n      });\n    }\n\n    return Promise.resolve();\n  }\n\n  async ncp(source: FilePath, destination: FilePath) {\n    source = this._normalizePath(source);\n\n    if (this.dirs.has(source)) {\n      if (!this.dirs.has(destination)) {\n        this.dirs.set(destination, new Directory());\n        await this._sendWorkerEvent({\n          type: 'mkdir',\n          path: destination,\n        });\n\n        this._triggerEvent({\n          type: 'create',\n          path: destination,\n        });\n      }\n\n      let dir = source + path.sep;\n      for (let dirPath of this.dirs.keys()) {\n        if (dirPath.startsWith(dir)) {\n          let destName = path.join(destination, dirPath.slice(dir.length));\n          if (!this.dirs.has(destName)) {\n            this.dirs.set(destName, new Directory());\n            await this._sendWorkerEvent({\n              type: 'mkdir',\n              path: destination,\n            });\n            this._triggerEvent({\n              type: 'create',\n              path: destName,\n            });\n          }\n        }\n      }\n\n      for (let [filePath, file] of this.files) {\n        if (filePath.startsWith(dir)) {\n          let destName = path.join(destination, filePath.slice(dir.length));\n          let exists = this.files.has(destName);\n          this.files.set(destName, file);\n          await this._sendWorkerEvent({\n            type: 'writeFile',\n            path: destName,\n            entry: file,\n          });\n\n          this._triggerEvent({\n            type: exists ? 'update' : 'create',\n            path: destName,\n          });\n        }\n      }\n    } else {\n      await this.copyFile(source, destination);\n    }\n  }\n\n  createReadStream(filePath: FilePath): ReadStream {\n    return new ReadStream(this, filePath);\n  }\n\n  createWriteStream(filePath: FilePath, options: ?FileOptions): WriteStream {\n    return new WriteStream(this, filePath, options);\n  }\n\n  realpathSync(filePath: FilePath): FilePath {\n    return this._normalizePath(filePath);\n  }\n\n  // eslint-disable-next-line require-await\n  async realpath(filePath: FilePath): Promise<FilePath> {\n    return this.realpathSync(filePath);\n  }\n\n  readlinkSync(filePath: FilePath): FilePath {\n    let symlink = this.symlinks.get(filePath);\n    if (!symlink) {\n      throw new FSError('EINVAL', filePath, 'is not a symlink');\n    }\n    return symlink;\n  }\n\n  // eslint-disable-next-line require-await\n  async readlink(filePath: FilePath): Promise<FilePath> {\n    return this.readlinkSync(filePath);\n  }\n\n  async symlink(target: FilePath, path: FilePath) {\n    target = this._normalizePath(target);\n    path = this._normalizePath(path);\n    this.symlinks.set(path, target);\n    await this._sendWorkerEvent({\n      type: 'symlink',\n      path,\n      target,\n    });\n  }\n\n  existsSync(filePath: FilePath): boolean {\n    filePath = this._normalizePath(filePath);\n    return this.files.has(filePath) || this.dirs.has(filePath);\n  }\n\n  // eslint-disable-next-line require-await\n  async exists(filePath: FilePath): Promise<boolean> {\n    return this.existsSync(filePath);\n  }\n\n  _triggerEvent(event: Event) {\n    this.events.push(event);\n    if (this.watchers.size === 0) {\n      return;\n    }\n\n    // Batch events\n    this._eventQueue.push(event);\n    clearTimeout(this._watcherTimer);\n\n    this._watcherTimer = setTimeout(() => {\n      let events = this._eventQueue;\n      this._eventQueue = [];\n\n      for (let [dir, watchers] of this.watchers) {\n        if (!dir.endsWith(path.sep)) {\n          dir += path.sep;\n        }\n\n        if (event.path.startsWith(dir)) {\n          for (let watcher of watchers) {\n            watcher.trigger(events);\n          }\n        }\n      }\n    }, 50);\n  }\n\n  _registerWorker(handle: Handle) {\n    this._workerHandles.push(handle);\n    if (this._numWorkerInstances === this._workerHandles.length) {\n      this._emitter.emit('allWorkersRegistered');\n    }\n  }\n\n  async _sendWorkerEvent(event: WorkerEvent) {\n    // Wait for worker instances to register their handles\n    while (this._workerHandles.length < this._numWorkerInstances) {\n      await new Promise(resolve => this._workerRegisterResolves.push(resolve));\n    }\n\n    await Promise.all(\n      this._workerHandles.map(workerHandle =>\n        this.farm.workerApi.runHandle(workerHandle, [event]),\n      ),\n    );\n  }\n\n  watch(\n    dir: FilePath,\n    fn: (err: ?Error, events: Array<Event>) => mixed,\n    opts: WatcherOptions,\n  ): Promise<AsyncSubscription> {\n    dir = this._normalizePath(dir);\n    let watcher = new Watcher(fn, opts);\n    let watchers = this.watchers.get(dir);\n    if (!watchers) {\n      watchers = new Set();\n      this.watchers.set(dir, watchers);\n    }\n\n    watchers.add(watcher);\n\n    return Promise.resolve({\n      unsubscribe: () => {\n        watchers = nullthrows(watchers);\n        watchers.delete(watcher);\n\n        if (watchers.size === 0) {\n          this.watchers.delete(dir);\n        }\n\n        return Promise.resolve();\n      },\n    });\n  }\n\n  async getEventsSince(\n    dir: FilePath,\n    snapshot: FilePath,\n    opts: WatcherOptions,\n  ): Promise<Array<Event>> {\n    let contents = await this.readFile(snapshot, 'utf8');\n    let len = Number(contents);\n    let events = this.events.slice(len);\n    let ignore = opts.ignore;\n    if (ignore) {\n      events = events.filter(\n        event => !ignore.some(i => event.path.startsWith(i + path.sep)),\n      );\n    }\n\n    return events;\n  }\n\n  async writeSnapshot(dir: FilePath, snapshot: FilePath): Promise<void> {\n    await this.writeFile(snapshot, '' + this.events.length);\n  }\n\n  findAncestorFile(\n    fileNames: Array<string>,\n    fromDir: FilePath,\n    root: FilePath,\n  ): ?FilePath {\n    return findAncestorFile(this, fileNames, fromDir, root);\n  }\n\n  findNodeModule(moduleName: string, fromDir: FilePath): ?FilePath {\n    return findNodeModule(this, moduleName, fromDir);\n  }\n\n  findFirstFile(filePaths: Array<FilePath>): ?FilePath {\n    return findFirstFile(this, filePaths);\n  }\n}\n\nclass Watcher {\n  fn: (err: ?Error, events: Array<Event>) => mixed;\n  options: WatcherOptions;\n\n  constructor(\n    fn: (err: ?Error, events: Array<Event>) => mixed,\n    options: WatcherOptions,\n  ) {\n    this.fn = fn;\n    this.options = options;\n  }\n\n  trigger(events: Array<Event>) {\n    let ignore = this.options.ignore;\n    if (ignore) {\n      events = events.filter(\n        event => !ignore.some(i => event.path.startsWith(i + path.sep)),\n      );\n    }\n\n    if (events.length > 0) {\n      this.fn(null, events);\n    }\n  }\n}\n\nexport class FSError extends Error {\n  code: string;\n  path: FilePath;\n  constructor(code: string, path: FilePath, message: string) {\n    super(`${code}: ${path} ${message}`);\n    this.name = 'FSError';\n    this.code = code;\n    this.path = path;\n    Error.captureStackTrace?.(this, this.constructor);\n  }\n}\n\nclass ReadStream extends Readable {\n  fs: FileSystem;\n  filePath: FilePath;\n  reading: boolean;\n  bytesRead: number;\n  constructor(fs: FileSystem, filePath: FilePath) {\n    super();\n    this.fs = fs;\n    this.filePath = filePath;\n    this.reading = false;\n    this.bytesRead = 0;\n  }\n\n  _read() {\n    if (this.reading) {\n      return;\n    }\n\n    this.reading = true;\n    this.fs.readFile(this.filePath).then(\n      res => {\n        this.bytesRead += res.byteLength;\n        this.push(res);\n        this.push(null);\n      },\n      err => {\n        this.emit('error', err);\n      },\n    );\n  }\n}\n\nclass WriteStream extends Writable {\n  fs: FileSystem;\n  filePath: FilePath;\n  options: ?FileOptions;\n  buffer: Buffer;\n\n  constructor(fs: FileSystem, filePath: FilePath, options: ?FileOptions) {\n    super({emitClose: true, autoDestroy: true});\n    this.fs = fs;\n    this.filePath = filePath;\n    this.options = options;\n    this.buffer = Buffer.alloc(0);\n  }\n\n  _write(\n    chunk: Buffer | string,\n    encoding: any,\n    callback: (error?: Error) => void,\n  ) {\n    let c = typeof chunk === 'string' ? Buffer.from(chunk, encoding) : chunk;\n    this.buffer = Buffer.concat([this.buffer, c]);\n    callback();\n  }\n\n  _final(callback: (error?: Error) => void) {\n    this.fs\n      .writeFile(this.filePath, this.buffer, this.options)\n      .then(callback)\n      .catch(callback);\n  }\n}\n\nconst S_IFREG = 0o100000;\nconst S_IFDIR = 0o040000;\nconst S_IFLNK = 0o120000;\nconst S_IFMT = 0o170000;\n\nclass Entry {\n  mode: number;\n  atime: number;\n  mtime: number;\n  ctime: number;\n  birthtime: number;\n  constructor(mode: number) {\n    this.mode = mode;\n    let now = Date.now();\n    this.atime = now;\n    this.mtime = now;\n    this.ctime = now;\n    this.birthtime = now;\n  }\n\n  access() {\n    let now = Date.now();\n    this.atime = now;\n    this.ctime = now;\n  }\n\n  modify(mode: number) {\n    let now = Date.now();\n    this.mtime = now;\n    this.ctime = now;\n    this.mode = mode;\n  }\n\n  getSize(): number {\n    return 0;\n  }\n\n  stat(): Stat {\n    return Stat.fromEntry(this);\n  }\n}\n\nclass Stat {\n  dev: number = 0;\n  ino: number = 0;\n  mode: number = 0;\n  nlink: number = 0;\n  uid: number = 0;\n  gid: number = 0;\n  rdev: number = 0;\n  size: number = 0;\n  blksize: number = 0;\n  blocks: number = 0;\n  atimeMs: number = 0;\n  mtimeMs: number = 0;\n  ctimeMs: number = 0;\n  birthtimeMs: number = 0;\n  atime: Date = new Date();\n  mtime: Date = new Date();\n  ctime: Date = new Date();\n  birthtime: Date = new Date();\n\n  static fromEntry(entry: Entry): Stat {\n    let stat = new Stat();\n    stat.mode = entry.mode;\n    stat.size = entry.getSize();\n    stat.atimeMs = entry.atime;\n    stat.mtimeMs = entry.mtime;\n    stat.ctimeMs = entry.ctime;\n    stat.birthtimeMs = entry.birthtime;\n    stat.atime = new Date(entry.atime);\n    stat.mtime = new Date(entry.mtime);\n    stat.ctime = new Date(entry.ctime);\n    stat.birthtime = new Date(entry.birthtime);\n    return stat;\n  }\n\n  isFile(): boolean {\n    return (this.mode & S_IFREG) === S_IFREG;\n  }\n\n  isDirectory(): boolean {\n    return (this.mode & S_IFDIR) === S_IFDIR;\n  }\n\n  isBlockDevice(): boolean {\n    return false;\n  }\n\n  isCharacterDevice(): boolean {\n    return false;\n  }\n\n  isSymbolicLink(): boolean {\n    return (this.mode & S_IFMT) === S_IFLNK;\n  }\n\n  isFIFO(): boolean {\n    return false;\n  }\n\n  isSocket(): boolean {\n    return false;\n  }\n}\n\nclass Dirent {\n  name: string;\n  #mode: number;\n\n  constructor(name: string, entry: interface {mode: number}) {\n    this.name = name;\n    this.#mode = entry.mode;\n  }\n\n  isFile(): boolean {\n    return (this.#mode & S_IFMT) === S_IFREG;\n  }\n\n  isDirectory(): boolean {\n    return (this.#mode & S_IFMT) === S_IFDIR;\n  }\n\n  isBlockDevice(): boolean {\n    return false;\n  }\n\n  isCharacterDevice(): boolean {\n    return false;\n  }\n\n  isSymbolicLink(): boolean {\n    return (this.#mode & S_IFMT) === S_IFLNK;\n  }\n\n  isFIFO(): boolean {\n    return false;\n  }\n\n  isSocket(): boolean {\n    return false;\n  }\n}\n\nexport class File extends Entry {\n  buffer: Buffer;\n  constructor(buffer: Buffer, mode: number) {\n    super(S_IFREG | mode);\n    this.buffer = buffer;\n  }\n\n  read(): Buffer {\n    super.access();\n    return Buffer.from(this.buffer);\n  }\n\n  write(buffer: Buffer, mode: number) {\n    super.modify(S_IFREG | mode);\n    this.buffer = buffer;\n  }\n\n  getSize(): number {\n    return this.buffer.byteLength;\n  }\n}\n\nclass Directory extends Entry {\n  constructor() {\n    super(S_IFDIR);\n  }\n}\n\nexport function makeShared(contents: Buffer | string): Buffer {\n  if (typeof contents !== 'string' && contents.buffer instanceof SharedBuffer) {\n    return contents;\n  }\n\n  let contentsBuffer: Buffer | string = contents;\n  // $FlowFixMe\n  if (process.browser) {\n    // For the polyfilled buffer module, it's faster to always convert once so that the subsequent\n    // operations are fast (.byteLength and using .set instead of .write)\n    contentsBuffer =\n      contentsBuffer instanceof Buffer\n        ? contentsBuffer\n        : Buffer.from(contentsBuffer);\n  }\n\n  let length = Buffer.byteLength(contentsBuffer);\n  let shared = new SharedBuffer(length);\n  let buffer = Buffer.from(shared);\n  if (length > 0) {\n    if (typeof contentsBuffer === 'string') {\n      buffer.write(contentsBuffer);\n    } else {\n      buffer.set(contentsBuffer);\n    }\n  }\n\n  return buffer;\n}\n\nclass WorkerFS extends MemoryFS {\n  id: number;\n  handleFn: HandleFunction;\n\n  constructor(id: number, handle: Handle) {\n    // TODO Make this not a subclass\n    // $FlowFixMe\n    super();\n    this.id = id;\n    this.handleFn = (methodName, args) =>\n      WorkerFarm.getWorkerApi().runHandle(handle, [methodName, args]);\n\n    this.handleFn('_registerWorker', [\n      WorkerFarm.getWorkerApi().createReverseHandle(event => {\n        switch (event.type) {\n          case 'writeFile':\n            this.files.set(event.path, event.entry);\n            break;\n          case 'unlink':\n            this.files.delete(event.path);\n            this.dirs.delete(event.path);\n            this.symlinks.delete(event.path);\n            break;\n          case 'mkdir':\n            this.dirs.set(event.path, new Directory());\n            break;\n          case 'symlink':\n            this.symlinks.set(event.path, event.target);\n            break;\n        }\n      }),\n    ]);\n  }\n\n  static deserialize(opts: SerializedMemoryFS): MemoryFS {\n    return nullthrows(instances.get(opts.id));\n  }\n\n  serialize(): SerializedMemoryFS {\n    // $FlowFixMe\n    return {\n      id: this.id,\n    };\n  }\n\n  writeFile(\n    filePath: FilePath,\n    contents: Buffer | string,\n    options: ?FileOptions,\n  ): Promise<void> {\n    super.writeFile(filePath, contents, options);\n    let buffer = makeShared(contents);\n    return this.handleFn('writeFile', [filePath, buffer, options]);\n  }\n\n  unlink(filePath: FilePath): Promise<void> {\n    super.unlink(filePath);\n    return this.handleFn('unlink', [filePath]);\n  }\n\n  mkdirp(dir: FilePath): Promise<void> {\n    super.mkdirp(dir);\n    return this.handleFn('mkdirp', [dir]);\n  }\n\n  rimraf(filePath: FilePath): Promise<void> {\n    super.rimraf(filePath);\n    return this.handleFn('rimraf', [filePath]);\n  }\n\n  ncp(source: FilePath, destination: FilePath): Promise<void> {\n    super.ncp(source, destination);\n    return this.handleFn('ncp', [source, destination]);\n  }\n\n  symlink(target: FilePath, path: FilePath): Promise<void> {\n    super.symlink(target, path);\n    return this.handleFn('symlink', [target, path]);\n  }\n}\n\nregisterSerializableClass(`${packageJSON.version}:MemoryFS`, MemoryFS);\nregisterSerializableClass(`${packageJSON.version}:WorkerFS`, WorkerFS);\nregisterSerializableClass(`${packageJSON.version}:Stat`, Stat);\nregisterSerializableClass(`${packageJSON.version}:File`, File);\nregisterSerializableClass(`${packageJSON.version}:Directory`, Directory);\n"
  },
  {
    "path": "packages/core/fs/src/NodeFS.browser.js",
    "content": "// @flow\nimport type {FileSystem} from '@parcel/types-internal';\n\n// $FlowFixMe[prop-missing] handled by the throwing constructor\nexport class NodeFS implements FileSystem {\n  constructor() {\n    throw new Error(\"NodeFS isn't available in the browser\");\n  }\n}\n"
  },
  {
    "path": "packages/core/fs/src/NodeFS.js",
    "content": "// @flow\nimport type {ReadStream, Stats} from 'fs';\nimport type {Writable} from 'stream';\nimport type {\n  FilePath,\n  Encoding,\n  FileOptions,\n  FileSystem,\n} from '@parcel/types-internal';\nimport type {\n  Event,\n  Options as WatcherOptions,\n  AsyncSubscription,\n} from '@parcel/watcher';\n\nimport fs from 'graceful-fs';\nimport nativeFS from 'fs';\nimport ncp from 'ncp';\nimport path from 'path';\nimport {tmpdir} from 'os';\nimport {promisify} from 'util';\nimport {registerSerializableClass} from '@parcel/core';\nimport {hashFile} from '@parcel/utils';\nimport {getFeatureFlag} from '@parcel/feature-flags';\nimport watcher from '@parcel/watcher';\nimport packageJSON from '../package.json';\n\nimport * as searchNative from '@parcel/rust';\nimport * as searchJS from './find';\n\n// Most of this can go away once we only support Node 10+, which includes\n// require('fs').promises\n\nconst realpath = promisify(\n  process.platform === 'win32' ? fs.realpath : fs.realpath.native,\n);\nconst isPnP = process.versions.pnp != null;\n\nfunction getWatchmanWatcher(): typeof watcher {\n  // This is here to trick parcel into ignoring this require...\n  const packageName = ['@parcel', 'watcher-watchman-js'].join('/');\n\n  // $FlowFixMe\n  return require(packageName);\n}\n\nexport class NodeFS implements FileSystem {\n  readFile: any = promisify(fs.readFile);\n  copyFile: any = promisify(fs.copyFile);\n  stat: any = promisify(fs.stat);\n  lstat: any = promisify(fs.lstat);\n  readdir: any = promisify(fs.readdir);\n  symlink: any = promisify(fs.symlink);\n  readlink: any = promisify(fs.readlink);\n  unlink: any = promisify(fs.unlink);\n  utimes: any = promisify(fs.utimes);\n  ncp: any = promisify(ncp);\n  createReadStream: (path: string, options?: any) => ReadStream =\n    fs.createReadStream;\n  cwd: () => string = () => process.cwd();\n  chdir: (directory: string) => void = directory => process.chdir(directory);\n\n  statSync: (path: string) => Stats = path => fs.statSync(path);\n  lstatSync: (path: string) => Stats = path => fs.lstatSync(path);\n  realpathSync: (path: string, cache?: any) => string =\n    process.platform === 'win32' ? fs.realpathSync : fs.realpathSync.native;\n  readlinkSync: any = (fs.readlinkSync: any);\n  existsSync: (path: string) => boolean = fs.existsSync;\n  readdirSync: any = (fs.readdirSync: any);\n  findAncestorFile: any = isPnP\n    ? (...args) => searchJS.findAncestorFile(this, ...args)\n    : searchNative.findAncestorFile;\n  findNodeModule: any = isPnP\n    ? (...args) => searchJS.findNodeModule(this, ...args)\n    : searchNative.findNodeModule;\n  findFirstFile: any = isPnP\n    ? (...args) => searchJS.findFirstFile(this, ...args)\n    : searchNative.findFirstFile;\n\n  watcher(): typeof watcher {\n    return getFeatureFlag('useWatchmanWatcher')\n      ? getWatchmanWatcher()\n      : watcher;\n  }\n\n  createWriteStream(filePath: string, options: any): Writable {\n    // Make createWriteStream atomic\n    let tmpFilePath = getTempFilePath(filePath);\n    let failed = false;\n\n    const move = async () => {\n      if (!failed) {\n        try {\n          await fs.promises.rename(tmpFilePath, filePath);\n        } catch (e) {\n          // This is adapted from fs-write-stream-atomic. Apparently\n          // Windows doesn't like renaming when the target already exists.\n          if (\n            process.platform === 'win32' &&\n            e.syscall &&\n            e.syscall === 'rename' &&\n            e.code &&\n            e.code === 'EPERM'\n          ) {\n            let [hashTmp, hashTarget] = await Promise.all([\n              hashFile(this, tmpFilePath),\n              hashFile(this, filePath),\n            ]);\n\n            await this.unlink(tmpFilePath);\n\n            if (hashTmp != hashTarget) {\n              throw e;\n            }\n          }\n        }\n      }\n    };\n\n    let writeStream = fs.createWriteStream(tmpFilePath, {\n      ...options,\n      fs: {\n        ...fs,\n        close: (fd, cb) => {\n          fs.close(fd, err => {\n            if (err) {\n              cb(err);\n            } else {\n              move().then(\n                () => cb(),\n                err => cb(err),\n              );\n            }\n          });\n        },\n      },\n    });\n\n    writeStream.once('error', () => {\n      failed = true;\n      fs.unlinkSync(tmpFilePath);\n    });\n\n    return writeStream;\n  }\n\n  async writeFile(\n    filePath: FilePath,\n    contents: Buffer | string,\n    options: ?FileOptions,\n  ): Promise<void> {\n    let tmpFilePath = getTempFilePath(filePath);\n    await fs.promises.writeFile(tmpFilePath, contents, options);\n    await fs.promises.rename(tmpFilePath, filePath);\n  }\n\n  readFileSync(filePath: FilePath, encoding?: Encoding): any {\n    if (encoding != null) {\n      return fs.readFileSync(filePath, encoding);\n    }\n    return fs.readFileSync(filePath);\n  }\n\n  async realpath(originalPath: string): Promise<string> {\n    try {\n      return await realpath(originalPath, 'utf8');\n    } catch (e) {\n      // do nothing\n    }\n\n    return originalPath;\n  }\n\n  exists(filePath: FilePath): Promise<boolean> {\n    return new Promise(resolve => {\n      fs.exists(filePath, resolve);\n    });\n  }\n\n  watch(\n    dir: FilePath,\n    fn: (err: ?Error, events: Array<Event>) => mixed,\n    opts: WatcherOptions,\n  ): Promise<AsyncSubscription> {\n    return this.watcher().subscribe(dir, fn, opts);\n  }\n\n  getEventsSince(\n    dir: FilePath,\n    snapshot: FilePath,\n    opts: WatcherOptions,\n  ): Promise<Array<Event>> {\n    return this.watcher().getEventsSince(dir, snapshot, opts);\n  }\n\n  async writeSnapshot(\n    dir: FilePath,\n    snapshot: FilePath,\n    opts: WatcherOptions,\n  ): Promise<void> {\n    await this.watcher().writeSnapshot(dir, snapshot, opts);\n  }\n\n  static deserialize(): NodeFS {\n    return new NodeFS();\n  }\n\n  serialize(): null {\n    return null;\n  }\n\n  async mkdirp(filePath: FilePath): Promise<void> {\n    await nativeFS.promises.mkdir(filePath, {recursive: true});\n  }\n\n  async rimraf(filePath: FilePath): Promise<void> {\n    if (fs.promises.rm) {\n      await fs.promises.rm(filePath, {recursive: true, force: true});\n      return;\n    }\n\n    // fs.promises.rm is not supported in node 12...\n    let stat;\n    try {\n      stat = await this.stat(filePath);\n    } catch (err) {\n      return;\n    }\n\n    if (stat.isDirectory()) {\n      // $FlowFixMe\n      await nativeFS.promises.rmdir(filePath, {recursive: true});\n    } else {\n      await nativeFS.promises.unlink(filePath);\n    }\n  }\n}\n\nregisterSerializableClass(`${packageJSON.version}:NodeFS`, NodeFS);\n\nlet writeStreamCalls = 0;\n\nlet threadId;\ntry {\n  ({threadId} = require('worker_threads'));\n} catch {\n  //\n}\n\nlet useOsTmpDir;\n\nfunction shouldUseOsTmpDir(filePath) {\n  if (useOsTmpDir != null) {\n    return useOsTmpDir;\n  }\n  try {\n    const tmpDir = tmpdir();\n    nativeFS.accessSync(\n      tmpDir,\n      nativeFS.constants.R_OK | nativeFS.constants.W_OK,\n    );\n    const tmpDirStats = nativeFS.statSync(tmpDir);\n    const filePathStats = nativeFS.statSync(filePath);\n    // Check the tmpdir is on the same partition as the target directory.\n    // This is required to ensure renaming is an atomic operation.\n    useOsTmpDir = tmpDirStats.dev === filePathStats.dev;\n  } catch (e) {\n    // We don't have read/write access to the OS tmp directory\n    useOsTmpDir = false;\n  }\n  return useOsTmpDir;\n}\n\n// Generate a temporary file path used for atomic writing of files.\nfunction getTempFilePath(filePath: FilePath) {\n  writeStreamCalls = writeStreamCalls % Number.MAX_SAFE_INTEGER;\n\n  let tmpFilePath = filePath;\n\n  // If possible, write the tmp file to the OS tmp directory\n  // This reduces the amount of FS events the watcher needs to process during the build\n  if (shouldUseOsTmpDir(filePath)) {\n    tmpFilePath = path.join(tmpdir(), path.basename(filePath));\n  }\n\n  return (\n    tmpFilePath +\n    '.' +\n    process.pid +\n    (threadId != null ? '.' + threadId : '') +\n    '.' +\n    (writeStreamCalls++).toString(36)\n  );\n}\n"
  },
  {
    "path": "packages/core/fs/src/OverlayFS.js",
    "content": "// @flow\n\nimport type {Readable, Writable} from 'stream';\nimport type {\n  FilePath,\n  Encoding,\n  FileOptions,\n  FileSystem,\n  ReaddirOptions,\n  FileStats,\n} from '@parcel/types-internal';\nimport type {\n  Event,\n  Options as WatcherOptions,\n  AsyncSubscription,\n} from '@parcel/watcher';\n\nimport {registerSerializableClass} from '@parcel/core';\nimport WorkerFarm from '@parcel/workers';\nimport packageJSON from '../package.json';\nimport {findAncestorFile, findNodeModule, findFirstFile} from './find';\nimport {MemoryFS} from './MemoryFS';\n\nimport nullthrows from 'nullthrows';\nimport path from 'path';\n\nexport class OverlayFS implements FileSystem {\n  deleted: Set<FilePath> = new Set();\n  writable: FileSystem;\n  readable: FileSystem;\n  _cwd: FilePath;\n\n  constructor(workerFarmOrFS: WorkerFarm | FileSystem, readable: FileSystem) {\n    if (workerFarmOrFS instanceof WorkerFarm) {\n      this.writable = new MemoryFS(workerFarmOrFS);\n    } else {\n      this.writable = workerFarmOrFS;\n    }\n    this.readable = readable;\n    this._cwd = readable.cwd();\n  }\n\n  static deserialize(opts: any): OverlayFS {\n    let fs = new OverlayFS(opts.writable, opts.readable);\n    if (opts.deleted != null) fs.deleted = opts.deleted;\n    return fs;\n  }\n\n  serialize(): {|\n    $$raw: boolean,\n    readable: FileSystem,\n    writable: FileSystem,\n    deleted: Set<FilePath>,\n  |} {\n    return {\n      $$raw: false,\n      writable: this.writable,\n      readable: this.readable,\n      deleted: this.deleted,\n    };\n  }\n\n  _deletedThrows(filePath: FilePath): FilePath {\n    filePath = this._normalizePath(filePath);\n    if (this.deleted.has(filePath)) {\n      throw new FSError('ENOENT', filePath, 'does not exist');\n    }\n    return filePath;\n  }\n\n  _checkExists(filePath: FilePath): FilePath {\n    filePath = this._deletedThrows(filePath);\n    if (!this.existsSync(filePath)) {\n      throw new FSError('ENOENT', filePath, 'does not exist');\n    }\n    return filePath;\n  }\n\n  _isSymlink(filePath: FilePath): boolean {\n    filePath = this._normalizePath(filePath);\n    // Check the parts of the path to see if any are symlinks.\n    let {root, dir, base} = path.parse(filePath);\n    let segments = dir.slice(root.length).split(path.sep).concat(base);\n    while (segments.length) {\n      filePath = path.join(root, ...segments);\n      let name = segments.pop();\n      if (this.deleted.has(filePath)) {\n        return false;\n      } else if (\n        this.writable instanceof MemoryFS &&\n        this.writable.symlinks.has(filePath)\n      ) {\n        return true;\n      } else {\n        // HACK: Parcel fs does not provide `lstatSync`,\n        // so we use `readdirSync` to check if the path is a symlink.\n        let parent = path.resolve(filePath, '..');\n        if (parent === filePath) {\n          return false;\n        }\n        try {\n          for (let dirent of this.readdirSync(parent, {withFileTypes: true})) {\n            if (typeof dirent === 'string') {\n              break; // {withFileTypes: true} not supported\n            } else if (dirent.name === name) {\n              if (dirent.isSymbolicLink()) {\n                return true;\n              }\n            }\n          }\n        } catch (e) {\n          if (e.code === 'ENOENT') {\n            return false;\n          }\n          throw e;\n        }\n      }\n    }\n\n    return false;\n  }\n\n  async _copyPathForWrite(filePath: FilePath): Promise<FilePath> {\n    filePath = await this._normalizePath(filePath);\n    let dirPath = path.dirname(filePath);\n    if (this.existsSync(dirPath) && !this.writable.existsSync(dirPath)) {\n      await this.writable.mkdirp(dirPath);\n    }\n    return filePath;\n  }\n\n  _normalizePath(filePath: FilePath): FilePath {\n    return path.resolve(this.cwd(), filePath);\n  }\n\n  // eslint-disable-next-line require-await\n  async readFile(filePath: FilePath, encoding?: Encoding): Promise<any> {\n    return this.readFileSync(filePath, encoding);\n  }\n\n  async writeFile(\n    filePath: FilePath,\n    contents: string | Buffer,\n    options: ?FileOptions,\n  ): Promise<void> {\n    filePath = await this._copyPathForWrite(filePath);\n    await this.writable.writeFile(filePath, contents, options);\n    this.deleted.delete(filePath);\n  }\n\n  async copyFile(source: FilePath, destination: FilePath): Promise<void> {\n    source = this._normalizePath(source);\n    destination = await this._copyPathForWrite(destination);\n\n    if (await this.writable.exists(source)) {\n      await this.writable.writeFile(\n        destination,\n        await this.writable.readFile(source),\n      );\n    } else {\n      await this.writable.writeFile(\n        destination,\n        await this.readable.readFile(source),\n      );\n    }\n\n    this.deleted.delete(destination);\n  }\n\n  // eslint-disable-next-line require-await\n  async stat(filePath: FilePath): Promise<FileStats> {\n    return this.statSync(filePath);\n  }\n\n  // eslint-disable-next-line require-await\n  async lstat(filePath: FilePath): Promise<FileStats> {\n    return this.lstatSync(filePath);\n  }\n\n  async symlink(target: FilePath, filePath: FilePath): Promise<void> {\n    target = this._normalizePath(target);\n    filePath = this._normalizePath(filePath);\n    await this.writable.symlink(target, filePath);\n    this.deleted.delete(filePath);\n  }\n\n  async unlink(filePath: FilePath): Promise<void> {\n    filePath = this._normalizePath(filePath);\n\n    let toDelete = [filePath];\n\n    if (this.writable instanceof MemoryFS && this._isSymlink(filePath)) {\n      this.writable.symlinks.delete(filePath);\n    } else if (this.statSync(filePath).isDirectory()) {\n      let stack = [filePath];\n\n      // Recursively add every descendant path to deleted.\n      while (stack.length) {\n        let root = nullthrows(stack.pop());\n        for (let ent of this.readdirSync(root, {withFileTypes: true})) {\n          if (typeof ent === 'string') {\n            let childPath = path.join(root, ent);\n            toDelete.push(childPath);\n            if (this.statSync(childPath).isDirectory()) {\n              stack.push(childPath);\n            }\n          } else {\n            let childPath = path.join(root, ent.name);\n            toDelete.push(childPath);\n            if (ent.isDirectory()) {\n              stack.push(childPath);\n            }\n          }\n        }\n      }\n    }\n\n    try {\n      await this.writable.unlink(filePath);\n    } catch (e) {\n      if (e.code === 'ENOENT' && !this.readable.existsSync(filePath)) {\n        throw e;\n      }\n    }\n\n    for (let pathToDelete of toDelete) {\n      this.deleted.add(pathToDelete);\n    }\n  }\n\n  async mkdirp(dir: FilePath): Promise<void> {\n    dir = this._normalizePath(dir);\n    await this.writable.mkdirp(dir);\n\n    if (this.deleted != null) {\n      let root = path.parse(dir).root;\n      while (dir !== root) {\n        this.deleted.delete(dir);\n        dir = path.dirname(dir);\n      }\n    }\n  }\n\n  async rimraf(filePath: FilePath): Promise<void> {\n    try {\n      await this.unlink(filePath);\n    } catch (e) {\n      // noop\n    }\n  }\n\n  // eslint-disable-next-line require-await\n  async ncp(source: FilePath, destination: FilePath): Promise<void> {\n    // TODO: Implement this correctly.\n    return this.writable.ncp(source, destination);\n  }\n\n  createReadStream(filePath: FilePath, opts?: ?FileOptions): Readable {\n    filePath = this._deletedThrows(filePath);\n    if (this.writable.existsSync(filePath)) {\n      return this.writable.createReadStream(filePath, opts);\n    }\n\n    return this.readable.createReadStream(filePath, opts);\n  }\n\n  createWriteStream(path: FilePath, opts?: ?FileOptions): Writable {\n    path = this._normalizePath(path);\n    this.deleted.delete(path);\n    return this.writable.createWriteStream(path, opts);\n  }\n\n  cwd(): FilePath {\n    return this._cwd;\n  }\n\n  chdir(path: FilePath): void {\n    this._cwd = this._checkExists(path);\n  }\n\n  // eslint-disable-next-line require-await\n  async realpath(filePath: FilePath): Promise<FilePath> {\n    return this.realpathSync(filePath);\n  }\n\n  readFileSync(filePath: FilePath, encoding?: Encoding): any {\n    filePath = this.realpathSync(filePath);\n    try {\n      // $FlowFixMe[incompatible-call]\n      return this.writable.readFileSync(filePath, encoding);\n    } catch (err) {\n      // $FlowFixMe[incompatible-call]\n      return this.readable.readFileSync(filePath, encoding);\n    }\n  }\n\n  statSync(filePath: FilePath): FileStats {\n    filePath = this._normalizePath(filePath);\n    try {\n      return this.writable.statSync(filePath);\n    } catch (e) {\n      if (e.code === 'ENOENT' && this.existsSync(filePath)) {\n        return this.readable.statSync(filePath);\n      }\n      throw e;\n    }\n  }\n\n  lstatSync(filePath: FilePath): FileStats {\n    filePath = this._normalizePath(filePath);\n    try {\n      return this.writable.lstatSync(filePath);\n    } catch (e) {\n      if (e.code === 'ENOENT') {\n        return this.readable.lstatSync(filePath);\n      }\n      throw e;\n    }\n  }\n\n  realpathSync(filePath: FilePath): FilePath {\n    filePath = this._deletedThrows(filePath);\n    filePath = this._deletedThrows(this.writable.realpathSync(filePath));\n    if (!this.writable.existsSync(filePath)) {\n      return this.readable.realpathSync(filePath);\n    }\n    return filePath;\n  }\n\n  readlinkSync(filePath: FilePath): FilePath {\n    filePath = this._deletedThrows(filePath);\n    try {\n      return this.writable.readlinkSync(filePath);\n    } catch (err) {\n      return this.readable.readlinkSync(filePath);\n    }\n  }\n\n  // eslint-disable-next-line require-await\n  async readlink(filePath: FilePath): Promise<FilePath> {\n    return this.readlinkSync(filePath);\n  }\n\n  // eslint-disable-next-line require-await\n  async exists(filePath: FilePath): Promise<boolean> {\n    return this.existsSync(filePath);\n  }\n\n  existsSync(filePath: FilePath): boolean {\n    filePath = this._normalizePath(filePath);\n    if (this.deleted.has(filePath)) return false;\n\n    try {\n      filePath = this.realpathSync(filePath);\n    } catch (err) {\n      if (err.code !== 'ENOENT') throw err;\n    }\n\n    if (this.deleted.has(filePath)) return false;\n\n    return (\n      this.writable.existsSync(filePath) || this.readable.existsSync(filePath)\n    );\n  }\n\n  // eslint-disable-next-line require-await\n  async readdir(path: FilePath, opts?: ReaddirOptions): Promise<any> {\n    return this.readdirSync(path, opts);\n  }\n\n  readdirSync(dir: FilePath, opts?: ReaddirOptions): any {\n    dir = this.realpathSync(dir);\n    // Read from both filesystems and merge the results\n    let entries = new Map();\n\n    try {\n      for (let entry: any of this.writable.readdirSync(dir, opts)) {\n        let filePath = path.join(dir, entry.name ?? entry);\n        if (this.deleted.has(filePath)) continue;\n        entries.set(filePath, entry);\n      }\n    } catch {\n      // noop\n    }\n\n    try {\n      for (let entry: any of this.readable.readdirSync(dir, opts)) {\n        let filePath = path.join(dir, entry.name ?? entry);\n        if (this.deleted.has(filePath)) continue;\n        if (entries.has(filePath)) continue;\n        entries.set(filePath, entry);\n      }\n    } catch {\n      // noop\n    }\n\n    return Array.from(entries.values());\n  }\n\n  async watch(\n    dir: FilePath,\n    fn: (err: ?Error, events: Array<Event>) => mixed,\n    opts: WatcherOptions,\n  ): Promise<AsyncSubscription> {\n    let writableSubscription = await this.writable.watch(dir, fn, opts);\n    let readableSubscription = await this.readable.watch(dir, fn, opts);\n    return {\n      unsubscribe: async () => {\n        await writableSubscription.unsubscribe();\n        await readableSubscription.unsubscribe();\n      },\n    };\n  }\n\n  async getEventsSince(\n    dir: FilePath,\n    snapshot: FilePath,\n    opts: WatcherOptions,\n  ): Promise<Array<Event>> {\n    let writableEvents = await this.writable.getEventsSince(\n      dir,\n      snapshot,\n      opts,\n    );\n    let readableEvents = await this.readable.getEventsSince(\n      dir,\n      snapshot,\n      opts,\n    );\n    return [...writableEvents, ...readableEvents];\n  }\n\n  async writeSnapshot(\n    dir: FilePath,\n    snapshot: FilePath,\n    opts: WatcherOptions,\n  ): Promise<void> {\n    await this.writable.writeSnapshot(dir, snapshot, opts);\n  }\n\n  findAncestorFile(\n    fileNames: Array<string>,\n    fromDir: FilePath,\n    root: FilePath,\n  ): ?FilePath {\n    return findAncestorFile(this, fileNames, fromDir, root);\n  }\n\n  findNodeModule(moduleName: string, fromDir: FilePath): ?FilePath {\n    return findNodeModule(this, moduleName, fromDir);\n  }\n\n  findFirstFile(filePaths: Array<FilePath>): ?FilePath {\n    return findFirstFile(this, filePaths);\n  }\n}\n\nclass FSError extends Error {\n  code: string;\n  path: FilePath;\n  constructor(code: string, path: FilePath, message: string) {\n    super(`${code}: ${path} ${message}`);\n    this.name = 'FSError';\n    this.code = code;\n    this.path = path;\n    Error.captureStackTrace?.(this, this.constructor);\n  }\n}\n\nregisterSerializableClass(`${packageJSON.version}:OverlayFS`, OverlayFS);\n"
  },
  {
    "path": "packages/core/fs/src/find.js",
    "content": "// @flow\nimport type {FilePath, FileSystem} from '@parcel/types-internal';\nimport path from 'path';\n\nexport function findNodeModule(\n  fs: FileSystem,\n  moduleName: string,\n  dir: FilePath,\n): ?FilePath {\n  let {root} = path.parse(dir);\n  while (dir !== root) {\n    // Skip node_modules directories\n    if (path.basename(dir) === 'node_modules') {\n      dir = path.dirname(dir);\n    }\n\n    try {\n      let moduleDir = path.join(dir, 'node_modules', moduleName);\n      let stats = fs.statSync(moduleDir);\n      if (stats.isDirectory()) {\n        return moduleDir;\n      }\n    } catch (err) {\n      // ignore\n    }\n\n    // Move up a directory\n    dir = path.dirname(dir);\n  }\n\n  return null;\n}\n\nexport function findAncestorFile(\n  fs: FileSystem,\n  fileNames: Array<string>,\n  dir: FilePath,\n  root: FilePath,\n): ?FilePath {\n  let {root: pathRoot} = path.parse(dir);\n  // eslint-disable-next-line no-constant-condition\n  while (true) {\n    if (path.basename(dir) === 'node_modules') {\n      return null;\n    }\n\n    for (const fileName of fileNames) {\n      let filePath = path.join(dir, fileName);\n      try {\n        if (fs.statSync(filePath).isFile()) {\n          return filePath;\n        }\n      } catch (err) {\n        // ignore\n      }\n    }\n\n    if (dir === root || dir === pathRoot) {\n      break;\n    }\n\n    dir = path.dirname(dir);\n  }\n\n  return null;\n}\n\nexport function findFirstFile(\n  fs: FileSystem,\n  filePaths: Array<FilePath>,\n): ?FilePath {\n  for (let filePath of filePaths) {\n    try {\n      if (fs.statSync(filePath).isFile()) {\n        return filePath;\n      }\n    } catch (err) {\n      // ignore\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/fs/src/index.js",
    "content": "// @flow strict-local\nimport type {FilePath, FileSystem, FileOptions} from '@parcel/types-internal';\nimport type {Readable, Writable} from 'stream';\n\nimport path from 'path';\nimport stream from 'stream';\nimport {promisify} from 'util';\n\nexport * from './NodeFS';\nexport * from './MemoryFS';\nexport * from './OverlayFS';\n\nexport type {FileSystem, FileOptions};\n\nconst pipeline: (Readable, Writable) => Promise<void> = promisify(\n  stream.pipeline,\n);\n\n// Recursively copies a directory from the sourceFS to the destinationFS\nexport async function ncp(\n  sourceFS: FileSystem,\n  source: FilePath,\n  destinationFS: FileSystem,\n  destination: FilePath,\n) {\n  await destinationFS.mkdirp(destination);\n  let files = await sourceFS.readdir(source);\n  for (let file of files) {\n    let sourcePath = path.join(source, file);\n    let destPath = path.join(destination, file);\n    let stats = await sourceFS.stat(sourcePath);\n    if (stats.isFile()) {\n      await pipeline(\n        sourceFS.createReadStream(sourcePath),\n        destinationFS.createWriteStream(destPath),\n      );\n    } else if (stats.isDirectory()) {\n      await ncp(sourceFS, sourcePath, destinationFS, destPath);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/fs/test/OverlayFS.test.js",
    "content": "// @flow\n\nimport {OverlayFS} from '../src/OverlayFS';\nimport {fsFixture} from '@parcel/test-utils/src/fsFixture';\nimport {MemoryFS} from '../src/MemoryFS';\nimport WorkerFarm from '@parcel/workers';\n\nimport assert from 'assert';\nimport path from 'path';\n\ndescribe('OverlayFS', () => {\n  let underlayFS;\n  let fs;\n  let workerFarm;\n\n  beforeEach(() => {\n    workerFarm = new WorkerFarm({\n      workerPath: require.resolve('@parcel/core/src/worker.js'),\n    });\n    underlayFS = new MemoryFS(workerFarm);\n    fs = new OverlayFS(workerFarm, underlayFS);\n  });\n\n  afterEach(async () => {\n    await workerFarm.end();\n  });\n\n  it('copies on write', async () => {\n    await fsFixture(underlayFS)`\n      foo: foo\n    `;\n\n    assert.equal(fs.readFileSync('foo', 'utf8'), 'foo');\n\n    await fs.writeFile('foo', 'bar');\n\n    assert.equal(fs.readFileSync('foo', 'utf8'), 'bar');\n    assert.equal(underlayFS.readFileSync('foo', 'utf8'), 'foo');\n  });\n\n  it('copies on write with dir', async () => {\n    await fsFixture(underlayFS)`\n      foo/foo: foo\n    `;\n\n    assert.equal(fs.readFileSync('foo/foo', 'utf8'), 'foo');\n\n    await fs.writeFile('foo/bar', 'bar');\n\n    assert.equal(fs.readFileSync('foo/bar', 'utf8'), 'bar');\n    assert(!underlayFS.existsSync('foo/bar'));\n  });\n\n  it('copies on write when copying', async () => {\n    await fsFixture(underlayFS)`\n      foo: foo\n    `;\n\n    assert.equal(fs.readFileSync('foo', 'utf8'), 'foo');\n\n    await fs.copyFile('foo', 'bar');\n    assert.equal(fs.readFileSync('bar', 'utf8'), 'foo');\n    assert(!underlayFS.existsSync('bar'));\n  });\n\n  it('copies on write when copying with dir', async () => {\n    await fsFixture(underlayFS)`\n      foo/foo: foo\n      bar\n    `;\n\n    assert.equal(fs.readFileSync('foo/foo', 'utf8'), 'foo');\n\n    await fs.copyFile('foo/foo', 'bar/bar');\n    assert.equal(fs.readFileSync('bar/bar', 'utf8'), 'foo');\n    assert(!underlayFS.existsSync('bar/bar'));\n  });\n\n  it('writes to memory', async () => {\n    await fs.writeFile('foo', 'foo');\n\n    assert.equal(fs.readFileSync('foo', 'utf8'), 'foo');\n    assert(!underlayFS.existsSync('foo'));\n  });\n\n  it('symlinks in memory', async () => {\n    await fsFixture(underlayFS)`\n      foo: foo\n    `;\n\n    assert(fs.existsSync('foo'));\n\n    await fs.symlink('foo', 'bar');\n\n    assert.equal(fs.readFileSync('bar', 'utf8'), 'foo');\n    assert.equal(underlayFS.readFileSync('foo', 'utf8'), 'foo');\n    assert.equal(fs.realpathSync('bar'), path.resolve('/foo'));\n    assert(!underlayFS.existsSync('bar'));\n  });\n\n  it('tracks deletes', async () => {\n    await fsFixture(underlayFS)`\n      foo: bar\n      baz -> foo`;\n\n    assert(fs.existsSync('foo'));\n    assert.equal(fs.realpathSync('baz'), path.resolve('/foo'));\n    assert(fs._isSymlink('baz'));\n\n    await fs.rimraf('foo');\n\n    assert(!fs.existsSync('foo'));\n    assert(fs._isSymlink('baz'));\n    assert(!fs.existsSync('baz'));\n    assert(underlayFS.existsSync('foo'));\n    assert(underlayFS.existsSync('baz'));\n  });\n\n  it('tracks unlinks', async () => {\n    await fsFixture(underlayFS)`\n      foo: bar\n      baz -> foo`;\n\n    assert(fs.existsSync('baz'));\n    assert.equal(fs.realpathSync('baz'), path.resolve('/foo'));\n    assert(fs._isSymlink('baz'));\n\n    await fs.unlink('baz');\n\n    assert(!fs._isSymlink('baz'));\n    assert(!fs.existsSync('baz'));\n    assert(fs.existsSync('foo'));\n    assert(underlayFS.existsSync('foo'));\n    assert(underlayFS.existsSync('baz'));\n    assert.equal(underlayFS.realpathSync('baz'), path.resolve('/foo'));\n  });\n\n  it('tracks nested deletes', async () => {\n    await fsFixture(underlayFS)`\n      foo/bar: baz\n      foo/bat/baz: qux\n    `;\n\n    assert(fs.existsSync('foo/bar'));\n    assert(fs.existsSync('foo/bat/baz'));\n\n    await fs.rimraf('foo');\n\n    assert(!fs.existsSync('foo/bar'));\n    assert(!fs.existsSync('foo/bat/baz'));\n    assert(underlayFS.existsSync('foo/bar'));\n    assert(underlayFS.existsSync('foo/bat/baz'));\n\n    await fs.mkdirp('foo');\n\n    assert(fs.existsSync('foo'));\n    assert(!fs.existsSync('foo/bar'));\n    assert(!fs.existsSync('foo/baz/bat'));\n\n    await fs.mkdirp('foo/baz');\n    assert(fs.existsSync('foo/baz'));\n    assert(!fs.existsSync('foo/baz/bat'));\n  });\n\n  it('supports changing to a dir that is only on the readable fs', async () => {\n    await fsFixture(underlayFS)`\n      foo/bar: baz\n    `;\n\n    assert.equal(fs.cwd(), path.resolve('/'));\n    fs.chdir('/foo');\n    assert.equal(fs.cwd(), path.resolve('/foo'));\n  });\n\n  it('supports changing to a dir that is only on the writable fs', async () => {\n    await fsFixture(underlayFS)`\n      foo/bar: bar\n    `;\n\n    await fs.mkdirp('/bar');\n    assert(!underlayFS.existsSync('/bar'));\n\n    assert.equal(fs.cwd(), path.resolve('/'));\n    fs.chdir('/bar');\n    assert.equal(fs.cwd(), path.resolve('/bar'));\n  });\n\n  it('supports changing dir relative to cwd', async () => {\n    await fsFixture(underlayFS)`\n      foo/bar: bar\n    `;\n\n    assert.equal(fs.cwd(), path.resolve('/'));\n    fs.chdir('foo');\n    assert.equal(fs.cwd(), path.resolve('/foo'));\n  });\n\n  it('changes dir without changing underlying fs dir', async () => {\n    await fsFixture(underlayFS)`\n      foo/bar: baz\n      foo/bat/baz: qux\n    `;\n\n    assert.equal(fs.cwd(), path.resolve('/'));\n    assert.equal(underlayFS.cwd(), path.resolve('/'));\n\n    fs.chdir('foo');\n\n    assert.equal(fs.cwd(), path.resolve('/foo'));\n    assert.equal(underlayFS.cwd(), path.resolve('/'));\n  });\n\n  it('errors when changing to a dir that does not exist on either fs', async () => {\n    await fsFixture(underlayFS)`\n      foo/bar: bar\n    `;\n\n    assert.throws(() => fs.chdir('/bar'), /ENOENT/);\n  });\n\n  it('errors when changing to a deleted dir', async () => {\n    await fsFixture(underlayFS)`\n      foo/bar: bar\n    `;\n\n    await fs.rimraf('foo');\n    assert(!fs.existsSync('foo'));\n    assert(underlayFS.existsSync('foo'));\n\n    assert.throws(() => fs.chdir('/foo'), /ENOENT/);\n  });\n});\n"
  },
  {
    "path": "packages/core/graph/package.json",
    "content": "{\n  \"name\": \"@parcel/graph\",\n  \"version\": \"3.6.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"dependencies\": {\n    \"@parcel/feature-flags\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/core/graph/src/AdjacencyList.js",
    "content": "// @flow\nimport assert from 'assert';\nimport nullthrows from 'nullthrows';\nimport {SharedBuffer} from './shared-buffer';\nimport {fromNodeId, toNodeId} from './types';\nimport {ALL_EDGE_TYPES, type NullEdgeType, type AllEdgeTypes} from './Graph';\nimport type {NodeId} from './types';\n\n/** The address of the node in the nodes map. */\nopaque type NodeAddress = number;\n\nopaque type EdgeHash = number;\n\n/** The address of the edge in the edges map. */\nopaque type EdgeAddress = number;\n\n// eslint-disable-next-line no-unused-vars\nexport type SerializedAdjacencyList<TEdgeType> = {|\n  nodes: Uint32Array,\n  edges: Uint32Array,\n|};\n\n// eslint-disable-next-line no-unused-vars\nexport type AdjacencyListOptions<TEdgeType> = {|\n  /** The initial number of edges to accommodate. */\n  initialCapacity?: number,\n  /** The max amount by which to grow the capacity. */\n  maxGrowFactor?: number,\n  /** The min amount by which to grow the capacity. */\n  minGrowFactor?: number,\n  /** The size after which to grow the capacity by the minimum factor. */\n  peakCapacity?: number,\n  /** The percentage of deleted edges above which the capacity should shrink. */\n  unloadFactor?: number,\n  /** The amount by which to shrink the capacity. */\n  shrinkFactor?: number,\n|};\n\ntype AdjacencyListParams = {|\n  initialCapacity: number,\n  unloadFactor: number,\n  maxGrowFactor: number,\n  minGrowFactor: number,\n  peakCapacity: number,\n  shrinkFactor: number,\n|};\n\nconst DEFAULT_PARAMS: AdjacencyListParams = {\n  initialCapacity: 2,\n  unloadFactor: 0.3,\n  maxGrowFactor: 8,\n  minGrowFactor: 2,\n  peakCapacity: 2 ** 18,\n  shrinkFactor: 0.5,\n};\n\n/**\n * An Enum representing the result of a call to `link`.\n *\n * `EdgeAdded`       = `0`: the edge was successfully linked\n * `EdgeExists`      = `1`: the edge already exists\n * `EdgesOverloaded` = `2`: the edge map is overloaded\n * `TooManyDeletes`  = `3`: the edge map has too many deleted edges\n * `NodesOverloaded` = `4`: the node map is overloaded\n */\nconst LinkResult: {|\n  /** The edge was successfully linked */\n  EdgeAdded: 0,\n  /** The edge already exists */\n  EdgeExists: 1,\n  /** The edge map is overloaded */\n  EdgesOverloaded: 2,\n  /** The edge map has too many deleted edges */\n  TooManyDeletes: 3,\n  /** The node map is overloaded */\n  NodesOverloaded: 4,\n|} = {\n  EdgeAdded: 0,\n  EdgeExists: 1,\n  EdgesOverloaded: 2,\n  TooManyDeletes: 3,\n  NodesOverloaded: 4,\n};\n\n/**\n * Allow 3 attempts to link an edge before erroring.\n *\n * The three attempts correspond to the three possible inconclusive link results:\n * - `LinkResult.EdgesOverloaded`\n * - `LinkResult.TooManyDeletes`\n * - `LinkResult.NodesOverloaded`\n *\n * If after 3 tries, the link result is still one of these,\n * this is considered an error.\n */\nconst MAX_LINK_TRIES: 3 = 3;\n\n/**\n * `AdjacencyList` maps nodes to lists of their adjacent nodes.\n *\n * It is implemented as a hashmap of nodes, where each node has\n * doubly linked lists of edges of each unique edge type.\n * The edges are stored in a separate hashmap, where each edge has\n * a pointer to the originating node, the terminating node, and\n * the next and previous edges to and from adjacent nodes.\n *\n * The hash maps are each stored in a `Uint32Array` backed\n * by a `SharedArrayBuffer`. See `SharedTypeMap` for more details.\n *\n * It's primary interface is through the `getNodeIdsConnectedFrom`\n * and `getNodeIdsConnectedTo` methods, which return the list of\n * nodes connected from or to a given node, respectively.\n *\n * It is also possible to get the lists of edges connected from or to\n * a given node, using the `getOutboundEdgesByType` and\n * `getInboundEdgesByType` methods.\n *\n */\nexport default class AdjacencyList<TEdgeType: number = 1> {\n  #nodes /*: NodeTypeMap<TEdgeType | NullEdgeType> */;\n  #edges /*: EdgeTypeMap<TEdgeType | NullEdgeType> */;\n\n  #params /*: AdjacencyListParams */;\n\n  /**\n   * Create a new `AdjacencyList` in one of two ways:\n   * - with specified options, or\n   * - with data serialized from a previous `AdjacencyList`.\n   */\n  constructor(\n    opts?:\n      | SerializedAdjacencyList<TEdgeType | NullEdgeType>\n      | AdjacencyListOptions<TEdgeType | NullEdgeType>,\n  ) {\n    let nodes;\n    let edges;\n\n    if (opts?.nodes) {\n      ({nodes, edges} = opts);\n      this.#nodes = new NodeTypeMap(nodes);\n      this.#edges = new EdgeTypeMap(edges);\n      this.#params = {...DEFAULT_PARAMS, initialCapacity: this.#edges.capacity};\n    } else {\n      this.#params = {...DEFAULT_PARAMS, ...opts};\n\n      let {initialCapacity} = this.#params;\n\n      // TODO: Find a heuristic for right-sizing nodes.\n      // e.g., given an average ratio of `e` edges for every `n` nodes,\n      // init nodes with `capacity * n / e`.\n      let initialNodeCapacity = 2;\n\n      NodeTypeMap.assertMaxCapacity(initialNodeCapacity);\n      EdgeTypeMap.assertMaxCapacity(initialCapacity);\n\n      this.#nodes = new NodeTypeMap(initialNodeCapacity);\n      this.#edges = new EdgeTypeMap(initialCapacity);\n    }\n  }\n\n  /**\n   * Create a new `AdjacencyList` with data serialized\n   * from another `AdjacencyList`.\n   */\n  static deserialize(\n    opts: SerializedAdjacencyList<TEdgeType>,\n  ): AdjacencyList<TEdgeType> {\n    return new AdjacencyList(opts);\n  }\n\n  /**\n   * Returns a serializable object of the nodes and edges in the AdjacencyList.\n   */\n  serialize(): SerializedAdjacencyList<TEdgeType> {\n    return {\n      nodes: this.#nodes.data,\n      edges: this.#edges.data,\n    };\n  }\n\n  /** Statistics about the current state of the `AdjacencyList`. */\n  get stats(): {|\n    /** The maximum number of edges the graph can contain. */\n    capacity: number,\n    /** The number of nodes in the graph. */\n    nodes: number,\n    /** The number of edge types associated with nodes in the graph. */\n    nodeEdgeTypes: number,\n    /** The size of the raw nodes buffer, in mb. */\n    nodeBufferSize: string,\n    /** The current load on the nodes array. */\n    nodeLoad: string,\n    /** The number of edges in the graph. */\n    edges: number,\n    /** The number of edges deleted from the graph. */\n    deleted: number,\n    /** The number of unique edge types in the graph. */\n    edgeTypes: number,\n    /** The size of the raw edges buffer, in mb. */\n    edgeBufferSize: string,\n    /** The current load on the edges array, including deletes. */\n    edgeLoadWithDeletes: string,\n    /** The current load on the edges array. */\n    edgeLoad: string,\n    /** The total number of edge hash collisions. */\n    collisions: number,\n    /** The number of collisions for the most common hash. */\n    maxCollisions: number,\n    /** The average number of collisions per hash. */\n    avgCollisions: number,\n    /**\n     * The actual distribution of hashes vs. the expected (uniform) distribution.\n     *\n     * From: https://en.wikipedia.org/wiki/Hash_function#Testing_and_measurement\n     *\n     * > A ratio within one confidence interval (0.95 - 1.05) is indicative\n     * > that the hash function...has an expected uniform distribution.\n     */\n    uniformity: number,\n  |} {\n    let edgeTypes = new Set();\n    let buckets = new Map();\n    for (let {from, to, type} of this.getAllEdges()) {\n      let hash = this.#edges.hash(from, to, type);\n      let bucket = buckets.get(hash) || new Set();\n      let key = `${String(from)}, ${String(to)}, ${String(type)}`;\n      assert(!bucket.has(key), `Duplicate node detected: ${key}`);\n      bucket.add(key);\n      buckets.set(hash, bucket);\n      edgeTypes.add(type);\n    }\n\n    let maxCollisions = 0;\n    let collisions = 0;\n    let distribution = 0;\n    /**\n     * The expected distribution of hashes across available hash buckets.\n     *\n     * See: https://en.wikipedia.org/wiki/Hash_function#Testing_and_measurement\n     */\n    let uniformDistribution =\n      (this.#edges.count / (2 * this.#edges.capacity)) *\n      (this.#edges.count + 2 * this.#edges.capacity - 1);\n\n    for (let bucket of buckets.values()) {\n      maxCollisions = Math.max(maxCollisions, bucket.size - 1);\n      collisions += bucket.size - 1;\n      distribution += (bucket.size * (bucket.size + 1)) / 2;\n    }\n\n    return {\n      capacity: this.#edges.capacity,\n\n      nodes: fromNodeId(this.#nodes.nextId),\n      nodeEdgeTypes: this.#nodes.count,\n      nodeLoad: `${Math.round(this.#nodes.load * 100)}%`,\n      nodeBufferSize: this.#nodes.bufferSize,\n\n      edges: this.#edges.count,\n      deleted: this.#edges.deletes,\n      edgeTypes: edgeTypes.size,\n      edgeLoad: `${Math.round(this.#edges.load * 100)}%`,\n      edgeLoadWithDeletes: `${Math.round(\n        this.#edges.getLoad(this.#edges.count + this.#edges.deletes) * 100,\n      )}%`,\n      edgeBufferSize: this.#edges.bufferSize,\n\n      collisions,\n      maxCollisions,\n      avgCollisions:\n        Math.round((collisions / this.#edges.count) * 100) / 100 || 0,\n      uniformity:\n        Math.round((distribution / uniformDistribution) * 100) / 100 || 0,\n    };\n  }\n\n  /**\n   * Resize the internal nodes array.\n   *\n   * This is used in `addNode` and in `addEdge` when\n   * the `nodes` array is at capacity,\n   */\n  resizeNodes(size: number) {\n    let nodes = this.#nodes;\n    // Allocate the required space for a `nodes` map of the given `size`.\n    this.#nodes = new NodeTypeMap(size);\n    // Copy the existing nodes into the new array.\n    this.#nodes.set(nodes.data);\n  }\n\n  /**\n   * Resize the internal edges array.\n   *\n   * This is used in `addEdge` when the `edges` array is at capacity.\n   */\n  resizeEdges(size: number) {\n    // Allocate the required space for new `nodes` and `edges` maps.\n    let edges = new EdgeTypeMap(size);\n    let nodes = new NodeTypeMap(this.#nodes.capacity);\n\n    // Copy the existing edges into the new array.\n    nodes.nextId = this.#nodes.nextId;\n    this.#edges.forEach(\n      edge =>\n        void link(\n          this.#edges.from(edge),\n          this.#edges.to(edge),\n          this.#edges.typeOf(edge),\n          edges,\n          nodes,\n          this.#params.unloadFactor,\n        ),\n    );\n\n    // We expect to preserve the same number of edges.\n    assert(\n      this.#edges.count === edges.count,\n      `Edge mismatch! ${this.#edges.count} does not match ${edges.count}.`,\n    );\n\n    // Finally, copy the new data arrays over to this graph.\n    this.#nodes = nodes;\n    this.#edges = edges;\n  }\n\n  /**\n   * Adds a node to the graph.\n   *\n   * Note that this method does not increment the node count\n   * (that only happens in `addEdge`), it _may_ preemptively resize\n   * the nodes array if it is at capacity, under the assumption that\n   * at least 1 edge to or from this new node will be added.\n   *\n   * Returns the id of the added node.\n   */\n  addNode(): NodeId {\n    let id = this.#nodes.getId();\n    if (this.#nodes.getLoad() >= 1) {\n      this.resizeNodes(\n        increaseNodeCapacity(this.#nodes.capacity, this.#params),\n      );\n    }\n\n    return id;\n  }\n\n  /**\n   * Adds an edge to the graph.\n   *\n   * This method will increment the edge count, and it _may_\n   * also increment the node count, if the originating or\n   * terminating node does not yet have any edges of the given type.\n   *\n   * If either the `nodes` or `edges` arrays are at capacity,\n   * this method will resize them before adding.\n   *\n   * Furthermore, if the `edges` array has a high number of\n   * deleted edges, it may reclaim the space before adding.\n   *\n   * Returns `true` if the edge was added,\n   * or `false` if the edge already exists.\n   */\n  addEdge(\n    from: NodeId,\n    to: NodeId,\n    type: TEdgeType | NullEdgeType = 1,\n  ): boolean {\n    assert(from < this.#nodes.nextId, `Node ${from} does not exist.`);\n    assert(to < this.#nodes.nextId, `Node ${to} does not exist.`);\n    assert(type > 0, `Unsupported edge type ${type}`);\n\n    let result;\n    let tries = 0;\n\n    do {\n      assert(tries++ < MAX_LINK_TRIES, 'Failed to addEdge too many times!');\n\n      result = link(\n        from,\n        to,\n        type,\n        this.#edges,\n        this.#nodes,\n        this.#params.unloadFactor,\n      );\n\n      // Sometimes we need to resize before we can add.\n      switch (result) {\n        case LinkResult.NodesOverloaded: {\n          this.resizeNodes(\n            increaseNodeCapacity(this.#nodes.capacity, this.#params),\n          );\n          break;\n        }\n        case LinkResult.EdgesOverloaded: {\n          this.resizeEdges(\n            increaseEdgeCapacity(this.#edges.capacity, this.#params),\n          );\n          break;\n        }\n        case LinkResult.TooManyDeletes: {\n          this.resizeEdges(\n            decreaseEdgeCapacity(this.#edges.capacity, this.#params),\n          );\n          break;\n        }\n      }\n    } while (result > LinkResult.EdgeExists);\n\n    return result === LinkResult.EdgeAdded;\n  }\n\n  /**\n   * Iterate over all edges in insertion order.\n   */\n  *getAllEdges(): Iterator<{|\n    type: TEdgeType | NullEdgeType,\n    from: NodeId,\n    to: NodeId,\n  |}> {\n    for (let edge of this.#edges) {\n      yield {\n        from: this.#edges.from(edge),\n        to: this.#edges.to(edge),\n        type: this.#edges.typeOf(edge),\n      };\n    }\n  }\n\n  /**\n   * Check if the graph has an edge connecting the `from` and `to` nodes.\n   */\n  hasEdge(\n    from: NodeId,\n    to: NodeId,\n    type: TEdgeType | NullEdgeType | Array<TEdgeType | NullEdgeType> = 1,\n  ): boolean {\n    let hasEdge = (type: TEdgeType | NullEdgeType) => {\n      let hash = this.#edges.hash(from, to, type);\n      return this.#edges.addressOf(hash, from, to, type) !== null;\n    };\n\n    if (Array.isArray(type)) {\n      return type.some(hasEdge);\n    }\n\n    return hasEdge(type);\n  }\n\n  /**\n   * Remove an edge connecting the `from` and `to` nodes.\n   *\n   * Note that space for the deleted edge is not reclaimed\n   * until the `edges` array is resized.\n   *\n   * This method will increment the edge delete count.\n   */\n  removeEdge(\n    from: NodeId,\n    to: NodeId,\n    type: TEdgeType | NullEdgeType = 1,\n  ): void {\n    let hash = this.#edges.hash(from, to, type);\n    let edge = this.#edges.addressOf(hash, from, to, type);\n\n    // The edge is not in the graph; do nothing.\n    if (edge === null) return;\n\n    let toNode = nullthrows(this.#nodes.addressOf(to, type));\n    let fromNode = nullthrows(this.#nodes.addressOf(from, type));\n\n    // Update the terminating node's first and last incoming edges.\n    this.#nodes.unlinkIn(\n      toNode,\n      edge,\n      this.#edges.prevIn(edge),\n      this.#edges.nextIn(edge),\n    );\n\n    // Update the originating node's first and last outgoing edges.\n    this.#nodes.unlinkOut(\n      fromNode,\n      edge,\n      this.#edges.prevOut(edge),\n      this.#edges.nextOut(edge),\n    );\n\n    // Splice the removed edge out of the linked list of edges in the bucket.\n    this.#edges.unlink(hash, edge);\n    // Splice the removed edge out of the linked list of incoming edges.\n    this.#edges.unlinkIn(edge);\n    // Splice the removed edge out of the linked list of outgoing edges.\n    this.#edges.unlinkOut(edge);\n    // Finally, delete the edge.\n    this.#edges.delete(edge);\n  }\n\n  /**\n   * Check if the given node has any edges incoming from other nodes.\n   *\n   * Essentially, this is an orphan check. If a node has no incoming edges,\n   * it (and its entire subgraph) is completely disconnected from the\n   * rest of the graph.\n   */\n  hasInboundEdges(to: NodeId): boolean {\n    let node = this.#nodes.head(to);\n    while (node !== null) {\n      if (this.#nodes.firstIn(node) !== null) return true;\n      node = this.#nodes.next(node);\n    }\n    return false;\n  }\n\n  /**\n   * Get a list of every node (labeled `from`) connecting _to_\n   * the given `to` node, along with the edge `type` connecting them.\n   */\n  getInboundEdgesByType(\n    to: NodeId,\n  ): {|type: TEdgeType | NullEdgeType, from: NodeId|}[] {\n    let edges = [];\n    let node = this.#nodes.head(to);\n    while (node !== null) {\n      let type = this.#nodes.typeOf(node);\n      let edge = this.#nodes.firstIn(node);\n      while (edge !== null) {\n        let from = this.#edges.from(edge);\n        edges.push({from, type});\n        edge = this.#edges.nextIn(edge);\n      }\n      node = this.#nodes.next(node);\n    }\n    return edges;\n  }\n\n  /**\n   * Get a list of every node (labeled `to`) connected _from_\n   * the given `from` node, along with the edge `type` connecting them.\n   */\n  getOutboundEdgesByType(\n    from: NodeId,\n  ): {|type: TEdgeType | NullEdgeType, to: NodeId|}[] {\n    let edges = [];\n    let node = this.#nodes.head(from);\n    while (node !== null) {\n      let type = this.#nodes.typeOf(node);\n      let edge = this.#nodes.firstOut(node);\n      while (edge !== null) {\n        let to = this.#edges.to(edge);\n        edges.push({to, type});\n        edge = this.#edges.nextOut(edge);\n      }\n      node = this.#nodes.next(node);\n    }\n    return edges;\n  }\n\n  /**\n   * Get the list of node ids connected from this node.\n   *\n   * If `type` is specified, only return nodes connected by edges of that type.\n   * If `type` is an array, return nodes connected by edges of any of those types.\n   * If `type` is `AllEdgeTypes` (`-1`), return nodes connected by edges of any type.\n   */\n  getNodeIdsConnectedFrom(\n    from: NodeId,\n    type:\n      | AllEdgeTypes\n      | TEdgeType\n      | NullEdgeType\n      | Array<TEdgeType | NullEdgeType> = 1,\n  ): NodeId[] {\n    let matches = node =>\n      type === ALL_EDGE_TYPES ||\n      (Array.isArray(type)\n        ? type.includes(this.#nodes.typeOf(node))\n        : type === this.#nodes.typeOf(node));\n    let nodes = [];\n    let seen = new Set<NodeId>();\n    let node = this.#nodes.head(from);\n    while (node !== null) {\n      if (matches(node)) {\n        let edge = this.#nodes.firstOut(node);\n        while (edge !== null) {\n          let to = this.#edges.to(edge);\n          if (!seen.has(to)) {\n            nodes.push(to);\n            seen.add(to);\n          }\n          edge = this.#edges.nextOut(edge);\n        }\n      }\n      node = this.#nodes.next(node);\n    }\n    return nodes;\n  }\n\n  forEachNodeIdConnectedFromReverse(\n    from: NodeId,\n    fn: (nodeId: NodeId) => boolean,\n  ) {\n    let node = this.#nodes.head(from);\n    while (node !== null) {\n      let edge = this.#nodes.lastOut(node);\n      while (edge !== null) {\n        let to = this.#edges.to(edge);\n        if (fn(to)) {\n          return;\n        }\n        edge = this.#edges.prevOut(edge);\n      }\n      node = this.#nodes.next(node);\n    }\n  }\n\n  /**\n   * Get the list of node ids connected to this node.\n   *\n   * If `type` is specified, only return nodes connected by edges of that type.\n   * If `type` is an array, return nodes connected by edges of any of those types.\n   * If `type` is `AllEdgeTypes` (`-1`), return nodes connected by edges of any type.\n   */\n  getNodeIdsConnectedTo(\n    to: NodeId,\n    type:\n      | AllEdgeTypes\n      | TEdgeType\n      | NullEdgeType\n      | Array<TEdgeType | NullEdgeType> = 1,\n  ): NodeId[] {\n    let matches = node =>\n      type === ALL_EDGE_TYPES ||\n      (Array.isArray(type)\n        ? type.includes(this.#nodes.typeOf(node))\n        : type === this.#nodes.typeOf(node));\n\n    let nodes = [];\n    let seen = new Set<NodeId>();\n    let node = this.#nodes.head(to);\n    while (node !== null) {\n      if (matches(node)) {\n        let edge = this.#nodes.firstIn(node);\n        while (edge !== null) {\n          let from = this.#edges.from(edge);\n          if (!seen.has(from)) {\n            nodes.push(from);\n            seen.add(from);\n          }\n          edge = this.#edges.nextIn(edge);\n        }\n      }\n      node = this.#nodes.next(node);\n    }\n    return nodes;\n  }\n\n  inspect(): any {\n    return {\n      nodes: this.#nodes.inspect(),\n      edges: this.#edges.inspect(),\n    };\n  }\n}\n\n/**\n * `SharedTypeMap` is a hashmap of items,\n * where each item has its own 'type' field.\n *\n * The `SharedTypeMap` is backed by a shared array buffer of fixed length.\n * The buffer is partitioned into:\n * - a header, which stores the capacity and number of items in the map,\n * - a hash table, which is an array of pointers to linked lists of items\n *   with the same hash,\n * - an items array, which is where the linked items are stored.\n *\n *            hash table                 item\n *            (capacity)             (ITEM_SIZE)\n *         ┌──────┴──────┐             ┌──┴──┐\n *   ┌──┬──┬──┬───────┬──┬──┬──┬───────┬──┬──┐\n *   │  │  │  │  ...  │  │  │  │  ...  │  │  │\n *   └──┴──┴──┴───────┴──┴──┴──┴───────┴──┴──┘\n *   └──┬──┘             └─────────┬─────────┘\n *    header                     items\n * (HEADER_SIZE)         (capacity * ITEM_SIZE)\n *\n *\n * An item is added with a hash key that fits within the range of the hash\n * table capacity. The item is stored at the next available address after the\n * hash table, and a pointer to the address is stored in the hash table at\n * the index matching the hash. If the hash is already pointing at an item,\n * the pointer is stored in the `next` field of the existing item instead.\n *\n *       hash table                          items\n * ┌─────────┴────────┐┌───────────────────────┴────────────────────────┐\n *    0    1    2        11       17        23       29      35\n * ┌───┐┌───┐┌───┐┌───┐┌───┬───┐┌───┬───┐┌───┬───┐┌───┬───┐┌───┬───┐┌───┐\n * │17 ││11 ││35 ││...││23 │ 1 ││29 │ 1 ││ 0 │ 2 ││ 0 │ 2 ││ 0 │ 1 ││...│\n * └───┘└───┘└───┘└───┘└───┴───┘└───┴───┘└───┴───┘└───┴───┘└───┴───┘└───┘\n *   │    │    │         ▲        ▲        ▲        ▲        ▲\n *   └────┼────┼─────────┼────────┴────────┼────────┘        │\n *        └────┼─────────┴─────────────────┘                 │\n *             └─────────────────────────────────────────────┘\n */\nexport class SharedTypeMap<TItemType, THash, TAddress: number>\n  implements Iterable<TAddress>\n{\n  /**\n   * The header for the `SharedTypeMap` comprises 2 4-byte chunks:\n   *\n   * struct SharedTypeMapHeader {\n   *   int capacity;\n   *   int count;\n   * }\n   *\n   * ┌──────────┬───────┐\n   * │ CAPACITY │ COUNT │\n   * └──────────┴───────┘\n   */\n  static HEADER_SIZE: number = 2;\n  /** The offset from the header where the capacity is stored. */\n  static #CAPACITY: 0 = 0;\n  /** The offset from the header where the count is stored. */\n  static #COUNT: 1 = 1;\n\n  /**\n   * Each item in `SharedTypeMap` comprises 2 4-byte chunks:\n   *\n   * struct Node {\n   *   int next;\n   *   int type;\n   * }\n   *\n   * ┌──────┬──────┐\n   * │ NEXT │ TYPE │\n   * └──────┴──────┘\n   */\n  static ITEM_SIZE: number = 2;\n  /** The offset at which a link to the next item in the same bucket is stored. */\n  static #NEXT: 0 = 0;\n  /** The offset at which an item's type is stored. */\n  static #TYPE: 1 = 1;\n\n  /** The largest possible capacity. */\n  static get MAX_CAPACITY(): number {\n    return Math.floor(\n      // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length#what_went_wrong\n      (2 ** 31 - 1 - this.HEADER_SIZE) / this.ITEM_SIZE,\n    );\n  }\n\n  /** Assert that the given `capacity` does not exceed `MAX_CAPACITY`. */\n  static assertMaxCapacity(capacity: number): void {\n    assert(capacity <= this.MAX_CAPACITY, `${this.name} capacity overflow!`);\n  }\n\n  data: Uint32Array;\n\n  /** The total number of items that can fit in the map. */\n  get capacity(): number {\n    return this.data[SharedTypeMap.#CAPACITY];\n  }\n\n  /** The number of items in the map. */\n  get count(): number {\n    return this.data[SharedTypeMap.#COUNT];\n  }\n\n  /** The ratio of the count to the capacity. */\n  get load(): number {\n    return this.getLoad();\n  }\n\n  /** The total length of the map, in bytes. */\n  get length(): number {\n    return this.getLength();\n  }\n\n  /** The address of the first item in the map. */\n  get addressableLimit(): number {\n    return this.constructor.HEADER_SIZE + this.capacity;\n  }\n\n  /** The size of the map in mb, as a localized string. */\n  get bufferSize(): string {\n    return `${(this.data.byteLength / 1024 / 1024).toLocaleString(undefined, {\n      minimumFractionDigits: 2,\n      maximumFractionDigits: 2,\n    })} mb`;\n  }\n\n  /**\n   * Create a new `SharedTypeMap` in one of two ways:\n   * - with a capacity of `capacityOrData` if it is a number,\n   * - or with `capacityOrData` as its data, if it is a `Uint32Array`.\n   */\n  constructor(capacityOrData: number | Uint32Array) {\n    if (typeof capacityOrData === 'number') {\n      let {BYTES_PER_ELEMENT} = Uint32Array;\n      let CAPACITY = SharedTypeMap.#CAPACITY;\n      // $FlowFixMe[incompatible-call]\n      this.data = new Uint32Array(\n        new SharedBuffer(this.getLength(capacityOrData) * BYTES_PER_ELEMENT),\n      );\n      this.data[CAPACITY] = capacityOrData;\n    } else {\n      this.data = capacityOrData;\n      assert(this.getLength() === this.data.length, 'Data appears corrupt.');\n    }\n  }\n\n  /**\n   * Overwrite the data in this map with the given `data`.\n   *\n   * The `data` is expected to conform to the same\n   * partitioning and schema as the data in this map,\n   * and is expected to be of equal or smaller capacity to this map.\n   */\n  set(data: Uint32Array): void {\n    let {HEADER_SIZE, ITEM_SIZE} = this.constructor;\n    let NEXT = SharedTypeMap.#NEXT;\n    let COUNT = SharedTypeMap.#COUNT;\n    let CAPACITY = SharedTypeMap.#CAPACITY;\n\n    let delta = this.capacity - data[CAPACITY];\n    assert(delta >= 0, 'Cannot copy to a map with smaller capacity.');\n\n    // Copy the header.\n    this.data.set(data.subarray(COUNT, HEADER_SIZE), COUNT);\n\n    // Copy the hash table.\n    let toTable = this.data.subarray(HEADER_SIZE, HEADER_SIZE + this.capacity);\n    toTable.set(data.subarray(HEADER_SIZE, HEADER_SIZE + data[CAPACITY]));\n    // Offset first links to account for the change in table capacity.\n    let max = toTable.length;\n    for (let i = 0; i < max; i++) {\n      if (toTable[i]) toTable[i] += delta;\n    }\n\n    // Copy the items.\n    let toItems = this.data.subarray(HEADER_SIZE + this.capacity);\n    toItems.set(data.subarray(HEADER_SIZE + data[CAPACITY]));\n    // Offset next links to account for the change in table capacity.\n    max = toItems.length;\n    for (let i = 0; i < max; i += ITEM_SIZE) {\n      if (toItems[i + NEXT]) toItems[i + NEXT] += delta;\n    }\n  }\n\n  /**\n   * Given a `count` (defaulting to `this.count`),\n   * get the load on the map.\n   *\n   * The load is the ratio of the `count` the capacity of the map.\n   *\n   * If the load is `1`, it means the map is at capacity, and needs\n   * to be resized before adding more items.\n   */\n  getLoad(count: number = this.count): number {\n    return count / this.capacity;\n  }\n\n  /**\n   * Given a `capacity` (defaulting to `this.capacity`),\n   * get the length of the map, in bytes.\n   */\n  getLength(capacity: number = this.capacity): number {\n    let {HEADER_SIZE, ITEM_SIZE} = this.constructor;\n    return capacity + HEADER_SIZE + ITEM_SIZE * capacity;\n  }\n\n  /** Get the next available address in the map. */\n  getNextAddress(): TAddress {\n    let {HEADER_SIZE, ITEM_SIZE} = this.constructor;\n    return (HEADER_SIZE + this.capacity + this.count * ITEM_SIZE: any);\n  }\n\n  /** Get the address of the first item with the given hash. */\n  head(hash: THash): TAddress | null {\n    let {HEADER_SIZE} = this.constructor;\n    return (this.data[HEADER_SIZE + (hash: any)]: any) || null;\n  }\n\n  /** Get the address of the next item with the same hash as the given item. */\n  next(item: TAddress): TAddress | null {\n    let NEXT = SharedTypeMap.#NEXT;\n    return (this.data[(item: any) + NEXT]: any) || null;\n  }\n\n  /** Get the type of the item at the given `item` address. */\n  typeOf(item: TAddress): TItemType {\n    return (this.data[item + SharedTypeMap.#TYPE]: any);\n  }\n\n  /**\n   * Store an item of `type` at the `item` address and\n   * link the address to the `hash` bucket.\n   */\n  link(hash: THash, item: TAddress, type: TItemType): void {\n    let COUNT = SharedTypeMap.#COUNT;\n    let NEXT = SharedTypeMap.#NEXT;\n    let TYPE = SharedTypeMap.#TYPE;\n    let {HEADER_SIZE} = this.constructor;\n\n    this.data[item + TYPE] = (type: any);\n\n    let prev = this.head(hash);\n    if (prev !== null) {\n      let next = this.next(prev);\n      while (next !== null) {\n        prev = next;\n        next = this.next(next);\n      }\n      this.data[prev + NEXT] = item;\n    } else {\n      // This is the first item in the bucket!\n      this.data[HEADER_SIZE + (hash: any)] = item;\n    }\n    this.data[COUNT]++;\n  }\n\n  /**\n   * Remove the link to the `item` address from the `hash` bucket.\n   */\n  unlink(hash: THash, item: TAddress): void {\n    let COUNT = SharedTypeMap.#COUNT;\n    let NEXT = SharedTypeMap.#NEXT;\n    let TYPE = SharedTypeMap.#TYPE;\n    let {HEADER_SIZE} = this.constructor;\n\n    this.data[item + TYPE] = 0;\n\n    let head = this.head(hash);\n    // No bucket to unlink from.\n    if (head === null) return;\n\n    let next = this.next(item);\n    let prev = null;\n    let candidate = head;\n    while (candidate !== null && candidate !== item) {\n      prev = candidate;\n      candidate = this.next(candidate);\n    }\n    if (prev !== null && next !== null) {\n      this.data[prev + NEXT] = next;\n    } else if (prev !== null) {\n      this.data[prev + NEXT] = 0;\n    } else if (next !== null) {\n      this.data[HEADER_SIZE + (hash: any)] = next;\n    } else {\n      this.data[HEADER_SIZE + (hash: any)] = 0;\n    }\n    this.data[item + NEXT] = 0;\n    this.data[COUNT]--;\n  }\n\n  forEach(cb: (item: TAddress) => void): void {\n    let max = this.count;\n    let len = this.length;\n    let {ITEM_SIZE} = this.constructor;\n    for (\n      let i = this.addressableLimit, count = 0;\n      i < len && count < max;\n      i += ITEM_SIZE\n    ) {\n      // Skip items that don't have a type.\n      if (this.typeOf((i: any))) {\n        cb((i: any));\n        count++;\n      }\n    }\n  }\n\n  // Trick Flow into believing in `Symbol.iterator`.\n  // See https://github.com/facebook/flow/issues/1163#issuecomment-353523840\n  /*:: @@iterator(): Iterator<TAddress> { return ({}: any); } */\n  // $FlowFixMe[unsupported-syntax]\n  *[Symbol.iterator](): Iterator<TAddress> {\n    let max = this.count;\n    let len = this.length;\n    let {ITEM_SIZE} = this.constructor;\n    for (\n      let i = this.addressableLimit, count = 0;\n      i < len && count < max;\n      i += ITEM_SIZE\n    ) {\n      if (this.data.subarray(i, i + ITEM_SIZE).some(Boolean)) {\n        yield (i: any);\n        count++;\n      }\n    }\n  }\n\n  inspect(): {|\n    header: Uint32Array,\n    table: Uint32Array,\n    data: Uint32Array,\n  |} {\n    const {HEADER_SIZE} = this.constructor;\n    let min = this.addressableLimit;\n\n    return {\n      header: this.data.subarray(0, HEADER_SIZE),\n      table: this.data.subarray(HEADER_SIZE, min),\n      data: this.data.subarray(min),\n    };\n  }\n}\n\n/**\n * Nodes are stored in a `SharedTypeMap`, keyed on node id plus an edge type.\n * This means that for any given unique node id, there may be `e` nodes in the\n * map, where `e` is the number of unique edge types in the graph.\n *\n * The _hash_ for a node is simply the node id (as issued by `getId`),\n * and forms the head of linked list of unique _edge types_ connected\n * to or from the same node id.\n *\n * In addition to a unique edge type, each Node contains the heads and tails\n * of doubly linked lists of incoming and outgoing edges of the same type.\n *\n * Note that the links in the doubly linked lists are Edges (not Nodes),\n * which are stored in a corresponding `EdgeTypeMap`.\n */\nexport class NodeTypeMap<TEdgeType> extends SharedTypeMap<\n  TEdgeType,\n  NodeId,\n  NodeAddress,\n> {\n  /**\n   * In addition to the header defined by `SharedTypeMap`, the header for\n   * the node map includes a 4-byte `nextId` chunk:\n   *\n   * struct NodeTypeMapHeader {\n   *   int capacity; // from `SharedTypeMap`\n   *   int count; // from `SharedTypeMap`\n   *   int nextId;\n   * }\n   *\n   * ┌──────────┬───────┬─────────┐\n   * │ CAPACITY │ COUNT │ NEXT_ID │\n   * └──────────┴───────┴─────────┘\n   *\n   * The `nextId` is a count of the number of times `getId` has been called.\n   * This is distinct concept from the `count`, which tracks the number of times\n   * `add` has been called.\n   *\n   * The reason for this distinction is that `getId` is called once per node\n   * (to issue a _unique_ id) and will _always increment_ the `nextId` counter,\n   * whereas `add` is called once per edge, and will only increment the `count`\n   * if the _type_ of edge is new for the given node.\n   */\n  static HEADER_SIZE: number = 3;\n  /** The offset from the header where the next available node id is stored. */\n  static #NEXT_ID = 2;\n\n  /**\n   * In addition to the item fields defined by `SharedTypeMap`,\n   * each node includes another 4 4-byte chunks:\n   *\n   * struct Node {\n   *   int next; // from `SharedTypeMap`\n   *   int type; // from `SharedTypeMap`\n   *   int firstIn;\n   *   int firstOut;\n   *   int lastIn;\n   *   int lastOut;\n   * }\n   *\n   * ┌──────┬──────┬──────────┬───────────┬─────────┬──────────┐\n   * │ NEXT │ TYPE │ FIRST_IN │ FIRST_OUT │ LAST_IN │ LAST_OUT │\n   * └──────┴──────┴──────────┴───────────┴─────────┴──────────┘\n   *\n   * The `Node` implicitly maps a node id (the hash the node was added with)\n   * to the first and last incoming and outgoing edges of the same _edge type_.\n   */\n  static ITEM_SIZE: number = 6;\n  /** The offset at which a node's first incoming edge of this type is stored. */\n  static #FIRST_IN = 2;\n  /** The offset at which a node's first outgoing edge of this type is stored. */\n  static #FIRST_OUT = 3;\n  /** The offset at which a node's last incoming edge of this type is stored. */\n  static #LAST_IN = 4;\n  /** The offset at which a node's last outgoing edge of this type is stored. */\n  static #LAST_OUT = 5;\n\n  get nextId(): NodeId {\n    return toNodeId(this.data[NodeTypeMap.#NEXT_ID]);\n  }\n  set nextId(nextId: NodeId) {\n    this.data[NodeTypeMap.#NEXT_ID] = fromNodeId(nextId);\n  }\n\n  /**\n   * Get the load on the node map.\n   *\n   * The load is the greater of either:\n   * - the ratio of the number of node ids to the capacity of the map,\n   * - or the ratio of the `count` to the capacity of the map.\n   *\n   * if `count` is not provided, the default is the number of items\n   * currently added to the map.\n   */\n  getLoad(count?: number): number {\n    return Math.max(\n      fromNodeId(this.nextId) / this.capacity,\n      super.getLoad(count),\n    );\n  }\n\n  /** Increment the node counter to get a unique node id. */\n  getId(): NodeId {\n    return toNodeId(this.data[NodeTypeMap.#NEXT_ID]++);\n  }\n\n  /**\n   * Add new lists of edges of the given `type` to and from the given `node`.\n   */\n  add(node: NodeId, type: TEdgeType): NodeAddress {\n    let index = fromNodeId(node);\n    assert(\n      index >= 0 && index < this.data[NodeTypeMap.#NEXT_ID],\n      `Invalid node id ${String(node)} (${this.data[NodeTypeMap.#NEXT_ID]})`,\n    );\n    let address = this.getNextAddress();\n    this.link(node, address, type);\n    return address;\n  }\n\n  /**\n   * Get the address of the lists edges of the given `type`\n   * to and from the given `node`.\n   */\n  addressOf(node: NodeId, type: TEdgeType): NodeAddress | null {\n    let address = this.head(node);\n    while (address !== null) {\n      if (this.typeOf(address) === type) {\n        return address;\n      }\n      address = this.next(address);\n    }\n    return null;\n  }\n\n  /**\n   * Given a `node` address, get the _head_ of the linked list\n   * of incoming edges of the same type to the same node.\n   */\n  firstIn(node: NodeAddress): EdgeAddress | null {\n    return this.data[node + NodeTypeMap.#FIRST_IN] || null;\n  }\n\n  /**\n   * Given a `node` address, get the _head_ of the linked list\n   * of outgoing edges of the same type from the same node.\n   */\n  firstOut(node: NodeAddress): EdgeAddress | null {\n    return this.data[node + NodeTypeMap.#FIRST_OUT] || null;\n  }\n\n  /**\n   * Given a `node` address, get the _tail_ of the linked list\n   * of incoming edges of the same type to the same node.\n   */\n  lastIn(node: NodeAddress): EdgeAddress | null {\n    return this.data[node + NodeTypeMap.#LAST_IN] || null;\n  }\n\n  /**\n   * Given a `node` address, get the _tail_ of the linked list\n   * of outgoing edges of the same type from the same node.\n   */\n  lastOut(node: NodeAddress): EdgeAddress | null {\n    return this.data[node + NodeTypeMap.#LAST_OUT] || null;\n  }\n\n  /**\n   * Set `edge` as the last incoming edge to `node`.\n   * If `node` has no incoming edges, set `edge`\n   * as the first incoming edge, as well.\n   *\n   * Returns the address of the old last incoming edge, if any.\n   */\n  linkIn(node: NodeAddress, edge: EdgeAddress): EdgeAddress | null {\n    let first = this.firstIn(node);\n    let last = this.lastIn(node);\n    if (first === null) this.data[node + NodeTypeMap.#FIRST_IN] = edge;\n    this.data[node + NodeTypeMap.#LAST_IN] = edge;\n    return last;\n  }\n\n  /**\n   * If `edge` is the last incoming edge to `node`,\n   * update the node's last incoming edge to `prev`.\n   *\n   * If `edge` is the first incoming edge to `node`,\n   * update the node's first incoming edge to `next`.\n   */\n  unlinkIn(\n    node: NodeAddress,\n    edge: EdgeAddress,\n    prev: EdgeAddress | null,\n    next: EdgeAddress | null,\n  ): void {\n    let first = this.firstIn(node);\n    let last = this.lastIn(node);\n    if (last === edge) {\n      this.data[node + NodeTypeMap.#LAST_IN] = prev === null ? 0 : prev;\n    }\n    if (first === edge) {\n      this.data[node + NodeTypeMap.#FIRST_IN] = next === null ? 0 : next;\n    }\n  }\n\n  /**\n   * Set `edge` as the last outgoing edge from `node`.\n   * If `node` has no outgoing edges, set `edge`\n   * as the first outgoing edge, as well.\n   *\n   * Returns the address of the old last outgoing edge, if any.\n   */\n  linkOut(node: NodeAddress, edge: EdgeAddress): EdgeAddress | null {\n    let first = this.firstOut(node);\n    let last = this.lastOut(node);\n    if (first === null) this.data[node + NodeTypeMap.#FIRST_OUT] = edge;\n    this.data[node + NodeTypeMap.#LAST_OUT] = edge;\n    return last;\n  }\n\n  /**\n   * If `edge` is the last outgoing edge from `node`,\n   * update the node's last outgoing edge to `prev`.\n   *\n   * If `edge` is the first outgoing edge from `node`,\n   * update the node's first outgoing edge to `next`.\n   */\n  unlinkOut(\n    node: NodeAddress,\n    edge: EdgeAddress,\n    prev: EdgeAddress | null,\n    next: EdgeAddress | null,\n  ): void {\n    let first = this.firstOut(node);\n    let last = this.lastOut(node);\n    if (last === edge) {\n      this.data[node + NodeTypeMap.#LAST_OUT] = prev === null ? 0 : prev;\n    }\n    if (first === edge) {\n      this.data[node + NodeTypeMap.#FIRST_OUT] = next === null ? 0 : next;\n    }\n  }\n}\n\n/**\n * Edges are stored in a `SharedTypeMap`,\n * keyed on the 'from' and 'to' node ids, and the edge type.\n *\n * The _hash_ for an edge is a hash of the edge's `from`, `to`, and `type` values,\n * and forms the head of linked list of edges with the same hash.\n *\n * In addition to the `from`, `to` and `type` values, each Edge contains\n * the next and previous links of doubly linked lists of the _adjacent_ edges\n * of the same type, both incoming to the `to` node, and outgoing from\n * the `from` node.\n */\nexport class EdgeTypeMap<TEdgeType> extends SharedTypeMap<\n  TEdgeType,\n  EdgeHash,\n  EdgeAddress,\n> {\n  /**\n   * In addition to the header defined by `SharedTypeMap`, the header for\n   * the edge map includes a 4-byte `deletes` chunk:\n   *\n   * struct EdgeTypeMapHeader {\n   *   int capacity; // from `SharedTypeMap`\n   *   int count; // from `SharedTypeMap`\n   *   int deletes;\n   * }\n   *\n   * ┌──────────┬───────┬─────────┐\n   * │ CAPACITY │ COUNT │ DELETES │\n   * └──────────┴───────┴─────────┘\n   *\n   * Since new edges are always appended, the space for deleted edges\n   * is not reused. Instead, the `deletes` count is incremented when an\n   * edge is deleted. The next available address is calculated by\n   * adding the `count` and `deletes` values to the header size.\n   *\n   * The only way to reclaim the space used by deleted edges is to resize the map.\n   */\n  static HEADER_SIZE: number = 3;\n  /** The offset from the header where the delete count is stored. */\n  static #DELETES = 2;\n\n  /**\n   * In addition to the item fields defined by `SharedTypeMap`,\n   * each edge includes another 6 4-byte chunks:\n   *\n   * struct Edge {\n   *   int next; // from `SharedTypeMap`\n   *   int type; // from `SharedTypeMap`\n   *   int from;\n   *   int to;\n   *   int nextIn;\n   *   int prevIn;\n   *   int nextOut;\n   *   int prevOut;\n   * }\n   *\n   * ┌──────┬──────┬──────┬────┬─────────┬─────────┬──────────┬──────────┐\n   * │ NEXT │ TYPE │ FROM │ TO │ NEXT_IN │ PREV_IN │ NEXT_OUT │ PREV_OUT │\n   * └──────┴──────┴──────┴────┴─────────┴─────────┴──────────┴──────────┘\n   *\n   * The `Edge` implicitly maps an edge hash (the hash of the edge's `FROM`,\n   * `TO`, and `TYPE` values) to the next and previous adjacent edges of the\n   * same _edge type_.\n   */\n  static ITEM_SIZE: number = 8;\n  /** The offset at which an edge's 'from' node id is stored. */\n  static #FROM = 2;\n  /** The offset at which an edge's 'to' node id is stored. */\n  static #TO = 3;\n  /** The offset at which the 'to' node's next incoming edge is stored.  */\n  static #NEXT_IN = 4;\n  /** The offset at which the 'to' node's previous incoming edge is stored.  */\n  static #PREV_IN = 5;\n  /** The offset at which the 'from' node's next outgoing edge is stored.  */\n  static #NEXT_OUT = 6;\n  /** The offset at which the 'from' node's previous outgoing edge is stored.  */\n  static #PREV_OUT = 7;\n\n  /** The number of deleted edges currently occupying space in the map. */\n  get deletes(): number {\n    return this.data[EdgeTypeMap.#DELETES];\n  }\n\n  /** Get the next available address in the map. */\n  getNextAddress(): EdgeAddress {\n    let {ITEM_SIZE} = this.constructor;\n    return this.addressableLimit + (this.count + this.deletes) * ITEM_SIZE;\n  }\n\n  /**\n   * Add an edge of the given `type` between the `to` and `from` nodes\n   * and link the address to the `hash` bucket.\n   */\n  add(hash: EdgeHash, from: NodeId, to: NodeId, type: TEdgeType): EdgeAddress {\n    assert(\n      hash >= 0 && hash < this.capacity,\n      `Invalid edge hash ${String(hash)}`,\n    );\n    // Use the next available edge address.\n    let edge = this.getNextAddress();\n    // Add our new edge to its hash bucket.\n    this.link(hash, edge, type);\n    this.data[edge + EdgeTypeMap.#FROM] = fromNodeId(from);\n    this.data[edge + EdgeTypeMap.#TO] = fromNodeId(to);\n    return edge;\n  }\n\n  /**\n   * Remove the `to` and `from` nodes for the given `edge` address\n   * and increment the `deletes` counter.\n   */\n  delete(edge: EdgeAddress): void {\n    this.data[edge + EdgeTypeMap.#FROM] = 0;\n    this.data[edge + EdgeTypeMap.#TO] = 0;\n    this.data[EdgeTypeMap.#DELETES]++;\n  }\n\n  /**\n   * Get the address of the edge with the given `hash`, `from` and `to` nodes,\n   * and edge `type`.\n   */\n  addressOf(\n    hash: EdgeHash,\n    from: NodeId,\n    to: NodeId,\n    type: TEdgeType,\n  ): EdgeAddress | null {\n    let address = this.head(hash);\n    while (address !== null) {\n      if (\n        this.typeOf(address) === type &&\n        this.from(address) === from &&\n        this.to(address) === to\n      ) {\n        return address;\n      }\n      address = this.next(address);\n    }\n    return null;\n  }\n\n  /** Get the id of the 'from' node for the given `edge` address. */\n  from(edge: EdgeAddress): NodeId {\n    return toNodeId(this.data[edge + EdgeTypeMap.#FROM]);\n  }\n\n  /** Get the id of the 'to' node for the given `edge` address. */\n  to(edge: EdgeAddress): NodeId {\n    return toNodeId(this.data[edge + EdgeTypeMap.#TO]);\n  }\n\n  /**\n   * Get the address of the next edge _of the same type_\n   * incoming _to the same node_ as the edge at the given address.\n   */\n  nextIn(edge: EdgeAddress): EdgeAddress | null {\n    return this.data[edge + EdgeTypeMap.#NEXT_IN] || null;\n  }\n\n  /**\n   * Get the address of the previous edge _of the same type_\n   * incoming _to the same node_ as the edge at the given address.\n   */\n  prevIn(edge: EdgeAddress): EdgeAddress | null {\n    return this.data[edge + EdgeTypeMap.#PREV_IN] || null;\n  }\n\n  /** Link two adjacent edges of the same type incoming to the same node. */\n  linkIn(edge: EdgeAddress, next: EdgeAddress) {\n    assert(this.typeOf(edge) === this.typeOf(next), 'Edge types must match.');\n    assert(this.to(edge) === this.to(next), 'To nodes must match.');\n    this.data[edge + EdgeTypeMap.#NEXT_IN] = next;\n    this.data[next + EdgeTypeMap.#PREV_IN] = edge;\n  }\n\n  /**\n   * Unlink an edge from the doubly linked list of incoming edges\n   * to the same node.\n   */\n  unlinkIn(edge: EdgeAddress) {\n    let next = this.nextIn(edge);\n    let prev = this.prevIn(edge);\n    this.data[edge + EdgeTypeMap.#NEXT_IN] = 0;\n    this.data[edge + EdgeTypeMap.#PREV_IN] = 0;\n    if (next !== null && prev !== null) {\n      this.data[prev + EdgeTypeMap.#NEXT_IN] = next;\n      this.data[next + EdgeTypeMap.#PREV_IN] = prev;\n    } else if (next !== null) {\n      this.data[next + EdgeTypeMap.#PREV_IN] = 0;\n    } else if (prev !== null) {\n      this.data[prev + EdgeTypeMap.#NEXT_IN] = 0;\n    }\n  }\n\n  /**\n   * Get the address of the next edge _of the same type_\n   * outgoing _from the same node_ as the edge at the given address.\n   */\n  nextOut(edge: EdgeAddress): EdgeAddress | null {\n    return this.data[edge + EdgeTypeMap.#NEXT_OUT] || null;\n  }\n\n  /**\n   * Get the address of the previous edge _of the same type_\n   * outgoing _from the same node_ as the edge at the given address.\n   */\n  prevOut(edge: EdgeAddress): EdgeAddress | null {\n    return this.data[edge + EdgeTypeMap.#PREV_OUT] || null;\n  }\n\n  /** Link two adjacent edges of the same type outgoing from the same node. */\n  linkOut(edge: EdgeAddress, next: EdgeAddress) {\n    assert(this.typeOf(edge) === this.typeOf(next), 'Edge types must match.');\n    assert(this.from(edge) === this.from(next), 'From nodes must match.');\n    this.data[edge + EdgeTypeMap.#NEXT_OUT] = next;\n    this.data[next + EdgeTypeMap.#PREV_OUT] = edge;\n  }\n\n  /**\n   * Unlink an edge from the doubly linked list of outgoing edges\n   * of the same type from the same node.\n   */\n  unlinkOut(edge: EdgeAddress) {\n    let next = this.nextOut(edge);\n    let prev = this.prevOut(edge);\n    this.data[edge + EdgeTypeMap.#NEXT_OUT] = 0;\n    this.data[edge + EdgeTypeMap.#PREV_OUT] = 0;\n    if (next !== null && prev !== null) {\n      this.data[prev + EdgeTypeMap.#NEXT_OUT] = next;\n      this.data[next + EdgeTypeMap.#PREV_OUT] = prev;\n    } else if (next !== null) {\n      this.data[next + EdgeTypeMap.#PREV_OUT] = 0;\n    } else if (prev !== null) {\n      this.data[prev + EdgeTypeMap.#NEXT_OUT] = 0;\n    }\n  }\n\n  /** Create a hash of the edge connecting the `from` and `to` nodes.  */\n  hash(from: NodeId, to: NodeId, type: TEdgeType): EdgeHash {\n    // Each parameter is hashed by mixing its upper bits into its lower bits to\n    // increase the likelihood that a change to any bit of the input will vary\n    // the output widely. Then we do a series of prime multiplications and\n    // additions to combine the hashes into one value.\n    let hash = 17;\n    hash = hash * 37 + hash32shift((from: any));\n    hash = hash * 37 + hash32shift((to: any));\n    hash = hash * 37 + hash32shift((type: any));\n    // Finally, we map the hash to a value modulo the edge capacity.\n    hash %= this.capacity;\n    return hash;\n  }\n}\n\n/**\n * Links a node to another node with an edge of the given type.\n *\n * Returns one of the following numeric status codes:\n * - `0` EdgeAdded: the edge was added\n * - `1` EdgeExists: the edge already exists\n * - `2` EdgesOverloaded: the edge map is overloaded\n * - `3` TooManyDeletes: the edge map has too many deleted edges\n * - `4` NodesOverloaded: the node map is overloaded\n */\nfunction link<TEdgeType: number>(\n  from: NodeId,\n  to: NodeId,\n  type: TEdgeType | NullEdgeType,\n  edges: EdgeTypeMap<TEdgeType | NullEdgeType>,\n  nodes: NodeTypeMap<TEdgeType | NullEdgeType>,\n  unloadFactor: number = DEFAULT_PARAMS.unloadFactor,\n): $Values<typeof LinkResult> {\n  let hash = edges.hash(from, to, type);\n  let edge = edges.addressOf(hash, from, to, type);\n\n  // The edge is already in the graph; do nothing.\n  if (edge !== null) return LinkResult.EdgeExists;\n\n  let toNode = nodes.addressOf(to, type);\n  let fromNode = nodes.addressOf(from, type);\n\n  let nodeCount = nodes.count;\n  // add one for each node we must add.\n  if (toNode === null) nodeCount++;\n  if (fromNode === null) nodeCount++;\n  // If we're in danger of overflowing the `nodes` array, resize it.\n  if (nodes.getLoad(nodeCount) >= 1) {\n    return LinkResult.NodesOverloaded;\n  }\n\n  // We add 1 to account for the edge we are adding.\n  let count = edges.count + 1;\n  // Since the space occupied by deleted edges isn't reclaimed,\n  // we include them in our count to avoid overflowing the `edges` array.\n  let deletes = edges.deletes;\n  let total = count + deletes;\n  if (edges.getLoad(total) >= 1) {\n    if (\n      edges.getLoad(deletes) >= unloadFactor &&\n      edges.getLoad(count) < unloadFactor\n    ) {\n      // If we have a significant number of deletes, reclaim the space.\n      return LinkResult.TooManyDeletes;\n    } else {\n      return LinkResult.EdgesOverloaded;\n    }\n  }\n\n  if (toNode === null) toNode = nodes.add(to, type);\n  if (fromNode === null) fromNode = nodes.add(from, type);\n\n  // Add our new edge to its hash bucket.\n  edge = edges.add(hash, from, to, type);\n\n  // Link this edge to the node's list of incoming edges.\n  let prevIn = nodes.linkIn(toNode, edge);\n  if (prevIn !== null) edges.linkIn(prevIn, edge);\n\n  // Link this edge to the node's list of outgoing edges.\n  let prevOut = nodes.linkOut(fromNode, edge);\n  if (prevOut !== null) edges.linkOut(prevOut, edge);\n\n  return LinkResult.EdgeAdded;\n}\n\n// From https://gist.github.com/badboy/6267743#32-bit-mix-functions\nfunction hash32shift(key: number): number {\n  key = ~key + (key << 15); // key = (key << 15) - key - 1;\n  key = key ^ (key >> 12);\n  key = key + (key << 2);\n  key = key ^ (key >> 4);\n  key = key * 2057; // key = (key + (key << 3)) + (key << 11);\n  key = key ^ (key >> 16);\n  return key;\n}\n\nfunction interpolate(x: number, y: number, t: number): number {\n  return x + (y - x) * Math.min(1, Math.max(0, t));\n}\n\nfunction increaseNodeCapacity(\n  currentCapacity: number,\n  params: AdjacencyListParams,\n): number {\n  let newCapacity = Math.max(\n    // Make sure we have room for at least 2 more nodes.\n    currentCapacity + 2,\n    Math.ceil(currentCapacity * params.minGrowFactor),\n  );\n\n  if (newCapacity >= NodeTypeMap.MAX_CAPACITY) {\n    if (currentCapacity > NodeTypeMap.MAX_CAPACITY - 2) {\n      throw new Error('Node capacity overflow!');\n    }\n\n    return NodeTypeMap.MAX_CAPACITY;\n  }\n\n  return newCapacity;\n}\n\nfunction increaseEdgeCapacity(\n  currentCapacity: number,\n  params: AdjacencyListParams,\n): number {\n  // This is intended to strike a balance between growing the edge capacity\n  // in too small increments, which causes a lot of resizing, and growing\n  // the edge capacity in too large increments, which results in a lot of\n  // wasted memory.\n  let pct = currentCapacity / params.peakCapacity;\n  let growFactor = interpolate(params.maxGrowFactor, params.minGrowFactor, pct);\n\n  let newCapacity = Math.max(\n    // Make sure we have room for at least one more edge.\n    currentCapacity + 1,\n    Math.ceil(currentCapacity * growFactor),\n  );\n\n  if (newCapacity >= EdgeTypeMap.MAX_CAPACITY) {\n    if (currentCapacity > EdgeTypeMap.MAX_CAPACITY - 1) {\n      throw new Error('Edge capacity overflow!');\n    }\n\n    return EdgeTypeMap.MAX_CAPACITY;\n  }\n\n  return newCapacity;\n}\n\nfunction decreaseEdgeCapacity(\n  currentCapacity: number,\n  params: AdjacencyListParams,\n): number {\n  return Math.max(\n    // Make sure we don't shrink the capacity _below_ 2.\n    2,\n    Math.min(\n      // Make sure we shrink the capacity by at least 1.\n      currentCapacity - 1,\n      Math.ceil(currentCapacity * params.shrinkFactor),\n    ),\n  );\n}\n"
  },
  {
    "path": "packages/core/graph/src/BitSet.js",
    "content": "// @flow strict-local\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32#implementing_count_leading_ones_and_beyond\nfunction ctz32(n: number): number {\n  if (n === 0) {\n    return 32;\n  }\n  let reversed = n & -n;\n  return 31 - Math.clz32(reversed);\n}\n\nexport class BitSet {\n  bits: Uint32Array;\n\n  constructor(maxBits: number) {\n    this.bits = new Uint32Array(Math.ceil(maxBits / 32));\n  }\n\n  clone(): BitSet {\n    let res = new BitSet(this.capacity);\n    res.bits.set(this.bits);\n    return res;\n  }\n\n  static union(a: BitSet, b: BitSet): BitSet {\n    let res = a.clone();\n    res.union(b);\n    return res;\n  }\n\n  get capacity(): number {\n    return this.bits.length * 32;\n  }\n\n  add(bit: number) {\n    let i = bit >>> 5;\n    let b = bit & 31;\n    this.bits[i] |= 1 << b;\n  }\n\n  delete(bit: number) {\n    let i = bit >>> 5;\n    let b = bit & 31;\n    this.bits[i] &= ~(1 << b);\n  }\n\n  has(bit: number): boolean {\n    let i = bit >>> 5;\n    let b = bit & 31;\n    return Boolean(this.bits[i] & (1 << b));\n  }\n\n  empty(): boolean {\n    for (let k = 0; k < this.bits.length; k++) {\n      if (this.bits[k] !== 0) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  clear() {\n    this.bits.fill(0);\n  }\n\n  intersect(other: BitSet) {\n    for (let i = 0; i < this.bits.length; i++) {\n      this.bits[i] &= other.bits[i];\n    }\n  }\n\n  union(other: BitSet) {\n    for (let i = 0; i < this.bits.length; i++) {\n      this.bits[i] |= other.bits[i];\n    }\n  }\n\n  remove(other: BitSet) {\n    for (let i = 0; i < this.bits.length; i++) {\n      this.bits[i] &= ~other.bits[i];\n    }\n  }\n\n  forEach(fn: (bit: number) => void) {\n    // https://lemire.me/blog/2018/02/21/iterating-over-set-bits-quickly/\n    let bits = this.bits;\n    for (let k = 0; k < bits.length; k++) {\n      let v = bits[k];\n      while (v !== 0) {\n        let t = (v & -v) >>> 0;\n        // $FlowFixMe\n        fn((k << 5) + ctz32(v));\n        v ^= t;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/graph/src/ContentGraph.js",
    "content": "// @flow strict-local\nimport type {ContentKey, NodeId} from './types';\n\nimport Graph, {type SerializedGraph, type GraphOpts} from './Graph';\nimport nullthrows from 'nullthrows';\n\nexport type ContentGraphOpts<TNode, TEdgeType: number = 1> = {|\n  ...GraphOpts<TNode, TEdgeType>,\n  _contentKeyToNodeId: Map<ContentKey, NodeId>,\n  _nodeIdToContentKey: Map<NodeId, ContentKey>,\n|};\nexport type SerializedContentGraph<TNode, TEdgeType: number = 1> = {|\n  ...SerializedGraph<TNode, TEdgeType>,\n  _contentKeyToNodeId: Map<ContentKey, NodeId>,\n|};\n\nexport default class ContentGraph<TNode, TEdgeType: number = 1> extends Graph<\n  TNode,\n  TEdgeType,\n> {\n  _contentKeyToNodeId: Map<ContentKey, NodeId>;\n  _nodeIdToContentKey: Map<NodeId, ContentKey>;\n\n  constructor(opts: ?ContentGraphOpts<TNode, TEdgeType>) {\n    if (opts) {\n      let {_contentKeyToNodeId, _nodeIdToContentKey, ...rest} = opts;\n      super(rest);\n      this._contentKeyToNodeId = _contentKeyToNodeId;\n      this._nodeIdToContentKey = _nodeIdToContentKey;\n    } else {\n      super();\n      this._contentKeyToNodeId = new Map();\n      this._nodeIdToContentKey = new Map();\n    }\n  }\n\n  // $FlowFixMe[prop-missing]\n  static deserialize(\n    opts: ContentGraphOpts<TNode, TEdgeType>,\n  ): ContentGraph<TNode, TEdgeType> {\n    return new ContentGraph(opts);\n  }\n\n  // $FlowFixMe[prop-missing]\n  serialize(): SerializedContentGraph<TNode, TEdgeType> {\n    // $FlowFixMe[prop-missing]\n    return {\n      ...super.serialize(),\n      _contentKeyToNodeId: this._contentKeyToNodeId,\n      _nodeIdToContentKey: this._nodeIdToContentKey,\n    };\n  }\n\n  addNodeByContentKey(contentKey: ContentKey, node: TNode): NodeId {\n    if (this.hasContentKey(contentKey)) {\n      throw new Error('Graph already has content key ' + contentKey);\n    }\n\n    let nodeId = super.addNode(node);\n    this._contentKeyToNodeId.set(contentKey, nodeId);\n    this._nodeIdToContentKey.set(nodeId, contentKey);\n    return nodeId;\n  }\n\n  addNodeByContentKeyIfNeeded(contentKey: ContentKey, node: TNode): NodeId {\n    return this.hasContentKey(contentKey)\n      ? this.getNodeIdByContentKey(contentKey)\n      : this.addNodeByContentKey(contentKey, node);\n  }\n\n  getNodeByContentKey(contentKey: ContentKey): ?TNode {\n    let nodeId = this._contentKeyToNodeId.get(contentKey);\n    if (nodeId != null) {\n      return super.getNode(nodeId);\n    }\n  }\n\n  getNodeIdByContentKey(contentKey: ContentKey): NodeId {\n    return nullthrows(\n      this._contentKeyToNodeId.get(contentKey),\n      `Expected content key ${contentKey} to exist`,\n    );\n  }\n\n  hasContentKey(contentKey: ContentKey): boolean {\n    return this._contentKeyToNodeId.has(contentKey);\n  }\n\n  removeNode(nodeId: NodeId): void {\n    this._assertHasNodeId(nodeId);\n    let contentKey = nullthrows(this._nodeIdToContentKey.get(nodeId));\n    this._contentKeyToNodeId.delete(contentKey);\n    this._nodeIdToContentKey.delete(nodeId);\n    super.removeNode(nodeId);\n  }\n}\n"
  },
  {
    "path": "packages/core/graph/src/Graph.js",
    "content": "// @flow strict-local\n\nimport {fromNodeId} from './types';\nimport AdjacencyList, {type SerializedAdjacencyList} from './AdjacencyList';\nimport type {Edge, NodeId} from './types';\nimport type {\n  TraversalActions,\n  GraphVisitor,\n  GraphTraversalCallback,\n} from '@parcel/types';\nimport {BitSet} from './BitSet';\n\nimport nullthrows from 'nullthrows';\n\nexport type NullEdgeType = 1;\nexport type GraphOpts<TNode, TEdgeType: number = 1> = {|\n  nodes?: Array<TNode | null>,\n  adjacencyList?: SerializedAdjacencyList<TEdgeType>,\n  rootNodeId?: ?NodeId,\n|};\n\nexport type SerializedGraph<TNode, TEdgeType: number = 1> = {|\n  nodes: Array<TNode | null>,\n  adjacencyList: SerializedAdjacencyList<TEdgeType>,\n  rootNodeId: ?NodeId,\n|};\n\nexport type AllEdgeTypes = -1;\nexport const ALL_EDGE_TYPES: AllEdgeTypes = -1;\n\ntype DFSCommandVisit<TContext> = {|\n  nodeId: NodeId,\n  context: TContext | null,\n|};\n\ntype DFSCommandExit<TContext> = {|\n  nodeId: NodeId,\n  exit: GraphTraversalCallback<NodeId, TContext>,\n  context: TContext | null,\n|};\n\n/**\n * Internal type used for queue iterative DFS implementation.\n */\ntype DFSCommand<TContext> =\n  | DFSCommandVisit<TContext>\n  | DFSCommandExit<TContext>;\n\n/**\n * Options for DFS traversal.\n */\nexport type DFSParams<TContext> = {|\n  visit: GraphVisitor<NodeId, TContext>,\n  /**\n   * Custom function to get next entries to visit.\n   *\n   * This can be a performance bottleneck as arrays are created on every node visit.\n   *\n   * @deprecated This will be replaced by a static `traversalType` set of orders in the future\n   *\n   * Currently, this is only used in 3 ways:\n   *\n   * - Traversing down the tree (normal DFS)\n   * - Traversing up the tree (ancestors)\n   * - Filtered version of traversal; which does not need to exist at the DFS level as the visitor\n   *   can handle filtering\n   * - Sorted traversal of BundleGraph entries, which does not have a clear use-case, but may\n   *   not be safe to remove\n   *\n   * Only due to the latter we aren't replacing this.\n   */\n  getChildren: (nodeId: NodeId) => Array<NodeId>,\n  startNodeId?: ?NodeId,\n|};\n\nexport default class Graph<TNode, TEdgeType: number = 1> {\n  nodes: Array<TNode | null>;\n  adjacencyList: AdjacencyList<TEdgeType>;\n  rootNodeId: ?NodeId;\n  _visited: ?BitSet;\n\n  constructor(opts: ?GraphOpts<TNode, TEdgeType>) {\n    this.nodes = opts?.nodes || [];\n    this.setRootNodeId(opts?.rootNodeId);\n\n    let adjacencyList = opts?.adjacencyList;\n    this.adjacencyList = adjacencyList\n      ? AdjacencyList.deserialize(adjacencyList)\n      : new AdjacencyList<TEdgeType>();\n  }\n\n  setRootNodeId(id: ?NodeId) {\n    this.rootNodeId = id;\n  }\n\n  static deserialize(\n    opts: GraphOpts<TNode, TEdgeType>,\n  ): Graph<TNode, TEdgeType> {\n    return new this({\n      nodes: opts.nodes,\n      adjacencyList: opts.adjacencyList,\n      rootNodeId: opts.rootNodeId,\n    });\n  }\n\n  serialize(): SerializedGraph<TNode, TEdgeType> {\n    return {\n      nodes: this.nodes,\n      adjacencyList: this.adjacencyList.serialize(),\n      rootNodeId: this.rootNodeId,\n    };\n  }\n\n  // Returns an iterator of all edges in the graph. This can be large, so iterating\n  // the complete list can be costly in large graphs. Used when merging graphs.\n  getAllEdges(): Iterator<Edge<TEdgeType | NullEdgeType>> {\n    return this.adjacencyList.getAllEdges();\n  }\n\n  addNode(node: TNode): NodeId {\n    let id = this.adjacencyList.addNode();\n    this.nodes.push(node);\n    return id;\n  }\n\n  hasNode(id: NodeId): boolean {\n    return this.nodes[id] != null;\n  }\n\n  getNode(id: NodeId): ?TNode {\n    return this.nodes[id];\n  }\n\n  addEdge(\n    from: NodeId,\n    to: NodeId,\n    type: TEdgeType | NullEdgeType = 1,\n  ): boolean {\n    if (Number(type) === 0) {\n      throw new Error(`Edge type \"${type}\" not allowed`);\n    }\n\n    if (this.getNode(from) == null) {\n      throw new Error(`\"from\" node '${fromNodeId(from)}' not found`);\n    }\n\n    if (this.getNode(to) == null) {\n      throw new Error(`\"to\" node '${fromNodeId(to)}' not found`);\n    }\n\n    return this.adjacencyList.addEdge(from, to, type);\n  }\n\n  hasEdge(\n    from: NodeId,\n    to: NodeId,\n    type?: TEdgeType | NullEdgeType | Array<TEdgeType | NullEdgeType> = 1,\n  ): boolean {\n    return this.adjacencyList.hasEdge(from, to, type);\n  }\n\n  getNodeIdsConnectedTo(\n    nodeId: NodeId,\n    type:\n      | TEdgeType\n      | NullEdgeType\n      | Array<TEdgeType | NullEdgeType>\n      | AllEdgeTypes = 1,\n  ): Array<NodeId> {\n    this._assertHasNodeId(nodeId);\n\n    return this.adjacencyList.getNodeIdsConnectedTo(nodeId, type);\n  }\n\n  getNodeIdsConnectedFrom(\n    nodeId: NodeId,\n    type:\n      | TEdgeType\n      | NullEdgeType\n      | Array<TEdgeType | NullEdgeType>\n      | AllEdgeTypes = 1,\n  ): Array<NodeId> {\n    this._assertHasNodeId(nodeId);\n\n    return this.adjacencyList.getNodeIdsConnectedFrom(nodeId, type);\n  }\n\n  // Removes node and any edges coming from or to that node\n  removeNode(nodeId: NodeId) {\n    if (!this.hasNode(nodeId)) {\n      return;\n    }\n\n    for (let {type, from} of this.adjacencyList.getInboundEdgesByType(nodeId)) {\n      this._removeEdge(\n        from,\n        nodeId,\n        type,\n        // Do not allow orphans to be removed as this node could be one\n        // and is already being removed.\n        false,\n      );\n    }\n\n    for (let {type, to} of this.adjacencyList.getOutboundEdgesByType(nodeId)) {\n      this._removeEdge(nodeId, to, type);\n    }\n\n    this.nodes[nodeId] = null;\n  }\n\n  removeEdges(nodeId: NodeId, type: TEdgeType | NullEdgeType = 1) {\n    if (!this.hasNode(nodeId)) {\n      return;\n    }\n\n    for (let to of this.getNodeIdsConnectedFrom(nodeId, type)) {\n      this._removeEdge(nodeId, to, type);\n    }\n  }\n\n  removeEdge(\n    from: NodeId,\n    to: NodeId,\n    type: TEdgeType | NullEdgeType = 1,\n    removeOrphans: boolean = true,\n  ) {\n    if (!this.adjacencyList.hasEdge(from, to, type)) {\n      throw new Error(\n        `Edge from ${fromNodeId(from)} to ${fromNodeId(to)} not found!`,\n      );\n    }\n\n    this._removeEdge(from, to, type, removeOrphans);\n  }\n\n  // Removes edge and node the edge is to if the node is orphaned\n  _removeEdge(\n    from: NodeId,\n    to: NodeId,\n    type: TEdgeType | NullEdgeType = 1,\n    removeOrphans: boolean = true,\n  ) {\n    if (!this.adjacencyList.hasEdge(from, to, type)) {\n      return;\n    }\n\n    this.adjacencyList.removeEdge(from, to, type);\n    if (removeOrphans && this.isOrphanedNode(to)) {\n      this.removeNode(to);\n    }\n  }\n\n  isOrphanedNode(nodeId: NodeId): boolean {\n    if (!this.hasNode(nodeId)) {\n      return false;\n    }\n\n    if (this.rootNodeId == null) {\n      // If the graph does not have a root, and there are inbound edges,\n      // this node should not be considered orphaned.\n      return !this.adjacencyList.hasInboundEdges(nodeId);\n    }\n\n    // Otherwise, attempt to traverse backwards to the root. If there is a path,\n    // then this is not an orphaned node.\n    let hasPathToRoot = false;\n    // go back to traverseAncestors\n    this.traverseAncestors(\n      nodeId,\n      (ancestorId, _, actions) => {\n        if (ancestorId === this.rootNodeId) {\n          hasPathToRoot = true;\n          actions.stop();\n        }\n      },\n      ALL_EDGE_TYPES,\n    );\n\n    if (hasPathToRoot) {\n      return false;\n    }\n\n    return true;\n  }\n\n  updateNode(nodeId: NodeId, node: TNode): void {\n    this._assertHasNodeId(nodeId);\n    this.nodes[nodeId] = node;\n  }\n\n  // Update a node's downstream nodes making sure to prune any orphaned branches\n  replaceNodeIdsConnectedTo(\n    fromNodeId: NodeId,\n    toNodeIds: $ReadOnlyArray<NodeId>,\n    replaceFilter?: null | (NodeId => boolean),\n    type?: TEdgeType | NullEdgeType = 1,\n  ): void {\n    this._assertHasNodeId(fromNodeId);\n\n    let outboundEdges = this.getNodeIdsConnectedFrom(fromNodeId, type);\n    let childrenToRemove = new Set(\n      replaceFilter\n        ? outboundEdges.filter(toNodeId => replaceFilter(toNodeId))\n        : outboundEdges,\n    );\n    for (let toNodeId of toNodeIds) {\n      childrenToRemove.delete(toNodeId);\n\n      if (!this.hasEdge(fromNodeId, toNodeId, type)) {\n        this.addEdge(fromNodeId, toNodeId, type);\n      }\n    }\n\n    for (let child of childrenToRemove) {\n      this._removeEdge(fromNodeId, child, type);\n    }\n  }\n\n  traverse<TContext>(\n    visit: GraphVisitor<NodeId, TContext>,\n    startNodeId: ?NodeId,\n    type:\n      | TEdgeType\n      | NullEdgeType\n      | Array<TEdgeType | NullEdgeType>\n      | AllEdgeTypes = 1,\n  ): ?TContext {\n    let enter = typeof visit === 'function' ? visit : visit.enter;\n    if (\n      type === ALL_EDGE_TYPES &&\n      enter &&\n      (typeof visit === 'function' || !visit.exit)\n    ) {\n      return this.dfsFast(enter, startNodeId);\n    } else {\n      return this.dfs({\n        visit,\n        startNodeId,\n        getChildren: nodeId => this.getNodeIdsConnectedFrom(nodeId, type),\n      });\n    }\n  }\n\n  filteredTraverse<TValue, TContext>(\n    filter: (NodeId, TraversalActions) => ?TValue,\n    visit: GraphVisitor<TValue, TContext>,\n    startNodeId: ?NodeId,\n    type?: TEdgeType | Array<TEdgeType | NullEdgeType> | AllEdgeTypes,\n  ): ?TContext {\n    return this.traverse(mapVisitor(filter, visit), startNodeId, type);\n  }\n\n  traverseAncestors<TContext>(\n    startNodeId: ?NodeId,\n    visit: GraphVisitor<NodeId, TContext>,\n    type:\n      | TEdgeType\n      | NullEdgeType\n      | Array<TEdgeType | NullEdgeType>\n      | AllEdgeTypes = 1,\n  ): ?TContext {\n    return this.dfs({\n      visit,\n      startNodeId,\n      getChildren: nodeId => this.getNodeIdsConnectedTo(nodeId, type),\n    });\n  }\n\n  dfsFast<TContext>(\n    visit: GraphTraversalCallback<NodeId, TContext>,\n    startNodeId: ?NodeId,\n  ): ?TContext {\n    let traversalStartNode = nullthrows(\n      startNodeId ?? this.rootNodeId,\n      'A start node is required to traverse',\n    );\n    this._assertHasNodeId(traversalStartNode);\n\n    let visited;\n    if (!this._visited || this._visited.capacity < this.nodes.length) {\n      this._visited = new BitSet(this.nodes.length);\n      visited = this._visited;\n    } else {\n      visited = this._visited;\n      visited.clear();\n    }\n    // Take shared instance to avoid re-entrancy issues.\n    this._visited = null;\n\n    let stopped = false;\n    let skipped = false;\n    let actions: TraversalActions = {\n      skipChildren() {\n        skipped = true;\n      },\n      stop() {\n        stopped = true;\n      },\n    };\n\n    let queue = [{nodeId: traversalStartNode, context: null}];\n    while (queue.length !== 0) {\n      let {nodeId, context} = queue.pop();\n      if (!this.hasNode(nodeId) || visited.has(nodeId)) continue;\n      visited.add(nodeId);\n\n      skipped = false;\n      let newContext = visit(nodeId, context, actions);\n      if (typeof newContext !== 'undefined') {\n        // $FlowFixMe[reassign-const]\n        context = newContext;\n      }\n\n      if (skipped) {\n        continue;\n      }\n\n      if (stopped) {\n        this._visited = visited;\n        return context;\n      }\n\n      this.adjacencyList.forEachNodeIdConnectedFromReverse(nodeId, child => {\n        if (!visited.has(child)) {\n          queue.push({nodeId: child, context});\n        }\n        return false;\n      });\n    }\n\n    this._visited = visited;\n    return null;\n  }\n\n  // A post-order implementation of dfsFast\n  postOrderDfsFast(\n    visit: GraphTraversalCallback<NodeId, TraversalActions>,\n    startNodeId: ?NodeId,\n  ): void {\n    let traversalStartNode = nullthrows(\n      startNodeId ?? this.rootNodeId,\n      'A start node is required to traverse',\n    );\n    this._assertHasNodeId(traversalStartNode);\n\n    let visited;\n    if (!this._visited || this._visited.capacity < this.nodes.length) {\n      this._visited = new BitSet(this.nodes.length);\n      visited = this._visited;\n    } else {\n      visited = this._visited;\n      visited.clear();\n    }\n    this._visited = null;\n\n    let stopped = false;\n    let actions: TraversalActions = {\n      stop() {\n        stopped = true;\n      },\n      skipChildren() {\n        throw new Error(\n          'Calling skipChildren inside a post-order traversal is not allowed',\n        );\n      },\n    };\n\n    let queue = [traversalStartNode];\n    while (queue.length !== 0) {\n      let nodeId = queue[queue.length - 1];\n\n      if (!visited.has(nodeId)) {\n        visited.add(nodeId);\n\n        this.adjacencyList.forEachNodeIdConnectedFromReverse(nodeId, child => {\n          if (!visited.has(child)) {\n            queue.push(child);\n          }\n          return false;\n        });\n      } else {\n        queue.pop();\n        visit(nodeId, null, actions);\n\n        if (stopped) {\n          this._visited = visited;\n          return;\n        }\n      }\n    }\n\n    this._visited = visited;\n    return;\n  }\n\n  /**\n   * Iterative implementation of DFS that supports all use-cases.\n   *\n   * This replaces `dfs` and will replace `dfsFast`.\n   */\n  dfs<TContext>({\n    visit,\n    startNodeId,\n    getChildren,\n  }: DFSParams<TContext>): ?TContext {\n    let traversalStartNode = nullthrows(\n      startNodeId ?? this.rootNodeId,\n      'A start node is required to traverse',\n    );\n    this._assertHasNodeId(traversalStartNode);\n\n    let visited;\n    if (!this._visited || this._visited.capacity < this.nodes.length) {\n      this._visited = new BitSet(this.nodes.length);\n      visited = this._visited;\n    } else {\n      visited = this._visited;\n      visited.clear();\n    }\n    // Take shared instance to avoid re-entrancy issues.\n    this._visited = null;\n\n    let stopped = false;\n    let skipped = false;\n    let actions: TraversalActions = {\n      skipChildren() {\n        skipped = true;\n      },\n      stop() {\n        stopped = true;\n      },\n    };\n\n    const queue: DFSCommand<TContext>[] = [\n      {nodeId: traversalStartNode, context: null},\n    ];\n    const enter = typeof visit === 'function' ? visit : visit.enter;\n    while (queue.length !== 0) {\n      const command = queue.pop();\n\n      if (command.exit != null) {\n        let {nodeId, context, exit} = command;\n        let newContext = exit(nodeId, command.context, actions);\n        if (typeof newContext !== 'undefined') {\n          // $FlowFixMe[reassign-const]\n          context = newContext;\n        }\n\n        if (skipped) {\n          continue;\n        }\n\n        if (stopped) {\n          this._visited = visited;\n          return context;\n        }\n      } else {\n        let {nodeId, context} = command;\n        if (!this.hasNode(nodeId) || visited.has(nodeId)) continue;\n        visited.add(nodeId);\n\n        skipped = false;\n        if (enter) {\n          let newContext = enter(nodeId, context, actions);\n          if (typeof newContext !== 'undefined') {\n            // $FlowFixMe[reassign-const]\n            context = newContext;\n          }\n        }\n\n        if (skipped) {\n          continue;\n        }\n\n        if (stopped) {\n          this._visited = visited;\n          return context;\n        }\n\n        if (typeof visit !== 'function' && visit.exit) {\n          queue.push({\n            nodeId,\n            exit: visit.exit,\n            context,\n          });\n        }\n\n        // TODO turn into generator function\n        const children = getChildren(nodeId);\n        for (let i = children.length - 1; i > -1; i -= 1) {\n          const child = children[i];\n          if (visited.has(child)) {\n            continue;\n          }\n\n          queue.push({nodeId: child, context});\n        }\n      }\n    }\n\n    this._visited = visited;\n  }\n\n  bfs(visit: (nodeId: NodeId) => ?boolean): ?NodeId {\n    let rootNodeId = nullthrows(\n      this.rootNodeId,\n      'A root node is required to traverse',\n    );\n\n    let queue: Array<NodeId> = [rootNodeId];\n    let visited = new Set<NodeId>([rootNodeId]);\n\n    while (queue.length > 0) {\n      let node = queue.shift();\n      let stop = visit(rootNodeId);\n      if (stop === true) {\n        return node;\n      }\n\n      for (let child of this.getNodeIdsConnectedFrom(node)) {\n        if (!visited.has(child)) {\n          visited.add(child);\n          queue.push(child);\n        }\n      }\n    }\n\n    return null;\n  }\n\n  topoSort(type?: TEdgeType): Array<NodeId> {\n    let sorted: Array<NodeId> = [];\n    this.traverse(\n      {\n        exit: nodeId => {\n          sorted.push(nodeId);\n        },\n      },\n      null,\n      type,\n    );\n    return sorted.reverse();\n  }\n\n  findAncestor(nodeId: NodeId, fn: (nodeId: NodeId) => boolean): ?NodeId {\n    let res = null;\n    this.traverseAncestors(nodeId, (nodeId, ctx, traversal) => {\n      if (fn(nodeId)) {\n        res = nodeId;\n        traversal.stop();\n      }\n    });\n    return res;\n  }\n\n  findAncestors(\n    nodeId: NodeId,\n    fn: (nodeId: NodeId) => boolean,\n  ): Array<NodeId> {\n    let res = [];\n    this.traverseAncestors(nodeId, (nodeId, ctx, traversal) => {\n      if (fn(nodeId)) {\n        res.push(nodeId);\n        traversal.skipChildren();\n      }\n    });\n    return res;\n  }\n\n  findDescendant(nodeId: NodeId, fn: (nodeId: NodeId) => boolean): ?NodeId {\n    let res = null;\n    this.traverse((nodeId, ctx, traversal) => {\n      if (fn(nodeId)) {\n        res = nodeId;\n        traversal.stop();\n      }\n    }, nodeId);\n    return res;\n  }\n\n  findDescendants(\n    nodeId: NodeId,\n    fn: (nodeId: NodeId) => boolean,\n  ): Array<NodeId> {\n    let res = [];\n    this.traverse((nodeId, ctx, traversal) => {\n      if (fn(nodeId)) {\n        res.push(nodeId);\n        traversal.skipChildren();\n      }\n    }, nodeId);\n    return res;\n  }\n\n  _assertHasNodeId(nodeId: NodeId) {\n    if (!this.hasNode(nodeId)) {\n      throw new Error('Does not have node ' + fromNodeId(nodeId));\n    }\n  }\n}\n\nexport function mapVisitor<NodeId, TValue, TContext>(\n  filter: (NodeId, TraversalActions) => ?TValue,\n  visit: GraphVisitor<TValue, TContext>,\n): GraphVisitor<NodeId, TContext> {\n  function makeEnter(visit) {\n    return function mappedEnter(nodeId, context, actions) {\n      let value = filter(nodeId, actions);\n      if (value != null) {\n        return visit(value, context, actions);\n      }\n    };\n  }\n\n  if (typeof visit === 'function') {\n    return makeEnter(visit);\n  }\n\n  let mapped = {};\n  if (visit.enter != null) {\n    mapped.enter = makeEnter(visit.enter);\n  }\n\n  if (visit.exit != null) {\n    mapped.exit = function mappedExit(nodeId, context, actions) {\n      let exit = visit.exit;\n      if (!exit) {\n        return;\n      }\n\n      let value = filter(nodeId, actions);\n      if (value != null) {\n        return exit(value, context, actions);\n      }\n    };\n  }\n\n  return mapped;\n}\n"
  },
  {
    "path": "packages/core/graph/src/index.js",
    "content": "// @flow strict-local\n\nexport type {NodeId, ContentKey, Edge} from './types';\nexport type {GraphOpts} from './Graph';\nexport type {ContentGraphOpts, SerializedContentGraph} from './ContentGraph';\nexport {toNodeId, fromNodeId} from './types';\nexport {default as Graph, ALL_EDGE_TYPES, mapVisitor} from './Graph';\nexport {default as ContentGraph} from './ContentGraph';\nexport {BitSet} from './BitSet';\n"
  },
  {
    "path": "packages/core/graph/src/shared-buffer.js",
    "content": "// @flow\n// Copy from @parcel/utils to fix: https://github.com/stackblitz/core/issues/1855\nexport let SharedBuffer: Class<ArrayBuffer> | Class<SharedArrayBuffer>;\n\n// $FlowFixMe[prop-missing]\nif (process.browser) {\n  SharedBuffer = ArrayBuffer;\n  // Safari has removed the constructor\n  if (typeof SharedArrayBuffer !== 'undefined') {\n    let channel = new MessageChannel();\n    try {\n      // Firefox might throw when sending the Buffer over a MessagePort\n      channel.port1.postMessage(new SharedArrayBuffer(0));\n      SharedBuffer = SharedArrayBuffer;\n    } catch (_) {\n      // NOOP\n    }\n    channel.port1.close();\n    channel.port2.close();\n  }\n} else {\n  SharedBuffer = SharedArrayBuffer;\n}\n"
  },
  {
    "path": "packages/core/graph/src/types.js",
    "content": "// @flow strict-local\n\n// forcing NodeId to be opaque as it should only be created once\nexport type NodeId = number;\nexport function toNodeId(x: number): NodeId {\n  return x;\n}\nexport function fromNodeId(x: NodeId): number {\n  return x;\n}\n\nexport type ContentKey = string;\n\nexport type Edge<TEdgeType: number> = {|\n  from: NodeId,\n  to: NodeId,\n  type: TEdgeType,\n|};\n"
  },
  {
    "path": "packages/core/graph/test/AdjacencyList.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport path from 'path';\nimport {Worker} from 'worker_threads';\n\nimport AdjacencyList, {NodeTypeMap, EdgeTypeMap} from '../src/AdjacencyList';\nimport {toNodeId} from '../src/types';\n\ndescribe('AdjacencyList', () => {\n  it('constructor should initialize an empty graph', () => {\n    let stats = new AdjacencyList().stats;\n    assert(stats.nodes === 0);\n    assert(stats.edges === 0);\n  });\n\n  it('addNode should add a node to the graph', () => {\n    let graph = new AdjacencyList();\n    let id = graph.addNode();\n    assert.equal(id, 0);\n    assert.equal(graph.stats.nodes, 1);\n    let id2 = graph.addNode();\n    assert.equal(id2, 1);\n    assert.equal(graph.stats.nodes, 2);\n  });\n\n  it('addNode should resize nodes array', () => {\n    let graph = new AdjacencyList();\n    let size = graph.serialize().nodes.byteLength;\n    graph.addNode();\n    graph.addNode();\n    graph.addNode();\n    graph.addNode();\n    assert(size < graph.serialize().nodes.byteLength);\n  });\n\n  it('removeEdge should remove an edge from the graph', () => {\n    let graph = new AdjacencyList();\n    let node0 = graph.addNode();\n    let node1 = graph.addNode();\n    let node2 = graph.addNode();\n    let node3 = graph.addNode();\n    let node4 = graph.addNode();\n    let node5 = graph.addNode();\n    let node6 = graph.addNode();\n    graph.addEdge(node0, node1);\n    graph.addEdge(node2, node1);\n    // this will get removed\n    graph.addEdge(node3, node1);\n    graph.addEdge(node4, node1);\n    graph.addEdge(node5, node1);\n    graph.addEdge(node6, node1);\n\n    assert.deepEqual(graph.getNodeIdsConnectedTo(node1), [0, 2, 3, 4, 5, 6]);\n\n    graph.removeEdge(node3, node1);\n    assert.deepEqual(graph.getNodeIdsConnectedTo(node1), [0, 2, 4, 5, 6]);\n  });\n\n  it('getNodeIdsConnectedTo and getNodeIdsConnectedFrom should remove duplicate values', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    let c = graph.addNode();\n    graph.addEdge(a, b);\n    graph.addEdge(a, c);\n    graph.addEdge(a, b, 2);\n    assert.deepEqual(graph.getNodeIdsConnectedFrom(a, -1), [b, c]);\n    assert.deepEqual(graph.getNodeIdsConnectedTo(b, -1), [a]);\n  });\n\n  it('removeEdge should remove an edge of a specific type from the graph', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    let c = graph.addNode();\n    let d = graph.addNode();\n    graph.addEdge(a, b);\n    graph.addEdge(a, b, 2);\n    graph.addEdge(a, b, 3);\n    graph.addEdge(a, c);\n    graph.addEdge(a, d, 3);\n    assert.equal(graph.stats.edges, 5);\n    assert.ok(graph.hasEdge(a, b));\n    assert.ok(graph.hasEdge(a, b, 2));\n    assert.ok(graph.hasEdge(a, b, 3));\n    assert.ok(graph.hasEdge(a, c));\n    assert.ok(graph.hasEdge(a, d, 3));\n    assert.deepEqual(Array.from(graph.getAllEdges()), [\n      {from: a, to: b, type: 1},\n      {from: a, to: b, type: 2},\n      {from: a, to: b, type: 3},\n      {from: a, to: c, type: 1},\n      {from: a, to: d, type: 3},\n    ]);\n\n    graph.removeEdge(a, b, 2);\n    assert.equal(graph.stats.edges, 4);\n    assert.ok(graph.hasEdge(a, b));\n    assert.equal(graph.hasEdge(a, b, 2), false);\n    assert.ok(graph.hasEdge(a, b, 3));\n    assert.ok(graph.hasEdge(a, c));\n    assert.ok(graph.hasEdge(a, d, 3));\n    assert.deepEqual(Array.from(graph.getAllEdges()), [\n      {from: a, to: b, type: 1},\n      {from: a, to: b, type: 3},\n      {from: a, to: c, type: 1},\n      {from: a, to: d, type: 3},\n    ]);\n  });\n\n  it('addEdge should add an edge to the graph', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    graph.addEdge(a, b);\n    assert.equal(graph.stats.nodes, 2);\n    assert.equal(graph.stats.edges, 1);\n    assert.ok(graph.hasEdge(a, b));\n  });\n\n  it('addEdge should add multiple edges from a node in order', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    let c = graph.addNode();\n    let d = graph.addNode();\n    graph.addEdge(a, b);\n    graph.addEdge(a, d);\n    graph.addEdge(a, c);\n    assert.deepEqual(graph.getNodeIdsConnectedFrom(a), [b, d, c]);\n  });\n\n  it('addEdge should add multiple edges to a node in order', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    let c = graph.addNode();\n    let d = graph.addNode();\n    graph.addEdge(a, b);\n    graph.addEdge(d, b);\n    graph.addEdge(a, d);\n    graph.addEdge(c, b);\n    assert.deepEqual(graph.getNodeIdsConnectedTo(b), [a, d, c]);\n  });\n\n  it('addEdge should add multiple edges of different types in order', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    graph.addEdge(a, b);\n    graph.addEdge(a, b, 1);\n    graph.addEdge(a, b, 4);\n    graph.addEdge(a, b, 3);\n    assert.deepEqual(graph.getNodeIdsConnectedFrom(a), [b]);\n    assert.deepEqual(Array.from(graph.getAllEdges()), [\n      {from: a, to: b, type: 1},\n      {from: a, to: b, type: 4},\n      {from: a, to: b, type: 3},\n    ]);\n  });\n\n  it('addEdge should return false if an edge is already added', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    assert.equal(graph.addEdge(a, b), true);\n    assert.equal(graph.addEdge(a, b), false);\n  });\n\n  it('addEdge should resize nodes array when necessary', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    let size = graph.serialize().nodes.byteLength;\n    graph.addEdge(a, b, 1);\n    graph.addEdge(a, b, 2);\n    graph.addEdge(a, b, 3);\n    graph.addEdge(a, b, 4);\n    assert(size < graph.serialize().nodes.byteLength);\n  });\n\n  it('addEdge should resize edges array when necessary', () => {\n    let graph = new AdjacencyList();\n    let size = graph.serialize().edges.byteLength;\n    let a = graph.addNode();\n    let b = graph.addNode();\n    graph.addEdge(a, b, 1);\n    graph.addEdge(a, b, 2);\n    graph.addEdge(a, b, 3);\n    assert(size < graph.serialize().edges.byteLength);\n  });\n\n  it('addEdge should error when a node has not been added to the graph', () => {\n    let graph = new AdjacencyList();\n    assert.throws(() => graph.addEdge(toNodeId(0), toNodeId(1)));\n    graph.addNode();\n    assert.throws(() => graph.addEdge(toNodeId(0), toNodeId(1)));\n    graph.addNode();\n    assert.doesNotThrow(() => graph.addEdge(toNodeId(0), toNodeId(1)));\n    assert.throws(() => graph.addEdge(toNodeId(0), toNodeId(2)));\n  });\n\n  it('addEdge should error when an unsupported edge type is provided', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    assert.throws(() => graph.addEdge(a, b, 0));\n    assert.throws(() => graph.addEdge(a, b, -1));\n    assert.doesNotThrow(() => graph.addEdge(a, b, 1));\n  });\n\n  it('addEdge should not replace a deleted edge if the edge was already added', () => {\n    // Mock hash fn to generate collisions\n    // $FlowFixMe[prop-missing]\n    let originalHash = AdjacencyList.prototype.hash;\n    // $FlowFixMe[prop-missing]\n    AdjacencyList.prototype.hash = () => 1;\n\n    let graph = new AdjacencyList();\n    let n0 = graph.addNode();\n    let n1 = graph.addNode();\n    let n2 = graph.addNode();\n    graph.addEdge(n0, n1, 1);\n    graph.addEdge(n1, n2, 1);\n    graph.removeEdge(n1, n2, 1);\n    assert(graph.addEdge(n0, n1, 1) === false);\n    assert(graph.stats.edges === 1);\n\n    // $FlowFixMe[prop-missing]\n    AdjacencyList.prototype.hash = originalHash;\n  });\n\n  it('addEdge should replace a deleted edge', () => {\n    // Mock hash fn to generate collisions\n    // $FlowFixMe[prop-missing]\n    let originalHash = AdjacencyList.prototype.hash;\n    // $FlowFixMe[prop-missing]\n    AdjacencyList.prototype.hash = () => 1;\n\n    try {\n      let graph = new AdjacencyList({initialCapacity: 3});\n      let n0 = graph.addNode();\n      let n1 = graph.addNode();\n      graph.addEdge(n0, n1, 2);\n      graph.removeEdge(n0, n1, 2);\n      assert(graph.addEdge(n0, n1, 2));\n      assert(graph.stats.edges === 1);\n      assert(graph.stats.deleted === 1);\n      // Resize to reclaim deleted edge space.\n      graph.resizeEdges(2);\n      assert(graph.stats.edges === 1);\n      assert(graph.stats.deleted === 0);\n    } finally {\n      // $FlowFixMe[prop-missing]\n      AdjacencyList.prototype.hash = originalHash;\n    }\n  });\n\n  it('hasEdge should accept an array of edge types', () => {\n    let graph = new AdjacencyList();\n    let a = graph.addNode();\n    let b = graph.addNode();\n    let c = graph.addNode();\n\n    graph.addEdge(a, b, 1);\n    graph.addEdge(b, c, 2);\n\n    assert.ok(!graph.hasEdge(a, b, [2, 3]));\n    assert.ok(graph.hasEdge(a, b, [1, 2]));\n    assert.ok(!graph.hasEdge(b, c, [1, 3]));\n    assert.ok(graph.hasEdge(b, c, [2, 3]));\n  });\n\n  describe('deserialize', function () {\n    this.timeout(10000);\n\n    it('should share the underlying data across worker threads', async () => {\n      let graph = new AdjacencyList();\n      let n0 = graph.addNode();\n      let n1 = graph.addNode();\n      graph.addEdge(n0, n1, 1);\n      graph.addEdge(n0, n1, 2);\n\n      let worker = new Worker(\n        path.join(__dirname, 'integration/adjacency-list-shared-array.js'),\n      );\n\n      let originalSerialized = graph.serialize();\n      let originalNodes = [...originalSerialized.nodes];\n      let originalEdges = [...originalSerialized.edges];\n      let work = new Promise(resolve => worker.on('message', resolve));\n      worker.postMessage(originalSerialized);\n      let received = AdjacencyList.deserialize(await work);\n      // eslint-disable-next-line no-unused-vars\n      const _terminatePromise = worker.terminate();\n\n      assert.deepEqual(received.serialize().nodes, graph.serialize().nodes);\n      assert.deepEqual(received.serialize().edges, graph.serialize().edges);\n\n      originalNodes.forEach((v, i) => {\n        if (i < NodeTypeMap.HEADER_SIZE) {\n          assert.equal(v, received.serialize().nodes[i]);\n          assert.equal(v, graph.serialize().nodes[i]);\n        } else {\n          assert.equal(v * 2, received.serialize().nodes[i]);\n          assert.equal(v * 2, graph.serialize().nodes[i]);\n        }\n      });\n\n      originalEdges.forEach((v, i) => {\n        if (i < EdgeTypeMap.HEADER_SIZE) {\n          assert.equal(v, received.serialize().edges[i]);\n          assert.equal(v, graph.serialize().edges[i]);\n        } else {\n          assert.equal(v * 2, received.serialize().edges[i]);\n          assert.equal(v * 2, graph.serialize().edges[i]);\n        }\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/graph/test/BitSet.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {BitSet} from '../src/BitSet';\n\nfunction assertValues(set: BitSet, values: Array<number>) {\n  let setValues = [];\n  set.forEach(bit => {\n    setValues.push(bit);\n  });\n\n  for (let value of values) {\n    assert(set.has(value), 'Set.has returned false');\n    assert(\n      setValues.some(v => v === value),\n      'Set values is missing value',\n    );\n  }\n\n  assert(\n    setValues.length === values.length,\n    `Expected ${values.length} values but got ${setValues.length}`,\n  );\n}\n\ndescribe('BitSet', () => {\n  it('clone should return a set with the same values', () => {\n    let set1 = new BitSet(5);\n    set1.add(1);\n    set1.add(3);\n\n    let set2 = set1.clone();\n\n    assertValues(set2, [1, 3]);\n  });\n\n  it('clear should remove all values from the set', () => {\n    let set1 = new BitSet(5);\n    set1.add(1);\n    set1.add(3);\n\n    set1.clear();\n\n    assertValues(set1, []);\n  });\n\n  it('delete should remove values from the set', () => {\n    let set1 = new BitSet(5);\n    set1.add(1);\n    set1.add(3);\n    set1.add(5);\n\n    set1.delete(3);\n\n    assertValues(set1, [1, 5]);\n  });\n\n  it('empty should check if there are no values set', () => {\n    let set1 = new BitSet(5);\n\n    assert(set1.empty());\n\n    set1.add(3);\n    assert(!set1.empty());\n\n    set1.delete(3);\n    assert(set1.empty());\n  });\n\n  it('should intersect with another BitSet', () => {\n    let set1 = new BitSet(5);\n    set1.add(1);\n    set1.add(3);\n\n    let set2 = new BitSet(5);\n    set2.add(3);\n    set2.add(5);\n\n    set1.intersect(set2);\n    assertValues(set1, [3]);\n  });\n\n  it('should union with another BitSet', () => {\n    let set1 = new BitSet(5);\n    set1.add(1);\n    set1.add(3);\n\n    let set2 = new BitSet(5);\n    set2.add(3);\n    set2.add(5);\n\n    set1.union(set2);\n    assertValues(set1, [1, 3, 5]);\n  });\n\n  it('BitSet.union should create a new BitSet with the union', () => {\n    let set1 = new BitSet(5);\n    set1.add(1);\n    set1.add(3);\n\n    let set2 = new BitSet(5);\n    set2.add(3);\n    set2.add(5);\n\n    let set3 = BitSet.union(set1, set2);\n    assertValues(set1, [1, 3]);\n    assertValues(set2, [3, 5]);\n    assertValues(set3, [1, 3, 5]);\n  });\n});\n"
  },
  {
    "path": "packages/core/graph/test/ContentGraph.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport ContentGraph from '../src/ContentGraph';\n\ndescribe('ContentGraph', () => {\n  it('should addNodeByContentKey if no node exists with the content key', () => {\n    let graph = new ContentGraph();\n\n    const node = {};\n\n    const nodeId1 = graph.addNodeByContentKey('contentKey', node);\n\n    assert.deepEqual(graph.getNode(nodeId1), node);\n    assert(graph.hasContentKey('contentKey'));\n    assert.deepEqual(graph.getNodeByContentKey('contentKey'), node);\n  });\n\n  it('should throw if a node with the content key already exists', () => {\n    let graph = new ContentGraph();\n\n    graph.addNodeByContentKey('contentKey', {});\n\n    assert.throws(() => {\n      graph.addNodeByContentKey('contentKey', {});\n    }, /already has content key/);\n  });\n\n  it('should remove the content key from graph when node is removed', () => {\n    let graph = new ContentGraph();\n\n    const node1 = {};\n    const nodeId1 = graph.addNodeByContentKey('contentKey', node1);\n\n    assert.equal(graph.getNode(nodeId1), node1);\n    assert(graph.hasContentKey('contentKey'));\n\n    graph.removeNode(nodeId1);\n\n    assert(!graph.hasContentKey('contentKey'));\n  });\n});\n"
  },
  {
    "path": "packages/core/graph/test/Graph.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport sinon from 'sinon';\nimport type {TraversalActions} from '@parcel/types-internal';\n\nimport Graph from '../src/Graph';\nimport {toNodeId, type NodeId} from '../src/types';\n\ndescribe('Graph', () => {\n  it('constructor should initialize an empty graph', () => {\n    let graph = new Graph();\n    assert.deepEqual(graph.nodes, []);\n    assert.deepEqual([...graph.getAllEdges()], []);\n  });\n\n  it('addNode should add a node to the graph', () => {\n    let graph = new Graph();\n    let node = {};\n    let id = graph.addNode(node);\n    assert.equal(graph.getNode(id), node);\n  });\n\n  it('errors when traversing a graph with no root', () => {\n    let graph = new Graph();\n\n    assert.throws(() => {\n      graph.traverse(() => {});\n    }, /A start node is required to traverse/);\n  });\n\n  it(\"errors when traversing a graph with a startNode that doesn't belong\", () => {\n    let graph = new Graph();\n\n    assert.throws(() => {\n      graph.traverse(() => {}, toNodeId(-1));\n    }, /Does not have node/);\n  });\n\n  it(\"errors if replaceNodeIdsConnectedTo is called with a node that doesn't belong\", () => {\n    let graph = new Graph();\n    assert.throws(() => {\n      graph.replaceNodeIdsConnectedTo(toNodeId(-1), []);\n    }, /Does not have node/);\n  });\n\n  it(\"errors when adding an edge to a node that doesn't exist\", () => {\n    let graph = new Graph();\n    let node = graph.addNode({});\n    assert.throws(() => {\n      graph.addEdge(node, toNodeId(-1));\n    }, /\"to\" node '-1' not found/);\n  });\n\n  it(\"errors when adding an edge from a node that doesn't exist\", () => {\n    let graph = new Graph();\n    let node = graph.addNode({});\n    assert.throws(() => {\n      graph.addEdge(toNodeId(-1), node);\n    }, /\"from\" node '-1' not found/);\n  });\n\n  it('hasNode should return a boolean based on whether the node exists in the graph', () => {\n    let graph = new Graph();\n    let node = graph.addNode({});\n    assert(graph.hasNode(node));\n    assert(!graph.hasNode(toNodeId(-1)));\n  });\n\n  it('addEdge should add an edge to the graph', () => {\n    let graph = new Graph();\n    let nodeA = graph.addNode('a');\n    let nodeB = graph.addNode('b');\n    graph.addEdge(nodeA, nodeB);\n    assert(graph.hasEdge(nodeA, nodeB));\n  });\n\n  it('isOrphanedNode should return true or false if the node is orphaned or not', () => {\n    let graph = new Graph();\n    let rootNode = graph.addNode('root');\n    graph.setRootNodeId(rootNode);\n\n    let nodeA = graph.addNode('a');\n    let nodeB = graph.addNode('b');\n    let nodeC = graph.addNode('c');\n    graph.addEdge(rootNode, nodeB);\n    graph.addEdge(nodeB, nodeC, 1);\n    assert(graph.isOrphanedNode(nodeA));\n    assert(!graph.isOrphanedNode(nodeB));\n    assert(!graph.isOrphanedNode(nodeC));\n  });\n\n  it(\"removeEdge should throw if the edge doesn't exist\", () => {\n    let graph = new Graph();\n    let nodeA = graph.addNode('a');\n    let nodeB = graph.addNode('b');\n\n    assert.throws(() => {\n      graph.removeEdge(nodeA, nodeB);\n    }, /Edge from 0 to 1 not found!/);\n  });\n\n  it('removeEdge should prune the graph at that edge', () => {\n    //         a\n    //        / \\\n    //       b - d\n    //      /\n    //     c\n    let graph = new Graph();\n    let nodeA = graph.addNode('a');\n    graph.setRootNodeId(nodeA);\n    let nodeB = graph.addNode('b');\n    let nodeC = graph.addNode('c');\n    let nodeD = graph.addNode('d');\n    graph.addEdge(nodeA, nodeB);\n    graph.addEdge(nodeA, nodeD);\n    graph.addEdge(nodeB, nodeC);\n    graph.addEdge(nodeB, nodeD);\n\n    graph.removeEdge(nodeA, nodeB);\n    assert(graph.hasNode(nodeA));\n    assert(graph.hasNode(nodeD));\n    assert(!graph.hasNode(nodeB));\n    assert(!graph.hasNode(nodeC));\n    assert.deepEqual(\n      [...graph.getAllEdges()],\n      [{from: nodeA, to: nodeD, type: 1}],\n    );\n  });\n\n  it('removing a node recursively deletes orphaned nodes', () => {\n    // before:\n    //       a\n    //      / \\\n    //     b   c\n    //    / \\    \\\n    //   d   e    f\n    //  /\n    // g\n    //\n\n    // after:\n    //      a\n    //       \\\n    //        c\n    //         \\\n    //          f\n\n    let graph = new Graph();\n    let nodeA = graph.addNode('a');\n    graph.setRootNodeId(nodeA);\n    let nodeB = graph.addNode('b');\n    let nodeC = graph.addNode('c');\n    let nodeD = graph.addNode('d');\n    let nodeE = graph.addNode('e');\n    let nodeF = graph.addNode('f');\n    let nodeG = graph.addNode('g');\n\n    graph.addEdge(nodeA, nodeB);\n    graph.addEdge(nodeA, nodeC);\n    graph.addEdge(nodeB, nodeD);\n    graph.addEdge(nodeB, nodeE);\n    graph.addEdge(nodeC, nodeF);\n    graph.addEdge(nodeD, nodeG);\n\n    graph.removeNode(nodeB);\n\n    assert.deepEqual(graph.nodes.filter(Boolean), ['a', 'c', 'f']);\n    assert.deepEqual(Array.from(graph.getAllEdges()), [\n      {from: nodeA, to: nodeC, type: 1},\n      {from: nodeC, to: nodeF, type: 1},\n    ]);\n  });\n\n  it('removing a node recursively deletes orphaned nodes if there is no path to the root', () => {\n    // before:\n    //       a\n    //      / \\\n    //     b   c\n    //    / \\    \\\n    // |-d   e    f\n    // |/\n    // g\n    //\n\n    // after:\n    //      a\n    //       \\\n    //        c\n    //         \\\n    //          f\n\n    let graph = new Graph();\n    let nodeA = graph.addNode('a');\n    let nodeB = graph.addNode('b');\n    let nodeC = graph.addNode('c');\n    let nodeD = graph.addNode('d');\n    let nodeE = graph.addNode('e');\n    let nodeF = graph.addNode('f');\n    let nodeG = graph.addNode('g');\n    graph.setRootNodeId(nodeA);\n\n    graph.addEdge(nodeA, nodeB);\n    graph.addEdge(nodeA, nodeC);\n    graph.addEdge(nodeB, nodeD);\n    graph.addEdge(nodeG, nodeD);\n    graph.addEdge(nodeB, nodeE);\n    graph.addEdge(nodeC, nodeF);\n    graph.addEdge(nodeD, nodeG);\n\n    graph.removeNode(nodeB);\n\n    assert.deepEqual(graph.nodes.filter(Boolean), ['a', 'c', 'f']);\n    assert.deepEqual(Array.from(graph.getAllEdges()), [\n      {from: nodeA, to: nodeC, type: 1},\n      {from: nodeC, to: nodeF, type: 1},\n    ]);\n  });\n\n  it('removing an edge to a node that cycles does not remove it if there is a path to the root', () => {\n    //        a\n    //        |\n    //        b <----\n    //       / \\    |\n    //      c   d   |\n    //       \\ /    |\n    //        e -----\n    let graph = new Graph();\n    let nodeA = graph.addNode('a');\n    let nodeB = graph.addNode('b');\n    let nodeC = graph.addNode('c');\n    let nodeD = graph.addNode('d');\n    let nodeE = graph.addNode('e');\n    graph.setRootNodeId(nodeA);\n\n    graph.addEdge(nodeA, nodeB);\n    graph.addEdge(nodeB, nodeC);\n    graph.addEdge(nodeB, nodeD);\n    graph.addEdge(nodeC, nodeE);\n    graph.addEdge(nodeD, nodeE);\n    graph.addEdge(nodeE, nodeB);\n\n    const getNodeIds = () => [...graph.nodes.keys()];\n    let nodesBefore = getNodeIds();\n\n    graph.removeEdge(nodeC, nodeE);\n\n    assert.deepEqual(nodesBefore, getNodeIds());\n    assert.deepEqual(Array.from(graph.getAllEdges()), [\n      {from: nodeA, to: nodeB, type: 1},\n      {from: nodeB, to: nodeC, type: 1},\n      {from: nodeB, to: nodeD, type: 1},\n      {from: nodeD, to: nodeE, type: 1},\n      {from: nodeE, to: nodeB, type: 1},\n    ]);\n  });\n\n  it('removing a node with only one inbound edge does not cause it to be removed as an orphan', () => {\n    let graph = new Graph();\n\n    let nodeA = graph.addNode('a');\n    let nodeB = graph.addNode('b');\n    graph.setRootNodeId(nodeA);\n\n    graph.addEdge(nodeA, nodeB);\n\n    let spy = sinon.spy(graph, 'removeNode');\n    try {\n      graph.removeNode(nodeB);\n\n      assert(spy.calledOnceWithExactly(nodeB));\n    } finally {\n      spy.restore();\n    }\n  });\n\n  it(\"replaceNodeIdsConnectedTo should update a node's downstream nodes\", () => {\n    let graph = new Graph();\n    let nodeA = graph.addNode('a');\n    graph.setRootNodeId(nodeA);\n    let nodeB = graph.addNode('b');\n    let nodeC = graph.addNode('c');\n    graph.addEdge(nodeA, nodeB);\n    graph.addEdge(nodeA, nodeC);\n\n    let nodeD = graph.addNode('d');\n    graph.replaceNodeIdsConnectedTo(nodeA, [nodeB, nodeD]);\n\n    assert(graph.hasNode(nodeA));\n    assert(graph.hasNode(nodeB));\n    assert(!graph.hasNode(nodeC));\n    assert(graph.hasNode(nodeD));\n    assert.deepEqual(Array.from(graph.getAllEdges()), [\n      {from: nodeA, to: nodeB, type: 1},\n      {from: nodeA, to: nodeD, type: 1},\n    ]);\n  });\n\n  it('traverses along edge types if a filter is given', () => {\n    let graph = new Graph();\n    let nodeA = graph.addNode('a');\n    let nodeB = graph.addNode('b');\n    let nodeC = graph.addNode('c');\n    let nodeD = graph.addNode('d');\n\n    graph.addEdge(nodeA, nodeB, 2);\n    graph.addEdge(nodeA, nodeD);\n    graph.addEdge(nodeB, nodeC);\n    graph.addEdge(nodeB, nodeD, 2);\n\n    graph.setRootNodeId(nodeA);\n\n    let visited = [];\n    graph.traverse(\n      nodeId => {\n        visited.push(nodeId);\n      },\n      null, // use root as startNode\n      2,\n    );\n\n    assert.deepEqual(visited, [nodeA, nodeB, nodeD]);\n  });\n\n  it('correctly removes non-tree subgraphs', () => {\n    let graph = new Graph();\n    let nodeRoot = graph.addNode('root');\n    let node1 = graph.addNode('1');\n    let node2 = graph.addNode('2');\n    let node3 = graph.addNode('3');\n\n    graph.addEdge(nodeRoot, node1);\n    graph.addEdge(node1, node2);\n    graph.addEdge(node1, node3);\n    graph.addEdge(node2, node3);\n\n    graph.setRootNodeId(nodeRoot);\n\n    graph.removeNode(node1);\n\n    assert.deepEqual(graph.nodes.filter(Boolean), ['root']);\n    assert.deepStrictEqual(Array.from(graph.getAllEdges()), []);\n  });\n\n  describe('dfs(...)', () => {\n    it(`throws if the graph is empty`, () => {\n      const graph = new Graph();\n      const visit = sinon.stub();\n      const getChildren = sinon.stub();\n      assert.throws(() => {\n        graph.dfs({\n          visit,\n          startNodeId: 0,\n          getChildren,\n        });\n      }, /Does not have node 0/);\n    });\n\n    it(`visits a single node`, () => {\n      const graph = new Graph();\n      graph.addNode('root');\n      const visit = sinon.stub();\n      const getChildren = () => [];\n      graph.dfs({\n        visit,\n        startNodeId: 0,\n        getChildren,\n      });\n\n      assert(visit.calledOnce);\n    });\n\n    it(`visits all connected nodes in DFS order`, () => {\n      const graph = new Graph();\n      graph.addNode('0');\n      graph.addNode('1');\n      graph.addNode('2');\n      graph.addNode('3');\n      graph.addNode('disconnected-1');\n      graph.addNode('disconnected-2');\n      graph.addEdge(0, 1);\n      graph.addEdge(0, 2);\n      graph.addEdge(1, 3);\n      graph.addEdge(2, 3);\n\n      const order = [];\n      const visit = (node: NodeId) => {\n        order.push(node);\n      };\n      const getChildren = (node: NodeId) => graph.getNodeIdsConnectedFrom(node);\n      graph.dfs({\n        visit,\n        startNodeId: 0,\n        getChildren,\n      });\n\n      assert.deepEqual(order, [0, 1, 3, 2]);\n    });\n\n    describe(`actions tests`, () => {\n      it(`skips children if skip is called on a node`, () => {\n        const graph = new Graph();\n        graph.addNode('0');\n        graph.addNode('1');\n        graph.addNode('2');\n        graph.addNode('3');\n        graph.addNode('disconnected-1');\n        graph.addNode('disconnected-2');\n        graph.addEdge(0, 1);\n        graph.addEdge(1, 2);\n        graph.addEdge(0, 3);\n\n        const order = [];\n        const visit = (\n          node: NodeId,\n          context: mixed | null,\n          actions: TraversalActions,\n        ) => {\n          if (node === 1) actions.skipChildren();\n          order.push(node);\n        };\n        const getChildren = (node: NodeId) =>\n          graph.getNodeIdsConnectedFrom(node);\n        graph.dfs({\n          visit,\n          startNodeId: 0,\n          getChildren,\n        });\n\n        assert.deepEqual(order, [0, 1, 3]);\n      });\n\n      it(`stops the traversal if stop is called`, () => {\n        const graph = new Graph();\n        graph.addNode('0');\n        graph.addNode('1');\n        graph.addNode('2');\n        graph.addNode('3');\n        graph.addNode('disconnected-1');\n        graph.addNode('disconnected-2');\n        graph.addEdge(0, 1);\n        graph.addEdge(1, 2);\n        graph.addEdge(1, 3);\n        graph.addEdge(0, 2);\n        graph.addEdge(2, 3);\n\n        const order = [];\n        const visit = (\n          node: NodeId,\n          context: mixed | null,\n          actions: TraversalActions,\n        ) => {\n          order.push(node);\n          if (node === 1) {\n            actions.stop();\n            return 'result';\n          }\n          return 'other';\n        };\n        const getChildren = (node: NodeId) =>\n          graph.getNodeIdsConnectedFrom(node);\n        const result = graph.dfs({\n          visit,\n          startNodeId: 0,\n          getChildren,\n        });\n\n        assert.deepEqual(order, [0, 1]);\n        assert.equal(result, 'result');\n      });\n    });\n\n    describe(`context tests`, () => {\n      it(`passes the context between visitors`, () => {\n        const graph = new Graph();\n        graph.addNode('0');\n        graph.addNode('1');\n        graph.addNode('2');\n        graph.addNode('3');\n        graph.addNode('disconnected-1');\n        graph.addNode('disconnected-2');\n        graph.addEdge(0, 1);\n        graph.addEdge(1, 2);\n        graph.addEdge(1, 3);\n        graph.addEdge(0, 2);\n        graph.addEdge(2, 3);\n\n        const contexts = [];\n        const visit = (node: NodeId, context: mixed | null) => {\n          contexts.push([node, context]);\n          return `node-${node}-created-context`;\n        };\n        const getChildren = (node: NodeId) =>\n          graph.getNodeIdsConnectedFrom(node);\n        const result = graph.dfs({\n          visit,\n          startNodeId: 0,\n          getChildren,\n        });\n\n        assert.deepEqual(contexts, [\n          [0, null],\n          [1, 'node-0-created-context'],\n          [2, 'node-1-created-context'],\n          [3, 'node-2-created-context'],\n        ]);\n        assert.equal(result, undefined);\n      });\n    });\n\n    describe(`exit visitor tests`, () => {\n      it(`calls the exit visitor`, () => {\n        const graph = new Graph();\n        graph.addNode('0');\n        graph.addNode('1');\n        graph.addNode('2');\n        graph.addNode('3');\n        graph.addNode('disconnected-1');\n        graph.addNode('disconnected-2');\n        graph.addEdge(0, 1);\n        graph.addEdge(1, 2);\n        graph.addEdge(1, 3);\n        graph.addEdge(0, 2);\n\n        const contexts = [];\n        const visit = (node: NodeId, context: mixed | null) => {\n          contexts.push([node, context]);\n          return `node-${node}-created-context`;\n        };\n        const visitExit = (node: NodeId, context: mixed | null) => {\n          contexts.push(['exit', node, context]);\n          return `node-exit-${node}-created-context`;\n        };\n        const getChildren = (node: NodeId) =>\n          graph.getNodeIdsConnectedFrom(node);\n        const result = graph.dfs({\n          visit: {\n            enter: visit,\n            exit: visitExit,\n          },\n          startNodeId: 0,\n          getChildren,\n        });\n\n        assert.deepEqual(contexts, [\n          [0, null],\n          [1, 'node-0-created-context'],\n          [2, 'node-1-created-context'],\n          ['exit', 2, 'node-2-created-context'],\n          [3, 'node-1-created-context'],\n          ['exit', 3, 'node-3-created-context'],\n          ['exit', 1, 'node-1-created-context'],\n          ['exit', 0, 'node-0-created-context'],\n        ]);\n        assert.equal(result, undefined);\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/graph/test/integration/adjacency-list-shared-array.js",
    "content": "require('@parcel/babel-register');\nconst {parentPort} = require('worker_threads');\nconst {\n  default: AdjacencyList,\n  NodeTypeMap,\n  EdgeTypeMap,\n} = require('../../src/AdjacencyList');\n\nparentPort.once('message', serialized => {\n  let graph = AdjacencyList.deserialize(serialized);\n  serialized.nodes.forEach((v, i) => {\n    if (i < NodeTypeMap.HEADER_SIZE) return;\n    serialized.nodes[i] = v * 2;\n  });\n  serialized.edges.forEach((v, i) => {\n    if (i < EdgeTypeMap.HEADER_SIZE) return;\n    serialized.edges[i] = v * 2;\n  });\n  parentPort.postMessage(graph.serialize());\n});\n"
  },
  {
    "path": "packages/core/integration-tests/.gitignore",
    "content": "lib\ntest/dist\ntest/input\n!test/**/node_modules\n!test/**/node_modules/lib\ntest/integration/**/elm-stuff\ntest/integration/**/target\ntest/integration/**/Cargo.lock\ntest/**/package-lock.json\ntest/integration/babel-plugin-autoinstall/package.json"
  },
  {
    "path": "packages/core/integration-tests/.mocharc.json",
    "content": "{\n  \"require\": [\"@parcel/babel-register\", \"@parcel/test-utils/src/mochaSetup.js\"],\n  \"timeout\": 50000,\n  // TODO: Remove this when https://github.com/nodejs/node/pull/28788 is resolved\n  \"exit\": true,\n  // This helps reduce CI flakiness of the Mac OS test run\n  \"retries\": 2\n}\n"
  },
  {
    "path": "packages/core/integration-tests/data/lastTestRun.json",
    "content": "{\n  \"tests\": [\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should auto install @babel/core v7\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should auto install babel plugins\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling with babel using .babelrc config\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should compile with babel with default engines if no config\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling with babel using browserlist\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should only include necessary parts of core-js using browserlist\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling with babel using browserslist for different environments\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"can build using @babel/preset-env when engines have semver ranges\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should not compile node_modules by default\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should compile node_modules with browserslist to app target\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should compile node_modules when symlinked with a source field in package.json\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should not compile node_modules with a source field in package.json when not symlinked\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling JSX\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling JSX in JS files with React dependency\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling JSX in JS files with Preact dependency\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling JSX in JS files with Nerv dependency\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling JSX in JS files with Hyperapp dependency\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should strip away flow types of node modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling with babel using babel.config.js config\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support compiling with babel using babel.config.js config with a require in it\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support multitarget builds using a custom babel config with @parcel/babel-preset-env\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support building with default babel config when running parcel globally\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should support building with custom babel config when running parcel globally\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should rebuild when .babelrc changes\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should invalidate babel.config.js across runs\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"babel\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/babel.js\",\n      \"title\": \"should invalidate when babel plugins are upgraded across runs\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"bundler\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/bundler.js\",\n      \"title\": \"should bundle once before exporting middleware\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"bundler\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/bundler.js\",\n      \"title\": \"should defer bundling if a bundle is pending\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"bundler\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/bundler.js\",\n      \"title\": \"should enforce asset type path to be a string\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"bundler\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/bundler.js\",\n      \"title\": \"should enforce setup before bundling\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"bundler\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/bundler.js\",\n      \"title\": \"should support multiple entry points\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"bundler\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/bundler.js\",\n      \"title\": \"should support multiple entry points as a glob\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"contentHashing\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/contentHashing.js\",\n      \"title\": \"should update content hash when content changes\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"contentHashing\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/contentHashing.js\",\n      \"title\": \"should update content hash when raw asset changes\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"contentHashing\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/contentHashing.js\",\n      \"title\": \"should consider bundles with identical contents coming from different filepaths unique\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"css\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/css.js\",\n      \"title\": \"should produce two bundles when importing a CSS file\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"css\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/css.js\",\n      \"title\": \"should bundle css dependencies in the correct, postorder traversal order\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"css\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/css.js\",\n      \"title\": \"should support loading a CSS bundle along side dynamic imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"css\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/css.js\",\n      \"title\": \"should support importing CSS from a CSS file\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"css\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/css.js\",\n      \"title\": \"should support linking to assets with url() from CSS\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"css\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/css.js\",\n      \"title\": \"should support linking to assets with url() from CSS in production\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"css\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/css.js\",\n      \"title\": \"should support linking to assets in parent folders with url() from CSS\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"css\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/css.js\",\n      \"title\": \"should minify CSS when minify is set\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"elm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/elm.js\",\n      \"title\": \"should produce a basic Elm bundle\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"elm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/elm.js\",\n      \"title\": \"should produce a elm bundle with debugger\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"elm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/elm.js\",\n      \"title\": \"should apply elm-hot if HMR is enabled\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"elm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/elm.js\",\n      \"title\": \"should remove debugger in production\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"elm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/elm.js\",\n      \"title\": \"should minify Elm in production mode\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"encodedURI\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/encodedURI.js\",\n      \"title\": \"should support bundling files which names in encoded URI\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file as a string\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file as a buffer\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file with fs require alias\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file with fs require inline\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file with fs require assignment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file with fs require assignment alias\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file with fs require destructure\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file with fs require destructure assignment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file with fs ES6 import\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should inline a file with fs ES6 import and path.join\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should not evaluate fs calls when package.browser.fs is false\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should ignore fs calls when the filename is not evaluable\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should ignore fs calls when the options are not evaluable\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should not inline a file in a node environment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"fs\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/fs.js\",\n      \"title\": \"should not inline a file in an Electron environment\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"glob\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/glob.js\",\n      \"title\": \"should require a glob of files\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"glob\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/glob.js\",\n      \"title\": \"should require nested directories with a glob\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"glob\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/glob.js\",\n      \"title\": \"should support importing a glob of CSS files\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"glsl\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/glsl.js\",\n      \"title\": \"should support requiring GLSL files via glslify\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"graphql\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/graphql.js\",\n      \"title\": \"should support requiring graphql files\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"graphql\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/graphql.js\",\n      \"title\": \"should support importing other graphql files from a graphql file\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should emit an HMR update for the file that changed\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should emit an HMR update for all new dependencies along with the changed file\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should emit an HMR error on bundle failure\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should emit an HMR error to new connections after a bundle failure\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should emit an HMR update after error has been resolved\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should work with circular dependencies\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should accept HMR updates in the runtime after an initial error\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should call dispose and accept callbacks\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should work across bundles\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should bubble up HMR events to a page reload\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should trigger a page reload when a new bundle is created\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should log emitted errors and show an error overlay\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should log when errors resolve\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should make a secure connection\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should make a secure connection with custom certificate\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"hmr\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/hmr.js\",\n      \"title\": \"should watch new dependencies that cause errors\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should support bundling HTML\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should find href attr when not first\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should insert sibling CSS bundles for JS files in the HEAD\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should insert sibling bundles before body element if no HEAD\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should insert sibling JS bundles for CSS files in the HEAD\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should insert sibling bundles at correct location in tree when optional elements are absent\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should minify HTML in production mode\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should work with an empty html file\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should read .htmlnanorc.json and minify HTML in production mode\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should not minify default values inside HTML in production mode\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should not prepend the public path to assets with remote URLs\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should not prepend the public path to hash links\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should detect virtual paths\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should not update root/main file in the bundles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should preserve the spacing in the HTML tags\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should support child bundles of different types\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should support circular dependencies\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should support bundling HTM\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should detect srcset attribute\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should detect srcset attribute of source element\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should support webmanifest\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should treat webmanifest as an entry module so it doesn't get content hashed\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should bundle svg files correctly\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should bundle svg files using <image xlink:href=\\\"\\\"> correctly\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should bundle scripts inside svg\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should support data attribute of object element\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should resolve assets containing spaces\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should process inline JS\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should add an inline sourcemap to inline JS\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should process inline styles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should process inline styles using lang\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should process inline non-js scripts\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should handle inline css with @imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"html\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/html.js\",\n      \"title\": \"should allow imports and requires in inline <script> tags\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should produce a basic JS bundle with CommonJS requires\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should produce a basic JS bundle with ES6 imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should detect dependencies inserted by a prior transform\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should produce a basic JS bundle with object rest spread support\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should bundle node_modules for a browser environment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not bundle node_modules for a node environment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not bundle node_modules on --target=electron\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should preserve hashbangs in bundles and preserve executable file mode\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not preserve hashbangs in browser bundles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should preserve hashbangs in scopehoisted bundles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should bundle node_modules for a node environment if includeNodeModules is specified\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should bundle builtins for a browser environment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not bundle builtins for a node environment if includeNodeModules is specified\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should bundle node_modules on --target=electron and --bundle-node-modules\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should produce a JS bundle with default exports and no imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should split bundles when a dynamic import is used a browser environment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should split bundles when a dynamic import is used with a node environment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should load dynamic bundle when entry is in a subdirectory\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"Should not run parcel over external modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support bundling workers\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support bundling workers of type module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support bundling workers with different order\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support bundling service-workers\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support bundling workers with circular dependencies\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support bundling in workers with other loaders\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not deduplicate assets from a parent bundle in workers\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should dynamic import files which import raw files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should return all exports as an object when using ES modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should duplicate small modules across multiple bundles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should create a separate bundle for large modules shared between bundles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not duplicate a module which is already in a parent bundle\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should duplicate a module if it is not present in every parent bundle\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support shared modules with async imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support requiring JSON files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support requiring JSON5 files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support importing a URL to a raw asset\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should minify JS in production mode\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should use uglify config\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should insert global variables when needed\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should handle re-declaration of the global constant\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should insert environment variables inserted by a prior transform\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not insert environment variables in node environment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not insert environment variables in electron environment\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should insert environment variables in browser environment\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should insert environment variables from a file\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support adding implicit dependencies\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support requiring YAML files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support requiring TOML files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support requiring CoffeeScript files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should resolve the browser field before main\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not resolve the browser field for --target=node\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should resolve advanced browser resolution\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not resolve advanced browser resolution with --target=node\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should resolve the module field before main\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should resolve the module field before main\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should resolve the main field\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should minify JSON files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should minify JSON5 files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should minify YAML for production\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should minify TOML for production\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support optional dependencies in try...catch blocks\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support excluding dependencies in falsy branches\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not autoinstall if resolve failed on installed module\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not autoinstall if resolve failed on aliased module\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should ignore require if it is defined in the scope\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should expose to CommonJS entry point\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should expose to RequireJS entry point\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should expose variable with --browser-global\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should set `define` to undefined so AMD checks in UMD modules do not pass\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not dedupe imports with different contents\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not dedupe imports with same content but different absolute dependency paths\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should dedupe imports with same content and same dependency paths\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not dedupe assets that exist in more than one bundle\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support importing HTML from JS async\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support importing HTML from JS async with --target=node\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support importing HTML from JS sync\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should stub require.cache\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should support async importing the same module from different bundles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should not create shared bundles from contents of entries\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"javascript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/javascript.js\",\n      \"title\": \"should import the same dependency multiple times in the same bundle\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"json-reporter\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/json-reporter.js\",\n      \"title\": \"logs bundling a commonjs bundle to stdout as json\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"kotlin\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/kotlin.js\",\n      \"title\": \"should produce a basic kotlin bundle\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"less\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/less.js\",\n      \"title\": \"should support requiring less files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"less\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/less.js\",\n      \"title\": \"should support less imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"less\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/less.js\",\n      \"title\": \"should support advanced less imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"less\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/less.js\",\n      \"title\": \"should support requiring empty less files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"less\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/less.js\",\n      \"title\": \"should support linking to assets with url() from less\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"less\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/less.js\",\n      \"title\": \"should support transforming less with postcss\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"less\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/less.js\",\n      \"title\": \"should throw an exception when using webpack syntax\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"less\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/less.js\",\n      \"title\": \"should support configuring less include paths\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"markdown\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/markdown.js\",\n      \"title\": \"should support bundling Markdown\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"metrics-reporter\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/metrics-reporter.js\",\n      \"title\": \"Should dump bundle metrics to parcel-metrics.json\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"monorepos\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/monorepos.js\",\n      \"title\": \"should build multiple packages in a monorepo at once, pointing at index files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"monorepos\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/monorepos.js\",\n      \"title\": \"should build multiple packages in a monorepo at once, pointing at directories with \\\"source\\\" field in package.json\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"monorepos\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/monorepos.js\",\n      \"title\": \"should build multiple packages in a monorepo at once, pointing at a glob of files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"monorepos\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/monorepos.js\",\n      \"title\": \"should build multiple packages in a monorepo at once, pointing at a glob of directories\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"monorepos\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/monorepos.js\",\n      \"title\": \"should watch glob entries and build new packages that are added\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"monorepos\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/monorepos.js\",\n      \"title\": \"should watch package.json containing \\\"source\\\" field for changes\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"monorepos\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/monorepos.js\",\n      \"title\": \"should watch package.json containing targets for changes\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output (exports)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output (module.exports)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output from esmodule input\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output with external modules (require)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output with external modules (named import)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output with external modules (namespace import)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output with external modules (default import)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output with external modules (multiple specifiers)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output with old node without destructuring (single)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output with old node without destructuring (multiple)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output with old browsers without destructuring (single)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support commonjs output with old node without destructuring (multiple)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support importing sibling bundles in library mode\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support async imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support async split bundles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support esmodule output (named export)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support esmodule output (default identifier)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support esmodule output (default function)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support esmodule output (multiple)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support esmodule output (re-export)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support esmodule output with external modules (named import)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support esmodule output with external modules (namespace import)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support esmodule output with external modules (default import)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support esmodule output with external modules (multiple specifiers)\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support importing sibling bundles in library mode\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should rename imports that conflict with exports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support async imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support async split bundles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support building esmodules for browser targets\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support use an import polyfill for older browsers\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support building esmodules with css imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"output-formats\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/output-formats.js\",\n      \"title\": \"should support building esmodules with split bundles\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"parcel-register\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/parcel-register.js\",\n      \"title\": \"can be required at an entry script and transform following requires\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"parcel-register\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/parcel-register.js\",\n      \"title\": \"can transform with --r and --require\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"parcel-register\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/parcel-register.js\",\n      \"title\": \"enables Parcel's resolver in node\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"parcel-register\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/parcel-register.js\",\n      \"title\": \"can be disposed of, which reverts resolving\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"parcel-register\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/parcel-register.js\",\n      \"title\": \"can be disposed of, which reverts transforming\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"parser\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/parser.js\",\n      \"title\": \"should support case-insensitive file extension\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"postcss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/postcss.js\",\n      \"title\": \"should support transforming css modules with postcss\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"postcss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/postcss.js\",\n      \"title\": \"should support transforming with postcss twice with the same result\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"postcss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/postcss.js\",\n      \"title\": \"should support postcss composes imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"postcss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/postcss.js\",\n      \"title\": \"should not include css twice for postcss composes imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"postcss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/postcss.js\",\n      \"title\": \"should support postcss composes imports for sass\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"postcss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/postcss.js\",\n      \"title\": \"should support postcss composes imports with custom path names\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"postcss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/postcss.js\",\n      \"title\": \"should support deep nested postcss composes imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"postcss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/postcss.js\",\n      \"title\": \"should support postcss composes imports for multiple selectors\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"postcss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/postcss.js\",\n      \"title\": \"should automatically install postcss plugins if needed\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"posthtml\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/posthtml.js\",\n      \"title\": \"should support transforming HTML with posthtml\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"posthtml\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/posthtml.js\",\n      \"title\": \"should find assets inside posthtml\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"posthtml\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/posthtml.js\",\n      \"title\": \"should add dependencies referenced by posthtml-include\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"posthtml\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/posthtml.js\",\n      \"title\": \"should add dependencies referenced by plugins\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"proxy\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/proxy.js\",\n      \"title\": \"should handle proxy table written in .proxyrc\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"proxy\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/proxy.js\",\n      \"title\": \"should handle proxy table written in .proxyrc.js\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"pug\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/pug.js\",\n      \"title\": \"should support bundling HTML\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"pug\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/pug.js\",\n      \"title\": \"should support include and extends files, connect files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"pug\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/pug.js\",\n      \"title\": \"should support variables\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"pug\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/pug.js\",\n      \"title\": \"should support mixins\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"pug\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/pug.js\",\n      \"title\": \"should support filters\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"pug\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/pug.js\",\n      \"title\": \"should support locals with config file\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"pug\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/pug.js\",\n      \"title\": \"should minify HTML in production mode\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"reason\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/reason.js\",\n      \"title\": \"should produce a bundle\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"resolver\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/resolver.js\",\n      \"title\": \"should support resolving tilde in monorepo packages\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"resolver\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/resolver.js\",\n      \"title\": \"should correctly resolve tilde in node_modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"resolver\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/resolver.js\",\n      \"title\": \"should throw an error on Webpack loader imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"rust\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/rust.js\",\n      \"title\": \"should generate a wasm file from a rust file with rustc with --target=browser\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"rust\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/rust.js\",\n      \"title\": \"should generate a wasm file from a rust file with rustc with --target=node\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"rust\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/rust.js\",\n      \"title\": \"should support rust files with dependencies via rustc\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"rust\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/rust.js\",\n      \"title\": \"should generate a wasm file from a rust file with cargo\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"rust\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/rust.js\",\n      \"title\": \"should generate a wasm file from a rust file in cargo workspace\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support requiring sass files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support requiring scss files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support scss imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support requiring empty scss files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support linking to assets with url() from scss\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support transforming scss with postcss\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support advanced import syntax\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support absolute imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should throw an exception when using webpack syntax\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support node_modules imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sass\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sass.js\",\n      \"title\": \"should support imports from includePaths\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"schema-jsonld\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/schema-jsonld.js\",\n      \"title\": \"Should parse a LD+JSON schema and collect dependencies\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should not throw with JS included from HTML\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should not throw with JS dynamic imports included from HTML\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports default imports and exports of expressions\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports default imports and exports of declarations\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports default imports and exports of anonymous declarations\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports default imports and exports of variables\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports named imports and exports of declarations\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports named imports and exports of variables\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports renaming superclass identifiers\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports renaming imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports renaming exports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports importing a namespace of exported values\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports re-exporting all exports from another module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports re-exporting all exports from multiple modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports importing all exports re-exported from multiple modules deep\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports re-exporting all exports from multiple modules deep\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports re-exporting individual named exports from another module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports re-exporting default exports from another module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports re-exporting a namespace from another module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"excludes default when re-exporting a module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports multiple exports of the same variable\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports live bindings of named exports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports dynamic import syntax for code splitting\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports nested dynamic imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should not export function arguments\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"throws a meaningful error on undefined exports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports import default CommonJS interop\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports import default CommonJS interop with dynamic imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports exporting an import\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports requiring a re-exported and renamed ES6 import\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports simultaneous import and re-export of a symbol\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports optimizing away an unused ES6 re-export\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should not optimize away an unused ES6 re-export and an used import\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"keeps side effects by default\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports the package.json sideEffects: false flag\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports wildcards with sideEffects: false\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports the package.json sideEffects flag with an array\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports the package.json sideEffects: false flag with shared dependencies\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"missing exports should be replaced with an empty object\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports importing a namespace from a commonjs module when code split\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"removes unused exports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"removes unused function exports when minified\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"removes unused transpiled classes using terser when minified\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"support exporting a ES6 module exported as CommonJS\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should support named imports on wrapped modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should support the jsx pragma\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should not nameclash with internal variables\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should shake pure property assignments\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should correctly rename references to default exported classes\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should correctly rename references to a class in the class body\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require of commonjs modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports default imports of commonjs modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports named imports of commonjs modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports namespace imports of commonjs modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require of es6 default export of expressions\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require of es6 default export of declarations\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require of es6 default export of variables\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require of es6 named export of declarations\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require of es6 named export of variables\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require of es6 renamed exports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require of es6 module re-exporting all exports from another module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require of es6 module re-exporting all exports from multiple modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports re-exporting individual named exports from another module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports re-exporting default exports from another module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports re-exporting a namespace from another module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"excludes default when re-exporting a module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports hybrid ES6 + commonjs modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"inserts commonjs exports object in the right place\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"doesn't insert parcelRequire for missing non-js assets\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"define exports in the outermost scope\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports live bindings of named exports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should wrap modules that use eval in a function\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should wrap modules that have a top-level return\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should wrap modules that access `module` as a free variable\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should wrap modules that non-statically access `module`\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports assigning to this as exports object\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports assigning to this as exports object in wrapped module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports module object properties\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports require.resolve calls\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports requiring a re-exported ES6 import\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports object pattern requires\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"eliminates CommonJS export object where possible\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports multiple assignments in one line\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports circular dependencies\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"executes modules in the correct order\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports conditional requires\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports requires inside functions\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports requires inside functions with es6 import side effects\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"hoists import calls to the top\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports requires inside functions with es6 re-export side effects\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"can bundle the node stream module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"missing exports should be replaced with an empty object\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"removes unused exports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"supports removing an unused inline export with uglify minification\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should support sideEffects: false\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should support two aliases to the same module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should support optional requires\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should insert __esModule interop flag when importing from an ES module\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should support assigning to exports from inside a function\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should also hoist inserted polyfills of globals\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should support wrapping array destructuring declarations\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"scope-hoisting\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/scope-hoisting.js\",\n      \"title\": \"should support wrapping object destructuring declarations\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should serve files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should serve source files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should serve a default page if the main bundle is an HTML asset\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should serve a 404 if the file does not exist\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should serve a 500 if the bundler errored\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should support HTTPS\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should support HTTPS via custom certificate\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should support setting a public url\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should serve static assets as well as html\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should work with query parameters that contain a dot\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should work with paths that contain a dot\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should not log dev server access for log level <= 3\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"server\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/server.js\",\n      \"title\": \"should log dev server access for log level > 3\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"Should create a basic browser sourcemap\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"Should create a basic node sourcemap\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should create a valid sourcemap for a js file with requires\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should create a valid sourcemap as a child of a TS bundle\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should create a valid sourcemap as a child of a nested TS bundle\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should create a valid sourcemap for a minified js bundle with requires\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should load existing sourcemaps of libraries\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should load inline sourcemaps of libraries\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should load referenced contents of sourcemaps\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should create a valid sourcemap as a child of a CSS bundle\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should create a valid sourcemap for a CSS bundle with imports\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should create a valid sourcemap for a Sass asset\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should create a valid sourcemap when for a CSS asset importing Sass\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should create a valid sourcemap for a LESS asset\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"should load existing sourcemaps for CSS files\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"Should be able to create a sourcemap with inlined sources\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sourcemaps\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sourcemaps.js\",\n      \"title\": \"Should be able to create inline sourcemaps\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"stylus\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/stylus.js\",\n      \"title\": \"should support requiring stylus files\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"stylus\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/stylus.js\",\n      \"title\": \"should support requiring stylus files with dependencies\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"stylus\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/stylus.js\",\n      \"title\": \"should support linking to assets with url() from stylus\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"stylus\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/stylus.js\",\n      \"title\": \"should support transforming stylus with css modules\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"stylus\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/stylus.js\",\n      \"title\": \"should support requiring stylus files with glob dependencies\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"sugarss\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/sugarss.js\",\n      \"title\": \"should correctly parse SugarSS asset\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"ts-types\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/ts-types.js\",\n      \"title\": \"should generate a typescript declaration file\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"ts-types\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/ts-types.js\",\n      \"title\": \"should generate ts declarations with imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"ts-types\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/ts-types.js\",\n      \"title\": \"should generate ts declarations with exports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"ts-types\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/ts-types.js\",\n      \"title\": \"should generate ts declarations with imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript-tsc\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript-tsc.js\",\n      \"title\": \"should support loading tsconfig.json\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should produce a ts bundle using ES6 imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should produce a ts bundle using commonJS require\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should support json require\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should support env variables\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should support importing a URL to a raw asset\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should minify with minify enabled\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should support compiling JSX\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should use esModuleInterop by default\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"fs.readFileSync should inline a file as a string\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should produce a ts bundle using ES6 imports\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should produce a ts bundle using commonJS require\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should support json require\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should support env variables\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should support importing a URL to a raw asset\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should minify with minify enabled\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should support compiling JSX\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"should use esModuleInterop by default\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"typescript\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/typescript.js\",\n      \"title\": \"fs.readFileSync should inline a file as a string\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"vue\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/vue.js\",\n      \"title\": \"should produce a basic vue bundle\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"vue\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/vue.js\",\n      \"title\": \"should produce a vue bundle with dependencies\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"vue\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/vue.js\",\n      \"title\": \"should produce a vue bundle using preprocessors\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"vue\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/vue.js\",\n      \"title\": \"should produce a vue bundle using a functional component\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"vue\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/vue.js\",\n      \"title\": \"should produce a vue bundle using scoped styles\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"vue\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/vue.js\",\n      \"title\": \"should produce a vue bundle using CSS modules\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"vue\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/vue.js\",\n      \"title\": \"should bundle nested components dynamically\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"vue\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/vue.js\",\n      \"title\": \"should produce a basic production vue bundle\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"wasm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/wasm.js\",\n      \"title\": \"should preload a wasm file for a sync require\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"wasm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/wasm.js\",\n      \"title\": \"should load a wasm file asynchronously with dynamic import\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"wasm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/wasm.js\",\n      \"title\": \"should load a wasm file in parallel with a dynamic JS import\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"wasm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/wasm.js\",\n      \"title\": \"should preload a wasm file for a sync require\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"wasm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/wasm.js\",\n      \"title\": \"should load a wasm file asynchronously with dynamic import\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"wasm\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/wasm.js\",\n      \"title\": \"should load a wasm file in parallel with a dynamic JS import\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"watcher\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/watcher.js\",\n      \"title\": \"should rebuild on source file change\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"watcher\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/watcher.js\",\n      \"title\": \"should rebuild on a config file change\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"watcher\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/watcher.js\",\n      \"title\": \"should rebuild properly when a dependency is removed\",\n      \"status\": \"passing\"\n    },\n    {\n      \"fileName\": \"watcher\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/watcher.js\",\n      \"title\": \"should re-generate bundle tree when files change\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"watcher\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/watcher.js\",\n      \"title\": \"should only re-package bundles that changed\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"watcher\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/watcher.js\",\n      \"title\": \"should unload assets that are orphaned\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"watcher\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/watcher.js\",\n      \"title\": \"should recompile all assets when a config file changes\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"watcher\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/watcher.js\",\n      \"title\": \"should rebuild if the file behind a symlink changes\",\n      \"status\": \"pending\"\n    },\n    {\n      \"fileName\": \"watcher\",\n      \"link\": \"https://github.com/parcel-bundler/parcel/tree/v2/packages/core/integration-tests/test/watcher.js\",\n      \"title\": \"should add and remove necessary runtimes to bundles\",\n      \"status\": \"passing\"\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/data/testHistory.json",
    "content": "[\n  [\"fad84254472b1d7c93ac68aea2eb5ca76d8ad498\", \"2018-12-17 11:32:16\", \"0/338\"],\n  [\"edff6821c846524b1827b3f49b5107c030284105\", \"2019-01-07 11:38:06\", \"54/343\"],\n  [\n    \"a3b2ba3ce85d78fcd045aed867cae4ba40957b81\",\n    \"2019-08-13 08:20:27\",\n    \"242/406\"\n  ],\n  [\"441a14919dcba52f8f48e2f14317b8feb5de661f\", \"2019-10-15 07:54:32\", \"361/484\"]\n]\n"
  },
  {
    "path": "packages/core/integration-tests/package.json",
    "content": "{\n  \"name\": \"@parcel/integration-tests\",\n  \"version\": \"2.16.4\",\n  \"private\": true,\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"scripts\": {\n    \"test\": \"cross-env NODE_ENV=test PARCEL_BUILD_ENV=test mocha --experimental-vm-modules\",\n    \"test-ci\": \"yarn test --reporter mocha-multi-reporters --reporter-options configFile=./test/mochareporters.json\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@babel/plugin-syntax-class-properties\": \"^7.12.13\",\n    \"@babel/plugin-syntax-export-default-from\": \"^7.22.5\",\n    \"@babel/plugin-syntax-export-namespace-from\": \"^7.8.3\",\n    \"@babel/plugin-syntax-module-attributes\": \"^7.10.4\",\n    \"@babel/preset-env\": \"^7.22.14\",\n    \"@babel/preset-typescript\": \"^7.22.11\",\n    \"@mdx-js/react\": \"^1.6.22\",\n    \"@types/react\": \"^19.1.3\",\n    \"@types/react-dom\": \"^19.1.3\",\n    \"autoprefixer\": \"^10.4.21\",\n    \"chalk\": \"^4.1.2\",\n    \"command-exists\": \"^1.2.9\",\n    \"core-js\": \"^3.42.0\",\n    \"cross-env\": \"^7.0.3\",\n    \"date-fns\": \"^4.1.0\",\n    \"elm\": \"^0.19.1-6\",\n    \"elm-hot\": \"^1.1.6\",\n    \"esbuild-register\": \"^3.6.0\",\n    \"exif-reader\": \"^2.0.2\",\n    \"get-port\": \"^5.1.1\",\n    \"http-proxy-middleware\": \"^2.0.9\",\n    \"jsdom\": \"^25.0.1\",\n    \"json5\": \"^2.2.3\",\n    \"lodash\": \"^4.17.21\",\n    \"ncp\": \"^2.0.0\",\n    \"nib\": \"^1.2.0\",\n    \"node-elm-compiler\": \"^5.0.6\",\n    \"parcel\": \"2.16.4\",\n    \"postcss\": \"^8.5.3\",\n    \"postcss-custom-properties\": \"^12.1.11\",\n    \"postcss-import\": \"^16.1.0\",\n    \"posthtml-include\": \"^2.0.1\",\n    \"posthtml-obfuscate\": \"^0.1.5\",\n    \"preact\": \"^10.26.6\",\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\",\n    \"sugarss\": \"^4.0.1\",\n    \"tailwindcss\": \"^3.4.17\",\n    \"tempy\": \"^0.3.0\",\n    \"wasm-sourcemap\": \"^1.0.0\",\n    \"ws\": \"^8.18.2\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/BundleGraph.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport path from 'path';\nimport {bundle, fsFixture, overlayFS} from '@parcel/test-utils';\nimport type {BundleGraph, BundleGroup, PackagedBundle} from '@parcel/types';\n\ndescribe('BundleGraph', () => {\n  it('can traverse assets across bundles and contexts', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-shared/index.js'),\n    );\n\n    let assets = [];\n    b.traverse(node => {\n      if (node.type === 'asset') {\n        assets.push({\n          type: node.type,\n          value: path.basename(\n            node.value.filePath.replace(/runtime-[0-9a-f]*/g, 'runtime'),\n          ),\n        });\n      }\n    });\n\n    assert.deepEqual(assets, [\n      {\n        type: 'asset',\n        value: 'index.js',\n      },\n      {\n        type: 'asset',\n        value: 'lodash.js',\n      },\n      {\n        type: 'asset',\n        value: 'worker-a.js',\n      },\n      {\n        type: 'asset',\n        value: 'lodash.js',\n      },\n      {\n        type: 'asset',\n        value: 'worker-b.js',\n      },\n      {\n        type: 'asset',\n        value: 'esmodule-helpers.js',\n      },\n      {\n        type: 'asset',\n        value: 'runtime.js',\n      },\n      {\n        type: 'asset',\n        value: 'get-worker-url.js',\n      },\n      {\n        type: 'asset',\n        value: 'runtime.js',\n      },\n      {\n        type: 'asset',\n        value: 'get-worker-url.js',\n      },\n      {\n        type: 'asset',\n        value: 'esmodule-helpers.js',\n      },\n    ]);\n  });\n\n  describe('getBundlesInBundleGroup', () => {\n    let bundleGraph: BundleGraph<PackagedBundle>;\n    let bundleGroup: BundleGroup;\n    let dir = path.join(__dirname, 'get-bundles-in-bundle-group');\n\n    before(async () => {\n      await overlayFS.mkdirp(dir);\n\n      await fsFixture(overlayFS, dir)`\n        logo.svg:\n          <svg></svg>\n\n        index.jsx:\n          import logo from 'data-url:./logo.svg';\n\n        yarn.lock: {}\n      `;\n\n      bundleGraph = await bundle(path.join(dir, 'index.jsx'), {\n        inputFS: overlayFS,\n      });\n\n      bundleGroup = bundleGraph.getBundleGroupsContainingBundle(\n        bundleGraph.getBundles({includeInline: true})[0],\n      )[0];\n    });\n\n    after(async () => {\n      await overlayFS.rimraf(dir);\n    });\n\n    it('does not return inlineAssets by default', () => {\n      const bundles = bundleGraph.getBundlesInBundleGroup(bundleGroup);\n\n      assert.deepEqual(\n        bundles.map(b => b.bundleBehavior),\n        [null],\n      );\n    });\n\n    it('does not return inlineAssets when requested', () => {\n      const bundles = bundleGraph.getBundlesInBundleGroup(bundleGroup, {\n        includeInline: false,\n      });\n\n      assert.deepEqual(\n        bundles.map(b => b.bundleBehavior),\n        [null],\n      );\n    });\n\n    it('returns inlineAssets when requested', () => {\n      const bundles = bundleGraph.getBundlesInBundleGroup(bundleGroup, {\n        includeInline: true,\n      });\n\n      assert.deepEqual(\n        bundles.map(b => b.bundleBehavior),\n        [null, 'inline'],\n      );\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/api.js",
    "content": "// @flow strict-local\nimport path from 'path';\nimport assert from 'assert';\nimport {\n  assertBundles,\n  bundle,\n  distDir,\n  fsFixture,\n  outputFS,\n  overlayFS,\n} from '@parcel/test-utils';\n\nimport {PARCEL_VERSION} from '../../core/src/constants';\n\ndescribe('JS API', function () {\n  it('should respect distEntry', async function () {\n    const NAME = 'custom-name.js';\n\n    let b = await bundle(\n      path.join(__dirname, '/integration/js-comment/index.js'),\n      {\n        targets: {\n          default: {distDir, distEntry: NAME},\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: NAME,\n        type: 'js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    assert(await outputFS.exists(path.join(distDir, NAME)));\n  });\n\n  it('should run additional reports from the options', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/js-comment/index.js'),\n      {\n        additionalReporters: [\n          {\n            packageName: '@parcel/reporter-bundle-buddy',\n            resolveFrom: __dirname,\n          },\n        ],\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    assert(await outputFS.exists(path.join(distDir, 'bundle-buddy.json')));\n  });\n\n  describe('Reporter API', () => {\n    it('should pass the parcel version to plugins', async () => {\n      const dir = path.join(__dirname, 'plugin-parcel-version');\n\n      overlayFS.mkdirp(dir);\n\n      await fsFixture(overlayFS, dir)`\n      index.js:\n        export default 'Hi';\n\n      .parcelrc:\n        {\n          extends: \"@parcel/config-default\",\n          reporters: [\"./reporter-plugin.js\", \"...\"],\n        }\n\n      package.json:\n        {\n          \"version\": \"1234\"\n        }\n\n      yarn.lock:\n\n      reporter-plugin.js:\n        import {Reporter} from '@parcel/plugin';\n        import path from 'node:path';\n\n        export default new Reporter({\n          async report({event, options}) {\n            if (event.type === 'buildSuccess') {\n              await options.outputFS.writeFile(path.join(options.projectRoot, 'parcel-version.txt'), options.parcelVersion);\n            }\n          }\n        })\n      `;\n\n      await bundle(path.join(dir, 'index.js'), {\n        inputFS: overlayFS,\n        outputFS: overlayFS,\n      });\n\n      assert.equal(\n        await overlayFS.readFile(path.join(dir, 'parcel-version.txt')),\n        PARCEL_VERSION,\n      );\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/babel.js",
    "content": "// @flow\nimport assert from 'assert';\nimport invariant from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  bundler,\n  distDir,\n  getNextBuild,\n  inputFS as fs,\n  outputFS,\n  removeDistDirectory,\n  run,\n  sleep,\n} from '@parcel/test-utils';\nimport Logger from '@parcel/logger';\nimport os from 'os';\nimport {spawnSync} from 'child_process';\nimport tempy from 'tempy';\nimport {md} from '@parcel/diagnostic';\n\nconst parcelCli = require.resolve('parcel/src/bin.js');\nconst inputDir = path.join(__dirname, '/input');\n\ndescribe('babel', function () {\n  let subscription;\n  beforeEach(async function () {\n    // TODO maybe don't do this for all tests\n    await sleep(100);\n    await outputFS.rimraf(inputDir);\n    await sleep(100);\n  });\n\n  afterEach(async () => {\n    await removeDistDirectory();\n    if (subscription) {\n      await subscription.unsubscribe();\n      subscription = null;\n    }\n  });\n\n  it.skip('should auto install @babel/core v7', async function () {\n    let originalPkg = await fs.readFile(\n      __dirname + '/integration/babel-7-autoinstall/package.json',\n    );\n    let b = await bundle(\n      __dirname + '/integration/babel-7-autoinstall/index.js',\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output, 'object');\n    assert.equal(typeof output.default, 'function');\n    assert.equal(output.default(), 3);\n\n    let pkg = await fs.readFile(\n      __dirname + '/integration/babel-7-autoinstall/package.json',\n    );\n    assert(JSON.parse(pkg).devDependencies['@babel/core']);\n    await fs.writeFile(\n      __dirname + '/integration/babel-7-autoinstall/package.json',\n      originalPkg,\n    );\n  });\n\n  it.skip('should auto install babel plugins', async function () {\n    let originalPkg = await fs.readFile(\n      __dirname + '/integration/babel-plugin-autoinstall/package.json',\n    );\n    let b = await bundle(\n      __dirname + '/integration/babel-plugin-autoinstall/index.js',\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output, 'object');\n    assert.equal(typeof output.default, 'function');\n    assert.equal(output.default(), 3);\n\n    let pkg = await fs.readFile(\n      __dirname + '/integration/babel-plugin-autoinstall/package.json',\n    );\n    assert(JSON.parse(pkg).devDependencies['@babel/core']);\n    assert(\n      JSON.parse(pkg).devDependencies[\n        '@babel/plugin-proposal-class-properties'\n      ],\n    );\n    await fs.writeFile(\n      __dirname + '/integration/babel-plugin-autoinstall/package.json',\n      originalPkg,\n    );\n  });\n\n  it('should support compiling with babel using .babelrc config', async function () {\n    await bundle(path.join(__dirname, '/integration/babelrc-custom/index.js'));\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!file.includes('REPLACE_ME'));\n    assert(file.includes('hello there'));\n  });\n\n  it('should support compiling with babel using babel.config.json config without warnings', async function () {\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n    await bundle(\n      path.join(__dirname, '/integration/babel-config-json-custom/index.js'),\n    );\n    loggerDisposable.dispose();\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!file.includes('REPLACE_ME'));\n    assert(file.includes('hello there'));\n    assert.deepEqual(messages, []);\n  });\n\n  it.skip('should support compiling with babel using browserslist for different environments', async function () {\n    async function testBrowserListMultipleEnv(projectBasePath) {\n      // Transpiled destructuring, like r = p.prop1, o = p.prop2, a = p.prop3;\n      const prodRegExp =\n        /\\S+ ?= ?\\S+\\.prop1,\\s*?\\S+ ?= ?\\S+\\.prop2,\\s*?\\S+ ?= ?\\S+\\.prop3;/;\n      // ES6 Destructuring, like in the source;\n      const devRegExp =\n        /const ?{\\s*prop1(:.+)?,\\s*prop2(:.+)?,\\s*prop3(:.+)?\\s*} ?= ?.*/;\n      let file;\n      // Dev build test\n      await bundle(path.join(__dirname, projectBasePath, '/index.js'));\n      file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n      assert.equal(devRegExp.test(file), true);\n      assert.equal(prodRegExp.test(file), false);\n      // Prod build test\n      await bundle(path.join(__dirname, projectBasePath, '/index.js'), {\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      });\n      file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n      assert.equal(prodRegExp.test(file), true);\n      assert.equal(devRegExp.test(file), false);\n    }\n\n    await testBrowserListMultipleEnv(\n      '/integration/babel-browserslist-multiple-env',\n    );\n    await testBrowserListMultipleEnv(\n      '/integration/babel-browserslist-multiple-env-as-string',\n    );\n  });\n\n  it.skip('should compile node_modules with browserslist to app target', async function () {\n    await bundle(\n      path.join(\n        __dirname,\n        '/integration/babel-node-modules-browserslist/index.js',\n      ),\n    );\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('function Foo'));\n    assert(file.includes('function Bar'));\n  });\n\n  it('should strip away flow types', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/babel-strip-flow-types/index.js'),\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 'hello world');\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!file.includes('OptionsType'));\n  });\n\n  it('should support compiling with babel using babel.config.js config', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/babel-config-js/src/index.js'),\n    );\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!file.includes('REPLACE_ME'));\n    assert(file.match(/return \\d+;/));\n  });\n\n  it('should support compiling with babel using babel.config.js config with a require in it', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/babel-config-js-require/src/index.js'),\n    );\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!file.includes('REPLACE_ME'));\n    assert(file.match(/return \\d+;/));\n  });\n\n  it('should support multitarget builds using a custom babel config with @parcel/babel-preset-env', async function () {\n    let fixtureDir = path.join(\n      __dirname,\n      '/integration/babel-config-js-multitarget',\n    );\n\n    await bundle(path.join(fixtureDir, 'src/index.js'));\n\n    let [modern, legacy] = await Promise.all([\n      outputFS.readFile(path.join(fixtureDir, 'dist/modern/index.js'), 'utf8'),\n      outputFS.readFile(path.join(fixtureDir, 'dist/legacy/index.js'), 'utf8'),\n    ]);\n\n    assert(modern.includes('class Foo'));\n    assert(modern.includes('this.x ** 2'));\n\n    assert(!legacy.includes('class Foo'));\n    assert(!legacy.includes('this.x ** 2'));\n\n    await outputFS.rimraf(path.join(fixtureDir, 'dist'));\n  });\n\n  it('should support multitarget builds using a custom babel config with @parcel/babel-plugin-transform-runtime', async function () {\n    let fixtureDir = path.join(\n      __dirname,\n      '/integration/babel-config-js-multitarget-transform-runtime',\n    );\n\n    await bundle(path.join(fixtureDir, 'src/index.js'), {\n      mode: 'production',\n      defaultTargetOptions: {\n        shouldOptimize: false,\n      },\n    });\n\n    let [main, esmodule] = await Promise.all([\n      outputFS.readFile(path.join(fixtureDir, 'dist/main.js'), 'utf8'),\n      outputFS.readFile(path.join(fixtureDir, 'dist/module.js'), 'utf8'),\n    ]);\n\n    assert(main.includes('\"@babel/runtime/helpers/objectSpread2\"'));\n\n    assert(esmodule.includes('\"@babel/runtime/helpers/esm/objectSpread2\"'));\n\n    await outputFS.rimraf(path.join(fixtureDir, 'dist'));\n  });\n\n  it('should support building with custom babel config when running parcel globally', async function () {\n    let tmpDir = tempy.directory();\n    let distDir = path.join(tmpDir, 'dist');\n    await fs.ncp(\n      path.join(__dirname, '/integration/babelrc-custom'),\n      path.join(tmpDir, '/input'),\n    );\n    await bundle(path.join(tmpDir, '/input/index.js'), {\n      targets: {\n        modern: {\n          engines: {\n            node: '^4.0.0',\n          },\n          distDir,\n        },\n      },\n      shouldAutoInstall: true,\n    });\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!file.includes('REPLACE_ME'));\n    assert(file.includes('hello there'));\n  });\n\n  it('should support merging .babelrc and babel.config.json in a monorepo', async function () {\n    await bundle(\n      path.join(\n        __dirname,\n        '/integration/babel-config-monorepo/packages/pkg-a/src/index.js',\n      ),\n    );\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!file.includes('REPLACE_ME'));\n    assert(file.includes('string from a plugin in babel.config.json'));\n    assert(!file.includes('ANOTHER_THING_TO_REPLACE'));\n    assert(file.includes('string from a plugin in .babelrc'));\n    assert(file.includes('SOMETHING ELSE'));\n    assert(!file.includes('string from a plugin from a different sub-package'));\n  });\n\n  describe('Babel envName', () => {\n    it('should prefer BABEL_ENV to NODE_ENV', async () => {\n      await bundle(\n        path.join(__dirname, '/integration/babel-env-name/index.js'),\n        {\n          targets: {main: {distDir, engines: {browsers: ['ie 11']}}},\n          env: {BABEL_ENV: 'production', NODE_ENV: 'development'},\n        },\n      );\n      let file = await outputFS.readFile(\n        path.join(distDir, 'index.js'),\n        'utf8',\n      );\n      assert(!file.includes('class Foo'));\n    });\n\n    it('should invalidate when BABEL_ENV changes', async () => {\n      await bundle(\n        path.join(__dirname, '/integration/babel-env-name/index.js'),\n        {\n          targets: {main: {distDir, engines: {}}},\n          shouldDisableCache: false,\n        },\n      );\n      let file = await outputFS.readFile(\n        path.join(distDir, 'index.js'),\n        'utf8',\n      );\n      assert(file.includes('class Foo'));\n\n      await bundle(\n        path.join(__dirname, '/integration/babel-env-name/index.js'),\n        {shouldDisableCache: false, env: {BABEL_ENV: 'production'}},\n      );\n      file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n      assert(!file.includes('class Foo'));\n    });\n\n    it('should invalidate when NODE_ENV changes from BABEL_ENV', async () => {\n      await bundle(\n        path.join(__dirname, '/integration/babel-env-name/index.js'),\n        {\n          targets: {main: {distDir, engines: {}}},\n          shouldDisableCache: false,\n          env: {NODE_ENV: 'production'},\n        },\n      );\n      let file = await outputFS.readFile(\n        path.join(distDir, 'index.js'),\n        'utf8',\n      );\n      assert(!file.includes('class Foo'));\n\n      await bundle(\n        path.join(__dirname, '/integration/babel-env-name/index.js'),\n        {\n          targets: {main: {distDir, engines: {}}},\n          shouldDisableCache: false,\n          env: {BABEL_ENV: 'development'},\n        },\n      );\n      file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n      assert(file.includes('class Foo'));\n    });\n\n    it('should be \"production\" if Parcel is run in production mode', async () => {\n      await bundle(\n        path.join(__dirname, '/integration/babel-env-name/index.js'),\n        {\n          targets: {main: {distDir, engines: {browsers: ['ie 11']}}},\n          mode: 'production',\n        },\n      );\n      let file = await outputFS.readFile(\n        path.join(distDir, 'index.js'),\n        'utf8',\n      );\n      assert(!file.includes('class Foo'));\n    });\n  });\n\n  describe.skip('tests needing the real filesystem', () => {\n    afterEach(async () => {\n      try {\n        await fs.rimraf(inputDir);\n        await fs.rimraf(distDir);\n      } catch (e) {\n        if (e.code === 'ENOENT') {\n          throw e;\n        }\n      }\n    });\n\n    it('should rebuild when .babelrc changes', async function () {\n      if (process.platform !== 'linux') {\n        // This test is flaky outside of Linux. Skip it for now.\n        return;\n      }\n\n      let inputDir = tempy.directory();\n      let differentPath = path.join(inputDir, 'differentConfig');\n      let configPath = path.join(inputDir, '.babelrc');\n\n      await fs.ncp(\n        path.join(__dirname, 'integration/babelrc-custom'),\n        inputDir,\n      );\n\n      let b = bundler(path.join(inputDir, 'index.js'), {\n        outputFS: fs,\n        shouldAutoInstall: true,\n      });\n\n      subscription = await b.watch();\n      await getNextBuild(b);\n      let distFile = await fs.readFile(path.join(distDir, 'index.js'), 'utf8');\n      assert(distFile.includes('hello there'));\n      await fs.copyFile(differentPath, configPath);\n      await new Promise(resolve => setTimeout(resolve, 100));\n      // On Windows only, `fs.utimes` arguments must be instances of `Date`,\n      // otherwise it fails. For Mac instances on Azure CI, using a Date instance\n      // does not update the utime correctly, so for all other platforms, use a\n      // number.\n      // https://github.com/nodejs/node/issues/5561\n      let now = os.platform() === 'win32' ? new Date() : Date.now();\n      // fs.copyFile does not reliably update mtime, which babel uses to invalidate cached file contents\n      await fs.utimes(configPath, now, now);\n      await getNextBuild(b);\n      distFile = await fs.readFile(path.join(distDir, 'index.js'), 'utf8');\n      assert(!distFile.includes('hello there'));\n      assert(distFile.includes('something different'));\n    });\n\n    it('should rebuild when declared external dependencies change', async function () {\n      let inputDir = tempy.directory();\n      let filepathMain = path.join(inputDir, 'main.txt');\n      let filepathFallback = path.join(inputDir, 'fallback.txt');\n\n      await fs.ncp(\n        path.join(__dirname, 'integration/babel-external-deps'),\n        inputDir,\n      );\n\n      let b = bundler(path.join(inputDir, 'index.js'), {\n        outputFS: fs,\n        shouldAutoInstall: true,\n      });\n\n      subscription = await b.watch();\n\n      async function step(f, positive, negative) {\n        if (f != null) {\n          await fs.writeFile(f, positive);\n        }\n        let build = await getNextBuild(b);\n        invariant(build.type === 'buildSuccess');\n        let distFile = await fs.readFile(\n          build.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(distFile.includes(positive));\n        if (negative != null) {\n          assert(!distFile.includes(negative));\n        }\n      }\n\n      await step(null, 'foo1', null);\n      await step(filepathFallback, 'foo2', 'foo1');\n      await step(filepathMain, 'foo3', 'foo2');\n      await step(filepathMain, 'foo4', 'foo3');\n    });\n\n    it('should invalidate babel.config.js across runs', async function () {\n      let dateRe = /return (\\d+);/;\n\n      let fixtureDir = path.join(__dirname, '/integration/babel-config-js');\n      let distDir = path.resolve(fixtureDir, './dist');\n      let cacheDir = path.resolve(fixtureDir, '.parcel-cache');\n      await fs.rimraf(distDir);\n      await fs.rimraf(cacheDir);\n      await fs.rimraf(path.resolve(fixtureDir, './node_modules/.cache'));\n\n      let build = () =>\n        spawnSync(\n          'node',\n          [\n            parcelCli,\n            'build',\n            'src/index.js',\n            '--no-optimize',\n            '--no-scope-hoist',\n          ],\n          {\n            cwd: fixtureDir,\n            env: {\n              ...process.env,\n              PARCEL_WORKERS: '0',\n            },\n          },\n        );\n\n      build();\n      let file = await fs.readFile(path.join(distDir, 'index.js'), 'utf8');\n      assert(!file.includes('REPLACE_ME'));\n      let firstMatch = file.match(dateRe);\n      assert(firstMatch != null);\n      let firstDatestamp = firstMatch[1];\n\n      build();\n      file = await fs.readFile(path.join(distDir, 'index.js'), 'utf8');\n      let secondMatch = file.match(dateRe);\n      assert(secondMatch != null);\n      let secondDatestamp = secondMatch[1];\n\n      assert.notEqual(firstDatestamp, secondDatestamp);\n    });\n\n    it('should invalidate when babel plugins are upgraded across runs', async function () {\n      let fixtureDir = path.join(\n        __dirname,\n        '/integration/babel-plugin-upgrade',\n      );\n      await fs.ncp(path.join(fixtureDir), inputDir);\n      await fs.rimraf(path.join(__dirname, '.parcel-cache'));\n\n      let build = () =>\n        spawnSync(\n          'node',\n          [parcelCli, 'build', 'index.js', '--no-optimize', '--no-scope-hoist'],\n          {\n            cwd: inputDir,\n            env: {\n              ...process.env,\n              PARCEL_WORKERS: '0',\n            },\n          },\n        );\n\n      build();\n      let file = await fs.readFile(\n        path.join(inputDir, 'dist', 'index.js'),\n        'utf8',\n      );\n      assert(!file.includes('REPLACE_ME'));\n      assert(file.includes('hello there'));\n\n      await fs.writeFile(\n        path.join(inputDir, 'node_modules/babel-plugin-dummy/message.js'),\n        'module.exports = \"something different\"',\n      );\n      await fs.writeFile(\n        path.join(inputDir, 'node_modules/babel-plugin-dummy/package.json'),\n        JSON.stringify({name: 'babel-plugin-dummy', version: '1.1.0'}),\n      );\n      await fs.writeFile(\n        path.join(inputDir, 'yarn.lock'),\n        '# yarn.lock has been updated',\n      );\n\n      build();\n      file = await fs.readFile(path.join(inputDir, 'dist', 'index.js'), 'utf8');\n      assert(!file.includes('REPLACE_ME'));\n      assert(!file.includes('hello there'));\n      assert(file.includes('something different'));\n    });\n  });\n\n  it('should enable shippedProposals with @parcel/babel-preset-env in custom babelrc', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/babel-preset-env-shippedProposals/index.js',\n      ),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!file.includes('#priv'));\n\n    let output = await run(b);\n    assert.strictEqual(typeof output, 'object');\n    assert.strictEqual(output.default, 123);\n  });\n\n  it('should compile with custom babel plugin plus default transforms', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/babel-custom/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!file.includes('class Test'));\n    assert(!file.includes('REPLACE_ME'));\n    assert(!file.includes('#private'));\n\n    let output = await run(b);\n    assert.strictEqual(typeof output, 'object');\n    assert.strictEqual(output.default, 'hello');\n  });\n\n  it('should compile with custom babel plugin and jsx', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/babel-custom/jsx.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!file.includes('REPLACE_ME'));\n    assert(file.includes('React.createElement'));\n  });\n\n  it('should compile with custom babel plugin and typescript', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/babel-custom/ts.ts'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!file.includes('class Test'));\n    assert(!file.includes('REPLACE_ME'));\n    assert(!file.includes('#private'));\n    assert(!file.includes('interface'));\n\n    let output = await run(b);\n    assert.strictEqual(typeof output, 'object');\n    assert.strictEqual(output.default, 'hello');\n  });\n\n  it('should compile with custom babel plugin and tsx', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/babel-custom/tsx.tsx'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!file.includes('REPLACE_ME'));\n    assert(!file.includes('interface'));\n    assert(file.includes('React.createElement'));\n  });\n\n  it('should warn when a babel config contains only redundant plugins', async function () {\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n    let filePath = path.join(__dirname, '/integration/babel-warn-all/index.js');\n    await bundle(filePath);\n    loggerDisposable.dispose();\n\n    let babelrcPath = path.resolve(path.dirname(filePath), '.babelrc');\n    assert.deepEqual(messages, [\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/transformer-babel',\n            message: md`Parcel includes transpilation by default. Babel config __${path.relative(\n              process.cwd(),\n              babelrcPath,\n            )}__ contains only redundant presets. Deleting it may significantly improve build performance.`,\n            codeFrames: [\n              {\n                filePath: babelrcPath,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 15,\n                    },\n                    end: {\n                      line: 2,\n                      column: 33,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: [\n              md`Delete __${path.relative(process.cwd(), babelrcPath)}__`,\n            ],\n            documentationURL:\n              'https://parceljs.org/languages/javascript/#default-presets',\n          },\n          {\n            origin: '@parcel/transformer-babel',\n            message:\n              \"@babel/preset-env does not support Parcel's targets, which will likely result in unnecessary transpilation and larger bundle sizes.\",\n            codeFrames: [\n              {\n                filePath: path.resolve(path.dirname(filePath), '.babelrc'),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 15,\n                    },\n                    end: {\n                      line: 2,\n                      column: 33,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: [\n              \"Either remove __@babel/preset-env__ to use Parcel's builtin transpilation, or replace with __@parcel/babel-preset-env__\",\n            ],\n            documentationURL:\n              'https://parceljs.org/languages/javascript/#custom-plugins',\n          },\n        ],\n      },\n    ]);\n  });\n\n  it('should warn when a babel config contains redundant plugins', async function () {\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n    let filePath = path.join(\n      __dirname,\n      '/integration/babel-warn-some/index.js',\n    );\n    await bundle(filePath);\n    loggerDisposable.dispose();\n\n    let babelrcPath = path.resolve(path.dirname(filePath), '.babelrc');\n    assert.deepEqual(messages, [\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/transformer-babel',\n            message: md`Parcel includes transpilation by default. Babel config __${path.relative(\n              process.cwd(),\n              babelrcPath,\n            )}__ includes the following redundant presets: __@parcel/babel-preset-env__. Removing these may improve build performance.`,\n            codeFrames: [\n              {\n                filePath: babelrcPath,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 15,\n                    },\n                    end: {\n                      line: 2,\n                      column: 40,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: [\n              md`Remove the above presets from __${path.relative(\n                process.cwd(),\n                babelrcPath,\n              )}__`,\n            ],\n            documentationURL:\n              'https://parceljs.org/languages/javascript/#default-presets',\n          },\n        ],\n      },\n    ]);\n  });\n\n  it('should warn when a JSON5 babel config contains redundant plugins', async function () {\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n    let filePath = path.join(\n      __dirname,\n      '/integration/babel-warn-some-json5/index.js',\n    );\n    await bundle(filePath);\n    loggerDisposable.dispose();\n\n    let babelrcPath = path.resolve(path.dirname(filePath), '.babelrc');\n    assert.deepEqual(messages, [\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/transformer-babel',\n            message: md`Parcel includes transpilation by default. Babel config __${path.relative(\n              process.cwd(),\n              babelrcPath,\n            )}__ includes the following redundant presets: __@parcel/babel-preset-env__. Removing these may improve build performance.`,\n            codeFrames: [\n              {\n                filePath: babelrcPath,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 13,\n                    },\n                    end: {\n                      line: 2,\n                      column: 38,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: [\n              md`Remove the above presets from __${path.relative(\n                process.cwd(),\n                babelrcPath,\n              )}__`,\n            ],\n            documentationURL:\n              'https://parceljs.org/languages/javascript/#default-presets',\n          },\n        ],\n      },\n    ]);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/blob-url.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport path from 'path';\nimport {bundle, distDir, outputFS, run} from '@parcel/test-utils';\n\nclass Blob {\n  data;\n  constructor(data) {\n    this.data = data;\n  }\n}\n\nconst URL = {\n  createObjectURL(blob) {\n    assert(blob instanceof Blob);\n    return `data:application/javascript,${encodeURIComponent(blob.data)}`;\n  },\n};\n\ndescribe('blob urls', () => {\n  it('should inline compiled content as a blob url with `blob-url:*` imports', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/blob-url/index.js'),\n    );\n\n    class Worker {\n      constructor(src) {\n        created.push(src);\n      }\n      postMessage() {}\n    }\n\n    let created = [];\n    await run(b, {\n      Worker,\n      Blob,\n      URL,\n    });\n    assert.equal(created.length, 1);\n    assert(created[0].startsWith('data:application/javascript,'));\n\n    let bundleContent = await outputFS.readFile(\n      path.join(distDir, 'index.js'),\n      'utf8',\n    );\n    assert(bundleContent.includes('new Worker(require('));\n    assert(\n      bundleContent.includes(\n        'module.exports = URL.createObjectURL(new Blob([\"// modules are defined as an array\\\\n',\n      ),\n    );\n    assert(\n      bundleContent.includes(\n        'self.postMessage(\\\\\"this should appear in the bundle\\\\\\\\n\\\\\")',\n      ),\n    );\n  });\n\n  it('should inline minified content as a blob url with `blob-url:*` imports', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/blob-url/index.js'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    class Worker {\n      constructor(src) {\n        created.push(src);\n      }\n      postMessage() {}\n    }\n\n    let created = [];\n    await run(b, {\n      Worker,\n      Blob,\n      URL,\n    });\n    assert.equal(created.length, 1);\n    assert(created[0].startsWith('data:application/javascript,'));\n\n    let bundleContent = await outputFS.readFile(\n      path.join(distDir, 'index.js'),\n      'utf8',\n    );\n    assert(bundleContent.includes('new Worker('));\n    assert(\n      bundleContent.includes(\n        \".exports=URL.createObjectURL(new Blob(['!function(\",\n      ),\n    );\n    assert(\n      bundleContent.includes(\n        'self.postMessage(\"this should appear in the bundle\\\\\\\\n\")',\n      ),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/bundler.js",
    "content": "import path from 'path';\nimport assert from 'assert';\nimport Logger from '@parcel/logger';\nimport {\n  assertBundles,\n  bundle,\n  findAsset,\n  overlayFS,\n  fsFixture,\n  run,\n} from '@parcel/test-utils';\nimport {hashString} from '@parcel/rust';\nimport {normalizePath} from '@parcel/utils';\n\ndescribe('bundler', function () {\n  it('should not create shared bundles when a bundle is being reused and disableSharedBundles is enabled', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      disable-shared-bundle-single-source\n        a.js:\n          import foo from './foo';\n\n          export default 5;\n        b.js:\n          export default 4;\n        bar.js:\n          import a from './a';\n          import b from './b';\n\n          export default 3;\n        foo.js:\n          import a from './a';\n          import b from './b';\n\n          export default 2;\n        index.js:\n          import('./foo');\n          import('./bar');\n\n          export default 1;\n\n        package.json:\n          {\n            \"@parcel/bundler-default\": {\n              \"minBundles\": 0,\n              \"minBundleSize\": 200,\n              \"maxParallelRequests\": 100,\n              \"disableSharedBundles\": true\n            }\n          }\n\n        yarn.lock:`;\n\n    let b = await bundle(\n      path.join(__dirname, 'disable-shared-bundle-single-source/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['foo.js', 'a.js', 'b.js'],\n      },\n      {\n        assets: ['a.js', 'b.js', 'foo.js', 'bar.js'],\n      },\n    ]);\n  });\n\n  it('should not create shared bundles and should warn when disableSharedBundles is set to true with maxParallelRequests set', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      disable-shared-bundles-true-parallel\n        a.js:\n          export default 5;\n        b.js:\n          export default 4;\n        bar.js:\n          import a from './a';\n          import b from './b';\n\n          export default 3;\n        foo.js:\n          import a from './a';\n          import b from './b';\n\n          export default 2;\n        index.js:\n          import('./foo');\n          import('./bar');\n\n          export default 1;\n\n        package.json:\n          {\n            \"@parcel/bundler-default\": {\n              \"maxParallelRequests\": 100,\n              \"disableSharedBundles\": true\n            }\n          }\n\n        yarn.lock:`;\n\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n    let b = await bundle(\n      path.join(__dirname, 'disable-shared-bundles-true-parallel/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n    loggerDisposable.dispose();\n\n    assert.deepEqual(messages, [\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/bundler-default',\n            message:\n              'The value of \"100\" set for maxParallelRequests will not be used as shared bundles have been disabled',\n          },\n        ],\n      },\n    ]);\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['foo.js', 'a.js', 'b.js'],\n      },\n      {\n        assets: ['bar.js', 'a.js', 'b.js'],\n      },\n    ]);\n  });\n\n  it('should not create shared bundles and should warn when disableSharedBundles is set to true with minBundleSize set', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      disable-shared-bundles-true-min-bundleSize\n        a.js:\n          export default 5;\n        b.js:\n          export default 4;\n        bar.js:\n          import a from './a';\n          import b from './b';\n\n          export default 3;\n        foo.js:\n          import a from './a';\n          import b from './b';\n\n          export default 2;\n        index.js:\n          import('./foo');\n          import('./bar');\n\n          export default 1;\n\n        package.json:\n          {\n            \"@parcel/bundler-default\": {\n              \"minBundleSize\": 200,\n              \"disableSharedBundles\": true\n            }\n          }\n\n        yarn.lock:`;\n\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'disable-shared-bundles-true-min-bundleSize/index.js',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n    loggerDisposable.dispose();\n\n    assert.deepEqual(messages, [\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/bundler-default',\n            message:\n              'The value of \"200\" set for minBundleSize will not be used as shared bundles have been disabled',\n          },\n        ],\n      },\n    ]);\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['foo.js', 'a.js', 'b.js'],\n      },\n      {\n        assets: ['bar.js', 'a.js', 'b.js'],\n      },\n    ]);\n  });\n\n  it('should not create shared bundles and should warn when disableSharedBundles is set to true with minBundles set', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      disable-shared-bundles-true-min-bundles\n        a.js:\n          export default 5;\n        b.js:\n          export default 4;\n        bar.js:\n          import a from './a';\n          import b from './b';\n\n          export default 3;\n        foo.js:\n          import a from './a';\n          import b from './b';\n\n          export default 2;\n        index.js:\n          import('./foo');\n          import('./bar');\n\n          export default 1;\n\n        package.json:\n          {\n            \"@parcel/bundler-default\": {\n              \"minBundles\": 0,\n              \"disableSharedBundles\": true\n            }\n          }\n\n        yarn.lock:`;\n\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n    let b = await bundle(\n      path.join(__dirname, 'disable-shared-bundles-true-min-bundles/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n    loggerDisposable.dispose();\n\n    assert.deepEqual(messages, [\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/bundler-default',\n            message:\n              'The value of \"0\" set for minBundles will not be used as shared bundles have been disabled',\n          },\n        ],\n      },\n    ]);\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['foo.js', 'a.js', 'b.js'],\n      },\n      {\n        assets: ['bar.js', 'a.js', 'b.js'],\n      },\n    ]);\n  });\n\n  it('should not create shared bundles and should warn when disableSharedBundles is set to true with minBundles, minBundleSize and maxParallelRequests set', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      disable-shared-bundles-true-min-bundles-parallel\n        a.js:\n          export default 5;\n        b.js:\n          export default 4;\n        bar.js:\n          import a from './a';\n          import b from './b';\n\n          export default 3;\n        foo.js:\n          import a from './a';\n          import b from './b';\n\n          export default 2;\n        index.js:\n          import('./foo');\n          import('./bar');\n\n          export default 1;\n\n        package.json:\n          {\n            \"@parcel/bundler-default\": {\n              \"minBundles\": 0,\n              \"minBundleSize\": 200,\n              \"maxParallelRequests\": 100,\n              \"disableSharedBundles\": true\n            }\n          }\n\n        yarn.lock:`;\n\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'disable-shared-bundles-true-min-bundles-parallel/index.js',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n    loggerDisposable.dispose();\n\n    assert.deepEqual(messages, [\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/bundler-default',\n            message:\n              'The value of \"0\" set for minBundles will not be used as shared bundles have been disabled',\n          },\n        ],\n      },\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/bundler-default',\n            message:\n              'The value of \"200\" set for minBundleSize will not be used as shared bundles have been disabled',\n          },\n        ],\n      },\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/bundler-default',\n            message:\n              'The value of \"100\" set for maxParallelRequests will not be used as shared bundles have been disabled',\n          },\n        ],\n      },\n    ]);\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['foo.js', 'a.js', 'b.js'],\n      },\n      {\n        assets: ['bar.js', 'a.js', 'b.js'],\n      },\n    ]);\n  });\n\n  it('should create shared bundles and should not throw a warning when disableSharedBundles is set to false', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      disable-shared-bundles-false\n        a.js:\n          export default 5;\n        b.js:\n          export default 4;\n        bar.js:\n          import a from './a';\n          import b from './b';\n\n          export default 3;\n        foo.js:\n          import a from './a';\n          import b from './b';\n\n          export default 2;\n        index.js:\n          import('./foo');\n          import('./bar');\n\n          export default 1;\n\n        package.json:\n          {\n            \"@parcel/bundler-default\": {\n              \"minBundles\": 0,\n              \"minBundleSize\": 200,\n              \"maxParallelRequests\": 100,\n              \"disableSharedBundles\": false\n            }\n          }\n\n        yarn.lock:`;\n\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n    let b = await bundle(\n      path.join(__dirname, 'disable-shared-bundles-false/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n    loggerDisposable.dispose();\n\n    assert.deepEqual(messages, []);\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['foo.js'],\n      },\n      {\n        assets: ['bar.js'],\n      },\n      {\n        assets: ['a.js', 'b.js'],\n      },\n    ]);\n  });\n\n  it('should not count inline assests towards parallel request limit', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      inlined-assests\n        buzz.js:\n          export default 7;\n        inline-module.js:\n          import('./buzz');\n\n          export default 10;\n        local.html:\n          <!doctype html>\n          <html>\n            <body>\n              <script type=\"module\">\n                import './inline-module';\n              </script>\n            </body>\n          </html>\n\n        package.json:\n          {\n            \"@parcel/bundler-default\": {\n              \"minBundles\": 1,\n              \"minBundleSize\": 200,\n              \"maxParallelRequests\": 2\n            }\n          }\n\n        yarn.lock:`;\n\n    // Shared bundle should not be removed in this case\n    let b = await bundle(path.join(__dirname, 'inlined-assests/local.html'), {\n      mode: 'production',\n      defaultTargetOptions: {\n        shouldScopeHoist: false,\n      },\n      inputFS: overlayFS,\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['local.html'],\n      },\n      {\n        assets: ['buzz.js'],\n      },\n      {\n        assets: [\n          'inline-module.js',\n          'local.html',\n          'cacheLoader.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['esmodule-helpers.js'],\n      },\n    ]);\n  });\n\n  it('should not create a shared bundle from an asset if that asset is shared by less than minBundles bundles', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/min-bundles/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'css-loader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        // a and b are shared between only 2 bundles so they are kept in each bundle\n        assets: ['bar.js', 'a.js', 'b.js'],\n      },\n      {\n        assets: ['buzz.js'],\n      },\n      {\n        assets: ['a.js', 'b.js', 'foo.js'],\n      },\n      {\n        // c is shared between 3 different bundles, so it stays\n        assets: ['c.js'],\n      },\n      {\n        assets: ['styles.css'],\n      },\n      {\n        assets: ['local.html'],\n      },\n    ]);\n  });\n\n  it('should remove reused bundle (over shared bundles based on size) if the bundlegroup hit the parallel request limit', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/shared-bundle-reused-bundle-remove-reuse/index.js',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'css-loader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['bar.js', 'foo.js', 'a.js', 'b.js'],\n      },\n      {\n        assets: ['buzz.js'],\n      },\n      {\n        assets: ['c.js'],\n      },\n      {\n        assets: ['a.js', 'b.js', 'foo.js'],\n      },\n      {\n        assets: ['styles.css'],\n      },\n      {\n        assets: ['local.html'],\n      },\n    ]);\n  });\n\n  //This test case is the same as previous except we remove the shared bundle since it is smaller\n  it('should remove shared bundle (over reused bundles based on size) if the bundlegroup hit the parallel request limit', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/shared-bundle-reused-bundle-remove-shared/index.js',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'css-loader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['bar.js', 'c.js'],\n      },\n      {\n        // A consequence of our shared bundle 'c'  being removed for the bundleGroup bar\n        // is that it must also be removed for buzz, even though the buzz bundleGroup does not\n        // hit the parallel request limit. This is because the shared bundle is no longer sharing\n        // it is only attached to one bundle and thus should be removed.\n        assets: ['buzz.js', 'c.js'],\n      },\n      {\n        assets: ['a.js', 'b.js', 'foo.js'],\n      },\n      {\n        assets: ['styles.css'],\n      },\n      {\n        assets: ['local.html'],\n      },\n    ]);\n  });\n\n  it('should not remove shared bundle from graph if one bundlegroup hits the parallel request limit, and at least 2 other bundleGroups that need it do not', async function () {\n    //The shared bundle should only be 'put back' for the bundlegroups which hit the parallel request limit\n    // But if there are at least two other bundlegroups using this shared bundle that do not hit the max limit\n    // the shared bundle should not be removed from the graph\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/shared-bundle-remove-from-one-group-only/index.js',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'css-loader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['bar.js', 'c.js'], // shared bundle merged back\n      },\n      {\n        assets: ['buzz.js'],\n      },\n      {\n        assets: ['c.js'], // shared bundle\n      },\n      {\n        assets: ['foo.js'],\n      },\n      {\n        assets: ['styles.css'],\n      },\n      {\n        assets: ['local.html'],\n      },\n    ]);\n  });\n\n  it('should not remove shared bundle from graph if its parent (a reused bundle) is removed by parallel request limit', async function () {\n    //The shared bundle should only be 'put back' for the bundlegroups which hit the parallel request limit\n    // But if there are at least two other bundlegroups using this shared bundle that do not hit the max limit\n    // the shared bundle should not be removed from the graph\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/shared-bundle-between-reused-bundle-removal/index.js',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'css-loader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['bar.js', 'foo.js', 'a.js', 'b.js'], // shared bundle merged back\n      },\n      {\n        assets: ['buzz.js'],\n      },\n      {\n        assets: ['c.js'], // shared bundle\n      },\n      {\n        assets: ['foo.js', 'a.js', 'b.js'],\n      },\n      {\n        assets: ['styles.css'],\n      },\n      {\n        assets: ['local.html'],\n      },\n    ]);\n\n    assert(\n      b\n        .getReferencedBundles(b.getBundlesWithAsset(findAsset(b, 'bar.js'))[0])\n        .includes(b.getBundlesWithAsset(findAsset(b, 'c.js'))[0]),\n    );\n  });\n\n  it('should respect mode specific config', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      mode-specific-bundler-config\n        a.js:\n          import foo from './foo';\n\n          export default 5;\n        b.js:\n          export default 4;\n        bar.js:\n          import a from './a';\n          import b from './b';\n\n          export default 3;\n        foo.js:\n          import a from './a';\n          import b from './b';\n\n          export default 2;\n        index.js:\n          import('./foo');\n          import('./bar');\n\n          export default 1;\n\n        package.json:\n          {\n            \"@parcel/bundler-default\": {\n              \"minBundles\": 0,\n              \"minBundleSize\": 200,\n              \"production\": {\n                \"maxParallelRequests\": 100,\n                \"disableSharedBundles\": true\n              }\n            }\n          }\n\n        yarn.lock:`;\n\n    let b = await bundle(\n      path.join(__dirname, 'mode-specific-bundler-config/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['foo.js', 'a.js', 'b.js'],\n      },\n      {\n        assets: ['a.js', 'b.js', 'foo.js', 'bar.js'],\n      },\n    ]);\n  });\n\n  it('should support inline constants', async () => {\n    await fsFixture(overlayFS, __dirname)`\n      inline-constants-shared-bundles\n        one.html:\n          <script type=\"module\" src=\"./one.js\" />\n\n        two.html:\n          <script type=\"module\" src=\"./two.js\" />\n\n        one.js:\n          import {sharedFn} from './shared';\n          import {constant} from './constants';\n          sideEffectNoop('one' + sharedFn() + constant);\n\n        two.js:\n          import {sharedFn} from './shared';\n\n          sideEffectNoop('two' + sharedFn);\n\n        shared.js:\n          import {constant} from './constants.js';\n\n          export function sharedFn() {\n            return constant;\n          }\n\n        constants.js:\n          export const constant = 'constant';\n\n        package.json:\n          {\n            \"@parcel/transformer-js\": {\n              \"unstable_inlineConstants\": true\n            },\n            \"@parcel/bundler-default\": {\n              \"minBundleSize\": 0,\n              \"minBundles\": 3\n            }\n          }\n\n        yarn.lock:`;\n\n    let b = await bundle(\n      [\n        path.join(__dirname, 'inline-constants-shared-bundles', 'one.html'),\n        path.join(__dirname, 'inline-constants-shared-bundles', 'two.html'),\n      ],\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          sourceMaps: false,\n          shouldOptimize: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['one.html'],\n      },\n      {\n        assets: ['two.html'],\n      },\n      {\n        assets: ['one.js', 'shared.js', 'constants.js'],\n      },\n      {\n        assets: ['two.js', 'shared.js', 'constants.js'],\n      },\n    ]);\n  });\n\n  it('should support inline constants with shared bundles', async () => {\n    await fsFixture(overlayFS, __dirname)`\n      inline-constants-shared-bundles\n        one.html:\n          <script type=\"module\" src=\"./one.js\" />\n\n        two.html:\n          <script type=\"module\" src=\"./two.js\" />\n\n        one.js:\n          import {sharedFn} from './shared';\n          import {constant} from './constants';\n          sideEffectNoop('one' + sharedFn() + constant);\n\n        two.js:\n          import {sharedFn} from './shared';\n\n          sideEffectNoop('two' + sharedFn);\n\n        shared.js:\n          import {constant} from './constants.js';\n\n          export function sharedFn() {\n            return constant;\n          }\n\n        constants.js:\n          export const constant = 'constant';\n\n        package.json:\n          {\n            \"@parcel/transformer-js\": {\n              \"unstable_inlineConstants\": true\n            },\n            \"@parcel/bundler-default\": {\n              \"minBundleSize\": 0\n            }\n          }\n\n        yarn.lock:`;\n\n    let b = await bundle(\n      [\n        path.join(__dirname, 'inline-constants-shared-bundles', 'one.html'),\n        path.join(__dirname, 'inline-constants-shared-bundles', 'two.html'),\n      ],\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          sourceMaps: false,\n          shouldOptimize: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['one.html'],\n      },\n      {\n        assets: ['two.html'],\n      },\n      {\n        assets: ['one.js', 'constants.js'],\n      },\n      {\n        assets: ['two.js'],\n      },\n      {\n        // shared bundle\n        assets: ['shared.js', 'constants.js'],\n      },\n    ]);\n  });\n\n  it('should support inline constants in non-splittable bundles', async () => {\n    await fsFixture(overlayFS, __dirname)`\n      inline-constants-non-splittable\n        index.js:\n          import {sharedFn} from './shared';\n          sideEffectNoop(sharedFn());\n\n        shared.js:\n          import {constant} from './constants';\n\n          export function sharedFn() {\n            return constant;\n          }\n\n        constants.js:\n          export const constant = 'constant';\n\n        package.json:\n          {\n            \"@parcel/transformer-js\": {\n              \"unstable_inlineConstants\": true\n            }\n          }\n\n        yarn.lock:`;\n\n    let b = await bundle(\n      path.join(__dirname, 'inline-constants-non-splittable/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          sourceMaps: false,\n          shouldOptimize: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['index.js', 'shared.js', 'constants.js'],\n      },\n    ]);\n  });\n\n  it('should support inline constants in async bundles', async () => {\n    await fsFixture(overlayFS, __dirname)`\n    inline-constants-async\n      index.js:\n        import('./async').then(m => console.log(m.value));\n\n      async.js:\n        export const value = 'async value';\n\n      package.json:\n        {\n          \"@parcel/transformer-js\": {\n            \"unstable_inlineConstants\": true\n          }\n        }\n\n      yarn.lock:`;\n\n    let b = await bundle(\n      path.join(__dirname, 'inline-constants-async/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          sourceMaps: false,\n          shouldOptimize: false,\n        },\n        inputFS: overlayFS,\n      },\n    );\n\n    // This will fail when the async bundle does not export it's constant\n    await run(b);\n\n    // Asset should not be inlined\n    const index = b.getBundles().find(b => b.name.startsWith('index'));\n    const contents = overlayFS.readFileSync(index.filePath, 'utf8');\n    assert(\n      !contents.includes('async value'),\n      'async value should not be inlined',\n    );\n  });\n  describe('manual shared bundles', () => {\n    const dir = path.join(__dirname, 'manual-bundle');\n\n    beforeEach(() => {\n      overlayFS.mkdirp(dir);\n    });\n\n    afterEach(() => {\n      overlayFS.rimraf(dir);\n    });\n\n    it('should support manual shared bundles via glob config option for different types', async function () {\n      await fsFixture(overlayFS, dir)`\n      yarn.lock:\n        // Required for config loading\n      package.json:\n        {\n          \"@parcel/bundler-default\": {\n            \"minBundleSize\": 0,\n            \"manualSharedBundles\": [{\n              \"name\": \"vendor\",\n              \"assets\": [\"vendor*.*\"]\n            }]\n          }\n        }\n\n      index.html:\n        <script type=\"module\" src=\"./index.js\"></script>\n\n      index.js:\n        import './vendor.css';\n        import './vendor.js';\n        import('./async');\n\n      async.js:\n        import './vendor-async.css';\n        import './vendor-async.js';\n\n      vendor.js:\n        export default 'vendor.js';\n\n      vendor-async.js:\n        export default 'vendor-async.js';\n\n      vendor.css:\n        body {\n          background: blue;\n        }\n\n      vendor-async.css:\n        body {\n          color: blue;\n        }\n        `;\n\n      let b = await bundle(path.join(dir, 'index.html'), {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          sourceMaps: false,\n          shouldOptimize: false,\n        },\n        inputFS: overlayFS,\n      });\n\n      assertBundles(b, [\n        {\n          assets: ['index.html'],\n        },\n        {\n          assets: [\n            'cacheLoader.js',\n            'css-loader.js',\n            'esmodule-helpers.js',\n            'index.js',\n          ],\n        },\n        {\n          assets: ['async.js'],\n        },\n        {\n          // Vendor MSB for CSS\n          assets: ['vendor.css', 'vendor-async.css'],\n        },\n        {\n          // Vendor MSB for JS\n          assets: ['vendor.js', 'vendor-async.js'],\n        },\n      ]);\n    });\n\n    it('should respect Asset.isBundleSplittable', async function () {\n      await fsFixture(overlayFS, dir)`\n      yarn.lock:\n        // Required for config loading\n      package.json:\n        {\n          \"@parcel/bundler-default\": {\n            \"manualSharedBundles\": [{\n              \"name\": \"manual-inline\",\n              \"assets\": [\"shared.js\"]\n            }]\n          }\n        }\n\n      .parcelrc:\n        {\n          \"extends\": \"@parcel/config-default\",\n          \"transformers\": {\n            \"*.js\": [\"./transformer.js\", \"...\"],\n          }\n        }\n\n      transformer.js:\n        import { Transformer } from '@parcel/plugin';\n\n        export default new Transformer({\n          transform({asset}) {\n            if (asset.filePath.endsWith('.html')) {\n              asset.isBundleSplittable = false;\n            }\n\n            return [asset];\n          }\n        });\n\n      index.html:\n        <script type=\"module\">\n          import shared from './shared.js';\n          sideEffectNoop(shared);\n        </script>\n        <script type=\"module\" src=\"./index.js\"></script>\n\n      index.js:\n        import shared from './shared.js';\n        sideEffectNoop(shared);\n\n      shared.js:\n        export default 'shared';\n      `;\n\n      let b = await bundle(path.join(dir, 'index.html'), {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          sourceMaps: false,\n          shouldOptimize: false,\n        },\n        inputFS: overlayFS,\n      });\n\n      assertBundles(b, [\n        {\n          assets: ['index.html'],\n        },\n        {\n          // Inline script bundle\n          assets: ['index.html', 'esmodule-helpers.js', 'shared.js'],\n        },\n        {\n          assets: ['esmodule-helpers.js', 'index.js'],\n        },\n        {\n          // MSB for JS\n          assets: ['shared.js'],\n        },\n      ]);\n\n      run(b);\n    });\n\n    it('should support manual shared bundles via glob config option for configured types', async function () {\n      await fsFixture(overlayFS, dir)`\n      yarn.lock:\n        // Required for config loading\n      package.json:\n        {\n          \"@parcel/bundler-default\": {\n            \"minBundleSize\": 0,\n            \"manualSharedBundles\": [{\n              \"name\": \"vendor\",\n              \"assets\": [\"vendor*.*\"],\n              \"types\": [\"js\"]\n            }]\n          }\n        }\n\n      index.html:\n        <script type=\"module\" src=\"./index.js\"></script>\n\n      index.js:\n        import './vendor.css';\n        import './vendor.js';\n        import('./async');\n\n      async.js:\n        import './vendor-async.css';\n        import './vendor-async.js';\n\n      vendor.js:\n        export default 'vendor.js';\n\n      vendor-async.js:\n        export default 'vendor-async.js';\n\n      vendor.css:\n        body {\n          background: blue;\n        }\n\n      vendor-async.css:\n        body {\n          color: blue;\n        }\n        `;\n\n      let b = await bundle(path.join(dir, 'index.html'), {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          sourceMaps: false,\n        },\n        inputFS: overlayFS,\n      });\n\n      assertBundles(b, [\n        {\n          assets: ['index.html'],\n        },\n        {\n          assets: [\n            'cacheLoader.js',\n            'css-loader.js',\n            'esmodule-helpers.js',\n            'index.js',\n          ],\n        },\n        {\n          assets: ['async.js'],\n        },\n        {\n          assets: ['vendor.css'],\n        },\n        {\n          assets: ['vendor-async.css'],\n        },\n        {\n          // Vendor MSB for JS\n          assets: ['vendor.js', 'vendor-async.js'],\n        },\n      ]);\n    });\n\n    it('should support manual shared bundles via parent config option', async function () {\n      await fsFixture(overlayFS, dir)`\n      yarn.lock:\n        // Required for config loading\n      package.json:\n        {\n          \"@parcel/bundler-default\": {\n            \"minBundleSize\": 0,\n            \"manualSharedBundles\": [{\n              \"name\": \"vendor\",\n              \"root\": \"math/math.js\",\n              \"assets\": [\"math/!(divide).js\"]\n            }]\n          }\n        }\n\n      index.html:\n        <script type=\"module\" src=\"./index.js\"></script>\n\n      index.js:\n        import {add, subtract, divide} from './math/math';\n        sideEffectNoop(divide(subtract(add(1, 2), 3), 4));\n\n      math\n        math.js:\n          export * from './add';\n          export * from './subtract';\n          export * from './divide';\n\n        add.js:\n          export const add = (a, b) => a + b;\n\n        subtract.js:\n          export const subtract = (a, b) => a - b;\n\n        divide.js:\n          export const divide = (a, b) => a / b;\n      `;\n\n      let b = await bundle(path.join(dir, 'index.html'), {\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          sourceMaps: false,\n        },\n        inputFS: overlayFS,\n      });\n      //assert that a,b,c are in one bundle, causeing foo and bar to overfetch, due to MSB config\n      assertBundles(b, [\n        {\n          assets: ['index.html'],\n        },\n        {\n          assets: ['esmodule-helpers.js', 'index.js', 'divide.js'],\n        },\n        {\n          // Manual shared bundle\n          assets: ['math.js', 'add.js', 'subtract.js'],\n        },\n      ]);\n\n      let targetDistDir = normalizePath(path.join(__dirname, '../dist'));\n      let hashedIdWithMSB = hashString('bundle:' + 'vendor,js' + targetDistDir);\n      assert(\n        b.getBundles().find(b => b.id == hashedIdWithMSB),\n        'MSB id does not match expected',\n      );\n    });\n\n    it('should support manual shared bundles with constants module', async function () {\n      await fsFixture(overlayFS, dir)`\n      yarn.lock:\n        // Required for config loading\n      package.json:\n        {\n          \"@parcel/transformer-js\" : {\n            \"unstable_inlineConstants\": true\n          },\n          \"@parcel/bundler-default\": {\n            \"minBundleSize\": 0,\n            \"manualSharedBundles\": [{\n              \"name\": \"vendor\",\n              \"assets\": [\"vendor*.*\"],\n              \"types\": [\"js\"]\n            }]\n          },\n          \"sideEffects\": [\"index.js\"]\n        }\n\n      vendor-constants.js:\n        export const a = 'hello';\n\n      index.html:\n        <script type=\"module\" src=\"./index.js\"></script>\n\n      index.js:\n        import {a} from './vendor-constants.js';\n        import('./async').then((res) => sideEffectNoop(res));\n        sideEffectNoop(a);\n\n      async.js:\n        import v from './vendor-async.js';\n        export default 'async' + v;\n\n      vendor-async.js:\n        import {a} from './vendor-constants.js';\n        export default 'vendor-async.js' + a;\n        `;\n\n      let b = await bundle(path.join(dir, 'index.html'), {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          sourceMaps: false,\n          shouldOptimize: false,\n        },\n        inputFS: overlayFS,\n      });\n\n      assertBundles(b, [\n        {\n          assets: ['index.html'],\n        },\n        {\n          assets: ['index.js', 'vendor-constants.js'],\n        },\n        {\n          assets: ['async.js'],\n        },\n        {\n          // Vendor MSB for JS\n          assets: ['vendor-async.js', 'vendor-constants.js'],\n        },\n      ]);\n    });\n\n    it('should support manual shared bundles with internalized assets', async function () {\n      await fsFixture(overlayFS, dir)`\n      yarn.lock:\n        // Required for config loading\n      package.json:\n        {\n          \"@parcel/transformer-js\" : {\n            \"unstable_inlineConstants\": true\n          },\n          \"@parcel/bundler-default\": {\n            \"minBundleSize\": 0,\n            \"manualSharedBundles\": [{\n              \"name\": \"vendor\",\n              \"root\": \"manual.js\",\n              \"assets\": [\"**/*\"],\n              \"types\": [\"js\"]\n            }]\n          }\n        }\n\n      index.html:\n        <script type=\"module\" src=\"./index.js\"></script>\n\n      index.js:\n        import a from './manual.js';\n\n      manual.js:\n        import v from './vendor-async.js';\n        import n from './vendor';\n        export default 'async' + v;\n\n      vendor.js:\n        export const n = () => import('./vendor-async');\n\n      vendor-async.js:\n        export default 'vendor-async.js';\n      `;\n\n      let b = await bundle(path.join(dir, 'index.html'), {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          sourceMaps: false,\n          shouldOptimize: false,\n        },\n        inputFS: overlayFS,\n      });\n\n      assertBundles(b, [\n        {\n          assets: ['index.html'],\n        },\n        {\n          assets: ['esmodule-helpers.js', 'index.js'],\n        },\n        {\n          // Vendor MSB for JS\n          assets: ['manual.js', 'vendor.js', 'vendor-async.js'],\n        },\n      ]);\n\n      let targetDistDir = normalizePath(path.join(__dirname, '../dist'));\n      let hashedIdWithMSB = hashString('bundle:' + 'vendorjs' + targetDistDir);\n      assert(\n        b.getBundles().find(b => b.id == hashedIdWithMSB),\n        'MSB id does not match expected',\n      );\n\n      await run(b);\n    });\n\n    it('should support consistently splitting manual shared bundles', async function () {\n      await fsFixture(overlayFS, dir)`\n        yarn.lock:\n          // Required for config loading\n        package.json:\n          {\n            \"@parcel/bundler-default\": {\n              \"minBundleSize\": 0,\n              \"manualSharedBundles\": [{\n                \"name\": \"vendor\",\n                \"root\": \"vendor.js\",\n                \"assets\": [\"**/*\"],\n                \"split\": 3\n              }]\n            }\n          }\n\n        index.html:\n          <script type=\"module\" src=\"./index.js\"></script>\n\n        index.js:\n          import * as vendor from './vendor';\n          sideEffectNoop(vendor);\n\n        vendor.js:\n          export * from './a';\n          export * from './b';\n          export * from './c';\n          export * from './d';\n          export * from './e';\n          export * from './f';\n          export * from './g';\n          export * from './h';\n          export * from './i';\n          export * from './j';\n\n        a.js:\n          export const a = 'a';\n        b.js:\n          export const b = 'b';\n        c.js:\n          export const c = 'c';\n        d.js:\n          export const d = 'd';\n        e.js:\n          export const e = 'e';\n        f.js:\n          export const f = 'f';\n        g.js:\n          export const g = 'g';\n        h.js:\n          export const h = 'h';\n        i.js:\n          export const i = 'i';\n        j.js:\n          export const j = 'j';\n      `;\n\n      let b = await bundle(path.join(dir, 'index.html'), {\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          shouldOptimize: false,\n          sourceMaps: false,\n        },\n        inputFS: overlayFS,\n      });\n\n      assertBundles(b, [\n        {\n          assets: ['index.html'],\n        },\n        {\n          assets: ['a.js', 'b.js', 'c.js', 'h.js', 'j.js'],\n        },\n        {\n          assets: ['vendor.js', 'd.js', 'i.js'],\n        },\n        {\n          assets: ['e.js', 'f.js', 'g.js'],\n        },\n        {\n          assets: ['esmodule-helpers.js', 'index.js'],\n        },\n      ]);\n    });\n\n    it('should support globs matching outside of the project root', async function () {\n      const rootDir = path.join(dir, 'root');\n      overlayFS.mkdirp(rootDir);\n      await fsFixture(overlayFS, rootDir)`\n      yarn.lock:\n        // Required for config loading\n\n      package.json:\n        {\n          \"@parcel/bundler-default\": {\n            \"minBundleSize\": 0,\n            \"manualSharedBundles\": [{\n              \"name\": \"vendor\",\n              \"root\": \"vendor.js\",\n              \"assets\": [\n                \"in-project.js\",\n                \"../outside-project.js\"\n              ]\n            }]\n          }\n        }\n\n      index.html:\n        <script type=\"module\" src=\"./index.js\"></script>\n\n      in-project.js:\n        export default 'in-project';\n\n      vendor.js:\n        export * from './in-project';\n        export * from '../outside-project';\n\n      index.js:\n        import * as vendor from './vendor';\n\n        console.log(vendor.inProj);\n        console.log(vendor.outProj);`;\n\n      await fsFixture(overlayFS, dir)`\n      outside-project.js:\n        export default 'outside-project';`;\n\n      let b = await bundle(path.join(rootDir, 'index.html'), {\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          shouldOptimize: false,\n          sourceMaps: false,\n        },\n        inputFS: overlayFS,\n      });\n\n      assertBundles(b, [\n        {assets: ['index.html']},\n        {assets: ['in-project.js', 'outside-project.js']},\n        {assets: ['esmodule-helpers.js', 'index.js', 'vendor.js']},\n      ]);\n    });\n  });\n\n  it('should reuse type change bundles from parent bundle groups', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      reuse-type-change-bundles\n        index.html:\n          <link rel=\"stylesheet\" type=\"text/css\" href=\"./style.css\">\n          <script src=\"./index.js\" type=\"module\"></script>\n\n        style.css:\n          @import \"common.css\";\n          body { color: red }\n\n        common.css:\n          .common { color: green }\n\n        index.js:\n          import('./async');\n\n        async.js:\n          import './common.css';\n    `;\n\n    let b = await bundle(\n      path.join(__dirname, 'reuse-type-change-bundles', 'index.html'),\n      {\n        mode: 'production',\n        inputFS: overlayFS,\n      },\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['index.html'],\n      },\n      {\n        assets: ['style.css', 'common.css'],\n      },\n      {\n        assets: ['index.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/cache.js",
    "content": "// @flow\nimport type {InitialParcelOptions, BuildSuccessEvent} from '@parcel/types';\nimport assert from 'assert';\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundler,\n  run,\n  runBundle as runSingleBundle,\n  overlayFS,\n  outputFS,\n  inputFS,\n  ncp,\n  workerFarm,\n  mergeParcelOptions,\n  sleep,\n  getNextBuild,\n  distDir,\n  getParcelOptions,\n  assertNoFilePathInCache,\n  findAsset,\n  bundle,\n  fsFixture,\n} from '@parcel/test-utils';\nimport {md} from '@parcel/diagnostic';\nimport fs from 'fs';\nimport {NodePackageManager} from '@parcel/package-manager';\nimport {createWorkerFarm} from '@parcel/core';\nimport resolveOptions from '@parcel/core/src/resolveOptions';\nimport logger from '@parcel/logger';\nimport sinon from 'sinon';\nimport {version} from '@parcel/core/package.json';\nimport {deserialize} from '@parcel/core/src/serializer';\nimport {hashString} from '@parcel/rust';\n\nlet inputDir: string;\nlet packageManager = new NodePackageManager(inputFS, '/');\n\nfunction getEntries(entries = 'src/index.js') {\n  return (Array.isArray(entries) ? entries : [entries]).map(entry =>\n    path.resolve(inputDir, entry),\n  );\n}\n\nfunction getOptions(opts) {\n  return mergeParcelOptions(\n    {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n    },\n    opts,\n  );\n}\n\nfunction runBundle(entries = 'src/index.js', opts) {\n  return bundler(getEntries(entries), getOptions(opts)).run();\n}\n\ntype UpdateFn = BuildSuccessEvent =>\n  | ?InitialParcelOptions\n  | Promise<?InitialParcelOptions>;\ntype TestConfig = {|\n  ...InitialParcelOptions,\n  entries?: Array<string>,\n  setup?: () => void | Promise<void>,\n  update: UpdateFn,\n|};\n\nasync function testCache(update: UpdateFn | TestConfig, integration) {\n  await overlayFS.rimraf(path.join(__dirname, '/input'));\n  await ncp(\n    path.join(__dirname, '/integration', integration ?? 'cache'),\n    path.join(inputDir),\n  );\n\n  let entries;\n  let options: ?InitialParcelOptions;\n  if (typeof update === 'object') {\n    let setup;\n    ({entries, setup, update, ...options} = update);\n\n    if (setup) {\n      await setup();\n    }\n  }\n\n  let resolvedOptions = await resolveOptions(\n    getParcelOptions(getEntries(entries), getOptions(options)),\n  );\n\n  let b = await runBundle(entries, options);\n\n  await assertNoFilePathInCache(\n    resolvedOptions.outputFS,\n    resolvedOptions.cacheDir,\n    resolvedOptions.projectRoot,\n  );\n\n  // update\n  let newOptions = await update(b);\n  options = mergeParcelOptions(options || {}, newOptions);\n\n  // Run cached build\n  b = await runBundle(entries, options);\n\n  resolvedOptions = await resolveOptions(\n    getParcelOptions(getEntries(entries), getOptions(options)),\n  );\n  await assertNoFilePathInCache(\n    resolvedOptions.outputFS,\n    resolvedOptions.cacheDir,\n    resolvedOptions.projectRoot,\n  );\n\n  return b;\n}\n\ndescribe('cache', function () {\n  before(async () => {\n    await inputFS.rimraf(path.join(__dirname, 'input'));\n  });\n\n  beforeEach(() => {\n    inputDir = path.join(\n      __dirname,\n      '/input',\n      Math.random().toString(36).slice(2),\n    );\n  });\n\n  it('should support updating a JS file', async function () {\n    let b = await testCache(async b => {\n      assert.equal(await run(b.bundleGraph), 4);\n      await overlayFS.writeFile(\n        path.join(inputDir, 'src/nested/test.js'),\n        'export default 4',\n      );\n    });\n\n    assert.equal(await run(b.bundleGraph), 6);\n  });\n\n  it('should support adding a dependency', async function () {\n    let b = await testCache(async b => {\n      assert.equal(await run(b.bundleGraph), 4);\n      await overlayFS.writeFile(\n        path.join(inputDir, 'src/nested/foo.js'),\n        'export default 6',\n      );\n      await overlayFS.writeFile(\n        path.join(inputDir, 'src/nested/test.js'),\n        'export {default} from \"./foo\";',\n      );\n    });\n\n    assert.equal(await run(b.bundleGraph), 8);\n  });\n\n  it('should support adding a dependency which changes the referenced bundles of a parent bundle', async function () {\n    async function exec(bundleGraph, bundle) {\n      let calls = [];\n      await runSingleBundle(bundleGraph, nullthrows(bundle), {\n        call(v) {\n          calls.push(v);\n        },\n      });\n      return calls;\n    }\n\n    let b = await testCache(\n      {\n        entries: ['a.html', 'b.html'],\n        mode: 'production',\n        update: async b => {\n          let html = b.bundleGraph.getBundles().filter(b => b.type === 'html');\n          assert.deepEqual(await exec(b.bundleGraph, html[0]), ['a']);\n          assert.deepEqual(await exec(b.bundleGraph, html[1]), ['b']);\n          await overlayFS.writeFile(\n            path.join(inputDir, 'a.js'),\n            'import \"./c.js\"; call(\"a\");',\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'b.js'),\n            'import \"./c.js\"; call(\"b\");',\n          );\n        },\n      },\n      'cache-add-dep-referenced',\n    );\n\n    let html = b.bundleGraph.getBundles().filter(b => b.type === 'html');\n    assert.deepEqual(await exec(b.bundleGraph, html[0]), ['c', 'a']);\n    assert.deepEqual(await exec(b.bundleGraph, html[1]), ['c', 'b']);\n  });\n\n  it('should error when deleting a file', async function () {\n    // $FlowFixMe\n    await assert.rejects(\n      async () => {\n        await testCache(async () => {\n          await overlayFS.unlink(path.join(inputDir, 'src/nested/test.js'));\n        });\n      },\n      {message: \"Failed to resolve './nested/test' from './src/index.js'\"},\n    );\n  });\n\n  it('should error when starting parcel from a broken state with no changes', async function () {\n    // $FlowFixMe\n    await assert.rejects(async () => {\n      await testCache(async () => {\n        await overlayFS.unlink(path.join(inputDir, 'src/nested/test.js'));\n      });\n    });\n\n    // Do a third build from a failed state with no changes\n    // $FlowFixMe\n    await assert.rejects(\n      async () => {\n        await runBundle();\n      },\n      {message: \"Failed to resolve './nested/test' from './src/index.js'\"},\n    );\n  });\n\n  describe('babel', function () {\n    let json = config => JSON.stringify(config);\n    let cjs = config => `module.exports = ${JSON.stringify(config)}`;\n    // TODO: not sure how to invalidate the ESM cache in node...\n    // let mjs = (config) => `export default ${JSON.stringify(config)}`;\n    let configs = [\n      {name: '.babelrc', formatter: json, nesting: true},\n      {name: '.babelrc.json', formatter: json, nesting: true},\n      {name: '.babelrc.js', formatter: cjs, nesting: true},\n      {name: '.babelrc.cjs', formatter: cjs, nesting: true},\n      // {name: '.babelrc.mjs', formatter: mjs, nesting: true},\n      {name: 'babel.config.json', formatter: json, nesting: false},\n      {name: 'babel.config.js', formatter: cjs, nesting: false},\n      {name: 'babel.config.cjs', formatter: cjs, nesting: false},\n      // {name: 'babel.config.mjs', formatter: mjs, nesting: false},\n    ];\n\n    before(async () => {\n      // Invalidate @babel/core before any of these tests run so that it is required\n      // through NodePackageManager and we are able to track module children.\n      // Otherwise, it will already have been loaded by @babel/register.\n      await workerFarm.callAllWorkers('invalidateRequireCache', [\n        packageManager.resolveSync('@babel/core', __filename)?.resolved,\n      ]);\n    });\n\n    for (let {name, formatter, nesting} of configs) {\n      describe(name, function () {\n        it(`should support adding a ${name}`, async function () {\n          let b = await testCache({\n            // Babel's config loader only works with the node filesystem\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await inputFS.mkdirp(inputDir);\n              await inputFS.ncp(\n                path.join(__dirname, '/integration/cache'),\n                inputDir,\n              );\n            },\n            async update(b) {\n              assert.equal(await run(b.bundleGraph), 4);\n\n              let contents = await overlayFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(\n                contents.includes('class Test'),\n                'class should not be transpiled',\n              );\n\n              await inputFS.writeFile(\n                path.join(inputDir, name),\n                formatter({\n                  presets: ['@babel/preset-env'],\n                }),\n              );\n\n              await sleep(100);\n            },\n          });\n\n          assert.equal(await run(b.bundleGraph), 4);\n\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            !contents.includes('class Test'),\n            'class should be transpiled',\n          );\n        });\n\n        it(`should support updating a ${name}`, async function () {\n          let b = await testCache({\n            // Babel's config loader only works with the node filesystem\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await inputFS.mkdirp(inputDir);\n              await inputFS.ncp(\n                path.join(__dirname, '/integration/cache'),\n                inputDir,\n              );\n              await inputFS.writeFile(\n                path.join(inputDir, name),\n                formatter({\n                  presets: [\n                    ['@babel/preset-env', {targets: {esmodules: true}}],\n                  ],\n                }),\n              );\n            },\n            async update(b) {\n              let contents = await overlayFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(\n                contents.includes('class Test'),\n                'class should not be transpiled',\n              );\n\n              await inputFS.writeFile(\n                path.join(inputDir, name),\n                formatter({\n                  presets: ['@babel/preset-env'],\n                }),\n              );\n\n              await sleep(100);\n            },\n          });\n\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            !contents.includes('class Test'),\n            'class should be transpiled',\n          );\n        });\n\n        it(`should support deleting a ${name}`, async function () {\n          let b = await testCache({\n            // Babel's config loader only works with the node filesystem\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await inputFS.mkdirp(inputDir);\n              await inputFS.ncp(\n                path.join(__dirname, '/integration/cache'),\n                inputDir,\n              );\n              await inputFS.writeFile(\n                path.join(inputDir, name),\n                formatter({\n                  presets: ['@babel/preset-env'],\n                }),\n              );\n            },\n            async update(b) {\n              let contents = await overlayFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(\n                !contents.includes('class Test'),\n                'class should be transpiled',\n              );\n\n              await inputFS.unlink(path.join(inputDir, name));\n              await sleep(100);\n            },\n          });\n\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            contents.includes('class Test'),\n            'class should not be transpiled',\n          );\n        });\n\n        it(`should support updating an extended ${name}`, async function () {\n          let extendedName = '.babelrc-extended' + path.extname(name);\n          let b = await testCache({\n            // Babel's config loader only works with the node filesystem\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await inputFS.mkdirp(inputDir);\n              await inputFS.ncp(\n                path.join(__dirname, '/integration/cache'),\n                inputDir,\n              );\n              await inputFS.writeFile(\n                path.join(inputDir, extendedName),\n                formatter({\n                  presets: [\n                    ['@babel/preset-env', {targets: {esmodules: true}}],\n                  ],\n                }),\n              );\n              await inputFS.writeFile(\n                path.join(inputDir, name),\n                formatter({\n                  extends: `./${extendedName}`,\n                }),\n              );\n            },\n            async update(b) {\n              let contents = await overlayFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(\n                contents.includes('class Test'),\n                'class should not be transpiled',\n              );\n\n              await inputFS.writeFile(\n                path.join(inputDir, extendedName),\n                formatter({\n                  presets: ['@babel/preset-env'],\n                }),\n              );\n\n              await sleep(100);\n            },\n          });\n\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            !contents.includes('class Test'),\n            'class should be transpiled',\n          );\n        });\n\n        if (nesting) {\n          it(`should support adding a nested ${name}`, async function () {\n            let b = await testCache({\n              // Babel's config loader only works with the node filesystem\n              inputFS,\n              outputFS: inputFS,\n              async setup() {\n                await inputFS.mkdirp(inputDir);\n                await inputFS.ncp(\n                  path.join(__dirname, '/integration/cache'),\n                  inputDir,\n                );\n              },\n              async update(b) {\n                assert.equal(await run(b.bundleGraph), 4);\n\n                let contents = await overlayFS.readFile(\n                  b.bundleGraph.getBundles()[0].filePath,\n                  'utf8',\n                );\n                assert(\n                  contents.includes('class Test'),\n                  'class should not be transpiled',\n                );\n                assert(\n                  contents.includes('class Result'),\n                  'class should not be transpiled',\n                );\n\n                await inputFS.writeFile(\n                  path.join(inputDir, `src/nested/${name}`),\n                  formatter({\n                    presets: ['@babel/preset-env'],\n                  }),\n                );\n\n                await sleep(100);\n              },\n            });\n\n            assert.equal(await run(b.bundleGraph), 4);\n\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              !contents.includes('class Test'),\n              'class should be transpiled',\n            );\n            assert(\n              contents.includes('class Result'),\n              'class should not be transpiled',\n            );\n          });\n\n          it(`should support updating a nested ${name}`, async function () {\n            let b = await testCache({\n              // Babel's config loader only works with the node filesystem\n              inputFS,\n              outputFS: inputFS,\n              async setup() {\n                await inputFS.mkdirp(inputDir);\n                await inputFS.ncp(\n                  path.join(__dirname, '/integration/cache'),\n                  inputDir,\n                );\n                await inputFS.writeFile(\n                  path.join(inputDir, `src/nested/${name}`),\n                  formatter({\n                    presets: [\n                      ['@babel/preset-env', {targets: {esmodules: true}}],\n                    ],\n                  }),\n                );\n              },\n              async update(b) {\n                let contents = await overlayFS.readFile(\n                  b.bundleGraph.getBundles()[0].filePath,\n                  'utf8',\n                );\n                assert(\n                  contents.includes('class Test'),\n                  'class should not be transpiled',\n                );\n                assert(\n                  contents.includes('class Result'),\n                  'class should not be transpiled',\n                );\n\n                await inputFS.writeFile(\n                  path.join(inputDir, `src/nested/${name}`),\n                  formatter({\n                    presets: ['@babel/preset-env'],\n                  }),\n                );\n\n                await sleep(100);\n              },\n            });\n\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              !contents.includes('class Test'),\n              'class should be transpiled',\n            );\n            assert(\n              contents.includes('class Result'),\n              'class should not be transpiled',\n            );\n          });\n\n          it(`should support deleting a nested ${name}`, async function () {\n            let b = await testCache({\n              // Babel's config loader only works with the node filesystem\n              inputFS,\n              outputFS: inputFS,\n              async setup() {\n                await inputFS.mkdirp(inputDir);\n                await inputFS.ncp(\n                  path.join(__dirname, '/integration/cache'),\n                  inputDir,\n                );\n                await inputFS.writeFile(\n                  path.join(inputDir, `src/nested/${name}`),\n                  formatter({\n                    presets: ['@babel/preset-env'],\n                  }),\n                );\n              },\n              async update(b) {\n                let contents = await overlayFS.readFile(\n                  b.bundleGraph.getBundles()[0].filePath,\n                  'utf8',\n                );\n                assert(\n                  !contents.includes('class Test'),\n                  'class should be transpiled',\n                );\n                assert(\n                  contents.includes('class Result'),\n                  'class should not be transpiled',\n                );\n\n                await inputFS.unlink(path.join(inputDir, `src/nested/${name}`));\n                await sleep(100);\n              },\n            });\n\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              contents.includes('class Test'),\n              'class should not be transpiled',\n            );\n            assert(\n              contents.includes('class Result'),\n              'class should not be transpiled',\n            );\n          });\n        }\n      });\n    }\n\n    describe('.babelignore', function () {\n      it('should support adding a .babelignore', async function () {\n        let b = await testCache({\n          // Babel's config loader only works with the node filesystem\n          inputFS,\n          outputFS: inputFS,\n          async setup() {\n            await inputFS.mkdirp(inputDir);\n            await inputFS.ncp(\n              path.join(__dirname, '/integration/cache'),\n              inputDir,\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, '.babelrc'),\n              JSON.stringify({\n                presets: ['@babel/preset-env'],\n              }),\n            );\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              !contents.includes('class Test'),\n              'class should be transpiled',\n            );\n            assert(\n              !contents.includes('class Result'),\n              'class should be transpiled',\n            );\n\n            await inputFS.writeFile(\n              path.join(inputDir, '.babelignore'),\n              'src/nested',\n            );\n\n            await sleep(100);\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(\n          contents.includes('class Test'),\n          'class should not be transpiled',\n        );\n        assert(\n          !contents.includes('class Result'),\n          'class should be transpiled',\n        );\n      });\n\n      it('should support updating a .babelignore', async function () {\n        let b = await testCache({\n          // Babel's config loader only works with the node filesystem\n          inputFS,\n          outputFS: inputFS,\n          async setup() {\n            await inputFS.mkdirp(inputDir);\n            await inputFS.ncp(\n              path.join(__dirname, '/integration/cache'),\n              inputDir,\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, '.babelrc'),\n              JSON.stringify({\n                presets: ['@babel/preset-env'],\n              }),\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, '.babelignore'),\n              'src/nested',\n            );\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              contents.includes('class Test'),\n              'class should not be transpiled',\n            );\n            assert(\n              !contents.includes('class Result'),\n              'class should be transpiled',\n            );\n\n            await inputFS.writeFile(path.join(inputDir, '.babelignore'), 'src');\n            await sleep(100);\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(\n          contents.includes('class Test'),\n          'class should not be transpiled',\n        );\n        assert(\n          contents.includes('class Result'),\n          'class should not be transpiled',\n        );\n      });\n\n      it('should support deleting a .babelignore', async function () {\n        let b = await testCache({\n          // Babel's config loader only works with the node filesystem\n          inputFS,\n          outputFS: inputFS,\n          async setup() {\n            await inputFS.mkdirp(inputDir);\n            await inputFS.ncp(\n              path.join(__dirname, '/integration/cache'),\n              inputDir,\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, '.babelrc'),\n              JSON.stringify({\n                presets: ['@babel/preset-env'],\n              }),\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, '.babelignore'),\n              'src/nested',\n            );\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              contents.includes('class Test'),\n              'class should not be transpiled',\n            );\n            assert(\n              !contents.includes('class Result'),\n              'class should be transpiled',\n            );\n\n            await inputFS.unlink(path.join(inputDir, '.babelignore'));\n            await sleep(100);\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(!contents.includes('class Test'), 'class should be transpiled');\n        assert(\n          !contents.includes('class Result'),\n          'class should be transpiled',\n        );\n      });\n    });\n\n    describe('plugins', function () {\n      it('should invalidate when plugins are updated', async function () {\n        let b = await testCache({\n          // Babel's config loader only works with the node filesystem\n          inputFS,\n          outputFS: inputFS,\n          async setup() {\n            await inputFS.mkdirp(inputDir);\n            await inputFS.ncp(\n              path.join(__dirname, '/integration/cache'),\n              inputDir,\n            );\n            await inputFS.mkdirp(\n              path.join(inputDir, 'node_modules/babel-plugin-dummy'),\n            );\n            await inputFS.writeFile(\n              path.join(\n                inputDir,\n                '/node_modules/babel-plugin-dummy/package.json',\n              ),\n              JSON.stringify({\n                name: 'babel-plugin-dummy',\n                version: '1.0.0',\n              }),\n            );\n            await inputFS.copyFile(\n              path.join(\n                __dirname,\n                '/integration/babelrc-custom/babel-plugin-dummy.js',\n              ),\n              path.join(inputDir, '/node_modules/babel-plugin-dummy/index.js'),\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, '.babelrc'),\n              JSON.stringify({\n                plugins: ['babel-plugin-dummy'],\n              }),\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, 'src/index.js'),\n              'console.log(\"REPLACE_ME\")',\n            );\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              contents.includes('hello there'),\n              'string should be replaced',\n            );\n\n            let plugin = path.join(\n              inputDir,\n              'node_modules/babel-plugin-dummy/index.js',\n            );\n            let source = await inputFS.readFile(plugin, 'utf8');\n            await inputFS.writeFile(\n              plugin,\n              source.replace('hello there', 'replaced'),\n            );\n\n            await sleep(100);\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(contents.includes('replaced'), 'string should be replaced');\n      });\n\n      it('should invalidate when there are relative plugins', async function () {\n        let b = await testCache({\n          // Babel's config loader only works with the node filesystem\n          inputFS,\n          outputFS: inputFS,\n          async setup() {\n            await inputFS.mkdirp(inputDir);\n            await inputFS.ncp(\n              path.join(__dirname, '/integration/cache'),\n              inputDir,\n            );\n            await inputFS.copyFile(\n              path.join(\n                __dirname,\n                '/integration/babelrc-custom/babel-plugin-dummy.js',\n              ),\n              path.join(inputDir, 'babel-plugin-dummy.js'),\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, '.babelrc'),\n              JSON.stringify({\n                plugins: ['./babel-plugin-dummy'],\n              }),\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, 'src/index.js'),\n              'console.log(\"REPLACE_ME\")',\n            );\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              contents.includes('hello there'),\n              'string should be replaced',\n            );\n\n            let plugin = path.join(inputDir, 'babel-plugin-dummy.js');\n            let source = await inputFS.readFile(plugin, 'utf8');\n            await inputFS.writeFile(\n              plugin,\n              source.replace('hello there', 'replaced'),\n            );\n\n            await sleep(100);\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(contents.includes('replaced'), 'string should be replaced');\n      });\n\n      it('should invalidate when there are symlinked plugins', async function () {\n        // Symlinks don't work consistently on windows. Skip this test.\n        if (process.platform === 'win32') {\n          this.skip();\n          return;\n        }\n\n        let b = await testCache({\n          // Babel's config loader only works with the node filesystem\n          inputFS,\n          outputFS: inputFS,\n          async setup() {\n            await inputFS.mkdirp(inputDir);\n            await inputFS.ncp(\n              path.join(__dirname, '/integration/cache'),\n              inputDir,\n            );\n            await inputFS.mkdirp(\n              path.join(inputDir, 'packages/babel-plugin-dummy'),\n            );\n            await inputFS.mkdirp(path.join(inputDir, 'node_modules'));\n            fs.symlinkSync(\n              path.join(inputDir, 'packages/babel-plugin-dummy'),\n              path.join(inputDir, 'node_modules/babel-plugin-dummy'),\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, 'packages/babel-plugin-dummy/package.json'),\n              JSON.stringify({\n                name: 'babel-plugin-dummy',\n                version: '1.0.0',\n              }),\n            );\n            await inputFS.copyFile(\n              path.join(\n                __dirname,\n                '/integration/babelrc-custom/babel-plugin-dummy.js',\n              ),\n              path.join(inputDir, 'packages/babel-plugin-dummy/index.js'),\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, '.babelrc'),\n              JSON.stringify({\n                plugins: ['babel-plugin-dummy'],\n              }),\n            );\n            await inputFS.writeFile(\n              path.join(inputDir, 'src/index.js'),\n              'console.log(\"REPLACE_ME\")',\n            );\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              contents.includes('hello there'),\n              'string should be replaced',\n            );\n\n            let plugin = path.join(\n              inputDir,\n              'packages/babel-plugin-dummy/index.js',\n            );\n            let source = await inputFS.readFile(plugin, 'utf8');\n            await inputFS.writeFile(\n              plugin,\n              source.replace('hello there', 'replaced'),\n            );\n\n            await sleep(100);\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(contents.includes('replaced'), 'string should be replaced');\n      });\n    });\n  });\n\n  describe('parcel config', function () {\n    it('should support adding a .parcelrc', async function () {\n      let b = await testCache(async b => {\n        assert.equal(await run(b.bundleGraph), 4);\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(!contents.includes('TRANSFORMED CODE'));\n\n        await overlayFS.writeFile(\n          path.join(inputDir, '.parcelrc'),\n          JSON.stringify({\n            extends: '@parcel/config-default',\n            transformers: {\n              '*.js': ['parcel-transformer-mock'],\n            },\n          }),\n        );\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('TRANSFORMED CODE'));\n    });\n\n    it('should support updating a .parcelrc', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                '*.js': ['parcel-transformer-mock'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes('TRANSFORMED CODE'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n            }),\n          );\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('TRANSFORMED CODE'));\n\n      assert.equal(await run(b.bundleGraph), 4);\n    });\n\n    it('should support updating an extended .parcelrc', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc-extended'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                '*.js': ['parcel-transformer-mock'],\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: './.parcelrc-extended',\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes('TRANSFORMED CODE'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc-extended'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n            }),\n          );\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('TRANSFORMED CODE'));\n\n      assert.equal(await run(b.bundleGraph), 4);\n    });\n\n    it('should error when deleting an extended parcelrc', async function () {\n      // $FlowFixMe\n      await assert.rejects(\n        async () => {\n          await testCache({\n            async setup() {\n              await overlayFS.writeFile(\n                path.join(inputDir, '.parcelrc-extended'),\n                JSON.stringify({\n                  extends: '@parcel/config-default',\n                  transformers: {\n                    '*.js': ['parcel-transformer-mock'],\n                  },\n                }),\n              );\n\n              await overlayFS.writeFile(\n                path.join(inputDir, '.parcelrc'),\n                JSON.stringify({\n                  extends: './.parcelrc-extended',\n                }),\n              );\n            },\n            async update(b) {\n              let contents = await overlayFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(contents.includes('TRANSFORMED CODE'));\n\n              await overlayFS.unlink(path.join(inputDir, '.parcelrc-extended'));\n            },\n          });\n        },\n        {message: 'Cannot find extended parcel config'},\n      );\n    });\n\n    it('should support deleting a .parcelrc', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                '*.js': ['parcel-transformer-mock'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes('TRANSFORMED CODE'));\n\n          await overlayFS.unlink(path.join(inputDir, '.parcelrc'));\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('TRANSFORMED CODE'));\n\n      assert.equal(await run(b.bundleGraph), 4);\n    });\n  });\n\n  describe('transformations', function () {\n    it('should invalidate when included files changes', async function () {\n      let b = await testCache({\n        // TODO: update when the fs transform supports the MemoryFS\n        inputFS,\n        outputFS: inputFS,\n        async setup() {\n          await inputFS.mkdirp(inputDir);\n          await inputFS.ncp(\n            path.join(__dirname, '/integration/cache'),\n            inputDir,\n          );\n          await inputFS.writeFile(path.join(inputDir, 'src/test.txt'), 'hi');\n\n          await inputFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"fs\").readFileSync(__dirname + \"/test.txt\", \"utf8\")',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 'hi');\n\n          await inputFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'updated',\n          );\n\n          await sleep(100);\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 'updated');\n    });\n\n    it('should not invalidate when a set environment variable does not change', async () => {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(path.join(inputDir, '.env'), 'TEST=hi');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = process.env.TEST',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 'hi');\n\n          await overlayFS.writeFile(path.join(inputDir, '.env'), 'TEST=hi');\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 'hi');\n      assert.equal(b.changedAssets.size, 0);\n    });\n\n    it('should not invalidate when an environment variable remains unset', async () => {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = process.env.TEST',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), undefined);\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), undefined);\n      assert.equal(b.changedAssets.size, 0);\n    });\n\n    it('should invalidate when an environment variable becomes set', async () => {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = process.env.TEST',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), undefined);\n          await overlayFS.writeFile(path.join(inputDir, '.env'), 'TEST=hi');\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 'hi');\n    });\n\n    it('should invalidate when an environment variable becomes unset', async () => {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = process.env.TEST',\n          );\n          await overlayFS.writeFile(path.join(inputDir, '.env'), 'TEST=hi');\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 'hi');\n          await overlayFS.writeFile(path.join(inputDir, '.env'), '');\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), undefined);\n    });\n\n    it('should invalidate when environment variables change', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(path.join(inputDir, '.env'), 'TEST=hi');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = process.env.TEST',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 'hi');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.env'),\n            'TEST=updated',\n          );\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 'updated');\n    });\n\n    describe.skip('config keys', () => {\n      // TODO: this test fails because the resolver also depends on the package.json\n      it.skip(`should not invalidate when package.json config keys don't change`, async function () {\n        let b = await testCache({\n          featureFlags: {\n            exampleFeature: false,\n          },\n          async setup() {\n            let pkgFile = path.join(inputDir, 'package.json');\n            let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n            await overlayFS.writeFile(\n              pkgFile,\n              JSON.stringify({\n                ...pkg,\n                '@parcel/transformer-js': {\n                  inlineEnvironment: false,\n                  inlineFS: false,\n                },\n              }),\n            );\n\n            await overlayFS.writeFile(\n              path.join(inputDir, '.parcelrc'),\n              JSON.stringify({\n                extends: '@parcel/config-default',\n                transformers: {\n                  // Remove react-refresh transformer and babel so we don't get extra config deps\n                  '*.js': ['@parcel/transformer-js'],\n                },\n              }),\n            );\n\n            await overlayFS.writeFile(path.join(inputDir, '.env'), 'TEST=hi');\n\n            await overlayFS.writeFile(\n              path.join(inputDir, 'src/index.js'),\n              'module.exports = process.env.TEST || \"default\"',\n            );\n            await overlayFS.writeFile(\n              path.join(inputDir, 'src/package.json'),\n              '{}',\n            );\n          },\n          async update() {\n            let pkgFile = path.join(inputDir, 'package.json');\n            let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n            await overlayFS.writeFile(\n              pkgFile,\n              JSON.stringify({\n                ...pkg,\n                inlineFS: false,\n                inlineEnvironment: false,\n              }),\n            );\n          },\n        });\n\n        assert.equal(await run(b.bundleGraph), 'default');\n        assert.equal(b.changedAssets.size, 0);\n      });\n\n      it('should invalidate when package.json config keys change', async function () {\n        let b = await testCache({\n          featureFlags: {\n            exampleFeature: false,\n          },\n          async setup() {\n            let pkgFile = path.join(inputDir, 'package.json');\n            let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n            await overlayFS.writeFile(\n              pkgFile,\n              JSON.stringify({\n                ...pkg,\n                '@parcel/transformer-js': {\n                  inlineEnvironment: false,\n                },\n              }),\n            );\n\n            await overlayFS.writeFile(\n              path.join(inputDir, '.parcelrc'),\n              JSON.stringify({\n                extends: '@parcel/config-default',\n                transformers: {\n                  // Remove react-refresh transformer and babel so we don't get extra config deps\n                  '*.js': ['@parcel/transformer-js'],\n                },\n              }),\n            );\n\n            await overlayFS.writeFile(path.join(inputDir, '.env'), 'TEST=hi');\n\n            await overlayFS.writeFile(\n              path.join(inputDir, 'src/index.js'),\n              'module.exports = process.env.TEST || \"default\"',\n            );\n            await overlayFS.writeFile(\n              path.join(inputDir, 'src/package.json'),\n              '{}',\n            );\n          },\n          async update() {\n            let pkgFile = path.join(inputDir, 'package.json');\n            let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n            await overlayFS.writeFile(\n              pkgFile,\n              JSON.stringify({\n                ...pkg,\n                '@parcel/transformer-js': {\n                  inlineEnvironment: ['TEST'],\n                },\n              }),\n            );\n          },\n        });\n\n        assert.equal(await run(b.bundleGraph), 'hi');\n        assert.equal(b.changedAssets.size, 1);\n      });\n\n      it('should invalidate when package.json config keys are removed', async function () {\n        let b = await testCache({\n          featureFlags: {\n            exampleFeature: false,\n          },\n          async setup() {\n            let pkgFile = path.join(inputDir, 'package.json');\n            let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n            await overlayFS.writeFile(\n              pkgFile,\n              JSON.stringify({\n                ...pkg,\n                '@parcel/transformer-js': {\n                  inlineEnvironment: false,\n                },\n              }),\n            );\n\n            await overlayFS.writeFile(\n              path.join(inputDir, '.parcelrc'),\n              JSON.stringify({\n                extends: '@parcel/config-default',\n                transformers: {\n                  // Remove react-refresh transformer and babel so we don't get extra config deps\n                  '*.js': ['@parcel/transformer-js'],\n                },\n              }),\n            );\n\n            await overlayFS.writeFile(path.join(inputDir, '.env'), 'TEST=hi');\n\n            await overlayFS.writeFile(\n              path.join(inputDir, 'src/index.js'),\n              'module.exports = process.env.TEST || \"default\"',\n            );\n            await overlayFS.writeFile(\n              path.join(inputDir, 'src/package.json'),\n              '{}',\n            );\n          },\n          async update() {\n            let pkgFile = path.join(inputDir, 'package.json');\n            let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n            delete pkg['@parcel/transformer-js'];\n            await overlayFS.writeFile(\n              pkgFile,\n              JSON.stringify({\n                pkg,\n              }),\n            );\n          },\n        });\n\n        assert.equal(await run(b.bundleGraph), 'hi');\n        assert.equal(b.changedAssets.size, 1);\n      });\n    });\n  });\n\n  describe('entries', function () {\n    it('should support adding an entry that matches a glob', async function () {\n      let b = await testCache({\n        entries: ['src/entries/*.js'],\n        async update(b) {\n          assertBundles(b.bundleGraph, [\n            {\n              name: 'a.js',\n              assets: ['a.js', 'esmodule-helpers.js'],\n            },\n            {\n              name: 'b.js',\n              assets: ['b.js', 'esmodule-helpers.js'],\n            },\n          ]);\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/entries/c.js'),\n            'export let c = \"c\";',\n          );\n        },\n      });\n\n      assertBundles(b.bundleGraph, [\n        {\n          name: 'a.js',\n          assets: ['a.js', 'esmodule-helpers.js'],\n        },\n        {\n          name: 'b.js',\n          assets: ['b.js', 'esmodule-helpers.js'],\n        },\n        {\n          name: 'c.js',\n          assets: ['c.js', 'esmodule-helpers.js'],\n        },\n      ]);\n    });\n\n    it('should support deleting an entry that matches a glob', async function () {\n      let b = await testCache({\n        entries: ['src/entries/*.js'],\n        async update(b) {\n          assertBundles(b.bundleGraph, [\n            {\n              name: 'a.js',\n              assets: ['a.js', 'esmodule-helpers.js'],\n            },\n            {\n              name: 'b.js',\n              assets: ['b.js', 'esmodule-helpers.js'],\n            },\n          ]);\n\n          await overlayFS.unlink(path.join(inputDir, 'src/entries/b.js'));\n        },\n      });\n\n      assertBundles(b.bundleGraph, [\n        {\n          name: 'a.js',\n          assets: ['a.js', 'esmodule-helpers.js'],\n        },\n      ]);\n    });\n\n    it('should error when deleting a file entry', async function () {\n      // $FlowFixMe\n      await assert.rejects(\n        async () => {\n          await testCache(async () => {\n            await overlayFS.unlink(path.join(inputDir, 'src/index.js'));\n          });\n        },\n        {\n          message: md`Entry ${path.join(\n            inputDir,\n            'src/index.js',\n          )} does not exist`,\n        },\n      );\n    });\n\n    it('should recover from errors when adding a missing entry', async function () {\n      // $FlowFixMe\n      await assert.rejects(\n        async () => {\n          await testCache(async () => {\n            await overlayFS.unlink(path.join(inputDir, 'src/index.js'));\n          });\n        },\n        {\n          message: md`Entry ${path.join(\n            inputDir,\n            'src/index.js',\n          )} does not exist`,\n        },\n      );\n\n      await overlayFS.writeFile(\n        path.join(inputDir, 'src/index.js'),\n        'module.exports = \"hi\"',\n      );\n\n      let b = await runBundle();\n      assert.equal(await run(b.bundleGraph), 'hi');\n    });\n  });\n\n  describe('target config', function () {\n    it('should support adding a target config', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(!contents.includes('export '), 'should not include export');\n\n          let pkgFile = path.join(inputDir, 'package.json');\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                esmodule: {\n                  outputFormat: 'esmodule',\n                  isLibrary: true,\n                },\n              },\n            }),\n          );\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('export '), 'should include export');\n    });\n\n    it('should support adding a second target', async function () {\n      let pkgFile = path.join(inputDir, 'package.json');\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  engines: {\n                    browsers: 'last 1 Chrome version',\n                  },\n                },\n              },\n            }),\n          );\n        },\n        async update(b) {\n          assertBundles(b.bundleGraph, [\n            {\n              name: 'index.js',\n              assets: ['index.js', 'test.js', 'foo.js'],\n            },\n          ]);\n\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  engines: {\n                    browsers: 'last 1 Chrome version',\n                  },\n                },\n                legacy: {\n                  engines: {\n                    browsers: 'IE 11',\n                  },\n                },\n              },\n            }),\n          );\n        },\n      });\n\n      assertBundles(b.bundleGraph, [\n        {\n          name: 'index.js',\n          assets: ['index.js', 'test.js', 'foo.js'],\n        },\n        {\n          name: 'index.js',\n          assets: ['index.js', 'test.js', 'foo.js'],\n        },\n      ]);\n    });\n\n    it('should support changing target output location', async function () {\n      let pkgFile = path.join(inputDir, 'package.json');\n      await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              modern: 'modern/index.js',\n              legacy: 'legacy/index.js',\n              targets: {\n                modern: {\n                  engines: {\n                    browsers: 'last 1 Chrome version',\n                  },\n                },\n                legacy: {\n                  engines: {\n                    browsers: 'IE 11',\n                  },\n                },\n              },\n            }),\n          );\n        },\n        async update() {\n          assert(\n            await overlayFS.exists(path.join(inputDir, 'modern/index.js')),\n          );\n          assert(\n            await overlayFS.exists(path.join(inputDir, 'legacy/index.js')),\n          );\n\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              modern: 'dist/modern/index.js',\n              legacy: 'dist/legacy/index.js',\n              targets: {\n                modern: {\n                  engines: {\n                    browsers: 'last 1 Chrome version',\n                  },\n                },\n                legacy: {\n                  engines: {\n                    browsers: 'IE 11',\n                  },\n                },\n              },\n            }),\n          );\n        },\n      });\n\n      assert(\n        await overlayFS.exists(path.join(inputDir, 'dist/modern/index.js')),\n      );\n      assert(\n        await overlayFS.exists(path.join(inputDir, 'dist/legacy/index.js')),\n      );\n    });\n\n    it('should support updating target config options', async function () {\n      let pkgFile = path.join(inputDir, 'package.json');\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                esmodule: {\n                  outputFormat: 'esmodule',\n                  isLibrary: true,\n                },\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes('export '), 'should include export');\n\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                esmodule: {\n                  outputFormat: 'commonjs',\n                },\n              },\n            }),\n          );\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes('module.exports ='),\n        'should include module.exports =',\n      );\n    });\n\n    it('should support deleting a target', async function () {\n      let pkgFile = path.join(inputDir, 'package.json');\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  engines: {\n                    browsers: 'last 1 Chrome version',\n                  },\n                },\n                legacy: {\n                  engines: {\n                    browsers: 'IE 11',\n                  },\n                },\n              },\n            }),\n          );\n        },\n        async update(b) {\n          assertBundles(b.bundleGraph, [\n            {\n              name: 'index.js',\n              assets: ['index.js', 'test.js', 'foo.js'],\n            },\n            {\n              name: 'index.js',\n              assets: ['index.js', 'test.js', 'foo.js'],\n            },\n          ]);\n\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  engines: {\n                    browsers: 'last 1 Chrome version',\n                  },\n                },\n              },\n            }),\n          );\n        },\n      });\n\n      assertBundles(b.bundleGraph, [\n        {\n          name: 'index.js',\n          assets: ['index.js', 'test.js', 'foo.js'],\n        },\n      ]);\n    });\n\n    it('should support deleting all targets', async function () {\n      let pkgFile = path.join(inputDir, 'package.json');\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  outputFormat: 'esmodule',\n                  isLibrary: true,\n                },\n                legacy: {\n                  outputFormat: 'commonjs',\n                },\n              },\n            }),\n          );\n        },\n        async update(b) {\n          assertBundles(b.bundleGraph, [\n            {\n              name: 'index.js',\n              assets: ['index.js', 'test.js', 'foo.js'],\n            },\n            {\n              name: 'index.js',\n              assets: ['index.js', 'test.js', 'foo.js'],\n            },\n          ]);\n\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes('export '), 'should include export');\n\n          contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[1].filePath,\n            'utf8',\n          );\n          assert(\n            contents.includes('module.exports ='),\n            'should include module.exports',\n          );\n\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: undefined,\n            }),\n          );\n        },\n      });\n\n      assertBundles(b.bundleGraph, [\n        {\n          name: 'index.js',\n          assets: ['index.js', 'test.js', 'foo.js'],\n        },\n      ]);\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('export '), 'should not include export');\n      assert(\n        !contents.includes('module.exports ='),\n        'should not include module.exports',\n      );\n    });\n\n    it('should update when sourcemap options change', async function () {\n      let pkgFile = path.join(inputDir, 'package.json');\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  sourceMap: true,\n                },\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            contents.includes('sourceMappingURL=index.js.map'),\n            'should include sourceMappingURL',\n          );\n\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  sourceMap: {\n                    inline: true,\n                  },\n                },\n              },\n            }),\n          );\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes('sourceMappingURL=data:application/json'),\n        'should include inline sourceMappingURL',\n      );\n    });\n\n    it('should update when publicUrl changes', async function () {\n      let pkgFile = path.join(inputDir, 'package.json');\n      let b = await testCache({\n        entries: ['src/index.html'],\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  publicUrl: 'http://example.com/',\n                },\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            contents.includes('<script type=\"module\" src=\"http://example.com'),\n            'should include example.com',\n          );\n\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  publicUrl: 'http://mygreatwebsite.com/',\n                },\n              },\n            }),\n          );\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes(\n          '<script type=\"module\" src=\"http://mygreatwebsite.com',\n        ),\n        'should include example.com',\n      );\n    });\n\n    it('should update when a package.json is created', async function () {\n      let pkgFile = path.join(inputDir, 'package.json');\n      let pkg;\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.unlink(pkgFile);\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(!contents.includes('export '), 'does not include export');\n\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  outputFormat: 'esmodule',\n                  isLibrary: true,\n                },\n              },\n            }),\n          );\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('export '), 'should include export');\n    });\n\n    it('should update when a package.json is deleted', async function () {\n      let pkgFile = path.join(inputDir, 'package.json');\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  outputFormat: 'esmodule',\n                  isLibrary: true,\n                },\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes('export '), 'should include export');\n          await overlayFS.unlink(pkgFile);\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('export '), 'does not include export');\n    });\n\n    describe('browserslist', function () {\n      it('should update when a browserslist file is added', async function () {\n        let b = await testCache({\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              /class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n              'should include class',\n            );\n            await overlayFS.writeFile(\n              path.join(inputDir, 'browserslist'),\n              'IE >= 11',\n            );\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(\n          !/class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n          'does not include class',\n        );\n      });\n\n      it('should update when a .browserslistrc file is added', async function () {\n        let b = await testCache({\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              /class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n              'should include class',\n            );\n            await overlayFS.writeFile(\n              path.join(inputDir, '.browserslistrc'),\n              'IE >= 11',\n            );\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(\n          !/class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n          'does not include class',\n        );\n      });\n\n      it('should update when a browserslist is updated', async function () {\n        let b = await testCache({\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n          async setup() {\n            await overlayFS.writeFile(\n              path.join(inputDir, 'browserslist'),\n              'IE >= 11',\n            );\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              !/class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n              'does not include class',\n            );\n            await overlayFS.writeFile(\n              path.join(inputDir, 'browserslist'),\n              'last 1 Chrome version',\n            );\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(\n          /class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n          'should include class',\n        );\n      });\n\n      it('should update when a browserslist is deleted', async function () {\n        let b = await testCache({\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n          async setup() {\n            await overlayFS.writeFile(\n              path.join(inputDir, 'browserslist'),\n              'IE >= 11',\n            );\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              !/class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n              'does not include class',\n            );\n            await overlayFS.unlink(path.join(inputDir, 'browserslist'));\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(\n          /class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n          'should include class',\n        );\n      });\n\n      it('should update when BROWSERSLIST_ENV changes', async function () {\n        let b = await testCache({\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n          async setup() {\n            await overlayFS.writeFile(\n              path.join(inputDir, 'browserslist'),\n              `\n            [production]\n            IE >= 11\n\n            [development]\n            last 1 Chrome version\n            `,\n            );\n\n            process.env.BROWSERSLIST_ENV = 'production';\n          },\n          async update(b) {\n            // \"production\" is the default environment for browserslist\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              !/class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n              'does not include class',\n            );\n\n            process.env.BROWSERSLIST_ENV = 'development';\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(\n          /class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n          'should include class',\n        );\n\n        delete process.env.BROWSERSLIST_ENV;\n      });\n\n      it('should update when NODE_ENV changes', async function () {\n        let env = process.env.NODE_ENV;\n        let b = await testCache({\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n          async setup() {\n            await overlayFS.writeFile(\n              path.join(inputDir, 'browserslist'),\n              `\n            [production]\n            IE >= 11\n\n            [development]\n            last 1 Chrome version\n            `,\n            );\n\n            process.env.NODE_ENV = 'production';\n          },\n          async update(b) {\n            // \"production\" is the default environment for browserslist\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(\n              !/class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n              'does not include class',\n            );\n\n            process.env.NODE_ENV = 'development';\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(\n          /class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n          'should include class',\n        );\n\n        process.env.NODE_ENV = env;\n      });\n    });\n  });\n\n  describe('options', function () {\n    it('should update when publicUrl changes', async function () {\n      let b = await testCache({\n        entries: ['src/index.html'],\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          publicUrl: 'http://example.com/',\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            contents.includes('<script type=\"module\" src=\"http://example.com'),\n            'should include example.com',\n          );\n\n          return {\n            defaultTargetOptions: {\n              publicUrl: 'http://mygreatwebsite.com/',\n            },\n          };\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes(\n          '<script type=\"module\" src=\"http://mygreatwebsite.com',\n        ),\n        'should include example.com',\n      );\n    });\n\n    it('should update when minify changes', async function () {\n      let b = await testCache({\n        entries: ['src/index.html'],\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[1].filePath,\n            'utf8',\n          );\n          assert(contents.includes('Test'), 'should include Test');\n\n          return {\n            defaultTargetOptions: {\n              shouldScopeHoist: true,\n              shouldOptimize: true,\n            },\n          };\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[1].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('Test'), 'should not include Test');\n    });\n\n    it('should update when scopeHoist changes', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            contents.includes('parcelRequire'),\n            'should include parcelRequire',\n          );\n\n          return {\n            defaultTargetOptions: {\n              shouldScopeHoist: true,\n            },\n          };\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('parcelRequire'), 'should not include Test');\n    });\n\n    it('should update when sourceMaps changes', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          sourceMaps: false,\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            !contents.includes('sourceMappingURL=index.js.map'),\n            'should not include sourceMappingURL',\n          );\n\n          return {\n            defaultTargetOptions: {\n              sourceMaps: true,\n            },\n          };\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes('sourceMappingURL=index.js.map'),\n        'should include sourceMappingURL',\n      );\n    });\n\n    it('should update when distDir changes', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        update(b) {\n          assert(\n            /dist[/\\\\]index.js$/.test(b.bundleGraph.getBundles()[0].filePath),\n            'should end with dist/index.js',\n          );\n\n          return {\n            defaultTargetOptions: {\n              distDir: path.join(__dirname, 'integration/cache/dist/test'),\n            },\n          };\n        },\n      });\n\n      assert(\n        /dist[/\\\\]test[/\\\\]index.js$/.test(\n          b.bundleGraph.getBundles()[0].filePath,\n        ),\n        'should end with dist/test/index.js',\n      );\n    });\n\n    it('should update when targets changes', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        targets: ['legacy'],\n        async setup() {\n          let pkgFile = path.join(inputDir, 'package.json');\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              targets: {\n                modern: {\n                  engines: {\n                    browsers: 'last 1 Chrome version',\n                  },\n                },\n                legacy: {\n                  engines: {\n                    browsers: 'IE 11',\n                  },\n                },\n              },\n            }),\n          );\n        },\n        async update(b) {\n          assertBundles(b.bundleGraph, [\n            {\n              name: 'index.js',\n              assets: ['index.js', 'test.js', 'foo.js'],\n            },\n          ]);\n\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            !/class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n            'should not include class',\n          );\n\n          return {\n            targets: ['modern'],\n          };\n        },\n      });\n\n      assertBundles(b.bundleGraph, [\n        {\n          name: 'index.js',\n          assets: ['index.js', 'test.js', 'foo.js'],\n        },\n      ]);\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        /class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n        'should include class',\n      );\n    });\n\n    it('should update when defaultEngines changes', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          engines: {\n            browsers: 'last 1 Chrome version',\n          },\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            /class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n            'should include class',\n          );\n\n          return {\n            defaultTargetOptions: {\n              shouldScopeHoist: true,\n              engines: {\n                browsers: 'IE 11',\n              },\n            },\n          };\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        !/class \\$[a-f0-9]+\\$var\\$Test/.test(contents),\n        'should not include class',\n      );\n    });\n\n    it('should update when shouldContentHash changes', async function () {\n      let b = await testCache({\n        entries: ['src/index.html'],\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        shouldContentHash: true,\n        update(b) {\n          let bundle = b.bundleGraph.getBundles()[1];\n          assert(!bundle.filePath.includes(bundle.id.slice(-8)));\n\n          return {\n            shouldContentHash: false,\n          };\n        },\n      });\n\n      let bundle = b.bundleGraph.getBundles()[1];\n      assert(bundle.filePath.includes(bundle.id.slice(-8)));\n    });\n\n    it('should update when hmr options change', async function () {\n      let b = await testCache({\n        hmrOptions: {\n          host: 'localhost',\n          port: 4321,\n        },\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                // Remove react-refresh transformer so we test whether the runtime updates\n                '*.js': ['@parcel/transformer-js'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            contents.includes('HMR_HOST = \"localhost\"'),\n            'should include HMR_HOST = \"localhost\"',\n          );\n          assert(\n            contents.includes('HMR_PORT = 4321'),\n            'should include HMR_PORT = 4321',\n          );\n\n          return {\n            hmrOptions: {\n              host: 'example.com',\n              port: 5678,\n            },\n          };\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes('HMR_HOST = \"example.com\"'),\n        'should include HMR_HOST = \"example.com\"',\n      );\n      assert(\n        contents.includes('HMR_PORT = 5678'),\n        'should include HMR_PORT = 5678',\n      );\n    });\n\n    it('should invalidate react refresh hot options change', async function () {\n      let b = await testCache({\n        async setup() {\n          let pkgFile = path.join(inputDir, 'package.json');\n          let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n          await overlayFS.writeFile(\n            pkgFile,\n            JSON.stringify({\n              ...pkg,\n              dependencies: {\n                react: '*',\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            `import React from 'react';\n\n            export function Component() {\n              return <h1>Hello world</h1>;\n            }`,\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            !contents.includes('getRefreshBoundarySignature'),\n            'should not include getRefreshBoundarySignature',\n          );\n\n          return {\n            hmrOptions: {\n              host: 'example.com',\n              port: 5678,\n            },\n          };\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes('getRefreshBoundarySignature'),\n        'should include getRefreshBoundarySignature',\n      );\n    });\n\n    it('should update when the config option changes', async function () {\n      let b = await testCache({\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(!contents.includes('TRANSFORMED CODE'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'some-config'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                '*.js': ['parcel-transformer-mock'],\n              },\n            }),\n          );\n\n          return {\n            config: path.join(inputDir, 'some-config'),\n          };\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('TRANSFORMED CODE'));\n    });\n\n    it('should update when the defaultConfig option changes', async function () {\n      let b = await testCache({\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(!contents.includes('TRANSFORMED CODE'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'some-config'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                '*.js': ['parcel-transformer-mock'],\n              },\n            }),\n          );\n\n          return {\n            defaultConfig: path.join(inputDir, 'some-config'),\n          };\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('TRANSFORMED CODE'));\n    });\n\n    it('should update env browserslist in package.json when mode changes', async function () {\n      let env = process.env.NODE_ENV;\n      delete process.env.NODE_ENV;\n      try {\n        let b = await testCache({\n          defaultTargetOptions: {\n            shouldScopeHoist: false,\n            shouldOptimize: false,\n          },\n          mode: 'development',\n          async setup() {\n            let pkg = JSON.parse(\n              await overlayFS.readFile(\n                path.join(inputDir, 'package.json'),\n                'utf8',\n              ),\n            );\n            pkg.browserslist = {\n              production: ['ie 11'],\n              development: ['Chrome 80'],\n            };\n            await overlayFS.writeFile(\n              path.join(inputDir, 'package.json'),\n              JSON.stringify(pkg, null, 2),\n            );\n          },\n          async update(b) {\n            let contents = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(/class Test/.test(contents), 'should include class');\n\n            return {\n              mode: 'production',\n            };\n          },\n        });\n\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(!/class Test/.test(contents), 'does not include class');\n      } finally {\n        process.env.NODE_ENV = env;\n      }\n    });\n  });\n\n  describe('resolver', function () {\n    it('should support updating a package.json#main field', async function () {\n      let b = await testCache(async b => {\n        assert.equal(await run(b.bundleGraph), 4);\n        await overlayFS.writeFile(\n          path.join(inputDir, 'node_modules/foo/test.js'),\n          'module.exports = 4;',\n        );\n\n        await overlayFS.writeFile(\n          path.join(inputDir, 'node_modules/foo/package.json'),\n          JSON.stringify({main: 'test.js'}),\n        );\n      });\n\n      assert.equal(await run(b.bundleGraph), 8);\n    });\n\n    it('should support adding an alias', async function () {\n      let b = await testCache(async b => {\n        assert.equal(await run(b.bundleGraph), 4);\n        await overlayFS.writeFile(\n          path.join(inputDir, 'node_modules/foo/test.js'),\n          'module.exports = 4;',\n        );\n\n        await overlayFS.writeFile(\n          path.join(inputDir, 'node_modules/foo/package.json'),\n          JSON.stringify({\n            main: 'foo.js',\n            alias: {\n              './foo.js': './test.js',\n            },\n          }),\n        );\n      });\n\n      assert.equal(await run(b.bundleGraph), 8);\n    });\n\n    it('should support updating an alias', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'node_modules/foo/test.js'),\n            'module.exports = 4;',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'node_modules/foo/package.json'),\n            JSON.stringify({\n              main: 'foo.js',\n              alias: {\n                './foo.js': './test.js',\n              },\n            }),\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 8);\n          await overlayFS.writeFile(\n            path.join(inputDir, 'node_modules/foo/baz.js'),\n            'module.exports = 6;',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'node_modules/foo/package.json'),\n            JSON.stringify({\n              main: 'foo.js',\n              alias: {\n                './foo.js': './baz.js',\n              },\n            }),\n          );\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 12);\n    });\n\n    it('should support deleting an alias', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'node_modules/foo/test.js'),\n            'module.exports = 4;',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'node_modules/foo/package.json'),\n            JSON.stringify({\n              main: 'foo.js',\n              alias: {\n                './foo.js': './test.js',\n              },\n            }),\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 8);\n          await overlayFS.writeFile(\n            path.join(inputDir, 'node_modules/foo/package.json'),\n            JSON.stringify({main: 'foo.js'}),\n          );\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 4);\n    });\n\n    it('should support adding an alias in a closer package.json', async function () {\n      let b = await testCache(async b => {\n        assert.equal(await run(b.bundleGraph), 4);\n        await overlayFS.writeFile(\n          path.join(inputDir, 'src/nested/foo.js'),\n          'module.exports = 4;',\n        );\n\n        await overlayFS.writeFile(\n          path.join(inputDir, 'src/nested/package.json'),\n          JSON.stringify({\n            alias: {\n              './test.js': './foo.js',\n            },\n          }),\n        );\n      });\n\n      assert.equal(await run(b.bundleGraph), 6);\n    });\n\n    it('should support adding a file with a higher priority extension', async function () {\n      let b = await testCache({\n        async setup() {\n          // Start out pointing to a .ts file from a .js file\n          let contents = await overlayFS.readFile(\n            path.join(inputDir, 'src/index.js'),\n            'utf8',\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            contents.replace('nested/test', 'nested/foo'),\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/foo.ts'),\n            'module.exports = 4;',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 6);\n\n          // Adding a .js file should be higher priority\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/foo.js'),\n            'module.exports = 2;',\n          );\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 4);\n    });\n\n    it('should support renaming a file to a different extension', async function () {\n      let b = await testCache({\n        async setup() {\n          // Start out pointing to a .js file\n          let contents = await overlayFS.readFile(\n            path.join(inputDir, 'src/index.js'),\n            'utf8',\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            contents.replace('nested/test', 'nested/foo'),\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/foo.js'),\n            'module.exports = 4;',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 6);\n\n          // Rename to .ts\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/foo.ts'),\n            'module.exports = 2;',\n          );\n\n          await overlayFS.unlink(path.join(inputDir, 'src/nested/foo.js'));\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 4);\n    });\n\n    it('should resolve to a file over a directory with an index.js', async function () {\n      let b = await testCache({\n        async setup() {\n          let contents = await overlayFS.readFile(\n            path.join(inputDir, 'src/index.js'),\n            'utf8',\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            contents.replace('nested/test', 'nested'),\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/index.js'),\n            'module.exports = 4;',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 6);\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested.js'),\n            'module.exports = 2;',\n          );\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 4);\n    });\n\n    it('should resolve to package.json#main over an index.js', async function () {\n      let b = await testCache({\n        async setup() {\n          let contents = await overlayFS.readFile(\n            path.join(inputDir, 'src/index.js'),\n            'utf8',\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            contents.replace('nested/test', 'nested'),\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/index.js'),\n            'module.exports = 4;',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 6);\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/package.json'),\n            JSON.stringify({\n              main: 'test.js',\n            }),\n          );\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 4);\n    });\n\n    it('should recover from errors when adding a missing dependency', async function () {\n      // $FlowFixMe\n      await assert.rejects(\n        async () => {\n          await testCache({\n            async setup() {\n              await overlayFS.unlink(path.join(inputDir, 'src/nested/test.js'));\n            },\n            async update() {},\n          });\n        },\n        {\n          message: \"Failed to resolve './nested/test' from './src/index.js'\",\n        },\n      );\n\n      await overlayFS.writeFile(\n        path.join(inputDir, 'src/nested/test.js'),\n        'module.exports = 4;',\n      );\n\n      let b = await runBundle();\n      assert.equal(await run(b.bundleGraph), 6);\n    });\n\n    it('should recover from a missing package.json#main', async function () {\n      let b = await testCache({\n        async setup() {\n          let contents = await overlayFS.readFile(\n            path.join(inputDir, 'src/index.js'),\n            'utf8',\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            contents.replace('nested/test', 'nested'),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/package.json'),\n            JSON.stringify({\n              main: 'tmp.js',\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/index.js'),\n            'module.exports = 4;',\n          );\n        },\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 6);\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/tmp.js'),\n            'module.exports = 8;',\n          );\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 10);\n    });\n\n    it('should recover from an invalid package.json', async function () {\n      // $FlowFixMe\n      await assert.rejects(async () => {\n        await testCache({\n          async setup() {\n            let contents = await overlayFS.readFile(\n              path.join(inputDir, 'src/index.js'),\n              'utf8',\n            );\n            await overlayFS.writeFile(\n              path.join(inputDir, 'src/index.js'),\n              contents.replace('nested/test', 'nested'),\n            );\n\n            await overlayFS.writeFile(\n              path.join(inputDir, 'src/nested/package.json'),\n              'invalid',\n            );\n\n            await overlayFS.writeFile(\n              path.join(inputDir, 'src/nested/index.js'),\n              'module.exports = 10;',\n            );\n          },\n          async update() {},\n        });\n      });\n\n      await overlayFS.writeFile(\n        path.join(inputDir, 'src/nested/package.json'),\n        JSON.stringify({\n          main: 'test.js',\n        }),\n      );\n\n      let b = await runBundle();\n      assert.equal(await run(b.bundleGraph), 4);\n    });\n\n    it('should support adding a deeper node_modules folder', async function () {\n      let b = await testCache({\n        async update(b) {\n          assert.equal(await run(b.bundleGraph), 4);\n\n          await overlayFS.mkdirp(\n            path.join(inputDir, 'src/nested/node_modules/foo'),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/nested/node_modules/foo/index.js'),\n            'module.exports = 4;',\n          );\n        },\n      });\n\n      assert.equal(await run(b.bundleGraph), 6);\n    });\n\n    it('should invalidate when switching to a different resolver plugin', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            `import \"foo\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/foo.js'),\n            `export default \"FOO\";`,\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(!res.includes('FOO'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              resolvers: ['parcel-resolver-test'],\n            }),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(res.includes('FOO'));\n    });\n\n    it('should invalidate when a resolver is updated', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            `import \"foo\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/foo.js'),\n            `export default \"FOO\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/foo.ts'),\n            `export default \"BAR\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              resolvers: ['parcel-resolver-test'],\n            }),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(res.includes('FOO'));\n          assert(!res.includes('BAR'));\n\n          let resolver = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-resolver-test',\n            'index.js',\n          );\n          await overlayFS.writeFile(\n            resolver,\n            (\n              await overlayFS.readFile(resolver, 'utf8')\n            ).replace(/\\.js/g, '.ts'),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!res.includes('FOO'));\n      assert(res.includes('BAR'));\n    });\n\n    it('should invalidate when adding resolver config', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            `import \"foo\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/foo.js'),\n            `export default \"FOO\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/bar.js'),\n            `export default \"BAR\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              resolvers: ['parcel-resolver-test'],\n            }),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(res.includes('FOO'));\n          assert(!res.includes('BAR'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.resolverrc'),\n            JSON.stringify({foo: 'bar.js'}),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!res.includes('FOO'));\n      assert(res.includes('BAR'));\n    });\n\n    it('should invalidate when updating resolver config', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            `import \"foo\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/foo.js'),\n            `export default \"FOO\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/bar.js'),\n            `export default \"BAR\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              resolvers: ['parcel-resolver-test'],\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.resolverrc'),\n            JSON.stringify({foo: 'bar.js'}),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(!res.includes('FOO'));\n          assert(res.includes('BAR'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.resolverrc'),\n            JSON.stringify({foo: 'foo.js'}),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(res.includes('FOO'));\n      assert(!res.includes('BAR'));\n    });\n\n    it('should invalidate when removing resolver config', async function () {\n      let b = await testCache({\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            `import \"foo\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/foo.js'),\n            `export default \"FOO\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/bar.js'),\n            `export default \"BAR\";`,\n          );\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              resolvers: ['parcel-resolver-test'],\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.resolverrc'),\n            JSON.stringify({foo: 'bar.js'}),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(!res.includes('FOO'));\n          assert(res.includes('BAR'));\n\n          await overlayFS.unlink(path.join(inputDir, '.resolverrc'));\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(res.includes('FOO'));\n      assert(!res.includes('BAR'));\n    });\n\n    describe('pnp', function () {\n      it('should invalidate when the .pnp.js file changes', async function () {\n        let Module = require('module');\n        let origPnpVersion = process.versions.pnp;\n        // $FlowFixMe[prop-missing]\n        let origModuleResolveFilename = Module._resolveFilename;\n\n        try {\n          let b = await testCache(\n            {\n              entries: ['index.js'],\n              inputFS,\n              async setup() {\n                await inputFS.mkdirp(inputDir);\n                await inputFS.ncp(\n                  path.join(__dirname, '/integration/pnp-require'),\n                  inputDir,\n                );\n\n                // $FlowFixMe[incompatible-type]\n                process.versions.pnp = 42;\n\n                // $FlowFixMe[prop-missing]\n                Module.findPnpApi = () =>\n                  // $FlowFixMe\n                  require(path.join(inputDir, '.pnp.js'));\n\n                let pnp = await inputFS.readFile(\n                  path.join(inputDir, '.pnp.js'),\n                  'utf8',\n                );\n                await inputFS.writeFile(\n                  path.join(inputDir, '.pnp.js'),\n                  pnp.replace(\"'zipfs',\", ''),\n                );\n\n                await inputFS.mkdirp(path.join(inputDir, 'pnp/testmodule2'));\n                await inputFS.writeFile(\n                  path.join(inputDir, 'pnp/testmodule2/index.js'),\n                  'exports.a = 4;',\n                );\n              },\n              async update(b) {\n                let output = await run(b.bundleGraph);\n                assert.equal(output(), 3);\n\n                let pnp = await inputFS.readFile(\n                  path.join(inputDir, '.pnp.js'),\n                  'utf8',\n                );\n                await inputFS.writeFile(\n                  path.join(inputDir, '.pnp.js'),\n                  pnp.replace(\"'pnp', 'testmodule'\", \"'pnp', 'testmodule2'\"),\n                );\n\n                delete require.cache[path.join(inputDir, '.pnp.js')];\n                await sleep(100);\n              },\n            },\n            'pnp-require',\n          );\n\n          let output = await run(b.bundleGraph);\n          assert.equal(output(), 6);\n        } finally {\n          // $FlowFixMe[incompatible-type]\n          process.versions.pnp = origPnpVersion;\n          // $FlowFixMe[prop-missing]\n          Module._resolveFilename = origModuleResolveFilename;\n        }\n      });\n    });\n\n    describe('stylus', function () {\n      it('should support resolver inside stylus file', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.js'],\n            async setup() {\n              await overlayFS.writeFile(\n                path.join(inputDir, 'index.styl'),\n                `\n            @import \"./b\";\n            .a\n              background: red\n            `,\n              );\n\n              await overlayFS.mkdirp(path.join(inputDir, 'b'));\n              await overlayFS.writeFile(\n                path.join(inputDir, 'b/index.styl'),\n                `\n            .b\n              background: blue\n            `,\n              );\n            },\n            async update(b) {\n              let css = await overlayFS.readFile(\n                nullthrows(\n                  b.bundleGraph.getBundles().find(b => b.type === 'css')\n                    ?.filePath,\n                ),\n                'utf8',\n              );\n              assert(css.includes('.a {'));\n              assert(css.includes('.b {'));\n              assert(!css.includes('.c {'));\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'b.styl'),\n                `\n            .c\n              background: blue\n            `,\n              );\n            },\n          },\n          'stylus',\n        );\n\n        let css = await overlayFS.readFile(\n          nullthrows(\n            b.bundleGraph.getBundles().find(b => b.type === 'css')?.filePath,\n          ),\n          'utf8',\n        );\n        assert(css.includes('.a {'));\n        assert(!css.includes('.b {'));\n        assert(css.includes('.c {'));\n      });\n\n      it('should support stylus default resolver', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.js'],\n            async setup() {\n              await overlayFS.writeFile(\n                path.join(inputDir, '.stylusrc'),\n                JSON.stringify({\n                  paths: ['deps'],\n                }),\n              );\n            },\n            async update(b) {\n              let css = await overlayFS.readFile(\n                nullthrows(\n                  b.bundleGraph.getBundles().find(b => b.type === 'css')\n                    ?.filePath,\n                ),\n                'utf8',\n              );\n              assert(css.includes('.a {'));\n              assert(!css.includes('.b {'));\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'a.styl'),\n                `\n            .b\n              background: blue\n            `,\n              );\n            },\n          },\n          'stylus-deps',\n        );\n\n        let css = await overlayFS.readFile(\n          nullthrows(\n            b.bundleGraph.getBundles().find(b => b.type === 'css')?.filePath,\n          ),\n          'utf8',\n        );\n        assert(!css.includes('.a {'));\n        assert(css.includes('.b {'));\n      });\n\n      it('should support glob imports in stylus files', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.js'],\n            async update(b) {\n              let css = await overlayFS.readFile(\n                nullthrows(\n                  b.bundleGraph.getBundles().find(b => b.type === 'css')\n                    ?.filePath,\n                ),\n                'utf8',\n              );\n              assert(css.includes('.index'));\n              assert(css.includes('.main'));\n              assert(css.includes('.foo'));\n              assert(css.includes('.bar'));\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'subdir/test.styl'),\n                `\n            .test\n              background: blue\n            `,\n              );\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'subdir/foo/test.styl'),\n                `\n            .foo-test\n              background: blue\n            `,\n              );\n            },\n          },\n          'stylus-glob-import',\n        );\n\n        let css = await overlayFS.readFile(\n          nullthrows(\n            b.bundleGraph.getBundles().find(b => b.type === 'css')?.filePath,\n          ),\n          'utf8',\n        );\n        assert(css.includes('.index'));\n        assert(css.includes('.main'));\n        assert(css.includes('.foo'));\n        assert(css.includes('.bar'));\n        assert(css.includes('.test'));\n        assert(css.includes('.foo-test'));\n      });\n\n      it('should support glob imports under stylus paths', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.js'],\n            async setup() {\n              await overlayFS.writeFile(\n                path.join(inputDir, '.stylusrc'),\n                JSON.stringify({\n                  paths: ['subdir'],\n                }),\n              );\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'index.styl'),\n                `\n            @require 'foo/*'\n\n            .index\n              color: red\n            `,\n              );\n            },\n            async update(b) {\n              let css = await overlayFS.readFile(\n                nullthrows(\n                  b.bundleGraph.getBundles().find(b => b.type === 'css')\n                    ?.filePath,\n                ),\n                'utf8',\n              );\n              assert(css.includes('.index'));\n              assert(!css.includes('.main'));\n              assert(css.includes('.foo'));\n              assert(!css.includes('.bar'));\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'subdir/test.styl'),\n                `\n            .test\n              background: blue\n            `,\n              );\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'subdir/foo/test.styl'),\n                `\n            .foo-test\n              background: blue\n            `,\n              );\n            },\n          },\n          'stylus-glob-import',\n        );\n\n        let css = await overlayFS.readFile(\n          nullthrows(\n            b.bundleGraph.getBundles().find(b => b.type === 'css')?.filePath,\n          ),\n          'utf8',\n        );\n        assert(css.includes('.index'));\n        assert(!css.includes('.main'));\n        assert(css.includes('.foo'));\n        assert(!css.includes('.bar'));\n        assert(!css.includes('.test'));\n        assert(css.includes('.foo-test'));\n      });\n    });\n\n    describe('less', function () {\n      it('should support adding higher priority less include paths', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.js'],\n            async setup() {\n              await overlayFS.writeFile(\n                path.join(inputDir, '.lessrc'),\n                JSON.stringify({\n                  paths: ['include-path', 'node_modules/library'],\n                }),\n              );\n            },\n            async update(b) {\n              let css = await overlayFS.readFile(\n                nullthrows(\n                  b.bundleGraph.getBundles().find(b => b.type === 'css')\n                    ?.filePath,\n                ),\n                'utf8',\n              );\n              assert(css.includes('.a'));\n              assert(css.includes('.b'));\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'a.less'),\n                `.c {\n                  background: blue\n                }`,\n              );\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'include-path/b.less'),\n                `.d {\n                  background: blue\n                }`,\n              );\n            },\n          },\n          'less-include-paths',\n        );\n\n        let css = await overlayFS.readFile(\n          nullthrows(\n            b.bundleGraph.getBundles().find(b => b.type === 'css')?.filePath,\n          ),\n          'utf8',\n        );\n        assert(!css.includes('.a'));\n        assert(!css.includes('.b'));\n        assert(css.includes('.c'));\n        assert(css.includes('.d'));\n      });\n\n      it('should recover from missing import errors', async function () {\n        // $FlowFixMe\n        await assert.rejects(\n          async () => {\n            await testCache(\n              {\n                entries: ['index.js'],\n                async setup() {\n                  await overlayFS.writeFile(\n                    path.join(inputDir, '.lessrc'),\n                    JSON.stringify({\n                      paths: ['include-path', 'node_modules/library'],\n                    }),\n                  );\n\n                  await overlayFS.writeFile(\n                    path.join(inputDir, 'yarn.lock'),\n                    '',\n                  );\n\n                  await overlayFS.unlink(\n                    path.join(inputDir, 'include-path/a.less'),\n                  );\n                },\n                async update() {},\n              },\n              'less-include-paths',\n            );\n          },\n          {\n            message: \"Failed to resolve 'a.less' from './index.less'\",\n          },\n        );\n\n        await overlayFS.writeFile(\n          path.join(inputDir, 'include-path/a.less'),\n          `.d {\n            background: blue\n          }`,\n        );\n\n        let b = await runBundle('index.js');\n        let css = await overlayFS.readFile(\n          nullthrows(\n            b.bundleGraph.getBundles().find(b => b.type === 'css')?.filePath,\n          ),\n          'utf8',\n        );\n        assert(css.includes('.d'));\n        assert(css.includes('.b'));\n      });\n    });\n\n    describe('sass', function () {\n      it('should support adding higher priority sass include paths', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.sass'],\n            async setup() {\n              await overlayFS.writeFile(\n                path.join(inputDir, '.sassrc'),\n                JSON.stringify({\n                  includePaths: ['include-path'],\n                }),\n              );\n            },\n            async update(b) {\n              let css = await overlayFS.readFile(\n                nullthrows(\n                  b.bundleGraph.getBundles().find(b => b.type === 'css')\n                    ?.filePath,\n                ),\n                'utf8',\n              );\n              assert(css.includes('.included'));\n\n              await overlayFS.writeFile(\n                path.join(inputDir, 'style.sass'),\n                `.test\n                  background: blue\n                `,\n              );\n            },\n          },\n          'sass-include-paths-import',\n        );\n\n        let css = await overlayFS.readFile(\n          nullthrows(\n            b.bundleGraph.getBundles().find(b => b.type === 'css')?.filePath,\n          ),\n          'utf8',\n        );\n        assert(!css.includes('.included'));\n        assert(css.includes('.test'));\n      });\n\n      it('should the SASS_PATH environment variable', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.sass'],\n            env: {\n              SASS_PATH: 'include-path',\n            },\n            async setup() {\n              await overlayFS.mkdirp(path.join(inputDir, 'include2'));\n              await overlayFS.rimraf(path.join(inputDir, '.sassrc.js'));\n              await overlayFS.writeFile(\n                path.join(inputDir, 'include2/style.sass'),\n                `.test\n                  background: blue\n                `,\n              );\n            },\n            async update(b) {\n              let css = await overlayFS.readFile(\n                nullthrows(\n                  b.bundleGraph.getBundles().find(b => b.type === 'css')\n                    ?.filePath,\n                ),\n                'utf8',\n              );\n              assert(css.includes('.included'));\n\n              return {\n                env: {\n                  SASS_PATH: 'include2',\n                },\n              };\n            },\n          },\n          'sass-include-paths-import',\n        );\n\n        let css = await overlayFS.readFile(\n          nullthrows(\n            b.bundleGraph.getBundles().find(b => b.type === 'css')?.filePath,\n          ),\n          'utf8',\n        );\n        assert(!css.includes('.included'));\n        assert(css.includes('.test'));\n      });\n\n      it('should recover from missing import errors', async function () {\n        // $FlowFixMe\n        await assert.rejects(async () => {\n          await testCache(\n            {\n              entries: ['index.sass'],\n              async setup() {\n                await overlayFS.writeFile(\n                  path.join(inputDir, '.sassrc'),\n                  JSON.stringify({\n                    includePaths: ['include-path'],\n                  }),\n                );\n\n                await overlayFS.writeFile(path.join(inputDir, 'yarn.lock'), '');\n\n                await overlayFS.unlink(\n                  path.join(inputDir, 'include-path/style.sass'),\n                );\n              },\n              async update() {},\n            },\n            'sass-include-paths-import',\n          );\n        });\n\n        await overlayFS.writeFile(\n          path.join(inputDir, 'include-path/style.sass'),\n          `.d\n            background: blue\n          `,\n        );\n\n        let b = await runBundle('index.sass');\n        let css = await overlayFS.readFile(\n          nullthrows(\n            b.bundleGraph.getBundles().find(b => b.type === 'css')?.filePath,\n          ),\n          'utf8',\n        );\n        assert(css.includes('.d'));\n      });\n    });\n  });\n\n  describe('dev deps', function () {\n    it('should invalidate when updating a parcel transformer plugin', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                '*.js': ['parcel-transformer-mock'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let output = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(output.includes('TRANSFORMED CODE'));\n\n          let transformerDir = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-transformer-mock',\n          );\n          await overlayFS.writeFile(\n            path.join(transformerDir, 'constants.js'),\n            'exports.message = \"UPDATED\"',\n          );\n        },\n      });\n\n      let output = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(output.includes('UPDATED'));\n    });\n\n    it('should invalidate when updating a file required via options.packageManager.require', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                '*.js': ['parcel-transformer-mock'],\n              },\n            }),\n          );\n          let transformer = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-transformer-mock',\n            'index.js',\n          );\n          let contents = await overlayFS.readFile(transformer, 'utf8');\n          await overlayFS.writeFile(\n            transformer,\n            contents\n              .replace(\n                'transform({asset}) {',\n                'async transform({asset, options}) {',\n              )\n              .replace(\n                \"const {message} = require('./constants');\",\n                \"const message = 'FOO: ' + await options.packageManager.require('foo', asset.filePath);\",\n              ),\n          );\n        },\n        async update(b) {\n          let output = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(output.includes('FOO: 2'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'node_modules', 'foo', 'foo.js'),\n            'module.exports = 3;',\n          );\n        },\n      });\n\n      let output = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(output.includes('FOO: 3'));\n    });\n\n    it('should resolve to package.json#main over an index.js', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                '*.js': ['parcel-transformer-mock'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let output = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(output.includes('TRANSFORMED CODE'));\n\n          let transformerDir = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-transformer-mock',\n          );\n          await overlayFS.writeFile(\n            path.join(transformerDir, 'MockTransformer.js'),\n            `\n            const Transformer = require('@parcel/plugin').Transformer;\n            module.exports = new Transformer({\n              transform({asset}) {\n                return [\n                  {\n                    type: 'js',\n                    content: 'UPDATED',\n                  },\n                ];\n              }\n            });\n            `,\n          );\n\n          await overlayFS.writeFile(\n            path.join(transformerDir, 'package.json'),\n            JSON.stringify({main: 'MockTransformer.js'}),\n          );\n        },\n      });\n\n      let output = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(output.includes('UPDATED'));\n    });\n\n    it('should resolve to a file over a directory with an index.js', async function () {\n      let transformerDir = path.join(\n        inputDir,\n        'node_modules',\n        'parcel-transformer-mock',\n      );\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              transformers: {\n                '*.js': ['parcel-transformer-mock'],\n              },\n            }),\n          );\n\n          await overlayFS.unlink(path.join(transformerDir, 'constants.js'));\n          await overlayFS.mkdirp(path.join(transformerDir, 'constants'));\n          await overlayFS.writeFile(\n            path.join(transformerDir, 'constants', 'index.js'),\n            'exports.message = \"TRANSFORMED\"',\n          );\n        },\n        async update(b) {\n          let output = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(output.includes('TRANSFORMED'));\n\n          await overlayFS.writeFile(\n            path.join(transformerDir, 'constants.js'),\n            'exports.message = \"UPDATED\"',\n          );\n        },\n      });\n\n      let output = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(output.includes('UPDATED'));\n    });\n\n    it('should support adding a deeper node_modules folder', async function () {});\n\n    it('should support yarn pnp', async function () {\n      let Module = require('module');\n      // $FlowFixMe[incompatible-type]\n      let origPnpVersion = process.versions.pnp;\n      // $FlowFixMe[prop-missing]\n      let origModuleResolveFilename = Module._resolveFilename;\n\n      // We must create a worker farm that only uses a single thread because our process.versions.pnp\n      // mock won't be available in the workers of the existing farm.\n      let workerFarm = createWorkerFarm({\n        maxConcurrentWorkers: 0,\n      });\n\n      try {\n        let b = await testCache({\n          inputFS,\n          outputFS: inputFS,\n          workerFarm,\n          async setup() {\n            await inputFS.mkdirp(inputDir);\n            await inputFS.ncp(\n              path.join(__dirname, '/integration/cache'),\n              inputDir,\n            );\n\n            // $FlowFixMe\n            process.versions.pnp = 42;\n\n            fs.renameSync(\n              path.join(inputDir, 'node_modules'),\n              path.join(inputDir, 'pnp'),\n            );\n\n            await inputFS.ncp(\n              path.join(inputDir, 'pnp'),\n              path.join(inputDir, 'pnp2'),\n            );\n\n            await inputFS.writeFile(\n              path.join(inputDir, 'pnp', 'parcel-transformer-mock', 'index.js'),\n              `\n                const Transformer = require('@parcel/plugin').Transformer;\n                module.exports = new Transformer({\n                  transform({asset}) {\n                    return [\n                      {\n                        type: 'js',\n                        content: 'TRANSFORMED CODE',\n                      },\n                    ];\n                  }\n                });\n                `,\n            );\n\n            await inputFS.writeFile(\n              path.join(\n                inputDir,\n                'pnp2',\n                'parcel-transformer-mock',\n                'index.js',\n              ),\n              `\n                const Transformer = require('@parcel/plugin').Transformer;\n                module.exports = new Transformer({\n                  transform({asset}) {\n                    return [\n                      {\n                        type: 'js',\n                        content: 'UPDATED',\n                      },\n                    ];\n                  }\n                });\n                `,\n            );\n\n            await inputFS.writeFile(\n              path.join(inputDir, '.pnp.js'),\n              `\n                const path = require('path');\n                const resolve = request => {\n                  if (request === 'parcel-transformer-mock/' || request === 'foo/') {\n                    return path.join(__dirname, 'pnp', request);\n                  } else if (request === 'pnpapi') {\n                    return __filename;\n                  } else if (request.startsWith('@parcel/')) {\n                    // Use node_modules path for parcel packages so source field is used.\n                    return path.join(__dirname, '../../../../../../node_modules/', request);\n                  } else if (/^((@[^/]+\\\\/[^/]+)|[^/]+)\\\\/?$/.test(request)) {\n                    return path.dirname(require.resolve(path.join(request, 'package.json')));\n                  } else {\n                    return require.resolve(request);\n                  }\n                };\n\n                module.exports = {resolveToUnqualified: resolve, resolveRequest: resolve};\n                `,\n            );\n\n            // $FlowFixMe[prop-missing]\n            Module.findPnpApi = () =>\n              // $FlowFixMe\n              require(path.join(inputDir, '.pnp.js'));\n\n            await inputFS.writeFile(\n              path.join(inputDir, '.parcelrc'),\n              JSON.stringify({\n                extends: '@parcel/config-default',\n                transformers: {\n                  '*.js': ['parcel-transformer-mock'],\n                },\n              }),\n            );\n          },\n          async update(b) {\n            let output = await overlayFS.readFile(\n              b.bundleGraph.getBundles()[0].filePath,\n              'utf8',\n            );\n            assert(output.includes('TRANSFORMED CODE'));\n\n            await inputFS.writeFile(\n              path.join(inputDir, '.pnp.js'),\n              `\n                const path = require('path');\n                const resolve = request => {\n                  if (request === 'parcel-transformer-mock/' || request === 'foo/') {\n                    return path.join(__dirname, 'pnp2', request);\n                  } else if (request === 'pnpapi') {\n                    return __filename;\n                  } else if (request.startsWith('@parcel/')) {\n                    // Use node_modules path for parcel packages so source field is used.\n                    return path.join(__dirname, '../../../../../../node_modules/', request);\n                  } else if (/^((@[^/]+\\\\/[^/]+)|[^/]+)\\\\/?$/.test(request)) {\n                    return path.dirname(require.resolve(path.join(request, 'package.json')));\n                  } else {\n                    return require.resolve(request);\n                  }\n                };\n\n                module.exports = {resolveToUnqualified: resolve, resolveRequest: resolve};\n                `,\n            );\n\n            delete require.cache[path.join(inputDir, '.pnp.js')];\n            await sleep(100);\n          },\n        });\n\n        let output = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('UPDATED'));\n      } finally {\n        process.versions.pnp = origPnpVersion;\n        // $FlowFixMe[prop-missing]\n        Module._resolveFilename = origModuleResolveFilename;\n        await workerFarm.end();\n      }\n    });\n\n    describe('esm', function () {\n      async function setup() {\n        await inputFS.mkdirp(inputDir);\n        await inputFS.ncp(path.join(__dirname, '/integration/cache'), inputDir);\n        await inputFS.writeFile(\n          path.join(inputDir, '.parcelrc'),\n          JSON.stringify({\n            extends: '@parcel/config-default',\n            transformers: {\n              '*.js': ['parcel-transformer-esm'],\n            },\n          }),\n        );\n      }\n\n      it('should invalidate when updating an ESM parcel transformer plugin', async function () {\n        // We cannot invalidate an ESM module in node, so for the test, create a separate worker farm.\n        let workerFarm = createWorkerFarm({\n          maxConcurrentWorkers: 1,\n          useLocalWorker: false,\n        });\n\n        let b;\n        try {\n          b = await testCache({\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await setup();\n            },\n            async update(b) {\n              let output = await inputFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('TRANSFORMED CODE'));\n\n              let transformerDir = path.join(\n                inputDir,\n                'node_modules',\n                'parcel-transformer-esm',\n              );\n              await inputFS.writeFile(\n                path.join(transformerDir, 'constants.js'),\n                'export const message = \"UPDATED\"',\n              );\n              await new Promise(resolve => setTimeout(resolve, 20));\n              return {\n                workerFarm,\n              };\n            },\n          });\n        } finally {\n          await workerFarm.end();\n        }\n\n        let output = await inputFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('UPDATED'));\n      });\n\n      it('should invalidate when updating a CJS dependency in an ESM plugin', async function () {\n        let workerFarm = createWorkerFarm({\n          maxConcurrentWorkers: 1,\n          useLocalWorker: false,\n        });\n\n        let b;\n        try {\n          b = await testCache({\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await setup();\n            },\n            async update(b) {\n              let output = await inputFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('TRANSFORMED CODE 2'));\n\n              let dir = path.join(inputDir, 'node_modules', 'foo');\n              await inputFS.writeFile(\n                path.join(dir, 'foo.js'),\n                'module.exports = 3',\n              );\n              await new Promise(resolve => setTimeout(resolve, 20));\n              return {\n                workerFarm,\n              };\n            },\n          });\n        } finally {\n          await workerFarm.end();\n        }\n\n        let output = await inputFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('TRANSFORMED CODE 3'));\n      });\n\n      it('should invalidate on dynamic imports', async function () {\n        let workerFarm = createWorkerFarm({\n          maxConcurrentWorkers: 1,\n          useLocalWorker: false,\n        });\n\n        let b;\n        try {\n          b = await testCache({\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await setup();\n            },\n            async update(b) {\n              let output = await inputFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('console.log(\"a\")'));\n\n              let dir = path.join(\n                inputDir,\n                'node_modules',\n                'parcel-transformer-esm',\n              );\n              await inputFS.writeFile(\n                path.join(dir, 'data/a.js'),\n                'export const value = \"updated\";',\n              );\n              await new Promise(resolve => setTimeout(resolve, 20));\n              return {\n                workerFarm,\n              };\n            },\n          });\n        } finally {\n          await workerFarm.end();\n        }\n\n        let output = await inputFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('console.log(\"updated\")'));\n      });\n\n      it('should invalidate on startup for non-static imports', async function () {\n        let spy = sinon.spy(logger, 'warn');\n        let workerFarm = createWorkerFarm({\n          maxConcurrentWorkers: 1,\n          useLocalWorker: false,\n        });\n\n        let b;\n        try {\n          b = await testCache({\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await setup();\n              await inputFS.writeFile(\n                path.join(\n                  inputDir,\n                  'node_modules',\n                  'parcel-transformer-esm',\n                  'dep.cjs',\n                ),\n                'var dep = \"foo\";exports.value = require(dep);',\n              );\n            },\n            async update(b) {\n              let output = await inputFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('TRANSFORMED CODE 2'));\n              assert(\n                spy.calledWith([\n                  {\n                    message: md`${path.normalize(\n                      'node_modules/parcel-transformer-esm/index.js',\n                    )} contains non-statically analyzable dependencies in its module graph. This causes Parcel to invalidate the cache on startup.`,\n                    origin: '@parcel/package-manager',\n                  },\n                ]),\n              );\n\n              await inputFS.writeFile(\n                path.join(inputDir, 'node_modules', 'foo', 'foo.js'),\n                'module.exports = 3',\n              );\n              await new Promise(resolve => setTimeout(resolve, 20));\n              return {\n                workerFarm,\n              };\n            },\n          });\n        } finally {\n          spy.restore();\n          await workerFarm.end();\n        }\n\n        let output = await inputFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('TRANSFORMED CODE 3'));\n      });\n    });\n\n    describe('postcss', function () {\n      it('should invalidate when a postcss plugin changes', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.css'],\n            async setup() {\n              await overlayFS.mkdirp(path.join(inputDir, 'node_modules'));\n              await ncp(\n                path.join(\n                  path.join(\n                    __dirname,\n                    'integration',\n                    'postcss-autoinstall',\n                    'postcss-test',\n                  ),\n                ),\n                path.join(inputDir, 'node_modules', 'postcss-test'),\n              );\n            },\n            async update(b) {\n              let output = await overlayFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('background: green'));\n\n              let plugin = path.join(\n                inputDir,\n                'node_modules',\n                'postcss-test',\n                'index.js',\n              );\n              let pluginContents = await overlayFS.readFile(plugin, 'utf8');\n              await overlayFS.writeFile(\n                plugin,\n                pluginContents.replace('green', 'red'),\n              );\n            },\n          },\n          'postcss-autoinstall/npm',\n        );\n\n        let output = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('background: red'));\n      });\n\n      it('should invalidate when a JS postcss config changes', async function () {\n        let b = await testCache(\n          {\n            entries: ['style.css'],\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await inputFS.mkdirp(inputDir);\n              await inputFS.ncp(\n                path.join(__dirname, '/integration/postcss-js-config-7'),\n                inputDir,\n              );\n            },\n            async update(b) {\n              let output = await inputFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('background-color: red;'));\n\n              let config = path.join(inputDir, 'postcss.config.js');\n              let configContents = await inputFS.readFile(config, 'utf8');\n              await inputFS.writeFile(\n                config,\n                configContents.replace('red', 'green'),\n              );\n              await sleep(100);\n            },\n          },\n          'postcss-js-config-7',\n        );\n\n        let output = await inputFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('background-color: green'));\n      });\n\n      it('should invalidate when a JS postcss config dependency changes', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.css'],\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await inputFS.mkdirp(path.join(inputDir, 'node_modules'));\n              await inputFS.ncp(\n                path.join(__dirname, '/integration/postcss-autoinstall/npm'),\n                inputDir,\n              );\n              await inputFS.ncp(\n                path.join(\n                  path.join(\n                    __dirname,\n                    'integration',\n                    'postcss-autoinstall',\n                    'postcss-test',\n                  ),\n                ),\n                path.join(inputDir, 'node_modules', 'postcss-test'),\n              );\n\n              await inputFS.rimraf(path.join(inputDir, '.postcssrc'));\n              let config = path.join(inputDir, 'postcss.config.js');\n              await inputFS.writeFile(\n                config,\n                'module.exports = { plugins: [require(\"postcss-test\")] };',\n              );\n            },\n            async update(b) {\n              let output = await inputFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('background: green'));\n\n              let plugin = path.join(\n                inputDir,\n                'node_modules',\n                'postcss-test',\n                'index.js',\n              );\n              let pluginContents = await inputFS.readFile(plugin, 'utf8');\n              await inputFS.writeFile(\n                plugin,\n                pluginContents.replace('green', 'red'),\n              );\n\n              await sleep(100);\n            },\n          },\n          'postcss-autoinstall/npm',\n        );\n\n        let output = await inputFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('background: red'));\n      });\n\n      it('should invalidate when an ESM postcss config changes', async function () {\n        // We cannot invalidate an ESM module in node, so for the test, create a separate worker farm.\n        let workerFarm = createWorkerFarm({\n          maxConcurrentWorkers: 1,\n          useLocalWorker: false,\n        });\n\n        let b;\n        try {\n          b = await testCache(\n            {\n              entries: ['style.css'],\n              inputFS,\n              outputFS: inputFS,\n              async setup() {\n                await inputFS.mkdirp(inputDir);\n                await inputFS.ncp(\n                  path.join(__dirname, '/integration/postcss-esm-config'),\n                  inputDir,\n                );\n              },\n              async update(b) {\n                let output = await inputFS.readFile(\n                  b.bundleGraph.getBundles()[0].filePath,\n                  'utf8',\n                );\n                assert(output.includes('background-color: red;'));\n\n                let config = path.join(inputDir, 'postcss.config.mjs');\n                let configContents = await inputFS.readFile(config, 'utf8');\n                await inputFS.writeFile(\n                  config,\n                  configContents.replace('red', 'green'),\n                );\n                await sleep(100);\n                return {workerFarm};\n              },\n            },\n            'postcss-esm-config',\n          );\n        } finally {\n          await workerFarm.end();\n        }\n\n        let output = await inputFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('background-color: green'));\n      });\n\n      it('should invalidate when a JSON postcss config changes', async function () {\n        let b = await testCache(\n          {\n            entries: ['nested/index.css'],\n            async update(b) {\n              let output = await overlayFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('background-color: green;'));\n\n              let configContents = await overlayFS.readFile(\n                path.join(inputDir, '.postcssrc'),\n                'utf8',\n              );\n              await overlayFS.writeFile(\n                path.join(inputDir, '.postcssrc'),\n                configContents.replace('green', 'red'),\n              );\n            },\n          },\n          'postcss-import',\n        );\n\n        let output = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('background-color: red'));\n      });\n\n      it('should invalidate when a closer postcss config is added', async function () {\n        let b = await testCache(\n          {\n            entries: ['nested/index.css'],\n            async update(b) {\n              let output = await overlayFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('background-color: green;'));\n\n              let configContents = await overlayFS.readFile(\n                path.join(inputDir, '.postcssrc'),\n                'utf8',\n              );\n              await overlayFS.writeFile(\n                path.join(inputDir, 'nested', '.postcssrc'),\n                configContents.replace('green', 'red'),\n              );\n            },\n          },\n          'postcss-import',\n        );\n\n        let output = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('background-color: red'));\n      });\n    });\n\n    describe('posthtml', function () {\n      it('should invalidate when a posthtml plugin changes', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.html'],\n            async setup() {\n              await overlayFS.mkdirp(path.join(inputDir, 'node_modules'));\n              await ncp(\n                path.join(\n                  path.join(\n                    __dirname,\n                    'integration',\n                    'posthtml-autoinstall',\n                    'posthtml-test',\n                  ),\n                ),\n                path.join(inputDir, 'node_modules', 'posthtml-test'),\n              );\n            },\n            async update(b) {\n              let output = await overlayFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('<span id=\"test\">Test</span>'));\n\n              let plugin = path.join(\n                inputDir,\n                'node_modules',\n                'posthtml-test',\n                'index.js',\n              );\n              let pluginContents = await overlayFS.readFile(plugin, 'utf8');\n              await overlayFS.writeFile(\n                plugin,\n                pluginContents.replace('span', 'section'),\n              );\n            },\n          },\n          'posthtml-autoinstall',\n        );\n\n        let output = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('<section id=\"test\">Test</section>'));\n      });\n\n      it('should invalidate when a JS postcss config changes', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.html'],\n            inputFS,\n            outputFS: inputFS,\n            async setup() {\n              await inputFS.mkdirp(inputDir);\n              await inputFS.ncp(\n                path.join(__dirname, '/integration/posthtml'),\n                inputDir,\n              );\n\n              await inputFS.mkdirp(path.join(inputDir, 'include'));\n              await inputFS.writeFile(\n                path.join(inputDir, 'include', 'other.html'),\n                '<h1>Another great page</h1>',\n              );\n            },\n            async update(b) {\n              let output = await inputFS.readFile(\n                b.bundleGraph.getBundles()[0].filePath,\n                'utf8',\n              );\n              assert(output.includes('<h1>Other page</h1>'));\n\n              let config = path.join(inputDir, '.posthtmlrc.js');\n              let configContents = await inputFS.readFile(config, 'utf8');\n              await inputFS.writeFile(\n                config,\n                configContents.replace('__dirname', '__dirname + \"/include\"'),\n              );\n              await sleep(100);\n            },\n          },\n          'posthtml',\n        );\n\n        let output = await inputFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(output.includes('<h1>Another great page</h1>'));\n      });\n    });\n  });\n\n  describe('bundling', function () {\n    it('should invalidate when switching to a different bundler plugin', async function () {\n      let b = await testCache({\n        async update(b) {\n          assert.equal(b.bundleGraph.getBundles().length, 1);\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              bundler: 'parcel-bundler-test',\n            }),\n          );\n        },\n      });\n\n      assert.equal(b.bundleGraph.getBundles().length, 4);\n    });\n\n    it('should invalidate when a bundler plugin is updated', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              bundler: 'parcel-bundler-test',\n            }),\n          );\n        },\n        async update(b) {\n          assert.equal(b.bundleGraph.getBundles().length, 4);\n          assert.equal(b.bundleGraph.getBundles()[0].name, 'index.js');\n\n          let bundler = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-bundler-test',\n            'index.js',\n          );\n          await overlayFS.writeFile(\n            bundler,\n            (\n              await overlayFS.readFile(bundler, 'utf8')\n            ).replace('Boolean(dependency.isEntry)', 'false'),\n          );\n        },\n      });\n\n      assert.equal(b.bundleGraph.getBundles().length, 4);\n      assert(b.bundleGraph.getBundles()[0].name.includes('HASH_REF'));\n    });\n\n    it('should invalidate when adding a namer plugin', async function () {\n      let b = await testCache({\n        async update(b) {\n          let bundles = b.bundleGraph.getBundles().map(b => b.name);\n          assert.deepEqual(bundles, ['index.js']);\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              namers: ['parcel-namer-test'],\n            }),\n          );\n        },\n      });\n\n      let bundles = b.bundleGraph.getBundles();\n      assert.deepEqual(\n        bundles.map(b => b.name),\n        bundles.map(b => `${b.id}.${b.type}`),\n      );\n    });\n\n    it('should invalidate when a namer plugin is updated', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              namers: ['parcel-namer-test'],\n            }),\n          );\n        },\n        async update(b) {\n          let bundles = b.bundleGraph.getBundles();\n          assert.deepEqual(\n            bundles.map(b => b.name),\n            bundles.map(b => `${b.id}.${b.type}`),\n          );\n\n          let namer = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-namer-test',\n            'index.js',\n          );\n          await overlayFS.writeFile(\n            namer,\n            (\n              await overlayFS.readFile(namer, 'utf8')\n            ).replace('bundle.id', 'bundle.id.slice(-8)'),\n          );\n        },\n      });\n\n      let bundles = b.bundleGraph.getBundles();\n      assert.deepEqual(\n        bundles.map(b => b.name),\n        bundles.map(b => `${b.id.slice(-8)}.${b.type}`),\n      );\n    });\n\n    it('should invalidate when adding a runtime plugin', async function () {\n      let b = await testCache({\n        async update(b) {\n          let res = await run(b.bundleGraph, null, {require: false});\n          assert.equal(res.runtime_test, undefined);\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              runtimes: ['parcel-runtime-test'],\n            }),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph, null, {require: false});\n      assert.equal(res.runtime_test, true);\n    });\n\n    it('should invalidate when a runtime is updated', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              runtimes: ['parcel-runtime-test'],\n            }),\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph, null, {require: false});\n          assert.equal(res.runtime_test, true);\n          assert.equal(res.test_runtime, undefined);\n\n          let namer = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-runtime-test',\n            'index.js',\n          );\n          await overlayFS.writeFile(\n            namer,\n            (\n              await overlayFS.readFile(namer, 'utf8')\n            ).replace('runtime_test', 'test_runtime'),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph, null, {require: false});\n      assert.equal(res.runtime_test, undefined);\n      assert.equal(res.test_runtime, true);\n    });\n\n    describe('bundler config', function () {\n      it('should support adding bundler config', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.js'],\n            mode: 'production',\n            async setup() {\n              let pkgFile = path.join(inputDir, 'package.json');\n              let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n              await overlayFS.writeFile(\n                pkgFile,\n                JSON.stringify({\n                  ...pkg,\n                  '@parcel/bundler-default': undefined,\n                }),\n              );\n            },\n            async update(b) {\n              assertBundles(b.bundleGraph, [\n                {\n                  assets: ['a.js'],\n                },\n                {\n                  assets: ['b.js'],\n                },\n                {\n                  name: 'index.js',\n                  assets: [\n                    'index.js',\n                    'c.js',\n                    'cacheLoader.js',\n                    'js-loader.js',\n                  ],\n                },\n                {\n                  assets: ['common.js', 'lodash.js'],\n                },\n              ]);\n              let pkgFile = path.join(inputDir, 'package.json');\n              let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n              await overlayFS.writeFile(\n                pkgFile,\n                JSON.stringify({\n                  ...pkg,\n                  '@parcel/bundler-default': {\n                    minBundleSize: 9000000,\n                  },\n                }),\n              );\n            },\n          },\n          'dynamic-common-large',\n        );\n\n        assertBundles(b.bundleGraph, [\n          {\n            assets: ['a.js', 'common.js', 'lodash.js'],\n          },\n          {\n            assets: ['b.js', 'common.js', 'lodash.js'],\n          },\n          {\n            name: 'index.js',\n            assets: ['index.js', 'c.js', 'cacheLoader.js', 'js-loader.js'],\n          },\n        ]);\n      });\n\n      it('should support adding bundler config for parallel request limits', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.js'],\n            mode: 'production',\n            async setup() {\n              let pkgFile = path.join(inputDir, 'package.json');\n              let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n              await overlayFS.writeFile(\n                pkgFile,\n                JSON.stringify({\n                  ...pkg,\n                  '@parcel/bundler-default': undefined,\n                }),\n              );\n            },\n            async update(b) {\n              assert.deepEqual(b.bundleGraph.getBundles().length, 7);\n              let pkgFile = path.join(inputDir, 'package.json');\n              let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n              await overlayFS.writeFile(\n                pkgFile,\n                JSON.stringify({\n                  ...pkg,\n                  '@parcel/bundler-default': {\n                    maxParallelRequests: 0,\n                  },\n                }),\n              );\n            },\n          },\n          'large-bundlegroup',\n        );\n        assert.deepEqual(b.bundleGraph.getBundles().length, 5);\n      });\n\n      it('should support updating bundler config', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.js'],\n            mode: 'production',\n            async setup() {\n              let pkgFile = path.join(inputDir, 'package.json');\n              let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n              await overlayFS.writeFile(\n                pkgFile,\n                JSON.stringify({\n                  ...pkg,\n                  '@parcel/bundler-default': {\n                    minBundleSize: 8000,\n                  },\n                }),\n              );\n            },\n            async update(b) {\n              assertBundles(b.bundleGraph, [\n                {\n                  assets: ['a.js'],\n                },\n                {\n                  assets: ['b.js'],\n                },\n                {\n                  name: 'index.js',\n                  assets: [\n                    'index.js',\n                    'c.js',\n                    'cacheLoader.js',\n                    'js-loader.js',\n                  ],\n                },\n                {\n                  assets: ['common.js', 'lodash.js'],\n                },\n              ]);\n              let pkgFile = path.join(inputDir, 'package.json');\n              let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n              await overlayFS.writeFile(\n                pkgFile,\n                JSON.stringify({\n                  ...pkg,\n                  '@parcel/bundler-default': {\n                    minBundleSize: 9000000,\n                  },\n                }),\n              );\n            },\n          },\n          'dynamic-common-large',\n        );\n\n        assertBundles(b.bundleGraph, [\n          {\n            assets: ['a.js', 'common.js', 'lodash.js'],\n          },\n          {\n            assets: ['b.js', 'common.js', 'lodash.js'],\n          },\n          {\n            name: 'index.js',\n            assets: ['index.js', 'c.js', 'cacheLoader.js', 'js-loader.js'],\n          },\n        ]);\n      });\n\n      it('should support removing bundler config', async function () {\n        let b = await testCache(\n          {\n            entries: ['index.js'],\n            mode: 'production',\n            async setup() {\n              let pkgFile = path.join(inputDir, 'package.json');\n              let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n              await overlayFS.writeFile(\n                pkgFile,\n                JSON.stringify({\n                  ...pkg,\n                  '@parcel/bundler-default': {\n                    minBundleSize: 9000000,\n                  },\n                }),\n              );\n            },\n            async update(b) {\n              assertBundles(b.bundleGraph, [\n                {\n                  assets: ['a.js', 'common.js', 'lodash.js'],\n                },\n                {\n                  assets: ['b.js', 'common.js', 'lodash.js'],\n                },\n                {\n                  name: 'index.js',\n                  assets: [\n                    'index.js',\n                    'c.js',\n                    'cacheLoader.js',\n                    'js-loader.js',\n                  ],\n                },\n              ]);\n              let pkgFile = path.join(inputDir, 'package.json');\n              let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n              await overlayFS.writeFile(\n                pkgFile,\n                JSON.stringify({\n                  ...pkg,\n                  '@parcel/bundler-default': undefined,\n                }),\n              );\n            },\n          },\n          'dynamic-common-large',\n        );\n        assertBundles(b.bundleGraph, [\n          {\n            assets: ['a.js'],\n          },\n          {\n            assets: ['b.js'],\n          },\n          {\n            name: 'index.js',\n            assets: ['index.js', 'c.js', 'cacheLoader.js', 'js-loader.js'],\n          },\n          {\n            assets: ['common.js', 'lodash.js'],\n          },\n        ]);\n      });\n    });\n  });\n\n  describe('packaging', function () {\n    it('should invalidate when switching to a different packager plugin', async function () {\n      let b = await testCache({\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.notEqual(res, 'packaged');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.js': 'parcel-packager-test',\n              },\n            }),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'packaged');\n    });\n\n    it('should invalidate when a packager is updated', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.js': 'parcel-packager-test',\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.equal(res, 'packaged');\n\n          let packager = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-packager-test',\n            'index.js',\n          );\n          await overlayFS.writeFile(\n            packager,\n            (\n              await overlayFS.readFile(packager, 'utf8')\n            ).replace('packaged', 'updated'),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'updated');\n    });\n\n    it('should invalidate when adding packager config', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.js': 'parcel-packager-test',\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.equal(res, 'packaged');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.packagerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'test');\n    });\n\n    it('should invalidate when updating packager config', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.js': 'parcel-packager-test',\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.packagerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.equal(res, 'test');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.packagerrc'),\n            JSON.stringify({value: 'updated'}),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'updated');\n    });\n\n    it('should invalidate when removing packager config', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.js': 'parcel-packager-test',\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.packagerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.equal(res, 'test');\n\n          await overlayFS.unlink(path.join(inputDir, '.packagerrc'));\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'packaged');\n    });\n\n    it('should invalidate when adding an optimizer plugin', async function () {\n      let b = await testCache({\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.notEqual(res, 'optimized');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.js': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'optimized');\n    });\n\n    it('should invalidate when removing an optimizer plugin', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.js': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.equal(res, 'optimized');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.js': [],\n              },\n            }),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.notEqual(res, 'optimized');\n    });\n\n    it('should invalidate when an optimizer is updated', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.js': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.equal(res, 'optimized');\n\n          let optimizer = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-optimizer-test',\n            'index.js',\n          );\n          await overlayFS.writeFile(\n            optimizer,\n            (\n              await overlayFS.readFile(optimizer, 'utf8')\n            ).replace('optimized', 'updated'),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'updated');\n    });\n\n    it('should invalidate when adding optimizer config', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.js': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.equal(res, 'optimized');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.optimizerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'test');\n    });\n\n    it('should invalidate when updating packager config', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.js': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.optimizerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.equal(res, 'test');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.optimizerrc'),\n            JSON.stringify({value: 'updated'}),\n          );\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'updated');\n    });\n\n    it('should invalidate when removing packager config', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.js': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.optimizerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n        async update(b) {\n          let res = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert.equal(res, 'test');\n\n          await overlayFS.unlink(path.join(inputDir, '.optimizerrc'));\n        },\n      });\n\n      let res = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.equal(res, 'optimized');\n    });\n\n    it('should invalidate when an asset content changes', async function () {\n      let b = await testCache({\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 4);\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'node_modules/foo/foo.js'),\n            'module.exports = 3',\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 6);\n    });\n\n    it('should invalidate when an inline bundle changes', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./entries/a.js\");',\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert(res.includes(`let a = 'a'`));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/entries/a.js'),\n            `export let a = 'b';`,\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert(res.includes(`let a = 'b'`));\n    });\n\n    it('should invalidate when switching to a different packager for an inline bundle', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.notEqual(res, 'packaged');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.txt': 'parcel-packager-test',\n              },\n            }),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'packaged');\n    });\n\n    it('should invalidate when a packager for an inline bundle is updated', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.txt': 'parcel-packager-test',\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 'packaged');\n\n          let packager = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-packager-test',\n            'index.js',\n          );\n          await overlayFS.writeFile(\n            packager,\n            (\n              await overlayFS.readFile(packager, 'utf8')\n            ).replace('packaged', 'updated'),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'updated');\n    });\n\n    it('should invalidate when adding packager config for an inline bundle', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.txt': 'parcel-packager-test',\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 'packaged');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.packagerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'test');\n    });\n\n    it('should invalidate when updating packager config for an inline bundle', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.txt': 'parcel-packager-test',\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.packagerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 'test');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.packagerrc'),\n            JSON.stringify({value: 'updated'}),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'updated');\n    });\n\n    it('should invalidate when removing packager config for an inline bundle', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              packagers: {\n                '*.txt': 'parcel-packager-test',\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.packagerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 'test');\n\n          await overlayFS.unlink(path.join(inputDir, '.packagerrc'));\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'packaged');\n    });\n\n    it('should invalidate when adding an optimizer for an inline bundle', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.notEqual(res, 'packaged');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.txt': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'optimized');\n    });\n\n    it('should invalidate when an optimizer for an inline bundle is updated', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.txt': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 'optimized');\n\n          let optimizer = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-optimizer-test',\n            'index.js',\n          );\n          await overlayFS.writeFile(\n            optimizer,\n            (\n              await overlayFS.readFile(optimizer, 'utf8')\n            ).replace('optimized', 'updated'),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'updated');\n    });\n\n    it('should invalidate when adding optimizer config for an inline bundle', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.txt': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 'optimized');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.optimizerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'test');\n    });\n\n    it('should invalidate when updating optimizer config for an inline bundle', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.txt': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.optimizerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 'test');\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.optimizerrc'),\n            JSON.stringify({value: 'updated'}),\n          );\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'updated');\n    });\n\n    it('should invalidate when removing optimizer config for an inline bundle', async function () {\n      let b = await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/index.js'),\n            'module.exports = require(\"bundle-text:./test.txt\");',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, 'src/test.txt'),\n            'test',\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              optimizers: {\n                '*.txt': ['parcel-optimizer-test'],\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.optimizerrc'),\n            JSON.stringify({value: 'test'}),\n          );\n        },\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 'test');\n\n          await overlayFS.unlink(path.join(inputDir, '.optimizerrc'));\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 'optimized');\n    });\n\n    it('should invalidate when deleting a dist file', async function () {\n      let b = await testCache({\n        outputFS: overlayFS,\n        async update(b) {\n          assert(await overlayFS.exists(path.join(distDir, 'index.js')));\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 4);\n\n          await overlayFS.unlink(path.join(distDir, 'index.js'));\n        },\n      });\n\n      assert(await overlayFS.exists(path.join(distDir, 'index.js')));\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 4);\n    });\n\n    it('should invalidate when deleting a source map', async function () {\n      await testCache({\n        outputFS: overlayFS,\n        async update() {\n          assert(await overlayFS.exists(path.join(distDir, 'index.js.map')));\n\n          await overlayFS.unlink(path.join(distDir, 'index.js.map'));\n        },\n      });\n\n      assert(await overlayFS.exists(path.join(distDir, 'index.js.map')));\n    });\n\n    it('should invalidate when the dist directory', async function () {\n      await testCache({\n        outputFS: overlayFS,\n        async update() {\n          assert(await overlayFS.exists(path.join(distDir, 'index.js')));\n          assert(await overlayFS.exists(path.join(distDir, 'index.js.map')));\n\n          await overlayFS.rimraf(distDir);\n        },\n      });\n\n      assert(await overlayFS.exists(path.join(distDir, 'index.js')));\n      assert(await overlayFS.exists(path.join(distDir, 'index.js.map')));\n    });\n\n    it('should hit the cache when there are no changes', async function () {\n      let b = await testCache({\n        async update(b) {\n          let res = await run(b.bundleGraph);\n          assert.equal(res, 4);\n        },\n      });\n\n      let res = await run(b.bundleGraph);\n      assert.equal(res, 4);\n    });\n\n    it('should write bundle graph to cache on bundling error', async function () {\n      let overlayFSPackageManager = new NodePackageManager(\n        overlayFS,\n        __dirname,\n      );\n      let entries = 'source/index.js';\n      let options = {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n        packageManager: overlayFSPackageManager,\n        shouldDisableCache: false,\n        inputFS: overlayFS,\n        cacheDir: path.join(__dirname, '.parcel-cache'),\n      };\n\n      await fsFixture(overlayFS)`\n      source\n        foo.js:\n\n          export default 2;\n        index.js:\n          import('./foo');\n\n          export default 1;\n        .parcelrc:\n          {\n            \"extends\": \"@parcel/config-default\",\n            \"bundler\": \"./test-bundler.js\"\n          }\n        test-bundler.js:\n          import {Bundler} from '@parcel/plugin'\n          import DefaultBundler from '@parcel/bundler-default'\n\n          const CONFIG = Symbol.for('parcel-plugin-config');\n\n          export default new Bundler({\n            loadConfig({config, options}) {\n              return DefaultBundler[CONFIG].loadConfig({config, options});\n            },\n\n            bundle({bundleGraph, config}) {\n              DefaultBundler[CONFIG].bundle({bundleGraph, config});\n            },\n            optimize() {throw new Error(\"Intentionally throw error\")},\n          });\n        yarn.lock:`;\n      // $FlowFixMe\n      await assert.rejects(() => bundle(entries, options));\n\n      let resolvedOptions = await resolveOptions(\n        getParcelOptions(entries, options),\n      );\n\n      let bundleGraphCacheKey =\n        hashString(\n          `${version}:BundleGraph:${\n            JSON.stringify(resolvedOptions.entries) ?? ''\n          }${resolvedOptions.mode}${\n            resolvedOptions.shouldBuildLazily ? 'lazy' : 'eager'\n          }`,\n        ) + '-BundleGraph';\n\n      assert(\n        deserialize(\n          await resolvedOptions.cache.getLargeBlob(bundleGraphCacheKey),\n        ),\n      );\n    });\n\n    it('should invalidate when a terser config is modified', async function () {\n      let b = await testCache({\n        mode: 'production',\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.terserrc'),\n            JSON.stringify({\n              mangle: false,\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes('$parcel$interopDefault'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.terserrc'),\n            JSON.stringify({\n              mangle: true,\n            }),\n          );\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('$parcel$interopDefault'));\n    });\n\n    it('should invalidate when an htmlnano config is modified', async function () {\n      let b = await testCache({\n        mode: 'production',\n        entries: ['src/index.html'],\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.htmlnanorc.json'),\n            JSON.stringify({\n              removeAttributeQuotes: true,\n            }),\n          );\n        },\n        async update(b) {\n          let contents = await overlayFS.readFile(\n            b.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes('type=module'));\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.htmlnanorc.json'),\n            JSON.stringify({\n              removeAttributeQuotes: false,\n            }),\n          );\n        },\n      });\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('type=module'));\n    });\n  });\n\n  describe('compression', function () {\n    it('should invaldate when adding a compressor plugin', async function () {\n      await testCache({\n        async update() {\n          let files = await outputFS.readdir(distDir);\n          assert.deepEqual(files.sort(), ['index.js', 'index.js.map']);\n\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              compressors: {\n                '*.js': ['...', '@parcel/compressor-gzip'],\n              },\n            }),\n          );\n        },\n        mode: 'production',\n      });\n\n      let files = await outputFS.readdir(distDir);\n      assert.deepEqual(files.sort(), [\n        'index.js',\n        'index.js.gz',\n        'index.js.map',\n      ]);\n    });\n\n    it('should invalidate when updating a compressor plugin', async function () {\n      await testCache({\n        async setup() {\n          await overlayFS.writeFile(\n            path.join(inputDir, '.parcelrc'),\n            JSON.stringify({\n              extends: '@parcel/config-default',\n              compressors: {\n                '*.js': ['...', 'parcel-compressor-test'],\n              },\n            }),\n          );\n        },\n        async update() {\n          let files = await outputFS.readdir(distDir);\n          assert.deepEqual(files.sort(), [\n            'index.js',\n            'index.js.abc',\n            'index.js.map',\n          ]);\n\n          let compressor = path.join(\n            inputDir,\n            'node_modules',\n            'parcel-compressor-test',\n            'index.js',\n          );\n          await overlayFS.writeFile(\n            compressor,\n            (\n              await overlayFS.readFile(compressor, 'utf8')\n            ).replace('abc', 'def'),\n          );\n        },\n      });\n\n      let files = await outputFS.readdir(distDir);\n      assert.deepEqual(files.sort(), [\n        'index.js',\n        'index.js.abc',\n        'index.js.def',\n        'index.js.map',\n      ]);\n    });\n  });\n\n  describe('scope hoisting', function () {\n    it('should support adding sideEffects config', function () {});\n\n    it('should support updating sideEffects config', function () {});\n\n    it('should support removing sideEffects config', function () {});\n\n    it('should wrap modules when they become conditional', async function () {\n      let b = await testCache(\n        {\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n          entries: ['a.js'],\n          async setup() {\n            let contents = await overlayFS.readFile(\n              path.join(inputDir, 'a.js'),\n              'utf8',\n            );\n            await overlayFS.writeFile(\n              path.join(inputDir, 'a.js'),\n              contents.replace(/if \\(b\\) \\{((?:.|\\n)+)\\}/, '$1'),\n            );\n          },\n          async update(b) {\n            let out = [];\n            await run(b.bundleGraph, {\n              b: false,\n              output(o) {\n                out.push(o);\n              },\n            });\n\n            assert.deepEqual(out, ['a', 'b', 'c', 'd']);\n\n            let contents = await overlayFS.readFile(\n              path.join(\n                __dirname,\n                'integration/scope-hoisting/commonjs/require-conditional/a.js',\n              ),\n              'utf8',\n            );\n            await overlayFS.writeFile(path.join(inputDir, 'a.js'), contents);\n          },\n        },\n        'scope-hoisting/commonjs/require-conditional',\n      );\n\n      let out = [];\n      await run(b.bundleGraph, {\n        b: false,\n        output(o) {\n          out.push(o);\n        },\n      });\n\n      assert.deepEqual(out, ['a', 'd']);\n    });\n  });\n\n  describe('runtime', () => {\n    it('should support updating files added by runtimes', async function () {\n      let b = await testCache(async b => {\n        let contents = await overlayFS.readFile(\n          b.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n        assert(contents.includes('INITIAL CODE'));\n        await overlayFS.writeFile(\n          path.join(inputDir, 'dynamic-runtime.js'),\n          \"module.exports = 'UPDATED CODE'\",\n        );\n      }, 'runtime-update');\n\n      let contents = await overlayFS.readFile(\n        b.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('UPDATED CODE'));\n    });\n  });\n\n  describe('Query Parameters', () => {\n    it('Should create additional assets if multiple query parameter combinations are used', async function () {\n      let b = await testCache(\n        {\n          entries: ['reformat.html'],\n          update: async b => {\n            let bundles = b.bundleGraph.getBundles();\n            let contents = await overlayFS.readFile(\n              bundles[0].filePath,\n              'utf8',\n            );\n            assert(contents.includes('.webp\" alt=\"test image\">'));\n            assert.equal(bundles.length, 2);\n            await overlayFS.writeFile(\n              path.join(inputDir, 'reformat.html'),\n              `<picture>\n              <source src=\"url:./image.jpg?as=webp&width=400\" type=\"image/webp\" />\n              <source src=\"url:./image.jpg?as=jpg&width=400\" type=\"image/jpeg\" />\n              <img src=\"url:./image.jpg?as=jpg&width=800\" alt=\"test image\" />\n            </picture>`,\n            );\n          },\n        },\n        'image',\n      );\n\n      let bundles = b.bundleGraph.getBundles();\n      let contents = await overlayFS.readFile(bundles[0].filePath, 'utf8');\n      assert(contents.includes('.webp\" type=\"image/webp\">'));\n      assert(contents.includes('.jpeg\" type=\"image/jpeg\">'));\n      assert(contents.includes('.jpeg\" alt=\"test image\">'));\n      assert.equal(bundles.length, 4);\n    });\n  });\n\n  it('should correctly read additional child assets from cache', async function () {\n    await ncp(\n      path.join(__dirname, '/integration/postcss-modules-cjs'),\n      path.join(inputDir),\n    );\n\n    let entries = 'index.js';\n\n    let b = await runBundle(entries, {\n      defaultTargetOptions: {\n        shouldOptimize: false,\n      },\n    });\n    let result1 = (await run(b.bundleGraph))();\n\n    b = await runBundle(entries, {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n    });\n    let result2 = (await run(b.bundleGraph))();\n\n    b = await runBundle(entries, {\n      defaultTargetOptions: {\n        shouldOptimize: false,\n      },\n    });\n    let result3 = (await run(b.bundleGraph))();\n\n    assert(typeof result1 === 'string' && result1.includes('foo'));\n    assert.strictEqual(result1, result2);\n    assert.strictEqual(result1, result3);\n  });\n\n  it('should correctly read additional child assets from cache 2', async function () {\n    await ncp(\n      path.join(__dirname, '/integration/postcss-modules-cjs'),\n      path.join(inputDir),\n    );\n\n    let entries = 'index.js';\n\n    await overlayFS.writeFile(\n      path.join(inputDir, 'foo.module.css'),\n      `.foo {\n  color: red;\n}`,\n    );\n\n    let b = await runBundle(entries);\n    let result1 = (await run(b.bundleGraph))();\n\n    await overlayFS.writeFile(\n      path.join(inputDir, 'foo.module.css'),\n      `.foo {\n  color: blue;\n}`,\n    );\n\n    b = await runBundle(entries);\n    let result2 = (await run(b.bundleGraph))();\n\n    await overlayFS.writeFile(\n      path.join(inputDir, 'foo.module.css'),\n      `.foo {\n  color: red;\n}`,\n    );\n\n    b = await runBundle(entries);\n    let result3 = (await run(b.bundleGraph))();\n\n    assert(typeof result1 === 'string' && result1.includes('foo'));\n    assert.strictEqual(result1, result2);\n    assert.strictEqual(result1, result3);\n  });\n\n  it('should correctly reuse intermediate pipeline results when transforming', async function () {\n    await ncp(path.join(__dirname, '/integration/json'), path.join(inputDir));\n\n    let entry = path.join(inputDir, 'index.js');\n    let original = await overlayFS.readFile(entry, 'utf8');\n\n    let b = await runBundle(entry);\n    let result1 = (await run(b.bundleGraph))();\n\n    await overlayFS.writeFile(\n      entry,\n      'module.exports = function(){ return 10; }',\n    );\n\n    b = await runBundle(entry);\n    let result2 = (await run(b.bundleGraph))();\n\n    await overlayFS.writeFile(entry, original);\n\n    b = await runBundle(entry);\n    let result3 = (await run(b.bundleGraph))();\n\n    assert.strictEqual(result1, 3);\n    assert.strictEqual(result2, 10);\n    assert.strictEqual(result3, 3);\n  });\n\n  it('properly watches included files even after resaving them without changes', async function () {\n    this.timeout(15000);\n    let subscription;\n    let fixture = path.join(__dirname, '/integration/included-file');\n    try {\n      let b = bundler(path.join(fixture, 'index.txt'), {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n      });\n      await overlayFS.mkdirp(fixture);\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'a');\n      subscription = await b.watch();\n      let event = await getNextBuild(b);\n      invariant(event.type === 'buildSuccess');\n      let output1 = await overlayFS.readFile(\n        event.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(output1, 'a');\n\n      // Change included file\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'b');\n      event = await getNextBuild(b);\n      invariant(event.type === 'buildSuccess');\n      let output2 = await overlayFS.readFile(\n        event.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(output2, 'b');\n\n      // Rewrite included file without change\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'b');\n      event = await getNextBuild(b);\n      invariant(event.type === 'buildSuccess');\n      let output3 = await overlayFS.readFile(\n        event.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(output3, 'b');\n\n      // Change included file\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'c');\n      event = await getNextBuild(b);\n      invariant(event.type === 'buildSuccess');\n      let output4 = await overlayFS.readFile(\n        event.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(output4, 'c');\n    } finally {\n      if (subscription) {\n        await subscription.unsubscribe();\n        subscription = null;\n      }\n    }\n  });\n\n  it('properly handles included files even after when changing back to a cached state', async function () {\n    this.timeout(15000);\n    let subscription;\n    let fixture = path.join(__dirname, '/integration/included-file');\n    try {\n      let b = bundler(path.join(fixture, 'index.txt'), {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n      });\n      await overlayFS.mkdirp(fixture);\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'a');\n      subscription = await b.watch();\n      let event = await getNextBuild(b);\n      invariant(event.type === 'buildSuccess');\n      let output1 = await overlayFS.readFile(\n        event.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(output1, 'a');\n\n      // Change included file\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'b');\n      event = await getNextBuild(b);\n      invariant(event.type === 'buildSuccess');\n      let output2 = await overlayFS.readFile(\n        event.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(output2, 'b');\n\n      // Change included file back\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'a');\n      event = await getNextBuild(b);\n      invariant(event.type === 'buildSuccess');\n      let output3 = await overlayFS.readFile(\n        event.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(output3, 'a');\n    } finally {\n      if (subscription) {\n        await subscription.unsubscribe();\n        subscription = null;\n      }\n    }\n  });\n\n  it('properly watches included files after a transformer error', async function () {\n    this.timeout(15000);\n    let subscription;\n    let fixture = path.join(__dirname, '/integration/included-file');\n    try {\n      let b = bundler(path.join(fixture, 'index.txt'), {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n      });\n      await overlayFS.mkdirp(fixture);\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'a');\n      subscription = await b.watch();\n      let event = await getNextBuild(b);\n      invariant(event.type === 'buildSuccess');\n      let output1 = await overlayFS.readFile(\n        event.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(output1, 'a');\n\n      // Change included file\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'ERROR');\n      event = await getNextBuild(b);\n      invariant(event.type === 'buildFailure');\n      assert.strictEqual(event.diagnostics[0].message, 'Custom error');\n\n      // Clear transformer error\n      await overlayFS.writeFile(path.join(fixture, 'included.txt'), 'b');\n      event = await getNextBuild(b);\n      invariant(event.type === 'buildSuccess');\n      let output3 = await overlayFS.readFile(\n        event.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(output3, 'b');\n    } finally {\n      if (subscription) {\n        await subscription.unsubscribe();\n        subscription = null;\n      }\n    }\n  });\n\n  it('should support moving the project root', async function () {\n    // This test relies on the real filesystem because the memory fs doesn't support renames.\n    // But renameSync is broken on windows in CI with EPERM errors. Just skip this test for now.\n    if (process.platform === 'win32') {\n      return;\n    }\n\n    let b = await testCache({\n      inputFS,\n      outputFS: inputFS,\n      async setup() {\n        await inputFS.mkdirp(inputDir);\n        await inputFS.ncp(path.join(__dirname, '/integration/cache'), inputDir);\n      },\n      update: async b => {\n        assert.equal(await run(b.bundleGraph), 4);\n\n        await inputFS.writeFile(\n          path.join(inputDir, 'src/nested/test.js'),\n          'export default 4',\n        );\n\n        fs.renameSync(inputDir, (inputDir += '_2'));\n        await sleep(100);\n      },\n    });\n\n    assert.equal(await run(b.bundleGraph), 6);\n  });\n\n  it('supports multiple empty JS assets', async function () {\n    // Try to store multiple empty assets using LMDB\n    let build = await runBundle(\n      path.join(__dirname, 'integration/multiple-empty-js-assets/index.js'),\n      {\n        inputFS,\n        outputFS: inputFS,\n      },\n    );\n\n    let a = nullthrows(findAsset(build.bundleGraph, 'a.js'));\n    let b = nullthrows(findAsset(build.bundleGraph, 'a.js'));\n    assert.strictEqual((await a.getBuffer()).length, 0);\n    assert.strictEqual((await b.getBuffer()).length, 0);\n\n    let res = await run(build.bundleGraph);\n    assert.deepEqual(res, {default: 'foo'});\n  });\n\n  it('invalidates correctly when switching from lazy to eager modes', async function () {\n    let overlayFSPackageManager = new NodePackageManager(overlayFS, __dirname);\n    let entry = 'source/index.js';\n    let options = {\n      mode: 'production',\n      defaultTargetOptions: {\n        shouldScopeHoist: false,\n      },\n      packageManager: overlayFSPackageManager,\n      shouldContentHash: false,\n      shouldDisableCache: false,\n      inputFS: overlayFS,\n      cacheDir: path.join(__dirname, '.parcel-cache'),\n    };\n\n    await fsFixture(overlayFS)`\n    source\n      lazy.js:\n\n        export default 'lazy-file';\n      index.js:\n        import('./lazy');\n\n        export default 'index-file';\n    `;\n\n    let lazyBundleGraph = await bundle(entry, {\n      ...options,\n      shouldBuildLazily: true,\n    });\n    assert.equal(lazyBundleGraph.getBundles().length, 1);\n\n    let eagerBundleGraph = await bundle(entry, {\n      ...options,\n      shouldBuildLazily: false,\n    });\n    assert.equal(eagerBundleGraph.getBundles().length, 2);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/compressors.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport zlib from 'zlib';\nimport {bundle, outputFS, distDir} from '@parcel/test-utils';\n\ndescribe('compressors', function () {\n  it('should not compress output with gzip and brotli in development', async function () {\n    await bundle(path.join(__dirname, 'integration/compressors/index.js'));\n\n    let output = await outputFS.readdir(distDir);\n    assert.deepEqual(output.sort(), ['index.js', 'index.js.map']);\n  });\n\n  it('should compress output with gzip and brotli', async function () {\n    await bundle(path.join(__dirname, 'integration/compressors/index.js'), {\n      mode: 'production',\n    });\n\n    let output = await outputFS.readdir(distDir);\n    assert.deepEqual(output.sort(), [\n      'index.js',\n      'index.js.br',\n      'index.js.gz',\n      'index.js.map',\n      'index.js.map.br',\n      'index.js.map.gz',\n    ]);\n\n    let raw = await outputFS.readFile(path.join(distDir, 'index.js'));\n    let gz = await outputFS.readFile(path.join(distDir, 'index.js.gz'));\n    let br = await outputFS.readFile(path.join(distDir, 'index.js.br'));\n\n    assert(zlib.gunzipSync(gz).equals(raw));\n    assert(zlib.brotliDecompressSync(br).equals(raw));\n  });\n\n  it('should be able to disable raw output', async function () {\n    await bundle(\n      path.join(__dirname, 'integration/compressors-disable-default/index.js'),\n      {\n        mode: 'production',\n      },\n    );\n\n    let output = await outputFS.readdir(distDir);\n    assert.deepEqual(output.sort(), ['index.js.br', 'index.js.map.br']);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/config-merging.js",
    "content": "import {bundle, run, outputFS} from '@parcel/test-utils';\nimport assert from 'assert';\nimport path from 'path';\n\ndescribe('config merging', function () {\n  it('should merge incomplete config packages', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/config-merging/index.js'),\n    );\n    let content = (\n      await outputFS.readFile(\n        path.join(__dirname, '/integration/config-merging/dist/index.js'),\n      )\n    ).toString();\n    assert(content.includes('runtime injected'));\n    assert.equal((await run(b)).default, 'Hello world!');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/contentHashing.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {bundle as _bundle, overlayFS, outputFS, ncp} from '@parcel/test-utils';\n\nconst distDir = path.join(__dirname, './dist');\n\nfunction bundle(path) {\n  return _bundle(path, {\n    inputFS: overlayFS,\n    shouldDisableCache: false,\n    defaultTargetOptions: {\n      distDir,\n    },\n  });\n}\n\ndescribe('content hashing', function () {\n  beforeEach(async () => {\n    await outputFS.rimraf(path.join(__dirname, '/input'));\n  });\n\n  it('should update content hash when content changes', async function () {\n    await ncp(\n      path.join(__dirname, '/integration/html-css'),\n      path.join(__dirname, '/input'),\n    );\n\n    let bundleHtml = () => bundle(path.join(__dirname, '/input/index.html'));\n    await bundleHtml();\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    let filename = html.match(\n      /<link rel=\"stylesheet\" href=\"[/\\\\]{1}(input\\.[a-f0-9]+\\.css)\">/,\n    )[1];\n    assert(await outputFS.exists(path.join(distDir, filename)));\n\n    await outputFS.writeFile(\n      path.join(__dirname, '/input/index.css'),\n      'body { background: green }',\n    );\n    await bundleHtml();\n\n    html = await outputFS.readFile(path.join(distDir, 'index.html'), 'utf8');\n    let newFilename = html.match(\n      /<link rel=\"stylesheet\" href=\"[/\\\\]{1}(input\\.[a-f0-9]+\\.css)\">/,\n    )[1];\n    assert(await outputFS.exists(path.join(distDir, newFilename)));\n\n    assert.notEqual(filename, newFilename);\n  });\n\n  it('should update content hash when raw asset changes', async function () {\n    await ncp(\n      path.join(__dirname, '/integration/import-raw'),\n      path.join(__dirname, '/input'),\n    );\n\n    let bundleJs = () => bundle(path.join(__dirname, '/input/index.js'));\n    await bundleJs();\n\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    let filename = js.match(/(test\\.[0-9a-f]+\\.txt)/)[1];\n    assert(await outputFS.exists(path.join(distDir, filename)));\n\n    await outputFS.writeFile(\n      path.join(__dirname, '/input/test.txt'),\n      'hello world',\n    );\n    await bundleJs();\n\n    js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    let newFilename = js.match(/(test\\.[0-9a-f]+\\.txt)/)[1];\n    assert(await outputFS.exists(path.join(distDir, newFilename)));\n\n    assert.notEqual(filename, newFilename);\n  });\n\n  it('should consider bundles with identical contents coming from different filepaths unique', async () => {\n    await _bundle(\n      path.join(\n        __dirname,\n        'integration/same-contents-different-filepaths/index.js',\n      ),\n    );\n  });\n\n  it('should generate the same hash for the same distDir inside separate projects', async () => {\n    let a = await _bundle(\n      path.join(__dirname, 'integration/hash-distDir/a/entry.html'),\n      {sourceMaps: true},\n    );\n    let b = await _bundle(\n      path.join(__dirname, 'integration/hash-distDir/b/entry.html'),\n      {sourceMaps: true},\n    );\n\n    let aBundles = a.getBundles();\n    let bBundles = b.getBundles();\n\n    assert.equal(aBundles.length, 2);\n    assert.equal(bBundles.length, 2);\n\n    let aJS = aBundles.find(bundle => bundle.type === 'js');\n    let bJS = bBundles.find(bundle => bundle.type === 'js');\n    assert(/entry\\.[a-f0-9]*\\.js/.test(path.basename(aJS.filePath)));\n    assert.equal(aJS.name, bJS.name);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/css-modules.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  run,\n  runBundle,\n  assertBundles,\n  distDir,\n  outputFS,\n  overlayFS,\n  fsFixture,\n} from '@parcel/test-utils';\nimport postcss from 'postcss';\n\ndescribe('css modules', () => {\n  it('should support transforming css modules (require)', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-modules-cjs/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'foo.module.css'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.css', 'foo.module.css'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n\n    let value = output();\n    assert(/[_0-9a-zA-Z]+_foo/.test(value));\n\n    let cssClass = value.match(/([_0-9a-zA-Z]+_foo)/)[1];\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes(`.${cssClass}`));\n  });\n\n  it('should support transforming css modules (import default)', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/postcss-modules-import-default/index.js',\n      ),\n      {mode: 'production'},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'style.module.css'],\n      },\n      {\n        name: 'index.css',\n        assets: ['style.module.css'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert(/[_0-9a-zA-Z]+_b-2/.test(output));\n\n    let css = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'css').filePath,\n      'utf8',\n    );\n    let includedRules = new Set();\n    postcss.parse(css).walkRules(rule => {\n      includedRules.add(rule.selector);\n    });\n    assert(includedRules.has('.page'));\n    assert(includedRules.has(`.${output}`));\n  });\n\n  it('should tree shake unused css modules classes with a namespace import', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/postcss-modules-import-namespace/index.js',\n      ),\n      {mode: 'production'},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'style.module.css'],\n      },\n      {\n        name: 'index.css',\n        assets: ['global.css', 'style.module.css'],\n      },\n    ]);\n\n    let js = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'js').filePath,\n      'utf8',\n    );\n    assert(!js.includes('unused'));\n\n    let output = await run(b);\n    assert(/[_0-9a-zA-Z]+_b-2/.test(output));\n\n    let css = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'css').filePath,\n      'utf8',\n    );\n    let includedRules = new Set();\n    postcss.parse(css).walkRules(rule => {\n      includedRules.add(rule.selector);\n    });\n    assert.deepStrictEqual(\n      includedRules,\n      new Set(['body', `.${output}`, '.page']),\n    );\n  });\n\n  it('should produce correct css without symbol propagation for css modules classes with a namespace import', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/postcss-modules-import-namespace/index.js',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'style.module.css'],\n      },\n      {\n        name: 'index.css',\n        assets: ['global.css', 'style.module.css'],\n      },\n    ]);\n\n    let {output} = await run(b, null, {require: false});\n    assert(/[_0-9a-zA-Z]+_b-2/.test(output));\n\n    let css = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'css').filePath,\n      'utf8',\n    );\n    let includedRules = new Set();\n    postcss.parse(css).walkRules(rule => {\n      includedRules.add(rule.selector);\n    });\n    assert(includedRules.has('body'));\n    assert(includedRules.has(`.${output}`));\n    assert(includedRules.has('.page'));\n  });\n\n  it('should support importing css modules with a non-static namespace import', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/postcss-modules-import-namespace-whole/index.js',\n      ),\n      {mode: 'production'},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'style.module.css'],\n      },\n      {\n        name: 'index.css',\n        assets: ['global.css', 'style.module.css'],\n      },\n    ]);\n\n    let js = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'js').filePath,\n      'utf8',\n    );\n    assert(js.includes('unused'));\n\n    let output = await run(b);\n    assert(/[_0-9a-zA-Z]+_b-2/.test(output['b-2']));\n    assert(/[_0-9a-zA-Z]+_unused/.test(output['unused']));\n\n    let css = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'css').filePath,\n      'utf8',\n    );\n    let includedRules = new Set();\n    postcss.parse(css).walkRules(rule => {\n      includedRules.add(rule.selector);\n    });\n    assert.deepStrictEqual(\n      includedRules,\n      new Set(['body', `.${output['b-2']}`, `.${output['unused']}`, '.page']),\n    );\n  });\n\n  it('should support css modules composes imports', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-composes/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'composes-1.module.css',\n          'composes-2.module.css',\n          'mixins.module.css',\n        ],\n      },\n      {\n        name: 'index.css',\n        assets: [\n          'composes-1.module.css',\n          'composes-2.module.css',\n          'mixins.module.css',\n        ],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n\n    let value = output();\n    const composes1Classes = value.composes1.split(' ');\n    const composes2Classes = value.composes2.split(' ');\n    assert(composes1Classes[0].endsWith('_composes1'));\n    assert(composes1Classes[1].endsWith('_test'));\n    assert(composes2Classes[0].endsWith('_composes2'));\n    assert(composes2Classes[1].endsWith('_test'));\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    let cssClass1 = value.composes1.match(/([_0-9a-zA-Z]+_composes1)/)[1];\n    assert(css.includes(`.${cssClass1}`));\n    let cssClass2 = value.composes2.match(/([_0-9a-zA-Z]+_composes2)/)[1];\n    assert(css.includes(`.${cssClass2}`));\n  });\n\n  it('should not include css twice for composes imports', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-composes/index.js'),\n    );\n\n    await run(b);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert.equal(\n      css.indexOf('height: 100px;'),\n      css.lastIndexOf('height: 100px;'),\n    );\n  });\n\n  it('should support composes imports for sass', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-composes/index2.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index2.js',\n        assets: ['index2.js', 'composes-3.module.css', 'mixins.module.scss'],\n      },\n      {\n        name: 'index2.css',\n        assets: ['composes-3.module.css', 'mixins.module.scss'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n\n    let value = output();\n    const composes3Classes = value.composes3.split(' ');\n    assert(composes3Classes[0].endsWith('_composes3'));\n    assert(composes3Classes[1].endsWith('_test'));\n\n    let css = await outputFS.readFile(path.join(distDir, 'index2.css'), 'utf8');\n    assert(css.includes('height: 200px;'));\n  });\n\n  it('should support composes imports with custom path names', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-composes/index3.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index3.js',\n        assets: ['index3.js', 'composes-4.module.css', 'mixins.module.css'],\n      },\n      {\n        name: 'index3.css',\n        assets: ['composes-4.module.css', 'mixins.module.css'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n\n    let value = output();\n    const composes4Classes = value.composes4.split(' ');\n    assert(composes4Classes[0].endsWith('_composes4'));\n    assert(composes4Classes[1].endsWith('_test'));\n\n    let css = await outputFS.readFile(path.join(distDir, 'index3.css'), 'utf8');\n    assert(css.includes('height: 100px;'));\n  });\n\n  it('should support deep nested composes imports', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-composes/index4.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index4.js',\n        assets: [\n          'index4.js',\n          'composes-5.module.css',\n          'mixins-intermediate.module.css',\n          'mixins.module.css',\n        ],\n      },\n      {\n        name: 'index4.css',\n        assets: [\n          'composes-5.module.css',\n          'mixins-intermediate.module.css',\n          'mixins.module.css',\n        ],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n\n    let value = output();\n    const composes5Classes = value.composes5.split(' ');\n    assert(composes5Classes[0].endsWith('_composes5'));\n    assert(composes5Classes[1].endsWith('_intermediate'));\n    assert(composes5Classes[2].endsWith('_test'));\n\n    let css = await outputFS.readFile(path.join(distDir, 'index4.css'), 'utf8');\n    assert(css.includes('height: 100px;'));\n    assert(css.includes('height: 300px;'));\n    assert(css.indexOf('_test') < css.indexOf('_intermediate'));\n    assert(css.indexOf('_intermediate') < css.indexOf('_composes5'));\n  });\n\n  it('should support composes imports for multiple selectors', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-composes/index5.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index5.js',\n        assets: ['index5.js', 'composes-6.module.css', 'mixins.module.css'],\n      },\n      {\n        name: 'index5.css',\n        assets: ['composes-6.module.css', 'mixins.module.css'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n\n    let value = output();\n    const composes6Classes = value.composes6.split(' ');\n    assert(composes6Classes[0].endsWith('_composes6'));\n    assert(composes6Classes[1].endsWith('_test'));\n    assert(composes6Classes[2].endsWith('_test-2'));\n  });\n\n  it('should throw an error when importing a missing class', async function () {\n    await assert.rejects(\n      () =>\n        bundle(\n          path.join(\n            __dirname,\n            '/integration/no-export-error-with-correct-filetype/src/App.jsx',\n          ),\n          {\n            shouldDisableCache: true,\n            defaultTargetOptions: {\n              shouldScopeHoist: true,\n            },\n          },\n        ),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            codeFrames: [\n              {\n                filePath: path.join(\n                  __dirname,\n                  '/integration/no-export-error-with-correct-filetype/src/App.jsx',\n                ),\n                language: 'js',\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    end: {\n                      column: 45,\n                      line: 7,\n                    },\n                    start: {\n                      column: 28,\n                      line: 7,\n                    },\n                  },\n                ],\n              },\n            ],\n            message:\n              \"integration/no-export-error-with-correct-filetype/src/app.module.css does not export 'notExisting'\",\n            origin: '@parcel/core',\n          },\n        ],\n      },\n    );\n  });\n\n  it('should fall back to postcss for legacy css modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-modules-legacy/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.module.css'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('color: red'));\n  });\n\n  it('should fall back to postcss for legacy css modules with :export', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-modules-legacy/b.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'b.js',\n        assets: ['b.js', 'b.module.css'],\n      },\n      {\n        name: 'b.css',\n        assets: ['b.module.css'],\n      },\n    ]);\n\n    let res = await run(b);\n    assert.deepEqual(res, {color: 'red'});\n  });\n\n  it('should optimize away unused @keyframes', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-modules-keyframes/index.js'),\n      {\n        mode: 'production',\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.module.css'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(/@keyframes _[_0-9a-zA-Z]+_test/.test(css));\n    assert(!css.includes('unused'));\n  });\n\n  it('should not double optimize css modules processed with postcss', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-modules-optimize/index.js'),\n      {\n        mode: 'production',\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'index.css'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.css'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('@keyframes test'));\n    assert(css.includes('@keyframes unused'));\n  });\n\n  it('should compile css modules for multiple targets', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-modules-targets/index.html'),\n      {\n        mode: 'production',\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js', 'foo.module.css'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js', 'foo.module.css'],\n      },\n      {\n        type: 'css',\n        assets: ['foo.module.css'],\n      },\n    ]);\n  });\n\n  it('should not fail with many css modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-modules-bug/src/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: [\n          'button.module.css',\n          'main.js',\n          'main.module.css',\n          'other.module.css',\n        ],\n      },\n      {\n        type: 'css',\n        assets: ['button.module.css', 'main.module.css', 'other.module.css'],\n      },\n    ]);\n  });\n\n  // Forked because experimental bundler will not merge bundles of same types if they do not share all their bundlegroups\n  it('should handle @import in css modules', async function () {\n    let b = await bundle(\n      [\n        path.join(__dirname, '/integration/css-modules-import/page1.html'),\n        path.join(__dirname, '/integration/css-modules-import/page2.html'),\n      ],\n      {mode: 'production'},\n    );\n\n    let res = [];\n    await runBundle(\n      b,\n      b.getBundles().find(b => b.name === 'page1.html'),\n      {\n        sideEffect: s => res.push(s),\n      },\n    );\n\n    assert.deepEqual(res, [['page1', '_1ZEqVW_a']]);\n\n    res = [];\n    await runBundle(\n      b,\n      b.getBundles().find(b => b.name === 'page2.html'),\n      {\n        sideEffect: s => res.push(s),\n      },\n    );\n\n    assert.deepEqual(res, [['page2', '_4fY2uG_foo _1ZEqVW_foo j1UkRG_foo']]);\n\n    assertBundles(b, [\n      {\n        name: 'page1.html',\n        assets: ['page1.html'],\n      },\n      {\n        name: 'page2.html',\n        assets: ['page2.html'],\n      },\n      {\n        type: 'js',\n        assets: ['page1.js'],\n      },\n      {\n        type: 'js',\n        assets: ['page2.js'],\n      },\n      {\n        type: 'css',\n        assets: ['a.module.css', 'b.module.css', 'index.module.css'],\n      },\n      {\n        type: 'js',\n        assets: ['a.module.css', 'b.module.css', 'index.module.css'],\n      },\n    ]);\n  });\n\n  it('should not process inline <style> elements as a CSS module', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/css-modules-style/index.html'),\n    );\n    let contents = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(contents.includes('.index {'));\n  });\n\n  it('should support global css modules via boolean config', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-modules-global/a/index.js'),\n      {mode: 'production'},\n    );\n    let res = await run(b);\n    assert.deepEqual(res, 'C-gzXq_foo');\n\n    let contents = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'css').filePath,\n      'utf8',\n    );\n    assert(contents.includes('.C-gzXq_foo'));\n    assert(contents.includes('.x'));\n  });\n\n  it('should support global css modules via object config', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-modules-global/b/index.js'),\n      {mode: 'production'},\n    );\n    let res = await run(b);\n    assert.deepEqual(res, 'C-gzXq_foo');\n    let contents = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'css').filePath,\n      'utf8',\n    );\n    assert(contents.includes('.C-gzXq_foo'));\n    assert(contents.includes('.x'));\n  });\n\n  it('should optimize away unused variables when dashedIdents option is used', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-modules-vars/index.js'),\n      {mode: 'production'},\n    );\n    let contents = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'css').filePath,\n      'utf8',\n    );\n    assert.equal(\n      contents.split('\\n')[0],\n      ':root{--wGsoEa_color:red;--wGsoEa_font:Helvetica;--wGsoEa_theme-sizes-1\\\\/12:2;--wGsoEa_from-js:purple}body{font:var(--wGsoEa_font)}._4fY2uG_foo{color:var(--wGsoEa_color);width:var(--wGsoEa_theme-sizes-1\\\\/12);height:var(--height)}',\n    );\n    let res = await run(b);\n    assert.deepEqual(res, ['_4fY2uG_foo', '--wGsoEa_from-js']);\n  });\n\n  it('should group together css and css modules into one bundle', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-module-css-siblings/index.html'),\n    );\n\n    let res = [];\n    await runBundle(\n      b,\n      b.getBundles().find(b => b.name === 'index.html'),\n      {\n        sideEffect: s => res.push(s),\n      },\n    );\n    assert.deepEqual(res, [\n      ['mainJs', '_1ZEqVW_myClass', 'j1UkRG_myOtherClass'],\n    ]);\n  });\n\n  it('should bundle css modules siblings together and their JS assets', async function () {\n    // This issue was first documented here\n    // https://github.com/parcel-bundler/parcel/issues/8716\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/css-modules-merging-siblings/index.html',\n      ),\n    );\n    let res = [];\n    await runBundle(\n      b,\n      b.getBundles().find(b => b.name === 'index.html'),\n      {\n        sideEffect: s => res.push(s),\n      },\n    );\n    // Result is  [ 'mainJs', 'SX8vmq_container YpGmra_-expand' ]\n    assert.deepEqual(res[0][0], 'mainJs');\n    assert(res[0][1].includes('container') && res[0][1].includes('expand'));\n  });\n\n  it('should duplicate css modules between targets', async function () {\n    let b = await bundle([\n      path.join(__dirname, '/integration/css-module-self-references/a'),\n      path.join(__dirname, '/integration/css-module-self-references/b'),\n    ]);\n\n    assertBundles(b, [\n      {\n        name: 'main.css',\n        assets: ['bar.module.css'],\n      },\n      {\n        name: 'main.css',\n        assets: ['bar.module.css'],\n      },\n      {\n        name: 'module.css',\n        assets: ['bar.module.css'],\n      },\n      {\n        name: 'module.css',\n        assets: ['bar.module.css'],\n      },\n      {\n        name: 'main.js',\n        assets: ['index.js', 'bar.module.css'],\n      },\n      {\n        name: 'main.js',\n        assets: ['index.js', 'bar.module.css'],\n      },\n      {\n        name: 'module.js',\n        assets: ['index.js', 'bar.module.css'],\n      },\n      {\n        name: 'module.js',\n        assets: ['index.js', 'bar.module.css'],\n      },\n    ]);\n  });\n\n  it('should support the \"include\" and \"exclude\" options', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      css-module-include\n        a.css:\n          .foo { color: red }\n        modules/b.css:\n          .bar { color: yellow }\n        modules/_c.css:\n          .baz { color: pink }\n        index.js:\n          import './a.css';\n          import {bar} from './modules/b.css';\n          import './modules/_c.css';\n          export default bar;\n\n        package.json:\n          {\n            \"@parcel/transformer-css\": {\n              \"cssModules\": {\n                \"include\": \"modules/*.css\",\n                \"exclude\": \"modules/_*.css\"\n              }\n            }\n          }\n\n        yarn.lock:`;\n\n    let b = await bundle(path.join(__dirname, 'css-module-include/index.js'), {\n      mode: 'production',\n      inputFS: overlayFS,\n    });\n\n    let contents = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'css').filePath,\n      'utf8',\n    );\n    assert(contents.includes('.foo'));\n    assert(contents.includes('.rp85ja_bar'));\n    assert(contents.includes('.baz'));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/css.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  run,\n  assertBundles,\n  distDir,\n  removeDistDirectory,\n  inputFS,\n  outputFS,\n} from '@parcel/test-utils';\n\ndescribe('css', () => {\n  afterEach(async () => {\n    await removeDistDirectory();\n  });\n\n  it('should produce two bundles when importing a CSS file', async () => {\n    let b = await bundle(path.join(__dirname, '/integration/css/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'local.js', 'c.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.css', 'local.css', 'c.css'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert.ok(css.indexOf('.c {') < css.indexOf('.local {'));\n    assert.ok(css.indexOf('.local {') < css.indexOf('.index {'));\n  });\n\n  it('should bundle css dependencies in the correct, postorder traversal order', async () => {\n    let b = await bundle(path.join(__dirname, '/integration/css-order/a.css'));\n\n    // Given a tree of css with imports:\n    //      A\n    //    /   \\\n    //   B     E\n    //  / \\\n    // C   D\n    //\n    // (A imports B (which imports C and D) and E)\n    //\n    // ...styles should be applied in the order C, D, B, E, A\n\n    assertBundles(b, [\n      {\n        name: 'a.css',\n        assets: ['a.css', 'b.css', 'c.css', 'd.css', 'e.css'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'a.css'), 'utf8');\n    assert.ok(\n      css.indexOf('.c {') < css.indexOf('.d {') &&\n        css.indexOf('.d {') < css.indexOf('.b {') &&\n        css.indexOf('.b {') < css.indexOf('.e {') &&\n        css.indexOf('.e {') < css.indexOf('.a {'),\n    );\n  });\n  it('should place one css bundle per bundlegroup for naming reasons', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/multi-css-bug/src/entry.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'entry.js',\n        type: 'js',\n        assets: ['cacheLoader.js', 'entry.js', 'js-loader.js'],\n      },\n      {\n        type: 'js',\n        assets: ['esmodule-helpers.js', 'index.js'],\n      },\n      {name: 'entry.css', type: 'css', assets: ['foo.css', 'main.css']},\n    ]);\n  });\n  it.skip('create a new css bundle to maintain one css bundle per bundlegroup constraint', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/multi-css-multi-entry-bug/src/entry.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'entry.js',\n        type: 'js',\n        assets: ['cacheLoader.js', 'css-loader.js', 'entry.js', 'js-loader.js'],\n      },\n      {\n        type: 'js',\n        assets: ['esmodule-helpers.js', 'index.js'],\n      },\n      {name: 'Foo.css', type: 'css', assets: ['foo.css']},\n      {name: 'entry.css', type: 'css', assets: ['foo.css', 'main.css']},\n    ]);\n  });\n  it('should support loading a CSS bundle along side dynamic imports', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-css/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['cacheLoader.js', 'css-loader.js', 'index.js', 'js-loader.js'],\n      },\n      {name: /local\\.[0-9a-f]{8}\\.js/, assets: ['local.js']},\n      {name: /local\\.[0-9a-f]{8}\\.css/, assets: ['local.css']},\n      {name: 'index.css', assets: ['index.css']},\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 3);\n  });\n\n  it('should support importing CSS from a CSS file', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-import/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.css', 'other.css', 'local.css'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, '/index.css'), 'utf8');\n    assert(css.includes('.local'));\n    assert(css.includes('.other'));\n    assert(\n      /@media print {\\s*\\.local(.|\\n)*\\.other(.|\\n)*}(.|\\n)*\\.index/.test(css),\n    );\n    assert(css.includes('.index'));\n  });\n\n  it('should support linking to assets with url() from CSS', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/css-url/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.css'],\n      },\n      {\n        type: 'woff2',\n        assets: ['test.woff2'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(/url\\(\"test\\.[0-9a-f]+\\.woff2\"\\)/.test(css));\n    assert(css.includes('url(\"http://google.com\")'));\n    assert(css.includes('.index'));\n    assert(css.includes('url(\"data:image/gif;base64,quotes\")'));\n    assert(css.includes('.quotes'));\n    assert(css.includes('url(\"data:image/gif;base64,no-quote\")'));\n    assert(css.includes('.no-quote'));\n\n    assert(\n      await outputFS.exists(\n        path.join(distDir, css.match(/url\\(\"(test\\.[0-9a-f]+\\.woff2)\"\\)/)[1]),\n      ),\n    );\n  });\n\n  it('should support linking to assets with url() from CSS in production', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-url/index.js'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.css'],\n      },\n      {\n        type: 'woff2',\n        assets: ['test.woff2'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(/url\\(test\\.[0-9a-f]+\\.woff2\\)/.test(css), 'woff ext found in css');\n    assert(css.includes('url(http://google.com)'), 'url() found');\n    assert(css.includes('.index'), '.index found');\n    assert(/url\\(\"?data:image\\/gif;base64,quotes\"?\\)/.test(css));\n    assert(css.includes('.quotes'));\n    assert(/url\\(\"?data:image\\/gif;base64,no-quote\"?\\)/.test(css));\n    assert(css.includes('.no-quote'));\n\n    assert(\n      await outputFS.exists(\n        path.join(distDir, css.match(/url\\((test\\.[0-9a-f]+\\.woff2)\\)/)[1]),\n      ),\n    );\n  });\n\n  it('should support linking to assets in parent folders with url() from CSS', async function () {\n    let b = await bundle(\n      [\n        path.join(__dirname, '/integration/css-url-relative/src/a/style1.css'),\n        path.join(__dirname, '/integration/css-url-relative/src/b/style2.css'),\n      ],\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n          sourceMaps: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'css',\n        assets: ['style1.css'],\n      },\n      {\n        type: 'css',\n        assets: ['style2.css'],\n      },\n      {\n        type: 'png',\n        assets: ['foo.png'],\n      },\n    ]);\n\n    let cssPath = path.join(distDir, 'a', 'style1.css');\n    let css = await outputFS.readFile(cssPath, 'utf8');\n\n    assert(css.includes('background-image'), 'includes `background-image`');\n    assert(/url\\([^)]*\\)/.test(css), 'includes url()');\n\n    assert(\n      await outputFS.exists(\n        path.resolve(path.dirname(cssPath), css.match(/url\\(([^)]*)\\)/)[1]),\n      ),\n      'path specified in url() exists',\n    );\n  });\n\n  it('should handle quote in CSS URL correctly', async function () {\n    await bundle(path.join(__dirname, '/integration/css-url-quote/index.css'));\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n\n    assert(\n      css.includes(\n        'url(\"data:image/svg+xml;utf8,with quote \\\\\" and escape \\\\\\\\\");',\n      ),\n    );\n  });\n\n  it('should ignore url() with IE behavior specifiers', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-url-behavior/index.css'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.css'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n\n    assert(css.includes('url(\"#default#VML\")'));\n  });\n\n  it('should throw a diagnostic for relative url() dependencies in custom properties', async function () {\n    let fixture = path.join(\n      __dirname,\n      'integration/css-url-custom-property/index.css',\n    );\n    let code = await inputFS.readFileSync(fixture, 'utf8');\n    // $FlowFixMe\n    await assert.rejects(\n      () =>\n        bundle(fixture, {\n          defaultTargetOptions: {\n            shouldOptimize: true,\n          },\n        }),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            message:\n              \"Ambiguous url('foo.png') in custom property. Relative paths are resolved from the location the var() is used, not where the custom property is defined. Use an absolute URL instead\",\n            origin: '@parcel/transformer-css',\n            name: 'SyntaxError',\n            stack: undefined,\n            codeFrames: [\n              {\n                filePath: fixture,\n                code,\n                codeHighlights: [\n                  {\n                    start: {\n                      line: 2,\n                      column: 11,\n                    },\n                    end: {\n                      line: 2,\n                      column: 11,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: [\n              'Replace with: url(/integration/css-url-custom-property/foo.png)',\n            ],\n            documentationURL: 'https://parceljs.org/languages/css/#url()',\n          },\n        ],\n      },\n    );\n  });\n\n  it('should minify CSS when minify is set', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/cssnano/index.js'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n          sourceMaps: false,\n        },\n      },\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.local'));\n    assert(css.includes('.index'));\n\n    assert.equal(css.split('\\n').length, 1);\n  });\n\n  it('should produce a sourcemap when sourceMaps are used', async function () {\n    await bundle(path.join(__dirname, '/integration/cssnano/index.js'), {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n    });\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.local'));\n    assert(css.includes('.index'));\n\n    let lines = css.trim().split('\\n');\n    assert.equal(lines.length, 2);\n    assert.equal(lines[1], '/*# sourceMappingURL=index.css.map */');\n\n    let map = JSON.parse(\n      await outputFS.readFile(path.join(distDir, 'index.css.map'), 'utf8'),\n    );\n    assert.equal(map.file, 'index.css.map');\n    assert(map.sources.includes('integration/cssnano/local.css'));\n    assert(map.sources.includes('integration/cssnano/index.css'));\n  });\n\n  it('should inline data-urls for text-encoded files', async () => {\n    await bundle(path.join(__dirname, '/integration/data-url/text.css'), {\n      defaultTargetOptions: {\n        sourceMaps: false,\n      },\n    });\n    let css = await outputFS.readFile(path.join(distDir, 'text.css'), 'utf8');\n    assert.equal(\n      css.trim(),\n      `.svg-img {\n  background-image: url(\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%3E%0A%20%20%3Cfilter%20id%3D%22blur-_.%21~%2a%22%3E%0A%20%20%20%20%3CfeGaussianBlur%20stdDeviation%3D%225%22%2F%3E%0A%20%20%3C%2Ffilter%3E%0A%20%20%3Ccircle%20cx%3D%2260%22%20cy%3D%2260%22%20r%3D%2250%22%20fill%3D%22green%22%20filter%3D%22url%28%23blur-_.%21~%2a%29%22%2F%3E%0A%3C%2Fsvg%3E\");\n}`,\n    );\n  });\n\n  it('should inline data-urls for binary files', async () => {\n    await bundle(path.join(__dirname, '/integration/data-url/binary.css'));\n    let css = await outputFS.readFile(path.join(distDir, 'binary.css'), 'utf8');\n    assert(\n      css.startsWith(`.webp-img {\n  background-image: url(\"data:image/webp;base64,UklGR`),\n    );\n  });\n\n  it('should remap locations in diagnostics using the input source map', async () => {\n    let fixture = path.join(\n      __dirname,\n      'integration/diagnostic-sourcemap/index.scss',\n    );\n    let code = await inputFS.readFileSync(fixture, 'utf8');\n    // $FlowFixMe\n    await assert.rejects(\n      () =>\n        bundle(fixture, {\n          defaultTargetOptions: {\n            shouldOptimize: true,\n          },\n        }),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            message: \"Failed to resolve 'x.png' from './index.scss'\",\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: fixture,\n                code,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 5,\n                      column: 3,\n                    },\n                    end: {\n                      line: 5,\n                      column: 3,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n          {\n            message: \"Cannot load file './x.png' in './'.\",\n            origin: '@parcel/resolver-default',\n            hints: [],\n          },\n        ],\n      },\n    );\n  });\n\n  it('should support importing CSS from node_modules with the npm: scheme', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-node-modules/index.css'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.css', 'foo.css'],\n      },\n    ]);\n  });\n\n  it('should support the style package exports condition', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-exports/index.css'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.css', 'foo.css'],\n      },\n    ]);\n  });\n\n  it('should support external CSS imports', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-external/a.css'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'a.css',\n        assets: ['a.css', 'b.css'],\n      },\n    ]);\n\n    let res = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(\n      new RegExp(`@import \"http://example.com/external.css\";\n.b {\n  color: red;\n}\\n?\n.a {\n  color: green;\n}`).test(res),\n    );\n  });\n\n  it('should support css nesting with lightningcss', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/css-nesting/a.css'),\n      {\n        defaultTargetOptions: {\n          engines: {\n            browsers: 'chrome 80',\n          },\n        },\n      },\n    );\n\n    let res = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('.foo.bar'));\n  });\n\n  it('should support @layer', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/css-layer/a.css'), {\n      mode: 'production',\n    });\n\n    let res = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(\n      res.includes(\n        '@layer b.c{.c{color:#ff0}}@layer b{.b{color:#00f}}.a{color:red}',\n      ),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/elm.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundle,\n  distDir,\n  run,\n  outputFS,\n} from '@parcel/test-utils';\n\ndescribe('elm', function () {\n  it('should produce a basic Elm bundle', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'));\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['Main.elm', 'index.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output().Elm.Main.init, 'function');\n  });\n  it('should produce a elm bundle with debugger', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'));\n\n    await run(b);\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(js.includes('elm$browser$Debugger'));\n  });\n\n  it('should apply elm-hot if HMR is enabled', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {\n      hmrOptions: true,\n    });\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['Main.elm', 'index.js'],\n      },\n    ]);\n\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(js.includes('[elm-hot]'));\n  });\n\n  it('should remove debugger in production', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {\n      mode: 'production',\n    });\n\n    await run(b);\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!js.includes('elm$browser$Debugger'));\n  });\n\n  it('should remove debugger when environment variable `PARCEL_ELM_NO_DEBUG` is set to true', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {\n      env: {PARCEL_ELM_NO_DEBUG: true},\n    });\n\n    await run(b);\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!js.includes('elm$browser$Debugger'));\n  });\n\n  it('should minify Elm in production mode', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/elm/index.js'), {\n      mode: 'production',\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n    });\n\n    await run(b);\n\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!js.includes('elm$core'));\n    assert(js.includes('Elm'));\n    assert(js.includes('init'));\n  });\n\n  it('should produce correct formatting and indentation when compilation fails', async function () {\n    const normalizedPath = path.normalize(\n      'test/integration/elm-compile-error/src/Main.elm',\n    );\n    await assert.rejects(\n      () =>\n        bundle(path.join(__dirname, 'integration/elm-compile-error/index.js'), {\n          mode: 'production',\n        }),\n\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            message:\n              '\\n' +\n              `-- TYPE MISMATCH --------------- ${normalizedPath}\\n` +\n              '\\n' +\n              'The 1st argument to `text` is not what I expect:\\n' +\n              '\\n' +\n              '7|     Html.text 5 \"Hello, world!\"\\n' +\n              '                 **^**\\n' +\n              'This argument is a number of type:\\n' +\n              '\\n' +\n              '    **number**\\n' +\n              '\\n' +\n              'But `text` needs the 1st argument to be:\\n' +\n              '\\n' +\n              '    **String**\\n' +\n              '\\n' +\n              '__Hint__: Try using **String.fromInt** to convert it to a string?',\n            origin: '@parcel/elm-transformer',\n            stack: '',\n          },\n          {\n            message:\n              '\\n' +\n              `-- TOO MANY ARGS --------------- ${normalizedPath}\\n` +\n              '\\n' +\n              'The `text` function expects 1 argument, but it got 2 instead.\\n' +\n              '\\n' +\n              '7|     Html.text 5 \"Hello, world!\"\\n' +\n              '       **^^^^^^^^^**\\n' +\n              'Are there any missing commas? Or missing parentheses?',\n            origin: '@parcel/elm-transformer',\n            stack: '',\n          },\n        ],\n      },\n    );\n  });\n\n  it('should produce extra Modules given in \"with\" query param', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/elm-multiple-apps/src/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['Main.elm', 'index.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    const output = await run(b);\n    const Elm = output.default();\n    assert.equal(typeof Elm.Main.init, 'function');\n    assert.equal(typeof Elm.MainB.init, 'function');\n    assert.equal(typeof Elm.MainC.init, 'function');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/encodedURI.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {bundle, outputFS, distDir} from '@parcel/test-utils';\n\ndescribe('encodedURI', function () {\n  it('should support bundling files which names in encoded URI', async function () {\n    await bundle(path.join(__dirname, '/integration/encodedURI/index.html'));\n\n    let files = await outputFS.readdir(distDir);\n    let html = await outputFS.readFile(path.join(distDir, 'index.html'));\n    for (let file of files) {\n      if (file !== 'index.html') {\n        assert(html.includes(file));\n      }\n    }\n    assert(!!files.find(f => f.startsWith('日本語')));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/eslint-validation.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport {bundle} from '@parcel/test-utils';\n\nconst config = path.join(\n  __dirname,\n  './integration/custom-configs/.parcelrc-eslint',\n);\n\ndescribe('eslint-validator', function () {\n  it('should throw validation error with eslint errors', async function () {\n    let didThrow = false;\n    let entry = path.join(__dirname, '/integration/eslint-error/index.js');\n    try {\n      await bundle(entry, {\n        defaultConfig: config,\n      });\n    } catch (e) {\n      assert.equal(e.name, 'BuildError');\n      assert(Array.isArray(e.diagnostics));\n      assert(e.diagnostics[0].codeFrames);\n      assert.equal(e.diagnostics[0].origin, '@parcel/validator-eslint');\n      assert.equal(\n        e.diagnostics[0].message,\n        'ESLint found **1** __errors__ and **1** __warnings__.',\n      );\n\n      let codeframe = e.diagnostics[0].codeFrames[0];\n      assert(codeframe);\n      assert.equal(codeframe.filePath, entry);\n      assert.equal(codeframe.codeHighlights.length, 2);\n      codeframe.codeHighlights.sort(\n        ({start: {line: a}}, {start: {line: b}}) => a - b,\n      );\n      assert.equal(\n        codeframe.codeHighlights[0].message,\n        'Unexpected console statement.',\n      );\n      assert.equal(\n        codeframe.codeHighlights[1].message,\n        \"'hey' is assigned a value but never used.\",\n      );\n      didThrow = true;\n    }\n\n    assert(didThrow);\n  });\n\n  it('should throw a correct codeframe for a parse error', async function () {\n    let didThrow = false;\n    let entry = path.join(\n      __dirname,\n      '/integration/eslint-parse-error/index.js',\n    );\n    try {\n      await bundle(entry, {\n        defaultConfig: config,\n      });\n    } catch (e) {\n      assert.equal(e.name, 'BuildError');\n      assert(Array.isArray(e.diagnostics));\n      assert.equal(e.diagnostics[0].origin, '@parcel/validator-eslint');\n      assert.equal(\n        e.diagnostics[0].message,\n        'ESLint found **1** __errors__ and **0** __warnings__.',\n      );\n\n      let codeframe = e.diagnostics[0].codeFrames[0];\n      assert(codeframe);\n      assert.equal(codeframe.filePath, entry);\n      assert.equal(codeframe.codeHighlights.length, 1);\n      assert(codeframe.codeHighlights[0].start.line != null);\n      assert(codeframe.codeHighlights[0].start.column != null);\n      assert(codeframe.codeHighlights[0].end.line != null);\n      assert(codeframe.codeHighlights[0].end.column != null);\n      assert(codeframe.codeHighlights[0].message.startsWith('Parsing error'));\n\n      didThrow = true;\n    }\n\n    assert(didThrow);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/feature-flags.js",
    "content": "import assert from 'assert';\nimport path from 'node:path';\nimport {rimraf} from 'rimraf';\nimport {bundle, run, overlayFS, fsFixture} from '@parcel/test-utils';\n\ndescribe('feature flags', () => {\n  let dir = path.join(__dirname, 'feature-flags-fixture');\n  beforeEach(async () => {\n    await rimraf(dir);\n    await overlayFS.mkdirp(dir);\n    await fsFixture(overlayFS, dir)`\n    yarn.lock:\n        // required for .parcelrc to work\n\n    package.json:\n        {\n            \"name\": \"feature-flags-fixture\",\n            \"version\": \"1.0.0\"\n        }\n\n    index.js:\n        module.exports = \"MARKER\";\n\n    .parcelrc:\n        {\n            extends: \"@parcel/config-default\",\n            transformers: {\n                '*.js': ['./transformer.js', '...']\n            },\n        }\n\n    .parcelrc-2:\n      {\n          extends: \"@parcel/config-default\",\n          transformers: {\n              '*.js': ['./transformer-client.js', '...']\n          },\n      }\n\n    transformer.js:\n        const {Transformer} = require('@parcel/plugin');\n        module.exports = new Transformer({\n            async transform({asset, options}) {\n                const code = await asset.getCode();\n                if (code.includes('MARKER') && options.featureFlags.exampleFeature) {\n                    asset.setCode(code.replace('MARKER', 'REPLACED'));\n                }\n                return [asset];\n            }\n        });\n\n    transformer-client.js:\n        const {Transformer} = require('@parcel/plugin');\n        const {getFeatureFlag} = require('@parcel/feature-flags');\n        module.exports = new Transformer({\n            async transform({asset, options}) {\n                const code = await asset.getCode();\n                if (code.includes('MARKER') && getFeatureFlag('exampleFeature')) {\n                    asset.setCode(code.replace('MARKER', 'REPLACED'));\n                }\n                return [asset];\n            }\n        });\n`;\n  });\n\n  it('flag should be available in plugins and set from options', async () => {\n    await overlayFS.mkdirp(dir);\n\n    const b = await bundle(path.join(dir, 'index.js'), {\n      inputFS: overlayFS,\n      featureFlags: {exampleFeature: true},\n    });\n    const output = await run(b);\n\n    assert(\n      output.includes('REPLACED'),\n      `Expected ${output} to contain 'REPLACED'`,\n    );\n  });\n\n  it('flag defaults should be available in plugins if not set from options', async () => {\n    await overlayFS.mkdirp(dir);\n\n    const b = await bundle(path.join(dir, 'index.js'), {\n      inputFS: overlayFS,\n    });\n    const output = await run(b);\n\n    assert(\n      !output.includes('REPLACED'),\n      `Expected ${output} to NOT contain 'REPLACED'`,\n    );\n  });\n\n  it('cache should invalidate on flag switch', async () => {\n    await overlayFS.mkdirp(dir);\n\n    const b = await bundle(path.join(dir, 'index.js'), {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n      featureFlags: {exampleFeature: true},\n    });\n    const output = await run(b);\n\n    assert(\n      output.includes('REPLACED'),\n      `Expected ${output} to contain 'REPLACED'`,\n    );\n\n    const b2 = await bundle(path.join(dir, 'index.js'), {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n      featureFlags: {exampleFeature: false},\n    });\n    const output2 = await run(b2);\n    assert(\n      !output2.includes('REPLACED'),\n      `Expected ${output} to NOT contain 'REPLACED'`,\n    );\n  });\n\n  it('flag should be available in plugins via client', async () => {\n    await overlayFS.mkdirp(dir);\n\n    const b = await bundle(path.join(dir, 'index.js'), {\n      inputFS: overlayFS,\n      featureFlags: {exampleFeature: true},\n      config: path.join(dir, '.parcelrc-2'),\n    });\n    const output = await run(b);\n\n    assert(\n      output.includes('REPLACED'),\n      `Expected ${output} to contain 'REPLACED'`,\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/fs.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport invariant from 'assert';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundle,\n  removeDistDirectory,\n  run,\n  overlayFS,\n  outputFS,\n  distDir,\n} from '@parcel/test-utils';\n\ndescribe('fs', function () {\n  beforeEach(async () => {\n    await removeDistDirectory();\n  });\n\n  describe('browser environment', function () {\n    it('should not inline a file if disabled via config', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-disabled/index.js'),\n        {\n          inputFS: overlayFS,\n        },\n      );\n\n      // $FlowFixMe\n      await assert.rejects(() => run(b), /\\.readFileSync is not a function/);\n    });\n\n    it('should not inline a file outside of the project root', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-outside-root/index.js'),\n        {\n          inputFS: overlayFS,\n        },\n      );\n\n      // $FlowFixMe\n      await assert.rejects(() => run(b), /\\.readFileSync is not a function/);\n    });\n\n    it('should inline a file as a string', async function () {\n      let b = await bundle(path.join(__dirname, '/integration/fs/index.js'));\n      let output = await run(b);\n      assert.equal(output, 'hello');\n    });\n\n    it('should inline a file as a buffer', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-buffer/index.js'),\n      );\n      let output = await run(b);\n      invariant(typeof output === 'object' && output != null);\n      assert(output.constructor.name.includes('Buffer'));\n      assert.equal(output.length, 5);\n    });\n\n    it('should inline a file with fs require alias', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-alias/index.js'),\n      );\n      let output = await run(b);\n      assert.equal(output, 'hello');\n    });\n\n    it('should inline a file with fs require inline', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-inline/index.js'),\n      );\n      let output = await run(b);\n      assert.equal(output, 'hello');\n    });\n\n    it.skip('should inline a file with fs require assignment', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-assign/index.js'),\n      );\n      let output = await run(b);\n      assert.equal(output, 'hello');\n    });\n\n    it.skip('should inline a file with fs require assignment alias', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-assign-alias/index.js'),\n      );\n      let output = await run(b);\n      assert.equal(output, 'hello');\n    });\n\n    it('should inline a file with fs require destructure', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-destructure/index.js'),\n      );\n      let output = await run(b);\n      assert.equal(output, 'hello');\n    });\n\n    it.skip('should inline a file with fs require destructure assignment', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-destructure-assign/index.js'),\n      );\n      let output = await run(b);\n      assert.equal(output, 'hello');\n    });\n\n    it('should inline a file with fs ES6 import', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-import/index.js'),\n      );\n      let output = await run(b);\n      invariant(typeof output === 'object' && output != null);\n      assert.equal(output.default, 'hello');\n    });\n\n    it('should inline a file with fs ES6 import and path.join', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-import-path-join/index.js'),\n      );\n      let output = await run(b);\n      invariant(typeof output === 'object' && output != null);\n      assert.equal(output.default, 'hello');\n    });\n\n    it('should not evaluate fs calls when package.browser.fs is false', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/resolve-entries/ignore-fs.js'),\n      );\n\n      assertBundles(b, [\n        {\n          name: 'ignore-fs.js',\n          // empty.js is generated by require('fs'), it gets mocked with an empty module\n          assets: [\n            '_empty.js',\n            'esmodule-helpers.js',\n            'ignore-fs.js',\n            'index.js',\n          ],\n        },\n      ]);\n      // $FlowFixMe[incompatible-call]\n      let output = await run(b);\n\n      assert.equal(typeof output.test, 'function');\n      assert.equal(output.test(), 'test-pkg-ignore-fs-ok');\n    });\n\n    // TODO: check if the logger has warned the user\n    it('should ignore fs calls when the filename is not evaluable', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-file-non-evaluable/index.js'),\n      );\n\n      // $FlowFixMe\n      await assert.rejects(() => run(b), /\\.readFileSync is not a function/);\n    });\n\n    it('should ignore fs calls when the filename is not evaluable after preset-env', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/fs-file-non-evaluable-template-env/index.js',\n        ),\n      );\n\n      // $FlowFixMe\n      await assert.rejects(() => run(b), /\\.readFileSync is not a function/);\n    });\n\n    it('should ignore fs calls when the options are not evaluable', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-options-non-evaluable/index.js'),\n      );\n\n      // $FlowFixMe\n      await assert.rejects(() => run(b), /\\.readFileSync is not a function/);\n    });\n  });\n\n  describe('node environment', function () {\n    it('should not inline a file in a node environment', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/fs-node/index.js'),\n      );\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['index.js'],\n        },\n      ]);\n\n      let contents = await outputFS.readFile(\n        path.join(distDir, 'index.js'),\n        'utf8',\n      );\n      assert(contents.includes('readFileSync'));\n\n      await outputFS.writeFile(\n        path.join(__dirname, '/integration/fs-node/', 'test.txt'),\n        'hey',\n      );\n      let output = await run(b);\n      assert.equal(output, 'hey');\n    });\n  });\n\n  describe.skip('electron environment', function () {\n    it('should not inline a file in an Electron environment', async function () {\n      let b = await bundle(path.join(__dirname, '/integration/fs/index.js'), {\n        targets: ['electron'],\n      });\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['index.js'],\n        },\n      ]);\n\n      let contents = await outputFS.readFile(\n        path.join(distDir, 'index.js'),\n        'utf8',\n      );\n      assert(contents.includes(\"require('fs')\"));\n      assert(contents.includes('readFileSync'));\n\n      await outputFS.writeFile(path.join(distDir, 'test.txt'), 'hey');\n      let output = await run(b);\n      assert.equal(output, 'hey');\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/glob.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport {\n  assertRejectsWithDiagnostic,\n  bundle,\n  run,\n  assertBundles,\n  outputFS,\n  inputFS,\n} from '@parcel/test-utils';\nimport nullthrows from 'nullthrows';\n\ndescribe('glob', function () {\n  it('should require a glob of files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/glob/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', '*.js', 'a.js', 'b.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 3);\n  });\n\n  it('should require nested directories with a glob', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/glob-deep/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', '*.js', 'a.js', 'b.js', 'c.js', 'z.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 13);\n  });\n\n  it('should support importing a glob of CSS files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/glob-css/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['*.css', 'index.css', 'other.css', 'local.css'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(\n      nullthrows(b.getBundles().find(b => b.type === 'css')).filePath,\n      'utf8',\n    );\n    assert(css.includes('.local'));\n    assert(css.includes('.other'));\n    assert(css.includes('.index'));\n  });\n\n  it('should require a glob using a pipeline', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/glob-pipeline/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', '*.js'],\n      },\n      {\n        type: 'txt',\n        assets: ['a.txt'],\n      },\n      {\n        type: 'txt',\n        assets: ['b.txt'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.deepEqual(output, {\n      a: `http://localhost/${path.basename(\n        nullthrows(b.getBundles().find(b => b.name.startsWith('a'))).filePath,\n      )}`,\n      b: `http://localhost/${path.basename(\n        nullthrows(b.getBundles().find(b => b.name.startsWith('b'))).filePath,\n      )}`,\n    });\n  });\n\n  it('should import a glob with dynamic import', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/glob-async/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', '*.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        type: 'js',\n        assets: ['a.js'],\n      },\n      {\n        type: 'js',\n        assets: ['b.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(await output(), 3);\n  });\n\n  it('should error when an unsupported asset type imports a glob', async function () {\n    let filePath = path.join(__dirname, '/integration/glob-error/index.html');\n    // $FlowFixMe[prop-missing]\n    await assertRejectsWithDiagnostic(() => bundle(filePath), {\n      name: 'BuildError',\n      diagnostics: [\n        {\n          message: \"Failed to resolve 'foo/\\\\*.js' from './index.html'\",\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath,\n              code: `<script src=\"foo/*.js\"></script>\\n`,\n              codeHighlights: [\n                {\n                  start: {\n                    line: 1,\n                    column: 1,\n                  },\n                  end: {\n                    line: 1,\n                    column: 1,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n        {\n          message: 'Glob imports are not supported in html files.',\n          origin: '@parcel/resolver-glob',\n          codeFrames: [\n            {\n              codeHighlights: [\n                {\n                  start: {\n                    line: 1,\n                    column: 1,\n                  },\n                  end: {\n                    line: 1,\n                    column: 1,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    });\n  });\n\n  it('should error when a URL dependency imports a glob', async function () {\n    let filePath = path.join(__dirname, '/integration/glob-error/index.css');\n    // $FlowFixMe[prop-missing]\n    await assert.rejects(() => bundle(filePath), {\n      name: 'BuildError',\n      diagnostics: [\n        {\n          message: \"Failed to resolve 'images/\\\\*.jpg' from './index.css'\",\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath,\n              code: await inputFS.readFile(filePath, 'utf8'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    column: 19,\n                    line: 2,\n                  },\n                  end: {\n                    column: 30,\n                    line: 2,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n        {\n          message: 'Glob imports are not supported in URL dependencies.',\n          origin: '@parcel/resolver-glob',\n          codeFrames: [\n            {\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    column: 19,\n                    line: 2,\n                  },\n                  end: {\n                    column: 30,\n                    line: 2,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    });\n  });\n\n  it('should require a glob of files from a package', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/glob-package/index.js'),\n    );\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['*.js', '*.js', 'a.js', 'b.js', 'x.js', 'y.js', 'index.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 10);\n  });\n\n  it('should require a glob of files from a package async', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/glob-package-async/index.js'),\n    );\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['*.js', '*.js', 'cacheLoader.js', 'index.js', 'js-loader.js'],\n      },\n      {type: 'js', assets: ['a.js']},\n      {type: 'js', assets: ['b.js']},\n      {type: 'js', assets: ['x.js']},\n      {type: 'js', assets: ['y.js']},\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 10);\n  });\n\n  it('should resolve a glob with ~', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/glob-tilde/packages/child/index.js'),\n    );\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', '*.js', 'a.js', 'b.js'],\n      },\n    ]);\n    let output = await run(b);\n    assert.equal(output, 3);\n  });\n\n  it('should resolve an absolute glob', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/glob-absolute/packages/child/index.js',\n      ),\n    );\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', '*.js', 'a.js', 'b.js'],\n      },\n    ]);\n    let output = await run(b);\n    assert.equal(output, 3);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/globals.js",
    "content": "import assert from 'assert';\nimport path from 'path';\n\nimport {bundle, fsFixture, overlayFS, run} from '@parcel/test-utils';\nimport sinon from 'sinon';\n\ndescribe('globals', function () {\n  it('should support global alias syntax', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/global-alias/index.js'),\n    );\n\n    assert.equal(\n      await run(b, {\n        React: {\n          createElement: function () {\n            return 'ok';\n          },\n        },\n      }),\n      'ok',\n    );\n  });\n\n  describe('supports global in imported modules', () => {\n    const dir = path.join(__dirname, 'global-var');\n\n    beforeEach(async () => {\n      await overlayFS.mkdirp(dir);\n      await fsFixture(overlayFS, dir)`\n        index.js:\n          import { main } from './main';\n\n          onGlobal(main());\n\n        main.js:\n          export function main() {\n            let _global = typeof global !== 'undefined' ? global : 'missing global';\n\n            return _global;\n          }\n\n        yarn.lock: {}\n      `;\n    });\n\n    afterEach(async () => {\n      await overlayFS.rimraf(dir);\n    });\n\n    it('when scope hoisting is disabled', async function () {\n      let bundleGraph = await bundle(path.join(dir, 'index.js'), {\n        defaultTargetOptions: {\n          context: 'browser',\n          shouldScopeHoist: false,\n        },\n        inputFS: overlayFS,\n      });\n\n      let bundles = await Promise.all(\n        bundleGraph\n          .getBundles()\n          .map(b => overlayFS.readFile(b.filePath, 'utf8')),\n      );\n\n      let onGlobal = sinon.spy();\n      await run(bundleGraph, {globalThis: 'global', onGlobal});\n\n      assert(bundles.some(b => b.includes('var global = arguments[3]')));\n      assert(\n        bundles.every(b => !b.includes('var $parcel$global = globalThis')),\n      );\n      assert.equal(onGlobal.callCount, 1);\n      assert.deepEqual(onGlobal.firstCall.args, ['global']);\n    });\n\n    it('when scope hoisting is enabled', async function () {\n      let bundleGraph = await bundle(path.join(dir, 'index.js'), {\n        defaultTargetOptions: {\n          context: 'browser',\n          shouldScopeHoist: true,\n        },\n        inputFS: overlayFS,\n      });\n\n      let bundles = await Promise.all(\n        bundleGraph\n          .getBundles()\n          .map(b => overlayFS.readFile(b.filePath, 'utf8')),\n      );\n\n      let onGlobal = sinon.spy();\n      await run(bundleGraph, {globalThis: 'global', onGlobal});\n\n      assert(bundles.some(b => b.includes('var $parcel$global = globalThis')));\n      assert(bundles.every(b => !b.includes('var global = arguments[3]')));\n      assert.equal(onGlobal.callCount, 1);\n      assert.deepEqual(onGlobal.firstCall.args, ['global']);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/glsl.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport fs from 'fs';\nimport {bundle, run, normaliseNewlines} from '@parcel/test-utils';\n\ndescribe('glsl', function () {\n  it('should support requiring GLSL files via glslify', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/glsl/index.js'));\n\n    let shader = fs.readFileSync(\n      path.join(__dirname, '/integration/glsl/compiled.glsl'),\n      'utf8',\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.ok(\n      output().reduce((acc, requiredShader) => {\n        return (\n          acc && normaliseNewlines(shader) === normaliseNewlines(requiredShader)\n        );\n      }, true),\n    );\n  });\n\n  it('should correctly resolve relative GLSL imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/glsl-relative-import/index.js'),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(\n      output.trim(),\n      `#define GLSLIFY 1\nfloat b(float p) { return p*2.0; }\n\nfloat c(float p) { return b(p)*3.0; }\n\nvarying float x;\n\nvoid main() { gl_FragColor = vec4(c(x)); }`,\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/graphql.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {bundle, run} from '@parcel/test-utils';\nimport {parse, print} from 'graphql/language';\n\ndescribe('graphql', function () {\n  it('should support requiring graphql files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/graphql/index.js'));\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.deepEqual(\n      normalize(output()),\n      normalize(`\n        {\n          user(id: 5) {\n            ...UserFragment\n          }\n        }\n\n        fragment UserFragment on User {\n          firstName\n          lastName\n        }\n      `),\n    );\n  });\n\n  it('should support importing other graphql files from a graphql file', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/graphql-import/index.js'),\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.deepEqual(\n      normalize(output()),\n      normalize(`\n        {\n          user(id: 6) {\n            ...UserFragment\n            ...AnotherUserFragment\n          }\n        }\n\n        fragment UserFragment on User {\n          firstName\n          lastName\n        }\n\n        fragment AnotherUserFragment on User {\n          address\n          email\n        }\n      `),\n    );\n  });\n\n  it('should support importing fragments in other graphql files by name', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/graphql-named-import/index.js'),\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.deepEqual(\n      normalize(output()),\n      normalize(`\n      query MyQuery {\n        user(id: 6) {\n          ...UserFragment\n          address {\n            ...Address\n          }\n        }\n      }\n\n      fragment UserFragment on User {\n        firstName\n        lastName\n        ...AnotherUserFragment\n      }\n\n      fragment Address on Address {\n        line1\n        county\n        postalCode\n      }\n\n      fragment AnotherUserFragment on User {\n        address\n        email\n      }\n\n      fragment otherUserFragment on User {\n        friends {\n          edges {\n            nodes {\n              name\n            }\n          }\n        }\n      }\n      `),\n    );\n  });\n});\n\nfunction normalize(body) {\n  return print(parse(body));\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/hmr.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport path from 'path';\nimport {\n  bundler,\n  getNextBuild,\n  getNextBuildSuccess,\n  ncp,\n  outputFS,\n  overlayFS,\n  sleep,\n  run,\n  request,\n  distDir,\n} from '@parcel/test-utils';\nimport WebSocket from 'ws';\nimport json5 from 'json5';\nimport getPort from 'get-port';\n// flowlint-next-line untyped-import:off\nimport JSDOM from 'jsdom';\nimport nullthrows from 'nullthrows';\nimport {pathToFileURL} from 'url';\nimport {normalizeSeparators} from '@parcel/utils';\nimport SourceMap from '@parcel/source-map';\n\nconst config = path.join(\n  __dirname,\n  './integration/custom-configs/.parcelrc-dev-server',\n);\n\nasync function closeSocket(ws: WebSocket) {\n  ws.close();\n  await new Promise(resolve => {\n    ws.once('close', resolve);\n  });\n}\n// flowlint-next-line unclear-type:off\nasync function openSocket(uri: string, opts: any) {\n  let ws = new WebSocket(uri, opts);\n\n  await new Promise((resolve, reject) => {\n    ws.once('open', resolve);\n    ws.once('error', reject);\n  });\n\n  return ws;\n}\n\nasync function nextWSMessage(ws: WebSocket) {\n  return json5.parse(await new Promise(resolve => ws.once('message', resolve)));\n}\n\ndescribe('hmr', function () {\n  let subscription, ws;\n\n  async function testHMRClient(\n    name: string,\n    updates:\n      | ((\n          // $FlowFixMe[unclear-type]\n          Array<any>,\n        ) => {[string]: string})\n      // $FlowFixMe[unclear-type]\n      | Array<(Array<any>) => {[string]: string}>,\n  ) {\n    await ncp(\n      path.join(__dirname, '/integration/', name),\n      path.join(__dirname, '/input'),\n    );\n\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/input/index.js'), {\n      hmrOptions: {\n        https: false,\n        port,\n        host: 'localhost',\n      },\n      inputFS: overlayFS,\n      config,\n    });\n\n    subscription = await b.watch();\n    let {bundleGraph} = await getNextBuildSuccess(b);\n    ws = await openSocket('ws://localhost:' + port);\n\n    let outputs = [];\n    let reloaded = false;\n    await run(bundleGraph, {\n      output(o) {\n        outputs.push(o);\n      },\n      location: {\n        reload() {\n          reloaded = true;\n          outputs = [];\n        },\n      },\n    });\n\n    for (let update of [].concat(updates)) {\n      // Fixup the prototypes so that strict assertions work\n      let fsUpdates = update(JSON.parse(JSON.stringify(outputs)));\n      for (let f in fsUpdates) {\n        await overlayFS.writeFile(\n          path.join(__dirname, '/input/', f),\n          fsUpdates[f],\n        );\n      }\n\n      await nextWSMessage(nullthrows(ws));\n      await sleep(100);\n    }\n\n    // Fixup the prototypes so that strict assertions work\n    return {\n      outputs: JSON.parse(JSON.stringify(outputs)),\n      reloaded,\n      bundleGraph,\n    };\n  }\n\n  afterEach(async () => {\n    if (ws) {\n      await closeSocket(ws);\n      ws = null;\n    }\n\n    if (subscription) {\n      await subscription.unsubscribe();\n      subscription = null;\n    }\n  });\n\n  describe('hmr server', () => {\n    beforeEach(async function () {\n      await outputFS.rimraf(path.join(__dirname, '/input'));\n      await ncp(\n        path.join(__dirname, '/integration/commonjs'),\n        path.join(__dirname, '/input'),\n      );\n    });\n\n    it('should emit an HMR update for the file that changed', async function () {\n      let port = await getPort();\n      let b = bundler(path.join(__dirname, '/input/index.js'), {\n        hmrOptions: {port},\n        inputFS: overlayFS,\n        config,\n      });\n\n      subscription = await b.watch();\n      await getNextBuild(b);\n\n      ws = await openSocket('ws://localhost:' + port);\n\n      outputFS.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'exports.a = 5;\\nexports.b = 5;',\n      );\n\n      let message = await nextWSMessage(nullthrows(ws));\n\n      assert.equal(message.type, 'update');\n\n      // Figure out why output doesn't change...\n      let localAsset = message.assets.find(asset =>\n        asset.output.includes('exports.a = 5;\\nexports.b = 5;\\n'),\n      );\n      assert(!!localAsset);\n      assert(localAsset.output.includes('//# sourceMappingURL'));\n      assert(localAsset.output.includes('//# sourceURL'));\n    });\n\n    it('should emit an HMR update for all new dependencies along with the changed file', async function () {\n      let port = await getPort();\n      let b = bundler(path.join(__dirname, '/input/index.js'), {\n        hmrOptions: {port},\n        inputFS: overlayFS,\n        config,\n      });\n\n      subscription = await b.watch();\n      await getNextBuild(b);\n\n      ws = await openSocket('ws://localhost:' + port);\n\n      outputFS.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'require(\"fs\"); exports.a = 5; exports.b = 5;',\n      );\n\n      let message = await nextWSMessage(nullthrows(ws));\n\n      assert.equal(message.type, 'update');\n\n      assert.equal(message.assets.length, 1);\n    });\n\n    it('should emit an HMR error on bundle failure', async function () {\n      let port = await getPort();\n      let b = bundler(path.join(__dirname, '/input/index.js'), {\n        hmrOptions: {port},\n        inputFS: overlayFS,\n        config,\n      });\n\n      subscription = await b.watch();\n      await getNextBuild(b);\n\n      ws = await openSocket('ws://localhost:' + port);\n\n      outputFS.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'require(\"fs\"; exports.a = 5; exports.b = 5;',\n      );\n\n      let message = await nextWSMessage(nullthrows(ws));\n\n      assert.equal(message.type, 'error');\n\n      assert(!!message.diagnostics, 'Should contain a diagnostics key');\n      assert(!!message.diagnostics.html, 'Should contain a html diagnostic');\n      assert(!!message.diagnostics.ansi, 'Should contain an ansi diagnostic');\n    });\n\n    it('should emit an HMR error to new connections after a bundle failure', async function () {\n      let port = await getPort();\n      let b = bundler(path.join(__dirname, '/input/index.js'), {\n        hmrOptions: {port},\n        inputFS: overlayFS,\n        config,\n      });\n\n      subscription = await b.watch();\n      await getNextBuild(b);\n\n      await outputFS.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'require(\"fs\"; exports.a = 5; exports.b = 5;',\n      );\n\n      ws = await openSocket('ws://localhost:' + port);\n      let message = await nextWSMessage(ws);\n\n      assert.equal(message.type, 'error');\n    });\n\n    it('should emit an HMR update after error has been resolved', async function () {\n      let port = await getPort();\n      let b = bundler(path.join(__dirname, '/input/index.js'), {\n        hmrOptions: {port},\n        inputFS: overlayFS,\n        config,\n      });\n\n      subscription = await b.watch();\n      await getNextBuild(b);\n\n      ws = await openSocket('ws://localhost:' + port);\n\n      await outputFS.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'require(\"fs\"; exports.a = 5; exports.b = 5;',\n      );\n\n      let message = await nextWSMessage(nullthrows(ws));\n\n      assert.equal(message.type, 'error');\n\n      await outputFS.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'require(\"fs\"); exports.a = 5; exports.b = 5;',\n      );\n\n      message = await nextWSMessage(nullthrows(ws));\n\n      assert.equal(message.type, 'update');\n    });\n\n    it('should make a secure connection', async function () {\n      let port = await getPort();\n      let b = bundler(path.join(__dirname, '/input/index.js'), {\n        serveOptions: {\n          https: true,\n          port,\n          host: 'localhost',\n        },\n        hmrOptions: {port},\n        inputFS: overlayFS,\n        config,\n      });\n\n      subscription = await b.watch();\n      await getNextBuild(b);\n\n      ws = await openSocket('wss://localhost:' + port, {\n        rejectUnauthorized: false,\n      });\n\n      await outputFS.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'exports.a = 5;\\nexports.b = 5;',\n      );\n\n      let message = await nextWSMessage(nullthrows(ws));\n\n      assert.equal(message.type, 'update');\n    });\n\n    it('should make a secure connection with custom certificate', async function () {\n      let port = await getPort();\n      let b = bundler(path.join(__dirname, '/input/index.js'), {\n        serveOptions: {\n          https: {\n            key: path.join(__dirname, '/integration/https/private.pem'),\n            cert: path.join(__dirname, '/integration/https/primary.crt'),\n          },\n          port,\n          host: 'localhost',\n        },\n        hmrOptions: {port},\n        inputFS: overlayFS,\n        config,\n      });\n\n      subscription = await b.watch();\n      await getNextBuild(b);\n\n      ws = await openSocket('wss://localhost:' + port, {\n        rejectUnauthorized: false,\n      });\n\n      outputFS.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'exports.a = 5;\\nexports.b = 5;',\n      );\n\n      let message = await nextWSMessage(nullthrows(ws));\n\n      assert.equal(message.type, 'update');\n    });\n\n    it('should respond to requests for assets by id', async function () {\n      let port = await getPort();\n      let b = bundler(path.join(__dirname, '/input/index.js'), {\n        serveOptions: {port},\n        hmrOptions: {port},\n        inputFS: overlayFS,\n        config,\n      });\n\n      subscription = await b.watch();\n      let event = await getNextBuild(b);\n\n      let bundleGraph = nullthrows(event.bundleGraph);\n      let asset = nullthrows(bundleGraph.getBundles()[0].getMainEntry());\n      let contents = await request('/__parcel_hmr/' + asset.id, port);\n      let publicId = nullthrows(bundleGraph).getAssetPublicId(asset);\n      assert(\n        contents.startsWith(\n          `parcelHotUpdate['${publicId}'] = function (require, module, exports) {`,\n        ),\n      );\n      assert(contents.includes('//# sourceMappingURL'));\n      assert(contents.includes('//# sourceURL'));\n    });\n\n    describe('source maps', function () {\n      let port, bundleGraph;\n      async function setup(publicUrl) {\n        port = await getPort();\n        let b = bundler(path.join(__dirname, '/input/index.js'), {\n          serveOptions: {port, publicUrl},\n          hmrOptions: {port},\n          inputFS: overlayFS,\n          config,\n        });\n\n        subscription = await b.watch();\n        let event = await getNextBuild(b);\n        bundleGraph = nullthrows(event.bundleGraph);\n      }\n\n      it('should return source maps by absolute bundle path', async function () {\n        await setup();\n        let qs = new URLSearchParams();\n        qs.set(\n          'filename',\n          normalizeSeparators(bundleGraph.getBundles()[0].filePath),\n        );\n        let contents = await request(\n          '/__parcel_source_map?' + qs.toString(),\n          port,\n        );\n        assert.equal(\n          contents,\n          await outputFS.readFile(\n            bundleGraph.getBundles()[0].filePath + '.map',\n            'utf8',\n          ),\n        );\n      });\n\n      it('should return source maps by relative bundle path', async function () {\n        await setup();\n        let qs = new URLSearchParams();\n        qs.set(\n          'filename',\n          normalizeSeparators(\n            path.relative(distDir, bundleGraph.getBundles()[0].filePath),\n          ),\n        );\n        let contents = await request(\n          '/__parcel_source_map?' + qs.toString(),\n          port,\n        );\n        assert.equal(\n          contents,\n          await outputFS.readFile(\n            bundleGraph.getBundles()[0].filePath + '.map',\n            'utf8',\n          ),\n        );\n      });\n\n      it('should return source maps by file url', async function () {\n        await setup();\n        let qs = new URLSearchParams();\n        qs.set(\n          'filename',\n          pathToFileURL(bundleGraph.getBundles()[0].filePath).toString(),\n        );\n        let contents = await request(\n          '/__parcel_source_map?' + qs.toString(),\n          port,\n        );\n        assert.equal(\n          contents,\n          await outputFS.readFile(\n            bundleGraph.getBundles()[0].filePath + '.map',\n            'utf8',\n          ),\n        );\n      });\n\n      it('should return source maps by fully qualified bundle URL', async function () {\n        await setup();\n        let qs = new URLSearchParams();\n        qs.set(\n          'filename',\n          'http://localhost:1234/' +\n            normalizeSeparators(\n              path.relative(distDir, bundleGraph.getBundles()[0].filePath),\n            ),\n        );\n        let contents = await request(\n          '/__parcel_source_map?' + qs.toString(),\n          port,\n        );\n        assert.equal(\n          contents,\n          await outputFS.readFile(\n            bundleGraph.getBundles()[0].filePath + '.map',\n            'utf8',\n          ),\n        );\n      });\n\n      it('should return source maps by with fully qualified public URL', async function () {\n        await setup('http://localhost:1234/static/');\n        let qs = new URLSearchParams();\n        qs.set(\n          'filename',\n          'http://localhost:1234/static/' +\n            normalizeSeparators(\n              path.relative(distDir, bundleGraph.getBundles()[0].filePath),\n            ),\n        );\n        let contents = await request(\n          '/__parcel_source_map?' + qs.toString(),\n          port,\n        );\n        assert.equal(\n          contents,\n          await outputFS.readFile(\n            bundleGraph.getBundles()[0].filePath + '.map',\n            'utf8',\n          ),\n        );\n      });\n\n      it('should return source maps by with relative public url', async function () {\n        await setup('/static');\n        let qs = new URLSearchParams();\n        qs.set(\n          'filename',\n          '/static/' +\n            normalizeSeparators(\n              path.relative(distDir, bundleGraph.getBundles()[0].filePath),\n            ),\n        );\n        let contents = await request(\n          '/__parcel_source_map?' + qs.toString(),\n          port,\n        );\n        assert.equal(\n          contents,\n          await outputFS.readFile(\n            bundleGraph.getBundles()[0].filePath + '.map',\n            'utf8',\n          ),\n        );\n      });\n\n      it('should return source maps by with RSC file URL', async function () {\n        await setup();\n        let qs = new URLSearchParams();\n        qs.set(\n          'filename',\n          'rsc://React/Server/' +\n            pathToFileURL(bundleGraph.getBundles()[0].filePath).toString(),\n        );\n        let contents = await request(\n          '/__parcel_source_map?' + qs.toString(),\n          port,\n        );\n        assert.equal(\n          contents,\n          await outputFS.readFile(\n            bundleGraph.getBundles()[0].filePath + '.map',\n            'utf8',\n          ),\n        );\n      });\n\n      it('should return source maps for an asset by id', async function () {\n        await setup();\n        let qs = new URLSearchParams();\n        qs.set(\n          'filename',\n          '/__parcel_hmr/' +\n            nullthrows(bundleGraph.getBundles()[0].getMainEntry()).id,\n        );\n        let contents = await request(\n          '/__parcel_source_map?' + qs.toString(),\n          port,\n        );\n        assert(contents.startsWith('{\"mappings\"'));\n      });\n\n      it('should return source maps for an asset by file path', async function () {\n        await setup();\n        let qs = new URLSearchParams();\n        qs.set(\n          'filename',\n          pathToFileURL(\n            nullthrows(bundleGraph.getBundles()[0].getMainEntry()).filePath,\n          ).toString(),\n        );\n        let contents = await request(\n          '/__parcel_source_map?' + qs.toString(),\n          port,\n        );\n        assert(contents.startsWith('{\"mappings\"'));\n      });\n    });\n\n    describe('code frame', function () {\n      let port, bundleGraph;\n      beforeEach(async function () {\n        port = await getPort();\n        let b = bundler(path.join(__dirname, '/input/index.js'), {\n          serveOptions: {port},\n          hmrOptions: {port},\n          inputFS: overlayFS,\n          config,\n        });\n\n        subscription = await b.watch();\n        let event = await getNextBuild(b);\n        bundleGraph = nullthrows(event.bundleGraph);\n      });\n\n      it('should return code frames for stack', async function () {\n        let map = new SourceMap('/');\n        map.addVLQMap(\n          JSON.parse(\n            await outputFS.readFile(\n              bundleGraph.getBundles()[0].filePath + '.map',\n              'utf8',\n            ),\n          ),\n        );\n        let source = map.getSourceIndex('input/index.js');\n        let mappings = map.getMappings();\n        let mapping = nullthrows(\n          mappings.find(m => m.source === source && m.original?.line === 6),\n        );\n\n        let res = await fetch(\n          'http://localhost:' + port + '/__parcel_code_frame',\n          {\n            method: 'POST',\n            headers: {\n              'Content-Type': 'application/json',\n            },\n            body: JSON.stringify({\n              contextLines: 3,\n              frames: [\n                {\n                  fileName: normalizeSeparators(\n                    bundleGraph.getBundles()[0].filePath,\n                  ),\n                  lineNumber: mapping.generated.line,\n                  columnNumber: mapping.generated.column,\n                },\n              ],\n            }),\n          },\n        );\n\n        let json = await res.json();\n        assert.deepEqual(json, [\n          {\n            fileName: '../dist/index.js',\n            lineNumber: mapping.generated.line,\n            columnNumber: mapping.generated.column,\n            sourceFileName: 'input/index.js',\n            sourceLineNumber: mapping.original?.line,\n            sourceColumnNumber: mapping.original?.column,\n            compiledLines: json[0].compiledLines,\n            sourceLines: json[0].sourceLines,\n          },\n        ]);\n      });\n    });\n  });\n\n  // TODO: add test for 4532 (`require` call in modified asset in child bundle where HMR runtime runs in parent bundle)\n  describe('hmr runtime', () => {\n    beforeEach(async () => {\n      await outputFS.rimraf(path.join(__dirname, '/input'));\n    });\n\n    it('should support self accepting', async function () {\n      let {outputs} = await testHMRClient('hmr-accept-self', outputs => {\n        assert.deepStrictEqual(outputs, [\n          ['other', 1],\n          ['local', 1],\n          ['index', 1],\n        ]);\n\n        return {\n          'other.js': 'export const value = 3; output([\"other\", value]);',\n        };\n      });\n\n      assert.deepStrictEqual(outputs, [\n        ['other', 1],\n        ['local', 1],\n        ['index', 1],\n        ['other', 3],\n        ['local', 3],\n      ]);\n    });\n\n    it('should bubble through parents', async function () {\n      let {outputs} = await testHMRClient('hmr-bubble', outputs => {\n        assert.deepStrictEqual(outputs, [\n          ['other', 1],\n          ['local', 1],\n          ['index', 1],\n        ]);\n\n        return {\n          'other.js': 'export const value = 3; output([\"other\", value]);',\n        };\n      });\n\n      assert.deepStrictEqual(outputs, [\n        ['other', 1],\n        ['local', 1],\n        ['index', 1],\n        ['other', 3],\n        ['local', 3],\n        ['index', 3],\n      ]);\n    });\n\n    it('should call dispose callbacks', async function () {\n      let {outputs} = await testHMRClient('hmr-dispose', outputs => {\n        assert.deepStrictEqual(outputs, [\n          ['eval:other', 1, null],\n          ['eval:local', 1, null],\n          ['eval:index', 1, null],\n        ]);\n\n        return {\n          'other.js': `export const value = 3;\noutput([\"eval:other\", value, module.hot.data]);\nmodule.hot.dispose((data) => {\n  output([\"dispose:other\", value]);\n  data.value = value;\n})\n`,\n        };\n      });\n\n      // Webpack:\n      // [\"eval:other\", 1, undefined]\n      // [\"eval:local\", 1, undefined]\n      // [\"eval:index\", 1, undefined]\n      // [\"dispose:index\", 1]\n      // [\"dispose:local\", 1]\n      // [\"dispose:other\", 1]\n      // [\"eval:other\", 3, {value: 1}]\n      // [\"eval:local\", 3, {value: 1}]\n      // [\"eval:index\", 3, {value: 1}]\n      assert.deepStrictEqual(outputs, [\n        ['eval:other', 1, null],\n        ['eval:local', 1, null],\n        ['eval:index', 1, null],\n        ['dispose:other', 1],\n        ['dispose:local', 1],\n        ['dispose:index', 1],\n        ['eval:other', 3, {value: 1}],\n        ['eval:local', 3, {value: 1}],\n        ['eval:index', 3, {value: 1}],\n      ]);\n    });\n\n    it('should work with circular dependencies', async function () {\n      let {outputs} = await testHMRClient('hmr-circular', outputs => {\n        assert.deepEqual(outputs, [3]);\n\n        return {\n          'local.js':\n            \"var other = require('./index.js'); exports.a = 5; exports.b = 5;\",\n        };\n      });\n\n      assert.deepEqual(outputs, [3, 10]);\n    });\n\n    it('should reload if not accepted', async function () {\n      let {reloaded} = await testHMRClient('hmr-reload', outputs => {\n        assert.deepEqual(outputs, [3]);\n        return {\n          'local.js': 'exports.a = 5; exports.b = 5;',\n        };\n      });\n\n      assert(reloaded);\n    });\n\n    it('should reload when modifying the entry', async function () {\n      let {reloaded} = await testHMRClient('hmr-reload', outputs => {\n        assert.deepEqual(outputs, [3]);\n        return {\n          'index.js': 'output(5)',\n        };\n      });\n\n      assert(reloaded);\n    });\n\n    it('should work with multiple parents', async function () {\n      let {outputs} = await testHMRClient('hmr-multiple-parents', outputs => {\n        assert.deepEqual(outputs, ['a: fn1 b: fn2']);\n        return {\n          'fn2.js': 'export function fn2() { return \"UPDATED\"; }',\n        };\n      });\n\n      assert.deepEqual(outputs, ['a: fn1 b: fn2', 'a: fn1 b: UPDATED']);\n    });\n\n    it('should reload if only one parent accepts', async function () {\n      let {reloaded} = await testHMRClient(\n        'hmr-multiple-parents-reload',\n        outputs => {\n          assert.deepEqual(outputs, ['a: fn1', 'b: fn2']);\n          return {\n            'fn2.js': 'export function fn2() { return \"UPDATED\"; }',\n          };\n        },\n      );\n\n      assert(reloaded);\n    });\n\n    it('should work across bundles', async function () {\n      let {reloaded, outputs} = await testHMRClient('hmr-dynamic', outputs => {\n        assert.deepEqual(outputs, [3]);\n        return {\n          'local.js': 'exports.a = 5; exports.b = 5;',\n        };\n      });\n\n      assert.deepEqual(outputs, [3, 10]);\n      assert(!reloaded);\n    });\n\n    it('should work when an asset is duplicated', async function () {\n      let {reloaded, outputs} = await testHMRClient(\n        'hmr-duplicate',\n        outputs => {\n          assert.deepEqual(outputs, [7]);\n          return {\n            'shared.js': 'exports.a = 5;',\n          };\n        },\n      );\n\n      assert.deepEqual(outputs, [7, 13]);\n      assert(!reloaded);\n    });\n\n    it('should bubble to parents if child returns additional parents', async function () {\n      let {reloaded, outputs} = await testHMRClient('hmr-parents', outputs => {\n        assert.deepEqual(outputs, ['child 2', 'root']);\n        return {\n          'updated.js': 'exports.a = 3;',\n        };\n      });\n\n      assert.deepEqual(outputs, [\n        'child 2',\n        'root',\n        'child 3',\n        'accept child',\n        'root',\n        'accept root',\n      ]);\n      assert(!reloaded);\n    });\n\n    it('should bubble to parents and reload if they do not accept', async function () {\n      let {reloaded, outputs} = await testHMRClient(\n        'hmr-parents-reload',\n        outputs => {\n          assert.deepEqual(outputs, ['child 2', 'root']);\n          return {\n            'updated.js': 'exports.a = 3;',\n          };\n        },\n      );\n\n      assert.deepEqual(outputs, []);\n      assert(reloaded);\n    });\n\n    it('should work with urls', async function () {\n      let search;\n      let {outputs} = await testHMRClient('hmr-url', outputs => {\n        assert.equal(outputs.length, 1);\n        let url = new URL(outputs[0]);\n        assert(/test\\.[0-9a-f]+\\.txt/, url.pathname);\n        assert(!isNaN(url.search.slice(1)));\n        search = url.search;\n        return {\n          'test.txt': 'yo',\n        };\n      });\n\n      assert.equal(outputs.length, 2);\n      let url = new URL(outputs[1]);\n      assert(/test\\.[0-9a-f]+\\.txt/, url.pathname);\n      assert(!isNaN(url.search.slice(1)));\n      assert.notEqual(url.search, search);\n    });\n\n    it('should clean up orphaned assets when deleting a dependency', async function () {\n      let search;\n      let {outputs} = await testHMRClient('hmr-url', [\n        outputs => {\n          assert.equal(outputs.length, 1);\n          let url = new URL(outputs[0]);\n          assert(/test\\.[0-9a-f]+\\.txt/, url.pathname);\n          assert(!isNaN(url.search.slice(1)));\n          search = url.search;\n          return {\n            'index.js': 'output(\"yo\"); module.hot.accept();',\n          };\n        },\n        outputs => {\n          assert.equal(outputs.length, 2);\n          assert.equal(outputs[1], 'yo');\n          return {\n            'index.js':\n              'output(new URL(\"test.txt\", import.meta.url)); module.hot.accept();',\n          };\n        },\n      ]);\n\n      assert.equal(outputs.length, 3);\n      let url = new URL(outputs[2]);\n      assert(/test\\.[0-9a-f]+\\.txt/, url.pathname);\n      assert(!isNaN(url.search.slice(1)));\n      assert.notEqual(url.search, search);\n    });\n\n    it('should have correct source locations in errors', async function () {\n      let {outputs, bundleGraph} = await testHMRClient(\n        'hmr-accept-self',\n        () => {\n          return {\n            'local.js': 'output(new Error().stack);',\n          };\n        },\n      );\n\n      let asset = bundleGraph\n        .getBundles()[0]\n        .traverseAssets((asset, _, actions) => {\n          if (asset.filePath.endsWith('local.js')) {\n            actions.stop();\n            return asset;\n          }\n        });\n\n      let stack = outputs.pop();\n      assert(stack.includes('/__parcel_hmr/' + nullthrows(asset).id));\n    });\n\n    /*\n    it.skip('should accept HMR updates in the runtime after an initial error', async function() {\n      await fs.mkdirp(path.join(__dirname, '/input'));\n      fs.writeFile(\n        path.join(__dirname, '/input/index.js'),\n        'module.hot.accept();throw new Error(\"Something\");\\noutput(123);',\n      );\n\n      let b = bundler(path.join(__dirname, '/input/index.js'), {\n        watch: true,\n        hmr: true,\n      });\n      let bundle = await b.bundle();\n\n      let outputs = [];\n      let errors = [];\n\n      var ctx = prepareBrowserContext(bundle, {\n        output(o) {\n          outputs.push(o);\n        },\n        error(e) {\n          errors.push(e);\n        },\n      });\n      vm.createContext(ctx);\n      vm.runInContext(\n        `try {\n          ${(await fs.readFile(bundle.name)).toString()}\n        } catch(e) {\n          error(e);\n        }`,\n        ctx,\n      );\n\n      assert.deepEqual(outputs, []);\n      assert.equal(errors.length, 1);\n      assert.equal(errors[0].message, 'Something');\n\n      await sleep(100);\n      fs.writeFile(path.join(__dirname, '/input/index.js'), 'output(123);');\n\n      // await nextEvent(b, 'bundled');\n      assert.deepEqual(outputs, [123]);\n      assert.equal(errors.length, 1);\n    });\n\n    it.skip('should call dispose and accept callbacks', async function() {\n      await ncp(\n        path.join(__dirname, '/integration/hmr-callbacks'),\n        path.join(__dirname, '/input'),\n      );\n\n      let port = await getPort();\n      let b = await bundle(path.join(__dirname, '/input/index.js'), {\n        hmrOptions: {\n          https: false,\n          port,\n          host: 'localhost',\n        },\n        env: {\n          HMR_HOSTNAME: 'localhost',\n          HMR_PORT: port,\n        },\n        watch: true,\n      });\n\n      let outputs = [];\n      let moduleId = '';\n\n      await run(b, {\n        reportModuleId(id) {\n          moduleId = id;\n        },\n        output(o) {\n          outputs.push(o);\n        },\n      });\n\n      assert.deepEqual(outputs, [3]);\n\n      let ws = new WebSocket('ws://localhost:' + port);\n\n      await sleep(50);\n      fs.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'exports.a = 5; exports.b = 5;',\n      );\n\n      await nextWSMessage(ws);\n      await sleep(50);\n\n      assert.notEqual(moduleId, undefined);\n      assert.deepEqual(outputs, [\n        3,\n        'dispose-' + moduleId,\n        10,\n        'accept-' + moduleId,\n      ]);\n    });\n\n    it.skip('should trigger a page reload when a new bundle is created', async function() {\n      await ncp(\n        path.join(__dirname, '/integration/hmr-new-bundle'),\n        path.join(__dirname, '/input'),\n      );\n\n      let b = bundler(path.join(__dirname, '/input/index.html'), {\n        watch: true,\n        hmr: true,\n      });\n      let bundle = await b.bundle();\n\n      let ctx = await run([...bundle.childBundles][0], {}, {require: false});\n      let spy = sinon.spy(ctx.location, 'reload');\n\n      await sleep(50);\n      assert(spy.notCalled);\n\n      await sleep(100);\n      fs.writeFile(\n        path.join(__dirname, '/input/index.js'),\n        'import \"./index.css\"',\n      );\n\n      // await nextEvent(b, 'bundled');\n      assert(spy.calledOnce);\n\n      let contents = await fs.readFile(\n        path.join(__dirname, '/dist/index.html'),\n        'utf8',\n      );\n      assert(contents.includes('.css'));\n    });\n\n    it.skip('should log emitted errors and show an error overlay', async function() {\n      await ncp(\n        path.join(__dirname, '/integration/commonjs'),\n        path.join(__dirname, '/input'),\n      );\n\n      let port = await getPort();\n      let b = await bundle(path.join(__dirname, '/input/index.js'), {\n        hmrOptions: {\n          https: false,\n          port,\n          host: 'localhost',\n        },\n        env: {\n          HMR_HOSTNAME: 'localhost',\n          HMR_PORT: port,\n        },\n        watch: true,\n      });\n\n      let logs = [];\n      let ctx = await run(\n        b,\n        {\n          console: {\n            error(msg) {\n              logs.push(msg);\n            },\n            log() {},\n            clear() {},\n          },\n        },\n        {require: false},\n      );\n\n      let spy = sinon.spy(ctx.document.body, 'appendChild');\n      let ws = new WebSocket('ws://localhost:' + port);\n\n      await sleep(50);\n      fs.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'require(\"fs\"; exports.a = 5; exports.b = 5;',\n      );\n\n      await nextWSMessage(ws);\n      await sleep(50);\n\n      assert.equal(logs.length, 1);\n      assert(logs[0].trim().startsWith('[parcel] 🚨'));\n      assert(spy.calledOnce);\n    });\n\n    it.skip('should log when errors resolve', async function() {\n      await ncp(\n        path.join(__dirname, '/integration/commonjs'),\n        path.join(__dirname, '/input'),\n      );\n\n      let port = await getPort();\n      let b = await bundle(path.join(__dirname, '/input/index.js'), {\n        hmrOptions: {\n          https: false,\n          port,\n          host: 'localhost',\n        },\n        env: {\n          HMR_HOSTNAME: 'localhost',\n          HMR_PORT: port,\n        },\n        watch: true,\n      });\n\n      let logs = [];\n      let ctx = await run(\n        b,\n        {\n          console: {\n            error(msg) {\n              logs.push(msg);\n            },\n            log(msg) {\n              logs.push(msg);\n            },\n            clear() {},\n          },\n          location: {hostname: 'localhost', reload: function() {}},\n        },\n        {require: false},\n      );\n\n      let appendSpy = sinon.spy(ctx.document.body, 'appendChild');\n      let removeSpy = sinon.spy(ctx.document.getElementById('tmp'), 'remove');\n      let ws = new WebSocket('ws://localhost:' + port);\n\n      await sleep(50);\n      fs.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'require(\"fs\"; exports.a = 5; exports.b = 5;',\n      );\n\n      await nextWSMessage(ws);\n      await sleep(50);\n\n      assert(appendSpy.called);\n\n      await sleep(50);\n      fs.writeFile(\n        path.join(__dirname, '/input/local.js'),\n        'require(\"fs\"); exports.a = 5; exports.b = 5;',\n      );\n      await nextWSMessage(ws);\n      await sleep(50);\n\n      assert(removeSpy.called);\n\n      // assert.equal(logs.length, 2);\n      assert(logs[0].trim().startsWith('[parcel] 🚨'));\n      assert(logs[1].trim().startsWith('[parcel] ✨'));\n    });*/\n\n    it('should update CSS link tags when a CSS asset is changed', async () => {\n      let testDir = path.join(__dirname, '/input');\n      await overlayFS.rimraf(testDir);\n      await overlayFS.mkdirp(testDir);\n      await ncp(path.join(__dirname, '/integration/hmr-css'), testDir);\n\n      let port = await getPort();\n      let b = bundler(path.join(testDir, 'index.html'), {\n        inputFS: overlayFS,\n        outputFS: overlayFS,\n        serveOptions: {\n          https: false,\n          port,\n          host: '127.0.0.1',\n        },\n        hmrOptions: {port},\n        shouldContentHash: false,\n        config,\n      });\n\n      subscription = await b.watch();\n      let bundleEvent = await getNextBuild(b);\n      assert.equal(bundleEvent.type, 'buildSuccess');\n\n      // JSDOM doesn't support type=module\n      // https://github.com/jsdom/jsdom/issues/2475\n      let htmlPath = nullthrows(bundleEvent.bundleGraph).getBundles()[0]\n        .filePath;\n      let html = await outputFS.readFile(htmlPath, 'utf8');\n      html = html.replace(/type=\"module\"/g, '');\n      await outputFS.writeFile(htmlPath, html);\n\n      let window;\n      try {\n        let dom = await JSDOM.JSDOM.fromURL(\n          'http://127.0.0.1:' + port + '/index.html',\n          {\n            runScripts: 'dangerously',\n            resources: 'usable',\n            pretendToBeVisual: true,\n          },\n        );\n        let _window = (window = dom.window); // For Flow\n        window.WebSocket = WebSocket;\n        await new Promise(res =>\n          dom.window.document.addEventListener('load', () => {\n            res();\n          }),\n        );\n        _window.console.clear = () => {};\n        _window.console.warn = () => {};\n\n        let initialHref = _window.document.querySelector('link').href;\n\n        await overlayFS.copyFile(\n          path.join(testDir, 'index.2.css'),\n          path.join(testDir, 'index.css'),\n        );\n        assert.equal((await getNextBuild(b)).type, 'buildSuccess');\n        await sleep(200);\n\n        let newHref = _window.document.querySelector('link').href;\n\n        assert.notStrictEqual(initialHref, newHref);\n      } finally {\n        if (window) {\n          window.close();\n        }\n      }\n    });\n\n    it('should handle CSS Modules update correctly', async () => {\n      let testDir = path.join(__dirname, '/input');\n      await overlayFS.rimraf(testDir);\n      await overlayFS.mkdirp(testDir);\n      await ncp(path.join(__dirname, '/integration/hmr-css-modules'), testDir);\n\n      let port = await getPort();\n      let b = bundler(path.join(testDir, 'index.html'), {\n        inputFS: overlayFS,\n        outputFS: overlayFS,\n        serveOptions: {\n          https: false,\n          port,\n          host: '127.0.0.1',\n        },\n        hmrOptions: {port},\n        shouldContentHash: false,\n        config,\n      });\n\n      subscription = await b.watch();\n      let bundleEvent = await getNextBuild(b);\n      assert.equal(bundleEvent.type, 'buildSuccess');\n\n      // JSDOM doesn't support type=module\n      // https://github.com/jsdom/jsdom/issues/2475\n      let htmlPath = nullthrows(bundleEvent.bundleGraph).getBundles()[0]\n        .filePath;\n      let html = await outputFS.readFile(htmlPath, 'utf8');\n      html = html.replace(/type=\"module\"/g, '');\n      await outputFS.writeFile(htmlPath, html);\n\n      let window;\n      try {\n        let dom = await JSDOM.JSDOM.fromURL(\n          'http://127.0.0.1:' + port + '/index.html',\n          {\n            runScripts: 'dangerously',\n            resources: 'usable',\n            pretendToBeVisual: true,\n          },\n        );\n        let _window = (window = dom.window); // For Flow\n        window.WebSocket = WebSocket;\n        await new Promise(res =>\n          dom.window.document.addEventListener('load', () => {\n            res();\n          }),\n        );\n        _window.console.clear = () => {};\n        _window.console.warn = () => {};\n\n        let initialHref = _window.document.querySelector('link').href;\n\n        await overlayFS.copyFile(\n          path.join(testDir, 'index2.module.css'),\n          path.join(testDir, 'index.module.css'),\n        );\n        assert.equal((await getNextBuild(b)).type, 'buildSuccess');\n        await sleep(200);\n\n        let newHref = _window.document.querySelector('link').href;\n\n        assert.notStrictEqual(initialHref, newHref);\n      } finally {\n        if (window) {\n          window.close();\n        }\n      }\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/html.js",
    "content": "import assert from 'assert';\nimport {\n  assertBundles,\n  assertRejectsWithDiagnostic,\n  bundle,\n  bundler,\n  distDir,\n  getNextBuild,\n  removeDistDirectory,\n  run,\n  inputFS,\n  outputFS,\n  overlayFS,\n  ncp,\n  fsFixture,\n} from '@parcel/test-utils';\nimport path from 'path';\nimport Logger from '@parcel/logger';\nimport {md} from '@parcel/diagnostic';\n\ndescribe('html', function () {\n  beforeEach(async () => {\n    await removeDistDirectory();\n  });\n\n  let subscription;\n  afterEach(async () => {\n    if (subscription) {\n      await subscription.unsubscribe();\n      subscription = null;\n    }\n  });\n\n  it('should support bundling HTML', async () => {\n    let b = await bundle(path.join(__dirname, '/integration/html/index.html'));\n\n    assertBundles(b, [\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        // index.html\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        // foo/index.html\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        // other.html\n        name: 'other.html',\n        assets: ['other.html'],\n      },\n      {\n        // foo/other.html\n        name: 'other.html',\n        assets: ['other.html'],\n      },\n      {\n        type: 'svg',\n        assets: ['icons.svg'],\n      },\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'css',\n        assets: ['index.css'],\n      },\n    ]);\n\n    let files = await outputFS.readdir(distDir);\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    for (let file of files) {\n      if (file !== 'index.html' && path.extname(file) !== '.map') {\n        assert(html.includes(file));\n      }\n    }\n\n    assert(html.includes('#hash_link'));\n    assert(html.includes('mailto:someone@acme.com'));\n    assert(html.includes('tel:+33636757575'));\n    assert(html.includes('https://unpkg.com/parcel-bundler'));\n\n    let iconsBundle = b.getBundles().find(b => b.name.startsWith('icons'));\n    assert(\n      html.includes('/' + path.basename(iconsBundle.filePath) + '#icon-code'),\n    );\n\n    let value = null;\n    await run(b, {\n      alert: v => (value = v),\n    });\n    assert.equal(value, 'Hi');\n  });\n\n  it('should support pkg#source array as entrypoints', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-pkg-source-array'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'a.html',\n        assets: ['a.html'],\n      },\n      {\n        name: 'b.html',\n        assets: ['b.html'],\n      },\n    ]);\n\n    assert(await outputFS.exists(path.join(distDir, 'a.html'), 'utf8'));\n    assert(await outputFS.exists(path.join(distDir, 'b.html'), 'utf8'));\n  });\n\n  it('should find href attr when not first', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-attr-order/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'html',\n        assets: ['other.html'],\n      },\n    ]);\n  });\n\n  it('should insert empty script tag for HMR at the end of the body', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/html-no-js/index.html'),\n      {\n        hmrOptions: {},\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.html'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n\n    assert(/<script src=\".+?\\.js\"><\\/script><\\/body>/.test(html));\n  });\n\n  it('should insert empty script tag for HMR at the implied </body>', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/html-no-js/no-body.html'),\n      {\n        hmrOptions: {},\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['no-body.html'],\n      },\n      {\n        name: 'no-body.html',\n        assets: ['no-body.html'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(\n      path.join(distDir, 'no-body.html'),\n      'utf8',\n    );\n\n    assert(/<script src=\".+?\\.js\"><\\/script><\\/body><\\/html>/.test(html));\n  });\n\n  it('should insert empty script tag for HMR at the end of the file if both </body> and </html> are implied', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/html-no-js/no-body-or-html.html'),\n      {\n        hmrOptions: {},\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['no-body-or-html.html'],\n      },\n      {\n        name: 'no-body-or-html.html',\n        assets: ['no-body-or-html.html'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(\n      path.join(distDir, 'no-body-or-html.html'),\n      'utf8',\n    );\n\n    assert(/<script src=\".+?\\.js\"><\\/script><\\/body><\\/html>$/.test(html));\n  });\n\n  it('should insert empty script tag for HMR at the end of the body when having normal inline script', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/html-inline-js/index.html'),\n      {\n        hmrOptions: {},\n      },\n    );\n\n    assertBundles(b, [\n      {type: 'js', assets: ['index.html']},\n      {type: 'js', assets: ['index.html']},\n      {type: 'js', assets: ['index.html']},\n      {type: 'js', assets: ['index.html']},\n      {type: 'js', assets: ['index.html']},\n      {name: 'index.html', assets: ['index.html']},\n    ]);\n\n    const html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n\n    assert(/<script src=\".+?\\.js\"><\\/script><\\/body>/.test(html));\n  });\n\n  it('should support canonical links', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-canonical/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n\n    assert(/<link rel=\"canonical\" href=\"\\.?\\/index.html\">/.test(html));\n  });\n\n  it('should support RSS feed links', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-feed/rss.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'rss.html',\n        assets: ['rss.html'],\n      },\n      {\n        name: 'feed.xml',\n        assets: ['feed.xml'],\n      },\n    ]);\n  });\n\n  it('should support atom feed links', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-feed/atom.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'atom.html',\n        assets: ['atom.html'],\n      },\n      {\n        name: 'feed.xml',\n        assets: ['feed.xml'],\n      },\n    ]);\n  });\n\n  it('should support meta tags', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-meta/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        name: 'logo.svg',\n        assets: ['logo.svg'],\n      },\n      {\n        type: 'png',\n        assets: ['logo.png'],\n      },\n      {\n        type: 'png',\n        assets: ['logo.png'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(html.includes(`<meta name=\"msapplication-config\" content=\"none\">`));\n    assert(html.includes(`<meta property=\"og:image\" content=\"/logo.svg\">`));\n    assert(\n      /<meta name=\"msapplication-TileImage\" content=\"\\/logo\\.[0-9a-f]+\\.png\">/.test(\n        html,\n      ),\n    );\n    assert(\n      /<meta name=\"msapplication-square70x70logo\" content=\"\\/logo\\.[0-9a-f]+\\.png\">/.test(\n        html,\n      ),\n    );\n    assert(\n      html.includes(\n        `<meta name=\"twitter:image\" content=\"https://parceljs.org/assets/logo.svg\">`,\n      ),\n    );\n  });\n\n  it('should insert sibling CSS bundles for JS files in the HEAD', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-css/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'css',\n        assets: ['index.css'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(\n      /<link rel=\"stylesheet\" href=\"[/\\\\]{1}html-css\\.[a-f0-9]+\\.css\">/.test(\n        html,\n      ),\n    );\n  });\n\n  it('should insert sibling bundles before body element if no HEAD', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-css-head/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'css',\n        assets: ['index.css'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(\n      /<html><head>\\s*<link rel=\"stylesheet\" href=\"[/\\\\]{1}html-css-head\\.[a-f0-9]+\\.css\"><\\/head><body>/.test(\n        html,\n      ),\n    );\n  });\n\n  it('should insert sibling bundles after doctype if no html', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-css-doctype/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'css',\n        assets: ['index.css'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(\n      /^\\s*<!DOCTYPE html><html><head>\\s*<link .*>\\s*<script .*>\\s*<\\/script>\\s*/.test(\n        html,\n      ),\n    );\n  });\n\n  it.skip('should insert sibling JS bundles for CSS files in the HEAD', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-css-js/index.html'),\n      {\n        hmr: true,\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'css',\n        assets: ['index.css'],\n      },\n      {\n        type: 'js',\n        assets: ['index.css', 'css-loader.js', 'hmr-runtime.js'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(/<script src=\"[/\\\\]{1}index\\.[a-f0-9]+\\.js\">/.test(html));\n  });\n\n  it('should insert sibling bundles at correct location in tree when optional elements are absent', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/html-css-optional-elements/index.html',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'css',\n        assets: ['index.css'],\n      },\n      {\n        type: 'js',\n        assets: ['other.js'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n\n    assert(\n      /^<html><head><link rel=\"stylesheet\" href=\"[/\\\\]html-css-optional-elements\\.[a-f0-9]+\\.css\">\\s*<script type=\"module\" src=\"[/\\\\]html-css-optional-elements\\.[a-f0-9]+\\.js\"><\\/script>\\s*<\\/head><body><h1>Hello/m.test(\n        html,\n      ),\n    );\n  });\n\n  it('should combine sibling CSS from multiple script tags into one bundle', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-css-multi/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['a.js'],\n      },\n      {\n        type: 'js',\n        assets: ['b.js'],\n      },\n      {\n        type: 'css',\n        assets: ['a.css', 'b.css'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n\n    assert.equal(\n      html.match(\n        /<link rel=\"stylesheet\" href=\"[/\\\\]{1}html-css-multi\\.[a-f0-9]+?\\.css\">/g,\n      ).length,\n      1,\n    );\n\n    assert.equal(\n      html.match(\n        /<script type=\"module\" src=\"[/\\\\]{1}html-css-multi\\.[a-f0-9]+?\\.js\">/g,\n      ).length,\n      2,\n    );\n  });\n\n  it('should deduplicate shared code between script tags', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-js-dedup/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['component-1.js', 'obj.js', 'esmodule-helpers.js'],\n      },\n      {\n        type: 'js',\n        assets: ['component-2.js'],\n      },\n    ]);\n\n    let o = [];\n    await run(b, {\n      output: v => o.push(v),\n    });\n\n    assert.deepEqual(o, ['component-1', 'component-2']);\n  });\n\n  it('should minify HTML in production mode', async function () {\n    let inputFile = path.join(__dirname, '/integration/htmlnano/index.html');\n    await bundle(inputFile, {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n    });\n\n    let inputSize = (await inputFS.stat(inputFile)).size;\n\n    let outputFile = path.join(distDir, 'index.html');\n    let outputSize = (await outputFS.stat(outputFile)).size;\n\n    assert(inputSize > outputSize);\n\n    let html = await outputFS.readFile(outputFile, 'utf8');\n    assert(html.includes('Other page'));\n  });\n\n  it('should work with an empty html file', async function () {\n    let inputFile = path.join(__dirname, '/integration/html-empty/index.html');\n    await bundle(inputFile, {\n      defaultTargetOptions: {\n        shouldOptimize: false,\n      },\n    });\n\n    let outputFile = path.join(distDir, 'index.html');\n    let html = await outputFS.readFile(outputFile, 'utf8');\n    assert.equal(html, '<html><head></head><body></body></html>');\n  });\n\n  it('should work with an invalid html file', async function () {\n    let inputFile = path.join(\n      __dirname,\n      '/integration/html-invalid/index.html',\n    );\n    await bundle(inputFile, {\n      defaultTargetOptions: {\n        shouldOptimize: false,\n      },\n    });\n\n    let outputFile = path.join(distDir, 'index.html');\n    let html = await outputFS.readFile(outputFile, 'utf8');\n    assert(html.includes('This is a paragraph'));\n  });\n\n  it(\"should work with html that doesn't include optional closing tags\", async function () {\n    let inputFile = path.join(\n      __dirname,\n      '/integration/html-optional-closing-tags/index.html',\n    );\n    await bundle(inputFile, {\n      defaultTargetOptions: {\n        shouldOptimize: false,\n      },\n    });\n\n    let outputFile = path.join(distDir, 'index.html');\n    let html = await outputFS.readFile(outputFile, 'utf8');\n    assert(html.includes('Paragraph 1'));\n  });\n\n  it('should read .htmlnanorc.json and minify HTML in production mode', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/htmlnano-config/index.html'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n\n    // minifyJson\n    assert(\n      html.includes('<script type=application/json>{\"user\":\"me\"}</script>'),\n    );\n\n    // mergeStyles\n    // assert(html.includes('<style>h1{color:red}div{font-size:20px}</style>'));\n\n    assert(!html.includes('sourceMappingURL'));\n\n    // minifySvg is false\n    assert(\n      html.includes(\n        '<svg version=1.1 baseProfile=full width=300 height=200 xmlns:xmlns=http://www.w3.org/2000/svg><rect width=100% height=100% fill=red /><circle cx=150 cy=100 r=80 fill=green /><text x=150 y=125 font-size=60 text-anchor=middle fill=white>SVG</text></svg>',\n      ),\n    );\n  });\n\n  it.skip('should detect the version of SVGO to use', async function () {\n    // Test is outside parcel so that svgo is not already installed.\n    await fsFixture(overlayFS, '/')`\n      htmlnano-svgo-version\n        index.html:\n          <!DOCTYPE html>\n          <html>\n            <body>\n              <svg><rect id=\"test\" /></svg>\n            </body>\n          </html>\n\n        .htmlnanorc:\n          {\n            \"minifySvg\": {\n              \"full\": true\n            }\n          }\n\n        yarn.lock:\n    `;\n\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n\n    try {\n      await bundle(path.join('/htmlnano-svgo-version/index.html'), {\n        inputFS: overlayFS,\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n        shouldAutoinstall: false,\n      });\n    } catch (err) {\n      // autoinstall is disabled\n      assert.equal(\n        err.diagnostics[0].message,\n        md`Could not resolve module \"svgo\" from \"${path.resolve(\n          overlayFS.cwd(),\n          '/htmlnano-svgo-version/index',\n        )}\"`,\n      );\n    }\n\n    loggerDisposable.dispose();\n    assert(\n      messages[0].diagnostics[0].message.startsWith(\n        'Detected deprecated SVGO v2 options in',\n      ),\n    );\n    assert.deepEqual(messages[0].diagnostics[0].codeFrames, [\n      {\n        filePath: path.resolve(\n          overlayFS.cwd(),\n          '/htmlnano-svgo-version/.htmlnanorc',\n        ),\n        codeHighlights: [\n          {\n            message: undefined,\n            start: {\n              line: 3,\n              column: 5,\n            },\n            end: {\n              line: 3,\n              column: 16,\n            },\n          },\n        ],\n      },\n    ]);\n  });\n\n  it.skip('should not minify default values inside HTML in production mode', async function () {\n    let inputFile = path.join(\n      __dirname,\n      '/integration/htmlnano-defaults-form/index.html',\n    );\n    await bundle(inputFile, {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n    });\n\n    let inputSize = (await inputFS.stat(inputFile)).size;\n\n    let outputFile = path.join(distDir, '/index.html');\n    let outputSize = (await outputFS.stat(outputFile)).size;\n\n    assert(inputSize > outputSize);\n\n    let html = await outputFS.readFile(outputFile, 'utf8');\n    assert(html.includes('<input type=\"text\">'));\n  });\n\n  it('should not prepend the public path to assets with remote URLs', async function () {\n    await bundle(path.join(__dirname, '/integration/html/index.html'));\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(\n      html.includes('<script src=\"https://unpkg.com/parcel-bundler\"></script>'),\n    );\n  });\n\n  it('should not prepend the public path to hash links', async function () {\n    await bundle(path.join(__dirname, '/integration/html/index.html'));\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(html.includes('<a href=\"#hash_link\">'));\n  });\n\n  it('should detect virtual paths', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-virtualpath/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'html',\n        assets: ['other.html'],\n      },\n    ]);\n  });\n\n  it('should not update root/main file in the bundles', async function () {\n    await bundle(path.join(__dirname, '/integration/html-root/index.html'));\n\n    let files = await outputFS.readdir(distDir);\n\n    for (let file of files) {\n      if (file !== 'index.html' && file.endsWith('.html')) {\n        let html = await outputFS.readFile(path.join(distDir, file), 'utf8');\n        assert(html.includes('index.html'));\n      }\n    }\n  });\n\n  it('should preserve the spacing in the HTML tags', async function () {\n    await bundle(path.join(__dirname, '/integration/html/index.html'));\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(/<i>hello<\\/i> <i>world<\\/i>/.test(html));\n  });\n\n  it('should support child bundles of different types', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/child-bundle-different-types/index.html',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['main.js', 'util.js', 'other.js'],\n      },\n      {\n        type: 'html',\n        assets: ['other.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js', 'util.js', 'other.js'],\n      },\n    ]);\n  });\n\n  it.skip('should support circular dependencies', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/circular/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'html',\n        assets: ['about.html'],\n      },\n      {\n        type: 'js',\n        assets: ['about.js', 'index.js'],\n      },\n      {\n        type: 'html',\n        assets: ['test.html'],\n      },\n      {\n        type: 'js',\n        assets: ['about.js', 'index.js'],\n      },\n    ]);\n  });\n\n  it('should support bundling HTM', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/htm-extension/index.htm'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.htm'],\n        type: 'html',\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n    ]);\n  });\n\n  it('should detect srcset attribute', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-srcset/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n      {\n        type: 'png',\n        assets: ['200x200.png'],\n      },\n      {\n        type: 'png',\n        assets: ['300x300.png'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(contents.includes('src=\"/'));\n    assert(contents.includes('srcset=\"/'));\n  });\n\n  it('should detect srcset attribute of source element', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-source-srcset/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n      {\n        type: 'png',\n        assets: ['200x200.png'],\n      },\n      {\n        type: 'png',\n        assets: ['300x300.png'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n\n    const source = html.match(/<source srcset=\"\\/.*>/)[0];\n\n    assert(source.split(', ').length === 3);\n  });\n\n  it('should detect imagesrcset attribute', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-imagesrcset/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n      {\n        type: 'png',\n        assets: ['200x200.png'],\n      },\n      {\n        type: 'png',\n        assets: ['300x300.png'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(contents.includes('imagesrcset=\"/'));\n  });\n\n  it.skip('should support webmanifest', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/webmanifest/index.html'),\n    );\n\n    assertBundles(b, {\n      name: 'index.html',\n      assets: ['index.html'],\n      childBundles: [\n        {\n          type: 'webmanifest',\n          assets: ['manifest.webmanifest'],\n          childBundles: [\n            {\n              type: 'txt',\n              assets: ['some.txt'],\n              childBundles: [],\n            },\n          ],\n        },\n      ],\n    });\n  });\n\n  it.skip(\"should treat webmanifest as an entry module so it doesn't get content hashed\", async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/html-manifest/index.html'),\n    );\n\n    assertBundles(b, {\n      name: 'index.html',\n      assets: ['index.html'],\n      childBundles: [\n        {\n          type: 'webmanifest',\n          assets: ['manifest.webmanifest'],\n        },\n      ],\n    });\n\n    const html = await outputFS.readFile(\n      path.join(__dirname, '/dist/index.html'),\n      'utf8',\n    );\n    assert(html.includes('<link rel=\"manifest\" href=\"/manifest.webmanifest\">'));\n  });\n\n  it('should bundle svg files correctly', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-svg/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'svg',\n        assets: ['file.svg'],\n      },\n    ]);\n  });\n\n  it('should ignore svgs referencing local symbols via <use xlink:href=\"#\">', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-svg-local-symbol/index.html'),\n      {\n        mode: 'production',\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(\n      contents.includes(\n        '<svg><symbol id=all><rect width=100 height=100 /></symbol></svg>\\n<svg><use xlink:href=#all href=#all /></svg>',\n      ),\n    );\n  });\n\n  it('should bundle svg files using <image xlink:href=\"\"> correctly', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-svg-image/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'svg',\n        assets: ['file.svg'],\n      },\n    ]);\n  });\n\n  it(\"should support href attribute in <image /> in HTMLTransformer's collectDependencies\", async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-image-href-attr/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n    ]);\n  });\n\n  // Based on https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script\n  it('should bundle scripts inside svg', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-svg-script/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['script-a.js'],\n      },\n      {\n        type: 'js',\n        assets: ['script-b.js'],\n      },\n    ]);\n  });\n\n  it('should support data attribute of object element', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-object/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'svg',\n        assets: ['file.svg'],\n      },\n    ]);\n  });\n\n  it('should resolve assets containing spaces', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-spaces/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'html',\n        assets: ['other page.html'],\n      },\n    ]);\n  });\n\n  it('should process inline JS', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-js/index.html'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    // inline bundles are not output, but are apart of the bundleGraph\n    assertBundles(b, [\n      {type: 'js', assets: ['index.html']},\n      {type: 'js', assets: ['index.html']},\n      {type: 'js', assets: ['index.html']},\n      {type: 'js', assets: ['index.html']},\n      {name: 'index.html', assets: ['index.html']},\n    ]);\n\n    let files = await outputFS.readdir(distDir);\n    // assert that the inline js files are not output\n    assert(!files.some(filename => filename.includes('js')));\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf-8',\n    );\n\n    assert(!html.includes('someArgument'));\n  });\n\n  it('should process inline styles', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-styles/index.html'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        type: 'jpg',\n        assets: ['bg.jpg'],\n      },\n      {\n        type: 'jpg',\n        assets: ['img.jpg'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let bundles = b.getBundles();\n\n    let html = await outputFS.readFile(\n      bundles.find(bundle => bundle.type === 'html').filePath,\n      'utf8',\n    );\n\n    let urls = [...html.matchAll(/url\\(([^)]*)\\)/g)].map(m => m[1]);\n    assert.strictEqual(urls.length, 2);\n    for (let url of urls) {\n      assert(\n        bundles.find(\n          bundle =>\n            bundle.bundleBehavior !== 'inline' &&\n            path.basename(bundle.filePath) === url,\n        ),\n      );\n    }\n  });\n\n  it('should process inline element styles', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/html-inline-styles-element/index.html',\n      ),\n      {shouldDisableCache: false},\n    );\n\n    assertBundles(b, [\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n  });\n\n  it('should process inline styles using lang', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-sass/index.html'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(html.includes('<style>.index{color:#00f}</style>'));\n    assert(!html.includes('sourceMappingURL'));\n  });\n\n  it('should process inline non-js scripts', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-coffeescript/index.html'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.html'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(html.includes('alert(\"Hello, World!\")'));\n  });\n\n  it('should handle inline css with @imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-css-import/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'css',\n        assets: ['index.html', 'test.css'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(!html.includes('@import'));\n  });\n\n  it('should not modify inline importmaps', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-importmap/index.html'),\n      {},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(html.includes('/node_modules/lit1.3.0/'));\n  });\n\n  it('should expose top level declarations globally in inline <script> tags', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-js-script/globals.html'),\n    );\n\n    let logs = [];\n    let ctx = await run(\n      b,\n      {\n        log(bar, baz) {\n          logs.push([bar, baz]);\n        },\n      },\n      {require: false},\n    );\n    let output = ctx.output;\n    assert.equal(output.x, 2);\n    assert.equal(output.y, 'undefined');\n    assert.equal(output.z, 4);\n    assert.equal(typeof output.bar, 'function');\n    assert.equal(output.Test, 'undefined');\n    assert.equal(typeof output.Foo, 'function');\n    assert.equal(typeof output.baz, 'function');\n\n    // x is a let, so is \"global\" but not part of the global object\n    assert(!('x' in ctx));\n    assert(!('y' in ctx));\n    assert.equal(ctx.z, 4);\n    assert.equal(typeof ctx.bar, 'function');\n    assert(!('Test' in ctx));\n    assert(!('Foo' in ctx));\n    assert.equal(typeof ctx.baz, 'function');\n\n    assert.deepEqual(logs, [\n      ['undefined', 'function'],\n      ['function', 'function'],\n      ['function', 'function'],\n    ]);\n  });\n\n  for (let scopeHoist of [false, true]) {\n    it(\n      'should expose top level declarations globally in inline <script> tags with dependencies with scopeHoist = ' +\n        scopeHoist,\n      async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/html-inline-js-script/globals-dependencies.html',\n          ),\n          {\n            defaultTargetOptions: {\n              shouldScopeHoist: scopeHoist,\n            },\n          },\n        );\n\n        let logs = [];\n        let ctx = await run(\n          b,\n          {\n            log(bar, baz) {\n              logs.push([bar, baz]);\n            },\n          },\n          {require: false},\n        );\n        let output = ctx.output;\n        assert.equal(output.x, 2);\n        assert.equal(output.y, 'undefined');\n        assert.equal(output.z, 4);\n        assert.equal(typeof output.bar, 'function');\n        assert.equal(output.Test, 'undefined');\n        assert.equal(typeof output.Foo, 'function');\n        assert.equal(typeof output.baz, 'function');\n\n        // x is a let, so is \"global\" but not part of the global object\n        assert(!('x' in ctx));\n        assert(!('y' in ctx));\n        assert.equal(ctx.z, 4);\n        assert.equal(typeof ctx.bar, 'function');\n        assert(!('Test' in ctx));\n        assert(!('Foo' in ctx));\n        assert.equal(typeof ctx.baz, 'function');\n\n        assert.deepEqual(logs, [\n          ['undefined', 'function'],\n          ['function', 'function'],\n          ['function', 'function'],\n        ]);\n\n        let contents = await outputFS.readFile(\n          b.getBundles()[0].filePath,\n          'utf8',\n        );\n        if (scopeHoist) {\n          assert(contents.includes('import('));\n        } else {\n          assert(!contents.includes('import('));\n        }\n      },\n    );\n  }\n\n  it('should error on imports in inline scripts without type=\"module\"', async function () {\n    let errored = false;\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/html-inline-js-script/error.html'),\n      );\n    } catch (err) {\n      assert.equal(\n        err.message,\n        'Browser scripts cannot have imports or exports.',\n      );\n      assert.deepEqual(err.diagnostics, [\n        {\n          message: 'Browser scripts cannot have imports or exports.',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(\n                __dirname,\n                '/integration/html-inline-js-script/error.html',\n              ),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 5,\n                    column: 7,\n                  },\n                  end: {\n                    line: 5,\n                    column: 24,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: ['Add the type=\"module\" attribute to the <script> tag.'],\n          documentationURL:\n            'https://parceljs.org/languages/javascript/#classic-scripts',\n        },\n      ]);\n\n      errored = true;\n    }\n\n    assert(errored);\n  });\n\n  it('should not import swc/helpers without type=\"module\"', async function () {\n    await bundle(\n      path.join(\n        __dirname,\n        '/integration/html-js-not-import-swc-helpers-without-module/index.html',\n      ),\n      {\n        defaultTargetOptions: {\n          engines: {\n            // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#browser_compatibility\n            browsers: ['Chrome 48'],\n          },\n        },\n      },\n    );\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(!html.includes('swc/helpers'));\n    assert(html.includes('sliced_to_array'));\n  });\n\n  it('should allow imports and requires in inline <script> tags', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-js-require/index.html'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.html', 'test.js'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(html.includes('console.log(\"test\")'));\n  });\n\n  it('should support protocol-relative urls', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-protocol-relative/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'css',\n        assets: ['index.css'],\n      },\n    ]);\n\n    for (let bundle of b.getBundles()) {\n      let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n      assert(contents.includes('//unpkg.com/xyz'));\n    }\n  });\n\n  it('should support inline <script type=\"module\">', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-js-module/index.html'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.html'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(html.includes('<script type=\"module\">'));\n    assert(html.includes('document.write(\"Hello world\")'));\n  });\n\n  it('should compile inline <script type=\"module\"> to non-module if not all engines support esmodules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-js-module/index.html'),\n      {\n        defaultTargetOptions: {\n          mode: 'production',\n          shouldScopeHoist: true,\n          engines: {\n            browsers: '>= 0.25%',\n          },\n        },\n      },\n    );\n\n    await assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.html'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(!html.includes('<script type=\"module\">'));\n    assert(html.includes('<script>'));\n    assert(html.includes('document.write(\"Hello world\")'));\n  });\n\n  it('should compile a module and nomodule script when not all engines support esmodules natively', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-js/index.html'),\n      {\n        defaultTargetOptions: {\n          mode: 'production',\n          shouldScopeHoist: true,\n          engines: {\n            browsers: '>= 0.25%',\n          },\n        },\n      },\n    );\n\n    await assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.js', 'other.js'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js', 'other.js'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let bundles = b.getBundles();\n    let html = await outputFS.readFile(\n      bundles.find(b => b.type === 'html').filePath,\n      'utf8',\n    );\n    assert(html.includes('<script type=\"module\" src='));\n    assert(/<script src=\".*?\" nomodule/.test(html));\n\n    let js = await outputFS.readFile(\n      bundles.find(b => b.type === 'js' && b.env.outputFormat === 'esmodule')\n        .filePath,\n      'utf8',\n    );\n    assert(/class \\$[a-f0-9]+\\$var\\$Useless \\{/.test(js));\n\n    js = await outputFS.readFile(\n      bundles.find(b => b.type === 'js' && b.env.outputFormat === 'global')\n        .filePath,\n      'utf8',\n    );\n    assert(!/class \\$[a-f0-9]+\\$var\\$Useless \\{/.test(js));\n  });\n\n  it('should not add a nomodule version when all browsers support esmodules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-js/index.html'),\n      {\n        defaultTargetOptions: {\n          mode: 'production',\n          shouldScopeHoist: true,\n          engines: {\n            browsers: 'last 1 Chrome version',\n          },\n        },\n      },\n    );\n\n    await assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.js', 'other.js'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(html.includes('<script type=\"module\" src='));\n    assert(!/<script src=\".*?\" nomodule/.test(html));\n  });\n\n  it('should error on imports in scripts without type=\"module\"', async function () {\n    let errored = false;\n    try {\n      await bundle(path.join(__dirname, '/integration/html-js/error.html'));\n    } catch (err) {\n      assert.equal(\n        err.message,\n        'Browser scripts cannot have imports or exports.',\n      );\n      assert.deepEqual(err.diagnostics, [\n        {\n          message: 'Browser scripts cannot have imports or exports.',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(__dirname, '/integration/html-js/index.js'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 1,\n                    column: 1,\n                  },\n                  end: {\n                    line: 1,\n                    column: 29,\n                  },\n                },\n              ],\n            },\n            {\n              filePath: path.join(__dirname, '/integration/html-js/error.html'),\n              codeHighlights: [\n                {\n                  message: 'The environment was originally created here',\n                  start: {\n                    line: 1,\n                    column: 1,\n                  },\n                  end: {\n                    line: 1,\n                    column: 1,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: ['Add the type=\"module\" attribute to the <script> tag.'],\n          documentationURL:\n            'https://parceljs.org/languages/javascript/#classic-scripts',\n        },\n      ]);\n\n      errored = true;\n    }\n\n    assert(errored);\n  });\n\n  it('should correctly bundle loaders for nested dynamic imports', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/html-js-shared-dynamic-nested/index.html',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          engines: {\n            browsers: '>= 0.25%',\n          },\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: [\n          'cacheLoader.js',\n          'index.js',\n          'index.js',\n          'index.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        type: 'js',\n        assets: ['index.js', 'index.js', 'index.js'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['simpleHasher.js'],\n      },\n      {\n        type: 'js',\n        assets: ['simpleHasher.js'],\n      },\n    ]);\n\n    let res = await run(b, {output: null}, {require: false});\n    assert.deepEqual(await res.output, ['hasher', ['hasher', 'hasher']]);\n  });\n\n  it('should support shared bundles between multiple inline scripts', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-inline-js-shared/index.html'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['lodash.js'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(html.includes('<script type=\"module\" src=\"'));\n    assert(html.includes('<script type=\"module\">'));\n    assert(html.includes('.add(1, 2)'));\n    assert(html.includes('.add(2, 3)'));\n  });\n\n  it('inserts sibling bundles into html in the correct order (no head)', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-js-shared/index.html'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['async.js'],\n      },\n      {\n        type: 'js',\n        assets: ['get-worker-url.js', 'index.js', 'lodash.js'],\n      },\n      {\n        name: 'index.html',\n        type: 'html',\n        assets: ['index.html'],\n      },\n      // {\n      //   type: 'js',\n      //   assets: ['lodash.js'],\n      // },\n      {\n        type: 'js',\n        assets: ['worker.js', 'lodash.js'],\n      },\n    ]);\n\n    // let lodashSibling = path.basename(\n    //   b.getBundles().find(v => v.getEntryAssets().length === 0).filePath,\n    // );\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n\n    let insertedBundles = [];\n    let regex = /<script (?:type=[^\"]+ )?src=([^\"]*)><\\/script>/g;\n    let match;\n    while ((match = regex.exec(html)) !== null) {\n      insertedBundles.push(path.basename(match[1]));\n    }\n\n    assert.equal(insertedBundles.length, 1);\n    // assert.equal(insertedBundles.length, 2);\n    // assert.equal(insertedBundles[0], lodashSibling);\n  });\n\n  it('inserts sibling bundles into html in the correct order (head)', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-js-shared-head/index.html'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['async.js'],\n      },\n      {\n        type: 'js',\n        assets: ['get-worker-url.js', 'index.js', 'lodash.js'],\n      },\n      {\n        name: 'index.html',\n        type: 'html',\n        assets: ['index.html'],\n      },\n      // {\n      //   type: 'js',\n      //   assets: ['lodash.js'],\n      // },\n      {\n        type: 'js',\n        assets: ['worker.js', 'lodash.js'],\n      },\n    ]);\n\n    // let lodashSibling = path.basename(\n    //   b.getBundles().find(v => v.getEntryAssets().length === 0).filePath,\n    // );\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n\n    let insertedBundles = [];\n    let regex = /<script (?:type=[^\"]+ )?src=([^\"]*)><\\/script>/g;\n    let match;\n    while ((match = regex.exec(html)) !== null) {\n      insertedBundles.push(path.basename(match[1]));\n    }\n\n    assert.equal(insertedBundles.length, 1);\n    // assert.equal(insertedBundles.length, 2);\n    // assert.equal(insertedBundles[0], lodashSibling);\n  });\n\n  it('inserts sibling bundles into html with nomodule or type=module', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-js-shared-nomodule/*.html'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'a.html',\n        assets: ['a.html'],\n      },\n      {\n        type: 'js',\n        assets: ['a.js'],\n      },\n      {\n        type: 'js',\n        assets: ['a.js'],\n      },\n      {\n        name: 'b.html',\n        assets: ['b.html'],\n      },\n      {\n        type: 'js',\n        assets: ['b.js'],\n      },\n      {\n        type: 'js',\n        assets: ['b.js'],\n      },\n      {\n        type: 'js',\n        assets: ['lib.js'],\n      },\n      {\n        type: 'js',\n        assets: ['lib.js'],\n      },\n    ]);\n\n    for (let file of b\n      .getBundles()\n      .filter(b => b.type === 'html')\n      .map(b => b.filePath)) {\n      let html = await outputFS.readFile(file, 'utf8');\n\n      let noModuleScripts = [];\n      let moduleScripts = [];\n\n      let regex = /<script ([^>]*)><\\/script>/g;\n      let match;\n      while ((match = regex.exec(html)) !== null) {\n        let attributes = new Map(match[1].split(' ').map(a => a.split('=')));\n        let url = attributes.get('src').replace(/\"/g, '');\n        assert(url);\n        if (attributes.get('type') === '\"module\"') {\n          assert.strictEqual(attributes.size, 2);\n          moduleScripts.push(path.basename(url));\n        } else {\n          assert.strictEqual(attributes.size, 3);\n          assert(attributes.get('nomodule'));\n          assert(attributes.get('defer'));\n          noModuleScripts.push(path.basename(url));\n        }\n      }\n\n      for (let scripts of [moduleScripts, noModuleScripts]) {\n        assert.strictEqual(scripts.length, 2);\n        assert(\n          b\n            .getBundles()\n            .find(b => b.filePath.endsWith(scripts[0]))\n            .getMainEntry() == null,\n        );\n        assert(\n          b\n            .getBundles()\n            .find(b => b.filePath.endsWith(scripts[1]))\n            .getMainEntry(),\n        );\n      }\n    }\n  });\n\n  it('supports multiple dist targets', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-multi-targets/'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          shouldOptimize: false,\n          sourceMaps: false,\n        },\n      },\n    );\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        type: 'html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'js',\n        assets: ['esmodule-helpers.js', 'shared.js'],\n      },\n      {\n        name: 'index.html',\n        type: 'html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n    ]);\n  });\n  it('should isolate async scripts', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-async-script/index.html'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        assets: ['a.js', 'c.js'],\n      },\n      {\n        assets: ['b.js', 'c.js'],\n      },\n    ]);\n\n    let output = [];\n    await run(b, {\n      output(o) {\n        output.push(o);\n      },\n    });\n\n    // could run in either order.\n    assert(output.sort(), ['a', 'b', 'c']);\n  });\n\n  it('should isolate classic scripts from nomodule scripts', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-isolate-script/index.html'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['a.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['b.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['c.js'],\n      },\n      {\n        assets: ['c.js'],\n      },\n    ]);\n\n    let output = [];\n    await run(b, {\n      output(o) {\n        output.push(o);\n      },\n    });\n\n    // could run in either order.\n    assert(output.sort(), ['a', 'b', 'c']);\n  });\n\n  it('should support multiple entries with shared sibling bundles', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/shared-sibling-entries/*.html'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['a.html'],\n      },\n      {\n        type: 'js',\n        assets: ['b.html'],\n      },\n      {\n        type: 'js',\n        assets: ['c.html'],\n      },\n      {\n        name: 'a.html',\n        type: 'html',\n        assets: ['a.html'],\n      },\n      {\n        name: 'b.html',\n        type: 'html',\n        assets: ['b.html'],\n      },\n      {\n        name: 'c.html',\n        type: 'html',\n        assets: ['c.html'],\n      },\n      {\n        type: 'css',\n        assets: ['other.css', 'shared.css'],\n      },\n      {\n        type: 'js',\n        assets: ['shared.js'],\n      },\n    ]);\n\n    // Both HTML files should point to the sibling CSS file\n    let html = await outputFS.readFile(path.join(distDir, 'a.html'), 'utf8');\n    assert(/<link rel=\"stylesheet\" href=\"\\/a\\.[a-z0-9]+\\.css\">/.test(html));\n\n    html = await outputFS.readFile(path.join(distDir, 'b.html'), 'utf8');\n    assert(/<link rel=\"stylesheet\" href=\"\\/a\\.[a-z0-9]+\\.css\">/.test(html));\n\n    html = await outputFS.readFile(path.join(distDir, 'c.html'), 'utf8');\n    assert(/<link rel=\"stylesheet\" href=\"\\/a\\.[a-z0-9]+\\.css\">/.test(html));\n  });\n\n  it('should insert JS sibling bundle script tags in the correct order', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/interop-async/index.html',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n        },\n      },\n    );\n    let bundles = b.getBundles();\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        type: 'html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js', 'index.js', 'index.js', 'index.js', 'client.js'],\n      },\n      {\n        type: 'js',\n        assets: ['viewer.js'],\n      },\n    ]);\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n\n    let insertedBundles = [];\n    let regex = /<script (?:type=\"[^\"]+\" )?src=\"([^\"]*)\"><\\/script>/g;\n    let match;\n    while ((match = regex.exec(html)) !== null) {\n      let bundle = bundles.find(\n        b => path.basename(b.filePath) === path.basename(match[1]),\n      );\n\n      insertedBundles.push(bundle);\n    }\n\n    assert.equal(insertedBundles.length, 1);\n\n    let res = await run(b, {output: null}, {require: false});\n    assert.deepEqual(await res.output, ['client', 'client', 'viewer']);\n  });\n\n  it('should not point to unrelated sibling bundles', async function () {\n    await bundle(\n      path.join(\n        __dirname,\n        '/integration/shared-sibling-entries-multiple/*.html',\n      ),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    // a.html should point to a CSS bundle containing a.css as well as\n    // reuse the b.css bundle from b.html.\n    let html = await outputFS.readFile(path.join(distDir, 'a.html'), 'utf8');\n    assert.equal(\n      html.match(/<link rel=\"stylesheet\" href=\"\\/\\w+\\.[a-z0-9]+\\.css\">/g)\n        .length,\n      2,\n    );\n\n    // a.html should reference a.js only\n    assert.equal(html.match(/a\\.[a-z0-9]+\\.js/g).length, 1);\n\n    assert.equal(html.match(/b\\.[a-z0-9]+\\.js/g), null);\n\n    let css = await outputFS.readFile(\n      path.join(distDir, html.match(/\\/\\w+\\.[a-z0-9]+\\.css/g)[0]),\n      'utf8',\n    );\n    assert(css.includes('.a {'));\n    assert(!css.includes('.b {'));\n\n    // b.html should point to a CSS bundle containing only b.css\n    // It should not point to the bundle containing a.css from a.html\n    html = await outputFS.readFile(path.join(distDir, 'b.html'), 'utf8');\n    assert.equal(\n      html.match(/<link rel=\"stylesheet\" href=\"\\/\\w+\\.[a-z0-9]+\\.css\">/g)\n        .length,\n      1,\n    );\n\n    // b.html should reference b.js only\n    assert.equal(html.match(/a\\.[a-z0-9]+\\.js/g), null);\n\n    assert.equal(html.match(/b\\.[a-z0-9]+\\.js/g).length, 1);\n\n    css = await outputFS.readFile(\n      path.join(distDir, html.match(/\\/\\w+\\.[a-z0-9]+\\.css/)[0]),\n      'utf8',\n    );\n    assert(!css.includes('.a {'));\n    assert(css.includes('.b {'));\n  });\n\n  it('should support split bundles with many pages', async function () {\n    await bundle(path.join(__dirname, '/integration/shared-many/*.html'), {\n      mode: 'production',\n    });\n\n    let html = await outputFS.readFile(path.join(distDir, 'a.html'), 'utf8');\n    assert.equal(html.match(/<script/g).length, 2);\n\n    html = await outputFS.readFile(path.join(distDir, 'b.html'), 'utf8');\n    assert.equal(html.match(/<script/g).length, 2);\n\n    html = await outputFS.readFile(path.join(distDir, 'c.html'), 'utf8');\n    assert.equal(html.match(/<script/g).length, 2);\n\n    html = await outputFS.readFile(path.join(distDir, 'd.html'), 'utf8');\n    assert.equal(html.match(/<script/g).length, 2);\n\n    html = await outputFS.readFile(path.join(distDir, 'e.html'), 'utf8');\n    assert.equal(html.match(/<script/g).length, 1);\n\n    html = await outputFS.readFile(path.join(distDir, 'f.html'), 'utf8');\n    assert.equal(html.match(/<script/g).length, 1);\n\n    // b.html hitting the parallel request limit should not prevent g.html from being optimized\n    html = await outputFS.readFile(path.join(distDir, 'g.html'), 'utf8');\n    assert.equal(html.match(/<script/g).length, 1);\n  });\n\n  it('should not add CSS to a worker bundle group', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/shared-sibling-worker-css/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'css',\n        assets: ['style.css'],\n      },\n      {\n        type: 'html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['a.js', 'worker.js', 'esmodule-helpers.js'],\n      },\n      {\n        type: 'js',\n        assets: [\n          'a.js',\n          'esmodule-helpers.js',\n          'get-worker-url.js',\n          'index.js',\n        ],\n      },\n    ]);\n\n    let htmlBundle = b.getBundles().find(b => b.type === 'html');\n    let htmlSiblings = b.getReferencedBundles(htmlBundle);\n    assert.equal(htmlSiblings.length, 2);\n    assert(htmlSiblings.some(b => b.type === 'js'));\n    assert(htmlSiblings.some(b => b.type === 'css'));\n\n    let worker = b.getChildBundles(htmlSiblings.find(b => b.type === 'js'));\n    assert.equal(worker.length, 1);\n    let workerSiblings = b.getReferencedBundles(worker[0]);\n    assert.equal(workerSiblings.length, 0);\n  });\n\n  it('should correctly add sibling bundles to all using bundles', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/shared-sibling/*.html'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'html',\n        assets: ['form.html'],\n      },\n      {\n        type: 'js',\n        assets: ['form.js', 'a.js', 'a.module.css', 'esmodule-helpers.js'],\n      },\n      {\n        type: 'css',\n        assets: ['a.module.css'],\n      },\n      {\n        type: 'css',\n        assets: ['a.module.css'],\n      },\n      {\n        type: 'css',\n        assets: ['a.module.css'],\n      },\n      {\n        type: 'html',\n        assets: ['searchfield.html'],\n      },\n      {\n        type: 'js',\n        assets: [\n          'searchfield.js',\n          'a.js',\n          'a.module.css',\n          'b.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {\n        type: 'html',\n        assets: ['searchfield2.html'],\n      },\n      {\n        type: 'js',\n        assets: [\n          'searchfield2.js',\n          'a.js',\n          'a.module.css',\n          'b.js',\n          'esmodule-helpers.js',\n        ],\n      },\n    ]);\n\n    for (let htmlBundle of b.getBundles().filter(b => b.type === 'html')) {\n      let htmlSiblings = b\n        .getReferencedBundles(htmlBundle, true)\n        .map(b => b.type)\n        .sort();\n      assert.deepEqual(htmlSiblings, ['css', 'js']);\n    }\n  });\n\n  it('should remove duplicate assets from sibling bundles', async function () {\n    let bundleGraph = await bundle(\n      path.join(__dirname, '/integration/shared-sibling-duplicate/*.html'),\n      {mode: 'production'},\n    );\n\n    bundleGraph.traverseBundles(bundle => {\n      bundle.traverseAssets(asset => {\n        let bundles = bundleGraph.getBundlesWithAsset(asset);\n        assert.equal(\n          bundles.length,\n          1,\n          `asset ${asset.filePath} is duplicated`,\n        );\n      });\n    });\n  });\n\n  it('should support split bundles with many pages with esmodule output', async function () {\n    await bundle(path.join(__dirname, '/integration/shared-many-esm/*.html'), {\n      defaultTargetOptions: {\n        shouldScopeHoist: true,\n      },\n    });\n\n    let checkHtml = async filename => {\n      // Find all scripts referenced in the HTML file\n      let html = await outputFS.readFile(path.join(distDir, filename), 'utf8');\n      let re = /<script.*?src=\"(.*?)\"/g;\n      let match;\n      let scripts = new Set();\n      while ((match = re.exec(html))) {\n        scripts.add(path.join(distDir, match[1]));\n      }\n\n      assert(scripts.size > 0, 'no scripts found');\n\n      // Ensure that those scripts don't import anything other than what's in the HTML.\n      for (let script of scripts) {\n        let js = await outputFS.readFile(script, 'utf8');\n        let re = /import .*? from \"(.*?)\"/g;\n        let match;\n        while ((match = re.exec(js))) {\n          let imported = path.join(distDir, match[1]);\n          assert(\n            scripts.has(imported),\n            `unknown script ${match[1]} imported in ${path.basename(script)}`,\n          );\n        }\n      }\n    };\n\n    for (let letter of ['a', 'b', 'c', 'd', 'e', 'f', 'g']) {\n      await checkHtml(letter + '.html');\n    }\n  });\n\n  it('should include the correct paths when using multiple entries and referencing style from html and js', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-multi-entry/*.html'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'a.html',\n        type: 'html',\n        assets: ['a.html'],\n      },\n      {\n        name: 'b.html',\n        type: 'html',\n        assets: ['b.html'],\n      },\n      {\n        type: 'css',\n        assets: ['style.css'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    let firstHtmlFile = await outputFS.readFile(\n      path.join(distDir, 'a.html'),\n      'utf8',\n    );\n\n    let secondHtmlFile = await outputFS.readFile(\n      path.join(distDir, 'b.html'),\n      'utf8',\n    );\n\n    let bundles = b.getBundles();\n    let cssBundle = path.basename(\n      bundles.find(bundle => bundle.filePath.endsWith('.css')).filePath,\n    );\n    let jsBundle = path.basename(\n      bundles.find(bundle => bundle.filePath.endsWith('.js')).filePath,\n    );\n\n    assert(\n      firstHtmlFile.includes(cssBundle),\n      `a.html should include a reference to ${cssBundle}`,\n    );\n    assert(\n      secondHtmlFile.includes(cssBundle),\n      `b.html should include a reference to ${cssBundle}`,\n    );\n\n    assert(\n      firstHtmlFile.includes(jsBundle),\n      `a.html should include a reference to ${jsBundle}`,\n    );\n    assert(\n      secondHtmlFile.includes(jsBundle),\n      `b.html should include a reference to ${jsBundle}`,\n    );\n  });\n\n  it('should invalidate parent bundle when inline bundles change', async function () {\n    // copy into memory fs\n    await ncp(\n      path.join(__dirname, '/integration/html-inline-js-require'),\n      path.join(__dirname, '/html-inline-js-require'),\n    );\n\n    let distDir = path.join(outputFS.cwd(), 'dist');\n\n    let b = await bundler(\n      path.join(__dirname, '/html-inline-js-require/index.html'),\n      {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n        defaultTargetOptions: {\n          distDir,\n        },\n      },\n    );\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let html = await outputFS.readFile('/dist/index.html', 'utf8');\n    assert(html.includes(`console.log('test')`));\n\n    await overlayFS.writeFile(\n      path.join(__dirname, '/html-inline-js-require/test.js'),\n      \"console.log('foo')\",\n    );\n    await getNextBuild(b);\n\n    html = await outputFS.readFile(path.join(distDir, '/index.html'), 'utf8');\n    assert(html.includes(`console.log('foo')`));\n  });\n\n  it('should invalidate parent bundle when nested inline bundles change', async function () {\n    // copy into memory fs\n    await ncp(\n      path.join(__dirname, '/integration/html-inline-js-nested'),\n      path.join(__dirname, '/html-inline-js-nested'),\n    );\n\n    let distDir = path.join(outputFS.cwd(), 'dist');\n\n    let b = await bundler(\n      path.join(__dirname, '/html-inline-js-nested/index.html'),\n      {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n        defaultTargetOptions: {\n          distDir,\n        },\n      },\n    );\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let html = await outputFS.readFile('/dist/index.html', 'utf8');\n    assert(html.includes('module.exports = \"hello world\"'));\n    assert(html.includes('console.log'));\n\n    await overlayFS.writeFile(\n      path.join(__dirname, '/html-inline-js-nested/test.txt'),\n      'foo bar',\n    );\n    await getNextBuild(b);\n\n    html = await outputFS.readFile(path.join(distDir, 'index.html'), 'utf8');\n    assert(!html.includes('module.exports = \"hello world\"'));\n    assert(html.includes('module.exports = \"foo bar\"'));\n    assert(html.includes('console.log'));\n  });\n\n  it('should inline data-urls', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/data-url/index.html'),\n      {\n        defaultTargetOptions: {\n          sourceMaps: false,\n        },\n      },\n    );\n\n    let contents = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'html').filePath,\n      'utf8',\n    );\n    assert(\n      contents.includes(\n        `<img src=\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%3E%0A%20%20%3Cfilter%20id%3D%22blur-_.%21~%2a%22%3E%0A%20%20%20%20%3CfeGaussianBlur%20stdDeviation%3D%225%22%2F%3E%0A%20%20%3C%2Ffilter%3E%0A%20%20%3Ccircle%20cx%3D%2260%22%20cy%3D%2260%22%20r%3D%2250%22%20fill%3D%22green%22%20filter%3D%22url%28%23blur-_.%21~%2a%29%22%2F%3E%0A%3C%2Fsvg%3E\">`,\n      ),\n    );\n  });\n\n  it('should print a diagnostic for invalid bundler options', async () => {\n    let dir = path.join(__dirname, 'integration/invalid-bundler-config');\n    let pkg = path.join(dir, 'package.json');\n    let code = await inputFS.readFileSync(pkg, 'utf8');\n    await assert.rejects(() => bundle(path.join(dir, 'index.html')), {\n      name: 'BuildError',\n      diagnostics: [\n        {\n          message: 'Invalid config for @parcel/bundler-default',\n          origin: '@parcel/bundler-default',\n          codeFrames: [\n            {\n              filePath: pkg,\n              language: 'json',\n              code,\n              codeHighlights: [\n                {\n                  message: 'Did you mean \"minBundleSize\", \"minBundles\"?',\n                  start: {\n                    column: 30,\n                    line: 3,\n                  },\n                  end: {\n                    column: 45,\n                    line: 3,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    });\n  });\n\n  it('should escape inline script tags', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/html-inline-escape/script.html'),\n    );\n    let output;\n    await run(b, {\n      output(o) {\n        output = o;\n      },\n    });\n\n    assert.deepEqual(output, {\n      a: '<script></script>',\n      b: '<!-- test',\n      c: '<SCRIPT></SCRIPT>',\n    });\n  });\n\n  it('should share older JS sibling (script) assets to younger siblings', async function () {\n    // JS script tags are siblings to a common parent, and are marked as such by parallel dependency priority\n    // Becuase of load order any older sibling (and it's assets) are loaded before any subsequent sibling\n    // Which means no younger sibling should have to reference sibling bundles for assets in them\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/sibling-dependencies/index.html',\n      ),\n    );\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        assets: ['a.js', 'esmodule-helpers.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n    ]);\n\n    let youngerSibling; // bundle containing younger sibling, b.js\n    let olderSibling; // bundle containing old sibling, a.js\n    b.traverseBundles(bundle => {\n      bundle.traverseAssets(asset => {\n        if (asset.filePath.includes('b.js')) {\n          youngerSibling = bundle;\n        } else if (asset.filePath.includes('a.js')) {\n          olderSibling = bundle;\n        }\n      });\n    });\n\n    assert(\n      b.getReferencedBundles(youngerSibling).filter(b => b == olderSibling)\n        .length == 0,\n    );\n\n    let res = await run(b, {output: null}, {require: false});\n    assert.equal(res.output, 'a');\n  });\n\n  it('should escape quotes in inline style attributes and style tags', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/html-inline-escape/style.html'),\n    );\n    let output = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes(`content: &quot;hi&quot;`));\n    assert(output.includes('<\\\\/style>'));\n  });\n\n  it('should work with bundle names that have colons in them', async function () {\n    if (process.platform === 'win32') {\n      return;\n    }\n\n    // Windows paths cannot contain colons and will fail to git clone, so write the file here (in memory).\n    await overlayFS.mkdirp(path.join(__dirname, 'integration/url-colon'));\n    await overlayFS.writeFile(\n      path.join(__dirname, 'integration/url-colon/a:b:c.html'),\n      '<p>Test</p>',\n    );\n\n    let b = await bundle(\n      path.join(__dirname, 'integration/url-colon/relative.html'),\n      {inputFS: overlayFS},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'relative.html',\n        assets: ['relative.html'],\n      },\n      {\n        name: 'a:b:c.html',\n        assets: ['a:b:c.html'],\n      },\n    ]);\n\n    let output = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('/a:b:c.html'));\n\n    b = await bundle(\n      path.join(__dirname, 'integration/url-colon/absolute.html'),\n      {inputFS: overlayFS},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'absolute.html',\n        assets: ['absolute.html'],\n      },\n      {\n        name: 'a:b:c.html',\n        assets: ['a:b:c.html'],\n      },\n    ]);\n\n    output = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('/a:b:c.html'));\n  });\n\n  it('should normalize case of SVG elements and attributes when minified', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/html-svg-case/index.html'),\n      {\n        mode: 'production',\n      },\n    );\n\n    let output = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<x-custom stddeviation=0.5'));\n    assert(\n      output.includes(\n        '<svg preserveAspectRatio=\"xMinYMin meet\" role=img viewBox=\"1.8 2.4 2 2\"',\n      ),\n    );\n    assert(output.includes('<filter'));\n    assert(output.includes('<feGaussianBlur in=SourceGraphic stdDeviation='));\n  });\n\n  it('should throw error with empty string reference to other resource', async function () {\n    await assertRejectsWithDiagnostic(\n      () =>\n        bundle(\n          path.join(__dirname, 'integration/html-empty-reference/index.html'),\n          {\n            mode: 'production',\n          },\n        ),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            message: \"'src' should not be empty string\",\n            origin: '@parcel/transformer-html',\n            codeFrames: [\n              {\n                filePath: path.join(\n                  __dirname,\n                  'integration/html-empty-reference/index.html',\n                ),\n                code: null,\n                language: 'html',\n                codeHighlights: [\n                  {\n                    start: {\n                      column: 1,\n                      line: 1,\n                    },\n                    end: {\n                      column: 1,\n                      line: 1,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n\n          {\n            message: \"'src' should not be empty string\",\n            origin: '@parcel/transformer-html',\n            codeFrames: [\n              {\n                filePath: path.join(\n                  __dirname,\n                  'integration/html-empty-reference/index.html',\n                ),\n                language: 'html',\n                codeHighlights: [\n                  {\n                    start: {\n                      column: 1,\n                      line: 2,\n                    },\n                    end: {\n                      line: 2,\n                      column: 1,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n\n          {\n            message: \"'href' should not be empty string\",\n            origin: '@parcel/transformer-html',\n            codeFrames: [\n              {\n                filePath: path.join(\n                  __dirname,\n                  'integration/html-empty-reference/index.html',\n                ),\n                language: 'html',\n                codeHighlights: [\n                  {\n                    start: {\n                      column: 1,\n                      line: 3,\n                    },\n                    end: {\n                      column: 1,\n                      line: 3,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n\n  it('extracts shared bundles that load referenced bundle roots across entries', async () => {\n    let b = await bundle(\n      ['index1.html', 'index2.html'].map(entry =>\n        path.join(__dirname, 'integration/html-shared-referenced', entry),\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    await run(b);\n  });\n\n  it('should not skip bundleRoots if an asset is both async required and static required', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/html-sync-async-asset/index.html'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    await run(b, {output: null}, {require: false});\n  });\n\n  it('should insert bundle manifest into the correct bundle with multiple script tags', async function () {\n    const dir = path.join(__dirname, 'manifest-multi-script');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n        index.html:\n          <body>\n            <script src=\"./polyfills.js\" type=\"module\"></script>\n            <script src=\"./main.js\" type=\"module\"></script>\n          </body>\n\n        polyfills.js:\n          import('./polyfills-async');\n        polyfills-async.js:\n          export const foo = 2;\n        main.js:\n          import('./main-async');\n        main-async.js:\n          export const bar = 3;\n        `;\n\n    let b = await bundle(path.join(dir, '/index.html'), {\n      inputFS: overlayFS,\n    });\n\n    // Should not error with \"Cannot find module\" error at runtime.\n    await run(b);\n  });\n\n  it('should correctly serialize xhtml', async function () {\n    const dir = path.join(__dirname, 'xhtml');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      index.xhtml:\n        <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n        <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\">\n          <head>\n            <title>XHTML</title>\n          </head>\n          <body>\n            <p>I am a XHTML document</p>\n            <img src=\"http://www.w3.org/Icons/valid-xhtml10\" />\n          </body>\n        </html>\n    `;\n\n    let b = await bundle(path.join(dir, '/index.xhtml'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<?xml version=\"1.0\" encoding=\"UTF-8\"?>'));\n    assert(output.includes('<html xmlns=\"http://www.w3.org/1999/xhtml\"'));\n    assert(\n      output.includes('<img src=\"http://www.w3.org/Icons/valid-xhtml10\"/>'),\n    );\n  });\n\n  describe('import maps', function () {\n    let dir;\n    let count = 0;\n    beforeEach(async () => {\n      dir = path.join(__dirname, 'html-import-maps-' + ++count);\n      await overlayFS.mkdirp(dir);\n    });\n\n    it('should generate an import map', async function () {\n      await fsFixture(overlayFS, dir)`\n        index.html:\n          <body>\n            <script src=\"./main.js\" type=\"module\"></script>\n          </body>\n        main.js:\n          globalThis.output = async () => (await import('./main-async')).bar();\n        main-async.js:\n          import './main-async.css';\n          export const bar = async () => (await import('./nested-async')).bar + 3;\n        main-async.css:\n          .foo { color: red }\n        nested-async.js:\n          import './nested-async.css';\n          export const bar = 4;\n        nested-async.css:\n          .bar { color: green }\n        `;\n\n      let b = await bundle(path.join(dir, '/index.html'), {\n        inputFS: overlayFS,\n        mode: 'production',\n      });\n\n      let html = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      let importMap = JSON.parse(\n        html.match(/<script type=importmap>(.*?)<\\/script>/)[1],\n      );\n      assert.deepEqual(importMap, {\n        imports: {\n          [b.getBundles()[2].publicId]:\n            '/' + path.basename(b.getBundles()[2].filePath),\n          [b.getBundles()[3].publicId]:\n            '/' + path.basename(b.getBundles()[3].filePath),\n          [b.getBundles()[4].publicId]:\n            '/' + path.basename(b.getBundles()[4].filePath),\n          [b.getBundles()[5].publicId]:\n            '/' + path.basename(b.getBundles()[5].filePath),\n        },\n      });\n\n      assert(\n        html.indexOf('<script type=importmap>') < html.indexOf('<script src'),\n      );\n\n      let res = await run(b, null, {require: false});\n      let value = await res.output();\n      assert.equal(value, 7);\n    });\n\n    it('should generate an import map with relative public url', async function () {\n      await fsFixture(overlayFS, dir)`\n        index.html:\n          <body>\n            <script src=\"./main.js\" type=\"module\"></script>\n          </body>\n        main.js:\n          globalThis.output = async () => (await import('./main-async')).bar();\n        main-async.js:\n          import './main-async.css';\n          export const bar = async () => (await import('./nested-async')).bar + 3;\n        main-async.css:\n          .foo { color: red }\n        nested-async.js:\n          import './nested-async.css';\n          export const bar = 4;\n        nested-async.css:\n          .bar { color: green }\n        `;\n\n      let b = await bundle(path.join(dir, '/index.html'), {\n        inputFS: overlayFS,\n        mode: 'production',\n        defaultTargetOptions: {\n          publicUrl: '.',\n        },\n      });\n\n      let html = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      let importMap = JSON.parse(\n        html.match(/<script type=importmap>(.*?)<\\/script>/)[1],\n      );\n      assert.deepEqual(importMap, {\n        imports: {\n          [b.getBundles()[2].publicId]:\n            './' + path.basename(b.getBundles()[2].filePath),\n          [b.getBundles()[3].publicId]:\n            './' + path.basename(b.getBundles()[3].filePath),\n          [b.getBundles()[4].publicId]:\n            './' + path.basename(b.getBundles()[4].filePath),\n          [b.getBundles()[5].publicId]:\n            './' + path.basename(b.getBundles()[5].filePath),\n        },\n      });\n\n      assert(\n        html.indexOf('<script type=\"importmap\">') < html.indexOf('<script src'),\n      );\n\n      let res = await run(b, null, {require: false});\n      let value = await res.output();\n      assert.equal(value, 7);\n    });\n\n    it('should merge with an existing import map', async function () {\n      await fsFixture(overlayFS, dir)`\n        index.html:\n          <body>\n            <script type=\"importmap\">\n              {\"imports\": {\"react\": \"https://esm.sh/react@18.2.0\"}}\n            </script>\n            <script type=\"module\" src=\"./main.js\"></script>\n          </body>\n        main.js:\n          globalThis.output = async () => (await import('./main-async')).bar;\n        main-async.js:\n          export const bar = 3;\n        `;\n\n      let b = await bundle(path.join(dir, '/index.html'), {\n        inputFS: overlayFS,\n        mode: 'production',\n      });\n\n      let html = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      let importMap = JSON.parse(\n        html.match(/<script type=importmap>(.*?)<\\/script>/)[1],\n      );\n      assert.deepEqual(importMap, {\n        imports: {\n          react: 'https://esm.sh/react@18.2.0',\n          [b.getBundles()[2].publicId]:\n            '/' + path.basename(b.getBundles()[2].filePath),\n        },\n      });\n\n      assert(\n        html.indexOf('<script type=importmap>') <\n          html.indexOf('<script type=module'),\n      );\n\n      let res = await run(b, null, {require: false});\n      let value = await res.output();\n      assert.equal(value, 3);\n    });\n\n    it('should merge with an existing import map with shared bundles', async function () {\n      await fsFixture(overlayFS, dir)`\n        index.html:\n          <html>\n            <body>\n              <script type=\"importmap\">\n                {\"imports\": {\"react\": \"https://esm.sh/react@18.2.0\"}}\n              </script>\n              <script type=\"module\" src=\"./main.js\"></script>\n            </body>\n          </html>\n        main.js:\n          import 'lodash';\n          globalThis.output = async () => (await import('./main-async')).bar;\n        main-async.js:\n          export const bar = 3;\n        other.html:\n          <script type=\"module\" src=\"./other.js\"></script>\n        other.js:\n          import 'lodash';\n        `;\n\n      let b = await bundle(path.join(dir, '/*.html'), {\n        inputFS: overlayFS,\n        mode: 'production',\n      });\n\n      let html = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      let importMap = JSON.parse(\n        html.match(/<script type=importmap>(.*?)<\\/script>/)[1],\n      );\n      assert.deepEqual(importMap, {\n        imports: {\n          react: 'https://esm.sh/react@18.2.0',\n          [b.getBundles()[2].publicId]:\n            '/' + path.basename(b.getBundles()[2].filePath),\n        },\n      });\n\n      assert(\n        html.indexOf('<script type=importmap>') <\n          html.indexOf('<script type=module'),\n      );\n\n      let res = await run(b, null, {require: false});\n      let value = await res.output();\n      assert.equal(value, 3);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/image.js",
    "content": "import assert from 'assert';\nimport {bundle, distDir, inputFS, outputFS} from '@parcel/test-utils';\nimport exifReader from 'exif-reader';\nimport path from 'path';\nimport sharp from 'sharp';\n\ndescribe('image', function () {\n  this.timeout(10000);\n\n  it('Should be able to resize images', async () => {\n    await bundle(path.join(__dirname, '/integration/image/resized.js'));\n\n    let dirContent = await outputFS.readdir(distDir);\n    let imagePath = '';\n    let foundExtensions = [];\n    for (let filename of dirContent) {\n      let ext = path.extname(filename);\n      foundExtensions.push(ext);\n      if (ext === '.jpeg') {\n        imagePath = path.join(distDir, filename);\n      }\n    }\n    assert.deepStrictEqual(\n      foundExtensions.sort(),\n      ['.jpeg', '.js', '.map'].sort(),\n    );\n\n    let buffer = await outputFS.readFile(imagePath);\n    let image = await sharp(buffer).metadata();\n    assert.equal(image.width, 600);\n  });\n\n  it('Should be able to import an image using multiple varying query parameters', async () => {\n    await bundle(\n      path.join(__dirname, '/integration/image-multiple-queries/index.html'),\n    );\n\n    let dirContent = await outputFS.readdir(distDir);\n    let foundExtensions = [];\n    for (let filename of dirContent) {\n      const foundExt = path.extname(filename);\n      if (foundExt !== '.map') {\n        foundExtensions.push(foundExt);\n      }\n    }\n\n    assert.deepStrictEqual(\n      foundExtensions.sort(),\n      ['.jpeg', '.jpeg', '.webp', '.html'].sort(),\n    );\n  });\n\n  describe('Should be able to change image format', () => {\n    function testCase(ext) {\n      return async () => {\n        await bundle(\n          path.join(__dirname, `/integration/image/reformat.${ext}`),\n        );\n\n        let dirContent = await outputFS.readdir(distDir);\n        let foundExtensions = [];\n        for (let filename of dirContent) {\n          const foundExt = path.extname(filename);\n          if (foundExt !== '.map') {\n            foundExtensions.push(foundExt);\n          }\n        }\n        assert.deepStrictEqual(\n          foundExtensions.sort(),\n          ['.webp', `.${ext}`].sort(),\n        );\n      };\n    }\n\n    it('from JS', testCase('js'));\n    it('from HTML', testCase('html'));\n    it('from CSS', testCase('css'));\n\n    it('all formats', async () => {\n      let b = await bundle(\n        path.join(__dirname, `/integration/image/reformat-all.html`),\n      );\n\n      let foundExtensions = new Set(b.getBundles().map(({type}) => type));\n\n      assert.deepStrictEqual(\n        foundExtensions,\n        new Set(['html', 'webp', 'avif', 'jpeg', 'png', 'tiff']),\n      );\n    });\n  });\n\n  it('should lossless optimise JPEGs', async function () {\n    let img = path.join(__dirname, '/integration/image/image.jpg');\n    let b = await bundle(img, {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n    });\n\n    const imagePath = b.getBundles().find(b => b.type === 'jpg').filePath;\n\n    let input = await inputFS.readFile(img);\n    let inputRaw = await sharp(input).toFormat('raw').toBuffer();\n    let output = await outputFS.readFile(imagePath);\n    let outputRaw = await sharp(output).toFormat('raw').toBuffer();\n\n    assert(outputRaw.equals(inputRaw));\n    assert(output.length < input.length);\n  });\n\n  it('should lossless optimise progressive JPEGs', async function () {\n    let img = path.join(__dirname, '/integration/image/banana.jpg');\n    let b = await bundle(img, {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n      logLevel: 'verbose',\n    });\n\n    const imagePath = b.getBundles().find(b => b.type === 'jpg').filePath;\n\n    // let input = await inputFS.readFile(img);\n    // let inputRaw = await sharp(input)\n    //   .toFormat('raw')\n    //   .toBuffer();\n    // Check validity of image\n    let output = await outputFS.readFile(imagePath);\n    await sharp(output).toFormat('raw').toBuffer();\n\n    // assert(outputRaw.equals(inputRaw));\n    // assert(output.length < input.length);\n  });\n\n  it('should lossless optimise PNGs', async function () {\n    let img = path.join(__dirname, '/integration/image/clock.png');\n    let b = await bundle(img, {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n    });\n\n    const imagePath = b.getBundles().find(b => b.type === 'png').filePath;\n\n    let input = await inputFS.readFile(img);\n    let inputRaw = await sharp(input).toFormat('raw').toBuffer();\n    let output = await outputFS.readFile(imagePath);\n    let outputRaw = await sharp(output).toFormat('raw').toBuffer();\n\n    assert(outputRaw.equals(inputRaw));\n    assert(output.length < input.length);\n  });\n\n  it('support config files for jpeg files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/image-config/image.jpg'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    const originalSize = 549196;\n\n    const imagePath = b.getBundles().find(b => b.type === 'jpeg').filePath;\n\n    const buffer = await outputFS.readFile(imagePath);\n    const image = await sharp(buffer).metadata();\n\n    assert.strictEqual(image.width, 1920);\n    assert.strictEqual(image.chromaSubsampling, '4:4:4');\n    assert(image.size < originalSize);\n  });\n\n  it('support config files for png files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/image-config/clock.png'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    const originalSize = 84435;\n    const imagePath = b.getBundles().find(b => b.type === 'png').filePath;\n    const buffer = await outputFS.readFile(imagePath);\n    const image = await sharp(buffer).metadata();\n\n    assert.strictEqual(image.width, 200);\n    assert.strictEqual(image.paletteBitDepth, 8);\n    assert(image.size < originalSize);\n  });\n\n  it('should retain EXIF data', async () => {\n    const b = await bundle(\n      path.join(__dirname, '/integration/image-exif/resized.html'),\n    );\n\n    const imagePath = b.getBundles().find(b => b.type === 'jpeg').filePath;\n\n    const buffer = await outputFS.readFile(imagePath);\n    const image = await sharp(buffer).metadata();\n\n    const exif = exifReader(image.exif);\n\n    assert.strictEqual(\n      exif.Photo.UserComment.toString(),\n      'ASCII\\u0000\\u0000\\u0000This is a comment',\n    );\n  });\n\n  it('should remove EXIF data when optimizing', async () => {\n    const b = await bundle(\n      path.join(__dirname, '/integration/image-exif/resized.html'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    const imagePath = b.getBundles().find(b => b.type === 'jpeg').filePath;\n\n    const buffer = await outputFS.readFile(imagePath);\n    const image = await sharp(buffer).metadata();\n\n    assert.strictEqual(image.exif, undefined);\n  });\n\n  it('should use the EXIF orientation tag when resizing', async () => {\n    const b = await bundle(\n      path.join(__dirname, '/integration/image-exif/resized.html'),\n    );\n\n    const imagePath = b.getBundles().find(b => b.type === 'jpeg').filePath;\n\n    const buffer = await outputFS.readFile(imagePath);\n    const image = await sharp(buffer).metadata();\n\n    assert.strictEqual(image.orientation, 1);\n    assert.strictEqual(image.width, 240);\n    assert.strictEqual(image.height, 320);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/incremental-bundling.js",
    "content": "// @flow strict-local\nimport {\n  bundler,\n  getNextBuildSuccess,\n  inputFS,\n  overlayFS,\n  run,\n  fsFixture,\n} from '@parcel/test-utils';\nimport assert from 'assert';\nimport path from 'path';\nimport sinon from 'sinon';\nimport {NodePackageManager} from '@parcel/package-manager';\n\nimport {type Asset} from '@parcel/types';\n\nconst CONFIG = Symbol.for('parcel-plugin-config');\nlet packageManager = new NodePackageManager(inputFS, '/');\n\ndescribe('incremental bundling', function () {\n  let defaultBundlerSpy, customBundlerSpy;\n  let assertChangedAssets = (actual: number, expected: number) => {\n    assert.equal(\n      actual,\n      expected,\n      `the number of changed assets should be ${expected}, not ${actual}`,\n    );\n  };\n\n  let assertTimesBundled = (actual: number, expected: number) => {\n    assert.equal(\n      actual,\n      expected,\n      `the bundler should have bundled ${expected} time(s), not ${actual}`,\n    );\n  };\n\n  let getChangedAssetsBeforeRuntimes = (changedAssets: Array<Asset>) => {\n    return changedAssets.filter(a => !a.filePath.includes('runtime'));\n  };\n  beforeEach(async () => {\n    let Bundler = (\n      await packageManager.require('@parcel/bundler-default', __filename)\n    ).default;\n    let CustomBundler = await packageManager.require(\n      './integration/incremental-bundling/node_modules/parcel-bundler-test',\n      __filename,\n    );\n\n    defaultBundlerSpy = sinon.spy(Bundler[CONFIG], 'bundle'); // $FlowFixMe[prop-missing]\n\n    customBundlerSpy = sinon.spy(CustomBundler[CONFIG], 'bundle');\n  });\n\n  afterEach(() => {\n    defaultBundlerSpy.restore();\n    customBundlerSpy.restore();\n  });\n\n  describe('non-dependency based changes', () => {\n    describe('javascript', () => {\n      it('add a console log should not bundle by default', async () => {\n        let subscription;\n        let fixture = path.join(__dirname, '/integration/incremental-bundling');\n        try {\n          let b = bundler(path.join(fixture, 'index.js'), {\n            inputFS: overlayFS,\n            shouldDisableCache: false,\n          });\n\n          await overlayFS.mkdirp(fixture);\n          subscription = await b.watch();\n\n          let event = await getNextBuildSuccess(b);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          await overlayFS.writeFile(\n            path.join(fixture, 'index.js'),\n            `import {a} from './a';\nconsole.log('index.js');\nconsole.log(a);\nconsole.log('adding a new console');`,\n          );\n\n          event = await getNextBuildSuccess(b);\n          assertChangedAssets(event.changedAssets.size, 1);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          let result = await b.run();\n          let contents = await overlayFS.readFile(\n            result.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes(`console.log('adding a new console')`));\n        } finally {\n          if (subscription) {\n            await subscription.unsubscribe();\n            subscription = null;\n          }\n        }\n      });\n\n      it('disable by setting option to false', async () => {\n        let subscription;\n        let fixture = path.join(__dirname, '/integration/incremental-bundling');\n        try {\n          let b = bundler(path.join(fixture, 'index.js'), {\n            inputFS: overlayFS,\n            shouldDisableCache: false,\n            shouldBundleIncrementally: false,\n          });\n\n          await overlayFS.mkdirp(fixture);\n          subscription = await b.watch();\n\n          let event = await getNextBuildSuccess(b);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          await overlayFS.writeFile(\n            path.join(fixture, 'index.js'),\n            `import {a} from './a';\nconsole.log('index.js');\nconsole.log(a);\nconsole.log('adding a new console');`,\n          );\n\n          event = await getNextBuildSuccess(b);\n          assertChangedAssets(event.changedAssets.size, 1);\n          assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n          let result = await b.run();\n          let contents = await overlayFS.readFile(\n            result.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes(`console.log('adding a new console')`));\n        } finally {\n          if (subscription) {\n            await subscription.unsubscribe();\n            subscription = null;\n          }\n        }\n      });\n\n      it('add a console log should not bundle', async () => {\n        let subscription;\n        let fixture = path.join(__dirname, '/integration/incremental-bundling');\n        try {\n          let b = bundler(path.join(fixture, 'index.js'), {\n            inputFS: overlayFS,\n            shouldDisableCache: false,\n            shouldBundleIncrementally: true,\n          });\n\n          await overlayFS.mkdirp(fixture);\n          subscription = await b.watch();\n\n          let event = await getNextBuildSuccess(b);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          await overlayFS.writeFile(\n            path.join(fixture, 'index.js'),\n            `import {a} from './a';\nconsole.log('index.js');\nconsole.log(a);\nconsole.log('adding a new console');`,\n          );\n\n          event = await getNextBuildSuccess(b);\n          assertChangedAssets(event.changedAssets.size, 1);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          let result = await b.run();\n          let contents = await overlayFS.readFile(\n            result.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes(`console.log('adding a new console')`));\n        } finally {\n          if (subscription) {\n            await subscription.unsubscribe();\n            subscription = null;\n          }\n        }\n      });\n\n      it('updating a string value should not bundle', async () => {\n        let subscription;\n        let fixture = path.join(__dirname, '/integration/incremental-bundling');\n        try {\n          let b = bundler(path.join(fixture, 'index.js'), {\n            inputFS: overlayFS,\n            shouldDisableCache: false,\n            shouldBundleIncrementally: true,\n          });\n\n          await overlayFS.mkdirp(fixture);\n          subscription = await b.watch();\n\n          let event = await getNextBuildSuccess(b);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          await overlayFS.writeFile(\n            path.join(fixture, 'index.js'),\n            `import {a} from './a';\nconsole.log('index.js - updated string');\nconsole.log(a);\n`,\n          );\n\n          event = await getNextBuildSuccess(b);\n          assertChangedAssets(event.changedAssets.size, 1);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          let result = await b.run();\n          let contents = await overlayFS.readFile(\n            result.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(\n            contents.includes(`console.log('index.js - updated string');`),\n          );\n        } finally {\n          if (subscription) {\n            await subscription.unsubscribe();\n            subscription = null;\n          }\n        }\n      });\n\n      it('adding a comment', async () => {\n        let subscription;\n        let fixture = path.join(__dirname, '/integration/incremental-bundling');\n        try {\n          let b = bundler(path.join(fixture, 'index.js'), {\n            inputFS: overlayFS,\n            shouldDisableCache: false,\n            shouldBundleIncrementally: true,\n          });\n\n          await overlayFS.mkdirp(fixture);\n          subscription = await b.watch();\n\n          let event = await getNextBuildSuccess(b);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          await overlayFS.writeFile(\n            path.join(fixture, 'index.js'),\n            `import {a} from './a';\n// test comment\nconsole.log('index.js');\nconsole.log(a);`,\n          );\n\n          event = await getNextBuildSuccess(b);\n          assertChangedAssets(event.changedAssets.size, 1);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          let result = await b.run();\n          let contents = await overlayFS.readFile(\n            result.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n          assert(contents.includes(`// test comment`));\n        } finally {\n          if (subscription) {\n            await subscription.unsubscribe();\n            subscription = null;\n          }\n        }\n      });\n\n      // this case is similar to applying a patch or restarting parcel with changes\n      it('adds multiple non-dependency related changes', async () => {\n        let subscription;\n        let fixture = path.join(__dirname, '/integration/incremental-bundling');\n        try {\n          let b = bundler(path.join(fixture, 'index-export.js'), {\n            inputFS: overlayFS,\n            shouldDisableCache: false,\n            shouldBundleIncrementally: true,\n          });\n\n          await overlayFS.mkdirp(fixture);\n          subscription = await b.watch();\n\n          let event = await getNextBuildSuccess(b);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          await overlayFS.writeFile(\n            path.join(fixture, 'index-export.js'),\n            `import {a} from './a';\nconsole.log('adding a new console');\nmodule.exports = a;`,\n          );\n\n          await overlayFS.writeFile(\n            path.join(fixture, 'a.js'),\n            `export const a = 'a updated';`,\n          );\n\n          event = await getNextBuildSuccess(b);\n          assertChangedAssets(event.changedAssets.size, 2);\n          assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n          let result = await b.run();\n          let contents = await overlayFS.readFile(\n            result.bundleGraph.getBundles()[0].filePath,\n            'utf8',\n          );\n\n          assert(contents.includes(`console.log('adding a new console')`));\n\n          let bundleOutput = await run(result.bundleGraph);\n          assert.equal(bundleOutput, 'a updated');\n        } finally {\n          if (subscription) {\n            await subscription.unsubscribe();\n            subscription = null;\n          }\n        }\n      });\n    });\n\n    it('update an imported css file', async () => {\n      let subscription;\n      let fixture = path.join(__dirname, '/integration/incremental-bundling');\n      try {\n        let b = bundler(path.join(fixture, 'index-with-css.js'), {\n          inputFS: overlayFS,\n          shouldDisableCache: false,\n          shouldBundleIncrementally: true,\n        });\n\n        await overlayFS.mkdirp(fixture);\n        subscription = await b.watch();\n\n        let event = await getNextBuildSuccess(b);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        await overlayFS.writeFile(\n          path.join(fixture, 'a.css'),\n          `html {\n  color: red;\n}\n`,\n        );\n\n        event = await getNextBuildSuccess(b);\n        assertChangedAssets(event.changedAssets.size, 1);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        let result = await b.run();\n        let bundleCSS = result.bundleGraph.getBundles()[1];\n        assert.equal(bundleCSS.type, 'css');\n\n        let cssContent = await overlayFS.readFile(bundleCSS.filePath, 'utf8');\n        assert(cssContent.includes(`color: red;`));\n      } finally {\n        if (subscription) {\n          await subscription.unsubscribe();\n          subscription = null;\n        }\n      }\n    });\n\n    it('update both the js and imported css file', async () => {\n      let subscription;\n      let fixture = path.join(__dirname, '/integration/incremental-bundling');\n      try {\n        let b = bundler(path.join(fixture, 'index-with-css.js'), {\n          inputFS: overlayFS,\n          shouldDisableCache: false,\n          shouldBundleIncrementally: true,\n        });\n\n        await overlayFS.mkdirp(fixture);\n        subscription = await b.watch();\n\n        let event = await getNextBuildSuccess(b);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        await overlayFS.writeFile(\n          path.join(fixture, 'index-with-css.js'),\n          `import {a} from './a';\nimport './a.css';\nconsole.log('index.js');\nconsole.log(a, 'updated');`,\n        );\n\n        await overlayFS.writeFile(\n          path.join(fixture, 'a.css'),\n          `html {\n  color: red;\n}`,\n        );\n\n        event = await getNextBuildSuccess(b);\n        assertChangedAssets(event.changedAssets.size, 2);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        let result = await b.run();\n        let contents = await overlayFS.readFile(\n          result.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n\n        assert(contents.includes(`console.log((0, _a.a), 'updated');`));\n\n        let bundleCSS = result.bundleGraph.getBundles()[1];\n        assert.equal(bundleCSS.type, 'css');\n\n        let cssContent = await overlayFS.readFile(bundleCSS.filePath, 'utf8');\n        assert(cssContent.includes(`color: red;`));\n      } finally {\n        if (subscription) {\n          await subscription.unsubscribe();\n          subscription = null;\n        }\n      }\n    });\n\n    it('update the bundles if entry is html and js asset is modified', async () => {\n      let subscription;\n      let fixture = path.join(__dirname, '/integration/incremental-bundling');\n      try {\n        let b = bundler(path.join(fixture, 'index.html'), {\n          inputFS: overlayFS,\n          shouldDisableCache: false,\n          shouldBundleIncrementally: true,\n        });\n\n        await overlayFS.mkdirp(fixture);\n        subscription = await b.watch();\n\n        let event = await getNextBuildSuccess(b);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        await overlayFS.writeFile(\n          path.join(fixture, 'index.js'),\n          `import {a} from './a';\n// test comment\nconsole.log('index.js');\nconsole.log(a);`,\n        );\n\n        event = await getNextBuildSuccess(b);\n        assertChangedAssets(event.changedAssets.size, 1);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        let result = await b.run();\n\n        let bundleHTML = result.bundleGraph.getBundles()[0];\n        assert.equal(bundleHTML.type, 'html');\n        let htmlContent = await overlayFS.readFile(bundleHTML.filePath, 'utf8');\n\n        assert(htmlContent.includes(`<html>`));\n\n        let bundleJS = result.bundleGraph.getBundles()[1];\n        assert.equal(bundleJS.type, 'js');\n\n        let jsContent = await overlayFS.readFile(bundleJS.filePath, 'utf8');\n        assert(jsContent.includes(`// test comment`));\n      } finally {\n        if (subscription) {\n          await subscription.unsubscribe();\n          subscription = null;\n        }\n      }\n    });\n  });\n\n  describe('dependency based changes should run the bundler', () => {\n    it('adding a new dependency', async () => {\n      let subscription;\n      let fixture = path.join(__dirname, '/integration/incremental-bundling');\n      try {\n        let b = bundler(path.join(fixture, 'index.js'), {\n          inputFS: overlayFS,\n          shouldDisableCache: false,\n          shouldBundleIncrementally: true,\n        });\n\n        await overlayFS.mkdirp(fixture);\n        subscription = await b.watch();\n\n        await getNextBuildSuccess(b);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        await overlayFS.writeFile(\n          path.join(fixture, 'index.js'),\n          `import {a} from './a';\nimport {b} from './b';\nconsole.log('index.js', b);\nconsole.log(a);\n`,\n        );\n\n        let event = await getNextBuildSuccess(b);\n        assertChangedAssets(event.changedAssets.size, 2);\n        assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n        let contents = await overlayFS.readFile(\n          event.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n\n        assert(contents.includes(`console.log('index.js', (0, _b.b));`));\n      } finally {\n        if (subscription) {\n          await subscription.unsubscribe();\n          subscription = null;\n        }\n      }\n    });\n\n    it('adding a new dependency of a different type', async () => {\n      let subscription;\n      let fixture = path.join(__dirname, '/integration/incremental-bundling');\n      try {\n        let b = bundler(path.join(fixture, 'index.js'), {\n          inputFS: overlayFS,\n          shouldDisableCache: false,\n          shouldBundleIncrementally: true,\n        });\n\n        await overlayFS.mkdirp(fixture);\n        subscription = await b.watch();\n\n        await getNextBuildSuccess(b);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        await overlayFS.writeFile(\n          path.join(fixture, 'index.js'),\n          `import {a} from './a';\nimport './a.css';\nconsole.log(a);\n`,\n        );\n\n        let event = await getNextBuildSuccess(b);\n        assertChangedAssets(event.changedAssets.size, 2);\n        assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n        // one CSS and one JS bundle\n        assert.equal(event.bundleGraph.getBundles().length, 2);\n\n        let contents = await overlayFS.readFile(\n          event.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n\n        assert(contents.includes(`console.log((0, _a.a));`));\n\n        let bundleCSS = event.bundleGraph.getBundles()[1];\n        assert.equal(bundleCSS.type, 'css');\n\n        let cssContent = await overlayFS.readFile(bundleCSS.filePath, 'utf8');\n        assert(cssContent.includes(`color: #00f;`));\n      } finally {\n        if (subscription) {\n          await subscription.unsubscribe();\n          subscription = null;\n        }\n      }\n    });\n\n    it('adding a new dynamic import', async () => {\n      let subscription;\n      let fixture = path.join(__dirname, '/integration/incremental-bundling');\n      try {\n        let b = bundler(path.join(fixture, 'index.js'), {\n          inputFS: overlayFS,\n          shouldDisableCache: false,\n          shouldBundleIncrementally: true,\n        });\n\n        await overlayFS.mkdirp(fixture);\n        subscription = await b.watch();\n\n        await getNextBuildSuccess(b);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        await overlayFS.writeFile(\n          path.join(fixture, 'index.js'),\n          `import {a} from './a';\nconst b = import('./b');\nconsole.log(a, b);\n`,\n        );\n\n        let event = await getNextBuildSuccess(b);\n        let assets = Array.from(event.changedAssets.values());\n        assertChangedAssets(getChangedAssetsBeforeRuntimes(assets).length, 2);\n        assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n        // original bundle and new dynamic import bundle JS bundle\n        assert.equal(event.bundleGraph.getBundles().length, 2);\n\n        let contents = await overlayFS.readFile(\n          event.bundleGraph.getBundles()[0].filePath,\n          'utf8',\n        );\n\n        assert(contents.includes(`console.log((0, _a.a), b);`));\n\n        let dynamicBundle = event.bundleGraph.getBundles()[1];\n        assert.equal(dynamicBundle.type, 'js');\n\n        let dynamicContent = await overlayFS.readFile(\n          dynamicBundle.filePath,\n          'utf8',\n        );\n        assert(\n          dynamicContent.includes(`parcelHelpers.export(exports, \"b\", ()=>b);\nconst b = 'b';`),\n        );\n      } finally {\n        if (subscription) {\n          await subscription.unsubscribe();\n          subscription = null;\n        }\n      }\n    });\n\n    it('removing a dependency', async () => {\n      let subscription;\n      let fixture = path.join(__dirname, '/integration/incremental-bundling');\n      try {\n        let b = bundler(path.join(fixture, 'index.js'), {\n          inputFS: overlayFS,\n          shouldDisableCache: false,\n          shouldBundleIncrementally: true,\n        });\n\n        await overlayFS.mkdirp(fixture);\n        subscription = await b.watch();\n\n        let event = await getNextBuildSuccess(b);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        await overlayFS.writeFile(\n          path.join(fixture, 'index.js'),\n          `// import {a} from './a';\nconsole.log('index.js');`,\n        );\n\n        event = await getNextBuildSuccess(b);\n        assertChangedAssets(event.changedAssets.size, 1);\n        assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n        let output = await overlayFS.readFile(\n          path.join(fixture, 'index.js'),\n          'utf8',\n        );\n        assert(output.includes(`// import {a} from './a'`));\n      } finally {\n        if (subscription) {\n          await subscription.unsubscribe();\n          subscription = null;\n        }\n      }\n    });\n  });\n\n  describe('other changes that would for a re-bundle', () => {\n    it('changing the bundler in parcel configs', async () => {\n      let subscription;\n      let fixture = path.join(__dirname, '/integration/incremental-bundling');\n      try {\n        let b = bundler(path.join(fixture, 'index.js'), {\n          inputFS: overlayFS,\n          shouldDisableCache: false,\n          shouldBundleIncrementally: true,\n        });\n\n        await overlayFS.mkdirp(fixture);\n        subscription = await b.watch();\n\n        let event = await getNextBuildSuccess(b);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n        assertTimesBundled(customBundlerSpy.callCount, 0);\n\n        await overlayFS.writeFile(\n          path.join(fixture, '.parcelrc'),\n          JSON.stringify({\n            extends: '@parcel/config-default',\n            bundler: 'parcel-bundler-test',\n          }),\n        );\n\n        event = await getNextBuildSuccess(b);\n        let assets = Array.from(event.changedAssets.values());\n        // should contain all the assets\n        assertChangedAssets(getChangedAssetsBeforeRuntimes(assets).length, 3);\n        // the default bundler was only called once\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n        // calls the new bundler to rebundle\n        assertTimesBundled(customBundlerSpy.callCount, 1);\n\n        let output = await overlayFS.readFile(\n          path.join(fixture, 'index.js'),\n          'utf8',\n        );\n        assert(output.includes(`import {a} from './a'`));\n      } finally {\n        if (subscription) {\n          await subscription.unsubscribe();\n          subscription = null;\n        }\n      }\n    });\n\n    it('changing bundler options', async () => {\n      let subscription;\n      try {\n        await fsFixture(overlayFS, __dirname)`\n          index.js:\n            export default 1;\n\n          package.json:\n            {\n              \"@parcel/bundler-default\": {\n                \"http\": 2\n              }\n            }\n\n          yarn.lock:`;\n\n        let b = bundler(path.join(__dirname, 'index.js'), {\n          inputFS: overlayFS,\n          shouldDisableCache: false,\n          shouldBundleIncrementally: true,\n        });\n\n        await overlayFS.mkdirp(__dirname);\n        subscription = await b.watch();\n\n        let event = await getNextBuildSuccess(b);\n        assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n        let pkgFile = path.join(__dirname, 'package.json');\n        let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n        await overlayFS.writeFile(\n          pkgFile,\n          JSON.stringify({\n            ...pkg,\n            '@parcel/bundler-default': {\n              http: 1,\n            },\n          }),\n        );\n\n        event = await getNextBuildSuccess(b);\n\n        // should contain all the assets\n        assertChangedAssets(event.changedAssets.size, 2);\n        assertTimesBundled(defaultBundlerSpy.callCount, 2);\n      } finally {\n        if (subscription) {\n          await subscription.unsubscribe();\n          subscription = null;\n        }\n      }\n    });\n  });\n\n  it('changing the namer', async () => {\n    let subscription;\n    let fixture = path.join(__dirname, '/integration/incremental-bundling');\n    try {\n      let b = bundler(path.join(fixture, 'index.js'), {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n        shouldBundleIncrementally: true,\n      });\n\n      await overlayFS.mkdirp(fixture);\n      subscription = await b.watch();\n\n      let event = await getNextBuildSuccess(b);\n      assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n      await overlayFS.writeFile(\n        path.join(fixture, '.parcelrc'),\n        JSON.stringify({\n          extends: '@parcel/config-default',\n          namers: ['parcel-namer-test'],\n        }),\n      );\n\n      event = await getNextBuildSuccess(b);\n\n      // should contain all the assets\n      assertChangedAssets(event.changedAssets.size, 3);\n      assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n      let result = await b.run();\n      let bundles = result.bundleGraph.getBundles();\n      assert.deepEqual(\n        bundles.map(b => b.name),\n        bundles.map(b => `${b.id}.${b.type}`),\n      );\n    } finally {\n      if (subscription) {\n        await subscription.unsubscribe();\n        subscription = null;\n      }\n    }\n  });\n\n  it('changing the runtimes', async () => {\n    let subscription;\n    let fixture = path.join(__dirname, '/integration/incremental-bundling');\n    try {\n      let b = bundler(path.join(fixture, 'index.js'), {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n        shouldBundleIncrementally: true,\n      });\n\n      await overlayFS.mkdirp(fixture);\n      subscription = await b.watch();\n\n      let event = await getNextBuildSuccess(b);\n      assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n      await overlayFS.writeFile(\n        path.join(fixture, '.parcelrc'),\n        JSON.stringify({\n          extends: '@parcel/config-default',\n          runtimes: ['parcel-runtime-test'],\n        }),\n      );\n\n      event = await getNextBuildSuccess(b);\n\n      // should contain all the assets\n      let assets = Array.from(event.changedAssets.values());\n      assertChangedAssets(getChangedAssetsBeforeRuntimes(assets).length, 3);\n      assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n      let result = await b.run();\n      let res = await run(result.bundleGraph, null, {require: false});\n      assert.equal(res.runtime_test, true);\n    } finally {\n      if (subscription) {\n        await subscription.unsubscribe();\n        subscription = null;\n      }\n    }\n  });\n\n  it('changing target options', async () => {\n    let subscription;\n    let fixture = path.join(__dirname, '/integration/incremental-bundling');\n    try {\n      let b = bundler(path.join(fixture, 'index.js'), {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n        shouldBundleIncrementally: true,\n      });\n\n      await overlayFS.mkdirp(fixture);\n      subscription = await b.watch();\n\n      let event = await getNextBuildSuccess(b);\n      assertTimesBundled(defaultBundlerSpy.callCount, 1);\n      assertTimesBundled(customBundlerSpy.callCount, 0);\n\n      let pkgFile = path.join(fixture, 'package.json');\n      let pkg = JSON.parse(await overlayFS.readFile(pkgFile));\n      await overlayFS.writeFile(\n        pkgFile,\n        JSON.stringify({\n          ...pkg,\n          targets: {\n            esmodule: {\n              outputFormat: 'esmodule',\n            },\n          },\n        }),\n      );\n      event = await getNextBuildSuccess(b);\n\n      assertChangedAssets(event.changedAssets.size, 3);\n      assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n      let output = await overlayFS.readFile(\n        path.join(fixture, 'index.js'),\n        'utf8',\n      );\n      assert(output.includes(`import {a} from './a'`));\n    } finally {\n      if (subscription) {\n        await subscription.unsubscribe();\n        subscription = null;\n      }\n    }\n  });\n\n  it('adding a new the entry', async () => {\n    let subscription;\n    let fixture = path.join(__dirname, '/integration/incremental-bundling');\n    try {\n      let b = bundler(path.join(fixture, '*.html'), {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n        shouldBundleIncrementally: true,\n      });\n\n      await overlayFS.mkdirp(fixture);\n      subscription = await b.watch();\n\n      let event = await getNextBuildSuccess(b);\n      assertTimesBundled(defaultBundlerSpy.callCount, 1);\n      assertTimesBundled(customBundlerSpy.callCount, 0);\n\n      await overlayFS.writeFile(\n        path.join(fixture, 'index-new-entry.html'),\n        '<html />',\n      );\n\n      event = await getNextBuildSuccess(b);\n\n      // should contain all the assets\n      assertChangedAssets(event.changedAssets.size, 1);\n      assertTimesBundled(defaultBundlerSpy.callCount, 2);\n    } finally {\n      if (subscription) {\n        await subscription.unsubscribe();\n        subscription = null;\n      }\n    }\n  });\n  it('changing symbols (adding a new dependency via one symbol)', async () => {\n    let subscription;\n    let fixture = path.join(__dirname, '/integration/incremental-bundling');\n    try {\n      let b = bundler(path.join(fixture, 'index-multi-symbol.js'), {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n        shouldBundleIncrementally: true,\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      });\n\n      await overlayFS.mkdirp(fixture);\n      subscription = await b.watch();\n\n      let event = await getNextBuildSuccess(b);\n      assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n      await overlayFS.writeFile(\n        path.join(fixture, 'index-multi-symbol.js'),\n        `import {a,b,c} from './multi-symbol-util.js';\n\n      console.log('index.js');\n      console.log(a,b,c);\n      module.exports = {a, b, c};\n      `,\n      );\n\n      event = await getNextBuildSuccess(b);\n      assertChangedAssets(event.changedAssets.size, 1);\n      assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n      let result = await b.run();\n      let contents = await overlayFS.readFile(\n        result.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        /console\\.log\\(\\(0, [^)]+\\), \\(0, [^)]+\\), \\(0, [^)]+\\)\\);/.test(\n          contents,\n        ),\n      );\n    } finally {\n      if (subscription) {\n        await subscription.unsubscribe();\n        subscription = null;\n      }\n    }\n  });\n  it('changing symbols (removing a dependency via one symbol)', async () => {\n    let subscription;\n    let fixture = path.join(__dirname, '/integration/incremental-bundling');\n    try {\n      let b = bundler(path.join(fixture, 'index-multi-symbol.js'), {\n        inputFS: overlayFS,\n        shouldDisableCache: false,\n        shouldBundleIncrementally: true,\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      });\n\n      await overlayFS.mkdirp(fixture);\n      subscription = await b.watch();\n\n      let event = await getNextBuildSuccess(b);\n      assertTimesBundled(defaultBundlerSpy.callCount, 1);\n\n      await overlayFS.writeFile(\n        path.join(fixture, 'index-multi-symbol.js'),\n        `import {a } from './multi-symbol-util.js';\n\nconsole.log('index.js');\nconsole.log(a);\nmodule.exports = {a}\n`,\n      );\n\n      event = await getNextBuildSuccess(b);\n      assertChangedAssets(event.changedAssets.size, 1);\n      assertTimesBundled(defaultBundlerSpy.callCount, 2);\n\n      let result = await b.run();\n      let contents = await overlayFS.readFile(\n        result.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(/console\\.log\\(\\(0, [^)]+\\)\\);/.test(contents));\n\n      result.bundleGraph.getBundles()[0].traverseAssets(a => {\n        assert(!a.filePath.endsWith('b.js'));\n      });\n    } finally {\n      if (subscription) {\n        await subscription.unsubscribe();\n        subscription = null;\n      }\n    }\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/.eslintrc.json",
    "content": "{\n  \"extends\": \"../../../../../.eslintrc.json\",\n  \"env\": {\n    \"browser\": true\n  },\n  \"globals\": {\n    \"output\": true,\n    \"import\": true\n  },\n  \"rules\": {\n    \"no-console\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/alias/bar.js",
    "content": "export default \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/alias/exclude-local.js",
    "content": "import bar from \"./bar-exclude\";\n\nexport default bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/alias/exclude-package.js",
    "content": "import bar from \"foo-exclude\";\n\nexport default bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/alias/package-to-local.js",
    "content": "import bar from \"bar\";\n\nexport default bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/alias/package-to-package.js",
    "content": "import {add} from \"foo\";\n\nexport default add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/alias/package.json",
    "content": "{\n  \"alias\": {\n    \"foo\": \"lodash\",\n    \"bar\": \"./bar.js\",\n    \"foo-exclude\": false,\n    \"./bar-exclude\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-dep-internal-external/async.js",
    "content": "export default 30;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-dep-internal-external/child.js",
    "content": "export default import('./async').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-dep-internal-external/entry1.js",
    "content": "import a from './async';\nimport c from './child';\n\noutput = [a,c];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-dep-internal-external/entry2.js",
    "content": "import c from './child';\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared/async.js",
    "content": "import value from './value';\n\nexport default value + 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared/index.js",
    "content": "export default Promise.all([\n  import('./value').then(mod => mod.default),\n  import('./async').then(mod => mod.default),\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared/scope-hoisting.js",
    "content": "output = Promise.all([\n  import('./value').then(mod => mod.default),\n  import('./async').then(mod => mod.default),\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared/value.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared-sibling/a.js",
    "content": "import value from './value';\n\nsideEffectNoop(value);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared-sibling/b.js",
    "content": "import './a';\nimport value from './value';\n\nexport default value + 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared-sibling/index.js",
    "content": "export default import('./b').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared-sibling/other-entry.js",
    "content": "import('./a')\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared-sibling/scope-hoisting.js",
    "content": "output = import('./b').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/async-entry-shared-sibling/value.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel/.babelrc",
    "content": "{\n  \"presets\": [[\"@babel/env\", {\n    \"targets\": {\n      \"browsers\": [\"last 2 Chrome versions\"]\n    }\n  }]]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel/foo.js",
    "content": "export default class Foo {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel/index.js",
    "content": "import Foo from './foo';\n\nexport {Foo};\nexport class Bar {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-6-autoinstall/.babelrc",
    "content": "{\n  \"presets\": [\"env\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-6-autoinstall/index.js",
    "content": "export default function () {\n  return 3;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-6-autoinstall/package.json",
    "content": "{\n  \"name\": \"babel-6-autoinstall\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-6-compatibility/.babelrc",
    "content": "{\n  \"presets\": [\"env\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-6-compatibility/index.js",
    "content": "export default function () {\n  return 3;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-6-compatibility/package.json",
    "content": "{\n  \"name\": \"babel-6-compatibility\",\n  \"devDependencies\": {\n    \"babel-core\": \"^6.26.3\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-7-autoinstall/.babelrc",
    "content": "{\n  \"presets\": [\"@babel/env\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-7-autoinstall/index.js",
    "content": "export default function () {\n  return 3;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-7-autoinstall/package.json",
    "content": "{\n  \"name\": \"babel-7-autoinstall\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist/foo.js",
    "content": "export default class Foo {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist/index.js",
    "content": "import Foo from './foo';\n\nexport {Foo};\nexport class Bar {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist/package.json",
    "content": "{\n  \"name\": \"parcel-test-browser-browserslist\",\n  \"browserslist\": [\"last 2 Chrome versions\", \"IE >= 11\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist-multiple-env/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"script\"\n  },\n  \"rules\": {\n    \"no-unused-vars\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist-multiple-env/index.js",
    "content": "const a = {\n  prop1: '1',\n  prop2: '2',\n  prop3: '3'\n};\n\nconst {prop1, prop2, prop3} = a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist-multiple-env/package.json",
    "content": "{\n  \"name\": \"parcel-test-browser-browserslist\",\n  \"browserslist\": {\n    \"test\": [\"chrome 68\"],\n    \"production\": [\"last 2 Chrome versions\", \"IE >= 11\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist-multiple-env-as-string/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"script\"\n  },\n  \"rules\": {\n    \"no-unused-vars\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist-multiple-env-as-string/index.js",
    "content": "const a = {\n  prop1: '1',\n  prop2: '2',\n  prop3: '3'\n};\n\nconst {prop1, prop2, prop3} = a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-browserslist-multiple-env-as-string/package.json",
    "content": "{\n  \"name\": \"parcel-test-browser-browserslist\",\n  \"browserslist\": {\n    \"test\": \"chrome 68\",\n    \"production\": \"last 2 Chrome versions, IE >= 11\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js/babel.config.js",
    "content": "module.exports = {\n  \"plugins\": [[\"babel-plugin-dummy\", {\n    text: Date.now()\n  }]]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js/package.json",
    "content": "{\n  \"name\": \"some-project-with-babel\",\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js/src/index.js",
    "content": "module.exports = function() {\n  return \"REPLACE_ME\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js-multitarget/babel.config.js",
    "content": "module.exports = {\n  \"presets\": [\"@parcel/babel-preset-env\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js-multitarget/package.json",
    "content": "{\n  \"name\": \"some-project-with-babel\",\n  \"version\": \"1.0.0\",\n  \"modern\": \"dist/modern/index.js\",\n  \"legacy\": \"dist/legacy/index.js\",\n  \"targets\": {\n    \"modern\": {\n      \"engines\": {\n        \"browsers\": \"Chrome 60\"\n      }\n    },\n    \"legacy\": {\n      \"engines\": {\n        \"browsers\": \"ie 11\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js-multitarget/src/index.js",
    "content": "export default class Foo {\n  constructor(x) {\n    this.x;\n  }\n\n  getSquare() {\n    return this.x ** 2;\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js-multitarget-transform-runtime/babel.config.js",
    "content": "module.exports = {\n  \"presets\": [\"@parcel/babel-preset-env\"],\n  \"plugins\": [\"@babel/plugin-transform-object-rest-spread\", [\"@parcel/babel-plugin-transform-runtime\", {\"version\": \"^7.7.4\"}]]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js-multitarget-transform-runtime/package.json",
    "content": "{\n  \"name\": \"some-project-with-babel\",\n  \"version\": \"1.0.0\",\n  \"main\": \"dist/main.js\",\n  \"module\": \"dist/module.js\",\n  \"dependencies\": {\n    \"@parcel/babel-plugin-tranform-runtime\": \"^2.0.0\",\n    \"@babel/plugin-transform-object-rest-spread\": \"^7.22.11\",\n    \"@babel/plugin-transform-runtime\": \"^7.22.10\",\n    \"@babel/runtime\": \"^7.22.11\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js-multitarget-transform-runtime/src/index.js",
    "content": "\nexport function Bar(x) {\n  let a = {b: 6, ...x};\n  return a;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js-require/babel.config.js",
    "content": "module.exports = {\n  \"plugins\": [[require(\"babel-plugin-dummy\"), {\n    text: Date.now()\n  }]]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js-require/package.json",
    "content": "{\n  \"name\": \"some-project-with-babel\",\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-js-require/src/index.js",
    "content": "module.exports = function() {\n  return \"REPLACE_ME\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-json-custom/babel.config.json",
    "content": "{\n  \"plugins\": [\"babel-plugin-dummy\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-json-custom/index.js",
    "content": "module.exports = function() {\n  return \"REPLACE_ME\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-json-custom/package.json",
    "content": "{\n  \"name\": \"some-project-with-custom-babel-config\",\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/babel-plugin-dummy-1.js",
    "content": "module.exports = () => {\n  return {\n    visitor: {\n      StringLiteral(path, state) {\n        const opts = state.opts;\n\n        if (path.node.value === 'REPLACE_ME') {\n          path.node.value = 'string from a plugin in babel.config.json';\n        }\n      }\n    }\n  };\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/babel.config.json",
    "content": "{\n    \"plugins\": [\"./babel-plugin-dummy-1\"],\n    \"babelrcRoots\": [\".\", \"packages/*\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/package.json",
    "content": "{\n  \"name\": \"monorepo-babel-config\",\n  \"private\": true,\n  \"workspaces\": [\"pkg-a\", \"pkg-b\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/packages/pkg-a/.babelrc",
    "content": "{\n    \"plugins\": [\"./babel-plugin-dummy-2\"]\n}\n  "
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/packages/pkg-a/babel-plugin-dummy-2.js",
    "content": "module.exports = () => {\n  return {\n    visitor: {\n      StringLiteral(path, state) {\n        const opts = state.opts;\n\n        if (path.node.value === 'ANOTHER_THING_TO_REPLACE') {\n          path.node.value = 'string from a plugin in .babelrc';\n        }\n      }\n    }\n  };\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/packages/pkg-a/package.json",
    "content": "{\n  \"name\": \"pkg-a\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/packages/pkg-a/src/index.js",
    "content": "module.exports = function() {\n  const thing1 = \"REPLACE_ME\";\n  const thing2 = \"ANOTHER_THING_TO_REPLACE\"\n  const thing3 = \"SOMETHING ELSE\"\n  return thing1 + thing2 + thing3;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/packages/pkg-b/.babelrc",
    "content": "{\n    \"plugins\": [\"./babel-plugin-dummy-3\"]\n}\n  "
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/packages/pkg-b/babel-plugin-dummy-3.js",
    "content": "module.exports = () => {\n  return {\n    visitor: {\n      StringLiteral(path, state) {\n        const opts = state.opts;\n\n        if (path.node.value === 'ANOTHER_THING_TO_REPLACE') {\n          path.node.value = 'string from a plugin from a different sub-package';\n        }\n      }\n    }\n  };\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/packages/pkg-b/package.json",
    "content": "{\n  \"name\": \"pkg-b\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-config-monorepo/packages/pkg-b/src/index.js",
    "content": "module.exports = function() {\n  const thing1 = \"REPLACE_ME\";\n  const thing2 = \"ANOTHER_THING_TO_REPLACE\"\n  const thing3 = \"SOMETHING ELSE\"\n  return thing1 + thing2 + thing3;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-core-js/.eslintrc",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-core-js/index.js",
    "content": "import \"core-js\";\nexport async function Bar() {}\n\nglobalThis.foo = 'foo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-core-js/package.json",
    "content": "{\n  \"name\": \"parcel-test-babel-polyfill-browserslist\",\n  \"private\": true,\n  \"browserslist\": [\n    \"Chrome 70\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-custom/.babelrc",
    "content": "{\n  \"plugins\": [[\"babel-plugin-dummy\", {\"text\": \"hello\"}]]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-custom/index.js",
    "content": "class Test {\n  classProperty = 2;\n  #privateProperty;\n\n  constructor(text) {\n    this.#privateProperty = text;\n  }\n\n  get() {\n    return this.#privateProperty;\n  }\n}\n\nexport default new Test('REPLACE_ME').get();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-custom/jsx.js",
    "content": "export function Test() {\n  let text = 'REPLACE_ME';\n  return <div>{text}</div>;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-custom/package.json",
    "content": "{\n  \"dependencies\": {\n    \"react\": \"*\"\n  },\n  \"browserslist\": \">= 0.25%\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-custom/ts.ts",
    "content": "interface Hi {\n  test: string\n}\n\nclass Test {\n  classProperty = 2;\n  #privateProperty;\n\n  constructor(text) {\n    this.#privateProperty = text;\n  }\n\n  get() {\n    return this.#privateProperty;\n  }\n}\n\nexport default new Test('REPLACE_ME').get();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-custom/tsx.tsx",
    "content": "interface Hi {\n  test: string\n}\n\nexport function Test() {\n  let text = 'REPLACE_ME';\n  return <div>{text}</div>;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-default/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-default/foo.js",
    "content": "export default class Foo {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-default/index.js",
    "content": "import Foo from './foo';\n\nclass Bar {}\n\n// Make sure that scope hoisting retains these variables\noutput = {Foo, Bar};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-default/package.json",
    "content": "{\n  \"name\": \"parcel-test-browser-browserslist\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-env-name/.babelrc",
    "content": "{\n  \"env\": {\n    \"production\": {\n      \"presets\": [\"@babel/preset-env\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-env-name/index.js",
    "content": "class Foo {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-external-deps/.babelrc",
    "content": "{\n\t\"plugins\": [[\"./plugin.js\", { \"filenameMain\": \"main.txt\", \"filenameFallback\": \"fallback.txt\" }]]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-external-deps/fallback.txt",
    "content": "foo1\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-external-deps/index.js",
    "content": "console.log(REPLACE_ME);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-external-deps/package.json",
    "content": "{\n  \"name\": \"babel-external-deps\",\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-external-deps/plugin.js",
    "content": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nmodule.exports = function (api, { filenameMain, filenameFallback }) {\n  const { types: t } = api;\n\n  const filepathMain = path.join(__dirname, filenameMain);\n  const filepathFallback = path.join(__dirname, filenameFallback);\n  let contents;\n  api.addExternalDependency(filepathMain);\n  try {\n    contents = fs.readFileSync(filepathMain, \"utf8\");\n  } catch (e) {\n    api.addExternalDependency(filepathFallback);\n    contents = fs.readFileSync(filepathFallback, \"utf8\");\n  }\n  api.cache.never();\n\n  return {\n    visitor: {\n      Identifier(path) {\n        if (path.node.name === \"REPLACE_ME\") {\n          path.replaceWith(t.stringLiteral(contents));\n        }\n      },\n    },\n  };\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules/index.js",
    "content": "import Foo from 'foo';\n\nexport {Foo};\nexport class Bar {}\nexport const t = typeof Foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules/package.json",
    "content": "{\n  \"name\": \"parcel-test-browser-browserslist\",\n  \"private\": true,\n  \"browserslist\": [\"last 2 Chrome versions\", \"IE >= 11\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-browserslist/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-browserslist/index.js",
    "content": "import Foo from 'foo';\n\nexport {Foo};\nexport class Bar {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-browserslist/package.json",
    "content": "{\n  \"name\": \"parcel-test-browser-browserslist\",\n  \"browserslist\": [\"last 2 Chrome versions\", \"IE >= 11\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-jsx/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-jsx/index.js",
    "content": "import Foo from 'foo';\n\nexport {Foo};\nexport class Bar {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-jsx/package.json",
    "content": "{\n  \"name\": \"parcel-test-browser-browserslist\",\n  \"private\": true,\n  \"browserslist\": [\"last 2 Chrome versions\", \"IE >= 11\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-source/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-source/index.js",
    "content": "import Foo from 'foo';\n\nexport {Foo};\nexport class Bar {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-source/package.json",
    "content": "{\n  \"name\": \"parcel-test-browser-browserslist\",\n  \"browserslist\": [\"last 2 Chrome versions\", \"IE >= 11\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-source/packages/foo/index.js",
    "content": "export default class Foo {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-source/packages/foo/package.json",
    "content": "{\n  \"name\": \"foo\",\n  \"source\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-source-unlinked/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-source-unlinked/index.js",
    "content": "import Foo from 'foo';\n\nexport {Foo};\nexport class Bar {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-node-modules-source-unlinked/package.json",
    "content": "{\n  \"name\": \"parcel-test-browser-browserslist\",\n  \"browserslist\": [\"last 2 Chrome versions\", \"IE >= 11\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-optional-chaining/index.js",
    "content": "let a, x;\nexport default [a?.b, x?.()];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-optional-chaining/package.json",
    "content": "{\n  \"browserslist\": \"IE 11\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-plugin-autoinstall/.babelrc",
    "content": "{\n  \"plugins\": [\"@babel/proposal-class-properties\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-plugin-autoinstall/index.js",
    "content": "export default function () {\n  return 3;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-plugin-autoinstall/package.json",
    "content": "{\n  \"name\": \"babel-plugin-autoinstall\",\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-plugin-upgrade/.babelrc",
    "content": "{\n  \"plugins\": [\"babel-plugin-dummy\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-plugin-upgrade/index.js",
    "content": "module.exports = function() {\n  return \"REPLACE_ME\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-preset-env-shippedProposals/.babelrc",
    "content": "{\n  \"presets\": [\"@parcel/babel-preset-env\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-preset-env-shippedProposals/index.js",
    "content": "class Test {\n\trun() {\n\t\treturn this.#priv();\n\t}\n\n\t#priv() {\n\t\treturn 123;\n\t}\n}\n\nexport default new Test(\"hi from inside a private method\").run();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-preset-env-shippedProposals/package.json",
    "content": "{\n  \"browserslist\": \"IE 11\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-semver-engine/foo.js",
    "content": "export default class Foo {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-semver-engine/index.js",
    "content": "import Foo from './foo';\n\nexport {Foo};\nexport class Bar {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-semver-engine/package.json",
    "content": "{\n  \"name\": \"babel-semver-engine\",\n  \"legacy\": \"dist/legacy.js\",\n  \"modern\": \"dist/modern.js\",\n  \"targets\": {\n    \"legacy\": {\n      \"engines\": {\n        \"node\": \">= 0.12.0\",\n        \"foobar\": \"^99.0.0\"\n      }\n    },\n    \"modern\": {\n      \"engines\": {\n        \"node\": \">= 16.0.0\",\n        \"yarn\": \"^1.13.0\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-strip-flow-types/flow-typed-file.js",
    "content": "// @flow\nimport type { OptionsType } from 'Types';\n\nmodule.exports = function() {\n  return 'hello world'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-strip-flow-types/index.js",
    "content": "const flowModule = require('./flow-typed-file');\n\nmodule.exports = function() {\n  return flowModule();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-strip-flow-types/package.json",
    "content": "{\n  \"devDependencies\": {\n    \"flow-bin\": \"0.128.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-warn-all/.babelrc",
    "content": "{\n  \"presets\": [\"@babel/preset-env\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-warn-all/index.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-warn-some/.babelrc",
    "content": "{\n  \"presets\": [\"@parcel/babel-preset-env\"],\n  \"plugins\": [\"../babelrc-custom/babel-plugin-dummy\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-warn-some/index.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-warn-some-json5/.babelrc",
    "content": "{\n  presets: [\"@parcel/babel-preset-env\"],\n  \"plugins\": [\"../babelrc-custom/babel-plugin-dummy\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babel-warn-some-json5/index.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/babelrc-custom/.babelrc",
    "content": "{\n  \"plugins\": [\"./babel-plugin-dummy\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babelrc-custom/.yarnrc.yml",
    "content": "nodeLinker: node-modules\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babelrc-custom/babel-plugin-different.js",
    "content": "module.exports = () => {\n  return {\n    visitor: {\n      StringLiteral(path, state) {\n        const opts = state.opts;\n\n        if (path.node.value === 'REPLACE_ME') {\n          path.node.value = 'something different';\n        }\n      }\n    }\n  };\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babelrc-custom/babel-plugin-dummy.js",
    "content": "module.exports = () => {\n  return {\n    visitor: {\n      StringLiteral(path, state) {\n        const opts = state.opts;\n\n        if (path.node.value === 'REPLACE_ME') {\n          path.node.value = 'hello there';\n        }\n      }\n    }\n  };\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babelrc-custom/differentConfig",
    "content": "{\n  \"plugins\": [\"./babel-plugin-different\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babelrc-custom/index.js",
    "content": "module.exports = function() {\n  return \"REPLACE_ME\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/babelrc-custom/package.json",
    "content": "{\n  \"name\": \"some-project-with-custom-babel-config\",\n  \"version\": \"1.0.0\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/blob-url/.parcelrc",
    "content": "\n{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"blob-url:*\": [\"@parcel/transformer-inline\", \"...\"]\n  },\n  \"optimizers\": {\n    \"blob-url:*\": [\"...\", \"@parcel/optimizer-blob-url\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/blob-url/index.js",
    "content": "let worker = new Worker(new URL('blob-url:./worker', import.meta.url), {type: 'module'});\nworker.postMessage('test');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/blob-url/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/blob-url/test.txt",
    "content": "this should appear in the bundle\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/blob-url/worker.js",
    "content": "const fs = require('fs');\nconst path = require('path');\n\nself.postMessage(fs.readFileSync(path.join(__dirname, 'test.txt'), 'utf8'));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-naming/.invisible/index.js",
    "content": "import('./lib.js');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-naming/.invisible/lib.js",
    "content": "require('lodash');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/async.js",
    "content": "export default import('bundle-text:./text.scss');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  <script type=\"module\" src=\"./main.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/index.js",
    "content": "import cssText from 'bundle-text:./text.scss';\nexport default cssText;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/inline.html",
    "content": "<p>test</p>\n<script>console.log('hi')</script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/inline.js",
    "content": "import otherHTML from \"bundle-text:./inline.html\"\nexport default otherHTML;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/javascript.js",
    "content": "import jsText from 'bundle-text:./other.js';\noutput = jsText;\nexport default jsText;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/log.js",
    "content": "console.log('hi');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/main.js",
    "content": "import otherHTML from \"bundle-text:./other.html\"\nexport default otherHTML;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/other.html",
    "content": "<p>test</p>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/other.js",
    "content": "import './log';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundle-text/text.scss",
    "content": "$black: #000;\n\nbody {\n  background-color: $black;\n}\n\n.svg-img {\n  background-image: url('data-url:img.svg');\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundler-error-syntax-error/index.html",
    "content": "<!doctype html>\n<html>\n\n<head>\n</head>\n\n<body>\n    <h1>Hello world</h1>\n    <script src=\"./index.js\"></script>\n</body>\n\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundler-error-syntax-error/index.js",
    "content": ".invalid_js\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundler-middleware/index.js",
    "content": "var local = require('./local');\n\nmodule.exports = function () {\n  return local.a + local.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/bundler-middleware/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache/package.json",
    "content": "{\n  \"name\": \"parcel-cache-tests\",\n  \"version\": \"1.0.0\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache/src/entries/a.js",
    "content": "export let a = 'a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache/src/entries/b.js",
    "content": "export let b = 'b';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache/src/index.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <script type=\"module\" src=\"index.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache/src/index.js",
    "content": "import test from './nested/test';\nimport foo from 'foo';\n\nclass Result {\n  constructor(value) {\n    this.value = value;\n  }\n}\n\nmodule.exports = new Result(test + foo).value;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache/src/nested/test.js",
    "content": "import foo from 'foo';\n\n// Useless class to test babel\nclass Test {\n  constructor(value) {\n    this.value = value;\n  }\n}\n\nexport default new Test(foo).value;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache-add-dep-referenced/a.html",
    "content": "<!DOCTYPE html>\n<script type=\"module\" src=\"./a.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache-add-dep-referenced/a.js",
    "content": "call(\"a\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache-add-dep-referenced/b.html",
    "content": "<!DOCTYPE html>\n<script type=\"module\" src=\"./b.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache-add-dep-referenced/b.js",
    "content": "call(\"b\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache-add-dep-referenced/c.js",
    "content": "call(\"c\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cache-add-dep-referenced/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 0\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/child-bundle-different-types/index.html",
    "content": "<!-- First page -->\n<!doctype html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n</head>\n<body>\n  <div id=\"main\">\n    Hello World Main2\n  </div>\n  <div id=\"main1\">\n    Hello World Main1\n  </div>\n  <script type=\"module\" src=\"./main.js\"></script>\n  <a href=\"./other.html\">GOOO</a>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/child-bundle-different-types/index.js",
    "content": "var util = require('./util');\n\ndocument.getElementById(\"main\").innerHTML= util.hello();\n\ndocument.getElementById(\"main1\").innerHTML= util.b();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/child-bundle-different-types/main.js",
    "content": "var util = require('./util');\n\ndocument.getElementById(\"main\").innerHTML= util.hi();\n\ndocument.getElementById(\"main1\").innerHTML= util.b();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/child-bundle-different-types/other.html",
    "content": "<!-- First page -->\n<!doctype html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n\n</head>\n<body>\n  <div id=\"main\">\n    Heelo\n  </div>\n  <div id=\"main1\">\n    Heelo\n  </div>\n  <script type=\"module\" src=\"./index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/child-bundle-different-types/other.js",
    "content": "module.exports = {\n  hello: () => \"HELLO\",\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/child-bundle-different-types/util.js",
    "content": "var test = require('./other');\n\nmodule.exports = {\n  hi: () => \"Hi\",\n  hello: () => \"HELLO\",\n  b: () => test.hello()\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/circular/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/circular/about.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>Document</title>\n  <script src=\"./about.js\"></script>\n</head>\n<body>\n  On About\n\n  <a href=\"./index.html\">Home</a>\n  <a href=\"./about.html\">About</a>\n  <a href=\"./test.html\">Test</a>\n\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/circular/about.js",
    "content": "// eslint-disable-next-line no-unused-vars\nimport index from './index';\n\nexport default function () {\n  index();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/circular/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>Document</title>\n  <script src=\"./index.js\"></script>\n</head>\n<body>\n  On Home\n\n  <a href=\"./index.html\">Home</a>\n  <a href=\"./about.html\">About</a>\n  <a href=\"./test.html\">Test</a>\n\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/circular/index.js",
    "content": "// eslint-disable-next-line no-unused-vars\nimport about from './about';\n\nexport default function () {\n  about();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/circular/test.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>Document</title>\n</head>\n<body>\n  Test\n\n  <a href=\"./index.html\">Home</a>\n  <a href=\"./about.html\">About</a>\n  <a href=\"./test.html\">Test</a>\n\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/coffee/index.js",
    "content": "var local = require('./local.coffee');\n\nmodule.exports = function () {\n  return local.a + local.b.c;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/coffee/local.coffee",
    "content": "module.exports =\n  a: 1\n  b:\n    c: 2\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs/index.js",
    "content": "var local = require('./local');\n// eslint-disable-next-line no-unused-vars\nvar url = require('url');\n\nmodule.exports = function () {\n  return local.a + local.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs-import-url/index.js",
    "content": "import x from \"url:./x.txt\";\n\nmodule.exports = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs-import-url/package.json",
    "content": "{\n  \"engines\": {\n    \"node\": \">=10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs-import-url/x.txt",
    "content": "HELLO!"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs-template-literal-interpolation/index.js",
    "content": "const fn = 'add';\n\nmodule.exports = function (a, b) {\n  const add = require(`lodash/${fn}`);\n\n  return add(a, b);\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs-template-literal-interpolation/package.json",
    "content": "{\n  \"name\": \"commonjs-require\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"targets\": {\n    \"main\": {\n      \"context\": \"node\"\n    }\n  },\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs-template-literal-plain/index.js",
    "content": "const _ = require(`lodash`);\n\nmodule.exports = function (a, b) {\n  return _.add(a, b);\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs-template-literal-plain/package.json",
    "content": "{\n  \"name\": \"commonjs-require\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"targets\": {\n    \"main\": {\n      \"context\": \"node\"\n    }\n  },\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs-with-symlinks/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/commonjs-with-symlinks/src/index.js",
    "content": "var local = require('./symlinked_local');\n\nmodule.exports = function () {\n  return local.a + local.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/compressors/.parcelrc",
    "content": "{\n  \"extends\": [\"@parcel/config-default\"],\n  \"compressors\": {\n    \"*\": [\"...\", \"@parcel/compressor-gzip\", \"@parcel/compressor-brotli\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/compressors/index.js",
    "content": "import _ from 'lodash';\nconsole.log(_);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/compressors-disable-default/.parcelrc",
    "content": "{\n  \"extends\": [\"@parcel/config-default\"],\n  \"compressors\": {\n    \"*\": [\"@parcel/compressor-brotli\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/compressors-disable-default/index.js",
    "content": "import _ from 'lodash';\nconsole.log(_);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/config-merging/.parcelrc",
    "content": "{\n  \"extends\": [\"@parcel/config-default\", \"parcel-config-test1\", \"parcel-config-test2\"]\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/config-merging/index.js",
    "content": "import text from './test.custom-ext';\n\nexport default text;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/config-merging/package.json",
    "content": "{\n  \"name\": \"commonjs-bundle-require\",\n  \"version\": \"1.2.3\",\n  \"main\": \"dist/index.js\",\n  \"engines\": {\n    \"node\": \"8\"\n  },\n  \"dependencies\": {\n    \"parcel-transformer-string\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/config-merging/test.custom-ext",
    "content": "Hello world!"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css/c.css",
    "content": ".c {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css/c.js",
    "content": "require('./c.css');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css/index.css",
    "content": ".index {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css/index.js",
    "content": "var local = require('./local');\nrequire('./index.css');\n\nmodule.exports = function () {\n  return local.a + local.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css/local.css",
    "content": ".local {\n  color: green;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css/local.js",
    "content": "require('./c.js');\nrequire('./local.css');\n\nexports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-exports/index.css",
    "content": "@import 'npm:foo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-exports/package.json",
    "content": "{\n  \"@parcel/resolver-default\": {\n    \"packageExports\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-external/a.css",
    "content": "@import 'b.css';\n@import 'http://example.com/external.css';\n\n.a {\n  color: green;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-external/b.css",
    "content": ".b {\n  color: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-import/index.css",
    "content": "@import './other.css' print;\n\n.index {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-import/index.js",
    "content": "require('./index.css');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-import/local.css",
    "content": ".local {\n  color: teal;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-import/other.css",
    "content": "@import './local.css';\n\n.other {\n  color: green;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-invalid-import/index.css",
    "content": "@import './thisdoesnotexist.css';\n\n.index {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-invalid-import/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-layer/a.css",
    "content": "@import \"b.css\" layer(b);\n\n.a {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-layer/b.css",
    "content": "@import \"c.css\" layer(c);\n\n.b {\n  color: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-layer/c.css",
    "content": ".c {\n  color: yellow;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-css-siblings/a.module.css",
    "content": ".myClass {\n\tcolor: blue;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-css-siblings/b.module.css",
    "content": ".myOtherClass {\n\tcolor: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-css-siblings/global.css",
    "content": "body {\n\tfont-size: 10px;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-css-siblings/index.html",
    "content": "<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<script type=\"module\" src=\"./main.js\"></script>\n\t\t<link rel=\"stylesheet\" href=\"./global.css\" />\n\t</head>\n\t<body></body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-css-siblings/main.js",
    "content": "// Adopted from https://github.com/nartallax/parcel-css-bug\n// To address https://github.com/parcel-bundler/parcel/issues/8716\nimport * as aCss from \"./a.module.css\"\nimport * as bCss from \"./b.module.css\"\n\nsideEffect(['mainJs', aCss.myClass, bCss.myOtherClass]);"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-self-references/a/index.js",
    "content": "import foo from '../bar.module.css';\n\nconsole.log('a', foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-self-references/a/package.json",
    "content": "{\n  \"main\": \"dist/main.js\",\n  \"module\": \"dist/module.js\",\n  \"source\": \"index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-self-references/b/index.js",
    "content": "import foo from '../bar.module.css';\n\nconsole.log('b', foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-self-references/b/package.json",
    "content": "{\n  \"main\": \"dist/main.js\",\n  \"module\": \"dist/module.js\",\n  \"source\": \"index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-module-self-references/bar.module.css",
    "content": ".foo {\n  composes: composed;\n  color: white;\n}\n\n.composed {\n  background: pink;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-bug/package.json",
    "content": "{\n\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-bug/src/button.module.css",
    "content": ".buttonPrimary {\n  align-self: center;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-bug/src/index.html",
    "content": "<!DOCTYPE html>\n\n<html lang=\"en\">\n  <script src=\"main.js\" type=\"module\"></script>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-bug/src/main.js",
    "content": "import * as main from \"./main.module.css\";\nimport * as other from \"./other.module.css\";\n\nconsole.log([main.main, other.other]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-bug/src/main.module.css",
    "content": ".main {\n  composes: buttonPrimary from \"./button.module.css\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-bug/src/other.module.css",
    "content": ".other {\n  composes: buttonPrimary from \"./button.module.css\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-global/a/index.css",
    "content": ".foo {\n  color: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-global/a/index.js",
    "content": "var foo = require('./index.css');\nrequire('test/index.css');\n\noutput = foo.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-global/a/package.json",
    "content": "{\n  \"@parcel/transformer-css\": {\n    \"cssModules\": true\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-global/b/index.css",
    "content": ".foo {\n  color: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-global/b/index.js",
    "content": "var foo = require('./index.css');\nrequire('test/index.css');\n\noutput = foo.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-global/b/package.json",
    "content": "{\n  \"@parcel/transformer-css\": {\n    \"cssModules\": {\n      \"global\": true\n    }\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-import/a.module.css",
    "content": ".a {\n  color: red;\n}\n\n.foo {\n  background: green;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-import/b.module.css",
    "content": ".b {\n  color: purple;\n}\n\n.foo {\n  font-family: Helvetica;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-import/index.module.css",
    "content": "@import \"./a.module.css\";\n@import \"./b.module.css\";\n\n.foo {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-import/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 0\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-import/page1.html",
    "content": "<script type=\"module\" src=\"page1.js\"></script>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-import/page1.js",
    "content": "import * as foo from './index.module.css';\n\nsideEffect(['page1', foo.a]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-import/page2.html",
    "content": "<script type=\"module\" src=\"page2.js\"></script>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-import/page2.js",
    "content": "import * as foo from './index.module.css';\n\nsideEffect(['page2', foo.foo]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-keyframes/index.js",
    "content": "var foo = require('./index.module.css');\n\nmodule.exports = function () {\n  return foo.foo;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-keyframes/index.module.css",
    "content": ".foo {\n  animation: test 200ms;\n}\n\n@keyframes test {\n  from {\n    color: red;\n  }\n\n  to {\n    color: green;\n  }\n}\n\n@keyframes unused {\n  from {\n    color: green;\n  }\n\n  to {\n    color: blue;\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-legacy/b.js",
    "content": "const style = require('./b.module.css');\nmodule.exports = style;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-legacy/b.module.css",
    "content": ":export {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-legacy/index.js",
    "content": "const style = require('./index.module.css');\nconsole.log(style.foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-legacy/index.module.css",
    "content": "@value test: red;\n\n.foo {\n  color: test;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-merging-siblings/index.css",
    "content": "body {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-merging-siblings/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Placeholder</title>\n    <link rel=\"stylesheet\" href=\"index.css\" />\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"index.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-merging-siblings/index.tsx",
    "content": "// Adopted from reproduction here\n// https://github.com/parcel-bundler/parcel/issues/8716\nimport * as styles from \"./outer.module.css\";\n\nsideEffect(['mainJs', styles.container]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-merging-siblings/inner.module.css",
    "content": ".-expand {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-merging-siblings/outer.module.css",
    "content": ".container {\n  composes: -expand from \"./inner.module.css\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-style/index.html",
    "content": "<!DOCTYPE html>\n<style>\n.index {\n  color: red;\n}\n</style>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-style/package.json",
    "content": "{\n  \"private\": true,\n  \"@parcel/transformer-css\": {\n    \"cssModules\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-targets/foo.module.css",
    "content": ".foo {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-targets/index.html",
    "content": "<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-targets/index.js",
    "content": "import * as foo from './foo.module.css';\n\nmodule.exports = function () {\n  return foo.foo;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-targets/package.json",
    "content": "{\n  \"browserslist\": \"IE >= 11\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-vars/index.js",
    "content": "var foo = require('./index.module.css');\nvar vars = require('./vars.module.css');\n\noutput = [foo.foo, vars['--from-js']];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-vars/index.module.css",
    "content": ".foo {\n  color: var(--color from \"./vars.module.css\");\n  width: var(--theme-sizes-1\\/12 from \"./vars.module.css\");\n  height: var(--height from global);\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-vars/package.json",
    "content": "{\n  \"@parcel/transformer-css\": {\n    \"cssModules\": {\n      \"dashedIdents\": true\n    }\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-modules-vars/vars.module.css",
    "content": ":root {\n  --color: red;\n  --font: Helvetica;\n  --theme-sizes-1\\/12: 2;\n  --from-js: purple;\n  --unused: green;\n}\n\nbody {\n  font: var(--font);\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-nesting/a.css",
    "content": ".foo {\n  color: red;\n\n  &.bar {\n    color: blue;\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-nesting/package.json",
    "content": "{\n  \"@parcel/transformer-css\": {\n    \"drafts\": {\n      \"nesting\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-node-modules/index.css",
    "content": "@import 'npm:foo/foo.css';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-order/a.css",
    "content": "@import \"./b.css\";\n@import \"./e.css\";\n\n.a {\n  background: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-order/b.css",
    "content": "@import \"./c.css\";\n@import \"./d.css\";\n\n.b {\n  background: green;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-order/c.css",
    "content": ".c {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-order/d.css",
    "content": ".d {\n  background: purple;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-order/e.css",
    "content": ".e {\n  background: magenta;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-url/index.css",
    "content": "@font-face {\n  font-family: \"Test\";\n  src: url(\"./fonts/test.woff2\") format(\"woff2\");\n}\n\n.index {\n  background: url(\"http://google.com\");\n}\n\n.quotes {\n  background: url(\"data:image/gif;base64,quotes\");\n}\n\n.no-quote {\n  background: url(data:image/gif;base64,no-quote);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-url/index.js",
    "content": "require('./index.css');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-url-behavior/index.css",
    "content": ".index {\n  behavior: url(#default#VML);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-url-custom-property/index.css",
    "content": ".foo {\n  --test: url(foo.png);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-url-quote/index.css",
    "content": ".quotes {\n  background-image: url('data:image/svg+xml;utf8,with quote \" and escape \\\\');\n  width: 100px;\n  height: 100px;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-url-quote/index.js",
    "content": "require('./index.css');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-url-relative/src/a/style1.css",
    "content": "body {\n    background-image: url('../foo.png');\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/css-url-relative/src/b/style2.css",
    "content": "body {\n    color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cssnano/index.css",
    "content": ".index {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cssnano/index.js",
    "content": "var local = require('./local');\nrequire('./index.css');\n\nmodule.exports = function () {\n  return local.a + local.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cssnano/local.css",
    "content": ".local {\n  color: green;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/cssnano/local.js",
    "content": "require('./local.css');\n\nexports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/custom-configs/.parcelrc-build-metrics",
    "content": "{\n  \"extends\": [\"@parcel/config-default\"],\n  \"reporters\": [\n    \"@parcel/reporter-build-metrics\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/custom-configs/.parcelrc-dev-server",
    "content": "{\n  \"extends\": [\"@parcel/config-default\"],\n  \"reporters\": [\n    '@parcel/reporter-dev-server'\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/custom-configs/.parcelrc-eslint",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"validators\": {\n    \"*.{js,jsx,ts,tsx}\": [\"@parcel/validator-eslint\"]\n  },\n  \"reporters\": []\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/custom-configs/.parcelrc-json-reporter",
    "content": "{\n  \"extends\": [\"@parcel/config-default\"],\n  \"reporters\": [\n    \"@parcel/reporter-json\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/custom-configs/.parcelrc-svg-react",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.svg\": [\"...\", \"@parcel/transformer-svg-jsx\"]\n  },\n  \"reporters\": []\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/custom-configs/.parcelrc-typescript-validation",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"validators\": {\n    \"*.{ts,tsx}\": [\"@parcel/validator-typescript\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/data-url/binary.css",
    "content": ".webp-img {\n  background-image: url('data-url:parcel.webp')\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/data-url/binary.js",
    "content": "import webp from 'data-url:./parcel.webp';\nexport default webp;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/data-url/index.html",
    "content": "<img src=\"data-url:./img.svg\" />\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/data-url/text.css",
    "content": ".svg-img {\n  background-image: url('data-url:img.svg');\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/data-url/text.js",
    "content": "import svg from 'data-url:./img.svg';\nexport default svg;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/decorators/index.ts",
    "content": "function first() {\n  output(\"first(): factory evaluated\");\n  return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n    output(\"first(): called\");\n  };\n}\n\nfunction second() {\n  output(\"second(): factory evaluated\");\n  return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n    output(\"second(): called\");\n  };\n}\n\nclass ExampleClass {\n  @first()\n  @second()\n  method() {}\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/decorators/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/decorators-useDefineForClassFields/index.ts",
    "content": "class LoggerClass {\n  @logger()\n  foo = 5;\n}\n\nfunction logger() {\n  return function (proto, originalKey) {\n    const privateKey = `__${originalKey}`;\n    Object.defineProperty(proto, originalKey, {\n      get() {\n        output(`${originalKey} ${this[privateKey]}`);\n        return this[privateKey];\n      },\n      set(value) {\n        this[privateKey] = 10 + value;\n      },\n    });\n  };\n}\n\nconst instance = new LoggerClass();\ninstance.foo;\ninstance.foo = 6;\ninstance.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/decorators-useDefineForClassFields/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true,\n    \"useDefineForClassFields\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/deduplicate-from-async-cyclic-bundle-entry/async.js",
    "content": "export default import('./foo').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/deduplicate-from-async-cyclic-bundle-entry/bar.js",
    "content": "import foo from './foo';\n\nexport default 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/deduplicate-from-async-cyclic-bundle-entry/foo.js",
    "content": "import bar from './bar';\n\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/deduplicate-from-async-cyclic-bundle-entry/index.js",
    "content": "import bar from './bar';\n\nexport default [bar, import('./async').then(mod => mod.default)];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/define-amd/index.js",
    "content": "if (typeof define === 'function' && define.amd) {\n  define(function () {\n    return 4;\n  });\n} else if (typeof module === 'object') {\n  module.exports = 2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dependency-prior-transform/.babelrc",
    "content": "{\n  \"plugins\": [\"./insert-dependency\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dependency-prior-transform/foo.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dependency-prior-transform/index.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/dependency-prior-transform/insert-dependency.js",
    "content": "module.exports = function insertEnv(babel) {\n  const importFoo = babel.template(\"import foo from './foo';\");\n\n  return {\n    visitor: {\n      Program(path) {\n        path.node.body.unshift(importFoo());\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/diagnostic-sourcemap/index.js",
    "content": "// @flow\n\ntype Test = {|\n  foo: string\n|};\n\nlet test: Test = {\n\tfoo: 'hi'\n};\n\nimport foo from 'foo';\n\nconsole.log(test);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/diagnostic-sourcemap/index.scss",
    "content": "$foo: red;\n\n.foo {\n  color: $foo;\n  background: url(x.png);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/diagnostic-sourcemap/package.json",
    "content": "{\n  \"devDependencies\": {\n    \"flow-bin\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/differing-bundle-urls/bar/entry/entry-a.js",
    "content": "import(\"../../common\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/differing-bundle-urls/common/index.js",
    "content": "sideEffect(\"common\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/differing-bundle-urls/foo/entry-b.js",
    "content": "import(\"./one/deep.js\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/differing-bundle-urls/foo/one/deep.js",
    "content": "sideEffect(\"deep\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/differing-bundle-urls/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dont-autoinstall-if-env-var-is-false/index.js",
    "content": "const _ = require('lodash');\nmodule.exports = function() {\n  return 'hello world';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dont-autoinstall-if-env-var-is-false/package.json",
    "content": "{\n  \"name\": \"dont-autoinstall-if-env-var-is-false\",\n  \"dependencies\": {}\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dont-autoinstall-resolve-alias-fails/index.js",
    "content": "const vue = require('aliasVue/thisDoesNotExist');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dont-autoinstall-resolve-alias-fails/package.json",
    "content": "{\n  \"name\": \"alias-install\",\n  \"private\": true,\n  \"alias\": {\n    \"aliasVue\": \"vue\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dont-autoinstall-resolve-fails/index.js",
    "content": "const thisWontwork = require('vue/thisDoesNotExist');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dotfile-bundle/index.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dotfile-bundle/package.json",
    "content": "{\n\t\"main\": \".output.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic/index.js",
    "content": "var local = import('./local');\n\nmodule.exports = function () {\n  return local.then(function (l) {\n    return l.a + l.b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-large/a.js",
    "content": "var c = require('./common');\n\nexports.a = 1;\nexports.b = c;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-large/b.js",
    "content": "var c = require('./common');\n\nmodule.exports = c + 2;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-large/c.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-large/common.js",
    "content": "require('./c');\n\nmodule.exports = require('lodash').add(1, 1);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-large/index.js",
    "content": "var c = require('./c');\nvar a = import('./a');\nvar b = import('./b');\n\nmodule.exports = function () {\n  return Promise.all([a, b]).then(function ([a, b]) {\n    return a.a + a.b + b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-large/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-small/a.js",
    "content": "var c = require('./common');\n\nexports.a = 1;\nexports.b = c;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-small/b.js",
    "content": "var c = require('./common');\n\nmodule.exports = c + 2;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-small/common-dep.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-small/common.js",
    "content": "module.exports = require('./common-dep');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-common-small/index.js",
    "content": "var a = import('./a');\nvar b = import('./b');\n\nmodule.exports = function () {\n  return Promise.all([a, b]).then(function ([a, b]) {\n    return a.a + a.b + b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-css/index.css",
    "content": ".index {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-css/index.js",
    "content": "var local = import('./local');\nrequire('./index.css');\n\nmodule.exports = function () {\n  return local.then(function (l) {\n    return l.a + l.b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-css/local.css",
    "content": ".local {\n  color: green;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-css/local.js",
    "content": "require('./local.css');\n\nexports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-electron-main/index.js",
    "content": "var local = import('./local');\n\nmodule.exports = function () {\n  return local.then(function (l) {\n    return l.a + l.b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-electron-main/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-electron-main/package.json",
    "content": "{\n  \"name\": \"dynamic-electron-main\",\n  \"private\": true,\n  \"targets\": {\n    \"default\": {\n      \"context\": \"electron-main\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-electron-renderer/index.js",
    "content": "var local = import('./local');\n\nmodule.exports = function () {\n  return local.then(function (l) {\n    return l.a + l.b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-electron-renderer/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-electron-renderer/package.json",
    "content": "{\n  \"name\": \"dynamic-electron-renderer\",\n  \"private\": true,\n  \"targets\": {\n    \"default\": {\n      \"context\": \"electron-renderer\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-esm/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  },\n  \"globals\": {\n    \"import\": true\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-esm/index.js",
    "content": "var local = import('./local');\n\nexport default function () {\n  return local.then(function (l) {\n    return l.a + l.b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-esm/local.js",
    "content": "export const a = 1;\nexport const b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-external/index.js",
    "content": "const lodash = import('https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min.js');\n\nexport default function () {\n  return lodash.then(() => _);\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-deep/1.js",
    "content": "export default {};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-deep/a.js",
    "content": "export {default} from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-deep/b.js",
    "content": "export {default} from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-deep/c.js",
    "content": "export default import('./1');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-deep/index.js",
    "content": "export default Promise.all([\n  import('./a'),\n  import('./b')\n]).then(([a, b]) => {\n  return Promise.all([a.default, b.default])\n}).then(([v1, v2]) => {\n  return v1.default === v2.default;\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-dup/a.js",
    "content": "var c = require('./common');\n\nexports.a = 1;\nexports.b = c;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-dup/common.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-dup/index.js",
    "content": "var common = require('./common');\nvar a = import('./a');\n\nmodule.exports = function () {\n  return a.then(function (a) {\n    return common + a.a + a.b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe/a.js",
    "content": "import './common';\nimport('./c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe/b.js",
    "content": "import('./c');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe/c.js",
    "content": "import './common';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe/common.js",
    "content": "export default {};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe-ancestry/a.js",
    "content": "import common from './common';\n\nexport default import('./c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe-ancestry/b.js",
    "content": "export default import('./c').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe-ancestry/c.js",
    "content": "export default import('./d').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe-ancestry/common.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe-ancestry/d.js",
    "content": "import common from './common';\n\nexport default common;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-hoist-no-dedupe-ancestry/index.js",
    "content": "if (Date.now () < 0) {\n  import('./a');\n}\n\nexport default import('./b').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-import-attributes/.babelrc",
    "content": "{\n  \"plugins\": [\n    [\"@babel/plugin-syntax-module-attributes\", {\"version\": \"may-2020\"}]\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-import-attributes/async.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-import-attributes/async2.js",
    "content": "export default 43;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-import-attributes/index.js",
    "content": "export default Promise.all([\n  import('./async', {foo: {}}),\n  import('./async2', {foo: {}, assert: {type: 'js'}}),\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-imports-high-prio/async.js",
    "content": "export default {};"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-imports-high-prio/index.js",
    "content": "export default import('./async').then(() => document.head.children);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-node/index.js",
    "content": "var local = import('./local');\n\nmodule.exports = function () {\n  return local.then(function (l) {\n    return l.a + l.b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-node/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-node/package.json",
    "content": "{\n  \"name\": \"dynamic-node\",\n  \"private\": true,\n  \"engines\": {\n    \"node\": \"8\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-references-raw/index.js",
    "content": "var local = import('./local');\n\nmodule.exports = function () {\n  return local.then(function (l) {\n    return l.a + l.b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-references-raw/local.js",
    "content": "import raw from 'url:./test.txt';\n\nexports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-references-raw/test.txt",
    "content": "raw file\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch/.babelrc",
    "content": "{\n  \"plugins\": [\n    [\"@babel/plugin-syntax-module-attributes\", {\"version\": \"may-2020\"}]\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch/async.js",
    "content": "function neverCalled() {\n  import('./prefetched', {prefetch: true});\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch/index.js",
    "content": "export default import('./async').then(() => document.head.children);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch/prefetched.css",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch/prefetched.js",
    "content": "import './prefetched.css';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch-loaded/.babelrc",
    "content": "{\n  \"plugins\": [\n    [\"@babel/plugin-syntax-module-attributes\", {\"version\": \"may-2020\"}]\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch-loaded/async.js",
    "content": "const loadDependency = async function () {\n  return await import('./prefetched-loaded', {prefetch: true});\n}\n\nexport default loadDependency;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch-loaded/index.js",
    "content": "export default import('./async').then(\n  (dependency) => { \n    return {\n      children: document.head.children,\n      loadDependency: dependency.default\n    }    \n  }\n);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch-loaded/prefetched-loaded.css",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-prefetch-loaded/prefetched-loaded.js",
    "content": "import './prefetched-loaded.css';\n\nexport default 'foo';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-preload/.babelrc",
    "content": "{\n  \"plugins\": [\n    [\"@babel/plugin-syntax-module-attributes\", {\"version\": \"may-2020\"}]\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-preload/async.js",
    "content": "function neverCalled() {\n  import('./preloaded', {preload: true});\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-preload/index.js",
    "content": "export default import('./async').then(() => document.head.children);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-preload/preloaded.css",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-static-preload/preloaded.js",
    "content": "import './preloaded.css';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-subdirectory/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/dynamic-subdirectory/subdirectory/index.js",
    "content": "var local = import('../local');\n\nmodule.exports = function () {\n  return local.then(function (l) {\n    return l.a + l.b;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm/elm.json",
    "content": "{\n    \"type\": \"application\",\n    \"source-directories\": [\n        \"src\"\n    ],\n    \"elm-version\": \"0.19.1\",\n    \"dependencies\": {\n        \"direct\": {\n            \"elm/browser\": \"1.0.2\",\n            \"elm/core\": \"1.0.5\",\n            \"elm/html\": \"1.0.0\"\n        },\n        \"indirect\": {\n            \"elm/json\": \"1.1.3\",\n            \"elm/time\": \"1.0.0\",\n            \"elm/url\": \"1.0.0\",\n            \"elm/virtual-dom\": \"1.0.2\"\n        }\n    },\n    \"test-dependencies\": {\n        \"direct\": {},\n        \"indirect\": {}\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm/index.js",
    "content": "var local = require('./src/Main.elm');\n\nmodule.exports = function () {\n    return local;\n};"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm/src/Main.elm",
    "content": "module Main exposing (main)\n\nimport Browser\nimport Html exposing (Html, button, div, text)\nimport Html.Events exposing (onClick)\n\n\ntype alias Model =\n    { count : Int }\n\n\ninitialModel : Model\ninitialModel =\n    { count = 0 }\n\n\ntype Msg\n    = Increment\n    | Decrement\n\n\nupdate : Msg -> Model -> Model\nupdate msg model =\n    case msg of\n        Increment ->\n            { model | count = model.count + 1 }\n\n        Decrement ->\n            { model | count = model.count - 1 }\n\n\nview : Model -> Html Msg\nview model =\n    div []\n        [ button [ onClick Increment ] [ text \"+1\" ]\n        , div [] [ text <| String.fromInt model.count ]\n        , button [ onClick Decrement ] [ text \"-1\" ]\n        ]\n\n\nmain : Program () Model Msg\nmain =\n    Browser.sandbox\n        { init = initialModel\n        , view = view\n        , update = update\n        }\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-compile-error/elm.json",
    "content": "{\n    \"type\": \"application\",\n    \"source-directories\": [\n        \"src\"\n    ],\n    \"elm-version\": \"0.19.1\",\n    \"dependencies\": {\n        \"direct\": {\n            \"elm/browser\": \"1.0.1\",\n            \"elm/core\": \"1.0.2\",\n            \"elm/html\": \"1.0.0\"\n        },\n        \"indirect\": {\n            \"elm/json\": \"1.1.3\",\n            \"elm/time\": \"1.0.0\",\n            \"elm/url\": \"1.0.0\",\n            \"elm/virtual-dom\": \"1.0.2\"\n        }\n    },\n    \"test-dependencies\": {\n        \"direct\": {},\n        \"indirect\": {}\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-compile-error/index.js",
    "content": "var local = require('./src/Main.elm');\n\nmodule.exports = function () {\n    return local;\n};"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-compile-error/src/Main.elm",
    "content": "module Main exposing (main)\n\nimport Html\n\n\nmain =\n    Html.text 5 \"Hello, world!\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-dep-error/elm.json",
    "content": "{\n    \"type\": \"application\",\n    \"source-directories\": [\n        \"src\"\n    ],\n    \"elm-version\": \"0.19.0\",\n    \"dependencies\": {\n        \"direct\": {\n            \"elm/browser\": \"1.0.1\",\n            \"elm/core\": \"1.0.2\",\n            \"elm/html\": \"1.0.0\"\n        },\n        \"indirect\": {\n            \"elm/json\": \"1.1.3\",\n            \"elm/time\": \"1.0.0\",\n            \"elm/url\": \"1.0.0\",\n            \"elm/virtual-dom\": \"1.0.2\"\n        }\n    },\n    \"test-dependencies\": {\n        \"direct\": {},\n        \"indirect\": {}\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-dep-error/index.js",
    "content": "var local = require('./src/Main.elm');\n\nmodule.exports = function () {\n    return local;\n};"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-dep-error/src/BrokenDep.elm",
    "content": "module BrokenDep exposing (anError)\n\n{- This module causes a compiler error -}\n\n\nanError : String\nanError =\n    2\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-dep-error/src/Main.elm",
    "content": "module Main exposing (main)\n\nimport Html\n\n\nmain =\n    Html.text \"Hello, world!\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-multiple-apps/elm.json",
    "content": "{\n    \"type\": \"application\",\n    \"source-directories\": [\n        \"src\"\n    ],\n    \"elm-version\": \"0.19.1\",\n    \"dependencies\": {\n        \"direct\": {\n            \"elm/browser\": \"1.0.2\",\n            \"elm/core\": \"1.0.5\",\n            \"elm/html\": \"1.0.0\"\n        },\n        \"indirect\": {\n            \"elm/json\": \"1.1.3\",\n            \"elm/time\": \"1.0.0\",\n            \"elm/url\": \"1.0.0\",\n            \"elm/virtual-dom\": \"1.0.2\"\n        }\n    },\n    \"test-dependencies\": {\n        \"direct\": {},\n        \"indirect\": {}\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-multiple-apps/package.json",
    "content": "{\n  \"@parcel/transformer-elm\": {\n    \"extraSources\": {\n      \"./src/Main.elm\": [\n        \"./src/MainB.elm\",\n        \"./src/MainC.elm\"\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-multiple-apps/src/Main.elm",
    "content": "module Main exposing (main)\n\nimport Html\n\n\nmain =\n    Html.text \"Hello, world!\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-multiple-apps/src/MainB.elm",
    "content": "module MainB exposing (main)\n\nimport Html\n\n\nmain =\n    Html.text \"Hello, world!\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-multiple-apps/src/MainC.elm",
    "content": "module MainC exposing (main)\n\nimport Html\n\n\nmain =\n    Html.text \"Hello, world!\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/elm-multiple-apps/src/index.js",
    "content": "import { Elm } from './Main.elm?with=MainB.elm&with=MainC.elm';\n\nexport default function() {\n  return Elm;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/encodedURI/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Parcel encoded-URI testing</title>\n  </head>\n  <body>\n    <H1>Parcel encoded-URI testing</H1>\n\t<img alt=\"日本語\" src=\"%e6%97%a5%e6%9c%ac%e8%aa%9e.jpg\" />\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/entry-point/index.js",
    "content": "function test() {\n  return 'Test!';\n}\n\nmodule.exports = test;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/entry-point/test.html",
    "content": "<html>\n<script src=\"dist/index.js\"></script>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env/index.js",
    "content": "module.exports = function () {\n  return process.env.NODE_ENV + test(process.env.NODE_ENV);\n};\n\nfunction test(str) {\n  return ':' + str;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-binary-in-expression/index.js",
    "content": "const existVar = 'ABC' in process.env ? 'correct' : 'incorrect';\nconst notExistVar = 'DEF' in process.env ? 'incorrect' : 'correct';\n\nmodule.exports = {\n  existVar,\n  notExistVar,\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-computed/index.js",
    "content": "let name = \"ABC\";\nmodule.exports = process.env[name];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-computed-string/index.js",
    "content": "module.exports = process.env[\"ABC\"];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-destructuring/assign.js",
    "content": "let test = 'test';\nlet env, NODE_ENV, renamed, computed, fallback, rest, result;\nenv = process.env;\nresult = ({NODE_ENV, TEST: renamed, [test]: computed, fallback = 'yo', ...rest} = process.env);\nmodule.exports = {\n  env,\n  NODE_ENV,\n  renamed,\n  computed,\n  fallback,\n  rest,\n  result,\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-destructuring/index.js",
    "content": "let test = 'test';\nlet env = process.env;\nlet {NODE_ENV, TEST: renamed, [test]: computed, fallback = 'yo', ...rest} = process.env, other = 'hi';\nmodule.exports = {\n  env,\n  NODE_ENV,\n  renamed,\n  computed,\n  fallback,\n  rest,\n  other\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-disabled/index.js",
    "content": "const external = require(\"foo\");\n\nmodule.exports = function () {\n  return process.env.FOOBAR + test(process.env.FOOBAR) + test(external);\n};\n\nfunction test(str) {\n  return ':' + str;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-disabled/package.json",
    "content": "{\n  \"@parcel/transformer-js\": {\n    \"inlineEnvironment\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-disabled-glob/index.js",
    "content": "module.exports = function () {\n  return process.env.A_1 + \":\" + process.env.B_1 + \":\" + process.env.B_2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-disabled-glob/package.json",
    "content": "{\n  \"@parcel/transformer-js\": {\n    \"inlineEnvironment\": [\"B_*\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-file/index.js",
    "content": "module.exports = process.env.FOO + process.env.BAR;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-file-with-package-source/index.js",
    "content": "module.exports = process.env.FOO + process.env.BAR;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-file-with-package-source/package.json",
    "content": "{\n    \"name\": \"env-file-with-package-source\",\n    \"source\": \"index.js\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-hasOwnProperty/index.js",
    "content": "module.exports = process.env.hasOwnProperty(\"abc\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-mutate/index.js",
    "content": "process.env.SOMETHING = \"foo\";\nprocess.env.SOMETHING += \"foo\";\ndelete process.env.SOMETHING;\nprocess.env.SOMETHING++;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-mutate/warn.js",
    "content": "import 'foo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-node/index.js",
    "content": "module.exports = function () {\n  return process.env.NODE_ENV + test(process.env.NODE_ENV);\n};\n\nfunction test(str) {\n  return ':' + str;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-node/package.json",
    "content": "{\n  \"name\": \"env-node\",\n  \"engines\": {\n    \"node\": \"8\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-node-replacements/data/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-node-replacements/index.js",
    "content": "const fs = require('fs');\nconst path = require('path');\nconst otherFunction = require('./other/function')\nconst subFunction = require('./sub/index')\n\nmodule.exports = function () {\n  const data = fs.readFileSync(path.join(__dirname, 'data', 'test.txt'), 'utf8')\n  const firstDirnameTest = path.join(__dirname, 'data')\n  const secondDirnameTest = path.join(__dirname, 'other-data')\n  const firstFilenameTest = __filename\n  const secondFilenameTest = `${__filename}?query-string=test`\n  const other = otherFunction()\n  const sub = subFunction()\n\n  return {\n    data,\n    firstDirnameTest,\n    secondDirnameTest,\n    firstFilenameTest,\n    secondFilenameTest,\n    other,\n    sub,\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-node-replacements/other/function.js",
    "content": "const fs = require('fs');\nconst path = require('path');\n\nmodule.exports = function () {\n  return fs.readFileSync(path.join(__dirname, '..', 'data', 'test.txt'), 'utf8')\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-node-replacements/package.json",
    "content": "{\n  \"name\": \"env-node-replacements\",\n  \"engines\": {\n    \"node\": \">=14\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-node-replacements/sub/index.js",
    "content": "module.exports = function () {\n  return {\n    dirname: __dirname,\n    filename: __filename\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-nodeenv/index.js",
    "content": "module.exports = function () {\n  return process.env.NODE_ENV + \":\" + process.env.FOO;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-nodeenv/package.json",
    "content": "{\n  \"@parcel/transformer-js\": {\n    \"inlineEnvironment\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-prior-transform/.babelrc",
    "content": "{\n  \"plugins\": [\"./insert-env\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-prior-transform/index.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-prior-transform/insert-env.js",
    "content": "module.exports = function insertEnv(babel) {\n  const exportFoo = babel.template('module.exports = process.env.NODE_ENV;', {syntacticPlaceholders: true});\n\n  return {\n    visitor: {\n      Program(path) {\n        path.node.body.push(exportFoo());\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-unused-require/index.js",
    "content": "module.exports = function () {\n  if(process.env.ABC === 'a') {\n    return require(\"./unused.js\");\n  } else {\n    return \"ok\";\n  }\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/env-unused-require/unused.js",
    "content": "module.exports = \"unused\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/es6/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/es6/index.js",
    "content": "import * as local from './local';\n// eslint-disable-next-line no-unused-vars\nimport url from 'url';\n\nexport default function () {\n  return local.a + local.b;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/es6/local.js",
    "content": "export let a = 1;\nexport let b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/es6-default-only/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/es6-default-only/index.js",
    "content": "const a = 1;\nconst b = 2;\n\nexport default () => a + b;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/es6-default-only/local.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/eslint-error/.eslintrc.json",
    "content": "{\n  \"root\": true,\n  \"parserOptions\": {\n    \"ecmaVersion\": 2018\n  },\n  \"rules\": {\n    \"no-console\": \"error\",\n    \"no-unused-vars\": \"warn\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/eslint-error/index.js",
    "content": "module.exports = function hello() {\n  console.log('Say hello world...');\n\n  let hey = '';\n\n  return 'hello';\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/eslint-parse-error/.eslintrc.json",
    "content": "{\n  \"root\": true,\n  \"rules\": {\n    \"no-console\": \"error\",\n    \"no-unused-vars\": \"warn\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/eslint-parse-error/index.js",
    "content": "module.exports = function hello() {\n  console.log('Say hello world...');\n\n  let hey = '';\n\n  return 'hello';\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/falsy-dep/index.js",
    "content": "if (false) {\n  require('if-false-optional-dep');\n}\n\nif (false) {\n  globalStuff(() =>\n    require('if-false-optional-dep-deep')\n  );\n}\n\nif ('') {\n  require('if-falsy-optional-dep');\n}\n\nif (process.env.NODE_ENV === 'test') {\n  require('./true-consequent');\n} else {\n  require('./false-alternate');\n}\n\nif (process.env.NODE_ENV !== 'test') {\n  require('./false-consequent');\n} else {\n  require('./true-alternate');\n}\n\nif (typeof require === \"function\") {\n  require('./true-consequent');\n} else {\n  require('./false-alternate');\n}\n\nif (typeof exports === \"object\") {\n  require('./true-consequent');\n} else {\n  require('./false-alternate');\n}\n\nif (typeof module === \"object\") {\n  require('./true-consequent');\n} else {\n  require('./false-alternate');\n}\n\nmodule.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/falsy-dep/true-alternate.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/falsy-dep/true-consequent.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/cjs-type-module/index.js",
    "content": "import {noop} from 'lodash';\n\nnoop();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/cjs-type-module/package.json",
    "content": "{\n  \"name\": \"cjs-type-module\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"main\": \"dist/index.cjs\",\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs/b.js",
    "content": "exports.foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs/exports.js",
    "content": "var b = require('./b');\n\nexports.bar = b.foo + 3;\nexports.foo = b.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs/module-exports.js",
    "content": "var b = require('./b');\n\nmodule.exports = b.foo + 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs/package.json",
    "content": "{\n  \"name\": \"commonjs\",\n  \"private\": true,\n  \"main\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-async/async.js",
    "content": "export const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-async/index.js",
    "content": "module.exports = import('./async').then(a => a.foo + 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-async/package.json",
    "content": "{\n  \"name\": \"commonjs-async\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"targets\": {\n    \"main\": {\n      \"context\": \"node\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-destructuring-browsers/multiple.js",
    "content": "import {add, subtract} from 'lodash';\n\nexport const bar = subtract(add(1, 2), 1);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-destructuring-browsers/package.json",
    "content": "{\n  \"name\": \"commonjs-destructuring-browsers\",\n  \"private\": true,\n  \"browser\": \"dist/index.js\",\n  \"browserslist\": [\">= 0.25%\"],\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-destructuring-browsers/single.js",
    "content": "import {add} from 'lodash';\n\nexport const bar = add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-destructuring-node/multiple.js",
    "content": "import {add, subtract} from 'lodash';\n\nexport const bar = subtract(add(1, 2), 1);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-destructuring-node/package.json",
    "content": "{\n  \"name\": \"commonjs-destructuring-node\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"engines\": {\n    \"node\": \">= 4.x\"\n  },\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-destructuring-node/single-same.js",
    "content": "import { assign as a } from \"lodash/fp\";\nimport { assign as b } from \"lodash\";\n\nexport const bar = a !== b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-destructuring-node/single.js",
    "content": "import {add} from 'lodash';\n\nexport const bar = add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-dynamic/index.js",
    "content": "Object.assign(exports, require('./other'));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-dynamic/other.js",
    "content": "function test() {\n  return 2;\n}\n\nexports.test = test;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-dynamic/package.json",
    "content": "{\n  \"name\": \"commonjs-dynamic\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-entry-re-export/a.js",
    "content": "export * from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-entry-re-export/b.js",
    "content": "exports.foo = \"foo\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-entry-re-export/package.json",
    "content": "{\n  \"name\": \"commonjs-entry-re-export\",\n  \"private\": true,\n  \"main\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-esm/index.js",
    "content": "const _ = require('lodash');\n\nmodule.exports = function (a, b) {\n  return _.add(a, b);\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-esm/package.json",
    "content": "{\n  \"name\": \"commonjs-esm\",\n  \"private\": true,\n  \"module\": \"dist/index.js\",\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-esm/re-assign.js",
    "content": "for (let v of [\"a\", \"b\", \"c\"]) {\n\tmodule.exports[v] = v;\n}\n\nmodule.exports = \"xyz\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-esm/require-resolve.js",
    "content": "const lodash = require.resolve(\"lodash\");\n\nmodule.exports = function f() {\n    return lodash;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-esm/universal-library.js",
    "content": "!(function (name, definition) {\n  if (typeof module != \"undefined\") {\n    module.exports = definition();\n  } else if (typeof define == \"function\" && typeof define.amd == \"object\") {\n    define(definition);\n  } else {\n    this[name] = definition();\n  }\n})(\"some-pkg-name\", function () {\n  return { a: 2 };\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-esm-entry-re-export/a.js",
    "content": "export * from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-esm-entry-re-export/b.js",
    "content": "exports.default = \"default\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-esm-entry-re-export/package.json",
    "content": "{\n  \"name\": \"commonjs-entry-re-export\",\n  \"private\": true,\n  \"module\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-external/default-new.js",
    "content": "import Foo from \"test\";\n\nnew Foo();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-external/default.js",
    "content": "import _ from 'lodash';\n\nexport const bar = _.add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-external/multiple.js",
    "content": "import _, {add} from 'lodash';\nimport * as lodash from 'lodash';\n\nlet _add = 'add';\nexport const bar = _.add(add(1, 2), lodash[_add](1, 2));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-external/named-same.js",
    "content": "import { assign as a } from \"lodash/fp\";\nimport { assign as b } from \"lodash\";\n\nexport const bar = a !== b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-external/named.js",
    "content": "import {add} from 'lodash';\n\nexport const bar = add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-external/namespace.js",
    "content": "import * as _ from 'lodash';\n\nconst add = 'add';\nexport const bar = _[add](1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-external/package.json",
    "content": "{\n  \"name\": \"commonjs-external\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"engines\": {\n    \"node\": \">= 10.x\"\n  },\n  \"dependencies\": {\n    \"lodash\": \"*\",\n    \"test\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-external/require.js",
    "content": "var _ = require('lodash');\n\nexports.bar = _.add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-helpers/index.js",
    "content": "class X {\n  x = new Map()\n}\n\noutput(new X());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-helpers/package.json",
    "content": "{\n  \"main\": \"dist/main.js\",\n  \"browserslist\": \"Chrome 70\",\n  \"dependencies\": {\n    \"@swc/helpers\": \"^0.5.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-live-externals/a.js",
    "content": "const external = require('external');\n\noutput(external.foo);\nexternal.setFoo(2);\noutput(external.foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-live-externals/package.json",
    "content": "{\n  \"main\": \"dist/test.js\",\n  \"targets\": {\n  \t\"main\": {\n      \"includeNodeModules\": false\n    }\n  },\n  \"dependencies\": {\n    \"external\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-require/index.js",
    "content": "const _ = require('lodash');\n\nmodule.exports = function (a, b) {\n  return _.add(a, b);\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-require/package.json",
    "content": "{\n  \"name\": \"commonjs-require\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"targets\": {\n    \"main\": {\n      \"context\": \"node\"\n    }\n  },\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-siblings/a.css",
    "content": ".foo {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-siblings/a.js",
    "content": "import './a.css';\n\nexports.foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-siblings/package.json",
    "content": "{\n  \"name\": \"esm-siblings\",\n  \"private\": true,\n  \"main\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-sideeffects/index.js",
    "content": "export * from './middle';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-sideeffects/middle.js",
    "content": "export * from './other';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-sideeffects/missing-export.js",
    "content": "export { a as x } from \"./other.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-sideeffects/other.js",
    "content": "export function test() {\n  return 2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-sideeffects/package.json",
    "content": "{\n  \"name\": \"commonjs-sideeffects\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-split/async1.js",
    "content": "import _ from 'lodash';\nimport react from 'react';\n\nconsole.log('async1');\nconsole.log(_);\nconsole.log(react);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-split/async2.js",
    "content": "import _ from 'lodash';\nimport react from 'react';\n\nconsole.log('async2');\nconsole.log(_);\nconsole.log(react);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-split/index.js",
    "content": "import('./async1');\nimport('./async2');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-split/package.json",
    "content": "{\n  \"name\": \"commonjs-split\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"targets\": {\n    \"main\": {\n      \"includeNodeModules\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-split-reexport-default/async1.js",
    "content": "import { lorem } from \"./shared\";\n\nexport default lorem;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-split-reexport-default/async2.js",
    "content": "import { lorem } from \"./shared\";\n\nexport default lorem;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-split-reexport-default/index.js",
    "content": "module.exports = Promise.all([import('./async1'), import('./async2')]).then(\n  ([a, b]) => a.default.length + b.default.length,\n);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-split-reexport-default/package.json",
    "content": "{\n  \"name\": \"commonjs-split-reexport-default\",\n  \"private\": true,\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-split-reexport-default/shared.js",
    "content": "export const lorem = `\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.\n\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\n\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.\n\nAt vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.\n\nConsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.\n\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.\n\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\n\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.\n\nAt vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.\n\nConsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.\n\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.\n\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\n\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.\n\nAt vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.\n\nConsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.\n\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.\n\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\n\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.\n\nAt vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.\n\nConsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.\n\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.\n\nUt wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.\n\nNam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.\n\nDuis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.\n\nAt vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.\n\nConsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.\n\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-wrap-codesplit/a.js",
    "content": "if (Date.now() < 0) {\n\tlet x = require(\"./c.js\");\n}\n\nmodule.exports = import(\"./b.js\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-wrap-codesplit/b.js",
    "content": "const x = require(\"./c.js\");\n\nmodule.exports = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-wrap-codesplit/c.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/commonjs-wrap-codesplit/package.json",
    "content": "{\n  \"name\": \"commonjs-split\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"engines\": {\n    \"node\": \">=8\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/conflict-global/index.js",
    "content": "const Foo = 2;\nfoo([...(new Map([['a', 10]]))]);\nexport { Foo as Map };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/conflict-global/package.json",
    "content": "{\n  \"name\": \"conflict-global\",\n  \"private\": true,\n  \"module\": \"dist/esm.js\",\n  \"main\": \"dist/cjs.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/b.js",
    "content": "export const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/default-function.js",
    "content": "import {foo} from './b';\n\nexport default function test() {\n  return foo;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/default-value.js",
    "content": "import {foo} from './b';\n\nexport default foo + 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/missing-export.js",
    "content": "export { a as x } from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/multiple-times.js",
    "content": "export const test = 1, foo = 2;\nexport default test;\nexport { test as other };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/multiple.js",
    "content": "var a = 2, b = 3, c = a + b;\nexport {a, c};\nexport default b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/named.js",
    "content": "import {foo} from './b';\n\nexport const bar = foo + 3;\nexport {foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/package.json",
    "content": "{\n  \"name\": \"esm\",\n  \"private\": true,\n  \"module\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/re-export-namespace-as.js",
    "content": "export * as ns from './multiple';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/re-export-rename.js",
    "content": "export {default as foo} from './default-value';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm/re-export.js",
    "content": "export * from './multiple';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async/async.js",
    "content": "export const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async/index.js",
    "content": "export default import('./async').then(a => a.foo + 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async/package.json",
    "content": "{\n  \"name\": \"commonjs-async\",\n  \"private\": true,\n  \"module\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport/index.js",
    "content": "import { createAndFireEvent } from \"./library/b.js\";\nvar createAndFireEventOnAtlaskit = createAndFireEvent(\"index\");\noutput = import(\"./library/a.js\")\n    .then((m) => m.c.then(c => [createAndFireEventOnAtlaskit(), m.default(), c.c, c.createAndFireEvent(\"c\")()]));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport/library/a.js",
    "content": "import { createAndFireEvent } from \"./b.js\";\nvar createAndFireEventOnAtlaskit = createAndFireEvent(\"a\");\nexport default () => createAndFireEventOnAtlaskit();\nexport const a = 1;\nexport const c = import(\"./c.js\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport/library/b.js",
    "content": "export { default as createAndFireEvent } from './createAndFireEvent.js';\nexport const b = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport/library/c.js",
    "content": "export { createAndFireEvent } from \"./b.js\";\nexport const c = 32;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport/library/createAndFireEvent.js",
    "content": "export default function (name) {\n\treturn () => name;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport/package.json",
    "content": "{\n  \"name\": \"esm-async-chained-reexport\",\n  \"private\": true,\n  \"module\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport2/index.js",
    "content": "import { createAndFireEvent } from \"./library/b.js\";\nvar createAndFireEventOnAtlaskit = createAndFireEvent(\"index\");\n\nexport default import(\"./library/a.js\").then((m) => [createAndFireEventOnAtlaskit(), m.default(), m.a]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport2/library/a.js",
    "content": "import { createAndFireEvent } from \"./b.js\";\nvar createAndFireEventOnAtlaskit = createAndFireEvent(\"a\");\nexport default () => createAndFireEventOnAtlaskit();\nexport const a = 1;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport2/library/b.js",
    "content": "export { default as createAndFireEvent } from './createAndFireEvent';\nexport const b = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport2/library/createAndFireEvent.js",
    "content": "export default function (name) {\n\treturn () => name;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport2/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-async-chained-reexport2/package.json",
    "content": "{\n  \"name\": \"esm-async-chained-reexport\",\n  \"private\": true,\n  \"module\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser/async.js",
    "content": "export const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>HTML Example</title>\n    <script type=\"module\" src=\"./index.js\"></script>\n  </head>\n  <body>\n    <h1>Hello world</h1>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser/index.js",
    "content": "output = import('./async').then(a => a.foo + 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser/package.json",
    "content": "{\n  \"name\": \"esm-browser\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-css/async.css",
    "content": ".foo {\n  color: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-css/async.js",
    "content": "import './async.css';\nexport const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-css/index.css",
    "content": ".foo {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-css/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>HTML Example</title>\n    <script type=\"module\" src=\"./index.js\"></script>\n  </head>\n  <body>\n    <h1>Hello world</h1>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-css/index.js",
    "content": "import './index.css';\noutput = import('./async').then(a => a.foo + 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-css/package.json",
    "content": "{\n  \"name\": \"esm-browser\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-split-bundle/async1.js",
    "content": "import _ from 'lodash';\nimport react from 'react';\n\nconsole.log('async1');\nconsole.log(_);\nconsole.log(react);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-split-bundle/async2.js",
    "content": "import _ from 'lodash';\nimport react from 'react';\n\nconsole.log('async2');\nconsole.log(_);\nconsole.log(react);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-split-bundle/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>HTML Example</title>\n    <script type=\"module\" src=\"./index.js\"></script>\n  </head>\n  <body>\n    <h1>Hello world</h1>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-split-bundle/index.js",
    "content": "import('./async1');\nimport('./async2');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-browser-split-bundle/package.json",
    "content": "{\n  \"name\": \"esm-browser\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-bundle-import-reexport/i18n/T.js",
    "content": "export default function T(children) {\n\treturn `!!!${children}!!!`;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-bundle-import-reexport/i18n/index.js",
    "content": "export { default as T } from \"./T.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-bundle-import-reexport/index.js",
    "content": "import {T} from './i18n/index.js';\n\nconst version = import('./version.js');\n\nexport default version.then((v) => [T('index'), 'Diagram' + v.default()]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-bundle-import-reexport/package.json",
    "content": "{\n  \"name\": \"esm-bundle-import-reexport\",\n  \"private\": true,\n  \"module\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-bundle-import-reexport/version.js",
    "content": "import {T} from \"./i18n/index.js\";\n\nexport default function() {\n\treturn \"Version: \" + T(\"some name\");\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-cjs/a.js",
    "content": "exports.test = true;\nexports['foo-bar'] = true;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-cjs/package.json",
    "content": "{\n  \"module\": \"dist/test.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-commonjs/a.js",
    "content": "import {foo} from './b';\n\nexport const bar = foo + 3;\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-commonjs/b.js",
    "content": "export const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-commonjs/multiple-times.js",
    "content": "export const test = 1, foo = 2;\nexport default test;\nexport { test as other };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-commonjs/package.json",
    "content": "{\n  \"name\": \"esm-commonjs\",\n  \"private\": true,\n  \"main\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-commonjs/re-export-namespace-as.js",
    "content": "export * as ns from './a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-commonjs/re-export-rename.js",
    "content": "export {foo as default} from './b';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-commonjs-isLibrary-false/other.js",
    "content": "export const foo = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-commonjs-isLibrary-false/package.json",
    "content": "{\n  \"targets\": {\n    \"default\": {\n      \"outputFormat\": \"commonjs\"\n    }\n  },\n  \"sideEffects\": [\n    \"skipped.js\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-commonjs-isLibrary-false/skipped.js",
    "content": "export {foo} from \"./other.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-conflict/a.js",
    "content": "import {foo as bar} from 'foo';\n\nexport const foo = bar + 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-conflict/package.json",
    "content": "{\n  \"name\": \"esm-conflict\",\n  \"private\": true,\n  \"module\": \"dist/index.js\",\n  \"dependencies\": {\n    \"foo\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-export-shadow/a.mjs",
    "content": "function fibonacci(fib) {\n  if (fib <= 1) return 1;\n  return fibonacci(fib - 1) + fibonacci(fib - 2);\n}\n\nexport {fibonacci as fib};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-export-shadow/package.json",
    "content": "{\n  \"module\": \"dist/module.js\",\n  \"targets\": {\n    \"module\": {\n      \"includeNodeModules\": false\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/child.js",
    "content": "export {add} from 'lodash';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/default.js",
    "content": "import _ from 'lodash';\n\nexport const bar = _.add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/export.js",
    "content": "import {add} from 'lodash';\n\nexport {add};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/multiple.js",
    "content": "import _, {add} from 'lodash';\nimport * as lodash from 'lodash';\n\nexport const bar = _.add(add(1, 2), lodash['ad'+'d'](1, 2));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/named-same.js",
    "content": "import { assign as a } from \"lodash/fp\";\nimport { assign as b } from \"lodash\";\n\nexport const bar = a !== b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/named.js",
    "content": "import {add} from 'lodash';\n\nexport const bar = add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/namespace.js",
    "content": "import * as _ from 'lodash';\n\nexport const bar = _['ad'+'d'](1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/package.json",
    "content": "{\n  \"name\": \"esm-external\",\n  \"private\": true,\n  \"module\": \"dist/index.js\",\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">= 10.x\"\n  },\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/re-export-child.js",
    "content": "export {add} from './child';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-external/re-export.js",
    "content": "export {add} from 'lodash';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-filename-import/index.js",
    "content": "import path from \"path\";\n\nexport const foo = __filename;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-filename-import/package.json",
    "content": "{\n  \"name\": \"esm-filename-import\",\n  \"private\": true,\n  \"main\": \"dist/index.js\",\n  \"engines\": {\n    \"node\": \">=10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-import-shadow/a.mjs",
    "content": "import * as React from 'b';\n\nconst Context = React.createContext('Hello');\n\nexport function createContext() {\n  function useContext() {\n    const context = React.useContext(Context);\n    return context + ' World';\n  }\n  return [useContext];\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-import-shadow/package.json",
    "content": "{\n  \"module\": \"dist/a.js\",\n  \"targets\": {\n    \"module\": {\n      \"includeNodeModules\": false\n    }\n  },\n  \"dependencies\": {\n    \"b\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-interop-cross-bundle/a.js",
    "content": "import x from \"./c.js\";\n\nexport default import(\"./b.js\").then((v) => [v.default, x]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-interop-cross-bundle/b.js",
    "content": "import x from \"./c.js\";\n\nexport default x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-interop-cross-bundle/c.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true,\n});\n\nexports.default = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-interop-cross-bundle/package.json",
    "content": "{\n  \"name\": \"esm-interop-cross-bundle\",\n  \"private\": true,\n  \"module\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-isLibrary-false/other.js",
    "content": "export const foo = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-isLibrary-false/package.json",
    "content": "{\n  \"targets\": {\n    \"default\": {\n      \"outputFormat\": \"esmodule\"\n    }\n  },\n  \"sideEffects\": [\n    \"skipped.js\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-isLibrary-false/skipped.js",
    "content": "export {foo} from \"./other.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-mjs/index.js",
    "content": "import {noop} from 'lodash';\n\nnoop();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-mjs/package.json",
    "content": "{\n  \"name\": \"esm-mjs\",\n  \"private\": true,\n  \"main\": \"dist/index.mjs\",\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-siblings/a.css",
    "content": ".foo {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-siblings/a.js",
    "content": "import './a.css';\n\nexport const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-siblings/package.json",
    "content": "{\n  \"name\": \"esm-siblings\",\n  \"private\": true,\n  \"module\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-sideeffects/b.js",
    "content": "export const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-sideeffects/missing-export.js",
    "content": "export { a as x } from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-sideeffects/package.json",
    "content": "{\n  \"name\": \"esm-sideffects\",\n  \"private\": true,\n  \"module\": \"dist/index.js\",\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-split/async1.js",
    "content": "import _ from 'lodash';\nimport react from 'react';\n\nexport default ['async1', _, react];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-split/async2.js",
    "content": "import _ from 'lodash';\nimport react from 'react';\n\nexport default ['async2', _, react];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-split/index.js",
    "content": "export default Promise.all([import('./async1'), import('./async2')]).then(\n\t([{default: [a, b, c]}, {default: [x, y, z]}]) =>\n\t\ta === 'async1' && x === 'async2' && b === y && c === z,\n);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-split/package.json",
    "content": "{\n  \"name\": \"commonjs-split\",\n  \"private\": true,\n  \"module\": \"dist/index.js\",\n  \"targets\": {\n    \"module\": {\n      \"includeNodeModules\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-split-worker/async.js",
    "content": "import { add } from \"lodash\";\n\nexport default `async-${add(1, 2)}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-split-worker/index.html",
    "content": "<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-split-worker/index.js",
    "content": "new Worker(new URL(\"./main-worker\", import.meta.url), {type: \"module\"});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-split-worker/main-worker.js",
    "content": "import a from \"./sync.js\";\nconsole.log(a);\n\nimport(\"./async\").then(v => console.log(v.default));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-split-worker/sync.js",
    "content": "import { add } from \"lodash\";\n\nexport default `sync-${add(1, 2)}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-type-module/index.js",
    "content": "import {noop} from 'lodash';\n\nnoop();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-type-module/package.json",
    "content": "{\n  \"name\": \"esm-type-module\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"main\": \"dist/index.js\",\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-wrap-codesplit/a.js",
    "content": "if (Date.now() < 0) {\n\tlet x = require(\"./c.js\");\n}\n\nexport default import(\"./b.js\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-wrap-codesplit/b.js",
    "content": "const x = require(\"./c.js\");\n\nmodule.exports = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-wrap-codesplit/c.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/esm-wrap-codesplit/package.json",
    "content": "{\n  \"name\": \"esm\",\n  \"private\": true,\n  \"module\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-external/index.js",
    "content": "import { add } from \"lodash\";\n\noutput = add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-external/package.json",
    "content": "{\n    \"targets\": {\n        \"default\": {\n            \"includeNodeModules\": false\n        }\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-split-worker/index.html",
    "content": "<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-split-worker/index.js",
    "content": "import {add} from \"lodash\";\n\noutput = add(1, 2);\n\nnew Worker(new URL(\"./worker\", import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-split-worker/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-split-worker/worker.js",
    "content": "import {add} from \"lodash\";\n\noutput = add(10, 20);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-split-worker-async/async.js",
    "content": "import { add } from \"lodash\";\n\nexport default `async-${add(1, 2)}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-split-worker-async/index.html",
    "content": "<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-split-worker-async/index.js",
    "content": "new Worker(new URL(\"./main-worker\", import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-split-worker-async/main-worker.js",
    "content": "import a from \"./sync.js\";\n\nimport(\"./async\").then(v => {\n    output(a + v.default);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/formats/global-split-worker-async/sync.js",
    "content": "import { add } from \"lodash\";\n\nexport default `sync-${add(1, 2)}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs/index.js",
    "content": "var fs = require('fs');\nmodule.exports = fs.readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-alias/index.js",
    "content": "var readFileSync = require('fs').readFileSync;\nmodule.exports = readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-alias/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-assign/index.js",
    "content": "var fs;\nfs = require('fs');\nmodule.exports = fs.readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-assign/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-assign-alias/index.js",
    "content": "var readFileSync;\nreadFileSync = require('fs');\nmodule.exports = readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-assign-alias/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-buffer/index.js",
    "content": "var fs = require('fs');\nmodule.exports = fs.readFileSync(__dirname + '/test.txt');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-buffer/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-destructure/index.js",
    "content": "var {readFileSync, ...fs} = require('fs');\nmodule.exports = readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-destructure/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-destructure-assign/.browserslistrc",
    "content": "last 2 Chrome versions\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-destructure-assign/index.js",
    "content": "var readFileSync;\n({readFileSync} = require('fs'));\nmodule.exports = readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-destructure-assign/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-disabled/index.js",
    "content": "var fs = require('fs');\nmodule.exports = fs.readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-disabled/package.json",
    "content": "{\n  \"@parcel/transformer-js\": {\n    \"inlineFS\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-disabled/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-file-non-evaluable/index.js",
    "content": "module.exports = require('fs').readFileSync(Date.now())\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-file-non-evaluable-template-env/index.js",
    "content": "module.exports = require('fs').readFileSync(`/${Date.now()}`)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-file-non-evaluable-template-env/package.json",
    "content": "{\n    \"browserslist\": \"IE 11\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-import/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-import/index.js",
    "content": "import fs from 'fs';\nexport default fs.readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-import/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-import-path-join/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-import-path-join/index.js",
    "content": "import fs from 'fs';\nimport path from 'path';\nexport default fs.readFileSync(path.join(__dirname, '/test.txt'), 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-import-path-join/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-inline/index.js",
    "content": "module.exports = require('fs').readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-inline/test.txt",
    "content": "hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-node/index.js",
    "content": "var fs = require('fs');\nmodule.exports = fs.readFileSync(__dirname + '/test.txt', 'utf8');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-node/package.json",
    "content": "{\n  \"name\": \"fs-node\",\n  \"engines\": {\n    \"node\": \"6\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-options-non-evaluable/index.js",
    "content": "const dir = __dirname\n\nmodule.exports = require('fs').readFileSync(dir + '/test.txt', {\n  encoding: (typeof Date.now()).replace(/number/, 'utf-8')\n})\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/fs-outside-root/index.js",
    "content": "var fs = require('fs');\n\nfs.readFileSync(__dirname + '/../../../package.json', 'utf8')\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob/dir/a.js",
    "content": "module.exports = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob/dir/b.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob/index.js",
    "content": "var vars = require('./dir/*.js');\n\nmodule.exports = function () {\n  return vars.a + vars.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-absolute/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-absolute/dir/a.js",
    "content": "module.exports = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-absolute/dir/b.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-absolute/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-absolute/packages/child/index.js",
    "content": "const rootVars = require('/dir/*.js');\n\nmodule.exports = rootVars.a + rootVars.b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-absolute/packages/child/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-async/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-async/dir/a.js",
    "content": "module.exports = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-async/dir/b.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-async/index.js",
    "content": "var vars = import('./dir/*.js');\n\nmodule.exports = async function () {\n  return await vars.a() + await vars.b();\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-css/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-css/dir/local.css",
    "content": ".local {\n  color: teal;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-css/dir/other.css",
    "content": "@import './local.css';\n\n.other {\n  color: green;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-css/index.css",
    "content": "@import './dir/*.css';\n\n.index {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-css/index.js",
    "content": "require('./index.css');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-deep/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-deep/dir/a.js",
    "content": "module.exports = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-deep/dir/b.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-deep/dir/x/c.js",
    "content": "module.exports = 3;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-deep/dir/x/y/z.js",
    "content": "module.exports = 7;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-deep/index.js",
    "content": "var vars = require('./dir/**/*.js');\n\nmodule.exports = function () {\n  return vars.a + vars.b + vars.x.c + vars.x.y.z;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-error/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-error/index.css",
    "content": ".index {\n  background: url(images/*.jpg);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-error/index.html",
    "content": "<script src=\"foo/*.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-package/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-package/index.js",
    "content": "const scoped = require('@scope/pkg/foo/*.js');\nconst unscoped = require('pkg/bar/*.js');\n\nmodule.exports = function () {\n    return scoped.a + scoped.b + unscoped.x + unscoped.y;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-package-async/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-package-async/index.js",
    "content": "const scoped = import('@scope/pkg/foo/*.js');\nconst unscoped = import('pkg/bar/*.js');\n\nmodule.exports = async function () {\n    return await scoped.a() + await scoped.b() + await unscoped.x() + await unscoped.y();\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-pipeline/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-pipeline/dir/a.txt",
    "content": "a\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-pipeline/dir/b.txt",
    "content": "b\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-pipeline/index.js",
    "content": "var vars = require('url:./dir/*.txt');\nmodule.exports = vars;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-tilde/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"@parcel/resolver-glob\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-tilde/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-tilde/packages/child/dir/a.js",
    "content": "module.exports = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-tilde/packages/child/dir/b.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-tilde/packages/child/index.js",
    "content": "const childVars = require('~/dir/*.js');\n\nmodule.exports = childVars.a + childVars.b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glob-tilde/packages/child/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/global-alias/index.js",
    "content": "import React from 'react';\n\nmodule.exports = React.createElement('div');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/global-alias/package.json",
    "content": "{\n  \"main\": \"dist/index.js\",\n  \"alias\": {\n    \"react\": { \"global\": \"React\" }\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/global-redeclare/index.js",
    "content": "const global = {};\nmodule.exports = function () {\n  return !!global.document;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/global-redeclare/package.json",
    "content": "{\n  \"name\": \"parcel-test-global-redeclare\",\n  \"private\": true,\n  \"browserslist\": [\"last 2 Chrome versions\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/globals/index.js",
    "content": "module.exports = function () {\n  return {\n    dir: __dirname,\n    file: __filename,\n    buf: Buffer.from(process.title).toString('base64'),\n    global: !!global.document\n  };\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/globals/multiple.js",
    "content": "const getGlobals = require('./index.js');\n\noutput = {\n  file: __filename,\n  other: getGlobals().file\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/globals/scope-hoisting.js",
    "content": "output = require('./');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/globals-module-specifier/a.js",
    "content": "import { process } from \"./b.js\";\n\nmodule.exports = process;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/globals-module-specifier/b.js",
    "content": "export { process } from \"./c.js\";\nexport default \"DEFAULT\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/globals-module-specifier/c.js",
    "content": "var process_ = 1234;\nexport { process_ as process };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/globals-module-specifier/package.json",
    "content": "{\n\t\"browserslist\": \"Chrome 75\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/globals-unused/a.js",
    "content": "const toBase64 = true\n  ? btoa\n  : (str) => Buffer.from(str.toString(), \"binary\").toString(\"base64\");\n\nfunction fromBase64(str){\n  if(true){\n    return atob(str);\n  } else {\n    return Buffer.from(str.toString(), \"base64\").toString(\"binary\");\n  }\n}\n\nmodule.exports = fromBase64(toBase64(\"foo\"));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl/compiled.glsl",
    "content": "#version 300 es\n\nvoid someUniqFunction() {\n}\n\nprecision mediump float;\n#define GLSLIFY 1\n\nvoid main() {\n  someUniqFunction();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl/index.js",
    "content": "const shaders = [\n  require('./local.glsl'),\n  require('./local.vert'),\n  require('./local.frag'),\n];\n\nmodule.exports = function () {\n  return shaders;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl/lib.glsl",
    "content": "void someUniqFunction() {\n}\n\n#pragma glslify: export(someUniqFunction)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl/local.frag",
    "content": "#version 300 es\n\n#pragma glslify: test = require('./lib.glsl')\n\nprecision mediump float;\n\nvoid main() {\n  test();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl/local.glsl",
    "content": "#version 300 es\n\n#pragma glslify: test = require('./lib.glsl')\n\nprecision mediump float;\n\nvoid main() {\n  test();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl/local.vert",
    "content": "#version 300 es\n\n#pragma glslify: test = require('./lib.glsl')\n\nprecision mediump float;\n\nvoid main() {\n  test();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl-relative-import/frag.glsl",
    "content": "#pragma glslify: c = require('./sub/other');\n\nvarying float x;\n\nvoid main() { gl_FragColor = vec4(c(x)); }\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl-relative-import/index.js",
    "content": "import frag from \"./frag.glsl\";\n\nmodule.exports = frag;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl-relative-import/sub/other.glsl",
    "content": "#pragma glslify: b = require('./other2');\n\nfloat c(float p) { return b(p)*3.0; }\n\n#pragma glslify: export(c);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/glsl-relative-import/sub/other2.glsl",
    "content": "float b(float p) { return p*2.0; }\n\n#pragma glslify: export(b);"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql/index.js",
    "content": "var local = require('./local.graphql');\n\nmodule.exports = function () {\n  return local;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql/local.graphql",
    "content": "{\n  user(id: 5) {\n    ...UserFragment\n  }\n}\nfragment UserFragment on User {\n  firstName\n  lastName\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql-import/another.graphql",
    "content": "fragment AnotherUserFragment on User {\n    address\n    email\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql-import/index.js",
    "content": "var local = require('./local.graphql');\n\nmodule.exports = function () {\n  return local;\n};"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql-import/local.graphql",
    "content": "# import './other.graphql'\n\n{\n  user(id: 6) {\n    ...UserFragment\n    ...AnotherUserFragment\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql-import/other.graphql",
    "content": "# import './another.graphql'\n\nfragment UserFragment on User {\n    firstName\n    lastName\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql-named-import/MyQuery.graphql",
    "content": "# import UserFragment, Address from './fragments.graphql'\n# import * from \"./otherFragments.graphql\"\n\nquery MyQuery {\n    user(id: 6) {\n        ...UserFragment\n        address {\n            ...Address\n        }\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql-named-import/fragments.graphql",
    "content": "#import './moreFragments.graphql'\n\nfragment UserFragment on User {\n    firstName\n    lastName\n    ...AnotherUserFragment\n}\n\nfragment Address on Address {\n    line1\n    county\n    postalCode\n}\n\nfragment Unused on User {\n    email\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql-named-import/index.js",
    "content": "var MyQuery = require('./MyQuery.graphql');\n\nmodule.exports = function () {\n  return MyQuery;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql-named-import/moreFragments.graphql",
    "content": "fragment AnotherUserFragment on User {\n    address\n    email\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/graphql-named-import/otherFragments.graphql",
    "content": "fragment otherUserFragment on User {\n    friends {\n        edges {\n            nodes {\n                name\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hash-distDir/a/entry.html",
    "content": "<html>\n  <head>\n    <script src=\"index.js\"></script>\n  </head>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hash-distDir/a/index.js",
    "content": "console.log(\"test\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hash-distDir/a/package.json",
    "content": "{\n  \"name\": \"a\",\n  \"app\": \"dist/index.html\",\n  \"targets\": {\n    \"app\": {}\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hash-distDir/b/entry.html",
    "content": "<html>\n  <head>\n    <script src=\"index.js\"></script>\n  </head>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hash-distDir/b/index.js",
    "content": "console.log(\"test\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hash-distDir/b/package.json",
    "content": "{\n  \"name\": \"a\",\n  \"app\": \"dist/index.html\",\n  \"targets\": {\n    \"app\": {}\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-accept-self/index.js",
    "content": "import {value} from \"./local.js\";\n\noutput([\"index\", value]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-accept-self/local.js",
    "content": "export {value} from \"./other.js\";\nimport {value} from \"./other.js\";\noutput([\"local\", value]);\nmodule.hot.accept();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-accept-self/other.js",
    "content": "export const value = 1;\noutput([\"other\", value]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-bubble/index.js",
    "content": "import {value} from \"./local.js\";\noutput([\"index\", value]);\nmodule.hot.accept();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-bubble/local.js",
    "content": "export {value} from \"./other.js\";\nimport {value} from \"./other.js\";\noutput([\"local\", value]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-bubble/other.js",
    "content": "export const value = 1;\noutput([\"other\", value]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-callbacks/index.js",
    "content": "var local = require('./local');\n\nfunction run() {\n  output(local.a + local.b);\n}\n\nrun();\n\n// eslint-disable-next-line no-undef\nreportModuleId(module.id);\n\nmodule.hot.dispose(function () {\n  output('dispose-' + module.id);\n});\n\nmodule.hot.accept(function () {\n  output('accept-' + module.id);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-callbacks/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-circular/index.js",
    "content": "var local = require('./local');\n\nfunction run() {\n  output(local.a + local.b);\n}\n\nmodule.hot.accept();\n\nrun();\n\nmodule.exports = 'value';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-circular/local.js",
    "content": "var other = require('./index.js');\n\nexports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-css/index.2.css",
    "content": "body {\n  background: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-css/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-css/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <meta charset=\"utf-8\" />\n  <link rel=\"stylesheet\" type=\"text/css\" href=\"./index.css\" />\n</head>\n<body>\n  <h1>Hello world</h1>\n  <script type=\"module\" src=\"index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-css/index.js",
    "content": "\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-css-modules/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <meta charset=\"utf-8\" />\n</head>\n<body>\n  <div id=\"app\"></div>\n  <script type=\"module\" src=\"index.jsx\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-css-modules/index.jsx",
    "content": "import * as styles from \"./index.module.css\";\nimport React from 'react';\n\nexport const Hello = () => <div classNames={styles.hello}>hello</div>;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-css-modules/index.module.css",
    "content": ".hello {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-css-modules/index2.module.css",
    "content": ".hello {\n  background: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-css-modules/package.json",
    "content": "{\n  \"dependencies\": {\n    \"react\": \"^16\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-dispose/index.js",
    "content": "import {value} from \"./local.js\";\noutput([\"eval:index\", value, module.hot.data]);\nmodule.hot.accept();\nmodule.hot.dispose((data) => {\n  output([\"dispose:index\", value]);\n  data.value = value;\n})\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-dispose/local.js",
    "content": "export {value} from \"./other.js\";\nimport {value} from \"./other.js\";\noutput([\"eval:local\", value, module.hot.data]);\nmodule.hot.dispose((data) => {\n  output([\"dispose:local\", value]);\n  data.value = value;\n})\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-dispose/other.js",
    "content": "export const value = 1;\noutput([\"eval:other\", value, module.hot.data]);\nmodule.hot.dispose((data) => {\n  output([\"dispose:other\", value]);\n  data.value = value;\n})\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-duplicate/a.js",
    "content": "const x = require('./shared');\n\nexports.a = x.a + 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-duplicate/b.js",
    "content": "const x = require('./shared');\n\nexports.a = x.a + 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-duplicate/index.js",
    "content": "let a = import('./a');\nlet b = import('./b');\n\nfunction run() {\n  a.then(function (a) {\n    b.then(function (b) {\n      output(a.a + b.a);\n    });\n  });\n};\n\nmodule.hot.accept();\n\nrun();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-duplicate/shared.js",
    "content": "exports.a = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-dynamic/index.js",
    "content": "var local = import('./local');\n\nfunction run() {\n  return local.then(function (l) {\n    output(l.a + l.b);\n  });\n};\n\nmodule.hot.accept();\n\nrun();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-dynamic/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents/a.js",
    "content": "import {fn1} from './utils';\n\nexport function a() {\n  return 'a: ' + fn1();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents/b.js",
    "content": "import {fn2} from './utils';\n\nexport function b() {\n  return 'b: ' + fn2();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents/fn1.js",
    "content": "export function fn1() {\n  return 'fn1';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents/fn2.js",
    "content": "export function fn2() {\n  return 'fn2';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents/index.js",
    "content": "import {a} from './a';\nimport {b} from './b';\n\noutput(a() + ' ' + b());\n\nmodule.hot.accept();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents/utils.js",
    "content": "export * from './fn1';\nexport * from './fn2';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents-reload/a.js",
    "content": "import {fn1} from './utils';\n\noutput('a: ' + fn1());\nmodule.hot.accept();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents-reload/b.js",
    "content": "import {fn2} from './utils';\n\noutput('b: ' + fn2());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents-reload/fn1.js",
    "content": "export function fn1() {\n  return 'fn1';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents-reload/fn2.js",
    "content": "export function fn2() {\n  return 'fn2';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents-reload/index.js",
    "content": "import './a';\nimport './b';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-multiple-parents-reload/utils.js",
    "content": "export * from './fn1';\nexport * from './fn2';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-new-bundle/index.css",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-new-bundle/index.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <script src=\"./index.js\"></script>\n  </body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-new-bundle/index.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-parents/child.js",
    "content": "const updated = require('./updated');\n\noutput('child ' + updated.a);\nmodule.hot.accept(getParents => {\n  output('accept child');\n  return getParents();\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-parents/index.js",
    "content": "require('./middle');\n\noutput('root');\nmodule.hot.accept(() => {\n  output('accept root');\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-parents/middle.js",
    "content": "require('./child');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-parents/updated.js",
    "content": "exports.a = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-parents-reload/child.js",
    "content": "const updated = require('./updated');\n\noutput('child ' + updated.a);\nmodule.hot.accept(getParents => {\n  output('accept child');\n  return getParents();\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-parents-reload/index.js",
    "content": "require('./middle');\n\noutput('root');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-parents-reload/middle.js",
    "content": "require('./child');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-parents-reload/updated.js",
    "content": "exports.a = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-reload/index.js",
    "content": "var local = require('./local');\n\nfunction run() {\n  output(local.a + local.b);\n}\n\nrun();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-reload/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-url/index.js",
    "content": "let url = new URL('test.txt', import.meta.url);\noutput(url);\nmodule.hot.accept();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/hmr-url/test.txt",
    "content": "hi"
  },
  {
    "path": "packages/core/integration-tests/test/integration/htm-extension/index.htm",
    "content": "<!doctype html>\n<html>\n<head>\n  <title>HTM File</title>\n</head>\n<body>\n  <h1>Hello world</h1>\n  <script src=\"index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/htm-extension/index.js",
    "content": "alert('Hi');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html/foo/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Foo page</title>\n</head>\n<body>\n    <div>Some foo page...</div>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html/foo/other.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Other foo page</title>\n</head>\n<body>\n    <div>Some other foo page...</div>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html/index.html",
    "content": "<!doctype html>\n<html>\n\n<head>\n  <link rel=\"stylesheet\" href=\"index.css\" />\n  <meta property=\"og:image\" content=\"100x100.png\" />\n\n  <!-- fixes https://github.com/parcel-bundler/parcel/issues/1714 -->\n  <meta name=\"twitter:image\" content=\"\" />\n</head>\n\n<body>\n  <h1>Hello world</h1>\n  <p>\n    Linking to <a href=\"other.html\">another page</a> and <a href=\"foo/index.html\">another page</a>\n    and <a href=\"foo/other.html\">another page</a>\n  </p>\n  <a href=\"#hash_link\">Hash link</a>\n  <a href=\"mailto:someone@acme.com\">Mailto link</a>\n  <a href=\"tel:+33636757575\">Tel link</a>\n  <script src=\"index.js\"></script>\n  <script src=\"https://unpkg.com/parcel-bundler\"></script>\n  <i>hello</i> <i>world</i>\n  <svg><use href=\"icons.svg#icon-code\"></use></svg>\n  <style>\n    body {\n      background: gray;\n    }\n  </style>\n</body>\n\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html/index.js",
    "content": "alert('Hi');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html/other.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"stylesheet\" href=\"index.css\" />\n</head>\n<body>\n  <h1>Other page</h1>\n  <script src=\"index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-async-script/a.js",
    "content": "import './c';\noutput('a');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-async-script/b.js",
    "content": "import './c';\noutput('b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-async-script/c.js",
    "content": "output('c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-async-script/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <script async type=\"module\" src=\"a.js\"></script>\n    <script defer type=\"module\" src=\"b.js\"></script>\n  </head>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-attr-order/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n</head>\n<body>\n  <h1>Hello world</h1>\n  <p>Linking to <a class=\"link\" href=\"other.html\">another page</a></p>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-attr-order/other.html",
    "content": "<!doctype html>\n<html>\n<head>\n</head>\n<body>\n  <h1>Other page</h1>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-canonical/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"canonical\" href=\"./index.html\" />\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <meta charset=\"utf-8\" />\n</head>\n<body>\n  <h1>Hello world</h1>\n  <script type=\"module\" src=\"index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css/index.js",
    "content": "require('./index.css');\nalert('Hi');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-doctype/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-doctype/index.html",
    "content": "<!DOCTYPE html>\n<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-doctype/index.js",
    "content": "require('./index.css');\nalert('Hi');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-head/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-head/index.html",
    "content": "<!doctype html>\n<html>\n<body>\n  <h1>Hello world</h1>\n  <script type=\"module\" src=\"index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-head/index.js",
    "content": "require('./index.css');\nalert('Hi');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-js/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-js/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <meta charset=\"utf-8\" />\n  <link rel=\"stylesheet\" href=\"index.css\">\n</head>\n<body>\n  <h1>Hello world</h1>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-multi/a.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-multi/a.js",
    "content": "require('./a.css');\nalert('a');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-multi/b.css",
    "content": ".test {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-multi/b.js",
    "content": "require('./b.css');\nalert('b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-multi/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <meta charset=\"utf-8\" />\n</head>\n<body>\n  <h1>Hello world</h1>\n  <script type=\"module\" src=\"a.js\"></script>\n  <script type=\"module\" src=\"b.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-optional-elements/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-optional-elements/index.html",
    "content": "<script type=\"module\" src=\"other.js\"></script>\n<h1>Hello world</h1>\n<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-optional-elements/index.js",
    "content": "require('./index.css');\nalert('Hi');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-css-optional-elements/other.js",
    "content": "alert('Other');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-empty/index.html",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-empty-reference/index.html",
    "content": "<img src=\"\" />\n<script src=\"\"></script>\n<link href=\"\" />\n<input value=\"\" checked data-x />\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-feed/atom.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link href=\"feed.xml\" rel=\"alternate\" type=\"application/atom+xml\" title=\"Blog RSS\" />\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-feed/feed.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<feed xmlns=\"http://www.w3.org/2005/Atom\">\n\t<title>Example Feed</title>\n</feed>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-feed/rss.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link href=\"feed.xml\" rel=\"alternate\" type=\"application/rss+xml\" title=\"Blog RSS\" />\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-image-href-attr/index.html",
    "content": "<!doctype html>\n<html>\n\n<head>\n</head>\n\n<body>\n  <svg>\n    <image href=\"./100x100.png\" />\n  </svg>\n</body>\n\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-imagesrcset/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<link rel=\"preload\" as=\"image\" href=\"100x100.png\" imagesrcset=\"200x200.png 250w, 300x300.png 500w\">\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-coffeescript/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>Inline JavaScript Parcel</title>\n</head>\n<body>\n  <script type=\"application/coffee\">\n    alert \"Hello, World!\"\n  </script>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-css-import/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  <style>\n    @import './test.css';  \n  </style>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-css-import/test.css",
    "content": "h1 {\n  color: red\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-escape/script.html",
    "content": "<!doctype html>\n<script type=\"module\">\n  import {a, b, c} from './script.js';\n  output({a, b, c});\n</script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-escape/script.js",
    "content": "export const a = '<script></script>';\nexport const b = '<!-- test';\nexport const c = '<SCRIPT></SCRIPT>';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-escape/style.css",
    "content": "div {\n  content: \"</style>\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-escape/style.html",
    "content": "<!doctype html>\n<div style='content: \"hi\"' />\n<style>\n  @import \"style.css\";\n</style>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-importmap/index.html",
    "content": "<!DOCTYPE html>\n<script type=\"importmap\">\n\t{\n\t\t\"imports\": {\n\t\t\t\"lit1.3.0/\": \"/node_modules/lit1.3.0/\"\n\t\t}\n\t}\n</script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>Inline JavaScript Parcel</title>\n</head>\n<body>\n  <script>\n    var hello = \"Hello\";\n    let getHello = (someArgument) => {\n      return someArgument;\n    }\n  </script>\n  <script>\n    var world = \"world\";\n  </script>\n  <script>\n    var end = \"!\";\n  </script>\n  <script>\n    console.log(`${hello} ${world}${end}`);\n  </script>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-module/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>Inline JavaScript Parcel</title>\n</head>\n<body>\n  <script type=\"module\">\n    document.write(\"Hello world\");\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-nested/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  <script type=\"module\">\n    require('./test');\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-nested/test.js",
    "content": "import text from 'bundle-text:./test.txt';\nconsole.log(text);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-nested/test.txt",
    "content": "hello world"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-require/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  <script type=\"module\">\n    require('./test');\n  </script>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-require/test.js",
    "content": "console.log('test')\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-script/error.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <script>\n      import './module';\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-script/globals-dependencies.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <script>\n      log(typeof bar, typeof baz);\n      let x = 2;\n      if (true) {\n        log(typeof bar, typeof baz);\n        let y = 3;\n        var z = 4;\n        function bar() {}\n        class Test {}\n      }\n\n      log(typeof bar, typeof baz);\n\n      class Foo {}\n      function baz() {}\n\n      import('./module');\n    </script>\n    <script>\n      output = {\n        x,\n        y: typeof y,\n        z,\n        bar,\n        Test: typeof Test,\n        Foo,\n        baz\n      };\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-script/globals.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <script>\n      log(typeof bar, typeof baz);\n      let x = 2;\n      if (true) {\n        log(typeof bar, typeof baz);\n        let y = 3;\n        var z = 4;\n        function bar() {}\n        class Test {}\n      }\n\n      log(typeof bar, typeof baz);\n\n      class Foo {}\n      function baz() {}\n    </script>\n    <script>\n      output = {\n        x,\n        y: typeof y,\n        z,\n        bar,\n        Test: typeof Test,\n        Foo,\n        baz\n      };\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-script/module.js",
    "content": "export function bar() {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-js-shared/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>Inline JavaScript Parcel</title>\n</head>\n<body>\n  <script type=\"module\">\n    import _ from 'lodash';\n    console.log(_.add(1, 2));\n  </script>\n  <script type=\"module\">\n    import _ from 'lodash';\n    console.log(_.add(2, 3));\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-sass/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>Inline JavaScript Parcel</title>\n</head>\n<body>\n  <style type=\"text/sass\">\n    .index\n      color: #0000ff\n  </style>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-styles/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>Inline JavaScript Parcel</title>\n</head>\n<body>\n  <style>\n    .someClass {\n      background: blue;\n      color: white;\n    }\n  </style>\n\n  <div class=\"someClass\">\n    <h1 style=\"color: green;\"></h1>\n    <p style=\"background: url(./img.jpg);\"></p>\n    <p style=\"background-image: url(./bg.jpg);\"></p>\n  </div>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-inline-styles-element/index.html",
    "content": "<img src=\"http://example.com/img.png\" style=\"margin-top: 5px;\" />\n<img src=\"http://example.com/img.png\" style=\"width: 120px;\" />\n<span style=\"font-size: 25px;\">REPL</span>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-invalid/index.html",
    "content": "<!doctype html>\n<html>\n\n<head>\n  <title>Invalid HTML file</title>\n</head>\n\n<body>\n\n<p>This is a paragraph.<ul><li>This is a list.</li></ul></p>\n\n</body>\n\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-isolate-script/a.js",
    "content": "import('./c.js');\noutput('a');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-isolate-script/b.js",
    "content": "import('./c.js');\noutput('b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-isolate-script/c.js",
    "content": "output('c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-isolate-script/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <script type=\"module\" src=\"a.js\"></script>\n    <script src=\"b.js\"></script>\n  </head>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-isolate-script/package.json",
    "content": "{\n  \"browserslist\": \">= 0.25%\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js/error.html",
    "content": "<script src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js/index.html",
    "content": "<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js/index.js",
    "content": "import foo from \"./other.js\";\n\nalert(foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js/other.js",
    "content": "class Useless {\n  constructor(message) {\n    this.message = message;\n  }\n}\n\nexport default new Useless('other').message;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-dedup/component-1.js",
    "content": "import obj from './obj.js';\nobj.count++;\noutput('component-1', obj.count);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-dedup/component-2.js",
    "content": "import obj from './obj.js';\nobj.count++;\noutput('component-2', obj.count);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-dedup/index.html",
    "content": "<!DOCTYPE html>\n<script type=\"module\" src=\"component-1.js\"></script>\n<script type=\"module\" src=\"component-2.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-dedup/obj.js",
    "content": "export default { count: 0 };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-dynamic/index.html",
    "content": "<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-dynamic/index.js",
    "content": "const local = import('./local');\n\nglobal.output = function () {\n  return local.then(function (v) {\n    return \"Imported: \" + v.default;\n  });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-dynamic/local.js",
    "content": "export default \"foobar\";"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-not-import-swc-helpers-without-module/index.html",
    "content": "<html>\n    <script>\n        function arr() {\n            return [1, 2, 3];\n        }\n        const [a, b, c] = arr();\n    </script>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared/async.js",
    "content": "if (Date.now() > 0) {\n\tconsole.log(\"async\", require(\"lodash\").add(1, 2));\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared/index.html",
    "content": "<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared/index.js",
    "content": "console.log(require(\"lodash\").add(1, 2));\nimport(\"./async.js\");\nnew Worker(new URL(\"./worker.js\", import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared/worker.js",
    "content": "if (Date.now() > 0) {\n\tconsole.log(\"worker\", require(\"lodash\").add(1, 2));\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-dynamic-nested/client/index.js",
    "content": "export default function () {\n\treturn import(\"./simpleHasher\").then((v) => v.default());\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-dynamic-nested/client/simpleHasher.js",
    "content": "export default function () {\n\treturn \"hasher\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-dynamic-nested/index.html",
    "content": "<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-dynamic-nested/index.js",
    "content": "import c from \"./client\";\nimport v from \"./viewer\";\n\noutput = Promise.all([c(), v()]);\n// [\"hasher\", [\"hasher\", \"hasher\"]]\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-dynamic-nested/viewer/index.js",
    "content": "export default function () {\n\treturn Promise.all([\n\t\timport(\"../client\").then((v) => v.default()),\n\t\timport(\"../client/simpleHasher.js\").then((v) => v.default()),\n\t]);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-head/async.js",
    "content": "if (Date.now() > 0) {\n\tconsole.log(\"async\", require(\"lodash\").add(1, 2));\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-head/index.html",
    "content": "<html>\n  <head>\n    <script type=\"module\" src=\"index.js\"></script>\n  </head>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-head/index.js",
    "content": "console.log(require(\"lodash\").add(1, 2));\nimport(\"./async.js\");\nnew Worker(new URL(\"./worker.js\", import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-head/worker.js",
    "content": "if (Date.now() > 0) {\n\tconsole.log(\"worker\", require(\"lodash\").add(1, 2));\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-nomodule/a.html",
    "content": "<script type=\"module\" src=\"a.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-nomodule/a.js",
    "content": "import x from \"./lib.js\";\n\nconsole.log(x);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-nomodule/b.html",
    "content": "<script type=\"module\" src=\"b.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-nomodule/b.js",
    "content": "import x from \"./lib.js\";\n\nconsole.log(x);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-nomodule/lib.js",
    "content": "export default `\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-js-shared-nomodule/package.json",
    "content": "{\n  \"browserslist\": \"Chrome 50\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-meta/index.html",
    "content": "<html>\n    <head>\n        <meta name=\"msapplication-config\" content=\"none\" />\n        <meta name=\"msapplication-TileImage\" content=\"./logo.png?width=144&height=144\" />\n        <meta name=\"msapplication-square70x70logo\" content=\"./logo.png?width=70&height=70\" />\n        <meta property=\"og:image\" content=\"./logo.svg\" />\n        <meta name=\"twitter:image\" content=\"https://parceljs.org/assets/logo.svg\" />\n    </head>\n    <body>\n    </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-entry/a.html",
    "content": "<head>\n\t<link rel=\"stylesheet\" href=\"./style.css\">\n</head>\n\n<body>\n\t<script type=\"module\" src=\"./index.js\"></script>\n</body>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-entry/b.html",
    "content": "<head>\n\t<link rel=\"stylesheet\" href=\"./style.css\">\n</head>\n\n<body>\n\t<script type=\"module\" src=\"./index.js\"></script>\n</body>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-entry/index.js",
    "content": "import \"./style.css\";"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-entry/style.css",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-targets/package.json",
    "content": "{\n  \"name\": \"assets-in-confluence\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"targets\": {\n    \"main1\": {\n      \"distDir\": \"./dist/main1\",\n      \"source\": \"./src/main1/index.html\",\n      \"publicUrl\": \"./\"\n    },\n    \"main2\": {\n      \"distDir\": \"./dist/main2\",\n      \"source\": \"./src/main2/index.html\",\n      \"publicUrl\": \"./\"\n    }\n  },\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 0\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-targets/src/main1/index.html",
    "content": "<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-targets/src/main1/index.js",
    "content": "module.exports = async function () {\n  return import('../shared');\n};"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-targets/src/main2/index.html",
    "content": "<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-targets/src/main2/index.js",
    "content": "module.exports = async function () {\n  return import('../shared');\n};"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-multi-targets/src/shared.js",
    "content": "export const stuff = () => 'lots and lots of stuff'"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-no-js/index.html",
    "content": "<!doctype html>\n<html>\n<body>\n<p>Some paragraph.</p>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-no-js/no-body-or-html.html",
    "content": "<!doctype html>\n<p>Some paragraph.</p>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-no-js/no-body.html",
    "content": "<!doctype html>\n<html>\n<p>Some paragraph.</p>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-no-js/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-object/index.html",
    "content": "<!DOCTYPE html>\n<object data=\"file.svg\" type=\"image/svg+xml\"></object>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-optional-closing-tags/index.html",
    "content": "<!DOCTYPE html>\n\n<title>Title</title>\n\n<p>Paragraph 1\n\n<hr>\n\n<p>Paragraph 2\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-pkg-source/index.html",
    "content": "<body>\n  <h1>Hello world</h1>\n</body>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-pkg-source/package.json",
    "content": "{\n    \"source\": \"index.html\",\n    \"app\": \"dist/index.html\",\n    \"targets\": {\n        \"app\": {}\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-pkg-source-array/a.html",
    "content": "<body>\n  <h1>HTML File a</h1>\n</body>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-pkg-source-array/b.html",
    "content": "<body>\n    <h1>HTML File b</h1>\n  </body>\n  "
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-pkg-source-array/package.json",
    "content": "{\n    \"source\": [\"a.html\", \"b.html\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-protocol-relative/index.css",
    "content": "@import url(\"//unpkg.com/xyz/test.css\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-protocol-relative/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <script type=\"text/javascript\" src=\"//unpkg.com/xyz/\"></script>\n\n    <link\n      rel=\"stylesheet\"\n      type=\"text/css\"\n      href=\"index.css\"\n    />\n  </head>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-root/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-root/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n</head>\n<body>\n  <a href=\"./other.html\">goto page2</a>\n  <script type=\"module\" src=\"./main.js\"></script>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-root/index2.js",
    "content": "// index2.js\nimport util from './util.js'\nutil.hi()"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-root/main.js",
    "content": "import util from './util'\nutil.hi()"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-root/other.html",
    "content": "<!doctype html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n</head>\n<body>\n  <a href=\"./index.html\">goto page1</a>\n  <script type=\"module\" src=\"./index2.js\"></script>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-root/util.js",
    "content": "// util.js\nexport default {\n  hi() {\n    console.log('hi')\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared/iframe.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <script type=\"module\" src=\"iframe.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared/iframe.js",
    "content": "import _ from 'lodash';\nconsole.log('iframe', _);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared/index.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <h1>Hello!</h1>\n    <iframe src=\"iframe.html\"></iframe>\n    <script type=\"module\" src=\"./index.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared/index.js",
    "content": "import _ from 'lodash';\nconsole.log('index', _);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-referenced/async.js",
    "content": "import './async2.js';\n\nimport('./async2.js');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-referenced/async2.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-referenced/index1.html",
    "content": "<script type=\"module\" src=\"index1.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-referenced/index1.js",
    "content": "import './shared';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-referenced/index2.html",
    "content": "<script type=\"module\" src=\"index2.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-referenced/index2.js",
    "content": "import './async.js';\nimport './shared.js';\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-referenced/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 0\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-referenced/shared.js",
    "content": "import('./async.js');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-worker/index.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <h1>Hello!</h1>\n    <script type=\"module\" src=\"./index.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-worker/index.js",
    "content": "import _ from 'lodash';\n\noutput(\"main\", _.add(1, 2));\n\nnew Worker(new URL('worker.js', import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-shared-worker/worker.js",
    "content": "import _ from 'lodash';\n\noutput(\"worker\", _.add(1, 2));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-source-srcset/index.html",
    "content": "<!doctype html>\n<html>\n\n<head>\n  <meta charset=\"utf-8\">\n</head>\n\n<body>\n  <picture>\n    <source srcset=\"100x100.png 100w, 200x200.png 250w, 300x300.png 500w\">\n  </picture>\n</body>\n\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-srcset/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n</head>\n<body>\n<img src=\"100x100.png\" srcset=\"100x100.png 100w, 200x200.png?lat=1,lng=2 250w, 300x300.png 500w\">\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-svg/index.html",
    "content": "<!DOCTYPE html>\n<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n\t<use xlink:href=\"file.svg#all\"/>\n</svg>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-svg-case/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <body>\n    <x-custom stdDeviation=\"0.5\"></x-custom>\n    <svg viewBox=\"1.8 2.4 2 2\" preserveAspectRatio=\"xMinYMin meet\" role=\"img\">\n      <title>Test</title>\n      <defs>\n        <FILTER id=\"blur\">\n          <feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"0.01\" />\n        </FILTER>\n      </defs>\n      <g>\n        <path d=\"M2 3C3 2 4 3 3 4\" stroke-width=\"0.1\" stroke=\"blue\" fill=\"none\" filter=\"url(#blur)\"/>\n      </g>\n    </svg>\n    <a href=\"other.html\">Other</a>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-svg-case/other.html",
    "content": "<p>Hi</p>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-svg-image/index.html",
    "content": "<!DOCTYPE html>\n<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n\t<image xlink:href=\"file.svg\"/>\n</svg>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-svg-local-symbol/index.html",
    "content": "<!DOCTYPE html>\n<svg>\n\t<symbol id=\"all\">\n\t\t<rect width=\"100\" height=\"100\" x=\"0\" y=\"0\"/>\n\t</symbol>\n</svg>\n<svg>\n\t<use xlink:href=\"#all\" href=\"#all\"/>\n</svg>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-svg-script/index.html",
    "content": "<!DOCTYPE html>\n<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n  <script href=\"./script-a.js\"></script>\n  <script xlink:href=\"./script-b.js\"></script>\n</svg>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-svg-script/script-a.js",
    "content": "console.log('a')\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-svg-script/script-b.js",
    "content": "console.log('b')\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-sync-async-asset/index.html",
    "content": "<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-sync-async-asset/index.js",
    "content": "import t from \"./test.js\";\n\nimport(\"./other.js\")\n\t.then((v) => v.default)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-sync-async-asset/other.js",
    "content": "export default import(\"./test.js\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-sync-async-asset/test.js",
    "content": "export default \"test\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-virtualpath/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <title>Virtual path test</title>\n</head>\n<body>\n  <a href=\"/somewhere\">Virtual path</a>\n  <a href=\"/some/other/route\">Another virtual path</a>\n  <a href=\"./other.html\">A real path</a>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/html-virtualpath/other.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <title>Virtual path test</title>\n</head>\n<body>\n  <h1>Other page</h1>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/htmlnano/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <title>Test</title>\n</head>\n<body>\n  <h1>Other page</h1>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/htmlnano-config/.htmlnanorc.json",
    "content": "{\n  \"mergeStyles\": true,\n  \"minifySvg\": false,\n  \"minifyJson\": true,\n  \"collapseWhitespace\": \"all\",\n  \"preset\": \"max\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/htmlnano-config/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <title>Test</title>\n  <style>h1 { color: red }</style>\n  <style media=\"print\">div { color: #0000ff }</style>\n\n  <style type=\"text/css\" media=\"print\">a {}</style>\n  <style>div { font-size: 20px }</style>\n</head>\n<body>\n<h1>Index page</h1>\n<svg version=\"1.1\" baseProfile=\"full\" width=\"300\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\">\n  <rect width=\"100%\" height=\"100%\" fill=\"red\" />\n\n  <circle cx=\"150\" cy=\"100\" r=\"80\" fill=\"green\" />\n\n  <text x=\"150\" y=\"125\" font-size=\"60\" text-anchor=\"middle\" fill=\"white\">SVG</text>\n</svg>\n<script type=\"application/json\">\n  {\n    \"user\": \"me\"\n  }\n</script>\n\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/htmlnano-defaults-form/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <title>Test</title>\n</head>\n<body>\n  <form>\n    <input type=\"text\">\n  </form>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/https/primary.crt",
    "content": "-----BEGIN CERTIFICATE-----\nMIIE/zCCAuegAwIBAgIJAITHmIqRap3uMA0GCSqGSIb3DQEBCwUAMBYxFDASBgNV\nBAMMC2V4YW1wbGUuY29tMB4XDTE4MDMwODE5NDIxOFoXDTI4MDMwNTE5NDIxOFow\nFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw\nggIKAoICAQDqi17CnmpA5jfFqcvfB5OZz59lRQpNO098OOeUIbQB/pP868Y5qmL/\nylCQmj3liIdul6oflNFPmu23numpUTHOSwSxfY/QZwzsYytnbQG6gr1DhrvNDzeN\nArf1cNJ9CqfJdEmNyikfXGOJCk1xewCWYcZ34kugo2kuLGO83ft3Q5J47iqvgTPX\nPbTc4qfUgXavprVSUzpWOGbbK2GHeenTGCarsfu7YkP3VVjMpeKcxS94Bnd0wHZF\nPJKuTNDMrANBP/7RKh4XBgeuRPAdUjbcHWnlMWBvj0YuIL/Yhw976tIWAlyp0ZR6\nHKF46QOEnPrR5sQGIC7wM6qyB3xCVX7eMEKcV97YYtD52eskBHT8knQhNfYn6OI4\nzin13++en3Kg8I/lDA3uf/Zr2Uj2gwu8v4RqINOQoWrgAHWeActi+5FB9xwebnwX\nyax+7eoCPtfe1zDo0GlzNbDKFnd3JfMC4e4gvwnAMnS1Wg5bBNXZJy8ggpniY04b\n34HBWBOonscaQLMWrZQpNDfHoszUzGla0nKjru3Cwk8MJqz9qlruPJN0stdqY2C/\n3Q2rB1YgvMFTr43C+KALk7hQ4w1ShJ0KYde1UPgWKooYGJRMKtpSuwu4QcgsxPIB\nfH1aXEuHefxQ5EwhZm8FW79Psit+oPMvrBw1esLQnBQA3JhDG2tG3wIDAQABo1Aw\nTjAdBgNVHQ4EFgQUkO1iAxx9YovR6zdzp9WTigA0OX4wHwYDVR0jBBgwFoAUkO1i\nAxx9YovR6zdzp9WTigA0OX4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC\nAgEAGk378ptJZMSmxgypj8z2pldHfbRURDL+rI+5opf7JBeVQkyqqDWkdSM1dCMy\nmN7QqwCQbQFxKiKM+wbZfS8/JO5Pj0kQwuiaXVx7gPDezXT4aDw+TFH/K3ZNI2oB\nS4JWCix5rHpwE6Xdnady0IYloT08t9lMdME0728B7j+XcJgH5exzLIwWdzs9JWYj\nhip87tx6ORw1s74HCmcnMshr7Ow1J8DTmWcL5+MLPokFm14jGWiW826odzucU3jf\nbh1T8+DbM+ZkxXN0BTh6jFx0qmYg8wyVSKqVSncAo1hdsb+/aA+BpU0eofWInyzs\n45c3/wIE2LVC3EsoHAlT3O6ZVtI2va48E4oDMJSf7IinjGZ+VJzn46gXvmZl6KDQ\nGet1dsrxxlPqwOLM/WgHkvGBwfw9OyK3igdYtudsT5OcW4Parok9s1ea4szDteHF\n5opBcQG91i9/fAeCMSgjAZx0HMlFQi7OxsappUgc0d77JeR04hiVPxOxttu8LuKw\nGgmuoZ0HgCso9CaPlOQXfQxOFljcdQkUxrIf/7HOo/D7Lzhc2RIgcDQiZk5o8chv\nJX+QSmpQTRl//iBDNlNcUy5WJtSjpPOxvKryVypTw+Xwkbb4HgAmNY5x87K7WucB\nj5hfjsLAwrciIsIcKu5qLzheU6vRhPwZE5vW3lWZnf6D/s4=\n-----END CERTIFICATE-----\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/https/private.pem",
    "content": "-----BEGIN PRIVATE KEY-----\n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\nI0ZrfUn75MYvsljzUOiaIQRgK9m1/74=\n-----END PRIVATE KEY-----\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/image/reformat-all.html",
    "content": "​<picture>\n  <source srcset=\"foo.png?as=avif\" type=\"image/avif\">\n  <source srcset=\"foo.png?as=jpg\" type=\"image/jpeg\">\n  <source srcset=\"foo.png?as=png\" type=\"image/png\">\n  <source srcset=\"foo.png?as=tiff\" type=\"image/tiff\">\n  <source srcset=\"foo.png?as=webp\" type=\"image/webp\">\n</picture>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/image/reformat.css",
    "content": ".test {\n  background-image: url('image.jpg?as=webp');\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/image/reformat.html",
    "content": "<img src=\"image.jpg?as=webp\" alt=\"test image\" />\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/image/reformat.js",
    "content": "import url from './image.jpg?as=webp';\n\nmodule.exports = url;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/image/resized.js",
    "content": "module.exports = new URL('image.jpg?width=600', import.meta.url).toString();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/image-config/sharp.config.json",
    "content": "{\n  \"jpeg\": {\n    \"quality\": 75,\n    \"chromaSubsampling\": \"4:4:4\"\n  },\n  \"webp\": {\n    \"quality\": 80\n  },\n  \"png\": {\n    \"palette\": true\n  },\n  \"quality\": 90\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/image-exif/resized.html",
    "content": "<img src=\"right.jpg?width=240\">\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/image-multiple-queries/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<body>\n  <picture>\n    <source src=\"snow.jpg?as=webp&width=400\" type=\"image/webp\" />\n    <source src=\"snow.jpg?as=jpg&width=400\" type=\"image/jpeg\" />\n    <img src=\"snow.jpg?as=jpg&width=800\" alt=\"snow\" />\n  </picture>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-html-async/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-html-async/index.js",
    "content": "module.exports = import('./other.html');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-html-async/other.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"stylesheet\" href=\"index.css\" />\n</head>\n<body>\n  <h1>Other page</h1>\n  <img src=\"100x100.png\" />\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-html-sync/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-html-sync/index.js",
    "content": "output(require('./other.html'));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-html-sync/other.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"stylesheet\" href=\"index.css\" />\n</head>\n<body>\n  <h1>Other page</h1>\n  <img src=\"100x100.png\" />\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-meta/index.js",
    "content": "export default {\n  meta: import.meta,\n  url: import.meta.url,\n  equal: import.meta === import.meta\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-raw/index.js",
    "content": "const url = require('url:./test.txt');\n\nmodule.exports = function () {\n  return url;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-raw/test.txt",
    "content": "hi there\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-raw-import-meta-url/cjs.js",
    "content": "export default new URL(\"test.txt\", 'file:' + __filename);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-raw-import-meta-url/index.js",
    "content": "export default new URL(\"test.txt\", import.meta.url);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-raw-import-meta-url/local-url.js",
    "content": "class URL {\n  toString(){\n    return \"test.js\";\n  }\n}\n\nexport default new URL(\"./invalid.js\", import.meta.url);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-raw-import-meta-url/missing.js",
    "content": "export default new URL(\"invalid.txt\", import.meta.url);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-raw-import-meta-url/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/import-raw-import-meta-url/test.txt",
    "content": "hi there\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/include_builtins-browser/main.js",
    "content": "import path from \"path\";\nimport fs from \"fs\";\n\nmodule.exports = function () {\n  return [fs, path.join(\"app\", \"index.js\")];\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/include_builtins-browser/package.json",
    "content": "{\n  \"targets\": {\n    \"default\": {\n      \"context\": \"browser\",\n      \"includeNodeModules\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/include_builtins-node/main.js",
    "content": "import path from \"path\";\nimport fs from \"fs\";\n\nmodule.exports = function () {\n  return [fs, path.join(\"app\", \"index.js\")];\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/include_builtins-node/package.json",
    "content": "{\n  \"targets\": {\n    \"default\": {\n      \"context\": \"node\",\n      \"includeNodeModules\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/include_node_modules/local.js",
    "content": "exports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/include_node_modules/main.js",
    "content": "var {a} = require('testmodule');\nvar {b} = require('./local');\n\nmodule.exports = function () {\n  return a + b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/include_node_modules/package.json",
    "content": "{\n  \"name\": \"include_node_modules\",\n  \"targets\": {\n    \"node\": {\n      \"context\": \"node\",\n      \"includeNodeModules\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/included-file/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.txt\": [\"parcel-transformer-included\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/included-file/included.txt",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/included-file/index.txt",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/included-file/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/a.css",
    "content": "html {\n  color: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/a.js",
    "content": "export const a = 'a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/b.js",
    "content": "export const b = 'b';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/c.js",
    "content": "export const c = 'c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/index-export.js",
    "content": "import {a} from './a';\n\nmodule.exports = a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/index-multi-symbol.js",
    "content": "import {a, b} from './multi-symbol-util.js';\n\nconsole.log('index.js', b);\nconsole.log(a);\nmodule.exports = {a};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/index-with-css.js",
    "content": "import {a} from './a';\nimport './a.css';\n\nconsole.log('index.js');\nconsole.log(a);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <title>Test</title>\n</head>\n<body>\n  <script type=\"module\" src=\"./index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/index.js",
    "content": "import {a} from './a';\n\nconsole.log('index.js');\nconsole.log(a);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/multi-symbol-util.js",
    "content": "export * from \"./a.js\";\nexport * from \"./b.js\";\nexport * from \"./c.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/incremental-bundling/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 0\n  },\n  \"sideEffects\": [\n    \"index-multi-symbol.js\",\n    \"index-export.js\",\n    \"index-with-css.js\",\n    \"index.js\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants/a.js",
    "content": "import { MONTHS_IN_YEAR } from './constants';\n\nsideEffectNoop(MONTHS_IN_YEAR)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants/constants.js",
    "content": "export const BLOGGER = 'bloggerPlan'; // strings\nexport const PREMIUM = 'premiumPlan';\nexport const MONTHS_IN_YEAR = 12; // numbers\nexport const MONTLY_BILLING = false; // boolean\nexport const NO_PLAN = null; // null\nexport const FOO = 'FOO'; // null\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants/index.js",
    "content": "import('./a');\nimport { BLOGGER, PREMIUM } from './constants';\n\nsideEffectNoop( BLOGGER, PREMIUM );\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants/package.json",
    "content": "{\n    \"@parcel/transformer-js\": {\n        \"unstable_inlineConstants\": true\n    }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants-shared-bundles/a.html",
    "content": "<script type=\"module\" src=\"./a.js\"></script>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants-shared-bundles/a.js",
    "content": "import { BLOGGER, PREMIUM } from './constants';\n\nsideEffectNoop( BLOGGER, PREMIUM );\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants-shared-bundles/b.html",
    "content": "<script type=\"module\" src=\"./b.js\"></script>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants-shared-bundles/b.js",
    "content": "import { MONTHS_IN_YEAR } from './constants';\n\nsideEffectNoop(MONTHS_IN_YEAR)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants-shared-bundles/constants.js",
    "content": "export const BLOGGER = 'bloggerPlan'; // strings\nexport const PREMIUM = 'premiumPlan';\nexport const MONTHS_IN_YEAR = 12; // numbers\nexport const MONTLY_BILLING = false; // boolean\nexport const NO_PLAN = null; // null\nexport const FOO = 'FOO'; // null\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/inline-constants-shared-bundles/package.json",
    "content": "{\n    \"@parcel/transformer-js\": {\n        \"unstable_inlineConstants\": true\n    },\n    \"@parcel/bundler-default\": {\n        \"minBundleSize\": 0\n    }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/internalize-no-bundle-split/bar.js",
    "content": "export default import('./foo').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/internalize-no-bundle-split/foo.js",
    "content": "export default 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/internalize-no-bundle-split/index.js",
    "content": "import bar from './bar';\nimport foo from './foo';\n\nexport default Promise.all([foo, bar]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/internalize-remove-bundlegroup/core.js",
    "content": "import './worker3.js';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/internalize-remove-bundlegroup/index.js",
    "content": "new Worker(new URL('./worker1.js', import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/internalize-remove-bundlegroup/worker1.js",
    "content": "import './worker2';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/internalize-remove-bundlegroup/worker2.js",
    "content": "import './core.js';\nnew Worker(new URL('./worker3.js', import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/internalize-remove-bundlegroup/worker3.js",
    "content": "import './core.js';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/invalid-bundler-config/index.html",
    "content": "<h1>Hello</h1>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/invalid-bundler-config/package.json",
    "content": "{\n\t\"browserslist\": \"Chrome 80\",\n\t\"@parcel/bundler-default\": {\"minBundleSizes\": 0\n\t}\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-class-this-esm/.babelrc",
    "content": "{\n\t\"plugins\": [\"@babel/plugin-syntax-class-properties\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-class-this-esm/a.js",
    "content": "import prefix from \"./b.js\";\n\nclass Foo {\n\tx(v) {\n\t\treturn prefix + v;\n\t}\n\ty = (v) => {\n\t\treturn this.x(v);\n\t};\n}\n\nlet result = new Foo().y(123);\n\noutput = result;\nexport default result;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-class-this-esm/b.js",
    "content": "export default \"x: \";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-comment/index.js",
    "content": "const foo = \"Hello World!\";\noutput = foo;\nmodule.exports = foo;\n// something"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-dedup-hoist/a.js",
    "content": "import hello2 from './hello2'\n\nexport default `${hello2}`\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-dedup-hoist/hello1.js",
    "content": "const value = 'Hello'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-dedup-hoist/hello2.js",
    "content": "const value = 'Hello'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-dedup-hoist/index.js",
    "content": "import hello1 from './hello1'\nimport hello2 from './hello2'\n\nexport default function () {\n  return import('./a').then(function (a) {\n    return `${hello1} ${hello2}! ${a.default}`;\n  });\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-dedup-hoist/package.json",
    "content": "{\n  \"browserslist\": [\"last 1 Chrome version\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-different-contents/hello.js",
    "content": "const value = 'Hello'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-different-contents/index.js",
    "content": "import hello from './hello.js'\nimport world from './world.js'\n\nexport default `${hello} ${world}!`\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-different-contents/world.js",
    "content": "const value = 'World'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-duplicate-re-exports/a.js",
    "content": "export { c } from './c.js';\nexport const a = \"a\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-duplicate-re-exports/b.js",
    "content": "export { c } from './c.js';\nexport const b = \"b\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-duplicate-re-exports/c.js",
    "content": "export function c() {\n\treturn false;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-duplicate-re-exports/index.js",
    "content": "import { a, b, c } from \"./utilities.js\";\n\nmodule.exports = {a, b, c};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-duplicate-re-exports/utilities.js",
    "content": "export * from \"./a.js\";\nexport * from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-all/index.js",
    "content": "export * from './other';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-all/other.js",
    "content": "export default 1;\nexport const a = 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-arrow-support/bar/index.js",
    "content": "export {bar} from \"./other.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-arrow-support/bar/other.js",
    "content": "export const bar = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-arrow-support/index.js",
    "content": "import * as helpers from \"@swc/helpers\";\nimport * as bar from \"./bar\";\nimport * as foo from \"foo\";\n\nexport default [helpers, bar, foo];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-arrow-support/package.json",
    "content": "{\n  \"browserslist\": \"ie 11\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-default/.babelrc",
    "content": "{\n  \"plugins\": [\"@babel/plugin-syntax-export-default-from\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-default/index.js",
    "content": "export other from './other';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-default/other.js",
    "content": "export default 1;\nexport const a = 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-default-fn-circular-anonymous/a.mjs",
    "content": "import \"./b.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-default-fn-circular-anonymous/b.mjs",
    "content": "import { c } from \"./c.mjs\"; // imports and calls b1 (circular)\n\nexport default function () {\n\treturn \"b1\";\n}\n\nlet str = c + \"str\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-default-fn-circular-anonymous/c.mjs",
    "content": "import b1 from \"./b.mjs\";\n\nexport const c = b1();\n\nresult(c);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-default-fn-circular-named/a.mjs",
    "content": "import \"./b.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-default-fn-circular-named/b.mjs",
    "content": "import { c } from \"./c.mjs\"; // imports and calls b1 (circular)\n\nexport default function b1() {\n\treturn \"b1\";\n}\n\nlet str = c + \"str\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-default-fn-circular-named/c.mjs",
    "content": "import b1 from \"./b.mjs\";\n\nexport const c = b1();\n\nresult(c);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-destructuring/index.js",
    "content": "export const {foo} = {foo: 1};\nexport const [bar] = [2];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-functions/index.js",
    "content": "export function foo(arg1) {\n  return 'foo:' + arg1;\n}\n\nexport function bar(arg2) {\n  return 'bar:' + arg2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-import/index.js",
    "content": "import other from './other';\nexport {other};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-import/other.js",
    "content": "export default 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-import-same/index.js",
    "content": "import { foo } from \"./other.js\";\nexport { foo } from \"./other.js\";\n\nexport const bar = foo + \"4\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-import-same/other.js",
    "content": "export const foo = \"123\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-many/bar.js",
    "content": "export const bar = 'bar';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-many/baz.js",
    "content": "export default 'baz';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-many/boo.js",
    "content": "export const boo = 'boo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-many/foo.js",
    "content": "export default 'foo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-many/foobar.js",
    "content": "export default 'foobar';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-many/index.js",
    "content": "export { default as foo } from './foo';\nexport { bar } from './bar';\nexport { default } from './baz';\nexport { boo } from './boo';\nexport { default as foobar } from './foobar';\nexport * from './types';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-many/types.js",
    "content": "export const type1 = 'type1';\nexport const type2 = 'type2';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-namespace/index.js",
    "content": "export * as ns from './other';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-export-namespace/other.js",
    "content": "export default 1;\nexport const a = 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-default-live/index.js",
    "content": "import a, { set } from \"./other.js\";\n\nlet oldValue = a;\nset(789);\nlet newValue = a;\n\nexport default [oldValue, newValue]\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-default-live/other.js",
    "content": "let a = 123;\nfunction set(v) {\n\ta = v;\n}\nexport { a as default, set };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-initialization/a.mjs",
    "content": "import { c } from \"./b.mjs\";\n\nsideEffectNoop(c);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-initialization/b.mjs",
    "content": "export const foo = \"foo\";\n\nexport { c } from \"./c.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-initialization/c.mjs",
    "content": "import { foo } from \"./b.mjs\";\n\nexport const c = \"c:\" + foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-member/foo.js",
    "content": "export const foo = {\n\ta: \"b\",\n  bar: \"bar\"\n};\n\nexport const bar = \"a\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-member/index.js",
    "content": "import { foo, bar } from \"./foo.js\";\n\nexport default [bar, foo[bar], foo.bar];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-namespace/a.js",
    "content": "import * as n from './other';\nmodule.exports = n;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-namespace/b.js",
    "content": "import * as n from './class';\nmodule.exports = n;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-namespace/c.js",
    "content": "import * as n from './object.js';\nmodule.exports = n;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-namespace/class.js",
    "content": "module.exports = class {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-namespace/object.js",
    "content": "module.exports = {\n  foo: 2,\n  default: 3\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-namespace/other.js",
    "content": "export default 1;\nexport const a = 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-reexport-dep-order/a.js",
    "content": "sideEffect(\"a\");\nexport const a = \"a\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-reexport-dep-order/b.js",
    "content": "sideEffect(\"b\");\nexport const b = \"b\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-reexport-dep-order/c.js",
    "content": "sideEffect(\"c\");\nexport const c = \"c\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-reexport-dep-order/index.js",
    "content": "export * from './a'\n\nexport {b} from './b'\n\nimport './c'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-shadow/foo.js",
    "content": "export function foo() {\n  return 'foo';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-shadow/index.js",
    "content": "import { foo } from './foo';\nexport function baz() {\n  const _foo = foo();\n  return _foo;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-shadow-for-var/index.js",
    "content": "import { f, g, h } from \"./other.js\";\n\nexport function baz() {\n  {\n    class g {}\n    var h = {};\n  }\n\n\tfor (var f = [], i = 0; i < 4; i++) {\n\t\tf[i] = i;\n\t}\n\n\treturn typeof g === 'number' && typeof h === 'object' && f;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-shadow-for-var/other.js",
    "content": "export const f = 10;\nexport const g = 20;\nexport const h = 30;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-shadow-func-var/index.js",
    "content": "import { foo } from \"./other.js\";\n\nfunction func(foo) {}\n\nfunction func2() {\n  var foo = 2;\n}\nconst func3 = () => {\n  var foo = 3;\n}\n\nexport default foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-shadow-func-var/other.js",
    "content": "export const foo = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-this/index.js",
    "content": "import returnThisDefault, { returnThis } from \"./other.js\";\nimport * as other from \"./other.js\";\n\nimport returnThisWrappedDefault, { returnThis as returnThisWrapped } from \"./other-wrapped.js\";\nimport * as otherWrapped from \"./other-wrapped.js\";\n\nlet result = {\n  unwrappedNamed: returnThis(),\n  unwrappedDefault: returnThisDefault(),\n  unwrappedNamespace: other.returnThis(),\n  wrappedNamed: returnThisWrapped(),\n  wrappedDefault: returnThisWrappedDefault(),\n  wrappedNamespace: otherWrapped.returnThis(),\n};\n\noutput = result;\nexport default result;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-this/other-wrapped.js",
    "content": "import * as ns from \"./other-wrapped.js\";\n\nlet y = typeof module !== \"undefined\" ? module : {};\n\nexport function returnThis() {\n  if (y != null) {\n    return [this === undefined, this === ns];\n  } else {\n    throw new Error();\n  }\n}\n\nexport default returnThis;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-import-this/other.js",
    "content": "import * as ns from \"./other.js\";\n\nexport function returnThis() {\n  return [this === undefined, this === ns];\n}\n\nexport default returnThis;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-invalid-import/index.js",
    "content": "import './doesnotexisstt';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-invalid-import/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-require-free/index.js",
    "content": "const x = {\n\trequire: [\"a\", \"b\"],\n};\n\noutput(\n\tx.require[\n\t\t(() => {\n\t\t\tlet x = typeof require !== \"undefined\" && require;\n\t\t\treturn 0;\n\t\t})()\n\t]\n);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-require-import-different/addons.js",
    "content": "export * from \"./hooks\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-require-import-different/hooks.js",
    "content": "export var HooksContext = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-require-import-different/index.js",
    "content": "import { StoryStore } from './store';\n\noutput = [StoryStore, require('./addons')];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-require-import-different/package.json",
    "content": "{\n  \"sideEffects\": [\n    \"index.js\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-require-import-different/store.js",
    "content": "import { HooksContext } from \"./addons\";\nexport var StoryStore = HooksContext;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-runtime-dedup/async1.js",
    "content": "import shared from \"./shared.js\";\n\nexport default shared;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-runtime-dedup/async2.js",
    "content": "import shared from \"./shared.js\";\n\nexport default shared;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-runtime-dedup/index.js",
    "content": "module.exports = output = Promise.all([import(\"./async1\"), import(\"./async2\")]).then(\n\t([{ default: a }, { default: b }]) => a === b\n);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-runtime-dedup/shared.js",
    "content": "export default { a: 123 };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-same-contents-different-dependencies/hello/index.js",
    "content": "// hello/index.js and world/index.js are exactly the same content-wise, but in different locations\nimport value from './value'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-same-contents-different-dependencies/hello/value.js",
    "content": "const value = 'Hello'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-same-contents-different-dependencies/index.js",
    "content": "import hello from './hello'\nimport world from './world'\n\nexport default `${hello} ${world}!`\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-same-contents-different-dependencies/world/index.js",
    "content": "// hello/index.js and world/index.js are exactly the same content-wise, but in different locations\nimport value from './value'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-same-contents-different-dependencies/world/value.js",
    "content": "const value = 'World'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-same-contents-same-dependencies/hello1.js",
    "content": "const value = 'Hello'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-same-contents-same-dependencies/hello2.js",
    "content": "const value = 'Hello'\nexport default value\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-same-contents-same-dependencies/index.js",
    "content": "import hello1 from './hello1'\nimport hello2 from './hello2'\n\nexport default `${hello1} ${hello2}!`\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-this-commonjs/a.js",
    "content": "const x = require(\"./b.js\");\n\nmodule.exports.foo = 2;\n\nresult([this, x]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-this-commonjs/b.js",
    "content": "module.exports = 1234;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-this-es6/a.js",
    "content": "result([this, x]);\n\nimport x from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-this-es6/b.js",
    "content": "export default 1234;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-unused-import-specifier/a.js",
    "content": "output = used;\n\nimport {used, unused} from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-unused-import-specifier/b.js",
    "content": "export const used = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/js-unused-import-specifier-node-modules/a.js",
    "content": "import a from \"library\";\n\noutput = a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/json/index.js",
    "content": "var local = require('./local.json');\n\nmodule.exports = function () {\n  return local.a + local.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/json/local.json",
    "content": "{\n  \"a\": 1,\n  \"b\": 2\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/json5/index.js",
    "content": "var local = require('./local.json5');\n\nmodule.exports = function () {\n  return local.a + local.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/json5/local.json5",
    "content": "/*\n * comment\n */\n{\n  a: 1, // comment\n  b: 2,\n}\n/* end */\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx/index.jsx",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"react\": \"^17\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-16/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-16/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"react\": \"16.14.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-18/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-18/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"react\": \"18.0.0-rc.0-next-9a7e6bf0d-2022011\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-experimental/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-experimental/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"react\": \"0.0.0-d5e1bf0-aee1b\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-preact/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-preact/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"preact\": \"^10.5\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-preact-with-alias/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-preact-with-alias/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"preact\": \"^10.5\"\n  },\n  \"alias\": {\n    \"react\": \"preact/compat\",\n    \"react-dom/test-utils\": \"preact/test-utils\",\n    \"react-dom\": \"preact/compat\",\n    \"react/jsx-runtime\": \"preact/jsx-runtime\",\n    \"react/jsx-dev-runtime\": \"preact/jsx-dev-runtime\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-tsconfig/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-tsconfig/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"preact\": \"^17\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-automatic-tsconfig/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"jsxImportSource\": \"preact\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-hyperapp/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-hyperapp/package.json",
    "content": "{\n  \"private\": true,\n \"dependencies\": {\n    \"hyperapp\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-hyperapp-no-dep/index.js",
    "content": "import * as Hyperapp from 'hyperapp'\n\nmodule.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-hyperapp-no-dep/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-member/foo.jsx",
    "content": "export const Foo = null;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-member/index.jsx",
    "content": "import { Foo } from \"./foo\";\n\nconst S = {\n\tFoo: () => \"S\",\n};\n\nmodule.exports = <S.Foo />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-nervjs/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-nervjs/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"nervjs\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-nervjs-no-dep/index.js",
    "content": "import * as Nerv from 'nervjs';\n\nmodule.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-nervjs-no-dep/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-pragma-tsconfig/index.js",
    "content": "module.exports = <><div /></>;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-pragma-tsconfig/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"preact\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-pragma-tsconfig/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"jsxFactory\": \"JSX\",\n    \"jsxFragmentFactory\": \"JSXFragment\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-preact/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-preact/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"preact\": \"^10.4\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-preact-no-dep/index.js",
    "content": "const Preact = require('preact');\n\nmodule.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-preact-no-dep/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-preact-ts/index.tsx",
    "content": "import {h} from \"preact\";\n\nmodule.exports = <div></div>;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-preact-ts/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"preact\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-preact-with-url/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-preact-with-url/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"preact\": \"https://pkg.csb.dev/preactjs/preact/commit/96082866/preact\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-react/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-react/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"react\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-react/pure-comment.js",
    "content": "import React from 'react';\n\nexport function Foo() {\n  return (\n    // @ts-ignore - another long comment\n    <div>\n      <span />\n    </div>\n  );\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-react-alias/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-react-alias/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"preact\": \"*\"\n  },\n  \"alias\": {\n    \"react\": \"preact/compat\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-react-no-dep/index.js",
    "content": "import * as React from 'react';\n\nmodule.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-react-no-dep/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-spread/index.jsx",
    "content": "const a = { a: 2 };\n\nmodule.exports = <div v=\"1\" {...a}></div>;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-spread/package.json",
    "content": "{\n  \"browserslist\": \"Chrome 70\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-tsconfig/index.js",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/jsx-tsconfig/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"jsx\": \"react\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/kotlin/index.js",
    "content": "var test = require('./test.kt');\n\nmodule.exports = test.sum(2, 3);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/kotlin/test.kt",
    "content": "@JsName(\"sum\")\nfun sum(a: Int, b: Int): Int {\n  return a + b\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/large-bundlegroup/a.js",
    "content": "module.exports = require('lodash').add(1, 1);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/large-bundlegroup/b.js",
    "content": "module.exports = require(\"react\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/large-bundlegroup/bar.js",
    "content": "import c from './c';\nimport d from './d';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/large-bundlegroup/baz.js",
    "content": "module.exports = require(\"react\")\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/large-bundlegroup/c.js",
    "content": "module.exports = require('lodash').add(2, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/large-bundlegroup/d.js",
    "content": "module.exports = require(\"react\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/large-bundlegroup/foo.js",
    "content": "import a from './a';\nimport b from './b';\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/large-bundlegroup/index.js",
    "content": "import('./a.js');\nimport('./b.js');\nimport('./c.js');\nimport('./d.js');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/large-bundlegroup/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/index-sync-async.js",
    "content": "export default () => {\n    return Promise.all([\nimport('./uses-static-component').then(c => {\n    return c.default()();\n}),\nimport('./uses-static-component-async').then(c => {\n    return c.default();\n}).then(s => {\n    return s();\n})]);\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Document</title>\n</head>\n<body>\n    <script src=\"./index.js\" type=\"module\"></script>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/index.js",
    "content": "async function main() {\n    const m = await import('./lazy-1');\n    await import('./parallel-lazy-1');\n    return m.default();\n}\n\nmain();"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/lazy-1.js",
    "content": "export default async () => {\n    const { world } = await import('./lazy-2');\n    return `Hello ${world}`;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/lazy-2.js",
    "content": "export const world = 'world';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/package.json",
    "content": "{\n    \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/parallel-lazy-1.js",
    "content": "export default async () => {\n    const m = await import('./parallel-lazy-2');\n    return m.default;\n};"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/parallel-lazy-2.js",
    "content": "export default 'parallel lazy 2';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/static-component.js",
    "content": "export default () => \"static component\";"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/uses-static-component-async.js",
    "content": "export default async () => {\n    const m = await import('./static-component');\n    return m.default;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/lazy-compile/uses-static-component.js",
    "content": "import staticComponent  from \"./static-component\"\nexport default () => {\n    return staticComponent;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less/index.js",
    "content": "require('./index.less');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less/index.less",
    "content": "@base: #f938ab;\n\n.index {\n  color: @base;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-advanced-import/a.less",
    "content": ".a {\n  color: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-advanced-import/index.js",
    "content": "require('~/index.less');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-advanced-import/index.less",
    "content": "@import '~/a.less';\n@import './nested/externals.less';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-advanced-import/nested/externals.less",
    "content": "@import 'external-less';\n@import 'external-less/a.less';\n@import 'external-less-with-main';\n@import '~/node_modules/explicit-external-less/a.less';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-advanced-import/package.json",
    "content": "{\n  \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-empty/index.js",
    "content": "require('./index.less');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-empty/index.less",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-exports/index.less",
    "content": "@import \"foo\";"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-exports/package.json",
    "content": "{\n  \"@parcel/resolver-default\": {\n    \"packageExports\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-import/a.less",
    "content": ".a {\n  color: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-import/b.less",
    "content": ".b {\n  color: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-import/c.less",
    "content": ".c {\n  color: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-import/d.less",
    "content": ".d {\n  color: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-import/index.js",
    "content": "require('./index.less');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-import/index.less",
    "content": "@import './a.less';\n@import 'b.less';\n@import './c';\n@import 'd';\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-include-paths/.lessrc.js",
    "content": "const path = require('path');\n\nmodule.exports = {\n  paths: [\n    path.join(__dirname, 'include-path'),\n    path.join(__dirname, 'node_modules', 'library')\n  ]\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-include-paths/include-path/a.less",
    "content": ".a {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-include-paths/index.js",
    "content": "require('./index.less');\n\nmodule.exports = function() {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-include-paths/index.less",
    "content": "@import 'a.less';\n@import 'b.less';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-include-paths/package.json",
    "content": "{\n    \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-postcss/index.js",
    "content": "var map = require('./index.module.less');\n\nmodule.exports = function () {\n  return map.index;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-postcss/index.module.less",
    "content": "@base: #f938ab;\n\n.index {\n  color: @base;\n  background-image: url('img.svg');\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-url/index.js",
    "content": "require('./index.less');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-url/index.less",
    "content": "@font-face {\n  font-family: \"Test\";\n  src: url(\"./fonts/test.woff2\") format(\"woff2\");\n}\n\n.index {\n  background: url(\"http://google.com\");\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-url-behavior/index.less",
    "content": ".index {\n  behavior: url(#default#VML);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-url-quotes/index.js",
    "content": "require('./index.less');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-url-quotes/index.less",
    "content": ".index {\n  // Note the literal space after \"xml\"\n  background: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22%3F%3E%3Csvg%3E%3C%2Fsvg%3E\");\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-url-rewrite/index.js",
    "content": "require('./index.less');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-url-rewrite/index.less",
    "content": "@import \"./nested/a.less\";\n@import \"./node_modules/library/b.less\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-url-rewrite/nested/a.less",
    "content": "@font-face {\n  font-family: \"A\";\n  src: url(\"./a.woff2\") format(\"woff2\");\n}\n\n.a {\n  font-family: \"A\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-url-rewrite/package.json",
    "content": "{\n    \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-webpack-import-error/index.js",
    "content": "require('./index.less')\n\nmodule.exports = function() {\n    \n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-webpack-import-error/index.less",
    "content": "@import '~library/style.less';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/less-webpack-import-error/package.json",
    "content": "{\n  \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/library-parallel-deps/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"./ParallelResolver\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/library-parallel-deps/ParallelResolver.js",
    "content": "const {Resolver} = require('@parcel/plugin');\n\nmodule.exports = new Resolver({\n  resolve({specifier}) {\n    if (specifier === './foo') {\n      return {\n        filePath: __dirname + '/foo.js',\n        priority: 'parallel'\n      };\n    }\n  }\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/library-parallel-deps/foo.js",
    "content": "module.exports = 'foo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/library-parallel-deps/index.js",
    "content": "import * as foo from './foo';\n\nexport default foo + ' bar';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/library-parallel-deps/package.json",
    "content": "{\n  \"module\": \"dist/out.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/markdown/index.md",
    "content": "# heading1\n\ncontent content content\n\n[image](./100x100.png)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/mdx/index.mdx",
    "content": "# heading1\n\ncontent content content\n\n# Below is a JSX block\n\n<div style={{ padding: '10px 30px', backgroundColor: 'tomato' }}>\n  <h2>This is a red heading</h2>\n</div>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/mdx/package.json",
    "content": "{\n  \"dependencies\": {\n    \"react\": \"^19\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/mdx-react-17/index.mdx",
    "content": "# heading1\n\ncontent content content\n\n# Below is a JSX block\n\n<div style={{ padding: '10px 30px', backgroundColor: 'tomato' }}>\n  <h2>This is a red heading</h2>\n</div>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/mdx-react-17/package.json",
    "content": "{\n  \"dependencies\": {\n    \"react\": \"17\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/a.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 'a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/b.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/bar.js",
    "content": "import a from './a';\nimport b from './b';\nimport styles from './styles.css';\nimport html from './local.html';\nimport c from './c';\n\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/buzz.js",
    "content": "import c from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/c.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 'c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/foo.js",
    "content": "import a from './a';\nimport b from './b';\nimport c from './c';\n\nexport default a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/index.js",
    "content": "import('./foo');\nimport('./bar');\nimport('./buzz');\n\nexport default 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/local.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  Hello World\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundles\": 2,\n    \"minBundleSize\": 200,\n    \"maxParallelRequests\":3\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/min-bundles/styles.css",
    "content": "p.groove {outline-style: groove;}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo/package.json",
    "content": "{\n  \"name\": \"monorepo\",\n  \"private\": true,\n  \"workspaces\": [\"pkg-a\", \"pkg-b\"],\n  \"targets\": {\n    \"default\": {\n      \"outputFormat\": \"commonjs\",\n      \"isLibrary\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo/packages/pkg-a/package.json",
    "content": "{\n  \"name\": \"pkg-a\",\n  \"private\": true,\n  \"source\": \"src/index.js\",\n  \"main\": \"dist/pkg-a.cjs.js\",\n  \"module\": \"dist/pkg-a.module.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo/packages/pkg-a/src/alt.js",
    "content": "export default function alt() {\n  return 3;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo/packages/pkg-a/src/index.js",
    "content": "export default function foo() {\n  return 2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo/packages/pkg-b/package.json",
    "content": "{\n  \"name\": \"pkg-b\",\n  \"private\": true,\n  \"source\": [\"src/index.js\"],\n  \"main\": \"dist/pkg-b.cjs.js\",\n  \"module\": \"dist/pkg-b.module.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo/packages/pkg-b/src/index.js",
    "content": "import styles from './index.module.css';\n\nexport default function foo() {\n  return styles.foo;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo/packages/pkg-b/src/index.module.css",
    "content": ".foo {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo-shared/package.json",
    "content": "{\n  \"name\": \"monorepo\",\n  \"private\": true,\n  \"workspaces\": [\"pkg-a\", \"pkg-b\"],\n  \"targets\": {\n    \"default\": {\n      \"outputFormat\": \"commonjs\",\n      \"isLibrary\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo-shared/packages/pkg-a/package.json",
    "content": "{\n  \"name\": \"pkg-a\",\n  \"private\": true,\n  \"source\": \"src/index.js\",\n  \"main\": \"dist/pkg-a.cjs.js\",\n  \"module\": \"dist/pkg-a.module.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo-shared/packages/pkg-a/src/index.js",
    "content": "import styles from '../../shared/src/index.module.css';\n\nexport default function foo() {\n  return 2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo-shared/packages/pkg-b/package.json",
    "content": "{\n  \"name\": \"pkg-b\",\n  \"private\": true,\n  \"source\": \"src/index.js\",\n  \"main\": \"dist/pkg-b.cjs.js\",\n  \"module\": \"dist/pkg-b.module.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo-shared/packages/pkg-b/src/index.js",
    "content": "import styles from '../../shared/src/index.module.css';\n\nexport default function foo() {\n  return styles.foo;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo-shared/packages/shared/package.json",
    "content": "{\n  \"name\": \"shared\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/monorepo-shared/packages/shared/src/index.module.css",
    "content": ".foo {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-asset-transformer/.babelrc",
    "content": "{\n  \"plugins\": []\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-asset-transformer/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.js\": [\"parcel-transformer-test\", \"...\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-asset-transformer/index.js",
    "content": "output = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-asset-transformer-export/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.js\": [\"parcel-transformer-test\", \"...\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-asset-transformer-export/index.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-css-bug/src/Foo/foo.css",
    "content": ".foo {\n  outline: 1px solid red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-css-bug/src/Foo/index.js",
    "content": "import './foo.css';\n\nexport default function () { return 'foo' };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-css-bug/src/entry.js",
    "content": "// This repro was taken from https://github.com/parcel-bundler/parcel/issues/8813\n\n// This file needs to import a CSS asset, so that `index.css` will be created.\nimport './main.css';\n\n/*\n   Import the CSS out of the package; causes a bundle Group entry type error.\n   This import causes the asset in the lazy imported bundle below to also be\n   named `index.css`.\n*/\nimport './Foo/foo.css';\n\n/*\n   Due to the import above, the dynamic import CSS asset is also created as\n   `index.css`, resulting in a name collision with the `index.css` asset created\n   for this file.\n\n   If the import of 'foo.css' above is removed, the dynamic import CSS asset\n   will be named `Foo.<hash>.css` as expected, like its JS file.\n\n   If the import of 'main.css' above is removed, the dynamic import CSS asset\n   will be named `index.css` as expected, but there will be no name collision\n   because this file did not generate an `index.css` asset itself.\n\n   Also, if parcel is run with a cache, on the first execution the\n   AssertionError for the bundle group will be raised.  However, on a second\n   execution, the AssertError will not occur, but the generated `index.css` will\n   only contain the content of `foo.css` and be missing the content of\n   `main.css`.\n\n   In a React app, the dynamic import occurs via React.lazy:\n     import {lazy} from 'react'\n     const foo = lazy(() => import('./Foo'));\n*/\nimport('./Foo');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-css-bug/src/main.css",
    "content": ".main {\n  outline: 1px solid blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-css-multi-entry-bug/src/Foo/foo.css",
    "content": ".foo {\n  outline: 1px solid red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-css-multi-entry-bug/src/Foo/index.js",
    "content": "import './foo.css';\n\nexport default function () { return 'foo' };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-css-multi-entry-bug/src/entry.js",
    "content": "// This repro was taken from https://github.com/parcel-bundler/parcel/issues/8813\n\nimport './main.css';\n\nimport './Foo/foo.css';\n\nimport('./Foo');\nimport('./index-sib');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-css-multi-entry-bug/src/index-sib.js",
    "content": "\nimport './main.css';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-css-multi-entry-bug/src/main.css",
    "content": ".main {\n  outline: 1px solid blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-entry/one.html",
    "content": "<!doctype html>\n<html>\n<body>\n  <h1>One</h1>\n  <script src=\"shared.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-entry/shared.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-entry/two.html",
    "content": "<!doctype html>\n<html>\n<body>\n  <h1>Two</h1>\n  <script src=\"shared.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-pipeline/index.js",
    "content": "import \"./style.css\";\nimport style from \"bundle-text:./style.css\";\n\nexport default style;\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multi-pipeline/style.css",
    "content": ".test {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multiple-empty-js-assets/a.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/multiple-empty-js-assets/b.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/multiple-empty-js-assets/index.js",
    "content": "import \"./a.js\";\nimport \"./b.js\";\n\nexport default \"foo\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multiple-import-types/dynamic-inline.js",
    "content": "import t from 'bundle-text:./other';\n\nexport const lazy = import('./other').then(({default: LazyFoo}) => LazyFoo);\nexport const text = t;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multiple-import-types/dynamic-url.js",
    "content": "export const lazy = import('./other').then(({default: LazyFoo}) => LazyFoo);\nexport const url = new URL('./other', import.meta.url).toString();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multiple-import-types/other.js",
    "content": "export default class Foo {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multiple-import-types/static-dynamic-url.js",
    "content": "import Foo from './other';\n\nexport {Foo};\nexport const LazyFoo = import('./other').then(({default: LazyFoo}) => LazyFoo);\nexport const url = new URL('./other', import.meta.url).toString();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multiple-import-types/static-dynamic.js",
    "content": "import Foo from './other';\n\nexport {Foo};\nexport const LazyFoo = import('./other').then(({default: LazyFoo}) => LazyFoo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/multiple-import-types/static-inline.js",
    "content": "import Foo from './other';\nimport text from 'bundle-text:./other';\n\n// Get around bug with exports of symbols with bailouts...\nconst t = text;\nexport {Foo, t as text};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/name-invalidation/a.js",
    "content": "export default import('./b').then(b => b.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/name-invalidation/b.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/name-invalidation/index.js",
    "content": "export default import('./a').then(a => a.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/namer-dir/package.json",
    "content": "{\n  \"source\": \"src/index.html\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/namer-dir/src/index.html",
    "content": "<!doctype html>\n<a href=\"nested/other.html\">Other</a>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/namer-dir/src/nested/other.html",
    "content": "<!doctype html>\n<p>Other</p>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/no-export-error-with-correct-filetype/package.json",
    "content": "{\n  \"source\": \"src/App.jsx\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/no-export-error-with-correct-filetype/src/App.jsx",
    "content": "import React from \"react\";\nimport { render } from \"react-dom\";\n\nimport * as styles from \"./app.module.css\"\n\nconst App = function() {\n    return <div className={styles.notExisting}></div>\n}\n\nrender(<App/>, document.getElementById(\"app\"))\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/no-export-error-with-correct-filetype/src/app.module.css",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/no-shared-bundles-from-entries/a.js",
    "content": "import _ from 'lodash'\n\nexport default _.map([2, 3, 4], x => x + 1);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/no-shared-bundles-from-entries/b.js",
    "content": "import _ from 'lodash'\n\nexport default _.map([1, 2, 3], x => x + 1);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/no-shared-bundles-from-entries/package.json",
    "content": "{\n  \"private\": true,\n  \"dependencies\": {\n    \"lodash\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/node_hashbang/local.js",
    "content": "exports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/node_hashbang/main.js",
    "content": "#!/usr/bin/env node\n\nvar {b} = require('./local');\n\nconsole.log(b);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/node_hashbang/package.json",
    "content": "{\n  \"name\": \"node_require\",\n  \"main\": \"dist/node/main.js\",\n  \"browser\": \"dist/browser/main.js\",\n  \"engines\": {\n    \"node\": \"8\"\n  },\n  \"targets\": {\n    \"main\": {\n      \"engines\": {\n        \"node\": \"8\"\n      }\n    },\n    \"browser\": {\n      \"engines\": {\n        \"browsers\": \"last 1 version\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/node_require/local.js",
    "content": "exports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/node_require/main.js",
    "content": "var {a} = require('testmodule');\nvar {b} = require('./local');\n\nmodule.exports = function () {\n  return a + b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/node_require/package.json",
    "content": "{\n  \"name\": \"node_require\",\n  \"engines\": {\n    \"node\": \"6\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/node_require_browser/local.js",
    "content": "exports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/node_require_browser/main.js",
    "content": "var {a} = require('testmodule');\nvar {b} = require('./local');\n\nmodule.exports = function () {\n  return a + b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/node_require_cache/main.js",
    "content": "Object.keys(require.cache);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/object-rest-spread/object-rest-spread.js",
    "content": "var x = {a: 'a', b: 'b'};\nvar {a: y, ...ys} = x;\nvar z = {y, ...ys};\n\nexport default function () {\n  return {x, y, z, ys};\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/optimizer-changing-type/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"optimizers\": {\n    \"*.js\": [\"parcel-optimizer-changing-type\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/optimizer-changing-type/index.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/optional-dep/index.js",
    "content": "try {\n  require('optional-dep');\n} catch (err) {\n  module.exports = err;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-global-this/index.html",
    "content": "<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-global-this/index.js",
    "content": "import('./lazy').then(m => alert(m));\nemitGlobalThis(globalThis);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-global-this/lazy.js",
    "content": "export const lazy = 'lazy value';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-loadBundleConfig/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.txt\": [\"@parcel/transformer-raw\"]\n  },\n  \"packagers\": {\n    \"*.txt\": \"parcel-packager-config\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-loadBundleConfig/a.txt",
    "content": "Hello from a\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-loadBundleConfig/b.txt",
    "content": "Hello from b\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-loadBundleConfig/index.2.html",
    "content": "<a href=\"a.txt\">a</a>\n<a href=\"b.txt\">a</a>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-loadBundleConfig/index.html",
    "content": "<a href=\"a.txt\">a</a>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-loadConfig/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.txt\": [\"@parcel/transformer-raw\"]\n  },\n  \"packagers\": {\n    \"*.txt\": \"parcel-packager-config\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-loadConfig/foo.config.json",
    "content": "{\n  \"contents\": \"1234\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/packager-loadConfig/index.txt",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcel-register/.babelrc",
    "content": "{\n  \"presets\": [\"@parcel/babel-preset\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcel-register/dispose-resolve.js",
    "content": "let {dispose} = require('@parcel/register');\nconsole.log(require.resolve('~foo.js'));\ndispose();\nconsole.log(require.resolve('~foo.js'));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcel-register/dispose-transform.js",
    "content": "let {dispose} = require('@parcel/register');\nlet indexPath = require.resolve('./index');\nrequire('./index');\ndispose();\ndelete require.cache[indexPath]\nrequire('./index');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcel-register/entry.js",
    "content": "require('@parcel/register');\nrequire('./index');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcel-register/foo.js",
    "content": "console.log('foo');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcel-register/index.js",
    "content": "// @flow\n\nimport type {Writable} from 'stream';\n\nfunction echo(...messages: Array<mixed>): void {\n  let stdout: Writable = process.stdout;\n  for (let message of messages) {\n    stdout.write(String(message))\n  }\n}\n\necho(1, 2, 3);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcel-register/resolver.js",
    "content": "require('~foo.js');\nconsole.log(require.resolve('~foo.js'));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcelrc-custom/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.js\": [\"parcel-transformer-do-nothing\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcelrc-custom/configCopy",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.js\": [\"parcel-transformer-mock\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcelrc-custom/index.js",
    "content": "let x = () => null\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcelrc-custom/package.json",
    "content": "{\n  \"name\": \"parcel-integration-parcelrc-custom\",\n  \"version\": \"1.2.3\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcelrc-monorepo/app/.parcelrc",
    "content": "{\n  \"extends\": [\"@parcel/config-default\"],\n  \"transformers\": {\n      \"*.svg\": [\"@parcel/transformer-inline-string\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcelrc-monorepo/app/index.js",
    "content": "import icon from \"./icon.svg\";\n\nexport default icon;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcelrc-monorepo/app/package.json",
    "content": "{\n\t\"name\": \"app\",\n\t\"version\": \"0.0.0\",\n\t\"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parcelrc-monorepo/package.json",
    "content": "{\n\t\"private\": true,\n\t\"workspaces\": [\n\t\t\"app\"\n\t]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parser-case-insensitive-ext/index.cSs",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parser-case-insensitive-ext/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"stylesheet\" href=\"index.cSs\" />\n</head>\n<body>\n  <h1>Hello world</h1>\n  <p>Linking to <a href=\"other.HTM\">another page</a></p>\n  <a href=\"#hash_link\">Hash link</a>\n  <a href=\"mailto:someone@acme.com\">Mailto link</a>\n  <a href=\"tel:+33636757575\">Tel link</a>\n  <script src=\"index.js\"></script>\n  <script src=\"https://unpkg.com/parcel-bundler\"></script>\n  <i>hello</i> <i>world</i>\n  <svg><use xlink:href=\"icons.SVG#icon-code\"></use></svg>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parser-case-insensitive-ext/index.js",
    "content": "alert('Hi');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/parser-case-insensitive-ext/other.HTM",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"stylesheet\" href=\"index.cSs\" />\n</head>\n<body>\n  <h1>Other page</h1>\n  <script src=\"index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pipeline-type-change/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.{txt,ini}\": [\"parcel-transformer-a\", \"parcel-transformer-b\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pipeline-type-change/index.ini",
    "content": "INPUT"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pipeline-unknown/a.js",
    "content": "import { x } from \"strange-pipeline:./b.js\";\n\nexport default x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pipeline-unknown/b.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/pipeline-unknown/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pnp-builtin/index.js",
    "content": "const {a} = require('module/');\nconst {b} = require('./local.js');\n\nmodule.exports = function() {\n  return a + b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pnp-builtin/local.js",
    "content": "exports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pnp-builtin/pnp/module/index.js",
    "content": "exports.a = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pnp-require/index.js",
    "content": "const {a} = require('testmodule');\nconst {b} = require('./local.js');\n\nmodule.exports = function() {\n  return a + b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pnp-require/local.js",
    "content": "exports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pnp-require/pnp/testmodule/index.js",
    "content": "exports.a = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-autoinstall/npm/.postcssrc",
    "content": "{\n  \"plugins\": {\n    \"postcss-test\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-autoinstall/npm/.yarnrc.yml",
    "content": "nodeLinker: node-modules\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-autoinstall/npm/index.css",
    "content": ".test {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-autoinstall/npm/package.json",
    "content": "{\n  \"name\": \"parcel-test-autoinstall-npm\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-autoinstall/postcss-test/index.js",
    "content": "module.exports = (opts = {}) => {\n  return {\n    postcssPlugin: 'postcss-test',\n    Once(root, {result}) {\n      root.walkRules((rule) => {\n        rule.each((decl) => {\n          if (decl.value === 'red') {\n            decl.value = 'green';\n          }\n        });\n      });\n    },\n  };\n};\nmodule.exports.postcss = true;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-autoinstall/postcss-test/package.json",
    "content": "{\n  \"name\": \"postcss-test\",\n  \"version\": \"1.0.0\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-autoinstall/yarn/.postcssrc",
    "content": "{\n  \"plugins\": {\n    \"postcss-cssnext\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-autoinstall/yarn/index.css",
    "content": ".test {\n  background: #9d9c;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-autoinstall/yarn/package.json",
    "content": "{\n  \"name\": \"parcel-test-autoinstall-yarn\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/composes-1.module.css",
    "content": ".composes1 {\n  composes: test from './mixins.module.css';\n  border: 3px solid orange;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/composes-2.module.css",
    "content": ".composes2 {\n  composes: test from './mixins.module.css';\n  border: 3px solid red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/composes-3.module.css",
    "content": ".composes3 {\n  composes: test from './mixins.module.scss';\n  border: 3px solid brown;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/composes-4.module.css",
    "content": ".composes4 {\n  composes: test from '~mixins.module.css';\n  border: 3px solid black;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/composes-5.module.css",
    "content": ".composes5 {\n  composes: intermediate from './mixins-intermediate.module.css';\n  border: 3px solid yellow;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/composes-6.module.css",
    "content": ".composes6 {\n  composes: test test-2 from './mixins.module.css';\n  border: 3px solid orangered;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/index.js",
    "content": "var map1 = require('./composes-1.module.css');\nvar map2 = require('./composes-2.module.css');\n\nmodule.exports = function () {\n  return Object.assign({}, map1, map2);\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/index2.js",
    "content": "var map3 = require('./composes-3.module.css');\n\nmodule.exports = function () {\n  return map3;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/index3.js",
    "content": "var map4 = require('./composes-4.module.css');\n\nmodule.exports = function () {\n  return map4;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/index4.js",
    "content": "var map5 = require('./composes-5.module.css');\n\nmodule.exports = function () {\n  return map5;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/index5.js",
    "content": "var map6 = require('./composes-6.module.css');\n\nmodule.exports = function () {\n  return map6;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/mixins-intermediate.module.css",
    "content": ".intermediate {\n  composes: test from './mixins.module.css';\n  height: 300px;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/mixins.module.css",
    "content": ".test {\n  height: 100px;\n  width: 100px;\n}\n\n.test-2 {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/mixins.module.scss",
    "content": "$test: 200px;\n\n.test {\n  height: $test;\n  width: $test;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-composes/package.json",
    "content": "{\n  \"name\": \"composes-test\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-config-package/package.json",
    "content": "{\n    \"name\": \"postcss-config-package\",\n    \"postcss\": {\n        \"plugins\": {\n            \"postcss-custom-properties\": {}\n        }\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-config-package/style.css",
    "content": ":root {\n  --varColor: red;\n}\n\nbody {\n  background-color: var(--varColor);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-dir-dependency/.postcssrc",
    "content": "{\n  \"plugins\": [\"./plugin.js\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-dir-dependency/backgrounds/green.txt",
    "content": "linear-gradient(green, pink)"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-dir-dependency/backgrounds/red.txt",
    "content": "linear-gradient(red, orange)"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-dir-dependency/index.css",
    "content": ".test {\n  background: bg-glob;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-dir-dependency/plugin.js",
    "content": "module.exports = (opts = {}) => {\n  const glob = require('fast-glob');\n  const fs = require('fs');\n  const path = require('path')\n\n  return {\n    postcssPlugin: 'postcss-test',\n    Once(root, {result}) {\n      root.walkRules((rule) => {\n        rule.each((decl) => {\n          if (decl.value === 'bg-glob') {\n            decl.value = glob.sync('backgrounds/*.txt', {cwd: __dirname}).sort().map(f => fs.readFileSync(path.join(__dirname, f))).join(', ');\n            result.messages.push({\n              type: 'dir-dependency',\n              dir: __dirname + '/backgrounds',\n              glob: '*.txt'\n            });\n          }\n        });\n      });\n    },\n  };\n};\nmodule.exports.postcss = true;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-esm-config/postcss.config.mjs",
    "content": "import postcssCustomProperties from 'postcss-custom-properties';\n\nexport default {\n  plugins: [\n    postcssCustomProperties({\n      importFrom: [\n        {\n          customProperties: {\n            '--color': 'red'\n          }\n        }\n      ]\n    })\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-esm-config/style.css",
    "content": "body {\n  background-color: var(--color);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-import/.postcssrc",
    "content": "{\n    \"plugins\": {\n        \"postcss-import\": {},\n        \"postcss-custom-properties\": {\n            \"importFrom\": [{\n                \"customProperties\": {\n                    \"--varColor\": \"green\"\n                }\n            }]\n        }\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-import/config.css",
    "content": ":root {\n  --varColor: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-import/nested/index.css",
    "content": "body {\n  background-color: var(--varColor);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-import/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-import/style.css",
    "content": "@import \"./config.css\";\n\nbody {\n  background-color: var(--varColor);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-js-config-7/postcss.config.js",
    "content": "const postcssCustomProperties = require('postcss-custom-properties');\n\nmodule.exports = {\n  plugins: [\n    postcssCustomProperties({\n      importFrom: [\n        {\n          customProperties: {\n            '--color': 'red'\n          }\n        }\n      ]\n    })\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-js-config-7/style.css",
    "content": "body {\n  background-color: var(--color);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-js-config-8/postcss.config.js",
    "content": "const postcssImport = require('postcss-import');\n\nmodule.exports = {\n  plugins: [\n    postcssImport()\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-js-config-8/style.css",
    "content": "body {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-cjs/foo.module.css",
    "content": ".foo {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-cjs/index.css",
    "content": "body {\n  background: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-cjs/index.js",
    "content": "require('./index.css');\nvar map = require('./foo.module.css');\n\nmodule.exports = function () {\n  return map.foo;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config/.postcssrc",
    "content": "{\n    \"modules\": true,\n    \"plugins\": {\n        \"postcss-modules\": {}\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config/foo.css",
    "content": ".foo {\n  color: #fff;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config/foo.js",
    "content": "const map = require('./foo.css');\n\nmodule.exports = {\n  foo: map.foo,\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config/index.css",
    "content": "body {\n  background: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config/index.js",
    "content": "require('./index.css');\nvar foo = require('./foo');\n\nmodule.exports = function () {\n  return foo.foo;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config-invalid/.postcssrc",
    "content": "{\n  \"plugins\": {\n    \"postcss-import\": {},\n    \"postcss-url\": {}\n    \"postcss-custom-properties\": {}\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config-invalid/src/index.css",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config-package/foo.css",
    "content": ".foo {\n  color: #fff;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config-package/foo.js",
    "content": "const map = require('./foo.css');\n\nmodule.exports = {\n  foo: map.foo,\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config-package/index.css",
    "content": "body {\n  background: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config-package/index.js",
    "content": "require('./index.css');\nvar foo = require('./foo');\n\nmodule.exports = function () {\n  return foo.foo;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-config-package/package.json",
    "content": "{\n  \"postcss\": {\n    \"modules\": true,\n    \"plugins\": {\n      \"autoprefixer\": {\n        \"grid\": true\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-default/index.js",
    "content": "import styles from \"./style.module.css\";\n\noutput = styles[\"b-2\"];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-default/style.module.css",
    "content": ".unused {\n  color: red;\n}\n\n.b-2 {\n  font-size: 12pt;\n}\n\n:global(.page) {\n\tborder: 1px solid black;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-namespace/global.css",
    "content": "body {\n  background: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-namespace/index.js",
    "content": "import \"./global.css\";\nimport * as styles from \"./style.module.css\";\n\noutput = styles[\"b-2\"];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-namespace/package.json",
    "content": "{\n\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-namespace/style.module.css",
    "content": ".unused {\n  color: red;\n}\n\n.b-2 {\n  font-size: 12pt;\n}\n\n:global(.page) {\n\tborder: 1px solid black;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-namespace-whole/global.css",
    "content": "body {\n  background: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-namespace-whole/index.js",
    "content": "import \"./global.css\";\nimport * as styles from \"./style.module.css\";\n\noutput = styles;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-namespace-whole/package.json",
    "content": "{\n\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-import-namespace-whole/style.module.css",
    "content": ".unused {\n  color: red;\n}\n\n.b-2 {\n  font-size: 12pt;\n}\n\n:global(.page) {\n\tborder: 1px solid black;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-optimize/.postcssrc",
    "content": "{\n    \"modules\": true,\n    \"plugins\": {\n        \"postcss-modules\": {}\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-optimize/index.css",
    "content": ".foo {\n  animation: test 200ms;\n}\n\n@keyframes test {\n  from {\n    color: red;\n  }\n\n  to {\n    color: green;\n  }\n}\n\n@keyframes unused {\n  from {\n    color: green;\n  }\n\n  to {\n    color: blue;\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-modules-optimize/index.js",
    "content": "var foo = require('./index.css');\n\nmodule.exports = function () {\n  return foo.foo;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-package-config/package.json",
    "content": "{\n  \"private\": true,\n  \"postcss\": {\n    \"plugins\": {\n      \"postcss-custom-properties\": {\n        \"importFrom\": [\n          {\n            \"customProperties\": {\n              \"--color\": \"red\"\n            }\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-package-config/style.css",
    "content": "body {\n  background-color: var(--color);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-plugins/.postcssrc.json",
    "content": "{\n  \"modules\": true,\n  \"plugins\": {\n    \"postcss-modules\": {\n      \"generateScopedName\": \"_[name]__[local]\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-plugins/index.css",
    "content": ".index {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-plugins/index.js",
    "content": "var map = require('./index.css');\n\nmodule.exports = function () {\n  return map.index;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-plugins/index2.js",
    "content": "var map = require('./index.css');\n\nmodule.exports = function () {\n  return map.index;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-plugins-decl/index.css",
    "content": ".index {\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/postcss-plugins-decl/postcss.config.js",
    "content": "module.exports = {\n  \"plugins\": [\n    {\n      postcssPlugin: 'PLUGIN NAME',\n      Rule: (rule, { Declaration }) => {\n        const decl = new Declaration({ prop: 'background-image', value: 'url(\"data:image/gif;base64,quotes\")' })\n        rule.append(decl)\n      },\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml/.posthtmlrc.js",
    "content": "module.exports = {\n  plugins: [\n    require('posthtml-include')({\n      root: __dirname\n    })\n  ]\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml/index.html",
    "content": "<!doctype html>\n<html>\n<body>\n    <include src=\"other.html\"></include>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml/other.html",
    "content": "<h1>Other page</h1>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-assets/.posthtmlrc.js",
    "content": "module.exports = {\n  plugins: {\n    \"posthtml-include\": {\n      root: __dirname\n    }\n  }\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-assets/index.html",
    "content": "<!doctype html>\n<html>\n<body>\n    <include src=\"other.html\"></include>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-assets/index.js",
    "content": "window.alert(\"Hello world!\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-assets/other.html",
    "content": "<h1>Other page</h1>\n<script src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-autoinstall/.posthtmlrc",
    "content": "{\n  \"plugins\": {\n    \"posthtml-test\": {}\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-autoinstall/.yarnrc.yml",
    "content": "nodeLinker: node-modules\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-autoinstall/index.html",
    "content": "<div id=\"test\">Test</div>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-autoinstall/package.json",
    "content": "{\n  \"name\": \"posthtml-autoinstall\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-autoinstall/posthtml-test/index.js",
    "content": "module.exports = () => (tree) => {\n  tree.match({tag: 'div'}, node => {\n    node.tag = 'span';\n    return node;\n  });\n\n  return tree;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-autoinstall/posthtml-test/package.json",
    "content": "{\n  \"name\": \"posthtml-test\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-plugin-deps/base.html",
    "content": "<html>\n    <head>\n        <title>Parcel</title>\n    </head>\n    <body>\n        <div class=\"content\"></div>\n    </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-plugin-deps/index.html",
    "content": "<extends src='base.html'>\n    <p>Hello</p>\n</extends>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-plugin-deps/posthtml.config.js",
    "content": "module.exports = {\n    plugins: [\n        require('posthtml-extend')({\n            root: __dirname\n        })\n    ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-plugins/.posthtmlrc",
    "content": "{\n  \"plugins\": {\n    \"posthtml-obfuscate\": {}\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/posthtml-plugins/index.html",
    "content": "<a href=\"mailto:sam@smith.com\">\n\tsam@smith.com\n</a>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/process/index.js",
    "content": "process.browser = false\nmodule.exports = function () {\n  return process.browser && test(process.browser);\n};\n\nfunction test(val) {\n  return val;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc/.proxyrc",
    "content": "{\n  \"/api\": {\n    \"target\": \"http://localhost:9753\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc/index.js",
    "content": "module.exports = function () {\n  return 'Hello, Parcel.js!';\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-cjs/.proxyrc.cjs",
    "content": "const {createProxyMiddleware} = require('http-proxy-middleware');\n\nmodule.exports = function(app) {\n  app.use(createProxyMiddleware('/api', {\n    target: 'http://localhost:9753/',\n    pathRewrite: {\n      '^/api': ''\n    }\n  }));\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-cjs/index.js",
    "content": "module.exports = function () {\n  return 'Hello, Parcel.js!';\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-js/.proxyrc.js",
    "content": "const {createProxyMiddleware} = require('http-proxy-middleware');\n\nmodule.exports = function(app) {\n  app.use(createProxyMiddleware('/api', {\n    target: 'http://localhost:9753/',\n    pathRewrite: {\n      '^/api': ''\n    }\n  }));\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-js/index.js",
    "content": "module.exports = function () {\n  return 'Hello, Parcel.js!';\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-json/.proxyrc.json",
    "content": "{\n  \"/api\": {\n    \"target\": \"http://localhost:9753\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-json/index.js",
    "content": "module.exports = function () {\n  return 'Hello, Parcel.js!';\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-mjs/.proxyrc.mjs",
    "content": "import {createProxyMiddleware} from 'http-proxy-middleware';\n\nexport default function(app) {\n  app.use(createProxyMiddleware('/api', {\n    target: 'http://localhost:9753/',\n    pathRewrite: {\n      '^/api': ''\n    }\n  }));\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-mjs/index.js",
    "content": "module.exports = function () {\n  return 'Hello, Parcel.js!';\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-ts/.proxyrc.ts",
    "content": "const {createProxyMiddleware} = require('http-proxy-middleware');\n\nmodule.exports = function(app: any) {\n  app.use(createProxyMiddleware('/api', {\n    target: 'http://localhost:9753/',\n    pathRewrite: {\n      '^/api': ''\n    }\n  }));\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/proxyrc-ts/index.js",
    "content": "module.exports = function () {\n  return 'Hello, Parcel.js!';\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug/index.css",
    "content": "body {\n  background: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug/index.js",
    "content": "alert('Hi');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug/index.pug",
    "content": "doctype html\nhtml\n  head\n    link(rel='stylesheet', href='index.css')\n    meta(property='og:image', content='100x100.png')\n  body\n    h1 Hello world\n    a(href='#hash_link') Hash link\n    a(href='mailto:someone@acme.com') Mailto link\n    a(href='tel:+33636757575') Tel link\n    script(src='index.js')\n    script(src='https://unpkg.com/parcel-bundler')\n    i hello\n    i world\n    svg\n      use(href='icons.svg#icon-code')\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-filters/.pugrc.js",
    "content": "module.exports = {\n  filters: {\n    'custom-filter': function (text, options) {\n      return 'FILTERED: ' + text;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-filters/index.pug",
    "content": ":custom-filter()\n    Hello!\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-include-extends/absolute/nested.pug",
    "content": "p And for nested.\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-include-extends/base.pug",
    "content": "doctype html\nhtml\n  body\n    block content\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-include-extends/index.pug",
    "content": "extends ./base.pug\n\nblock content\n  include other.pug\n  include /absolute/nested.pug\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-include-extends/other.pug",
    "content": "h1 Yep, it's working!\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-locals/.pugrc",
    "content": "{\n  \"locals\": {\n    \"data\": \"great\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-locals/index.pug",
    "content": "h1 I Love Pug\np It's a #{locals.data}!\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-minify/index.pug",
    "content": "doctype html\nhtml\n  head\n    title Minify\n  body\n    h1 Minified\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-mixins/index.pug",
    "content": "include ./mixins.pug\n\ndoctype html\nhtml\n  head\n    title Pug variables\n  body\n    +greetings('Parcel')\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-mixins/mixins.pug",
    "content": "mixin greetings(name)\n  h1 Greetings, #{name}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/pug-var/index.pug",
    "content": "doctype html\nhtml\n  head\n    title Pug variables\n  body\n    - var image = './100x100.png'\n    img(src=image, alt='100x100')\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/re-export-no-scope-hoist/package.json",
    "content": "{\n  \"source\": \"test.js\",\n  \"scope-hoist\": \"dist/scope-hoist.js\",\n  \"no-scope-hoist\": \"dist/no-scope-hoist.js\",\n  \"targets\": {\n    \"scope-hoist\": {\n      \"scopeHoist\": true,\n      \"optimize\": false\n    },\n    \"no-scope-hoist\": {\n      \"scopeHoist\": false,\n      \"optimize\": false\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/re-export-no-scope-hoist/test.js",
    "content": "import {UIIcon, Icon} from 'icon';\n\noutput(UIIcon(), Icon());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh/App.js",
    "content": "import React, { useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport Foo from \"./Foo\";\nimport { act } from \"react-dom/test-utils\";\n\nexport const App = () => {\n  const [x] = useState(Math.random());\n\n  return (\n    <div>\n      {x} <Foo />\n    </div>\n  );\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh/Foo.1.js",
    "content": "import React, { useState } from \"react\";\n\nlet Foo = () => {\n  const [x] = useState(Math.random());\n\n  return (\n    <div>\n      OtherFunctional:\n      <span>{x}</span>\n    </div>\n  );\n};\n\nexport default Foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh/Foo.2-hooks.js",
    "content": "import React, { useState } from \"react\";\n\nlet Foo = () => {\n  const [x] = useState(Math.random());\n  const [y] = useState(Math.random());\n\n  return (\n    <div>\n      Hooks:{x}:{y}\n    </div>\n  );\n};\n\nexport default Foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh/Foo.3-class.js",
    "content": "import React, { Component } from \"react\";\n\nclass Foo extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      x: Math.random()\n    };\n  }\n\n  render() {\n    return (\n      <div>\n        Class:{this.state.x}\n      </div>\n    );\n  }\n}\nexport default Foo;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh/Foo.js",
    "content": "import React, { useState } from \"react\";\n\nlet Foo = () => {\n  const [x] = useState(Math.random());\n\n  return (\n    <div>\n      Functional:{x}\n    </div>\n  );\n};\n\nexport default Foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh/index.html",
    "content": "<div id=\"root\"></div>\n<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh/index.js",
    "content": "import React, { useState } from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport { App } from \"./App\";\nimport { act } from \"react-dom/test-utils\";\n\nlet Main = () => {\n  const [x] = useState(Math.random());\n\n  return (\n    <div>\n      <span>{x}</span> <App />\n    </div>\n  );\n};\n\nexport default () =>\n  act(async () => {ReactDOM.createRoot(document.getElementById(\"root\")).render(<Main />);});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh/package.json",
    "content": "{\n    \"dependencies\": {\n        \"react\": \"^16.11.0\",\n        \"react-dom\": \"^16.11.0\"\n    }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-automatic/App.js",
    "content": "import { useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport Foo from \"./Foo\";\nimport { act } from \"react-dom/test-utils\";\n\nexport const App = () => {\n  const [x] = useState(Math.random());\n\n  return (\n    <div>\n      {x} <Foo />\n    </div>\n  );\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-automatic/Foo.1.js",
    "content": "// Don't import \"react\" to actually test automatic runtime check\nimport { useState } from \"./hooks.js\";\n\nlet Foo = () => {\n  const [x] = useState(Math.random());\n\n  return (\n    <div>\n      OtherFunctional:\n      <span>{x}</span>\n    </div>\n  );\n};\n\nexport default Foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-automatic/Foo.js",
    "content": "// Don't import \"react\" to actually test automatic runtime check\nimport { useState } from \"./hooks.js\";\n\nlet Foo = () => {\n  const [x] = useState(Math.random());\n\n  return (\n    <div>\n      Functional:{x}\n    </div>\n  );\n};\n\nexport default Foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-automatic/hooks.js",
    "content": "import * as React from \"react\";\nexport function useState(init){\n  return React.useState(init);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-automatic/index.html",
    "content": "<div id=\"root\"></div>\n<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-automatic/index.js",
    "content": "import { useState } from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport { App } from \"./App\";\nimport { act } from \"react-dom/test-utils\";\n\nlet Main = () => {\n  const [x] = useState(Math.random());\n\n  return (\n    <div>\n      <span>{x}</span> <App />\n    </div>\n  );\n};\n\nexport default () =>\n  act(async () => {ReactDOM.createRoot(document.getElementById(\"root\")).render(<Main />);});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-automatic/package.json",
    "content": "{\n    \"dependencies\": {\n        \"react\": \"^17.0.0\",\n        \"react-dom\": \"^17.0.0\"\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-circular/App.js",
    "content": "import React from 'react';\nimport {Provider} from './Provider';\n\nexport function App() {\n  return <Provider />\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-circular/Consumer.js",
    "content": "import {useContext} from 'react';\nimport {Context} from './Provider';\n\n// This prevents the module from being self accepting\n// (not all exports are react components).\nexport function tmp() {}\n\nexport function Consumer() {\n  return <>{String(useContext(Context))}</>;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-circular/Provider.js",
    "content": "import React from 'react';\nimport {Consumer} from './Consumer';\n\n// This prevents the module from being self accepting\n// since it is not a react component.\nexport let Context = React.createContext(null);\n\nexport function Provider() {\n  return (\n    <Context.Provider value={2}>\n      <Consumer />\n    </Context.Provider>\n  );\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-circular/index.html",
    "content": "<div id=\"root\"></div>\n<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-circular/index.js",
    "content": "import ReactDOM from \"react-dom/client\";\nimport { App } from \"./App\";\nimport { act } from \"react-dom/test-utils\";\n\nexport default () =>\n  act(async () => {ReactDOM.createRoot(document.getElementById(\"root\")).render(<App />);});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-circular/package.json",
    "content": "{\n    \"dependencies\": {\n        \"react\": \"^17.0.0\",\n        \"react-dom\": \"^17.0.0\"\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-inline-script/index.html",
    "content": "<!doctype html>\n<script>\n  /*asdf */\n</script>\n<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-inline-script/index.js",
    "content": "function App() {\n  return <div>test</div>;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-inline-script/package.json",
    "content": "{\n  \"dependencies\": {\n    \"react\": \"^19\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-lazy-child/App.js",
    "content": "import React, { Suspense, lazy, useState } from \"react\";\n\nconst child = import(\"./Async\");\nconst Async = lazy(() => child);\n\nlet App = () => {\n\tconst [x] = useState(Math.random());\n\n\treturn (\n\t\t<Suspense fallback={\"Loading\"}>\n\t\t\t{x} <Async />\n\t\t</Suspense>\n\t);\n};\n\nexport default App;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-lazy-child/Async.1.js",
    "content": "import React, { useState } from \"react\";\n\nlet Async = () => {\n\tconst [x] = useState(Math.random());\n\n\treturn <div>OtherAsync:{x}</div>;\n};\n\nexport default Async;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-lazy-child/Async.js",
    "content": "import React, { useState } from \"react\";\n\nlet Async = () => {\n\tconst [x] = useState(Math.random());\n\n\treturn <div>Async:{x}</div>;\n};\n\nexport default Async;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-lazy-child/index.html",
    "content": "<div id=\"root\"></div>\n<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-lazy-child/index.js",
    "content": "import React, { useState } from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport App from \"./App\";\nimport { act } from \"react-dom/test-utils\";\n\nlet Main = () => {\n  const [x] = useState(Math.random());\n\n  return (\n    <div>\n      <span>{x}</span> <App />\n    </div>\n  );\n};\n\nexport default () =>\n  act(async () => {ReactDOM.createRoot(document.getElementById(\"root\")).render(<Main />);});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-lazy-child/package.json",
    "content": "{\n    \"dependencies\": {\n        \"react\": \"^16.11.0\",\n        \"react-dom\": \"^16.11.0\"\n    }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-library-target/Component.jsx",
    "content": "import React from 'react';\n\nconst Component = () => {\n  return <div>test</div>;\n}\n\nexport default Component\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-library-target/index.js",
    "content": "import Component from './Component'\n\nexport {Component}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/react-refresh-library-target/package.json",
    "content": "{\n  \"source\": \"index.js\",\n  \"main\": \"dist/main.js\",\n  \"dependencies\": {\n    \"@parcel/transformer-react-refresh-wrap\": \"*\",\n    \"react\": \"*\",\n    \"react-dom\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reason/index.js",
    "content": "var local = require('./local.re');\n\nmodule.exports = function () {\n  return local.a + local.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reason/local.bs.js",
    "content": "// Generated by BUCKLESCRIPT VERSION 1.9.2, PLEASE EDIT WITH CARE\n'use strict';\n\n\nvar a = 1;\n\nvar b = 2;\n\nexports.a = a;\nexports.b = b;\n/* No side effect */\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reason/local.re",
    "content": "let a = 1;\n\nlet b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-failure/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"reporters\": [\"./test-reporter\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-failure/index.js",
    "content": "export function main() {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-failure/test-reporter/index.js",
    "content": "const { Reporter } = require('@parcel/plugin');\n\nmodule.exports = new Reporter({\n  async report({ event }) {\n    if (event.type === 'buildSuccess') {\n      throw new Error('Failed to report buildSuccess');\n    }\n  }\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-failure/test-reporter/package.json",
    "content": "{\n  \"name\": \"test-reporter\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-load-failure/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"reporters\": [\"./test-reporter\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-load-failure/index.js",
    "content": "export function main() {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-success/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"reporters\": [\"./test-reporter\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-success/index.js",
    "content": "export function main() {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-success/test-reporter/index.js",
    "content": "const { Reporter } = require('@parcel/plugin');\n\nmodule.exports = new Reporter({\n  async report({ event }) {}\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/reporters-success/test-reporter/package.json",
    "content": "{\n  \"name\": \"test-reporter\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/require-async/async.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/require-async/parcel.js",
    "content": "module.exports = Promise.resolve(require('./async'));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/require-async/resolve-chain.js",
    "content": "module.exports = Promise.resolve(require('./async')).then(x => x + 1335);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/require-async/rollup.js",
    "content": "module.exports = new Promise(function (resolve) { resolve(require('./async')); });\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/require-async/sync.js",
    "content": "module.exports = new Promise(resolve => {\n  let b = require('./async');\n  resolve(b + 3);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/require-async/ts-interop-arrow.js",
    "content": "// TypeScript's esModuleInterop flag generates code like this when compiling dynamic import()\n\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n    result[\"default\"] = mod;\n    return result;\n};\nmodule.exports = Promise.resolve().then(() => __importStar(require('./async')));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/require-async/ts-interop.js",
    "content": "// TypeScript's esModuleInterop flag generates code like this when compiling dynamic import()\n\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n    result[\"default\"] = mod;\n    return result;\n};\nmodule.exports = Promise.resolve().then(function () { return __importStar(require('./async')); });\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/require-async/ts.js",
    "content": "module.exports = Promise.resolve().then(function () { return require('./async'); });\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/require-scope/index.js",
    "content": "const test = {\n  unaryFnExpr: 'test failed',\n  fnExpr: 'test failed',\n  fnDecl: 'test failed',\n  varDecl: 'test failed',\n  topVarDecl: 'test failed'\n};\n\nmodule.exports.test = test;\n\nfunction main(require) {\n  require('test passed');\n}\n\nmain(x => test.fnDecl = x);\n\n(function(require) {\n  require('test passed')\n})(x => test.fnExpr = x);\n\nvoid function main(require) {\n  require('test passed');\n}(x => test.unaryFnExpr = x);\n\nvoid function main() {\n  const require = x => test.varDecl = x\n\n  require('test passed')\n}()\n\nfunction require(x) {\n  return test.topVarDecl = x;\n}\n\nrequire('test passed')\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-empty-specifier/index.js",
    "content": "import \"\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/.eslintrc.json",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/both-fields.js",
    "content": "const required = require('./pkg-both')\n\nif(required.test() !== 'pkg-es6-module') {\n    throw new Error('Invalid module')\n}\n\nexport const test = required.test\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/browser-multiple.js",
    "content": "const projected = require('./pkg-browser-multiple/projected')\nconst entry = require('./pkg-browser-multiple')\n\nexport const test = {projected, entry}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/browser.js",
    "content": "const required = require('./pkg-browser')\n\nexport const test = required.test\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/ignore-fs.js",
    "content": "import file from './pkg-ignore-fs'\n\nexport function test() {\n  return file()\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/jsnext-field.js",
    "content": "const required = require('./pkg-jsnext-module')\n\nif(required.test() !== 'pkg-jsnext-module') {\n    throw new Error('Invalid module')\n}\n\nexport const test = required.test\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/main-field.js",
    "content": "const required = require('./pkg-main')\n\nif(required.test() !== 'pkg-main-module') {\n    throw new Error('Invalid module')\n}\n\nexport const test = required.test\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/module-field.js",
    "content": "const required = require('./pkg-es6-module')\n\nif(required.test() !== 'pkg-es6-module') {\n    throw new Error('Invalid module')\n}\n\nexport const test = required.test\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-both/es6.module.js",
    "content": "export function test() {\n    return 'pkg-es6-module'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-both/package.json",
    "content": "{\n    \"name\": \"pkg-both\",\n    \"main\": \"./does-not-exist.js\",\n    \"jsnext:main\": \"./jsnext.module.js\",\n    \"module\": \"./es6.module.js\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-browser/browser-module.js",
    "content": "export function test() {\n    return 'pkg-browser'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-browser/node-module.js",
    "content": "export function test() {\n  return 'pkg-main'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-browser/package.json",
    "content": "{\n    \"name\": \"pkg-browser\",\n    \"main\": \"./node-module.js\",\n    \"browser\": \"./browser-module.js\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-browser-multiple/browser-entry.js",
    "content": "export function test() {\n    return 'pkg-browser-multiple browser-entry'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-browser-multiple/node-entry.js",
    "content": "export function test() {\n  return 'pkg-browser-multiple main-entry'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-browser-multiple/package.json",
    "content": "{\n    \"name\": \"pkg-browser-multiple\",\n    \"main\": \"./node-entry.js\",\n    \"browser\": {\n        \"./projected.js\": \"./projected-browser.js\",\n        \"pkg-browser-multiple\": \"browser-entry.js\"\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-browser-multiple/projected-browser.js",
    "content": "export function test() {\n    return 'pkg-browser-multiple'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-browser-multiple/projected.js",
    "content": "export function test() {\n  return 'pkg-main-multiple'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-es6-module/es6.module.js",
    "content": "export function test() {\n    return 'pkg-es6-module'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-es6-module/package.json",
    "content": "{\n    \"name\": \"pkg-es6-module\",\n    \"main\": \"./does-not-exist.js\",\n    \"module\": \"./es6.module.js\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-ignore-browser/ignore-me-in-browsers.js",
    "content": "module.exports = \"this should only exist in non-browser builds\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-ignore-browser/index.js",
    "content": "module.exports = require('./ignore-me-in-browsers');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-ignore-browser/package.json",
    "content": "{\n  \"main\": \"index.js\",\n  \"browser\": {\n    \"./ignore-me-in-browsers\": false\n  },\n  \"targets\": {\n    \"browsers\": {\n      \"engines\": {\n        \"browsers\": [\">= 1%\"]\n      }\n    },\n    \"node\": {\n      \"engines\": {\n        \"node\": \"12\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-ignore-fs/index.js",
    "content": "export default () => {\n  try {\n    // We expect browser-resolve to replace fs with an empty module, so readFileSync will be undefined\n    return require('fs').readFileSync(__dirname + '/package.json')\n  }\n  catch(_) {\n    return 'test-pkg-ignore-fs-ok'\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-ignore-fs/package.json",
    "content": "{\n  \"name\": \"pkg-ignore-fs\",\n  \"main\": \"index.js\",\n  \"browser\": {\n    \"fs\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-jsnext-module/jsnext.module.js",
    "content": "export function test() {\n    return 'pkg-jsnext-module'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-jsnext-module/package.json",
    "content": "{\n    \"name\": \"pkg-jsnext-module\",\n    \"main\": \"./does-not-exist.js\",\n    \"jsnext:main\": \"./jsnext.module.js\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-main/main.js",
    "content": "export function test() {\n    return 'pkg-main-module'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-entries/pkg-main/package.json",
    "content": "{\n    \"name\": \"pkg-main\",\n    \"main\": \"./main.js\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-exports/index.js",
    "content": "import foo from 'foo';\n\nexport default 'hello ' + foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-exports/package.json",
    "content": "{\n  \"private\": true,\n  \"@parcel/resolver-default\": {\n    \"packageExports\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-index-fallback/incorrect-entry-fallback/index.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-index-fallback/incorrect-entry-fallback/package.json",
    "content": "{\n  \"main\": \"does-not-exist.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-index-fallback/incorrect-entry.js",
    "content": "import value from './incorrect-entry-fallback';\nexport default value;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-index-fallback/no-entry-fallback/index.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-index-fallback/no-entry-fallback/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-index-fallback/no-entry.js",
    "content": "import value from './no-entry-fallback';\nexport default value;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-mode-condition/default.js",
    "content": "throw new Error('Should never resolve');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-mode-condition/dev.js",
    "content": "export const isDevelopment = true;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-mode-condition/index.js",
    "content": "import {isDevelopment} from '#is-development';\nexport default isDevelopment ? 'development' : 'production';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-mode-condition/package.json",
    "content": "{\n  \"module\": \"dist/module.js\",\n  \"imports\": {\n    \"#is-development\": {\n      \"development\": \"./dev.js\",\n      \"production\": \"./prod.js\",\n      \"default\": \"./default.js\"\n    }\n  },\n  \"@parcel/resolver-default\": {\n    \"packageExports\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-mode-condition/prod.js",
    "content": "export const isDevelopment = false;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-node-prefix/package.json",
    "content": "{\n  \"name\": \"resolve-node-prefix\",\n  \"private\": true,\n  \"engines\": {\n    \"node\": \"12\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-node-prefix/src/index.js",
    "content": "import * as crypto from 'node:crypto';\n\nfunction createHash() {\n    const hash = crypto.createHash('sha256');\n    hash.update('some data to hash');\n    return hash.digest('hex')\n}\n\nexport default createHash();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-spaces/index.html",
    "content": "<!doctype html>\n<html>\n<body>\n    <a href=\"other page.html\">other page</a>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-spaces/other page.html",
    "content": "<!doctype html>\n<html>\n<body>\n  <a href=\"index.html\">index</a>\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-symlinked-monorepos/packages/app/index.js",
    "content": "import count from 'pkg';\nimport init from 'library';\n\ninit();\nexport default count();"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-symlinked-monorepos/packages/app/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-symlinked-monorepos/packages/library/package.json",
    "content": "{\n  \"name\": \"library\",\n  \"main\": \"src/index.js\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-symlinked-monorepos/packages/library/src/index.js",
    "content": "import count from 'pkg';\n\nexport default function init() {\n  count();\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-symlinked-monorepos/pnpm-workspace.yaml",
    "content": "packages:\n  # all packages in subdirs of packages/\n  - 'packages/*'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-symlinked-node_modules-structure/index.js",
    "content": "import {answer} from 'library';\n\nexport default answer;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-symlinked-node_modules-structure/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-tilde-monorepo/client/other.js",
    "content": "export default 1234;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-tilde-monorepo/client/package.json",
    "content": "{\n  \"name\": \"client\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-tilde-monorepo/client/src/index.js",
    "content": "import x from \"~/other.js\";\n\nexport default x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-tilde-monorepo/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-tilde-nodemodules/index.js",
    "content": "import x from \"library\";\n\nexport default x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolve-tilde-nodemodules/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-alternative-module/index.js",
    "content": "const babel = require('@baebal/core');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-alternative-module/package.json",
    "content": "{\n    \"name\": \"resolver-alternative-module-test\",\n    \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-alternative-relative/a.js",
    "content": "const test = require('./test/teste.js');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-alternative-relative/b.js",
    "content": "const a = require('./aa.js');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-alternative-relative/package.json",
    "content": "{\n    \"name\": \"resolver-alternative-relative-test\",\n    \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-alternative-relative/test/test.js",
    "content": "const a = require('../../a.js');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-can-invalidateonenvchange/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"parcel-resolver-can-invalidateonenvchange\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-can-invalidateonenvchange/index.js",
    "content": "const willBeReplaced = true;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-can-invalidateonenvchange/package.json",
    "content": "{\n    \"name\": \"test-resolver-invalidateonenevchange\",\n    \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-canDefer/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"parcel-resolver-no-defer\"],\n  \"bundler\": \"parcel-bundler-no-defer\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-canDefer/index.js",
    "content": "import {a, index} from \"./library\";\n\noutput = [a, index];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-canDefer/library/a.js",
    "content": "sideEffect(\"a\");\nexport const a = \"A\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-canDefer/library/b.js",
    "content": "sideEffect(\"b\");\nexport const b = \"B\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-canDefer/library/c.js",
    "content": "sideEffect(\"c\");\nexport const c = \"C\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-canDefer/library/index.js",
    "content": "sideEffect(\"index\");\nexport {a} from \"./a.js\";\nexport {b} from \"./b.js\";\nexport {c} from \"./c.js\";\nexport const index = \"Index\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-canDefer/library/package.json",
    "content": "{\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-dependency-meta/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"parcel-resolver-meta\", \"...\"],\n  \"runtimes\": [\"parcel-runtime-meta\", \"...\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-dependency-meta/a.js",
    "content": "import \"./b.js\";\nimport \"foo\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-dependency-meta/b.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-dependency-meta/package.json",
    "content": "{\n  \"private\": true,\n  \"main\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-invalid-pkgjson/index.js",
    "content": "const invalidModule = require('invalid-module')\n\nmodule.exports = () => {\n    return 'hello world!';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/resolver-invalid-pkgjson/package.json",
    "content": "{\n    \"name\": \"test-invalid-pkg-json\",\n    \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/runtime-deferred-excluded/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"runtimes\": [\"parcel-runtime-test\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/runtime-deferred-excluded/index.js",
    "content": "import {index, used} from 'test/indexstar';\n\noutput = [index, used];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/runtime-deferred-excluded/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/runtime-symbol-merging/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"runtimes\": [\"parcel-runtime-mock\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/runtime-symbol-merging/entry.js",
    "content": "import {a} from \"shared\";\n\ncall(a);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/runtime-update/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"runtimes\": [\n    \"parcel-runtime-mock\",\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/runtime-update/dynamic-runtime.js",
    "content": "module.exports = 'INITIAL CODE'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/runtime-update/src/index.js",
    "content": "export default function main() {\n  console.log('hello');\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust/.eslintrc",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust/add.rs",
    "content": "#[no_mangle]\npub fn add(a: i32, b: i32) -> i32 {\n    return a + b\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust/index.js",
    "content": "module.exports = import('./add.rs').then(function ({add}) {\n  return add(2, 3);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-cargo/.eslintrc",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-cargo/Cargo.toml",
    "content": "[package]\nname = \"cargo-test\"\nversion = \"0.1.0\"\nauthors = [\"josealbizures <albizures3601@gmail.com>\"]\n\n[dependencies]\n\n[lib]\ncrate-type = [\"cdylib\"]\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-cargo/src/index.js",
    "content": "module.exports = import('./lib.rs').then(function ({add}) {\n  return add(2, 3);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-cargo/src/lib.rs",
    "content": "#[no_mangle]\npub fn add(a: i32, b: i32) -> i32 {\n    return a + b\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-cargo-workspace/.eslintrc",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-cargo-workspace/Cargo.toml",
    "content": "[workspace]\nmembers = [\n  \"member\"\n]\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-cargo-workspace/member/Cargo.toml",
    "content": "[package]\nname = \"member\"\nversion = \"0.1.0\"\nauthors = [\"josealbizures <albizures3601@gmail.com>\"]\n\n[dependencies]\n\n[lib]\ncrate-type = [\"cdylib\"]\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-cargo-workspace/member/src/index.js",
    "content": "module.exports = import('./lib.rs').then(function ({add}) {\n  return add(2, 3);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-cargo-workspace/member/src/lib.rs",
    "content": "#[no_mangle]\npub fn add(a: i32, b: i32) -> i32 {\n    return a + b\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-deps/.eslintrc",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-deps/add.rs",
    "content": "pub fn add(a: i32, b: i32) -> i32 {\n    return a + b\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-deps/index.js",
    "content": "module.exports = import('./test.rs').then(function ({test}) {\n  return test(2, 3);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/rust-deps/test.rs",
    "content": "mod add;\nuse add::*;\n\n#[no_mangle]\npub fn test(a: i32, b: i32) -> i32 {\n    return add(a, b) + 5;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-contents-different-filepaths/index.js",
    "content": "import('./path1/a');\nimport('./path2/a');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-contents-different-filepaths/path1/a.js",
    "content": "console.log('test');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-contents-different-filepaths/path2/a.js",
    "content": "console.log('test');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-dependency-multiple-times/a1.js",
    "content": "import './a2';\nimport('./b');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-dependency-multiple-times/a2.js",
    "content": "import('./b');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-dependency-multiple-times/b.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-resource-multiple-bundles/a.js",
    "content": "import url from './shared';\nexport default url;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-resource-multiple-bundles/b.js",
    "content": "import url from './shared';\nexport default url;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-resource-multiple-bundles/index.js",
    "content": "function doesNotRun() {\n  return import('./a');\n}\n\nexport default () => import('./b').then(b => b.default);\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-resource-multiple-bundles/resource.txt",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/same-resource-multiple-bundles/shared.js",
    "content": "import url from 'url:./resource.txt';\n\nexport default url;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass/index.js",
    "content": "require('./index.sass');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass/index.sass",
    "content": "$base: #f938ab\n\n.index\n  color: $base\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-advanced-import/_foo.sass",
    "content": ".foo\n  color: pink\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-advanced-import/bar.sass",
    "content": ".bar\n  color: green\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-advanced-import/index.sass",
    "content": "@use \"~/foo\"\n@use \"~/bar.sass\"\n\n.index\n  background: #ffffff\n  color: #000000\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-advanced-import/package.json",
    "content": "{\n  \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-exports/index.sass",
    "content": "@use \"library\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-exports/package.json",
    "content": "{\n  \"private\": true,\n  \"@parcel/resolver-default\": {\n    \"packageExports\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-include-paths-import/.sassrc.js",
    "content": "const path = require('path')\n\nmodule.exports = {\n    includePaths: [\n        path.join(__dirname, \"include-path\")\n    ],\n    silenceDeprecations: ['legacy-js-api']\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-include-paths-import/include-path/style.sass",
    "content": ".included\n    color: red"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-include-paths-import/index.sass",
    "content": "@use \"style.sass\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-include-paths-import/package.json",
    "content": "{\n  \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-load-paths-import/.sassrc.js",
    "content": "const path = require('path')\n\nmodule.exports = {\n    loadPaths: [\n        path.join(__dirname, \"include-path\")\n    ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-load-paths-import/include-path/style.sass",
    "content": ".included\n    color: red"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-load-paths-import/index.sass",
    "content": "@use \"style.sass\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-load-paths-import/package.json",
    "content": "{\n  \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-node-modules-import/index.sass",
    "content": "@use \"library/style.sass\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-node-modules-import/package.json",
    "content": "{\n  \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-webpack-import-error/index.sass",
    "content": "@use \"~library/style.sass\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sass-webpack-import-error/package.json",
    "content": "{\n  \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/schema-jsonld/index.html",
    "content": "<html>\n<head>\n  <title>hi</title>\n  <link rel=\"stylesheet\" href=\"other.css\">\n</head>\n<body>\n\n<p>text 123</p>\n\n<script type=\"application/ld+json\">\n{\n  \"@context\": \"http://schema.org\",\n  \"@type\": \"LocalBusiness\",\n  \"description\": \"This is your business description.\",\n  \"name\": \"Parcel's parcel\",\n  \"telephone\": \"555-111-2345\",\n  \"openingHours\": \"Mo,Tu,We,Th,Fr 09:00-17:00\",\n  \"logo\": {\n      \"@type\": \"ImageObject\",\n      \"url\": \"images/logo.png\",\n      \"width\": 180,\n      \"height\": 120\n    },\n  \"image\": [\"images/image.jpeg\", \"images/image.jpeg\"]\n}\n</script>\n\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/schema-jsonld/other.css",
    "content": ".other {\n  color: green;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/browserify-compat/browserify-bundle.js",
    "content": "/*\n * The following is a browserify-produced umd bundle created with:\n * `echo \"module.exports = 'foo';\" | browserify - -s foo | prettier --parser babel`\n * using browserify@16.5.0\n *\n * Includes the prelude and umd wrapper from browserify. Browserify's MIT\n * license is reproduced below.\n * https://github.com/browserify/browserify/blob/b8ddf68ac3ebc80ee3b9b1cb67e013256503efe9/LICENSE\n * https://github.com/browserify/browser-pack/blob/cd0bd31f8c110e19a80429019b64e887b1a82b2b/LICENSE\n */\n\n/**\n * MIT License\n *\n * Copyright (c) 2010 James Halliday\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n(function(f) {\n  if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n    module.exports = f();\n  } else if (typeof define === \"function\" && define.amd) {\n    define([], f);\n  } else {\n    var g;\n    if (typeof window !== \"undefined\") {\n      g = window;\n    } else if (typeof global !== \"undefined\") {\n      g = global;\n    } else if (typeof self !== \"undefined\") {\n      g = self;\n    } else {\n      g = this;\n    }\n    g.foo = f();\n  }\n})(function() {\n  var define, module, exports;\n  return (function() {\n    function r(e, n, t) {\n      function o(i, f) {\n        if (!n[i]) {\n          if (!e[i]) {\n            var c = \"function\" == typeof require && require;\n            if (!f && c) return c(i, !0);\n            if (u) return u(i, !0);\n            var a = new Error(\"Cannot find module '\" + i + \"'\");\n            throw ((a.code = \"MODULE_NOT_FOUND\"), a);\n          }\n          var p = (n[i] = { exports: {} });\n          e[i][0].call(\n            p.exports,\n            function(r) {\n              var n = e[i][1][r];\n              return o(n || r);\n            },\n            p,\n            p.exports,\n            r,\n            e,\n            n,\n            t\n          );\n        }\n        return n[i].exports;\n      }\n      for (\n        var u = \"function\" == typeof require && require, i = 0;\n        i < t.length;\n        i++\n      )\n        o(t[i]);\n      return o;\n    }\n    return r;\n  })()(\n    {\n      1: [\n        function(require, module, exports) {\n          module.exports = \"foo\";\n        },\n        {}\n      ]\n    },\n    {},\n    [1]\n  )(1);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/browserify-compat/index.js",
    "content": "output = require('./browserify-bundle');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/concat-order/a.js",
    "content": "\"use strict\";\n\nmodule.exports.a = () => 1;\n\nvar b = require(\"./b.js\");\n\noutput = b + 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/concat-order/b.js",
    "content": "\"use strict\";\n\nvar t = require(\"./a.js\");\n\nmodule.exports = t.a();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/concat-order-globals/a.js",
    "content": "const other = require(\"./b.js\");\n\noutput = Buffer.from(other).toString();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/concat-order-globals/b.js",
    "content": "const {Buffer} = require(\"buffer\");\n\nmodule.exports = Buffer.from(\"foobar\").toString();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/conditional-import-reference/a.js",
    "content": "module.exports = 'hello';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/conditional-import-reference/index.js",
    "content": "const a = require('./a');\n\nif (false) {\n  console.log(a);\n}\n\noutput = a;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/default-import/a.js",
    "content": "import foo from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/default-import/b.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/define-exports/a.js",
    "content": "export const foo = 'bar'\n\nexport function getExports() {\n    return exports\n}\n\noutput = getExports() === exports && getExports().foo\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/eliminate-exports/a.js",
    "content": "var b = require('./b');\n\nb.setFoo(3);\noutput = b.foo + b['bar'];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/eliminate-exports/b.js",
    "content": "exports.foo = 2;\nexports['bar'] = 3;\n\nexports.setFoo = function (foo) {\n  exports.foo = foo;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/empty-module/a.js",
    "content": "output = {\n  b: require('./b')\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/empty-module/b.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/es6-commonjs-hybrid/a.js",
    "content": "const {a, b} = require('./b');\n\noutput = a + b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/es6-commonjs-hybrid/b.js",
    "content": "export var a = 2;\nexports.b = 3;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/export-assign-scope/a.js",
    "content": "var b = require('./b');\n\nb.setValue(2);\noutput = b.value;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/export-assign-scope/b.js",
    "content": "exports.setValue = function (value) {\n  exports.value = value;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/export-local/a.js",
    "content": "output = require('./b').foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/export-local/b.js",
    "content": "var x = exports.foo = exports.bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/export-non-object/index.js",
    "content": "import \"./other\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/export-non-object/other.js",
    "content": "module.exports = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/export-order/a.js",
    "content": "const {a, b} = require('./b');\n\noutput = a + b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/export-order/b.js",
    "content": "exports.a = 2;\nexport var b = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/exports-assign-entry.js",
    "content": "import {COMMENT_KEYS} from './exports-assign-imported';\n\noutput = COMMENT_KEYS;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/exports-assign-imported.js",
    "content": "var t = exports;\nexports.COMMENT_KEYS = undefined;\n\nlet v = \"COMMENT_KEYS\"\nexports[v] = 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/exports-assign-reexport-entry.js",
    "content": "import { COMMENT_KEYS, other } from \"./exports-assign-reexport\";\n\noutput = [COMMENT_KEYS, other.COMMENT_KEYS];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/exports-assign-reexport.js",
    "content": "export * from \"./exports-assign\";\nexport * as other from \"./exports-assign\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/exports-assign.js",
    "content": "var t = exports;\nexports.COMMENT_KEYS = undefined;\n\nlet v = \"COMMENT_KEYS\"\nexports[v] = 5;\n\noutput = t.COMMENT_KEYS;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/exports-define-entry.js",
    "content": "import {COMMENT_KEYS} from './exports-define-imported';\n\noutput = COMMENT_KEYS;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/exports-define-imported.js",
    "content": "exports.COMMENT_KEYS = undefined;\n\nObject.defineProperty(exports, \"COMMENT_KEYS\", {\n\tget() {\n\t\treturn 5;\n\t}\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/exports-define.js",
    "content": "var t = exports;\nexports.COMMENT_KEYS = undefined;\n\nObject.defineProperty(exports, \"COMMENT_KEYS\", {\n\tget() {\n\t\treturn 5;\n\t}\n});\n\noutput = t.COMMENT_KEYS;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-assign-entry.js",
    "content": "import {COMMENT_KEYS} from './module-exports-assign-imported';\n\noutput = COMMENT_KEYS;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-assign-imported.js",
    "content": "module.exports.COMMENT_KEYS = undefined;\n\nlet v = \"COMMENT_KEYS\"\nmodule.exports[v] = 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-assign.js",
    "content": "var t = module.exports;\nmodule.exports.COMMENT_KEYS = undefined;\n\nlet v = \"COMMENT_KEYS\"\nmodule.exports[v] = 5;\n\noutput = t.COMMENT_KEYS;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-define-entry.js",
    "content": "import {COMMENT_KEYS} from './module-exports-define-imported';\n\noutput = COMMENT_KEYS;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-define-imported.js",
    "content": "module.exports.COMMENT_KEYS = undefined;\n\nObject.defineProperty(module.exports, \"COMMENT_KEYS\", {\n\tget() {\n\t\treturn 5;\n\t}\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-define.js",
    "content": "var t = module.exports;\nmodule.exports.COMMENT_KEYS = undefined;\n\nObject.defineProperty(module.exports, \"COMMENT_KEYS\", {\n\tget() {\n\t\treturn 5;\n\t}\n});\n\noutput = t.COMMENT_KEYS;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-before-module-exports/a.js",
    "content": "'use strict';\n\noutput = require('./b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-before-module-exports/b.js",
    "content": "// Assign to both `exports` and `module.exports` in CommonJS.\n// Some published packages do this in babel-generated output:\n// https://unpkg.com/browse/dom-helpers@3.4.0/class/hasClass.js\n\nexports.foo = 27;\nmodule.exports = 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-self-reference/a.js",
    "content": "const b = require('./b');\n\noutput = b.run();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-self-reference/b.js",
    "content": "module.exports.other = () => 'other';\n\nmodule.exports.run = () => `Say ${exports.other()}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-self-reference/package.json",
    "content": "{\n  \"browserslist\": \"Chrome 80\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/exports-this/a.js",
    "content": "exports.foo = function() {\n    exports.bar()\n}\n\nexports.bar = function() {\n    this.baz()\n}\n\nexports.baz = function() {\n    return 2\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/globals-polyfills/a.js",
    "content": "const test = require('./b');\n\noutput = !test(\"abc\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/globals-polyfills/b.js",
    "content": ";(function () {\n  module.exports = test\n\n  function test(data) {\n    if (typeof Buffer === 'function' && typeof Buffer.isBuffer === 'function' && Buffer.isBuffer(data)) {\n      return true;\n    }\n    return false;\n  }\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/globals-polyfills/package.json",
    "content": "{\n  \"browserslist\": [\"last 1 Chrome versions\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/import-namespace/a.js",
    "content": "import * as test from './b';\n\noutput = test.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/import-namespace/b.js",
    "content": "exports.foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-commonjs-hybrid/a.js",
    "content": "import b from './b';\nconst foo = b.foo;\nconst bar = require('./b').foo;\n\noutput = foo + bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-commonjs-hybrid/b.js",
    "content": "module.exports = {foo: 1};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-commonjs-hybrid-dynamic/a.js",
    "content": "import b from './b';\nexport const foo = b.foo; // <-- missing default interop\nexport const bar = (() => require('./b').foo)();\n\noutput = foo + bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-commonjs-hybrid-dynamic/b.js",
    "content": "module.exports = {foo: 1};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-commonjs/a.js",
    "content": "exports = module.exports = require('./b')['default'];\nexports['default'] = exports;\noutput = exports;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-commonjs/b.js",
    "content": "exports['default'] = {\n  test: 2\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-commonjs-wrapped/a.js",
    "content": "var b = require('./b');\noutput = b['default'];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-commonjs-wrapped/b.js",
    "content": "exports.default = 'default';\neval('');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module/a.js",
    "content": "output = require('./b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module/b.js",
    "content": "export default 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split/import.js",
    "content": "import shared from \"./shared\";\n\nexport default shared.foo\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split/main.js",
    "content": "import sharedBundle from './shared';\nconst importBundle = import('./import');\n\noutput = importBundle.then(importValue => importValue.default + ':' + sharedBundle.foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split/shared.js",
    "content": "const bar = require('./shared_sub');\nconst exp = { foo: bar }\n\nexport default exp;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split/shared_sub.js",
    "content": "module.exports = 'bar'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split-intermediate/import.js",
    "content": "import child from './import_child';\n\nexport default child;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split-intermediate/import_child.js",
    "content": "import shared from './shared';\n\nexport default shared.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split-intermediate/main.js",
    "content": "import mainValue from './main_child';\nconst importBundle = import('./import');\n\noutput = importBundle.then(importValue => importValue.default + ':' + mainValue);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split-intermediate/main_child.js",
    "content": "import shared from './shared';\n\nexport default shared.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split-intermediate/shared.js",
    "content": "const bar = require('./shared_sub');\nconst shared = { foo: bar };\n\nexport default shared;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/interop-require-es-module-code-split-intermediate/shared_sub.js",
    "content": "module.exports = 'bar'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/keep-local-function-var/a.js",
    "content": "const foo = require(\"./b\");\n\nlet render = function() {\n\tlet root = \"foo\";\n\toutput = root;\n};\n\nrender();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/keep-local-function-var/b.js",
    "content": "var root = require('./c');\n\nvar freeModule = typeof module == 'object' && module && !module.nodeType && module;\nmodule.exports = freeModule ? null : root;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/keep-local-function-var/c.js",
    "content": "var root = \"something else\";\nmodule.exports = root;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/live-bindings/a.js",
    "content": "const b = require('./b');\n\nb.changeFoo(3);\n\noutput = b.default + b.foo + b.bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/live-bindings/b.js",
    "content": "var foo = 2;\nexport default foo;\nexport {foo, foo as bar};\n\nexport function changeFoo(v) {\n  foo = v;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/missing-non-js/a.js",
    "content": "import './index.css';\n\noutput = 27;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/missing-non-js/index.css",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-exports-before-exports/a.js",
    "content": "'use strict';\n\noutput = require('./b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-exports-before-exports/b.js",
    "content": "module.exports = 42;\nexports.foo = 27;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-exports-default-assignment/a.js",
    "content": "import f from \"./b\";\nexport var foo = f();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-exports-default-assignment/b.js",
    "content": "\"use strict\";\nexports.__esModule = true;\nexports.default = function () {\n  return 'b';\n};\nmodule.exports = exports[\"default\"];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-exports-default-assignment/index.js",
    "content": "function x() {\n\trequire(\"./b\");\n}\noutput = require(\"./a\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-exports-self-reference/a.js",
    "content": "const b = require('./b');\n\noutput = b.run();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-exports-self-reference/b.js",
    "content": "module.exports.other = () => 'other';\n\nmodule.exports.run = () => `Say ${module.exports.other()}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-exports-self-reference/package.json",
    "content": "{\n  \"browserslist\": \"Chrome 80\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-object/a.js",
    "content": "output = {\n  id: module.id,\n  hot: module.hot,\n  moduleRequire: module.require,\n  type: typeof module,\n  exports: exports,\n  exportsType: typeof exports,\n  require: typeof require\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-object/package.json",
    "content": "{\n  \"browserslist\": [\"last 1 Chrome versions\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-require/a.js",
    "content": "output = module.require(\"./b.js\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/module-require/b.js",
    "content": "module.exports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/multi-assign/a.js",
    "content": "var foo = exports.foo = exports.baz = 2;\nexports.bar = foo;\noutput = exports;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-exports-mixed-module/index.js",
    "content": "const value = require('./value');\nvalue.cjs = value.cjs + ' mutated';\nvalue.esm = value.esm + ' mutated';\n\n\noutput = [value.cjs, value.esm, value];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-exports-mixed-module/value.js",
    "content": "export const esm = 'ESM';\n\nmodule.exports.cjs = 'CJS'"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-exports-object-different/index.js",
    "content": "require('./mutates');\nconst value = require('./value');\n\noutput = value.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-exports-object-different/mutates.js",
    "content": "const value = require('./value');\nvalue.foo = 43;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-exports-object-different/value.js",
    "content": "exports.foo = 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-exports-object-expression/index.js",
    "content": "const v = require(\"./value\");\n\nlet x = ((v.foo = 3), v[[\"f\", \"o\", \"o\"].join(\"\")]);\n\noutput = [v, v.foo, x];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-exports-object-expression/value.js",
    "content": "exports.foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-exports-object-importer/index.js",
    "content": "const value = require('./value');\nvalue.foo = 43;\n\noutput = [value.foo, value];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-exports-object-importer/value.js",
    "content": "exports.foo = 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-non-static-require/index.js",
    "content": "let x = require('./other');\nlet prop = 'fo' + 'o';\nx[prop] = 4;\nlet res = require('./other').foo;\noutput = res;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/mutated-non-static-require/other.js",
    "content": "exports.foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/named-import/a.js",
    "content": "import {foo} from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/named-import/b.js",
    "content": "exports.foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/non-identifier-symbol-name/a.js",
    "content": "const x = require(\"./b.js\");\noutput = x[\"ab c\"];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/non-identifier-symbol-name/b.js",
    "content": "module.exports[\"ab c\"] = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/non-static-exports/a.js",
    "content": "output = require('./b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/non-static-exports/b.js",
    "content": "function foo(e) {\n  e.foo = 2;\n}\n\nfoo(exports);\nexports.bar = 4;\nexports.baz = exports.bar + 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/object-pattern/a.js",
    "content": "var {foo, bar} = require('./b');\noutput = foo + bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/object-pattern/b.js",
    "content": "exports.foo = 2;\nexports.bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/object-pattern/package.json",
    "content": "{\n  \"name\": \"object-pattern\",\n  \"browserslist\": [\"last 1 Chrome version\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/re-export-var/a.js",
    "content": "const {foo, bar} = require('./b');\n\noutput = foo() + bar()\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/re-export-var/b.js",
    "content": "import {foo, bar} from './c'\n\nexport {foo, bar}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/re-export-var/c.js",
    "content": "const foo = () => 'foo'\n\nfunction bar() {\n    return 'bar'\n}\n\nexport {foo, bar}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require/a.js",
    "content": "const foo = require('./b');\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require/b.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-assign/a.js",
    "content": "require('./b').foo = 4;\noutput = require('./b').foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-assign/b.js",
    "content": "exports.foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-circular/a.js",
    "content": "module.exports.foo = 'foo'\nmodule.exports = require('./b');\noutput = module.exports;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-circular/b.js",
    "content": "module.exports = require('./a').foo + ' bar'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-conditional/a.js",
    "content": "output('a');\n\nif (b) {\n  require('./b');\n}\n\noutput('d');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-conditional/b.js",
    "content": "output('b');\nrequire('./c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-conditional/c.js",
    "content": "output('c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-css/a.js",
    "content": "const x = require(\"./b.css\");\noutput = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-css/b.css",
    "content": "body {\n\tcolor: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-default-export-declaration/a.js",
    "content": "const foo = require('./b').default;\n\noutput = foo();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-default-export-declaration/b.js",
    "content": "export default function foo() {\n  return 2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-default-export-expression/a.js",
    "content": "const foo = require('./b').default;\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-default-export-expression/b.js",
    "content": "export default 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-default-export-variable/a.js",
    "content": "const foo = require('./b').default;\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-default-export-variable/b.js",
    "content": "var foo = 2;\nexport default foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-execution-order/a.js",
    "content": "output('a');\nrequire('./b');\noutput('d');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-execution-order/b.js",
    "content": "output('b');\nrequire('./c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-execution-order/c.js",
    "content": "output('c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-extensions/index.js",
    "content": "if (typeof require !== 'undefined' && require.extensions) {\n  require.extensions['.handlebars'] = extension;\n  require.extensions['.hbs'] = extension;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function/a.js",
    "content": "output('a');\n\nfunction x() {\n  return require('./b');\n}\n\noutput('c');\nx();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function/b.js",
    "content": "output('b');\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function-import/a.js",
    "content": "output('a');\n\nfunction x() {\n  return require('./b');\n}\n\noutput('d');\nx();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function-import/b.js",
    "content": "import './c';\noutput('b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function-import/c.js",
    "content": "output('c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function-import-hoist/a.js",
    "content": "output('a');\n\nfunction x() {\n  return require('./b');\n}\n\noutput('d');\nx();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function-import-hoist/b.js",
    "content": "output('b');\nimport './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function-import-hoist/c.js",
    "content": "output('c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function-reexport/a.js",
    "content": "output('a');\n\nfunction x() {\n  return require('./b');\n}\n\noutput('d');\nx();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function-reexport/b.js",
    "content": "export {x} from './c';\noutput('b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-in-function-reexport/c.js",
    "content": "export var x = 2;\noutput('c');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-local-assign/b.js",
    "content": "export let foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-local-assign/basic.js",
    "content": "let b = require('./b');\nlet b2 = require('./b');\noutput([b, b2]);\nb = 4;\noutput([b, b2]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-local-assign/destructure.js",
    "content": "let {foo} = require('./b');\nlet {foo: foo2} = require('./b');\noutput([foo, foo2]);\nfoo = 4;\noutput([foo, foo2]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-local-assign/in-function.js",
    "content": "function test() {\n  b = 4;\n}\n\nlet b = require('./b');\nlet b2 = require('./b');\noutput([b, b2]);\ntest();\noutput([b, b2]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-local-assign/member.js",
    "content": "let b = require('./b').foo;\nlet b2 = require('./b').foo;\noutput([b, b2]);\nb = 4;\noutput([b, b2]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-member-wrapped/a.js",
    "content": "let b = require('./b');\noutput = b({\n  foo: 2\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-member-wrapped/b.js",
    "content": "module.exports = function (self) {\n  return require('./c').bind(self)\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-member-wrapped/c.js",
    "content": "module.exports = function () {\n  return {\n    ...this,\n    bar: 4\n  };\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-multiple/a.js",
    "content": "var before = 'before', \n  b = require('./b'), \n  middle = 'middle', \n  c = require('./c'), \n  after = 'after';\n\noutput = `${before} ${b.foo()} ${middle} ${c.bar()} ${after}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-multiple/b.js",
    "content": "exports.foo = function () {\n  return 'foo';\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-multiple/c.js",
    "content": "exports.bar = function () {\n  return 'bar';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-named-export-declaration/a.js",
    "content": "const {foo} = require('./b');\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-named-export-declaration/b.js",
    "content": "export var foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-named-export-variable/a.js",
    "content": "const {foo} = require('./b');\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-named-export-variable/b.js",
    "content": "var foo = 2;\nexport {foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-new/a.js",
    "content": "output = new (require(\"./b.js\"))();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-new/b.js",
    "content": "module.exports = class {\n  foo() {\n    return 1;\n  }\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-non-const-export/b.js",
    "content": "exports.foo = 2;\nexports.setFoo = (foo) => {\n  exports.foo = foo;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-non-const-export/destructure.js",
    "content": "var {foo, setFoo} = require('./b');\n\noutput(foo);\nsetFoo(3);\noutput(foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-non-const-export/live.js",
    "content": "var b = require('./b');\n\noutput(b.foo);\nb.setFoo(3);\noutput(b.foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-non-const-export/member.js",
    "content": "var foo = require('./b').foo;\nvar setFoo = require('./b').setFoo;\n\noutput(foo);\nsetFoo(3);\noutput(foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-all/a.js",
    "content": "const {foo, bar, baz} = require('./b');\n\noutput = foo + bar + baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-all/b.js",
    "content": "export * from './c';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-all/c.js",
    "content": "export var foo = 2, bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-default/a.js",
    "content": "const {foo, baz} = require('./b');\n\noutput = foo + baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-default/b.js",
    "content": "export {default as foo} from './c';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-default/c.js",
    "content": "export default 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-exclude-default/a.js",
    "content": "output = require('./b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-exclude-default/b.js",
    "content": "export * from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-exclude-default/c.js",
    "content": "export default 2;\nexport var foo = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-multiple/a.js",
    "content": "const {foo, bar, baz, d} = require('./b');\n\noutput = foo + bar + baz + d;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-multiple/b.js",
    "content": "export * from './c';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-multiple/c.js",
    "content": "export var foo = 2, bar = 3;\nexport * from './d';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-multiple/d.js",
    "content": "export var d = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-named/a.js",
    "content": "const {foo, baz} = require('./b');\n\noutput = foo + baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-named/b.js",
    "content": "export {foo} from './c';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-named/c.js",
    "content": "export var foo = 2, bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-namespace/a.js",
    "content": "const {c, baz} = require('./b');\n\noutput = c.foo + c.bar + baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-namespace/b.js",
    "content": "import * as c from './c';\n\nexport {c};\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-re-export-namespace/c.js",
    "content": "export var foo = 2, bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-renamed-export/a.js",
    "content": "const {foo} = require('./b');\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-renamed-export/b.js",
    "content": "var bar = 2;\nexport {bar as foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-resolve/a.js",
    "content": "const foo = require('./b');\n\noutput = require.resolve('./b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-resolve/b.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-resolve-excluded/a.js",
    "content": "module.exports = require.resolve('fs');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-resolve-excluded/package.json",
    "content": "{\n    \"private\": true,\n    \"engines\": {\n        \"node\": \"10\"\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-self/a.js",
    "content": "const { b } = require(\"./b.js\");\n\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/require-self/b.js",
    "content": "const other = require(\"./b.js\");\nmodule.exports.a = 3;\nmodule.exports.b = other.a + 1;\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/self-reference-assignment/a.js",
    "content": "var foo;\n(function (foo) {\n  foo[\"bar\"] = \"bar\";\n})(foo = exports.foo || (exports.foo = {}));\noutput = exports;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/self-reference-default/a.js",
    "content": "import b from './b';\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/self-reference-default/b.js",
    "content": "exports.default = 2;\nmodule.exports = exports['default'];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/side-effects-false/a.js",
    "content": "output = require('bar').foo(3)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/stream-module/a.js",
    "content": "output = require('stream');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/this-arrow-function/a.js",
    "content": "const b = require('./b');\n\noutput = b.run();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/this-arrow-function/b.js",
    "content": "module.exports.other = () => 'other';\n\nmodule.exports.run = () => `Say ${this.other()}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/this-arrow-function/package.json",
    "content": "{\n  \"browserslist\": \"Chrome 80\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/this-reference/a.js",
    "content": "const b = require('./b');\n\noutput = [b.foo, b.bar];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/this-reference/b.js",
    "content": "this.foo = 5;\n\nclass X {\n  constructor() {\n    this.bar = 2;\n  }\n  x() {\n    this.bar = 2;\n  }\n}\n\nfunction f() {\n  this.bar = 2;\n}\n\nif (Date.now() > 0) {\n  this.foo += 1;\n}\n\nnew f();\nnew X().x();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/this-reference-wrapped/a.js",
    "content": "const b = require('./b');\n\noutput = [b.foo, b.bar, b.foobar];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/this-reference-wrapped/b.js",
    "content": "this.foo = 5;\n\nclass X {\n  constructor() {\n    this.bar = 2;\n  }\n  x() {\n    this.bar = 2;\n  }\n}\n\nfunction f() {\n  this.bar = 2;\n}\n\nif (Date.now() > 0) {\n  this.foo += 1;\n}\n\nnew f();\nnew X().x();\n\n\neval('this.foobar = 4');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/tree-shaking/.terserrc",
    "content": "{\n  \"mangle\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/tree-shaking/a.js",
    "content": "output = require('./b').foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/tree-shaking/b.js",
    "content": "exports.foo = 2;\nexports.bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/tree-shaking-no-unknown-objects/a.js",
    "content": "module.exports = window;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/tree-shaking-no-unknown-objects/index.js",
    "content": "const foo = require('./a');\nfoo.bar = 42;\noutput = window.bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/tree-shaking-string/.terserrc",
    "content": "{\n  \"mangle\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/tree-shaking-string/a.js",
    "content": "output = [require('./b').foo, require('./c').foo];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/tree-shaking-string/b.js",
    "content": "exports['foo'] = 2;\nexports['bar'] = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/tree-shaking-string/c.js",
    "content": "module.exports['foo'] = 20;\nmodule.exports['bar'] = 30;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-aliases/a.js",
    "content": "try {\n    output = require('foo')\n}\ncatch(_) {\n    output = require('foo-bar')\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-aliases/package.json",
    "content": "{\n    \"name\": \"a\",\n    \"browser\": {\n        \"foo\": \"foo-bar\"\n    }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-concat-order/a.js",
    "content": "sideEffect(1);\nrequire(\"./b.js\");\nsideEffect(3);\nif (Date.now() > 0) {\n\tsideEffect(4);\n\trequire(\"./c.js\");\n\tsideEffect(6);\n}\nsideEffect(7);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-concat-order/b.js",
    "content": "sideEffect(2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-concat-order/c.js",
    "content": "sideEffect(5);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-default-interop/async.js",
    "content": "import x from \"./shared\";\nif (Date.now() > 0) {\n\tlet x = require(\"./run-interop.js\");\n\tsideEffect(\"async \" + x.default);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-default-interop/index.js",
    "content": "if (Date.now() < 0) {\n\trequire(\"./run-cjs.js\");\n}\n\nimport(\"./async.js\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-default-interop/run-cjs.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nsideEffect(\"run1\");\nexports.default = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-default-interop/run-interop.js",
    "content": "import x from \"./run-cjs.js\";\nexport default \"c: \" + x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-default-interop/shared.js",
    "content": "sideEffect(\"shared\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-deps-circular/a.js",
    "content": "require('./b');\nconst AWS = require('./core');\nAWS.test = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-deps-circular/b.js",
    "content": "require('./a');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-deps-circular/c.js",
    "content": "function test() {\n  require('./a');\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-deps-circular/core.js",
    "content": "module.exports = {};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-deps-circular/index.js",
    "content": "require('./a');\nrequire('./c');\n\nlet AWS = require('./core');\noutput = AWS;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-array/a.js",
    "content": "(function(){\n  output = require('./b');\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-array/b.js",
    "content": "const x = [1, 2]\nconst [a, b] = x;\n\nmodule.exports = [a, b];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-array/package.json",
    "content": "{\n    \"private\": true,\n    \"browserslist\": [\"node 8\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-object/a.js",
    "content": "(function(){\n  output = require('./b');\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-object/b.js",
    "content": "const x = {\n  a: 4,\n  b: 2\n}\nconst {a, b} = x;\n\nmodule.exports = [a, b];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-object/package.json",
    "content": "{\n    \"private\": true,\n    \"browserslist\": [\"node 8\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-eval/a.js",
    "content": "const foo = require('./b');\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-eval/b.js",
    "content": "module.exports = 2;\neval('module.exports = 4');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-expressions/a.js",
    "content": "let x = (sideEffect('before'), require('./require'), sideEffect('after'));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-expressions/b.js",
    "content": "function before() {\n  sideEffect('before');\n  return 'before';\n}\n\nfunction after() {\n  sideEffect('after');\n  return 'after';\n}\n\noutput = before() + ' ' + require('./require') + ' ' + after();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-expressions/require.js",
    "content": "sideEffect('require');\nmodule.exports = 'bar';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-interop-url-import/a.js",
    "content": "function run() {\n\treturn require(\"./b.js\");\n}\n\noutput = run().default;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-interop-url-import/b.js",
    "content": "import logo from \"url:./data.txt\";\n\nexport default logo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-interop-url-import/data.txt",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-module/a.js",
    "content": "exports.foo = 2;\noutput = module;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-module-codesplit/a.js",
    "content": "if (Date.now() < 0) {\n\tlet x = require(\"./c.js\");\n}\n\noutput = import(\"./b.js\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-module-codesplit/b.js",
    "content": "const x = require(\"./c.js\");\n\nmodule.exports = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-module-codesplit/c.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-module-computed/a.js",
    "content": "exports.foo = 2;\noutput = module['exports'];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-module-obj-literal-require/a.js",
    "content": "const v = require(\"./b.js\");\n\noutput = v;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-module-obj-literal-require/b.js",
    "content": "const value = require(\"./c.js\");\n\nconst obj = {\n  value,\n};\n\nexports = module.exports = obj.value;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-module-obj-literal-require/c.js",
    "content": "module.exports = 1234;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-optional/a.js",
    "content": "try {\n    output = require('noop')\n}\ncatch(_) {\n    output = 42\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-return/a.js",
    "content": "const foo = require('./b');\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-return/b.js",
    "content": "module.exports = 2;\nreturn;\nmodule.exports = 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-typeof-require/a.js",
    "content": "const b = require(\"./b\");\noutput = b();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-typeof-require/b.js",
    "content": "if (typeof require === \"function\") {\n  var jSuites = require(\"./c.js\");\n}\nlet x = () => {\n  return jSuites + eval(\"1\");\n};\nmodule.exports = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-typeof-require/c.js",
    "content": "module.exports = \"c\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-unused/a.js",
    "content": "if (Date.now() > 0) {\n\toutput = require(\"./b\").foo();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-unused/b.js",
    "content": "function foo() {\n  return 1;\n}\n\nfunction bar() {\n  return 2;\n}\n\nexports.foo = foo;\nexports.bar = bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-var-hoisting/a.js",
    "content": "if (Date.now() > 0) {\n\tconst b = require(\"./b\");\n\toutput = b.run();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/commonjs/wrap-var-hoisting/b.js",
    "content": "for(var BigIntSupported in [0, 1]){}\nfor (var i = 0, len = 100; i < len; ++i) {}\n\nif (BigIntSupported) {\n\tvar bigIntValue = () => true;\n  let inner_let = false;\n  if (inner_let){\n    throw new Error();\n  }\n}\n\nfunction testIsHoisted() {\n\treturn BigIntSupported && bigIntValue();\n}\n\nconst f1 = () => {\n  var f1_var = 0;\n};\nconst f2 = function() {\n  var f2_var = 0;\n};\nfunction f3() {\n  var f3_var = 0;\n}\nconst o = {\n  f4() {\t\n    var f4_var = 0;\n  }\n};\nclass c1 {\n  method() {\n    var c1_var = 0;\n  }\n}\nconst c2 = class {\n  method() {\n    var c2_var = 0;\n  }\n};\n\nfunction run(){\n\tf1();\n\tf2();\n\tf3();\n\to.f4();\n\t\n\treturn testIsHoisted(c1, c2);\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport/a.js",
    "content": "import {createAndFireEvent} from './b.js';\nconst createAndFireEventOnAtlaskit = createAndFireEvent('index');\noutput = import('./async.js').then(m => [\n\tcreateAndFireEventOnAtlaskit(),\n\tm.default(),\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport/async.js",
    "content": "import {createAndFireEvent} from './b.js';\nvar createAndFireEventOnAtlaskit = createAndFireEvent('async');\nexport default () => createAndFireEventOnAtlaskit();\nexport const a = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport/b.js",
    "content": "export {default as createAndFireEvent} from './c.js';\nexport const b = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport/c.js",
    "content": "export default function(name) {\n\treturn () => name;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport2/a.js",
    "content": "import { foo } from \"./library/a.js\";\n\noutput = import(\"./async.js\").then(v => [foo, v.default]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport2/async.js",
    "content": "import { foo } from \"./library/a.js\";\n\nexport default foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport2/b.js",
    "content": "import { foo } from \"./library/b.js\";\n\noutput = import(\"./async.js\").then(v => [foo, v.default]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport2/library/a.js",
    "content": "export * from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport2/library/b.js",
    "content": "export { foo } from \"./c.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/ancestor-reexport2/library/c.js",
    "content": "export const foo = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-internalize-unused/a.js",
    "content": "import c from \"./c.js\";\nimport b from \"./b.js\";\n\noutput = b + c;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-internalize-unused/b.js",
    "content": "import(\"./c.js\");\n\nexport default \"b\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-internalize-unused/c.js",
    "content": "export default \"c\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-interop-conditional/async.js",
    "content": "import value from './value';\n\nlet out;\nswitch (3) {\n  case false:\n    value.foo;\n    break;\n  case 3:\n    out = value.foo;\n    break;\n}\n\nexport default out;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-interop-conditional/index.js",
    "content": "import value from './value';\n\noutput = import('./async').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-interop-conditional/value.js",
    "content": "module.exports = {foo: 42};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-named-import-ns-reexport/async.js",
    "content": "import {ns, ns2} from './reexports';\n\nexport default [ns.foo, ns2.foo];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-named-import-ns-reexport/index.js",
    "content": "import {ns, ns2} from './reexports';\n\noutput = import('./async').then(mod => [ns.foo, ns2.foo].concat(mod.default));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-named-import-ns-reexport/ns.js",
    "content": "export const foo = 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/async-named-import-ns-reexport/reexports.js",
    "content": "import * as ns from './ns';\n\nexport {ns};\nexport * as ns2 from './ns';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/cache-add-specifier/a.1.js",
    "content": "import {foo, bar} from \"./b\";\n\noutput = foo + bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/cache-add-specifier/a.js",
    "content": "import {foo} from \"./b\";\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/cache-add-specifier/b.js",
    "content": "export const foo = \"foo\";\nexport const bar = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular/a.mjs",
    "content": "import { run } from \"./b.mjs\";\n\noutput = run();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular/b.mjs",
    "content": "export const foo = \"foo\";\nexport { run } from \"./c.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular/c.mjs",
    "content": "import { foo } from \"./b.mjs\";\nexport const run = () => \"c:\" + foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular-wrap/a.mjs",
    "content": "import \"./b.mjs\";\noutput('a');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular-wrap/b.mjs",
    "content": "import \"./c.mjs\";\noutput('b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular-wrap/c.mjs",
    "content": "import \"./d.mjs\";\neval('output(\"c\")');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular-wrap/d.mjs",
    "content": "import \"./a.mjs\";\noutput('d');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular-wrap/index.mjs",
    "content": "import \"./a.mjs\";\noutput('index');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular2/a.mjs",
    "content": "import { run } from \"./b.mjs\";\n\noutput = run();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular2/b.mjs",
    "content": "import { foo as bar } from \"./c.mjs\";\n\nexport const foo = \"foo\";\n\nexport function run() {\n\treturn `b:${foo}:${bar}`;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular2/c.mjs",
    "content": "export { foo } from \"./b.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular3/a.mjs",
    "content": "import { h } from \"./b.mjs\";\n\noutput = h;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular3/b.mjs",
    "content": "export { a as b } from \"./c.mjs\";\nexport { d as e } from \"./c.mjs\";\nexport { g as h } from \"./c.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular3/c.mjs",
    "content": "export const a = 123;\n\nexport { c as d } from \"./d.mjs\";\nexport { f as g } from \"./d.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/circular3/d.mjs",
    "content": "export { b as c } from \"./b.mjs\";\nexport { e as f } from \"./b.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/class-selfreference/a.js",
    "content": "class Bar {\n  constructor() {\n    this.foo = 'bar';\n  }\n\n  duplicate() {\n    return new Bar();\n  }\n}\n\noutput = new Bar().duplicate();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/class-selfreference/package.json",
    "content": "{\n  \"browserslist\": [\"last 1 Chrome version\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/codesplit-reexports/library/bar.js",
    "content": "export const bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/codesplit-reexports/library/bar2.js",
    "content": "export const bar2 = 30;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/codesplit-reexports/library/foo.js",
    "content": "export const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/codesplit-reexports/library/foo2.js",
    "content": "export const foo2 = 20;\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/codesplit-reexports/library/index.js",
    "content": "export { foo } from \"./foo\";\nexport * from \"./bar\";\n\nexport { foo2 as foo3 } from \"./foo2\";\nexport { bar2 as bar3 } from \"./bar2\";\n\nexport const own = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/codesplit-reexports/library/package.json",
    "content": "{\n  \"name\": \"lib\",\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/codesplit-reexports/src/async.js",
    "content": "import { foo3, bar3 } from \"../library\";\n\nexport default [foo3, bar3];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/codesplit-reexports/src/entry.js",
    "content": "import { foo, bar } from \"../library\";\n\noutput = import(\"./async\").then(v => [v.default, [foo, bar]])\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/commonjs-exports-reassign/a.js",
    "content": "const b = require('./b')\n\noutput = [b.fn(), b];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/commonjs-exports-reassign/b.js",
    "content": "exports.fn = () => 'foobar';\nexports = 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/conditional-import-reference/a.js",
    "content": "module.exports = 'hello';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/conditional-import-reference/index.js",
    "content": "import a from './a';\n\nif (false) {\n  console.log(a);\n}\n\noutput = a;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/conditional-import-side-effect-free-reexport/foo/bar.mjs",
    "content": "export const bar = 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/conditional-import-side-effect-free-reexport/foo/foo.mjs",
    "content": "export {bar} from './bar.mjs';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/conditional-import-side-effect-free-reexport/foo/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/conditional-import-side-effect-free-reexport/index.mjs",
    "content": "output = import('./foo/foo.mjs').then(({bar}) => bar);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-anonymous/a.js",
    "content": "import foo from './b';\n\noutput = foo();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-anonymous/b.js",
    "content": "export default function() {\n  return 2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-class-rename/a.js",
    "content": "import Test from './b';\noutput = Test.create();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-class-rename/b.js",
    "content": "export default class Test {\n  constructor() {\n    this.foo = 'bar';\n  }\n\n  static create() {\n    return new Test();\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-class-rename/package.json",
    "content": "{\n  \"name\": \"default-export-class-rename\",\n  \"private\": true,\n  \"browserslist\": [\"last 1 Chrome version\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-declaration/a.js",
    "content": "import foo from './b';\n\noutput = foo();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-declaration/b.js",
    "content": "export default function foo() {\n  return 2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-expression/a.js",
    "content": "import foo from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-expression/b.js",
    "content": "export default 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-variable/a.js",
    "content": "import foo from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/default-export-variable/b.js",
    "content": "var foo = 2;\nexport default foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/double-esmodule/foo.js",
    "content": "export const __esModule = true;\n\nexport default 'default';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/double-esmodule/index.js",
    "content": "import * as foo from './foo';\n\noutput = foo['def' + (Date.now() > 0 ? 'ault' : '')];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/dynamic-default-interop/a.js",
    "content": "import shared from './shared';\n\noutput = import('./b').then(b => b.out + shared);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/dynamic-default-interop/b.js",
    "content": "import shared from './shared';\n\nexport var out = 2 + shared;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/dynamic-default-interop/shared.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/dynamic-import/a.js",
    "content": "import {compute} from './c'\n\nvar b = import('./b');\n\noutput = b.then(function ({foo, bar}) {\n  return compute(foo, 0) + compute(bar, 0);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/dynamic-import/b.js",
    "content": "import {compute} from './c'\n\nexport var foo = compute(2, 1);\nexport var bar = compute(3, 1);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/dynamic-import/c.js",
    "content": "export function compute(x, q) {\n    return q ? x * 2 : x / 2\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/dynamic-import-dynamic/a.js",
    "content": "output = import(\"./b.js\").then(b => b.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/dynamic-import-dynamic/b.js",
    "content": "export default import('./c.js').then(b => b.default + 1);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/dynamic-import-dynamic/c.js",
    "content": "export default 122;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/empty-module/a.js",
    "content": "import b from './b';\n\noutput = {b};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/empty-module/b.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/empty-ts/index.ts",
    "content": "output = import('./lib').then(({test}) => test);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/empty-ts/lib.ts",
    "content": "export * from './test';\nexport * from './types';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/empty-ts/test.ts",
    "content": "import {Test} from './types';\n\nexport function test(test: Test) {\n  return test.foo;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/empty-ts/types.ts",
    "content": "export interface Test {\n  foo: string\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-before-declaration/a.js",
    "content": "import * as b from \"./b.js\";\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-before-declaration/b.js",
    "content": "export { x };\nconst x = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-binding-identifiers/a.js",
    "content": "import {test} from './b'\n\noutput = test(exports => Object.keys(exports))\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-binding-identifiers/b.js",
    "content": "export function test(arg) {\n    return arg(exports)\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-class-wrapped/a.js",
    "content": "import b from \"./b.js\";\n\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-class-wrapped/b.js",
    "content": "export default class Log {}\nLog.VERSION = 1234;\n\nsideEffectNoop(module)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-function-wrapped/a.js",
    "content": "import b from \"./b.js\";\n\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-function-wrapped/b.js",
    "content": "export default function log(){}\nlog.VERSION = 1234;\n\nsideEffectNoop(module)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-global/a.js",
    "content": "import b from \"./b.js\";\n\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-global/b.js",
    "content": "export default Test;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-js-global/a.js",
    "content": "import b from \"./b.js\";\n\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-js-global/b.js",
    "content": "export default Set;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-live/a.js",
    "content": "import foo, {change} from \"./b.js\";\noutput(foo);\nchange(10);\noutput(foo);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-default-live/b.js",
    "content": "export default class foo {}\nfoo = 5;\n\nexport function change(v) {\n\tfoo = v;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-intermediate-wrapped-reexports/async.js",
    "content": "export default import(\"./foo/foo.mjs\")\n  .then(({ bar }) => bar);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-intermediate-wrapped-reexports/foo/bar.mjs",
    "content": "export * from \"./baz.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-intermediate-wrapped-reexports/foo/baz.mjs",
    "content": "export const bar = 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-intermediate-wrapped-reexports/foo/foo.mjs",
    "content": "export * from \"./bar.mjs\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-intermediate-wrapped-reexports/foo/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-intermediate-wrapped-reexports/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  <script type=\"module\" src=\"./index.mjs\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-intermediate-wrapped-reexports/index.mjs",
    "content": "import { bar } from \"./foo/foo.mjs\";\n\noutput = [bar, import(\"./async\").then(mod => mod.default)];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-named-empty/a.js",
    "content": "output = 2;\nexport {};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/export-undefined/a.js",
    "content": "export {Test};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-default/a.js",
    "content": "import foo from './wrapped'\nimport bar from './notwrapped'\n\nfunction calc() {\n  return foo() + bar();\n}\n\noutput = calc() + ':' + foo() + ':' + bar();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-default/notwrapped.js",
    "content": "module.exports = () => 'bar'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-default/wrapped.js",
    "content": "// triggers wrapping\neval('void 0')\nmodule.exports = () => 'foo'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-individual/a.js",
    "content": "import {getId} from \"./b.js\";\n\noutput = getId();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-individual/b.js",
    "content": "import { name, version } from './c.js';\nfunction getId() {\n    return name + \":\"+ version\n};\nexport { name, version, getId };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-individual/c.js",
    "content": "module.exports.name = \"name\";\nmodule.exports.version = \"1.2.3\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-individual-default/a.js",
    "content": "import x from \"./b1.js\";\nimport y from \"./b2.js\";\nimport z from \"./b3.js\";\n\noutput = {x, y, z};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-individual-default/b1.js",
    "content": "exports.foo = 1;\nexports.default = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-individual-default/b2.js",
    "content": "exports.__esModule = true;\n\nexports.foo = 3;\nexports.default = 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-individual-default/b3.js",
    "content": "Object.defineProperty(exports, '__esModule', {value: true});\n\nexports.foo = 5;\nexports.default = 6;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-object/a.js",
    "content": "import {getId} from \"./b.js\";\n\noutput = getId();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-object/b.js",
    "content": "import { name, version } from './c.js';\nfunction getId() {\n    return name + \":\"+ version\n};\nexport { name, version, getId };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-object/c.js",
    "content": "module.exports = {\n\tname: \"name\",\n\tversion: \"1.2.3\",\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-object-default/a.js",
    "content": "import x from \"./b1.js\";\nimport y from \"./b2.js\";\n\noutput = {x, y};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-object-default/b1.js",
    "content": "module.exports = {\n  foo: 1,\n  default: 2\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-export-object-default/b2.js",
    "content": "module.exports = Object.defineProperty({\n  foo: 3,\n  default: 4\n}, '__esModule', {value: true});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-missing/a.js",
    "content": "import { x } from \"./b.js\";\n\noutput = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-commonjs-missing/b.js",
    "content": "module.exports.y = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-local-assign/b.js",
    "content": "export let foo = 2;\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-local-assign/default.js",
    "content": "import b from './b';\nb = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-local-assign/destructure-assign.js",
    "content": "import {foo} from './b';\n({bar: foo} = {bar: 3})\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-local-assign/multiple.js",
    "content": "import {foo} from './b';\nfoo = 2;\nfoo = 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-local-assign/named.js",
    "content": "import {foo} from './b';\nfoo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-local-assign/namespace.js",
    "content": "import * as b from './b';\nb = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-missing/a.js",
    "content": "import {foo} from \"./b.js\";\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-missing/b.js",
    "content": "export const bar = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-multiple-wildcards/a.js",
    "content": "import * as all from '../re-export-all-multiple/b'\n\n// Don't do the the sum here to prevent treeshaking optimizations\noutput = all\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-multiple-wrapped/a.js",
    "content": "import \"./b.js\";\nimport \"./b.js\";\nimport \"./b.js\";\nimport \"./b.js\";\nimport \"./b.js\";\nimport \"./b.js\";\nimport \"./b.js\";\nimport { v1 } from \"./b.js\";\nimport { v2 } from \"./b.js\";\nimport { v3 } from \"./b.js\";\nimport { v4 } from \"./b.js\";\nimport { v5 } from \"./b.js\";\n\nexport const result = v1 + v2 + v3 + v4 + v5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-multiple-wrapped/b.js",
    "content": "export const v1 = 1;\nexport const v2 = 2;\nexport const v3 = 3;\nexport const v4 = 4;\nexport const v5 = 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-multiple-wrapped/index.js",
    "content": "output = require(\"./a.js\").result;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace/a.js",
    "content": "import * as test from './b';\n\nlet x = test;\n\noutput = x.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace/b.js",
    "content": "export var foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-commonjs/a.js",
    "content": "import {foo} from './c';\n\noutput = import('./b').then(function (b) {\n  return foo + b.foo;\n});\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-commonjs/b.js",
    "content": "import * as c from './c';\n\nmodule.exports = c;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-commonjs/c.js",
    "content": "exports.foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-commonjs-transpiled/a.js",
    "content": "import * as all from './b';\n\noutput = all;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-commonjs-transpiled/b.js",
    "content": "export * from './c';\n\nexport const foo = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-commonjs-transpiled/c.js",
    "content": "Object.defineProperty(module.exports, \"__esModule\", { value: true });\n\nmodule.exports.default = 2;\nmodule.exports.bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-external/a.js",
    "content": "import * as lodash from \"./b\";\n\nlet x = lodash;\n\nexport default x.add(10,2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-external/b.js",
    "content": "export * from \"lodash\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-external/package.json",
    "content": "{\n    \"default\": \"dist/index.js\",\n    \"targets\": {\n        \"default\": {\n            \"isLibrary\": true,\n            \"context\": \"node\"\n        }\n    },\n    \"dependencies\": {\n        \"lodash\": \"*\"\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-sideEffects/index.js",
    "content": "import * as lib from \"./other\";\n\noutput = lib;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-sideEffects/other/exports.js",
    "content": "export { a } from \"./version\";\nexport { b } from \"./version2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-sideEffects/other/index.js",
    "content": "export * from \"./exports\";\n\nexport const Main = \"main\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-sideEffects/other/package.json",
    "content": "{\n\t\"name\": \"lib\",\n\t\"private\": true,\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-sideEffects/other/version.js",
    "content": "export var a = \"foo\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-sideEffects/other/version2.js",
    "content": "export var b = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-static-member/a.js",
    "content": "import * as test from './library/index.js';\n\noutput = test.foo + test['foobar'];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-static-member/b.js",
    "content": "import * as b from \"./library/index.js\";\n\nlet val = \"foo\";\noutput = b[val];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-static-member/library/c1.js",
    "content": "sideEffect(\"c1\");\nexport const foo = \"foo\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-static-member/library/c2.js",
    "content": "sideEffect(\"c2\");\nexport const bar = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-static-member/library/c3.js",
    "content": "sideEffect(\"c3\");\nexport const foobar = \"foobar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-static-member/library/index.js",
    "content": "export * from \"./c1.js\";\nexport * from \"./c2.js\";\nexport * from \"./c3.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-static-member/library/package.json",
    "content": "{\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-wrapped/a.js",
    "content": "if (Date.now() < 0) {\n\trequire(\"./c.js\");\n}\nimport * as b from \"./b\";\n\noutput = b.foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-wrapped/b.js",
    "content": "export * from \"./c\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-wrapped/c.js",
    "content": "export const foo = 1;\nexport const bar = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-wrapped-self/a.js",
    "content": "if (Date.now() > 0) {\n\tconst { f } = require(\"./b.js\");\n\toutput = f();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-namespace-wrapped-self/b.js",
    "content": "import * as ns from \"./b.js\";\n\nexport function f() {\n\treturn foo(ns).f === f;\n}\n\nfunction foo(x) {\n\treturn x;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-self/a.js",
    "content": "import { b } from \"./b.js\";\n\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-self/b.js",
    "content": "import * as other from \"./b.js\";\nexport const a = 3;\nexport const b = other.a + 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-wrapped/a.js",
    "content": "import {foo} from './b'\n\noutput = foo\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-wrapped/b.js",
    "content": "export const foo = eval(\"'bar'\")\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-wrapped-bundle-unused/a.js",
    "content": "if (Date.now() < 0) {\n\trequire(\"./c.js\");\n}\n\nimport(\"./b.js\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-wrapped-bundle-unused/b.js",
    "content": "import \"./c.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/import-wrapped-bundle-unused/c.js",
    "content": "sideEffect();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/interop-async/client.js",
    "content": "export default Buffer.from(\"client\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/interop-async/index.html",
    "content": "<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/interop-async/index.js",
    "content": "import c from \"./client.js\";\n\noutput = import(\"./viewer.js\")\n\t.then((v) => v.default)\n\t.then((v) => [c.toString(), v[0].toString(), v[1].toString()]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/interop-async/viewer.js",
    "content": "export default import(\"./client.js\").then((c) => [\n\tc.default,\n\tBuffer.from(\"viewer\"),\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/interop-pure/a.js",
    "content": "import x from \"./b.js\";\n\nlet value = x;\nif (false) {\n\tconsole.log(value);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/interop-pure/b.js",
    "content": "module.exports = \"some unused data\"\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/jsx-pragma/.babelrc",
    "content": "{\n\t\"plugins\": [\"@babel/plugin-transform-react-jsx\"]\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/jsx-pragma/a.js",
    "content": "import React from \"./react.js\";\n\noutput = <span>Test</span>;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/jsx-pragma/react.js",
    "content": "// mock for React.createElement\n\nexport default {\n\tcreateElement(type, props, children){\n\t\treturn {\n\t\t\ttype, props, children\n\t\t};\n\t}\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings/a.js",
    "content": "import b, {foo, bar, changeFoo} from './b';\n\nchangeFoo(3);\n\noutput = b + foo + bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings/b.js",
    "content": "var foo = 2;\nexport default foo;\nexport {foo, foo as bar};\n\nexport function changeFoo(v) {\n  foo = v;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-cross-bundle/a.html",
    "content": "<script type=\"module\" src=\"a.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-cross-bundle/a.js",
    "content": "import \"./library/a.js\";\nimport { a } from \"./library/index.js\";\n\noutput = a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-cross-bundle/b.html",
    "content": "<script type=\"module\" src=\"b.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-cross-bundle/b.js",
    "content": "import \"./library/a.js\";\nimport { a } from \"./library/index.js\";\n\noutput = a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-cross-bundle/library/a.js",
    "content": "import { b } from \"./index.js\";\nexport var a = \"aaa\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-cross-bundle/library/b.js",
    "content": "export var b = \"bbb\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-cross-bundle/library/index.js",
    "content": "export { a } from \"./a.js\";\nexport { b } from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-cross-bundle/package.json",
    "content": "{\n\t\"@parcel/bundler-default\": {\n\t\t\"minBundleSize\": 0\n\t}\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-reexports-namespace/a.js",
    "content": "import * as x from \"./b.js\";\n\nfunction get(obj, prop) {\n\treturn obj[prop];\n}\n\nlet a = get(x, \"v\");\nget(x, \"update\")();\nlet b = get(x, \"v\");\n\noutput = [a, b];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-reexports-namespace/b.js",
    "content": "export {v, update} from \"./c.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/live-bindings-reexports-namespace/c.js",
    "content": "export let v = 1;\nexport function update() {\n\tv++;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/multi-entry-duplicates/one.js",
    "content": "import { getValue, add } from './shared';\n\nadd();\n\noutput = import('./two').then(() => getValue());"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/multi-entry-duplicates/shared.js",
    "content": "let counter = 0;\n\nexport function getValue() {\n  return counter;\n}\n\nexport function add() {\n  counter++;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/multi-entry-duplicates/two.js",
    "content": "import { getValue, add } from './shared';\n\nadd();"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/multi-export/a.js",
    "content": "import b, {foo, bar} from './b';\n\noutput = b + foo + bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/multi-export/b.js",
    "content": "var foo = 2;\nexport default foo;\nexport {foo, foo as bar};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/multiple-ancestors-wrap/index.js",
    "content": "import value from './shouldBeWrapped';\nimport otherValue from './wraps';\n\noutput = [value, otherValue];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/multiple-ancestors-wrap/shouldBeWrapped.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/multiple-ancestors-wrap/wraps.js",
    "content": "import value from './shouldBeWrapped';\n\neval('void 0');\n\nexport default value + 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/name-clash/a.js",
    "content": "import {foo} from './b'\n\noutput = foo()\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/name-clash/b.js",
    "content": "var $exports = module.exports = {}\n\n$exports.foo = () => 'bar'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/named-export-declaration/a.js",
    "content": "import {foo} from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/named-export-declaration/b.js",
    "content": "export var foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/named-export-variable/a.js",
    "content": "import {foo} from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/named-export-variable/b.js",
    "content": "var foo = 2;\nexport {foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/named-export-variable-rename/a.js",
    "content": "import {foo} from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/named-export-variable-rename/b.js",
    "content": "var bar = 2;\nexport {bar as foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/named-export-variable-rename-wrapped/a.js",
    "content": "import {foo} from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/named-export-variable-rename-wrapped/b.js",
    "content": "var bar = module && 2;\nexport {bar as foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/no-reexport-default/a.js",
    "content": "export {default} from './b.js';\nexport * from './b.js';\n\nexport {default as other} from './c.js';\nexport * from './c.js';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/no-reexport-default/async.js",
    "content": "import _default, {other} from './a.js';\n\nsideEffectNoop(_default, other);\n\nexport default _default;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/no-reexport-default/b.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/no-reexport-default/c.js",
    "content": "export default 99;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/no-reexport-default/index.js",
    "content": "import _default, {other} from './a.js';\n\noutput = import('./async').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/no-reexport-esmodule/a.js",
    "content": "module.exports.foo = 42;\nmodule.exports.__esModule = true;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/no-reexport-esmodule/async.js",
    "content": "export * from './a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/no-reexport-esmodule/index.js",
    "content": "import * as a from './a.js';\n\noutput = import('./async').then(mod => mod.__esModule);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-ascii-identifiers/a.js",
    "content": "const ɵ2 = 1;\nconst ɵ3 = 2;\nconst ꝍ2 = 3\nconst ꝍ3 = 4\n\noutput = [ɵ2, ɵ3, ꝍ2, ꝍ3];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  <script type=\"module\" src=\"./index.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/index.js",
    "content": "import {foo,bar} from './library';\n\nfunction other() {\n  return foo+bar;\n}\n\nexport {other};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/library/bar.js",
    "content": "import {baz, bag} from '../utils';\n\nfunction bar() {\n  return baz+bag;\n}\n\nexport {bar};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/library/foo.js",
    "content": "import {bag} from '../utils';\n\nfunction foo() {\n  return bag;\n}\n\nexport {foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/library/index.js",
    "content": "export {foo} from './foo';\nexport {bar} from './bar';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/library/package.json",
    "content": "{\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/utils/bag.js",
    "content": "export function bag() {\n  return 'bag';\n};\n\nexport function baz() {\n  return bag() + 'baz';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/utils/empty.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/utils/index.js",
    "content": "export * from './bag';\nexport * from './empty';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-deterministic-bundle-hashes/utils/package.json",
    "content": "{\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-identifier-symbol-name/a.js",
    "content": "import { \"ab c\" as x } from \"./b.js\";\n\noutput = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/non-identifier-symbol-name/b.js",
    "content": "const x = 1;\nexport { x as \"ab c\" };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/pure-assignment/a.js",
    "content": "import {foo} from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/pure-assignment/b.js",
    "content": "export const foo = 2;\n\nexport function bar() {}\nbar.displayName = 'hello';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/raw-url/index-import.js",
    "content": "import assetUrl from 'url:./foo.png';\n\noutput = assetUrl;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/raw-url/index-reexport.js",
    "content": "import {assetUrl} from './reexports';\n\noutput = assetUrl;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/raw-url/reexports.js",
    "content": "export {default as assetUrl} from 'url:./foo.png';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all/a.js",
    "content": "import {foo, bar, baz} from './b';\n\noutput = foo + bar + baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all/b.js",
    "content": "export * from './c';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all/c.js",
    "content": "export var foo = 2, bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-ambiguous/entry.js",
    "content": "if (Date.now() > 0) {\n\toutput = require(\"./index.js\").default;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-ambiguous/index.js",
    "content": "import { b,c } from \"./lib\";\n\nexport default b + \" \" + c;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-ambiguous/lib-a.js",
    "content": "module.exports = {};\n// export const a = 89;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-ambiguous/lib-b.js",
    "content": "export const b = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-ambiguous/lib-c.js",
    "content": "export { c2 as c } from \"./lib-c2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-ambiguous/lib-c2.js",
    "content": "export const c2 = 999;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-ambiguous/lib.js",
    "content": "export * from \"./lib-a\";\nexport * from \"./lib-b\";\nexport * from \"./lib-c\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-ambiguous/package.json",
    "content": "{\n\t\"sideEffects\": [\n\t\t\"entry.js\",\n\t\t\"index.js\",\n\t\t\"lib-a.js\",\n\t\t\"lib-b.js\",\n\t\t\"lib-c2.js\",\n\t\t\"lib.js\"\n\t]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-empty-no-side-effects/index.js",
    "content": "import {bar} from 'lib';\n\noutput = `foo ${bar}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-external/a.js",
    "content": "import {add} from \"./b\";\n\noutput = add(1, 2)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-external/b.js",
    "content": "export * from \"lodash\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-external/package.json",
    "content": "{\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-1/empty.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-1/index.js",
    "content": "import { mergeWith } from \"./lib\";\noutput = mergeWith;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-1/lib.js",
    "content": "export * from \"./other\";\nexport * from \"./empty\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-1/mergeWith.js",
    "content": "module.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-1/other.js",
    "content": "export { default as mergeWith } from \"./mergeWith\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-2/a.js",
    "content": "module.exports = { a: 1 };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-2/b.js",
    "content": "module.exports = { b: 2 };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-2/index.js",
    "content": "import { b } from \"./lib\";\n\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-2/lib.js",
    "content": "export * from \"./a\";\nexport * from \"./b\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/async.js",
    "content": "import { FOO } from './re-exports';\n\nsideEffectNoop(FOO)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/entry.js",
    "content": "import {doStuff} from './stuff';\n\noutput = doStuff();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/foo.js",
    "content": "//@flow\n\nexport const FOO = 'FOO';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/other/index.js",
    "content": "//@flow\n\nimport {FOO, BAR, type MyString} from \"../re-exports\";\n\nconst myFunc = (): MyString => FOO + BAR;\n\nlet res = myFunc();\n\nexport const fooBar = (): MyString => res;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/package.json",
    "content": "{\n  \"dependencies\": {\n    \"flow-bin\": \"0.157.0\"\n  },\n  \"sideEffects\": [\n    \"entry.js\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/re-exports.js",
    "content": "//@flow\n\nexport * from './foo';\nexport * from './rest';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/rest/bar.js",
    "content": "//@flow\n\nexport const BAR = 'BAR';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/rest/hello.js",
    "content": "//@flow\n\nexport type Hello = 1 | 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/rest/index.js",
    "content": "//@flow\n\nexport * from './bar';\nexport * from './myString';\nexport * from './hello';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/rest/myString.js",
    "content": "//@flow\n\nexport type MyString = string;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-3/stuff.js",
    "content": "//@flow\n\nimport {fooBar} from './other'\nimport {FOO, BAR, type MyString} from './re-exports'\nimport(\"./async\");\n\nconst res = (): MyString => fooBar() + \"!\";\n// $FlowFixMe\nsideEffectNoop(res());\n\nexport const doStuff = res;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-nested/a.js",
    "content": "module.exports = { a: 1 };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-nested/b.js",
    "content": "module.exports = { b: 2 };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-nested/c.js",
    "content": "module.exports = { c: 3 };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-nested/d.js",
    "content": "module.exports = { d: 4 };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-nested/index.js",
    "content": "import { b } from \"./lib\";\nimport { d } from \"./lib2\";\n\noutput = `${b} ${d}`\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-nested/lib.js",
    "content": "export * from \"./lib1\";\nexport * from \"./lib2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-nested/lib1.js",
    "content": "export * from \"./a\";\nexport * from \"./b\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-fallback-nested/lib2.js",
    "content": "export * from \"./c\";\nexport * from \"./d\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-multiple/a.js",
    "content": "import {foo, bar, baz, a, b} from './b';\n\noutput = foo + bar + baz + a + b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-multiple/b.js",
    "content": "export * from './c';\nexport * from './d';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-multiple/c.js",
    "content": "export var foo = 2, bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-multiple/d.js",
    "content": "export var a = 4, b = 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-override/a.js",
    "content": "import { foo, c } from \"./b.js\";\n\nexport default foo() + c;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-override/b.js",
    "content": "import { foo as old } from \"./c\";\nexport * from \"./c\";\n\nfunction foo() {\n\treturn \"fooB\" + old();\n}\n\nexport { foo };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-override/c.js",
    "content": "export function foo() {\n\treturn \"fooC\";\n}\n\nexport const c = \"C\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-all-override/index.js",
    "content": "if (Date.now() > 0) {\n\toutput = require(\"./a.js\").default;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary/async.js",
    "content": "import {UI_EVENT_TYPE} from \"./switcher\";\nexport default UI_EVENT_TYPE;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary/index.js",
    "content": "import { OPERATIONAL_EVENT_TYPE } from \"./types\";\n\noutput = import(\"./async\").then(({default: v}) => [OPERATIONAL_EVENT_TYPE, v])\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary/switcher/index.js",
    "content": "import { UI_EVENT_TYPE } from \"../types\";\nexport { UI_EVENT_TYPE };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary/types/index.js",
    "content": "export var UI_EVENT_TYPE = \"ui\";\nexport var TRACK_EVENT_TYPE = \"track\";\nexport var SCREEN_EVENT_TYPE = \"screen\";\nexport var OPERATIONAL_EVENT_TYPE = \"operational\";\nexport var DEFAULT_SOURCE = \"unknown\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary-side-effects/async.js",
    "content": "import {UI_EVENT_TYPE} from \"./switcher\";\nexport default UI_EVENT_TYPE;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary-side-effects/index.js",
    "content": "import { OPERATIONAL_EVENT_TYPE } from \"./types\";\n\noutput = import(\"./async\").then(({default: v}) => [OPERATIONAL_EVENT_TYPE, v])\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary-side-effects/switcher/index.js",
    "content": "import { UI_EVENT_TYPE } from \"../types\";\nexport { UI_EVENT_TYPE };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary-side-effects/switcher/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary-side-effects/types/index.js",
    "content": "export var UI_EVENT_TYPE = \"ui\";\nexport var TRACK_EVENT_TYPE = \"track\";\nexport var SCREEN_EVENT_TYPE = \"screen\";\nexport var OPERATIONAL_EVENT_TYPE = \"operational\";\nexport var DEFAULT_SOURCE = \"unknown\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary2/async.js",
    "content": "import { layers } from './library/index.js';\n\nexport default layers.a;\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary2/index.js",
    "content": "import t from \"./library/components.js\";\n\noutput = import(\"./async.js\").then((c) => [c.default, t().a]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary2/library/components.js",
    "content": "import { layers } from './constants.js';\nexport default function(){\n\treturn layers;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary2/library/constants.js",
    "content": "export const layers = {\n\ta: \"foo\",\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary2/library/index.js",
    "content": "export * from \"./constants.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary3/index.js",
    "content": "import { themed } from './theme/components.js';\n\noutput = import('./media-card/index.js').then(m => [m.default, themed()])\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary3/media-card/index.js",
    "content": "import { layers } from '../theme/index.js';\n\nexport default Object.keys(layers);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary3/theme/components.js",
    "content": "export { createTheme } from \"./createTheme.js\";\nexport function themed() {\n\treturn \"themed\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary3/theme/createTheme.js",
    "content": "export function createTheme() {\n    return \"foo\";\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-bundle-boundary3/theme/index.js",
    "content": "export var layers = {\n    a: 1,\n    b: 2\n};\nexport * from './createTheme.js';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-commonjs/a.js",
    "content": "import {foo} from './b'\n\noutput = foo()\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-commonjs/b.js",
    "content": "export {default as foo} from './c'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-commonjs/c.js",
    "content": "Object.defineProperty(exports, '__esModule', {\n    value: true\n})\nObject.defineProperty(exports, 'default', {\n    value: () => 'foo'\n})\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-commonjs-wildcard/a.js",
    "content": "import { createElement } from \"./b.js\";\n\noutput = createElement();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-commonjs-wildcard/b.js",
    "content": "export * from './c.js';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-commonjs-wildcard/c.js",
    "content": "import { createElement } from './d.js';\n\nexport { createElement };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-commonjs-wildcard/d.js",
    "content": "module.exports = {\n\tcreateElement: function () {\n\t\treturn 'foo';\n\t},\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-default/.babelrc",
    "content": "{\n  \"plugins\": [\"@babel/syntax-export-default-from\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-default/a.js",
    "content": "import {foo, baz} from './b';\n\noutput = foo + baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-default/b.js",
    "content": "export foo from './c';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-default/c.js",
    "content": "export default 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-default-hybrid/a.js",
    "content": "import b from './b';\n\noutput = b.foo + b.bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-default-hybrid/b.js",
    "content": "import * as c from './c';\nexport default c;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-default-hybrid/c.js",
    "content": "export foo from './d';\nexport const bar = require('./d');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-default-hybrid/d.js",
    "content": "module.exports = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-exclude-default/a.js",
    "content": "import b, {foo} from './b';\n\noutput = {b, foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-exclude-default/b.js",
    "content": "export * from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-exclude-default/c.js",
    "content": "export default 2;\nexport var foo = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-hybrid/a.js",
    "content": "import {foo, bar} from './b';\n\noutput = foo + bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-hybrid/b.js",
    "content": "export * from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-hybrid/c.js",
    "content": "export foo from './d';\nexport const bar = require('./d');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-hybrid/d.js",
    "content": "module.exports = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-import/a.js",
    "content": "import { foo, Other } from \"./b.js\";\nimport { foo as foo2, Other as Other2 } from \"./c.js\";\nimport { foo as foo3 } from \"./d.js\";\n\noutput = foo() + Other + foo2() + Other2 + foo3();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-import/b.js",
    "content": "export { default as Other } from \"./e.js\";\nimport Foo from \"./e.js\";\nexport function foo() {\n\treturn Foo;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-import/c.js",
    "content": "export { default as Other } from \"./e\";\nimport Foo from \"./e\";\nexport function foo() {\n\treturn Foo;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-import/d.js",
    "content": "import Foo from \"./e2.js\";\nexport { default as Other } from \"./e2.js\";\nexport function foo() {\n\treturn Foo;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-import/e.js",
    "content": "export default 123;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-import/e2.js",
    "content": "export default 123;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-interop/a.js",
    "content": "import * as translations from './translations';\noutput = translations;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-interop/en.json",
    "content": "{\n  \"test\": \"foo\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-interop/translations.js",
    "content": "export {default as en_US} from './en.json';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-missing/a.js",
    "content": "import {foo} from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-missing/b.js",
    "content": "export {foo} from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-missing/c.js",
    "content": "export var bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-multiple/a.js",
    "content": "import {foo, bar, baz, d} from './b';\n\noutput = foo + bar + baz + d;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-multiple/b.js",
    "content": "export * from './c';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-multiple/c.js",
    "content": "export var foo = 2, bar = 3;\nexport * from './d'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-multiple/d.js",
    "content": "export var d = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-named/a.js",
    "content": "import {foo, baz} from './b';\n\noutput = foo + baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-named/b.js",
    "content": "export {foo} from './c';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-named/c.js",
    "content": "export var foo = 2, bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace/.babelrc",
    "content": "{\n  \"plugins\": [\"@babel/syntax-export-namespace-from\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace/a.js",
    "content": "import {c, baz} from './b';\n\noutput = c.foo + c.bar + baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace/b.js",
    "content": "export * as c from './c';\nexport var baz = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace/c.js",
    "content": "export var foo = 2, bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-chained/.babelrc",
    "content": "{\n  \"plugins\": [\"@babel/syntax-export-namespace-from\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-chained/a.js",
    "content": "import { Foo, Bar } from \"./b.js\";\n\noutput = {Foo, Bar};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-chained/b.js",
    "content": "export * from \"./c1.js\";\nexport * from \"./c2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-chained/c1.js",
    "content": "export * as Foo from \"./d.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-chained/c2.js",
    "content": "import * as Bar from \"./d.js\";\nexport { Bar };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-chained/d.js",
    "content": "export const A = 1, B = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-order/index.js",
    "content": "import { b } from \"./library/index.js\";\n\nif(Date.now() < 0){\n  b();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-order/library/a.js",
    "content": "import { ForwardRef } from \"../other.js\";\n\nexport function a() {\n\treturn ForwardRef;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-order/library/b.js",
    "content": "import { ForwardRef } from \"../other.js\";\n\noutput = ForwardRef;\n\nexport function b() {\n\treturn ForwardRef;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-order/library/index.js",
    "content": "export * from \"./a\";\nexport { b } from \"./b\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-order/library/package.json",
    "content": "{\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-namespace-order/other.js",
    "content": "export const ForwardRef = Symbol.for('abc');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-priority/a.mjs",
    "content": "export const foo = 2;\nexport * from './foo.mjs'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-priority/b.mjs",
    "content": "export * from './foo.mjs'\nexport const foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-priority/entry-a.mjs",
    "content": "import {foo} from './a.mjs';\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-priority/entry-b.mjs",
    "content": "import {foo} from './b.mjs';\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-priority/foo.mjs",
    "content": "export const foo = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-priority/namespace-a.mjs",
    "content": "import * as a from './a.mjs';\noutput = a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-priority/namespace-b.mjs",
    "content": "import * as b from './b.mjs';\noutput = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-pseudo/a.js",
    "content": "import {foo} from './b.js';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-pseudo/b.js",
    "content": "import { foo, bar } from \"./c\";\nexport { foo, bar };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-pseudo/c.js",
    "content": "export const foo = 'foo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-renamed/a.js",
    "content": "import { x } from './b.js';\n\noutput = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-renamed/b.js",
    "content": "export const x = 'foobar';\n\nexport { x as y } from './c.js'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-renamed/c.js",
    "content": "export const x = 'xyz';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-renamed-namespace/a.js",
    "content": "import x, { x as x2 } from './b.js';\n\noutput = [x, x2];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-renamed-namespace/b.js",
    "content": "export * from \"./c.js\";\nexport { x as default } from './c.js'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-renamed-namespace/c.js",
    "content": "export const x = 123;\nexport const y = 789;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-renamed2/a.js",
    "content": "import { x } from './b.js';\n\noutput = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-renamed2/b.js",
    "content": "export { x as y } from './c.js'\n\nexport const x = 'foobar';\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-renamed2/c.js",
    "content": "export const x = 'xyz';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-var/a.js",
    "content": "import {foo, bar} from './b'\n\noutput = foo() + bar()\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-var/b.js",
    "content": "import {foo, bar} from './c'\n\nexport {foo, bar}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-var/c.js",
    "content": "const foo = () => 'foo'\n\nfunction bar() {\n    return 'bar'\n}\n\nexport {foo, bar}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-wrapped/a.js",
    "content": "import { logger, run } from \"./b.js\";\n\noutput = [logger, run()];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-wrapped/b.js",
    "content": "export * from \"./c.js\";\nexport * from \"./d.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-wrapped/c.js",
    "content": "import { run } from \"./d.js\";\n\nvar logger = run() ? \"a\" : \"b\";\nexport { logger };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-wrapped/d.js",
    "content": "export function run() {\n\tif (!module) return false;\n\telse return true;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-wrapped-bailout/a.js",
    "content": "import { logger, run } from \"./b.js\";\n\noutput = [logger, run()];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-wrapped-bailout/b.js",
    "content": "export * from \"./c.js\";\nexport * from \"./d.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-wrapped-bailout/c.js",
    "content": "import { run } from \"./d.js\";\n\nvar logger = run(module) ? \"a\" : \"b\";\nexport { logger };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/re-export-wrapped-bailout/d.js",
    "content": "export function run(m) {\n\tif (!module || m) return false;\n\telse return true;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rename-helpers/a.js",
    "content": "import {B} from './b.js';\nimport {C} from './c.js';\n\noutput = [B[Symbol.toStringTag], C[Symbol.toStringTag]];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rename-helpers/b.js",
    "content": "export class B {\n  static [Symbol.toStringTag] = 1;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rename-helpers/c.js",
    "content": "export class C {\n  static [Symbol.toStringTag] = 2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rename-helpers/package.json",
    "content": "{\n  \"browserslist\": \"Chrome 50\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rename-member-prop/a.js",
    "content": "import {B} from \"./b.js\";\n\nexport function foo(x) {\n  return [x.foo, x?.foo, x[B], x?.[B]];\n}\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rename-member-prop/b.js",
    "content": "export const B = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rename-superclass/a.js",
    "content": "import Superclass from './b';\n\nclass Test extends Superclass {}\n\noutput = new Test().parentMethod();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rename-superclass/b.js",
    "content": "export default class Superclass {\n\tparentMethod(){\n\t\treturn 2;\n\t}\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/renamed-export/a.js",
    "content": "import {foo} from './b';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/renamed-export/b.js",
    "content": "var bar = 2;\nexport {bar as foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/renamed-import/a.js",
    "content": "import {foo as bar} from './b';\n\noutput = bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/renamed-import/b.js",
    "content": "export var foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/retarget-namespace-single/index.js",
    "content": "import { v } from \"./library/a.js\";\n\nimport * as y from \"./library/a.js\";\n\noutput = [v, sideEffectNoop(y).v];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/retarget-namespace-single/library/a.js",
    "content": "export * from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/retarget-namespace-single/library/b.js",
    "content": "export {v} from \"./c.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/retarget-namespace-single/library/c.js",
    "content": "export const v = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/retarget-namespace-single/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rewrite-export-star/index.js",
    "content": "import * as foo from \"./library/a.js\";\noutput = foo.bar();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rewrite-export-star/library/a.js",
    "content": "export * from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rewrite-export-star/library/b.js",
    "content": "export { default as bar } from \"./c.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rewrite-export-star/library/c.js",
    "content": "export default function () {\n  return 2;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/rewrite-export-star/library/package.json",
    "content": "{\n  \"sideEffects\": [\n    \"a.js\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-reexport/index1.html",
    "content": "<script type=\"module\" src=\"index1.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-reexport/index1.js",
    "content": "import a from \"./shared/a.js\";\n\ncall(a);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-reexport/index2.html",
    "content": "<script type=\"module\" src=\"index2.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-reexport/index2.js",
    "content": "import b from \"./shared/b.js\";\n\ncall(b);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-reexport/index3.html",
    "content": "<script type=\"module\" src=\"index3.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-reexport/index3.js",
    "content": "import b from \"./shared/b.js\";\n\ncall(b);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-reexport/shared/a.js",
    "content": "export default `abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\nabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-reexport/shared/b.js",
    "content": "export { default } from \"./a.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-duplication/async1.js",
    "content": "import \"./v.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-duplication/async2.js",
    "content": "import \"./v.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-duplication/index.js",
    "content": "output = import(\"./async1.js\").then(() => import(\"./async2.js\"));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-duplication/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 1000\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-duplication/v.js",
    "content": "sideEffect(\"v\")\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-order/a.js",
    "content": "import \"./run1.js\";\nimport \"./run2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-order/b.js",
    "content": "import \"./shared1.js\";\nimport \"./shared2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-order/index.js",
    "content": "output = import('./a.js').then(() => import('./b.js'));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-order/run1.js",
    "content": "import x from \"./shared1.js\";\nsideEffect(\"run1 \" + x);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-order/run2.js",
    "content": "import x from \"./shared2.js\";\nsideEffect(\"run2 \" + x);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-order/shared1.js",
    "content": "sideEffect(\"shared1\");\nexport default 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/shared-bundle-side-effect-order/shared2.js",
    "content": "sideEffect(\"shared2\");\nexport default 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/sibling-dependencies/a.js",
    "content": "export function a() {\n  return 'a';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/sibling-dependencies/b.js",
    "content": "import {a} from './a';\noutput = a();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/sibling-dependencies/index.html",
    "content": "<script type=\"module\" src=\"a.js\"></script>\n<script type=\"module\" src=\"b.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects/a.js",
    "content": "import {foo} from 'bar';\n\noutput = foo(2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-array/a.js",
    "content": "import {foo} from 'bar';\n\noutput = foo(2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/a.js",
    "content": "import { message1 } from \"./library/index.js\";\n\noutput = message1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/library/index.js",
    "content": "export * from \"./message\";\nexport * from \"./symbol\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/library/message.js",
    "content": "sideEffect(\"message\");\nexport { default as message1 } from \"./message1\";\nexport { default as message2 } from \"./message2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/library/message1.js",
    "content": "sideEffect(\"message1\");\n\nexport default \"Message 1\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/library/message2.js",
    "content": "sideEffect(\"message2\");\n\nexport default \"Message 2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/library/symbol.js",
    "content": "sideEffect(\"symbol\");\nexport { default as symbol1 } from \"./symbol1\";\nexport { default as symbol2 } from \"./symbol2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/library/symbol1.js",
    "content": "sideEffect(\"symbol1\");\n\nexport default \"Symbol 1\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/library/symbol2.js",
    "content": "sideEffect(\"symbol2\");\n\nexport default \"Symbol 2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-commonjs/a.js",
    "content": "import { message1 } from \"./library/index.js\";\n\noutput = message1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-commonjs/b.js",
    "content": "import { message2 } from \"./library/index.js\";\n\noutput = message2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-commonjs/library/commonjs.js",
    "content": "sideEffect(\"commonjs\");\n\nlet x = module.exports;\n\nx[\"message2\"] = \"Message 2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-commonjs/library/esm.js",
    "content": "sideEffect(\"esm\");\n\nexport const message1 = \"Message 1\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-commonjs/library/index.js",
    "content": "sideEffect(\"index\")\nexport * from \"./esm.js\";\nexport * from \"./commonjs.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-commonjs/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-css/index.html",
    "content": "<div id=\"react-root\"></div>\n<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-css/index.js",
    "content": "import { b1 } from \"./library/a.js\";\n\noutput = b1\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-css/library/a.js",
    "content": "export * from \"./b1.js\";\nexport * from \"./b2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-css/library/b1.css",
    "content": ".b1 {\n\tcolor: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-css/library/b1.js",
    "content": "import \"./b1.css\";\nsideEffect(\"b1\");\nexport const b1 = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-css/library/b2.css",
    "content": ".b2 {\n\tcolor: blue;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-css/library/b2.js",
    "content": "import \"./b2.css\";\nsideEffect(\"b2\");\nexport const b2 = \"b2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-css/library/package.json",
    "content": "{\n\t\"sideEffects\": [\n\t\t\"b1.css\",\n\t\t\"b2.css\"\n\t]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-export-reexport/a.js",
    "content": "import { message1 } from \"./library/index.js\";\n\noutput = message1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-export-reexport/library/index.js",
    "content": "sideEffect(\"index\");\nexport const message1 = \"Message 1\";\nexport * from \"./other.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-export-reexport/library/other.js",
    "content": "sideEffect(\"other\");\nexport const message2 = \" esm2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-export-reexport/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false/a.js",
    "content": "import {foo} from 'bar';\n\noutput = foo(2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-duplicate/a.js",
    "content": "import {foo} from 'bar';\n\noutput = foo(2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/foo/a.js",
    "content": "export const a = \"a\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/foo/b.js",
    "content": "export const b = \"b\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/foo/c.js",
    "content": "import { x } from \"../x.js\";\n\nexport const c = x;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/foo/index.js",
    "content": "import { a } from \"./a.js\";\nimport { b } from \"./b.js\";\nimport { c } from \"./c.js\";\nimport { w } from \"../w/index.js\";\n\nexport const foo = [a, b, c, w];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/index.js",
    "content": "import { foo } from \"./foo/index.js\";\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/package.json",
    "content": "{\n  \"browserslist\": \"Chrome 80\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/w/index.js",
    "content": "export { w } from \"./w.js\";\n\nsideEffect(\"unused!\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/w/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/w/w.js",
    "content": "import { x } from \"../x.js\";\n\nexport class w extends x {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-order/x.js",
    "content": "export class x {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-wildcards/a.js",
    "content": "import {foo} from 'bar'\n\noutput = foo\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-false-wrap-excluded/a.js",
    "content": "if (Date.now() > 0) {\n  const bar = require(\"bar\");\n  output = bar.default(2);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-no-new-bundle/index.html",
    "content": "<div id=\"react-root\"></div>\n<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-no-new-bundle/index.js",
    "content": "import { b1 } from \"./library/a.js\";\n\noutput = b1\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-no-new-bundle/library/a.js",
    "content": "sideEffect(\"a\");\nexport * from \"./b1.js\";\nexport * from \"./b2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-no-new-bundle/library/b1.js",
    "content": "sideEffect(\"b1\");\nexport const b1 = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-no-new-bundle/library/b2.js",
    "content": "sideEffect(\"b2\");\nexport const b2 = import(\"./c\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-no-new-bundle/library/c.js",
    "content": "// import styled from \"styled-components\";\nexport const c = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-no-new-bundle/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-package-redirect-down/index.js",
    "content": "import {one} from 'foo/bar'\n\noutput = one;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-package-redirect-up/index.js",
    "content": "import {one} from 'foo/bar'\n\noutput = one;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports/a.js",
    "content": "import { message1 } from \"./library/index.js\";\n\noutput = message1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports/b.js",
    "content": "import { message2 } from \"./library/index.js\";\n\noutput = message2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports/c.js",
    "content": "import { message3 } from \"./library/index.js\";\n\noutput = message3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports/d.js",
    "content": "import { message4 } from \"./library/index.js\";\n\noutput = message4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports/library/index.js",
    "content": "sideEffect(\"index\");\nexport * from \"./message1.js\";\nexport { value as message2 } from \"./message2.js\";\nexport * as message3 from \"./message3.js\";\nexport const message4 = \"Message 4\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports/library/message1.js",
    "content": "sideEffect(\"message1\");\n\nexport const message1 = \"Message 1\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports/library/message2.js",
    "content": "sideEffect(\"message2\");\n\nexport const value = \"Message 2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports/library/message3.js",
    "content": "sideEffect(\"message3\");\n\nexport default \"Message 3\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-all-empty/a.js",
    "content": "import {baz} from './library/index.js';\n\noutput = baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-all-empty/library/empty.js",
    "content": "// empty: thank you, Typescript!\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-all-empty/library/index.js",
    "content": "export * from './empty.js';\nexport var baz = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-all-empty/library/package.json",
    "content": "{\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-chained/index.js",
    "content": "import { key, foo } from \"./library/index.js\";\n\noutput = [key, foo];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-chained/library/bar.js",
    "content": "sideEffect(\"bar\");\nexport var bar = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-chained/library/foo.js",
    "content": "sideEffect(\"foo\");\nexport var foo = \"foo\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-chained/library/index.js",
    "content": "sideEffect(\"index\");\nimport { key as thing } from \"./key\";\nexport { foo, bar } from \"./types\";\nexport var key = thing;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-chained/library/key.js",
    "content": "sideEffect(\"key\");\nexport var key = \"key\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-chained/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-chained/library/types.js",
    "content": "sideEffect(\"types\");\nexport { foo } from './foo.js';\nexport { bar } from './bar.js';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-import/a.js",
    "content": "import foo from \"bar\";\n\noutput = foo();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-import-different/a.js",
    "content": "import foo from \"bar\";\n\noutput = foo();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-library/a.js",
    "content": "export {c1} from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-library/b.js",
    "content": "export {default as c1} from \"./c1.js\";\nexport {default as c2} from \"./c2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-library/c1.js",
    "content": "export default \"foo\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-library/c2.js",
    "content": "console.log(\"c2 wasn't deferred!\");\n\nexport default \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-library/package.json",
    "content": "{\n    \"main\": \"build.js\",\n    \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-multiple/a.js",
    "content": "import { message1 } from \"./library/index.js\";\n\noutput = message1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-multiple/library/index.js",
    "content": "sideEffect(\"index\");\nexport * from \"./message\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-multiple/library/message.js",
    "content": "sideEffect(\"message\");\nexport * from \"./message1\";\nexport * from \"./message2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-multiple/library/message1.js",
    "content": "sideEffect(\"message1\");\n\nexport const message1 = \"Message 1\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-multiple/library/message2.js",
    "content": "sideEffect(\"message2\");\n\nexport const message2 = \"Message 2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-multiple/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-multiple-dynamic/a.js",
    "content": "import Foo from \"lib\";\n\noutput = import(\"./b.js\").then(v => ([Foo, v]));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-multiple-dynamic/b.js",
    "content": "import Foo from \"lib\";\n\nexport default Foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-namespace-same/a.js",
    "content": "import { foo } from \"./library/index.js\";\n\noutput = [foo];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-namespace-same/b.js",
    "content": "import { bar } from \"./library/index.js\";\n\noutput = [bar];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-namespace-same/c.js",
    "content": "import { foo, bar } from \"./library/index.js\";\n\noutput = [foo, bar];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-namespace-same/library/index.js",
    "content": "sideEffect(\"index\");\nexport {default as foo} from \"./other.js\";\nexport * from \"./other.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-namespace-same/library/other.js",
    "content": "sideEffect(\"other\");\nexport default \"foo\";\nexport const bar = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-namespace-same/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-partially-used/index.js",
    "content": "import { Context } from \"./library\";\n\noutput = [Context, () => import(\"./library/dynamic\")];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-partially-used/library/a.js",
    "content": "sideEffect(\"a\");\nexport const Ctx = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-partially-used/library/b.js",
    "content": "sideEffect(\"b\");\nexport const Ctx = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-partially-used/library/dynamic.js",
    "content": "sideEffect(\"dynamic\");\nimport { Ctx } from \"./a.js\";\nimport { id } from \"./index.js\";\nexport default [Ctx, id];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-partially-used/library/index.js",
    "content": "sideEffect(\"index\");\nexport { Ctx } from \"./a.js\";\nexport { Ctx as Context } from \"./b.js\";\nexport const id = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-partially-used/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-chained/a.js",
    "content": "import { message1 } from \"./library/index.js\";\n\noutput = message1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-chained/library/index.js",
    "content": "sideEffect(\"index\");\nexport { message1, message2 } from \"./index2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-chained/library/index2.js",
    "content": "sideEffect(\"index2\");\nexport { message1, message2 } from \"./message\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-chained/library/message.js",
    "content": "sideEffect(\"message\");\nexport { default as message1 } from \"./message1\";\nexport { default as message2 } from \"./message2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-chained/library/message1.js",
    "content": "sideEffect(\"message1\");\n\nexport default \"Message 1\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-chained/library/message2.js",
    "content": "sideEffect(\"message2\");\n\nexport default \"Message 2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-chained/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same/index.js",
    "content": "import * as ns from \"./library/a\";\n\noutput = [ns, ns.value1, ns.value2];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same/library/a.js",
    "content": "export { value1, value2 } from './b.js';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same/library/b.js",
    "content": "export { value1, value1 as value2 } from \"./c\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same/library/c.js",
    "content": "export const value1 = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same2/a.js",
    "content": "import bar from \"./library/index.js\";\n\noutput = bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same2/b.js",
    "content": "import {bar} from \"./library/index.js\";\n\noutput = bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same2/library/index.js",
    "content": "sideEffect(\"index\");\nexport { bar as default, bar } from './other';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same2/library/other.js",
    "content": "sideEffect(\"other\");\nexport const bar = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-same2/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-var-unused/index.js",
    "content": "output = import(\"./library\").then(({ a }) => a);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-var-unused/library/a.js",
    "content": "export var foo = \"foo\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-var-unused/library/b.js",
    "content": "class b {}\n\nexport { b as default };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-var-unused/library/index.js",
    "content": "import * as a from \"./a\";\nimport b from \"./b\";\nexport { a, b };\nexport var b2 = b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-re-exports-rename-var-unused/library/package.json",
    "content": "{\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-semi-weak/a.js",
    "content": "import { message1 } from \"./library/index.js\";\n\noutput = message1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-semi-weak/library/esm1.js",
    "content": "sideEffect(\"esm1\");\n\nexport const message1 = \"Message 1\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-semi-weak/library/esm2.js",
    "content": "import { data } from \"./other.js\";\n\nsideEffect(\"esm2\");\n\nexport const message2 = data + \" via esm2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-semi-weak/library/index.js",
    "content": "sideEffect(\"index\");\nexport * from \"./esm1.js\";\nexport * from \"./esm2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-semi-weak/library/other.js",
    "content": "sideEffect(\"other\");\n\nexport const data = \"Message 2\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-semi-weak/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-split/a.js",
    "content": "// ensure lib is hoisted (without using any exports) to simulate bundle reference in b.js\nimport 'lib';\n\noutput = import('./b').then(p => p.default + p.foo + 456);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-split/b.js",
    "content": "import lib from 'lib';\nexport default lib;\nexport * from 'lib';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-split2/a.js",
    "content": "import * as x from 'lib';\n\noutput = import('./b').then(p => [x, p.default + p.foo + 456]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-split2/b.js",
    "content": "import lib from 'lib';\nexport default lib;\nexport * from 'lib';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-update-deferred-direct/index.js",
    "content": "import foo from \"foo\";\n\noutput = foo();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/side-effects-update-deferred-reexported/index.js",
    "content": "import foo from \"foo\";\n\noutput = foo();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking/.terserrc",
    "content": "{\n  \"mangle\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking/a.js",
    "content": "import {foo} from './b';\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking/b.js",
    "content": "export var foo = 2;\nexport var bar = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-classes-babel/a.js",
    "content": "import {foo} from './b';\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-classes-babel/b.js",
    "content": "export const foo = 3;\nexport class Bar {\n\tmethod() {\n\t\tconsole.log(\"bar\");\n\t}\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-classes-babel/package.json",
    "content": "{\n  \"browserslist\": [\n    \"IE 11\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle/.terserrc",
    "content": "{\n  \"mangle\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle/a.js",
    "content": "output = Promise.all([import(\"./b1.js\").then(m => m.default), import(\"./b2.js\").then(m => m.default)]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle/b1.js",
    "content": "import { foo } from \"./c.js\";\n\nexport default \"b1:\" + foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle/b2.js",
    "content": "import { foo } from \"./c.js\";\n\nexport default \"b2:\" + foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle/c.js",
    "content": "export const foo = \"foo\";\nexport const bar = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export/.terserrc",
    "content": "{\n  \"mangle\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export/a.js",
    "content": "output = Promise.all([import(\"./b1.js\").then(m => m.default), import(\"./b2.js\").then(m => m.default)]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export/b1.js",
    "content": "import { foo } from \"./c.js\";\n\nexport default \"b1:\" + foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export/b2.js",
    "content": "import { foo } from \"./c.js\";\n\nexport default \"b2:\" + foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export/c.js",
    "content": "export {foo, bar} from \"./d.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export/d.js",
    "content": "export const foo = \"foo\";\nexport const bar = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export-wildcard/a.js",
    "content": "output = Promise.all([import(\"./b1.js\").then(m => m.default), import(\"./b2.js\").then(m => m.default)]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export-wildcard/b1.js",
    "content": "import { foo } from \"./c.js\";\n\nexport default \"b1:\" + foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export-wildcard/b2.js",
    "content": "import { foo } from \"./c.js\";\n\nexport default \"b2:\" + foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export-wildcard/c.js",
    "content": "export * from \"./d.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export-wildcard/d.js",
    "content": "export const foo = \"foo\";\nexport const bar = \"bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/.terserrc",
    "content": "{\n  \"mangle\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/a1.js",
    "content": "export const other = \"other\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/a2.js",
    "content": "export const thing = \"thing\";\nexport const stuff = \"stuff\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/async.js",
    "content": "export var foo = \"foo\";\nexport var bar = \"bar\";\nexport * from \"./a1.js\";\nexport {thing, stuff} from \"./a2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-assignment-error.js",
    "content": "output = (async () => {\n  let missing;\n  ({missing} = await import(\"./async.js\"));\n  return missing;\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-assignment.js",
    "content": "output = (async () => {\n  let y, thing;\n  ({foo: y, thing} = await import(\"./async.js\"));\n  return [y, thing];\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration-error.js",
    "content": "output = (async () => {\n  let {missing} = await import(\"./async.js\");\n  return missing;\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration-namespace-bailout-eval.js",
    "content": "output = (async () => {\n  let ns = await import(\"./async.js\");\n  let other;\n  eval('other = ns.thing;');\n  return other;\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration-namespace-bailout.js",
    "content": "output = (async () => {\n  let ns = await import(\"./async.js\");\n  return ns;\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration-namespace-error.js",
    "content": "output = (async () => {\n  let ns = await import(\"./async.js\");\n  return ns.missing;\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration-namespace.js",
    "content": "output = (async () => {\n  let ns = await import(\"./async.js\");\n  return [ns.foo, ns.thing];\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration.js",
    "content": "output = (async () => {\n  let {foo: y, thing} = await import(\"./async.js\");\n  return [y, thing];\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/package.json",
    "content": "{\n  \"browserslist\": \"Chrome 80\",\n  \"sideEffects\": [\n    \"await-assignment.js\",\n    \"await-declaration*.js\",\n    \"then*.js\"\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/then-error.js",
    "content": "output = import(\"./async.js\").then(({missing}) => [missing]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/then-namespace-bailout.js",
    "content": "output = import(\"./async.js\").then((ns) => ns);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/then-namespace-error.js",
    "content": "output = import(\"./async.js\").then((ns) => [ns.missing]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/then-namespace.js",
    "content": "output = import(\"./async.js\").then((ns) => [ns.foo, ns.thing]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-dynamic-import/then.js",
    "content": "output = import(\"./async.js\").then(({foo: y, thing}) => [y, thing]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-export-computed-prop/a.js",
    "content": "import b from './b.js';\nimport c from './b.js';\n\noutput = [b('abc'), b('x'), c('abc'), c('x')];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-export-computed-prop/b.js",
    "content": "let x = \"abc\",\n  y = \"def\";\nlet data = {};\ndata[x] = data[y] = true;\n\nexport default function(a) {\n  return data[a];\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-export-computed-prop/c.js",
    "content": "let x = \"abc\",\n  y = \"def\";\nlet data = {};\ndata[x] = true;\ndata[y] = true;\n\nexport default function(a) {\n\treturn data[a];\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-functions/a.js",
    "content": "import {add} from './b';\noutput = add(4, 5);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-functions/b.js",
    "content": "export function add(a, b) {\n\treturn a + b;\n}\n\nexport function sub(a, b) {\n\treturn a - b;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-increment-object/a.js",
    "content": "import \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-increment-object/b.js",
    "content": "let counter = 1;\nfunction unused() {\n\treturn {\n\t\tid: counter++,\n\t};\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-multiassignment/a.js",
    "content": "import x, {y} from \"./b\";\nexport default [x, y];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-multiassignment/b.js",
    "content": "exports.default = exports.y = exports.z = undefined;\nvar y = 'y';\nexports.y = y;\nvar z = 'z';\nexports.z = z;\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-no-unknown-objects/a.js",
    "content": "export const foo = window;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/tree-shaking-no-unknown-objects/index.js",
    "content": "import {foo} from './a';\n\nfoo.bar = 42;\n\noutput = window.bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-assetgroup/index1.js",
    "content": "import { barer } from './package';\n\noutput = barer;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-assetgroup/index2.js",
    "content": "import { barer, foo } from './package';\n\noutput = `${barer} ${foo}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-assetgroup/index3.js",
    "content": "import { barer, foo, bar } from './package';\n\noutput = `${barer} ${foo} ${bar}`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-assetgroup/package/bar.js",
    "content": "export const bar = 'bar';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-assetgroup/package/barer.js",
    "content": "export {bar as barer} from \"./bar\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-assetgroup/package/foo.js",
    "content": "export const foo = 'foo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-assetgroup/package/index.js",
    "content": "export {foo} from './foo';\nexport {bar} from './bar';\nexport {barer} from './barer';\n\nsideEffectNoop(module);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-assetgroup/package/package.json",
    "content": "{\n  \"sideEffects\": [\"index.js\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-new-deps/index.js",
    "content": "import {a} from \"./package/\";\n\nsideEffectNoop(a);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-new-deps/package/a.js",
    "content": "import { v } from \"./b\";\nimport c from \"./c\";\n\nexport default class a {\n  constructor() {\n    c(v);\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-new-deps/package/b1.js",
    "content": "export const d1 = \"def\";\nexport const v = \"abc\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-new-deps/package/b2.js",
    "content": "export { d1 } from \"./d\";\nexport const v = \"abc\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-new-deps/package/c.js",
    "content": "import { d1 } from \"./b\";\nexport default function c() {\n  return d1;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-new-deps/package/d.js",
    "content": "export const d1 = \"hello\", d2 = 2 , d3 = 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-new-deps/package/index.js",
    "content": "export {d2} from './d';\nexport {default as a} from \"./a\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-new-deps/package/package.json",
    "content": "{\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unmarks-defer-for-new-deps/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unused-require/index.js",
    "content": "import {foo} from './library';\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unused-require/library/foo/index.js",
    "content": "export const unusedFoo = 'unusedFoo';\nexport { foo } from './other';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unused-require/library/foo/other.js",
    "content": "export const foo = 'foo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unused-require/library/foo/package.json",
    "content": "{\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/unused-require/library/index.js",
    "content": "export { foo, unusedFoo } from './foo';\n\neval('')\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add/index.1.js",
    "content": "import {a} from \"./library/a.js\";\n\noutput = [a];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add/index.2.js",
    "content": "import {a} from \"./library/a.js\";\nimport {b, d} from \"./library/b.js\";\n\noutput = [a, b, d];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add/index.3.js",
    "content": "import {b, d} from \"./library/b.js\";\n\noutput = [b, d];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add/library/a.js",
    "content": "export {a, b} from \"./b.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add/library/b.js",
    "content": "export {a, b, d} from \"./c.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add/library/c.js",
    "content": "export {a,b} from \"./d1.js\";\nexport * as d from \"./d2.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add/library/d1.js",
    "content": "export const a = 123;\nexport const b = 789;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add/library/d2.js",
    "content": "export const d1 = 1;\nexport const d2 = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-inline/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.js\": [\"parcel-transformer-test\", \"...\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-inline/index.js",
    "content": "import { a } from \"./other.js\";\n\noutput = a;\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-inline/other.1.js",
    "content": "PROCESS_ME\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-inline/other.2.js",
    "content": "export const a = 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-inline/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/index.1.js",
    "content": "output = import('./library/Toolbar');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/index.2.js",
    "content": "import * as x from './library/emoji';\noutput = import('./library/Toolbar').then(v => [v, x]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/index.html",
    "content": "<div id=\"react-root\"></div>\n<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/library/Toolbar.js",
    "content": "import { gridSize } from './theme';\nexport var akGridSize = gridSize();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/library/emoji.js",
    "content": "export * from './emojiStyles';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/library/emojiStyles.js",
    "content": "export { akEmojiSelectedBackgroundColor } from './emojiStylesShared';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/library/emojiStylesShared.js",
    "content": "import { borderRadius, colors } from './theme';\nexport var noDialogContainerBorderRadius = borderRadius() + \"px\";\nexport var akEmojiSelectedBackgroundColor = colors.N30;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/library/theme.js",
    "content": "export * as colors from './themeColors';\nexport * from './themeConstants';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/library/themeColors.js",
    "content": "export var N30 = '#EBECF0';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace/library/themeConstants.js",
    "content": "export var borderRadius = function () { return 3; };\nexport var gridSize = function () { return 8; };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-symbols/index.1.js",
    "content": "import {b} from \"./library/a.js\";\n\noutput = [b];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-symbols/index.2.js",
    "content": "import {b, c} from \"./library/a.js\";\n\noutput = [b, c];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-symbols/library/a.js",
    "content": "export {b} from \"./b.js\";\nexport {c} from \"./c.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-symbols/library/b.js",
    "content": "export const b = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-symbols/library/c.js",
    "content": "export const c = 789;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-dependency-symbols/library/package.json",
    "content": "{\n\t\"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-remove-export/a.js",
    "content": "import { foo } from \"./b.js\";\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-remove-export/b.1.js",
    "content": "export const foo = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/update-used-symbols-remove-export/b.2.js",
    "content": "export const bar = 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/used-assignmentexpression/a.js",
    "content": "var bar = 1;\nvar foo = bar += 2;\n\noutput = foo;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/wrap-import-arrowfunction/a.js",
    "content": "const f = () => import(\"./b.js\");\n\noutput = f;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/wrap-import-arrowfunction/b.js",
    "content": "sideEffect(\"async\");\nexport default 1234;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scope-hoisting/es6/wrap-import-arrowfunction/package.json",
    "content": "{\n  \"browserslist\": \"Chrome 80\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss/index.js",
    "content": "require('./index.scss');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss/index.scss",
    "content": "$base: #f938ab;\n\n.index {\n  color: $base;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-absolute-imports/b.scss",
    "content": ".b {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-absolute-imports/style.scss",
    "content": "@use '/b.scss';\n\n.a {\n  color: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-empty/index.js",
    "content": "require('./index.scss');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-empty/index.scss",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-global-data/.sassrc.js",
    "content": "module.exports = {\n  data: \"$color: red;\",\n  silenceDeprecations: ['legacy-js-api']\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-global-data/index.scss",
    "content": ".a {\n  color: $color;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-global-data/package.json",
    "content": "{\n  \"private\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-html-import/package.json",
    "content": "{\n    \"name\": \"scss-import-targets\",\n    \"private\": true,\n    \"targets\": {\n        \"target1\": {\n            \"source\": [\n                \"./target1.html\"\n            ],\n            \"distDir\": \"./target1/\"\n        },\n        \"target2\": {\n            \"source\": [\n                \"./target2.html\"\n            ],\n            \"distDir\": \"./target2/\"\n        }\n    }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-html-import/style.scss",
    "content": "@font-face {\n  font-family: 'Font Awesome 6 Free';\n  src: url('fa-regular-400.ttf') format('truetype');\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-html-import/target1.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <title>What's going on here</title>\n        <link href=\"style.scss\" rel=\"stylesheet\" type=\"text/css\" />\n    </head>\n    <body></body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-html-import/target2.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <title>What's going on here</title>\n        <link href=\"style.scss\" rel=\"stylesheet\" type=\"text/css\" />\n    </head>\n    <body></body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-import/bar.scss",
    "content": "$bar: #f8a93b;\n\n.bar {\n  color: $bar;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-import/foo.scss",
    "content": "$foo: #f938ab;\n\n.foo {\n  color: $foo;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-import/index.js",
    "content": "require('./index.scss');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-import/index.scss",
    "content": "@use 'foo' as *;\n@use './bar.scss' as *;\n\n.index {\n  color: $foo;\n  background-color: $bar;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-postcss/index.js",
    "content": "var map = require('./index.module.scss');\n\nmodule.exports = function () {\n  return map.index;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-postcss/index.module.scss",
    "content": "$base: #f938ab;\n\n.index {\n  color: $base;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-sourcemap-imports/style.scss",
    "content": "@use './with_url'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-sourcemap-imports/with_url.scss",
    "content": "body {\n  background-color: #999;\n  background: url('data:image/png;base64,iii') center no-repeat;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-url/index.js",
    "content": "require('./index.scss');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/scss-url/index.scss",
    "content": "@font-face {\n  font-family: \"Test\";\n  src: url(\"./fonts/test.woff2\") format(\"woff2\");\n}\n\n.index {\n  background: url(\"http://google.com\");\n}\n\n.something {\n  background: url(./image.jpeg);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/a/index.js",
    "content": "import '../b/nested'\n\nnavigator.serviceWorker.register(new URL('../b/worker-outside.js', import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/b/nested/index.js",
    "content": "navigator.serviceWorker.register(new URL('worker-nested.js', import.meta.url), { scope: './' });\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/b/nested/worker-nested.js",
    "content": "self.addEventListener('message', () => {});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/b/worker-outside.js",
    "content": "self.addEventListener('message', () => {});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/dynamic-import-index.js",
    "content": "navigator.serviceWorker.register(new URL('dynamic-import.js', import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/dynamic-import.js",
    "content": "import('./b/worker-outside');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/error.js",
    "content": "navigator.serviceWorker.register(new URL('module-worker.js', import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/manifest-worker.js",
    "content": "import {manifest, version} from '@parcel/service-worker';\n\noutput(manifest, version);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/manifest.js",
    "content": "navigator.serviceWorker.register(new URL('manifest-worker.js', import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/module-worker.js",
    "content": "export var foo = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/module.js",
    "content": "navigator.serviceWorker.register(new URL('module-worker.js', import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker/scope.js",
    "content": "navigator.serviceWorker.register(new URL('module-worker.js', import.meta.url), {scope: 'foo', type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker-import-meta-url/index.js",
    "content": "navigator.serviceWorker.register(new URL(\"./worker.js\", import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker-import-meta-url/missing.js",
    "content": "navigator.serviceWorker.register(new URL(\"./invalid.js\", import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker-import-meta-url/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/service-worker-import-meta-url/worker.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/a.js",
    "content": "import foo from './foo';\n\nexport default 'a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/b.js",
    "content": "\nexport default 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/bar.js",
    "content": "import foo from './a';\nimport bar from './b';\nimport styles from './styles.css';\nimport html from './local.html';\n\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/buzz.js",
    "content": "import c from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/c.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habLorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habLorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habLorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 'c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/foo.js",
    "content": "import a from './a';\nimport b from './b';\nimport c from './c';\nexport default a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/index.js",
    "content": "import('./foo');\nimport('./bar');\nimport('./buzz');\n\nexport default 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/local.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  Hello World\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 200,\n    \"maxParallelRequests\":3\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-between-reused-bundle-removal/styles.css",
    "content": "p.groove {outline-style: groove;}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-internalization/a.mjs",
    "content": "import large from \"./large.mjs\";\n\nexport default large;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-internalization/async.mjs",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-internalization/b.mjs",
    "content": "import large from \"./large.mjs\";\n\nexport default large;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-internalization/imports-async.mjs",
    "content": "export default import(\"./async.mjs\").then((m) => (m.default));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-internalization/index.mjs",
    "content": "export default Promise.all([\n  import(\"./a.mjs\").then(m => m.default),\n  import(\"./b.mjs\").then(m => m.default),\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-internalization/large.mjs",
    "content": "import \"./async.mjs\";\nimport mod from \"./imports-async.mjs\";\n\nsideEffectNoop(\"lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor\");\n\nexport default mod;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-internalization/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 40\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-remove-from-one-group-only/bar.js",
    "content": "import styles from './styles.css';\nimport html from './local.html';\nimport c from './c';\n\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-remove-from-one-group-only/buzz.js",
    "content": "import c from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-remove-from-one-group-only/c.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 'c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-remove-from-one-group-only/foo.js",
    "content": "import c from './c';\n\nexport default a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-remove-from-one-group-only/index.js",
    "content": "import('./foo');\nimport('./bar');\nimport('./buzz');\n\nexport default 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-remove-from-one-group-only/local.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  Hello World\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-remove-from-one-group-only/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 200,\n    \"maxParallelRequests\":2\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-remove-from-one-group-only/styles.css",
    "content": "p.groove {outline-style: groove;}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/a.js",
    "content": "import foo from './foo';\n\nexport default 'a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/b.js",
    "content": "\nexport default 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/bar.js",
    "content": "import foo from './a';\nimport bar from './b';\nimport styles from './styles.css';\nimport html from './local.html';\nimport c from './c';\n\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/buzz.js",
    "content": "import c from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/c.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 'c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/foo.js",
    "content": "import a from './a';\nimport b from './b';\n\nexport default a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/index.js",
    "content": "import('./foo');\nimport('./bar');\nimport('./buzz');\n\nexport default 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/local.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  Hello World\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 200,\n    \"maxParallelRequests\":3\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-reuse/styles.css",
    "content": "p.groove {outline-style: groove;}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/a.js",
    "content": "import foo from './foo';\n\nlet str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 'a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/b.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/bar.js",
    "content": "import foo from './a';\nimport bar from './b';\nimport styles from './styles.css';\nimport html from './local.html';\nimport c from './c';\n\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/buzz.js",
    "content": "import c from './c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/c.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 'c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/foo.js",
    "content": "import a from './a';\nimport b from './b';\n\nexport default a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/index.js",
    "content": "import('./foo');\nimport('./bar');\nimport('./buzz');\n\nexport default 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/local.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  Hello World\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 200,\n    \"maxParallelRequests\":3\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-reused-bundle-remove-shared/styles.css",
    "content": "p.groove {outline-style: groove;}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-single-source/a.js",
    "content": "import foo from './foo';\n\nlet str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 'a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-single-source/b.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 5;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-single-source/bar.js",
    "content": "import foo from './a';\nimport bar from './b';\nimport styles from './styles.css';\nimport html from './local.html';\n\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-single-source/foo.js",
    "content": "import a from './a';\nimport b from './b';\n\nexport default a;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-single-source/index.js",
    "content": "import('./foo');\nimport('./bar');\n\nexport default 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-single-source/local.html",
    "content": "<!DOCTYPE html>\n<html>\n<body>\n  Hello World\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-single-source/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 200,\n    \"maxParallelRequests\": 3\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundle-single-source/styles.css",
    "content": "p.groove {outline-style: groove;}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundlegroup/a.js",
    "content": "export default import('./c.js').then(mod => 'hello from a ' + mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundlegroup/b.js",
    "content": "export default import('./c.js').then(mod => 'hello from b ' + mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundlegroup/c.js",
    "content": "export default 'test';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-bundlegroup/index.js",
    "content": "export default Promise.all([import('./a.js'), import('./b.js')])\n  .then(modules => Promise.all(modules.map(mod => mod.default)));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-exports-for-sibling-descendant/a.js",
    "content": "import wraps from './wraps';\n\nexport default import('./child').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-exports-for-sibling-descendant/b.js",
    "content": "export {default} from './wraps';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-exports-for-sibling-descendant/child.js",
    "content": "export default import('./grandchild').then(mod => mod.default)\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-exports-for-sibling-descendant/grandchild.js",
    "content": "import lodash from 'lodash';\n\nexport default lodash.add(1, 2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-exports-for-sibling-descendant/index.js",
    "content": "export default Promise.all([\n  import('./a').then(mod => mod.default),\n  import('./b').then(mod => mod.default)\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-exports-for-sibling-descendant/scope-hoisting.js",
    "content": "output = Promise.all([\n  import('./a').then(mod => mod.default),\n  import('./b').then(mod => mod.default)\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-exports-for-sibling-descendant/wraps.js",
    "content": "import lodash from 'lodash';\n\nexport default lodash.add(2, 3);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/a.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"a.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/a.js",
    "content": "import 'lodash/cloneDeep';\nimport 'lodash/assign';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/b.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"b.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/b.js",
    "content": "import 'lodash/cloneDeep';\nimport 'lodash/pick';\nimport 'lodash/omit';\nimport 'lodash/difference';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/c.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"c.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/c.js",
    "content": "import 'lodash/pick';\nimport 'lodash/omit';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/d.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"d.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/d.js",
    "content": "import 'lodash/omit';\nimport 'lodash/flatten';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/e.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"e.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/e.js",
    "content": "import 'lodash/flatten';\nimport 'lodash/drop';\nimport 'lodash/difference';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/f.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"f.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/f.js",
    "content": "import 'lodash/drop';\nimport 'lodash/fill';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/g.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"g.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/g.js",
    "content": "import 'lodash/fill';\nimport 'lodash/difference';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many/package.json",
    "content": "{\n  \"name\": \"shared-many\",\n  \"private\": true,\n  \"@parcel/bundler-default\": {\n    \"http\": 1\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/a.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"a.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/a.js",
    "content": "import 'lodash/cloneDeep';\nimport 'lodash/assign';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/b.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"b.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/b.js",
    "content": "import 'lodash/cloneDeep';\nimport 'lodash/pick';\nimport 'lodash/omit';\nimport 'lodash/difference';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/c.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"c.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/c.js",
    "content": "import 'lodash/pick';\nimport 'lodash/omit';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/d.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"d.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/d.js",
    "content": "import 'lodash/omit';\nimport 'lodash/flatten';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/e.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"e.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/e.js",
    "content": "import 'lodash/flatten';\nimport 'lodash/drop';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/f.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"f.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/f.js",
    "content": "import 'lodash/drop';\nimport 'lodash/fill';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/g.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"g.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-many-esm/g.js",
    "content": "import 'lodash/fill';\nimport 'lodash/difference';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling/a.js",
    "content": "import { a } from \"./a.module.css\";\n\nexport default `<span class=\"${a}\">A</span>`;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling/a.module.css",
    "content": ".a {\n\tcolor: red;\n}\n\nbody {\n\tbackground: orange;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling/b.js",
    "content": "import a from \"./a\";\n\nexport default function () {\n\treturn a;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling/form.html",
    "content": "<script type=\"module\" src=\"form.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling/form.js",
    "content": "import a from \"./a\";\n\nconsole.log(a);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling/searchfield.html",
    "content": "<script type=\"module\" src=\"searchfield.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling/searchfield.js",
    "content": "import b from \"./b\";\n\nconsole.log(b());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling/searchfield2.html",
    "content": "<script type=\"module\" src=\"searchfield2.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling/searchfield2.js",
    "content": "import b from \"./b\";\n\nconsole.log(b());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-common-dependency/a.js",
    "content": "import './b';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-common-dependency/b.css",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-common-dependency/b.js",
    "content": "import './b.css';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-common-dependency/index.js",
    "content": "import('./a');\nimport('./b');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-duplicate/a.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"a.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-duplicate/a.js",
    "content": "import 'react';\nimport 'react-dom/client';\nimport 'lodash';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-duplicate/b.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"b.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-duplicate/b.js",
    "content": "import 'react';\nimport 'react-dom/client';\nimport 'acorn';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-duplicate/c.html",
    "content": "<!doctype html>\n<script type=\"module\" src=\"c.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-duplicate/c.js",
    "content": "import 'react';\nimport 'lodash';\nimport 'acorn';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries/a.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <h1>a.html</h1>\n    <script type=\"module\">\n      import './other.css';\n      import './shared';\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries/b.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <h1>b.html</h1>\n    <script type=\"module\">\n      import './other.css';\n      import './shared';\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries/c.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <h1>c.html</h1>\n    <script type=\"module\">\n      import './other.css';\n      import './shared';\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries/other.css",
    "content": ".c {\n  color: blue;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 0\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries/shared.css",
    "content": "body {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries/shared.js",
    "content": "import './shared.css';\n\nexport default 'shared';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries-multiple/a.css",
    "content": ".a {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries-multiple/a.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <h1>a.html</h1>\n    <script type=\"module\" src=\"./a.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries-multiple/a.js",
    "content": "import './a.css';\nimport './b.css';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries-multiple/b.css",
    "content": ".b {\n  color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries-multiple/b.html",
    "content": "<!doctype html>\n<html>\n  <body>\n    <h1>b.html</h1>\n    <script type=\"module\" src=\"./b.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries-multiple/b.js",
    "content": "import './b.css';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-entries-multiple/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 0\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-scope-hoist/a.js",
    "content": "import 'lodash/clone';\nimport 'lodash/assign';\n\nexport default 'a';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-scope-hoist/b.js",
    "content": "import 'lodash/clone';\nimport 'lodash/pick';\n\nexport default 'b';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-scope-hoist/c.js",
    "content": "import 'lodash/assign';\nimport 'lodash/omit';\n\nexport default 'c';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-scope-hoist/index.js",
    "content": "output = Promise.all([\n  import('./a').then(mod => mod.default),\n  import('./b').then(mod => mod.default),\n  import('./c').then(mod => mod.default)\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-worker-css/a.js",
    "content": "export default 123;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-worker-css/index.html",
    "content": "<script type=\"module\" src=\"./index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-worker-css/index.js",
    "content": "import \"./a.js\";\nimport \"./style.css\";\n\nnew Worker(new URL(\"./worker\", import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-worker-css/style.css",
    "content": "body {\n\tcolor: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/shared-sibling-worker-css/worker.js",
    "content": "import \"./a.js\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/a.js",
    "content": "import bar from './intermediate';\nimport foo from './intermediate-2';\nimport baz from './intermediate-3';\n\nexport default baz;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/b.js",
    "content": "import bar from './intermediate';\nimport barx from './intermediate-2';\nimport barz from './intermediate-3';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/c.js",
    "content": "import bar from './unreachable';\nimport foo from './intermediate-2';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/common.js",
    "content": "import foo from './unreachable';\n\nlet str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\n\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\n\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\n\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\n\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/d.js",
    "content": "import baz from './unreachable';\nimport bar from './foo';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/foo.js",
    "content": "import foo from './unreachable';\nexport default 4;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/index.js",
    "content": "import('./d');\nimport('./c');\nimport('./b');\noutput = import('./a').then(res => res.default);\nexport default output;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/intermediate-2.js",
    "content": "import foo from './common';\n\nlet str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\n\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\n\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\n\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.`;\n\nexport default 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/intermediate-3.js",
    "content": "import unreachable from './unreachable';\n\nlet str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\n\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\n\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\n\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\n\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default unreachable;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/intermediate.js",
    "content": "import foo from './common';\n\nlet str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\n\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\n\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\n\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\n\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 3;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"minBundleSize\": 200,\n    \"maxParallelRequests\": 3\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sibling-deduplicate-unreachable/unreachable.js",
    "content": "let str = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras euismod massa sit amet tellus porta consectetur. Etiam aliquam pellentesque lorem id semper. Vestibulum ut rhoncus lacus, a blandit risus. Sed eget volutpat risus, eu molestie mi. Curabitur felis lacus, hendrerit id sollicitudin nec, sollicitudin in quam. Nunc pellentesque elit ac sapien tempor feugiat. Nunc ex urna, commodo in viverra a, tempus quis purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;\n\nPellentesque pharetra mauris luctus felis cursus, id tempor sem viverra. Aenean fringilla, felis ut feugiat pretium, sapien lectus ornare enim, vel tempus mi tortor vitae lectus. Sed egestas mollis massa in dignissim. Sed placerat tellus id ligula molestie, id tincidunt sem rutrum. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam est purus, maximus ut mi id, pharetra dictum lacus. Praesent ullamcorper libero metus, id ornare ex posuere ac. Ut tempor varius molestie. Sed a turpis lobortis, pretium leo ut, tempus turpis. Curabitur blandit ligula in mi pretium, sed varius libero tempus. Nunc pellentesque odio metus, vitae commodo neque eleifend ac.\n\nCras et est suscipit, suscipit dolor nec, blandit leo. Donec purus neque, rhoncus ac ullamcorper eget, placerat vel magna. Donec eu augue turpis. Fusce mattis nulla ante. Proin sit amet sem maximus, pharetra tortor et, sollicitudin eros. Curabitur elementum dolor ac metus vulputate ornare. Ut arcu libero, lobortis ac urna ut, ornare laoreet tortor. Vivamus sollicitudin suscipit efficitur. Ut nec nisi sed metus blandit bibendum. Nullam dictum accumsan sem, ac aliquam purus vestibulum sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et ligula eget magna tempus interdum. Aliquam malesuada tempus imperdiet. Proin et elementum tellus, non aliquam magna. Sed id felis ut arcu aliquam aliquam eu nec nisi.\n\nDonec dictum consequat quam nec malesuada. Nunc mattis iaculis vestibulum. Vestibulum erat lacus, mollis et tincidunt sit amet, tristique vitae massa. Phasellus ac vulputate dolor. Pellentesque ac auctor metus, nec faucibus erat. Donec tortor neque, convallis non felis vel, posuere ornare nunc. Fusce magna risus, interdum at pretium vel, finibus ut dolor. Vivamus congue ipsum non cursus tristique. Suspendisse in nulla accumsan, volutpat turpis eu, gravida sapien. Nam commodo velit vel tellus ultricies, ut consectetur neque molestie. Praesent tincidunt, libero ac elementum luctus, ex nisi volutpat leo, a hendrerit lacus leo eget tortor. Suspendisse viverra ante sit amet accumsan facilisis. Pellentesque velit nisl, luctus bibendum vulputate eget, dapibus at elit. Nam ac molestie turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce cursus, magna non viverra rutrum, magna metus blandit tortor, sed elementum tellus lectus at velit.\n\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi sollicitudin scelerisque sagittis. Cras mattis dictum sollicitudin. Donec tincidunt ullamcorper elit, non dignissim nulla ornare ac. Nulla at interdum nisl. Cras eget tincidunt neque. Etiam lobortis sem iaculis, accumsan augue vel, condimentum sem. Mauris porta congue nulla, id congue eros. Nullam nec arcu in ante elementum blandit sit amet ac nibh. Fusce eget risus tincidunt, viverra neque quis, pellentesque est. Sed et nisi nec massa consequat commodo pretium nec risus. Maecenas vestibulum diam ex, sit amet maximus lacus luctus scelerisque. Mauris eget ante sollicitudin, commodo purus eu, molestie tellus. Aliquam finibus eros nisi, eu cursus sapien pellentesque in. Cras eget justo tincidunt, congue lorem eu, dignissim metus.`;\n\nexport default 'target';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/side-effects-false/import-require.js",
    "content": "import {foo} from 'bar';\nconst { bar } = require(\"bar\");\n\nexport default foo(2) + bar();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/side-effects-false/import.js",
    "content": "import {foo} from 'bar';\n\nexport default foo(2);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap/index.js",
    "content": "function helloWorld() {\n  return \"hello world\";\n}\n\nmodule.exports = helloWorld;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"default\": \"dist/index.js\",\n  \"targets\": {\n    \"default\": {\n      \"context\": \"browser\",\n      \"engines\": {\n        \"browsers\": [\n          \"> 0.25%\"\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-comments/index.js",
    "content": "console.log('foo');\n// comment\nconsole.log('bar');\n/* block comment line */\nconsole.log('baz');\n/* multi line\n  block comment\n */\nconsole.log('idhf');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-css/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-css/style.css",
    "content": "\nbody {\n\tbackground-color: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-css-existing/style.css",
    "content": "@import \"./test/library.css\";\n\nmain {\n\tdisplay: none;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-css-existing/test/library.css",
    "content": "body{font:100% Helvetica,sans-serif;color:#333}body div{background-color:red;width:100px;height:100px}\n/*# sourceMappingURL=library.css.map*/"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-css-existing/test/library.raw.scss",
    "content": "$font-stack:    Helvetica, sans-serif;\n$primary-color: #333;\n\nbody {\n  font: 100% $font-stack;\n  color: $primary-color;\n\n  div {\n  \tbackground-color: red;\n  \twidth: 100px;\n  \theight: 100px;\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-css-import/another-style.css",
    "content": "main {\n\tfont-family: monospace;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-css-import/other-style.css",
    "content": "\ndiv {\n\twidth: 100px;\n\theight: 100px;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-css-import/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-css-import/style.css",
    "content": "\n@import \"./other-style.css\";\n@import \"./another-style.css\";\n\nbody {\n\tbackground-color: red;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-existing/index.js",
    "content": "const sum = require('./sum');\n\nmodule.exports = function() {\n  return sum(1, 2);\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-existing/sum.js",
    "content": "// Generated by CoffeeScript 1.12.6\n(function() {\n  module.exports = (function(_this) {\n    return function(a, b) {\n      return a + b;\n    };\n  })(this);\n\n}).call(this);\n\n//# sourceMappingURL=sum.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-external-contents/index.js",
    "content": "const sum = require('./sum');\n\nmodule.exports = function() {\n  return sum(1, 2);\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-external-contents/sum.coffee",
    "content": "module.exports = (a, b) => a + b\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-external-contents/sum.js",
    "content": "// Generated by CoffeeScript 1.12.6\n(function() {\n  module.exports = (function(_this) {\n    return function(a, b) {\n      return a + b;\n    };\n  })(this);\n\n}).call(this);\n\n//# sourceMappingURL=sum.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-generate-inline/index.js",
    "content": "export default function test() {\n  return 'test'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-generate-inline/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-node-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"node\": \"dist/index.js\",\n  \"targets\": {\n    \"node\": {\n      \"engines\": {\n        \"node\": \">= 8.0.0\"\n      },\n      \"sourceMap\": {\n        \"inline\": true\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-inline/index.js",
    "content": "const sum = require('./sum');\n\nmodule.exports = function() {\n  return sum(1, 2);\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-inline/sum.js",
    "content": "// Generated by CoffeeScript 2.3.1\n(function() {\n  module.exports = (a, b) => {\n    return a + b;\n  };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3VtLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7RUFBQSxNQUFNLENBQUMsT0FBUCxHQUFpQixDQUFDLENBQUQsRUFBSSxDQUFKLENBQUEsR0FBQTtXQUFVLENBQUEsR0FBSTtFQUFkO0FBQWpCIiwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSAoYSwgYikgPT4gYSArIGJcbiJdfQ==\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-inline-sources/index.js",
    "content": "export default function test() {\n  return 'test'\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-inline-sources/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-node-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"node\": \"dist/index.js\",\n  \"targets\": {\n    \"node\": {\n      \"engines\": {\n        \"node\": \">= 8.0.0\"\n      },\n      \"sourceMap\": {\n        \"inlineSources\": true\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-invalid-existing/index.js",
    "content": "const sum = require('./sum');\n\nmodule.exports = function() {\n  return sum(1, 2);\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-invalid-existing/sum.js",
    "content": "// Generated by CoffeeScript 1.12.6\n(function() {\n  module.exports = (function(_this) {\n    return function(a, b) {\n      return a + b;\n    };\n  })(this);\n\n}).call(this);\n\n//# sourceMappingURL=suuuuum.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-less/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-less/style.less",
    "content": "@value: 100px * 2;\n\ndiv {\n  width: @value;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-nested/index.js",
    "content": "const local = require('./local');\n\nmodule.exports = function() {\n  return local.a + local.b;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-nested/local.js",
    "content": "const util = require('./utils/util');\n\nexports.a = 5;\nexports.b = util.count(4, 5);"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-nested/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"node\": \"dist/index.js\",\n  \"targets\": {\n    \"node\": {\n      \"engines\": {\n        \"node\": \">= 8.0.0\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-nested/utils/util.js",
    "content": "exports.count = function(a, b) {\n  return a + b;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-nested-minified/index.js",
    "content": "const local = require('./local');\n\nmodule.exports = function() {\n  return local.a + local.b;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-nested-minified/local.js",
    "content": "const util = require('./utils/util');\n\nexports.a = 5;\nexports.b = util.count(4, 5);"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-nested-minified/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"node\": \"dist/index.js\",\n  \"targets\": {\n    \"node\": {\n      \"engines\": {\n        \"node\": \">= 8.0.0\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-nested-minified/utils/util.js",
    "content": "exports.count = function(a, b) {\n  return a + b;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-node/index.js",
    "content": "function helloWorld() {\n  return \"hello world\";\n}\n\nmodule.exports = helloWorld;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-node/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-node-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"node\": \"dist/index.js\",\n  \"targets\": {\n    \"node\": {\n      \"engines\": {\n        \"node\": \">= 8.0.0\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-original-sourcecontents/.babelrc",
    "content": "{\n  \"presets\": [\"@babel/preset-react\", \"@babel/preset-flow\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-original-sourcecontents/index.js",
    "content": "// @flow\n\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\n\ntype Props = {|\n  bar: string,\n|};\n\nfunction App(props: Props) {\n  return <div>{props.bar}</div>;\n}\n\nReactDOM.render(<App bar=\"bar\" />, document.getElementById(\"root\"));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-original-sourcecontents-ts/.babelrc",
    "content": "{\n  \"presets\": [\"@babel/preset-react\", \"@babel/preset-typescript\"]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-original-sourcecontents-ts/index.tsx",
    "content": "import * as React from \"react\";\nimport * as ReactDOM from \"react-dom/client\";\n\ntype Props = {\n  bar: string;\n};\n\nfunction App(props: Props) {\n  return <div>{props.bar}</div>;\n}\n\nReactDOM.createRoot(document.getElementById(\"root\")).render(<App bar=\"bar\" />);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-reference/data.js",
    "content": "module.exports = {\n  some: \"data\",\n  more: {\n    data: \"value\"\n  }\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-reference/index.html",
    "content": "<html>\n  <head>\n    <script src=\"./index.js\"></script>\n  </head>\n  <body>\n    Hello!\n  </body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-reference/index.js",
    "content": "import data from './data';\nexport default data;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-sass/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-sass/style.scss",
    "content": "$variable: #333;\n\nbody {\n  color: $variable;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-sass-imported/other.scss",
    "content": "$variable: monospace;\n\ndiv {\n  font-family: $variable;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-sass-imported/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-sass-imported/style.css",
    "content": "@import \"./other.scss\";\n\nbody {\n\tcolor: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-sourcemappingurl/index.js",
    "content": "console.log('hello');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-sourcemappingurl-multiple-entrypoints/a/index.js",
    "content": "console.log('hello1');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-sourcemappingurl-multiple-entrypoints/b/index.js",
    "content": "console.log('hello2');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-typescript/index.ts",
    "content": "export function env() {\n  return process.env.NODE_ENV;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-typescript/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-typescript-nested/index.ts",
    "content": "import { local } from './local';\n\nexport function env() {\n  return local;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-typescript-nested/local.ts",
    "content": "exports.local = process.env.NODE_ENV;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-typescript-nested/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-typescript-tsc/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.{ts,tsx}\": [\"@parcel/transformer-typescript-tsc\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-typescript-tsc/package.json",
    "content": "{\n  \"name\": \"parcel-sourcemap-integration-test\",\n  \"version\": \"1.0.0\",\n  \"license\": \"MIT\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sourcemap-typescript-tsc/src/index.ts",
    "content": "// comment\n\ntype X = number;\n\nnonExistsFunc();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus/index.js",
    "content": "require('./index.styl');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus/index.styl",
    "content": ".index\n  color: red\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-deps/.stylusrc.js",
    "content": "module.exports = {\n  paths: [__dirname + '/deps', 'global'],\n  imports: ['b']\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-deps/deps/a.styl",
    "content": "@import 'foo/index.styl'\n\n.a\n  color: green\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-deps/global/b.styl",
    "content": ".b\n  color blue\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-deps/index.js",
    "content": "require('./index.styl');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-deps/index.styl",
    "content": "@import 'nib/index.styl'\n@import 'a'\n\n.index\n  color: red\n  display: flex\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-exports/index.styl",
    "content": "@import \"foo\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-exports/package.json",
    "content": "{\n  \"@parcel/resolver-default\": {\n    \"packageExports\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-glob-import/index.js",
    "content": "require('./index.styl');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-glob-import/index.styl",
    "content": "@require 'subdir/**/*'\n\n.index\n  color: red\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-glob-import/subdir/bar/bar.styl",
    "content": ".bar\n  color: green\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-glob-import/subdir/foo/foo.styl",
    "content": ".foo\n  color: blue\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-glob-import/subdir/main.styl",
    "content": ".main\n  color: yellow\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-id-url/index.js",
    "content": "require('./index.styl');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-id-url/index.styl",
    "content": ".svg-background .clip-1\n  clip-path: url(\"#clip-path\")\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-postcss/index.js",
    "content": "var map = require('./index.module.styl');\n\nmodule.exports = function () {\n  return map.index;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-postcss/index.module.styl",
    "content": ".index\n  color: red\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-url/index.js",
    "content": "require('./index.styl');\n\nmodule.exports = function () {\n  return 2;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/stylus-url/index.styl",
    "content": "@font-face\n  font-family: \"Test\"\n  src: url(\"./fonts/test.woff2\") format(\"woff2\")\n\n.index\n  background: url(\"http://google.com\")\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sugarss/index.sss",
    "content": "input.spoiler-input\n  display: none\n\n.spoiler_link\n  cursor: pointer\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg/module.js",
    "content": "import './style.css';\nimport './script';\nconsole.log('module');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg/other1.html",
    "content": "<!DOCTYPE html>\n<title>Other page 1</title>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg/other2.html",
    "content": "<!DOCTYPE html>\n<title>Other page 2</title>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg/script.js",
    "content": "console.log('script');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg/style.css",
    "content": "circle {\n  fill: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-inline-css-import/test.css",
    "content": ":root {\n  fill: red;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-multiple/index.js",
    "content": "import \"./circle.svg\";\nimport \"./square.svg\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react/index.html",
    "content": "<img src=\"icon.svg\" />\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react/package.json",
    "content": "{\n  \"dependencies\": {\n    \"react\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react/react.js",
    "content": "const React = require('react');\nconst ReactIcon = require('./icon.svg');\n\nmodule.exports = <ReactIcon />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react-config/.svgrrc.json",
    "content": "{\n  \"icon\": true,\n  \"ref\": true,\n  \"memo\": true,\n  \"svgProps\": {\n    \"role\": \"img\"\n  },\n  \"replaceAttrValues\": {\n    \"#61dafb\": \"{props.fill}\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react-config/index.html",
    "content": "<img src=\"icon.svg\" />\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react-config/package.json",
    "content": "{\n  \"dependencies\": {\n    \"preact\": \"*\"\n  },\n  \"alias\": {\n    \"preact/jsx-dev-runtime\": \"preact/jsx-runtime\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react-config/react.js",
    "content": "const { h } = require('preact');\nconst PreactIcon = require('./icon.svg');\n\nmodule.exports = <PreactIcon />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react-config/svgo.config.json",
    "content": "{\n  \"plugins\": [\n    {\n      \"name\": \"preset-default\",\n      \"params\": {\n        \"overrides\": {\n          \"addClassesToSVGElement\": {\n            \"className\": \"icon\"\n          }\n        }\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react-typescript/.svgrrc.json",
    "content": "{\n    \"typescript\": true\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react-typescript/index.html",
    "content": "<img src=\"icon.svg\" />\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react-typescript/package.json",
    "content": "{\n  \"source\": \"react.ts\",\n  \"main\": \"icons.js\",\n  \"types\": \"types.d.ts\",\n  \"dependencies\": {\n    \"react\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-react-typescript/react.ts",
    "content": "\ninterface SVGRComponent\n      extends React.StatelessComponent<React.SVGAttributes<SVGElement>> {}\n    \nimport React from 'react';\nimport ReactIcon from './icon.svg';\nconst Icon:SVGRComponent = ReactIcon;\nexport default Icon;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-xml-stylesheet/style1.css",
    "content": ":root {\n  fill: red;\n  font-family: serif;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-xml-stylesheet/style2.css",
    "content": ":root {\n  font-family: sans-serif;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-xml-stylesheet/style3.css",
    "content": ":root {\n  font-family: monospace;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svg-xml-stylesheet/style4.css",
    "content": ":root {\n  font-family: cursive;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svgo-config/index.html",
    "content": "<img src=\"icon.svg\" />\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/svgo-config/svgo.config.js",
    "content": "module.exports = {\n  plugins: [\n    {\n      name: 'preset-default',\n      params: {\n        overrides: {\n          removeComments: false\n        }\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/swc-helpers/index.js",
    "content": "(async () => {\n\tconsole.log(await Promise.resolve(1));\n})();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/swc-helpers-library/index.js",
    "content": "class Test {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/swc-helpers-library/package.json",
    "content": "{\n  \"main\": \"dist/main.js\",\n  \"module\": \"dist/module.js\",\n  \"browserslist\": \"IE >= 11\",\n  \"dependencies\": {\n    \"@swc/helpers\": \"^0.5.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async/dep.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async/get-dep-2.js",
    "content": "export default import('./dep').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async/get-dep-scope-hoisting.js",
    "content": "output = import('./dep').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async/get-dep.js",
    "content": "export default import('./dep').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async/same-ancestry-scope-hoisting.js",
    "content": "import dep from './dep';\n\noutput = import('./get-dep')\n  .then(mod => mod.default)\n  .then(asyncDep => [dep, asyncDep]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async/same-ancestry.js",
    "content": "import dep from './dep';\n\nexport default import('./get-dep')\n  .then(mod => mod.default)\n  .then(asyncDep => [dep, asyncDep]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async/same-bundle-scope-hoisting.js",
    "content": "import dep from './dep';\nimport getDep from './get-dep';\n// Test multiple async dependencies to `dep` in the same bundle\nimport getDep2 from './get-dep-2';\n\noutput = Promise.all([\n  getDep,\n  getDep2,\n]).then(([_async, _async2]) => [dep, _async, _async2]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async/same-bundle.js",
    "content": "import dep from './dep';\nimport getDep from './get-dep';\n// Test multiple async dependencies to `dep` in the same bundle\nimport getDep2 from './get-dep-2';\n\nexport default Promise.all([\n  getDep,\n  getDep2,\n]).then(([_async, _async2]) => [dep, _async, _async2]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async-when-needed/async-has-dep.js",
    "content": "import dep from './dep';\nimport getDep from './get-dep';\n\nexport default getDep;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async-when-needed/dep.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async-when-needed/get-dep.js",
    "content": "export default import('./dep').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async-when-needed/index.js",
    "content": "output = Promise.all([\n  import('./async-has-dep').then(mod => mod.default),\n  import('./get-dep').then(mod => mod.default)\n]);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-async-when-needed/package.json",
    "content": "{\n  \"@parcel/bundler-default\": {\n    \"maxParallelRequests\": 1\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-entry-shared/async.js",
    "content": "import value from './value';\n\nexport default value + 1;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-entry-shared/index.js",
    "content": "export default import('./async').then(mod => mod.default);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/sync-entry-shared/value.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/tailwind-scss/.postcssrc.js",
    "content": "const path = require(\"path\");\n\nmodule.exports = {\n  plugins: [\n      require('tailwindcss')(path.resolve(__dirname, \"tailwind.config.js\")),\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/tailwind-scss/index.html",
    "content": "<html>\n  <head>\n    <link rel=\"stylesheet\" href=\"index.scss\">\n  </head>\n  <body class=\"p-2\">\n    test\n  </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/tailwind-scss/index.scss",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\nbody {\n  @apply p-4 m-4;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/tailwind-scss/package.json",
    "content": "{\n\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/tailwind-scss/tailwind.config.js",
    "content": "const path = require(\"path\");\n\nmodule.exports = {\n  content: [path.join(__dirname, \"index.html\")],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-overwrite-source/app/package.json",
    "content": "{\n  \"app\": \"src/index.html\",\n  \"source\": \"src/index.html\",\n  \"targets\": {\n    \"app\": {\n      \"distDir\": \"src/\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-overwrite-source/app/src/file.js",
    "content": "console.log(\"Parcel might overwrite index.html\");\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-overwrite-source/app/src/index.html",
    "content": "<html>\n    <body>\n        <script src=\"file.js\" type=\"text/javascript\"></script>\n    </body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-overwrite-source/browser/index.js",
    "content": "console.log('I hope Parcel does not overwrite me.');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-overwrite-source/browser/package.json",
    "content": "{\n    \"browser\": \"index.js\",\n    \"source\": \"index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-overwrite-source/main/index.js",
    "content": "console.log('I hope Parcel does not overwrite me.');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-overwrite-source/main/package.json",
    "content": "{\n    \"main\": \"index.js\",\n    \"source\": \"index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-overwrite-source/module/index.js",
    "content": "console.log('I hope Parcel does not overwrite me.');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-overwrite-source/module/package.json",
    "content": "{\n    \"module\": \"index.js\",\n    \"source\": \"index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/package.json",
    "content": "{\n  \"name\": \"@parcel/target-source\",\n  \"version\": \"2.0.0-beta.1\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"source\": \"src/index.js\",\n  \"scripts\": {\n    \"clean\": \"rm -rf ../.parcel-cache dist\",\n    \"demo\": \"yarn clean && PARCEL_WORKERS=0 parcel build packages/package-a\",\n    \"debug\": \"yarn clean && PARCEL_WORKERS=0 node --inspect-brk ../../core/parcel/src/bin.js build packages/*\",\n    \"watch\": \"nodemon -w ../../ -i packages/package-a/dist -i packages/package-b/dist -i ../.parcel-cache -d 2 -x yarn demo\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-a/package.json",
    "content": "{\n  \"name\": \"@parcel/target-source-package-a\",\n  \"version\": \"2.0.0-beta.1\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"source\": \"src/index.js\",\n  \"devDependencies\": {\n    \"@parcel/babel-register\": \"2.0.0-beta.1\",\n    \"@parcel/core\": \"2.0.0-beta.1\"\n  },\n  \"targets\": {\n    \"alternate\": {\n      \"source\": [\"src/indexAlternate.js\", \"src/indexAlternate2.js\"]\n    },\n    \"browser\": {\n      \"engines\": {\n        \"browsers\": [\n          \"last 1 Chrome version\"\n        ]\n      }\n    }\n  },\n  \"dependencies\": {\n    \"lodash\": \"^4.17.11\",\n    \"react\": \"^16.6.3\",\n    \"react-dom\": \"^16.6.3\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-a/src/bar.js",
    "content": "export default function() {\n  return 'hello bar!';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-a/src/foo.js",
    "content": "export default function() {\n  return 'hello foo5!';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-a/src/index.js",
    "content": "import foo from './foo';\n\nconsole.log(foo());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-a/src/indexAlternate.js",
    "content": "import bar from './bar';\n\nconsole.log(bar());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-a/src/indexAlternate2.js",
    "content": "import foo from './foo';\n\nconsole.log(foo());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-b/package.json",
    "content": "{\n  \"name\": \"@parcel/target-source-package-b\",\n  \"version\": \"2.0.0-beta.1\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"source\": \"src/index.js\",\n  \"devDependencies\": {\n    \"@parcel/babel-register\": \"2.0.0-beta.1\",\n    \"@parcel/core\": \"2.0.0-beta.1\"\n  },\n  \"targets\": {\n    \"alternate\": {\n      \"source\": \"src/indexAlternate.js\"\n    },\n    \"browser\": {\n      \"engines\": {\n        \"browsers\": [\n          \"last 1 Chrome version\"\n        ]\n      }\n    }\n  },\n  \"dependencies\": {\n    \"lodash\": \"^4.17.11\",\n    \"react\": \"^16.6.3\",\n    \"react-dom\": \"^16.6.3\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-b/src/bar.js",
    "content": "export default function() {\n  return 'hello bar!';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-b/src/foo.js",
    "content": "export default function() {\n  return 'hello foo5!';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-b/src/index.js",
    "content": "import foo from './foo';\n\nconsole.log(foo());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/target-source/packages/package-b/src/indexAlternate.js",
    "content": "import bar from './bar';\n\nconsole.log(bar());\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/terser-codeframe/.parcelrc",
    "content": "{\n    \"extends\": \"@parcel/config-default\",\n    \"transformers\": {\n        \"*.js\": [\"@parcel/transformer-raw\"]\n    },    \n    \"packagers\": {\n        \"*.js\": \"@parcel/packager-raw\"\n    }\n\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/terser-codeframe/index.js",
    "content": "let ;\nlet y = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/terser-config/.terserrc",
    "content": "{\n  \"compress\": {\n    \"drop_console\": true\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/terser-config/index.js",
    "content": "// This is a comment\nmodule.exports = function () {\n    console.log('Hello world');\n    return 1 + 1;\n};"
  },
  {
    "path": "packages/core/integration-tests/test/integration/toml/index.js",
    "content": "var local = require('./local.toml');\n\nmodule.exports = function () {\n  return local.a + local.b.c;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/toml/local.toml",
    "content": "a = 1\n\n[b]\nc = 2\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/transpilation-invalid/index.js",
    "content": "/* @jsx h */\n\nconst Boom = () => {\n  const littleBoom = ['hello', 'world']\n  return <div>{...littleBoom.map(el => el)}</div>\n}\nclass X {\n  #x(){}\n  #x(){}\n}\nconsole.log(Boom, X);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/transpilation-invalid/package.json",
    "content": "{\n  \"dependencies\": {\n    \"react\": \"^18.1.0\"\n  },\n  \"browserslist\": \"ie 11\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/augmentation/augmenter/package.json",
    "content": "{\n\t\"name\": \"augmenter\",\n\t\"version\": \"1.0.0\",\n\t\"source\": \"src/index.ts\",\n\t\"types\": \"dist/index.d.ts\",\n\t\"main\": \"dist/index.js\",\n\t\"dependencies\": {\n\t\t\"original\": \"1.0.0\"\n\t}\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/augmentation/augmenter/src/expected.d.ts",
    "content": "export const anotherThing: string;\ndeclare module \"original\" {\n    interface Person {\n        greet(): string;\n    }\n}\nexport const somethingElse: string;\n\n//# sourceMappingURL=index.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/augmentation/augmenter/src/index.ts",
    "content": "import { Person } from \"original\";\nPerson.prototype.greet = function() { return `Hello ${this.name}!` }\n\nexport const anotherThing: string = \"hello\";\n\ndeclare module \"original\" {\n  interface Person {\n    greet(): string;\n  }\n}\n\nexport const somethingElse: string = \"goodbye\";"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/augmentation/original/built-src/index.d.ts",
    "content": "export declare class Person {\n    name: string;\n    constructor(name: string);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/augmentation/original/built-src/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Person = void 0;\nclass Person {\n    constructor(name) {\n        this.name = name;\n    }\n}\nexports.Person = Person;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/augmentation/original/package.json",
    "content": "{\n\t\"name\": \"original\",\n\t\"version\": \"1.0.0\",\n\t\"source\": \"src/index.ts\",\n\t\"main\": \"built-src/index.js\",\n    \"types\": \"built-src/index.d.ts\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/augmentation/original/src/index.ts",
    "content": "export class Person {\n    constructor(public name: string) {}\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/augmentation/package.json",
    "content": "{\n\t\"private\": true,\n\t\"workspaces\": [\n\t\t\"augmenter\",\n\t\t\"original\"\n\t]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/composite/add.ts",
    "content": "export const add = (a: number, b: number) => a + b;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/composite/expected.d.ts",
    "content": "export const add: (a: number, b: number) => number;\n\n//# sourceMappingURL=index.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/composite/index.ts",
    "content": "export * from './add';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/composite/package.json",
    "content": "{\n  \"name\": \"ts-composite\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/index.d.ts\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/composite/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"incremental\": true\n  },\n  \"files\": [\n    \"index.ts\",\n    \"add.ts\"\n  ],\n  \"references\": []\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/error/file2.ts",
    "content": "type Snapshot<T> = {\n  readonly [K in keyof T]: Snapshot<T[K]>;\n};\n\nexport function snapShot<V>(): Snapshot<V> {\n  return 1 as any;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/error/index.ts",
    "content": "import { snapShot } from \"./file2\";\n\nexport interface State {\n  value: any;\n}\n\ntype ContextType = ReturnType<typeof snapShot<State>>;\nfunction id<T>(v: T) {\n  return v;\n}\nconst Context = id<ContextType | null>(null);\n\nexport function useStateContext() {\n  return Context;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/error/package.json",
    "content": "{\n  \"name\": \"ts-types-error\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\",\n  \"dependencies\": {\n    \"react\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/exporting/expected.d.ts",
    "content": "declare class Message {\n    msg: string;\n    constructor(msg: string);\n}\nexport function createMessage(msg: string): Message;\nexport interface Test {\n    foo: number;\n}\nexport interface Params {\n    bar: number;\n}\nexport var a: number, b: number;\nexport function toUpperCase(foo: string): string;\ndeclare const _default: \"test\";\nexport default _default;\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/exporting/index.ts",
    "content": "export {createMessage} from './message';\nexport * from './other';\nexport {test as toUpperCase, default} from './test';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/exporting/message.ts",
    "content": "export class Message {\n  msg: string;\n  constructor(msg: string) {\n    this.msg = msg;\n  }\n}\n\nexport function createMessage(msg: string) {\n  return new Message(msg);\n}\n\nexport default 'unused';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/exporting/other.ts",
    "content": "export interface Test {\n  foo: number;\n}\n\nexport interface Params {\n  bar: number;\n}\n\nexport var a = 2, b = 5;\nexport default function (p: Params) {\n  return p.bar;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/exporting/package.json",
    "content": "{\n  \"name\": \"ts-types-exporting\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/exporting/test.ts",
    "content": "export function test(foo: string) {\n  return foo.toUpperCase();\n}\n\nexport default 'test';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/exporting-overload/expected.d.ts",
    "content": "import { Named1, Named2 } from \"external\";\nexport function overloaded(arg: string): Named1;\nexport function overloaded(arg: number): Named2;\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/exporting-overload/index.ts",
    "content": "import {Named1, Named2} from 'external';\n\nexport function overloaded(arg: string): Named1;\nexport function overloaded(arg: number): Named2;\nexport function overloaded(arg: unknown): unknown {\n  return {};\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/exporting-overload/package.json",
    "content": "{\n  \"name\": \"ts-types-exporting-overload\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\",\n  \"dependencies\": {\n    \"external\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/externals/expected.d.ts",
    "content": "import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport External from \"external\";\nimport Default, { Named } from \"other-external\";\ninterface Props {\n    children: ReactNode;\n}\nexport const Component: React.FC<Props>;\nexport { External, Default, Named };\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/externals/index.tsx",
    "content": "import {ReactNode} from 'react';\nimport * as React from 'react';\nimport {OtherComponent} from './other';\nimport External from 'external';\nimport Default, {Named} from 'other-external';\n\ninterface Props {\n  children: ReactNode\n}\n\nexport const Component: React.FC<Props> = (props) => {\n  return <OtherComponent>{props.children}</OtherComponent>;\n}\n\nexport {External, Default, Named};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/externals/other.tsx",
    "content": "import * as React from 'react';\nimport {ReactNode} from 'react';\n\ninterface OtherProps {\n  children: ReactNode\n}\n\nexport function OtherComponent(props: OtherProps) {\n  return <div>{props.children}</div>;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/externals/package.json",
    "content": "{\n  \"name\": \"ts-types-externals\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\",\n  \"dependencies\": {\n    \"react\": \"*\",\n    \"external\": \"*\",\n    \"other-external\": \"*\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/import-export-collision/expected.d.ts",
    "content": "import { Test as _Test1 } from \"external\";\nexport class Test implements _Test1 {\n}\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/import-export-collision/index.ts",
    "content": "import {Test as ITest} from 'external';\nexport class Test implements ITest {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/import-export-collision/package.json",
    "content": "{\n  \"name\": \"ts-types-externals\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing/expected.d.ts",
    "content": "interface Test {\n    foo: number;\n}\nexport interface File {\n    name: string;\n}\ndeclare class Message {\n    msg: string;\n    constructor(msg: string);\n}\nexport function foo(f: Test): number;\nexport function file(f: File): Message;\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing/index.ts",
    "content": "import {Test as Foo} from './other';\nimport type {File} from './nested/file';\nimport * as ns from './namespace';\n\nexport function foo(f: Foo) {\n  return f.foo;\n}\n\nexport function file(f: File) {\n  return new ns.Message(f.name);\n}\n\nexport {File};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing/namespace.ts",
    "content": "export class Message {\n  msg: string;\n  constructor(msg: string) {\n    this.msg = msg;\n  }\n}\n\nexport function createMessage(msg: string) {\n  return new Message(msg);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing/nested/file.ts",
    "content": "export interface File {\n  name: string;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing/other.ts",
    "content": "export interface Test {\n  foo: number;\n}\n\nexport interface Params {\n  bar: number;\n}\n\nexport var a = 2, b = 5;\nexport default function () {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing/package.json",
    "content": "{\n  \"name\": \"ts-types-importing\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing-collision/expected.d.ts",
    "content": "declare function _log1(message: string): void;\ndeclare function xyz(message: number): void;\nexport function log(f: typeof _log1 | typeof xyz): void;\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing-collision/index.ts",
    "content": "import { log as logFn1 } from \"./other1\";\nimport { log as logFn2 } from \"./other2\";\n\nexport function log(f: typeof logFn1 | typeof logFn2) {\n  logFn1(\"1\");\n  logFn2(1);\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing-collision/other1.ts",
    "content": "export function log(message: string) {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing-collision/other2.ts",
    "content": "function xyz(message: number) {}\nexport { xyz as log };\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/importing-collision/package.json",
    "content": "{\n  \"name\": \"ts-types-importing\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/main/expected.d.ts",
    "content": "type Params = {\n    hello: number;\n};\ninterface Hello {\n    yo: string;\n}\nexport class Test {\n    test(hello: Hello): string;\n}\nexport default function test(params: Params): number;\nexport function foo(): number;\nexport var x: number;\nexport var hi: number;\nexport declare namespace mod {\n    function bar(): number;\n}\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/main/index.ts",
    "content": "type Params = {\n  hello: number;\n};\n\ninterface Hello {\n  yo: string;\n}\n\nexport class Test {\n  test(hello: Hello) {\n    return hello.yo;\n  }\n}\n\nexport default function test(params: Params) {\n  return params.hello;\n}\n\nexport function foo() {\n  return 2;\n}\n\nvar x = 2;\nvar p = x + 2, q = 3;\nexport {p as hi, x};\n\nexport module mod {\n  export function bar() {\n    return 2;\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/main/package.json",
    "content": "{\n  \"name\": \"ts-types-main\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/monorepo/a/package.json",
    "content": "{\n\t\"name\": \"a\",\n\t\"version\": \"0.0.0\",\n\t\"source\": \"src/index.ts\",\n\t\"types\": \"dist/index.d.ts\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/monorepo/a/src/index.ts",
    "content": "import { B } from \"b\";\n\nexport default function () {\n\treturn new B();\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/monorepo/b/package.json",
    "content": "{\n\t\"name\": \"b\",\n\t\"version\": \"0.0.0\",\n\t\"source\": \"src/index.ts\",\n\t\"types\": \"dist/index.d.ts\",\n\t\"main\": \"dist/index.js\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/monorepo/b/src/index.ts",
    "content": "export class B {}\nexport * from \"./other\";\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/monorepo/b/src/other.ts",
    "content": "export class C {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/monorepo/package.json",
    "content": "{\n\t\"private\": true,\n\t\"workspaces\": [\n\t\t\"a\",\n\t\t\"b\"\n\t]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/private/expected.d.ts",
    "content": "export class Test {\n    _public: string;\n    protected _protected: string;\n}\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/private/index.ts",
    "content": "export class Test {\n  _public: string;\n  private _private: string;\n  protected _protected: string;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/private/package.json",
    "content": "{\n  \"name\": \"ts-types-private\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/promise-or-value/expected.d.ts",
    "content": "export type Callback = () => Promise<any> | any;\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/promise-or-value/index.ts",
    "content": "export type Callback = () => Promise<any> | any;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/promise-or-value/package.json",
    "content": "{\n  \"name\": \"ts-promise-or-value\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/promise-or-value/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"lib\": [\"dom\", \"es2017\"],\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/re-exporting-aggregating/expected.d.ts",
    "content": "type fuga = \"fuga\";\nexport type Baz = `${fuga}`;\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/re-exporting-aggregating/hoge/bar.ts",
    "content": "export type bar = 'bar';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/re-exporting-aggregating/hoge/fuga.ts",
    "content": "export type fuga = \"fuga\";"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/re-exporting-aggregating/hoge/index.ts",
    "content": "export * from \"./bar\";\nexport * from \"./fuga\";"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/re-exporting-aggregating/index.ts",
    "content": "import { fuga } from './hoge';\nexport type Baz = `${fuga}`"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/re-exporting-aggregating/package.json",
    "content": "{\n  \"name\": \"ts-types-re-exporting-aggregating\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/windows-paths/expected.d.ts",
    "content": "type Params = {\n    hello: number;\n};\ninterface Hello {\n    yo: string;\n}\nexport class Test {\n    test(hello: Hello): string;\n}\nexport function test(params: Params): number;\nexport function foo(): number;\nexport var x: number;\nexport var hi: number;\nexport declare namespace mod {\n    function bar(): number;\n}\n\n//# sourceMappingURL=types.d.ts.map\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/windows-paths/index.ts",
    "content": "export * from './src/index';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/windows-paths/package.json",
    "content": "{\n  \"name\": \"ts-types-main\",\n  \"private\": true,\n  \"main\": \"dist/main.js\",\n  \"types\": \"dist/types.d.ts\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/windows-paths/src/index.ts",
    "content": "type Params = {\n  hello: number;\n};\n\ninterface Hello {\n  yo: string;\n}\n\nexport class Test {\n  test(hello: Hello) {\n    return hello.yo;\n  }\n}\n\nexport function test(params: Params) {\n  return params.hello;\n}\n\nexport function foo() {\n  return 2;\n}\n\nvar x = 2;\nvar p = x + 2, q = 3;\nexport {p as hi, x};\n\nexport module mod {\n  export function bar() {\n    return 2;\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-types/windows-paths/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"removeComments\": true,\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@parcel/*\": [\"../../*\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-validation-error/index.ts",
    "content": "import { test } from './test';\n\nexport default test('a string');"
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-validation-error/test.ts",
    "content": "type Params = {\n    hello: string;\n};\n  \nexport function test(params: Params) {\n    return params.world;\n}\n  "
  },
  {
    "path": "packages/core/integration-tests/test/integration/ts-validation-error/tsconfig.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript/Local.ts",
    "content": "export class Local {\n  a: number;\n  b: number;\n\n  constructor(a: number, b: number) {\n    this.a = a;\n    this.b = b;\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript/index.ts",
    "content": "import { Local } from './Local';\n\nexport function count() {\n  let local = new Local(1, 2);\n  return local.a + local.b;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-config/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.{ts,tsx}\": [\"@parcel/transformer-typescript-tsc\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-config/index.ts",
    "content": "/* test comment */\nmodule.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-config/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"removeComments\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-config-extends/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.{ts,tsx}\": [\"@parcel/transformer-typescript-tsc\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-config-extends/index.ts",
    "content": "/* test comment */\nmodule.exports = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-config-extends/tsconfig.json",
    "content": "{\n  \"extends\": \"../typescript-config/tsconfig.json\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-enum/index.ts",
    "content": "export enum A {\n  X = 'X',\n  Y = 'Y',\n}\n\nexport enum B {\n  X = 'X',\n  Y = 'Y',\n}\n\nexport enum C {\n  X = 'X',\n  Y = 'Y',\n}\n\nexport const z = {\n  a: A.X,\n  c: C.Y,\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-env/index.ts",
    "content": "export function env() {\n  return process.env.NODE_ENV;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-fs/index.ts",
    "content": "import { readFileSync } from 'fs';\nimport rawFromTsx from './readFromTsx';\n\nmodule.exports = {\n  fromTs: readFileSync(__dirname + '/raw.tsx', \"utf-8\"),\n  fromTsx: rawFromTsx,\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-fs/raw.tsx",
    "content": "export default <div>Hello</div>;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-fs/readFromTsx.tsx",
    "content": "import { readFileSync } from 'fs';\n\nconst raw = readFileSync(__dirname + '/raw.tsx', \"utf-8\");\n\nexport default raw;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-import-type-reexport/bar.ts",
    "content": "import type { Foo } from \"./foo\";\nexport { Foo } from \"./foo\";\n\nexport function func(f: Foo) {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-import-type-reexport/foo.ts",
    "content": "export enum Foo {\n  Bar = 123,\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-import-type-reexport/index.ts",
    "content": "import { Foo } from \"./bar\";\n\nexport const Bar = Foo.Bar;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-interop/commonjs-module.js",
    "content": "module.exports = () => 'test passed'\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-interop/index.ts",
    "content": "import testModule from './commonjs-module'\n\nexport const test = testModule\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-json/index.ts",
    "content": "const local = require('./local.json');\n\nexport function count() {\n  return local.a + local.b;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-json/local.json",
    "content": "{\n  \"a\": 1,\n  \"b\": 2\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-jsx/index.tsx",
    "content": "module.exports = <div />;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-legacy-cast/index.ts",
    "content": "interface HeaderAction {}\n\nlet setCurrentAction = (arg: any) => {};\nlet getCurrentAction = () => {\n  return {};\n};\n\nconst setAction = (fields: Partial<HeaderAction>) => {\n  setCurrentAction({ ...<HeaderAction>getCurrentAction(), ...fields });\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-legacy-cast/package.json",
    "content": "{\n  \"dependencies\": {\n    \"react\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-raw/index.ts",
    "content": "const url = require('url:./test.txt');\n\nexport function getRaw() {\n  return url;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-raw/test.txt",
    "content": "hi there\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-require/Local.ts",
    "content": "class Local {\n  a: number;\n  b: number;\n\n  constructor(a: number, b: number) {\n    this.a = a;\n    this.b = b;\n  }\n}\n\nmodule.exports = Local;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-require/index.ts",
    "content": "const Local = require('./Local');\n\nexport function count() {\n  let local = new Local(1, 2);\n  return local.a + local.b;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-types-parcelrc/.parcelrc",
    "content": "{\n    \"extends\": \"@parcel/config-default\",\n    \"transformers\": {\n      \"*.ts\": [\n        \"@parcel/transformer-typescript-tsc\"\n      ]\n    }\n  }\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-types-parcelrc/index.ts",
    "content": "export class Foo {\n  run(){\n    return \"bar\";\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/typescript-types-parcelrc/package.json",
    "content": "{\n    \"name\": \"typescript-types-parcelrc\",\n    \"main\": \"./dist/index.js\",\n    \"types\": \"./dist/index.d.ts\",\n    \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/uglify/index.js",
    "content": "var local = require('./local');\n\nmodule.exports = function () {\n  return local.a + local.b;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/uglify/local.js",
    "content": "exports.a = 1;\nexports.b = 2;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/uglify-json/index.json",
    "content": "{\n    \"test\": \"test\"\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/uglify-json5/index.json5",
    "content": "/*\n * comment\n */\n{\n  \"test\": \"test\", // comment\n}\n/* end */\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/undeclared-external/helpers.js",
    "content": "class Test {}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/undeclared-external/index.js",
    "content": "import {add} from 'lodash';\n\nconsole.log(add(2, 3));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/undeclared-external/package.json",
    "content": "{\n  \"name\": \"undeclared-external\",\n  \"main\": \"dist/out.js\",\n  \"browserslist\": \">= 0.25%\",\n  \"dependencies\": {}\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/url-colon/absolute.html",
    "content": "<!doctype html>\n<a href=\"/a:b:c.html\">Test</a>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/url-colon/relative.html",
    "content": "<!doctype html>\n<a href=\"./a:b:c.html\">Test</a>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-basic/Basic.vue",
    "content": "<template>\n  <h2 class=\"red\">{{msg}}</h2>\n</template>\n\n<script>\n  export default {\n    data () {\n      return {\n        msg: 'Hello from Component A!'\n      }\n    }\n  }\n</script>\n\n<style>\n  comp-a h2 {\n    color: #f00;\n  }\n</style>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-css-modules/App.vue",
    "content": "<style module>\n.red {\n  color: red;\n}\n</style>\n\n<style module=\"a\">\n.green {\n  color: green;\n}\n</style>\n\n<template>\n<div>\n  <p :class=\"$style.red\">\n    This should be red\n  </p>\n  <p :class=\"a.green\">\n    This should be green\n  </p>\n</div>\n</template>\n\n<script>\nexport default {\n  created () {\n    console.log(this.$style.red)\n    // -> \"_1VyoJ-uZOjlOxP7jWUy19_0\"\n    // an identifier generated based on filename and className.\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-custom-blocks/.vuerc",
    "content": "{\n  \"customBlocks\": {\n    \"docs\": \"./docs-processor.js\"\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-custom-blocks/App.vue",
    "content": "<template>\n  <div>\n    <child></child>\n    docs: {{docs.standard}}\n    in brief: {{docs.brief}}\n  </div>\n</template>\n\n<script>\nimport Child from './Child.vue';\nexport default {\n  components: {\n    child: Child\n  },\n  data() {\n    return {\n      docs: {\n        standard: Child.__docs,\n        brief: Child.__docsBrief\n      }\n    }\n  }\n}\n</script>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-custom-blocks/Child.vue",
    "content": "<template>\n  <div>Home Page</div>\n</template>\n\n<docs>\nThis component represents the home page of the application.\n</docs>\n\n<docs brief>\nHome Page\n</docs>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-custom-blocks/docs-processor.js",
    "content": "export default (component, docs, attrs) => {\n  if (attrs.brief)\n    component.__docsBrief = docs;\n  else\n    component.__docs = docs;\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-custom-blocks/package.json",
    "content": "{\n  \"name\": \"vue-custom-blocks\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-dependencies/App.vue",
    "content": "<template>\n  <div id=\"app\">\n    <img src=\"url:./assets/logo.png\">\n    <h1>{{ msg }}</h1>\n    <h2>Essential Links</h2>\n    <ul>\n      <li><a href=\"https://vuejs.org\" target=\"_blank\">Core Docs</a></li>\n      <li><a href=\"https://forum.vuejs.org\" target=\"_blank\">Forum</a></li>\n      <li><a href=\"https://chat.vuejs.org\" target=\"_blank\">Community Chat!</a></li>\n      <li><a href=\"https://twitter.com/vuejs\" target=\"_blank\">Twitter</a></li>\n    </ul>\n    <h2>Ecosystem</h2>\n    <ul>\n      <li><a href=\"http://router.vuejs.org/\" target=\"_blank\">vue-router</a></li>\n      <li><a href=\"http://vuex.vuejs.org/\" target=\"_blank\">vuex</a></li>\n      <li><a href=\"http://vue-loader.vuejs.org/\" target=\"_blank\">vue-loader</a></li>\n      <li><a href=\"https://github.com/vuejs/awesome-vue\" target=\"_blank\">awesome-vue</a></li>\n    </ul>\n  </div>\n</template>\n\n<script>\nexport default {\n  name: 'app',\n  data () {\n    return {\n      msg: 'Welcome to Your Vue.js App!'\n    }\n  }\n}\n</script>\n\n<style>\n#app {\n  font-family: 'Avenir', Helvetica, Arial, sans-serif;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  text-align: center;\n  color: #2c3e50;\n  margin-top: 60px;\n}\n\nh1, h2 {\n  font-weight: normal;\n}\n\nul {\n  list-style-type: none;\n  padding: 0;\n}\n\nli {\n  display: inline-block;\n  margin: 0 10px;\n}\n\na {\n  color: #42b983;\n}\n</style>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-external-files/App.vue",
    "content": "<template src=\"./main.pug\"></template>\n<style src=\"./style.scss\"></style>\n<script src=\"./script.ts\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-external-files/main.pug",
    "content": "div\n  h1 foo \n  h2 bar\n  div.box\n    p {{ msg }}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-external-files/script.ts",
    "content": "export default {\n  data () {\n    return {\n      msg: 'Hello World'\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-external-files/style.scss",
    "content": "$cool-color: #c0ff33;\n\ndiv {\n  h1 {\n    color: red;\n  }\n}\n\nh2 {\n  color: blue;\n\n  &:hover {\n    color: $cool-color;\n  }\n}\n\n.box {\n  border: 1px solid black;\n\n  p {\n    color: $cool-color;\n    font-size: 10rem;\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-nested-components/insidecomp.vue",
    "content": "<template lang=\"html\">\n  <div>inside</div>\n</template>\n\n<script>\n  export default { }\n</script>\n\n<style scoped>\n  div { color: red; }\n</style>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-nested-components/testcomp.vue",
    "content": "<template lang=\"html\">\n  <div>\n    test component start:\n    <component :is=\"compName\" />\n    end.\n  </div>\n</template>\n\n<script>\n  export default {\n    components: { InsideComp: () => import('./insidecomp') },\n    props: [ 'compName' ]\n  }\n</script>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-preprocessors/pre-processors.vue",
    "content": "<style lang=\"stylus\">\nfont-stack = Helvetica, sans-serif\nprimary-color = #999\nbody\n  font 100% font-stack\n  color primary-color\n</style>\n\n<style lang=\"scss\">\n$red: red;\nh1 {\n  background: $red;\n}\n</style>\n\n<style lang=\"less\">\n@green: green;\nh1 {\n  color: @green;\n}\n</style>\n\n<template lang=\"pug\">\ndiv\n  h1 This is the app\n  comp-a\n  comp-b\n</template>\n\n<script lang=\"coffee\">\nmodule.exports =\n  data: ->\n    msg: 'Hello from coffee!'\n</script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-scoped/App.vue",
    "content": "<style scoped>\n.test {\n  color: yellow;\n}\n.test:after {\n  content: 'bye!';\n}\nh1 {\n  color: green;\n}\n</style>\n\n<template>\n<div>\n  <div><h1>hi</h1></div>\n  <p class=\"abc def\">hi</p>\n  <template v-if=\"ok\"><p class=\"test\">yo</p></template>\n  <svg><template><p></p></template></svg>\n</div>\n</template>\n\n<script>\nexport default {\n  data () {\n    return { ok: true }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/vue-script-setup/App.vue",
    "content": "<script setup>\nimport { ref } from 'vue';\n\nconst name = ref(\"parcel\");\n</script>\n\n<template>\n<p>Hello {{ name }}</p>\n</template>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/wasm-async/.eslintrc",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/wasm-async/index.js",
    "content": "module.exports = import('./add.wasm').then(function ({add}) {\n  return add(2, 3);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/wasm-dynamic/.eslintrc",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/wasm-dynamic/dynamic.js",
    "content": "var {add} = require('./add.wasm');\n\nmodule.exports = add;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/wasm-dynamic/index.js",
    "content": "module.exports = import('./dynamic').then(function (add) {\n  return add(2, 3);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/wasm-sourcemap-transformer/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.wasm\": [\"parcel-transformer-test\"]\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/wasm-sourcemap-transformer/index.js",
    "content": "console.log(new URL(\"index.wasm\", import.meta.url))\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/wasm-sync/.eslintrc",
    "content": "{\n  \"extends\": \"../.eslintrc.json\",\n  \"parserOptions\": {\n    \"sourceType\": \"module\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/wasm-sync/index.js",
    "content": "const {add} = require('./add.wasm');\noutput(add(2, 3));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/.parcelrc",
    "content": "{\n  \"extends\": [\"@parcel/config-webextension\"]\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/_locales/.unwanted-file",
    "content": "This is to cover files like .DS_Store"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/_locales/en_US/messages.json",
    "content": "{\n  \"prompt_for_name\": {\n    \"message\": \"What's your name?\",\n    \"description\": \"Ask for the user's name\"\n  },\n  \"hello\": {\n    \"message\": \"Hello, $USER$\",\n    \"description\": \"Greet the user\",\n    \"placeholders\": {\n      \"user\": {\n        \"content\": \"$1\",\n        \"example\": \"Cira\"\n      }\n    }\n  },\n  \"bye\": {\n    \"message\": \"Goodbye, $USER$. Come back to $OUR_SITE$ soon!\",\n    \"description\": \"Say goodbye to the user\",\n    \"placeholders\": {\n      \"our_site\": {\n        \"content\": \"Example.com\"\n      },\n      \"user\": {\n        \"content\": \"$1\",\n        \"example\": \"Cira\"\n      }\n    }\n  }\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/dicts/tmp.aff",
    "content": "World!!"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/dicts/tmp.dic",
    "content": "Hello"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/manifest.json",
    "content": "{\n  \"manifest_version\": 2,\n  \"name\": \"Parcel WebExt\",\n  \"version\": \"0.1.2.65535\",\n  \"default_locale\": \"en_US\",\n  \"icons\": {\n    \"100\": \"src/assets/foo.png\"\n  },\n  \"background\": {\n    \"scripts\": [\"./src/background.ts\"],\n    \"persistent\": true\n  },\n  \"browser_action\": {\n    \"default_icon\": {\n      \"100\": \"src/assets/foo.png\"\n    },\n    \"theme_icons\": [{\n      \"dark\": \"src/assets/foo-dark.png\",\n      \"light\": \"src/assets/foo.png\",\n      \"size\": 16\n    }],\n    \"default_popup\": \"src/popup.html\"\n  },\n  \"content_scripts\": [{\n    \"matches\": [\"https://parceljs.org/*\"],\n    \"js\": [\"src/content.js\"],\n    \"css\": [\"src/content.css\"]\n  }],\n  \"declarative_net_request\": {\n    \"rule_resources\": [{\n      \"id\": \"ruleset_1\",\n      \"enabled\": true,\n      \"path\": \"./rulesets/ruleset_1.json\"\n    }]\n  },\n  \"dictionaries\": {\n    \"en-US\": \"./dicts/tmp.dic\"\n  },\n  \"devtools_page\": \"src/devtools.html\",\n  \"web_accessible_resources\": [\n    \"src/assets/**/*.txt\"\n  ]\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/rulesets/ruleset_1.json",
    "content": "[]"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/src/assets/a.txt",
    "content": "Hello Parcel WebExt!"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/src/assets/nested/b.txt",
    "content": "Hello Parcel WebExt (VERSION B)!"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/src/background.ts",
    "content": "console.log('Hello Parcel!')"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/src/content.css",
    "content": "div::before {\n  content: 'Hello Parcel!'\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/src/content.js",
    "content": "console.log('Hello Parcel! CONTENT EDITION')"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/src/devtools.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Devtools</title>\n</head>\n<body>\n  \n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension/src/popup.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Popup</title>\n</head>\n<body>\n  \n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/.parcelrc",
    "content": "{\n  \"extends\": [\"@parcel/config-webextension\"]\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/background.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/content-script.js",
    "content": "alert('File test alert');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/injected.css",
    "content": "h1 {\n    font-family: \"Comic Sans MS\";\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/manifest.json",
    "content": "{\n  \"name\": \"MV3 Migration - content script example\",\n  \"description\": \"Source: https://github.com/GoogleChrome/chrome-extensions-samples\",\n  \"version\": \"0.1\",\n  \"manifest_version\": 3,\n  \"background\": {\n    \"service_worker\": \"background.js\",\n    \"type\": \"module\",\n    \"scripts\": [ \"background.js\" ]\n  },\n  \"permissions\": [\n    \"scripting\",\n    \"activeTab\"\n  ],\n  \"content_scripts\": [{\n    \"matches\": [\"https://*.google.com/*\"],\n    \"js\": [\"other-content-script.js\"],\n    \"world\": \"ISOLATED\"\n  }],\n  \"action\": {\n    \"default_popup\": \"popup.html\"\n  },\n  \"side_panel\": {\n    \"default_path\": \"side-panel.html\"\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/other-content-script.js",
    "content": "import './injected.css';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/popup.css",
    "content": "* {\n  box-sizing: border-box;\n}\nhtml,\nbody,\nmain {\n  height: 100%;\n  margin: 0;\n  padding: 0;\n}\nbody {\n  min-width: 20em;\n  min-height: 10em;\n}\nmain {\n  padding: 1em .5em;\n  display: grid;\n  place-items: center;\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/popup.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Document</title>\n  <link rel=\"stylesheet\" href=\"popup.css\">\n  <script src=\"popup.js\" type=\"module\"></script>\n</head>\n<body>\n  <main>\n    <div>\n      <button id=\"inject-file\">Inject file</button>\n    </div>\n    <div>\n      <button id=\"inject-function\">Inject function</button>\n    </div>\n  </main>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/popup.js",
    "content": "import contentScript from 'url:./content-script.js';\nlet injectFile = document.getElementById('inject-file');\nlet injectFunction = document.getElementById('inject-function');\n\nasync function getCurrentTab() {\n  let queryOptions = { active: true, currentWindow: true };\n  let [tab] = await chrome.tabs.query(queryOptions);\n  return tab;\n}\n\ninjectFile.addEventListener('click', async () => {\n  let tab = await getCurrentTab();\n\n  chrome.scripting.executeScript({\n    target: {tabId: tab.id},\n    files: [contentScript]\n  });\n});\n\nfunction showAlert(givenName) {\n  alert(`Hello, ${givenName}`);\n}\n\ninjectFunction.addEventListener('click', async () => {\n  let tab = await getCurrentTab();\n\n  let name = 'World';\n  chrome.scripting.executeScript({\n    target: {tabId: tab.id},\n    func: showAlert,\n    args: [name]\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-mv3/side-panel.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>SidePanel</title>\n</head>\n<body>\n\n</body>\n</html>"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-resolve-web-accessible-resources/.parcelrc",
    "content": "{\n  \"extends\": [\"@parcel/config-webextension\"]\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-resolve-web-accessible-resources/injected/index-jsx.jsx",
    "content": "import React from 'react';\n\nconst z = <div>Hello</div>;\n\nexport default z;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-resolve-web-accessible-resources/injected/index.ts",
    "content": "const x: number = 12;\n\nexport default x;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-resolve-web-accessible-resources/injected/nested/other.ts",
    "content": "const y: string = 'example';\nexport default y;"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-resolve-web-accessible-resources/injected/nested/unexpected.jsx",
    "content": "export default 'should not be bundled';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-resolve-web-accessible-resources/injected/single.js",
    "content": "export default 'single export';"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webextension-resolve-web-accessible-resources/manifest.json",
    "content": "{\n  \"manifest_version\": 2,\n  \"name\": \"Parcel WebExt\",\n  \"version\": \"1.2.0\",\n  \"web_accessible_resources\": [\n    \"/injected/**/*.ts\",\n    \"/injected/*.jsx\",\n    \"/injected/single.js\"\n  ]\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"manifest\" href=\"manifest.webmanifest\" />\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest/manifest.webmanifest",
    "content": "{\n  \"name\": \"pwa-webmanifest-example\",\n  \"icons\": [\n    {\n      \"src\": \"icon.png\",\n      \"sizes\": \"100x100\",\n      \"type\": \"image/png\"\n    }\n  ],\n  \"screenshots\": [\n    {\n      \"src\": \"screenshot.png\",\n      \"sizes\": \"100x100\",\n      \"type\": \"image/png\"\n    }\n  ],\n  \"shortcuts\": [\n    {\n      \"name\": \"example-shortcut\",\n      \"icons\": [\n        {\n          \"src\": \"shortcut-icon.png\",\n          \"sizes\": \"100x100\",\n          \"type\": \"image/png\"\n        }\n      ]\n    }\n  ],\n  \"file_handlers\": [\n    {\n      \"name\": \"example-file-handler\",\n      \"icons\": [\n        {\n          \"src\": \"file-handler-icon.png\",\n          \"sizes\": \"100x100\",\n          \"type\": \"image/png\"\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest-json/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"manifest\" href=\"manifest.json\" />\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest-json/manifest.json",
    "content": "{\n  \"name\": \"pwa-webmanifest-example\",\n  \"icons\": [\n    {\n      \"src\": \"icon.png\",\n      \"sizes\": \"100x100\",\n      \"type\": \"image/png\"\n    }\n  ],\n  \"screenshots\": [\n    {\n      \"src\": \"screenshot.png\",\n      \"sizes\": \"100x100\",\n      \"type\": \"image/png\"\n    }\n  ],\n  \"shortcuts\": [\n    {\n      \"name\": \"example-shortcut\",\n      \"icons\": [\n        {\n          \"src\": \"shortcut-icon.png\",\n          \"sizes\": \"100x100\",\n          \"type\": \"image/png\"\n        }\n      ]\n    }\n  ],\n  \"file_handlers\": [\n    {\n      \"name\": \"example-file-handler\",\n      \"icons\": [\n        {\n          \"src\": \"file-handler-icon.png\",\n          \"sizes\": \"100x100\",\n          \"type\": \"image/png\"\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest-not-found/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"manifest\" href=\"manifest.webmanifest\" />\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest-not-found/manifest.webmanifest",
    "content": "{\n  \"name\": \"pwa-webmanifest-example\",\n  \"icons\": [\n    {\n      \"src\": \"icon.png\",\n      \"sizes\": \"100x100\",\n      \"type\": \"image/png\"\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest-schema/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"manifest\" href=\"manifest.webmanifest\" />\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest-schema/manifest.webmanifest",
    "content": "{\n  \"name\": \"pwa-webmanifest-example\",\n  \"icons\": [\n    {\n      \"src\": \"icon.png\",\n      \"sizes\": \"100x100\",\n      \"type\": \"image/png\"\n    },\n    {\n      \"sizes\": \"100x100\",\n      \"type\": \"image/png\"\n    },\n    {}\n  ],\n  \"screenshots\": {},\n  \"shortcuts\": [\n    {\n      \"icons\": {}\n    },\n    {\n      \"icons\": [\n        {\n          \"src\": \"icon.png\",\n          \"sizes\": \"100x100\",\n          \"type\": \"image/png\"\n        },\n        {\n          \"sizes\": \"100x100\",\n          \"type\": \"image/png\"\n        },\n        {}\n      ]\n    }\n  ],\n  \"file_handlers\": {}\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest-targets/index.html",
    "content": "<!doctype html>\n<html>\n<head>\n  <link rel=\"manifest\" href=\"manifest.json\" />\n</head>\n<body>\n</body>\n</html>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest-targets/manifest.json",
    "content": "{\n  \"name\": \"pwa-webmanifest-example\",\n  \"icons\": []\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webmanifest-targets/package.json",
    "content": "{\n  \"name\": \"webmanifest-targets\",\n  \"web\": \"./dist/index.html\",\n  \"targets\": {\n    \"web\": {\n      \"context\": \"browser\",\n      \"publicUrl\": \"./\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webpack-import-syntax-error/index.js",
    "content": "import test from 'node-loader!./index.js';\n\nexport default function() {\n  return 'test';\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/webpack-import-syntax-error/package.json",
    "content": "{\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-circular/index.js",
    "content": "new Worker(new URL('worker.js', import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-circular/worker-dep.js",
    "content": "require('./worker');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-circular/worker.js",
    "content": "require('./worker-dep');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-dynamic/async.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-dynamic/index-async.js",
    "content": "import('./async');\n\nlet worker = new Worker(new URL('worker.js', import.meta.url), {type: 'module'});\nworker.addEventListener('message', output);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-dynamic/index-nested.js",
    "content": "let worker = new Worker(new URL('worker-nested.js', import.meta.url), {type: 'module'});\nworker.addEventListener('message', output);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-dynamic/index.js",
    "content": "let worker = new Worker(new URL('worker.js', import.meta.url), {type: 'module'});\nworker.addEventListener('message', output);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-dynamic/worker-nested.js",
    "content": "import('./async');\n\nlet worker = new Worker(new URL('worker.js', import.meta.url), {type: 'module'});\nworker.addEventListener('message', postMessage);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-dynamic/worker.js",
    "content": "import('./async').then(res => postMessage(res));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-meta-url/dynamic.js",
    "content": "let foo = \"abc\";\nnew Worker(new URL(foo, import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-meta-url/index.js",
    "content": "new Worker(new URL(\"./worker.js\", import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-meta-url/local-url.js",
    "content": "class URL {\n  toString(){\n    return \"test.js\";\n  }\n}\n\nnew Worker(new URL(\"./invalid.js\", import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-meta-url/missing.js",
    "content": "new Worker(new URL(\"./invalid.js\", import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-meta-url/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-meta-url/worker.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-scripts/external.js",
    "content": "importScripts('https://unpkg.com/parcel');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-scripts/importScripts.js",
    "content": "importScripts('imported.js');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-scripts/imported.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-scripts/imported2.js",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-scripts/index-external.js",
    "content": "new Worker(new URL('./external', import.meta.url))\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-scripts/index-serviceworker.js",
    "content": "navigator.serviceWorker.register(new URL('importScripts.js', import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-scripts/index-variable.js",
    "content": "new Worker(new URL('./variable', import.meta.url))\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-scripts/index-webworker.js",
    "content": "new Worker(new URL('importScripts.js', import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-import-scripts/variable.js",
    "content": "var url = '/my-worker-script.js';\nimportScripts(url);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-self/import-meta.js",
    "content": "export function startWorker() {\n  new Worker(import.meta.url, {type: 'module'});\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-self/index.js",
    "content": "import {startWorkers} from './workerHelpers.js';\n\nstartWorkers();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-self/workerHelpers.js",
    "content": "export function startWorkers() {\n  new Worker(new URL('./workerHelpers.js', import.meta.url), {type: 'module'});\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-shared/index.js",
    "content": "import _ from 'lodash';\n\nnew Worker(new URL('worker-a.js', import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-shared/worker-a.js",
    "content": "import _ from 'lodash'\n\nconsole.log(_);\nnew Worker(new URL('worker-b.js', import.meta.url), {type: 'module'})\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-shared/worker-b.js",
    "content": "import _ from 'lodash'\nconsole.log(_);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-shared-page/async.js",
    "content": "export default 42;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-shared-page/index.html",
    "content": "<script type=\"module\" src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-shared-page/index.js",
    "content": "import './large';\n\nnew Worker(new URL('worker.js', import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-shared-page/large.js",
    "content": "const lorem = \"lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor\";\n\nimport('./async');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-shared-page/package.json",
    "content": "{\n  \"browserslist\": \">= 0.25%\"\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worker-shared-page/worker.js",
    "content": "import './large';\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers/common.js",
    "content": "// required by worker and index, must be bundled separately\nexports.commonFunction = function (source) {\n  return 'commonText' + source;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers/feature.js",
    "content": "const workerClient = require('./worker-client');\n\nworkerClient.startWorker();\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers/index-alternative.js",
    "content": "exports.startWorker = require('./worker-client').startWorker;\nexports.startSharedWorker = require('./worker-client').startSharedWorker;\nexports.commonFunction = require('./common').commonFunction;\nexports.feature = require('./feature');\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers/index.js",
    "content": "exports.commonFunction = require('./common').commonFunction;\nexports.startWorker = require('./worker-client').startWorker;\nexports.startSharedWorker = require('./worker-client').startSharedWorker;\nexports.feature = require('./feature');\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers/service-worker.js",
    "content": "self.addEventListener('message', () => {});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers/shared-worker.js",
    "content": "onconnect = (e) => {\n  let port = e.ports[0];\n  port.addEventListener('message', ()=> {});\n  port.start();\n}"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers/worker-client.js",
    "content": "const commonText = require('./common').commonFunction('Index');\n\nnavigator.serviceWorker.register(new URL('service-worker.js', import.meta.url), { scope: './' });\n\nexports.startWorker = function() {\n  const worker = new Worker(new URL('worker.js', import.meta.url), {type: 'module', name: 'myName'});\n  worker.postMessage(commonText);\n};\n\nexports.startSharedWorker = function() {\n  const worker = new SharedWorker(new URL('shared-worker.js', import.meta.url), {type: 'module'});\n};\n\n\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers/worker.js",
    "content": "const commonText = require('./common').commonFunction('Worker');\n\nself.addEventListener('message', () => {\n  self.postMessage(commonText);\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers-module/dedicated-worker.js",
    "content": "import foo from \"foo\";\n\nconsole.log(\"DedicatedWorker\", foo);\nexport {foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers-module/error.js",
    "content": "new Worker(new URL(\"dedicated-worker.js\", import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers-module/index.js",
    "content": "new Worker(new URL(\"dedicated-worker.js\", import.meta.url), {type: 'module'});\nnew SharedWorker(new URL(\"shared-worker.js\", import.meta.url), {type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers-module/named.js",
    "content": "new Worker(new URL(\"dedicated-worker.js\", import.meta.url), {name: 'worker', type: 'module'});\nnew SharedWorker(new URL(\"shared-worker.js\", import.meta.url), {name: 'shared', type: 'module'});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers-module/shared-worker.js",
    "content": "import foo from \"foo\";\n\nconsole.log(\"SharedWorker\", foo);\nexport {foo};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers-with-other-loaders/index.js",
    "content": "exports.wasmFunctions = require('./add.wasm');\nexports.startWorker = require('./worker-client').startWorker;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers-with-other-loaders/worker-client.js",
    "content": "const {add} = require('./add.wasm');\n\nexports.startWorker = function() {\n  const worker = new Worker(new URL('worker.js', import.meta.url));\n  worker.postMessage(add(2, 3));\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/workers-with-other-loaders/worker.js",
    "content": "const {add} = require('./add.wasm');\n\nself.addEventListener('message', () => {\n  self.postMessage(add(2, 3));\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worklet/colors.js",
    "content": "export const colors = ['red', 'green', 'blue'];\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worklet/pipeline.js",
    "content": "import workletUrl from 'url:./worklet.js';\n\nCSS.paintWorklet.addModule(workletUrl);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worklet/url-worklet-error.js",
    "content": "CSS.paintWorklet.addModule(new URL('worklet-error.js', import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worklet/url-worklet.js",
    "content": "CSS.paintWorklet.addModule(new URL('worklet.js', import.meta.url));\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worklet/url.js",
    "content": "export default new URL('worklet.js', import.meta.url);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worklet/worklet-error.js",
    "content": "import('./worklet');\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worklet/worklet-pipeline-error.js",
    "content": "import url from 'worklet:./worklet-error';\nexport default url;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worklet/worklet-pipeline.js",
    "content": "import url from 'worklet:./worklet';\noutput = url;\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/worklet/worklet.js",
    "content": "import {colors} from './colors';\n\n// checkerboard.js\nclass CheckerboardPainter {\n  paint(ctx, geom, properties) {\n    // Use \"ctx\" as if it was a normal canvas\n    const size = 32;\n    for(let y = 0; y < geom.height/size; y++) {\n      for(let x = 0; x < geom.width/size; x++) {\n        const color = colors[(x + y) % colors.length];\n        ctx.beginPath();\n        ctx.fillStyle = color;\n        ctx.rect(x * size, y * size, size, size);\n        ctx.fill();\n      }\n    }\n  }\n}\n\n// Register our class under a specific name\nregisterPaint('checkerboard', CheckerboardPainter);\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/xml/atom-namespace.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"atom.xsl\"?>\n<atom:feed xmlns:atom=\"http://www.w3.org/2005/Atom\">\n\t<atom:title>Example Feed</atom:title>\n\t<atom:subtitle>A subtitle.</atom:subtitle>\n\t<atom:link href=\"http://example.org/feed/\" rel=\"self\" />\n\t<atom:link href=\"http://example.org/\" />\n\t<atom:id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</atom:id>\n\t<atom:updated>2003-12-13T18:30:02Z</atom:updated>\n\t<atom:entry>\n\t\t<atom:title>Atom-Powered Robots Run Amok</atom:title>\n\t\t<atom:link href=\"post.html\" />\n\t\t<atom:link rel=\"edit\" href=\"http://example.org/2003/12/13/atom03/edit\"/>\n\t\t<atom:id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</atom:id>\n\t\t<atom:updated>2003-12-13T18:30:02Z</atom:updated>\n\t\t<atom:summary>Some text.</atom:summary>\n\t\t<atom:content type=\"xhtml\">\n\t\t\t<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t\t<p>This is the entry content.</p>\n        <img src=\"100x100.png\" />\n\t\t\t</div>\n\t\t</atom:content>\n\t\t<atom:author>\n\t\t\t<atom:name>John Doe</atom:name>\n\t\t\t<atom:email>johndoe@example.com</atom:email>\n\t\t</atom:author>\n\t</atom:entry>\n</atom:feed>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/xml/atom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"atom.xsl\"?>\n<feed xmlns=\"http://www.w3.org/2005/Atom\">\n\t<title>Example Feed</title>\n\t<subtitle>A subtitle.</subtitle>\n\t<link href=\"http://example.org/feed/\" rel=\"self\" />\n\t<link href=\"http://example.org/\" />\n\t<id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id>\n\t<updated>2003-12-13T18:30:02Z</updated>\n\t<entry>\n\t\t<title>Atom-Powered Robots Run Amok</title>\n\t\t<link href=\"post.html\" />\n\t\t<link rel=\"edit\" href=\"http://example.org/2003/12/13/atom03/edit\"/>\n\t\t<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>\n\t\t<updated>2003-12-13T18:30:02Z</updated>\n\t\t<summary>Some text.</summary>\n\t\t<content type=\"xhtml\">\n\t\t\t<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t\t<p>This is the entry content.</p>\n        <img src=\"100x100.png\" />\n\t\t\t</div>\n\t\t</content>\n\t\t<author>\n\t\t\t<name>John Doe</name>\n\t\t\t<email>johndoe@example.com</email>\n\t\t</author>\n\t</entry>\n</feed>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/xml/atom.xsl",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xsl:stylesheet version=\"3.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n  <xsl:output method=\"html\" />\n  <xsl:template match=\"/\">\n    <html lang=\"en\">\n      <head>\n        <meta charset=\"utf-8\" />\n        <title><xsl:value-of select=\"/atom:feed/atom:title\" /></title>\n      </head>\n      <body>\n        <ul>\n          <xsl:for-each select=\"/atom:feed/atom:entry\">\n            <li>\n              <a>\n                <xsl:attribute name=\"href\"><xsl:value-of select=\"atom:link/@href\" /></xsl:attribute>\n                <xsl:value-of select=\"atom:title\" />\n              </a>\n            </li>\n          </xsl:for-each>\n        </ul>\n      </body>\n    </html>\n  </xsl:template>\n</xsl:stylesheet>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/xml/post.html",
    "content": "<!doctype html>\n<h1>This is the post</h1>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/xml/rss.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<rss version=\"2.0\">\n  <channel>\n    <title>RSS Title</title>\n    <description>This is an example of an RSS feed</description>\n    <link>http://www.example.com/main.html</link>\n    <copyright>2020 Example.com All rights reserved</copyright>\n    <lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000</lastBuildDate>\n    <pubDate>Sun, 06 Sep 2009 16:20:00 +0000</pubDate>\n    <ttl>1800</ttl>\n\n    <item>\n      <title>Example entry</title>\n      <description>Here is some text containing an interesting description. &lt;img src=\"100x100.png\" /&gt;</description>\n      <link>post.html</link>\n      <guid isPermaLink=\"false\">7bd204c6-1655-4c27-aeee-53f933c5395f</guid>\n      <pubDate>Sun, 06 Sep 2009 16:20:00 +0000</pubDate>\n    </item>\n  </channel>\n</rss>\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/yaml/index.js",
    "content": "var local = require('./local.yaml');\n\nmodule.exports = function () {\n  return local.a + local.b.c;\n};\n"
  },
  {
    "path": "packages/core/integration-tests/test/integration/yaml/local.yaml",
    "content": "a: 1\nb:\n  c: 2\n"
  },
  {
    "path": "packages/core/integration-tests/test/javascript.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport url from 'url';\nimport {\n  assertDependencyWasExcluded,\n  bundle,\n  bundler,\n  findAsset,\n  findDependency,\n  getNextBuild,\n  run,\n  runBundle,\n  runBundles,\n  assertBundles,\n  ncp,\n  overlayFS,\n  removeDistDirectory,\n  distDir,\n  outputFS,\n  inputFS,\n  fsFixture,\n} from '@parcel/test-utils';\nimport {makeDeferredWithPromise, normalizePath} from '@parcel/utils';\nimport vm from 'vm';\nimport Logger from '@parcel/logger';\nimport nullthrows from 'nullthrows';\nimport {md} from '@parcel/diagnostic';\n\ndescribe('javascript', function () {\n  beforeEach(async () => {\n    await removeDistDirectory();\n  });\n\n  it('should produce a basic JS bundle with CommonJS requires', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/commonjs/index.js'),\n    );\n\n    // assert.equal(b.assets.size, 8);\n    // assert.equal(b.childBundles.size, 1);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should support url: imports with CommonJS output', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/commonjs-import-url/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'esmodule-helpers.js'],\n      },\n      {\n        type: 'txt',\n        assets: ['x.txt'],\n      },\n    ]);\n\n    let txtBundle = b.getBundles().find(b => b.type === 'txt').filePath;\n\n    let output = await run(b);\n    assert.strictEqual(path.basename(output), path.basename(txtBundle));\n  });\n\n  it('should produce a basic JS bundle with ES6 imports', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/es6/index.js'), {\n      outputFS: inputFS,\n    });\n\n    // assert.equal(b.assets.size, 8);\n    // assert.equal(b.childBundles.size, 1);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'object');\n    assert.equal(typeof output.default, 'function');\n    assert.equal(output.default(), 3);\n  });\n\n  it('should detect dependencies inserted by a prior transform', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dependency-prior-transform/index.js'),\n    );\n\n    let jsBundle = b.getBundles()[0];\n    let contents = await outputFS.readFile(jsBundle.filePath, 'utf8');\n\n    assert(!contents.includes('import('));\n  });\n\n  it('should ignore unused requires after process.env inlining', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-unused-require/index.js'),\n      {\n        env: {ABC: 'XYZ'},\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!contents.includes('unused'));\n\n    let output = await run(b);\n    assert.strictEqual(output(), 'ok');\n  });\n\n  it('should produce a basic JS bundle with object rest spread support', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/object-rest-spread/object-rest-spread.js',\n      ),\n    );\n\n    // assert.equal(b.assets.size, 1);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'object');\n    assert.equal(typeof output.default, 'function');\n\n    let res = output.default();\n    assert.equal(res.y, 'a');\n    assert.deepEqual(res.z, {y: 'a', b: 'b'});\n    assert.deepEqual(res.ys, {b: 'b'});\n  });\n\n  it('should bundle node_modules for a browser environment', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/node_require_browser/main.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'main.js',\n        assets: ['main.js', 'local.js', 'index.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should not bundle node_modules for a node environment', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/node_require/main.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'main.js',\n        assets: ['main.js', 'local.js'],\n      },\n    ]);\n\n    await outputFS.mkdirp(path.join(distDir, 'node_modules/testmodule'));\n    await outputFS.writeFile(\n      path.join(distDir, 'node_modules/testmodule/index.js'),\n      'exports.a = 5;',\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 7);\n  });\n\n  it.skip('should not bundle node_modules on --target=electron', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/node_require/main.js'),\n      {\n        target: 'electron',\n      },\n    );\n\n    assertBundles(b, {\n      name: 'main.js',\n      assets: ['main.js', 'local.js'],\n    });\n\n    await outputFS.mkdirp(path.join(distDir, 'node_modules/testmodule'));\n    await outputFS.writeFile(\n      path.join(distDir, 'node_modules/testmodule/index.js'),\n      'exports.a = 5;',\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 7);\n  });\n\n  it('should preserve hashbangs in bundles and preserve executable file mode', async () => {\n    let fixturePath = path.join(__dirname, '/integration/node_hashbang');\n    await bundle(path.join(fixturePath, 'main.js'));\n\n    let mainPath = path.join(fixturePath, 'dist', 'node', 'main.js');\n    let main = await outputFS.readFile(mainPath, 'utf8');\n    assert.equal(main.lastIndexOf('#!/usr/bin/env node\\n'), 0);\n    assert.equal(\n      (await outputFS.stat(mainPath)).mode,\n      (await inputFS.stat(path.join(fixturePath, 'main.js'))).mode,\n    );\n    await outputFS.rimraf(path.join(fixturePath, 'dist'));\n  });\n\n  it('should not preserve hashbangs in browser bundles', async () => {\n    let fixturePath = path.join(__dirname, '/integration/node_hashbang');\n    await bundle(path.join(fixturePath, 'main.js'));\n\n    let main = await outputFS.readFile(\n      path.join(fixturePath, 'dist', 'browser', 'main.js'),\n      'utf8',\n    );\n    assert(!main.includes('#!/usr/bin/env node\\n'));\n    await outputFS.rimraf(path.join(fixturePath, 'dist'));\n  });\n\n  it('should preserve hashbangs in scopehoisted bundles', async () => {\n    let fixturePath = path.join(__dirname, '/integration/node_hashbang');\n    await bundle(path.join(__dirname, '/integration/node_hashbang/main.js'), {\n      defaultTargetOptions: {\n        shouldScopeHoist: true,\n      },\n    });\n\n    let main = await outputFS.readFile(\n      path.join(fixturePath, 'dist', 'node', 'main.js'),\n      'utf8',\n    );\n    assert.equal(main.lastIndexOf('#!/usr/bin/env node\\n'), 0);\n    await outputFS.rimraf(path.join(fixturePath, 'dist'));\n  });\n\n  it('should bundle node_modules for a node environment if includeNodeModules is specified', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/include_node_modules/main.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'main.js',\n        assets: ['main.js', 'local.js', 'index.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should bundle builtins for a browser environment', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/include_builtins-browser/main.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'main.js',\n        assets: [\n          '_empty.js',\n          'browser.js',\n          'esmodule-helpers.js',\n          'index.js',\n          'main.js',\n        ],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    let [fs, filepath] = output();\n    assert.equal(filepath, path.posix.join('app', 'index.js'));\n    assert.equal(typeof fs, 'object');\n    assert.deepEqual(Object.keys(fs), Object.keys({}));\n  });\n\n  it('should not bundle builtins for a node environment if includeNodeModules is specified', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/include_builtins-node/main.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'main.js',\n        assets: ['esmodule-helpers.js', 'main.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    let [fs, filepath] = output();\n    assert.equal(filepath, path.join('app', 'index.js'));\n    assert.equal(typeof fs.readFile, 'function');\n  });\n\n  it.skip('should bundle node_modules on --target=electron and --bundle-node-modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/node_require/main.js'),\n      {\n        target: 'electron',\n        bundleNodeModules: true,\n      },\n    );\n\n    assertBundles(b, {\n      name: 'main.js',\n      assets: ['main.js', 'local.js', 'index.js'],\n    });\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should produce a JS bundle with default exports and no imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/es6-default-only/index.js'),\n    );\n\n    // assert.equal(b.assets.size, 1);\n    // assert.equal(b.childBundles.size, 1);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'object');\n    assert.equal(typeof output.default, 'function');\n    assert.equal(output.default(), 3);\n  });\n\n  it('should split bundles when a dynamic import is used a browser environment', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/dynamic/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['local.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 3);\n  });\n\n  it('should prefetch bundles when declared as an import attribute statically', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-static-prefetch/index.js'),\n    );\n\n    let output = await run(b);\n    let headChildren = await output.default;\n\n    assert.strictEqual(headChildren.length, 4);\n\n    assert.strictEqual(headChildren[1].tag, 'script');\n    assert(headChildren[1].src.match(/async\\..*\\.js/));\n\n    assert.strictEqual(headChildren[2].tag, 'link');\n    assert.strictEqual(headChildren[2].rel, 'prefetch');\n    assert.strictEqual(headChildren[2].as, 'script');\n    assert(headChildren[2].href.match(/prefetched\\..*\\.js/));\n\n    assert.strictEqual(headChildren[3].tag, 'link');\n    assert.strictEqual(headChildren[3].rel, 'prefetch');\n    assert.strictEqual(headChildren[3].as, 'style');\n    assert(headChildren[3].href.match(/prefetched\\..*\\.css/));\n  });\n\n  it('should load additional links that were prefetched', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/dynamic-static-prefetch-loaded/index.js',\n      ),\n    );\n\n    let output = await run(b);\n    let outputReturn = await output.default;\n    await outputReturn.loadDependency();\n\n    let headChildren = outputReturn.children;\n    assert.equal(headChildren.length, 7);\n    let cssBundles = headChildren.filter(child =>\n      child.href?.match(/prefetched-loaded\\..*\\.css/),\n    );\n    assert.equal(cssBundles.length, 2);\n\n    assert(cssBundles[0].tag === 'link');\n    assert(cssBundles[0].rel === 'prefetch');\n    assert(cssBundles[0].as === 'style');\n    assert(cssBundles[0].href.match(/prefetched-loaded\\..*\\.css/));\n\n    assert(cssBundles[1].tag === 'link');\n    assert(cssBundles[1].rel === 'stylesheet');\n    assert(cssBundles[1].href.match(/prefetched-loaded\\..*\\.css/));\n  });\n\n  it('should preload bundles when declared as an import attribute statically', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-static-preload/index.js'),\n    );\n\n    let output = await run(b);\n    let headChildren = await output.default;\n\n    assert(headChildren.length === 4);\n\n    assert(headChildren[2].tag === 'link');\n    assert(headChildren[2].rel === 'preload');\n    assert(headChildren[2].as === 'script');\n    assert(headChildren[2].href.match(/preloaded\\..*\\.js/));\n\n    assert(headChildren[3].tag === 'link');\n    assert(headChildren[3].rel === 'preload');\n    assert(headChildren[3].as === 'style');\n    assert(headChildren[3].href.match(/preloaded\\..*\\.css/));\n  });\n\n  // TODO: Implement when we can evaluate bundles against esmodule targets\n  it(\n    'targetting esmodule, should modulepreload bundles when declared as an import attribute statically',\n  );\n\n  it('should remove import attributes', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-import-attributes/index.js'),\n    );\n\n    let mainBundle = b.getBundles()[0];\n    let mainBundleContent = await outputFS.readFile(\n      mainBundle.filePath,\n      'utf8',\n    );\n    assert(!mainBundleContent.includes('foo:'));\n  });\n\n  it('should split bundles when a dynamic import is used with a node environment', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-node/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        assets: ['local.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 3);\n  });\n\n  it('should split bundles when a dynamic import is used with an electron-main environment', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-electron-main/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        assets: ['local.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 3);\n  });\n\n  it('should split bundles when a dynamic import is used with an electron-renderer environment', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-electron-renderer/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        assets: ['local.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 3);\n  });\n\n  it.skip('should load dynamic bundle when entry is in a subdirectory', async function () {\n    let bu = await bundler(\n      path.join(\n        __dirname,\n        '/integration/dynamic-subdirectory/subdirectory/index.js',\n      ),\n      {\n        target: 'browser',\n      },\n    );\n    // Set the rootDir to make sure subdirectory is preserved\n    bu.options.rootDir = path.join(\n      __dirname,\n      '/integration/dynamic-subdirectory',\n    );\n    let b = await bu.bundle();\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 3);\n  });\n\n  // TODO: re-enable when this actually works\n  it.skip('Should not run parcel over external modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-external/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['esmodule-helpers.js', 'index.js'],\n      },\n    ]);\n  });\n\n  it('dynamic imports loaded as high-priority scripts when not all engines support esmodules natively', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-imports-high-prio/index.js'),\n      {\n        defaultTargetOptions: {\n          engines: {\n            browsers: 'IE 11',\n          },\n        },\n      },\n    );\n\n    let output = await run(b);\n    let headChildren = await output.default;\n\n    assert(headChildren[0].tag === 'link');\n    assert(headChildren[0].rel === 'preload');\n    assert(headChildren[0].as === 'script');\n\n    assert(headChildren[1].tag === 'script');\n    assert(headChildren[1].src.match(/async\\..*\\.js/));\n\n    assert(headChildren[0].href === headChildren[1].src);\n  });\n\n  it('should deduplicate and remove an unnecessary async bundle when it contains a cyclic reference to its entry', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/deduplicate-from-async-cyclic-bundle-entry/index.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'bar.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'foo.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n\n    assert.deepEqual(await Promise.all((await run(b)).default), [5, 4]);\n  });\n\n  it('does not create bundles for dynamic imports when assets are available up the graph', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/internalize-no-bundle-split/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'bar.js', 'foo.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    assert.deepEqual(await (await run(b)).default, [3, 3]);\n  });\n\n  it('should dynamic import files which import raw files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-references-raw/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['local.js', 'esmodule-helpers.js'],\n      },\n      {\n        assets: ['test.txt'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 3);\n  });\n\n  it('should return all exports as an object when using ES modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-esm/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['local.js'],\n      },\n    ]);\n\n    let output = (await run(b)).default;\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 3);\n  });\n\n  it('should duplicate small modules across multiple bundles', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-common-small/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['a.js', 'common.js', 'common-dep.js'],\n      },\n      {\n        assets: ['b.js', 'common.js', 'common-dep.js'],\n      },\n      {\n        name: 'index.js',\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 7);\n  });\n\n  it('should create a separate bundle for large modules shared between bundles', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-common-large/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n      {\n        name: 'index.js',\n        assets: ['index.js', 'c.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['common.js', 'lodash.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 7);\n  });\n\n  it('should not duplicate a module which is already in a parent bundle', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-hoist-dup/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'common.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['a.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(await output(), 5);\n  });\n\n  it('should duplicate an asset if it is not present in every parent bundle', async function () {\n    let b = await bundle(\n      ['a.js', 'b.js'].map(entry =>\n        path.join(__dirname, 'integration/dynamic-hoist-no-dedupe', entry),\n      ),\n    );\n    assertBundles(b, [\n      {\n        assets: ['c.js', 'common.js', 'esmodule-helpers.js'],\n      },\n      {\n        name: 'b.js',\n        assets: ['b.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        name: 'a.js',\n        assets: [\n          'a.js',\n          'common.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n    ]);\n  });\n\n  it('should duplicate an asset if it is not available in all possible ancestries', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/dynamic-hoist-no-dedupe-ancestry/index.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'js-loader.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {\n        assets: ['a.js', 'common.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n      {\n        assets: ['c.js'],\n      },\n      {\n        assets: ['d.js', 'common.js'],\n      },\n    ]);\n\n    let {default: promise} = await run(b);\n    assert.equal(await promise, 42);\n  });\n\n  it('should support shared modules with async imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dynamic-hoist-deep/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['a.js', 'c.js'],\n      },\n      {\n        assets: ['b.js', 'c.js'],\n      },\n      {\n        assets: ['1.js'],\n      },\n    ]);\n\n    let {default: promise} = await run(b);\n    assert.ok(await promise);\n  });\n\n  it('should support requiring JSON files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/json/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'local.json'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should support requiring JSON5 files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/json5/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'local.json5'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should support importing a URL to a raw asset', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/import-raw/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'txt',\n        assets: ['test.txt'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert(/^http:\\/\\/localhost\\/test\\.[0-9a-f]+\\.txt$/.test(output()));\n    let stats = await outputFS.stat(\n      path.join(distDir, url.parse(output()).pathname),\n    );\n    assert.equal(stats.size, 9);\n  });\n\n  it('should support referencing a raw asset with static URL and import.meta.url', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/import-raw-import-meta-url/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'esmodule-helpers.js'],\n      },\n      {\n        type: 'txt',\n        assets: ['test.txt'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!contents.includes('import.meta.url'));\n\n    let output = await run(b);\n    assert(/^http:\\/\\/localhost\\/test\\.[0-9a-f]+\\.txt$/.test(output.default));\n    let stats = await outputFS.stat(\n      path.join(distDir, output.default.pathname),\n    );\n    assert.equal(stats.size, 9);\n  });\n\n  it('should support referencing a raw asset with static URL and CJS __filename', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/import-raw-import-meta-url/cjs.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'cjs.js',\n        assets: ['cjs.js', 'esmodule-helpers.js'],\n      },\n      {\n        type: 'txt',\n        assets: ['test.txt'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!contents.includes('import.meta.url'));\n\n    let output = await run(b);\n    assert(/^http:\\/\\/localhost\\/test\\.[0-9a-f]+\\.txt$/.test(output.default));\n    let stats = await outputFS.stat(\n      path.join(distDir, output.default.pathname),\n    );\n    assert.equal(stats.size, 9);\n  });\n\n  it('should ignore new URL and import.meta.url with local binding', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/import-raw-import-meta-url/local-url.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'local-url.js',\n        assets: ['esmodule-helpers.js', 'local-url.js'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(contents.includes('\"file:///local-url.js\"'));\n  });\n\n  it('should throw a codeframe for a missing raw asset with static URL and import.meta.url', async function () {\n    let fixture = path.join(\n      __dirname,\n      'integration/import-raw-import-meta-url/missing.js',\n    );\n    let code = await inputFS.readFileSync(fixture, 'utf8');\n    await assert.rejects(() => bundle(fixture), {\n      name: 'BuildError',\n      diagnostics: [\n        {\n          codeFrames: [\n            {\n              filePath: fixture,\n              code,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  end: {\n                    column: 36,\n                    line: 1,\n                  },\n                  start: {\n                    column: 24,\n                    line: 1,\n                  },\n                },\n              ],\n            },\n          ],\n          message: \"Failed to resolve 'invalid.txt' from './missing.js'\",\n          origin: '@parcel/core',\n        },\n        {\n          hints: [],\n          message: \"Cannot load file './invalid.txt' in './'.\",\n          origin: '@parcel/resolver-default',\n        },\n      ],\n    });\n  });\n\n  it('should support importing a URL to a large raw asset', async function () {\n    // 6 megabytes, which exceeds the threshold in summarizeRequest for buffering\n    // entire contents into memory and should stream content instead\n    let assetSizeBytes = 6000000;\n\n    let distDir = path.join(outputFS.cwd(), '/dist');\n    let fixtureDir = path.join(__dirname, '/integration/import-raw');\n    let inputDir = path.join(__dirname, 'input');\n\n    await ncp(fixtureDir, inputDir);\n    await outputFS.writeFile(\n      path.join(inputDir, 'test.txt'),\n      Buffer.alloc(assetSizeBytes),\n    );\n\n    let b = await bundle(path.join(inputDir, 'index.js'), {\n      inputFS: overlayFS,\n      defaultTargetOptions: {\n        distDir,\n      },\n    });\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'txt',\n        assets: ['test.txt'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert(/^http:\\/\\/localhost\\/test\\.[0-9a-f]+\\.txt$/.test(output()));\n    let stats = await outputFS.stat(\n      path.join(distDir, url.parse(output()).pathname),\n    );\n    assert.equal(stats.size, assetSizeBytes);\n  });\n\n  it('should minify JS in production mode', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/uglify/index.js'), {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n        shouldScopeHoist: false,\n      },\n    });\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!js.includes('local.a'));\n  });\n\n  it('should use terser config', async function () {\n    await bundle(path.join(__dirname, '/integration/terser-config/index.js'), {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n        shouldScopeHoist: false,\n      },\n    });\n\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!js.includes('console.log'));\n    assert(!js.includes('// This is a comment'));\n  });\n\n  it('should insert global variables when needed', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/globals/index.js'));\n\n    let output = await run(b);\n    assert.deepEqual(output(), {\n      dir: 'integration/globals',\n      file: 'integration/globals/index.js',\n      buf: Buffer.from('browser').toString('base64'),\n      global: true,\n    });\n  });\n\n  it('should replace __dirname and __filename with path relative to asset.filePath', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-node-replacements/index.js'),\n    );\n\n    let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(\n      dist.includes(\n        'resolve(__dirname, \"../test/integration/env-node-replacements\")',\n      ),\n    );\n    assert(\n      dist.includes(\n        'resolve(__dirname, \"../test/integration/env-node-replacements/other\")',\n      ),\n    );\n    assert(\n      dist.includes(\n        'resolve(__dirname, \"../test/integration/env-node-replacements\", \"index.js\")',\n      ),\n    );\n    assert(\n      dist.includes(\n        'resolve(__dirname, \"../test/integration/env-node-replacements/sub\")',\n      ),\n    );\n    assert(\n      dist.includes(\n        'resolve(__dirname, \"../test/integration/env-node-replacements/sub\", \"index.js\")',\n      ),\n    );\n    let f = await run(b);\n    let output = f();\n    assert.equal(output.data, 'hello');\n    assert.equal(output.other, 'hello');\n    assert.equal(\n      output.firstDirnameTest,\n      path.join(__dirname, '/integration/env-node-replacements/data'),\n    );\n    assert.equal(\n      output.secondDirnameTest,\n      path.join(__dirname, '/integration/env-node-replacements/other-data'),\n    );\n    assert.equal(\n      output.firstFilenameTest,\n      path.join(__dirname, '/integration/env-node-replacements/index.js'),\n    );\n    assert.equal(\n      output.secondFilenameTest,\n      path.join(\n        __dirname,\n        '/integration/env-node-replacements/index.js?query-string=test',\n      ),\n    );\n    assert.equal(\n      output.sub.dirname,\n      path.join(__dirname, '/integration/env-node-replacements/sub'),\n    );\n    assert.equal(\n      output.sub.filename,\n      path.join(__dirname, '/integration/env-node-replacements/sub/index.js'),\n    );\n  });\n\n  it('should replace __dirname and __filename with path relative to asset.filePath with scope hoisting', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-node-replacements/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(\n      dist.includes(\n        'path.resolve(__dirname, \"../test/integration/env-node-replacements\")',\n      ),\n    );\n    assert(\n      dist.includes(\n        'path.resolve(__dirname, \"../test/integration/env-node-replacements/other\")',\n      ),\n    );\n    assert(\n      dist.includes(\n        'path.resolve(__dirname, \"../test/integration/env-node-replacements\", \"index.js\")',\n      ),\n    );\n    assert(\n      dist.includes(\n        'path.resolve(__dirname, \"../test/integration/env-node-replacements/sub\")',\n      ),\n    );\n    assert(\n      dist.includes(\n        'path.resolve(__dirname, \"../test/integration/env-node-replacements/sub\", \"index.js\")',\n      ),\n    );\n    let f = await run(b);\n    let output = f();\n    assert.equal(output.data, 'hello');\n    assert.equal(output.other, 'hello');\n    assert.equal(\n      output.firstDirnameTest,\n      path.join(__dirname, '/integration/env-node-replacements/data'),\n    );\n    assert.equal(\n      output.secondDirnameTest,\n      path.join(__dirname, '/integration/env-node-replacements/other-data'),\n    );\n    assert.equal(\n      output.firstFilenameTest,\n      path.join(__dirname, '/integration/env-node-replacements/index.js'),\n    );\n    assert.equal(\n      output.secondFilenameTest,\n      path.join(\n        __dirname,\n        '/integration/env-node-replacements/index.js?query-string=test',\n      ),\n    );\n    assert.equal(\n      output.sub.dirname,\n      path.join(__dirname, '/integration/env-node-replacements/sub'),\n    );\n    assert.equal(\n      output.sub.filename,\n      path.join(__dirname, '/integration/env-node-replacements/sub/index.js'),\n    );\n  });\n\n  it('should work when multiple files use globals with scope hoisting', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/globals/multiple.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    let output = await run(b);\n    assert.deepEqual(output, {\n      file: 'integration/globals/multiple.js',\n      other: 'integration/globals/index.js',\n    });\n  });\n\n  it('should not insert global variables when used in a module specifier', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/globals-module-specifier/a.js'),\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['a.js', 'b.js', 'c.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.deepEqual(output, 1234);\n  });\n\n  it('should not insert global variables in dead branches', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/globals-unused/a.js'),\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['a.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.deepEqual(output, 'foo');\n  });\n\n  it('should handle re-declaration of the global constant', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/global-redeclare/index.js'),\n    );\n\n    let output = await run(b);\n    assert.deepEqual(output(), false);\n  });\n\n  it('should insert environment variables inserted by a prior transform', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-prior-transform/index.js'),\n    );\n\n    let jsBundle = b.getBundles()[0];\n    let contents = await outputFS.readFile(jsBundle.filePath, 'utf8');\n\n    assert(!contents.includes('process.env'));\n    assert.equal(await run(b), 'test');\n  });\n\n  it('should not insert environment variables in node environment', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-node/index.js'),\n    );\n\n    let output = await run(b);\n    assert.ok(output.toString().includes('process.env'));\n    assert.equal(output(), 'test:test');\n  });\n\n  it('should not replace process.env.hasOwnProperty with undefined', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-hasOwnProperty/index.js'),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output, false);\n  });\n\n  it('should not insert environment variables in electron-main environment', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/env/index.js'), {\n      targets: {\n        main: {\n          context: 'electron-main',\n          distDir: path.join(__dirname, '/integration/env/dist.js'),\n        },\n      },\n    });\n\n    let output = await run(b);\n    assert.ok(output.toString().includes('process.env'));\n    assert.equal(output(), 'test:test');\n  });\n\n  it('should not insert environment variables in electron-renderer environment', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/env/index.js'), {\n      targets: {\n        main: {\n          context: 'electron-renderer',\n          distDir: path.join(__dirname, '/integration/env/dist.js'),\n        },\n      },\n    });\n\n    let output = await run(b);\n    assert.ok(output.toString().includes('process.env'));\n    assert.equal(output(), 'test:test');\n  });\n\n  it('should inline NODE_ENV environment variable in browser environment even if disabled', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-nodeenv/index.js'),\n      {\n        env: {\n          FOO: 'abc',\n        },\n      },\n    );\n\n    let output = await run(b);\n    assert.ok(!output.toString().includes('process.env'));\n    assert.equal(output(), 'test:undefined');\n  });\n\n  it('should not insert environment variables in browser environment if disabled', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-disabled/index.js'),\n      {\n        env: {FOOBAR: 'abc'},\n      },\n    );\n\n    let output = await run(b);\n    assert.ok(!output.toString().includes('process.env'));\n    assert.equal(output(), 'undefined:undefined:undefined');\n  });\n\n  it('should only insert environment variables in browser environment matching the glob', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-disabled-glob/index.js'),\n      {\n        env: {A_1: 'abc', B_1: 'def', B_2: 'ghi'},\n      },\n    );\n\n    let output = await run(b);\n    assert.ok(!output.toString().includes('process.env'));\n    assert.equal(output(), 'undefined:def:ghi');\n  });\n\n  it('should be able to inline environment variables in browser environment', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/env/index.js'), {\n      env: {NODE_ENV: 'abc'},\n    });\n\n    let output = await run(b);\n    assert.ok(!output.toString().includes('process.env'));\n    assert.equal(output(), 'abc:abc');\n  });\n\n  it(\"should insert the user's NODE_ENV as process.env.NODE_ENV if passed\", async function () {\n    let b = await bundle(path.join(__dirname, '/integration/env/index.js'), {\n      env: {\n        NODE_ENV: 'production',\n      },\n    });\n\n    let output = await run(b);\n    assert.ok(!output.toString().includes('process.env'));\n    assert.equal(output(), 'production:production');\n  });\n\n  it('should not inline computed accesses to process.env', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-computed/index.js'),\n      {\n        env: {ABC: 'abc'},\n      },\n    );\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(contents.includes('process.env'));\n\n    let output = await run(b);\n    assert.strictEqual(output, undefined);\n  });\n\n  it('should inline computed accesses with string literals to process.env', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-computed-string/index.js'),\n      {\n        env: {ABC: 'XYZ'},\n      },\n    );\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!contents.includes('process.env'));\n\n    let output = await run(b);\n    assert.strictEqual(output, 'XYZ');\n  });\n\n  it('should inline environment variables when destructured in a variable declaration', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-destructuring/index.js'),\n      {\n        env: {TEST: 'XYZ'},\n        defaultTargetOptions: {\n          engines: {\n            browsers: '>= 0.25%',\n          },\n        },\n      },\n    );\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!contents.includes('process.env'));\n\n    let output = await run(b);\n    assert.deepEqual(output, {\n      env: {},\n      NODE_ENV: 'test',\n      renamed: 'XYZ',\n      computed: undefined,\n      fallback: 'yo',\n      rest: {},\n      other: 'hi',\n    });\n  });\n\n  it('should inline environment variables when destructured in an assignment', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-destructuring/assign.js'),\n      {\n        env: {TEST: 'XYZ'},\n        defaultTargetOptions: {\n          engines: {\n            browsers: '>= 0.25%',\n          },\n        },\n      },\n    );\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!contents.includes('process.env'));\n\n    let output = await run(b);\n    assert.deepEqual(output, {\n      env: {},\n      NODE_ENV: 'test',\n      renamed: 'XYZ',\n      computed: undefined,\n      fallback: 'yo',\n      rest: {},\n      result: {},\n    });\n  });\n\n  it('should inline environment variables with in binary expression whose right branch is process.env and left branch is string literal', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-binary-in-expression/index.js'),\n      {\n        env: {ABC: 'any'},\n        defaultTargetOptions: {\n          engines: {\n            browsers: '>= 0.25%',\n          },\n        },\n      },\n    );\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!contents.includes('process.env'));\n\n    let output = await run(b);\n    assert.deepEqual(output, {\n      existVar: 'correct',\n      notExistVar: 'correct',\n    });\n  });\n\n  it('should insert environment variables from a file', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-file/index.js'),\n    );\n\n    // Make sure dotenv doesn't leak its values into the main process's env\n    assert(process.env.FOO == null);\n\n    let output = await run(b);\n    assert.equal(output, 'bartest');\n  });\n\n  it(\"should insert environment variables matching the user's NODE_ENV if passed\", async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-file/index.js'),\n      {env: {NODE_ENV: 'production'}},\n    );\n\n    let output = await run(b);\n    assert.equal(output, 'productiontest');\n  });\n\n  it('should overwrite environment variables from a file if passed', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-file/index.js'),\n      {env: {BAR: 'baz'}},\n    );\n\n    let output = await run(b);\n    assert.equal(output, 'barbaz');\n  });\n\n  it('should insert environment variables from a file even if entry file is specified with source value in package.json', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-file-with-package-source'),\n    );\n\n    let output = await run(b);\n    assert.equal(output, 'bartest');\n  });\n\n  it('should error on process.env mutations', async function () {\n    let filePath = path.join(__dirname, '/integration/env-mutate/index.js');\n    await assert.rejects(bundle(filePath), {\n      diagnostics: [\n        {\n          origin: '@parcel/transformer-js',\n          message: 'Mutating process.env is not supported',\n          hints: null,\n          codeFrames: [\n            {\n              filePath,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 1,\n                    column: 1,\n                  },\n                  end: {\n                    line: 1,\n                    column: 29,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n        {\n          origin: '@parcel/transformer-js',\n          message: 'Mutating process.env is not supported',\n          hints: null,\n          codeFrames: [\n            {\n              filePath,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 2,\n                    column: 1,\n                  },\n                  end: {\n                    line: 2,\n                    column: 30,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n        {\n          origin: '@parcel/transformer-js',\n          message: 'Mutating process.env is not supported',\n          hints: null,\n          codeFrames: [\n            {\n              filePath,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 3,\n                    column: 1,\n                  },\n                  end: {\n                    line: 3,\n                    column: 28,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n        {\n          origin: '@parcel/transformer-js',\n          message: 'Mutating process.env is not supported',\n          hints: null,\n          codeFrames: [\n            {\n              filePath,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 4,\n                    column: 1,\n                  },\n                  end: {\n                    line: 4,\n                    column: 23,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    });\n  });\n\n  it('should warn on process.env mutations in node_modules', async function () {\n    let logs = [];\n    let disposable = Logger.onLog(d => {\n      if (d.level !== 'verbose') {\n        logs.push(d);\n      }\n    });\n    let b = await bundle(\n      path.join(__dirname, '/integration/env-mutate/warn.js'),\n    );\n    disposable.dispose();\n\n    assert.deepEqual(logs, [\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: '@parcel/transformer-js',\n            message: 'Mutating process.env is not supported',\n            hints: null,\n            codeFrames: [\n              {\n                filePath: path.join(\n                  __dirname,\n                  '/integration/env-mutate/node_modules/foo/index.js',\n                ),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 8,\n                    },\n                    end: {\n                      line: 1,\n                      column: 36,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n          {\n            origin: '@parcel/transformer-js',\n            message: 'Mutating process.env is not supported',\n            hints: null,\n            codeFrames: [\n              {\n                filePath: path.join(\n                  __dirname,\n                  '/integration/env-mutate/node_modules/foo/index.js',\n                ),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 8,\n                    },\n                    end: {\n                      line: 2,\n                      column: 35,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n          {\n            origin: '@parcel/transformer-js',\n            message: 'Mutating process.env is not supported',\n            hints: null,\n            codeFrames: [\n              {\n                filePath: path.join(\n                  __dirname,\n                  '/integration/env-mutate/node_modules/foo/index.js',\n                ),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 3,\n                      column: 8,\n                    },\n                    end: {\n                      line: 3,\n                      column: 30,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    ]);\n\n    let output = [];\n    await run(b, {\n      output(o) {\n        output.push(o);\n      },\n    });\n    assert.deepEqual(output, ['foo', true, undefined]);\n  });\n\n  it('should replace process.browser for target browser', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/process/index.js'),\n      {\n        targets: {\n          main: {\n            context: 'browser',\n            distDir: path.join(__dirname, '/integration/process/dist.js'),\n          },\n        },\n      },\n    );\n\n    let output = await run(b);\n    assert.ok(output.toString().indexOf('process.browser') === -1);\n    assert.equal(output(), true);\n  });\n\n  it('should not touch process.browser for target node', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/process/index.js'),\n      {\n        targets: {\n          main: {\n            context: 'node',\n            distDir: path.join(__dirname, '/integration/process/dist.js'),\n          },\n        },\n      },\n    );\n\n    let output = await run(b);\n    assert.ok(output.toString().indexOf('process.browser') !== -1);\n    assert.equal(output(), false);\n  });\n\n  it('should not touch process.browser for target electron-main', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/process/index.js'),\n      {\n        targets: {\n          main: {\n            context: 'electron-main',\n            distDir: path.join(__dirname, '/integration/process/dist.js'),\n          },\n        },\n      },\n    );\n\n    let output = await run(b);\n    assert.ok(output.toString().indexOf('process.browser') !== -1);\n    assert.equal(output(), false);\n  });\n\n  it('should replace process.browser for target electron-renderer', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/process/index.js'),\n      {\n        targets: {\n          main: {\n            context: 'electron-renderer',\n            distDir: path.join(__dirname, '/integration/process/dist.js'),\n          },\n        },\n      },\n    );\n\n    let output = await run(b);\n    assert.ok(output.toString().indexOf('process.browser') === -1);\n    assert.equal(output(), true);\n    // Running the bundled code has the side effect of setting process.browser = true, which can mess\n    // up the instantiation of typescript.sys within validator-typescript, so we want to reset it.\n    process.browser = undefined;\n  });\n\n  it.skip('should support adding implicit dependencies', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/json/index.js'), {\n      delegate: {\n        getImplicitDependencies(asset) {\n          if (asset.basename === 'index.js') {\n            return [{name: '../css/index.css'}];\n          }\n        },\n      },\n    });\n\n    assertBundles(b, {\n      name: 'index.js',\n      assets: ['index.js', 'local.json', 'index.css'],\n      childBundles: [\n        {\n          type: 'css',\n          assets: ['index.css'],\n        },\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should support requiring YAML files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/yaml/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'local.yaml'],\n        childBundles: [\n          {\n            type: 'map',\n          },\n        ],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should support requiring TOML files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/toml/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'local.toml'],\n        childBundles: [\n          {\n            type: 'map',\n          },\n        ],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should support requiring CoffeeScript files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/coffee/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'local.coffee'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n\n  it('should resolve the browser field before main', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-entries/browser.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'browser.js',\n        assets: ['browser.js', 'browser-module.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let output = await run(b);\n\n    assert.equal(typeof output.test, 'function');\n    assert.equal(output.test(), 'pkg-browser');\n  });\n\n  it('should exclude resolving specifiers that map to false in the browser field in browser builds', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/resolve-entries/pkg-ignore-browser/index.js',\n      ),\n      {\n        targets: ['browsers'],\n      },\n    );\n\n    assert.deepEqual(await run(b), {});\n  });\n\n  it('should not exclude resolving specifiers that map to false in the browser field in node builds', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/resolve-entries/pkg-ignore-browser/index.js',\n      ),\n      {\n        targets: ['node'],\n      },\n    );\n\n    assert.equal(await run(b), 'this should only exist in non-browser builds');\n  });\n\n  it.skip('should not resolve the browser field for --target=node', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-entries/browser.js'),\n      {\n        target: 'node',\n      },\n    );\n\n    assertBundles(b, {\n      name: 'browser.js',\n      assets: ['browser.js', 'node-module.js'],\n      childBundles: [\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    let output = await run(b);\n\n    assert.equal(typeof output.test, 'function');\n    assert.equal(output.test(), 'pkg-main');\n  });\n\n  it.skip('should resolve advanced browser resolution', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-entries/browser-multiple.js'),\n    );\n\n    assertBundles(b, {\n      name: 'browser-multiple.js',\n      assets: [\n        'browser-multiple.js',\n        'projected-browser.js',\n        'browser-entry.js',\n      ],\n      childBundles: [\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    let {test: output} = await run(b);\n\n    assert.equal(typeof output.projected.test, 'function');\n    assert.equal(typeof output.entry.test, 'function');\n    assert.equal(output.projected.test(), 'pkg-browser-multiple');\n    assert.equal(output.entry.test(), 'pkg-browser-multiple browser-entry');\n  });\n\n  it.skip('should not resolve advanced browser resolution with --target=node', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-entries/browser-multiple.js'),\n      {\n        target: 'node',\n      },\n    );\n\n    assertBundles(b, {\n      name: 'browser-multiple.js',\n      assets: ['browser-multiple.js', 'node-entry.js', 'projected.js'],\n      childBundles: [\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    let {test: output} = await run(b);\n\n    assert.equal(typeof output.projected.test, 'function');\n    assert.equal(typeof output.entry.test, 'function');\n    assert.equal(output.projected.test(), 'pkg-main-multiple');\n    assert.equal(output.entry.test(), 'pkg-browser-multiple main-entry');\n  });\n\n  it.skip('should resolve the module field before main if scope-hoisting is enabled', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-entries/module-field.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'module-field.js',\n        assets: ['module-field.js', 'es6.module.js'],\n      },\n    ]);\n\n    let output = await run(b);\n\n    assert.equal(typeof output.test, 'function');\n    assert.equal(output.test(), 'pkg-es6-module');\n  });\n\n  it.skip('should resolve the module field before main if scope-hoisting is enabled', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-entries/both-fields.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'both-fields.js',\n        assets: ['both-fields.js', 'es6.module.js'],\n      },\n    ]);\n\n    let output = await run(b);\n\n    assert.equal(typeof output.test, 'function');\n    assert.equal(output.test(), 'pkg-es6-module');\n  });\n\n  it('should resolve the main field', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-entries/main-field.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'main-field.js',\n        assets: ['main-field.js', 'main.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let output = await run(b);\n\n    assert.equal(typeof output.test, 'function');\n    assert.equal(output.test(), 'pkg-main-module');\n  });\n\n  it('should minify JSON files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/uglify-json/index.json'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    let json = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(json.includes('{\"test\":\"test\"}'));\n\n    let output = await run(b);\n    assert.deepEqual(output, {test: 'test'});\n  });\n\n  it('should minify JSON5 files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/uglify-json5/index.json5'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    let json = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(json.includes('{\"test\":\"test\"}'));\n\n    let output = await run(b);\n    assert.deepEqual(output, {test: 'test'});\n  });\n\n  it.skip('should minify YAML for production', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/yaml/index.js'), {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n        shouldScopeHoist: false,\n      },\n    });\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n\n    let json = await outputFS.readFile('dist/index.js', 'utf8');\n    assert(json.includes('{a:1,b:{c:2}}'));\n  });\n\n  it('should minify TOML for production', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/toml/index.js'), {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n        shouldScopeHoist: false,\n      },\n    });\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n\n    let json = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(json.includes('{a:1,b:{c:2}}'));\n  });\n\n  it('should support optional dependencies in try...catch blocks', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/optional-dep/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    let output = await run(b);\n\n    assert.equal(Object.getPrototypeOf(output).constructor.name, 'Error');\n    assert(\n      /Cannot find module ['\"]optional-dep['\"]/.test(output.message),\n      'Should set correct error message',\n    );\n    assert.equal(output.code, 'MODULE_NOT_FOUND');\n  });\n\n  it('should support excluding dependencies in falsy branches', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/falsy-dep/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'true-alternate.js', 'true-consequent.js'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(output, 2);\n  });\n\n  it.skip('should not autoinstall if resolve failed on installed module', async function () {\n    let error;\n    try {\n      await bundle(\n        path.join(\n          __dirname,\n          '/integration/dont-autoinstall-resolve-fails/index.js',\n        ),\n      );\n    } catch (err) {\n      error = err;\n    }\n    assert.equal(\n      error.message,\n      `Cannot resolve dependency 'vue/thisDoesNotExist'`,\n    );\n    assert.equal(error.code, 'MODULE_NOT_FOUND');\n  });\n\n  it.skip('should not autoinstall if resolve failed on aliased module', async function () {\n    let error;\n    try {\n      await bundle(\n        path.join(\n          __dirname,\n          '/integration/dont-autoinstall-resolve-alias-fails/index.js',\n        ),\n      );\n    } catch (err) {\n      error = err;\n    }\n    assert.equal(\n      error.message,\n      `Cannot resolve dependency 'aliasVue/thisDoesNotExist'`,\n    );\n    assert.equal(error.code, 'MODULE_NOT_FOUND');\n  });\n\n  it('should ignore require if it is defined in the scope', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/require-scope/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    let output = await run(b);\n\n    assert.equal(typeof output.test, 'object');\n\n    let failed = Object.keys(output.test).some(\n      key => output.test[key] !== 'test passed',\n    );\n\n    assert.equal(failed, false);\n  });\n\n  it('should expose to CommonJS entry point', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/entry-point/index.js'),\n    );\n\n    let module = {};\n    await run(b, {module, exports: {}});\n    assert.equal(module.exports(), 'Test!');\n  });\n\n  it('should expose to RequireJS entry point', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/entry-point/index.js'),\n    );\n    let test;\n    const mockDefine = function (f) {\n      test = f();\n    };\n    mockDefine.amd = true;\n\n    await run(b, {define: mockDefine, module: undefined});\n    assert.equal(test(), 'Test!');\n  });\n\n  it.skip('should expose variable with --browser-global', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/entry-point/index.js'),\n      {\n        global: 'testing',\n      },\n    );\n\n    const ctx = await run(b, {module: undefined}, {require: false});\n    assert.equal(ctx.window.testing(), 'Test!');\n  });\n\n  it.skip('should set `define` to undefined so AMD checks in UMD modules do not pass', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/define-amd/index.js'),\n    );\n    let test;\n    const mockDefine = function (f) {\n      test = f();\n    };\n    mockDefine.amd = true;\n\n    await run(b, {define: mockDefine, module: undefined});\n    assert.equal(test, 2);\n  });\n\n  it('should package successfully with comments on last line', async function () {\n    let b = await bundle(\n      path.join(__dirname, `/integration/js-comment/index.js`),\n    );\n\n    let output = await run(b);\n    assert.equal(output, 'Hello World!');\n  });\n\n  it('should package successfully with comments on last line and minification', async function () {\n    let b = await bundle(\n      path.join(__dirname, `/integration/js-comment/index.js`),\n    );\n\n    let output = await run(b);\n    assert.equal(output, 'Hello World!');\n  });\n\n  it('should package successfully with comments on last line and scope hoisting', async function () {\n    let b = await bundle(\n      path.join(__dirname, `/integration/js-comment/index.js`),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    let output = await run(b);\n    assert.equal(output, 'Hello World!');\n  });\n\n  it('should package successfully with comments on last line, scope hoisting and minification', async function () {\n    let b = await bundle(\n      path.join(__dirname, `/integration/js-comment/index.js`),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    let output = await run(b);\n    assert.equal(output, 'Hello World!');\n  });\n\n  it('should not replace toplevel this with undefined in CommonJS without scope-hoisting', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/js-this-commonjs/a.js'),\n    );\n\n    let output;\n    function result(v) {\n      output = v;\n    }\n    await run(b, {result});\n    assert.deepEqual(output, [{foo: 2}, 1234]);\n  });\n\n  it('should not replace toplevel this with undefined in CommonJS when scope-hoisting', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/js-this-commonjs/a.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    let output;\n    function result(v) {\n      output = v;\n    }\n    await run(b, {result});\n    assert.deepEqual(output, [{foo: 2}, 1234]);\n  });\n\n  it('should replace toplevel this with undefined in ESM without scope-hoisting', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/js-this-es6/a.js'));\n\n    let output;\n    function result(v) {\n      output = v;\n    }\n    await run(b, {result});\n    assert.deepEqual(output, [undefined, 1234]);\n  });\n\n  it('should replace toplevel this with undefined in ESM when scope-hoisting', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/js-this-es6/a.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    let output;\n    function result(v) {\n      output = v;\n    }\n    await run(b, {result});\n    assert.deepEqual(output, [undefined, 1234]);\n  });\n\n  it.skip('should not dedupe imports with different contents', async function () {\n    let b = await bundle(\n      path.join(__dirname, `/integration/js-different-contents/index.js`),\n      {\n        hmr: false, // enable asset dedupe in JSPackager\n      },\n    );\n\n    let module = await run(b);\n    assert.equal(module.default, 'Hello World!');\n  });\n\n  it.skip('should not dedupe imports with same content but different absolute dependency paths', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        `/integration/js-same-contents-different-dependencies/index.js`,\n      ),\n      {\n        hmr: false, // enable asset dedupe in JSPackager\n      },\n    );\n\n    let module = await run(b);\n    assert.equal(module.default, 'Hello World!');\n  });\n\n  it.skip('should dedupe imports with same content and same dependency paths', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        `/integration/js-same-contents-same-dependencies/index.js`,\n      ),\n      {\n        hmr: false, // enable asset dedupe in JSPackager\n      },\n    );\n    const {rootDir} = b.entryAsset.options;\n    const writtenAssets = Array.from(b.offsets.keys()).map(asset => asset.name);\n    assert.equal(writtenAssets.length, 2);\n    assert(writtenAssets.includes(path.join(rootDir, 'index.js')));\n    assert(\n      writtenAssets.includes(path.join(rootDir, 'hello1.js')) ||\n        writtenAssets.includes(path.join(rootDir, 'hello2.js')),\n    );\n    assert(\n      !(\n        writtenAssets.includes(path.join(rootDir, 'hello1.js')) &&\n        writtenAssets.includes(path.join(rootDir, 'hello2.js'))\n      ),\n    );\n\n    let module = await run(b);\n    assert.equal(module.default, 'Hello Hello!');\n  });\n\n  it.skip('should not dedupe assets that exist in more than one bundle', async function () {\n    let b = await bundle(\n      path.join(__dirname, `/integration/js-dedup-hoist/index.js`),\n      {\n        hmr: false, // enable asset dedupe in JSPackager\n      },\n    );\n    const {rootDir} = b.entryAsset.options;\n    const writtenAssets = Array.from(b.offsets.keys()).map(asset => asset.name);\n    assert(\n      writtenAssets.includes(path.join(rootDir, 'hello1.js')) &&\n        writtenAssets.includes(path.join(rootDir, 'hello2.js')),\n    );\n\n    let module = await run(b);\n    assert.equal(await module.default(), 'Hello Hello! Hello');\n  });\n\n  it.skip('should support importing HTML from JS async', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/import-html-async/index.js'),\n      {\n        defaultTargetOptions: {\n          sourceMaps: false,\n        },\n      },\n    );\n\n    assertBundles(b, {\n      name: 'index.js',\n      assets: ['index.js', 'cacheLoader.js', 'html-loader.js'],\n      childBundles: [\n        {\n          type: 'html',\n          assets: ['other.html'],\n          childBundles: [\n            {\n              type: 'png',\n              assets: ['100x100.png'],\n              childBundles: [],\n            },\n            {\n              type: 'css',\n              assets: ['index.css'],\n            },\n          ],\n        },\n      ],\n    });\n\n    let output = await run(b);\n    assert.equal(typeof output, 'string');\n    assert(output.includes('<html>'));\n    assert(output.includes('Other page'));\n  });\n\n  it.skip('should support importing HTML from JS async with --target=node', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/import-html-async/index.js'),\n      {\n        target: 'node',\n        defaultTargetOptions: {\n          sourceMaps: false,\n        },\n      },\n    );\n\n    assertBundles(b, {\n      name: 'index.js',\n      assets: ['index.js', 'cacheLoader.js', 'html-loader.js'],\n      childBundles: [\n        {\n          type: 'html',\n          assets: ['other.html'],\n          childBundles: [\n            {\n              type: 'png',\n              assets: ['100x100.png'],\n              childBundles: [],\n            },\n            {\n              type: 'css',\n              assets: ['index.css'],\n            },\n          ],\n        },\n      ],\n    });\n\n    let output = await run(b);\n    assert.equal(typeof output, 'string');\n    assert(output.includes('<html>'));\n    assert(output.includes('Other page'));\n  });\n\n  it.skip('should support importing HTML from JS sync', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/import-html-sync/index.js'),\n      {\n        defaultTargetOptions: {\n          sourceMaps: false,\n        },\n      },\n    );\n\n    assertBundles(b, {\n      name: 'index.js',\n      assets: ['index.js', 'cacheLoader.js', 'html-loader.js'],\n      childBundles: [\n        {\n          type: 'html',\n          assets: ['other.html'],\n          childBundles: [\n            {\n              type: 'png',\n              assets: ['100x100.png'],\n              childBundles: [],\n            },\n            {\n              type: 'css',\n              assets: ['index.css'],\n            },\n          ],\n        },\n      ],\n    });\n\n    let {deferred, promise} = makeDeferredWithPromise();\n    await run(b, {output: deferred.resolve}, {require: false});\n    let output = await promise;\n    assert.equal(typeof output, 'string');\n    assert(output.includes('<html>'));\n    assert(output.includes('Other page'));\n  });\n\n  it.skip('should stub require.cache', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/node_require_cache/main.js'),\n      {\n        target: 'node',\n      },\n    );\n\n    await run(b);\n  });\n\n  it('should support async importing the same module from different bundles', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/shared-bundlegroup/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n      {\n        assets: ['c.js'],\n      },\n    ]);\n\n    let {default: promise} = await run(b);\n    assert.deepEqual(await promise, ['hello from a test', 'hello from b test']);\n  });\n\n  it('should not create shared bundles from contents of entries', async () => {\n    let b = await bundle(\n      ['a.js', 'b.js'].map(entry =>\n        path.join(\n          __dirname,\n          '/integration/no-shared-bundles-from-entries/',\n          entry,\n        ),\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'a.js',\n        assets: ['a.js', 'esmodule-helpers.js', 'lodash.js'],\n      },\n      {\n        name: 'b.js',\n        assets: ['b.js', 'esmodule-helpers.js', 'lodash.js'],\n      },\n    ]);\n  });\n\n  it('should import the same dependency multiple times in the same bundle', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/same-dependency-multiple-times/a1.js'),\n    );\n\n    await run(b);\n  });\n\n  it(\"should inline a bundle's compiled text with `bundle-text`\", async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/bundle-text/index.js'),\n    );\n\n    let cssBundleContent = (await run(b)).default;\n    assert(\n      cssBundleContent.startsWith(\n        `body {\n  background-color: #000;\n}\n\n.svg-img {\n  background-image: url(\"data:image/svg+xml,%3Csvg%3E%0A%0A%3C%2Fsvg%3E\");\n}`,\n      ),\n    );\n\n    assert(!cssBundleContent.includes('sourceMappingURL'));\n  });\n\n  it('should not include the runtime manifest for `bundle-text`', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/bundle-text/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        type: 'js',\n        assets: ['esmodule-helpers.js', 'index.js'],\n      },\n      {\n        type: 'svg',\n        assets: ['img.svg'],\n      },\n      {\n        type: 'css',\n        assets: ['text.scss'],\n      },\n    ]);\n\n    let cssBundleContent = (await run(b)).default;\n\n    assert(\n      cssBundleContent.startsWith(\n        `body {\n  background-color: #000;\n}\n\n.svg-img {\n  background-image: url(\"data:image/svg+xml,%3Csvg%3E%0A%0A%3C%2Fsvg%3E\");\n}`,\n      ),\n    );\n\n    assert(!cssBundleContent.includes('sourceMappingURL'));\n  });\n\n  it(\"should inline an HTML bundle's compiled text with `bundle-text`\", async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/bundle-text/index.html'),\n    );\n\n    let res = await run(b);\n    assert.equal(\n      res.default,\n      '<html><head></head><body><p>test</p>\\n</body></html>',\n    );\n  });\n\n  it('should inline an HTML bundle and inline scripts with `bundle-text`', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/bundle-text/inline.js'),\n    );\n\n    let res = await run(b);\n    assert.equal(\n      res.default,\n      `<html><head></head><body><p>test</p>\\n<script>console.log('hi');\\n\\n</script>\\n</body></html>`,\n    );\n  });\n\n  it(\"should inline a JS bundle's compiled text with `bundle-text` and HMR enabled\", async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/bundle-text/javascript.js'),\n      {\n        hmrOptions: {},\n      },\n    );\n\n    let res = await run(b);\n    let log;\n    let ctx = vm.createContext({\n      console: {\n        log(x) {\n          log = x;\n        },\n      },\n    });\n    vm.runInContext(res.default, ctx);\n    assert.equal(log, 'hi');\n  });\n\n  it(\"should inline a JS bundle's compiled text with `bundle-text` with symbol propagation\", async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/bundle-text/javascript.js'),\n      {\n        mode: 'production',\n      },\n    );\n\n    let res = await run(b);\n    let log;\n    let ctx = vm.createContext({\n      console: {\n        log(x) {\n          log = x;\n        },\n      },\n    });\n    vm.runInContext(res, ctx);\n    assert.equal(log, 'hi');\n  });\n\n  it(\"should inline a bundle's compiled text with `bundle-text` asynchronously\", async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/bundle-text/async.js'),\n    );\n\n    let promise = (await run(b)).default;\n    assert.equal(typeof promise.then, 'function');\n\n    let cssBundleContent = await promise;\n\n    assert(\n      cssBundleContent.startsWith(\n        `body {\n  background-color: #000;\n}\n\n.svg-img {\n  background-image: url(\"data:image/svg+xml,%3Csvg%3E%0A%0A%3C%2Fsvg%3E\");\n}`,\n      ),\n    );\n\n    assert(!cssBundleContent.includes('sourceMappingURL'));\n  });\n\n  it('should inline text content as url-encoded text and mime type with `data-url:*` imports', async () => {\n    let b = await bundle(path.join(__dirname, '/integration/data-url/text.js'));\n\n    assert.equal(\n      (await run(b)).default,\n      'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%3E%0A%20%20%3Cfilter%20id%3D%22blur-_.%21~%2a%22%3E%0A%20%20%20%20%3CfeGaussianBlur%20stdDeviation%3D%225%22%2F%3E%0A%20%20%3C%2Ffilter%3E%0A%20%20%3Ccircle%20cx%3D%2260%22%20cy%3D%2260%22%20r%3D%2250%22%20fill%3D%22green%22%20filter%3D%22url%28%23blur-_.%21~%2a%29%22%2F%3E%0A%3C%2Fsvg%3E',\n    );\n  });\n\n  it('should inline binary content as url-encoded base64 and mime type with `data-url:*` imports', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/data-url/binary.js'),\n    );\n    ``;\n\n    assert((await run(b)).default.startsWith('data:image/webp;base64,UklGR'));\n  });\n\n  it('should support both pipeline and non-pipeline imports', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/multi-pipeline/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'esmodule-helpers.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['style.css'],\n      },\n      {\n        type: 'css',\n        assets: ['style.css'],\n      },\n    ]);\n\n    assert((await run(b)).default.startsWith('.test'));\n  });\n\n  it('should detect typescript style async requires in commonjs', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/require-async/ts.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'ts.js',\n        assets: ['ts.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n\n    assert.equal(await run(b), 2);\n  });\n\n  it('should detect typescript style async requires in commonjs with esModuleInterop flag', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/require-async/ts-interop.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'ts-interop.js',\n        assets: ['ts-interop.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n\n    assert.deepEqual(await run(b), {default: 2});\n\n    let jsBundle = b.getBundles()[0];\n    let contents = await outputFS.readFile(jsBundle.filePath, 'utf8');\n    assert(\n      /.then\\(function\\(res\\) {\\n.*return __importStar\\(res\\)/.test(contents),\n    );\n  });\n\n  it('should detect typescript style async requires in commonjs with esModuleInterop flag and arrow functions', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/require-async/ts-interop-arrow.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'ts-interop-arrow.js',\n        assets: ['ts-interop-arrow.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n\n    assert.deepEqual(await run(b), {default: 2});\n\n    let jsBundle = b.getBundles()[0];\n    let contents = await outputFS.readFile(jsBundle.filePath, 'utf8');\n    assert(/.then\\(\\(res\\)=>__importStar\\(res\\)/.test(contents));\n  });\n\n  it('should detect rollup style async requires in commonjs', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/require-async/rollup.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'rollup.js',\n        assets: ['rollup.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n\n    assert.equal(await run(b), 2);\n  });\n\n  it('should only detect requires that are returned from the promise', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/require-async/sync.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'sync.js',\n        assets: ['sync.js', 'async.js'],\n      },\n    ]);\n\n    assert.equal(await run(b), 5);\n  });\n\n  it('should properly chain a dynamic import wrapped in a Promise.resolve()', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/require-async/resolve-chain.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'resolve-chain.js',\n        assets: ['resolve-chain.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n\n    assert.equal(await run(b), 1337);\n  });\n\n  it('should detect parcel style async requires in commonjs', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/require-async/parcel.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'parcel.js',\n        assets: ['parcel.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n\n    assert.equal(await run(b), 2);\n  });\n\n  it('should detect requires in commonjs with plain template literals', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/commonjs-template-literal-plain/index.js',\n      ),\n    );\n    let dist = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'js').filePath,\n      'utf8',\n    );\n    assert(dist.includes('$eyi1T$lodash = require(\"lodash\");'));\n\n    let add = await run(b);\n    assert.equal(add(2, 3), 5);\n  });\n\n  it(`should detect requires in commonjs with plain template literals`, async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/commonjs-template-literal-interpolation/index.js',\n      ),\n    );\n    let dist = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'js').filePath,\n      'utf8',\n    );\n\n    assert(\n      dist.includes(\n        'const add = require(`lodash/${$5044e5062b06e481$var$fn}`);',\n      ),\n    );\n\n    let add = await run(b);\n    assert.equal(add(2, 3), 5);\n  });\n\n  it('only updates bundle names of changed bundles for browsers', async () => {\n    let fixtureDir = path.join(__dirname, '/integration/name-invalidation');\n    let _bundle = () =>\n      bundle(path.join(fixtureDir, 'index.js'), {\n        inputFS: overlayFS,\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n          shouldOptimize: false,\n        },\n      });\n\n    let first = await _bundle();\n    assert.equal(await (await run(first)).default, 42);\n\n    let bPath = path.join(fixtureDir, 'b.js');\n    await overlayFS.mkdirp(fixtureDir);\n    overlayFS.writeFile(\n      bPath,\n      (await overlayFS.readFile(bPath, 'utf8')).replace('42', '43'),\n    );\n\n    let second = await _bundle();\n    assert.equal(await (await run(second)).default, 43);\n\n    let getBundleNameWithPrefix = (b, prefix) =>\n      b\n        .getBundles()\n        .map(bundle => path.basename(bundle.filePath))\n        .find(name => name.startsWith(prefix));\n\n    assert.equal(\n      getBundleNameWithPrefix(first, 'a'),\n      getBundleNameWithPrefix(second, 'a'),\n    );\n    assert.notEqual(\n      getBundleNameWithPrefix(first, 'b'),\n      getBundleNameWithPrefix(second, 'b'),\n    );\n  });\n\n  it('can load the same resource when referenced in multiple bundles', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/same-resource-multiple-bundles/index.js',\n      ),\n    );\n\n    let res = await run(b);\n    assert(url.parse(await res.default()).pathname.startsWith('/resource'));\n  });\n\n  it('can static import and dynamic import in the same bundle without creating a new bundle', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sync-async/same-bundle.js'),\n      {mode: 'production', defaultTargetOptions: {shouldScopeHoist: false}},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'same-bundle.js',\n        assets: [\n          'same-bundle.js',\n          'get-dep.js',\n          'get-dep-2.js',\n          'dep.js',\n          'esmodule-helpers.js',\n        ],\n      },\n    ]);\n\n    assert.deepEqual(await (await run(b)).default, [42, 42, 42]);\n  });\n\n  it('async dependency can be resolved internally and externally from two different bundles', async () => {\n    let b = await bundle(\n      ['entry1.js', 'entry2.js'].map(entry =>\n        path.join(\n          __dirname,\n          '/integration/async-dep-internal-external/',\n          entry,\n        ),\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['async.js'],\n      },\n      {\n        name: 'entry1.js',\n        assets: ['child.js', 'entry1.js', 'async.js'],\n      },\n      {\n        name: 'entry2.js',\n        assets: ['cacheLoader.js', 'child.js', 'entry2.js', 'js-loader.js'],\n      },\n    ]);\n  });\n\n  it('can static import and dynamic import in the same bundle ancestry without creating a new bundle', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sync-async/same-ancestry.js'),\n      {mode: 'production', defaultTargetOptions: {shouldScopeHoist: false}},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'same-ancestry.js',\n        assets: [\n          'cacheLoader.js',\n          'dep.js',\n          'js-loader.js',\n          'same-ancestry.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {\n        assets: ['get-dep.js'],\n      },\n    ]);\n\n    assert.deepEqual(await (await run(b)).default, [42, 42]);\n  });\n\n  it('can static import and dynamic import in the same bundle when another bundle requires async', async () => {\n    let b = await bundle(\n      ['same-bundle.js', 'get-dep.js'].map(entry =>\n        path.join(__dirname, '/integration/sync-async/', entry),\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['dep.js'],\n      },\n      {\n        name: 'same-bundle.js',\n        assets: [\n          'same-bundle.js',\n          'get-dep.js',\n          'get-dep-2.js',\n          'dep.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {\n        name: 'get-dep.js',\n        assets: [\n          'cacheLoader.js',\n          'get-dep.js',\n          'js-loader.js',\n          'esmodule-helpers.js',\n        ],\n      },\n    ]);\n\n    let bundles = b.getBundles();\n    let sameBundle = bundles.find(b => b.name === 'same-bundle.js');\n    let getDep = bundles.find(b => b.name === 'get-dep.js');\n\n    assert.deepEqual(\n      await (\n        await runBundle(b, sameBundle)\n      ).default,\n      [42, 42, 42],\n    );\n    assert.deepEqual(await (await runBundle(b, getDep)).default, 42);\n  });\n\n  it(\"can share dependencies between a shared bundle and its sibling's descendants\", async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/shared-exports-for-sibling-descendant/index.js',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['wraps.js', 'lodash.js'],\n      },\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['child.js'],\n      },\n      {\n        assets: ['grandchild.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n      {\n        name: 'index.js',\n        assets: [\n          'cacheLoader.js',\n          'index.js',\n          'js-loader.js',\n          'esmodule-helpers.js',\n        ],\n      },\n    ]);\n\n    assert.deepEqual(await (await run(b)).default, [3, 5]);\n  });\n\n  it('can run an entry bundle whose entry asset is present in another bundle', async () => {\n    let b = await bundle(\n      ['index.js', 'value.js'].map(basename =>\n        path.join(__dirname, '/integration/sync-entry-shared', basename),\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'js-loader.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {name: 'value.js', assets: ['value.js', 'esmodule-helpers.js']},\n      {assets: ['async.js']},\n    ]);\n\n    assert.equal(await (await run(b)).default, 43);\n  });\n\n  it('can run an async bundle whose entry asset is present in another bundle', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/async-entry-shared/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'js-loader.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {assets: ['value.js']},\n      {assets: ['async.js']},\n    ]);\n\n    assert.deepEqual(await (await run(b)).default, [42, 43]);\n  });\n\n  it('should display a codeframe on a Terser parse error', async () => {\n    let fixture = path.join(__dirname, 'integration/terser-codeframe/index.js');\n    let code = await inputFS.readFileSync(fixture, 'utf8');\n    await assert.rejects(\n      () =>\n        bundle(fixture, {\n          defaultTargetOptions: {\n            outputFormat: 'esmodule',\n            shouldOptimize: true,\n          },\n        }),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            message: '`let` cannot be used as an identifier in strict mode',\n            origin: '@parcel/optimizer-swc',\n            codeFrames: [\n              {\n                filePath: undefined,\n                language: 'js',\n                code,\n                codeHighlights: [\n                  {\n                    start: {\n                      column: 1,\n                      line: 1,\n                    },\n                    end: {\n                      column: 1,\n                      line: 1,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n\n  it('can run an async bundle that depends on a nonentry asset in a sibling', async () => {\n    let b = await bundle(\n      ['index.js', 'other-entry.js'].map(basename =>\n        path.join(\n          __dirname,\n          '/integration/async-entry-shared-sibling',\n          basename,\n        ),\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'js-loader.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {\n        name: 'other-entry.js',\n        assets: ['other-entry.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {assets: ['a.js', 'value.js', 'esmodule-helpers.js']},\n      {assets: ['b.js']},\n    ]);\n\n    assert.deepEqual(await (await run(b)).default, 43);\n  });\n\n  it('can share sibling bundles reachable from a common dependency', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/shared-sibling-common-dependency/index.js',\n      ),\n    );\n\n    let bundles = b.getBundles();\n    let asyncJsBundles = bundles.filter(\n      b => !b.needsStableName && b.type === 'js',\n    );\n    assert.equal(asyncJsBundles.length, 2);\n\n    // Every bundlegroup with an async js bundle should have the corresponding css\n    for (let bundle of asyncJsBundles) {\n      for (let bundleGroup of b.getBundleGroupsContainingBundle(bundle)) {\n        let bundlesInGroup = b.getBundlesInBundleGroup(bundleGroup);\n        assert(bundlesInGroup.find(s => s.type === 'css'));\n      }\n    }\n  });\n\n  it('should throw a diagnostic for unknown pipelines', async function () {\n    let fixture = path.join(__dirname, 'integration/pipeline-unknown/a.js');\n    let code = await inputFS.readFileSync(fixture, 'utf8');\n    await assert.rejects(() => bundle(fixture), {\n      name: 'BuildError',\n      diagnostics: [\n        {\n          message: \"Failed to resolve 'strange-pipeline:./b.js' from './a.js'\",\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: fixture,\n              code,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    column: 19,\n                    line: 1,\n                  },\n                  end: {\n                    column: 43,\n                    line: 1,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n        {\n          message: \"Unknown url scheme or pipeline 'strange-pipeline:'\",\n          origin: '@parcel/resolver-default',\n        },\n      ],\n    });\n  });\n\n  it('can create a bundle starting with a dot', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/dotfile-bundle/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: '.output.js',\n        assets: ['index.js'],\n      },\n    ]);\n  });\n\n  it('should not automatically name bundle files starting with a dot', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/bundle-naming/.invisible/index.js'),\n    );\n    let bundleFiles = await outputFS.readdir(distDir);\n    let renamedSomeFiles = bundleFiles.some(currFile =>\n      currFile.startsWith('invisible.'),\n    );\n    let namedWithDot = bundleFiles.some(currFile =>\n      currFile.startsWith('.invisible.'),\n    );\n    assert.equal(renamedSomeFiles, true);\n    assert.equal(namedWithDot, false);\n  });\n\n  it('should support duplicate re-exports without scope hoisting', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-duplicate-re-exports/index.js'),\n    );\n    let res = await run(b);\n    assert.equal(res.a, 'a');\n    assert.equal(res.b, 'b');\n    assert.equal(typeof res.c, 'function');\n  });\n\n  it('should prioritize named exports before re-exports withput scope hoisting (before)', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/re-export-priority/entry-a.mjs',\n      ),\n    );\n\n    let res = await run(b, null, {require: false});\n    assert.equal(res.output, 2);\n  });\n\n  it('should prioritize named exports before re-exports without scope hoisting (after)', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/re-export-priority/entry-b.mjs',\n      ),\n    );\n\n    let res = await run(b, null, {require: false});\n    assert.equal(res.output, 2);\n  });\n\n  it('should exclude default from export all declaration', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-export-all/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, {a: 4});\n  });\n\n  it('should not use arrow functions for reexport declarations unless supported', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-export-arrow-support/index.js'),\n      {\n        // Remove comments containing \"=>\"\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n    let content = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!content.includes('=>'));\n  });\n\n  it('should support import namespace declarations of other ES modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-namespace/a.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, {a: 4, default: 1});\n  });\n\n  it('should support import namespace declarations of class from CJS', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-namespace/b.js'),\n    );\n    let res = await run(b);\n    assert.equal(typeof res, 'function');\n  });\n\n  it('should support import namespace declarations of object from CJS', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-namespace/c.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, {foo: 2, default: 3});\n  });\n\n  it('should support export namespace declarations', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-export-namespace/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, {ns: {a: 4, default: 1}});\n  });\n\n  it('should support export declarations with destructuring', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-export-destructuring/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, {foo: 1, bar: 2});\n  });\n\n  it('should support export default declarations', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-export-default/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, {other: 1});\n  });\n\n  it('should hoist function default exports to allow circular imports', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/js-export-default-fn-circular-named/a.mjs',\n      ),\n    );\n\n    let output;\n    function result(v) {\n      output = v;\n    }\n    await run(b, {result});\n    assert.deepEqual(output, 'b1');\n  });\n\n  it('should hoist anonymous function default exports to allow circular imports', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/js-export-default-fn-circular-anonymous/a.mjs',\n      ),\n    );\n\n    let output;\n    function result(v) {\n      output = v;\n    }\n    await run(b, {result});\n    assert.deepEqual(output, 'b1');\n  });\n\n  it('should work with many different types of exports', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-export-many/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, {\n      foo: 'foo',\n      bar: 'bar',\n      default: 'baz',\n      boo: 'boo',\n      foobar: 'foobar',\n      type1: 'type1',\n      type2: 'type2',\n    });\n  });\n\n  it('should correctly export functions', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-export-functions/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(Object.keys(res), ['foo', 'bar']);\n    assert.strictEqual(res.foo('test'), 'foo:test');\n    assert.strictEqual(res.bar('test'), 'bar:test');\n  });\n\n  it('should handle exports of imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-export-import/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, {other: 2});\n  });\n\n  it('should handle simultaneous import and reexports of the same identifier', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-export-import-same/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, {foo: '123', bar: '1234'});\n  });\n\n  it('should generate a unique variable name for imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-shadow/index.js'),\n    );\n    let res = await run(b);\n    assert.strictEqual(res.baz(), 'foo');\n  });\n\n  it('should not replace identifier with a var declaration inside a for loop', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-shadow-for-var/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res.baz(), [0, 1, 2, 3]);\n  });\n\n  it('should replace an imported identifier with function locals of the same name', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-shadow-func-var/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res.default, 123);\n  });\n\n  it('should replace imported values in member expressions', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-member/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res.default, ['a', 'b', 'bar']);\n  });\n\n  it('should retain the correct dependency order between import and reexports', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-reexport-dep-order/index.js'),\n    );\n\n    let calls = [];\n    await run(b, {\n      sideEffect(v) {\n        calls.push(v);\n      },\n    });\n    assert.deepEqual(calls, ['a', 'b', 'c']);\n  });\n\n  it('should not freeze live default imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-default-live/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res.default, [123, 789]);\n  });\n\n  it('should not rewrite this in arrow function class properties', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-class-this-esm/a.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res.default, 'x: 123');\n  });\n\n  it('should call named imports without this context', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-this/index.js'),\n    );\n    let res = await run(b, {output: null}, {strict: true});\n    assert.deepEqual(res.default, {\n      unwrappedNamed: [true, false],\n      unwrappedDefault: [true, false],\n      unwrappedNamespace: [false, true],\n      wrappedNamed: [true, false],\n      wrappedDefault: [true, false],\n      wrappedNamespace: [false, true],\n    });\n  });\n\n  it('should only replace free references to require', async () => {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-require-free/index.js'),\n    );\n    let output;\n    await run(b, {\n      output(v) {\n        output = v;\n      },\n    });\n    assert.strictEqual(output, 'a');\n  });\n\n  it('should only replace free references to require with scope hoisting', async () => {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-require-free/index.js'),\n      {\n        mode: 'production',\n      },\n    );\n    let output;\n    await run(b, {\n      output(v) {\n        output = v;\n      },\n    });\n    assert.strictEqual(output, 'a');\n  });\n\n  it('should support import and non-top-level require of same asset from different assets', async () => {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-require-import-different/index.js'),\n    );\n    let {output} = await run(b, null, {require: false});\n    assert.deepEqual(output, [123, {HooksContext: 123}]);\n  });\n\n  it('should support import and non-top-level require of same asset from different assets with scope hoisting', async () => {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-require-import-different/index.js'),\n      {\n        mode: 'production',\n      },\n    );\n    let {output} = await run(b, null, {require: false});\n    assert.deepEqual(output, [123, {HooksContext: 123}]);\n  });\n\n  it('should support runtime module deduplication', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-runtime-dedup/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async1.js', 'shared.js', 'esmodule-helpers.js'],\n      },\n      {\n        assets: ['async2.js', 'shared.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let res = await run(b);\n    assert.equal(await res, true);\n  });\n\n  it('should support runtime module deduplication with scope hoisting', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-runtime-dedup/index.js'),\n      {\n        mode: 'production',\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async1.js', 'shared.js'],\n      },\n      {\n        assets: ['async2.js', 'shared.js'],\n      },\n    ]);\n\n    let res = await run(b);\n    assert.equal(await res, true);\n  });\n\n  it('should remap locations in diagnostics using the input source map', async () => {\n    let fixture = path.join(\n      __dirname,\n      'integration/diagnostic-sourcemap/index.js',\n    );\n    let code = await inputFS.readFileSync(fixture, 'utf8');\n    await assert.rejects(\n      () =>\n        bundle(fixture, {\n          defaultTargetOptions: {\n            shouldOptimize: true,\n          },\n        }),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            message: \"Failed to resolve 'foo' from './index.js'\",\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: fixture,\n                code,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 11,\n                      column: 17,\n                    },\n                    end: {\n                      line: 11,\n                      column: 21,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n          {\n            message: \"Cannot find module 'foo'\",\n            origin: '@parcel/resolver-default',\n            hints: [],\n          },\n        ],\n      },\n    );\n  });\n\n  it('should reuse a bundle when its main asset (aka bundleroot) is imported sychronously', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/shared-bundle-single-source/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'cacheLoader.js',\n          'css-loader.js',\n          'esmodule-helpers.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['bar.js'],\n      },\n      {\n        assets: ['a.js', 'b.js', 'foo.js'],\n      },\n      {\n        assets: ['styles.css'],\n      },\n      {\n        assets: ['local.html'],\n      },\n    ]);\n  });\n\n  it('should error on undeclared external dependencies for libraries', async function () {\n    let fixture = path.join(\n      __dirname,\n      'integration/undeclared-external/index.js',\n    );\n    let pkg = path.join(\n      __dirname,\n      'integration/undeclared-external/package.json',\n    );\n    await assert.rejects(\n      () =>\n        bundle(fixture, {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        }),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            message: \"Failed to resolve 'lodash' from './index.js'\",\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                code: await inputFS.readFile(fixture, 'utf8'),\n                filePath: fixture,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 19,\n                    },\n                    end: {\n                      line: 1,\n                      column: 26,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n          {\n            message:\n              'External dependency \"lodash\" is not declared in package.json.',\n            origin: '@parcel/resolver-default',\n            codeFrames: [\n              {\n                code: await inputFS.readFile(pkg, 'utf8'),\n                filePath: pkg,\n                language: 'json',\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 5,\n                      column: 3,\n                    },\n                    end: {\n                      line: 5,\n                      column: 16,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: ['Add \"lodash\" as a dependency.'],\n          },\n        ],\n      },\n    );\n  });\n\n  it('should error on undeclared helpers dependency for libraries', async function () {\n    let fixture = path.join(\n      __dirname,\n      'integration/undeclared-external/helpers.js',\n    );\n    let pkg = path.join(\n      __dirname,\n      'integration/undeclared-external/package.json',\n    );\n    await assert.rejects(\n      () =>\n        bundle(fixture, {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        }),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            message: md`Failed to resolve '${'@swc/helpers/cjs/_class_call_check.cjs'}' from '${normalizePath(\n              require.resolve('@parcel/transformer-js/src/JSTransformer.js'),\n            )}'`,\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                code: await inputFS.readFile(fixture, 'utf8'),\n                filePath: fixture,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 1,\n                    },\n                    end: {\n                      line: 1,\n                      column: 1,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n          {\n            message:\n              'External dependency \"@swc/helpers\" is not declared in package.json.',\n            origin: '@parcel/resolver-default',\n            codeFrames: [\n              {\n                code: await inputFS.readFile(pkg, 'utf8'),\n                filePath: pkg,\n                language: 'json',\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 5,\n                      column: 3,\n                    },\n                    end: {\n                      line: 5,\n                      column: 16,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: ['Add \"@swc/helpers\" as a dependency.'],\n          },\n        ],\n      },\n    );\n  });\n\n  it('should error on mismatched helpers version for libraries', async function () {\n    let fixture = path.join(\n      __dirname,\n      'integration/undeclared-external/helpers.js',\n    );\n    let pkg = path.join(\n      __dirname,\n      'integration/undeclared-external/package.json',\n    );\n    let pkgContents = JSON.stringify(\n      {\n        ...JSON.parse(await overlayFS.readFile(pkg, 'utf8')),\n        dependencies: {\n          '@swc/helpers': '^0.3.0',\n        },\n      },\n      false,\n      2,\n    );\n    await overlayFS.mkdirp(path.dirname(pkg));\n    await overlayFS.writeFile(pkg, pkgContents);\n    await assert.rejects(\n      () =>\n        bundle(fixture, {\n          mode: 'production',\n          inputFS: overlayFS,\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        }),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            message: md`Failed to resolve '${'@swc/helpers/cjs/_class_call_check.cjs'}' from '${normalizePath(\n              require.resolve('@parcel/transformer-js/src/JSTransformer.js'),\n            )}'`,\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                code: await inputFS.readFile(fixture, 'utf8'),\n                filePath: fixture,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 1,\n                    },\n                    end: {\n                      line: 1,\n                      column: 1,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n          {\n            message:\n              'External dependency \"@swc/helpers\" does not satisfy required semver range \"^0.5.0\".',\n            origin: '@parcel/resolver-default',\n            codeFrames: [\n              {\n                code: pkgContents,\n                filePath: pkg,\n                language: 'json',\n                codeHighlights: [\n                  {\n                    message: 'Found this conflicting requirement.',\n                    start: {\n                      line: 6,\n                      column: 21,\n                    },\n                    end: {\n                      line: 6,\n                      column: 28,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: [\n              'Update the dependency on \"@swc/helpers\" to satisfy \"^0.5.0\".',\n            ],\n          },\n        ],\n      },\n    );\n  });\n\n  describe('multiple import types', function () {\n    it('supports both static and dynamic imports to the same specifier in the same file', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/static-dynamic.js',\n        ),\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['static-dynamic.js', 'other.js', 'esmodule-helpers.js'],\n        },\n      ]);\n\n      let res = await run(b);\n      assert.equal(typeof res.Foo, 'function');\n      assert.equal(typeof res.LazyFoo, 'object');\n      assert.equal(res.Foo, await res.LazyFoo);\n    });\n\n    it('supports both static and dynamic imports to the same specifier in the same file with scope hoisting', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/static-dynamic.js',\n        ),\n        {\n          defaultTargetOptions: {\n            outputFormat: 'esmodule',\n            isLibrary: true,\n            shouldScopeHoist: true,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['static-dynamic.js', 'other.js'],\n        },\n      ]);\n\n      let res = await run(b);\n      assert.equal(typeof res.Foo, 'function');\n      assert.equal(typeof res.LazyFoo, 'object');\n      assert.equal(res.Foo, await res.LazyFoo);\n    });\n\n    it('supports static, dynamic, and url to the same specifier in the same file', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/static-dynamic-url.js',\n        ),\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: [\n            'static-dynamic-url.js',\n            'other.js',\n            'esmodule-helpers.js',\n            'cacheLoader.js',\n            'js-loader.js',\n          ],\n        },\n        {\n          type: 'js',\n          assets: ['other.js', 'esmodule-helpers.js'],\n        },\n      ]);\n\n      let res = await run(b);\n      assert.equal(typeof res.Foo, 'function');\n      assert.equal(typeof res.LazyFoo, 'object');\n      assert.equal(res.Foo, await res.LazyFoo);\n      assert.equal(\n        res.url,\n        'http://localhost/' + path.basename(b.getBundles()[1].filePath),\n      );\n    });\n\n    it('supports static, dynamic, and url to the same specifier in the same file with scope hoisting', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/static-dynamic-url.js',\n        ),\n        {\n          defaultTargetOptions: {\n            outputFormat: 'esmodule',\n            isLibrary: true,\n            shouldScopeHoist: true,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['static-dynamic-url.js', 'other.js'],\n        },\n        {\n          type: 'js',\n          assets: ['other.js'],\n        },\n      ]);\n\n      let res = await run(b);\n      assert.equal(typeof res.Foo, 'function');\n      assert.equal(typeof res.LazyFoo, 'object');\n      assert.equal(res.Foo, await res.LazyFoo);\n      assert.equal(\n        res.url,\n        'http://localhost/' + path.basename(b.getBundles()[1].filePath),\n      );\n    });\n\n    it('supports dynamic import and url to the same specifier in the same file', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/dynamic-url.js',\n        ),\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: [\n            'dynamic-url.js',\n            'esmodule-helpers.js',\n            'cacheLoader.js',\n            'js-loader.js',\n          ],\n        },\n        {\n          type: 'js',\n          assets: ['other.js', 'esmodule-helpers.js'],\n        },\n      ]);\n      let res = await run(b);\n      assert.equal(typeof res.lazy, 'object');\n      assert.equal(typeof (await res.lazy), 'function');\n      assert.equal(\n        res.url,\n        'http://localhost/' + path.basename(b.getBundles()[1].filePath),\n      );\n    });\n\n    it('supports dynamic import and url to the same specifier in the same file with scope hoisting', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/dynamic-url.js',\n        ),\n        {\n          defaultTargetOptions: {\n            outputFormat: 'esmodule',\n            isLibrary: true,\n            shouldScopeHoist: true,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['dynamic-url.js'],\n        },\n        {\n          type: 'js',\n          assets: ['other.js'],\n        },\n      ]);\n\n      let res = await run(b);\n      assert.equal(typeof res.lazy, 'object');\n      assert.equal(typeof (await res.lazy), 'function');\n      assert.equal(\n        res.url,\n        'http://localhost/' + path.basename(b.getBundles()[1].filePath),\n      );\n    });\n\n    it('supports static import and inline bundle for the same asset', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/static-inline.js',\n        ),\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['static-inline.js', 'other.js', 'esmodule-helpers.js'],\n        },\n        {\n          type: 'js',\n          assets: ['other.js', 'esmodule-helpers.js'],\n        },\n      ]);\n\n      let res = await run(b);\n      assert.equal(typeof res.Foo, 'function');\n      assert.equal(typeof res.text, 'string');\n    });\n\n    it('supports static import and inline bundle for the same asset with scope hoisting', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/static-inline.js',\n        ),\n        {\n          defaultTargetOptions: {\n            outputFormat: 'esmodule',\n            isLibrary: true,\n            shouldScopeHoist: true,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['static-inline.js', 'other.js'],\n        },\n        {\n          type: 'js',\n          assets: ['other.js'],\n        },\n      ]);\n\n      let res = await run(b);\n      assert.equal(typeof res.Foo, 'function');\n      assert.equal(typeof res.text, 'string');\n    });\n\n    it('supports dynamic import and inline bundle for the same asset', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/dynamic-inline.js',\n        ),\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: [\n            'dynamic-inline.js',\n            'esmodule-helpers.js',\n            'cacheLoader.js',\n            'js-loader.js',\n          ],\n        },\n        {\n          type: 'js',\n          assets: ['other.js'],\n        },\n        {\n          type: 'js',\n          assets: ['other.js', 'esmodule-helpers.js'],\n        },\n      ]);\n\n      let res = await run(b);\n      assert.equal(typeof res.lazy, 'object');\n      assert.equal(typeof (await res.lazy), 'function');\n      assert.equal(typeof res.text, 'string');\n    });\n\n    it('supports dynamic import and inline bundle for the same asset with scope hoisting', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/multiple-import-types/dynamic-inline.js',\n        ),\n        {\n          defaultTargetOptions: {\n            outputFormat: 'esmodule',\n            isLibrary: true,\n            shouldScopeHoist: true,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['dynamic-inline.js'],\n        },\n        {\n          type: 'js',\n          assets: ['other.js'],\n        },\n        {\n          type: 'js',\n          assets: ['other.js'],\n        },\n      ]);\n\n      let res = await run(b);\n      assert.equal(typeof res.lazy, 'object');\n      assert.equal(typeof (await res.lazy), 'function');\n      assert.equal(typeof res.text, 'string');\n    });\n  });\n\n  it('should avoid creating a bundle for lazy dependencies already available in a shared bundle', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/shared-bundle-internalization/index.mjs',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assert.deepEqual(await (await run(b)).default, [42, 42]);\n  });\n\n  it('should support standalone import.meta', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/import-meta/index.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res.default, {\n      meta: {url: 'file:///integration/import-meta/index.js'},\n      url: 'file:///integration/import-meta/index.js',\n      equal: true,\n    });\n\n    assert.equal(Object.getPrototypeOf(res.default.meta), null);\n    assert.equal(Object.isExtensible(res.default.meta), true);\n    assert.deepEqual(Object.getOwnPropertyDescriptors(res.default.meta), {\n      url: {\n        writable: true,\n        configurable: true,\n        enumerable: true,\n        value: 'file:///integration/import-meta/index.js',\n      },\n    });\n  });\n\n  it('should support importing async bundles from bundles with different dist paths', async function () {\n    let bundleGraph = await bundle(\n      ['bar/entry/entry-a.js', 'foo/entry-b.js'].map(f =>\n        path.join(__dirname, 'integration/differing-bundle-urls', f),\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      },\n    );\n    assertBundles(bundleGraph, [\n      {\n        name: 'entry-a.js',\n        assets: ['cacheLoader.js', 'entry-a.js', 'js-loader.js'],\n      },\n      {\n        name: 'entry-b.js',\n        assets: ['cacheLoader.js', 'entry-b.js', 'js-loader.js'],\n      },\n      {name: /deep\\.[a-f0-9]+\\.js/, assets: ['deep.js']},\n      {name: /common\\.[a-f0-9]+\\.js/, assets: ['index.js']},\n    ]);\n\n    let [a, b] = bundleGraph.getBundles().filter(b => b.needsStableName);\n    let calls = [];\n\n    let bundles = [\n      [await outputFS.readFile(a.filePath, 'utf8'), a],\n      [await outputFS.readFile(b.filePath, 'utf8'), b],\n    ];\n\n    await runBundles(bundleGraph, a, bundles, {\n      sideEffect: v => {\n        calls.push(v);\n      },\n    });\n\n    assert.deepEqual(calls, ['common', 'deep']);\n  });\n\n  it('supports deferring unused ESM imports with sideEffects: false', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/side-effects-false/import.js'),\n    );\n\n    let content = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n\n    assert(!content.includes('returned from bar'));\n\n    let called = false;\n    let output = await run(b, {\n      sideEffect() {\n        called = true;\n      },\n    });\n\n    assert(!called, 'side effect called');\n    assert.strictEqual(output.default, 4);\n  });\n\n  it('supports ESM imports and requires with sideEffects: false', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/side-effects-false/import-require.js'),\n    );\n\n    let output = await run(b, {\n      sideEffect() {},\n    });\n\n    assert.strictEqual(output.default, '4returned from bar');\n  });\n\n  it('should not affect ESM import order', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/js-import-initialization/a.mjs'),\n    );\n\n    await assert.rejects(\n      run(b),\n      new ReferenceError(\"Cannot access 'foo' before initialization\"),\n    );\n  });\n\n  it('should not affect ESM import order with scope hoisting', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/js-import-initialization/a.mjs'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    await assert.rejects(\n      run(b),\n      /^ReferenceError: Cannot access '(.+)' before initialization$/,\n    );\n  });\n\n  it('should produce working output with both scope hoisting and non scope hoisting targets', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/re-export-no-scope-hoist'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n    let bundles = b.getBundles();\n\n    let o1, o2;\n    await runBundle(b, bundles[0], {\n      output: (...o) => (o1 = o),\n    });\n\n    await runBundle(b, bundles[1], {\n      output: (...o) => (o2 = o),\n    });\n\n    assert.deepEqual(o1, ['UIIcon', 'Icon']);\n    assert.deepEqual(o2, ['UIIcon', 'Icon']);\n  });\n\n  it('should not deduplicate an asset if it will become unreachable', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/sibling-deduplicate-unreachable/index.js',\n      ),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n    let res = await run(b);\n    assert.equal(await res.default, 'target');\n  });\n\n  it('should detect shorthand identifier imports', async function () {\n    const dir = path.join(__dirname, 'js-import-shorthand-identifier');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      package.json:\n        {\n          \"name\": \"app\",\n          \"private\": true,\n          \"sideEffects\": false\n        }\n\n      index.js:\n        import { tokens, mode } from \"./tokens.js\";\n\n        export default tokens;\n\n      tokens.js:\n        import { color } from \"./color.js\";\n\n        export const tokens = {\n          color,\n        };\n\n        export { mode } from \"./color.js\";\n\n      color.js:\n        export const color = \"blue\";\n        export const mode = \"dark\";`;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n    });\n\n    let output = await run(b);\n    assert.deepEqual(output.default, {color: 'blue'});\n  });\n\n  it('should retain unicode escape sequences', async function () {\n    // See issue #8877\n    await fsFixture(overlayFS, __dirname)`\n        src/index.js:\n          export default ['\\\\u0085', '\\\\u200b', '\\\\ufffe'];\n      `;\n\n    let b = await bundle(path.join(__dirname, 'src/index.js'), {\n      inputFS: overlayFS,\n    });\n\n    let output = (await run(b)).default;\n    assert.deepEqual(output, ['\\u0085', '\\u200b', '\\ufffe']);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert.equal(contents.match(/\\\\/g).length, 3);\n    assert(!contents.includes('\\u0085'));\n    assert(!contents.includes('\\u200b'));\n    assert(!contents.includes('\\ufffe'));\n  });\n\n  it(`should not wrap assets that are duplicated in different targets`, async function () {\n    const dir = path.join(__dirname, 'multi-target-duplicates');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      shared/index.js:\n        export default 2;\n\n      packages/a/package.json:\n        {\n          \"source\": \"index.js\",\n          \"module\": \"dist/module.js\"\n        }\n\n      packages/a/index.js:\n        import shared from '../../shared';\n        export default shared + 2;\n\n      packages/b/package.json:\n        {\n          \"source\": \"index.js\",\n          \"module\": \"dist/module.js\"\n        }\n\n      packages/b/index.js:\n        import shared from '../../shared';\n        export default shared + 2;\n    `;\n\n    let b = await bundle(path.join(dir, '/packages/*'), {\n      inputFS: overlayFS,\n    });\n\n    for (let bundle of b.getBundles()) {\n      let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n      assert(\n        !contents.includes('parcelRequire'),\n        'should not include parcelRequire',\n      );\n    }\n  });\n\n  it(`should not wrap assets that are duplicated in different targets in the same dist dir`, async function () {\n    const dir = path.join(__dirname, 'multi-target-duplicates-dist');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      package.json:\n        {\n          \"main\": \"dist/main.cjs\",\n          \"browser\": \"dist/browser.cjs\",\n          \"targets\": {\n            \"main\": {\n              \"source\": \"node.js\",\n              \"context\": \"browser\",\n              \"engines\": {\n                \"browsers\": \"chrome >= 70\"\n              }\n            },\n            \"browser\": {\n              \"source\": \"browser.js\",\n              \"engines\": {\n                \"browsers\": \"chrome >= 70\"\n              }\n            }\n          }\n        }\n\n      node.js:\n        import shared from './shared';\n        export default shared + 2;\n\n      browser.js:\n        import shared from './shared';\n        export default shared + 2;\n\n      shared.js:\n        export default 2;\n    `;\n\n    let b = await bundle(dir, {\n      inputFS: overlayFS,\n    });\n\n    for (let bundle of b.getBundles()) {\n      let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n      assert(\n        !contents.includes('parcelRequire'),\n        'should not include parcelRequire',\n      );\n    }\n  });\n\n  it(`should also fail on recoverable parse errors`, async () => {\n    await fsFixture(overlayFS, __dirname)`\n      js-recoverable-parse-errors\n        index.js:\n          1 / {2}`;\n\n    const fixture = path.join(\n      __dirname,\n      '/js-recoverable-parse-errors/index.js',\n    );\n\n    await assert.rejects(\n      () =>\n        bundle(fixture, {\n          inputFS: overlayFS,\n        }),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            origin: '@parcel/transformer-js',\n            message: 'Unexpected token `}`. Expected identifier',\n            hints: null,\n            codeFrames: [\n              {\n                filePath: fixture,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      column: 7,\n                      line: 1,\n                    },\n                    end: {\n                      column: 7,\n                      line: 1,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n\n  for (let shouldScopeHoist of [false, true]) {\n    let options = {\n      defaultTargetOptions: {\n        shouldScopeHoist,\n      },\n      mode: 'production',\n    };\n    let usesSymbolPropagation = true;\n    describe(`sideEffects: false with${\n      shouldScopeHoist ? '' : 'out'\n    } scope-hoisting`, function () {\n      if (shouldScopeHoist) {\n        it('supports excluding unused CSS imports', async function () {\n          let b = await bundle(\n            path.join(\n              __dirname,\n              '/integration/scope-hoisting/es6/side-effects-css/index.html',\n            ),\n            options,\n          );\n\n          assertBundles(b, [\n            {\n              name: 'index.html',\n              assets: ['index.html'],\n            },\n            {\n              type: 'js',\n              assets: ['index.js', 'b1.js'],\n            },\n            {\n              type: 'css',\n              assets: ['b1.css'],\n            },\n          ]);\n\n          let calls = [];\n          let res = await run(\n            b,\n            {\n              output: null,\n              sideEffect: caller => {\n                calls.push(caller);\n              },\n            },\n            {require: false},\n          );\n          assert.deepEqual(calls, ['b1']);\n          assert.deepEqual(res.output, 2);\n\n          let css = await outputFS.readFile(\n            b.getBundles().find(bundle => bundle.type === 'css').filePath,\n            'utf8',\n          );\n          assert(!css.includes('.b2'));\n        });\n\n        it(\"doesn't create new bundles for dynamic imports in excluded assets\", async function () {\n          let b = await bundle(\n            path.join(\n              __dirname,\n              '/integration/scope-hoisting/es6/side-effects-no-new-bundle/index.html',\n            ),\n            options,\n          );\n\n          assertBundles(b, [\n            {\n              name: 'index.html',\n              assets: ['index.html'],\n            },\n            {\n              type: 'js',\n              assets: ['index.js', 'b1.js'],\n            },\n          ]);\n\n          let calls = [];\n          let res = await run(\n            b,\n            {\n              output: null,\n              sideEffect: caller => {\n                calls.push(caller);\n              },\n            },\n            {require: false},\n          );\n          assert.deepEqual(calls, ['b1']);\n          assert.deepEqual(res.output, 2);\n        });\n      }\n\n      it('supports deferring unused ES6 re-exports (namespace used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports/a.js',\n          ),\n          options,\n        );\n\n        assertBundles(b, [\n          {\n            type: 'js',\n            assets: shouldScopeHoist\n              ? ['a.js', 'message1.js']\n              : ['a.js', 'esmodule-helpers.js', 'message1.js'],\n          },\n        ]);\n\n        if (usesSymbolPropagation) {\n          // TODO this only excluded, but should be deferred.\n          assert(!findAsset(b, 'message3.js'));\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['message1']);\n        assert.deepEqual(res.output, 'Message 1');\n      });\n\n      it('supports deferring an unused ES6 re-export (wildcard, empty, unused)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-all-empty/a.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assertDependencyWasExcluded(b, 'index.js', './empty.js');\n        }\n\n        assert.deepEqual((await run(b, null, {require: false})).output, 123);\n      });\n\n      it('supports deferring unused ES6 re-exports (reexport named used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports/b.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'message1.js'));\n          assert(!findAsset(b, 'message3.js'));\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['message2']);\n        assert.deepEqual(res.output, 'Message 2');\n      });\n\n      it('supports deferring unused ES6 re-exports (namespace rename used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports/c.js',\n          ),\n          options,\n        );\n\n        assertBundles(b, [\n          {\n            type: 'js',\n            assets: shouldScopeHoist\n              ? ['c.js', 'message3.js']\n              : ['c.js', 'esmodule-helpers.js', 'message3.js'],\n          },\n        ]);\n\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'message1.js'));\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['message3']);\n        assert.deepEqual(res.output, {default: 'Message 3'});\n      });\n\n      it('supports deferring unused ES6 re-exports (direct export used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports/d.js',\n          ),\n          options,\n        );\n\n        assertDependencyWasExcluded(b, 'index.js', './message2.js');\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'message1.js'));\n          assert(!findAsset(b, 'message3.js'));\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['index']);\n        assert.deepEqual(res.output, 'Message 4');\n      });\n\n      it('supports chained ES6 re-exports', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-chained/index.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'bar.js'));\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        try {\n          assert.deepEqual(calls, ['key', 'foo', 'index']);\n        } catch (e) {\n          // A different dependency order, but this is deemed acceptable as it's sideeffect free\n          assert.deepEqual(calls, ['foo', 'key', 'index']);\n        }\n\n        assert.deepEqual(res.output, ['key', 'foo']);\n      });\n\n      it('should not optimize away an unused ES6 re-export and an used import', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-import/a.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, null, {require: false});\n        assert.deepEqual(res.output, 123);\n      });\n\n      it('should not optimize away an unused ES6 re-export and an used import (different symbols)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-import-different/a.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, null, {require: false});\n        assert.deepEqual(res.output, 123);\n      });\n\n      it('correctly handles ES6 re-exports in library mode entries', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-library/a.js',\n          ),\n          options,\n        );\n\n        let contents = await outputFS.readFile(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-library/build.js',\n          ),\n          'utf8',\n        );\n        assert(!contents.includes('console.log'));\n\n        let res = await run(b);\n        assert.deepEqual(res, {c1: 'foo'});\n      });\n\n      if (shouldScopeHoist) {\n        it('correctly updates deferred assets that are reexported', async function () {\n          let testDir = path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-update-deferred-reexported',\n          );\n\n          let b = bundler(path.join(testDir, 'index.js'), {\n            inputFS: overlayFS,\n            outputFS: overlayFS,\n            ...options,\n          });\n\n          let subscription = await b.watch();\n\n          let bundleEvent = await getNextBuild(b);\n          assert(bundleEvent.type === 'buildSuccess');\n          let output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, '12345hello');\n\n          await overlayFS.mkdirp(path.join(testDir, 'node_modules', 'foo'));\n          await overlayFS.copyFile(\n            path.join(testDir, 'node_modules', 'foo', 'foo_updated.js'),\n            path.join(testDir, 'node_modules', 'foo', 'foo.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert(bundleEvent.type === 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, '1234556789');\n\n          await subscription.unsubscribe();\n        });\n\n        it('correctly updates deferred assets that are reexported and imported directly', async function () {\n          let testDir = path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-update-deferred-direct',\n          );\n\n          let b = bundler(path.join(testDir, 'index.js'), {\n            inputFS: overlayFS,\n            outputFS: overlayFS,\n            ...options,\n          });\n\n          let subscription = await b.watch();\n\n          let bundleEvent = await getNextBuild(b);\n          assert(bundleEvent.type === 'buildSuccess');\n          let output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, '12345hello');\n\n          await overlayFS.mkdirp(path.join(testDir, 'node_modules', 'foo'));\n          await overlayFS.copyFile(\n            path.join(testDir, 'node_modules', 'foo', 'foo_updated.js'),\n            path.join(testDir, 'node_modules', 'foo', 'foo.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert(bundleEvent.type === 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, '1234556789');\n\n          await subscription.unsubscribe();\n        });\n\n        it('removes deferred reexports when imported from multiple asssets', async function () {\n          let b = await bundle(\n            path.join(\n              __dirname,\n              '/integration/scope-hoisting/es6/side-effects-re-exports-multiple-dynamic/a.js',\n            ),\n            options,\n          );\n\n          let contents = await outputFS.readFile(\n            b.getBundles()[0].filePath,\n            'utf8',\n          );\n\n          assert(!contents.includes('$import$'));\n          assert(/=\\s*1234/.test(contents));\n          assert(!/=\\s*5678/.test(contents));\n\n          let output = await run(b);\n          assert.deepEqual(output, [1234, {default: 1234}]);\n        });\n      }\n\n      it('keeps side effects by default', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects/a.js',\n          ),\n          options,\n        );\n\n        let called = false;\n        let res = await run(\n          b,\n          {\n            sideEffect: () => {\n              called = true;\n            },\n          },\n          {require: false},\n        );\n\n        assert(called, 'side effect not called');\n        assert.deepEqual(res.output, 4);\n      });\n\n      it('supports the package.json sideEffects: false flag', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-false/a.js',\n          ),\n          options,\n        );\n\n        let called = false;\n        let res = await run(\n          b,\n          {\n            sideEffect: () => {\n              called = true;\n            },\n          },\n          {require: false},\n        );\n\n        assert(!called, 'side effect called');\n        assert.deepEqual(res.output, 4);\n      });\n\n      it('supports removing a deferred dependency', async function () {\n        let testDir = path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/side-effects-false',\n        );\n\n        let b = bundler(path.join(testDir, 'a.js'), {\n          inputFS: overlayFS,\n          outputFS: overlayFS,\n          ...options,\n        });\n\n        let subscription = await b.watch();\n\n        try {\n          let bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          let called = false;\n          let res = await run(\n            bundleEvent.bundleGraph,\n            {\n              sideEffect: () => {\n                called = true;\n              },\n            },\n            {require: false},\n          );\n          assert(!called, 'side effect called');\n          assert.deepEqual(res.output, 4);\n          if (usesSymbolPropagation) {\n            assert(!findAsset(bundleEvent.bundleGraph, 'index.js'));\n          }\n\n          await overlayFS.mkdirp(path.join(testDir, 'node_modules/bar'));\n          await overlayFS.copyFile(\n            path.join(testDir, 'node_modules/bar/index.1.js'),\n            path.join(testDir, 'node_modules/bar/index.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          called = false;\n          res = await run(\n            bundleEvent.bundleGraph,\n            {\n              sideEffect: () => {\n                called = true;\n              },\n            },\n            {require: false},\n          );\n          assert(!called, 'side effect called');\n          assert.deepEqual(res.output, 4);\n        } finally {\n          await subscription.unsubscribe();\n        }\n      });\n\n      it('supports wildcards', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-false-wildcards/a.js',\n          ),\n          options,\n        );\n        let called = false;\n        let res = await run(\n          b,\n          {\n            sideEffect: () => {\n              called = true;\n            },\n          },\n          {require: false},\n        );\n\n        if (usesSymbolPropagation) {\n          assert(!called, 'side effect called');\n        }\n        assert.deepEqual(res.output, 'bar');\n      });\n\n      it('correctly handles excluded and wrapped reexport assets', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-false-wrap-excluded/a.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, null, {require: false});\n        assert.deepEqual(res.output, 4);\n      });\n\n      it('supports the package.json sideEffects flag with an array', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-array/a.js',\n          ),\n          options,\n        );\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert(calls.toString() == 'foo', \"side effect called for 'foo'\");\n        assert.deepEqual(res.output, 4);\n      });\n\n      it('supports the package.json sideEffects: false flag with shared dependencies', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-false-duplicate/a.js',\n          ),\n          options,\n        );\n\n        let called = false;\n        let res = await run(\n          b,\n          {\n            sideEffect: () => {\n              called = true;\n            },\n          },\n          {require: false},\n        );\n\n        assert(!called, 'side effect called');\n        assert.deepEqual(res.output, 6);\n      });\n\n      it('supports the package.json sideEffects: false flag with shared dependencies and code splitting', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-split/a.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, null, {require: false});\n        assert.deepEqual(await res.output, 581);\n      });\n\n      it('supports the package.json sideEffects: false flag with shared dependencies and code splitting II', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-split2/a.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, null, {require: false});\n        assert.deepEqual(await res.output, [{default: 123, foo: 2}, 581]);\n      });\n\n      it('missing exports should be replaced with an empty object', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/empty-module/a.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, null, {require: false});\n        assert.deepEqual(res.output, {b: {}});\n      });\n\n      it('supports namespace imports of theoretically excluded reexporting assets', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/import-namespace-sideEffects/index.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, null, {require: false});\n        assert.deepEqual(res.output, {Main: 'main', a: 'foo', b: 'bar'});\n      });\n\n      it('can import from a different bundle via a re-export', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/re-export-bundle-boundary-side-effects/index.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, null, {require: false});\n        assert.deepEqual(await res.output, ['operational', 'ui']);\n      });\n\n      it('supports excluding multiple chained namespace reexports', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-chained-re-exports-multiple/a.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'symbol1.js'));\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['message1']);\n        assert.deepEqual(res.output, 'Message 1');\n      });\n\n      it('supports excluding when doing both exports and reexports', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-export-reexport/a.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'other.js'));\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['index']);\n        assert.deepEqual(res.output, 'Message 1');\n      });\n\n      it('supports deferring with chained renaming reexports', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-rename-chained/a.js',\n          ),\n          options,\n        );\n\n        // assertDependencyWasExcluded(b, 'message.js', './message2');\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['message1']);\n        assert.deepEqual(res.output, 'Message 1');\n      });\n\n      it('supports named and renamed reexports of the same asset (default used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-rename-same2/a.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert.deepStrictEqual(\n            new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'other.js')))),\n            new Set(['bar']),\n          );\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['other']);\n        assert.deepEqual(res.output, 'bar');\n      });\n\n      it('supports named and renamed reexports of the same asset (named used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-rename-same2/b.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert.deepStrictEqual(\n            new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'other.js')))),\n            new Set(['bar']),\n          );\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['other']);\n        assert.deepEqual(res.output, 'bar');\n      });\n\n      it('supports named and renamed reexports of the same asset (namespace used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-rename-same/index.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, null, {require: false});\n        assert.deepEqual(res.output, [{value1: 123, value2: 123}, 123, 123]);\n      });\n\n      it('supports reexports via variable declaration (unused)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-rename-var-unused/index.js',\n          ),\n          options,\n        );\n\n        let res = await run(b, {}, {require: false});\n        assert.deepEqual((await res.output).foo, 'foo');\n      });\n\n      it('supports named and namespace exports of the same asset (named used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-namespace-same/a.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'index.js'));\n          assert.deepStrictEqual(\n            new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'other.js')))),\n            new Set(['default']),\n          );\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['other']);\n        assert.deepEqual(res.output, ['foo']);\n      });\n\n      it('supports named and namespace exports of the same asset (namespace used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-namespace-same/b.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'index.js'));\n          assert.deepStrictEqual(\n            new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'other.js')))),\n            new Set(['bar']),\n          );\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['other']);\n        assert.deepEqual(res.output, ['bar']);\n      });\n\n      it('supports named and namespace exports of the same asset (both used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-namespace-same/c.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'index.js'));\n          assert.deepStrictEqual(\n            new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'other.js')))),\n            new Set(['default', 'bar']),\n          );\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['other']);\n        assert.deepEqual(res.output, ['foo', 'bar']);\n      });\n\n      it('supports partially used reexporting index file', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-re-exports-partially-used/index.js',\n          ),\n          options,\n        );\n\n        let calls = [];\n        let res = (\n          await run(\n            b,\n            {\n              sideEffect: caller => {\n                calls.push(caller);\n              },\n            },\n            {require: false},\n          )\n        ).output;\n\n        let [v, async] = res;\n\n        assert.deepEqual(calls, ['b']);\n        assert.deepEqual(v, 2);\n\n        v = await async();\n        assert.deepEqual(calls, ['b', 'a', 'index', 'dynamic']);\n        assert.deepEqual(v.default, [1, 3]);\n      });\n\n      it('supports deferring non-weak dependencies that are not used', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-semi-weak/a.js',\n          ),\n          options,\n        );\n\n        // assertDependencyWasExcluded(b, 'esm2.js', './other.js');\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['esm1']);\n        assert.deepEqual(res.output, 'Message 1');\n      });\n\n      it('supports excluding CommonJS (CommonJS unused)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-commonjs/a.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert.deepStrictEqual(\n            new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'esm.js')))),\n            new Set(['message1']),\n          );\n          // We can't statically analyze commonjs.js, so message1 appears to be used\n          assert.deepStrictEqual(\n            new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'commonjs.js')))),\n            // the exports object is used freely\n            new Set(shouldScopeHoist ? ['*', 'message1'] : ['message1']),\n          );\n          assert.deepStrictEqual(\n            new Set(\n              b.getUsedSymbols(findDependency(b, 'index.js', './commonjs.js')),\n            ),\n            new Set(['message1']),\n          );\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n\n        assert.deepEqual(calls, ['esm', 'commonjs', 'index']);\n        assert.deepEqual(res.output, 'Message 1');\n      });\n\n      it('supports excluding CommonJS (CommonJS used)', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-commonjs/b.js',\n          ),\n          options,\n        );\n\n        if (usesSymbolPropagation) {\n          assert(!findAsset(b, 'esm.js'));\n          assert(!findAsset(b, 'index.js'));\n          assert.deepStrictEqual(\n            new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'commonjs.js')))),\n            // the exports object is used freely\n            new Set(shouldScopeHoist ? ['*', 'message2'] : ['message2']),\n          );\n        }\n\n        let calls = [];\n        let res = await run(\n          b,\n          {\n            sideEffect: caller => {\n              calls.push(caller);\n            },\n          },\n          {require: false},\n        );\n        assert.deepEqual(calls, ['commonjs']);\n        assert.deepEqual(res.output, 'Message 2');\n      });\n    });\n\n    it(`ignores missing unused import specifiers in source assets ${\n      shouldScopeHoist ? 'with' : 'without'\n    } scope-hoisting`, async function () {\n      let b = await bundle(\n        path.join(__dirname, 'integration/js-unused-import-specifier/a.js'),\n        options,\n      );\n      let res = await run(b, null, {require: false});\n      assert.equal(res.output, 123);\n    });\n\n    it(`ignores missing unused import specifiers in node-modules ${\n      shouldScopeHoist ? 'with' : 'without'\n    } scope-hoisting`, async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/js-unused-import-specifier-node-modules/a.js',\n        ),\n        options,\n      );\n\n      let res = await run(b, null, {require: false});\n      assert.equal(res.output, 123);\n    });\n\n    it(`duplicate assets should share module scope  ${\n      shouldScopeHoist ? 'with' : 'without'\n    } scope-hoisting`, async function () {\n      let b = await bundle(\n        [\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/multi-entry-duplicates/one.js',\n          ),\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/multi-entry-duplicates/two.js',\n          ),\n        ],\n        options,\n      );\n\n      let result = await runBundle(b, b.getBundles()[0], {}, {require: false});\n\n      assert.equal(await result.output, 2);\n    });\n\n    it(`should work correctly with export called hasOwnProperty ${\n      shouldScopeHoist ? 'with' : 'without'\n    } scope-hoisting`, async () => {\n      await fsFixture(overlayFS, __dirname)`\n        js-export-all-hasOwnProperty\n          a.js:\n            export function hasOwnProperty() {\n              throw new Error(\"Shouldn't be called\");\n            }\n          b.js:\n            module.exports = { other: 123 }\n\n          library.js:\n            export * from './a';\n            export * from './b';\n\n          index.js:\n            import * as x from './library';\n            output = sideEffectNoop(x).other;`;\n\n      let b = await bundle(\n        path.join(__dirname, 'js-export-all-hasOwnProperty/index.js'),\n        {\n          ...options,\n          inputFS: overlayFS,\n        },\n      );\n      let res = await run(b, null, {require: false});\n      assert.equal(res.output, 123);\n    });\n\n    it(`supports import.meta properties ${\n      shouldScopeHoist ? 'with' : 'without'\n    } scope-hoisting`, async () => {\n      await fsFixture(overlayFS, __dirname)`\n        import-meta-properties\n          a.js:\n            output = [import.meta.distDir, import.meta.publicUrl]\n          b/c/d.js:\n            output = [import.meta.distDir, import.meta.publicUrl]`;\n\n      let b = await bundle(\n        [\n          path.join(__dirname, 'import-meta-properties/a.js'),\n          path.join(__dirname, 'import-meta-properties/b/c/d.js'),\n        ],\n        {\n          ...options,\n          inputFS: overlayFS,\n          defaultTargetOptions: {\n            ...options.defaultTargetOptions,\n            publicUrl: 'https://example.com',\n          },\n        },\n      );\n      let res = await runBundle(b, b.getBundles()[0], null, {require: false});\n      assert.deepEqual(res.output, ['./', 'https://example.com/']);\n\n      res = await runBundle(b, b.getBundles()[1], null, {require: false});\n      assert.deepEqual(res.output, ['../../', 'https://example.com/']);\n    });\n\n    it(`supports parcelRequire.meta properties ${\n      shouldScopeHoist ? 'with' : 'without'\n    } scope-hoisting`, async () => {\n      await fsFixture(overlayFS, __dirname)`\n        parcelRequire-meta-properties\n          a.js:\n            output = [parcelRequire.meta.distDir, parcelRequire.meta.publicUrl]\n          b/c/d.js:\n            output = [parcelRequire.meta.distDir, parcelRequire.meta.publicUrl]`;\n\n      let b = await bundle(\n        [\n          path.join(__dirname, 'parcelRequire-meta-properties/a.js'),\n          path.join(__dirname, 'parcelRequire-meta-properties/b/c/d.js'),\n        ],\n        {\n          ...options,\n          inputFS: overlayFS,\n          defaultTargetOptions: {\n            ...options.defaultTargetOptions,\n            publicUrl: 'https://example.com',\n          },\n        },\n      );\n      let res = await runBundle(b, b.getBundles()[0], null, {require: false});\n      assert.deepEqual(res.output, ['./', 'https://example.com/']);\n\n      res = await runBundle(b, b.getBundles()[1], null, {require: false});\n      assert.deepEqual(res.output, ['../../', 'https://example.com/']);\n    });\n\n    it(`supports parcelRequire.load ${\n      shouldScopeHoist ? 'with' : 'without'\n    } scope-hoisting`, async () => {\n      await fsFixture(overlayFS, __dirname)`\n        parcelRequire-meta-properties\n          x/y/z/a.js:\n            output = parcelRequire.load('b.js');\n          b.js:\n            globalThis.result = 2;`;\n\n      let b = await bundle(\n        [\n          path.join(__dirname, 'parcelRequire-meta-properties/x/y/z/a.js'),\n          path.join(__dirname, 'parcelRequire-meta-properties/b.js'),\n        ],\n        {\n          ...options,\n          inputFS: overlayFS,\n        },\n      );\n      let res = await runBundle(b, b.getBundles()[0], null, {require: false});\n      await res.output;\n      assert.equal(res.result, 2);\n    });\n\n    it(`can bundle date-fns ${\n      shouldScopeHoist ? 'with' : 'without'\n    } scope-hoisting`, async () => {\n      await fsFixture(overlayFS, __dirname)`\n        date-fns\n          a.ts:\n            import {format} from 'date-fns';\n            output = format(new Date(2025, 1, 3), \"yyyy-MM-dd\");`;\n\n      let b = await bundle(path.join(__dirname, 'date-fns/a.ts'), {\n        ...options,\n        mode: 'development',\n        inputFS: overlayFS,\n      });\n      let res = await run(b, null, {require: false});\n      let result = await res.output;\n      assert.equal(result, '2025-02-03');\n    });\n  }\n\n  for (let defaultTargetOptions of [\n    {shouldScopeHoist: false},\n    {shouldScopeHoist: true, outputFormat: 'commonjs'},\n    {shouldScopeHoist: true, outputFormat: 'esmodule'},\n  ]) {\n    it(\n      'supports native .node modules with options: ' +\n        JSON.stringify(defaultTargetOptions),\n      async function () {\n        await fsFixture(overlayFS, __dirname)`\n        native-node\n          index.js:\n            output = require('@parcel/rust/index');\n            \n          package.json:\n            {\n              \"targets\": {\n                \"default\": {\n                  \"context\": \"node\",\n                  \"includeNodeModules\": true\n                }\n              }\n            }\n            \n          yarn.lock:`;\n\n        let b = await bundle(path.join(__dirname, 'native-node/index.js'), {\n          defaultTargetOptions,\n          inputFS: overlayFS,\n          outputFS: inputFS,\n        });\n\n        let res = await run(\n          b,\n          {output: null},\n          {require: false},\n          {\n            fs: () => require('fs'),\n            path: () => require('path'),\n            module: () => require('module'),\n            url: () => require('url'),\n          },\n        );\n        assert.equal(typeof res.output.hashString, 'function');\n      },\n    );\n  }\n\n  it('should support ESM externals and exports in development mode', async () => {\n    await fsFixture(overlayFS, __dirname)`\n    esm-externals\n      index.js:\n        import {createHash} from 'crypto';\n        let hash = createHash('md5');\n        hash.update('testing');\n        export const hashed = hash.digest('hex');\n        export default \"Test\";\n        \n      package.json:\n        {\n          \"targets\": {\n            \"default\": {\n              \"context\": \"node\",\n              \"outputFormat\": \"esmodule\"\n            }\n          }\n        }\n        \n      yarn.lock:`;\n\n    let b = await bundle(path.join(__dirname, 'esm-externals/index.js'), {\n      inputFS: overlayFS,\n    });\n\n    let res = await run(\n      b,\n      {},\n      {},\n      {\n        crypto: () => require('crypto'),\n      },\n    );\n    assert.equal(res.hashed, 'ae2b1fca515949e5d54fb22b8ed95575');\n    assert.equal(res.default, 'Test');\n  });\n\n  it('should not add ESM externals for optional requires', async () => {\n    await fsFixture(overlayFS, __dirname)`\n    esm-externals\n      index.js:\n        let test;\n        try {\n          require('optional');\n          test = 'fail';\n        } catch {\n          test = 'pass';\n        }\n        export default test;\n        \n      package.json:\n        {\n          \"targets\": {\n            \"default\": {\n              \"context\": \"node\",\n              \"outputFormat\": \"esmodule\"\n            }\n          }\n        }\n        \n      yarn.lock:`;\n\n    let b = await bundle(path.join(__dirname, 'esm-externals/index.js'), {\n      inputFS: overlayFS,\n    });\n\n    let res = await run(b);\n    assert.equal(res.default, 'pass');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/json-reporter.js",
    "content": "// @flow\n\n/* eslint-disable no-console */\n\nimport assert from 'assert';\nimport invariant from 'assert';\nimport path from 'path';\nimport {bundle} from '@parcel/test-utils';\nimport sinon from 'sinon';\n\nconst config = path.join(\n  __dirname,\n  './integration/custom-configs/.parcelrc-json-reporter',\n);\n\ndescribe('json reporter', () => {\n  it('logs bundling a commonjs bundle to stdout as json', async () => {\n    let consoleStub = sinon.stub(console, 'log');\n    try {\n      await bundle(path.join(__dirname, '/integration/commonjs/index.js'), {\n        config,\n        logLevel: 'info',\n      });\n\n      let parsedCalls = consoleStub.getCalls().map(call => {\n        invariant(typeof call.lastArg === 'string');\n        return JSON.parse(call.lastArg);\n      });\n      for (let [iStr, parsed] of Object.entries(parsedCalls)) {\n        parsed = (parsed: any);\n        invariant(typeof iStr === 'string');\n        let i = parseInt(iStr, 10);\n\n        if (i === 0) {\n          assert.deepEqual(parsed, {type: 'buildStart'});\n        } else if (i > 0 && i < 9) {\n          assert.equal(parsed.type, 'buildProgress');\n          assert.equal(parsed.phase, 'transforming');\n          assert(typeof parsed.filePath === 'string');\n        } else if (i === 9) {\n          assert.deepEqual(parsed, {\n            type: 'buildProgress',\n            phase: 'bundling',\n          });\n        } else if (i === 10) {\n          assert.equal(parsed.type, 'buildProgress');\n          assert.equal(parsed.phase, 'packaging');\n          assert.equal(parsed.bundleName, 'index.js');\n        } else if (i === 11) {\n          assert.equal(parsed.type, 'buildProgress');\n          assert.equal(parsed.phase, 'optimizing');\n          assert.equal(parsed.bundleName, 'index.js');\n        } else if (i === 12) {\n          assert.equal(parsed.type, 'buildSuccess');\n          assert(typeof parsed.buildTime === 'number');\n          assert(Array.isArray(parsed.bundles));\n          let bundle = parsed.bundles[0];\n          assert.equal(path.basename(bundle.filePath), 'index.js');\n          assert(typeof bundle.size === 'number');\n          assert(typeof bundle.time === 'number');\n          assert(Array.isArray(bundle.assets));\n        }\n      }\n    } finally {\n      consoleStub.restore();\n    }\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/kotlin.js",
    "content": "import assert from 'assert';\nimport {assertBundleTree, bundle, run} from '@parcel/test-utils';\nimport commandExists from 'command-exists';\n\ndescribe.skip('kotlin', function () {\n  if (!commandExists.sync('java')) {\n    // eslint-disable-next-line no-console\n    console.log(\n      'Skipping Kotlin tests. Install https://www.java.com/download/ to run them.',\n    );\n    return;\n  }\n\n  it('should produce a basic kotlin bundle', async function () {\n    let b = await bundle(__dirname + '/integration/kotlin/index.js');\n\n    await assertBundleTree(b, {\n      type: 'js',\n      assets: ['test.kt', 'index.js', 'browser.js', 'kotlin.js'],\n    });\n\n    let output = await run(b);\n    assert.equal(output, 5);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/lazy-compile.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  bundler,\n  outputFS,\n  distDir,\n  getNextBuild,\n  assertBundles,\n  removeDistDirectory,\n  run,\n  fsFixture,\n  overlayFS,\n} from '@parcel/test-utils';\n\nconst findBundle = (bundleGraph, nameRegex) => {\n  const result = bundleGraph.getBundles().find(b => nameRegex.test(b.name));\n\n  if (!result) {\n    throw new Error(\n      `Couldn't find bundle matching '${nameRegex}'. Available bundles are ${bundleGraph\n        ?.getBundles()\n        .map(b => b.name)\n        .join(', ')}`,\n    );\n  }\n\n  return result;\n};\n\nconst distDirIncludes = async matches => {\n  const files = await outputFS.readdir(distDir);\n  for (const match of matches) {\n    if (typeof match === 'string') {\n      if (!files.some(file => file === match)) {\n        throw new Error(\n          `No file matching ${match} was found in ${files.join(', ')}`,\n        );\n      }\n    } else {\n      if (!files.some(file => match.test(file))) {\n        throw new Error(\n          `No file matching ${match} was found in ${files.join(', ')}`,\n        );\n      }\n    }\n  }\n  return true;\n};\n\ndescribe('lazy compile', function () {\n  it('should lazy compile', async function () {\n    const b = await bundler(\n      path.join(__dirname, '/integration/lazy-compile/index.js'),\n      {\n        shouldBuildLazily: true,\n        mode: 'development',\n        shouldContentHash: false,\n      },\n    );\n\n    await removeDistDirectory();\n\n    const subscription = await b.watch();\n    let result = await getNextBuild(b);\n\n    // This simulates what happens if index.js is loaded as well as lazy-1 which loads lazy-2.\n    // While parallel-lazy-1 is also async imported by index.js, we pretend it wasn't requested (i.e. like\n    // if it was behind a different trigger).\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /index.js/),\n    );\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^lazy-1/),\n    );\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^lazy-2/),\n    );\n\n    // Expect the bundle graph to contain the whole nest of lazy from `lazy-1`, but not\n    // `parallel-lazy-1` which wasn't requested.\n    assertBundles(result.bundleGraph, [\n      {\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['lazy-1.js', 'esmodule-helpers.js'],\n      },\n      {\n        assets: ['lazy-2.js'],\n      },\n      {\n        assets: ['parallel-lazy-1.js'],\n      },\n    ]);\n\n    subscription.unsubscribe();\n\n    // Ensure the files match the bundle graph - lazy-2 should've been produced as it was requested\n    assert(await distDirIncludes(['index.js', /^lazy-1\\./, /^lazy-2\\./]));\n  });\n\n  it('should lazy compile properly when same module is used sync/async', async () => {\n    const b = await bundler(\n      path.join(__dirname, '/integration/lazy-compile/index-sync-async.js'),\n      {\n        shouldBuildLazily: true,\n        mode: 'development',\n        shouldContentHash: false,\n      },\n    );\n\n    await removeDistDirectory();\n\n    const subscription = await b.watch();\n    let result = await getNextBuild(b);\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^index-sync-async\\./),\n    );\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^uses-static-component\\./),\n    );\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^uses-static-component-async\\./),\n    );\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^static-component\\./),\n    );\n\n    let output = await run(result.bundleGraph);\n    assert.deepEqual(await output.default(), [\n      'static component',\n      'static component',\n    ]);\n    subscription.unsubscribe();\n  });\n\n  it('should support includes for lazy compile', async () => {\n    const b = await bundler(\n      path.join(__dirname, '/integration/lazy-compile/index.js'),\n      {\n        shouldBuildLazily: true,\n        lazyIncludes: ['**/lazy-1*'],\n        mode: 'development',\n        shouldContentHash: false,\n      },\n    );\n\n    await removeDistDirectory();\n\n    const subscription = await b.watch();\n    let result = await getNextBuild(b);\n\n    // Expect the bundle graph to only contain `parallel-lazy-1` but not `lazy-1`s children as we're only including lazy-1 in lazy compilation\n    // `parallel-lazy-1` which wasn't requested.\n    assertBundles(result.bundleGraph, [\n      {\n        name: /^index.*/,\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        // This will be a placeholder, but that info isn't available in the BundleGraph\n        assets: ['lazy-1.js'],\n      },\n      {\n        assets: ['parallel-lazy-1.js', 'esmodule-helpers.js'],\n      },\n      {\n        assets: ['parallel-lazy-2.js'],\n      },\n    ]);\n\n    // ensure parallel-lazy was produced, as it isn't \"included\" in laziness..\n    assert(\n      await distDirIncludes([\n        'index.js',\n        /^parallel-lazy-1\\./,\n        /^parallel-lazy-2\\./,\n      ]),\n    );\n\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /lazy-1/),\n    );\n\n    // Since lazy-2 was not included it should've been built when lazy-1 was..\n    assert(\n      await distDirIncludes([\n        'index.js',\n        /^parallel-lazy-1\\./,\n        /^parallel-lazy-2\\./,\n        /^lazy-1\\./,\n        /^lazy-2\\./,\n      ]),\n    );\n\n    subscription.unsubscribe();\n  });\n\n  it('should support excludes for lazy compile', async () => {\n    const b = await bundler(\n      path.join(__dirname, '/integration/lazy-compile/index.js'),\n      {\n        shouldBuildLazily: true,\n        lazyExcludes: ['**/lazy-*'],\n        mode: 'development',\n        shouldContentHash: false,\n      },\n    );\n\n    await removeDistDirectory();\n\n    const subscription = await b.watch();\n    let result = await getNextBuild(b);\n\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /index.js/),\n    );\n\n    assertBundles(result.bundleGraph, [\n      {\n        name: /^index.*/,\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['lazy-1.js', 'esmodule-helpers.js'],\n      },\n      {\n        assets: ['lazy-2.js'],\n      },\n      {\n        // This will be a placeholder, but that info isn't available in the BundleGraph\n        assets: ['parallel-lazy-1.js'],\n      },\n    ]);\n\n    // lazy-* is _excluded_ from lazy compilation so it should have been built, but parallel-lazy should not have\n\n    assert(await distDirIncludes(['index.js', /^lazy-1\\./, /^lazy-2\\./]));\n\n    subscription.unsubscribe();\n  });\n\n  it('should lazy compile properly when same module is used sync/async', async () => {\n    const b = await bundler(\n      path.join(__dirname, '/integration/lazy-compile/index-sync-async.js'),\n      {\n        shouldBuildLazily: true,\n        mode: 'development',\n        shouldContentHash: false,\n      },\n    );\n\n    await removeDistDirectory();\n\n    const subscription = await b.watch();\n    let result = await getNextBuild(b);\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^index-sync-async\\./),\n    );\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^uses-static-component\\./),\n    );\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^uses-static-component-async\\./),\n    );\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^static-component\\./),\n    );\n\n    let output = await run(result.bundleGraph);\n    assert.deepEqual(await output.default(), [\n      'static component',\n      'static component',\n    ]);\n    subscription.unsubscribe();\n  });\n\n  it('should lazy compile properly when an assets needs to be re-visited in symbol propagation', async () => {\n    await fsFixture(overlayFS, __dirname)`\n      lazy-compile-import-symbols\n        index.js:\n          import { shared, async } from './main';\n          export default Promise.all([shared(), async()]);\n\n        main.js:\n          export function shared() {\n            return import('./shared');\n          }\n          export function async() {\n            return import('./async');\n          }\n\n        async.js:\n          // Trigger more deps so a full 'propagateSymbolsUp' pass is executed\n          import './a';\n          import './b';\n          import './c';\n          import { other } from './shared';\n          export default other;\n\n        shared.js:\n            export const main = 'main';\n            export const other = 'other';\n\n        a.js:\n          sideEffectNoop();\n        b.js:\n          sideEffectNoop();\n        c.js:\n          sideEffectNoop();\n        `;\n\n    const b = await bundler(\n      path.join(__dirname, 'lazy-compile-import-symbols/index.js'),\n      {\n        shouldBuildLazily: true,\n        mode: 'development',\n        shouldContentHash: false,\n        inputFS: overlayFS,\n      },\n    );\n\n    await removeDistDirectory();\n\n    const subscription = await b.watch();\n    let result = await getNextBuild(b);\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^index\\.js/),\n    );\n    result = await result.requestBundle(\n      findBundle(result.bundleGraph, /^async\\./),\n    );\n\n    let output = await run(result.bundleGraph);\n    assert.deepEqual(await output.default, [\n      {\n        main: 'main',\n        other: 'other',\n      },\n      {\n        default: 'other',\n      },\n    ]);\n    subscription.unsubscribe();\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/less.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundle,\n  distDir,\n  outputFS,\n  run,\n} from '@parcel/test-utils';\nimport {md} from '@parcel/diagnostic';\n\ndescribe('less', function () {\n  it('should support requiring less files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/less/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.less'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.index'));\n  });\n\n  it('should support less imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/less-import/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.less'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.a'));\n    assert(css.includes('.b'));\n    assert(css.includes('.c'));\n    assert(css.includes('.d'));\n  });\n\n  it('should support advanced less imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/less-advanced-import/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.less'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n\n    assert(css.includes('.a'));\n    assert(css.includes('.external-index'));\n    assert(css.includes('.external-a'));\n    assert(css.includes('.external-with-main'));\n    assert(css.includes('.explicit-external-a'));\n  });\n\n  it('should support requiring empty less files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/less-empty/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.less'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert.equal(css.trim(), '/*# sourceMappingURL=index.css.map */');\n  });\n\n  it('should support linking to assets with url() from less', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/less-url/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.less'],\n      },\n      {\n        type: 'woff2',\n        assets: ['test.woff2'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(/url\\(\"?test\\.[0-9a-f]+\\.woff2\"?\\)/.test(css));\n    assert(/url\\(\"?http:\\/\\/google.com\"?\\)/.test(css));\n    assert(css.includes('.index'));\n\n    assert(\n      await outputFS.exists(\n        path.join(distDir, css.match(/url\\(\"?(test\\.[0-9a-f]+\\.woff2)\"?\\)/)[1]),\n      ),\n    );\n  });\n\n  it('should support less url rewrites', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/less-url-rewrite/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.less'],\n      },\n      {\n        type: 'woff2',\n        assets: ['a.woff2'],\n      },\n      {\n        type: 'woff2',\n        assets: ['b.woff2'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.a'));\n    assert(css.includes('.b'));\n  });\n\n  it('should support css modules in less', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/less-postcss/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'index.module.less'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.module.less'],\n      },\n      {\n        assets: ['img.svg'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert(output().endsWith('_index'));\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(/\\.[_0-9a-zA-Z]+_index/.test(css));\n  });\n\n  it('should throw an exception when using webpack syntax', async function () {\n    await assert.rejects(\n      () =>\n        bundle(\n          path.join(\n            __dirname,\n            '/integration/less-webpack-import-error/index.js',\n          ),\n        ),\n      {\n        message: md`The @import path \"${'~library/style.less'}\" is using webpack specific syntax, which isn't supported by Parcel.\\n\\nTo @import files from ${'node_modules'}, use \"${'library/style.less'}\"`,\n      },\n    );\n  });\n\n  it('should support configuring less include paths', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/less-include-paths/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.less'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.a'));\n    assert(css.includes('.b'));\n  });\n\n  it('should ignore url() with IE behavior specifiers', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/less-url-behavior/index.less'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.less'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n\n    assert(css.includes('url(\"#default#VML\")'));\n  });\n\n  it('preserves quotes around data urls that require them', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/less-url-quotes/index.less'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.less'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(\n      css.includes(\n        // Note the literal space after \"xml\"\n        'background: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22%3F%3E%3Csvg%3E%3C%2Fsvg%3E\")',\n      ),\n    );\n  });\n\n  it('should support the less package exports condition', async function () {\n    await bundle(path.join(__dirname, '/integration/less-exports/index.less'));\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.a'));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/library-bundler.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  run,\n  runBundle,\n  overlayFS,\n  outputFS,\n  fsFixture,\n  assertBundles,\n} from '@parcel/test-utils';\nimport nullthrows from 'nullthrows';\n\ndescribe('library bundler', function () {\n  let count = 0;\n  let dir;\n  beforeEach(async () => {\n    dir = path.join(__dirname, 'libraries', '' + ++count);\n    await overlayFS.mkdirp(dir);\n  });\n\n  after(async () => {\n    await overlayFS.rimraf(path.join(__dirname, 'libraries'));\n  });\n\n  it('should support named imports', async function () {\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      .parcelrc:\n        {\n          \"extends\": \"@parcel/config-default\",\n          \"bundler\": \"@parcel/bundler-library\"\n        }\n\n      package.json:\n        {\n          \"main\": \"dist/main.js\",\n          \"module\": \"dist/module.js\",\n          \"engines\": { \"node\": \"*\" }\n        }\n\n      index.js:\n        export * from './foo';\n        export {bar} from './bar';\n\n      foo.js:\n        import {baz} from './baz';\n        export function foo() {\n          return 'foo' + baz();\n        }\n\n      bar.js:\n        import {baz} from './baz';\n        export function bar() {\n          return 'bar' + baz();\n        }\n\n      baz.js:\n        export function baz() {\n          return 'baz';\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let esm: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'module.js')),\n    );\n    assert.equal(esm.foo(), 'foobaz');\n    assert.equal(esm.bar(), 'barbaz');\n\n    let cjs: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'main.js')),\n    );\n    assert.equal(cjs.foo(), 'foobaz');\n    assert.equal(cjs.bar(), 'barbaz');\n\n    assertBundles(b, [\n      {\n        assets: ['index.js'],\n      },\n      {\n        assets: ['foo.js'],\n      },\n      {\n        assets: ['bar.js'],\n      },\n      {\n        assets: ['baz.js'],\n      },\n      {\n        assets: ['index.js'],\n      },\n      {\n        assets: ['foo.js'],\n      },\n      {\n        assets: ['bar.js'],\n      },\n      {\n        assets: ['baz.js'],\n      },\n    ]);\n\n    for (let bundle of b.getBundles()) {\n      let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n      assert(!contents.includes('parcelRequire'));\n      if (bundle.env.outputFormat === 'esmodule') {\n        assert(contents.includes('export {'));\n      } else if (bundle.env.outputFormat === 'commonjs') {\n        assert(contents.includes('module.exports'));\n      }\n    }\n  });\n\n  it('should merge multiple assets in the same file together', async function () {\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      .parcelrc:\n        {\n          \"extends\": \"@parcel/config-default\",\n          \"bundler\": \"@parcel/bundler-library\"\n        }\n\n      package.json:\n        {\n          \"module\": \"dist/module.js\"\n        }\n\n      index.js:\n        export {foo, bar} from './foo';\n\n      foo.js:\n        import {css} from './macro' with {type: 'macro'};\n        export function foo() {\n          return css('.a { color: red }');\n        }\n\n        export function bar() {\n          return css('.b { color: pink }');\n        }\n\n      macro.js:\n        export function css(content) {\n          this.addAsset({type: 'css', content});\n          return 'hi';\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['index.js'],\n      },\n      {\n        type: 'js',\n        assets: ['foo.js'],\n      },\n      {\n        type: 'css',\n        assets: ['foo.js', 'foo.js'],\n      },\n    ]);\n\n    for (let bundle of b.getBundles()) {\n      let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n      assert(!contents.includes('parcelRequire'));\n      if (bundle.type === 'css') {\n        assert(contents.includes('.a'));\n        assert(contents.includes('.b'));\n      } else {\n        assert(contents.includes('export {'));\n        if (bundle.name === 'module.js') {\n          // Should only include shallow bundle references.\n          assert(!contents.includes('.css'));\n        }\n      }\n    }\n  });\n\n  it('should work with CSS modules', async function () {\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      .parcelrc:\n        {\n          \"extends\": \"@parcel/config-default\",\n          \"bundler\": \"@parcel/bundler-library\"\n        }\n\n      package.json:\n        {\n          \"module\": \"dist/module.js\",\n          \"main\": \"dist/main.js\",\n          \"engines\": { \"node\": \"*\" }\n        }\n\n      index.js:\n        import foo from './foo.module.css';\n        export function test() {\n          return foo.bar;\n        }\n\n      foo.module.css:\n        .bar {\n          color: red;\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['index.js'],\n      },\n      {\n        type: 'js',\n        assets: ['foo.module.css'],\n      },\n      {\n        type: 'css',\n        assets: ['foo.module.css'],\n      },\n      {\n        assets: ['index.js'],\n      },\n      {\n        type: 'js',\n        assets: ['foo.module.css'],\n      },\n    ]);\n\n    for (let bundle of b.getBundles()) {\n      let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n      assert(!contents.includes('parcelRequire'));\n      if (bundle.type === 'css') {\n        assert(contents.includes('.Qe6WCq_bar'));\n      } else if (bundle.env.outputFormat === 'esmodule') {\n        assert(contents.includes('export {'));\n      } else if (bundle.env.outputFormat === 'commonjs') {\n        assert(contents.includes('module.exports'));\n      }\n    }\n\n    let esm: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'module.js')),\n    );\n    assert.equal(esm.test(), 'Qe6WCq_bar');\n\n    let cjs: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'main.js')),\n    );\n    assert.equal(cjs.test(), 'Qe6WCq_bar');\n  });\n\n  it('should support re-exporting external modules', async function () {\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      .parcelrc:\n        {\n          \"extends\": \"@parcel/config-default\",\n          \"bundler\": \"@parcel/bundler-library\"\n        }\n\n      package.json:\n        {\n          \"module\": \"dist/module.js\",\n          \"main\": \"dist/main.js\",\n          \"engines\": { \"node\": \"*\" },\n          \"targets\": {\n            \"module\": {\n              \"includeNodeModules\": false\n            },\n            \"main\": {\n              \"includeNodeModules\": false\n            }\n          },\n          \"dependencies\": {\n            \"bar\": \"*\"\n          }\n        }\n\n      index.js:\n        export {foo} from './foo.js';\n        export {bar} from 'bar';\n\n      foo.js:\n        export function foo() {\n          return 'foo';\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['index.js'],\n      },\n      {\n        type: 'js',\n        assets: ['foo.js'],\n      },\n      {\n        assets: ['index.js'],\n      },\n      {\n        type: 'js',\n        assets: ['foo.js'],\n      },\n    ]);\n\n    for (let bundle of b.getBundles()) {\n      let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n      assert(!contents.includes('parcelRequire'));\n      if (bundle.env.outputFormat === 'esmodule') {\n        assert(contents.includes('export {'));\n      } else if (bundle.env.outputFormat === 'commonjs') {\n        assert(contents.includes('module.exports'));\n      }\n    }\n\n    let esm: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'module.js')),\n      null,\n      undefined,\n      {\n        bar() {\n          return {bar: () => 2};\n        },\n      },\n    );\n    assert.equal(esm.foo(), 'foo');\n    assert.equal(esm.bar(), 2);\n\n    let cjs: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'main.js')),\n      null,\n      undefined,\n      {\n        bar() {\n          return {bar: () => 2};\n        },\n      },\n    );\n    assert.equal(cjs.foo(), 'foo');\n    assert.equal(cjs.bar(), 2);\n  });\n\n  it('should export CJS namespaces as default', async function () {\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      .parcelrc:\n        {\n          \"extends\": \"@parcel/config-default\",\n          \"bundler\": \"@parcel/bundler-library\"\n        }\n\n      package.json:\n        {\n          \"module\": \"dist/module.js\",\n          \"engines\": { \"node\": \"*\" }\n        }\n\n      index.js:\n        import ns from './foo.js';\n        export function test() {\n          return ns['foo-bar'];\n        }\n\n      foo.js:\n        exports['foo-bar'] = 'foo';\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['index.js'],\n      },\n      {\n        type: 'js',\n        assets: ['foo.js'],\n      },\n    ]);\n\n    let res = await run(b);\n    assert.equal(res.test(), 'foo');\n\n    // foo.js should only export default, to avoid non-identifier symbols.\n    let foo: any = await runBundle(b, b.getBundles()[1]);\n    assert.deepEqual(Object.keys(foo), ['default']);\n    assert.deepEqual(foo.default, {'foo-bar': 'foo'});\n  });\n\n  it('should allow bundles to be reused between targets in the same package', async function () {\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      .parcelrc:\n        {\n          \"extends\": \"@parcel/config-default\",\n          \"bundler\": \"@parcel/bundler-library\"\n        }\n\n      package.json:\n        {\n          \"engines\": { \"node\": \"*\" },\n          \"targets\": {\n            \"a\": {\n              \"source\": \"src/a.js\",\n              \"distDir\": \"a\",\n              \"outputFormat\": \"esmodule\",\n              \"isLibrary\": true\n            },\n            \"b\": {\n              \"source\": \"src/b.js\",\n              \"distDir\": \"b\",\n              \"outputFormat\": \"esmodule\",\n              \"isLibrary\": true\n            }\n          }\n        }\n\n      src/a.js:\n        import shared from './shared';\n        export default shared + '-a';\n\n      src/b.js:\n        import shared from './shared';\n        export default shared + '-b';\n\n      src/shared.js:\n        export default 'shared';\n    `;\n\n    let b = await bundle(dir, {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n      {\n        assets: ['shared.js'],\n      },\n    ]);\n\n    let res: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'a.js')),\n    );\n\n    assert.equal(res.default, 'shared-a');\n\n    let res2: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'b.js')),\n    );\n\n    assert.equal(res2.default, 'shared-b');\n  });\n\n  it('should not share bundles with circular references in different targets', async function () {\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      .parcelrc:\n        {\n          \"extends\": \"@parcel/config-default\",\n          \"bundler\": \"@parcel/bundler-library\"\n        }\n\n      packages/a/package.json:\n        {\n          \"engines\": { \"node\": \"*\" },\n          \"source\": \"src/a.js\",\n          \"module\": \"dist/a.js\",\n          \"targets\": {\n            \"module\": {\n              \"includeNodeModules\": true\n            }\n          }\n        }\n\n      packages/a/src/a.js:\n        import shared from '/shared.module.css';\n        export default shared.foo + '-a';\n\n      packages/b/package.json:\n        {\n          \"engines\": { \"node\": \"*\" },\n          \"source\": \"src/b.js\",\n          \"module\": \"dist/b.js\",\n          \"targets\": {\n            \"module\": {\n              \"includeNodeModules\": true\n            }\n          }\n        }\n\n      packages/b/src/b.js:\n        import shared from '/shared.module.css';\n        export default shared.foo + '-b';\n\n      shared.module.css:\n        .foo {\n          composes: bar;\n          color: white\n        }\n\n        .bar { background: pink }\n    `;\n\n    let b = await bundle(dir + '/packages/*', {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n      {\n        type: 'js',\n        assets: ['shared.module.css'],\n      },\n      {\n        type: 'js',\n        assets: ['shared.module.css'],\n      },\n      {\n        type: 'css',\n        assets: ['shared.module.css'],\n      },\n      {\n        type: 'css',\n        assets: ['shared.module.css'],\n      },\n    ]);\n\n    for (let bundle of b.getBundles()) {\n      let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n      assert(!contents.includes('../'));\n    }\n  });\n\n  it('should support export default in CJS', async () => {\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      .parcelrc:\n        {\n          \"extends\": \"@parcel/config-default\",\n          \"bundler\": \"@parcel/bundler-library\"\n        }\n\n      package.json:\n        {\n          \"module\": \"dist/module.js\",\n          \"main\": \"dist/main.js\",\n          \"engines\": { \"node\": \"*\" }\n        }\n\n      index.js:\n        import foo from './foo';\n        export function test() {\n          return 'test:' + foo();\n        }\n\n      foo.js:\n        export default function foo() {\n          return 'foo';\n        }\n    `;\n\n    let b = await bundle(dir + '/index.js', {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let esm: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'module.js')),\n    );\n    assert.equal(esm.test(), 'test:foo');\n\n    let cjs: any = await runBundle(\n      b,\n      nullthrows(b.getBundles().find(b => b.name === 'main.js')),\n    );\n    assert.equal(cjs.test(), 'test:foo');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/macros.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport invariant from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  bundler,\n  run,\n  overlayFS,\n  fsFixture,\n  getNextBuild,\n} from '@parcel/test-utils';\n\ndescribe('macros', function () {\n  let count = 0;\n  let dir;\n  beforeEach(async () => {\n    dir = path.join(__dirname, 'macros', '' + ++count);\n    await overlayFS.mkdirp(dir);\n  });\n\n  after(async () => {\n    await overlayFS.rimraf(path.join(__dirname, 'macros'));\n  });\n\n  it('should support named imports', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { hash } from \"./macro\" with { type: \"macro\" };\n        output = hash('hi');\n\n      macro.js:\n        import {hashString} from '@parcel/rust';\n        export function hash(s) {\n          return hashString(s);\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=\"2a2300bbd7ea6e9a\"'));\n  });\n\n  it('should support source location', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { hash } from \"./macro\" with { type: \"macro\" };\n        output = hash();\n\n      macro.js:\n        export function hash(this: MacroContext) {\n          return this.loc;\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let locObj = await run(b);\n\n    assert(locObj.filePath, 'filePath should exist');\n    assert.strictEqual(locObj.line, 2);\n    assert.strictEqual(locObj.col, 9);\n  });\n\n  it('should support renamed imports', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { hashString as foo } from \"@parcel/rust\" with { type: \"macro\" };\n        output = foo('hi');\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=\"2a2300bbd7ea6e9a\"'));\n  });\n\n  it('should support default imports', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import test from \"./macro.js\" with { type: \"macro\" };\n        output = test('hi');\n\n      macro.js:\n        import {hashString} from '@parcel/rust';\n        export default function test(s) {\n          return hashString(s);\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=\"2a2300bbd7ea6e9a\"'));\n  });\n\n  it('should support default interop with CommonJS modules', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import test from \"./macro.js\" with { type: \"macro\" };\n        output = test('hi');\n\n      macro.js:\n        import {hashString} from '@parcel/rust';\n        module.exports = function(s) {\n          return hashString(s);\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=\"2a2300bbd7ea6e9a\"'));\n  });\n\n  it('should support namespace imports', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import * as ns from \"@parcel/rust\" with { type: \"macro\" };\n        output = ns.hashString('hi');\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=\"2a2300bbd7ea6e9a\"'));\n  });\n\n  it('should support various JS value types', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test(undefined, null, true, false, 1, 0, -2, 'hi', /yo/i, [1, {test: 8}]);\n\n      macro.js:\n        import {inspect} from 'util';\n        export function test(...args) {\n          return inspect(args);\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await run(b);\n    assert.equal(\n      res,\n      require('util').inspect([\n        undefined,\n        null,\n        true,\n        false,\n        1,\n        0,\n        -2,\n        'hi',\n        /yo/i,\n        [1, {test: 8}],\n      ]),\n    );\n  });\n\n  it('should support returning various JS value types', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test();\n\n      macro.js:\n        export function test() {\n          return [undefined, null, true, false, 1, 0, -2, 'hi', /yo/i, [1, {test: 8}]];\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await run(b);\n    assert.deepEqual(res, [\n      undefined,\n      null,\n      true,\n      false,\n      1,\n      0,\n      -2,\n      'hi',\n      /yo/i,\n      [1, {test: 8}],\n    ]);\n  });\n\n  it('should support evaluating expressions', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test(1 + 2, 'foo ' + 'bar', 3 + 'em', 'test'.length, 'test'['length'], 'test'[1], !true, [1, ...[2, 3]], {x: 2, ...{y: 3}}, true ? 1 : 0, typeof false, null ?? 2);\n\n      macro.js:\n        export function test(...args) {\n          return args;\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await run(b);\n    assert.deepEqual(res, [\n      3,\n      'foo bar',\n      '3em',\n      4,\n      4,\n      'e',\n      false,\n      [1, 2, 3],\n      {x: 2, y: 3},\n      1,\n      'boolean',\n      2,\n    ]);\n  });\n\n  it('should dead code eliminate falsy branches', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n\n        if (test()) {\n          console.log('bad');\n        } else {\n          console.log('good');\n        }\n\n      macro.js:\n        export function test() {\n          return false;\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('console.log(\"good\")'));\n    assert(!res.includes('console.log(\"bad\")'));\n  });\n\n  it('should support async macros', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test();\n\n      macro.js:\n        export function test() {\n          return Promise.resolve(2);\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=2'));\n  });\n\n  it('should ignore macros in node_modules', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import test from \"foo\";\n        output = test;\n\n      node_modules/foo/index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        export default test();\n\n      node_modules/foo/macro.js:\n        export function test() {\n          return 2;\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('function test'));\n  });\n\n  it('should throw a diagnostic when an argument cannot be converted', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test(1, foo);\n\n      macro.js:\n        export function test() {\n          return 2;\n        }\n    `;\n\n    try {\n      await bundle(path.join(dir, '/index.js'), {\n        inputFS: overlayFS,\n        mode: 'production',\n      });\n    } catch (err) {\n      assert.deepEqual(err.diagnostics, [\n        {\n          message: 'Could not statically evaluate macro argument',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(dir, 'index.js'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 2,\n                    column: 18,\n                  },\n                  end: {\n                    line: 2,\n                    column: 20,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: null,\n        },\n      ]);\n    }\n  });\n\n  it('should throw a diagnostic when a macro errors', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test(1);\n\n      macro.js:\n        exports.test = function test() {\n          throw new Error('test');\n        }\n    `;\n\n    try {\n      await bundle(path.join(dir, '/index.js'), {\n        inputFS: overlayFS,\n        mode: 'production',\n      });\n    } catch (err) {\n      assert(\n        err.diagnostics[0].message.startsWith('Error evaluating macro: test'),\n      );\n      assert.deepEqual(err.diagnostics[0].codeFrames, [\n        {\n          filePath: path.join(dir, 'index.js'),\n          codeHighlights: [\n            {\n              message: undefined,\n              start: {\n                line: 2,\n                column: 10,\n              },\n              end: {\n                line: 2,\n                column: 16,\n              },\n            },\n          ],\n        },\n      ]);\n    }\n  });\n\n  it('should throw a diagnostic when a macro cannot be resolved', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test(1, 2);\n    `;\n\n    try {\n      await bundle(path.join(dir, '/index.js'), {\n        inputFS: overlayFS,\n        mode: 'production',\n      });\n    } catch (err) {\n      assert.deepEqual(\n        // \\ gets escaped by Node -> Rust -> Node in Windows, so we normalize it for the test\n        err.diagnostics.map(d => ({\n          ...d,\n          message: d.message.replace(/\\\\\\\\/g, '\\\\'),\n        })),\n        [\n          {\n            message: `Error loading macro: Could not resolve module \"./macro.js\" from \"${path.join(\n              dir,\n              'index.js',\n            )}\"`,\n            origin: '@parcel/transformer-js',\n            codeFrames: [\n              {\n                filePath: path.join(dir, 'index.js'),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 1,\n                    },\n                    end: {\n                      line: 1,\n                      column: 57,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: null,\n          },\n        ],\n      );\n    }\n  });\n\n  it('should support returning functions', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test(1, 2)(3);\n\n      macro.js:\n        export function test(a, b) {\n          return new Function('c', \\`return \\${a} + \\${b} + c\\`);\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=6'));\n  });\n\n  it('should support macros written in typescript', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.ts\" with { type: \"macro\" };\n        output = test(1, 2);\n\n      macro.ts:\n        export function test(a: number, b: number) {\n          return a + b;\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=3'));\n  });\n\n  it('should support macros written in typescript without extension', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro\" with { type: \"macro\" };\n        output = test(1, 2);\n\n      macro.ts:\n        export function test(a: number, b: number) {\n          return a + b;\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=3'));\n  });\n\n  it('should allow emitting additional assets', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { css } from \"./macro.ts\" with { type: \"macro\" };\n        output = css('background: red') + css('color: pink');\n\n      macro.ts:\n        export function css(v) {\n          this.addAsset({\n            type: 'css',\n            content: '.foo {\\\\n' + v + '\\\\n}'\n          });\n          return 'foo';\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=\"foofoo\"'));\n\n    res = await overlayFS.readFile(b.getBundles()[1].filePath, 'utf8');\n    assert(res.includes('.foo{color:pink;background:red}'));\n  });\n\n  it('should invalidate the cache when changing a macro', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test();\n\n      macro.js:\n        export function test() {\n          return 2;\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n      shouldDisableCache: false,\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=2'));\n\n    await fsFixture(overlayFS, dir)`\n      macro.js:\n        export function test() {\n          return 3;\n        }\n    `;\n\n    b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n      shouldDisableCache: false,\n    });\n\n    res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes('output=3'));\n  });\n\n  it('should invalidate the cache on build', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test('test.txt');\n\n      macro.js:\n        export function test() {\n          this.invalidateOnBuild();\n          return Date.now();\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n      shouldDisableCache: false,\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    let match = res.match(/output=(.*);/);\n    assert(match);\n\n    b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n      shouldDisableCache: false,\n    });\n\n    res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    let match2 = res.match(/output=(.*);/);\n    assert(match2);\n    assert.notEqual(match[1], match2[1]);\n  });\n\n  it('should only error once if a macro errors during loading', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.js\" with { type: \"macro\" };\n        output = test(1, 2);\n        output2 = test(1, 3);\n\n      macro.js:\n        export function test() {\n          return Date.now(\n        }\n    `;\n\n    try {\n      await bundle(path.join(dir, '/index.js'), {\n        inputFS: overlayFS,\n        mode: 'production',\n      });\n    } catch (err) {\n      assert.equal(err.diagnostics.length, 1);\n    }\n  });\n\n  it('should rebuild in watch mode after fixing an error', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { test } from \"./macro.ts\" with { type: \"macro\" };\n        output = test('test.txt');\n\n      macro.ts:\n        export function test() {\n          return Date.now(\n        }\n    `;\n\n    let b = await bundler(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n      shouldDisableCache: false,\n    });\n\n    let subscription;\n    try {\n      subscription = await b.watch();\n      let buildEvent = await getNextBuild(b);\n      assert.equal(buildEvent.type, 'buildFailure');\n\n      await fsFixture(overlayFS, dir)`\n        macro.ts:\n          export function test() {\n            return Date.now();\n          }\n      `;\n\n      buildEvent = await getNextBuild(b);\n      assert.equal(buildEvent.type, 'buildSuccess');\n      invariant(buildEvent.type === 'buildSuccess'); // flow\n\n      let res = await overlayFS.readFile(\n        buildEvent.bundleGraph.getBundles()[0].filePath,\n        'utf8',\n      );\n      let match = res.match(/output=(\\d+)/);\n      assert(match);\n    } finally {\n      await subscription?.unsubscribe();\n    }\n  });\n\n  it('should support evaluating constants', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { hashString } from \"@parcel/rust\" with { type: \"macro\" };\n        import { test, test2 } from './macro' with { type: \"macro\" };\n        const hi = \"hi\";\n        const ref = hi;\n        const arr = [hi];\n        const obj = {a: {b: hi}};\n        const [a, [b], ...c] = [hi, [hi], 2, 3, hi];\n        const [x, y = hi] = [1];\n        const {hi: d, e, ...f} = {hi, e: hi, x: 2, y: hi};\n        const res = test();\n        output1 = hashString(hi);\n        output2 = hashString(ref);\n        output3 = hashString(arr[0]);\n        output4 = hashString(obj.a.b);\n        output5 = hashString(a);\n        output6 = hashString(b);\n        output7 = hashString(c[2]);\n        output8 = hashString(y);\n        output9 = hashString(d);\n        output10 = hashString(e);\n        output11 = hashString(f.y);\n        output12 = hashString(f?.y);\n        output13 = hashString(res);\n        output14 = test2(obj)();\n\n      macro.js:\n        import { hashString } from \"@parcel/rust\";\n        export function test() {\n          return \"hi\";\n        }\n\n        export function test2(obj) {\n          return new Function('return \"' + hashString(obj.a.b) + '\"');\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let res = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    for (let i = 1; i <= 14; i++) {\n      assert(res.includes(`output${i}=\"2a2300bbd7ea6e9a\"`));\n    }\n  });\n\n  it('should throw a diagnostic when a constant is mutated', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { hashString } from \"@parcel/rust\" with { type: \"macro\" };\n        const object = {foo: 'bar'};\n        object.foo = 'test';\n        output = hashString(object.foo);\n\n        const arr = ['foo'];\n        arr[0] = 'bar';\n        output = hashString(arr[0]);\n    `;\n\n    try {\n      await bundle(path.join(dir, '/index.js'), {\n        inputFS: overlayFS,\n        mode: 'production',\n      });\n    } catch (err) {\n      assert.deepEqual(err.diagnostics, [\n        {\n          message: 'Could not statically evaluate macro argument',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(dir, 'index.js'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 3,\n                    column: 1,\n                  },\n                  end: {\n                    line: 3,\n                    column: 19,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: null,\n        },\n        {\n          message: 'Could not statically evaluate macro argument',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(dir, 'index.js'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 7,\n                    column: 1,\n                  },\n                  end: {\n                    line: 7,\n                    column: 14,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: null,\n        },\n      ]);\n    }\n  });\n\n  it('should throw a diagnostic when a constant object is passed to a function', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import { hashString } from \"@parcel/rust\" with { type: \"macro\" };\n        const bar = 'bar';\n        const object = {foo: bar};\n        doSomething(bar); // ok (string)\n        doSomething(object.foo); // ok (evaluates to a string)\n        doSomething(object); // error (object could be mutated)\n        output = hashString(object.foo);\n\n        const object2 = {foo: bar, obj: {}};\n        doSomething(object2.obj); // error (object could be mutated)\n        output2 = hashString(object2);\n\n        const arr = ['foo'];\n        doSomething(arr);\n        output3 = hashString(arr[0]);\n\n        const object3 = {foo: bar};\n        doSomething(object3[unknown]);\n        output4 = hashString(object3);\n    `;\n\n    try {\n      await bundle(path.join(dir, '/index.js'), {\n        inputFS: overlayFS,\n        mode: 'production',\n      });\n    } catch (err) {\n      assert.deepEqual(err.diagnostics, [\n        {\n          message: 'Could not statically evaluate macro argument',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(dir, 'index.js'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 6,\n                    column: 13,\n                  },\n                  end: {\n                    line: 6,\n                    column: 18,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: null,\n        },\n        {\n          message: 'Could not statically evaluate macro argument',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(dir, 'index.js'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 10,\n                    column: 13,\n                  },\n                  end: {\n                    line: 10,\n                    column: 19,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: null,\n        },\n        {\n          message: 'Could not statically evaluate macro argument',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(dir, 'index.js'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 14,\n                    column: 13,\n                  },\n                  end: {\n                    line: 14,\n                    column: 15,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: null,\n        },\n        {\n          message: 'Could not statically evaluate macro argument',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(dir, 'index.js'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 18,\n                    column: 13,\n                  },\n                  end: {\n                    line: 18,\n                    column: 19,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: null,\n        },\n      ]);\n    }\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/markdown.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {assertBundleTree, bundle, outputFS} from '@parcel/test-utils';\n\ndescribe.skip('markdown', function () {\n  it('should support bundling Markdown', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/markdown/index.md'),\n    );\n\n    await assertBundleTree(b, {\n      name: 'index.html',\n      assets: ['index.md'],\n      childBundles: [\n        {\n          type: 'png',\n          assets: ['100x100.png'],\n          childBundles: [],\n        },\n      ],\n    });\n\n    let files = await outputFS.readdir(path.join(__dirname, '/dist'));\n    let html = await outputFS.readFile(\n      path.join(__dirname, '/dist/index.html'),\n    );\n    for (let file of files) {\n      let ext = file.match(/\\.([0-9a-z]+)(?:[?#]|$)/i)[0];\n      if (file !== 'index.html' && ext !== '.map') {\n        assert(html.includes(file));\n      }\n    }\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/mdx.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  run,\n  overlayFS,\n  fsFixture,\n  assertBundles,\n} from '@parcel/test-utils';\nimport React from 'react';\nimport ReactDOM from 'react-dom/server';\n\ndescribe('mdx', function () {\n  let count = 0;\n  let dir;\n  beforeEach(async () => {\n    dir = path.join(__dirname, 'mdx', '' + ++count);\n    await overlayFS.mkdirp(dir);\n  });\n\n  after(async () => {\n    await overlayFS.rimraf(path.join(__dirname, 'mdx'));\n  });\n\n  it('should support bundling MDX', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/mdx/index.mdx'));\n\n    let output = await run(b);\n    assert.equal(typeof output.default, 'function');\n  });\n\n  it('should support bundling MDX with React 17', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/mdx-react-17/index.mdx'),\n    );\n\n    let output = await run(b);\n    assert.equal(typeof output.default, 'function');\n  });\n\n  it('should expose static exports on asset.meta', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.mdx:\n        export const navTitle = 'Hello';\n\n        # Testing\n\n        foo bar\n    `;\n\n    let b = await bundle(path.join(dir, 'index.mdx'), {inputFS: overlayFS});\n    let asset = b.getBundles()[0].getMainEntry();\n\n    assert.deepEqual(asset.meta.ssgMeta.exports, {\n      navTitle: 'Hello',\n    });\n  });\n\n  it('should expose table of contents on asset.meta', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.mdx:\n        # Testing\n\n        foo bar\n\n        ## Subtitle\n\n        another paragraph\n\n        ### Sub subtitle\n\n        yo\n\n        ## Another subtitle\n\n        yay\n    `;\n\n    let b = await bundle(path.join(dir, 'index.mdx'), {inputFS: overlayFS});\n    let asset = b.getBundles()[0].getMainEntry();\n\n    assert.deepEqual(asset.meta.ssgMeta.tableOfContents, [\n      {\n        level: 1,\n        title: 'Testing',\n        children: [\n          {\n            level: 2,\n            title: 'Subtitle',\n            children: [\n              {\n                level: 3,\n                title: 'Sub subtitle',\n                children: [],\n              },\n            ],\n          },\n          {\n            level: 2,\n            title: 'Another subtitle',\n            children: [],\n          },\n        ],\n      },\n    ]);\n  });\n\n  it('should support dependencies', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.mdx:\n        Testing [urls](another.mdx). [optional](optional.html)\n\n        <audio src=\"some.mp3\" />\n\n      another.mdx:\n        Another mdx file with an image.\n\n        ![alt](img.png)\n\n      img.png:\n\n      some.mp3:\n    `;\n\n    let b = await bundle(path.join(dir, 'index.mdx'), {inputFS: overlayFS});\n    assertBundles(\n      b,\n      [\n        {\n          name: 'index.js',\n          assets: ['index.mdx'],\n        },\n        {\n          name: 'another.js',\n          assets: ['another.mdx'],\n        },\n        {\n          assets: ['img.png'],\n        },\n        {\n          assets: ['some.mp3'],\n        },\n      ],\n      {skipNodeModules: true},\n    );\n\n    await run(b);\n  });\n\n  it('should support code block props', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.mdx:\n        \\`\\`\\`tsx boolean string=\"hi\" value={2}\n        console.log(\"hi\");\n        \\`\\`\\`\n    `;\n\n    let b = await bundle(path.join(dir, 'index.mdx'), {inputFS: overlayFS});\n    let output = await run(b);\n    let codeBlockProps;\n    function CodeBlock(v) {\n      codeBlockProps = v;\n      return <pre>{v.children}</pre>;\n    }\n    let res = ReactDOM.renderToStaticMarkup(\n      React.createElement(output.default, {components: {CodeBlock}}),\n    );\n    assert.equal(res, '<pre>console.log(&quot;hi&quot;);</pre>');\n    assert.deepEqual(codeBlockProps, {\n      boolean: true,\n      string: 'hi',\n      value: 2,\n      lang: 'tsx',\n      children: 'console.log(\"hi\");',\n    });\n  });\n\n  it('should support rendering code blocks', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.mdx:\n        \\`\\`\\`tsx render\n        <div>Hello</div>\n        \\`\\`\\`\n      package.json:\n        {\"dependencies\": {\"react\": \"^19\"}}\n    `;\n\n    let b = await bundle(path.join(dir, 'index.mdx'), {inputFS: overlayFS});\n    let output = await run(b);\n    let res = ReactDOM.renderToStaticMarkup(\n      React.createElement(output.default),\n    );\n    assert.equal(\n      res,\n      '<pre><code class=\"language-tsx\">&lt;div&gt;Hello&lt;/div&gt;</code></pre><div>Hello</div>',\n    );\n  });\n\n  it('should support rendering CSS', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.mdx:\n        \\`\\`\\`css render\n        .foo { color: red }\n        \\`\\`\\`\n    `;\n\n    let b = await bundle(path.join(dir, 'index.mdx'), {inputFS: overlayFS});\n    assertBundles(\n      b,\n      [\n        {\n          name: 'index.js',\n          assets: ['index.mdx', 'mdx-components.jsx'],\n        },\n        {\n          name: 'index.css',\n          assets: ['index.mdx'],\n        },\n      ],\n      {skipNodeModules: true},\n    );\n\n    let output = await run(b);\n    let res = ReactDOM.renderToStaticMarkup(\n      React.createElement(output.default),\n    );\n    assert.equal(\n      res,\n      '<pre><code class=\"language-css\">.foo { color: red }</code></pre>',\n    );\n\n    let css = await overlayFS.readFile(b.getBundles()[1].filePath, 'utf8');\n    assert(css.includes('color: red'));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/metrics-reporter.js",
    "content": "// @flow\n\nimport assert from 'assert';\nimport path from 'path';\nimport {bundler, outputFS} from '@parcel/test-utils';\n\nconst config = path.join(\n  __dirname,\n  './integration/custom-configs/.parcelrc-build-metrics',\n);\n\ndescribe('Build Metrics Reporter', () => {\n  it('Should dump bundle metrics to parcel-metrics.json', async () => {\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      config,\n      logLevel: 'info',\n    });\n    await b.run();\n\n    let projectRoot: string = b._getResolvedParcelOptions().projectRoot;\n    let dirContent = await outputFS.readdir(projectRoot);\n\n    assert(\n      dirContent.includes('parcel-metrics.json'),\n      'Should create a parcel-metrics.json file',\n    );\n\n    let metrics = JSON.parse(\n      await outputFS.readFile(\n        path.join(projectRoot, 'parcel-metrics.json'),\n        'utf8',\n      ),\n    );\n\n    assert(!!metrics.buildTime, 'Should contain buildTime');\n    assert(metrics.bundles.length > 0, 'Should contain bundle(s)');\n    for (let bundle of metrics.bundles) {\n      assert(bundle.filePath, 'Each bundle should have a filePath');\n      assert(bundle.size, 'Each bundle should have a size');\n      assert(bundle.time, 'Each bundle should have a time');\n      assert(\n        Array.isArray(bundle.largestAssets),\n        'Each bundle should contain a list of largest assets',\n      );\n      assert(\n        bundle.totalAssets,\n        'Each bundle should contain the amount of assets',\n      );\n    }\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/mochareporters.json",
    "content": "{\n    \"reporterEnabled\": \"spec, mocha-junit-reporter\",\n    \"mochaJunitReporterReporterOptions\": {\n        \"mochaFile\": \"junit-testresults.xml\"\n    }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/monorepos.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  bundler,\n  assertBundles,\n  inputFS,\n  outputFS,\n  fsFixture,\n  ncp,\n  run,\n  overlayFS,\n  getNextBuild,\n  runBundle,\n} from '@parcel/test-utils';\n\nconst distDir = path.join(__dirname, '/integration/monorepo/dist/default');\n\ndescribe('monorepos', function () {\n  beforeEach(async () => {\n    await outputFS.rimraf(path.join(__dirname, '/monorepo'));\n  });\n\n  let subscription;\n  afterEach(async () => {\n    if (subscription) {\n      await subscription.unsubscribe();\n      subscription = null;\n    }\n  });\n\n  it('should compile packages with target source overrides', async function () {\n    let fixture = path.join(__dirname, '/integration/target-source');\n    let oldcwd = inputFS.cwd();\n    inputFS.chdir(fixture);\n\n    try {\n      let b = await bundle(\n        [\n          path.join(fixture, 'packages/package-a'),\n          path.join(fixture, 'packages/package-b'),\n        ],\n        {\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n            distDir,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['foo.js', 'index.js'],\n        },\n        {\n          name: 'indexAlternate.js',\n          assets: ['bar.js', 'indexAlternate.js'],\n        },\n        {\n          name: 'index.js',\n          assets: ['foo.js', 'index.js'],\n        },\n        {\n          name: 'indexAlternate.js',\n          assets: ['bar.js', 'indexAlternate.js'],\n        },\n        {\n          name: 'indexAlternate2.js',\n          assets: ['foo.js', 'indexAlternate2.js'],\n        },\n      ]);\n\n      let contents = await outputFS.readFile(\n        path.join(distDir, '/package-a/src/index.js'),\n        'utf8',\n      );\n      assert(contents.includes('hello foo'));\n\n      contents = await outputFS.readFile(\n        path.join(distDir, '/package-a/src/indexAlternate.js'),\n        'utf8',\n      );\n      assert(contents.includes('hello bar'));\n\n      contents = await outputFS.readFile(\n        path.join(distDir, '/package-a/src/indexAlternate2.js'),\n        'utf8',\n      );\n      assert(contents.includes('hello foo'));\n    } finally {\n      inputFS.chdir(oldcwd);\n    }\n  });\n\n  it('should compile packages with target source overrides and --target option', async function () {\n    let fixture = path.join(__dirname, '/integration/target-source');\n    let oldcwd = inputFS.cwd();\n    inputFS.chdir(fixture);\n\n    try {\n      let b = await bundle(\n        [\n          path.join(fixture, 'packages/package-a'),\n          path.join(fixture, 'packages/package-b'),\n        ],\n        {\n          targets: ['alternate'],\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n            distDir,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          name: 'indexAlternate.js',\n          assets: ['bar.js', 'indexAlternate.js'],\n        },\n        {\n          name: 'indexAlternate.js',\n          assets: ['bar.js', 'indexAlternate.js'],\n        },\n        {\n          name: 'indexAlternate2.js',\n          assets: ['foo.js', 'indexAlternate2.js'],\n        },\n      ]);\n\n      let contents = await outputFS.readFile(\n        path.join(distDir, '/package-a/src/indexAlternate.js'),\n        'utf8',\n      );\n      assert(contents.includes('hello bar'));\n\n      contents = await outputFS.readFile(\n        path.join(distDir, '/package-a/src/indexAlternate2.js'),\n        'utf8',\n      );\n      assert(contents.includes('hello foo'));\n    } finally {\n      inputFS.chdir(oldcwd);\n    }\n  });\n\n  it('should compile packages with target source overrides and --target option in serve mode', async function () {\n    let fixture = path.join(__dirname, '/integration/target-source');\n    let oldcwd = inputFS.cwd();\n    inputFS.chdir(fixture);\n\n    try {\n      let b = await bundle(path.join(fixture, 'packages/package-b'), {\n        targets: ['alternate'],\n        serveOptions: {port: 1234},\n      });\n\n      assertBundles(b, [\n        {\n          name: 'indexAlternate.js',\n          assets: ['bar.js', 'esmodule-helpers.js', 'indexAlternate.js'],\n        },\n      ]);\n    } finally {\n      inputFS.chdir(oldcwd);\n    }\n  });\n\n  it('should build using root targets with entry files inside packages and cwd at project root', async function () {\n    let fixture = path.join(__dirname, '/integration/monorepo');\n    let oldcwd = inputFS.cwd();\n    inputFS.chdir(fixture);\n\n    try {\n      let b = await bundle(\n        [\n          path.join(fixture, 'packages/pkg-a/src/index.js'),\n          path.join(fixture, 'packages/pkg-b/src/index.js'),\n        ],\n        {\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n            distDir,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['index.js'],\n        },\n        {\n          name: 'index.js',\n          assets: ['index.js', 'index.module.css'],\n        },\n        {\n          name: 'index.css',\n          assets: ['index.module.css'],\n        },\n      ]);\n\n      let contents = await outputFS.readFile(\n        path.join(distDir, '/pkg-a/src/index.js'),\n        'utf8',\n      );\n      assert(contents.includes('$parcel$export(module.exports, \"default\"'));\n\n      contents = await outputFS.readFile(\n        path.join(distDir, '/pkg-b/src/index.js'),\n        'utf8',\n      );\n      assert(contents.includes('require(\"./index.css\")'));\n\n      contents = await outputFS.readFile(\n        path.join(distDir, '/pkg-b/src/index.css'),\n        'utf8',\n      );\n      assert(/\\.[_0-9a-zA-Z]+_foo/.test(contents));\n    } finally {\n      inputFS.chdir(oldcwd);\n    }\n  });\n\n  it('should build multiple packages in a monorepo at once, pointing at directories with \"source\" field in package.json', async function () {\n    let b = await bundle(\n      [\n        path.join(__dirname, '/integration/monorepo/packages/pkg-a'),\n        path.join(__dirname, '/integration/monorepo/packages/pkg-b'),\n      ],\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'pkg-a.cjs.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'pkg-a.module.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'pkg-b.cjs.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-b.module.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-b.cjs.css',\n        assets: ['index.module.css'],\n      },\n      {\n        name: 'pkg-b.module.css',\n        assets: ['index.module.css'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-a/dist/pkg-a.cjs.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('$parcel$export(module.exports, \"default\"'));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-a/dist/pkg-a.module.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('export {'));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-b/dist/pkg-b.cjs.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('require(\"./pkg-b.cjs.css\")'));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-b/dist/pkg-b.cjs.css',\n      ),\n      'utf8',\n    );\n    assert(/\\.[_0-9a-zA-Z]+_foo/.test(contents));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-b/dist/pkg-b.module.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('import \"./pkg-b.module.css\"'));\n  });\n\n  it('should build using root targets with a glob pointing at files inside packages and cwd at project root', async function () {\n    let fixture = path.join(__dirname, '/integration/monorepo');\n    let oldcwd = inputFS.cwd();\n    inputFS.chdir(fixture);\n\n    try {\n      let b = await bundle(path.join(fixture, 'packages/*/src/index.js'), {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          distDir,\n        },\n      });\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['index.js'],\n        },\n        {\n          name: 'index.js',\n          assets: ['index.js', 'index.module.css'],\n        },\n        {\n          name: 'index.css',\n          assets: ['index.module.css'],\n        },\n      ]);\n\n      let contents = await outputFS.readFile(\n        path.join(distDir, '/pkg-a/src/index.js'),\n        'utf8',\n      );\n      assert(contents.includes('$parcel$export(module.exports, \"default\"'));\n\n      contents = await outputFS.readFile(\n        path.join(distDir, '/pkg-b/src/index.js'),\n        'utf8',\n      );\n      assert(contents.includes('require(\"./index.css\")'));\n\n      contents = await outputFS.readFile(\n        path.join(distDir, '/pkg-b/src/index.css'),\n        'utf8',\n      );\n      assert(/\\.[_0-9a-zA-Z]+_foo/.test(contents));\n    } finally {\n      inputFS.chdir(oldcwd);\n    }\n  });\n\n  it('should build using root targets with a glob pointing at files inside packages and cwd outside project root', async function () {\n    let oldcwd = inputFS.cwd();\n    inputFS.chdir(path.join(__dirname, '/integration'));\n\n    try {\n      let b = await bundle(\n        path.join(__dirname, '/integration/monorepo/packages/*/src/index.js'),\n        {\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n            distDir,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['index.js'],\n        },\n        {\n          name: 'index.js',\n          assets: ['index.js', 'index.module.css'],\n        },\n        {\n          name: 'index.css',\n          assets: ['index.module.css'],\n        },\n      ]);\n\n      let contents = await outputFS.readFile(\n        path.join(distDir, '/pkg-a/src/index.js'),\n        'utf8',\n      );\n      assert(contents.includes('$parcel$export(module.exports, \"default\"'));\n\n      contents = await outputFS.readFile(\n        path.join(distDir, '/pkg-b/src/index.js'),\n        'utf8',\n      );\n      assert(contents.includes('require(\"./index.css\")'));\n\n      contents = await outputFS.readFile(\n        path.join(distDir, '/pkg-b/src/index.css'),\n        'utf8',\n      );\n      assert(/\\.[_0-9a-zA-Z]+_foo/.test(contents));\n    } finally {\n      inputFS.chdir(oldcwd);\n    }\n  });\n\n  it('should build a single package with an entry file and cwd at a package', async function () {\n    let fixture = path.join(__dirname, '/integration/monorepo/packages/pkg-a');\n    let oldcwd = inputFS.cwd();\n    inputFS.chdir(fixture);\n\n    try {\n      let b = await bundle(path.join(fixture, 'src/index.js'), {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          distDir,\n        },\n      });\n\n      assertBundles(b, [\n        {\n          name: 'pkg-a.cjs.js',\n          assets: ['index.js'],\n        },\n        {\n          name: 'pkg-a.module.js',\n          assets: ['index.js'],\n        },\n      ]);\n\n      let contents = await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/monorepo/packages/pkg-a/dist/pkg-a.cjs.js',\n        ),\n        'utf8',\n      );\n      assert(contents.includes('$parcel$export(module.exports, \"default\"'));\n\n      contents = await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/monorepo/packages/pkg-a/dist/pkg-a.module.js',\n        ),\n        'utf8',\n      );\n      assert(contents.includes('export {'));\n    } finally {\n      inputFS.chdir(oldcwd);\n    }\n  });\n\n  it('should build a single package with an entry file and cwd inside a package', async function () {\n    let fixture = path.join(\n      __dirname,\n      '/integration/monorepo/packages/pkg-a/src',\n    );\n    let oldcwd = inputFS.cwd();\n    inputFS.chdir(fixture);\n\n    try {\n      let b = await bundle(path.join(fixture, 'index.js'), {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          distDir,\n        },\n      });\n\n      assertBundles(b, [\n        {\n          name: 'pkg-a.cjs.js',\n          assets: ['index.js'],\n        },\n        {\n          name: 'pkg-a.module.js',\n          assets: ['index.js'],\n        },\n      ]);\n\n      let contents = await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/monorepo/packages/pkg-a/dist/pkg-a.cjs.js',\n        ),\n        'utf8',\n      );\n      assert(contents.includes('$parcel$export(module.exports, \"default\"'));\n\n      contents = await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/monorepo/packages/pkg-a/dist/pkg-a.module.js',\n        ),\n        'utf8',\n      );\n      assert(contents.includes('export {'));\n    } finally {\n      inputFS.chdir(oldcwd);\n    }\n  });\n\n  it('should build multiple packages in a monorepo at once, pointing at a glob of directories', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/monorepo/packages/*'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'pkg-a.cjs.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'pkg-a.module.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'pkg-b.cjs.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-b.module.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-b.cjs.css',\n        assets: ['index.module.css'],\n      },\n      {\n        name: 'pkg-b.module.css',\n        assets: ['index.module.css'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-a/dist/pkg-a.cjs.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('$parcel$export(module.exports, \"default\"'));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-a/dist/pkg-a.module.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('export {'));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-b/dist/pkg-b.cjs.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('require(\"./pkg-b.cjs.css\")'));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-b/dist/pkg-b.cjs.css',\n      ),\n      'utf8',\n    );\n    assert(/\\.[_0-9a-zA-Z]+_foo/.test(contents));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo/packages/pkg-b/dist/pkg-b.module.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('import \"./pkg-b.module.css\"'));\n  });\n\n  it('should watch glob entries and build new packages that are added', async function () {\n    // copy into memory fs\n    await ncp(\n      path.join(__dirname, '/integration/monorepo/packages/pkg-a'),\n      path.join(__dirname, '/monorepo/packages/pkg-a'),\n    );\n\n    let b = await bundler(path.join(__dirname, '/monorepo/packages/*'), {\n      defaultTargetOptions: {\n        shouldScopeHoist: true,\n      },\n      inputFS: overlayFS,\n    });\n\n    subscription = await b.watch();\n    let evt = await getNextBuild(b);\n\n    assertBundles(evt.bundleGraph, [\n      {\n        name: 'pkg-a.cjs.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'pkg-a.module.js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    await ncp(\n      path.join(__dirname, '/integration/monorepo/packages/pkg-b'),\n      path.join(__dirname, '/monorepo/packages/pkg-b'),\n    );\n\n    evt = await getNextBuild(b);\n    assertBundles(evt.bundleGraph, [\n      {\n        name: 'pkg-a.cjs.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'pkg-a.module.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'pkg-b.cjs.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-b.module.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-b.cjs.css',\n        assets: ['index.module.css'],\n      },\n      {\n        name: 'pkg-b.module.css',\n        assets: ['index.module.css'],\n      },\n    ]);\n  });\n\n  it('should watch package.json containing \"source\" field for changes', async function () {\n    // copy into memory fs\n    await ncp(\n      path.join(__dirname, '/integration/monorepo/packages/pkg-a'),\n      path.join(__dirname, '/monorepo/packages/pkg-a'),\n    );\n\n    let b = await bundler(path.join(__dirname, '/monorepo/packages/*'), {\n      defaultTargetOptions: {\n        shouldScopeHoist: true,\n      },\n      inputFS: overlayFS,\n    });\n\n    subscription = await b.watch();\n    let evt = await getNextBuild(b);\n\n    assertBundles(evt.bundleGraph, [\n      {\n        name: 'pkg-a.cjs.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'pkg-a.module.js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    let pkgFile = path.join(__dirname, '/monorepo/packages/pkg-a/package.json');\n    let pkg = JSON.parse(await outputFS.readFile(pkgFile, 'utf8'));\n    await outputFS.writeFile(\n      pkgFile,\n      JSON.stringify({...pkg, source: 'src/alt.js'}),\n    );\n\n    evt = await getNextBuild(b);\n    assert(evt.type === 'buildSuccess');\n    assertBundles(evt.bundleGraph, [\n      {\n        name: 'pkg-a.cjs.js',\n        assets: ['alt.js'],\n      },\n      {\n        name: 'pkg-a.module.js',\n        assets: ['alt.js'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(\n      path.join(__dirname, '/monorepo/packages/pkg-a/dist/pkg-a.cjs.js'),\n      'utf8',\n    );\n    assert(contents.includes('return 3'));\n\n    contents = await outputFS.readFile(\n      path.join(__dirname, '/monorepo/packages/pkg-a/dist/pkg-a.module.js'),\n      'utf8',\n    );\n    assert(contents.includes('return 3'));\n  });\n\n  it('should watch package.json containing targets for changes', async function () {\n    // copy into memory fs\n    await ncp(\n      path.join(__dirname, '/integration/monorepo/packages/pkg-a'),\n      path.join(__dirname, '/monorepo/packages/pkg-a'),\n    );\n\n    let b = await bundler(path.join(__dirname, '/monorepo/packages/*'), {\n      defaultTargetOptions: {\n        shouldScopeHoist: true,\n      },\n      inputFS: overlayFS,\n    });\n\n    subscription = await b.watch();\n    let evt = await getNextBuild(b);\n\n    assertBundles(evt.bundleGraph, [\n      {\n        name: 'pkg-a.cjs.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'pkg-a.module.js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    let pkgFile = path.join(__dirname, '/monorepo/packages/pkg-a/package.json');\n    let pkg = JSON.parse(await outputFS.readFile(pkgFile, 'utf8'));\n    await outputFS.writeFile(\n      pkgFile,\n      JSON.stringify({\n        ...pkg,\n        main: 'dist/alt.js',\n        module: 'dist/alt.module.js',\n      }),\n    );\n\n    evt = await getNextBuild(b);\n    assertBundles(evt.bundleGraph, [\n      {\n        name: 'alt.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'alt.module.js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(\n      path.join(__dirname, '/monorepo/packages/pkg-a/dist/alt.js'),\n      'utf8',\n    );\n    assert(contents.includes('return 2'));\n\n    contents = await outputFS.readFile(\n      path.join(__dirname, '/monorepo/packages/pkg-a/dist/alt.module.js'),\n      'utf8',\n    );\n    assert(contents.includes('return 2'));\n  });\n\n  it('should not share bundles between targets', async function () {\n    let b = await bundle(\n      [\n        path.join(__dirname, '/integration/monorepo-shared/packages/pkg-a'),\n        path.join(__dirname, '/integration/monorepo-shared/packages/pkg-b'),\n      ],\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'pkg-a.cjs.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-a.module.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-a.cjs.css',\n        assets: ['index.module.css'],\n      },\n      {\n        name: 'pkg-a.module.css',\n        assets: ['index.module.css'],\n      },\n      {\n        name: 'pkg-b.cjs.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-b.module.js',\n        assets: ['index.js', 'index.module.css'],\n      },\n      {\n        name: 'pkg-b.cjs.css',\n        assets: ['index.module.css'],\n      },\n      {\n        name: 'pkg-b.module.css',\n        assets: ['index.module.css'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo-shared/packages/pkg-a/dist/pkg-a.cjs.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('$parcel$export(module.exports, \"default\"'));\n    assert(contents.includes('require(\"./pkg-a.cjs.css\")'));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo-shared/packages/pkg-a/dist/pkg-a.module.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('export {'));\n    assert(contents.includes('import \"./pkg-a.module.css\"'));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo-shared/packages/pkg-a/dist/pkg-a.cjs.css',\n      ),\n      'utf8',\n    );\n    assert(/\\.[_0-9a-zA-Z]+_foo/.test(contents));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo-shared/packages/pkg-b/dist/pkg-b.cjs.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('require(\"./pkg-b.cjs.css\")'));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo-shared/packages/pkg-b/dist/pkg-b.cjs.css',\n      ),\n      'utf8',\n    );\n    assert(/\\.[_0-9a-zA-Z]+_foo/.test(contents));\n\n    contents = await outputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/monorepo-shared/packages/pkg-b/dist/pkg-b.module.js',\n      ),\n      'utf8',\n    );\n    assert(contents.includes('import \"./pkg-b.module.css\"'));\n  });\n\n  it('should search for .parcelrc at cwd in monorepos', async () => {\n    let fixture = path.join(\n      __dirname,\n      '/integration/parcelrc-monorepo/app/index.js',\n    );\n\n    let oldcwd = inputFS.cwd();\n    inputFS.chdir(path.dirname(fixture));\n\n    try {\n      let b = await bundle(fixture);\n\n      assert.equal((await run(b)).default, '<svg/>');\n    } finally {\n      inputFS.chdir(oldcwd);\n    }\n  });\n\n  // This test ensures that workspace linked dependency changes are correctly\n  // detected in watch mode when `watchDir` is set to the monorepo root.\n  it('should correctly detect changes when watchDir is higher up in a project-only lockfile monorepo', async () => {\n    const dir = path.join(__dirname, 'project-specific-lockfiles');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      packages\n        app\n          package.json:\n            { \"name\": \"app\" }\n          pnpm-lock.yaml:\n            lockfileVersion: 5.4\n          index.js:\n            import {msg} from 'lib';\n            console.log(msg);\n          node_modules\n            lib -> ${path.join(\n              __dirname,\n              'project-specific-lockfiles',\n              'packages',\n              'lib',\n            )}\n        lib\n          package.json:\n            { \"name\": \"lib\" }\n          pnpm-lock.yaml:\n            lockfileVersion: 5.4\n          index.js:\n            export const msg = \"initial\";`;\n\n    let b = await bundler(path.join(dir, 'packages', 'app', 'index.js'), {\n      inputFS: overlayFS,\n      watchDir: path.join(dir),\n    });\n\n    let builds = 0;\n\n    return new Promise((resolve, reject) => {\n      // 1. Increment the build counter and modify `packages/lib/index.js` which\n      //    should trigger a subsquent build.\n      //\n      // 2. Ensure the changed asset was detected and built\n      b.watch(async (err, buildEvent) => {\n        builds++;\n\n        if (builds < 2) {\n          await overlayFS.writeFile(\n            path.join(dir, 'packages', 'lib', 'index.js'),\n            'export const msg = \"changed-NcMB9nA7\"',\n          );\n        } else {\n          const values = buildEvent?.changedAssets?.values();\n          if (values != null) {\n            const code = await Array.from(values)[0].getCode();\n            assert(code.includes('changed-NcMB9nA7'));\n            resolve();\n          } else {\n            reject(new Error('Changed assets missing.'));\n          }\n        }\n      }).then(sub => {\n        subscription = sub;\n      });\n    });\n  });\n\n  it('should support globs in the source field', async function () {\n    const dir = path.join(__dirname, 'source-glob');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      package.json:\n        {\n          \"source\": \"foo/*.js\",\n          \"targets\": {\n            \"default\": {\n              \"outputFormat\": \"esmodule\",\n              \"isLibrary\": true\n            }\n          }\n        }\n\n      foo/a.js:\n        export default 'a';\n\n      foo/b.js:\n        export default 'b';\n    `;\n\n    let b = await bundle(dir, {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n    ]);\n\n    for (let bundle of b.getBundles()) {\n      let res = await runBundle(b, bundle);\n      assert.equal(res.default, bundle.name[0]);\n    }\n  });\n\n  it('should support multiple globs in the source field', async function () {\n    const dir = path.join(__dirname, 'source-glob');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      package.json:\n        {\n          \"source\": [\"foo/*.js\", \"bar/*.js\"],\n          \"targets\": {\n            \"default\": {\n              \"outputFormat\": \"esmodule\",\n              \"isLibrary\": true\n            }\n          }\n        }\n\n      foo/a.js:\n        export default 'a';\n\n      foo/b.js:\n        export default 'b';\n\n      bar/c.js:\n        export default 'c';\n\n      bar/d.js:\n        export default 'd';\n    `;\n\n    let b = await bundle(dir, {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n      {\n        assets: ['c.js'],\n      },\n      {\n        assets: ['d.js'],\n      },\n    ]);\n\n    for (let bundle of b.getBundles()) {\n      let res = await runBundle(b, bundle);\n      assert.equal(res.default, bundle.name[4]);\n    }\n  });\n\n  it('should support globs in target-specific source field', async function () {\n    const dir = path.join(__dirname, 'source-target-glob');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      package.json:\n        {\n          \"targets\": {\n            \"foo-esm\": {\n              \"source\": \"foo/*.js\",\n              \"outputFormat\": \"esmodule\",\n              \"isLibrary\": true\n            },\n            \"foo-cjs\": {\n              \"source\": \"foo/*.js\",\n              \"outputFormat\": \"commonjs\",\n              \"isLibrary\": true\n            }\n          }\n        }\n\n      foo/a.js:\n        export default 'a';\n\n      foo/b.js:\n        export default 'b';\n    `;\n\n    let b = await bundle(dir, {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    assertBundles(b, [\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n    ]);\n\n    for (let bundle of b.getBundles()) {\n      let res = await runBundle(b, bundle);\n      assert.equal(res.default, bundle.name[0]);\n    }\n  });\n\n  it('should watch globs in source field', async function () {\n    const dir = path.join(__dirname, 'input', 'source-glob-watch');\n    await overlayFS.mkdirp(dir);\n    await inputFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      package.json:\n        {\n          \"source\": \"foo/*.js\",\n          \"targets\": {\n            \"default\": {\n              \"outputFormat\": \"esmodule\",\n              \"isLibrary\": true\n            }\n          }\n        }\n\n      foo/a.js:\n        export default 'a';\n    `;\n\n    let b = await bundler(dir, {\n      inputFS: overlayFS,\n    });\n\n    subscription = await b.watch();\n    let evt = await getNextBuild(b);\n\n    assertBundles(evt.bundleGraph, [\n      {\n        assets: ['a.js'],\n      },\n    ]);\n\n    await fsFixture(overlayFS, dir)`\n      foo/b.js:\n        export default 'b';\n    `;\n\n    evt = await getNextBuild(b);\n    assertBundles(evt.bundleGraph, [\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n    ]);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/namer.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {bundle, outputFS, distDir} from '@parcel/test-utils';\n\ndescribe('namer', function () {\n  it('should determine correct entry root when building a directory', async function () {\n    await bundle(path.join(__dirname, 'integration/namer-dir'));\n\n    assert(await outputFS.exists(path.join(distDir, 'index.html')));\n    assert(await outputFS.exists(path.join(distDir, 'nested/other.html')));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/output-formats.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {pathToFileURL} from 'url';\nimport nullthrows from 'nullthrows';\nimport {\n  assertBundles,\n  assertESMExports,\n  bundle as _bundle,\n  mergeParcelOptions,\n  outputFS,\n  run,\n  runBundle,\n} from '@parcel/test-utils';\nimport * as react from 'react';\nimport * as lodash from 'lodash';\nimport * as lodashFP from 'lodash/fp';\n\nconst bundle = (name, opts = {}) => {\n  return _bundle(\n    name,\n    mergeParcelOptions(\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n      opts,\n    ),\n  );\n};\n\ndescribe('output formats', function () {\n  describe('commonjs', function () {\n    it('should support commonjs output (exports)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs/exports.js'),\n      );\n\n      assert.equal((await run(b)).bar, 5);\n    });\n\n    it('should support commonjs output (module.exports)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs/module-exports.js'),\n      );\n\n      let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(!dist.includes('function')); // no iife\n      assert.equal(await run(b), 5);\n    });\n\n    it('should support commonjs output from esmodule input', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-commonjs/a.js'),\n      );\n\n      assert.equal((await run(b)).bar, 5);\n    });\n\n    it('should support commonjs output from esmodule input (re-export rename)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-commonjs/re-export-rename.js',\n        ),\n      );\n\n      assert.equal((await run(b)).default, 2);\n    });\n\n    it.skip('should support commonjs output from esmodule input (re-export namespace as)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-commonjs/re-export-namespace-as.js',\n        ),\n      );\n\n      let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(dist.includes('exports.ns'));\n      let output = await run(b);\n      assert.equal(output.ns.default, 4);\n      assert.equal(output.ns.bar, 5);\n    });\n\n    it('should support commonjs output from esmodule input (same binding multiple exports)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-commonjs/multiple-times.js',\n        ),\n      );\n\n      assert.deepStrictEqual(await run(b), {\n        default: 1,\n        test: 1,\n        other: 1,\n        foo: 2,\n      });\n    });\n\n    it('should support commonjs output from esmodule input (skipped exports)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-commonjs-isLibrary-false/skipped.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), {});\n    });\n\n    it('should support commonjs output with external modules (require)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-external/require.js',\n        ),\n      );\n\n      let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(dist.includes('require(\"lodash\")'));\n      assert.equal((await run(b)).bar, 3);\n    });\n\n    it('should support commonjs output with external modules (named import)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs-external/named.js'),\n      );\n\n      assert.equal((await run(b)).bar, 3);\n    });\n\n    it('should support commonjs output with external modules (named import with same name)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-external/named-same.js',\n        ),\n      );\n\n      assert.equal((await run(b)).bar, true);\n    });\n\n    it('should support commonjs output with external modules (namespace import)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-external/namespace.js',\n        ),\n      );\n\n      let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(dist.includes('= require(\"lodash\")'));\n      assert.equal((await run(b)).bar, 3);\n    });\n\n    it('should support commonjs output with external modules (default import)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-external/default.js',\n        ),\n      );\n\n      let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(dist.includes('$parcel$interopDefault'));\n      assert.equal((await run(b)).bar, 3);\n    });\n\n    it('should support commonjs output with external modules (default import new call)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-external/default-new.js',\n        ),\n      );\n\n      let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(dist.includes('$parcel$interopDefault'));\n      await run(b);\n    });\n\n    it('should support commonjs output with external modules (multiple specifiers)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-external/multiple.js',\n        ),\n      );\n\n      let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(dist.includes('= require(\"lodash\")'));\n      assert(dist.includes('= (0, ($parcel$interopDefault('));\n      assert(/var {add: \\s*\\$.+?\\$add\\s*} = lodash/);\n      assert.equal((await run(b)).bar, 6);\n    });\n\n    it('should support commonjs output with old node without destructuring (single)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-destructuring-node/single.js',\n        ),\n      );\n\n      assert.equal((await run(b)).bar, 3);\n    });\n\n    it('should support commonjs output with old node without destructuring (multiple single with same name)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-destructuring-node/single-same.js',\n        ),\n      );\n\n      assert.equal((await run(b)).bar, true);\n    });\n\n    it('should support commonjs output with old node without destructuring (multiple)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-destructuring-node/multiple.js',\n        ),\n      );\n\n      assert.equal((await run(b)).bar, 2);\n    });\n\n    it('should support commonjs output with old browsers without destructuring (single)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-destructuring-browsers/single.js',\n        ),\n      );\n\n      assert.equal((await run(b, {require})).bar, 3);\n    });\n\n    it('should support commonjs output with old node without destructuring (multiple)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-destructuring-browsers/multiple.js',\n        ),\n      );\n\n      assert.equal((await run(b, {require})).bar, 2);\n    });\n\n    it('should support importing sibling bundles in library mode', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs-siblings/a.js'),\n      );\n\n      let dist = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'js').filePath,\n        'utf8',\n      );\n      assert(dist.includes('require(\"./index.css\")'));\n    });\n\n    it('should support async imports', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs-async/index.js'),\n      );\n\n      let index = await outputFS.readFile(\n        b.getBundles().find(b => b.name.startsWith('index')).filePath,\n        'utf8',\n      );\n      assert(/Promise\\.resolve\\(require\\(\"\\.\\/async\\..+?\\.js\"\\)\\)/.test(index));\n\n      assert.equal(await run(b), 4);\n    });\n\n    it('should support async split bundles', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs-split/index.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        },\n      );\n\n      let index = await outputFS.readFile(\n        b.getBundles().find(b => b.name.startsWith('index')).filePath,\n        'utf8',\n      );\n      assert(\n        /Promise\\.resolve\\(require\\(\"\\.\\/async1\\..+?\\.js\"\\)\\)/.test(index),\n      );\n      assert(\n        /Promise\\.resolve\\(require\\(\"\\.\\/async2\\..+?\\.js\"\\)\\)/.test(index),\n      );\n    });\n\n    it('should support async split bundles (reexport default)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-split-reexport-default/index.js',\n        ),\n        {mode: 'production'},\n      );\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['index.js'],\n        },\n        {\n          type: 'js',\n          assets: ['shared.js'],\n        },\n        {\n          type: 'js',\n          assets: ['async1.js'],\n        },\n        {\n          type: 'js',\n          assets: ['async2.js'],\n        },\n      ]);\n\n      assert.strictEqual(await run(b), 20579 * 2);\n    });\n\n    it('should call init for wrapped modules when codesplitting to to commonjs', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-wrap-codesplit/a.js',\n        ),\n      );\n\n      assert.equal(await run(b), 2);\n    });\n\n    it('should support sideEffects: false', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-sideeffects/index.js',\n        ),\n      );\n\n      let ns = await run(b);\n      assert.equal(typeof ns.test, 'function');\n    });\n\n    it('should throw an error on missing export with esmodule input and sideEffects: false', async function () {\n      let message = \"other.js does not export 'a'\";\n      let source = path.join(\n        __dirname,\n        '/integration/formats/commonjs-sideeffects',\n        'missing-export.js',\n      );\n      await assert.rejects(\n        () =>\n          bundle(\n            path.join(\n              __dirname,\n              '/integration/formats/commonjs-sideeffects',\n              'missing-export.js',\n            ),\n          ),\n        {\n          name: 'BuildError',\n          message,\n          diagnostics: [\n            {\n              message,\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: source,\n                  language: 'js',\n                  codeHighlights: [\n                    {\n                      message: undefined,\n                      start: {\n                        line: 1,\n                        column: 10,\n                      },\n                      end: {\n                        line: 1,\n                        column: 15,\n                      },\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n      );\n    });\n\n    it('should support commonjs input', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs-dynamic/index.js'),\n      );\n\n      let dist = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'js').filePath,\n        'utf8',\n      );\n      assert(dist.includes('Object.assign(module.exports'));\n\n      let ns = await run(b);\n      assert.equal(typeof ns.test, 'function');\n    });\n\n    it('should support commonjs requires without interop', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs-require/index.js'),\n      );\n\n      let dist = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'js').filePath,\n        'utf8',\n      );\n      assert(dist.includes('= require(\"lodash\")'));\n\n      let add = await run(b);\n      assert.equal(add(2, 3), 5);\n    });\n\n    it('should support generating commonjs output with re-exports in entry', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-entry-re-export/a.js',\n        ),\n      );\n      assert.deepEqual(await run(b), {foo: 'foo'});\n    });\n\n    it('should compile workers to statically analyzable URL expressions', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/workers-module/index.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            outputFormat: 'commonjs',\n            shouldScopeHoist: true,\n            shouldOptimize: false,\n            isLibrary: true,\n          },\n        },\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      let workerBundle = b\n        .getBundles()\n        .find(b => b.name.startsWith('dedicated-worker'));\n      let sharedWorkerBundle = b\n        .getBundles()\n        .find(b => b.name.startsWith('shared-worker'));\n      assert(\n        contents.includes(\n          `new Worker(new URL(\"${path.basename(\n            workerBundle.filePath,\n          )}\", \"file:\" + __filename)`,\n        ),\n      );\n      assert(\n        contents.includes(\n          `new SharedWorker(new URL(\"${path.basename(\n            sharedWorkerBundle.filePath,\n          )}\", \"file:\" + __filename)`,\n        ),\n      );\n    });\n\n    it('should compile url: pipeline dependencies to statically analyzable URL expressions for libraries', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/worklet/pipeline.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            outputFormat: 'commonjs',\n            shouldScopeHoist: true,\n            shouldOptimize: false,\n            isLibrary: true,\n          },\n        },\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes(\n          `new URL(\"${path.basename(\n            b.getBundles()[1].filePath,\n          )}\", \"file:\" + __filename)`,\n        ),\n      );\n    });\n\n    it('should URL dependencies to statically analyzable URL expressions for libraries', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/worklet/url.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            outputFormat: 'commonjs',\n            shouldScopeHoist: true,\n            shouldOptimize: false,\n            isLibrary: true,\n          },\n        },\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes(\n          `new URL(\"${path.basename(\n            b.getBundles()[1].filePath,\n          )}\", \"file:\" + __filename)`,\n        ),\n      );\n    });\n\n    it('should support live binding of external modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-live-externals/a.js',\n        ),\n      );\n\n      let external = {\n        foo: 1,\n        setFoo(f) {\n          this.foo = f;\n        },\n      };\n\n      let out = [];\n      await run(\n        b,\n        {\n          output(o) {\n            out.push(o);\n          },\n        },\n        {},\n        {\n          external: () => external,\n        },\n      );\n\n      assert.deepEqual(out, [1, 2]);\n    });\n\n    it('should work with SWC helpers', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs-helpers/index.js'),\n      );\n\n      let out = [];\n      await run(b, {\n        require,\n        output(o) {\n          out.push(o);\n        },\n      });\n\n      assert.deepEqual(out[0].x, new Map());\n    });\n  });\n\n  describe('esmodule', function () {\n    it('should support esmodule output (named export)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm/named.js'),\n      );\n\n      await assertESMExports(b, {bar: 5, foo: 2});\n    });\n\n    it('should support esmodule output (default identifier)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm/default-value.js'),\n      );\n\n      let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(!dist.includes('function')); // no iife\n      await assertESMExports(b, {default: 4});\n    });\n\n    it('should support esmodule output (default function)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm/default-function.js'),\n      );\n\n      assert.strictEqual((await run(b)).default(), 2);\n    });\n\n    it('should support esmodule output (multiple)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm/multiple.js'),\n      );\n\n      await assertESMExports(b, {a: 2, c: 5, default: 3});\n    });\n\n    it('should support esmodule output (exporting symbol multiple times)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm/multiple-times.js'),\n      );\n\n      await assertESMExports(b, {default: 1, foo: 2, other: 1, test: 1});\n    });\n\n    it('should support esmodule output (re-export)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm/re-export.js'),\n      );\n\n      await assertESMExports(b, {a: 2, c: 5});\n    });\n\n    it.skip('should support esmodule output (re-export namespace as)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm/re-export-namespace-as.js',\n        ),\n      );\n\n      await assertESMExports(b, {ns: {a: 2, c: 5}});\n    });\n\n    it('should support esmodule output (renaming re-export)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm/re-export-rename.js'),\n      );\n\n      await assertESMExports(b, {foo: 4});\n    });\n\n    it('should support esmodule output with external modules (named import)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-external/named.js'),\n      );\n\n      await assertESMExports(\n        b,\n        {bar: 3},\n        {lodash: () => ({add: (a, b) => a + b})},\n      );\n    });\n\n    it('should support esmodule output with external modules (named import with same name)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-external/named-same.js'),\n      );\n\n      await assertESMExports(\n        b,\n        {bar: true},\n        {\n          lodash: () => lodash,\n          'lodash/fp': () => lodashFP,\n        },\n      );\n    });\n\n    it('should support esmodule output with external modules (namespace import)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-external/namespace.js'),\n      );\n\n      await assertESMExports(b, {bar: 3}, {lodash: () => lodash});\n    });\n\n    it('should support esmodule output with external modules (default import)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-external/default.js'),\n      );\n\n      await assertESMExports(\n        b,\n        {bar: 3},\n        {\n          lodash: () => lodash,\n        },\n      );\n    });\n\n    it('should support esmodule output with external modules (multiple specifiers)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-external/multiple.js'),\n      );\n\n      await assertESMExports(\n        b,\n        {bar: 6},\n        {\n          lodash: () => lodash,\n        },\n      );\n    });\n\n    it('should support esmodule output with external modules (export)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-external/export.js'),\n      );\n\n      await assertESMExports(\n        b,\n        3,\n        {\n          lodash: () => lodash,\n        },\n        ns => ns.add(1, 2),\n      );\n    });\n\n    it('should support esmodule output with external modules (re-export)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-external/re-export.js'),\n      );\n\n      await assertESMExports(\n        b,\n        3,\n        {\n          lodash: () => lodash,\n        },\n        ns => ns.add(1, 2),\n      );\n    });\n\n    it('should support esmodule output with external modules (re-export child)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-external/re-export-child.js',\n        ),\n      );\n\n      await assertESMExports(\n        b,\n        3,\n        {\n          lodash: () => lodash,\n        },\n        ns => ns.add(1, 2),\n      );\n    });\n\n    it('should support importing sibling bundles in library mode', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-siblings/a.js'),\n      );\n\n      let dist = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'js').filePath,\n        'utf8',\n      );\n      assert(dist.includes('import \"./index.css\"'));\n    });\n\n    it('should support esmodule output (skipped exports)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-isLibrary-false/skipped.js',\n        ),\n      );\n\n      let dist = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'js').filePath,\n        'utf8',\n      );\n      assert(!dist.includes('foo'));\n    });\n\n    it('should support interop imports from other bundles', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-interop-cross-bundle/a.js',\n        ),\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['a.js', 'c.js'],\n        },\n        {\n          type: 'js',\n          assets: ['b.js'],\n        },\n      ]);\n\n      let dist = await outputFS.readFile(\n        b.getBundles().find(b => !b.needsStableName).filePath,\n        'utf8',\n      );\n      assert(dist.includes('$parcel$interopDefault'));\n      let ns = await run(b);\n      assert.deepEqual(await ns.default, [123, 123]);\n    });\n\n    it('should rename imports that conflict with exports', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-conflict/a.js'),\n      );\n\n      await assertESMExports(b, {foo: 13}, {foo: () => ({foo: 10})});\n    });\n\n    it('should support async imports', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-async/index.js'),\n      );\n\n      let index = await outputFS.readFile(\n        b.getBundles().find(b => b.name.startsWith('index')).filePath,\n        'utf8',\n      );\n      assert(/import\\(\"\\.\\/async\\..+?\\.js\"\\)/.test(index));\n\n      await assertESMExports(b, 4, {}, ns => ns.default);\n    });\n\n    // This is currently not possible, it would have to do something like this:\n    // export { $id$init().foo as foo };\n    it.skip('should support dynamic imports with chained reexports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-async-chained-reexport/index.js',\n        ),\n      );\n\n      let async = await outputFS.readFile(\n        b.getBundles().find(b => b.name.startsWith('c')).filePath,\n        'utf8',\n      );\n      assert(!/\\$export\\$default\\s+=/.test(async));\n    });\n\n    it('should support dynamic imports with chained reexports II', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-async-chained-reexport2/index.js',\n        ),\n      );\n\n      let async = await outputFS.readFile(\n        b.getChildBundles(b.getBundles()[0])[0].filePath,\n        'utf8',\n      );\n      assert(!async.includes('$import$'));\n      await assertESMExports(b, ['index', 'a', 1], {}, ns => ns.default);\n    });\n\n    it('should throw an error on missing export with esmodule output and sideEffects: false', async function () {\n      let message = \"b.js does not export 'a'\";\n      let source = path.join(\n        __dirname,\n        'integration/formats/esm-sideeffects',\n        'missing-export.js',\n      );\n      await assert.rejects(\n        () =>\n          bundle(\n            path.join(\n              __dirname,\n              'integration/formats/esm-sideeffects/missing-export.js',\n            ),\n          ),\n        {\n          name: 'BuildError',\n          message,\n          diagnostics: [\n            {\n              message,\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: source,\n                  language: 'js',\n                  codeHighlights: [\n                    {\n                      message: undefined,\n                      start: {\n                        line: 1,\n                        column: 10,\n                      },\n                      end: {\n                        line: 1,\n                        column: 15,\n                      },\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n      );\n    });\n\n    it('should support async split bundles', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-split/index.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        },\n      );\n\n      let index = await outputFS.readFile(\n        b.getBundles().find(b => b.name.startsWith('index')).filePath,\n        'utf8',\n      );\n      assert(/import\\(\"\\.\\/async1\\..+?\\.js\"\\)/.test(index));\n      assert(/import\\(\"\\.\\/async2\\..+?\\.js\"\\)/.test(index));\n\n      await assertESMExports(\n        b,\n        true,\n        {lodash: () => lodash, react: () => react},\n        ns => ns.default,\n      );\n    });\n\n    it('should call init for wrapped modules when codesplitting to esmodules', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-wrap-codesplit/a.js'),\n      );\n\n      let ns = await run(b);\n      // TODO: https://github.com/parcel-bundler/parcel/issues/5459\n      assert.deepStrictEqual(await ns.default, 2);\n    });\n\n    it('should support async split bundles for workers', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-split-worker/index.html',\n        ),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        },\n      );\n\n      let workerBundle = nullthrows(\n        b.getBundles().find(b => b.env.context === 'web-worker'),\n      );\n      let workerBundleContents = await outputFS.readFile(\n        workerBundle.filePath,\n        'utf8',\n      );\n\n      let asyncBundle = b\n        .getChildBundles(workerBundle)\n        .find(b => b.filePath.includes('async'));\n      let syncBundle = b\n        .getReferencedBundles(workerBundle)\n        .find(b => !b.filePath.includes('async'));\n      assert(\n        workerBundleContents.includes(\n          `import \"./${path.basename(syncBundle.filePath)}\"`,\n        ),\n      );\n      assert(\n        workerBundleContents.includes(path.basename(asyncBundle.filePath)),\n      );\n    });\n\n    it('should support building esmodules for browser targets', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-browser/index.html'),\n      );\n\n      let html = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'html').filePath,\n        'utf8',\n      );\n\n      assert(html.includes('<script type=\"module\" src=\"/esm-browser'));\n\n      let entry = await outputFS.readFile(\n        b\n          .getBundles()\n          .find(\n            b => path.basename(b.filePath) === html.match(/src=\"\\/(.*?)\"/)[1],\n          ).filePath,\n        'utf8',\n      );\n\n      let asyncBundle = b\n        .getBundles()\n        .find(bundle => bundle.name.startsWith('async'));\n      assert(\n        entry.includes(`import(\"./${path.basename(asyncBundle.filePath)}\")`),\n      );\n\n      let res = await run(b, {output: null}, {require: false});\n      assert.equal(await res.output, 4);\n    });\n\n    it('should support using an import polyfill for older browsers', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-browser/index.html'),\n        {\n          defaultTargetOptions: {\n            engines: {\n              browsers: [\n                // Implements es modules but not dynamic imports\n                'Chrome 61',\n              ],\n            },\n          },\n        },\n      );\n\n      let html = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'html').filePath,\n        'utf8',\n      );\n\n      assert(html.includes('<script type=\"module\" src=\"/esm-browser'));\n\n      let entry = await outputFS.readFile(\n        b\n          .getBundles()\n          .find(\n            b => path.basename(b.filePath) === html.match(/src=\"\\/(.*?)\"/)[1],\n          ).filePath,\n        'utf8',\n      );\n      assert(entry.includes('function importModule'));\n\n      let asyncBundle = b\n        .getBundles()\n        .find(bundle => bundle.name.startsWith('async'));\n      assert(\n        entry.includes(\n          `$parcel$resolve(\"${path.basename(asyncBundle.filePath)}\")`,\n        ),\n      );\n    });\n\n    it('should support building esmodules with css imports', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-browser-css/index.html'),\n      );\n\n      let html = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'html').filePath,\n        'utf8',\n      );\n\n      assert(html.includes('<script type=\"module\" src=\"/esm-browser-css'));\n      assert(html.includes('<link rel=\"stylesheet\" href=\"/esm-browser-css'));\n\n      let entry = await outputFS.readFile(\n        b\n          .getBundles()\n          .find(\n            b => path.basename(b.filePath) === html.match(/src=\"\\/(.*?)\"/)[1],\n          ).filePath,\n        'utf8',\n      );\n\n      let bundles = b.getBundles();\n      let asyncJsBundle = bundles.find(\n        bundle => bundle.type === 'js' && bundle.name.startsWith('async'),\n      );\n      let asyncCssBundle = bundles.find(\n        bundle => bundle.type === 'css' && bundle.name.startsWith('async'),\n      );\n      assert(\n        new RegExp(\n          'Promise.all\\\\(\\\\[\\\\n.+?\\\\$parcel\\\\$resolve\\\\(\"' +\n            path.basename(asyncCssBundle.filePath) +\n            '\"\\\\)\\\\),\\\\n\\\\s*import\\\\(\"\\\\.\\\\/' +\n            path.basename(asyncJsBundle.filePath) +\n            '\"\\\\)\\\\n\\\\s*\\\\]\\\\)',\n        ).test(entry),\n      );\n\n      let async = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'js' && b.name.startsWith('async'))\n          .filePath,\n        'utf8',\n      );\n      assert(!async.includes('.css\"'));\n    });\n\n    it('should support building esmodules with split bundles', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-browser-split-bundle/index.html',\n        ),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        },\n      );\n\n      let html = await outputFS.readFile(\n        b.getBundles().find(b => b.type === 'html').filePath,\n        'utf8',\n      );\n\n      assert(\n        html.includes('<script type=\"module\" src=\"/esm-browser-split-bundle'),\n      );\n      assert(html.includes('<script type=\"importmap\"'));\n\n      let bundles = b.getBundles();\n      let entry = await outputFS.readFile(\n        bundles.find(\n          b => path.basename(b.filePath) === html.match(/src=\"\\/(.*?)\"/)[1],\n        ).filePath,\n        'utf8',\n      );\n\n      let sharedBundle = bundles.find(b => b.getEntryAssets().length === 0);\n      let async1Bundle = bundles.find(\n        b => b.name.startsWith('async1') && b.id !== sharedBundle.id,\n      );\n      let async2Bundle = bundles.find(b => b.name.startsWith('async2'));\n\n      for (let bundle of [async1Bundle, async2Bundle]) {\n        // async import both bundles in parallel for performance\n        assert(\n          new RegExp(\n            `import\\\\(\"${sharedBundle.publicId}\"\\\\),\\\\n\\\\s*import\\\\(\"${bundle.publicId}\"\\\\)`,\n          ).test(entry),\n        );\n      }\n    });\n\n    it('should create correct bundle import for reexports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/esm-bundle-import-reexport/index.js',\n        ),\n      );\n\n      await assertESMExports(\n        b,\n        ['!!!index!!!', 'DiagramVersion: !!!some name!!!'],\n        {},\n        ns => ns.default,\n      );\n    });\n\n    it('should support generating ESM from CommonJS', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs-esm/index.js'),\n      );\n\n      let ns = await run(b, {}, {}, {lodash: () => lodash});\n      assert.strictEqual(ns.default(1, 2), 3);\n    });\n\n    it('should support re-assigning to module.exports', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/commonjs-esm/re-assign.js'),\n      );\n\n      let ns = await run(b);\n      assert.deepStrictEqual({...ns}, {default: 'xyz'});\n    });\n\n    it.skip(\"doesn't support require.resolve calls for excluded assets without commonjs\", async function () {\n      let message =\n        \"'require.resolve' calls for excluded assets are only supported with outputFormat: 'commonjs'\";\n      let source = path.join(\n        __dirname,\n        '/integration/formats/commonjs-esm/require-resolve.js',\n      );\n      await assert.rejects(() => bundle(source), {\n        name: 'BuildError',\n        message,\n        diagnostics: [\n          {\n            message,\n            origin: '@parcel/packager-js',\n            codeFrames: [\n              {\n                filePath: source,\n                language: 'js',\n                codeHighlights: [\n                  {\n                    start: {\n                      line: 1,\n                      column: 16,\n                    },\n                    end: {\n                      line: 1,\n                      column: 40,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      });\n    });\n\n    it('should support generating commonjs output with re-exports in entry', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/commonjs-esm-entry-re-export/a.js',\n        ),\n      );\n\n      let ns = await run(b);\n      assert.deepEqual({...ns}, {default: {default: 'default'}});\n    });\n\n    it('should support rewriting filename and importing path', async function () {\n      let input = path.join(\n        __dirname,\n        '/integration/formats/esm-filename-import/index.js',\n      );\n      let b = await bundle(input);\n\n      let ns = await run(b);\n      assert.deepEqual(ns.foo, input);\n    });\n\n    it('should rename shadowed imported specifiers to something unique', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-import-shadow/a.mjs'),\n      );\n\n      let _b = await import(\n        pathToFileURL(\n          path.join(\n            __dirname,\n            '/integration/formats/esm-import-shadow/node_modules/b/index.mjs',\n          ),\n        ).toString()\n      );\n      let ns = await run(b, {}, {}, {b: () => _b});\n      let [useContext] = ns.createContext('Hello');\n      assert.strictEqual(useContext(), 'Hello World');\n    });\n\n    it('should rename shadowed exports to something unique', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-export-shadow/a.mjs'),\n      );\n\n      let ns = await run(b);\n      assert.strictEqual(ns.fib(5), 8);\n    });\n\n    it('should support ESM output from CJS input', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-cjs/a.js'),\n      );\n\n      let ns = await run(b);\n      assert.deepEqual(ns.test, true);\n      assert.deepEqual(ns.default, {test: true, 'foo-bar': true});\n      assert.deepEqual(ns['foo-bar'], true);\n    });\n\n    it('should support outputting .mjs files', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-mjs/index.js'),\n      );\n\n      let filePath = b.getBundles()[0].filePath;\n      assert(filePath.endsWith('.mjs'));\n      let output = await outputFS.readFile(filePath, 'utf8');\n      assert(output.includes('import '));\n    });\n\n    it('should support outputting ESM in .js files with \"type\": \"module\"', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/esm-type-module/index.js'),\n      );\n\n      let filePath = b.getBundles()[0].filePath;\n      assert(filePath.endsWith('.js'));\n      let output = await outputFS.readFile(filePath, 'utf8');\n      assert(output.includes('import '));\n    });\n\n    it('.cjs extension should override \"type\": \"module\"', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/formats/cjs-type-module/index.js'),\n      );\n\n      let filePath = b.getBundles()[0].filePath;\n      assert(filePath.endsWith('.cjs'));\n      let output = await outputFS.readFile(filePath, 'utf8');\n      assert(!output.includes('import '));\n      assert(output.includes('require('));\n    });\n\n    it('should compile workers to statically analyzable URL expressions', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/workers-module/index.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            outputFormat: 'esmodule',\n            shouldScopeHoist: true,\n            shouldOptimize: false,\n            isLibrary: true,\n          },\n        },\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      let workerBundle = b\n        .getBundles()\n        .find(b => b.name.startsWith('dedicated-worker'));\n      let sharedWorkerBundle = b\n        .getBundles()\n        .find(b => b.name.startsWith('shared-worker'));\n      assert(\n        contents.includes(\n          `new Worker(new URL(\"${path.basename(\n            workerBundle.filePath,\n          )}\", import.meta.url)`,\n        ),\n      );\n      assert(\n        contents.includes(\n          `new SharedWorker(new URL(\"${path.basename(\n            sharedWorkerBundle.filePath,\n          )}\", import.meta.url)`,\n        ),\n      );\n    });\n\n    it('should compile url: pipeline dependencies to statically analyzable URL expressions for libraries', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/worklet/pipeline.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            outputFormat: 'esmodule',\n            shouldScopeHoist: true,\n            shouldOptimize: false,\n            isLibrary: true,\n          },\n        },\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes(\n          `new URL(\"${path.basename(\n            b.getBundles()[1].filePath,\n          )}\", import.meta.url)`,\n        ),\n      );\n    });\n\n    it('should URL dependencies to statically analyzable URL expressions for libraries', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/worklet/url.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            outputFormat: 'esmodule',\n            shouldScopeHoist: true,\n            shouldOptimize: false,\n            isLibrary: true,\n          },\n        },\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(\n        contents.includes(\n          `new URL(\"${path.basename(\n            b.getBundles()[1].filePath,\n          )}\", import.meta.url)`,\n        ),\n      );\n    });\n  });\n\n  it('should support generating ESM from universal module wrappers', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/formats/commonjs-esm/universal-library.js',\n      ),\n    );\n\n    let ns = await run(b);\n    assert.deepEqual({...ns}, {default: {a: 2}});\n  });\n\n  it(\"doesn't overwrite used global variables\", async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/formats/conflict-global/index.js'),\n    );\n\n    let cjs = b\n      .getBundles()\n      .find(b => b.type === 'js' && b.env.outputFormat === 'commonjs');\n\n    let calls = [];\n    assert.deepEqual(\n      await runBundle(b, cjs, {\n        foo(v) {\n          calls.push(v);\n        },\n      }),\n      {Map: 2},\n    );\n    assert.deepEqual(calls, [[['a', 10]]]);\n\n    calls = [];\n    assert.deepEqual(\n      await runBundle(b, cjs, {\n        foo(v) {\n          calls.push(v);\n        },\n      }),\n      {Map: 2},\n    );\n    assert.deepEqual(calls, [[['a', 10]]]);\n  });\n\n  it('should support external parallel dependencies', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/library-parallel-deps/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'out.js',\n        assets: ['index.js'],\n      },\n      {\n        assets: ['foo.js'],\n      },\n    ]);\n\n    let res = await run(b);\n    assert.equal(res.default, 'foo bar');\n\n    let content = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(/import [^\\s]+ from \"\\.\\//.test(content));\n  });\n\n  describe('global', function () {\n    it.skip('should support split bundles between main script and workers', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/global-split-worker/index.html',\n        ),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['get-worker-url.js', 'index.js'],\n        },\n        {type: 'html', assets: ['index.html']},\n        {type: 'js', assets: ['lodash.js']},\n        {type: 'js', assets: ['worker.js']},\n      ]);\n\n      let workerBundle;\n      let res = await run(\n        b,\n        {\n          output: null,\n          Worker: class {\n            constructor(url) {\n              workerBundle = nullthrows(\n                b\n                  .getBundles()\n                  .find(\n                    b => path.basename(b.filePath) === path.posix.basename(url),\n                  ),\n              );\n            }\n          },\n        },\n        {require: false},\n      );\n      assert.strictEqual(res.output, 3);\n      res = await runBundle(b, workerBundle, {output: null}, {require: false});\n      assert.strictEqual(res.output, 30);\n    });\n\n    it('should support async split bundles for workers', async function () {\n      await bundle(\n        path.join(\n          __dirname,\n          '/integration/formats/global-split-worker-async/index.html',\n        ),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        },\n      );\n    });\n\n    it('should throw with external modules', async function () {\n      let message =\n        'External modules are not supported when building for browser';\n      let source = path.join(\n        __dirname,\n        'integration/formats/global-external/index.js',\n      );\n      await assert.rejects(() => bundle(source), {\n        name: 'BuildError',\n        message,\n        diagnostics: [\n          {\n            message,\n            origin: '@parcel/packager-js',\n            codeFrames: [\n              {\n                filePath: source,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 21,\n                    },\n                    end: {\n                      line: 1,\n                      column: 28,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/packager.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\nimport {\n  bundle as _bundle,\n  mergeParcelOptions,\n  overlayFS,\n} from '@parcel/test-utils';\n\nconst runBundler = (name, opts = {}) => {\n  return _bundle(\n    name,\n    // $FlowFixMe\n    mergeParcelOptions({}, opts),\n  );\n};\n\nfunction hasPolyfill(code) {\n  const noPolyfill = `var $parcel$global = globalThis;`;\n  const polyfill = `typeof globalThis !== 'undefined'`;\n  return code.includes(polyfill) && !code.includes(noPolyfill);\n}\n\ndescribe('packager', function () {\n  describe('globalThis polyfill', function () {\n    it('should exclude globalThis polyfill in modern builds', async function () {\n      const entryPoint = path.join(\n        __dirname,\n        'integration/html-js-dynamic/index.html',\n      );\n      const options = {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n          engines: {\n            browsers: 'last 2 Chrome version',\n          },\n        },\n      };\n      const bundleGraph = await runBundler(entryPoint, options);\n\n      for (const b of bundleGraph.getBundles()) {\n        if (b.type !== 'js') continue;\n        let code = await overlayFS.readFile(nullthrows(b.filePath), 'utf8');\n        assert.ok(!hasPolyfill(code));\n      }\n    });\n\n    it('should include globalThis polyfill in ie11 builds', async function () {\n      const entryPoint = path.join(\n        __dirname,\n        'integration/packager-global-this/index.html',\n      );\n      const options = {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n          engines: {\n            browsers: 'ie 11',\n          },\n        },\n      };\n\n      const bundleGraph = await runBundler(entryPoint, options);\n\n      for (const b of bundleGraph.getBundles()) {\n        if (b.type !== 'js') continue;\n        let code = await overlayFS.readFile(nullthrows(b.filePath), 'utf8');\n        assert.ok(hasPolyfill(code));\n      }\n    });\n\n    it('should exclude globalThis polyfill in node builds', async function () {\n      const entryPoint = path.join(\n        __dirname,\n        'integration/packager-global-this/index.js',\n      );\n      const options = {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n          engines: {\n            browsers: 'node 18',\n          },\n        },\n      };\n\n      const bundleGraph = await runBundler(entryPoint, options);\n\n      for (const b of bundleGraph.getBundles()) {\n        if (b.type !== 'js') continue;\n        let code = await overlayFS.readFile(nullthrows(b.filePath), 'utf8');\n        assert.ok(!hasPolyfill(code));\n      }\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/parcel-link.js",
    "content": "// @flow strict-local\n\nimport type {ProgramOptions} from '@parcel/link';\n\nimport {createProgram as _createProgram} from '@parcel/link';\nimport {fsFixture, overlayFS} from '@parcel/test-utils';\n\nimport assert from 'assert';\nimport path from 'path';\nimport sinon from 'sinon';\n\nfunction createProgram(opts: ProgramOptions) {\n  let program = _createProgram(opts).exitOverride();\n\n  function cli(command: string = ''): Promise<void> {\n    return program.parseAsync(command.split(/\\s+/), {from: 'user'});\n  }\n\n  return cli;\n}\n\ndescribe('@parcel/link', () => {\n  let _cwd;\n  let _stdout;\n\n  beforeEach(async function () {\n    await overlayFS.mkdirp('/app');\n    overlayFS.chdir('/app');\n\n    // $FlowFixMe[incompatible-call]\n    _cwd = sinon.stub(process, 'cwd').callsFake(() => overlayFS.cwd());\n    _stdout = sinon.stub(process.stdout, 'write');\n  });\n\n  afterEach(function () {\n    _cwd?.restore();\n    _stdout?.restore();\n    _cwd = null;\n    _stdout = null;\n  });\n\n  it('prints help text', async () => {\n    let cli = createProgram({fs: overlayFS});\n    // $FlowFixMe[prop-missing]\n    await assert.rejects(() => cli('--help'), /\\(outputHelp\\)/);\n  });\n\n  it('links by default', async () => {\n    let link = sinon.stub();\n    let cli = createProgram({fs: overlayFS, link});\n    await cli();\n    assert(link.called);\n  });\n\n  describe('link', () => {\n    it('errors for invalid app root', async () => {\n      let cli = createProgram({fs: overlayFS});\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(() => cli('link'), /Not a project root/);\n    });\n\n    it('errors for invalid package root', async () => {\n      await fsFixture(overlayFS)`yarn.lock:`;\n\n      assert(overlayFS.existsSync('/app/yarn.lock'));\n\n      let cli = createProgram({fs: overlayFS});\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(() => cli('link /fake'), /Not a package root/);\n    });\n\n    it('errors when a link exists', async () => {\n      await fsFixture(overlayFS)`yarn.lock:`;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli(`link`);\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(() => cli('link'), /link already exists/);\n    });\n\n    it('links with the default options', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        node_modules\n          parcel\n          @parcel/core`;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('link');\n\n      assert(overlayFS.existsSync('.parcel-link'));\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/@parcel/core'),\n        path.resolve(__dirname, '../../core'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/parcel'),\n        path.resolve(__dirname, '../../parcel'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/.bin/parcel'),\n        path.resolve(__dirname, '../../parcel/src/bin.js'),\n      );\n    });\n\n    it('links from a custom package root', async () => {\n      await fsFixture(overlayFS, '/')`\n        app\n          yarn.lock:\n          node_modules\n            parcel\n            @parcel/core\n        package-root\n          core\n            core/package.json: ${{name: '@parcel/core'}}\n            parcel\n              package.json: ${{name: 'parcel'}}\n              src/bin.js:`;\n\n      overlayFS.chdir('/app');\n\n      let cli = createProgram({fs: overlayFS});\n      await cli(`link ../package-root`);\n\n      assert(overlayFS.existsSync('.parcel-link'));\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/@parcel/core'),\n        path.resolve(overlayFS.cwd(), '../package-root/core/core'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/parcel'),\n        path.resolve(overlayFS.cwd(), '../package-root/core/parcel'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/.bin/parcel'),\n        path.resolve(overlayFS.cwd(), '../package-root/core/parcel/src/bin.js'),\n      );\n    });\n\n    it('links with a custom namespace', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        node_modules\n          .bin/parcel:\n          @namespace\n            parcel\n            parcel-core`;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('link --namespace @namespace');\n\n      assert(overlayFS.existsSync('.parcel-link'));\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/.bin/parcel'),\n        path.resolve(__dirname, '../../parcel/src/bin.js'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/@namespace/parcel-core'),\n        path.resolve(__dirname, '../../core'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/@parcel/core'),\n        path.resolve(__dirname, '../../core'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/@namespace/parcel'),\n        path.resolve(__dirname, '../../parcel'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/parcel'),\n        path.resolve(__dirname, '../../parcel'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/.bin/parcel'),\n        path.resolve(__dirname, '../../parcel/src/bin.js'),\n      );\n    });\n\n    // FIXME: this test fails on windows\n    it.skip('updates config for custom namespace', async () => {\n      await fsFixture(overlayFS, '/')`\n        ${path.resolve(\n          path.join(__dirname, '../../../configs/namespace/package.json'),\n        )}: ${{\n        name: '@parcel/config-namespace',\n      }}\n        app\n          yarn.lock:\n          .parcelrc: ${{\n            extends: '@namespace/parcel-config-namespace',\n            transformers: {\n              '*': [\n                '@namespace/parcel-transformer-js',\n                '@namespace/parcel-transformer-local',\n              ],\n            },\n          }}\n          package.json: ${{\n            ['@namespace/parcel-transformer-js']: {},\n            ['@namespace/parcel-transformer-local']: {},\n          }}`;\n\n      overlayFS.chdir('/app');\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('link --namespace @namespace');\n\n      assert(overlayFS.existsSync('.parcel-link'));\n\n      assert.equal(\n        overlayFS.readFileSync('.parcelrc', 'utf8'),\n        JSON.stringify({\n          extends: '@parcel/config-namespace',\n          transformers: {\n            '*': [\n              '@parcel/transformer-js',\n              '@namespace/parcel-transformer-local',\n            ],\n          },\n        }),\n      );\n\n      assert.equal(\n        overlayFS.readFileSync('package.json', 'utf8'),\n        JSON.stringify({\n          ['@parcel/transformer-js']: {},\n          ['@namespace/parcel-transformer-local']: {},\n        }),\n      );\n    });\n\n    it('links with custom node modules glob', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        tools\n          test/node_modules/parcel\n          test2/node_modules/@parcel/core`;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('link --node-modules-glob \"tools/*/node_modules\"');\n\n      assert(overlayFS.existsSync('.parcel-link'));\n\n      assert(overlayFS.existsSync('tools/test/node_modules'));\n      assert(!overlayFS.existsSync('tools/test/node_modules/parcel'));\n\n      assert(overlayFS.existsSync('tools/test2/node_modules'));\n      assert(!overlayFS.existsSync('tools/test2/node_modules/@parcel/core'));\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/parcel'),\n        path.resolve(__dirname, '../../parcel'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/.bin/parcel'),\n        path.resolve(__dirname, '../../parcel/src/bin.js'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/@parcel/core'),\n        path.resolve(__dirname, '../../core'),\n      );\n    });\n\n    it('does not do anything with dry run', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        node_modules\n          parcel\n          @parcel/core`;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('link --dry-run');\n\n      assert(!overlayFS.existsSync('.parcel-link'));\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/@parcel/core'),\n        path.resolve('/app/node_modules/@parcel/core'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/parcel'),\n        path.resolve('/app/node_modules/parcel'),\n      );\n\n      assert(!overlayFS.existsSync('node_modules/.bin/parcel'));\n    });\n  });\n\n  describe('unlink', () => {\n    it('errors without a link config', async () => {\n      await fsFixture(overlayFS)`yarn.lock:`;\n\n      let cli = createProgram({fs: overlayFS});\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(() => cli('unlink'), /link could not be found/);\n    });\n\n    it('errors for invalid app root', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        .parcel-link: ${{\n          appRoot: '/app2',\n          packageRoot: path.resolve(__dirname, '../../..'),\n          nodeModulesGlobs: ['node_modules'],\n          namespace: '@parcel',\n        }}`;\n\n      let cli = createProgram({fs: overlayFS});\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(() => cli('unlink'), /Not a project root/);\n    });\n\n    it('errors for invalid package root', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        .parcel-link: ${{\n          appRoot: '/app',\n          packageRoot: path.resolve(__dirname, '../../..') + '2',\n          nodeModulesGlobs: ['node_modules'],\n          namespace: '@parcel',\n        }}`;\n\n      let cli = createProgram({fs: overlayFS});\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(() => cli('unlink'), /Not a package root/);\n    });\n\n    it('unlinks with the default options', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        node_modules\n          .bin/parcel -> ${path.resolve(__dirname, '../../parcel/src/bin.js')}\n          parcel -> ${path.resolve(__dirname, '../../parcel')}\n          @parcel/core -> ${path.resolve(__dirname, '../../core')}\n        .parcel-link: ${{\n          appRoot: '/app',\n          packageRoot: path.resolve(__dirname, '../../..'),\n          nodeModulesGlobs: ['node_modules'],\n          namespace: '@parcel',\n        }}`;\n\n      assert(overlayFS.existsSync('.parcel-link'));\n      assert(overlayFS.existsSync('node_modules/@parcel/core'));\n      assert(overlayFS.existsSync('node_modules/parcel'));\n      assert(overlayFS.existsSync('node_modules/.bin/parcel'));\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('unlink');\n\n      assert(!overlayFS.existsSync('.parcel-link'));\n      assert(!overlayFS.existsSync('node_modules/@parcel/core'));\n      assert(!overlayFS.existsSync('node_modules/parcel'));\n      assert(!overlayFS.existsSync('node_modules/.bin/parcel'));\n    });\n\n    it('unlinks from a custom package root', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        .parcel-link: ${{\n          appRoot: '/app',\n          packageRoot: '/package-root',\n          nodeModulesGlobs: ['node_modules'],\n          namespace: '@parcel',\n        }}\n        node_modules/parcel -> package-root/core/parcel\n        node_modules/@parcel/core -> package-root/core/core\n        node_modules/.bin/parcel -> package-root/core/parcel/src/bin.js`;\n\n      await fsFixture(overlayFS, '/')`\n        package-root/core/core/package.json: ${{name: '@parcel/core'}}\n        package-root/core/parcel/package.json: ${{name: 'parcel'}}\n        package-root/core/parcel/src/bin.js:`;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('unlink');\n\n      assert(!overlayFS.existsSync('.parcel-link'));\n      assert(!overlayFS.existsSync('node_modules/@parcel/core'));\n      assert(!overlayFS.existsSync('node_modules/parcel'));\n      assert(!overlayFS.existsSync('node_modules/.bin/parcel'));\n    });\n\n    it('unlinks with a custom namespace', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        .parcel-link: ${{\n          appRoot: '/app',\n          packageRoot: path.resolve(__dirname, '../../..'),\n          nodeModulesGlobs: ['node_modules'],\n          namespace: '@namespace',\n        }}\n        node_modules\n          .bin/parcel -> ${path.resolve(__dirname, '../../parcel/src/bin.js')}\n          parcel -> ${path.resolve(__dirname, '../../parcel')}\n          @namespace/parcel -> ${path.resolve(__dirname, '../../parcel')}\n          parcel/core -> ${path.resolve(__dirname, '../../core')}\n          @namespace/parcel-core -> ${path.resolve(__dirname, '../../core')}`;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('unlink');\n\n      assert(!overlayFS.existsSync('.parcel-link'));\n      assert(!overlayFS.existsSync('node_modules/@parcel/core'));\n      assert(!overlayFS.existsSync('node_modules/parcel'));\n      assert(!overlayFS.existsSync('node_modules/.bin/parcel'));\n      assert(!overlayFS.existsSync('node_modules/@namespace/parcel-core'));\n      assert(!overlayFS.existsSync('node_modules/@namespace/parcel'));\n    });\n\n    // FIXME: this test fails on windows\n    it.skip('updates config for custom namespace', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        .parcelrc: ${{\n          extends: '@parcel/config-namespace',\n          transformers: {\n            '*': [\n              '@parcel/transformer-js',\n              '@namespace/parcel-transformer-local',\n            ],\n          },\n        }}\n        package.json: ${{\n          ['@parcel/transformer-js']: {},\n          ['@namespace/parcel-transformer-local']: {},\n        }}\n        .parcel-link: ${{\n          appRoot: '/app',\n          packageRoot: path.resolve(__dirname, '../../..'),\n          nodeModulesGlobs: ['node_modules'],\n          namespace: '@namespace',\n        }}`;\n\n      await fsFixture(overlayFS, '/')`\n        ${path.resolve(\n          path.join(__dirname, '../../../configs/namespace/package.json'),\n        )}: ${{\n        name: '@parcel/config-namespace',\n      }}`;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('unlink');\n\n      assert(!overlayFS.existsSync('.parcel-link'));\n\n      assert.equal(\n        overlayFS.readFileSync('.parcelrc', 'utf8'),\n        JSON.stringify({\n          extends: '@namespace/parcel-config-namespace',\n          transformers: {\n            '*': [\n              '@namespace/parcel-transformer-js',\n              '@namespace/parcel-transformer-local',\n            ],\n          },\n        }),\n      );\n\n      assert.equal(\n        overlayFS.readFileSync('package.json', 'utf8'),\n        JSON.stringify({\n          ['@namespace/parcel-transformer-js']: {},\n          ['@namespace/parcel-transformer-local']: {},\n        }),\n      );\n    });\n\n    it('unlinks with custom node modules glob', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        .parcel-link: ${{\n          appRoot: '/app',\n          packageRoot: path.resolve(__dirname, '../../..'),\n          nodeModulesGlobs: ['node_modules', 'tools/*/node_modules'],\n          namespace: '@parcel',\n        }}\n        node_modules\n          parcel -> ${path.resolve(__dirname, '../../parcel')}\n          @parcel/core -> ${path.resolve(__dirname, '../../core')}\n          .bin/parcel -> ${path.resolve(__dirname, '../../parcel/src/bin.js')}\n        tools\n          test/node_modules/parcel -> ${path.resolve(__dirname, '../../parcel')}\n          test2/node_modules/@parcel/core -> ${path.resolve(\n            __dirname,\n            '../../core',\n          )}`;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('unlink');\n\n      assert(!overlayFS.existsSync('.parcel-link'));\n      assert(!overlayFS.existsSync('node_modules/@parcel/core'));\n      assert(!overlayFS.existsSync('node_modules/parcel'));\n      assert(!overlayFS.existsSync('node_modules/.bin/parcel'));\n      assert(!overlayFS.existsSync('tools/test/node_modules/parcel'));\n      assert(!overlayFS.existsSync('tools/test2/node_modules/@parcel/core'));\n    });\n\n    it('does not do anything with dry run', async () => {\n      await fsFixture(overlayFS)`\n        yarn.lock:\n        node_modules\n          .bin/parcel -> ${path.resolve(__dirname, '../../parcel/src/bin.js')}\n          parcel -> ${path.resolve(__dirname, '../../parcel')}\n          @parcel/core -> ${path.resolve(__dirname, '../../core')}\n        .parcel-link: ${{\n          appRoot: '/app',\n          packageRoot: path.resolve(__dirname, '../../..'),\n          nodeModulesGlobs: ['node_modules'],\n          namespace: '@parcel',\n        }}\n      `;\n\n      let cli = createProgram({fs: overlayFS});\n      await cli('unlink --dry-run');\n\n      assert(overlayFS.existsSync('.parcel-link'));\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/@parcel/core'),\n        path.resolve(__dirname, '../../core'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/parcel'),\n        path.resolve(__dirname, '../../parcel'),\n      );\n\n      assert.equal(\n        overlayFS.realpathSync('node_modules/.bin/parcel'),\n        path.resolve(__dirname, '../../parcel/src/bin.js'),\n      );\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/parcel-query.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport {bundle, fsFixture, overlayFS} from '@parcel/test-utils';\nimport {loadGraphs} from '../../../dev/query/src';\n\ndescribe('parcel-query', () => {\n  it('loadGraphs', async function () {\n    let entries = 'index.js';\n    let options = {\n      mode: 'production',\n      defaultTargetOptions: {\n        shouldScopeHoist: false,\n      },\n      shouldDisableCache: false,\n      inputFS: overlayFS,\n      cacheDir: path.join(__dirname, '.parcel-cache'),\n    };\n\n    await fsFixture(overlayFS)`\n        index.js:\n            export default 1;`;\n\n    await bundle(entries, options);\n\n    const {assetGraph, bundleGraph, requestTracker, bundleInfo} =\n      await loadGraphs(options.cacheDir);\n\n    assert(bundleInfo, 'Could not load bundleInfo');\n    assert(bundleGraph, 'Could not load bundleGraph');\n    assert(assetGraph, 'Could not load assetGraph');\n    assert(requestTracker, 'Count not load requestTracker');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/parcel-register.js",
    "content": "// @flow strict-local\n\nimport {execSync} from 'child_process';\nimport assert from 'assert';\nimport path from 'path';\n\ndescribe.skip('@parcel/register', () => {\n  it('can be required at an entry script and transform following requires', () => {\n    assert.equal(\n      execSync(\n        `node ${path.join(\n          __dirname,\n          'integration',\n          'parcel-register',\n          'entry.js',\n        )}`,\n      ),\n      '123',\n    );\n  });\n\n  it('can transform with --r and --require', () => {\n    assert.equal(\n      execSync(\n        `node -r @parcel/register ${path.join(\n          __dirname,\n          'integration',\n          'parcel-register',\n          'index.js',\n        )}`,\n      ),\n      '123',\n    );\n  });\n\n  it(\"enables Parcel's resolver in node\", () => {\n    let [foo, resolved] = execSync(\n      `node -r @parcel/register ${path.join(\n        __dirname,\n        'integration',\n        'parcel-register',\n        'resolver.js',\n      )}`,\n      {cwd: path.join(__dirname, 'integration', 'parcel-register')},\n    )\n      .toString()\n      .split('\\n');\n    assert.equal(foo, 'foo');\n    assert.equal(\n      resolved,\n      path.join(__dirname, 'integration', 'parcel-register', 'foo.js'),\n    );\n  });\n\n  it('can be disposed of, which reverts resolving', () => {\n    try {\n      execSync(\n        `node ${path.join(\n          __dirname,\n          'integration',\n          'parcel-register',\n          'dispose-resolve.js',\n        )}`,\n        {\n          cwd: path.join(__dirname, 'integration', 'parcel-register'),\n          stdio: 'pipe',\n        },\n      )\n        .toString()\n        .split('\\n');\n    } catch (e) {\n      assert.equal(\n        e.stdout.toString().trim(),\n        path.join(__dirname, 'integration', 'parcel-register', 'foo.js'),\n      );\n      assert(e.stderr.includes(\"Error: Cannot find module '~foo.js'\"));\n      return;\n    }\n\n    // $FlowFixMe\n    assert.fail();\n  });\n\n  it('can be disposed of, which reverts transforming', () => {\n    try {\n      execSync(\n        `node ${path.join(\n          __dirname,\n          'integration',\n          'parcel-register',\n          'dispose-transform.js',\n        )}`,\n        {\n          cwd: path.join(__dirname, 'integration', 'parcel-register'),\n          stdio: 'pipe',\n        },\n      )\n        .toString()\n        .split('\\n');\n    } catch (e) {\n      assert.equal(e.stdout.toString().trim(), '123');\n      assert(e.stderr.includes('SyntaxError: Unexpected identifier'));\n      return;\n    }\n\n    // $FlowFixMe\n    assert.fail();\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/parser.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {assertBundleTree, bundle, inputFS as fs} from '@parcel/test-utils';\n\ndescribe.skip('parser', function () {\n  it('should support case-insensitive file extension', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/parser-case-insensitive-ext/index.html',\n      ),\n    );\n\n    await assertBundleTree(b, {\n      name: 'index.html',\n      assets: ['index.html'],\n      childBundles: [\n        {\n          type: 'svg',\n          assets: ['icons.SVG'],\n          childBundles: [],\n        },\n        {\n          type: 'css',\n          assets: ['index.cSs'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n        {\n          type: 'html',\n          assets: ['other.HTM'],\n          childBundles: [\n            {\n              type: 'js',\n              assets: ['index.js'],\n              childBundles: [\n                {\n                  type: 'map',\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    });\n\n    let files = await fs.readdir(path.join(__dirname, '/dist'));\n    let html = await fs.readFile(path.join(__dirname, '/dist/index.html'));\n    for (let file of files) {\n      let ext = file.match(/\\.([0-9a-z]+)(?:[?#]|$)/i)[0];\n      if (file !== 'index.html' && ext !== '.map') {\n        assert(html.includes(file));\n      }\n    }\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/plugin.js",
    "content": "// @flow\n\nimport assert from 'assert';\nimport invariant from 'assert';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\nimport {\n  assertBundles,\n  bundle,\n  bundler,\n  distDir,\n  findAsset,\n  getNextBuild,\n  outputFS as fs,\n  overlayFS,\n  run,\n} from '@parcel/test-utils';\nimport * as wasmmap from 'wasm-sourcemap';\nimport {relativePath} from '@parcel/utils';\n\ndescribe('plugin', function () {\n  it(\"continue transformer pipeline on type change that doesn't change the pipeline\", async function () {\n    await bundle(\n      path.join(__dirname, '/integration/pipeline-type-change/index.ini'),\n    );\n\n    let output = await fs.readFile(path.join(distDir, 'index.txt'), 'utf8');\n    assert.equal(\n      output,\n      `INPUT\nparcel-transformer-a\nparcel-transformer-b`,\n    );\n  });\n\n  it('should allow optimizer plugins to change the output file type', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/optimizer-changing-type/index.js'),\n    );\n\n    assert.deepEqual(fs.readdirSync(distDir), ['index.test']);\n  });\n\n  it('should allow resolver plugins to disable deferring', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolver-canDefer/index.js'),\n      {mode: 'production'},\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.js', 'index.js', 'a.js', 'b.js'],\n      },\n    ]);\n  });\n\n  it('should allow resolvers to return changes for dependency.meta', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolver-dependency-meta/a.js'),\n      {shouldDisableCache: false, shouldContentHash: false, inputFS: overlayFS},\n    );\n\n    let calls = [];\n    await run(b, {\n      sideEffect(v) {\n        calls.push(v);\n      },\n    });\n    assert.deepEqual(calls, [1234]);\n\n    await overlayFS.writeFile(\n      path.join(__dirname, '/integration/resolver-dependency-meta/a.js'),\n      (await overlayFS.readFile(\n        path.join(__dirname, '/integration/resolver-dependency-meta/a.js'),\n        'utf8',\n      )) + '\\n// abc',\n    );\n\n    b = await bundle(\n      path.join(__dirname, '/integration/resolver-dependency-meta/a.js'),\n      {shouldDisableCache: false, shouldContentHash: false, inputFS: overlayFS},\n    );\n\n    calls = [];\n    await run(b, {\n      sideEffect(v) {\n        calls.push(v);\n      },\n    });\n    assert.deepEqual(calls, [1234]);\n  });\n\n  it('invalidate the cache based on loadBundleConfig in a packager', async function () {\n    let fixture = path.join(\n      __dirname,\n      '/integration/packager-loadBundleConfig',\n    );\n    let entry = path.join(fixture, 'index.html');\n\n    let b = await bundler(entry, {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n    });\n\n    let subscription = await b.watch();\n    try {\n      let bundleEvent = await getNextBuild(b);\n      invariant(bundleEvent.type === 'buildSuccess');\n\n      assert.strictEqual(\n        await overlayFS.readFile(\n          nullthrows(\n            bundleEvent.bundleGraph\n              .getBundles()\n              .find(b => b.getMainEntry()?.filePath.endsWith('a.txt')),\n          ).filePath,\n          'utf8',\n        ),\n        `Bundles: a.txt. Contents: Hello from a\\n`,\n      );\n\n      await overlayFS.copyFile(path.join(fixture, 'index.2.html'), entry);\n\n      bundleEvent = await getNextBuild(b);\n      invariant(bundleEvent.type === 'buildSuccess');\n\n      assert.strictEqual(\n        await overlayFS.readFile(\n          nullthrows(\n            bundleEvent.bundleGraph\n              .getBundles()\n              .find(b => b.getMainEntry()?.filePath.endsWith('a.txt')),\n          ).filePath,\n          'utf8',\n        ),\n        `Bundles: a.txt,b.txt. Contents: Hello from a\\n`,\n      );\n      assert.strictEqual(\n        await overlayFS.readFile(\n          nullthrows(\n            bundleEvent.bundleGraph\n              .getBundles()\n              .find(b => b.getMainEntry()?.filePath.endsWith('b.txt')),\n          ).filePath,\n          'utf8',\n        ),\n        `Bundles: a.txt,b.txt. Contents: Hello from b\\n`,\n      );\n    } finally {\n      await subscription.unsubscribe();\n    }\n  });\n\n  it('invalidate the cache based on loadConfig in a packager', async function () {\n    let fixture = path.join(__dirname, '/integration/packager-loadConfig');\n    let entry = path.join(fixture, 'index.txt');\n    let config = path.join(fixture, 'foo.config.json');\n    let b = await bundle(entry, {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n    });\n\n    assert.strictEqual(\n      await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8'),\n      '1234',\n    );\n\n    await overlayFS.writeFile(config, JSON.stringify({contents: 'xyz'}));\n\n    b = await bundle(entry, {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n    });\n    assert.strictEqual(\n      await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8'),\n      'xyz',\n    );\n  });\n\n  it('merges symbol information when applying runtime assets', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/runtime-symbol-merging/entry.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n        mode: 'production',\n      },\n    );\n\n    assert(!findAsset(b, 'index.js'));\n    assert.deepStrictEqual(\n      new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'a.js')))),\n      new Set(['a']),\n    );\n    assert.deepStrictEqual(\n      new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'b.js')))),\n      new Set(['b']),\n    );\n\n    let calls = [];\n    await run(b, {\n      call(v) {\n        calls.push(v);\n      },\n    });\n    assert.deepStrictEqual(calls, [789, 123]);\n  });\n\n  it('properly excludes assets that are excluded and deferred by both app code and runtimes', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/runtime-deferred-excluded/index.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    let calls = [];\n    let output = await run(b, {\n      f(v) {\n        calls.push(v);\n      },\n    });\n\n    assert.deepStrictEqual(\n      // `output` is from the vm and so is not deepStrictEqual\n      [...output],\n      ['index', 'used'],\n    );\n    assert.deepStrictEqual(calls, ['used']);\n  });\n\n  it('handles multiple assets returned by a transformer', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/multi-asset-transformer/index.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assert.equal(await run(b), 2);\n  });\n\n  it('throws when multiple assets returned by a transformer import a missing symbol', async function () {\n    let source = path.join(\n      __dirname,\n      '/integration/multi-asset-transformer-export/index.js',\n    );\n    let message = `index.js does not export 'foo'`;\n\n    // $FlowFixMe[prop-missing]\n    await assert.rejects(\n      () =>\n        bundle(source, {\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n        }),\n      {\n        name: 'BuildError',\n        message,\n        diagnostics: [\n          {\n            message,\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: source,\n                language: 'js',\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 9,\n                    },\n                    end: {\n                      line: 1,\n                      column: 11,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      },\n    );\n  });\n\n  it('should allow resolvers to invalidateOnEnvChange', async () => {\n    async function assertAsset(replacedCode) {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/resolver-can-invalidateonenvchange/index.js',\n        ),\n        {\n          shouldDisableCache: false,\n          inputFS: overlayFS,\n          env: {replacedCode},\n        },\n      );\n      let code = await b.getBundles()[0].getEntryAssets()[0].getCode();\n      assert(code.indexOf(replacedCode) !== -1);\n    }\n    await assertAsset('const replaced = 1;');\n    await assertAsset('const replaced = 2;');\n  });\n\n  it('should output sourcemaps when packaging Wasm', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/wasm-sourcemap-transformer/index.js'),\n    );\n    let wasmPath = nullthrows(\n      b.getBundles().find(b => b.type === 'wasm'),\n    ).filePath;\n    let mapPath = wasmPath + '.map';\n    assert(await fs.exists(mapPath));\n\n    let wasm = await fs.readFile(wasmPath);\n    assert.equal(\n      wasmmap.GetSourceMapURL(wasm),\n      relativePath(distDir, mapPath, false),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/pnp.js",
    "content": "import assert from 'assert';\nimport Module from 'module';\nimport path from 'path';\nimport {bundle, run, assertBundles} from '@parcel/test-utils';\n\ndescribe('pnp', function () {\n  it('should defer to the pnp resolution when needed', async function () {\n    let dir = path.join(__dirname, 'integration/pnp-require');\n\n    let origPnpVersion = process.versions.pnp;\n    process.versions.pnp = 42;\n\n    let origModuleResolveFilename = Module._resolveFilename;\n    Module.findPnpApi = () => require(path.join(dir, '.pnp.js'));\n    Module._resolveFilename = (name, ...args) =>\n      name === 'pnpapi'\n        ? path.join(dir, '.pnp.js')\n        : origModuleResolveFilename(name, ...args);\n\n    try {\n      let b = await bundle(path.join(dir, 'index.js'));\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['index.js', 'local.js', 'index.js'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert.equal(output(), 3);\n    } finally {\n      process.versions.pnp = origPnpVersion;\n      Module._resolveFilename = origModuleResolveFilename;\n    }\n  });\n\n  it('should support importing Node builtin modules from npm when requested', async function () {\n    let dir = path.join(__dirname, 'integration/pnp-builtin');\n\n    let origPnpVersion = process.versions.pnp;\n    process.versions.pnp = 42;\n\n    let origModuleResolveFilename = Module._resolveFilename;\n    Module.findPnpApi = () => require(path.join(dir, '.pnp.js'));\n    Module._resolveFilename = (name, ...args) =>\n      name === 'pnpapi'\n        ? path.join(dir, '.pnp.js')\n        : origModuleResolveFilename(name, ...args);\n\n    try {\n      let b = await bundle(path.join(dir, 'index.js'));\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['index.js', 'local.js', 'index.js'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert.equal(output(), 3);\n    } finally {\n      process.versions.pnp = origPnpVersion;\n      Module._resolveFilename = origModuleResolveFilename;\n    }\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/postcss.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  bundler,\n  run,\n  assertBundles,\n  distDir,\n  inputFS,\n  outputFS,\n  overlayFS,\n  ncp,\n  getNextBuild,\n} from '@parcel/test-utils';\nimport {\n  NodePackageManager,\n  MockPackageInstaller,\n} from '@parcel/package-manager';\n\ndescribe('postcss', () => {\n  it('should build successfully with only postcss-modules config', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-modules-config/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['foo.css', 'foo.js', 'index.css', 'index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['foo.css', 'index.css'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n\n    let value = output();\n    assert(/foo_[0-9a-z]/.test(value));\n\n    let cssClass = value.match(/(foo_[0-9a-z])/)[1];\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes(`.${cssClass}`));\n  });\n\n  it('should build successfully with only postcss-modules config in package.json', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/postcss-modules-config-package/index.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['foo.css', 'foo.js', 'index.css', 'index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['foo.css', 'index.css'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n\n    let value = output();\n    assert(/foo_[0-9a-z]/.test(value));\n\n    let cssClass = value.match(/(foo_[0-9a-z])/)[1];\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes(`.${cssClass}`));\n  });\n\n  it('should support transforming with postcss twice with the same result', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-plugins/index.js'),\n    );\n    let c = await bundle(\n      path.join(__dirname, '/integration/postcss-plugins/index2.js'),\n    );\n\n    let [run1, run2] = await Promise.all([run(b), run(c)]);\n\n    assert.equal(run1(), run2());\n  });\n\n  it('should support transforming declarations with missing source', async () => {\n    await bundle(\n      path.join(__dirname, '/integration/postcss-plugins-decl/index.css'),\n    );\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n\n    assert(css.includes('url(\"data:image/gif;base64,quotes\")'));\n  });\n\n  it('should automatically install postcss plugins if needed', async () => {\n    let inputDir = path.join(__dirname, '/input');\n    await outputFS.rimraf(inputDir);\n    await ncp(\n      path.join(__dirname, '/integration/postcss-autoinstall/npm'),\n      inputDir,\n    );\n\n    let packageInstaller = new MockPackageInstaller();\n    packageInstaller.register(\n      'postcss-test',\n      inputFS,\n      path.join(__dirname, '/integration/postcss-autoinstall/postcss-test'),\n    );\n\n    // The package manager uses an overlay filesystem, which performs writes to\n    // an in-memory fs and reads first from memory, then falling back to the real fs.\n    let packageManager = new NodePackageManager(\n      overlayFS,\n      inputDir,\n      packageInstaller,\n    );\n\n    let distDir = path.join(outputFS.cwd(), 'dist');\n\n    await bundle(path.join(__dirname, '/input/index.css'), {\n      inputFS: overlayFS,\n      packageManager,\n      shouldAutoInstall: true,\n      defaultTargetOptions: {\n        distDir,\n      },\n    });\n\n    // cssnext was installed\n    let pkg = JSON.parse(\n      await outputFS.readFile(\n        path.join(__dirname, '/input/package.json'),\n        'utf8',\n      ),\n    );\n    assert(pkg.devDependencies['postcss-test']);\n\n    // postcss-test is applied\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('background: green'));\n\n    // Increase the timeout for just this test. It takes a while with npm.\n    // This method works with arrow functions, and doesn't seem to be documented\n    // on the main Mocha docs.\n    // https://stackoverflow.com/questions/15971167/how-to-increase-timeout-for-a-single-test-case-in-mocha\n  });\n\n  it('should support using postcss for importing', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-import/style.css'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'style.css',\n        assets: ['style.css'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'style.css'), 'utf8');\n    assert.equal(css.split('red').length - 1, 1);\n  });\n\n  it('should support using a postcss config in package.json', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-config-package/style.css'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'style.css',\n        assets: ['style.css'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'style.css'), 'utf8');\n\n    assert(/background-color:\\s*red/.test(css));\n  });\n\n  it('Should support postcss.config.js config file with PostCSS 7 plugin', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-js-config-7/style.css'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'style.css',\n        assets: ['style.css'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'style.css'), 'utf8');\n    assert(css.includes('background-color: red;'));\n  });\n\n  it('Should support postcss.config.js config file with PostCSS 8 plugin', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/postcss-js-config-8/style.css'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'style.css',\n        assets: ['style.css'],\n      },\n    ]);\n  });\n\n  it('should support dir-dependency messages from plugins', async function () {\n    let inputDir = path.join(\n      __dirname,\n      '/input',\n      Math.random().toString(36).slice(2),\n    );\n    await inputFS.mkdirp(inputDir);\n    await inputFS.ncp(\n      path.join(__dirname, '/integration/postcss-dir-dependency'),\n      inputDir,\n    );\n\n    let b = await bundler(path.join(inputDir, 'index.css'));\n\n    let subscription = await b.watch();\n    let buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildSuccess');\n\n    let contents = await outputFS.readFile(\n      buildEvent.bundleGraph.getBundles()[0].filePath,\n      'utf8',\n    );\n    assert(\n      contents.includes(\n        'background: linear-gradient(green, pink), linear-gradient(red, orange)',\n      ),\n    );\n\n    // update\n    await inputFS.writeFile(\n      path.join(inputDir, 'backgrounds', 'green.txt'),\n      'linear-gradient(purple, orange)',\n    );\n\n    buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildSuccess');\n\n    contents = await outputFS.readFile(\n      buildEvent.bundleGraph.getBundles()[0].filePath,\n      'utf8',\n    );\n    assert(\n      contents.includes(\n        'background: linear-gradient(purple, orange), linear-gradient(red, orange)',\n      ),\n    );\n\n    // create\n    await inputFS.writeFile(\n      path.join(inputDir, 'backgrounds', 'orange.txt'),\n      'linear-gradient(orange, purple)',\n    );\n\n    buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildSuccess');\n\n    contents = await outputFS.readFile(\n      buildEvent.bundleGraph.getBundles()[0].filePath,\n      'utf8',\n    );\n    assert(\n      contents.includes(\n        'background: linear-gradient(purple, orange), linear-gradient(orange, purple), linear-gradient(red, orange)',\n      ),\n    );\n\n    // delete\n    await inputFS.unlink(path.join(inputDir, 'backgrounds', 'red.txt'));\n\n    buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildSuccess');\n\n    contents = await outputFS.readFile(\n      buildEvent.bundleGraph.getBundles()[0].filePath,\n      'utf8',\n    );\n    assert(\n      contents.includes(\n        'background: linear-gradient(purple, orange), linear-gradient(orange, purple)',\n      ),\n    );\n\n    await subscription.unsubscribe();\n  });\n\n  it('should throw an error with code frame when .postcssrc is invalid', async function () {\n    let configFilePath = path.join(\n      __dirname,\n      '/integration/postcss-modules-config-invalid/.postcssrc',\n    );\n    let code = await inputFS.readFile(configFilePath, 'utf8');\n    await assert.rejects(\n      () =>\n        bundle(\n          path.join(\n            __dirname,\n            '/integration/postcss-modules-config-invalid/src/index.css',\n          ),\n        ),\n      {\n        name: 'BuildError',\n        diagnostics: [\n          {\n            codeFrames: [\n              {\n                code,\n                filePath: configFilePath,\n                language: 'json5',\n                codeHighlights: [\n                  {\n                    end: {\n                      column: 5,\n                      line: 5,\n                    },\n                    start: {\n                      column: 5,\n                      line: 5,\n                    },\n                    message: `JSON5: invalid character '\\\\\"' at 5:5`,\n                  },\n                ],\n              },\n            ],\n            message: 'Failed to parse .postcssrc',\n            origin: '@parcel/utils',\n          },\n        ],\n      },\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/posthtml.js",
    "content": "import assert from 'assert';\nimport {\n  bundle,\n  assertBundles,\n  removeDistDirectory,\n  distDir,\n  inputFS,\n  outputFS,\n  overlayFS,\n  ncp,\n} from '@parcel/test-utils';\nimport path from 'path';\nimport {\n  NodePackageManager,\n  MockPackageInstaller,\n} from '@parcel/package-manager';\n\ndescribe('posthtml', function () {\n  afterEach(async () => {\n    await removeDistDirectory();\n  });\n\n  it('should support transforming HTML with posthtml', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/posthtml/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(path.join(distDir, 'index.html'));\n    assert(html.includes('<h1>Other page</h1>'));\n  });\n\n  it('should find assets inside posthtml', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/posthtml-assets/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n    ]);\n  });\n\n  it.skip('Should be able to process an html file with plugins without any params for plugin', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/posthtml-plugins/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf-8',\n    );\n    assert(\n      html.includes(\n        '&#115;&#97;&#109;&#64;&#115;&#109;&#105;&#116;&#104;&#46;&#99;&#111;&#109;',\n      ),\n    );\n    assert(!html.includes('sam@smith.com'));\n  });\n\n  it.skip('should add dependencies referenced by posthtml-include', async () => {\n    const b = await bundle(\n      path.join(__dirname, '/integration/posthtml-assets/index.html'),\n    );\n    const asset = b.assets.values().next().value;\n    const other = path.join(\n      __dirname,\n      '/integration/posthtml-assets/other.html',\n    );\n    assert(asset.dependencies.has(other));\n    assert(asset.dependencies.get(other).includedInParent);\n  });\n\n  it.skip('should add dependencies referenced by plugins', async () => {\n    const b = await bundle(\n      path.join(__dirname, '/integration/posthtml-plugin-deps/index.html'),\n    );\n    const asset = b.assets.values().next().value;\n    const other = path.join(\n      __dirname,\n      '/integration/posthtml-plugin-deps/base.html',\n    );\n    assert(asset.dependencies.has(other));\n    assert(asset.dependencies.get(other).includedInParent);\n  });\n\n  it('should automatically install posthtml plugins if needed', async () => {\n    let inputDir = path.join(__dirname, '/input');\n    await outputFS.rimraf(inputDir);\n    await ncp(\n      path.join(__dirname, '/integration/posthtml-autoinstall'),\n      inputDir,\n    );\n\n    let packageInstaller = new MockPackageInstaller();\n    packageInstaller.register(\n      'posthtml-test',\n      inputFS,\n      path.join(__dirname, '/integration/posthtml-autoinstall/posthtml-test'),\n    );\n\n    // The package manager uses an overlay filesystem, which performs writes to\n    // an in-memory fs and reads first from memory, then falling back to the real fs.\n    let packageManager = new NodePackageManager(\n      overlayFS,\n      inputDir,\n      packageInstaller,\n    );\n\n    let distDir = path.join(outputFS.cwd(), 'dist');\n\n    await bundle(path.join(__dirname, '/input/index.html'), {\n      inputFS: overlayFS,\n      packageManager,\n      shouldAutoInstall: true,\n      defaultTargetOptions: {\n        distDir,\n      },\n    });\n\n    // posthtml-test was installed\n    let pkg = JSON.parse(\n      await outputFS.readFile(\n        path.join(__dirname, '/input/package.json'),\n        'utf8',\n      ),\n    );\n    assert(pkg.devDependencies['posthtml-test']);\n\n    // posthtml-test is applied\n    let html = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    assert(html.includes('<span id=\"test\">Test</span>'));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/project-specific-lockfiles/packages/app/.gitkeep",
    "content": ""
  },
  {
    "path": "packages/core/integration-tests/test/project-specific-lockfiles/packages/app/README.md",
    "content": "This directory exists for the `should correctly detect changes when watchDir is higher up in a project-only lockfile monorepo` test.\n\nWithout it I was getting a `Uncaught Error: No such file or directory` error stemming from [this line](https://github.com/parcel-bundler/parcel/blob/3b798e0456bbef951c684d43f96fda1fea386f62/packages/core/fs/src/OverlayFS.js#L375). The test itself doesn't care about watching the readable file system but it was necessary because `.watch` on `OverlayFS` subscribes to both the readable and writable filesystems.\n"
  },
  {
    "path": "packages/core/integration-tests/test/proxy.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport path from 'path';\nimport {bundler, getNextBuild, inputFS} from '@parcel/test-utils';\nimport http from 'http';\nimport getPort from 'get-port';\n\nconst config = path.join(\n  __dirname,\n  './integration/custom-configs/.parcelrc-dev-server',\n);\n\nfunction apiServer() {\n  const server = http\n    .createServer((req, res) => {\n      res.writeHead(200, {'Content-Type': 'text/plain'});\n      res.write('Request URL: ' + req.url);\n      res.end();\n    })\n    .listen(9753);\n\n  return server;\n}\n\nfunction get(file, port, client = http) {\n  return new Promise((resolve, reject) => {\n    client.get(\n      {\n        hostname: 'localhost',\n        port: port,\n        path: file,\n        rejectUnauthorized: false,\n      },\n      res => {\n        res.setEncoding('utf8');\n        let data = '';\n        res.on('data', c => (data += c));\n        res.on('end', () => {\n          if (res.statusCode !== 200) {\n            return reject({statusCode: res.statusCode, data});\n          }\n\n          resolve(data);\n        });\n      },\n    );\n  });\n}\n\ndescribe('proxy', function () {\n  let subscription;\n  let cwd;\n  let server;\n  beforeEach(function () {\n    cwd = inputFS.cwd();\n  });\n\n  afterEach(async () => {\n    inputFS.chdir(cwd);\n    if (subscription) {\n      await subscription.unsubscribe();\n    }\n    subscription = null;\n    if (server) {\n      await server.close();\n    }\n    server = null;\n  });\n\n  it('should handle proxy table written in .proxyrc', async function () {\n    let dir = path.join(__dirname, 'integration/proxyrc');\n    inputFS.chdir(dir);\n\n    let port = await getPort();\n    let b = bundler(path.join(dir, 'index.js'), {\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    server = apiServer();\n\n    let data = await get('/index.js', port);\n    assert.notEqual(data, 'Request URL: /index.js');\n\n    data = await get('/api/get', port);\n    assert.equal(data, 'Request URL: /api/get');\n  });\n\n  it('should handle proxy table written in .proxyrc.json', async function () {\n    let dir = path.join(__dirname, 'integration/proxyrc-json');\n    inputFS.chdir(dir);\n\n    let port = await getPort();\n    let b = bundler(path.join(dir, 'index.js'), {\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    server = apiServer();\n\n    let data = await get('/index.js', port);\n    assert.notEqual(data, 'Request URL: /index.js');\n\n    data = await get('/api/get', port);\n    assert.equal(data, 'Request URL: /api/get');\n  });\n\n  it('should handle proxy table written in .proxyrc.js', async function () {\n    let dir = path.join(__dirname, 'integration/proxyrc-js');\n    inputFS.chdir(dir);\n\n    let port = await getPort();\n    let b = bundler(path.join(dir, 'index.js'), {\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    server = apiServer();\n\n    let data = await get('/index.js', port);\n    assert.notEqual(data, 'Request URL: /index.js');\n\n    data = await get('/api/get', port);\n    assert.equal(data, 'Request URL: /get');\n  });\n\n  it('should handle proxy table written in .proxyrc.cjs', async function () {\n    let dir = path.join(__dirname, 'integration/proxyrc-cjs');\n    inputFS.chdir(dir);\n\n    let port = await getPort();\n    let b = bundler(path.join(dir, 'index.js'), {\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    server = apiServer();\n\n    let data = await get('/index.js', port);\n    assert.notEqual(data, 'Request URL: /index.js');\n\n    data = await get('/api/get', port);\n    assert.equal(data, 'Request URL: /get');\n  });\n\n  it('should handle proxy table written in .proxyrc.mjs', async function () {\n    let dir = path.join(__dirname, 'integration/proxyrc-mjs');\n    inputFS.chdir(dir);\n\n    let port = await getPort();\n    let b = bundler(path.join(dir, 'index.js'), {\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    server = apiServer();\n\n    let data = await get('/index.js', port);\n    assert.notEqual(data, 'Request URL: /index.js');\n\n    data = await get('/api/get', port);\n    assert.equal(data, 'Request URL: /get');\n  });\n\n  it('should handle proxy table written in .proxyrc.ts', async function () {\n    let dir = path.join(__dirname, 'integration/proxyrc-ts');\n    inputFS.chdir(dir);\n\n    let port = await getPort();\n    let b = bundler(path.join(dir, 'index.js'), {\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    server = apiServer();\n\n    let data = await get('/index.js', port);\n    assert.notEqual(data, 'Request URL: /index.js');\n\n    data = await get('/api/get', port);\n    assert.equal(data, 'Request URL: /get');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/pug.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {assertBundles, bundle, outputFS, distDir} from '@parcel/test-utils';\n\ndescribe('pug', function () {\n  it('should support bundling HTML', async function () {\n    const b = await bundle(path.join(__dirname, '/integration/pug/index.pug'));\n\n    assertBundles(b, [\n      {\n        type: 'html',\n        name: 'index.html',\n        assets: ['index.pug'],\n      },\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n      {\n        type: 'svg',\n        assets: ['icons.svg'],\n      },\n      {\n        type: 'css',\n        assets: ['index.css'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    const files = await outputFS.readdir(distDir);\n    const html = await outputFS.readFile(path.join(distDir, 'index.html'));\n    for (let file of files) {\n      const ext = file.match(/\\.([0-9a-z]+)(?:[?#]|$)/i)[0];\n      if (file !== 'index.html' && ext !== '.map') {\n        assert(html.includes(file));\n      }\n    }\n  });\n\n  it('should support include and extends files, connect files', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/pug-include-extends/index.pug'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'html',\n        name: 'index.html',\n        assets: ['index.pug'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(path.join(distDir, 'index.html'));\n\n    assert(html.includes('<!DOCTYPE html>'));\n    assert(html.includes(\"<h1>Yep, it's working!</h1>\"));\n    assert(html.includes('<p>And for nested.</p>'));\n  });\n\n  it('should support variables', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/pug-var/index.pug'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'html',\n        name: 'index.html',\n        assets: ['index.pug'],\n      },\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(path.join(distDir, 'index.html'));\n    assert(/src=\"\\/?100x100.*.png\"/.test(html));\n  });\n\n  it('should support mixins', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/pug-mixins/index.pug'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'html',\n        name: 'index.html',\n        assets: ['index.pug'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(path.join(distDir, 'index.html'));\n    assert(html.includes('Greetings, Parcel'));\n  });\n\n  it('should support filters', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/pug-filters/index.pug'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'html',\n        name: 'index.html',\n        assets: ['index.pug'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(path.join(distDir, 'index.html'));\n    assert(html.includes('FILTERED: Hello!'));\n  });\n\n  it('should support locals with config file', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/pug-locals/index.pug'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'html',\n        name: 'index.html',\n        assets: ['index.pug'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(path.join(distDir, 'index.html'));\n    assert(html.includes(\"It's a great!\"));\n  });\n\n  it('should minify HTML in production mode', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/pug-minify/index.pug'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.pug'],\n      },\n    ]);\n\n    const html = await outputFS.readFile(path.join(distDir, 'index.html'));\n    assert(html.includes('Minified'));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/react-refresh.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport invariant from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  bundler,\n  getNextBuild,\n  overlayFS as fs,\n  sleep,\n  run,\n  getNextBuildSuccess,\n} from '@parcel/test-utils';\nimport getPort from 'get-port';\nimport type {BuildEvent, Asset} from '@parcel/types';\n// flowlint-next-line untyped-import:off\nimport JSDOM from 'jsdom';\nimport nullthrows from 'nullthrows';\n\nlet MessageChannel;\ntry {\n  ({MessageChannel} = require('worker_threads'));\n} catch (_) {\n  // eslint-disable-next-line no-console\n  console.log(\n    'Skipping React Fast Refresh tests because they require worker_threads',\n  );\n}\n\nif (MessageChannel) {\n  describe('react-refresh', function () {\n    describe('synchronous (automatic runtime)', () => {\n      const testDir = path.join(\n        __dirname,\n        '/integration/react-refresh-automatic',\n      );\n\n      let b,\n        root,\n        randoms,\n        subscription,\n        window = {};\n\n      beforeEach(async () => {\n        ({b, root, randoms, subscription, window} = await setup(\n          path.join(testDir, 'index.html'),\n        ));\n      });\n\n      it('retains state in functional components', async function () {\n        await fs.mkdirp(testDir);\n        await fs.copyFile(\n          path.join(testDir, 'Foo.1.js'),\n          path.join(testDir, 'Foo.js'),\n        );\n        assert.equal((await getNextBuild(b)).type, 'buildSuccess');\n\n        // Wait for the hmr-runtime to process the event\n        await sleep(100);\n\n        let [, indexNum, appNum, fooText, fooNum] = root.textContent.match(\n          /^([\\d.]+) ([\\d.]+) ([\\w]+):([\\d.]+)$/,\n        );\n        assert.equal(randoms?.indexNum, indexNum);\n        assert.equal(randoms?.appNum, appNum);\n        assert.equal(randoms?.fooNum, fooNum);\n        assert.equal(fooText, 'OtherFunctional');\n      });\n\n      afterEach(async () => {\n        await cleanup({subscription, window});\n      });\n    });\n\n    describe('synchronous', () => {\n      const testDir = path.join(__dirname, '/integration/react-refresh');\n\n      let b,\n        root,\n        window,\n        subscription,\n        randoms = {};\n\n      beforeEach(async () => {\n        ({b, root, window, subscription, randoms} = await setup(\n          path.join(testDir, 'index.html'),\n        ));\n      });\n\n      it('retains state in functional components', async function () {\n        await fs.mkdirp(testDir);\n        await fs.copyFile(\n          path.join(testDir, 'Foo.1.js'),\n          path.join(testDir, 'Foo.js'),\n        );\n        assert.equal((await getNextBuild(b)).type, 'buildSuccess');\n\n        // Wait for the hmr-runtime to process the event\n        await sleep(100);\n\n        let [, indexNum, appNum, fooText, fooNum] = root.textContent.match(\n          /^([\\d.]+) ([\\d.]+) ([\\w]+):([\\d.]+)$/,\n        );\n        assert.equal(randoms?.indexNum, indexNum);\n        assert.equal(randoms?.appNum, appNum);\n        assert.equal(randoms?.fooNum, fooNum);\n        assert.equal(fooText, 'OtherFunctional');\n      });\n\n      it('supports changing hooks in functional components', async function () {\n        await fs.mkdirp(testDir);\n        await fs.copyFile(\n          path.join(testDir, 'Foo.2-hooks.js'),\n          path.join(testDir, 'Foo.js'),\n        );\n        assert.equal((await getNextBuild(b)).type, 'buildSuccess');\n\n        // Wait for the hmr-runtime to process the event\n        await sleep(100);\n\n        let [, indexNum, appNum, fooText, fooNum, fooNum2] =\n          root.textContent.match(\n            /^([\\d.]+) ([\\d.]+) ([\\w]+):([\\d.]+):([\\d.]+)$/,\n          );\n        assert.equal(randoms?.indexNum, indexNum);\n        assert.equal(randoms?.appNum, appNum);\n        assert.notEqual(randoms?.fooNum, fooNum);\n        assert(fooNum2);\n        assert.equal(fooText, 'Hooks');\n      });\n\n      it('retains state in parent components when swapping function and class component', async function () {\n        await fs.mkdirp(testDir);\n        await fs.copyFile(\n          path.join(testDir, 'Foo.3-class.js'),\n          path.join(testDir, 'Foo.js'),\n        );\n        assert.equal((await getNextBuild(b)).type, 'buildSuccess');\n\n        // Wait for the hmr-runtime to process the event\n        await sleep(100);\n\n        let [, indexNum, appNum, fooText, fooNum] = root.textContent.match(\n          /^([\\d.]+) ([\\d.]+) ([\\w]+):([\\d.]+)$/,\n        );\n        assert.equal(randoms?.indexNum, indexNum);\n        assert.equal(randoms?.appNum, appNum);\n        assert.notEqual(randoms?.fooNum, fooNum);\n        assert.equal(fooText, 'Class');\n      });\n\n      afterEach(async () => {\n        await cleanup({subscription, window});\n      });\n    });\n\n    describe('lazy child component', () => {\n      const testDir = path.join(\n        __dirname,\n        '/integration/react-refresh-lazy-child',\n      );\n\n      let b,\n        root,\n        window,\n        subscription,\n        randoms = {};\n\n      beforeEach(async () => {\n        ({b, root, window, subscription, randoms} = await setup(\n          path.join(testDir, 'index.html'),\n        ));\n      });\n\n      it('retains state in async components on change', async function () {\n        assert.equal(randoms?.fooText, 'Async');\n\n        await fs.mkdirp(testDir);\n        await fs.copyFile(\n          path.join(testDir, 'Async.1.js'),\n          path.join(testDir, 'Async.js'),\n        );\n        assert.equal((await getNextBuild(b)).type, 'buildSuccess');\n\n        // Wait for the hmr-runtime to process the event\n        await sleep(100);\n\n        let [, indexNum, appNum, fooText, fooNum] = root.textContent.match(\n          /^([\\d.]+) ([\\d.]+) ([\\w]+):([\\d.]+)$/,\n        );\n        assert.equal(randoms?.indexNum, indexNum);\n        assert.equal(randoms?.appNum, appNum);\n        assert.equal(randoms?.fooNum, fooNum);\n        assert.equal(fooText, 'OtherAsync');\n      });\n\n      afterEach(async () => {\n        await cleanup({subscription, window});\n      });\n    });\n\n    describe('circular context dependency', () => {\n      const testDir = path.join(\n        __dirname,\n        '/integration/react-refresh-circular',\n      );\n\n      let b,\n        root,\n        subscription,\n        window = {};\n\n      beforeEach(async () => {\n        ({b, root, subscription, window} = await setup(\n          path.join(testDir, 'index.html'),\n        ));\n      });\n\n      it('does not become null when modifying provider', async function () {\n        await fs.mkdirp(testDir);\n        let f = path.join(testDir, 'Provider.js');\n        await fs.writeFile(f, (await fs.readFile(f, 'utf8')).replace('2', '3'));\n        assert.equal((await getNextBuild(b)).type, 'buildSuccess');\n\n        // Wait for the hmr-runtime to process the event\n        await sleep(100);\n\n        assert.equal(root.textContent, '3');\n      });\n\n      it('does not become null when modifying consumer', async function () {\n        await fs.mkdirp(testDir);\n        let f = path.join(testDir, 'Consumer.js');\n        await fs.writeFile(\n          f,\n          (await fs.readFile(f, 'utf8')).replace('tmp', 'foo'),\n        );\n        assert.equal((await getNextBuild(b)).type, 'buildSuccess');\n\n        // Wait for the hmr-runtime to process the event\n        await sleep(100);\n\n        assert.equal(root.textContent, '2');\n      });\n\n      afterEach(async () => {\n        await cleanup({subscription, window});\n      });\n    });\n\n    it('does not error on inline scripts', async () => {\n      let port = await getPort();\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/react-refresh-inline-script/index.html',\n        ),\n        {\n          hmrOptions: {\n            port,\n          },\n        },\n      );\n      await run(b, {}, {require: false});\n    });\n\n    it('does not apply to library targets', async () => {\n      let port = await getPort();\n      let parcel = await bundler(\n        path.join(\n          __dirname,\n          '/integration/react-refresh-library-target/index.js',\n        ),\n        {\n          hmrOptions: {\n            port,\n          },\n        },\n      );\n      let result = await getNextBuildSuccess(parcel);\n      let bundle = nullthrows(\n        result.bundleGraph.getBundles().find(b => b.type === 'js'),\n      );\n\n      // Make sure react-refresh transforms were not applied.\n      let assets: Asset[] = [];\n      bundle.traverse(node => {\n        if (node.type === 'asset') {\n          assets.push(node.value);\n        } else if (node.type === 'dependency') {\n          assert(\n            !node.value.specifier.startsWith('react-refresh/runtime') &&\n              !node.value.specifier.startsWith(\n                '@parcel/transformer-react-refresh-wrap',\n              ),\n          );\n        }\n      });\n      for (let asset of assets) {\n        let code = await asset.getCode();\n        assert(\n          !code.includes('$RefreshReg$') && !code.includes('$RefreshSig$'),\n        );\n      }\n    });\n  });\n}\n\nasync function setup(entry) {\n  let port = await getPort(),\n    b,\n    window,\n    randoms,\n    subscription,\n    root;\n\n  b = bundler(entry, {\n    inputFS: fs,\n    outputFS: fs,\n    serveOptions: {\n      https: false,\n      port,\n      host: '127.0.0.1',\n    },\n    hmrOptions: {\n      port,\n    },\n    defaultConfig: path.join(\n      __dirname,\n      'integration/custom-configs/.parcelrc-dev-server',\n    ),\n    targets: {\n      default: {\n        distDir: 'dist',\n        engines: {\n          // JSDOM doesn't support type=module\n          // https://github.com/jsdom/jsdom/issues/2475\n          browsers: 'Chrome >= 58',\n        },\n      },\n    },\n  });\n\n  subscription = await b.watch();\n  let bundleEvent: BuildEvent = await getNextBuild(b);\n  invariant(bundleEvent.type === 'buildSuccess');\n  let bundleGraph = bundleEvent.bundleGraph;\n  let dom = await JSDOM.JSDOM.fromURL(\n    'http://127.0.0.1:' + port + '/index.html',\n    {\n      runScripts: 'dangerously',\n      resources: 'usable',\n      pretendToBeVisual: true,\n    },\n  );\n  window = dom.window;\n  await new Promise(res =>\n    window.document.addEventListener('load', () => {\n      res();\n    }),\n  );\n  window.console.clear = () => {};\n  window.MessageChannel = MessageChannel;\n  root = window.document.getElementById('root');\n\n  let bundle = nullthrows(bundleGraph.getBundles().find(b => b.type === 'js'));\n  let parcelRequire = Object.keys(window).find(k =>\n    k.startsWith('parcelRequire'),\n  );\n  // ReactDOM.render\n  await window[parcelRequire](\n    bundleGraph.getAssetPublicId(bundle.getEntryAssets().pop()),\n  ).default();\n  await sleep(100);\n\n  let m = root.textContent.match(/^([\\d.]+) ([\\d.]+) ([\\w]+):([\\d.]+)$/);\n  if (m) {\n    let [, indexNum, appNum, fooText, fooNum] = m;\n    assert(indexNum);\n    assert(appNum);\n    assert(fooNum);\n\n    randoms = {indexNum, appNum, fooText, fooNum};\n  }\n  return {port, b, window, randoms, subscription, root};\n}\n\nasync function cleanup({window, subscription}) {\n  if (window) {\n    window.close();\n  }\n  if (subscription) {\n    await subscription.unsubscribe();\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/react-server.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  run,\n  overlayFS,\n  fsFixture,\n  assertBundles,\n  runBundle,\n} from '@parcel/test-utils';\nimport nullthrows from 'nullthrows';\nimport {relativePath} from '@parcel/utils';\n\ndescribe('react server components', function () {\n  for (let shouldScopeHoist of [false, true]) {\n    describe(\n      shouldScopeHoist ? 'with scope hoisting' : 'without scope hoisting',\n      function () {\n        let count = 0;\n        let dir;\n        beforeEach(async () => {\n          dir = path.join(__dirname, 'react-server', '' + ++count);\n          await overlayFS.mkdirp(dir);\n          await overlayFS.writeFile(\n            path.join(dir, 'package.json'),\n            JSON.stringify({\n              name: 'react-server-test',\n              dependencies: {\n                react: '^19',\n              },\n              targets: {\n                default: {\n                  context: 'react-server',\n                },\n              },\n            }),\n          );\n\n          await overlayFS.writeFile(path.join(dir, 'yarn.lock'), '');\n        });\n\n        after(async () => {\n          await overlayFS.rimraf(path.join(__dirname, 'react-server'));\n        });\n\n        it('should support client references', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import {Client} from './client';\n            function Server() {\n              return <Client />;\n            }\n            output = {Server};\n\n          client.jsx:\n            \"use client\";\n            export function Client() {\n              return <p>Client</p>;\n            }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          let bundles = b.getBundles();\n          assert.equal(bundles.length, 2);\n          assert.equal(bundles[0].env.context, 'react-server');\n          assert.equal(bundles[1].env.context, 'react-client');\n          assertBundles(\n            b,\n            [\n              {\n                assets: ['index.jsx'],\n              },\n              {\n                assets: ['client.jsx'],\n              },\n            ],\n            {skipNodeModules: true},\n          );\n\n          let res = (await run(b, null, {require: false})).output;\n          let result = res.Server();\n          assert.equal(\n            result.type.$$typeof,\n            Symbol.for('react.client.reference'),\n          );\n          assert.equal(result.type.$$name, 'Client');\n          assert.equal(typeof result.type.$$id, 'string');\n          assert.deepEqual(result.type.$$bundles, [\n            relativePath(bundles[1].target.distDir, bundles[1].filePath, false),\n          ]);\n        });\n\n        it('should support CSS imports in server and client components', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import {Client} from './client';\n            import './server.css';\n            function Server() {\n              return <Client />;\n            }\n            output = {Server};\n\n          client.jsx:\n            \"use client\";\n            import './client.css';\n            export function Client() {\n              return <p>Client</p>;\n            }\n\n          server.css:\n            .foo { color: red }\n\n          client.css:\n            .bar { background: pink }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          let bundles = b.getBundles();\n          assert.equal(bundles.length, 3);\n          assert.equal(bundles[0].env.context, 'react-server');\n          assert.equal(bundles[1].env.context, 'react-client');\n          assert.equal(bundles[2].env.context, 'react-client');\n        });\n\n        it('should support server references from client components', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import {Client} from './client';\n            import {loadServerAction} from 'react-server-dom-parcel/server.edge';\n            function Server() {\n              return <Client />;\n            }\n\n            async function runAction(id, args) {\n              let action = await loadServerAction(id);\n              return action(...args);\n            }\n            output = {Server, runAction};\n\n          client.jsx:\n            \"use client\";\n            import {setServerCallback} from 'react-server-dom-parcel/client';\n            import {action} from './actions';\n            export function Client() {\n              return <p>Client</p>;\n            }\n\n            export function callAction() {\n              action(2);\n            }\n\n            setServerCallback(async function (id, args) {\n              callback(id, args);\n            });\n            \n            output = {callAction};\n\n          actions.js:\n            \"use server\";\n            export function action(arg) {\n              return arg + 1;\n            }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          let bundles = b.getBundles();\n          assert.equal(bundles.length, 2);\n          assert.equal(bundles[0].env.context, 'react-server');\n          assert.equal(bundles[1].env.context, 'react-client');\n          assertBundles(\n            b,\n            [\n              {\n                assets: ['index.jsx', 'actions.js'],\n              },\n              {\n                assets: ['client.jsx'],\n              },\n            ],\n            {skipNodeModules: true},\n          );\n\n          let entryAsset;\n          b.getBundles()[1].traverseAssets(a => {\n            if (a.filePath.endsWith('client.jsx')) {\n              entryAsset = a;\n            }\n          });\n          let id, args;\n          let callback = (a, b) => {\n            id = a;\n            args = b;\n          };\n          let client = (await runBundle(\n            b,\n            b.getBundles()[1],\n            {callback, output: null},\n            {require: false, entryAsset},\n          ): any);\n          let parcelRequire = nullthrows(\n            Object.keys(client).find(k => k.startsWith('parcelRequire')),\n          );\n          client[parcelRequire](b.getAssetPublicId(nullthrows(entryAsset)));\n          client.output.callAction();\n          assert.equal(typeof id, 'string');\n          assert.deepEqual(args, [2]);\n\n          let server = (await runBundle(b, b.getBundles()[0], null, {\n            require: false,\n          }): any).output;\n          let result = await server.runAction(id, args);\n          assert.equal(result, 3);\n        });\n\n        it('should support passing server references to the client', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import {Client} from './client';\n            import {action} from './actions';\n            import {loadServerAction} from 'react-server-dom-parcel/server.edge';\n            function Server() {\n              return <Client action={action} />;\n            }\n\n            function callActionDirectly() {\n              return action(2);\n            }\n\n            async function runAction(id, args) {\n              let action = await loadServerAction(id);\n              return action(...args);\n            }\n            output = {Server, callActionDirectly, runAction};\n\n          client.jsx:\n            \"use client\";\n            export function Client() {\n              return <p>Client</p>;\n            }\n\n          actions.js:\n            \"use server\";\n            export function action(arg) {\n              return arg + 1;\n            }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          let bundles = b.getBundles();\n          assert.equal(bundles.length, 2);\n          assert.equal(bundles[0].env.context, 'react-server');\n          assert.equal(bundles[1].env.context, 'react-client');\n          assertBundles(\n            b,\n            [\n              {\n                assets: ['index.jsx', 'actions.js'],\n              },\n              {\n                assets: ['client.jsx'],\n              },\n            ],\n            {skipNodeModules: true},\n          );\n\n          let res = (await run(b, null, {require: false})).output;\n          let result = res.Server();\n          assert.equal(\n            result.type.$$typeof,\n            Symbol.for('react.client.reference'),\n          );\n          assert.equal(typeof result.props.action, 'function');\n          assert.equal(\n            result.props.action.$$typeof,\n            Symbol.for('react.server.reference'),\n          );\n          assert.equal(typeof result.props.action.$$id, 'string');\n\n          let x = await res.runAction(result.props.action.$$id, [5]);\n          assert.equal(x, 6);\n\n          let v = res.callActionDirectly();\n          assert.equal(v, 3);\n        });\n\n        it('should support \"use server-entry\"', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import {use} from 'react' with {env: 'react-client'};\n            import {Server} from './App.jsx';\n            function render() {\n              use(stuff);\n              return <Server />;\n            }\n            output = {render};\n\n          App.jsx:\n            \"use server-entry\";\n            import {Client} from './client';\n            export function Server() {\n              return <Client />;\n            }\n  \n          client.jsx:\n            \"use client\";\n            import {useState} from 'react';\n            export function Client() {\n              useState();\n              return <p>Client</p>;\n            }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          assertBundles(\n            b,\n            [\n              {\n                assets: [\n                  'index.jsx',\n                  'jsx-dev-runtime.react-server.js',\n                  'react-jsx-dev-runtime.react-server.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                ],\n              },\n              {\n                assets: [\n                  'App.jsx',\n                  'jsx-dev-runtime.react-server.js',\n                  'react-dom.react-server.development.js',\n                  'react-dom.react-server.js',\n                  'react-jsx-dev-runtime.react-server.development.js',\n                  'react-server-dom-parcel-server.edge.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                  'server.edge.js',\n                ],\n              },\n              {\n                assets: [\n                  'client.jsx',\n                  'react-jsx-dev-runtime.development.js',\n                  'index.js',\n                  'react.development.js',\n                ],\n              },\n              {\n                assets: ['index.js', 'react.development.js'],\n              },\n            ],\n            {skipHelpers: true},\n          );\n        });\n\n        it('should share react between pages', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import {Page1} from './Page1.jsx';\n            import {Page2} from './Page2.jsx';\n            function render() {\n              return <Page1 /> || <Page2 />;\n            }\n            output = {render};\n\n          Page1.jsx:\n            \"use server-entry\";\n            import {Client} from './client';\n            export function Server() {\n              return <Client />;\n            }\n\n          Page2.jsx:\n            \"use server-entry\";\n            import {Client} from './client';\n            export function Server() {\n              return <Client />;\n            }\n  \n          client.jsx:\n            \"use client\";\n            import {useState} from 'react';\n            export function Client() {\n              useState();\n              return <p>Client</p>;\n            }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          assertBundles(\n            b,\n            [\n              {\n                // Server: entry\n                assets: [\n                  'index.jsx',\n                  'jsx-dev-runtime.react-server.js',\n                  'react-jsx-dev-runtime.react-server.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                ],\n              },\n              {\n                // Server: Page 1\n                assets: [\n                  'Page1.jsx',\n                  'react-dom.react-server.development.js',\n                  'react-dom.react-server.js',\n                  'react-server-dom-parcel-server.edge.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                  'server.edge.js',\n                ],\n              },\n              {\n                // Server: Page 2\n                assets: [\n                  'Page2.jsx',\n                  'react-dom.react-server.development.js',\n                  'react-dom.react-server.js',\n                  'react-server-dom-parcel-server.edge.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                  'server.edge.js',\n                ],\n              },\n              {\n                // Server: shared assets between pages.\n                assets: [\n                  'jsx-dev-runtime.react-server.js',\n                  'react-jsx-dev-runtime.react-server.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                ],\n              },\n              {\n                // Client: component.\n                assets: [\n                  'client.jsx',\n                  'index.js',\n                  'react-jsx-dev-runtime.development.js',\n                  'react.development.js',\n                ],\n              },\n            ],\n            {skipHelpers: true},\n          );\n        });\n\n        it('should share react between pages when server entry uses env import attribute', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import {use} from 'react' with {env: 'react-client'};\n            import {Page1} from './Page1.jsx';\n            import {Page2} from './Page2.jsx';\n            function render() {\n              use(stuff);\n              return <Page1 /> || <Page2 />;\n            }\n            output = {render};\n\n          Page1.jsx:\n            \"use server-entry\";\n            import {Client1} from './Client1';\n            export function Server() {\n              return <Client1 />;\n            }\n\n          Page2.jsx:\n            \"use server-entry\";\n            import {Client2} from './Client2';\n            export function Server() {\n              return <Client2 />;\n            }\n  \n          Client1.jsx:\n            \"use client\";\n            import {useState} from 'react';\n            export function Client1() {\n              useState();\n              return <p>Client 1</p>;\n            }\n\n          Client2.jsx:\n            \"use client\";\n            import {useState} from 'react';\n            export function Client2() {\n              useState();\n              return <p>Client 2</p>;\n            }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          assertBundles(\n            b,\n            [\n              {\n                // Server: entry\n                assets: [\n                  'index.jsx',\n                  'jsx-dev-runtime.react-server.js',\n                  'react-jsx-dev-runtime.react-server.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                ],\n              },\n              {\n                // Client dependencies for server\n                assets: ['index.js', 'react.development.js'],\n              },\n              {\n                // Server: Page 1\n                assets: [\n                  'Page1.jsx',\n                  'react-dom.react-server.development.js',\n                  'react-dom.react-server.js',\n                  'react-server-dom-parcel-server.edge.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                  'server.edge.js',\n                ],\n              },\n              {\n                // Server: Page 2\n                assets: [\n                  'Page2.jsx',\n                  'react-dom.react-server.development.js',\n                  'react-dom.react-server.js',\n                  'react-server-dom-parcel-server.edge.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                  'server.edge.js',\n                ],\n              },\n              {\n                // Server: shared assets between pages.\n                assets: [\n                  'jsx-dev-runtime.react-server.js',\n                  'react-jsx-dev-runtime.react-server.development.js',\n                  'react.react-server.development.js',\n                  'react.react-server.js',\n                ],\n              },\n              {\n                // Client: component.\n                assets: ['Client1.jsx'],\n              },\n              {\n                // Client: component.\n                assets: ['Client2.jsx'],\n              },\n              {\n                // Client: shared bundle.\n                assets: [\n                  'index.js',\n                  'react-jsx-dev-runtime.development.js',\n                  'react.development.js',\n                ],\n              },\n            ],\n            {skipHelpers: true},\n          );\n        });\n\n        it('should support inject CSS resources', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import {Server, foo} from './Page.jsx';\n            function render() {\n              return <Server />;\n            }\n            output = {render, foo: foo.map(f => f * 2)};\n\n          Page.jsx:\n            \"use server-entry\";\n            import './server.css';\n            export function Server() {\n              return <h1>Server</h1>;\n            }\n\n            export const foo = [1, 2, 3];\n\n          server.css:\n            .server { color: red }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          assertBundles(\n            b,\n            [\n              {\n                assets: ['index.jsx'],\n              },\n              {\n                assets: ['Page.jsx'],\n              },\n              {\n                assets: ['server.css'],\n              },\n            ],\n            {skipNodeModules: true},\n          );\n\n          let res = (await run(b, {output: null}, {require: false})).output;\n          assert.deepEqual(res.foo, [2, 4, 6]);\n          let output = res.render();\n\n          output.type.$$typeof;\n          let rendered = output.type();\n          let link = rendered.props.children[0];\n          assert.equal(link.type, 'link');\n          assert.equal(link.props.rel, 'stylesheet');\n          assert.equal(link.props.precedence, 'default');\n          let cssBundle = nullthrows(\n            b.getBundles().find(b => b.type === 'css'),\n          );\n          assert.equal(\n            link.props.href,\n            '/' +\n              relativePath(cssBundle.target.distDir, cssBundle.filePath, false),\n          );\n        });\n\n        it('should support inject CSS resources with default exports', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import Server from './Page.jsx';\n            function render() {\n              return <Server />;\n            }\n            output = {render};\n\n          Page.jsx:\n            \"use server-entry\";\n            import './server.css';\n            export default function Server() {\n              return <h1>Server</h1>;\n            }\n\n          server.css:\n            .server { color: red }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          assertBundles(\n            b,\n            [\n              {\n                assets: ['index.jsx'],\n              },\n              {\n                assets: ['Page.jsx'],\n              },\n              {\n                assets: ['server.css'],\n              },\n            ],\n            {skipNodeModules: true},\n          );\n\n          let res = (await run(b, {output: null}, {require: false})).output;\n          let output = res.render();\n\n          output.type.$$typeof;\n          let rendered = output.type();\n          let link = rendered.props.children[0];\n          assert.equal(link.type, 'link');\n          assert.equal(link.props.rel, 'stylesheet');\n          assert.equal(link.props.precedence, 'default');\n          let cssBundle = nullthrows(\n            b.getBundles().find(b => b.type === 'css'),\n          );\n          assert.equal(\n            link.props.href,\n            '/' +\n              relativePath(cssBundle.target.distDir, cssBundle.filePath, false),\n          );\n        });\n\n        it('should support inject CSS resources with CommonJS', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import Server from './Page.jsx';\n            function render() {\n              return <Server />;\n            }\n            output = {render};\n\n          Page.jsx:\n            \"use server-entry\";\n            import './server.css';\n            module.exports = function Server() {\n              return <h1>Server</h1>;\n            }\n\n          server.css:\n            .server { color: red }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          assertBundles(\n            b,\n            [\n              {\n                assets: ['index.jsx'],\n              },\n              {\n                assets: ['Page.jsx'],\n              },\n              {\n                assets: ['server.css'],\n              },\n            ],\n            {skipNodeModules: true},\n          );\n\n          let res = (await run(b, {output: null}, {require: false})).output;\n          let output = res.render();\n\n          output.type.$$typeof;\n          let rendered = output.type();\n          let link = rendered.props.children[0];\n          assert.equal(link.type, 'link');\n          assert.equal(link.props.rel, 'stylesheet');\n          assert.equal(link.props.precedence, 'default');\n          let cssBundle = nullthrows(\n            b.getBundles().find(b => b.type === 'css'),\n          );\n          assert.equal(\n            link.props.href,\n            '/' +\n              relativePath(cssBundle.target.distDir, cssBundle.filePath, false),\n          );\n        });\n\n        it('should generate an inline script for bootstrap with \"use client-entry\"', async function () {\n          await fsFixture(overlayFS, dir)`\n          index.jsx:\n            import {Server} from './Page';\n            output = {Server};\n\n          Page.jsx:\n            \"use server-entry\";\n            import {Client} from './Client';\n            import './client-entry.jsx';\n            export function Server() {\n              return <Client />;\n            }\n\n          client-entry.jsx:\n            \"use client-entry\";\n            console.log('do stuff');\n\n          Client.jsx:\n            \"use client\";\n            export function Client() {\n              return <p>Client</p>;\n            }\n        `;\n\n          let b = await bundle(path.join(dir, '/index.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          assertBundles(\n            b,\n            [\n              {\n                assets: ['index.jsx'],\n              },\n              {\n                assets: ['Page.jsx'],\n              },\n              {\n                assets: ['client-entry.jsx', 'Client.jsx'],\n              },\n            ],\n            {skipNodeModules: true},\n          );\n\n          let res = await run(b, null, {require: false});\n          let parcelRequireName = nullthrows(\n            Object.keys(res).find(k => /^parcelRequire(.+)$/.test(k)),\n          );\n          let clientEntry;\n          b.getBundles()[2].traverseAssets(a => {\n            if (\n              Array.isArray(a.meta.directives) &&\n              a.meta.directives.includes('use client-entry')\n            ) {\n              clientEntry = a;\n            }\n          });\n\n          let entryBundle = b.getBundles()[2];\n          assert.equal(\n            res.output.Server.bootstrapScript,\n            `Promise.all([import(\"/${relativePath(\n              entryBundle.target.distDir,\n              entryBundle.filePath,\n              false,\n            )}\")]).then(()=>${parcelRequireName}(\"${b.getAssetPublicId(\n              nullthrows(clientEntry),\n            )}\"))`,\n          );\n        });\n\n        it('dynamic import of server component to client component', async function () {\n          await fsFixture(overlayFS, dir)`\n          Page.jsx:\n            import './server.css';\n            export async function Server() {\n              let {Client} = await import('./Client');\n              return <Client />;\n            }\n            output = {Server};\n\n          server.css:\n            .server { color: red }\n  \n          Client.jsx:\n            \"use client\";\n            import './client.css';\n            export function Client() {\n              return <p>Client</p>;\n            }\n\n          client.css:\n            .client { color: green }\n        `;\n\n          let b = await bundle(path.join(dir, '/Page.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          assertBundles(\n            b,\n            [\n              {\n                assets: ['Page.jsx'],\n              },\n              {\n                assets: ['Client.jsx'],\n              },\n              {\n                assets: ['server.css'],\n              },\n              {\n                assets: ['client.css'],\n              },\n            ],\n            {skipNodeModules: true},\n          );\n\n          let res = (await run(b, null, {require: false})).output;\n          let output = await res.Server();\n          output.type.$$typeof;\n          let result = output.type();\n          assert.equal(\n            result.props.children[1].type.$$typeof,\n            Symbol.for('react.client.reference'),\n          );\n          assert.equal(result.props.children[1].type.$$name, 'Client');\n          assert.equal(typeof result.props.children[1].type.$$id, 'string');\n          let jsBundle = b.getBundles()[1];\n          assert.deepEqual(result.props.children[1].type.$$bundles, [\n            relativePath(jsBundle.target.distDir, jsBundle.filePath, false),\n          ]);\n\n          let link = result.props.children[0];\n          assert.equal(link.type, 'link');\n          assert.equal(link.props.rel, 'stylesheet');\n          assert.equal(link.props.precedence, 'default');\n          let cssBundle = nullthrows(\n            b\n              .getBundles()\n              .find(b => b.type === 'css' && b.name.includes('Client')),\n          );\n          assert.equal(\n            link.props.href,\n            '/' +\n              relativePath(cssBundle.target.distDir, cssBundle.filePath, false),\n          );\n        });\n\n        it('dynamic import of server component to server component', async function () {\n          await fsFixture(overlayFS, dir)`\n          Page.jsx:\n            export async function Server() {\n              let {Dynamic} = await import('./Dynamic');\n              return <Dynamic />;\n            }\n            output = {Server};\n  \n          Dynamic.jsx:\n            import './dynamic.css';\n            export function Dynamic() {\n              return <p>Dynamic</p>;\n            }\n\n          dynamic.css:\n            .dynamic { color: green }\n        `;\n\n          let b = await bundle(path.join(dir, '/Page.jsx'), {\n            inputFS: overlayFS,\n            targets: ['default'],\n            defaultTargetOptions: {\n              shouldScopeHoist,\n            },\n          });\n\n          assertBundles(\n            b,\n            [\n              {\n                assets: ['Page.jsx'],\n              },\n              {\n                assets: ['Dynamic.jsx'],\n              },\n              {\n                assets: ['dynamic.css'],\n              },\n            ],\n            {skipNodeModules: true},\n          );\n\n          let res = (await run(b, null, {require: false})).output;\n          let output = await res.Server();\n          output.type.$$typeof;\n          let result = output.type();\n\n          let link = result.props.children[0];\n          assert.equal(link.type, 'link');\n          assert.equal(link.props.rel, 'stylesheet');\n          assert.equal(link.props.precedence, 'default');\n          let cssBundle = nullthrows(\n            b\n              .getBundles()\n              .find(b => b.type === 'css' && b.name.includes('Dynamic')),\n          );\n          assert.equal(\n            link.props.href,\n            '/' +\n              relativePath(cssBundle.target.distDir, cssBundle.filePath, false),\n          );\n        });\n      },\n    );\n  }\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/react-ssg.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport {bundle, overlayFS, fsFixture, assertBundles} from '@parcel/test-utils';\nimport nullthrows from 'nullthrows';\n\ndescribe('react static', function () {\n  let count = 0;\n  let dir;\n  beforeEach(async () => {\n    dir = path.join(__dirname, 'react-static', '' + ++count);\n    await overlayFS.mkdirp(dir);\n    await overlayFS.writeFile(\n      path.join(dir, 'package.json'),\n      JSON.stringify({\n        name: 'react-static-test',\n        dependencies: {\n          react: '^19',\n        },\n        targets: {\n          'react-static': {\n            context: 'react-server',\n          },\n        },\n      }),\n    );\n\n    await overlayFS.writeFile(path.join(dir, 'yarn.lock'), '');\n  });\n\n  after(async () => {\n    await overlayFS.rimraf(path.join(__dirname, 'react-static'));\n  });\n\n  it('should render to HTML', async function () {\n    await fsFixture(overlayFS, dir)`\n    index.jsx:\n      import {Client} from './client';\n      import './bootstrap';\n\n      export default function Index() {\n        return (\n          <html>\n            <head>\n              <title>Static RSC</title>\n            </head>\n            <body>\n              <h1>This is an RSC!</h1>\n              <Client />\n            </body>\n          </html>\n        );\n      }\n\n    client.jsx:\n      \"use client\";\n      export function Client() {\n        return <p>Client</p>;\n      }\n\n    bootstrap.js:\n      \"use client-entry\";\n    `;\n\n    let b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n      mode: 'production',\n      env: {\n        NODE_ENV: 'production',\n      },\n    });\n\n    assertBundles(\n      b,\n      [\n        {\n          name: 'index.html',\n          assets: ['index.jsx'],\n        },\n        {\n          assets: ['client.jsx', 'bootstrap.js'],\n        },\n      ],\n      {skipNodeModules: true},\n    );\n\n    let files = b.getBundles()[0].files;\n    assert.equal(files.length, 2);\n    assert.equal(path.basename(files[0].filePath), 'index.html');\n    assert.equal(path.basename(files[1].filePath), 'index.rsc');\n\n    let output = await overlayFS.readFile(files[0].filePath, 'utf8');\n    assert(output.includes('<h1>This is an RSC!</h1><p>Client</p>'));\n    assert(output.includes('<script>Promise.all('));\n\n    let rsc = await overlayFS.readFile(files[1].filePath, 'utf8');\n    assert(rsc.includes('{\"children\":\"This is an RSC!\"}'));\n  });\n\n  it('should render a list of pages', async function () {\n    await fsFixture(overlayFS, dir)`\n    index.jsx:\n      import {Nav} from './Nav';\n      export default function Index(props) {\n        return (\n          <html>\n            <body>\n              <h1>Home</h1>\n              <Nav {...props} />\n            </body>\n          </html>\n        );\n      }\n\n    other.jsx:\n      import {Nav} from './Nav';\n      export default function Other(props) {\n        return (\n          <html>\n            <body>\n              <h1>Other</h1>\n              <Nav {...props} />\n            </body>\n          </html>\n        );\n      }\n\n    Nav.jsx:\n      export function Nav({pages, currentPage}) {\n        return (\n          <nav>\n            <ul>\n              {pages.map(page => (\n                <li key={page.url}>\n                  <a href={page.url} aria-current={page.url === currentPage.url ? 'page' : undefined}>\n                    {page.name.replace('.html', '')}\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </nav>\n        );\n      }\n    `;\n\n    let b = await bundle(\n      [path.join(dir, '/index.jsx'), path.join(dir, '/other.jsx')],\n      {\n        inputFS: overlayFS,\n      },\n    );\n\n    assertBundles(\n      b,\n      [\n        {\n          name: 'index.html',\n          assets: ['index.jsx', 'Nav.jsx'],\n        },\n        {\n          name: 'other.html',\n          assets: ['other.jsx', 'Nav.jsx'],\n        },\n      ],\n      {skipNodeModules: true},\n    );\n\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(\n      output.includes(\n        '<h1>Home</h1><nav><ul><li><a href=\"/index.html\" aria-current=\"page\">index</a></li><li><a href=\"/other.html\">other</a></li></ul></nav>',\n      ),\n    );\n\n    output = await overlayFS.readFile(b.getBundles()[1].filePath, 'utf8');\n    assert(\n      output.includes(\n        '<h1>Other</h1><nav><ul><li><a href=\"/index.html\">index</a></li><li><a href=\"/other.html\" aria-current=\"page\">other</a></li></ul></nav>',\n      ),\n    );\n  });\n\n  it('should support MDX', async function () {\n    await fsFixture(overlayFS, dir)`\n    index.mdx:\n      import {Layout} from './Layout';\n      export default Layout;\n\n      export const title = 'Home';\n\n      # Testing\n\n      Hello this is a test.\n\n      ## Sub title\n\n      Yo.\n\n      ~~~tsx render\n      <div>Hello</div>\n      ~~~\n\n    another.mdx:\n      import {Layout} from './Layout';\n      export default Layout;\n\n      # Another page\n\n      Hello this is a test.\n\n    Layout.jsx:\n      function Toc({toc}) {\n        return toc?.length ? <ul>{toc.map((t, i) => <li key={i}>{t.title}<Toc toc={t.children} /></li>)}</ul> : null;\n      }\n\n      export function Layout({children, pages, currentPage}) {\n        return (\n          <html>\n            <head>\n              <title>{currentPage.exports.title ?? currentPage.tableOfContents?.[0].title}</title>\n            </head>\n            <body>\n              <nav>\n                {pages.map(page => <a key={page.url} href={page.url}>\n                  {page.exports.title ?? page.tableOfContents?.[0].title}\n                </a>)}\n              </nav>\n              <aside>\n                <Toc toc={currentPage.tableOfContents} />\n              </aside>\n              <main>\n                {children}\n              </main>\n            </body>\n          </html>\n        )\n      }\n    `;\n\n    let b = await bundle(path.join(dir, '/*.mdx'), {\n      inputFS: overlayFS,\n    });\n\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<title>Home</title>'));\n    assert(\n      output.includes(\n        '<a href=\"/index.html\">Home</a><a href=\"/another.html\">Another page</a>',\n      ),\n    );\n    assert(\n      output.includes('<ul><li>Testing<ul><li>Sub title</li></ul></li></ul>'),\n    );\n    assert(output.includes('<div>Hello</div'));\n\n    output = await overlayFS.readFile(b.getBundles()[1].filePath, 'utf8');\n    assert(output.includes('<title>Another page</title>'));\n    assert(\n      output.includes(\n        '<a href=\"/index.html\">Home</a><a href=\"/another.html\">Another page</a>',\n      ),\n    );\n    assert(output.includes('<ul><li>Another page</li></ul>'));\n  });\n\n  it('should support dynamic importing a server component from a server component', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.jsx:\n        export default async function Index() {\n          let {Server} = await import('./server');\n          return (\n            <html>\n              <body>\n                <Server />\n              </body>\n            </html>\n          );\n        }\n\n      server.jsx:\n        import './server.css';\n        export function Server() {\n          return <h1>Server</h1>;\n        }\n\n      server.css:\n        h1 { color: red }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n    });\n\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<link rel=\"stylesheet\"'));\n  });\n\n  it('should support dynamic importing a client component from a server component', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.jsx:\n        export default async function Index() {\n          let {Client} = await import('./client');\n          return (\n            <html>\n              <body>\n                <Client />\n              </body>\n            </html>\n          );\n        }\n\n      client.jsx:\n        \"use client\";\n        import './client.css';\n        export function Client() {\n          return <h1>Client</h1>;\n        }\n\n      client.css:\n        h1 { color: red }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n    });\n\n    // CSS is injected via JSX. Scripts are injected by React's prepareDestinationForModule.\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<link rel=\"stylesheet\"'));\n    assert(output.includes('<script '));\n  });\n\n  it('should support dynamic importing a client component from a server component with React.lazy', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.jsx:\n        import {lazy} from 'react';\n        const Client = lazy(() => import('./client'));\n        export default async function Index() {\n          return (\n            <html>\n              <body>\n                <Client />\n              </body>\n            </html>\n          );\n        }\n\n      client.jsx:\n        \"use client\";\n        import './client.css';\n        export default function Client() {\n          return <h1>Client</h1>;\n        }\n\n      client.css:\n        h1 { color: red }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n    });\n\n    // CSS is injected via JSX. Scripts are injected by React's prepareDestinationForModule.\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<link rel=\"stylesheet\"'));\n    assert(output.includes('<script '));\n  });\n\n  it('should support dynamic importing a client component from a client component', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.jsx:\n        import {Client} from './client';\n        export default async function Index() {\n          return (\n            <html>\n              <body>\n                <Client />\n              </body>\n            </html>\n          );\n        }\n\n      client.jsx:\n        \"use client\";\n        import {lazy} from 'react';\n        const Dynamic = lazy(() => import('./dynamic'));\n        export function Client() {\n          return <Dynamic />;\n        }\n\n      dynamic.jsx:\n        import './client.css';\n        export default function Dynamic() {\n          return <h1>Dynamic</h1>\n        }\n\n      client.css:\n        h1 { color: red }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n    });\n\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<link rel=\"stylesheet\"'));\n    assert(output.includes('<script type=\"module\"'));\n  });\n\n  it('should support dynamic importing an object with components attached', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.jsx:\n        export default async function Index() {\n          let {default: components} = await import('./server');\n          return (\n            <html>\n              <body>\n                <components.Server />\n              </body>\n            </html>\n          );\n        }\n\n      server.jsx:\n        import './server.css';\n        function Server() {\n          return <h1>Server</h1>;\n        }\n        export default {Server};\n\n      server.css:\n        h1 { color: red }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n    });\n\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<link rel=\"stylesheet\"'));\n  });\n\n  it('should support dynamic importing a React.memo component', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.jsx:\n        export default async function Index() {\n          let {default: Server} = await import('./server');\n          return (\n            <html>\n              <body>\n                <Server />\n              </body>\n            </html>\n          );\n        }\n\n      server.jsx:\n        import './server.css';\n        import {memo} from 'react';\n        export default memo(function Server() {\n          return <h1>Server</h1>;\n        });\n\n      server.css:\n        h1 { color: red }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n    });\n\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<link rel=\"stylesheet\"'));\n  });\n\n  it('should support nested server entries', async function () {\n    await fsFixture(overlayFS, dir)`\n      index.jsx:\n        import {A} from './a';\n        import {B} from './b';\n        import './bootstrap';\n        export default async function Index() {\n          return (\n            <html>\n              <body>\n                <Switch>\n                  <A />\n                  <B />\n                </Switch>\n              </body>\n            </html>\n          );\n        }\n\n        function Switch({children}) {\n          return children[0];\n        }\n\n      a.jsx:\n        \"use server-entry\";\n        import {Client1} from './client1';\n        export function A() {\n          return <Client1 />;\n        }\n\n      b.jsx:\n        \"use server-entry\";\n        import {Client2} from './client2';\n        export function B() {\n          return <Client2 />;\n        }\n\n      client1.jsx:\n        \"use client\";\n        import './client1.css';\n        export function Client1() {\n          return <span>Client 1</span>;\n        }\n\n      client1.css:\n        body { color: red }\n\n      client2.jsx:\n        \"use client\";\n        import './client2.css';\n        export function Client2() {\n          return <span>Client 2</span>;\n        }\n\n      client2.css:\n        body { color: green }\n\n      bootstrap.js:\n        \"use client-entry\";\n    `;\n\n    let b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n    });\n\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    let bundles = b.getBundles();\n    let assets = {};\n    b.traverse(node => {\n      if (node.type === 'asset') {\n        assets[path.basename(node.value.filePath)] = node.value;\n      }\n    });\n    let client1Bundle = nullthrows(\n      bundles.find(b => b.hasAsset(assets['client1.jsx'])),\n    );\n    let client1CSS = nullthrows(\n      bundles.find(b => b.hasAsset(assets['client1.css'])),\n    );\n    let client2Bundle = nullthrows(\n      bundles.find(b => b.hasAsset(assets['client2.jsx'])),\n    );\n    let client2CSS = nullthrows(\n      bundles.find(b => b.hasAsset(assets['client2.css'])),\n    );\n    let bootstrapBundle = nullthrows(\n      bundles.find(b => b.hasAsset(assets['bootstrap.js'])),\n    );\n    let scripts = Array.from(output.matchAll(/<script.*?src=\"(.*?)\"/g)).map(\n      b => b[1],\n    );\n    assert(scripts.includes('/' + path.basename(client1Bundle.filePath)));\n    assert(scripts.includes('/' + path.basename(bootstrapBundle.filePath)));\n    assert(!scripts.includes('/' + path.basename(client2Bundle.filePath)));\n\n    let links = Array.from(output.matchAll(/<link.*?href=\"(.*?)\"/g)).map(\n      b => b[1],\n    );\n    assert(links.includes('/' + path.basename(client1CSS.filePath)));\n    assert(!links.includes('/' + path.basename(client2CSS.filePath)));\n  });\n\n  it('invalidates the cache when a new page is added', async function () {\n    await fsFixture(overlayFS, dir)`\n    a.jsx:\n      export default function A({pages}) {\n        return (\n          <html>\n            <body>\n              <h1>A</h1>\n              <ul>\n                {pages.map(page => <li key={page.url}>{page.name}</li>)}\n              </ul>\n            </body>\n          </html>\n        );\n      }\n\n    b.jsx:\n      export default function B({pages}) {\n        return (\n          <html>\n            <body>\n              <h1>B</h1>\n              <ul>\n                {pages.map(page => <li key={page.url}>{page.name}</li>)}\n              </ul>\n            </body>\n          </html>\n        );\n      }\n    `;\n\n    let b = await bundle(path.join(dir, '/*.jsx'), {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n      mode: 'production',\n      env: {\n        NODE_ENV: 'production',\n      },\n    });\n\n    for (let [i, page] of ['A', 'B'].entries()) {\n      let output = await overlayFS.readFile(b.getBundles()[i].filePath, 'utf8');\n      assert(output.includes(`<h1>${page}</h1><ul><li>a.html<li>b.html</ul>`));\n    }\n\n    await fsFixture(overlayFS, dir)`\n    c.jsx:\n      export default function A({pages}) {\n        return (\n          <html>\n            <body>\n              <h1>C</h1>\n              <ul>\n                {pages.map(page => <li key={page.url}>{page.name}</li>)}\n              </ul>\n            </body>\n          </html>\n        );\n      }\n    `;\n\n    b = await bundle(path.join(dir, '/*.jsx'), {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n      mode: 'production',\n      env: {\n        NODE_ENV: 'production',\n      },\n    });\n\n    for (let [i, page] of ['A', 'B', 'C'].entries()) {\n      let output = await overlayFS.readFile(b.getBundles()[i].filePath, 'utf8');\n      assert(\n        output.includes(\n          `<h1>${page}</h1><ul><li>a.html<li>b.html<li>c.html</ul>`,\n        ),\n      );\n    }\n  });\n\n  it('invalidates the cache when a client component changes', async function () {\n    await fsFixture(overlayFS, dir)`\n    index.jsx:\n      import {Client} from './client';\n      import './bootstrap';\n\n      export default function Index() {\n        return (\n          <html>\n            <head>\n              <title>Static RSC</title>\n            </head>\n            <body>\n              <h1>This is an RSC!</h1>\n              <Client />\n            </body>\n          </html>\n        );\n      }\n\n    client.jsx:\n      \"use client\";\n      export function Client() {\n        return <p>Client</p>;\n      }\n\n    bootstrap.js:\n      \"use client-entry\";\n    `;\n\n    let b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n      mode: 'production',\n      env: {\n        NODE_ENV: 'production',\n      },\n    });\n\n    let output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<p>Client</p>'));\n\n    await fsFixture(overlayFS, dir)`\n    client.jsx:\n      \"use client\";\n      export function Client() {\n        return <p>Updated</p>;\n      }\n    `;\n\n    b = await bundle(path.join(dir, '/index.jsx'), {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n      mode: 'production',\n      env: {\n        NODE_ENV: 'production',\n      },\n    });\n\n    output = await overlayFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(output.includes('<p>Updated</p>'));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/reason.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {bundle, run} from '@parcel/test-utils';\n\ndescribe.skip('reason', function () {\n  it('should produce a bundle', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/reason/index.js'));\n\n    assert.equal(b.assets.size, 2);\n    assert.equal(b.childBundles.size, 1);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 3);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/registered-plugins.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport path from 'path';\nimport {bundle, run, overlayFS, fsFixture} from '@parcel/test-utils';\n\ndescribe('plugins with \"registered\" languages', () => {\n  it('should support plugins with esbuild-register', async () => {\n    const dir = path.join(__dirname, 'esbuild-register-plugin');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      package.json:\n        {\n          \"name\": \"app\",\n          \"sideEffects\": true\n        }\n\n      yarn.lock:\n\n      index.js:\n        console.log(\"Hi, mum!\");\n\n      .parcelrc:\n        {\n          extends: \"@parcel/config-default\",\n          reporters: [\"...\", \"./reporter-plugin.js\"],\n        }\n\n      reporter-plugin.js:\n        require('esbuild-register/dist/node').register();\n        const plugin = require('./reporter-plugin.ts');\n        module.exports = plugin;\n\n      reporter-plugin.ts:\n        import fs from 'fs';\n        import { Reporter } from '@parcel/plugin';\n        import { someString } from './some-string';\n        export default new Reporter({\n            async report({ event, options }) {\n                if (event.type === 'buildStart') {\n                    await options.outputFS.writeFile(options.projectRoot + '/output.txt', 'Hello! ' + someString, 'utf8');\n                }\n            }\n        });\n\n      some-string.ts:\n        export const someString = 'something';\n        `;\n\n    const b = await bundle(path.join(dir, 'index.js'), {\n      inputFS: overlayFS,\n      outputFS: overlayFS,\n      additionalReporters: [\n        {packageName: '@parcel/reporter-json', resolveFrom: __filename},\n      ],\n    });\n\n    await run(b);\n\n    // Tests that the plugin actually loaded properly by validating that it output\n    // what it was supposed to output. If `esbuild-register` isn't used, or the resolver\n    // doesn't support updating extensions as they change, then the plugin won't work.\n    assert(overlayFS.existsSync(path.join(dir, 'output.txt')));\n    assert.equal(\n      overlayFS.readFileSync(path.join(dir, 'output.txt'), 'utf8'),\n      'Hello! something',\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/reporters.js",
    "content": "// @flow\n\nimport assert from 'assert';\nimport {execSync} from 'child_process';\nimport path from 'path';\n\nimport {bundler} from '@parcel/test-utils';\n\ndescribe('reporters', () => {\n  let successfulEntry = path.join(\n    __dirname,\n    'integration',\n    'reporters-success',\n    'index.js',\n  );\n\n  let loadReporterFailureEntry = path.join(\n    __dirname,\n    'integration',\n    'reporters-load-failure',\n    'index.js',\n  );\n\n  let failingReporterEntry = path.join(\n    __dirname,\n    'integration',\n    'reporters-failure',\n    'index.js',\n  );\n\n  describe('running on the cli', () => {\n    it('exit successfully when no errors are emitted', () => {\n      assert.doesNotThrow(() =>\n        execSync(`parcel build --no-cache ${successfulEntry}`, {\n          stdio: 'ignore',\n        }),\n      );\n    });\n\n    it('exit with an error code when a reporter fails to load', () => {\n      assert.throws(() =>\n        execSync(`parcel build --no-cache ${loadReporterFailureEntry}`, {\n          stdio: 'ignore',\n        }),\n      );\n    });\n\n    it('exit with an error code when a reporter emits an error', () => {\n      assert.throws(() =>\n        execSync(`parcel build --no-cache ${failingReporterEntry}`, {\n          stdio: 'ignore',\n        }),\n      );\n    });\n  });\n\n  describe('running on the programmatic api', () => {\n    it('resolves when no errors are emitted', async () => {\n      let buildEvent = await bundler(successfulEntry).run();\n\n      assert.equal(buildEvent.type, 'buildSuccess');\n    });\n\n    it('rejects when a reporter fails to load', async () => {\n      try {\n        let buildEvent = await bundler(loadReporterFailureEntry).run();\n\n        throw new Error(buildEvent);\n      } catch (err) {\n        assert.equal(err.name, 'Error');\n        assert.deepEqual(\n          err.diagnostics.map(d => d.message),\n          ['Cannot find Parcel plugin \"./test-reporter\"'],\n        );\n      }\n    });\n\n    it('rejects when a reporter emits an error', async () => {\n      try {\n        let buildEvent = await bundler(failingReporterEntry).run();\n\n        throw new Error(buildEvent);\n      } catch (err) {\n        assert.equal(err.name, 'BuildError');\n        assert.deepEqual(\n          err.diagnostics.map(d => d.message),\n          ['Failed to report buildSuccess'],\n        );\n      }\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/resolver.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport path from 'path';\nimport {bundle, run, ncp, overlayFS, outputFS} from '@parcel/test-utils';\n\ndescribe('resolver', function () {\n  it('should support resolving tilde in monorepo packages', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/resolve-tilde-monorepo/client/src/index.js',\n      ),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 1234);\n  });\n\n  it('should support node: prefix for node_modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-node-prefix/src/index.js'),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(\n      output.default,\n      '6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50',\n    );\n  });\n\n  it('should correctly resolve tilde in node_modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-tilde-nodemodules/index.js'),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 1234);\n  });\n\n  it('should fall back to index.js if the resolved `main` file does not exist', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/resolve-index-fallback/incorrect-entry.js',\n      ),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 42);\n  });\n\n  it('should fall back to index.js if there is no `main` field at all', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-index-fallback/no-entry.js'),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 42);\n  });\n\n  it('should print a diagnostic when a configured target field will overwrite an entry', async function () {\n    let errorThrows = 0;\n    const overwriteDirs = ['browser', 'app', 'main', 'module'];\n    for (const currDir of overwriteDirs) {\n      try {\n        await bundle(\n          path.join(\n            __dirname,\n            `integration/target-overwrite-source/${currDir}`,\n          ),\n        );\n      } catch (e) {\n        errorThrows++;\n        let pkg = JSON.parse(\n          await overlayFS.readFile(\n            path.join(\n              __dirname,\n              `integration/target-overwrite-source/${currDir}/package.json`,\n            ),\n          ),\n        );\n        assert.deepEqual(\n          e.diagnostics[0].message,\n          `Target \"${currDir}\" is configured to overwrite entry \"${path.normalize(\n            `test/integration/target-overwrite-source/${currDir}/${pkg.source}`,\n          )}\".`,\n        );\n      }\n    }\n    assert.deepEqual(errorThrows, overwriteDirs.length);\n  });\n\n  it('should throw an error on Webpack loader imports', async function () {\n    let didThrow = false;\n    try {\n      await bundle(\n        path.join(\n          __dirname,\n          '/integration/webpack-import-syntax-error/index.js',\n        ),\n      );\n    } catch (e) {\n      didThrow = true;\n      assert.equal(\n        e.diagnostics[1].message,\n        `The import path: node-loader!./index.js is using webpack specific loader import syntax, which isn't supported by Parcel.`,\n      );\n    }\n\n    assert(didThrow);\n  });\n\n  it('should throw an error with codeframe on invalid js import', async function () {\n    let didThrow = false;\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/js-invalid-import/index.js'),\n      );\n    } catch (e) {\n      didThrow = true;\n\n      assert(\n        e.diagnostics[0].message.startsWith(\n          `Failed to resolve './doesnotexisstt' from `,\n        ),\n      );\n\n      assert.deepEqual(e.diagnostics[0].codeFrames[0].codeHighlights[0], {\n        message: undefined,\n        start: {line: 1, column: 8},\n        end: {line: 1, column: 25},\n      });\n    }\n\n    assert(didThrow);\n  });\n\n  it('should throw an error with codeframe on invalid css import', async function () {\n    let didThrow = false;\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/css-invalid-import/index.css'),\n      );\n    } catch (e) {\n      didThrow = true;\n\n      assert(\n        e.diagnostics[0].message.startsWith(\n          `Failed to resolve './thisdoesnotexist.css' from `,\n        ),\n      );\n\n      assert.deepEqual(e.diagnostics[0].codeFrames[0].codeHighlights[0], {\n        message: undefined,\n        start: {line: 1, column: 9},\n        end: {line: 1, column: 32},\n      });\n    }\n\n    assert(didThrow);\n  });\n\n  it('Should return codeframe with hints when package.json is invalid', async function () {\n    let didThrow = false;\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/resolver-invalid-pkgjson/index.js'),\n      );\n    } catch (e) {\n      didThrow = true;\n\n      assert.equal(\n        e.diagnostics[1].message,\n        `Could not load './entryx.js' from module 'invalid-module' found in package.json#main`,\n      );\n\n      assert.deepEqual(e.diagnostics[1].codeFrames[0].codeHighlights[0], {\n        end: {\n          column: 25,\n          line: 4,\n        },\n        message: \"'./entryx.js' does not exist, did you mean './entry.js'?'\",\n        start: {\n          column: 13,\n          line: 4,\n        },\n      });\n    }\n\n    assert(didThrow);\n  });\n\n  it('Should suggest alternative filenames for relative imports', async function () {\n    let threw = 0;\n\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/resolver-alternative-relative/a.js'),\n      );\n    } catch (e) {\n      threw++;\n\n      assert.equal(\n        e.diagnostics[1].message,\n        `Cannot load file './test/teste.js' in './integration/resolver-alternative-relative'.`,\n      );\n\n      assert.equal(\n        e.diagnostics[1].hints[0],\n        `Did you mean '__./test/test.js__'?`,\n      );\n    }\n\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/resolver-alternative-relative/b.js'),\n      );\n    } catch (e) {\n      threw++;\n\n      assert.equal(\n        e.diagnostics[1].message,\n        `Cannot load file './aa.js' in './integration/resolver-alternative-relative'.`,\n      );\n\n      assert.equal(e.diagnostics[1].hints[0], `Did you mean '__./a.js__'?`);\n    }\n\n    try {\n      await bundle(\n        path.join(\n          __dirname,\n          '/integration/resolver-alternative-relative/test/test.js',\n        ),\n      );\n    } catch (e) {\n      threw++;\n\n      assert.equal(\n        e.diagnostics[1].message,\n        `Cannot load file '../../a.js' in './integration/resolver-alternative-relative/test'.`,\n      );\n\n      assert.equal(e.diagnostics[1].hints[0], `Did you mean '__../a.js__'?`);\n    }\n\n    assert.equal(threw, 3);\n  });\n\n  it('Should suggest alternative modules for module imports', async function () {\n    let threw = false;\n\n    try {\n      await bundle(\n        path.join(\n          __dirname,\n          '/integration/resolver-alternative-module/index.js',\n        ),\n      );\n    } catch (e) {\n      threw = true;\n\n      assert.equal(\n        e.diagnostics[1].message,\n        `Cannot find module '@baebal/core'`,\n      );\n\n      assert.equal(\n        e.diagnostics[1].hints[0],\n        `Did you mean '__@babel/core__'?`,\n      );\n    }\n\n    assert(threw);\n  });\n\n  it('should resolve packages to packages through the alias field', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/alias/package-to-package.js'),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 3);\n  });\n\n  it('should resolve packages to local files through the alias field', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/alias/package-to-local.js'),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 'bar');\n  });\n\n  it('should exclude local files using the alias field', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/alias/exclude-local.js'),\n    );\n\n    let output = await run(b);\n    assert.deepEqual(output.default, {});\n  });\n\n  it('should exclude packages using the alias field', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/alias/exclude-package.js'),\n    );\n\n    let output = await run(b);\n    assert.deepEqual(output.default, {});\n  });\n\n  it('should support symlinked node_modules structure', async function () {\n    const rootDir = path.join(\n      __dirname,\n      'integration/resolve-symlinked-node_modules-structure',\n    );\n\n    await overlayFS.mkdirp(rootDir);\n    await ncp(rootDir, rootDir);\n\n    await outputFS.symlink(\n      path.join(\n        rootDir,\n        'node_modules/.origin/library@1.0.0/node_modules/library',\n      ),\n      path.join(rootDir, 'node_modules/library'),\n    );\n    await outputFS.symlink(\n      path.join(\n        rootDir,\n        'node_modules/.origin/library-dep@1.0.0/node_modules/library-dep',\n      ),\n      path.join(\n        rootDir,\n        'node_modules/.origin/library@1.0.0/node_modules/library-dep',\n      ),\n    );\n\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/resolve-symlinked-node_modules-structure/index.js',\n      ),\n      {\n        inputFS: overlayFS,\n        outputFS,\n      },\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 42);\n  });\n\n  it('should support symlinked monorepos structure', async function () {\n    const rootDir = path.join(\n      __dirname,\n      'integration/resolve-symlinked-monorepos',\n    );\n\n    await overlayFS.mkdirp(rootDir);\n    await ncp(rootDir, rootDir);\n\n    await outputFS.symlink(\n      path.join(rootDir, 'packages/library'),\n      path.join(rootDir, 'packages/app/node_modules/library'),\n    );\n    await outputFS.symlink(\n      path.join(rootDir, 'node_modules/.origin/pkg@1.0.0/node_modules/pkg'),\n      path.join(rootDir, 'packages/app/node_modules/pkg'),\n    );\n    await outputFS.symlink(\n      path.join(rootDir, 'node_modules/.origin/pkg@1.0.0/node_modules/pkg'),\n      path.join(rootDir, 'packages/library/node_modules/pkg'),\n    );\n\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/resolve-symlinked-monorepos/packages/app/index.js',\n      ),\n      {\n        inputFS: overlayFS,\n        outputFS,\n      },\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 2);\n  });\n\n  it('should support very long dependency specifiers', async function () {\n    this.timeout(8000);\n\n    let inputDir = path.join(__dirname, 'input');\n\n    await outputFS.mkdirp(inputDir);\n    await outputFS.writeFile(\n      path.join(inputDir, 'index.html'),\n      `<img src=\"data:image/jpeg;base64,/9j/${'A'.repeat(200000)}\">`,\n    );\n\n    await bundle(path.join(inputDir, 'index.html'), {\n      inputFS: overlayFS,\n    });\n  });\n\n  it('should support empty dependency specifiers', async function () {\n    // $FlowFixMe[prop-missing];\n    await assert.rejects(\n      () =>\n        bundle(\n          path.join(__dirname, '/integration/resolve-empty-specifier/index.js'),\n        ),\n      {\n        message: `Failed to resolve '' from './integration/resolve-empty-specifier/index.js'`,\n      },\n    );\n  });\n\n  it('should support package exports config option', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-exports/index.js'),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 'hello bar');\n  });\n\n  it('should support the development and production import conditions', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/resolve-mode-condition/index.js'),\n      {mode: 'development'},\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output.default, 'development');\n\n    b = await bundle(\n      path.join(__dirname, '/integration/resolve-mode-condition/index.js'),\n      {mode: 'production'},\n    );\n\n    output = await run(b);\n    assert.strictEqual(output.default, 'production');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/rust.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  bundler,\n  run,\n  assertBundleTree,\n  outputFS,\n} from '@parcel/test-utils';\nimport commandExists from 'command-exists';\n\ndescribe.skip('rust', function () {\n  if (typeof WebAssembly === 'undefined' || !commandExists.sync('rustup')) {\n    // eslint-disable-next-line no-console\n    console.log(\n      'Skipping Rust tests. Install https://www.rustup.rs/ to run them.',\n    );\n    return;\n  }\n\n  it('should generate a wasm file from a rust file with rustc with --target=browser', async function () {\n    this.timeout(500000);\n    let b = await bundle(path.join(__dirname, '/integration/rust/index.js'));\n\n    await assertBundleTree(b, {\n      name: 'index.js',\n      assets: ['bundle-loader.js', 'index.js', 'wasm-loader.js'],\n      childBundles: [\n        {\n          type: 'wasm',\n          assets: ['add.rs'],\n          childBundles: [],\n        },\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    var res = await await run(b);\n    assert.equal(res, 5);\n\n    // not minified\n    assert(\n      (await outputFS.stat(Array.from(b.childBundles)[0].name)).size > 500,\n    );\n  });\n\n  it('should generate a wasm file from a rust file with rustc with --target=node', async function () {\n    this.timeout(500000);\n    let b = await bundle(path.join(__dirname, '/integration/rust/index.js'), {\n      target: 'node',\n    });\n\n    await assertBundleTree(b, {\n      name: 'index.js',\n      assets: ['bundle-loader.js', 'index.js', 'wasm-loader.js'],\n      childBundles: [\n        {\n          type: 'wasm',\n          assets: ['add.rs'],\n          childBundles: [],\n        },\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    var res = await run(b);\n    assert.equal(res, 5);\n\n    // not minified\n    assert(\n      (await outputFS.stat(Array.from(b.childBundles)[0].name)).size > 500,\n    );\n  });\n\n  it('should support rust files with dependencies via rustc', async function () {\n    this.timeout(500000);\n    let b = bundler(path.join(__dirname, '/integration/rust-deps/index.js'));\n    let bundle = await b.bundle();\n\n    await assertBundleTree(bundle, {\n      name: 'index.js',\n      assets: ['bundle-loader.js', 'index.js', 'wasm-loader.js'],\n      childBundles: [\n        {\n          type: 'map',\n        },\n        {\n          type: 'wasm',\n          assets: ['test.rs'],\n          childBundles: [],\n        },\n      ],\n    });\n\n    var res = await run(bundle);\n    assert.equal(res, 10);\n  });\n\n  it('should generate a wasm file from a rust file with cargo', async function () {\n    this.timeout(500000);\n    let b = await bundle(\n      path.join(__dirname, '/integration/rust-cargo/src/index.js'),\n    );\n\n    await assertBundleTree(b, {\n      name: 'index.js',\n      assets: ['bundle-loader.js', 'index.js', 'wasm-loader.js'],\n      childBundles: [\n        {\n          type: 'map',\n        },\n        {\n          type: 'wasm',\n          assets: ['lib.rs'],\n          childBundles: [],\n        },\n      ],\n    });\n\n    var res = await run(b);\n    assert.equal(res, 5);\n  });\n\n  it('should generate a wasm file from a rust file in cargo workspace', async function () {\n    this.timeout(500000);\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/rust-cargo-workspace/member/src/index.js',\n      ),\n    );\n\n    await assertBundleTree(b, {\n      name: 'index.js',\n      assets: ['bundle-loader.js', 'index.js', 'wasm-loader.js'],\n      childBundles: [\n        {\n          type: 'map',\n        },\n        {\n          type: 'wasm',\n          assets: ['lib.rs'],\n          childBundles: [],\n        },\n      ],\n    });\n\n    var res = await run(b);\n    assert.equal(res, 5);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/sass.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  run,\n  assertBundles,\n  distDir,\n  outputFS,\n  overlayFS,\n  fsFixture,\n} from '@parcel/test-utils';\n\ndescribe('sass', function () {\n  it('should support requiring sass files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/sass/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.sass'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.index'));\n  });\n\n  it('should support requiring scss files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/scss/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.scss'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.index'));\n  });\n\n  it('should support scss imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/scss-import/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.scss'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.index'));\n    assert(css.includes('.foo'));\n    assert(css.includes('.bar'));\n  });\n\n  it('should support scss imports in html for >1 target', async function () {\n    //Repro copied from https://github.com/parcel-bundler/parcel/issues/8754\n    let b = await bundle(path.join(__dirname, '/integration/scss-html-import'));\n\n    assertBundles(b, [\n      {\n        name: 'target1.html',\n        assets: ['target1.html'],\n      },\n      {\n        assets: ['style.scss'],\n      },\n      {\n        name: 'target2.html',\n        assets: ['target2.html'],\n      },\n      {\n        assets: ['fa-regular-400.ttf'],\n      },\n    ]);\n  });\n\n  it('should support requiring empty scss files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/scss-empty/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.scss'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert.equal(css.trim(), '/*# sourceMappingURL=index.css.map */');\n  });\n\n  it('should support linking to assets with url() from scss', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/scss-url/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'jpeg',\n        assets: ['image.jpeg'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.scss'],\n      },\n      {\n        type: 'woff2',\n        assets: ['test.woff2'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(/url\\(\"test\\.[0-9a-f]+\\.woff2\"\\)/.test(css));\n    assert(css.includes('url(\"http://google.com\")'));\n    assert(css.includes('.index'));\n\n    assert(\n      await outputFS.exists(\n        path.join(distDir, css.match(/url\\(\"(test\\.[0-9a-f]+\\.woff2)\"\\)/)[1]),\n      ),\n    );\n  });\n\n  it('should support transforming scss with postcss', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/scss-postcss/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'index.module.scss'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.module.scss'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    let className = output();\n    assert.notStrictEqual(className, 'index');\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes(`.${className}`));\n  });\n\n  it('should support advanced import syntax', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sass-advanced-import/index.sass'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.sass'],\n      },\n    ]);\n\n    let css = (\n      await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8')\n    ).replace(/\\s+/g, ' ');\n    assert(css.includes('.foo { color: pink;'));\n    assert(css.includes('.bar { color: green;'));\n  });\n\n  it('should support absolute imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/scss-absolute-imports/style.scss'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'style.css',\n        assets: ['style.scss'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'style.css'), 'utf8');\n    assert(css.includes('.a'));\n    assert(css.includes('.b'));\n  });\n\n  it('should merge global data property from .sassrc.js', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/scss-global-data/index.scss'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.scss'],\n      },\n    ]);\n\n    let css = (\n      await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8')\n    ).replace(/\\s+/g, ' ');\n    assert(css.includes('.a { color: red;'));\n  });\n\n  it('should support using the custom webpack/sass node_modules syntax', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sass-webpack-import-error/index.sass'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.sass'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.external'));\n  });\n\n  it('should support node_modules imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sass-node-modules-import/index.sass'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.sass'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.external'));\n  });\n\n  it('should support imports from includePaths (legacy)', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sass-include-paths-import/index.sass'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.sass'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.included'));\n  });\n\n  it('should support imports from loadPaths (modern)', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sass-load-paths-import/index.sass'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.sass'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.included'));\n  });\n\n  it('should support package.json exports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sass-exports/index.sass'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.sass'],\n      },\n    ]);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.external'));\n  });\n\n  it('should import from packages with a string key of `sass` in package.json', async function () {\n    const dir = path.join(__dirname, 'sass-package-import-edge-case');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import './main.css';\n\n      main.css:\n        @import './edge/main.scss'\n\n      edge\n        package.json:\n          {\n            \"name\": \"edge\",\n            \"sass\": \"main.scss\"\n          }\n\n        main.scss:\n          .foo {\n            .bar {\n              color: green;\n            }\n          }\n        `;\n\n    let b = await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n    });\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['main.css', 'main.scss'],\n      },\n    ]);\n  });\n\n  it('should support sass import resolution rules', async function () {\n    const dir = path.join(__dirname, 'sass-extensions');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import './main.scss';\n\n      main.scss:\n        @use '~test' as test;\n\n      node_modules/test/package.json:\n        { \"name\": \"test\" }\n\n      node_modules/test/_index.scss:\n        @use 'other';\n\n      node_modules/test/_other.scss:\n        .foo { color: red }\n      `;\n\n    await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n    });\n  });\n\n  it('should support npm scheme', async function () {\n    const dir = path.join(__dirname, 'sass-extensions');\n    overlayFS.mkdirp(dir);\n\n    await fsFixture(overlayFS, dir)`\n      index.js:\n        import './main.scss';\n\n      main.scss:\n        @use 'npm:test' as test;\n\n      node_modules/test/package.json:\n        { \"name\": \"test\" }\n\n      node_modules/test/_index.scss:\n        @use 'other';\n\n      node_modules/test/_other.scss:\n        .foo { color: red }\n      `;\n\n    await bundle(path.join(dir, '/index.js'), {\n      inputFS: overlayFS,\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/schema-jsonld.js",
    "content": "import {assertBundles, bundle, distDir, outputFS} from '@parcel/test-utils';\nimport path from 'path';\nimport assert from 'assert';\n\ndescribe('jsonld', function () {\n  it('Should parse a LD+JSON schema and collect dependencies', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/schema-jsonld/index.html'),\n      {\n        publicURL: 'https://place.holder/',\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'jsonld',\n        assets: ['index.html'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'css',\n        assets: ['other.css'],\n      },\n      {\n        type: 'png',\n        assets: ['logo.png'],\n      },\n      {\n        type: 'jpeg',\n        assets: ['image.jpeg'],\n      },\n    ]);\n\n    let file = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf-8',\n    );\n    let contentBetweenScriptTag = new RegExp(\n      /<\\s*script \\s*type=\"application\\/ld\\+json\"\\s*>(.*)<\\/\\s*script\\s*>/gm,\n    ).exec(file)[1];\n\n    let jsonldData = assertValidJsonObject(contentBetweenScriptTag);\n    match(jsonldData.logo.url, /logo\\.[a-f0-9]+\\.png/);\n    match(jsonldData.image[0], /image\\.[a-f0-9]+\\.jpeg/);\n    match(jsonldData.image[1], /image\\.[a-f0-9]+\\.jpeg/);\n  });\n});\n\nfunction match(test, pattern) {\n  let success = new RegExp(pattern).test(test);\n  if (success) {\n    assert.ok(`'${test}' matched the given pattern of '${pattern}'`);\n    return;\n  }\n  assert.fail(`'${test}' did not match the given pattern of '${pattern}'`);\n}\n\nfunction assertValidJsonObject(dataAsString) {\n  try {\n    let data = JSON.parse(dataAsString);\n    assert.ok('input string is a valid json object');\n    return data;\n  } catch (e) {\n    assert.fail(\n      `the given string (see below) is not a valid json object\\n\\terror :: ${e}\\n\\tinput :: ${dataAsString}`,\n    );\n  }\n}\n"
  },
  {
    "path": "packages/core/integration-tests/test/scope-hoisting.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\nimport {normalizePath} from '@parcel/utils';\nimport {createWorkerFarm} from '@parcel/core';\nimport {md} from '@parcel/diagnostic';\nimport {\n  assertBundles,\n  bundle as _bundle,\n  bundler as _bundler,\n  distDir,\n  findAsset,\n  findDependency,\n  getNextBuild,\n  mergeParcelOptions,\n  outputFS,\n  overlayFS,\n  run,\n  runBundle,\n  fsFixture,\n} from '@parcel/test-utils';\n\nconst bundle = (name, opts = {}) => {\n  return _bundle(\n    name,\n    // $FlowFixMe\n    mergeParcelOptions(\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n      opts,\n    ),\n  );\n};\n\nconst bundler = (name, opts = {}) => {\n  return _bundler(\n    name,\n    // $FlowFixMe\n    mergeParcelOptions(\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n      opts,\n    ),\n  );\n};\n\ndescribe('scope hoisting', function () {\n  describe('es6', function () {\n    it('supports default imports and exports of expressions', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/default-export-expression/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports default imports and exports of declarations', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/default-export-declaration/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports default imports and exports of anonymous declarations', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/default-export-anonymous/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports default imports and exports of variables', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/default-export-variable/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports named imports and exports of declarations', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/named-export-declaration/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports named imports and exports of variables', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/named-export-variable/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports named exports of variables with a different name', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/named-export-variable-rename/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports named exports of variables with a different name when wrapped', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/named-export-variable-rename-wrapped/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports dependency rewriting for import * as from a library that has export *', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/rewrite-export-star/index.js',\n        ),\n        {mode: 'production'},\n      );\n      let output = await run(b);\n      assert.equal(output, 2);\n\n      assert.deepStrictEqual(\n        new Set(\n          b.getUsedSymbols(findDependency(b, 'index.js', './library/a.js')),\n        ),\n        new Set(['bar']),\n      );\n    });\n\n    it('supports renaming non-ASCII identifiers', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/non-ascii-identifiers/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [1, 2, 3, 4]);\n    });\n\n    it('supports renaming superclass identifiers', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/rename-superclass/a.js',\n        ),\n      );\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports renaming helpers inserted during transpiling', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/rename-helpers/a.js',\n        ),\n      );\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(/Symbol.toStringTag/.test(contents));\n\n      let output = await run(b);\n      assert.deepEqual(output, ['1', '2']);\n    });\n\n    it('correctly renames member expression properties', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/rename-member-prop/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output({foo: 12, bar: 34}), [12, 12, 34, 34]);\n    });\n\n    it('supports renaming imports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/renamed-import/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports renaming exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/renamed-export/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports importing from a reexporting asset in an anchestor (1)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/ancestor-reexport/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, ['index', 'async']);\n    });\n\n    it('supports importing from a reexporting asset in an anchestor (2)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/ancestor-reexport2/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [123, 123]);\n    });\n\n    it('supports importing from a reexporting asset in an anchestor (3)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/ancestor-reexport2/b.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [123, 123]);\n    });\n\n    it('supports async import of internalized asset with unused return value', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/async-internalize-unused/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 'bc');\n    });\n\n    it('supports importing a namespace of exported values', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-namespace/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports namespace imports of excluded assets (node_modules)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-namespace-external/a.js',\n        ),\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n\n      assert(contents.includes('require(\"lodash\")'));\n\n      let output = await run(b);\n      assert.deepEqual(output.default, 12);\n    });\n\n    it('supports re-exporting all exports from another module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-all/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 6);\n    });\n\n    it('supports re-exporting all when falling back to namespace at runtime 1', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-all-fallback-1/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 2);\n    });\n\n    it('supports re-exporting all when falling back to namespace at runtime 2', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-all-fallback-2/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 2);\n    });\n\n    it('supports re-exporting all when falling back to namespace at runtime 3', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/re-export-all-fallback-3/entry.js',\n        ),\n      );\n      let output = await run(b);\n      assert.strictEqual(output, 'FOOBAR!');\n    });\n\n    it('supports nested re-exporting all when falling back to namespace at runtime', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-all-fallback-nested/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, '2 4');\n    });\n\n    it('supports re-exporting all from an empty module without side effects', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-all-empty-no-side-effects/index.js',\n        ),\n        {\n          mode: 'production',\n        },\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 'foo bar');\n\n      let contents = await outputFS.readFile(\n        b.getBundles().find(b => b.getMainEntry().filePath.endsWith('index.js'))\n          .filePath,\n        'utf8',\n      );\n      assert.match(contents, /output=\"foo bar\"/);\n    });\n\n    it('supports re-exporting all with ambiguous CJS and non-renaming and renaming dependency retargeting', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-all-ambiguous/entry.js',\n        ),\n        {\n          mode: 'production',\n        },\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, '123 999');\n    });\n\n    it('supports re-exporting all exports from an external module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-all-external/a.js',\n        ),\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['a.js', 'b.js'],\n        },\n      ]);\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'b.js', 'lodash'))),\n        new Set(['add']),\n      );\n\n      // getSymbolResolution is broken\n      // let output = await run(b);\n      // assert.equal(output, 3);\n    });\n\n    it('supports re-exporting all exports from multiple modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-all-multiple/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 15);\n    });\n\n    it('supports re-exporting all exports and overriding individual exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-all-override/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 'fooBfooCC');\n    });\n\n    it('can import from a different bundle via a re-export (1)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-bundle-boundary/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, ['operational', 'ui']);\n    });\n\n    it('can import from a different bundle via a re-export (2)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-bundle-boundary2/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, ['foo', 'foo']);\n    });\n\n    it('can import from its own bundle with a split package', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-bundle-boundary3/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [['a', 'b'], 'themed']);\n    });\n\n    it('supports importing all exports re-exported from multiple modules deep', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-multiple-wildcards/a.js',\n        ),\n      );\n\n      let {foo, bar, baz, a, b: bb} = await run(b);\n      assert.equal(foo + bar + baz + a + bb, 15);\n    });\n\n    it('deduplicates imports when wrapped', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-multiple-wrapped/index.js',\n        ),\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n\n      let assetB = nullthrows(\n        b.getBundles()[0]?.traverseAssets((a, _, actions) => {\n          if (\n            a.filePath ===\n            path.join(\n              __dirname,\n              '/integration/scope-hoisting/es6/import-multiple-wrapped/b.js',\n            )\n          ) {\n            actions.stop();\n            return a;\n          }\n        }),\n      );\n      assert.equal(\n        [\n          ...contents.matchAll(\n            new RegExp(\n              'parcelRequires*\\\\(s*\"' + b.getAssetPublicId(assetB) + '\"s*\\\\)',\n              'g',\n            ),\n          ),\n        ].length,\n        1,\n      );\n\n      let output = await run(b);\n      assert.equal(output, 15);\n    });\n\n    it('supports re-exporting all exports from multiple modules deep', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-multiple/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 7);\n    });\n\n    it('supports re-exporting individual named exports from another module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-named/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 3);\n    });\n\n    it('supports re-exporting default exports from another module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-default/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 3);\n    });\n\n    it('supports re-exporting a namespace from another module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-namespace/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 6);\n    });\n\n    it('supports re-exporting a namespace from another module (chained)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-namespace-chained/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {\n        Bar: {\n          A: 1,\n          B: 2,\n        },\n        Foo: {\n          A: 1,\n          B: 2,\n        },\n      });\n    });\n\n    it('has the correct order with namespace re-exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-namespace-order/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, Symbol.for('abc'));\n    });\n\n    it('excludes default when re-exporting a module', async function () {\n      let source = path.normalize(\n        'integration/scope-hoisting/es6/re-export-exclude-default/a.js',\n      );\n      let message = md`${normalizePath(\n        'integration/scope-hoisting/es6/re-export-exclude-default/b.js',\n        false,\n      )} does not export 'default'`;\n\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(() => bundle(path.join(__dirname, source)), {\n        name: 'BuildError',\n        message,\n        diagnostics: [\n          {\n            message,\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: path.join(__dirname, source),\n                language: 'js',\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 8,\n                    },\n                    end: {\n                      line: 1,\n                      column: 8,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      });\n    });\n\n    it('throws when reexporting a missing symbol', async function () {\n      let source = path.normalize(\n        'integration/scope-hoisting/es6/re-export-missing/a.js',\n      );\n      let message = md`${normalizePath(\n        'integration/scope-hoisting/es6/re-export-missing/c.js',\n        false,\n      )} does not export 'foo'`;\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(() => bundle(path.join(__dirname, source)), {\n        name: 'BuildError',\n        message,\n        diagnostics: [\n          {\n            message,\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: path.join(\n                  __dirname,\n                  'integration/scope-hoisting/es6/re-export-missing/b.js',\n                ),\n                language: 'js',\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 9,\n                    },\n                    end: {\n                      line: 1,\n                      column: 11,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      });\n    });\n\n    it('throws when importing a missing symbol on cached builds without changes', async function () {\n      let entry = 'integration/scope-hoisting/es6/import-missing/a.js';\n      let message = md`${normalizePath(\n        'integration/scope-hoisting/es6/import-missing/b.js',\n        false,\n      )} does not export 'foo'`;\n      let error = {\n        name: 'BuildError',\n        message,\n        diagnostics: [\n          {\n            message,\n            origin: '@parcel/core',\n            codeFrames: [\n              {\n                filePath: path.join(__dirname, entry),\n                language: 'js',\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 9,\n                    },\n                    end: {\n                      line: 1,\n                      column: 11,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      };\n\n      let source = path.join(__dirname, entry);\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(\n        () =>\n          bundle(source, {\n            inputFS: overlayFS,\n            outputFS: overlayFS,\n            shouldDisableCache: false,\n          }),\n        error,\n      );\n      // $FlowFixMe[prop-missing]\n      await assert.rejects(\n        () =>\n          bundle(source, {\n            inputFS: overlayFS,\n            outputFS: overlayFS,\n            shouldDisableCache: false,\n          }),\n        error,\n      );\n    });\n\n    it('supports multiple exports of the same variable', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/multi-export/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 6);\n    });\n\n    it('supports live bindings of named exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/live-bindings/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 8);\n    });\n\n    it('supports live bindings in namespaces of reexporting assets', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/live-bindings-reexports-namespace/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [1, 2]);\n    });\n\n    it('supports live bindings across bundles', async function () {\n      let b = await bundle(\n        ['a.html', 'b.html'].map(f =>\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/live-bindings-cross-bundle',\n            f,\n          ),\n        ),\n        {mode: 'production'},\n      );\n\n      let ctx = await runBundle(\n        b,\n        b.getBundles().find(b => b.type === 'html'),\n        {output: null},\n        {require: false},\n      );\n      assert.deepEqual(ctx.output, 'aaa');\n    });\n\n    it('supports live bindings of default exports', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5658\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/export-default-live/a.js',\n        ),\n      );\n\n      let out = [];\n      await run(b, {\n        output(o) {\n          out.push(o);\n        },\n      });\n      assert.deepEqual(out, [5, 10]);\n    });\n\n    it('supports dynamic import syntax for code splitting', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/dynamic-import/a.js',\n        ),\n      );\n\n      assert.equal(await run(b), 5);\n    });\n\n    it('supports nested dynamic imports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/dynamic-import-dynamic/a.js',\n        ),\n      );\n\n      assert.equal(await run(b), 123);\n    });\n\n    it('supports named exports before the variable declaration', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/export-before-declaration/a.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), {x: 2});\n    });\n\n    it('should not export function arguments', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/export-binding-identifiers/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, ['test']);\n    });\n\n    it('should default export classes when wrapped', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/export-default-class-wrapped/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output.VERSION, 1234);\n    });\n\n    it('should default export functions when wrapped', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/export-default-function-wrapped/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output.VERSION, 1234);\n    });\n\n    it('should default export globals', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/export-default-global/a.js',\n        ),\n      );\n\n      let Test = Symbol('Test');\n\n      let output = await run(b, {Test});\n      assert.strictEqual(output, Test);\n    });\n\n    it('should default export JS globals', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/export-default-js-global/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert(new output([1, 2, 3]).has(1));\n    });\n\n    it('should remove export named declaration without specifiers', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/export-named-empty/a.js',\n        ),\n      );\n\n      let content = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(!/export\\s*{\\s*}\\s*;/.test(content));\n\n      let output = await run(b);\n      assert.strictEqual(output, 2);\n    });\n\n    it.skip('throws a meaningful error on undefined exports', async function () {\n      let threw = false;\n      try {\n        await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/export-undefined/a.js',\n          ),\n        );\n      } catch (err) {\n        threw = true;\n        assert(\n          err.diagnostics[0].message.includes(\n            \"Export 'Test' is not defined (1:8)\",\n          ),\n        );\n      }\n\n      assert(threw);\n    });\n\n    it('supports importing named CommonJS (export individual)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-commonjs-export-individual/a.js',\n        ),\n      );\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'c.js')))),\n        new Set(['name', 'version']),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'name:1.2.3');\n    });\n\n    it('supports importing named CommonJS (export namespace)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-commonjs-export-object/a.js',\n        ),\n      );\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'c.js')))),\n        new Set(['name', 'version']),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'name:1.2.3');\n    });\n\n    it('supports default importing CommonJS (export namespace)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-commonjs-export-object-default/a.js',\n        ),\n      );\n\n      assert.deepStrictEqual(\n        new Set(nullthrows(findAsset(b, 'b1.js')).symbols.exportSymbols()),\n        new Set(['*']),\n      );\n\n      assert.deepStrictEqual(\n        new Set(nullthrows(findAsset(b, 'b2.js')).symbols.exportSymbols()),\n        new Set(['*']),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {\n        x: {foo: 1, default: 2},\n        y: 4,\n      });\n    });\n\n    it('supports import default CommonJS interop (export value)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-commonjs-default/a.js',\n        ),\n      );\n\n      let dist = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(dist.includes('$parcel$interopDefault'));\n\n      let output = await run(b);\n      assert.deepEqual(output, 'foobar:foo:bar');\n    });\n\n    it('supports import default CommonJS interop (individual exports)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-commonjs-export-individual-default/a.js',\n        ),\n      );\n\n      assert.deepStrictEqual(\n        new Set(nullthrows(findAsset(b, 'b1.js')).symbols.exportSymbols()),\n        new Set(['*', 'default', 'foo']),\n      );\n\n      assert.deepStrictEqual(\n        new Set(nullthrows(findAsset(b, 'b2.js')).symbols.exportSymbols()),\n        new Set(['*', 'foo', 'default', '__esModule']),\n      );\n\n      assert.deepStrictEqual(\n        new Set(nullthrows(findAsset(b, 'b3.js')).symbols.exportSymbols()),\n        new Set(['*']),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {\n        x: {foo: 1, default: 2},\n        y: 4,\n        z: 6,\n      });\n    });\n\n    it('falls back when importing missing symbols from CJS', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-commonjs-missing/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, undefined);\n    });\n\n    it('does not export reassigned CommonJS exports references', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/commonjs-exports-reassign/a.js',\n        ),\n      );\n\n      let [foo, bExports] = await run(b);\n      assert.equal(foo, 'foobar');\n      assert.equal(typeof bExports, 'object');\n    });\n\n    it('supports import default CommonJS interop with dynamic imports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/dynamic-default-interop/a.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), 6);\n    });\n\n    it('supports exporting an import', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-var/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'foobar');\n    });\n\n    it('supports importing from a wrapped asset', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-wrapped/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, ['a', true]);\n    });\n\n    it('wraps an asset if any of its ancestors is wrapped, even if one is not', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/multiple-ancestors-wrap/index.js',\n        ),\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(\n        contents.match(/parcelRegister\\(/g).length,\n        2 /* once for parent asset, once for child wrapped asset */,\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [42, 43]);\n    });\n\n    it('supports importing from a wrapped asset with multiple bailouts', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-wrapped-bailout/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, ['b', true]);\n    });\n\n    for (let shouldScopeHoist of [false, true]) {\n      it(`unused and missing pseudo re-exports doesn't fail the build with${\n        shouldScopeHoist ? '' : 'out'\n      } scope-hoisting`, async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/re-export-pseudo/a.js',\n          ),\n          {defaultTargetOptions: {shouldScopeHoist}},\n        );\n\n        let {output} = await run(b, null, {require: false});\n        assert.deepEqual(output, 'foo');\n      });\n    }\n\n    it('supports requiring a re-exported and renamed ES6 import', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-renamed/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'foobar');\n    });\n\n    it('supports requiring a re-exported and renamed ES6 import (reversed order)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-renamed2/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'foobar');\n    });\n\n    it('supports requiring a re-exported and renamed ES6 namespace import', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-renamed-namespace/a.js',\n        ),\n      );\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'a.js', './b.js'))),\n        new Set(['default', 'x']),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [123, 123]);\n    });\n\n    it('supports reexporting an asset from a shared bundle inside a shared bundle', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/shared-bundle-reexport/*.html',\n        ),\n        {mode: 'production'},\n      );\n      assertBundles(b, [\n        {\n          type: 'html',\n          assets: ['index1.html'],\n        },\n        {\n          type: 'js',\n          assets: ['index1.js'],\n        },\n        {\n          type: 'html',\n          assets: ['index2.html'],\n        },\n        {\n          type: 'js',\n          assets: ['index2.js', 'b.js'],\n        },\n        {\n          type: 'html',\n          assets: ['index3.html'],\n        },\n        {\n          type: 'js',\n          assets: ['index3.js', 'b.js'],\n        },\n        {\n          type: 'js',\n          assets: ['a.js'],\n        },\n      ]);\n      for (let bundle of b.getBundles().filter(b => b.type === 'html')) {\n        let calls = [];\n        await runBundle(b, bundle, {\n          call(v) {\n            calls.push(v);\n          },\n        });\n        assert.equal(calls.length, 1);\n        assert(calls[0].startsWith('abcabc'));\n      }\n    });\n\n    it('supports simultaneous import and re-export of a symbol', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-import/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 5 * 123);\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'e.js')))),\n        new Set(['default']),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'e2.js')))),\n        new Set(['default']),\n      );\n    });\n\n    it('supports importing a namespace from a commonjs module when code split', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-namespace-commonjs/a.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), 4);\n    });\n\n    it('supports resolving a static member access on a namespace', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-namespace-static-member/a.js',\n        ),\n      );\n\n      let calls = [];\n      let output = await run(b, {\n        sideEffect: v => {\n          calls.push(v);\n        },\n      });\n      assert.deepEqual(output, 'foofoobar');\n      assert.deepEqual(calls, ['c1', 'c3']);\n    });\n\n    it('should bailout with a non-static member access on a namespace', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-namespace-static-member/b.js',\n        ),\n      );\n\n      assert.deepStrictEqual(\n        new Set(\n          b.getUsedSymbols(findDependency(b, 'b.js', './library/index.js')),\n        ),\n        new Set(['*']),\n      );\n\n      let calls = [];\n      let output = await run(b, {\n        sideEffect: v => {\n          calls.push(v);\n        },\n      });\n      assert.deepEqual(output, 'foo');\n      assert.deepEqual(calls, ['c1', 'c2', 'c3']);\n    });\n\n    it('supports importing a namespace from a wrapped module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-namespace-wrapped/a.js',\n        ),\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('$parcel$exportWildcard'));\n\n      let output = await run(b);\n      assert.deepEqual(output, 1);\n    });\n\n    it('supports wrapped assets importing their own namespace', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-namespace-wrapped-self/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, true);\n    });\n\n    it('supports importing a namespace from a transpiled CommonJS module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-namespace-commonjs-transpiled/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {\n        bar: 3,\n        foo: 1,\n      });\n    });\n\n    it('removes unused exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/tree-shaking/a.js',\n        ),\n        {mode: 'production'},\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 2);\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('output=2'));\n      assert(!contents.includes('bar'));\n    });\n\n    it('removes unused function exports when minified', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/tree-shaking-functions/a.js',\n        ),\n        {\n          defaultTargetOptions: {\n            shouldOptimize: true,\n          },\n        },\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 9);\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(/output=9/.test(contents));\n      assert(!/.-./.test(contents));\n    });\n\n    it('removes unused transpiled classes using terser when minified', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/tree-shaking-classes-babel/a.js',\n        ),\n        {\n          defaultTargetOptions: {\n            shouldOptimize: true,\n          },\n        },\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 3);\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('method'));\n    });\n\n    ['global', 'esmodule'].forEach(outputFormat => {\n      let targets = {\n        default: {\n          outputFormat,\n          distDir,\n        },\n      };\n\n      describe('cross bundle tree shaking: ' + outputFormat, () => {\n        it('removes unused exports across bundles', async () => {\n          let b = await bundle(\n            path.join(\n              __dirname,\n              '/integration/scope-hoisting/es6/tree-shaking-cross-bundle/a.js',\n            ),\n            {targets, mode: 'production'},\n          );\n\n          if (outputFormat != 'esmodule') {\n            // TODO execute ESM at some point\n            assert.deepEqual(await run(b), ['b1:foo', 'b2:foo']);\n          }\n\n          let contents = await outputFS.readFile(\n            b.getBundles().find(b => b.name.startsWith('b1')).filePath,\n            'utf8',\n          );\n          assert(!contents.includes('bar'));\n\n          contents = await outputFS.readFile(\n            b.getBundles().find(b => b.name.startsWith('b2')).filePath,\n            'utf8',\n          );\n          assert(!contents.includes('bar'));\n        });\n\n        it('removes unused exports with re-exports across bundles', async () => {\n          let b = await bundle(\n            path.join(\n              __dirname,\n              '/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export/a.js',\n            ),\n            {targets, mode: 'production'},\n          );\n\n          if (outputFormat != 'esmodule') {\n            // TODO execute ESM at some point\n            assert.deepEqual(await run(b), ['b1:foo', 'b2:foo']);\n          }\n\n          let contents = await outputFS.readFile(\n            b.getBundles().find(b => b.name.startsWith('b1')).filePath,\n            'utf8',\n          );\n          assert(!contents.includes('bar'));\n\n          contents = await outputFS.readFile(\n            b.getBundles().find(b => b.name.startsWith('b2')).filePath,\n            'utf8',\n          );\n          assert(!contents.includes('bar'));\n        });\n\n        it('removes unused exports with wildcard re-exports across bundles', async () => {\n          let b = await bundle(\n            path.join(\n              __dirname,\n              '/integration/scope-hoisting/es6/tree-shaking-cross-bundle-re-export-wildcard/a.js',\n            ),\n            {targets, mode: 'production'},\n          );\n\n          if (outputFormat != 'esmodule') {\n            // TODO execute ESM at some point\n            assert.deepEqual(await run(b), ['b1:foo', 'b2:foo']);\n          }\n\n          let contents = await outputFS.readFile(\n            b.getBundles().find(b => b.name.startsWith('b1')).filePath,\n            'utf8',\n          );\n          assert(!contents.includes('bar'));\n\n          contents = await outputFS.readFile(\n            b.getBundles().find(b => b.name.startsWith('b2')).filePath,\n            'utf8',\n          );\n          assert(!contents.includes('bar'));\n        });\n      });\n    });\n\n    describe('tree shaking dynamic imports', function () {\n      it.skip('supports tree shaking statically analyzable dynamic import: destructued await assignment', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-assignment.js',\n          ),\n        );\n\n        let output = await run(b);\n        assert.deepEqual(output, ['foo', 'thing']);\n\n        assert.deepStrictEqual(\n          new Set(\n            b.getUsedSymbols(\n              findDependency(b, 'await-assignment.js', './async.js'),\n            ),\n          ),\n          new Set(['foo', 'thing']),\n        );\n        assert(b.isDependencySkipped(findDependency(b, 'async.js', './a1.js')));\n\n        let contents = await outputFS.readFile(\n          b\n            .getBundles()\n            .find(b => b.getMainEntry().filePath.endsWith('async.js')).filePath,\n          'utf8',\n        );\n        assert(!contents.includes('bar'));\n        assert(!contents.includes('stuff'));\n      });\n\n      it('supports tree shaking statically analyzable dynamic import: destructured await declaration', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration.js',\n          ),\n          {mode: 'production'},\n        );\n\n        let output = await run(b);\n        assert.deepEqual(output, ['foo', 'thing']);\n\n        assert.deepStrictEqual(\n          new Set(\n            b.getUsedSymbols(\n              findDependency(b, 'await-declaration.js', './async.js'),\n            ),\n          ),\n          new Set(['foo', 'thing']),\n        );\n        assert(b.isDependencySkipped(findDependency(b, 'async.js', './a1.js')));\n\n        let contents = await outputFS.readFile(\n          b\n            .getBundles()\n            .find(b => b.getMainEntry().filePath.endsWith('async.js')).filePath,\n          'utf8',\n        );\n        assert(!contents.includes('bar'));\n        assert(!contents.includes('stuff'));\n      });\n\n      it('supports tree shaking statically analyzable dynamic import: namespace await declaration', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration-namespace.js',\n          ),\n          {mode: 'production'},\n        );\n\n        let output = await run(b);\n        assert.deepEqual(output, ['foo', 'thing']);\n\n        assert.deepStrictEqual(\n          new Set(\n            b.getUsedSymbols(\n              findDependency(b, 'await-declaration-namespace.js', './async.js'),\n            ),\n          ),\n          new Set(['foo', 'thing']),\n        );\n        assert(b.isDependencySkipped(findDependency(b, 'async.js', './a1.js')));\n\n        let contents = await outputFS.readFile(\n          b\n            .getBundles()\n            .find(b => b.getMainEntry().filePath.endsWith('async.js')).filePath,\n          'utf8',\n        );\n        assert(!contents.includes('bar'));\n        assert(!contents.includes('stuff'));\n      });\n\n      it('supports tree shaking statically analyzable dynamic import: namespace await declaration bailout', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration-namespace-bailout.js',\n          ),\n        );\n\n        let output = await run(b);\n        assert.deepEqual(output, {\n          bar: 'bar',\n          foo: 'foo',\n          other: 'other',\n          stuff: 'stuff',\n          thing: 'thing',\n        });\n\n        assert.deepStrictEqual(\n          new Set(\n            b.getUsedSymbols(\n              findDependency(\n                b,\n                'await-declaration-namespace-bailout.js',\n                './async.js',\n              ),\n            ),\n          ),\n          new Set(['*']),\n        );\n      });\n\n      it('supports tree shaking statically analyzable dynamic import: namespace await declaration eval bailout', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/tree-shaking-dynamic-import/await-declaration-namespace-bailout-eval.js',\n          ),\n        );\n\n        let output = await run(b);\n        assert.deepEqual(output, 'thing');\n\n        assert.deepStrictEqual(\n          new Set(\n            b.getUsedSymbols(\n              findDependency(\n                b,\n                'await-declaration-namespace-bailout-eval.js',\n                './async.js',\n              ),\n            ),\n          ),\n          new Set(['*']),\n        );\n      });\n\n      it('supports tree shaking statically analyzable dynamic import: destructured then', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/tree-shaking-dynamic-import/then.js',\n          ),\n          {mode: 'production'},\n        );\n\n        let output = await run(b);\n        assert.deepEqual(output, ['foo', 'thing']);\n\n        assert.deepStrictEqual(\n          new Set(b.getUsedSymbols(findDependency(b, 'then.js', './async.js'))),\n          new Set(['foo', 'thing']),\n        );\n        assert(b.isDependencySkipped(findDependency(b, 'async.js', './a1.js')));\n\n        let contents = await outputFS.readFile(\n          b\n            .getBundles()\n            .find(b => b.getMainEntry().filePath.endsWith('async.js')).filePath,\n          'utf8',\n        );\n        assert(!contents.includes('bar'));\n        assert(!contents.includes('stuff'));\n      });\n\n      it('supports tree shaking statically analyzable dynamic import: namespace then', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/tree-shaking-dynamic-import/then-namespace.js',\n          ),\n          {mode: 'production'},\n        );\n\n        let output = await run(b);\n        assert.deepEqual(output, ['foo', 'thing']);\n\n        assert.deepStrictEqual(\n          new Set(\n            b.getUsedSymbols(\n              findDependency(b, 'then-namespace.js', './async.js'),\n            ),\n          ),\n          new Set(['foo', 'thing']),\n        );\n        assert(b.isDependencySkipped(findDependency(b, 'async.js', './a1.js')));\n\n        let contents = await outputFS.readFile(\n          b\n            .getBundles()\n            .find(b => b.getMainEntry().filePath.endsWith('async.js')).filePath,\n          'utf8',\n        );\n        assert(!contents.includes('bar'));\n        assert(!contents.includes('stuff'));\n      });\n\n      it('supports tree shaking statically analyzable dynamic import: namespace then bailout', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/tree-shaking-dynamic-import/then-namespace-bailout.js',\n          ),\n        );\n\n        let output = await run(b);\n        assert.deepEqual(output, {\n          bar: 'bar',\n          foo: 'foo',\n          other: 'other',\n          stuff: 'stuff',\n          thing: 'thing',\n        });\n\n        assert.deepStrictEqual(\n          new Set(\n            b.getUsedSymbols(\n              findDependency(b, 'then-namespace-bailout.js', './async.js'),\n            ),\n          ),\n          new Set(['*']),\n        );\n      });\n\n      it('supports tree shaking statically analyzable dynamic import: esmodule output', async function () {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/tree-shaking-dynamic-import/then.js',\n          ),\n          {\n            mode: 'production',\n            targets: {\n              default: {\n                outputFormat: 'esmodule',\n                distDir,\n              },\n            },\n          },\n        );\n\n        // let output = await run(b);\n        // assert.deepEqual(output, 'foo');\n\n        assert.deepStrictEqual(\n          new Set(b.getUsedSymbols(findDependency(b, 'then.js', './async.js'))),\n          new Set(['foo', 'thing']),\n        );\n        assert(b.isDependencySkipped(findDependency(b, 'async.js', './a1.js')));\n\n        let contents = await outputFS.readFile(\n          b\n            .getBundles()\n            .find(b => b.getMainEntry().filePath.endsWith('async.js')).filePath,\n          'utf8',\n        );\n        assert(!contents.includes('bar'));\n        assert(!contents.includes('stuff'));\n      });\n\n      it.skip('throws an error for missing exports for dynamic import: destructured await assignment', async function () {\n        let source = 'await-assignment-error.js';\n        let message = `async.js does not export 'missing'`;\n        await assert.rejects(\n          () =>\n            bundle(\n              path.join(\n                __dirname,\n                'integration/scope-hoisting/es6/tree-shaking-dynamic-import',\n                source,\n              ),\n            ),\n          {\n            name: 'BuildError',\n            message,\n            diagnostics: [\n              {\n                message,\n                origin: '@parcel/core',\n                codeFrames: [\n                  {\n                    filePath: source,\n                    language: 'js',\n                    codeHighlights: [\n                      {\n                        start: {\n                          column: 5,\n                          line: 3,\n                        },\n                        end: {\n                          column: 11,\n                          line: 3,\n                        },\n                      },\n                    ],\n                  },\n                ],\n              },\n            ],\n          },\n        );\n      });\n\n      it('throws an error for missing exports for dynamic import: destructured await declaration', async function () {\n        let source = path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/tree-shaking-dynamic-import',\n          'await-declaration-error.js',\n        );\n        let message = `async.js does not export 'missing'`;\n        await assert.rejects(\n          () =>\n            bundle(\n              path.join(\n                __dirname,\n                'integration/scope-hoisting/es6/tree-shaking-dynamic-import',\n                'await-declaration-error.js',\n              ),\n            ),\n          {\n            name: 'BuildError',\n            message,\n            diagnostics: [\n              {\n                message,\n                origin: '@parcel/core',\n                codeFrames: [\n                  {\n                    filePath: source,\n                    language: 'js',\n                    codeHighlights: [\n                      {\n                        message: undefined,\n                        start: {\n                          column: 8,\n                          line: 2,\n                        },\n                        end: {\n                          column: 14,\n                          line: 2,\n                        },\n                      },\n                    ],\n                  },\n                ],\n              },\n            ],\n          },\n        );\n      });\n\n      it('throws an error for missing exports for dynamic import: namespace await declaration', async function () {\n        let source = path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/tree-shaking-dynamic-import',\n          'await-declaration-namespace-error.js',\n        );\n        let message = `async.js does not export 'missing'`;\n        await assert.rejects(\n          () =>\n            bundle(\n              path.join(\n                __dirname,\n                'integration/scope-hoisting/es6/tree-shaking-dynamic-import',\n                'await-declaration-namespace-error.js',\n              ),\n            ),\n          {\n            name: 'BuildError',\n            message,\n            diagnostics: [\n              {\n                message,\n                origin: '@parcel/core',\n                codeFrames: [\n                  {\n                    filePath: source,\n                    language: 'js',\n                    codeHighlights: [\n                      {\n                        message: undefined,\n                        start: {\n                          column: 10,\n                          line: 3,\n                        },\n                        end: {\n                          column: 19,\n                          line: 3,\n                        },\n                      },\n                    ],\n                  },\n                ],\n              },\n            ],\n          },\n        );\n      });\n\n      it('throws an error for missing exports for dynamic import: destructured then', async function () {\n        let source = path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/tree-shaking-dynamic-import',\n          'then-error.js',\n        );\n        let message = `async.js does not export 'missing'`;\n        await assert.rejects(\n          () =>\n            bundle(\n              path.join(\n                __dirname,\n                'integration/scope-hoisting/es6/tree-shaking-dynamic-import',\n                'then-error.js',\n              ),\n            ),\n          {\n            name: 'BuildError',\n            message,\n            diagnostics: [\n              {\n                message,\n                origin: '@parcel/core',\n                codeFrames: [\n                  {\n                    filePath: source,\n                    language: 'js',\n                    codeHighlights: [\n                      {\n                        message: undefined,\n                        start: {\n                          column: 38,\n                          line: 1,\n                        },\n                        end: {\n                          column: 44,\n                          line: 1,\n                        },\n                      },\n                    ],\n                  },\n                ],\n              },\n            ],\n          },\n        );\n      });\n\n      it('throws an error for missing exports for dynamic import: namespace then', async function () {\n        let source = path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/tree-shaking-dynamic-import',\n          'then-namespace-error.js',\n        );\n        let message = `async.js does not export 'missing'`;\n        await assert.rejects(\n          () =>\n            bundle(\n              path.join(\n                __dirname,\n                'integration/scope-hoisting/es6/tree-shaking-dynamic-import',\n                'then-namespace-error.js',\n              ),\n            ),\n          {\n            name: 'BuildError',\n            message,\n            diagnostics: [\n              {\n                message,\n                origin: '@parcel/core',\n                codeFrames: [\n                  {\n                    filePath: source,\n                    language: 'js',\n                    codeHighlights: [\n                      {\n                        message: undefined,\n                        start: {\n                          column: 45,\n                          line: 1,\n                        },\n                        end: {\n                          column: 54,\n                          line: 1,\n                        },\n                      },\n                    ],\n                  },\n                ],\n              },\n            ],\n          },\n        );\n      });\n    });\n\n    it('keeps member expression with computed properties that are variables', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/tree-shaking-export-computed-prop/a.js',\n        ),\n        {\n          defaultTargetOptions: {\n            shouldOptimize: true,\n          },\n        },\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output[0], true);\n      assert.strictEqual(typeof output[1], 'undefined');\n      assert.strictEqual(output[2], true);\n      assert.strictEqual(typeof output[3], 'undefined');\n    });\n\n    it('support exporting a ES6 module exported as CommonJS', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-commonjs/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'foo');\n    });\n\n    it('concatenates in the correct order when re-exporting assets were excluded', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/side-effects-false-order/index.js',\n        ),\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(/\\s+class\\s+/.test(contents));\n\n      let called = false;\n      let output = await run(b, {\n        sideEffect: () => {\n          called = true;\n        },\n      });\n\n      assert(!called, 'side effect called');\n      assert.strictEqual(output[0], 'a');\n      assert.strictEqual(output[1], 'b');\n      assert(new output[3]() instanceof output[2]);\n    });\n\n    it('should support chained reexports from hybrid modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-hybrid/a.js',\n        ),\n      );\n      let output = await run(b);\n      assert.strictEqual(output, 2);\n    });\n\n    it('should support chained reexports as default from hybrid modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-default-hybrid/a.js',\n        ),\n      );\n      let output = await run(b);\n      assert.strictEqual(output, 2);\n    });\n\n    it('support chained namespace reexports of CommonJS', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/re-export-commonjs-wildcard/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'foo');\n    });\n\n    it('should support assets importing themselves', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-self/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 4);\n    });\n\n    it('should support named imports on wrapped modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-wrapped/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'bar');\n    });\n\n    it('should support unused imports of wrapped modules in different bundles', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/import-wrapped-bundle-unused/a.js',\n        ),\n      );\n\n      let called = false;\n      await run(b, {\n        sideEffect() {\n          called = true;\n        },\n      });\n      assert(called);\n    });\n\n    it('should insert esModule flag for interop for async (or shared) bundles', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/interop-async/index.html',\n        ),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n          },\n        },\n      );\n\n      let res = await run(b, {output: null}, {require: false});\n      assert.deepEqual(await res.output, ['client', 'client', 'viewer']);\n    });\n\n    it('should enable minifier to remove unused modules despite of interopDefault', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/interop-pure/a.js',\n        ),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: true,\n            sourceMaps: false,\n          },\n        },\n      );\n\n      let contents = await outputFS.readFileSync(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert.strictEqual(contents.trim().length, 0);\n    });\n\n    it('should support the jsx pragma', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/scope-hoisting/es6/jsx-pragma/a.js'),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {\n        children: 'Test',\n        props: null,\n        type: 'span',\n      });\n    });\n\n    it('should not nameclash with internal variables', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/scope-hoisting/es6/name-clash/a.js'),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'bar');\n    });\n\n    it('supports non-identifier symbol names', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/non-identifier-symbol-name/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 1);\n    });\n\n    it('should shake pure property assignments', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/pure-assignment/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 2);\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(!contents.includes('exports.bar ='));\n    });\n\n    it('should correctly rename references to default exported classes', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/default-export-class-rename/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output.foo, 'bar');\n    });\n\n    it('should correctly rename references to a class in the class body', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/class-selfreference/a.js',\n        ),\n      );\n      let output = await run(b);\n      assert.deepEqual(output.foo, 'bar');\n    });\n\n    it('should correctly codesplit even with reexporting library index', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/codesplit-reexports/src/entry.js',\n        ),\n        {mode: 'production'},\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: [\n            'entry.js',\n            'foo.js',\n            'bar.js',\n            'cacheLoader.js',\n            'js-loader.js',\n          ],\n        },\n        {\n          type: 'js',\n          assets: ['async.js', 'foo2.js', 'bar2.js'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert.deepEqual(output, [\n        [20, 30],\n        [2, 3],\n      ]);\n    });\n\n    it('should correctly retarget dependencies when both namespace and indvidual export are used', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/retarget-namespace-single/index.js',\n        ),\n      );\n      let output = await run(b);\n      assert.deepEqual(output, [123, 123]);\n    });\n\n    it('should correctly handle circular dependencies', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/scope-hoisting/es6/circular/a.mjs'),\n      );\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'b.mjs')))),\n        new Set(['foo']),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'c.mjs')))),\n        new Set(['run']),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'b.mjs', './c.mjs'))),\n        new Set(['run']),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'c.mjs', './b.mjs'))),\n        new Set(['foo']),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 'c:foo');\n    });\n\n    it('should correctly handle circular dependencies (2)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/scope-hoisting/es6/circular2/a.mjs'),\n      );\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'b.mjs')))),\n        new Set(['run', 'foo']),\n      );\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'c.mjs')))),\n        new Set([]),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'b.mjs', './c.mjs'))),\n        new Set(['foo']),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'c.mjs', './b.mjs'))),\n        new Set(['foo']),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 'b:foo:foo');\n    });\n\n    it('should correctly handle circular dependencies (3)', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/scope-hoisting/es6/circular3/a.mjs'),\n      );\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'b.mjs')))),\n        new Set([]),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'c.mjs')))),\n        new Set(['a']),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'd.mjs')))),\n        new Set([]),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'a.mjs', './b.mjs'))),\n        new Set(['h']),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'b.mjs', './c.mjs'))),\n        new Set(['a', 'd', 'g']),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'c.mjs', './d.mjs'))),\n        new Set(['c', 'f']),\n      );\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(findDependency(b, 'd.mjs', './b.mjs'))),\n        new Set(['b', 'e']),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 123);\n    });\n\n    it('should handle circular dependencies with wrapped assets', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/circular-wrap/index.mjs',\n        ),\n      );\n\n      let output = [];\n      await run(b, {\n        output(o) {\n          output.push(o);\n        },\n      });\n\n      assert.deepEqual(output, ['d', 'c', 'b', 'a', 'index']);\n    });\n\n    it('does not tree-shake assignments to unknown objects', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/tree-shaking-no-unknown-objects/index.js',\n        ),\n      );\n\n      assert.equal(await run(b), 42);\n    });\n\n    it('can conditionally reference an imported symbol and unconditionally reference it', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/conditional-import-reference/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 'hello');\n    });\n\n    it('can conditionally reference an imported symbol from another bundle in a case clause', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/async-interop-conditional/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(await output, 42);\n    });\n\n    it('should handle TSC polyfills', async () => {\n      await fsFixture(overlayFS, __dirname)`\n        tsc-polyfill-es6\n          library.js:\n            var __polyfill = (this && this.__polyfill) || function (a) {return a;};\n            export default __polyfill('es6')\n\n          index.js:\n            import value from './library';\n            output = value;`;\n\n      let b = await bundle(path.join(__dirname, 'tsc-polyfill-es6/index.js'), {\n        inputFS: overlayFS,\n      });\n      assert.equal(await run(b), 'es6');\n    });\n\n    describe(\"considers an asset's closest package.json for sideEffects, not the package through which it found the asset\", () => {\n      it('handles redirects up the tree', async () => {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-package-redirect-up/index.js',\n          ),\n        );\n\n        let result = await run(b);\n        assert.strictEqual(result, 1);\n\n        let bar = findAsset(b, 'real-bar.js');\n        assert(bar);\n        assert.strictEqual(bar.sideEffects, false);\n      });\n\n      it('handles redirects down the tree', async () => {\n        let b = await bundle(\n          path.join(\n            __dirname,\n            '/integration/scope-hoisting/es6/side-effects-package-redirect-down/index.js',\n          ),\n        );\n\n        let result = await run(b);\n        assert.strictEqual(result, 1);\n\n        let bar = findAsset(b, 'real-bar.js');\n        assert(bar);\n        assert.strictEqual(bar.sideEffects, false);\n      });\n    });\n\n    describe('correctly updates used symbols on changes', () => {\n      it('throws after removing an export', async function () {\n        let testDir = path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/update-used-symbols-remove-export',\n        );\n\n        let b = bundler(path.join(testDir, 'a.js'), {\n          inputFS: overlayFS,\n          outputFS: overlayFS,\n        });\n\n        await overlayFS.mkdirp(testDir);\n        await overlayFS.copyFile(\n          path.join(testDir, 'b.1.js'),\n          path.join(testDir, 'b.js'),\n        );\n\n        let subscription = await b.watch();\n\n        try {\n          let bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          let output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, 123);\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'b.2.js'),\n            path.join(testDir, 'b.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildFailure');\n          let message = md`${normalizePath(\n            'integration/scope-hoisting/es6/update-used-symbols-remove-export/b.js',\n            false,\n          )} does not export 'foo'`;\n          assert.deepEqual(bundleEvent.diagnostics, [\n            {\n              message,\n              origin: '@parcel/core',\n              codeFrames: [\n                {\n                  filePath: path.join(testDir, 'a.js'),\n                  language: 'js',\n                  codeHighlights: [\n                    {\n                      message: undefined,\n                      start: {\n                        line: 1,\n                        column: 10,\n                      },\n                      end: {\n                        line: 1,\n                        column: 12,\n                      },\n                    },\n                  ],\n                },\n              ],\n            },\n          ]);\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'b.1.js'),\n            path.join(testDir, 'b.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, 123);\n\n          assert.deepStrictEqual(\n            new Set(\n              bundleEvent.bundleGraph.getUsedSymbols(\n                findAsset(bundleEvent.bundleGraph, 'b.js'),\n              ),\n            ),\n            new Set(['foo']),\n          );\n        } finally {\n          await subscription.unsubscribe();\n        }\n      });\n\n      it('dependency symbols change', async function () {\n        let testDir = path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/update-used-symbols-dependency-symbols',\n        );\n\n        let b = bundler(path.join(testDir, 'index.js'), {\n          inputFS: overlayFS,\n          outputFS: overlayFS,\n        });\n\n        await overlayFS.mkdirp(testDir);\n        await overlayFS.copyFile(\n          path.join(testDir, 'index.1.js'),\n          path.join(testDir, 'index.js'),\n        );\n\n        let subscription = await b.watch();\n\n        try {\n          let bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          let output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, [123]);\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'index.2.js'),\n            path.join(testDir, 'index.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, [123, 789]);\n\n          assert.deepStrictEqual(\n            new Set(\n              bundleEvent.bundleGraph.getUsedSymbols(\n                findAsset(bundleEvent.bundleGraph, 'c.js'),\n              ),\n            ),\n            new Set(['c']),\n          );\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'index.1.js'),\n            path.join(testDir, 'index.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, [123]);\n\n          assert(!findAsset(bundleEvent.bundleGraph, 'c.js'));\n        } finally {\n          await subscription.unsubscribe();\n        }\n      });\n\n      it('add and remove dependency (keep asset)', async function () {\n        let testDir = path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/update-used-symbols-dependency-add',\n        );\n\n        let b = bundler(path.join(testDir, 'index.js'), {\n          inputFS: overlayFS,\n          outputFS: overlayFS,\n        });\n\n        await overlayFS.mkdirp(testDir);\n        await overlayFS.copyFile(\n          path.join(testDir, 'index.1.js'),\n          path.join(testDir, 'index.js'),\n        );\n\n        let subscription = await b.watch();\n\n        try {\n          let bundleEvent = await getNextBuild(b);\n          assert(bundleEvent.type === 'buildSuccess');\n          let output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, [123]);\n\n          let assetC = nullthrows(findAsset(bundleEvent.bundleGraph, 'd1.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetC)),\n            new Set(['a']),\n          );\n          assert(!findAsset(bundleEvent.bundleGraph, 'd2.js'));\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'index.2.js'),\n            path.join(testDir, 'index.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, [\n            123,\n            789,\n            {\n              d1: 1,\n              d2: 2,\n            },\n          ]);\n\n          assetC = nullthrows(findAsset(bundleEvent.bundleGraph, 'd1.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetC)),\n            new Set(['a', 'b']),\n          );\n          let assetD = nullthrows(findAsset(bundleEvent.bundleGraph, 'd2.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetD)),\n            new Set(['*']),\n          );\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'index.1.js'),\n            path.join(testDir, 'index.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, [123]);\n\n          assetC = nullthrows(findAsset(bundleEvent.bundleGraph, 'd1.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetC)),\n            new Set(['a']),\n          );\n          assert(!findAsset(bundleEvent.bundleGraph, 'd2.js'));\n        } finally {\n          await subscription.unsubscribe();\n        }\n      });\n\n      it('add and remove dependency (remove asset)', async function () {\n        let testDir = path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/update-used-symbols-dependency-add',\n        );\n\n        let b = bundler(path.join(testDir, 'index.js'), {\n          inputFS: overlayFS,\n          outputFS: overlayFS,\n        });\n\n        await overlayFS.mkdirp(testDir);\n        await overlayFS.copyFile(\n          path.join(testDir, 'index.3.js'),\n          path.join(testDir, 'index.js'),\n        );\n\n        let subscription = await b.watch();\n\n        try {\n          let bundleEvent = await getNextBuild(b);\n          assert(bundleEvent.type === 'buildSuccess');\n          let output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, [\n            789,\n            {\n              d1: 1,\n              d2: 2,\n            },\n          ]);\n\n          let assetC = nullthrows(findAsset(bundleEvent.bundleGraph, 'd1.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetC)),\n            new Set(['b']),\n          );\n          let assetD = nullthrows(findAsset(bundleEvent.bundleGraph, 'd2.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetD)),\n            new Set(['*']),\n          );\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'index.2.js'),\n            path.join(testDir, 'index.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, [\n            123,\n            789,\n            {\n              d1: 1,\n              d2: 2,\n            },\n          ]);\n\n          assetC = nullthrows(findAsset(bundleEvent.bundleGraph, 'd1.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetC)),\n            new Set(['a', 'b']),\n          );\n          assetD = nullthrows(findAsset(bundleEvent.bundleGraph, 'd2.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetD)),\n            new Set(['*']),\n          );\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'index.3.js'),\n            path.join(testDir, 'index.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, [\n            789,\n            {\n              d1: 1,\n              d2: 2,\n            },\n          ]);\n\n          assetC = nullthrows(findAsset(bundleEvent.bundleGraph, 'd1.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetC)),\n            new Set(['b']),\n          );\n          assetD = nullthrows(findAsset(bundleEvent.bundleGraph, 'd2.js'));\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetD)),\n            new Set(['*']),\n          );\n        } finally {\n          await subscription.unsubscribe();\n        }\n      });\n\n      it('add and remove dependency with inline asset', async function () {\n        let testDir = path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/update-used-symbols-dependency-add-inline',\n        );\n\n        let b = bundler(path.join(testDir, 'index.js'), {\n          inputFS: overlayFS,\n          outputFS: overlayFS,\n        });\n\n        await overlayFS.mkdirp(testDir);\n        await overlayFS.copyFile(\n          path.join(testDir, 'other.1.js'),\n          path.join(testDir, 'other.js'),\n        );\n\n        let subscription = await b.watch();\n\n        try {\n          let bundleEvent = await getNextBuild(b);\n          assert(bundleEvent.type === 'buildSuccess');\n          let output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, 123);\n\n          let assetOther = nullthrows(\n            findAsset(bundleEvent.bundleGraph, 'other.js'),\n          );\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetOther)),\n            new Set([]),\n          );\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'other.2.js'),\n            path.join(testDir, 'other.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, 1);\n\n          assetOther = nullthrows(\n            findAsset(bundleEvent.bundleGraph, 'other.js'),\n          );\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetOther)),\n            new Set(['a']),\n          );\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'other.1.js'),\n            path.join(testDir, 'other.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          output = await run(bundleEvent.bundleGraph);\n          assert.deepEqual(output, 123);\n\n          assetOther = nullthrows(\n            findAsset(bundleEvent.bundleGraph, 'other.js'),\n          );\n          assert.deepStrictEqual(\n            new Set(bundleEvent.bundleGraph.getUsedSymbols(assetOther)),\n            new Set([]),\n          );\n          assert(!findAsset(bundleEvent.bundleGraph, 'd2.js'));\n        } finally {\n          await subscription.unsubscribe();\n        }\n      });\n\n      it('add and remove dependency with namespace', async function () {\n        let testDir = path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/update-used-symbols-dependency-add-namespace',\n        );\n\n        let b = bundler(path.join(testDir, 'index.html'), {\n          inputFS: overlayFS,\n          outputFS: overlayFS,\n          mode: 'production',\n        });\n\n        await overlayFS.mkdirp(testDir);\n        await overlayFS.copyFile(\n          path.join(testDir, 'index.1.js'),\n          path.join(testDir, 'index.js'),\n        );\n\n        let subscription = await b.watch();\n\n        try {\n          let bundleEvent = await getNextBuild(b);\n          assert(bundleEvent.type === 'buildSuccess');\n          let res = await run(\n            bundleEvent.bundleGraph,\n            {output: null},\n            {require: false},\n          );\n          assert.deepEqual(await res.output, {akGridSize: 8});\n\n          assert.deepStrictEqual(\n            new Set(\n              bundleEvent.bundleGraph.getUsedSymbols(\n                findAsset(bundleEvent.bundleGraph, 'themeConstants.js'),\n              ),\n            ),\n            new Set(['gridSize']),\n          );\n          assert(!findAsset(bundleEvent.bundleGraph, 'themeColors.js'));\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'index.2.js'),\n            path.join(testDir, 'index.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          res = await run(\n            bundleEvent.bundleGraph,\n            {output: null},\n            {require: false},\n          );\n          assert.deepEqual(await res.output, [\n            {akGridSize: 8},\n            {akEmojiSelectedBackgroundColor: '#EBECF0'},\n          ]);\n\n          assert.deepStrictEqual(\n            new Set(\n              bundleEvent.bundleGraph.getUsedSymbols(\n                findAsset(bundleEvent.bundleGraph, 'themeConstants.js'),\n              ),\n            ),\n            new Set(['borderRadius', 'gridSize']),\n          );\n          assert(!findAsset(bundleEvent.bundleGraph, 'theme.js'));\n          assert(findAsset(bundleEvent.bundleGraph, 'themeColors.js'));\n\n          await overlayFS.copyFile(\n            path.join(testDir, 'index.1.js'),\n            path.join(testDir, 'index.js'),\n          );\n\n          bundleEvent = await getNextBuild(b);\n          assert.strictEqual(bundleEvent.type, 'buildSuccess');\n          res = await run(\n            bundleEvent.bundleGraph,\n            {output: null},\n            {require: false},\n          );\n          assert.deepEqual(await res.output, {akGridSize: 8});\n\n          assert.deepStrictEqual(\n            new Set(\n              bundleEvent.bundleGraph.getUsedSymbols(\n                findAsset(bundleEvent.bundleGraph, 'themeConstants.js'),\n              ),\n            ),\n            new Set(['gridSize']),\n          );\n          assert(!findAsset(bundleEvent.bundleGraph, 'themeColors.js'));\n        } finally {\n          await subscription.unsubscribe();\n        }\n      });\n    });\n\n    it('removes functions that increment variables in object properties', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/tree-shaking-increment-object/a.js',\n        ),\n        {\n          defaultTargetOptions: {\n            shouldOptimize: true,\n          },\n        },\n      );\n\n      let content = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(!content.includes('++'));\n\n      await run(b);\n    });\n\n    it('can import urls to raw assets', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/raw-url/index-import.js',\n        ),\n      );\n\n      assert.deepStrictEqual(\n        new Set(\n          b.getUsedSymbols(\n            findDependency(b, 'index-import.js', 'url:./foo.png'),\n          ),\n        ),\n        new Set(['default']),\n      );\n\n      let output = await run(b);\n      assert(/foo\\.[a-f0-9]+\\.png$/.test(output));\n    });\n\n    it('can reexport urls to raw assets', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/es6/raw-url/index-reexport.js',\n        ),\n      );\n\n      assert.deepStrictEqual(\n        new Set(\n          b.getUsedSymbols(\n            findDependency(b, 'index-reexport.js', './reexports'),\n          ),\n        ),\n        new Set(['assetUrl']),\n      );\n      assert.deepStrictEqual(\n        new Set(\n          b.getUsedSymbols(findDependency(b, 'reexports.js', 'url:./foo.png')),\n        ),\n        new Set(['default']),\n      );\n\n      let output = await run(b);\n      assert(/foo\\.[a-f0-9]+\\.png$/.test(output));\n    });\n\n    it('should wrap modules in shared bundles', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5659\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/shared-bundle-side-effect-order/index.js',\n        ),\n        {mode: 'production'},\n      );\n\n      let sideEffects = [];\n      let res = await run(b, {\n        sideEffect(out) {\n          sideEffects.push(out);\n        },\n      });\n      await res;\n      assert.deepEqual(sideEffects, ['shared1', 'run1 1', 'shared2', 'run2 2']);\n    });\n\n    it('should ensure that modules are only executed once in shared bundles', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5659\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/shared-bundle-side-effect-duplication/index.js',\n        ),\n        {mode: 'production'},\n      );\n\n      let sideEffects = [];\n      let res = await run(b, {\n        sideEffect(out) {\n          sideEffects.push(out);\n        },\n      });\n      await res;\n      assert.deepEqual(sideEffects, ['v']);\n    });\n\n    it('should error when assigning to a named import', async function () {\n      let source = path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/import-local-assign/named.js',\n      );\n\n      await assert.rejects(() => bundle(source), {\n        name: 'BuildError',\n        message: 'Assignment to an import specifier is not allowed',\n        diagnostics: [\n          {\n            message: 'Assignment to an import specifier is not allowed',\n            origin: '@parcel/transformer-js',\n            codeFrames: [\n              {\n                filePath: source,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 1,\n                    },\n                    end: {\n                      line: 2,\n                      column: 3,\n                    },\n                  },\n                  {\n                    message: 'Originally imported here',\n                    start: {\n                      line: 1,\n                      column: 9,\n                    },\n                    end: {\n                      line: 1,\n                      column: 11,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: null,\n          },\n        ],\n      });\n    });\n\n    it('should error when assigning to a default import', async function () {\n      let source = path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/import-local-assign/default.js',\n      );\n\n      await assert.rejects(() => bundle(source), {\n        name: 'BuildError',\n        message: 'Assignment to an import specifier is not allowed',\n        diagnostics: [\n          {\n            message: 'Assignment to an import specifier is not allowed',\n            origin: '@parcel/transformer-js',\n            codeFrames: [\n              {\n                filePath: source,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 1,\n                    },\n                    end: {\n                      line: 2,\n                      column: 1,\n                    },\n                  },\n                  {\n                    message: 'Originally imported here',\n                    start: {\n                      line: 1,\n                      column: 8,\n                    },\n                    end: {\n                      line: 1,\n                      column: 8,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: null,\n          },\n        ],\n      });\n    });\n\n    it('should error when assigning to a namespace import', async function () {\n      let source = path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/import-local-assign/namespace.js',\n      );\n\n      await assert.rejects(() => bundle(source), {\n        name: 'BuildError',\n        message: 'Assignment to an import specifier is not allowed',\n        diagnostics: [\n          {\n            message: 'Assignment to an import specifier is not allowed',\n            origin: '@parcel/transformer-js',\n            codeFrames: [\n              {\n                filePath: source,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 1,\n                    },\n                    end: {\n                      line: 2,\n                      column: 1,\n                    },\n                  },\n                  {\n                    message: 'Originally imported here',\n                    start: {\n                      line: 1,\n                      column: 13,\n                    },\n                    end: {\n                      line: 1,\n                      column: 13,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: null,\n          },\n        ],\n      });\n    });\n\n    it('should error with a destructuring assignment to a namespace import', async function () {\n      let source = path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/import-local-assign/destructure-assign.js',\n      );\n\n      await assert.rejects(() => bundle(source), {\n        name: 'BuildError',\n        message: 'Assignment to an import specifier is not allowed',\n        diagnostics: [\n          {\n            message: 'Assignment to an import specifier is not allowed',\n            origin: '@parcel/transformer-js',\n            codeFrames: [\n              {\n                filePath: source,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 8,\n                    },\n                    end: {\n                      line: 2,\n                      column: 10,\n                    },\n                  },\n                  {\n                    message: 'Originally imported here',\n                    start: {\n                      line: 1,\n                      column: 9,\n                    },\n                    end: {\n                      line: 1,\n                      column: 11,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: null,\n          },\n        ],\n      });\n    });\n\n    it('should error with multiple assignments to an import', async function () {\n      let source = path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/import-local-assign/multiple.js',\n      );\n\n      await assert.rejects(() => bundle(source), {\n        name: 'BuildError',\n        message: 'Assignment to an import specifier is not allowed',\n        diagnostics: [\n          {\n            message: 'Assignment to an import specifier is not allowed',\n            origin: '@parcel/transformer-js',\n            codeFrames: [\n              {\n                filePath: source,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 2,\n                      column: 1,\n                    },\n                    end: {\n                      line: 2,\n                      column: 3,\n                    },\n                  },\n                  {\n                    message: undefined,\n                    start: {\n                      line: 3,\n                      column: 1,\n                    },\n                    end: {\n                      line: 3,\n                      column: 3,\n                    },\n                  },\n                  {\n                    message: 'Originally imported here',\n                    start: {\n                      line: 1,\n                      column: 9,\n                    },\n                    end: {\n                      line: 1,\n                      column: 11,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: null,\n          },\n        ],\n      });\n    });\n\n    it('should allow re-declaring __esModule interop flag', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/double-esmodule/index.js',\n        ),\n      );\n\n      let res = await run(b);\n      assert.deepEqual(res, 'default');\n    });\n\n    it('can dynamically import a side-effect-free reexport', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/conditional-import-side-effect-free-reexport/index.mjs',\n        ),\n      );\n\n      assert.deepEqual(await run(b), 42);\n    });\n\n    it('individually exports symbols from intermediately wrapped reexports', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/export-intermediate-wrapped-reexports/index.mjs',\n        ),\n      );\n\n      let res = await Promise.all(await run(b));\n      assert.deepEqual(res, [42, 42]);\n    });\n\n    it('should treat type-only TypeScript modules as ESM', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/empty-ts/index.ts',\n        ),\n      );\n\n      let test = await run(b);\n      assert.equal(test({foo: 2}), 2);\n    });\n\n    it('should not include default when reexporting * without $parcel$exportWildcard', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/no-reexport-default/index.js',\n        ),\n      );\n\n      assert.equal(await run(b), 42);\n    });\n\n    it('should not include __esModule when reexporting * without $parcel$exportWildcard', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/no-reexport-esmodule/index.js',\n        ),\n      );\n\n      assert.equal(await run(b), undefined);\n    });\n\n    it('should handle interop with a re-export namespace', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/re-export-interop/a.js',\n        ),\n      );\n\n      let res = await run(b);\n      assert.deepEqual(res['en_US'], {\n        test: 'foo',\n      });\n    });\n\n    it('should prioritize named exports before re-exports (before)', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/re-export-priority/entry-a.mjs',\n        ),\n      );\n\n      let res = await run(b);\n      assert.equal(res, 2);\n    });\n\n    it('should prioritize named exports before re-exports (after)', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/re-export-priority/entry-b.mjs',\n        ),\n      );\n\n      let res = await run(b);\n      assert.equal(res, 2);\n    });\n\n    it('should prioritize named exports before re-exports in namespace (before)', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/re-export-priority/namespace-a.mjs',\n        ),\n      );\n\n      let res = await run(b);\n      assert.deepEqual(res, {foo: 2});\n    });\n\n    it('should prioritize named exports before re-exports in namespace (after)', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/es6/re-export-priority/namespace-b.mjs',\n        ),\n      );\n\n      let res = await run(b);\n      assert.deepEqual(res, {foo: 2});\n    });\n\n    it('supports constant inlining', async function () {\n      let b = await bundle(\n        path.join(__dirname, 'integration/inline-constants/index.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            sourceMaps: false,\n          },\n        },\n      );\n\n      let constants = ['BLOGGER', 'PREMIUM', 'MONTHS_IN_YEAR'];\n\n      for (let bundle of b.getBundles()) {\n        let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n\n        // Check constant export names are NOT present in the bundles\n        assert(\n          constants.every(constant => !contents.includes(constant)),\n          `Bundle didn't inline constant values`,\n        );\n      }\n\n      // Run the bundle to make sure it's valid\n      await run(b);\n    });\n\n    it('supports constant inlining with shared bundles', async function () {\n      let b = await bundle(\n        [\n          path.join(\n            __dirname,\n            'integration/inline-constants-shared-bundles/a.html',\n          ),\n          path.join(\n            __dirname,\n            'integration/inline-constants-shared-bundles/b.html',\n          ),\n        ],\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            sourceMaps: false,\n          },\n        },\n      );\n\n      let constants = ['BLOGGER', 'PREMIUM', 'MONTHS_IN_YEAR'];\n\n      for (let bundle of b.getBundles()) {\n        let contents = await outputFS.readFile(bundle.filePath, 'utf8');\n\n        // Check constant export names are NOT present in the bundles\n        assert(\n          constants.every(constant => !contents.includes(constant)),\n          `Bundle didn't inline constant values`,\n        );\n      }\n\n      // Run the bundle to make sure it's valid\n      await run(b);\n    });\n  });\n\n  describe('commonjs', function () {\n    it('should wrap when this could refer to an export', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-this/a.js',\n        ),\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n\n      let wrapped = contents.includes('exports.bar()');\n      assert.equal(wrapped, true);\n    });\n\n    it('supports require of commonjs modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('concats commonjs modules in the correct order', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/concat-order/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports default imports of commonjs modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/default-import/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('concats modules with inserted globals in the correct order', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/concat-order-globals/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 'foobar');\n    });\n\n    it('supports named imports of commonjs modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/named-import/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports namespace imports of commonjs modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/import-namespace/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports require of es6 default export of expressions', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-default-export-expression/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports require of es6 default export of declarations', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-default-export-declaration/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports require of es6 default export of variables', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-default-export-variable/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports require of es6 named export of declarations', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-named-export-declaration/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports require of es6 named export of variables', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-named-export-variable/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports require of es6 renamed exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-renamed-export/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('supports require of es6 module re-exporting all exports from another module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-re-export-all/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 6);\n    });\n\n    it('supports require of es6 module re-exporting all exports from multiple modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-re-export-multiple/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 7);\n    });\n\n    it('supports re-exporting individual named exports from another module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-re-export-named/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 3);\n    });\n\n    it('supports re-exporting default exports from another module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-re-export-default/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 3);\n    });\n\n    it('supports re-exporting a namespace from another module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-re-export-namespace/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 6);\n    });\n\n    it('excludes default when re-exporting a module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-re-export-exclude-default/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {foo: 3});\n    });\n\n    it('supports hybrid ES6 + commonjs modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/es6-commonjs-hybrid/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('inserts commonjs exports object in the right place', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/export-order/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('bails out exports access resolving if it is accessed freely (exports assign)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-access-bailout/exports-assign.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('bails out exports access resolving if it is accessed freely (exports define)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-access-bailout/exports-define.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('bails out exports access resolving if it is accessed freely (module.exports assign)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-assign.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('bails out exports access resolving if it is accessed freely (module.exports define)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-define.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('bails out imported exports access resolving if it is accessed freely (exports assign)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-access-bailout/exports-assign-entry.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('bails out imported exports access resolving if it is accessed freely (exports define)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-access-bailout/exports-define-entry.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('bails out imported exports access resolving if it is accessed freely (module.exports assign)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-assign-entry.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('bails out imported exports access resolving if it is accessed freely (module.exports define)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-access-bailout/module-exports-define-entry.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 5);\n    });\n\n    it('bails out imported exports access resolving if it is accessed freely (exports reexport)', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-access-bailout/exports-assign-reexport-entry.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [5, 5]);\n    });\n\n    it('builds commonjs modules that assigns to exports before module.exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-before-module-exports/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 42);\n    });\n\n    it('builds commonjs modules that assigns to module.exports before exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/module-exports-before-exports/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 42);\n    });\n\n    it('should support assigning to module.exports with another export', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5782\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/module-exports-default-assignment/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output.foo, 'b');\n    });\n\n    it(\"doesn't insert parcelRequire for missing non-js assets\", async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/missing-non-js/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 27);\n    });\n\n    it('define exports in the outermost scope', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/define-exports/a.js',\n        ),\n      );\n\n      assert.deepStrictEqual(\n        new Set(b.getUsedSymbols(nullthrows(findAsset(b, 'a.js')))),\n        new Set(['*']),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 'bar');\n    });\n\n    it('supports non-identifier symbol names', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/non-identifier-symbol-name/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 1);\n    });\n\n    it('supports live bindings of named exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/live-bindings/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 8);\n    });\n\n    it('should wrap modules that use eval in a function', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-eval/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 4);\n    });\n\n    it('should wrap modules that have a top-level return', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-return/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('should remove unused exports assignments for wrapped modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-unused/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 1);\n    });\n\n    it('should hoist all vars in the scope', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-var-hoisting/a.js',\n        ),\n      );\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n\n      assert(contents.split('f1_var').length - 1, 1);\n      assert(contents.split('f2_var').length - 1, 1);\n      assert(contents.split('f3_var').length - 1, 1);\n      assert(contents.split('f4_var').length - 1, 1);\n      assert(contents.split('c1_var').length - 1, 1);\n      assert(contents.split('c2_var').length - 1, 1);\n      assert(contents.split('BigIntSupported').length - 1, 4);\n      assert(contents.split('inner_let').length - 1, 2);\n\n      let output = await run(b);\n      assert.equal(output, true);\n    });\n\n    it('should wrap modules that access `module` as a free variable', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-module/a.js',\n        ),\n      );\n\n      assert.deepEqual((await run(b)).exports, {foo: 2});\n    });\n\n    it('should call init for wrapped modules when codesplitting', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-module-codesplit/a.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), 2);\n    });\n\n    it('should wrap modules that non-statically access `module`', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-module-computed/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {foo: 2});\n    });\n\n    it('should support referencing a require in object literal shorthands when wrapped', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-module-obj-literal-require/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 1234);\n    });\n\n    it('should support typeof require when wrapped', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5883\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-typeof-require/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 'c1');\n    });\n\n    it('should not rename function local variables according to global replacements', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/keep-local-function-var/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'foo');\n    });\n\n    it('supports using this in arrow functions', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/this-arrow-function/a.js',\n        ),\n      );\n\n      let content = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(content.includes('=>'));\n\n      let output = await run(b);\n      assert.strictEqual(output, 'Say other');\n    });\n\n    it('supports assigning to this as exports object', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/this-reference/a.js',\n        ),\n      );\n\n      let output = await run(b, {output: null}, {strict: true});\n      assert.deepEqual(output, [6, undefined]);\n    });\n\n    it('supports assigning to this as exports object in wrapped module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/this-reference-wrapped/a.js',\n        ),\n      );\n\n      let output = await run(b, {output: null}, {strict: true});\n      assert.deepEqual(output, [6, undefined, 4]);\n    });\n\n    it('supports using exports self reference', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/exports-self-reference/a.js',\n        ),\n      );\n\n      let content = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(content.includes('=>'));\n\n      let output = await run(b);\n      assert.strictEqual(output, 'Say other');\n    });\n\n    it('supports using module.exports self reference', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/module-exports-self-reference/a.js',\n        ),\n      );\n\n      let content = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(content.includes('=>'));\n\n      let output = await run(b);\n      assert.strictEqual(output, 'Say other');\n    });\n\n    it('supports using module.require like require', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/module-require/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output.b, 2);\n    });\n\n    it('support url imports in wrapped modules with interop', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-interop-url-import/a.js',\n        ),\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['a.js', 'b.js'],\n        },\n        {\n          type: 'txt',\n          assets: ['data.txt'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert(output.endsWith('.txt'));\n    });\n\n    it('supports module object properties', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/module-object/a.js',\n        ),\n      );\n\n      let entryAsset = b.getBundles()[0].getMainEntry();\n\n      // TODO: this test doesn't currently work in older browsers since babel\n      // replaces the typeof calls before we can get to them.\n      let output = await run(b);\n      assert.equal(output.id, b.getAssetPublicId(entryAsset));\n      assert.equal(output.hot, null);\n      assert.equal(output.moduleRequire, null);\n      assert.equal(output.type, 'object');\n      assert.deepEqual(output.exports, {});\n      assert.equal(output.exportsType, 'object');\n      assert.equal(output.require, 'function');\n    });\n\n    it.skip(\"doesn't support require.resolve calls for included assets\", async function () {\n      let message =\n        \"'require.resolve' calls for bundled modules or bundled assets aren't supported with scope hoisting\";\n      let source = path.join(\n        __dirname,\n        '/integration/scope-hoisting/commonjs/require-resolve/a.js',\n      );\n      await assert.rejects(() => bundle(source), {\n        name: 'BuildError',\n        message,\n        diagnostics: [\n          {\n            message,\n            origin: '@parcel/packager-js',\n            codeFrames: [\n              {\n                filePath: source,\n                language: 'js',\n                codeHighlights: [\n                  {\n                    start: {\n                      line: 3,\n                      column: 10,\n                    },\n                    end: {\n                      line: 3,\n                      column: 31,\n                    },\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      });\n    });\n\n    it('supports mutations of the exports object by the importer', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/mutated-exports-object-importer/index.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), [43, {foo: 43}]);\n    });\n\n    it('supports mutations of the exports object by a different asset', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/mutated-exports-object-different/index.js',\n        ),\n      );\n\n      assert.equal(await run(b), 43);\n    });\n\n    it('supports mutations of the exports object inside an expression', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/mutated-exports-object-expression/index.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), [{foo: 3}, 3, 3]);\n    });\n\n    it('supports non-static mutations of the exports object', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5591\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/mutated-non-static-require/index.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), 4);\n    });\n\n    it('supports mutations of the cjs exports by the importer from a mixed module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/mutated-exports-mixed-module/index.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), [\n        'CJS mutated',\n        'ESM',\n        {cjs: 'CJS mutated', esm: 'ESM'},\n      ]);\n    });\n\n    it.skip('supports require.resolve calls for excluded modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-resolve-excluded/a.js',\n        ),\n      );\n\n      let output = await run(b, {\n        require: {\n          resolve: () => 'my-resolved-fs',\n        },\n      });\n      assert.deepEqual(output, 'my-resolved-fs');\n    });\n\n    it('should support assets requiring themselves', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-self/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output, 4);\n    });\n\n    it('supports requiring a re-exported ES6 import', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/re-export-var/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 'foobar');\n    });\n\n    it('supports object pattern requires', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/object-pattern/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 5);\n    });\n\n    it('eliminates CommonJS export object where possible', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/eliminate-exports/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 6);\n    });\n\n    it('supports multiple assignments in one line', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/multi-assign/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {foo: 2, bar: 2, baz: 2});\n    });\n\n    it('supports circular dependencies', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-circular/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 'foo bar');\n    });\n\n    it('executes modules in the correct order', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-execution-order/a.js',\n        ),\n      );\n\n      let out = [];\n      await run(b, {\n        output(o) {\n          out.push(o);\n        },\n      });\n\n      assert.deepEqual(out, ['a', 'b', 'c', 'd']);\n    });\n\n    it('supports conditional requires', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-conditional/a.js',\n        ),\n      );\n\n      let out = [];\n      await run(b, {\n        b: false,\n        output(o) {\n          out.push(o);\n        },\n      });\n\n      assert.deepEqual(out, ['a', 'd']);\n\n      out = [];\n      await run(b, {\n        b: true,\n        output(o) {\n          out.push(o);\n        },\n      });\n\n      assert.deepEqual(out, ['a', 'b', 'c', 'd']);\n    });\n\n    it('supports requiring a CSS asset', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-css/a.js',\n        ),\n      );\n\n      assertBundles(b, [\n        {\n          name: 'a.js',\n          assets: ['a.js'],\n        },\n        {\n          type: 'css',\n          assets: ['b.css'],\n        },\n      ]);\n\n      await run(b);\n    });\n\n    it('supports requires inside functions', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-in-function/a.js',\n        ),\n      );\n\n      let out = [];\n      await run(b, {\n        output(o) {\n          out.push(o);\n        },\n      });\n\n      assert.deepEqual(out, ['a', 'c', 'b']);\n    });\n\n    it('supports requires inside functions with es6 import side effects', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-in-function-import/a.js',\n        ),\n      );\n\n      let out = [];\n      await run(b, {\n        output(o) {\n          out.push(o);\n        },\n      });\n\n      assert.deepEqual(out, ['a', 'd', 'c', 'b']);\n    });\n\n    it('hoists import calls to the top', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-in-function-import-hoist/a.js',\n        ),\n      );\n\n      let out = [];\n      await run(b, {\n        output(o) {\n          out.push(o);\n        },\n      });\n\n      assert.deepEqual(out, ['a', 'd', 'c', 'b']);\n    });\n\n    it('supports requires inside functions with es6 re-export side effects', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-in-function-reexport/a.js',\n        ),\n      );\n\n      let out = [];\n      await run(b, {\n        output(o) {\n          out.push(o);\n        },\n      });\n\n      assert.deepEqual(out, ['a', 'd', 'c', 'b']);\n    });\n\n    it('can bundle the node stream module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/stream-module/a.js',\n        ),\n      );\n\n      let res = await run(b);\n      assert.equal(typeof res.Readable, 'function');\n      assert.equal(typeof res.Writable, 'function');\n      assert.equal(typeof res.Duplex, 'function');\n    });\n\n    it('missing exports should be replaced with an empty object', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/empty-module/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {b: {}});\n    });\n\n    it('removes unused exports', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/tree-shaking/a.js',\n        ),\n        {mode: 'production'},\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 2);\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('foo'));\n      assert(!contents.includes('bar'));\n    });\n\n    it('removes unused exports when assigning with a string literal', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/tree-shaking-string/a.js',\n        ),\n        {mode: 'production'},\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [2, 20]);\n\n      let contents = await outputFS.readFile(\n        b.getBundles()[0].filePath,\n        'utf8',\n      );\n      assert(contents.includes('foo'));\n      assert(!contents.includes('bar'));\n    });\n\n    it('supports removing an unused inline export with uglify minification', async function () {\n      // Uglify does strange things to multiple assignments in a line.\n      // See https://github.com/parcel-bundler/parcel/issues/1549\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/export-local/a.js',\n        ),\n        {\n          defaultTargetOptions: {\n            shouldOptimize: true,\n          },\n        },\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 3);\n    });\n\n    it('should support sideEffects: false', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/side-effects-false/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 9);\n    });\n\n    it('can bundle browserify-produced umd bundles', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/browserify-compat/index.js',\n        ),\n      );\n\n      assert.equal(await run(b), 'foo');\n    });\n\n    it('replaces properties of require with undefined', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-extensions/index.js',\n        ),\n      );\n\n      await run(b);\n    });\n\n    it('should support two aliases to the same module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-aliases/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 42);\n    });\n\n    it('should retain the correct concat order with wrapped assets', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-concat-order/a.js',\n        ),\n      );\n\n      let calls = [];\n      await run(b, {\n        sideEffect(v) {\n          calls.push(v);\n        },\n      });\n      assert.deepStrictEqual(calls, [1, 2, 3, 4, 5, 6, 7]);\n    });\n\n    it('should support optional requires', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-optional/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 42);\n    });\n\n    it('should insert __esModule interop flag when importing from an ES module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/interop-require-es-module/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output.__esModule, true);\n      assert.equal(output.default, 2);\n    });\n\n    it('should export the same values for interop shared modules in main and child bundle', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/interop-require-es-module-code-split/main.js',\n        ),\n      );\n\n      assert.equal(await run(b), 'bar:bar');\n    });\n\n    it('should export the same values for interop shared modules in main and child bundle if shared bundle is deep nested', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/interop-require-es-module-code-split-intermediate/main.js',\n        ),\n      );\n\n      assert.equal(await run(b), 'bar:bar');\n    });\n\n    it('should not insert interop default for commonjs modules with default export', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/interop-require-commonjs/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      let obj = {\n        test: 2,\n      };\n      obj.default = obj;\n      assert.deepEqual(output.default, obj);\n    });\n\n    it('should add a default interop for a CJS module used in a hybrid module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/interop-commonjs-hybrid/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('should add a default interop for a CJS module used non-statically in a hybrid module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/interop-commonjs-hybrid-dynamic/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('should not insert default interop for wrapped CJS modules', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/interop-require-commonjs-wrapped/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 'default');\n    });\n\n    it('should support multiple requires in the same variable declaration', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-multiple/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 'before foo middle bar after');\n    });\n\n    it('should support assigning to exports from inside a function', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/export-assign-scope/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, 2);\n    });\n\n    it('should also hoist inserted polyfills of globals', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/globals-polyfills/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, true);\n    });\n\n    it('should support wrapping array destructuring declarations', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-destructuring-array/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [1, 2]);\n    });\n\n    it('should support wrapping object destructuring declarations', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-destructuring-object/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, [4, 2]);\n    });\n\n    it('does not tree-shake assignments to unknown objects', async () => {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/tree-shaking-no-unknown-objects/index.js',\n        ),\n      );\n\n      assert.equal(await run(b), 42);\n    });\n\n    it('can conditionally reference an imported symbol and unconditionally reference it', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/conditional-import-reference/index.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 'hello');\n    });\n\n    it('supports assigning to the result of a require', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-assign/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 4);\n    });\n\n    it('supports both static and non-static exports in the same module with self-reference', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/non-static-exports/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {\n        foo: 2,\n        bar: 4,\n        baz: 6,\n      });\n    });\n\n    it('does not replace assignments to the exports object in the same module', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/self-reference-assignment/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output, {\n        foo: {\n          bar: 'bar',\n        },\n      });\n    });\n\n    it('replaces static require member expressions with the correct `this` context', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-member-wrapped/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.deepEqual(output(), {\n        foo: 2,\n        bar: 4,\n      });\n    });\n\n    it('does not create a self-referencing dependency for the default symbol without an __esModule flag', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/self-reference-default/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.equal(output, 2);\n    });\n\n    it('should ensure that side effect ordering is correct in sequence expressions with require', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5606\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/commonjs/wrap-expressions/a.js',\n        ),\n      );\n\n      let sideEffects = [];\n      let res = await run(b, {\n        sideEffect(out) {\n          sideEffects.push(out);\n        },\n      });\n      await res;\n      assert.deepEqual(sideEffects, ['before', 'require', 'after']);\n    });\n\n    it('should ensure that side effect ordering is correct in binary expressions with require', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5606\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/commonjs/wrap-expressions/b.js',\n        ),\n      );\n\n      let sideEffects = [];\n      let res = await run(b, {\n        sideEffect(out) {\n          sideEffects.push(out);\n        },\n      });\n      await res;\n      assert.deepEqual(sideEffects, ['before', 'require', 'after']);\n    });\n\n    it('should ensure that side effect ordering is correct with default interop', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5662\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/scope-hoisting/commonjs/wrap-default-interop/index.js',\n        ),\n      );\n\n      let sideEffects = [];\n      let res = await run(b, {\n        sideEffect(out) {\n          sideEffects.push(out);\n        },\n      });\n      await res;\n      assert.deepEqual(sideEffects, ['shared', 'run1', 'async c: 123']);\n    });\n\n    it('should support non-object module.exports', async function () {\n      // https://github.com/parcel-bundler/parcel/issues/5892\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/export-non-object/index.js',\n        ),\n      );\n\n      await run(b, null, {strict: true});\n    });\n\n    it('should support assignment to a local variable with require', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-local-assign/basic.js',\n        ),\n      );\n\n      let outputs = [];\n      await run(b, {\n        output(x) {\n          outputs.push(x);\n        },\n      });\n\n      assert.deepEqual(outputs, [\n        [{foo: 2}, {foo: 2}],\n        [4, {foo: 2}],\n      ]);\n    });\n\n    it('should support out of order assignment to a local variable with require', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-local-assign/in-function.js',\n        ),\n      );\n\n      let outputs = [];\n      await run(b, {\n        output(x) {\n          outputs.push(x);\n        },\n      });\n\n      assert.deepEqual(outputs, [\n        [{foo: 2}, {foo: 2}],\n        [4, {foo: 2}],\n      ]);\n    });\n\n    it('should support assignment to a local variable with require and member expression', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-local-assign/member.js',\n        ),\n      );\n\n      let outputs = [];\n      await run(b, {\n        output(x) {\n          outputs.push(x);\n        },\n      });\n\n      assert.deepEqual(outputs, [\n        [2, 2],\n        [4, 2],\n      ]);\n    });\n\n    it('should support assignment to a local variable with require and destructuring', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-local-assign/destructure.js',\n        ),\n      );\n\n      let outputs = [];\n      await run(b, {\n        output(x) {\n          outputs.push(x);\n        },\n      });\n\n      assert.deepEqual(outputs, [\n        [2, 2],\n        [4, 2],\n      ]);\n    });\n\n    it('should support assignment to a local variable with require and non-static access', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-local-assign/destructure.js',\n        ),\n      );\n\n      let outputs = [];\n      await run(b, {\n        output(x) {\n          outputs.push(x);\n        },\n      });\n\n      assert.deepEqual(outputs, [\n        [2, 2],\n        [4, 2],\n      ]);\n    });\n\n    it('should handle require as the callee in a new expression', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-new/a.js',\n        ),\n      );\n\n      let output = await run(b);\n      assert.strictEqual(output.foo(), 1);\n    });\n\n    it('should not update mutated destructured requires', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-non-const-export/destructure.js',\n        ),\n      );\n\n      let outputs = [];\n      await run(b, {\n        output(x) {\n          outputs.push(x);\n        },\n      });\n\n      assert.deepEqual(outputs, [2, 2]);\n    });\n\n    it('should not update mutated require members', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-non-const-export/member.js',\n        ),\n      );\n\n      let outputs = [];\n      await run(b, {\n        output(x) {\n          outputs.push(x);\n        },\n      });\n\n      assert.deepEqual(outputs, [2, 2]);\n    });\n\n    it('should update live mutated require members', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/require-non-const-export/live.js',\n        ),\n      );\n\n      let outputs = [];\n      await run(b, {\n        output(x) {\n          outputs.push(x);\n        },\n      });\n\n      assert.deepEqual(outputs, [2, 3]);\n    });\n\n    it('should wrap all assets with an incoming wrapped dependency', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/scope-hoisting/commonjs/wrap-deps-circular/index.js',\n        ),\n      );\n\n      assert.deepEqual(await run(b), {test: 2});\n    });\n\n    it('should handle TSC polyfills', async () => {\n      await fsFixture(overlayFS, __dirname)`\n        tsc-polyfill-commonjs\n          library.js:\n            \"use strict\";\n            var __polyfill = (this && this.__polyfill) || function (a) {return a;};\n            exports.value = __polyfill('cjs')\n\n          index.js:\n            const value = require('./library');\n            output = value;\n      `;\n\n      let b = await bundle(\n        path.join(__dirname, 'tsc-polyfill-commonjs/index.js'),\n        {\n          inputFS: overlayFS,\n        },\n      );\n\n      assert.deepEqual(await run(b), {value: 'cjs'});\n    });\n  });\n\n  it('should not throw with JS included from HTML', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-js/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js', 'other.js'],\n      },\n    ]);\n\n    let asset = nullthrows(findAsset(b, 'other.js'));\n    assert.deepStrictEqual(\n      new Set(b.getUsedSymbols(asset)),\n      new Set(['default']),\n    );\n\n    let value = [];\n    await run(b, {\n      alert: v => value.push(v),\n    });\n    assert.deepEqual(value, ['other']);\n  });\n\n  it('should not throw with JS dynamic imports included from HTML', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-js-dynamic/index.html'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'js',\n        assets: ['local.js'],\n      },\n    ]);\n\n    let res = await run(b, {output: null}, {require: false});\n    assert.equal(typeof res.output, 'function');\n    assert.equal(await res.output(), 'Imported: foobar');\n  });\n\n  it('should include the prelude in shared entry bundles', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-shared/index.html'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'iframe.html',\n        assets: ['iframe.html'],\n      },\n      {\n        type: 'js',\n        assets: ['iframe.js'],\n      },\n      {\n        type: 'js',\n        assets: ['lodash.js'],\n      },\n    ]);\n\n    let sharedBundle = b\n      .getBundles()\n      .sort((a, b) => b.stats.size - a.stats.size)[0];\n    let contents = await outputFS.readFile(sharedBundle.filePath, 'utf8');\n    assert(contents.includes(`if (parcelRequire == null) {`));\n  });\n\n  it.skip('does not include prelude if child bundles are isolated', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-shared/index.js'),\n    );\n\n    let mainBundle = b.getBundles().find(b => b.name === 'index.js');\n    let contents = await outputFS.readFile(mainBundle.filePath, 'utf8');\n    // We wrap for other reasons now, so this is broken\n    assert(!contents.includes(`if (parcelRequire == null) {`));\n  });\n\n  it('should include prelude in shared worker bundles', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-shared/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    let sharedBundle = b\n      .getBundles()\n      .sort((a, b) => b.stats.size - a.stats.size)\n      .find(b => b.name !== 'index.js');\n    let contents = await outputFS.readFile(sharedBundle.filePath, 'utf8');\n    assert(contents.includes(`if (parcelRequire == null) {`));\n\n    let workerBundle = b.getBundles().find(b => b.name.startsWith('worker-b'));\n    contents = await outputFS.readFile(workerBundle.filePath, 'utf8');\n    assert(\n      contents.includes(\n        `importScripts(\"./${path.basename(sharedBundle.filePath)}\")`,\n      ),\n    );\n  });\n\n  // Mirrors the equivalent test in javascript.js\n  it('should insert global variables when needed', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/globals/scope-hoisting.js'),\n    );\n\n    let output = await run(b);\n    assert.deepEqual(output(), {\n      dir: 'integration/globals',\n      file: 'integration/globals/index.js',\n      buf: Buffer.from('browser').toString('base64'),\n      global: true,\n    });\n  });\n\n  it('should be able to named import a reexported namespace in an async bundle', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/scope-hoisting/es6/async-named-import-ns-reexport/index.js',\n      ),\n    );\n\n    assert.deepEqual(await run(b), [42, 42, 42, 42]);\n  });\n\n  it('should not remove a binding with a used AssignmentExpression', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/scope-hoisting/es6/used-assignmentexpression/a.js',\n      ),\n    );\n\n    assert.strictEqual(await run(b), 3);\n  });\n\n  it('should wrap imports inside arrow functions', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/scope-hoisting/es6/wrap-import-arrowfunction/a.js',\n      ),\n    );\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(contents.includes('=>'));\n\n    let calls = [];\n    let output = await run(b, {\n      sideEffect(id) {\n        calls.push(id);\n      },\n    });\n    assert.deepEqual(calls, []);\n    assert.equal(typeof output, 'function');\n    assert.deepEqual(await output(), {default: 1234});\n    assert.deepEqual(calls, ['async']);\n  });\n\n  it('can static import and dynamic import in the same bundle without creating a new bundle', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/sync-async/same-bundle-scope-hoisting.js',\n      ),\n      {mode: 'production'},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'same-bundle-scope-hoisting.js',\n        assets: [\n          'same-bundle-scope-hoisting.js',\n          'get-dep.js',\n          'get-dep-2.js',\n          'dep.js',\n        ],\n      },\n    ]);\n\n    assert.deepEqual(await await run(b), [42, 42, 42]);\n  });\n\n  it('can static import and dynamic import in the same bundle ancestry without creating a new bundle', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/sync-async/same-ancestry-scope-hoisting.js',\n      ),\n      {mode: 'production'},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'same-ancestry-scope-hoisting.js',\n        assets: [\n          'cacheLoader.js',\n          'dep.js',\n          'js-loader.js',\n          'same-ancestry-scope-hoisting.js',\n        ],\n      },\n      {\n        assets: ['get-dep.js'],\n      },\n    ]);\n\n    assert.deepEqual(await run(b), [42, 42]);\n  });\n\n  it('loads another bundle from a dynamic import with a shared dependency only when necessary', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sync-async-when-needed/index.js'),\n      {mode: 'production'},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {assets: ['dep.js']},\n      {\n        assets: ['async-has-dep.js', 'dep.js', 'get-dep.js'],\n      },\n      {assets: ['get-dep.js']},\n    ]);\n\n    assert.deepEqual(await run(b), [42, 42]);\n  });\n\n  it('can static import and dynamic import in the same bundle when another bundle requires async', async () => {\n    let b = await bundle(\n      ['same-bundle-scope-hoisting.js', 'get-dep-scope-hoisting.js'].map(\n        entry => path.join(__dirname, '/integration/sync-async/', entry),\n      ),\n      {mode: 'production'},\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['dep.js'],\n      },\n      {\n        name: 'same-bundle-scope-hoisting.js',\n        assets: [\n          'same-bundle-scope-hoisting.js',\n          'get-dep.js',\n          'get-dep-2.js',\n          'dep.js',\n        ],\n      },\n      {\n        name: 'get-dep-scope-hoisting.js',\n        assets: ['cacheLoader.js', 'get-dep-scope-hoisting.js', 'js-loader.js'],\n      },\n    ]);\n\n    let bundles = b.getBundles();\n    let sameBundle = bundles.find(\n      b => b.name === 'same-bundle-scope-hoisting.js',\n    );\n    let getDep = bundles.find(b => b.name === 'get-dep-scope-hoisting.js');\n\n    assert.deepEqual(await runBundle(b, sameBundle), [42, 42, 42]);\n    assert.deepEqual(await runBundle(b, getDep), 42);\n  });\n\n  it(\"can share dependencies between a shared bundle and its sibling's descendants\", async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/shared-exports-for-sibling-descendant/scope-hoisting.js',\n      ),\n      {mode: 'production'},\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['wraps.js', 'lodash.js'],\n      },\n      {\n        assets: ['a.js'],\n      },\n      {\n        assets: ['child.js'],\n      },\n      {\n        assets: ['grandchild.js'],\n      },\n      {\n        assets: ['b.js'],\n      },\n      {\n        name: 'scope-hoisting.js',\n        assets: ['cacheLoader.js', 'scope-hoisting.js', 'js-loader.js'],\n      },\n    ]);\n\n    assert.deepEqual(await run(b), [3, 5]);\n  });\n\n  it('deduplicates shared sibling assets between bundle groups', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/shared-sibling-scope-hoist/index.js'),\n    );\n\n    assert.deepEqual(await run(b), ['a', 'b', 'c']);\n  });\n\n  it('can run an entry bundle whose entry asset is present in another bundle', async () => {\n    let b = await bundle(\n      ['index.js', 'value.js'].map(basename =>\n        path.join(__dirname, '/integration/sync-entry-shared', basename),\n      ),\n      {targets: {main: {context: 'node', distDir, isLibrary: true}}},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {name: 'value.js', assets: ['value.js']},\n      {assets: ['async.js']},\n    ]);\n\n    assert.equal(await (await run(b)).default, 43);\n  });\n\n  it('can run an async bundle whose entry asset is present in another bundle', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/async-entry-shared/scope-hoisting.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'scope-hoisting.js',\n        assets: ['scope-hoisting.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {assets: ['value.js']},\n      {assets: ['async.js']},\n    ]);\n\n    assert.deepEqual(await run(b), [42, 43]);\n  });\n\n  it('can run an async bundle that depends on a nonentry asset in a sibling', async () => {\n    let b = await bundle(\n      ['scope-hoisting.js', 'other-entry.js'].map(basename =>\n        path.join(\n          __dirname,\n          '/integration/async-entry-shared-sibling',\n          basename,\n        ),\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'scope-hoisting.js',\n        assets: ['scope-hoisting.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        name: 'other-entry.js',\n        assets: ['other-entry.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {assets: ['a.js', 'value.js']},\n      {assets: ['b.js']},\n    ]);\n\n    assert.deepEqual(await run(b), 43);\n  });\n\n  it('correctly updates dependencies when a specifier is added', async function () {\n    let testDir = path.join(\n      __dirname,\n      '/integration/scope-hoisting/es6/cache-add-specifier',\n    );\n\n    let b = bundler(path.join(testDir, 'a.js'), {\n      inputFS: overlayFS,\n      outputFS: overlayFS,\n    });\n\n    let subscription = await b.watch();\n\n    let bundleEvent = await getNextBuild(b);\n    assert(bundleEvent.type === 'buildSuccess');\n    let output = await run(bundleEvent.bundleGraph);\n    assert.deepEqual(output, 'foo');\n\n    await overlayFS.mkdirp(testDir);\n    await overlayFS.copyFile(\n      path.join(testDir, 'a.1.js'),\n      path.join(testDir, 'a.js'),\n    );\n\n    bundleEvent = await getNextBuild(b);\n    assert(bundleEvent.type === 'buildSuccess');\n    output = await run(bundleEvent.bundleGraph);\n    assert.deepEqual(output, 'foobar');\n\n    await subscription.unsubscribe();\n  });\n\n  it('should not rewrite this in arrow function class properties', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-class-this-esm/a.js'),\n    );\n    let res = await run(b);\n    assert.deepEqual(res, 'x: 123');\n  });\n\n  it('should call named imports without this context', async function () {\n    let b = await bundle(\n      path.join(__dirname, 'integration/js-import-this/index.js'),\n    );\n    let res = await run(b, {output: null}, {strict: true});\n    assert.deepEqual(res, {\n      unwrappedNamed: [true, false],\n      unwrappedDefault: [true, false],\n      // TODO: unwrappedNamespace should actually be `[false, true]` but we optimize\n      // the `ns.foo` expression into a named import, so that namespace isn't available anymore.\n      unwrappedNamespace: [true, false],\n      wrappedNamed: [true, false],\n      wrappedDefault: [true, false],\n      wrappedNamespace: [false, true],\n    });\n  });\n\n  it('should insert the prelude for sibling bundles referenced in HTML', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/scope-hoisting/es6/sibling-dependencies/index.html',\n      ),\n    );\n    let res = await run(b, {output: null}, {require: false});\n    assert.equal(res.output, 'a');\n  });\n\n  it('should unmark dependency as deferred when dependency becomes used', async function () {\n    let testDir = path.join(\n      __dirname,\n      'integration/scope-hoisting/es6/unmarks-defer-for-new-deps',\n    );\n\n    let packageDir = path.join(testDir, '/package');\n\n    await overlayFS.mkdirp(packageDir);\n    await overlayFS.copyFile(\n      path.join(packageDir, 'b1.js'),\n      path.join(packageDir, 'b.js'),\n    );\n\n    await bundle(path.join(testDir, 'index.js'), {\n      inputFS: overlayFS,\n      outputFS: overlayFS,\n      shouldDisableCache: true,\n    });\n\n    await overlayFS.copyFile(\n      path.join(packageDir, 'b2.js'),\n      path.join(packageDir, 'b.js'),\n    );\n\n    await bundle(path.join(testDir, 'index.js'), {\n      inputFS: overlayFS,\n      outputFS: overlayFS,\n      shouldDisableCache: false,\n    });\n  });\n\n  it('unmark an asset group as deferred when it becomes used', async function () {\n    let testDir = path.join(\n      __dirname,\n      'integration/scope-hoisting/es6/unmarks-defer-for-assetgroup',\n    );\n\n    await overlayFS.mkdirp(testDir);\n    await overlayFS.copyFile(\n      path.join(testDir, 'index1.js'),\n      path.join(testDir, 'index.js'),\n    );\n\n    let b = await bundle(path.join(testDir, 'index.js'), {\n      inputFS: overlayFS,\n      outputFS: overlayFS,\n      shouldDisableCache: true,\n    });\n\n    assert.strictEqual(await run(b), 'bar');\n\n    await overlayFS.copyFile(\n      path.join(testDir, 'index2.js'),\n      path.join(testDir, 'index.js'),\n    );\n\n    b = await bundle(path.join(testDir, 'index.js'), {\n      inputFS: overlayFS,\n      outputFS: overlayFS,\n      shouldDisableCache: false,\n    });\n\n    assert.strictEqual(await run(b), 'bar foo');\n\n    await overlayFS.copyFile(\n      path.join(testDir, 'index3.js'),\n      path.join(testDir, 'index.js'),\n    );\n\n    b = await bundle(path.join(testDir, 'index.js'), {\n      inputFS: overlayFS,\n      outputFS: overlayFS,\n      shouldDisableCache: false,\n    });\n\n    assert.strictEqual(await run(b), 'bar foo bar');\n  });\n\n  it(\"not insert unused requires that aren't registered anywhere\", async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/scope-hoisting/es6/unused-require/index.js',\n      ),\n    );\n\n    let output = await run(b);\n    assert.strictEqual(output, 'foo');\n  });\n\n  it('produce the same bundle hash regardless of transformation order', async function () {\n    let testDir = path.join(\n      __dirname,\n      'integration/scope-hoisting/es6/non-deterministic-bundle-hashes',\n    );\n\n    const waitHandler = (fileToDelay, fileToWaitFor) => {\n      const waitMap = new Map();\n\n      function wait(filePath) {\n        if (waitMap.has(filePath)) {\n          return Promise.resolve();\n        }\n        return new Promise(resolve => {\n          waitMap.set(filePath, resolve);\n        });\n      }\n      // a set of filepaths that have been read\n      function seen(filePath) {\n        // check map of things we're waiting for to resolved promises\n        let promisesToResolve = waitMap.get(filePath);\n        if (promisesToResolve) {\n          // if we find any, we call it\n          promisesToResolve();\n        }\n        waitMap.set(filePath, null);\n      }\n\n      return {\n        get(target, prop) {\n          let original = Reflect.get(...arguments);\n          if (prop === 'readFile') {\n            return async function (...args) {\n              if (args[0].includes(fileToDelay)) {\n                await wait(fileToWaitFor);\n              }\n              let result = await original.apply(this, args);\n              seen(path.basename(args[0]));\n              return result;\n            };\n          }\n          return original;\n        },\n      };\n    };\n\n    let workerFarm = createWorkerFarm({\n      maxConcurrentWorkers: 0,\n    });\n\n    let slowFooFS = new Proxy(overlayFS, waitHandler('foo.js', 'bar.js'));\n\n    try {\n      let b = await bundle(path.join(testDir, 'index.html'), {\n        inputFS: slowFooFS,\n        outputFS: slowFooFS,\n        shouldDisableCache: true,\n        workerFarm,\n      });\n\n      let bundleHashDelayFoo = b\n        .getBundles()\n        .find(\n          b =>\n            b.filePath.endsWith('.js') &&\n            b.filePath.includes('non-deterministic-bundle-hashes'),\n        )\n        .filePath.split('.')[1];\n\n      let slowBarFS = new Proxy(overlayFS, waitHandler('bar.js', 'foo.js'));\n\n      let b2 = await bundle(path.join(testDir, 'index.html'), {\n        inputFS: slowBarFS,\n        outputFS: slowBarFS,\n        shouldDisableCache: true,\n        workerFarm,\n      });\n\n      let bundleHashDelayBar = b2\n        .getBundles()\n        .find(\n          b =>\n            b.filePath.endsWith('.js') &&\n            b.filePath.includes('non-deterministic-bundle-hashes'),\n        )\n        .filePath.split('.')[1];\n\n      assert.strictEqual(bundleHashDelayFoo, bundleHashDelayBar);\n    } finally {\n      await workerFarm.end();\n    }\n\n    it('should not deduplicate an asset if it will become unreachable', async function () {\n      let b = await bundle(\n        path.join(\n          __dirname,\n          'integration/sibling-deduplicate-unreachable/index.js',\n        ),\n        {mode: 'production'},\n      );\n      let res = await run(b);\n      assert.equal(res, 'target');\n    });\n  });\n\n  it('should add experimental bundle queue runtime for out of order bundle execution', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      bundle-queue-runtime\n        a.html:\n          <script type=\"module\" src=\"./a.js\"></script>\n        a.js:\n          export default 'a';\n\n        b.js:\n          export default 'b';\n\n        c.js:\n          export default 'c';\n\n        index.html:\n          <script type=\"module\" src=\"./index.js\"></script>\n        index.js:\n          import a from './a';\n          import b from './b';\n          import c from './c';\n\n          result([a, b, c]);\n\n        package.json:\n          {\n              \"@parcel/bundler-default\": {\n                  \"minBundleSize\": 0\n              },\n              \"@parcel/packager-js\": {\n                  \"unstable_asyncBundleRuntime\": true\n              }\n          }\n        yarn.lock:`;\n\n    let b = await bundle(\n      [\n        path.join(__dirname, 'bundle-queue-runtime/index.html'),\n        path.join(__dirname, 'bundle-queue-runtime/a.html'),\n      ],\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n          outputFormat: 'esmodule',\n        },\n        inputFS: overlayFS,\n      },\n    );\n\n    let contents = await outputFS.readFile(\n      b.getBundles().find(b => /bundle-queue-runtime.*\\.js/.test(b.filePath))\n        .filePath,\n      'utf8',\n    );\n    assert(contents.includes('$parcel$global.rwr('));\n\n    let result;\n    await run(b, {\n      result: r => {\n        result = r;\n      },\n    });\n\n    assert.deepEqual(await result, ['a', 'b', 'c']);\n  });\n\n  it('should add experimental bundle queue runtime to manual shared bundles', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      bundle-queue-runtime\n        index.html:\n          <script type=\"module\" src=\"./index.js\"></script>\n        shared.js:\n          export default 'shared';\n        index.js:\n          import shared from './shared';\n          result(['index', shared]);\n\n        package.json:\n          {\n              \"@parcel/bundler-default\": {\n                  \"minBundleSize\": 0,\n                  \"manualSharedBundles\": [{\n                    \"name\": \"shared\",\n                    \"types\": [\"js\"],\n                    \"assets\": [\"shared.js\"]\n                  }]\n              },\n              \"@parcel/packager-js\": {\n                  \"unstable_asyncBundleRuntime\": true\n              }\n          }\n        yarn.lock:`;\n\n    let b = await bundle(\n      [path.join(__dirname, 'bundle-queue-runtime/index.html')],\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n          outputFormat: 'esmodule',\n        },\n        inputFS: overlayFS,\n      },\n    );\n    function hasAsset(bundle, assetName) {\n      let result = false;\n\n      bundle.traverseAssets(asset => {\n        if (asset.filePath.includes(assetName)) {\n          result = true;\n        }\n      });\n\n      return result;\n    }\n    let sharedBundleContents = await outputFS.readFile(\n      nullthrows(\n        b.getBundles().find(b => hasAsset(b, 'shared.js')),\n        'No shared bundle',\n      ).filePath,\n      'utf8',\n    );\n    let entryContents = await outputFS.readFile(\n      nullthrows(\n        b.getBundles().find(b => hasAsset(b, 'index.js')),\n        'No entry bundle',\n      ).filePath,\n      'utf8',\n    );\n\n    assert(\n      sharedBundleContents.includes('$parcel$global.rlb('),\n      'Shared bundle should include register loaded bundle runtime',\n    );\n\n    assert(\n      entryContents.includes('$parcel$global.rwr('),\n      'Entry should include run when ready runtime',\n    );\n\n    let result;\n    await run(b, {\n      result: r => {\n        result = r;\n      },\n    });\n\n    assert.deepEqual(await result, ['index', 'shared']);\n  });\n\n  it('should not add experimental bundle queue runtime to empty bundles', async function () {\n    await fsFixture(overlayFS, __dirname)`\n      bundle-queue-runtime\n        empty.js:\n          // Just a comment\n        package.json:\n          {\n             \"@parcel/packager-js\": {\n                  \"unstable_asyncBundleRuntime\": true\n              }\n          }\n        yarn.lock:`;\n\n    let b = await bundle(\n      [path.join(__dirname, 'bundle-queue-runtime/empty.js')],\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          shouldOptimize: false,\n          outputFormat: 'esmodule',\n        },\n        inputFS: overlayFS,\n      },\n    );\n\n    let contents = await outputFS.readFile(\n      nullthrows(b.getBundles().find(b => /empty.*\\.js/.test(b.filePath)))\n        .filePath,\n      'utf8',\n    );\n\n    assert(\n      !contents.includes('$parcel$global.rlb('),\n      \"Empty bundle should not include 'runLoadedBundle' code\",\n    );\n\n    try {\n      await run(b);\n    } catch (e) {\n      assert.fail('Expected the empty bundle to still run');\n    }\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/server.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport invariant from 'assert';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundler,\n  getNextBuild,\n  inputFS,\n  outputFS,\n  overlayFS,\n  ncp,\n  request as get,\n  requestRaw as getRaw,\n} from '@parcel/test-utils';\nimport https from 'https';\nimport getPort from 'get-port';\nimport type {BuildEvent} from '@parcel/types';\n\nconst distDir = path.resolve(__dirname, '.parcel-cache/dist');\nconst config = path.join(\n  __dirname,\n  './integration/custom-configs/.parcelrc-dev-server',\n);\n\ndescribe('server', function () {\n  let subscription;\n\n  afterEach(async () => {\n    if (subscription) {\n      await subscription.unsubscribe();\n    }\n    subscription = null;\n  });\n\n  it('should serve files', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let data = await get('/index.js', port);\n    let distFile = await outputFS.readFile(\n      path.join(distDir, 'index.js'),\n      'utf8',\n    );\n\n    assert.equal(data, distFile);\n  });\n\n  it('should include content length for HEAD requests', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let result = await getRaw('/index.js', port, {method: 'HEAD'});\n    let distFile = await outputFS.readFile(path.join(distDir, 'index.js'));\n    assert.strictEqual(\n      result.res.headers['content-length'],\n      String(distFile.byteLength),\n    );\n    assert.strictEqual(result.data, '');\n  });\n\n  it('should serve source files', async function () {\n    let port = await getPort();\n    let inputPath = path.join(__dirname, '/integration/commonjs/index.js');\n    let b = bundler(inputPath, {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let data = await get(\n      '/__parcel_source_root/integration/commonjs/index.js',\n      port,\n    );\n    let inputFile = await inputFS.readFile(inputPath, 'utf8');\n\n    assert.equal(data, inputFile);\n  });\n\n  it('should serve sourcemaps', async function () {\n    let port = await getPort();\n    let inputPath = path.join(__dirname, '/integration/commonjs/index.js');\n    let b = bundler(inputPath, {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let data = await get('/index.js.map', port);\n    let distFile = await outputFS.readFile(\n      path.join(distDir, 'index.js.map'),\n      'utf8',\n    );\n\n    assert.equal(data, distFile);\n  });\n\n  it('should serve a default page if the main bundle is an HTML asset', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/html/index.html'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let rootIndex = await outputFS.readFile(\n      path.join(distDir, 'index.html'),\n      'utf8',\n    );\n    let other = await outputFS.readFile(\n      path.join(distDir, 'other.html'),\n      'utf8',\n    );\n    let fooIndex = await outputFS.readFile(\n      path.join(distDir, 'foo/index.html'),\n      'utf8',\n    );\n    let fooOther = await outputFS.readFile(\n      path.join(distDir, 'foo/other.html'),\n      'utf8',\n    );\n\n    assert.equal(await get('/', port), rootIndex);\n    assert.equal(await get('/something', port), rootIndex);\n    assert.equal(await get('/other', port), other);\n    assert.equal(await get('/foo', port), fooIndex);\n    assert.equal(await get('/foo?foo=bar', port), fooIndex);\n    assert.equal(await get('/foo/', port), fooIndex);\n    assert.equal(await get('/foo/bar', port), fooIndex);\n    assert.equal(await get('/foo/other', port), fooOther);\n    assert.equal(await get('/foo/other?foo=bar', port), fooOther);\n  });\n\n  it('should serve a default page if the single HTML bundle is not called index', async function () {\n    let port = await getPort();\n    let inputPath = path.join(__dirname, '/integration/html/other.html');\n    let b = bundler(inputPath, {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let rootIndexFile = await outputFS.readFile(\n      path.join(distDir, 'other.html'),\n      'utf8',\n    );\n\n    let data = await get('/', port);\n    assert.equal(data, rootIndexFile);\n\n    data = await get('/foo', port);\n    assert.equal(data, rootIndexFile);\n\n    data = await get('/foo/bar', port);\n    assert.equal(data, rootIndexFile);\n  });\n\n  it('should serve a default page if the main bundle is an HTML asset with package.json#source', async function () {\n    let port = await getPort();\n    let inputPath = path.join(__dirname, '/integration/html-pkg-source/');\n    let b = bundler(inputPath, {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    let event: BuildEvent = await getNextBuild(b);\n    invariant(event.type === 'buildSuccess');\n    let bundleGraph = event.bundleGraph;\n\n    let outputFile = await outputFS.readFile(\n      bundleGraph.getBundles()[0].filePath,\n      'utf8',\n    );\n\n    let data = await get('/', port);\n    assert.equal(data, outputFile);\n\n    data = await get('/foo/bar', port);\n    assert.equal(data, outputFile);\n  });\n\n  it('should serve a 404 if the file does not exist', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let statusCode = 200;\n    try {\n      await get('/fake.js', port);\n    } catch (err) {\n      statusCode = err.statusCode;\n    }\n\n    assert.equal(statusCode, 404);\n  });\n\n  it('should serve a 500 if the bundler errored', async function () {\n    let port = await getPort();\n    let inputDir = path.join(__dirname, '/input/server-500');\n    await ncp(path.join(__dirname, '/integration/babel'), inputDir);\n    let entry = path.join(inputDir, 'index.js');\n\n    let b = bundler(entry, {\n      defaultTargetOptions: {\n        distDir,\n      },\n      inputFS: overlayFS,\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n    await outputFS.writeFile(path.join(inputDir, 'foo.js'), 'syntax\\\\error');\n\n    // Await the second build failing (which means resolving with\n    // a buildFailure event)\n    await getNextBuild(b);\n\n    let statusCode = 200;\n    try {\n      await get('/index.js', port);\n    } catch (err) {\n      statusCode = err.statusCode;\n      assert(err.data.includes('Expected unicode escape'));\n    }\n\n    assert.equal(statusCode, 500);\n  });\n\n  it('should support HTTPS', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: true,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let data = await get('/index.js', port, https);\n    assert.equal(\n      data,\n      await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8'),\n    );\n  });\n\n  it('should support HTTPS via custom certificate', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: {\n          key: path.join(__dirname, '/integration/https/private.pem'),\n          cert: path.join(__dirname, '/integration/https/primary.crt'),\n        },\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let data = await get('/index.js', port, https);\n    assert.equal(\n      data,\n      await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8'),\n    );\n  });\n\n  it('should support setting a public url', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n        publicUrl: '/dist',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let data = await get('/dist/index.js', port);\n    assert.equal(\n      data,\n      await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8'),\n    );\n  });\n\n  it('should work with query parameters that contain a dot', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let data = await get('/index.js?foo=bar.baz', port);\n    assert.equal(\n      data,\n      await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8'),\n    );\n  });\n\n  it('should work with paths that contain a dot', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/html/index.html'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let data = await get('/bar.baz', port);\n    assert.equal(\n      data,\n      await outputFS.readFile(path.join(distDir, 'index.html'), 'utf8'),\n    );\n  });\n\n  it('should support lazy bundling', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/html/index.html'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n      shouldBuildLazily: true,\n      shouldContentHash: false,\n    });\n\n    await outputFS.mkdirp(distDir);\n\n    let builds = [];\n    subscription = await b.watch((err, buildEvent) => {\n      builds.push(buildEvent);\n    });\n\n    let build = await getNextBuild(b);\n\n    invariant(build.type === 'buildSuccess');\n    assertBundles(build.bundleGraph, [\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n    ]);\n\n    // Bundle should exist in the graph, but not written to disk as it is just a placeholder\n    let dir = await outputFS.readdir(distDir);\n    assert.deepEqual(dir, []);\n\n    let data = await get('/index.html', port);\n    assert.equal(\n      data,\n      await outputFS.readFile(path.join(distDir, 'index.html'), 'utf8'),\n    );\n\n    assert.equal(builds.length, 2);\n    build = builds[1];\n    invariant(build?.type === 'buildSuccess');\n    assertBundles(build.bundleGraph, [\n      {\n        type: 'css',\n        assets: ['index.html'],\n      },\n      {\n        // index.html\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        // foo/index.html\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        // other.html\n        name: 'other.html',\n        assets: ['other.html'],\n      },\n      {\n        // foo/other.html\n        name: 'other.html',\n        assets: ['other.html'],\n      },\n      {\n        type: 'svg',\n        assets: ['icons.svg'],\n      },\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n      {\n        type: 'js',\n        assets: ['index.js'],\n      },\n      {\n        type: 'css',\n        assets: ['index.css'],\n      },\n    ]);\n\n    // Sibling bundles should have been fully written to disk, but not async bundles.\n    dir = await outputFS.readdir(distDir);\n    assert.deepEqual(dir.length, 8);\n    assert(!dir.includes('other.html'));\n  });\n\n  it('should support lazy bundling sibling css files of dynamic import', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/dynamic-css/index.js'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n      shouldBuildLazily: true,\n      shouldContentHash: false,\n    });\n\n    await outputFS.mkdirp(distDir);\n\n    let builds = [];\n    subscription = await b.watch((err, buildEvent) => {\n      builds.push(buildEvent);\n    });\n\n    let build = await getNextBuild(b);\n\n    invariant(build.type === 'buildSuccess');\n    assertBundles(build.bundleGraph, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n    ]);\n\n    // Bundle should exist in the graph, but not written to disk as it is just a placeholder\n    let dir = await outputFS.readdir(distDir);\n    assert.deepEqual(dir, []);\n\n    let data = await get(`/index.js`, port);\n    assert.equal(\n      data,\n      await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8'),\n    );\n\n    assert.equal(builds.length, 2);\n    build = builds[1];\n    invariant(build?.type === 'buildSuccess');\n    assertBundles(build.bundleGraph, [\n      {\n        name: 'index.js',\n        assets: ['cacheLoader.js', 'css-loader.js', 'index.js', 'js-loader.js'],\n      },\n      {name: /local\\.[0-9a-f]{8}\\.js/, assets: ['local.js']},\n      {name: 'index.css', assets: ['index.css']},\n    ]);\n\n    // local.js should exist in the graph, but not written to disk\n    dir = await outputFS.readdir(distDir);\n    assert.deepEqual(\n      dir.sort(),\n      ['index.js', 'index.css', 'index.js.map', 'index.css.map'].sort(),\n    );\n\n    let local = build.bundleGraph\n      .getBundles()\n      .find(\n        b => b.type === 'js' && path.basename(b.filePath).startsWith('local'),\n      );\n    invariant(local);\n    data = await get(`/${path.basename(local.filePath)}`, port);\n    assert.equal(\n      data,\n      await outputFS.readFile(\n        path.join(distDir, path.basename(local.filePath)),\n        'utf8',\n      ),\n    );\n\n    assert.equal(builds.length, 3);\n    build = builds[2];\n    invariant(build?.type === 'buildSuccess');\n    assertBundles(build.bundleGraph, [\n      {\n        name: 'index.js',\n        assets: ['cacheLoader.js', 'css-loader.js', 'index.js', 'js-loader.js'],\n      },\n      {name: 'index.css', assets: ['index.css']},\n      {name: /local\\.[0-9a-f]{8}\\.js/, assets: ['local.js']},\n      {name: /local\\.[0-9a-f]{8}\\.css/, assets: ['local.css']},\n    ]);\n\n    dir = await outputFS.readdir(distDir);\n    assert.deepEqual(dir.length, 8); // bundles + source maps\n\n    let localCSS = build.bundleGraph\n      .getBundles()\n      .find(\n        b => b.type === 'css' && path.basename(b.filePath).startsWith('local'),\n      );\n    invariant(localCSS);\n\n    assert(data.includes(path.basename(localCSS.filePath)));\n  });\n\n  it('should support cors by default', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let res = await fetch(`http://localhost:${port}/index.js`);\n    assert.equal(res.headers.get('Access-Control-Allow-Origin'), '*');\n    assert.equal(\n      res.headers.get('Access-Control-Allow-Methods'),\n      'GET, HEAD, PUT, PATCH, POST, DELETE',\n    );\n    assert.equal(\n      res.headers.get('Access-Control-Allow-Headers'),\n      'Origin, X-Requested-With, Content-Type, Accept, Content-Type',\n    );\n  });\n\n  it('should support --no-cors', async function () {\n    let port = await getPort();\n    let b = bundler(path.join(__dirname, '/integration/commonjs/index.js'), {\n      defaultTargetOptions: {\n        distDir,\n      },\n      config,\n      serveOptions: {\n        https: false,\n        port: port,\n        host: 'localhost',\n        cors: false,\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n\n    let res = await fetch(`http://localhost:${port}/index.js`);\n    assert.equal(res.headers.has('Access-Control-Allow-Origin'), false);\n    assert.equal(res.headers.has('Access-Control-Allow-Methods'), false);\n    assert.equal(res.headers.has('Access-Control-Allow-Headers'), false);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/sourcemaps.js",
    "content": "// @flow\nimport assert from 'assert';\nimport invariant from 'assert';\nimport path from 'path';\nimport SourceMap from '@parcel/source-map';\nimport type {InitialParcelOptions} from '@parcel/types';\nimport {\n  bundle as _bundle,\n  inputFS,\n  outputFS,\n  overlayFS,\n  shallowEqual,\n  distDir,\n  mergeParcelOptions,\n} from '@parcel/test-utils';\nimport {loadSourceMapUrl} from '@parcel/utils';\nimport nullthrows from 'nullthrows';\n\nconst bundle = (name, opts?: InitialParcelOptions) => {\n  return _bundle(\n    name,\n    mergeParcelOptions(\n      {\n        defaultTargetOptions: {\n          sourceMaps: true,\n        },\n      },\n      opts,\n    ),\n  );\n};\n\nfunction indexToLineCol(str, index) {\n  let beforeIndex = str.slice(0, index);\n  return {\n    line: beforeIndex.split('\\n').length,\n    column: index - beforeIndex.lastIndexOf('\\n') - 1,\n  };\n}\n\nfunction checkSourceMapping({\n  map,\n  source,\n  generated,\n  str,\n  generatedStr = str,\n  sourcePath,\n  msg = '',\n}: {|\n  map: SourceMap,\n  source: string,\n  generated: string,\n  str: string,\n  generatedStr?: string,\n  sourcePath: string,\n  msg?: string,\n|}) {\n  assert(\n    generated.indexOf(generatedStr) !== -1,\n    \"'\" + generatedStr + \"' not found in generated code\",\n  );\n  assert(source.indexOf(str) !== -1, \"'\" + str + \"' not in source code\");\n\n  let generatedPosition = indexToLineCol(\n    generated,\n    generated.indexOf(generatedStr),\n  );\n\n  let matchIndex = source.indexOf(str);\n  let matchWhitespaceIndex = matchIndex;\n  while (\n    matchWhitespaceIndex > 0 &&\n    [' ', '\\t'].includes(source[matchWhitespaceIndex - 1])\n  ) {\n    matchWhitespaceIndex--;\n  }\n\n  let sourceWhitespacePosition = indexToLineCol(source, matchWhitespaceIndex);\n  let sourcePosition = indexToLineCol(source, matchIndex);\n\n  let mapContent = map.getMap();\n  let mapping = null;\n\n  // Find closest mapping...\n  let mappings = mapContent.mappings\n    .filter(m => m.generated.line === generatedPosition.line)\n    .sort((a, b) => a.generated.column - b.generated.column);\n  let closestIndex = -1;\n  let lastDistance = Number.MAX_SAFE_INTEGER;\n  for (let i = 0; i < mappings.length; i++) {\n    let currMapping = mappings[i];\n    let distance = Math.abs(\n      currMapping.generated.column - generatedPosition.column,\n    );\n    if (distance < lastDistance) {\n      lastDistance = distance;\n      closestIndex = i;\n    }\n  }\n  if (closestIndex > -1) {\n    mapping = map.indexedMappingToStringMapping(mappings[closestIndex]);\n  }\n\n  invariant(mapping, \"no mapping for '\" + str + \"'\" + msg);\n\n  let generatedDiff = {\n    line: generatedPosition.line - mapping.generated.line,\n    column: generatedPosition.column - mapping.generated.column,\n  };\n\n  invariant(mapping.original);\n  let computedSourcePosition = {\n    line: mapping.original.line + generatedDiff.line,\n    column: mapping.original.column + generatedDiff.column,\n  };\n\n  let computedMapping = {\n    line: computedSourcePosition.line,\n    column: computedSourcePosition.column,\n    source: mapping.source,\n  };\n\n  let sourceMapping = {\n    line: sourcePosition.line,\n    column: sourcePosition.column,\n    source: sourcePath,\n  };\n\n  let sourceWhitespaceMapping = {\n    line: sourceWhitespacePosition.line,\n    column: sourceWhitespacePosition.column,\n    source: sourcePath,\n  };\n\n  assert(\n    shallowEqual(computedMapping, sourceMapping) ||\n      shallowEqual(computedMapping, sourceWhitespaceMapping),\n    \"mapping '\" +\n      str +\n      \"' appears to be incorrect: \" +\n      msg +\n      '\\n\\nExpected computed mapping ' +\n      JSON.stringify(computedMapping) +\n      ' to equal either\\n\\n' +\n      JSON.stringify(sourceMapping) +\n      '\\nor, accepting whitespace,\\n' +\n      JSON.stringify(sourceWhitespaceMapping),\n  );\n}\n\ndescribe('sourcemaps', function () {\n  it('Should create a basic browser sourcemap', async function () {\n    let sourceFilename = path.join(\n      __dirname,\n      '/integration/sourcemap/index.js',\n    );\n    await bundle(sourceFilename, {\n      defaultTargetOptions: {\n        shouldScopeHoist: true,\n      },\n    });\n\n    let distDir = path.join(__dirname, '/integration/sourcemap/dist/');\n\n    let filename = path.join(distDir, 'index.js');\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n    let input = await inputFS.readFile(\n      path.join(path.dirname(filename), map.sourceRoot, map.sources[0]),\n      'utf8',\n    );\n    let sourcePath = 'index.js';\n\n    let name = raw.match(/function (\\$.*\\$var\\$helloWorld)/)[1];\n    let exports = raw.match(/var (\\$.*\\$exports)/)[1];\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'function helloWorld',\n      generatedStr: 'function ' + name,\n      sourcePath,\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'module.exports = helloWorld;',\n      generatedStr: exports + ' = ' + name + ';',\n      sourcePath,\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: '\"hello world\"',\n      sourcePath,\n    });\n  });\n\n  it('Should create a basic browser sourcemap when serving', async function () {\n    let fixture = path.join(__dirname, '/integration/sourcemap');\n    let sourceFilename = path.join(fixture, 'index.js');\n    await bundle(sourceFilename, {serveOptions: {port: 1234}});\n\n    let filename = path.join(distDir, 'index.js');\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n    assert.strictEqual(map.sourceRoot, '/__parcel_source_root/');\n    let input = await inputFS.readFile(\n      path.join(fixture, map.sources[0]),\n      'utf8',\n    );\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'function helloWorld',\n      sourcePath: map.sources[0],\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'module.exports = helloWorld;',\n      sourcePath: map.sources[0],\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: '\"hello world\"',\n      sourcePath: map.sources[0],\n    });\n  });\n\n  it('Should create a basic node sourcemap', async function () {\n    let sourceFilename = path.join(\n      __dirname,\n      '/integration/sourcemap-node/index.js',\n    );\n    await bundle(sourceFilename);\n\n    let distDir = path.join(__dirname, '/integration/sourcemap-node/dist/');\n    let filename = path.join(distDir, 'index.js');\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n\n    let map = mapUrlData.map;\n    let sourceRoot = map.sourceRoot;\n    assert.equal(\n      sourceRoot,\n      '../',\n      'sourceRoot should be the root of the source files, relative to the output directory.',\n    );\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n    let input = await inputFS.readFile(sourceFilename, 'utf8');\n    let sourcePath = 'index.js';\n    let mapData = sourceMap.getMap();\n    assert.equal(mapData.sources.length, 1);\n\n    assert(\n      await inputFS.exists(path.resolve(distDir + sourceRoot + sourcePath)),\n      'combining sourceRoot and sources object should resolve to the original file',\n    );\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'function helloWorld',\n      sourcePath,\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'module.exports = helloWorld;',\n      sourcePath,\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: '\"hello world\"',\n      sourcePath,\n    });\n  });\n\n  it('should create a valid sourcemap for a js file with requires', async function () {\n    let sourceDir = path.join(__dirname, '/integration/sourcemap-nested/');\n    let sourceFilename = path.join(sourceDir, '/index.js');\n    await bundle(sourceFilename);\n\n    let distDir = path.join(__dirname, '/integration/sourcemap-nested/dist/');\n    let filename = path.join(distDir, 'index.js');\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n\n    let map = mapUrlData.map;\n    let sourceRoot = map.sourceRoot;\n    assert.equal(\n      sourceRoot,\n      '../',\n      'sourceRoot should be the root of the source files, relative to the output directory.',\n    );\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n    let mapData = sourceMap.getMap();\n    assert.equal(mapData.sources.length, 3);\n\n    for (let source of mapData.sources) {\n      assert(\n        await inputFS.exists(path.resolve(distDir + sourceRoot + source)),\n        'combining sourceRoot and sources object should resolve to the original file',\n      );\n    }\n\n    let inputs = [\n      await inputFS.readFile(sourceFilename, 'utf8'),\n      await inputFS.readFile(path.join(sourceDir, 'local.js'), 'utf8'),\n      await inputFS.readFile(path.join(sourceDir, 'utils/util.js'), 'utf8'),\n    ];\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: inputs[0],\n      generated: raw,\n      str: 'const local',\n      sourcePath: 'index.js',\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: inputs[0],\n      generated: raw,\n      str: 'local.a',\n      sourcePath: 'index.js',\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: inputs[1],\n      generated: raw,\n      str: 'exports.a',\n      sourcePath: 'local.js',\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: inputs[2],\n      generated: raw,\n      str: 'exports.count = function(a, b) {',\n      generatedStr: 'exports.count = function(a, b) {',\n      sourcePath: 'utils/util.js',\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: inputs[2],\n      generated: raw,\n      str: 'return a + b',\n      sourcePath: 'utils/util.js',\n    });\n  });\n\n  it('should create a valid sourcemap for a minified js bundle with requires', async function () {\n    let sourceDir = path.join(\n      __dirname,\n      '/integration/sourcemap-nested-minified/',\n    );\n    let sourceFilename = path.join(sourceDir, '/index.js');\n    await bundle(sourceFilename, {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n    });\n\n    let distDir = path.join(\n      __dirname,\n      '/integration/sourcemap-nested-minified/dist/',\n    );\n    let filename = path.join(distDir, 'index.js');\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n\n    let map = mapUrlData.map;\n    let sourceRoot = map.sourceRoot;\n    assert.equal(\n      sourceRoot,\n      '../',\n      'sourceRoot should be the root of the source files, relative to the output directory.',\n    );\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n    let mapData = sourceMap.getMap();\n    assert.equal(mapData.sources.length, 4);\n\n    for (let source of mapData.sources) {\n      if (source === '<anon>') {\n        continue;\n      }\n      assert(\n        await inputFS.exists(path.resolve(distDir + sourceRoot + source)),\n        'combining sourceRoot and sources object should resolve to the original file',\n      );\n    }\n\n    let inputs = [\n      await inputFS.readFile(sourceFilename, 'utf8'),\n      await inputFS.readFile(path.join(sourceDir, 'local.js'), 'utf8'),\n      await inputFS.readFile(path.join(sourceDir, 'utils/util.js'), 'utf8'),\n    ];\n\n    // TODO: Figure out a way to tests these without relying on generatedStr as much\n    checkSourceMapping({\n      map: sourceMap,\n      source: inputs[0],\n      generated: raw,\n      str: 'const local',\n      generatedStr: 'let o',\n      sourcePath: 'index.js',\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: inputs[0],\n      generated: raw,\n      str: 'local.a',\n      generatedStr: 'o.a',\n      sourcePath: 'index.js',\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: inputs[1],\n      generated: raw,\n      str: 'exports.a',\n      generatedStr: 'r.a',\n      sourcePath: 'local.js',\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: inputs[2],\n      generated: raw,\n      str: 'exports.count = function(a, b) {',\n      generatedStr: 'r.count=function(e,n){',\n      sourcePath: 'utils/util.js',\n    });\n  });\n\n  it('should create a valid sourcemap as a child of a TS bundle', async function () {\n    let inputFilePath = path.join(\n      __dirname,\n      '/integration/sourcemap-typescript/index.ts',\n    );\n\n    await bundle(inputFilePath);\n    let distDir = path.join(__dirname, '../dist/');\n    let filename = path.join(distDir, 'index.js');\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    assert.equal(map.file, 'index.js.map');\n    assert(raw.includes('//# sourceMappingURL=index.js.map'));\n    // assert.equal(map.sourceRoot, '/__parcel_source_root/');\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n\n    let mapData = sourceMap.getMap();\n    assert.equal(mapData.sources.length, 2);\n    assert.deepEqual(mapData.sources, [\n      'index.ts',\n      '../../../../../transformers/js/src/esmodule-helpers.js',\n    ]);\n\n    let input = await inputFS.readFile(\n      path.join(path.dirname(filename), map.sourceRoot, map.sources[0]),\n      'utf8',\n    );\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'function env()',\n      sourcePath: 'index.ts',\n    });\n  });\n\n  it('should create a valid sourcemap as a child of a nested TS bundle', async function () {\n    let inputFilePath = path.join(\n      __dirname,\n      '/integration/sourcemap-typescript-nested/index.ts',\n    );\n\n    await bundle(inputFilePath);\n    let distDir = path.join(__dirname, '../dist/');\n    let filename = path.join(distDir, 'index.js');\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    assert.equal(map.file, 'index.js.map');\n    assert(raw.includes('//# sourceMappingURL=index.js.map'));\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n\n    let mapData = sourceMap.getMap();\n    assert.equal(mapData.sources.length, 3);\n    assert.deepEqual(mapData.sources, [\n      'index.ts',\n      'local.ts',\n      '../../../../../transformers/js/src/esmodule-helpers.js',\n    ]);\n\n    let input = await inputFS.readFile(\n      path.join(path.dirname(filename), map.sourceRoot, map.sources[0]),\n      'utf8',\n    );\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'function env()',\n      sourcePath: 'index.ts',\n    });\n\n    let local = await inputFS.readFile(\n      path.join(__dirname, '/integration/sourcemap-typescript-nested/local.ts'),\n      'utf-8',\n    );\n    checkSourceMapping({\n      map: sourceMap,\n      source: local,\n      generated: raw,\n      str: 'exports.local',\n      sourcePath: 'local.ts',\n    });\n  });\n\n  it('should create a valid sourcemap when using the Typescript tsc transformer', async function () {\n    let inputFilePath = path.join(\n      __dirname,\n      '/integration/sourcemap-typescript-tsc/src/index.ts',\n    );\n\n    let b = await bundle(inputFilePath);\n    let filename = b.getBundles()[0].filePath;\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    assert.equal(map.file, 'index.js.map');\n    assert(raw.includes('//# sourceMappingURL=index.js.map'));\n    // assert.equal(map.sourceRoot, '/__parcel_source_root/');\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n\n    let mapData = sourceMap.getMap();\n    assert.deepEqual(mapData.sources, ['src/index.ts']);\n    assert(map.sourcesContent.every(s => s));\n\n    let input = await inputFS.readFile(\n      path.join(path.dirname(filename), map.sourceRoot, map.sources[0]),\n      'utf8',\n    );\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'nonExistsFunc',\n      sourcePath: 'src/index.ts',\n    });\n  });\n\n  it('should create a valid sourcemap for a CSS bundle', async function () {\n    async function test(minify) {\n      let inputFilePath = path.join(\n        __dirname,\n        '/integration/sourcemap-css/style.css',\n      );\n\n      await bundle(inputFilePath, {\n        defaultTargetOptions: {shouldOptimize: minify},\n      });\n      let distDir = path.join(__dirname, '../dist/');\n      let filename = path.join(distDir, 'style.css');\n      let raw = await outputFS.readFile(filename, 'utf8');\n      let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n      if (!mapUrlData) {\n        throw new Error('Could not load map');\n      }\n      let map = mapUrlData.map;\n\n      assert.equal(map.file, 'style.css.map');\n      assert(raw.includes('/*# sourceMappingURL=style.css.map */'));\n\n      let sourceMap = new SourceMap('/');\n      sourceMap.addVLQMap(map);\n\n      let input = await inputFS.readFile(\n        path.join(path.dirname(filename), map.sourceRoot, map.sources[0]),\n        'utf8',\n      );\n\n      let mapData = sourceMap.getMap();\n      assert.equal(mapData.sources.length, 1);\n      assert.deepEqual(mapData.sources, ['style.css']);\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: input,\n        generated: raw,\n        str: 'body',\n        sourcePath: 'style.css',\n        msg: ' ' + (minify ? 'with' : 'without') + ' minification',\n      });\n    }\n\n    await test(false);\n    await test(true);\n  });\n\n  it('should create a valid sourcemap for a CSS bundle with imports', async function () {\n    async function test(minify) {\n      let inputFilePath = path.join(\n        __dirname,\n        '/integration/sourcemap-css-import/style.css',\n      );\n\n      await bundle(inputFilePath, {\n        defaultTargetOptions: {shouldOptimize: minify},\n      });\n      let distDir = path.join(__dirname, '../dist/');\n      let filename = path.join(distDir, 'style.css');\n      let raw = await outputFS.readFile(filename, 'utf8');\n      let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n      if (!mapUrlData) {\n        throw new Error('Could not load map');\n      }\n      let map = mapUrlData.map;\n\n      assert.equal(map.file, 'style.css.map');\n      assert(raw.includes('/*# sourceMappingURL=style.css.map */'));\n\n      let sourceMap = new SourceMap('/');\n      sourceMap.addVLQMap(map);\n\n      let mapData = sourceMap.getMap();\n      let sources = minify\n        ? ['style.css', 'other-style.css', 'another-style.css']\n        : ['other-style.css', 'another-style.css', 'style.css'];\n      assert.deepEqual(mapData.sources, sources);\n\n      let otherStyle = await inputFS.readFile(\n        path.join(\n          path.dirname(filename),\n          map.sourceRoot,\n          map.sources[sources.indexOf('other-style.css')],\n        ),\n        'utf-8',\n      );\n      let anotherStyle = await inputFS.readFile(\n        path.join(\n          path.dirname(filename),\n          map.sourceRoot,\n          map.sources[sources.indexOf('another-style.css')],\n        ),\n        'utf-8',\n      );\n      let style = await inputFS.readFile(\n        path.join(\n          path.dirname(filename),\n          map.sourceRoot,\n          map.sources[sources.indexOf('style.css')],\n        ),\n        'utf8',\n      );\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: style,\n        generated: raw,\n        str: 'body',\n        sourcePath: 'style.css',\n        msg: ' ' + (minify ? 'with' : 'without') + ' minification',\n      });\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: otherStyle,\n        generated: raw,\n        str: 'div',\n        sourcePath: 'other-style.css',\n        msg: ' ' + (minify ? 'with' : 'without') + ' minification',\n      });\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: anotherStyle,\n        generated: raw,\n        str: 'main',\n        sourcePath: 'another-style.css',\n        msg: ' ' + (minify ? 'with' : 'without') + ' minification',\n      });\n    }\n\n    await test(false);\n    await test(true);\n  });\n\n  it('should create a valid sourcemap for a Sass asset', async function () {\n    async function test(shouldOptimize) {\n      let inputFilePath = path.join(\n        __dirname,\n        '/integration/sourcemap-sass/style.scss',\n      );\n\n      await bundle(inputFilePath, {\n        defaultTargetOptions: {\n          shouldOptimize,\n        },\n      });\n      let distDir = path.join(__dirname, '../dist/');\n      let filename = path.join(distDir, 'style.css');\n      let raw = await outputFS.readFile(filename, 'utf8');\n      let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n      if (!mapUrlData) {\n        throw new Error('Could not load map');\n      }\n      let map = mapUrlData.map;\n\n      assert.equal(map.file, 'style.css.map');\n      assert(raw.includes('/*# sourceMappingURL=style.css.map */'));\n\n      let sourceMap = new SourceMap('/');\n      sourceMap.addVLQMap(map);\n\n      let mapData = sourceMap.getMap();\n      assert.equal(mapData.sources.length, shouldOptimize ? 2 : 1);\n      let index = mapData.sources.indexOf('style.scss');\n      assert.strictEqual(mapData.sources[index], 'style.scss');\n\n      let input = await inputFS.readFile(\n        path.join(path.dirname(filename), map.sourceRoot, map.sources[index]),\n        'utf-8',\n      );\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: input,\n        generated: raw,\n        str: 'body',\n        sourcePath: 'style.scss',\n        msg: ' ' + (shouldOptimize ? 'with' : 'without') + ' minification',\n      });\n    }\n\n    await test(false);\n    await test(true);\n  });\n\n  it('should create a valid sourcemap for a Sass asset w/ imports', async function () {\n    let inputFilePath = path.join(\n      __dirname,\n      '/integration/scss-sourcemap-imports/style.scss',\n    );\n\n    await bundle(inputFilePath);\n    let distDir = path.join(__dirname, '../dist/');\n    let filename = path.join(distDir, 'style.css');\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    assert.equal(map.file, 'style.css.map');\n    assert(raw.includes('/*# sourceMappingURL=style.css.map */'));\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n\n    let mapData = sourceMap.getMap();\n    // This should actually just be `./integration/scss-sourcemap-imports/with_url.scss`\n    // but this is a small bug in the extend utility of the source-map library\n    assert.deepEqual(mapData.sources, [\n      'integration/scss-sourcemap-imports/with_url.scss',\n    ]);\n\n    let input = await inputFS.readFile(\n      path.join(path.dirname(filename), map.sourceRoot, map.sources[0]),\n      'utf-8',\n    );\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: 'body',\n      sourcePath: 'integration/scss-sourcemap-imports/with_url.scss',\n    });\n  });\n\n  it('should create a valid sourcemap when for a CSS asset importing Sass', async function () {\n    async function test(shouldOptimize) {\n      let inputFilePath = path.join(\n        __dirname,\n        '/integration/sourcemap-sass-imported/style.css',\n      );\n\n      await bundle(inputFilePath, {\n        defaultTargetOptions: {\n          shouldOptimize,\n        },\n      });\n      let distDir = path.join(__dirname, '../dist/');\n      let filename = path.join(distDir, 'style.css');\n      let raw = await outputFS.readFile(filename, 'utf8');\n      let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n      if (!mapUrlData) {\n        throw new Error('Could not load map');\n      }\n      let map = mapUrlData.map;\n\n      assert.equal(map.file, 'style.css.map');\n      assert(raw.includes('/*# sourceMappingURL=style.css.map */'));\n\n      let sourceMap = new SourceMap('/');\n      sourceMap.addVLQMap(map);\n\n      let mapData = sourceMap.getMap();\n      // TODO: htmlnano inserts `./<input css 1>`\n      assert(mapData.sources.includes('other.scss'));\n      assert(mapData.sources.includes('style.css'));\n\n      let style = await inputFS.readFile(\n        path.join(path.dirname(filename), map.sourceRoot, 'style.css'),\n        'utf-8',\n      );\n      let other = await inputFS.readFile(\n        path.join(path.dirname(filename), map.sourceRoot, 'other.scss'),\n        'utf-8',\n      );\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: style,\n        generated: raw,\n        str: 'body',\n        sourcePath: 'style.css',\n        msg: ' ' + (shouldOptimize ? 'with' : 'without') + ' minification',\n      });\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: other,\n        generated: raw,\n        str: 'div',\n        sourcePath: 'other.scss',\n        msg: ' ' + (shouldOptimize ? 'with' : 'without') + ' minification',\n      });\n    }\n    await test(false);\n    await test(true);\n  });\n\n  it('should create a valid sourcemap for a LESS asset', async function () {\n    async function test(shouldOptimize) {\n      let inputFilePath = path.join(\n        __dirname,\n        '/integration/sourcemap-less/style.less',\n      );\n\n      await bundle(inputFilePath, {\n        defaultTargetOptions: {\n          shouldOptimize,\n        },\n      });\n      let distDir = path.join(__dirname, '../dist/');\n      let filename = path.join(distDir, 'style.css');\n      let raw = await outputFS.readFile(filename, 'utf8');\n      let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n      if (!mapUrlData) {\n        throw new Error('Could not load map');\n      }\n      let map = mapUrlData.map;\n\n      assert.equal(map.file, 'style.css.map');\n      assert(raw.includes('/*# sourceMappingURL=style.css.map */'));\n\n      let sourceMap = new SourceMap('/');\n      sourceMap.addVLQMap(map);\n\n      let mapData = sourceMap.getMap();\n      assert(mapData.sources.includes('style.less'));\n      let input = await inputFS.readFile(\n        path.join(path.dirname(filename), map.sourceRoot, 'style.less'),\n        'utf-8',\n      );\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: input,\n        generated: raw,\n        str: 'div',\n        sourcePath: 'style.less',\n        msg: ' ' + (shouldOptimize ? 'with' : 'without') + ' minification',\n      });\n    }\n\n    await test(false);\n    await test(true);\n  });\n\n  it('Should be able to create a sourcemap with inlined sources', async function () {\n    let sourceFilename = path.join(\n      __dirname,\n      '/integration/sourcemap-inline-sources/index.js',\n    );\n    await bundle(sourceFilename);\n\n    let distDir = path.join(\n      __dirname,\n      '/integration/sourcemap-inline-sources/dist/',\n    );\n\n    let filename = path.join(distDir, 'index.js');\n    let raw = await outputFS.readFile(filename, 'utf8');\n\n    let mapData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapData) {\n      throw new Error('Could not load map');\n    }\n\n    let sourceContent = await inputFS.readFile(sourceFilename, 'utf-8');\n\n    let map = mapData.map;\n    assert.equal(map.file, 'index.js.map');\n    assert.deepEqual(map.sources, [\n      'index.js',\n      '../../../../../transformers/js/src/esmodule-helpers.js',\n    ]);\n    assert.equal(map.sourcesContent[0], sourceContent);\n  });\n\n  it('Should be able to create inline sourcemaps', async function () {\n    let sourceFilename = path.join(\n      __dirname,\n      '/integration/sourcemap-generate-inline/index.js',\n    );\n    await bundle(sourceFilename);\n\n    let distDir = path.join(\n      __dirname,\n      '/integration/sourcemap-generate-inline/dist/',\n    );\n\n    let filename = path.join(distDir, 'index.js');\n    let raw = await outputFS.readFile(filename, 'utf8');\n\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n\n    assert(\n      mapUrlData.url.startsWith('data:application/json;charset=utf-8;base64,'),\n      'inline sourcemap bundles should have a base64 url',\n    );\n\n    let map = mapUrlData.map;\n    assert.equal(map.file, 'index.js.map');\n    assert.deepEqual(map.sources, [\n      'index.js',\n      '../../../../../transformers/js/src/esmodule-helpers.js',\n    ]);\n  });\n\n  it('should respect --no-source-maps', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sourcemap/index.js'),\n      {\n        defaultTargetOptions: {\n          sourceMaps: false,\n        },\n      },\n    );\n\n    assert.deepStrictEqual(\n      await outputFS.readdir(path.dirname(b.getBundles()[0].filePath)),\n      ['index.js'],\n    );\n  });\n\n  it('Should just skip invalid inlined sourcemaps', async function () {\n    let sourceFilename = path.join(\n      __dirname,\n      '/integration/sourcemap-invalid-existing/index.js',\n    );\n    let b = await bundle(sourceFilename);\n\n    let filename = b.getBundles()[0].filePath;\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let sourcemapData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!sourcemapData) {\n      throw new Error('Could not load map');\n    }\n\n    let map = sourcemapData.map;\n    assert.equal(map.sourceRoot, '../test/');\n    assert.equal(map.sources.length, 2);\n  });\n\n  it('should load existing sourcemaps of libraries', async function () {\n    let sourceFilename = path.join(\n      __dirname,\n      '/integration/sourcemap-existing/index.js',\n    );\n    let b = await bundle(sourceFilename);\n\n    let filename = b.getBundles()[0].filePath;\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let sourcemapData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!sourcemapData) {\n      throw new Error('Could not load map');\n    }\n\n    let map = sourcemapData.map;\n    assert.equal(map.sourceRoot, '../test/');\n    assert.equal(map.sources.length, 3);\n    for (let source of map.sources) {\n      if (path.extname(source) !== '.coffee') {\n        assert(\n          await inputFS.exists(\n            path.join(path.basename(filename), map.sourceRoot, source),\n          ),\n          `Source File ${source} should exist`,\n        );\n      }\n    }\n\n    assert.equal(map.sourcesContent[2], 'module.exports = (a, b) => a + b');\n  });\n\n  it('should load inline sourcemaps of libraries', async function () {\n    let sourceFilename = path.join(\n      __dirname,\n      '/integration/sourcemap-inline/index.js',\n    );\n    let b = await bundle(sourceFilename);\n\n    let filename = b.getBundles()[0].filePath;\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let sourcemapData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!sourcemapData) {\n      throw new Error('Could not load map');\n    }\n\n    let map = sourcemapData.map;\n    assert.equal(map.sourceRoot, '../test/');\n    assert.equal(map.sources.length, 3);\n    for (let source of map.sources) {\n      if (path.extname(source) !== '.coffee') {\n        assert(\n          await inputFS.exists(\n            path.join(path.basename(filename), map.sourceRoot, source),\n          ),\n          `Source File ${source} should exist`,\n        );\n      }\n    }\n    assert.equal(map.sourcesContent[2], 'module.exports = (a, b) => a + b\\n');\n  });\n\n  it('should load referenced contents of sourcemaps', async function () {\n    let sourceFilename = path.join(\n      __dirname,\n      '/integration/sourcemap-external-contents/index.js',\n    );\n    let b = await bundle(sourceFilename);\n\n    let filename = b.getBundles()[0].filePath;\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let sourcemapData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!sourcemapData) {\n      throw new Error('Could not load map');\n    }\n\n    let map = sourcemapData.map;\n    assert.equal(map.sourceRoot, '../test/');\n    assert.equal(map.sources.length, 3);\n    for (let source of map.sources) {\n      assert(\n        await inputFS.exists(\n          path.join(path.basename(filename), map.sourceRoot, source),\n        ),\n        `Source File ${source} should exist`,\n      );\n    }\n  });\n\n  it.skip('should load existing sourcemaps for CSS files', async function () {\n    async function test(minify) {\n      let sourceFilename = path.join(\n        __dirname,\n        '/integration/sourcemap-css-existing/style.css',\n      );\n      let b = await bundle(sourceFilename, {\n        defaultTargetOptions: {shouldOptimize: minify},\n      });\n\n      let filename = b.getBundles()[0].filePath;\n      let raw = await outputFS.readFile(filename, 'utf8');\n      let sourcemapData = await loadSourceMapUrl(outputFS, filename, raw);\n      if (!sourcemapData) {\n        throw new Error('Could not load map');\n      }\n\n      let map = sourcemapData.map;\n      assert.equal(map.sourceRoot, '../test/');\n      assert.equal(map.sources.length, 3);\n      for (let source of map.sources) {\n        assert(\n          await inputFS.exists(\n            path.join(path.basename(filename), map.sourceRoot, source),\n          ),\n          `Source File ${source} should exist`,\n        );\n      }\n\n      /*\n      checkSourceMapping({\n        map: sourceMap,\n        source: style,\n        generated: raw,\n        str: 'main',\n        sourcePath: './style.css',\n        msg: ' ' + (minify ? 'with' : 'without') + ' minification',\n      });\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: style,\n        generated: raw,\n        str: 'display',\n        sourcePath: './style.css',\n        msg: ' ' + (minify ? 'with' : 'without') + ' minification',\n      });\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: library,\n        generated: raw,\n        str: 'body',\n        sourcePath: './test/library.scss',\n        msg: ' ' + (minify ? 'with' : 'without') + ' minification',\n      });\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: library,\n        generated: raw,\n        str: 'div',\n        generatedStr: 'body div',\n        sourcePath: './test/library.scss',\n        msg: ' ' + (minify ? 'with' : 'without') + ' minification',\n      });\n\n      checkSourceMapping({\n        map: sourceMap,\n        source: library,\n        generated: raw,\n        str: 'background-color',\n        sourcePath: './test/library.scss',\n        msg: ' ' + (minify ? 'with' : 'without') + ' minification',\n      });*/\n    }\n\n    await test(false);\n    await test(true);\n  });\n\n  it('should handle comments correctly in sourcemaps', async function () {\n    let sourceFilename = path.join(\n      __dirname,\n      '/integration/sourcemap-comments/index.js',\n    );\n    let b = await bundle(sourceFilename, {\n      defaultTargetOptions: {\n        shouldScopeHoist: true,\n      },\n    });\n\n    let filename = b.getBundles()[0].filePath;\n    let raw = await outputFS.readFile(filename, 'utf8');\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n    let input = await inputFS.readFile(\n      path.join(path.dirname(filename), map.sourceRoot, map.sources[0]),\n      'utf8',\n    );\n    let sourcePath = 'index.js';\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: \"console.log('foo')\",\n      generatedStr: `console.log('foo')`,\n      sourcePath,\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: \"console.log('bar')\",\n      generatedStr: `console.log('bar')`,\n      sourcePath,\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: \"console.log('baz')\",\n      generatedStr: `console.log('baz')`,\n      sourcePath,\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: input,\n      generated: raw,\n      str: \"console.log('idhf')\",\n      generatedStr: `console.log('idhf')`,\n      sourcePath,\n    });\n  });\n\n  it('carries sourcesContent from the original sources through multiple transformations (babel and swc)', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/sourcemap-original-sourcecontents/index.js',\n      ),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    let filename = b.getBundles()[0].filePath;\n    let raw = await outputFS.readFile(filename, 'utf8');\n\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n    let sourcePath = 'index.js';\n    let sourceContent = nullthrows(sourceMap.getSourceContent(sourcePath));\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: sourceContent,\n      generated: raw,\n      str: 'bar=\"bar\"' /* from jsx: <App bar=\"bar\" /> */,\n      generatedStr: 'bar: \"bar\"',\n      sourcePath,\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: sourceContent,\n      generated: raw,\n      str: 'document.getElementById(',\n      sourcePath,\n    });\n  });\n\n  it('carries sourcesContent from the original sources (tsx) through multiple transformations (babel and swc)', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        'integration/sourcemap-original-sourcecontents-ts/index.tsx',\n      ),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    let filename = b.getBundles()[0].filePath;\n    let raw = await outputFS.readFile(filename, 'utf8');\n\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n    let sourcePath = 'index.tsx';\n    let sourceContent = nullthrows(sourceMap.getSourceContent(sourcePath));\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: sourceContent,\n      generated: raw,\n      str: 'bar=\"bar\"' /* from tsx: <App bar=\"bar\" /> */,\n      generatedStr: 'bar: \"bar\"',\n      sourcePath,\n    });\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: sourceContent,\n      generated: raw,\n      str: 'document.getElementById(',\n      sourcePath,\n    });\n  });\n\n  it('retains sourcesContent from the original sources from a large text file', async () => {\n    let testDir = path.join(\n      __dirname,\n      'integration/sourcemap-original-sourcecontents-large',\n    );\n\n    await outputFS.mkdirp(testDir);\n    await Promise.all([\n      outputFS.writeFile(\n        path.join(testDir, 'index.js'),\n        'const foo = ' +\n          `'${\n            // Generate ~6MB of text to exceed the stream threshold\n            'Lorem ipsum dolor sit amet '.repeat(245000)\n          }';`,\n      ),\n      outputFS.writeFile(path.join(testDir, 'yarn.lock'), ''),\n    ]);\n\n    let b = await bundle(path.join(testDir, 'index.js'), {\n      inputFS: overlayFS,\n      defaultTargetOptions: {\n        shouldScopeHoist: true,\n      },\n    });\n\n    let filename = b.getBundles()[0].filePath;\n    let raw = await outputFS.readFile(filename, 'utf8');\n\n    let mapUrlData = await loadSourceMapUrl(outputFS, filename, raw);\n    if (!mapUrlData) {\n      throw new Error('Could not load map');\n    }\n    let map = mapUrlData.map;\n\n    let sourceMap = new SourceMap('/');\n    sourceMap.addVLQMap(map);\n    let sourceContent = map.sourcesContent[0];\n    let sourcePath = 'index.js';\n\n    checkSourceMapping({\n      map: sourceMap,\n      source: sourceContent,\n      generated: raw,\n      str: `foo = 'Lorem ipsum`,\n      generatedStr: `foo = 'Lorem ipsum`,\n      sourcePath,\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/stylus.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  run,\n  assertBundles,\n  distDir,\n  outputFS,\n} from '@parcel/test-utils';\n\ndescribe('stylus', function () {\n  it('should support requiring stylus files', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/stylus/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.styl'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.index'));\n  });\n\n  it('should support requiring stylus files with dependencies', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/stylus-deps/index.js'),\n    );\n\n    // a.styl shouldn't be included as a dependency that we can see.\n    // stylus takes care of inlining it.\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.styl'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.index'));\n    assert(css.includes('.a'));\n    assert(css.includes('.b'));\n    assert(css.includes('-webkit-box'));\n    assert(css.includes('.foo'));\n  });\n\n  it('should support linking to assets with url() from stylus', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/stylus-url/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.styl'],\n      },\n      {\n        type: 'woff2',\n        assets: ['test.woff2'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(/url\\(\"?test\\.[0-9a-f]+\\.woff2\"?\\)/.test(css));\n    assert(/url\\(\"?http:\\/\\/google.com\"?\\)/.test(css));\n    assert(css.includes('.index'));\n\n    assert(\n      await outputFS.exists(\n        path.join(distDir, css.match(/url\\(\"?(test\\.[0-9a-f]+\\.woff2)\"?\\)/)[1]),\n      ),\n    );\n  });\n\n  it('should ignore paths starting with \"#\" when resolving with stylus url()', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/stylus-id-url/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.styl'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('#clip-path'));\n    assert(css.includes('.svg-background'));\n  });\n\n  it('should support transforming stylus with css modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/stylus-postcss/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'index.module.styl'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.module.styl'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert(output().endsWith('_index'));\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(/\\.[_0-9a-zA-Z]+_index/.test(css));\n  });\n\n  it('should support requiring stylus files with glob dependencies', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/stylus-glob-import/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        name: 'index.css',\n        assets: ['index.styl'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(typeof output, 'function');\n    assert.equal(output(), 2);\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.index'));\n    assert(css.includes('.main'));\n    assert(css.includes('.foo'));\n    assert(css.includes('.bar'));\n  });\n\n  it('should support the stylus package exports condition', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/stylus-exports/index.styl'),\n    );\n\n    let css = await outputFS.readFile(path.join(distDir, 'index.css'), 'utf8');\n    assert(css.includes('.a'));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/sugarss.js",
    "content": "import assert from 'assert';\nimport {assertBundles, bundle, distDir, outputFS} from '@parcel/test-utils';\nimport path from 'path';\n\ndescribe('sugarss', function () {\n  it('should correctly parse SugarSS asset', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/sugarss/index.sss'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.css',\n        assets: ['index.sss'],\n      },\n    ]);\n\n    let cssContent = await outputFS.readFile(\n      path.join(distDir, '/index.css'),\n      'utf8',\n    );\n    assert(cssContent.includes('{'));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/svg-react.js",
    "content": "import assert from 'assert';\nimport {bundle, outputFS, fsFixture, overlayFS} from '@parcel/test-utils';\nimport path from 'path';\nimport Logger from '@parcel/logger';\nimport {md} from '@parcel/diagnostic';\n\ndescribe('svg-react', function () {\n  it('should support transforming SVGs to react components', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/svg-react/react.js'),\n      {\n        defaultConfig: path.join(\n          __dirname,\n          'integration/custom-configs/.parcelrc-svg-react',\n        ),\n      },\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf-8');\n    assert(!file.includes('inkscape'));\n    assert(file.includes('function SvgComponent'));\n    assert(file.includes('jsxDEV)(\"svg\"'));\n    assert(file.includes('id: \"fbacef__circle\"'));\n  });\n\n  it('should support transforming SVGs to typescript react components', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/svg-react-typescript/react.ts'),\n      {\n        defaultConfig: path.join(\n          __dirname,\n          'integration/custom-configs/.parcelrc-svg-react',\n        ),\n      },\n    );\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf-8');\n    let types = await outputFS.readFile(b.getBundles()[1].filePath, 'utf-8');\n\n    assert(!file.includes('inkscape'));\n    assert(file.includes('jsxDEV)(\"svg\"'));\n    assert(types.includes('const Icon: SVGRComponent'));\n  });\n\n  it('should find and use a .svgrrc and .svgorc config file', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/svg-react-config/react.js'),\n      {\n        defaultConfig: path.join(\n          __dirname,\n          'integration/custom-configs/.parcelrc-svg-react',\n        ),\n      },\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf-8');\n    assert(!file.includes('inkscape'));\n    assert(file.includes('function SvgComponent'));\n    assert(file.includes('_react.forwardRef'));\n    assert(file.includes('_react.memo'));\n    assert(file.includes('preact/jsx-dev-runtime'));\n    assert(file.includes('jsxDEV)(\"svg\"'));\n    assert(file.includes('width: \"1em\"'));\n    assert(file.includes('role: \"img\"'));\n    assert(file.includes('fill: props.fill'));\n    assert(file.includes('className: \"icon\"'));\n  });\n\n  it.skip('should detect the version of SVGO to use', async function () {\n    // Test is outside parcel so that svgo is not already installed.\n    await fsFixture(overlayFS, '/')`\n      svgr-svgo-version\n        icon.svg:\n          <svg></svg>\n\n        index.html:\n          <img src=\"icon.svg\" />\n\n        svgo.config.json:\n          {\n            \"full\": true\n          }\n\n        yarn.lock:\n    `;\n\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n\n    try {\n      await bundle(path.join('/svgr-svgo-version/index.html'), {\n        inputFS: overlayFS,\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n        shouldAutoinstall: false,\n        defaultConfig: path.join(\n          __dirname,\n          'integration/custom-configs/.parcelrc-svg-react',\n        ),\n      });\n    } catch (err) {\n      // autoinstall is disabled\n      assert.equal(\n        err.diagnostics[0].message,\n        md`Could not resolve module \"svgo\" from \"${path.resolve(\n          overlayFS.cwd(),\n          '/svgr-svgo-version/index',\n        )}\"`,\n      );\n    }\n\n    loggerDisposable.dispose();\n    assert(\n      messages[0].diagnostics[0].message.startsWith(\n        'Detected deprecated SVGO v2 options in',\n      ),\n    );\n    assert.deepEqual(messages[0].diagnostics[0].codeFrames, [\n      {\n        filePath: path.resolve(\n          overlayFS.cwd(),\n          '/svgr-svgo-version/svgo.config.json',\n        ),\n        codeHighlights: [\n          {\n            message: undefined,\n            start: {\n              line: 2,\n              column: 3,\n            },\n            end: {\n              line: 2,\n              column: 14,\n            },\n          },\n        ],\n      },\n    ]);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/svg.js",
    "content": "import assert from 'assert';\nimport {\n  assertBundles,\n  bundle,\n  distDir,\n  outputFS,\n  overlayFS,\n  fsFixture,\n} from '@parcel/test-utils';\nimport path from 'path';\nimport Logger from '@parcel/logger';\nimport {md} from '@parcel/diagnostic';\n\ndescribe('svg', function () {\n  it('should support bundling SVG', async () => {\n    let b = await bundle(path.join(__dirname, '/integration/svg/circle.svg'));\n\n    assertBundles(b, [\n      {\n        name: 'circle.svg',\n        assets: ['circle.svg'],\n      },\n      {\n        name: 'other1.html',\n        assets: ['other1.html'],\n      },\n      {\n        type: 'svg',\n        assets: ['square.svg'],\n      },\n      {\n        name: 'other2.html',\n        assets: ['other2.html'],\n      },\n      {\n        type: 'svg',\n        assets: ['path.svg'],\n      },\n      {\n        type: 'svg',\n        assets: ['gradient.svg'],\n      },\n      {\n        type: 'js',\n        assets: ['script.js'],\n      },\n      {\n        type: 'js',\n        assets: ['module.js', 'script.js'],\n      },\n      {\n        type: 'css',\n        assets: ['style.css'],\n      },\n    ]);\n\n    let file = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'svg').filePath,\n      'utf-8',\n    );\n    assert(file.includes('<a href=\"/other1.html\">'));\n    assert(file.includes('<use href=\"#circle\"'));\n    assert(\n      file.includes(\n        `<use xlink:href=\"/${path.basename(\n          b.getBundles().find(b => b.name.startsWith('square')).filePath,\n        )}#square\"`,\n      ),\n    );\n    assert(\n      file.includes(\n        `fill=\"url(/${path.basename(\n          b.getBundles().find(b => b.name.startsWith('gradient')).filePath,\n        )}#myGradient)\"`,\n      ),\n    );\n    assert(\n      file.includes(\n        `<script xlink:href=\"/${path.basename(\n          b\n            .getBundles()\n            .find(b => b.type === 'js' && b.env.sourceType === 'script')\n            .filePath,\n        )}\"`,\n      ),\n    );\n    assert(\n      file.includes(\n        `<script href=\"/${path.basename(\n          b\n            .getBundles()\n            .find(b => b.type === 'js' && b.env.sourceType === 'module')\n            .filePath,\n        )}\"`,\n      ),\n    );\n    assert(\n      file.includes(\n        `<?xml-stylesheet href=\"/${path.basename(\n          b.getBundles().find(b => b.type === 'css').filePath,\n        )}\"?>`,\n      ),\n    );\n    assert(\n      file.includes('<circle id=\"circle\" cx=\"5\" cy=\"5\" r=\"4\" stroke=\"blue\"/>'),\n    );\n  });\n\n  it('should minify SVG bundles', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/svg/circle.svg'), {\n      defaultTargetOptions: {\n        shouldOptimize: true,\n      },\n    });\n\n    let file = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'svg').filePath,\n      'utf-8',\n    );\n    assert(!file.includes('comment'));\n  });\n\n  it('support SVGO config files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/svgo-config/index.html'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    let file = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'svg').filePath,\n      'utf-8',\n    );\n    assert(!file.includes('inkscape'));\n    assert(file.includes('comment'));\n  });\n\n  it.skip('should detect the version of SVGO to use', async function () {\n    // Test is outside parcel so that svgo is not already installed.\n    await fsFixture(overlayFS, '/')`\n      svgo-version\n        icon.svg:\n          <svg></svg>\n\n        index.html:\n          <img src=\"icon.svg\" />\n\n        svgo.config.json:\n          {\n            \"full\": true\n          }\n\n        yarn.lock:\n    `;\n\n    let messages = [];\n    let loggerDisposable = Logger.onLog(message => {\n      if (message.level !== 'verbose') {\n        messages.push(message);\n      }\n    });\n\n    try {\n      await bundle(path.join('/svgo-version/index.html'), {\n        inputFS: overlayFS,\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n        shouldAutoinstall: false,\n      });\n    } catch (err) {\n      // autoinstall is disabled\n      assert.equal(\n        err.diagnostics[0].message,\n        md`Could not resolve module \"svgo\" from \"${path.resolve(\n          overlayFS.cwd(),\n          '/svgo-version/index',\n        )}\"`,\n      );\n    }\n\n    loggerDisposable.dispose();\n    assert(\n      messages[0].diagnostics[0].message.startsWith(\n        'Detected deprecated SVGO v2 options in',\n      ),\n    );\n    assert.deepEqual(messages[0].diagnostics[0].codeFrames, [\n      {\n        filePath: path.resolve(\n          overlayFS.cwd(),\n          '/svgo-version/svgo.config.json',\n        ),\n        codeHighlights: [\n          {\n            message: undefined,\n            start: {\n              line: 2,\n              column: 3,\n            },\n            end: {\n              line: 2,\n              column: 14,\n            },\n          },\n        ],\n      },\n    ]);\n  });\n\n  it('should detect xml-stylesheet processing instructions', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/svg-xml-stylesheet/img.svg'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'img.svg',\n        assets: ['img.svg'],\n      },\n      {\n        type: 'css',\n        assets: ['style1.css'],\n      },\n      {\n        type: 'css',\n        assets: ['style3.css'],\n      },\n    ]);\n\n    let file = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'svg').filePath,\n      'utf-8',\n    );\n\n    assert(file.includes('<?xml-stylesheet'));\n    assert(file.includes('<?xml-not-a-stylesheet'));\n  });\n\n  it('should handle inline CSS with @imports', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/svg-inline-css-import/img.svg'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'css',\n        assets: ['img.svg', 'test.css'],\n      },\n      {\n        type: 'css',\n        assets: ['img.svg'],\n      },\n      {\n        name: 'img.svg',\n        assets: ['img.svg'],\n      },\n      {\n        type: 'svg',\n        assets: ['gradient.svg'],\n      },\n      {\n        type: 'js',\n        assets: ['img.svg', 'script.js'],\n      },\n    ]);\n\n    const svg = await outputFS.readFile(path.join(distDir, 'img.svg'), 'utf8');\n\n    assert(!svg.includes('@import'));\n    assert(svg.includes(':root {\\n  fill: red;\\n}'));\n    assert(\n      svg.includes(\n        `\"fill: url(&quot;${path.basename(\n          b.getBundles().find(b => b.name.startsWith('gradient')).filePath,\n        )}#myGradient&quot;)`,\n      ),\n    );\n    assert(svg.includes('<script>'));\n    assert(svg.includes(`console.log('script')`));\n    assert(!svg.includes('@import '));\n  });\n\n  it('should process inline styles using lang', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/svg-inline-sass/img.svg'),\n      {\n        defaultTargetOptions: {\n          shouldOptimize: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'css',\n        assets: ['img.svg'],\n      },\n      {\n        name: 'img.svg',\n        assets: ['img.svg'],\n      },\n    ]);\n\n    const svg = await outputFS.readFile(path.join(distDir, 'img.svg'), 'utf8');\n\n    assert(svg.includes('fill:red'));\n  });\n\n  it('should be in separate bundles', async function () {\n    const b = await bundle(\n      path.join(__dirname, '/integration/svg-multiple/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['index.js'],\n      },\n      {\n        assets: ['circle.svg'],\n      },\n      {\n        assets: ['square.svg'],\n      },\n    ]);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/symbol-propagation.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {bundler, fsFixture, overlayFS, run} from '@parcel/test-utils';\n\ndescribe('symbol propagation', () => {\n  it('should handle removed assets from previous failed builds', async () => {\n    await fsFixture(overlayFS, __dirname)`\n        broken.js:\n            module.exports = require('./missing.js');\n        working.js:\n            module.exports = 'ITS WORKING';\n        index.js:\n            module.exports = require('./broken.js');`;\n\n    let b = bundler(path.join(__dirname, 'index.js'), {\n      inputFS: overlayFS,\n      shouldDisableCache: false,\n    });\n\n    await assert.rejects(() => b.run(), {\n      message: `Failed to resolve './missing.js' from './broken.js'`,\n    });\n\n    await overlayFS.writeFile(\n      path.join(__dirname, 'index.js'),\n      `module.exports = require('./working.js');`,\n    );\n\n    let {bundleGraph} = await b.run();\n\n    assert(await run(bundleGraph), 'ITS WORKING');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/tailwind-tests.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {bundle, outputFS} from '@parcel/test-utils';\n\ndescribe('tailwind', function () {\n  it('should support tailwind from SCSS', async function () {\n    let fixture = path.join(__dirname, '/integration/tailwind-scss');\n    let b = await bundle(path.join(fixture, 'index.html'));\n\n    let css = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'css').filePath,\n      'utf8',\n    );\n    assert(css.includes('.p-2'));\n    assert(!css.includes('.m-2'));\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/tracing.js",
    "content": "// @flow strict-local\nimport assert from 'assert';\nimport path from 'path';\nimport {bundle, distDir, outputFS} from '@parcel/test-utils';\n\ndescribe('tracing', function () {\n  it('should produce a trace', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/typescript-jsx/index.tsx'),\n      {\n        shouldTrace: true,\n        targets: {\n          default: {distDir},\n        },\n        additionalReporters: [\n          {\n            packageName: '@parcel/reporter-tracer',\n            resolveFrom: __dirname,\n          },\n        ],\n        outputFS,\n      },\n    );\n\n    const files = outputFS.readdirSync(__dirname);\n    const profileFile = files.find(file => file.startsWith('parcel-trace'));\n    assert(profileFile !== null);\n    const content = await outputFS.readFile(\n      path.join(__dirname, profileFile),\n      'utf8',\n    );\n    const profileContent = JSON.parse(content + ']'); // Traces don't contain a closing ] as an optimisation for partial writes\n    assert(profileContent.length > 0);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/transpilation.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  distDir,\n  inputFS as fs,\n  outputFS,\n  overlayFS,\n  run,\n  ncp,\n} from '@parcel/test-utils';\nimport {symlinkSync} from 'fs';\nimport nullthrows from 'nullthrows';\n\nconst inputDir = path.join(__dirname, '/input');\n\ndescribe('transpilation', function () {\n  it('should not transpile if no targets are defined', async function () {\n    await bundle(path.join(__dirname, '/integration/babel-default/index.js'), {\n      defaultTargetOptions: {\n        engines: undefined,\n        shouldOptimize: false,\n      },\n    });\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('class Foo'));\n    assert(file.includes('class Bar'));\n  });\n\n  it('should support transpiling using browserlist', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/babel-browserslist/index.js'),\n    );\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('function Foo'));\n    assert(file.includes('function Bar'));\n  });\n\n  it('should support transpiling when engines have semver ranges', async () => {\n    let fixtureDir = path.join(__dirname, '/integration/babel-semver-engine');\n    await bundle(path.join(fixtureDir, 'index.js'));\n\n    let legacy = await outputFS.readFile(\n      path.join(fixtureDir, 'dist', 'legacy.js'),\n      'utf8',\n    );\n    assert(legacy.includes('function Foo'));\n    assert(legacy.includes('function Bar'));\n\n    let modern = await outputFS.readFile(\n      path.join(fixtureDir, 'dist', 'modern.js'),\n      'utf8',\n    );\n    assert(modern.includes('class Foo'));\n    assert(modern.includes('class Bar'));\n  });\n\n  it('should transpile node_modules by default', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/babel-node-modules/index.js'),\n    );\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!/class \\S+ \\{/.test(file));\n    assert(file.includes('function Bar'));\n    let res = await run(b);\n    assert.equal(res.t, 'function');\n  });\n\n  it('should not support JSX in node_modules', async function () {\n    // $FlowFixMe\n    await assert.rejects(() =>\n      bundle(\n        path.join(__dirname, '/integration/babel-node-modules-jsx/index.js'),\n      ),\n    );\n  });\n\n  it('should compile node_modules with a source field in package.json when not symlinked', async function () {\n    await bundle(\n      path.join(\n        __dirname,\n        '/integration/babel-node-modules-source-unlinked/index.js',\n      ),\n    );\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('function Foo'));\n    assert(file.includes('function Bar'));\n  });\n\n  it('should support compiling JSX', async function () {\n    await bundle(path.join(__dirname, '/integration/jsx/index.jsx'));\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('React.createElement(\"div\"'));\n    assert(file.includes('fileName: \"integration/jsx/index.jsx\"'));\n  });\n\n  it('should support compiling JSX correctly with member expression type', async function () {\n    await bundle(path.join(__dirname, '/integration/jsx-member/index.jsx'));\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('React.createElement(S.Foo'));\n  });\n\n  it('should support compiling JSX in JS files with React dependency', async function () {\n    await bundle(path.join(__dirname, '/integration/jsx-react/index.js'));\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('React.createElement(\"div\"'));\n  });\n\n  it('should support compiling JSX with pure annotations', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-react/pure-comment.js'),\n    );\n\n    let file = await outputFS.readFile(\n      path.join(distDir, 'pure-comment.js'),\n      'utf8',\n    );\n    assert(\n      file.includes('/*#__PURE__*/ (0, _reactDefault.default).createElement'),\n    );\n\n    let res = await run(b);\n    assert(res.Foo());\n  });\n\n  it('should support compiling JSX in JS files with React aliased to Preact', async function () {\n    await bundle(path.join(__dirname, '/integration/jsx-react-alias/index.js'));\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('React.createElement(\"div\"'));\n  });\n\n  it('should support compiling JSX in JS files with Preact dependency', async function () {\n    await bundle(path.join(__dirname, '/integration/jsx-preact/index.js'));\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('h(\"div\"'));\n  });\n\n  it('should support compiling JSX in JS files with Preact url dependency', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/jsx-preact-with-url/index.js'),\n    );\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('h(\"div\"'));\n  });\n\n  it('should support compiling JSX in TS files with Preact dependency', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-preact-ts/index.tsx'),\n    );\n\n    assert(typeof (await run(b)) === 'object');\n  });\n\n  it('should support compiling JSX in JS files with Nerv dependency', async function () {\n    await bundle(path.join(__dirname, '/integration/jsx-nervjs/index.js'));\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('Nerv.createElement(\"div\"'));\n  });\n\n  it('should support compiling JSX in JS files with Hyperapp dependency', async function () {\n    await bundle(path.join(__dirname, '/integration/jsx-hyperapp/index.js'));\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(file.includes('h(\"div\"'));\n  });\n\n  it('should not transpile spread in JSX with modern targets', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-spread/index.jsx'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('React.createElement(\"div\"'));\n    assert(file.includes('...a'));\n    assert(!file.includes('@swc/helpers'));\n  });\n\n  it('should support the automatic JSX runtime with React >= 17', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-automatic/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('react/jsx-dev-runtime'));\n    assert(file.includes('(0, _jsxDevRuntime.jsxDEV)(\"div\"'));\n  });\n\n  it('should support the automatic JSX runtime with preact >= 10.5', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-automatic-preact/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('preact/jsx-dev-runtime'));\n    assert(file.includes('(0, _jsxDevRuntime.jsxDEV)(\"div\"'));\n  });\n\n  it('should support the automatic JSX runtime with React ^16.14.0', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-automatic-16/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('react/jsx-dev-runtime'));\n    assert(file.includes('(0, _jsxDevRuntime.jsxDEV)(\"div\"'));\n  });\n\n  it('should support the automatic JSX runtime with React 18 prereleases', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-automatic-18/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('react/jsx-dev-runtime'));\n    assert(file.includes('(0, _jsxDevRuntime.jsxDEV)(\"div\"'));\n  });\n\n  it('should support the automatic JSX runtime with experimental React versions', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-automatic-experimental/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('react/jsx-dev-runtime'));\n    assert(file.includes('(0, _jsxDevRuntime.jsxDEV)(\"div\"'));\n  });\n\n  it('should support the automatic JSX runtime with preact with alias', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/jsx-automatic-preact-with-alias/index.js',\n      ),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(/\\Wreact\\/jsx-dev-runtime\\W/.test(file));\n    assert(file.includes('(0, _jsxDevRuntime.jsxDEV)(\"div\"'));\n  });\n\n  it('should support the automatic JSX runtime with explicit tsconfig.json', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-automatic-tsconfig/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('preact/jsx-dev-runtime'));\n    assert(file.includes('(0, _jsxDevRuntime.jsxDEV)(\"div\"'));\n  });\n\n  it('should support explicit JSX pragma in tsconfig.json', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-pragma-tsconfig/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('JSX(JSXFragment'));\n    assert(file.includes('JSX(\"div\"'));\n  });\n\n  it('should support explicitly enabling JSX in tsconfig.json', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/jsx-tsconfig/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('React.createElement(\"div\"'));\n  });\n\n  it('should support enabling decorators in tsconfig.json', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/decorators/index.ts'),\n    );\n\n    let output = [];\n    await run(b, {\n      output(o) {\n        output.push(o);\n      },\n    });\n\n    assert.deepEqual(output, [\n      'first(): factory evaluated',\n      'second(): factory evaluated',\n      'second(): called',\n      'first(): called',\n    ]);\n  });\n\n  it('should support enabling decorators and setting useDefineForClassFields in tsconfig.json', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/decorators-useDefineForClassFields/index.ts',\n      ),\n    );\n\n    let output = [];\n    await run(b, {\n      output(...o) {\n        output.push(...o);\n      },\n    });\n\n    assert.deepEqual(output, ['foo 15', 'foo 16']);\n  });\n\n  it('should support transpiling optional chaining', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/babel-optional-chaining/index.js'),\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!file.includes('?.'));\n\n    let output = await run(b);\n    assert.equal(typeof output, 'object');\n    assert.deepEqual(output.default, [undefined, undefined]);\n  });\n\n  it('should only include necessary parts of core-js using browserlist', async function () {\n    await bundle(path.join(__dirname, '/integration/babel-core-js/index.js'));\n\n    let file = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    // console.log(file)\n    assert(file.includes('async function Bar() {'));\n    // Check that core-js's globalThis polyfill is referenced.\n    // NOTE: This may change if core-js internals change.\n    assert(file.includes('esnext.global-this'));\n    assert(!file.includes('es.array.concat'));\n  });\n\n  it('should resolve @swc/helpers and regenerator-runtime relative to parcel', async function () {\n    let dir = path.join('/tmp/' + Math.random().toString(36).slice(2));\n    await outputFS.mkdirp(dir);\n    await ncp(path.join(__dirname, '/integration/swc-helpers'), dir);\n    await bundle(path.join(dir, 'index.js'), {\n      mode: 'production',\n      inputFS: overlayFS,\n      defaultTargetOptions: {\n        engines: {\n          browsers: '>= 0.25%',\n        },\n      },\n    });\n  });\n\n  it('should support commonjs and esm versions of @swc/helpers', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/swc-helpers-library/index.js'),\n    );\n\n    let file = await outputFS.readFile(\n      nullthrows(b.getBundles().find(b => b.env.outputFormat === 'commonjs'))\n        .filePath,\n      'utf8',\n    );\n    assert(file.includes('@swc/helpers/cjs/_class_call_check.cjs'));\n\n    file = await outputFS.readFile(\n      nullthrows(b.getBundles().find(b => b.env.outputFormat === 'esmodule'))\n        .filePath,\n      'utf8',\n    );\n    assert(file.includes('@swc/helpers/_/_class_call_check'));\n  });\n\n  it('should support commonjs versions of @swc/helpers without scope hoisting', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/swc-helpers-library/index.js'),\n      {\n        targets: {\n          test: {\n            distDir,\n            isLibrary: true,\n            scopeHoist: false,\n          },\n        },\n      },\n    );\n\n    let file = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(file.includes('@swc/helpers/cjs/_class_call_check.cjs'));\n    await run(b);\n  });\n\n  it('should print errors from transpilation', async function () {\n    let source = path.join(\n      __dirname,\n      '/integration/transpilation-invalid/index.js',\n    );\n    // $FlowFixMe\n    await assert.rejects(() => bundle(source), {\n      name: 'BuildError',\n      diagnostics: [\n        {\n          codeFrames: [\n            {\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    column: 1,\n                    line: 1,\n                  },\n                  end: {\n                    column: 12,\n                    line: 1,\n                  },\n                },\n              ],\n              filePath: source,\n            },\n          ],\n          hints: null,\n          message: 'pragma cannot be set when runtime is automatic',\n          origin: '@parcel/transformer-js',\n        },\n        {\n          codeFrames: [\n            {\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    column: 3,\n                    line: 9,\n                  },\n                  end: {\n                    column: 4,\n                    line: 9,\n                  },\n                },\n              ],\n              filePath: source,\n            },\n          ],\n          hints: null,\n          message: 'duplicate private name #x.',\n          origin: '@parcel/transformer-js',\n        },\n      ],\n    });\n  });\n\n  describe('tests needing the real filesystem', () => {\n    afterEach(async () => {\n      if (process.platform === 'win32') {\n        return;\n      }\n\n      try {\n        await fs.rimraf(inputDir);\n        await fs.rimraf(distDir);\n      } catch (e) {\n        // ignore\n      }\n    });\n\n    it('should compile node_modules when symlinked with a source field in package.json', async function () {\n      if (process.platform === 'win32') {\n        this.skip();\n        return;\n      }\n\n      const inputDir = path.join(__dirname, '/input');\n      await fs.rimraf(inputDir);\n      await fs.mkdirp(path.join(inputDir, 'node_modules'));\n      await fs.ncp(\n        path.join(\n          path.join(__dirname, '/integration/babel-node-modules-source'),\n        ),\n        inputDir,\n      );\n\n      // Create the symlink here to prevent cross platform and git issues\n      symlinkSync(\n        path.join(inputDir, 'packages/foo'),\n        path.join(inputDir, 'node_modules/foo'),\n        'dir',\n      );\n\n      await bundle(inputDir + '/index.js', {outputFS: fs});\n\n      let file = await fs.readFile(path.join(distDir, 'index.js'), 'utf8');\n      assert(file.includes('function Foo'));\n      assert(file.includes('function Bar'));\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/ts-types.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundle,\n  inputFS,\n  overlayFS,\n  outputFS,\n  ncp,\n  fsFixture,\n} from '@parcel/test-utils';\nimport {md} from '@parcel/diagnostic';\nimport {normalizeSeparators} from '@parcel/utils';\n\ndescribe('typescript types', function () {\n  it('should generate a typescript declaration file', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/ts-types/main/index.ts'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.ts'],\n      },\n      {\n        type: 'ts',\n        assets: ['index.ts'],\n      },\n    ]);\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(__dirname, '/integration/ts-types/main/dist/types.d.ts'),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(__dirname, '/integration/ts-types/main/expected.d.ts'),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should generate ts declarations with imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/ts-types/importing/index.ts'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.ts', 'namespace.ts'],\n      },\n      {\n        type: 'ts',\n        assets: ['index.ts'],\n      },\n    ]);\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(__dirname, '/integration/ts-types/importing/dist/types.d.ts'),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(__dirname, '/integration/ts-types/importing/expected.d.ts'),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should generate ts declarations with imports and naming collisions', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/ts-types/importing-collision/index.ts',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.ts', 'other1.ts', 'other2.ts'],\n      },\n      {\n        type: 'ts',\n        assets: ['index.ts'],\n      },\n    ]);\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/ts-types/importing-collision/dist/types.d.ts',\n        ),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/ts-types/importing-collision/expected.d.ts',\n      ),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should generate ts declarations with exports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/ts-types/exporting/index.ts'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.ts', 'message.ts', 'other.ts', 'test.ts'],\n      },\n      {\n        type: 'ts',\n        assets: ['index.ts'],\n      },\n    ]);\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(__dirname, '/integration/ts-types/exporting/dist/types.d.ts'),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(__dirname, '/integration/ts-types/exporting/expected.d.ts'),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should generate ts declarations with export of an overloaded function signature', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/ts-types/exporting-overload/index.ts'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.ts'],\n      },\n      {\n        type: 'ts',\n        assets: ['index.ts'],\n      },\n    ]);\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/ts-types/exporting-overload/dist/types.d.ts',\n        ),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/ts-types/exporting-overload/expected.d.ts',\n      ),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should generate ts declarations with externals', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/ts-types/externals/index.tsx'),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.tsx', 'other.tsx'],\n      },\n      {\n        type: 'ts',\n        assets: ['index.tsx'],\n      },\n    ]);\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(__dirname, '/integration/ts-types/externals/dist/types.d.ts'),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(__dirname, '/integration/ts-types/externals/expected.d.ts'),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should generate ts declarations with externals that conflict with exported names', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/ts-types/import-export-collision/index.ts',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index.ts'],\n      },\n      {\n        type: 'ts',\n        assets: ['index.ts'],\n      },\n    ]);\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/ts-types/import-export-collision/dist/types.d.ts',\n        ),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/ts-types/import-export-collision/expected.d.ts',\n      ),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should remove private properties', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/ts-types/private/index.ts'),\n    );\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(__dirname, '/integration/ts-types/private/dist/types.d.ts'),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(__dirname, '/integration/ts-types/private/expected.d.ts'),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should not throw errors on typing of a callback which returns a promise or value', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/ts-types/promise-or-value/index.ts'),\n    );\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/ts-types/promise-or-value/dist/types.d.ts',\n        ),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n\n    let expected = await inputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/ts-types/promise-or-value/expected.d.ts',\n      ),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should correctly reference unbuilt monorepo packages', async function () {\n    let fixtureDir = path.join(__dirname, 'integration/ts-types/monorepo');\n    await outputFS.mkdirp(path.join(fixtureDir, 'node_modules'));\n    await ncp(fixtureDir, fixtureDir);\n    await outputFS.symlink(\n      path.join(fixtureDir, 'b'),\n      path.join(fixtureDir, 'node_modules/b'),\n    );\n\n    let b = await bundle(path.join(fixtureDir, 'a'), {\n      inputFS: overlayFS,\n    });\n    assertBundles(b, [\n      {\n        type: 'ts',\n        assets: ['index.ts'],\n      },\n    ]);\n\n    let dist = (\n      await outputFS.readFile(b.getBundles()[0].filePath, 'utf8')\n    ).replace(/\\r\\n/g, '\\n');\n\n    assert(/import\\s*{\\s*B\\s*}\\s*from\\s*\"b\";/.test(dist));\n  });\n\n  it('should generate a typescript declaration file even when composite and incremental are true', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/ts-types/composite/index.ts'),\n    );\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(__dirname, '/integration/ts-types/composite/dist/index.d.ts'),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(__dirname, '/integration/ts-types/composite/expected.d.ts'),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should throw a diagnostic on fatal errors', async function () {\n    let message = md`Return type of exported function has or is using name 'Snapshot' from external module \"${normalizeSeparators(\n      path.join(__dirname, '/integration/ts-types/error/file2'),\n    )}\" but cannot be named.`;\n    await assert.rejects(\n      () =>\n        bundle(path.join(__dirname, '/integration/ts-types/error/index.ts')),\n      {\n        name: 'BuildError',\n        message,\n        diagnostics: [\n          {\n            message,\n            codeFrames: [\n              {\n                filePath: normalizeSeparators(\n                  path.join(__dirname, '/integration/ts-types/error/index.ts'),\n                ),\n                code: await inputFS.readFile(\n                  path.join(__dirname, '/integration/ts-types/error/index.ts'),\n                  'utf8',\n                ),\n                codeHighlights: [\n                  {\n                    start: {line: 13, column: 17},\n                    end: {line: 13, column: 31},\n                    message,\n                  },\n                ],\n              },\n            ],\n            origin: '@parcel/transformer-typescript-types',\n          },\n        ],\n      },\n    );\n  });\n\n  it('should work with module augmentation', async function () {\n    let fixtureDir = path.join(__dirname, 'integration/ts-types/augmentation');\n    await outputFS.mkdirp(path.join(fixtureDir, 'node_modules'));\n    await ncp(fixtureDir, fixtureDir);\n    await outputFS.symlink(\n      path.join(fixtureDir, 'original'),\n      path.join(fixtureDir, 'node_modules/original'),\n    );\n\n    let b = await bundle(path.join(fixtureDir, 'augmenter'), {\n      inputFS: overlayFS,\n    });\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        type: 'js',\n        assets: ['index.ts'],\n      },\n      {\n        name: 'index.d.ts',\n        type: 'ts',\n        assets: ['index.ts'],\n      },\n    ]);\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(fixtureDir, 'augmenter/dist/index.d.ts'),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(fixtureDir, 'augmenter/src/expected.d.ts'),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should handle re-exporting aggregating correctly', async function () {\n    await bundle(\n      path.join(\n        __dirname,\n        '/integration/ts-types/re-exporting-aggregating/index.ts',\n      ),\n    );\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/ts-types/re-exporting-aggregating/dist/types.d.ts',\n        ),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n    let expected = await inputFS.readFile(\n      path.join(\n        __dirname,\n        '/integration/ts-types/re-exporting-aggregating/expected.d.ts',\n      ),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should handle a tsconfig file with paths on windows', async function () {\n    await bundle(\n      path.join(__dirname, '/integration/ts-types/windows-paths/index.ts'),\n    );\n\n    let dist = (\n      await outputFS.readFile(\n        path.join(\n          __dirname,\n          '/integration/ts-types/windows-paths/dist/types.d.ts',\n        ),\n        'utf8',\n      )\n    ).replace(/\\r\\n/g, '\\n');\n\n    let expected = await inputFS.readFile(\n      path.join(__dirname, '/integration/ts-types/windows-paths/expected.d.ts'),\n      'utf8',\n    );\n    assert.equal(dist, expected);\n  });\n\n  it('should handle dynamic imports generated by TS', async function () {\n    let dir = __dirname + '/dynamic-import-ts';\n    await overlayFS.mkdirp(dir);\n    await fsFixture(overlayFS, dir)`\n      yarn.lock:\n\n      package.json:\n        {\n          \"types\": \"dist/types.d.ts\"\n        }\n\n      index.ts:\n        export * from \"./ErrorBoundary\";\n        export * from \"./ErrorBoundaryContext\";\n        export * from \"./Component\";\n\n      foo.js:\n        import {baz} from './baz';\n        export function foo() {\n          return 'foo' + baz();\n        }\n\n      ErrorBoundaryContext.ts:\n        import { createContext } from \"react\";\n        export type ErrorBoundaryContextType = {};\n        export const ErrorBoundaryContext = createContext<ErrorBoundaryContextType | null>(null);\n\n      ErrorBoundary.ts:\n        import { Component, createElement, PropsWithChildren } from \"react\";\n        import { ErrorBoundaryContext } from \"./ErrorBoundaryContext\";\n\n        export class ErrorBoundary extends Component<PropsWithChildren> {\n          render() {\n            const { children } = this.props;\n\n            return createElement(\n              ErrorBoundaryContext.Provider,\n              {\n                value: {},\n              },\n              children\n            );\n          }\n        }\n\n      Component.tsx:\n        export function Foo() {\n          return <h1>Foo</h1>;\n        }\n    `;\n\n    let b = await bundle(path.join(dir, '/index.ts'), {\n      inputFS: overlayFS,\n      mode: 'production',\n    });\n\n    let output = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert.equal(\n      output,\n      `import { Context, Component, PropsWithChildren, ProviderProps, FunctionComponentElement, JSX } from \"react\";\nexport type ErrorBoundaryContextType = {};\nexport const ErrorBoundaryContext: Context<ErrorBoundaryContextType>;\nexport class ErrorBoundary extends Component<PropsWithChildren> {\n    render(): FunctionComponentElement<ProviderProps<ErrorBoundaryContextType>>;\n}\nexport function Foo(): JSX.Element;\n\n//# sourceMappingURL=types.d.ts.map\n`,\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/ts-validation.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  bundle,\n  bundler,\n  getNextBuild,\n  normalizeFilePath,\n  outputFS,\n  overlayFS,\n  run,\n} from '@parcel/test-utils';\n\nconst config = path.join(\n  __dirname,\n  './integration/custom-configs/.parcelrc-typescript-validation',\n);\n\ndescribe('ts-validator', function () {\n  let subscription;\n  afterEach(async () => {\n    if (subscription) {\n      await subscription.unsubscribe();\n    }\n    subscription = null;\n  });\n\n  it('should throw validation error on typescript typing errors across multiple files', async function () {\n    let didThrow = false;\n    let entry = normalizeFilePath(\n      path.join(__dirname, '/integration/ts-validation-error/index.ts'),\n    );\n    let testFile = normalizeFilePath(\n      path.join(__dirname, '/integration/ts-validation-error/test.ts'),\n    );\n    try {\n      await bundle(entry, {\n        defaultConfig: config,\n      });\n    } catch (e) {\n      assert.equal(e.name, 'BuildError');\n      assert(!!Array.isArray(e.diagnostics));\n\n      assert(e.diagnostics.length === 2);\n\n      let entryDiagnostic = e.diagnostics.find(\n        diagnostic => diagnostic.codeFrames[0].filePath === entry,\n      );\n      assert(!!entryDiagnostic);\n      assert(!!entryDiagnostic.codeFrames);\n      assert.equal(entryDiagnostic.origin, '@parcel/validator-typescript');\n      assert.equal(\n        entryDiagnostic.message,\n        `Argument of type 'string' is not assignable to parameter of type 'Params'.`,\n      );\n      assert.equal(entryDiagnostic.codeFrames[0].filePath, entry);\n\n      let testFileDiagnostic = e.diagnostics.find(\n        diagnostic => diagnostic.codeFrames[0].filePath === testFile,\n      );\n      assert(!!testFileDiagnostic);\n      assert(!!testFileDiagnostic.codeFrames);\n      assert.equal(testFileDiagnostic.origin, '@parcel/validator-typescript');\n      assert.equal(\n        testFileDiagnostic.message,\n        `Property 'world' does not exist on type 'Params'.`,\n      );\n\n      didThrow = true;\n    }\n\n    assert(didThrow);\n  });\n\n  it('should re-run when .ts files change', async function () {\n    // We to try to avoid conflicts between tests using the same in-memory file system, we're creating a separate folder.\n    // During the first test pass, this is unnecessary, but because fileSystems won't be re-created when running in 'watch' mode, this is safer.\n    const inputDir = path.join(__dirname, '/ts-validator-change');\n    await outputFS.mkdirp(inputDir);\n    await outputFS.writeFile(path.join(inputDir, '/tsconfig.json'), `{}`);\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.ts'),\n      `export const message: number = \"This is a type error!\"`,\n    );\n\n    let b = bundler(path.join(inputDir, '/index.ts'), {\n      inputFS: overlayFS,\n      defaultConfig: config,\n    });\n    subscription = await b.watch();\n    let buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildFailure');\n    assert.equal(buildEvent.diagnostics.length, 1);\n    assert.equal(\n      buildEvent.diagnostics[0].message,\n      \"Type 'string' is not assignable to type 'number'.\",\n    );\n\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.ts'),\n      `export const message: string = \"The type error is fixed!\"`,\n    );\n    buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildSuccess');\n    let output = await run(buildEvent.bundleGraph);\n    assert.equal(output.message, 'The type error is fixed!');\n\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.ts'),\n      `export const message: boolean = {}`,\n    );\n    buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildFailure');\n    assert.equal(buildEvent.diagnostics.length, 1);\n    assert.equal(\n      buildEvent.diagnostics[0].message,\n      \"Type '{}' is not assignable to type 'boolean'.\",\n    );\n  });\n\n  it('should report correct errors when multiple .ts files change at the same time - no errors', async function () {\n    // We to try to avoid conflicts between tests using the same in-memory file system, we're creating a separate folder.\n    // During the first test pass, this is unnecessary, but because fileSystems won't be re-created when running in 'watch' mode, this is safer.\n    const inputDir = path.join(__dirname, '/ts-validator-multi-change');\n    await outputFS.mkdirp(inputDir);\n    await outputFS.writeFile(path.join(inputDir, '/tsconfig.json'), `{}`);\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.ts'),\n      `import { returnMessage } from \"./returnMessage\";\n      const message: string = \"My Message!\";\n      export const output = returnMessage(message);`,\n    );\n    await outputFS.writeFile(\n      path.join(inputDir, '/returnMessage.ts'),\n      `export function returnMessage(message: string): string { return message; }`,\n    );\n    let b = bundler([path.join(inputDir, '/index.ts')], {\n      inputFS: overlayFS,\n      defaultConfig: config,\n    });\n    subscription = await b.watch();\n\n    let buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildSuccess');\n    let output = await run(buildEvent.bundleGraph);\n    assert.equal(output.output, 'My Message!');\n\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.ts'),\n      `import { returnMessage } from \"./returnMessage\";\n      const message: number = 123456;\n      export const output = returnMessage(message);`,\n    );\n    await outputFS.writeFile(\n      path.join(inputDir, '/returnMessage.ts'),\n      `export function returnMessage(message: number): number { return message; }`,\n    );\n\n    buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildSuccess');\n    output = await run(buildEvent.bundleGraph);\n    assert.equal(output.output, 123456);\n  });\n\n  it('should report correct errors when multiple .ts files change at the same time - with errors', async function () {\n    // We to try to avoid conflicts between tests using the same in-memory file system, we're creating a separate folder.\n    // During the first test pass, this is unnecessary, but because fileSystems won't be re-created when running in 'watch' mode, this is safer.\n    const inputDir = path.join(__dirname, '/ts-validator-multi-change-errors');\n    await outputFS.mkdirp(inputDir);\n    await outputFS.writeFile(path.join(inputDir, '/tsconfig.json'), `{}`);\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.ts'),\n      `import { returnMessage } from \"./returnMessage\";\n      const message: string = \"My Message!\";\n      export const output: string = returnMessage(message);`,\n    );\n    await outputFS.writeFile(\n      path.join(inputDir, '/returnMessage.ts'),\n      `export function returnMessage(message: number): number { return message; }`,\n    );\n    let b = bundler([path.join(inputDir, '/index.ts')], {\n      inputFS: overlayFS,\n      defaultConfig: config,\n    });\n    subscription = await b.watch();\n\n    let buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildFailure');\n    assert.equal(buildEvent.diagnostics.length, 2);\n    assert.equal(\n      buildEvent.diagnostics[1].message,\n      \"Argument of type 'string' is not assignable to parameter of type 'number'.\",\n    );\n\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.ts'),\n      `import { returnMessage } from \"./returnMessage\";\n      const message: boolean = true;\n      export const output: boolean = returnMessage(message);`,\n    );\n    await outputFS.writeFile(\n      path.join(inputDir, '/returnMessage.ts'),\n      `export function returnMessage(message: null): null { return message; }`,\n    );\n\n    buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildFailure');\n    assert.equal(buildEvent.diagnostics.length, 1);\n    assert.equal(\n      buildEvent.diagnostics[0].message,\n      \"Argument of type 'true' is not assignable to parameter of type 'null'.\",\n    );\n  });\n\n  it('should report correct errors when .ts dependencies change in a way that breaks a contract', async function () {\n    // We to try to avoid conflicts between tests using the same in-memory file system, we're creating a separate folder.\n    // During the first test pass, this is unnecessary, but because fileSystems won't be re-created when running in 'watch' mode, this is safer.\n    const inputDir = path.join(__dirname, '/ts-validator-dependencies-change');\n    await outputFS.mkdirp(inputDir);\n    await outputFS.writeFile(path.join(inputDir, '/tsconfig.json'), `{}`);\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.ts'),\n      `import { returnMessage } from \"./returnMessage\";\n      const message: string = \"My Message!\";\n      export const output = returnMessage(message);`,\n    );\n    await outputFS.writeFile(\n      path.join(inputDir, '/returnMessage.ts'),\n      `export function returnMessage(message: string): string { return message; }`,\n    );\n    let b = bundler([path.join(inputDir, '/index.ts')], {\n      inputFS: overlayFS,\n      defaultConfig: config,\n    });\n    subscription = await b.watch();\n\n    let buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildSuccess');\n    let output = await run(buildEvent.bundleGraph);\n    assert.equal(output.output, 'My Message!');\n\n    await outputFS.writeFile(\n      path.join(inputDir, '/returnMessage.ts'),\n      `export function returnMessage(message: number): number { return message; }`,\n    );\n\n    buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildFailure');\n    assert.equal(buildEvent.diagnostics.length, 1);\n    assert.equal(\n      buildEvent.diagnostics[0].message,\n      \"Argument of type 'string' is not assignable to parameter of type 'number'.\",\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/typescript-tsc.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundle,\n  distDir,\n  outputFS,\n  run,\n} from '@parcel/test-utils';\n\nconst config = path.join(__dirname, '/integration/typescript-config/.parcelrc');\n\ndescribe('typescript tsc', function () {\n  it('should support loading tsconfig.json', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/typescript-config/index.ts'),\n      {config},\n    );\n\n    let output = await run(b);\n    assert.equal(output, 2);\n\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!js.includes('/* test comment */'));\n  });\n\n  it('should support loading tsconfig.json with extends', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/typescript-config-extends/index.ts'),\n      {config},\n    );\n\n    let output = await run(b);\n    assert.equal(output, 2);\n\n    let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!js.includes('/* test comment */'));\n  });\n\n  it('should produce a type declaration file when overriding the ts pipeline', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/typescript-types-parcelrc/index.ts'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.ts'],\n      },\n      {\n        name: 'index.d.ts',\n        assets: ['index.ts'],\n      },\n    ]);\n\n    let output = await run(b);\n    assert.equal(new output.Foo().run(), 'bar');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/typescript.js",
    "content": "// @flow\nimport assert from 'assert';\nimport path from 'path';\nimport url from 'url';\nimport nullthrows from 'nullthrows';\nimport {\n  assertBundles,\n  bundle,\n  distDir,\n  outputFS,\n  run,\n} from '@parcel/test-utils';\n\nconst tscConfig = path.join(\n  __dirname,\n  '/integration/typescript-config/.parcelrc',\n);\n\ndescribe('typescript', function () {\n  // This tests both the SWC transformer implementation of typescript (which\n  // powers typescript by default in Parcel) as well as through the Typescript\n  // tsc transformer. Use a `undefined` config to indicate the default config, and the\n  // tsc config to use the tsc transformer instead.\n  //\n  // If testing details specific to either implementation, create another suite.\n  for (let config of [\n    undefined /* default config -- testing SWC typescript */,\n    tscConfig,\n  ]) {\n    it('should produce a ts bundle using ES6 imports', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/typescript/index.ts'),\n        {config},\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['index.ts', 'Local.ts', 'esmodule-helpers.js'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert.equal(typeof output.count, 'function');\n      assert.equal(output.count(), 3);\n    });\n\n    it('should produce a ts bundle using commonJS require', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/typescript-require/index.ts'),\n        {config},\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['index.ts', 'Local.ts', 'esmodule-helpers.js'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert.equal(typeof output.count, 'function');\n      assert.equal(output.count(), 3);\n    });\n\n    it('should support json require', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/typescript-json/index.ts'),\n      );\n\n      // assert.equal(b.assets.size, 2);\n      // assert.equal(b.childBundles.size, 1);\n\n      let output = await run(b);\n      assert.equal(typeof output.count, 'function');\n      assert.equal(output.count(), 3);\n    });\n\n    it('should support env variables', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/typescript-env/index.ts'),\n        {config},\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['index.ts', 'esmodule-helpers.js'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert.equal(typeof output.env, 'function');\n      assert.equal(output.env(), 'test');\n    });\n\n    it('should support importing a URL to a raw asset', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/typescript-raw/index.ts'),\n        {config},\n      );\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['index.ts', 'esmodule-helpers.js'],\n        },\n        {\n          type: 'txt',\n          assets: ['test.txt'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert.equal(typeof output.getRaw, 'function');\n      assert(/http:\\/\\/localhost\\/test\\.[0-9a-f]+\\.txt$/.test(output.getRaw()));\n      assert(\n        await outputFS.exists(\n          path.join(distDir, nullthrows(url.parse(output.getRaw()).pathname)),\n        ),\n      );\n    });\n\n    it('should minify with minify enabled', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/typescript-require/index.ts'),\n        {\n          config,\n          defaultTargetOptions: {\n            shouldOptimize: true,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['index.ts', 'Local.ts', 'esmodule-helpers.js'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert.equal(typeof output.count, 'function');\n      assert.equal(output.count(), 3);\n\n      let js = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n      assert(!js.includes('local.a'));\n    });\n\n    it('should support compiling JSX', async function () {\n      await bundle(\n        path.join(__dirname, '/integration/typescript-jsx/index.tsx'),\n        {config},\n      );\n\n      let file = await outputFS.readFile(\n        path.join(distDir, 'index.js'),\n        'utf8',\n      );\n      assert(file.includes('React.createElement(\"div\"'));\n    });\n\n    it('should use esModuleInterop by default', async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/typescript-interop/index.ts'),\n        {config},\n      );\n\n      assertBundles(b, [\n        {\n          name: 'index.js',\n          assets: ['esmodule-helpers.js', 'index.ts', 'commonjs-module.js'],\n        },\n      ]);\n\n      let output = await run(b);\n      assert.equal(typeof output.test, 'function');\n      assert.equal(output.test(), 'test passed');\n    });\n\n    it('fs.readFileSync should inline a file as a string', async function () {\n      if (config != null) {\n        return;\n      }\n      let b = await bundle(\n        path.join(__dirname, '/integration/typescript-fs/index.ts'),\n        {config},\n      );\n\n      const text = 'export default <div>Hello</div>;';\n      let output = await run(b);\n\n      assert.deepEqual(output, {\n        fromTs: text,\n        fromTsx: text,\n      });\n    });\n\n    it('should handle legacy cast in .ts file', async function () {\n      if (config != null) {\n        return;\n      }\n      await bundle(\n        path.join(__dirname, '/integration/typescript-legacy-cast/index.ts'),\n        {config},\n      );\n    });\n\n    it('should handle compile enums correctly', async function () {\n      if (config != null) {\n        return;\n      }\n      let b = await bundle(\n        path.join(__dirname, '/integration/typescript-enum/index.ts'),\n        {config},\n      );\n\n      let output = await run(b);\n\n      assert.deepEqual(output, {\n        A: {\n          X: 'X',\n          Y: 'Y',\n        },\n        B: {\n          X: 'X',\n          Y: 'Y',\n        },\n        C: {\n          X: 'X',\n          Y: 'Y',\n        },\n        z: {\n          a: 'X',\n          c: 'Y',\n        },\n      });\n    });\n\n    it('should handle simultaneous import type and reexport correctly', async function () {\n      if (config != null) {\n        return;\n      }\n      let b = await bundle(\n        path.join(\n          __dirname,\n          '/integration/typescript-import-type-reexport/index.ts',\n        ),\n        {config},\n      );\n\n      let output = await run(b);\n\n      assert.deepEqual(output, {\n        Bar: 123,\n      });\n    });\n  }\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/vue.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {bundle, distDir, outputFS, run} from '@parcel/test-utils';\n\ndescribe('vue', function () {\n  it('should produce a basic vue bundle', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-basic/Basic.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    assert.deepEqual(output.data(), {msg: 'Hello from Component A!'});\n  });\n  it('should produce a vue bundle with dependencies', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-dependencies/App.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    assert.deepEqual(output.data(), {msg: 'Welcome to Your Vue.js App!'});\n  });\n  it('should produce a vue bundle using preprocessors', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-preprocessors/pre-processors.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    assert.deepEqual(output.data(), {msg: 'Hello from coffee!'});\n    let contents = await outputFS.readFile(\n      path.join(distDir, 'pre-processors.css'),\n      'utf8',\n    );\n    assert(contents.includes('color: #999'));\n    assert(contents.includes('background: red'));\n    assert(contents.includes('color: green'));\n  });\n  it('should produce a vue bundle using scoped styles', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-scoped/App.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    assert(/^data-v-[0-9a-h]{6}$/.test(output.__scopeId));\n    assert.deepEqual(output.data(), {ok: true});\n    let contents = await outputFS.readFile(\n      path.join(distDir, 'App.css'),\n      'utf8',\n    );\n    assert(contents.includes(`.test[${output.__scopeId}]`));\n  });\n  it('should produce a vue bundle using CSS modules', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-css-modules/App.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    let modules = output.__cssModules;\n    assert.equal(typeof modules.$style.red, 'string');\n    let contents = await outputFS.readFile(\n      path.join(distDir, 'App.css'),\n      'utf8',\n    );\n    assert(contents.includes('.' + modules.$style.red));\n  });\n  it('should bundle nested components dynamically', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-nested-components/testcomp.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    assert.equal(typeof output.components.InsideComp, 'function');\n  });\n  it('should apply custom block preprocessors', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-custom-blocks/App.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    assert.deepEqual(output.data().docs, {\n      standard:\n        '\\nThis component represents the home page of the application.\\n',\n      brief: '\\nHome Page\\n',\n    });\n  });\n  it('should produce a basic production vue bundle', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-basic/Basic.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    assert.deepEqual(output.data(), {msg: 'Hello from Component A!'});\n  });\n  it('should load external templates/styles/scripts properly', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-external-files/App.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    assert.deepEqual(output.data(), {msg: 'Hello World'});\n    let contents = await outputFS.readFile(\n      path.join(distDir, 'App.css'),\n      'utf8',\n    );\n    assert(contents.includes('color: #c0ff33'));\n    assert(contents.includes('h2:hover'));\n    assert(contents.includes('.box p'));\n  });\n  it('should load <script setup> component files', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/vue-script-setup/App.vue'),\n    );\n    let output = (await run(b)).default;\n    assert.equal(typeof output.render, 'function');\n    assert.equal(typeof output.setup, 'function');\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/wasm.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {assertBundleTree, bundle, deferred, run} from '@parcel/test-utils';\n\ndescribe.skip('wasm', function () {\n  if (typeof WebAssembly === 'undefined') {\n    return;\n  }\n\n  for (const target of ['browser', 'node']) {\n    describe(`--target=${target}`, function () {\n      it('should preload a wasm file for a sync require', async function () {\n        let b = await bundle(\n          path.join(__dirname, '/integration/wasm-sync/index.js'),\n          {\n            target,\n          },\n        );\n\n        await assertBundleTree(b, {\n          name: 'index.js',\n          assets: ['index.js', 'bundle-loader.js', 'wasm-loader.js'],\n          childBundles: [\n            {\n              type: 'wasm',\n              assets: ['add.wasm'],\n              childBundles: [],\n            },\n            {\n              type: 'map',\n            },\n          ],\n        });\n\n        let promise = deferred();\n        await run(b, {output: promise.resolve}, {require: false});\n        assert.equal(await promise, 5);\n      });\n\n      it('should load a wasm file asynchronously with dynamic import', async function () {\n        let b = await bundle(\n          path.join(__dirname, '/integration/wasm-async/index.js'),\n          {\n            target,\n          },\n        );\n\n        await assertBundleTree(b, {\n          name: 'index.js',\n          assets: ['index.js', 'bundle-loader.js', 'wasm-loader.js'],\n          childBundles: [\n            {\n              type: 'wasm',\n              assets: ['add.wasm'],\n              childBundles: [],\n            },\n            {\n              type: 'map',\n            },\n          ],\n        });\n\n        var res = await run(b);\n        assert.equal(await res, 5);\n      });\n\n      it('should load a wasm file in parallel with a dynamic JS import', async function () {\n        let b = await bundle(\n          path.join(__dirname, '/integration/wasm-dynamic/index.js'),\n          {\n            target,\n          },\n        );\n\n        await assertBundleTree(b, {\n          name: 'index.js',\n          assets: [\n            'index.js',\n            'bundle-loader.js',\n            'js-loader.js',\n            'wasm-loader.js',\n          ],\n          childBundles: [\n            {\n              type: 'js',\n              assets: ['dynamic.js'],\n              childBundles: [\n                {\n                  type: 'wasm',\n                  assets: ['add.wasm'],\n                  childBundles: [],\n                },\n                {\n                  type: 'map',\n                },\n              ],\n            },\n            {\n              type: 'map',\n            },\n          ],\n        });\n\n        var res = await run(b);\n        assert.equal(await res, 5);\n      });\n    });\n  }\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/watcher.js",
    "content": "import assert from 'assert';\nimport nodeFS from 'fs';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundler,\n  getNextBuild,\n  run,\n  assertBundleTree,\n  nextBundle,\n  ncp,\n  inputFS as fs,\n  sleep,\n  symlinkPrivilegeWarning,\n  outputFS,\n  overlayFS,\n} from '@parcel/test-utils';\nimport {symlinkSync} from 'fs';\n\nconst inputDir = path.join(__dirname, '/watcher');\nconst distDir = path.join(inputDir, 'dist');\n\ndescribe('watcher', function () {\n  let subscription;\n  afterEach(async () => {\n    if (subscription) {\n      await subscription.unsubscribe();\n    }\n    subscription = null;\n  });\n\n  it('should rebuild on source file change', async function () {\n    await outputFS.mkdirp(inputDir);\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.js'),\n      'module.exports = \"hello\"',\n      'utf8',\n    );\n    let b = bundler(path.join(inputDir, '/index.js'), {inputFS: overlayFS});\n    subscription = await b.watch();\n    let buildEvent = await getNextBuild(b);\n    let output = await run(buildEvent.bundleGraph);\n    assert.equal(output, 'hello');\n\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.js'),\n      'module.exports = \"something else\"',\n      'utf8',\n    );\n    buildEvent = await getNextBuild(b);\n    output = await run(buildEvent.bundleGraph);\n    assert.equal(output, 'something else');\n  });\n\n  it('should rebuild on a source file change after a failed transformation', async () => {\n    await outputFS.mkdirp(inputDir);\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.js'),\n      'syntax\\\\error',\n      'utf8',\n    );\n    let b = bundler(path.join(inputDir, '/index.js'), {inputFS: overlayFS});\n    subscription = await b.watch();\n    let buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildFailure');\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.js'),\n      'module.exports = \"hello\"',\n      'utf8',\n    );\n    buildEvent = await getNextBuild(b);\n    let output = await run(buildEvent.bundleGraph);\n\n    assert.equal(output, 'hello');\n  });\n\n  it('should rebuild on a config file change', async function () {\n    let inDir = path.join(__dirname, 'integration/parcelrc-custom');\n    let outDir = path.join(inDir, 'dist');\n\n    await ncp(path.join(__dirname, 'integration/parcelrc-custom'), inDir);\n    await ncp(\n      path.dirname(require.resolve('@parcel/config-default')),\n      path.join(inDir, 'node_modules', '@parcel', 'config-default'),\n    );\n    let copyPath = path.join(inDir, 'configCopy');\n    let configPath = path.join(inDir, '.parcelrc');\n    let b = bundler(path.join(inDir, 'index.js'), {\n      inputFS: overlayFS,\n      targets: {\n        main: {\n          distDir: outDir,\n        },\n      },\n    });\n    subscription = await b.watch();\n    await getNextBuild(b);\n    let distFile = await outputFS.readFile(\n      path.join(outDir, 'index.js'),\n      'utf8',\n    );\n    assert(distFile.includes('() => null'));\n    await outputFS.copyFile(copyPath, configPath);\n    await getNextBuild(b);\n    distFile = await outputFS.readFile(path.join(outDir, 'index.js'), 'utf8');\n    assert(distFile.includes('TRANSFORMED CODE'));\n  });\n\n  it('should rebuild properly when a dependency is removed', async function () {\n    await ncp(path.join(__dirname, 'integration/babel-default'), inputDir);\n\n    let b = bundler(path.join(inputDir, 'index.js'), {\n      inputFS: overlayFS,\n      targets: {\n        main: {\n          engines: {\n            node: '^8.0.0',\n          },\n          distDir,\n        },\n      },\n    });\n\n    subscription = await b.watch();\n    await getNextBuild(b);\n    let distFile = await outputFS.readFile(\n      path.join(distDir, 'index.js'),\n      'utf8',\n    );\n    assert(distFile.includes('Foo'));\n    await outputFS.writeFile(\n      path.join(inputDir, 'index.js'),\n      'console.log(\"no more dependencies\")',\n    );\n    await getNextBuild(b);\n    distFile = await outputFS.readFile(path.join(distDir, 'index.js'), 'utf8');\n    assert(!distFile.includes('Foo'));\n  });\n\n  it.skip('should re-generate bundle tree when files change', async function () {\n    await ncp(path.join(__dirname, '/integration/dynamic-hoist'), inputDir);\n\n    let b = bundler(path.join(inputDir, '/index.js'), {watch: true});\n    let bundle = await b.bundle();\n\n    await assertBundleTree(bundle, {\n      name: 'index.js',\n      assets: [\n        'index.js',\n        'common.js',\n        'common-dep.js',\n        'bundle-loader.js',\n        'js-loader.js',\n      ],\n      childBundles: [\n        {\n          assets: ['a.js'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n        {\n          assets: ['b.js'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    let output = await run(bundle);\n    assert.equal(await output(), 7);\n\n    // change b.js so that it no longer depends on common.js.\n    // This should cause common.js and dependencies to no longer be hoisted to the root bundle.\n    await sleep(100);\n    fs.writeFile(path.join(inputDir, '/b.js'), 'module.exports = 5;');\n\n    bundle = await nextBundle(b);\n    await assertBundleTree(bundle, {\n      name: 'index.js',\n      assets: ['index.js', 'bundle-loader.js', 'js-loader.js'],\n      childBundles: [\n        {\n          assets: ['a.js', 'common.js', 'common-dep.js'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n        {\n          assets: ['b.js'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    output = await run(bundle);\n    assert.equal(await output(), 8);\n  });\n\n  it.skip('should only re-package bundles that changed', async function () {\n    await ncp(path.join(__dirname, '/integration/dynamic-hoist'), inputDir);\n    let b = bundler(path.join(inputDir, '/index.js'), {watch: true});\n\n    await b.bundle();\n    let mtimes = (await fs.readdir(path.join(__dirname, '/dist'))).map(\n      f =>\n        (nodeFS.statSync(path.join(__dirname, '/dist/', f)).mtime.getTime() /\n          1000) |\n        0,\n    );\n\n    await sleep(1100); // mtime only has second level precision\n    fs.writeFile(\n      path.join(inputDir, '/b.js'),\n      'module.exports = require(\"./common\")',\n    );\n\n    await nextBundle(b);\n    let newMtimes = (await fs.readdir(path.join(__dirname, '/dist'))).map(\n      f =>\n        (nodeFS.statSync(path.join(__dirname, '/dist/', f)).mtime.getTime() /\n          1000) |\n        0,\n    );\n    assert.deepEqual(mtimes.sort().slice(0, 2), newMtimes.sort().slice(0, 2));\n    assert.notEqual(mtimes[mtimes.length - 1], newMtimes[newMtimes.length - 1]);\n  });\n\n  it.skip('should unload assets that are orphaned', async function () {\n    await ncp(path.join(__dirname, '/integration/dynamic-hoist'), inputDir);\n    let b = bundler(path.join(inputDir, '/index.js'), {watch: true});\n\n    let bundle = await b.bundle();\n    await assertBundleTree(bundle, {\n      name: 'index.js',\n      assets: [\n        'index.js',\n        'common.js',\n        'common-dep.js',\n        'bundle-loader.js',\n        'js-loader.js',\n      ],\n      childBundles: [\n        {\n          assets: ['a.js'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n        {\n          assets: ['b.js'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    let output = await run(bundle);\n    assert.equal(await output(), 7);\n\n    assert(b.loadedAssets.has(path.join(inputDir, '/common-dep.js')));\n\n    // Get rid of common-dep.js\n    await sleep(100);\n    fs.writeFile(path.join(inputDir, '/common.js'), 'module.exports = 5;');\n\n    bundle = await nextBundle(b);\n    await assertBundleTree(bundle, {\n      name: 'index.js',\n      assets: ['index.js', 'common.js', 'bundle-loader.js', 'js-loader.js'],\n      childBundles: [\n        {\n          assets: ['a.js'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n        {\n          assets: ['b.js'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n        {\n          type: 'map',\n        },\n      ],\n    });\n\n    output = await run(bundle);\n    assert.equal(await output(), 13);\n\n    assert(!b.loadedAssets.has(path.join(inputDir, 'common-dep.js')));\n  });\n\n  it.skip('should recompile all assets when a config file changes', async function () {\n    await ncp(path.join(__dirname, '/integration/babel'), inputDir);\n    let b = bundler(path.join(inputDir, 'index.js'), {watch: true});\n\n    await b.bundle();\n    let file = await fs.readFile(\n      path.join(__dirname, '/dist/index.js'),\n      'utf8',\n    );\n    assert(!file.includes('function Foo'));\n    assert(!file.includes('function Bar'));\n\n    // Change babelrc, should recompile both files\n    let babelrc = JSON.parse(\n      await fs.readFile(path.join(inputDir, '/.babelrc'), 'utf8'),\n    );\n    babelrc.presets[0][1].targets.browsers.push('IE >= 11');\n\n    await sleep(100);\n    fs.writeFile(path.join(inputDir, '/.babelrc'), JSON.stringify(babelrc));\n\n    await nextBundle(b);\n    file = await fs.readFile(path.join(__dirname, '/dist/index.js'), 'utf8');\n    assert(file.includes('function Foo'));\n    assert(file.includes('function Bar'));\n  });\n\n  it.skip('should rebuild if the file behind a symlink changes', async function () {\n    await ncp(\n      path.join(__dirname, '/integration/commonjs-with-symlinks/'),\n      inputDir,\n    );\n\n    try {\n      // Create the symlink here to prevent cross platform and git issues\n      symlinkSync(\n        path.join(inputDir, 'local.js'),\n        path.join(inputDir, 'src/symlinked_local.js'),\n      );\n\n      let b = bundler(path.join(inputDir, '/src/index.js'), {\n        watch: true,\n      });\n\n      let bundle = await b.bundle();\n      let output = await run(bundle);\n\n      assert.equal(output(), 3);\n\n      await sleep(100);\n      fs.writeFile(\n        path.join(inputDir, '/local.js'),\n        'exports.a = 5; exports.b = 5;',\n      );\n\n      bundle = await nextBundle(b);\n      output = await run(bundle);\n      assert.equal(output(), 10);\n    } catch (e) {\n      if (e.code == 'EPERM') {\n        symlinkPrivilegeWarning();\n        this.skip();\n      } else {\n        throw e;\n      }\n    }\n  });\n\n  it('should add and remove necessary runtimes to bundles', async () => {\n    await ncp(path.join(__dirname, 'integration/dynamic'), inputDir);\n\n    let indexPath = path.join(inputDir, 'index.js');\n\n    let b = bundler(indexPath, {inputFS: overlayFS});\n    let bundleGraph;\n    subscription = await b.watch((err, event) => {\n      assert(event.type === 'buildSuccess');\n      bundleGraph = event.bundleGraph;\n    });\n    await getNextBuild(b);\n    assertBundles(bundleGraph, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {assets: ['local.js']},\n    ]);\n\n    await outputFS.writeFile(path.join(inputDir, 'other.js'), '');\n    await outputFS.writeFile(\n      indexPath,\n      (await outputFS.readFile(indexPath, 'utf8')) +\n        \"\\nimport('./other.js');\\n\",\n    );\n\n    await getNextBuild(b);\n    assertBundles(bundleGraph, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {assets: ['local.js']},\n      {assets: ['other.js']},\n    ]);\n\n    await outputFS.writeFile(indexPath, '');\n\n    await getNextBuild(b);\n    assertBundles(bundleGraph, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n    ]);\n  });\n\n  it('should rebuild if a missing file is added', async function () {\n    await outputFS.mkdirp(inputDir);\n    await outputFS.writeFile(\n      path.join(inputDir, '/index.js'),\n      'import {other} from \"./other\";\\nexport default other;',\n      'utf8',\n    );\n\n    let b = bundler(path.join(inputDir, 'index.js'), {inputFS: overlayFS});\n    subscription = await b.watch();\n    let buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildFailure');\n\n    await outputFS.writeFile(\n      path.join(inputDir, '/other.js'),\n      'export const other = 2;',\n      'utf8',\n    );\n\n    buildEvent = await getNextBuild(b);\n    assert.equal(buildEvent.type, 'buildSuccess');\n\n    let res = await run(buildEvent.bundleGraph);\n    assert.equal(res.default, 2);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/webextension.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {assertBundles, bundle, distDir, outputFS} from '@parcel/test-utils';\n\ndescribe('webextension', function () {\n  it('should resolve a full webextension bundle', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/webextension/manifest.json'),\n    );\n    assertBundles(b, [\n      {\n        name: 'tmp.aff',\n        assets: ['tmp.aff'],\n      },\n      {\n        name: 'tmp.dic',\n        assets: ['tmp.dic'],\n      },\n      {\n        name: 'messages.json',\n        assets: ['messages.json'],\n      },\n      {\n        name: 'manifest.json',\n        assets: ['manifest.json'],\n      },\n      {\n        assets: ['background.ts'],\n      },\n      {assets: ['a.txt']},\n      {assets: ['b.txt']},\n      {assets: ['foo.png']},\n      {assets: ['foo-dark.png']},\n      {assets: ['popup.html']},\n      {assets: ['devtools.html']},\n      {assets: ['content.js']},\n      {assets: ['content.css']},\n      {\n        assets: ['ruleset_1.json'],\n      },\n    ]);\n    assert(\n      await outputFS.exists(\n        path.join(distDir, '_locales', 'en_US', 'messages.json'),\n      ),\n    );\n    const manifest = JSON.parse(\n      await outputFS.readFile(\n        b.getBundles().find(b => b.name == 'manifest.json').filePath,\n        'utf8',\n      ),\n    );\n    const scripts = manifest.background.scripts;\n    assert.equal(scripts.length, 1);\n    for (const {path: resourcePath} of manifest.declarative_net_request\n      ?.rule_resources ?? []) {\n      assert(await outputFS.exists(path.join(distDir, resourcePath)));\n    }\n    assert(\n      (\n        await outputFS.readFile(path.join(distDir, scripts[0]), 'utf-8')\n      ).includes('Hello Parcel!'),\n    );\n  });\n\n  it('should resolve the web_accessible_resources globs', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/webextension-resolve-web-accessible-resources/manifest.json',\n      ),\n    );\n    assertBundles(b, [\n      {\n        name: 'manifest.json',\n        assets: ['manifest.json'],\n      },\n      {\n        assets: ['index.ts', 'esmodule-helpers.js'],\n      },\n      {\n        assets: ['other.ts', 'esmodule-helpers.js'],\n      },\n      {\n        assets: [\n          'esmodule-helpers.js',\n          'index-jsx.jsx',\n          'index.js',\n          'react.development.js',\n        ],\n      },\n      {assets: ['single.js', 'esmodule-helpers.js']},\n    ]);\n    const manifest = JSON.parse(\n      await outputFS.readFile(\n        b.getBundles().find(b => b.name == 'manifest.json').filePath,\n        'utf8',\n      ),\n    );\n    const war = manifest.web_accessible_resources;\n    assert.equal(war.length, 4);\n  });\n  it('should support web extension manifest v3', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/webextension-mv3/manifest.json'),\n    );\n    assertBundles(b, [\n      {\n        name: 'manifest.json',\n        assets: ['manifest.json'],\n      },\n      {assets: ['background.js']},\n      {assets: ['background.js']},\n      {assets: ['popup.html']},\n      {assets: ['popup.css']},\n      {assets: ['popup.js', 'esmodule-helpers.js']},\n      {assets: ['side-panel.html']},\n      {assets: ['content-script.js']},\n      {assets: ['other-content-script.js']},\n      {assets: ['injected.css']},\n    ]);\n    const manifest = JSON.parse(\n      await outputFS.readFile(path.join(distDir, 'manifest.json'), 'utf-8'),\n    );\n    const css = manifest.content_scripts[0].css;\n    assert.equal(css.length, 1);\n    assert(\n      (await outputFS.readFile(path.join(distDir, css[0]), 'utf-8')).includes(\n        'Comic Sans MS',\n      ),\n    );\n  });\n  // TODO: Test error-checking\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/webmanifest.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {assertBundles, bundle, inputFS, outputFS} from '@parcel/test-utils';\nimport {md} from '@parcel/diagnostic';\n\ndescribe('webmanifest', function () {\n  it('should support .webmanifest', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/webmanifest/index.html'),\n    );\n\n    await assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        name: 'manifest.webmanifest',\n        assets: ['manifest.webmanifest'],\n      },\n      {\n        type: 'png',\n        assets: ['icon.png'],\n      },\n      {\n        type: 'png',\n        assets: ['screenshot.png'],\n      },\n      {\n        type: 'png',\n        assets: ['shortcut-icon.png'],\n      },\n      {\n        type: 'png',\n        assets: ['file-handler-icon.png'],\n      },\n    ]);\n\n    const manifest = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'webmanifest').filePath,\n      'utf8',\n    );\n    assert(/screenshot\\.[0-9a-f]+\\.png/.test(manifest));\n    assert(/icon\\.[0-9a-f]+\\.png/.test(manifest));\n    assert(/shortcut-icon\\.[0-9a-f]+\\.png/.test(manifest));\n    assert(/file-handler-icon\\.[0-9a-f]+\\.png/.test(manifest));\n  });\n\n  it('should support .json', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/webmanifest-json/index.html'),\n    );\n\n    await assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        name: 'manifest.webmanifest',\n        assets: ['manifest.json'],\n      },\n      {\n        type: 'png',\n        assets: ['icon.png'],\n      },\n      {\n        type: 'png',\n        assets: ['screenshot.png'],\n      },\n      {\n        type: 'png',\n        assets: ['shortcut-icon.png'],\n      },\n      {\n        type: 'png',\n        assets: ['file-handler-icon.png'],\n      },\n    ]);\n\n    const manifest = await outputFS.readFile(\n      b.getBundles().find(b => b.type === 'webmanifest').filePath,\n      'utf8',\n    );\n    assert(/screenshot\\.[0-9a-f]+\\.png/.test(manifest));\n    assert(/icon\\.[0-9a-f]+\\.png/.test(manifest));\n    assert(/shortcut-icon\\.[0-9a-f]+\\.png/.test(manifest));\n    assert(/file-handler-icon\\.[0-9a-f]+\\.png/.test(manifest));\n  });\n\n  it('should throw on malformed icons, screenshots, shortcuts, and file handlers', async function () {\n    let manifestPath = path.join(\n      __dirname,\n      '/integration/webmanifest-schema/manifest.webmanifest',\n    );\n    let manifest = await inputFS.readFileSync(manifestPath, 'utf8');\n\n    await assert.rejects(\n      () =>\n        bundle(\n          path.join(__dirname, '/integration/webmanifest-schema/index.html'),\n        ),\n      {\n        name: 'BuildError',\n        message: path.normalize('Invalid webmanifest'),\n        diagnostics: [\n          {\n            codeFrames: [\n              {\n                filePath: manifestPath,\n                language: 'json',\n                code: manifest,\n                codeHighlights: [\n                  {\n                    end: {\n                      column: 5,\n                      line: 12,\n                    },\n                    message: 'Missing property src',\n                    start: {\n                      column: 5,\n                      line: 9,\n                    },\n                  },\n                  {\n                    end: {\n                      column: 6,\n                      line: 13,\n                    },\n                    message: 'Missing property src',\n                    start: {\n                      column: 5,\n                      line: 13,\n                    },\n                  },\n                  {\n                    end: {\n                      column: 19,\n                      line: 15,\n                    },\n                    message: 'Expected type array',\n                    start: {\n                      column: 18,\n                      line: 15,\n                    },\n                  },\n                  {\n                    end: {\n                      column: 17,\n                      line: 18,\n                    },\n                    message: 'Expected type array',\n                    start: {\n                      column: 16,\n                      line: 18,\n                    },\n                  },\n                  {\n                    end: {\n                      column: 9,\n                      line: 30,\n                    },\n                    message: 'Missing property src',\n                    start: {\n                      column: 9,\n                      line: 27,\n                    },\n                  },\n                  {\n                    end: {\n                      column: 10,\n                      line: 31,\n                    },\n                    message: 'Missing property src',\n                    start: {\n                      column: 9,\n                      line: 31,\n                    },\n                  },\n                  {\n                    end: {\n                      column: 21,\n                      line: 35,\n                    },\n                    message: 'Expected type array',\n                    start: {\n                      column: 20,\n                      line: 35,\n                    },\n                  },\n                ],\n              },\n            ],\n            message: 'Invalid webmanifest',\n            origin: '@parcel/transformer-webmanifest',\n          },\n        ],\n      },\n    );\n  });\n\n  it('should throw on missing dependency', async function () {\n    let manifestPathRelative =\n      './integration/webmanifest-not-found/manifest.webmanifest';\n    let manifestPath = path.join(__dirname, manifestPathRelative);\n    let manifest = await inputFS.readFileSync(manifestPath, 'utf8');\n\n    let message = md`Failed to resolve 'icon.png' from '${manifestPathRelative}'`;\n\n    await assert.rejects(\n      () =>\n        bundle(\n          path.join(__dirname, '/integration/webmanifest-not-found/index.html'),\n        ),\n      {\n        name: 'BuildError',\n        message,\n        diagnostics: [\n          {\n            codeFrames: [\n              {\n                filePath: manifestPath,\n                code: manifest,\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    end: {\n                      column: 23,\n                      line: 5,\n                    },\n                    start: {\n                      column: 14,\n                      line: 5,\n                    },\n                  },\n                ],\n              },\n            ],\n            message,\n            origin: '@parcel/core',\n          },\n          {\n            hints: [],\n            message: `Cannot load file './icon.png' in '${path.dirname(\n              manifestPathRelative,\n            )}'.`,\n            origin: '@parcel/resolver-default',\n          },\n        ],\n      },\n    );\n  });\n\n  it('should work when there is a target in package.json', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/webmanifest-targets/index.html'),\n    );\n\n    await assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        name: 'manifest.webmanifest',\n        assets: ['manifest.json'],\n      },\n    ]);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/workers.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundle,\n  inputFS,\n  outputFS,\n  removeDistDirectory,\n  run,\n  runBundle,\n} from '@parcel/test-utils';\n\ndescribe('workers', function () {\n  beforeEach(async () => {\n    await removeDistDirectory();\n  });\n\n  it('bundles workers and service workers', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/workers/index.js'));\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'common.js',\n          'worker-client.js',\n          'feature.js',\n          'get-worker-url.js',\n        ],\n      },\n      {\n        assets: ['service-worker.js'],\n      },\n      {\n        assets: ['shared-worker.js'],\n      },\n      {\n        assets: ['worker.js', 'common.js'],\n      },\n    ]);\n  });\n\n  it('bundles a dynamic import in a worker', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-dynamic/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'get-worker-url.js'],\n      },\n      {\n        assets: ['worker.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let res = await new Promise(resolve => {\n      run(b, {\n        output: resolve,\n      });\n    });\n    assert.deepEqual(res, {default: 42});\n  });\n\n  it('bundles a dynamic import in a worker using legacy browser targets', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-dynamic/index.js'),\n      {\n        defaultTargetOptions: {\n          outputFormat: 'esmodule',\n          shouldScopeHoist: true,\n          engines: {\n            browsers: 'IE 11',\n          },\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'get-worker-url.js'],\n      },\n      {\n        assets: ['worker.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n\n    let res = await new Promise(resolve => {\n      run(b, {\n        output: resolve,\n      });\n    });\n    assert.deepEqual(res, {default: 42});\n  });\n\n  it('bundles a dynamic import in a nested worker', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-dynamic/index-nested.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index-nested.js',\n        assets: ['index-nested.js', 'get-worker-url.js'],\n      },\n      {\n        assets: [\n          'worker-nested.js',\n          'get-worker-url.js',\n          'cacheLoader.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['worker.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let res = await new Promise(resolve => {\n      run(b, {\n        output: resolve,\n      });\n    });\n    assert.deepEqual(res, {default: 42});\n  });\n\n  it('bundles dynamic imports in both the page and worker', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-dynamic/index-async.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index-async.js',\n        assets: [\n          'index-async.js',\n          'get-worker-url.js',\n          'cacheLoader.js',\n          'js-loader.js',\n        ],\n      },\n      {\n        assets: ['worker.js', 'cacheLoader.js', 'js-loader.js'],\n      },\n      {\n        assets: ['async.js', 'esmodule-helpers.js'],\n      },\n      {\n        assets: ['async.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let res = await new Promise(resolve => {\n      run(b, {\n        output: resolve,\n      });\n    });\n    assert.deepEqual(res, {default: 42});\n  });\n\n  it('should support workers pointing to themselves', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-self/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'get-worker-url.js',\n          'workerHelpers.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {\n        assets: [\n          'workerHelpers.js',\n          'get-worker-url.js',\n          'esmodule-helpers.js',\n        ],\n      },\n    ]);\n\n    await run(b);\n  });\n\n  it('bundles workers pointing to themselves with import.meta.url', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-self/import-meta.js'),\n    );\n\n    assertBundles(b, [\n      {\n        assets: ['import-meta.js', 'get-worker-url.js', 'esmodule-helpers.js'],\n      },\n      {\n        assets: ['import-meta.js', 'get-worker-url.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    await run(b);\n  });\n\n  it('bundles workers of type module', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/workers-module/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n          shouldScopeHoist: true,\n        },\n      },\n    );\n    assertBundles(b, [\n      {\n        assets: ['dedicated-worker.js'],\n      },\n      {\n        name: 'index.js',\n        assets: ['index.js', 'get-worker-url.js'],\n      },\n      {\n        assets: ['shared-worker.js'],\n      },\n      {\n        assets: ['index.js'],\n      },\n    ]);\n\n    let dedicated, shared;\n    b.traverseBundles((bundle, ctx, traversal) => {\n      let mainEntry = bundle.getMainEntry();\n      if (mainEntry && mainEntry.filePath.endsWith('shared-worker.js')) {\n        shared = bundle;\n      } else if (\n        mainEntry &&\n        mainEntry.filePath.endsWith('dedicated-worker.js')\n      ) {\n        dedicated = bundle;\n      }\n      if (dedicated && shared) traversal.stop();\n    });\n\n    assert(dedicated);\n    assert(shared);\n\n    let main = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    dedicated = await outputFS.readFile(dedicated.filePath, 'utf8');\n    shared = await outputFS.readFile(shared.filePath, 'utf8');\n    assert(/new Worker(.*?, {[\\n\\s]+type: 'module'[\\n\\s]+})/.test(main));\n    assert(/new SharedWorker(.*?, {[\\n\\s]+type: 'module'[\\n\\s]+})/.test(main));\n  });\n\n  for (let shouldScopeHoist of [true, false]) {\n    it(`compiles workers to non modules if ${\n      shouldScopeHoist\n        ? 'browsers do not support it'\n        : 'shouldScopeHoist = false'\n    }`, async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/workers-module/index.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            shouldOptimize: false,\n            shouldScopeHoist,\n            engines: {\n              browsers: '>= 0.25%',\n            },\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          assets: ['dedicated-worker.js'],\n        },\n        {\n          name: 'index.js',\n          assets: ['index.js', 'get-worker-url.js'],\n        },\n        {\n          assets: [\n            !shouldScopeHoist && 'esmodule-helpers.js',\n            'index.js',\n          ].filter(Boolean),\n        },\n        {\n          assets: ['shared-worker.js'],\n        },\n      ]);\n\n      let dedicated, shared;\n      b.traverseBundles((bundle, ctx, traversal) => {\n        let mainEntry = bundle.getMainEntry();\n        if (mainEntry && mainEntry.filePath.endsWith('shared-worker.js')) {\n          shared = bundle;\n        } else if (\n          mainEntry &&\n          mainEntry.filePath.endsWith('dedicated-worker.js')\n        ) {\n          dedicated = bundle;\n        }\n        if (dedicated && shared) traversal.stop();\n      });\n\n      assert(dedicated);\n      assert(shared);\n\n      let main = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      dedicated = await outputFS.readFile(dedicated.filePath, 'utf8');\n      shared = await outputFS.readFile(shared.filePath, 'utf8');\n      assert(/new Worker([^,]*?)/.test(main));\n      assert(/new SharedWorker([^,]*?)/.test(main));\n      assert(!/export var foo/.test(dedicated));\n      assert(!/export var foo/.test(shared));\n    });\n  }\n\n  for (let supported of [false, true]) {\n    it(`compiles workers to ${\n      supported ? '' : 'non '\n    }modules when browsers do ${\n      supported ? '' : 'not '\n    }support it with esmodule parent script`, async function () {\n      let b = await bundle(\n        path.join(__dirname, '/integration/workers-module/index.js'),\n        {\n          mode: 'production',\n          defaultTargetOptions: {\n            engines: {browsers: supported ? 'Chrome 80' : 'Chrome 75'},\n            outputFormat: 'esmodule',\n            shouldScopeHoist: true,\n            shouldOptimize: false,\n          },\n        },\n      );\n\n      assertBundles(b, [\n        {\n          type: 'js',\n          assets: ['dedicated-worker.js'],\n        },\n        {\n          name: 'index.js',\n          assets: ['index.js', 'get-worker-url.js'],\n        },\n        {\n          type: 'js',\n          assets: ['shared-worker.js'],\n        },\n        {\n          type: 'js',\n          assets: ['index.js'],\n        },\n      ]);\n\n      let dedicated, shared;\n      b.traverseBundles((bundle, ctx, traversal) => {\n        if (bundle.getMainEntry()?.filePath.endsWith('shared-worker.js')) {\n          shared = bundle;\n        } else if (\n          bundle.getMainEntry()?.filePath.endsWith('dedicated-worker.js')\n        ) {\n          dedicated = bundle;\n        }\n        if (dedicated && shared) traversal.stop();\n      });\n\n      assert(dedicated);\n      assert(shared);\n\n      let main = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n      assert(/new Worker([^,]*?)/.test(main));\n      assert(/new SharedWorker([^,]*?)/.test(main));\n\n      dedicated = await outputFS.readFile(dedicated.filePath, 'utf8');\n      shared = await outputFS.readFile(shared.filePath, 'utf8');\n      let importRegex = supported ? /importScripts\\s*\\(/ : /import\\s*(\"|')/;\n      assert(!importRegex.test(dedicated));\n      assert(!importRegex.test(shared));\n    });\n  }\n\n  it('preserves the worker name option', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/workers-module/named.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n          engines: {\n            browsers: '>= 0.25%',\n          },\n        },\n      },\n    );\n\n    let main = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(/new Worker(.*?, {[\\n\\s]+name: 'worker'[\\n\\s]+})/.test(main));\n    assert(/new SharedWorker(.*?, {[\\n\\s]+name: 'shared'[\\n\\s]+})/.test(main));\n  });\n\n  it('errors when importing in a worker without type: module', async function () {\n    let errored = false;\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/workers-module/error.js'),\n        {\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n        },\n      );\n    } catch (err) {\n      errored = true;\n      assert.equal(\n        err.message,\n        'Web workers cannot have imports or exports without the `type: \"module\"` option.',\n      );\n      assert.deepEqual(err.diagnostics, [\n        {\n          message:\n            'Web workers cannot have imports or exports without the `type: \"module\"` option.',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(\n                __dirname,\n                '/integration/workers-module/dedicated-worker.js',\n              ),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 1,\n                    column: 1,\n                  },\n                  end: {\n                    line: 1,\n                    column: 22,\n                  },\n                },\n              ],\n            },\n            {\n              filePath: path.join(\n                __dirname,\n                '/integration/workers-module/error.js',\n              ),\n              codeHighlights: [\n                {\n                  message: 'The environment was originally created here',\n                  start: {\n                    line: 1,\n                    column: 20,\n                  },\n                  end: {\n                    line: 1,\n                    column: 40,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: [\n            \"Add {type: 'module'} as a second argument to the Worker constructor.\",\n          ],\n          documentationURL:\n            'https://parceljs.org/languages/javascript/#classic-scripts',\n        },\n      ]);\n    }\n\n    assert(errored);\n  });\n\n  it('bundles workers with different order', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/workers/index-alternative.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index-alternative.js',\n        assets: [\n          'index-alternative.js',\n          'common.js',\n          'worker-client.js',\n          'feature.js',\n          'get-worker-url.js',\n        ],\n      },\n      {\n        assets: ['service-worker.js'],\n      },\n      {\n        assets: ['shared-worker.js'],\n      },\n      {\n        assets: ['worker.js', 'common.js'],\n      },\n    ]);\n  });\n\n  for (let workerType of ['webworker', 'serviceworker']) {\n    it(`should error when ${workerType}s use importScripts`, async function () {\n      let filePath = path.join(\n        __dirname,\n        `/integration/worker-import-scripts/index-${workerType}.js`,\n      );\n      let errored = false;\n      try {\n        await bundle(filePath);\n      } catch (err) {\n        errored = true;\n        assert.equal(\n          err.message,\n          'Argument to importScripts() must be a fully qualified URL.',\n        );\n        assert.deepEqual(err.diagnostics, [\n          {\n            message:\n              'Argument to importScripts() must be a fully qualified URL.',\n            origin: '@parcel/transformer-js',\n            codeFrames: [\n              {\n                filePath: path.join(\n                  __dirname,\n                  `/integration/worker-import-scripts/importScripts.js`,\n                ),\n                codeHighlights: [\n                  {\n                    message: undefined,\n                    start: {\n                      line: 1,\n                      column: 15,\n                    },\n                    end: {\n                      line: 1,\n                      column: 27,\n                    },\n                  },\n                ],\n              },\n              {\n                filePath: path.join(\n                  __dirname,\n                  `integration/worker-import-scripts/index-${workerType}.js`,\n                ),\n                codeHighlights: [\n                  {\n                    message: 'The environment was originally created here',\n                    start: {\n                      line: 1,\n                      column: workerType === 'webworker' ? 20 : 42,\n                    },\n                    end: {\n                      line: 1,\n                      column: workerType === 'webworker' ? 37 : 59,\n                    },\n                  },\n                ],\n              },\n            ],\n            hints: [\n              'Use a static `import`, or dynamic `import()` instead.',\n              \"Add {type: 'module'} as a second argument to the \" +\n                (workerType === 'webworker'\n                  ? 'Worker constructor.'\n                  : 'navigator.serviceWorker.register() call.'),\n            ],\n            documentationURL:\n              'https://parceljs.org/languages/javascript/#classic-script-workers',\n          },\n        ]);\n      }\n\n      assert(errored);\n    });\n  }\n\n  it('ignores importScripts when not in a worker context', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/worker-import-scripts/importScripts.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['importScripts.js'],\n      },\n    ]);\n\n    let res = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(res.includes(`importScripts('imported.js')`));\n  });\n\n  it('ignores importScripts in script workers when not passed a string literal', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/worker-import-scripts/index-variable.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index-variable.js', 'get-worker-url.js'],\n      },\n      {\n        type: 'js',\n        assets: ['variable.js'],\n      },\n    ]);\n\n    let res = await outputFS.readFile(b.getBundles()[1].filePath, 'utf8');\n    assert(res.includes('importScripts(url)'));\n  });\n\n  it('ignores importScripts in script workers a fully qualified URL is provided', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/worker-import-scripts/index-external.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        type: 'js',\n        assets: ['index-external.js', 'get-worker-url.js'],\n      },\n      {\n        type: 'js',\n        assets: ['external.js'],\n      },\n    ]);\n\n    let res = await outputFS.readFile(b.getBundles()[1].filePath, 'utf8');\n    assert(res.includes(`importScripts('https://unpkg.com/parcel')`));\n  });\n\n  it('bundles service workers', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/service-worker/a/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'index.js'],\n      },\n      {\n        assets: ['worker-nested.js'],\n      },\n      {\n        assets: ['worker-outside.js'],\n      },\n    ]);\n  });\n\n  it('bundles service workers with type: module', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/service-worker/module.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'module.js',\n        assets: ['module.js'],\n      },\n      {\n        assets: ['module-worker.js'],\n      },\n    ]);\n\n    let bundles = b.getBundles();\n    let main = bundles.find(b => !b.env.isWorker());\n    let worker = bundles.find(b => b.env.isWorker());\n    let mainContents = await outputFS.readFile(main.filePath, 'utf8');\n    let workerContents = await outputFS.readFile(worker.filePath, 'utf8');\n    assert(/navigator.serviceWorker.register\\([^,]+?\\)/.test(mainContents));\n    assert(!/export /.test(workerContents));\n  });\n\n  it('preserves the scope option for service workers', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/service-worker/scope.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'scope.js',\n        assets: ['scope.js'],\n      },\n      {\n        assets: ['module-worker.js'],\n      },\n    ]);\n\n    let bundles = b.getBundles();\n    let main = bundles.find(b => !b.env.isWorker());\n    let mainContents = await outputFS.readFile(main.filePath, 'utf8');\n    assert(\n      /navigator.serviceWorker.register\\(.*?, {[\\n\\s]*scope: 'foo'[\\n\\s]*}\\)/.test(\n        mainContents,\n      ),\n    );\n  });\n\n  it('errors when importing in a service worker without type: module', async function () {\n    let errored = false;\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/service-worker/error.js'),\n        {\n          defaultTargetOptions: {\n            shouldScopeHoist: true,\n          },\n        },\n      );\n    } catch (err) {\n      errored = true;\n      assert.equal(\n        err.message,\n        'Service workers cannot have imports or exports without the `type: \"module\"` option.',\n      );\n      assert.deepEqual(err.diagnostics, [\n        {\n          message:\n            'Service workers cannot have imports or exports without the `type: \"module\"` option.',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(\n                __dirname,\n                '/integration/service-worker/module-worker.js',\n              ),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 1,\n                    column: 1,\n                  },\n                  end: {\n                    line: 1,\n                    column: 19,\n                  },\n                },\n              ],\n            },\n            {\n              filePath: path.join(\n                __dirname,\n                'integration/service-worker/error.js',\n              ),\n              codeHighlights: [\n                {\n                  message: 'The environment was originally created here',\n                  start: {\n                    line: 1,\n                    column: 42,\n                  },\n                  end: {\n                    line: 1,\n                    column: 59,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: [\n            \"Add {type: 'module'} as a second argument to the navigator.serviceWorker.register() call.\",\n          ],\n          documentationURL:\n            'https://parceljs.org/languages/javascript/#classic-scripts',\n        },\n      ]);\n    }\n\n    assert(errored);\n  });\n\n  it('exposes a manifest to service workers', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/service-worker/manifest.js'),\n      {\n        defaultTargetOptions: {\n          shouldScopeHoist: true,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'manifest.js',\n        assets: ['manifest.js'],\n      },\n      {\n        assets: ['manifest-worker.js', 'service-worker.js'],\n      },\n    ]);\n\n    let bundles = b.getBundles();\n    let worker = bundles.find(b => b.env.isWorker());\n    let manifest, version;\n    await runBundle(b, worker, {\n      output(m, v) {\n        manifest = m;\n        version = v;\n      },\n    });\n    assert.deepEqual(manifest, ['/manifest.js']);\n    assert.equal(typeof version, 'string');\n  });\n\n  it('recognizes serviceWorker.register with static URL and import.meta.url', async function () {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/service-worker-import-meta-url/index.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js'],\n      },\n      {\n        assets: ['worker.js'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!contents.includes('import.meta.url'));\n  });\n\n  it('throws a codeframe for a missing file in serviceWorker.register with URL and import.meta.url', async function () {\n    let fixture = path.join(\n      __dirname,\n      'integration/service-worker-import-meta-url/missing.js',\n    );\n    let code = await inputFS.readFileSync(fixture, 'utf8');\n    await assert.rejects(() => bundle(fixture), {\n      name: 'BuildError',\n      diagnostics: [\n        {\n          codeFrames: [\n            {\n              filePath: fixture,\n              code,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  end: {\n                    column: 55,\n                    line: 1,\n                  },\n                  start: {\n                    column: 42,\n                    line: 1,\n                  },\n                },\n              ],\n            },\n          ],\n          message: \"Failed to resolve './invalid.js' from './missing.js'\",\n          origin: '@parcel/core',\n        },\n        {\n          hints: [\"Did you mean '__./index.js__'?\"],\n          message: \"Cannot load file './invalid.js' in './'.\",\n          origin: '@parcel/resolver-default',\n        },\n      ],\n    });\n  });\n\n  it('errors on dynamic import() inside service workers', async function () {\n    let errored = false;\n    try {\n      await bundle(\n        path.join(\n          __dirname,\n          '/integration/service-worker/dynamic-import-index.js',\n        ),\n      );\n    } catch (err) {\n      errored = true;\n      assert.equal(err.message, 'import() is not allowed in service workers.');\n      assert.deepEqual(err.diagnostics, [\n        {\n          message: 'import() is not allowed in service workers.',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(\n                __dirname,\n                '/integration/service-worker/dynamic-import.js',\n              ),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 1,\n                    column: 8,\n                  },\n                  end: {\n                    line: 1,\n                    column: 27,\n                  },\n                },\n              ],\n            },\n            {\n              filePath: path.join(\n                __dirname,\n                'integration/service-worker/dynamic-import-index.js',\n              ),\n              codeHighlights: [\n                {\n                  message: 'The environment was originally created here',\n                  start: {\n                    line: 1,\n                    column: 42,\n                  },\n                  end: {\n                    line: 1,\n                    column: 60,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: ['Try using a static `import`.'],\n        },\n      ]);\n    }\n\n    assert(errored);\n  });\n\n  it('bundles workers with circular dependencies', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-circular/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'get-worker-url.js'],\n      },\n      {\n        assets: ['worker.js', 'worker-dep.js'],\n      },\n    ]);\n  });\n\n  it('recognizes worker constructor with static URL and import.meta.url', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-import-meta-url/index.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['index.js', 'get-worker-url.js'],\n      },\n      {\n        assets: ['worker.js'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(!contents.includes('import.meta.url'));\n  });\n\n  it('ignores worker constructors with dynamic URL and import.meta.url', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-import-meta-url/dynamic.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'dynamic.js',\n        assets: ['dynamic.js'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(contents.includes('import.meta.url'));\n  });\n\n  it('ignores worker constructors with local URL binding and import.meta.url', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-import-meta-url/local-url.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'local-url.js',\n        assets: ['local-url.js'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(contents.includes('import.meta.url'));\n  });\n\n  it('throws a codeframe for a missing file in worker constructor with URL and import.meta.url', async function () {\n    let fixture = path.join(\n      __dirname,\n      'integration/worker-import-meta-url/missing.js',\n    );\n    let code = await inputFS.readFileSync(fixture, 'utf8');\n    await assert.rejects(() => bundle(fixture), {\n      name: 'BuildError',\n      diagnostics: [\n        {\n          codeFrames: [\n            {\n              filePath: fixture,\n              code,\n              codeHighlights: [\n                {\n                  message: undefined,\n                  end: {\n                    column: 33,\n                    line: 1,\n                  },\n                  start: {\n                    column: 20,\n                    line: 1,\n                  },\n                },\n              ],\n            },\n          ],\n          message: \"Failed to resolve './invalid.js' from './missing.js'\",\n          origin: '@parcel/core',\n        },\n        {\n          hints: [\n            \"Did you mean '__./dynamic.js__'?\",\n            \"Did you mean '__./index.js__'?\",\n          ],\n          message: \"Cannot load file './invalid.js' in './'.\",\n          origin: '@parcel/resolver-default',\n        },\n      ],\n    });\n  });\n\n  it.skip('bundles in workers with other loaders', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/workers-with-other-loaders/index.js'),\n    );\n\n    assertBundles(b, {\n      name: 'index.js',\n      assets: [\n        'index.js',\n        'worker-client.js',\n        'cacheLoader.js',\n        'js-loader.js',\n        'wasm-loader.js',\n      ],\n      childBundles: [\n        {\n          type: 'wasm',\n          assets: ['add.wasm'],\n          childBundles: [],\n        },\n        {\n          type: 'map',\n        },\n        {\n          assets: ['worker.js', 'cacheLoader.js', 'wasm-loader.js'],\n          childBundles: [\n            {\n              type: 'map',\n            },\n          ],\n        },\n      ],\n    });\n  });\n\n  it('creates a shared bundle to deduplicate assets in workers', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-shared/index.js'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldScopeHoist: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: [\n          'index.js',\n          'lodash.js',\n          'get-worker-url.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {\n        assets: ['worker-a.js', 'get-worker-url.js'],\n      },\n      {\n        assets: ['worker-b.js'],\n      },\n      {\n        assets: ['esmodule-helpers.js', 'lodash.js'],\n      },\n    ]);\n\n    let sharedBundle = b\n      .getBundles()\n      .sort((a, b) => b.stats.size - a.stats.size)\n      .find(b => b.name !== 'index.js');\n    let workerBundle = b.getBundles().find(b => b.name.startsWith('worker-b'));\n    let contents = await outputFS.readFile(workerBundle.filePath, 'utf8');\n    assert(\n      contents.includes(\n        `importScripts(\"./${path.basename(sharedBundle.filePath)}\")`,\n      ),\n    );\n  });\n\n  it('creates a shared bundle between browser and worker contexts', async () => {\n    let b = await bundle(\n      path.join(__dirname, '/integration/html-shared-worker/index.html'),\n      {mode: 'production', defaultTargetOptions: {shouldScopeHoist: false}},\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        assets: [\n          'index.js',\n          'get-worker-url.js',\n          'lodash.js',\n          'esmodule-helpers.js',\n        ],\n      },\n      {\n        assets: ['worker.js', 'lodash.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    // let sharedBundle = b\n    //   .getBundles()\n    //   .sort((a, b) => b.stats.size - a.stats.size)\n    //   .find(b => b.name !== 'index.js');\n    let workerBundle = b.getBundles().find(b => b.name.startsWith('worker'));\n    // let contents = await outputFS.readFile(workerBundle.filePath, 'utf8');\n    // assert(\n    //   contents.includes(\n    //     `importScripts(\"./${path.basename(sharedBundle.filePath)}\")`,\n    //   ),\n    // );\n\n    let outputArgs = [];\n    let workerArgs = [];\n    await run(b, {\n      Worker: class {\n        constructor(url) {\n          workerArgs.push(url);\n        }\n      },\n      output: (ctx, val) => {\n        outputArgs.push([ctx, val]);\n      },\n    });\n\n    assert.deepStrictEqual(outputArgs, [['main', 3]]);\n    assert.deepStrictEqual(workerArgs, [\n      `http://localhost/${path.basename(workerBundle.filePath)}`,\n    ]);\n  });\n\n  it('supports workers with shared assets between page and worker with async imports', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worker-shared-page/index.html'),\n      {\n        mode: 'production',\n        defaultTargetOptions: {\n          shouldOptimize: false,\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.html',\n        assets: ['index.html'],\n      },\n      {\n        assets: [\n          'cacheLoader.js',\n          'get-worker-url.js',\n          'index.js',\n          'js-loader.js',\n          'large.js',\n        ],\n      },\n      {\n        assets: ['cacheLoader.js', 'js-loader.js', 'large.js', 'worker.js'],\n      },\n      {\n        assets: ['get-worker-url.js', 'index.js', 'large.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n      {\n        assets: ['async.js'],\n      },\n    ]);\n\n    await run(b);\n  });\n\n  it('async dependency internalization successfully removes unneeded bundlegroups and their bundles', async () => {\n    let b = await bundle(\n      path.join(\n        __dirname,\n        '/integration/internalize-remove-bundlegroup/index.js',\n      ),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'index.js',\n        assets: ['get-worker-url.js', 'index.js'],\n      },\n      {\n        assets: [\n          'get-worker-url.js',\n          'worker1.js',\n          'worker2.js',\n          'worker3.js',\n          'core.js',\n        ],\n      },\n      {assets: ['core.js', 'worker3.js']},\n    ]);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/worklets.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {\n  assertBundles,\n  bundle,\n  removeDistDirectory,\n  run,\n  runBundle,\n} from '@parcel/test-utils';\n\ndescribe('worklets', function () {\n  beforeEach(async () => {\n    await removeDistDirectory();\n  });\n\n  it('supports paint worklets', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worklet/worklet.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'worklet.js',\n        type: 'js',\n        assets: ['worklet.js', 'colors.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let name;\n    await runBundle(\n      b,\n      b.getBundles()[0],\n      {\n        registerPaint(n) {\n          name = n;\n        },\n      },\n      {require: false},\n    );\n\n    assert.equal(name, 'checkerboard');\n  });\n\n  it('supports paint worklets registered with new URL()', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worklet/url-worklet.js'),\n    );\n\n    assertBundles(b, [\n      {\n        name: 'url-worklet.js',\n        assets: ['url-worklet.js'],\n      },\n      {\n        type: 'js',\n        assets: ['worklet.js', 'colors.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let url;\n    await run(b, {\n      CSS: {\n        paintWorklet: {\n          addModule(u) {\n            url = u;\n          },\n        },\n      },\n    });\n    assert(/^http:\\/\\/localhost\\/worklet\\.[0-9a-f]+\\.js$/.test(url));\n\n    let name;\n    await runBundle(\n      b,\n      b.getBundles()[1],\n      {\n        registerPaint(n) {\n          name = n;\n        },\n      },\n      {require: false},\n    );\n\n    assert.equal(name, 'checkerboard');\n  });\n\n  it('supports paint worklets registered with a url: import', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worklet/pipeline.js'),\n      {\n        mode: 'production',\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'pipeline.js',\n        assets: ['pipeline.js'],\n      },\n      {\n        type: 'js',\n        assets: ['worklet.js', 'colors.js'],\n      },\n    ]);\n\n    let url;\n    await run(b, {\n      CSS: {\n        paintWorklet: {\n          addModule(u) {\n            url = u;\n          },\n        },\n      },\n    });\n    assert(/^http:\\/\\/localhost\\/worklet\\.[0-9a-f]+\\.js$/.test(url));\n\n    let name;\n    await runBundle(\n      b,\n      b.getBundles()[1],\n      {\n        registerPaint(n) {\n          name = n;\n        },\n      },\n      {require: false},\n    );\n\n    assert.equal(name, 'checkerboard');\n  });\n\n  it('supports new URL() referencing a paint worklet', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/worklet/url.js'));\n\n    assertBundles(b, [\n      {\n        name: 'url.js',\n        assets: ['esmodule-helpers.js', 'url.js'],\n      },\n      {\n        type: 'js',\n        assets: ['worklet.js', 'colors.js', 'esmodule-helpers.js'],\n      },\n    ]);\n\n    let res = await run(b);\n    assert(/^http:\\/\\/localhost\\/worklet\\.[0-9a-f]+\\.js$/.test(res.default));\n\n    let name;\n    await runBundle(\n      b,\n      b.getBundles()[1],\n      {\n        registerPaint(n) {\n          name = n;\n        },\n      },\n      {require: false},\n    );\n\n    assert.equal(name, 'checkerboard');\n  });\n\n  it('errors on dynamic import() inside worklets', async function () {\n    let errored = false;\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/worklet/url-worklet-error.js'),\n      );\n    } catch (err) {\n      errored = true;\n      assert.equal(err.message, 'import() is not allowed in worklets.');\n      assert.deepEqual(err.diagnostics, [\n        {\n          message: 'import() is not allowed in worklets.',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(\n                __dirname,\n                '/integration/worklet/worklet-error.js',\n              ),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 1,\n                    column: 8,\n                  },\n                  end: {\n                    line: 1,\n                    column: 18,\n                  },\n                },\n              ],\n            },\n            {\n              filePath: path.join(\n                __dirname,\n                'integration/worklet/url-worklet-error.js',\n              ),\n              codeHighlights: [\n                {\n                  message: 'The environment was originally created here',\n                  start: {\n                    line: 1,\n                    column: 36,\n                  },\n                  end: {\n                    line: 1,\n                    column: 53,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: ['Try using a static `import`.'],\n        },\n      ]);\n    }\n\n    assert(errored);\n  });\n\n  it('supports audio worklets via a pipeline', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/worklet/worklet-pipeline.js'),\n      {\n        mode: 'production',\n      },\n    );\n\n    assertBundles(b, [\n      {\n        name: 'worklet-pipeline.js',\n        assets: ['worklet-pipeline.js'],\n      },\n      {\n        type: 'js',\n        assets: ['worklet.js', 'colors.js'],\n      },\n    ]);\n\n    let res = await run(b);\n    assert(/^http:\\/\\/localhost\\/worklet\\.[0-9a-f]+\\.js$/.test(res));\n\n    let name;\n    await runBundle(\n      b,\n      b.getBundles()[1],\n      {\n        registerPaint(n) {\n          name = n;\n        },\n      },\n      {require: false},\n    );\n\n    assert.equal(name, 'checkerboard');\n  });\n\n  it('errors on dynamic import() inside worklets imported via a pipeline', async function () {\n    let errored = false;\n    try {\n      await bundle(\n        path.join(__dirname, '/integration/worklet/worklet-pipeline-error.js'),\n      );\n    } catch (err) {\n      errored = true;\n      assert.equal(err.message, 'import() is not allowed in worklets.');\n      assert.deepEqual(err.diagnostics, [\n        {\n          message: 'import() is not allowed in worklets.',\n          origin: '@parcel/transformer-js',\n          codeFrames: [\n            {\n              filePath: path.join(\n                __dirname,\n                '/integration/worklet/worklet-error.js',\n              ),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 1,\n                    column: 8,\n                  },\n                  end: {\n                    line: 1,\n                    column: 18,\n                  },\n                },\n              ],\n            },\n          ],\n          hints: ['Try using a static `import`.'],\n        },\n      ]);\n    }\n\n    assert(errored);\n  });\n});\n"
  },
  {
    "path": "packages/core/integration-tests/test/xml.js",
    "content": "import assert from 'assert';\nimport path from 'path';\nimport {assertBundles, bundle, outputFS} from '@parcel/test-utils';\n\ndescribe('xml', function () {\n  it('should transform an atom feed', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/xml/atom.xml'), {\n      defaultTargetOptions: {\n        publicUrl: 'http://example.org/',\n      },\n    });\n\n    assertBundles(b, [\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n      {\n        type: 'xhtml',\n        assets: ['atom.xml'],\n      },\n      {\n        type: 'xsl',\n        assets: ['atom.xsl'],\n      },\n      {\n        name: 'post.html',\n        assets: ['post.html'],\n      },\n      {\n        name: 'atom.xml',\n        assets: ['atom.xml'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(\n      contents.includes(\n        `<?xml-stylesheet type=\"text/xsl\" href=\"http://example.org/${path.basename(\n          b.getBundles().find(b => b.type === 'xsl').filePath,\n        )}\"?>`,\n      ),\n    );\n    assert(\n      contents.includes(\n        `<img src=\"http://example.org/${path.basename(\n          b.getBundles().find(b => b.type === 'png').filePath,\n        )}\"/>`,\n      ),\n    );\n    assert(contents.includes(`<link href=\"http://example.org/post.html\"/>`));\n  });\n\n  it('should transform an atom feed with namespaced elements', async function () {\n    let b = await bundle(\n      path.join(__dirname, '/integration/xml/atom-namespace.xml'),\n      {\n        defaultTargetOptions: {\n          publicUrl: 'http://example.org/',\n        },\n      },\n    );\n\n    assertBundles(b, [\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n      {\n        type: 'xhtml',\n        assets: ['atom-namespace.xml'],\n      },\n      {\n        type: 'xsl',\n        assets: ['atom.xsl'],\n      },\n      {\n        name: 'post.html',\n        assets: ['post.html'],\n      },\n      {\n        name: 'atom-namespace.xml',\n        assets: ['atom-namespace.xml'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(\n      contents.includes(\n        `<?xml-stylesheet type=\"text/xsl\" href=\"http://example.org/${path.basename(\n          b.getBundles().find(b => b.type === 'xsl').filePath,\n        )}\"?>`,\n      ),\n    );\n    assert(\n      contents.includes(\n        `<img src=\"http://example.org/${path.basename(\n          b.getBundles().find(b => b.type === 'png').filePath,\n        )}\"/>`,\n      ),\n    );\n    assert(\n      contents.includes(`<atom:link href=\"http://example.org/post.html\"/>`),\n    );\n  });\n\n  it('should transform an rss feed', async function () {\n    let b = await bundle(path.join(__dirname, '/integration/xml/rss.xml'), {\n      defaultTargetOptions: {\n        publicUrl: 'http://example.org/',\n      },\n    });\n\n    assertBundles(b, [\n      {\n        type: 'png',\n        assets: ['100x100.png'],\n      },\n      {\n        type: 'html',\n        assets: ['rss.xml'],\n      },\n      {\n        type: 'html',\n        assets: ['rss.xml'],\n      },\n      {\n        name: 'post.html',\n        assets: ['post.html'],\n      },\n      {\n        name: 'rss.xml',\n        assets: ['rss.xml'],\n      },\n    ]);\n\n    let contents = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');\n    assert(\n      contents.includes(\n        `&lt;img src=\"http://example.org/${path.basename(\n          b.getBundles().find(b => b.type === 'png').filePath,\n        )}\"&gt;`,\n      ),\n    );\n    assert(contents.includes(`<link>http://example.org/post.html</link>`));\n  });\n});\n"
  },
  {
    "path": "packages/core/logger/.gitignore",
    "content": "lib\n"
  },
  {
    "path": "packages/core/logger/package.json",
    "content": "{\n  \"name\": \"@parcel/logger\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/Logger.js\",\n  \"source\": \"src/Logger.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/events\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/core/logger/src/Logger.js",
    "content": "// @flow strict-local\n\nimport type {\n  IDisposable,\n  LogEvent,\n  PluginLogger as IPluginLogger,\n} from '@parcel/types';\nimport type {\n  Diagnostic,\n  Diagnostifiable,\n  DiagnosticWithoutOrigin,\n} from '@parcel/diagnostic';\n\nimport {ValueEmitter} from '@parcel/events';\nimport {inspect} from 'util';\nimport {errorToDiagnostic, anyToDiagnostic} from '@parcel/diagnostic';\n\nclass Logger {\n  #logEmitter /*: ValueEmitter<LogEvent> */ = new ValueEmitter();\n\n  onLog(cb: (event: LogEvent) => mixed): IDisposable {\n    return this.#logEmitter.addListener(cb);\n  }\n\n  verbose(diagnostic: Diagnostic | Array<Diagnostic>): void {\n    this.#logEmitter.emit({\n      type: 'log',\n      level: 'verbose',\n      diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic],\n    });\n  }\n\n  info(diagnostic: Diagnostic | Array<Diagnostic>): void {\n    this.log(diagnostic);\n  }\n\n  log(diagnostic: Diagnostic | Array<Diagnostic>): void {\n    this.#logEmitter.emit({\n      type: 'log',\n      level: 'info',\n      diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic],\n    });\n  }\n\n  warn(diagnostic: Diagnostic | Array<Diagnostic>): void {\n    this.#logEmitter.emit({\n      type: 'log',\n      level: 'warn',\n      diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic],\n    });\n  }\n\n  error(input: Diagnostifiable, realOrigin?: string): void {\n    let diagnostic = anyToDiagnostic(input);\n    if (typeof realOrigin === 'string') {\n      diagnostic = Array.isArray(diagnostic)\n        ? diagnostic.map(d => {\n            return {...d, origin: realOrigin};\n          })\n        : {\n            ...diagnostic,\n            origin: realOrigin,\n          };\n    }\n\n    this.#logEmitter.emit({\n      type: 'log',\n      level: 'error',\n      diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic],\n    });\n  }\n\n  progress(message: string): void {\n    this.#logEmitter.emit({\n      type: 'log',\n      level: 'progress',\n      message,\n    });\n  }\n}\n\nconst logger: Logger = new Logger();\nexport default logger;\n\n/** @private */\nexport type PluginLoggerOpts = {|\n  origin: string,\n|};\n\nexport class PluginLogger implements IPluginLogger {\n  /** @private */\n  origin: string;\n\n  /** @private */\n  constructor(opts: PluginLoggerOpts) {\n    this.origin = opts.origin;\n  }\n\n  /** @private */\n  updateOrigin(\n    diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,\n  ): Diagnostic | Array<Diagnostic> {\n    return Array.isArray(diagnostic)\n      ? diagnostic.map(d => {\n          return {...d, origin: d.origin ?? this.origin};\n        })\n      : {...diagnostic, origin: diagnostic.origin ?? this.origin};\n  }\n\n  verbose(\n    diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,\n  ): void {\n    logger.verbose(this.updateOrigin(diagnostic));\n  }\n\n  info(\n    diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,\n  ): void {\n    logger.info(this.updateOrigin(diagnostic));\n  }\n\n  log(\n    diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,\n  ): void {\n    logger.log(this.updateOrigin(diagnostic));\n  }\n\n  warn(\n    diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,\n  ): void {\n    logger.warn(this.updateOrigin(diagnostic));\n  }\n\n  error(\n    input:\n      | Diagnostifiable\n      | DiagnosticWithoutOrigin\n      | Array<DiagnosticWithoutOrigin>,\n  ): void {\n    logger.error(input, this.origin);\n  }\n\n  /** @private */\n  progress(message: string): void {\n    logger.progress(message);\n  }\n}\n\n/** @private */\nexport const INTERNAL_ORIGINAL_CONSOLE = {...console};\nlet consolePatched = false;\n\n/**\n * Patch `console` APIs within workers to forward their messages to the Logger\n * at the appropriate levels.\n * @private\n */\nexport function patchConsole() {\n  // Skip if console is already patched...\n  if (consolePatched) return;\n\n  /* eslint-disable no-console */\n  // $FlowFixMe\n  console.log = console.info = (...messages: Array<mixed>) => {\n    logger.info(messagesToDiagnostic(messages));\n  };\n\n  // $FlowFixMe\n  console.debug = (...messages: Array<mixed>) => {\n    // TODO: dedicated debug level?\n    logger.verbose(messagesToDiagnostic(messages));\n  };\n\n  // $FlowFixMe\n  console.warn = (...messages: Array<mixed>) => {\n    logger.warn(messagesToDiagnostic(messages));\n  };\n\n  // $FlowFixMe\n  console.error = (...messages: Array<mixed>) => {\n    logger.error(messagesToDiagnostic(messages));\n  };\n\n  /* eslint-enable no-console */\n  consolePatched = true;\n}\n\n/** @private */\nexport function unpatchConsole() {\n  // Skip if console isn't patched...\n  if (!consolePatched) return;\n\n  /* eslint-disable no-console */\n  // $FlowFixMe\n  console.log = INTERNAL_ORIGINAL_CONSOLE.log;\n\n  // $FlowFixMe\n  console.info = INTERNAL_ORIGINAL_CONSOLE.info;\n\n  // $FlowFixMe\n  console.debug = INTERNAL_ORIGINAL_CONSOLE.debug;\n\n  // $FlowFixMe\n  console.warn = INTERNAL_ORIGINAL_CONSOLE.warn;\n\n  // $FlowFixMe\n  console.error = INTERNAL_ORIGINAL_CONSOLE.error;\n\n  /* eslint-enable no-console */\n  consolePatched = false;\n}\n\nfunction messagesToDiagnostic(\n  messages: Array<mixed>,\n): Diagnostic | Array<Diagnostic> {\n  if (messages.length === 1 && messages[0] instanceof Error) {\n    let error: Error = messages[0];\n    let diagnostic = errorToDiagnostic(error);\n\n    if (Array.isArray(diagnostic)) {\n      return diagnostic.map(d => {\n        return {\n          ...d,\n          skipFormatting: true,\n        };\n      });\n    } else {\n      return {\n        ...diagnostic,\n        skipFormatting: true,\n      };\n    }\n  } else {\n    return {\n      message: joinLogMessages(messages),\n      origin: 'console',\n      skipFormatting: true,\n    };\n  }\n}\n\nfunction joinLogMessages(messages: Array<mixed>): string {\n  return messages.map(m => (typeof m === 'string' ? m : inspect(m))).join(' ');\n}\n"
  },
  {
    "path": "packages/core/logger/test/Logger.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport sinon from 'sinon';\nimport Logger from '../src/Logger';\n\ndescribe('Logger', () => {\n  let onLog;\n  let logDisposable;\n  beforeEach(() => {\n    onLog = sinon.spy();\n    logDisposable = Logger.onLog(onLog);\n  });\n\n  afterEach(() => {\n    logDisposable.dispose();\n  });\n\n  it('emits log diagnostics with info level', () => {\n    let diagnostic = {\n      message: 'hello',\n      origin: 'logger',\n    };\n\n    Logger.log(diagnostic);\n\n    assert(\n      onLog.calledWith({\n        level: 'info',\n        diagnostics: [diagnostic],\n        type: 'log',\n      }),\n    );\n  });\n\n  it('emits warn diagnostic with warn level', () => {\n    let diagnostic = {\n      message: 'zomg',\n      origin: 'logger',\n    };\n\n    Logger.warn(diagnostic);\n\n    assert(\n      onLog.calledWith({level: 'warn', diagnostics: [diagnostic], type: 'log'}),\n    );\n  });\n\n  it('emits error messages with error level', () => {\n    let diagnostic = {\n      message: 'oh noes',\n      origin: 'logger',\n    };\n\n    Logger.error(diagnostic);\n\n    assert(\n      onLog.calledWith({\n        level: 'error',\n        diagnostics: [diagnostic],\n        type: 'log',\n      }),\n    );\n  });\n\n  it('emits progress messages with progress level', () => {\n    Logger.progress('update');\n    assert(\n      onLog.calledWith({level: 'progress', message: 'update', type: 'log'}),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/markdown-ansi/package.json",
    "content": "{\n  \"name\": \"@parcel/markdown-ansi\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/markdown-ansi.js\",\n  \"source\": \"src/markdown-ansi.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"dependencies\": {\n    \"chalk\": \"^4.1.2\"\n  }\n}\n"
  },
  {
    "path": "packages/core/markdown-ansi/src/markdown-ansi.js",
    "content": "// @flow\nimport chalk from 'chalk';\n\n// double char markdown matchers\nconst BOLD_REGEX = /\\*{2}([^*]+)\\*{2}/g;\nconst UNDERLINE_REGEX = /_{2}([^_]+)_{2}/g;\nconst STRIKETHROUGH_REGEX = /~{2}([^~]+)~{2}/g;\n\n// single char markdown matchers\nconst ITALIC_REGEX = /(?<!\\\\)\\*(.+)(?<!\\\\)\\*|(?<!\\\\)_(.+)(?<!\\\\)_/g;\n\nexport default function markdownParser(input: string): string {\n  input = input.replace(BOLD_REGEX, (...args) => chalk.bold(args[1]));\n  input = input.replace(UNDERLINE_REGEX, (...args) => chalk.underline(args[1]));\n  input = input.replace(STRIKETHROUGH_REGEX, (...args) =>\n    chalk.strikethrough(args[1]),\n  );\n  input = input.replace(ITALIC_REGEX, (...args) =>\n    chalk.italic(args[1] || args[2]),\n  );\n  input = input.replace(/(?<!\\\\)\\\\/g, '');\n\n  return input;\n}\n"
  },
  {
    "path": "packages/core/markdown-ansi/test/markdown-ansi.js",
    "content": "import assert from 'assert';\nimport chalk from 'chalk';\n\nimport mdAnsi from '../src/markdown-ansi';\n\nprocess.env.FORCE_COLOR = 3;\n\ndescribe('markdown-ansi', () => {\n  if (!chalk.supportsColor) return;\n\n  it('should support asteriks for bold and italic', () => {\n    let res = mdAnsi('**bold** *italic*');\n    assert.equal(res, '\\u001b[1mbold\\u001b[22m \\u001b[3mitalic\\u001b[23m');\n  });\n\n  it('should support underscores for underlined and italic', () => {\n    let res = mdAnsi('__underline__ _italic_');\n    assert.equal(res, '\\u001b[4munderline\\u001b[24m \\u001b[3mitalic\\u001b[23m');\n  });\n\n  it('should support combination of bold and underline', () => {\n    let res = mdAnsi('**bold _italic_**');\n    assert.equal(res, '\\u001b[1mbold \\u001b[3mitalic\\u001b[23m\\u001b[22m');\n  });\n\n  it('should support strikethrough', () => {\n    let res = mdAnsi('~~strikethrough~~');\n    assert.equal(res, '\\u001b[9mstrikethrough\\u001b[29m');\n  });\n\n  it('should support escape character', () => {\n    let res = mdAnsi('\\\\*\\\\*bold\\\\*\\\\* \\\\\\\\escape\\\\\\\\');\n    assert.equal(res, '**bold** \\\\escape\\\\');\n  });\n\n  it('should support italic with escape character', () => {\n    let res = mdAnsi('\\\\__italic_\\\\_');\n    assert.equal(res, '_\\u001b[3mitalic\\u001b[23m_');\n  });\n});\n"
  },
  {
    "path": "packages/core/package-manager/index.d.ts",
    "content": "import type {\n  FilePath,\n  PackageInstaller,\n  PackageManager,\n  PackageManagerResolveResult,\n} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\n\nexport type {PackageManagerResolveResult};\nexport type {PackageManagerResolveResult as ResolveResult};\n\nexport type {\n  PackageManager,\n  InstallOptions,\n  InstallerOptions,\n  PackageInstaller,\n  Invalidations,\n  ModuleRequest,\n} from '@parcel/types';\n\nexport const Npm: {\n  new (): PackageInstaller;\n};\nexport const Pnpm: {\n  new (): PackageInstaller;\n};\nexport const Yarn: {\n  new (): PackageInstaller;\n};\n\nexport const MockPackageInstaller: {\n  new (): PackageInstaller;\n};\nexport const NodePackageManager: {\n  new (\n    fs: FileSystem,\n    projectRoot: FilePath,\n    installer?: PackageInstaller,\n  ): PackageManager;\n};\n"
  },
  {
    "path": "packages/core/package-manager/package.json",
    "content": "{\n  \"name\": \"@parcel/package-manager\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"types\": \"index.d.ts\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"scripts\": {\n    \"build-ts\": \"mkdir -p lib && flow-to-ts src/index.js > lib/index.d.ts\",\n    \"check-ts\": \"tsc --noEmit index.d.ts\",\n    \"test\": \"mocha test\"\n  },\n  \"targets\": {\n    \"types\": false,\n    \"main\": {\n      \"includeNodeModules\": {\n        \"@parcel/core\": false,\n        \"@parcel/diagnostic\": false,\n        \"@parcel/fs\": false,\n        \"@parcel/logger\": false,\n        \"@parcel/node-resolver-core\": false,\n        \"@parcel/types\": false,\n        \"@parcel/utils\": false,\n        \"@parcel/workers\": false,\n        \"@swc/core\": false,\n        \"semver\": false\n      }\n    }\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/fs\": \"2.16.4\",\n    \"@parcel/logger\": \"2.16.4\",\n    \"@parcel/node-resolver-core\": \"3.7.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@parcel/workers\": \"2.16.4\",\n    \"@swc/core\": \"^1.11.24\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"devDependencies\": {\n    \"command-exists\": \"^1.2.9\",\n    \"cross-spawn\": \"^7.0.6\",\n    \"nullthrows\": \"^1.1.1\",\n    \"split2\": \"^4.2.0\"\n  },\n  \"peerDependencies\": {\n    \"@parcel/core\": \"^2.16.4\"\n  },\n  \"browser\": {\n    \"./src/NodePackageManager.js\": false,\n    \"./src/Npm.js\": false,\n    \"./src/Pnpm.js\": false,\n    \"./src/Yarn.js\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/package-manager/src/JSONParseStream.js",
    "content": "// @flow strict-local\n\nimport type {JSONObject} from '@parcel/types';\n\nimport logger from '@parcel/logger';\nimport {Transform} from 'stream';\n\n// Transforms chunks of json strings to parsed objects.\n// Pair with split2 to parse stream of newline-delimited text.\nexport default class JSONParseStream extends Transform {\n  constructor(options: mixed) {\n    super({...options, objectMode: true});\n  }\n\n  // $FlowFixMe We are in object mode, so we emit objects, not strings\n  _transform(\n    chunk: Buffer | string,\n    encoding: string,\n    callback: (err: ?Error, parsed: ?JSONObject) => mixed,\n  ) {\n    try {\n      let parsed;\n      try {\n        parsed = JSON.parse(chunk.toString());\n      } catch (e) {\n        // Be permissive and ignoreJSON parse errors in case there was\n        // a non-JSON line in the package manager's stdout.\n        logger.verbose({\n          message: 'Ignored invalid JSON message: ' + chunk.toString(),\n          origin: '@parcel/package-manager',\n        });\n        return;\n      }\n      callback(null, parsed);\n    } catch (err) {\n      callback(err);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/package-manager/src/MockPackageInstaller.js",
    "content": "// @flow\n\nimport type {\n  ModuleRequest,\n  PackageInstaller,\n  InstallerOptions,\n} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {FilePath} from '@parcel/types';\n\nimport path from 'path';\nimport {ncp} from '@parcel/fs';\nimport {registerSerializableClass} from '@parcel/core';\nimport pkg from '../package.json';\nimport {moduleRequestsFromDependencyMap} from './utils';\n\ntype Package = {|\n  fs: FileSystem,\n  packagePath: FilePath,\n|};\n\n// This PackageInstaller implementation simply copies files from one filesystem to another.\n// Mostly useful for testing purposes.\nexport class MockPackageInstaller implements PackageInstaller {\n  packages: Map<string, Package> = new Map<string, Package>();\n\n  register(packageName: string, fs: FileSystem, packagePath: FilePath) {\n    this.packages.set(packageName, {fs, packagePath});\n  }\n\n  async install({\n    modules,\n    fs,\n    cwd,\n    packagePath,\n    saveDev = true,\n  }: InstallerOptions): Promise<void> {\n    if (packagePath == null) {\n      packagePath = path.join(cwd, 'package.json');\n      await fs.writeFile(packagePath, '{}');\n    }\n\n    let pkg = JSON.parse(await fs.readFile(packagePath, 'utf8'));\n    let key = saveDev ? 'devDependencies' : 'dependencies';\n\n    if (!pkg[key]) {\n      pkg[key] = {};\n    }\n\n    for (let module of modules) {\n      pkg[key][module.name] =\n        '^' + (await this.installPackage(module, fs, packagePath));\n    }\n\n    await fs.writeFile(packagePath, JSON.stringify(pkg));\n  }\n\n  async installPackage(\n    moduleRequest: ModuleRequest,\n    fs: FileSystem,\n    packagePath: FilePath,\n  ): Promise<any> {\n    let pkg = this.packages.get(moduleRequest.name);\n    if (!pkg) {\n      throw new Error('Unknown package ' + moduleRequest.name);\n    }\n\n    let dest = path.join(\n      path.dirname(packagePath),\n      'node_modules',\n      moduleRequest.name,\n    );\n    await ncp(pkg.fs, pkg.packagePath, fs, dest);\n\n    let packageJSON = JSON.parse(\n      await fs.readFile(path.join(dest, 'package.json'), 'utf8'),\n    );\n\n    if (packageJSON.dependencies != null) {\n      for (let dep of moduleRequestsFromDependencyMap(\n        packageJSON.dependencies,\n      )) {\n        await this.installPackage(dep, fs, packagePath);\n      }\n    }\n\n    return packageJSON.version;\n  }\n}\n\nregisterSerializableClass(\n  `${pkg.version}:MockPackageInstaller`,\n  MockPackageInstaller,\n);\n"
  },
  {
    "path": "packages/core/package-manager/src/NodePackageManager.js",
    "content": "// @flow\nimport type {FilePath, DependencySpecifier, SemverRange} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {\n  ModuleRequest,\n  PackageManager,\n  PackageInstaller,\n  InstallOptions,\n  Invalidations,\n  PackageManagerResolveResult,\n} from '@parcel/types';\n\nimport {registerSerializableClass} from '@parcel/core';\nimport ThrowableDiagnostic, {\n  encodeJSONKeyComponent,\n  escapeMarkdown,\n  generateJSONCodeHighlights,\n  md,\n} from '@parcel/diagnostic';\nimport {NodeFS} from '@parcel/fs';\nimport nativeFS from 'fs';\nimport Module from 'module';\nimport path from 'path';\nimport semver from 'semver';\nimport logger from '@parcel/logger';\n\nimport {getModuleParts} from '@parcel/utils';\nimport {getConflictingLocalDependencies} from './utils';\nimport {installPackage} from './installPackage';\nimport pkg from '../package.json';\nimport {ResolverBase} from '@parcel/node-resolver-core';\nimport {pathToFileURL} from 'url';\nimport {transformSync} from '@swc/core';\n\n// Package.json fields. Must match package_json.rs.\nconst MAIN = 1 << 0;\nconst SOURCE = 1 << 2;\nconst NODE_CONDITION = 1 << 3;\nconst SOURCE_CONDITION = 1 << 17;\nconst ENTRIES = MAIN | SOURCE;\nconst CONDITIONS = NODE_CONDITION | SOURCE_CONDITION;\n\nconst NODE_MODULES = `${path.sep}node_modules${path.sep}`;\n\nconst IS_FILE = 1 << 0;\nconst IS_DIR = 1 << 1;\nconst IS_SYMLINK = 1 << 2;\n\n// There can be more than one instance of NodePackageManager, but node has only a single module cache.\n// Therefore, the resolution cache and the map of parent to child modules should also be global.\nconst cache = new Map<DependencySpecifier, PackageManagerResolveResult>();\nconst children = new Map<FilePath, Set<DependencySpecifier>>();\nconst invalidationsCache = new Map<string, Invalidations>();\n\n// This implements a package manager for Node by monkey patching the Node require\n// algorithm so that it uses the specified FileSystem instead of the native one.\n// It also handles installing packages when they are required if not already installed.\n// See https://github.com/nodejs/node/blob/master/lib/internal/modules/cjs/loader.js\n// for reference to Node internals.\nexport class NodePackageManager implements PackageManager {\n  fs: FileSystem;\n  projectRoot: FilePath;\n  installer: ?PackageInstaller;\n  resolver: ResolverBase;\n  currentExtensions: Array<string>;\n\n  constructor(\n    fs: FileSystem,\n    projectRoot: FilePath,\n    installer?: ?PackageInstaller,\n  ) {\n    this.fs = fs;\n    this.projectRoot = projectRoot;\n    this.installer = installer;\n\n    // $FlowFixMe - no type for _extensions\n    this.currentExtensions = Object.keys(Module._extensions).map(e =>\n      e.substring(1),\n    );\n  }\n\n  _createResolver(): ResolverBase {\n    return new ResolverBase(this.projectRoot, {\n      fs:\n        this.fs instanceof NodeFS && process.versions.pnp == null\n          ? undefined\n          : {\n              read: path => this.fs.readFileSync(path),\n              kind: path => {\n                let flags = 0;\n                try {\n                  let stat = this.fs.lstatSync(path);\n                  if (stat.isSymbolicLink()) {\n                    flags |= IS_SYMLINK;\n                    stat = this.fs.statSync(path);\n                  }\n                  if (stat.isFile()) {\n                    flags |= IS_FILE;\n                  } else if (stat.isDirectory()) {\n                    flags |= IS_DIR;\n                  }\n                } catch (err) {\n                  // ignore\n                }\n                return flags;\n              },\n              readLink: path => this.fs.readlinkSync(path),\n            },\n      mode: 2,\n      entries: ENTRIES,\n      conditions: CONDITIONS,\n      packageExports: true,\n      moduleDirResolver:\n        process.versions.pnp != null\n          ? (module, from) => {\n              // $FlowFixMe[prop-missing]\n              let pnp = Module.findPnpApi(path.dirname(from));\n\n              return pnp.resolveToUnqualified(\n                // append slash to force loading builtins from npm\n                module + '/',\n                from,\n              );\n            }\n          : undefined,\n      extensions: this.currentExtensions,\n      typescript: true,\n    });\n  }\n\n  static deserialize(opts: any): NodePackageManager {\n    return new NodePackageManager(opts.fs, opts.projectRoot, opts.installer);\n  }\n\n  serialize(): {|\n    $$raw: boolean,\n    fs: FileSystem,\n    projectRoot: FilePath,\n    installer: ?PackageInstaller,\n  |} {\n    return {\n      $$raw: false,\n      fs: this.fs,\n      projectRoot: this.projectRoot,\n      installer: this.installer,\n    };\n  }\n\n  async require(\n    name: DependencySpecifier,\n    from: FilePath,\n    opts: ?{|\n      range?: ?SemverRange,\n      shouldAutoInstall?: boolean,\n      saveDev?: boolean,\n    |},\n  ): Promise<any> {\n    let {resolved, type} = await this.resolve(name, from, opts);\n    if (type === 2) {\n      logger.warn({\n        message: 'ES module dependencies are experimental.',\n        origin: '@parcel/package-manager',\n        codeFrames: [\n          {\n            filePath: resolved,\n            codeHighlights: [],\n          },\n        ],\n      });\n\n      // On Windows, Node requires absolute paths to be file URLs.\n      if (process.platform === 'win32' && path.isAbsolute(resolved)) {\n        resolved = pathToFileURL(resolved);\n      }\n\n      // $FlowFixMe\n      return import(resolved);\n    }\n    return this.load(resolved, from);\n  }\n\n  requireSync(name: DependencySpecifier, from: FilePath): any {\n    let {resolved} = this.resolveSync(name, from);\n    return this.load(resolved, from);\n  }\n\n  load(filePath: FilePath, from: FilePath): any {\n    if (!path.isAbsolute(filePath)) {\n      // Node builtin module\n      // $FlowFixMe\n      return require(filePath);\n    }\n\n    // $FlowFixMe[prop-missing]\n    const cachedModule = Module._cache[filePath];\n    if (cachedModule !== undefined) {\n      return cachedModule.exports;\n    }\n\n    // $FlowFixMe\n    let m = new Module(filePath, Module._cache[from] || module.parent);\n\n    // $FlowFixMe _extensions not in type\n    const extensions = Object.keys(Module._extensions);\n    // This handles supported extensions changing due to, for example, esbuild/register being used\n    // We assume that the extension list will change in size - as these tools usually add support for\n    // additional extensions.\n    if (extensions.length !== this.currentExtensions.length) {\n      this.currentExtensions = extensions.map(e => e.substring(1));\n      this.resolver = this._createResolver();\n    }\n\n    // $FlowFixMe[prop-missing]\n    Module._cache[filePath] = m;\n\n    // Patch require within this module so it goes through our require\n    m.require = id => {\n      return this.requireSync(id, filePath);\n    };\n\n    // Patch `fs.readFileSync` temporarily so that it goes through our file system\n    let {readFileSync, statSync} = nativeFS;\n    // $FlowFixMe\n    nativeFS.readFileSync = (filename, encoding) => {\n      return this.fs.readFileSync(filename, encoding);\n    };\n\n    // $FlowFixMe\n    nativeFS.statSync = filename => {\n      return this.fs.statSync(filename);\n    };\n\n    if (!filePath.includes(NODE_MODULES)) {\n      let extname = path.extname(filePath);\n      if (\n        (extname === '.ts' ||\n          extname === '.tsx' ||\n          extname === '.mts' ||\n          extname === '.cts') &&\n        // $FlowFixMe\n        !Module._extensions[extname]\n      ) {\n        let compile = m._compile;\n        m._compile = (code, filename) => {\n          let out = transformSync(code, {\n            filename,\n            module: {type: 'commonjs', ignoreDynamic: true},\n          });\n          compile.call(m, out.code, filename);\n        };\n\n        // $FlowFixMe\n        Module._extensions[extname] = (m, filename) => {\n          // $FlowFixMe\n          delete Module._extensions[extname];\n          // $FlowFixMe\n          Module._extensions['.js'](m, filename);\n        };\n      }\n    }\n\n    try {\n      m.load(filePath);\n    } catch (err) {\n      // $FlowFixMe[prop-missing]\n      delete Module._cache[filePath];\n      throw err;\n    } finally {\n      // $FlowFixMe\n      nativeFS.readFileSync = readFileSync;\n      // $FlowFixMe\n      nativeFS.statSync = statSync;\n    }\n\n    return m.exports;\n  }\n\n  async resolve(\n    id: DependencySpecifier,\n    from: FilePath,\n    options?: ?{|\n      range?: ?SemverRange,\n      shouldAutoInstall?: boolean,\n      saveDev?: boolean,\n    |},\n  ): Promise<PackageManagerResolveResult> {\n    let basedir = path.dirname(from);\n    let key = basedir + ':' + id;\n    let resolved = cache.get(key);\n    if (!resolved) {\n      let [name] = getModuleParts(id);\n      try {\n        resolved = this.resolveInternal(id, from);\n      } catch (e) {\n        if (\n          e.code !== 'MODULE_NOT_FOUND' ||\n          options?.shouldAutoInstall !== true ||\n          id.startsWith('.') // a local file, don't autoinstall\n        ) {\n          if (\n            e.code === 'MODULE_NOT_FOUND' &&\n            options?.shouldAutoInstall !== true\n          ) {\n            let err = new ThrowableDiagnostic({\n              diagnostic: {\n                message: escapeMarkdown(e.message),\n                hints: [\n                  'Autoinstall is disabled, please install this package manually and restart Parcel.',\n                ],\n              },\n            });\n            // $FlowFixMe - needed for loadParcelPlugin\n            err.code = 'MODULE_NOT_FOUND';\n            throw err;\n          } else {\n            throw e;\n          }\n        }\n\n        let conflicts = await getConflictingLocalDependencies(\n          this.fs,\n          name,\n          from,\n          this.projectRoot,\n        );\n\n        if (conflicts == null) {\n          this.invalidate(id, from);\n          await this.install([{name, range: options?.range}], from, {\n            saveDev: options?.saveDev ?? true,\n          });\n\n          return this.resolve(id, from, {\n            ...options,\n            shouldAutoInstall: false,\n          });\n        }\n\n        throw new ThrowableDiagnostic({\n          diagnostic: conflicts.fields.map(field => ({\n            message: md`Could not find module \"${name}\", but it was listed in package.json. Run your package manager first.`,\n            origin: '@parcel/package-manager',\n            codeFrames: [\n              {\n                filePath: conflicts.filePath,\n                language: 'json',\n                code: conflicts.json,\n                codeHighlights: generateJSONCodeHighlights(conflicts.json, [\n                  {\n                    key: `/${field}/${encodeJSONKeyComponent(name)}`,\n                    type: 'key',\n                    message: 'Defined here, but not installed',\n                  },\n                ]),\n              },\n            ],\n          })),\n        });\n      }\n\n      let range = options?.range;\n      if (range != null) {\n        let pkg = resolved.pkg;\n        if (pkg == null || !semver.satisfies(pkg.version, range)) {\n          let conflicts = await getConflictingLocalDependencies(\n            this.fs,\n            name,\n            from,\n            this.projectRoot,\n          );\n\n          if (conflicts == null && options?.shouldAutoInstall === true) {\n            this.invalidate(id, from);\n            await this.install([{name, range}], from);\n            return this.resolve(id, from, {\n              ...options,\n              shouldAutoInstall: false,\n            });\n          } else if (conflicts != null) {\n            throw new ThrowableDiagnostic({\n              diagnostic: {\n                message: md`Could not find module \"${name}\" satisfying ${range}.`,\n                origin: '@parcel/package-manager',\n                codeFrames: [\n                  {\n                    filePath: conflicts.filePath,\n                    language: 'json',\n                    code: conflicts.json,\n                    codeHighlights: generateJSONCodeHighlights(\n                      conflicts.json,\n                      conflicts.fields.map(field => ({\n                        key: `/${field}/${encodeJSONKeyComponent(name)}`,\n                        type: 'key',\n                        message: 'Found this conflicting local requirement.',\n                      })),\n                    ),\n                  },\n                ],\n              },\n            });\n          }\n\n          let version = pkg?.version;\n          let message = md`Could not resolve package \"${name}\" that satisfies ${range}.`;\n          if (version != null) {\n            message += md` Found ${version}.`;\n          }\n\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message,\n              hints: [\n                'Looks like the incompatible version was installed transitively. Add this package as a direct dependency with a compatible version range.',\n              ],\n            },\n          });\n        }\n      }\n\n      cache.set(key, resolved);\n      invalidationsCache.clear();\n\n      // Add the specifier as a child to the parent module.\n      // Don't do this if the specifier was an absolute path, as this was likely a dynamically resolved path\n      // (e.g. babel uses require() to load .babelrc.js configs and we don't want them to be added  as children of babel itself).\n      if (!path.isAbsolute(name)) {\n        let moduleChildren = children.get(from);\n        if (!moduleChildren) {\n          moduleChildren = new Set();\n          children.set(from, moduleChildren);\n        }\n\n        moduleChildren.add(name);\n      }\n    }\n\n    return resolved;\n  }\n\n  resolveSync(\n    name: DependencySpecifier,\n    from: FilePath,\n  ): PackageManagerResolveResult {\n    let basedir = path.dirname(from);\n    let key = basedir + ':' + name;\n    let resolved = cache.get(key);\n    if (!resolved) {\n      resolved = this.resolveInternal(name, from);\n      cache.set(key, resolved);\n      invalidationsCache.clear();\n\n      if (!path.isAbsolute(name)) {\n        let moduleChildren = children.get(from);\n        if (!moduleChildren) {\n          moduleChildren = new Set();\n          children.set(from, moduleChildren);\n        }\n\n        moduleChildren.add(name);\n      }\n    }\n\n    return resolved;\n  }\n\n  async install(\n    modules: Array<ModuleRequest>,\n    from: FilePath,\n    opts?: InstallOptions,\n  ) {\n    await installPackage(this.fs, this, modules, from, this.projectRoot, {\n      packageInstaller: this.installer,\n      ...opts,\n    });\n  }\n\n  getInvalidations(name: DependencySpecifier, from: FilePath): Invalidations {\n    let basedir = path.dirname(from);\n    let cacheKey = basedir + ':' + name;\n    let resolved = cache.get(cacheKey);\n\n    if (resolved && path.isAbsolute(resolved.resolved)) {\n      let cached = invalidationsCache.get(resolved.resolved);\n      if (cached != null) {\n        return cached;\n      }\n\n      let res = {\n        invalidateOnFileCreate: [],\n        invalidateOnFileChange: new Set(),\n        invalidateOnStartup: false,\n      };\n\n      let seen = new Set();\n      let addKey = (name, from) => {\n        let basedir = path.dirname(from);\n        let key = basedir + ':' + name;\n        if (seen.has(key)) {\n          return;\n        }\n\n        seen.add(key);\n        let resolved = cache.get(key);\n        if (!resolved || !path.isAbsolute(resolved.resolved)) {\n          return;\n        }\n\n        res.invalidateOnFileCreate.push(...resolved.invalidateOnFileCreate);\n        res.invalidateOnFileChange.add(resolved.resolved);\n\n        for (let file of resolved.invalidateOnFileChange) {\n          res.invalidateOnFileChange.add(file);\n        }\n\n        let moduleChildren = children.get(resolved.resolved);\n        if (moduleChildren) {\n          for (let specifier of moduleChildren) {\n            addKey(specifier, resolved.resolved);\n          }\n        }\n      };\n\n      addKey(name, from);\n\n      // If this is an ES module, we won't have any of the dependencies because import statements\n      // cannot be intercepted. Instead, ask the resolver to parse the file and recursively analyze the deps.\n      if (resolved.type === 2) {\n        let invalidations = this.resolver.getInvalidations(resolved.resolved);\n        invalidations.invalidateOnFileChange.forEach(i =>\n          res.invalidateOnFileChange.add(i),\n        );\n        invalidations.invalidateOnFileCreate.forEach(i =>\n          res.invalidateOnFileCreate.push(i),\n        );\n        res.invalidateOnStartup ||= invalidations.invalidateOnStartup;\n        if (res.invalidateOnStartup) {\n          logger.warn({\n            message: md`${path.relative(\n              this.projectRoot,\n              resolved.resolved,\n            )} contains non-statically analyzable dependencies in its module graph. This causes Parcel to invalidate the cache on startup.`,\n            origin: '@parcel/package-manager',\n          });\n        }\n      }\n\n      invalidationsCache.set(resolved.resolved, res);\n      return res;\n    }\n\n    return {\n      invalidateOnFileCreate: [],\n      invalidateOnFileChange: new Set(),\n      invalidateOnStartup: false,\n    };\n  }\n\n  invalidate(name: DependencySpecifier, from: FilePath) {\n    let seen = new Set();\n\n    let invalidate = (name, from) => {\n      let basedir = path.dirname(from);\n      let key = basedir + ':' + name;\n      if (seen.has(key)) {\n        return;\n      }\n\n      seen.add(key);\n      let resolved = cache.get(key);\n      if (!resolved || !path.isAbsolute(resolved.resolved)) {\n        return;\n      }\n\n      invalidationsCache.delete(resolved.resolved);\n\n      // $FlowFixMe\n      let module = Module._cache[resolved.resolved];\n      if (module) {\n        // $FlowFixMe\n        delete Module._cache[resolved.resolved];\n      }\n\n      let moduleChildren = children.get(resolved.resolved);\n      if (moduleChildren) {\n        for (let specifier of moduleChildren) {\n          invalidate(specifier, resolved.resolved);\n        }\n      }\n\n      children.delete(resolved.resolved);\n      cache.delete(key);\n    };\n\n    invalidate(name, from);\n    this.resolver = this._createResolver();\n  }\n\n  resolveInternal(name: string, from: string): PackageManagerResolveResult {\n    if (this.resolver == null) {\n      this.resolver = this._createResolver();\n    }\n\n    let res = this.resolver.resolve({\n      filename: name,\n      specifierType: 'commonjs',\n      parent: from,\n    });\n\n    // Invalidate whenever the .pnp.js file changes.\n    // TODO: only when we actually resolve a node_modules package?\n    if (process.versions.pnp != null && res.invalidateOnFileChange) {\n      // $FlowFixMe[prop-missing]\n      let pnp = Module.findPnpApi(path.dirname(from));\n      res.invalidateOnFileChange.push(pnp.resolveToUnqualified('pnpapi', null));\n    }\n\n    if (res.error) {\n      let e = new Error(`Could not resolve module \"${name}\" from \"${from}\"`);\n      // $FlowFixMe\n      e.code = 'MODULE_NOT_FOUND';\n      throw e;\n    }\n    switch (res.resolution.type) {\n      case 'Path': {\n        let self = this;\n        let resolved = res.resolution.value;\n        return {\n          resolved,\n          invalidateOnFileChange: new Set(res.invalidateOnFileChange),\n          invalidateOnFileCreate: res.invalidateOnFileCreate,\n          type: res.moduleType,\n          get pkg() {\n            let pkgPath = self.fs.findAncestorFile(\n              ['package.json'],\n              resolved,\n              self.projectRoot,\n            );\n            return pkgPath\n              ? JSON.parse(self.fs.readFileSync(pkgPath, 'utf8'))\n              : null;\n          },\n        };\n      }\n      case 'Builtin': {\n        let {scheme, module} = res.resolution.value;\n        return {\n          resolved: scheme ? `${scheme}:${module}` : module,\n          invalidateOnFileChange: new Set(res.invalidateOnFileChange),\n          invalidateOnFileCreate: res.invalidateOnFileCreate,\n          type: res.moduleType,\n        };\n      }\n      default:\n        throw new Error('Unknown resolution type');\n    }\n  }\n}\n\nregisterSerializableClass(\n  `${pkg.version}:NodePackageManager`,\n  NodePackageManager,\n);\n"
  },
  {
    "path": "packages/core/package-manager/src/Npm.js",
    "content": "// @flow strict-local\n\nimport type {PackageInstaller, InstallerOptions} from '@parcel/types';\n\nimport path from 'path';\nimport spawn from 'cross-spawn';\nimport logger from '@parcel/logger';\nimport promiseFromProcess from './promiseFromProcess';\nimport {registerSerializableClass} from '@parcel/core';\nimport {npmSpecifierFromModuleRequest} from './utils';\n\n// $FlowFixMe\nimport pkg from '../package.json';\n\nconst NPM_CMD = 'npm';\n\nexport class Npm implements PackageInstaller {\n  async install({\n    modules,\n    cwd,\n    fs,\n    packagePath,\n    saveDev = true,\n  }: InstallerOptions): Promise<void> {\n    // npm doesn't auto-create a package.json when installing,\n    // so create an empty one if needed.\n    if (packagePath == null) {\n      await fs.writeFile(path.join(cwd, 'package.json'), '{}');\n    }\n\n    let args = ['install', '--json', saveDev ? '--save-dev' : '--save'].concat(\n      modules.map(npmSpecifierFromModuleRequest),\n    );\n\n    // When Parcel is run by npm (e.g. via package.json scripts), several environment variables are\n    // added. When parcel in turn calls npm again, these can cause npm to behave stragely, so we\n    // filter them out when installing packages.\n    let env = {};\n    for (let key in process.env) {\n      if (!key.startsWith('npm_') && key !== 'INIT_CWD' && key !== 'NODE_ENV') {\n        env[key] = process.env[key];\n      }\n    }\n\n    let installProcess = spawn(NPM_CMD, args, {cwd, env});\n    let stdout = '';\n    installProcess.stdout.on('data', (buf: Buffer) => {\n      stdout += buf.toString();\n    });\n\n    let stderr = [];\n    installProcess.stderr.on('data', (buf: Buffer) => {\n      stderr.push(buf.toString().trim());\n    });\n\n    try {\n      await promiseFromProcess(installProcess);\n\n      let results: NPMResults = JSON.parse(stdout);\n      let addedCount = results.added.length;\n      if (addedCount > 0) {\n        logger.log({\n          origin: '@parcel/package-manager',\n          message: `Added ${addedCount} packages via npm`,\n        });\n      }\n\n      // Since we succeeded, stderr might have useful information not included\n      // in the json written to stdout. It's also not necessary to log these as\n      // errors as they often aren't.\n      for (let message of stderr) {\n        if (message.length > 0) {\n          logger.log({\n            origin: '@parcel/package-manager',\n            message,\n          });\n        }\n      }\n    } catch (e) {\n      throw new Error(\n        'npm failed to install modules: ' +\n          e.message +\n          ' - ' +\n          stderr.join('\\n'),\n      );\n    }\n  }\n}\n\ntype NPMResults = {|\n  added: Array<{name: string, ...}>,\n|};\n\nregisterSerializableClass(`${pkg.version}:Npm`, Npm);\n"
  },
  {
    "path": "packages/core/package-manager/src/Pnpm.js",
    "content": "// @flow strict-local\n\nimport type {PackageInstaller, InstallerOptions} from '@parcel/types';\n\nimport path from 'path';\nimport fs from 'fs';\nimport commandExists from 'command-exists';\nimport spawn from 'cross-spawn';\nimport logger from '@parcel/logger';\nimport split from 'split2';\nimport JSONParseStream from './JSONParseStream';\nimport promiseFromProcess from './promiseFromProcess';\nimport {registerSerializableClass} from '@parcel/core';\nimport {exec, npmSpecifierFromModuleRequest} from './utils';\n\n// $FlowFixMe\nimport pkg from '../package.json';\n\nconst PNPM_CMD = 'pnpm';\n\ntype LogLevel = 'error' | 'warn' | 'info' | 'debug';\n\ntype ErrorLog = {|\n  err: {|\n    message: string,\n    code: string,\n    stack: string,\n  |},\n|};\n\ntype PNPMLog =\n  | {|\n      +name: 'pnpm:progress',\n      packageId: string,\n      status: 'fetched' | 'found_in_store' | 'resolved',\n    |}\n  | {|\n      +name: 'pnpm:root',\n      added?: {|\n        id?: string,\n        name: string,\n        realName: string,\n        version?: string,\n        dependencyType?: 'prod' | 'dev' | 'optional',\n        latest?: string,\n        linkedFrom?: string,\n      |},\n      removed?: {|\n        name: string,\n        version?: string,\n        dependencyType?: 'prod' | 'dev' | 'optional',\n      |},\n    |}\n  | {|+name: 'pnpm:importing', from: string, method: string, to: string|}\n  | {|+name: 'pnpm:link', target: string, link: string|}\n  | {|+name: 'pnpm:stats', prefix: string, removed?: number, added?: number|};\n\ntype PNPMResults = {|\n  level: LogLevel,\n  prefix?: string,\n  message?: string,\n  ...ErrorLog,\n  ...PNPMLog,\n|};\n\nlet hasPnpm: ?boolean;\nlet pnpmVersion: ?number;\n\nexport class Pnpm implements PackageInstaller {\n  static async exists(): Promise<boolean> {\n    if (hasPnpm != null) {\n      return hasPnpm;\n    }\n\n    try {\n      hasPnpm = Boolean(await commandExists('pnpm'));\n    } catch (err) {\n      hasPnpm = false;\n    }\n\n    return hasPnpm;\n  }\n\n  async install({\n    modules,\n    cwd,\n    saveDev = true,\n  }: InstallerOptions): Promise<void> {\n    if (pnpmVersion == null) {\n      let version = await exec('pnpm --version');\n      pnpmVersion = parseInt(version.stdout, 10);\n    }\n\n    let args = ['add', '--reporter', 'ndjson'];\n    if (saveDev) {\n      args.push('-D');\n    }\n    if (pnpmVersion >= 7) {\n      if (fs.existsSync(path.join(cwd, 'pnpm-workspace.yaml'))) {\n        // installs in workspace root (regardless of cwd)\n        args.push('-w');\n      }\n    } else {\n      // ignores workspace root check\n      args.push('-W');\n    }\n    args = args.concat(modules.map(npmSpecifierFromModuleRequest));\n\n    let env = {};\n    for (let key in process.env) {\n      if (!key.startsWith('npm_') && key !== 'INIT_CWD' && key !== 'NODE_ENV') {\n        env[key] = process.env[key];\n      }\n    }\n\n    let addedCount = 0,\n      removedCount = 0;\n\n    let installProcess = spawn(PNPM_CMD, args, {\n      cwd,\n      env,\n    });\n    installProcess.stdout\n      .pipe(split())\n      .pipe(new JSONParseStream())\n      .on('error', e => {\n        logger.warn({\n          origin: '@parcel/package-manager',\n          message: e.chunk,\n          stack: e.stack,\n        });\n      })\n      .on('data', (json: PNPMResults) => {\n        if (json.level === 'error') {\n          logger.error({\n            origin: '@parcel/package-manager',\n            message: json.err.message,\n            stack: json.err.stack,\n          });\n        } else if (json.level === 'info' && typeof json.message === 'string') {\n          logger.info({\n            origin: '@parcel/package-manager',\n            message: prefix(json.message),\n          });\n        } else if (json.name === 'pnpm:stats') {\n          addedCount += json.added ?? 0;\n          removedCount += json.removed ?? 0;\n        }\n      });\n\n    let stderr = [];\n    installProcess.stderr\n      .on('data', str => {\n        stderr.push(str.toString());\n      })\n      .on('error', e => {\n        logger.warn({\n          origin: '@parcel/package-manager',\n          message: e.message,\n        });\n      });\n\n    try {\n      await promiseFromProcess(installProcess);\n\n      if (addedCount > 0 || removedCount > 0) {\n        logger.log({\n          origin: '@parcel/package-manager',\n          message: `Added ${addedCount} ${\n            removedCount > 0 ? `and removed ${removedCount} ` : ''\n          }packages via pnpm`,\n        });\n      }\n\n      // Since we succeeded, stderr might have useful information not included\n      // in the json written to stdout. It's also not necessary to log these as\n      // errors as they often aren't.\n      for (let message of stderr) {\n        logger.log({\n          origin: '@parcel/package-manager',\n          message,\n        });\n      }\n    } catch (e) {\n      throw new Error('pnpm failed to install modules');\n    }\n  }\n}\n\nfunction prefix(message: string): string {\n  return 'pnpm: ' + message;\n}\n\nregisterSerializableClass(`${pkg.version}:Pnpm`, Pnpm);\n"
  },
  {
    "path": "packages/core/package-manager/src/Yarn.js",
    "content": "// @flow strict-local\n\nimport type {PackageInstaller, InstallerOptions} from '@parcel/types';\n\nimport commandExists from 'command-exists';\nimport spawn from 'cross-spawn';\nimport logger from '@parcel/logger';\nimport split from 'split2';\nimport JSONParseStream from './JSONParseStream';\nimport promiseFromProcess from './promiseFromProcess';\nimport {registerSerializableClass} from '@parcel/core';\nimport {exec, npmSpecifierFromModuleRequest} from './utils';\n\n// $FlowFixMe\nimport pkg from '../package.json';\n\nconst YARN_CMD = 'yarn';\n\ntype YarnStdOutMessage =\n  | {|\n      +type: 'step',\n      data: {|\n        message: string,\n        current: number,\n        total: number,\n      |},\n    |}\n  | {|+type: 'success', data: string|}\n  | {|+type: 'info', data: string|}\n  | {|+type: 'tree' | 'progressStart' | 'progressTick'|};\n\ntype YarnStdErrMessage = {|\n  +type: 'error' | 'warning',\n  data: string,\n|};\n\nlet hasYarn: ?boolean;\nlet yarnVersion: ?number;\n\nexport class Yarn implements PackageInstaller {\n  static async exists(): Promise<boolean> {\n    if (hasYarn != null) {\n      return hasYarn;\n    }\n\n    try {\n      hasYarn = Boolean(await commandExists('yarn'));\n    } catch (err) {\n      hasYarn = false;\n    }\n\n    return hasYarn;\n  }\n\n  async install({\n    modules,\n    cwd,\n    saveDev = true,\n  }: InstallerOptions): Promise<void> {\n    if (yarnVersion == null) {\n      let version = await exec('yarn --version');\n      yarnVersion = parseInt(version.stdout, 10);\n    }\n\n    let args = ['add', '--json'].concat(\n      modules.map(npmSpecifierFromModuleRequest),\n    );\n\n    if (saveDev) {\n      args.push('-D');\n      if (yarnVersion < 2) {\n        args.push('-W');\n      }\n    }\n\n    // When Parcel is run by Yarn (e.g. via package.json scripts), several environment variables are\n    // added. When parcel in turn calls Yarn again, these can cause Yarn to behave stragely, so we\n    // filter them out when installing packages.\n    let env = {};\n    for (let key in process.env) {\n      if (\n        !key.startsWith('npm_') &&\n        key !== 'YARN_WRAP_OUTPUT' &&\n        key !== 'INIT_CWD' &&\n        key !== 'NODE_ENV'\n      ) {\n        env[key] = process.env[key];\n      }\n    }\n\n    let installProcess = spawn(YARN_CMD, args, {cwd, env});\n    installProcess.stdout\n      // Invoking yarn with --json provides streaming, newline-delimited JSON output.\n      .pipe(split())\n      .pipe(new JSONParseStream())\n      .on('error', e => {\n        logger.error(e, '@parcel/package-manager');\n      })\n      .on('data', (message: YarnStdOutMessage) => {\n        switch (message.type) {\n          case 'step':\n            logger.progress(\n              prefix(\n                `[${message.data.current}/${message.data.total}] ${message.data.message}`,\n              ),\n            );\n            return;\n          case 'success':\n          case 'info':\n            logger.info({\n              origin: '@parcel/package-manager',\n              message: prefix(message.data),\n            });\n            return;\n          default:\n          // ignore\n        }\n      });\n\n    installProcess.stderr\n      .pipe(split())\n      .pipe(new JSONParseStream())\n      .on('error', e => {\n        logger.error(e, '@parcel/package-manager');\n      })\n      .on('data', (message: YarnStdErrMessage) => {\n        switch (message.type) {\n          case 'warning':\n            logger.warn({\n              origin: '@parcel/package-manager',\n              message: prefix(message.data),\n            });\n            return;\n          case 'error':\n            logger.error({\n              origin: '@parcel/package-manager',\n              message: prefix(message.data),\n            });\n            return;\n          default:\n          // ignore\n        }\n      });\n\n    try {\n      return await promiseFromProcess(installProcess);\n    } catch (e) {\n      throw new Error('Yarn failed to install modules:' + e.message);\n    }\n  }\n}\n\nfunction prefix(message: string): string {\n  return 'yarn: ' + message;\n}\n\nregisterSerializableClass(`${pkg.version}:Yarn`, Yarn);\n"
  },
  {
    "path": "packages/core/package-manager/src/getCurrentPackageManager.js",
    "content": "// @flow\n\nexport default function getCurrentPackageManager(\n  userAgent: ?string = process.env.npm_config_user_agent,\n): ?{|name: string, version: string|} {\n  if (!userAgent) {\n    return undefined;\n  }\n\n  const pmSpec = userAgent.split(' ')[0];\n  const separatorPos = pmSpec.lastIndexOf('/');\n  const name = pmSpec.substring(0, separatorPos);\n  return {\n    name: name,\n    version: pmSpec.substring(separatorPos + 1),\n  };\n}\n"
  },
  {
    "path": "packages/core/package-manager/src/index.js",
    "content": "// @flow\n\nimport type {PackageManagerResolveResult} from '@parcel/types';\n\nexport type {\n  PackageManager,\n  Invalidations,\n  PackageInstaller,\n  ModuleRequest,\n} from '@parcel/types';\nexport * from './Npm';\nexport * from './Pnpm';\nexport * from './Yarn';\nexport * from './MockPackageInstaller';\nexport * from './NodePackageManager';\nexport {_addToInstallQueue} from './installPackage';\n\nexport type {PackageManagerResolveResult};\nexport type {PackageManagerResolveResult as ResolveResult};\n"
  },
  {
    "path": "packages/core/package-manager/src/installPackage.js",
    "content": "// @flow\n\nimport type {FilePath, PackageJSON} from '@parcel/types';\nimport type {\n  ModuleRequest,\n  PackageManager,\n  PackageInstaller,\n  InstallOptions,\n} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\n\nimport invariant from 'assert';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\nimport semver from 'semver';\nimport ThrowableDiagnostic, {\n  generateJSONCodeHighlights,\n  encodeJSONKeyComponent,\n  md,\n} from '@parcel/diagnostic';\nimport logger from '@parcel/logger';\nimport {loadConfig, PromiseQueue, resolveConfig} from '@parcel/utils';\nimport WorkerFarm from '@parcel/workers';\n\nimport {Npm} from './Npm';\nimport {Yarn} from './Yarn';\nimport {Pnpm} from './Pnpm.js';\nimport {getConflictingLocalDependencies} from './utils';\nimport getCurrentPackageManager from './getCurrentPackageManager';\nimport validateModuleSpecifier from './validateModuleSpecifier';\n\nasync function install(\n  fs: FileSystem,\n  packageManager: PackageManager,\n  modules: Array<ModuleRequest>,\n  from: FilePath,\n  projectRoot: FilePath,\n  options: InstallOptions = {},\n): Promise<void> {\n  let {installPeers = true, saveDev = true, packageInstaller} = options;\n  let moduleNames = modules.map(m => m.name).join(', ');\n\n  logger.progress(`Installing ${moduleNames}...`);\n\n  let fromPkgPath = await resolveConfig(\n    fs,\n    from,\n    ['package.json'],\n    projectRoot,\n  );\n  let cwd = fromPkgPath ? path.dirname(fromPkgPath) : fs.cwd();\n\n  if (!packageInstaller) {\n    packageInstaller = await determinePackageInstaller(fs, from, projectRoot);\n  }\n\n  try {\n    await packageInstaller.install({\n      modules,\n      saveDev,\n      cwd,\n      packagePath: fromPkgPath,\n      fs,\n    });\n  } catch (err) {\n    throw new Error(`Failed to install ${moduleNames}: ${err.message}`);\n  }\n\n  if (installPeers) {\n    await Promise.all(\n      modules.map(m =>\n        installPeerDependencies(\n          fs,\n          packageManager,\n          m,\n          from,\n          projectRoot,\n          options,\n        ),\n      ),\n    );\n  }\n}\n\nasync function installPeerDependencies(\n  fs: FileSystem,\n  packageManager: PackageManager,\n  module: ModuleRequest,\n  from: FilePath,\n  projectRoot: FilePath,\n  options,\n) {\n  const {resolved} = await packageManager.resolve(module.name, from);\n  const modulePkg: PackageJSON = nullthrows(\n    await loadConfig(fs, resolved, ['package.json'], projectRoot),\n  ).config;\n  const peers = modulePkg.peerDependencies || {};\n\n  let modules: Array<ModuleRequest> = [];\n  for (let [name, range] of Object.entries(peers)) {\n    invariant(typeof range === 'string');\n\n    let conflicts = await getConflictingLocalDependencies(\n      fs,\n      name,\n      from,\n      projectRoot,\n    );\n    if (conflicts) {\n      let {pkg} = await packageManager.resolve(name, from);\n      invariant(pkg);\n      if (!semver.satisfies(pkg.version, range)) {\n        throw new ThrowableDiagnostic({\n          diagnostic: {\n            message: md`Could not install the peer dependency \"${name}\" for \"${module.name}\", installed version ${pkg.version} is incompatible with ${range}`,\n            origin: '@parcel/package-manager',\n            codeFrames: [\n              {\n                filePath: conflicts.filePath,\n                language: 'json',\n                code: conflicts.json,\n                codeHighlights: generateJSONCodeHighlights(\n                  conflicts.json,\n                  conflicts.fields.map(field => ({\n                    key: `/${field}/${encodeJSONKeyComponent(name)}`,\n                    type: 'key',\n                    message: 'Found this conflicting local requirement.',\n                  })),\n                ),\n              },\n            ],\n          },\n        });\n      }\n\n      continue;\n    }\n    modules.push({name, range});\n  }\n\n  if (modules.length) {\n    await install(\n      fs,\n      packageManager,\n      modules,\n      from,\n      projectRoot,\n      Object.assign({}, options, {installPeers: false}),\n    );\n  }\n}\n\nasync function determinePackageInstaller(\n  fs: FileSystem,\n  filepath: FilePath,\n  projectRoot: FilePath,\n): Promise<PackageInstaller> {\n  let configFile = await resolveConfig(\n    fs,\n    filepath,\n    ['package-lock.json', 'pnpm-lock.yaml', 'yarn.lock'],\n    projectRoot,\n  );\n\n  let configName = configFile && path.basename(configFile);\n\n  // Always use the package manager that seems to be used in the project,\n  // falling back to a different one wouldn't update the existing lockfile.\n  if (configName === 'package-lock.json') {\n    return new Npm();\n  } else if (configName === 'pnpm-lock.yaml') {\n    return new Pnpm();\n  } else if (configName === 'yarn.lock') {\n    return new Yarn();\n  }\n\n  let currentPackageManager = getCurrentPackageManager()?.name;\n  if (currentPackageManager === 'npm') {\n    return new Npm();\n  } else if (currentPackageManager === 'yarn') {\n    return new Yarn();\n  } else if (currentPackageManager === 'pnpm') {\n    return new Pnpm();\n  }\n\n  if (await Yarn.exists()) {\n    return new Yarn();\n  } else if (await Pnpm.exists()) {\n    return new Pnpm();\n  } else {\n    return new Npm();\n  }\n}\n\nlet queue = new PromiseQueue({maxConcurrent: 1});\nlet modulesInstalling: Set<string> = new Set();\n\n// Exported so that it may be invoked from the worker api below.\n// Do not call this directly! This can result in concurrent package installations\n// across multiple instances of the package manager.\nexport function _addToInstallQueue(\n  fs: FileSystem,\n  packageManager: PackageManager,\n  modules: Array<ModuleRequest>,\n  filePath: FilePath,\n  projectRoot: FilePath,\n  options?: InstallOptions,\n): Promise<mixed> {\n  modules = modules.map(request => ({\n    name: validateModuleSpecifier(request.name),\n    range: request.range,\n  }));\n\n  // Wrap PromiseQueue and track modules that are currently installing.\n  // If a request comes in for a module that is currently installing, don't bother\n  // enqueuing it.\n  let modulesToInstall = modules.filter(\n    m => !modulesInstalling.has(getModuleRequestKey(m)),\n  );\n  if (modulesToInstall.length) {\n    for (let m of modulesToInstall) {\n      modulesInstalling.add(getModuleRequestKey(m));\n    }\n\n    queue\n      .add(() =>\n        install(\n          fs,\n          packageManager,\n          modulesToInstall,\n          filePath,\n          projectRoot,\n          options,\n        ).then(() => {\n          for (let m of modulesToInstall) {\n            modulesInstalling.delete(getModuleRequestKey(m));\n          }\n        }),\n      )\n      .then(\n        () => {},\n        () => {},\n      );\n  }\n\n  return queue.run();\n}\n\nexport function installPackage(\n  fs: FileSystem,\n  packageManager: PackageManager,\n  modules: Array<ModuleRequest>,\n  filePath: FilePath,\n  projectRoot: FilePath,\n  options?: InstallOptions,\n): Promise<mixed> {\n  if (WorkerFarm.isWorker()) {\n    let workerApi = WorkerFarm.getWorkerApi();\n    // TODO this should really be `__filename` but without the rewriting.\n    let bundlePath =\n      process.env.PARCEL_BUILD_ENV === 'production' &&\n      !process.env.PARCEL_SELF_BUILD\n        ? path.join(__dirname, '..', 'lib/index.js')\n        : __filename;\n    return workerApi.callMaster({\n      location: bundlePath,\n      args: [fs, packageManager, modules, filePath, projectRoot, options],\n      method: '_addToInstallQueue',\n    });\n  }\n\n  return _addToInstallQueue(\n    fs,\n    packageManager,\n    modules,\n    filePath,\n    projectRoot,\n    options,\n  );\n}\n\nfunction getModuleRequestKey(moduleRequest: ModuleRequest): string {\n  return [moduleRequest.name, moduleRequest.range].join('@');\n}\n"
  },
  {
    "path": "packages/core/package-manager/src/promiseFromProcess.js",
    "content": "// @flow strict-local\n\nimport type {ChildProcess} from 'child_process';\n\nexport default function promiseFromProcess(\n  childProcess: ChildProcess,\n): Promise<void> {\n  return new Promise((resolve, reject) => {\n    childProcess.on('error', reject);\n    childProcess.on('close', code => {\n      if (code !== 0) {\n        reject(new Error('Child process failed'));\n        return;\n      }\n\n      resolve();\n    });\n  });\n}\n"
  },
  {
    "path": "packages/core/package-manager/src/utils.js",
    "content": "// @flow strict-local\n\nimport type {FilePath, ModuleRequest} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\n\nimport invariant from 'assert';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport {resolveConfig} from '@parcel/utils';\nimport {exec as _exec} from 'child_process';\nimport {promisify} from 'util';\n\nexport const exec: (\n  command: string,\n  options?: child_process$execOpts,\n) => Promise<{|stdout: string | Buffer, stderr: string | Buffer|}> = _exec\n  ? promisify(_exec)\n  : // _exec is undefined in browser builds\n    _exec;\n\nexport function npmSpecifierFromModuleRequest(\n  moduleRequest: ModuleRequest,\n): string {\n  return moduleRequest.range != null\n    ? [moduleRequest.name, moduleRequest.range].join('@')\n    : moduleRequest.name;\n}\n\nexport function moduleRequestsFromDependencyMap(dependencyMap: {|\n  [string]: string,\n|}): Array<ModuleRequest> {\n  return Object.entries(dependencyMap).map(([name, range]) => {\n    invariant(typeof range === 'string');\n    return {\n      name,\n      range,\n    };\n  });\n}\n\nexport async function getConflictingLocalDependencies(\n  fs: FileSystem,\n  name: string,\n  local: FilePath,\n  projectRoot: FilePath,\n): Promise<?{|json: string, filePath: FilePath, fields: Array<string>|}> {\n  let pkgPath = await resolveConfig(fs, local, ['package.json'], projectRoot);\n  if (pkgPath == null) {\n    return;\n  }\n\n  let pkgStr = await fs.readFile(pkgPath, 'utf8');\n  let pkg;\n  try {\n    pkg = JSON.parse(pkgStr);\n  } catch (e) {\n    // TODO: codeframe\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: 'Failed to parse package.json',\n        origin: '@parcel/package-manager',\n      },\n    });\n  }\n\n  if (typeof pkg !== 'object' || pkg == null) {\n    // TODO: codeframe\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: 'Expected package.json contents to be an object.',\n        origin: '@parcel/package-manager',\n      },\n    });\n  }\n\n  let fields = [];\n  for (let field of ['dependencies', 'devDependencies', 'peerDependencies']) {\n    if (\n      typeof pkg[field] === 'object' &&\n      pkg[field] != null &&\n      pkg[field][name] != null\n    ) {\n      fields.push(field);\n    }\n  }\n\n  if (fields.length > 0) {\n    return {\n      filePath: pkgPath,\n      json: pkgStr,\n      fields,\n    };\n  }\n}\n"
  },
  {
    "path": "packages/core/package-manager/src/validateModuleSpecifier.js",
    "content": "// @flow\n\nconst MODULE_REGEX = /^((@[^/\\s]+\\/){0,1}([^/\\s.~]+[^/\\s]*)){1}(@[^/\\s]+){0,1}/;\n\nexport default function validateModuleSpecifier(moduleName: string): string {\n  let matches = MODULE_REGEX.exec(moduleName);\n  if (matches) {\n    return matches[0];\n  }\n\n  return '';\n}\n"
  },
  {
    "path": "packages/core/package-manager/test/NodePackageManager.test.js",
    "content": "// @flow strict-local\n\nimport {MemoryFS, NodeFS, OverlayFS} from '@parcel/fs';\nimport assert from 'assert';\nimport invariant from 'assert';\nimport path from 'path';\nimport sinon from 'sinon';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport {loadConfig} from '@parcel/utils';\nimport WorkerFarm from '@parcel/workers';\nimport {MockPackageInstaller, NodePackageManager} from '../src';\n\nconst FIXTURES_DIR = path.join(__dirname, 'fixtures');\n\nfunction normalize(res) {\n  return {\n    ...res,\n    invalidateOnFileCreate:\n      res?.invalidateOnFileCreate?.sort((a, b) => {\n        let ax =\n          a.filePath ??\n          a.glob ??\n          (a.aboveFilePath != null && a.fileName != null\n            ? a.aboveFilePath + a.fileName\n            : '');\n        let bx =\n          b.filePath ??\n          b.glob ??\n          (b.aboveFilePath != null && b.fileName != null\n            ? b.aboveFilePath + b.fileName\n            : '');\n        return ax < bx ? -1 : 1;\n      }) ?? [],\n  };\n}\n\nfunction check(resolved, expected) {\n  assert.deepEqual(normalize(resolved), normalize(expected));\n}\n\ndescribe('NodePackageManager', function () {\n  let fs;\n  let packageManager;\n  let packageInstaller;\n  let workerFarm;\n\n  // These can sometimes take a lil while\n  this.timeout(20000);\n\n  beforeEach(() => {\n    workerFarm = new WorkerFarm({\n      workerPath: require.resolve('@parcel/core/src/worker.js'),\n    });\n    fs = new OverlayFS(new MemoryFS(workerFarm), new NodeFS());\n    packageInstaller = new MockPackageInstaller();\n    packageManager = new NodePackageManager(fs, '/', packageInstaller);\n  });\n\n  afterEach(async () => {\n    loadConfig.clear();\n    await workerFarm.end();\n  });\n\n  it('resolves packages that exist', async () => {\n    check(\n      await packageManager.resolve(\n        'foo',\n        path.join(FIXTURES_DIR, 'has-foo/index.js'),\n      ),\n      {\n        pkg: {\n          version: '1.1.0',\n        },\n        resolved: path.join(FIXTURES_DIR, 'has-foo/node_modules/foo/index.js'),\n        type: 1,\n        invalidateOnFileChange: new Set([\n          path.join(FIXTURES_DIR, 'has-foo/package.json'),\n          path.join(FIXTURES_DIR, 'has-foo/node_modules/foo/package.json'),\n        ]),\n        invalidateOnFileCreate: [\n          {\n            filePath: path.join(\n              FIXTURES_DIR,\n              'has-foo/node_modules/foo/index.ts',\n            ),\n          },\n          {\n            filePath: path.join(\n              FIXTURES_DIR,\n              'has-foo/node_modules/foo/index.tsx',\n            ),\n          },\n          {\n            fileName: 'node_modules/foo',\n            aboveFilePath: path.join(FIXTURES_DIR, 'has-foo'),\n          },\n          {\n            fileName: 'tsconfig.json',\n            aboveFilePath: path.join(FIXTURES_DIR, 'has-foo'),\n          },\n        ],\n      },\n    );\n  });\n\n  it('requires packages that exist', async () => {\n    assert.deepEqual(\n      await packageManager.require(\n        'foo',\n        path.join(FIXTURES_DIR, 'has-foo/index.js'),\n      ),\n      'foobar',\n    );\n  });\n\n  it(\"autoinstalls packages that don't exist\", async () => {\n    packageInstaller.register('a', fs, path.join(FIXTURES_DIR, 'packages/a'));\n\n    check(\n      await packageManager.resolve(\n        'a',\n        path.join(FIXTURES_DIR, 'has-foo/index.js'),\n        {shouldAutoInstall: true},\n      ),\n      {\n        pkg: {\n          name: 'a',\n        },\n        resolved: path.join(FIXTURES_DIR, 'has-foo/node_modules/a/index.js'),\n        type: 1,\n        invalidateOnFileChange: new Set([\n          path.join(FIXTURES_DIR, 'has-foo/package.json'),\n          path.join(FIXTURES_DIR, 'has-foo/node_modules/a/package.json'),\n        ]),\n        invalidateOnFileCreate: [\n          {\n            filePath: path.join(\n              FIXTURES_DIR,\n              'has-foo/node_modules/a/index.ts',\n            ),\n          },\n          {\n            filePath: path.join(\n              FIXTURES_DIR,\n              'has-foo/node_modules/a/index.tsx',\n            ),\n          },\n          {\n            fileName: 'node_modules/a',\n            aboveFilePath: path.join(FIXTURES_DIR, 'has-foo'),\n          },\n          {\n            fileName: 'tsconfig.json',\n            aboveFilePath: path.join(FIXTURES_DIR, 'has-foo'),\n          },\n        ],\n      },\n    );\n  });\n\n  it('does not autoinstall packages that are already listed in package.json', async () => {\n    packageInstaller.register('a', fs, path.join(FIXTURES_DIR, 'packages/a'));\n\n    // $FlowFixMe assert.rejects is Node 10+\n    await assert.rejects(\n      () =>\n        packageManager.resolve(\n          'a',\n          path.join(FIXTURES_DIR, 'has-a-not-yet-installed/index.js'),\n          {shouldAutoInstall: true},\n        ),\n      err => {\n        invariant(err instanceof ThrowableDiagnostic);\n        assert(err.message.includes('Run your package manager'));\n        return true;\n      },\n    );\n  });\n\n  it('does not autoinstall peer dependencies that are already listed in package.json', async () => {\n    packageInstaller.register(\n      'peers',\n      fs,\n      path.join(FIXTURES_DIR, 'packages/peers'),\n    );\n\n    let spy = sinon.spy(packageInstaller, 'install');\n    await packageManager.resolve(\n      'peers',\n      path.join(FIXTURES_DIR, 'has-foo/index.js'),\n      {shouldAutoInstall: true},\n    );\n    assert.deepEqual(spy.args, [\n      [\n        {\n          cwd: path.join(FIXTURES_DIR, 'has-foo'),\n          packagePath: path.join(FIXTURES_DIR, 'has-foo/package.json'),\n          fs,\n          saveDev: true,\n          modules: [{name: 'peers', range: undefined}],\n        },\n      ],\n    ]);\n  });\n\n  it('autoinstalls peer dependencies that are not listed in package.json', async () => {\n    packageInstaller.register(\n      'foo',\n      fs,\n      path.join(FIXTURES_DIR, 'packages/foo-2.0'),\n    );\n    packageInstaller.register(\n      'peers',\n      fs,\n      path.join(FIXTURES_DIR, 'packages/peers-2.0'),\n    );\n\n    let spy = sinon.spy(packageInstaller, 'install');\n    await packageManager.resolve(\n      'peers',\n      path.join(FIXTURES_DIR, 'empty/index.js'),\n      {shouldAutoInstall: true},\n    );\n    assert.deepEqual(spy.args, [\n      [\n        {\n          cwd: path.join(FIXTURES_DIR, 'empty'),\n          packagePath: path.join(FIXTURES_DIR, 'empty/package.json'),\n          fs,\n          saveDev: true,\n          modules: [{name: 'peers', range: undefined}],\n        },\n      ],\n      [\n        {\n          cwd: path.join(FIXTURES_DIR, 'empty'),\n          packagePath: path.join(FIXTURES_DIR, 'empty/package.json'),\n          fs,\n          saveDev: true,\n          modules: [{name: 'foo', range: '^2.0.0'}],\n        },\n      ],\n    ]);\n  });\n\n  describe('range mismatch', () => {\n    it(\"cannot autoinstall if there's a local requirement\", async () => {\n      packageManager.invalidate(\n        'foo',\n        path.join(FIXTURES_DIR, 'has-foo/index.js'),\n      );\n\n      // $FlowFixMe assert.rejects is Node 10+\n      await assert.rejects(\n        () =>\n          packageManager.resolve(\n            'foo',\n            path.join(FIXTURES_DIR, 'has-foo/index.js'),\n            {\n              range: '^2.0.0',\n            },\n          ),\n        err => {\n          invariant(err instanceof ThrowableDiagnostic);\n          assert.equal(\n            err.message,\n            'Could not find module \"foo\" satisfying ^2.0.0.',\n          );\n          return true;\n        },\n      );\n    });\n\n    it(\"can autoinstall into local package if there isn't a local requirement\", async () => {\n      packageInstaller.register(\n        'foo',\n        fs,\n        path.join(FIXTURES_DIR, 'packages/foo-2.0'),\n      );\n\n      let spy = sinon.spy(packageInstaller, 'install');\n      check(\n        await packageManager.resolve(\n          'foo',\n          path.join(FIXTURES_DIR, 'has-foo/subpackage/index.js'),\n          {\n            range: '^2.0.0',\n            shouldAutoInstall: true,\n          },\n        ),\n        {\n          pkg: {\n            name: 'foo',\n            version: '2.0.0',\n          },\n          resolved: path.join(\n            FIXTURES_DIR,\n            'has-foo/subpackage/node_modules/foo/index.js',\n          ),\n          type: 1,\n          invalidateOnFileChange: new Set([\n            path.join(FIXTURES_DIR, 'has-foo/subpackage/package.json'),\n            path.join(\n              FIXTURES_DIR,\n              'has-foo/subpackage/node_modules/foo/package.json',\n            ),\n          ]),\n          invalidateOnFileCreate: [\n            {\n              filePath: path.join(\n                FIXTURES_DIR,\n                'has-foo/subpackage/node_modules/foo/index.ts',\n              ),\n            },\n            {\n              filePath: path.join(\n                FIXTURES_DIR,\n                'has-foo/subpackage/node_modules/foo/index.tsx',\n              ),\n            },\n            {\n              fileName: 'node_modules/foo',\n              aboveFilePath: path.join(FIXTURES_DIR, 'has-foo/subpackage'),\n            },\n            {\n              fileName: 'tsconfig.json',\n              aboveFilePath: path.join(FIXTURES_DIR, 'has-foo/subpackage'),\n            },\n          ],\n        },\n      );\n\n      assert.deepEqual(spy.args, [\n        [\n          {\n            cwd: path.join(FIXTURES_DIR, 'has-foo/subpackage'),\n            packagePath: path.join(\n              FIXTURES_DIR,\n              'has-foo/subpackage/package.json',\n            ),\n            fs,\n            saveDev: true,\n            modules: [{name: 'foo', range: '^2.0.0'}],\n          },\n        ],\n      ]);\n    });\n\n    it(\"cannot autoinstall peer dependencies if there's an incompatible local requirement\", async () => {\n      packageManager.invalidate(\n        'peers',\n        path.join(FIXTURES_DIR, 'has-foo/index.js'),\n      );\n      packageInstaller.register(\n        'foo',\n        fs,\n        path.join(FIXTURES_DIR, 'packages/foo-2.0'),\n      );\n      packageInstaller.register(\n        'peers',\n        fs,\n        path.join(FIXTURES_DIR, 'packages/peers-2.0'),\n      );\n\n      // $FlowFixMe assert.rejects is Node 10+\n      await assert.rejects(\n        () =>\n          packageManager.resolve(\n            'peers',\n            path.join(FIXTURES_DIR, 'has-foo/index.js'),\n            {\n              range: '^2.0.0',\n              shouldAutoInstall: true,\n            },\n          ),\n        err => {\n          assert(err instanceof ThrowableDiagnostic);\n          assert.equal(\n            err.message,\n            'Could not install the peer dependency \"foo\" for \"peers\", installed version 1.1.0 is incompatible with ^2.0.0',\n          );\n          return true;\n        },\n      );\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/.gitignore",
    "content": "!has-foo/node_modules\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/empty/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/has-a-not-yet-installed/package.json",
    "content": "{\n  \"dependencies\": {\n    \"a\": \"1.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/has-foo/package.json",
    "content": "{\n  \"dependencies\": {\n    \"foo\": \"1.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/has-foo/subpackage/package.json",
    "content": "{}\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/packages/a/index.js",
    "content": "module.exports = 'a';\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/packages/a/package.json",
    "content": "{\n  \"name\": \"a\"\n}\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/packages/foo-2.0/index.js",
    "content": "module.exports = 'foo';\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/packages/foo-2.0/package.json",
    "content": "{\n  \"name\": \"foo\",\n  \"version\": \"2.0.0\"\n}\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/packages/peers/index.js",
    "content": "module.exports = 'foo';\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/packages/peers/package.json",
    "content": "{\n  \"name\": \"peers\",\n  \"version\": \"1.0.0\",\n  \"peerDependencies\": {\n    \"foo\": \"^1.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/packages/peers-2.0/index.js",
    "content": "module.exports = 'foo';\n"
  },
  {
    "path": "packages/core/package-manager/test/fixtures/packages/peers-2.0/package.json",
    "content": "{\n  \"name\": \"peers\",\n  \"version\": \"2.0.0\",\n  \"peerDependencies\": {\n    \"foo\": \"^2.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/package-manager/test/getCurrentPackageManager.test.js",
    "content": "// @flow\nimport assert from 'assert';\nimport getCurrentPackageManager from '../src/getCurrentPackageManager';\n\ndescribe('getCurrentPackageManager', () => {\n  it('yarn', () => {\n    const npm_config_user_agent = 'yarn/1.22.21 npm/? node/v21.1.0 darwin x64';\n    const currentPackageManager = getCurrentPackageManager(\n      npm_config_user_agent,\n    );\n    assert(currentPackageManager?.name, 'yarn');\n  });\n  it('npm', () => {\n    const npm_config_user_agent =\n      'npm/10.2.0 node/v21.1.0 darwin x64 workspaces/true';\n    const currentPackageManager = getCurrentPackageManager(\n      npm_config_user_agent,\n    );\n    assert(currentPackageManager?.name, 'npm');\n  });\n  it('pnpm', () => {\n    const npm_config_user_agent = 'pnpm/8.14.2 npm/? node/v18.17.1 darwin x64';\n    const currentPackageManager = getCurrentPackageManager(\n      npm_config_user_agent,\n    );\n    assert(currentPackageManager?.name, 'pnpm');\n  });\n});\n"
  },
  {
    "path": "packages/core/package-manager/test/validateModuleSpecifiers.test.js",
    "content": "// @flow\nimport assert from 'assert';\n\nimport validateModuleSpecifier from '../src/validateModuleSpecifier';\n\ndescribe('Validate Module Specifiers', () => {\n  it('Validate Module Specifiers', () => {\n    let modules = [\n      '@parcel/transformer-posthtml/package.json',\n      '@some-org/package@v1.0.0',\n      '@org/some-package@v1.0.0-alpha.1',\n      'something.js/something/index.js',\n      '@some.org/something.js/index.js',\n      'lodash/something/index.js',\n    ];\n\n    assert.deepEqual(\n      modules.map(module => validateModuleSpecifier(module)),\n      [\n        '@parcel/transformer-posthtml',\n        '@some-org/package@v1.0.0',\n        '@org/some-package@v1.0.0-alpha.1',\n        'something.js',\n        '@some.org/something.js',\n        'lodash',\n      ],\n    );\n  });\n\n  it('Return empty on invalid modules', () => {\n    let modules = ['./somewhere.js', './hello/world.js', '~/hello/world.js'];\n\n    assert.deepEqual(\n      modules.map(module => validateModuleSpecifier(module)),\n      ['', '', ''],\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/parcel/README.md",
    "content": "<p align=\"center\">\n  <a href=\"https://parceljs.org/\" target=\"_blank\">\n    <img alt=\"Parcel\" src=\"https://user-images.githubusercontent.com/19409/135924939-03845d0b-e7bb-414b-89b6-e627dfa9f614.png\" width=\"749\">\n  </a>\n</p>\n\n[![Backers on Open Collective](https://opencollective.com/parcel/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/parcel/sponsors/badge.svg)](#sponsors)\n[![Build Status](https://dev.azure.com/devongovett/devongovett/_apis/build/status/parcel-bundler.parcel?branchName=v2)](https://dev.azure.com/devongovett/devongovett/_build/latest?definitionId=1)\n[![npm package](https://img.shields.io/npm/v/parcel.svg)](https://www.npmjs.com/package/parcel)\n[![npm package](https://img.shields.io/npm/dm/parcel.svg)](https://www.npmjs.com/package/parcel)\n[![Discord](https://img.shields.io/discord/894288336095690753)](https://discord.gg/XSCzqGRuvr)\n[![Twitter Follow](https://img.shields.io/twitter/follow/parceljs.svg?style=social)](https://twitter.com/parceljs)\n\nParcel is a zero configuration build tool for the web. It combines a great out-of-the-box development experience with a scalable architecture that can take your project from just getting started to massive production application.\n\n## Features\n\n- 😍 **Zero config** – Parcel supports many languages and file types out of the box, from web technologies like HTML, CSS, and JavaScript, to assets like images, fonts, videos, and more. It has a built-in dev server with hot reloading, beautiful error diagnostics, and much more. No configuration needed!\n- ⚡️ **Lightning fast** – Parcel's JavaScript compiler is written in Rust for native performance. Your code is built in parallel using worker threads, utilizing all of the cores on your machine. Everything is cached, so you never build the same code twice. It's like using watch mode, but even when you restart Parcel!\n- 🚀 **Automatic production optimization** – Parcel optimizes your whole app for production automatically. This includes tree-shaking and minifying your JavaScript, CSS, and HTML, resizing and optimizing images, content hashing, automatic code splitting, and much more.\n- 🎯 **Ship for any target** – Parcel automatically transforms your code for your target environments. From modern and legacy browser support, to zero config JSX and TypeScript compilation, Parcel makes it easy to build for any target – or many!\n- 🌍 **Scalable** – Parcel requires zero configuration to get started. But as your application grows and your build requirements become more complex, it's possible to extend Parcel in just about every way. A simple configuration format and powerful plugin system that's designed from the ground up for performance means Parcel can support projects of any size.\n\n## Getting Started\n\nSee the following guides in our documentation on how to get started with Parcel.\n\n* [Building a webapp with Parcel](https://parceljs.org/getting-started/webapp/)\n* [Building a library with Parcel](https://parceljs.org/getting-started/library/)\n* [Migrating from Parcel v1](https://parceljs.org/getting-started/migration/)\n\n## Documentation\n\nRead the docs at https://parceljs.org/docs/.\n\n## Community\n\n- ❓ Ask questions on [GitHub Discussions](https://github.com/parcel-bundler/parcel/discussions).\n- 💬 Join the community on [Discord](https://discord.gg/XSCzqGRuvr).\n- 📣 Stay up to date on new features and announcements on [Twitter](https://twitter.com/parceljs).\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute]](CONTRIBUTING.md).\n<a href=\"https://github.com/parcel-bundler/parcel/graphs/contributors\"><img src=\"https://opencollective.com/parcel/contributors.svg?width=890\" title=\"contributors\" alt=\"contributors\" /></a>\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/parcel#backer)]\n\n<a href=\"https://opencollective.com/parcel#backers\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/backers.svg?width=890\"></a>\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/parcel#sponsor)]\n\n<a href=\"https://opencollective.com/parcel/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/3/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/4/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/4/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/5/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/5/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/6/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/6/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/7/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/7/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/8/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/8/avatar.svg\"></a>\n<a href=\"https://opencollective.com/parcel/sponsor/9/website\" target=\"_blank\"><img src=\"https://opencollective.com/parcel/sponsor/9/avatar.svg\"></a>\n"
  },
  {
    "path": "packages/core/parcel/package.json",
    "content": "{\n  \"name\": \"parcel\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"bin\": \"src/bin.js\",\n  \"main\": \"lib/bin.js\",\n  \"source\": \"src/bin.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"dependencies\": {\n    \"@parcel/config-default\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/events\": \"2.16.4\",\n    \"@parcel/feature-flags\": \"2.16.4\",\n    \"@parcel/fs\": \"2.16.4\",\n    \"@parcel/logger\": \"2.16.4\",\n    \"@parcel/package-manager\": \"2.16.4\",\n    \"@parcel/reporter-cli\": \"2.16.4\",\n    \"@parcel/reporter-dev-server\": \"2.16.4\",\n    \"@parcel/reporter-tracer\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"chalk\": \"^4.1.2\",\n    \"commander\": \"^12.1.0\",\n    \"get-port\": \"^4.2.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/core/parcel/src/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config\",\n  \"rules\": {\n    \"no-console\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/core/parcel/src/bin.js",
    "content": "#!/usr/bin/env node\n\n'use strict';\n\nif (\n  process.env.PARCEL_BUILD_ENV !== 'production' ||\n  process.env.PARCEL_SELF_BUILD\n) {\n  require('@parcel/babel-register');\n}\n\nrequire('./cli');\n"
  },
  {
    "path": "packages/core/parcel/src/cli.js",
    "content": "// @flow\n\nimport type {InitialParcelOptions} from '@parcel/types';\nimport {BuildError} from '@parcel/core';\nimport {NodeFS} from '@parcel/fs';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport {prettyDiagnostic, openInBrowser} from '@parcel/utils';\nimport {Disposable} from '@parcel/events';\nimport {INTERNAL_ORIGINAL_CONSOLE} from '@parcel/logger';\nimport chalk from 'chalk';\nimport commander from 'commander';\nimport path from 'path';\nimport getPort from 'get-port';\nimport {version} from '../package.json';\nimport {DEFAULT_FEATURE_FLAGS} from '@parcel/feature-flags';\n\nconst program = new commander.Command();\n\n// Exit codes in response to signals are traditionally\n// 128 + signal value\n// https://tldp.org/LDP/abs/html/exitcodes.html\nconst SIGINT_EXIT_CODE = 130;\n\nasync function logUncaughtError(e: mixed) {\n  if (e instanceof ThrowableDiagnostic) {\n    for (let diagnostic of e.diagnostics) {\n      let {message, codeframe, stack, hints, documentation} =\n        await prettyDiagnostic(diagnostic);\n      INTERNAL_ORIGINAL_CONSOLE.error(chalk.red(message));\n      if (codeframe || stack) {\n        INTERNAL_ORIGINAL_CONSOLE.error('');\n      }\n      INTERNAL_ORIGINAL_CONSOLE.error(codeframe);\n      INTERNAL_ORIGINAL_CONSOLE.error(stack);\n      if ((stack || codeframe) && hints.length > 0) {\n        INTERNAL_ORIGINAL_CONSOLE.error('');\n      }\n      for (let h of hints) {\n        INTERNAL_ORIGINAL_CONSOLE.error(chalk.blue(h));\n      }\n      if (documentation) {\n        INTERNAL_ORIGINAL_CONSOLE.error(chalk.magenta.bold(documentation));\n      }\n    }\n  } else {\n    INTERNAL_ORIGINAL_CONSOLE.error(e);\n  }\n\n  // A hack to definitely ensure we logged the uncaught exception\n  await new Promise(resolve => setTimeout(resolve, 100));\n}\n\nconst handleUncaughtException = async exception => {\n  try {\n    await logUncaughtError(exception);\n  } catch (err) {\n    console.error(exception);\n    console.error(err);\n  }\n\n  process.exit(1);\n};\n\nprocess.on('unhandledRejection', handleUncaughtException);\n\nprogram.storeOptionsAsProperties();\nprogram.version(version);\n\n// Only display choices available to callers OS\nlet watcherBackendChoices = ['brute-force'];\nswitch (process.platform) {\n  case 'darwin': {\n    watcherBackendChoices.push('watchman', 'fs-events');\n    break;\n  }\n  case 'linux': {\n    watcherBackendChoices.push('watchman', 'inotify');\n    break;\n  }\n  case 'win32': {\n    watcherBackendChoices.push('watchman', 'windows');\n    break;\n  }\n  case 'freebsd' || 'openbsd': {\n    watcherBackendChoices.push('watchman');\n    break;\n  }\n  default:\n    break;\n}\n\n// --no-cache, --cache-dir, --no-source-maps, --no-autoinstall, --global?, --public-url, --log-level\n// --no-content-hash, --experimental-scope-hoisting, --detailed-report\nconst commonOptions = {\n  '--no-cache': 'disable the filesystem cache',\n  '--config <path>':\n    'specify which config to use. can be a path or a package name',\n  '--cache-dir <path>': 'set the cache directory. defaults to \".parcel-cache\"',\n  '--watch-dir <path>':\n    'set the root watch directory. defaults to nearest lockfile or source control dir.',\n  '--watch-ignore [path]': [\n    `list of directories watcher should not be tracking for changes. defaults to ['.git', '.hg']`,\n    dirs => dirs.split(','),\n  ],\n  '--watch-backend': new commander.Option(\n    '--watch-backend <name>',\n    'set watcher backend',\n  ).choices(watcherBackendChoices),\n  '--no-source-maps': 'disable sourcemaps',\n  '--target [name]': [\n    'only build given target(s)',\n    (val, list) => list.concat([val]),\n    [],\n  ],\n  '--log-level <level>': new commander.Option(\n    '--log-level <level>',\n    'set the log level',\n  ).choices(['none', 'error', 'warn', 'info', 'verbose']),\n  '--dist-dir <dir>':\n    'output directory to write to when unspecified by targets',\n  '--no-autoinstall': 'disable autoinstall',\n  '--profile': 'enable sampling build profiling',\n  '--trace': 'enable build tracing',\n  '-V, --version': 'output the version number',\n  '--detailed-report [count]': [\n    'print the asset timings and sizes in the build report',\n    parseOptionInt,\n  ],\n  '--reporter <name>': [\n    'additional reporters to run',\n    (val, acc) => {\n      acc.push(val);\n      return acc;\n    },\n    [],\n  ],\n  '--feature-flag <name=value>': [\n    'sets the value of a feature flag',\n    (value, previousValue) => {\n      let [name, val] = value.split('=');\n      if (name in DEFAULT_FEATURE_FLAGS) {\n        let featureFlagValue;\n        if (typeof DEFAULT_FEATURE_FLAGS[name] === 'boolean') {\n          if (val !== 'true' && val !== 'false') {\n            throw new Error(\n              `Feature flag ${name} must be set to true or false`,\n            );\n          }\n          featureFlagValue = val === 'true';\n        }\n        previousValue[name] = featureFlagValue ?? String(val);\n      } else {\n        INTERNAL_ORIGINAL_CONSOLE.warn(\n          `Unknown feature flag ${name} specified, it will be ignored`,\n        );\n      }\n      return previousValue;\n    },\n    {},\n  ],\n};\n\nvar hmrOptions = {\n  '--no-hmr': 'disable hot module replacement',\n  '-p, --port <port>': [\n    'set the port to serve on. defaults to $PORT or 1234',\n    process.env.PORT,\n  ],\n  '--host <host>':\n    'set the host to listen on, defaults to listening on all interfaces',\n  '--https': 'serves files over HTTPS',\n  '--cert <path>': 'path to certificate to use with HTTPS',\n  '--key <path>': 'path to private key to use with HTTPS',\n  '--hmr-port <port>': ['hot module replacement port', process.env.HMR_PORT],\n  '--hmr-host <host>': ['hot module replacement host', process.env.HMR_HOST],\n  '--no-cors': 'disable cors',\n};\n\nfunction applyOptions(cmd, options) {\n  for (let opt in options) {\n    const option = options[opt];\n    if (option instanceof commander.Option) {\n      cmd.addOption(option);\n    } else {\n      cmd.option(opt, ...(Array.isArray(option) ? option : [option]));\n    }\n  }\n}\n\nlet serve = program\n  .command('serve [input...]')\n  .description('starts a development server')\n  .option('--public-url <url>', 'the path prefix for absolute urls')\n  .option(\n    '--open [browser]',\n    'automatically open in specified browser, defaults to default browser',\n  )\n  .option('--watch-for-stdin', 'exit when stdin closes')\n  .option(\n    '--lazy [includes]',\n    'Build async bundles on demand, when requested in the browser. Defaults to all async bundles, unless a comma separated list of source file globs is provided. Only async bundles whose entry points match these globs will be built lazily',\n  )\n  .option(\n    '--lazy-exclude <excludes>',\n    'Can only be used in combination with --lazy. Comma separated list of source file globs, async bundles whose entry points match these globs will not be built lazily',\n  )\n  .action(runCommand);\n\napplyOptions(serve, hmrOptions);\napplyOptions(serve, commonOptions);\n\nlet watch = program\n  .command('watch [input...]')\n  .description('starts the bundler in watch mode')\n  .option('--public-url <url>', 'the path prefix for absolute urls')\n  .option('--no-content-hash', 'disable content hashing')\n  .option('--watch-for-stdin', 'exit when stdin closes')\n  .action(runCommand);\n\napplyOptions(watch, hmrOptions);\napplyOptions(watch, commonOptions);\n\nlet build = program\n  .command('build [input...]')\n  .description('bundles for production')\n  .option('--no-optimize', 'disable minification')\n  .option('--no-scope-hoist', 'disable scope-hoisting')\n  .option('--public-url <url>', 'the path prefix for absolute urls')\n  .option('--no-content-hash', 'disable content hashing')\n  .action(runCommand);\n\napplyOptions(build, commonOptions);\n\nprogram\n  .command('help [command]')\n  .description('display help information for a command')\n  .action(function (command) {\n    let cmd = program.commands.find(c => c.name() === command) || program;\n    cmd.help();\n  });\n\nprogram.on('--help', function () {\n  INTERNAL_ORIGINAL_CONSOLE.log('');\n  INTERNAL_ORIGINAL_CONSOLE.log(\n    '  Run `' +\n      chalk.bold('parcel help <command>') +\n      '` for more information on specific commands',\n  );\n  INTERNAL_ORIGINAL_CONSOLE.log('');\n});\n\n// Override to output option description if argument was missing\n// $FlowFixMe[prop-missing]\ncommander.Command.prototype.optionMissingArgument = function (option) {\n  INTERNAL_ORIGINAL_CONSOLE.error(\n    \"error: option `%s' argument missing\",\n    option.flags,\n  );\n  INTERNAL_ORIGINAL_CONSOLE.log(program.createHelp().optionDescription(option));\n  process.exit(1);\n};\n\n// Make serve the default command except for --help\nvar args = process.argv;\nif (args[2] === '--help' || args[2] === '-h') args[2] = 'help';\n\nif (!args[2] || !program.commands.some(c => c.name() === args[2])) {\n  args.splice(2, 0, 'serve');\n}\n\nprogram.parse(args);\n\nfunction runCommand(...args) {\n  run(...args).catch(handleUncaughtException);\n}\n\nasync function run(\n  entries: Array<string>,\n  _opts: any, // using pre v7 Commander options as properties\n  command: any,\n) {\n  if (entries.length === 0) {\n    entries = ['.'];\n  }\n\n  entries = entries.map(entry => path.resolve(entry));\n\n  let Parcel = require('@parcel/core').default;\n  let fs = new NodeFS();\n  let options = await normalizeOptions(command, fs);\n  let parcel = new Parcel({\n    entries,\n    defaultConfig: require.resolve('@parcel/config-default', {\n      paths: [fs.cwd(), __dirname],\n    }),\n    shouldPatchConsole: false,\n    ...options,\n  });\n\n  let disposable = new Disposable();\n  let unsubscribe: () => Promise<mixed>;\n  let isExiting;\n  async function exit(exitCode: number = 0) {\n    if (isExiting) {\n      return;\n    }\n\n    isExiting = true;\n    if (unsubscribe != null) {\n      await unsubscribe();\n    } else if (parcel.isProfiling) {\n      await parcel.stopProfiling();\n    }\n\n    if (process.stdin.isTTY && process.stdin.isRaw) {\n      // $FlowFixMe\n      process.stdin.setRawMode(false);\n    }\n\n    disposable.dispose();\n    process.exit(exitCode);\n  }\n\n  const isWatching = command.name() === 'watch' || command.name() === 'serve';\n  if (process.stdin.isTTY) {\n    // $FlowFixMe\n    process.stdin.setRawMode(true);\n    require('readline').emitKeypressEvents(process.stdin);\n\n    let stream = process.stdin.on('keypress', async (char, key) => {\n      if (!key.ctrl) {\n        return;\n      }\n\n      switch (key.name) {\n        case 'c':\n          // Detect the ctrl+c key, and gracefully exit after writing the asset graph to the cache.\n          // This is mostly for tools that wrap Parcel as a child process like yarn and npm.\n          //\n          // Setting raw mode prevents SIGINT from being sent in response to ctrl-c:\n          // https://nodejs.org/api/tty.html#tty_readstream_setrawmode_mode\n          //\n          // We don't use the SIGINT event for this because when run inside yarn, the parent\n          // yarn process ends before Parcel and it appears that Parcel has ended while it may still\n          // be cleaning up. Handling events from stdin prevents this impression.\n          //\n          // When watching, a 0 success code is acceptable when Parcel is interrupted with ctrl-c.\n          // When building, fail with a code as if we received a SIGINT.\n          await exit(isWatching ? 0 : SIGINT_EXIT_CODE);\n          break;\n        case 'e':\n          await (parcel.isProfiling\n            ? parcel.stopProfiling()\n            : parcel.startProfiling());\n          break;\n        case 'y':\n          await parcel.takeHeapSnapshot();\n          break;\n      }\n    });\n\n    disposable.add(() => {\n      stream.destroy();\n    });\n  }\n\n  if (isWatching) {\n    ({unsubscribe} = await parcel.watch(err => {\n      if (err) {\n        throw err;\n      }\n    }));\n\n    if (command.open && options.serveOptions) {\n      await openInBrowser(\n        `${options.serveOptions.https ? 'https' : 'http'}://${\n          options.serveOptions.host || 'localhost'\n        }:${options.serveOptions.port}`,\n        command.open,\n      );\n    }\n\n    if (command.watchForStdin) {\n      process.stdin.on('end', async () => {\n        INTERNAL_ORIGINAL_CONSOLE.log('STDIN closed, ending');\n\n        await exit();\n      });\n      process.stdin.resume();\n    }\n\n    // In non-tty cases, respond to SIGINT by cleaning up. Since we're watching,\n    // a 0 success code is acceptable.\n    process.on('SIGINT', () => exit());\n    process.on('SIGTERM', () => exit());\n  } else {\n    try {\n      await parcel.run();\n    } catch (err) {\n      // If an exception is thrown during Parcel.build, it is given to reporters in a\n      // buildFailure event, and has been shown to the user.\n      if (!(err instanceof BuildError)) {\n        await logUncaughtError(err);\n      }\n      await exit(1);\n    }\n\n    await exit();\n  }\n}\n\nfunction parsePort(portValue: string): number {\n  let parsedPort = Number(portValue);\n\n  // Throw an error if port value is invalid...\n  if (!Number.isInteger(parsedPort)) {\n    throw new Error(`Port ${portValue} is not a valid integer.`);\n  }\n\n  return parsedPort;\n}\n\nfunction parseOptionInt(value) {\n  const parsedValue = parseInt(value, 10);\n  if (isNaN(parsedValue)) {\n    throw new commander.InvalidOptionArgumentError('Must be an integer.');\n  }\n  return parsedValue;\n}\n\nasync function normalizeOptions(\n  command,\n  inputFS,\n): Promise<InitialParcelOptions> {\n  let nodeEnv;\n  if (command.name() === 'build') {\n    nodeEnv = process.env.NODE_ENV || 'production';\n    // Autoinstall unless explicitly disabled or we detect a CI environment.\n    command.autoinstall = !(command.autoinstall === false || process.env.CI);\n  } else {\n    nodeEnv = process.env.NODE_ENV || 'development';\n  }\n\n  // Set process.env.NODE_ENV to a default if undefined so that it is\n  // available in JS configs and plugins.\n  process.env.NODE_ENV = nodeEnv;\n\n  let https = !!command.https;\n  if (command.cert && command.key) {\n    https = {\n      cert: command.cert,\n      key: command.key,\n    };\n  }\n\n  let serveOptions = false;\n  let {host} = command;\n\n  // Ensure port is valid and available\n  let port = parsePort(command.port || '1234');\n  let originalPort = port;\n  if (command.name() === 'serve' || command.hmr) {\n    try {\n      port = await getPort({port, host});\n    } catch (err) {\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: `Could not get available port: ${err.message}`,\n          origin: 'parcel',\n          stack: err.stack,\n        },\n      });\n    }\n\n    if (port !== originalPort) {\n      let errorMessage = `Port \"${originalPort}\" could not be used`;\n      if (command.port != null) {\n        // Throw the error if the user defined a custom port\n        throw new Error(errorMessage);\n      } else {\n        // Parcel logger is not set up at this point, so just use native INTERNAL_ORIGINAL_CONSOLE\n        INTERNAL_ORIGINAL_CONSOLE.warn(errorMessage);\n      }\n    }\n  }\n\n  if (command.name() === 'serve') {\n    let {publicUrl, cors} = command;\n\n    serveOptions = {\n      https,\n      port,\n      host,\n      publicUrl,\n      cors,\n    };\n  }\n\n  let hmrOptions = null;\n  if (command.name() !== 'build' && command.hmr !== false) {\n    let hmrport = command.hmrPort ? parsePort(command.hmrPort) : port;\n    let hmrhost = command.hmrHost ? command.hmrHost : host;\n\n    hmrOptions = {\n      port: hmrport,\n      host: hmrhost,\n      cors: command.cors,\n    };\n  }\n\n  if (command.detailedReport === true) {\n    command.detailedReport = '10';\n  }\n\n  let additionalReporters = [\n    {packageName: '@parcel/reporter-cli', resolveFrom: __filename},\n    ...(command.reporter: Array<string>).map(packageName => ({\n      packageName,\n      resolveFrom: path.join(inputFS.cwd(), 'index'),\n    })),\n  ];\n\n  if (command.trace) {\n    additionalReporters.unshift({\n      packageName: '@parcel/reporter-tracer',\n      resolveFrom: __filename,\n    });\n  }\n\n  let mode = command.name() === 'build' ? 'production' : 'development';\n\n  const normalizeIncludeExcludeList = (input?: string): string[] => {\n    if (typeof input !== 'string') return [];\n    return input.split(',').map(value => value.trim());\n  };\n\n  return {\n    shouldDisableCache: command.cache === false,\n    cacheDir: command.cacheDir,\n    watchDir: command.watchDir,\n    watchBackend: command.watchBackend,\n    watchIgnore: command.watchIgnore,\n    config: command.config,\n    mode,\n    hmrOptions,\n    shouldContentHash: hmrOptions ? false : command.contentHash,\n    serveOptions,\n    targets: command.target.length > 0 ? command.target : null,\n    shouldAutoInstall: command.autoinstall ?? true,\n    logLevel: command.logLevel,\n    shouldProfile: command.profile,\n    shouldTrace: command.trace,\n    shouldBuildLazily: typeof command.lazy !== 'undefined',\n    lazyIncludes: normalizeIncludeExcludeList(command.lazy),\n    lazyExcludes: normalizeIncludeExcludeList(command.lazyExclude),\n    shouldBundleIncrementally:\n      process.env.PARCEL_INCREMENTAL_BUNDLING === 'false' ? false : true,\n    detailedReport:\n      command.detailedReport != null\n        ? {\n            assetsPerBundle: parseInt(command.detailedReport, 10),\n          }\n        : null,\n    env: {\n      NODE_ENV: nodeEnv,\n    },\n    additionalReporters,\n    defaultTargetOptions: {\n      shouldOptimize:\n        command.optimize != null ? command.optimize : mode === 'production',\n      sourceMaps: command.sourceMaps ?? true,\n      shouldScopeHoist: command.scopeHoist,\n      publicUrl: command.publicUrl,\n      distDir: command.distDir,\n    },\n    featureFlags: command.featureFlag,\n  };\n}\n"
  },
  {
    "path": "packages/core/plugin/package.json",
    "content": "{\n  \"name\": \"@parcel/plugin\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/PluginAPI.js\",\n  \"source\": \"src/PluginAPI.js\",\n  \"types\": \"src/PluginAPI.d.ts\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"scripts\": {\n    \"check-ts\": \"tsc --noEmit src/PluginAPI.d.ts\"\n  },\n  \"dependencies\": {\n    \"@parcel/types\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/core/plugin/src/PluginAPI.d.ts",
    "content": "import type {\n  Transformer as TransformerOpts,\n  Resolver as ResolverOpts,\n  Bundler as BundlerOpts,\n  Namer as NamerOpts,\n  Runtime as RuntimeOpts,\n  Packager as PackagerOpts,\n  Optimizer as OptimizerOpts,\n  Compressor as CompressorOpts,\n  Reporter as ReporterOpts,\n  Validator as ValidatorOpts,\n} from '@parcel/types';\n\nexport declare class Transformer<T> {\n  constructor(opts: TransformerOpts<T>);\n}\n\nexport declare class Resolver<T> {\n  constructor(opts: ResolverOpts<T>);\n}\n\nexport declare class Bundler<T> {\n  constructor(opts: BundlerOpts<T>);\n}\n\nexport declare class Namer<T> {\n  constructor(opts: NamerOpts<T>);\n}\n\nexport declare class Runtime<T> {\n  constructor(opts: RuntimeOpts<T>);\n}\n\nexport declare class Validator<T> {\n  constructor(opts: ValidatorOpts);\n}\n\nexport declare class Packager<C, B> {\n  constructor(opts: PackagerOpts<C, B>);\n}\n\nexport declare class Optimizer<C, B> {\n  constructor(opts: OptimizerOpts<C, B>);\n}\n\nexport declare class Compressor {\n  constructor(opts: CompressorOpts);\n}\n\nexport declare class Reporter {\n  constructor(opts: ReporterOpts);\n}\n"
  },
  {
    "path": "packages/core/plugin/src/PluginAPI.js",
    "content": "// @flow strict-local\n\nimport type {\n  Transformer as TransformerOpts,\n  Resolver as ResolverOpts,\n  Bundler as BundlerOpts,\n  Namer as NamerOpts,\n  Runtime as RuntimeOpts,\n  Packager as PackagerOpts,\n  Optimizer as OptimizerOpts,\n  Compressor as CompressorOpts,\n  Reporter as ReporterOpts,\n  Validator as ValidatorOpts,\n} from '@parcel/types';\n\nconst CONFIG = Symbol.for('parcel-plugin-config');\n\nexport class Transformer {\n  constructor<T>(opts: TransformerOpts<T>) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n\nexport class Resolver {\n  constructor<T>(opts: ResolverOpts<T>) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n\nexport class Bundler {\n  constructor<T>(opts: BundlerOpts<T>) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n\nexport class Namer {\n  constructor<T>(opts: NamerOpts<T>) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n\nexport class Runtime {\n  constructor<T>(opts: RuntimeOpts<T>) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n\nexport class Validator {\n  constructor(opts: ValidatorOpts) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n\nexport class Packager {\n  constructor<T, U>(opts: PackagerOpts<T, U>) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n\nexport class Optimizer {\n  constructor<T, U>(opts: OptimizerOpts<T, U>) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n\nexport class Compressor {\n  constructor(opts: CompressorOpts) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n\nexport class Reporter {\n  constructor(opts: ReporterOpts) {\n    // $FlowFixMe\n    this[CONFIG] = opts;\n  }\n}\n"
  },
  {
    "path": "packages/core/profiler/build-ts.js",
    "content": "const fs = require('fs');\n\nlet contents = fs.readFileSync(__dirname + '/lib/Tracer.d.ts', 'utf8');\n\n// Some fixups of typescript output\ncontents = contents.replace(/^\\s*#private;\\s*$/gm, '');\n\nfs.writeFileSync(__dirname + '/lib/Tracer.d.ts', contents);\n"
  },
  {
    "path": "packages/core/profiler/package.json",
    "content": "{\n  \"name\": \"@parcel/profiler\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"scripts\": {\n    \"build-ts\": \"flow-to-ts src/*.js --write && rm -f './src/*.d.ts' && tsc --emitDeclarationOnly --declaration --esModuleInterop --target es2015 --moduleResolution node16 --module node16 src/*.ts && mkdir -p lib && mv src/*.d.ts lib/. && rm src/*.ts && node build-ts.js\",\n    \"check-ts\": \"tsc --noEmit lib/index.d.ts\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/events\": \"2.16.4\",\n    \"@parcel/types-internal\": \"2.16.4\",\n    \"chrome-trace-event\": \"^1.0.2\"\n  }\n}\n"
  },
  {
    "path": "packages/core/profiler/src/SamplingProfiler.js",
    "content": "// @flow\nimport type {Session} from 'inspector';\nimport invariant from 'assert';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\n\n// https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-Profile\nexport type Profile = {|\n  nodes: Array<ProfileNode>,\n  startTime: number,\n  endTime: number,\n  samples?: Array<number>,\n  timeDeltas?: Array<number>,\n|};\n\n// https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ProfileNode\ntype ProfileNode = {|\n  id: number,\n  callFrame: CallFrame,\n  hitCount?: number,\n  children?: Array<number>,\n  deoptReason?: string,\n  positionTicks?: PositionTickInfo,\n|};\n\n// https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-CallFrame\ntype CallFrame = {|\n  functionName: string,\n  scriptId: string,\n  url: string,\n  lineNumber: string,\n  columnNumber: string,\n|};\n\n// https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-PositionTickInfo\ntype PositionTickInfo = {|\n  line: number,\n  ticks: number,\n|};\n\nexport default class SamplingProfiler {\n  session: Session;\n\n  startProfiling(): Promise<mixed> {\n    let inspector;\n    try {\n      inspector = require('inspector');\n    } catch (err) {\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: `The inspector module isn't available`,\n          origin: '@parcel/workers',\n          hints: ['Disable build profiling'],\n        },\n      });\n    }\n\n    this.session = new inspector.Session();\n    this.session.connect();\n\n    return Promise.all([\n      this.sendCommand('Profiler.setSamplingInterval', {\n        interval: 100,\n      }),\n      this.sendCommand('Profiler.enable'),\n      this.sendCommand('Profiler.start'),\n    ]);\n  }\n\n  sendCommand(\n    method: string,\n    params?: {...},\n  ): Promise<{profile: Profile, ...}> {\n    invariant(this.session != null);\n    return new Promise((resolve, reject) => {\n      this.session.post(method, params, (err, p) => {\n        if (err == null) {\n          resolve((p: {profile: Profile, ...}));\n        } else {\n          reject(err);\n        }\n      });\n    });\n  }\n\n  destroy() {\n    if (this.session != null) {\n      this.session.disconnect();\n    }\n  }\n\n  async stopProfiling(): Promise<Profile> {\n    let res = await this.sendCommand('Profiler.stop');\n    this.destroy();\n    return res.profile;\n  }\n}\n"
  },
  {
    "path": "packages/core/profiler/src/Trace.js",
    "content": "// @flow\nimport type {Profile} from './SamplingProfiler';\nimport type {Writable} from 'stream';\nimport {Tracer} from 'chrome-trace-event';\n\nexport default class Trace {\n  tracer: Tracer;\n  tid: number;\n  eventId: number;\n\n  constructor() {\n    this.tracer = new Tracer();\n    this.tid = 0;\n    this.eventId = 0;\n  }\n\n  getEventId(): number {\n    return this.eventId++;\n  }\n\n  init(ts: number) {\n    this.tracer.instantEvent({\n      name: 'TracingStartedInPage',\n      id: this.getEventId(),\n      ts,\n      cat: ['disabled-by-default-devtools.timeline'],\n      args: {\n        data: {\n          sessionId: '-1',\n          page: '0xfff',\n          frames: [\n            {\n              frame: '0xfff',\n              url: 'parcel',\n              name: '',\n            },\n          ],\n        },\n      },\n    });\n\n    this.tracer.instantEvent({\n      name: 'TracingStartedInBrowser',\n      id: this.getEventId(),\n      ts,\n      cat: ['disabled-by-default-devtools.timeline'],\n      args: {\n        data: {\n          sessionId: '-1',\n        },\n      },\n    });\n  }\n\n  addCPUProfile(name: string, profile: Profile) {\n    if (this.eventId === 0) {\n      this.init(profile.startTime);\n    }\n    const trace = this.tracer;\n    const tid = this.tid;\n    this.tid++;\n\n    const cpuStartTime = profile.startTime;\n    const cpuEndTime = profile.endTime;\n\n    trace.instantEvent({\n      tid,\n      id: this.getEventId(),\n      cat: ['toplevel'],\n      name: 'TaskQueueManager::ProcessTaskFromWorkQueue',\n      args: {\n        src_file: '../../ipc/ipc_moji_bootstrap.cc',\n        src_func: 'Accept',\n      },\n      ts: cpuStartTime,\n    });\n\n    trace.completeEvent({\n      tid,\n      name: 'EvaluateScript',\n      id: this.getEventId(),\n      cat: ['devtools.timeline'],\n      ts: cpuStartTime,\n      dur: cpuEndTime - cpuStartTime,\n      args: {\n        data: {\n          url: 'parcel',\n          lineNumber: 1,\n          columnNumber: 1,\n          frame: '0xFFF',\n        },\n      },\n    });\n\n    trace.instantEvent({\n      tid,\n      ts: 0,\n      ph: 'M',\n      cat: ['__metadata'],\n      name: 'thread_name',\n      args: {name},\n    });\n\n    trace.instantEvent({\n      tid,\n      name: 'CpuProfile',\n      id: this.getEventId(),\n      cat: ['disabled-by-default-devtools.timeline'],\n      ts: cpuEndTime,\n      args: {\n        data: {\n          cpuProfile: profile,\n        },\n      },\n    });\n  }\n\n  pipe(writable: Writable): Writable {\n    return this.tracer.pipe(writable);\n  }\n\n  flush() {\n    this.tracer.push(null);\n  }\n}\n"
  },
  {
    "path": "packages/core/profiler/src/Tracer.js",
    "content": "// @flow strict-local\n\nimport type {\n  TraceEvent,\n  IDisposable,\n  PluginTracer as IPluginTracer,\n} from '@parcel/types';\nimport type {\n  TraceMeasurement as ITraceMeasurement,\n  TraceMeasurementData,\n} from './types';\n// @ts-ignore\nimport {ValueEmitter} from '@parcel/events';\n\nimport {performance} from 'perf_hooks';\n\nlet tid;\ntry {\n  tid = require('worker_threads').threadId;\n} catch {\n  tid = 0;\n}\n\nconst pid = process.pid;\n\nclass TraceMeasurement implements ITraceMeasurement {\n  #active: boolean = true;\n  #name: string;\n  #pid: number;\n  #tid: number;\n  #start: number;\n  // $FlowFixMe\n  #data: any;\n  constructor(tracer: Tracer, name, pid, tid, data) {\n    this.#name = name;\n    this.#pid = pid;\n    this.#tid = tid;\n    this.#start = performance.now();\n    this.#data = data;\n  }\n\n  end() {\n    if (!this.#active) return;\n    const duration = performance.now() - this.#start;\n    tracer.trace({\n      type: 'trace',\n      name: this.#name,\n      pid: this.#pid,\n      tid: this.#tid,\n      duration,\n      ts: this.#start,\n      ...this.#data,\n    });\n    this.#active = false;\n  }\n}\n\nexport default class Tracer {\n  #traceEmitter: ValueEmitter<TraceEvent> = new ValueEmitter();\n\n  #enabled: boolean = false;\n\n  onTrace(cb: (event: TraceEvent) => mixed): IDisposable {\n    return this.#traceEmitter.addListener(cb);\n  }\n\n  async wrap(name: string, fn: () => mixed): Promise<void> {\n    let measurement = this.createMeasurement(name);\n    try {\n      await fn();\n    } finally {\n      measurement && measurement.end();\n    }\n  }\n\n  createMeasurement(\n    name: string,\n    category: string = 'Core',\n    argumentName?: string,\n    otherArgs?: {[key: string]: mixed},\n  ): ITraceMeasurement | null {\n    if (!this.enabled) return null;\n\n    // We create `args` in a fairly verbose way to avoid object\n    // allocation where not required.\n    let args: {[key: string]: mixed};\n    if (typeof argumentName === 'string') {\n      args = {name: argumentName};\n    }\n    if (typeof otherArgs === 'object') {\n      if (typeof args == 'undefined') {\n        args = {};\n      }\n      for (const [k, v] of Object.entries(otherArgs)) {\n        args[k] = v;\n      }\n    }\n\n    const data: TraceMeasurementData = {\n      categories: [category],\n      args,\n    };\n\n    return new TraceMeasurement(this, name, pid, tid, data);\n  }\n\n  get enabled(): boolean {\n    return this.#enabled;\n  }\n\n  enable(): void {\n    this.#enabled = true;\n  }\n\n  disable(): void {\n    this.#enabled = false;\n  }\n\n  trace(event: TraceEvent): void {\n    if (!this.#enabled) return;\n    this.#traceEmitter.emit(event);\n  }\n}\n\nexport const tracer: Tracer = new Tracer();\n\ntype TracerOpts = {|\n  origin: string,\n  category: string,\n|};\nexport class PluginTracer implements IPluginTracer {\n  /** @private */\n  origin: string;\n\n  /** @private */\n  category: string;\n\n  /** @private */\n  constructor(opts: TracerOpts) {\n    this.origin = opts.origin;\n    this.category = opts.category;\n  }\n\n  get enabled(): boolean {\n    return tracer.enabled;\n  }\n\n  createMeasurement(\n    name: string,\n    category?: string,\n    argumentName?: string,\n    otherArgs?: {[key: string]: mixed},\n  ): ITraceMeasurement | null {\n    return tracer.createMeasurement(\n      name,\n      `${this.category}:${this.origin}${\n        typeof category === 'string' ? `:${category}` : ''\n      }`,\n      argumentName,\n      otherArgs,\n    );\n  }\n}\n"
  },
  {
    "path": "packages/core/profiler/src/index.js",
    "content": "// @flow\nexport {default as SamplingProfiler} from './SamplingProfiler';\nexport {default as Trace} from './Trace';\nexport {tracer, PluginTracer} from './Tracer';\nexport type {TraceMeasurement, TraceMeasurementData} from './types';\n"
  },
  {
    "path": "packages/core/profiler/src/types.js",
    "content": "// @flow\n\nexport type {TraceMeasurement} from '@parcel/types-internal';\n\nexport type TraceMeasurementData = {|\n  +categories: string[],\n  +args?: {[key: string]: mixed},\n|};\n"
  },
  {
    "path": "packages/core/profiler/test/Tracer.test.js",
    "content": "import {tracer, PluginTracer} from '../src/Tracer';\nimport sinon from 'sinon';\nimport assert from 'assert';\n\ndescribe('Tracer', () => {\n  let onTrace;\n  let traceDisposable;\n  beforeEach(() => {\n    onTrace = sinon.spy();\n    traceDisposable = tracer.onTrace(onTrace);\n    tracer.enable();\n  });\n  afterEach(() => {\n    traceDisposable.dispose();\n  });\n\n  it('returns no measurement when disabled', () => {\n    tracer.disable();\n    const measurement = tracer.createMeasurement('test');\n    assert(measurement == null);\n    assert(onTrace.notCalled);\n  });\n  it('emits a basic trace event', () => {\n    const measurement = tracer.createMeasurement('test');\n    measurement.end();\n    sinon.assert.calledWith(\n      onTrace,\n      sinon.match({\n        type: 'trace',\n        name: 'test',\n        args: undefined,\n        duration: sinon.match.number,\n      }),\n    );\n  });\n  it('emits a complex trace event', () => {\n    const measurement = tracer.createMeasurement('test', 'myPlugin', 'aaargh', {\n      extra: 'data',\n    });\n    measurement.end();\n    sinon.assert.calledWith(\n      onTrace,\n      sinon.match({\n        type: 'trace',\n        name: 'test',\n        categories: ['myPlugin'],\n        args: {extra: 'data', name: 'aaargh'},\n        duration: sinon.match.number,\n      }),\n    );\n  });\n  it('calling end twice on measurment should be a no-op', () => {\n    const measurement = tracer.createMeasurement('test');\n    measurement.end();\n    measurement.end();\n    sinon.assert.calledOnce(onTrace);\n  });\n\n  describe('PluginTracer', () => {\n    it('emits events with proper origin/category', () => {\n      const pluginTracer = new PluginTracer({\n        origin: 'origin',\n        category: 'cat',\n      });\n      const measurement = pluginTracer.createMeasurement('test', 'customCat');\n      measurement.end();\n      sinon.assert.calledWith(\n        onTrace,\n        sinon.match({\n          type: 'trace',\n          name: 'test',\n          categories: ['cat:origin:customCat'],\n          duration: sinon.match.number,\n        }),\n      );\n    });\n  });\n});\n"
  },
  {
    "path": "packages/core/register/example/.gitignore",
    "content": "yarn.lock\n!node_modules\n"
  },
  {
    "path": "packages/core/register/example/count.js",
    "content": "// @flow\n\nmodule.exports = function(a: number, b: number): number {\n  return a + b;\n};\n"
  },
  {
    "path": "packages/core/register/example/index.js",
    "content": "require('../');\n\nconst count = require('./count.js');\nconst number = require('./number.js');\nconst something = require('something');\n\nconst numberOne = number();\nconst numberTwo = number();\n\n/* eslint-disable no-console */\nconsole.log(`${numberOne} + ${numberTwo} =`, count(numberOne, numberTwo));\nconsole.log(something());\n/* eslint-enable */\n"
  },
  {
    "path": "packages/core/register/example/node_modules/something/index.js",
    "content": "module.exports = function() {\n  return 'something';\n}\n"
  },
  {
    "path": "packages/core/register/example/node_modules/something/package.json",
    "content": "{\n  \"name\": \"something\",\n  \"main\": \"index.js\",\n  \"version\": \"1.0.0\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/core/register/example/number.js",
    "content": "module.exports = function() {\n  return Math.ceil(Math.random() * 100);\n};\n"
  },
  {
    "path": "packages/core/register/example/package.json",
    "content": "{\n  \"name\": \"register-example\",\n  \"version\": \"2.0.0-beta.1\",\n  \"main\": \"./index.js\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"start\": \"node ./index.js\"\n  },\n  \"dependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"something\": \"1.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/register/package.json",
    "content": "{\n  \"name\": \"@parcel/register\",\n  \"version\": \"2.16.4\",\n  \"private\": true,\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/register.js\",\n  \"source\": \"src/register.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"scripts\": {\n    \"run-example\": \"node ./example/index.js\",\n    \"clean\": \"rimraf .parcel-cache\"\n  },\n  \"dependencies\": {\n    \"@parcel/config-default\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/fs\": \"2.16.4\",\n    \"@parcel/package-manager\": \"2.16.4\",\n    \"pirates\": \"^4.0.7\"\n  }\n}\n"
  },
  {
    "path": "packages/core/register/src/register.js",
    "content": "// @flow strict-local\n\nimport type {IDisposable, InitialParcelOptions} from '@parcel/types';\n\nimport {NodePackageManager} from '@parcel/package-manager';\nimport {NodeFS} from '@parcel/fs';\n// flowlint-next-line untyped-import:off\nimport defaultConfigContents from '@parcel/config-default';\n// $FlowFixMe Flow can't resolve this\nimport Module from 'module';\nimport path from 'path';\nimport {addHook} from 'pirates';\nimport Parcel, {INTERNAL_RESOLVE, INTERNAL_TRANSFORM} from '@parcel/core';\n\nimport syncPromise from './syncPromise';\n\nlet hooks = {};\nlet lastDisposable;\nlet packageManager = new NodePackageManager(new NodeFS(), '/');\nlet defaultConfig = {\n  ...defaultConfigContents,\n  filePath: packageManager.resolveSync('@parcel/config-default', __filename)\n    .resolved,\n};\n\nfunction register(inputOpts?: InitialParcelOptions): IDisposable {\n  let opts: InitialParcelOptions = {\n    ...defaultConfig,\n    ...(inputOpts || {}),\n  };\n\n  // Replace old hook, as this one likely contains options.\n  if (lastDisposable) {\n    lastDisposable.dispose();\n  }\n\n  let parcel = new Parcel({\n    logLevel: 'error',\n    ...opts,\n  });\n\n  let env = {\n    context: 'node',\n    engines: {\n      node: process.versions.node,\n    },\n  };\n\n  syncPromise(parcel._init());\n\n  let isProcessing = false;\n\n  // As Parcel is pretty much fully asynchronous, create an async function and wrap it in a syncPromise later...\n  async function fileProcessor(code, filePath) {\n    if (isProcessing) {\n      return code;\n    }\n\n    try {\n      isProcessing = true;\n      // $FlowFixMe\n      let result = await parcel[INTERNAL_TRANSFORM]({\n        filePath,\n        env,\n      });\n\n      if (result.assets && result.assets.length >= 1) {\n        let output = '';\n        let asset = result.assets.find(a => a.type === 'js');\n        if (asset) {\n          output = await asset.getCode();\n        }\n        return output;\n      }\n    } catch (e) {\n      /* eslint-disable no-console */\n      console.error('@parcel/register failed to process: ', filePath);\n      console.error(e);\n      /* eslint-enable */\n    } finally {\n      isProcessing = false;\n    }\n\n    return '';\n  }\n\n  let hookFunction = (...args) => syncPromise(fileProcessor(...args));\n\n  function resolveFile(currFile, targetFile) {\n    try {\n      isProcessing = true;\n\n      let resolved = syncPromise(\n        // $FlowFixMe\n        parcel[INTERNAL_RESOLVE]({\n          specifier: targetFile,\n          sourcePath: currFile,\n          env,\n        }),\n      );\n\n      let targetFileExtension = path.extname(resolved);\n      if (!hooks[targetFileExtension]) {\n        hooks[targetFileExtension] = addHook(hookFunction, {\n          exts: [targetFileExtension],\n          ignoreNodeModules: false,\n        });\n      }\n\n      return resolved;\n    } finally {\n      isProcessing = false;\n    }\n  }\n\n  hooks.js = addHook(hookFunction, {\n    exts: ['.js'],\n    ignoreNodeModules: false,\n  });\n\n  let disposed;\n\n  // Patching Module._resolveFilename takes care of patching the underlying\n  // resolver in both `require` and `require.resolve`:\n  // https://github.com/nodejs/node-v0.x-archive/issues/1125#issuecomment-10748203\n  // $FlowFixMe[prop-missing]\n  const originalResolveFilename = Module._resolveFilename;\n  // $FlowFixMe[prop-missing]\n  Module._resolveFilename = function parcelResolveFilename(to, from, ...rest) {\n    return isProcessing || disposed\n      ? originalResolveFilename(to, from, ...rest)\n      : resolveFile(from?.filename, to);\n  };\n\n  let disposable = (lastDisposable = {\n    dispose() {\n      if (disposed) {\n        return;\n      }\n\n      for (let extension in hooks) {\n        hooks[extension]();\n      }\n\n      disposed = true;\n    },\n  });\n\n  return disposable;\n}\n\nlet disposable: IDisposable = register();\nregister.dispose = (): mixed => disposable.dispose();\n\n// Support both commonjs and ES6 modules\nmodule.exports = register;\nexports.default = register;\nexports.__esModule = true;\n"
  },
  {
    "path": "packages/core/register/src/syncPromise.js",
    "content": "// @flow strict-local\n\nimport deasync from 'deasync';\n\n/**\n * Synchronously waits for a promise to return by\n * yielding to the node event loop as needed.\n */\nexport default function syncPromise<T>(promise: Promise<T>): T {\n  let isDone = false;\n  let res, err;\n\n  promise.then(\n    value => {\n      res = value;\n      isDone = true;\n    },\n    error => {\n      err = error;\n      isDone = true;\n    },\n  );\n\n  deasync.loopWhile(() => !isDone);\n\n  if (err) {\n    throw err;\n  }\n\n  // $FlowFixMe this is valid since we wait using deasync above\n  return res;\n}\n"
  },
  {
    "path": "packages/core/rust/.gitignore",
    "content": "*.node\n*.wasm\n!*.flow\n"
  },
  {
    "path": "packages/core/rust/index.d.ts",
    "content": "/* tslint:disable */\n/* eslint-disable */\n\n/* auto-generated by NAPI-RS */\n\nexport interface JsMacroError {\n  kind: number;\n  message: string;\n}\nexport declare function findAncestorFile(\n  filenames: Array<string>,\n  from: string,\n  root: string,\n): string | null;\nexport declare function findFirstFile(names: Array<string>): string | null;\nexport declare function findNodeModule(\n  module: string,\n  from: string,\n): string | null;\nexport declare function hashString(s: string): string;\nexport declare function hashBuffer(buf: Buffer): string;\nexport declare function optimizeImage(kind: string, buf: Buffer): Buffer;\nexport declare function transformHtml(opts: object): unknown;\nexport declare function packageHtml(opts: object): unknown;\nexport declare function optimizeHtml(opts: object): unknown;\nexport declare function transformSvg(opts: object): unknown;\nexport declare function packageSvg(opts: object): unknown;\nexport declare function optimizeSvg(opts: object): unknown;\nexport declare function svgReact(opts: object): unknown;\nexport interface JsFileSystemOptions {\n  read: (...args: any[]) => any;\n  readLink: (...args: any[]) => any;\n  kind: (...args: any[]) => any;\n  includeNodeModules?: NapiSideEffectsVariants;\n}\nexport interface FileSystem {\n  fs?: JsFileSystemOptions;\n  includeNodeModules?: NapiSideEffectsVariants;\n  conditions?: number;\n  moduleDirResolver?: (...args: any[]) => any;\n  mode: number;\n  entries?: number;\n  extensions?: Array<string>;\n  packageExports: boolean;\n  typescript?: boolean;\n}\nexport interface ResolveOptions {\n  filename: string;\n  specifierType: string;\n  parent: string;\n  packageConditions?: Array<string>;\n}\nexport interface FilePathCreateInvalidation {\n  filePath: string;\n}\nexport interface FileNameCreateInvalidation {\n  fileName: string;\n  aboveFilePath: string;\n}\nexport interface GlobCreateInvalidation {\n  glob: string;\n}\nexport interface ResolveResult {\n  resolution: unknown;\n  invalidateOnFileChange: Array<string>;\n  invalidateOnFileCreate: Array<\n    | FilePathCreateInvalidation\n    | FileNameCreateInvalidation\n    | GlobCreateInvalidation\n  >;\n  query?: string;\n  sideEffects: boolean;\n  error: unknown;\n  moduleType: number;\n}\nexport interface JsInvalidations {\n  invalidateOnFileChange: Array<string>;\n  invalidateOnFileCreate: Array<\n    | FilePathCreateInvalidation\n    | FileNameCreateInvalidation\n    | GlobCreateInvalidation\n  >;\n  invalidateOnStartup: boolean;\n}\nexport declare function transform(opts: object): unknown;\nexport declare function transformAsync(opts: object): object;\nexport declare class Hash {\n  constructor();\n  writeString(s: string): void;\n  writeBuffer(buf: Buffer): void;\n  finish(): string;\n}\nexport declare class Resolver {\n  constructor(projectRoot: string, options: FileSystem);\n  resolve(options: ResolveOptions): ResolveResult;\n  resolveAsync(): object;\n  resolveAsync(options: ResolveOptions): object;\n  getInvalidations(path: string): JsInvalidations;\n  getInvalidations(path: string): JsInvalidations;\n}\n"
  },
  {
    "path": "packages/core/rust/index.js",
    "content": "/* tslint:disable */\n/* eslint-disable */\n/* prettier-ignore */\n\n/* auto-generated by NAPI-RS */\n\nconst { existsSync, readFileSync } = require('fs')\nconst {join} = require('path');\n\nconst {platform, arch} = process;\n\nlet nativeBinding = null;\nlet localFileExisted = false;\nlet loadError = null;\n\nfunction isMusl() {\n  // For Node 10\n  if (!process.report || typeof process.report.getReport !== 'function') {\n    try {\n      const lddPath = require('child_process')\n        .execSync('which ldd')\n        .toString()\n        .trim();\n      return readFileSync(lddPath, 'utf8').includes('musl');\n    } catch (e) {\n      return true;\n    }\n  } else {\n    const {glibcVersionRuntime} = process.report.getReport().header;\n    return !glibcVersionRuntime;\n  }\n}\n\nswitch (platform) {\n  case 'android':\n    switch (arch) {\n      case 'arm64':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.android-arm64.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.android-arm64.node');\n          } else {\n            nativeBinding = require('@parcel/rust-android-arm64');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      case 'arm':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.android-arm-eabi.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.android-arm-eabi.node');\n          } else {\n            nativeBinding = require('@parcel/rust-android-arm-eabi');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      default:\n        throw new Error(`Unsupported architecture on Android ${arch}`);\n    }\n    break;\n  case 'win32':\n    switch (arch) {\n      case 'x64':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.win32-x64-msvc.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.win32-x64-msvc.node');\n          } else {\n            nativeBinding = require('@parcel/rust-win32-x64-msvc');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      case 'ia32':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.win32-ia32-msvc.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.win32-ia32-msvc.node');\n          } else {\n            nativeBinding = require('@parcel/rust-win32-ia32-msvc');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      case 'arm64':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.win32-arm64-msvc.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.win32-arm64-msvc.node');\n          } else {\n            nativeBinding = require('@parcel/rust-win32-arm64-msvc');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      default:\n        throw new Error(`Unsupported architecture on Windows: ${arch}`);\n    }\n    break;\n  case 'darwin':\n    localFileExisted = existsSync(\n      join(__dirname, 'parcel-node-bindings.darwin-universal.node'),\n    );\n    try {\n      if (localFileExisted) {\n        nativeBinding = require('./parcel-node-bindings.darwin-universal.node');\n      } else {\n        nativeBinding = require('@parcel/rust-darwin-universal');\n      }\n      break;\n    } catch {}\n    switch (arch) {\n      case 'x64':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.darwin-x64.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.darwin-x64.node');\n          } else {\n            nativeBinding = require('@parcel/rust-darwin-x64');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      case 'arm64':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.darwin-arm64.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.darwin-arm64.node');\n          } else {\n            nativeBinding = require('@parcel/rust-darwin-arm64');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      default:\n        throw new Error(`Unsupported architecture on macOS: ${arch}`);\n    }\n    break;\n  case 'freebsd':\n    if (arch !== 'x64') {\n      throw new Error(`Unsupported architecture on FreeBSD: ${arch}`);\n    }\n    localFileExisted = existsSync(\n      join(__dirname, 'parcel-node-bindings.freebsd-x64.node'),\n    );\n    try {\n      if (localFileExisted) {\n        nativeBinding = require('./parcel-node-bindings.freebsd-x64.node');\n      } else {\n        nativeBinding = require('@parcel/rust-freebsd-x64');\n      }\n    } catch (e) {\n      loadError = e;\n    }\n    break;\n  case 'linux':\n    switch (arch) {\n      case 'x64':\n        if (isMusl()) {\n          localFileExisted = existsSync(\n            join(__dirname, 'parcel-node-bindings.linux-x64-musl.node'),\n          );\n          try {\n            if (localFileExisted) {\n              nativeBinding = require('./parcel-node-bindings.linux-x64-musl.node');\n            } else {\n              nativeBinding = require('@parcel/rust-linux-x64-musl');\n            }\n          } catch (e) {\n            loadError = e;\n          }\n        } else {\n          localFileExisted = existsSync(\n            join(__dirname, 'parcel-node-bindings.linux-x64-gnu.node'),\n          );\n          try {\n            if (localFileExisted) {\n              nativeBinding = require('./parcel-node-bindings.linux-x64-gnu.node');\n            } else {\n              nativeBinding = require('@parcel/rust-linux-x64-gnu');\n            }\n          } catch (e) {\n            loadError = e;\n          }\n        }\n        break;\n      case 'arm64':\n        if (isMusl()) {\n          localFileExisted = existsSync(\n            join(__dirname, 'parcel-node-bindings.linux-arm64-musl.node'),\n          );\n          try {\n            if (localFileExisted) {\n              nativeBinding = require('./parcel-node-bindings.linux-arm64-musl.node');\n            } else {\n              nativeBinding = require('@parcel/rust-linux-arm64-musl');\n            }\n          } catch (e) {\n            loadError = e;\n          }\n        } else {\n          localFileExisted = existsSync(\n            join(__dirname, 'parcel-node-bindings.linux-arm64-gnu.node'),\n          );\n          try {\n            if (localFileExisted) {\n              nativeBinding = require('./parcel-node-bindings.linux-arm64-gnu.node');\n            } else {\n              nativeBinding = require('@parcel/rust-linux-arm64-gnu');\n            }\n          } catch (e) {\n            loadError = e;\n          }\n        }\n        break;\n      case 'arm':\n        if (isMusl()) {\n          localFileExisted = existsSync(\n            join(__dirname, 'parcel-node-bindings.linux-arm-musleabihf.node'),\n          );\n          try {\n            if (localFileExisted) {\n              nativeBinding = require('./parcel-node-bindings.linux-arm-musleabihf.node');\n            } else {\n              nativeBinding = require('@parcel/rust-linux-arm-musleabihf');\n            }\n          } catch (e) {\n            loadError = e;\n          }\n        } else {\n          localFileExisted = existsSync(\n            join(__dirname, 'parcel-node-bindings.linux-arm-gnueabihf.node'),\n          );\n          try {\n            if (localFileExisted) {\n              nativeBinding = require('./parcel-node-bindings.linux-arm-gnueabihf.node');\n            } else {\n              nativeBinding = require('@parcel/rust-linux-arm-gnueabihf');\n            }\n          } catch (e) {\n            loadError = e;\n          }\n        }\n        break;\n      case 'riscv64':\n        if (isMusl()) {\n          localFileExisted = existsSync(\n            join(__dirname, 'parcel-node-bindings.linux-riscv64-musl.node'),\n          );\n          try {\n            if (localFileExisted) {\n              nativeBinding = require('./parcel-node-bindings.linux-riscv64-musl.node');\n            } else {\n              nativeBinding = require('@parcel/rust-linux-riscv64-musl');\n            }\n          } catch (e) {\n            loadError = e;\n          }\n        } else {\n          localFileExisted = existsSync(\n            join(__dirname, 'parcel-node-bindings.linux-riscv64-gnu.node'),\n          );\n          try {\n            if (localFileExisted) {\n              nativeBinding = require('./parcel-node-bindings.linux-riscv64-gnu.node');\n            } else {\n              nativeBinding = require('@parcel/rust-linux-riscv64-gnu');\n            }\n          } catch (e) {\n            loadError = e;\n          }\n        }\n        break;\n      case 's390x':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.linux-s390x-gnu.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.linux-s390x-gnu.node');\n          } else {\n            nativeBinding = require('@parcel/rust-linux-s390x-gnu');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      default:\n        throw new Error(`Unsupported architecture on Linux: ${arch}`);\n    }\n    break;\n  default:\n    throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`);\n}\n\nif (!nativeBinding) {\n  if (loadError) {\n    throw loadError;\n  }\n  throw new Error(`Failed to load native binding`);\n}\n\nconst {\n  findAncestorFile,\n  findFirstFile,\n  findNodeModule,\n  hashString,\n  hashBuffer,\n  Hash,\n  optimizeImage,\n  transformHtml,\n  packageHtml,\n  optimizeHtml,\n  transformSvg,\n  packageSvg,\n  optimizeSvg,\n  svgReact,\n  Resolver,\n  transform,\n  transformAsync,\n} = nativeBinding;\n\nmodule.exports.findAncestorFile = findAncestorFile;\nmodule.exports.findFirstFile = findFirstFile;\nmodule.exports.findNodeModule = findNodeModule;\nmodule.exports.hashString = hashString;\nmodule.exports.hashBuffer = hashBuffer;\nmodule.exports.Hash = Hash;\nmodule.exports.optimizeImage = optimizeImage;\nmodule.exports.transformHtml = transformHtml;\nmodule.exports.packageHtml = packageHtml;\nmodule.exports.optimizeHtml = optimizeHtml;\nmodule.exports.transformSvg = transformSvg;\nmodule.exports.packageSvg = packageSvg;\nmodule.exports.optimizeSvg = optimizeSvg;\nmodule.exports.svgReact = svgReact;\nmodule.exports.Resolver = Resolver;\nmodule.exports.transform = transform;\nmodule.exports.transformAsync = transformAsync;\n"
  },
  {
    "path": "packages/core/rust/index.js.flow",
    "content": "// @flow\nimport type {FileCreateInvalidation, SpecifierType, DependencyPriority, EnvironmentContext, JSONObject, SourceLocation, OutputFormat, SourceType} from '@parcel/types';\nimport type {Diagnostic} from '@parcel/diagnostic';\n\ndeclare export var init: void | (() => void);\n\ndeclare export function findAncestorFile(\n  filenames: Array<string>,\n  from: string,\n  root: string,\n): string | null;\ndeclare export function findFirstFile(names: Array<string>): string | null;\ndeclare export function findNodeModule(\n  module: string,\n  from: string,\n): string | null;\ndeclare export function hashString(s: string): string;\ndeclare export function hashBuffer(buf: Buffer): string;\ndeclare export function optimizeImage(kind: string, buf: Buffer): Buffer;\ndeclare export function transformHtml(opts: TransformHtmlOpts): TransformHtmlResult;\ndeclare export function packageHtml(opts: PackageHtmlOpts): PackageHtmlResult;\ndeclare export function optimizeHtml(opts: OptimizeHtmlOpts): PackageHtmlResult;\ndeclare export function transformSvg(opts: TransformHtmlOpts): TransformHtmlResult;\ndeclare export function packageSvg(opts: PackageHtmlOpts): PackageHtmlResult;\ndeclare export function optimizeSvg(opts: OptimizeHtmlOpts): PackageHtmlResult;\ndeclare export function svgReact(opts: OptimizeHtmlOpts): PackageHtmlResult;\nexport interface JsFileSystemOptions {\n  readLink: string => string;\n  read: string => Buffer;\n  kind: string => number;\n  includeNodeModules?: boolean | Array<string> | {|[string]: boolean|};\n}\nexport interface FileSystem {\n  fs?: JsFileSystemOptions,\n  includeNodeModules?: boolean | Array<string> | {|[string]: boolean|};\n  conditions?: number,\n  moduleDirResolver?: (...args: any[]) => any,\n  mode: number,\n  entries?: number,\n  extensions?: Array<string>,\n  packageExports: boolean\n}\nexport interface ResolveOptions {\n  filename: string;\n  specifierType: string;\n  parent: string;\n  packageConditions?: Array<string>;\n}\nexport type Resolution =\n  | {|type: 'Path', value: string|}\n  | {|type: 'Builtin', value: {|scheme: string, module: string|}|}\n  | {|type: 'External'|}\n  | {|type: 'Empty'|}\n  | {|type: 'Global', value: string|};\n\nexport interface ResolveResult {\n  resolution: Resolution;\n  invalidateOnFileChange: Array<string>;\n  invalidateOnFileCreate: Array<FileCreateInvalidation>;\n  query?: string;\n  sideEffects: boolean;\n  error: mixed;\n  moduleType: number;\n}\nexport interface JsInvalidations {\n  invalidateOnFileChange: Array<string>;\n  invalidateOnFileCreate: Array<FileCreateInvalidation>;\n  invalidateOnStartup: boolean;\n}\ndeclare export function transform(opts: any): any;\ndeclare export function transformAsync(opts: any): Promise<any>;\ndeclare export class Hash {\n  writeString(s: string): void;\n  writeBuffer(b: Buffer): void;\n  finish(): string;\n}\nexport interface ResolverOptions {\n  fs?: JsFileSystemOptions;\n  includeNodeModules?: boolean | Array<string> | {|[string]: boolean|};\n  conditions?: number;\n  moduleDirResolver?: (...args: any[]) => any;\n  mode: number;\n  entries?: number;\n  extensions?: Array<string>;\n}\ndeclare export class Resolver {\n  constructor(projectRoot: string, options: ResolverOptions): Resolver;\n  resolve(options: ResolveOptions): ResolveResult;\n  resolveAsync(options: ResolveOptions): Promise<ResolveResult>;\n  getInvalidations(path: string): JsInvalidations;\n}\n\nexport interface TransformHtmlOpts {\n  code: Buffer,\n  filePath: string,\n  env: RustEnvironment,\n  hmr: boolean\n}\n\nexport interface TransformHtmlResult {\n  code: Buffer,\n  dependencies: RustDependency[],\n  assets: RustAsset[],\n  errors: Diagnostic[]\n}\n\nexport interface RustEnvironment {\n  context: EnvironmentContext,\n  outputFormat: OutputFormat,\n  sourceType: SourceType,\n  flags: number,\n  sourceMap: ?any,\n  loc: ?SourceLocation,\n  includeNodeModules: any,\n  engines: any\n}\n\nexport interface RustDependency {\n  specifier: string,\n  specifierType: SpecifierType,\n  flags: number,\n  priority: DependencyPriority,\n  bundleBehavior: 'none' | 'isolated' | 'inline',\n  env: RustEnvironment,\n  loc: ?SourceLocation,\n  placeholder: ?string,\n  resolveFrom: ?string,\n  range: ?string\n}\n\nexport interface RustAsset {\n  loc: ?SourceLocation,\n  type: string,\n  content: Buffer,\n  env: RustEnvironment,\n  uniqueKey: string,\n  flags: number,\n  bundleBehavior: 'none' | 'isolated' | 'inline'\n}\n\nexport interface PackageHtmlOpts {\n  code: Buffer,\n  bundles: HtmlBundleReference[],\n  inlineBundles: {[string]: HtmlInlineBundle},\n  importMap: JSONObject\n}\n\nexport type HtmlBundleReference =\n  | {|type: 'StyleSheet', value: {|href: string|}|}\n  | {|type: 'Script', value: {|src: string, module: boolean, nomodule: boolean|}|};\n\nexport interface HtmlInlineBundle {\n  contents: string,\n  module: boolean\n}\n\nexport interface PackageHtmlResult {\n  code: Buffer\n}\n\nexport interface OptimizeHtmlOpts {\n  code: Buffer,\n  config: any,\n}\n"
  },
  {
    "path": "packages/core/rust/package.json",
    "content": "{\n  \"name\": \"@parcel/rust\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"source\": \"src/index.js\",\n  \"main\": \"lib/index.js\",\n  \"browser\": \"src/browser.js\",\n  \"napi\": {\n    \"name\": \"parcel-node-bindings\"\n  },\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"files\": [\n    \"lib/*.js\",\n    \"browser.js\",\n    \"index.d.ts\",\n    \"index.js\",\n    \"index.js.flow\",\n    \"*.node\",\n    \"*.wasm\"\n  ],\n  \"devDependencies\": {\n    \"@napi-rs/cli\": \"^2.15.2\",\n    \"napi-wasm\": \"^1.1.3\"\n  },\n  \"peerDependencies\": {\n    \"napi-wasm\": \"^1.1.2\"\n  },\n  \"peerDependenciesMeta\": {\n    \"napi-wasm\": {\n      \"optional\": true\n    }\n  },\n  \"optionalDependencies\": {\n    \"@parcel/rust-darwin-arm64\": \"2.16.4\",\n    \"@parcel/rust-darwin-x64\": \"2.16.4\",\n    \"@parcel/rust-linux-arm-gnueabihf\": \"2.16.4\",\n    \"@parcel/rust-linux-arm64-gnu\": \"2.16.4\",\n    \"@parcel/rust-linux-arm64-musl\": \"2.16.4\",\n    \"@parcel/rust-linux-x64-gnu\": \"2.16.4\",\n    \"@parcel/rust-linux-x64-musl\": \"2.16.4\",\n    \"@parcel/rust-win32-x64-msvc\": \"2.16.4\"\n  },\n  \"scripts\": {\n    \"build\": \"napi build --platform --cargo-cwd ../../../crates/node-bindings\",\n    \"build-canary\": \"napi build --platform --profile canary --cargo-cwd ../../../crates/node-bindings\",\n    \"build-release\": \"napi build --platform --release --cargo-cwd ../../../crates/node-bindings\",\n    \"wasm:build\": \"cargo build -p parcel-node-bindings --target wasm32-unknown-unknown && cp ../../../target/wasm32-unknown-unknown/debug/parcel_node_bindings.wasm .\",\n    \"wasm:build-release\": \"CARGO_PROFILE_RELEASE_LTO=true cargo build -p parcel-node-bindings --target wasm32-unknown-unknown --release && wasm-opt --strip-debug -O ../../../target/wasm32-unknown-unknown/release/parcel_node_bindings.wasm -o parcel_node_bindings.wasm\"\n  }\n}\n"
  },
  {
    "path": "packages/core/rust/src/browser.js",
    "content": "const {Environment, napi} = require('napi-wasm');\nconst utils = require('./utils');\n\nlet env;\nmodule.exports.init = async function init(input) {\n  if (env) return;\n\n  input = input ?? new URL('parcel_node_bindings.wasm', import.meta.url);\n  const {instance} = await WebAssembly.instantiateStreaming(fetch(input), {\n    env: {\n      ...napi,\n      __getrandom_custom: (ptr, len) => {\n        let buf = env.memory.subarray(ptr, ptr + len);\n        crypto.getRandomValues(buf);\n      },\n      log: (ptr, len) => {\n        // eslint-disable-next-line no-console\n        console.log(env.getString(ptr, len));\n      },\n    },\n  });\n\n  // input =\n  //   input ?? require('path').join(__dirname, 'parcel_node_bindings.wasm');\n  // const {instance} = await WebAssembly.instantiate(\n  //   require('fs').readFileSync(input),\n  //   {\n  //     env: napi,\n  //   },\n  // );\n\n  for (let key in instance.exports) {\n    if (key.startsWith('__napi_register__')) {\n      instance.exports[key]();\n    }\n  }\n\n  env = new Environment(instance);\n\n  for (let key in env.exports) {\n    if (key !== 'transform') {\n      module.exports[key] = env.exports[key];\n    }\n  }\n  module.exports.transform = function (config) {\n    let result = env.exports.transform(config);\n    return {\n      ...result,\n      // Hydrate Uint8Array into Buffer\n      code: Buffer.from(result.code),\n    };\n  };\n\n  Object.assign(module.exports, utils);\n  env.exports.initPanicHook();\n};\n"
  },
  {
    "path": "packages/core/rust/src/index.js",
    "content": "// @flow\nexport * from '../index';\nexport * from './utils';\n"
  },
  {
    "path": "packages/core/rust/src/utils.js",
    "content": "// @flow\nimport type {\n  Environment,\n  EnvironmentOptions,\n  DependencyOptions,\n  TransformerResult,\n} from '@parcel/types';\nimport type {RustEnvironment, RustDependency, RustAsset} from '../';\n\nconst IS_LIBRARY = 1 << 0;\nconst SHOULD_OPTIMIZE = 1 << 1;\nconst SHOULD_SCOPE_HOIST = 1 << 2;\n\nexport function envToRust(env: Environment): RustEnvironment {\n  let flags = 0;\n  if (env.isLibrary) {\n    flags |= IS_LIBRARY;\n  }\n  if (env.shouldOptimize) {\n    flags |= SHOULD_OPTIMIZE;\n  }\n  if (env.shouldScopeHoist) {\n    flags |= SHOULD_SCOPE_HOIST;\n  }\n  return {\n    context: env.context,\n    outputFormat: env.outputFormat,\n    sourceType: env.sourceType,\n    flags,\n    sourceMap: null,\n    loc: null,\n    includeNodeModules: env.includeNodeModules,\n    engines: env.engines,\n  };\n}\n\nexport function envFromRust(env: RustEnvironment): EnvironmentOptions {\n  return {\n    context: env.context,\n    outputFormat: env.outputFormat,\n    sourceType: env.sourceType,\n    isLibrary: Boolean(env.flags & IS_LIBRARY),\n    shouldOptimize: Boolean(env.flags & SHOULD_OPTIMIZE),\n    shouldScopeHoist: Boolean(env.flags & SHOULD_SCOPE_HOIST),\n    sourceMap: env.sourceMap,\n    loc: env.loc,\n    includeNodeModules: env.includeNodeModules,\n    engines: undefined, // ignore for now\n  };\n}\n\n// const ENTRY    = 1 << 0;\nconst OPTIONAL = 1 << 1;\nconst NEEDS_STABLE_NAME = 1 << 2;\n// const SHOULD_WRAP = 1 << 3;\n// const IS_ESM = 1 << 4;\n// const IS_WEBWORKER = 1 << 5;\n// const HAS_SYMBOLS = 1 << 6;\n\nexport function dependencyFromRust(dep: RustDependency): DependencyOptions {\n  return {\n    specifier: dep.specifier,\n    specifierType: dep.specifierType,\n    priority: dep.priority,\n    bundleBehavior:\n      dep.bundleBehavior === 'none' ? undefined : dep.bundleBehavior,\n    isOptional: Boolean(dep.flags & OPTIONAL),\n    needsStableName: Boolean(dep.flags & NEEDS_STABLE_NAME),\n    env: envFromRust(dep.env),\n    loc: dep.loc,\n    meta: {\n      placeholder: dep.placeholder,\n    },\n    resolveFrom: dep.resolveFrom,\n    range: dep.range,\n  };\n}\n\n// const IS_SOURCE = 1 << 0;\n// const SIDE_EFFECTS = 1 << 1;\n// const IS_BUNDLE_SPLITTABLE = 1 << 2;\n// const LARGE_BLOB = 1 << 3;\n// const HAS_CJS_EXPORTS = 1 << 4;\n// const STATIC_EXPORTS = 1 << 5;\n// const SHOULD_WRAP = 1 << 6;\n// const IS_CONSTANT_MODULE = 1 << 7;\n// const HAS_NODE_REPLACEMENTS = 1 << 8;\n// const HAS_SYMBOLS = 1 << 9;\nconst IS_HTML_ATTR = 1 << 10;\nconst IS_HTML_TAG = 1 << 11;\n\nexport function assetFromRust(asset: RustAsset): TransformerResult {\n  let meta = {};\n  if (asset.flags & IS_HTML_ATTR) {\n    meta.type = 'attr';\n  }\n  if (asset.flags & IS_HTML_TAG) {\n    meta.type = 'tag';\n  }\n  if (asset.loc) {\n    meta.startLine = asset.loc.start.line;\n  }\n  return {\n    type: asset.type,\n    content: asset.content,\n    uniqueKey: asset.uniqueKey,\n    bundleBehavior:\n      asset.bundleBehavior === 'none' ? undefined : asset.bundleBehavior,\n    env: envFromRust(asset.env),\n    // isBundleSplittable: Boolean(asset.flags & IS_BUNDLE_SPLITTABLE),\n    // sideEffects\n    meta,\n  };\n}\n"
  },
  {
    "path": "packages/core/rust-darwin-arm64/package.json",
    "content": "{\n  \"name\": \"@parcel/rust-darwin-arm64\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"os\": [\n    \"darwin\"\n  ],\n  \"cpu\": [\n    \"arm64\"\n  ],\n  \"main\": \"parcel-node-bindings.darwin-arm64.node\",\n  \"files\": [\n    \"parcel-node-bindings.darwin-arm64.node\"\n  ],\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/rust-darwin-x64/package.json",
    "content": "{\n  \"name\": \"@parcel/rust-darwin-x64\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"os\": [\n    \"darwin\"\n  ],\n  \"cpu\": [\n    \"x64\"\n  ],\n  \"main\": \"parcel-node-bindings.darwin-x64.node\",\n  \"files\": [\n    \"parcel-node-bindings.darwin-x64.node\"\n  ],\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/rust-linux-arm-gnueabihf/package.json",
    "content": "{\n  \"name\": \"@parcel/rust-linux-arm-gnueabihf\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"os\": [\n    \"linux\"\n  ],\n  \"cpu\": [\n    \"arm\"\n  ],\n  \"main\": \"parcel-node-bindings.linux-arm-gnueabihf.node\",\n  \"files\": [\n    \"parcel-node-bindings.linux-arm-gnueabihf.node\"\n  ],\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/rust-linux-arm64-gnu/package.json",
    "content": "{\n  \"name\": \"@parcel/rust-linux-arm64-gnu\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"os\": [\n    \"linux\"\n  ],\n  \"cpu\": [\n    \"arm64\"\n  ],\n  \"libc\": [\n    \"glibc\"\n  ],\n  \"main\": \"parcel-node-bindings.linux-arm64-gnu.node\",\n  \"files\": [\n    \"parcel-node-bindings.linux-arm64-gnu.node\"\n  ],\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/rust-linux-arm64-musl/package.json",
    "content": "{\n  \"name\": \"@parcel/rust-linux-arm64-musl\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"os\": [\n    \"linux\"\n  ],\n  \"cpu\": [\n    \"arm64\"\n  ],\n  \"libc\": [\n    \"musl\"\n  ],\n  \"main\": \"parcel-node-bindings.linux-arm64-musl.node\",\n  \"files\": [\n    \"parcel-node-bindings.linux-arm64-musl.node\"\n  ],\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/rust-linux-x64-gnu/package.json",
    "content": "{\n  \"name\": \"@parcel/rust-linux-x64-gnu\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"os\": [\n    \"linux\"\n  ],\n  \"cpu\": [\n    \"x64\"\n  ],\n  \"libc\": [\n    \"glibc\"\n  ],\n  \"main\": \"parcel-node-bindings.linux-x64-gnu.node\",\n  \"files\": [\n    \"parcel-node-bindings.linux-x64-gnu.node\"\n  ],\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/rust-linux-x64-musl/package.json",
    "content": "{\n  \"name\": \"@parcel/rust-linux-x64-musl\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"os\": [\n    \"linux\"\n  ],\n  \"cpu\": [\n    \"x64\"\n  ],\n  \"libc\": [\n    \"musl\"\n  ],\n  \"main\": \"parcel-node-bindings.linux-x64-musl.node\",\n  \"files\": [\n    \"parcel-node-bindings.linux-x64-musl.node\"\n  ],\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/rust-win32-x64-msvc/package.json",
    "content": "{\n  \"name\": \"@parcel/rust-win32-x64-msvc\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"os\": [\n    \"win32\"\n  ],\n  \"cpu\": [\n    \"x64\"\n  ],\n  \"main\": \"parcel-node-bindings.win32-x64-msvc.node\",\n  \"files\": [\n    \"parcel-node-bindings.win32-x64-msvc.node\"\n  ],\n  \"engines\": {\n    \"node\": \">= 10\"\n  }\n}\n"
  },
  {
    "path": "packages/core/test-utils/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config\",\n  \"env\": {\n    \"mocha\": true\n  }\n}\n"
  },
  {
    "path": "packages/core/test-utils/.gitignore",
    "content": "lib\n"
  },
  {
    "path": "packages/core/test-utils/package.json",
    "content": "{\n  \"name\": \"@parcel/test-utils\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"src/utils.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"dependencies\": {\n    \"@parcel/config-default\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/fs\": \"2.16.4\",\n    \"@parcel/package-manager\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"chalk\": \"^4.1.2\",\n    \"ncp\": \"^2.0.0\",\n    \"nullthrows\": \"^1.1.1\",\n    \"posthtml\": \"^0.16.6\",\n    \"posthtml-parser\": \"^0.12.1\",\n    \"resolve\": \"^1.22.10\",\n    \"ws\": \"^8.18.2\"\n  }\n}\n"
  },
  {
    "path": "packages/core/test-utils/src/.babelrc",
    "content": "{\n  \"presets\": [\n    [\n      \"@babel/preset-env\",\n      {\n        \"targets\": {\n          \"node\": \"6\"\n        }\n      }\n    ]\n  ],\n  \"plugins\": [\"@babel/plugin-transform-runtime\"]\n}\n"
  },
  {
    "path": "packages/core/test-utils/src/.parcelrc-no-reporters",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"reporters\": []\n}\n"
  },
  {
    "path": "packages/core/test-utils/src/fsFixture.js",
    "content": "// @flow strict-local\n\nimport type {FileSystem} from '@parcel/fs';\n\nimport assert from 'assert';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\n\ntype FixtureToken = {|type: string, value: string|};\n\ntype Fixture = FixtureRoot | FixtureChild;\ntype FixtureChild = FixtureDir | FixtureFile | FixtureLink;\n\nexport function fsFixture(\n  fs: FileSystem,\n  cwd: string = fs.cwd(),\n): (\n  strings: Array<string>,\n  ...exprs: Array<\n    null | string | number | boolean | interface {} | $ReadOnlyArray<mixed>,\n  >\n) => Promise<void> {\n  return async function apply(strings, ...exprs) {\n    let src = dedentRaw(strings, ...exprs);\n    let tokens = new FixtureTokenizer(src).tokenize();\n    let fixture = new FixtureParser(tokens).parse();\n    await applyFixture(fs, fixture, cwd);\n  };\n}\n\ndeclare function toFixture(\n  fs: FileSystem,\n  dir?: string,\n): Promise<FixtureRoot | FixtureDir>;\n\n// eslint-disable-next-line no-redeclare\ndeclare function toFixture(\n  fs: FileSystem,\n  dir: string,\n  includeDir?: boolean,\n): Promise<FixtureRoot | FixtureDir>;\n\n// eslint-disable-next-line no-redeclare\ndeclare function toFixture<T>(\n  fs: FileSystem,\n  dir: string,\n  parent: T,\n): Promise<T>;\n\nconst DISALLOWED_FILETYPES = new Set([\n  '.crt',\n  '.gitkeep',\n  '.gif',\n  '.jpeg',\n  '.jpg',\n  '.pem',\n  '.png',\n  '.webp',\n]);\n\nconst MAX_FILE_SIZE = 1000;\n\n// eslint-disable-next-line no-redeclare\nexport async function toFixture(\n  fs: FileSystem,\n  dir: string = fs.cwd(),\n  fixtureOrIncludeDir?: FixtureRoot | FixtureDir | boolean = false,\n) {\n  let fixture: FixtureRoot | FixtureDir;\n  if (fixtureOrIncludeDir == null || typeof fixtureOrIncludeDir === 'boolean') {\n    fixture = new FixtureRoot();\n    if (fixtureOrIncludeDir) {\n      fixture.children.push(\n        await toFixture(fs, dir, new FixtureDir(path.basename(dir))),\n      );\n      return fixture;\n    }\n  } else {\n    fixture = nullthrows(fixtureOrIncludeDir);\n  }\n\n  assert(\n    (await fs.stat(dir)).isDirectory(),\n    `Expected ${dir} to be a directory`,\n  );\n\n  for (let dirent of await fs.readdir(dir, {withFileTypes: true})) {\n    let name = dirent.name;\n    let filepath = path.join(dir, name);\n    if (dirent.isSymbolicLink()) {\n      // FIXME: `realpath` is not the correct behavior here,\n      // but Parcel fs doesn't define `readlink.\n      let target = await fs.realpath(filepath);\n      fixture.children.push(new FixtureLink(name, toPosixPath(target)));\n    } else if (dirent.isFile()) {\n      if (DISALLOWED_FILETYPES.has(path.extname(dirent.name))) {\n        throw new Error(`Disallowed file type: ${name}`);\n      }\n\n      let size = (await fs.stat(filepath)).size;\n      if (size > MAX_FILE_SIZE) {\n        throw new Error(`File too large: ${name}`);\n      }\n\n      let content = escapeFixtureContent(await fs.readFile(filepath, 'utf8'));\n      fixture.children.push(new FixtureFile(name, content));\n    } else if (dirent.isDirectory()) {\n      fixture.children.push(\n        await toFixture(fs, filepath, new FixtureDir(name)),\n      );\n    } else {\n      throw new Error(`Unknown file type: ${name}`);\n    }\n  }\n  return fixture;\n}\n\nexport async function applyFixture(\n  fs: FileSystem,\n  node: Fixture,\n  dir: string,\n): Promise<void> {\n  switch (node.type) {\n    case 'root': {\n      for (let child of node.children) {\n        await applyFixture(fs, child, dir);\n      }\n      break;\n    }\n    case 'dir': {\n      let filepath = path.join(dir, node.name);\n      await fs.mkdirp(filepath);\n      for (let child of node.children) {\n        await applyFixture(fs, child, filepath);\n      }\n      break;\n    }\n    case 'file': {\n      await fs.writeFile(path.join(dir, node.name), node.content);\n      break;\n    }\n    case 'link': {\n      // $FlowFixMe[prop-missing]\n      await fs.symlink(node.target, path.join(dir, node.name));\n      break;\n    }\n    default: {\n      /*:: ((node: empty) => void 0)(node); */\n      throw new Error(`Unexpected node type \"${node.type}\"`);\n    }\n  }\n}\n\n// Named capture groups that can be directly tokenized.\n// e.g., a string matching `nest` can be tokenized as `nest` token,\n// a match for `dirname` can be tokenized as a `dirname` token, etc.\nconst TOKEN_TYPES = [\n  // `/` in `a/b` or `  ` in `a\\n  b`\n  /^(?<nest>[/\\\\]| {2})/,\n  // e.g. `a` or `b` in `a/b/c.txt`\n  /^(?<dirname>[^:>\\n/\\\\]+\\b)(?:(?=[/\\\\])| *\\n| *$)/,\n  // e.g. `c.txt` in `a/b/c.txt:` or `a/b/c.txt ->`\n  /^(?<filename>[^:>\\n/\\\\]+\\b) *(?:->|:) *(?:\\n|$)/,\n];\n\n// Named capture groups that can be directly tokenized,\n// with the exception of the `indent` and `path` groups, which\n// capture patterns that should be subsequently matched on `TOKEN_TYPES`.\nconst COMPOUND_TYPES = [\n  // Matches empty lines that are meant to be ignored.\n  /^(?<empty> *)\\n/,\n  // Matches are captured as `indent` and`path` groups,\n  // which can then be matched to `TOKEN_TYPES`.\n  /^(?<indent>(?: {2})*)(?<path>[^:>\\n]+\\b) *(?:\\n|$)/,\n  // Matches are captured as `indent`,`path`, and `link` groups.\n  // The `indent` and `path` groups can be matched to `TOKEN_TYPES`,\n  // and then `link` can be directly tokenized as `link`.\n  /^(?<indent>(?: {2})*)(?<path>[^:>\\n]+\\b *->) *(?<link>.+\\b) *(?:\\n|$)/,\n  // Matches are captured as `indent`,`path`, and `content` groups.\n  // The `indent` and `path` groups can be matched to `TOKEN_TYPES`,\n  // and then `content` can be directly tokenized as `content`.\n  /^(?<indent>(?: {2})*)(?<path>[^:>\\n]+\\b *:)(?<content>.*(?:\\n^(?:$|\\k<indent> {2}.*))*) *(?:\\n|$)/m,\n];\n\nconst MAX_ITER = 10000;\n\nfunction checkIteration(i, str) {\n  if (i >= MAX_ITER) {\n    throw new Error(`Possible infinite loop while tokenizing \"${str}\"`);\n  }\n  return i + 1;\n}\n\nfunction toPosixPath(str) {\n  return str.replace(/^[A-Z]:\\\\/, '/').replace(/\\\\/g, '/');\n}\n\nexport class FixtureTokenizer {\n  #src: string;\n  #tokens: Array<FixtureToken>;\n\n  #tokenizeNext = (src, types) => {\n    for (let expr of types) {\n      let match = src.match(expr);\n      if (match) {\n        let {indent, path, ...groups} = nullthrows(match.groups);\n        if (indent != null) this.#tokenize(indent, TOKEN_TYPES);\n        if (path != null) this.#tokenize(path, TOKEN_TYPES);\n\n        // Additional tokens that aren't captured by `indent` and `path`.\n        for (let type in groups) {\n          // Ignore empty lines.\n          if (type === 'empty') continue;\n          // If the value is multiline, dedent each line.\n          let value = groups[type]\n            .trim()\n            .replace(new RegExp(`^${indent} {2}(.*)$`, 'gm'), '$1');\n          if (type === 'nest' || type === 'link') {\n            value = toPosixPath(value);\n          }\n          this.#tokens.push({type, value});\n        }\n\n        return src.slice(match[0].length);\n      }\n    }\n\n    throw new Error(`Failed to match token on \"${src}\"`);\n  };\n\n  #tokenize = (src, types = COMPOUND_TYPES) => {\n    let i = 0;\n    while (src.length > 0) {\n      // It is _possible_ (though not expected!) to loop infinitely here,\n      // so guard against that by throwing if we count a lot of iterations.\n      i = checkIteration(i, src);\n      // $FlowFixMe[reassign-const]\n      src = this.#tokenizeNext(src, types);\n    }\n  };\n\n  constructor(src: string) {\n    this.#src = src;\n  }\n\n  tokenize(): Array<FixtureToken> {\n    if (!this.#tokens) {\n      this.#tokens = [];\n      this.#tokenize(this.#src);\n    }\n    return this.#tokens;\n  }\n}\n\nexport class FixtureParser {\n  #tokens: Array<FixtureToken>;\n  #root: FixtureRoot;\n  #cwd: FixtureRoot | FixtureDir;\n  #dirStack: Array<FixtureRoot | FixtureDir>;\n\n  #peek = type => this.#tokens[this.#tokens.length - 1]?.type === type;\n\n  #consume = type => {\n    let token = this.#tokens.pop();\n    if (token?.type !== type) {\n      throw new Error(\n        `Expected token of type \"${type}\" but got \"${token?.type}\"`,\n      );\n    }\n    return token;\n  };\n\n  #parseNest = () => {\n    let depth = 0;\n    let isSegment = false;\n    let nest;\n    while (this.#peek('nest')) {\n      nest = this.#consume('nest');\n      if (nest.value === '/') {\n        assert(!isSegment && !depth, 'Unexpected segment nest');\n        isSegment = true;\n      } else {\n        assert(!isSegment, 'Unexpected indent nest');\n        depth++;\n      }\n    }\n\n    if (!isSegment) {\n      assert(depth < this.#dirStack.length, 'Invalid nesting');\n      this.#dirStack = this.#dirStack.slice(0, depth + 1);\n      this.#cwd = this.#dirStack[this.#dirStack.length - 1];\n    } else {\n      assert(this.#dirStack.length > 1, 'Invalid nesting');\n      this.#dirStack.pop();\n    }\n  };\n\n  #parseDir = () => {\n    let dir = new FixtureDir(this.#consume('dirname').value);\n    this.#cwd.children.push(dir);\n    this.#cwd = dir;\n    this.#dirStack.push(dir);\n  };\n\n  #parseFile = () => {\n    let name = this.#consume('filename').value;\n    if (this.#peek('content')) {\n      let content = this.#consume('content').value;\n      this.#cwd.children.push(new FixtureFile(name, content));\n    } else if (this.#peek('link')) {\n      let target = this.#consume('link').value;\n      this.#cwd.children.push(new FixtureLink(name, target));\n    } else {\n      throw new Error(\n        `Expected content or link token but got ${this.#tokens.pop()?.type}`,\n      );\n    }\n  };\n\n  constructor(tokens: Array<FixtureToken>) {\n    this.#tokens = [...tokens].reverse();\n  }\n\n  parse(): FixtureRoot {\n    if (!this.#root) {\n      this.#root = new FixtureRoot();\n      this.#cwd = this.#root;\n      this.#dirStack = [this.#root];\n\n      // Consume any leading `nest` tokens.\n      // This allows a fixture path to start with '/'.\n      while (this.#peek('nest')) {\n        this.#consume('nest');\n      }\n\n      while (this.#tokens.length) {\n        this.#parseNest();\n        if (this.#peek('dirname')) {\n          this.#parseDir();\n        } else if (this.#peek('filename')) {\n          this.#parseFile();\n        } else {\n          throw new Error(`Unexpected ${this.#tokens.pop()?.type} token`);\n        }\n      }\n    }\n    return this.#root;\n  }\n}\n\nexport class FixtureRoot {\n  type: 'root' = 'root';\n  children: Array<FixtureChild> = [];\n  toString(): string {\n    return this.children.map(child => child.toString()).join('\\n');\n  }\n}\n\nexport class FixtureDir {\n  type: 'dir' = 'dir';\n  name: string;\n  children: Array<FixtureChild> = [];\n  constructor(name: string) {\n    this.name = name;\n  }\n  toString(): string {\n    return [this.name]\n      .concat(\n        this.children.flatMap(child =>\n          child\n            .toString()\n            .split('\\n')\n            .map(line => `  ${line}`),\n        ),\n      )\n      .join('\\n');\n  }\n}\n\nexport class FixtureFile {\n  type: 'file' = 'file';\n  name: string;\n  content: string;\n  constructor(name: string, content: string) {\n    this.name = name;\n    this.content = content;\n  }\n  toString(): string {\n    return [`${this.name}:`]\n      .concat(this.content.split('\\n').map(line => `  ${line}`))\n      .join('\\n');\n  }\n}\n\nexport class FixtureLink {\n  type: 'link' = 'link';\n  name: string;\n  target: string;\n  constructor(name: string, target: string) {\n    this.name = name;\n    this.target = target;\n  }\n  toString(): string {\n    return `${this.name} -> ${this.target}`;\n  }\n}\n\nexport function escapeFixtureContent(content: string): string {\n  return content\n    .replace(/\\\\/g, '\\\\\\\\')\n    .replace(/`/g, '\\\\`')\n    .replace(/\\${/g, '\\\\${');\n}\n\nexport function dedentRaw(\n  strings: Array<string>,\n  ...exprs: Array<\n    null | string | number | boolean | interface {} | $ReadOnlyArray<mixed>,\n  >\n): string {\n  let src = '';\n  for (let i = 0; i < strings.length; i++) {\n    src += strings[i];\n    if (i < exprs.length) {\n      let expr = exprs[i];\n      if (typeof expr !== 'string') {\n        expr = JSON.stringify(exprs[i]).replace(/^\"|\"$/g, '');\n      }\n      src += expr;\n    }\n  }\n  src = src.trimRight().replace(/^ *\\n?/, '');\n\n  let dedent = nullthrows(src.match(/^(?: {2})*/))[0].length;\n\n  if (dedent === 0) {\n    dedent = Infinity;\n    for (let indent of nullthrows(src.match(/^(?: {2})*/gm))) {\n      let len = indent.length - 2;\n      if (len >= 0 && len < dedent) dedent = len;\n    }\n  }\n\n  if (dedent < Infinity && dedent > 0) {\n    src = src.replace(new RegExp(`^ {${dedent}}`, 'gm'), '');\n  }\n\n  return src;\n}\n"
  },
  {
    "path": "packages/core/test-utils/src/mochaSetup.js",
    "content": "process.on('unhandledRejection', reason => {\n  throw reason;\n});\n"
  },
  {
    "path": "packages/core/test-utils/src/utils.js",
    "content": "// @flow strict-local\n\nimport type {\n  Asset,\n  BuildEvent,\n  BuildSuccessEvent,\n  BundleGraph,\n  Dependency,\n  FilePath,\n  InitialParcelOptions,\n  PackagedBundle,\n} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type WorkerFarm from '@parcel/workers';\nimport type {IncomingMessage} from 'http';\nimport type ThrowableDiagnostic, {Diagnostic} from '@parcel/diagnostic';\n\nimport invariant from 'assert';\nimport util from 'util';\nimport Parcel, {createWorkerFarm} from '@parcel/core';\nimport assert from 'assert';\nimport vm from 'vm';\nimport v8 from 'v8';\nimport {NodeFS, MemoryFS, OverlayFS, ncp as _ncp} from '@parcel/fs';\nimport path from 'path';\nimport url from 'url';\nimport WebSocket from 'ws';\nimport nullthrows from 'nullthrows';\nimport {parser as postHtmlParse} from 'posthtml-parser';\nimport postHtml from 'posthtml';\nimport EventEmitter from 'events';\nimport http from 'http';\nimport https from 'https';\n\nimport {\n  makeDeferredWithPromise,\n  normalizeSeparators,\n  loadConfig,\n} from '@parcel/utils';\nimport _chalk from 'chalk';\nimport resolve from 'resolve';\n\nexport {fsFixture} from './fsFixture';\n\nexport const workerFarm = (createWorkerFarm(): WorkerFarm);\nexport const inputFS: NodeFS = new NodeFS();\nexport let outputFS: MemoryFS = new MemoryFS(workerFarm);\nexport let overlayFS: OverlayFS = new OverlayFS(outputFS, inputFS);\n\nbeforeEach(() => {\n  outputFS = new MemoryFS(workerFarm);\n  overlayFS = new OverlayFS(outputFS, inputFS);\n});\n\n// Recursively copies a directory from the inputFS to the outputFS\nexport async function ncp(source: FilePath, destination: FilePath) {\n  await _ncp(inputFS, source, outputFS, destination);\n}\n\n// Mocha is currently run with exit: true because of this issue preventing us\n// from properly ending the workerfarm after the test run:\n// https://github.com/nodejs/node/pull/28788\n//\n// TODO: Remove exit: true in .mocharc.json and instead add the following in this file:\n//   // Spin down the worker farm to stop it from preventing the main process from exiting\n//   await workerFarm.end();\n// when https://github.com/nodejs/node/pull/28788 is resolved.\n\nconst chalk = new _chalk.Instance();\nconst warning = chalk.keyword('orange');\n\n/* eslint-disable no-console */\n// $FlowFixMe[cannot-write]\nconsole.warn = (...args) => {\n  // eslint-disable-next-line no-console\n  console.error(warning(...args));\n};\n/* eslint-enable no-console */\n\ntype ExternalModules = {|\n  [name: string]: (vm$Context) => {[string]: mixed},\n|};\n\nexport function sleep(ms: number): Promise<void> {\n  return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nexport function normalizeFilePath(filePath: string): FilePath {\n  return normalizeSeparators(filePath);\n}\n\nexport const distDir: string = path.resolve(\n  __dirname,\n  '..',\n  '..',\n  'integration-tests',\n  'dist',\n);\n\nexport async function removeDistDirectory() {\n  await outputFS.rimraf(distDir);\n}\n\nexport function symlinkPrivilegeWarning() {\n  // eslint-disable-next-line no-console\n  console.warn(\n    `-----------------------------------\nSkipping symbolic link test(s) because you don't have the privilege.\nRun tests with Administrator privilege.\nIf you don't know how, check here: https://bit.ly/2UmWsbD\n-----------------------------------`,\n  );\n}\n\nexport function getParcelOptions(\n  entries: FilePath | Array<FilePath>,\n  opts?: $Shape<InitialParcelOptions>,\n): InitialParcelOptions {\n  return mergeParcelOptions(\n    {\n      entries,\n      shouldDisableCache: true,\n      logLevel: 'none',\n      shouldBundleIncrementally:\n        process.env.NO_INCREMENTAL == null ? true : false,\n      defaultConfig: path.join(__dirname, '.parcelrc-no-reporters'),\n      inputFS,\n      outputFS,\n      workerFarm,\n      shouldContentHash: true,\n      defaultTargetOptions: {\n        distDir,\n        engines: {\n          browsers: ['last 1 Chrome version'],\n          node: '18',\n        },\n      },\n    },\n    opts,\n  );\n}\n\nexport function bundler(\n  entries: FilePath | Array<FilePath>,\n  opts?: $Shape<InitialParcelOptions>,\n): Parcel {\n  return new Parcel(getParcelOptions(entries, opts));\n}\n\nexport function findAsset(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  assetFileName: string,\n): ?Asset {\n  return bundleGraph.traverseBundles((bundle, context, actions) => {\n    let asset = bundle.traverseAssets((asset, context, actions) => {\n      if (path.basename(asset.filePath) === assetFileName) {\n        actions.stop();\n        return asset;\n      }\n    });\n    if (asset) {\n      actions.stop();\n      return asset;\n    }\n  });\n}\n\nexport function findDependency(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  assetFileName: string,\n  specifier: string,\n): Dependency {\n  let asset = nullthrows(\n    findAsset(bundleGraph, assetFileName),\n    `Couldn't find asset ${assetFileName}`,\n  );\n\n  let dependencies = bundleGraph\n    .getDependencies(asset)\n    .filter(d => d.specifier === specifier);\n\n  let dependency =\n    dependencies.length > 1\n      ? dependencies.find(d => !bundleGraph.isDependencySkipped(d))\n      : dependencies[0];\n\n  invariant(\n    dependency != null,\n    `Couldn't find dependency ${assetFileName} -> ${specifier}`,\n  );\n  return dependency;\n}\n\nexport function mergeParcelOptions(\n  optsOne: InitialParcelOptions,\n  optsTwo?: InitialParcelOptions | null,\n): InitialParcelOptions {\n  if (!optsTwo) {\n    return optsOne;\n  }\n\n  return {\n    ...optsOne,\n    ...optsTwo,\n    // $FlowFixMe\n    defaultTargetOptions: {\n      ...optsOne?.defaultTargetOptions,\n      // $FlowFixMe\n      ...optsTwo?.defaultTargetOptions,\n    },\n    featureFlags: {\n      // $FlowFixMe\n      ...optsOne?.featureFlags,\n      // $FlowFixMe\n      ...optsTwo?.featureFlags,\n    },\n  };\n}\n\nexport function assertDependencyWasExcluded(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  assetFileName: string,\n  specifier: string,\n): void {\n  let dep = findDependency(bundleGraph, assetFileName, specifier);\n  invariant(\n    bundleGraph.isDependencySkipped(dep),\n    util.inspect(dep) + \" wasn't deferred\",\n  );\n}\n\nexport async function bundle(\n  entries: FilePath | Array<FilePath>,\n  opts?: InitialParcelOptions,\n): Promise<BundleGraph<PackagedBundle>> {\n  return (await bundler(entries, opts).run()).bundleGraph;\n}\n\nexport function getNextBuild(b: Parcel): Promise<BuildEvent> {\n  return new Promise((resolve, reject) => {\n    let subscriptionPromise = b\n      .watch((err, buildEvent) => {\n        if (err) {\n          reject(err);\n          return;\n        }\n\n        subscriptionPromise\n          .then(subscription => {\n            // If the watch callback was reached, subscription must have been successful\n            invariant(subscription != null);\n            return subscription.unsubscribe();\n          })\n          .then(() => {\n            // If the build promise hasn't been rejected, buildEvent must exist\n            invariant(buildEvent != null);\n            resolve(buildEvent);\n          })\n          .catch(reject);\n      })\n      .catch(reject);\n  });\n}\n\nexport async function getNextBuildSuccess(\n  b: Parcel,\n): Promise<BuildSuccessEvent> {\n  let evt = await getNextBuild(b);\n  invariant(evt.type === 'buildSuccess');\n  return evt;\n}\n\nexport function shallowEqual(\n  a: $Shape<{|+[string]: mixed|}>,\n  b: $Shape<{|+[string]: mixed|}>,\n): boolean {\n  if (Object.keys(a).length !== Object.keys(b).length) {\n    return false;\n  }\n\n  for (let [key, value] of Object.entries(a)) {\n    if (!b.hasOwnProperty(key) || b[key] !== value) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\ntype RunOpts = {require?: boolean, strict?: boolean, entryAsset?: Asset, ...};\n\nexport async function runBundles(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  parent: PackagedBundle,\n  bundles: Array<[string, PackagedBundle]>,\n  globals: mixed,\n  opts: RunOpts = {},\n  externalModules?: ExternalModules,\n  importMap?: ?ImportMap,\n): Promise<mixed> {\n  let entryAsset =\n    opts.entryAsset ??\n    nullthrows(\n      bundles\n        .map(([, b]) => b.getMainEntry() || b.getEntryAssets()[0])\n        .filter(Boolean)[0],\n    );\n  let env = entryAsset.env;\n  let target = env.context;\n  let outputFormat = env.outputFormat;\n\n  nodeCache.clear();\n\n  let ctx, promises;\n  switch (target) {\n    case 'browser':\n    case 'react-client': {\n      let prepared = prepareBrowserContext(parent, globals);\n      ctx = prepared.ctx;\n      promises = prepared.promises;\n      break;\n    }\n    case 'node':\n    case 'electron-main':\n    case 'react-server':\n      ctx = prepareNodeContext(globals);\n      break;\n    case 'electron-renderer': {\n      let prepared = prepareBrowserContext(parent, globals);\n      prepareNodeContext(globals, prepared.ctx);\n      ctx = prepared.ctx;\n      promises = prepared.promises;\n      break;\n    }\n    case 'web-worker':\n    case 'service-worker': {\n      let prepared = prepareWorkerContext(parent.filePath, globals);\n      ctx = prepared.ctx;\n      promises = prepared.promises;\n      break;\n    }\n    case 'worklet': {\n      ctx = Object.assign({}, globals);\n      break;\n    }\n    default:\n      throw new Error('Unknown target ' + target);\n  }\n\n  // A utility to prevent optimizers from removing side-effect-free code needed for testing\n  // $FlowFixMe[prop-missing]\n  ctx.sideEffectNoop = v => v;\n\n  vm.createContext(ctx);\n  let esmOutput;\n  let cjsOutput;\n  if (outputFormat === 'esmodule') {\n    let res = await runESM(\n      bundles[0][1].target.distDir,\n      bundles.map(([code, bundle]) => [code, bundle.filePath]),\n      ctx,\n      overlayFS,\n      externalModules,\n      true,\n      target === 'node' ||\n        target === 'electron-main' ||\n        target === 'react-server',\n      importMap,\n    );\n\n    esmOutput = bundles.length === 1 ? res[0] : res;\n  } else if (outputFormat === 'commonjs' || env.isNode()) {\n    for (let [code, b] of bundles) {\n      let res = runModule(\n        b.target.distDir,\n        ctx,\n        b.filePath,\n        code,\n        externalModules,\n        opts.strict ?? false,\n      );\n      cjsOutput ??= res;\n    }\n  } else {\n    for (let [code, b] of bundles) {\n      // parcelRequire was set up in prepare*Context\n      new vm.Script((opts.strict ? '\"use strict\";\\n' : '') + code, {\n        filename:\n          b.bundleBehavior === 'inline'\n            ? b.name\n            : normalizeSeparators(path.relative(b.target.distDir, b.filePath)),\n        async importModuleDynamically(specifier) {\n          let filePath = path.resolve(path.dirname(parent.filePath), specifier);\n          let code = await overlayFS.readFile(filePath, 'utf8');\n          let modules = await runESM(\n            b.target.distDir,\n            [[code, filePath]],\n            ctx,\n            overlayFS,\n            externalModules,\n            true,\n            target === 'node' ||\n              target === 'electron-main' ||\n              target === 'react-server',\n            importMap,\n          );\n          return modules[0];\n        },\n      }).runInContext(ctx);\n    }\n  }\n\n  if (promises) {\n    // await any ongoing dynamic imports during the run\n    await Promise.all(promises);\n  }\n\n  if (opts.require !== false) {\n    if (!env.shouldScopeHoist) {\n      for (let key in ctx) {\n        if (key.startsWith('parcelRequire')) {\n          // $FlowFixMe[incompatible-use]\n          return ctx[key](bundleGraph.getAssetPublicId(entryAsset));\n        }\n      }\n    }\n    switch (outputFormat) {\n      case 'global':\n        return typeof ctx.output !== 'undefined' ? ctx.output : undefined;\n      case 'commonjs':\n        return nullthrows(cjsOutput);\n      case 'esmodule':\n        return esmOutput;\n      default:\n        throw new Error(\n          'Unable to run bundle with outputFormat ' + env.outputFormat,\n        );\n    }\n  }\n\n  return ctx;\n}\n\nexport async function runBundle(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  bundle: PackagedBundle,\n  globals: mixed,\n  opts: RunOpts = {},\n  externalModules?: ExternalModules,\n): Promise<mixed> {\n  if (bundle.type === 'html') {\n    let code = await overlayFS.readFile(nullthrows(bundle.filePath), 'utf8');\n    let ast = postHtmlParse(code, {\n      lowerCaseAttributeNames: true,\n    });\n\n    let bundles = bundleGraph.getBundles({includeInline: true});\n    let scripts = [];\n    let importMap: ?ImportMap = null;\n    postHtml().walk.call(ast, node => {\n      if (node.attrs?.nomodule != null) {\n        return node;\n      }\n      if (node.tag === 'script' && node.attrs?.src) {\n        let src = url.parse(nullthrows(node.attrs).src);\n        if (src.hostname == null) {\n          let p = path.join(distDir, nullthrows(src.pathname));\n          let b = nullthrows(bundles.find(b => b.filePath === p));\n          scripts.push([overlayFS.readFileSync(b.filePath, 'utf8'), b]);\n        }\n      } else if (\n        node.tag === 'script' &&\n        node.content &&\n        node.attrs?.type === 'importmap'\n      ) {\n        importMap = JSON.parse(node.content.join(''));\n      } else if (node.tag === 'script' && node.content && !node.attrs?.src) {\n        let content = node.content.join('');\n        let inline = bundles.filter(\n          b => b.bundleBehavior === 'inline' && b.type === 'js',\n        );\n        scripts.push([content, inline[0]]);\n      }\n      return node;\n    });\n\n    return runBundles(\n      bundleGraph,\n      bundle,\n      scripts,\n      globals,\n      opts,\n      externalModules,\n      importMap,\n    );\n  } else {\n    return runBundles(\n      bundleGraph,\n      bundle,\n      [[overlayFS.readFileSync(bundle.filePath, 'utf8'), bundle]],\n      globals,\n      opts,\n      externalModules,\n    );\n  }\n}\n\nexport function run(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  globals: mixed,\n  opts: RunOpts = {},\n  externalModules?: ExternalModules,\n  // $FlowFixMe[unclear-type]\n): Promise<any> {\n  let bundle = nullthrows(\n    bundleGraph.getBundles().find(b => b.type === 'js' || b.type === 'html'),\n  );\n  return runBundle(bundleGraph, bundle, globals, opts, externalModules);\n}\n\nexport function assertBundles(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  expectedBundles: Array<{|\n    name?: string | RegExp,\n    type?: string,\n    assets: Array<string>,\n  |}>,\n  opts?: {|skipNodeModules?: boolean, skipHelpers?: boolean|},\n) {\n  let actualBundles = [];\n  const byAlphabet = (a, b) => (a.toLowerCase() < b.toLowerCase() ? -1 : 1);\n\n  bundleGraph.traverseBundles(bundle => {\n    let assets = [];\n\n    bundle.traverseAssets(asset => {\n      if (/@swc[/\\\\]helpers/.test(asset.filePath)) {\n        // Skip all helpers for now, as they add friction and churn to assertions.\n        // A longer term solution might have an explicit opt-in to this behavior, or\n        // if we enable symbol propagation unconditionally, the set of helpers\n        // should be more minimal.\n        return;\n      }\n\n      if (/runtime-[a-z0-9]{16}\\.js/.test(asset.filePath)) {\n        // Skip runtime assets, which have hashed filenames for source maps.\n        return;\n      }\n\n      if (opts?.skipNodeModules && /node_modules/.test(asset.filePath)) {\n        return;\n      }\n\n      if (\n        (opts?.skipHelpers || opts?.skipNodeModules) &&\n        /esmodule-helpers.js|jsx-dev-runtime.js|jsx-runtime.js|rsc-helpers.js/.test(\n          asset.filePath,\n        )\n      ) {\n        return;\n      }\n\n      const name = path.basename(asset.filePath);\n      assets.push(name);\n    });\n\n    assets.sort(byAlphabet);\n    actualBundles.push({\n      name:\n        bundle.bundleBehavior === 'inline'\n          ? bundle.name\n          : path.basename(bundle.filePath),\n      type: bundle.type,\n      assets,\n    });\n  });\n\n  for (let bundle of expectedBundles) {\n    if (!Array.isArray(bundle.assets)) {\n      throw new Error(\n        'Expected bundle must include an array of expected assets',\n      );\n    }\n    bundle.assets.sort(byAlphabet);\n  }\n\n  assert.equal(\n    actualBundles.length,\n    expectedBundles.length,\n    `expected number of bundles mismatched\\n\\nActual bundles: \\n\\n${util.inspect(\n      actualBundles,\n    )}`,\n  );\n\n  for (let bundle of expectedBundles) {\n    let name = bundle.name;\n    let found = actualBundles.some(b => {\n      if (name != null && b.name != null) {\n        if (typeof name === 'string') {\n          if (name !== b.name) {\n            return false;\n          }\n        } else if (name instanceof RegExp) {\n          if (!name.test(b.name)) {\n            return false;\n          }\n        } else {\n          // $FlowFixMe[incompatible-call]\n          assert.fail('Expected bundle name has invalid type');\n        }\n      }\n\n      if (bundle.type != null && bundle.type !== b.type) {\n        return false;\n      }\n\n      return (\n        bundle.assets &&\n        bundle.assets.length === b.assets.length &&\n        bundle.assets.every((a, i) => a === b.assets[i])\n      );\n    });\n\n    if (!found) {\n      // $FlowFixMe[incompatible-call]\n      assert.fail(\n        `Could not find expected bundle: \\n\\n${util.inspect(\n          bundle,\n        )} \\n\\nActual bundles: \\n\\n${util.inspect(actualBundles)}`,\n      );\n    }\n  }\n}\n\nexport function normaliseNewlines(text: string): string {\n  return text.replace(/(\\r\\n|\\n|\\r)/g, '\\n');\n}\n\nfunction prepareBrowserContext(\n  bundle: PackagedBundle,\n  globals: mixed,\n): {|\n  ctx: vm$Context,\n  promises: Array<Promise<mixed>>,\n|} {\n  // for testing dynamic imports\n  const fakeElement = {\n    remove() {},\n  };\n\n  const head = {\n    children: [],\n    appendChild(el) {\n      head.children.push(el);\n\n      if (el.tag === 'script') {\n        let {deferred, promise} = makeDeferredWithPromise();\n        promises.push(promise);\n        setTimeout(function () {\n          let pathname = url.parse(el.src).pathname;\n          let file = path.join(bundle.target.distDir, pathname);\n\n          new vm.Script(\n            // '\"use strict\";\\n' +\n            overlayFS.readFileSync(file, 'utf8'),\n            {\n              filename: pathname.slice(1),\n            },\n          ).runInContext(ctx);\n\n          el.onload();\n          deferred.resolve();\n        }, 0);\n      } else if (typeof el.onload === 'function') {\n        el.onload();\n      }\n    },\n  };\n\n  let promises = [];\n\n  const fakeDocument = {\n    head,\n    createElement(tag) {\n      return {tag, setAttribute() {}, style: {}};\n    },\n\n    getElementsByTagName() {\n      return [head];\n    },\n\n    createEvent() {\n      // For Vue\n      return {timeStamp: Date.now()};\n    },\n\n    getElementById(id) {\n      if (id !== '__parcel__error__overlay__') return fakeElement;\n    },\n\n    body: {\n      appendChild() {\n        return null;\n      },\n    },\n\n    currentScript: null,\n  };\n\n  function PatchedError(message) {\n    const patchedError = new Error(message);\n    const stackStart = patchedError.stack.match(/at (new )?Error/)?.index;\n    const stackEnd = patchedError.stack.includes('at Script.runInContext')\n      ? patchedError.stack.indexOf('at Script.runInContext')\n      : patchedError.stack.indexOf('at runNextTicks');\n    const stack = patchedError.stack.slice(stackStart, stackEnd).split('\\n');\n    stack.shift();\n    stack.pop();\n    for (let [i, line] of stack.entries()) {\n      stack[i] = line.replace(\n        /( ?.* )\\(?(.*)\\)?$/,\n        (_, prefix, path) =>\n          prefix +\n          (path.endsWith(')')\n            ? `(http://localhost/${path.slice(0, path.length - 1)})`\n            : `http://localhost/${path}`),\n      );\n    }\n    patchedError.stack =\n      patchedError.stack.slice(0, stackStart).replace(/ +$/, '') +\n      stack.join('\\n');\n\n    return patchedError;\n  }\n\n  PatchedError.prototype = Object.create(Error.prototype);\n  Object.defineProperty(PatchedError, 'name', {\n    writable: true,\n    value: 'Error',\n  });\n  PatchedError.prototype.constructor = PatchedError;\n\n  var ctx = Object.assign(\n    {\n      Error: PatchedError,\n      document: fakeDocument,\n      WebSocket,\n      TextEncoder,\n      TextDecoder,\n      console: {...console, clear: () => {}},\n      location: {\n        hostname: 'localhost',\n        origin: 'http://localhost',\n        protocol: 'http',\n      },\n      navigator: {\n        userAgent: '',\n      },\n      fetch(url) {\n        return Promise.resolve({\n          async arrayBuffer() {\n            let readFilePromise = overlayFS.readFile(\n              path.join(path.dirname(bundle.target.distDir), url),\n            );\n            promises.push(readFilePromise);\n            return new Uint8Array(await readFilePromise).buffer;\n          },\n          text() {\n            let readFilePromise = overlayFS.readFile(\n              path.join(path.dirname(bundle.target.distDir), url),\n              'utf8',\n            );\n            promises.push(readFilePromise);\n            return readFilePromise;\n          },\n        });\n      },\n      atob(str) {\n        return Buffer.from(str, 'base64').toString('binary');\n      },\n      btoa(str) {\n        return Buffer.from(str, 'binary').toString('base64');\n      },\n      URL,\n      Worker: createWorkerClass(bundle.filePath),\n      addEventListener() {},\n      removeEventListener() {},\n    },\n    globals,\n  );\n\n  if (bundle.env.isLibrary) {\n    ctx.process = {\n      browser: true,\n      env: {},\n    };\n  }\n\n  ctx.window = ctx.self = ctx;\n  return {ctx, promises};\n}\n\nfunction createWorkerClass(filePath: FilePath) {\n  return class Worker extends EventEmitter {\n    constructor(url) {\n      super();\n      this._run(url);\n    }\n\n    async _run(url) {\n      let u = new URL(url);\n      let filename = path.join(path.dirname(filePath), u.pathname);\n      let {ctx, promises} = prepareWorkerContext(filename, {\n        postMessage: msg => {\n          this.emit('message', msg);\n        },\n      });\n\n      let code = await overlayFS.readFile(filename, 'utf8');\n      vm.createContext(ctx);\n      new vm.Script(code, {\n        filename: 'http://localhost/' + path.basename(filename),\n      }).runInContext(ctx);\n\n      if (promises) {\n        await Promise.all(promises);\n      }\n    }\n\n    addEventListener(evt, callback) {\n      super.on(evt, callback);\n    }\n\n    removeEventListener(evt, callback) {\n      super.removeListener(evt, callback);\n    }\n  };\n}\n\nfunction prepareWorkerContext(\n  filePath: FilePath,\n  globals: mixed,\n): {|\n  ctx: vm$Context,\n  promises: Array<Promise<mixed>>,\n|} {\n  let promises = [];\n\n  var ctx = Object.assign(\n    {\n      WebSocket,\n      console,\n      TextEncoder,\n      TextDecoder,\n      location: {hostname: 'localhost', origin: 'http://localhost'},\n      importScripts(...urls) {\n        for (let u of urls) {\n          new vm.Script(\n            overlayFS.readFileSync(\n              path.join(path.dirname(filePath), url.parse(u).pathname),\n              'utf8',\n            ),\n            {\n              filename: path.basename(url.parse(u).pathname),\n            },\n          ).runInContext(ctx);\n        }\n      },\n      fetch(url) {\n        return Promise.resolve({\n          async arrayBuffer() {\n            let readFilePromise = overlayFS.readFile(\n              path.join(path.dirname(filePath), url),\n            );\n            promises.push(readFilePromise);\n            return new Uint8Array(await readFilePromise).buffer;\n          },\n          text() {\n            let readFilePromise = overlayFS.readFile(\n              path.join(path.dirname(filePath), url),\n              'utf8',\n            );\n            promises.push(readFilePromise);\n            return readFilePromise;\n          },\n        });\n      },\n      atob(str) {\n        return Buffer.from(str, 'base64').toString('binary');\n      },\n      btoa(str) {\n        return Buffer.from(str, 'binary').toString('base64');\n      },\n      URL,\n      Worker: createWorkerClass(filePath),\n    },\n    globals,\n  );\n\n  ctx.window = ctx.self = ctx;\n  return {ctx, promises};\n}\n\nconst nodeCache = new Map();\nfunction prepareNodeContext(\n  globals,\n  // $FlowFixMe\n  ctx: any = {},\n) {\n  ctx.console = console;\n  ctx.process = process;\n  ctx.setTimeout = setTimeout;\n  ctx.setImmediate = setImmediate;\n  ctx.global = ctx;\n  ctx.URL = URL;\n  ctx.TextEncoder = TextEncoder;\n  ctx.TextDecoder = TextDecoder;\n  Object.assign(ctx, globals);\n  return ctx;\n}\n\nfunction runModule(\n  distDir: string,\n  // $FlowFixMe\n  ctx: any,\n  filePath: string,\n  code: string,\n  externalModules?: ExternalModules,\n  strict: boolean,\n) {\n  let cached = nodeCache.get(filePath);\n  if (cached) {\n    return cached.exports;\n  }\n\n  let f = vm.compileFunction(\n    (strict ? '\"use strict\";\\n' : '') + code,\n    ['module', 'exports', '__filename', '__dirname', 'require'],\n    {\n      filename: path.basename(filePath),\n      parsingContext: ctx,\n      async importModuleDynamically(specifier) {\n        let resolved = path.resolve(path.dirname(filePath), specifier);\n        let code = await overlayFS.readFile(resolved, 'utf8');\n        if (path.extname(resolved) === '.mjs' || (await isESM(resolved))) {\n          let modules = await runESM(\n            distDir,\n            [[code, filePath]],\n            ctx,\n            overlayFS,\n            externalModules,\n            true,\n          );\n          return modules[0];\n        } else {\n          let mod = runModule(\n            distDir,\n            ctx,\n            resolved,\n            code,\n            externalModules,\n            strict,\n          );\n          // $FlowFixMe Experimental\n          let m = new vm.SyntheticModule(\n            Object.keys(mod),\n            function () {\n              for (let [k, v] of Object.entries(mod)) {\n                this.setExport(k, v);\n              }\n            },\n            {identifier: resolved, context: ctx},\n          );\n          await m.link(() => {});\n          await m.evaluate();\n          return m;\n        }\n      },\n    },\n  );\n\n  let req =\n    filePath &&\n    (specifier => {\n      if (externalModules && specifier in externalModules) {\n        return externalModules[specifier](ctx);\n      }\n\n      // $FlowFixMe[prop-missing]\n      let res = resolve.sync(specifier, {\n        basedir: path.dirname(filePath),\n        preserveSymlinks: true,\n        extensions: ['.js', '.json'],\n        readFileSync: (...args) => {\n          return overlayFS.readFileSync(...args);\n        },\n        isFile: file => {\n          try {\n            var stat = overlayFS.statSync(file);\n          } catch (err) {\n            return false;\n          }\n          return stat.isFile();\n        },\n        isDirectory: file => {\n          try {\n            var stat = overlayFS.statSync(file);\n          } catch (err) {\n            return false;\n          }\n          return stat.isDirectory();\n        },\n      });\n\n      // Shim FS module using overlayFS\n      if (res === 'fs') {\n        return {\n          readFile: async (file, encoding, cb) => {\n            let res = await overlayFS.readFile(file, encoding);\n            cb(null, res);\n          },\n          readFileSync: (file, encoding) => {\n            return overlayFS.readFileSync(file, encoding);\n          },\n          existsSync: file => {\n            return overlayFS.existsSync(file);\n          },\n        };\n      }\n\n      if (res === specifier) {\n        // $FlowFixMe[unsupported-syntax]\n        return require(specifier);\n      }\n\n      if (path.extname(res) === '.css') {\n        return {};\n      }\n\n      if (path.extname(res) === '.node') {\n        // $FlowFixMe[unsupported-syntax]\n        return require(res);\n      }\n\n      return runModule(\n        distDir,\n        ctx,\n        res,\n        overlayFS.readFileSync(res, 'utf8'),\n        externalModules,\n        strict,\n      );\n    });\n\n  let exports = {};\n  let module = {exports, require: req};\n  nodeCache.set(filePath, module);\n  f(module, exports, filePath, path.dirname(filePath), req);\n  return module.exports;\n}\n\nasync function isESM(filePath: string) {\n  let pkg = await loadConfig(overlayFS, filePath, ['package.json'], '/');\n  return pkg?.config?.type === 'module';\n}\n\ntype ImportMap = {|\n  imports: {[string]: string},\n|};\n\nlet instanceId = 0;\nexport async function runESM(\n  baseDir: FilePath,\n  entries: Array<[string, string]>,\n  context: vm$Context,\n  fs: FileSystem,\n  externalModules: ExternalModules = {},\n  requireExtensions: boolean = false,\n  isNode: boolean = false,\n  importMap?: ?ImportMap,\n): Promise<Array<{|[string]: mixed|}>> {\n  let id = instanceId++;\n  let cache = new Map();\n  function load(inputSpecifier, referrer, code = null) {\n    let specifier = inputSpecifier;\n    if (importMap) {\n      if (importMap.imports[inputSpecifier]) {\n        specifier = importMap.imports[inputSpecifier];\n      }\n    }\n\n    // ESM can request bundles with an absolute URL. Normalize this to the baseDir.\n    if (specifier.startsWith('/')) {\n      specifier = path.join(baseDir, specifier);\n    }\n    specifier = specifier.replace('http://localhost', baseDir);\n\n    if (path.isAbsolute(specifier) || specifier.startsWith('.')) {\n      let extname = path.extname(specifier);\n      if (\n        extname &&\n        extname !== '.js' &&\n        extname !== '.mjs' &&\n        extname !== '.css'\n      ) {\n        throw new Error(\n          'Unknown file extension in ' +\n            specifier +\n            ' from ' +\n            referrer.identifier,\n        );\n      }\n      let filename = path.resolve(\n        baseDir,\n        path.dirname(referrer.identifier),\n        !extname && !requireExtensions ? specifier + '.js' : specifier,\n      );\n\n      let m = cache.get(filename);\n      if (m) {\n        return m;\n      }\n\n      let source =\n        code ??\n        (extname === '.css' ? '' : null) ??\n        fs.readFileSync(filename, 'utf8');\n      // $FlowFixMe Experimental\n      m = new vm.SourceTextModule(source, {\n        identifier: `${normalizeSeparators(\n          path.relative(baseDir, filename),\n        )}?id=${id}`,\n        importModuleDynamically: (specifier, referrer) =>\n          entry(specifier, referrer),\n        context,\n        initializeImportMeta(meta) {\n          if (isNode) {\n            meta.url = url.pathToFileURL(filename).toString();\n          } else {\n            meta.url = `http://localhost/${path.basename(filename)}`;\n          }\n\n          meta.resolve = inputSpecifier => {\n            let specifier = inputSpecifier;\n            if (importMap) {\n              if (importMap.imports[inputSpecifier]) {\n                specifier = importMap.imports[inputSpecifier];\n              }\n            }\n            return new URL(specifier, 'http://localhost').toString();\n          };\n        },\n      });\n      cache.set(filename, m);\n      return m;\n    } else {\n      if (!(specifier in externalModules)) {\n        throw new Error(\n          `Couldn't resolve ${specifier} from ${referrer.identifier}`,\n        );\n      }\n\n      let m = cache.get(specifier);\n      if (m) {\n        return m;\n      }\n\n      let ns = externalModules[specifier](context);\n\n      // $FlowFixMe Experimental\n      m = new vm.SyntheticModule(\n        Object.keys(ns),\n        function () {\n          for (let [k, v] of Object.entries(ns)) {\n            this.setExport(k, v);\n          }\n        },\n        {identifier: specifier, context},\n      );\n      cache.set(specifier, m);\n      return m;\n    }\n  }\n\n  async function _entry(m) {\n    if (m.status === 'unlinked') {\n      await m.link((specifier, referrer) => load(specifier, referrer));\n    }\n    if (m.status === 'linked') {\n      await m.evaluate();\n    }\n    return m;\n  }\n\n  let entryPromises = new Map();\n  function entry(specifier, referrer, code) {\n    let m = load(specifier, referrer, code);\n    let promise = entryPromises.get(m);\n    if (!promise) {\n      promise = _entry(m);\n      entryPromises.set(m, promise);\n    }\n    return promise;\n  }\n\n  let modules = [];\n  for (let [code, f] of entries) {\n    modules.push(\n      await entry('/' + path.relative(baseDir, f), {identifier: ''}, code),\n    );\n  }\n\n  for (let m of modules) {\n    if (m.status === 'errored') {\n      throw m.error;\n    }\n  }\n\n  return modules.map(m => m.namespace);\n}\n\nexport async function assertESMExports(\n  b: BundleGraph<PackagedBundle>,\n  expected: mixed,\n  externalModules?: ExternalModules,\n  // $FlowFixMe[unclear-type]\n  evaluate: ?({|[string]: any|}) => mixed,\n) {\n  let parcelResult = await run(b, undefined, undefined, externalModules);\n\n  let entry = nullthrows(\n    b\n      .getBundles()\n      .find(b => b.type === 'js')\n      ?.getMainEntry(),\n  );\n  nodeCache.clear();\n  let [nodeResult] = await runESM(\n    b.getBundles()[0].target.distDir,\n    [[await inputFS.readFile(entry.filePath, 'utf8'), entry.filePath]],\n    vm.createContext(prepareNodeContext({})),\n    inputFS,\n    externalModules,\n  );\n\n  if (evaluate) {\n    parcelResult = await evaluate(parcelResult);\n    nodeResult = await evaluate(nodeResult);\n  }\n  assert.deepEqual(\n    parcelResult,\n    nodeResult,\n    \"Bundle exports don't match Node's native behaviour\",\n  );\n\n  if (!evaluate) {\n    parcelResult = {...parcelResult};\n  }\n  assert.deepEqual(parcelResult, expected);\n}\n\nexport async function assertNoFilePathInCache(\n  fs: FileSystem,\n  dir: string,\n  projectRoot: string,\n) {\n  let entries = await fs.readdir(dir);\n  for (let entry of entries) {\n    // Skip watcher snapshots for linux/windows, which contain full file paths.\n    if (path.extname(entry) === '.txt') {\n      continue;\n    }\n\n    let fullPath = path.join(dir, entry);\n    let stat = await fs.stat(fullPath);\n    if (stat.isDirectory()) {\n      await assertNoFilePathInCache(fs, fullPath, projectRoot);\n    } else if (stat.isFile()) {\n      let contents = await fs.readFile(fullPath);\n\n      // For debugging purposes, log all instances of the projectRoot in the cache.\n      // Otherwise, fail the test if one is found.\n      if (process.env.PARCEL_DEBUG_CACHE_FILEPATH != null) {\n        if (contents.includes(projectRoot)) {\n          let deserialized;\n          try {\n            deserialized = v8.deserialize(contents);\n          } catch (err) {\n            // rudimentary detection of binary files\n            if (!contents.includes(0)) {\n              deserialized = contents.toString();\n            } else {\n              deserialized = contents;\n            }\n          }\n\n          if (deserialized != null) {\n            // eslint-disable-next-line no-console\n            console.log(\n              `Found projectRoot ${projectRoot} in cache file ${fullPath}`,\n            );\n            // eslint-disable-next-line no-console\n            console.log(\n              require('util').inspect(deserialized, {depth: 50, colors: true}),\n            );\n          }\n        }\n      } else {\n        assert(\n          !contents.includes(projectRoot),\n          `Found projectRoot ${projectRoot} in cache file ${fullPath}`,\n        );\n      }\n    }\n  }\n}\n\nexport function requestRaw(\n  file: string,\n  port: number,\n  options: ?requestOptions,\n  client: typeof http | typeof https = http,\n): Promise<{|res: IncomingMessage, data: string|}> {\n  return new Promise((resolve, reject) => {\n    client\n      // $FlowFixMe\n      .request(\n        {\n          hostname: 'localhost',\n          port: port,\n          path: file,\n          rejectUnauthorized: false,\n          ...options,\n        },\n        (res: IncomingMessage) => {\n          res.setEncoding('utf8');\n          let data = '';\n          res.on('data', c => (data += c));\n          res.on('end', () => {\n            if (res.statusCode !== 200) {\n              return reject({res, data});\n            }\n\n            resolve({res, data});\n          });\n        },\n      )\n      .end();\n  });\n}\n\nexport function request(\n  file: string,\n  port: number,\n  client: typeof http | typeof https = http,\n): Promise<string> {\n  return new Promise((resolve, reject) => {\n    // $FlowFixMe\n    client.get(\n      {\n        hostname: 'localhost',\n        port: port,\n        path: file,\n        rejectUnauthorized: false,\n      },\n      res => {\n        res.setEncoding('utf8');\n        let data = '';\n        res.on('data', c => (data += c));\n        res.on('end', () => {\n          if (res.statusCode !== 200) {\n            return reject({statusCode: res.statusCode, data});\n          }\n\n          resolve(data);\n        });\n      },\n    );\n  });\n}\n\nexport function assertEqualDiagnostics(\n  actual: Diagnostic[],\n  expected: Diagnostic[],\n) {\n  let mappedActual = actual.map(normalizeDiagnostic);\n  let mappedExpected = expected.map(normalizeDiagnostic);\n  assert.deepEqual(mappedActual, mappedExpected);\n}\n\nexport async function assertRejectsWithDiagnostic(\n  fn: () => Promise<mixed>,\n  expected: $Shape<ThrowableDiagnostic>,\n) {\n  try {\n    await fn();\n  } catch (err) {\n    if (expected.name) {\n      assert.equal(err.name, expected.name);\n    }\n    if (expected.message) {\n      assert.equal(err.message, expected.message);\n    }\n    assertEqualDiagnostics(err.diagnostics, expected.diagnostics);\n    return;\n  }\n  assert(false, 'Expected an error');\n}\n\nfunction normalizeDiagnostic(diagnostic: Diagnostic): Diagnostic {\n  return {\n    message: diagnostic.message,\n    origin: diagnostic.origin ?? undefined,\n    stack: diagnostic.stack ?? undefined,\n    name: diagnostic.name ?? undefined,\n    codeFrames:\n      diagnostic.codeFrames?.map(frame => ({\n        code: frame.code ?? undefined,\n        filePath: frame.filePath ?? undefined,\n        language: frame.language ?? undefined,\n        codeHighlights: frame.codeHighlights.map(h => ({\n          start: h.start,\n          end: h.end,\n          message: h.message ?? undefined,\n        })),\n      })) ?? [],\n    hints: diagnostic.hints ?? [],\n    documentationURL: diagnostic.documentationURL ?? undefined,\n    meta: diagnostic.meta ?? undefined,\n  };\n}\n"
  },
  {
    "path": "packages/core/test-utils/test/fsFixture.test.js",
    "content": "// @flow\n\nimport {\n  dedentRaw,\n  fsFixture,\n  toFixture,\n  FixtureParser,\n  FixtureTokenizer,\n  FixtureRoot,\n  FixtureDir,\n  FixtureFile,\n  FixtureLink,\n} from '../src/fsFixture';\nimport {MemoryFS} from '@parcel/fs';\nimport WorkerFarm from '@parcel/workers';\n\nimport assert from 'assert';\nimport path from 'path';\n\ndescribe('dedentRaw', () => {\n  it('dedents a string with leading space', () => {\n    assert.equal(\n      dedentRaw`     foo\n        bar\n          baz\n    `,\n      'foo\\n  bar\\n    baz',\n    );\n  });\n\n  it('dedents a string with leading newline', () => {\n    assert.equal(\n      dedentRaw`\n        foo\n          bar\n            baz\n      `,\n      'foo\\n  bar\\n    baz',\n    );\n  });\n\n  it('dedents correctly with multiple top level entries', () => {\n    assert.equal(\n      dedentRaw`\n      foo\n        bar: \"bar\"\n      foo/bar -> foo/bat\n        bat\n          qux - qux\n        bat/qux: qux\n    `,\n      'foo\\n  bar: \"bar\"\\nfoo/bar -> foo/bat\\n  bat\\n    qux - qux\\n  bat/qux: qux',\n    );\n  });\n\n  it('stringifies object expressions', () => {\n    assert.equal(\n      dedentRaw`\n        foo\n          ${{\n            bar: 'baz',\n            bat: 'qux',\n          }}\n            baz\n      `,\n      'foo\\n  {\"bar\":\"baz\",\"bat\":\"qux\"}\\n    baz',\n    );\n  });\n\n  it('does not stringify literal expressions', () => {\n    assert.equal(\n      dedentRaw`\n        foo\n          ${JSON.stringify({\n            bar: 'baz',\n            bat: 'qux',\n          })}\n            baz\n              bat: ${false}\n              qux: ${123}\n      `,\n      'foo\\n  {\"bar\":\"baz\",\"bat\":\"qux\"}\\n    baz\\n      bat: false\\n      qux: 123',\n    );\n  });\n});\n\ndescribe('FixtureTokenizer', () => {\n  it('errors on malformed fixture', () => {\n    assert.throws(() => {\n      new FixtureTokenizer(' -> bar').tokenize();\n    }, /Failed to match token/);\n\n    assert.throws(() => {\n      new FixtureTokenizer('  : bar').tokenize();\n    }, /Failed to match token/);\n\n    assert.throws(() => {\n      new FixtureTokenizer('foo\\n->\\nbar').tokenize();\n    }, /Failed to match token/);\n\n    assert.throws(() => {\n      new FixtureTokenizer('foo\\n:\\nbar').tokenize();\n    }, /Failed to match token/);\n  });\n\n  it('tokenizes a dirname', () => {\n    let tokens = new FixtureTokenizer('foo  \\nfoo/bar\\n    bat').tokenize();\n    assert.deepEqual(tokens, [\n      {type: 'dirname', value: 'foo'},\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n      {type: 'dirname', value: 'bar'},\n      {type: 'nest', value: ''},\n      {type: 'nest', value: ''},\n      {type: 'dirname', value: 'bat'},\n    ]);\n  });\n\n  it('tokenizes a file', () => {\n    let tokens = new FixtureTokenizer(\n      `foo: \\nbar :\\n  foo\\n    bar\\nbaz: {\"baz\": \"bat\"}`,\n    ).tokenize();\n    assert.deepEqual(tokens, [\n      {type: 'filename', value: 'foo'},\n      {type: 'content', value: ''},\n      {type: 'filename', value: 'bar'},\n      {type: 'content', value: 'foo\\n  bar'},\n      {type: 'filename', value: 'baz'},\n      {type: 'content', value: '{\"baz\": \"bat\"}'},\n    ]);\n  });\n\n  it('tokenizes a link', () => {\n    let tokens = new FixtureTokenizer('foo -> bar/bat\\nbat->baz').tokenize();\n    assert.deepEqual(tokens, [\n      {type: 'filename', value: 'foo'},\n      {type: 'link', value: 'bar/bat'},\n      {type: 'filename', value: 'bat'},\n      {type: 'link', value: 'baz'},\n    ]);\n  });\n\n  it('tokenizes nested files', () => {\n    let tokens = new FixtureTokenizer(\n      'foo\\n  bar:\\n    bar\\nfoo/baz/bat: bat\\n    qux:\\n      qux',\n    ).tokenize();\n    assert.deepEqual(tokens, [\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: ''},\n      {type: 'filename', value: 'bar'},\n      {type: 'content', value: 'bar'},\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n      {type: 'dirname', value: 'baz'},\n      {type: 'nest', value: '/'},\n      {type: 'filename', value: 'bat'},\n      {type: 'content', value: 'bat\\n  qux:\\n    qux'},\n    ]);\n  });\n\n  it('tokenizes nested links', () => {\n    let tokens = new FixtureTokenizer(\n      'foo\\n  bar -> foo/baz\\nfoo/baz -> bat\\n  bat -> foo',\n    ).tokenize();\n    assert.deepEqual(tokens, [\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: ''},\n      {type: 'filename', value: 'bar'},\n      {type: 'link', value: 'foo/baz'},\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n      {type: 'filename', value: 'baz'},\n      {type: 'link', value: 'bat'},\n      {type: 'nest', value: ''},\n      {type: 'filename', value: 'bat'},\n      {type: 'link', value: 'foo'},\n    ]);\n  });\n\n  it('tokenizes multiline file contents', () => {\n    let tokens = new FixtureTokenizer(dedentRaw`\n      app\n        foo.js:\n          export function foo() {\n            return \"foo\";\n          }\n        bar.js:\n          import foo from \"foo\";\n\n          export function bar() {\n            return \\`\\${foo()} bar\\`;\n          }\n        `).tokenize();\n\n    assert.deepEqual(tokens, [\n      {type: 'dirname', value: 'app'},\n      {type: 'nest', value: ''},\n      {type: 'filename', value: 'foo.js'},\n      {type: 'content', value: 'export function foo() {\\n  return \"foo\";\\n}'},\n      {type: 'nest', value: ''},\n      {type: 'filename', value: 'bar.js'},\n      {\n        type: 'content',\n        value:\n          'import foo from \"foo\";\\n\\nexport function bar() {\\n  return `${foo()} bar`;\\n}',\n      },\n    ]);\n  });\n\n  it('tokenizes windows paths', () => {\n    let tokens = new FixtureTokenizer(dedentRaw`\n      foo\\\\bar\n        bat:\n        baz -> foo\\\\bar\\\\bat\n    `).tokenize();\n    assert.deepEqual(tokens, [\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n      {type: 'dirname', value: 'bar'},\n      {type: 'nest', value: ''},\n      {type: 'filename', value: 'bat'},\n      {type: 'content', value: ''},\n      {type: 'nest', value: ''},\n      {type: 'filename', value: 'baz'},\n      {type: 'link', value: 'foo/bar/bat'},\n    ]);\n  });\n  it('ignores empty lines after dirnames', () => {\n    let tokens = new FixtureTokenizer(`lib\\n  \\n  \\n  nested`).tokenize();\n\n    assert.deepEqual(tokens, [\n      {type: 'dirname', value: 'lib'},\n      {type: 'nest', value: ''},\n      {type: 'dirname', value: 'nested'},\n    ]);\n  });\n\n  it('ignores empty lines after links', () => {\n    let tokens = new FixtureTokenizer(`lib -> ./lib2\\n \\nlib2`).tokenize();\n\n    assert.deepEqual(tokens, [\n      {type: 'filename', value: 'lib'},\n      {type: 'link', value: './lib2'},\n      {type: 'dirname', value: 'lib2'},\n    ]);\n  });\n\n  it('ignores empty lines after file content', () => {\n    let tokens = new FixtureTokenizer(\n      `file:\\n  \\n  content\\n\\n  \\ndir`,\n    ).tokenize();\n\n    assert.deepEqual(tokens, [\n      {type: 'filename', value: 'file'},\n      {type: 'content', value: 'content'},\n      {type: 'dirname', value: 'dir'},\n    ]);\n  });\n});\n\ndescribe('FixtureParser', () => {\n  it('errors on a filename without content or link', () => {\n    let result = new FixtureParser([{type: 'filename', value: 'foo'}]);\n    assert.throws(() => result.parse(), /Expected content or link token/);\n  });\n\n  it('errors on content or link without preceeding filename', () => {\n    let result = new FixtureParser([{type: 'content', value: ''}]);\n    assert.throws(() => result.parse(), /Unexpected content token/);\n    result = new FixtureParser([{type: 'link', value: 'foo'}]);\n    assert.throws(() => result.parse(), /Unexpected link token/);\n  });\n\n  it('errors on invalid nesting', () => {\n    let result = new FixtureParser([\n      {type: 'filename', value: 'foo'},\n      {type: 'content', value: ''},\n      {type: 'nest', value: ''},\n    ]);\n    assert.throws(() => result.parse(), /Invalid nesting/);\n\n    result = new FixtureParser([\n      {type: 'filename', value: 'foo'},\n      {type: 'link', value: 'bar'},\n      {type: 'nest', value: ''},\n    ]);\n    assert.throws(() => result.parse(), /Invalid nesting/);\n\n    result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: ''},\n      {type: 'nest', value: ''},\n    ]);\n    assert.throws(() => result.parse(), /Invalid nesting/);\n\n    result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n      {type: 'filename', value: 'bar'},\n      {type: 'link', value: 'foo/bat'},\n      {type: 'nest', value: ''},\n    ]);\n    assert.throws(() => result.parse(), /Invalid nesting/);\n\n    result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n      {type: 'filename', value: 'bar'},\n      {type: 'content', value: ''},\n      {type: 'nest', value: ''},\n    ]);\n    assert.throws(() => result.parse(), /Invalid nesting/);\n\n    result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n      {type: 'nest', value: ''},\n    ]);\n    assert.throws(() => result.parse(), /Unexpected indent/);\n\n    result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n      {type: 'nest', value: '/'},\n    ]);\n    assert.throws(() => result.parse(), /Unexpected segment/);\n\n    result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: ''},\n      {type: 'nest', value: '/'},\n    ]);\n    assert.throws(() => result.parse(), /Unexpected segment/);\n\n    result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: ''},\n    ]);\n    assert.throws(() => result.parse(), /Unexpected undefined/);\n\n    result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n    ]);\n    assert.throws(() => result.parse(), /Unexpected undefined/);\n  });\n\n  it('parses a dirname', () => {\n    let result = new FixtureParser([{type: 'dirname', value: 'foo'}]).parse();\n\n    let expected = new FixtureRoot();\n    expected.children.push(new FixtureDir('foo'));\n\n    assert.deepEqual(result, expected);\n  });\n\n  it('parses a filename', () => {\n    // foo: \"bar\"\n    let result = new FixtureParser([\n      {type: 'filename', value: 'foo'},\n      {type: 'content', value: 'bar'},\n    ]).parse();\n\n    let expected = new FixtureRoot();\n    expected.children.push(new FixtureFile('foo', 'bar'));\n\n    assert.deepEqual(result, expected);\n  });\n\n  it('parses a link', () => {\n    // foo -> bar\n    let result = new FixtureParser([\n      {type: 'filename', value: 'foo'},\n      {type: 'link', value: 'bar'},\n    ]).parse();\n\n    let expected = new FixtureRoot();\n    expected.children.push(new FixtureLink('foo', 'bar'));\n\n    assert.deepEqual(result, expected);\n  });\n\n  it('parses nested dirs', () => {\n    // foo\n    // bar\n    //   bat\n    //   bat/baz\n    //     qux\n    //   quux\n    let result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'dirname', value: 'bar'},\n      {type: 'nest', value: ''},\n      {type: 'dirname', value: 'bat'},\n      {type: 'nest', value: ''},\n      {type: 'dirname', value: 'bat'},\n      {type: 'nest', value: '/'},\n      {type: 'dirname', value: 'baz'},\n      {type: 'nest', value: ''},\n      {type: 'nest', value: ''},\n      {type: 'dirname', value: 'qux'},\n      {type: 'nest', value: ''},\n      {type: 'dirname', value: 'quux'},\n    ]).parse();\n\n    let expected = new FixtureRoot();\n    let bar, bat, baz;\n    expected.children.push(new FixtureDir('foo'));\n    expected.children.push((bar = new FixtureDir('bar')));\n    bar.children.push(new FixtureDir('bat'));\n    bar.children.push((bat = new FixtureDir('bat')));\n    bat.children.push((baz = new FixtureDir('baz')));\n    baz.children.push(new FixtureDir('qux'));\n    bar.children.push(new FixtureDir('quux'));\n\n    assert.deepEqual(result, expected);\n  });\n\n  it('parses nested files and links', () => {\n    // foo\n    //   bar: \"bar\"\n    //   bat\n    //     qux -> qux\n    //   bat/qux: \"qux\"\n    // foo/bar -> foo/bat\n    let result = new FixtureParser([\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: ''},\n      {type: 'filename', value: 'bar'},\n      {type: 'content', value: 'bar'},\n      {type: 'nest', value: ''},\n      {type: 'dirname', value: 'bat'},\n      {type: 'nest', value: ''},\n      {type: 'nest', value: ''},\n      {type: 'filename', value: 'qux'},\n      {type: 'link', value: 'qux'},\n      {type: 'nest', value: ''},\n      {type: 'dirname', value: 'bat'},\n      {type: 'nest', value: '/'},\n      {type: 'filename', value: 'qux'},\n      {type: 'content', value: 'qux'},\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: '/'},\n      {type: 'filename', value: 'bar'},\n      {type: 'link', value: 'foo/bat'},\n    ]).parse();\n\n    let expected = new FixtureRoot();\n    let foo, bat;\n\n    expected.children.push((foo = new FixtureDir('foo')));\n    foo.children.push(new FixtureFile('bar', 'bar'));\n    foo.children.push((bat = new FixtureDir('bat')));\n    bat.children.push(new FixtureLink('qux', 'qux'));\n    foo.children.push((bat = new FixtureDir('bat')));\n    bat.children.push(new FixtureFile('qux', 'qux'));\n    expected.children.push((foo = new FixtureDir('foo')));\n    foo.children.push(new FixtureLink('bar', 'foo/bat'));\n\n    assert.deepEqual(result, expected);\n  });\n\n  it('parses a leading /', () => {\n    // /foo\n    //   bar\n    // /bat\n    //   /baz/qux\n    let result = new FixtureParser([\n      {type: 'nest', value: '/'},\n      {type: 'dirname', value: 'foo'},\n      {type: 'nest', value: ''},\n      {type: 'dirname', value: 'bar'},\n      {type: 'nest', value: '/'},\n      {type: 'dirname', value: 'bat'},\n      {type: 'nest', value: '/'},\n      {type: 'dirname', value: 'baz'},\n      {type: 'nest', value: '/'},\n      {type: 'dirname', value: 'qux'},\n    ]).parse();\n\n    let expected = new FixtureRoot();\n    let foo, bar, bat, baz;\n    expected.children.push((foo = new FixtureDir('foo')));\n    foo.children.push((bar = new FixtureDir('bar')));\n    bar.children.push((bat = new FixtureDir('bat')));\n    bat.children.push((baz = new FixtureDir('baz')));\n    baz.children.push(new FixtureDir('qux'));\n\n    assert.deepEqual(result, expected);\n  });\n});\n\ndescribe('fsFixture', () => {\n  let fs;\n  let workerFarm;\n\n  beforeEach(() => {\n    workerFarm = new WorkerFarm({\n      workerPath: require.resolve('@parcel/core/src/worker.js'),\n    });\n    fs = new MemoryFS(workerFarm);\n  });\n\n  afterEach(async () => {\n    await workerFarm.end();\n  });\n\n  it('applies a fixture with nesting and overwriting', async () => {\n    await fsFixture(fs)`\n      foo\n        bar: bar\n        bat\n          qux -> qux\n        bat/qux: qux\n      foo/bar -> foo/bat\n    `;\n\n    assert.equal(fs.realpathSync('foo/bar'), path.resolve('/foo/bat'));\n    assert(fs.readFileSync('foo/bat/qux', 'utf8'), 'qux');\n    assert(fs.readFileSync('foo/bar/qux', 'utf8'), 'qux');\n  });\n\n  it('applies a fixture with expressions', async () => {\n    await fsFixture(fs)`\n      app\n        yarn.lock:\n        node_modules\n          .bin\n            parcel -> ${path.resolve(__dirname, '../../parcel/src/bin.js')}\n          parcel -> ${path.resolve(__dirname, '../../parcel')}\n          @parcel\n            core -> ${path.resolve(__dirname, '../../core')}\n        .parcelrc: ${{\n          extends: '@parcel/config-default',\n          transforms: ['parcel-transformer-custom', '...'],\n        }}\n    `;\n\n    assert(fs.existsSync('/app'));\n\n    assert.equal(fs.readFileSync('/app/yarn.lock', 'utf8'), '');\n\n    assert.equal(\n      fs.readFileSync('/app/.parcelrc', 'utf8'),\n      JSON.stringify({\n        extends: '@parcel/config-default',\n        transforms: ['parcel-transformer-custom', '...'],\n      }),\n    );\n\n    assert(fs.existsSync('/app/node_modules'));\n\n    assert.equal(\n      fs.realpathSync('/app/node_modules/.bin/parcel'),\n      path.resolve(__dirname, '../../parcel/src/bin.js'),\n    );\n\n    assert.equal(\n      fs.realpathSync('/app/node_modules/parcel'),\n      path.resolve(__dirname, '../../parcel'),\n    );\n\n    assert.equal(\n      fs.realpathSync('/app/node_modules/@parcel/core'),\n      path.resolve(__dirname, '../../core'),\n    );\n  });\n\n  it('applies a fixture with multiline file contents', async () => {\n    await fsFixture(fs)`\n      app\n        foo.js:\n          export function foo() {\n            return \"foo\";\n          }\n        bar.js:\n          import foo from \"foo\";\n\n          export function bar() {\n            return \\`\\${foo()} bar\\`\n          }`;\n\n    assert.equal(\n      fs.readFileSync('/app/foo.js', 'utf8'),\n      `export function foo() {\\n  return \"foo\";\\n}`,\n    );\n\n    assert.equal(\n      fs.readFileSync('/app/bar.js', 'utf8'),\n      `import foo from \"foo\";\\n\\nexport function bar() {\\n  return \\`\\${foo()} bar\\`\\n}`,\n    );\n  });\n\n  it('applies a fixture with windows paths', async () => {\n    await fsFixture(fs)`\n      foo\\\\bar\n        bat:\n        baz -> D:\\\\foo\\\\bar\\\\bat`;\n\n    assert(fs.existsSync('/foo/bar/bat'));\n    assert.equal(fs.realpathSync('/foo/bar/baz'), path.resolve('/foo/bar/bat'));\n  });\n});\n\ndescribe('toFixture', () => {\n  let fs;\n  let workerFarm;\n\n  beforeEach(() => {\n    workerFarm = new WorkerFarm({\n      workerPath: require.resolve('@parcel/core/src/worker.js'),\n    });\n    fs = new MemoryFS(workerFarm);\n  });\n\n  afterEach(async () => {\n    await workerFarm.end();\n  });\n\n  it('errors for invalid cwd', async () => {\n    await fs.mkdirp('/foo');\n    await fs.writeFile('/foo/bar', 'bar');\n    await fs.symlink('/foo/bar', '/foo/bat');\n\n    // $FlowFixMe[prop-missing]\n    assert.rejects(() => toFixture(fs, '/bar'), /bar does not exist/);\n\n    // $FlowFixMe[prop-missing]\n    assert.rejects(() => toFixture(fs, '/foo/bar'), /to be a directory/);\n\n    // $FlowFixMe[prop-missing]\n    assert.rejects(() => toFixture(fs, '/foo/bat'), /to be a directory/);\n  });\n\n  it('creates a fixture from an fs', async () => {\n    await fs.mkdirp('/foo');\n    await fs.writeFile('/foo/bar', 'bar');\n    await fs.symlink('/foo/bar', '/foo/bat');\n\n    let fixture = await toFixture(fs);\n\n    assert.deepEqual(fixture, {\n      type: 'root',\n      children: [\n        {\n          type: 'dir',\n          name: 'foo',\n          children: [\n            {type: 'file', name: 'bar', content: 'bar'},\n            {type: 'link', name: 'bat', target: '/foo/bar'},\n          ],\n        },\n      ],\n    });\n\n    assert.equal(fixture.toString(), `foo\\n  bar:\\n    bar\\n  bat -> /foo/bar`);\n  });\n\n  it('creates a fixture from an fs with a cwd', async () => {\n    await fs.mkdirp('/foo');\n    await fs.writeFile('/foo/bar', 'bar');\n    await fs.symlink('/foo/bar', '/foo/bat');\n\n    let fixture = await toFixture(fs, 'foo');\n\n    assert.deepEqual(fixture, {\n      type: 'root',\n      children: [\n        {type: 'file', name: 'bar', content: 'bar'},\n        {type: 'link', name: 'bat', target: '/foo/bar'},\n      ],\n    });\n\n    assert.equal(fixture.toString(), `bar:\\n  bar\\nbat -> /foo/bar`);\n  });\n\n  it('includes the directory name in the fixture', async () => {\n    await fs.mkdirp('/foo');\n    await fs.writeFile('/foo/bar', 'bar');\n    await fs.symlink('/foo/bar', '/foo/bat');\n\n    let fixture = await toFixture(fs, 'foo', true);\n\n    assert.deepEqual(fixture, {\n      type: 'root',\n      children: [\n        {\n          type: 'dir',\n          name: 'foo',\n          children: [\n            {type: 'file', name: 'bar', content: 'bar'},\n            {type: 'link', name: 'bat', target: '/foo/bar'},\n          ],\n        },\n      ],\n    });\n\n    assert.equal(fixture.toString(), `foo\\n  bar:\\n    bar\\n  bat -> /foo/bar`);\n  });\n});\n"
  },
  {
    "path": "packages/core/types/package.json",
    "content": "{\n  \"name\": \"@parcel/types\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"main\": \"src/index.js\",\n  \"types\": \"lib/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"scripts\": {\n    \"build-ts\": \"mkdir -p lib ; flow-to-ts src/index.js > lib/index.d.ts\",\n    \"check-ts\": \"tsc --noEmit lib/index.d.ts\"\n  },\n  \"dependencies\": {\n    \"@parcel/types-internal\": \"2.16.4\",\n    \"@parcel/workers\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/core/types/src/index.js",
    "content": "// @flow strict-local\n\nimport type WorkerFarm from '@parcel/workers';\nimport type {InitialParcelOptionsInternal} from '@parcel/types-internal';\n\nexport type * from '@parcel/types-internal';\n\nexport type InitialParcelOptions = InitialParcelOptionsInternal<WorkerFarm>;\n"
  },
  {
    "path": "packages/core/types-internal/package.json",
    "content": "{\n  \"name\": \"@parcel/types-internal\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"main\": \"src/index.js\",\n  \"types\": \"lib/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"scripts\": {\n    \"build-ts\": \"./scripts/build-ts.sh\",\n    \"check-ts\": \"tsc --noEmit lib/index.d.ts\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/feature-flags\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"utility-types\": \"^3.11.0\"\n  }\n}\n"
  },
  {
    "path": "packages/core/types-internal/scripts/build-ts.js",
    "content": "const fs = require('fs');\nconst path = require('path');\n\nconst typesPath = path.join(__dirname, '../lib/index.d.ts');\n\nlet contents = fs.readFileSync(typesPath, 'utf8');\n// Some fixups of flow-to-ts output\ncontents = contents.replace(\n  'Record<string, JSONValue>',\n  '{[key: string]: JSONValue}',\n);\ncontents = contents.replace(/\\$ReadOnlyMap/g, 'ReadonlyMap');\ncontents = contents.replace(/\\$ReadOnlySet/g, 'ReadonlySet');\ncontents = contents.replace(/\\$Partial/g, 'Partial');\n\nfs.writeFileSync(typesPath, contents);\n"
  },
  {
    "path": "packages/core/types-internal/scripts/build-ts.sh",
    "content": "#!/bin/bash\nset -x\nset -e\n\nmkdir -p lib\n\nfor file in src/*.js; do\n  npx flow-to-ts $file > lib/$(basename $file .js).d.ts\ndone\n\nnode ./scripts/build-ts.js\n"
  },
  {
    "path": "packages/core/types-internal/src/Cache.js",
    "content": "// @flow strict-local\n\nimport type {Readable} from 'stream';\n\nexport interface Cache {\n  ensure(): Promise<void>;\n  has(key: string): Promise<boolean>;\n  get<T>(key: string): Promise<?T>;\n  set(key: string, value: mixed): Promise<void>;\n  getStream(key: string): Readable;\n  setStream(key: string, stream: Readable): Promise<void>;\n  getBlob(key: string): Promise<Buffer>;\n  setBlob(key: string, contents: Buffer | string): Promise<void>;\n  hasLargeBlob(key: string): Promise<boolean>;\n  getLargeBlob(key: string): Promise<Buffer>;\n  setLargeBlob(\n    key: string,\n    contents: Buffer | string,\n    options?: {|signal?: AbortSignal|},\n  ): Promise<void>;\n  deleteLargeBlob(key: string): Promise<void>;\n  getBuffer(key: string): Promise<?Buffer>;\n  /**\n   * In a multi-threaded environment, where there are potentially multiple Cache\n   * instances writing to the cache, ensure that this instance has the latest view\n   * of the changes that may have been written to the cache in other threads.\n   */\n  refresh(): void;\n}\n"
  },
  {
    "path": "packages/core/types-internal/src/DependencySpecifier.js",
    "content": "// @flow strict-local\n\n/** See Dependency */\nexport type DependencySpecifier = string;\n"
  },
  {
    "path": "packages/core/types-internal/src/FileCreateInvalidation.js",
    "content": "// @flow\n\nimport type {Glob} from './Glob';\nimport type {FilePath} from './FilePath';\n\nexport type GlobInvalidation = {|\n  glob: Glob,\n|};\n\nexport type FileInvalidation = {|\n  filePath: FilePath,\n|};\n\nexport type FileAboveInvalidation = {|\n  fileName: string,\n  aboveFilePath: FilePath,\n|};\n\nexport type FileCreateInvalidation =\n  | FileInvalidation\n  | GlobInvalidation\n  | FileAboveInvalidation;\n"
  },
  {
    "path": "packages/core/types-internal/src/FilePath.js",
    "content": "// @flow strict-local\n\nexport type FilePath = string;\n"
  },
  {
    "path": "packages/core/types-internal/src/FileSystem.js",
    "content": "// @flow\nimport type {FilePath} from './FilePath';\nimport type {Readable, Writable} from 'stream';\nimport type {\n  Event,\n  Options as WatcherOptions,\n  AsyncSubscription,\n} from '@parcel/watcher';\n\nexport type FileOptions = {mode?: number, ...};\nexport type ReaddirOptions =\n  | {withFileTypes?: false, ...}\n  | {withFileTypes: true, ...};\n\nexport interface Stats {\n  dev: number;\n  ino: number;\n  mode: number;\n  nlink: number;\n  uid: number;\n  gid: number;\n  rdev: number;\n  size: number;\n  blksize: number;\n  blocks: number;\n  atimeMs: number;\n  mtimeMs: number;\n  ctimeMs: number;\n  birthtimeMs: number;\n  atime: Date;\n  mtime: Date;\n  ctime: Date;\n  birthtime: Date;\n\n  isFile(): boolean;\n  isDirectory(): boolean;\n  isBlockDevice(): boolean;\n  isCharacterDevice(): boolean;\n  isSymbolicLink(): boolean;\n  isFIFO(): boolean;\n  isSocket(): boolean;\n}\n\nexport type Encoding =\n  | 'hex'\n  | 'utf8'\n  | 'utf-8'\n  | 'ascii'\n  | 'binary'\n  | 'base64'\n  | 'ucs2'\n  | 'ucs-2'\n  | 'utf16le'\n  | 'latin1';\n\nexport interface FileSystem {\n  readFile(filePath: FilePath): Promise<Buffer>;\n  readFile(filePath: FilePath, encoding: Encoding): Promise<string>;\n  readFileSync(filePath: FilePath): Buffer;\n  readFileSync(filePath: FilePath, encoding: Encoding): string;\n  writeFile(\n    filePath: FilePath,\n    contents: Buffer | string,\n    options: ?FileOptions,\n  ): Promise<void>;\n  copyFile(\n    source: FilePath,\n    destination: FilePath,\n    flags?: number,\n  ): Promise<void>;\n  stat(filePath: FilePath): Promise<Stats>;\n  statSync(filePath: FilePath): Stats;\n  lstat(filePath: FilePath): Promise<Stats>;\n  lstatSync(filePath: FilePath): Stats;\n  readdir(\n    path: FilePath,\n    opts?: {withFileTypes?: false, ...},\n  ): Promise<FilePath[]>;\n  readdir(path: FilePath, opts: {withFileTypes: true, ...}): Promise<Dirent[]>;\n  readdirSync(path: FilePath, opts?: {withFileTypes?: false, ...}): FilePath[];\n  readdirSync(path: FilePath, opts: {withFileTypes: true, ...}): Dirent[];\n  symlink(target: FilePath, path: FilePath): Promise<void>;\n  unlink(path: FilePath): Promise<void>;\n  realpath(path: FilePath): Promise<FilePath>;\n  realpathSync(path: FilePath): FilePath;\n  readlink(path: FilePath): Promise<FilePath>;\n  readlinkSync(path: FilePath): FilePath;\n  exists(path: FilePath): Promise<boolean>;\n  existsSync(path: FilePath): boolean;\n  mkdirp(path: FilePath): Promise<void>;\n  rimraf(path: FilePath): Promise<void>;\n  ncp(source: FilePath, destination: FilePath): Promise<void>;\n  createReadStream(path: FilePath, options?: ?FileOptions): Readable;\n  createWriteStream(path: FilePath, options?: ?FileOptions): Writable;\n  cwd(): FilePath;\n  chdir(dir: FilePath): void;\n  watch(\n    dir: FilePath,\n    fn: (err: ?Error, events: Array<Event>) => mixed,\n    opts: WatcherOptions,\n  ): Promise<AsyncSubscription>;\n  getEventsSince(\n    dir: FilePath,\n    snapshot: FilePath,\n    opts: WatcherOptions,\n  ): Promise<Array<Event>>;\n  writeSnapshot(\n    dir: FilePath,\n    snapshot: FilePath,\n    opts: WatcherOptions,\n  ): Promise<void>;\n  findAncestorFile(\n    fileNames: Array<string>,\n    fromDir: FilePath,\n    root: FilePath,\n  ): ?FilePath;\n  findNodeModule(moduleName: string, fromDir: FilePath): ?FilePath;\n  findFirstFile(filePaths: Array<FilePath>): ?FilePath;\n}\n\n// https://nodejs.org/api/fs.html#fs_class_fs_dirent\nexport interface Dirent {\n  +name: string;\n  isBlockDevice(): boolean;\n  isCharacterDevice(): boolean;\n  isDirectory(): boolean;\n  isFIFO(): boolean;\n  isFile(): boolean;\n  isSocket(): boolean;\n  isSymbolicLink(): boolean;\n}\n"
  },
  {
    "path": "packages/core/types-internal/src/Glob.js",
    "content": "// @flow strict-local\n\nexport type Glob = string;\n"
  },
  {
    "path": "packages/core/types-internal/src/PackageManager.js",
    "content": "// @flow\n\nimport type {FileCreateInvalidation, PackageJSON} from './index';\nimport type {SemverRange} from './SemverRange';\nimport type {DependencySpecifier} from './DependencySpecifier';\nimport type {FileSystem} from './FileSystem';\nimport type {FilePath} from './FilePath';\n\nexport type PackageManagerResolveResult = {|\n  resolved: FilePath | DependencySpecifier,\n  pkg?: ?PackageJSON,\n  invalidateOnFileCreate: Array<FileCreateInvalidation>,\n  invalidateOnFileChange: Set<FilePath>,\n  type: number,\n|};\n\nexport type InstallOptions = {\n  installPeers?: boolean,\n  saveDev?: boolean,\n  packageInstaller?: ?PackageInstaller,\n  ...\n};\n\nexport type InstallerOptions = {|\n  modules: Array<ModuleRequest>,\n  fs: FileSystem,\n  cwd: FilePath,\n  packagePath?: ?FilePath,\n  saveDev?: boolean,\n|};\n\nexport interface PackageInstaller {\n  install(opts: InstallerOptions): Promise<void>;\n}\n\nexport type Invalidations = {|\n  invalidateOnFileCreate: Array<FileCreateInvalidation>,\n  invalidateOnFileChange: Set<FilePath>,\n  invalidateOnStartup: boolean,\n|};\n\nexport interface PackageManager {\n  require(\n    id: DependencySpecifier,\n    from: FilePath,\n    ?{|range?: ?SemverRange, shouldAutoInstall?: boolean, saveDev?: boolean|},\n  ): Promise<any>;\n  resolve(\n    id: DependencySpecifier,\n    from: FilePath,\n    ?{|range?: ?SemverRange, shouldAutoInstall?: boolean, saveDev?: boolean|},\n  ): Promise<PackageManagerResolveResult>;\n  getInvalidations(id: DependencySpecifier, from: FilePath): Invalidations;\n  invalidate(id: DependencySpecifier, from: FilePath): void;\n}\n\nexport type ModuleRequest = {|\n  +name: string,\n  +range: ?SemverRange,\n|};\n"
  },
  {
    "path": "packages/core/types-internal/src/PackageName.js",
    "content": "// @flow strict-local\n\nexport type PackageName = string;\n"
  },
  {
    "path": "packages/core/types-internal/src/SemverRange.js",
    "content": "// @flow strict-local\n\nexport type SemverRange = string;\n"
  },
  {
    "path": "packages/core/types-internal/src/index.js",
    "content": "// @flow strict-local\n\nimport type {Readable} from 'stream';\nimport type SourceMap from '@parcel/source-map';\nimport type {\n  Diagnostic,\n  Diagnostifiable,\n  DiagnosticWithoutOrigin,\n} from '@parcel/diagnostic';\nimport type {FeatureFlags} from '@parcel/feature-flags';\nimport type {Event, BackendType} from '@parcel/watcher';\n\nimport type {Cache} from './Cache';\nimport type {\n  FileSystem,\n  FileOptions,\n  Stats as FileStats,\n  ReaddirOptions,\n  Encoding,\n  Dirent,\n} from './FileSystem';\nimport type {AST as _AST, ConfigResult as _ConfigResult} from './unsafe';\nimport type {FilePath} from './FilePath';\nimport type {Glob} from './Glob';\nimport type {PackageName} from './PackageName';\nimport type {\n  PackageManager,\n  PackageManagerResolveResult,\n  Invalidations,\n  PackageInstaller,\n  ModuleRequest,\n  InstallOptions,\n  InstallerOptions,\n} from './PackageManager';\nimport type {SemverRange} from './SemverRange';\nimport type {DependencySpecifier} from './DependencySpecifier';\nimport type {\n  FileCreateInvalidation,\n  GlobInvalidation,\n  FileInvalidation,\n  FileAboveInvalidation,\n} from './FileCreateInvalidation';\n\nexport interface TraceMeasurement {\n  end(): void;\n}\n\nexport type {\n  FilePath,\n  FileSystem,\n  FileOptions,\n  FileStats,\n  ReaddirOptions,\n  Encoding,\n  Dirent,\n  PackageName,\n  Glob,\n  DependencySpecifier,\n  SemverRange,\n  FileCreateInvalidation,\n  GlobInvalidation,\n  FileInvalidation,\n  FileAboveInvalidation,\n  PackageManager,\n  PackageManagerResolveResult,\n  Invalidations,\n  PackageInstaller,\n  ModuleRequest,\n  InstallOptions,\n  InstallerOptions,\n  Cache,\n};\n\n/** Plugin-specific AST, <code>any</code> */\nexport type AST = _AST;\nexport type ConfigResult = _ConfigResult;\n/** Plugin-specific config result, <code>any</code> */\nexport type ConfigResultWithFilePath<T> = {|\n  contents: T,\n  filePath: FilePath,\n|};\n/** <code>process.env</code> */\nexport type EnvMap = typeof process.env;\n\nexport type JSONValue =\n  | null\n  | void // ? Is this okay?\n  | boolean\n  | number\n  | string\n  | Array<JSONValue>\n  | JSONObject;\n\n/** A JSON object (as in \"map\") */\nexport type JSONObject = {[key: string]: JSONValue, ...};\n\nexport type Semver = string;\n/** A pipeline as specified in the config mapping to <code>T</code>  */\nexport type GlobMap<T> = {[Glob]: T, ...};\n\nexport type RawParcelConfigPipeline = Array<PackageName>;\n\nexport type HMROptions = {\n  port?: number,\n  host?: string,\n  cors?: boolean,\n  ...\n};\n\n/** The format of .parcelrc  */\nexport type RawParcelConfig = {|\n  extends?: PackageName | FilePath | Array<PackageName | FilePath>,\n  resolvers?: RawParcelConfigPipeline,\n  transformers?: {[Glob]: RawParcelConfigPipeline, ...},\n  bundler?: PackageName,\n  namers?: RawParcelConfigPipeline,\n  runtimes?: RawParcelConfigPipeline,\n  packagers?: {[Glob]: PackageName, ...},\n  optimizers?: {[Glob]: RawParcelConfigPipeline, ...},\n  compressors?: {[Glob]: RawParcelConfigPipeline, ...},\n  reporters?: RawParcelConfigPipeline,\n  validators?: {[Glob]: RawParcelConfigPipeline, ...},\n|};\n\n/** A .parcelrc where all package names are resolved */\nexport type ResolvedParcelConfigFile = {|\n  ...RawParcelConfig,\n  +filePath: FilePath,\n  +resolveFrom?: FilePath,\n|};\n\n/** Corresponds to <code>pkg#engines</code> */\nexport type Engines = {\n  +browsers?: string | Array<string>,\n  +electron?: SemverRange,\n  +node?: SemverRange,\n  +parcel?: SemverRange,\n  ...\n};\n\n/** Corresponds to <code>pkg#targets.*.sourceMap</code> */\nexport type TargetSourceMapOptions = {|\n  +sourceRoot?: string,\n  +inline?: boolean,\n  +inlineSources?: boolean,\n|};\n\n/**\n * A parsed version of PackageTargetDescriptor\n */\nexport interface Target {\n  /** The output filename of the entry */\n  +distEntry: ?FilePath;\n  /** The output folder */\n  +distDir: FilePath;\n  +env: Environment;\n  +name: string;\n  +publicUrl: string;\n  /** The location that created this Target, e.g. `package.json#main`*/\n  +loc: ?SourceLocation;\n}\n\n/** In which environment the output should run (influces e.g. bundle loaders) */\nexport type EnvironmentContext =\n  | 'browser'\n  | 'web-worker'\n  | 'service-worker'\n  | 'worklet'\n  | 'node'\n  | 'electron-main'\n  | 'electron-renderer'\n  | 'react-client'\n  | 'react-server';\n\n/** The JS module format for the bundle output */\nexport type OutputFormat = 'esmodule' | 'commonjs' | 'global';\n\n/**\n * The format of <code>pkg#targets.*</code>\n *\n * See Environment and Target.\n */\nexport type PackageTargetDescriptor = {|\n  +context?: EnvironmentContext,\n  +engines?: Engines,\n  +includeNodeModules?:\n    | boolean\n    | Array<PackageName>\n    | {[PackageName]: boolean, ...},\n  +outputFormat?: OutputFormat,\n  +publicUrl?: string,\n  +distDir?: FilePath,\n  +sourceMap?: boolean | TargetSourceMapOptions,\n  +isLibrary?: boolean,\n  +optimize?: boolean,\n  +scopeHoist?: boolean,\n  +source?: FilePath | Array<FilePath>,\n|};\n\n/**\n * The target format when using the JS API.\n *\n * (Same as PackageTargetDescriptor, but <code>distDir</code> is required.)\n */\nexport type TargetDescriptor = {|\n  ...PackageTargetDescriptor,\n  +distDir: FilePath,\n  +distEntry?: FilePath,\n|};\n\nexport type SourceType = 'script' | 'module';\n\n/**\n * This is used when creating an Environment (see that).\n */\nexport type EnvironmentOptions = {|\n  +context?: EnvironmentContext,\n  +engines?: Engines,\n  +includeNodeModules?:\n    | boolean\n    | Array<PackageName>\n    | {[PackageName]: boolean, ...},\n  +outputFormat?: OutputFormat,\n  +sourceType?: SourceType,\n  +isLibrary?: boolean,\n  +shouldOptimize?: boolean,\n  +shouldScopeHoist?: boolean,\n  +sourceMap?: ?TargetSourceMapOptions,\n  +loc?: ?SourceLocation,\n|};\n\n/**\n * A resolved browserslist, e.g.:\n * <pre><code>\n * {\n *   edge: '76',\n *   firefox: '67',\n *   chrome: '63',\n *   safari: '11.1',\n *   opera: '50',\n * }\n * </code></pre>\n */\nexport type VersionMap = {\n  [string]: string,\n  ...\n};\n\nexport type EnvironmentFeature =\n  | 'esmodules'\n  | 'dynamic-import'\n  | 'worker-module'\n  | 'service-worker-module'\n  | 'import-meta-url'\n  | 'import-meta-resolve'\n  | 'arrow-functions'\n  | 'global-this';\n\n/**\n * Defines the environment in for the output bundle\n */\nexport interface Environment {\n  +id: string;\n  +context: EnvironmentContext;\n  +engines: Engines;\n  /** Whether to include all/none packages \\\n   *  (<code>true / false</code>), an array of package names to include, or an object \\\n   *  (of a package is not specified, it's included).\n   */\n  +includeNodeModules:\n    | boolean\n    | Array<PackageName>\n    | {[PackageName]: boolean, ...};\n  +outputFormat: OutputFormat;\n  +sourceType: SourceType;\n  /** Whether this is a library build (e.g. less loaders) */\n  +isLibrary: boolean;\n  /** Whether the output should be minified. */\n  +shouldOptimize: boolean;\n  /** Whether scope hoisting is enabled. */\n  +shouldScopeHoist: boolean;\n  +sourceMap: ?TargetSourceMapOptions;\n  +loc: ?SourceLocation;\n\n  /** Whether <code>context</code> specifies a browser context. */\n  isBrowser(): boolean;\n  /** Whether <code>context</code> specifies a node context. */\n  isNode(): boolean;\n  /** Whether <code>context</code> specifies a server context. */\n  isServer(): boolean;\n  /** Whether <code>context</code> specifies an electron context. */\n  isElectron(): boolean;\n  /** Whether <code>context</code> specifies a worker context. */\n  isWorker(): boolean;\n  /** Whether <code>context</code> specifies a worklet context. */\n  isWorklet(): boolean;\n  /** Whether <code>context</code> specifies an isolated context (can't access other loaded ancestor bundles). */\n  isIsolated(): boolean;\n  matchesEngines(minVersions: VersionMap, defaultValue?: boolean): boolean;\n  supports(feature: EnvironmentFeature, defaultValue?: boolean): boolean;\n}\n\n/**\n * Format of <code>pkg#dependencies</code>, <code>pkg#devDependencies</code>, <code>pkg#peerDependencies</code>\n */\ntype PackageDependencies = {|\n  [PackageName]: Semver,\n|};\n\n/**\n * Format of <code>package.json</code>\n */\nexport type PackageJSON = {\n  name: PackageName,\n  version: Semver,\n  type?: 'module',\n  main?: FilePath,\n  module?: FilePath,\n  types?: FilePath,\n  browser?: FilePath | {[FilePath]: FilePath | boolean, ...},\n  source?: FilePath | Array<FilePath>,\n  alias?: {\n    [PackageName | FilePath | Glob]:\n      | PackageName\n      | FilePath\n      | {|global: string|},\n    ...\n  },\n  browserslist?: Array<string> | {[string]: Array<string>},\n  engines?: Engines,\n  targets?: {[string]: PackageTargetDescriptor, ...},\n  dependencies?: PackageDependencies,\n  devDependencies?: PackageDependencies,\n  peerDependencies?: PackageDependencies,\n  sideEffects?: boolean | FilePath | Array<FilePath>,\n  bin?: string | {|[string]: FilePath|},\n  ...\n};\n\nexport type LogLevel = 'none' | 'error' | 'warn' | 'info' | 'verbose';\nexport type BuildMode = 'development' | 'production' | string;\nexport type DetailedReportOptions = {|\n  assetsPerBundle?: number,\n|};\n\ndeclare type GlobPattern = string;\n\nexport type InitialParcelOptionsInternal<WorkerFarm> = {|\n  +entries?: FilePath | Array<FilePath>,\n  +config?: DependencySpecifier,\n  +defaultConfig?: DependencySpecifier,\n  +env?: EnvMap,\n  +targets?: ?(Array<string> | {+[string]: TargetDescriptor, ...}),\n\n  +shouldDisableCache?: boolean,\n  +cacheDir?: FilePath,\n  +watchDir?: FilePath,\n  +watchBackend?: BackendType,\n  +watchIgnore?: Array<FilePath | GlobPattern>,\n  +mode?: BuildMode,\n  +hmrOptions?: ?HMROptions,\n  +shouldContentHash?: boolean,\n  +serveOptions?: InitialServerOptions | false,\n  +shouldAutoInstall?: boolean,\n  +logLevel?: LogLevel,\n  +shouldProfile?: boolean,\n  +shouldTrace?: boolean,\n  +shouldPatchConsole?: boolean,\n  +shouldBuildLazily?: boolean,\n  +lazyIncludes?: string[],\n  +lazyExcludes?: string[],\n  +shouldBundleIncrementally?: boolean,\n  +unstableFileInvalidations?: Array<Event>,\n\n  +inputFS?: FileSystem,\n  +outputFS?: FileSystem,\n  +cache?: Cache,\n  +workerFarm?: WorkerFarm,\n  +packageManager?: PackageManager,\n  +detailedReport?: ?DetailedReportOptions,\n\n  +defaultTargetOptions?: {|\n    +shouldOptimize?: boolean,\n    +shouldScopeHoist?: boolean,\n    +sourceMaps?: boolean,\n    +publicUrl?: string,\n    +distDir?: FilePath,\n    +engines?: Engines,\n    +outputFormat?: OutputFormat,\n    +isLibrary?: boolean,\n  |},\n\n  +additionalReporters?: Array<{|\n    packageName: DependencySpecifier,\n    resolveFrom: FilePath,\n  |}>,\n\n  +featureFlags?: $Partial<FeatureFlags>,\n\n  // throwErrors\n  // global?\n|};\n\nexport type InitialServerOptions = {|\n  +publicUrl?: string,\n  +host?: string,\n  +port: number,\n  +https?: HTTPSOptions | boolean,\n  +cors?: boolean,\n|};\n\nexport interface PluginOptions {\n  +mode: BuildMode;\n  +parcelVersion: string;\n  +env: EnvMap;\n  +hmrOptions: ?HMROptions;\n  +serveOptions: ServerOptions | false;\n  +shouldBuildLazily: boolean;\n  +shouldAutoInstall: boolean;\n  +logLevel: LogLevel;\n  +projectRoot: FilePath;\n  +cacheDir: FilePath;\n  +inputFS: FileSystem;\n  +outputFS: FileSystem;\n  +packageManager: PackageManager;\n  +instanceId: string;\n  +detailedReport: ?DetailedReportOptions;\n  +featureFlags: FeatureFlags;\n}\n\nexport type ServerOptions = {|\n  +distDir: FilePath,\n  +host?: string,\n  +port: number,\n  +https?: HTTPSOptions | boolean,\n  +publicUrl?: string,\n  +cors?: boolean,\n|};\n\nexport type HTTPSOptions = {|\n  +cert: FilePath,\n  +key: FilePath,\n|};\n\n/**\n * Source locations are 1-based, meaning lines and columns start at 1\n */\nexport type SourceLocation = {|\n  +filePath: string,\n  /** inclusive */\n  +start: {|\n    +line: number,\n    +column: number,\n  |},\n  /** exclusive */\n  +end: {|\n    +line: number,\n    +column: number,\n  |},\n|};\n\n/**\n * An object that plugins can write arbitrary data to.\n */\nexport type Meta = JSONObject;\n\n/**\n * An identifier in an asset (likely imported/exported).\n */\nexport type Symbol = string;\n\n/**\n * A map of export names to the corresponding asset's local variable names.\n */\nexport interface AssetSymbols // eslint-disable-next-line no-undef\n  extends Iterable<\n    [Symbol, {|local: Symbol, loc: ?SourceLocation, meta?: ?Meta|}],\n  > {\n  /**\n   * The exports of the asset are unknown, rather than just empty.\n   * This is the default state.\n   */\n  +isCleared: boolean;\n  get(exportSymbol: Symbol): ?{|\n    local: Symbol,\n    loc: ?SourceLocation,\n    meta?: ?Meta,\n  |};\n  hasExportSymbol(exportSymbol: Symbol): boolean;\n  hasLocalSymbol(local: Symbol): boolean;\n  exportSymbols(): Iterable<Symbol>;\n}\n\nexport interface MutableAssetSymbols extends AssetSymbols {\n  /**\n   * Initializes the map, sets isCleared to false.\n   */\n  ensure(): void;\n  set(\n    exportSymbol: Symbol,\n    local: Symbol,\n    loc: ?SourceLocation,\n    meta?: ?Meta,\n  ): void;\n  delete(exportSymbol: Symbol): void;\n}\n\n/**\n * isWeak means: the symbol is not used by the parent asset itself and is merely reexported\n */\nexport interface MutableDependencySymbols // eslint-disable-next-line no-undef\n  extends Iterable<\n    [\n      Symbol,\n      {|local: Symbol, loc: ?SourceLocation, isWeak: boolean, meta?: ?Meta|},\n    ],\n  > {\n  /**\n   * Initializes the map, sets isCleared to false.\n   */\n  ensure(): void;\n  /**\n   * The symbols that are imports are unknown, rather than just empty.\n   * This is the default state.\n   */\n  +isCleared: boolean;\n  get(exportSymbol: Symbol): ?{|\n    local: Symbol,\n    loc: ?SourceLocation,\n    isWeak: boolean,\n    meta?: ?Meta,\n  |};\n  hasExportSymbol(exportSymbol: Symbol): boolean;\n  hasLocalSymbol(local: Symbol): boolean;\n  exportSymbols(): Iterable<Symbol>;\n  set(\n    exportSymbol: Symbol,\n    local: Symbol,\n    loc: ?SourceLocation,\n    isWeak: ?boolean,\n  ): void;\n  delete(exportSymbol: Symbol): void;\n}\n\nexport type DependencyPriority = 'sync' | 'parallel' | 'lazy';\nexport type SpecifierType = 'commonjs' | 'esm' | 'url' | 'custom';\n\n/**\n * Used when creating a Dependency, see that.\n * @section transformer\n */\nexport type DependencyOptions = {|\n  /** The specifier used to resolve the dependency. */\n  +specifier: DependencySpecifier,\n  /**\n   * How the specifier should be interpreted.\n   *   - esm: An ES module specifier. It is parsed as a URL, but bare specifiers are treated as node_modules.\n   *   - commonjs: A CommonJS specifier. It is not parsed as a URL.\n   *   - url: A URL that works as in a browser. Bare specifiers are treated as relative URLs.\n   *   - custom: A custom specifier. Must be handled by a custom resolver plugin.\n   */\n  +specifierType: SpecifierType,\n  /**\n   * When the dependency should be loaded.\n   *   - sync: The dependency should be resolvable synchronously. The resolved asset will be placed\n   *       in the same bundle as the parent, or another bundle that's already on the page.\n   *   - parallel: The dependency should be placed in a separate bundle that's loaded in parallel\n   *       with the current bundle.\n   *   - lazy: The dependency should be placed in a separate bundle that's loaded later.\n   * @default 'sync'\n   */\n  +priority?: DependencyPriority,\n  /**\n   * Controls the behavior of the bundle the resolved asset is placed into. Use in combination with `priority`\n   * to determine when the bundle is loaded.\n   *   - inline: The resolved asset will be placed into a new inline bundle. Inline bundles are not written\n   *       to a separate file, but embedded into the parent bundle.\n   *   - isolated: The resolved asset will be isolated from its parents in a separate bundle.\n   *       Shared assets will be duplicated.\n   */\n  +bundleBehavior?: BundleBehavior,\n  /**\n   * When the dependency is a bundle entry (priority is \"parallel\" or \"lazy\"), this controls the naming\n   * of that bundle. `needsStableName` indicates that the name should be stable over time, even when the\n   * content of the bundle changes. This is useful for entries that a user would manually enter the URL\n   * for, as well as for things like service workers or RSS feeds, where the URL must remain consistent\n   * over time.\n   */\n  +needsStableName?: boolean,\n  /** Whether the dependency is optional. If the dependency cannot be resolved, this will not fail the build. */\n  +isOptional?: boolean,\n  /** The location within the source file where the dependency was found. */\n  +loc?: ?SourceLocation,\n  /** The environment of the dependency. */\n  +env?: EnvironmentOptions,\n  /**\n   * A list of custom conditions to use when resolving package.json \"exports\" and \"imports\".\n   * This is combined with the conditions from the environment. However, it overrides the\n   * default \"import\" and \"require\" conditions inferred from the specifierType. To include those\n   * in addition to custom conditions, explicitly add them to this list.\n   */\n  +packageConditions?: Array<string>,\n  /** Plugin-specific metadata for the dependency. */\n  +meta?: Meta,\n  /** The pipeline defined in .parcelrc that the dependency should be processed with. */\n  +pipeline?: string,\n  /**\n   * The file path where the dependency should be resolved from.\n   * By default, this is the path of the source file where the dependency was specified.\n   */\n  +resolveFrom?: ?FilePath,\n  /** The semver version range expected for the dependency. */\n  +range?: ?SemverRange,\n  /** The symbols within the resolved module that the source file depends on. */\n  +symbols?: $ReadOnlyMap<\n    Symbol,\n    {|local: Symbol, loc: ?SourceLocation, isWeak: boolean, meta?: Meta|},\n  >,\n|};\n\n/**\n * A Dependency denotes a connection between two assets \\\n * (likely some effect from the importee is expected - be it a side effect or a value is being imported).\n *\n * @section transformer\n */\nexport interface Dependency {\n  /** The id of the dependency. */\n  +id: string;\n  /** The specifier used to resolve the dependency. */\n  +specifier: DependencySpecifier;\n  /**\n   * How the specifier should be interpreted.\n   *   - esm: An ES module specifier. It is parsed as a URL, but bare specifiers are treated as node_modules.\n   *   - commonjs: A CommonJS specifier. It is not parsed as a URL.\n   *   - url: A URL that works as in a browser. Bare specifiers are treated as relative URLs.\n   *   - custom: A custom specifier. Must be handled by a custom resolver plugin.\n   */\n  +specifierType: SpecifierType;\n  /**\n   * When the dependency should be loaded.\n   *   - sync: The dependency should be resolvable synchronously. The resolved asset will be placed\n   *       in the same bundle as the parent, or another bundle that's already on the page.\n   *   - parallel: The dependency should be placed in a separate bundle that's loaded in parallel\n   *       with the current bundle.\n   *   - lazy: The dependency should be placed in a separate bundle that's loaded later.\n   * @default 'sync'\n   */\n  +priority: DependencyPriority;\n  /**\n   * Controls the behavior of the bundle the resolved asset is placed into. Use in combination with `priority`\n   * to determine when the bundle is loaded.\n   *   - inline: The resolved asset will be placed into a new inline bundle. Inline bundles are not written\n   *       to a separate file, but embedded into the parent bundle.\n   *   - isolated: The resolved asset will be isolated from its parents in a separate bundle.\n   *       Shared assets will be duplicated.\n   */\n  +bundleBehavior: ?BundleBehavior;\n  /**\n   * When the dependency is a bundle entry (priority is \"parallel\" or \"lazy\"), this controls the naming\n   * of that bundle. `needsStableName` indicates that the name should be stable over time, even when the\n   * content of the bundle changes. This is useful for entries that a user would manually enter the URL\n   * for, as well as for things like service workers or RSS feeds, where the URL must remain consistent\n   * over time.\n   */\n  +needsStableName: boolean;\n  /** Whether the dependency is optional. If the dependency cannot be resolved, this will not fail the build. */\n  +isOptional: boolean;\n  /** Whether the dependency is an entry. */\n  +isEntry: boolean;\n  /** The location within the source file where the dependency was found. */\n  +loc: ?SourceLocation;\n  /** The environment of the dependency. */\n  +env: Environment;\n  /**\n   * A list of custom conditions to use when resolving package.json \"exports\" and \"imports\".\n   * This is combined with the conditions from the environment. However, it overrides the\n   * default \"import\" and \"require\" conditions inferred from the specifierType. To include those\n   * in addition to custom conditions, explicitly add them to this list.\n   */\n  +packageConditions: ?Array<string>;\n  /** Plugin-specific metadata for the dependency. */\n  +meta: Meta;\n  /** If this is an entry, this is the target that is associated with that entry. */\n  +target: ?Target;\n  /** The id of the asset with this dependency. */\n  +sourceAssetId: ?string;\n  /** The file path of the asset with this dependency. */\n  +sourcePath: ?FilePath;\n  /** The type of the asset that referenced this dependency. */\n  +sourceAssetType: ?string;\n  /**\n   * The file path where the dependency should be resolved from.\n   * By default, this is the path of the source file where the dependency was specified.\n   */\n  +resolveFrom: ?FilePath;\n  /** The semver version range expected for the dependency. */\n  +range: ?SemverRange;\n  /** The pipeline defined in .parcelrc that the dependency should be processed with. */\n  +pipeline: ?string;\n\n  // TODO make immutable\n  /** The symbols within the resolved module that the source file depends on. */\n  +symbols: MutableDependencySymbols;\n}\n\nexport type File = {|\n  +filePath: FilePath,\n  +hash?: string,\n|};\n\n/**\n * @section transformer\n */\nexport type ASTGenerator = {|\n  type: string,\n  version: Semver,\n|};\n\nexport type BundleBehavior = 'inline' | 'isolated';\n\nexport type ParcelTransformOptions = {|\n  filePath: FilePath,\n  code?: string,\n  env?: EnvironmentOptions,\n  query?: ?string,\n|};\n\nexport type ParcelResolveOptions = {|\n  specifier: DependencySpecifier,\n  specifierType: SpecifierType,\n  env?: EnvironmentOptions,\n  resolveFrom?: FilePath,\n|};\n\nexport type ParcelResolveResult = {|\n  filePath: FilePath,\n  code?: string,\n  query?: ?string,\n  sideEffects?: boolean,\n|};\n\n/**\n * An asset represents a file or part of a file. It may represent any data type, including source code,\n * binary data, etc. Assets may exist in the file system or may be virtual.\n *\n * @section transformer\n */\nexport interface BaseAsset {\n  /** The id of the asset. */\n  +id: string;\n  /** The file system where the source is located. */\n  +fs: FileSystem;\n  /** The file path of the asset. */\n  +filePath: FilePath;\n  /**\n   * The asset's type. This initially corresponds to the source file extension,\n   * but it may be changed during transformation.\n   */\n  +type: string;\n  /** The transformer options for the asset from the dependency query string. */\n  +query: URLSearchParams;\n  /** The environment of the asset. */\n  +env: Environment;\n  /**\n   * Whether this asset is part of the project, and not an external dependency (e.g. in node_modules).\n   * This indicates that transformation using the project's configuration should be applied.\n   */\n  +isSource: boolean;\n  /** Plugin-specific metadata for the asset. */\n  +meta: Meta;\n  /**\n   * Controls which bundle the asset is placed into.\n   *   - inline: The asset will be placed into a new inline bundle. Inline bundles are not written\n   *       to a separate file, but embedded into the parent bundle.\n   *   - isolated: The asset will be isolated from its parents in a separate bundle. Shared assets\n   *       will be duplicated.\n   */\n  +bundleBehavior: ?BundleBehavior;\n  /**\n   * If the asset is used as a bundle entry, this controls whether that bundle can be split\n   * into multiple, or whether all of the dependencies must be placed in a single bundle.\n   */\n  +isBundleSplittable: boolean;\n  /**\n   * Whether this asset can be omitted if none of its exports are being used.\n   * This is initially set by the resolver, but can be overridden by transformers.\n   */\n  +sideEffects: boolean;\n  /**\n   * When a transformer returns multiple assets, it can give them unique keys to identify them.\n   * This can be used to find assets during packaging, or to create dependencies between multiple\n   * assets returned by a transformer by using the unique key as the dependency specifier.\n   */\n  +uniqueKey: ?string;\n  /** The type of the AST. */\n  +astGenerator: ?ASTGenerator;\n  /** The pipeline defined in .parcelrc that the asset should be processed with. */\n  +pipeline: ?string;\n  /** The symbols that the asset exports. */\n  +symbols: AssetSymbols;\n  /** Returns the current AST. */\n  getAST(): Promise<?AST>;\n  /** Returns the asset contents as a string. */\n  getCode(): Promise<string>;\n  /** Returns the asset contents as a buffer. */\n  getBuffer(): Promise<Buffer>;\n  /** Returns the asset contents as a stream. */\n  getStream(): Readable;\n  /** Returns the source map for the asset, if available. */\n  getMap(): Promise<?SourceMap>;\n  /** Returns a buffer representation of the source map, if available. */\n  getMapBuffer(): Promise<?Buffer>;\n  /** Returns a list of dependencies for the asset. */\n  getDependencies(): $ReadOnlyArray<Dependency>;\n}\n\n/**\n * A mutable Asset, available during transformation.\n * @section transformer\n */\nexport interface MutableAsset extends BaseAsset {\n  /**\n   * The asset's type. This initially corresponds to the source file extension,\n   * but it may be changed during transformation.\n   */\n  type: string;\n  /**\n   * Controls which bundle the asset is placed into.\n   *   - inline: The asset will be placed into a new inline bundle. Inline bundles are not written\n   *       to a separate file, but embedded into the parent bundle.\n   *   - isolated: The asset will be isolated from its parents in a separate bundle. Shared assets\n   *       will be duplicated.\n   */\n  bundleBehavior: ?BundleBehavior;\n  /**\n   * If the asset is used as a bundle entry, this controls whether that bundle can be split\n   * into multiple, or whether all of the dependencies must be placed in a single bundle.\n   * @default true\n   */\n  isBundleSplittable: boolean;\n  /**\n   * Whether this asset can be omitted if none of its exports are being used.\n   * This is initially set by the resolver, but can be overridden by transformers.\n   */\n  sideEffects: boolean;\n  /**\n   * When a transformer returns multiple assets, it can give them unique keys to identify them.\n   * This can be used to find assets during packaging, or to create dependencies between multiple\n   * assets returned by a transformer by using the unique key as the dependency specifier.\n   */\n  uniqueKey: ?string;\n  /** The symbols that the asset exports. */\n  +symbols: MutableAssetSymbols;\n\n  /** Adds a dependency to the asset. */\n  addDependency(DependencyOptions): string;\n  /**\n   * Adds a url dependency to the asset.\n   * This is a shortcut for addDependency that sets the specifierType to 'url' and priority to 'lazy'.\n   */\n  addURLDependency(url: string, opts: $Shape<DependencyOptions>): string;\n  /** Invalidates the transformation when the given file is modified or deleted. */\n  invalidateOnFileChange(FilePath): void;\n  /** Invalidates the transformation when matched files are created. */\n  invalidateOnFileCreate(FileCreateInvalidation): void;\n  /** Invalidates the transformation when the given environment variable changes. */\n  invalidateOnEnvChange(string): void;\n  /** Invalidates the transformation only when Parcel restarts. */\n  invalidateOnStartup(): void;\n  /** Invalidates the transformation on every build. */\n  invalidateOnBuild(): void;\n  /** Sets the asset contents as a string. */\n  setCode(string): void;\n  /** Sets the asset contents as a buffer. */\n  setBuffer(Buffer): void;\n  /** Sets the asset contents as a stream. */\n  setStream(Readable): void;\n  /** Sets the asset's AST. */\n  setAST(AST): void;\n  /** Returns whether the AST has been modified. */\n  isASTDirty(): boolean;\n  /** Sets the asset's source map. */\n  setMap(?SourceMap): void;\n  setEnvironment(opts: EnvironmentOptions): void;\n}\n\n/**\n * An immutable Asset, available after transformation.\n * @section transformer\n */\nexport interface Asset extends BaseAsset {\n  /** Statistics about the asset. */\n  +stats: Stats;\n}\n\nexport type DevDepOptions = {|\n  specifier: DependencySpecifier,\n  resolveFrom: FilePath,\n  range?: ?SemverRange,\n  /**\n   * When this dev dependency is invalidated, also invalidate these dependencies.\n   * This is useful if the parcel plugin or another parent dependency\n   * has its own cache for this dev dependency other than Node's require cache.\n   */\n  additionalInvalidations?: Array<{|\n    specifier: DependencySpecifier,\n    resolveFrom: FilePath,\n    range?: ?SemverRange,\n  |}>,\n|};\n\n/**\n * @section transformer\n */\nexport interface Config {\n  /**\n   * Whether this config is part of the project, and not an external dependency (e.g. in node_modules).\n   * This indicates that transformation using the project's configuration should be applied.\n   */\n  +isSource: boolean;\n  /** The path of the file to start searching for config from. */\n  +searchPath: FilePath;\n  /** The environment */\n  +env: Environment;\n\n  /** Invalidates the config when the given file is modified or deleted. */\n  invalidateOnFileChange(FilePath): void;\n  /** Invalidates the config when matched files are created. */\n  invalidateOnFileCreate(FileCreateInvalidation): void;\n  /** Invalidates the config when the given environment variable changes. */\n  invalidateOnEnvChange(string): void;\n  /** Invalidates the config only when Parcel restarts. */\n  invalidateOnStartup(): void;\n  /** Invalidates the config on every build. */\n  invalidateOnBuild(): void;\n  /**\n   * Adds a dev dependency to the config. If the dev dependency or any of its\n   * dependencies change, the config will be invalidated.\n   */\n  addDevDependency(DevDepOptions): void;\n  /**\n   * Sets the cache key for the config. By default, this is computed as a hash of the\n   * files passed to invalidateOnFileChange or loaded by getConfig. If none, then a\n   * hash of the result returned from loadConfig is used. This method can be used to\n   * override this behavior and explicitly control the cache key. This can be useful\n   * in cases where only part of a file is used to avoid unnecessary invalidations,\n   * or when the result is not hashable (i.e. contains non-serializable properties like functions).\n   */\n  setCacheKey(string): void;\n\n  /**\n   * Searches for config files with the given names in all parent directories\n   * of the config's searchPath.\n   */\n  getConfig<T>(\n    filePaths: Array<FilePath>,\n    options?: {|\n      packageKey?: string,\n      parse?: boolean,\n      exclude?: boolean,\n    |},\n  ): Promise<?ConfigResultWithFilePath<T>>;\n  /**\n   * Searches for config files with the given names in all parent directories\n   * of the passed searchPath.\n   */\n  getConfigFrom<T>(\n    searchPath: FilePath,\n    filePaths: Array<FilePath>,\n    options?: {|\n      packageKey?: string,\n      parse?: boolean,\n      exclude?: boolean,\n    |},\n  ): Promise<?ConfigResultWithFilePath<T>>;\n  /** Finds the nearest package.json from the config's searchPath. */\n  getPackage(): Promise<?PackageJSON>;\n}\n\nexport type Stats = {|\n  time: number,\n  size: number,\n|};\n\n/**\n * @section transformer\n */\nexport type GenerateOutput = {|\n  +content: Blob,\n  +map?: ?SourceMap,\n|};\n\nexport type Blob = string | Buffer | Readable;\n\n/**\n * Transformers can return multiple result objects to create new assets.\n * For example, a file may contain multiple parts of different types,\n * which should be processed by their respective transformation pipelines.\n *\n * @section transformer\n */\nexport type TransformerResult = {|\n  /** The asset's type. */\n  +type: string,\n  /** The content of the asset. Either content or an AST is required. */\n  +content?: ?Blob,\n  /** The asset's AST. Either content or an AST is required. */\n  +ast?: ?AST,\n  /** The source map for the asset. */\n  +map?: ?SourceMap,\n  /** The dependencies of the asset. */\n  +dependencies?: $ReadOnlyArray<DependencyOptions>,\n  /** The environment of the asset. The options are merged with the input asset's environment. */\n  +env?: EnvironmentOptions | Environment,\n  /**\n   * Controls which bundle the asset is placed into.\n   *   - inline: The asset will be placed into a new inline bundle. Inline bundles are not written\n   *       to a separate file, but embedded into the parent bundle.\n   *   - isolated: The asset will be isolated from its parents in a separate bundle. Shared assets\n   *       will be duplicated.\n   */\n  +bundleBehavior?: ?BundleBehavior,\n  /**\n   * If the asset is used as a bundle entry, this controls whether that bundle can be split\n   * into multiple, or whether all of the dependencies must be placed in a single bundle.\n   */\n  +isBundleSplittable?: boolean,\n  /** Plugin-specific metadata for the asset. */\n  +meta?: Meta,\n  /** The pipeline defined in .parcelrc that the asset should be processed with. */\n  +pipeline?: ?string,\n  /**\n   * Whether this asset can be omitted if none of its exports are being used.\n   * This is initially set by the resolver, but can be overridden by transformers.\n   */\n  +sideEffects?: boolean,\n  /** The symbols that the asset exports. */\n  +symbols?: $ReadOnlyMap<Symbol, {|local: Symbol, loc: ?SourceLocation|}>,\n  /**\n   * When a transformer returns multiple assets, it can give them unique keys to identify them.\n   * This can be used to find assets during packaging, or to create dependencies between multiple\n   * assets returned by a transformer by using the unique key as the dependency specifier.\n   */\n  +uniqueKey?: ?string,\n|};\n\nexport type Async<T> = T | Promise<T>;\n\nexport interface PluginLogger {\n  /** Logs a diagnostic at the verbose log level. */\n  verbose(\n    diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,\n  ): void;\n\n  /** Logs a diagnostic at the info log level. */\n  info(\n    diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,\n  ): void;\n\n  /** Synonym for logger.info. */\n  log(\n    diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,\n  ): void;\n\n  /** Logs a diagnostic at the verbose warning log level. */\n  warn(\n    diagnostic: DiagnosticWithoutOrigin | Array<DiagnosticWithoutOrigin>,\n  ): void;\n\n  /** Logs a diagnostic at the verbose error log level. */\n  error(\n    input:\n      | Diagnostifiable\n      | DiagnosticWithoutOrigin\n      | Array<DiagnosticWithoutOrigin>,\n  ): void;\n}\n\n/**\n * @section transformer\n */\nexport type ResolveOptions = {|\n  /**\n   * How the specifier should be interpreted.\n   *   - esm: An ES module specifier. It is parsed as a URL, but bare specifiers are treated as node_modules.\n   *   - commonjs: A CommonJS specifier. It is not parsed as a URL.\n   *   - url: A URL that works as in a browser. Bare specifiers are treated as relative URLs.\n   *   - custom: A custom specifier. Must be handled by a custom resolver plugin.\n   */\n  +specifierType?: SpecifierType,\n  /** A list of custom conditions to use when resolving package.json \"exports\" and \"imports\". */\n  +packageConditions?: Array<string>,\n|};\n\n/**\n * @section transformer\n */\nexport type ResolveFn = (\n  from: FilePath,\n  to: string,\n  options?: ResolveOptions,\n) => Promise<FilePath>;\n\n/**\n * @section validator\n * @experimental\n */\ntype ResolveConfigFn = (configNames: Array<FilePath>) => Promise<?FilePath>;\n\n/**\n * @section validator\n * @experimental\n */\ntype ResolveConfigWithPathFn = (\n  configNames: Array<FilePath>,\n  assetFilePath: string,\n) => Promise<?FilePath>;\n\n/**\n * @section validator\n * @experimental\n */\nexport type ValidateResult = {|\n  warnings: Array<Diagnostic>,\n  errors: Array<Diagnostic>,\n|};\n\n/**\n * @section validator\n * @experimental\n */\nexport type DedicatedThreadValidator = {|\n  validateAll: ({|\n    assets: Asset[],\n    resolveConfigWithPath: ResolveConfigWithPathFn,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<Array<?ValidateResult>>,\n|};\n\n/**\n * @section validator\n * @experimental\n */\nexport type MultiThreadValidator = {|\n  validate: ({|\n    asset: Asset,\n    config: ConfigResult | void,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<ValidateResult | void>,\n  getConfig?: ({|\n    asset: Asset,\n    resolveConfig: ResolveConfigFn,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<ConfigResult | void>,\n|};\n\n/**\n * @section validator\n */\nexport type Validator = DedicatedThreadValidator | MultiThreadValidator;\n\n/**\n * The methods for a transformer plugin.\n * @section transformer\n */\nexport type Transformer<ConfigType> = {|\n  loadConfig?: ({|\n    config: Config,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Promise<ConfigType> | ConfigType,\n  /** Whether an AST from a previous transformer can be reused (to prevent double-parsing) */\n  canReuseAST?: ({|\n    ast: AST,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => boolean,\n  /** Parse the contents into an ast */\n  parse?: ({|\n    asset: Asset,\n    config: ConfigType,\n    resolve: ResolveFn,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<?AST>,\n  /** Transform the asset and/or add new assets */\n  transform({|\n    asset: MutableAsset,\n    config: ConfigType,\n    resolve: ResolveFn,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}): Async<Array<TransformerResult | MutableAsset>>,\n  /**\n   * Do some processing after the transformation\n   * @experimental\n   */\n  postProcess?: ({|\n    assets: Array<MutableAsset>,\n    config: ConfigType,\n    resolve: ResolveFn,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<Array<TransformerResult>>,\n  /** Stringify the AST */\n  generate?: ({|\n    asset: Asset,\n    ast: AST,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<GenerateOutput>,\n|};\n\n/**\n * Used to control a traversal\n * @section bundler\n */\nexport type TraversalActions = {|\n  /** Skip the current node's children and continue the traversal if there are other nodes in the queue. */\n  skipChildren(): void,\n  /** Stop the traversal */\n  stop(): void,\n|};\n\n/**\n * Essentially GraphTraversalCallback, but allows adding specific node enter and exit callbacks.\n * @section bundler\n */\nexport type GraphVisitor<TNode, TContext> =\n  | GraphTraversalCallback<TNode, TContext>\n  | {|\n      enter?: GraphTraversalCallback<TNode, TContext>,\n      exit?: GraphTraversalCallback<TNode, TContext>,\n    |};\n\n/**\n * A generic callback for graph traversals\n * @param context The parent node's return value is passed as a parameter to the children's callback. \\\n * This can be used to forward information from the parent to children in a DFS (unlike a global variable).\n * @section bundler\n */\nexport type GraphTraversalCallback<TNode, TContext> = (\n  node: TNode,\n  context: ?TContext,\n  actions: TraversalActions,\n) => ?TContext;\n\n/**\n * @section bundler\n */\nexport type BundleTraversable =\n  | {|+type: 'asset', value: Asset|}\n  | {|+type: 'dependency', value: Dependency|};\n\n/**\n * @section bundler\n */\nexport type BundleGraphTraversable =\n  | {|+type: 'asset', value: Asset|}\n  | {|+type: 'dependency', value: Dependency|};\n\n/**\n * Options for MutableBundleGraph's <code>createBundle</code>.\n *\n * If an <code>entryAsset</code> is provided, <code>uniqueKey</code> (for the bundle id),\n * <code>type</code>, and <code>env</code> will be inferred from the <code>entryAsset</code>.\n *\n * If an <code>entryAsset</code> is not provided, <code>uniqueKey</code> (for the bundle id),\n * <code>type</code>, and <code>env</code> must be provided.\n *\n * isSplittable defaults to <code>entryAsset.isSplittable</code> or <code>false</code>\n * @section bundler\n */\nexport type CreateBundleOpts =\n  // If an entryAsset is provided, a bundle id, type, and environment will be\n  // inferred from the entryAsset.\n  | {|\n      /** The entry asset of the bundle. If provided, many bundle properties will be inferred from it. */\n      +entryAsset: Asset,\n      /** The target of the bundle. Should come from the dependency that created the bundle. */\n      +target: Target,\n      /**\n       * Indicates that the bundle's file name should be stable over time, even when the content of the bundle\n       * changes. This is useful for entries that a user would manually enter the URL for, as well as for things\n       * like service workers or RSS feeds, where the URL must remain consistent over time.\n       */\n      +needsStableName?: ?boolean,\n      /**\n       * Controls the behavior of the bundle.\n       * to determine when the bundle is loaded.\n       *   - inline: Inline bundles are not written to a separate file, but embedded into the parent bundle.\n       *   - isolated: The bundle will be isolated from its parents. Shared assets will be duplicated.\n       */\n      +bundleBehavior?: ?BundleBehavior,\n      /** Name of the manual shared bundle config that caused this bundle to be created */\n      +manualSharedBundle?: ?string,\n    |}\n  // If an entryAsset is not provided, a bundle id, type, and environment must\n  // be provided.\n  | {|\n      /** The type of the bundle. */\n      +type: string,\n      /** The environment of the bundle. */\n      +env: Environment,\n      /** A unique value for the bundle to be used in its id. */\n      +uniqueKey: string,\n      /** The target of the bundle. Should come from the dependency that created the bundle. */\n      +target: Target,\n      /**\n       * Indicates that the bundle's file name should be stable over time, even when the content of the bundle\n       * changes. This is useful for entries that a user would manually enter the URL for, as well as for things\n       * like service workers or RSS feeds, where the URL must remain consistent over time.\n       */\n      +needsStableName?: ?boolean,\n      /**\n       * Controls the behavior of the bundle.\n       * to determine when the bundle is loaded.\n       *   - inline: Inline bundles are not written to a separate file, but embedded into the parent bundle.\n       *   - isolated: The bundle will be isolated from its parents. Shared assets will be duplicated.\n       */\n      +bundleBehavior?: ?BundleBehavior,\n      /**\n       * Whether the bundle can be split. If false, then all dependencies of the bundle will be kept\n       * internal to the bundle, rather than referring to other bundles. This may result in assets\n       * being duplicated between multiple bundles, but can be useful for things like server side rendering.\n       */\n      +isSplittable?: ?boolean,\n      /** The bundle's pipeline, to be used for optimization. Usually based on the pipeline of the entry asset. */\n      +pipeline?: ?string,\n      /** Name of the manual shared bundle config that caused this bundle to be created */\n      +manualSharedBundle?: ?string,\n    |};\n\n/**\n * Specifies a symbol in an asset\n * @section packager\n */\nexport type SymbolResolution = {|\n  /** The Asset which exports the symbol. */\n  +asset: Asset,\n  /** under which name the symbol is exported */\n  +exportSymbol: Symbol | string,\n  /** The identifier under which the symbol can be referenced. */\n  +symbol: void | null | false | Symbol,\n  /** The location of the specifier that lead to this result. */\n  +loc: ?SourceLocation,\n|};\n\n/**\n * @section packager\n */\nexport type ExportSymbolResolution = {|\n  ...SymbolResolution,\n  +exportAs: Symbol | string,\n|};\n\n/**\n * A Bundle (a collection of assets)\n *\n * @section bundler\n */\nexport interface Bundle {\n  /** The bundle id. */\n  +id: string;\n  /** The type of the bundle. */\n  +type: string;\n  /** The environment of the bundle. */\n  +env: Environment;\n  /** The bundle's target. */\n  +target: Target;\n  /** Assets that run when the bundle is loaded (e.g. runtimes could be added). VERIFY */\n  /**\n   * Indicates that the bundle's file name should be stable over time, even when the content of the bundle\n   * changes. This is useful for entries that a user would manually enter the URL for, as well as for things\n   * like service workers or RSS feeds, where the URL must remain consistent over time.\n   */\n  +needsStableName: ?boolean;\n  /**\n   * Controls the behavior of the bundle.\n   * to determine when the bundle is loaded.\n   *   - inline: Inline bundles are not written to a separate file, but embedded into the parent bundle.\n   *   - isolated: The bundle will be isolated from its parents. Shared assets will be duplicated.\n   */\n  +bundleBehavior: ?BundleBehavior;\n  /**\n   * Whether the bundle can be split. If false, then all dependencies of the bundle will be kept\n   * internal to the bundle, rather than referring to other bundles. This may result in assets\n   * being duplicated between multiple bundles, but can be useful for things like server side rendering.\n   */\n  +isSplittable: ?boolean;\n  /**\n   * A placeholder for the bundle's content hash that can be used in the bundle's name or the contents of another\n   * bundle. Hash references are replaced with a content hash of the bundle after packaging and optimizing.\n   */\n  +hashReference: string;\n  /**\n   * Returns the assets that are executed immediately when the bundle is loaded.\n   * Some bundles may not have any entry assets, for example, shared bundles.\n   */\n  getEntryAssets(): Array<Asset>;\n  /**\n   * Returns the main entry of the bundle, which will provide the bundle's exports.\n   * Some bundles do not have a main entry, for example, shared bundles.\n   */\n  getMainEntry(): ?Asset;\n  /** Returns whether the bundle includes the given asset. */\n  hasAsset(Asset): boolean;\n  /** Returns whether the bundle includes the given dependency. */\n  hasDependency(Dependency): boolean;\n  /** Traverses the assets in the bundle. */\n  traverseAssets<TContext>(\n    visit: GraphVisitor<Asset, TContext>,\n    startAsset?: Asset,\n  ): ?TContext;\n  /** Traverses assets and dependencies in the bundle. */\n  traverse<TContext>(\n    visit: GraphVisitor<BundleTraversable, TContext>,\n  ): ?TContext;\n  /** Returns a hash of the contents of the bundle. */\n  getContentHash(): string;\n}\n\n/**\n * A Bundle that got named by a Namer\n * @section bundler\n */\nexport interface NamedBundle extends Bundle {\n  /** A shortened version of the bundle id that is used to refer to the bundle at runtime. */\n  +publicId: string;\n  /**\n   * The bundle's name. This is a file path relative to the bundle's target directory.\n   * The bundle name may include a hash reference, but not the final content hash.\n   */\n  +name: string;\n  /** A version of the bundle's name with hash references removed for display. */\n  +displayName: string;\n}\n\nexport interface PackagedBundle extends NamedBundle {\n  /** The absolute file path of the written bundle, including the final content hash if any. */\n  +filePath: FilePath;\n  /** Statistics about the bundle. */\n  +stats: Stats;\n  /** A list of all of the files written for this bundle. */\n  +files: Array<PackagedBundleFile>;\n}\n\nexport interface PackagedBundleFile {\n  /** The absolute file path of the written file, including the final content hash if any. */\n  +filePath: FilePath;\n  /** Statistics about the file. */\n  +stats: Stats;\n}\n\n/**\n * A collection of sibling bundles (which are stored in the BundleGraph) that should be loaded together (in order).\n * @section bundler\n */\nexport interface BundleGroup {\n  /** The target of the bundle group. */\n  +target: Target;\n  /** The id of the entry asset in the bundle group, which is executed immediately when the bundle group is loaded. */\n  +entryAssetId: string;\n}\n\n/**\n * A BundleGraph in the Bundler that can be modified\n * @section bundler\n * @experimental\n */\nexport interface MutableBundleGraph extends BundleGraph<Bundle> {\n  /** Add asset and all child nodes to the bundle. */\n  addAssetGraphToBundle(\n    Asset,\n    Bundle,\n    shouldSkipDependency?: (Dependency) => boolean,\n  ): void;\n  addAssetToBundle(Asset, Bundle): void;\n  /**\n   * Adds an asset as an entry to a bundle. Entry assets are executed immediately\n   * when the bundle is loaded.\n   */\n  addEntryToBundle(\n    Asset,\n    Bundle,\n    shouldSkipDependency?: (Dependency) => boolean,\n  ): void;\n  /** Adds the Bundle to the BundleGroup, loading it along with others in the group */\n  addBundleToBundleGroup(Bundle, BundleGroup): void;\n  createAssetReference(Dependency, Asset, Bundle): void;\n  createBundleReference(Bundle, Bundle): void;\n  createBundle(CreateBundleOpts): Bundle;\n  /** Turns an edge (Dependency -> Asset-s) into (Dependency -> BundleGroup -> Asset-s) */\n  createBundleGroup(Dependency, Target): BundleGroup;\n  /** @returns all Asset-s attached to the Dependency */\n  getDependencyAssets(Dependency): Array<Asset>;\n  /** Get Bundles that load this bundle asynchronously. */\n  getParentBundlesOfBundleGroup(BundleGroup): Array<Bundle>;\n  /** @returns the size in bytes of an asset and all assets in its subgraph */\n  getTotalSize(Asset): number;\n  /**\n   * Recursively removes an asset and its dependencies from a bundle. Stops at\n   * bundle group boundaries.\n   */\n  removeAssetGraphFromBundle(Asset, Bundle): void;\n  /**\n   * Removes a BundleGroup from the graph. If any of the group's Bundle-s no\n   * longer exist in the graph, those are removed as well.\n   */\n  removeBundleGroup(bundleGroup: BundleGroup): void;\n  /** Turns a dependency to a different bundle into a dependency to an asset inside <code>bundle</code>. */\n  internalizeAsyncDependency(bundle: Bundle, dependency: Dependency): void;\n}\n\n/**\n * A Graph that contains Bundle-s, Asset-s, Dependency-s, BundleGroup-s\n * @section bundler\n */\nexport interface BundleGraph<TBundle: Bundle> {\n  /** Retrieves an asset by id. */\n  getAssetById(id: string): Asset;\n  /** Returns the public (short) id for an asset. */\n  getAssetPublicId(asset: Asset): string;\n  /** Returns a list of bundles in the bundle graph. By default, inline bundles are excluded. */\n  getBundles(opts?: {|includeInline: boolean|}): Array<TBundle>;\n  /** Traverses the assets and dependencies in the bundle graph, in depth first order. */\n  traverse<TContext>(\n    visit: GraphVisitor<BundleGraphTraversable, TContext>,\n    startAsset: ?Asset,\n    options?: {|skipUnusedDependencies?: boolean|},\n  ): ?TContext;\n  /** Traverses all bundles in the bundle graph, including inline bundles, in depth first order. */\n  traverseBundles<TContext>(\n    visit: GraphVisitor<TBundle, TContext>,\n    startBundle: ?Bundle,\n  ): ?TContext;\n  /** Returns a list of bundle groups that load the given bundle. */\n  getBundleGroupsContainingBundle(bundle: Bundle): Array<BundleGroup>;\n  /** Returns a list of bundles that load together in the given bundle group. */\n  getBundlesInBundleGroup(\n    bundleGroup: BundleGroup,\n    opts?: {|\n      recursive?: boolean,\n      includeInline?: boolean,\n      includeIsolated?: boolean,\n    |},\n  ): Array<TBundle>;\n  /** Returns a list of bundles that this bundle loads asynchronously. */\n  getChildBundles(bundle: Bundle): Array<TBundle>;\n  /** Returns a list of bundles that load this bundle asynchronously. */\n  getParentBundles(bundle: Bundle): Array<TBundle>;\n  /** Returns whether the bundle was loaded by another bundle of the given type. */\n  hasParentBundleOfType(bundle: Bundle, type: string): boolean;\n  /** Returns a list of bundles that are referenced by this bundle. By default, inline bundles are excluded. */\n  getReferencedBundles(\n    bundle: Bundle,\n    opts?: {|\n      recursive?: boolean,\n      includeInline?: boolean,\n      includeIsolated?: boolean,\n    |},\n  ): Array<TBundle>;\n  /** Returns a list of bundles that reference this bundle. */\n  getReferencingBundles(bundle: Bundle): Array<TBundle>;\n  /** Get the dependencies that the asset requires */\n  getDependencies(asset: Asset): Array<Dependency>;\n  /** Get the dependencies that require the asset */\n  getIncomingDependencies(asset: Asset): Array<Dependency>;\n  /** Get the asset that created the dependency. */\n  getAssetWithDependency(dep: Dependency): ?Asset;\n  /** Returns whether the given bundle group is an entry. */\n  isEntryBundleGroup(bundleGroup: BundleGroup): boolean;\n  /**\n   * Returns undefined if the specified dependency was excluded or wasn't async \\\n   * and otherwise the BundleGroup or Asset that the dependency resolves to.\n   */\n  resolveAsyncDependency(\n    dependency: Dependency,\n    bundle: ?Bundle,\n  ): ?(\n    | {|type: 'bundle_group', value: BundleGroup|}\n    | {|type: 'asset', value: Asset|}\n  );\n  /** Returns whether a dependency was excluded because it had no used symbols. */\n  isDependencySkipped(dependency: Dependency): boolean;\n  /**\n   * Returns the asset that the dependency resolved to.\n   * If a bundle is given, assets in that bundle are preferred.\n   * Returns null if the dependency was excluded.\n   */\n  getResolvedAsset(dependency: Dependency, bundle: ?Bundle): ?Asset;\n  /** Returns the bundle that a dependency in a given bundle references, if any. */\n  getReferencedBundle(dependency: Dependency, bundle: Bundle): ?TBundle;\n  /** Returns a list of bundles that contain the given asset. */\n  getBundlesWithAsset(Asset): Array<TBundle>;\n  /** Returns a list of bundles that contain the given dependency. */\n  getBundlesWithDependency(Dependency): Array<TBundle>;\n  /**\n   * Returns whether the given asset is reachable in a sibling, or all possible\n   * ancestries of the given bundle. This indicates that the asset may be excluded\n   * from the given bundle.\n   */\n  isAssetReachableFromBundle(asset: Asset, bundle: Bundle): boolean;\n  /** Returns whether an asset is referenced outside the given bundle. */\n  isAssetReferenced(bundle: Bundle, asset: Asset): boolean;\n  /**\n   * Resolves the export `symbol` of `asset` to the source,\n   * stopping at the first asset after leaving `bundle`.\n   * `symbol === null`: bailout (== caller should do `asset.exports[exportsSymbol]`)\n   * `symbol === undefined`: symbol not found\n   * `symbol === false`: skipped\n   *\n   * <code>asset</code> exports <code>symbol</code>, try to find the asset where the \\\n   * corresponding variable lives (resolves re-exports). Stop resolving transitively once \\\n   * <code>boundary</code> was left (<code>bundle.hasAsset(asset) === false</code>), then <code>result.symbol</code> is undefined.\n   */\n  getSymbolResolution(\n    asset: Asset,\n    symbol: Symbol,\n    boundary: ?Bundle,\n  ): SymbolResolution;\n  /** Returns a list of symbols that are exported by the asset, including re-exports. */\n  getExportedSymbols(\n    asset: Asset,\n    boundary: ?Bundle,\n  ): Array<ExportSymbolResolution>;\n  /**\n   * Returns a list of symbols from an asset or dependency that are referenced by a dependent asset.\n   *\n   * Returns null if symbol propagation didn't run (so the result is unknown).\n   */\n  getUsedSymbols(Asset | Dependency): ?$ReadOnlySet<Symbol>;\n  /** Returns the common root directory for the entry assets of a target. */\n  getEntryRoot(target: Target): FilePath;\n  /** Returns a list of entry bundles. */\n  getEntryBundles(): Array<TBundle>;\n}\n\n/**\n * @section bundler\n */\nexport type BundleResult = {|\n  +contents: Blob,\n  +ast?: AST,\n  +map?: ?SourceMap,\n  +type?: string,\n|};\n\n/**\n * @section resolver\n */\nexport type ResolveResult = {|\n  /** An absolute path to the resolved file. */\n  +filePath?: FilePath,\n  /** An optional named pipeline to use to compile the resolved file. */\n  +pipeline?: ?string,\n  /** Query parameters to be used by transformers when compiling the resolved file. */\n  +query?: URLSearchParams,\n  /** Whether the resolved file should be excluded from the build. */\n  +isExcluded?: boolean,\n  /** Overrides the priority set on the dependency. */\n  +priority?: DependencyPriority,\n  /** Corresponds to BaseAsset's <code>sideEffects</code>. */\n  +sideEffects?: boolean,\n  /** The code of the resolved asset. If provided, this is used rather than reading the file from disk. */\n  +code?: string,\n  /** Whether this dependency can be deferred by Parcel itself (true by default). */\n  +canDefer?: boolean,\n  /** A resolver might return diagnostics to also run subsequent resolvers while still providing a reason why it failed. */\n  +diagnostics?: Diagnostic | Array<Diagnostic>,\n  /** Is spread (shallowly merged) onto the request's dependency.meta */\n  +meta?: JSONObject,\n  /** A list of file paths or patterns that should invalidate the resolution if created. */\n  +invalidateOnFileCreate?: Array<FileCreateInvalidation>,\n  /** A list of files that should invalidate the resolution if modified or deleted. */\n  +invalidateOnFileChange?: Array<FilePath>,\n  /** Invalidates the resolution when the given environment variable changes.*/\n  +invalidateOnEnvChange?: Array<string>,\n|};\n\n/**\n * Turns an asset graph into a BundleGraph.\n *\n * bundle and optimize run in series and are functionally identitical.\n * @section bundler\n */\nexport type Bundler<ConfigType> = {|\n  loadConfig?: ({|\n    config: Config,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Promise<ConfigType> | ConfigType,\n  bundle({|\n    bundleGraph: MutableBundleGraph,\n    config: ConfigType,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}): Async<void>,\n  optimize({|\n    bundleGraph: MutableBundleGraph,\n    config: ConfigType,\n    options: PluginOptions,\n    logger: PluginLogger,\n  |}): Async<void>,\n|};\n\n/**\n * @section namer\n */\nexport type Namer<ConfigType> = {|\n  loadConfig?: ({|\n    config: Config,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Promise<ConfigType> | ConfigType,\n  /** Return a filename/-path for <code>bundle</code> or nullish to leave it to the next namer plugin. */\n  name({|\n    bundle: Bundle,\n    bundleGraph: BundleGraph<Bundle>,\n    config: ConfigType,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}): Async<?FilePath>,\n|};\n\n/**\n * A \"synthetic\" asset that will be inserted into the bundle graph.\n * @section runtime\n */\nexport type RuntimeAsset = {|\n  +filePath: FilePath,\n  +code: string,\n  +dependency?: Dependency,\n  +isEntry?: boolean,\n  +env?: EnvironmentOptions,\n  +shouldReplaceResolution?: boolean,\n|};\n\n/**\n * @section runtime\n */\nexport type Runtime<ConfigType> = {|\n  loadConfig?: ({|\n    config: Config,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Promise<ConfigType> | ConfigType,\n  apply({|\n    bundle: NamedBundle,\n    bundleGraph: BundleGraph<NamedBundle>,\n    config: ConfigType,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}): Async<void | RuntimeAsset | Array<RuntimeAsset>>,\n|};\n\n/**\n * @section packager\n */\nexport type Packager<ConfigType, BundleConfigType> = {|\n  loadConfig?: ({|\n    config: Config,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<ConfigType>,\n  loadBundleConfig?: ({|\n    bundle: NamedBundle,\n    bundleGraph: BundleGraph<NamedBundle>,\n    config: Config,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<BundleConfigType>,\n  package({|\n    bundle: NamedBundle,\n    bundleGraph: BundleGraph<NamedBundle>,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n    config: ConfigType,\n    bundleConfig: BundleConfigType,\n    getInlineBundleContents: (\n      Bundle,\n      BundleGraph<NamedBundle>,\n    ) => Async<{|contents: Blob|}>,\n    getSourceMapReference: (map: ?SourceMap) => Async<?string>,\n  |}): Async<BundleResult | BundleResult[]>,\n|};\n\n/**\n * @section optimizer\n */\nexport type Optimizer<ConfigType, BundleConfigType> = {|\n  loadConfig?: ({|\n    config: Config,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<ConfigType>,\n  loadBundleConfig?: ({|\n    bundle: NamedBundle,\n    bundleGraph: BundleGraph<NamedBundle>,\n    config: Config,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Async<BundleConfigType>,\n  optimize({|\n    bundle: NamedBundle,\n    bundleGraph: BundleGraph<NamedBundle>,\n    contents: Blob,\n    map: ?SourceMap,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n    config: ConfigType,\n    bundleConfig: BundleConfigType,\n    getSourceMapReference: (map: ?SourceMap) => Async<?string>,\n  |}): Async<BundleResult>,\n|};\n\n/**\n * @section compressor\n */\nexport type Compressor = {|\n  compress({|\n    stream: Readable,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}): Async<?{|\n    stream: Readable,\n    type?: string,\n  |}>,\n|};\n\n/**\n * @section resolver\n */\nexport type Resolver<ConfigType> = {|\n  loadConfig?: ({|\n    config: Config,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}) => Promise<ConfigType> | ConfigType,\n  resolve({|\n    dependency: Dependency,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n    specifier: FilePath,\n    pipeline: ?string,\n    config: ConfigType,\n  |}): Async<?ResolveResult>,\n|};\n\n/**\n * @section reporter\n */\nexport type ProgressLogEvent = {|\n  +type: 'log',\n  +level: 'progress',\n  +phase?: string,\n  +message: string,\n|};\n\n/**\n * A log event with a rich diagnostic\n * @section reporter\n */\nexport type DiagnosticLogEvent = {|\n  +type: 'log',\n  +level: 'error' | 'warn' | 'info' | 'verbose',\n  +diagnostics: Array<Diagnostic>,\n|};\n\n/**\n * @section reporter\n */\nexport type TextLogEvent = {|\n  +type: 'log',\n  +level: 'success',\n  +message: string,\n|};\n\n/**\n * @section reporter\n */\nexport type LogEvent = ProgressLogEvent | DiagnosticLogEvent | TextLogEvent;\n\n/**\n * The build just started.\n * @section reporter\n */\nexport type BuildStartEvent = {|\n  +type: 'buildStart',\n|};\n\n/**\n * The build just started in watch mode.\n * @section reporter\n */\nexport type WatchStartEvent = {|\n  +type: 'watchStart',\n|};\n\n/**\n * The build just ended in watch mode.\n * @section reporter\n */\nexport type WatchEndEvent = {|\n  +type: 'watchEnd',\n|};\n\n/**\n * A new Dependency is being resolved.\n * @section reporter\n */\nexport type ResolvingProgressEvent = {|\n  +type: 'buildProgress',\n  +phase: 'resolving',\n  +dependency: Dependency,\n|};\n\n/**\n * A new Asset is being transformed.\n * @section reporter\n */\nexport type TransformingProgressEvent = {|\n  +type: 'buildProgress',\n  +phase: 'transforming',\n  +filePath: FilePath,\n|};\n\n/**\n * The BundleGraph is generated.\n * @section reporter\n */\nexport type BundlingProgressEvent = {|\n  +type: 'buildProgress',\n  +phase: 'bundling',\n|};\n\nexport type BundledProgressEvent = {|\n  +type: 'buildProgress',\n  +phase: 'bundled',\n  +bundleGraph: BundleGraph<NamedBundle>,\n  +changedAssets: Map<string, Asset>,\n|};\n\n/**\n * A new Bundle is being packaged.\n * @section reporter\n */\nexport type PackagingProgressEvent = {|\n  +type: 'buildProgress',\n  +phase: 'packaging',\n  +bundle: NamedBundle,\n|};\n\n/**\n * A new Bundle is being optimized.\n * @section reporter\n */\nexport type OptimizingProgressEvent = {|\n  +type: 'buildProgress',\n  +phase: 'optimizing',\n  +bundle: NamedBundle,\n|};\n\n/**\n * @section reporter\n */\nexport type BuildProgressEvent =\n  | ResolvingProgressEvent\n  | TransformingProgressEvent\n  | BundlingProgressEvent\n  | BundledProgressEvent\n  | PackagingProgressEvent\n  | OptimizingProgressEvent;\n\n/**\n * The build was successful.\n * @section reporter\n */\nexport type BuildSuccessEvent = {|\n  +type: 'buildSuccess',\n  +bundleGraph: BundleGraph<PackagedBundle>,\n  +buildTime: number,\n  +changedAssets: Map<string, Asset>,\n  +requestBundle: (bundle: NamedBundle) => Promise<BuildSuccessEvent>,\n  +unstable_requestStats: {[requestType: string]: number},\n|};\n\n/**\n * The build failed.\n * @section reporter\n */\nexport type BuildFailureEvent = {|\n  +type: 'buildFailure',\n  +diagnostics: Array<Diagnostic>,\n  +unstable_requestStats: {[requestType: string]: number},\n|};\n\n/**\n * @section reporter\n */\nexport type BuildEvent = BuildFailureEvent | BuildSuccessEvent;\n\n/**\n * A new file is being validated.\n * @section reporter\n */\nexport type ValidationEvent = {|\n  +type: 'validation',\n  +filePath: FilePath,\n|};\n\n/**\n * A trace event has occured.\n * Loosely modeled on Chrome's Trace Event format: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview\n *\n * @section reporter\n */\nexport type TraceEvent = {|\n  +type: 'trace',\n  +ts: number,\n  +duration: number,\n  +name: string,\n  +tid: number,\n  +pid: number,\n  +categories: string[],\n  +args?: {[key: string]: mixed},\n|};\n\nexport type CacheEvent = {|\n  type: 'cache',\n  phase: string,\n  total: number,\n  size: number,\n|};\n\n/**\n * @section reporter\n */\nexport type ReporterEvent =\n  | LogEvent\n  | BuildStartEvent\n  | BuildProgressEvent\n  | BuildSuccessEvent\n  | BuildFailureEvent\n  | WatchStartEvent\n  | WatchEndEvent\n  | ValidationEvent\n  | TraceEvent\n  | CacheEvent;\n\n/**\n * @section reporter\n */\nexport type Reporter = {|\n  report({|\n    event: ReporterEvent,\n    options: PluginOptions,\n    logger: PluginLogger,\n    tracer: PluginTracer,\n  |}): Async<void>,\n|};\n\nexport interface ErrorWithCode extends Error {\n  +code?: string;\n}\n\nexport interface IDisposable {\n  dispose(): mixed;\n}\n\nexport type AsyncSubscription = {|\n  unsubscribe(): Promise<mixed>,\n|};\n\nexport interface PluginTracer {\n  /** Returns whether the tracer is enabled. Use this to avoid possibly expensive calculations\n   * of arguments to `createMeasurement` - for example if you need to determine the entry of a bundle to pass it\n   * in as the <code>argumentName</code>, you would only do this if the tracer is enabled.\n   */\n  +enabled: boolean;\n\n  /**\n   * Creates a new trace measurement with the specified name. This name should reflect the current plugin or\n   * function being executed (for example, the name of a Babel transform). The category will default to the name of your plugin,\n   * however it should be set to reflect the type of operation (for example, for a hypothetical operation\n   * to find CSS in an asset within a Compiled plugin you might set this to <code>find_css<code>).\n   *\n   * If this is an operation that executes multiple times on different things - whether that's assets, bundles, or\n   * otherwise - specify the name of the context object in <code>argumentName</code>.\n   *\n   * <code>otherArgs</code> can be used for specifying any other key/value pairs\n   * that should be written to the trace.\n   *\n   * For example: <code>tracer.createMeasurement('compiled', 'find_css', path.relative(options.projecRoot, asset.filePath), { meta: 'data' })</code>\n   */\n  createMeasurement(\n    name: string,\n    category?: string,\n    argumentName?: string,\n    otherArgs?: {[key: string]: mixed},\n  ): TraceMeasurement | null;\n}\n"
  },
  {
    "path": "packages/core/types-internal/src/unsafe.js",
    "content": "// @flow\n\nexport type ConfigResult = any;\n\nexport type AST = {|\n  type: string,\n  version: string,\n  program: any,\n|};\n"
  },
  {
    "path": "packages/core/utils/.eslintrc.js",
    "content": "const RESTRICTED_CONFIG = [\n  'error',\n  {\n    paths: [\n      {\n        name: '@parcel/workers',\n        message:\n          'Do not import workers inside utils. Instead, create a separate package.',\n      },\n    ],\n  },\n];\n\nmodule.exports = {\n  extends: '@parcel/eslint-config',\n  rules: {\n    'no-restricted-imports': RESTRICTED_CONFIG,\n    'no-restricted-modules': RESTRICTED_CONFIG,\n  },\n};\n"
  },
  {
    "path": "packages/core/utils/.gitignore",
    "content": "lib\n"
  },
  {
    "path": "packages/core/utils/package.json",
    "content": "{\n  \"name\": \"@parcel/utils\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"targets\": {\n    \"main\": {\n      \"includeNodeModules\": {\n        \"@parcel/codeframe\": false,\n        \"@parcel/diagnostic\": false,\n        \"@parcel/rust\": false,\n        \"@parcel/logger\": false,\n        \"@parcel/markdown-ansi\": false,\n        \"@parcel/source-map\": false,\n        \"chalk\": false\n      }\n    }\n  },\n  \"dependencies\": {\n    \"@parcel/codeframe\": \"2.16.4\",\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/logger\": \"2.16.4\",\n    \"@parcel/markdown-ansi\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"chalk\": \"^4.1.2\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"@iarna/toml\": \"^2.2.5\",\n    \"ansi-html-community\": \"0.0.8\",\n    \"clone\": \"^2.1.2\",\n    \"fast-glob\": \"^3.3.3\",\n    \"fastest-levenshtein\": \"^1.0.16\",\n    \"is-glob\": \"^4.0.3\",\n    \"is-url\": \"^1.2.4\",\n    \"json5\": \"^2.2.3\",\n    \"lru-cache\": \"^10.4.3\",\n    \"micromatch\": \"^4.0.8\",\n    \"node-forge\": \"^1.3.1\",\n    \"nullthrows\": \"^1.1.1\",\n    \"open\": \"^7.4.2\",\n    \"snarkdown\": \"^2.0.0\",\n    \"strip-ansi\": \"^6.0.1\",\n    \"terminal-link\": \"^2.1.1\"\n  },\n  \"browser\": {\n    \"./src/generateCertificate.js\": false,\n    \"./src/http-server.js\": false,\n    \"./src/openInBrowser.js\": false,\n    \"@parcel/markdown-ansi\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/DefaultMap.js",
    "content": "// @flow strict-local\n\nexport class DefaultMap<K, V> extends Map<K, V> {\n  _getDefault: K => V;\n\n  constructor(getDefault: K => V, entries?: Iterable<[K, V]>) {\n    super(entries);\n    this._getDefault = getDefault;\n  }\n\n  get(key: K): V {\n    let ret;\n    if (this.has(key)) {\n      ret = super.get(key);\n    } else {\n      ret = this._getDefault(key);\n      this.set(key, ret);\n    }\n\n    // $FlowFixMe\n    return ret;\n  }\n}\n\n// Duplicated from DefaultMap implementation for Flow\n// Roughly mirrors https://github.com/facebook/flow/blob/2eb5a78d92c167117ba9caae070afd2b9f598599/lib/core.js#L617\nexport class DefaultWeakMap<K: interface {}, V> extends WeakMap<K, V> {\n  _getDefault: K => V;\n\n  constructor(getDefault: K => V, entries?: Iterable<[K, V]>) {\n    super(entries);\n    this._getDefault = getDefault;\n  }\n\n  get(key: K): V {\n    let ret;\n    if (this.has(key)) {\n      ret = super.get(key);\n    } else {\n      ret = this._getDefault(key);\n      this.set(key, ret);\n    }\n\n    // $FlowFixMe\n    return ret;\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/Deferred.js",
    "content": "// @flow strict-local\n\nimport invariant from 'assert';\n\nexport type Deferred<T> = {|\n  resolve(T): void,\n  reject(mixed): void,\n|};\n\nexport function makeDeferredWithPromise<T>(): {|\n  deferred: Deferred<T>,\n  promise: Promise<T>,\n|} {\n  let deferred: ?Deferred<T>;\n  let promise = new Promise<T>((resolve, reject) => {\n    deferred = {resolve, reject};\n  });\n\n  // Promise constructor callback executes synchronously, so this is defined\n  invariant(deferred != null);\n\n  return {deferred, promise};\n}\n"
  },
  {
    "path": "packages/core/utils/src/PromiseQueue.js",
    "content": "// @flow strict-local\n\nimport {makeDeferredWithPromise, type Deferred} from './Deferred';\n\ntype PromiseQueueOpts = {|maxConcurrent: number|};\n\nexport default class PromiseQueue<T> {\n  _deferred: ?Deferred<Array<T>>;\n  _maxConcurrent: number;\n  _numRunning: number = 0;\n  _queue: Array<() => Promise<void>> = [];\n  _runPromise: ?Promise<Array<T>> = null;\n  _error: mixed;\n  _count: number = 0;\n  _results: Array<T> = [];\n  _addSubscriptions: Set<() => void> = new Set();\n\n  constructor(opts: PromiseQueueOpts = {maxConcurrent: Infinity}) {\n    if (opts.maxConcurrent <= 0) {\n      throw new TypeError('maxConcurrent must be a positive, non-zero value');\n    }\n\n    this._maxConcurrent = opts.maxConcurrent;\n  }\n\n  getNumWaiting(): number {\n    return this._queue.length;\n  }\n\n  add(fn: () => Promise<T>): Promise<T> {\n    return new Promise((resolve, reject) => {\n      let i = this._count++;\n      let wrapped = () =>\n        fn().then(\n          result => {\n            this._results[i] = result;\n            resolve(result);\n          },\n          err => {\n            reject(err);\n            throw err;\n          },\n        );\n\n      this._queue.push(wrapped);\n\n      for (const addFn of this._addSubscriptions) {\n        addFn();\n      }\n\n      if (this._numRunning > 0 && this._numRunning < this._maxConcurrent) {\n        this._next();\n      }\n    });\n  }\n\n  subscribeToAdd(fn: () => void): () => void {\n    this._addSubscriptions.add(fn);\n\n    return () => {\n      this._addSubscriptions.delete(fn);\n    };\n  }\n\n  run(): Promise<Array<T>> {\n    if (this._runPromise != null) {\n      return this._runPromise;\n    }\n\n    if (this._queue.length === 0) {\n      return Promise.resolve([]);\n    }\n\n    let {deferred, promise} = makeDeferredWithPromise();\n    this._deferred = deferred;\n    this._runPromise = promise;\n\n    while (this._queue.length && this._numRunning < this._maxConcurrent) {\n      this._next();\n    }\n\n    return promise;\n  }\n\n  async _next(): Promise<void> {\n    let fn = this._queue.shift();\n    await this._runFn(fn);\n    if (this._queue.length) {\n      this._next();\n    } else if (this._numRunning === 0) {\n      this._done();\n    }\n  }\n\n  async _runFn(fn: () => mixed): Promise<void> {\n    this._numRunning++;\n    try {\n      await fn();\n    } catch (e) {\n      // Only store the first error that occurs.\n      // We don't reject immediately so that any other concurrent\n      // requests have time to complete.\n      if (this._error == null) {\n        this._error = e;\n      }\n    } finally {\n      this._numRunning--;\n    }\n  }\n\n  _resetState(): void {\n    this._queue = [];\n    this._count = 0;\n    this._results = [];\n    this._runPromise = null;\n    this._numRunning = 0;\n    this._deferred = null;\n  }\n\n  _done(): void {\n    if (this._deferred != null) {\n      if (this._error != null) {\n        this._deferred.reject(this._error);\n      } else {\n        this._deferred.resolve(this._results);\n      }\n    }\n\n    this._resetState();\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/TapStream.js",
    "content": "// @flow strict-local\n\nimport {Transform} from 'stream';\n\n/*\n * \"Taps\" into the contents of a flowing stream, yielding chunks to the passed\n * callback. Continues to pass data chunks down the stream.\n */\nexport default class TapStream extends Transform {\n  _tap: Buffer => mixed;\n  constructor(tap: Buffer => mixed, options: mixed) {\n    super({...options});\n    this._tap = tap;\n  }\n\n  _transform(\n    chunk: Buffer | string,\n    encoding: string,\n    callback: (err: ?Error, chunk?: Buffer | string) => mixed,\n  ) {\n    try {\n      this._tap(Buffer.from(chunk));\n      callback(null, chunk);\n    } catch (err) {\n      callback(err);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/alternatives.js",
    "content": "// @flow\nimport path from 'path';\nimport type {FileSystem} from '@parcel/types';\nimport {fuzzySearch} from './schema';\nimport {relativePath} from './path';\nimport {resolveConfig} from './config';\n\nexport async function findAlternativeNodeModules(\n  fs: FileSystem,\n  moduleName: string,\n  dir: string,\n): Promise<Array<string>> {\n  let potentialModules: Array<string> = [];\n  let root = path.parse(dir).root;\n  let isOrganisationModule = moduleName.startsWith('@');\n\n  while (dir !== root) {\n    // Skip node_modules directories\n    if (path.basename(dir) === 'node_modules') {\n      dir = path.dirname(dir);\n    }\n\n    try {\n      let modulesDir = path.join(dir, 'node_modules');\n      let stats = await fs.stat(modulesDir);\n      if (stats.isDirectory()) {\n        let dirContent = (await fs.readdir(modulesDir)).sort();\n\n        // Filter out the modules that interest us\n        let modules = dirContent.filter(i =>\n          isOrganisationModule ? i.startsWith('@') : !i.startsWith('@'),\n        );\n\n        // If it's an organisation module, loop through all the modules of that organisation\n        if (isOrganisationModule) {\n          await Promise.all(\n            modules.map(async item => {\n              let orgDirPath = path.join(modulesDir, item);\n              let orgDirContent = (await fs.readdir(orgDirPath)).sort();\n\n              // Add all org packages\n              potentialModules.push(...orgDirContent.map(i => `${item}/${i}`));\n            }),\n          );\n        } else {\n          potentialModules.push(...modules);\n        }\n      }\n    } catch (err) {\n      // ignore\n    }\n\n    // Move up a directory\n    dir = path.dirname(dir);\n  }\n\n  return fuzzySearch(potentialModules.sort(), moduleName).slice(0, 2);\n}\n\nasync function findAllFilesUp({\n  fs,\n  dir,\n  root,\n  basedir,\n  maxlength,\n  collected,\n  leadingDotSlash = true,\n  includeDirectories = true,\n}: {|\n  fs: FileSystem,\n  dir: string,\n  root: string,\n  basedir: string,\n  maxlength: number,\n  collected: Array<string>,\n  leadingDotSlash?: boolean,\n  includeDirectories?: boolean,\n|}): Promise<mixed> {\n  let dirContent = (await fs.readdir(dir)).sort();\n  return Promise.all(\n    dirContent.map(async item => {\n      let fullPath = path.join(dir, item);\n      let relativeFilePath = relativePath(basedir, fullPath, leadingDotSlash);\n      if (relativeFilePath.length < maxlength) {\n        let stats = await fs.stat(fullPath);\n        let isDir = stats.isDirectory();\n        if ((isDir && includeDirectories) || stats.isFile()) {\n          collected.push(relativeFilePath);\n        }\n\n        // If it's a directory, run over each item within said directory...\n        if (isDir) {\n          return findAllFilesUp({\n            fs,\n            dir: fullPath,\n            root,\n            basedir,\n            maxlength,\n            collected,\n          });\n        }\n      }\n    }),\n  );\n}\n\nexport async function findAlternativeFiles(\n  fs: FileSystem,\n  fileSpecifier: string,\n  dir: string,\n  projectRoot: string,\n  leadingDotSlash?: boolean = true,\n  includeDirectories?: boolean = true,\n  includeExtension?: boolean = false,\n): Promise<Array<string>> {\n  let potentialFiles: Array<string> = [];\n  // Find our root, we won't recommend files above the package root as that's bad practise\n  let pkg = await resolveConfig(\n    fs,\n    path.join(dir, 'index'),\n    ['package.json'],\n    projectRoot,\n  );\n\n  let pkgRoot = pkg ? path.dirname(pkg) : projectRoot;\n  await findAllFilesUp({\n    fs,\n    dir: pkgRoot,\n    root: pkgRoot,\n    basedir: dir,\n    maxlength: fileSpecifier.length + 10,\n    collected: potentialFiles,\n    leadingDotSlash,\n    includeDirectories,\n  });\n\n  if (path.extname(fileSpecifier) === '' && !includeExtension) {\n    potentialFiles = potentialFiles.map(p => {\n      let ext = path.extname(p);\n      return ext.length > 0 ? p.slice(0, -ext.length) : p;\n    });\n  }\n\n  return fuzzySearch(potentialFiles.sort(), fileSpecifier).slice(0, 2);\n}\n"
  },
  {
    "path": "packages/core/utils/src/ansi-html.js",
    "content": "// @flow strict-local\nimport ansiHTML from 'ansi-html-community';\nimport {escapeHTML} from './escape-html';\n\nexport function ansiHtml(ansi: string): string {\n  return ansiHTML(escapeHTML(ansi));\n}\n"
  },
  {
    "path": "packages/core/utils/src/blob.js",
    "content": "// @flow strict-local\n\nimport type {Blob} from '@parcel/types';\n\nimport {Buffer} from 'buffer';\nimport {bufferStream} from './';\nimport {Readable} from 'stream';\n\nexport function blobToBuffer(blob: Blob): Promise<Buffer> {\n  if (blob instanceof Readable) {\n    return bufferStream(blob);\n  } else if (blob instanceof Buffer) {\n    return Promise.resolve(Buffer.from(blob));\n  } else {\n    return Promise.resolve(Buffer.from(blob, 'utf8'));\n  }\n}\n\nexport async function blobToString(blob: Blob): Promise<string> {\n  if (blob instanceof Readable) {\n    return (await bufferStream(blob)).toString();\n  } else if (blob instanceof Buffer) {\n    return blob.toString();\n  } else {\n    return blob;\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/bundle-url.js",
    "content": "// @flow strict-local\n\nlet bundleURL: ?string = null;\nfunction getBundleURLCached(): string {\n  if (bundleURL == null) {\n    bundleURL = _getBundleURL();\n  }\n\n  return bundleURL;\n}\n\nfunction _getBundleURL(): string {\n  // Attempt to find the URL of the current script and use that as the base URL\n  try {\n    throw new Error();\n  } catch (err) {\n    let stack: string = typeof err.stack === 'string' ? err.stack : '';\n    let matches = stack.match(/(https?|file|ftp):\\/\\/[^)\\n]+/g);\n    if (matches) {\n      return getBaseURL(matches[0]);\n    }\n  }\n\n  return '/';\n}\n\nexport function getBaseURL(url: ?string): string {\n  if (url == null) {\n    return '/';\n  }\n\n  return url.replace(/^((?:https?|file|ftp):\\/\\/.+)\\/[^/]+$/, '$1') + '/';\n}\n\nexport const getBundleURL = getBundleURLCached;\n"
  },
  {
    "path": "packages/core/utils/src/collection.js",
    "content": "// @flow strict-local\n\nexport function unique<T>(array: Array<T>): Array<T> {\n  return [...new Set(array)];\n}\n\nexport function objectSortedEntries(obj: {\n  +[string]: mixed,\n  ...\n}): Array<[string, mixed]> {\n  return Object.entries(obj).sort(([keyA], [keyB]) => keyA.localeCompare(keyB));\n}\n\nexport function objectSortedEntriesDeep(object: {\n  +[string]: mixed,\n  ...\n}): Array<[string, mixed]> {\n  let sortedEntries = objectSortedEntries(object);\n  for (let i = 0; i < sortedEntries.length; i++) {\n    sortedEntries[i][1] = sortEntry(sortedEntries[i][1]);\n  }\n  return sortedEntries;\n}\n\nfunction sortEntry(entry: mixed) {\n  if (Array.isArray(entry)) {\n    return entry.map(sortEntry);\n  }\n\n  if (typeof entry === 'object' && entry != null) {\n    return objectSortedEntriesDeep(entry);\n  }\n\n  return entry;\n}\n\nexport function setDifference<T>(\n  a: $ReadOnlySet<T>,\n  b: $ReadOnlySet<T>,\n): Set<T> {\n  let difference = new Set();\n  for (let e of a) {\n    if (!b.has(e)) {\n      difference.add(e);\n    }\n  }\n  for (let d of b) {\n    if (!a.has(d)) {\n      difference.add(d);\n    }\n  }\n  return difference;\n}\n\nexport function setIntersect<T>(a: Set<T>, b: $ReadOnlySet<T>): void {\n  for (let entry of a) {\n    if (!b.has(entry)) {\n      a.delete(entry);\n    }\n  }\n}\n\nexport function setUnion<T>(a: Iterable<T>, b: Iterable<T>): Set<T> {\n  return new Set([...a, ...b]);\n}\n\nexport function setEqual<T>(a: $ReadOnlySet<T>, b: $ReadOnlySet<T>): boolean {\n  if (a.size != b.size) {\n    return false;\n  }\n  for (let entry of a) {\n    if (!b.has(entry)) {\n      return false;\n    }\n  }\n  return true;\n}\n"
  },
  {
    "path": "packages/core/utils/src/config.js",
    "content": "// @flow\n\nimport type {ConfigResult, File, FilePath} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport path from 'path';\nimport clone from 'clone';\nimport json5 from 'json5';\nimport {parse as toml} from '@iarna/toml';\nimport {LRUCache} from 'lru-cache';\n\nexport type ConfigOutput = {|\n  config: ConfigResult,\n  files: Array<File>,\n|};\n\nexport type ConfigOptions = {|\n  parse?: boolean,\n  parser?: string => any,\n|};\n\nconst configCache = new LRUCache<FilePath, ConfigOutput>({max: 500});\nconst resolveCache = new Map();\n\nexport function resolveConfig(\n  fs: FileSystem,\n  filepath: FilePath,\n  filenames: Array<FilePath>,\n  projectRoot: FilePath,\n): Promise<?FilePath> {\n  // Cache the result of resolving config for this directory.\n  // This is automatically invalidated at the end of the current build.\n  let key = path.dirname(filepath) + filenames.join(',');\n  let cached = resolveCache.get(key);\n  if (cached !== undefined) {\n    return Promise.resolve(cached);\n  }\n\n  let resolved = fs.findAncestorFile(\n    filenames,\n    path.dirname(filepath),\n    projectRoot,\n  );\n  resolveCache.set(key, resolved);\n  return Promise.resolve(resolved);\n}\n\nexport function resolveConfigSync(\n  fs: FileSystem,\n  filepath: FilePath,\n  filenames: Array<FilePath>,\n  projectRoot: FilePath,\n): ?FilePath {\n  return fs.findAncestorFile(filenames, path.dirname(filepath), projectRoot);\n}\n\nexport async function loadConfig(\n  fs: FileSystem,\n  filepath: FilePath,\n  filenames: Array<FilePath>,\n  projectRoot: FilePath,\n  opts: ?ConfigOptions,\n): Promise<ConfigOutput | null> {\n  let parse = opts?.parse ?? true;\n  let configFile = await resolveConfig(fs, filepath, filenames, projectRoot);\n  if (configFile) {\n    let cachedOutput = configCache.get(String(parse) + configFile);\n    if (cachedOutput) {\n      return cachedOutput;\n    }\n\n    try {\n      let extname = path.extname(configFile).slice(1);\n      if (extname === 'js' || extname === 'cjs') {\n        let output = {\n          // $FlowFixMe\n          config: clone(module.require(configFile)),\n          files: [{filePath: configFile}],\n        };\n\n        configCache.set(configFile, output);\n        return output;\n      }\n\n      return readConfig(fs, configFile, opts);\n    } catch (err) {\n      if (err.code === 'MODULE_NOT_FOUND' || err.code === 'ENOENT') {\n        return null;\n      }\n\n      throw err;\n    }\n  }\n\n  return null;\n}\n\nloadConfig.clear = () => {\n  configCache.clear();\n  resolveCache.clear();\n};\n\nexport async function readConfig(\n  fs: FileSystem,\n  configFile: FilePath,\n  opts: ?ConfigOptions,\n): Promise<ConfigOutput | null> {\n  let parse = opts?.parse ?? true;\n  let cachedOutput = configCache.get(String(parse) + configFile);\n  if (cachedOutput) {\n    return cachedOutput;\n  }\n\n  try {\n    let configContent = await fs.readFile(configFile, 'utf8');\n    let config;\n    if (parse === false) {\n      config = configContent;\n    } else {\n      let extname = path.extname(configFile).slice(1);\n      let parse = opts?.parser ?? getParser(extname);\n      try {\n        config = parse(configContent);\n      } catch (e) {\n        if (extname !== '' && extname !== 'json') {\n          throw e;\n        }\n\n        let pos = {\n          line: e.lineNumber,\n          column: e.columnNumber,\n        };\n\n        throw new ThrowableDiagnostic({\n          diagnostic: {\n            message: `Failed to parse ${path.basename(configFile)}`,\n            origin: '@parcel/utils',\n            codeFrames: [\n              {\n                language: 'json5',\n                filePath: configFile,\n                code: configContent,\n                codeHighlights: [\n                  {\n                    start: pos,\n                    end: pos,\n                    message: e.message,\n                  },\n                ],\n              },\n            ],\n          },\n        });\n      }\n    }\n\n    let output = {\n      config,\n      files: [{filePath: configFile}],\n    };\n\n    configCache.set(String(parse) + configFile, output);\n    return output;\n  } catch (err) {\n    if (err.code === 'MODULE_NOT_FOUND' || err.code === 'ENOENT') {\n      return null;\n    }\n\n    throw err;\n  }\n}\n\nfunction getParser(extname) {\n  switch (extname) {\n    case 'toml':\n      return toml;\n    case 'json':\n    default:\n      return json5.parse;\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/countLines.js",
    "content": "// @flow strict-local\n\nexport default function countLines(\n  string: string,\n  startIndex: number = 0,\n): number {\n  let lines = 1;\n  for (let i = startIndex; i < string.length; i++) {\n    if (string.charAt(i) === '\\n') {\n      lines++;\n    }\n  }\n\n  return lines;\n}\n"
  },
  {
    "path": "packages/core/utils/src/debounce.js",
    "content": "// @flow strict-local\n\nexport default function debounce<TArgs: Array<mixed>>(\n  fn: (...args: TArgs) => mixed,\n  delay: number,\n): (...args: TArgs) => void {\n  let timeout;\n\n  return function (...args: TArgs) {\n    if (timeout) {\n      clearTimeout(timeout);\n    }\n\n    timeout = setTimeout(() => {\n      timeout = null;\n      fn(...args);\n    }, delay);\n  };\n}\n"
  },
  {
    "path": "packages/core/utils/src/dependency-location.js",
    "content": "// @flow\n\nexport default function createDependencyLocation(\n  start: interface {\n    line: number,\n    column: number,\n  },\n  specifier: string,\n  lineOffset: number = 0,\n  columnOffset: number = 0,\n  // Imports are usually wrapped in quotes\n  importWrapperLength: number = 2,\n): {|\n  end: {|column: number, line: number|},\n  filePath: string,\n  start: {|column: number, line: number|},\n|} {\n  return {\n    filePath: specifier,\n    start: {\n      line: start.line + lineOffset,\n      column: start.column + columnOffset,\n    },\n    end: {\n      line: start.line + lineOffset,\n      column:\n        start.column +\n        specifier.length -\n        1 +\n        importWrapperLength +\n        columnOffset,\n    },\n  };\n}\n"
  },
  {
    "path": "packages/core/utils/src/escape-html.js",
    "content": "// @flow\n// Based on _.escape https://github.com/lodash/lodash/blob/master/escape.js\nconst reUnescapedHtml = /[&<>\"']/g;\nconst reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\nconst htmlEscapes = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  \"'\": '&#39;',\n};\n\nexport function escapeHTML(s: string): string {\n  if (reHasUnescapedHtml.test(s)) {\n    return s.replace(reUnescapedHtml, c => htmlEscapes[c]);\n  }\n\n  return s;\n}\n"
  },
  {
    "path": "packages/core/utils/src/generateBuildMetrics.js",
    "content": "// @flow\n\nimport type {FilePath, PackagedBundle} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport SourceMap from '@parcel/source-map';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport {loadSourceMapUrl} from './';\n\nexport type AssetStats = {|\n  filePath: string,\n  size: number,\n  originalSize: number,\n  time: number,\n|};\n\nexport type BundleStats = {|\n  filePath: string,\n  size: number,\n  time: number,\n  assets: Array<AssetStats>,\n|};\n\nexport type BuildMetrics = {|\n  bundles: Array<BundleStats>,\n|};\n\nasync function getSourcemapSizes(\n  filePath: FilePath,\n  fs: FileSystem,\n  projectRoot: FilePath,\n): Promise<?Map<string, number>> {\n  let bundleContents = await fs.readFile(filePath, 'utf-8');\n  let mapUrlData = await loadSourceMapUrl(fs, filePath, bundleContents);\n  if (!mapUrlData) {\n    return null;\n  }\n\n  let rawMap = mapUrlData.map;\n  let sourceMap = new SourceMap(projectRoot);\n  sourceMap.addVLQMap(rawMap);\n  let parsedMapData = sourceMap.getMap();\n\n  if (parsedMapData.mappings.length > 2) {\n    let sources = parsedMapData.sources.map(s =>\n      path.normalize(path.join(projectRoot, s)),\n    );\n    let currLine = 1;\n    let currColumn = 0;\n    let currMappingIndex = 0;\n    let currMapping = parsedMapData.mappings[currMappingIndex];\n    let nextMapping = parsedMapData.mappings[currMappingIndex + 1];\n    let sourceSizes = new Array(sources.length).fill(0);\n    let unknownOrigin: number = 0;\n    for (let i = 0; i < bundleContents.length; i++) {\n      let character = bundleContents[i];\n\n      while (\n        nextMapping &&\n        nextMapping.generated.line === currLine &&\n        nextMapping.generated.column <= currColumn\n      ) {\n        currMappingIndex++;\n        currMapping = parsedMapData.mappings[currMappingIndex];\n        nextMapping = parsedMapData.mappings[currMappingIndex + 1];\n      }\n\n      let currentSource = currMapping.source;\n      let charSize = Buffer.byteLength(character, 'utf8');\n      if (\n        currentSource != null &&\n        currMapping.generated.line === currLine &&\n        currMapping.generated.column <= currColumn\n      ) {\n        sourceSizes[currentSource] += charSize;\n      } else {\n        unknownOrigin += charSize;\n      }\n\n      if (character === '\\n') {\n        currColumn = 0;\n        currLine++;\n      } else {\n        currColumn++;\n      }\n    }\n\n    let sizeMap = new Map();\n    for (let i = 0; i < sourceSizes.length; i++) {\n      sizeMap.set(sources[i], sourceSizes[i]);\n    }\n\n    sizeMap.set('', unknownOrigin);\n\n    return sizeMap;\n  }\n}\n\nasync function createBundleStats(\n  bundle: PackagedBundle,\n  fs: FileSystem,\n  projectRoot: FilePath,\n) {\n  let filePath = bundle.filePath;\n  let sourcemapSizes = await getSourcemapSizes(filePath, fs, projectRoot);\n\n  let assets: Map<string, AssetStats> = new Map();\n  bundle.traverseAssets(asset => {\n    let filePath = path.normalize(asset.filePath);\n    assets.set(filePath, {\n      filePath,\n      size: asset.stats.size,\n      originalSize: asset.stats.size,\n      time: asset.stats.time,\n    });\n  });\n\n  let assetsReport: Array<AssetStats> = [];\n  if (sourcemapSizes && sourcemapSizes.size) {\n    assetsReport = Array.from(sourcemapSizes.keys()).map((filePath: string) => {\n      let foundSize = sourcemapSizes.get(filePath) || 0;\n      let stats = assets.get(filePath) || {\n        filePath,\n        size: foundSize,\n        originalSize: foundSize,\n        time: 0,\n      };\n\n      return {\n        ...stats,\n        size: foundSize,\n      };\n    });\n  } else {\n    assetsReport = Array.from(assets.values());\n  }\n\n  return {\n    filePath: nullthrows(bundle.filePath),\n    size: bundle.stats.size,\n    time: bundle.stats.time,\n    assets: assetsReport.sort((a, b) => b.size - a.size),\n  };\n}\n\nexport default async function generateBuildMetrics(\n  bundles: Array<PackagedBundle>,\n  fs: FileSystem,\n  projectRoot: FilePath,\n): Promise<BuildMetrics> {\n  bundles.sort((a, b) => b.stats.size - a.stats.size).filter(b => !!b.filePath);\n\n  return {\n    bundles: (\n      await Promise.all(bundles.map(b => createBundleStats(b, fs, projectRoot)))\n    ).filter(e => !!e),\n  };\n}\n"
  },
  {
    "path": "packages/core/utils/src/generateCertificate.js",
    "content": "// @flow\nimport type {FileSystem} from '@parcel/fs';\nimport forge from 'node-forge';\nimport path from 'path';\nimport logger from '@parcel/logger';\n\nexport default async function generateCertificate(\n  fs: FileSystem,\n  cacheDir: string,\n  host: ?string,\n): Promise<{|cert: Buffer, key: Buffer|}> {\n  let certDirectory = cacheDir;\n\n  const privateKeyPath = path.join(certDirectory, 'private.pem');\n  const certPath = path.join(certDirectory, 'primary.crt');\n  const cachedKey =\n    (await fs.exists(privateKeyPath)) && (await fs.readFile(privateKeyPath));\n  const cachedCert =\n    (await fs.exists(certPath)) && (await fs.readFile(certPath));\n\n  if (cachedKey && cachedCert) {\n    return {\n      key: cachedKey,\n      cert: cachedCert,\n    };\n  }\n\n  logger.progress('Generating SSL Certificate...');\n\n  const pki = forge.pki;\n  const keys = pki.rsa.generateKeyPair(2048);\n  const cert = pki.createCertificate();\n\n  cert.publicKey = keys.publicKey;\n  cert.serialNumber = Date.now().toString();\n  cert.validity.notBefore = new Date();\n  cert.validity.notAfter = new Date();\n  cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 1);\n\n  const attrs = [\n    {\n      name: 'commonName',\n      value: 'parceljs.org',\n    },\n    {\n      name: 'countryName',\n      value: 'US',\n    },\n    {\n      shortName: 'ST',\n      value: 'Virginia',\n    },\n    {\n      name: 'localityName',\n      value: 'Blacksburg',\n    },\n    {\n      name: 'organizationName',\n      value: 'parcelBundler',\n    },\n    {\n      shortName: 'OU',\n      value: 'Test',\n    },\n  ];\n\n  let altNames = [\n    {\n      type: 2, // DNS\n      value: 'localhost',\n    },\n    {\n      type: 7, // IP\n      ip: '127.0.0.1',\n    },\n  ];\n\n  if (host) {\n    altNames.push({\n      type: 2, // DNS\n      value: host,\n    });\n  }\n\n  cert.setSubject(attrs);\n  cert.setIssuer(attrs);\n  cert.setExtensions([\n    {\n      name: 'basicConstraints',\n      cA: false,\n    },\n    {\n      name: 'keyUsage',\n      keyCertSign: true,\n      digitalSignature: true,\n      nonRepudiation: true,\n      keyEncipherment: true,\n      dataEncipherment: true,\n    },\n    {\n      name: 'extKeyUsage',\n      serverAuth: true,\n      clientAuth: true,\n      codeSigning: true,\n      emailProtection: true,\n      timeStamping: true,\n    },\n    {\n      name: 'nsCertType',\n      client: true,\n      server: true,\n      email: true,\n      objsign: true,\n      sslCA: true,\n      emailCA: true,\n      objCA: true,\n    },\n    {\n      name: 'subjectAltName',\n      altNames,\n    },\n    {\n      name: 'subjectKeyIdentifier',\n    },\n  ]);\n\n  cert.sign(keys.privateKey, forge.md.sha256.create());\n\n  const privPem = pki.privateKeyToPem(keys.privateKey);\n  const certPem = pki.certificateToPem(cert);\n\n  await fs.mkdirp(certDirectory);\n  await fs.writeFile(privateKeyPath, privPem);\n  await fs.writeFile(certPath, certPem);\n\n  return {\n    key: privPem,\n    cert: certPem,\n  };\n}\n"
  },
  {
    "path": "packages/core/utils/src/getCertificate.js",
    "content": "// @flow\nimport type {HTTPSOptions} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\n\nexport default async function getCertificate(\n  fs: FileSystem,\n  options: HTTPSOptions,\n): Promise<{|cert: Buffer, key: Buffer|}> {\n  try {\n    let cert = await fs.readFile(options.cert);\n    let key = await fs.readFile(options.key);\n\n    return {key, cert};\n  } catch (err) {\n    throw new Error('Certificate and/or key not found');\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/getExisting.js",
    "content": "// @flow strict-local\n\nimport fs from 'fs';\n\n/**\n * Creates an object that contains both source and minified (using the source as a fallback).\n * e.g. builtins.min.js and builtins.js.\n */\nexport default function getExisting(\n  minifiedPath: string,\n  sourcePath: string,\n): {|minified: string, source: string|} {\n  let source = fs.readFileSync(sourcePath, 'utf8').trim();\n  return {\n    source,\n    minified: fs.existsSync(minifiedPath)\n      ? fs.readFileSync(minifiedPath, 'utf8').trim().replace(/;$/, '')\n      : source,\n  };\n}\n"
  },
  {
    "path": "packages/core/utils/src/getModuleParts.js",
    "content": "// @flow strict-local\nimport path from 'path';\n\nimport {normalizeSeparators} from './path';\n\n/**\n * Returns the package name and the optional subpath\n */\nexport default function getModuleParts(_name: string): [string, ?string] {\n  let name = path.normalize(_name);\n  let splitOn = name.indexOf(path.sep);\n  if (name.charAt(0) === '@') {\n    splitOn = name.indexOf(path.sep, splitOn + 1);\n  }\n  if (splitOn < 0) {\n    return [normalizeSeparators(name), undefined];\n  } else {\n    return [\n      normalizeSeparators(name.substring(0, splitOn)),\n      name.substring(splitOn + 1) || undefined,\n    ];\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/getRootDir.js",
    "content": "// @flow strict-local\n\nimport type {FilePath} from '@parcel/types';\nimport {isGlob} from './glob';\nimport path from 'path';\n\nexport default function getRootDir(files: Array<FilePath>): FilePath {\n  let cur = null;\n\n  for (let file of files) {\n    let parsed = path.parse(file);\n    parsed.dir = findGlobRoot(parsed.dir);\n    if (!cur) {\n      cur = parsed;\n    } else if (parsed.root !== cur.root) {\n      // bail out. there is no common root.\n      // this can happen on windows, e.g. C:\\foo\\bar vs. D:\\foo\\bar\n      return process.cwd();\n    } else {\n      // find the common path parts.\n      let curParts = cur.dir.split(path.sep);\n      let newParts = parsed.dir.split(path.sep);\n      let len = Math.min(curParts.length, newParts.length);\n      let i = 0;\n      while (i < len && curParts[i] === newParts[i]) {\n        i++;\n      }\n\n      cur.dir = i > 1 ? curParts.slice(0, i).join(path.sep) : cur.root;\n    }\n  }\n\n  return cur ? cur.dir : process.cwd();\n}\n\n// Transforms a path like `packages/*/src/index.js` to the root of the glob, `packages/`\nfunction findGlobRoot(dir: FilePath) {\n  let parts = dir.split(path.sep);\n  let last = parts.length;\n  for (let i = parts.length - 1; i >= 0; i--) {\n    if (isGlob(parts[i])) {\n      last = i;\n    }\n  }\n\n  return parts.slice(0, last).join(path.sep);\n}\n"
  },
  {
    "path": "packages/core/utils/src/glob.js",
    "content": "// @flow\n\nimport type {FilePath, Glob} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\n\nimport _isGlob from 'is-glob';\nimport fastGlob, {type FastGlobOptions} from 'fast-glob';\nimport micromatch, {isMatch, makeRe, type Options} from 'micromatch';\nimport {normalizeSeparators} from './path';\n\nexport function isGlob(p: FilePath): any {\n  return _isGlob(normalizeSeparators(p));\n}\n\nexport function isGlobMatch(\n  filePath: FilePath,\n  glob: Glob | Array<Glob>,\n  opts?: Options,\n): any {\n  glob = Array.isArray(glob)\n    ? glob.map(normalizeSeparators)\n    : normalizeSeparators(glob);\n  return isMatch(filePath, glob, opts);\n}\n\nexport function globMatch(\n  values: Array<string>,\n  glob: Glob | Array<Glob>,\n  opts?: Options,\n): Array<string> {\n  glob = Array.isArray(glob)\n    ? glob.map(normalizeSeparators)\n    : normalizeSeparators(glob);\n\n  return micromatch(values, glob, opts);\n}\n\nexport function globToRegex(glob: Glob, opts?: Options): RegExp {\n  return makeRe(glob, opts);\n}\n\nexport function globSync(\n  p: FilePath,\n  fs: FileSystem,\n  options?: FastGlobOptions<FilePath>,\n): Array<FilePath> {\n  // $FlowFixMe\n  options = {\n    ...options,\n    fs: {\n      statSync: p => {\n        return fs.statSync(p);\n      },\n      lstatSync: p => {\n        // Our FileSystem interface doesn't have lstat support at the moment,\n        // but this is fine for our purposes since we follow symlinks by default.\n        return fs.statSync(p);\n      },\n      readdirSync: (p, opts) => {\n        return fs.readdirSync(p, opts);\n      },\n    },\n  };\n\n  // $FlowFixMe\n  return fastGlob.sync(normalizeSeparators(p), options);\n}\n\nexport function glob(\n  p: FilePath,\n  fs: FileSystem,\n  options: FastGlobOptions<FilePath>,\n): Promise<Array<FilePath>> {\n  // $FlowFixMe\n  options = {\n    ...options,\n    fs: {\n      stat: async (p, cb) => {\n        try {\n          cb(null, await fs.stat(p));\n        } catch (err) {\n          cb(err);\n        }\n      },\n      lstat: async (p, cb) => {\n        // Our FileSystem interface doesn't have lstat support at the moment,\n        // but this is fine for our purposes since we follow symlinks by default.\n        try {\n          cb(null, await fs.stat(p));\n        } catch (err) {\n          cb(err);\n        }\n      },\n      readdir: async (p, opts, cb) => {\n        if (typeof opts === 'function') {\n          cb = opts;\n          opts = null;\n        }\n\n        try {\n          cb(null, await fs.readdir(p, opts));\n        } catch (err) {\n          cb(err);\n        }\n      },\n    },\n  };\n\n  // $FlowFixMe Added in Flow 0.121.0 upgrade in #4381\n  return fastGlob(normalizeSeparators(p), options);\n}\n"
  },
  {
    "path": "packages/core/utils/src/hash.js",
    "content": "// @flow strict-local\n\nimport type {Readable} from 'stream';\nimport type {FileSystem} from '@parcel/fs';\n\nimport {objectSortedEntriesDeep} from './collection';\nimport {hashString, Hash} from '@parcel/rust';\n\nexport function hashStream(stream: Readable): Promise<string> {\n  let hash = new Hash();\n  return new Promise((resolve, reject) => {\n    stream.on('error', err => {\n      reject(err);\n    });\n    stream\n      .on('data', chunk => {\n        hash.writeBuffer(chunk);\n      })\n      .on('end', function () {\n        resolve(hash.finish());\n      })\n      .on('error', err => {\n        reject(err);\n      });\n  });\n}\n\nexport function hashObject(obj: {+[string]: mixed, ...}): string {\n  return hashString(JSON.stringify(objectSortedEntriesDeep(obj)));\n}\n\nlet testCache: {|[string]: Promise<string>|} = {\n  /*:: ...null */\n};\nexport function hashFile(fs: FileSystem, filePath: string): Promise<string> {\n  if (process.env.PARCEL_BUILD_ENV === 'test') {\n    // Development builds of these native modules are especially big and slow to hash.\n    if (\n      /parcel-swc\\.[^\\\\/]+\\.node$|lightningcss.[^\\\\/]+.node$/.test(filePath)\n    ) {\n      let cacheEntry = testCache[filePath];\n      if (cacheEntry) return cacheEntry;\n      let v = hashStream(fs.createReadStream(filePath));\n      testCache[filePath] = v;\n      return v;\n    }\n  }\n  return hashStream(fs.createReadStream(filePath));\n}\n"
  },
  {
    "path": "packages/core/utils/src/http-server.js",
    "content": "// @flow strict-local\n\nimport type {\n  Server as HTTPOnlyServer,\n  IncomingMessage as HTTPRequest,\n  ServerResponse as HTTPResponse,\n} from 'http';\nimport type {\n  Server as HTTPSServer,\n  IncomingMessage as HTTPSRequest,\n  ServerResponse as HTTPSResponse,\n} from 'https';\nimport type {Socket} from 'net';\nimport type {FilePath, HTTPSOptions} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\n\nimport http from 'http';\nimport https from 'https';\nimport nullthrows from 'nullthrows';\nimport {getCertificate, generateCertificate} from './';\n\ntype CreateHTTPServerOpts = {|\n  listener?: (HTTPRequest | HTTPSRequest, HTTPResponse | HTTPSResponse) => void,\n  host?: string,\n  ...\n    | {|\n        https: ?(HTTPSOptions | boolean),\n        inputFS: FileSystem,\n        outputFS: FileSystem,\n        cacheDir: FilePath,\n      |}\n    | {||},\n|};\n\nexport type HTTPServer = HTTPOnlyServer | HTTPSServer;\n\n// Creates either an http or https server with an awaitable dispose\n// that closes any connections\nexport async function createHTTPServer(\n  options: CreateHTTPServerOpts,\n): Promise<{|\n  stop: () => Promise<void>,\n  server: HTTPServer,\n|}> {\n  let server;\n  if (!options.https) {\n    server = http.createServer(options.listener);\n  } else if (options.https === true) {\n    let {cert, key} = await generateCertificate(\n      options.outputFS,\n      options.cacheDir,\n      options.host,\n    );\n\n    server = https.createServer({cert, key}, options.listener);\n  } else {\n    let {cert, key} = await getCertificate(options.inputFS, options.https);\n\n    server = https.createServer({cert, key}, options.listener);\n  }\n\n  // HTTPServer#close only stops accepting new connections, and does not close existing ones.\n  // Before closing, destroy any active connections through their sockets. Additionally, remove sockets when they close:\n  // https://stackoverflow.com/questions/18874689/force-close-all-connections-in-a-node-js-http-server\n  // https://stackoverflow.com/questions/14626636/how-do-i-shutdown-a-node-js-https-server-immediately/14636625#14636625\n  let sockets: Set<Socket> = new Set();\n  server.on('connection', (socket: Socket) => {\n    nullthrows(sockets).add(socket);\n    socket.on('close', () => {\n      nullthrows(sockets).delete(socket);\n    });\n  });\n  return {\n    server,\n    stop() {\n      return new Promise((resolve, reject) => {\n        for (let socket of nullthrows(sockets)) {\n          socket.destroy();\n        }\n        sockets = new Set();\n\n        server.close(err => {\n          if (err != null) {\n            reject(err);\n            return;\n          }\n\n          resolve();\n        });\n      });\n    },\n  };\n}\n"
  },
  {
    "path": "packages/core/utils/src/import-map.js",
    "content": "// @flow\nimport type {BundleGraph, NamedBundle} from '@parcel/types';\nimport {normalizeSeparators} from './path';\n\nlet importMapCache = new WeakMap();\n\nexport function getImportMap(\n  bundleGraph: BundleGraph<NamedBundle>,\n  entryBundle: NamedBundle,\n): {[string]: string} {\n  let cache = importMapCache.get(bundleGraph);\n  if (!cache) {\n    cache = new WeakMap();\n    importMapCache.set(bundleGraph, cache);\n  }\n\n  let cached = cache.get(entryBundle);\n  if (cached) {\n    return cached;\n  }\n\n  let mappings = {};\n  for (let childBundle of bundleGraph.getChildBundles(entryBundle)) {\n    bundleGraph.traverseBundles((bundle, _, actions) => {\n      if (bundle.bundleBehavior === 'inline') {\n        return;\n      }\n\n      mappings[bundle.publicId] = normalizeSeparators(bundle.name);\n\n      if (bundle !== entryBundle && isNewContext(bundle, bundleGraph)) {\n        for (let referenced of bundleGraph.getReferencedBundles(bundle)) {\n          mappings[referenced.publicId] = normalizeSeparators(referenced.name);\n        }\n        // New contexts have their own manifests, so there's no need to continue.\n        actions.skipChildren();\n      }\n    }, childBundle);\n  }\n\n  cache.set(entryBundle, mappings);\n  return mappings;\n}\n\nfunction isNewContext(\n  bundle: NamedBundle,\n  bundleGraph: BundleGraph<NamedBundle>,\n): boolean {\n  let parents = bundleGraph.getParentBundles(bundle);\n  return (\n    parents.length === 0 ||\n    parents.some(\n      parent =>\n        parent.env.context !== bundle.env.context || parent.type !== 'js',\n    )\n  );\n}\n"
  },
  {
    "path": "packages/core/utils/src/index.js",
    "content": "// @flow strict-local\nexport type * from './config';\nexport type * from './Deferred';\nexport type * from './generateBuildMetrics';\nexport type * from './http-server';\nexport type * from './path';\nexport type * from './prettyDiagnostic';\nexport type * from './schema';\n\nexport {default as countLines} from './countLines';\nexport {default as generateBuildMetrics} from './generateBuildMetrics';\nexport {default as generateCertificate} from './generateCertificate';\nexport {default as getCertificate} from './getCertificate';\nexport {default as getModuleParts} from './getModuleParts';\nexport {default as getRootDir} from './getRootDir';\nexport {default as isDirectoryInside} from './isDirectoryInside';\nexport {default as isURL} from './is-url';\nexport {default as objectHash} from './objectHash';\nexport {default as prettifyTime} from './prettifyTime';\nexport {default as prettyDiagnostic} from './prettyDiagnostic';\nexport {default as PromiseQueue} from './PromiseQueue';\nexport {default as validateSchema} from './schema';\nexport {default as TapStream} from './TapStream';\nexport {default as urlJoin} from './urlJoin';\nexport {default as relativeUrl} from './relativeUrl';\nexport {default as createDependencyLocation} from './dependency-location';\nexport {default as debounce} from './debounce';\nexport {default as throttle} from './throttle';\nexport {default as openInBrowser} from './openInBrowser';\n\n// Explicit re-exports instead of export * for lazy require performance\nexport {findAlternativeNodeModules, findAlternativeFiles} from './alternatives';\nexport {blobToBuffer, blobToString} from './blob';\nexport {\n  unique,\n  objectSortedEntries,\n  objectSortedEntriesDeep,\n  setDifference,\n  setEqual,\n  setIntersect,\n  setUnion,\n} from './collection';\nexport {\n  resolveConfig,\n  resolveConfigSync,\n  loadConfig,\n  readConfig,\n} from './config';\nexport {DefaultMap, DefaultWeakMap} from './DefaultMap';\nexport {makeDeferredWithPromise} from './Deferred';\nexport {getProgressMessage} from './progress-message.js';\nexport {\n  isGlob,\n  isGlobMatch,\n  globMatch,\n  globSync,\n  glob,\n  globToRegex,\n} from './glob';\nexport {hashStream, hashObject, hashFile} from './hash';\nexport {SharedBuffer} from './shared-buffer';\nexport {fuzzySearch} from './schema';\nexport {createHTTPServer} from './http-server';\nexport {normalizePath, normalizeSeparators, relativePath} from './path';\nexport {\n  replaceURLReferences,\n  replaceInlineReferences,\n  getURLReplacement,\n} from './replaceBundleReferences';\nexport {\n  measureStreamLength,\n  readableFromStringOrBuffer,\n  bufferStream,\n  blobToStream,\n  streamFromPromise,\n  fallbackStream,\n} from './stream';\nexport {relativeBundlePath} from './relativeBundlePath';\nexport {ansiHtml} from './ansi-html';\nexport {escapeHTML} from './escape-html';\nexport {\n  SOURCEMAP_RE,\n  SOURCEMAP_EXTENSIONS,\n  matchSourceMappingURL,\n  loadSourceMapUrl,\n  loadSourceMap,\n  remapSourceLocation,\n} from './sourcemap';\nexport {default as stripAnsi} from 'strip-ansi';\nexport {detectSVGOVersion, convertSVGOConfig} from './svgo';\nexport {getImportMap} from './import-map';\n"
  },
  {
    "path": "packages/core/utils/src/is-url.js",
    "content": "// @flow\n\nimport _isURL from 'is-url';\n\n// Matches anchor (ie: #raptors)\nconst ANCHOR_REGEXP = /^#/;\n\n// Matches scheme (ie: tel:, mailto:, data:, itms-apps:)\nconst SCHEME_REGEXP = /^[a-z][a-z0-9\\-+.]*:/i;\n\nexport default function isURL(url: string): boolean {\n  return _isURL(url) || ANCHOR_REGEXP.test(url) || SCHEME_REGEXP.test(url);\n}\n"
  },
  {
    "path": "packages/core/utils/src/isDirectoryInside.js",
    "content": "// @flow strict-local\nimport type {FilePath} from '@parcel/types';\nimport path from 'path';\n\nexport default function isDirectoryInside(\n  child: FilePath,\n  parent: FilePath,\n): boolean {\n  const relative = path.relative(parent, child);\n  return !relative.startsWith('..') && !path.isAbsolute(relative);\n}\n"
  },
  {
    "path": "packages/core/utils/src/objectHash.js",
    "content": "// @flow strict-local\n\nimport crypto from 'crypto';\n\n// $FlowFixMe\ntype Hashable = Object;\n\nexport default function objectHash(object: Hashable): string {\n  let hash = crypto.createHash('md5');\n  for (let key of Object.keys(object).sort()) {\n    let val = object[key];\n    if (typeof val === 'object' && val) {\n      hash.update(key + objectHash(val));\n    } else {\n      hash.update(key + val);\n    }\n  }\n\n  return hash.digest('hex');\n}\n"
  },
  {
    "path": "packages/core/utils/src/openInBrowser.js",
    "content": "// @flow\n\nimport open from 'open';\nimport {execSync} from 'child_process';\nimport logger from '@parcel/logger';\n\n// Chrome app name is platform dependent. we should not hard code it.\n// https://github.com/react-native-community/cli/blob/e2be8a905285d9b37512fc78c9755b9635ecf805/packages/cli/src/commands/server/launchDebugger.ts#L28\nfunction getChromeAppName(): string {\n  switch (process.platform) {\n    case 'darwin':\n      return 'google chrome';\n    case 'win32':\n      return 'chrome';\n    case 'linux':\n      if (commandExistsUnixSync('google-chrome')) {\n        return 'google-chrome';\n      }\n      if (commandExistsUnixSync('chromium-browser')) {\n        return 'chromium-browser';\n      }\n      return 'chromium';\n\n    default:\n      return 'google-chrome';\n  }\n}\n\nfunction commandExistsUnixSync(commandName: string) {\n  try {\n    const stdout = execSync(\n      `command -v ${commandName} 2>/dev/null` +\n        ` && { echo >&1 '${commandName} found'; exit 0; }`,\n    );\n    return !!stdout;\n  } catch (error) {\n    return false;\n  }\n}\n\nfunction getAppName(appName: string): string {\n  if (['google', 'chrome'].includes(appName)) {\n    return getChromeAppName();\n  } else if (['brave', 'Brave'].includes(appName)) {\n    return 'Brave Browser';\n  } else return appName;\n}\n\nexport default async function openInBrowser(url: string, browser: string) {\n  try {\n    const options =\n      typeof browser === 'string' && browser.length > 0\n        ? {app: [getAppName(browser)]}\n        : undefined;\n\n    await open(url, options);\n  } catch (err) {\n    logger.error(\n      `Unexpected error while opening in browser: ${browser}`,\n      '@parcel/utils',\n    );\n    logger.error(err, '@parcel/utils');\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/parseCSSImport.js",
    "content": "// @flow strict\n\nexport default function parseCSSImport(url: string): string {\n  if (!/^(~|\\.\\/|\\/)/.test(url)) {\n    return './' + url;\n  } else if (!/^(~\\/|\\.\\/|\\/)/.test(url)) {\n    return url.substring(1);\n  } else {\n    return url;\n  }\n}\n"
  },
  {
    "path": "packages/core/utils/src/path.js",
    "content": "// @flow strict-local\nimport type {FilePath} from '@parcel/types';\nimport path from 'path';\n\nconst ABSOLUTE_PATH_REGEX = /^([a-zA-Z]:){0,1}[\\\\/]+/;\nconst SEPARATOR_REGEX = /[\\\\]+/g;\n\nexport function isAbsolute(filepath: string): boolean {\n  return ABSOLUTE_PATH_REGEX.test(filepath);\n}\n\nexport function normalizeSeparators(filePath: FilePath): FilePath {\n  return filePath.replace(SEPARATOR_REGEX, '/');\n}\n\nexport type PathOptions = {\n  noLeadingDotSlash?: boolean,\n  ...\n};\n\nexport function normalizePath(\n  filePath: FilePath,\n  leadingDotSlash: boolean = true,\n): FilePath {\n  if (\n    leadingDotSlash &&\n    (filePath[0] !== '.' ||\n      (filePath[1] !== '.' && filePath[1] !== '/' && filePath[1] !== '\\\\')) &&\n    !path.isAbsolute(filePath)\n  ) {\n    return normalizeSeparators('./' + filePath);\n  } else {\n    return normalizeSeparators(filePath);\n  }\n}\n\nexport function relativePath(\n  from: string,\n  to: string,\n  leadingDotSlash: boolean = true,\n): FilePath {\n  // Fast path\n  if (to.startsWith(from + '/')) {\n    return (leadingDotSlash ? './' : '') + to.slice(from.length + 1);\n  }\n\n  return normalizePath(path.relative(from, to), leadingDotSlash);\n}\n"
  },
  {
    "path": "packages/core/utils/src/prettifyTime.js",
    "content": "// @flow strict-local\n\nexport default function prettifyTime(timeInMs: number): string {\n  return timeInMs < 1000 ? `${timeInMs}ms` : `${(timeInMs / 1000).toFixed(2)}s`;\n}\n"
  },
  {
    "path": "packages/core/utils/src/prettyDiagnostic.js",
    "content": "// @flow strict-local\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {PluginOptions} from '@parcel/types';\n\nimport formatCodeFrame from '@parcel/codeframe';\nimport _mdAnsi from '@parcel/markdown-ansi';\nimport _chalk from 'chalk';\nimport path from 'path';\n// $FlowFixMe\nimport _terminalLink from 'terminal-link';\n\n/* eslint-disable import/no-extraneous-dependencies */\n// $FlowFixMe\nimport snarkdown from 'snarkdown';\n/* eslint-enable import/no-extraneous-dependencies */\n\nexport type FormattedCodeFrame = {|\n  location: string,\n  code: string,\n|};\n\nexport type AnsiDiagnosticResult = {|\n  message: string,\n  stack: string,\n  /** A formatted string containing all code frames, including their file locations. */\n  codeframe: string,\n  /** A list of code frames with highlighted code and file locations separately. */\n  frames: Array<FormattedCodeFrame>,\n  hints: Array<string>,\n  documentation: string,\n|};\n\nexport default async function prettyDiagnostic(\n  diagnostic: Diagnostic,\n  options?: PluginOptions,\n  terminalWidth?: number,\n  format: 'ansi' | 'html' = 'ansi',\n): Promise<AnsiDiagnosticResult> {\n  let {\n    origin,\n    message,\n    stack,\n    codeFrames,\n    hints,\n    skipFormatting,\n    documentationURL,\n  } = diagnostic;\n\n  const md = format === 'ansi' ? _mdAnsi : snarkdown;\n  const terminalLink =\n    format === 'ansi'\n      ? _terminalLink\n      : // eslint-disable-next-line no-unused-vars\n        (text, url, _) => `<a href=\"${url}\">${text}</a>`;\n  const chalk =\n    format === 'ansi'\n      ? _chalk\n      : {\n          gray: {\n            underline: v =>\n              `<span style=\"color: grey; text-decoration: underline;\">${v}</span>`,\n          },\n        };\n\n  let result = {\n    message:\n      md(`**${origin ?? 'unknown'}**: `) +\n      (skipFormatting ? message : md(message)),\n    stack: '',\n    codeframe: '',\n    frames: [],\n    hints: [],\n    documentation: '',\n  };\n\n  if (codeFrames != null) {\n    for (let codeFrame of codeFrames) {\n      let filePath = codeFrame.filePath;\n      if (filePath != null && options && !path.isAbsolute(filePath)) {\n        filePath = path.join(options.projectRoot, filePath);\n      }\n\n      let highlights = codeFrame.codeHighlights;\n      let code = codeFrame.code;\n      if (code == null && options && filePath != null) {\n        code = await options.inputFS.readFile(filePath, 'utf8');\n      }\n\n      let formattedCodeFrame = '';\n      if (code != null) {\n        formattedCodeFrame = formatCodeFrame(code, highlights, {\n          useColor: true,\n          syntaxHighlighting: true,\n          language:\n            // $FlowFixMe sketchy null checks do not matter here...\n            codeFrame.language ||\n            (filePath != null ? path.extname(filePath).substr(1) : undefined),\n          terminalWidth,\n        });\n      }\n\n      let location;\n      if (typeof filePath !== 'string') {\n        location = '';\n      } else if (highlights.length === 0) {\n        location = filePath;\n      } else {\n        location = `${filePath}:${highlights[0].start.line}:${highlights[0].start.column}`;\n      }\n      result.codeframe += location ? chalk.gray.underline(location) + '\\n' : '';\n      result.codeframe += formattedCodeFrame;\n      if (codeFrame !== codeFrames[codeFrames.length - 1]) {\n        result.codeframe += '\\n\\n';\n      }\n\n      result.frames.push({\n        location,\n        code: formattedCodeFrame,\n      });\n    }\n  }\n\n  if (stack != null) {\n    result.stack = stack;\n  }\n\n  if (Array.isArray(hints) && hints.length) {\n    result.hints = hints.map(h => {\n      return md(h);\n    });\n  }\n\n  if (documentationURL != null) {\n    result.documentation = terminalLink('Learn more', documentationURL, {\n      fallback: (text, url) => `${text}: ${url}`,\n    });\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "packages/core/utils/src/progress-message.js",
    "content": "// @flow strict-local\nimport type {BuildProgressEvent} from '@parcel/types';\n\nimport path from 'path';\n\nexport function getProgressMessage(event: BuildProgressEvent): ?string {\n  switch (event.phase) {\n    case 'transforming':\n      return `Building ${path.basename(event.filePath)}...`;\n\n    case 'bundling':\n      return 'Bundling...';\n\n    case 'packaging':\n      return `Packaging ${event.bundle.displayName}...`;\n\n    case 'optimizing':\n      return `Optimizing ${event.bundle.displayName}...`;\n  }\n\n  return null;\n}\n"
  },
  {
    "path": "packages/core/utils/src/relativeBundlePath.js",
    "content": "// @flow strict-local\n\nimport type {FilePath, NamedBundle} from '@parcel/types';\n\nimport path from 'path';\nimport {relativePath} from './path';\n\nexport function relativeBundlePath(\n  from: NamedBundle,\n  to: NamedBundle,\n  opts: {|leadingDotSlash: boolean|} = {leadingDotSlash: true},\n): FilePath {\n  let fromPath = path.join(from.target.distDir, from.name);\n  let toPath = path.join(to.target.distDir, to.name);\n  return relativePath(path.dirname(fromPath), toPath, opts.leadingDotSlash);\n}\n"
  },
  {
    "path": "packages/core/utils/src/relativeUrl.js",
    "content": "// @flow\nimport path from 'path';\nimport url from 'url';\n\nexport default function relativeUrl(from: string, to: string): string {\n  return url.format(url.parse(path.relative(from, to)));\n}\n"
  },
  {
    "path": "packages/core/utils/src/replaceBundleReferences.js",
    "content": "// @flow strict-local\n\nimport type SourceMap from '@parcel/source-map';\nimport type {\n  Async,\n  Blob,\n  Bundle,\n  BundleGraph,\n  Dependency,\n  NamedBundle,\n} from '@parcel/types';\n\nimport {Readable} from 'stream';\nimport nullthrows from 'nullthrows';\nimport invariant from 'assert';\nimport URL from 'url';\nimport {bufferStream, relativeBundlePath, urlJoin} from './';\n\ntype ReplacementMap = Map<\n  string /* dependency id */,\n  {|from: string, to: string|},\n>;\n\n/*\n * Replaces references to dependency ids for URL dependencies with:\n *   - in the case of an unresolvable url dependency, the original specifier.\n *     These are external requests that Parcel did not bundle.\n *   - in the case of a reference to another bundle, the relative url to that\n *     bundle from the current bundle.\n */\nexport function replaceURLReferences({\n  bundle,\n  bundleGraph,\n  contents,\n  map,\n  getReplacement = s => s,\n  relative = true,\n}: {|\n  bundle: NamedBundle,\n  bundleGraph: BundleGraph<NamedBundle>,\n  contents: string,\n  relative?: boolean,\n  map?: ?SourceMap,\n  getReplacement?: string => string,\n|}): {|+contents: string, +map: ?SourceMap|} {\n  let replacements = new Map();\n  let urlDependencies = [];\n  bundle.traverse(node => {\n    if (node.type === 'dependency' && node.value.specifierType === 'url') {\n      urlDependencies.push(node.value);\n    }\n  });\n\n  for (let dependency of urlDependencies) {\n    if (dependency.specifierType !== 'url') {\n      continue;\n    }\n\n    let placeholder = dependency.meta?.placeholder ?? dependency.id;\n    invariant(typeof placeholder === 'string');\n\n    let resolved = bundleGraph.getReferencedBundle(dependency, bundle);\n    if (resolved == null) {\n      replacements.set(placeholder, {\n        from: placeholder,\n        to: getReplacement(dependency.specifier),\n      });\n      continue;\n    }\n\n    if (resolved.bundleBehavior === 'inline') {\n      // If a bundle is inline, it should be replaced with inline contents,\n      // not a URL.\n      continue;\n    }\n\n    replacements.set(\n      placeholder,\n      getURLReplacement({\n        dependency,\n        fromBundle: bundle,\n        toBundle: resolved,\n        relative,\n        getReplacement,\n      }),\n    );\n  }\n\n  return performReplacement(replacements, contents, map);\n}\n\n/*\n * Replaces references to dependency ids for inline bundles with the packaged\n * contents of that bundle.\n */\nexport async function replaceInlineReferences({\n  bundle,\n  bundleGraph,\n  contents,\n  map,\n  getInlineReplacement,\n  getInlineBundleContents,\n}: {|\n  bundle: Bundle,\n  bundleGraph: BundleGraph<NamedBundle>,\n  contents: string,\n  getInlineReplacement: (\n    Dependency,\n    ?'string',\n    string,\n  ) => {|from: string, to: string|},\n  getInlineBundleContents: (\n    Bundle,\n    BundleGraph<NamedBundle>,\n  ) => Async<{|contents: Blob|}>,\n  map?: ?SourceMap,\n|}): Promise<{|+contents: string, +map: ?SourceMap|}> {\n  let replacements = new Map();\n\n  let dependencies = [];\n  bundle.traverse(node => {\n    if (node.type === 'dependency') {\n      dependencies.push(node.value);\n    }\n  });\n\n  for (let dependency of dependencies) {\n    let entryBundle = bundleGraph.getReferencedBundle(dependency, bundle);\n    if (entryBundle?.bundleBehavior !== 'inline') {\n      continue;\n    }\n\n    let packagedBundle = await getInlineBundleContents(\n      entryBundle,\n      bundleGraph,\n    );\n    let packagedContents = (\n      packagedBundle.contents instanceof Readable\n        ? await bufferStream(packagedBundle.contents)\n        : packagedBundle.contents\n    ).toString();\n\n    let inlineType = nullthrows(entryBundle.getMainEntry()).meta.inlineType;\n    if (inlineType == null || inlineType === 'string') {\n      let placeholder = dependency.meta?.placeholder ?? dependency.id;\n      invariant(typeof placeholder === 'string');\n      replacements.set(\n        placeholder,\n        getInlineReplacement(dependency, inlineType, packagedContents),\n      );\n    }\n  }\n\n  return performReplacement(replacements, contents, map);\n}\n\nexport function getURLReplacement({\n  dependency,\n  fromBundle,\n  toBundle,\n  relative,\n  getReplacement,\n}: {|\n  dependency: Dependency,\n  fromBundle: NamedBundle,\n  toBundle: NamedBundle,\n  relative: boolean,\n  getReplacement?: string => string,\n|}): {|from: string, to: string|} {\n  let to;\n\n  let orig = URL.parse(dependency.specifier);\n\n  if (relative) {\n    to = URL.format({\n      pathname: relativeBundlePath(fromBundle, toBundle, {\n        leadingDotSlash: false,\n      }),\n      hash: orig.hash,\n    });\n\n    // If the resulting path includes a colon character and doesn't start with a ./ or ../\n    // we need to add one so that the first part before the colon isn't parsed as a URL protocol.\n    if (to.includes(':') && !to.startsWith('./') && !to.startsWith('../')) {\n      to = './' + to;\n    }\n  } else {\n    to = urlJoin(\n      toBundle.target.publicUrl,\n      URL.format({\n        pathname: nullthrows(toBundle.name),\n        hash: orig.hash,\n      }),\n    );\n  }\n\n  let placeholder = dependency.meta?.placeholder ?? dependency.id;\n  invariant(typeof placeholder === 'string');\n\n  return {\n    from: placeholder,\n    to: getReplacement ? getReplacement(to) : to,\n  };\n}\n\nfunction performReplacement(\n  replacements: ReplacementMap,\n  contents: string,\n  map?: ?SourceMap,\n): {|+contents: string, +map: ?SourceMap|} {\n  let finalContents = contents;\n  for (let {from, to} of replacements.values()) {\n    // Perform replacement\n    finalContents = finalContents.split(from).join(to);\n  }\n\n  return {\n    contents: finalContents,\n    // TODO: Update sourcemap with adjusted contents\n    map,\n  };\n}\n"
  },
  {
    "path": "packages/core/utils/src/schema.js",
    "content": "// @flow strict-local\nimport ThrowableDiagnostic, {\n  generateJSONCodeHighlights,\n  escapeMarkdown,\n  encodeJSONKeyComponent,\n} from '@parcel/diagnostic';\nimport type {Mapping} from '@mischnic/json-sourcemap';\nimport nullthrows from 'nullthrows';\nimport * as levenshtein from 'fastest-levenshtein';\n\nexport type SchemaEntity =\n  | SchemaObject\n  | SchemaArray\n  | SchemaBoolean\n  | SchemaString\n  | SchemaNumber\n  | SchemaEnum\n  | SchemaOneOf\n  | SchemaAllOf\n  | SchemaNot\n  | SchemaAny;\nexport type SchemaArray = {|\n  type: 'array',\n  items?: SchemaEntity,\n  __type?: string,\n|};\nexport type SchemaBoolean = {|\n  type: 'boolean',\n  __type?: string,\n|};\nexport type SchemaOneOf = {|\n  oneOf: Array<SchemaEntity>,\n|};\nexport type SchemaAllOf = {|\n  allOf: Array<SchemaEntity>,\n|};\nexport type SchemaNot = {|\n  not: SchemaEntity,\n  __message: string,\n|};\nexport type SchemaString = {|\n  type: 'string',\n  enum?: Array<string>,\n  __validate?: (val: string) => ?string,\n  __type?: string,\n|};\nexport type SchemaNumber = {|\n  type: 'number',\n  enum?: Array<number>,\n  __type?: string,\n|};\nexport type SchemaEnum = {|\n  enum: Array<mixed>,\n|};\nexport type SchemaObject = {|\n  type: 'object',\n  properties: {[string]: SchemaEntity, ...},\n  additionalProperties?: boolean | SchemaEntity,\n  required?: Array<string>,\n  __forbiddenProperties?: Array<string>,\n  __type?: string,\n|};\nexport type SchemaAny = {||};\nexport type SchemaError =\n  | {|\n      type: 'type',\n      expectedTypes: Array<string>,\n      dataType: ?'key' | 'value',\n\n      dataPath: string,\n      ancestors: Array<SchemaEntity>,\n      prettyType?: string,\n    |}\n  | {|\n      type: 'enum',\n      expectedValues: Array<mixed>,\n      dataType: 'key' | 'value',\n      actualValue: mixed,\n\n      dataPath: string,\n      ancestors: Array<SchemaEntity>,\n      prettyType?: string,\n    |}\n  | {|\n      type: 'forbidden-prop',\n      prop: string,\n      expectedProps: Array<string>,\n      actualProps: Array<string>,\n      dataType: 'key',\n\n      dataPath: string,\n      ancestors: Array<SchemaEntity>,\n      prettyType?: string,\n    |}\n  | {|\n      type: 'missing-prop',\n      prop: string,\n      expectedProps: Array<string>,\n      actualProps: Array<string>,\n      dataType: 'key' | 'value',\n\n      dataPath: string,\n      ancestors: Array<SchemaEntity>,\n      prettyType?: string,\n    |}\n  | {|\n      type: 'other',\n      actualValue: mixed,\n      dataType: ?'key' | 'value',\n      message?: string,\n      dataPath: string,\n      ancestors: Array<SchemaEntity>,\n    |};\n\nfunction validateSchema(schema: SchemaEntity, data: mixed): Array<SchemaError> {\n  function walk(\n    schemaAncestors,\n    dataNode,\n    dataPath,\n  ): ?SchemaError | Array<SchemaError> {\n    let [schemaNode] = schemaAncestors;\n\n    if (schemaNode.type) {\n      let type = Array.isArray(dataNode) ? 'array' : typeof dataNode;\n      if (schemaNode.type !== type) {\n        return {\n          type: 'type',\n          dataType: 'value',\n          dataPath,\n          expectedTypes: [schemaNode.type],\n          ancestors: schemaAncestors,\n          prettyType: schemaNode.__type,\n        };\n      } else {\n        switch (schemaNode.type) {\n          case 'array': {\n            if (schemaNode.items) {\n              let results: Array<SchemaError | Array<SchemaError>> = [];\n              // $FlowFixMe type was already checked\n              for (let i = 0; i < dataNode.length; i++) {\n                let result = walk(\n                  [schemaNode.items].concat(schemaAncestors),\n                  // $FlowFixMe type was already checked\n                  dataNode[i],\n                  dataPath + '/' + i,\n                );\n                if (result) results.push(result);\n              }\n              if (results.length)\n                return results.reduce((acc, v) => acc.concat(v), []);\n            }\n            break;\n          }\n          case 'string': {\n            // $FlowFixMe type was already checked\n            let value: string = dataNode;\n            if (schemaNode.enum) {\n              if (!schemaNode.enum.includes(value)) {\n                return {\n                  type: 'enum',\n                  dataType: 'value',\n                  dataPath,\n                  expectedValues: schemaNode.enum,\n                  actualValue: value,\n                  ancestors: schemaAncestors,\n                };\n              }\n            } else if (schemaNode.__validate) {\n              let validationError = schemaNode.__validate(value);\n              if (typeof validationError == 'string') {\n                return {\n                  type: 'other',\n                  dataType: 'value',\n                  dataPath,\n                  message: validationError,\n                  actualValue: value,\n                  ancestors: schemaAncestors,\n                };\n              }\n            }\n            break;\n          }\n          case 'number': {\n            // $FlowFixMe type was already checked\n            let value: number = dataNode;\n            if (schemaNode.enum) {\n              if (!schemaNode.enum.includes(value)) {\n                return {\n                  type: 'enum',\n                  dataType: 'value',\n                  dataPath,\n                  expectedValues: schemaNode.enum,\n                  actualValue: value,\n                  ancestors: schemaAncestors,\n                };\n              }\n            }\n            break;\n          }\n          case 'object': {\n            let results: Array<Array<SchemaError> | SchemaError> = [];\n            let invalidProps;\n            if (schemaNode.__forbiddenProperties) {\n              // $FlowFixMe type was already checked\n              let keys = Object.keys(dataNode);\n              invalidProps = schemaNode.__forbiddenProperties.filter(val =>\n                keys.includes(val),\n              );\n              results.push(\n                ...invalidProps.map(\n                  k =>\n                    ({\n                      type: 'forbidden-prop',\n                      dataPath: dataPath + '/' + encodeJSONKeyComponent(k),\n                      dataType: 'key',\n                      prop: k,\n                      expectedProps: Object.keys(schemaNode.properties),\n                      actualProps: keys,\n                      ancestors: schemaAncestors,\n                    }: SchemaError),\n                ),\n              );\n            }\n            if (schemaNode.required) {\n              // $FlowFixMe type was already checked\n              let keys = Object.keys(dataNode);\n              let missingKeys = schemaNode.required.filter(\n                val => !keys.includes(val),\n              );\n              results.push(\n                ...missingKeys.map(\n                  k =>\n                    ({\n                      type: 'missing-prop',\n                      dataPath,\n                      dataType: 'value',\n                      prop: k,\n                      expectedProps: schemaNode.required,\n                      actualProps: keys,\n                      ancestors: schemaAncestors,\n                    }: SchemaError),\n                ),\n              );\n            }\n            if (schemaNode.properties) {\n              let {additionalProperties = true} = schemaNode;\n              // $FlowFixMe type was already checked\n              for (let k in dataNode) {\n                if (invalidProps && invalidProps.includes(k)) {\n                  // Don't check type on forbidden props\n                  continue;\n                } else if (k in schemaNode.properties) {\n                  let result = walk(\n                    [schemaNode.properties[k]].concat(schemaAncestors),\n                    // $FlowFixMe type was already checked\n                    dataNode[k],\n                    dataPath + '/' + encodeJSONKeyComponent(k),\n                  );\n                  if (result) results.push(result);\n                } else {\n                  if (typeof additionalProperties === 'boolean') {\n                    if (!additionalProperties) {\n                      results.push({\n                        type: 'enum',\n                        dataType: 'key',\n                        dataPath: dataPath + '/' + encodeJSONKeyComponent(k),\n                        expectedValues: Object.keys(\n                          schemaNode.properties,\n                        ).filter(\n                          // $FlowFixMe type was already checked\n                          p => !(p in dataNode),\n                        ),\n                        actualValue: k,\n                        ancestors: schemaAncestors,\n                        prettyType: schemaNode.__type,\n                      });\n                    }\n                  } else {\n                    let result = walk(\n                      [additionalProperties].concat(schemaAncestors),\n                      // $FlowFixMe type was already checked\n                      dataNode[k],\n                      dataPath + '/' + encodeJSONKeyComponent(k),\n                    );\n                    if (result) results.push(result);\n                  }\n                }\n              }\n            }\n            if (results.length)\n              return results.reduce((acc, v) => acc.concat(v), []);\n            break;\n          }\n          case 'boolean':\n            // NOOP, type was checked already\n            break;\n          default:\n            throw new Error(`Unimplemented schema type ${type}?`);\n        }\n      }\n    } else {\n      if (schemaNode.enum && !schemaNode.enum.includes(dataNode)) {\n        return {\n          type: 'enum',\n          dataType: 'value',\n          dataPath: dataPath,\n          expectedValues: schemaNode.enum,\n          actualValue: schemaNode,\n          ancestors: schemaAncestors,\n        };\n      }\n\n      if (schemaNode.oneOf || schemaNode.allOf) {\n        let list = schemaNode.oneOf || schemaNode.allOf;\n        let results: Array<SchemaError | Array<SchemaError>> = [];\n        for (let f of list) {\n          let result = walk([f].concat(schemaAncestors), dataNode, dataPath);\n          if (result) results.push(result);\n        }\n        if (\n          schemaNode.oneOf\n            ? results.length == schemaNode.oneOf.length\n            : results.length > 0\n        ) {\n          // return the result with more values / longer key\n          results.sort((a, b) =>\n            Array.isArray(a) || Array.isArray(b)\n              ? Array.isArray(a) && !Array.isArray(b)\n                ? -1\n                : !Array.isArray(a) && Array.isArray(b)\n                ? 1\n                : Array.isArray(a) && Array.isArray(b)\n                ? b.length - a.length\n                : 0\n              : b.dataPath.length - a.dataPath.length,\n          );\n          return results[0];\n        }\n      } else if (schemaNode.not) {\n        let result = walk(\n          [schemaNode.not].concat(schemaAncestors),\n          dataNode,\n          dataPath,\n        );\n        if (!result || result.length == 0) {\n          return {\n            type: 'other',\n            dataPath,\n            dataType: null,\n            message: schemaNode.__message,\n            actualValue: dataNode,\n            ancestors: schemaAncestors,\n          };\n        }\n      }\n    }\n\n    return undefined;\n  }\n\n  let result = walk([schema], data, '');\n  return Array.isArray(result) ? result : result ? [result] : [];\n}\nexport default validateSchema;\n\nexport function fuzzySearch(\n  expectedValues: Array<string>,\n  actualValue: string,\n): Array<string> {\n  let result = expectedValues\n    .map(exp => [exp, levenshtein.distance(exp, actualValue)])\n    .filter(\n      // Remove if more than half of the string would need to be changed\n      ([, d]) => d * 2 < actualValue.length,\n    );\n  result.sort(([, a], [, b]) => a - b);\n  return result.map(([v]) => v);\n}\n\nvalidateSchema.diagnostic = function (\n  schema: SchemaEntity,\n  data: {|\n    ...\n      | {|\n          source?: ?string,\n          data?: mixed,\n        |}\n      | {|\n          source: string,\n          map: {|\n            data: mixed,\n            pointers: {|[key: string]: Mapping|},\n          |},\n        |},\n    filePath?: ?string,\n    prependKey?: ?string,\n  |},\n  origin: string,\n  message: string,\n): void {\n  if (\n    'source' in data &&\n    'data' in data &&\n    typeof data.source !== 'string' &&\n    !data\n  ) {\n    throw new Error(\n      'At least one of data.source and data.data must be defined!',\n    );\n  }\n  let object = data.map\n    ? data.map.data\n    : // $FlowFixMe we can assume it's a JSON object\n      data.data ?? JSON.parse(data.source);\n  let errors = validateSchema(schema, object);\n  if (errors.length) {\n    let keys = errors.map(e => {\n      let message;\n      if (e.type === 'enum') {\n        let {actualValue} = e;\n        let expectedValues = e.expectedValues.map(String);\n        let likely =\n          actualValue != null\n            ? fuzzySearch(expectedValues, String(actualValue))\n            : [];\n\n        if (likely.length > 0) {\n          message = `Did you mean ${likely\n            .map(v => JSON.stringify(v))\n            .join(', ')}?`;\n        } else if (expectedValues.length > 0) {\n          message = `Possible values: ${expectedValues\n            .map(v => JSON.stringify(v))\n            .join(', ')}`;\n        } else {\n          message = 'Unexpected value';\n        }\n      } else if (e.type === 'forbidden-prop') {\n        let {prop, expectedProps, actualProps} = e;\n        let likely = fuzzySearch(expectedProps, prop).filter(\n          v => !actualProps.includes(v),\n        );\n        if (likely.length > 0) {\n          message = `Did you mean ${likely\n            .map(v => JSON.stringify(v))\n            .join(', ')}?`;\n        } else {\n          message = 'Unexpected property';\n        }\n      } else if (e.type === 'missing-prop') {\n        let {prop, actualProps} = e;\n        let likely = fuzzySearch(actualProps, prop);\n        if (likely.length > 0) {\n          message = `Did you mean ${JSON.stringify(prop)}?`;\n          e.dataPath += '/' + likely[0];\n          e.dataType = 'key';\n        } else {\n          message = `Missing property ${prop}`;\n        }\n      } else if (e.type === 'type') {\n        if (e.prettyType != null) {\n          message = `Expected ${e.prettyType}`;\n        } else {\n          message = `Expected type ${e.expectedTypes.join(', ')}`;\n        }\n      } else {\n        message = e.message;\n      }\n      return {key: e.dataPath, type: e.dataType, message};\n    });\n    let map, code;\n    if (data.map) {\n      map = data.map;\n      code = data.source;\n    } else {\n      // $FlowFixMe we can assume that data is valid JSON\n      map = data.source ?? JSON.stringify(nullthrows(data.data), 0, '\\t');\n      code = map;\n    }\n    let codeFrames = [\n      {\n        filePath: data.filePath ?? undefined,\n        language: 'json',\n        code,\n        codeHighlights: generateJSONCodeHighlights(\n          map,\n          keys.map(({key, type, message}) => ({\n            key: (data.prependKey ?? '') + key,\n            type: type,\n            message: message != null ? escapeMarkdown(message) : message,\n          })),\n        ),\n      },\n    ];\n\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: message,\n        origin,\n        codeFrames,\n      },\n    });\n  }\n};\n"
  },
  {
    "path": "packages/core/utils/src/shared-buffer.js",
    "content": "// @flow\n\nexport let SharedBuffer: Class<ArrayBuffer> | Class<SharedArrayBuffer>;\n\n// $FlowFixMe[prop-missing]\nif (process.browser) {\n  SharedBuffer = ArrayBuffer;\n  // Safari has removed the constructor\n  if (typeof SharedArrayBuffer !== 'undefined') {\n    let channel = new MessageChannel();\n    try {\n      // Firefox might throw when sending the Buffer over a MessagePort\n      channel.port1.postMessage(new SharedArrayBuffer(0));\n      SharedBuffer = SharedArrayBuffer;\n    } catch (_) {\n      // NOOP\n    }\n    channel.port1.close();\n    channel.port2.close();\n  }\n} else {\n  SharedBuffer = SharedArrayBuffer;\n}\n"
  },
  {
    "path": "packages/core/utils/src/sourcemap.js",
    "content": "// @flow\nimport type {SourceLocation} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport SourceMap from '@parcel/source-map';\nimport path from 'path';\nimport {normalizeSeparators, isAbsolute} from './path';\n\nexport const SOURCEMAP_RE: RegExp =\n  /(?:\\/\\*|\\/\\/)\\s*[@#]\\s*sourceMappingURL\\s*=\\s*([^\\s*]+)(?:\\s*\\*\\/)?\\s*$/;\nconst DATA_URL_RE = /^data:[^;]+(?:;charset=[^;]+)?;base64,(.*)/;\nexport const SOURCEMAP_EXTENSIONS: Set<string> = new Set<string>([\n  'css',\n  'es',\n  'es6',\n  'js',\n  'jsx',\n  'mjs',\n  'ts',\n  'tsx',\n]);\n\nexport function matchSourceMappingURL(\n  contents: string,\n): null | RegExp$matchResult {\n  return contents.match(SOURCEMAP_RE);\n}\n\nexport async function loadSourceMapUrl(\n  fs: FileSystem,\n  filename: string,\n  contents: string,\n): Promise<?{|filename: string, map: any, url: string|}> {\n  let match = matchSourceMappingURL(contents);\n  if (match) {\n    let url = match[1].trim();\n    let dataURLMatch = url.match(DATA_URL_RE);\n\n    let mapFilePath;\n    if (dataURLMatch) {\n      mapFilePath = filename;\n    } else {\n      mapFilePath = url.replace(/^file:\\/\\//, '');\n      mapFilePath = isAbsolute(mapFilePath)\n        ? mapFilePath\n        : path.join(path.dirname(filename), mapFilePath);\n    }\n\n    return {\n      url,\n      filename: mapFilePath,\n      map: JSON.parse(\n        dataURLMatch\n          ? Buffer.from(dataURLMatch[1], 'base64').toString()\n          : await fs.readFile(mapFilePath, 'utf8'),\n      ),\n    };\n  }\n}\n\nexport async function loadSourceMap(\n  filename: string,\n  contents: string,\n  options: {fs: FileSystem, projectRoot: string, ...},\n): Promise<?SourceMap> {\n  let foundMap = await loadSourceMapUrl(options.fs, filename, contents);\n  if (foundMap) {\n    let mapSourceRoot = path.dirname(filename);\n    if (\n      foundMap.map.sourceRoot &&\n      !normalizeSeparators(foundMap.map.sourceRoot).startsWith('/')\n    ) {\n      mapSourceRoot = path.join(mapSourceRoot, foundMap.map.sourceRoot);\n    }\n\n    let sourcemapInstance = new SourceMap(options.projectRoot);\n    sourcemapInstance.addVLQMap({\n      ...foundMap.map,\n      sources: foundMap.map.sources.map(s => {\n        return path.join(mapSourceRoot, s);\n      }),\n    });\n    return sourcemapInstance;\n  }\n}\n\nexport function remapSourceLocation(\n  loc: SourceLocation,\n  originalMap: SourceMap,\n): SourceLocation {\n  let {\n    filePath,\n    start: {line: startLine, column: startCol},\n    end: {line: endLine, column: endCol},\n  } = loc;\n  let lineDiff = endLine - startLine;\n  let colDiff = endCol - startCol;\n  let start = originalMap.findClosestMapping(startLine, startCol - 1);\n  let end = originalMap.findClosestMapping(endLine, endCol - 1);\n\n  if (start?.original) {\n    if (start.source) {\n      filePath = start.source;\n    }\n\n    ({line: startLine, column: startCol} = start.original);\n    startCol++; // source map columns are 0-based\n  }\n\n  if (end?.original) {\n    ({line: endLine, column: endCol} = end.original);\n    endCol++; // source map columns are 0-based\n\n    if (endLine < startLine) {\n      endLine = startLine;\n      endCol = startCol;\n    } else if (endLine === startLine && endCol < startCol && lineDiff === 0) {\n      endCol = startCol + colDiff;\n    } else if (endLine === startLine && startCol === endCol && lineDiff === 0) {\n      // Prevent 0-length ranges\n      endCol = startCol + 1;\n    }\n  } else {\n    endLine = startLine;\n    endCol = startCol;\n  }\n\n  return {\n    filePath,\n    start: {\n      line: startLine,\n      column: startCol,\n    },\n    end: {\n      line: endLine,\n      column: endCol,\n    },\n  };\n}\n"
  },
  {
    "path": "packages/core/utils/src/stream.js",
    "content": "// @flow strict-local\n\nimport {Readable, PassThrough} from 'stream';\nimport type {Blob} from '@parcel/types';\n\nexport function measureStreamLength(stream: Readable): Promise<number> {\n  return new Promise((resolve, reject) => {\n    let length = 0;\n    stream.on('data', chunk => {\n      length += chunk;\n    });\n    stream.on('end', () => resolve(length));\n    stream.on('error', reject);\n  });\n}\n\nexport function readableFromStringOrBuffer(str: string | Buffer): Readable {\n  // https://stackoverflow.com/questions/12755997/how-to-create-streams-from-string-in-node-js\n  const stream = new Readable();\n  stream.push(str);\n  stream.push(null);\n  return stream;\n}\n\nexport function bufferStream(stream: Readable): Promise<Buffer> {\n  return new Promise((resolve, reject) => {\n    let buf = Buffer.from([]);\n    stream.on('data', data => {\n      buf = Buffer.concat([buf, data]);\n    });\n    stream.on('end', () => {\n      resolve(buf);\n    });\n    stream.on('error', reject);\n  });\n}\n\nexport function blobToStream(blob: Blob): Readable {\n  if (blob instanceof Readable) {\n    return blob;\n  }\n\n  return readableFromStringOrBuffer(blob);\n}\n\nexport function streamFromPromise(promise: Promise<Blob>): Readable {\n  const stream = new PassThrough();\n  promise.then(blob => {\n    if (blob instanceof Readable) {\n      blob.pipe(stream);\n    } else {\n      stream.end(blob);\n    }\n  });\n\n  return stream;\n}\n\nexport function fallbackStream(\n  stream: Readable,\n  fallback: () => Readable,\n): Readable {\n  const res = new PassThrough();\n  stream.on('error', err => {\n    if (err.code === 'ENOENT') {\n      fallback().pipe(res);\n    } else {\n      res.emit('error', err);\n    }\n  });\n\n  stream.pipe(res);\n  return res;\n}\n"
  },
  {
    "path": "packages/core/utils/src/svgo.js",
    "content": "// @flow\nimport type {FileSystem} from '@parcel/fs';\nimport ThrowableDiagnostic, {\n  generateJSONCodeHighlights,\n} from '@parcel/diagnostic';\nimport path from 'path';\n\nexport function detectSVGOVersion(\n  config: any,\n): {|version: 3|} | {|version: 2, path: string|} {\n  if (!config) {\n    return {version: 3};\n  }\n\n  // These options were removed in v2.\n  if (config.full != null || config.svg2js != null) {\n    return {version: 2, path: config.full != null ? '/full' : '/svg2js'};\n  }\n\n  if (Array.isArray(config.plugins)) {\n    // Custom plugins in v2 had additional (required) fields that don't exist anymore.\n    let v2Plugin = config.plugins.findIndex(\n      p => p?.type != null || (p?.fn && p?.params != null),\n    );\n    if (v2Plugin !== -1) {\n      let field = config.plugins[v2Plugin].type != null ? 'type' : 'params';\n      return {version: 2, path: `/plugins/${v2Plugin}/${field}`};\n    }\n\n    // the cleanupIDs plugin lost the prefix option in v3.\n    let cleanupIdsIndex = config.plugins.findIndex(\n      p => p?.name === 'cleanupIDs',\n    );\n    let cleanupIDs =\n      cleanupIdsIndex !== -1 ? config.plugins[cleanupIdsIndex] : null;\n    if (cleanupIDs?.params?.prefix != null) {\n      return {version: 2, path: `/plugins/${cleanupIdsIndex}/params/prefix`};\n    }\n\n    // Automatically migrate some options from SVGO 2 config files.\n    config.plugins = config.plugins.filter(p => p?.active !== false);\n\n    for (let i = 0; i < config.plugins.length; i++) {\n      let p = config.plugins[i];\n      if (p === 'cleanupIDs') {\n        config.plugins[i] = 'cleanupIds';\n      }\n\n      if (p?.name === 'cleanupIDs') {\n        config.plugins[i].name = 'cleanupIds';\n      }\n    }\n  }\n\n  return {version: 3};\n}\n\nexport async function convertSVGOConfig(\n  config: any,\n  filePath: string,\n  jsonPath: string,\n  fs: FileSystem,\n  hint?: string,\n): Promise<any> {\n  if (typeof config === 'boolean') {\n    return {default: config};\n  }\n\n  if (!config || typeof config !== 'object') {\n    return {default: true};\n  }\n\n  let result = {\n    default: false,\n  };\n\n  if (Array.isArray(config.plugins)) {\n    for (let [i, plugin] of config.plugins.entries()) {\n      let name: string,\n        params = true;\n      if (typeof plugin === 'string') {\n        name = plugin;\n      } else if (\n        typeof plugin === 'object' &&\n        typeof plugin?.name === 'string'\n      ) {\n        name = plugin.name;\n        params = plugin.params ?? true;\n\n        if (typeof plugin.fn === 'function') {\n          await throwDiagnostic(\n            'Unsupported custom SVGO plugin.',\n            filePath,\n            `${jsonPath}/plugins/${i}/fn`,\n            fs,\n            hint,\n          );\n        }\n      } else if (typeof plugin === 'function') {\n        await throwDiagnostic(\n          'Unsupported custom SVGO plugin.',\n          filePath,\n          `${jsonPath}/plugins/${i}`,\n          fs,\n          hint,\n        );\n      } else {\n        continue;\n      }\n\n      if (name === 'cleanupIDs') {\n        name = 'cleanupIds';\n      }\n\n      if (name === 'preset-default') {\n        result.default = true;\n        if (\n          typeof params === 'object' &&\n          typeof params?.overrides === 'object' &&\n          params.overrides\n        ) {\n          for (let key in params.overrides) {\n            result[key] = params.overrides[key];\n          }\n        }\n      } else if (typeof name === 'string') {\n        result[(name: any)] = params || false;\n      }\n    }\n  }\n\n  return result;\n}\n\nasync function throwDiagnostic(message, filePath, jsonPath, fs, hint) {\n  throw new ThrowableDiagnostic({\n    diagnostic: {\n      message: message,\n      codeFrames: [\n        {\n          filePath: filePath,\n          codeHighlights:\n            path.extname(filePath) === '' || path.extname(filePath) === '.json'\n              ? generateJSONCodeHighlights(\n                  await fs.readFile(filePath, 'utf8'),\n                  [\n                    {\n                      key: jsonPath,\n                    },\n                  ],\n                )\n              : [],\n        },\n      ],\n      hints: hint ? [hint] : [],\n    },\n  });\n}\n"
  },
  {
    "path": "packages/core/utils/src/throttle.js",
    "content": "// @flow strict-local\n\nexport default function throttle<TArgs: Iterable<mixed>>(\n  fn: (...args: TArgs) => mixed,\n  delay: number,\n): (...args: TArgs) => void {\n  let lastCalled: ?number;\n\n  return function throttled(...args: TArgs) {\n    if (lastCalled == null || lastCalled + delay <= Date.now()) {\n      fn.call(this, ...args);\n      lastCalled = Date.now();\n    }\n  };\n}\n"
  },
  {
    "path": "packages/core/utils/src/urlJoin.js",
    "content": "// @flow strict-local\n\nimport URL from 'url';\nimport path from 'path';\n\n/**\n * Joins a path onto a URL, and normalizes Windows paths\n * e.g. from \\path\\to\\res.js to /path/to/res.js.\n */\nexport default function urlJoin(\n  publicURL: string,\n  assetPath: string,\n  leadingDotSlash: boolean = false,\n): string {\n  const url = URL.parse(publicURL, false, true);\n  // Leading / ensures that paths with colons are not parsed as a protocol.\n  let p = assetPath.startsWith('/') ? assetPath : '/' + assetPath;\n  const assetUrl = URL.parse(p);\n  url.pathname = path.posix.join(url.pathname, assetUrl.pathname);\n  url.search = assetUrl.search;\n  url.hash = assetUrl.hash;\n  let result = URL.format(url);\n  if (\n    url.host == null &&\n    result[0] !== '/' &&\n    result[0] !== '.' &&\n    leadingDotSlash\n  ) {\n    result = './' + result;\n  }\n  return result;\n}\n"
  },
  {
    "path": "packages/core/utils/test/DefaultMap.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {DefaultMap} from '../src/DefaultMap';\n\ndescribe('DefaultMap', () => {\n  it('constructs with entries just like Map', () => {\n    let map = new DefaultMap(\n      k => k,\n      [\n        [1, 3],\n        [2, 27],\n      ],\n    );\n    assert.equal(map.get(1), 3);\n    assert.deepEqual(Array.from(map.entries()), [\n      [1, 3],\n      [2, 27],\n    ]);\n  });\n\n  it(\"returns a default value based on a key if it doesn't exist\", () => {\n    let map = new DefaultMap(k => k);\n    assert.equal(map.get(3), 3);\n  });\n\n  it(\"sets a default value based on a key if it doesn't exist\", () => {\n    let map = new DefaultMap(k => k);\n    map.get(3);\n    assert.deepEqual(Array.from(map.entries()), [[3, 3]]);\n  });\n\n  it('respects undefined/null if it already existed in the map', () => {\n    let map = new DefaultMap<number, number | void | null>(k => k);\n    map.set(3, undefined);\n    assert.equal(map.get(3), undefined);\n\n    map.set(4, null);\n    assert.equal(map.get(4), null);\n  });\n});\n"
  },
  {
    "path": "packages/core/utils/test/PromiseQueue.test.js",
    "content": "// @flow\nimport assert from 'assert';\n\nimport PromiseQueue from '../src/PromiseQueue';\nimport sinon from 'sinon';\n\ndescribe('PromiseQueue', () => {\n  it('run() should resolve when all async functions in queue have completed', async () => {\n    let queue = new PromiseQueue();\n\n    let someBooleanToBeChanged = false;\n    queue.add(() =>\n      Promise.resolve().then(() => {\n        someBooleanToBeChanged = true;\n      }),\n    );\n    await queue.run();\n    assert(someBooleanToBeChanged);\n  });\n\n  it('run() should reject if any of the async functions in the queue failed', async () => {\n    let error = new Error('some failure');\n    try {\n      let queue = new PromiseQueue();\n      queue\n        .add(() => Promise.reject(error))\n        .catch(\n          /* catch this to prevent an unhandled promise rejection*/ () => {},\n        );\n      await queue.run();\n    } catch (e) {\n      assert.equal(e, error);\n    }\n  });\n\n  it('.run() should instantly resolve when the queue is empty', async () => {\n    let queue = new PromiseQueue();\n    await queue.run();\n    // no need to assert, test will hang or throw an error if condition fails\n  });\n\n  it(\".add() should resolve with the same result when the passed in function's promise resolves\", async () => {\n    let queue = new PromiseQueue();\n    let promise = queue.add(() => Promise.resolve(42));\n    await queue.run();\n    let result = await promise;\n    assert.equal(result, 42);\n  });\n\n  it(\".add() should reject with the same error when the passed in function's promise rejects\", async () => {\n    let queue = new PromiseQueue();\n    let error = new Error('Oh no!');\n    let promise = queue.add(() => Promise.reject(error));\n    await queue.run().catch(() => null);\n    await promise.then(null, e => assert.equal(e, error));\n  });\n\n  it('constructor() should allow for configuration of max concurrent running functions', async () => {\n    const maxConcurrent = 5;\n    const queue = new PromiseQueue({maxConcurrent});\n    let running = 0;\n\n    new Array(100).fill(0).map(() =>\n      queue.add(async () => {\n        running++;\n        assert(queue._numRunning === running);\n        assert(running <= maxConcurrent);\n        await Promise.resolve(Math.floor(Math.random() * 10) + 1);\n        running--;\n      }),\n    );\n\n    await queue.run();\n  });\n\n  it('.add() should notify subscribers', async () => {\n    const queue = new PromiseQueue();\n\n    const subscribedFn = sinon.spy();\n    queue.subscribeToAdd(subscribedFn);\n\n    const promise = queue.add(() => Promise.resolve());\n    await queue.run();\n    await promise;\n\n    assert(subscribedFn.called);\n  });\n\n  it('.subscribeToAdd() should allow unsubscribing', async () => {\n    const queue = new PromiseQueue();\n\n    const subscribedFn = sinon.spy();\n    const unsubscribe = queue.subscribeToAdd(subscribedFn);\n    unsubscribe();\n\n    const promise = queue.add(() => Promise.resolve());\n    await queue.run();\n    await promise;\n\n    assert(!subscribedFn.called);\n  });\n});\n"
  },
  {
    "path": "packages/core/utils/test/collection.test.js",
    "content": "// @flow\n\nimport assert from 'assert';\nimport {\n  objectSortedEntries,\n  objectSortedEntriesDeep,\n  setDifference,\n} from '../src/collection';\n\ndescribe('objectSortedEntries', () => {\n  it('returns a sorted list of key/value tuples', () => {\n    assert.deepEqual(\n      objectSortedEntries({foo: 'foo', baz: 'baz', bar: 'bar'}),\n      [\n        ['bar', 'bar'],\n        ['baz', 'baz'],\n        ['foo', 'foo'],\n      ],\n    );\n  });\n});\n\ndescribe('objectSortedEntriesDeep', () => {\n  it('returns a deeply sorted list of key/value tuples', () => {\n    assert.deepEqual(\n      objectSortedEntriesDeep({\n        foo: 'foo',\n        baz: ['d', 'c'],\n        bar: {g: 'g', b: 'b'},\n      }),\n      [\n        [\n          'bar',\n          [\n            ['b', 'b'],\n            ['g', 'g'],\n          ],\n        ],\n        ['baz', ['d', 'c']],\n        ['foo', 'foo'],\n      ],\n    );\n  });\n});\ndescribe('setDifference', () => {\n  it('returns a setDifference of two sets of T type', () => {\n    assert.deepEqual(\n      setDifference(new Set([1, 2, 3]), new Set([3, 4, 5])),\n      new Set([1, 2, 4, 5]),\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/utils/test/config.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {loadConfig} from '../src/config';\nimport {inputFS as fs} from '@parcel/test-utils';\nimport path from 'path';\n\ndescribe('loadConfig', () => {\n  it('load config with json', async () => {\n    assert.deepEqual(\n      (\n        await loadConfig(\n          fs,\n          path.join(__dirname, './input/config/config.json'),\n          ['config.json'],\n          path.join(__dirname, './input/config/'),\n        )\n      )?.config,\n      {\n        hoge: 'fuga',\n      },\n    );\n  });\n\n  it('should throw error with empty string json', async () => {\n    // $FlowFixMe[prop-missing]\n    await assert.rejects(async () => {\n      await loadConfig(\n        fs,\n        path.join(__dirname, './input/config/empty.json'),\n        ['empty.json'],\n        path.join(__dirname, './input/config/'),\n      );\n    });\n  });\n\n  it('should load with empty string config toml', async () => {\n    assert.deepEqual(\n      (\n        await loadConfig(\n          fs,\n          path.join(__dirname, './input/config/empty.toml'),\n          ['empty.toml'],\n          path.join(__dirname, './input/config/'),\n        )\n      )?.config,\n      {},\n    );\n  });\n\n  it('should load with js', async () => {\n    assert.deepEqual(\n      (\n        await loadConfig(\n          fs,\n          path.join(__dirname, './input/config/config.js'),\n          ['config.js'],\n          path.join(__dirname, './input/config/'),\n        )\n      )?.config,\n      {\n        hoge: 'fuga',\n      },\n    );\n  });\n\n  it('should load with cjs', async () => {\n    assert.deepEqual(\n      (\n        await loadConfig(\n          fs,\n          path.join(__dirname, './input/config/config.cjs'),\n          ['config.cjs'],\n          path.join(__dirname, './input/config/'),\n        )\n      )?.config,\n      {\n        hoge: 'fuga',\n      },\n    );\n  });\n\n  it('should load without an extension as json', async () => {\n    assert.deepEqual(\n      (\n        await loadConfig(\n          fs,\n          path.join(__dirname, './input/config/.testrc'),\n          ['.testrc'],\n          path.join(__dirname, './input/config/'),\n        )\n      )?.config,\n      {\n        hoge: 'fuga',\n      },\n    );\n  });\n});\n"
  },
  {
    "path": "packages/core/utils/test/input/config/.testrc",
    "content": "{\n    \"hoge\": \"fuga\"\n}\n"
  },
  {
    "path": "packages/core/utils/test/input/config/config.cjs",
    "content": "module.exports = {\n  hoge: 'fuga',\n};\n"
  },
  {
    "path": "packages/core/utils/test/input/config/config.js",
    "content": "module.exports = {\n  hoge: 'fuga',\n};\n"
  },
  {
    "path": "packages/core/utils/test/input/config/config.json",
    "content": "{\n    \"hoge\": \"fuga\"\n}"
  },
  {
    "path": "packages/core/utils/test/input/config/empty.json",
    "content": ""
  },
  {
    "path": "packages/core/utils/test/input/config/empty.toml",
    "content": ""
  },
  {
    "path": "packages/core/utils/test/input/sourcemap/inline.js",
    "content": "//@ sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0=\n"
  },
  {
    "path": "packages/core/utils/test/input/sourcemap/no-sourcemap.js",
    "content": "if ((ref$ = options.map) === 'linked' || ref$ === 'debug') {\n  mapPath = path.basename(outputFilename) + \".map\";\n  result.code += \"\\n//# sourceMappingURL=\" + mapPath + \"\\n\";\n} else {\n  result.code += \"\\n//# sourceMappingURL=data:application/json;base64,\" + bufferFrom(result.map.toString()).toString('base64') + \"\\n\";\n}\n"
  },
  {
    "path": "packages/core/utils/test/input/sourcemap/referenced-min.js",
    "content": "function hello(){var l=\"Hello\",o=\"world\";console.log(l+\" \"+o+\"!\")}hello();\n//# sourceMappingURL=file://referenced-min.js.map\n"
  },
  {
    "path": "packages/core/utils/test/input/sourcemap/source-root.js",
    "content": "function hello(){var l=\"Hello\",o=\"world\";console.log(l+\" \"+o+\"!\")}hello();\n//# sourceMappingURL=source-root.js.map\n"
  },
  {
    "path": "packages/core/utils/test/objectHash.test.js",
    "content": "// @flow\nimport assert from 'assert';\nimport objectHash from '../src/objectHash';\n\ndescribe('objectHash', () => {\n  it('calculates the same hash for two different but deep equal objects', () => {\n    const obj1 = {\n      foo: {foo: 'foo', baz: ['foo', 'baz', 'bar'], bar: 'bar'},\n      baz: 'baz',\n      bar: 'bar',\n    };\n    const obj2 = {\n      foo: {foo: 'foo', baz: ['foo', 'baz', 'bar'], bar: 'bar'},\n      baz: 'baz',\n      bar: 'bar',\n    };\n\n    assert.equal(objectHash(obj1), objectHash(obj2));\n  });\n\n  it('calculates a unique hash for two deep equal objects', () => {\n    const obj1 = {\n      baz: 'baz',\n      bar: 'ba',\n    };\n    const obj2 = {\n      baz: 'baz',\n      bar: 'bar',\n    };\n\n    assert.notEqual(objectHash(obj1), objectHash(obj2));\n  });\n});\n"
  },
  {
    "path": "packages/core/utils/test/prettifyTime.test.js",
    "content": "// @flow\nimport assert from 'assert';\nimport prettifyTime from '../src/prettifyTime';\n\ndescribe('prettifyTime', () => {\n  it('should format numbers less than 1000 as ms', () => {\n    assert.equal(prettifyTime(888), '888ms');\n    assert.equal(prettifyTime(50), '50ms');\n    assert.equal(prettifyTime(0), '0ms');\n  });\n\n  it('should format numbers greater than 1000 as s with 2 fractional digits', () => {\n    assert.equal(prettifyTime(4000), '4.00s');\n    assert.equal(prettifyTime(90000), '90.00s');\n    assert.equal(prettifyTime(45678), '45.68s');\n  });\n});\n"
  },
  {
    "path": "packages/core/utils/test/replaceBundleReferences.test.js",
    "content": "// @flow strict-local\n\nimport type {NamedBundle, Dependency} from '@parcel/types';\n\nimport assert from 'assert';\nimport {getURLReplacement} from '../src/replaceBundleReferences';\n\ndescribe('replace bundle references', () => {\n  it('Query params and named pipeline, relative', () => {\n    // $FlowFixMe\n    let fromBundle: NamedBundle = {\n      filePath: '/user/dist/reformat.html',\n      name: 'reformat.html',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: '/',\n      },\n    };\n\n    // $FlowFixMe\n    let toBundle: NamedBundle = {\n      filePath:\n        '/user/dist/image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n      name: 'image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: '/',\n      },\n    };\n\n    // $FlowFixMe\n    let dependency: Dependency = {\n      id: '074b36596e3147e900a8ad17ceb5c90b',\n      specifier: 'url:./image.jpg?as=webp',\n      specifierType: 'esm',\n    };\n\n    let result = getURLReplacement({\n      dependency,\n      fromBundle,\n      toBundle,\n      relative: true,\n    });\n\n    assert.equal(\n      result.to,\n      'image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n    );\n    assert.equal(result.from, '074b36596e3147e900a8ad17ceb5c90b');\n  });\n\n  it('Query params and named pipeline, absolute', () => {\n    // $FlowFixMe\n    let fromBundle: NamedBundle = {\n      filePath: '/user/dist/reformat.html',\n      name: 'reformat.html',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: '/',\n      },\n    };\n\n    // $FlowFixMe\n    let toBundle: NamedBundle = {\n      filePath:\n        '/user/dist/image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n      name: 'image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: '/',\n      },\n    };\n\n    // $FlowFixMe\n    let dependency: Dependency = {\n      id: '074b36596e3147e900a8ad17ceb5c90b',\n      specifier: 'url:./image.jpg?as=webp',\n      specifierType: 'esm',\n    };\n\n    let result = getURLReplacement({\n      dependency,\n      fromBundle,\n      toBundle,\n      relative: false,\n    });\n\n    assert.equal(\n      result.to,\n      '/image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n    );\n    assert.equal(result.from, '074b36596e3147e900a8ad17ceb5c90b');\n  });\n\n  it('Custom Public URL', () => {\n    // $FlowFixMe\n    let fromBundle: NamedBundle = {\n      filePath: '/user/dist/reformat.html',\n      name: 'reformat.html',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: 'https://test.com/static',\n      },\n    };\n\n    // $FlowFixMe\n    let toBundle: NamedBundle = {\n      filePath:\n        '/user/dist/image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n      name: 'image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: 'https://test.com/static',\n      },\n    };\n\n    // $FlowFixMe\n    let dependency: Dependency = {\n      id: '074b36596e314797845a8ad17ceb5c9b',\n      specifier: './image.jpg',\n      specifierType: 'esm',\n    };\n\n    let result = getURLReplacement({\n      dependency,\n      fromBundle,\n      toBundle,\n      relative: false,\n    });\n\n    assert.equal(\n      result.to,\n      'https://test.com/static/image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n    );\n    assert.equal(result.from, '074b36596e314797845a8ad17ceb5c9b');\n  });\n\n  it('Relative with folders in between', () => {\n    // $FlowFixMe\n    let fromBundle: NamedBundle = {\n      filePath: '/user/dist/reformat.html',\n      name: 'reformat.html',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: 'https://test.com/static',\n      },\n    };\n\n    // $FlowFixMe\n    let toBundle: NamedBundle = {\n      filePath:\n        '/user/dist/assets/image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n      name: 'image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist/assets',\n        publicUrl: 'https://test.com/static',\n      },\n    };\n\n    // $FlowFixMe\n    let dependency: Dependency = {\n      id: '074b36596e3147e900a8ad17ceb5c90b',\n      specifier: 'url:./image.jpg?as=webp',\n      specifierType: 'esm',\n    };\n\n    let result = getURLReplacement({\n      dependency,\n      fromBundle,\n      toBundle,\n      relative: true,\n    });\n\n    assert.equal(\n      result.to,\n      'assets/image.HASH_REF_87f9d66c16c2216ccc7e5664cf089305.webp',\n    );\n    assert.equal(result.from, '074b36596e3147e900a8ad17ceb5c90b');\n  });\n\n  it('should work with bundle names with colons, relative', () => {\n    // $FlowFixMe\n    let fromBundle: NamedBundle = {\n      filePath: '/user/dist/reformat.html',\n      name: 'reformat.html',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: '/',\n      },\n    };\n\n    // $FlowFixMe\n    let toBundle: NamedBundle = {\n      filePath: '/user/dist/a:b:c.html',\n      name: 'a:b:c.html',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: '/',\n      },\n    };\n\n    // $FlowFixMe\n    let dependency: Dependency = {\n      id: '074b36596e3147e900a8ad17ceb5c90b',\n      specifier: './a:b:c.html',\n      specifierType: 'esm',\n    };\n\n    let result = getURLReplacement({\n      dependency,\n      fromBundle,\n      toBundle,\n      relative: true,\n    });\n\n    assert.equal(result.to, './a:b:c.html');\n  });\n\n  it('should work with bundle names with colons, absolute', () => {\n    // $FlowFixMe\n    let fromBundle: NamedBundle = {\n      filePath: '/user/dist/reformat.html',\n      name: 'reformat.html',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: '/',\n      },\n    };\n\n    // $FlowFixMe\n    let toBundle: NamedBundle = {\n      filePath: '/user/dist/a:b:c.html',\n      name: 'a:b:c.html',\n      // $FlowFixMe\n      target: {\n        distDir: '/user/dist',\n        publicUrl: '/',\n      },\n    };\n\n    // $FlowFixMe\n    let dependency: Dependency = {\n      id: '074b36596e3147e900a8ad17ceb5c90b',\n      specifier: './a:b:c.html',\n      specifierType: 'esm',\n    };\n\n    let result = getURLReplacement({\n      dependency,\n      fromBundle,\n      toBundle,\n      relative: false,\n    });\n\n    assert.equal(result.to, '/a:b:c.html');\n  });\n});\n"
  },
  {
    "path": "packages/core/utils/test/sourcemap.test.js",
    "content": "import assert from 'assert';\nimport {\n  matchSourceMappingURL,\n  loadSourceMapUrl,\n  loadSourceMap,\n} from '../src/sourcemap';\nimport {NodeFS} from '@parcel/fs';\nimport path from 'path';\n\nconst fs = new NodeFS();\n\ndescribe('loadSourceMap', () => {\n  it('should not match sourceMappingURL when not at the end of the bundle', () => {\n    // Code example taken from livescript.js (issue #2408 in parcel-bundler)\n    // This snippet lead to JSAsset.js being mislead and incorrectly trying to\n    // load (due to false-positive match) sourcemap before fix was introduced\n    let code = fs.readFileSync(\n      path.join(__dirname, './input/sourcemap/no-sourcemap.js'),\n      'utf-8',\n    );\n\n    assert(!matchSourceMappingURL(code));\n  });\n\n  it('should match referenced-min sourceMappingURL when correctly inserted at end of the bundle', () => {\n    let code = fs.readFileSync(\n      path.join(__dirname, './input/sourcemap/referenced-min.js'),\n      'utf-8',\n    );\n\n    assert(!!matchSourceMappingURL(code));\n  });\n\n  it('should match inline sourceMappingURL when correctly inserted at end of the bundle', () => {\n    // inline source map taken from https://github.com/thlorenz/inline-source-map\n    let code = fs.readFileSync(\n      path.join(__dirname, './input/sourcemap/inline.js'),\n      'utf-8',\n    );\n\n    assert(!!matchSourceMappingURL(code));\n  });\n\n  it('Should be able to load sourcemap data from a url reference', async () => {\n    let filename = path.join(__dirname, './input/sourcemap/referenced-min.js');\n    let contents = fs.readFileSync(filename, 'utf-8');\n\n    let foundMap = await loadSourceMapUrl(fs, filename, contents);\n    assert.equal(foundMap.url, 'file://referenced-min.js.map');\n    assert.equal(\n      foundMap.filename,\n      path.join(__dirname, 'input/sourcemap/referenced-min.js.map'),\n    );\n    assert.deepEqual(foundMap.map, {\n      version: 3,\n      sources: ['./referenced.js'],\n      names: ['hello', 'l', 'o', 'console', 'log'],\n      mappings:\n        'AAAA,SAASA,QACP,IAAIC,EAAI,QACNC,EAAI,QACNC,QAAQC,IAAIH,EAAI,IAAMC,EAAI,KAE5BF',\n    });\n  });\n\n  it('Should be able to load sourcemap data from an inline url reference', async () => {\n    let filename = path.join(__dirname, './input/sourcemap/inline.js');\n    let contents = fs.readFileSync(filename, 'utf-8');\n\n    let foundMap = await loadSourceMapUrl(fs, filename, contents);\n    assert.equal(\n      foundMap.url,\n      'data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0=',\n    );\n    assert.equal(foundMap.filename, filename);\n    assert.deepEqual(foundMap.map, {\n      version: 3,\n      file: '',\n      sources: ['foo.js', 'bar.js'],\n      names: [],\n      mappings: ';;;;;;;;;UACG;;;;;;;;;;;;;;sBCDH;sBACA',\n    });\n  });\n\n  it('Should be able to load a SourceMap instance from a file', async () => {\n    let filename = path.join(__dirname, './input/sourcemap/referenced-min.js');\n    let contents = fs.readFileSync(filename, 'utf-8');\n\n    let map = await loadSourceMap(filename, contents, {\n      fs,\n      projectRoot: __dirname,\n    });\n\n    assert(!!map);\n\n    let parsedMap = map.getMap();\n    assert.deepEqual(parsedMap.sources, ['input/sourcemap/referenced.js']);\n    assert.deepEqual(parsedMap.names, ['hello', 'l', 'o', 'console', 'log']);\n    assert.deepEqual(parsedMap.mappings, [\n      {\n        generated: {line: 1, column: 0},\n        original: {line: 1, column: 0},\n        source: 0,\n      },\n      {\n        generated: {line: 1, column: 9},\n        original: {line: 1, column: 9},\n        source: 0,\n        name: 0,\n      },\n      {\n        generated: {line: 1, column: 17},\n        original: {line: 2, column: 2},\n        source: 0,\n      },\n      {\n        generated: {line: 1, column: 21},\n        original: {line: 2, column: 6},\n        source: 0,\n        name: 1,\n      },\n      {\n        generated: {line: 1, column: 23},\n        original: {line: 2, column: 10},\n        source: 0,\n      },\n      {\n        generated: {line: 1, column: 31},\n        original: {line: 3, column: 4},\n        source: 0,\n        name: 2,\n      },\n      {\n        generated: {line: 1, column: 33},\n        original: {line: 3, column: 8},\n        source: 0,\n      },\n      {\n        generated: {line: 1, column: 41},\n        original: {line: 4, column: 2},\n        source: 0,\n        name: 3,\n      },\n      {\n        generated: {line: 1, column: 49},\n        original: {line: 4, column: 10},\n        source: 0,\n        name: 4,\n      },\n      {\n        generated: {line: 1, column: 53},\n        original: {line: 4, column: 14},\n        source: 0,\n        name: 1,\n      },\n      {\n        generated: {line: 1, column: 55},\n        original: {line: 4, column: 18},\n        source: 0,\n      },\n      {\n        generated: {line: 1, column: 59},\n        original: {line: 4, column: 24},\n        source: 0,\n        name: 2,\n      },\n      {\n        generated: {line: 1, column: 61},\n        original: {line: 4, column: 28},\n        source: 0,\n      },\n      {\n        generated: {line: 1, column: 66},\n        original: {line: 6, column: 0},\n        source: 0,\n        name: 0,\n      },\n    ]);\n  });\n\n  it('Should remap sources when using sourceRoot', async () => {\n    let filename = path.join(__dirname, './input/sourcemap/referenced-min.js');\n    let contents = fs.readFileSync(filename, 'utf-8');\n\n    let map = await loadSourceMap(filename, contents, {\n      fs,\n      projectRoot: __dirname,\n    });\n\n    assert(!!map);\n\n    let parsedMap = map.getMap();\n    assert.deepEqual(parsedMap.sources, ['input/sourcemap/referenced.js']);\n  });\n\n  it('Should remap sources when using sourceRoot', async () => {\n    let filename = path.join(__dirname, './input/sourcemap/source-root.js');\n    let contents = fs.readFileSync(filename, 'utf-8');\n\n    let map = await loadSourceMap(filename, contents, {\n      fs,\n      projectRoot: __dirname,\n    });\n\n    assert(!!map);\n\n    let parsedMap = map.getMap();\n    assert.deepEqual(parsedMap.sources, ['input/source.js']);\n  });\n});\n"
  },
  {
    "path": "packages/core/utils/test/throttle.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport sinon from 'sinon';\nimport throttle from '../src/throttle';\n\ndescribe('throttle', () => {\n  it(\"doesn't invoke a function more than once in a given interval\", () => {\n    let spy = sinon.spy();\n    let throttled = throttle(spy, 100);\n\n    throttled(1);\n    throttled(2);\n    throttled(3);\n\n    assert(spy.calledOnceWithExactly(1));\n  });\n\n  it('calls the underlying function again once the interval has passed', () => {\n    let time = sinon.useFakeTimers();\n    let spy = sinon.spy();\n    let throttled = throttle(spy, 100);\n\n    throttled(1);\n    throttled(2);\n    throttled(3);\n\n    time.tick(100);\n    throttled(4);\n    assert.deepEqual(spy.args, [[1], [4]]);\n\n    time.restore();\n  });\n\n  it('preserves the `this` when throttled functions are invoked', () => {\n    let result;\n    let throttled = throttle(function () {\n      result = this.bar;\n    }, 100);\n\n    throttled.call({bar: 'baz'});\n    assert(result === 'baz');\n  });\n});\n"
  },
  {
    "path": "packages/core/utils/test/urlJoin.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport urlJoin from '../src/urlJoin';\n\ndescribe('urlJoin', () => {\n  it('Should join two paths', () => {\n    let joinedUrl = urlJoin('/', './image.jpeg?test=test');\n    assert.equal(joinedUrl, '/image.jpeg?test=test');\n  });\n\n  it('Should join two paths with longer publicUrl', () => {\n    let joinedUrl = urlJoin('/static', './image.jpeg?test=test');\n    assert.equal(joinedUrl, '/static/image.jpeg?test=test');\n  });\n\n  it('Should join two paths with longer publicUrl', () => {\n    let joinedUrl = urlJoin('/static', 'image.jpeg?test=test');\n    assert.equal(joinedUrl, '/static/image.jpeg?test=test');\n  });\n\n  it('Should turn windows path into posix', () => {\n    let joinedUrl = urlJoin('/static', '.\\\\image.jpeg?test=test');\n    assert.equal(joinedUrl, '/static/image.jpeg?test=test');\n  });\n\n  it('should support paths with colons', () => {\n    let joinedUrl = urlJoin('/static', 'a:b:c.html');\n    assert.equal(joinedUrl, '/static/a:b:c.html');\n\n    joinedUrl = urlJoin('/static', '/a:b:c.html');\n    assert.equal(joinedUrl, '/static/a:b:c.html');\n\n    joinedUrl = urlJoin('/static', './a:b:c.html');\n    assert.equal(joinedUrl, '/static/a:b:c.html');\n  });\n});\n"
  },
  {
    "path": "packages/core/workers/.gitignore",
    "content": "lib\n"
  },
  {
    "path": "packages/core/workers/index.d.ts",
    "content": "import {FilePath} from '@parcel/types';\n\ntype BackendType = 'process' | 'threads';\n\nexport type FarmOptions = {\n  maxConcurrentWorkers: number;\n  maxConcurrentCallsPerWorker: number;\n  forcedKillTime: number;\n  useLocalWorker: boolean;\n  warmWorkers: boolean;\n  workerPath?: FilePath;\n  backend: BackendType;\n  shouldPatchConsole?: boolean;\n  shouldTrace?: boolean;\n};\n\ndeclare class WorkerFarm {\n  constructor(options: FarmOptions);\n\n  end(): Promise<void>;\n}\n\nexport default WorkerFarm;\n"
  },
  {
    "path": "packages/core/workers/package.json",
    "content": "{\n  \"name\": \"@parcel/workers\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"types\": \"index.d.ts\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/logger\": \"2.16.4\",\n    \"@parcel/profiler\": \"2.16.4\",\n    \"@parcel/types-internal\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"peerDependencies\": {\n    \"@parcel/core\": \"^2.16.4\"\n  },\n  \"browser\": {\n    \"./src/core-worker.js\": \"./src/core-worker.browser.js\",\n    \"./src/process/ProcessWorker.js\": false,\n    \"./src/threads/ThreadsWorker.js\": false\n  }\n}\n"
  },
  {
    "path": "packages/core/workers/src/Handle.js",
    "content": "// @flow strict-local\nimport {registerSerializableClass} from '@parcel/core';\n// $FlowFixMe\nimport packageJson from '../package.json';\n\nlet HANDLE_ID = 0;\n// $FlowFixMe\nexport type HandleFunction = (...args: Array<any>) => any;\n\ntype HandleOpts = {|\n  fn?: HandleFunction,\n  childId?: ?number,\n  id?: number,\n|};\n\nconst handleById: Map<number, Handle> = new Map();\n\nexport default class Handle {\n  id: number;\n  childId: ?number;\n  fn: ?HandleFunction;\n\n  constructor(opts: HandleOpts) {\n    this.id = opts.id ?? ++HANDLE_ID;\n    this.fn = opts.fn;\n    this.childId = opts.childId;\n    handleById.set(this.id, this);\n  }\n\n  dispose() {\n    handleById.delete(this.id);\n  }\n\n  serialize(): {|childId: ?number, id: number|} {\n    return {\n      id: this.id,\n      childId: this.childId,\n    };\n  }\n\n  static deserialize(opts: HandleOpts): Handle {\n    return new Handle(opts);\n  }\n}\n\n// Register the Handle as a serializable class so that it will properly be deserialized\n// by anything that uses WorkerFarm.\nregisterSerializableClass(`${packageJson.version}:Handle`, Handle);\n"
  },
  {
    "path": "packages/core/workers/src/Worker.js",
    "content": "// @flow\n\nimport type {FilePath} from '@parcel/types-internal';\nimport type {BackendType, WorkerImpl, WorkerMessage} from './types';\nimport type {SharedReference} from './WorkerFarm';\n\nimport nullthrows from 'nullthrows';\nimport EventEmitter from 'events';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport {getWorkerBackend} from './backend';\n\nexport type WorkerCall = {|\n  method?: string,\n  handle?: number,\n  args: $ReadOnlyArray<any>,\n  retries: number,\n  skipReadyCheck?: boolean,\n  resolve: (result: Promise<any> | any) => void,\n  reject: (error: any) => void,\n|};\n\ntype WorkerOpts = {|\n  forcedKillTime: number,\n  backend: BackendType,\n  shouldPatchConsole?: boolean,\n  shouldTrace?: boolean,\n  sharedReferences: $ReadOnlyMap<SharedReference, mixed>,\n|};\n\nlet WORKER_ID = 0;\nexport default class Worker extends EventEmitter {\n  +options: WorkerOpts;\n  worker: WorkerImpl;\n  id: number = WORKER_ID++;\n  sentSharedReferences: Set<SharedReference> = new Set();\n\n  calls: Map<number, WorkerCall> = new Map();\n  exitCode: ?number = null;\n  callId: number = 0;\n\n  ready: boolean = false;\n  stopped: boolean = false;\n  isStopping: boolean = false;\n\n  constructor(options: WorkerOpts) {\n    super();\n    this.options = options;\n  }\n\n  async fork(forkModule: FilePath) {\n    let filteredArgs = [];\n    if (process.execArgv) {\n      filteredArgs = process.execArgv.filter(\n        v =>\n          !/^--(debug|inspect|no-opt|max-old-space-size=|max-semi-space-size=|expose-gc)/.test(\n            v,\n          ),\n      );\n\n      for (let i = 0; i < filteredArgs.length; i++) {\n        let arg = filteredArgs[i];\n        let isArgWithParam =\n          ((arg === '-r' || arg === '--require') &&\n            filteredArgs[i + 1] === '@parcel/register') ||\n          arg === '--title';\n        if (isArgWithParam) {\n          filteredArgs.splice(i, 2);\n          i--;\n        }\n      }\n    }\n\n    // Workaround for https://github.com/nodejs/node/issues/29117\n    if (process.env.NODE_OPTIONS) {\n      // arg parsing logic adapted from https://stackoverflow.com/a/46946420/2352201\n      let opts = [''];\n      let quote = false;\n      for (let c of nullthrows(process.env.NODE_OPTIONS.match(/.|^$/g))) {\n        if (c === '\"') {\n          quote = !quote;\n        } else if (!quote && c === ' ') {\n          opts.push('');\n        } else {\n          opts[opts.length - 1] += c.replace(/\\\\(.)/, '$1');\n        }\n      }\n\n      for (let i = 0; i < opts.length; i++) {\n        let opt = opts[i];\n        if (opt === '-r' || opt === '--require') {\n          filteredArgs.push(opt, opts[i + 1]);\n          i++;\n        }\n      }\n    }\n\n    let onMessage = data => this.receive(data);\n    let onExit = code => {\n      this.exitCode = code;\n      this.emit('exit', code);\n    };\n\n    let onError = err => {\n      this.emit('error', err);\n    };\n\n    let WorkerBackend = getWorkerBackend(this.options.backend);\n    this.worker = new WorkerBackend(filteredArgs, onMessage, onError, onExit);\n    await this.worker.start();\n\n    await new Promise((resolve, reject) => {\n      this.call({\n        method: 'childInit',\n        args: [\n          forkModule,\n          {\n            shouldPatchConsole: !!this.options.shouldPatchConsole,\n            shouldTrace: !!this.options.shouldTrace,\n          },\n        ],\n        retries: 0,\n        skipReadyCheck: true,\n        resolve,\n        reject,\n      });\n    });\n\n    let sharedRefs = this.options.sharedReferences;\n    let refsShared = new Set();\n    // in case more refs are created while initial refs are sending\n    while (refsShared.size < sharedRefs.size) {\n      await Promise.all(\n        [...sharedRefs]\n          .filter(([ref]) => !refsShared.has(ref))\n          .map(async ([ref, value]) => {\n            await this.sendSharedReference(ref, value);\n            refsShared.add(ref);\n          }),\n      );\n    }\n\n    this.ready = true;\n    this.emit('ready');\n  }\n\n  sendSharedReference(ref: SharedReference, value: mixed): Promise<any> {\n    this.sentSharedReferences.add(ref);\n    return new Promise((resolve, reject) => {\n      this.call({\n        method: 'createSharedReference',\n        args: [ref, value],\n        resolve,\n        reject,\n        retries: 0,\n        skipReadyCheck: true,\n      });\n    });\n  }\n\n  send(data: WorkerMessage): void {\n    this.worker.send(data);\n  }\n\n  call(call: WorkerCall): void {\n    if (this.stopped || this.isStopping) {\n      return;\n    }\n\n    let idx = this.callId++;\n    this.calls.set(idx, call);\n\n    let msg = {\n      type: 'request',\n      idx: idx,\n      child: this.id,\n      handle: call.handle,\n      method: call.method,\n      args: call.args,\n    };\n\n    if (this.ready || call.skipReadyCheck === true) {\n      this.send(msg);\n    } else {\n      this.once('ready', () => this.send(msg));\n    }\n  }\n\n  receive(message: WorkerMessage): void {\n    if (this.stopped || this.isStopping) {\n      return;\n    }\n\n    if (message.type === 'request') {\n      this.emit('request', message);\n    } else if (message.type === 'response') {\n      let idx = message.idx;\n      if (idx == null) {\n        return;\n      }\n\n      let call = this.calls.get(idx);\n      if (!call) {\n        // Return for unknown calls, these might accur if a third party process uses workers\n        return;\n      }\n\n      if (message.contentType === 'error') {\n        call.reject(new ThrowableDiagnostic({diagnostic: message.content}));\n      } else {\n        call.resolve(message.content);\n      }\n\n      this.calls.delete(idx);\n      this.emit('response', message);\n    }\n  }\n\n  async stop() {\n    if (!this.stopped) {\n      this.stopped = true;\n\n      if (this.worker) {\n        await this.worker.stop();\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/workers/src/WorkerFarm.js",
    "content": "// @flow\n\nimport type {ErrorWithCode, FilePath} from '@parcel/types-internal';\nimport type {\n  CallRequest,\n  HandleCallRequest,\n  WorkerRequest,\n  WorkerDataResponse,\n  WorkerErrorResponse,\n  BackendType,\n} from './types';\nimport type {HandleFunction} from './Handle';\n\nimport * as coreWorker from './core-worker';\nimport * as bus from './bus';\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport EventEmitter from 'events';\nimport {\n  deserialize,\n  prepareForSerialization,\n  restoreDeserializedObject,\n  serialize,\n} from '@parcel/core';\nimport ThrowableDiagnostic, {anyToDiagnostic, md} from '@parcel/diagnostic';\nimport Worker, {type WorkerCall} from './Worker';\nimport cpuCount from './cpuCount';\nimport Handle from './Handle';\nimport {child} from './childState';\nimport {detectBackend} from './backend';\nimport {SamplingProfiler, Trace} from '@parcel/profiler';\nimport fs from 'fs';\nimport logger from '@parcel/logger';\n\nlet referenceId = 1;\n\nexport opaque type SharedReference = number;\n\nexport type FarmOptions = {|\n  maxConcurrentWorkers: number,\n  maxConcurrentCallsPerWorker: number,\n  forcedKillTime: number,\n  useLocalWorker: boolean,\n  warmWorkers: boolean,\n  workerPath?: FilePath,\n  backend: BackendType,\n  shouldPatchConsole?: boolean,\n  shouldTrace?: boolean,\n|};\n\ntype WorkerModule = {\n  +[string]: (...args: Array<mixed>) => Promise<mixed>,\n  ...\n};\n\nexport type WorkerApi = {|\n  callMaster(CallRequest, ?boolean): Promise<mixed>,\n  createReverseHandle(fn: HandleFunction): Handle,\n  getSharedReference(ref: SharedReference): mixed,\n  resolveSharedReference(value: mixed): ?SharedReference,\n  callChild?: (childId: number, request: HandleCallRequest) => Promise<mixed>,\n|};\n\nexport {Handle};\n\nconst DEFAULT_MAX_CONCURRENT_CALLS: number = 30;\n\n/**\n * workerPath should always be defined inside farmOptions\n */\n\nexport default class WorkerFarm extends EventEmitter {\n  callQueue: Array<WorkerCall> = [];\n  ending: boolean = false;\n  localWorker: WorkerModule;\n  localWorkerInit: ?Promise<void>;\n  options: FarmOptions;\n  run: HandleFunction;\n  warmWorkers: number = 0;\n  readyWorkers: number = 0;\n  workers: Map<number, Worker> = new Map();\n  handles: Map<number, Handle> = new Map();\n  sharedReferences: Map<SharedReference, mixed> = new Map();\n  sharedReferencesByValue: Map<mixed, SharedReference> = new Map();\n  serializedSharedReferences: Map<SharedReference, ?ArrayBuffer> = new Map();\n  profiler: ?SamplingProfiler;\n\n  constructor(farmOptions: $Shape<FarmOptions> = {}) {\n    super();\n    this.options = {\n      maxConcurrentWorkers: WorkerFarm.getNumWorkers(),\n      maxConcurrentCallsPerWorker: WorkerFarm.getConcurrentCallsPerWorker(\n        farmOptions.shouldTrace ? 1 : DEFAULT_MAX_CONCURRENT_CALLS,\n      ),\n      forcedKillTime: 500,\n      warmWorkers: false,\n      useLocalWorker: true, // TODO: setting this to false makes some tests fail, figure out why\n      backend: detectBackend(),\n      ...farmOptions,\n    };\n\n    if (!this.options.workerPath) {\n      throw new Error('Please provide a worker path!');\n    }\n\n    // $FlowFixMe\n    if (process.browser) {\n      if (this.options.workerPath === '@parcel/core/src/worker.js') {\n        this.localWorker = coreWorker;\n      } else {\n        throw new Error(\n          'No dynamic require possible: ' + this.options.workerPath,\n        );\n      }\n    } else {\n      // $FlowFixMe this must be dynamic\n      this.localWorker = require(this.options.workerPath);\n    }\n\n    this.localWorkerInit =\n      this.localWorker.childInit != null ? this.localWorker.childInit() : null;\n\n    this.run = this.createHandle('run');\n\n    // Worker thread stdout is by default piped into the process stdout, if there are enough worker\n    // threads to exceed the default listener limit, then anything else piping into stdout will trigger\n    // the `MaxListenersExceededWarning`, so we should ensure the max listeners is at least equal to the\n    // number of workers + 1 for the main thread.\n    //\n    // Note this can't be fixed easily where other things pipe into stdout -  even after starting > 10 worker\n    // threads `process.stdout.getMaxListeners()` will still return 10, however adding another pipe into `stdout`\n    // will give the warning with `<worker count + 1>` as the number of listeners.\n    process.stdout?.setMaxListeners(\n      Math.max(\n        process.stdout.getMaxListeners(),\n        WorkerFarm.getNumWorkers() + 1,\n      ),\n    );\n\n    this.startMaxWorkers();\n  }\n\n  workerApi: {|\n    callChild: (childId: number, request: HandleCallRequest) => Promise<mixed>,\n    callMaster: (\n      request: CallRequest,\n      awaitResponse?: ?boolean,\n    ) => Promise<mixed>,\n    createReverseHandle: (fn: HandleFunction) => Handle,\n    getSharedReference: (ref: SharedReference) => mixed,\n    resolveSharedReference: (value: mixed) => void | SharedReference,\n    runHandle: (handle: Handle, args: Array<any>) => Promise<mixed>,\n  |} = {\n    callMaster: async (\n      request: CallRequest,\n      awaitResponse: ?boolean = true,\n    ): Promise<mixed> => {\n      // $FlowFixMe\n      let result = await this.processRequest({\n        ...request,\n        awaitResponse,\n      });\n      return deserialize(serialize(result));\n    },\n    createReverseHandle: (fn: HandleFunction): Handle =>\n      this.createReverseHandle(fn),\n    callChild: (childId: number, request: HandleCallRequest): Promise<mixed> =>\n      new Promise((resolve, reject) => {\n        nullthrows(this.workers.get(childId)).call({\n          ...request,\n          resolve,\n          reject,\n          retries: 0,\n        });\n      }),\n    runHandle: (handle: Handle, args: Array<any>): Promise<mixed> =>\n      this.workerApi.callChild(nullthrows(handle.childId), {\n        handle: handle.id,\n        args,\n      }),\n    getSharedReference: (ref: SharedReference) =>\n      this.sharedReferences.get(ref),\n    resolveSharedReference: (value: mixed) =>\n      this.sharedReferencesByValue.get(value),\n  };\n\n  warmupWorker(method: string, args: Array<any>): void {\n    // Workers are already stopping\n    if (this.ending) {\n      return;\n    }\n\n    // Workers are not warmed up yet.\n    // Send the job to a remote worker in the background,\n    // but use the result from the local worker - it will be faster.\n    let promise = this.addCall(method, [...args, true]);\n    if (promise) {\n      promise\n        .then(() => {\n          this.warmWorkers++;\n          if (this.warmWorkers >= this.workers.size) {\n            this.emit('warmedup');\n          }\n        })\n        .catch(() => {});\n    }\n  }\n\n  shouldStartRemoteWorkers(): boolean {\n    return (\n      this.options.maxConcurrentWorkers > 0 || !this.options.useLocalWorker\n    );\n  }\n\n  createHandle(method: string, useMainThread: boolean = false): HandleFunction {\n    if (!this.options.useLocalWorker) {\n      useMainThread = false;\n    }\n\n    return async (...args) => {\n      // Child process workers are slow to start (~600ms).\n      // While we're waiting, just run on the main thread.\n      // This significantly speeds up startup time.\n      if (this.shouldUseRemoteWorkers() && !useMainThread) {\n        return this.addCall(method, [...args, false]);\n      } else {\n        if (this.options.warmWorkers && this.shouldStartRemoteWorkers()) {\n          this.warmupWorker(method, args);\n        }\n\n        let processedArgs;\n        if (!useMainThread) {\n          processedArgs = restoreDeserializedObject(\n            prepareForSerialization([...args, false]),\n          );\n        } else {\n          processedArgs = args;\n        }\n\n        if (this.localWorkerInit != null) {\n          await this.localWorkerInit;\n          this.localWorkerInit = null;\n        }\n        return this.localWorker[method](this.workerApi, ...processedArgs);\n      }\n    };\n  }\n\n  onError(error: ErrorWithCode, worker: Worker): void | Promise<void> {\n    // Handle ipc errors\n    if (error.code === 'ERR_IPC_CHANNEL_CLOSED') {\n      return this.stopWorker(worker);\n    } else {\n      logger.error(error, '@parcel/workers');\n    }\n  }\n\n  startChild() {\n    let worker = new Worker({\n      forcedKillTime: this.options.forcedKillTime,\n      backend: this.options.backend,\n      shouldPatchConsole: this.options.shouldPatchConsole,\n      shouldTrace: this.options.shouldTrace,\n      sharedReferences: this.sharedReferences,\n    });\n\n    worker.fork(nullthrows(this.options.workerPath));\n\n    worker.on('request', data => this.processRequest(data, worker));\n\n    worker.on('ready', () => {\n      this.readyWorkers++;\n      if (this.readyWorkers === this.options.maxConcurrentWorkers) {\n        this.emit('ready');\n      }\n      this.processQueue();\n    });\n    worker.on('response', () => this.processQueue());\n\n    worker.on('error', err => this.onError(err, worker));\n    worker.once('exit', () => this.stopWorker(worker));\n\n    this.workers.set(worker.id, worker);\n  }\n\n  async stopWorker(worker: Worker): Promise<void> {\n    if (!worker.stopped) {\n      this.workers.delete(worker.id);\n\n      worker.isStopping = true;\n\n      if (worker.calls.size) {\n        for (let call of worker.calls.values()) {\n          call.retries++;\n          this.callQueue.unshift(call);\n        }\n      }\n\n      worker.calls.clear();\n\n      await worker.stop();\n\n      // Process any requests that failed and start a new worker\n      this.processQueue();\n    }\n  }\n\n  processQueue(): void {\n    if (this.ending || !this.callQueue.length) return;\n\n    if (this.workers.size < this.options.maxConcurrentWorkers) {\n      this.startChild();\n    }\n\n    let workers = [...this.workers.values()].sort(\n      (a, b) => a.calls.size - b.calls.size,\n    );\n\n    for (let worker of workers) {\n      if (!this.callQueue.length) {\n        break;\n      }\n\n      if (!worker.ready || worker.stopped || worker.isStopping) {\n        continue;\n      }\n\n      if (worker.calls.size < this.options.maxConcurrentCallsPerWorker) {\n        this.callWorker(worker, this.callQueue.shift());\n      }\n    }\n  }\n\n  async callWorker(worker: Worker, call: WorkerCall): Promise<void> {\n    for (let ref of this.sharedReferences.keys()) {\n      if (!worker.sentSharedReferences.has(ref)) {\n        await worker.sendSharedReference(\n          ref,\n          this.getSerializedSharedReference(ref),\n        );\n      }\n    }\n\n    worker.call(call);\n  }\n\n  async processRequest(\n    data: {|\n      location: FilePath,\n    |} & $Shape<WorkerRequest>,\n    worker?: Worker,\n  ): Promise<?string> {\n    let {method, args, location, awaitResponse, idx, handle: handleId} = data;\n    let mod;\n    if (handleId != null) {\n      mod = nullthrows(this.handles.get(handleId)?.fn);\n    } else if (location) {\n      // $FlowFixMe\n      if (process.browser) {\n        if (location === '@parcel/workers/src/bus.js') {\n          mod = (bus: any);\n        } else {\n          throw new Error('No dynamic require possible: ' + location);\n        }\n      } else {\n        // $FlowFixMe this must be dynamic\n        mod = require(location);\n      }\n    } else {\n      throw new Error('Unknown request');\n    }\n\n    const responseFromContent = (content: any): WorkerDataResponse => ({\n      idx,\n      type: 'response',\n      contentType: 'data',\n      content,\n    });\n\n    const errorResponseFromError = (e: Error): WorkerErrorResponse => ({\n      idx,\n      type: 'response',\n      contentType: 'error',\n      content: anyToDiagnostic(e),\n    });\n\n    let result;\n    if (method == null) {\n      try {\n        result = responseFromContent(await mod(...args));\n      } catch (e) {\n        result = errorResponseFromError(e);\n      }\n    } else {\n      // ESModule default interop\n      if (mod.__esModule && !mod[method] && mod.default) {\n        mod = mod.default;\n      }\n\n      try {\n        // $FlowFixMe\n        result = responseFromContent(await mod[method](...args));\n      } catch (e) {\n        result = errorResponseFromError(e);\n      }\n    }\n\n    if (awaitResponse) {\n      if (worker) {\n        worker.send(result);\n      } else {\n        if (result.contentType === 'error') {\n          throw new ThrowableDiagnostic({diagnostic: result.content});\n        }\n        return result.content;\n      }\n    }\n  }\n\n  addCall(method: string, args: Array<any>): Promise<any> {\n    if (this.ending) {\n      throw new Error('Cannot add a worker call if workerfarm is ending.');\n    }\n\n    return new Promise((resolve, reject) => {\n      this.callQueue.push({\n        method,\n        args: args,\n        retries: 0,\n        resolve,\n        reject,\n      });\n      this.processQueue();\n    });\n  }\n\n  async end(): Promise<void> {\n    this.ending = true;\n\n    await Promise.all(\n      Array.from(this.workers.values()).map(worker => this.stopWorker(worker)),\n    );\n\n    for (let handle of this.handles.values()) {\n      handle.dispose();\n    }\n    this.handles = new Map();\n    this.sharedReferences = new Map();\n    this.sharedReferencesByValue = new Map();\n\n    this.ending = false;\n  }\n\n  startMaxWorkers(): void {\n    // Starts workers until the maximum is reached\n    if (this.workers.size < this.options.maxConcurrentWorkers) {\n      let toStart = this.options.maxConcurrentWorkers - this.workers.size;\n      while (toStart--) {\n        this.startChild();\n      }\n    }\n  }\n\n  shouldUseRemoteWorkers(): boolean {\n    return (\n      !this.options.useLocalWorker ||\n      ((this.warmWorkers >= this.workers.size || !this.options.warmWorkers) &&\n        this.options.maxConcurrentWorkers > 0)\n    );\n  }\n\n  createReverseHandle(fn: HandleFunction): Handle {\n    let handle = new Handle({fn});\n    this.handles.set(handle.id, handle);\n    return handle;\n  }\n\n  createSharedReference(\n    value: mixed,\n    isCacheable: boolean = true,\n  ): {|ref: SharedReference, dispose(): Promise<mixed>|} {\n    let ref = referenceId++;\n    this.sharedReferences.set(ref, value);\n    this.sharedReferencesByValue.set(value, ref);\n    if (!isCacheable) {\n      this.serializedSharedReferences.set(ref, null);\n    }\n\n    return {\n      ref,\n      dispose: () => {\n        this.sharedReferences.delete(ref);\n        this.sharedReferencesByValue.delete(value);\n        this.serializedSharedReferences.delete(ref);\n\n        let promises = [];\n        for (let worker of this.workers.values()) {\n          if (!worker.sentSharedReferences.has(ref)) {\n            continue;\n          }\n\n          worker.sentSharedReferences.delete(ref);\n          promises.push(\n            new Promise((resolve, reject) => {\n              worker.call({\n                method: 'deleteSharedReference',\n                args: [ref],\n                resolve,\n                reject,\n                skipReadyCheck: true,\n                retries: 0,\n              });\n            }),\n          );\n        }\n        return Promise.all(promises);\n      },\n    };\n  }\n\n  getSerializedSharedReference(ref: SharedReference): ArrayBuffer {\n    let cached = this.serializedSharedReferences.get(ref);\n    if (cached) {\n      return cached;\n    }\n\n    let value = this.sharedReferences.get(ref);\n    let buf = serialize(value).buffer;\n\n    // If the reference was created with the isCacheable option set to false,\n    // serializedSharedReferences will contain `null` as the value.\n    if (cached !== null) {\n      this.serializedSharedReferences.set(ref, buf);\n    }\n\n    return buf;\n  }\n\n  async startProfile() {\n    let promises = [];\n    for (let worker of this.workers.values()) {\n      promises.push(\n        new Promise((resolve, reject) => {\n          worker.call({\n            method: 'startProfile',\n            args: [],\n            resolve,\n            reject,\n            retries: 0,\n            skipReadyCheck: true,\n          });\n        }),\n      );\n    }\n\n    this.profiler = new SamplingProfiler();\n\n    promises.push(this.profiler.startProfiling());\n    await Promise.all(promises);\n  }\n\n  async endProfile() {\n    if (!this.profiler) {\n      return;\n    }\n\n    let promises = [this.profiler.stopProfiling()];\n    let names = ['Master'];\n\n    for (let worker of this.workers.values()) {\n      names.push('Worker ' + worker.id);\n      promises.push(\n        new Promise((resolve, reject) => {\n          worker.call({\n            method: 'endProfile',\n            args: [],\n            resolve,\n            reject,\n            retries: 0,\n            skipReadyCheck: true,\n          });\n        }),\n      );\n    }\n\n    var profiles = await Promise.all(promises);\n    let trace = new Trace();\n    let filename = `profile-${getTimeId()}.trace`;\n    let stream = trace.pipe(fs.createWriteStream(filename));\n\n    for (let profile of profiles) {\n      trace.addCPUProfile(names.shift(), profile);\n    }\n\n    trace.flush();\n    await new Promise(resolve => {\n      stream.once('finish', resolve);\n    });\n\n    logger.info({\n      origin: '@parcel/workers',\n      message: md`Wrote profile to ${filename}`,\n    });\n  }\n\n  async callAllWorkers(method: string, args: Array<any>) {\n    let promises = [];\n    for (let worker of this.workers.values()) {\n      promises.push(\n        new Promise((resolve, reject) => {\n          worker.call({\n            method,\n            args,\n            resolve,\n            reject,\n            retries: 0,\n          });\n        }),\n      );\n    }\n\n    promises.push(this.localWorker[method](this.workerApi, ...args));\n    await Promise.all(promises);\n  }\n\n  async takeHeapSnapshot() {\n    let snapshotId = getTimeId();\n\n    try {\n      let snapshotPaths = await Promise.all(\n        [...this.workers.values()].map(\n          worker =>\n            new Promise((resolve, reject) => {\n              worker.call({\n                method: 'takeHeapSnapshot',\n                args: [snapshotId],\n                resolve,\n                reject,\n                retries: 0,\n                skipReadyCheck: true,\n              });\n            }),\n        ),\n      );\n\n      logger.info({\n        origin: '@parcel/workers',\n        message: md`Wrote heap snapshots to the following paths:\\n${snapshotPaths.join(\n          '\\n',\n        )}`,\n      });\n    } catch {\n      logger.error({\n        origin: '@parcel/workers',\n        message: 'Unable to take heap snapshots. Note: requires Node 11.13.0+',\n      });\n    }\n  }\n\n  static getNumWorkers(): number {\n    return process.env.PARCEL_WORKERS\n      ? parseInt(process.env.PARCEL_WORKERS, 10)\n      : Math.min(4, Math.ceil(cpuCount() / 2));\n  }\n\n  static isWorker(): boolean {\n    return !!child;\n  }\n\n  static getWorkerApi(): {|\n    callMaster: (\n      request: CallRequest,\n      awaitResponse?: ?boolean,\n    ) => Promise<mixed>,\n    createReverseHandle: (fn: (...args: Array<any>) => mixed) => Handle,\n    getSharedReference: (ref: SharedReference) => mixed,\n    resolveSharedReference: (value: mixed) => void | SharedReference,\n    runHandle: (handle: Handle, args: Array<any>) => Promise<mixed>,\n  |} {\n    invariant(\n      child != null,\n      'WorkerFarm.getWorkerApi can only be called within workers',\n    );\n    return child.workerApi;\n  }\n\n  static getConcurrentCallsPerWorker(\n    defaultValue?: number = DEFAULT_MAX_CONCURRENT_CALLS,\n  ): number {\n    return (\n      parseInt(process.env.PARCEL_MAX_CONCURRENT_CALLS, 10) || defaultValue\n    );\n  }\n}\n\nfunction getTimeId() {\n  let now = new Date();\n  return (\n    String(now.getFullYear()) +\n    String(now.getMonth() + 1).padStart(2, '0') +\n    String(now.getDate()).padStart(2, '0') +\n    '-' +\n    String(now.getHours()).padStart(2, '0') +\n    String(now.getMinutes()).padStart(2, '0') +\n    String(now.getSeconds()).padStart(2, '0')\n  );\n}\n"
  },
  {
    "path": "packages/core/workers/src/backend.js",
    "content": "// @flow\nimport type {BackendType, WorkerImpl} from './types';\n\nexport function detectBackend(): BackendType {\n  // $FlowFixMe\n  if (process.browser) return 'web';\n\n  switch (process.env.PARCEL_WORKER_BACKEND) {\n    case 'threads':\n    case 'process':\n      return process.env.PARCEL_WORKER_BACKEND;\n  }\n\n  try {\n    require('worker_threads');\n    return 'threads';\n  } catch (err) {\n    return 'process';\n  }\n}\n\nexport function getWorkerBackend(backend: BackendType): Class<WorkerImpl> {\n  switch (backend) {\n    case 'threads':\n      return require('./threads/ThreadsWorker').default;\n    case 'process':\n      return require('./process/ProcessWorker').default;\n    case 'web':\n      return require('./web/WebWorker').default;\n    default:\n      throw new Error(`Invalid backend: ${backend}`);\n  }\n}\n"
  },
  {
    "path": "packages/core/workers/src/bus.js",
    "content": "// @flow\nimport EventEmitter from 'events';\nimport {child} from './childState';\n\nclass Bus extends EventEmitter {\n  emit(event: string, ...args: Array<any>): boolean {\n    if (child) {\n      child.workerApi.callMaster(\n        {\n          // $FlowFixMe\n          location: process.browser ? '@parcel/workers/src/bus.js' : __filename,\n          method: 'emit',\n          args: [event, ...args],\n        },\n        false,\n      );\n      return true;\n    } else {\n      return super.emit(event, ...args);\n    }\n  }\n}\n\nexport default (new Bus(): Bus);\n"
  },
  {
    "path": "packages/core/workers/src/child.js",
    "content": "// @flow\n\nimport type {\n  CallRequest,\n  WorkerDataResponse,\n  WorkerErrorResponse,\n  WorkerMessage,\n  WorkerRequest,\n  WorkerResponse,\n  ChildImpl,\n} from './types';\nimport type {Async, IDisposable} from '@parcel/types-internal';\nimport type {SharedReference} from './WorkerFarm';\n\nimport * as coreWorker from './core-worker';\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport Logger, {patchConsole, unpatchConsole} from '@parcel/logger';\nimport ThrowableDiagnostic, {anyToDiagnostic} from '@parcel/diagnostic';\nimport {deserialize} from '@parcel/core';\nimport bus from './bus';\nimport {SamplingProfiler, tracer} from '@parcel/profiler';\nimport _Handle from './Handle';\n\n// The import of './Handle' should really be imported eagerly (with @babel/plugin-transform-modules-commonjs's lazy mode).\nconst Handle = _Handle;\n\ntype ChildCall = WorkerRequest & {|\n  resolve: (result: Promise<any> | any) => void,\n  reject: (error: any) => void,\n|};\n\nexport class Child {\n  callQueue: Array<ChildCall> = [];\n  childId: ?number;\n  maxConcurrentCalls: number = 10;\n  module: ?any;\n  responseId: number = 0;\n  responseQueue: Map<number, ChildCall> = new Map();\n  loggerDisposable: IDisposable;\n  tracerDisposable: IDisposable;\n  child: ChildImpl;\n  profiler: ?SamplingProfiler;\n  handles: Map<number, Handle> = new Map();\n  sharedReferences: Map<SharedReference, mixed> = new Map();\n  sharedReferencesByValue: Map<mixed, SharedReference> = new Map();\n\n  constructor(ChildBackend: Class<ChildImpl>) {\n    this.child = new ChildBackend(\n      m => {\n        this.messageListener(m);\n      },\n      () => this.handleEnd(),\n    );\n\n    // Monitior all logging events inside this child process and forward to\n    // the main process via the bus.\n    this.loggerDisposable = Logger.onLog(event => {\n      bus.emit('logEvent', event);\n    });\n    // .. and do the same for trace events\n    this.tracerDisposable = tracer.onTrace(event => {\n      bus.emit('traceEvent', event);\n    });\n  }\n\n  workerApi: {|\n    callMaster: (\n      request: CallRequest,\n      awaitResponse?: ?boolean,\n    ) => Promise<mixed>,\n    createReverseHandle: (fn: (...args: Array<any>) => mixed) => Handle,\n    getSharedReference: (ref: SharedReference) => mixed,\n    resolveSharedReference: (value: mixed) => void | SharedReference,\n    runHandle: (handle: Handle, args: Array<any>) => Promise<mixed>,\n  |} = {\n    callMaster: (\n      request: CallRequest,\n      awaitResponse: ?boolean = true,\n    ): Promise<mixed> => this.addCall(request, awaitResponse),\n    createReverseHandle: (fn: (...args: Array<any>) => mixed): Handle =>\n      this.createReverseHandle(fn),\n    runHandle: (handle: Handle, args: Array<any>): Promise<mixed> =>\n      this.workerApi.callMaster({handle: handle.id, args}, true),\n    getSharedReference: (ref: SharedReference) =>\n      this.sharedReferences.get(ref),\n    resolveSharedReference: (value: mixed) =>\n      this.sharedReferencesByValue.get(value),\n  };\n\n  messageListener(message: WorkerMessage): Async<void> {\n    if (message.type === 'response') {\n      return this.handleResponse(message);\n    } else if (message.type === 'request') {\n      return this.handleRequest(message);\n    }\n  }\n\n  send(data: WorkerMessage): void {\n    this.child.send(data);\n  }\n\n  async childInit(module: string, childId: number): Promise<void> {\n    // $FlowFixMe\n    if (process.browser) {\n      if (module === '@parcel/core/src/worker.js') {\n        this.module = coreWorker;\n      } else {\n        throw new Error('No dynamic require possible: ' + module);\n      }\n    } else {\n      // $FlowFixMe this must be dynamic\n      this.module = require(module);\n    }\n    this.childId = childId;\n\n    if (this.module.childInit != null) {\n      await this.module.childInit();\n    }\n  }\n\n  async handleRequest(data: WorkerRequest): Promise<void> {\n    let {idx, method, args, handle: handleId} = data;\n    let child = nullthrows(data.child);\n\n    const responseFromContent = (content: any): WorkerDataResponse => ({\n      idx,\n      child,\n      type: 'response',\n      contentType: 'data',\n      content,\n    });\n\n    const errorResponseFromError = (e: Error): WorkerErrorResponse => ({\n      idx,\n      child,\n      type: 'response',\n      contentType: 'error',\n      content: anyToDiagnostic(e),\n    });\n\n    let result;\n    if (handleId != null) {\n      try {\n        let fn = nullthrows(this.handles.get(handleId)?.fn);\n        result = responseFromContent(fn(...args));\n      } catch (e) {\n        result = errorResponseFromError(e);\n      }\n    } else if (method === 'childInit') {\n      try {\n        let [moduleName, childOptions] = args;\n        if (childOptions.shouldPatchConsole) {\n          patchConsole();\n        } else {\n          unpatchConsole();\n        }\n\n        if (childOptions.shouldTrace) {\n          tracer.enable();\n        }\n\n        result = responseFromContent(await this.childInit(moduleName, child));\n      } catch (e) {\n        result = errorResponseFromError(e);\n      }\n    } else if (method === 'startProfile') {\n      this.profiler = new SamplingProfiler();\n      try {\n        result = responseFromContent(await this.profiler.startProfiling());\n      } catch (e) {\n        result = errorResponseFromError(e);\n      }\n    } else if (method === 'endProfile') {\n      try {\n        let res = this.profiler ? await this.profiler.stopProfiling() : null;\n        result = responseFromContent(res);\n      } catch (e) {\n        result = errorResponseFromError(e);\n      }\n    } else if (method === 'takeHeapSnapshot') {\n      try {\n        let v8 = require('v8');\n        result = responseFromContent(\n          v8.writeHeapSnapshot(\n            'heap-' +\n              args[0] +\n              '-' +\n              (this.childId ? 'worker' + this.childId : 'main') +\n              '.heapsnapshot',\n          ),\n        );\n      } catch (e) {\n        result = errorResponseFromError(e);\n      }\n    } else if (method === 'createSharedReference') {\n      let [ref, _value] = args;\n      let value =\n        _value instanceof ArrayBuffer\n          ? // In the case the value is pre-serialized as a buffer,\n            // deserialize it.\n            deserialize(Buffer.from(_value))\n          : _value;\n      this.sharedReferences.set(ref, value);\n      this.sharedReferencesByValue.set(value, ref);\n      result = responseFromContent(null);\n    } else if (method === 'deleteSharedReference') {\n      let ref = args[0];\n      let value = this.sharedReferences.get(ref);\n      this.sharedReferencesByValue.delete(value);\n      this.sharedReferences.delete(ref);\n      result = responseFromContent(null);\n    } else {\n      try {\n        result = responseFromContent(\n          // $FlowFixMe\n          await this.module[method](this.workerApi, ...args),\n        );\n      } catch (e) {\n        result = errorResponseFromError(e);\n      }\n    }\n\n    try {\n      this.send(result);\n    } catch (e) {\n      result = this.send(errorResponseFromError(e));\n    }\n  }\n\n  handleResponse(data: WorkerResponse): void {\n    let idx = nullthrows(data.idx);\n    let contentType = data.contentType;\n    let content = data.content;\n    let call = nullthrows(this.responseQueue.get(idx));\n\n    if (contentType === 'error') {\n      invariant(typeof content !== 'string');\n      call.reject(new ThrowableDiagnostic({diagnostic: content}));\n    } else {\n      call.resolve(content);\n    }\n\n    this.responseQueue.delete(idx);\n\n    // Process the next call\n    this.processQueue();\n  }\n\n  // Keep in mind to make sure responses to these calls are JSON.Stringify safe\n  addCall(\n    request: CallRequest,\n    awaitResponse: ?boolean = true,\n  ): Promise<mixed> {\n    // $FlowFixMe\n    let call: ChildCall = {\n      ...request,\n      type: 'request',\n      child: this.childId,\n      // $FlowFixMe Added in Flow 0.121.0 upgrade in #4381\n      awaitResponse,\n      resolve: () => {},\n      reject: () => {},\n    };\n\n    let promise;\n    if (awaitResponse) {\n      promise = new Promise((resolve, reject) => {\n        call.resolve = resolve;\n        call.reject = reject;\n      });\n    }\n\n    this.callQueue.push(call);\n    this.processQueue();\n\n    return promise ?? Promise.resolve();\n  }\n\n  sendRequest(call: ChildCall): void {\n    let idx;\n    if (call.awaitResponse) {\n      idx = this.responseId++;\n      this.responseQueue.set(idx, call);\n    }\n\n    this.send({\n      idx,\n      child: call.child,\n      type: call.type,\n      location: call.location,\n      handle: call.handle,\n      method: call.method,\n      args: call.args,\n      awaitResponse: call.awaitResponse,\n    });\n  }\n\n  processQueue(): void {\n    if (!this.callQueue.length) {\n      return;\n    }\n\n    if (this.responseQueue.size < this.maxConcurrentCalls) {\n      this.sendRequest(this.callQueue.shift());\n    }\n  }\n\n  handleEnd(): void {\n    this.loggerDisposable.dispose();\n    this.tracerDisposable.dispose();\n  }\n\n  createReverseHandle(fn: (...args: Array<any>) => mixed): Handle {\n    let handle = new Handle({\n      fn,\n      childId: this.childId,\n    });\n    this.handles.set(handle.id, handle);\n    return handle;\n  }\n}\n"
  },
  {
    "path": "packages/core/workers/src/childState.js",
    "content": "// @flow\nimport type {Child} from './child';\n\n// This file is imported by both the WorkerFarm and child implementation.\n// When a worker is inited, it sets the state in this file.\n// This way, WorkerFarm can access the state without directly importing the child code.\nexport let child: ?Child = null;\nexport function setChild(c: Child) {\n  child = c;\n}\n"
  },
  {
    "path": "packages/core/workers/src/core-worker.browser.js",
    "content": "// @flow\n// eslint-disable-next-line monorepo/no-internal-import\nmodule.exports = require('@parcel/core/src/worker.js');\n"
  },
  {
    "path": "packages/core/workers/src/core-worker.js",
    "content": "// This is used only in browser builds\nmodule.exports = {};\n"
  },
  {
    "path": "packages/core/workers/src/cpuCount.js",
    "content": "// @flow\nimport os from 'os';\nimport {execSync} from 'child_process';\n\nconst exec = (command: string): string => {\n  try {\n    let stdout = execSync(command, {\n      encoding: 'utf8',\n      // This prevents the command from outputting to the console\n      stdio: [null, null, null],\n    });\n    return stdout.trim();\n  } catch (e) {\n    return '';\n  }\n};\n\nexport function detectRealCores(): number {\n  let platform = os.platform();\n  let amount = 0;\n\n  if (platform === 'linux') {\n    amount = parseInt(\n      exec('lscpu -p | egrep -v \"^#\" | sort -u -t, -k 2,4 | wc -l'),\n      10,\n    );\n  } else if (platform === 'darwin') {\n    amount = parseInt(exec('sysctl -n hw.physicalcpu_max'), 10);\n  } else if (platform === 'win32') {\n    const str = exec('wmic cpu get NumberOfCores').match(/\\d+/g);\n    if (str !== null) {\n      amount = parseInt(str.filter(n => n !== '')[0], 10);\n    }\n  }\n\n  if (!amount || amount <= 0) {\n    throw new Error('Could not detect cpu count!');\n  }\n\n  return amount;\n}\n\nlet cores;\nexport default function getCores(bypassCache?: boolean = false): number {\n  // Do not re-run commands if we already have the count...\n  if (cores && !bypassCache) {\n    return cores;\n  }\n\n  // $FlowFixMe\n  if (process.browser) {\n    // eslint-disable-next-line no-undef\n    cores = navigator.hardwareConcurrency / 2;\n  }\n\n  if (!cores) {\n    try {\n      cores = detectRealCores();\n    } catch (e) {\n      // Guess the amount of real cores\n      cores = os\n        .cpus()\n        .filter(\n          (cpu, index) => !cpu.model.includes('Intel') || index % 2 === 1,\n        ).length;\n    }\n  }\n\n  // Another fallback\n  if (!cores) {\n    cores = 1;\n  }\n\n  return cores;\n}\n"
  },
  {
    "path": "packages/core/workers/src/index.js",
    "content": "// @flow\nimport type {TraceEvent, LogEvent} from '@parcel/types-internal';\nimport invariant from 'assert';\nimport WorkerFarm from './WorkerFarm';\nimport Logger from '@parcel/logger';\nimport bus from './bus';\nimport {tracer} from '@parcel/profiler';\n\nif (!WorkerFarm.isWorker()) {\n  // Forward all logger events originating from workers into the main process\n  bus.on('logEvent', (e: LogEvent) => {\n    switch (e.level) {\n      case 'info':\n        Logger.info(e.diagnostics);\n        break;\n      case 'progress':\n        invariant(typeof e.message === 'string');\n        Logger.progress(e.message);\n        break;\n      case 'verbose':\n        Logger.verbose(e.diagnostics);\n        break;\n      case 'warn':\n        Logger.warn(e.diagnostics);\n        break;\n      case 'error':\n        Logger.error(e.diagnostics);\n        break;\n      default:\n        throw new Error('Unknown log level');\n    }\n  });\n\n  // Forward all trace events originating from workers into the main process\n  bus.on('traceEvent', (e: TraceEvent) => {\n    tracer.trace(e);\n  });\n}\n\nexport default WorkerFarm;\nexport {bus};\nexport {Handle} from './WorkerFarm';\nexport type {WorkerApi, FarmOptions, SharedReference} from './WorkerFarm';\n"
  },
  {
    "path": "packages/core/workers/src/process/ProcessChild.js",
    "content": "// @flow\n\nimport type {\n  ChildImpl,\n  MessageHandler,\n  ExitHandler,\n  WorkerMessage,\n} from '../types';\nimport nullthrows from 'nullthrows';\nimport {setChild} from '../childState';\nimport {Child} from '../child';\nimport {serialize, deserialize} from '@parcel/core';\n\nexport default class ProcessChild implements ChildImpl {\n  onMessage: MessageHandler;\n  onExit: ExitHandler;\n\n  constructor(onMessage: MessageHandler, onExit: ExitHandler) {\n    if (!process.send) {\n      throw new Error('Only create ProcessChild instances in a worker!');\n    }\n\n    this.onMessage = onMessage;\n    this.onExit = onExit;\n    process.on('message', data => this.handleMessage(data));\n  }\n\n  handleMessage(data: string): void {\n    if (data === 'die') {\n      return this.stop();\n    }\n\n    this.onMessage(deserialize(Buffer.from(data, 'base64')));\n  }\n\n  send(data: WorkerMessage) {\n    let processSend = nullthrows(process.send).bind(process);\n    processSend(serialize(data).toString('base64'), err => {\n      if (err && err instanceof Error) {\n        // $FlowFixMe[prop-missing]\n        if (err.code === 'ERR_IPC_CHANNEL_CLOSED') {\n          // IPC connection closed\n          // no need to keep the worker running if it can't send or receive data\n          return this.stop();\n        }\n      }\n    });\n  }\n\n  stop() {\n    this.onExit(0);\n    process.exit();\n  }\n}\n\nsetChild(new Child(ProcessChild));\n"
  },
  {
    "path": "packages/core/workers/src/process/ProcessWorker.js",
    "content": "// @flow\n\nimport type {\n  WorkerImpl,\n  MessageHandler,\n  ErrorHandler,\n  ExitHandler,\n  WorkerMessage,\n} from '../types';\nimport childProcess, {type ChildProcess} from 'child_process';\nimport path from 'path';\nimport {serialize, deserialize} from '@parcel/core';\n\nconst WORKER_PATH = path.join(__dirname, 'ProcessChild.js');\n\nexport default class ProcessWorker implements WorkerImpl {\n  execArgv: Object;\n  onMessage: MessageHandler;\n  onError: ErrorHandler;\n  onExit: ExitHandler;\n  child: ChildProcess;\n  processQueue: boolean = true;\n  sendQueue: Array<any> = [];\n\n  constructor(\n    execArgv: Object,\n    onMessage: MessageHandler,\n    onError: ErrorHandler,\n    onExit: ExitHandler,\n  ) {\n    this.execArgv = execArgv;\n    this.onMessage = onMessage;\n    this.onError = onError;\n    this.onExit = onExit;\n  }\n\n  start(): Promise<void> {\n    this.child = childProcess.fork(WORKER_PATH, process.argv, {\n      execArgv: this.execArgv,\n      env: process.env,\n      cwd: process.cwd(),\n    });\n\n    this.child.on('message', (data: string) => {\n      this.onMessage(deserialize(Buffer.from(data, 'base64')));\n    });\n\n    this.child.once('exit', this.onExit);\n    this.child.on('error', this.onError);\n\n    return Promise.resolve();\n  }\n\n  async stop() {\n    this.child.send('die');\n\n    let forceKill = setTimeout(() => this.child.kill('SIGINT'), 500);\n    await new Promise(resolve => {\n      this.child.once('exit', resolve);\n    });\n\n    clearTimeout(forceKill);\n  }\n\n  send(data: WorkerMessage) {\n    if (!this.processQueue) {\n      this.sendQueue.push(data);\n      return;\n    }\n\n    let result = this.child.send(serialize(data).toString('base64'), error => {\n      if (error && error instanceof Error) {\n        // Ignore this, the workerfarm handles child errors\n        return;\n      }\n\n      this.processQueue = true;\n\n      if (this.sendQueue.length > 0) {\n        let queueCopy = this.sendQueue.slice(0);\n        this.sendQueue = [];\n        queueCopy.forEach(entry => this.send(entry));\n      }\n    });\n\n    if (!result || /^win/.test(process.platform)) {\n      // Queue is handling too much messages throttle it\n      this.processQueue = false;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/core/workers/src/threads/ThreadsChild.js",
    "content": "// @flow\n\nimport type {\n  ChildImpl,\n  MessageHandler,\n  ExitHandler,\n  WorkerMessage,\n} from '../types';\nimport {isMainThread, parentPort} from 'worker_threads';\nimport nullthrows from 'nullthrows';\nimport {setChild} from '../childState';\nimport {Child} from '../child';\nimport {prepareForSerialization, restoreDeserializedObject} from '@parcel/core';\n\nexport default class ThreadsChild implements ChildImpl {\n  onMessage: MessageHandler;\n  onExit: ExitHandler;\n\n  constructor(onMessage: MessageHandler, onExit: ExitHandler) {\n    if (isMainThread || !parentPort) {\n      throw new Error('Only create ThreadsChild instances in a worker!');\n    }\n\n    this.onMessage = onMessage;\n    this.onExit = onExit;\n    parentPort.on('message', data => this.handleMessage(data));\n    parentPort.on('close', this.onExit);\n  }\n\n  handleMessage(data: WorkerMessage) {\n    this.onMessage(restoreDeserializedObject(data));\n  }\n\n  send(data: WorkerMessage) {\n    nullthrows(parentPort).postMessage(prepareForSerialization(data));\n  }\n}\n\nsetChild(new Child(ThreadsChild));\n"
  },
  {
    "path": "packages/core/workers/src/threads/ThreadsWorker.js",
    "content": "// @flow\n\nimport type {\n  WorkerImpl,\n  MessageHandler,\n  ErrorHandler,\n  ExitHandler,\n  WorkerMessage,\n} from '../types';\nimport {Worker} from 'worker_threads';\nimport path from 'path';\nimport {prepareForSerialization, restoreDeserializedObject} from '@parcel/core';\n\nconst WORKER_PATH = path.join(__dirname, 'ThreadsChild.js');\n\nexport default class ThreadsWorker implements WorkerImpl {\n  execArgv: Object;\n  onMessage: MessageHandler;\n  onError: ErrorHandler;\n  onExit: ExitHandler;\n  worker: Worker;\n\n  constructor(\n    execArgv: Object,\n    onMessage: MessageHandler,\n    onError: ErrorHandler,\n    onExit: ExitHandler,\n  ) {\n    this.execArgv = execArgv;\n    this.onMessage = onMessage;\n    this.onError = onError;\n    this.onExit = onExit;\n  }\n\n  start(): Promise<void> {\n    this.worker = new Worker(WORKER_PATH, {\n      execArgv: this.execArgv,\n      env: process.env,\n    });\n\n    this.worker.on('message', data => this.handleMessage(data));\n    this.worker.on('error', this.onError);\n    this.worker.on('exit', this.onExit);\n\n    return new Promise<void>(resolve => {\n      this.worker.on('online', resolve);\n    });\n  }\n\n  stop(): Promise<void> {\n    // In node 12, this returns a promise, but previously it accepted a callback\n    // TODO: Pass a callback in earlier versions of Node\n    return Promise.resolve(this.worker.terminate());\n  }\n\n  handleMessage(data: WorkerMessage) {\n    this.onMessage(restoreDeserializedObject(data));\n  }\n\n  send(data: WorkerMessage) {\n    this.worker.postMessage(prepareForSerialization(data));\n  }\n}\n"
  },
  {
    "path": "packages/core/workers/src/types.js",
    "content": "// @flow\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {FilePath} from '@parcel/types-internal';\n\nexport type LocationCallRequest = {|\n  args: $ReadOnlyArray<mixed>,\n  location: string,\n  method?: string,\n|};\n\nexport type HandleCallRequest = {|\n  args: $ReadOnlyArray<mixed>,\n  handle: number,\n|};\n\nexport type CallRequest = LocationCallRequest | HandleCallRequest;\n\nexport type WorkerRequest = {|\n  args: $ReadOnlyArray<any>,\n  awaitResponse?: boolean,\n  child?: ?number,\n  idx?: number,\n  location?: FilePath,\n  method?: ?string,\n  type: 'request',\n  handle?: number,\n|};\n\nexport type WorkerDataResponse = {|\n  idx?: number,\n  child?: number,\n  type: 'response',\n  contentType: 'data',\n  content: string,\n|};\n\nexport type WorkerErrorResponse = {|\n  idx?: number,\n  child?: number,\n  type: 'response',\n  contentType: 'error',\n  content: Diagnostic | Array<Diagnostic>,\n|};\n\nexport type WorkerResponse = WorkerDataResponse | WorkerErrorResponse;\nexport type WorkerMessage = WorkerRequest | WorkerResponse;\n\nexport type MessageHandler = (data: WorkerMessage) => void;\nexport type ErrorHandler = (err: Error) => void;\nexport type ExitHandler = (code: number) => void;\nexport interface WorkerImpl {\n  constructor(\n    execArgv: Object,\n    onMessage: MessageHandler,\n    onError: ErrorHandler,\n    onExit: ExitHandler,\n  ): void;\n  start(): Promise<void>;\n  stop(): Promise<void>;\n  send(data: WorkerMessage): void;\n}\n\nexport interface ChildImpl {\n  constructor(onMessage: MessageHandler, onExit: ExitHandler): void;\n  send(data: WorkerMessage): void;\n}\n\nexport type BackendType = 'threads' | 'process' | 'web';\n"
  },
  {
    "path": "packages/core/workers/src/web/WebChild.js",
    "content": "// @flow\n/* eslint-env worker*/\n\nimport type {\n  ChildImpl,\n  MessageHandler,\n  ExitHandler,\n  WorkerMessage,\n} from '../types';\nimport {setChild} from '../childState';\nimport {Child} from '../child';\nimport {prepareForSerialization, restoreDeserializedObject} from '@parcel/core';\n\nexport default class WebChild implements ChildImpl {\n  onMessage: MessageHandler;\n  onExit: ExitHandler;\n\n  constructor(onMessage: MessageHandler, onExit: ExitHandler) {\n    if (\n      !(\n        typeof WorkerGlobalScope !== 'undefined' &&\n        self instanceof WorkerGlobalScope\n      )\n    ) {\n      throw new Error('Only create WebChild instances in a worker!');\n    }\n\n    this.onMessage = onMessage;\n    this.onExit = onExit;\n    self.addEventListener('message', ({data}: MessageEvent) => {\n      if (data === 'stop') {\n        this.onExit(0);\n        self.postMessage('stopped');\n      }\n      // $FlowFixMe assume WorkerMessage as data\n      this.handleMessage(data);\n    });\n    self.postMessage('online');\n  }\n\n  handleMessage(data: WorkerMessage) {\n    this.onMessage(restoreDeserializedObject(data));\n  }\n\n  send(data: WorkerMessage) {\n    self.postMessage(prepareForSerialization(data));\n  }\n}\n\nsetChild(new Child(WebChild));\n"
  },
  {
    "path": "packages/core/workers/src/web/WebWorker.js",
    "content": "// @flow\n\nimport type {\n  WorkerImpl,\n  MessageHandler,\n  ErrorHandler,\n  ExitHandler,\n  WorkerMessage,\n} from '../types';\nimport {prepareForSerialization, restoreDeserializedObject} from '@parcel/core';\nimport {makeDeferredWithPromise} from '@parcel/utils';\n\nlet id = 0;\n\nexport default class WebWorker implements WorkerImpl {\n  execArgv: Object;\n  onMessage: MessageHandler;\n  onError: ErrorHandler;\n  onExit: ExitHandler;\n  worker: Worker;\n  stopping: ?Promise<void>;\n\n  constructor(\n    execArgv: Object,\n    onMessage: MessageHandler,\n    onError: ErrorHandler,\n    onExit: ExitHandler,\n  ) {\n    this.execArgv = execArgv;\n    this.onMessage = onMessage;\n    this.onError = onError;\n    this.onExit = onExit;\n  }\n\n  start(): Promise<void> {\n    // $FlowFixMe[incompatible-call]\n    this.worker = new Worker(new URL('./WebChild.js', import.meta.url), {\n      name: `Parcel Worker ${id++}`,\n      type: 'module',\n    });\n\n    let {deferred, promise} = makeDeferredWithPromise();\n\n    this.worker.onmessage = ({data}) => {\n      if (data === 'online') {\n        deferred.resolve();\n        return;\n      }\n\n      // $FlowFixMe assume WorkerMessage as data\n      this.handleMessage(data);\n    };\n    this.worker.onerror = this.onError;\n    // Web workers can't crash or intentionally stop on their own, apart from stop() below\n    // this.worker.on('exit', this.onExit);\n\n    return promise;\n  }\n\n  stop(): Promise<void> {\n    if (!this.stopping) {\n      this.stopping = (async () => {\n        this.worker.postMessage('stop');\n        let {deferred, promise} = makeDeferredWithPromise();\n        this.worker.addEventListener('message', ({data}: MessageEvent) => {\n          if (data === 'stopped') {\n            deferred.resolve();\n          }\n        });\n        await promise;\n        this.worker.terminate();\n        this.onExit(0);\n      })();\n    }\n    return this.stopping;\n  }\n\n  handleMessage(data: WorkerMessage) {\n    this.onMessage(restoreDeserializedObject(data));\n  }\n\n  send(data: WorkerMessage) {\n    this.worker.postMessage(prepareForSerialization(data));\n  }\n}\n"
  },
  {
    "path": "packages/core/workers/test/cpuCount.test.js",
    "content": "import assert from 'assert';\nimport os from 'os';\n\nimport getCores, {detectRealCores} from '../src/cpuCount';\n\ndescribe('cpuCount', function () {\n  it('Should be able to detect real cpu count', () => {\n    // Windows not supported as getting the cpu count takes a couple seconds...\n    if (os.platform() === 'win32') return;\n\n    let cores = detectRealCores();\n    assert(cores > 0);\n  });\n\n  it('getCores should return more than 0', () => {\n    let cores = getCores(true);\n    assert(cores > 0);\n  });\n});\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/console.js",
    "content": "const WorkerFarm = require('../../../src/WorkerFarm').default;\n\nfunction run() {\n  if (WorkerFarm.isWorker()) {\n    // Only test this behavior in workers. Logging in the main process will\n    // always work.\n    console.log('one');\n    console.info('two');\n    console.warn('three');\n    console.error('four');\n    console.debug('five');\n  }\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/echo.js",
    "content": "function run(_, data) {\n  return data;\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/ipc-pid.js",
    "content": "const WorkerFarm = require('../../../src/WorkerFarm').default;\n\nfunction run(api) {\n  let result = [process.pid];\n  return new Promise((resolve, reject) => {\n    api.callMaster({\n      location: require.resolve('./master-process-id.js'),\n      args: []\n    })\n      .then(pid => {\n        result.push(pid);\n        resolve(result);\n      })\n      .catch(reject);\n  });\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/ipc.js",
    "content": "const WorkerFarm = require('../../../src/WorkerFarm').default;\n\nfunction run(api, a, b) {\n  return api.callMaster({\n    location: require.resolve('./master-sum.js'),\n    args: [a, b]\n  });\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/logging.js",
    "content": "const WorkerFarm = require('../../../src/WorkerFarm').default;\nconst Logger = require('@parcel/logger').default;\n\nfunction run() {\n  if (WorkerFarm.isWorker()) {\n    // Only test this behavior in workers. Logging in the main process will\n    // always work.\n    Logger.info({\n      origin: 'logging-worker',\n      message: 'omg it works'\n    });\n    Logger.error({\n      origin: 'logging-worker',\n      message: 'errors objects dont work yet'\n    });\n  }\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/master-process-id.js",
    "content": "module.exports = function() {\n  return process.pid;\n};\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/master-sum.js",
    "content": "module.exports = function(a, b) {\n  return a + b;\n};\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/ping.js",
    "content": "function run() {\n  return 'pong';\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/resolve-shared-reference.js",
    "content": "function run(workerApi, ref) {\n  return ref === workerApi.resolveSharedReference(workerApi.getSharedReference(ref));\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/reverse-handle.js",
    "content": "function run(workerApi, handle) {\n  return workerApi.runHandle(handle, []);\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/workers/test/integration/workerfarm/shared-reference.js",
    "content": "function run(workerApi, ref) {\n  let sharedReference = workerApi.getSharedReference(ref);\n  return sharedReference || 'Shared reference does not exist';\n}\n\nexports.run = run;\n"
  },
  {
    "path": "packages/core/workers/test/workerfarm.js",
    "content": "import Logger from '@parcel/logger';\nimport assert from 'assert';\nimport WorkerFarm from '../src';\n\ndescribe('WorkerFarm', function () {\n  this.timeout(30000);\n\n  it('Should start up workers', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: false,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/ping.js'),\n    });\n\n    assert.equal(await workerfarm.run(), 'pong');\n\n    await workerfarm.end();\n  });\n\n  it('Should handle 1000 requests without any issue', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: false,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/echo.js'),\n    });\n\n    let promises = [];\n    for (let i = 0; i < 1000; i++) {\n      promises.push(workerfarm.run(i));\n    }\n    await Promise.all(promises);\n\n    await workerfarm.end();\n  });\n\n  it('Should warm up workers', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: true,\n      workerPath: require.resolve('./integration/workerfarm/echo.js'),\n    });\n\n    for (let i = 0; i < 100; i++) {\n      assert.equal(await workerfarm.run(i), i);\n    }\n\n    await new Promise(resolve => workerfarm.once('warmedup', resolve));\n\n    assert(workerfarm.workers.size > 0, 'Should have spawned workers.');\n    assert(\n      workerfarm.warmWorkers >= workerfarm.workers.size,\n      'Should have warmed up workers.',\n    );\n\n    await workerfarm.end();\n  });\n\n  it('Should use the local worker', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: true,\n      workerPath: require.resolve('./integration/workerfarm/echo.js'),\n    });\n\n    assert.equal(await workerfarm.run('hello world'), 'hello world');\n    assert.equal(workerfarm.shouldUseRemoteWorkers(), false);\n\n    await workerfarm.end();\n  });\n\n  it('Should be able to use bi-directional communication', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: false,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/ipc.js'),\n    });\n\n    assert.equal(await workerfarm.run(1, 2), 3);\n\n    await workerfarm.end();\n  });\n\n  it('Should be able to handle 1000 bi-directional calls', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: false,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/ipc.js'),\n    });\n\n    for (let i = 0; i < 1000; i++) {\n      assert.equal(await workerfarm.run(1 + i, 2), 3 + i);\n    }\n\n    await workerfarm.end();\n  });\n\n  it.skip('Bi-directional call should return masters pid', async () => {\n    // TODO: this test is only good for processes not threads\n    let workerfarm = new WorkerFarm({\n      warmWorkers: false,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/ipc-pid.js'),\n    });\n\n    let result = await workerfarm.run();\n    assert.equal(result.length, 2);\n    assert.equal(result[1], process.pid);\n    assert.notEqual(result[0], process.pid);\n\n    await workerfarm.end();\n  });\n\n  it('Should handle 10 big concurrent requests without any issue', async () => {\n    // This emulates the node.js ipc bug for win32\n    let workerfarm = new WorkerFarm({\n      warmWorkers: false,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/echo.js'),\n    });\n\n    let bigData = [];\n    for (let i = 0; i < 10000; i++) {\n      bigData.push('This is some big data');\n    }\n\n    let promises = [];\n    for (let i = 0; i < 10; i++) {\n      promises.push(workerfarm.run(bigData));\n    }\n    await Promise.all(promises);\n\n    await workerfarm.end();\n  });\n\n  it('Forwards stdio from the child process and levels event source if shouldPatchConsole is true', async () => {\n    let events = [];\n    let logDisposable = Logger.onLog(event => events.push(event));\n\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/console.js'),\n      shouldPatchConsole: true,\n    });\n\n    await workerfarm.run();\n\n    assert.deepEqual(events, [\n      {\n        level: 'info',\n        type: 'log',\n        diagnostics: [\n          {\n            origin: 'console',\n            message: 'one',\n            skipFormatting: true,\n          },\n        ],\n      },\n      {\n        level: 'info',\n        type: 'log',\n        diagnostics: [\n          {\n            origin: 'console',\n            message: 'two',\n            skipFormatting: true,\n          },\n        ],\n      },\n      {\n        level: 'warn',\n        type: 'log',\n        diagnostics: [\n          {\n            origin: 'console',\n            message: 'three',\n            skipFormatting: true,\n          },\n        ],\n      },\n      {\n        level: 'error',\n        type: 'log',\n        diagnostics: [\n          {\n            origin: 'console',\n            message: 'four',\n            skipFormatting: true,\n          },\n        ],\n      },\n      {\n        level: 'verbose',\n        type: 'log',\n        diagnostics: [\n          {\n            message: 'five',\n            origin: 'console',\n            skipFormatting: true,\n          },\n        ],\n      },\n    ]);\n\n    logDisposable.dispose();\n    await workerfarm.end();\n  });\n\n  it('Forwards logger events to the main process', async () => {\n    let events = [];\n    let logDisposable = Logger.onLog(event => events.push(event));\n\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/logging.js'),\n    });\n\n    await workerfarm.run();\n\n    // assert.equal(events.length, 2);\n    assert.deepEqual(events, [\n      {\n        level: 'info',\n        diagnostics: [\n          {\n            origin: 'logging-worker',\n            message: 'omg it works',\n          },\n        ],\n        type: 'log',\n      },\n      {\n        level: 'error',\n        diagnostics: [\n          {\n            origin: 'logging-worker',\n            message: 'errors objects dont work yet',\n          },\n        ],\n        type: 'log',\n      },\n    ]);\n\n    logDisposable.dispose();\n    await workerfarm.end();\n  });\n\n  it('Should support reverse handle functions in main process that can be called in workers', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/reverse-handle.js'),\n    });\n\n    let handle = workerfarm.createReverseHandle(() => 42);\n    let result = await workerfarm.run(handle);\n    assert.equal(result, 42);\n    await workerfarm.end();\n  });\n\n  it('Should dispose of handle objects when ending', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/reverse-handle.js'),\n    });\n\n    workerfarm.createReverseHandle(() => 42);\n    assert.equal(workerfarm.handles.size, 1);\n    await workerfarm.end();\n    assert.equal(workerfarm.handles.size, 0);\n  });\n\n  it('Should support shared references in workers', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: false,\n      workerPath: require.resolve(\n        './integration/workerfarm/shared-reference.js',\n      ),\n    });\n\n    let sharedValue = 'Something to be shared';\n    let {ref, dispose} = await workerfarm.createSharedReference(sharedValue);\n    let result = await workerfarm.run(ref);\n    assert.equal(result, 'Something to be shared');\n    await dispose();\n    result = await workerfarm.run(ref);\n    assert.equal(result, 'Shared reference does not exist');\n  });\n\n  it('Should resolve shared references in workers', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: false,\n      workerPath: require.resolve(\n        './integration/workerfarm/resolve-shared-reference.js',\n      ),\n    });\n\n    let sharedValue = 'Something to be shared';\n    let {ref, dispose} = await workerfarm.createSharedReference(sharedValue);\n\n    assert.equal(workerfarm.workerApi.resolveSharedReference(sharedValue), ref);\n    assert.ok(await workerfarm.run(ref));\n\n    await dispose();\n    assert(workerfarm.workerApi.resolveSharedReference(sharedValue) == null);\n  });\n\n  it('Should support shared references in local worker', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: true,\n      workerPath: require.resolve(\n        './integration/workerfarm/shared-reference.js',\n      ),\n    });\n\n    let sharedValue = 'Something to be shared';\n    let {ref, dispose} = await workerfarm.createSharedReference(sharedValue);\n    let result = await workerfarm.run(ref);\n    assert.equal(result, 'Something to be shared');\n    await dispose();\n    result = await workerfarm.run(ref);\n    assert.equal(result, 'Shared reference does not exist');\n  });\n\n  it('should resolve shared references in local worker', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: true,\n      workerPath: require.resolve(\n        './integration/workerfarm/resolve-shared-reference.js',\n      ),\n    });\n\n    let sharedValue = 'Something to be shared';\n    let {ref, dispose} = await workerfarm.createSharedReference(sharedValue);\n\n    assert.equal(workerfarm.workerApi.resolveSharedReference(sharedValue), ref);\n    assert.ok(await workerfarm.run(ref));\n\n    await dispose();\n    assert(workerfarm.workerApi.resolveSharedReference(sharedValue) == null);\n  });\n\n  it('Should dispose of shared references when ending', async () => {\n    let workerfarm = new WorkerFarm({\n      warmWorkers: true,\n      useLocalWorker: false,\n      workerPath: require.resolve('./integration/workerfarm/reverse-handle.js'),\n    });\n\n    workerfarm.createSharedReference('Something to be shared');\n    assert.equal(workerfarm.sharedReferences.size, 1);\n    await workerfarm.end();\n    assert.equal(workerfarm.sharedReferences.size, 0);\n  });\n});\n"
  },
  {
    "path": "packages/dev/babel-preset/index.js",
    "content": "module.exports = api => {\n  let name = api.caller(caller => caller && caller.name);\n  if (name === 'parcel') {\n    return {\n      presets: [require('@babel/preset-flow')],\n      plugins: [\n        // Inline the value of PARCEL_BUILD_ENV during self builds.\n        // Parcel does not do this itself for node targets...\n        [\n          'babel-plugin-transform-inline-environment-variables',\n          {include: ['PARCEL_BUILD_ENV']},\n        ],\n        'babel-plugin-minify-dead-code-elimination',\n      ],\n    };\n  }\n\n  return {\n    presets: [\n      [\n        require('@babel/preset-env'),\n        {\n          modules: false,\n          targets: {\n            node: 16,\n          },\n        },\n      ],\n      [\n        require('@babel/preset-react'),\n        {\n          runtime: 'automatic',\n        },\n      ],\n      require('@babel/preset-flow'),\n    ],\n    plugins: [\n      [\n        require('@babel/plugin-transform-modules-commonjs'),\n        {\n          lazy: true,\n        },\n      ],\n    ],\n    env: {\n      production: {\n        plugins: [\n          // Inline the value of PARCEL_BUILD_ENV during production builds so that\n          // it can be removed through dead code elimination below\n          [\n            'babel-plugin-transform-inline-environment-variables',\n            {\n              include: [\n                'PARCEL_BUILD_ENV',\n                'SKIP_PLUGIN_COMPATIBILITY_CHECK',\n                // Eliminate the PARCEL_SELF_BUILD environment variable to get\n                //  rid of @babel/register in bin.js, when compiling with gulp.\n                ...(!process.env.PARCEL_SELF_BUILD\n                  ? ['PARCEL_SELF_BUILD']\n                  : []),\n              ],\n            },\n          ],\n          'babel-plugin-minify-dead-code-elimination',\n        ],\n      },\n    },\n  };\n};\n"
  },
  {
    "path": "packages/dev/babel-preset/package.json",
    "content": "{\n  \"name\": \"@parcel/babel-preset\",\n  \"version\": \"2.16.4\",\n  \"private\": true,\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\",\n    \"directory\": \"packages/dev/babel-preset\"\n  },\n  \"dependencies\": {\n    \"@babel/plugin-transform-modules-commonjs\": \"^7.22.11\",\n    \"@babel/preset-env\": \"^7.22.14\",\n    \"@babel/preset-flow\": \"^7.22.5\",\n    \"@babel/preset-react\": \"^7.22.5\",\n    \"babel-plugin-minify-dead-code-elimination\": \"^0.5.2\",\n    \"babel-plugin-transform-inline-environment-variables\": \"^0.4.4\",\n    \"read-pkg-up\": \"^4.0.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/babel-register/babel-plugin-module-translate.js",
    "content": "const resolve = require('resolve');\nconst path = require('path');\n\nfunction resolveSource(specifier, from) {\n  return resolve.sync(specifier, {\n    basedir: path.dirname(from),\n    packageFilter(pkg) {\n      if (pkg.name.startsWith('@parcel/') && pkg.name !== '@parcel/watcher') {\n        if (pkg.source) {\n          pkg.main = pkg.source;\n        }\n        if (pkg.exports?.source) {\n          pkg.main = pkg.exports.source;\n        }\n      }\n      return pkg;\n    },\n  });\n}\n\nlet sourceFieldCache = new Map();\nfunction getSourceField(specifier, from) {\n  let key = `${specifier}:${from}`;\n  if (sourceFieldCache.has(key)) {\n    return sourceFieldCache.get(key);\n  }\n\n  let result = resolveSource(specifier, from);\n  sourceFieldCache.set(key, result);\n  return result;\n}\n\nmodule.exports = ({types: t}) => ({\n  name: 'module-translate',\n  visitor: {\n    ImportDeclaration({node}, state) {\n      let source = node.source;\n      if (t.isStringLiteral(source) && source.value.startsWith('@parcel/')) {\n        source.value = getSourceField(\n          source.value,\n          state.file.opts.filename || process.cwd(),\n        );\n      }\n    },\n    CallExpression(path, state) {\n      let {node} = path;\n      if (\n        t.isIdentifier(node.callee, {name: 'require'}) &&\n        !path.scope.hasBinding(node.callee.value) &&\n        node.arguments.length === 1 &&\n        t.isStringLiteral(node.arguments[0]) &&\n        node.arguments[0].value.startsWith('@parcel/')\n      ) {\n        try {\n          node.arguments[0].value = getSourceField(\n            node.arguments[0].value,\n            state.file.opts.filename || process.cwd(),\n          );\n        } catch (e) {\n          let exprStmtParent = path\n            .getAncestry()\n            .find(v => v.isExpressionStatement());\n          if (exprStmtParent) {\n            exprStmtParent.replaceWith(\n              t.throwStatement(t.stringLiteral(e.message)),\n            );\n          }\n        }\n      }\n    },\n  },\n});\n\nmodule.exports.resolveSource = resolveSource;\n"
  },
  {
    "path": "packages/dev/babel-register/index.js",
    "content": "const parcelBabelPreset = require('@parcel/babel-preset');\nconst path = require('path');\n\nrequire('@babel/register')({\n  cwd: path.join(__dirname, '../../..'),\n  ignore: [\n    filepath => filepath.includes(path.sep + 'node_modules' + path.sep),\n    // Don't run babel over ignore integration tests fixtures.\n    // These may include relative babel plugins, and running babel on those causes\n    // the plugin to be loaded to compile the plugin.\n    path.resolve(__dirname, '../../core/integration-tests/test/integration'),\n  ],\n  only: [path.join(__dirname, '../../..')],\n  presets: [parcelBabelPreset],\n  plugins: [require('./babel-plugin-module-translate')],\n});\n\n// This adds the registration to the Node args, which are passed\n// to child processes by Node when we fork to create workers.\nprocess.execArgv.push('-r', __filename);\n"
  },
  {
    "path": "packages/dev/babel-register/package.json",
    "content": "{\n  \"name\": \"@parcel/babel-register\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"dependencies\": {\n    \"@babel/register\": \"^7.22.5\",\n    \"@parcel/babel-preset\": \"2.16.4\",\n    \"resolve\": \"^1.22.10\"\n  },\n  \"peerDependencies\": {\n    \"@babel/core\": \"^7.22.11\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/bundle-stats-cli/README.md",
    "content": "# bundle-stats-cli\n\n- Run `yarn link` in `packages/dev/bundle-stats-cli`\n- Run `parcel-bundle-stats` in the project root, a `parcel-bundle-reports` directory will be created with the stats file inside\n"
  },
  {
    "path": "packages/dev/bundle-stats-cli/package.json",
    "content": "{\n  \"name\": \"@parcel/bundle-stats\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/cli.js\",\n  \"source\": \"src/cli.js\",\n  \"bin\": {\n    \"parcel-bundle-stats\": \"src/bin.js\"\n  },\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/query\": \"2.16.4\",\n    \"@parcel/reporter-bundle-stats\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"commander\": \"^12.1.0\"\n  },\n  \"devDependencies\": {\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/bundle-stats-cli/src/bin.js",
    "content": "#! /usr/bin/env node\n\n'use strict';\n\nif (\n  process.env.PARCEL_BUILD_ENV !== 'production' ||\n  process.env.PARCEL_SELF_BUILD\n) {\n  require('@parcel/babel-register');\n}\n\nconst cli = require('./cli');\n\ncli.command.parse();\n"
  },
  {
    "path": "packages/dev/bundle-stats-cli/src/cli.js",
    "content": "/* eslint-disable no-console, monorepo/no-internal-import */\n// @flow strict-local\nimport type {PackagedBundle} from '@parcel/types';\nimport type {ParcelOptions} from '@parcel/core/src/types';\nimport type {commander$Command} from 'commander';\n\n// $FlowFixMe[untyped-import]\nimport {version} from '../package.json';\n\nimport commander from 'commander';\nimport fs from 'fs';\nimport path from 'path';\nimport {DefaultMap} from '@parcel/utils';\n\nconst {\n  loadGraphs,\n  getBundleStats,\n  PackagedBundleClass,\n} = require('./deep-imports.js');\n\nasync function run({cacheDir, outDir}) {\n  // 1. load bundle graph and info via parcel~query\n  let {bundleGraph, bundleInfo} = await loadGraphs(cacheDir);\n\n  if (bundleGraph == null) {\n    console.error('Bundle Graph could not be found');\n    process.exit(1);\n    throw new Error();\n  }\n\n  if (bundleInfo == null) {\n    console.error('Bundle Info could not be found');\n    process.exit(1);\n    throw new Error();\n  }\n\n  // 2. generate stats files for each target\n  fs.mkdirSync(outDir, {recursive: true});\n\n  let projectRoot = process.cwd();\n\n  // $FlowFixMe[unclear-type]\n  let parcelOptions: ParcelOptions = ({projectRoot}: any);\n\n  let bundlesByTarget: DefaultMap<\n    string /* target name */,\n    Array<PackagedBundle>,\n  > = new DefaultMap(() => []);\n  for (let bundle of bundleGraph.getBundles()) {\n    bundlesByTarget\n      .get(bundle.target.name)\n      .push(\n        PackagedBundleClass.getWithInfo(\n          bundle,\n          bundleGraph,\n          parcelOptions,\n          bundleInfo.get(bundle.id),\n        ),\n      );\n  }\n\n  for (let [targetName, bundles] of bundlesByTarget) {\n    fs.writeFileSync(\n      path.join(outDir, `${targetName}-stats.json`),\n      JSON.stringify(getBundleStats(bundles, parcelOptions), null, 2),\n    );\n  }\n}\n\nexport const command: commander$Command = new commander.Command()\n  .version(version, '-V, --version')\n  .description('Generate a stats report for a Parcel build')\n  .option('-v, --verbose', 'Print verbose output')\n  .option(\n    '-c, --cache-dir <path>',\n    'Directory to the parcel cache',\n    '.parcel-cache',\n  )\n  .option(\n    '-o, --out-dir <path>',\n    'Directory to write the stats to',\n    'parcel-bundle-reports',\n  )\n  .action(run);\n"
  },
  {
    "path": "packages/dev/bundle-stats-cli/src/deep-imports.js",
    "content": "// @flow\n/* eslint-disable monorepo/no-internal-import */\nimport typeof {loadGraphs} from '@parcel/query/src/index.js';\nimport typeof {getBundleStats} from '@parcel/reporter-bundle-stats/src/BundleStatsReporter';\nimport typeof {PackagedBundle as PackagedBundleClass} from '@parcel/core/src/public/Bundle';\n\nmodule.exports = ((process.env.PARCEL_BUILD_ENV === 'production'\n  ? {\n      // Split up require specifier to outsmart packages/dev/babel-register/babel-plugin-module-translate.js\n      // $FlowFixMe(unsupported-syntax)\n      loadGraphs: require('@parcel/query' + '/lib/index.js').loadGraphs,\n      // $FlowFixMe(unsupported-syntax)\n      getBundleStats: require('@parcel/reporter-bundle-stats' +\n        '/lib/BundleStatsReporter.js').getBundleStats,\n      // $FlowFixMe(unsupported-syntax)\n      PackagedBundleClass: require('@parcel/core' + '/lib/public/Bundle.js')\n        .PackagedBundle,\n    }\n  : {\n      loadGraphs: require('@parcel/query/src/index.js').loadGraphs,\n      getBundleStats:\n        require('@parcel/reporter-bundle-stats/src/BundleStatsReporter.js')\n          .getBundleStats,\n      PackagedBundleClass: require('@parcel/core/src/public/Bundle.js')\n        .PackagedBundle,\n    }): {|\n  loadGraphs: loadGraphs,\n  getBundleStats: getBundleStats,\n  PackagedBundleClass: PackagedBundleClass,\n|});\n"
  },
  {
    "path": "packages/dev/eslint-config/index.js",
    "content": "module.exports = {\n  extends: [\n    'eslint:recommended',\n    'plugin:flowtype/recommended',\n    'plugin:monorepo/recommended',\n    'plugin:react/recommended',\n    'prettier',\n  ],\n  parser: '@babel/eslint-parser',\n  plugins: ['@parcel', 'flowtype', 'import', 'monorepo', 'react', 'mocha'],\n  parserOptions: {\n    ecmaVersion: 2018,\n    ecmaFeatures: {\n      jsx: true,\n    },\n    sourceType: 'module',\n  },\n  env: {\n    es2020: true,\n    node: true,\n  },\n  globals: {\n    parcelRequire: true,\n    define: true,\n    SharedArrayBuffer: true,\n  },\n  // https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns\n  overrides: [\n    {\n      files: ['**/test/**', '*.test.js', 'packages/core/integration-tests/**'],\n      env: {\n        mocha: true,\n      },\n      rules: {\n        'import/no-extraneous-dependencies': 'off',\n        'monorepo/no-internal-import': 'off',\n        'monorepo/no-relative-import': 'off',\n        'mocha/no-exclusive-tests': 'error',\n      },\n    },\n  ],\n  rules: {\n    '@parcel/no-self-package-imports': 'error',\n    'import/first': 'error',\n    'import/newline-after-import': 'error',\n    'import/no-extraneous-dependencies': 'error',\n    'import/no-self-import': 'error',\n    'no-prototype-builtins': 'off',\n    'no-console': 'error',\n    'no-return-await': 'error',\n    'require-atomic-updates': 'off',\n    'require-await': 'error',\n  },\n  settings: {\n    flowtype: {\n      onlyFilesWithFlowAnnotation: true,\n    },\n    react: {\n      version: 'detect',\n    },\n  },\n};\n"
  },
  {
    "path": "packages/dev/eslint-config/package.json",
    "content": "{\n  \"name\": \"@parcel/eslint-config\",\n  \"private\": true,\n  \"version\": \"2.16.4\",\n  \"dependencies\": {\n    \"@babel/eslint-parser\": \"^7.22.11\",\n    \"@babel/plugin-syntax-flow\": \"^7.14.5\",\n    \"@babel/plugin-transform-react-jsx\": \"^7.14.9\",\n    \"@parcel/eslint-plugin\": \"2.16.4\",\n    \"eslint-config-prettier\": \"^8.10.0\",\n    \"eslint-plugin-flowtype\": \"^8.0.3\",\n    \"eslint-plugin-import\": \"^2.31.0\",\n    \"eslint-plugin-mocha\": \"^8.2.0\",\n    \"eslint-plugin-monorepo\": \"^0.3.2\",\n    \"eslint-plugin-react\": \"^7.37.5\"\n  },\n  \"peerDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"eslint\": \">= 7.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/eslint-config-browser/index.js",
    "content": "module.exports = {\n  extends: '@parcel/eslint-config',\n  parser: '@babel/eslint-parser',\n  parserOptions: {\n    ecmaVersion: 5,\n  },\n  env: {\n    browser: true,\n  },\n  rules: {\n    'no-console': 'off',\n    'no-global-assign': 'warn',\n    'no-unused-vars': 'off',\n  },\n};\n"
  },
  {
    "path": "packages/dev/eslint-config-browser/package.json",
    "content": "{\n  \"name\": \"@parcel/eslint-config-browser\",\n  \"private\": true,\n  \"version\": \"2.16.4\",\n  \"dependencies\": {\n    \"@parcel/eslint-config\": \"2.16.4\"\n  },\n  \"peerDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"eslint\": \">= 7.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/eslint-plugin/index.js",
    "content": "'use strict';\n\nmodule.exports = {\n  rules: {\n    'no-self-package-imports': require('./src/rules/no-self-package-imports'),\n  },\n};\n"
  },
  {
    "path": "packages/dev/eslint-plugin/package.json",
    "content": "{\n  \"name\": \"@parcel/eslint-plugin\",\n  \"private\": true,\n  \"version\": \"2.16.4\",\n  \"main\": \"index.js\",\n  \"dependencies\": {\n    \"read-pkg-up\": \"^5.0.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@babel/eslint-parser\": \"^7.22.11\",\n    \"eslint\": \"^8.57.1\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/eslint-plugin/src/rules/no-self-package-imports.js",
    "content": "/*\n * Prevents requiring/importing modules by package name within the same package.\n * e.g. `require('@parcel/core/foo')` while in `@parcel/core/bar` should be\n *       `require('./foo')`.\n *\n * This can easily happen accidentally while refactoring across the monorepo.\n * Since yarn links all modules in its root `node_modules`, these requires\n * resolve fine in the monorepo, but they'll break in published modules.\n *\n * Supports `require` and `require.resolve` calls as well as `import` declarations.\n *\n * See no-restricted-modules for a similar rule:\n * https://github.com/eslint/eslint/blob/ded2f94758545c7f895f5f848a805b420f41f415/lib/rules/no-restricted-modules.js\n */\n\n'use strict';\n\nconst path = require('path');\nconst readPkgUp = require('read-pkg-up');\nconst {\n  getRequiredPath,\n  isStaticRequireOrResolve,\n  relativePathForRequire,\n} = require('../utils');\n\nconst message =\n  'Do not require a module by package name within the same package.';\n\nmodule.exports = {\n  meta: {\n    description:\n      'Forbid importing modules from own package given own package name',\n    fixable: 'code',\n  },\n  create(context) {\n    let filename = context.getFilename();\n    if (!path.isAbsolute(filename)) {\n      // eslint gives the strings '<input>' and '<text>' in tests without\n      // explicit filenames and stdin, respectively. Otherwise, it gives an\n      // absolute path.\n      return;\n    }\n\n    let pkgInfo = readPkgUp.sync({cwd: filename});\n    let pkgPath = pkgInfo.path;\n    let pkgName = pkgInfo.pkg.name;\n    if (!pkgName) {\n      return;\n    }\n\n    return {\n      CallExpression(node) {\n        if (\n          isStaticRequireOrResolve(node) &&\n          isSelfImport(pkgName, getRequiredPath(node))\n        ) {\n          context.report({\n            node,\n            message,\n            fix(fixer) {\n              return fixer.replaceText(\n                node.arguments[0],\n                quote(\n                  relativePathForRequire({\n                    origin: filename,\n                    request: getRequiredPath(node),\n                    pkgName,\n                    pkgPath,\n                  }),\n                ),\n              );\n            },\n          });\n        }\n      },\n      ImportDeclaration(node) {\n        let request = node.source.value.trim();\n        if (isSelfImport(pkgName, request)) {\n          context.report({\n            node,\n            message,\n            fix(fixer) {\n              return fixer.replaceText(\n                node.source,\n                quote(\n                  relativePathForRequire({\n                    origin: filename,\n                    request,\n                    pkgName,\n                    pkgPath,\n                  }),\n                ),\n              );\n            },\n          });\n        }\n      },\n    };\n  },\n};\n\nfunction quote(str) {\n  return \"'\" + str + \"'\";\n}\n\nfunction isSelfImport(packageName, descriptor) {\n  return descriptor === packageName || descriptor.startsWith(packageName + '/');\n}\n"
  },
  {
    "path": "packages/dev/eslint-plugin/src/utils.js",
    "content": "'use strict';\n\nconst path = require('path');\n\nfunction isStaticRequireOrResolve(node) {\n  return isStaticRequire(node) || isStaticResolve(node);\n}\n\n/*\n * Detects whether a node is a call expression matching `require('foo')`,\n * `require.resolve('foo')`, etc.\n *\n * `isStaticRequire` and `isStaticResolve` each combine checks from the following\n *   examples, aiming for strictness without redundant checks:\n * https://github.com/parcel-bundler/parcel/blob/7a540fc4cc2511f749f3a687ce342000953cfcec/packages/core/parcel-bundler/src/visitors/dependencies.js#L37\n * https://github.com/benmosher/eslint-plugin-import/blob/3b04d5fab6c095e7f0f99488665d90e285872271/src/core/staticRequire.js#L2\n * https://github.com/facebookarchive/nuclide/blob/2a2a0a642d136768b7d2a6d35a652dc5fb77d70a/modules/eslint-plugin-nuclide-internal/utils.js#L46\n * https://github.com/eslint/eslint/blob/ded2f94758545c7f895f5f848a805b420f41f415/lib/rules/no-restricted-modules.js#L118\n */\nfunction isStaticRequire(node) {\n  return (\n    node.type === 'CallExpression' &&\n    node.callee.type === 'Identifier' &&\n    node.callee.name === 'require' &&\n    node.arguments.length === 1 &&\n    node.arguments[0].type === 'Literal' // don't analyze dynamic requires\n  );\n}\n\nfunction isStaticResolve(node) {\n  if (node.type !== 'CallExpression') {\n    return false;\n  }\n\n  let callee = node.callee;\n  return (\n    callee.type === 'MemberExpression' &&\n    callee.object.name === 'require' &&\n    callee.property.name === 'resolve' &&\n    node.arguments.length === 1 &&\n    node.arguments[0].type === 'Literal'\n  );\n}\n\nfunction getRequiredPath(node) {\n  return (\n    node.arguments &&\n    node.arguments[0] &&\n    typeof node.arguments[0].value === 'string' &&\n    node.arguments[0].value.trim()\n  );\n}\n\n/**\n * Like path.relative, but for determining relative path between a filepath and\n * a module it requests in a `require`.\n * @param {Object} opts\n * @param {string} opts.origin - Originating file. Must be an absolute path.\n * @param {string} opts.request - Requested module in the require. e.g. @parcel/core\n * @param {string} opts.pkgName - name of the package in the package json\n * @param {string} opts.pkgPath - path to the package.json\n */\nfunction relativePathForRequire({origin, request, pkgName, pkgPath}) {\n  if (!path.isAbsolute(origin)) {\n    throw new TypeError('`origin` must be an absolute path');\n  }\n\n  if (path.isAbsolute(request)) {\n    return request;\n  }\n\n  const pkgRoot = path.dirname(pkgPath);\n  let relative = path\n    .relative(\n      path.dirname(origin),\n      request.replace(new RegExp('^' + pkgName), pkgRoot),\n    )\n    // `require` expects unix-style '/' separators, but `path.relative` will respect\n    // `path.sep`.\n    .split(path.sep)\n    .join('/');\n\n  // prefer `require('../')` over `require('..')`\n  // match '..', '../..', but not 'foo..'\n  if (relative.match(/(?:^|\\/)\\.\\.$/)) {\n    relative += '/';\n  }\n\n  if (!relative.startsWith('.')) {\n    // peer files must lead with ./\n    relative = './' + relative;\n  }\n\n  return relative;\n}\n\nmodule.exports = {\n  getRequiredPath,\n  isStaticRequire,\n  isStaticRequireOrResolve,\n  isStaticResolve,\n  relativePathForRequire,\n};\n"
  },
  {
    "path": "packages/dev/eslint-plugin/test/rules/no-self-package-imports.test.js",
    "content": "'use strict';\n\nconst {RuleTester} = require('eslint');\nconst rule = require('../../src/rules/no-self-package-imports');\n\nconst message =\n  'Do not require a module by package name within the same package.';\n\nconst filename = __filename;\n\nnew RuleTester({\n  parser: require.resolve('@babel/eslint-parser'),\n  parserOptions: {ecmaVersion: 2018, sourceType: 'module'},\n}).run('no-self-package-imports', rule, {\n  valid: [\n    {code: \"require('path');\", filename},\n    {code: \"require('@parcel/logger');\", filename},\n    {code: \"require.resolve('@parcel/logger');\", filename},\n    {code: \"import logger from '@parcel/logger';\", filename},\n  ],\n  invalid: [\n    {\n      code: \"require('@parcel/eslint-plugin/lib/rules/no-self-package-imports');\",\n      errors: [{message}],\n      filename,\n      output: \"require('../../lib/rules/no-self-package-imports');\",\n    },\n    {\n      code: \"require('@parcel/eslint-plugin');\",\n      filename,\n      errors: [{message}],\n      output: \"require('../../');\",\n    },\n    {\n      code: \"require.resolve('@parcel/eslint-plugin/lib/rules/no-self-package-imports');\",\n      filename,\n      errors: [{message}],\n      output: \"require.resolve('../../lib/rules/no-self-package-imports');\",\n    },\n    {\n      code: \"import rule from '@parcel/eslint-plugin';\",\n      filename,\n      errors: [{message}],\n      output: \"import rule from '../../';\",\n    },\n    {\n      code: \"import rule from '@parcel/eslint-plugin/lib/rules/no-self-package-imports';\",\n      filename,\n      errors: [{message}],\n      output: \"import rule from '../../lib/rules/no-self-package-imports';\",\n    },\n  ],\n});\n"
  },
  {
    "path": "packages/dev/eslint-plugin/test/utils.test.js",
    "content": "'use strict';\n\nconst assert = require('assert');\nconst path = require('path');\nconst {parse} = require('@babel/eslint-parser');\nconst readPkgUp = require('read-pkg-up');\n\nconst {\n  isStaticRequire,\n  isStaticResolve,\n  relativePathForRequire,\n} = require('../src/utils');\n\nconst pkgInfo = readPkgUp.sync({cwd: __dirname});\nconst pkgPath = pkgInfo.path;\nconst pkgName = pkgInfo.pkg.name;\n\ndescribe('utils', () => {\n  describe('isRequire', () => {\n    it('identifies requires', () => {\n      assert.equal(\n        isStaticRequire(getFirstExpression(parse(\"require('@parcel/core')\"))),\n        true,\n      );\n    });\n\n    it(\"doesn't handle dynamic requires\", () => {\n      assert.equal(\n        isStaticRequire(getFirstExpression(parse('require(dynamic)'))),\n        false,\n      );\n    });\n  });\n\n  describe('isResolve', () => {\n    it('identifies built-in require.resolve', () => {\n      assert.equal(\n        isStaticResolve(\n          getFirstExpression(parse(\"require.resolve('@parcel/core')\")),\n        ),\n        true,\n      );\n    });\n  });\n\n  describe('relativePathForRequire', () => {\n    it('behaves identically as path.relative on unix', () => {\n      let sep = path.sep;\n      path.sep = '/';\n      assert.equal(\n        relativePathForRequire({\n          origin: __filename,\n          request: '@parcel/eslint-plugin/',\n          pkgName,\n          pkgPath,\n        }),\n        '../',\n      );\n      path.sep = sep;\n    });\n\n    it('uses / to separate paths even when path.sep is not /', () => {\n      let sep = path.sep;\n      path.sep = '\\\\';\n      assert.equal(\n        relativePathForRequire({\n          origin: __filename,\n          request: '@parcel/eslint-plugin/',\n          pkgName,\n          pkgPath,\n        }),\n        '../',\n      );\n      path.sep = sep;\n    });\n\n    it('leaves absolute paths alone', () => {\n      assert.equal(\n        relativePathForRequire({\n          origin: __filename,\n          request: '/a/b',\n          pkgName,\n          pkgPath,\n        }),\n        '/a/b',\n      );\n    });\n\n    it('prepends ./ to peer paths', () => {\n      assert.equal(\n        relativePathForRequire({\n          origin: __filename,\n          request: '@parcel/eslint-plugin/test/baz',\n          pkgName,\n          pkgPath,\n        }),\n        './baz',\n      );\n    });\n  });\n});\n\nfunction getFirstExpression(program) {\n  return program.body[0].expression;\n}\n"
  },
  {
    "path": "packages/dev/esm-fuzzer/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config\",\n  \"rules\": {\n    \"no-console\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/esm-fuzzer/config.json",
    "content": "{\n  \"bundler\": \"@parcel/bundler-default\",\n  \"transformers\": {\n    \"*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}\": [\"@parcel/transformer-js\"]\n  },\n  \"namers\": [\"@parcel/namer-default\"],\n  \"runtimes\": [\"@parcel/runtime-js\"],\n  \"optimizers\": {},\n  \"packagers\": {\n    \"*.js\": \"@parcel/packager-js\"\n  },\n  \"resolvers\": [\"@parcel/resolver-default\"],\n  \"reporters\": [\n    // \"@parcel/reporter-cli\"\n  ]\n}\n"
  },
  {
    "path": "packages/dev/esm-fuzzer/generateExample.js",
    "content": "// @flow strict-local\nconst invariant = require('assert');\nconst nullthrows = require('nullthrows');\nconst t = require('@babel/types');\nconst template = require('@babel/template');\nconst {default: generate} = require('@babel/generator');\n// $FlowFixMe\nconst {nanoid} = require('nanoid');\n\n/*::\nimport type {Template} from '@babel/template';\nimport type {\n  Identifier,\n  Expression,\n  StringLiteral,\n  Statement,\n} from '@babel/types';\n\ntype Templates = {|\n  IMPORT_NAMED: Template<\n    {|local: Identifier, name: Identifier, source: StringLiteral|},\n    Statement,\n  >,\n  IMPORT_NAMESPACE: Template<\n    {|local: Identifier, source: StringLiteral|},\n    Statement,\n  >,\n  EXPORT_CONST: Template<{|name: Identifier, value: Expression|}, Statement>,\n  EXPORT_NAMED: Template<{|local: Identifier, name: Identifier|}, Statement>,\n  CONST: Template<{|name: Identifier, value: Expression|}, Statement>,\n  REEXPORT_NAMED: Template<\n    {|local: Identifier, name: Identifier, source: StringLiteral|},\n    Statement,\n  >,\n  REEXPORT_NAMESPACE: Template<{|source: StringLiteral|}, Statement>,\n  REEXPORT_NAMESPACE_AS: Template<\n    {|name: Identifier, source: StringLiteral|},\n    Statement,\n  >,\n|};\n\ntype ModuleImportSymbol = {|\n  from: number,\n  symbol: string,\n  as: string,\n|};\ntype ModuleExportSymbol = {|\n  from?: ?number,\n  symbol: string,\n  as: string,\n|};\n\ntype Module = {|\n  type: 'mjs', // | 'cjs',\n  imported: Array<ModuleImportSymbol>,\n  exported: Array<ModuleExportSymbol>,\n|};\n\ntype State = {|\n  modules: {|\n    [number]: Module,\n  |},\n  entries: Array<number>,\n  noSideEffects: Array<number>\n|};\n\ntype Fixture = {|\n  files: {|[string]: string|},\n  entries: Array<string>,\n|};\n*/\n\nconst TEMPLATES /*: {|mjs: Templates|}*/ = {\n  mjs: {\n    IMPORT_NAMED: template.statement(`\n  import { %%name%% as %%local%% } from %%source%%;\n`),\n    IMPORT_NAMESPACE: template.statement(`\n  import * as %%local%% from %%source%%;\n`),\n    EXPORT_CONST: template.statement(`\n  export const %%name%% = %%value%%;\n`),\n    EXPORT_NAMED: template.statement(`\n  export { %%local%% as %%name%% };\n`),\n    CONST: template.statement(`\n  const %%name%% = %%value%%;\n`),\n    REEXPORT_NAMED: template.statement(`\n  export { %%local%% as %%name%% } from %%source%%;\n`),\n    REEXPORT_NAMESPACE: template.statement(`\n  export * from %%source%%;\n`),\n    REEXPORT_NAMESPACE_AS: template.statement(`\n  export * as %%name%% from %%source%%;\n`),\n  },\n  //   cjs: {\n  //     EXPORT_CONST: template.statement(`\n  //   module.exports.%%name%% = %%value%%;\n  // `),\n  //     EXPORT_NAMED: template.statement(`\n  //   module.exports.%%name%% = %%local%%;\n  // `),\n  //     CONST: template.statement(`\n  //   const %%name%% = %%value%%;\n  // `),\n  //     EXPORT_NAMED_FROM: template.statement(`\n  //   module.exports.%%name%% = require(%%source%%).%%local%%;\n  // `),\n  //   },\n};\n\nfunction getRandom(max) {\n  return Math.floor(Math.random() * max);\n}\n\nfunction getRandomModuleIndex(state) {\n  return getRandom(Object.keys(state.modules).length);\n}\n\nfunction appendToModule(\n  state /*: State*/,\n  n /*: number*/,\n  data /*: $Shape<Module> */,\n) {\n  let {imported = [], exported = []} = data;\n\n  let mod = state.modules[n];\n  return {\n    ...state,\n    modules: {\n      ...state.modules,\n      [n]: {\n        ...mod,\n        imported: [...mod.imported, ...imported],\n        exported: [...mod.exported, ...exported],\n      },\n    },\n  };\n}\n\nlet getNewExportNameNext = 'a';\nfunction getNewExportName() /*: string*/ {\n  for (let i = getNewExportNameNext.length - 1; i >= 0; i--) {\n    if (getNewExportNameNext[i] !== 'z') {\n      getNewExportNameNext =\n        getNewExportNameNext.substring(0, i) +\n        String.fromCharCode(getNewExportNameNext.charCodeAt(i) + 1) +\n        getNewExportNameNext.substring(i + 1, getNewExportNameNext.length);\n      break;\n    }\n    if (i === 0) {\n      getNewExportNameNext = 'a'.repeat(getNewExportNameNext.length + 1);\n    }\n  }\n  if (\n    getNewExportNameNext === 'as' ||\n    !t.isValidIdentifier(getNewExportNameNext)\n  ) {\n    return getNewExportName();\n  }\n  return getNewExportNameNext;\n}\n\nfunction getNewModuleIndex(state /*: State*/) /*: number*/ {\n  return Object.keys(state.modules).length;\n}\n\nconst ACTIONS /*: Array<[number, (State) => State]> */ = [\n  [\n    0.2,\n    function addUnusedNamedExport(oldState) {\n      return appendToModule(oldState, getRandomModuleIndex(oldState), {\n        exported: [\n          {\n            symbol: getNewExportName(),\n            as: getNewExportName(),\n          },\n        ],\n      });\n    },\n  ],\n  [\n    0.25,\n    function addNamedExport(oldState) {\n      let n = getRandomModuleIndex(oldState);\n      let as = getNewExportName();\n      let state = appendToModule(oldState, n, {\n        exported: [\n          {\n            symbol: getNewExportName(),\n            as,\n          },\n        ],\n      });\n\n      for (let i = getRandomModuleIndex(state) + 1; i >= 0; i--) {\n        state = appendToModule(state, getRandomModuleIndex(state), {\n          imported: [\n            {\n              from: n,\n              symbol: as,\n              as: getNewExportName(),\n            },\n          ],\n        });\n      }\n      return state;\n    },\n  ],\n  [\n    0.3,\n    function moveLocalExportToNewDependency(state) {\n      let nOld = getRandomModuleIndex(state);\n      let modOld = state.modules[nOld];\n      if (modOld.exported.length === 0) {\n        return state;\n      }\n\n      let oldExportIndex = getRandom(modOld.exported.length);\n      let movedExport = modOld.exported[oldExportIndex];\n\n      let nNew = getNewModuleIndex(state);\n      return {\n        ...state,\n        modules: {\n          ...state.modules,\n          [nOld]: {\n            ...modOld,\n            exported: [\n              ...modOld.exported.filter((_, i) => i != oldExportIndex),\n              {\n                symbol: movedExport.as,\n                as: movedExport.as,\n                from: nNew,\n              },\n            ],\n          },\n          [nNew]: {\n            imported: [],\n            exported: [movedExport],\n            type: 'mjs',\n          },\n        },\n      };\n    },\n  ],\n  [\n    0.2,\n    function addNamespaceReexportToExisting(state) {\n      let n1 = getRandomModuleIndex(state);\n      let n2 = getRandomModuleIndex(state);\n      if (n1 >= n2) return state;\n\n      let as = Math.random() > 0.5 ? getNewExportName() : '*';\n\n      return appendToModule(state, n1, {\n        exported: [\n          {\n            from: n2,\n            symbol: '*',\n            as,\n          },\n        ],\n      });\n    },\n  ],\n  // [\n  //   0.1,\n  //   function addEntry(state) {\n  //     let n = getNewModuleIndex(state);\n  //     return {\n  //       ...state,\n  //       modules: {\n  //         ...state.modules,\n  //         [n]: {\n  //           imported: [],\n  //           exported: [],\n  //           type: 'mjs',\n  //         },\n  //       },\n  //       entries: [...state.entries, n],\n  //     };\n  //   },\n  // ],\n  [\n    0.05,\n    function makeSideEffectFree(state) {\n      let n = getRandomModuleIndex(state);\n      if (state.entries.includes(n)) {\n        return state;\n      }\n      return {\n        ...state,\n        noSideEffects: [...state.noSideEffects, n],\n      };\n    },\n  ],\n];\n\ninvariant.deepEqual(\n  ACTIONS.reduce((acc, [p]) => acc + p * 100, 0),\n  100,\n  'invalid weights for actions',\n);\n\nfunction mutate(state /*: State */) /*: State*/ {\n  let action;\n\n  if (process.env.ACTION != null) {\n    action = ACTIONS[Number(process.env.ACTION)][1];\n  } else {\n    let random = Math.random();\n    for (let [p, a] of ACTIONS) {\n      if (random < p) {\n        action = a;\n        break;\n      } else {\n        random -= p;\n      }\n    }\n    invariant(action);\n  }\n\n  return action(state);\n}\n\nfunction numberToFilename(n /*: number */, type /*: string*/) {\n  return `${n}.${type}`;\n}\n\nfunction linearizeState(state /*: State */) /* : Fixture */ {\n  // $FlowFixMe\n  let modules /*: Array<[string, Module]> */ = Object.entries(state.modules);\n  return {\n    files: Object.fromEntries(\n      modules\n        .map(([n, {type, imported, exported}]) => {\n          let importStatements = [];\n          let otherStatements = [];\n          let exportStatements = [];\n\n          for (let s of imported) {\n            if (s.symbol === '*') {\n              importStatements.push(\n                TEMPLATES[type].IMPORT_NAMESPACE({\n                  local: t.identifier(s.as),\n                  source: t.stringLiteral(\n                    './' + numberToFilename(s.from, state.modules[s.from].type),\n                  ),\n                }),\n              );\n            } else {\n              importStatements.push(\n                TEMPLATES[type].IMPORT_NAMED({\n                  name: t.identifier(s.symbol),\n                  local: t.identifier(s.as),\n                  source: t.stringLiteral(\n                    './' + numberToFilename(s.from, state.modules[s.from].type),\n                  ),\n                }),\n              );\n            }\n          }\n          for (let s of exported) {\n            if (s.from == null) {\n              if (s.symbol === s.as) {\n                exportStatements.push(\n                  TEMPLATES[type].EXPORT_CONST({\n                    name: t.identifier(s.symbol),\n                    value: t.stringLiteral(nanoid(5)),\n                  }),\n                );\n              } else {\n                otherStatements.push(\n                  TEMPLATES[type].CONST({\n                    name: t.identifier(s.symbol),\n                    value: t.stringLiteral(nanoid(5)),\n                  }),\n                );\n                exportStatements.push(\n                  TEMPLATES[type].EXPORT_NAMED({\n                    local: t.identifier(s.symbol),\n                    name: t.identifier(s.as),\n                  }),\n                );\n              }\n            } else {\n              let from = nullthrows(s.from);\n              if (s.symbol === '*') {\n                if (s.as === '*') {\n                  exportStatements.push(\n                    TEMPLATES[type].REEXPORT_NAMESPACE({\n                      source: t.stringLiteral(\n                        './' + numberToFilename(from, state.modules[from].type),\n                      ),\n                    }),\n                  );\n                } else {\n                  exportStatements.push(\n                    TEMPLATES[type].REEXPORT_NAMESPACE_AS({\n                      name: t.identifier(s.as),\n                      source: t.stringLiteral(\n                        './' + numberToFilename(from, state.modules[from].type),\n                      ),\n                    }),\n                  );\n                }\n              } else {\n                exportStatements.push(\n                  TEMPLATES[type].REEXPORT_NAMED({\n                    local: t.identifier(s.symbol),\n                    name: t.identifier(s.as),\n                    source: t.stringLiteral(\n                      './' + numberToFilename(from, state.modules[from].type),\n                    ),\n                  }),\n                );\n              }\n            }\n          }\n\n          return [\n            `${n}.${type}`,\n            generate(\n              t.program([\n                ...importStatements,\n                ...otherStatements,\n                ...exportStatements,\n              ]),\n            ).code,\n          ];\n        })\n        .concat([\n          [\n            'package.json',\n            JSON.stringify(\n              {\n                sideEffects: modules\n                  .map(([n, {type}]) => {\n                    if (state.noSideEffects.includes(Number(n))) return;\n                    else return `${n}.${type}`;\n                  })\n                  .filter(Boolean),\n              },\n              null,\n              2,\n            ),\n          ],\n        ]),\n    ),\n    entries: state.entries.map(n => numberToFilename(n, state.modules[n].type)),\n  };\n}\n\nfunction* generateExamples() /*: Iterable<Fixture> */ {\n  getNewExportNameNext = 'a';\n\n  let state /*: State */ = {\n    modules: {\n      [0]: {\n        type: 'mjs',\n        imported: [],\n        exported: [],\n      },\n    },\n    entries: [0],\n    noSideEffects: [],\n  };\n\n  yield linearizeState(state);\n  while (true) {\n    state = mutate(state);\n\n    yield linearizeState(state);\n  }\n}\nmodule.exports = generateExamples;\n\n// $FlowFixMe\n// const runESM = require('./runESM');\n// (async () => {\n//   try {\n//     let i = 0;\n//     for (let example of generateExamples()) {\n//       // console.log(example);\n//       // console.log(\n//       //   await runESM({\n//       //     entries: example.entries.map(f => `/${f}`),\n//       //     fs: {\n//       //       readFileSync(f) {\n//       //         return example.files[path.basename(f)];\n//       //       },\n//       //     },\n//       //   }),\n//       // );\n\n//       if (++i > 100) break;\n//     }\n//   } catch (e) {\n//     console.error(e);\n//   }\n// })();\n\n// (() => {\n//   let result = linearizeState({\n//     modules: {\n//       [0]: {\n//         type: 'mjs',\n//         imported: [],\n//         exported: [\n//           {symbol: 'x', as: 'x'},\n//           {from: 1, symbol: 'y', as: 'y'},\n//         ],\n//       },\n//       [1]: {\n//         type: 'mjs',\n//         imported: [],\n//         exported: [\n//           {symbol: 'y', as: 'y'},\n//           {from: 2, symbol: 'z', as: 'z'},\n//         ],\n//       },\n//       [2]: {\n//         type: 'mjs',\n//         imported: [],\n//         exported: [\n//           {symbol: 'y', as: 'y'},\n//           {from: 3, symbol: '*', as: 'z'},\n//           {from: 3, symbol: '*', as: '*'},\n//         ],\n//       },\n//       [3]: {\n//         type: 'mjs',\n//         imported: [],\n//         exported: [{symbol: 'z', as: 'z'}],\n//       },\n//     },\n//     entries: [0],\n//     noSideEffects: [3]\n//   });\n//   console.log(result);\n//   // try {\n//   //   console.log(\n//   //     await runESM({\n//   //       entries: result.entries.map(f => `/${f}`),\n//   //       fs: {\n//   //         readFileSync(f) {\n//   //           return result.files[path.basename(f)];\n//   //         },\n//   //       },\n//   //     }),\n//   //   );\n//   // } catch (e) {\n//   //   console.error(e);\n//   // }\n// })();\n"
  },
  {
    "path": "packages/dev/esm-fuzzer/index.js",
    "content": "import {MemoryFS} from '@parcel/fs';\nimport assert from 'assert';\nimport path from 'path';\n\nconst runESM = require('./runESM');\nconst parcel = require('./parcel');\nconst generateExample = require('./generateExample');\n\nasync function run(example) {\n  let inputFS = new MemoryFS(parcel.workerFarm);\n\n  let nativeOutput = {output: [], error: null};\n  try {\n    await runESM({\n      entries: example.entries.map(f => `${__dirname}/src/${f}`),\n      globals: {\n        output(v) {\n          nativeOutput.push(v);\n        },\n      },\n      fs: {\n        readFileSync(f) {\n          return example.files[path.basename(f)];\n        },\n      },\n    });\n  } catch (e) {\n    let match = e.message.match(\n      /The requested module '(.*)' does not provide an export named '(.*)'/,\n    );\n\n    if (match) {\n      let [, file, symbol] = match;\n      nativeOutput.error = {file, symbol};\n    } else {\n      throw e;\n    }\n  }\n\n  await inputFS.mkdirp(`${__dirname}/src`);\n  for (let [name, code] of Object.entries(example.files)) {\n    await inputFS.writeFile(`${__dirname}/src/${name}`, code);\n  }\n\n  let parcelBundles = {output: null, error: null};\n  try {\n    parcelBundles.output = await parcel({\n      inputFS,\n      entries: example.entries.map(f => `${__dirname}/src/${f}`),\n    });\n  } catch (e) {\n    let match = e.diagnostics[0].message.match(/(.*) does not export '(.*)'/);\n    if (match) {\n      let [, file, symbol] = match;\n      let relative = path.relative('packages/dev/fuzzer/src/', file);\n      parcelBundles.error = {\n        file: relative.startsWith('.') ? relative : `./${relative}`,\n        symbol,\n      };\n    } else {\n      throw e;\n    }\n  }\n\n  if ((nativeOutput.error == null) != (parcelBundles.error == null)) {\n    console.error('Native error:', nativeOutput.error);\n    console.error('Parcel error:', parcelBundles.error);\n    throw new Error();\n  } else {\n    if (nativeOutput.error != null) {\n      assert.deepEqual(nativeOutput.error, parcelBundles.error);\n    } else {\n      let output = [];\n      await runESM({\n        entries: example.entries.map(\n          f => `${__dirname}/dist/${f.replace('.mjs', '.js')}`,\n        ),\n        globals: {\n          output(v) {\n            output.push(v);\n          },\n        },\n        fs: {\n          readFileSync(f) {\n            return parcelBundles.output.output.get(f);\n          },\n        },\n      });\n      assert.deepEqual(output, nativeOutput.output);\n    }\n  }\n}\n\n// let fixture = {\n//   files: {\n//     '0.mjs': '',\n//   },\n//   entries: ['0.mjs'],\n// };\n\n(async () => {\n  try {\n    parcel.start();\n\n    // await run(fixture);\n\n    // eslint-disable-next-line no-constant-condition\n    while (true) {\n      let i = 0;\n      for (let example of generateExample()) {\n        try {\n          await run(example);\n        } catch (e) {\n          if (\n            !e.message.includes(\n              `couldn't be statically analyzed when importing '*'`,\n            )\n          ) {\n            console.error(e);\n            console.error(example);\n          }\n          break;\n        }\n        if (++i % 10 === 0) {\n          console.log(i);\n        }\n        if (i > 120) {\n          break;\n        }\n      }\n    }\n  } catch (e) {\n    console.error(e);\n  } finally {\n    await parcel.stop();\n  }\n})();\n"
  },
  {
    "path": "packages/dev/esm-fuzzer/package.json",
    "content": "{\n  \"name\": \"fuzzer\",\n  \"version\": \"2.16.4\",\n  \"private\": true,\n  \"scripts\": {\n    \"test\": \"NODE_NO_WARNINGS=1 node --experimental-vm-modules -r @parcel/babel-register index.js\"\n  },\n  \"dependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@babel/generator\": \"^7.22.10\",\n    \"@babel/template\": \"^7.22.5\",\n    \"@babel/types\": \"^7.22.11\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/fs\": \"2.16.4\",\n    \"nanoid\": \"^3.3.11\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/esm-fuzzer/parcel.js",
    "content": "import Parcel, {createWorkerFarm} from '@parcel/core';\nimport {NodeFS, MemoryFS, OverlayFS} from '@parcel/fs';\nimport path from 'path';\n\nconst DIST_DIR = path.join(__dirname, './dist');\n\nmodule.exports = async function({\n  inputFS,\n  entries,\n  outputFormat = 'esmodule',\n  externalModules,\n}) {\n  let outputFS = new MemoryFS(module.exports.workerFarm);\n\n  await outputFS.mkdirp(DIST_DIR);\n\n  let includeNodeModules = {};\n  if (externalModules) {\n    for (let m of externalModules) {\n      includeNodeModules[m] = false;\n    }\n  }\n\n  let b = new Parcel({\n    entries,\n    shouldDisableCache: true,\n    defaultConfig: `${__dirname}/config.json`,\n    inputFS: new OverlayFS(inputFS, new NodeFS()),\n    outputFS: outputFS,\n    workerFarm: module.exports.workerFarm,\n    defaultTargetOptions: {\n      distDir: DIST_DIR,\n      shouldOptimize: false,\n      engines: {\n        browsers: ['Chrome 80'],\n        node: '14',\n      },\n    },\n    shouldPatchConsole: false,\n    mode: 'production',\n    targets: {\n      default: {\n        outputFormat,\n        distDir: DIST_DIR,\n        includeNodeModules,\n        isLibrary: true,\n        engines: {\n          browsers: 'Chrome 80',\n        },\n      },\n    },\n  });\n\n  await b.run();\n\n  let output = new Map();\n  for (let file of await outputFS.readdir(DIST_DIR)) {\n    if (file.endsWith('.map')) continue;\n    output.set(\n      path.join(DIST_DIR, file),\n      await outputFS.readFile(path.join(DIST_DIR, file), 'utf8'),\n    );\n  }\n  return {distDir: DIST_DIR, output};\n};\n\nmodule.exports.start = function() {\n  module.exports.workerFarm = createWorkerFarm();\n};\n\nmodule.exports.stop = async function() {\n  await module.exports.workerFarm.end();\n};\n"
  },
  {
    "path": "packages/dev/esm-fuzzer/runESM.js",
    "content": "'use strict';\nconst vm = require('vm');\nconst path = require('path');\nconst nativeFS = require('fs');\n\nmodule.exports = async function runESM({\n  entries,\n  globals,\n  fs = nativeFS,\n  externalModules = {},\n}) {\n  const context = vm.createContext(globals ?? {});\n\n  const cache = new Map();\n  function load(specifier, referrer) {\n    if (path.isAbsolute(specifier) || specifier.startsWith('.')) {\n      if (!path.extname(specifier)) specifier = specifier + '.js';\n\n      const filename = path.resolve(\n        path.dirname(referrer.identifier),\n        specifier,\n      );\n      if (cache.has(filename)) {\n        return cache.get(filename);\n      }\n      const source = fs.readFileSync(filename, 'utf8');\n      const m = new vm.SourceTextModule(source, {\n        identifier: filename,\n        importModuleDynamically: entry,\n        context: context,\n      });\n      cache.set(filename, m);\n      return m;\n    } else {\n      if (!(specifier in externalModules)) {\n        console.error(\n          `Couldn't resolve ${specifier} from ${referrer.identifier}`,\n        );\n        throw new Error(\n          `Couldn't resolve ${specifier} from ${referrer.identifier}`,\n        );\n      }\n\n      if (cache.has(specifier)) {\n        return cache.get(specifier);\n      }\n\n      let ns = externalModules[specifier](context);\n\n      let m = new vm.SyntheticModule(\n        Object.keys(ns),\n        function() {\n          for (let [k, v] of Object.entries(ns)) {\n            this.setExport(k, v);\n          }\n        },\n        {identifier: specifier, context},\n      );\n      cache.set(specifier, m);\n      return m;\n    }\n  }\n\n  async function entry(specifier, referrer) {\n    const m = load(specifier, referrer);\n    if (m.status === 'unlinked') {\n      await m.link(load);\n    }\n    if (m.status === 'linked') {\n      await m.evaluate();\n    }\n    return m;\n  }\n\n  let modules = [];\n  for (let f of [].concat(entries)) {\n    modules.push(await entry(f, {identifier: ''}));\n  }\n\n  for (let m of modules) {\n    if (m.status === 'errored') {\n      throw module.error;\n    }\n  }\n\n  return {\n    context,\n    exports: Array.isArray(entries)\n      ? modules.map(m => m.namespace)\n      : modules[0].namespace,\n  };\n};\n"
  },
  {
    "path": "packages/dev/esm-fuzzer/writeExample.js",
    "content": "const fs = require('fs');\nconst path = require('path');\n\nconst EXAMPLE = {\n  /*...*/\n};\n\nlet BASEDIR = '...';\n\nfor (let [name, code] of Object.entries(EXAMPLE.files)) {\n  fs.writeFileSync(path.join(BASEDIR, 'src', name), code);\n}\n\nconsole.log(`parcel2 build ${EXAMPLE.entries.join(' ')}`);\n"
  },
  {
    "path": "packages/dev/parcel-link/README.md",
    "content": "# `parcel-link`\n\nA CLI for linking a dev version of Parcel into a project.\n\n## Installation\n\nClone and run `yarn`, then `cd packages/dev/parcel-link && yarn link`\nto make the `parcel-link` binary globally available.\n\n## Usage\n\nIn an Parcel project root:\n\n```sh\n$ parcel-link [options] [packageRoot]\n```\n\n### Specifying `packageRoot`\n\n```sh\n$ parcel-link /path/to/parcel/packages\n```\n\nBy default, `parcel-link` will link to packages in the same\nlocation where `parcel-link` is found. But it is common\nto want to link other worktrees of Parcel, and it's not fun\nto have to first re-link `parcel-link` to a new location.\n\nFor this reason, `parcel-link` accepts a `packageRoot` argument,\nwhich specifies a path to a Parcel `packages` directory.\nLinks will then be made to packages in that location instead\nof the default.\n\n### Specifying a `namespace`\n\n```sh\n$ parcel-link --namespace @my-parcel-fork\n```\n\nWhen linking into a project that uses a fork of Parcel,\nthe published packages may have a different namespace from\nParcel, so `parcel-link` allows specifying a namespace.\n\nIf defined to someting other than `\"@parcel\"`,\n`parcel-link` will do some extra work to adjust\nnamespaced packages to reference linked packages instead.\n\n### Linking into a monorepo\n\n```sh\n$ parcel-link --node-modules-globs build-tools/*/node_modules build-tools/parcel/*/node_modules\n```\n\nIn a monorepo, there may be multiple locations where\nParcel packages are installed. For this, `parcel-link`\nallows specifying globs of locations where packages should be linked.\n\nNote that specifying any value here will override the default of `node_modules`,\nso if you want to preserve the default behavior, be sure to include `node_modules`\nin the list of globs:\n\n```sh\n$ parcel-link -g build-tools/*/node_modules -g build-tools/parcel/*/node_modules -g node_modules\n```\n\n## Cleanup\n\nTo restore the project to its default Parcel install:\n\n```sh\n$ parcel-link unlink [options] [packageRoot]\n```\n"
  },
  {
    "path": "packages/dev/parcel-link/bin.js",
    "content": "#! /usr/bin/env node\n\n// @flow strict-local\n/* eslint-disable no-console */\n\n'use strict';\n\n// $FlowFixMe[untyped-import]\nrequire('@parcel/babel-register');\n\nlet program = require('./src/cli').createProgram();\n\n(async function main() {\n  try {\n    await program.parseAsync();\n  } catch (e) {\n    console.error(e);\n    process.exit(1);\n  }\n})();\n"
  },
  {
    "path": "packages/dev/parcel-link/package.json",
    "content": "{\n  \"name\": \"@parcel/link\",\n  \"description\": \"A CLI for linking a dev version of Parcel into a project\",\n  \"version\": \"2.16.4\",\n  \"private\": true,\n  \"bin\": {\n    \"parcel-link\": \"bin.js\"\n  },\n  \"scripts\": {\n    \"test\": \"cd ../../.. && yarn test:integration --grep @parcel/link\"\n  },\n  \"main\": \"src/index.js\",\n  \"dependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"@parcel/fs\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"commander\": \"^12.1.0\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/parcel-link/src/ParcelLinkConfig.js",
    "content": "// @flow\n\nimport type {FileSystem} from '@parcel/fs';\n\nimport {globSync} from '@parcel/utils';\n\nimport assert from 'assert';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\n\nconst LOCK_FILE_NAMES = ['yarn.lock', 'package-lock.json', 'pnpm-lock.yaml'];\nconst SCM_FILE_NAMES = ['.git', '.hg'];\n\nexport class ParcelLinkConfig {\n  fs: FileSystem;\n  appRoot: string;\n  packageRoot: string;\n  namespace: string = '@parcel';\n  nodeModulesGlobs: string[] = ['node_modules'];\n  filename: string = '.parcel-link';\n\n  static load(\n    appRoot: string,\n    {fs, filename = '.parcel-link'}: {|fs: FileSystem, filename?: string|},\n  ): ParcelLinkConfig {\n    let manifest = JSON.parse(\n      fs.readFileSync(path.join(appRoot, filename), 'utf8'),\n    );\n    return new ParcelLinkConfig({...manifest, fs});\n  }\n\n  constructor(options: {|\n    fs: FileSystem,\n    appRoot: string,\n    packageRoot: string,\n    namespace?: string,\n    nodeModulesGlobs?: string[],\n    filename?: string,\n  |}) {\n    this.fs = nullthrows(options.fs, 'fs is required');\n    this.appRoot = nullthrows(options.appRoot, 'appRoot is required');\n    this.packageRoot = nullthrows(\n      options.packageRoot,\n      'packageRoot is required',\n    );\n    this.namespace = options.namespace ?? this.namespace;\n    this.nodeModulesGlobs = options.nodeModulesGlobs ?? this.nodeModulesGlobs;\n    this.filename = options.filename ?? this.filename;\n  }\n\n  save(): Promise<void> {\n    return this.fs.writeFile(\n      path.join(this.appRoot, this.filename),\n      JSON.stringify(this, null, 2),\n    );\n  }\n\n  delete(): Promise<void> {\n    return this.fs.rimraf(path.join(this.appRoot, this.filename));\n  }\n\n  validateAppRoot() {\n    assert(\n      [...LOCK_FILE_NAMES, ...SCM_FILE_NAMES].some(filename =>\n        this.fs.existsSync(path.join(this.appRoot, filename)),\n      ),\n      `Not a project root: '${this.appRoot}'`,\n    );\n  }\n\n  validatePackageRoot() {\n    assert(\n      this.fs.existsSync(path.join(this.packageRoot, 'core/core')),\n      `Not a package root: '${this.packageRoot}'`,\n    );\n  }\n\n  validate(): void {\n    this.validateAppRoot();\n    this.validatePackageRoot();\n  }\n\n  getNodeModulesPaths(): string[] {\n    return this.nodeModulesGlobs.reduce(\n      (matches, pattern) => [\n        ...matches,\n        ...globSync(pattern, this.fs, {cwd: this.appRoot, onlyFiles: false}),\n      ],\n      [],\n    );\n  }\n\n  toJSON(): {|\n    appRoot: string,\n    packageRoot: string,\n    namespace: string,\n    nodeModulesGlobs: string[],\n  |} {\n    return {\n      appRoot: this.appRoot,\n      packageRoot: this.packageRoot,\n      namespace: this.namespace,\n      nodeModulesGlobs: this.nodeModulesGlobs,\n    };\n  }\n}\n"
  },
  {
    "path": "packages/dev/parcel-link/src/cli.js",
    "content": "// @flow strict-local\n/* eslint-disable no-console */\n\nimport type {LinkCommandOptions} from './link';\nimport type {UnlinkCommandOptions} from './unlink';\n\n// $FlowFixMe[untyped-import]\nimport {version} from '../package.json';\nimport {createLinkCommand} from './link';\nimport {createUnlinkCommand} from './unlink';\n\nimport commander from 'commander';\n\nexport type ProgramOptions = {|...LinkCommandOptions, ...UnlinkCommandOptions|};\n\n// $FlowFixMe[invalid-exported-annotation]\nexport function createProgram(opts?: ProgramOptions): commander.Command {\n  let {fs, log = console.log, link, unlink} = opts ?? {};\n  return new commander.Command()\n    .version(version, '-V, --version')\n    .description('A tool for linking a dev copy of Parcel into an app')\n    .addHelpText('after', `\\nThe link command is the default command.`)\n    .addCommand(createLinkCommand({fs, log, link}), {isDefault: true})\n    .addCommand(createUnlinkCommand({fs, log, unlink}));\n}\n"
  },
  {
    "path": "packages/dev/parcel-link/src/index.js",
    "content": "// @flow strict-local\n\nexport type {ProgramOptions} from './cli';\nexport type {LinkOptions} from './link';\nexport type {UnlinkOptions} from './unlink';\n\nexport {createProgram} from './cli';\nexport {link} from './link';\nexport {unlink} from './unlink';\nexport {ParcelLinkConfig} from './ParcelLinkConfig';\n"
  },
  {
    "path": "packages/dev/parcel-link/src/link.js",
    "content": "// @flow strict-local\n\nimport type {CmdOptions} from './utils';\nimport type {FileSystem} from '@parcel/fs';\n\nimport {ParcelLinkConfig} from './ParcelLinkConfig';\nimport {\n  findParcelPackages,\n  mapNamespacePackageAliases,\n  cleanupBin,\n  cleanupNodeModules,\n  fsWrite,\n  fsSymlink,\n} from './utils';\n\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport {NodeFS} from '@parcel/fs';\nimport commander from 'commander';\n\nexport type LinkOptions = {|\n  dryRun?: boolean,\n  log?: (...data: mixed[]) => void,\n|};\n\nexport type LinkCommandOptions = {|\n  +link?: typeof link,\n  +fs?: FileSystem,\n  +log?: (...data: mixed[]) => void,\n|};\n\nconst NOOP: (...data: mixed[]) => void = () => {};\n\nexport async function link(\n  config: ParcelLinkConfig,\n  {dryRun = false, log = NOOP}: LinkOptions,\n): Promise<void> {\n  config.validate();\n\n  let {appRoot, packageRoot, namespace} = config;\n\n  let nodeModulesPaths = config.getNodeModulesPaths();\n\n  let opts: CmdOptions = {appRoot, packageRoot, dryRun, log, fs: config.fs};\n\n  // Step 1: Determine all Parcel packages to link\n  // --------------------------------------------------------------------------------\n\n  let parcelPackages = await findParcelPackages(config.fs, packageRoot);\n\n  // Step 2: Delete all official packages (`@parcel/*`) from node_modules\n  // --------------------------------------------------------------------------------\n\n  for (let nodeModules of nodeModulesPaths) {\n    await cleanupBin(nodeModules, opts);\n    await cleanupNodeModules(\n      nodeModules,\n      packageName => parcelPackages.has(packageName),\n      opts,\n    );\n  }\n\n  // Step 3: Link the Parcel packages into node_modules\n  // --------------------------------------------------------------------------------\n\n  for (let [packageName, p] of parcelPackages) {\n    await fsSymlink(p, path.join(appRoot, 'node_modules', packageName), opts);\n  }\n\n  // Step 4: Point `parcel` bin symlink to linked `packages/core/parcel/src/bin.js`\n  // --------------------------------------------------------------------------------\n\n  await fsSymlink(\n    path.join(packageRoot, 'core/parcel/src/bin.js'),\n    path.join(appRoot, 'node_modules/.bin/parcel'),\n    opts,\n  );\n\n  // Step 5 (optional): If a namespace is not \"@parcel\", map namespaced package aliases.\n  // --------------------------------------------------------------------------------\n\n  if (namespace != null && namespace !== '@parcel') {\n    let namespacePackages = mapNamespacePackageAliases(\n      namespace,\n      parcelPackages,\n    );\n\n    // Step 5.1: In .parcelrc, rewrite all references to official plugins to `@parcel/*`\n    // --------------------------------------------------------------------------------\n\n    let parcelConfigPath = path.join(appRoot, '.parcelrc');\n    if (config.fs.existsSync(parcelConfigPath)) {\n      let parcelConfig = config.fs.readFileSync(parcelConfigPath, 'utf8');\n      await fsWrite(\n        parcelConfigPath,\n        parcelConfig.replace(\n          new RegExp(`\"(${namespace}/parcel-[^\"]*)\"`, 'g'),\n          (_, match) => `\"${namespacePackages.get(match) ?? match}\"`,\n        ),\n        opts,\n      );\n    }\n\n    // Step 5.2: In the root package.json, rewrite all references to official plugins to @parcel/...\n    // For configs like \"@namespace/parcel-bundler-default\":{\"maxParallelRequests\": 10}\n    // --------------------------------------------------------------------------------\n\n    let rootPkgPath = path.join(appRoot, 'package.json');\n    if (config.fs.existsSync(rootPkgPath)) {\n      let rootPkg = config.fs.readFileSync(rootPkgPath, 'utf8');\n      await fsWrite(\n        rootPkgPath,\n        rootPkg.replace(\n          new RegExp(`\"(${namespace}/parcel-[^\"]*)\"(\\\\s*:\\\\s*{)`, 'g'),\n          (_, match, suffix) =>\n            `\"${namespacePackages.get(match) ?? match}\"${suffix}`,\n        ),\n        opts,\n      );\n    }\n\n    // Step 5.3: Delete namespaced packages (`@namespace/parcel-*`) from node_modules\n    // --------------------------------------------------------------------------------\n\n    for (let nodeModules of nodeModulesPaths) {\n      await cleanupNodeModules(\n        nodeModules,\n        packageName => namespacePackages.has(packageName),\n        opts,\n      );\n    }\n\n    // Step 5.4: Link the Parcel packages into node_modules as `@namespace/parcel-*`\n    // --------------------------------------------------------------------------------\n\n    for (let [alias, parcelName] of namespacePackages) {\n      let p = nullthrows(parcelPackages.get(parcelName));\n      await fsSymlink(p, path.join(appRoot, 'node_modules', alias), opts);\n    }\n  }\n}\n\nexport function createLinkCommand(\n  opts?: LinkCommandOptions,\n  // $FlowFixMe[invalid-exported-annotation]\n): commander.Command {\n  let action = opts?.link ?? link;\n  let log = opts?.log ?? NOOP;\n  let fs = opts?.fs ?? new NodeFS();\n\n  return new commander.Command('link')\n    .arguments('[packageRoot]')\n    .description('Link a dev copy of Parcel into an app', {\n      packageRoot:\n        'Path to the Parcel package root\\nDefaults to the package root containing this package',\n    })\n    .option('-d, --dry-run', 'Do not write any changes')\n    .option('-n, --namespace <namespace>', 'Namespace for packages', '@parcel')\n    .option(\n      '-g, --node-modules-glob <glob>',\n      'Location where node_modules should be linked in the app.\\nCan be repeated with multiple globs.',\n      (glob, globs) => globs.concat([glob.replace(/[\"']/g, '')]),\n      ['node_modules'],\n    )\n    .action(async (packageRoot, options) => {\n      if (options.dryRun) log('Dry run...');\n      let appRoot = process.cwd();\n\n      let parcelLinkConfig;\n\n      try {\n        parcelLinkConfig = await ParcelLinkConfig.load(appRoot, {fs});\n      } catch (e) {\n        // boop!\n      }\n\n      if (parcelLinkConfig) {\n        throw new Error(\n          'A Parcel link already exists! Try `parcel-link unlink` to re-link.',\n        );\n      }\n\n      parcelLinkConfig = new ParcelLinkConfig({\n        fs,\n        appRoot,\n        packageRoot: packageRoot ?? path.join(__dirname, '../../../'),\n        namespace: options.namespace,\n        nodeModulesGlobs: options.nodeModulesGlob,\n      });\n\n      await action(parcelLinkConfig, {dryRun: options.dryRun, log});\n\n      if (!options.dryRun) await parcelLinkConfig.save();\n\n      log('🎉 Linking successful');\n    });\n}\n"
  },
  {
    "path": "packages/dev/parcel-link/src/unlink.js",
    "content": "// @flow strict-local\n\nimport type {CmdOptions} from './utils';\nimport type {FileSystem} from '@parcel/fs';\n\nimport {ParcelLinkConfig} from './ParcelLinkConfig';\nimport {\n  cleanupBin,\n  cleanupNodeModules,\n  execSync,\n  findParcelPackages,\n  fsWrite,\n  mapNamespacePackageAliases,\n} from './utils';\n\nimport path from 'path';\nimport {NodeFS} from '@parcel/fs';\nimport commander from 'commander';\n\nexport type UnlinkOptions = {|\n  dryRun?: boolean,\n  forceInstall?: boolean,\n  log?: (...data: mixed[]) => void,\n|};\n\nexport type UnlinkCommandOptions = {|\n  +unlink?: typeof unlink,\n  +fs?: FileSystem,\n  +log?: (...data: mixed[]) => void,\n|};\n\nconst NOOP: (...data: mixed[]) => void = () => {};\n\nexport async function unlink(\n  config: ParcelLinkConfig,\n  {dryRun = false, forceInstall = false, log = NOOP}: UnlinkOptions,\n) {\n  config.validate();\n\n  let {appRoot, packageRoot, namespace} = config;\n\n  let nodeModulesPaths = config.getNodeModulesPaths();\n\n  let opts: CmdOptions = {appRoot, packageRoot, dryRun, log, fs: config.fs};\n\n  // Step 1: Determine all Parcel packages that could be linked\n  // --------------------------------------------------------------------------------\n\n  let parcelPackages = await findParcelPackages(config.fs, packageRoot);\n\n  // Step 2: Delete all official packages (`@parcel/*`) from node_modules\n  // This is very brute-force, but should ensure that we catch all linked packages.\n  // --------------------------------------------------------------------------------\n\n  for (let nodeModules of nodeModulesPaths) {\n    await cleanupBin(nodeModules, opts);\n    await cleanupNodeModules(\n      nodeModules,\n      packageName => parcelPackages.has(packageName),\n      opts,\n    );\n  }\n\n  // Step 3 (optional): If a namespace is not \"@parcel\", restore all aliased references.\n  // --------------------------------------------------------------------------------\n\n  if (namespace != null && namespace !== '@parcel') {\n    // Step 3.1: Determine all namespace packages that could be aliased\n    // --------------------------------------------------------------------------------\n\n    let namespacePackages = mapNamespacePackageAliases(\n      namespace,\n      parcelPackages,\n    );\n\n    // Step 3.2: In .parcelrc, restore all references to namespaced plugins.\n    // --------------------------------------------------------------------------------\n\n    let parcelConfigPath = path.join(appRoot, '.parcelrc');\n    if (config.fs.existsSync(parcelConfigPath)) {\n      let parcelConfig = config.fs.readFileSync(parcelConfigPath, 'utf8');\n      for (let [alias, parcel] of namespacePackages) {\n        parcelConfig = parcelConfig.replace(\n          new RegExp(`\"${parcel}\"`, 'g'),\n          `\"${alias}\"`,\n        );\n      }\n      await fsWrite(parcelConfigPath, parcelConfig, opts);\n    }\n\n    // Step 3.3: In the root package.json, restore all references to namespaced plugins\n    // For configs like \"@namespace/parcel-bundler-default\":{\"maxParallelRequests\": 10}\n    // --------------------------------------------------------------------------------\n\n    let rootPkgPath = path.join(appRoot, 'package.json');\n    if (config.fs.existsSync(rootPkgPath)) {\n      let rootPkg = config.fs.readFileSync(rootPkgPath, 'utf8');\n      for (let [alias, parcel] of namespacePackages) {\n        rootPkg = rootPkg.replace(\n          new RegExp(`\"${parcel}\"(\\\\s*:\\\\s*{)`, 'g'),\n          `\"${alias}\"$1`,\n        );\n      }\n      await fsWrite(rootPkgPath, rootPkg, opts);\n    }\n\n    // Step 3.4: Delete all namespaced packages (`@namespace/parcel-*`) from node_modules\n    // This is very brute-force, but should ensure that we catch all linked packages.\n    // --------------------------------------------------------------------------------\n\n    for (let nodeModules of nodeModulesPaths) {\n      await cleanupNodeModules(\n        nodeModules,\n        packageName => namespacePackages.has(packageName),\n        opts,\n      );\n    }\n  }\n\n  // Step 4 (optional): Run `yarn` to restore all dependencies.\n  // --------------------------------------------------------------------------------\n\n  if (forceInstall) {\n    // FIXME: This should detect the package manager in use.\n    log('Running `yarn` to restore dependencies');\n    execSync('yarn install --force', opts);\n  } else {\n    log('Run `yarn install --force` (or similar) to restore dependencies');\n  }\n}\n\nexport function createUnlinkCommand(\n  opts?: UnlinkCommandOptions,\n  // $FlowFixMe[invalid-exported-annotation]\n): commander.Command {\n  let action = opts?.unlink ?? unlink;\n  let log = opts?.log ?? NOOP;\n  let fs = opts?.fs ?? new NodeFS();\n\n  return new commander.Command('unlink')\n    .description('Unlink a dev copy of Parcel from an app')\n    .option('-d, --dry-run', 'Do not write any changes')\n    .option('-f, --force-install', 'Force a reinstall after unlinking')\n    .action(async options => {\n      if (options.dryRun) log('Dry run...');\n      let appRoot = process.cwd();\n\n      let parcelLinkConfig;\n      try {\n        parcelLinkConfig = await ParcelLinkConfig.load(appRoot, {fs});\n      } catch (e) {\n        // boop!\n      }\n\n      if (parcelLinkConfig) {\n        await action(parcelLinkConfig, {\n          dryRun: options.dryRun,\n          forceInstall: options.forceInstall,\n          log,\n        });\n\n        if (!options.dryRun) await parcelLinkConfig.delete();\n      } else {\n        throw new Error('A Parcel link could not be found!');\n      }\n\n      log('🎉 Unlinking successful');\n    });\n}\n"
  },
  {
    "path": "packages/dev/parcel-link/src/utils.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport child_process from 'child_process';\nimport path from 'path';\n\nimport type {FileSystem} from '@parcel/fs';\n\nexport type CmdOptions = {|\n  appRoot: string,\n  packageRoot: string,\n  dryRun: boolean,\n  fs: FileSystem,\n  log: (...data: mixed[]) => void,\n|};\n\nexport async function fsWrite(\n  f: string,\n  content: string,\n  {appRoot, log, dryRun, fs}: CmdOptions,\n): Promise<void> {\n  if (!dryRun) await fs.writeFile(f, content);\n  log('Wrote', path.join('<app>', path.relative(appRoot, f)));\n}\n\nexport async function fsDelete(\n  f: string,\n  {appRoot, log, dryRun, fs}: CmdOptions,\n): Promise<void> {\n  if (await fs.exists(f)) {\n    if (!dryRun) await fs.rimraf(f);\n    log('Deleted', path.join('<app>', path.relative(appRoot, f)));\n  }\n}\n\nexport async function fsSymlink(\n  source: string,\n  target: string,\n  {appRoot, packageRoot, log, dryRun, fs}: CmdOptions,\n): Promise<void> {\n  if (!dryRun) {\n    assert(\n      await fs.exists(source),\n      `Can't link from ${source}; it doesn't exist!`,\n    );\n    assert(\n      !(await fs.exists(target)),\n      `Can't link to ${target}; it already exists!`,\n    );\n    await fs.symlink(source, target);\n  }\n  log(\n    'Linked',\n    path.join('<app>', path.relative(appRoot, target)),\n    '->',\n    path.join('<pkg>', path.relative(packageRoot, source)),\n  );\n}\n\nexport async function findParcelPackages(\n  fs: FileSystem,\n  rootDir: string,\n  files: Map<string, string> = new Map(),\n): Promise<Map<string, string>> {\n  for (let file of fs.readdirSync(rootDir, {withFileTypes: true})) {\n    if (file.name === 'node_modules') continue;\n    let projectPath = path.join(rootDir, file.name);\n    if (file.isDirectory()) {\n      let packagePath = path.join(projectPath, 'package.json');\n      if (fs.existsSync(packagePath)) {\n        let pack = JSON.parse(await fs.readFile(packagePath, 'utf8'));\n        if (!pack.private) {\n          files.set(pack.name, projectPath);\n        }\n      } else {\n        await findParcelPackages(fs, projectPath, files);\n      }\n    }\n  }\n  return files;\n}\n\nexport function mapNamespacePackageAliases(\n  ns: string,\n  parcelPackages: Map<string, string>,\n): Map<string, string> {\n  let aliasesToParcelPackages = new Map();\n  for (let packageName of parcelPackages.keys()) {\n    if (packageName.startsWith(ns)) {\n      continue;\n    }\n    aliasesToParcelPackages.set(\n      packageName === 'parcel'\n        ? `${ns}/parcel`\n        : packageName === 'parcelforvscode'\n        ? `${ns}/parcelforvscode`\n        : packageName.replace(/^@parcel\\//, `${ns}/parcel-`),\n      packageName,\n    );\n  }\n  return aliasesToParcelPackages;\n}\n\nexport async function cleanupBin(root: string, opts: CmdOptions) {\n  let binSymlink = path.join(root, '.bin/parcel');\n  try {\n    await fsDelete(binSymlink, opts);\n  } catch (e) {\n    // noop\n  }\n}\n\nexport async function cleanupNodeModules(\n  root: string,\n  predicate: (filepath: string) => boolean,\n  opts: CmdOptions,\n): Promise<void> {\n  let {fs} = opts;\n  for (let dirName of fs.readdirSync(root)) {\n    if (dirName === '.bin') continue;\n    let dirPath = path.join(root, dirName);\n    if (dirName[0].startsWith('@')) {\n      await cleanupNodeModules(dirPath, predicate, opts);\n      continue;\n    }\n\n    let packageName;\n    let parts = dirPath.split(path.sep).slice(-2);\n    if (parts[0].startsWith('@')) {\n      packageName = parts.join('/');\n    } else {\n      packageName = parts[1];\n    }\n\n    // -------\n\n    if (predicate(packageName)) {\n      await fsDelete(dirPath, opts);\n    }\n\n    // -------\n\n    let packageNodeModules = path.join(root, dirName, 'node_modules');\n    let stat;\n    try {\n      stat = fs.statSync(packageNodeModules);\n    } catch (e) {\n      // noop\n    }\n    if (stat?.isDirectory()) {\n      await cleanupNodeModules(packageNodeModules, predicate, opts);\n    }\n  }\n}\n\nexport function execSync(\n  cmd: string,\n  {appRoot, log, dryRun}: CmdOptions,\n): void {\n  log('Executing', cmd);\n  if (!dryRun) {\n    child_process.execSync(cmd, {cwd: appRoot, stdio: 'inherit'});\n  }\n}\n"
  },
  {
    "path": "packages/dev/query/README.md",
    "content": "# `parcel-query`\n\nA REPL to investigate the Parcel graphs in the cache (\"offline\", after the build).\n\n## Installation\n\nClone and run `yarn`, then `cd packages/dev/query && yarn link` to make the `parcel-query` binary\nglobally available.\n\n## Usage\n\nCall `.help` to view a list of commands.\n\nIn a project root containing a `.parcel-cache` folder:\n\n```sh\n$ parcel-query\n> .findBundleReason 27494aebac508bd8 TJbGI\n# Asset is main entry of bundle: false\n# Asset is an entry of bundle: false\n# Incoming dependencies contained in the bundle:\n{\n  id: '3fd182662e2a6fa9',\n  type: 'dependency',\n  value: {\n    specifier: '../../foo',\n    specifierType: 0,\n...\n```\n\nIn the `.getAsset 3Xzt5` variant, no quotes/parenthesis are\nneeded. Alternatively, you can use proper JS: `getAsset(\"3Xzt5\")`.\n\nThe variables `assetGraph` and `bundleGraph` contain the deserialized objects.\n\nFor a single query, the command (which has to be a JS call) can be specified as a CLI parameter (the\ndisadvantage here is that the graphs have to be loaded on every call as opposed to once when\nstarting the REPL):\n\n```sh\n$ parcel-query 'findBundleReason(\"b0696febf20b57ce\", \"bNAUZ\")'\n```\n"
  },
  {
    "path": "packages/dev/query/package.json",
    "content": "{\n  \"name\": \"@parcel/query\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"bin\": {\n    \"parcel-query\": \"src/bin.js\"\n  },\n  \"main\": \"src/index.js\",\n  \"dependencies\": {\n    \"@parcel/cache\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/graph\": \"3.6.4\",\n    \"nullthrows\": \"^1.1.1\",\n    \"table\": \"^6.9.0\",\n    \"v8-compile-cache\": \"^2.4.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/query/src/bin.js",
    "content": "#!/usr/bin/env node\n\n'use strict';\n\nif (\n  process.env.PARCEL_BUILD_ENV !== 'production' ||\n  process.env.PARCEL_SELF_BUILD\n) {\n  require('@parcel/babel-register');\n}\n\nconst run = require('./cli').run;\nrequire('v8-compile-cache');\n\nrun(process.argv.slice(2));\n"
  },
  {
    "path": "packages/dev/query/src/cli.js",
    "content": "// @flow strict-local\n/* eslint-disable no-console, monorepo/no-internal-import */\nimport type {ContentGraph, ContentKey, NodeId} from '@parcel/graph';\nimport type {BundleGraphEdgeType} from '@parcel/core/src/BundleGraph';\nimport type {AssetGraphNode, BundleGraphNode} from '@parcel/core/src/types';\n\nimport path from 'path';\nimport fs from 'fs';\nimport repl from 'repl';\nimport os from 'os';\nimport nullthrows from 'nullthrows';\nimport invariant from 'assert';\nimport {serialize} from 'v8';\n// $FlowFixMe\nimport {table} from 'table';\n\nimport {loadGraphs} from './index.js';\n\nconst {\n  BundleGraph: {bundleGraphEdgeTypes: bundleGraphEdgeTypes},\n  Priority,\n  fromProjectPathRelative,\n} = require('./deep-imports.js');\n\nexport async function run(input: string[]) {\n  let args = input;\n  let cacheDir = path.join(process.cwd(), '.parcel-cache');\n  if (args[0] === '--cache') {\n    cacheDir = path.resolve(process.cwd(), args[1]);\n    args = args.slice(2);\n  }\n  let initialCmd = args[0];\n\n  try {\n    fs.accessSync(cacheDir);\n  } catch (e) {\n    console.error(\"Can't find cache dir\", cacheDir);\n    process.exit(1);\n  }\n\n  console.log('Loading graphs...');\n  let {assetGraph, bundleGraph, bundleInfo, requestTracker, cacheInfo} =\n    await loadGraphs(cacheDir);\n\n  function hasRequestTracker() {\n    if (requestTracker == null) {\n      console.error('Request Graph could not be found');\n      return false;\n    }\n    return true;\n  }\n\n  function hasBundleGraph() {\n    if (bundleGraph == null) {\n      console.error('Bundle Graph could not be found');\n      return false;\n    }\n    return true;\n  }\n\n  function hasAssetGraph() {\n    if (assetGraph == null) {\n      console.error('Asset Graph could not be found');\n      return false;\n    }\n    return true;\n  }\n\n  function hasBundleInfo() {\n    if (bundleInfo == null) {\n      console.error('Bundle Info could not be found');\n      return false;\n    }\n    return true;\n  }\n\n  // -------------------------------------------------------\n\n  function getBundleFilePath(id: ContentKey) {\n    if (!hasBundleInfo()) {\n      return;\n    }\n    invariant(bundleInfo != null);\n    return fromProjectPathRelative(\n      nullthrows(bundleInfo.get(id)?.[0].filePath),\n    );\n  }\n\n  function parseAssetLocator(v: string) {\n    let id: ?string = null;\n    if (v.length === 16) {\n      id = v;\n    } else {\n      if (!hasBundleGraph()) {\n        return;\n      }\n      invariant(bundleGraph != null);\n      for (let [assetId, publicId] of bundleGraph._publicIdByAssetId) {\n        if (publicId === v) {\n          id = assetId;\n          break;\n        }\n      }\n    }\n\n    if (id == null && v.length > 0) {\n      if (!hasAssetGraph()) {\n        return;\n      }\n      invariant(assetGraph != null);\n      let assetRegex = new RegExp(v);\n      for (let node of assetGraph.nodes.values()) {\n        if (\n          node?.type === 'asset' &&\n          assetRegex.test(fromProjectPathRelative(node.value.filePath))\n        ) {\n          id = node.id;\n          break;\n        }\n      }\n    }\n    return id;\n  }\n\n  function parseBundleLocator(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let bundleRegex = new RegExp(v);\n    for (let b of bundleGraph.getBundles()) {\n      let bundleFilePath = getBundleFilePath(b.id);\n      if (\n        (bundleFilePath !== undefined && bundleRegex.test(bundleFilePath)) ||\n        b.id === v\n      ) {\n        return b.id;\n      }\n    }\n  }\n\n  function getAsset(v: string) {\n    let id: ?string = parseAssetLocator(v);\n\n    if (id == null) {\n      console.log(null);\n    } else {\n      try {\n        if (!hasBundleGraph()) {\n          return;\n        }\n        invariant(bundleGraph != null);\n        let asset = bundleGraph.getAssetById(id);\n        console.log('Public id', bundleGraph.getAssetPublicId(asset));\n        console.log(asset);\n      } catch (e) {\n        if (!hasAssetGraph()) {\n          return;\n        }\n        invariant(assetGraph != null);\n        let node = nullthrows(assetGraph.getNodeByContentKey(id));\n        invariant(node.type === 'asset');\n        console.log(node.value);\n      }\n    }\n  }\n\n  function _findAssetNode(v: string) {\n    if (!hasAssetGraph()) {\n      return;\n    }\n    invariant(assetGraph != null);\n    let assetRegex = new RegExp(v);\n    for (let node of assetGraph.nodes.values()) {\n      if (\n        node?.type === 'asset' &&\n        assetRegex.test(fromProjectPathRelative(node.value.filePath))\n      ) {\n        return node;\n      }\n    }\n  }\n\n  function findAsset(v: string) {\n    let node = _findAssetNode(v);\n    if (node) {\n      try {\n        if (!hasBundleGraph()) {\n          return;\n        }\n        invariant(bundleGraph != null);\n        console.log(\n          `${bundleGraph.getAssetPublicId(\n            bundleGraph.getAssetById(node.id),\n          )} ${fromProjectPathRelative(node.value.filePath)}`,\n        );\n      } catch (e) {\n        console.log(fromProjectPathRelative(node.value.filePath));\n      }\n    }\n  }\n\n  function findAssetWithSymbol(local: string) {\n    if (!hasBundleGraph() || !hasAssetGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    invariant(assetGraph != null);\n    let [, assetId, binding, ref] = nullthrows(\n      local.match(/^\\$([^$]+)\\$([^$]+)\\$(.*)$/),\n      `symbol ${local} could not be resolved`,\n    );\n\n    let asset;\n    // Search against the id used by the JSTransformer and ScopeHoistingPackager,\n    // not the final asset id, as it may have changed with further transformation.\n    for (let node of assetGraph.nodes.values()) {\n      if (node?.type === 'asset' && node.value.meta.id === assetId) {\n        asset = node;\n        break;\n      }\n    }\n\n    // If the asset couldn't be found by searching for the id,\n    // search for the local name in asset used symbols.\n    if (asset == null) {\n      outer: for (let node of assetGraph.nodes.values()) {\n        if (node?.type === 'asset' && node.value.symbols) {\n          for (let symbol of node.value.symbols.values()) {\n            if (symbol.local === local) {\n              asset = node;\n              break outer;\n            }\n          }\n        }\n      }\n    }\n\n    invariant(asset, `An asset for ${assetId} could not be found`);\n    invariant(\n      asset.type === 'asset',\n      `Expected ${assetId} to be an asset, but found a ${asset.type}`,\n    );\n\n    try {\n      console.log(\n        `${bundleGraph.getAssetPublicId(\n          bundleGraph.getAssetById(asset.id),\n        )} ${fromProjectPathRelative(asset.value.filePath)}`,\n      );\n    } catch (e) {\n      console.log(fromProjectPathRelative(asset.value.filePath));\n    }\n    if (binding === 'export' && asset.value.symbols) {\n      for (let [symbolName, symbol] of asset.value.symbols) {\n        if (symbol.local === local) {\n          if (symbol.loc) {\n            let locPath = symbol.loc.filePath;\n            let locAsset = _findAssetNode(String(locPath));\n            if (locAsset != null) {\n              try {\n                console.log(\n                  `${bundleGraph.getAssetPublicId(\n                    bundleGraph.getAssetById(locAsset.id),\n                  )} ${fromProjectPathRelative(locAsset.value.filePath)}`,\n                );\n              } catch (e) {\n                console.log(\n                  `imported as ${symbolName} from ${fromProjectPathRelative(\n                    locAsset.value.filePath,\n                  )}`,\n                );\n              }\n            } else {\n              console.log(\n                `imported as ${symbolName} from ${fromProjectPathRelative(\n                  locPath,\n                )}`,\n              );\n            }\n          } else {\n            console.log(`imported as ${symbolName}`);\n          }\n        }\n      }\n    } else if (ref) {\n      console.log(`possibly defined as ${ref}`);\n    }\n  }\n\n  function getNodeAssetGraph(v: string) {\n    if (!hasAssetGraph()) {\n      return;\n    }\n    invariant(assetGraph != null);\n    console.log(assetGraph.getNodeByContentKey(v));\n  }\n  function getNodeBundleGraph(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    console.log(bundleGraph._graph.getNodeByContentKey(v));\n  }\n\n  class Paths<T> {\n    value: T;\n    label: string;\n    suffix: string;\n    children: Array<Paths<T>> = [];\n    constructor(value: T, label = '-', suffix = '') {\n      this.value = value;\n      this.label = label;\n      this.suffix = suffix;\n    }\n    add(v: T, label: string | void, suffix: string | void): Paths<T> {\n      let next = new Paths(v, label, suffix);\n      this.children.push(next);\n      return next;\n    }\n    print(format: T => string, prefix = '') {\n      console.log(\n        `${prefix}${this.label} ${format(this.value)} ${this.suffix}`,\n      );\n      for (let i = 0; i < this.children.length; i++) {\n        this.children[i].print(format, prefix + '  ');\n      }\n    }\n  }\n\n  function _findEntries(\n    graph:\n      | ContentGraph<BundleGraphNode, BundleGraphEdgeType>\n      | ContentGraph<AssetGraphNode>,\n    v: string,\n  ) {\n    let asset = nullthrows(parseAssetLocator(v), 'Asset not found');\n\n    let paths = new Paths<NodeId>(graph.getNodeIdByContentKey(asset), ' ');\n    let cb = (id, ctx, revisiting) => {\n      let {paths, lazyOutgoing} = ctx;\n      let node = nullthrows(graph.getNode(id));\n      if (node.id === asset) return ctx;\n      if (node.type === 'asset') {\n        paths = paths.add(\n          id,\n          lazyOutgoing ? '<' : undefined,\n          revisiting ? '(revisiting)' : undefined,\n        );\n        lazyOutgoing = false;\n      } else if (node.type === 'dependency') {\n        if (node.value.priority === Priority.lazy) {\n          lazyOutgoing = true;\n        }\n      }\n      return {paths, lazyOutgoing};\n    };\n\n    // like graph.dfs, but revisiting nodes and skipping its children\n    let seen = new Set();\n    function walk(id, ctx) {\n      let revisiting = seen.has(id);\n      let newCtx = cb(id, ctx, revisiting);\n      if (revisiting) return;\n      seen.add(id);\n\n      for (let parent of graph.getNodeIdsConnectedTo(id)) {\n        walk(parent, newCtx);\n      }\n    }\n    walk(graph.getNodeIdByContentKey(asset), {paths, lazyOutgoing: false});\n\n    paths.print(id => {\n      let node = nullthrows(graph.getNode(id));\n      invariant(node.type === 'asset');\n      return fromProjectPathRelative(node.value.filePath);\n    });\n  }\n\n  function findEntriesAssetGraph(v: string) {\n    if (!hasAssetGraph()) {\n      return;\n    }\n    invariant(assetGraph != null);\n    _findEntries(assetGraph, v);\n  }\n  function findEntriesBundleGraph(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    _findEntries(bundleGraph._graph, v);\n  }\n  function findEntries(v: string) {\n    findEntriesBundleGraph(v);\n  }\n\n  function getBundlesWithAsset(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let asset = nullthrows(parseAssetLocator(v), 'Asset not found');\n    for (let b of bundleGraph.getBundlesWithAsset(\n      bundleGraph.getAssetById(asset),\n    )) {\n      let bundleFilePath = getBundleFilePath(b.id);\n      if (bundleFilePath !== undefined) {\n        console.log(\n          `${b.id} ${bundleFilePath} ${\n            b.mainEntryId != null ? `(main: ${b.mainEntryId})` : ''\n          }`,\n        );\n      }\n    }\n  }\n\n  function getBundlesWithDependency(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let node = nullthrows(bundleGraph._graph.getNodeByContentKey(v));\n    invariant(node.type === 'dependency');\n\n    for (let b of bundleGraph.getBundlesWithDependency(node.value)) {\n      let bundleFilePath = getBundleFilePath(b.id);\n      if (bundleFilePath !== undefined) {\n        console.log(\n          `${b.id} ${bundleFilePath} ${\n            b.mainEntryId != null ? `(main: ${b.mainEntryId})` : ''\n          }`,\n        );\n      }\n    }\n  }\n\n  // eslint-disable-next-line no-unused-vars\n  function getBundles(_) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    for (let b of bundleGraph.getBundles()) {\n      let bundleFilePath = getBundleFilePath(b.id);\n      if (bundleFilePath !== undefined) {\n        console.log(\n          `${b.id} ${bundleFilePath} ${\n            b.mainEntryId != null ? `(main: ${b.mainEntryId})` : ''\n          }`,\n        );\n      }\n    }\n  }\n\n  function getReferencingBundles(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let bundleId = nullthrows(parseBundleLocator(v), 'Bundle not found');\n    let bundleNodeId = bundleGraph._graph.getNodeIdByContentKey(bundleId);\n    let bundleNode = nullthrows(\n      bundleGraph._graph.getNode(bundleNodeId),\n      'Bundle not found',\n    );\n    invariant(bundleNode.type === 'bundle', 'Not a bundle');\n\n    for (let b of bundleGraph.getReferencingBundles(bundleNode.value)) {\n      let bundleFilePath = getBundleFilePath(b.id);\n      if (bundleFilePath !== undefined) {\n        console.log(\n          `${b.id} ${bundleFilePath} ${\n            b.mainEntryId != null ? `(main: ${b.mainEntryId})` : ''\n          }`,\n        );\n      }\n    }\n  }\n\n  function getIncomingDependenciesAssetGraph(v: string) {\n    if (!hasAssetGraph()) {\n      return;\n    }\n    invariant(assetGraph != null);\n    let asset = nullthrows(parseAssetLocator(v), 'Asset not found');\n    let node = nullthrows(assetGraph.getNodeByContentKey(asset));\n    invariant(node.type === 'asset');\n\n    console.log(assetGraph.getIncomingDependencies(node.value));\n  }\n  function getIncomingDependenciesBundleGraph(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let asset = nullthrows(parseAssetLocator(v), 'Asset not found');\n    let value = nullthrows(bundleGraph.getAssetById(asset));\n\n    console.log(bundleGraph.getIncomingDependencies(value));\n  }\n\n  function getIncomingDependencies(v: string) {\n    getIncomingDependenciesBundleGraph(v);\n  }\n\n  function getResolvedAsset(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let node = nullthrows(\n      bundleGraph._graph.getNodeByContentKey(v),\n      'Dependency not found',\n    );\n    invariant(\n      node.type === 'dependency',\n      'Node is not a dependency, but a ' + node.type,\n    );\n    console.log(bundleGraph.getResolvedAsset(node.value));\n  }\n\n  function getAssetWithDependency(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let node = nullthrows(\n      bundleGraph._graph.getNodeByContentKey(v),\n      'Dependency not found',\n    );\n    invariant(\n      node.type === 'dependency',\n      'Node is not a dependency, but a ' + node.type,\n    );\n    console.log(bundleGraph.getAssetWithDependency(node.value));\n  }\n\n  function traverseAssets(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let bundleId = nullthrows(parseBundleLocator(v), 'Bundle not found');\n    let node = nullthrows(\n      bundleGraph._graph.getNodeByContentKey(bundleId),\n      'Bundle not found',\n    );\n    invariant(\n      node.type === 'bundle',\n      'Node is not a bundle, but a ' + node.type,\n    );\n\n    bundleGraph.traverseAssets(node.value, asset => {\n      console.log(asset.id, asset.filePath);\n    });\n  }\n  function traverseBundle(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let bundleId = nullthrows(parseBundleLocator(v), 'Bundle not found');\n    let node = nullthrows(\n      bundleGraph._graph.getNodeByContentKey(bundleId),\n      'Bundle not found',\n    );\n    invariant(\n      node.type === 'bundle',\n      'Node is not a bundle, but a ' + node.type,\n    );\n\n    bundleGraph.traverseBundle(node.value, node => {\n      if (node.type === 'asset') {\n        console.log(node.id, node.value.filePath);\n      } else {\n        console.log(\n          node.id,\n          node.value.sourcePath,\n          '->',\n          node.value.specifier,\n          node.value.symbols\n            ? `(${[...node.value.symbols.keys()].join(',')})`\n            : '',\n          node.excluded ? `- excluded` : '',\n        );\n      }\n    });\n  }\n\n  function getBundle(v: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let bundleRegex = new RegExp(v);\n    for (let b of bundleGraph.getBundles()) {\n      let bundleFilePath = getBundleFilePath(b.id);\n      if (\n        (bundleFilePath !== undefined && bundleRegex.test(bundleFilePath)) ||\n        b.id === v\n      ) {\n        console.log(getBundleFilePath(b.id), b);\n      }\n    }\n  }\n\n  function findBundleReason(bundle: string, asset: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let bundleId = nullthrows(parseBundleLocator(bundle), 'Bundle not found');\n    let bundleNodeId = bundleGraph._graph.getNodeIdByContentKey(bundleId);\n    let bundleNode = nullthrows(\n      bundleGraph._graph.getNode(bundleNodeId),\n      'Bundle not found',\n    );\n    invariant(bundleNode.type === 'bundle', 'Not a bundle');\n    let assetId = nullthrows(parseAssetLocator(asset), 'Asset not found');\n    let assetNodeId = bundleGraph._graph.getNodeIdByContentKey(assetId);\n    let assetNode = nullthrows(\n      bundleGraph._graph.getNode(assetNodeId),\n      'Asset not found',\n    );\n    invariant(assetNode.type === 'asset', 'Not an asset');\n\n    invariant(\n      bundleGraph._graph.hasEdge(\n        bundleNodeId,\n        assetNodeId,\n        bundleGraphEdgeTypes.contains,\n      ),\n      'Asset is not part of the bundle',\n    );\n\n    console.log(\n      '# Asset is main entry of bundle:',\n      bundleNode.value.mainEntryId === assetId,\n    );\n\n    console.log(\n      '# Asset is an entry of bundle:',\n      bundleNode.value.entryAssetIds.includes(assetId),\n    );\n\n    console.log('# Incoming dependencies contained in the bundle:');\n    for (let incoming of bundleGraph._graph.getNodeIdsConnectedTo(\n      assetNodeId,\n    )) {\n      if (\n        bundleGraph._graph.hasEdge(\n          bundleNodeId,\n          incoming,\n          bundleGraphEdgeTypes.contains,\n        )\n      ) {\n        console.log(bundleGraph._graph.getNode(incoming));\n      }\n    }\n\n    console.log(\n      '# Incoming dependencies contained in referencing bundles (using this bundle as a shared bundle)',\n    );\n    let referencingBundles = bundleGraph.getReferencingBundles(\n      bundleNode.value,\n    );\n    for (let incoming of bundleGraph._graph.getNodeIdsConnectedTo(\n      assetNodeId,\n    )) {\n      if (\n        referencingBundles.some(ref =>\n          bundleGraph._graph.hasEdge(\n            bundleGraph._graph.getNodeIdByContentKey(ref.id),\n            incoming,\n            bundleGraphEdgeTypes.contains,\n          ),\n        )\n      ) {\n        console.log(bundleGraph._graph.getNode(incoming));\n      }\n    }\n  }\n\n  function _getIncomingNodeOfType(bundleGraph, node, type: string) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    const bundleGraphNodeId = bundleGraph._graph.getNodeIdByContentKey(node.id);\n    return bundleGraph._graph\n      .getNodeIdsConnectedTo(bundleGraphNodeId, -1)\n      .map(id => nullthrows(bundleGraph._graph.getNode(id)))\n      .find(node => node.type == type);\n  }\n\n  // We find the priority of a Bundle or BundleGroup by looking at its incoming dependencies.\n  // If a Bundle does not have an incoming dependency, we look for an incoming BundleGroup and its dependency\n  // e.g. Dep(priority = 1) -> BundleGroup -> Bundle means that the Bundle has priority 1.\n  function _getBundlePriority(bundleGraph, bundle) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let node = _getIncomingNodeOfType(bundleGraph, bundle, 'dependency');\n\n    if (node == null) {\n      node = _getIncomingNodeOfType(bundleGraph, bundle, 'bundle_group');\n      if (node == null) return null;\n      node = _getIncomingNodeOfType(bundleGraph, node, 'dependency');\n    }\n\n    if (node == null) return null;\n\n    invariant(node.type === 'dependency', 'Not a dependency');\n\n    return node.value.priority;\n  }\n\n  function _findEntryBundle(bundleGraph, node) {\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    const bundleGraphNodeId = bundleGraph._graph.getNodeIdByContentKey(node.id);\n    const entryBundleGroup = bundleGraph._graph\n      .getNodeIdsConnectedTo(bundleGraphNodeId, -1)\n      .map(id => nullthrows(bundleGraph._graph.getNode(id)))\n      .find(\n        node =>\n          node.type === 'bundle_group' &&\n          bundleGraph.isEntryBundleGroup(node.value),\n      );\n\n    return entryBundleGroup;\n  }\n  // eslint-disable-next-line no-unused-vars\n  function inspectCache(_) {\n    // displays sizing of various entries of the cache\n    let table: Array<Array<string | number>> = [];\n    table.push([\n      'Graphs',\n      'Size (bytes)',\n      'Deserialize (ms)',\n      'Serialize (ms)',\n    ]);\n    let serialized: Map<string, number> = new Map();\n    serialized.set('RequestGraph', timeSerialize(requestTracker));\n    serialized.set('BundleGraph', timeSerialize(bundleGraph));\n    serialized.set('AssetGraph', timeSerialize(assetGraph));\n    for (let [name, info] of nullthrows(cacheInfo).entries()) {\n      if (\n        (name === 'RequestGraph' && !hasRequestTracker()) ||\n        (name === 'BundleGraph' && !hasBundleGraph()) ||\n        (name === 'AssetGraph' && !hasAssetGraph())\n      ) {\n        continue;\n      }\n      let s = serialized.get(name);\n      invariant(s != null);\n      table.push([name, ...info, s]);\n    }\n    function getColumnSum(t: Array<Array<string | number>>, col: number) {\n      if (t == null) {\n        return '';\n      }\n      const initialValue = 0;\n      let column = t.map(r => r[col]);\n      column.shift();\n      invariant(column != null);\n      return column.reduce(\n        (accumulator, currentValue) => accumulator + currentValue,\n        initialValue,\n      );\n    }\n    table.push([\n      'Totals',\n      getColumnSum(table, 1),\n      getColumnSum(table, 2),\n      getColumnSum(table, 3),\n    ]);\n    _printStatsTable('Cache Info', table);\n  }\n\n  function timeSerialize(graph) {\n    let date = Date.now();\n    serialize(graph);\n    date = Date.now() - date;\n    return date;\n  }\n  function _printStatsTable(header, data) {\n    const config = {\n      columnDefault: {\n        width: 18,\n      },\n      header: {\n        alignment: 'center',\n        content: header,\n      },\n    };\n\n    console.log(table(data, config));\n  }\n\n  // eslint-disable-next-line no-unused-vars\n  function stats(_) {\n    let ag = {\n      asset: 0,\n      dependency: 0,\n      asset_group: 0,\n    };\n\n    if (hasAssetGraph()) {\n      invariant(assetGraph != null);\n      for (let n of assetGraph.nodes) {\n        if (n && n.type in ag) {\n          // $FlowFixMe\n          ag[n.type]++;\n        }\n      }\n      _printStatsTable('# Asset Graph Node Counts', Object.entries(ag));\n    }\n\n    if (!hasBundleGraph()) {\n      return;\n    }\n    invariant(bundleGraph != null);\n    let bg = {\n      dependency: 0,\n      bundle: 0,\n      bundle_group: 0,\n      asset_node_modules: 0,\n      asset_source: 0,\n    };\n\n    let b_type = {\n      entry: 0,\n      shared: 0,\n      async: 0,\n      parallel: 0,\n      sync: 0,\n    };\n\n    let b_ext = {};\n\n    const entries = new Set();\n\n    for (let n of bundleGraph._graph.nodes) {\n      if (n?.type === 'bundle_group') {\n        bg.bundle_group++;\n      } else if (n?.type === 'bundle') {\n        bg.bundle++;\n\n        // $FlowFixMe\n        b_ext[n.value.type] = (b_ext[n.value.type] || 0) + 1;\n\n        // $FlowFixMe\n        const entry_group = _findEntryBundle(bundleGraph, n);\n\n        if (entry_group != null && !entries.has(entry_group.id)) {\n          b_type.entry++;\n          entries.add(entry_group.id);\n        } else if (n.value.mainEntryId == null) {\n          // In general, !bundle.mainEntryId means that it is shared. In the case of an async and shared bundle, only count it as shared.\n          b_type.shared++;\n        } else {\n          const priority = _getBundlePriority(bundleGraph, n);\n\n          if (priority == Priority.lazy) {\n            b_type.async++;\n          } else if (priority == Priority.parallel) {\n            b_type.parallel++;\n          } else if (priority == Priority.sync) {\n            b_type.sync++;\n          }\n        }\n      } else if (n?.type === 'asset') {\n        if (\n          // $FlowFixMe\n          fromProjectPathRelative(n.value.filePath).includes('node_modules')\n        ) {\n          bg.asset_node_modules++;\n        } else {\n          bg.asset_source++;\n        }\n      } else if (n?.type === 'dependency') {\n        bg.dependency++;\n      }\n    }\n\n    _printStatsTable('# Bundle Graph Node Counts', Object.entries(bg));\n    _printStatsTable('# Bundles By Type', Object.entries(b_type));\n    _printStatsTable('# Bundles By Extension', Object.entries(b_ext));\n\n    // Assert that counts for each breakdown are correct\n\n    let sum_b_ext = 0;\n    for (let k in b_ext) {\n      sum_b_ext += b_ext[k];\n    }\n\n    let sum_b_type = 0;\n    for (let k in b_type) {\n      sum_b_type += b_type[k];\n    }\n\n    invariant(\n      bg.bundle == sum_b_type,\n      `Bundles by type ${sum_b_type} does not equal total ${bg.bundle}`,\n    );\n    invariant(\n      bg.bundle == sum_b_ext,\n      `Bundles by extension ${sum_b_ext} does not equal total ${bg.bundle}`,\n    );\n  }\n\n  // -------------------------------------------------------\n\n  if (initialCmd != null) {\n    (async () => {\n      await eval(initialCmd);\n      process.exit(0);\n    })();\n  } else {\n    console.log(\n      'See .help. The graphs can be accessed via `assetGraph`, `bundleGraph` and `requestTracker`.',\n    );\n    process.on('uncaughtException', function (err) {\n      console.error(err);\n      server.displayPrompt();\n    });\n\n    const server = repl.start({useColors: true, useGlobal: true});\n    // $FlowFixMe[prop-missing]\n    server.setupHistory(\n      path.join(os.homedir(), '.parcel_query_history'),\n      () => {},\n    );\n\n    // $FlowFixMe[prop-missing]\n    server.context.bundleGraph = bundleGraph;\n    // $FlowFixMe[prop-missing]\n    server.context.assetGraph = assetGraph;\n    // $FlowFixMe[prop-missing]\n    server.context.requestTracker = requestTracker;\n    // $FlowFixMe[prop-missing]\n    server.context.cacheInfo = cacheInfo;\n    for (let [name, cmd] of new Map([\n      [\n        'getAsset',\n        {\n          help: 'args: <id | public id | filepath>',\n          action: getAsset,\n        },\n      ],\n      [\n        'getNodeAssetGraph',\n        {\n          help: 'args: <content key>. Find node by content key in the asset graph',\n          action: getNodeAssetGraph,\n        },\n      ],\n      [\n        'getNodeBundleGraph',\n        {\n          help: 'args: <content key>. Find node by content key in the bundle graph',\n          action: getNodeBundleGraph,\n        },\n      ],\n      [\n        'findEntriesAssetGraph',\n        {\n          help: 'args: <id | public id | filepath>. List paths from an asset to entry points (in asset graph)',\n          action: findEntriesAssetGraph,\n        },\n      ],\n      [\n        'findEntriesBundleGraph',\n        {\n          help: 'args: <id | public id | filepath>. List paths from an asset to entry points (in bundle graph)',\n          action: findEntriesBundleGraph,\n        },\n      ],\n      [\n        'findEntries',\n        {\n          help: '= findEntriesBundleGraph',\n          action: findEntries,\n        },\n      ],\n      [\n        'getBundlesWithAsset',\n        {\n          help: 'args: <id | public id | filepath>. Gets bundles containing the asset',\n          action: getBundlesWithAsset,\n        },\n      ],\n      [\n        'getBundlesWithDependency',\n        {\n          help: 'args: <id>. Gets bundles containing the dependency',\n          action: getBundlesWithDependency,\n        },\n      ],\n      [\n        'getIncomingDependenciesAssetGraph',\n        {\n          help: 'args: <asset: id | public id | filepath regex>',\n          action: getIncomingDependenciesAssetGraph,\n        },\n      ],\n      [\n        'getIncomingDependenciesBundleGraph',\n        {\n          help: 'args: <asset: id | public id | filepath regex>',\n          action: getIncomingDependenciesBundleGraph,\n        },\n      ],\n      [\n        'getIncomingDependencies',\n        {\n          help: '= getIncomingDependenciesBundleGraph',\n          action: getIncomingDependencies,\n        },\n      ],\n      [\n        'getResolvedAsset',\n        {\n          help: 'args: <dependency id>. Resolve the dependency',\n          action: getResolvedAsset,\n        },\n      ],\n      [\n        'getAssetWithDependency',\n        {\n          help: 'args: <dependency id>. Show which asset created the dependency',\n          action: getAssetWithDependency,\n        },\n      ],\n      [\n        'traverseAssets',\n        {\n          help: 'args: <bundle id>. List assets in bundle',\n          action: traverseAssets,\n        },\n      ],\n      [\n        'traverseBundle',\n        {\n          help: 'args: <bundle id>. List assets and dependencies in bundle',\n          action: traverseBundle,\n        },\n      ],\n      [\n        'getBundle',\n        {\n          help: 'args: <name prefix|bundle id>. List matching bundles',\n          action: getBundle,\n        },\n      ],\n      [\n        'findBundleReason',\n        {\n          help: 'args: <bundle> <asset>. Why is the asset in the bundle',\n          action: v => findBundleReason(...v.split(' ')),\n        },\n      ],\n      [\n        'getBundles',\n        {\n          help: 'List all bundles',\n          action: getBundles,\n        },\n      ],\n      [\n        'getReferencingBundles',\n        {\n          help: 'args: <bundle>. List bundles that reference the bundle',\n          action: getReferencingBundles,\n        },\n      ],\n      [\n        'stats',\n        {\n          help: 'Statistics',\n          action: stats,\n        },\n      ],\n      [\n        'findAsset',\n        {\n          help: 'args: <regex>. List assets matching the filepath regex',\n          action: findAsset,\n        },\n      ],\n      [\n        'inspectCache',\n        {\n          help: 'Cache Information',\n          action: inspectCache,\n        },\n      ],\n      [\n        'findAssetWithSymbol',\n        {\n          help: 'args: <local>. Get the asset that defines the symbol with the given local name',\n          action: findAssetWithSymbol,\n        },\n      ],\n    ])) {\n      // $FlowFixMe\n      server.context[name] = cmd.action;\n      // $FlowFixMe\n      server.defineCommand(name, {\n        // $FlowFixMe\n        help: '📦 ' + cmd.help,\n        action: v => {\n          // $FlowFixMe\n          server.clearBufferedCommand();\n          // $FlowFixMe\n          try {\n            cmd.action(v);\n          } finally {\n            server.displayPrompt();\n          }\n        },\n      });\n    }\n  }\n}\n"
  },
  {
    "path": "packages/dev/query/src/deep-imports.js",
    "content": "// @flow\n/* eslint-disable monorepo/no-internal-import */\nimport typeof AssetGraph from '@parcel/core/src/AssetGraph.js';\nimport typeof BundleGraph, {\n  bundleGraphEdgeTypes,\n} from '@parcel/core/src/BundleGraph.js';\nimport typeof RequestTracker, {\n  RequestGraph,\n} from '@parcel/core/src/RequestTracker.js';\nimport typeof {requestGraphEdgeTypes} from '@parcel/core/src/RequestTracker.js';\nimport typeof {LMDBCache} from '@parcel/cache/src/LMDBCache.js';\nimport typeof {Priority} from '@parcel/core/src/types.js';\nimport typeof {fromProjectPathRelative} from '@parcel/core/src/projectPath.js';\n\nconst v =\n  process.env.PARCEL_BUILD_ENV === 'production'\n    ? {\n        // Split up require specifier to outsmart packages/dev/babel-register/babel-plugin-module-translate.js\n        // $FlowFixMe(unsupported-syntax)\n        AssetGraph: require('@parcel/core' + '/lib/AssetGraph.js').default,\n        // $FlowFixMe(unsupported-syntax)\n        BundleGraph: require('@parcel/core' + '/lib/BundleGraph.js'),\n        // $FlowFixMe(unsupported-syntax)\n        RequestTracker: require('@parcel/core' + '/lib/RequestTracker.js'),\n        // $FlowFixMe(unsupported-syntax)\n        LMDBCache: require('@parcel/cache' + '/lib/LMDBCache.js').LMDBCache,\n        // $FlowFixMe(unsupported-syntax)\n        Priority: require('@parcel/core' + '/lib/types.js').Priority,\n        // $FlowFixMe(unsupported-syntax)\n        fromProjectPathRelative: require('@parcel/core' + '/lib/projectPath.js')\n          .fromProjectPathRelative,\n      }\n    : {\n        AssetGraph: require('@parcel/core/src/AssetGraph.js').default,\n        BundleGraph: require('@parcel/core/src/BundleGraph.js'),\n        RequestTracker: require('@parcel/core/src/RequestTracker.js'),\n        LMDBCache: require('@parcel/cache/src/LMDBCache.js').LMDBCache,\n        Priority: require('@parcel/core/src/types.js').Priority,\n        fromProjectPathRelative: require('@parcel/core/src/projectPath.js')\n          .fromProjectPathRelative,\n      };\n\nmodule.exports = (v: {|\n  AssetGraph: AssetGraph,\n  BundleGraph: {\n    default: BundleGraph,\n    bundleGraphEdgeTypes: bundleGraphEdgeTypes,\n    ...\n  },\n  RequestTracker: {\n    default: RequestTracker,\n    RequestGraph: RequestGraph,\n    requestGraphEdgeTypes: requestGraphEdgeTypes,\n    ...\n  },\n  LMDBCache: LMDBCache,\n  Priority: Priority,\n  fromProjectPathRelative: fromProjectPathRelative,\n|});\n"
  },
  {
    "path": "packages/dev/query/src/index.js",
    "content": "// @flow strict-local\n/* eslint-disable no-console, monorepo/no-internal-import */\nimport type {ContentKey, NodeId} from '@parcel/graph';\nimport type {PackagedBundleInfo} from '@parcel/core/src/types';\n\nimport fs from 'fs';\nimport path from 'path';\nimport v8 from 'v8';\nimport nullthrows from 'nullthrows';\nimport invariant from 'assert';\n\nconst {\n  AssetGraph,\n  BundleGraph: {default: BundleGraph},\n  RequestTracker: {\n    default: RequestTracker,\n    RequestGraph,\n    requestGraphEdgeTypes,\n  },\n  LMDBCache,\n} = require('./deep-imports.js');\n\nexport async function loadGraphs(cacheDir: string): Promise<{|\n  assetGraph: ?AssetGraph,\n  bundleGraph: ?BundleGraph,\n  requestTracker: ?RequestTracker,\n  bundleInfo: ?Map<ContentKey, PackagedBundleInfo[]>,\n  cacheInfo: ?Map<string, Array<string | number>>,\n|}> {\n  function getMostRecentCacheBlobs() {\n    let files = fs.readdirSync(cacheDir);\n\n    let result = {};\n\n    let blobsToFind: Array<{|\n      name: string,\n      check: (v: string) => boolean,\n      mtime?: Date,\n    |}> = [\n      {\n        name: 'requestGraphBlob',\n        check: basename => basename.endsWith('RequestGraph'),\n      },\n      {\n        name: 'bundleGraphBlob',\n        check: basename => basename.endsWith('BundleGraph'),\n      },\n      {\n        name: 'assetGraphBlob',\n        check: basename => basename.endsWith('AssetGraph'),\n      },\n    ];\n\n    for (let file of files) {\n      let basename = path.basename(file);\n      let match = blobsToFind.find(({check}) => check(basename));\n\n      if (match) {\n        let stat = fs.statSync(path.join(cacheDir, file));\n\n        if (!match.mtime || stat.mtime > match.mtime) {\n          match.mtime = stat.mtime;\n          result[match.name] = file;\n        }\n      }\n    }\n\n    return result;\n  }\n\n  let cacheInfo: Map<string, Array<string | number>> = new Map();\n\n  let {requestGraphBlob, bundleGraphBlob, assetGraphBlob} =\n    getMostRecentCacheBlobs();\n  const cache = new LMDBCache(cacheDir);\n\n  // Get requestTracker\n  let requestTracker;\n  if (requestGraphBlob) {\n    try {\n      let file = await cache.getLargeBlob(path.basename(requestGraphBlob));\n      let timeToDeserialize = Date.now();\n      let obj = v8.deserialize(file);\n      timeToDeserialize = Date.now() - timeToDeserialize;\n\n      requestTracker = new RequestTracker({\n        graph: RequestGraph.deserialize(obj.value),\n        // $FlowFixMe\n        farm: null,\n        // $FlowFixMe\n        options: null,\n      });\n      cacheInfo.set('RequestGraph', [Buffer.byteLength(file)]);\n      cacheInfo.get('RequestGraph')?.push(timeToDeserialize);\n    } catch (e) {\n      console.log('Error loading Request Graph\\n', e);\n    }\n  }\n\n  // Get bundleGraph\n  let bundleGraph;\n  if (bundleGraphBlob) {\n    try {\n      let file = await cache.getLargeBlob(path.basename(bundleGraphBlob));\n\n      let timeToDeserialize = Date.now();\n      let obj = v8.deserialize(file);\n      invariant(obj.bundleGraph != null);\n      bundleGraph = BundleGraph.deserialize(obj.bundleGraph.value);\n      timeToDeserialize = Date.now() - timeToDeserialize;\n\n      cacheInfo.set('BundleGraph', [Buffer.byteLength(file)]);\n      cacheInfo.get('BundleGraph')?.push(timeToDeserialize);\n    } catch (e) {\n      console.log('Error loading Bundle Graph\\n', e);\n    }\n  }\n\n  // Get assetGraph\n  let assetGraph;\n  if (assetGraphBlob) {\n    try {\n      let file = await cache.getLargeBlob(path.basename(assetGraphBlob));\n\n      let timeToDeserialize = Date.now();\n      let obj = v8.deserialize(file);\n      invariant(obj.assetGraph != null);\n      assetGraph = AssetGraph.deserialize(obj.assetGraph.value);\n      timeToDeserialize = Date.now() - timeToDeserialize;\n\n      cacheInfo.set('AssetGraph', [Buffer.byteLength(file)]);\n      cacheInfo.get('AssetGraph')?.push(timeToDeserialize);\n    } catch (e) {\n      console.log('Error loading Asset Graph\\n', e);\n    }\n  }\n\n  function getSubRequests(id: NodeId) {\n    return requestTracker.graph\n      .getNodeIdsConnectedFrom(id, requestGraphEdgeTypes.subrequest)\n      .map(n => nullthrows(requestTracker.graph.getNode(n)));\n  }\n\n  // Load graphs by finding the main subrequests and loading their results\n  let bundleInfo;\n  try {\n    invariant(requestTracker);\n    let buildRequestId = requestTracker.graph.getNodeIdByContentKey(\n      'parcel_build_request',\n    );\n    let buildRequestNode = nullthrows(\n      requestTracker.graph.getNode(buildRequestId),\n    );\n    invariant(\n      buildRequestNode.type === 1 && buildRequestNode.requestType === 1,\n    );\n    let buildRequestSubRequests = getSubRequests(buildRequestId);\n\n    let writeBundlesRequest = buildRequestSubRequests.find(\n      n => n.type === 1 && n.requestType === 11,\n    );\n    if (writeBundlesRequest != null) {\n      invariant(writeBundlesRequest.type === 1);\n      // $FlowFixMe[incompatible-cast]\n      bundleInfo = (nullthrows(writeBundlesRequest.result): Map<\n        ContentKey,\n        PackagedBundleInfo[],\n      >);\n    }\n  } catch (e) {\n    console.log('Error loading bundleInfo\\n', e);\n  }\n\n  return {assetGraph, bundleGraph, requestTracker, bundleInfo, cacheInfo};\n}\n"
  },
  {
    "path": "packages/dev/repl/.eslintrc.json",
    "content": "{\n  \"parserOptions\": {\n    \"sourceType\": \"module\",\n    \"ecmaVersion\": 6\n  },\n  \"extends\": [\"eslint:recommended\", \"react-app\"],\n  \"env\": {\n    \"browser\": true,\n    \"es6\": true\n  },\n  \"rules\": {\n    \"react/jsx-no-bind\": \"off\",\n    \"no-console\": \"off\",\n    \"no-use-before-define\": \"off\"\n  },\n  \"globals\": {\n    \"globalThis\": \"readonly\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/repl/.gitignore",
    "content": ".vercel\ncommit\n"
  },
  {
    "path": "packages/dev/repl/.vercelignore",
    "content": "SimplePackageInstaller\nnode_modules\nsrc\nsrc-standalone\n"
  },
  {
    "path": "packages/dev/repl/NOTES.md",
    "content": "### REPL Issues\n\n**Bugs**:\n\n- babel shims out all file access in the browser -> babelrc is ignored\n- glob doesn't work\n- `extends` in a parcelrc are read from fs, not `require`d\n- removing an asset can make it look as though one of the remaining assets is an entry, but it actually isn't\n\n**Improvements**:\n\n- Preview\n  - JS preview: use util.inspect\n  - JS Preview: show error (Uncaught ReferenceError: ... is not defined)\n  - use Parcel's devserver middleware in SW\n- Lazy load plugins types\n- install pkg using Yarn (via custom PackageInstaller)\n- Add a \"Show more\"/”Expand\" pull tab to options box\n"
  },
  {
    "path": "packages/dev/repl/SimplePackageInstaller/index.js",
    "content": "// @flow\nimport type {FilePath} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {PackageInstaller, ModuleRequest} from '@parcel/package-manager';\n\nimport fetch from 'isomorphic-fetch';\nimport path from 'path';\nimport semver from 'semver';\nimport untar from './untar.js';\n\nasync function findPackage(fs, dir) {\n  while (dir !== '/' && path.basename(dir) !== 'node_modules') {\n    const pkg = path.join(dir, 'package.json');\n    if (await fs.exists(pkg)) {\n      return pkg;\n    }\n\n    dir = path.dirname(dir);\n  }\n\n  return null;\n}\n\ntype ResolveCacheEntry = {|\n  name: string,\n  version: string,\n  dependencies: {|[string]: string|},\n  devDependencies: {|[string]: string|},\n  dist: {|\n    fileCount: number,\n    integrity: string,\n    shasum: string,\n    tarball: string,\n    unpackedSize: number,\n  |},\n|};\n\nexport default class SimplePackageInstaller implements PackageInstaller {\n  fs: FileSystem;\n  cache: {|\n    resolve: Map<string, ResolveCacheEntry>,\n    fetch: Map<string, Map<string, Uint8Array>>,\n  |};\n\n  constructor(fs: FileSystem) {\n    this.fs = fs;\n    this.cache = {\n      resolve: new Map(),\n      fetch: new Map(),\n    };\n  }\n\n  // https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md\n  // https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md\n  async _npmResolve(name: string, version: string): Promise<ResolveCacheEntry> {\n    // reuse newest compatible version in cache if possible?\n    const cacheEntry = this.cache.resolve.get(`${name}@${version}`);\n    if (cacheEntry) {\n      return cacheEntry;\n    }\n\n    const res = await fetch(`https://registry.npmjs.org/${name}`, {\n      headers: {\n        Accept: 'application/vnd.npm.install-v1+json',\n        Origin: 'repl.parceljs.org',\n      },\n    });\n    if (!res.ok) {\n      throw new Error(`npmResolve failed: fetching ${name} - ${res.status}`);\n    }\n    const data: {|\n      name: string,\n      modified: string,\n      'dist-tags': {|[string]: string|},\n      versions: {|[string]: ResolveCacheEntry|},\n    |} = await res.json();\n\n    let resolvedVersion;\n    if (version in data['dist-tags']) {\n      resolvedVersion = data['dist-tags'][version];\n    } else if (semver.validRange(version)) {\n      // $FlowFixMe\n      resolvedVersion = (semver.maxSatisfying(\n        Object.keys(data.versions),\n        version,\n      ): string);\n      if (!resolvedVersion) {\n        throw new Error(`npmResolve failed: resolving ${name}@${version}`);\n      }\n    } else {\n      throw new Error(\n        `${name}@${version}: only npm semver dependencies are currently supported.`,\n      );\n    }\n    this.cache.resolve.set(\n      `${name}@${version}`,\n      data.versions[resolvedVersion],\n    );\n    return data.versions[resolvedVersion];\n  }\n\n  async _npmFetch(tarball: string): Promise<Map<string, Uint8Array>> {\n    const cacheEntry = this.cache.fetch.get(tarball);\n    if (cacheEntry) {\n      return cacheEntry;\n    }\n\n    const res = await fetch(tarball);\n    if (!res.ok) {\n      throw new Error(`npmFetch failed: fetching ${tarball} - ${res.status}`);\n    }\n\n    let result;\n    if (!res.arrayBuffer) {\n      // node\n      var bufs = [];\n      res.body.on('data', function (d) {\n        bufs.push(d);\n      });\n\n      const buffer = await new Promise(resolve =>\n        res.body.on('end', () => {\n          resolve(Buffer.concat(bufs));\n        }),\n      );\n\n      result = new ArrayBuffer(buffer.length);\n      var view = new Uint8Array(result);\n      for (var i = 0; i < buffer.length; ++i) {\n        view[i] = buffer[i];\n      }\n    } else {\n      // browser\n      result = await res.arrayBuffer();\n    }\n\n    let untarred = untar(result);\n\n    this.cache.fetch.set(tarball, untarred);\n    return untarred;\n  }\n\n  async _getDependency(\n    name: string,\n    version: string,\n  ): Promise<{|\n    deps: Array<[string, string]>,\n    files: Map<string, Uint8Array>,\n    name: string,\n  |}> {\n    let {\n      dependencies: deps,\n      dist: {tarball},\n    } = await this._npmResolve(name, version);\n    let files = await this._npmFetch(tarball);\n    return {\n      name,\n      // $FlowFixMe\n      deps: ((deps ? Object.entries(deps) : []): Array<[string, string]>),\n      files,\n    };\n  }\n\n  async _installDependenciesInto(\n    dependencies: Array<[string, string]>,\n    nodeModules: string,\n  ) {\n    console.log('_installDependenciesInto', dependencies, nodeModules);\n    await this.fs.mkdirp(nodeModules);\n    await Promise.all(\n      dependencies.map(async ([name, version]) => {\n        let {deps, files} = await this._getDependency(name, version);\n        await this.fs.mkdirp(path.join(nodeModules, name));\n        for (let [filename, arrayBuffer] of files) {\n          const p = path.join(nodeModules, name, filename);\n          await this.fs.mkdirp(path.dirname(p));\n\n          await this.fs.writeFile(\n            p,\n            // $FlowFixMe\n            /* process.browser ? arrayBuffer :  */ Buffer.from(\n              arrayBuffer.buffer,\n            ),\n          );\n        }\n\n        if (deps.length) {\n          await this._installDependenciesInto(\n            deps,\n            path.join(nodeModules, name, 'node_modules'),\n          );\n        }\n      }),\n    );\n  }\n\n  async init({cwd, dev = true}: {|cwd: string, dev: boolean|}) {\n    console.log('init', cwd);\n    let pkgPath = await findPackage(this.fs, cwd);\n    if (pkgPath) {\n      let nodeModules = path.resolve(path.dirname(pkgPath), 'node_modules');\n\n      let pkg = JSON.parse(await this.fs.readFile(pkgPath, 'utf8'));\n      // $FlowFixMe\n      let dependencies: Array<[string, string]> = [\n        pkg.dependencies,\n        dev && pkg.devDependencies,\n      ]\n        .filter(Boolean)\n        // $FlowFixMe\n        .map(v => (Object.entries(v): Array<[string, string]>))\n        .flat(1);\n\n      // if (only) {\n      //   dependencies = dependencies.filter(([name]) => only.includes(name));\n      // }\n\n      await this._installDependenciesInto(dependencies, nodeModules);\n    }\n  }\n\n  async install({\n    modules,\n    cwd,\n    saveDev = false,\n  }: {|\n    modules: Array<ModuleRequest>,\n    fs: FileSystem,\n    cwd: FilePath,\n    packagePath?: ?FilePath,\n    saveDev?: boolean,\n  |}) {\n    try {\n      // console.log('install', modules, cwd, saveDev);\n      let pkgPath = await findPackage(this.fs, cwd);\n      let pkg = pkgPath\n        ? JSON.parse(await this.fs.readFile(pkgPath, 'utf8'))\n        : {};\n\n      let dest;\n      if (saveDev) {\n        dest = pkg.devDependencies = pkg.devDependencies || {};\n      } else {\n        dest = pkg.dependencies = pkg.dependencies || {};\n      }\n\n      let modulesResolved: Array<[string, string]> = await Promise.all(\n        modules\n          .filter(({name}) => !dest[name])\n          .map(\n            async ({name, range}) =>\n              ([\n                name,\n                (await this._npmResolve(name, range || 'latest')).version,\n              ]: [string, string]),\n          ),\n      );\n\n      for (let [module, version] of modulesResolved) {\n        dest[module] = `^${version}`;\n      }\n\n      await this.fs.writeFile(\n        pkgPath || path.join(cwd, 'package.json'),\n        JSON.stringify(pkg),\n      );\n      await this._installDependenciesInto(\n        modulesResolved,\n        path.join(cwd, 'node_modules'),\n      );\n    } catch (e) {\n      console.error(e);\n      throw e;\n    }\n  }\n}\n"
  },
  {
    "path": "packages/dev/repl/SimplePackageInstaller/untar.js",
    "content": "//@flow\nimport {inflate} from '@mischnic/pako';\n\nfunction gunzip(arrayBuffer) {\n  return inflate(arrayBuffer);\n}\n\nfunction bufferSliceNull(view, offset, length) {\n  const data = view.slice(offset, offset + length);\n\n  for (let i = 0; i < data.length; i++) {\n    if (data[i] === 0) return data.slice(0, i);\n  }\n  return data;\n}\n\nfunction roundUpToMultipleOf512(v) {\n  return v + (512 - (v % 512 || 512));\n}\n\nconst TAR_HEADER_OFFSETS = {\n  // [offset, length]\n  filename: [0, 100],\n  filesize: [124, 12], // ascii octal\n};\n\nexport default function untar(raw: ArrayBuffer): Map<string, Uint8Array> {\n  let decompressed = gunzip(raw);\n\n  let files = new Map<string, Uint8Array>();\n\n  let view = new Uint8Array(decompressed);\n  let currentHeaderStart = 0;\n  while (currentHeaderStart <= view.length) {\n    let filename = Array.from(\n      bufferSliceNull(\n        view,\n        currentHeaderStart + TAR_HEADER_OFFSETS.filename[0],\n        TAR_HEADER_OFFSETS.filename[1],\n      ),\n    )\n      .map(c => String.fromCharCode(c))\n      .join('');\n\n    if (!filename) break;\n\n    let filesize = parseInt(\n      Array.from(\n        bufferSliceNull(\n          view,\n          currentHeaderStart + TAR_HEADER_OFFSETS.filesize[0],\n          TAR_HEADER_OFFSETS.filesize[1],\n        ),\n      )\n        .map(c => String.fromCharCode(c))\n        .join(''),\n      8,\n    );\n    if (isNaN(filesize)) {\n      throw new Error(`untarring failed: ${currentHeaderStart}@${filename}`);\n    }\n\n    let data = view.slice(\n      currentHeaderStart + 512,\n      currentHeaderStart + 512 + filesize,\n    );\n    files.set(filename.slice('package/'.length), data);\n\n    currentHeaderStart = roundUpToMultipleOf512(\n      currentHeaderStart + 512 + filesize,\n    );\n  }\n\n  return files;\n}\n"
  },
  {
    "path": "packages/dev/repl/package.json",
    "content": "{\n  \"name\": \"@parcel/repl\",\n  \"version\": \"0.5.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"start\": \"PARCEL_BUILD_REPL=1 parcel src/index.html --no-source-maps\",\n    \"build\": \"yarn prepare && PARCEL_BUILD_REPL=1 parcel build src/index.html --no-source-maps\",\n    \"serve\": \"serve dist/ -c ../serve.json\",\n    \"prepare\": \"node write-commit.js\"\n  },\n  \"dependencies\": {\n    \"@codemirror/autocomplete\": \"^6.7.1\",\n    \"@codemirror/commands\": \"^6.2.4\",\n    \"@codemirror/lang-css\": \"^6.2.0\",\n    \"@codemirror/lang-html\": \"^6.4.3\",\n    \"@codemirror/lang-javascript\": \"^6.1.8\",\n    \"@codemirror/lang-json\": \"^6.0.1\",\n    \"@codemirror/language\": \"^6.6.0\",\n    \"@codemirror/lint\": \"^6.2.1\",\n    \"@codemirror/search\": \"^6.4.0\",\n    \"@codemirror/state\": \"^6.2.0\",\n    \"@codemirror/theme-one-dark\": \"^6.1.2\",\n    \"@codemirror/view\": \"^6.12.0\",\n    \"@lezer/common\": \"^1.2.3\",\n    \"@mischnic/dot-svg\": \"^0.0.0\",\n    \"@mischnic/pako\": \"^1.0.10\",\n    \"@mischnic/yarn-browser\": \"^0.0.4\",\n    \"@parcel/config-repl\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/fs\": \"2.16.4\",\n    \"@parcel/package-manager\": \"2.16.4\",\n    \"comlink\": \"^4.4.2\",\n    \"filesize\": \"^10.1.6\",\n    \"idb\": \"^5.0.8\",\n    \"isomorphic-fetch\": \"^3.0.0\",\n    \"jszip\": \"^3.10.1\",\n    \"nullthrows\": \"^1.1.1\",\n    \"react\": \"^18.3.1\",\n    \"react-dom\": \"^18.3.1\",\n    \"react-resizable-panels\": \"^0.0.61\",\n    \"react-use\": \"^17.6.0\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"browserslist\": \"Chrome 75\",\n  \"devDependencies\": {\n    \"eslint-config-react-app\": \"^7.0.1\",\n    \"sharp\": \"^0.33.5\"\n  }\n}\n"
  },
  {
    "path": "packages/dev/repl/patchDeps.sh",
    "content": "####### @nodelib/fs.scandir\n\n# echo '\"use strict\";\n# Object.defineProperty(exports, \"__esModule\", { value: true });\n# exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = true;' \\\n#     > $(node -p 'require.resolve(\"@nodelib/fs.scandir/out/constants.js\")')\n\n####### (dart-)sass\n\n# SASS_GLOBAL_A='var self = Object.create(global)'\n# SASS_GLOBAL_B='var self = global'\n\n# SASS_REQUIRE_A='self.require(\"fs\")'\n# SASS_REQUIRE_B='require(\"fs\")'\n\n# sed -i '.bak' \"s/$SASS_GLOBAL_A/$SASS_GLOBAL_B/; s/$SASS_REQUIRE_A/$SASS_REQUIRE_B/\" $(node -p 'require.resolve(\"sass\")')\n\n\n####### htmlnano\n\n# HTMLNANO_REQUIRE_A='function htmlnano() {'\n# HTMLNANO_REQUIRE_B=\"require('./presets/ampSafe'), require('./presets/hard'), require('./presets/max'), require('./presets/safe'), require('./modules/collapseAttributeWhitespace'), require('./modules/collapseBooleanAttributes'), require('./modules/collapseWhitespace'), require('./modules/custom'), require('./modules/deduplicateAttributeValues'), require('./modules/mergeScripts'), require('./modules/mergeStyles'), require('./modules/minifyJson'), require('./modules/minifySvg'), require('./modules/removeComments'), require('./modules/removeEmptyAttributes'), require('./modules/removeRedundantAttributes');\"\n\n# # removed to not bundle htmlnano>cssnano>jsdom:\n# # , require('./modules/removeUnusedCss')\n\n# sed -i '.bak' \"s#$HTMLNANO_REQUIRE_A#$HTMLNANO_REQUIRE_B$HTMLNANO_REQUIRE_A#\" $(node -p 'require.resolve(\"htmlnano/lib/htmlnano.js\")')\n\n"
  },
  {
    "path": "packages/dev/repl/serve.json",
    "content": "{\n  \"headers\": [\n    {\n      \"source\": \"**/*\",\n      \"headers\": [\n        {\n          \"key\": \"Cross-Origin-Embedder-Policy\",\n          \"value\": \"require-corp\"\n        },\n        {\n          \"key\": \"Cross-Origin-Opener-Policy\",\n          \"value\": \"same-origin\"\n        },\n        {\n          \"key\": \"Cross-Origin-Resource-Policy\",\n          \"value\": \"same-origin\"\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/dev/repl/src/codemirror.js",
    "content": "import {useRef, useEffect, useState, useCallback, memo} from 'react';\n\nimport {EditorView} from '@codemirror/view';\nimport {Compartment, EditorState} from '@codemirror/state';\nimport {setDiagnostics} from '@codemirror/lint';\n\nlet readOnlyCompartment = new Compartment();\n\nexport function createState(value, extensions) {\n  return EditorState.create({\n    doc: value,\n    extensions: [\n      ...extensions,\n      readOnlyCompartment.of(EditorView.editable.of(false)),\n    ],\n  });\n}\n\nconst emittedStates = new WeakSet();\n\nconst Codemirror = memo(function ({\n  state,\n  onChange = null,\n  readOnly = false,\n  diagnostics = null,\n  ...rest\n}) {\n  if (!state) {\n    throw new Error('Missing state!');\n  }\n\n  const container = useRef(null);\n  const view = useRef(null);\n  const dispatchRefs = useRef({});\n\n  useEffect(() => {\n    dispatchRefs.current.onChange = onChange;\n  }, [onChange]);\n\n  // --- State ---\n\n  useEffect(() => {\n    // (subsequent render)\n    if (!view.current) {\n      return;\n    }\n\n    if (emittedStates.has(state)) {\n      return;\n    }\n\n    view.current.setState(state);\n  }, [state]);\n\n  useEffect(() => {\n    // (first render)\n    let v = (view.current = new EditorView({\n      state,\n      dispatch: t => {\n        const {onChange} = dispatchRefs.current;\n\n        v.update([t]);\n        if (onChange) {\n          emittedStates.add(v.state);\n          onChange(v.state, t);\n        }\n      },\n    }));\n\n    container.current.appendChild(v.dom);\n    return () => v.destroy();\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  // --- readOnly ---\n\n  useEffect(() => {\n    // if readOnly changes (first and subsequent render)\n    view.current.dispatch({\n      effects: readOnlyCompartment.reconfigure(\n        EditorState.readOnly.of(readOnly),\n      ),\n    });\n  }, [readOnly]);\n\n  useEffect(() => {\n    // reapply readOnly if the state was changed externally\n    if (emittedStates.has(state)) {\n      return;\n    }\n\n    view.current.dispatch({\n      effects: readOnlyCompartment.reconfigure(\n        EditorState.readOnly.of(readOnly),\n      ),\n    });\n  }, [readOnly, state]);\n\n  // --- Diagnostics ---\n\n  useEffect(() => {\n    // if diagnostics changes (first and subsequent render)\n    view.current.dispatch(\n      setDiagnostics(\n        view.current.state,\n        diagnostics && diagnostics.length > 0 ? diagnostics : [],\n      ),\n    );\n  }, [diagnostics]);\n  useEffect(() => {\n    // reapply diagnostics if the state was changed externally\n    if (emittedStates.has(state)) {\n      return;\n    }\n    view.current.dispatch(\n      setDiagnostics(\n        view.current.state,\n        diagnostics && diagnostics.length > 0 ? diagnostics : [],\n      ),\n    );\n  }, [diagnostics, state]);\n\n  return <div ref={container} {...rest} />;\n});\n\nfunction CodemirrorEditor({\n  value,\n  onChange: _onChange,\n  readOnly,\n  diagnostics,\n  extensions,\n  ...rest\n}) {\n  const [state, setState] = useState(createState(value, extensions));\n\n  useEffect(() => {\n    if (value !== state.doc.toString()) {\n      setState(createState(value, extensions));\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [value]);\n\n  useEffect(() => {\n    setState(createState(value, extensions));\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [extensions]);\n\n  const onChange = useCallback(\n    (newState, transaction) => {\n      setState(newState);\n      if (!transaction.changes.empty) {\n        _onChange(newState.doc.toString());\n      }\n    },\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    [],\n  );\n\n  return (\n    <Codemirror\n      state={state}\n      onChange={onChange}\n      readOnly={readOnly}\n      diagnostics={diagnostics}\n      {...rest}\n    />\n  );\n}\n\nexport {Codemirror, CodemirrorEditor};\n"
  },
  {
    "path": "packages/dev/repl/src/components/Editor.js",
    "content": "// @flow\nimport {useCallback, useMemo, memo} from 'react';\nimport path from 'path';\n\nimport {CodemirrorEditor} from '../codemirror';\n\nimport {\n  EditorView,\n  drawSelection,\n  highlightActiveLine,\n  highlightSpecialChars,\n  keymap,\n  lineNumbers,\n  rectangularSelection,\n} from '@codemirror/view';\nimport {EditorState} from '@codemirror/state';\nimport {\n  bracketMatching,\n  defaultHighlightStyle,\n  foldGutter,\n  foldKeymap,\n  indentOnInput,\n  syntaxHighlighting,\n} from '@codemirror/language';\nimport {\n  defaultKeymap,\n  indentMore,\n  indentLess,\n  history,\n  historyKeymap,\n} from '@codemirror/commands';\nimport {searchKeymap, highlightSelectionMatches} from '@codemirror/search';\nimport {\n  autocompletion,\n  completionKeymap,\n  closeBrackets,\n  closeBracketsKeymap,\n} from '@codemirror/autocomplete';\nimport {lintKeymap} from '@codemirror/lint';\n// import {oneDark} from '@codemirror/theme-one-dark';\n\nimport {html} from '@codemirror/lang-html';\nimport {javascript} from '@codemirror/lang-javascript';\nimport {css} from '@codemirror/lang-css';\nimport {json} from '@codemirror/lang-json';\n\nconst theme = EditorView.theme({\n  '.cm-content': {\n    fontFamily: 'SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace',\n    fontSize: '14px',\n  },\n  '.cm-gutters': {\n    fontFamily: 'SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace',\n    fontSize: '14px',\n  },\n});\n\nconst CONFIG_FILE = /^\\.\\w*rc$/;\nconst Editor: any = memo(function Editor({\n  filename,\n  readOnly,\n  content,\n  onChange,\n  diagnostics,\n}) {\n  const extension = path.extname(filename).slice(1);\n\n  const extensions = useMemo(\n    () =>\n      [\n        !readOnly && lineNumbers(),\n        highlightSpecialChars(),\n        history(),\n        foldGutter(),\n        drawSelection(),\n        EditorState.allowMultipleSelections.of(true),\n        indentOnInput(),\n        syntaxHighlighting(defaultHighlightStyle),\n        bracketMatching(),\n        closeBrackets(),\n        autocompletion(),\n        rectangularSelection(),\n        highlightActiveLine(),\n        highlightSelectionMatches(),\n        theme,\n        // oneDark,\n        keymap.of([\n          ...closeBracketsKeymap,\n          ...defaultKeymap,\n          ...searchKeymap,\n          ...historyKeymap,\n          ...foldKeymap,\n          ...completionKeymap,\n          ...lintKeymap,\n          {\n            key: 'Tab',\n            preventDefault: true,\n            run: indentMore,\n          },\n          {\n            key: 'Shift-Tab',\n            preventDefault: true,\n            run: indentLess,\n          },\n        ]),\n        extension === 'json' || CONFIG_FILE.test(path.basename(filename))\n          ? json()\n          : extension.startsWith('js') || extension.startsWith('ts')\n          ? javascript({\n              jsx: extension.endsWith('x'),\n              typescript: extension.includes('ts'),\n            })\n          : extension === 'html'\n          ? html()\n          : extension === 'css'\n          ? css()\n          : null,\n      ].filter(Boolean),\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    [extension],\n  );\n\n  return (\n    <CodemirrorEditor\n      value={content}\n      onChange={onChange}\n      extensions={extensions}\n      readOnly={readOnly}\n      diagnostics={diagnostics}\n    />\n  );\n});\n\nfunction EditorWrapper({\n  dispatch,\n  name,\n  value,\n  readOnly,\n  diagnostics,\n}: any): any {\n  let onChange = useCallback(\n    value => dispatch({type: 'view.setValue', name, value}),\n    [dispatch, name],\n  );\n\n  return (\n    <Editor\n      filename={name}\n      content={value}\n      onChange={onChange}\n      readOnly={readOnly}\n      diagnostics={diagnostics}\n    />\n  );\n}\n\nexport {EditorWrapper as Editor};\n"
  },
  {
    "path": "packages/dev/repl/src/components/FileBrowser.js",
    "content": "// @flow\nimport path from 'path';\nimport {EditableField} from './helper';\nimport {downloadZIP} from '../utils';\n\nfunction join(a, ...b) {\n  return path.join(a || '/', ...b);\n}\n\nfunction FileBrowserEntry({\n  name,\n  prefix,\n  directory = false,\n  isEntry,\n  isEditing,\n  collapsed,\n  children,\n  dispatch,\n  ...rest\n}) {\n  let p = join(prefix, name);\n  return (\n    <li\n      draggable=\"true\"\n      onDragStart={e => {\n        e.dataTransfer.setData('application/x-parcel-repl-file', p);\n        e.stopPropagation();\n      }}\n      {...rest}\n    >\n      <div\n        className={directory ? `dir ${!collapsed ? 'expanded' : ''}` : 'file'}\n        onClick={() =>\n          directory\n            ? dispatch({\n                type: 'browser.expandToggle',\n                name: p,\n              })\n            : dispatch({\n                type: 'view.open',\n                name: p,\n              })\n        }\n        // tabIndex=\"0\"\n        // onDblclick={(e) => console.log(e)}\n      >\n        <div className=\"name\">\n          <div className=\"icon\" />\n          <EditableField\n            value={name}\n            editing={isEditing === p}\n            onChange={value =>\n              dispatch({\n                type: 'browser.setEditing',\n                value,\n              })\n            }\n          />\n        </div>\n        <div className=\"controls\">\n          {!directory && (\n            <input\n              title=\"Entrypoint\"\n              type=\"checkbox\"\n              checked={isEntry}\n              onChange={e => {\n                dispatch({\n                  type: 'file.isEntry',\n                  name: p,\n                  value: e.target.checked,\n                });\n                e.stopPropagation();\n              }}\n            />\n          )}\n          <button\n            className=\"rename\"\n            onClick={e => {\n              dispatch({\n                type: 'browser.setEditing',\n                name: p,\n              });\n              e.stopPropagation();\n            }}\n          />\n          <button\n            className=\"delete\"\n            onClick={e => {\n              dispatch({\n                type: 'file.delete',\n                name: p,\n              });\n              e.stopPropagation();\n            }}\n          />\n        </div>\n      </div>\n      {children}\n    </li>\n  );\n}\n\nfunction FileBrowserFolder({\n  files,\n  collapsed,\n  dispatch,\n  isEditing,\n  prefix = '',\n  ...props\n}) {\n  return (\n    <ul {...props}>\n      {[...files]\n        .sort(([a], [b]) => a.localeCompare(b))\n        .map(([name, data]) => {\n          let p = join(prefix, name);\n          let isCollapsed = collapsed.has(p);\n          return data instanceof Map ? (\n            <FileBrowserEntry\n              key={name}\n              directory\n              name={name}\n              prefix={prefix}\n              dispatch={dispatch}\n              isEditing={isEditing}\n              collapsed={isCollapsed}\n              onDrop={e => {\n                const data = e.dataTransfer.getData(\n                  'application/x-parcel-repl-file',\n                );\n                if (data !== p) {\n                  dispatch({\n                    type: 'file.move',\n                    name: data,\n                    dir: p,\n                  });\n                  e.preventDefault();\n                  e.stopPropagation();\n                }\n              }}\n              onDragOver={e => e.preventDefault()}\n            >\n              {!isCollapsed && (\n                <FileBrowserFolder\n                  files={data}\n                  collapsed={collapsed}\n                  dispatch={dispatch}\n                  isEditing={isEditing}\n                  prefix={p}\n                />\n              )}\n            </FileBrowserEntry>\n          ) : (\n            <FileBrowserEntry\n              key={name}\n              name={name}\n              isEntry={!!data.isEntry}\n              prefix={prefix}\n              dispatch={dispatch}\n              isEditing={isEditing}\n            />\n          );\n        })}\n    </ul>\n  );\n}\n\nexport function FileBrowser({\n  files,\n  collapsed,\n  isEditing,\n  dispatch,\n  children,\n}: any): any {\n  return (\n    <div className=\"file-browser\">\n      {children}\n      <div>\n        <div className=\"header\">\n          {/*<button\n          onClick={async () => {\n            const dirHandle = await window.showDirectoryPicker();\n            for await (const entry of dirHandle.values()) {\n              console.log(entry.kind, entry.name);\n            }\n          }}\n        >\n          Open\n        </button>*/}\n          <button onClick={() => dispatch({type: 'file.addFolder'})}>\n            New Folder\n          </button>\n          <button onClick={() => dispatch({type: 'file.addFile'})}>\n            New File\n          </button>\n        </div>\n        <FileBrowserFolder\n          files={files}\n          collapsed={collapsed}\n          isEditing={isEditing}\n          dispatch={dispatch}\n          onDrop={e => {\n            const data = e.dataTransfer.getData(\n              'application/x-parcel-repl-file',\n            );\n            dispatch({type: 'file.move', name: data, dir: ''});\n            e.preventDefault();\n            e.stopPropagation();\n          }}\n          onDragOver={e => e.preventDefault()}\n        />\n        <div className=\"download\">\n          <button\n            onClick={() => {\n              downloadZIP(files.list());\n            }}\n          >\n            Download\n          </button>\n        </div>\n      </div>\n    </div>\n  );\n}\n"
  },
  {
    "path": "packages/dev/repl/src/components/Options.js",
    "content": "// @flow\nimport type {State} from './';\nimport type {REPLOptions} from '../utils';\n\nimport fs from 'fs';\nimport path from 'path';\n\nimport {getDefaultTargetEnv} from '../utils';\n\nlet commit = fs\n  .readFileSync(path.join(__dirname, '../../commit'), 'utf8')\n  .trim();\n\nexport function Options({\n  state,\n  dispatch,\n  disabled = false,\n}: {|\n  state: State,\n  dispatch: ({|\n    type: 'options',\n    name: $Keys<REPLOptions>,\n    value: mixed,\n  |}) => void,\n  disabled: ?boolean,\n|}): any {\n  const values: REPLOptions = state.options;\n  const onChange = (name: $Keys<REPLOptions>, value: mixed) =>\n    dispatch({type: 'options', name, value});\n\n  // TODO disabled when watching\n\n  const disablePackageJSON = state.files.has('/package.json');\n\n  return (\n    <div className=\"options\">\n      <label title=\"Corresponds to `--no-source-maps`\">\n        <span>Source Maps</span>\n        <input\n          type=\"checkbox\"\n          checked={values.sourceMaps}\n          disabled={values.viewSourcemaps || disabled}\n          onChange={e => onChange('sourceMaps', e.target.checked)}\n        />\n      </label>\n      <label title=\"Sets `--public-url <value>`\">\n        <span>Public URL</span>\n        <input\n          type=\"text\"\n          value={values.publicUrl}\n          placeholder=\"/\"\n          onInput={e => onChange('publicUrl', e.target.value)}\n          disabled={disabled}\n        />\n      </label>\n      <label>\n        <span>Output Format</span>\n        <select\n          onChange={e => onChange('outputFormat', e.target.value || null)}\n          value={values.outputFormat ?? ''}\n          disabled={disabled || disablePackageJSON}\n        >\n          <option value=\"\" />\n          <option value=\"esmodule\">esmodule</option>\n          <option value=\"commonjs\">commonjs</option>\n          <option value=\"global\">global</option>\n        </select>\n      </label>\n      <label>\n        <span>Target</span>\n        <div>\n          <select\n            onChange={e => {\n              onChange('targetType', e.target.value);\n              onChange('targetEnv', null);\n            }}\n            value={values.targetType}\n            style={{marginRight: '0.5rem'}}\n            disabled={disabled || disablePackageJSON}\n          >\n            <option value=\"browsers\">Browsers</option>\n            <option value=\"node\">Node</option>\n          </select>\n          <input\n            type=\"text\"\n            value={values.targetEnv ?? ''}\n            onInput={e => onChange('targetEnv', e.target.value || null)}\n            placeholder={getDefaultTargetEnv(values.targetType)}\n            disabled={disabled || disablePackageJSON}\n          />\n        </div>\n      </label>\n      <label>\n        <span>Mode</span>\n        <select\n          onChange={e => {\n            onChange('mode', e.target.value || null);\n            if (e.target.value === 'production') {\n              onChange('hmr', false);\n            } else {\n              onChange('scopeHoist', false);\n              onChange('minify', false);\n            }\n          }}\n          value={values.mode}\n          disabled={disabled}\n        >\n          <option value=\"production\">production</option>\n          <option value=\"development\">development</option>\n        </select>\n      </label>\n      <label>\n        <span>HMR</span>\n        <input\n          type=\"checkbox\"\n          checked={values.hmr}\n          onChange={e => onChange('hmr', e.target.checked)}\n          disabled={disabled || values.mode === 'production'}\n        />\n      </label>\n      <label title=\"Sets `--no-minify`\">\n        <span>Minify</span>\n        <input\n          type=\"checkbox\"\n          checked={values.minify}\n          onChange={e => onChange('minify', e.target.checked)}\n          disabled={disabled || values.mode === 'development'}\n        />\n      </label>\n      <label title=\"Corresponds to `--no-scope-hoist`\">\n        <span>Enable Scope Hoisting</span>\n        <input\n          type=\"checkbox\"\n          checked={values.scopeHoist}\n          onChange={e => onChange('scopeHoist', e.target.checked)}\n          disabled={disabled || values.mode === 'development'}\n        />\n      </label>\n      <hr />\n      <label title=\"env variable PARCEL_DUMP_GRAPHVIZ\">\n        <span>Render Graphs</span>\n        <select\n          onChange={e => onChange('renderGraphs', e.target.value || null)}\n          value={values.renderGraphs}\n          disabled={disabled}\n        >\n          <option value=\"\">disabled</option>\n          <option value=\"true\">enabled</option>\n          <option value=\"symbols\">enabled with symbols</option>\n        </select>\n      </label>\n      <hr />\n      <div className=\"dependencies\">\n        Dependencies\n        <ul>\n          {values.dependencies?.map(([name, version], i) => (\n            <li key={i}>\n              <input\n                type=\"text\"\n                value={name}\n                placeholder=\"pkg-name\"\n                onInput={e =>\n                  onChange(\n                    'dependencies',\n                    values.dependencies.map((v, j) =>\n                      j === i ? [e.target.value, v[1]] : v,\n                    ),\n                  )\n                }\n                disabled={disabled || disablePackageJSON}\n              />\n              @\n              <input\n                value={version}\n                placeholder=\"range\"\n                onInput={e =>\n                  onChange(\n                    'dependencies',\n                    values.dependencies.map((v, j) =>\n                      j === i ? [v[0], e.target.value] : v,\n                    ),\n                  )\n                }\n                disabled={disabled || disablePackageJSON}\n              />\n              <button\n                className=\"remove\"\n                onClick={() =>\n                  onChange(\n                    'dependencies',\n                    values.dependencies.filter((_, j) => j !== i),\n                  )\n                }\n                disabled={disabled || disablePackageJSON}\n              >\n                ✕\n              </button>\n            </li>\n          ))}\n          <li>\n            <button\n              className=\"add\"\n              onClick={() =>\n                onChange('dependencies', [...values.dependencies, ['', '']])\n              }\n              disabled={disabled || disablePackageJSON}\n            >\n              Add\n            </button>\n          </li>\n        </ul>\n      </div>\n      <hr />\n      <label title=\"env variable PARCEL_WORKERS\">\n        <span>Workers</span>\n        <select\n          onChange={e => onChange('numWorkers', JSON.parse(e.target.value))}\n          value={JSON.stringify(values.numWorkers)}\n          disabled={disabled}\n        >\n          <option value=\"0\">Use no nested workers</option>\n          {navigator.hardwareConcurrency > 0 &&\n            new Array(navigator.hardwareConcurrency / 2).fill(0).map((_, i) => (\n              <option key={i + 1} value={i + 1}>\n                Use {i + 1} nested workers\n              </option>\n            ))}\n          <option value=\"null\">Default</option>\n        </select>\n      </label>\n      <div>\n        Based on commit{' '}\n        <a href={`https://github.com/parcel-bundler/parcel/commits/${commit}`}>\n          {commit.substr(0, 10)}\n        </a>\n      </div>\n    </div>\n  );\n}\n"
  },
  {
    "path": "packages/dev/repl/src/components/Preview.js",
    "content": "// @flow\nimport {useRef, useState} from 'react';\nimport {usePromise} from './helper';\n\nexport function Preview({clientID}: {|clientID: Promise<string>|}): any {\n  let [clientIDResolved] = usePromise(clientID);\n  let url =\n    clientIDResolved && `/__repl_dist/index.html?parentId=${clientIDResolved}`;\n  let [popover, setPopover] = useState(null);\n\n  const iframeRef = useRef<HTMLIFrameElement | null>(null);\n\n  // TODO disable preview if options.publicURL !== '/__repl_dist'\n\n  return (\n    url && (\n      <div className=\"preview\">\n        <div className=\"controls\">\n          {!popover && (\n            <button\n              onClick={() => {\n                let w = window.open(url);\n                // window.open(url, '_blank', 'toolbar=0,location=0,menubar=0'),\n                setPopover(w);\n                w.onload = function () {\n                  this.onbeforeunload = function () {\n                    setPopover(null);\n                  };\n                };\n              }}\n              disabled={!url}\n            >\n              Move to new window\n            </button>\n          )}\n          {popover && (\n            <button\n              onClick={() => {\n                popover.close();\n                setPopover(null);\n              }}\n              disabled={!url}\n            >\n              Close popover\n            </button>\n          )}\n          {!popover && (\n            <button\n              className=\"reload\"\n              // $FlowFixMe\n              onClick={() => (iframeRef.current.src = url)}\n            >\n              Reload\n            </button>\n          )}\n        </div>\n        {!popover && (\n          //<Box>\n          <iframe title=\"Preview\" ref={iframeRef} src={url} />\n          //</Box>\n        )}\n      </div>\n    )\n  );\n}\n"
  },
  {
    "path": "packages/dev/repl/src/components/helper.js",
    "content": "// @flow\nimport type {BundleOutputError} from '../parcel/ParcelWorker';\nimport {useCallback, useState, useEffect, useRef, memo} from 'react';\nimport {ctrlKey} from '../utils';\nimport renderGraph from '../graphs/index.js';\nimport {ASSET_PRESETS, extractZIP} from '../utils';\nimport {type FSMap} from '../utils/assets';\n/* eslint-disable react/jsx-no-bind */\n\nexport function ParcelError({\n  output: {error},\n}: {|\n  output: BundleOutputError,\n|}): any {\n  return (\n    <div className=\"build-error\">\n      <span>A build error occured:</span>\n      <div className=\"content\" dangerouslySetInnerHTML={{__html: error}} />\n    </div>\n  );\n}\n\nexport function Notes(): any {\n  return (\n    <div className=\"help\">\n      <div>\n        <p>{ctrlKey} + B to bundle</p>\n        <p>{ctrlKey} + S to save</p>\n        <p>Ctrl + W to close a tab</p>\n        {/* Note:\n        <ul>\n          <li>\n            PostHTML&apos;s <code>removeUnusedCss</code> is disabled for a\n            smaller bundle size\n          </li>\n        </ul>\n        <br />\n        Based on commit:{' '}\n        <a href={`https://github.com/parcel-bundler/parcel/tree/${commit}`}>\n          {commit}\n        </a> */}\n      </div>\n    </div>\n  );\n}\n\n// function toDataURI(mime, data) {\n//   return `data:${mime};charset=utf-8;base64,${btoa(data)}`;\n// }\n\nexport const Graphs: any = memo(function Graphs({graphs}) {\n  let [rendered, setRendered] = useState();\n\n  useEffect(() => {\n    renderGraph().then(async render => {\n      setRendered(\n        await Promise.all(\n          graphs.map(async ({name, content}) => ({\n            name,\n            content: /*toDataURI*/ ('image/svg+xml', await render(content)),\n          })),\n        ),\n      );\n    });\n  }, [graphs]);\n\n  return (\n    <div className=\"graphs\">\n      Graphs (will open in a new tab)\n      {rendered && (\n        <div>\n          {rendered.map(({name, content}, i) => (\n            <button\n              key={i}\n              onClick={() => {\n                var win = window.open();\n                win.document.write(content);\n                // win.document.write(\n                //   '<iframe src=\"' +\n                //     content +\n                //     '\" frameborder=\"0\" style=\"border:0; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%;\" allowfullscreen></iframe>',\n                // );\n              }}\n            >\n              {name}\n            </button>\n          ))}\n        </div>\n      )}\n    </div>\n  );\n});\n\nexport function Tabs({\n  names,\n  children,\n  selected,\n  setSelected,\n  mode = 'remove',\n  className,\n  fallback,\n  ...props\n}: any): any {\n  let [_selected, _setSelected] = useState(0);\n\n  selected = selected ?? _selected;\n  setSelected = setSelected ?? _setSelected;\n\n  useEffect(() => {\n    if (children.length > 0 && children.length <= selected) {\n      setSelected(selected - 1);\n    }\n  }, [children, selected, setSelected]);\n\n  return (\n    <div {...props} className={'tabs ' + (className || '')}>\n      <div className=\"switcher\">\n        {names.map((n, i) => (\n          <div\n            onClick={() => setSelected(i)}\n            key={i}\n            className={i === selected ? 'selected' : undefined}\n            // tabIndex=\"0\"\n            // onKeyDown={(e) => e.code === \"Enter\" && setSelected(i)}\n          >\n            {n}\n          </div>\n        ))}\n      </div>\n      {mode === 'remove'\n        ? children.find((_, i) => i === selected)\n        : children.map((c, i) => (\n            <div\n              key={i}\n              className=\"content\"\n              style={i !== selected ? {display: 'none'} : undefined}\n            >\n              {c}\n            </div>\n          ))}\n      {children.length === 0 && fallback}\n    </div>\n  );\n}\n\nexport function EditableField({value, editing, onChange}: any): any {\n  let [v, setV] = useState(value);\n\n  useEffect(() => {\n    if (editing) {\n      let handler = () => {\n        onChange(v);\n      };\n\n      window.addEventListener('click', handler);\n\n      return () => {\n        window.removeEventListener('click', handler);\n      };\n    }\n  }, [v, editing, onChange]);\n\n  useEffect(() => {\n    if (editing) {\n      setV(value);\n    }\n  }, [editing, value]);\n\n  return editing ? (\n    <form\n      onSubmit={e => {\n        e.preventDefault();\n        onChange(v);\n      }}\n      style={{display: 'inline'}}\n    >\n      <input\n        type=\"text\"\n        value={v}\n        onInput={e => {\n          setV(e.target.value);\n        }}\n        onClick={e => e.stopPropagation()}\n      />\n    </form>\n  ) : (\n    <span>{value}</span>\n  );\n}\n\nexport function PresetSelector({dispatch}: any): any {\n  let onChange = useCallback(\n    async preset => {\n      if (preset === 'Three.js Benchmark') {\n        try {\n          let data = await (\n            await fetch(new URL('../assets/three.zip', import.meta.url))\n          ).arrayBuffer();\n          let files: FSMap = await extractZIP(data);\n\n          let fs = new Map([\n            ['copy1', files],\n            ['copy2', files],\n            ['copy3', files],\n            [\n              'index.js',\n              {\n                isEntry: true,\n                value: `import * as copy1 from './copy1/Three.js'; export {copy1};\n        import * as copy2 from './copy2/Three.js'; export {copy2};\n        import * as copy3 from './copy3/Three.js'; export {copy3};`,\n              },\n            ],\n          ]);\n\n          dispatch({type: 'preset.load', name: preset, data: {fs}});\n        } catch (e) {\n          console.error(e);\n        }\n      } else {\n        dispatch({type: 'preset.load', name: preset});\n      }\n    },\n    [dispatch],\n  );\n\n  return (\n    <label className=\"presets\">\n      <span>Preset:</span>\n      <select\n        onChange={e => {\n          onChange(e.target.value);\n        }}\n        value={''}\n      >\n        <option value=\"\"></option>\n        {[...ASSET_PRESETS.keys()].map(n => (\n          <option key={n} value={n}>\n            {n}\n          </option>\n        ))}\n      </select>\n    </label>\n  );\n}\n// ----------------------------------------------------------------------------------------\n\nexport function useDebounce(\n  cb: () => mixed,\n  delay: number,\n  deps: Array<mixed>,\n): any {\n  useEffect(() => {\n    const handler = setTimeout(() => {\n      cb();\n    }, delay);\n\n    return () => {\n      clearTimeout(handler);\n    };\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [cb, delay, ...deps]);\n}\n\nexport function useSessionStorage(\n  key: string,\n  initialValue: mixed,\n): [any, () => void] {\n  const [storedValue, setStoredValue] = useState(() => {\n    try {\n      const item = window.sessionStorage.getItem(key);\n      return item ? JSON.parse(item) : initialValue;\n    } catch (error) {\n      console.log(error);\n      return initialValue;\n    }\n  });\n\n  const setValue = value => {\n    try {\n      const valueToStore =\n        value instanceof Function ? value(storedValue) : value;\n      setStoredValue(valueToStore);\n      window.sessionStorage.setItem(key, JSON.stringify(valueToStore));\n    } catch (error) {\n      console.log(error);\n    }\n  };\n\n  return [storedValue, setValue];\n}\n\nexport function usePromise<T>(promise: Promise<T>): [?T, any, boolean] {\n  let [state, setState] = useState(null);\n  let mountedRef = useRef(false);\n\n  useEffect(() => {\n    mountedRef.current = true;\n\n    return () => {\n      mountedRef.current = false;\n    };\n  }, []);\n\n  useEffect(() => {\n    promise.then(\n      v => mountedRef.current && setState({resolved: v}),\n      v => mountedRef.current && setState({rejected: v}),\n    );\n  }, [promise]);\n\n  return [state?.resolved, state?.rejected, state != null];\n}\n\n// $FlowFixMe\nconst addBodyClass = className => document.body.classList.add(className);\n// $FlowFixMe\nconst removeBodyClass = className => document.body.classList.remove(className);\nexport function useBodyClass(className: string) {\n  useEffect(() => {\n    let classNames = Array.isArray(className) ? className : [className];\n    classNames.forEach(addBodyClass);\n\n    return () => {\n      classNames.forEach(removeBodyClass);\n    };\n  }, [className]);\n}\n\nexport function useKeyboard(cb: KeyboardEvent => mixed, deps: Array<mixed>) {\n  const keydownCb = useCallback(\n    (e: KeyboardEvent) => {\n      cb(e);\n    },\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    [cb, ...deps],\n  );\n  useEffect(() => {\n    document.addEventListener('keydown', keydownCb);\n    return () => {\n      document.removeEventListener('keydown', keydownCb);\n    };\n  }, [keydownCb]);\n}\n"
  },
  {
    "path": "packages/dev/repl/src/components/index.js",
    "content": "// @flow\nexport * from './Editor.js';\nexport * from './FileBrowser.js';\nexport * from './helper.js';\nexport * from './Options.js';\nexport * from './Preview.js';\nexport * from './state.js';\n// export * from './SourceMapVisualizer.js';\n"
  },
  {
    "path": "packages/dev/repl/src/components/state.js",
    "content": "// @flow\nimport type {REPLOptions, CodeMirrorDiagnostic} from '../utils';\n\nimport {ASSET_PRESETS, FS, join, type FSMap} from '../utils/assets';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\n\n// const isSafari = navigator.vendor.includes('Apple Computer');\n\nexport const DEFAULT_OPTIONS: REPLOptions = {\n  entries: [],\n  minify: false,\n  scopeHoist: true,\n  sourceMaps: false,\n  publicUrl: '/__repl_dist',\n  targetType: 'browsers',\n  targetEnv: null,\n  outputFormat: null,\n  hmr: false,\n  mode: 'production',\n  renderGraphs: false,\n  viewSourcemaps: false,\n  dependencies: [],\n  numWorkers: 0,\n  // numWorkers: isSafari ? 0 : null,\n};\n\nexport type State = {|\n  currentView: number,\n  files: FS,\n  views: Map<string, {|value: string|} | {|component: any|}>,\n  browserCollapsed: Set<string>,\n  isEditing: null | string,\n  options: REPLOptions,\n  useTabs: boolean,\n  diagnostics: Map<string, Array<CodeMirrorDiagnostic>>,\n|};\n\nexport const initialState: State = {\n  currentView: 0,\n  files: new FS(),\n  views: new Map(),\n  browserCollapsed: new Set(),\n  isEditing: null,\n  options: DEFAULT_OPTIONS,\n  useTabs: false,\n  diagnostics: new Map(),\n};\n\nfunction loadPreset(\n  name = 'Javascript',\n  data: ?{|options?: $Shape<REPLOptions>, fs: FSMap|},\n) {\n  let preset = nullthrows(data ?? ASSET_PRESETS.get(name));\n  let state = {\n    ...initialState,\n    useTabs: data != null,\n    files: new FS(preset.fs),\n    options: {\n      ...initialState.options,\n      ...preset.options,\n    },\n  };\n\n  if (!state.useTabs) {\n    for (let [name] of state.files.list()) {\n      state = reducer(state, {type: 'view.open', name});\n    }\n  }\n\n  return state;\n}\n\nexport const getInitialState = (): State => {\n  let loaded = loadState();\n  if (loaded) return loaded;\n\n  return loadPreset();\n};\n\nexport function reducer(state: State, action: any): State {\n  switch (action.type) {\n    case 'view.select':\n      return {...state, currentView: action.index};\n    case 'view.open': {\n      let views = new Map([\n        ...state.views,\n        [\n          action.name,\n          action.component\n            ? {component: action.component}\n            : {value: nullthrows(state.files.get(action.name)).value},\n        ],\n      ]);\n      let viewIndex = [...views].findIndex(([n]) => n === action.name);\n      return {\n        ...state,\n        views,\n        currentView: viewIndex,\n      };\n    }\n    case 'view.close':\n      return {\n        ...state,\n        views: new Map([...state.views].filter(([n]) => n !== action.name)),\n      };\n    case 'view.setValue': {\n      let data = nullthrows(state.views.get(action.name));\n      if (data.component) {\n        return state;\n      }\n      let newState = {\n        ...state,\n        views: new Map([\n          ...state.views,\n          [action.name, {...data, value: action.value}],\n        ]),\n      };\n\n      // Always save immediately in list mode\n      if (!state.useTabs) {\n        let file = nullthrows(state.files.get(action.name));\n        if (file.value === action.value) return state;\n\n        newState = {\n          ...newState,\n          files: state.files.setMerge(action.name, {value: action.value}),\n        };\n      }\n      return newState;\n    }\n    case 'view.saveCurrent': {\n      if (state.useTabs) {\n        let [name, view] = [...state.views][state.currentView];\n        if (view.value == null) return state;\n\n        let value = view.value;\n        let file = nullthrows(state.files.get(name));\n        if (file.value === value) return state;\n\n        return {\n          ...state,\n          files: state.files.setMerge(name, {value}),\n        };\n      } else {\n        // let files = state.files;\n        // for (let [name, view] of state.views) {\n        //   if (view.value == null) {\n        //     continue;\n        //   }\n        //   // $FlowFixMe\n        //   let value = view.value;\n        //   let file = nullthrows(state.files.get(name));\n        //   if (file.value === value) {\n        //     continue;\n        //   }\n        //   files = files.setMerge(name, {value});\n        // }\n        // if (files === state.files) return state;\n\n        // return {\n        //   ...state,\n        //   files,\n        // };\n        return state;\n      }\n    }\n    case 'view.closeCurrent':\n      return {\n        ...state,\n        views: new Map(\n          [...state.views].filter((_, i) => i !== state.currentView),\n        ),\n      };\n\n    case 'file.move': {\n      let oldName = action.name;\n      let newName = join(action.dir, path.basename(action.name));\n      return {\n        ...state,\n        files: state.files.move(oldName, newName),\n        browserCollapsed: new Set(\n          [...state.browserCollapsed].map(f =>\n            f === action.name ? newName : f,\n          ),\n        ),\n        views: new Map(\n          [...state.views].map(([name, data]) => [\n            name === oldName ? newName : name,\n            data,\n          ]),\n        ),\n      };\n    }\n    case 'file.delete':\n      return {\n        ...state,\n        files: state.files.delete(action.name),\n        views: new Map(\n          [...state.views].filter(([name]) => !name.startsWith(action.name)),\n        ),\n      };\n    case 'file.addFile': {\n      let prefix = state.files.has('/src') ? '/src' : '';\n      let i = 1;\n      while (state.files.has(`${prefix}/file${i}.js`)) {\n        i++;\n      }\n      let file = `${prefix}/file${i}.js`;\n      let newState = {\n        ...state,\n        files: state.files.set(file, {value: ''}),\n      };\n      if (!state.useTabs) {\n        newState = reducer(newState, {\n          type: 'view.open',\n          name: file,\n        });\n      }\n      return newState;\n    }\n    case 'file.addFolder': {\n      let i = 1;\n      while (state.files.has(`/folder${i}`)) {\n        i++;\n      }\n      return {\n        ...state,\n        files: state.files.set(`/folder${i}`, new Map()),\n      };\n    }\n    case 'file.isEntry': {\n      return {\n        ...state,\n        files: state.files.setMerge(action.name, {isEntry: action.value}),\n      };\n    }\n    case 'browser.expandToggle': {\n      return {\n        ...state,\n        browserCollapsed: state.browserCollapsed.has(action.name)\n          ? new Set([...state.browserCollapsed].filter(n => n !== action.name))\n          : new Set([...state.browserCollapsed, action.name]),\n      };\n    }\n    case 'browser.setEditing': {\n      if (state.isEditing != null && action.name == null) {\n        let oldName = state.isEditing;\n        let newName = join(path.dirname(state.isEditing), action.value);\n        state = {\n          ...state,\n          files: state.files.move(oldName, newName),\n          browserCollapsed: new Set(\n            [...state.browserCollapsed].map(f => (f === oldName ? newName : f)),\n          ),\n          views: new Map(\n            [...state.views].map(([name, data]) => [\n              name === oldName ? newName : name,\n              data,\n            ]),\n          ),\n        };\n      }\n      return {\n        ...state,\n        isEditing: action.name || null,\n      };\n    }\n    case 'preset.load':\n      return loadPreset(action.name, action.data);\n    case 'options':\n      return {\n        ...state,\n        options: {\n          ...state.options,\n          [action.name]: action.value,\n        },\n      };\n    case 'toggleView': {\n      let useTabs = !state.useTabs;\n      return {\n        ...state,\n        useTabs,\n      };\n    }\n    case 'diagnostics': {\n      return {\n        ...state,\n        diagnostics: action.value ?? new Map(),\n      };\n    }\n    default:\n      throw new Error();\n  }\n}\n\nexport function saveState(state: State) {\n  let data = {\n    files: state.files.toJSON(),\n    options: state.options,\n    useTabs: state.useTabs,\n    browserCollapsed: [...state.browserCollapsed],\n    views: [...state.views.keys()],\n    currentView: state.currentView,\n  };\n\n  let dataStr = JSON.stringify(data);\n  if (dataStr.length < 1_000_000) {\n    window.location.hash = btoa(encodeURIComponent(dataStr));\n  }\n}\n\nexport function loadState(): ?State {\n  const hash = window.location.hash.replace(/^#/, '');\n\n  try {\n    const data = JSON.parse(decodeURIComponent(atob(hash)));\n\n    const files = FS.fromJSON(data.files);\n    return {\n      ...initialState,\n      files,\n      views: new Map(\n        data.views\n          .map(name => [name, files.get(name)])\n          .filter(([, data]) => data),\n      ),\n      options: {...data.options, numWorkers: DEFAULT_OPTIONS.numWorkers},\n      useTabs: data.useTabs,\n      currentView: data.currentView,\n      browserCollapsed: new Set(data.browserCollapsed),\n    };\n  } catch (e) {\n    window.location.hash = '';\n    return null;\n  }\n}\n"
  },
  {
    "path": "packages/dev/repl/src/graphs/index.js",
    "content": "// @flow\nimport {wrap} from 'comlink';\n\nlet worker;\n\nexport default (() =>\n  (worker =\n    worker ??\n    wrap(\n      // $FlowFixMe\n      new Worker(new URL('./worker.js', import /*:: (\"\") */.meta.url), {\n        name: 'Parcel Graph Renderer',\n        type: 'module',\n      }),\n    ).render): () => Promise<(dot: string) => Promise<string>>);\n"
  },
  {
    "path": "packages/dev/repl/src/graphs/worker.js",
    "content": "import {expose, proxy} from 'comlink';\nimport dot from '@mischnic/dot-svg';\nimport WASM_URL from 'url:@mischnic/dot-svg/dist/index-browser.wasm';\n\nconst render = dot(() => WASM_URL);\n\nexpose({\n  render: proxy((...a) => render.then(f => f(...a))),\n});\n"
  },
  {
    "path": "packages/dev/repl/src/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <title>Parcel REPL</title>\n    <meta name=\"viewport\" content=\"width=device-width\" />\n    <meta name=\"theme-color\" content=\"#21374b\" />\n    <meta name=\"Description\" content=\"Run Parcel 2 right in your browser\" />\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"./styles/index.css\" />\n    <link\n      rel=\"icon\"\n      sizes=\"192x192\"\n      href=\"url:./assets/avatar.png?width=192&height=192\"\n    />\n    <link\n      rel=\"icon\"\n      sizes=\"512x512\"\n      href=\"url:./assets/avatar.png?width=512&height=512\"\n    />\n    <link\n      rel=\"apple-touch-icon\"\n      href=\"url:./assets/avatar.png?width=192&height=192\"\n    />\n    <link rel=\"manifest\" href=\"./repl.webmanifest\" />\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"./index.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/dev/repl/src/index.js",
    "content": "// @flow\nimport {Fragment, useEffect, useState, useReducer, useRef} from 'react';\nimport {createRoot} from 'react-dom/client';\n// $FlowFixMe\nimport {Panel, PanelGroup, PanelResizeHandle} from 'react-resizable-panels';\nimport {useMedia} from 'react-use';\n\n// $FlowFixMe\nimport parcelLogo from 'url:./assets/logo.svg';\n// $FlowFixMe\nimport parcelText from 'url:./assets/parcel.png';\n\nimport {\n  Editor,\n  FileBrowser,\n  Notes,\n  Options,\n  ParcelError,\n  PresetSelector,\n  Preview,\n  Tabs,\n  Graphs,\n  useDebounce,\n  useKeyboard,\n  usePromise,\n  useSessionStorage,\n} from './components/';\nimport {saveState, reducer, getInitialState} from './components';\nimport type {State} from './components';\nimport {filesize} from 'filesize';\nimport {linkSourceMapVisualization} from './utils';\nimport nullthrows from 'nullthrows';\n\nimport {\n  bundle,\n  watch,\n  workerReady,\n  waitForFS,\n  clientID as clientIDPromise,\n} from './parcel/';\n\nconst STATUS_LOADING = Symbol('STATUS_LOADING');\nconst STATUS_RUNNING = Symbol('STATUS_RUNNING');\nconst STATUS_IDLING = Symbol('STATUS_IDLING');\n\nfunction Status({watching, status, buildProgress, buildOutput}) {\n  let buildDuration =\n    buildOutput?.buildTime != null\n      ? Math.round(buildOutput?.buildTime / 10) / 100\n      : null;\n\n  let text, color;\n  if (status === STATUS_LOADING) {\n    text = 'Loading...';\n    color = '#D97706';\n    // color = '#553701';\n  } else if (status === STATUS_IDLING) {\n    if (watching) {\n      if (buildDuration != null) {\n        text = `Watching... (last build took ${buildDuration}s)`;\n      } else {\n        text = 'Watching...';\n      }\n    } else {\n      if (buildDuration != null) {\n        text = `Finished in ${buildDuration}s`;\n      } else {\n        text = 'Ready';\n      }\n    }\n    color = '#059669';\n    // color = '#015551';\n    // TODO: errors + \"finished in 123s\"\n  } else if (status === STATUS_RUNNING) {\n    if (buildProgress) {\n      text = 'Running: ' + buildProgress;\n    } else {\n      text = 'Running...';\n    }\n    color = '#ffeb3b';\n  }\n\n  return (\n    <div className=\"status\" style={{backgroundColor: color}}>\n      {text}\n    </div>\n  );\n}\n\nfunction Output({state, dispatch}: {|state: State, dispatch: Function|}) {\n  let [watching, setWatching] = useState(false);\n  let [buildState, setBuildState] = useState(STATUS_LOADING);\n  let [buildOutput, setBuildOutput] = useState(null);\n  let [buildProgress, setBuildProgress] = useState(null);\n  let [outputTabIndex, setOutputTabIndex] = useSessionStorage(\n    'outputTabIndex',\n    0,\n  );\n  let watchSubscriptionRef = useRef(null);\n\n  useEffect(() => {\n    setBuildState(STATUS_LOADING);\n    workerReady(state.options.numWorkers).then(() => {\n      setBuildState(STATUS_IDLING);\n    });\n  }, [state.options.numWorkers]);\n\n  async function build() {\n    setBuildState(STATUS_RUNNING);\n\n    setBuildProgress(null);\n\n    try {\n      const output = await bundle(state.files, state.options, setBuildProgress);\n\n      setBuildOutput(output);\n      dispatch({\n        type: 'diagnostics',\n        value:\n          output.type === 'failure' && output.diagnostics\n            ? new Map(\n                [...output.diagnostics]\n                  .filter(([name]) => name)\n                  .map(([name, data]) => ['/' + name, data]),\n              )\n            : null,\n      });\n    } catch (error) {\n      console.error('Unexpected error', error);\n    }\n\n    setBuildState(STATUS_IDLING);\n  }\n\n  async function toggleWatch() {\n    if (watchSubscriptionRef.current) {\n      watchSubscriptionRef.current.unsubscribe();\n      watchSubscriptionRef.current = null;\n      setWatching(false);\n    } else {\n      setWatching(true);\n      setBuildState(STATUS_RUNNING);\n      let {unsubscribe, writeAssets} = await watch(\n        state.files,\n        state.options,\n        output => {\n          setBuildState(STATUS_IDLING);\n          setBuildOutput(output);\n          dispatch({\n            type: 'diagnostics',\n            value:\n              output.type === 'failure' && output.diagnostics\n                ? new Map(\n                    [...output.diagnostics]\n                      .filter(([name]) => name)\n                      .map(([name, data]) => ['/' + name, data]),\n                  )\n                : null,\n          });\n        },\n        setBuildProgress,\n      );\n      watchSubscriptionRef.current = {unsubscribe, writeAssets};\n    }\n  }\n\n  useEffect(() => {\n    if (watchSubscriptionRef.current) {\n      watchSubscriptionRef.current.writeAssets(state.files);\n      setBuildState(STATUS_RUNNING);\n    }\n  }, [state.files]);\n\n  useKeyboard(\n    e => {\n      if (\n        e.metaKey &&\n        e.code === 'KeyB' &&\n        !watching &&\n        buildState !== STATUS_RUNNING\n      ) {\n        build();\n        e.preventDefault();\n      }\n    },\n    [build, buildState, watching],\n  );\n\n  let [clientID] = usePromise(clientIDPromise);\n\n  return (\n    <div className=\"output\">\n      <Status\n        watching={watching}\n        status={buildState}\n        buildProgress={buildProgress}\n        buildOutput={buildOutput}\n      />\n      <div className=\"header\">\n        <button\n          disabled={watching || buildState !== STATUS_IDLING}\n          onClick={build}\n        >\n          Build\n        </button>\n        <button disabled={buildState !== STATUS_IDLING} onClick={toggleWatch}>\n          {watching ? 'Stop watching' : 'Watch'}\n        </button>\n      </div>\n      <div className=\"files\">\n        {buildOutput?.type === 'success' && (\n          <Tabs\n            names={['Output', 'Preview']}\n            selected={outputTabIndex}\n            setSelected={setOutputTabIndex}\n          >\n            <div>\n              <div className=\"list views\">\n                {buildOutput.bundles.map(({name, size, content}) => (\n                  <div key={name} className=\"view selected\">\n                    <div className=\"name\">\n                      {content.length < 500000 &&\n                      buildOutput.sourcemaps?.has(name) ? (\n                        <a\n                          href=\"https://evanw.github.io/source-map-visualization/#\"\n                          target=\"_blank\"\n                          rel=\"noopener noreferrer\"\n                          onClick={event => {\n                            event.target.href = linkSourceMapVisualization(\n                              content,\n                              nullthrows(buildOutput.sourcemaps?.get(name)),\n                            );\n                          }}\n                        >\n                          Map\n                        </a>\n                      ) : (\n                        <span />\n                      )}\n                      <span>{name}</span>\n                      <span>{filesize(size)}</span>\n                    </div>\n                    <Editor name={name} value={content} readOnly />\n                  </div>\n                ))}\n              </div>\n              {buildOutput?.graphs && <Graphs graphs={buildOutput.graphs} />}\n            </div>\n            <Preview clientID={waitForFS().then(() => nullthrows(clientID))} />\n          </Tabs>\n        )}\n        {buildOutput?.type === 'failure' && (\n          <ParcelError output={buildOutput} />\n        )}\n      </div>\n    </div>\n  );\n}\n\nfunction Editors({state, dispatch}) {\n  const views = [...state.views];\n  const names = views.map(([name, data]) => (\n    <Fragment key={name}>\n      <span></span>\n      <span>{name}</span>\n      <button\n        className={\n          'close ' +\n          (data.value !== state.files.get(name)?.value ? 'modified' : '')\n        }\n        onClick={() => dispatch({type: 'view.close', name})}\n      ></button>\n    </Fragment>\n  ));\n  const children = views.map(([name, data]) => {\n    if (data.component) {\n      let Comp = data.component;\n      return <Comp key={name} state={state} dispatch={dispatch} />;\n    } else {\n      return (\n        <Editor\n          key={name}\n          dispatch={dispatch}\n          name={name}\n          value={data.value}\n          diagnostics={state.diagnostics.get(name)}\n        />\n      );\n    }\n  });\n\n  if (state.useTabs) {\n    return (\n      <Tabs\n        names={names}\n        className=\"editors views\"\n        mode=\"hide\"\n        selected={state.currentView}\n        setSelected={i => dispatch({type: 'view.select', index: i})}\n        fallback={<Notes />}\n      >\n        {children}\n      </Tabs>\n    );\n  } else {\n    let merged = [];\n    for (let i = 0; i < views.length; i++) {\n      merged.push(\n        <div className=\"view\" key={i}>\n          <div className=\"name selected\">{names[i]}</div>\n          <div className=\"content\">{children[i]}</div>\n        </div>,\n      );\n    }\n    return (\n      <div className=\"list editors views\">\n        {merged}\n        {children.length === 0 && <Notes />}\n      </div>\n    );\n  }\n}\n\nfunction App() {\n  let [state, dispatch] = useReducer(reducer, null, getInitialState);\n\n  let isDesktop = useMedia('(min-width: 800px)');\n\n  useDebounce(() => saveState(state), 500, [state.files, state.options]);\n\n  useKeyboard(\n    e => {\n      if (e.metaKey && e.code === 'KeyS') {\n        dispatch({type: 'view.saveCurrent'});\n        e.preventDefault();\n      } else if (e.ctrlKey && e.code === 'KeyW') {\n        dispatch({type: 'view.closeCurrent'});\n        e.preventDefault();\n      }\n    },\n    [dispatch],\n  );\n\n  const sidebar = (\n    <FileBrowser\n      files={state.files}\n      collapsed={state.browserCollapsed}\n      dispatch={dispatch}\n      isEditing={state.isEditing}\n    >\n      <header>\n        <a href=\"/\">\n          <img\n            className=\"parcel\"\n            src={parcelText}\n            height=\"30\"\n            style={{marginTop: '5px'}}\n            alt=\"\"\n          />\n          <img\n            className=\"type\"\n            src={parcelLogo}\n            style={{width: '120px'}}\n            alt=\"\"\n          />\n          <span style={{fontSize: '25px'}}>REPL</span>\n        </a>\n      </header>\n      <div>\n        <PresetSelector dispatch={dispatch} />\n        <div className=\"options\">\n          <button\n            onClick={() =>\n              dispatch({\n                type: 'view.open',\n                name: 'Options',\n                component: Options,\n              })\n            }\n          >\n            Options\n          </button>\n          <button\n            title=\"Toggle view\"\n            className={'view ' + (state.useTabs ? 'tabs' : '')}\n            onClick={() =>\n              dispatch({\n                type: 'toggleView',\n              })\n            }\n          >\n            <span></span>\n          </button>\n        </div>\n      </div>\n    </FileBrowser>\n  );\n\n  const editors = <Editors state={state} dispatch={dispatch} />;\n  const output = <Output state={state} dispatch={dispatch} />;\n\n  return (\n    <main>\n      {isDesktop ? (\n        <PanelGroup direction=\"horizontal\" autoSaveId=\"repl-main-panels\">\n          <Panel\n            defaultSizePercentage={20}\n            minSizePixels={60}\n            className=\"panel\"\n          >\n            {sidebar}\n          </Panel>\n          <ResizeHandle />\n          <Panel\n            defaultSizePercentage={45}\n            minSizePixels={100}\n            className=\"panel\"\n          >\n            {editors}\n          </Panel>\n          <ResizeHandle />\n          <Panel\n            defaultSizePercentage={35}\n            minSizePixels={200}\n            className=\"panel\"\n          >\n            {output}\n          </Panel>\n        </PanelGroup>\n      ) : (\n        <div style={{display: 'flex', flexDirection: 'column'}}>\n          {sidebar}\n          {editors}\n          {output}\n        </div>\n      )}\n    </main>\n  );\n}\n\nfunction ResizeHandle() {\n  return <PanelResizeHandle className=\"resize-handle\"></PanelResizeHandle>;\n}\n\nlet root = createRoot(document.getElementById('root'));\nroot.render(<App />);\n\nif (navigator.serviceWorker) {\n  navigator.serviceWorker\n    // $FlowFixMe\n    .register(new URL('./sw.js', import /*:: (\"\") */.meta.url), {\n      type: 'module',\n    })\n    .catch(error => {\n      console.error('Service worker registration failed:', error);\n    });\n}\n"
  },
  {
    "path": "packages/dev/repl/src/parcel/BrowserPackageManager.js",
    "content": "// @flow\nimport type {FilePath, DependencySpecifier, SemverRange} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {\n  PackageManager,\n  Invalidations,\n  ResolveResult,\n} from '@parcel/package-manager';\nimport {registerSerializableClass} from '@parcel/core';\n// $FlowFixMe[untyped-import]\nimport packageJson from '../../package.json';\n\nimport path from 'path';\nimport nullthrows from 'nullthrows';\nimport {ResolverBase, init} from '@parcel/node-resolver-core';\n\nimport bundlerDefault from '@parcel/bundler-default';\nimport compressorRaw from '@parcel/compressor-raw';\nimport namerDefault from '@parcel/namer-default';\nimport optimizerCSS from '@parcel/optimizer-css';\nimport optimizerTerser from '@parcel/optimizer-terser';\nimport packagerCss from '@parcel/packager-css';\nimport packagerHtml from '@parcel/packager-html';\nimport packagerJs from '@parcel/packager-js';\nimport packagerRaw from '@parcel/packager-raw';\nimport reporterJson from '@parcel/reporter-json';\nimport reporterServer from '@parcel/reporter-dev-server-sw';\nimport resolverDefault from '@parcel/resolver-default';\nimport resolverREPLRuntimes from '@parcel/resolver-repl-runtimes';\nimport runtimeHMR from '@parcel/runtime-browser-hmr';\nimport runtimeJs from '@parcel/runtime-js';\nimport transformerBabel from '@parcel/transformer-babel';\nimport transformerCss from '@parcel/transformer-css';\nimport transformerHtml from '@parcel/transformer-html';\nimport transformerInlineString from '@parcel/transformer-inline-string';\nimport transformerJs from '@parcel/transformer-js';\nimport transformerJson from '@parcel/transformer-json';\nimport transformerPostcss from '@parcel/transformer-postcss';\nimport transformerPosthtml from '@parcel/transformer-posthtml';\nimport transformerRaw from '@parcel/transformer-raw';\nimport transformerReactRefreshWrap from '@parcel/transformer-react-refresh-wrap';\n\nexport const BUILTINS = {\n  '@parcel/bundler-default': bundlerDefault,\n  '@parcel/compressor-raw': compressorRaw,\n  '@parcel/namer-default': namerDefault,\n  '@parcel/optimizer-css': optimizerCSS,\n  '@parcel/optimizer-terser': optimizerTerser,\n  '@parcel/packager-css': packagerCss,\n  '@parcel/packager-html': packagerHtml,\n  '@parcel/packager-js': packagerJs,\n  '@parcel/packager-raw': packagerRaw,\n  '@parcel/reporter-dev-server-sw': reporterServer,\n  '@parcel/reporter-json': reporterJson,\n  '@parcel/resolver-default': resolverDefault,\n  '@parcel/resolver-repl-runtimes': resolverREPLRuntimes,\n  '@parcel/runtime-browser-hmr': runtimeHMR,\n  '@parcel/runtime-js': runtimeJs,\n  '@parcel/transformer-babel': transformerBabel,\n  '@parcel/transformer-css': transformerCss,\n  '@parcel/transformer-html': transformerHtml,\n  '@parcel/transformer-inline-string': transformerInlineString,\n  '@parcel/transformer-js': transformerJs,\n  '@parcel/transformer-json': transformerJson,\n  '@parcel/transformer-postcss': transformerPostcss,\n  '@parcel/transformer-posthtml': transformerPosthtml,\n  '@parcel/transformer-raw': transformerRaw,\n  '@parcel/transformer-react-refresh-wrap': transformerReactRefreshWrap,\n};\n\n// Package.json fields. Must match package_json.rs.\nconst MAIN = 1 << 0;\nconst SOURCE = 1 << 2;\nconst ENTRIES =\n  MAIN |\n  (process.env.PARCEL_BUILD_ENV !== 'production' ||\n  process.env.PARCEL_SELF_BUILD\n    ? SOURCE\n    : 0);\n\nconst IS_FILE = 1 << 0;\nconst IS_DIR = 1 << 1;\nconst IS_SYMLINK = 1 << 2;\n\nexport class BrowserPackageManager implements PackageManager {\n  resolver: ?ResolverBase;\n  fs: FileSystem;\n  projectRoot: FilePath;\n  cache: Map<DependencySpecifier, ResolveResult> = new Map();\n\n  constructor(fs: FileSystem, projectRoot: FilePath) {\n    this.fs = fs;\n    this.projectRoot = projectRoot;\n  }\n\n  async getResolver(): Promise<ResolverBase> {\n    if (this.resolver != null) return this.resolver;\n    await init?.();\n    this.resolver = new ResolverBase(this.projectRoot, {\n      fs: {\n        read: path => this.fs.readFileSync(path),\n        kind: path => {\n          let flags = 0;\n          try {\n            let stat = this.fs.lstatSync(path);\n            if (stat.isSymbolicLink()) {\n              flags |= IS_SYMLINK;\n              stat = this.fs.statSync(path);\n            }\n            if (stat.isFile()) {\n              flags |= IS_FILE;\n            } else if (stat.isDirectory()) {\n              flags |= IS_DIR;\n            }\n          } catch (err) {\n            // ignore\n          }\n          return flags;\n        },\n        readLink: path => this.fs.readlinkSync(path),\n      },\n      mode: 2,\n      entries: ENTRIES,\n      packageExports: true,\n    });\n    return this.resolver;\n  }\n\n  static deserialize(opts: any): BrowserPackageManager {\n    return new BrowserPackageManager(opts.fs, opts.projectRoot);\n  }\n\n  serialize(): {|\n    $$raw: boolean,\n    fs: FileSystem,\n    projectRoot: FilePath,\n  |} {\n    return {\n      $$raw: false,\n      fs: this.fs,\n      projectRoot: this.projectRoot,\n    };\n  }\n\n  async require(\n    name: DependencySpecifier,\n    from: FilePath,\n    opts: ?{|\n      range?: ?SemverRange,\n      shouldAutoInstall?: boolean,\n      saveDev?: boolean,\n    |},\n  ): Promise<any> {\n    let {resolved} = await this.resolve(name, from, opts);\n\n    // $FlowFixMe\n    if (resolved in BUILTINS) {\n      return BUILTINS[resolved];\n    }\n\n    throw new Error(`Cannot require '${resolved}' in the browser`);\n  }\n\n  async resolve(\n    name: DependencySpecifier,\n    from: FilePath,\n    // eslint-disable-next-line no-unused-vars\n    options?: ?{|\n      range?: ?SemverRange,\n      shouldAutoInstall?: boolean,\n      saveDev?: boolean,\n    |},\n  ): Promise<ResolveResult> {\n    if (name.startsWith('@parcel/') && name !== '@parcel/watcher') {\n      return Promise.resolve({\n        resolved: name,\n        pkg: {\n          name: name,\n          version: '2.0.0',\n          engines: {\n            parcel: '^2.0.0',\n          },\n        },\n        invalidateOnFileChange: new Set(),\n        invalidateOnFileCreate: [],\n        type: 1,\n      });\n    }\n\n    let basedir = path.dirname(from);\n    let key = basedir + ':' + name;\n    let resolved = this.cache.get(key);\n    if (!resolved) {\n      let res = (await this.getResolver()).resolve({\n        filename: name,\n        specifierType: 'commonjs',\n        parent: from,\n      });\n      if (res.error) {\n        let e = new Error(`Could not resolve module \"${name}\" from \"${from}\"`);\n        // $FlowFixMe\n        e.code = 'MODULE_NOT_FOUND';\n        throw e;\n      }\n      switch (res.resolution.type) {\n        case 'Path': {\n          let self = this;\n          let resolution = res.resolution.value;\n          resolved = {\n            resolved: resolution,\n            invalidateOnFileChange: new Set(res.invalidateOnFileChange),\n            invalidateOnFileCreate: res.invalidateOnFileCreate,\n            type: res.moduleType,\n            get pkg() {\n              let pkgPath = self.fs.findAncestorFile(\n                ['package.json'],\n                resolution,\n                self.projectRoot,\n              );\n              return pkgPath\n                ? JSON.parse(self.fs.readFileSync(pkgPath, 'utf8'))\n                : null;\n            },\n          };\n          break;\n        }\n        case 'Builtin': {\n          let {scheme, module} = res.resolution.value;\n          resolved = {\n            resolved: scheme ? `${scheme}:${module}` : module,\n            invalidateOnFileChange: new Set(res.invalidateOnFileChange),\n            invalidateOnFileCreate: res.invalidateOnFileCreate,\n            type: res.moduleType,\n          };\n          break;\n        }\n        default:\n          throw new Error('Unknown resolution type');\n      }\n      this.cache.set(key, resolved);\n    }\n    return nullthrows(resolved);\n  }\n\n  getInvalidations(): Invalidations {\n    return {\n      invalidateOnFileCreate: [],\n      invalidateOnFileChange: new Set(),\n      invalidateOnStartup: false,\n    };\n  }\n  invalidate(): void {}\n}\n\nregisterSerializableClass(\n  `${packageJson.version}:BrowserPackageManager`,\n  BrowserPackageManager,\n);\n"
  },
  {
    "path": "packages/dev/repl/src/parcel/ExtendedMemoryFS.js",
    "content": "// @flow\nimport type {FilePath} from '@parcel/types';\nimport {MemoryFS, FSError, makeShared, File} from '@parcel/fs';\nimport path from 'path';\nimport {registerSerializableClass} from '@parcel/core';\n\nconst {Buffer} = require('buffer');\n\nconst CONSTANTS = {\n  O_RDONLY: 0,\n  O_WRONLY: 1,\n  O_RDWR: 2,\n  S_IFMT: 61440,\n  S_IFREG: 32768,\n  S_IFDIR: 16384,\n  S_IFCHR: 8192,\n  S_IFBLK: 24576,\n  S_IFIFO: 4096,\n  S_IFLNK: 40960,\n  S_IFSOCK: 49152,\n  O_CREAT: 64,\n  O_EXCL: 128,\n  O_NOCTTY: 256,\n  O_TRUNC: 512,\n  O_APPEND: 1024,\n  O_DIRECTORY: 65536,\n  O_NOATIME: 262144,\n  O_NOFOLLOW: 131072,\n  O_SYNC: 1052672,\n  O_DIRECT: 16384,\n  O_NONBLOCK: 2048,\n};\n\nfunction asyncToNode(args, num, f) {\n  let cb, params;\n  if (args.length === num) {\n    cb = args[args.length - 1];\n    params = args.slice(0, -1);\n  } else {\n    let maybeCb = args[args.length - 1];\n    if (typeof maybeCb === 'function') {\n      cb = maybeCb;\n      params = args.slice(0, -1);\n    } else {\n      params = args;\n    }\n  }\n\n  // $FlowFixMe\n  let result = Promise.resolve(f(...params));\n  if (cb) {\n    result.then(\n      // $FlowFixMe\n      res => cb(null, res),\n      // $FlowFixMe\n      err => cb(err),\n    );\n  } else {\n    return result;\n  }\n}\n\n// 'a': a. create if missing\n// 'ax': a. throw if exists\n// 'a+': ra. create if missing\n// 'ax+': ra. throw if exists\n// 'r': r. throw if missing\n// 'r+': rw. throw if missing\n// 'w': w. create if missing, clear if exists\n// 'wx': w. create if missing, throw if exists\n// 'w+': rw. create if missing, clear if exists\n// 'wx+': rw. create if missing, throw if exists\n// O_RDONLY\tFlag indicating to open a file for read-only access.\n// O_WRONLY\tFlag indicating to open a file for write-only access.\n// O_RDWR\tFlag indicating to open a file for read-write access.\n\n// O_CREAT\tFlag indicating to create the file if it does not already exist.\n// O_EXCL\tFlag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists.\n\n// O_TRUNC\tFlag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero.\n// O_APPEND\tFlag indicating that data will be appended to the end of the file.\n// O_DIRECTORY\tFlag indicating that the open should fail if the path is not a directory.\n// O_NOFOLLOW\tFlag indicating that the open should fail if the path is a symbolic link.\n\nconst FD_MAX = 4096;\nfunction parseOpenFlags(flags) {\n  let flagsBits = 0;\n  if (typeof flags === 'number') {\n    flagsBits = flags;\n  } else {\n    flags = [...flags].filter(c => c !== 's').join('');\n    if (flags.includes('a')) {\n      flagsBits |= CONSTANTS.O_APPEND | CONSTANTS.O_CREAT;\n      if (flags.includes('+')) {\n        flagsBits |= CONSTANTS.O_RDWR;\n      } else {\n        flagsBits |= CONSTANTS.O_RDONLY;\n      }\n      if (flags.includes('x')) {\n        flagsBits |= CONSTANTS.O_EXCL;\n      }\n    } else if (flags.includes('r')) {\n      if (flags.includes('+')) {\n        flagsBits |= CONSTANTS.O_RDWR;\n      } else {\n        flagsBits |= CONSTANTS.O_RDONLY;\n      }\n    } else if (flags.includes('w')) {\n      flagsBits |= CONSTANTS.O_CREAT;\n      if (flags.includes('+')) {\n        flagsBits |= CONSTANTS.O_RDWR;\n      } else {\n        flagsBits |= CONSTANTS.O_WRONLY;\n      }\n      if (flags.includes('x')) {\n        flagsBits |= CONSTANTS.O_EXCL;\n      } else {\n        flagsBits |= CONSTANTS.O_TRUNC;\n      }\n    }\n  }\n\n  return flagsBits;\n}\n\n/**\n * Can be used as a standin for the npm `require(\"fs\")` package because `MemoryFS` not API compatible.\n */\nexport class ExtendedMemoryFS extends MemoryFS {\n  openFDs: Map<number, {|filePath: FilePath, file: File, position: number|}> =\n    new Map();\n  nextFD: number = 1;\n\n  // eslint-disable-next-line\n  async _mkdir(\n    dir: FilePath,\n    options: {recursive?: boolean, ...} = {},\n  ): Promise<void> {\n    let {recursive = false} = options;\n\n    if (!recursive) {\n      if (!this.dirs.has(path.dirname(dir))) {\n        throw new FSError('ENOENT', path.dirname(dir), 'is not a directory');\n      }\n      if (this.dirs.has(dir)) {\n        throw new FSError('EEXIST', dir, 'already exists');\n      }\n    }\n\n    return super.mkdirp(dir);\n  }\n\n  async _rmdir(\n    filePath: FilePath,\n    options: {recursive?: boolean, ...} = {},\n  ): Promise<void> {\n    let {recursive = false} = options;\n\n    if (!recursive) {\n      if (!this.dirs.has(filePath) && !this.files.has(filePath)) {\n        throw new FSError('ENOENT', filePath, 'is not a directory');\n      }\n      if (\n        this.dirs.has(filePath) &&\n        (await this.readdir(filePath)).length > 0\n      ) {\n        throw new FSError('ENOTEMPTY', filePath, \"isn't empty\");\n      }\n    }\n\n    return super.rimraf(filePath);\n  }\n\n  // --------------------------------\n\n  rmdir(...args: any): any {\n    return asyncToNode(args, 3, (...p) => this._rmdir(...p));\n  }\n  mkdir(...args: any): any {\n    return asyncToNode(args, 3, (...p) => this._mkdir(...p));\n  }\n  readdir(...args: any): any {\n    return asyncToNode(args, 3, (...p) => super.readdir(...p));\n  }\n  unlink(...args: any): any {\n    return asyncToNode(args, 2, (...p) => super.unlink(...p));\n  }\n  copyFile(...args: any): any {\n    return asyncToNode(args, 3, (...p) => super.copyFile(...p));\n  }\n  realpath(...args: any): any {\n    return asyncToNode(args, 3, (...p) => super.realpath(...p));\n  }\n  readFile(...args: any): any {\n    return asyncToNode(args, 3, (...p) => super.readFile(...p));\n  }\n  symlink(...args: any): any {\n    return asyncToNode(args, 4, (...p) => super.symlink(...p));\n  }\n  writeFile(...args: any): any {\n    return asyncToNode(args, 4, (...p) => super.writeFile(...p));\n  }\n  stat(...args: any): any {\n    return asyncToNode(args, 2, (...p) => super.stat(...p));\n  }\n  lstat(...args: any): any {\n    return asyncToNode(args, 2, (...p) => super.stat(...p));\n  }\n  lstatSync(filePath: FilePath): any {\n    return this.statSync(filePath);\n  }\n  exists(filePath: FilePath, cb?: boolean => void): any {\n    let result = super.exists(filePath);\n    if (cb != null) {\n      result.then(res => cb(res));\n    } else {\n      return result;\n    }\n  }\n  // --------------------------------\n  chmodSync() {}\n  renameSync(oldPath: FilePath, newPath: FilePath) {\n    let file = this.files.get(oldPath);\n    if (file) {\n      this.files.delete(oldPath);\n      if (this.dirs.has(newPath)) {\n        this.files.set(newPath + '/' + path.basename(oldPath), file);\n      } else {\n        this.files.set(newPath, file);\n        this.symlinks.delete(newPath);\n      }\n      return;\n    }\n\n    let target = this.symlinks.get(oldPath);\n    if (target) {\n      this.symlinks.delete(oldPath);\n      this.symlinks.set(newPath, target);\n      return;\n    }\n\n    let dir = this.dirs.get(oldPath);\n    if (dir) {\n      this.dirs.delete(oldPath);\n      this.dirs.set(newPath, dir);\n      return;\n    }\n\n    throw new FSError('ENOENT', path.dirname(oldPath), \"wasn't found\");\n  }\n\n  _nextFD(path: FilePath): number {\n    let tested = 0;\n    let fd;\n    while (tested < FD_MAX) {\n      let candidate = this.nextFD++;\n      if (candidate >= FD_MAX) {\n        this.nextFD = 1;\n        candidate = this.nextFD++;\n      }\n      if (!this.openFDs.has(candidate)) {\n        fd = candidate;\n        break;\n      }\n    }\n    if (!fd) {\n      throw new FSError('EMFILE', path, 'no available file descriptor');\n    }\n    return fd;\n  }\n\n  openSync(filePath: FilePath, flags: number, mode: number): number {\n    flags = parseOpenFlags(flags);\n    if (flags & CONSTANTS.O_NOFOLLOW && this.symlinks.has(filePath)) {\n      throw new FSError('ELOOP', filePath, 'is a symlink');\n    }\n\n    filePath = this._normalizePath(filePath);\n\n    let file = this.files.get(filePath);\n    if (flags & CONSTANTS.O_CREAT) {\n      if (file) {\n        if (flags & CONSTANTS.O_EXCL) {\n          throw new FSError('EEXIST', filePath, 'already exists');\n        }\n      } else {\n        file = new File(makeShared(''), mode);\n        this.files.set(filePath, file);\n      }\n    }\n    if (!file) {\n      throw new FSError('ENOENT', filePath, 'does not exist');\n    } else if (flags & CONSTANTS.O_TRUNC) {\n      file.write(makeShared(''), file.mode);\n    }\n\n    if (flags & CONSTANTS.O_APPEND) {\n      throw new Error(\"append isn't supported\");\n    }\n\n    let fd = this._nextFD(filePath);\n    this.openFDs.set(fd, {filePath, file, position: 0});\n    return fd;\n  }\n\n  readSync(\n    fdNum: number,\n    buffer: Buffer,\n    offset: any,\n    length: any,\n    position: any,\n  ): number {\n    if (length == null) {\n      ({offset, length, position} = offset);\n    }\n    let fd = this.openFDs.get(fdNum);\n    if (!fd) {\n      throw new Error('invalid fd');\n    }\n    let file = fd.file;\n    position = position ?? fd.position;\n    offset = offset ?? 0;\n    length = length ?? buffer.length;\n    length = Math.max(Math.min(length, file.buffer.length - position), 0);\n\n    for (let i = 0; i < length; i++) {\n      buffer[offset] = file.buffer[position];\n      offset++;\n      position++;\n    }\n    fd.position = position;\n\n    return length;\n  }\n  writeSync(\n    fdNum: number,\n    buffer: Buffer | string,\n    offset: any,\n    length: any,\n    position: any,\n  ): number {\n    if (offset != null && length == null) {\n      ({offset, length, position} = offset);\n    }\n    if (typeof buffer === 'string') {\n      buffer = Buffer.from(buffer);\n    }\n    let fd = this.openFDs.get(fdNum);\n    if (!fd) {\n      throw new Error('invalid fd');\n    }\n    let file = fd.file;\n    position = position ?? fd.position;\n    offset = offset ?? 0;\n    length = length ?? buffer.length;\n\n    let missingSize = length + position - file.buffer.length;\n    if (missingSize > 0) {\n      file.buffer = Buffer.concat([file.buffer, Buffer.alloc(missingSize)]);\n    }\n\n    for (let i = 0; i < length; i++) {\n      file.buffer[position] = buffer[offset];\n      offset++;\n      position++;\n    }\n    fd.position = position;\n\n    return length;\n  }\n  closeSync(fd: number) {\n    if (!this.openFDs.has(fd)) {\n      throw new Error('invalid fd');\n    }\n    this.openFDs.delete(fd);\n  }\n  fstatSync(fdNum: number): any {\n    let fd = this.openFDs.get(fdNum);\n    if (!fd) {\n      throw new Error('invalid fd');\n    }\n    let {filePath} = fd;\n    return this.statSync(filePath);\n  }\n  // ------------------------------------------------------------\n\n  /* eslint-disable require-await */\n  open(...args: any): any {\n    return asyncToNode(args, 2, async (...p) =>\n      Promise.resolve(this.openSync(...p)),\n    );\n  }\n  read(...args: any): any {\n    return asyncToNode(args, 6, async (...p) =>\n      Promise.resolve(this.readSync(...p)),\n    );\n  }\n  write(...args: any): any {\n    return asyncToNode(args, 6, async (...p) =>\n      Promise.resolve(this.writeSync(...p)),\n    );\n  }\n  close(...args: any): any {\n    return asyncToNode(args, 2, async (...p) =>\n      Promise.resolve(this.closeSync(...p)),\n    );\n  }\n  fstat(...args: any): any {\n    return asyncToNode(args, 2, async (...p) =>\n      Promise.resolve(this.fstatSync(...p)),\n    );\n  }\n\n  rename(...args: any): any {\n    return asyncToNode(args, 2, async (...p) =>\n      Promise.resolve(this.renameSync(...p)),\n    );\n  }\n\n  chmod(...args: any): any {\n    return asyncToNode(args, 3, async (...p) =>\n      Promise.resolve(this.chmodSync(...p)),\n    );\n  }\n  /* eslint-enable require-await */\n}\n\nregisterSerializableClass(`repl-ExtendedMemoryFS`, ExtendedMemoryFS);\n\n// (async () => {\n// \tlet fs = new ExtendedMemoryFS();\n// \tawait fs.mkdir(\"/app\");\n// \tawait fs.writeFile(\"/app/x.txt\", \"abcdefghijklmnopqrstuvwxyz\");\n// \t// console.log(await fs.readdir(\"/app\"));\n// \t// console.log(fs.readFileSync(\"/app/x.txt\", \"utf8\"));\n\n// \tlet fd = fs.openSync(\"/app/x.txt\", \"w\");\n// \t// let buf = Buffer.alloc(10);\n// \t// let buf = new Uint8Array(Buffer.alloc(10));\n// \t// fs.readSync(fd, buf, { length: 3 });\n// \t// fs.readSync(fd, buf, { offset: 3, length: 3 });\n// \t// fs.readSync(fd, buf, 0, 10, null);\n// \t// console.log(\"b\", buf.toString(\"utf8\"));\n\n// \t// let buf = Buffer.from(\"new data\");\n// \t// fs.writeSync(fd, buf, { position: 3 });\n// \tfs.closeSync(fd);\n\n// \t// console.log(fs.readFileSync(\"/app/x.txt\"));\n// \t// console.log(fs.readFileSync(\"/app/x.txt\", \"utf8\"));\n// })();\n"
  },
  {
    "path": "packages/dev/repl/src/parcel/ParcelWorker.js",
    "content": "// @flow\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {FSList, CodeMirrorDiagnostic, REPLOptions} from '../utils';\nimport type {MemoryFS} from '@parcel/fs';\nimport type {BuildSuccessEvent} from '@parcel/types';\nimport type WorkerFarm from '@parcel/workers';\n\nimport {expose, proxy} from 'comlink';\nimport Parcel, {createWorkerFarm} from '@parcel/core';\n// import {MemoryFS} from '@parcel/fs';\nimport {\n  makeDeferredWithPromise,\n  DefaultMap,\n  prettyDiagnostic,\n} from '@parcel/utils';\n// import SimplePackageInstaller from './SimplePackageInstaller';\n// import {NodePackageManager} from '@parcel/package-manager';\nimport configRepl from '@parcel/config-repl';\n\nimport {ExtendedMemoryFS} from './ExtendedMemoryFS';\nimport {generatePackageJson, nthIndex} from '../utils/';\nimport path from 'path';\nimport {yarnInstall} from './yarn.js';\nimport {BrowserPackageManager} from './BrowserPackageManager.js';\n\nexport type BundleOutputError = {|\n  type: 'failure',\n  error: string,\n  diagnostics?: Map<string, Array<CodeMirrorDiagnostic>>,\n|};\nexport type BundleOutput =\n  | {|\n      type: 'success',\n      bundles: Array<{|\n        name: string,\n        content: string,\n        size: number,\n        time: number,\n      |}>,\n      buildTime: number,\n      graphs: ?Array<{|name: string, content: string|}>,\n      sourcemaps: ?Map<string, string>,\n    |}\n  | BundleOutputError;\n\nlet workerFarm: WorkerFarm;\nlet fs: MemoryFS;\nfunction startWorkerFarm(numWorkers: ?number) {\n  // $FlowFixMe\n  if (!workerFarm || workerFarm.maxConcurrentWorkers !== numWorkers) {\n    workerFarm?.end();\n    // $FlowFixMe\n    workerFarm = createWorkerFarm(\n      numWorkers != null ? {maxConcurrentWorkers: numWorkers} : {},\n    );\n    fs = new ExtendedMemoryFS(workerFarm);\n    fs.chdir('/app');\n\n    // $FlowFixMe\n    globalThis.fs = fs;\n    globalThis.workerFarm = workerFarm;\n  }\n}\n\nlet swFSPromise, resolveSWFSPromise;\nfunction resetSWPromise() {\n  ({\n    promise: swFSPromise,\n    deferred: {resolve: resolveSWFSPromise},\n  } = makeDeferredWithPromise());\n}\n\nlet sw: MessagePort;\nglobal.PARCEL_SERVICE_WORKER = async (type, data) => {\n  await sendMsg(sw, type, data);\n  if (type === 'setFS') {\n    resolveSWFSPromise();\n  }\n};\nglobal.PARCEL_SERVICE_WORKER_REGISTER = (type, cb) => {\n  // $FlowFixMe[incompatible-type]\n  let wrapper: EventHandler = async (evt: ExtendableMessageEvent) => {\n    if (evt.data.type === type) {\n      let response = await cb(evt.data.data);\n      sw.postMessage({\n        type,\n        id: evt.data.id,\n        data: response,\n      });\n    }\n  };\n\n  sw.addEventListener('message', wrapper);\n  return () => sw.removeEventListener('message', wrapper);\n};\n\nexpose({\n  bundle,\n  watch,\n  ready: numWorkers =>\n    new Promise(res => {\n      startWorkerFarm(numWorkers);\n      if (workerFarm.readyWorkers === workerFarm.options.maxConcurrentWorkers) {\n        res(true);\n      } else {\n        workerFarm.once('ready', () => res(true));\n      }\n    }),\n  waitForFS: () => proxy(swFSPromise),\n  setServiceWorker: v => {\n    sw = v;\n    sw.start();\n  },\n});\n\nconst PathUtils = {\n  APP_DIR: '/app',\n  DIST_DIR: '/app/dist',\n  CACHE_DIR: '/.parcel-cache',\n  fromAssetPath(str) {\n    return path.join('/app', str);\n  },\n  toAssetPath(str) {\n    return str.startsWith('/app/') ? str.slice(5) : str;\n  },\n};\n\nfunction removeTrailingNewline(text: string): string {\n  if (text[text.length - 1] === '\\n') {\n    return text.slice(0, -1);\n  } else {\n    return text;\n  }\n}\nasync function convertDiagnostics(inputFS, diagnostics: Array<Diagnostic>) {\n  let parsedDiagnostics = new DefaultMap<string, Array<CodeMirrorDiagnostic>>(\n    () => [],\n  );\n  for (let diagnostic of diagnostics) {\n    let {codeFrames, origin} = diagnostic;\n\n    if (codeFrames) {\n      for (let {code: codeExisting, filePath, codeHighlights} of codeFrames) {\n        for (let {start, end, message} of codeHighlights) {\n          if (filePath) {\n            let list = parsedDiagnostics.get(PathUtils.toAssetPath(filePath));\n\n            let code =\n              codeExisting ??\n              (await inputFS.readFile(\n                path.resolve(PathUtils.APP_DIR, filePath),\n                'utf8',\n              ));\n\n            let from = nthIndex(code, '\\n', start.line - 1) + start.column;\n            let to = nthIndex(code, '\\n', end.line - 1) + end.column + 1;\n\n            list.push({\n              from,\n              to,\n              severity: 'error',\n              source: origin || 'info',\n              message: message || diagnostic.message,\n              stack: diagnostic.stack,\n            });\n          }\n        }\n      }\n      // } else {\n      //   let list = parsedDiagnostics.get(PathUtils.toAssetPath(filePath));\n      //   if (!list) {\n      //     list = [];\n      //     parsedDiagnostics.set(PathUtils.toAssetPath(filePath), list);\n      //   }\n\n      //   list.push({\n      //     from: 0,\n      //     to: 0,\n      //     severity: 'error',\n      //     source: origin || 'info',\n      //     message: diagnostic.message,\n      //     stack: diagnostic.stack,\n      //   });\n    }\n  }\n  return parsedDiagnostics;\n}\n\nasync function renderDiagnostics(\n  inputFS,\n  diagnostics: Array<Diagnostic>,\n): Promise<string> {\n  return (\n    await Promise.all(\n      diagnostics.map(async diagnostic => {\n        let {message, stack, codeframe, hints, documentation} =\n          await prettyDiagnostic(\n            diagnostic,\n            // $FlowFixMe\n            {projectRoot: '/', inputFS},\n            80,\n            'html',\n          );\n        let result = '';\n\n        result += message;\n        result += '\\n\\n';\n        if (stack) {\n          result += stack;\n          result += '\\n';\n        }\n        if (codeframe) {\n          result += codeframe;\n          result += '\\n';\n        }\n        if (hints.length > 0) {\n          for (let h of hints) {\n            result += h;\n            result += '\\n';\n          }\n        }\n        if (documentation) {\n          result += documentation;\n          result += '\\n';\n        }\n\n        return result;\n      }),\n    )\n  ).join(`\\n${'-'.repeat(80)}\\n\\n`);\n}\n\nasync function setup(assets, options) {\n  if (!(await fs.exists('/.parcelrc'))) {\n    await fs.writeFile('/.parcelrc', JSON.stringify(configRepl, null, 2));\n  }\n  // TODO for NodeResolver\n  if (!(await fs.exists('/_empty.js'))) {\n    await fs.writeFile('/_empty.js', '');\n  }\n\n  let graphs = options.renderGraphs ? [] : null;\n  if (graphs && options.renderGraphs) {\n    // $FlowFixMe\n    globalThis.PARCEL_DUMP_GRAPHVIZ = (name, content) =>\n      graphs.push({name, content});\n    globalThis.PARCEL_DUMP_GRAPHVIZ.mode = options.renderGraphs;\n  }\n\n  // TODO only create new instance if options/entries changed\n  let entries = assets\n    .filter(([, data]) => data.isEntry)\n    .map(([name]) => PathUtils.fromAssetPath(name));\n  const bundler = new Parcel({\n    entries,\n    // https://github.com/parcel-bundler/parcel/pull/4290\n    shouldDisableCache: false,\n    cacheDir: PathUtils.CACHE_DIR,\n    mode: options.mode,\n    env: {\n      NODE_ENV: options.mode,\n    },\n    hmrOptions: options.hmr ? {} : null,\n    logLevel: 'verbose',\n    shouldPatchConsole: false,\n    workerFarm,\n    defaultConfig: '/.parcelrc',\n    inputFS: fs,\n    outputFS: fs,\n    // cache: new IDBCache(),\n    defaultTargetOptions: {\n      distDir: PathUtils.DIST_DIR,\n      publicUrl: options.publicUrl || undefined,\n      shouldOptimize: options.minify,\n      shouldScopeHoist: options.scopeHoist,\n      sourceMaps: options.sourceMaps,\n    },\n    packageManager: new BrowserPackageManager(fs, '/'),\n    // packageManager: new NodePackageManager(\n    //   memFS,\n    //   new SimplePackageInstaller(memFS),\n    // ),\n  });\n\n  return {bundler, graphs};\n}\n\nasync function collectResult(\n  event: BuildSuccessEvent,\n  graphs,\n  fs,\n): Promise<BundleOutput> {\n  let bundleContents = [];\n  let sourcemaps = new Map();\n  for (let b of event.bundleGraph.getBundles()) {\n    let {\n      filePath,\n      stats: {size, time},\n    } = b;\n\n    let name = PathUtils.toAssetPath(filePath);\n    let content = removeTrailingNewline(await fs.readFile(filePath, 'utf8'));\n    bundleContents.push({\n      name,\n      content,\n      size,\n      time,\n    });\n    if (content.length < 5000000 && (await fs.exists(filePath + '.map'))) {\n      sourcemaps.set(name, await fs.readFile(filePath + '.map', 'utf8'));\n    }\n  }\n\n  bundleContents.sort(({name: a}, {name: b}) => a.localeCompare(b));\n\n  return {\n    type: 'success',\n    bundles: bundleContents,\n    buildTime: event.buildTime,\n    graphs,\n    sourcemaps,\n  };\n}\n\nasync function syncAssetsToFS(assets: FSList, options: REPLOptions) {\n  await fs.mkdirp('/app');\n\n  let filesToKeep = new Set([\n    '/app/.yarn',\n    '/app/node_modules',\n    '/app/yarn.lock',\n    '/app/package.json',\n    ...assets.map(([name]) => PathUtils.fromAssetPath(name)),\n  ]);\n\n  for (let [name, {value}] of assets) {\n    if (name === '/package.json') continue;\n    let p = PathUtils.fromAssetPath(name);\n    await fs.mkdirp(path.dirname(p));\n    if (!(await fs.exists(p)) || (await fs.readFile(p, 'utf8')) !== value) {\n      await fs.writeFile(p, value);\n    }\n  }\n\n  let oldPackageJson = (await fs.exists('/app/package.json'))\n    ? await fs.readFile('/app/package.json', 'utf8')\n    : null;\n  let newPackageJson =\n    assets.find(([name]) => name === '/package.json')?.[1].value ??\n    generatePackageJson(options);\n\n  if (!oldPackageJson || oldPackageJson.trim() !== newPackageJson.trim()) {\n    await fs.writeFile('/app/package.json', newPackageJson);\n  }\n\n  for (let f of await fs.readdir('/app')) {\n    f = '/app/' + f;\n    if (filesToKeep.has(f) || [...filesToKeep].some(k => k.startsWith(f))) {\n      continue;\n    }\n    await fs.rimraf(f);\n  }\n}\n\nasync function bundle(\n  assets: FSList,\n  options: REPLOptions,\n  progress: string => void,\n): Promise<BundleOutput> {\n  const {bundler, graphs} = await setup(assets, {...options, hmr: false});\n\n  resetSWPromise();\n  await syncAssetsToFS(assets, options);\n\n  await yarnInstall(options, fs, PathUtils.APP_DIR, v => {\n    if (v.data.includes('Resolution step')) {\n      progress('Yarn: Resolving');\n    } else if (v.data.includes('Fetch step')) {\n      progress('Yarn: Fetching');\n    } else if (v.data.includes('Link step')) {\n      progress('Yarn: Linking');\n    }\n  });\n\n  progress('Bundling');\n\n  try {\n    let event = await bundler.run();\n    return await collectResult(event, graphs, fs);\n  } catch (error) {\n    console.error(error, error.diagnostics);\n    if (error.diagnostics) {\n      return {\n        type: 'failure',\n        error: await renderDiagnostics(fs, error.diagnostics),\n        diagnostics: await convertDiagnostics(fs, error.diagnostics),\n      };\n    } else {\n      return {\n        type: 'failure',\n        error: error,\n      };\n    }\n  }\n}\n\nasync function watch(\n  assets: FSList,\n  options: REPLOptions,\n  onBuild: BundleOutput => void,\n  progress: (?string) => void,\n): Promise<{|\n  unsubscribe: () => Promise<mixed>,\n  writeAssets: FSList => Promise<mixed>,\n|}> {\n  let {bundler, graphs} = await setup(assets, options);\n\n  resetSWPromise();\n  await syncAssetsToFS(assets, options);\n\n  await yarnInstall(options, fs, PathUtils.APP_DIR, v => {\n    if (v.data.includes('Resolution step')) {\n      progress('Yarn: Resolving');\n    } else if (v.data.includes('Fetch step')) {\n      progress('Yarn: Fetching');\n    } else if (v.data.includes('Link step')) {\n      progress('Yarn: Linking');\n    }\n  });\n\n  progress('building');\n\n  return proxy({\n    unsubscribe: (\n      await bundler.watch(async (err, event) => {\n        if (event) {\n          // eslint-disable-next-line default-case\n          switch (event.type) {\n            case 'buildSuccess': {\n              let result = await collectResult(event, graphs, fs);\n              onBuild(result);\n              break;\n            }\n            case 'buildFailure': {\n              console.log(event.diagnostics);\n              onBuild({\n                type: 'failure',\n                error: await renderDiagnostics(fs, event.diagnostics),\n                diagnostics: await convertDiagnostics(fs, event.diagnostics),\n              });\n              break;\n            }\n          }\n        }\n      })\n    ).unsubscribe,\n    writeAssets: assets => {\n      resetSWPromise();\n      syncAssetsToFS(assets, options);\n    },\n  });\n}\n\nfunction uuidv4() {\n  return (String(1e7) + -1e3 + -4e3 + -8e3 + -1e11).replace(\n    /[018]/g,\n    // $FlowFixMe\n    (c: number) =>\n      (\n        c ^\n        // $FlowFixMe\n        (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n      ).toString(16),\n  );\n}\n\nfunction sendMsg(target, type, data, transfer) {\n  let id = uuidv4();\n  return new Promise(res => {\n    let handler = (evt: MessageEvent) => {\n      // $FlowFixMe\n      if (evt.data.id === id) {\n        target.removeEventListener('message', handler);\n        // $FlowFixMe\n        res(evt.data.data);\n      }\n    };\n    target.addEventListener('message', handler);\n    target.postMessage({type, data, id}, transfer);\n  });\n}\n"
  },
  {
    "path": "packages/dev/repl/src/parcel/index.js",
    "content": "// @flow\nimport type {FS, REPLOptions} from '../utils';\nimport type {BundleOutput} from './ParcelWorker';\n\nimport {proxy, wrap, transfer} from 'comlink';\n\nconst worker = wrap(\n  // $FlowFixMe\n  new Worker(new URL('./ParcelWorker.js', import /*:: (\"\") */.meta.url), {\n    name: 'Parcel Worker Main',\n    type: 'module',\n  }),\n);\n\n// const worker = {\n//   waitForFS: () => Promise.resolve(),\n//   ready: Promise.resolve(),\n//   bundle(assets, options, progress): Promise<BundleOutput> {\n//     return Promise.resolve({\n//       type: 'success',\n//       bundles: assets.map(({name, content}) => ({\n//         name,\n//         content,\n//         time: 0,\n//         size: content.length,\n//       })),\n//       buildTime: 1,\n//       graphs: options.renderGraphs\n//         ? [\n//             {\n//               name: 'test',\n//               content: `digraph graphname\n// {\n//     a -> b -> c;\n//     b -> d;\n// }`,\n//             },\n//           ]\n//         : null,\n//       sourcemaps: null,\n//     });\n//   },\n//   watch(...args) {\n//     return Promise.resolve({\n//       unsubscribe: () => Promise.resolve(),\n//       writeAssets: () => Promise.resolve(args),\n//     });\n//   },\n//   setServiceWorker: v => v,\n// };\n\nexport function workerReady(numWorkers: ?number): Promise<void> {\n  return worker.ready(numWorkers);\n}\n\nexport function waitForFS(): Promise<void> {\n  return worker.waitForFS();\n}\n\nexport function bundle(\n  files: FS,\n  options: REPLOptions,\n  progress: string => void,\n): Promise<BundleOutput> {\n  return worker.bundle(files.toJSON(), options, proxy(progress));\n}\n\nexport async function watch(\n  files: FS,\n  options: REPLOptions,\n  onBuild: BundleOutput => void,\n  progress: (?string) => void,\n): Promise<{|\n  unsubscribe: () => Promise<mixed>,\n  writeAssets: FS => Promise<mixed>,\n|}> {\n  let result = await worker.watch(\n    files.toJSON(),\n    options,\n    proxy(onBuild),\n    proxy(progress),\n  );\n  return {\n    unsubscribe: result.unsubscribe,\n    writeAssets: f => result.writeAssets(f.toJSON()),\n  };\n}\n\nclass MessageTarget {\n  receive: any;\n  post: any;\n  constructor(receive: any, post: any) {\n    this.receive = receive;\n    this.post = post;\n  }\n  postMessage(...args) {\n    this.post.postMessage(...args);\n  }\n  addEventListener(...args) {\n    // $FlowFixMe\n    this.receive.addEventListener(...args);\n  }\n  removeEventListener(...args) {\n    // $FlowFixMe\n    this.receive.removeEventListener(...args);\n  }\n  sendMsg(type, data, transfer) {\n    let id = uuidv4();\n    return new Promise(res => {\n      let handler = evt => {\n        if (evt.data.id === id) {\n          this.removeEventListener('message', handler);\n          res(evt.data.data);\n        }\n      };\n      this.addEventListener('message', handler);\n      this.postMessage({type, data, id}, transfer);\n    });\n  }\n}\n\nfunction uuidv4() {\n  return (String(1e7) + -1e3 + -4e3 + -8e3 + -1e11).replace(\n    /[018]/g,\n    // $FlowFixMe\n    (c: number) =>\n      (\n        c ^\n        // $FlowFixMe\n        (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n      ).toString(16),\n  );\n}\n\nexport let clientID: Promise<string> = Promise.resolve('no-sw');\n\nif (navigator.serviceWorker) {\n  clientID = (async () => {\n    // $FlowFixMe\n    let {active: serviceWorker} = await navigator.serviceWorker.ready;\n\n    let sw = new MessageTarget(navigator.serviceWorker, serviceWorker);\n\n    let {port1, port2} = new MessageChannel();\n\n    // sw <-> port1 <-> port2 <-> parcel worker thread\n    // sw <-> main thread\n\n    sw.addEventListener('message', (evt: MessageEvent) => {\n      port2.postMessage(evt.data);\n    });\n    port2.addEventListener('message', (evt: MessageEvent) => {\n      sw.postMessage(evt.data);\n    });\n\n    port2.start();\n    await worker.setServiceWorker(transfer(port1, [port1]));\n\n    return sw.sendMsg('getID');\n  })();\n}\n"
  },
  {
    "path": "packages/dev/repl/src/parcel/yarn.js",
    "content": "// @flow\nimport type {REPLOptions} from '../utils';\nimport type {MemoryFS} from '@parcel/fs';\nimport {openDB} from 'idb';\nimport {Buffer} from 'buffer';\n\n// $FlowFixMe\nimport {run} from '@mischnic/yarn-browser';\n\nlet previousDependencies: ?$PropertyType<REPLOptions, 'dependencies'>;\nfunction shouldRunYarn(\n  oldDeps: ?$PropertyType<REPLOptions, 'dependencies'>,\n  newDeps: $PropertyType<REPLOptions, 'dependencies'>,\n) {\n  if (oldDeps) {\n    if (oldDeps.length !== newDeps.length) return true;\n    else if (newDeps.length === 0) return false;\n    for (let i = 0; i < newDeps.length; i++) {\n      let [nameOld, versionOld] = oldDeps[i];\n      let [nameNew, versionNew] = newDeps[i];\n      if (nameOld !== nameNew || versionOld !== versionNew) {\n        return true;\n      }\n    }\n    return false;\n  } else {\n    return newDeps.length > 0;\n  }\n}\n\nexport async function yarnInstall(\n  options: REPLOptions,\n  fs: MemoryFS,\n  dir: string,\n  progress: ({|\n    type: string,\n    displayName: string,\n    indent: string,\n    data: string,\n  |}) => void,\n) {\n  let dependencies = options.dependencies;\n  if (await fs.exists('/app/package.json')) {\n    let pkg = await fs.readFile('/app/package.json', 'utf8');\n    let deps = JSON.parse(pkg).dependencies;\n    if (deps) {\n      // $FlowFixMe\n      dependencies = (Object.entries(deps): Array<[string, string]>);\n    }\n  }\n\n  if (shouldRunYarn(previousDependencies, dependencies)) {\n    // $FlowFixMe\n    // const {run: yarnInstall} = await import('@mischnic/yarn-browser');\n    await fs.mkdirp('/tmp');\n    await Cache.restoreLockfile(fs);\n    await Cache.restoreCache(fs);\n    let {report} = await run({\n      dir,\n      fs,\n      options: {npmRegistryServer: 'registry.npmjs.org'},\n      progress(v) {\n        let {type, indent, data, displayName} = v;\n        console.debug(\n          `%c[${displayName}] ${indent} ${data}`,\n          `font-family: monospace;${type === 'error' ? 'color: red;' : ''}`,\n        );\n        progress(v);\n      },\n    });\n    if (report.errorCount > 0) {\n      throw [...report.reportedErrors][0] ?? new Error('Yarn install failed');\n    }\n    console.debug(report);\n    await Cache.saveLockfile(fs);\n    await Cache.saveCache(fs);\n  }\n\n  previousDependencies = dependencies;\n}\n\nconst IDB_DB_YARN = 'REPL-yarn-cache';\nconst IDB_STORE_CACHE = 'cache';\nconst IDB_STORE_LOCK = 'lockfile';\nconst IDB_CACHE_VERSION = 1;\n\nfunction getDB() {\n  return openDB(IDB_DB_YARN, IDB_CACHE_VERSION, {\n    upgrade(db) {\n      let cache = db.createObjectStore(IDB_STORE_CACHE, {\n        keyPath: 'name',\n      });\n      cache.createIndex('lastUsed', 'lastUsed', {unique: false});\n\n      db.createObjectStore(IDB_STORE_LOCK, {\n        keyPath: 'name',\n      });\n    },\n    blocked() {},\n    blocking() {},\n    terminated() {},\n  });\n}\n\nconst YARN_CACHE_DIR = '/app/.yarn/cache';\nconst YARN_LOCKFILE = '/app/yarn.lock';\n// const YARN_CACHE_STALE = /* 7 Days: */ 7 * 24 * 60 * 60 * 1000;\nconst Cache = {\n  async saveCache(fs: MemoryFS) {\n    const files = (await fs.readdir(YARN_CACHE_DIR)).map(name => [\n      name,\n      fs.readFileSync(YARN_CACHE_DIR + '/' + name),\n    ]);\n\n    const db = await getDB();\n    let time = Date.now();\n    await db.clear(IDB_STORE_CACHE);\n    {\n      const tx = db.transaction(IDB_STORE_CACHE, 'readwrite');\n      // await tx.store.clear();\n      await Promise.all([\n        ...files.map(([name, data]) =>\n          tx.store.put({\n            name,\n            lastUsed: time,\n            data,\n          }),\n        ),\n        tx.done,\n      ]);\n    }\n    // {\n    //   const tx = db.transaction(IDB_STORE_CACHE, 'readwrite');\n    //   let oldEntries = await (await tx.store.index('lastUsed')).getAll(\n    //     // $FlowFixMe\n    //     IDBKeyRange.upperBound(time - YARN_CACHE_STALE),\n    //   );\n    //   if (oldEntries.length > 0) {\n    //     console.log(`Purging cache, deleting ${oldEntries.length} packages`);\n    //   }\n    //   await Promise.all([\n    //     ...oldEntries.map(({name}) => tx.store.delete(name)),\n    //     tx.done,\n    //   ]);\n    // }\n  },\n  async restoreCache(fs: MemoryFS) {\n    await fs.mkdirp(YARN_CACHE_DIR);\n    const db = await getDB();\n    for (let {name, data} of await db.getAll(IDB_STORE_CACHE)) {\n      console.debug('Restored from Yarn cache:', YARN_CACHE_DIR + '/' + name);\n      await fs.writeFile(YARN_CACHE_DIR + '/' + name, Buffer.from(data));\n    }\n  },\n\n  async saveLockfile(fs: MemoryFS) {\n    const data = await fs.readFile(YARN_LOCKFILE);\n\n    const db = await getDB();\n    await db.put(IDB_STORE_LOCK, {\n      name: 'yarn.lock',\n      data,\n    });\n  },\n  async restoreLockfile(fs: MemoryFS) {\n    const db = await getDB();\n    const result = await db.get(IDB_STORE_LOCK, 'yarn.lock');\n    if (result) {\n      await fs.writeFile(YARN_LOCKFILE, Buffer.from(result.data));\n    }\n  },\n};\n"
  },
  {
    "path": "packages/dev/repl/src/repl.webmanifest",
    "content": "{\n  \"name\": \"Parcel REPL\",\n  \"short_name\": \"Parcel REPL\",\n  \"description\": \"A playground for Parcel in the browser\",\n  \"start_url\": \"/\",\n  \"display\": \"standalone\",\n  \"lang\": \"en-US\",\n  \"background_color\": \"white\",\n  \"theme_color\": \"#21374b\",\n  \"icons\": [\n    {\n      \"src\": \"url:./assets/avatar.png?width=192&height=192\",\n      \"sizes\": \"192x192\",\n      \"type\": \"image/png\"\n    },\n    {\n      \"src\": \"url:./assets/avatar.png?width=512&height=512\",\n      \"sizes\": \"512x512\",\n      \"type\": \"image/png\"\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/dev/repl/src/styles/app.css",
    "content": "@import './file-browser.css';\n@import './options.css';\n\nbutton {\n  appearance: none;\n  border: none;\n  color: var(--color);\n  user-select: none;\n  background: var(--background-button);\n  border-radius: var(--radius);\n  font-size: inherit;\n}\nbutton:disabled {\n  filter: opacity(0.5);\n}\nbutton:hover {\n  background: var(--background-dark);\n}\n\n.panel {\n  display: flex;\n  flex-direction: column;\n  align-items: stretch;\n}\n.panel > * {\n  flex: 1;\n  min-height: 0;\n}\n\n.resize-handle {\n  width: 0.3rem;\n  transition: 200ms ease-in-out background-color;\n  background-color: var(--handle-color);\n  outline: none;\n}\n.resize-handle:hover,\n.resize-handle[data-resize-handle-active] {\n  background-color: var(--handle-color-active);\n}\n\n.editor,\npre {\n  background-color: var(--background-editor);\n}\n\nmain > .output {\n  overflow: auto;\n}\n\nmain > .editors,\nmain > .output {\n  min-height: 25em;\n}\n\n.editors {\n  background: var(--background-light);\n  display: flex;\n  flex-direction: column;\n  margin-right: 0.3em;\n}\n\n.editors:not(.tabs) {\n  overflow-y: auto;\n}\n\n.editors .switcher {\n  display: flex;\n  justify-content: flex-start;\n  overflow-x: auto;\n}\n\n.switcher div {\n  border-top-left-radius: 0.25em;\n  border-top-right-radius: 0.25em;\n}\n\n.editors .switcher div,\n.view .name {\n  flex-grow: 1;\n  text-align: center;\n  padding: 0.4em 0.3em;\n  display: flex;\n  justify-content: space-between;\n}\n.editors .switcher div {\n  background-color: var(--background-button);\n  max-width: calc(max(15em, 33%));\n}\n.views div.selected {\n  background-color: var(--background-editor);\n}\n\n.editors.list {\n  margin: 0.3em;\n}\n\n.list {\n  gap: var(--gap);\n  display: flex;\n  flex-direction: column;\n}\n.list .view {\n  border-radius: var(--radius);\n  overflow: hidden;\n  flex-shrink: 0;\n}\n.list .view .name {\n  border-bottom: 2px solid var(--background-light);\n}\n\n.switcher div .close,\n.view .name .close {\n  width: 16px;\n  height: 16px;\n  margin-top: auto;\n\n  background: url(../assets/remove.svg) 50% no-repeat;\n}\n\n.editors .switcher div .close.modified,\n.editors .view .name .close.modified {\n  background: url(../assets/circle.svg) 50% no-repeat;\n}\n\n.editors .content {\n  flex: 1;\n  background: var(--background-editor);\n  overflow-y: auto;\n}\n.editors .content .editor,\n.editors .content .editor .cm-wrap {\n  height: 100%;\n}\n\n.editors .help {\n  user-select: none;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\ninput[type='text'],\nselect {\n  padding: 0.1em 0.2em;\n}\n\n.output {\n  background: var(--background-light);\n  padding: 0.3em;\n  display: flex;\n  flex-direction: column;\n  gap: var(--gap);\n}\n.output .header button,\n.output .preview button {\n  background: var(--background-button-light);\n}\n.output .header button:hover,\n.output .preview button:hover {\n  background: var(--background-button);\n}\n\n.output .header {\n  display: flex;\n  flex-wrap: wrap;\n  gap: var(--gap);\n}\n.output .header button {\n  flex: 1;\n  padding: 0.5em 3em;\n  color: var(--color);\n}\n.output .status {\n  border-radius: var(--radius);\n  padding: 0.5em;\n  text-align: center;\n  user-select: none;\n  transition: background-color 0.3s;\n}\n\n.output .build-error .content {\n  white-space: pre;\n  font-family: monospace;\n  overflow-y: scroll;\n\n  border: 1px solid red;\n  background: white;\n\n  padding: 0.3em;\n}\n\n.output .files {\n  overflow-y: auto;\n  flex: 1;\n}\n\n.output .files .tabs {\n  background-color: var(--background-dark);\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n}\n\n.output .files .tabs > .switcher {\n  display: flex;\n}\n\n.output .files .tabs > .switcher div {\n  background-color: var(--background-button);\n  flex: 1;\n  text-align: center;\n  padding: 0.4em 0em;\n}\n.output .files .tabs > .switcher div.selected {\n  background-color: var(--background-editor);\n}\n.output .files .tabs > :not(.switcher) {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  background: var(--background-light);\n}\n.output .files .tabs .views {\n  flex: 1;\n}\n\n.output .graphs {\n  padding: 0.5em;\n  background: var(--background-editor);\n  border-radius: var(--radius);\n}\n.output .graphs > div {\n  padding-top: 0.5em;\n  display: flex;\n  flex-wrap: wrap;\n  gap: var(--gap);\n}\n\n.preview {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n}\n.preview .controls {\n  display: flex;\n  flex-wrap: wrap;\n  margin-bottom: 2px;\n}\n.preview .controls > button {\n  flex: 1;\n}\n.preview button {\n  padding: 0.3em 3em;\n  border-radius: 0;\n}\n.preview .file {\n  width: 100%;\n}\n.preview iframe {\n  width: 100%;\n  border: none;\n  flex: 1;\n  background: white;\n}\n"
  },
  {
    "path": "packages/dev/repl/src/styles/file-browser.css",
    "content": ".file-browser {\n  background: var(--background-header);\n\n  min-width: 200px;\n  overflow: hidden;\n}\n.file-browser > div {\n  border-radius: var(--radius);\n  background: white;\n  margin: var(--gap);\n  padding: 0.4em 0;\n}\n\n.file-browser .header,\n.file-browser .presets,\n.file-browser .options,\n.file-browser .download {\n  padding: 0.4em;\n}\n\n.file-browser .header {\n  display: flex;\n  justify-content: space-between;\n  border-bottom: 2px solid var(--background-light);\n}\n\n.file-browser .presets {\n  display: flex;\n  justify-content: space-between;\n  user-select: none;\n}\n.file-browser .presets > select {\n  min-width: 0;\n}\n\n.file-browser .options {\n  display: flex;\n  justify-content: space-between;\n}\n.file-browser .options > .view {\n  padding: 0.2em;\n}\n.file-browser .options > .view span {\n  display: inline-block;\n  vertical-align: middle;\n  width: 16px;\n  height: 16px;\n  background: url(../assets/lines.svg) 50% no-repeat;\n}\n.file-browser .options > .view.tabs span {\n  transform: rotate(90deg);\n}\n\n.file-browser ul {\n  list-style: none;\n  margin: 0;\n  padding: 0;\n  padding-left: 1em;\n}\n.file-browser li > div {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  cursor: pointer;\n}\n.file-browser li > div:hover {\n  background: var(--background-dark);\n}\n\n.file-browser li > div > .name {\n  display: flex;\n  flex: 1;\n}\n.file-browser li > div > .name form {\n  flex: 1;\n}\n.file-browser li > div > .name form input {\n  width: 100%;\n}\n.file-browser li > div > .controls {\n  display: inline;\n  flex-shrink: 0;\n}\n\n.file-browser li > div > .controls button {\n  margin-top: auto;\n  width: 16px;\n  height: 16px;\n}\n.file-browser li > div > .controls .delete {\n  background: url(../assets/remove.svg) 50% no-repeat;\n}\n.file-browser li > div > .controls .rename {\n  background: url(../assets/edit.svg) 50% no-repeat;\n}\n\n.file-browser li > .dir .icon {\n  display: inline-block;\n  vertical-align: middle;\n  width: 16px;\n  height: 16px;\n  background: url(../assets/chevron.svg) 50% no-repeat;\n}\n.file-browser li > .dir.expanded .icon {\n  transform: rotate(90deg);\n}\n\n.file-browser li > .file .icon {\n  display: inline-block;\n  margin: auto 0;\n  width: 16px;\n  height: 16px;\n  background: url(../assets/file.svg) 50% no-repeat;\n}\n\n.file-browser .download {\n  display: flex;\n  padding-bottom: 0;\n}\n\n.file-browser .download button {\n  flex: 1;\n}\n"
  },
  {
    "path": "packages/dev/repl/src/styles/index.css",
    "content": "@import './main.css';\n@import './app.css';\n\nhtml {\n  box-sizing: border-box;\n  font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto,\n    'Helvetica Neue', Ubuntu, Arial, sans-serif;\n  margin: 0;\n\n  /* --color: white;\n  --background-dark: #0F172A;\n  --background-light: #334155;\n  --background-editor: #121927;\n  --background-editor-active: var(--background-light); */\n\n  --color: black;\n  --background-header: #21374b;\n  --background-dark: #d1d5db;\n  --background-light: #d1d5db;\n  --background-button: #dde1e6;\n  --background-button-light: white;\n  --background-editor: white;\n  --gap: 0.5rem;\n  --radius: 0.3rem;\n\n  --parcel-color: #e7b37d;\n  --handle-color: rgba(0, 0, 0, 0.1);\n  --handle-color-active: var(--parcel-color);\n\n  background-color: var(--background-light);\n  color: var(--color);\n}\n* {\n  box-sizing: inherit;\n}\n\nhtml,\nbody,\n#root,\nmain {\n  height: 100vh;\n  margin: 0;\n}\n\nhtml {\n  box-sizing: border-box;\n}\n* {\n  box-sizing: inherit;\n}\n\n\n"
  },
  {
    "path": "packages/dev/repl/src/styles/main.css",
    "content": "header {\n  user-select: none;\n  height: 50px;\n\n  display: flex;\n  align-items: center;\n\n  background: var(--background-header);\n  color: #e7dacb;\n  font-family: 'Gill Sans', 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica,\n    Arial, sans-serif;\n}\n\nheader a {\n  overflow: hidden;\n  margin: 0 auto;\n\n  display: flex;\n  align-items: center;\n\n  text-decoration: none;\n  color: inherit;\n}\n\nheader a > * {\n  margin-right: 5px;\n}\n"
  },
  {
    "path": "packages/dev/repl/src/styles/options.css",
    "content": ".content .options {\n  display: flex;\n  flex-direction: column;\n}\n\n.content .options > hr {\n  width: 100%;\n}\n.content .options > *:not(hr) {\n  padding: 0.3em;\n  display: block;\n}\n.content .options > label > *:not(:first-child) {\n  float: right;\n}\n.content .options > label input[type='text'],\n.content .options > label select {\n  font-size: 0.9em;\n}\n.content .options > label > input[type='text'],\n.content .options > label > select {\n  width: 50%;\n}\n.content .options > .dependencies > ul {\n  margin: 0 auto;\n  padding: 0;\n  list-style: none;\n  max-width: 25em;\n}\n.content .options > .dependencies > ul > li {\n  margin: 0.3em 0;\n  display: flex;\n  justify-content: space-between;\n}\n.content .options > .dependencies button.remove {\n  margin-left: 0.3em;\n  padding: 0.2rem 0.4rem;\n}\n.content .options > .dependencies button.add {\n  width: 100%;\n}\n"
  },
  {
    "path": "packages/dev/repl/src/sw.js",
    "content": "/* eslint-disable no-restricted-globals */\n// @flow strict\n\nimport nullthrows from 'nullthrows';\n\nlet isSafari =\n  /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent);\nlet lastHMRStream;\n\ntype ClientId = string;\ntype ParentId = string;\n\nlet sendToIFrame = new Map<ClientId, (data: string) => void>();\nlet pages = new Map<ParentId, {|[string]: string|}>();\nlet parentPorts = new Map<ParentId, MessagePort>();\nlet parentToIframe = new Map<ParentId, ClientId>();\nlet iframeToParent = new Map<ClientId, ParentId>();\n\nglobal.parentPorts = parentPorts;\nglobal.parentToIframe = parentToIframe;\nglobal.iframeToParent = iframeToParent;\n\nconst SECURITY_HEADERS = {\n  'Cross-Origin-Embedder-Policy': 'require-corp',\n  'Cross-Origin-Opener-Policy': 'same-origin',\n};\n\nconst MIME = new Map([\n  ['html', 'text/html'],\n  ['js', 'text/javascript'],\n  ['css', 'text/css'],\n]);\n\n// // TODO figure out which script is the entry\n// function htmlWrapperForJS(script) {\n//   return `<script type=\"application/javascript\">\n// window.console = {\n//   log: function() {\n//     var content = Array.from(arguments)\n//       .map(v => (typeof v === \"object\" ? JSON.stringify(v) : v))\n//       .join(\" \");\n//     document\n//       .getElementById(\"output\")\n//       .appendChild(document.createTextNode(content + \"\\\\n\"));\n//   },\n//   warn: function() {\n//     console.log.apply(console, arguments);\n//   },\n//   info: function() {\n//     console.log.apply(console, arguments);\n//   },\n//   error: function() {\n//     console.log.apply(console, arguments);\n//   }\n// };\n// window.onerror = function(e) {\n//   console.error(e.message);\n//   console.error(e.stack);\n// }\n// </script>\n// <body>\n// Console output:<br>\n// <div id=\"output\" style=\"font-family: monospace;white-space: pre-wrap;\"></div>\n// </body>\n// <script type=\"application/javascript\">\n// // try{\n// ${script}\n// // } catch(e){\n// //   console.error(e.message);\n// //   console.error(e.stack);\n// // }\n// </script>`;\n// }\n\n// listen here instead of attaching temporary 'message' event listeners to self\nlet messageProxy = new EventTarget();\n\nself.addEventListener('message', evt => {\n  let parentId = evt.source.id;\n  let {type, data, id} = evt.data;\n  if (type === 'setFS') {\n    // called by worker\n    evt.source.postMessage({id});\n    pages.set(parentId, data);\n  } else if (type === 'getID') {\n    evt.source.postMessage({id, data: parentId});\n  } else if (type === 'hmrUpdate') {\n    // called by worker\n    parentPorts.set(parentId, evt.source);\n    let clientId = parentToIframe.get(parentId);\n    let send =\n      (clientId != null ? sendToIFrame.get(clientId) : null) ?? lastHMRStream;\n    send?.(data);\n    evt.source.postMessage({id});\n  } else {\n    let wrapper = new Event(evt.type);\n    // $FlowFixMe\n    wrapper.data = evt.data;\n    messageProxy.dispatchEvent(wrapper);\n  }\n});\n\nlet encodeUTF8 = new TextEncoder();\n\nself.addEventListener('fetch', evt => {\n  let url = new URL(evt.request.url);\n  let {clientId} = evt;\n  let parentId;\n  if (!clientId && url.searchParams.has('parentId')) {\n    clientId = evt.resultingClientId ?? evt.targetClientId;\n    parentId = nullthrows(url.searchParams.get('parentId'));\n    parentToIframe.set(parentId, clientId);\n    iframeToParent.set(clientId, parentId);\n  } else {\n    parentId = iframeToParent.get(evt.clientId);\n  }\n  if (parentId == null && isSafari) {\n    parentId = [...pages.keys()].slice(-1)[0];\n  }\n\n  if (parentId != null) {\n    if (\n      evt.request.headers.get('Accept') === 'text/event-stream' &&\n      url.pathname === '/__parcel_hmr'\n    ) {\n      let stream = new ReadableStream({\n        start: controller => {\n          let cb = data => {\n            let chunk = `data: ${JSON.stringify(data)}\\n\\n`;\n            controller.enqueue(encodeUTF8.encode(chunk));\n          };\n          sendToIFrame.set(clientId, cb);\n          lastHMRStream = cb;\n        },\n      });\n\n      evt.respondWith(\n        new Response(stream, {\n          headers: {\n            'Content-Type': 'text/event-stream',\n            'Transfer-Encoding': 'chunked',\n            Connection: 'keep-alive',\n            ...SECURITY_HEADERS,\n          },\n        }),\n      );\n    } else if (url.pathname.startsWith('/__parcel_hmr/')) {\n      evt.respondWith(\n        (async () => {\n          let port = parentId != null ? parentPorts.get(parentId) : null;\n\n          if (port == null) {\n            return new Response(null, {status: 500});\n          }\n\n          let [type, content] = await sendMsg(\n            port,\n            'hmrAssetSource',\n            url.pathname.slice('/__parcel_hmr/'.length),\n          );\n          return new Response(content, {\n            headers: {\n              'Content-Type':\n                (MIME.get(type) ?? 'application/octet-stream') +\n                '; charset=utf-8',\n              'Cache-Control': 'no-store',\n              ...SECURITY_HEADERS,\n            },\n          });\n        })(),\n      );\n    } else if (url.pathname.startsWith('/__repl_dist/')) {\n      let filename = url.pathname.slice('/__repl_dist/'.length);\n      let file = pages.get(parentId)?.[filename];\n      if (file == null) {\n        console.error('requested missing file', parentId, filename, pages);\n      }\n\n      evt.respondWith(\n        new Response(file, {\n          headers: {\n            'Content-Type':\n              (MIME.get(extname(filename)) ?? 'application/octet-stream') +\n              '; charset=utf-8',\n            'Cache-Control': 'no-store',\n            ...SECURITY_HEADERS,\n          },\n        }),\n      );\n    }\n  }\n});\n\nfunction extname(filename) {\n  return filename.slice(filename.lastIndexOf('.') + 1);\n}\n\nfunction removeNonExistingKeys(existing, map) {\n  for (let id of map.keys()) {\n    if (!existing.has(id)) {\n      map.delete(id);\n    }\n  }\n}\nsetInterval(async () => {\n  let existingClients = new Set((await self.clients.matchAll()).map(c => c.id));\n\n  removeNonExistingKeys(existingClients, pages);\n  removeNonExistingKeys(existingClients, sendToIFrame);\n  removeNonExistingKeys(existingClients, parentToIframe);\n  removeNonExistingKeys(existingClients, iframeToParent);\n}, 20000);\n\nfunction sendMsg(target, type, data, transfer) {\n  let id = uuidv4();\n  return new Promise(res => {\n    let handler = (evt: MessageEvent) => {\n      // $FlowFixMe\n      if (evt.data.id === id) {\n        messageProxy.removeEventListener('message', handler);\n        // $FlowFixMe\n        res(evt.data.data);\n      }\n    };\n    messageProxy.addEventListener('message', handler);\n    target.postMessage({type, data, id}, transfer);\n  });\n}\nfunction uuidv4() {\n  return (String(1e7) + -1e3 + -4e3 + -8e3 + -1e11).replace(\n    /[018]/g,\n    // $FlowFixMe\n    (c: number) =>\n      (\n        c ^\n        // $FlowFixMe\n        (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n      ).toString(16),\n  );\n}\n"
  },
  {
    "path": "packages/dev/repl/src/utils/assets.js",
    "content": "// @flow\nimport path from 'path';\nimport nullthrows from 'nullthrows';\nimport type {REPLOptions} from './';\n\nexport type CodeMirrorDiagnostic = {|\n  from: number,\n  to: number,\n  severity: 'info' | 'warning' | 'error',\n  source: string,\n  message: string,\n  stack: ?string,\n|};\n\nexport function join(a: string, ...b: Array<string>): string {\n  return path.join(a || '/', ...b);\n}\n\nexport type File = {|\n  value: string,\n  isEntry?: boolean,\n|};\nexport type FSMap = Map<string, File | FSMap>;\nexport type FSList = Array<[string, File]>;\n\nexport class FS implements Iterable<[string, File | FSMap]> {\n  /*:: @@iterator(): Iterator<[string, File | FSMap]> {\n    // $FlowFixMe\n    return {};\n  } */\n\n  files: FSMap;\n  constructor(init: ?FSMap) {\n    this.files = init ?? new Map();\n  }\n\n  has(path: string): boolean {\n    return this.get(path) != null;\n  }\n\n  get(path: string): ?File {\n    let parts = path.slice(1).split('/');\n    let f = this.files;\n    for (let p of parts) {\n      // $FlowFixMe\n      f = f?.get(p);\n    }\n    // $FlowFixMe\n    return f;\n  }\n\n  list(files: FSMap = this.files, prefix: string = ''): Map<string, File> {\n    let result = [];\n    for (let [name, data] of files) {\n      let p = join(prefix, name);\n      if (data instanceof Map) {\n        result.push(...this.list(data, p));\n      } else {\n        result.push([p, data]);\n      }\n    }\n    return new Map(result);\n  }\n\n  move(from: string, to: string): FS {\n    let data = nullthrows(this.get(from));\n    return this.delete(from).set(to, data);\n  }\n\n  delete(path: string): FS {\n    let parts = path.slice(1).split('/');\n    // $FlowFixMe\n    let result = new Map(this.files);\n\n    let f = result;\n    for (let p of parts.slice(0, -1)) {\n      let copy = new Map(f.get(p) ?? []);\n      f.set(p, copy);\n      f = copy;\n    }\n    f.delete(parts[parts.length - 1]);\n    return new FS(result);\n  }\n\n  set(path: string, value: FSMap | File): FS {\n    let parts = path.slice(1).split('/');\n    // $FlowFixMe\n    let result = new Map(this.files);\n\n    let f = result;\n    for (let p of parts.slice(0, -1)) {\n      // $FlowFixMe\n      let copy = new Map(f.get(p) ?? []);\n      f.set(p, copy);\n      f = copy;\n    }\n    f.set(parts[parts.length - 1], value);\n    return new FS(result);\n  }\n\n  setMerge(path: string, value: $Shape<File>): FS {\n    let data = nullthrows(this.get(path));\n    return this.set(path, {...data, ...value});\n  }\n\n  // $FlowFixMe\n  [Symbol.iterator]() {\n    return this.files[Symbol.iterator]();\n  }\n\n  toJSON(): Array<[string, File]> {\n    return [...this.list()];\n  }\n\n  static fromJSON(obj: Object): FS {\n    let fs = new FS();\n    for (let [name, file] of obj) {\n      fs = fs.set(name, file);\n    }\n    return fs;\n  }\n}\n\nconst HMR_OPTIONS: $Shape<REPLOptions> = {\n  mode: 'development',\n  hmr: true,\n  scopeHoist: false,\n  sourceMaps: true,\n};\n\nexport const ASSET_PRESETS: Map<\n  string,\n  {|options?: $Shape<REPLOptions>, fs: FSMap|},\n> = new Map([\n  [\n    'Javascript',\n    {\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.js',\n              {\n                value: `import {Thing, x} from \"./other.js\";\\nnew Thing().run();`,\n                isEntry: true,\n              },\n            ],\n            [\n              'other.js',\n              {\n                value: `class Thing {\\n  run() {\\n    console.log(\"Test\");\\n  } \\n}\\n\\nconst x = 123;\\nexport {Thing, x};`,\n              },\n            ],\n          ]),\n        ],\n      ]),\n    },\n  ],\n  [\n    'Flow',\n    {\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.js',\n              {\n                value: `// @flow\\nfunction foo(n: number): number {\\n\\treturn n * n;\\n}\\n\\nfoo(2);`,\n                isEntry: true,\n              },\n            ],\n          ]),\n        ],\n        [\n          'package.json',\n          {\n            value: `{\\n  \"devDependencies\": {\\n    \"flow-bin\": \"*\"\\n  }\\n}`,\n            isEntry: true,\n          },\n        ],\n      ]),\n    },\n  ],\n  //   Babel: [\n  //     {\n  //       name: 'src/index.js',\n  //       content: `class Point {\n  //     constructor(x, y) {\n  //         this.x = x;\n  //         this.y = y;\n  //     }\n  //     toString() {\n  //         return \\`(\\${this.x}, \\${this.y})\\`;\n  //     }\n  // }\n\n  // console.log(new Point(1,2).toString());\n  // `,\n  //       isEntry: true,\n  //     },\n  //     {\n  //       name: '.babelrc',\n  //       content: `{ \"presets\": [[\"@babel/env\", {\"loose\": true}]] }`,\n  //     },\n  //     // {\n  //     //   name: 'src/package.json',\n  //     //   content: `{\\n \"devDependencies\": {\\n  \"@babel/core\": \"^7.3.4\",\\n  \"@babel/preset-env\": \"^7.3.4\"\\n  }\\n}`,\n  //     // },\n  //   ],\n  [\n    'Basic Page',\n    {\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.html',\n              {\n                value: `<head>\n  <link rel=\"stylesheet\" type=\"text/css\" href=\"./style.css\">\n</head>\n<body>\n  <a href=\"./other.html\">Link</a>\n  <script src=\"./index.js\" type=\"module\"></script>\n</body>`,\n                isEntry: true,\n              },\n            ],\n            [\n              'index.js',\n              {\n                value: `function func(){\n  return \"Hello World!\";\n}\ndocument.body.append(document.createTextNode(func()))`,\n              },\n            ],\n            [\n              'style.css',\n              {\n                value: `body {\\n  color: red;\\n}`,\n              },\n            ],\n            [\n              'other.html',\n              {\n                value: 'This is a different page',\n              },\n            ],\n          ]),\n        ],\n        // [\n        //   '.htmlnanorc',\n        //   {\n        //     value: `{\\n  minifySvg: false\\n}`,\n        //   },\n        // ],\n        // [\n        //   'cssnano.config.js',\n        //   {\n        //     value: `module.exports = {\\n  preset: [\\n    'default',\\n    {\\n      svgo: false\\n    }\\n  ]\\n}`,\n        //   },\n        // ],\n      ]),\n    },\n  ],\n  [\n    'JSON',\n    {\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.js',\n              {\n                value: \"import x from './test.json';\\nconsole.log(x);\",\n                isEntry: true,\n              },\n            ],\n            ['test.json', {value: '{a: 2, b: 3}'}],\n          ]),\n        ],\n      ]),\n    },\n  ],\n  [\n    'Symbol Propagation',\n    {\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.js',\n              {\n                value: \"import {a} from './lib.js';\\nconsole.log(a);\",\n                isEntry: true,\n              },\n            ],\n            [\n              'lib.js',\n              {value: 'export * from \"./lib1.js\";\\nexport * from \"./lib2.js\";'},\n            ],\n            [\n              'lib1.js',\n              {value: 'console.log(\"Hello 1\");\\n\\nexport const a = 1;'},\n            ],\n            [\n              'lib2.js',\n              {value: 'console.log(\"Hello 2\");\\n\\nexport const b = 2;'},\n            ],\n            [\n              'package.json',\n              {value: JSON.stringify({sideEffects: ['index.js']}, null, 4)},\n            ],\n          ]),\n        ],\n      ]),\n    },\n  ],\n  [\n    'Dynamic Import',\n    {\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.js',\n              {\n                value: `import(\"./async.js\").then(({a}) => console.log(a))`,\n                isEntry: true,\n              },\n            ],\n            ['async.js', {value: 'export const a = 1;\\nexport const b = 2;'}],\n          ]),\n        ],\n      ]),\n    },\n  ],\n  [\n    'Envfile',\n    {\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.js',\n              {value: 'console.log(process.env.SOMETHING);', isEntry: true},\n            ],\n          ]),\n        ],\n        ['.env', {value: 'SOMETHING=124'}],\n      ]),\n    },\n  ],\n  [\n    'Typescript',\n    {\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.ts',\n              {\n                value: `function greeter(person: string) {\n  return \"Hello, \" + person;\n}\n\nlet user = \"Jane User\";\n\ndocument.body.innerHTML = greeter(user);`,\n                isEntry: true,\n              },\n            ],\n          ]),\n        ],\n      ]),\n    },\n  ],\n  //   parcelrc: [\n  //     {\n  //       name: 'src/index.js',\n  //       content: `const x = 1;\\nconsole.log(x);`,\n  //       isEntry: true,\n  //     },\n  //     {\n  //       name: '.parcelrc',\n  //       content: JSON.stringify(\n  //         {\n  //           extends: '@parcel/config-repl',\n  //           optimizers: {\n  //             '*.js': [],\n  //           },\n  //         },\n  //         null,\n  //         4,\n  //       ),\n  //     },\n  //   ],\n  [\n    'HMR',\n    {\n      options: HMR_OPTIONS,\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.html',\n              {\n                isEntry: true,\n                value: `<!DOCTYPE html>\n<main></main>\n<button>Update</button>\n<script src=\"./index.js\" type=\"module\"></script>`,\n              },\n            ],\n            [\n              'index.js',\n              {\n                value: `let counter = 0;\n\nif (module.hot) {\n  module.hot.dispose(function (data) {\n    data.counter = counter;\n  });\n\n  module.hot.accept(function () {\n    counter = module.hot.data.counter;\n    render();\n  });\n}\n\nlet btn = document.querySelector(\"button\");\nbtn.onclick = (e) => {\n  counter++;\n  render();\n}\nfunction render(){\n  btn.innerText = \\`Update (\\${counter})\\`;\n}\n`,\n              },\n            ],\n          ]),\n        ],\n      ]),\n    },\n  ],\n\n  [\n    'React (Fast Refresh)',\n    {\n      options: HMR_OPTIONS,\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.html',\n              {\n                isEntry: true,\n                value: `<!DOCTYPE html>\n<main></main>\n<script src=\"./index.jsx\" type=\"module\"></script>`,\n              },\n            ],\n            [\n              'index.jsx',\n              {\n                value: `import * as React from \"react\";\nimport { createRoot } from 'react-dom/client';\nimport {App} from './App.jsx';\nlet root = createRoot(document.querySelector(\"main\"));\nroot.render(<App />);`,\n              },\n            ],\n            [\n              'App.jsx',\n              {\n                value: `import * as React from \"react\";\n\nexport function App() {\n  let [counter, setCounter] = React.useState(0);\n  if (counter === 10) throw new Error(\"Too high!\");\n  return (\n    <div>\n      <div>Change me!</div>\n      <button onClick={() => setCounter(counter + 1)}>Increment {counter}</button>\n    </div>\n  );\n}`,\n              },\n            ],\n          ]),\n        ],\n        [\n          'package.json',\n          {\n            value: JSON.stringify(\n              {\n                name: 'repl',\n                version: '0.0.0',\n                engines: {\n                  browsers: 'since 2019',\n                },\n                targets: {\n                  app: {},\n                },\n                dependencies: {\n                  react: '*',\n                  'react-dom': '*',\n                  'react-refresh': '^0.9.0',\n                },\n              },\n              null,\n              4,\n            ),\n          },\n        ],\n      ]),\n    },\n  ],\n\n  [\n    'React Spectrum',\n    {\n      options: HMR_OPTIONS,\n      fs: new Map([\n        [\n          'src',\n          new Map([\n            [\n              'index.html',\n              {\n                isEntry: true,\n                value: `<!DOCTYPE html>\n<main></main>\n<script src=\"./index.jsx\" type=\"module\"></script>`,\n              },\n            ],\n            [\n              'index.jsx',\n              {\n                value: `import * as React from \"react\";\nimport { createRoot } from 'react-dom/client';\nimport {App} from './App.jsx';\nlet root = createRoot(document.querySelector(\"main\"));\nroot.render(<App />);`,\n              },\n            ],\n            [\n              'App.jsx',\n              {\n                value: `import * as React from \"react\";\nimport {\n  Provider,\n  Form,\n  TextField,\n  ActionButton,\n  AlertDialog,\n  DialogTrigger,\n  defaultTheme\n} from \"@adobe/react-spectrum\";\nexport function App() {\n  let [name, setName] = React.useState(\"\");\n  let [email, setEmail] = React.useState(\"\");\n  return (\n    <Provider theme={defaultTheme}>\n      <Form maxWidth=\"size-3600\">\n        <TextField\n          label=\"Name\"\n          placeholder=\"John Doe\"\n          value={name}\n          onChange={setName}\n        />\n        <TextField\n          label=\"Email\"\n          placeholder=\"abc@gmail.com\"\n          value={email}\n          onChange={setEmail}\n        />\n        <DialogTrigger>\n          <ActionButton disabled={!name || !email}>Save</ActionButton>\n          <AlertDialog\n            variant=\"confirmation\"\n            title=\"Are you sure?\"\n            primaryActionLabel=\"Yes\"\n            cancelLabel=\"Cancel\"\n          >\n            Hello {name}, is this really your email address: {email}?\n          </AlertDialog>\n        </DialogTrigger>\n      </Form>\n    </Provider>\n  );\n}\n          `,\n              },\n            ],\n          ]),\n        ],\n        [\n          'package.json',\n          {\n            value: JSON.stringify(\n              {\n                name: 'repl',\n                version: '0.0.0',\n                engines: {\n                  browsers: 'since 2019',\n                },\n                targets: {\n                  app: {},\n                },\n                dependencies: {\n                  '@adobe/react-spectrum': '*',\n                  react: '*',\n                  'react-dom': '*',\n                  'react-refresh': '^0.9.0',\n                },\n              },\n              null,\n              4,\n            ),\n          },\n        ],\n      ]),\n    },\n  ],\n  ['Three.js Benchmark', {fs: new Map()}],\n  //   Markdown: [\n  //     {\n  //       name: 'src/Article.md',\n  //       content: '# My Title\\n\\nHello, ...\\n\\n```js\\nconsole.log(\"test\");\\n```\\n',\n  //       isEntry: true,\n  //     },\n  //     {\n  //       name: '.htmlnanorc',\n  //       content: `{\\n  minifySvg: false\\n}`,\n  //     },\n  //   ],\n  //   SCSS: [\n  //     {\n  //       name: 'src/style.scss',\n  //       content: `$colorRed: red;\n  // #header {\n  //   margin: 0;\n  //   border: 1px solid $colorRed;\n  //   p {\n  //     color: $colorRed;\n  //     font: {\n  //       size: 12px;\n  //       weight: bold;\n  //     }\n  //   }\n  //   a {\n  //     text-decoration: none;\n  //   }\n  // }`,\n  //       isEntry: true,\n  //     },\n  //     {\n  //       name: 'cssnano.config.js',\n  //       content: `module.exports = {\\n  preset: [\\n    'default',\\n    {\\n      svgo: false\\n    }\\n  ]\\n}`,\n  //     },\n  //   ],\n  //   LESS: [\n  //     {\n  //       name: 'src/style.less',\n  //       content: `@some-color: #143352;\n\n  // #header {\n  //   background-color: @some-color;\n  // }\n  // h2 {\n  //   color: @some-color;\n  // }`,\n  //       isEntry: true,\n  //     },\n  //     {\n  //       name: 'cssnano.config.js',\n  //       content: `module.exports = {\\n  preset: [\\n    'default',\\n    {\\n      svgo: false\\n    }\\n  ]\\n}`,\n  //     },\n  //   ],\n  // };\n]);\n"
  },
  {
    "path": "packages/dev/repl/src/utils/index.js",
    "content": "// @flow\nimport JSZip from 'jszip';\nimport {type FSMap} from './assets';\n\nexport * from './assets';\nexport * from './options';\n\nexport function nthIndex(str: string, pat: string, n: number): number {\n  var length = str.length,\n    i = -1;\n  while (n-- && i++ < length) {\n    i = str.indexOf(pat, i);\n    if (i < 0) break;\n  }\n  return i;\n}\n\nexport const ctrlKey: string = navigator.platform.includes('Mac')\n  ? '⌘'\n  : 'Ctrl';\n\nfunction downloadBlob(name: string, blob: Blob) {\n  const el = document.createElement('a');\n  el.href = URL.createObjectURL(blob);\n  el.download = name;\n  el.click();\n  setTimeout(() => URL.revokeObjectURL(el.href), 1000);\n}\n// function downloadBuffer(name: string, buf: Uint8Array, mime: string) {\n//   const blob = new Blob([buf], {type: mime});\n//   downloadBlob(name, blob);\n// }\n\nexport async function downloadZIP(files: Map<string, {value: string, ...}>) {\n  let zip = new JSZip();\n\n  for (let [name, {value}] of files) {\n    zip.file(name, value);\n  }\n\n  let blob = await zip.generateAsync({\n    type: 'blob',\n    compression: 'DEFLATE',\n    compressionOptions: {\n      level: 5,\n    },\n  });\n\n  downloadBlob('repl.zip', blob);\n}\n\nexport async function extractZIP(content: ArrayBuffer): Promise<FSMap> {\n  let zip = await JSZip.loadAsync(content);\n\n  let files = (\n    await Promise.all(\n      Object.entries(zip.files).map(async ([relativePath, zipEntry]) => {\n        // $FlowFixMe\n        if (!zipEntry.dir) {\n          // $FlowFixMe\n          return [relativePath, {value: await zipEntry.async('string')}];\n        }\n      }),\n    )\n  ).filter(Boolean);\n\n  let result: FSMap = new Map();\n  function get(p): FSMap {\n    let v = result;\n    for (let e of p) {\n      // $FlowFixMe\n      let c = v.get(e);\n      if (!c) {\n        c = new Map();\n        // $FlowFixMe\n        v.set(e, c);\n      }\n      v = c;\n    }\n    // $FlowFixMe\n    return v;\n  }\n  for (let [p, data] of files) {\n    let pSplit = p.split('/');\n    let folder = pSplit.slice(0, -1);\n    let file = pSplit[pSplit.length - 1];\n    get(folder).set(file, data);\n  }\n\n  return result;\n}\n\nexport function linkSourceMapVisualization(\n  bundle: string,\n  sourcemap: string,\n): string {\n  let hash = Buffer.concat([\n    Buffer.from(String(bundle.length)),\n    Buffer.from([0]),\n    Buffer.from(bundle),\n    Buffer.from(String(sourcemap.length)),\n    Buffer.from([0]),\n    Buffer.from(sourcemap),\n  ]);\n\n  return (\n    'https://evanw.github.io/source-map-visualization/#' +\n    hash.toString('base64')\n  );\n}\n"
  },
  {
    "path": "packages/dev/repl/src/utils/options.js",
    "content": "// @flow\nimport type {PackageJSON} from '@parcel/types';\n\nexport type REPLOptions = {|\n  entries: [],\n  minify: boolean,\n  scopeHoist: boolean,\n  sourceMaps: boolean,\n  publicUrl: string,\n  targetType: 'node' | 'browsers',\n  targetEnv: null | string,\n  outputFormat: null | 'esmodule' | 'commonjs' | 'global',\n  mode: 'production' | 'development',\n  hmr: boolean,\n  renderGraphs: boolean,\n  viewSourcemaps: boolean, // // unused\n  dependencies: Array<[string, string]>,\n  numWorkers: ?number,\n|};\n\nexport function getDefaultTargetEnv(\n  type: $ElementType<REPLOptions, 'targetType'>,\n): string {\n  switch (type) {\n    case 'node':\n      return '12';\n    case 'browsers':\n      return 'since 2019';\n    default:\n      throw new Error(`Missing default target env for ${type}`);\n  }\n}\n\nexport function generatePackageJson(options: REPLOptions): string {\n  let app = {};\n  if (options.outputFormat) {\n    app.outputFormat = options.outputFormat;\n  }\n\n  let pkg: PackageJSON = {\n    name: 'repl',\n    version: '0.0.0',\n    engines: {\n      [(options.targetType: string)]:\n        options.targetEnv || getDefaultTargetEnv(options.targetType),\n    },\n    targets: {\n      app,\n    },\n    dependencies: Object.fromEntries(\n      options.dependencies\n        .filter(([a, b]) => a && b)\n        .sort(([a], [b]) => a.localeCompare(b)),\n    ),\n  };\n\n  return JSON.stringify(pkg, null, 2);\n}\n"
  },
  {
    "path": "packages/dev/repl/vercel.json",
    "content": "{\n  \"headers\": [\n    {\n      \"source\": \"/(.*)\",\n      \"headers\": [\n        {\n          \"key\": \"Cross-Origin-Embedder-Policy\",\n          \"value\": \"require-corp\"\n        },\n        {\n          \"key\": \"Cross-Origin-Opener-Policy\",\n          \"value\": \"same-origin\"\n        },\n        {\n          \"key\": \"Cross-Origin-Resource-Policy\",\n          \"value\": \"same-origin\"\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/dev/repl/write-commit.js",
    "content": "// @flow\nconst child_process = require('child_process');\nconst path = require('path');\nconst fs = require('fs');\n\nlet file = path.join(__dirname, 'commit');\n\nlet oldCommit = fs.existsSync(file) && fs.readFileSync(file, 'utf8').trim();\n\nconst newCommit = child_process\n  // .execSync('git merge-base v2 HEAD', {encoding: 'utf8'})\n  .execSync('git rev-parse HEAD', {encoding: 'utf8'})\n  .trim();\n\nif (oldCommit !== newCommit) {\n  fs.writeFileSync(file, newCommit);\n}\n"
  },
  {
    "path": "packages/examples/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config\",\n  \"env\": {\n    \"browser\": true\n  },\n  \"rules\": {\n    \"no-console\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/eslint-example/.eslintrc",
    "content": "{\n  \"rules\": {\n    \"no-console\": \"error\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/eslint-example/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"validators\": {\n    \"*.{js,jsx,ts,tsx}\": [\"@parcel/validator-eslint\"]\n  }\n}\n"
  },
  {
    "path": "packages/examples/eslint-example/package.json",
    "content": "{\n  \"name\": \"@parcel/eslint-example\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"demo\": \"parcel build src/index.js --no-cache\"\n  },\n  \"browser\": \"dist/legacy/index.js\",\n  \"targets\": {\n    \"browser\": {\n      \"engines\": {\n        \"browsers\": [\n          \"> 0.25%\"\n        ]\n      }\n    }\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/validator-eslint\": \"2.16.4\",\n    \"parcel\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/eslint-example/src/index.js",
    "content": "module.exports = function hello() {\n  console.log('Say hello world...');\n\n  let hey = '';\n\n  return 'hello';\n};\n"
  },
  {
    "path": "packages/examples/html/package.json",
    "content": "{\n  \"name\": \"@parcel/html-example\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"demo\": \"parcel build src/index.html\"\n  },\n  \"browserslist\": [\n    \"last 2 versions\",\n    \"not edge < 76\",\n    \"not firefox < 67\"\n  ],\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"parcel\": \"2.16.4\"\n  },\n  \"dependencies\": {\n    \"lodash\": \"^4.17.21\",\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/html/src/async.js",
    "content": "console.log(require('react'));\nrequire('lodash');\nimport './child.css';\nconsole.log('async');\n\nclass Foo {}\nnew Foo();\n"
  },
  {
    "path": "packages/examples/html/src/async2.js",
    "content": "console.log(require('react'));\nconsole.log('async2');\nrequire('lodash');\n"
  },
  {
    "path": "packages/examples/html/src/child.css",
    "content": "h2 {\n  color: green;\n}\n"
  },
  {
    "path": "packages/examples/html/src/index.css",
    "content": "@import './child.css';\n\nh1 {\n  color: gray;\n}\n"
  },
  {
    "path": "packages/examples/html/src/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>HTML Example</title>\n    <script type=\"module\" src=\"./index.js\"></script>\n  </head>\n  <body>\n    <h1>Hello world</h1>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/examples/html/src/index.js",
    "content": "import('./async');\nimport('./async2');\n\nclass Test {}\nnew Test();\n"
  },
  {
    "path": "packages/examples/html/src/other.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <link rel=\"stylesheet\" href=\"index.css\" />\n  </head>\n  <body>\n    <h1>Other page</h1>\n    <a href=\"index.html\">Back to index</a>\n    <script type=\"module\" src=\"index.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/examples/internalize-example/async.js",
    "content": "import v from './index-sync';\n\n// internalized, different bundle\nimport('./index-sync').then(v => console.log('async', v.default));\n"
  },
  {
    "path": "packages/examples/internalize-example/index-other.js",
    "content": "// internalized, same bundle\nimport('./index-sync').then(v => console.log('other', v));\n"
  },
  {
    "path": "packages/examples/internalize-example/index-sync.js",
    "content": "export default 123;\n"
  },
  {
    "path": "packages/examples/internalize-example/index.html",
    "content": "<script src=\"index.js\"></script>\n"
  },
  {
    "path": "packages/examples/internalize-example/index.js",
    "content": "import v from './index-sync';\nimport './index-other';\n\nconsole.log(1, v);\n\nimport('./async.js');\n"
  },
  {
    "path": "packages/examples/internalize-example/package.json",
    "content": "{\n  \"name\": \"internalize-example\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true\n}\n"
  },
  {
    "path": "packages/examples/kitchen-sink/.gitignore",
    "content": "sourcemap-info.json\n"
  },
  {
    "path": "packages/examples/kitchen-sink/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"transformers\": {\n    \"*.js\": [\"@parcel/transformer-babel\", \"...\"]\n  },\n  \"reporters\": [\"...\", \"@parcel/reporter-sourcemap-visualiser\"]\n}\n"
  },
  {
    "path": "packages/examples/kitchen-sink/legacy.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Legacy Simple Example</title>\n    <link rel=\"stylesheet\" href=\"dist/legacy/index.css\" />\n    <script src=\"dist/legacy/index.js\"></script>\n  </head>\n  <body>\n    <h1>I am an H1</h1>\n    <p>\n      Lorem ipsum dolor sit amet consectetur adipisicing elit. Minima saepe eos\n      nihil recusandae, tempora id! Nostrum quia aliquid culpa nemo\n      consequuntur, eos dolore? Sit earum voluptatem ab aliquid iure\n      exercitationem?\n    </p>\n    <h2>I am an H2</h2>\n    <p>\n      Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis repudiandae\n      placeat ullam ab, explicabo non similique, voluptate culpa, illo facilis\n      ea? Quia perspiciatis esse earum eaque explicabo reiciendis ratione quasi.\n    </p>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/examples/kitchen-sink/modern.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Modern Simple Example</title>\n    <link rel=\"stylesheet\" href=\"dist/modern/index.css\" />\n    <script src=\"dist/modern/index.js\"></script>\n  </head>\n  <body>\n    <h1>I am an H1</h1>\n    <p>\n      Lorem ipsum dolor sit amet consectetur adipisicing elit. Minima saepe eos\n      nihil recusandae, tempora id! Nostrum quia aliquid culpa nemo\n      consequuntur, eos dolore? Sit earum voluptatem ab aliquid iure\n      exercitationem?\n    </p>\n    <h2>I am an H2</h2>\n    <p>\n      Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis repudiandae\n      placeat ullam ab, explicabo non similique, voluptate culpa, illo facilis\n      ea? Quia perspiciatis esse earum eaque explicabo reiciendis ratione quasi.\n    </p>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/examples/kitchen-sink/package.json",
    "content": "{\n  \"name\": \"@parcel/kitchen-sink-example\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"serve\": \"parcel serve src/index.html --https --open\",\n    \"build\": \"rm -rf dist && parcel build src/index.html --no-cache\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"@parcel/config-default\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/optimizer-esbuild\": \"2.16.4\",\n    \"@parcel/reporter-sourcemap-visualiser\": \"2.16.4\",\n    \"parcel\": \"2.16.4\"\n  },\n  \"targets\": {\n    \"browserModern\": {\n      \"distDir\": \"dist/modern\",\n      \"engines\": {\n        \"browsers\": [\n          \"last 1 Chrome version\"\n        ]\n      }\n    },\n    \"browser\": {\n      \"distDir\": \"dist/legacy\",\n      \"engines\": {\n        \"browsers\": [\n          \"> 0.25%\"\n        ]\n      }\n    }\n  },\n  \"dependencies\": {\n    \"lodash\": \"^4.17.21\",\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/async.js",
    "content": "require('./paragraphs.css');\n\nconsole.log(require('react'));\nrequire('lodash');\n\nclass Foo {}\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/async2.js",
    "content": "console.log(require('react'));\nrequire('lodash');\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/child.css",
    "content": "h2 {\n  color: green;\n}\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>Modern Simple Example</title>\n    <link rel=\"stylesheet\" href=\"styles.css\" />\n    <script src=\"index.js\"></script>\n  </head>\n  <body>\n    <h1>I am an H1</h1>\n    <p>\n      Lorem ipsum dolor sit amet consectetur adipisicing elit. Minima saepe eos\n      nihil recusandae, tempora id! Nostrum quia aliquid culpa nemo\n      consequuntur, eos dolore? Sit earum voluptatem ab aliquid iure\n      exercitationem?\n    </p>\n    <h2>I am an H2</h2>\n    <p>\n      Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis repudiandae\n      placeat ullam ab, explicabo non similique, voluptate culpa, illo facilis\n      ea? Quia perspiciatis esse earum eaque explicabo reiciendis ratione quasi.\n    </p>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/index.js",
    "content": "import styles from './styles.css';\nimport parcel from 'url:./parcel.webp';\nimport {message} from './message';\n\nimport('./async');\nimport('./async2');\n\nnew Worker(new URL('worker.js', import.meta.url));\n\nconsole.log(message);\n\n// const message = require('./message');\n// const fs = require('fs');\n\n// console.log(message);\n// console.log(fs.readFileSync(__dirname + '/test.txt', 'utf8'));\n\n// class Test {}\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/message.js",
    "content": "export let message = 'hi!';\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/paragraphs.css",
    "content": "p {\n  color: red;\n}\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/prefetched.css",
    "content": ""
  },
  {
    "path": "packages/examples/kitchen-sink/src/prefetched.js",
    "content": "import './prefetched.css';\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/preloaded.css",
    "content": ""
  },
  {
    "path": "packages/examples/kitchen-sink/src/preloaded.js",
    "content": "import './preloaded.css';\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/styles.css",
    "content": "@import './child.css';\n\nh1 {\n  color: gray;\n}\n"
  },
  {
    "path": "packages/examples/kitchen-sink/src/test.txt",
    "content": "hello world"
  },
  {
    "path": "packages/examples/kitchen-sink/src/worker.js",
    "content": "const textUrl = require('url:./test.txt');\nconsole.log('logged from worker.js', textUrl);\n"
  },
  {
    "path": "packages/examples/react-hmr/package.json",
    "content": "{\n  \"name\": \"@parcel/react-hmr-example\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"demo\": \"parcel serve src/index.html --no-cache --https\"\n  },\n  \"devDependencies\": {\n    \"parcel\": \"2.16.4\"\n  },\n  \"targets\": {\n    \"browserModern\": {\n      \"engines\": {\n        \"browsers\": [\n          \"last 1 Chrome version\"\n        ]\n      }\n    },\n    \"browser\": {\n      \"engines\": {\n        \"browsers\": [\n          \"> 0.25%\"\n        ]\n      }\n    }\n  },\n  \"dependencies\": {\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/react-hmr/src/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config-browser\"\n}\n"
  },
  {
    "path": "packages/examples/react-hmr/src/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n    <title>Parcel | React Example</title>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n\n    <script src=\"index.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/examples/react-hmr/src/index.js",
    "content": "import * as React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nconsole.log({hmrOptions: module.hot});\n\nif (module.hot) {\n  module.hot.dispose(function () {\n    console.log('HOT DISPOSE');\n  });\n\n  module.hot.accept(function () {\n    console.log('HOT ACCEPT');\n  });\n}\n\nReactDOM.createRoot(document.getElementById('app')).render(\n  <div>Hello world!</div>,\n);\n"
  },
  {
    "path": "packages/examples/react-refresh/package.json",
    "content": "{\n  \"name\": \"@parcel/react-refresh-example\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"start\": \"parcel src/index.html\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\"\n  },\n  \"dependencies\": {\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/react-refresh/src/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config-browser\"\n}\n"
  },
  {
    "path": "packages/examples/react-refresh/src/App.js",
    "content": "import React, {useState} from 'react';\nimport ClassDefault from './ClassDefault';\nimport {ClassNamed} from './ClassNamed';\nimport FunctionDefault from './FunctionDefault';\nimport {FunctionNamed} from './FunctionNamed';\n\nconst LazyComponent = React.lazy(() => import('./LazyComponent'));\n\nfunction App() {\n  return (\n    <div>\n      <h1>App has {Math.random()}</h1>\n      <ClassDefault />\n      <ClassNamed />\n      <FunctionDefault />\n      <FunctionNamed />\n      <React.Suspense fallback={<h1>Loading</h1>}>\n        <LazyComponent />\n      </React.Suspense>\n    </div>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "packages/examples/react-refresh/src/ClassDefault.js",
    "content": "import React from 'react';\n\nclass ClassDefault extends React.Component {\n  render() {\n    return <h1>Default Export Class</h1>;\n  }\n}\n\nexport default ClassDefault;\n"
  },
  {
    "path": "packages/examples/react-refresh/src/ClassNamed.js",
    "content": "import React from 'react';\n\nexport class ClassNamed extends React.Component {\n  render() {\n    return <h1>Named Export Class</h1>;\n  }\n}\n"
  },
  {
    "path": "packages/examples/react-refresh/src/FunctionDefault.js",
    "content": "import React from 'react';\n\nfunction FunctionDefault() {\n  return <h1>Default Export Function</h1>;\n}\n\nexport default FunctionDefault;\n"
  },
  {
    "path": "packages/examples/react-refresh/src/FunctionNamed.js",
    "content": "import React from 'react';\n\nexport function FunctionNamed() {\n  return <h1>Named Export Function</h1>;\n}\n"
  },
  {
    "path": "packages/examples/react-refresh/src/LazyComponent.js",
    "content": "import React from 'react';\n\nfunction LazyComponent() {\n  return <h1>Lazy Component</h1>;\n}\n\nexport default LazyComponent;\n"
  },
  {
    "path": "packages/examples/react-refresh/src/index.html",
    "content": "<div id=\"root\"></div>\n<script src=\"./index.js\" type=\"module\"></script>\n"
  },
  {
    "path": "packages/examples/react-refresh/src/index.js",
    "content": "import React from 'react';\nimport {createRoot} from 'react-dom/client';\nimport App from './App';\n\ncreateRoot(document.getElementById('root')).render(\n  <>\n    <h1>Toplevel has {Math.random()}</h1>\n    <App />\n  </>,\n);\n"
  },
  {
    "path": "packages/examples/react-server-components/package.json",
    "content": "{\n  \"name\": \"parcel-react-server-components-example\",\n  \"version\": \"1.3.4\",\n  \"private\": true,\n  \"server\": \"dist/server.js\",\n  \"targets\": {\n    \"server\": {\n      \"source\": \"src/server.js\",\n      \"context\": \"react-server\"\n    },\n    \"react-static\": {\n      \"source\": \"static/*.js\",\n      \"distDir\": \"dist/static\",\n      \"context\": \"react-server\"\n    }\n  },\n  \"scripts\": {\n    \"dev\": \"parcel\",\n    \"build\": \"parcel build\",\n    \"start\": \"node dist/server.js\"\n  },\n  \"dependencies\": {\n    \"@parcel/rsc\": \"2.16.4\",\n    \"express\": \"^4.21.2\",\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/App.css",
    "content": "h1 {\n  font-family: sans-serif;\n}"
  },
  {
    "path": "packages/examples/react-server-components/src/App.js",
    "content": "'use server-entry';\n\nimport Container from './Container.js';\nimport {Counter} from './Counter.js';\nimport Button from './Button.js';\nimport {Files} from './Files';\nimport React, {lazy, Suspense} from 'react';\nimport './App.css';\nimport {getServerState} from './ServerState';\nimport {like} from './actions.js';\nimport './bootstrap';\n\nconst Dynamic = lazy(() => import('./Dynamic'));\n\nexport default async function App() {\n  return (\n    <html>\n      <head>\n        <title>RSC</title>\n      </head>\n      <body>\n        <Container>\n          <h1>{getServerState()}</h1>\n          <Counter />\n          <div>\n            <Button action={like.bind(null, 'hi')}>Like server action</Button>\n          </div>\n          <form>\n            <button formAction={like.bind(null, 'yoo')}>Like form</button>\n          </form>\n        </Container>\n        <Suspense fallback={<>Loading files...</>}>\n          <Files />\n        </Suspense>\n        <Dynamic />\n        <a href=\"/static\">Static</a>\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/Button.css",
    "content": "button {\n  background: hotpink;\n  color: white;\n}"
  },
  {
    "path": "packages/examples/react-server-components/src/Button.js",
    "content": "'use client';\nimport './Button.css';\n\nexport default function Button({action, children}) {\n  return (\n    <button\n      onClick={async () => {\n        const result = await action();\n        console.log(result);\n      }}\n    >\n      {children}\n    </button>\n  );\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/Container.js",
    "content": "export default function Container({children}) {\n  return <div>{children}</div>;\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/Counter.js",
    "content": "'use client';\n\nimport * as React from 'react';\nimport Container from './Container.js';\n\nexport function Counter() {\n  const [count, setCount] = React.useState(0);\n  return (\n    <Container>\n      <button onClick={() => setCount(c => c + 1)}>Count: {count}</button>\n    </Container>\n  );\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/Dynamic.css",
    "content": ".dynamic {\n  color: green;\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/Dynamic.js",
    "content": "import './Dynamic.css';\n\nexport default function Dynamic() {\n  return <h1 className=\"dynamic\">Dynamic!</h1>;\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/FilePage.js",
    "content": "'use server-entry';\n\nimport {readFile, stat} from 'fs/promises';\nimport {Files} from './Files';\nimport Container from './Container';\nimport {Counter} from './Counter';\nimport './bootstrap';\n\nexport default async function FilePage({file}) {\n  let f = await stat(file);\n  let contents = f.isFile() ? (\n    await readFile(file, 'utf8')\n  ) : (\n    <Files dir={file} />\n  );\n  return (\n    <html>\n      <head>\n        <title>{file}</title>\n      </head>\n      <body>\n        <Container>\n          <h1>{file}</h1>\n          <Counter />\n          <pre>{contents}</pre>\n        </Container>\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/Files.js",
    "content": "import fs from 'fs/promises';\nimport path from 'path';\n\nexport async function Files({dir = process.cwd()}) {\n  // await new Promise(resolve => setTimeout(resolve, 1000));\n  let files = await fs.readdir(dir);\n  let relative = path.relative(process.cwd(), dir);\n  return (\n    <ul>\n      {files.map((file, i) => (\n        <li key={i}>\n          <a href={`/files/${path.join(relative, file)}`}>{file}</a>\n        </li>\n      ))}\n    </ul>\n  );\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/ServerState.js",
    "content": "let serverState = 'Hello World';\n\nexport function setServerState(message) {\n  serverState = message;\n}\n\nexport function getServerState() {\n  return serverState;\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/ShowMore.js",
    "content": "'use client';\n\nimport * as React from 'react';\n\nimport Container from './Container.js';\n\nexport default function ShowMore({children}) {\n  const [show, setShow] = React.useState(false);\n  if (!show) {\n    return <button onClick={() => setShow(true)}>Show More</button>;\n  }\n  return <Container>{children}</Container>;\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/actions.js",
    "content": "'use server';\n\nimport {setServerState} from './ServerState';\n\nlet likeCount = 0;\n\nexport async function like(...args) {\n  console.log('Like', ...args);\n  setServerState(`Liked ${++likeCount} times!`);\n  return 'Liked';\n}\n"
  },
  {
    "path": "packages/examples/react-server-components/src/bootstrap.js",
    "content": "'use client-entry';\n\nimport {hydrate, fetchRSC} from '@parcel/rsc/client';\n\nlet updateRoot = hydrate({\n  async callServer(id, args) {\n    console.log(id, args);\n    const {result, root} = await fetchRSC('/', {\n      method: 'POST',\n      headers: {\n        'rsc-action-id': id,\n      },\n      body: args,\n    });\n    updateRoot(root);\n    return result;\n  },\n  onHmrReload() {\n    navigate(location.pathname);\n  },\n});\n\n// A very simple router. When we navigate, we'll fetch a new RSC payload from the server,\n// and in a React transition, stream in the new page. Once complete, we'll pushState to\n// update the URL in the browser.\nasync function navigate(pathname, push) {\n  let root = await fetchRSC(pathname);\n  updateRoot(root, () => {\n    if (push) {\n      history.pushState(null, '', pathname);\n    }\n  });\n}\n\n// Intercept link clicks to perform RSC navigation.\ndocument.addEventListener('click', e => {\n  let link = e.target.closest('a');\n  if (\n    link &&\n    link instanceof HTMLAnchorElement &&\n    link.href &&\n    (!link.target || link.target === '_self') &&\n    link.origin === location.origin &&\n    !link.hasAttribute('download') &&\n    e.button === 0 && // left clicks only\n    !e.metaKey && // open in new tab (mac)\n    !e.ctrlKey && // open in new tab (windows)\n    !e.altKey && // download\n    !e.shiftKey &&\n    !e.defaultPrevented\n  ) {\n    e.preventDefault();\n    navigate(link.pathname, true);\n  }\n});\n\n// When the user clicks the back button, navigate with RSC.\nwindow.addEventListener('popstate', e => {\n  navigate(location.pathname);\n});\n"
  },
  {
    "path": "packages/examples/react-server-components/src/server.js",
    "content": "import express from 'express';\nimport {renderRequest, callAction} from '@parcel/rsc/node';\n\n// Page components. These must have \"use server-entry\" so they are treated as code splitting entry points.\nimport App from './App';\nimport FilePage from './FilePage';\n\nconst app = express();\n\napp.use('/client', express.static('dist/client'));\n\nfunction sendFile(path, res, next) {\n  res.sendFile(path, {root: 'dist/static'}, err => {\n    if (err) next();\n  });\n}\n\napp.get('/*', (req, res, next) => {\n  res.format({\n    'text/html': () => sendFile(req.url + '.html', res, next),\n    'text/x-component': () => sendFile(req.url + '.rsc', res, next),\n    default: next\n  });\n});\n\napp.get('/', async (req, res) => {\n  await renderRequest(req, res, <App />, {component: App});\n});\n\napp.get('/files/*', async (req, res) => {\n  await renderRequest(req, res, <FilePage file={req.params[0]} />, {component: FilePage});\n});\n\napp.post('/', async (req, res) => {\n  let id = req.get('rsc-action-id');\n  try {\n    let {result} = await callAction(req, id);\n    let root = <App />;\n    if (id) {\n      root = {result, root};\n    }\n    await renderRequest(req, res, root, {component: App});\n  } catch (err) {\n    await renderRequest(req, res, <h1>{err.toString()}</h1>);\n  }\n});\n\napp.listen(3001);\nconsole.log('Server listening on port 3001');\n"
  },
  {
    "path": "packages/examples/react-server-components/static/static.js",
    "content": "import '../src/bootstrap';\nimport {Counter} from '../src/Counter';\n\nexport default function StaticPage() {\n  return (\n    <html>\n      <body>\n        <h1>Static</h1>\n        <Counter />\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "packages/examples/react-static/components/Counter.tsx",
    "content": "\"use client\";\n\nimport { useState } from \"react\";\n\nexport function Counter() {\n  let [count, setCount] = useState(0);\n  return <button onClick={() => setCount(count + 1)}>Count: {count}</button>;\n}\n"
  },
  {
    "path": "packages/examples/react-static/components/Nav.tsx",
    "content": "import type { PageProps } from \"@parcel/rsc\";\n\nexport function Nav({pages, currentPage}: PageProps) {\n  return (\n    <nav>\n      <ul>\n        {pages.map(page => (\n          <li key={page.url}>\n            <a href={page.url} aria-current={page.url === currentPage.url ? 'page' : undefined}>\n              {page.name.replace('.html', '')}\n            </a>\n          </li>\n        ))}\n      </ul>\n    </nav>\n  );\n}\n"
  },
  {
    "path": "packages/examples/react-static/components/client.tsx",
    "content": "\"use client-entry\";\n\nimport type { ReactNode } from 'react';\nimport {hydrate, fetchRSC} from '@parcel/rsc/client';\n\nlet updateRoot = hydrate({\n  // Intercept HMR window reloads, and do it with RSC instead.\n  onHmrReload() {\n    navigate(location.pathname);\n  }\n});\n\n// A very simple router. When we navigate, we'll fetch a new RSC payload from the server,\n// and in a React transition, stream in the new page. Once complete, we'll pushState to \n// update the URL in the browser.\nasync function navigate(pathname: string, push = false) {\n  let root = await fetchRSC<ReactNode>(pathname.replace(/\\.html$/, '.rsc'));\n  updateRoot(root, () => {\n    if (push) {\n      history.pushState(null, '', pathname);\n    }\n  });\n}\n\n// Intercept link clicks to perform RSC navigation.\ndocument.addEventListener('click', e => {\n  let link = (e.target as Element).closest('a');\n  if (\n    link &&\n    link instanceof HTMLAnchorElement &&\n    link.href &&\n    (!link.target || link.target === '_self') &&\n    link.origin === location.origin &&\n    !link.hasAttribute('download') &&\n    e.button === 0 && // left clicks only\n    !e.metaKey && // open in new tab (mac)\n    !e.ctrlKey && // open in new tab (windows)\n    !e.altKey && // download\n    !e.shiftKey &&\n    !e.defaultPrevented\n  ) {\n    e.preventDefault();\n    navigate(link.pathname, true);\n  }\n});\n\n// When the user clicks the back button, navigate with RSC.\nwindow.addEventListener('popstate', e => {\n  navigate(location.pathname);\n});\n"
  },
  {
    "path": "packages/examples/react-static/components/style.css",
    "content": "h1 {\n  font-family: system-ui;\n}\n\nnav a[aria-current] {\n  background: black;\n  color: white\n}\n"
  },
  {
    "path": "packages/examples/react-static/package.json",
    "content": "{\n  \"name\": \"parcel-rsc-static-example\",\n  \"version\": \"0.3.4\",\n  \"private\": true,\n  \"source\": \"pages/*.tsx\",\n  \"targets\": {\n    \"react-static\": {\n      \"context\": \"react-server\"\n    }\n  },\n  \"scripts\": {\n    \"start\": \"parcel\",\n    \"build\": \"parcel build\"\n  },\n  \"dependencies\": {\n    \"@parcel/rsc\": \"2.16.4\",\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/react-static/pages/Index.tsx",
    "content": "import type { PageProps } from \"@parcel/rsc\";\nimport { Counter } from \"../components/Counter\";\nimport { Nav } from '../components/Nav';\nimport '../components/style.css';\nimport '../components/client';\n\nexport default function Index({pages, currentPage}: PageProps) {\n  return (\n    <html>\n      <head>\n        <title>Static RSC</title>\n      </head>\n      <body>\n        <h1>This is an RSC!</h1>\n        <Nav pages={pages} currentPage={currentPage} />\n        <Counter />\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "packages/examples/react-static/pages/Other.tsx",
    "content": "import type { PageProps } from \"@parcel/rsc\";\nimport {Nav} from '../components/Nav';\nimport '../components/style.css';\nimport '../components/client';\n\nexport default function Index({pages, currentPage}: PageProps) {\n  return (\n    <html>\n      <head>\n        <title>Static RSC</title>\n      </head>\n      <body>\n        <h1>This is another RSC!</h1>\n        <Nav pages={pages} currentPage={currentPage} />\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "packages/examples/rsc-client/client/App.tsx",
    "content": "import {ReactElement, Suspense} from 'react';\nimport {fetchRSC, setServerCallback} from '@parcel/rsc/client';\n\nexport function App() {\n  return (\n    <>\n      <h1>Client rendered</h1>\n      <Suspense fallback={<>Loading RSC</>}>\n        <RSC />\n      </Suspense>\n    </>\n  );\n}\n\nlet request: Promise<ReactElement> | null = null;\n\nfunction RSC() {\n  // Simple cache to make sure we only fetch once.\n  request ??= fetchRSC('http://localhost:3001');\n  return request;\n}\n\nsetServerCallback(async (id, args) => {\n  let result = await fetchRSC('http://localhost:3001/action', {\n    method: 'POST',\n    headers: {\n      'rsc-action-id': id,\n    },\n    body: args,\n  });\n  return result;\n});\n"
  },
  {
    "path": "packages/examples/rsc-client/client/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <script type=\"module\" src=\"index.tsx\"></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/examples/rsc-client/client/index.tsx",
    "content": "import {createRoot} from \"react-dom/client\";\nimport {App} from './App';\n\nlet root = createRoot(document.getElementById('root')!);\nroot.render(<App />);\n\n"
  },
  {
    "path": "packages/examples/rsc-client/package.json",
    "content": "{\n  \"name\": \"parcel-rsc-client\",\n  \"version\": \"0.3.4\",\n  \"private\": true,\n  \"client\": \"dist/index.html\",\n  \"server\": \"dist/server.js\",\n  \"targets\": {\n    \"client\": {\n      \"source\": \"client/index.html\",\n      \"context\": \"react-client\"\n    },\n    \"server\": {\n      \"source\": \"server/server.tsx\",\n      \"context\": \"react-server\"\n    }\n  },\n  \"scripts\": {\n    \"start\": \"parcel\",\n    \"build\": \"parcel build\"\n  },\n  \"dependencies\": {\n    \"@parcel/rsc\": \"2.16.4\",\n    \"cors\": \"^2.8.5\",\n    \"express\": \"^4.21.2\",\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/rsc-client/server/Counter.tsx",
    "content": "\"use client\";\n\nimport { useState, startTransition } from \"react\";\nimport {like} from './actions';\n\nexport function Counter({likes}) {\n  let [count, setCount] = useState(likes);\n  let onClick = () => {\n    startTransition(async () => {\n      let newLikeCount = await like();\n      setCount(newLikeCount);\n    });\n  };\n\n  return <button onClick={onClick}>Count: {count}</button>;\n}\n"
  },
  {
    "path": "packages/examples/rsc-client/server/RSC.css",
    "content": ".rsc {\n  padding: 32px;\n  border: 1px solid gray;\n\n  h2 {\n    margin-top: 0;\n  }\n}\n"
  },
  {
    "path": "packages/examples/rsc-client/server/RSC.tsx",
    "content": "\"use server-entry\";\n\nimport {Counter} from './Counter';\nimport {likeCount} from './actions';\nimport './RSC.css';\n\nexport async function RSC() {\n  return (\n    <div className=\"rsc\">\n      <h2>RSC!</h2>\n      <Counter likes={likeCount} />\n    </div>\n  );\n}\n"
  },
  {
    "path": "packages/examples/rsc-client/server/actions.ts",
    "content": "'use server';\n\nexport let likeCount = 0;\n\nexport async function like() {\n  likeCount++;\n  return likeCount;\n}\n"
  },
  {
    "path": "packages/examples/rsc-client/server/server.tsx",
    "content": "// Server dependencies.\nimport express from 'express';\nimport cors from 'cors';\nimport {renderRSC, callAction} from '@parcel/rsc/node';\n\n// Page components. These must have \"use server-entry\" so they are treated as code splitting entry points.\nimport {RSC} from './RSC';\n\nconst app = express();\napp.use(cors());\n\napp.get('/', async (req, res) => {\n  // Render the server component to an RSC payload.\n  // Since our app is initially client rendered, we don't need to SSR it to HTML.\n  let stream = renderRSC(<RSC />);\n  res.set('Content-Type', 'text/x-component');\n  stream.pipe(res);\n});\n\napp.post('/action', async (req, res) => {\n  let id = req.get('rsc-action-id');\n  let {result} = await callAction(req, id);\n  let stream = renderRSC(result);\n  res.set('Content-Type', 'text/x-component');\n  stream.pipe(res);\n});\n\napp.listen(3001);\nconsole.log('Server listening on port 3001');\n"
  },
  {
    "path": "packages/examples/simple/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\"\n}\n"
  },
  {
    "path": "packages/examples/simple/package.json",
    "content": "{\n  \"name\": \"@parcel/simple-example\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"build\": \"PARCEL_WORKERS=0 parcel src/index.js --no-cache\",\n    \"clean-demo\": \"rm -rf .parcel-cache dist && yarn demo\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\"\n  },\n  \"browser\": \"dist/legacy/index.js\",\n  \"browserModern\": \"dist/modern/index.js\",\n  \"targets\": {\n    \"browser\": {\n      \"engines\": {\n        \"browsers\": [\n          \"last 1 Chrome version\"\n        ]\n      }\n    }\n  },\n  \"dependencies\": {\n    \"lodash\": \"^4.17.21\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/simple/src/bar.js",
    "content": "export const bar = 123;\n"
  },
  {
    "path": "packages/examples/simple/src/foo.js",
    "content": "export default function () {\n  return 'hello!';\n}\n\nexport function foo() {\n  return 123;\n}\n\nexport {bar} from './bar.js';\n"
  },
  {
    "path": "packages/examples/simple/src/index.js",
    "content": "import foo from './foo';\nimport './bar';\n\nconsole.log(foo(122222222));\n"
  },
  {
    "path": "packages/examples/three/.gitignore",
    "content": "src\ngithub\n"
  },
  {
    "path": "packages/examples/three/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"optimizers\": {\n    \"*.js\": [\"@parcel/optimizer-esbuild\"]\n  }\n}\n"
  },
  {
    "path": "packages/examples/three/Makefile",
    "content": "github:\n\tgit clone --depth 1 --branch r108 https://github.com/mrdoob/three.js.git github\n\nsrc: | github\n\tmkdir -p src\n\techo > src/entry.js\n\tfor i in 1 2 3 4; do test -d \"src/copy$$i\" || cp -r github/src \"src/copy$$i\"; done\n\tfor i in 1 2 3 4; do echo \"import * as copy$$i from './copy$$i/Three.js';\" >> src/entry.js; done\n\techo 'Line count:' && find src -name '*.js' | xargs wc -l | tail -n 1\n"
  },
  {
    "path": "packages/examples/three/package.json",
    "content": "{\n  \"name\": \"@parcel/three-js-stresstest\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"setup\": \"make src\",\n    \"build\": \"rm -rf dist && parcel build src/entry.js --no-cache\",\n    \"get-size\": \"du -sh dist\"\n  },\n  \"browserLegacy\": \"dist/legacy/index.js\",\n  \"browserModern\": \"dist/modern/index.js\",\n  \"targets\": {\n    \"browserModern\": {\n      \"engines\": {\n        \"browsers\": [\n          \"last 1 Chrome version\"\n        ]\n      }\n    },\n    \"browserLegacy\": {\n      \"engines\": {\n        \"browsers\": [\n          \"> 0.25%\"\n        ]\n      }\n    }\n  },\n  \"devDependencies\": {\n    \"@parcel/config-default\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/optimizer-esbuild\": \"2.16.4\",\n    \"parcel\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/ts-example/package.json",
    "content": "{\n  \"name\": \"@parcel/ts-example\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"demo\": \"parcel build src/index.ts --no-cache\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\"\n  },\n  \"main\": \"dist/main.js\",\n  \"module\": \"dist/module.js\",\n  \"types\": \"dist/types.d.ts\",\n  \"dependencies\": {\n    \"lodash\": \"^4.17.21\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/ts-example/src/index.ts",
    "content": "import * as other from './other';\n\ntype Params = {\n  hello: other.Params;\n};\n\n// export class Test {}\n\nexport default function test(params: Params) {\n  return params.hello;\n}\n\nexport function foo() {\n  return 2;\n}\n\nvar x = 2;\nvar p = x + 2,\n  q = 3;\nexport {p as hi};\n// export {Test as Hello} from './other';\n// export * from './other';\n\nexport {default as a} from './other';\n"
  },
  {
    "path": "packages/examples/ts-example/src/other.ts",
    "content": "export interface Test {\n  foo: number;\n}\n\nexport interface Params {\n  bar: number;\n}\n\nexport var a = 2,\n  b = 5;\nexport default function() {}\n"
  },
  {
    "path": "packages/examples/ts-example/tsconfig.json",
    "content": "{}\n"
  },
  {
    "path": "packages/examples/ts-typecheck-example/.parcelrc",
    "content": "{\n  \"extends\": \"@parcel/config-default\",\n  \"validators\": {\n    \"*.{ts,tsx}\": [\"@parcel/validator-typescript\"]\n  }\n}\n"
  },
  {
    "path": "packages/examples/ts-typecheck-example/package.json",
    "content": "{\n  \"name\": \"@parcel/ts-typecheck-example\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"scripts\": {\n    \"demo\": \"parcel build src/index.ts --no-cache\"\n  },\n  \"browserModern\": \"dist/modern/index.js\",\n  \"targets\": {\n    \"browserModern\": {\n      \"engines\": {\n        \"browsers\": [\n          \"last 1 Chrome version\"\n        ]\n      }\n    }\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\",\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/validator-typescript\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/examples/ts-typecheck-example/src/index.ts",
    "content": "type Params = {\n  hello: string;\n};\n\nexport default function test(params: Params) {\n  return params.world;\n}\n"
  },
  {
    "path": "packages/examples/ts-typecheck-example/tsconfig.json",
    "content": "{}\n"
  },
  {
    "path": "packages/namers/default/package.json",
    "content": "{\n  \"name\": \"@parcel/namer-default\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/DefaultNamer.js\",\n  \"source\": \"src/DefaultNamer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/namers/default/src/DefaultNamer.js",
    "content": "// @flow strict-local\n\nimport type {Bundle, FilePath} from '@parcel/types';\n\nimport {Namer} from '@parcel/plugin';\nimport ThrowableDiagnostic, {\n  convertSourceLocationToHighlight,\n  md,\n} from '@parcel/diagnostic';\nimport assert from 'assert';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\n\nconst COMMON_NAMES = new Set(['index', 'src', 'lib']);\nconst ALLOWED_EXTENSIONS = {\n  js: ['js', 'mjs', 'cjs'],\n};\n\nexport default (new Namer({\n  name({bundle, bundleGraph}) {\n    let bundleGroup = bundleGraph.getBundleGroupsContainingBundle(bundle)[0];\n    let bundleGroupBundles = bundleGraph.getBundlesInBundleGroup(bundleGroup, {\n      includeInline: true,\n    });\n    let isEntry = bundleGraph.isEntryBundleGroup(bundleGroup);\n\n    if (bundle.needsStableName) {\n      let entryBundlesOfType = bundleGroupBundles.filter(\n        b => b.needsStableName && b.type === bundle.type,\n      );\n      assert(\n        entryBundlesOfType.length === 1,\n        // Otherwise, we'd end up naming two bundles the same thing.\n        `Bundle group cannot have more than one entry bundle of the same type. The offending bundle type is ${entryBundlesOfType[0].type}`,\n      );\n    }\n\n    let mainBundle = nullthrows(\n      bundleGroupBundles.find(b =>\n        b.getEntryAssets().some(a => a.id === bundleGroup.entryAssetId),\n      ),\n    );\n\n    if (\n      bundle.id === mainBundle.id &&\n      isEntry &&\n      bundle.target &&\n      bundle.target.distEntry != null\n    ) {\n      let loc = bundle.target.loc;\n      let distEntry = bundle.target.distEntry;\n      let distExtension = path.extname(bundle.target.distEntry).slice(1);\n      let allowedExtensions = ALLOWED_EXTENSIONS[bundle.type] || [bundle.type];\n      if (!allowedExtensions.includes(distExtension) && loc) {\n        let fullName = path.relative(\n          path.dirname(loc.filePath),\n          path.join(bundle.target.distDir, distEntry),\n        );\n        let err = new ThrowableDiagnostic({\n          diagnostic: {\n            message: md`Target \"${bundle.target.name}\" declares an output file path of \"${fullName}\" which does not match the compiled bundle type \"${bundle.type}\".`,\n            codeFrames: [\n              {\n                filePath: loc.filePath,\n                codeHighlights: [\n                  convertSourceLocationToHighlight(\n                    loc,\n                    md`Did you mean \"${\n                      fullName.slice(0, -path.extname(fullName).length) +\n                      '.' +\n                      bundle.type\n                    }\"?`,\n                  ),\n                ],\n              },\n            ],\n            hints: [\n              `Try changing the file extension of \"${\n                bundle.target.name\n              }\" in ${path.relative(process.cwd(), loc.filePath)}.`,\n            ],\n          },\n        });\n        throw err;\n      }\n\n      return bundle.target.distEntry;\n    }\n\n    // Base split bundle names on the first bundle in their group.\n    // e.g. if `index.js` imports `foo.css`, the css bundle should be called\n    //      `index.css`.\n    let name = nameFromContent(\n      mainBundle,\n      bundle,\n      isEntry,\n      bundleGroup.entryAssetId,\n      bundleGraph.getEntryRoot(bundle.target),\n    );\n    if (!bundle.needsStableName) {\n      name += '.' + bundle.hashReference;\n    }\n\n    // Allow bundle extension to be overridden.\n    let extension = bundle.type;\n    let entry = bundle.getMainEntry();\n    if (entry && typeof entry.meta.bundleExtension === 'string') {\n      extension = entry.meta.bundleExtension;\n    }\n\n    // Group server and client bundles into separate folders.\n    // This allows users to easily upload to different places, and avoid exposing\n    // server code on public servers.\n    // If bundleExtension is set, assume everything is static (rendering at build time).\n    if (\n      (bundle.env.context === 'react-server' &&\n        entry?.meta?.bundleExtension == null) ||\n      (bundle.env.context === 'react-client' &&\n        hasReactServerEntries(bundleGraph))\n    ) {\n      name = bundle.env.context.slice(6) + '/' + name;\n    }\n\n    return name + '.' + extension;\n  },\n}): Namer);\n\nfunction nameFromContent(\n  mainBundle: Bundle,\n  bundle: Bundle,\n  isEntry: boolean,\n  entryAssetId: string,\n  entryRoot: FilePath,\n): string {\n  let entryFilePath = nullthrows(\n    mainBundle.getEntryAssets().find(a => a.id === entryAssetId),\n  ).filePath;\n  let name = basenameWithoutExtension(entryFilePath);\n\n  // If this is an entry bundle, use the original relative path.\n  if (bundle.needsStableName) {\n    // Match name of target entry if possible, but with a different extension.\n    if (isEntry && bundle.target.distEntry != null) {\n      return basenameWithoutExtension(bundle.target.distEntry);\n    }\n\n    return path\n      .join(path.relative(entryRoot, path.dirname(entryFilePath)), name)\n      .replace(/\\.\\.(\\/|\\\\)/g, 'up_$1');\n  } else {\n    // If this is an index file or common directory name, use the parent\n    // directory name instead, which is probably more descriptive.\n    while (COMMON_NAMES.has(name)) {\n      entryFilePath = path.dirname(entryFilePath);\n      name = path.basename(entryFilePath);\n      if (name.startsWith('.')) {\n        name = name.replace('.', '');\n      }\n    }\n\n    return name || 'bundle';\n  }\n}\n\nfunction basenameWithoutExtension(file) {\n  return path.basename(file, path.extname(file));\n}\n\nlet rscEntryCache = new WeakMap();\nfunction hasReactServerEntries(bundleGraph) {\n  let res = rscEntryCache.get(bundleGraph);\n  if (res == null) {\n    res = bundleGraph\n      .getEntryBundles()\n      .some(\n        b =>\n          b.env.context === 'react-server' &&\n          b.getMainEntry()?.meta?.bundleExtension == null,\n      );\n    rscEntryCache.set(bundleGraph, res);\n  }\n  return res;\n}\n"
  },
  {
    "path": "packages/optimizers/blob-url/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-blob-url\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/BlobURLOptimizer.js\",\n  \"source\": \"src/BlobURLOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/blob-url/src/BlobURLOptimizer.js",
    "content": "// @flow strict-local\n\nimport {Optimizer} from '@parcel/plugin';\nimport {blobToString} from '@parcel/utils';\n\nexport default (new Optimizer({\n  async optimize({contents}) {\n    // Inspired by webpack's worker plugin:\n    // https://github.com/webpack-contrib/worker-loader/blob/b82585a1ddb8ae295fd4b1c302bca6b162665de2/src/workers/InlineWorker.js\n    // which itself draws from:\n    // http://stackoverflow.com/questions/10343913/how-to-create-a-web-worker-from-a-string\n    //\n    // This version only uses the Blob constructor, which is available in IE 10+:\n    // https://developer.mozilla.org/en-US/docs/Web/API/Blob\n    return {\n      contents: `URL.createObjectURL(new Blob([${JSON.stringify(\n        await blobToString(contents),\n      )}]))`,\n    };\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/optimizers/css/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-css\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/CSSOptimizer.js\",\n  \"source\": \"src/CSSOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"browserslist\": \"^4.24.5\",\n    \"lightningcss\": \"^1.30.1\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"lightningcss-wasm\": \"^1.30.1\"\n  },\n  \"browser\": {\n    \"lightningcss\": \"lightningcss-wasm\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/css/src/CSSOptimizer.js",
    "content": "// @flow strict-local\n\nimport SourceMap from '@parcel/source-map';\nimport {Optimizer} from '@parcel/plugin';\n// $FlowFixMe - init for browser build.\nimport init, {\n  transform,\n  transformStyleAttribute,\n  browserslistToTargets,\n} from 'lightningcss';\nimport {blobToBuffer} from '@parcel/utils';\nimport browserslist from 'browserslist';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport {\n  convertSourceLocationToHighlight,\n  md,\n  generateJSONCodeHighlights,\n} from '@parcel/diagnostic';\n\nexport default (new Optimizer({\n  async loadConfig({config, logger, options}) {\n    const configFile = await config.getConfig(\n      [\n        '.cssnanorc',\n        'cssnano.config.json',\n        'cssnano.config.js',\n        'cssnano.config.cjs',\n      ],\n      {\n        packageKey: 'cssnano',\n      },\n    );\n    if (configFile) {\n      let filename = path.basename(configFile.filePath);\n      let codeHighlights;\n      let message;\n      if (filename === 'package.json') {\n        message = md`\nParcel\\'s default CSS minifer changed from cssnano to lightningcss, but a \"cssnano\" key was found in **package.json**. Either remove this configuration, or configure Parcel to use @parcel/optimizer-cssnano instead.\n        `;\n        let contents = await options.inputFS.readFile(\n          configFile.filePath,\n          'utf8',\n        );\n        codeHighlights = generateJSONCodeHighlights(contents, [\n          {key: '/cssnano', type: 'key'},\n        ]);\n      } else {\n        message = md`Parcel\\'s default CSS minifer changed from cssnano to lightningcss, but a __${filename}__ config file was found. Either remove this config file, or configure Parcel to use @parcel/optimizer-cssnano instead.`;\n        codeHighlights = [\n          {\n            start: {line: 1, column: 1},\n            end: {line: 1, column: 1},\n          },\n        ];\n      }\n\n      logger.warn({\n        message,\n        documentationURL: 'https://parceljs.org/languages/css/#minification',\n        codeFrames: [\n          {\n            filePath: configFile.filePath,\n            codeHighlights,\n          },\n        ],\n      });\n    }\n  },\n  async optimize({\n    bundle,\n    bundleGraph,\n    logger,\n    contents: prevContents,\n    getSourceMapReference,\n    map: prevMap,\n    options,\n  }) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents: prevContents, map: prevMap};\n    }\n\n    let targets = getTargets(bundle.env.engines.browsers);\n    let code = await blobToBuffer(prevContents);\n\n    let unusedSymbols;\n    if (bundle.env.shouldScopeHoist) {\n      unusedSymbols = [];\n      bundle.traverseAssets(asset => {\n        if (\n          asset.symbols.isCleared ||\n          asset.meta.cssModulesCompiled === 'postcss'\n        ) {\n          return;\n        }\n\n        let usedSymbols = bundleGraph.getUsedSymbols(asset);\n        if (usedSymbols == null) {\n          return;\n        }\n\n        let defaultImport = null;\n        if (usedSymbols.has('default')) {\n          let incoming = bundleGraph.getIncomingDependencies(asset);\n          defaultImport = incoming.find(d =>\n            d.symbols.hasExportSymbol('default'),\n          );\n          if (defaultImport) {\n            let loc = defaultImport.symbols.get('default')?.loc;\n            logger.warn({\n              message:\n                'CSS modules cannot be tree shaken when imported with a default specifier',\n              ...(loc && {\n                codeFrames: [\n                  {\n                    filePath: nullthrows(\n                      loc?.filePath ?? defaultImport.sourcePath,\n                    ),\n                    codeHighlights: [convertSourceLocationToHighlight(loc)],\n                  },\n                ],\n              }),\n              hints: [\n                `Instead do: import * as style from \"${defaultImport.specifier}\";`,\n              ],\n              documentationURL:\n                'https://parceljs.org/languages/css/#tree-shaking',\n            });\n          }\n        }\n\n        if (!defaultImport && !usedSymbols.has('*')) {\n          for (let [symbol, {local}] of asset.symbols) {\n            if (local !== 'default' && !usedSymbols.has(symbol)) {\n              unusedSymbols.push(local);\n            }\n          }\n        }\n      });\n    }\n\n    // Inline style attributes in HTML need to be parsed differently from full CSS files.\n    if (bundle.bundleBehavior === 'inline') {\n      let entry = bundle.getMainEntry();\n      if (entry?.meta.type === 'attr') {\n        let result = transformStyleAttribute({\n          code,\n          minify: true,\n          targets,\n        });\n\n        return {\n          contents: Buffer.from(result.code),\n        };\n      }\n    }\n\n    // $FlowFixMe\n    if (process.browser) {\n      await init();\n    }\n\n    let result = transform({\n      filename: bundle.name,\n      code,\n      minify: true,\n      sourceMap: !!bundle.env.sourceMap,\n      targets,\n      unusedSymbols,\n    });\n\n    let map;\n    if (result.map != null) {\n      let vlqMap = JSON.parse(Buffer.from(result.map).toString());\n      map = new SourceMap(options.projectRoot);\n      map.addVLQMap(vlqMap);\n      if (prevMap) {\n        map.extends(prevMap);\n      }\n    }\n\n    let contents = Buffer.from(result.code);\n    if (bundle.env.sourceMap) {\n      let reference = await getSourceMapReference(map);\n      if (reference != null) {\n        contents =\n          contents.toString() +\n          '\\n' +\n          '/*# sourceMappingURL=' +\n          reference +\n          ' */\\n';\n      }\n    }\n\n    return {\n      contents: Buffer.from(contents),\n      map,\n    };\n  },\n}): Optimizer);\n\nlet cache = new Map();\n\nfunction getTargets(browsers) {\n  if (browsers == null) {\n    return undefined;\n  }\n\n  let cached = cache.get(browsers);\n  if (cached != null) {\n    return cached;\n  }\n\n  let targets = browserslistToTargets(browserslist(browsers));\n\n  cache.set(browsers, targets);\n  return targets;\n}\n"
  },
  {
    "path": "packages/optimizers/cssnano/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-cssnano\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/CSSNanoOptimizer.js\",\n  \"source\": \"src/CSSNanoOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"cssnano\": \"^7.0.7\",\n    \"postcss\": \"^8.5.3\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/cssnano/src/CSSNanoOptimizer.js",
    "content": "// @flow strict-local\n\nimport SourceMap from '@parcel/source-map';\nimport {Optimizer} from '@parcel/plugin';\nimport postcss from 'postcss';\nimport cssnano from 'cssnano';\nimport type {CSSNanoOptions} from 'cssnano'; // TODO the type is based on cssnano 4\n\nexport default (new Optimizer({\n  async loadConfig({config}) {\n    const configFile = await config.getConfig(\n      [\n        '.cssnanorc',\n        'cssnano.config.json',\n        'cssnano.config.js',\n        'cssnano.config.cjs',\n        'cssnano.config.mjs',\n      ],\n      {\n        packageKey: 'cssnano',\n      },\n    );\n    if (configFile) {\n      return configFile.contents;\n    }\n  },\n\n  async optimize({\n    bundle,\n    contents: prevContents,\n    getSourceMapReference,\n    map: prevMap,\n    config,\n    options,\n  }) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents: prevContents, map: prevMap};\n    }\n\n    if (typeof prevContents !== 'string') {\n      throw new Error(\n        'CSSNanoOptimizer: Only string contents are currently supported',\n      );\n    }\n\n    const result = await postcss([\n      cssnano((config ?? {}: CSSNanoOptions)),\n    ]).process(prevContents, {\n      // Suppress postcss's warning about a missing `from` property. In this\n      // case, the input map contains all of the sources.\n      from: undefined,\n      map: {\n        annotation: false,\n        inline: false,\n        prev: prevMap ? await prevMap.stringify({}) : null,\n      },\n    });\n\n    let map;\n    if (result.map != null) {\n      map = new SourceMap(options.projectRoot);\n      map.addVLQMap(result.map.toJSON());\n    }\n\n    let contents = result.css;\n    if (bundle.env.sourceMap) {\n      let reference = await getSourceMapReference(map);\n      if (reference != null) {\n        contents += '\\n' + '/*# sourceMappingURL=' + reference + ' */\\n';\n      }\n    }\n\n    return {\n      contents,\n      map,\n    };\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/optimizers/data-url/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-data-url\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/DataURLOptimizer.js\",\n  \"source\": \"src/DataURLOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"isbinaryfile\": \"^5.0.4\",\n    \"mime\": \"^3.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/data-url/src/DataURLOptimizer.js",
    "content": "// @flow strict-local\n\nimport {Optimizer} from '@parcel/plugin';\nimport {blobToBuffer} from '@parcel/utils';\nimport mime from 'mime';\nimport {isBinaryFile} from 'isbinaryfile';\n\nconst fixedEncodeURIComponent = (str: string): string => {\n  return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n    return '%' + c.charCodeAt(0).toString(16);\n  });\n};\n\nexport default (new Optimizer({\n  async optimize({bundle, contents}) {\n    let bufferContents = await blobToBuffer(contents);\n    let hasBinaryContent = await isBinaryFile(bufferContents);\n\n    // Follows the data url format referenced here:\n    // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n    let mimeType = mime.getType(bundle.name) ?? '';\n    let encoding = hasBinaryContent ? ';base64' : '';\n    let content = fixedEncodeURIComponent(\n      hasBinaryContent\n        ? bufferContents.toString('base64')\n        : bufferContents.toString(),\n    );\n    return {\n      contents: `data:${mimeType}${encoding},${content}`,\n    };\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/optimizers/esbuild/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-esbuild\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/ESBuildOptimizer.js\",\n  \"source\": \"src/ESBuildOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 10.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"esbuild\": \"^0.25.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/esbuild/src/ESBuildOptimizer.js",
    "content": "// @flow\n\nimport {transform} from 'esbuild';\nimport {Optimizer} from '@parcel/plugin';\nimport {blobToString, normalizePath} from '@parcel/utils';\nimport SourceMap from '@parcel/source-map';\nimport path from 'path';\nimport invariant from 'assert';\n\nexport default (new Optimizer({\n  async optimize({contents, map, bundle, options, getSourceMapReference}) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents, map};\n    }\n\n    let relativeBundlePath = path.relative(\n      options.projectRoot,\n      path.join(bundle.target.distDir, bundle.name),\n    );\n    let code = await blobToString(contents);\n    if (map) {\n      let vlqMappings = await map.stringify({\n        file: normalizePath(relativeBundlePath + '.map'),\n        format: 'inline',\n      });\n      // Flow things...\n      invariant(typeof vlqMappings === 'string');\n      code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${vlqMappings}`;\n    }\n\n    let {code: js, map: jsSourceMap} = await transform(code, {\n      sourcemap: 'external',\n      sourcefile: relativeBundlePath,\n      minify: true,\n      treeShaking: true,\n      format: 'esm',\n    });\n\n    let sourcemap = null;\n    if (jsSourceMap) {\n      sourcemap = new SourceMap(options.projectRoot);\n      let parsedMap = JSON.parse(jsSourceMap);\n      sourcemap.addVLQMap(parsedMap);\n\n      let sourcemapReference = await getSourceMapReference(sourcemap);\n      if (sourcemapReference) {\n        js += `\\n//# sourceMappingURL=${sourcemapReference}\\n`;\n      }\n    }\n\n    return {\n      contents: js,\n      map: sourcemap || map,\n    };\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/optimizers/html/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-html\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/HTMLOptimizer.js\",\n  \"source\": \"src/HTMLOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/html/src/HTMLOptimizer.js",
    "content": "// @flow strict-local\nimport {Optimizer} from '@parcel/plugin';\nimport {blobToBuffer, convertSVGOConfig} from '@parcel/utils';\nimport {optimizeHtml} from '@parcel/rust';\nimport path from 'path';\n\nexport default (new Optimizer({\n  async loadConfig({config, options}) {\n    let userConfig = await config.getConfigFrom(\n      path.join(options.projectRoot, 'index.html'),\n      [\n        '.htmlnanorc',\n        '.htmlnanorc.json',\n        '.htmlnanorc.js',\n        '.htmlnanorc.cjs',\n        '.htmlnanorc.mjs',\n        'htmlnano.config.js',\n        'htmlnano.config.cjs',\n        'htmlnano.config.mjs',\n      ],\n      {\n        packageKey: 'htmlnano',\n      },\n    );\n\n    let contents = userConfig?.contents;\n\n    if (userConfig && contents && typeof contents === 'object') {\n      contents.minifySvg = await convertSVGOConfig(\n        contents.minifySvg,\n        userConfig.filePath,\n        path.extname(userConfig.filePath) === 'package.json'\n          ? '/htmlnano/minifySvg'\n          : '/minifySvg',\n        options.inputFS,\n        'Use the legacy @parcel/optimizer-htmlnano instead of @parcel/optimizer-html if needed.',\n      );\n    }\n\n    return contents;\n  },\n  async optimize({bundle, contents, map, config}) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents, map};\n    }\n\n    let code = await blobToBuffer(contents);\n    let res = optimizeHtml({\n      code,\n      xml: bundle.type === 'xhtml',\n      config,\n    });\n\n    return {\n      contents: res.code,\n    };\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/optimizers/htmlnano/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-htmlnano\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/HTMLNanoOptimizer.js\",\n  \"source\": \"src/HTMLNanoOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"htmlnano\": \"^2.1.2\",\n    \"nullthrows\": \"^1.1.1\",\n    \"posthtml\": \"^0.16.6\"\n  },\n  \"devDependencies\": {\n    \"svgo\": \"^3.3.2\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/htmlnano/src/HTMLNanoOptimizer.js",
    "content": "// @flow strict-local\nimport type {PostHTMLNode} from 'posthtml';\n\nimport htmlnano from 'htmlnano';\nimport {\n  md,\n  generateJSONCodeHighlights,\n  errorToDiagnostic,\n} from '@parcel/diagnostic';\nimport {Optimizer} from '@parcel/plugin';\nimport {detectSVGOVersion, blobToString} from '@parcel/utils';\nimport posthtml from 'posthtml';\nimport path from 'path';\nimport {SVG_ATTRS, SVG_TAG_NAMES} from './svgMappings';\n\nexport default (new Optimizer({\n  async loadConfig({config, options, logger}) {\n    let userConfig = await config.getConfigFrom(\n      path.join(options.projectRoot, 'index.html'),\n      [\n        '.htmlnanorc',\n        '.htmlnanorc.json',\n        '.htmlnanorc.js',\n        '.htmlnanorc.cjs',\n        '.htmlnanorc.mjs',\n        'htmlnano.config.js',\n        'htmlnano.config.cjs',\n        'htmlnano.config.mjs',\n      ],\n      {\n        packageKey: 'htmlnano',\n      },\n    );\n\n    let contents = userConfig?.contents;\n\n    // See if svgo is already installed.\n    let resolved;\n    try {\n      resolved = await options.packageManager.resolve(\n        'svgo',\n        path.join(options.projectRoot, 'index'),\n        {shouldAutoInstall: false},\n      );\n    } catch (err) {\n      // ignore.\n    }\n\n    // If so, use the existing installed version.\n    let svgoVersion = 3;\n    if (resolved) {\n      if (resolved.pkg?.version) {\n        svgoVersion = parseInt(resolved.pkg.version);\n      }\n    } else if (contents?.minifySvg) {\n      // Otherwise try to detect the version based on the config file.\n      let v = detectSVGOVersion(contents.minifySvg);\n      if (userConfig != null && v.version === 2) {\n        logger.warn({\n          message: md`Detected deprecated SVGO v2 options in ${path.relative(\n            process.cwd(),\n            userConfig.filePath,\n          )}`,\n          codeFrames: [\n            {\n              filePath: userConfig.filePath,\n              codeHighlights:\n                path.basename(userConfig.filePath) === '.htmlnanorc' ||\n                path.extname(userConfig.filePath) === '.json'\n                  ? generateJSONCodeHighlights(\n                      await options.inputFS.readFile(\n                        userConfig.filePath,\n                        'utf8',\n                      ),\n                      [\n                        {\n                          key: `${\n                            path.basename(userConfig.filePath) ===\n                            'package.json'\n                              ? '/htmlnano'\n                              : ''\n                          }/minifySvg${v.path}`,\n                        },\n                      ],\n                    )\n                  : [],\n            },\n          ],\n        });\n      }\n\n      svgoVersion = v.version;\n    }\n\n    return {\n      contents,\n      svgoVersion,\n    };\n  },\n  async optimize({bundle, contents, map, config, options, logger}) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents, map};\n    }\n\n    let code = await blobToString(contents);\n    const clonedConfig = config.contents || {};\n\n    // $FlowFixMe\n    const presets = htmlnano.presets;\n    const preset =\n      typeof clonedConfig.preset === 'string'\n        ? presets[clonedConfig.preset]\n        : {};\n    delete clonedConfig.preset;\n\n    const htmlNanoConfig = {\n      // Inline <script> and <style> elements, and style attributes are already\n      // minified before they are re-inserted by the packager.\n      minifyJs: false,\n      minifyCss: false,\n      ...(preset || {}),\n      ...clonedConfig,\n      // Never use htmlnano's builtin svgo transform.\n      // We need to control the version of svgo that is used.\n      minifySvg: false,\n      // TODO: Uncomment this line once we update htmlnano, new version isn't out yet\n      // skipConfigLoading: true,\n    };\n\n    let plugins = [htmlnano(htmlNanoConfig)];\n\n    // $FlowFixMe\n    if (clonedConfig.minifySvg !== false) {\n      plugins.push(mapSVG);\n      plugins.push(tree =>\n        minifySvg(\n          tree,\n          options,\n          config.svgoVersion,\n          clonedConfig.minifySvg,\n          logger,\n        ),\n      );\n    }\n\n    return {\n      contents: (\n        await posthtml(plugins).process(code, {\n          xmlMode: bundle.type === 'xhtml',\n          closingSingleTag: bundle.type === 'xhtml' ? 'slash' : undefined,\n        })\n      ).html,\n    };\n  },\n}): Optimizer);\n\n// HTML tags and attributes are case insensitive. The HTML transformer normalizes them so it can\n// more easily process any case. But SVGO requires case sensitive tags and attributes to work correctly.\n// So map lowercased tag and attribute names back to their case-sensitive equivalents.\nfunction mapSVG(\n  node: string | PostHTMLNode | Array<string | PostHTMLNode>,\n  inSVG = false,\n) {\n  if (Array.isArray(node)) {\n    for (let i = 0; i < node.length; i++) {\n      // $FlowFixMe\n      node[i] = mapSVG(node[i], inSVG);\n    }\n  } else if (node && typeof node === 'object') {\n    let {tag, attrs} = node;\n\n    // SVG in HTML does not require xml namespaces to be declared, but standalone SVG files do.\n    // If unset, add them here so that SVGO doesn't have parse errors.\n    if (tag === 'svg') {\n      if (!attrs) {\n        node.attrs = attrs = {};\n      }\n\n      if (!attrs.xmlns) {\n        attrs.xmlns = 'http://www.w3.org/2000/svg';\n      }\n\n      if (!attrs['xmlns:xlink']) {\n        attrs['xmlns:xlink'] = 'http://www.w3.org/1999/xlink';\n      }\n    }\n\n    if (inSVG || tag === 'svg') {\n      if (SVG_TAG_NAMES[tag]) {\n        node.tag = SVG_TAG_NAMES[tag];\n      }\n\n      if (attrs) {\n        for (let key in attrs) {\n          if (SVG_ATTRS[key]) {\n            attrs[SVG_ATTRS[key]] = attrs[key];\n            delete attrs[key];\n          }\n        }\n      }\n    }\n\n    if (node.content != null) {\n      mapSVG(node.content, inSVG || tag === 'svg');\n    }\n  }\n\n  return node;\n}\n\nasync function minifySvg(tree, options, svgoVersion, svgoOptions, logger) {\n  let svgNodes = [];\n  tree.match({tag: 'svg'}, node => {\n    svgNodes.push(node);\n    return node;\n  });\n\n  if (!svgNodes.length) {\n    return tree;\n  }\n\n  const svgo = await options.packageManager.require(\n    'svgo',\n    path.join(options.projectRoot, 'index'),\n    {\n      range: `^${svgoVersion}`,\n      saveDev: true,\n      shouldAutoInstall: options.shouldAutoInstall,\n    },\n  );\n\n  let opts = svgoOptions;\n  if (!svgoOptions) {\n    let cleanupIds: string = svgoVersion === 2 ? 'cleanupIDs' : 'cleanupIds';\n    opts = {\n      plugins: [\n        {\n          name: 'preset-default',\n          params: {\n            overrides: {\n              // Copied from htmlnano defaults.\n              collapseGroups: false,\n              convertShapeToPath: false,\n              // Additional defaults to preserve accessibility information.\n              removeTitle: false,\n              removeDesc: false,\n              removeUnknownsAndDefaults: {\n                keepAriaAttrs: true,\n                keepRoleAttr: true,\n              },\n              // Do not minify ids or remove unreferenced elements in\n              // inline SVGs because they could actually be referenced\n              // by a separate inline SVG.\n              [cleanupIds]: false,\n              removeHiddenElems: false,\n            },\n          },\n        },\n        // XML namespaces are not required in HTML.\n        'removeXMLNS',\n        'removeXlink',\n      ],\n    };\n  }\n\n  for (let node of svgNodes) {\n    let svgStr = tree.render(node, {\n      closingSingleTag: 'slash',\n      quoteAllAttributes: true,\n    });\n    try {\n      let result = svgo.optimize(svgStr, opts);\n      node.tag = false;\n      node.attrs = {};\n      node.content = [result.data];\n    } catch (error) {\n      logger.warn(errorToDiagnostic(error));\n    }\n  }\n\n  return tree;\n}\n"
  },
  {
    "path": "packages/optimizers/htmlnano/src/svgMappings.js",
    "content": "// @flow\n// Based on parse5: https://github.com/inikulin/parse5/blob/252819607421a5741cf745bb60c404f023531b0d/packages/parse5/lib/common/foreign-content.js#L54\n\nexport const SVG_TAG_NAMES: {|[string]: string|} = {\n  altglyph: 'altGlyph',\n  altglyphdef: 'altGlyphDef',\n  altglyphitem: 'altGlyphItem',\n  animatecolor: 'animateColor',\n  animatemotion: 'animateMotion',\n  animatetransform: 'animateTransform',\n  clippath: 'clipPath',\n  feblend: 'feBlend',\n  fecolormatrix: 'feColorMatrix',\n  fecomponenttransfer: 'feComponentTransfer',\n  fecomposite: 'feComposite',\n  feconvolvematrix: 'feConvolveMatrix',\n  fediffuselighting: 'feDiffuseLighting',\n  fedisplacementmap: 'feDisplacementMap',\n  fedistantlight: 'feDistantLight',\n  feflood: 'feFlood',\n  fefunca: 'feFuncA',\n  fefuncb: 'feFuncB',\n  fefuncg: 'feFuncG',\n  fefuncr: 'feFuncR',\n  fegaussianblur: 'feGaussianBlur',\n  feimage: 'feImage',\n  femerge: 'feMerge',\n  femergenode: 'feMergeNode',\n  femorphology: 'feMorphology',\n  feoffset: 'feOffset',\n  fepointlight: 'fePointLight',\n  fespecularlighting: 'feSpecularLighting',\n  fespotlight: 'feSpotLight',\n  fetile: 'feTile',\n  feturbulence: 'feTurbulence',\n  foreignobject: 'foreignObject',\n  glyphref: 'glyphRef',\n  lineargradient: 'linearGradient',\n  radialgradient: 'radialGradient',\n  textpath: 'textPath',\n};\n\nexport const SVG_ATTRS: {|[string]: string|} = {\n  attributename: 'attributeName',\n  attributetype: 'attributeType',\n  basefrequency: 'baseFrequency',\n  baseprofile: 'baseProfile',\n  calcmode: 'calcMode',\n  clippathunits: 'clipPathUnits',\n  diffuseconstant: 'diffuseConstant',\n  edgemode: 'edgeMode',\n  filterunits: 'filterUnits',\n  glyphref: 'glyphRef',\n  gradienttransform: 'gradientTransform',\n  gradientunits: 'gradientUnits',\n  kernelmatrix: 'kernelMatrix',\n  kernelunitlength: 'kernelUnitLength',\n  keypoints: 'keyPoints',\n  keysplines: 'keySplines',\n  keytimes: 'keyTimes',\n  lengthadjust: 'lengthAdjust',\n  limitingconeangle: 'limitingConeAngle',\n  markerheight: 'markerHeight',\n  markerunits: 'markerUnits',\n  markerwidth: 'markerWidth',\n  maskcontentunits: 'maskContentUnits',\n  maskunits: 'maskUnits',\n  numoctaves: 'numOctaves',\n  pathlength: 'pathLength',\n  patterncontentunits: 'patternContentUnits',\n  patterntransform: 'patternTransform',\n  patternunits: 'patternUnits',\n  pointsatx: 'pointsAtX',\n  pointsaty: 'pointsAtY',\n  pointsatz: 'pointsAtZ',\n  preservealpha: 'preserveAlpha',\n  preserveaspectratio: 'preserveAspectRatio',\n  primitiveunits: 'primitiveUnits',\n  refx: 'refX',\n  refy: 'refY',\n  repeatcount: 'repeatCount',\n  repeatdur: 'repeatDur',\n  requiredextensions: 'requiredExtensions',\n  requiredfeatures: 'requiredFeatures',\n  specularconstant: 'specularConstant',\n  specularexponent: 'specularExponent',\n  spreadmethod: 'spreadMethod',\n  startoffset: 'startOffset',\n  stddeviation: 'stdDeviation',\n  stitchtiles: 'stitchTiles',\n  surfacescale: 'surfaceScale',\n  systemlanguage: 'systemLanguage',\n  tablevalues: 'tableValues',\n  targetx: 'targetX',\n  targety: 'targetY',\n  textlength: 'textLength',\n  viewbox: 'viewBox',\n  viewtarget: 'viewTarget',\n  xchannelselector: 'xChannelSelector',\n  ychannelselector: 'yChannelSelector',\n  zoomandpan: 'zoomAndPan',\n};\n"
  },
  {
    "path": "packages/optimizers/image/.gitignore",
    "content": "*.node\nnative.js\nnative.d.ts\n"
  },
  {
    "path": "packages/optimizers/image/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-image\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"main\": \"lib/ImageOptimizer.js\",\n  \"source\": \"src/ImageOptimizer.js\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"files\": [\n    \"lib\"\n  ],\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@parcel/workers\": \"2.16.4\"\n  },\n  \"peerDependencies\": {\n    \"@parcel/core\": \"^2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/image/src/ImageOptimizer.js",
    "content": "// @flow\nimport path from 'path';\nimport process from 'process';\nimport {Optimizer} from '@parcel/plugin';\nimport {blobToBuffer} from '@parcel/utils';\nimport {md} from '@parcel/diagnostic';\nimport {optimizeImage} from '@parcel/rust';\n\nexport default (new Optimizer({\n  async optimize({bundle, contents, logger}) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents};\n    }\n\n    let buffer = await blobToBuffer(contents);\n\n    // Attempt to optimize it, if the optimize fails we log a warning...\n    try {\n      let optimized = optimizeImage(bundle.type, buffer);\n      return {\n        contents: optimized.length < buffer.length ? optimized : buffer,\n      };\n    } catch (err) {\n      const filepath = bundle.getMainEntry()?.filePath;\n      const filename = filepath\n        ? path.relative(process.cwd(), filepath)\n        : 'unknown';\n      logger.warn({\n        message: md`Could not optimize image ${filename}: ${err.message}`,\n        stack: err.stack,\n      });\n    }\n\n    return {contents: buffer};\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/optimizers/inline-requires/README.md",
    "content": "# EXPERIMENTAL inline requires plugin\n\nThis plugin is currently **experimental** / unstable, however that said it has been used in a very large web application with great success in reducing runtime startup time of the application.\n\n## Quick usage\n\nAdd this optimizer to run _first_ (before minification), for JS bundles.\n\n```json\n{\n  \"optimizers\": {\n    \"*.js\": [\"@parcel/optimizer-inline-requires\", \"...\"]\n  }\n}\n```\n\n## Background and motivation\n\nWhen Parcel produces modules in bundles, where a dependency wasn't brought in by scope hoisting, it includes calls to require those dependencies at the top of the module function. For example, prior to minification, a module might look something like this:\n\n```js\nparcelRegister('abc123', function (require, module, exports) {\n  var $def456 = require('def456');\n  var $ghi789 = require('ghi789');\n\n  exports.someFunction = function () {\n    if ($def456.someOperation()) {\n      return $ghi789.anotherOperation();\n    }\n    return null;\n  };\n});\n```\n\nWhen the module is first initialised (i.e. the \"module factory\" is called), this will get the `def456` and `ghi789` modules, immediately calling their module factories, and so on down. However, the two modules don't have any of their code called until the `someFunction` export is called. If, for example, the call site looks like this:\n\n```js\n// other code..\nvar $abc123 = require('abc123');\nelement.addEventListener('click', () => {\n  element.innerText = $abc123.someFunction();\n});\n```\n\n.. then the code in `abc123` might not be called until much later, or never at all. In a large enough application, the evaluation / execution time of all these factory functions can be noticeable in performance metrics for the application.\n\nWhat this plugin does, is it turns those `require` calls into \"lazy\" or \"deferred\" evaluation requires - that is, the factory function will only be executed when the module is first used. For the first example, the resulting code (pre-minification) will look like this:\n\n```js\nparcelRegister('abc123', function (require, module, exports) {\n  var $def456;\n  var $ghi789;\n\n  exports.someFunction = function () {\n    if ((0, require('def456')).someOperation()) {\n      return (0, require('ghi789')).anotherOperation();\n    }\n    return null;\n  };\n});\n```\n\nThe minifier will remove the uninitialised variables, and it will also simplify the `(0, ...)` sequence expressions where possible.\n\nIt is important to note, that Parcel will only execute the factory function once. Subseqent calls to `require` will return the module as returned from the original factory. See the `require` code in `packages/packagers/js/src/helpers.js` for how this works.\n\n## Caveats\n\n### Overhead\n\nSo the main caveat here is that we're now turning a simple variable access into a function call everytime the module is referenced. For smaller applications, this overhead may not be worth the tradeoff, however for larger applications it might. That's why this plugin is optional, as you need to try it to determine whether or not it works for you.\n\n### Side-effects\n\nA module may have side-effects when it is initialised (e.g. setting an event handler on the `window` for example). For assets that Parcel has identified as having side-effects (whether through `package.json` `sideEffects` field, or other heuristics), these modules will _not_ have their `require` calls deferred.\n"
  },
  {
    "path": "packages/optimizers/inline-requires/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-inline-requires\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/InlineRequires.js\",\n  \"source\": \"src/InlineRequires.js\",\n  \"engines\": {\n    \"node\": \">= 14.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@swc/core\": \"^1.11.24\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/inline-requires/src/InlineRequires.js",
    "content": "// @flow strict-local\nimport {Optimizer} from '@parcel/plugin';\nimport {parse, print} from '@swc/core';\nimport {RequireInliningVisitor} from './RequireInliningVisitor';\nimport nullthrows from 'nullthrows';\nimport SourceMap from '@parcel/source-map';\n\nlet assetPublicIdsWithSideEffects = null;\n\ntype BundleConfig = {|\n  assetPublicIdsWithSideEffects: Set<string>,\n|};\n\n// $FlowFixMe not sure how to anotate the export here to make it work...\nmodule.exports = new Optimizer<empty, BundleConfig>({\n  loadBundleConfig({bundle, bundleGraph, tracer}): BundleConfig {\n    if (assetPublicIdsWithSideEffects !== null) {\n      return {assetPublicIdsWithSideEffects};\n    }\n\n    assetPublicIdsWithSideEffects = new Set<string>();\n\n    if (!bundle.env.shouldOptimize) {\n      return {assetPublicIdsWithSideEffects};\n    }\n\n    const measurement = tracer.createMeasurement(\n      '@parcel/optimizer-inline-requires',\n      'generatePublicIdToAssetSideEffects',\n      bundle.name,\n    );\n\n    bundleGraph.traverse(node => {\n      if (node.type === 'asset' && node.value.sideEffects) {\n        const publicId = bundleGraph.getAssetPublicId(node.value);\n        let sideEffectsMap = nullthrows(assetPublicIdsWithSideEffects);\n        sideEffectsMap.add(publicId);\n      }\n    });\n\n    measurement && measurement.end();\n\n    return {assetPublicIdsWithSideEffects};\n  },\n\n  async optimize({\n    bundle,\n    contents,\n    map: originalMap,\n    tracer,\n    logger,\n    bundleConfig,\n    options,\n  }) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents, map: originalMap};\n    }\n\n    try {\n      let measurement = tracer.createMeasurement(\n        '@parcel/optimizer-inline-requires',\n        'parse',\n        bundle.name,\n      );\n      const ast = await parse(contents.toString());\n      measurement && measurement.end();\n\n      const visitor = new RequireInliningVisitor({\n        bundle,\n        logger,\n        assetPublicIdsWithSideEffects:\n          bundleConfig.assetPublicIdsWithSideEffects,\n      });\n\n      measurement = tracer.createMeasurement(\n        '@parcel/optimizer-inline-requires',\n        'visit',\n        bundle.name,\n      );\n      visitor.visitProgram(ast);\n      measurement && measurement.end();\n\n      if (visitor.dirty) {\n        const measurement = tracer.createMeasurement(\n          '@parcel/optimizer-inline-requires',\n          'print',\n          bundle.name,\n        );\n        const result = await print(ast, {sourceMaps: !!bundle.env.sourceMap});\n        measurement && measurement.end();\n\n        let sourceMap = null;\n        let resultMap = result.map;\n        let contents: string = nullthrows(result.code);\n\n        if (resultMap != null) {\n          sourceMap = new SourceMap(options.projectRoot);\n          sourceMap.addVLQMap(JSON.parse(resultMap));\n          if (originalMap) {\n            sourceMap.extends(originalMap);\n          }\n        }\n\n        return {contents, map: sourceMap};\n      }\n    } catch (err) {\n      logger.warn({\n        origin: 'parcel-optimizer-experimental-inline-requires',\n        message: `Unable to optimise requires for ${bundle.name}: ${err.message}`,\n        stack: err.stack,\n      });\n    }\n    return {contents, map: originalMap};\n  },\n});\n"
  },
  {
    "path": "packages/optimizers/inline-requires/src/RequireInliningVisitor.js",
    "content": "// @flow strict-local\nimport type {NamedBundle, PluginLogger} from '@parcel/types';\n\nimport type {\n  CallExpression,\n  VariableDeclaration,\n  FunctionExpression,\n  ParenthesisExpression,\n  Span,\n  Identifier,\n} from '@swc/core';\nimport {Visitor} from '@swc/core/Visitor';\nimport nullthrows from 'nullthrows';\n\ntype VisitorOpts = {|\n  bundle: NamedBundle,\n  logger: PluginLogger,\n  assetPublicIdsWithSideEffects: Set<string>,\n|};\n\nexport class RequireInliningVisitor extends Visitor {\n  currentModuleNode: null | FunctionExpression;\n  moduleVariables: Set<string>;\n  moduleVariableMap: Map<string, CallExpression>;\n  dirty: boolean;\n  logger: PluginLogger;\n  bundle: NamedBundle;\n  assetPublicIdsWithSideEffects: Set<string>;\n\n  constructor({bundle, logger, assetPublicIdsWithSideEffects}: VisitorOpts) {\n    super();\n    this.currentModuleNode = null;\n    this.moduleVariables = new Set();\n    this.moduleVariableMap = new Map();\n    this.dirty = false;\n    this.logger = logger;\n    this.bundle = bundle;\n    this.assetPublicIdsWithSideEffects = assetPublicIdsWithSideEffects;\n  }\n\n  visitFunctionExpression(n: FunctionExpression): FunctionExpression {\n    // This visitor tries to find module definition functions, these are of the form:\n    //\n    // parcelRequire.register(\"moduleId\", function (require, module, exports) { ... });\n    //\n    // We do this to set the vistior variable `inModuleDefinition` for subsequent visits,\n    // and also reset the module variable tracking data structures.\n    //\n    // (TODO: Support arrow functions if we modify the runtime to output arrow functions)\n    if (\n      n.params.length === 3 &&\n      n.params[0].pat.type === 'Identifier' &&\n      n.params[0].pat.value === 'require' &&\n      n.params[1].pat.type === 'Identifier' &&\n      n.params[1].pat.value === 'module' &&\n      n.params[2].pat.type === 'Identifier' &&\n      n.params[2].pat.value === 'exports'\n    ) {\n      // `inModuleDefinition` is either null, or the module definition node\n      this.currentModuleNode = n;\n      this.moduleVariables = new Set();\n      this.moduleVariableMap = new Map();\n    }\n\n    // Make sure we visit the function itself\n    let result = super.visitFunctionExpression(n);\n\n    // only \"exit\" module definition if we're exiting the module definition node\n    if (n === this.currentModuleNode) {\n      this.currentModuleNode = null;\n    }\n    return result;\n  }\n\n  visitVariableDeclaration(n: VariableDeclaration): VariableDeclaration {\n    // We're looking for variable declarations that look like this:\n    //\n    // `var $acw62 = require(\"acw62\");`\n    let needsReplacement = false;\n    for (let i = 0; i < n.declarations.length; i++) {\n      let decl = n.declarations[i];\n      const init = decl.init;\n      if (!init || init.type !== 'CallExpression') {\n        continue;\n      }\n\n      if (\n        ((init.callee.type === 'Identifier' &&\n          init.callee.value === 'require') ||\n          init.callee.value === 'parcelRequire') &&\n        decl.id.value !== 'parcelHelpers' && // ignore var parcelHelpers = require(\"@parcel/transformer-js/src/esmodule-helpers.js\");\n        init.arguments[0].expression.type === 'StringLiteral' &&\n        typeof decl.id.value === 'string' &&\n        decl.id.value.startsWith('$')\n      ) {\n        const variable = decl.id.value;\n        const assetPublicId = variable.substring(1);\n\n        // We need to determine whether the asset we're require'ing has sideEffects - if it does, we\n        // shouldn't optimise it to an inline require as the side effects need to run immediately\n        //\n        // We need to use the public id of the asset (which is the variable name used for requiring it) in\n        // order to find the asset in the bundle graph, and check whether `asset.sideEffects` is true - in\n        // which case we skip optimising this asset.\n        //\n        // This won't work in dev mode, because the id used to require the asset isn't the public id\n        if (\n          this.assetPublicIdsWithSideEffects &&\n          this.assetPublicIdsWithSideEffects.has(assetPublicId)\n        ) {\n          continue;\n        }\n\n        // The moduleVariableMap contains a mapping from (e.g. $acw62 -> the AST node `require(\"acw62\")`)\n        this.moduleVariableMap.set(variable, init);\n        // The moduleVariables set is just the used set of modules (e.g. `$acw62`)\n        this.moduleVariables.add(variable);\n\n        // Replace this with a null declarator, we'll use the `init` where it's declared.\n        //\n        // This mutates `var $acw62 = require(\"acw62\")` -> `var $acw62 = null`\n        //\n        // The variable will be unused and removed by optimisation\n        decl.init = undefined;\n        needsReplacement = true;\n      } else if (\n        decl.id.type === 'Identifier' &&\n        typeof decl.id.value === 'string' &&\n        decl.id.value.endsWith('Default') &&\n        decl.id.value.startsWith('$')\n      ) {\n        // Handle modules with default values, these look like this in the source:\n        // ```\n        // var _app = require(\"./App\");\n        // var _appDefault = parcelHelpers.interopDefault(_app);\n        // ```\n        //\n        // In this case we want to also put `_appDefault` into the `moduleVariableMap` with the initializer node,\n        // but we want to replace `_app` in there with `require(\"./App\")`.. to summarise, this code will end up looking like:\n        //\n        // ```\n        // var _app = null;\n        // var _appDefault = null;\n        // ```\n        //\n        // .. and where `_appDefault` is used we replace that with `parcelHelpers.interopDefault(require('./App'))`\n        const variable = decl.id.value;\n        const baseId = variable.substring(\n          0,\n          decl.id.value.length - 'Default'.length,\n        );\n        if (!this.moduleVariables.has(baseId)) {\n          continue;\n        }\n        init.arguments[0] = {\n          spread: undefined,\n          expression: nullthrows(this.moduleVariableMap.get(baseId)),\n        };\n        this.moduleVariableMap.set(variable, init);\n        this.moduleVariables.add(variable);\n\n        decl.init = undefined;\n        needsReplacement = true;\n      }\n    }\n    if (!needsReplacement) {\n      return super.visitVariableDeclaration(n);\n    } else {\n      this.dirty = true;\n      return n;\n    }\n  }\n\n  visitIdentifier(n: Identifier): Identifier {\n    // This does the actual replacement - for any identifier within this factory function\n    // that is in the `moduleVariables` list, replace the identifier with the original expression\n    // that was going to be used to initialise the identifier.\n    //\n    // The replacement expression uses the `(0, require(...))` pattern to allow for safe replacement\n    // in any use cases (since we're replacing a variable access with a function call) - the minifier\n    // will take care of optimising this away where possible.\n    //\n    // e.g.\n    // var $abc = require(\"abc\");\n    // console.log($abc.foo());\n    //\n    // becomes\n    //\n    // var $abc;\n    // console.log((0, require(\"abc\")).foo);\n    //\n    if (this.moduleVariables.has(n.value)) {\n      // $FlowFixMe the types don't allow for swapping out the node type here, might need a different approach\n      return this.getReplacementExpression(n.value);\n    }\n    return super.visitIdentifier(n);\n  }\n\n  // Helper function to wrap an existing node in a sequence expression, that is, it\n  // will take a node `n` and return the AST for `(0, n)`\n  //\n  // This ensures that the require call can be correctly used in any context - where\n  // the sequence is redundant, the minifier will optimise it away.\n  getReplacementExpression(id: string): ParenthesisExpression {\n    return {\n      type: 'ParenthesisExpression',\n      span: RequireInliningVisitor.getEmptySpan(),\n      expression: {\n        type: 'SequenceExpression',\n        span: RequireInliningVisitor.getEmptySpan(),\n        expressions: [\n          {\n            type: 'NumericLiteral',\n            span: RequireInliningVisitor.getEmptySpan(),\n            value: 0,\n          },\n          nullthrows(this.moduleVariableMap.get(id)),\n        ],\n      },\n    };\n  }\n\n  static getEmptySpan(): Span {\n    return {start: 0, end: 0, ctxt: 0};\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/inline-requires/test/RequireInliningVisitor.test.js",
    "content": "import {parse, print} from '@swc/core';\nimport {RequireInliningVisitor} from '../src/RequireInliningVisitor';\nimport assert from 'assert';\nimport logger from '@parcel/logger';\n\nasync function testRequireInliningVisitor(src, sideEffects) {\n  const ast = await parse(src, {});\n  const assetPublicIdsWithSideEffects = new Set(sideEffects);\n\n  const visitor = new RequireInliningVisitor({\n    bundle: {\n      name: 'test-bundle',\n    },\n    assetPublicIdsWithSideEffects,\n    logger,\n  });\n  visitor.visitProgram(ast);\n  return (await print(ast)).code;\n}\n\nfunction getModule(body) {\n  return `\n    n.register('def456', function(require, module, exports) {\n        ${body}\n    });\n    `;\n}\n\nfunction normaliseCode(code) {\n  return code\n    .split('\\n')\n    .map(line => line.trim())\n    .join('\\n')\n    .trim();\n}\n\nfunction assertEqualCode(left, right) {\n  assert.equal(normaliseCode(left), normaliseCode(right));\n}\n\ndescribe('InliningVisitor', () => {\n  it('performs basic inlining', async () => {\n    const src = getModule(`\n        var $abc123 = require('abc123');\n        console.log($abc123);`);\n    const result = await testRequireInliningVisitor(src, []);\n    assertEqualCode(\n      result,\n      getModule(`var $abc123;\n      console.log((0, require('abc123')));`),\n    );\n  });\n\n  it('performs module default inlining', async () => {\n    const src = getModule(\n      `var $abc123 = require('abc123');\n        var $abc123Default =  parcelHelpers.interopDefault($abc123);\n        console.log($abc123Default.foo());`,\n    );\n    const expected = getModule(\n      `var $abc123;\n        var $abc123Default;\n        console.log((0, parcelHelpers.interopDefault(require('abc123'))).foo());`,\n    );\n    const result = await testRequireInliningVisitor(src, []);\n    assertEqualCode(result, expected);\n  });\n\n  it('ignores assets with sideEffects', async () => {\n    const src = getModule(`var $abc123 = require('abc123');\n        var $abc456 = require('abc456');\n        console.log($abc123);\n        console.log($abc456);`);\n    const expected = getModule(`var $abc123 = require('abc123');\n        var $abc456;\n        console.log($abc123);\n        console.log((0, require('abc456')));`);\n    const result = await testRequireInliningVisitor(src, ['abc123']);\n    assertEqualCode(result, expected);\n  });\n});\n"
  },
  {
    "path": "packages/optimizers/svg/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-svg\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SVGOptimizer.js\",\n  \"source\": \"src/SVGOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/svg/src/SVGOptimizer.js",
    "content": "// @flow strict-local\nimport {Optimizer} from '@parcel/plugin';\nimport {blobToBuffer, convertSVGOConfig} from '@parcel/utils';\nimport {optimizeSvg} from '@parcel/rust';\n\nexport default (new Optimizer({\n  async loadConfig({config, options}) {\n    let configFile = await config.getConfig([\n      'svgo.config.js',\n      'svgo.config.cjs',\n      'svgo.config.mjs',\n      'svgo.config.json',\n    ]);\n\n    if (configFile) {\n      return convertSVGOConfig(\n        configFile.contents,\n        configFile.filePath,\n        '',\n        options.inputFS,\n        'Use the legacy @parcel/optimizer-svgo instead of @parcel/optimizer-svg if needed.',\n      );\n    }\n  },\n  async optimize({bundle, contents, map, config}) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents, map};\n    }\n\n    let code = await blobToBuffer(contents);\n    let res = optimizeSvg({\n      code,\n      xml: true,\n      config,\n    });\n\n    return {\n      contents: res.code,\n    };\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/optimizers/svgo/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-svgo\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SVGOOptimizer.js\",\n  \"source\": \"src/SVGOOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  },\n  \"devDependencies\": {\n    \"svgo\": \"^3.3.2\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/svgo/src/SVGOOptimizer.js",
    "content": "// @flow\n\nimport {Optimizer} from '@parcel/plugin';\nimport ThrowableDiagnostic, {\n  errorToDiagnostic,\n  md,\n  generateJSONCodeHighlights,\n} from '@parcel/diagnostic';\nimport {blobToString, detectSVGOVersion} from '@parcel/utils';\nimport path from 'path';\n\nexport default (new Optimizer({\n  async loadConfig({config, logger, options}) {\n    let configFile = await config.getConfig([\n      'svgo.config.js',\n      'svgo.config.cjs',\n      'svgo.config.mjs',\n      'svgo.config.json',\n    ]);\n\n    // See if svgo is already installed.\n    let resolved;\n    try {\n      resolved = await options.packageManager.resolve(\n        'svgo',\n        path.join(options.projectRoot, 'index'),\n        {shouldAutoInstall: false},\n      );\n    } catch (err) {\n      // ignore.\n    }\n\n    // If so, use the existing installed version.\n    let version = 3;\n    if (resolved) {\n      if (resolved.pkg?.version) {\n        version = parseInt(resolved.pkg.version);\n      }\n    } else {\n      // Otherwise try to detect the version based on the config file.\n      let v = detectSVGOVersion(configFile?.contents);\n      if (configFile != null && v.version === 2) {\n        logger.warn({\n          message: md`Detected deprecated SVGO v2 options in ${path.relative(\n            process.cwd(),\n            configFile.filePath,\n          )}`,\n          codeFrames: [\n            {\n              filePath: configFile.filePath,\n              codeHighlights:\n                path.extname(configFile.filePath) === '.json'\n                  ? generateJSONCodeHighlights(\n                      await options.inputFS.readFile(\n                        configFile.filePath,\n                        'utf8',\n                      ),\n                      [{key: v.path}],\n                    )\n                  : [],\n            },\n          ],\n        });\n      }\n\n      version = v.version;\n    }\n\n    return {\n      contents: configFile?.contents,\n      version,\n    };\n  },\n\n  async optimize({bundle, contents, config, options}) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents};\n    }\n\n    const svgo = await options.packageManager.require(\n      'svgo',\n      path.join(options.projectRoot, 'index'),\n      {\n        range: `^${config.version}`,\n        saveDev: true,\n        shouldAutoInstall: options.shouldAutoInstall,\n      },\n    );\n\n    let code = await blobToString(contents);\n    let cleanupIds: string = config.version === 2 ? 'cleanupIDs' : 'cleanupIds';\n    let result;\n    try {\n      result = svgo.optimize(code, {\n        plugins: [\n          {\n            name: 'preset-default',\n            params: {\n              overrides: {\n                // Removing ids could break SVG sprites.\n                [cleanupIds]: false,\n                // <style> elements and attributes are already minified before they\n                // are re-inserted by the packager.\n                minifyStyles: false,\n              },\n            },\n          },\n        ],\n        ...config.contents,\n      });\n    } catch (err) {\n      throw errorToDiagnostic(err);\n    }\n\n    // For svgo v2.\n    if (result.error != null) {\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: result.error,\n        },\n      });\n    }\n\n    return {contents: result.data};\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/optimizers/swc/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-swc\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SwcOptimizer.js\",\n  \"source\": \"src/SwcOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@swc/core\": \"^1.11.24\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/swc/src/SwcOptimizer.js",
    "content": "// @flow\n\nimport nullthrows from 'nullthrows';\nimport {transform} from '@swc/core';\nimport {Optimizer} from '@parcel/plugin';\nimport {blobToString, stripAnsi} from '@parcel/utils';\nimport SourceMap from '@parcel/source-map';\nimport ThrowableDiagnostic, {escapeMarkdown} from '@parcel/diagnostic';\nimport path from 'path';\n\nexport default (new Optimizer({\n  async loadConfig({config, options}) {\n    let userConfig = await config.getConfigFrom(\n      path.join(options.projectRoot, 'index'),\n      ['.terserrc', '.terserrc.js', '.terserrc.cjs', '.terserrc.mjs'],\n    );\n\n    return userConfig?.contents;\n  },\n  async optimize({\n    contents,\n    map: originalMap,\n    bundle,\n    config: userConfig,\n    options,\n    getSourceMapReference,\n  }) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents, map: originalMap};\n    }\n\n    let code = await blobToString(contents);\n    let result;\n    try {\n      result = await transform(code, {\n        jsc: {\n          target: 'es2022',\n          minify: {\n            mangle: true,\n            compress: true,\n            ...userConfig,\n            toplevel:\n              bundle.env.outputFormat === 'esmodule' ||\n              bundle.env.outputFormat === 'commonjs',\n            module: bundle.env.outputFormat === 'esmodule',\n          },\n        },\n        isModule: bundle.env.outputFormat === 'esmodule',\n        minify: true,\n        sourceMaps: !!bundle.env.sourceMap,\n        configFile: false,\n        swcrc: false,\n      });\n    } catch (err) {\n      // SWC doesn't give us nice error objects, so we need to parse the message.\n      let message = escapeMarkdown(\n        (\n          stripAnsi(err.message)\n            .split('\\n')\n            .find(line => line.trim().length > 0) || ''\n        )\n          .trim()\n          .replace(/^(×|x)\\s+/, ''),\n      );\n      let location = err.message.match(/(?:╭─|,-)\\[(\\d+):(\\d+)\\]/);\n      if (location) {\n        let line = Number(location[1]);\n        let col = Number(location[1]);\n        let mapping = originalMap?.findClosestMapping(line, col);\n        if (mapping && mapping.original && mapping.source) {\n          let {source, original} = mapping;\n          let filePath = path.resolve(options.projectRoot, source);\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message,\n              origin: '@parcel/optimizer-swc',\n              codeFrames: [\n                {\n                  language: 'js',\n                  filePath,\n                  codeHighlights: [{start: original, end: original}],\n                },\n              ],\n            },\n          });\n        }\n\n        let loc = {\n          line: line,\n          column: col,\n        };\n\n        throw new ThrowableDiagnostic({\n          diagnostic: {\n            message,\n            origin: '@parcel/optimizer-swc',\n            codeFrames: [\n              {\n                language: 'js',\n                filePath: undefined,\n                code,\n                codeHighlights: [{start: loc, end: loc}],\n              },\n            ],\n          },\n        });\n      }\n\n      throw err;\n    }\n\n    let sourceMap = null;\n    let minifiedContents: string = nullthrows(result.code);\n    let resultMap = result.map;\n    if (resultMap) {\n      sourceMap = new SourceMap(options.projectRoot);\n      sourceMap.addVLQMap(JSON.parse(resultMap));\n      if (originalMap) {\n        sourceMap.extends(originalMap);\n      }\n      let sourcemapReference = await getSourceMapReference(sourceMap);\n      if (sourcemapReference) {\n        minifiedContents += `\\n//# sourceMappingURL=${sourcemapReference}\\n`;\n      }\n    }\n\n    return {contents: minifiedContents, map: sourceMap};\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/optimizers/terser/package.json",
    "content": "{\n  \"name\": \"@parcel/optimizer-terser\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/TerserOptimizer.js\",\n  \"source\": \"src/TerserOptimizer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\",\n    \"terser\": \"^5.39.0\"\n  }\n}\n"
  },
  {
    "path": "packages/optimizers/terser/src/TerserOptimizer.js",
    "content": "// @flow\n\nimport nullthrows from 'nullthrows';\nimport {minify} from 'terser';\nimport {Optimizer} from '@parcel/plugin';\nimport {blobToString} from '@parcel/utils';\nimport SourceMap from '@parcel/source-map';\nimport ThrowableDiagnostic, {escapeMarkdown} from '@parcel/diagnostic';\n\nimport path from 'path';\n\nexport default (new Optimizer({\n  async loadConfig({config, options}) {\n    let userConfig = await config.getConfigFrom(\n      path.join(options.projectRoot, 'index'),\n      ['.terserrc', '.terserrc.js', '.terserrc.cjs', '.terserrc.mjs'],\n    );\n\n    return userConfig?.contents;\n  },\n  async optimize({\n    contents,\n    map,\n    bundle,\n    config: userConfig,\n    options,\n    getSourceMapReference,\n  }) {\n    if (!bundle.env.shouldOptimize) {\n      return {contents, map};\n    }\n\n    let code = await blobToString(contents);\n\n    let originalMap = map ? await map.stringify({}) : null;\n    let config = {\n      ...userConfig,\n      sourceMap: bundle.env.sourceMap\n        ? {\n            filename: path.relative(\n              options.projectRoot,\n              path.join(bundle.target.distDir, bundle.name),\n            ),\n            asObject: true,\n            content: originalMap,\n          }\n        : false,\n      toplevel:\n        bundle.env.outputFormat === 'esmodule' ||\n        bundle.env.outputFormat === 'commonjs',\n      module: bundle.env.outputFormat === 'esmodule',\n    };\n\n    let result;\n    try {\n      result = await minify(code, config);\n    } catch (error) {\n      // $FlowFixMe\n      let {message, line, col} = error;\n      if (line != null && col != null) {\n        message = escapeMarkdown(message);\n        let diagnostics = [];\n        let mapping = map?.findClosestMapping(line, col);\n        if (mapping && mapping.original && mapping.source) {\n          let {source, original} = mapping;\n          let filePath = path.resolve(options.projectRoot, source);\n          diagnostics.push({\n            message,\n            origin: '@parcel/optimizer-terser',\n            codeFrames: [\n              {\n                language: 'js',\n                filePath,\n                code: await options.inputFS.readFile(filePath, 'utf8'),\n                codeHighlights: [{message, start: original, end: original}],\n              },\n            ],\n            hints: [\"It's likely that Terser doesn't support this syntax yet.\"],\n          });\n        }\n\n        if (diagnostics.length === 0 || options.logLevel === 'verbose') {\n          let loc = {\n            line: line,\n            column: col,\n          };\n          diagnostics.push({\n            message,\n            origin: '@parcel/optimizer-terser',\n            codeFrames: [\n              {\n                language: 'js',\n                filePath: undefined,\n                code,\n                codeHighlights: [{message, start: loc, end: loc}],\n              },\n            ],\n            hints: [\"It's likely that Terser doesn't support this syntax yet.\"],\n          });\n        }\n        throw new ThrowableDiagnostic({diagnostic: diagnostics});\n      } else {\n        throw error;\n      }\n    }\n\n    let sourceMap = null;\n    let minifiedContents: string = nullthrows(result.code);\n    let resultMap = result.map;\n    if (resultMap && typeof resultMap !== 'string') {\n      sourceMap = new SourceMap(options.projectRoot);\n      sourceMap.addVLQMap(resultMap);\n      let sourcemapReference = await getSourceMapReference(sourceMap);\n      if (sourcemapReference) {\n        minifiedContents += `\\n//# sourceMappingURL=${sourcemapReference}\\n`;\n      }\n    }\n\n    return {contents: minifiedContents, map: sourceMap};\n  },\n}): Optimizer);\n"
  },
  {
    "path": "packages/packagers/css/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-css\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/CSSPackager.js\",\n  \"source\": \"src/CSSPackager.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"lightningcss\": \"^1.30.1\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"lightningcss-wasm\": \"^1.30.1\",\n    \"postcss\": \"^8.5.3\"\n  },\n  \"browser\": {\n    \"lightningcss\": \"lightningcss-wasm\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/css/src/CSSPackager.js",
    "content": "// @flow\n\nimport type {Root} from 'postcss';\nimport type {Asset, Dependency} from '@parcel/types';\nimport typeof PostCSS from 'postcss';\n// $FlowFixMe - init for browser build.\nimport init, {bundleAsync} from 'lightningcss';\n\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport SourceMap from '@parcel/source-map';\nimport {Packager} from '@parcel/plugin';\nimport {convertSourceLocationToHighlight} from '@parcel/diagnostic';\nimport {\n  PromiseQueue,\n  replaceInlineReferences,\n  replaceURLReferences,\n} from '@parcel/utils';\n\nexport default (new Packager({\n  async package({\n    bundle,\n    bundleGraph,\n    getInlineBundleContents,\n    getSourceMapReference,\n    logger,\n    options,\n  }) {\n    // Inline style attributes are parsed differently from full CSS files.\n    if (bundle.bundleBehavior === 'inline') {\n      let entry = bundle.getMainEntry();\n      if (entry?.meta.type === 'attr') {\n        return replaceReferences(\n          bundle,\n          bundleGraph,\n          await entry.getCode(),\n          await entry.getMap(),\n          getInlineBundleContents,\n        );\n      }\n    }\n\n    let queue = new PromiseQueue({\n      maxConcurrent: 32,\n    });\n    let hoistedImports = [];\n    let assetsByPlaceholder = new Map();\n    let entry = null;\n    let entryContents = '';\n\n    bundle.traverse({\n      enter: (node, context) => {\n        if (node.type === 'asset' && !context) {\n          // If there is only one entry, we'll use it directly.\n          // Otherwise, we'll create a fake bundle entry with @import rules for each root asset.\n          if (entry == null) {\n            entry = node.value.id;\n          } else {\n            entry = bundle.id;\n          }\n\n          assetsByPlaceholder.set(node.value.id, node.value);\n          entryContents += `@import \"${node.value.id}\";\\n`;\n        }\n        return true;\n      },\n      exit: node => {\n        if (node.type === 'dependency') {\n          let resolved = bundleGraph.getResolvedAsset(node.value, bundle);\n\n          // Hoist unresolved external dependencies (i.e. http: imports)\n          if (\n            node.value.priority === 'sync' &&\n            !bundleGraph.isDependencySkipped(node.value) &&\n            !resolved\n          ) {\n            hoistedImports.push(node.value.specifier);\n          }\n\n          if (resolved && bundle.hasAsset(resolved)) {\n            assetsByPlaceholder.set(\n              node.value.meta.placeholder ?? node.value.specifier,\n              resolved,\n            );\n          }\n\n          return;\n        }\n\n        let asset = node.value;\n        queue.add(() => {\n          if (\n            !asset.symbols.isCleared &&\n            options.mode === 'production' &&\n            asset.astGenerator?.type === 'postcss'\n          ) {\n            // a CSS Modules asset\n            return processCSSModule(\n              options,\n              logger,\n              bundleGraph,\n              bundle,\n              asset,\n            );\n          } else {\n            return Promise.all([\n              asset,\n              asset.getCode().then((css: string) => {\n                // Replace CSS variable references with resolved symbols.\n                if (asset.meta.hasReferences) {\n                  let replacements = new Map();\n                  for (let dep of asset.getDependencies()) {\n                    for (let [exported, {local}] of dep.symbols) {\n                      let resolved = bundleGraph.getResolvedAsset(dep, bundle);\n                      if (resolved) {\n                        let resolution = bundleGraph.getSymbolResolution(\n                          resolved,\n                          exported,\n                          bundle,\n                        );\n                        if (resolution.symbol) {\n                          replacements.set(local, resolution.symbol);\n                        }\n                      }\n                    }\n                  }\n                  if (replacements.size > 0) {\n                    let regex = new RegExp(\n                      [...replacements.keys()].join('|'),\n                      'g',\n                    );\n                    css = css.replace(regex, m =>\n                      escapeDashedIdent(replacements.get(m) || m),\n                    );\n                  }\n                }\n\n                return css;\n              }),\n              bundle.env.sourceMap ? asset.getMap() : null,\n            ]);\n          }\n        });\n      },\n    });\n\n    let outputs = new Map(\n      (await queue.run()).map(([asset, code, map]) => [asset, [code, map]]),\n    );\n    let map = new SourceMap(options.projectRoot);\n\n    // $FlowFixMe\n    if (process.browser) {\n      await init();\n    }\n\n    let res = await bundleAsync({\n      filename: nullthrows(entry),\n      sourceMap: !!bundle.env.sourceMap,\n      resolver: {\n        resolve(specifier) {\n          return specifier;\n        },\n        async read(file) {\n          if (file === bundle.id) {\n            return entryContents;\n          }\n\n          let asset = assetsByPlaceholder.get(file);\n          if (!asset) {\n            return '';\n          }\n          let [code, map] = nullthrows(outputs.get(asset));\n          if (map) {\n            let sm = await map.stringify({format: 'inline'});\n            invariant(typeof sm === 'string');\n            code += `\\n/*# sourceMappingURL=${sm} */`;\n          }\n          return code;\n        },\n      },\n    });\n\n    let contents = res.code.toString();\n\n    if (res.map) {\n      let vlqMap = JSON.parse(res.map.toString());\n      map.addVLQMap(vlqMap);\n      let reference = await getSourceMapReference(map);\n      if (reference != null) {\n        contents += '/*# sourceMappingURL=' + reference + ' */\\n';\n      }\n    }\n\n    // Prepend hoisted external imports.\n    if (hoistedImports.length > 0) {\n      let lineOffset = 0;\n      let hoistedCode = '';\n      for (let url of hoistedImports) {\n        hoistedCode += `@import \"${url}\";\\n`;\n        lineOffset++;\n      }\n\n      if (bundle.env.sourceMap) {\n        map.offsetLines(1, lineOffset);\n      }\n\n      contents = hoistedCode + contents;\n    }\n\n    return replaceReferences(\n      bundle,\n      bundleGraph,\n      contents,\n      map,\n      getInlineBundleContents,\n    );\n  },\n}): Packager);\n\nfunction replaceReferences(\n  bundle,\n  bundleGraph,\n  contents,\n  map,\n  getInlineBundleContents,\n) {\n  ({contents, map} = replaceURLReferences({\n    bundle,\n    bundleGraph,\n    contents,\n    map,\n    getReplacement: escapeString,\n  }));\n\n  return replaceInlineReferences({\n    bundle,\n    bundleGraph,\n    contents,\n    getInlineBundleContents,\n    getInlineReplacement: (dep, inlineType, contents) => ({\n      from: getSpecifier(dep),\n      to: escapeString(contents),\n    }),\n    map,\n  });\n}\n\nexport function getSpecifier(dep: Dependency): string {\n  if (typeof dep.meta.placeholder === 'string') {\n    return dep.meta.placeholder;\n  }\n\n  return dep.id;\n}\n\nfunction escapeString(contents: string): string {\n  return contents.replace(/([\"\\\\])/g, '\\\\$1');\n}\n\nasync function processCSSModule(\n  options,\n  logger,\n  bundleGraph,\n  bundle,\n  asset,\n): Promise<[Asset, string, ?SourceMap]> {\n  let postcss: PostCSS = await options.packageManager.require(\n    'postcss',\n    options.projectRoot + '/index',\n    {\n      range: '^8.4.5',\n      saveDev: true,\n      shouldAutoInstall: options.shouldAutoInstall,\n    },\n  );\n\n  let ast: Root = postcss.fromJSON(nullthrows((await asset.getAST())?.program));\n\n  let usedSymbols = bundleGraph.getUsedSymbols(asset);\n  if (usedSymbols != null) {\n    let localSymbols = new Set(\n      [...asset.symbols].map(([, {local}]) => `.${local}`),\n    );\n\n    let defaultImport = null;\n    if (usedSymbols.has('default')) {\n      let incoming = bundleGraph.getIncomingDependencies(asset);\n      defaultImport = incoming.find(d => d.symbols.hasExportSymbol('default'));\n      if (defaultImport) {\n        let loc = defaultImport.symbols.get('default')?.loc;\n        logger.warn({\n          message:\n            'CSS modules cannot be tree shaken when imported with a default specifier',\n          ...(loc && {\n            codeFrames: [\n              {\n                filePath: nullthrows(loc?.filePath ?? defaultImport.sourcePath),\n                codeHighlights: [convertSourceLocationToHighlight(loc)],\n              },\n            ],\n          }),\n          hints: [\n            `Instead do: import * as style from \"${defaultImport.specifier}\";`,\n          ],\n          documentationURL: 'https://parceljs.org/languages/css/#tree-shaking',\n        });\n      }\n    }\n\n    if (!defaultImport && !usedSymbols.has('*')) {\n      let usedLocalSymbols = new Set(\n        [...usedSymbols].map(\n          exportSymbol =>\n            `.${nullthrows(asset.symbols.get(exportSymbol)).local}`,\n        ),\n      );\n      ast.walkRules(rule => {\n        if (\n          localSymbols.has(rule.selector) &&\n          !usedLocalSymbols.has(rule.selector)\n        ) {\n          rule.remove();\n        }\n      });\n    }\n  }\n\n  let {content, map} = await postcss().process(ast, {\n    from: undefined,\n    to: options.projectRoot + '/index',\n    map: {\n      annotation: false,\n      inline: false,\n    },\n    // Pass postcss's own stringifier to it to silence its warning\n    // as we don't want to perform any transformations -- only generate\n    stringifier: postcss.stringify,\n  });\n\n  let sourceMap;\n  if (bundle.env.sourceMap && map != null) {\n    sourceMap = new SourceMap(options.projectRoot);\n    sourceMap.addVLQMap(map.toJSON());\n  }\n\n  return [asset, content, sourceMap];\n}\n\nfunction escapeDashedIdent(name) {\n  // https://drafts.csswg.org/cssom/#serialize-an-identifier\n  let res = '';\n  for (let c of name) {\n    let code = c.codePointAt(0);\n    if (code === 0) {\n      res += '\\ufffd';\n    } else if ((code >= 0x1 && code <= 0x1f) || code === 0x7f) {\n      res += '\\\\' + code.toString(16) + ' ';\n    } else if (\n      (code >= 48 /* '0' */ && code <= 57) /* '9' */ ||\n      (code >= 65 /* 'A' */ && code <= 90) /* 'Z' */ ||\n      (code >= 97 /* 'a' */ && code <= 122) /* 'z' */ ||\n      code === 95 /* '_' */ ||\n      code === 45 /* '-' */ ||\n      code & 128 // non-ascii\n    ) {\n      res += c;\n    } else {\n      res += '\\\\' + c;\n    }\n  }\n\n  return res;\n}\n"
  },
  {
    "path": "packages/packagers/html/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-html\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/HTMLPackager.js\",\n  \"source\": \"src/HTMLPackager.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/html/src/HTMLPackager.js",
    "content": "// @flow strict-local\nimport type {BundleGraph, NamedBundle} from '@parcel/types';\n\nimport assert from 'assert';\nimport {Packager} from '@parcel/plugin';\nimport {\n  blobToString,\n  urlJoin,\n  getImportMap,\n  getURLReplacement,\n} from '@parcel/utils';\nimport {\n  packageHtml,\n  type HtmlBundleReference,\n  type HtmlInlineBundle,\n} from '@parcel/rust';\nimport invariant from 'assert';\n\nexport default (new Packager({\n  async package({bundle, bundleGraph, getInlineBundleContents}) {\n    let assets = [];\n    bundle.traverseAssets(asset => {\n      assets.push(asset);\n    });\n\n    assert.equal(assets.length, 1, 'HTML bundles must only contain one asset');\n\n    let asset = assets[0];\n    let code = await asset.getBuffer();\n\n    let {bundles, importMap} = getBundleReferences(bundleGraph, bundle);\n    let inlineBundles = await getInlineBundles(\n      bundleGraph,\n      bundle,\n      getInlineBundleContents,\n    );\n\n    let res = packageHtml({\n      code,\n      xml: bundle.type === 'xhtml',\n      bundles,\n      inlineBundles,\n      importMap,\n    });\n\n    return {contents: res.code};\n  },\n}): Packager);\n\nasync function getInlineBundles(\n  bundleGraph: BundleGraph<NamedBundle>,\n  bundle: NamedBundle,\n  getInlineBundleContents,\n) {\n  let inlineBundles: {|[string]: HtmlInlineBundle|} = {};\n\n  let dependencies = [];\n  bundle.traverse(node => {\n    if (node.type === 'dependency') {\n      dependencies.push(node.value);\n    }\n  });\n\n  for (let dependency of dependencies) {\n    let entryBundle = bundleGraph.getReferencedBundle(dependency, bundle);\n    if (entryBundle?.bundleBehavior === 'inline') {\n      let packagedBundle = await getInlineBundleContents(\n        entryBundle,\n        bundleGraph,\n      );\n      let packagedContents = await blobToString(packagedBundle.contents);\n\n      // Escape closing script tags and HTML comments in JS content.\n      // https://www.w3.org/TR/html52/semantics-scripting.html#restrictions-for-contents-of-script-elements\n      // Avoid replacing </script with <\\/script as it would break the following valid JS: 0</script/ (i.e. regexp literal).\n      // Instead, escape the s character.\n      if (entryBundle.type === 'js') {\n        packagedContents = packagedContents\n          .replace(/<!--/g, '<\\\\!--')\n          .replace(/<\\/(script)/gi, '</\\\\$1');\n      }\n\n      // Escape closing style tags in CSS content.\n      if (entryBundle.type === 'css') {\n        packagedContents = packagedContents.replace(/<\\/(style)/gi, '<\\\\/$1');\n      }\n\n      let placeholder = dependency.meta?.placeholder ?? dependency.id;\n      invariant(typeof placeholder === 'string');\n      inlineBundles[placeholder] = {\n        contents: packagedContents,\n        module: entryBundle.env.outputFormat === 'esmodule',\n      };\n    } else if (dependency.specifierType === 'url') {\n      let placeholder = dependency.meta?.placeholder ?? dependency.id;\n      invariant(typeof placeholder === 'string');\n      inlineBundles[placeholder] = {\n        contents: entryBundle\n          ? getURLReplacement({\n              dependency,\n              fromBundle: bundle,\n              toBundle: entryBundle,\n              relative: false,\n            }).to\n          : dependency.specifier,\n        module: false,\n      };\n    }\n  }\n\n  return inlineBundles;\n}\n\nfunction getBundleReferences(bundleGraph, htmlBundle) {\n  let bundles: HtmlBundleReference[] = [];\n  let importMap = {};\n\n  let useImportMap = htmlBundle.env.supports('import-meta-resolve');\n  let referencedBundles = new Set(bundleGraph.getReferencedBundles(htmlBundle));\n  let nonRecursiveReferencedBundles = new Set(\n    bundleGraph.getReferencedBundles(htmlBundle, {recursive: false}),\n  );\n\n  for (let bundle of referencedBundles) {\n    let isDirectlyReferenced = nonRecursiveReferencedBundles.has(bundle);\n    if (bundle.type === 'css' && !isDirectlyReferenced) {\n      bundles.push({\n        type: 'StyleSheet',\n        value: {\n          href: urlJoin(bundle.target.publicUrl, bundle.name),\n        },\n      });\n    } else if (bundle.type === 'js' && !isDirectlyReferenced) {\n      let nomodule =\n        bundle.env.outputFormat !== 'esmodule' &&\n        bundle.env.sourceType === 'module' &&\n        bundle.env.shouldScopeHoist;\n      bundles.push({\n        type: 'Script',\n        value: {\n          module: bundle.env.outputFormat === 'esmodule',\n          nomodule,\n          src: urlJoin(bundle.target.publicUrl, bundle.name),\n        },\n      });\n    }\n\n    if (useImportMap && bundle.type === 'js') {\n      Object.assign(importMap, getImportMap(bundleGraph, bundle));\n    }\n  }\n\n  if (useImportMap && Object.keys(importMap).length > 0) {\n    for (let id in importMap) {\n      importMap[id] = urlJoin(htmlBundle.target.publicUrl, importMap[id], true);\n    }\n  }\n\n  return {bundles, importMap};\n}\n"
  },
  {
    "path": "packages/packagers/js/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-js\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"globals\": \"^13.24.0\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/js/src/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config\",\n  \"overrides\": [\n    {\n      \"files\": [\"dev-prelude.js\"],\n      \"parser\": \"espree\",\n      \"parserOptions\": {\n        \"ecmaVersion\": 5,\n        \"sourceType\": \"script\"\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": "packages/packagers/js/src/CJSOutputFormat.js",
    "content": "// @flow\nimport type {\n  ScopeHoistingPackager,\n  OutputFormat,\n} from './ScopeHoistingPackager';\n\nexport class CJSOutputFormat implements OutputFormat {\n  packager: ScopeHoistingPackager;\n\n  constructor(packager: ScopeHoistingPackager) {\n    this.packager = packager;\n  }\n\n  buildBundlePrelude(): [string, number] {\n    let res = '';\n    let lines = 0;\n\n    for (let [source, specifiers] of this.packager.externals) {\n      // CJS only supports the namespace symbol. This ensures that all accesses\n      // are live and the `this` binding is correct.\n      let namespace = specifiers.get('*');\n      if (namespace) {\n        res += `var ${namespace} = require(${JSON.stringify(source)});\\n`;\n        lines++;\n      } else {\n        res += `require(${JSON.stringify(source)});\\n`;\n        lines++;\n      }\n    }\n\n    if (res.length > 0) {\n      res += '\\n';\n      lines++;\n    }\n\n    return [res, lines];\n  }\n\n  buildBundlePostlude(): [string, number] {\n    return ['', 0];\n  }\n}\n"
  },
  {
    "path": "packages/packagers/js/src/DevPackager.js",
    "content": "// @flow strict-local\nimport type {BundleGraph, PluginOptions, NamedBundle} from '@parcel/types';\n\nimport {\n  PromiseQueue,\n  relativeBundlePath,\n  countLines,\n  normalizeSeparators,\n  relativePath,\n} from '@parcel/utils';\nimport SourceMap from '@parcel/source-map';\nimport invariant from 'assert';\nimport path from 'path';\nimport fs from 'fs';\nimport {\n  replaceScriptDependencies,\n  getSpecifier,\n  makeValidIdentifier,\n  isValidIdentifier,\n} from './utils';\nimport {helpers} from './helpers';\n\nconst PRELUDE = fs\n  .readFileSync(path.join(__dirname, 'dev-prelude.js'), 'utf8')\n  .trim()\n  .replace(/;$/, '');\n\nexport class DevPackager {\n  options: PluginOptions;\n  bundleGraph: BundleGraph<NamedBundle>;\n  bundle: NamedBundle;\n  parcelRequireName: string;\n\n  constructor(\n    options: PluginOptions,\n    bundleGraph: BundleGraph<NamedBundle>,\n    bundle: NamedBundle,\n    parcelRequireName: string,\n  ) {\n    this.options = options;\n    this.bundleGraph = bundleGraph;\n    this.bundle = bundle;\n    this.parcelRequireName = parcelRequireName;\n  }\n\n  async package(): Promise<{|contents: string, map: ?SourceMap|}> {\n    // Load assets\n    let queue = new PromiseQueue({maxConcurrent: 32});\n    this.bundle.traverseAssets(asset => {\n      queue.add(async () => {\n        let [code, mapBuffer] = await Promise.all([\n          asset.getCode(),\n          this.bundle.env.sourceMap && asset.getMapBuffer(),\n        ]);\n        return {code, mapBuffer};\n      });\n    });\n\n    let results = await queue.run();\n\n    let assets = '';\n    let i = 0;\n    let first = true;\n    let map = new SourceMap(this.options.projectRoot);\n\n    let prefix = this.getPrefix();\n    let lineOffset = countLines(prefix);\n    let script: ?{|code: string, mapBuffer: ?Buffer|} = null;\n    let externals = new Set();\n\n    let usedHelpers = 0;\n    this.bundle.traverse(node => {\n      let wrapped = first ? '' : ',';\n\n      if (node.type === 'dependency') {\n        let resolved = this.bundleGraph.getResolvedAsset(\n          node.value,\n          this.bundle,\n        );\n        if (resolved && resolved.type !== 'js') {\n          // if this is a reference to another javascript asset, we should not include\n          // its output, as its contents should already be loaded.\n          invariant(!this.bundle.hasAsset(resolved));\n          wrapped +=\n            JSON.stringify(this.bundleGraph.getAssetPublicId(resolved)) +\n            ':[function() {},{}]';\n        } else {\n          return;\n        }\n      }\n\n      if (node.type === 'asset') {\n        let asset = node.value;\n        invariant(\n          asset.type === 'js',\n          'all assets in a js bundle must be js assets',\n        );\n\n        if (typeof asset.meta.usedHelpers === 'number') {\n          usedHelpers |= asset.meta.usedHelpers;\n        }\n\n        // If this is the main entry of a script rather than a module, we need to hoist it\n        // outside the bundle wrapper function so that its variables are exposed as globals.\n        if (\n          this.bundle.env.sourceType === 'script' &&\n          asset === this.bundle.getMainEntry()\n        ) {\n          script = results[i++];\n          return;\n        }\n\n        let deps = {};\n        let dependencies = this.bundleGraph.getDependencies(asset);\n        for (let dep of dependencies) {\n          let resolved = this.bundleGraph.getResolvedAsset(dep, this.bundle);\n          let specifier = getSpecifier(dep);\n          if (this.bundleGraph.isDependencySkipped(dep)) {\n            deps[specifier] = false;\n          } else if (resolved) {\n            let assetId = this.bundleGraph.getAssetPublicId(resolved);\n            let resolution = assetId;\n\n            // Dependencies may be re-targeted to follow re-exports.\n            // Pass these re-writes into the prelude.\n            for (let [name, sym] of dep.symbols) {\n              let rewritten = sym.meta?.rewritten;\n              if (typeof rewritten === 'string') {\n                let r =\n                  rewritten === name\n                    ? [rewritten, assetId]\n                    : [rewritten, assetId, name];\n                if (typeof resolution === 'string') {\n                  resolution = [r];\n                } else {\n                  resolution.push(r);\n                }\n              }\n            }\n\n            if (Array.isArray(deps[specifier]) && Array.isArray(resolution)) {\n              deps[specifier].push(...resolution);\n            } else {\n              deps[specifier] = resolution;\n            }\n          } else {\n            // An external module - map placeholder to original specifier.\n            deps[specifier] = dep.specifier;\n            if (\n              this.bundle.env.outputFormat === 'esmodule' &&\n              !dep.isOptional\n            ) {\n              externals.add(dep.specifier);\n            }\n          }\n        }\n\n        // Simplify dependency resolutions when all symbols point to a single asset.\n        for (let specifier in deps) {\n          let resolution = deps[specifier];\n          if (\n            Array.isArray(resolution) &&\n            resolution.length > 0 &&\n            resolution.every(r => r.length === 2 && r[1] === resolution[0][1])\n          ) {\n            deps[specifier] = resolution[0][1];\n          }\n        }\n\n        // Add dependencies for parcelRequire calls added by runtimes\n        // so that the HMR runtime can correctly traverse parents.\n        let hmrDeps = asset.meta.hmrDeps;\n        if (this.options.hmrOptions && Array.isArray(hmrDeps)) {\n          for (let id of hmrDeps) {\n            invariant(typeof id === 'string');\n            deps[id] = id;\n          }\n        }\n\n        let {code, mapBuffer} = results[i];\n        let output = code || '';\n        wrapped +=\n          JSON.stringify(this.bundleGraph.getAssetPublicId(asset)) +\n          ':[function(require,module,exports,__globalThis) {\\n' +\n          output +\n          '\\n},';\n        wrapped += JSON.stringify(deps);\n        wrapped += ']';\n\n        if (\n          this.bundle.env.isNode() &&\n          asset.meta.has_node_replacements === true\n        ) {\n          const relPath = normalizeSeparators(\n            path.relative(\n              this.bundle.target.distDir,\n              path.dirname(asset.filePath),\n            ),\n          );\n          wrapped = wrapped.replace('$parcel$dirnameReplace', relPath);\n          wrapped = wrapped.replace('$parcel$filenameReplace', relPath);\n        }\n\n        if (this.bundle.env.sourceMap) {\n          if (mapBuffer) {\n            map.addBuffer(mapBuffer, lineOffset);\n          } else {\n            map.addEmptyMap(\n              path\n                .relative(this.options.projectRoot, asset.filePath)\n                .replace(/\\\\+/g, '/'),\n              output,\n              lineOffset,\n            );\n          }\n\n          lineOffset += countLines(output) + 1;\n        }\n        i++;\n      }\n\n      assets += wrapped;\n      first = false;\n    });\n\n    let entries = this.bundle.getEntryAssets();\n    let mainEntry = this.bundle.getMainEntry();\n    if (\n      (!this.isEntry() && this.bundle.env.outputFormat !== 'commonjs') ||\n      this.bundle.env.sourceType === 'script'\n    ) {\n      // In async bundles we don't want the main entry to execute until we require it\n      // as there might be dependencies in a sibling bundle that hasn't loaded yet.\n      entries = entries.filter(a => a.id !== mainEntry?.id);\n      mainEntry = null;\n    }\n\n    let load = '';\n    if (usedHelpers & 4) {\n      load += helpers.$parcel$import(this.bundle.env, this.bundle, new Set());\n      load += 'newRequire.load = $parcel$import;\\n';\n    }\n\n    if (usedHelpers & 8) {\n      load += helpers.$parcel$resolve(this.bundle.env, this.bundle, new Set());\n      load += 'newRequire.resolve = $parcel$resolve;\\n';\n    }\n\n    if (usedHelpers & 16) {\n      load += helpers.$parcel$extendImportMap(this.bundle.env);\n      load += `newRequire.extendImportMap = $parcel$extendImportMap;\\n`;\n    }\n\n    if (load) {\n      usedHelpers |= 1 | 2;\n      // Remove newlines to avoid messing up source maps\n      prefix = prefix.replace('// INSERT_LOAD_HERE', load.replace(/\\n/g, ''));\n    }\n\n    let externalImports = '';\n    let externalMap = '{';\n    let e = 0;\n    for (let external of externals) {\n      let name = `__parcelExternal${e++}`;\n      externalImports += `import * as ${name} from ${JSON.stringify(\n        external,\n      )};\\n`;\n      externalMap += `${JSON.stringify(external)}: ${name},`;\n    }\n    externalMap += '}';\n\n    let contents =\n      externalImports +\n      prefix +\n      '({' +\n      assets +\n      '},' +\n      JSON.stringify(\n        entries.map(asset => this.bundleGraph.getAssetPublicId(asset)),\n      ) +\n      ', ' +\n      JSON.stringify(\n        mainEntry ? this.bundleGraph.getAssetPublicId(mainEntry) : null,\n      ) +\n      ', ' +\n      JSON.stringify(this.parcelRequireName) +\n      ', ' +\n      externalMap;\n\n    if (usedHelpers & 1) {\n      // Generate a relative path from this bundle to the root of the dist dir.\n      let distDir = relativePath(path.dirname(this.bundle.name), '');\n      if (!distDir.endsWith('/')) {\n        distDir += '/';\n      }\n      contents += ', ' + JSON.stringify(distDir);\n    } else if (usedHelpers & (2 | 32)) {\n      contents += ', null';\n    }\n\n    if (usedHelpers & 2) {\n      // Ensure the public url always ends with a slash to code can easily join paths to it.\n      let publicUrl = this.bundle.target.publicUrl;\n      if (!publicUrl.endsWith('/')) {\n        publicUrl += '/';\n      }\n      contents += ', ' + JSON.stringify(publicUrl);\n    } else if (usedHelpers & 32) {\n      contents += ', null';\n    }\n\n    if (usedHelpers & 32) {\n      let code = helpers.$parcel$devServer(\n        this.bundle.env,\n        this.bundle,\n        new Set(),\n        this.options,\n      );\n      contents += ', ' + code.slice('var $parcel$devServer = '.length, -2);\n    }\n\n    contents += ')\\n';\n\n    // Add ES module exports from the entry asset.\n    if (\n      this.bundle.env.outputFormat === 'esmodule' &&\n      mainEntry &&\n      (this.bundle.env.isLibrary || !this.bundle.env.isBrowser())\n    ) {\n      let hasNamespace = mainEntry.symbols.hasExportSymbol('*');\n      let importedSymbols = new Map();\n      let exportedSymbols = new Map();\n      for (let {\n        exportAs,\n        symbol,\n        exportSymbol,\n      } of this.bundleGraph.getExportedSymbols(mainEntry)) {\n        if (typeof symbol === 'string') {\n          if (hasNamespace && exportAs !== '*') {\n            continue;\n          }\n\n          if (exportAs === '*') {\n            exportAs = 'default';\n          }\n\n          let id = makeValidIdentifier(exportSymbol);\n          if (id === 'default') {\n            id = '_default';\n          }\n          importedSymbols.set(exportSymbol, id);\n          exportedSymbols.set(exportAs, id);\n        }\n      }\n\n      contents += 'let {';\n      for (let [key, value] of importedSymbols) {\n        contents += isValidIdentifier(key) ? key : JSON.stringify(key);\n        if (value !== key) {\n          contents += ': ';\n          contents += value;\n        }\n        contents += ', ';\n      }\n\n      contents +=\n        '} = ' +\n        this.parcelRequireName +\n        '(' +\n        JSON.stringify(this.bundleGraph.getAssetPublicId(mainEntry)) +\n        ');\\n';\n      contents += 'export {';\n\n      for (let [exportAs, ident] of exportedSymbols) {\n        contents += ident;\n        if (exportAs !== ident) {\n          contents += ' as ';\n          contents += isValidIdentifier(exportAs)\n            ? exportAs\n            : JSON.stringify(exportAs);\n        }\n        contents += ', ';\n      }\n\n      contents += '};\\n';\n    }\n\n    // The entry asset of a script bundle gets hoisted outside the bundle wrapper function\n    // so that its variables become globals. We need to replace any require calls for\n    // runtimes with a parcelRequire call.\n    if (this.bundle.env.sourceType === 'script' && script) {\n      let entryMap;\n      let mapBuffer = script.mapBuffer;\n      if (mapBuffer) {\n        entryMap = new SourceMap(this.options.projectRoot, mapBuffer);\n      }\n      contents += replaceScriptDependencies(\n        this.bundleGraph,\n        this.bundle,\n        script.code,\n        entryMap,\n        this.parcelRequireName,\n      );\n      if (this.bundle.env.sourceMap && entryMap) {\n        map.addSourceMap(entryMap, lineOffset);\n      }\n    }\n\n    return {\n      contents,\n      map,\n    };\n  }\n\n  getPrefix(): string {\n    let interpreter: ?string;\n    let mainEntry = this.bundle.getMainEntry();\n    if (mainEntry && this.isEntry() && !this.bundle.target.env.isBrowser()) {\n      let _interpreter = mainEntry.meta.interpreter;\n      invariant(_interpreter == null || typeof _interpreter === 'string');\n      interpreter = _interpreter;\n    }\n\n    let importScripts = '';\n    if (this.bundle.env.isWorker()) {\n      let bundles = this.bundleGraph.getReferencedBundles(this.bundle);\n      for (let b of bundles) {\n        importScripts += `importScripts(\"${relativeBundlePath(\n          this.bundle,\n          b,\n        )}\");\\n`;\n      }\n    } else if (this.bundle.env.isNode()) {\n      let bundles = this.bundleGraph.getReferencedBundles(this.bundle, {\n        includeInline: false,\n      });\n      for (let b of bundles) {\n        if (b.type !== 'js') {\n          continue;\n        }\n        if (this.bundle.env.outputFormat === 'esmodule') {\n          importScripts += `import \"${relativeBundlePath(this.bundle, b)}\";\\n`;\n        } else {\n          importScripts += `require(\"${relativeBundlePath(\n            this.bundle,\n            b,\n          )}\");\\n`;\n        }\n      }\n    }\n\n    return (\n      // If the entry asset included a hashbang, repeat it at the top of the bundle\n      (interpreter != null ? `#!${interpreter}\\n` : '') +\n      importScripts +\n      PRELUDE\n    );\n  }\n\n  isEntry(): boolean {\n    return (\n      !this.bundleGraph.hasParentBundleOfType(this.bundle, 'js') ||\n      this.bundle.env.isIsolated() ||\n      this.bundle.bundleBehavior === 'isolated'\n    );\n  }\n}\n"
  },
  {
    "path": "packages/packagers/js/src/ESMOutputFormat.js",
    "content": "// @flow\nimport type {\n  ScopeHoistingPackager,\n  OutputFormat,\n} from './ScopeHoistingPackager';\nimport {isValidIdentifier} from './utils';\n\nexport class ESMOutputFormat implements OutputFormat {\n  packager: ScopeHoistingPackager;\n\n  constructor(packager: ScopeHoistingPackager) {\n    this.packager = packager;\n  }\n\n  buildBundlePrelude(): [string, number] {\n    let res = '';\n    let lines = 0;\n    for (let [source, specifiers] of this.packager.externals) {\n      let defaultSpecifier = null;\n      let namespaceSpecifier = null;\n      let namedSpecifiers = [];\n      for (let [imported, symbol] of specifiers) {\n        if (imported === 'default' /* || isCommonJS*/) {\n          defaultSpecifier = symbol;\n        } else if (imported === '*') {\n          namespaceSpecifier = `* as ${symbol}`;\n        } else {\n          let specifier = imported;\n          if (!isValidIdentifier(specifier)) {\n            specifier = JSON.stringify(specifier);\n          }\n          if (symbol !== imported) {\n            specifier += ` as ${symbol}`;\n          }\n\n          namedSpecifiers.push(specifier);\n        }\n      }\n\n      // ESModule syntax allows combining default and namespace specifiers, or default and named, but not all three.\n\n      let imported = '';\n      if (namespaceSpecifier) {\n        let s = namespaceSpecifier;\n        if (defaultSpecifier) {\n          s = `${defaultSpecifier}, ${namespaceSpecifier}`;\n        }\n\n        res += `import ${s} from ${JSON.stringify(source)};\\n`;\n        lines++;\n      } else if (defaultSpecifier) {\n        imported = defaultSpecifier;\n        if (namedSpecifiers.length > 0) {\n          imported += `, {${namedSpecifiers.join(', ')}}`;\n        }\n      } else if (namedSpecifiers.length > 0) {\n        imported = `{${namedSpecifiers.join(', ')}}`;\n      }\n\n      if (imported.length > 0) {\n        res += `import ${imported} from ${JSON.stringify(source)};\\n`;\n        lines++;\n      } else if (!namespaceSpecifier) {\n        res += `import ${JSON.stringify(source)};\\n`;\n        lines++;\n      }\n    }\n\n    if (res.length > 0) {\n      res += '\\n';\n      lines++;\n    }\n\n    return [res, lines];\n  }\n\n  buildBundlePostlude(): [string, number] {\n    let res = '';\n    let lines = 0;\n    let exportSpecifiers = [];\n    for (let {\n      asset,\n      exportSymbol,\n      local,\n      exportAs,\n    } of this.packager.exportedSymbols.values()) {\n      if (this.packager.wrappedAssets.has(asset.id)) {\n        let obj = `parcelRequire(\"${this.packager.bundleGraph.getAssetPublicId(\n          asset,\n        )}\")`;\n        res += `\\nvar ${local} = ${this.packager.getPropertyAccess(\n          obj,\n          exportSymbol,\n        )};`;\n        lines++;\n      }\n\n      for (let as of exportAs) {\n        let specifier = local;\n        if (as !== local) {\n          if (!isValidIdentifier(as)) {\n            as = JSON.stringify(as);\n          }\n          specifier += ` as ${as}`;\n        }\n\n        exportSpecifiers.push(specifier);\n      }\n    }\n\n    if (exportSpecifiers.length > 0) {\n      res += `\\nexport {${exportSpecifiers.join(', ')}};`;\n      lines++;\n    }\n\n    if (\n      this.packager.needsPrelude &&\n      this.packager.shouldBundleQueue(this.packager.bundle)\n    ) {\n      // Should be last thing the bundle executes on intial eval\n      res += `\\n$parcel$global.rlb(${JSON.stringify(\n        this.packager.bundle.publicId,\n      )})`;\n      lines++;\n    }\n\n    return [res, lines];\n  }\n}\n"
  },
  {
    "path": "packages/packagers/js/src/GlobalOutputFormat.js",
    "content": "// @flow\nimport type {\n  ScopeHoistingPackager,\n  OutputFormat,\n} from './ScopeHoistingPackager';\n\nexport class GlobalOutputFormat implements OutputFormat {\n  packager: ScopeHoistingPackager;\n\n  constructor(packager: ScopeHoistingPackager) {\n    this.packager = packager;\n  }\n\n  buildBundlePrelude(): [string, number] {\n    let prelude = this.packager.bundle.env.supports('arrow-functions', true)\n      ? '(() => {\\n'\n      : '(function () {\\n';\n    return [prelude, 1];\n  }\n\n  buildBundlePostlude(): [string, number] {\n    return ['})();', 0];\n  }\n}\n"
  },
  {
    "path": "packages/packagers/js/src/ScopeHoistingPackager.js",
    "content": "// @flow\n\nimport type {\n  Asset,\n  BundleGraph,\n  Dependency,\n  PluginOptions,\n  NamedBundle,\n} from '@parcel/types';\n\nimport {\n  DefaultMap,\n  PromiseQueue,\n  relativeBundlePath,\n  countLines,\n  normalizeSeparators,\n} from '@parcel/utils';\nimport SourceMap from '@parcel/source-map';\nimport nullthrows from 'nullthrows';\nimport invariant, {AssertionError} from 'assert';\nimport ThrowableDiagnostic, {\n  convertSourceLocationToHighlight,\n} from '@parcel/diagnostic';\nimport globals from 'globals';\nimport path from 'path';\n\nimport {ESMOutputFormat} from './ESMOutputFormat';\nimport {CJSOutputFormat} from './CJSOutputFormat';\nimport {GlobalOutputFormat} from './GlobalOutputFormat';\nimport {prelude, helpers, bundleQueuePrelude, fnExpr} from './helpers';\nimport {\n  replaceScriptDependencies,\n  getSpecifier,\n  isValidIdentifier,\n  makeValidIdentifier,\n} from './utils';\n// General regex used to replace imports with the resolved code, references with resolutions,\n// and count the number of newlines in the file for source maps.\nconst REPLACEMENT_RE =\n  /\\n|import\\s+\"([0-9a-f]{16}:.+?)\";|(?:\\$[0-9a-f]{16}\\$exports)|(?:\\$[0-9a-f]{16}\\$(?:import|importAsync|require)\\$[0-9a-f]+(?:\\$[0-9a-f]+)?)/g;\n\nconst BUILTINS = Object.keys(globals.builtin);\nconst BROWSER_BUILTINS = new Set([\n  ...BUILTINS,\n  ...Object.keys(globals.browser),\n]);\nconst NODE_BUILTINS = new Set([...BUILTINS, ...Object.keys(globals.node)]);\nconst GLOBALS_BY_CONTEXT = {\n  browser: BROWSER_BUILTINS,\n  'react-client': BROWSER_BUILTINS,\n  'web-worker': new Set([...BUILTINS, ...Object.keys(globals.worker)]),\n  'service-worker': new Set([\n    ...BUILTINS,\n    ...Object.keys(globals.serviceworker),\n  ]),\n  worklet: new Set([...BUILTINS]),\n  node: NODE_BUILTINS,\n  'electron-main': NODE_BUILTINS,\n  'electron-renderer': new Set([\n    ...BUILTINS,\n    ...Object.keys(globals.node),\n    ...Object.keys(globals.browser),\n  ]),\n  'react-server': NODE_BUILTINS,\n};\n\nconst OUTPUT_FORMATS = {\n  esmodule: ESMOutputFormat,\n  commonjs: CJSOutputFormat,\n  global: GlobalOutputFormat,\n};\n\nexport interface OutputFormat {\n  buildBundlePrelude(): [string, number];\n  buildBundlePostlude(): [string, number];\n}\n\nexport class ScopeHoistingPackager {\n  options: PluginOptions;\n  bundleGraph: BundleGraph<NamedBundle>;\n  bundle: NamedBundle;\n  parcelRequireName: string;\n  useAsyncBundleRuntime: boolean;\n  outputFormat: OutputFormat;\n  isAsyncBundle: boolean;\n  globalNames: $ReadOnlySet<string>;\n  assetOutputs: Map<string, {|code: string, map: ?Buffer|}>;\n  exportedSymbols: Map<\n    string,\n    {|\n      asset: Asset,\n      exportSymbol: string,\n      local: string,\n      exportAs: Array<string>,\n    |},\n  > = new Map();\n  externals: Map<string, Map<string, string>> = new Map();\n  topLevelNames: Map<string, number> = new Map();\n  seenAssets: Set<string> = new Set();\n  wrappedAssets: Set<string> = new Set();\n  hoistedRequires: Map<string, Map<string, string>> = new Map();\n  needsPrelude: boolean = false;\n  usedHelpers: Set<string> = new Set();\n  externalAssets: Set<Asset> = new Set();\n\n  constructor(\n    options: PluginOptions,\n    bundleGraph: BundleGraph<NamedBundle>,\n    bundle: NamedBundle,\n    parcelRequireName: string,\n    useAsyncBundleRuntime: boolean,\n  ) {\n    this.options = options;\n    this.bundleGraph = bundleGraph;\n    this.bundle = bundle;\n    this.parcelRequireName = parcelRequireName;\n    this.useAsyncBundleRuntime = useAsyncBundleRuntime;\n\n    let OutputFormat = OUTPUT_FORMATS[this.bundle.env.outputFormat];\n    this.outputFormat = new OutputFormat(this);\n\n    this.isAsyncBundle =\n      this.bundleGraph.hasParentBundleOfType(this.bundle, 'js') &&\n      !this.bundle.env.isIsolated() &&\n      this.bundle.bundleBehavior !== 'isolated';\n\n    this.globalNames = GLOBALS_BY_CONTEXT[bundle.env.context];\n  }\n\n  async package(): Promise<{|contents: string, map: ?SourceMap|}> {\n    let wrappedAssets = await this.loadAssets();\n    this.buildExportedSymbols();\n\n    // If building a library, the target is actually another bundler rather\n    // than the final output that could be loaded in a browser. So, loader\n    // runtimes are excluded, and instead we add imports into the entry bundle\n    // of each bundle group pointing at the sibling bundles. These can be\n    // picked up by another bundler later at which point runtimes will be added.\n    if (\n      this.bundle.env.isLibrary ||\n      this.bundle.env.outputFormat === 'commonjs' ||\n      (this.bundle.env.outputFormat === 'esmodule' && !this.isAsyncBundle)\n    ) {\n      for (let b of this.bundleGraph.getReferencedBundles(this.bundle, {\n        recursive: false,\n      })) {\n        if (this.bundle.env.isLibrary || b.type === 'js') {\n          this.externals.set(relativeBundlePath(this.bundle, b), new Map());\n        }\n      }\n    }\n\n    let res = '';\n    let lineCount = 0;\n    let sourceMap = null;\n    let processAsset = asset => {\n      let [content, map, lines] = this.visitAsset(asset);\n      if (sourceMap && map) {\n        sourceMap.addSourceMap(map, lineCount);\n      } else if (this.bundle.env.sourceMap) {\n        sourceMap = map;\n      }\n\n      res += content + '\\n';\n      lineCount += lines + 1;\n    };\n\n    // Hoist wrapped asset to the top of the bundle to ensure that they are registered\n    // before they are used.\n    for (let asset of wrappedAssets) {\n      if (!this.seenAssets.has(asset.id)) {\n        processAsset(asset);\n      }\n    }\n\n    // Add each asset that is directly connected to the bundle. Dependencies will be handled\n    // by replacing `import` statements in the code.\n    this.bundle.traverseAssets((asset, _, actions) => {\n      if (this.seenAssets.has(asset.id)) {\n        actions.skipChildren();\n        return;\n      }\n\n      processAsset(asset);\n      actions.skipChildren();\n    });\n\n    let [prelude, preludeLines] = this.buildBundlePrelude();\n    res = prelude + res;\n    lineCount += preludeLines;\n    sourceMap?.offsetLines(1, preludeLines);\n\n    let entries = this.bundle.getEntryAssets();\n    let mainEntry = this.bundle.getMainEntry();\n    if (this.isAsyncBundle) {\n      // In async bundles we don't want the main entry to execute until we require it\n      // as there might be dependencies in a sibling bundle that hasn't loaded yet.\n      entries = entries.filter(a => a.id !== mainEntry?.id);\n      mainEntry = null;\n    }\n\n    let needsBundleQueue = this.shouldBundleQueue(this.bundle);\n\n    // If any of the entry assets are wrapped, call parcelRequire so they are executed.\n    for (let entry of entries) {\n      if (this.wrappedAssets.has(entry.id) && !this.isScriptEntry(entry)) {\n        let parcelRequire = `parcelRequire(${JSON.stringify(\n          this.bundleGraph.getAssetPublicId(entry),\n        )});\\n`;\n\n        let entryExports = entry.symbols.get('*')?.local;\n\n        if (\n          entryExports &&\n          entry === mainEntry &&\n          this.exportedSymbols.has(entryExports)\n        ) {\n          invariant(\n            !needsBundleQueue,\n            'Entry exports are not yet compaitble with async bundles',\n          );\n          res += `\\nvar ${entryExports} = ${parcelRequire}`;\n        } else {\n          if (needsBundleQueue) {\n            parcelRequire = this.runWhenReady(this.bundle, parcelRequire);\n          }\n\n          res += `\\n${parcelRequire}`;\n        }\n\n        lineCount += 2;\n      }\n    }\n\n    let [postlude, postludeLines] = this.outputFormat.buildBundlePostlude();\n    res += postlude;\n    lineCount += postludeLines;\n\n    // The entry asset of a script bundle gets hoisted outside the bundle wrapper so that\n    // its top-level variables become globals like a real browser script. We need to replace\n    // all dependency references for runtimes with a parcelRequire call.\n    if (\n      this.bundle.env.outputFormat === 'global' &&\n      this.bundle.env.sourceType === 'script'\n    ) {\n      res += '\\n';\n      lineCount++;\n\n      let mainEntry = nullthrows(this.bundle.getMainEntry());\n      let {code, map: mapBuffer} = nullthrows(\n        this.assetOutputs.get(mainEntry.id),\n      );\n      let map;\n      if (mapBuffer) {\n        map = new SourceMap(this.options.projectRoot, mapBuffer);\n      }\n      res += replaceScriptDependencies(\n        this.bundleGraph,\n        this.bundle,\n        code,\n        map,\n        this.parcelRequireName,\n      );\n      if (sourceMap && map) {\n        sourceMap.addSourceMap(map, lineCount);\n      }\n    }\n\n    return {\n      contents: res,\n      map: sourceMap,\n    };\n  }\n\n  shouldBundleQueue(bundle: NamedBundle): boolean {\n    let referencingBundles = this.bundleGraph.getReferencingBundles(bundle);\n    let hasHtmlReference = referencingBundles.some(b => b.type === 'html');\n\n    return (\n      this.useAsyncBundleRuntime &&\n      bundle.type === 'js' &&\n      bundle.bundleBehavior !== 'inline' &&\n      bundle.env.outputFormat === 'esmodule' &&\n      !bundle.env.isIsolated() &&\n      bundle.bundleBehavior !== 'isolated' &&\n      hasHtmlReference\n    );\n  }\n\n  runWhenReady(bundle: NamedBundle, codeToRun: string): string {\n    let deps = this.bundleGraph\n      .getReferencedBundles(bundle)\n      .filter(b => this.shouldBundleQueue(b))\n      .map(b => b.publicId);\n\n    if (deps.length === 0) {\n      // If no deps we can safely execute immediately\n      return codeToRun;\n    }\n\n    let params = [\n      JSON.stringify(this.bundle.publicId),\n      fnExpr(this.bundle.env, [], [codeToRun]),\n      JSON.stringify(deps),\n    ];\n\n    return `$parcel$global.rwr(${params.join(', ')});`;\n  }\n\n  async loadAssets(): Promise<Array<Asset>> {\n    let queue = new PromiseQueue({maxConcurrent: 32});\n    let wrapped = [];\n    this.bundle.traverseAssets(asset => {\n      queue.add(async () => {\n        let [code, map] = await Promise.all([\n          asset.getCode(),\n          this.bundle.env.sourceMap ? asset.getMapBuffer() : null,\n        ]);\n        return [asset.id, {code, map}];\n      });\n\n      if (\n        asset.meta.shouldWrap ||\n        this.bundle.env.sourceType === 'script' ||\n        this.bundleGraph.isAssetReferenced(this.bundle, asset) ||\n        this.bundleGraph\n          .getIncomingDependencies(asset)\n          .some(dep => dep.meta.shouldWrap && dep.specifierType !== 'url')\n      ) {\n        // Don't wrap constant \"entry\" modules _except_ if they are referenced by any lazy dependency\n        if (\n          !asset.meta.isConstantModule ||\n          this.bundleGraph\n            .getIncomingDependencies(asset)\n            .some(dep => dep.priority === 'lazy')\n        ) {\n          this.wrappedAssets.add(asset.id);\n          wrapped.push(asset);\n        }\n      }\n    });\n\n    for (let wrappedAssetRoot of [...wrapped]) {\n      this.bundle.traverseAssets((asset, _, actions) => {\n        if (asset === wrappedAssetRoot) {\n          return;\n        }\n\n        if (this.wrappedAssets.has(asset.id)) {\n          actions.skipChildren();\n          return;\n        }\n        if (!asset.meta.isConstantModule) {\n          this.wrappedAssets.add(asset.id);\n          wrapped.push(asset);\n        }\n      }, wrappedAssetRoot);\n    }\n\n    this.assetOutputs = new Map(await queue.run());\n    return wrapped;\n  }\n\n  buildExportedSymbols() {\n    if (\n      (!this.bundle.env.isLibrary && this.bundle.env.isBrowser()) ||\n      this.bundle.env.outputFormat !== 'esmodule'\n    ) {\n      return;\n    }\n\n    // TODO: handle ESM exports of wrapped entry assets...\n    let entry = this.bundle.getMainEntry();\n    if (entry && !this.wrappedAssets.has(entry.id)) {\n      let hasNamespace = entry.symbols.hasExportSymbol('*');\n\n      for (let {\n        asset,\n        exportAs,\n        symbol,\n        exportSymbol,\n      } of this.bundleGraph.getExportedSymbols(entry)) {\n        if (typeof symbol === 'string') {\n          // If the module has a namespace (e.g. commonjs), and this is not an entry, only export the namespace\n          // as default, without individual exports. This mirrors the importing logic in addExternal, avoiding\n          // extra unused exports and potential for non-identifier export names.\n          if (\n            hasNamespace &&\n            !this.bundle.needsStableName &&\n            exportAs !== '*'\n          ) {\n            continue;\n          }\n\n          let symbols = this.exportedSymbols.get(\n            symbol === '*' ? nullthrows(entry.symbols.get('*')?.local) : symbol,\n          )?.exportAs;\n\n          if (!symbols) {\n            symbols = [];\n            this.exportedSymbols.set(symbol, {\n              asset,\n              exportSymbol,\n              local: symbol,\n              exportAs: symbols,\n            });\n          }\n\n          if (exportAs === '*') {\n            exportAs = 'default';\n          }\n\n          symbols.push(exportAs);\n        } else if (symbol === null) {\n          // TODO `meta.exportsIdentifier[exportSymbol]` should be exported\n          // let relativePath = relative(options.projectRoot, asset.filePath);\n          // throw getThrowableDiagnosticForNode(\n          //   md`${relativePath} couldn't be statically analyzed when importing '${exportSymbol}'`,\n          //   entry.filePath,\n          //   loc,\n          // );\n        } else if (symbol !== false) {\n          // let relativePath = relative(options.projectRoot, asset.filePath);\n          // throw getThrowableDiagnosticForNode(\n          //   md`${relativePath} does not export '${exportSymbol}'`,\n          //   entry.filePath,\n          //   loc,\n          // );\n        }\n      }\n    }\n  }\n\n  getTopLevelName(name: string): string {\n    name = makeValidIdentifier(name);\n    if (this.globalNames.has(name)) {\n      name = '_' + name;\n    }\n\n    let count = this.topLevelNames.get(name);\n    if (count == null) {\n      this.topLevelNames.set(name, 1);\n      return name;\n    }\n\n    this.topLevelNames.set(name, count + 1);\n    return name + count;\n  }\n\n  getPropertyAccess(obj: string, property: string): string {\n    if (isValidIdentifier(property)) {\n      return `${obj}.${property}`;\n    }\n\n    return `${obj}[${JSON.stringify(property)}]`;\n  }\n\n  visitAsset(asset: Asset): [string, ?SourceMap, number] {\n    invariant(!this.seenAssets.has(asset.id), 'Already visited asset');\n    this.seenAssets.add(asset.id);\n\n    let {code, map} = nullthrows(this.assetOutputs.get(asset.id));\n    return this.buildAsset(asset, code, map);\n  }\n\n  buildAsset(\n    asset: Asset,\n    code: string,\n    map: ?Buffer,\n  ): [string, ?SourceMap, number] {\n    let shouldWrap = this.wrappedAssets.has(asset.id);\n    let deps = this.bundleGraph.getDependencies(asset);\n\n    let sourceMap =\n      this.bundle.env.sourceMap && map\n        ? new SourceMap(this.options.projectRoot, map)\n        : null;\n\n    // If this asset is skipped, just add dependencies and not the asset's content.\n    if (this.shouldSkipAsset(asset)) {\n      let depCode = '';\n      let lineCount = 0;\n      for (let dep of deps) {\n        let resolved = this.bundleGraph.getResolvedAsset(dep, this.bundle);\n        let skipped = this.bundleGraph.isDependencySkipped(dep);\n        if (skipped) {\n          continue;\n        }\n\n        if (!resolved) {\n          if (!dep.isOptional) {\n            this.addExternal(dep);\n          }\n\n          continue;\n        }\n\n        if (\n          this.bundle.hasAsset(resolved) &&\n          !this.seenAssets.has(resolved.id)\n        ) {\n          let [code, map, lines] = this.visitAsset(resolved);\n          depCode += code + '\\n';\n          if (sourceMap && map) {\n            sourceMap.addSourceMap(map, lineCount);\n          }\n          lineCount += lines + 1;\n        }\n      }\n\n      return [depCode, sourceMap, lineCount];\n    }\n\n    // TODO: maybe a meta prop?\n    if (code.includes('$parcel$global')) {\n      this.usedHelpers.add('$parcel$global');\n    }\n\n    let usedHelpers = asset.meta.usedHelpers;\n    if (typeof usedHelpers === 'number') {\n      if (usedHelpers & 1) {\n        this.usedHelpers.add('$parcel$distDir');\n      }\n      if (usedHelpers & 2) {\n        this.usedHelpers.add('$parcel$publicUrl');\n      }\n      if (usedHelpers & 4) {\n        this.needsPrelude = true;\n        this.usedHelpers.add('$parcel$import');\n      }\n      if (usedHelpers & 8) {\n        this.needsPrelude = true;\n        this.usedHelpers.add('$parcel$resolve');\n      }\n      if (usedHelpers & 16) {\n        this.needsPrelude = true;\n        this.usedHelpers.add('$parcel$extendImportMap');\n      }\n      if (usedHelpers & 32) {\n        this.usedHelpers.add('$parcel$devServer');\n      }\n    }\n\n    if (this.bundle.env.isNode() && asset.meta.has_node_replacements) {\n      const relPath = normalizeSeparators(\n        path.relative(this.bundle.target.distDir, path.dirname(asset.filePath)),\n      );\n      code = code.replace('$parcel$dirnameReplace', relPath);\n      code = code.replace('$parcel$filenameReplace', relPath);\n    }\n\n    let [depMap, replacements] = this.buildReplacements(asset, deps);\n    let [prepend, prependLines, append] = this.buildAssetPrelude(\n      asset,\n      deps,\n      replacements,\n    );\n    if (prependLines > 0) {\n      sourceMap?.offsetLines(1, prependLines);\n      code = prepend + code;\n    }\n\n    code += append;\n\n    let lineCount = 0;\n    let depContent = [];\n    if (depMap.size === 0 && replacements.size === 0) {\n      // If there are no dependencies or replacements, use a simple function to count the number of lines.\n      lineCount = countLines(code) - 1;\n    } else {\n      // Otherwise, use a regular expression to perform replacements.\n      // We need to track how many newlines there are for source maps, replace\n      // all import statements with dependency code, and perform inline replacements\n      // of all imported symbols with their resolved export symbols. This is all done\n      // in a single regex so that we only do one pass over the whole code.\n      let offset = 0;\n      let columnStartIndex = 0;\n      code = code.replace(REPLACEMENT_RE, (m, d, i) => {\n        if (m === '\\n') {\n          columnStartIndex = i + offset + 1;\n          lineCount++;\n          return '\\n';\n        }\n\n        // If we matched an import, replace with the source code for the dependency.\n        if (d != null) {\n          let deps = depMap.get(d);\n          if (!deps) {\n            return m;\n          }\n\n          let replacement = '';\n\n          // A single `${id}:${specifier}:esm` might have been resolved to multiple assets due to\n          // reexports.\n          for (let dep of deps) {\n            let resolved = this.bundleGraph.getResolvedAsset(dep, this.bundle);\n            let skipped = this.bundleGraph.isDependencySkipped(dep);\n            if (resolved && !skipped) {\n              // Hoist variable declarations for the referenced parcelRequire dependencies\n              // after the dependency is declared. This handles the case where the resulting asset\n              // is wrapped, but the dependency in this asset is not marked as wrapped. This means\n              // that it was imported/required at the top-level, so its side effects should run immediately.\n              let [res, lines] = this.getHoistedParcelRequires(\n                asset,\n                dep,\n                resolved,\n              );\n              let map;\n              if (\n                this.bundle.hasAsset(resolved) &&\n                !this.seenAssets.has(resolved.id)\n              ) {\n                // If this asset is wrapped, we need to hoist the code for the dependency\n                // outside our parcelRequire.register wrapper. This is safe because all\n                // assets referenced by this asset will also be wrapped. Otherwise, inline the\n                // asset content where the import statement was.\n                if (shouldWrap) {\n                  depContent.push(this.visitAsset(resolved));\n                } else {\n                  let [depCode, depMap, depLines] = this.visitAsset(resolved);\n                  res = depCode + '\\n' + res;\n                  lines += 1 + depLines;\n                  map = depMap;\n                }\n              }\n\n              // Push this asset's source mappings down by the number of lines in the dependency\n              // plus the number of hoisted parcelRequires. Then insert the source map for the dependency.\n              if (sourceMap) {\n                if (lines > 0) {\n                  sourceMap.offsetLines(lineCount + 1, lines);\n                }\n\n                if (map) {\n                  sourceMap.addSourceMap(map, lineCount);\n                }\n              }\n\n              replacement += res;\n              lineCount += lines;\n            }\n          }\n          return replacement;\n        }\n\n        // If it wasn't a dependency, then it was an inline replacement (e.g. $id$import$foo -> $id$export$foo).\n        let replacement = replacements.get(m) ?? m;\n        if (sourceMap) {\n          // Offset the source map columns for this line if the replacement was a different length.\n          // This assumes that the match and replacement both do not contain any newlines.\n          let lengthDifference = replacement.length - m.length;\n          if (lengthDifference !== 0) {\n            sourceMap.offsetColumns(\n              lineCount + 1,\n              i + offset - columnStartIndex + m.length,\n              lengthDifference,\n            );\n            offset += lengthDifference;\n          }\n        }\n        return replacement;\n      });\n    }\n\n    // If the asset is wrapped, we need to insert the dependency code outside the parcelRequire.register\n    // wrapper. Dependencies must be inserted AFTER the asset is registered so that circular dependencies work.\n    if (shouldWrap) {\n      // Offset by one line for the parcelRequire.register wrapper.\n      sourceMap?.offsetLines(1, 1);\n      lineCount++;\n\n      code = `parcelRegister(${JSON.stringify(\n        this.bundleGraph.getAssetPublicId(asset),\n      )}, function(module, exports) {\n${code}\n});\n`;\n\n      lineCount += 2;\n\n      for (let [depCode, map, lines] of depContent) {\n        if (!depCode) continue;\n        code += depCode + '\\n';\n        if (sourceMap && map) {\n          sourceMap.addSourceMap(map, lineCount);\n        }\n        lineCount += lines + 1;\n      }\n\n      this.needsPrelude = true;\n    }\n\n    if (\n      !shouldWrap &&\n      this.shouldBundleQueue(this.bundle) &&\n      this.bundle.getEntryAssets().some(entry => entry.id === asset.id)\n    ) {\n      code = this.runWhenReady(this.bundle, code);\n    }\n\n    return [code, sourceMap, lineCount];\n  }\n\n  buildReplacements(\n    asset: Asset,\n    deps: Array<Dependency>,\n  ): [Map<string, Array<Dependency>>, Map<string, string>] {\n    let assetId = asset.meta.id;\n    invariant(typeof assetId === 'string');\n\n    // Build two maps: one of import specifiers, and one of imported symbols to replace.\n    // These will be used to build a regex below.\n    let depMap = new DefaultMap<string, Array<Dependency>>(() => []);\n    let replacements = new Map();\n    for (let dep of deps) {\n      let specifierType =\n        dep.specifierType === 'esm' ? `:${dep.specifierType}` : '';\n      depMap\n        .get(\n          `${assetId}:${getSpecifier(dep)}${\n            !dep.meta.placeholder ? specifierType : ''\n          }`,\n        )\n        .push(dep);\n\n      let asyncResolution = this.bundleGraph.resolveAsyncDependency(\n        dep,\n        this.bundle,\n      );\n      let resolved =\n        asyncResolution?.type === 'asset'\n          ? // Prefer the underlying asset over a runtime to load it. It will\n            // be wrapped in Promise.resolve() later.\n            asyncResolution.value\n          : this.bundleGraph.getResolvedAsset(dep, this.bundle);\n      if (\n        !resolved &&\n        !dep.isOptional &&\n        !this.bundleGraph.isDependencySkipped(dep)\n      ) {\n        this.addExternal(dep, replacements);\n      }\n\n      if (!resolved) {\n        continue;\n      }\n\n      // Handle imports from other bundles in libraries.\n      if (this.bundle.env.isLibrary && !this.bundle.hasAsset(resolved)) {\n        let referencedBundle = this.bundleGraph.getReferencedBundle(\n          dep,\n          this.bundle,\n        );\n        if (\n          referencedBundle &&\n          referencedBundle.getMainEntry() === resolved &&\n          referencedBundle.type === 'js' &&\n          !this.bundleGraph.isAssetReferenced(referencedBundle, resolved)\n        ) {\n          this.addExternal(dep, replacements, referencedBundle);\n          this.externalAssets.add(resolved);\n          continue;\n        }\n      }\n\n      for (let [imported, {local}] of dep.symbols) {\n        if (local === '*') {\n          continue;\n        }\n\n        let symbol = this.getSymbolResolution(asset, resolved, imported, dep);\n        replacements.set(\n          local,\n          // If this was an internalized async asset, wrap in a Promise.resolve.\n          asyncResolution?.type === 'asset'\n            ? `Promise.resolve(${symbol})`\n            : symbol,\n        );\n      }\n\n      // Async dependencies need a namespace object even if all used symbols were statically analyzed.\n      // This is recorded in the promiseSymbol meta property set by the transformer rather than in\n      // symbols so that we don't mark all symbols as used.\n      if (dep.priority === 'lazy' && dep.meta.promiseSymbol) {\n        let promiseSymbol = dep.meta.promiseSymbol;\n        invariant(typeof promiseSymbol === 'string');\n        let symbol = this.getSymbolResolution(asset, resolved, '*', dep);\n        replacements.set(\n          promiseSymbol,\n          asyncResolution?.type === 'asset'\n            ? `Promise.resolve(${symbol})`\n            : symbol,\n        );\n      }\n    }\n\n    // If this asset is wrapped, we need to replace the exports namespace with `module.exports`,\n    // which will be provided to us by the wrapper.\n    if (\n      this.wrappedAssets.has(asset.id) ||\n      (this.bundle.env.outputFormat === 'commonjs' &&\n        asset === this.bundle.getMainEntry())\n    ) {\n      let exportsName = asset.symbols.get('*')?.local || `$${assetId}$exports`;\n      replacements.set(exportsName, 'module.exports');\n    }\n\n    return [depMap, replacements];\n  }\n\n  addExternal(\n    dep: Dependency,\n    replacements?: Map<string, string>,\n    referencedBundle?: NamedBundle,\n  ) {\n    if (this.bundle.env.outputFormat === 'global') {\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message:\n            'External modules are not supported when building for browser',\n          codeFrames: [\n            {\n              filePath: nullthrows(dep.sourcePath),\n              codeHighlights: dep.loc\n                ? [convertSourceLocationToHighlight(dep.loc)]\n                : [],\n            },\n          ],\n        },\n      });\n    }\n\n    let specifier = dep.specifier;\n    if (referencedBundle) {\n      specifier = relativeBundlePath(this.bundle, referencedBundle);\n    }\n\n    // Map of DependencySpecifier -> Map<ExportedSymbol, Identifier>>\n    let external = this.externals.get(specifier);\n    if (!external) {\n      external = new Map();\n      this.externals.set(specifier, external);\n    }\n\n    for (let [imported, {local}] of dep.symbols) {\n      // If already imported, just add the already renamed variable to the mapping.\n      let renamed = external.get(imported);\n      if (renamed && local !== '*' && replacements) {\n        replacements.set(local, renamed);\n        continue;\n      }\n\n      // For CJS output, always use a property lookup so that exports remain live.\n      // For ESM output, use named imports which are always live.\n      if (this.bundle.env.outputFormat === 'commonjs') {\n        renamed = external.get('*');\n        if (!renamed) {\n          if (referencedBundle) {\n            let entry = nullthrows(referencedBundle.getMainEntry());\n            renamed =\n              entry.symbols.get('*')?.local ??\n              `$${String(entry.meta.id)}$exports`;\n          } else {\n            renamed = this.getTopLevelName(\n              `$${this.bundle.publicId}$${specifier}`,\n            );\n          }\n\n          external.set('*', renamed);\n        }\n\n        if (local !== '*' && replacements) {\n          let replacement;\n          if (imported === '*') {\n            replacement = renamed;\n          } else if (imported === 'default') {\n            let needsDefaultInterop = true;\n            if (referencedBundle) {\n              let entry = nullthrows(referencedBundle.getMainEntry());\n              needsDefaultInterop = this.needsDefaultInterop(entry);\n            }\n            if (needsDefaultInterop) {\n              replacement = `($parcel$interopDefault(${renamed}))`;\n              this.usedHelpers.add('$parcel$interopDefault');\n            } else {\n              replacement = `${renamed}.default`;\n            }\n          } else {\n            replacement = this.getPropertyAccess(renamed, imported);\n          }\n\n          replacements.set(local, replacement);\n        }\n      } else {\n        let property;\n        if (referencedBundle) {\n          let entry = nullthrows(referencedBundle.getMainEntry());\n          if (entry.symbols.hasExportSymbol('*')) {\n            // If importing * and the referenced module has a * export (e.g. CJS), use default instead.\n            // This mirrors the logic in buildExportedSymbols.\n            property = imported;\n            imported =\n              referencedBundle?.env.outputFormat === 'esmodule'\n                ? 'default'\n                : '*';\n          } else {\n            if (imported === '*') {\n              let exportedSymbols = this.bundleGraph.getExportedSymbols(entry);\n              if (local === '*') {\n                // Re-export all symbols.\n                for (let exported of exportedSymbols) {\n                  if (exported.symbol) {\n                    external.set(exported.exportSymbol, exported.symbol);\n                  }\n                }\n                continue;\n              }\n            }\n            renamed = this.bundleGraph.getSymbolResolution(\n              entry,\n              imported,\n              this.bundle,\n            ).symbol;\n          }\n        }\n\n        // Rename the specifier so that multiple local imports of the same imported specifier\n        // are deduplicated. We have to prefix the imported name with the bundle id so that\n        // local variables do not shadow it.\n        if (!renamed) {\n          if (this.exportedSymbols.has(local)) {\n            renamed = local;\n          } else if (imported === 'default' || imported === '*') {\n            renamed = this.getTopLevelName(\n              `$${this.bundle.publicId}$${specifier}`,\n            );\n          } else {\n            renamed = this.getTopLevelName(\n              `$${this.bundle.publicId}$${imported}`,\n            );\n          }\n        }\n\n        external.set(imported, renamed);\n        if (local !== '*' && replacements) {\n          let replacement = renamed;\n          if (property === '*') {\n            replacement = renamed;\n          } else if (property === 'default') {\n            replacement = `($parcel$interopDefault(${renamed}))`;\n            this.usedHelpers.add('$parcel$interopDefault');\n          } else if (property) {\n            replacement = this.getPropertyAccess(renamed, property);\n          }\n          replacements.set(local, replacement);\n        }\n      }\n    }\n  }\n\n  isWrapped(resolved: Asset, parentAsset: Asset): boolean {\n    if (resolved.meta.isConstantModule) {\n      if (!this.bundle.hasAsset(resolved)) {\n        throw new AssertionError({\n          message: `Constant module ${path.relative(\n            this.options.projectRoot,\n            resolved.filePath,\n          )} referenced from ${path.relative(\n            this.options.projectRoot,\n            parentAsset.filePath,\n          )} not found in bundle ${this.bundle.name}`,\n        });\n      }\n      return false;\n    }\n    return (\n      (!this.bundle.hasAsset(resolved) && !this.externalAssets.has(resolved)) ||\n      (this.wrappedAssets.has(resolved.id) && resolved !== parentAsset)\n    );\n  }\n\n  getSymbolResolution(\n    parentAsset: Asset,\n    resolved: Asset,\n    imported: string,\n    dep?: Dependency,\n    replacements?: Map<string, string>,\n  ): string {\n    let {\n      asset: resolvedAsset,\n      exportSymbol,\n      symbol,\n    } = this.bundleGraph.getSymbolResolution(resolved, imported, this.bundle);\n\n    if (\n      resolvedAsset.type !== 'js' ||\n      (dep && this.bundleGraph.isDependencySkipped(dep))\n    ) {\n      // Graceful fallback for non-js imports or when trying to resolve a symbol\n      // that is actually unused but we still need a placeholder value.\n      return '{}';\n    }\n\n    let isWrapped = this.isWrapped(resolvedAsset, parentAsset);\n    let staticExports = resolvedAsset.meta.staticExports !== false;\n    let publicId = this.bundleGraph.getAssetPublicId(resolvedAsset);\n\n    // External CommonJS dependencies need to be accessed as an object property rather than imported\n    // directly to maintain live binding.\n    let isExternalCommonJS =\n      !isWrapped &&\n      this.bundle.env.isLibrary &&\n      this.bundle.env.outputFormat === 'commonjs' &&\n      !this.bundle.hasAsset(resolvedAsset);\n\n    // If the resolved asset is wrapped, but imported at the top-level by this asset,\n    // then we hoist parcelRequire calls to the top of this asset so side effects run immediately.\n    if (\n      isWrapped &&\n      dep &&\n      !dep?.meta.shouldWrap &&\n      symbol !== false &&\n      // Only do this if the asset is part of a different bundle (so it was definitely\n      // parcelRequire.register'ed there), or if it is indeed registered in this bundle.\n      (!this.bundle.hasAsset(resolvedAsset) ||\n        !this.shouldSkipAsset(resolvedAsset))\n    ) {\n      let hoisted = this.hoistedRequires.get(dep.id);\n      if (!hoisted) {\n        hoisted = new Map();\n        this.hoistedRequires.set(dep.id, hoisted);\n      }\n\n      hoisted.set(\n        resolvedAsset.id,\n        `var $${publicId} = parcelRequire(${JSON.stringify(publicId)});`,\n      );\n    }\n\n    if (isWrapped) {\n      this.needsPrelude = true;\n    }\n\n    // If this is an ESM default import of a CJS module with a `default` symbol,\n    // and no __esModule flag, we need to resolve to the namespace instead.\n    let isDefaultInterop =\n      exportSymbol === 'default' &&\n      staticExports &&\n      !isWrapped &&\n      (dep?.meta.kind === 'Import' || dep?.meta.kind === 'Export') &&\n      resolvedAsset.symbols.hasExportSymbol('*') &&\n      resolvedAsset.symbols.hasExportSymbol('default') &&\n      !resolvedAsset.symbols.hasExportSymbol('__esModule');\n\n    // Find the namespace object for the resolved module. If wrapped and this\n    // is an inline require (not top-level), use a parcelRequire call, otherwise\n    // the hoisted variable declared above. Otherwise, if not wrapped, use the\n    // namespace export symbol.\n    let assetId = resolvedAsset.meta.id;\n    invariant(typeof assetId === 'string');\n    let obj;\n    if (isWrapped && (!dep || dep?.meta.shouldWrap)) {\n      // Wrap in extra parenthesis to not change semantics, e.g.`new (parcelRequire(\"...\"))()`.\n      obj = `(parcelRequire(${JSON.stringify(publicId)}))`;\n    } else if (isWrapped && dep) {\n      obj = `$${publicId}`;\n    } else {\n      obj = resolvedAsset.symbols.get('*')?.local || `$${assetId}$exports`;\n      obj = replacements?.get(obj) || obj;\n    }\n\n    if (imported === '*' || exportSymbol === '*' || isDefaultInterop) {\n      // Resolve to the namespace object if requested or this is a CJS default interop reqiure.\n      if (\n        parentAsset === resolvedAsset &&\n        this.wrappedAssets.has(resolvedAsset.id)\n      ) {\n        // Directly use module.exports for wrapped assets importing themselves.\n        return 'module.exports';\n      } else {\n        return obj;\n      }\n    } else if (\n      (!staticExports || isWrapped || !symbol || isExternalCommonJS) &&\n      resolvedAsset !== parentAsset\n    ) {\n      // If the resolved asset is wrapped or has non-static exports,\n      // we need to use a member access off the namespace object rather\n      // than a direct reference. If importing default from a CJS module,\n      // use a helper to check the __esModule flag at runtime.\n      let kind = dep?.meta.kind;\n      if (\n        (!dep || kind === 'Import' || kind === 'Export') &&\n        exportSymbol === 'default' &&\n        resolvedAsset.symbols.hasExportSymbol('*') &&\n        this.needsDefaultInterop(resolvedAsset)\n      ) {\n        this.usedHelpers.add('$parcel$interopDefault');\n        return `(/*@__PURE__*/$parcel$interopDefault(${obj}))`;\n      } else {\n        return this.getPropertyAccess(obj, exportSymbol);\n      }\n    } else if (!symbol) {\n      invariant(false, 'Asset was skipped or not found.');\n    } else {\n      return replacements?.get(symbol) || symbol;\n    }\n  }\n\n  getHoistedParcelRequires(\n    parentAsset: Asset,\n    dep: Dependency,\n    resolved: Asset,\n  ): [string, number] {\n    if (resolved.type !== 'js') {\n      return ['', 0];\n    }\n\n    let hoisted = this.hoistedRequires.get(dep.id);\n    let res = '';\n    let lineCount = 0;\n    let isWrapped = this.isWrapped(resolved, parentAsset);\n\n    // If the resolved asset is wrapped and is imported in the top-level by this asset,\n    // we need to run side effects when this asset runs. If the resolved asset is not\n    // the first one in the hoisted requires, we need to insert a parcelRequire here\n    // so it runs first.\n    if (\n      isWrapped &&\n      !dep.meta.shouldWrap &&\n      (!hoisted || hoisted.keys().next().value !== resolved.id) &&\n      !this.bundleGraph.isDependencySkipped(dep) &&\n      !this.shouldSkipAsset(resolved)\n    ) {\n      this.needsPrelude = true;\n      res += `parcelRequire(${JSON.stringify(\n        this.bundleGraph.getAssetPublicId(resolved),\n      )});`;\n    }\n\n    if (hoisted) {\n      this.needsPrelude = true;\n      res += '\\n' + [...hoisted.values()].join('\\n');\n      lineCount += hoisted.size;\n    }\n\n    return [res, lineCount];\n  }\n\n  buildAssetPrelude(\n    asset: Asset,\n    deps: Array<Dependency>,\n    replacements: Map<string, string>,\n  ): [string, number, string] {\n    let prepend = '';\n    let prependLineCount = 0;\n    let append = '';\n\n    let shouldWrap = this.wrappedAssets.has(asset.id);\n    let usedSymbols = nullthrows(this.bundleGraph.getUsedSymbols(asset));\n    let assetId = asset.meta.id;\n    invariant(typeof assetId === 'string');\n\n    // If the asset has a namespace export symbol, it is CommonJS.\n    // If there's no __esModule flag, and default is a used symbol, we need\n    // to insert an interop helper.\n    let defaultInterop =\n      asset.symbols.hasExportSymbol('*') &&\n      usedSymbols.has('default') &&\n      !asset.symbols.hasExportSymbol('__esModule');\n\n    let usedNamespace =\n      // If the asset has * in its used symbols, we might need the exports namespace.\n      // The one case where this isn't true is in ESM library entries, where the only\n      // dependency on * is the entry dependency. In this case, we will use ESM exports\n      // instead of the namespace object.\n      (usedSymbols.has('*') &&\n        (this.bundle.env.outputFormat !== 'esmodule' ||\n          !this.bundle.env.isLibrary ||\n          asset !== this.bundle.getMainEntry() ||\n          this.bundleGraph\n            .getIncomingDependencies(asset)\n            .some(\n              dep =>\n                !dep.isEntry &&\n                this.bundle.hasDependency(dep) &&\n                nullthrows(this.bundleGraph.getUsedSymbols(dep)).has('*'),\n            ))) ||\n      // If a symbol is imported (used) from a CJS asset but isn't listed in the symbols,\n      // we fallback on the namespace object.\n      (asset.symbols.hasExportSymbol('*') &&\n        [...usedSymbols].some(s => !asset.symbols.hasExportSymbol(s))) ||\n      // If the exports has this asset's namespace (e.g. ESM output from CJS input),\n      // include the namespace object for the default export.\n      this.exportedSymbols.has(`$${assetId}$exports`) ||\n      // CommonJS library bundle entries always need a namespace.\n      (this.bundle.env.isLibrary &&\n        this.bundle.env.outputFormat === 'commonjs' &&\n        asset === this.bundle.getMainEntry());\n\n    // If the asset doesn't have static exports, should wrap, the namespace is used,\n    // or we need default interop, then we need to synthesize a namespace object for\n    // this asset.\n    if (\n      asset.meta.staticExports === false ||\n      shouldWrap ||\n      usedNamespace ||\n      defaultInterop\n    ) {\n      // Insert a declaration for the exports namespace object. If the asset is wrapped\n      // we don't need to do this, because we'll use the `module.exports` object provided\n      // by the wrapper instead. This is also true of CommonJS entry assets, which will use\n      // the `module.exports` object provided by CJS.\n      if (\n        !shouldWrap &&\n        (this.bundle.env.outputFormat !== 'commonjs' ||\n          asset !== this.bundle.getMainEntry())\n      ) {\n        prepend += `var $${assetId}$exports = {};\\n`;\n        prependLineCount++;\n      }\n\n      // Insert the __esModule interop flag for this module if it has a `default` export\n      // and the namespace symbol is used.\n      // TODO: only if required by CJS?\n      if (asset.symbols.hasExportSymbol('default') && usedSymbols.has('*')) {\n        prepend += `\\n$parcel$defineInteropFlag($${assetId}$exports);\\n`;\n        prependLineCount += 2;\n        this.usedHelpers.add('$parcel$defineInteropFlag');\n      }\n\n      // Find wildcard re-export dependencies, and make sure their exports are also included in\n      // ours. Importantly, add them before the asset's own exports so that wildcard exports get\n      // correctly overwritten by own exports of the same name.\n      for (let dep of deps) {\n        let resolved = this.bundleGraph.getResolvedAsset(dep, this.bundle);\n        if (dep.isOptional || this.bundleGraph.isDependencySkipped(dep)) {\n          continue;\n        }\n\n        let isWrapped = resolved && resolved.meta.shouldWrap;\n\n        for (let [imported, {local}] of dep.symbols) {\n          if (imported === '*' && local === '*') {\n            if (!resolved) {\n              // Re-exporting an external module. This should have already been handled in buildReplacements.\n              let external = nullthrows(\n                nullthrows(this.externals.get(dep.specifier)).get('*'),\n              );\n              append += `$parcel$exportWildcard($${assetId}$exports, ${external});\\n`;\n              this.usedHelpers.add('$parcel$exportWildcard');\n              continue;\n            }\n\n            // If the resolved asset has an exports object, use the $parcel$exportWildcard helper\n            // to re-export all symbols. Otherwise, if there's no namespace object available, add\n            // $parcel$export calls for each used symbol of the dependency.\n            if (\n              isWrapped ||\n              resolved.meta.staticExports === false ||\n              nullthrows(this.bundleGraph.getUsedSymbols(resolved)).has('*') ||\n              // an empty asset\n              (!resolved.meta.hasCJSExports &&\n                resolved.symbols.hasExportSymbol('*'))\n            ) {\n              let obj = this.getSymbolResolution(\n                asset,\n                resolved,\n                '*',\n                dep,\n                replacements,\n              );\n              append += `$parcel$exportWildcard($${assetId}$exports, ${obj});\\n`;\n              this.usedHelpers.add('$parcel$exportWildcard');\n            } else {\n              for (let symbol of nullthrows(\n                this.bundleGraph.getUsedSymbols(dep),\n              )) {\n                if (\n                  symbol === 'default' || // `export * as ...` does not include the default export\n                  symbol === '__esModule'\n                ) {\n                  continue;\n                }\n\n                let resolvedSymbol = this.getSymbolResolution(\n                  asset,\n                  resolved,\n                  symbol,\n                  undefined,\n                  replacements,\n                );\n                let get = this.buildFunctionExpression([], resolvedSymbol);\n                let set = asset.meta.hasCJSExports\n                  ? ', ' +\n                    this.buildFunctionExpression(['v'], `${resolvedSymbol} = v`)\n                  : '';\n                prepend += `$parcel$export($${assetId}$exports, ${JSON.stringify(\n                  symbol,\n                )}, ${get}${set});\\n`;\n                this.usedHelpers.add('$parcel$export');\n                prependLineCount++;\n              }\n            }\n          }\n        }\n      }\n\n      // Find the used exports of this module. This is based on the used symbols of\n      // incoming dependencies rather than the asset's own used exports so that we include\n      // re-exported symbols rather than only symbols declared in this asset.\n      let incomingDeps = this.bundleGraph.getIncomingDependencies(asset);\n      let usedExports = [...asset.symbols.exportSymbols()].filter(symbol => {\n        if (symbol === '*') {\n          return false;\n        }\n\n        // If we need default interop, then all symbols are needed because the `default`\n        // symbol really maps to the whole namespace.\n        if (defaultInterop) {\n          return true;\n        }\n\n        let unused = incomingDeps.every(d => {\n          let symbols = nullthrows(this.bundleGraph.getUsedSymbols(d));\n          return !symbols.has(symbol) && !symbols.has('*');\n        });\n        return !unused;\n      });\n\n      if (usedExports.length > 0) {\n        // Insert $parcel$export calls for each of the used exports. This creates a getter/setter\n        // for the symbol so that when the value changes the object property also changes. This is\n        // required to simulate ESM live bindings. It's easier to do it this way rather than inserting\n        // additional assignments after each mutation of the original binding.\n        prepend += `\\n${usedExports\n          .map(exp => {\n            let resolved = this.getSymbolResolution(\n              asset,\n              asset,\n              exp,\n              undefined,\n              replacements,\n            );\n            let get = this.buildFunctionExpression([], resolved);\n            let isEsmExport = !!asset.symbols.get(exp)?.meta?.isEsm;\n            let set =\n              !isEsmExport && asset.meta.hasCJSExports\n                ? ', ' + this.buildFunctionExpression(['v'], `${resolved} = v`)\n                : '';\n            return `$parcel$export($${assetId}$exports, ${JSON.stringify(\n              exp,\n            )}, ${get}${set});`;\n          })\n          .join('\\n')}\\n`;\n        this.usedHelpers.add('$parcel$export');\n        prependLineCount += 1 + usedExports.length;\n      }\n    }\n\n    return [prepend, prependLineCount, append];\n  }\n\n  buildBundlePrelude(): [string, number] {\n    let enableSourceMaps = this.bundle.env.sourceMap;\n    let res = '';\n    let lines = 0;\n\n    // Add hashbang if the entry asset recorded an interpreter.\n    let mainEntry = this.bundle.getMainEntry();\n    if (\n      mainEntry &&\n      !this.isAsyncBundle &&\n      !this.bundle.target.env.isBrowser()\n    ) {\n      let interpreter = mainEntry.meta.interpreter;\n      invariant(interpreter == null || typeof interpreter === 'string');\n      if (interpreter != null) {\n        res += `#!${interpreter}\\n`;\n        lines++;\n      }\n    }\n\n    // The output format may have specific things to add at the start of the bundle (e.g. imports).\n    let [outputFormatPrelude, outputFormatLines] =\n      this.outputFormat.buildBundlePrelude();\n    res += outputFormatPrelude;\n    lines += outputFormatLines;\n\n    // Add used helpers.\n    if (this.needsPrelude) {\n      this.usedHelpers.add('$parcel$global');\n    }\n\n    for (let helper of this.usedHelpers) {\n      let currentHelper = helpers[helper];\n      if (typeof currentHelper === 'function') {\n        currentHelper = helpers[helper](\n          this.bundle.env,\n          this.bundle,\n          this.usedHelpers,\n          this.options,\n        );\n      }\n      res += currentHelper;\n      if (enableSourceMaps) {\n        lines += countLines(currentHelper) - 1;\n      }\n    }\n\n    if (this.needsPrelude) {\n      // Add the prelude if this is potentially the first JS bundle to load in a\n      // particular context (e.g. entry scripts in HTML, workers, etc.).\n      let parentBundles = this.bundleGraph.getParentBundles(this.bundle);\n      let mightBeFirstJS =\n        parentBundles.length === 0 ||\n        parentBundles.some(\n          b => b.type !== 'js' || b.env.context !== this.bundle.env.context,\n        ) ||\n        this.bundleGraph\n          .getBundleGroupsContainingBundle(this.bundle)\n          .some(g => this.bundleGraph.isEntryBundleGroup(g)) ||\n        this.bundle.env.isIsolated() ||\n        this.bundle.bundleBehavior === 'isolated';\n\n      if (mightBeFirstJS) {\n        let preludeCode = prelude(this.parcelRequireName);\n        res += preludeCode;\n        if (enableSourceMaps) {\n          lines += countLines(preludeCode) - 1;\n        }\n\n        if (this.shouldBundleQueue(this.bundle)) {\n          let bundleQueuePreludeCode = bundleQueuePrelude(this.bundle.env);\n          res += bundleQueuePreludeCode;\n          if (enableSourceMaps) {\n            lines += countLines(bundleQueuePreludeCode) - 1;\n          }\n        }\n      } else {\n        // Otherwise, get the current parcelRequire global.\n        const escaped = JSON.stringify(this.parcelRequireName);\n        res += `var parcelRequire = $parcel$global[${escaped}];\\n`;\n        lines++;\n        res += `var parcelRegister = parcelRequire.register;\\n`;\n        lines++;\n      }\n    }\n\n    // Add importScripts for sibling bundles in workers.\n    if (this.bundle.env.isWorker() || this.bundle.env.isWorklet()) {\n      let importScripts = '';\n      let bundles = this.bundleGraph.getReferencedBundles(this.bundle);\n      for (let b of bundles) {\n        if (this.bundle.env.outputFormat === 'esmodule') {\n          // importScripts() is not allowed in native ES module workers.\n          importScripts += `import \"${relativeBundlePath(this.bundle, b)}\";\\n`;\n        } else {\n          importScripts += `importScripts(\"${relativeBundlePath(\n            this.bundle,\n            b,\n          )}\");\\n`;\n        }\n      }\n\n      res += importScripts;\n      lines += bundles.length;\n    }\n\n    return [res, lines];\n  }\n\n  needsDefaultInterop(asset: Asset): boolean {\n    if (\n      asset.symbols.hasExportSymbol('*') &&\n      !asset.symbols.hasExportSymbol('default')\n    ) {\n      let deps = this.bundleGraph.getIncomingDependencies(asset);\n      return deps.some(\n        dep =>\n          this.bundle.hasDependency(dep) &&\n          // dep.meta.isES6Module &&\n          dep.symbols.hasExportSymbol('default'),\n      );\n    }\n\n    return false;\n  }\n\n  shouldSkipAsset(asset: Asset): boolean {\n    if (this.isScriptEntry(asset)) {\n      return true;\n    }\n\n    return (\n      asset.sideEffects === false &&\n      nullthrows(this.bundleGraph.getUsedSymbols(asset)).size == 0 &&\n      !this.bundleGraph.isAssetReferenced(this.bundle, asset)\n    );\n  }\n\n  isScriptEntry(asset: Asset): boolean {\n    return (\n      this.bundle.env.outputFormat === 'global' &&\n      this.bundle.env.sourceType === 'script' &&\n      asset === this.bundle.getMainEntry()\n    );\n  }\n\n  buildFunctionExpression(args: Array<string>, expr: string): string {\n    return this.bundle.env.supports('arrow-functions', true)\n      ? `(${args.join(', ')}) => ${expr}`\n      : `function (${args.join(', ')}) { return ${expr}; }`;\n  }\n}\n"
  },
  {
    "path": "packages/packagers/js/src/dev-prelude.js",
    "content": "// modules are defined as an array\n// [ module function, map of requires ]\n//\n// map of requires is short require name -> numeric require\n//\n// anything defined in a previous bundle is accessed via the\n// orig method which is the require for previous bundles\n\n(function (\n  modules,\n  entry,\n  mainEntry,\n  parcelRequireName,\n  externals,\n  distDir,\n  publicUrl,\n  devServer\n) {\n  /* eslint-disable no-undef */\n  var globalObject =\n    typeof globalThis !== 'undefined'\n      ? globalThis\n      : typeof self !== 'undefined'\n      ? self\n      : typeof window !== 'undefined'\n      ? window\n      : typeof global !== 'undefined'\n      ? global\n      : {};\n  /* eslint-enable no-undef */\n\n  // Save the require from previous bundle to this closure if any\n  var previousRequire =\n    typeof globalObject[parcelRequireName] === 'function' &&\n    globalObject[parcelRequireName];\n\n  var importMap = previousRequire.i || {};\n  var cache = previousRequire.cache || {};\n  // Do not use `require` to prevent Webpack from trying to bundle this call\n  var nodeRequire =\n    typeof module !== 'undefined' &&\n    typeof module.require === 'function' &&\n    module.require.bind(module);\n\n  function newRequire(name, jumped) {\n    if (!cache[name]) {\n      if (!modules[name]) {\n        if (externals[name]) {\n          return externals[name];\n        }\n        // if we cannot find the module within our internal map or\n        // cache jump to the current global require ie. the last bundle\n        // that was added to the page.\n        var currentRequire =\n          typeof globalObject[parcelRequireName] === 'function' &&\n          globalObject[parcelRequireName];\n        if (!jumped && currentRequire) {\n          return currentRequire(name, true);\n        }\n\n        // If there are other bundles on this page the require from the\n        // previous one is saved to 'previousRequire'. Repeat this as\n        // many times as there are bundles until the module is found or\n        // we exhaust the require chain.\n        if (previousRequire) {\n          return previousRequire(name, true);\n        }\n\n        // Try the node require function if it exists.\n        if (nodeRequire && typeof name === 'string') {\n          return nodeRequire(name);\n        }\n\n        var err = new Error(\"Cannot find module '\" + name + \"'\");\n        err.code = 'MODULE_NOT_FOUND';\n        throw err;\n      }\n\n      localRequire.resolve = resolve;\n      localRequire.cache = {};\n\n      var module = (cache[name] = new newRequire.Module(name));\n\n      modules[name][0].call(\n        module.exports,\n        localRequire,\n        module,\n        module.exports,\n        globalObject\n      );\n    }\n\n    return cache[name].exports;\n\n    function localRequire(x) {\n      var res = localRequire.resolve(x);\n      if (res === false) {\n        return {};\n      }\n      // Synthesize a module to follow re-exports.\n      if (Array.isArray(res)) {\n        var m = {__esModule: true};\n        res.forEach(function (v) {\n          var key = v[0];\n          var id = v[1];\n          var exp = v[2] || v[0];\n          var x = newRequire(id);\n          if (key === '*') {\n            Object.keys(x).forEach(function (key) {\n              if (\n                key === 'default' ||\n                key === '__esModule' ||\n                Object.prototype.hasOwnProperty.call(m, key)\n              ) {\n                return;\n              }\n\n              Object.defineProperty(m, key, {\n                enumerable: true,\n                get: function () {\n                  return x[key];\n                },\n              });\n            });\n          } else if (exp === '*') {\n            Object.defineProperty(m, key, {\n              enumerable: true,\n              value: x,\n            });\n          } else {\n            Object.defineProperty(m, key, {\n              enumerable: true,\n              get: function () {\n                if (exp === 'default') {\n                  return x.__esModule ? x.default : x;\n                }\n                return x[exp];\n              },\n            });\n          }\n        });\n        return m;\n      }\n      return newRequire(res);\n    }\n\n    function resolve(x) {\n      var id = modules[name][1][x];\n      return id != null ? id : x;\n    }\n  }\n\n  function Module(moduleName) {\n    this.id = moduleName;\n    this.bundle = newRequire;\n    this.require = nodeRequire;\n    this.exports = {};\n  }\n\n  newRequire.isParcelRequire = true;\n  newRequire.Module = Module;\n  newRequire.modules = modules;\n  newRequire.cache = cache;\n  newRequire.parent = previousRequire;\n  newRequire.distDir = distDir;\n  newRequire.publicUrl = publicUrl;\n  newRequire.devServer = devServer;\n  newRequire.i = importMap;\n  newRequire.register = function (id, exports) {\n    modules[id] = [\n      function (require, module) {\n        module.exports = exports;\n      },\n      {},\n    ];\n  };\n\n  // Only insert newRequire.load when it is actually used.\n  // The code in this file is linted against ES5, so dynamic import is not allowed.\n  // INSERT_LOAD_HERE\n\n  Object.defineProperty(newRequire, 'root', {\n    get: function () {\n      return globalObject[parcelRequireName];\n    },\n  });\n\n  globalObject[parcelRequireName] = newRequire;\n\n  for (var i = 0; i < entry.length; i++) {\n    newRequire(entry[i]);\n  }\n\n  if (mainEntry) {\n    // Expose entry point to Node, AMD or browser globals\n    // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js\n    var mainExports = newRequire(mainEntry);\n\n    // CommonJS\n    if (typeof exports === 'object' && typeof module !== 'undefined') {\n      module.exports = mainExports;\n\n      // RequireJS\n    } else if (typeof define === 'function' && define.amd) {\n      define(function () {\n        return mainExports;\n      });\n    }\n  }\n});\n"
  },
  {
    "path": "packages/packagers/js/src/helpers.js",
    "content": "// @flow strict-local\nimport type {Environment, NamedBundle, PluginOptions} from '@parcel/types';\nimport {relativePath} from '@parcel/utils';\nimport path from 'path';\n\nexport const prelude = (parcelRequireName: string): string => `\nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[${JSON.stringify(parcelRequireName)}];\n\nif (parcelRequire == null) {\n  parcelRequire = function(id) {\n    if (id in $parcel$modules) {\n      return $parcel$modules[id].exports;\n    }\n    if (id in $parcel$inits) {\n      var init = $parcel$inits[id];\n      delete $parcel$inits[id];\n      var module = {id: id, exports: {}};\n      $parcel$modules[id] = module;\n      init.call(module.exports, module, module.exports);\n      return module.exports;\n    }\n    var err = new Error(\"Cannot find module '\" + id + \"'\");\n    err.code = 'MODULE_NOT_FOUND';\n    throw err;\n  };\n\n  parcelRequire.register = function register(id, init) {\n    $parcel$inits[id] = init;\n  };\n\n  $parcel$global[${JSON.stringify(parcelRequireName)}] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n`;\n\nexport const fnExpr = (\n  env: Environment,\n  params: Array<string>,\n  body: Array<string>,\n): string => {\n  let block = `{ ${body.join(' ')} }`;\n\n  if (env.supports('arrow-functions')) {\n    return `(${params.join(', ')}) => ${block}`;\n  }\n\n  return `function (${params.join(', ')}) ${block}`;\n};\n\nexport const bundleQueuePrelude = (env: Environment): string => `\nif (!$parcel$global.lb) {\n  // Set of loaded bundles\n  $parcel$global.lb = new Set();\n  // Queue of bundles to execute once they're dep bundles are loaded\n  $parcel$global.bq = [];\n\n  // Register loaded bundle\n  $parcel$global.rlb = ${fnExpr(\n    env,\n    ['bundle'],\n    ['$parcel$global.lb.add(bundle);', '$parcel$global.pq();'],\n  )}\n\n  // Run when ready\n  $parcel$global.rwr = ${fnExpr(\n    env,\n    // b = bundle public id\n    // r = run function to execute the bundle entry\n    // d = list of dependent bundles this bundle requires before executing\n    ['b', 'r', 'd'],\n    ['$parcel$global.bq.push({b, r, d});', '$parcel$global.pq();'],\n  )}\n\n  // Process queue\n  $parcel$global.pq = ${fnExpr(\n    env,\n    [],\n    [\n      `var runnableEntry = $parcel$global.bq.find(${fnExpr(\n        env,\n        ['i'],\n        [\n          `return i.d.every(${fnExpr(\n            env,\n            ['dep'],\n            ['return $parcel$global.lb.has(dep);'],\n          )});`,\n        ],\n      )});`,\n      'if (runnableEntry) {',\n      `$parcel$global.bq = $parcel$global.bq.filter(${fnExpr(\n        env,\n        ['i'],\n        ['return i.b !== runnableEntry.b;'],\n      )});`,\n      'runnableEntry.r();',\n      '$parcel$global.pq();',\n      '}',\n    ],\n  )}\n}\n`;\n\nconst $parcel$export = `\nfunction $parcel$export(e, n, v, s) {\n  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n`;\n\nconst $parcel$exportWildcard = `\nfunction $parcel$exportWildcard(dest, source) {\n  Object.keys(source).forEach(function(key) {\n    if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n      return;\n    }\n\n    Object.defineProperty(dest, key, {\n      enumerable: true,\n      get: function get() {\n        return source[key];\n      }\n    });\n  });\n\n  return dest;\n}\n`;\n\nconst $parcel$interopDefault = `\nfunction $parcel$interopDefault(a) {\n  return a && a.__esModule ? a.default : a;\n}\n`;\n\nconst $parcel$global = (env: Environment): string => {\n  if (env.supports('global-this')) {\n    return `\n      var $parcel$global = globalThis;\n    `;\n  }\n  return `\n      var $parcel$global =\n        typeof globalThis !== 'undefined'\n          ? globalThis\n          : typeof self !== 'undefined'\n          ? self\n          : typeof window !== 'undefined'\n          ? window\n          : typeof global !== 'undefined'\n          ? global\n          : {};\n  `;\n};\n\nconst $parcel$defineInteropFlag = `\nfunction $parcel$defineInteropFlag(a) {\n  Object.defineProperty(a, '__esModule', {value: true, configurable: true});\n}\n`;\n\nconst $parcel$distDir = (env: Environment, bundle: NamedBundle): string => {\n  // Generate a relative path from this bundle to the root of the dist dir.\n  let distDir = relativePath(path.dirname(bundle.name), '');\n  if (!distDir.endsWith('/')) {\n    distDir += '/';\n  }\n  return `var $parcel$distDir = ${JSON.stringify(distDir)};\\n`;\n};\n\nconst $parcel$publicUrl = (env: Environment, bundle: NamedBundle): string => {\n  // Ensure the public url always ends with a slash to code can easily join paths to it.\n  let publicUrl = bundle.target.publicUrl;\n  if (!publicUrl.endsWith('/')) {\n    publicUrl += '/';\n  }\n  return `var $parcel$publicUrl = ${JSON.stringify(publicUrl)};\\n`;\n};\n\nconst $parcel$devServer = (\n  env: Environment,\n  bundle: NamedBundle,\n  _usedHelpers: Set<string>,\n  options: PluginOptions,\n): string => {\n  if (options.hmrOptions) {\n    let {host = 'localhost', port} = options.hmrOptions;\n    let https = options.serveOptions ? options.serveOptions.https : false;\n    port = port ?? (options.serveOptions ? options.serveOptions.port : null);\n    if (port != null) {\n      let url = (https ? 'https://' : 'http://') + host + ':' + port;\n      return `var $parcel$devServer = ${JSON.stringify(url)};\\n`;\n    }\n  }\n  return `var $parcel$devServer = null;\\n`;\n};\n\nconst $parcel$extendImportMap = (env: Environment): string => {\n  let defineImportMap = env.shouldScopeHoist\n    ? 'parcelRequire.i ??= {}'\n    : 'importMap';\n  return `\nfunction $parcel$extendImportMap(map) {\n  Object.assign(${defineImportMap}, map);\n}\n`;\n};\n\nconst $parcel$import = (\n  env: Environment,\n  bundle: NamedBundle,\n  usedHelpers: Set<string>,\n): string => {\n  usedHelpers.add('$parcel$distDir');\n  let distDir = env.shouldScopeHoist ? '$parcel$distDir' : 'distDir';\n  let importMap = env.shouldScopeHoist ? 'parcelRequire.i?.' : 'importMap';\n  return `\nfunction $parcel$import(url) {\n  url = ${importMap}[url] || url;\n  return import(${distDir} + url);\n}\n`;\n};\n\nconst $parcel$resolve = (\n  env: Environment,\n  bundle: NamedBundle,\n  usedHelpers: Set<string>,\n): string => {\n  let distDir = env.shouldScopeHoist ? '$parcel$distDir' : 'distDir';\n  let publicUrl = env.shouldScopeHoist ? '$parcel$publicUrl' : 'publicUrl';\n  let importMap = env.shouldScopeHoist ? 'parcelRequire.i?.' : 'importMap';\n  if (env.context === 'react-server' || env.context === 'react-client') {\n    usedHelpers.add('$parcel$publicUrl');\n    return `\nfunction $parcel$resolve(url) {\nurl = ${importMap}[url] || url;\nreturn ${publicUrl} + url;\n}\n`;\n  } else if (\n    env.outputFormat === 'esmodule' &&\n    env.supports('import-meta-resolve')\n  ) {\n    usedHelpers.add('$parcel$distDir');\n    return `\nfunction $parcel$resolve(url) {\n  url = ${importMap}[url] || url;\n  return import.meta.resolve(${distDir} + url);\n}\n`;\n  } else if (\n    env.outputFormat === 'esmodule' &&\n    env.supports('import-meta-url')\n  ) {\n    usedHelpers.add('$parcel$distDir');\n    return `\nfunction $parcel$resolve(url) {\n  url = ${importMap}[url] || url;\n  return new URL(${distDir} + url, import.meta.url).toString();\n}\n`;\n  } else if (env.outputFormat === 'commonjs' || env.isNode()) {\n    usedHelpers.add('$parcel$distDir');\n    return `\nfunction $parcel$resolve(url) {\n  url = ${importMap}[url] || url;\n  return new URL(${distDir} + url, 'file:' + __filename).toString();\n}\n`;\n  } else {\n    usedHelpers.add('$parcel$distDir');\n    return `\nvar $parcel$bundleURL;\nfunction $parcel$resolve(url) {\n  url = ${importMap}[url] || url;\n  if (!$parcel$bundleURL) {\n    try {\n      throw new Error();\n    } catch (err) {\n      var matches = ('' + err.stack).match(\n        /(https?|file|ftp|(chrome|moz|safari-web)-extension):\\\\/\\\\/[^)\\\\n]+/g,\n      );\n      if (matches) {\n        $parcel$bundleURL = matches[0];\n      } else {\n        return ${distDir} + url;\n      }\n    }\n  }\n  return new URL(${distDir} + url, $parcel$bundleURL).toString();\n}\n`;\n  }\n};\n\nexport const helpers = {\n  $parcel$export,\n  $parcel$exportWildcard,\n  $parcel$interopDefault,\n  $parcel$global,\n  $parcel$defineInteropFlag,\n  $parcel$distDir,\n  $parcel$publicUrl,\n  $parcel$devServer,\n  $parcel$extendImportMap,\n  $parcel$import,\n  $parcel$resolve,\n};\n"
  },
  {
    "path": "packages/packagers/js/src/index.js",
    "content": "// @flow strict-local\nimport type {Async} from '@parcel/types';\nimport type SourceMap from '@parcel/source-map';\nimport {Packager} from '@parcel/plugin';\nimport {\n  replaceInlineReferences,\n  replaceURLReferences,\n  validateSchema,\n  type SchemaEntity,\n} from '@parcel/utils';\nimport {encodeJSONKeyComponent} from '@parcel/diagnostic';\nimport {hashString} from '@parcel/rust';\nimport nullthrows from 'nullthrows';\nimport {DevPackager} from './DevPackager';\nimport {ScopeHoistingPackager} from './ScopeHoistingPackager';\n\ntype JSPackagerConfig = {|\n  parcelRequireName: string,\n  unstable_asyncBundleRuntime: boolean,\n|};\n\nconst CONFIG_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    unstable_asyncBundleRuntime: {\n      type: 'boolean',\n    },\n  },\n  additionalProperties: false,\n};\n\nexport default (new Packager({\n  async loadConfig({config, options}): Promise<JSPackagerConfig> {\n    let packageKey = '@parcel/packager-js';\n    let conf = await config.getConfigFrom(options.projectRoot + '/index', [], {\n      packageKey,\n    });\n\n    if (conf?.contents) {\n      validateSchema.diagnostic(\n        CONFIG_SCHEMA,\n        {\n          data: conf?.contents,\n          source: await options.inputFS.readFile(conf.filePath, 'utf8'),\n          filePath: conf.filePath,\n          prependKey: `/${encodeJSONKeyComponent(packageKey)}`,\n        },\n        packageKey,\n        `Invalid config for ${packageKey}`,\n      );\n    }\n\n    // Generate a name for the global parcelRequire function that is unique to this project.\n    // This allows multiple parcel builds to coexist on the same page.\n    let packageName = await config.getConfigFrom(\n      options.projectRoot + '/index',\n      [],\n      {\n        packageKey: 'name',\n      },\n    );\n\n    let name = packageName?.contents ?? '';\n    return {\n      parcelRequireName: 'parcelRequire' + hashString(name).slice(-4),\n      unstable_asyncBundleRuntime: Boolean(\n        conf?.contents?.unstable_asyncBundleRuntime,\n      ),\n    };\n  },\n  async package({\n    bundle,\n    bundleGraph,\n    getInlineBundleContents,\n    getSourceMapReference,\n    config,\n    options,\n  }) {\n    // If this is a non-module script, and there is only one asset with no dependencies,\n    // then we don't need to package at all and can pass through the original code un-wrapped.\n    let contents, map;\n    if (bundle.env.sourceType === 'script') {\n      let entries = bundle.getEntryAssets();\n      if (\n        entries.length === 1 &&\n        bundleGraph.getDependencies(entries[0]).length === 0\n      ) {\n        contents = await entries[0].getCode();\n        map = await entries[0].getMap();\n      }\n    }\n\n    if (contents == null) {\n      let packager = bundle.env.shouldScopeHoist\n        ? new ScopeHoistingPackager(\n            options,\n            bundleGraph,\n            bundle,\n            nullthrows(config).parcelRequireName,\n            nullthrows(config).unstable_asyncBundleRuntime,\n          )\n        : new DevPackager(\n            options,\n            bundleGraph,\n            bundle,\n            nullthrows(config).parcelRequireName,\n          );\n\n      ({contents, map} = await packager.package());\n    }\n\n    contents += '\\n' + (await getSourceMapSuffix(getSourceMapReference, map));\n\n    // For library builds, we need to replace URL references with their final resolved paths.\n    // For non-library builds, this is handled in the JS runtime.\n    if (bundle.env.isLibrary) {\n      ({contents, map} = replaceURLReferences({\n        bundle,\n        bundleGraph,\n        contents,\n        map,\n        getReplacement: s => JSON.stringify(s).slice(1, -1),\n      }));\n    }\n\n    return replaceInlineReferences({\n      bundle,\n      bundleGraph,\n      contents,\n      getInlineReplacement: (dependency, inlineType, content) => ({\n        from: `\"${dependency.id}\"`,\n        to: inlineType === 'string' ? JSON.stringify(content) : content,\n      }),\n      getInlineBundleContents,\n      map,\n    });\n  },\n}): Packager);\n\nasync function getSourceMapSuffix(\n  getSourceMapReference: (?SourceMap) => Async<?string>,\n  map: ?SourceMap,\n): Promise<string> {\n  let sourcemapReference = await getSourceMapReference(map);\n  if (sourcemapReference != null) {\n    return '//# sourceMappingURL=' + sourcemapReference + '\\n';\n  } else {\n    return '';\n  }\n}\n"
  },
  {
    "path": "packages/packagers/js/src/utils.js",
    "content": "// @flow\nimport type {BundleGraph, Dependency, NamedBundle} from '@parcel/types';\nimport type SourceMap from '@parcel/source-map';\nimport nullthrows from 'nullthrows';\n\n// This replaces __parcel__require__ references left by the transformer with\n// parcelRequire calls of the resolved asset id. This lets runtimes work within\n// script bundles, which must be outside the bundle wrapper so their variables are global.\nexport function replaceScriptDependencies(\n  bundleGraph: BundleGraph<NamedBundle>,\n  bundle: NamedBundle,\n  code: string,\n  map: ?SourceMap,\n  parcelRequireName: string,\n): string {\n  let entry = nullthrows(bundle.getMainEntry());\n  let dependencies = bundleGraph.getDependencies(entry);\n\n  let lineCount = 0;\n  let offset = 0;\n  let columnStartIndex = 0;\n  code = code.replace(/\\n|__parcel__require__\\(['\"](.*?)['\"]\\)/g, (m, s, i) => {\n    if (m === '\\n') {\n      columnStartIndex = i + offset + 1;\n      lineCount++;\n      return '\\n';\n    }\n\n    let dep = nullthrows(dependencies.find(d => getSpecifier(d) === s));\n    let resolved = nullthrows(bundleGraph.getResolvedAsset(dep, bundle));\n    let publicId = bundleGraph.getAssetPublicId(resolved);\n    let replacement = `${parcelRequireName}(\"${publicId}\")`;\n    if (map) {\n      let lengthDifference = replacement.length - m.length;\n      if (lengthDifference !== 0) {\n        map.offsetColumns(\n          lineCount + 1,\n          i + offset - columnStartIndex + m.length,\n          lengthDifference,\n        );\n        offset += lengthDifference;\n      }\n    }\n\n    return replacement;\n  });\n\n  return code;\n}\n\nexport function getSpecifier(dep: Dependency): string {\n  if (typeof dep.meta.placeholder === 'string') {\n    return dep.meta.placeholder;\n  }\n\n  return dep.specifier;\n}\n\n// https://262.ecma-international.org/6.0/#sec-names-and-keywords\nconst IDENTIFIER_RE = /^[$_\\p{ID_Start}][$_\\u200C\\u200D\\p{ID_Continue}]*$/u;\nconst ID_START_RE = /^[$_\\p{ID_Start}]/u;\nconst NON_ID_CONTINUE_RE = /[^$_\\u200C\\u200D\\p{ID_Continue}]/gu;\n\nexport function isValidIdentifier(id: string): boolean {\n  return IDENTIFIER_RE.test(id);\n}\n\nexport function makeValidIdentifier(name: string): string {\n  name = name.replace(NON_ID_CONTINUE_RE, '');\n  if (!ID_START_RE.test(name)) {\n    name = '_' + name;\n  }\n  return name;\n}\n"
  },
  {
    "path": "packages/packagers/raw/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-raw\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/RawPackager.js\",\n  \"source\": \"src/RawPackager.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/raw/src/RawPackager.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {Packager} from '@parcel/plugin';\n\nexport default (new Packager({\n  package({bundle}) {\n    let assets = [];\n    bundle.traverseAssets(asset => {\n      assets.push(asset);\n    });\n\n    assert.equal(assets.length, 1, 'Raw bundles must only contain one asset');\n    return {contents: assets[0].getStream()};\n  },\n}): Packager);\n"
  },
  {
    "path": "packages/packagers/raw-url/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-raw-url\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/RawUrlPackager.js\",\n  \"source\": \"src/RawUrlPackager.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/raw-url/src/RawUrlPackager.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {Packager} from '@parcel/plugin';\nimport {replaceURLReferences} from '@parcel/utils';\n\nexport default (new Packager({\n  async package({bundle, bundleGraph}) {\n    let assets = [];\n    bundle.traverseAssets(asset => {\n      assets.push(asset);\n    });\n\n    assert.equal(assets.length, 1, 'Raw bundles must only contain one asset');\n    let {contents} = replaceURLReferences({\n      bundle,\n      bundleGraph,\n      contents: await assets[0].getCode(),\n      relative: false,\n      getReplacement: s => s,\n    });\n    return {contents};\n  },\n}): Packager);\n"
  },
  {
    "path": "packages/packagers/react-static/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-react-static\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/ReactStaticPackager.js\",\n  \"source\": \"src/ReactStaticPackager.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/node-resolver-core\": \"3.7.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\",\n    \"rsc-html-stream\": \"^0.0.6\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/react-static/src/ReactStaticPackager.js",
    "content": "// @flow\nimport type {\n  Asset,\n  Async,\n  Blob,\n  BundleGraph,\n  Dependency,\n  NamedBundle,\n  Meta,\n} from '@parcel/types';\nimport {blobToString, PromiseQueue, urlJoin} from '@parcel/utils';\nimport fs from 'fs';\nimport Module from 'module';\nimport {Packager} from '@parcel/plugin';\nimport path from 'path';\nimport {ResolverBase} from '@parcel/node-resolver-core';\nimport vm from 'vm';\nimport nullthrows from 'nullthrows';\nimport {Readable} from 'stream';\nimport {hashString} from '@parcel/rust';\n// $FlowFixMe\nimport {AsyncLocalStorage} from 'node:async_hooks';\n\nexport interface Page {\n  url: string;\n  name: string;\n}\n\nexport interface PageProps {\n  pages: Page[];\n  currentPage: Page;\n}\n\ninterface ParcelModule {\n  exports: any;\n  children: ParcelModule[];\n  filename: string;\n  id: string;\n  path: string;\n}\n\nlet clientResolver: ResolverBase;\nlet serverResolver: ResolverBase;\nlet packagingBundles = new Map<NamedBundle, Async<{|contents: Blob|}>>();\nlet moduleCache = new Map<string, ParcelModule>();\nlet loadedBundles = new Map<NamedBundle, any>();\nlet context: any = vm.createContext();\nlet bundleLookupCache = new WeakMap();\n\nexport default (new Packager({\n  async loadConfig({options, config}) {\n    config.invalidateOnBuild();\n    packagingBundles.clear();\n    moduleCache.clear();\n    loadedBundles.clear();\n    context = createContext(options);\n    clientResolver = new ResolverBase(options.projectRoot, {\n      mode: 2,\n      packageExports: true,\n    });\n\n    serverResolver = new ResolverBase(options.projectRoot, {\n      mode: 2,\n      packageExports: true,\n      conditions: 1 << 16, // \"react-server\"\n    });\n\n    // This logic must be synced with the packager...\n    let packageName = await config.getConfigFrom(\n      options.projectRoot + '/index',\n      [],\n      {\n        packageKey: 'name',\n      },\n    );\n\n    let name = packageName?.contents ?? '';\n    return {\n      parcelRequireName: 'parcelRequire' + hashString(name).slice(-4),\n    };\n  },\n  loadBundleConfig({bundle, bundleGraph}) {\n    let pages: Page[] = [];\n    for (let b of bundleGraph.getEntryBundles()) {\n      let main = b.getMainEntry();\n      if (main && b.type === 'js' && b.needsStableName) {\n        let meta = pageMeta(main.meta);\n        pages.push({\n          url: urlJoin(b.target.publicUrl, b.name),\n          name: b.name,\n          ...meta,\n        });\n      }\n    }\n\n    let referencedBundles = [];\n    for (let b of bundleGraph.getReferencedBundles(bundle, {\n      includeInline: false,\n      includeIsolated: false,\n    })) {\n      if (b.type === 'js') {\n        referencedBundles.push(b.getContentHash());\n      }\n    }\n\n    return {pages, referencedBundles};\n  },\n  async package({\n    bundle,\n    bundleGraph,\n    getInlineBundleContents,\n    config,\n    bundleConfig,\n  }) {\n    if (bundle.env.shouldScopeHoist) {\n      throw new Error('Scope hoisting is not supported with SSG');\n    }\n\n    let {load, loadModule} = await loadBundle(\n      bundle,\n      bundleGraph,\n      getInlineBundleContents,\n    );\n\n    let Component = load(nullthrows(bundle.getMainEntry()).id).default;\n    let {renderToReadableStream} = loadModule(\n      'react-server-dom-parcel/server.edge',\n      __filename,\n      'react-server',\n    );\n    let {prerender} = loadModule(\n      'react-dom/static.edge',\n      __filename,\n      'react-client',\n    );\n    let React = loadModule('react', __filename, 'react-client');\n    let ReactDOM = loadModule('react-dom', __filename, 'react-server');\n    let {createFromReadableStream} = loadModule(\n      'react-server-dom-parcel/client.edge',\n      __filename,\n      'react-client',\n    );\n    let {injectRSCPayload} = await import('rsc-html-stream/server');\n\n    let pages: Page[] = bundleConfig.pages;\n    let meta = pageMeta(nullthrows(bundle.getMainEntry()).meta);\n    let props: PageProps = {\n      key: 'page',\n      pages,\n      currentPage: {\n        url: urlJoin(bundle.target.publicUrl, bundle.name),\n        name: bundle.name,\n        ...meta,\n      },\n    };\n\n    let bootstrapModules = [];\n    let entry;\n    let referencedBundles = bundleGraph.getReferencedBundles(bundle, {\n      includeInline: false,\n      includeIsolated: false,\n    });\n\n    for (let b of referencedBundles) {\n      if (b.type === 'js' && b.env.isBrowser()) {\n        bootstrapModules.push(urlJoin(b.target.publicUrl, b.name));\n        if (!entry) {\n          b.traverseAssets((a, ctx, actions) => {\n            if (\n              Array.isArray(a.meta.directives) &&\n              a.meta.directives.includes('use client-entry')\n            ) {\n              entry = a;\n              actions.stop();\n            }\n          });\n        }\n      }\n    }\n\n    function Resources() {\n      let resources = [];\n      for (let b of referencedBundles) {\n        if (b.type === 'css') {\n          let href = urlJoin(b.target.publicUrl, b.name);\n\n          // Add preload hint so we start loading the stylesheet as soon\n          // as the RSC payload loads, without waiting for the component to mount.\n          ReactDOM.preload(href, {as: 'style'});\n          resources.push(\n            React.createElement('link', {\n              key: b.id,\n              rel: 'stylesheet',\n              href,\n              precedence: 'default',\n            }),\n          );\n        } else if (b.type === 'js' && b.env.isBrowser()) {\n          resources.push(\n            React.createElement('script', {\n              key: b.id,\n              type: 'module',\n              async: true,\n              src: urlJoin(b.target.publicUrl, b.name),\n            }),\n          );\n        }\n      }\n\n      return resources;\n    }\n\n    let stream = renderToReadableStream([\n      React.createElement(Resources, {key: 'resources'}),\n      React.createElement(Component, props),\n    ]);\n    let [s1, renderStream] = stream.tee();\n    let [injectStream, rscStream] = s1.tee();\n    let data;\n    function Content() {\n      data ??= createFromReadableStream(renderStream);\n      return React.use(data);\n    }\n\n    let bootstrapScriptContent;\n    if (entry) {\n      bootstrapScriptContent = `Promise.all([${bootstrapModules\n        .map(m => `import(\"${m}\")`)\n        .join(',')}]).then(()=>${\n        nullthrows(config).parcelRequireName\n      }(${JSON.stringify(bundleGraph.getAssetPublicId(entry))}))`;\n    }\n\n    let {prelude} = await prerender(React.createElement(Content), {\n      bootstrapScriptContent,\n    });\n\n    // Buffer into a single chunk so hash reference replacement works correctly.\n    // There could potentially be a more optimal way of doing this in the future.\n    let buffers = [];\n    let len = 0;\n    // $FlowFixMe\n    let bufferedStream = new TransformStream({\n      transform(chunk) {\n        len += chunk.length;\n        buffers.push(chunk);\n      },\n      flush(controller) {\n        let concated = new Uint8Array(len);\n        let offset = 0;\n        for (let buf of buffers) {\n          concated.set(buf, offset);\n          offset += buf.length;\n        }\n        controller.enqueue(concated);\n      },\n    });\n\n    let response = prelude.pipeThrough(\n      injectRSCPayload(injectStream.pipeThrough(bufferedStream)),\n    );\n\n    return [\n      {\n        type: 'html',\n        contents: Readable.from(response),\n      },\n      {\n        type: 'rsc',\n        contents: Readable.from(rscStream),\n      },\n    ];\n  },\n}): Packager);\n\nfunction loadBundle(\n  bundle: NamedBundle,\n  bundleGraph: BundleGraph<NamedBundle>,\n  getInlineBundleContents: (\n    bundle: NamedBundle,\n    bundleGraph: BundleGraph<NamedBundle>,\n  ) => Async<{|contents: Blob|}>,\n) {\n  let cached = loadedBundles.get(bundle);\n  if (!cached) {\n    cached = loadBundleUncached(bundle, bundleGraph, getInlineBundleContents);\n    loadedBundles.set(bundle, cached);\n  }\n\n  return cached;\n}\n\nasync function loadBundleUncached(\n  bundle: NamedBundle,\n  bundleGraph: BundleGraph<NamedBundle>,\n  getInlineBundleContents: (\n    bundle: NamedBundle,\n    bundleGraph: BundleGraph<NamedBundle>,\n  ) => Async<{|contents: Blob|}>,\n) {\n  // Load all asset contents.\n  let queue = new PromiseQueue<Array<[string, [NamedBundle, Asset, string]]>>({\n    maxConcurrent: 32,\n  });\n  bundle.traverse(node => {\n    if (node.type === 'dependency') {\n      let dep = node.value;\n      let entryBundle = bundleGraph.getReferencedBundle(dep, bundle);\n      if (entryBundle?.bundleBehavior === 'inline') {\n        queue.add(async () => {\n          if (!packagingBundles.has(entryBundle)) {\n            packagingBundles.set(\n              entryBundle,\n              getInlineBundleContents(entryBundle, bundleGraph),\n            );\n          }\n\n          let packagedBundle = await nullthrows(\n            packagingBundles.get(entryBundle),\n          );\n          let inlineType = nullthrows(entryBundle.getMainEntry()).meta\n            .inlineType;\n          let contents = await blobToString(packagedBundle.contents);\n          contents = `module.exports = ${\n            inlineType === 'string' ? JSON.stringify(contents) : contents\n          }`;\n          return [\n            [\n              entryBundle.id,\n              [entryBundle, nullthrows(entryBundle.getMainEntry()), contents],\n            ],\n          ];\n        });\n      } else if (entryBundle?.type === 'js') {\n        queue.add(async () => {\n          let {assets: subAssets} = await loadBundle(\n            entryBundle,\n            bundleGraph,\n            getInlineBundleContents,\n          );\n          return Array.from(subAssets);\n        });\n      }\n    } else if (node.type === 'asset') {\n      let asset = node.value;\n      queue.add(async () => [\n        [asset.id, [bundle, asset, await asset.getCode()]],\n      ]);\n    }\n  });\n\n  for (let b of bundleGraph.getReferencedBundles(bundle)) {\n    if (b.type === 'js') {\n      queue.add(async () => {\n        let {assets: subAssets} = await loadBundle(\n          b,\n          bundleGraph,\n          getInlineBundleContents,\n        );\n        return Array.from(subAssets);\n      });\n    }\n  }\n\n  let assets = new Map<string, [NamedBundle, Asset, string]>(\n    (await queue.run()).flatMap(v => v),\n  );\n  let assetsByFilePath = new Map<string, string>();\n  let assetsByPublicId = new Map<string, string>();\n  for (let [, asset] of assets.values()) {\n    assetsByFilePath.set(getCacheKey(asset), asset.id);\n    assetsByPublicId.set(bundleGraph.getAssetPublicId(asset), asset.id);\n  }\n\n  // Load an asset into the module system by id.\n  let loadAsset = (id: string) => {\n    let [bundle, asset, code] = nullthrows(assets.get(id));\n    let cacheKey = getCacheKey(asset);\n    let cachedModule = moduleCache.get(cacheKey);\n    if (cachedModule) {\n      return cachedModule.exports;\n    }\n\n    // Build a mapping of dependencies to their resolved assets.\n    let deps = new Map();\n    for (let dep of bundleGraph.getDependencies(asset)) {\n      if (bundleGraph.isDependencySkipped(dep)) {\n        deps.set(getSpecifier(dep), {skipped: true});\n        continue;\n      }\n\n      let entryBundle = bundleGraph.getReferencedBundle(dep, bundle);\n      if (entryBundle?.bundleBehavior === 'inline') {\n        deps.set(getSpecifier(dep), {id: entryBundle.id});\n        continue;\n      }\n\n      let resolved = bundleGraph.getResolvedAsset(dep, bundle);\n      if (resolved) {\n        if (resolved.type !== 'js') {\n          deps.set(getSpecifier(dep), {skipped: true});\n        } else {\n          let resolution = {id: resolved.id};\n\n          // Dependencies may be re-targeted to follow re-exports.\n          for (let [name, sym] of dep.symbols) {\n            let rewritten = sym.meta?.rewritten;\n            if (typeof rewritten === 'string') {\n              if (Array.isArray(resolution)) {\n                resolution.push([rewritten, resolved.id, name]);\n              } else {\n                resolution = [[rewritten, resolved.id, name]];\n              }\n            }\n          }\n\n          let specifier = getSpecifier(dep);\n          let cur = deps.get(specifier);\n          if (Array.isArray(cur) && Array.isArray(resolution)) {\n            cur.push(...resolution);\n          } else {\n            deps.set(specifier, resolution);\n          }\n        }\n      } else {\n        deps.set(getSpecifier(dep), {specifier: dep.specifier});\n      }\n    }\n\n    let defaultRequire = Module.createRequire(asset.filePath);\n    let require = (id: string) => {\n      let resolution = deps.get(id);\n      if (resolution?.skipped) {\n        return {};\n      }\n\n      // Synthesize a module to follow re-exports.\n      if (Array.isArray(resolution)) {\n        var m = {__esModule: true};\n        resolution.forEach(function (v) {\n          var key = v[0];\n          var id = v[1];\n          var exp = v[2];\n          var x = loadAsset(id);\n          if (key === '*') {\n            Object.keys(x).forEach(function (key) {\n              if (\n                key === 'default' ||\n                key === '__esModule' ||\n                // $FlowFixMe\n                Object.prototype.hasOwnProperty.call(m, key)\n              ) {\n                return;\n              }\n\n              Object.defineProperty(m, key, {\n                enumerable: true,\n                get: function () {\n                  return x[key];\n                },\n              });\n            });\n          } else if (exp === '*') {\n            Object.defineProperty(m, key, {\n              enumerable: true,\n              value: x,\n            });\n          } else {\n            Object.defineProperty(m, key, {\n              enumerable: true,\n              get: function () {\n                if (exp === 'default') {\n                  return x.__esModule ? x.default : x;\n                }\n                return x[exp];\n              },\n            });\n          }\n        });\n        return m;\n      }\n\n      if (resolution?.id) {\n        return loadAsset(resolution.id);\n      }\n\n      if (resolution?.specifier) {\n        id = resolution.specifier;\n      }\n\n      if (id.startsWith('.')) {\n        // Another bundle. Should already be loaded.\n        return {};\n      }\n\n      return defaultRequire(id);\n    };\n\n    require.resolve = defaultRequire.resolve;\n\n    return runModule(code, asset.filePath, cacheKey, require, parcelRequire);\n  };\n\n  let parcelRequire = (publicId: string) => {\n    return loadAsset(nullthrows(assetsByPublicId.get(publicId)));\n  };\n\n  parcelRequire.root = parcelRequire;\n\n  let publicUrl = bundle.target.publicUrl;\n  if (!publicUrl.endsWith('/')) {\n    publicUrl += '/';\n  }\n  parcelRequire.meta = {\n    distDir: bundle.target.distDir,\n    publicUrl,\n  };\n\n  let bundleLookup = bundleLookupCache.get(bundleGraph);\n  if (!bundleLookup) {\n    bundleLookup = new Map();\n    for (let bundle of bundleGraph.getBundles()) {\n      bundleLookup.set(bundle.publicId, bundle);\n      bundleLookup.set(bundle.name, bundle);\n    }\n    bundleLookupCache.set(bundleGraph, bundleLookup);\n  }\n\n  parcelRequire.load = async (filePath: string) => {\n    let bundle = bundleLookup?.get(filePath);\n    if (bundle) {\n      let {assets: subAssets} = await loadBundle(\n        bundle,\n        bundleGraph,\n        getInlineBundleContents,\n      );\n      for (let [id, [bundle, asset, code]] of subAssets) {\n        if (!assets.has(id)) {\n          assets.set(id, [bundle, asset, code]);\n          assetsByFilePath.set(getCacheKey(asset), asset.id);\n          assetsByPublicId.set(bundleGraph.getAssetPublicId(asset), asset.id);\n        }\n      }\n    } else {\n      throw new Error('Bundle not found');\n    }\n  };\n\n  parcelRequire.resolve = (url: string) => {\n    let bundle = bundleLookup?.get(url);\n    if (bundle) {\n      return urlJoin(bundle.target.publicUrl, bundle.name);\n    } else {\n      throw new Error('Bundle not found');\n    }\n  };\n\n  // No-op. We can access the bundle graph directly.\n  parcelRequire.extendImportMap = () => {};\n\n  // Resolve and load a module by specifier.\n  let loadModule = (id: string, from: string, env = 'react-client') => {\n    let resolver = env === 'react-server' ? serverResolver : clientResolver;\n    let res = resolver.resolve({\n      filename: id,\n      specifierType: 'commonjs',\n      parent: from,\n    });\n\n    if (res.error) {\n      throw new Error(`Could not resolve module \"${id}\" from \"${from}\"`);\n    }\n\n    let defaultRequire = Module.createRequire(from);\n    let resolution = res.resolution;\n    if (resolution.type === 'Builtin') {\n      let {scheme, module} = resolution.value;\n      return defaultRequire(scheme ? `${scheme}:${module}` : module);\n    }\n\n    if (resolution.type === 'Path') {\n      let cacheKey = resolution.value + '#' + env;\n      const cachedModule = moduleCache.get(cacheKey);\n      if (cachedModule) {\n        return cachedModule.exports;\n      }\n\n      let assetId = assetsByFilePath.get(cacheKey);\n      if (assetId) {\n        return loadAsset(assetId);\n      }\n\n      let filePath = resolution.value;\n      let code = fs.readFileSync(filePath, 'utf8');\n      let require = (id: string) => {\n        return loadModule(id, filePath, env);\n      };\n\n      require.resolve = defaultRequire.resolve;\n\n      return runModule(code, filePath, cacheKey, require, parcelRequire);\n    }\n\n    throw new Error('Unknown resolution');\n  };\n\n  return {load: loadAsset, loadModule, assets};\n}\n\nfunction createContext(options) {\n  // Create a fresh global context to execute code in on each build to avoid memory leaks.\n  // $FlowFixMe\n  let context: any = vm.createContext(vm.constants.DONT_CONTEXTIFY);\n  context.global = context;\n  context.AsyncLocalStorage = AsyncLocalStorage;\n  context.process = new Proxy(process, {\n    get(target, prop, receiver) {\n      // Expose the provided environment variables from Parcel instead of the global ones.\n      if (prop === 'env') {\n        return options.env;\n      }\n\n      return Reflect.get(target, prop, receiver);\n    },\n  });\n\n  // $FlowFixMe\n  for (let key of Object.getOwnPropertyNames(globalThis)) {\n    if (!context.hasOwnProperty(key)) {\n      Object.defineProperty(\n        context,\n        key,\n        // $FlowFixMe\n        Object.getOwnPropertyDescriptor(globalThis, key),\n      );\n    }\n  }\n\n  return context;\n}\n\nfunction runModule(\n  code: string,\n  filename: string,\n  id: string,\n  require: (id: string) => any,\n  parcelRequire: (id: string) => any,\n) {\n  let moduleFunction = vm.compileFunction(\n    code,\n    [\n      'exports',\n      'require',\n      'module',\n      '__dirname',\n      '__filename',\n      'parcelRequire',\n    ],\n    {\n      filename,\n      parsingContext: context,\n    },\n  );\n\n  let dirname = path.dirname(filename);\n  let module = {\n    exports: {},\n    require,\n    children: [],\n    filename,\n    id,\n    path: dirname,\n    bundle: parcelRequire,\n  };\n\n  moduleCache.set(id, module);\n  moduleFunction(\n    module.exports,\n    require,\n    module,\n    dirname,\n    filename,\n    parcelRequire,\n  );\n  return module.exports;\n}\n\nfunction getCacheKey(asset: Asset) {\n  return (\n    (asset.pipeline || '') +\n    asset.filePath +\n    '#' +\n    asset.env.context +\n    (asset.uniqueKey ? '-' + asset.uniqueKey : '')\n  );\n}\n\nfunction getSpecifier(dep: Dependency) {\n  if (typeof dep.meta.placeholder === 'string') {\n    return dep.meta.placeholder;\n  }\n\n  return dep.specifier;\n}\n\nfunction pageMeta(meta: Meta): any {\n  if (\n    meta.ssgMeta &&\n    typeof meta?.ssgMeta === 'object' &&\n    !Array.isArray(meta.ssgMeta)\n  ) {\n    return meta.ssgMeta;\n  }\n  return {};\n}\n"
  },
  {
    "path": "packages/packagers/svg/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-svg\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SVGPackager.js\",\n  \"source\": \"src/SVGPackager.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/svg/src/SVGPackager.js",
    "content": "// @flow\n\nimport type {BundleGraph, NamedBundle} from '@parcel/types';\nimport assert from 'assert';\nimport {Packager} from '@parcel/plugin';\nimport {blobToString, urlJoin, getURLReplacement} from '@parcel/utils';\nimport {\n  packageSvg,\n  type HtmlBundleReference,\n  type HtmlInlineBundle,\n} from '@parcel/rust';\nimport invariant from 'assert';\n\nexport default (new Packager({\n  async package({bundle, bundleGraph, getInlineBundleContents}) {\n    const assets = [];\n    bundle.traverseAssets(asset => {\n      assets.push(asset);\n    });\n\n    assert.strictEqual(\n      assets.length,\n      1,\n      'SVG bundles must only contain one asset',\n    );\n\n    let asset = assets[0];\n    let code = await asset.getBuffer();\n\n    let {bundles, importMap} = getBundleReferences(bundleGraph, bundle);\n    let inlineBundles = await getInlineBundles(\n      bundleGraph,\n      bundle,\n      getInlineBundleContents,\n    );\n\n    let res = packageSvg({\n      code,\n      xml: true,\n      bundles,\n      inlineBundles,\n      importMap,\n    });\n\n    return {contents: res.code};\n  },\n}): Packager);\n\nasync function getInlineBundles(\n  bundleGraph: BundleGraph<NamedBundle>,\n  bundle: NamedBundle,\n  getInlineBundleContents,\n) {\n  let inlineBundles: {|[string]: HtmlInlineBundle|} = {};\n\n  let dependencies = [];\n  bundle.traverse(node => {\n    if (node.type === 'dependency') {\n      dependencies.push(node.value);\n    }\n  });\n\n  for (let dependency of dependencies) {\n    let entryBundle = bundleGraph.getReferencedBundle(dependency, bundle);\n    if (entryBundle?.bundleBehavior === 'inline') {\n      let packagedBundle = await getInlineBundleContents(\n        entryBundle,\n        bundleGraph,\n      );\n      let packagedContents = await blobToString(packagedBundle.contents);\n\n      // Wrap scripts and styles with CDATA if needed to ensure characters are not interpreted as XML\n      if (entryBundle.type === 'js' || entryBundle.type === 'css') {\n        if (packagedContents.includes('<') || packagedContents.includes('&')) {\n          packagedContents = packagedContents.replace(/]]>/g, ']\\\\]>');\n          packagedContents = `<![CDATA[\\n${packagedContents}\\n]]>`;\n        }\n      }\n\n      let placeholder = dependency.meta?.placeholder ?? dependency.id;\n      invariant(typeof placeholder === 'string');\n      inlineBundles[placeholder] = {\n        contents: packagedContents,\n        module: false,\n      };\n    } else if (dependency.specifierType === 'url') {\n      let placeholder = dependency.meta?.placeholder ?? dependency.id;\n      invariant(typeof placeholder === 'string');\n      inlineBundles[placeholder] = {\n        contents: entryBundle\n          ? getURLReplacement({\n              dependency,\n              fromBundle: bundle,\n              toBundle: entryBundle,\n              relative: false,\n            }).to\n          : dependency.specifier,\n        module: false,\n      };\n    }\n  }\n\n  return inlineBundles;\n}\n\nfunction getBundleReferences(bundleGraph, htmlBundle) {\n  let bundles: HtmlBundleReference[] = [];\n  let importMap = {};\n\n  let referencedBundles = new Set(bundleGraph.getReferencedBundles(htmlBundle));\n  let nonRecursiveReferencedBundles = new Set(\n    bundleGraph.getReferencedBundles(htmlBundle, {recursive: false}),\n  );\n\n  for (let bundle of referencedBundles) {\n    let isDirectlyReferenced = nonRecursiveReferencedBundles.has(bundle);\n    if (bundle.type === 'css' && !isDirectlyReferenced) {\n      bundles.push({\n        type: 'StyleSheet',\n        value: {\n          href: urlJoin(bundle.target.publicUrl, bundle.name),\n        },\n      });\n    } else if (bundle.type === 'js' && !isDirectlyReferenced) {\n      bundles.push({\n        type: 'Script',\n        value: {\n          module: false,\n          nomodule: false,\n          src: urlJoin(bundle.target.publicUrl, bundle.name),\n        },\n      });\n    }\n  }\n\n  return {bundles, importMap};\n}\n"
  },
  {
    "path": "packages/packagers/ts/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-ts\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/TSPackager.js\",\n  \"source\": \"src/TSPackager.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/ts/src/TSPackager.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {Packager} from '@parcel/plugin';\n\nexport default (new Packager({\n  async package({bundle, getSourceMapReference}) {\n    let assets = [];\n    bundle.traverseAssets(asset => {\n      assets.push(asset);\n    });\n\n    assert.equal(assets.length, 1, 'TS bundles must only contain one asset');\n    let code = await assets[0].getCode();\n    let map = await assets[0].getMap();\n    if (map) {\n      let sourcemapReference = await getSourceMapReference(map);\n      if (sourcemapReference != null) {\n        code += '\\n//# sourceMappingURL=' + sourcemapReference + '\\n';\n      }\n    }\n\n    return {contents: code, map};\n  },\n}): Packager);\n"
  },
  {
    "path": "packages/packagers/wasm/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-wasm\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/WasmPackager.js\",\n  \"source\": \"src/WasmPackager.js\",\n  \"engines\": {\n    \"node\": \">=16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/wasm/src/WasmPackager.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport {Packager} from '@parcel/plugin';\nimport * as wasmmap from './wasm-sourcemap';\n\nexport default (new Packager({\n  async package({bundle, getSourceMapReference}) {\n    let assets = [];\n    bundle.traverseAssets(asset => {\n      assets.push(asset);\n    });\n\n    assert.equal(assets.length, 1, 'Wasm bundles must only contain one asset');\n\n    let [contents, map] = await Promise.all([\n      assets[0].getBuffer(),\n      assets[0].getMap(),\n    ]);\n    let sourcemapReference = await getSourceMapReference(map);\n    if (sourcemapReference != null) {\n      return {\n        contents: Buffer.from(\n          wasmmap.SetSourceMapURL(\n            contents,\n            sourcemapReference,\n            sourcemapReference.includes('HASH_REF_')\n              ? // HASH_REF_\\w{16} -> \\w{8}\n                sourcemapReference.length - (9 + 16 - 8)\n              : undefined,\n          ),\n        ),\n        map,\n      };\n    } else {\n      return {contents, map};\n    }\n  },\n}): Packager);\n"
  },
  {
    "path": "packages/packagers/wasm/src/wasm-sourcemap.js",
    "content": "/* eslint-disable */\n// Modified version of https://github.com/oasislabs/wasm-sourcemap/blob/77242f93ebd010cf69515d988b984244a119dd9d/index.js\n\n// Modifications Copyright 2019 Oasis Labs\n// Redistribution and use in source and binary forms, with or without modification, are permitted\n// provided that the following conditions are met:\n\n// 1. Redistributions of source code must retain the above copyright notice, this list of conditions\n//    and the following disclaimer.\n\n// 2. Redistributions in binary form must reproduce the above copyright notice, this list of\n//    conditions and the following disclaimer in the documentation and/or other materials provided\n//    with the distribution.\n\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY\n// WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nconst url = require('url');\n\nconst section = 'sourceMappingURL';\n\n// read a variable uint encoding from the buffer stream.\n// return the int, and the next position in the stream.\nfunction read_uint(buf, pos) {\n  let n = 0;\n  let shift = 0;\n  let b = buf[pos];\n  let outpos = pos + 1;\n  while (b >= 128) {\n    n = n | ((b - 128) << shift);\n    b = buf[outpos];\n    outpos++;\n    shift += 7;\n  }\n  return [n + (b << shift), outpos];\n}\n\n// Write a buffer with a variable uint encoding of a number.\nfunction encode_uint(n) {\n  let result = [];\n  while (n > 127) {\n    result.push(128 | (n & 127));\n    n = n >> 7;\n  }\n  result.push(n);\n  return new Uint8Array(result);\n}\n\nfunction ab2str(buf) {\n  let str = '';\n  let bytes = new Uint8Array(buf);\n  for (let i = 0; i < bytes.length; i++) {\n    str += String.fromCharCode(bytes[i]);\n  }\n  return str;\n}\n\nfunction str2ab(str) {\n  let bytes = new Uint8Array(str.length);\n  for (let i = 0; i < str.length; i++) {\n    bytes[i] = str[i].charCodeAt(0);\n  }\n  return bytes;\n}\n\n/**\n * Construct an array buffer representing a WASM 0-id\n * sections containing a given name and value pair.\n * @param {String} name\n * @param {String} value\n * @returns {Uint8Array}\n */\nfunction WriteSection(name, value, valLenOverride) {\n  const nameBuf = str2ab(name);\n  const valBuf = str2ab(value);\n  const nameLen = encode_uint(nameBuf.length);\n  const valLen = encode_uint(valLenOverride ?? valBuf.length);\n  const sectionLenDeclared =\n    nameLen.length +\n    nameBuf.length +\n    valLen.length +\n    (valLenOverride ?? valBuf.length);\n  const sectionLenActual =\n    nameLen.length + nameBuf.length + valLen.length + valBuf.length;\n  const headerLen = encode_uint(sectionLenDeclared);\n  let bytes = new Uint8Array(sectionLenActual + headerLen.length + 1);\n  let pos = 1;\n  bytes.set(headerLen, pos);\n  pos += headerLen.length;\n  bytes.set(nameLen, pos);\n  pos += nameLen.length;\n  bytes.set(nameBuf, pos);\n  pos += nameBuf.length;\n  const val_start = pos;\n  bytes.set(valLen, pos);\n  pos += valLen.length;\n  bytes.set(valBuf, pos);\n  return bytes;\n}\n\n/**\n * Search the module sections of a WASM buffer to find\n * a section with a given identifier.\n * @param {Buffer} buf\n * @param {String} id\n * @returns {Array.<Number>} An array with the index of\n *   the section, the length of the section, and the index\n *   of the beginning of the body of the section.\n */\nfunction FindSection(buf, id) {\n  let pos = 8;\n  while (pos < buf.byteLength) {\n    const sec_start = pos;\n    const [sec_id, pos2] = read_uint(buf, pos);\n    const [sec_size, body_pos] = read_uint(buf, pos2);\n    pos = body_pos + sec_size;\n    if (sec_id == 0) {\n      const [name_len, name_pos] = read_uint(buf, body_pos);\n      const name = buf.slice(name_pos, name_pos + name_len);\n      const nameString = ab2str(name);\n      if (nameString == id) {\n        return [\n          sec_start,\n          sec_size + 1 + (body_pos - pos2),\n          name_pos + name_len,\n        ];\n      }\n    }\n  }\n  return [-1, null, null];\n}\n\nmodule.exports = {\n  /**\n   * GetSourceMapURL extracts the source map from a WASM buffer.\n   * @param {Buffer} buf The WASM buffer\n   * @returns {String|null} The linked sourcemap URL if present.\n   */\n  GetSourceMapURL: function (buf) {\n    buf = new Uint8Array(buf);\n    const [sec_start, _, uri_start] = FindSection(buf, section);\n    if (sec_start == -1) {\n      return null;\n    }\n    const [uri_len, uri_pos] = read_uint(buf, uri_start);\n    return ab2str(buf.slice(uri_pos, uri_pos + uri_len));\n  },\n  RemoveSourceMapURL: function (buf) {\n    buf = new Uint8Array(buf);\n    const [sec_start, sec_size, _] = FindSection(buf, section);\n    if (sec_start == -1) {\n      return buf;\n    }\n    let strippedBuf = new Uint8Array(buf.length - sec_size);\n    strippedBuf.set(buf.slice(0, sec_start));\n    strippedBuf.set(buf.slice(sec_start + sec_size), sec_start);\n\n    return strippedBuf;\n  },\n  SetSourceMapURL: function (buf, url, urlLenOverride) {\n    const stripped = module.exports.RemoveSourceMapURL(buf);\n    const newSection = WriteSection(section, url, urlLenOverride);\n\n    const outBuf = new Uint8Array(stripped.length + newSection.length);\n    outBuf.set(stripped);\n    outBuf.set(newSection, stripped.length);\n\n    return outBuf;\n  },\n  SetSourceMapURLRelativeTo: function (buf, relativeURL) {\n    const originalURL = module.exports.GetSourceMapURL(buf);\n    const newURL = url.resolve(relativeURL, originalURL);\n    return module.exports.SetSourceMapURL(buf, newURL);\n  },\n};\n"
  },
  {
    "path": "packages/packagers/wasm/src/wasm-sourcemap.js.flow",
    "content": "// @flow\n\ndeclare module.exports: {|\n  /**\n   * GetSourceMapURL extracts the source map from a WASM buffer.\n   * @returns {String|null} The linked sourcemap URL if present.\n   */\n  GetSourceMapURL(buf: Uint8Array): string | null,\n  RemoveSourceMapURL(buf: Uint8Array): Uint8Array,\n  SetSourceMapURL(\n    buf: Uint8Array,\n    url: string,\n    urlLenOverride?: number,\n  ): Uint8Array,\n  SetSourceMapURLRelativeTo(buf: Uint8Array, relativeURL: string): Uint8Array,\n|};\n"
  },
  {
    "path": "packages/packagers/webextension/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-webextension\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/WebExtensionPackager.js\",\n  \"source\": \"src/WebExtensionPackager.js\",\n  \"engines\": {\n    \"node\": \">=16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/webextension/src/WebExtensionPackager.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport nullthrows from 'nullthrows';\nimport {Packager} from '@parcel/plugin';\nimport {replaceURLReferences, relativeBundlePath} from '@parcel/utils';\n\nexport default (new Packager({\n  async package({bundle, bundleGraph}) {\n    let assets = [];\n    bundle.traverseAssets(asset => {\n      assets.push(asset);\n    });\n    const manifestAssets = assets.filter(a => a.meta.webextEntry === true);\n\n    assert(\n      assets.length == 2 && manifestAssets.length == 1,\n      'Web extension bundles must contain exactly one manifest asset and one runtime asset',\n    );\n    const asset = manifestAssets[0];\n\n    const relPath = b =>\n      relativeBundlePath(bundle, b, {leadingDotSlash: false});\n\n    const manifest = JSON.parse(await asset.getCode());\n\n    if (manifest.background?.type === 'module') {\n      // service workers are built with output format 'global'\n      // see: https://github.com/parcel-bundler/parcel/blob/3329469f50de9326c5b02ef0ab1c0ce41393279c/packages/transformers/js/src/JSTransformer.js#L577\n      delete manifest.background.type;\n    }\n\n    const deps = asset.getDependencies();\n    const war = [];\n    for (const contentScript of manifest.content_scripts || []) {\n      const srcBundles = deps\n        .filter(\n          d =>\n            contentScript.js?.includes(d.id) ||\n            contentScript.css?.includes(d.id),\n        )\n        .map(d => nullthrows(bundleGraph.getReferencedBundle(d, bundle)));\n\n      contentScript.css = [\n        ...new Set(\n          srcBundles\n            .flatMap(b => bundleGraph.getReferencedBundles(b))\n            .filter(b => b.type == 'css')\n            .map(relPath)\n            .concat(contentScript.css || []),\n        ),\n      ];\n\n      contentScript.js = [\n        ...new Set(\n          srcBundles\n            .flatMap(b => bundleGraph.getReferencedBundles(b))\n            .filter(b => b.type == 'js')\n            .map(relPath)\n            .concat(contentScript.js || []),\n        ),\n      ];\n\n      const resources = srcBundles\n        .flatMap(b => {\n          const children = [];\n          const siblings = bundleGraph.getReferencedBundles(b);\n          bundleGraph.traverseBundles(child => {\n            if (b !== child && !siblings.includes(child)) {\n              children.push(child);\n            }\n          }, b);\n          return children;\n        })\n        .map(relPath);\n\n      if (resources.length > 0) {\n        war.push({\n          matches: contentScript.matches.map(match => {\n            if (/^(((http|ws)s?)|ftp|\\*):\\/\\//.test(match)) {\n              let pathIndex = match.indexOf('/', match.indexOf('://') + 3);\n              // Avoids creating additional errors in invalid match URLs\n              if (pathIndex == -1) pathIndex = match.length;\n              return match.slice(0, pathIndex) + '/*';\n            }\n            return match;\n          }),\n          resources,\n        });\n      }\n    }\n\n    const warResult = (manifest.web_accessible_resources || []).concat(\n      manifest.manifest_version == 2\n        ? [...new Set(war.flatMap(entry => entry.resources))]\n        : war,\n    );\n\n    if (warResult.length > 0) manifest.web_accessible_resources = warResult;\n\n    let {contents} = replaceURLReferences({\n      bundle,\n      bundleGraph,\n      contents: JSON.stringify(manifest),\n    });\n    return {contents};\n  },\n}): Packager);\n"
  },
  {
    "path": "packages/packagers/xml/package.json",
    "content": "{\n  \"name\": \"@parcel/packager-xml\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/XMLPackager.js\",\n  \"source\": \"src/XMLPackager.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@xmldom/xmldom\": \"^0.9.8\"\n  }\n}\n"
  },
  {
    "path": "packages/packagers/xml/src/XMLPackager.js",
    "content": "// @flow\n\nimport type {Bundle, BundleGraph, NamedBundle} from '@parcel/types';\nimport assert from 'assert';\nimport {Packager} from '@parcel/plugin';\nimport {\n  blobToString,\n  replaceInlineReferences,\n  replaceURLReferences,\n} from '@parcel/utils';\nimport {DOMParser, XMLSerializer} from '@xmldom/xmldom';\n\nexport default (new Packager({\n  async package({bundle, bundleGraph, getInlineBundleContents}) {\n    const assets = [];\n    bundle.traverseAssets(asset => {\n      assets.push(asset);\n    });\n\n    assert.strictEqual(\n      assets.length,\n      1,\n      'XML bundles must only contain one asset',\n    );\n\n    let asset = assets[0];\n    let code = await asset.getCode();\n    let parser = new DOMParser();\n    let dom = parser.parseFromString(code, 'application/xml');\n\n    let inlineElements = dom.getElementsByTagNameNS(\n      'https://parceljs.org',\n      'inline',\n    );\n    if (inlineElements.length > 0) {\n      for (let element of Array.from(inlineElements)) {\n        let key = element.getAttribute('key');\n        let type = element.getAttribute('type');\n\n        const newContent = await getAssetContent(\n          bundleGraph,\n          getInlineBundleContents,\n          key,\n        );\n\n        if (newContent === null) {\n          continue;\n        }\n\n        let contents = await blobToString(newContent.contents);\n        if (type === 'xhtml' || type === 'xml') {\n          let parsed = new DOMParser().parseFromString(\n            contents,\n            type === 'xhtml' ? 'text/html' : 'application/xml',\n          );\n          if (parsed.documentElement != null) {\n            let parent = element.parentNode;\n            parent.removeChild(element);\n            parent.appendChild(parsed.documentElement);\n          }\n        } else {\n          element.parentNode.textContent = contents;\n        }\n      }\n\n      code = new XMLSerializer().serializeToString(dom);\n    }\n\n    const {contents, map} = replaceURLReferences({\n      bundle,\n      bundleGraph,\n      contents: code,\n      relative: false,\n      getReplacement: contents => contents.replace(/\"/g, '&quot;'),\n    });\n\n    return replaceInlineReferences({\n      bundle,\n      bundleGraph,\n      contents,\n      getInlineBundleContents,\n      getInlineReplacement: (dep, inlineType, contents) => ({\n        from: dep.id,\n        to: contents.replace(/\"/g, '&quot;').trim(),\n      }),\n      map,\n    });\n  },\n}): Packager);\n\nasync function getAssetContent(\n  bundleGraph: BundleGraph<NamedBundle>,\n  getInlineBundleContents,\n  assetId,\n) {\n  let inlineBundle: ?Bundle;\n  bundleGraph.traverseBundles((bundle, context, {stop}) => {\n    const entryAssets = bundle.getEntryAssets();\n    if (entryAssets.some(a => a.uniqueKey === assetId)) {\n      inlineBundle = bundle;\n      stop();\n    }\n  });\n\n  if (!inlineBundle) {\n    return null;\n  }\n\n  const bundleResult = await getInlineBundleContents(inlineBundle, bundleGraph);\n\n  return {bundle: inlineBundle, contents: bundleResult.contents};\n}\n"
  },
  {
    "path": "packages/reporters/build-metrics/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-build-metrics\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/BuildMetricsReporter.js\",\n  \"source\": \"src/BuildMetricsReporter.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/build-metrics/src/BuildMetricsReporter.js",
    "content": "// @flow strict-local\nimport path from 'path';\n\nimport {Reporter} from '@parcel/plugin';\nimport {generateBuildMetrics} from '@parcel/utils';\n\ntype TimingValue = {|\n  timings: {[key: string]: number, ...},\n  lastPhase: string,\n|};\n\nlet timingsMap = new Map();\nconst getValue = (instanceId: string): TimingValue => {\n  if (!timingsMap.has(instanceId)) {\n    timingsMap.set(instanceId, {\n      timings: {},\n      lastPhase: 'resolving',\n    });\n  }\n\n  // $FlowFixMe\n  return timingsMap.get(instanceId);\n};\n\nexport default (new Reporter({\n  async report({event, options}) {\n    if (event.type === 'buildProgress') {\n      let value = getValue(options.instanceId);\n\n      value.timings[event.phase] = Date.now();\n      if (value.lastPhase !== event.phase) {\n        value.timings[value.lastPhase] =\n          Date.now() - value.timings[value.lastPhase];\n      }\n      value.lastPhase = event.phase;\n    } else if (event.type === 'buildSuccess') {\n      let value = getValue(options.instanceId);\n\n      value.timings[value.lastPhase] =\n        Date.now() - value.timings[value.lastPhase];\n      let metricsFilePath = path.join(\n        options.projectRoot,\n        'parcel-metrics.json',\n      );\n\n      let {bundles} = await generateBuildMetrics(\n        event.bundleGraph.getBundles(),\n        options.outputFS,\n        options.projectRoot,\n      );\n\n      let metrics = {\n        phaseTimings: value.timings,\n        buildTime: event.buildTime,\n        bundles: bundles.map(b => {\n          return {\n            filePath: b.filePath,\n            size: b.size,\n            time: b.time,\n            largestAssets: b.assets.slice(0, 10),\n            totalAssets: b.assets.length,\n          };\n        }),\n      };\n\n      await options.outputFS.writeFile(\n        metricsFilePath,\n        JSON.stringify(metrics),\n      );\n    }\n  },\n}): Reporter);\n"
  },
  {
    "path": "packages/reporters/bundle-analyzer/client/index.js",
    "content": "/* eslint-env browser */\n/* global CarrotSearchFoamTree */\n\nlet bundleData = JSON.parse(document.getElementById('bundle-data').innerText);\n\nlet visualization = document.createElement('div');\nvisualization.style.height = '100vh';\nvisualization.style.width = '100vw';\ndocument.body.appendChild(visualization);\n\nlet tooltip;\n\n// Foam Tree docs:\n// https://get.carrotsearch.com/foamtree/demo/api/index.html\n// Some options from Parcel 1 Visualizer:\n// https://github.com/gregtillbrook/parcel-plugin-bundle-visualiser/blob/ca5440fc61c85e40e7abc220ad99e274c7c104c6/src/buildReportAssets/init.js#L4\n// and Webpack Bundle Analyzer:\n// https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/4a232f0cf7bbfed907a5c554879edd5d6f4b48ce/client/components/Treemap.jsx\nlet foamtree = new CarrotSearchFoamTree({\n  element: visualization,\n  dataObject: bundleData,\n  layout: 'squarified',\n  stacking: 'flattened',\n  pixelRatio: window.devicePixelRatio || 1,\n  maxGroups: Infinity,\n  maxGroupLevelsDrawn: Infinity,\n  maxGroupLabelLevelsDrawn: Infinity,\n  maxGroupLevelsAttached: Infinity,\n  rolloutDuration: 0,\n  pullbackDuration: 0,\n  maxLabelSizeForTitleBar: 0, // disable the title bar\n  onGroupHover(e) {\n    if (e.group.label == null || e.group.weight == null) {\n      if (tooltip != null) {\n        tooltip.remove();\n        tooltip = null;\n      }\n      return;\n    }\n\n    if (tooltip == null) {\n      tooltip = document.createElement('div');\n      tooltip.classList.add('tooltip');\n      document.body.appendChild(tooltip);\n    }\n\n    tooltip.style.transform = translate3d(e.xAbsolute, e.yAbsolute, 0);\n    tooltip.innerHTML = `\n      <div class=\"tooltip-content\">\n        <div>\n          <span class=\"tooltip-title\">${e.group.label}</span>\n        </div>\n        <dl>\n          <div>\n            <dt>Size</dt>\n            <dd>${formatSize(e.group.weight)}</dd>\n          </div>\n        </dl>\n      </div>\n    `;\n  },\n  onGroupClick(e) {\n    this.zoom(e.group);\n  },\n});\n\nvisualization.addEventListener('mousemove', e => {\n  if (tooltip == null) {\n    return;\n  }\n\n  tooltip.style.transform = translate3d(\n    visualization.clientLeft + e.clientX,\n    visualization.clientTop + e.clientY,\n    0,\n  );\n});\n\nwindow.addEventListener(\n  'resize',\n  debounce(() => {\n    foamtree.resize();\n  }, 100),\n);\n\nfunction debounce(fn, delay) {\n  let timeout;\n\n  return function(...args) {\n    if (timeout) {\n      clearTimeout(timeout);\n    }\n\n    timeout = setTimeout(() => {\n      fn(...args);\n    }, delay);\n  };\n}\n\nfunction translate3d(x, y, z) {\n  return `translate3d(${x}px, ${y}px, ${z}px)`;\n}\n\nconst UNITS = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\nfunction formatSize(x) {\n  let l = 0, n = parseInt(x, 10) || 0;\n  while(n >= 1000 && ++l){\n      n /= 1000;\n  }\n  return(`${n.toFixed(l > 0 ? 2 : 0)} ${UNITS[l]}`);\n}\n"
  },
  {
    "path": "packages/reporters/bundle-analyzer/client/vendor/foamtree/LICENSE.txt",
    "content": "Carrot Search FoamTree License Agreement\n\nBy downloading, installing, copying, saving on your computer, or otherwise\nusing this software, you (Licensee, as defined below) are becoming a party to\nthis Agreement and you are consenting to be bound by all the terms and\nconditions of this Agreement. If you do not agree to the terms and conditions\nof this Agreement, you should not download, install or use the software.\n\nIf there is a separate agreement in force between Carrot Search and the\nLicensee, Licensee will not be bound by this Agreement.\n\nUpon your acceptance of this Agreement, Carrot Search grants to you a\nnon-exclusive and non-transferable license to use FoamTree, provided that you\nagree to the following:\n\n\n1. Parties\n\na. Carrot Search means Carrot Search s.c., located at Boznicza 11/57, 61-751\nPoznan, Poland.\n\nb. Licensee means the individual or legal entity specified in the License File\ndefined below.\n\n\n2. Definitions\n\na. FoamTree means a software system for visualizing hierarchical data\nstructures. FoamTree is distributed in a binary form along with documentation.\n\nb. Integration Code means the source code provided by Carrot Search to Licensee\nto facilitate integration of FoamTree with the software developed by Licensee.\n\nc. License File means electronic evidence and specification of the license\ngranted to the Licensee by Carrot Search. Only Carrot Search is permitted to\nproduce License Files for FoamTree.\n\nd. Licensing Period means the perpetual or limited period in which Licensee can\nuse FoamTree. Licensing Period is specified in the License File.\n\ne. Maintenance Period means the limited period in which Licensee is entitled to\nupgrade to new versions of FoamTree and receive support. Maintenance Period is\nspecified in the License File.\n\nf. Server means a computer controlled by Licensee which serves FoamTree for the\npurposes of delivering services to end users. Identification of the Server in\nthe License File may vary based on the characteristics of Licensee's software\nthat uses FoamTree.\n\n\n3. Ownership\n\na. FoamTree is the property of Carrot Search. FoamTree is licensed, not sold.\nTitle and copyrights to FoamTree, in whole or in part, and all copies thereof,\nand all modifications, enhancements, derivatives and other alterations of\nFoamTree, regardless of who made them, if any, are, and will remain, the sole\nand exclusive property of Carrot Search.\n\nb. The structure, organization, and code embodied in FoamTree, except for\nIntegration Code, are valuable and confidential trade secrets of Carrot Search\nand are protected by copyright laws, intellectual property laws and treaties.\nLicensee agrees to abide by the copyright law and all other applicable laws.\n\n\n4. Grant of license\n\nSubject to the terms, conditions, and limitations set forth in this Agreement,\nCarrot Search hereby grants to Licensee a worldwide, limited, non-exclusive,\nnon-transferable license to use FoamTree as follows:\n\na. Licensee may:\n\n   i. serve FoamTree from the Server or Servers identified in the License File\n   for the purposes of delivering services to end users during the Licensing\n   Period;\n\n   ii. use FoamTree on computers controlled by Licensee for the purposes of\n   development of Licensee's software dependent on FoamTree during the Licensing\n   Period;\n\n   iii. upgrade to any version of FoamTree released during the Maintenance\n   Period;\n\n   iv. include Integration Code, in entirety or in parts, in the software\n   developed by Licensee;\n\n   v. make back-up copies of FoamTree and License File solely for archival\n   purposes;\n\n   vi. use the Limited Version of FoamTree, as described in Section 5, without\n   purchasing a License File.\n\n\nb. Licensee may not:\n\n   i. sell, redistribute, encumber, give, lend, rent, lease, sublicense, or\n   otherwise transfer FoamTree, or any portions of FoamTree, to anyone without\n   the prior written consent of Carrot Search;\n\n   ii. reverse engineer, decompile, disassemble, modify, translate, make any\n   attempt to discover the source code of FoamTree, or create derivative works\n   from FoamTree;\n\n   iii. allow the use of FoamTree on Servers not identified in the License File;\n\n   iv. disable, remove or circumvent the feature limitation mechanisms built\n   into the Limited Version of FoamTree. Any attempt to do so will be in\n   violation of this Agreement and will terminate Licensee's rights to use\n   FoamTree.\n\n\nc. Carrot Search will:\n\n   i. promptly, and in any event within 72 hours, respond to e-mail requests\n   for support that are made during mutually agreed upon business hours, taking\n   into account time zone differences, except weekends and holidays;\n\n   ii. notify Licensee of and provide any bug fix and new releases of FoamTree;\n\n   iii. provide a number of free consulting hours, specified in the License\n   File, for integration code adjustments, performance tuning and extra\n   documentation. Any additional technical support shall be charged at standard\n   Carrot Search hourly rate.\n\n\n5. Use of the Limited Version\n\na. Subject to the terms of this Agreement, Licensee is granted a right to use\nthe Limited Version of FoamTree without charge;\n\n\n6. Disclaimer of warranty\n\nFoamTree is provided on an \"as is\" without warranties of any kind, express,\nimplied or statutory, including but not limited to, the implied warranties of\ntitle, noninfringement, merchantability and fitness for a particular purpose.\n\n\n7. Disclaimer of damages\n\na. Regardless of whether any remedy set forth herein fails of its essential\npurpose, in no event will Carrot Search be liable to Licensee under any theory\nfor any damages suffered by Licensee or any user of FoamTree, or for any\nspecial, incidental, indirect, consequential, or similar damages (including\nwithout limitation, damages for loss of business profits, business\ninterruption, loss of business information, or any other pecuniary loss)\narising out of the use or inability to use FoamTree, or the provision of or\nfailure to provide support services, even if Carrot Search has been advised of\nthe possibility of such damages, and regardless of the legal or equitable\ntheory (contract, tort or otherwise) upon which the claim is based;\n\nb. In any case, Carrot Search's entire liability under any provision of this\nagreement will be limited to the amount actually paid by licensee for FoamTree.\n\n\n8. Term and Termination\n\nThis Agreement takes effect upon Licensee's acceptance of the terms of this\nAgreement and remains effective until terminated by either party in accordance\nwith this Agreement. Licensee may terminate this Agreement at any time by\ndestroying all copies of FoamTree. This Agreement will automatically terminate\nif Licensee fails to comply with any term or condition of this Agreement. Upon\ntermination of this Agreement, Licensee warrants that they will immediately\ndestroy all copies of FoamTree.\n\n\n9. General\n\na. Unless the Licensee explicitly opts out by notifying the Carrot Search, the\nLicensee agrees to be identified as a customer of Carrot Search and that Carrot\nSearch may refer to Licensee by name, trade name and trademark on Carrot Search\nweb site and marketing materials;\n\nb. Carrot Search reserves the right at any time to cease the support of FoamTree\nand to alter prices, features, specifications, capabilities, functions,\nlicensing terms, release dates, general availability or other characteristics\nof FoamTree;\n\nc. This Agreement, including Third Party Software license agreements,\nconstitutes the entire agreement between the parties concerning Licensee' use\nof the Software, and supersedes any and all prior or contemporaneous oral or\nwritten representations, communications, or advertising with respect to the\nSoftware. No purchase order, other ordering document or any hand written or\ntypewritten text which purports to modify or supplement the printed text of\nthis Agreement or any schedule will add to or vary the terms of this Agreement\nunless signed by both Licensee and Carrot Search.\n\nd. A waiver by either party of any term or condition of this Agreement or any\nbreach thereof, in any one instance, will not waive such term or condition or\nany subsequent breach. The provisions of this Agreement which require or\ncontemplate performance after the expiration or termination of this Agreement\nwill be enforceable notwithstanding said expiration or termination.\n\ne. This Agreement will be construed under the laws of the Polish trade and\nEuropean Union, without regard to conflicts of laws provisions thereof. This\nAgreement and the performance of all obligations hereunder shall be governed\naccording to Polish Law and the parties hereto hereby submit to the\njurisdiction of the Polish Courts. All civil suits between the parties hereto\nshall be adjudicated by a common court with official residence in Poznan,\nPoland.\n\nf. Titles are inserted for convenience only and will not affect in any way the\nmeaning or interpretation of this Agreement. If any provision of this Agreement\nis held invalid, the remainder of this Agreement will continue in full force\nand effect. Either Licensor or Licensee may assign this Agreement in the case\nof a merger or sale of substantially all of its respective assets to another\nentity. This Agreement will be binding upon and will inure to the benefit of\nthe parties, their successors and assigns.\n"
  },
  {
    "path": "packages/reporters/bundle-analyzer/client/vendor/foamtree/carrotsearch.foamtree.js",
    "content": "/**\n * Carrot Search FoamTree HTML5 (demo variant)\n * v3.4.9, bugfix/3.4.x/b84d33dd, build FOAMTREE-SOFTWARE4-DIST-70, Sep 10, 2019\n * \n * Carrot Search confidential.\n * Copyright 2002-2019, Carrot Search s.c, All Rights Reserved.\n */\n(function() {var v=function(){var a=window.navigator.userAgent,m;try{window.localStorage.setItem(\"ftap5caavc\",\"ftap5caavc\"),window.localStorage.removeItem(\"ftap5caavc\"),m=!0}catch(k){m=!1}return{nf:function(){return/webkit/i.test(a)},mi:function(){return/Mac/.test(a)},lf:function(){return/iPad|iPod|iPhone/.test(a)},hf:function(){return/Android/.test(a)},ii:function(){return\"ontouchstart\"in window||!!window.DocumentTouch&&document instanceof window.DocumentTouch},hi:function(){return m},gi:function(){var a=document.createElement(\"canvas\");\nreturn!(!a.getContext||!a.getContext(\"2d\"))},Dd:function(a,c){return[].forEach&&v.gi()?a&&a():c&&c()}}}();var ba=function(){function a(){return window.performance&&(window.performance.now||window.performance.mozNow||window.performance.msNow||window.performance.oNow||window.performance.webkitNow)||Date.now}var m=a();return{create:function(){return{now:function(){var k=a();return function(){return k.call(window.performance)}}()}},now:function(){return m.call(window.performance)}}}();function da(){function a(){if(!d)throw\"AF0\";var a=ba.now();0!==g&&(k.Kd=a-g);g=a;c=c.filter(function(a){return null!==a});k.frames++;for(var e=0;e<c.length;e++){var b=c[e];null!==b&&(!0===b.ye.call(b.Xg)?c[e]=null:D.Sc(b.repeat)&&(b.repeat=b.repeat-1,0>=b.repeat&&(c[e]=null)))}c=c.filter(function(a){return null!==a});d=!1;m();a=ba.now()-a;0!==a&&(k.Jd=a);k.totalTime+=a;k.Oe=1E3*k.frames/k.totalTime;g=0===c.length?0:ba.now()}function m(){0<c.length&&!d&&(d=!0,f(a))}var k=this.qg={frames:0,totalTime:0,\nJd:0,Kd:0,Oe:0};fa=k;var f=function(){return v.lf()?function(a){window.setTimeout(a,0)}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(){var a=ba.create();return function(e){var b=0;window.setTimeout(function(){var c=a.now();e();b=a.now()-c},16>b?16-b:0)}}()}(),c=[],d=!1,g=0;this.repeat=function(a,e,b){this.cancel(a);c.push({ye:a,Xg:b,repeat:e});m()};this.d=function(a,e){this.repeat(a,\n1,e)};this.cancel=function(a){for(var e=0;e<c.length;e++){var b=c[e];null!==b&&b.ye===a&&(c[e]=null)}};this.k=function(){c=[]}}var fa;var ga=v.Dd(function(){function a(){this.buffer=[];this.oa=0;this.Gc=D.extend({},g)}function m(a){return function(){var e,b=this.buffer,c=this.oa;b[c++]=\"call\";b[c++]=a;b[c++]=arguments.length;for(e=0;e<arguments.length;e++)b[c++]=arguments[e];this.oa=c}}function k(a){return function(){return c[a].apply(c,arguments)}}var f=document.createElement(\"canvas\");f.width=1;f.height=1;var c=f.getContext(\"2d\"),f=[\"font\"],d=\"fillStyle globalAlpha globalCompositeOperation lineCap lineDashOffset lineJoin lineWidth miterLimit shadowBlur shadowColor shadowOffsetX shadowOffsetY strokeStyle textAlign textBaseline\".split(\" \"),\ng={};d.concat(f).forEach(function(a){g[a]=c[a]});a.prototype.clear=function(){this.oa=0};a.prototype.Na=function(){return 0===this.oa};a.prototype.Ta=function(a){function e(a,b,e){for(var c=0,d=a.oa,f=a.buffer;c<e;)f[d++]=b[c++];a.oa=d}function b(a,b,e,c){for(var d=0;d<e;)switch(b[d++]){case \"set\":a[b[d++]]=b[d++];break;case \"setGlobalAlpha\":a[b[d++]]=b[d++]*c;break;case \"call\":var f=b[d++];switch(b[d++]){case 0:a[f]();break;case 1:a[f](b[d++]);break;case 2:a[f](b[d++],b[d++]);break;case 3:a[f](b[d++],\nb[d++],b[d++]);break;case 4:a[f](b[d++],b[d++],b[d++],b[d++]);break;case 5:a[f](b[d++],b[d++],b[d++],b[d++],b[d++]);break;case 6:a[f](b[d++],b[d++],b[d++],b[d++],b[d++],b[d++]);break;case 7:a[f](b[d++],b[d++],b[d++],b[d++],b[d++],b[d++],b[d++]);break;case 8:a[f](b[d++],b[d++],b[d++],b[d++],b[d++],b[d++],b[d++],b[d++]);break;case 9:a[f](b[d++],b[d++],b[d++],b[d++],b[d++],b[d++],b[d++],b[d++],b[d++]);break;default:throw\"CB0\";}}}a instanceof ga?e(a,this.buffer,this.oa):b(a,this.buffer,this.oa,D.B(a.globalAlpha,\n1))};a.prototype.replay=a.prototype.Ta;a.prototype.d=function(){return new a};a.prototype.scratch=a.prototype.d;\"arc arcTo beginPath bezierCurveTo clearRect clip closePath drawImage fill fillRect fillText lineTo moveTo putImageData quadraticCurveTo rect rotate scale setLineDash setTransform stroke strokeRect strokeText transform translate\".split(\" \").forEach(function(d){a.prototype[d]=m(d)});[\"measureText\",\"createLinearGradient\",\"createRadialGradient\",\"createPattern\",\"getLineDash\"].forEach(function(d){a.prototype[d]=\nk(d)});[\"save\",\"restore\"].forEach(function(d){a.prototype[d]=function(a,b){return function(){a.apply(this,arguments);b.apply(this,arguments)}}(m(d),k(d))});f.forEach(function(d){Object.defineProperty(a.prototype,d,{set:function(a){c[d]=a;this.Gc[d]=a;var b=this.buffer;b[this.oa++]=\"set\";b[this.oa++]=d;b[this.oa++]=a},get:function(){return this.Gc[d]}})});d.forEach(function(d){Object.defineProperty(a.prototype,d,{set:function(a){this.Gc[d]=a;var b=this.buffer;b[this.oa++]=\"globalAlpha\"===d?\"setGlobalAlpha\":\n\"set\";b[this.oa++]=d;b[this.oa++]=a},get:function(){return this.Gc[d]}})});a.prototype.roundRect=function(a,d,b,c,f){this.beginPath();this.moveTo(a+f,d);this.lineTo(a+b-f,d);this.quadraticCurveTo(a+b,d,a+b,d+f);this.lineTo(a+b,d+c-f);this.quadraticCurveTo(a+b,d+c,a+b-f,d+c);this.lineTo(a+f,d+c);this.quadraticCurveTo(a,d+c,a,d+c-f);this.lineTo(a,d+f);this.quadraticCurveTo(a,d,a+f,d);this.closePath()};a.prototype.fillPolygonWithText=function(a,d,b,c,f){f||(f={});var k={rb:D.B(f.maxFontSize,G.Ea.rb),\nZc:D.B(f.minFontSize,G.Ea.Zc),lineHeight:D.B(f.lineHeight,G.Ea.lineHeight),ob:D.B(f.horizontalPadding,G.Ea.ob),cb:D.B(f.verticalPadding,G.Ea.cb),sb:D.B(f.maxTotalTextHeight,G.Ea.sb),fontFamily:D.B(f.fontFamily,G.Ea.fontFamily),fontStyle:D.B(f.fontStyle,G.Ea.fontStyle),fontVariant:D.B(f.fontVariant,G.Ea.fontVariant),fontWeight:D.B(f.fontWeight,G.Ea.fontWeight),verticalAlign:D.B(f.verticalAlign,G.Ea.verticalAlign)},g=f.cache;if(g&&D.N(f,\"area\")){g.jd||(g.jd=new ga);var r=f.area,s=D.B(f.cacheInvalidationThreshold,\n0.05);a=G.xe(k,this,c,a,M.q(a,{}),{x:d,y:b},f.allowForcedSplit||!1,f.allowEllipsis||!1,g,r,s,f.invalidateCache)}else a=G.Le(k,this,c,a,M.q(a,{}),{x:d,y:b},f.allowForcedSplit||!1,f.allowEllipsis||!1);return a.la?{fit:!0,lineCount:a.mc,fontSize:a.fontSize,box:{x:a.ea.x,y:a.ea.y,w:a.ea.f,h:a.ea.i},ellipsis:a.ec}:{fit:!1}};return a});var ha=v.Dd(function(){function a(a){this.Q=a;this.d=[];this.Ib=[void 0];this.Nc=[\"#SIZE#px sans-serif\"];this.Ld=[0];this.Md=[1];this.ie=[0];this.je=[0];this.ke=[0];this.Qd=[10];this.hc=[10];this.Sb=[this.Ib,this.Nc,this.hc,this.Ld,this.Md,this.ie,this.Qd,this.je,this.ke];this.ga=[1,0,0,1,0,0]}function m(a){var d=a.Q,c=a.Sb[0].length-1;a.Ib[c]&&(d.setLineDash(a.Ib[c]),d.Vj=a.Ld[c]);d.miterLimit=a.Qd[c];d.lineWidth=a.Md[c];d.shadowBlur=a.ie[c];d.shadowOffsetX=a.je[c];d.shadowOffsetY=a.ke[c];d.font=\na.Nc[c].replace(\"#SIZE#\",a.hc[c].toString())}function k(a){return function(){return this.Q[a].apply(this.Q,arguments)}}function f(a){return function(c,e){var f=this.ga;return this.Q[a].call(this.Q,d(c,e,f),g(c,e,f))}}function c(a){return function(c,e,f,k){var r=this.ga;return this.Q[a].call(this.Q,d(c,e,r),g(c,e,r),f*r[0],k*r[3])}}function d(a,d,c){return a*c[0]+d*c[2]+c[4]}function g(a,d,c){return a*c[1]+d*c[3]+c[5]}function l(a,d){for(var c=0;c<a.length;c++)a[c]*=d[0];return a}a.prototype.save=\nfunction(){this.d.push(this.ga.slice(0));for(var a=0;a<this.Sb.length;a++){var d=this.Sb[a];d.push(d[d.length-1])}this.Q.save()};a.prototype.restore=function(){this.ga=this.d.pop();for(var a=0;a<this.Sb.length;a++)this.Sb[a].pop();this.Q.restore();m(this)};a.prototype.scale=function(a,d){var c=this.ga;c[0]*=a;c[1]*=a;c[2]*=d;c[3]*=d;var c=this.ga,e=this.Sb,f=e[0].length-1,k=this.Ib[f];k&&l(k,c);for(k=2;k<e.length;k++){var g=e[k];g[f]*=c[0]}m(this)};a.prototype.translate=function(a,d){var c=this.ga;\nc[4]+=c[0]*a+c[2]*d;c[5]+=c[1]*a+c[3]*d};[\"moveTo\",\"lineTo\"].forEach(function(b){a.prototype[b]=f(b)});[\"clearRect\",\"fillRect\",\"strokeRect\",\"rect\"].forEach(function(b){a.prototype[b]=c(b)});\"fill stroke beginPath closePath clip createImageData createPattern getImageData putImageData getLineDash setLineDash\".split(\" \").forEach(function(b){a.prototype[b]=k(b)});[{ub:\"lineDashOffset\",zb:function(a){return a.Ld}},{ub:\"lineWidth\",zb:function(a){return a.Md}},{ub:\"miterLimit\",zb:function(a){return a.Qd}},\n{ub:\"shadowBlur\",zb:function(a){return a.ie}},{ub:\"shadowOffsetX\",zb:function(a){return a.je}},{ub:\"shadowOffsetY\",zb:function(a){return a.ke}}].forEach(function(b){Object.defineProperty(a.prototype,b.ub,{set:function(a){var d=b.zb(this);a*=this.ga[0];d[d.length-1]=a;this.Q[b.ub]=a}})});var e=/(\\d+(?:\\.\\d+)?)px/;Object.defineProperty(a.prototype,\"font\",{set:function(a){var d=e.exec(a);if(1<d.length){var c=this.hc.length-1;this.hc[c]=parseFloat(d[1]);this.Nc[c]=a.replace(e,\"#SIZE#px\");this.Q.font=\nthis.Nc[c].replace(\"#SIZE#\",(this.hc[c]*this.ga[0]).toString())}}});\"fillStyle globalAlpha globalCompositeOperation lineCap lineJoin shadowColor strokeStyle textAlign textBaseline\".split(\" \").forEach(function(b){Object.defineProperty(a.prototype,b,{set:function(a){this.Q[b]=a}})});a.prototype.arc=function(a,c,e,f,k,r){var s=this.ga;this.Q.arc(d(a,c,s),g(a,c,s),e*s[0],f,k,r)};a.prototype.arcTo=function(a,c,e,f,k){var r=this.ga;this.Q.arc(d(a,c,r),g(a,c,r),d(e,f,r),g(e,f,r),k*r[0])};a.prototype.bezierCurveTo=\nfunction(a,c,e,f,k,r){var s=this.ga;this.Q.bezierCurveTo(d(a,c,s),g(a,c,s),d(e,f,s),g(e,f,s),d(k,r,s),g(k,r,s))};a.prototype.drawImage=function(a,c,e,f,k,r,s,l,m){function y(c,e,f,k){A.push(d(c,e,x));A.push(g(c,e,x));f=D.V(f)?a.width:f;k=D.V(k)?a.height:k;A.push(f*x[0]);A.push(k*x[3])}var x=this.ga,A=[a];D.V(r)?y(c,e,f,k):y(r,s,l,m);this.Q.drawImage.apply(this.Q,A)};a.prototype.quadraticCurveTo=function(a,c,e,f){var k=this.ga;this.Q.quadraticCurveTo(d(a,c,k),g(a,c,k),d(e,f,k),g(e,f,k))};a.prototype.fillText=\nfunction(a,c,e,f){var k=this.ga;this.Q.fillText(a,d(c,e,k),g(c,e,k),D.Sc(f)?f*k[0]:1E20)};a.prototype.setLineDash=function(a){a=l(a.slice(0),this.ga);this.Ib[this.Ib.length-1]=a;this.Q.setLineDash(a)};return a});var ja=function(){var a=!v.nf()||v.lf()||v.hf()?1:7;return{eh:function(){function m(a){a.beginPath();ia.le(a,l)}var k=document.createElement(\"canvas\");k.width=800;k.height=600;var f=k.getContext(\"2d\"),c=k.width,k=k.height,d,g=0,l=[{x:0,y:100}];for(d=1;6>=d;d++)g=2*d*Math.PI/6,l.push({x:0+100*Math.sin(g),y:0+100*Math.cos(g)});d={polygonPlainFill:[m,function(a){a.fillStyle=\"rgb(255, 0, 0)\";a.fill()}],polygonPlainStroke:[m,function(a){a.strokeStyle=\"rgb(128, 0, 0)\";a.lineWidth=2;a.closePath();a.stroke()}],\npolygonGradientFill:[m,function(a){var b=a.createRadialGradient(0,0,10,0,0,60);b.addColorStop(0,\"rgb(255, 0, 0)\");b.addColorStop(1,\"rgb(255, 255, 0)\");a.fillStyle=b;a.fill()}],polygonGradientStroke:[m,function(a){var b=a.createLinearGradient(-100,-100,100,100);b.addColorStop(0,\"rgb(224, 0, 0)\");b.addColorStop(1,\"rgb(32, 0, 0)\");a.strokeStyle=b;a.lineWidth=2;a.closePath();a.stroke()}],polygonExposureShadow:[m,function(a){a.shadowBlur=50;a.shadowColor=\"rgba(0, 0, 0, 1)\";a.fillStyle=\"rgba(0, 0, 0, 1)\";\na.globalCompositeOperation=\"source-over\";a.fill();a.shadowBlur=0;a.shadowColor=\"transparent\";a.globalCompositeOperation=\"destination-out\";a.fill()}],labelPlainFill:[function(a){a.fillStyle=\"#000\";a.font=\"24px sans-serif\";a.textAlign=\"center\"},function(a){a.fillText(\"Some text\",0,-16);a.fillText(\"for testing purposes\",0,16)}]};var g=100/Object.keys(d).length,e=ba.now(),b={},h;for(h in d){var n=d[h],q=ba.now(),p,r=0;do{f.save();f.translate(Math.random()*c,Math.random()*k);p=3*Math.random()+0.5;f.scale(p,\np);for(p=0;p<n.length;p++)n[p](f);f.restore();r++;p=ba.now()}while(p-q<g);b[h]=a*(p-q)/r}b.total=ba.now()-e;return b}}}();var ia={le:function(a,m){var k=m[0];a.moveTo(k.x,k.y);for(var f=m.length-1;0<f;f--)k=m[f],a.lineTo(k.x,k.y)},tj:function(a,m,k,f){var c,d,g,l=[],e=0,b=m.length;for(g=0;g<b;g++)c=m[g],d=m[(g+1)%b],c=M.d(c,d),c=Math.sqrt(c),l.push(c),e+=c;k=f*(k+0.5*f*e/b);var h,n;f={};var e={},q={},p=0;for(g=0;g<b;g++)c=m[g],d=m[(g+1)%b],h=m[(g+2)%b],n=l[(g+1)%b],n=Math.min(0.5,k/n),M.Aa(1-n,d,h,e),M.Aa(n,d,h,q),p++,0==g&&(h=Math.min(0.5,k/l[0]),M.Aa(h,c,d,f),p++,a.moveTo(f.x,f.y)),a.quadraticCurveTo(d.x,d.y,e.x,e.y),\na.lineTo(q.x,q.y);return!0}};function ka(a){function m(){return\"embedded\"===c.getAttribute(\"data-foamtree\")}function k(a){n[a]&&(n[a].style.opacity=p*q[a])}function f(a){a.width=Math.round(g*a.n);a.height=Math.round(l*a.n)}var c,d,g,l,e,b,h=[],n={},q={},p=0;this.H=function(f){c=f;0!==c.clientWidth&&0!==c.clientHeight||la.Pa(\"element has zero dimensions: \"+c.clientWidth+\" x \"+c.clientHeight+\".\");c.innerHTML=\"\";g=c.clientWidth;l=c.clientHeight;e=0!==g?g:void 0;b=0!==l?l:void 0;m()&&la.Pa(\"visualization already embedded in the element.\");\nc.setAttribute(\"data-foamtree\",\"embedded\");d=document.createElement(\"div\");d.style.width=\"100%\";d.style.height=\"100%\";d.style.position=\"relative\";c.appendChild(d);a.c.p(\"stage:initialized\",this,d,g,l)};this.kb=function(){m()&&(c.removeAttribute(\"data-foamtree\"),h=[],n={},c.removeChild(d),a.c.p(\"stage:disposed\",this,d))};this.k=function(){g=c.clientWidth;l=c.clientHeight;if(0!==g&&0!==l&&(g!==e||l!==b)){for(var d=h.length-1;0<=d;d--)f(h[d]);a.c.p(\"stage:resized\",e,b,g,l);e=g;b=l}};this.hj=function(a,\nb){a.n=b;f(a)};this.oc=function(b,c,e){var g=document.createElement(\"canvas\");g.setAttribute(\"style\",\"position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;\");g.n=c;f(g);h.push(g);n[b]=g;q[b]=1;k(b);e||d.appendChild(g);a.c.p(\"stage:newLayer\",b,g);return g};this.kc=function(a,b){D.V(b)||(q[a]=b,k(a));return q[a]};this.d=function(a){D.V(a)||(p=a,D.Ga(n,\nfunction(a,b){k(b)}));return p}};function oa(a){function m(a,b,e){y=!0;q.x=0;q.y=0;p.x=0;p.y=0;c=h;d.x=n.x;d.y=n.y;b();g*=a;l=e?g/c:a;l=Math.max(0.25/c,l);return!0}function k(a,b){b.x=a.x/h+n.x;b.y=a.y/h+n.y;return b}function f(a,b,d,c,e,f,k,g,h){var s=(a-d)*(f-g)-(b-c)*(e-k);if(1E-5>Math.abs(s))return!1;h.x=((a*c-b*d)*(e-k)-(a-d)*(e*g-f*k))/s;h.y=((a*c-b*d)*(f-g)-(b-c)*(e*g-f*k))/s;return!0}var c=1,d={x:0,y:0},g=1,l=1,e=1,b={x:0,y:0},h=1,n={x:0,y:0},q={x:0,y:0},p={x:0,y:0},r,s,w={x:0,y:0,f:0,i:0},u={x:0,y:0,f:0,i:0,scale:1},y=!0;\na.c.j(\"stage:initialized\",function(a,b,d,c){r=d;s=c;w.x=0;w.y=0;w.f=d;w.i=c;u.x=0;u.y=0;u.f=d;u.i=c;u.scale=1});a.c.j(\"stage:resized\",function(a,c,e,f){function k(a){a.x*=h;a.y*=l}function g(a){k(a);a.f*=h;a.i*=l}r=e;s=f;var h=e/a,l=f/c;k(d);k(n);k(b);k(q);k(p);g(w);g(u)});this.Yb=function(a,d){return m(d,function(){k(a,b)},!0)};this.Z=function(a,d){if(1===Math.round(1E4*d)/1E4){var c=w.x-n.x,e=w.y-n.y;m(1,function(){},!0);return this.d(-c,-e)}return m(d,function(){for(var d=!1;!d;)var d=Math.random(),\nc=Math.random(),e=Math.random(),k=Math.random(),d=f(a.x+d*a.f,a.y+c*a.i,w.x+d*w.f,w.y+c*w.i,a.x+e*a.f,a.y+k*a.i,w.x+e*w.f,w.y+k*w.i,b)},!0)};this.sc=function(a,d){var c,e,k,g;c=a.f/a.i;e=r/s;c<e?(k=a.i*e,g=a.i,c=a.x-0.5*(k-a.f),e=a.y):c>e?(k=a.f,g=a.f*s/r,c=a.x,e=a.y-0.5*(g-a.i)):(c=a.x,e=a.y,k=a.f,g=a.i);c-=k*d;e-=g*d;k*=1+2*d;if(f(c,e,n.x,n.y,c+k,e,n.x+r/h,n.y,b))return m(r/h/k,D.ta,!1);y=!1;return this.d(h*(n.x-c),h*(n.y-e))};this.d=function(a,b){var c=Math.round(1E4*a)/1E4,d=Math.round(1E4*b)/\n1E4;p.x+=c/h;p.y+=d/h;return 0!==c||0!==d};this.reset=function(a){a&&this.content(0,0,r,s);return this.Z({x:w.x+n.x,y:w.y+n.y,f:w.f/h,i:w.i/h},e/g)};this.Qb=function(a){e=Math.min(1,Math.round(1E4*(a||g))/1E4)};this.k=function(){return n.x<w.x?(w.x-n.x)*h:n.x+r/h>w.x+w.f?-(n.x+r/h-w.x-w.f)*h:0};this.A=function(){return n.y<w.y?(w.y-n.y)*h:n.y+s/h>w.y+w.i?-(n.y+s/h-w.y-w.i)*h:0};this.update=function(a){var e=Math.abs(Math.log(l));6>e?e=2:(e/=4,e+=3*e*(1<l?a:1-a));e=1<l?Math.pow(a,e):1-Math.pow(1-a,\ne);e=(y?e:1)*(l-1)+1;h=c*e;n.x=b.x-(b.x-d.x)/e;n.y=b.y-(b.y-d.y)/e;n.x-=q.x*(1-a)+p.x*a;n.y-=q.y*(1-a)+p.y*a;1===a&&(q.x=p.x,q.y=p.y);u.x=n.x;u.y=n.y;u.f=r/h;u.i=s/h;u.scale=h};this.S=function(a){a.x=u.x;a.y=u.y;a.scale=u.scale;return a};this.absolute=function(a,b){return k(a,b||{})};this.nd=function(a,b){var c=b||{};c.x=(a.x-n.x)*h;c.y=(a.y-n.y)*h;return c};this.Hc=function(a){return this.scale()<e/a};this.Rd=function(){return D.Fd(h,1)};this.scale=function(){return Math.round(1E4*h)/1E4};this.content=\nfunction(a,b,c,d){w.x=a;w.y=b;w.f=c;w.i=d};this.Jc=function(a,b){var c;for(c=a.length-1;0<=c;c--){var d=a[c];d.save();d.scale(h,h);d.translate(-n.x,-n.y)}b(u);for(c=a.length-1;0<=c;c--)d=a[c],d.restore()}};var S=new function(){function a(a){if(\"hsl\"==a.model||\"hsla\"==a.model)return a;var f=a.r/=255,c=a.g/=255,d=a.b/=255,g=Math.max(f,c,d),l=Math.min(f,c,d),e,b=(g+l)/2;if(g==l)e=l=0;else{var h=g-l,l=0.5<b?h/(2-g-l):h/(g+l);switch(g){case f:e=(c-d)/h+(c<d?6:0);break;case c:e=(d-f)/h+2;break;case d:e=(f-c)/h+4}e/=6}a.h=360*e;a.s=100*l;a.l=100*b;a.model=\"hsl\";return a}var m={h:0,s:0,l:0,a:1,model:\"hsla\"};this.Ba=function(k){return D.Tc(k)?a(S.Gg(k)):D.jc(k)?a(k):m};this.Gg=function(a){var f;return(f=/rgba\\(\\s*([^,\\s]+)\\s*,\\s*([^,\\s]+)\\s*,\\s*([^,\\s]+)\\s*,\\s*([^,\\s]+)\\s*\\)/.exec(a))&&\n5==f.length?{r:parseFloat(f[1]),g:parseFloat(f[2]),b:parseFloat(f[3]),a:parseFloat(f[4]),model:\"rgba\"}:(f=/hsla\\(\\s*([^,\\s]+)\\s*,\\s*([^,%\\s]+)%\\s*,\\s*([^,\\s%]+)%\\s*,\\s*([^,\\s]+)\\s*\\)/.exec(a))&&5==f.length?{h:parseFloat(f[1]),s:parseFloat(f[2]),l:parseFloat(f[3]),a:parseFloat(f[4]),model:\"hsla\"}:(f=/rgb\\(\\s*([^,\\s]+)\\s*,\\s*([^,\\s]+)\\s*,\\s*([^,\\s]+)\\s*\\)/.exec(a))&&4==f.length?{r:parseFloat(f[1]),g:parseFloat(f[2]),b:parseFloat(f[3]),a:1,model:\"rgb\"}:(f=/hsl\\(\\s*([^,\\s]+)\\s*,\\s*([^,\\s%]+)%\\s*,\\s*([^,\\s%]+)%\\s*\\)/.exec(a))&&\n4==f.length?{h:parseFloat(f[1]),s:parseFloat(f[2]),l:parseFloat(f[3]),a:1,model:\"hsl\"}:(f=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(a))&&4==f.length?{r:parseInt(f[1],16),g:parseInt(f[2],16),b:parseInt(f[3],16),a:1,model:\"rgb\"}:(f=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(a))&&4==f.length?{r:17*parseInt(f[1],16),g:17*parseInt(f[2],16),b:17*parseInt(f[3],16),a:1,model:\"rgb\"}:m};this.Bg=function(a){function f(a,b,c){0>c&&(c+=1);1<c&&(c-=1);return c<1/6?a+6*(b-a)*c:0.5>c?b:c<2/3?\na+(b-a)*(2/3-c)*6:a}if(\"rgb\"==a.model||\"rgba\"==a.model)return Math.sqrt(a.r*a.r*0.241+a.g*a.g*0.691+a.b*a.b*0.068)/255;var c,d;c=a.l/100;var g=a.s/100;d=a.h/360;if(0==a.Yj)c=a=d=c;else{var g=0.5>c?c*(1+g):c+g-c*g,l=2*c-g;c=f(l,g,d+1/3);a=f(l,g,d);d=f(l,g,d-1/3)}return Math.sqrt(65025*c*c*0.241+65025*a*a*0.691+65025*d*d*0.068)/255};this.Mg=function(a){if(D.Tc(a))return a;if(D.jc(a))switch(a.model){case \"hsla\":return S.Hg(a);case \"hsl\":return S.Ac(a);case \"rgba\":return S.Kg(a);case \"rgb\":return S.Jg(a);\ndefault:return\"#000\"}else return\"#000\"};this.Kg=function(a){return\"rgba(\"+(0.5+a.r|0)+\",\"+(0.5+a.g|0)+\",\"+(0.5+a.b|0)+\",\"+a.a+\")\"};this.Jg=function(a){return\"rgba(\"+(0.5+a.r|0)+\",\"+(0.5+a.g|0)+\",\"+(0.5+a.b|0)+\")\"};this.Hg=function(a){return\"hsla(\"+(0.5+a.h|0)+\",\"+(0.5+a.s|0)+\"%,\"+(0.5+a.l|0)+\"%,\"+a.a+\")\"};this.Ac=function(a){return\"hsl(\"+(0.5+a.h|0)+\",\"+(0.5+a.s|0)+\"%,\"+(0.5+a.l|0)+\"%)\"};this.Z=function(a,f,c){return\"hsl(\"+(0.5+a|0)+\",\"+(0.5+f|0)+\"%,\"+(0.5+c|0)+\"%)\"}};function V(){var a=!1,m,k=[],f=this,c=new function(){this.P=function(c){c&&(a?c.apply(f,m):k.push(c));return this};this.ih=function(a){f=a;return{then:this.P}}};this.J=function(){m=arguments;for(var c=0;c<k.length;c++)k[c].apply(f,m);a=!0;return this};this.M=function(){return c}}function pa(a){var m=new V,k=a.length;if(0<a.length)for(var f=a.length-1;0<=f;f--)a[f].P(function(){0===--k&&m.J()});else m.J();return m.M()}\nfunction qa(a){var m=0;this.d=function(){m++};this.k=function(){m--;0===m&&a()};this.clear=function(){m=0};this.A=function(){return 0===m}};var ra={Ie:function(a,m,k,f){f=f||{};var c;try{c=a.getBoundingClientRect()}catch(d){if(!ra.ki){ra.ki=!0;window.console.log(\"getBoundingClientRect() failed.\");for(window.console.log(\"Element\",a);null!==a.parentElement;)a=a.parentElement;window.console.log(\"Attached to DOM\",a===document.body.parentElement)}c={left:0,top:0}}f.x=m-c.left;f.y=k-c.top;return f}};function sa(){var a=document,m={};this.addEventListener=function(k,f,c){var d=m[k];d||(d=[],m[k]=d);d.push(f);a.addEventListener(k,f,c)};this.d=function(){D.Ga(m,function(k,f){for(var c=k.length-1;0<=c;c--)a.removeEventListener(f,k[c])})}};function ta(a){function m(a){return function(b){k(b)&&a.apply(this,arguments)}}function k(b){for(b=b.target;b;){if(b===a)return!0;b=b.parentElement}return!1}function f(a,b,d){d=d||{};c(a,d);for(var e=0;e<b.length;e++)b[e].call(a.target,d);c(a,d);(void 0===d.Mb&&d.Bi||\"prevent\"===d.Mb)&&a.preventDefault();return d}function c(b,c){ra.Ie(a,b.clientX,b.clientY,c);c.altKey=b.altKey;c.metaKey=b.metaKey;c.ctrlKey=b.ctrlKey;c.shiftKey=b.shiftKey;c.wb=3===b.which;return c}var d=new sa,g=[],l=[],e=[],b=[],\nh=[],n=[],q=[],p=[],r=[],s=[],w=[];this.d=function(a){g.push(a)};this.k=function(a){h.push(a)};this.ya=function(a){l.push(a)};this.Ba=function(a){e.push(a)};this.Pa=function(a){b.push(a)};this.Aa=function(a){w.push(a)};this.za=function(a){n.push(a)};this.Ja=function(a){q.push(a)};this.Z=function(a){p.push(a)};this.A=function(a){r.push(a)};this.S=function(a){s.push(a)};this.kb=function(){d.d()};var u,y,x,A,C={x:0,y:0},K={x:0,y:0},B=!1,H=!1;d.addEventListener(\"mousedown\",m(function(b){if(b.target!==\na){var c=f(b,e);K.x=c.x;K.y=c.y;C.x=c.x;C.y=c.y;B=!0;f(b,p);y=!1;u=window.setTimeout(function(){100>M.d(C,c)&&(window.clearTimeout(A),f(b,l),y=!0)},400)}}));d.addEventListener(\"mouseup\",function(a){var c=f(a,b);B&&(H&&f(a,s),window.clearTimeout(u),y||H||!k(a)||(c={x:c.x,y:c.y},x&&100>M.d(c,x)?f(a,h):f(a,g),x=c,A=window.setTimeout(function(){x=null},350)),H=B=!1)});d.addEventListener(\"mousemove\",function(a){var b=c(a,{});k(a)&&f(a,n,{type:\"move\"});C.x=b.x;C.y=b.y;B&&!H&&100<M.d(K,C)&&(H=!0);H&&f(a,\nr,b)});d.addEventListener(\"mouseout\",m(function(a){f(a,q,{type:\"out\"})}));d.addEventListener(\"wheel\",m(function(){return function(a){var b;\"deltaY\"in a?b=a.deltaY:(b=0,\"detail\"in a&&(b=a.detail),\"wheelDelta\"in a&&(b=-a.wheelDelta/120),\"wheelDeltaY\"in a&&(b=-a.wheelDeltaY/120),\"axis\"in a&&a.axis===a.HORIZONTAL_AXIS&&(b=0),b*=10);b&&a.deltaMode&&(b=1===a.deltaMode?67*b:800*b);f(a,w,{wd:-b/200,Bi:!0})}}()),{passive:!1});d.addEventListener(\"contextmenu\",m(function(a){a.preventDefault()}))};var X=function(){function a(a){return function(d){return Math.pow(d,a)}}function m(a){return function(d){return 1-Math.pow(1-d,a)}}function k(a){return function(d){return 1>(d*=2)?0.5*Math.pow(d,a):1-0.5*Math.abs(Math.pow(2-d,a))}}function f(a){return function(d){for(var f=0;f<a.length;f++)d=(0,a[f])(d);return d}}return{pa:function(a){switch(a){case \"linear\":return X.Jb;case \"bounce\":return X.Ug;case \"squareIn\":return X.ng;case \"squareOut\":return X.Rb;case \"squareInOut\":return X.og;case \"cubicIn\":return X.Yg;\ncase \"cubicOut\":return X.ze;case \"cubicInOut\":return X.Zg;case \"quadIn\":return X.Ti;case \"quadOut\":return X.Vi;case \"quadInOut\":return X.Ui;default:return X.Jb}},Jb:function(a){return a},Ug:f([k(2),function(a){return 0===a?0:1===a?1:a*(a*(a*(a*(25.9425*a-85.88)+105.78)-58.69)+13.8475)}]),ng:a(2),Rb:m(2),og:k(2),Yg:a(3),ze:m(3),Zg:k(3),Ti:a(2),Vi:m(2),Ui:k(2),d:f}}();var D={V:function(a){return void 0===a},mf:function(a){return null===a},Sc:function(a){return\"[object Number]\"===Object.prototype.toString.call(a)},Tc:function(a){return\"[object String]\"===Object.prototype.toString.call(a)},Gd:function(a){return\"function\"===typeof a},jc:function(a){return a===Object(a)},Fd:function(a,m){return 1E-6>a-m&&-1E-6<a-m},jf:function(a){return D.V(a)||D.mf(a)||D.Tc(a)&&!/\\S/.test(a)},N:function(a,m){return a&&a.hasOwnProperty(m)},nb:function(a,m){if(a)for(var k=m.length-\n1;0<=k;k--)if(a.hasOwnProperty(m[k]))return!0;return!1},extend:function(a){D.dh(Array.prototype.slice.call(arguments,1),function(m){if(m)for(var k in m)m.hasOwnProperty(k)&&(a[k]=m[k])});return a},A:function(a,m){return a.map(function(a){return a[m]},[])},dh:function(a,m,k){null!=a&&(a.forEach?a.forEach(m,k):D.Ga(a,m,k))},Ga:function(a,m,k){for(var f in a)if(a.hasOwnProperty(f)&&!1===m.call(k,a[f],f,a))break},B:function(){for(var a=0;a<arguments.length;a++){var m=arguments[a];if(!(D.V(m)||D.Sc(m)&&\nisNaN(m)||D.Tc(m)&&D.jf(m)))return m}},bg:function(a,m){var k=a.indexOf(m);0<=k&&a.splice(k,1)},$g:function(a,m,k){var f;return function(){var c=this,d=arguments,g=k&&!f;clearTimeout(f);f=setTimeout(function(){f=null;k||a.apply(c,d)},m);g&&a.apply(c,d)}},defer:function(a){setTimeout(a,1)},k:function(a){return a},ta:function(){}};var ua={ji:function(a,m,k){return v.hi()?function(){var f=m+\":\"+JSON.stringify(arguments),c=window.localStorage.getItem(f);c&&(c=JSON.parse(c));if(c&&Date.now()-c.t<k)return c.v;c=a.apply(this,arguments);window.localStorage.setItem(f,JSON.stringify({v:c,t:Date.now()}));return c}:a}};var va={m:function(a,m){function k(){var f=[];if(Array.isArray(a))for(var c=0;c<a.length;c++){var d=a[c];d&&f.push(d.apply(m,arguments))}else a&&f.push(a.apply(m,arguments));return f}k.empty=function(){return 0===a.length&&!D.Gd(a)};return k}};function wa(){var a={};this.j=function(m,k){var f=a[m];f||(f=[],a[m]=f);f.push(k)};this.p=function(m,k){var f=a[m];if(f)for(var c=Array.prototype.slice.call(arguments,1),d=0;d<f.length;d++)f[d].apply(this,c)}};var xa={jg:function(a){for(var m=\"\",k=0;k<a.length;k++)m+=String.fromCharCode(a.charCodeAt(k)^1);return m}};function ya(a){function m(b,c,k){var m=this,p,r=0;this.id=g++;this.name=k?k:\"{unnamed on \"+b+\"}\";this.target=function(){return b};this.Gb=function(){return-1!=e.indexOf(m)};this.start=function(){if(!m.Gb()){if(-1==e.indexOf(m)){var b=l.now();!0===m.wf(b)&&(e=e.slice(),e.push(m))}0<e.length&&a.repeat(f)}return this};this.stop=function(){for(d(m);p<c.length;p++){var a=c[p];a.ib&&a.Xa.call()}return this};this.dg=function(){p=void 0};this.wf=function(a){r++;if(0!==c.length){var b;D.V(p)?(p=0,b=c[p],b.X&&\nb.X.call(b,a,r,m)):b=c[p];for(;p<c.length;){if(b.Xa&&b.Xa.call(b,a,r,m))return!0;b.Da&&b.Da.call(b,a,r,m);D.V(p)&&(p=-1);++p<c.length&&(b=c[p],b.X&&b.X.call(b,a,r,m))}}return!1}}function k(a){return D.V(a)?e.slice():e.filter(function(c){return c.target()===a})}function f(){c();0==e.length&&a.cancel(f)}function c(){var a=l.now();e.forEach(function(c){!0!==c.wf(a)&&d(c)})}function d(a){e=e.filter(function(c){return c!==a})}var g=0,l=ba.create(),e=[];this.d=function(){for(var a=e.length-1;0<=a;a--)e[a].stop();\ne=[]};this.D=function(){function a(){}function c(a){var b=a.target,d=a.duration,e=a.da,f,g;this.X=function(){f={};for(var c in a.G)b.hasOwnProperty(c)&&(f[c]={start:D.V(a.G[c].start)?b[c]:D.Gd(a.G[c].start)?a.G[c].start.call(void 0):a.G[c].start,end:D.V(a.G[c].end)?b[c]:D.Gd(a.G[c].end)?a.G[c].end.call(void 0):a.G[c].end,R:D.V(a.G[c].R)?X.Jb:a.G[c].R});g=l.now()};this.Xa=function(){var a=l.now()-g,a=0===d?1:Math.min(d,a)/d,c;for(c in f){var k=f[c];b[c]=k.start+(k.end-k.start)*k.R(a)}e&&e.call(b,a);\nreturn 1>a}}function d(a,b,c){this.ib=c;this.Xa=function(){a.call(b);return!1}}function e(a){var b;this.X=function(c,d){b=d+a};this.Xa=function(a,c){return c<b}}function f(a){var b;this.X=function(c){b=c+a};this.Xa=function(a){return a<b}}function g(a){this.X=function(){a.forEach(function(a){a.start()})};this.Xa=function(){for(var b=0;b<a.length;b++)if(a[b].Gb())return!0;return!1}}a.m=function(a,b){return new function(){function k(b,c,e,f){return c?(D.V(e)&&(e=a),b.Bb(new d(c,e,f))):b}var l=[];this.Bb=\nfunction(a){l.push(a);return this};this.eb=function(a){return this.Bb(new f(a))};this.oe=function(a){return this.Bb(new e(a||1))};this.call=function(a,b){return k(this,a,b,!1)};this.ib=function(a,b){return k(this,a,b,!0)};this.ia=function(b){D.V(b.target)&&(b.target=a);return this.Bb(new c(b))};this.Ya=function(a){return this.Bb(new g(a))};this.dg=function(){return this.Bb({Xa:function(a,b){b.dg();return!0}})};this.xa=function(){return new m(a,l,b)};this.start=function(){return this.xa().start()};\nthis.Eg=function(){var a=new V;this.oe().call(a.J).xa();return a.M()};this.ab=function(){var a=this.Eg();this.start();return a}}};a.tc=function(c){k(c).forEach(function(a){a.stop()});return a.m(c,void 0)};return a}()};var $=function(){var a={He:function(a,k){if(a.e)for(var f=a.e,c=0;c<f.length;c++)k(f[c],c)},Kc:function(m,k){if(m.e)for(var f=m.e,c=0;c<f.length;c++)if(!1===a.Kc(f[c],k)||!1===k(f[c],c))return!1}};a.F=a.Kc;a.Lc=function(m,k){if(m.e)for(var f=m.e,c=0;c<f.length;c++)if(!1===k(f[c],c)||!1===a.Lc(f[c],k))return!1};a.Fa=function(m,k){if(m.e)for(var f=m.e,c=0;c<f.length;c++)if(!1===a.Fa(f[c],k))return!1;return k(m)};a.Pj=a.Fa;a.xd=function(m,k){!1!==k(m)&&a.Lc(m,k)};a.Mc=function(m,k){var f=[];a.Lc(m,function(a){f.push(a)});\nreturn k?f.filter(k):f};a.Ge=function(a,k){for(var f=a.parent;f&&!1!==k(f);)f=f.parent};a.li=function(a,k){for(var f=a.parent;f&&f!==k;)f=f.parent;return!!f};return a}();var M=new function(){function a(a,f){var c=a.x-f.x,d=a.y-f.y;return c*c+d*d}function m(a,f,c){for(var d=0;d<a.length;d++){var g=M.za(a[d],a[d+1]||a[0],f,c,!0);if(g)return g}}this.za=function(a,f,c,d,g){var l=a.x;a=a.y;var e=f.x-l;f=f.y-a;var b=c.x,h=c.y;c=d.x-b;var n=d.y-h;d=e*n-c*f;if(!(1E-12>=d&&-1E-12<=d)&&(b=b-l,h=h-a,c=(b*n-c*h)/d,d=(b*f-e*h)/d,0<=d&&(g||1>=d)&&0<=c&&1>=c))return{x:l+e*c,y:a+f*c}};this.Ig=function(a,f,c,d){var g=a.x;a=a.y;var l=f.x-g;f=f.y-a;var e=c.x;c=c.y;var b=d.x-e;d=d.y-\nc;var h=l*d-b*f;if(!(1E-12>=h&&-1E-12<=h)&&(d=((e-g)*d-b*(c-a))/h,0<=d&&1>=d))return{x:g+l*d,y:a+f*d}};this.Bc=function(a,f,c){for(var d=M.k(f,{}),g=M.k(c,{}),l,e=g.x-d.x,b=g.y-d.y,h=[],g=0;g<c.length;g++)l=c[g],h.push({x:l.x-e,y:l.y-b});c=[];l=[];for(g=0;g<a.length;g++){var n=a[g],q=m(f,d,n);q?(c.push(q),l.push(m(h,d,n))):(c.push(null),l.push(null))}for(g=0;g<a.length;g++)if(q=c[g],n=l[g],q&&n){f=a[g];var h=d,p=q.x-d.x,q=q.y-d.y,q=Math.sqrt(p*p+q*q);if(1E-12<q){var p=f.x-d.x,r=f.y-d.y,q=Math.sqrt(p*\np+r*r)/q;f.x=h.x+q*(n.x-h.x);f.y=h.y+q*(n.y-h.y)}else f.x=h.x,f.y=h.y}for(g=0;g<a.length;g++)l=a[g],l.x+=e,l.y+=b};this.q=function(a,f){if(0!==a.length){var c,d,g,l;c=d=a[0].x;g=l=a[0].y;for(var e=a.length;0<--e;)c=Math.min(c,a[e].x),d=Math.max(d,a[e].x),g=Math.min(g,a[e].y),l=Math.max(l,a[e].y);f.x=c;f.y=g;f.f=d-c;f.i=l-g;return f}};this.A=function(a){return[{x:a.x,y:a.y},{x:a.x+a.f,y:a.y},{x:a.x+a.f,y:a.y+a.i},{x:a.x,y:a.y+a.i}]};this.k=function(a,f){for(var c=0,d=0,g=a.length,l=a[0],e=0,b=1;b<\ng-1;b++)var h=a[b],n=a[b+1],m=l.y+h.y+n.y,p=(h.x-l.x)*(n.y-l.y)-(n.x-l.x)*(h.y-l.y),c=c+p*(l.x+h.x+n.x),d=d+p*m,e=e+p;f.x=c/(3*e);f.y=d/(3*e);f.ja=e/2;return f};this.re=function(a,f){this.k(a,f);f.Ob=Math.sqrt(f.ja/Math.PI)};this.Ua=function(a,f){for(var c=0;c<a.length;c++){var d=a[c],g=a[c+1]||a[0];if(0>(f.y-d.y)*(g.x-d.x)-(f.x-d.x)*(g.y-d.y))return!1}return!0};this.Lg=function(a,f,c){var d=a.x,g=f.x;a.x>f.x&&(d=f.x,g=a.x);g>c.x+c.f&&(g=c.x+c.f);d<c.x&&(d=c.x);if(d>g)return!1;var l=a.y,e=f.y,b=f.x-\na.x;1E-7<Math.abs(b)&&(e=(f.y-a.y)/b,a=a.y-e*a.x,l=e*d+a,e=e*g+a);l>e&&(d=e,e=l,l=d);e>c.y+c.i&&(e=c.y+c.i);l<c.y&&(l=c.y);return l<=e};this.se=function(k,f,c,d,g){var l,e;function b(b,c,d){if(f.x===n.x&&f.y===n.y)return d;var g=m(k,f,n),p=Math.sqrt(a(g,f)/(b*b+c*c));return p<h?(h=p,l=g.x,e=g.y,0!==c?Math.abs(e-f.y)/Math.abs(c):Math.abs(l-f.x)/Math.abs(b)):d}d=D.B(d,0.5);g=D.B(g,0.5);c=D.B(c,1);var h=Number.MAX_VALUE;e=l=0;var n={x:0,y:0},q,p=d*c;c=(1-d)*c;d=1-g;n.x=f.x-p;n.y=f.y-g;q=b(p,g,q);n.x=\nf.x+c;n.y=f.y-g;q=b(c,g,q);n.x=f.x-p;n.y=f.y+d;q=b(p,d,q);n.x=f.x+c;n.y=f.y+d;return q=b(c,d,q)};this.Dg=function(a,f){function c(a,c,d){var e=c.x,f=d.x;c=c.y;d=d.y;var g=f-e,k=d-c;return Math.abs(k*a.x-g*a.y-e*d+f*c)/Math.sqrt(g*g+k*k)}for(var d=a.length,g=c(f,a[d-1],a[0]),l=0;l<d-1;l++){var e=c(f,a[l],a[l+1]);e<g&&(g=e)}return g};this.Wb=function(a,f,c){var d;c={x:f.x+Math.cos(c),y:f.y-Math.sin(c)};var g=[],l=[],e=a.length;for(d=0;d<e;d++){var b=M.Ig(a[d],a[(d+1)%e],f,c);if(b&&(g.push(b),2==l.push(d)))break}if(2==\ng.length){var b=g[0],g=g[1],h=l[0],l=l[1],n=[g,b];for(d=h+1;d<=l;d++)n.push(a[d]);for(d=[b,g];l!=h;)l=(l+1)%e,d.push(a[l]);a=[n,d];e=c.x-f.x;d=g.x-b.x;0===e&&(e=c.y-f.y,d=g.y-b.y);(0>e?-1:0<e?1:0)!==(0>d?-1:0<d?1:0)&&a.reverse();return a}};this.Aa=function(a,f,c,d){d.x=a*(f.x-c.x)+c.x;d.y=a*(f.y-c.y)+c.y;return d};this.d=a;this.qe=function(a,f,c){if(D.Sc(f))f=2*Math.PI*f/360;else{var d=M.q(a,{});switch(f){case \"random\":f=Math.random()*Math.PI*2;break;case \"top\":f=Math.atan2(-d.i,0);break;case \"bottom\":f=\nMath.atan2(d.i,0);break;case \"topleft\":f=Math.atan2(-d.i,-d.f);break;default:f=Math.atan2(d.i,d.f)}}d=M.k(a,{});return M.Aa(c,m(a,d,{x:d.x+Math.cos(f),y:d.y+Math.sin(f)}),d,{})};return this};var za=new function(){function a(a,c){this.face=a;this.kd=c;this.pc=this.dd=null}function m(a,c,f){this.ma=[a,c,f];this.C=Array(3);var e=c.y-a.y,b=f.z-a.z,h=c.x-a.x;c=c.z-a.z;var k=f.x-a.x;a=f.y-a.y;this.Oa={x:e*b-c*a,y:c*k-h*b,z:h*a-e*k};this.jb=[];this.td=this.visible=!1}this.S=function(d){function f(b,c,d){var g,h,k=b.ma[0],l=b.Oa,r=l.x,s=l.y,l=l.z,m=Array(n);c=c.jb;g=c.length;for(e=0;e<g;e++)h=c[e].kd,m[h.index]=!0,0>r*(h.x-k.x)+s*(h.y-k.y)+l*(h.z-k.z)&&a.d(b,h);c=d.jb;g=c.length;for(e=0;e<g;e++)h=\nc[e].kd,!0!==m[h.index]&&0>r*(h.x-k.x)+s*(h.y-k.y)+l*(h.z-k.z)&&a.d(b,h)}var l,e,b,h,n=d.length;for(l=0;l<n;l++)d[l].index=l,d[l].$b=null;var q=[],p;if(0<(p=function(){function b(a,c,d,e){var f=(c.y-a.y)*(d.z-a.z)-(c.z-a.z)*(d.y-a.y),g=(c.z-a.z)*(d.x-a.x)-(c.x-a.x)*(d.z-a.z),h=(c.x-a.x)*(d.y-a.y)-(c.y-a.y)*(d.x-a.x);return f*e.x+g*e.y+h*e.z>f*a.x+g*a.y+h*a.z?new m(a,c,d):new m(d,c,a)}function c(a,b,d,e){function f(a,b,c){a=a.ma;b=a[0]==b?0:a[1]==b?1:2;return a[(b+1)%3]!=c?(b+2)%3:b}b.C[f(b,d,e)]=\na;a.C[f(a,e,d)]=b}if(4>n)return 0;var e=d[0],f=d[1],g=d[2],h=d[3],k=b(e,f,g,h),l=b(e,g,h,f),r=b(e,f,h,g),s=b(f,g,h,e);c(k,l,g,e);c(k,r,e,f);c(k,s,f,g);c(l,r,h,e);c(l,s,g,h);c(r,s,h,f);q.push(k,l,r,s);for(e=4;e<n;e++)for(f=d[e],g=0;4>g;g++)h=q[g],k=h.ma[0],l=h.Oa,0>l.x*(f.x-k.x)+l.y*(f.y-k.y)+l.z*(f.z-k.z)&&a.d(h,f);return 4}())){for(;p<n;){b=d[p];if(b.$b){for(l=b.$b;null!==l;)l.face.visible=!0,l=l.pc;var r,s;l=0;a:for(;l<q.length;l++)if(h=q[l],!1===h.visible){var w=h.C;for(e=0;3>e;e++)if(!0===w[e].visible){r=\nh;s=e;break a}}h=[];var w=[],u=r,y=s;do if(h.push(u),w.push(y),y=(y+1)%3,!1===u.C[y].visible){do for(l=u.ma[y],u=u.C[y],e=0;3>e;e++)u.ma[e]==l&&(y=e);while(!1===u.C[y].visible&&(u!==r||y!==s))}while(u!==r||y!==s);var x=null,A=null;for(l=0;l<h.length;l++){var u=h[l],y=w[l],C=u.C[y],K=u.ma[(y+1)%3],B=u.ma[y],H=K.y-b.y,Q=B.z-b.z,O=K.x-b.x,P=K.z-b.z,F=B.x-b.x,T=B.y-b.y,N;0<c.length?(N=c.pop(),N.ma[0]=b,N.ma[1]=K,N.ma[2]=B,N.Oa.x=H*Q-P*T,N.Oa.y=P*F-O*Q,N.Oa.z=O*T-H*F,N.jb.length=0,N.visible=!1,N.td=!0):\nN={ma:[b,K,B],C:Array(3),Oa:{x:H*Q-P*T,y:P*F-O*Q,z:O*T-H*F},jb:[],visible:!1};q.push(N);u.C[y]=N;N.C[1]=u;null!==A&&(A.C[0]=N,N.C[2]=A);A=N;null===x&&(x=N);f(N,u,C)}A.C[0]=x;x.C[2]=A;l=[];for(e=0;e<q.length;e++)if(h=q[e],!0===h.visible){w=h.jb;u=w.length;for(b=0;b<u;b++)y=w[b],x=y.dd,A=y.pc,null!==x&&(x.pc=A),null!==A&&(A.dd=x),null===x&&(y.kd.$b=A),k.push(y);h.td&&c.push(h)}else l.push(h);q=l}p++}for(l=0;l<q.length;l++)h=q[l],h.td&&c.push(h)}return{Je:q}};a.d=function(c,f){var l;0<k.length?(l=k.pop(),\nl.face=c,l.kd=f,l.pc=null,l.dd=null):l=new a(c,f);c.jb.push(l);var e=f.$b;null!==e&&(e.dd=l);l.pc=e;f.$b=l};for(var k=Array(2E3),f=0;f<k.length;f++)k[f]=new a(null,null);for(var c=Array(1E3),f=0;f<c.length;f++)c[f]={ma:Array(3),C:Array(3),Oa:{x:0,y:0,z:0},jb:[],visible:!1}};var Aa=new function(){function a(a,f,c,d,g,l,e,b){var h=(a-c)*(l-b)-(f-d)*(g-e);return Math.abs(h)<m?void 0:{x:((a*d-f*c)*(g-e)-(a-c)*(g*b-l*e))/h,y:((a*d-f*c)*(l-b)-(f-d)*(g*b-l*e))/h}}var m=1E-12;this.bb=function(k,f){for(var c=k[0],d=c.x,g=c.y,l=c.x,e=c.y,b=k.length-1;0<b;b--)c=k[b],d=Math.min(d,c.x),g=Math.min(g,c.y),l=Math.max(l,c.x),e=Math.max(e,c.y);if(l-d<3*f||e-g<3*f)c=void 0;else{a:{c=!0;void 0==c&&(c=!1);d=[];g=k.length;for(l=0;l<=g;l++){var e=k[l%g],b=k[(l+1)%g],h=k[(l+2)%g],n,q,p;n=b.x-\ne.x;q=b.y-e.y;p=Math.sqrt(n*n+q*q);var r=f*n/p,s=f*q/p;n=h.x-b.x;q=h.y-b.y;p=Math.sqrt(n*n+q*q);n=f*n/p;q=f*q/p;if(e=a(e.x-s,e.y+r,b.x-s,b.y+r,b.x-q,b.y+n,h.x-q,h.y+n))if(d.push(e),h=d.length,c&&3<=h&&(e=d[h-3],b=d[h-2],h=d[h-1],0>(b.x-e.x)*(h.y-e.y)-(h.x-e.x)*(b.y-e.y))){c=void 0;break a}}d.shift();c=3>d.length?void 0:d}if(!c)a:{d=k.slice(0);for(c=0;c<k.length;c++){l=k[c%k.length];b=k[(c+1)%k.length];h=b.x-l.x;g=b.y-l.y;e=Math.sqrt(h*h+g*g);h=f*h/e;e=f*g/e;g=l.x-e;l=l.y+h;e=b.x-e;b=b.y+h;if(0!=d.length){s=\ng-e;q=l-b;h=[];n=p=!0;r=void 0;for(r=0;r<d.length;r++){var w=s*(l-d[r].y)-(g-d[r].x)*q;w<=m&&w>=-m&&(w=0);h.push(w);0<w&&(p=!1);0>w&&(n=!1)}if(p)d=[];else if(!n){s=[];for(r=0;r<d.length;r++)q=(r+1)%d.length,p=h[r],n=h[q],0<=p&&s.push(d[r]),(0<p&&0>n||0>p&&0<n)&&s.push(a(d[r].x,d[r].y,d[q].x,d[q].y,g,l,e,b));d=s}}if(3>d.length){c=void 0;break a}}c=d}}return c};return this};var Ba=new function(){function a(a){for(var f=a[0].x,c=a[0].y,d=f,g=c,l=1;l<a.length;l++)var e=a[l],f=Math.min(f,e.x),c=Math.min(c,e.y),d=Math.max(d,e.x),g=Math.max(g,e.y);a=d-f;g=g-c;return[{x:f+2*a,y:c+2*g,f:0},{x:f+2*a,y:c-2*g,f:0},{x:f-2*a,y:c+2*g,f:0}]}var m=1E-12;this.S=function(k,f){function c(){for(b=0;b<p.length;b++){var a=p[b],c=a.ma,d=c[0],e=c[1],f=c[2],c=d.x,g=d.y,d=d.z,h=e.x,k=e.y,e=e.z,l=f.x,r=f.y,f=f.z,s=c*(k-r)+h*(r-g)+l*(g-k);a.ha={x:-(g*(e-f)+k*(f-d)+r*(d-e))/s/2,y:-(d*(h-l)+e*(l-\nc)+f*(c-h))/s/2}}}function d(a){for(b=0;b<p.length;b++){var c=p[b];c.tb=!M.Ua(a,c.ha)}}function g(a,b){var c=Array(b.length),d;for(d=0;d<c.length;d++)c[d]=[];for(d=0;d<a.length;d++){var e=a[d];if(!(0>e.Oa.z))for(var f=e.C,g=0;g<f.length;g++){var h=f[g];if(!(0>h.Oa.z)){var k=e.ma,l=k[(g+1)%3].index,k=k[g].index;2<l&&c[l-3].push([e,h,2<k?b[k-3]:null])}}}return c}function l(a){var b=[a[0]],c=a[0][0],d=a[0][1],e=a.length,f=1;a:for(;f<e;f++)for(var g=1;g<e;g++){var h=a[g];if(null!==h){if(h[1]===c)if(b.unshift(h),\nc=h[0],a[g]=null,b.length===e)break a;else continue;if(h[0]===d&&(b.push(h),d=h[1],a[g]=null,b.length===e))break a}}b[0][0]!=b[e-1][1]&&b.push([b[e-1][1],b[0][0]]);return b}function e(a,b,c,d){var e=[],f=[],g=c.length,h,k=b.length,l=0,r=-1,s=-1,n=-1,p=null,q=d;for(d=0;d<g;d++){var w=(q+1)%g,u=c[q][0],E=c[w][0];if(M.d(u.ha,E.ha)>m)if(u.tb&&E.tb){var I=[],J=[];for(h=0;h<k;h++){r=(l+1)%k;if(p=M.za(b[l],b[r],u.ha,E.ha,!1))if(J.push(l),2===I.push(p))break;l=r}if(2===I.length){r=I[1];p=M.d(u.ha,I[0]);r=\nM.d(u.ha,r);u=p<r?0:1;p=p<r?1:0;r=J[u];-1===s&&(s=r);if(-1!==n)for(;r!=n;)n=(n+1)%k,e.push(b[n]),f.push(null);e.push(I[u],I[p]);f.push(c[q][2],null);n=J[p]}}else if(u.tb&&!E.tb)for(h=0;h<k;h++){r=(l+1)%k;if(p=M.za(b[l],b[r],u.ha,E.ha,!1)){if(-1!==n)for(I=n;l!=I;)I=(I+1)%k,e.push(b[I]),f.push(null);e.push(p);f.push(c[q][2]);-1===s&&(s=l);break}l=r}else if(!u.tb&&E.tb)for(h=0;h<k;h++){r=(l+1)%k;if(p=M.za(b[l],b[r],u.ha,E.ha,!1)){e.push(u.ha,p);f.push(c[q][2],null);n=l;break}l=r}else e.push(u.ha),f.push(c[q][2]);\nq=w}if(0==e.length)f=e=null;else if(-1!==n)for(;s!=n;)n=(n+1)%k,e.push(b[n]),f.push(null);a.o=e;a.C=f}if(1===k.length)k[0].o=f.slice(0),k[0].C=[];else{var b,h;h=a(f);var n=[],q;for(b=0;b<h.length;b++)q=h[b],n.push({x:q.x,y:q.y,z:q.x*q.x+q.y*q.y-q.f});for(b=0;b<k.length;b++)q=k[b],q.o=null,n.push({x:q.x,y:q.y,z:q.x*q.x+q.y*q.y-q.f});var p=za.S(n).Je;c();d(f);n=g(p,k);for(b=0;b<k.length;b++)if(q=n[b],0!==q.length){var r=k[b];q=l(q);var s=q.length,w=-1;for(h=0;h<s;h++)q[h][0].tb&&(w=h);if(0<=w)e(r,f,\nq,w);else{var w=[],u=[];for(h=0;h<s;h++)M.d(q[h][0].ha,q[(h+1)%s][0].ha)>m&&(w.push(q[h][0].ha),u.push(q[h][2]));r.o=w;r.C=u}r.o&&3>r.o.length&&(r.o=null,r.C=null)}}};this.zc=function(k,f){var c,d,g=!1,l=k.length;for(d=0;d<l;d++)c=k[d],null===c.o&&(g=!0),c.pe=c.f;if(g){var g=a(f),e=[],b,h;d=k.length;for(c=0;c<g.length;c++)b=g[c],e.push({x:b.x,y:b.y,z:b.x*b.x+b.y*b.y});for(c=0;c<d;c++)b=k[c],e.push({x:b.x,y:b.y,z:b.x*b.x+b.y*b.y});b=za.S(e).Je;g=Array(d);for(c=0;c<d;c++)g[c]={};e=b.length;for(c=0;c<\ne;c++)if(h=b[c],0<h.Oa.z){var n=h.ma,m=n.length;for(h=0;h<m-1;h++){var p=n[h].index-3,r=n[h+1].index-3;0<=p&&0<=r&&(g[p][r]=!0,g[r][p]=!0)}h=n[0].index-3;0<=r&&0<=h&&(g[r][h]=!0,g[h][r]=!0)}for(c=0;c<d;c++){h=g[c];b=k[c];var r=Number.MAX_VALUE,e=null,s;for(s in h)h=k[s],n=M.d(b,h),r>n&&(r=n,e=h);b.Wj=e;b.uf=Math.sqrt(r)}for(d=0;d<l;d++)c=k[d],s=Math.min(Math.sqrt(c.f),0.95*c.uf),c.f=s*s;this.S(k,f);for(d=0;d<l;d++)c=k[d],c.pe!==c.f&&0<c.uc&&(s=Math.min(c.uc,c.pe-c.f),c.f+=s,c.uc-=s)}}};var Ca=new function(){this.Cg=function(a){a=a.e;for(var m=0,k=a.length,f=0;f<k;f++){var c=a[f];if(c.o){var d=c.x,g=c.y;M.k(c.o,c);d=d-c.x;c=g-c.y;c=(0<d?d:-d)+(0<c?c:-c);m<c&&(m=c)}}return m};this.ya=function(a,m){var k=a.e,f,c,d,g;switch(m){case \"random\":return a.e[Math.floor(k.length*Math.random())];case \"topleft\":f=k[0];var l=f.x+f.y;for(g=1;g<k.length;g++)c=k[g],d=c.x+c.y,d<l&&(l=d,f=c);return f;case \"bottomright\":f=k[0];l=f.x+f.y;for(g=1;g<k.length;g++)c=k[g],d=c.x+c.y,d>l&&(l=d,f=c);return f;\ndefault:f=k[0];d=c=M.d(a,f);for(g=k.length-1;1<=g;g--)l=k[g],c=M.d(a,l),c<d&&(d=c,f=l);return f}};this.Ja=function(a,m,k){var f=a.e;if(f[0].C){var c=f.length;for(a=0;a<c;a++)f[a].ld=!1,f[a].ic=0;var c=[],d,g;g=d=0;c[d++]=m||f[0];for(m=m.ic=0;g<d;)if(f=c[g++],!f.ld&&f.C){k(f,m++,f.ic);f.ld=!0;var l=f.C,e=l.length;for(a=0;a<e;a++){var b=l[a];b&&!0!==b.ld&&(0===b.ic&&(b.ic=f.ic+1),c[d++]=b)}}}else for(a=0;a<f.length;a++)k(f[a],a,1)}};var G=function(){function a(a,e,h,r,s,p,w,P){var F=D.extend({},l,a);1>a.lineHeight&&(a.lineHeight=1);a=F.fontFamily;var T=F.fontStyle+\" \"+F.fontVariant+\" \"+F.fontWeight,N=F.rb,U=F.Zc,t=T+\" \"+a;F.Ne=t;var z={la:!1,mc:0,fontSize:0};e.save();e.font=T+\" \"+x+\"px \"+a;e.textBaseline=\"middle\";e.textAlign=\"center\";m(e,F);h=h.trim();u.text=h;c(r,s,p,y);if(/[\\u3000-\\u303f\\u3040-\\u309f\\u30a0-\\u30ff\\uff00-\\uff9f\\u4e00-\\u9faf\\u3400-\\u4dbf]/.test(h))f(u),k(e,u,t),d(F,u,y,U,N,!0,z);else if(k(e,u,t),d(F,u,y,U,N,!1,\nz),!z.la&&(w&&(f(u),k(e,u,t)),P||w))P&&(z.ec=!0),d(F,u,y,U,U,!0,z);if(z.la){var L=\"\",E=0,I=Number.MAX_VALUE,J=Number.MIN_VALUE;g(F,u,z.mc,z.fontSize,y,z.ec,function(a,c){0<L.length&&c===b&&(L+=b);L+=a},function(a,b,c,d,f){d===q&&(L+=n);e.save();e.translate(p.x,b);a=z.fontSize/x;e.scale(a,a);e.fillText(L,0,0);e.restore();L=c;E<f&&(E=f);I>b&&(I=b);J<b&&(J=b)});z.ea={x:p.x-E/2,y:I-z.fontSize/2,f:E,i:J-I+z.fontSize};e.restore()}else e.clear&&e.clear();return z}function m(a,c){var d=c.Ne,f=e[d];void 0===\nf&&(f={},e[d]=f);f[b]=a.measureText(b).width;f[h]=a.measureText(h).width}function k(a,b,c){var d,f=b.text.split(/(\\n|[ \\f\\r\\t\\v\\u2028\\u2029]+|\\u00ad+|\\u200b+)/),g=[],h=[],k=f.length>>>1;for(d=0;d<k;d++)g.push(f[2*d]),h.push(f[2*d+1]);2*d<f.length&&(g.push(f[2*d]),h.push(void 0));c=e[c];for(d=0;d<g.length;d++)f=g[d],k=c[f],void 0===k&&(k=a.measureText(f).width,c[f]=k);b.md=g;b.kg=h}function f(a){for(var c=a.text.split(/\\s+/),d=[],e={\".\":!0,\",\":!0,\";\":!0,\"?\":!0,\"!\":!0,\":\":!0,\"\\u3002\":!0},f=0;f<c.length;f++){var g=\nc[f];if(3<g.length){for(var h=\"\",h=h+g.charAt(0),h=h+g.charAt(1),k=2;k<g.length-2;k++){var l=g.charAt(k);e[l]||(h+=p);h+=l}h+=p;h+=g.charAt(g.length-2);h+=g.charAt(g.length-1);d.push(h)}else d.push(g)}a.text=d.join(b)}function c(a,b,c,d){for(var e,f,g=0;g<a.length;g++)a[g].y===b.y&&(void 0===e?e=g:f=g);void 0===f&&(f=e);e!==f&&a[f].x<a[e].x&&(g=e,e=f,f=g);d.o=a;d.q=b;d.vd=c;d.sf=e;d.tf=f}function d(a,b,c,d,e,f,h){var k=a.lineHeight,l=Math.max(a.cb,0.001),r=a.sb,n=b.md,s=c.vd,p=c.q,m=void 0,q=void 0;\nswitch(a.verticalAlign){case \"top\":s=p.y+p.i-s.y;break;case \"bottom\":s=s.y-p.y;break;default:s=2*Math.min(s.y-p.y,p.y+p.i-s.y)}r=Math.min(s,r*c.q.i);if(0>=r)h.la=!1;else{s=d;e=Math.min(e,r);p=Math.min(1,r/Math.max(20,b.md.length));do{var w=(s+e)/2,u=Math.min(n.length,Math.floor((r+w*(k-1-2*l))/(w*k))),y=void 0;if(0<u){var x=1,Y=u;do{var Z=Math.floor((x+Y)/2);if(g(a,b,Z,w,c,f&&w===d&&Z===u,null,null)){if(Y=m=y=Z,x===Y)break}else if(x=Z+1,x>Y)break}while(1)}void 0!==y?s=q=w:e=w}while(e-s>p);void 0===\nq?(h.la=!1,h.fontSize=0):(h.la=!0,h.fontSize=q,h.mc=m,h.ec=f&&w===s)}}function g(a,c,d,f,g,k,l,n){var p=a.ob,m=f*(a.lineHeight-1),q=a.verticalAlign,u=Math.max(a.cb,0.001);a=e[a.Ne];var y=c.md;c=c.kg;var z=g.o,L=g.vd,E=g.sf,I=g.tf,J;switch(q){case \"top\":g=L.y+f/2+f*u;J=1;break;case \"bottom\":g=L.y-(f*d+m*(d-1))+f/2-f*u;J=-1;break;default:g=L.y-(f*(d-1)/2+m*(d-1)/2),J=1}q=g;for(u=0;u<d;u++)r[2*u]=g-f/2,r[2*u+1]=g+f/2,g+=J*f,g+=J*m;for(;s.length<r.length;)s.push(Array(2));u=r;g=2*d;J=s;for(var R=z.length,\nY=E,E=(E-1+R)%R,Z=I,I=(I+1)%R,W=0;W<g;){for(var ea=u[W],aa=z[E];aa.y<ea;)Y=E,E=(E-1+R)%R,aa=z[E];for(var ca=z[I];ca.y<ea;)Z=I,I=(I+1)%R,ca=z[I];var ma=z[Y],na=z[Z],ca=na.x+(ca.x-na.x)*(ea-na.y)/(ca.y-na.y);J[W][0]=ma.x+(aa.x-ma.x)*(ea-ma.y)/(aa.y-ma.y);J[W][1]=ca;W++}for(u=0;u<d;u++)z=2*u,g=L.x,J=g-s[z][0],R=s[z][1]-g,J=J<R?J:R,R=g-s[z+1][0],z=s[z+1][1]-g,z=R<z?R:z,w[u]=2*(J<z?J:z)-p*f;Y=a[b]*f/x;J=a[h]*f/x;p=0;E=w[p];L=0;z=void 0;for(u=0;u<y.length;u++){g=y[u];Z=c[u];R=a[g]*f/x;if(L+R<E&&y.length-\nu>=d-p&&\"\\n\"!=z)L+=R,\" \"===Z&&(L+=Y),l&&l(g,z);else{if(R>E&&(p!==d-1||!k))return!1;if(p+1>=d){if(k){d=E-L-J;if(d>J||R>J)d=Math.floor(g.length*d/R),0<d&&l&&l(g.substring(0,d),z);l&&l(h,void 0);n&&n(p,q,g,z,L);return!0}return!1}p++;n&&n(p,q,g,z,L);q+=f;q+=m;E=w[p];L=R;\" \"===Z&&(L+=Y);if(R>E&&(p!==d||!k))return!1}z=Z}n&&n(p,q,void 0,void 0,L);return!0}var l={rb:72,Zc:0,lineHeight:1.05,ob:1,cb:0.5,sb:0.9,fontFamily:\"sans-serif\",fontStyle:\"normal\",fontWeight:\"normal\",fontVariant:\"normal\",verticalAlign:\"center\"},\ne={},b=\" \",h=\"\\u2026\",n=\"\\u2010\",q=\"\\u00ad\",p=\"\\u200b\",r=[],s=[],w=[],u={text:\"\",md:void 0,kg:void 0},y={o:void 0,q:void 0,vd:void 0,sf:0,tf:0},x=100;return{Le:a,xe:function(b,c,d,e,f,g,h,k,l,r,s,n){var p,m=0,q=0;d=d.toString().trim();!n&&l.result&&d===l.rg&&Math.abs(r-l.ue)/r<=s&&(p=l.result,p.la&&(m=g.x-l.yg,q=g.y-l.zg,s=l.jd,c.save(),c.translate(m,q),s.Ta(c),c.restore()));p||(s=l.jd,s.clear(),p=a(b,s,d,e,f,g,h,k),p.la&&s.Ta(c),l.ue=r,l.yg=g.x,l.zg=g.y,l.result=p,l.rg=d);return p.la?{la:!0,mc:p.mc,\nfontSize:p.fontSize,ea:{x:p.ea.x+m,y:p.ea.y+q,f:p.ea.f,i:p.ea.i},ec:p.ec}:{la:!1}},Ai:function(){return{ue:0,yg:0,zg:0,result:void 0,jd:new ga,rg:void 0}},Ea:l}}();var Da=new function(){function a(a,c){return function(d,g,l,e){function b(a,d,e,f,g){if(0!=a.length){var r=a.shift(),s=k(r),n,p,m,q;if(c(f,g)){n=d;m=s/f;do{s=r.shift();p=s.vc;q=p/m;p=s;var P=e,F=m;p.x=n+q/2;p.y=P+F/2;l&&h(s,n,e,q,m);n+=q}while(0<r.length);return b(a,d,e+m,f,g-m)}n=e;q=s/g;do s=r.shift(),p=s.vc,m=p/q,p=s,P=n,F=m,p.x=d+q/2,p.y=P+F/2,l&&h(s,d,n,q,m),n+=m;while(0<r.length);return b(a,d+q,e,f-q,g)}}function h(a,b,c,d,e){a.o=[{x:b,y:c},{x:b+d,y:c},{x:b+d,y:c+e},{x:b,y:c+e}]}var n=g.x,m=\ng.y,p=g.f;g=g.i;if(0!=d.length)if(1==d.length)d[0].x=n+p/2,d[0].y=m+g/2,d[0].Ed=0,l&&h(d[0],n,m,p,g);else{d=d.slice(0);for(var r=0,s=0;s<d.length;s++)r+=d[s].T;r=p*g/r;for(s=0;s<d.length;s++)d[s].vc=d[s].T*r;e=a(d,p,g,[[d.shift()]],e);b(e,n,m,p,g)}}}function m(a,c,d,g){function l(a){return Math.max(Math.pow(h*a/b,d),Math.pow(b/(h*a),g))}var e=k(a),b=e*e,h=c*c;c=l(a[0].vc);for(e=1;e<a.length;e++)c=Math.max(c,l(a[e].vc));return c}function k(a){for(var c=0,d=0;d<a.length;d++)c+=a[d].vc;return c}this.te=\na(function(a,c,d,g,l){l=Math.pow(2,l);for(var e=1/l,b=c<d;0<a.length;){var h=g[g.length-1],n=a.shift(),q=b?c:d,p=b?l:e,r=b?e:l,s=m(h,q,p,r);h.push(n);q=m(h,q,p,r);s<q&&(h.pop(),g.push([n]),b?d-=k(h)/c:c-=k(h)/d,b=c<d)}return g},function(a,c){return a<c});this.Xb=a(function(a,c,d,g,l){function e(a){if(1<g.length){for(var d=g[g.length-1],e=g[g.length-2].slice(0),f=0;f<d.length;f++)e.push(d[f]);m(e,c,b,h)<a&&g.splice(-2,2,e)}}for(var b=Math.pow(2,l),h=1/b;0<a.length;){d=g[g.length-1];l=m(d,c,b,h);if(0==\na.length)return;var k=a.shift();d.push(k);var q=m(d,c,b,h);l<q&&(d.pop(),e(l),g.push([k]))}e(m(g[g.length-1],c,b,h));return g},function(){return!0})};function Ea(a){var m={},k=a.Ud,f;a.c.j(\"model:loaded\",function(a){f=a});this.H=function(){a.c.p(\"api:initialized\",this)};this.Dc=function(a,d,f,l){this.pd(m,d);this.qd(m,d);this.od(m,d,!1);l&&l(m);a(k,m,f)};this.ud=function(a,d,g,k,e,b,h){if(a){for(a=d.length-1;0<=a;a--){var n=d[a],m=D.extend({group:n.group},e);m[g]=k(n);b(m)}0<d.length&&h(D.extend({groups:$.Mc(f,k).map(function(a){return a.group})},e))}};this.qd=function(a,d){a.selected=d.selected;a.hovered=d.Eb;a.open=d.open;a.openness=d.Lb;a.exposed=\nd.U;a.exposure=d.ka;a.transitionProgress=d.ua;a.revealed=!d.ca.Na();a.browseable=d.Qa?d.O:void 0;a.visible=d.$;a.labelDrawn=d.ra&&d.ra.la;return a};this.pd=function(a,d){var f=d.parent;a.group=d.group;a.parent=f&&f.group;a.weightNormalized=d.wg;a.level=d.K-1;a.siblingCount=f&&f.e.length;a.hasChildren=!d.empty();a.index=d.index;a.indexByWeight=d.Ed;a.description=d.description;a.attribution=d.na;return a};this.od=function(a,d,f){a.polygonCenterX=d.L.x;a.polygonCenterY=d.L.y;a.polygonArea=d.L.ja;a.boxLeft=\nd.q.x;a.boxTop=d.q.y;a.boxWidth=d.q.f;a.boxHeight=d.q.i;if(d.ra&&d.ra.la){var k=d.ra.ea;a.labelBoxLeft=k.x;a.labelBoxTop=k.y;a.labelBoxWidth=k.f;a.labelBoxHeight=k.i;a.labelFontSize=d.ra.fontSize}f&&d.ba&&(a.polygon=d.ba.map(function(a){return{x:a.x,y:a.y}}),a.neighbors=d.C&&d.C.map(function(a){return a&&a.group}));return a}};var la=new function(){var a=window.console;this.Pa=function(a){throw\"FoamTree: \"+a;};this.info=function(m){a.info(\"FoamTree: \"+m)};this.warn=function(m){a.warn(\"FoamTree: \"+m)}};function Fa(a){function m(b,d){b.e=[];b.La=!0;var e=c(d),f=0;if((\"flattened\"===a.xb||\"always\"===a.ah&&b.group&&b.group.description)&&0<d.length&&0<b.K){var g=d.reduce(function(a,b){return a+D.B(b.weight,1)},0),h=k(b.group,!1);h.description=!0;h.T=g*a.cc;h.index=f++;h.parent=b;h.K=b.K+1;h.id=h.id+\"_d\";b.e.push(h)}for(g=0;g<d.length;g++){var l=d[g],h=D.B(l.weight,1);if(0>=h)if(a.wj)h=0.9*e;else continue;l=k(l,!0);l.T=h;l.index=f;l.parent=b;l.K=b.K+1;b.e.push(l);f++}}function k(a,b){var c=new Ga;f(a);\nc.id=a.__id;c.group=a;b&&(n[a.__id]=c);return c}function f(a){D.N(a,\"__id\")||(Object.defineProperty(a,\"__id\",{enumerable:!1,configurable:!1,writable:!1,value:h}),h++)}function c(a){for(var b=Number.MAX_VALUE,c=0;c<a.length;c++){var d=a[c].weight;0<d&&b>d&&(b=d)}b===Number.MAX_VALUE&&(b=1);return b}function d(a){if(!a.empty()){a=a.e;var b=0,c;for(c=a.length-1;0<=c;c--){var d=a[c].T;b<d&&(b=d)}for(c=a.length-1;0<=c;c--)d=a[c],d.wg=d.T/b}}function g(a){if(!a.empty()){a=a.e.slice(0).sort(function(a,b){return a.T<\nb.T?1:a.T>b.T?-1:a.index-b.index});for(var b=0;b<a.length;b++)a[b].Ed=b}}function l(){for(var c=b.e.reduce(function(a,b){return a+b.T},0),d=0;d<b.e.length;d++){var e=b.e[d];e.na&&(e.T=Math.max(0.025,a.Tg)*c)}}var e=this,b=new Ga,h,n,q,p,r;this.H=function(){return b};this.S=function(b){var c=b.group.groups,e=a.si;return!b.e&&!b.description&&c&&0<c.length&&r+c.length<=e?(r+=c.length,m(b,c),d(b),g(b),!0):!1};this.Z=function(a){function c(a){var b=a.groups;if(b)for(var d=0;d<b.length;d++){var e=b[d];\nf(e);var g=e.__id;n[g]=null;p[g]=a;g=e.id;D.V(g)||(q[g]=e);c(e)}}function e(a,b){if(!a)return b;var c=Math.max(b,a.__id||0),d=a.groups;if(d&&0<d.length)for(var f=d.length-1;0<=f;f--)c=e(d[f],c);return c}b.group=a;b.Ca=!1;b.O=!1;b.Qa=!1;b.open=!0;b.Lb=1;h=e(a,0)+1;n={};q={};p={};r=0;a&&(f(a),n[a.__id]=b,D.V(a.id)||(q[a.id]=a),c(a));m(b,a&&a.groups||[]);(function(a){if(!a.empty()){var b=k({attribution:!0});b.index=a.e.length;b.parent=a;b.K=a.K+1;b.na=!0;a.e.push(b)}})(b);d(b);l();g(b)};this.update=\nfunction(a){a.forEach(function(a){$.Fa(a,function(a){if(!a.empty()){a=a.e;for(var b=c(a.map(function(a){return a.group})),d=0;d<a.length;d++){var e=a[d];e.T=0<e.group.weight?e.group.weight:0.9*b}}});d(a);a===b&&l();g(a)})};this.k=function(a){return function(){if(D.V(a)||D.mf(a))return[];if(Array.isArray(a))return a.map(e.d,e);if(D.jc(a)){if(D.N(a,\"__id\"))return[e.d(a)];if(D.N(a,\"all\")){var c=[];$.F(b,function(a){c.push(a)});return c}if(D.N(a,\"groups\"))return e.k(a.groups)}return[e.d(a)]}().filter(function(a){return void 0!==\na})};this.d=function(a){if(D.jc(a)&&D.N(a,\"__id\")){if(a=a.__id,D.N(n,a)){if(null===n[a]){for(var b=p[a],c=[];b;){b=b.__id;c.push(b);if(n[b])break;b=p[b]}for(b=c.length-1;0<=b;b--)this.S(n[c[b]])}return n[a]}}else if(D.N(q,a))return this.d(q[a])};this.A=function(a,b,c){return{e:e.k(a),Ia:D.B(a&&a[b],!0),Ha:D.B(a&&a.keepPrevious,c)}}}\nfunction Ha(a,m,k){var f={};m.Ha&&$.F(a,function(a){k(a)&&(f[a.id]=a)});a=m.e;m=m.Ia;for(var c=a.length-1;0<=c;c--){var d=a[c];f[d.id]=m?d:void 0}var g=[];D.Ga(f,function(a){void 0!==a&&g.push(a)});return g};function Ia(a){function m(a,b){var c=a.ka;b.opacity=1;b.Ka=1;b.va=0>c?1-p.ei/100*c:1;b.wa=0>c?1-p.fi/100*c:1;b.fa=0>c?1+0.5*c:1}function k(a){a=a.ka;return Math.max(0.001,0===a?1:1+a*(p.Wa-1))}function f(a,b){for(var c=a.reduce(function(a,b){a[b.id]=b;return a},{}),d=a.length-1;0<=d;d--)$.F(a[d],function(a){c[a.id]=void 0});var e=[];D.Ga(c,function(a){a&&$.Ge(a,function(a){a.open||e.push(a)})});var f=[];D.Ga(c,function(a){a&&a.open&&f.push(a)});d=[];0!==e.length&&d.push(x.Kb({e:e,Ia:!0,Ha:!0},b,!0));\nreturn pa(d)}function c(c,f,k,n){var m=l();if(0===c.length&&!m)return(new V).J().M();var q=c.reduce(function(a,b){a[b.id]=!0;return a},{}),s=[];c=[];if(A.reduce(function(a,b){return a||q[b.id]&&(!b.U||1!==b.ka)||!q[b.id]&&!b.parent.U&&(b.U||-1!==b.ka)},!1)){var x=[],B={};A.forEach(function(a){q[a.id]&&(a.U||s.push(a),a.U=!0,$.Fa(a,function(a){x.push(b(a,1));B[a.id]=!0}))});0<x.length?($.F(r,function(a){q[a.id]||(a.U&&s.push(a),a.U=!1);B[a.id]||x.push(b(a,-1))}),c.push(y.D.m({}).Ya(x).call(h).ab()),\nd(q),c.push(g(m)),k&&(u.sc(C,p.Qc,p.Va,X.pa(p.gc)),u.Qb())):(c.push(e(k)),f&&$.F(r,function(a){a.U&&s.push(a)}))}return pa(c).P(function(){w.ud(f,s,\"exposed\",function(a){return a.U},{indirect:n},a.options.Df,a.options.Cf)})}function d(a){A.reduce(n(!0,void 0,function(b){return b.U||a[b.id]}),q(C));C.x-=C.f*(p.Wa-1)/2;C.y-=C.i*(p.Wa-1)/2;C.f*=p.Wa;C.i*=p.Wa}function g(b){if(b||!u.Rd())return y.D.m(s).ia({duration:0.7*p.Va,G:{x:{end:C.x+C.f/2,R:X.pa(p.gc)},y:{end:C.y+C.i/2,R:X.pa(p.gc)}},da:function(){a.c.p(\"foamtree:dirty\",\n!0)}}).ab();s.x=C.x+C.f/2;s.y=C.y+C.i/2;return(new V).J().M()}function l(){return!!A&&A.reduce(function(a,b){return a||0!==b.ka},!1)}function e(a){var c=[],d=[];$.F(r,function(a){0!==a.ka&&d.push(b(a,0,function(){this.U=!1}))});c.push(y.D.m({}).Ya(d).ab());u.content(0,0,K,B);a&&(c.push(u.reset(p.Va,X.pa(p.gc))),u.Qb());return pa(c)}function b(b,c,d){var e=y.D.m(b);0===b.ka&&0!==c&&e.call(function(){this.Cc(H);this.Ab(m)});e.ia({duration:p.Va,G:{ka:{end:c,R:X.pa(p.gc)}},da:function(){r.I=!0;r.Ma=!0;\na.c.p(\"foamtree:dirty\",!0)}});0===c&&e.call(function(){this.Nd();this.nc();this.fd(H);this.ed(m)});return e.call(d).xa()}function h(){var a=r.e.reduce(n(!1,H.Ub,void 0),q({})).ea,b=p.Qc,c=Math.min(a.x,C.x-C.f*b),d=Math.max(a.x+a.f,C.x+C.f*(1+b)),e=Math.min(a.y,C.y-C.i*b),a=Math.max(a.y+a.i,C.y+C.i*(1+b));u.content(c,e,d-c,a-e)}function n(a,b,c){var d={};return function(e,f){if(!c||c(f)){for(var g=a?f.ba||f.o:f.o,h,k=g.length-1;0<=k;k--)h=void 0!==b?b(f,g[k],d):g[k],e.$c=Math.min(e.$c,h.x),e.Od=Math.max(e.Od,\nh.x),e.ad=Math.min(e.ad,h.y),e.Pd=Math.max(e.Pd,h.y);e.ea.x=e.$c;e.ea.y=e.ad;e.ea.f=e.Od-e.$c;e.ea.i=e.Pd-e.ad}return e}}function q(a){return{$c:Number.MAX_VALUE,Od:Number.MIN_VALUE,ad:Number.MAX_VALUE,Pd:Number.MIN_VALUE,ea:a}}var p=a.options,r,s,w,u,y,x,A,C,K,B,H={qf:function(a,b){b.scale=k(a);return!1},Tb:function(a,b){var c=k(a),d=s.x,e=s.y;b.translate(d,e);b.scale(c,c);b.translate(-d,-e)},Vb:function(a,b,c){a=k(a);var d=s.x,e=s.y;c.x=(b.x-d)/a+d;c.y=(b.y-e)/a+e},Ub:function(a,b,c){a=k(a);var d=\ns.x,e=s.y;c.x=(b.x-d)*a+d;c.y=(b.y-e)*a+e;return c}};a.c.j(\"stage:initialized\",function(a,b,c,d){s={x:c/2,y:d/2};K=c;B=d;C={x:0,y:0,f:K,i:B}});a.c.j(\"stage:resized\",function(a,b,c,d){s.x*=c/a;s.y*=d/b;K=c;B=d});a.c.j(\"api:initialized\",function(a){w=a});a.c.j(\"zoom:initialized\",function(a){u=a});a.c.j(\"model:loaded\",function(a,b){r=a;A=b});a.c.j(\"model:childrenAttached\",function(a){A=a});a.c.j(\"timeline:initialized\",function(a){y=a});a.c.j(\"openclose:initialized\",function(a){x=a});var Q=[\"groupExposureScale\",\n\"groupUnexposureScale\",\"groupExposureZoomMargin\"];a.c.j(\"options:changed\",function(a){D.nb(a,Q)&&l()&&(d({}),u.Dj(C,p.Qc),u.Qb())});this.H=function(){a.c.p(\"expose:initialized\",this)};this.fc=function(a,b,d,e){var g=a.e.reduce(function(a,b){for(var c=b;c=c.parent;)a[c.id]=!0;return a},{}),h=Ha(r,a,function(a){return a.U&&!a.open&&!g[a.id]}),k=new V;f(h,b).P(function(){c(h.filter(function(a){return a.o&&a.ba}),b,d,e).P(k.J)});return k.M()}};function Ja(a){function m(c){function b(a,b){var c=Math.min(1,Math.max(0,a.ua));b.opacity=c;b.va=1;b.wa=c;b.Ka=c;b.fa=a.Hb}var h=a.options,k=h.rj,m=h.sj,p=h.oj,r=h.pj,s=h.qj,w=h.fe,u=k+m+p+r+s,y=0<u?w/u:0,x=[];l.gb(h.gg,h.fg,h.hg,h.ig,h.eg);if(0===y&&c.e&&c.O){w=c.e;for(u=0;u<w.length;u++){var A=w[u];A.ua=1;A.Hb=1;A.Ab(b);A.nc();A.ed(b)}c.I=!0;a.c.p(\"foamtree:dirty\",0<y);return(new V).J().M()}if(c.e&&c.O){Ca.Ja(c,Ca.ya(c,a.options.he),function(c,d,e){c.Cc(l);c.Ab(b);e=\"groups\"===a.options.ge?e:d;\nd=f.D.m(c).eb(e*y*k).ia({duration:y*m,G:{ua:{end:1,R:X.pa(h.nj)}},da:function(){this.I=!0;a.c.p(\"foamtree:dirty\",0<y)}}).xa();e=f.D.m(c).eb(g?y*(p+e*r):0).ia({duration:g?y*s:0,G:{Hb:{end:1,R:X.Jb}},da:function(){this.I=!0;a.c.p(\"foamtree:dirty\",0<y)}}).xa();c=f.D.m(c).Ya([d,e]).oe().ib(function(){this.Nd();this.nc();this.fd(l);this.ed(b)}).xa();x.push(c)});d.d();var C=new V;f.D.m({}).Ya(x).call(function(){d.k();C.J()}).start();return C.M()}return(new V).J().M()}var k,f,c=[],d=new qa(D.ta);a.c.j(\"stage:initialized\",\nfunction(){});a.c.j(\"stage:resized\",function(){});a.c.j(\"stage:newLayer\",function(a,b){c.push(b)});a.c.j(\"model:loaded\",function(a){k=a;d.clear()});a.c.j(\"zoom:initialized\",function(){});a.c.j(\"timeline:initialized\",function(a){f=a});var g=!1;a.c.j(\"render:renderers:resolved\",function(a){g=a.labelPlainFill||!1});var l=new function(){var a=0,b=0,c=0,d=0,f=0,g=0;this.gb=function(k,l,m,u,y){a=1+l;b=1-a;c=m;d=u;f=y;g=k};this.qf=function(g,k){k.scale=a+b*g.ua;return 0!==f||0!==c||0!==d};this.Tb=function(k,\nl){var m=a+b*k.ua,u=k.parent,y=g*k.x+(1-g)*u.x,x=g*k.y+(1-g)*u.y;l.translate(y,x);l.scale(m,m);m=1-k.ua;l.rotate(f*Math.PI*m);l.translate(-y,-x);l.translate(u.q.f*c*m,u.q.i*d*m)};this.Vb=function(f,k,l){var m=a+b*f.ua,q=g*f.x+(1-g)*f.parent.x,x=g*f.y+(1-g)*f.parent.y,A=1-f.ua;f=f.parent;l.x=(k.x-q)/m+q-f.q.f*c*A;l.y=(k.y-x)/m+x-f.q.i*d*A};this.Ub=function(f,k,l){var m=a+b*f.ua,q=g*f.x+(1-g)*f.parent.x,x=g*f.y+(1-g)*f.parent.y,A=1-f.ua;f=f.parent;l.x=(k.x-q)*m+q-f.q.f*c*A;l.y=(k.y-x)*m+x-f.q.i*d*A}};\nthis.H=function(){};this.k=function(){function c(a,b){var d=Math.min(1,Math.max(0,a.ua));b.opacity=d;b.va=1;b.wa=d;b.Ka=d;b.fa=a.Hb}function b(a,b){var c=Math.min(1,Math.max(0,a.Zd));b.opacity=c;b.Ka=c;b.va=1;b.wa=1;b.fa=a.Hb}var h=a.options,m=h.Yd,q=h.Ki,p=h.Li,r=h.Mi,s=h.Gi,w=h.Hi,u=h.Ii,y=h.Ci,x=h.Di,A=h.Ei,C=s+w+u+y+x+A+q+p+r,K=0<C?m/C:0,B=[];d.A()?l.gb(h.Qi,h.Oi,h.Ri,h.Si,h.Ni):l.gb(h.gg,h.fg,h.hg,h.ig,h.eg);Ca.Ja(k,Ca.ya(k,a.options.Pi),function(d,k,m){var n=\"groups\"===a.options.Ji?m:k;B.push(f.D.m(d).call(function(){this.Ab(c)}).eb(g?\nK*(s+n*w):0).ia({duration:g?K*u:0,G:{Hb:{end:0,R:X.Jb}},da:function(){this.I=!0;a.c.p(\"foamtree:dirty\",!0)}}).xa());$.F(d,function(c){B.push(f.D.m(c).call(function(){this.Cc(l);this.Ab(b)}).eb(K*(y+x*n)).ia({duration:K*A,G:{Zd:{end:0,R:X.Jb}},da:function(){this.I=!0;a.c.p(\"foamtree:dirty\",!0)}}).ib(function(){this.selected=!1;this.fd(l)}).xa())});B.push(f.D.m(d).call(function(){this.Cc(l)}).eb(K*(q+p*n)).ia({duration:K*r,G:{ua:{end:0,R:X.pa(h.Fi)}},da:function(){this.I=!0;a.c.p(\"foamtree:dirty\",!0)}}).ib(function(){this.selected=\n!1;this.fd(l)}).xa())});return f.D.m({}).Ya(B).ab()};this.d=function(a){return m(a)}};function Ka(a){function m(a,b){var c=[];$.F(g,function(b){if(b.e){var d=D.N(a,b.id);b.open!==d&&(d||b.U||$.F(b,function(a){if(a.U)return c.push(b),!1}))}});if(0===c.length)return(new V).J().M();var f;for(f=c.length-1;0<=f;f--)c[f].open=!1;var k=d.fc({e:c,Ia:!0,Ha:!0},b,!0,!0);for(f=c.length-1;0<=f;f--)c[f].open=!0;return k}function k(d,b,h){function k(b,d){b.Ab(m);var e=c.D.m(b).ia({duration:a.options.cd,G:{Lb:{end:d?1:0,R:X.ze}},da:function(){this.I=!0;a.c.p(\"foamtree:dirty\",!0)}}).call(function(){this.open=\nd;b.fb=!1}).ib(function(){this.nc();this.ed(m);delete f[this.id]}).xa();return f[b.id]=e}function m(a,b){b.opacity=1-a.Lb;b.va=1;b.wa=1;b.fa=1;b.Ka=1}var p=[],r=[];$.F(g,function(a){if(a.O&&a.Y){var b=D.N(d,a.id),c=f[a.id];if(c&&c.Gb())c.stop();else if(a.open===b)return;a.fb=b;b||(a.open=b,a.Td=!1);r.push(a);p.push(k(a,b))}});return 0<p.length?(a.c.p(\"openclose:changing\"),c.D.m({}).Ya(p).ab().P(function(){l.ud(b,r,\"open\",function(a){return a.open},{indirect:h},a.options.Lf,a.options.Kf)})):(new V).J().M()}\nvar f,c,d,g,l;a.c.j(\"api:initialized\",function(a){l=a});a.c.j(\"model:loaded\",function(a){g=a;f={}});a.c.j(\"timeline:initialized\",function(a){c=a});a.c.j(\"expose:initialized\",function(a){d=a});this.H=function(){a.c.p(\"openclose:initialized\",this)};this.Kb=function(c,b,d){if(\"flattened\"==a.options.xb)return(new V).J().M();c=Ha(g,c,function(a){return a.open||a.fb});for(var f=new V,l=0;l<c.length;l++)c[l].fb=!0;0<c.length&&a.c.p(\"foamtree:attachChildren\",c);var p=c.reduce(function(a,b){a[b.id]=!0;return a},\n{});m(p,b).P(function(){k(p,b,d).P(f.J)});return f.M()}};function La(a){function m(c,d){var g=Ha(k,c,function(a){return a.selected});$.F(k,function(a){!0===a.selected&&(a.selected=!a.selected,a.I=!a.I,a.$a=!a.$a)});var l;for(l=g.length-1;0<=l;l--){var e=g[l];e.selected=!e.selected;e.I=!e.I;e.$a=!e.$a}var b=[];$.F(k,function(a){a.I&&b.push(a)});0<b.length&&a.c.p(\"foamtree:dirty\",!1);f.ud(d,b,\"selected\",function(a){return a.selected},{},a.options.Nf,a.options.Mf)}var k,f;a.c.j(\"api:initialized\",function(a){f=a});a.c.j(\"model:loaded\",function(a){k=a});this.H=\nfunction(){a.c.p(\"select:initialized\",this)};this.select=function(a,d){return m(a,d)}};function Ma(a){function m(a){return function(b){a.call(this,{x:b.x,y:b.y,scale:b.scale,wd:b.delta,ctrlKey:b.ctrlKey,metaKey:b.metaKey,altKey:b.altKey,shiftKey:b.shiftKey,wb:b.secondary,touches:b.touches})}}function k(){function b(a){return function(b){b.x*=N/q.clientWidth;b.y*=U/q.clientHeight;return a(b)}}\"external\"!==n.gf&&(\"hammerjs\"===n.gf&&D.N(window,\"Hammer\")&&(E.H(q),E.m(\"tap\",b(h.d),!0),E.m(\"doubletap\",b(h.k),!0),E.m(\"hold\",b(h.ya),!0),E.m(\"touch\",b(h.Aa),!1),E.m(\"release\",b(h.Ba),!1),E.m(\"dragstart\",\nb(h.Z),!0),E.m(\"drag\",b(h.A),!0),E.m(\"dragend\",b(h.S),!0),E.m(\"transformstart\",b(h.Ua),!0),E.m(\"transform\",b(h.Ja),!0),E.m(\"transformend\",b(h.bb),!0)),F=new ta(q),T=new sa,F.d(b(h.d)),F.k(b(h.k)),F.ya(b(h.ya)),F.Ba(b(h.Aa)),F.Pa(b(h.Ba)),F.Z(b(h.Z)),F.A(b(h.A)),F.S(b(h.S)),F.za(b(h.za)),F.Ja(b(h.za)),F.Aa(b(h.Pa)),T.addEventListener(\"keyup\",function(b){var c=!1,d=void 0,e=n.Rf({keyCode:b.keyCode,preventDefault:function(){c=!0},preventOriginalEventDefault:function(){d=\"prevent\"},allowOriginalEventDefault:function(){d=\n\"allow\"}});\"prevent\"===d&&b.preventDefault();(c=c||0<=e.indexOf(!1))||27===b.keyCode&&a.c.p(\"interaction:reset\")}))}function f(){p.Hc(2)?a.c.p(\"interaction:reset\"):p.normalize(n.wc,X.pa(n.xc))}function c(a){return function(){x.empty()||a.apply(this,arguments)}}function d(a,b,c){var d={},f={};return function(g){var h;switch(a){case \"click\":h=n.xf;break;case \"doubleclick\":h=n.yf;break;case \"hold\":h=n.Ef;break;case \"hover\":h=n.Ff;break;case \"mousemove\":h=n.Hf;break;case \"mousewheel\":h=n.Jf;break;case \"mousedown\":h=\nn.Gf;break;case \"mouseup\":h=n.If;break;case \"dragstart\":h=n.Bf;break;case \"drag\":h=n.zf;break;case \"dragend\":h=n.Af;break;case \"transformstart\":h=n.Qf;break;case \"transform\":h=n.Of;break;case \"transformend\":h=n.Pf}var k=!1,m=!h.empty(),r=p.absolute(g,d),q=(b||m)&&l(r),s=(b||m)&&e(r);m&&(m=q?q.group:null,r=q?q.Vb(r,f):r,g.Mb=void 0,h=h({type:a,group:m,topmostClosedGroup:m,bottommostOpenGroup:s?s.group:null,x:g.x,y:g.y,xAbsolute:r.x,yAbsolute:r.y,scale:D.B(g.scale,1),secondary:g.wb,touches:D.B(g.touches,\n1),delta:D.B(g.wd,0),ctrlKey:g.ctrlKey,metaKey:g.metaKey,altKey:g.altKey,shiftKey:g.shiftKey,preventDefault:function(){k=!0},preventOriginalEventDefault:function(){g.Mb=\"prevent\"},allowOriginalEventDefault:function(){g.Mb=\"allow\"}}),k=k||0<=h.indexOf(!1),q&&q.na&&\"click\"===a&&(k=!1));k||c&&c({Ec:q,Vg:s},g)}}function g(a){function b(a,c){var d=c.e;if(d){for(var e=-Number.MAX_VALUE,f,g=0;g<d.length;g++){var h=d[g];!h.description&&h.$&&I(h,a)&&h.scale>e&&(f=h,e=h.scale)}var k;f&&(k=b(a,f));return k||\nf||c}return c}for(var c=t.length,d=t[0].scale,e=t[0].scale,f=0;f<c;f++){var g=t[f],g=g.scale;g<d&&(d=g);g>e&&(e=g)}if(d!==e)for(f=0;f<c;f++)if(g=t[f],g.scale===e&&g.$&&I(g,a))return b(a,g);return b(a,x)}function l(a,b){var c;if(\"flattened\"===n.xb)c=g(a);else{c=b||0;for(var d=t.length,e=void 0,f=0;f<d;f++){var h=t[f];h.scale>c&&!1===h.open&&h.$&&I(h,a)&&(e=h,c=h.scale)}c=e}c&&c.description&&(c=c.parent);return c}function e(a){var b=void 0,c=0;$.Kc(x,function(d){!0===d.open&&d.$&&d.scale>c&&I(d,a)&&\n(b=d,c=d.scale)});return b}var b=v.mi(),h=this,n=a.options,q,p,r,s,w,u,y,x,A=!1,C,K,B,H,Q,O,P,F,T,N,U;a.c.j(\"stage:initialized\",function(a,b,c,d){q=b;N=c;U=d;k()});a.c.j(\"stage:resized\",function(a,b,c,d){N=c;U=d});a.c.j(\"stage:disposed\",function(){F.kb();E.kb();T.d()});a.c.j(\"expose:initialized\",function(a){s=a});a.c.j(\"zoom:initialized\",function(a){p=a});a.c.j(\"openclose:initialized\",function(a){w=a});a.c.j(\"select:initialized\",function(a){u=a});a.c.j(\"titlebar:initialized\",function(a){y=a});a.c.j(\"timeline:initialized\",\nfunction(a){r=a});var t;a.c.j(\"model:loaded\",function(a,b){x=a;t=b});a.c.j(\"model:childrenAttached\",function(a){t=a});this.H=function(){};this.Aa=c(d(\"mousedown\",!1,function(){p.xi()}));this.Ba=c(d(\"mouseup\",!1,void 0));this.d=c(d(\"click\",!0,function(a,b){if(!b.wb&&!b.shiftKey){var c=a.Ec;c&&(c.na?document.location.href=xa.jg(\"iuuq;..b`ssnurd`sbi/bnl.gn`lusdd\"):u.select({e:[c],Ia:!c.selected,Ha:b.metaKey||b.ctrlKey},!0))}}));this.k=c(d(\"doubleclick\",!0,function(b,c){var d,e;if(c.wb||c.shiftKey){if(d=\nb.Ec)d.parent.U&&(d=d.parent),e={e:d.parent!==x?[d.parent]:[],Ia:!0,Ha:!1},u.select(e,!0),s.fc(e,!0,!0,!1)}else if(d=b.Ec)e={e:[d],Ia:!0,Ha:!1},d.fb=!0,a.c.p(\"foamtree:attachChildren\",[d]),s.fc(e,!0,!0,!1);d&&r.D.m({}).eb(n.Va/2).call(function(){w.Kb({e:$.Mc(x,function(a){return a.Td&&!$.li(d,a)}),Ia:!1,Ha:!0},!0,!0);d.Td=!0;w.Kb({e:[d],Ia:!(c.wb||c.shiftKey),Ha:!0},!0,!0)}).start()}));this.ya=c(d(\"hold\",!0,function(a,b){var c=!(b.metaKey||b.ctrlKey||b.shiftKey)&&!b.wb,d;(d=c?a.Ec:a.Vg)&&d!==x&&w.Kb({e:[d],\nIa:c,Ha:!0},!0,!1)}));this.Z=c(d(\"dragstart\",!1,function(a,b){C=b.x;K=b.y;B=Date.now();A=!0}));this.A=c(d(\"drag\",!1,function(a,b){if(A){var c=Date.now();O=Math.min(1,c-B);B=c;var c=b.x-C,d=b.y-K;p.vi(c,d);H=c;Q=d;C=b.x;K=b.y}}));this.S=c(d(\"dragend\",!1,function(){if(A){A=!1;var a=Math.sqrt(H*H+Q*Q)/O;4<=a?p.wi(a,H,Q):p.vf()}}));this.Ua=c(d(\"transformstart\",!1,function(a,b){P=1;C=b.x;K=b.y}));var z=1,L=!1;this.Ja=c(d(\"transform\",!1,function(a,b){var c=b.scale-0.01;p.Pg(b,c/P,b.x-C,b.y-K);P=c;C=b.x;\nK=b.y;z=P;L=L||2<b.touches}));this.bb=c(d(\"transformend\",!1,function(){L&&0.8>z?a.c.p(\"interaction:reset\"):f();L=!1}));this.Pa=c(d(\"mousewheel\",!1,function(){var a=D.$g(function(){f()},300);return function(c,d){var e=n.Jj;1!==e&&(e=Math.pow(e,d.wd),b?(p.Qg(d,e),a()):p.Yb(d,e,n.wc,X.pa(n.xc)).P(f))}}()));this.za=c(function(){var b=void 0,c={},e=!1,f,g=d(\"hover\",!1,function(){b&&(b.Eb=!1,0<b.K&&(b.I=!0));f&&(f.Eb=!0,0<f.K&&(f.I=!0));y.update(f);a.c.p(\"foamtree:dirty\",!1)}),h=d(\"mousemove\",!1,void 0);\nreturn function(a){if(\"out\"===a.type)f=void 0,e=f!==b;else if(p.absolute(a,c),b&&!b.open&&I(b,c)){var d=l(c,b.scale);d&&d!==b?(e=!0,f=d):e=!1}else f=l(c),e=f!==b;e&&(g(a),b=f,e=!1);b&&h(a)}}());this.gb={click:m(this.d),doubleclick:m(this.k),hold:m(this.ya),mouseup:m(this.Ba),mousedown:m(this.Aa),dragstart:m(this.Z),drag:m(this.A),dragend:m(this.S),transformstart:m(this.Ua),transform:m(this.Ja),transformend:m(this.bb),hover:m(this.za),mousewheel:m(this.Pa)};var E=function(){function a(b,c){return function(a){a=\na.gesture;var d=a.center,d=ra.Ie(q,d.pageX,d.pageY,{});d.scale=a.scale;d.wb=1<a.touches.length;d.touches=a.touches.length;b.call(q,d);(void 0===d.Mb&&c||\"prevent\"===d.Mb)&&a.preventDefault()}}var b,c={};return{H:function(a){b=window.Hammer(a,{doubletap_interval:350,hold_timeout:400,doubletap_distance:10})},m:function(d,e,f){c[d]=e;b.on(d,a(e,f))},kb:function(){b&&D.Ga(c,function(a,c){b.off(c,a)})}}}(),I=function(){var a={};return function(b,c){b.Vb(c,a);return b.ba&&M.Ua(b.ba,a)}}()};function Na(a){function m(a,d,f,k){var e,b=0,h=[];for(e=0;e<d.length;e++){var m=Math.sqrt(M.d(d[e],d[(e+1)%d.length]));h.push(m);b+=m}for(e=0;e<h.length;e++)h[e]/=b;a[0].x=f.x;a[0].y=f.y;var q=m=b=0;for(e=1;e<a.length;e++){for(var p=a[e],r=0.95*Math.pow(e/a.length,k),b=b+0.3819;m<b;)m+=h[q],q=(q+1)%h.length;var s=(q-1+h.length)%h.length,w=1-(m-b)/h[s],u=d[s].x,s=d[s].y,y=d[q].x,x=d[q].y,u=(u-f.x)*r+f.x,s=(s-f.y)*r+f.y,y=(y-f.x)*r+f.x,x=(x-f.y)*r+f.y;p.x=u*(1-w)+y*w;p.y=s*(1-w)+x*w}}var k={random:{Fb:function(a,\nd){for(var f=0;f<a.length;f++){var k=a[f];k.x=d.x+Math.random()*d.f;k.y=d.y+Math.random()*d.i}},Zb:\"box\"},ordered:{Fb:function(a,d){var g=a.slice(0);f.lc&&g.sort(Oa);Da.Xb(g,d,!1,f.ce)},Zb:\"box\"},squarified:{Fb:function(a,d){var g=a.slice(0);f.lc&&g.sort(Oa);Da.te(g,d,!1,f.ce)},Zb:\"box\"},fisheye:{Fb:function(a,d,g){a=a.slice(0);f.lc&&a.sort(Oa);m(a,d,g,0.25)},Zb:\"polygon\"},blackhole:{Fb:function(a,d,g){a=a.slice(0);f.lc&&a.sort(Oa).reverse();m(a,d,g,1)},Zb:\"polygon\"}};k.order=k.ordered;k.treemap=\nk.squarified;var f=a.options;this.d=function(a,d,g){if(0<a.length){g=k[g.relaxationInitializer||g.initializer||f.ij||\"random\"];if(\"box\"===g.Zb){var l=M.q(d,{});g.Fb(a,l);M.Bc(a,M.A(l),d)}else g.Fb(a,d,M.k(d,{}));for(l=a.length-1;0<=l;l--){g=a[l];if(g.description){a=M.qe(d,f.Ic,f.bh);g.x=a.x;g.y=a.y;break}if(g.na){a=M.qe(d,f.ve,f.Rg);g.x=a.x;g.y=a.y;break}}}}};function Pa(a){var m,k=a.options,f=new Qa(a,this),c=new Ra(a,this),d={relaxed:f,ordered:c,squarified:c},g=d[a.options.Wc]||f;this.Ag=5E-5;a.c.j(\"model:loaded\",function(a){m=a});a.c.j(\"options:changed\",function(a){a.layout&&D.N(d,k.Wc)&&(g=d[k.Wc])});this.step=function(a,c,b,d){return g.step(a,c,b,d)};this.complete=function(a){g.complete(a)};this.kf=function(a){return a===m?!0:2*Math.sqrt(a.L.ja/(Math.PI*a.e.length))>=Math.max(k.Ve,5E-5)};this.yd=function(a,c){for(var b=Math.pow(k.Ra,a.K),d=k.lb*b,\nb=k.Ad*b,f=a.e,m=f.length-1;0<=m;m--){var p=f[m];g.we(p,b);var r=p;r.ba=0<d?Aa.bb(r.o,d):r.o;r.ba&&(M.q(r.ba,r.q),M.re(r.ba,r.L));p.e&&c.push(p)}};this.qc=function(a){g.qc(a)};this.Nb=function(a){g.Nb(a)}};function Qa(a,m){function k(a){if(a.e){a=a.e;for(var b=0;b<a.length;b++){var c=a[b];c.uc=c.rc*n.Rh}}}function f(a,d){m.kf(a)&&(a.u||(a.u=Aa.bb(a.o,n.Ad*Math.pow(n.Ra,a.K-1)),a.u&&a.e[0]&&a.e[0].description&&\"stab\"==n.dc&&l(a)),a.u&&(b.Nb(a),q.d(c(a),a.u,a.group),a.O=!0,d(a)),k(a))}function c(a){return\"stab\"===n.dc&&0<a.e.length&&a.e[0].description?a.e.slice(1):a.e}function d(a){var b=c(a);Ba.S(b,a.u);Ba.zc(b,a.u);return Ca.Cg(a)*Math.sqrt(h.L.ja/a.L.ja)}function g(a){return a<n.ag||1E-4>a}function l(a){var b=\nn.cc/(1+n.cc),c=M.q(a.u,{}),d={x:c.x,y:0},e=c.y,f=c.i,g=n.Ce*Math.pow(n.Ra,a.K-1),h=f*n.Be,k=n.Ic;\"bottom\"==k||0<=k&&180>k?(k=Math.PI,e+=f,f=-1):(k=0,f=1);for(var l,m=a.u,p=k,q=0,P=1,F=M.k(m,{}),T=F.ja,b=T*b,N=0;q<P&&20>N++;){var U=(q+P)/2;d.y=c.y+c.i*U;l=M.Wb(m,d,p);M.k(l[0],F);var t=F.ja-b;if(0.01>=Math.abs(t)/T)break;else 0<(0==p?1:-1)*t?P=U:q=U}M.q(l[0],c);if(c.i<g||c.i>h)d.y=c.i<g?e+f*Math.min(g,h):e+f*h,l=M.Wb(a.u,d,k);a.e[0].o=l[0];a.u=l[1]}function e(a){a!==h&&2*Math.sqrt(a.L.ja/(Math.PI*\na.e.length))<Math.max(0.85*n.Ve,m.Ag)&&(a.O=!1,a.Ca=!1,a.Qa=!0,a.u=null)}var b=this,h,n=a.options,q=new Na(a),p=0;a.c.j(\"model:loaded\",function(a){h=a;p=0});this.step=function(a,b,k,l){function q(b){b.O&&b.Ca?e(b):b.Qa&&b.o&&f(b,function(){var d=c(b);Ba.S(d,b.u);Ba.zc(d,b.u);a(b)});if(!b.u||!b.O)return 0;var h;b.parent&&b.parent.aa||b.La?(h=d(b),l&&l(b),b.La=!g(h)&&!k,b.aa=!0):h=0;m.yd(b,C);return h}function x(a,b,c){p<a&&(p=a);var d=n.ag;n.Sd(b?1:1-(a-d)/(p-d||1),b,c);b&&(p=0)}for(var A=0,C=[h];0<\nC.length;)A=Math.max(A,q(C.shift()));var K=g(A);b&&x(A,K,k);return K};this.complete=function(a){for(var b=[h];0<b.length;){var c=b.shift();!c.O&&c.Qa&&c.o&&f(c,a);if(c.u){if(c.parent&&c.parent.aa||c.La){for(var e=1E-4>c.L.ja,k=0;!(g(d(c))||e&&32<k++););c.aa=!0;c.La=!1}m.yd(c,b)}}};this.qc=function(a){$.F(a,k)};this.we=function(a,b){if(a.O){var d=a.u;d&&(a.Xd=d);a.u=Aa.bb(a.o,b);a.u&&a.e[0]&&a.e[0].description&&\"stab\"==n.dc&&l(a);d&&!a.u&&(a.aa=!0);a.u&&a.Xd&&M.Bc(c(a),a.Xd,a.u)}};this.Nb=function(a){for(var b=\nc(a),d=a.ja,e,f=e=0;f<b.length;f++)e+=b[f].T;a.ck=e;for(a=0;a<b.length;a++)f=b[a],f.pg=f.f,f.rc=d/Math.PI*(0<e?f.T/e:1/b.length)}};function Ra(a,m){function k(a,d){if(m.kf(a)){if(!a.u||a.parent&&a.parent.aa){var e=l.Ad*Math.pow(l.Ra,a.K-1);a.u=M.A(c(M.q(a.o,{}),e))}a.u&&(a.O=!0,d(a))}else a.O=!1,$.Fa(a,function(a){a.u=null})}function f(a){function c(a){function b(){e.o=M.A(f);e.x=f.x+f.f/2;e.y=f.y+f.i/2}var d=l.cc/(1+l.cc),e=a.e[0],f=M.q(a.u,{}),g=f.i,d=Math.min(Math.max(g*d,l.Ce*Math.pow(l.Ra,a.K-1)),g*l.Be),h=l.Ic;\"bottom\"==h||0<=h&&180>h?(f.i=g-d,a.u=M.A(f),f.y+=g-d,f.i=d,b()):(f.i=d,b(),f.y+=d,f.i=g-d,a.u=M.A(f))}var f;\"stab\"==\nl.dc&&0<a.e.length&&a.e[0].description?(f=a.e.slice(1),c(a)):f=a.e;l.lc&&f.sort(Oa);\"floating\"==l.dc&&d(f,l.Ic,function(a){return a.description});d(f,l.ve,function(a){return a.na});var g=M.q(a.u,{});(e[l.Wc]||Da.Xb)(f,g,!0,l.ce);a.La=!1;a.aa=!0;a.I=!0;a.Ma=!0}function c(a,c){var d=2*c;a.x+=c;a.y+=c;a.f-=d;a.i-=d;return a}function d(a,c,d){for(var e=0;e<a.length;e++){var f=a[e];if(d(f)){a.splice(e,1);\"topleft\"==c||135<=c&&315>c?a.unshift(f):a.push(f);break}}}var g,l=a.options,e={squarified:Da.te,ordered:Da.Xb};\na.c.j(\"model:loaded\",function(a){g=a});this.step=function(a,c,d){this.complete(a);c&&l.Sd(1,!0,d);return!0};this.complete=function(a){for(var c=[g];0<c.length;){var d=c.shift();(!d.O||d.parent&&d.parent.aa)&&d.Qa&&d.o&&k(d,a);d.u&&((d.parent&&d.parent.aa||d.La)&&f(d),m.yd(d,c))}};this.Nb=this.qc=this.we=D.ta};var Sa=new function(){this.Fg=function(a){a.beginPath();a.moveTo(3.2,497);a.bezierCurveTo(0.1,495.1,0,494.1,0,449.6);a.bezierCurveTo(0,403.5,-0.1,404.8,4.1,402.6);a.bezierCurveTo(5.2,402,7.4,401.4,9,401.2);a.bezierCurveTo(10.6,401,31.2,400.6,54.7,400.2);a.bezierCurveTo(99.5,399.4,101,399.5,104.6,402.3);a.bezierCurveTo(107.9,404.9,107.6,404,129.3,473.2);a.bezierCurveTo(131,478.6,132.9,484.4,133.4,486.1);a.bezierCurveTo(135.2,491.4,135.4,494.9,134,496.4);a.bezierCurveTo(132.8,497.7,131.7,497.7,68.6,\n497.7);a.bezierCurveTo(24.2,497.7,4,497.5,3.2,497);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(162.1,497);a.bezierCurveTo(159.5,496.3,157.7,494.6,156.2,491.6);a.bezierCurveTo(155.5,490.3,148.7,469.4,141.1,445.2);a.bezierCurveTo(126.1,397.5,125.6,395.4,128.1,389.8);a.bezierCurveTo(129.5,386.7,164.1,339,168,334.9);a.bezierCurveTo(170.3,332.5,172.2,332.1,175.1,333.7);a.bezierCurveTo(176.1,334.2,189.3,347,204.3,362.1);a.bezierCurveTo(229.4,387.4,231.8,390,233.5,394);a.bezierCurveTo(235.2,\n397.8,235.4,399.2,235.4,404.3);a.bezierCurveTo(235.3,415,230.5,489.9,229.8,492.5);a.bezierCurveTo(228.4,497.5,229.2,497.4,194.7,497.5);a.bezierCurveTo(177.8,497.6,163.1,497.4,162.1,497);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(258.7,497);a.bezierCurveTo(255.8,496.1,252.6,492.3,252,489.1);a.bezierCurveTo(251.4,484.8,256.8,405.2,258.1,401.1);a.bezierCurveTo(260.4,393.4,262.7,391.1,300.4,359.2);a.bezierCurveTo(319.9,342.6,337.7,327.9,339.9,326.5);a.bezierCurveTo(347.4,\n321.6,350.4,321,372,320.5);a.bezierCurveTo(393.4,320,400.5,320.4,407.5,322.5);a.bezierCurveTo(413.9,324.4,487.4,359.5,490.6,362.1);a.bezierCurveTo(492,363.3,493.9,365.8,495,367.7);a.lineTo(496.8,371.2);a.lineTo(497,419.3);a.bezierCurveTo(497.1,445.7,497,468,496.8,468.8);a.bezierCurveTo(496.2,471.6,489.6,480.8,485,485.3);a.bezierCurveTo(478.6,491.7,474.9,494.1,468.2,496);a.lineTo(462.3,497.7);a.lineTo(361.6,497.7);a.bezierCurveTo(303.1,497.6,259.9,497.3,258.7,497);a.closePath();a.fillStyle=\"rgba(200,200,200,1)\";\na.fill();a.beginPath();a.moveTo(4.4,380.8);a.bezierCurveTo(2.9,380.2,1.7,379.8,1.6,379.8);a.bezierCurveTo(1.5,379.8,1.2,378.8,0.7,377.6);a.bezierCurveTo(0.2,376.1,0,361.6,0,331.2);a.bezierCurveTo(0,281.2,-0.2,283.1,4.9,280.9);a.bezierCurveTo(7.1,279.9,19.3,278.2,54.8,274.1);a.bezierCurveTo(80.6,271.1,102.9,268.6,104.4,268.6);a.bezierCurveTo(105.8,268.6,109.1,269.4,111.7,270.4);a.bezierCurveTo(116,272.1,117.2,273.2,133.4,289.3);a.bezierCurveTo(150.9,306.8,153.4,310,153.4,314.5);a.bezierCurveTo(153.4,\n317.6,151.1,321.3,136.4,341.2);a.bezierCurveTo(109.4,377.8,111.6,375.3,105.4,378.1);a.lineTo(101.3,380);a.lineTo(75.7,380.5);a.bezierCurveTo(6.8,381.8,7.3,381.8,4.4,380.8);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(243.5,372.4);a.bezierCurveTo(240.2,370.8,136.6,266.7,134.2,262.6);a.bezierCurveTo(132.1,259,131.7,254.9,133.2,251.3);a.bezierCurveTo(134.5,248.2,166.3,206,169.3,203.4);a.bezierCurveTo(172.6,200.5,178.5,198.4,183.2,198.4);a.bezierCurveTo(187.1,198.4,275.2,\n204.1,281.6,204.8);a.bezierCurveTo(289.7,205.7,294.6,208.7,297.6,214.6);a.bezierCurveTo(300.5,220.3,327.4,297.4,327.8,301.1);a.bezierCurveTo(328.3,305.7,326.7,310.4,323.4,314);a.bezierCurveTo(322,315.6,307.8,327.9,291.9,341.3);a.bezierCurveTo(256.2,371.4,256.6,371.2,253.9,372.5);a.bezierCurveTo(251.1,373.9,246.5,373.9,243.5,372.4);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(489.3,339.1);a.bezierCurveTo(488.6,338.9,473.7,331.9,456.3,323.6);a.bezierCurveTo(435.9,313.9,\n423.8,307.8,422.4,306.4);a.bezierCurveTo(419.5,303.7,418,300.2,418,296.1);a.bezierCurveTo(418,292.5,438,185,439.3,181.6);a.bezierCurveTo(441.2,176.6,445.5,173.1,450.8,172.1);a.bezierCurveTo(456,171.2,487.1,169.2,489.6,169.7);a.bezierCurveTo(493.1,170.3,495.5,171.9,497,174.7);a.bezierCurveTo(498.1,176.7,498.2,181.7,498.4,253.2);a.bezierCurveTo(498.5,295.3,498.4,330.9,498.2,332.5);a.bezierCurveTo(497.5,337.4,493.7,340.2,489.3,339.1);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();\na.moveTo(353.2,300.7);a.bezierCurveTo(350.4,299.8,347.9,297.9,346.5,295.6);a.bezierCurveTo(345.8,294.5,338.2,273.7,329.6,249.5);a.bezierCurveTo(314.6,207.1,314.1,205.3,314.1,200.4);a.bezierCurveTo(314.1,196.7,314.4,194.6,315.3,193);a.bezierCurveTo(316,191.7,322.5,181.6,329.8,170.6);a.bezierCurveTo(346.8,144.8,345.4,145.8,365.8,144.4);a.bezierCurveTo(380.9,143.4,385.7,143.7,390.6,146.3);a.bezierCurveTo(397.3,149.8,417.4,164.4,419.2,167);a.bezierCurveTo(422.4,171.8,422.4,171.8,410.6,234.4);a.bezierCurveTo(402.3,\n278.6,399.3,293.2,398.1,295.3);a.bezierCurveTo(395.4,300.1,393.7,300.5,373,300.9);a.bezierCurveTo(363.1,301.1,354.2,301,353.2,300.7);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(6.2,259.9);a.bezierCurveTo(4.9,259.2,3.2,257.8,2.4,256.8);a.bezierCurveTo(1,254.9,1,254.8,0.8,148.7);a.bezierCurveTo(0.7,74,0.9,40.8,1.4,36.7);a.bezierCurveTo(2.3,29.6,4.7,24.4,9.8,18.3);a.bezierCurveTo(14.1,13.1,20.9,7.3,25,5.3);a.bezierCurveTo(26.5,4.6,31,3.3,34.9,2.6);a.bezierCurveTo(41.3,\n1.3,44.2,1.2,68.5,1.4);a.lineTo(95.1,1.6);a.lineTo(99,3.5);a.bezierCurveTo(101.2,4.6,103.9,6.6,105.2,8.1);a.bezierCurveTo(107.7,11,153.1,88.2,155.8,94);a.bezierCurveTo(159.1,101.4,159.6,104.7,159.5,121.6);a.bezierCurveTo(159.5,147.8,158.4,177.2,157.3,181);a.bezierCurveTo(156.8,182.8,155.6,186.1,154.6,188.1);a.bezierCurveTo(152.6,192.2,119.5,237.2,115.1,241.8);a.bezierCurveTo(112.1,244.9,106.3,248.3,102,249.4);a.bezierCurveTo(99.2,250.1,13,261.1,10.1,261.1);a.bezierCurveTo(9.2,261.1,7.5,260.6,6.2,\n259.9);a.closePath();a.fillStyle=\"rgba(200,200,200,1)\";a.fill();a.beginPath();a.moveTo(234.1,183.4);a.bezierCurveTo(180.2,179.7,182.3,180,179.5,174.5);a.lineTo(178,171.4);a.lineTo(178.7,142.4);a.bezierCurveTo(179.4,114.8,179.5,113.3,180.9,110.4);a.bezierCurveTo(183.5,105,182.7,105.2,237.9,95.3);a.bezierCurveTo(285.1,86.7,287.9,86.3,291,87.1);a.bezierCurveTo(292.8,87.6,295.3,88.8,296.7,89.9);a.bezierCurveTo(299.1,91.8,321.9,124.4,325,130.3);a.bezierCurveTo(326.9,134,327.2,139.1,325.7,142.6);a.bezierCurveTo(324.5,\n145.5,302.5,179.1,300.2,181.5);a.bezierCurveTo(297,184.9,293.5,186.3,287.4,186.5);a.bezierCurveTo(284.4,186.6,260.4,185.2,234.1,183.4);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(435.8,153.4);a.bezierCurveTo(434.8,153.1,433,152.3,431.7,151.6);a.bezierCurveTo(428.4,150,410.1,137.1,407,134.4);a.bezierCurveTo(404.1,131.8,402.7,128.3,403.2,125.1);a.bezierCurveTo(403.6,122.9,420.3,81.3,423,75.9);a.bezierCurveTo(424.7,72.6,426.6,70.4,429.3,68.9);a.bezierCurveTo(431.1,67.9,\n435,67.7,462.2,67.6);a.lineTo(493.1,67.3);a.lineTo(495.4,69.6);a.bezierCurveTo(497,71.3,497.8,72.8,498.1,75);a.bezierCurveTo(498.4,76.6,498.5,92.9,498.4,111.1);a.bezierCurveTo(498.2,141.2,498.1,144.3,497,146.3);a.bezierCurveTo(494.8,150.3,493.3,150.6,470.3,152.4);a.bezierCurveTo(448.6,154,438.8,154.3,435.8,153.4);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(346.6,125.3);a.bezierCurveTo(345,124.5,342.6,122.6,341.4,121);a.bezierCurveTo(337.1,115.7,313,79.8,311.6,76.7);\na.bezierCurveTo(309.4,71.7,309.3,68,311.2,58.2);a.bezierCurveTo(319.2,16.9,321.3,7.1,322.4,5.2);a.bezierCurveTo(323.1,4,324.7,2.4,326,1.6);a.bezierCurveTo(328.3,0.3,329.4,0.3,353.9,0.3);a.bezierCurveTo(379.2,0.3,379.5,0.3,382.4,1.8);a.bezierCurveTo(384,2.7,386,4.5,386.9,5.9);a.bezierCurveTo(388.6,8.6,405.1,46.3,407.2,52.2);a.bezierCurveTo(408.7,56.3,408.8,60.7,407.7,64.1);a.bezierCurveTo(407.3,65.4,402.2,78.2,396.3,92.7);a.bezierCurveTo(382.6,126.3,384.1,124.6,366.6,126);a.bezierCurveTo(353.4,127.1,\n350,127,346.6,125.3);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(179.2,85.6);a.bezierCurveTo(175.7,84.6,171.9,82,170,79.2);a.bezierCurveTo(167.2,75.2,130.6,12.4,129.3,9.3);a.bezierCurveTo(128.2,6.7,128.1,5.9,128.8,4.2);a.bezierCurveTo(130.5,0,125.2,0.3,211.7,0);a.bezierCurveTo(255.3,-0.1,292.2,0,293.9,0.3);a.bezierCurveTo(297.7,0.8,301.1,4,301.8,7.6);a.bezierCurveTo(302.3,10.5,293.9,55.2,291.9,59.6);a.bezierCurveTo(290.4,63,286.1,66.9,282.3,68.3);a.bezierCurveTo(279.6,\n69.3,193.5,85.1,185.5,86.1);a.bezierCurveTo(183.8,86.3,181,86.1,179.2,85.6);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(431.9,47.7);a.bezierCurveTo(428.7,46.9,426.4,45.2,424.6,42.3);a.bezierCurveTo(421.8,37.8,409.2,7.7,409.2,5.5);a.bezierCurveTo(409.2,1.2,408,1.3,451.6,1.3);a.bezierCurveTo(495,1.3,494,1.2,496.1,5.4);a.bezierCurveTo(497,7.2,497.2,10.2,497,25.5);a.lineTo(496.8,43.5);a.lineTo(494.9,45.4);a.lineTo(493,47.3);a.lineTo(474.8,47.7);a.bezierCurveTo(450.1,48.3,\n434.5,48.3,431.9,47.7);a.closePath();a.fillStyle=\"rgba(200,200,200,1)\";a.fill();a.beginPath();a.moveTo(1.3,511.9);a.lineTo(1.3,514.3);a.lineTo(3.7,514.3);a.bezierCurveTo(7.2,514.4,9.5,515.5,10.6,517.6);a.bezierCurveTo(11.7,519.8,12.1,522.7,12,526.3);a.lineTo(12,591);a.lineTo(22.8,591);a.lineTo(22.8,553.2);a.lineTo(49.9,553.2);a.lineTo(49.9,548.5);a.lineTo(22.8,548.5);a.lineTo(22.8,516.7);a.lineTo(41.9,516.7);a.bezierCurveTo(46.7,516.7,50.4,517.8,52.9,520);a.bezierCurveTo(55.5,522.2,56.8,525.7,56.8,\n530.5);a.lineTo(59.2,530.5);a.lineTo(59.2,521.5);a.bezierCurveTo(59.3,519,58.7,516.8,57.3,514.9);a.bezierCurveTo(55.9,513,53.1,512,49,511.9);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(107.6,562.8);a.bezierCurveTo(107.6,569.9,106.2,575.7,103.5,580.3);a.bezierCurveTo(100.8,584.8,97.2,587.2,92.7,587.4);a.bezierCurveTo(88.1,587.2,84.5,584.8,81.8,580.3);a.bezierCurveTo(79.1,575.7,77.8,569.9,77.7,562.8);a.bezierCurveTo(77.8,555.8,79.1,550,81.8,545.4);a.bezierCurveTo(84.5,\n540.8,88.1,538.4,92.7,538.3);a.bezierCurveTo(97.2,538.4,100.8,540.8,103.5,545.4);a.bezierCurveTo(106.2,550,107.6,555.8,107.6,562.8);a.moveTo(66.3,562.8);a.bezierCurveTo(66.4,571.1,68.7,578,73.2,583.5);a.bezierCurveTo(77.8,589.1,84.2,591.9,92.7,592.1);a.bezierCurveTo(101.1,591.9,107.6,589.1,112.1,583.5);a.bezierCurveTo(116.7,578,118.9,571.1,119,562.8);a.bezierCurveTo(118.9,554.5,116.7,547.6,112.1,542.1);a.bezierCurveTo(107.6,536.6,101.1,533.7,92.7,533.5);a.bezierCurveTo(84.2,533.7,77.8,536.6,73.2,\n542.1);a.bezierCurveTo(68.7,547.6,66.4,554.5,66.3,562.8);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(161.5,579.6);a.bezierCurveTo(160.3,581.4,158.9,583.1,157.2,584.5);a.bezierCurveTo(155.4,585.9,153.1,586.7,150.1,586.8);a.bezierCurveTo(147,586.8,144.4,585.9,142.2,584);a.bezierCurveTo(140,582.1,138.9,579.3,138.8,575.4);a.bezierCurveTo(138.8,571.7,140.5,568.9,143.8,566.7);a.bezierCurveTo(147.2,564.6,151.9,563.5,157.9,563.4);a.lineTo(161.5,563.4);a.moveTo(172.3,591);\na.lineTo(172.3,558.6);a.bezierCurveTo(172.1,548.2,169.9,541.3,165.8,538);a.bezierCurveTo(161.7,534.7,156.9,533.2,151.3,533.5);a.bezierCurveTo(147.6,533.5,144.1,533.8,140.8,534.5);a.bezierCurveTo(137.4,535.1,135,536.2,133.4,537.7);a.bezierCurveTo(131.9,539.2,131.1,540.8,130.7,542.6);a.bezierCurveTo(130.4,544.4,130.3,546.4,130.4,548.5);a.lineTo(135.8,548.5);a.bezierCurveTo(136.7,544.6,138.3,542,140.5,540.5);a.bezierCurveTo(142.8,538.9,145.6,538.2,148.9,538.3);a.bezierCurveTo(152.6,538.1,155.6,539.4,\n157.9,542.2);a.bezierCurveTo(160.2,545,161.4,550.5,161.5,558.6);a.lineTo(157.9,558.6);a.bezierCurveTo(149.6,558.5,142.5,559.7,136.6,562.1);a.bezierCurveTo(130.7,564.5,127.6,568.9,127.4,575.4);a.bezierCurveTo(127.7,581.8,129.8,586.3,133.6,588.7);a.bezierCurveTo(137.4,591.1,141.1,592.3,144.7,592.1);a.bezierCurveTo(149.2,592.1,152.8,591.3,155.6,590);a.bezierCurveTo(158.3,588.6,160.3,587.1,161.5,585.6);a.lineTo(162.1,585.6);a.lineTo(166.3,591);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();\na.moveTo(200.3,539.5);a.bezierCurveTo(199.8,538,198.7,536.8,197,536);a.bezierCurveTo(195.4,535.1,193.1,534.7,190.2,534.7);a.lineTo(179.4,534.7);a.lineTo(179.4,537.1);a.lineTo(181.8,537.1);a.bezierCurveTo(185.3,537.1,187.6,538.2,188.7,540.4);a.bezierCurveTo(189.8,542.5,190.3,545.4,190.2,549.1);a.lineTo(190.2,591);a.lineTo(200.9,591);a.lineTo(200.9,545.2);a.bezierCurveTo(202.4,543.5,204.2,542,206.2,540.8);a.bezierCurveTo(208.3,539.6,210.5,538.9,212.9,538.9);a.bezierCurveTo(215.9,538.8,218.3,540,219.9,\n542.5);a.bezierCurveTo(221.6,544.9,222.4,549.1,222.5,555);a.lineTo(222.5,591);a.lineTo(233.2,591);a.lineTo(233.2,555);a.bezierCurveTo(233.3,553.8,233.2,552.3,233.2,550.6);a.bezierCurveTo(233.1,549,232.9,547.6,232.6,546.7);a.bezierCurveTo(233.9,544.8,235.7,543,238,541.4);a.bezierCurveTo(240.4,539.8,242.7,539,245.2,538.9);a.bezierCurveTo(248.2,538.8,250.6,540,252.3,542.5);a.bezierCurveTo(253.9,544.9,254.8,549.1,254.8,555);a.lineTo(254.8,591);a.lineTo(265.6,591);a.lineTo(265.6,555);a.bezierCurveTo(265.4,\n546.5,263.8,540.8,260.6,537.8);a.bezierCurveTo(257.4,534.7,253.4,533.3,248.8,533.5);a.bezierCurveTo(245.4,533.5,242.2,534.2,238.9,535.7);a.bezierCurveTo(235.7,537.1,233,539.2,230.9,541.9);a.bezierCurveTo(229.3,538.6,227.3,536.4,224.8,535.2);a.bezierCurveTo(222.3,534,219.5,533.4,216.5,533.5);a.bezierCurveTo(212.9,533.6,209.8,534.2,207.1,535.4);a.bezierCurveTo(204.5,536.5,202.4,537.9,200.9,539.5);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(284,511.9);a.bezierCurveTo(279.9,\n512,277.2,513,275.8,514.9);a.bezierCurveTo(274.4,516.8,273.7,519,273.8,521.5);a.lineTo(273.8,530.5);a.lineTo(276.2,530.5);a.bezierCurveTo(276.3,525.7,277.6,522.2,280.1,520);a.bezierCurveTo(282.7,517.8,286.4,516.7,291.2,516.7);a.lineTo(302,516.7);a.lineTo(302,590.9);a.lineTo(312.7,590.9);a.lineTo(312.7,516.7);a.lineTo(339.7,516.7);a.lineTo(339.7,511.9);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(349.4,590.9);a.lineTo(360.2,590.9);a.lineTo(360.2,546.7);a.bezierCurveTo(361.4,\n544.8,363,543.4,364.9,542.3);a.bezierCurveTo(366.9,541.2,369.1,540.7,371.5,540.7);a.bezierCurveTo(373.7,540.7,375.5,541,377.2,541.6);a.bezierCurveTo(378.9,542.2,380.2,543.1,381.1,544.3);a.lineTo(385.9,540.7);a.bezierCurveTo(385.3,539.5,384.7,538.4,384,537.5);a.bezierCurveTo(383.4,536.6,382.6,535.9,381.7,535.3);a.bezierCurveTo(380.8,534.7,379.7,534.2,378.3,533.9);a.bezierCurveTo(377,533.6,375.8,533.5,374.5,533.5);a.bezierCurveTo(370.9,533.6,367.9,534.3,365.5,535.7);a.bezierCurveTo(363.2,537,361.4,\n538.5,360.2,540.1);a.lineTo(359.6,540.1);a.bezierCurveTo(359,538.3,357.9,536.9,356.3,536);a.bezierCurveTo(354.6,535.1,352.4,534.7,349.4,534.7);a.lineTo(339.8,534.7);a.lineTo(339.8,537.1);a.lineTo(341,537.1);a.bezierCurveTo(344.5,537.1,346.8,538.2,347.9,540.4);a.bezierCurveTo(349,542.5,349.5,545.4,349.4,549.1);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(440.3,559.8);a.bezierCurveTo(440.3,551.4,438.3,544.9,434.4,540.4);a.bezierCurveTo(430.4,535.8,424.4,533.5,416.3,533.5);\na.bezierCurveTo(408.8,533.7,403,536.6,399,542.1);a.bezierCurveTo(395,547.6,393,554.5,393,562.8);a.bezierCurveTo(393,571.1,395.1,578,399.3,583.5);a.bezierCurveTo(403.5,589.1,409.7,591.9,418.1,592.1);a.bezierCurveTo(422.6,592.2,426.7,591.2,430.2,589.2);a.bezierCurveTo(433.8,587.2,437,584,439.7,579.6);a.lineTo(437.3,577.8);a.bezierCurveTo(435.2,580.8,432.9,583.1,430.2,584.8);a.bezierCurveTo(427.6,586.5,424.4,587.3,420.5,587.4);a.bezierCurveTo(415.4,587.2,411.4,585.1,408.6,580.9);a.bezierCurveTo(405.8,\n576.8,404.4,571.3,404.4,564.6);a.lineTo(440,564.6);a.moveTo(404.4,559.8);a.bezierCurveTo(404.4,553.7,405.6,548.7,407.9,544.9);a.bezierCurveTo(410.3,541,413.3,539,416.9,538.9);a.bezierCurveTo(421.1,538.9,424.3,540.8,426.4,544.4);a.bezierCurveTo(428.4,548.1,429.5,553.2,429.5,559.8);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill();a.beginPath();a.moveTo(497.1,559.8);a.bezierCurveTo(497.1,551.4,495.1,544.9,491.2,540.4);a.bezierCurveTo(487.2,535.8,481.2,533.5,473.1,533.5);a.bezierCurveTo(465.6,533.7,\n459.9,536.6,455.9,542.1);a.bezierCurveTo(451.9,547.6,449.8,554.5,449.8,562.8);a.bezierCurveTo(449.8,571.1,451.9,578,456.1,583.5);a.bezierCurveTo(460.3,589.1,466.6,591.9,474.9,592.1);a.bezierCurveTo(479.4,592.2,483.5,591.2,487.1,589.2);a.bezierCurveTo(490.6,587.2,493.8,584,496.5,579.6);a.lineTo(494.1,577.8);a.bezierCurveTo(492,580.8,489.7,583.1,487.1,584.8);a.bezierCurveTo(484.4,586.5,481.2,587.3,477.3,587.4);a.bezierCurveTo(472.2,587.2,468.2,585.1,465.4,580.9);a.bezierCurveTo(462.6,576.8,461.2,571.3,\n461.2,564.6);a.lineTo(496.8,564.6);a.moveTo(461.2,559.8);a.bezierCurveTo(461.2,553.7,462.4,548.7,464.8,544.9);a.bezierCurveTo(467.1,541,470.1,539,473.7,538.9);a.bezierCurveTo(477.9,538.9,481.1,540.8,483.2,544.4);a.bezierCurveTo(485.3,548.1,486.3,553.2,486.3,559.8);a.closePath();a.fillStyle=\"rgba(220,20,3,1)\";a.fill()}};Sa.yc={width:498,height:592};function Ta(a,m){function k(a,b){var c=a.L.Ob,d=c/15,e=0.5*c/15,c=c/5,f=a.L.x,g=a.L.y;b.fillRect(f-e,g-e,d,d);b.fillRect(f-e-c,g-e,d,d);b.fillRect(f-e+c,g-e,d,d)}function f(a,b,c,d){null===a&&c.clearRect(0,0,H,Q);var e,f=Array(W.length);for(e=W.length-1;0<=e;e--)f[e]=W[e].qa(c,d);for(e=W.length-1;0<=e;e--)f[e]&&W[e].X(c,d);T.Jc([c,B],function(d){var e;if(null!==a){c.save();c.globalCompositeOperation=\"destination-out\";c.fillStyle=c.strokeStyle=\"rgba(255, 255, 255, 1)\";for(e=a.length-1;0<=e;e--){var g=\na[e],h=g.o;h&&(c.save(),c.beginPath(),g.Tb(c),ia.le(c,h),c.fill(),g=t.lb*Math.pow(t.Ra,g.K-1),0<g&&(c.lineWidth=g/2,c.stroke()),c.restore())}c.restore()}d=d.scale;if(0!==b.length){e={};for(h=W.length-1;0<=h;h--)W[h].Ng(e);for(g=Z.length-1;0<=g;g--)if(h=Z[g],e[h.id])for(var k=h.be,h=0;h<b.length;h++){var l=b[h];!l.parent||l.parent.Ca&&l.parent.O?k(l,d):l.ca.clear()}}for(e=W.length-1;0<=e;e--)g=W[e],f[e]&&g.ee(b,c,d)});for(e=W.length-1;0<=e;e--)f[e]&&W[e].Da(c);t.rd&&(c.canvas.style.opacity=0.99,setTimeout(function(){c.canvas.style.opacity=\n1},1))}function c(a){s===u?a<0.9*q&&(s=w,x=A,e()):a>=q&&(s=u,x=C,e())}function d(){function a(b,c,d){b.Cb=Math.floor(1E3*b.scale)-d*c;0<b.opacity&&!b.open&&c++;var e=b.e;if(e)for(var f=e.length-1;0<=f;f--)b.W&&a(e[f],c,d)}var b=null,d=null,e=null;T.Jc([],function(f){c(f.scale);var h=!1;$.F(z,function(a){a.W&&(h=a.Nd()||h,a.nc(),a.Sa=P.d(a)||a.Sa)});h&&(z.I=!0);var k=\"onSurfaceDirty\"===t.oh;$.xd(z,function(a){a.parent&&a.parent.aa&&(a.ca.clear(),a.Sa=!0,k||(a.Fc=!0,a.ac.clear()));k&&(a.Fc=!0,a.ac.clear())});\nvar l=f.scale*f.scale;$.xd(z,function(a){if(a.O){for(var b=a.e,c=0;c<b.length;c++)if(5<b[c].L.ja*l){a.Y=!0;return}a.Y=!1}});n(f);e=[];$.Lc(z,function(a){if(a.parent.Y&&a.$&&a.W){e.push(a);for(var b=a.parent;b!==z&&(b.open||0===b.opacity);)b=b.parent;b!==z&&0.02>Math.abs(b.scale-a.scale)&&(a.scale=Math.min(a.scale,b.scale))}});a(z,0,\"flattened\"===t.xb?-1:1);e.sort(function(a,b){return a.Cb-b.Cb});if(g())b=e,d=null;else{var m={},p={},q=\"none\"!=t.Cd&&t.lb<t.mb/2,r=t.lb<t.Rc/2+t.Bd*t.Xe.a;$.F(z,function(a){if(a.W&&\n!a.description&&(a.aa||a.I||a.Yc&&a.parent.Y&&a.Sa)){var b,c,d=[a],e=a.C||a.parent.e;if(q)for(b=0;b<e.length;b++)(c=e[b])&&d.push(c);else if(r)if(!a.selected&&a.$a){c=!0;for(b=0;b<e.length;b++)e[b]?d.push(e[b]):c=!1;!c&&1<a.K&&d.push(a.parent)}else for(b=0;b<e.length;b++)(c=e[b])&&c.selected&&d.push(c);var f;for(b=a.parent;b!=z;)b.selected&&(f=b),b=b.parent;f&&d.push(f);for(b=0;b<d.length;b++){f=d[b];for(a=f.parent;a&&a!==z;)0<a.opacity&&(f=a),a=a.parent;p[f.id]=!0;$.Fa(f,function(a){m[a.id]=!0})}}});\nb=e.filter(function(a){return m[a.id]});d=b.filter(function(a){return p[a.id]})}});(function(){var a=!1;t.$f&&$.F(z,function(b){if(b.W&&0!==b.sa.a&&1!==b.sa.a)return a=!0,!1});a?($.Kc(z,function(a){if(a.W&&(a.opacity!==a.bd||a.Ma)){var b=a.e;if(b){for(var c=0,d=b.length-1;0<=d;d--)c=Math.max(c,b[d].Xc);a.Xc=c+a.opacity*a.sa.a}else a.Xc=a.opacity*a.sa.a}}),$.F(z,function(a){if(a.W&&(a.opacity!==a.bd||a.Ma)){for(var b=a.Xc,c=a;(c=c.parent)&&c!==z;)b+=c.opacity*c.sa.a*t.Yf;a.sd=0<b?1-Math.pow(1-a.sa.a,\n1/b):0;a.bd=a.opacity}})):$.F(z,function(a){a.W&&(a.sd=1,a.bd=-1)})})();return{vg:b,ug:d,$:e}}function g(){var a=z.aa||z.I||\"none\"==t.ef;if(!a&&!z.empty()){var b=z.e[0].scale;$.F(z,function(c){if(c.W&&c.$&&c.scale!==b)return a=!0,!1})}!a&&0<t.Re&&1!=t.Wa&&$.F(z,function(b){if(b.W&&0<b.ka)return a=!0,!1});\"accurate\"==t.ef&&(a=(a=a||0===t.lb)||\"none\"!=t.Cd&&t.lb<t.mb/2,!a&&t.lb<t.Rc/2+t.Bd*t.Xe.a&&$.F(z,function(b){if(b.W&&(b.selected&&!b.$a||!b.selected&&b.$a))return a=!0,!1}));return a}function l(){if(t.n!==\nt.yb)return!0;var a=\"polygonPlainFill polygonPlainStroke polygonGradientFill polygonGradientStroke labelPlainFill contentDecoration\".split(\" \");$.F(z,function(b){if(b.W&&b.U)return a.push(\"polygonExposureShadow\"),!1});for(var b=a.length-1;0<=b;b--){var c=a[b];if(!!E[c]!==!!J[c])return!0}return!1}function e(){function a(c,d,e,f,g){function h(a,b,c,d,e){a[d]&&(b-=c*p[d],a[d]=!1,e&&(b+=c*p[e],a[e]=!0));return b}c=D.extend({},c);switch(e){case \"never\":c.labelPlainFill=!1;break;case \"always\":case \"auto\":c.labelPlainFill=\n!0}if(t.Pc)switch(f){case \"never\":c.contentDecoration=!1;break;case \"always\":case \"auto\":c.contentDecoration=!0}else c.contentDecoration=!1;var k=0;D.Ga(c,function(a,b){a&&(k+=d*p[\"contentDecoration\"===b?\"labelPlainFill\":b])});c.polygonExposureShadow=b;k+=2*p.polygonExposureShadow;if(k<=g||(k=h(c,k,2,\"polygonExposureShadow\"))<=g||(k=h(c,k,d,\"polygonGradientFill\",\"polygonPlainFill\"))<=g||(k=h(c,k,d,\"polygonGradientStroke\"))<=g||(k=h(c,k,d,\"polygonPlainStroke\"))<=g||\"auto\"===f&&(k=h(c,k,d,\"contentDecoration\"))<=\ng)return c;\"auto\"===e&&(k=h(c,k,d,\"labelPlainFill\"));return c}var b=s===w,c=0,d=0;$.He(z,function(a){var b=1;$.F(a,function(){b++});c+=b;d=Math.max(d,b)});var e={};switch(t.xh){case \"plain\":e.polygonPlainFill=!0;break;case \"gradient\":e.polygonPlainFill=!b,e.polygonGradientFill=b}switch(t.Cd){case \"plain\":e.polygonPlainStroke=!0;break;case \"gradient\":e.polygonPlainStroke=!b,e.polygonGradientStroke=b}E=a(e,c,t.Hj,t.Fj,t.Gj);J=a(e,2*d,\"always\",\"always\",t.hh);I=a(e,c,\"always\",\"always\",t.gh)}function b(a){return function(b,\nc){return b===s?!0===E[a]:!0===(c?J:I)[a]}}function h(a,b){return function(c,d){return a(c,d)&&b(c,d)}}function n(a){z.$=!0;$.xd(z,function(b){if(b.W&&b.Y&&b.Ca&&b.O&&(z.I||b.aa||b.me)){b.me=!1;var c=b.e,d={x:0,y:0,f:0,i:0},e=!!b.u;if(1<H/a.f){var f;for(f=c.length-1;0<=f;f--)c[f].$=!1;if(b.$&&e)for(f=c.length-1;0<=f;f--)if(b=c[f],1!==b.scale&&(b.Vb(a,d),d.f=a.f/b.scale,d.i=a.i/b.scale),!1===b.$&&b.o){var e=b.o,g=e.length;if(M.Ua(b.o,1===b.scale?a:d))b.$=!0;else for(var h=0;h<g;h++)if(M.Lg(e[h],e[(h+\n1)%g],1===b.scale?a:d)){b.$=!0;b.C&&(b=b.C[h])&&(c[b.index].$=!0);break}}}else for(f=0;f<c.length;f++)c[f].$=e}})}var q=v.nf()?50:1E4,p,r,s,w,u,y,x,A,C,K,B,H,Q,O,P=new Va(a),F=new Wa(a),T,N,U,t=a.options,z,L,E,I,J;a.c.j(\"stage:initialized\",function(a,b,c,d){O=a;H=c;Q=d;r=O.oc(\"wireframe\",t.yb,!1);w=r.getContext(\"2d\");u=new ha(w);y=O.oc(\"hifi\",t.n,!1);A=y.getContext(\"2d\");C=new ha(A);s=w;x=A;w.n=t.yb;u.n=t.yb;A.n=t.n;C.n=t.n;K=O.oc(\"tmp\",Math.max(t.n,t.yb),!0);B=K.getContext(\"2d\");B.n=1;[w,A,B].forEach(function(a){a.scale(a.n,\na.n)})});a.c.j(\"stage:resized\",function(a,b,c,d){H=c;Q=d;[w,A,B].forEach(function(a){a.scale(a.n,a.n)})});a.c.j(\"model:loaded\",function(b){function c(a){var b=0;if(!a.empty()){for(var d=a.e,e=d.length-1;0<=e;e--)b=Math.max(b,c(d[e]));b+=1}return a.mg=b}z=b;L=!0;c(z);e();a.c.p(\"render:renderers:resolved\",E,J,I)});var R=\"groupFillType groupStrokeType wireframeDrawMaxDuration wireframeLabelDrawing wireframeContentDecorationDrawing finalCompleteDrawMaxDuration finalIncrementalDrawMaxDuration groupContentDecorator\".split(\" \"),\nY=[\"groupLabelLightColor\",\"groupLabelDarkColor\",\"groupLabelColorThreshold\",\"groupUnexposureLabelColorThreshold\"];a.c.j(\"options:changed\",function(a){function b(a,c,d,e){O.hj(a,d);c.n=d;e&&c.scale(d,d)}a.dataObject||(D.nb(a,R)&&e(),D.nb(a,Y)&&$.F(z,function(a){a.zd=-1}));var c=D.N(a,\"pixelRatio\");a=D.N(a,\"wireframePixelRatio\");if(c||a)c&&b(y,x,t.n,!0),a&&b(r,s,t.yb,!0),b(K,B,Math.max(t.n,t.yb),!1)});a.c.j(\"zoom:initialized\",function(a){T=a});a.c.j(\"timeline:initialized\",function(a){N=a});a.c.j(\"api:initialized\",\nfunction(a){U=a});var Z=[{id:\"offsetPolygon\",be:function(a){if((a.selected||0<a.opacity&&!1===a.open||!a.Y)&&a.ca.Na()){var b=a.ca;b.clear();if(a.ba){var c=a.ba,d=t.jh;0<d?(d=Math.min(1,d*Math.pow(1-t.kh*d,a.mg)),ia.tj(b,c,a.parent.L.Ob/32,d)):ia.le(b,c)}a.Vd=!0}}},{id:\"label\",be:function(a){a.Sa&&a.Yc&&P.k(a)}},{id:\"custom\",be:function(b,c){if(b.ba&&(0<b.opacity&&(!1===b.open||!0===b.selected)||!b.Y)&&b.Fc&&a.options.Pc&&!b.na){var d={};U.pd(d,b);U.qd(d,b);U.od(d,b,!0);d.context=b.ac;d.polygonContext=\nb.ca;d.labelContext=b.Uc;d.shapeDirty=b.Vd;d.viewportScale=c;var e={groupLabelDrawn:!0,groupPolygonDrawn:!0};a.options.nh(a.Ud,d,e);b.of=e.groupLabelDrawn;b.Wd=e.groupPolygonDrawn;b.Vd=!1;b.Fc=!1}}}].reverse(),W=[new function(a){var b=Array(a.length);this.ee=function(c,d,e){if(0!==c.length){var f,g,h=[],k=c[0].Cb;for(f=0;f<c.length;f++)g=c[f],g.Cb!==k&&(h.push(f),k=g.Cb);h.push(f);for(var l=k=0;l<h.length;l++){for(var m=h[l],p=a.length-1;0<=p;p--)if(b[p]){var n=a[p];d.save();for(f=k;f<m;f++)g=c[f],\nd.save(),g.Tb(d),n.vb.call(n,g,d,e),d.restore();n.hb.call(n,d,e);d.restore()}k=m}}};this.qa=function(c,d){for(var e=!1,f=a.length-1;0<=f;f--)b[f]=a[f].qa(c,d),e|=b[f];return e};this.X=function(c,d){for(var e=a.length-1;0<=e;e--)if(b[e]){var f=a[e];f.X.call(f,c,d)}};this.Da=function(c){for(var d=a.length-1;0<=d;d--)if(b[d]){var e=a[d];e.Da.call(e,c)}};this.Ng=function(c){for(var d=a.length-1;0<=d;d--){var e=a[d];if(b[d])for(var f=e.Za.length-1;0<=f;f--)c[e.Za[f]]=!0}}}([{Za:[\"offsetPolygon\"],qa:b(\"polygonExposureShadow\"),\nX:function(a){B.save();B.scale(a.n,a.n)},Da:function(){B.restore()},d:function(){},hb:function(a){this.lg&&(this.lg=!1,a.save(),a.setTransform(1,0,0,1,0,0),a.drawImage(K,0,0,a.canvas.width,a.canvas.height,0,0,a.canvas.width,a.canvas.height),a.restore(),B.save(),B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,K.width,K.height),B.restore())},vb:function(a,b,c){if(!(a.open&&a.Y||a.ca.Na())){var d=t.Re*a.opacity*a.ka*(\"flattened\"===t.xb?1-a.parent.ka:(1-a.Lb)*a.parent.Lb)*(1.1<=t.Wa?1:(t.Wa-1)/0.1);0<d&&\n(B.save(),B.beginPath(),a.Tb(B),a.ca.Ta(B),B.shadowBlur=c*b.n*d,B.shadowColor=t.ph,B.fillStyle=\"rgba(0, 0, 0, 1)\",B.globalCompositeOperation=\"source-over\",B.globalAlpha=a.opacity,B.fill(),B.shadowBlur=0,B.shadowColor=\"transparent\",B.globalCompositeOperation=\"destination-out\",B.fill(),B.restore(),this.lg=!0)}}},{Za:[\"offsetPolygon\"],qa:function(){return!0},X:function(){function a(b){var d=b.sa,e=b.Eb,f=b.selected,g=c(d.l*b.va+(e?t.Ch:0)+(f?t.Th:0)),h=c(d.s*b.wa+(e?t.Dh:0)+(f?t.Uh:0));b=b.Qe;b.h=(d.h+\n(e?t.Bh:0)+(f?t.Sh:0))%360;b.s=h;b.l=g;return b}function c(a){return 100<a?100:0>a?0:a}var d=[{type:\"fill\",qa:b(\"polygonPlainFill\"),hd:function(b,c){c.fillStyle=S.Ac(a(b))}},{type:\"fill\",qa:b(\"polygonGradientFill\"),hd:function(b,d){var e=b.L.Ob,f=a(b),e=d.createRadialGradient(b.x,b.y,0,b.x,b.y,e*t.th);e.addColorStop(0,S.Z((f.h+t.qh)%360,c(f.s+t.sh),c(f.l+t.rh)));e.addColorStop(1,S.Z((f.h+t.uh)%360,c(f.s+t.wh),c(f.l+t.vh)));b.ca.Ta(d);d.fillStyle=e}},{type:\"stroke\",qa:h(b(\"polygonPlainStroke\"),function(){return 0<\nt.mb}),hd:function(a,b){var d=a.sa,e=a.Eb,f=a.selected;b.strokeStyle=S.Z((d.h+t.af+(e?t.Se:0)+(f?t.Ye:0))%360,c(d.s*a.wa+t.cf+(e?t.Ue:0)+(f?t.$e:0)),c(d.l*a.va+t.bf+(e?t.Te:0)+(f?t.Ze:0)));b.lineWidth=t.mb*Math.pow(t.Ra,a.K-1)}},{type:\"stroke\",qa:h(b(\"polygonGradientStroke\"),function(){return 0<t.mb}),hd:function(a,b){var d=a.L.Ob*t.$h,e=a.sa,f=Math.PI*t.Wh/180,d=b.createLinearGradient(a.x+d*Math.cos(f),a.y+d*Math.sin(f),a.x+d*Math.cos(f+Math.PI),a.y+d*Math.sin(f+Math.PI)),g=a.Eb,h=a.selected,f=(e.h+\nt.af+(g?t.Se:0)+(h?t.Ye:0))%360,k=c(e.s*a.wa+t.cf+(g?t.Ue:0)+(h?t.$e:0)),e=c(e.l*a.va+t.bf+(g?t.Te:0)+(h?t.Ze:0));d.addColorStop(0,S.Z((f+t.Xh)%360,c(k+t.Zh),c(e+t.Yh)));d.addColorStop(1,S.Z((f+t.ai)%360,c(k+t.ci),c(e+t.bi)));b.strokeStyle=d;b.lineWidth=t.mb*Math.pow(t.Ra,a.K-1)}}],e=Array(d.length);return function(a,b){for(var c=d.length-1;0<=c;c--)e[c]=d[c].qa(a,b);this.xj=d;this.Wg=e}}(),Da:function(){},d:function(){},hb:function(){},vb:function(a,b){if(a.Wd&&!((0===a.opacity||a.open)&&a.Y||a.ca.Na()||\n!t.De&&a.description)){var c=this.xj,d=this.Wg;b.beginPath();a.ca.Ta(b);for(var e=!1,f=!1,g=c.length-1;0<=g;g--){var h=c[g];if(d[g])switch(h.hd(a,b),h.type){case \"fill\":e=!0;break;case \"stroke\":f=!0}}c=(a.Y?a.opacity:1)*a.sa.a;d=!a.empty();g=t.$f?a.sd:1;e&&(e=d&&a.Y&&a.O&&a.e[0].W?1-a.e.reduce(function(a,b){return a+b.ua*b.Zd},0)/a.e.length*(1-t.Yf):1,b.globalAlpha=c*e*g,Xa(b));f&&(b.globalAlpha=c*(d?t.yi:1)*g,b.closePath(),Ya(b),b.stroke())}}},{Za:[\"offsetPolygon\"],qa:function(){return 0<t.Rc},X:function(){},\nDa:function(){},d:function(){},hb:function(){},vb:function(a,b,c){if(a.Wd&&a.selected&&!a.ca.Na()){b.globalAlpha=a.Ka;b.beginPath();var d=Math.pow(t.Ra,a.K-1);b.lineWidth=t.Rc*d;b.strokeStyle=t.Vh;var e=t.Bd;0<e&&(b.shadowBlur=e*d*c*b.n,b.shadowColor=t.We);a.ca.Ta(b);b.closePath();b.stroke()}}},{Za:[],qa:function(){return!0},X:function(){},Da:function(){},d:function(){},hb:function(){},vb:function(a,b){function c(d){var e=Sa.yc.width,f=Sa.yc.height,g=M.se(a.ba,a.L,e/f),g=Math.min(Math.min(0.9*g,0.5*\na.q.i)/f,0.5*a.q.f/e);b.save();b.translate(a.x,a.y);b.globalAlpha=a.opacity*a.fa;b.scale(g,g);b.translate(-e/2,-f/2);d(b);b.restore()}a.na&&!a.ca.Na()&&c(function(a){Sa.Fg(a)})}},{Za:[],qa:function(a,b){return function(c,d){return a(c,d)||b(c,d)}}(b(\"labelPlainFill\"),h(b(\"contentDecoration\"),function(){return t.Pc})),X:function(){},Da:function(){},d:function(){},hb:function(){},vb:function(a,b,c){(0<a.opacity&&0<a.fa&&!a.open||!a.Y)&&!a.ca.Na()&&(a.Vc=a.ra&&a.ra.la&&t.n*a.ra.fontSize*a.scale*c>=t.Ph,\n\"auto\"===a.Hd?!t.De&&a.description?a.qb=a.parent.qb:(b=a.Qe,c=b.h+(b.s<<9)+(b.l<<16),a.zd!==c&&(a.qb=S.Bg(b)>(0>a.ka?t.di:t.Eh)?t.Fh:t.Oh,a.zd=c)):a.qb=a.Hd)}},{Za:[\"custom\"],qa:h(b(\"contentDecoration\"),function(){return t.Pc}),X:function(){},Da:function(){},d:function(){},hb:function(){},vb:function(a,b){!(0<a.opacity&&0<a.fa&&!a.open||!a.Y)||a.ac.Na()||a.ca.Na()||(a.Vc||void 0===a.ra?(b.globalAlpha=a.fa*(a.Y?a.opacity:1)*(a.empty()?1:t.Zf),b.fillStyle=a.qb,b.strokeStyle=a.qb,a.ac.Ta(b)):k(a,b))}},\n{Za:[\"label\"],qa:b(\"labelPlainFill\"),X:function(){},Da:function(){},d:function(){},hb:function(){},vb:function(a,b,c){a.of&&a.Yc&&(0<a.opacity&&0<a.fa&&!a.open||!a.Y)&&!a.ca.Na()&&a.ra&&(b.fillStyle=a.qb,b.globalAlpha=a.fa*(a.Y?a.opacity:1)*(a.empty()?1:t.Zf),a.Vc?Za(a,b,c):k(a,b))}}].reverse())];this.H=function(){p=ua.ji(function(){return ja.eh()},\"CarrotSearchFoamTree\",12096E5)($a());F.H()};this.clear=function(){s.clearRect(0,0,H,Q);x.clearRect(0,0,H,Q)};var ea=!1,aa=void 0;this.k=function(a){ea?\naa=a:a()};this.ee=function(){function a(){window.clearTimeout(b);ea=!0;b=setTimeout(function(){ea=!1;if(l()){var a=!g();f(null,c.$,x,a);D.defer(function(){ca.uj();aa&&(aa(),aa=void 0)})}else aa&&(aa(),aa=void 0)},Math.max(t.Ij,3*m.qg.Kd,3*m.qg.Jd))}var b,c;return function(b){ab(F);c=d();var e=null!==c.ug,g=0<O.kc(\"hifi\"),h=g&&(e||!b);b=e||L||!b;L=!1;g&&!h&&ca.vj();f(c.ug,c.vg,h?x:s,b);$.Fa(z,function(a){a.aa=!1;a.I=!1;a.$a=!1});h||a();t.Uf(e)}}();this.d=function(a){a=a||{};ab(F);z.I=!0;var b=d(),\nc=t.n;try{var e=D.B(a.pixelRatio,t.n);t.n=e;var g=O.oc(\"export\",e,!0),h=g.getContext(\"2d\");s===u&&(h=new ha(h));h.scale(e,e);var k=D.N(a,\"backgroundColor\");k&&(h.save(),h.fillStyle=a.backgroundColor,h.fillRect(0,0,H,Q),h.restore());f(k?[]:null,b.vg,h,!0)}finally{t.n=c}return g.toDataURL(D.B(a.format,\"image/png\"),D.B(a.quality,0.8))};var ca=function(){function a(b,d,e,f){function g(a,b,c,d){return N.D.m({opacity:O.kc(a)}).ia({duration:c,G:{opacity:{end:b,R:d}},da:function(){O.kc(a,this.opacity)}}).xa()}\nvar h=D.Fd(O.kc(b),1),k=D.Fd(O.kc(e),0);if(!h||!k){for(var l=c.length-1;0<=l;l--)c[l].stop();c=[];h||c.push(g(b,1,d,X.Rb));k||c.push(g(e,0,f,X.ng));return N.D.m({}).Ya(c).start()}}var b,c=[];return{vj:function(){t.rd?1!==r.style.opacity&&(r.style.visibility=\"visible\",y.style.visibility=\"hidden\",r.style.opacity=1,y.style.opacity=0):b&&b.Gb()||(b=a(\"wireframe\",t.Me,\"hifi\",t.Me))},uj:function(){t.rd?(y.style.visibility=\"visible\",r.style.visibility=\"hidden\",r.style.opacity=0,y.style.opacity=1):a(\"hifi\",\nt.xg,\"wireframe\",t.xg)}}}();ab=function(a){a.apply()};Xa=function(a){a.fill()};Ya=function(a){a.stroke()};return this}var Xa,Ya,ab;function Va(a){function m(a){return f.Nh?(e.fontFamily=c.fontFamily,e.fontStyle=c.fontStyle,e.fontVariant=c.fontVariant,e.fontWeight=c.fontWeight,e.lineHeight=c.lineHeight,e.horizontalPadding=c.ob,e.verticalPadding=c.cb,e.maxTotalTextHeight=c.sb,e.maxFontSize=c.rb,g.Dc(f.Mh,a,e),d.fontFamily=e.fontFamily,d.fontStyle=e.fontStyle,d.fontVariant=e.fontVariant,d.fontWeight=e.fontWeight,d.lineHeight=e.lineHeight,d.ob=e.horizontalPadding,d.cb=e.verticalPadding,d.sb=e.maxTotalTextHeight,d.rb=e.maxFontSize,\nd):c}function k(a){\"undefined\"!==typeof a.groupLabelFontFamily&&(c.fontFamily=a.groupLabelFontFamily);\"undefined\"!==typeof a.groupLabelFontStyle&&(c.fontStyle=a.groupLabelFontStyle);\"undefined\"!==typeof a.groupLabelFontVariant&&(c.fontVariant=a.groupLabelFontVariant);\"undefined\"!==typeof a.groupLabelFontWeight&&(c.fontWeight=a.groupLabelFontWeight);\"undefined\"!==typeof a.groupLabelLineHeight&&(c.lineHeight=a.groupLabelLineHeight);\"undefined\"!==typeof a.groupLabelHorizontalPadding&&(c.ob=a.groupLabelHorizontalPadding);\n\"undefined\"!==typeof a.groupLabelVerticalPadding&&(c.cb=a.groupLabelVerticalPadding);\"undefined\"!==typeof a.groupLabelMaxTotalHeight&&(c.sb=a.groupLabelMaxTotalHeight);\"undefined\"!==typeof a.groupLabelMaxFontSize&&(c.rb=a.groupLabelMaxFontSize)}var f=a.options,c={},d={},g,l={groupLabel:\"\"},e={};a.c.j(\"api:initialized\",function(a){g=a});a.c.j(\"options:changed\",k);k(a.Ud);this.d=function(a){if(!a.ba)return!1;var c=a.group.label;f.Hh&&!a.na&&(l.labelText=c,g.Dc(f.Gh,a,l),c=l.labelText);a.pf=c;return a.Id!==\nc};this.k=function(a){var c=a.pf;a.Id=c;a.Uc.clear();a.ra=void 0;!a.ba||D.jf(c)||\"flattened\"===f.xb&&!a.empty()&&a.O&&a.e[0].W||(a.ra=G.xe(m(a),a.Uc,c,a.ba,a.q,a.L,!1,!1,a.ni,a.L.ja,f.Qh,a.Sa));a.Sa=!1};Za=this.A=function(a,c){a.Uc.Ta(c)}}var Za;function Wa(a){function m(a,c){var d=a.e,e=d.length,f,g,k=l.L.Ob;for(f=0;f<e;f++)g=d[f],g.Db=(180*(Math.atan2(g.x-a.x,g.y-a.y)+c)/Math.PI+180)/360,g.Oc=Math.min(1,Math.sqrt(M.d(g,a))/k)}function k(a,c){var d=a.e,e=d.length;if(1===e||2===e&&d[0].description)d[0].Db=0.5;else{var f,g,k=0,l=Number.MAX_VALUE,m=Math.sin(c),y=Math.cos(c);for(f=0;f<e;f++){g=d[f];var x=g.x*m+g.y*y;k<x&&(k=x);l>x&&(l=x);g.Db=x;g.Oc=1}for(f=0;f<e;f++)g=d[f],g.Db=(g.Db-l)/(k-l)}}function f(a,c,d,e){c=c[e];return c+(d[e]-c)*a}\nvar c={radial:m,linear:k},d=a.options,g,l,e={groupColor:null,labelColor:null};a.c.j(\"model:loaded\",function(a){l=a});a.c.j(\"api:initialized\",function(a){g=a});this.H=function(){};this.apply=function(){function a(c){if(c.O&&c.Ca){var k=c.e,l,m;if(c.aa||c.Ma||w){0===c.K?n(c,d.Xi*Math.PI/180):q(c,d.aj*Math.PI/180);for(l=k.length-1;0<=l;l--){m=k[l];m.Ma=!0;var B=m.Db,H,Q,O,P,F=m.Pe;0===c.K?(H=f(B,p,r,\"h\"),Q=(y+(1-y)*m.Oc)*f(B,p,r,\"s\"),O=(1+(0>m.ka?u*(m.ka+1):u)*(1-m.Oc))*f(B,p,r,\"l\"),P=f(B,p,r,\"a\")):\n(O=c.sa,H=O.h,Q=O.s,O=h(O.l,B,d.bj,d.cj),P=c.Pe.a);F.h=H;F.s=Q;F.l=O;F.a=P;H=m.sa;m.na?(H.h=0,H.s=0,H.l=\"light\"==d.Sg?90:10,H.a=1):(H.h=F.h,H.s=F.s,H.l=F.l,H.a=F.a);w&&!m.na&&(e.groupColor=H,e.labelColor=\"auto\",g.Dc(s,m,e,function(a){a.ratio=B}),m.sa=S.Ba(e.groupColor),m.sa.a=D.N(e.groupColor,\"a\")?e.groupColor.a:1,\"auto\"!==e.labelColor&&(m.Hd=S.Mg(e.labelColor)))}c.Ma=!1}for(l=k.length-1;0<=l;l--)a(k[l])}}function h(a,b,c,d){var e=0>a+c*d?0:100<a+c*d?100:a+c*d;return e+b*((0>a-c*(1-d)?0:100<a-c*(1-\nd)?100:a-c*(1-d))-e)}var n=c[d.Wi]||m,q=k,p=d.fj,r=d.Zi,s=d.lh,w=d.mh,u=d.$i,y=d.dj;a(l)};return this};function Ga(){this.uc=this.pe=this.rc=this.pg=this.f=this.wg=this.T=this.y=this.x=this.id=0;this.o=this.parent=this.e=null;this.q={x:0,y:0,f:0,i:0};this.C=null;this.Id=this.pf=void 0;this.ld=!1;this.Oc=this.Db=0;this.Pe={h:0,s:0,l:0,a:0,model:\"hsla\"};this.sa={h:0,s:0,l:0,a:0,model:\"hsla\"};this.Qe={h:0,s:0,l:0,model:\"hsl\"};this.zd=-1;this.Hd=\"auto\";this.qb=\"#000\";this.mg=this.K=this.Ed=this.index=0;this.na=!1;this.ja=this.uf=0;this.$=!1;this.ba=null;this.L={x:0,y:0,ja:0,Ob:0};this.Xd=this.u=null;this.Yc=\nthis.W=this.$a=this.Fc=this.me=this.Vd=this.Sa=this.Ma=this.I=this.aa=this.La=this.Ca=this.O=this.Qa=!1;this.wa=this.va=this.Ka=this.fa=this.opacity=this.scale=1;this.ua=0;this.Zd=1;this.Lb=this.ka=this.Hb=0;this.description=this.selected=this.Eb=this.Td=this.open=this.U=!1;this.Cb=0;this.of=this.Wd=this.Y=!0;this.ra=void 0;this.Vc=!1;this.Uc=new ga;this.ca=new ga;this.ac=new ga;this.ni=G.Ai();this.Xc=0;this.sd=1;this.bd=-1;this.empty=function(){return!this.e||0===this.e.length};var a=[];this.Cc=\nfunction(c){a.push(c)};this.fd=function(c){D.bg(a,c)};var m={scale:1};this.Nd=function(){var c=!1;this.scale=1;for(var d=0;d<a.length;d++)c=a[d].qf(this,m)||c,this.scale*=m.scale;return c};this.Tb=function(c){for(var d=0;d<a.length;d++)a[d].Tb(this,c)};this.Ub=function(c,d){d.x=c.x;d.y=c.y;for(var f=0;f<a.length;f++)a[f].Ub(this,d,d);return d};this.Vb=function(c,d){d.x=c.x;d.y=c.y;for(var f=0;f<a.length;f++)a[f].Vb(this,d,d);return d};var k=[];this.Ab=function(a){k.push(a)};this.ed=function(a){D.bg(k,\na)};var f={opacity:1,wa:1,va:1,fa:1,Ka:1};this.nc=function(){if(0!==k.length){this.Ka=this.fa=this.va=this.wa=this.opacity=1;for(var a=k.length-1;0<=a;a--)(0,k[a])(this,f),this.opacity*=f.opacity,this.va*=f.va,this.wa*=f.wa,this.fa*=f.fa,this.Ka*=f.Ka}}}function Oa(a,m){return m.T>a.T?1:m.T<a.T?-1:a.index-m.index};function bb(a){var m=this,k,f,c,d,g=a.options,l,e;a.c.j(\"stage:initialized\",function(b,e,l,q){c=l;d=q;k=b.oc(\"titlebar\",g.n,!1);f=k.getContext(\"2d\");f.n=g.n;f.scale(f.n,f.n);a.c.p(\"titlebar:initialized\",m)});a.c.j(\"stage:resized\",function(a,e,g,k){c=g;d=k;f.scale(f.n,f.n)});a.c.j(\"zoom:initialized\",function(a){e=a});a.c.j(\"api:initialized\",function(a){l=a});a.c.j(\"model:loaded\",function(){f.clearRect(0,0,c,d)});this.update=function(a){f.clearRect(0,0,c,d);if(a){!a.empty()&&a.e[0].description&&(a=\na.e[0]);var h=g.Cj,k=g.Bj,m=Math.min(d/2,g.ne+2*h),p=m-2*h,r=c-2*k;if(!(0>=p||0>=r)){var s=a.Vc?a.ra.fontSize*a.scale*e.scale():0,w,u={titleBarText:a.Id,titleBarTextColor:g.tg,titleBarBackgroundColor:g.sg,titleBarMaxFontSize:g.ne,titleBarShown:s<g.ti};a.na?w=xa.jg(\"B`ssnu!Rd`sbi!Gn`lUsdd!whrt`mh{`uhno/!Bmhbj!uid!mnfn!un!fn!un!iuuq;..b`ssnurd`sbi/bnl.gn`lusdd!gns!lnsd!edu`hmr/\"):(l.Dc(g.yj,a,u,function(a){a.titleBarWidth=r;a.titleBarHeight=p;a.labelFontSize=s;a.viewportScale=e.scale()}),w=u.titleBarText);\nw&&0!==w.length&&u.titleBarShown&&(a=e.nd(a.Ub(a,{}),{}).y>d/2,h={x:k,y:a?h:d-m+h,f:r,i:p},k=M.A(h),f.fillStyle=g.sg,f.fillRect(0,a?0:d-m,c,m),f.fillStyle=g.tg,G.Le({fontFamily:g.zj||g.Ih,fontStyle:g.$j||g.Jh,fontWeight:g.bk||g.Lh,fontVariant:g.ak||g.Kh,rb:g.ne,Zc:g.Aj,ob:0,cb:0,sb:1},f,w,k,h,{x:h.x+h.f/2,y:h.y+h.i/2},!0,!0).la||f.clearRect(0,0,c,d))}}}};function cb(a){function m(a,b,c){u=!0;h&&h.stop();q&&q.stop();return g(e.reset(a),b,c).P(function(){u=!1})}function k(b){e.update(b);s.I=!0;a.c.p(\"foamtree:dirty\",!0)}function f(a,b){return e.d((0!==e.k()?0.35:1)*a,(0!==e.A()?0.35:1)*b)}function c(){if(1===b.Pb){var a=Math.round(1E4*e.k())/1E4;0!==a&&(n.$d=a,h=w.D.tc(n).ia({duration:500,G:{x:{start:a,end:0,R:X.Rb}},da:function(){e.d(n.x-n.$d,0);k(1);n.$d=n.x}}).start())}}function d(){if(1===b.Pb){var a=Math.round(1E4*e.A())/1E4;0!==a&&(p.ae=a,q=w.D.tc(p).ia({duration:500,\nG:{y:{start:a,end:0,R:X.Rb}},da:function(){e.d(0,p.y-p.ae);k(1);p.ae=p.y}}).start())}}function g(a,c,d){return a?w.D.tc(b).ia({duration:void 0===c?700:c,G:{Pb:{start:0,end:1,R:d||X.og}},da:function(){k(b.Pb)}}).ab():(new V).J().M()}function l(a){return function(){return u?(new V).J().M():a.apply(this,arguments)}}var e=new oa(a),b={Pb:1},h,n={Ee:0,x:0,$d:0},q,p={Fe:0,y:0,ae:0},r=this,s,w,u=!1;a.c.j(\"model:loaded\",function(a){s=a;e.reset(!1);e.update(1)});a.c.j(\"timeline:initialized\",function(a){w=\na});this.H=function(){a.c.p(\"zoom:initialized\",this)};this.reset=function(a,b){e.Qb(1);return m(!0,a,b)};this.normalize=l(function(a,b){e.Hc(1)?m(!1,a,b):r.vf()});this.vf=function(){c();d()};this.k=l(function(a,b,c,d){return r.sc(a.q,b,c,d)});this.Yb=l(function(a,b,c,d){return g(e.Yb(a,b),c,d)});this.sc=l(function(a,b,c,d){return g(e.sc(a,b),c,d)});this.Dj=l(function(a,b){e.sc(a,b)&&k(1)});this.vi=l(function(a,c){1===b.Pb&&f(a,c)&&k(1)});this.Qg=l(function(a,b){e.Yb(a,b)&&k(1)});this.Pg=l(function(a,\nb,c,d){a=0|e.Yb(a,b);(a|=f(c,d))&&k(1)});this.wi=l(function(a,g,l){1===b.Pb&&(h=w.D.tc(n).ia({duration:a/0.03,G:{Ee:{start:g,end:0,R:X.Rb}},da:function(){e.d(n.Ee,0)&&k(1);c()}}).start(),q=w.D.tc(p).ia({duration:a/0.03,G:{Fe:{start:l,end:0,R:X.Rb}},da:function(){f(0,p.Fe)&&k(1);d()}}).start())});this.xi=function(){h&&0===e.k()&&h.stop();q&&0===e.A()&&q.stop()};this.Jc=function(a,b){e.Jc(a,b)};this.Qb=function(a){return e.Qb(a)};this.Hc=function(a){return e.Hc(a)};this.Rd=function(){return e.Rd()};\nthis.absolute=function(a,b){return e.absolute(a,b)};this.nd=function(a,b){return e.nd(a,b)};this.scale=function(){return e.scale()};this.d=function(a){return e.S(a)};this.content=function(a,b,c,d){e.content(a,b,c,d)}};function db(a,m,k){function f(a){var b=[];$.F(q,function(c){a(c)&&b.push(c.group)});return{groups:b}}function c(a,b){var c=n.options,d=c.mj,e=c.lj,c=c.fe,f=0<d+e?c:0,g=[];Ca.Ja(a,Ca.ya(a,n.options.he),function(a,c,h){c=\"groups\"===n.options.ge?h:c;a.e&&(a=r.D.m(a).eb(f*(e+d*c)).call(b).xa(),g.push(a))});return r.D.m({}).Ya(g).ab()}function d(a){Y||(Y=!0,p.d(function(){Y=!1;n.c.p(\"repaint:before\");C.ee(this.Og)},{Og:a}))}function g(a){function c(a,b){var f=a.W;a.W=b<=d;a.Yc=b<=e;a.W!==f&&$.Ge(a,function(a){a.me=\n!0});a.open||a.fb||b++;if(f=a.e)for(var g=0;g<f.length;g++)c(f[g],b)}var d=n.options.rf,e=Math.min(n.options.rf,n.options.qi);if(a)for(var f=0;f<a.length;f++){var g=a[f];c(g,b(g))}else c(q,0)}function l(a,b){var c=[],d=e(a,b);d.ui&&n.c.p(\"model:childrenAttached\",$.Mc(q));d.gj&&A.complete(function(a){J.pb(a);c.push(a)});for(var f=d=0;f<c.length;f++){var g=c[f];g.e&&(d+=g.e.length);g.Ca=!0;H.d(g)}return d}function e(a,b){function c(a,b){var k=!a.na&&b-(a.fb?1:0)<d;f=f||k;a.Qa=a.Qa||k;a.open||a.fb||\nb++;var l=a.e;!l&&k&&(e=x.S(a)||e,l=a.e,h&&(a.Sa=!0));if(l)for(k=0;k<l.length;k++)g.push(l[k],b)}var d=b||n.options.ri,e=!1,f=!1,g,h=\"flattened\"===m.xb;for(g=a?a.reduce(function(a,b){a.push(b,1);return a},[]):[q,1];0<g.length;)c(g.shift(),g.shift());return{ui:e,gj:f}}function b(a){for(var b=0;a.parent;)a.open||a.fb||b++,a=a.parent;return b}var h=this,n={c:new wa,options:m,Ud:k},q,p=new da,r=new ya(p),s=ba.create(),w=new ka(n),u=new cb(n),y=new Ea(n),x=new Fa(n.options),A=new Pa(n),C=new Ta(n,p),K=\nnew Ma(n);new bb(n);var B=new Ia(n),H=new Ja(n),Q=new Ka(n),O=new La(n);n.c.j(\"stage:initialized\",function(a,b,c,d){t.ff(c,d)});n.c.j(\"stage:resized\",function(a,b,c,d){t.kj(a,b,c,d)});n.c.j(\"foamtree:attachChildren\",l);n.c.j(\"openclose:changing\",g);n.c.j(\"interaction:reset\",function(){R(!0)});n.c.j(\"foamtree:dirty\",d);this.H=function(){n.c.p(\"timeline:initialized\",r);q=x.H();w.H(a);y.H();C.H();K.H();B.H();H.H();u.H();Q.H();O.H()};this.kb=function(){r.d();I.stop();p.k();w.kb()};var P=\"groupLabelFontFamily groupLabelFontStyle groupLabelFontVariant groupLabelFontWeight groupLabelLineHeight groupLabelHorizontalPadding groupLabelVerticalPadding groupLabelDottingThreshold groupLabelMaxTotalHeight groupLabelMinFontSize groupLabelMaxFontSize groupLabelDecorator\".split(\" \"),\nF=\"rainbowColorDistribution rainbowLightnessDistribution rainbowColorDistributionAngle rainbowLightnessDistributionAngle rainbowColorModelStartPoint rainbowLightnessCorrection rainbowSaturationCorrection rainbowStartColor rainbowEndColor rainbowHueShift rainbowHueShiftCenter rainbowSaturationShift rainbowSaturationShiftCenter rainbowLightnessShift rainbowLightnessShiftCenter attributionTheme\".split(\" \"),T=!1,N=[\"groupBorderRadius\",\"groupBorderRadiusCorrection\",\"groupBorderWidth\",\"groupInsetWidth\",\n\"groupBorderWidthScaling\"],U=[\"maxGroupLevelsDrawn\",\"maxGroupLabelLevelsDrawn\"];this.Xb=function(a){n.c.p(\"options:changed\",a);D.nb(a,P)&&$.F(q,function(a){a.Sa=!0});D.nb(a,F)&&(q.Ma=!0);D.nb(a,N)&&(T=!0);D.nb(a,U)&&(g(),l())};this.reload=function(){z.reload()};this.yc=function(a,b){D.defer(function(){if(T)t.oi(a),T=!1;else{if(b)for(var c=x.k(b),e=c.length-1;0<=e;e--)c[e].I=!0;else q.I=!0;d(a)}})};this.Z=function(){w.k()};this.update=function(a){a=a?x.k(a):[q];var b=a.reduce(function(a,b){a[b.id]=\nb;return a},{});a=a.filter(function(a){for(a=a.parent;a;){if(D.N(b,a.id))return!1;a=a.parent}return!0});x.update(a);t.Ej(a)};this.reset=function(){return R(!1)};this.S=C.d;this.Ja=function(){var a={};return function(b,c){var d=x.d(b);return d?y.od(a,d,c):null}}();this.Ba=function(){var a={x:0,y:0},b={x:0,y:0};return function(c,d){var e=x.d(c);return e?(a.x=d.x,a.y=d.y,e.Ub(a,a),u.nd(a,a),b.x=a.x,b.y=a.y,b):null}}();this.ya=function(){var a={};return function(b){return(b=x.d(b))?y.qd(a,b):null}}();\nthis.Wb=function(){var a={};return function(b){return(b=x.d(b))?y.pd(a,b):null}}();this.za=function(){var a={};return function(){return u.d(a)}}();this.zc=function(){this.A({groups:f(function(a){return a.group.selected}),newState:!0,keepPrevious:!1});this.k({groups:f(function(a){return a.group.open}),newState:!0,keepPrevious:!1});this.d({groups:f(function(a){return a.group.exposed}),newState:!0,keepPrevious:!1})};this.Pa=function(){return f(function(a){return a.U})};this.d=function(a){return z.submit(function(){return B.fc(x.A(a,\n\"exposed\",!1),!1,!0,!1)})};this.bb=function(){return f(function(a){return a.open})};this.k=function(a){return z.submit(function(){return Q.Kb(x.A(a,\"open\",!0),!1,!1)})};this.Ua=function(){return f(function(a){return a.selected})};this.A=function(a){return z.submit(function(){O.select(x.A(a,\"selected\",!0),!1);return(new V).J().M()})};this.Bc=function(a){return(a=x.d(a))?a===q?u.reset(m.wc,X.pa(m.xc)):u.k(a,m.Qc,m.wc,X.pa(m.xc)):(new V).J().M()};this.Aa=function(a,b){var c=x.k(a);if(c){var d=l(c,b);\ng(c);return d}return 0};this.gb=function(a){return K.gb[a]};this.Ac=function(){var a=fa;return{frames:a.frames,totalTime:a.totalTime,lastFrameTime:a.Jd,lastInterFrameTime:a.Kd,fps:a.Oe}};var t=function(){function a(d,f){var g=d||c,h=f||e;c=g;e=h;var k=m.bc&&m.bc.boundary;k&&2<k.length?q.o=k.map(function(a){return{x:g*a.x,y:h*a.y}}):q.o=[{x:0,y:0},{x:g,y:0},{x:g,y:h},{x:0,y:h}];b()}function b(){q.aa=!0;q.u=q.o;q.q=M.q(q.o,q.q);q.L=q;M.re(q.o,q.L)}var c,e;return{ff:a,kj:function(b,c,e,f){J.stop();var g=\ne/b,h=f/c;$.He(q,function(a){a.x=a.x*g+(Math.random()-0.5)*e/1E3;a.y=a.y*h+(Math.random()-0.5)*f/1E3});a(e,f);q.La=!0;A.step(J.pb,!0,!1,function(a){var b=a.e;if(b){A.Nb(a);for(var c=b.length-1;0<=c;c--){var d=b[c];d.f=d.rc}a.La=!0}})?d(!1):(A.qc(q),n.options.de?(d(!1),I.cg(),I.gd()):(A.complete(J.pb),q.Ma=!0,d(!1)))},oi:function(a){var c=!1;q.empty()||(b(),I.Gb()||(c=A.step(J.pb,!1,!1),d(a)));return c},Ej:function(a){a.forEach(function(a){$.Fa(a,function(a){a.empty()||A.Nb(a)});A.qc(a);n.options.de?\n(I.cg(),$.Fa(a,function(a){a.empty()||J.df(a)})):($.Fa(a,function(a){a.empty()||J.pb(a)}),A.complete(J.pb),a.Ma=!0,d(!1))})}}}(),z=function(){function a(){0===m.Yd&&u.reset(0);n.options.Tf(m.bc);t.ff();x.Z(m.bc);e();g();n.c.p(\"model:loaded\",q,$.Mc(q));var c;q.empty()||(q.open=!0,q.Qa=!0,m.de?c=I.gd():(I.zi(),c=f()),b(),0<m.fe?(C.clear(),w.d(1)):c=pa([c,d(1)]));n.options.Sf(m.bc);c&&(n.options.Wf(),c.P(function(){C.k(function(){p.d(n.options.Vf)})}))}function b(){var a=m.Va,c=m.cd;m.Va=0;m.cd=0;h.zc();\nm.Va=a;m.cd=c}function d(a,b){return 0===m.Ke||b?(w.d(a),(new V).J().M()):r.D.m({opacity:w.d()}).oe(2).ia({duration:m.Ke,G:{opacity:{end:a,R:X.pa(m.fh)}},da:function(){w.d(this.opacity)}}).ab()}function f(){$.Fa(q,function(a){a.Ca=!1});var a=new V,b=new qa(a.J);b.d();q.Ca=!0;H.d(q).P(b.k);c(q,function Ua(){this.O&&this.o&&(this.aa=this.Ca=!0,b.d(),H.d(this).P(b.k),b.d(),c(this,Ua).P(b.k))});return a.M()}function k(){for(var a=0;a<s.length;a++){var b=s[a],c=b.action();D.N(c,\"then\")?c.P(b.Ae.J):b.Ae.J()}s=\n[]}var l=!1,s=[];return{reload:function(){l||(q.empty()?a():(J.stop(),r.d(),I.stop(),l=!0,pa(0<m.Yd?[H.k(),R(!1)]:[d(0)]).P(function(){d(0,!0);l=!1;a();D.defer(k)})))},submit:function(a){if(l){var b=new V;s.push({action:a,Ae:b});return b.M()}return a()}}}(),L,E=new qa(function(){L.J()}),I=function(){function a(){f||(E.A()&&(L=new V),E.d(),b(),f=!0,p.repeat(e));return L.M()}function b(){g=s.now()}function e(){var b=s.now()-g>m.jj,b=A.step(function(b){b.Ca=!0;J.df(b);E.d();H.d(b).P(E.k);E.d();c(b,function(){this.Qa=\n!0;a()}).P(E.k)},!0,b)||b;d(!0);b&&(f=!1,E.k());return b}var f=!1,g;return{zi:function(){A.complete(J.pb)},gd:a,cg:b,Gb:function(){return!E.A()},stop:function(){p.cancel(e);f=!1;E.clear()}}}(),J=function(){function a(b){var c=!b.empty();b.Ca=!0;if(c){for(var d=b.e,e=d.length-1;0<=e;e--){var f=d[e];f.f=f.rc}b.La=!0}return c}var b=[];return{df:function(c){var d=n.options,e=d.zh;0<e?Ca.Ja(c,Ca.ya(c,n.options.he),function(a,c,f){c=\"groups\"===n.options.ge?f:c;E.d();b.push(r.D.m(a).eb(c*d.yh*e).ia({duration:e,\nG:{f:{start:a.pg,end:a.rc,R:X.pa(d.Ah)}},da:function(){this.f=Math.max(0,this.f);this.parent.La=!0;I.gd()}}).ib(E.k).start())}):a(c)&&I.gd()},pb:a,stop:function(){for(var a=b.length-1;0<=a;a--)b[a].stop();b=[]}}}(),R=function(){var a=!1;return function(b){if(a)return(new V).J().M();a=!0;var c=[];c.push(u.reset(m.wc,X.pa(m.xc)));var d=new V;B.fc({e:[],Ia:!1,Ha:!1},b,!1,!0).P(function(){Q.Kb({e:[],Ia:!1,Ha:!1},b,!1).P(d.J)});c.push(d.M());return pa(c).P(function(){a=!1;b&&m.Xf()})}}(),Y=!1}\nfunction $a(){return{version:\"3.4.9\",build:\"bugfix/3.4.x/b84d33dd\",brandingAllowed:!1}};v.Dd(function(){window.CarrotSearchFoamTree=function(a){function m(a,b){if(!l||l.exists(a))switch(a){case \"selection\":return h.Ua();case \"open\":return h.bb();case \"exposure\":return h.Pa();case \"state\":return h.ya.apply(this,b);case \"geometry\":return h.Ja.apply(this,b);case \"hierarchy\":return h.Wb.apply(this,b);case \"containerCoordinates\":return h.Ba.apply(this,b);case \"imageData\":return h.S.apply(this,b);case \"viewport\":return h.za();case \"times\":return h.Ac();case \"onModelChanged\":case \"onRedraw\":case \"onRolloutStart\":case \"onRolloutComplete\":case \"onRelaxationStep\":case \"onGroupHover\":case \"onGroupOpenOrCloseChanging\":case \"onGroupExposureChanging\":case \"onGroupSelectionChanging\":case \"onGroupSelectionChanged\":case \"onGroupClick\":case \"onGroupDoubleClick\":case \"onGroupHold\":var c=\ne[a];return Array.isArray(c)?c:[c];default:return e[a]}}function k(a){function d(a,b){return D.N(f,a)?(b(f[a]),delete f[a],1):0}var f;if(0===arguments.length)return 0;1===arguments.length?f=D.extend({},arguments[0]):2===arguments.length&&(f={},f[arguments[0]]=arguments[1]);l&&l.validate(f,b.pi);var g=0;h&&(g+=d(\"selection\",h.A),g+=d(\"open\",h.k),g+=d(\"exposure\",h.d));var k={};D.Ga(f,function(a,b){if(e[b]!==a||D.jc(a))k[b]=a,g++;e[b]=a});0<g&&c(k);return g}function f(a,b){var d=\"on\"+a.charAt(0).toUpperCase()+\na.slice(1),f=e[d];e[d]=b(Array.isArray(f)?f:[f]);f={};f[d]=e[d];c(f)}function c(a){(function(){function c(b,d){return D.N(a,b)||void 0===d?va.m(e[b],g):d}b.pi=e.logging;b.bc=e.dataObject;b.n=e.pixelRatio;b.yb=e.wireframePixelRatio;b.xb=e.stacking;b.ah=e.descriptionGroup;b.dc=e.descriptionGroupType;b.Ic=e.descriptionGroupPosition;b.bh=e.descriptionGroupDistanceFromCenter;b.cc=e.descriptionGroupSize;b.Ce=e.descriptionGroupMinHeight;b.Be=e.descriptionGroupMaxHeight;b.De=e.descriptionGroupPolygonDrawn;\nb.Wc=e.layout;b.lc=e.layoutByWeightOrder;b.wj=e.showZeroWeightGroups;b.Ve=e.groupMinDiameter;b.ce=e.rectangleAspectRatioPreference;b.ij=e.initializer||e.relaxationInitializer;b.jj=e.relaxationMaxDuration;b.de=e.relaxationVisible;b.ag=e.relaxationQualityThreshold;b.Rh=e.groupResizingBudget;b.zh=e.groupGrowingDuration;b.yh=e.groupGrowingDrag;b.Ah=e.groupGrowingEasing;b.jh=e.groupBorderRadius;b.lb=e.groupBorderWidth;b.Ra=e.groupBorderWidthScaling;b.Ad=e.groupInsetWidth;b.kh=e.groupBorderRadiusCorrection;\nb.mb=e.groupStrokeWidth;b.Rc=e.groupSelectionOutlineWidth;b.Vh=e.groupSelectionOutlineColor;b.Bd=e.groupSelectionOutlineShadowSize;b.We=e.groupSelectionOutlineShadowColor;b.Sh=e.groupSelectionFillHueShift;b.Uh=e.groupSelectionFillSaturationShift;b.Th=e.groupSelectionFillLightnessShift;b.Ye=e.groupSelectionStrokeHueShift;b.$e=e.groupSelectionStrokeSaturationShift;b.Ze=e.groupSelectionStrokeLightnessShift;b.xh=e.groupFillType;b.th=e.groupFillGradientRadius;b.qh=e.groupFillGradientCenterHueShift;b.sh=\ne.groupFillGradientCenterSaturationShift;b.rh=e.groupFillGradientCenterLightnessShift;b.uh=e.groupFillGradientRimHueShift;b.wh=e.groupFillGradientRimSaturationShift;b.vh=e.groupFillGradientRimLightnessShift;b.Cd=e.groupStrokeType;b.mb=e.groupStrokeWidth;b.af=e.groupStrokePlainHueShift;b.cf=e.groupStrokePlainSaturationShift;b.bf=e.groupStrokePlainLightnessShift;b.$h=e.groupStrokeGradientRadius;b.Wh=e.groupStrokeGradientAngle;b.ai=e.groupStrokeGradientUpperHueShift;b.ci=e.groupStrokeGradientUpperSaturationShift;\nb.bi=e.groupStrokeGradientUpperLightnessShift;b.Xh=e.groupStrokeGradientLowerHueShift;b.Zh=e.groupStrokeGradientLowerSaturationShift;b.Yh=e.groupStrokeGradientLowerLightnessShift;b.Bh=e.groupHoverFillHueShift;b.Dh=e.groupHoverFillSaturationShift;b.Ch=e.groupHoverFillLightnessShift;b.Se=e.groupHoverStrokeHueShift;b.Ue=e.groupHoverStrokeSaturationShift;b.Te=e.groupHoverStrokeLightnessShift;b.Wa=e.groupExposureScale;b.ph=e.groupExposureShadowColor;b.Re=e.groupExposureShadowSize;b.Qc=e.groupExposureZoomMargin;\nb.ei=e.groupUnexposureLightnessShift;b.fi=e.groupUnexposureSaturationShift;b.di=e.groupUnexposureLabelColorThreshold;b.Va=e.exposeDuration;b.gc=e.exposeEasing;b.cd=e.openCloseDuration;b.lh=va.m(e.groupColorDecorator,g);b.mh=e.groupColorDecorator!==D.ta;b.Gh=va.m(e.groupLabelDecorator,g);b.Hh=e.groupLabelDecorator!==D.ta;b.Mh=va.m(e.groupLabelLayoutDecorator,g);b.Nh=e.groupLabelLayoutDecorator!==D.ta;b.nh=va.m(e.groupContentDecorator,g);b.Pc=e.groupContentDecorator!==D.ta;b.oh=e.groupContentDecoratorTriggering;\nb.ej=e.rainbowStartColor;b.Yi=e.rainbowEndColor;b.Wi=e.rainbowColorDistribution;b.Xi=e.rainbowColorDistributionAngle;b.aj=e.rainbowLightnessDistributionAngle;b.bj=e.rainbowLightnessShift;b.cj=e.rainbowLightnessShiftCenter;b.dj=e.rainbowSaturationCorrection;b.$i=e.rainbowLightnessCorrection;b.Yf=e.parentFillOpacity;b.yi=e.parentStrokeOpacity;b.Zf=e.parentLabelOpacity;b.$f=e.parentOpacityBalancing;b.Qh=e.groupLabelUpdateThreshold;b.Ih=e.groupLabelFontFamily;b.Jh=e.groupLabelFontStyle;b.Kh=e.groupLabelFontVariant;\nb.Lh=e.groupLabelFontWeight;b.Ph=e.groupLabelMinFontSize;b.Sj=e.groupLabelMaxFontSize;b.Rj=e.groupLabelLineHeight;b.Qj=e.groupLabelHorizontalPadding;b.Uj=e.groupLabelVerticalPadding;b.Tj=e.groupLabelMaxTotalHeight;b.Fh=e.groupLabelDarkColor;b.Oh=e.groupLabelLightColor;b.Eh=e.groupLabelColorThreshold;b.Gj=e.wireframeDrawMaxDuration;b.Hj=e.wireframeLabelDrawing;b.Fj=e.wireframeContentDecorationDrawing;b.xg=e.wireframeToFinalFadeDuration;b.Ij=e.wireframeToFinalFadeDelay;b.gh=e.finalCompleteDrawMaxDuration;\nb.hh=e.finalIncrementalDrawMaxDuration;b.Me=e.finalToWireframeFadeDuration;b.rd=e.androidStockBrowserWorkaround;b.ef=e.incrementalDraw;b.si=e.maxGroups;b.ri=e.maxGroupLevelsAttached;b.rf=e.maxGroupLevelsDrawn;b.qi=e.maxGroupLabelLevelsDrawn;b.he=e.rolloutStartPoint;b.ge=e.rolloutMethod;b.nj=e.rolloutEasing;b.fe=e.rolloutDuration;b.fg=e.rolloutScalingStrength;b.hg=e.rolloutTranslationXStrength;b.ig=e.rolloutTranslationYStrength;b.eg=e.rolloutRotationStrength;b.gg=e.rolloutTransformationCenter;b.rj=\ne.rolloutPolygonDrag;b.sj=e.rolloutPolygonDuration;b.oj=e.rolloutLabelDelay;b.pj=e.rolloutLabelDrag;b.qj=e.rolloutLabelDuration;b.mj=e.rolloutChildGroupsDrag;b.lj=e.rolloutChildGroupsDelay;b.Pi=e.pullbackStartPoint;b.Ji=e.pullbackMethod;b.Fi=e.pullbackEasing;b.Xj=e.pullbackType;b.Yd=e.pullbackDuration;b.Oi=e.pullbackScalingStrength;b.Ri=e.pullbackTranslationXStrength;b.Si=e.pullbackTranslationYStrength;b.Ni=e.pullbackRotationStrength;b.Qi=e.pullbackTransformationCenter;b.Ki=e.pullbackPolygonDelay;\nb.Li=e.pullbackPolygonDrag;b.Mi=e.pullbackPolygonDuration;b.Gi=e.pullbackLabelDelay;b.Hi=e.pullbackLabelDrag;b.Ii=e.pullbackLabelDuration;b.Ci=e.pullbackChildGroupsDelay;b.Di=e.pullbackChildGroupsDrag;b.Ei=e.pullbackChildGroupsDuration;b.Ke=e.fadeDuration;b.fh=e.fadeEasing;b.Jj=e.zoomMouseWheelFactor;b.wc=e.zoomMouseWheelDuration;b.xc=e.zoomMouseWheelEasing;b.ti=e.maxLabelSizeForTitleBar;b.zj=e.titleBarFontFamily;b.sg=e.titleBarBackgroundColor;b.tg=e.titleBarTextColor;b.Aj=e.titleBarMinFontSize;b.ne=\ne.titleBarMaxFontSize;b.Bj=e.titleBarTextPaddingLeftRight;b.Cj=e.titleBarTextPaddingTopBottom;b.yj=e.titleBarDecorator;b.Nj=e.attributionText;b.Kj=e.attributionLogo;b.Mj=e.attributionLogoScale;b.Oj=e.attributionUrl;b.ve=e.attributionPosition;b.Rg=e.attributionDistanceFromCenter;b.Tg=e.attributionWeight;b.Sg=e.attributionTheme;b.gf=e.interactionHandler;b.Tf=c(\"onModelChanging\",b.Tf);b.Sf=c(\"onModelChanged\",b.Sf);b.Uf=c(\"onRedraw\",b.Uf);b.Wf=c(\"onRolloutStart\",b.Wf);b.Vf=c(\"onRolloutComplete\",b.Vf);\nb.Sd=c(\"onRelaxationStep\",b.Sd);b.Xf=c(\"onViewReset\",b.Xf);b.Lf=c(\"onGroupOpenOrCloseChanging\",b.Lf);b.Kf=c(\"onGroupOpenOrCloseChanged\",b.Kf);b.Df=c(\"onGroupExposureChanging\",b.Df);b.Cf=c(\"onGroupExposureChanged\",b.Cf);b.Nf=c(\"onGroupSelectionChanging\",b.Nf);b.Mf=c(\"onGroupSelectionChanged\",b.Mf);b.Ff=c(\"onGroupHover\",b.Ff);b.Hf=c(\"onGroupMouseMove\",b.Hf);b.xf=c(\"onGroupClick\",b.xf);b.yf=c(\"onGroupDoubleClick\",b.yf);b.Ef=c(\"onGroupHold\",b.Ef);b.Jf=c(\"onGroupMouseWheel\",b.Jf);b.If=c(\"onGroupMouseUp\",\nb.If);b.Gf=c(\"onGroupMouseDown\",b.Gf);b.Bf=c(\"onGroupDragStart\",b.Bf);b.zf=c(\"onGroupDrag\",b.zf);b.Af=c(\"onGroupDragEnd\",b.Af);b.Qf=c(\"onGroupTransformStart\",b.Qf);b.Of=c(\"onGroupTransform\",b.Of);b.Pf=c(\"onGroupTransformEnd\",b.Pf);b.Rf=c(\"onKeyUp\",b.Rf)})();b.fj=S.Ba(b.ej);b.Zi=S.Ba(b.Yi);b.Xe=S.Ba(b.We);b.Lj=null;h&&(h.Xb(a),D.N(a,\"dataObject\")&&h.reload())}function d(a){return function(){return a.apply(this,arguments).ih(g)}}var g=this,l=window.CarrotSearchFoamTree.asserts,e=D.extend({},window.CarrotSearchFoamTree.defaults),\nb={};k(a);(a=e.element||document.getElementById(e.id))||la.Pa(\"Element to embed FoamTree in not found.\");e.element=a;var h=new db(a,b,e);h.H();var n={get:function(a){return 0===arguments.length?D.extend({},e):m(arguments[0],Array.prototype.slice.call(arguments,1))},set:k,on:function(a,b){f(a,function(a){a.push(b);return a})},off:function(a,b){f(a,function(a){return a.filter(function(a){return a!==b})})},resize:h.Z,redraw:h.yc,update:h.update,attach:h.Aa,select:d(h.A),expose:d(h.d),open:d(h.k),reset:d(h.reset),\nzoom:d(h.Bc),trigger:function(a,b){var c=h.gb(a);c&&c(b)},dispose:function(){function a(){throw\"FoamTree instance disposed\";}h.kb();D.Ga(n,function(b,c){\"dispose\"!==c&&(g[c]=a)})}};D.Ga(n,function(a,b){g[b]=a});h.reload()};window[\"CarrotSearchFoamTree.asserts\"]&&(window.CarrotSearchFoamTree.asserts=window[\"CarrotSearchFoamTree.asserts\"],delete window[\"CarrotSearchFoamTree.asserts\"]);window.CarrotSearchFoamTree.supported=!0;window.CarrotSearchFoamTree.version=$a;window.CarrotSearchFoamTree.defaults=\nObject.freeze({id:void 0,element:void 0,logging:!1,dataObject:void 0,pixelRatio:1,wireframePixelRatio:1,layout:\"relaxed\",layoutByWeightOrder:!0,showZeroWeightGroups:!0,groupMinDiameter:10,rectangleAspectRatioPreference:-1,relaxationInitializer:\"fisheye\",relaxationMaxDuration:3E3,relaxationVisible:!1,relaxationQualityThreshold:1,stacking:\"hierarchical\",descriptionGroup:\"auto\",descriptionGroupType:\"stab\",descriptionGroupPosition:225,descriptionGroupDistanceFromCenter:1,descriptionGroupSize:0.125,descriptionGroupMinHeight:35,\ndescriptionGroupMaxHeight:0.5,descriptionGroupPolygonDrawn:!1,maxGroups:5E4,maxGroupLevelsAttached:4,maxGroupLevelsDrawn:4,maxGroupLabelLevelsDrawn:3,groupGrowingDuration:0,groupGrowingEasing:\"bounce\",groupGrowingDrag:0,groupResizingBudget:2,groupBorderRadius:0.15,groupBorderWidth:4,groupBorderWidthScaling:0.6,groupInsetWidth:6,groupBorderRadiusCorrection:1,groupSelectionOutlineWidth:5,groupSelectionOutlineColor:\"#222\",groupSelectionOutlineShadowSize:0,groupSelectionOutlineShadowColor:\"#fff\",groupSelectionFillHueShift:0,\ngroupSelectionFillSaturationShift:0,groupSelectionFillLightnessShift:0,groupSelectionStrokeHueShift:0,groupSelectionStrokeSaturationShift:0,groupSelectionStrokeLightnessShift:-10,groupFillType:\"gradient\",groupFillGradientRadius:1,groupFillGradientCenterHueShift:0,groupFillGradientCenterSaturationShift:0,groupFillGradientCenterLightnessShift:20,groupFillGradientRimHueShift:0,groupFillGradientRimSaturationShift:0,groupFillGradientRimLightnessShift:-5,groupStrokeType:\"plain\",groupStrokeWidth:1.5,groupStrokePlainHueShift:0,\ngroupStrokePlainSaturationShift:0,groupStrokePlainLightnessShift:-10,groupStrokeGradientRadius:1,groupStrokeGradientAngle:45,groupStrokeGradientUpperHueShift:0,groupStrokeGradientUpperSaturationShift:0,groupStrokeGradientUpperLightnessShift:20,groupStrokeGradientLowerHueShift:0,groupStrokeGradientLowerSaturationShift:0,groupStrokeGradientLowerLightnessShift:-20,groupHoverFillHueShift:0,groupHoverFillSaturationShift:0,groupHoverFillLightnessShift:20,groupHoverStrokeHueShift:0,groupHoverStrokeSaturationShift:0,\ngroupHoverStrokeLightnessShift:-10,groupExposureScale:1.15,groupExposureShadowColor:\"rgba(0, 0, 0, 0.5)\",groupExposureShadowSize:50,groupExposureZoomMargin:0.1,groupUnexposureLightnessShift:65,groupUnexposureSaturationShift:-65,groupUnexposureLabelColorThreshold:0.35,exposeDuration:700,exposeEasing:\"squareInOut\",groupColorDecorator:D.ta,groupLabelDecorator:D.ta,groupLabelLayoutDecorator:D.ta,groupContentDecorator:D.ta,groupContentDecoratorTriggering:\"onLayoutDirty\",openCloseDuration:500,rainbowColorDistribution:\"radial\",\nrainbowColorDistributionAngle:-45,rainbowLightnessDistributionAngle:45,rainbowSaturationCorrection:0.1,rainbowLightnessCorrection:0.4,rainbowStartColor:\"hsla(0, 100%, 55%, 1)\",rainbowEndColor:\"hsla(359, 100%, 55%, 1)\",rainbowLightnessShift:30,rainbowLightnessShiftCenter:0.4,parentFillOpacity:0.7,parentStrokeOpacity:1,parentLabelOpacity:1,parentOpacityBalancing:!0,wireframeDrawMaxDuration:15,wireframeLabelDrawing:\"auto\",wireframeContentDecorationDrawing:\"auto\",wireframeToFinalFadeDuration:500,wireframeToFinalFadeDelay:300,\nfinalCompleteDrawMaxDuration:80,finalIncrementalDrawMaxDuration:100,finalToWireframeFadeDuration:200,androidStockBrowserWorkaround:v.hf(),incrementalDraw:\"fast\",groupLabelFontFamily:\"sans-serif\",groupLabelFontStyle:\"normal\",groupLabelFontWeight:\"normal\",groupLabelFontVariant:\"normal\",groupLabelLineHeight:1.05,groupLabelHorizontalPadding:1,groupLabelVerticalPadding:1,groupLabelMinFontSize:6,groupLabelMaxFontSize:160,groupLabelMaxTotalHeight:0.9,groupLabelUpdateThreshold:0.05,groupLabelDarkColor:\"#000\",\ngroupLabelLightColor:\"#fff\",groupLabelColorThreshold:0.35,rolloutStartPoint:\"center\",rolloutEasing:\"squareOut\",rolloutMethod:\"groups\",rolloutDuration:2E3,rolloutScalingStrength:-0.7,rolloutTranslationXStrength:0,rolloutTranslationYStrength:0,rolloutRotationStrength:-0.7,rolloutTransformationCenter:0.7,rolloutPolygonDrag:0.1,rolloutPolygonDuration:0.5,rolloutLabelDelay:0.8,rolloutLabelDrag:0.1,rolloutLabelDuration:0.5,rolloutChildGroupsDrag:0.1,rolloutChildGroupsDelay:0.2,pullbackStartPoint:\"center\",\npullbackEasing:\"squareIn\",pullbackMethod:\"groups\",pullbackDuration:1500,pullbackScalingStrength:-0.7,pullbackTranslationXStrength:0,pullbackTranslationYStrength:0,pullbackRotationStrength:-0.7,pullbackTransformationCenter:0.7,pullbackPolygonDelay:0.3,pullbackPolygonDrag:0.1,pullbackPolygonDuration:0.8,pullbackLabelDelay:0,pullbackLabelDrag:0.1,pullbackLabelDuration:0.3,pullbackChildGroupsDelay:0.1,pullbackChildGroupsDrag:0.1,pullbackChildGroupsDuration:0.3,fadeDuration:700,fadeEasing:\"cubicInOut\",\nzoomMouseWheelFactor:1.5,zoomMouseWheelDuration:500,zoomMouseWheelEasing:\"squareOut\",maxLabelSizeForTitleBar:8,titleBarFontFamily:null,titleBarFontStyle:\"normal\",titleBarFontWeight:\"normal\",titleBarFontVariant:\"normal\",titleBarBackgroundColor:\"rgba(0, 0, 0, 0.5)\",titleBarTextColor:\"rgba(255, 255, 255, 1)\",titleBarMinFontSize:10,titleBarMaxFontSize:40,titleBarTextPaddingLeftRight:20,titleBarTextPaddingTopBottom:15,titleBarDecorator:D.ta,attributionText:null,attributionLogo:null,attributionLogoScale:0.5,\nattributionUrl:\"http://carrotsearch.com/foamtree\",attributionPosition:\"bottom-right\",attributionDistanceFromCenter:1,attributionWeight:0.025,attributionTheme:\"light\",interactionHandler:v.ii()?\"hammerjs\":\"builtin\",onModelChanging:[],onModelChanged:[],onRedraw:[],onRolloutStart:[],onRolloutComplete:[],onRelaxationStep:[],onViewReset:[],onGroupOpenOrCloseChanging:[],onGroupOpenOrCloseChanged:[],onGroupExposureChanging:[],onGroupExposureChanged:[],onGroupSelectionChanging:[],onGroupSelectionChanged:[],\nonGroupHover:[],onGroupMouseMove:[],onGroupClick:[],onGroupDoubleClick:[],onGroupHold:[],onGroupMouseWheel:[],onGroupMouseUp:[],onGroupMouseDown:[],onGroupDragStart:[],onGroupDrag:[],onGroupDragEnd:[],onGroupTransformStart:[],onGroupTransform:[],onGroupTransformEnd:[],onKeyUp:[],selection:null,open:null,exposure:null,imageData:null,hierarchy:null,geometry:null,containerCoordinates:null,state:null,viewport:null,times:null});window.CarrotSearchFoamTree.geometry=Object.freeze(function(){return{rectangleInPolygon:function(a,\nm,k,f,c,d,g){c=D.B(c,1);d=D.B(d,0.5);g=D.B(g,0.5);a=M.se(a,{x:m,y:k},f,d,g)*c;return{x:m-a*f*d,y:k-a*g,w:a*f,h:a}},circleInPolygon:function(a,m,k){return M.Dg(a,{x:m,y:k})},stabPolygon:function(a,m,k,f){return M.Wb(a,{x:m,y:k},f)},polygonCentroid:function(a){a=M.k(a,{});return{x:a.x,y:a.y,area:a.ja}},boundingBox:function(a){for(var m=a[0].x,k=a[0].y,f=a[0].x,c=a[0].y,d=1;d<a.length;d++){var g=a[d];g.x<m&&(m=g.x);g.y<k&&(k=g.y);g.x>f&&(f=g.x);g.y>c&&(c=g.y)}return{x:m,y:k,w:f-m,h:c-k}}}}())},function(){window.CarrotSearchFoamTree=\nfunction(){window.console.error(\"FoamTree is not supported on this browser.\")};window.CarrotSearchFoamTree.Zj=!1});})();\n\n"
  },
  {
    "path": "packages/reporters/bundle-analyzer/index.js",
    "content": "// @flow strict-local\n\nexport * from './src/BundleAnalyzerReporter';\n"
  },
  {
    "path": "packages/reporters/bundle-analyzer/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-bundle-analyzer\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/BundleAnalyzerReporter.js\",\n  \"source\": \"src/BundleAnalyzerReporter.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"@parcel/types\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/bundle-analyzer/src/BundleAnalyzerReporter.js",
    "content": "// @flow strict-local\n\nimport type {FilePath, PackagedBundle, PluginOptions} from '@parcel/types';\n\nimport invariant from 'assert';\nimport {Reporter} from '@parcel/plugin';\nimport {DefaultMap, generateBuildMetrics} from '@parcel/utils';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\n\nexport default (new Reporter({\n  async report({event, options}) {\n    if (event.type !== 'buildSuccess') {\n      return;\n    }\n\n    let bundlesByTarget: DefaultMap<\n      string /* target name */,\n      Array<PackagedBundle>,\n    > = new DefaultMap(() => []);\n    for (let bundle of event.bundleGraph.getBundles()) {\n      bundlesByTarget.get(bundle.target.name).push(bundle);\n    }\n\n    let reportsDir = path.join(options.projectRoot, 'parcel-bundle-reports');\n    await options.outputFS.mkdirp(reportsDir);\n\n    await Promise.all(\n      [...bundlesByTarget.entries()].map(async ([targetName, bundles]) => {\n        return options.outputFS.writeFile(\n          path.join(reportsDir, `${targetName}.html`),\n          `\n          <html>\n            <head>\n              <meta charset=\"utf-8\">\n              <title>📦Parcel Bundle Analyzer | ${targetName}</title>\n              <style>\n                body {\n                  margin: 0;\n                }\n\n                .tooltip {\n                  background-color: rgba(255, 255, 255, 0.7);\n                  left: 0;\n                  padding: 20px;\n                  pointer-events: none;\n                  position: absolute;\n                  top: 0;\n                  transform: translate3d(0, 0, 0);\n                }\n\n                .tooltip-content {\n                  font-family: monospace;\n                }\n\n                .tooltip-content dl div {\n                  display: flex;\n                }\n\n                .tooltip-title {\n                  font-size: 18px;\n                }\n              </style>\n              <script>\n                ${await options.inputFS.readFile(\n                  path.resolve(\n                    __dirname,\n                    '../client/vendor/foamtree/carrotsearch.foamtree.js',\n                  ),\n                  'utf8',\n                )}\n              </script>\n              <script id=\"bundle-data\" type=\"application/json\">\n                ${JSON.stringify(await getBundleData(bundles, options))}\n              </script>\n            </head>\n            <body>\n              <script>\n                ${await options.inputFS.readFile(\n                  path.resolve(__dirname, '../client/index.js'),\n                  'utf8',\n                )}\n              </script>\n            </body>\n          </html>\n        `,\n        );\n      }),\n    );\n  },\n}): Reporter);\n\ntype BundleData = {|\n  groups: Array<Group>,\n|};\n\nasync function getBundleData(\n  bundles: Array<PackagedBundle>,\n  options: PluginOptions,\n): Promise<BundleData> {\n  let groups = await Promise.all(\n    bundles.map(bundle => getBundleNode(bundle, options)),\n  );\n  return {\n    groups,\n  };\n}\n\ntype File = {|\n  basename: string,\n  size: number,\n|};\ntype DirMapValue = File | DirMap;\ntype DirMap = DefaultMap<FilePath, DirMapValue>;\nlet createMap: () => DirMap = () => new DefaultMap(() => createMap());\n\nasync function getBundleNode(bundle: PackagedBundle, options: PluginOptions) {\n  let buildMetrics = await generateBuildMetrics(\n    [bundle],\n    options.outputFS,\n    options.projectRoot,\n  );\n  let bundleData = buildMetrics.bundles[0];\n  let dirMap = createMap();\n  for (let asset of bundleData.assets) {\n    let relativePath = path.relative(options.projectRoot, asset.filePath);\n    let parts = relativePath.split(path.sep);\n    let dirs = parts.slice(0, parts.length - 1);\n    let basename = path.basename(asset.filePath);\n\n    let map = dirMap;\n    for (let dir of dirs) {\n      invariant(map instanceof DefaultMap);\n      map = map.get(dir);\n    }\n\n    invariant(map instanceof DefaultMap);\n    map.set(basename, {\n      basename,\n      size: asset.size,\n    });\n  }\n\n  return {\n    label: path.relative(options.projectRoot, bundle.filePath),\n    weight: bundle.stats.size,\n    groups: generateGroups(dirMap),\n  };\n}\n\ntype Group = {|\n  label: string,\n  weight: number,\n  groups?: Array<Group>,\n|};\n\nfunction generateGroups(dirMap: DirMap): Array<Group> {\n  let groups = [];\n\n  for (let [directoryName, contents] of dirMap) {\n    if (contents instanceof DefaultMap) {\n      let childrenGroups = generateGroups(contents);\n      if (childrenGroups.length === 1) {\n        let firstChild = childrenGroups[0];\n        groups.push({\n          ...firstChild,\n          label: path.join(directoryName, firstChild.label),\n        });\n      } else {\n        groups.push({\n          label: directoryName,\n          weight: childrenGroups.reduce(\n            (acc, g) => acc + nullthrows(g.weight),\n            0,\n          ),\n          groups: childrenGroups,\n        });\n      }\n    } else {\n      // file\n      groups.push({\n        label:\n          contents.basename === ''\n            ? 'Code from unknown source files'\n            : contents.basename,\n        weight: contents.size,\n      });\n    }\n  }\n\n  return groups;\n}\n"
  },
  {
    "path": "packages/reporters/bundle-buddy/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-bundle-buddy\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/BundleBuddyReporter.js\",\n  \"source\": \"src/BundleBuddyReporter.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/bundle-buddy/src/BundleBuddyReporter.js",
    "content": "// @flow strict-local\nimport type {PackagedBundle} from '@parcel/types';\nimport {Reporter} from '@parcel/plugin';\nimport path from 'path';\n\nexport default (new Reporter({\n  async report({event, options, logger}) {\n    if (event.type !== 'buildSuccess') {\n      return;\n    }\n\n    let bundlesByTarget: Map<string, Array<PackagedBundle>> = new Map();\n    for (let bundle of event.bundleGraph.getBundles()) {\n      let bundles = bundlesByTarget.get(bundle.target.distDir);\n      if (!bundles) {\n        bundles = [];\n        bundlesByTarget.set(bundle.target.distDir, bundles);\n      }\n\n      bundles.push(bundle);\n    }\n\n    for (let [targetDir, bundles] of bundlesByTarget) {\n      let out = [];\n\n      for (let bundle of bundles) {\n        bundle.traverseAssets(asset => {\n          let deps = event.bundleGraph.getDependencies(asset);\n          for (let dep of deps) {\n            let resolved = event.bundleGraph.getResolvedAsset(dep);\n            if (!resolved) {\n              continue;\n            }\n\n            out.push({\n              source: path.relative(options.projectRoot, asset.filePath),\n              target: path.relative(options.projectRoot, resolved.filePath),\n            });\n          }\n        });\n      }\n\n      await options.outputFS.writeFile(\n        path.join(targetDir, 'bundle-buddy.json'),\n        JSON.stringify(out),\n      );\n      logger.info({\n        message: `Wrote report to ${path.relative(\n          options.outputFS.cwd(),\n          path.join(targetDir, 'bundle-buddy.json'),\n        )}`,\n      });\n    }\n  },\n}): Reporter);\n"
  },
  {
    "path": "packages/reporters/bundle-stats/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-bundle-stats\",\n  \"version\": \"2.16.4\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"main\": \"lib/BundleStatsReporter.js\",\n  \"source\": \"src/BundleStatsReporter.js\",\n  \"bin\": {\n    \"parcel-bundle-stats\": \"bin.js\"\n  },\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/core\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  },\n  \"devDependencies\": {\n    \"@parcel/types\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/bundle-stats/src/BundleStatsReporter.js",
    "content": "// @flow strict-local\n\nimport type {PackagedBundle, PluginOptions} from '@parcel/types';\n\nimport {Reporter} from '@parcel/plugin';\nimport {DefaultMap} from '@parcel/utils';\n\nimport assert from 'assert';\nimport path from 'path';\n\nexport type AssetStat = {|\n  size: number,\n  name: string,\n  bundles: Array<string>,\n|};\n\nexport type BundleStat = {|\n  size: number,\n  id: string,\n  assets: Array<string>,\n|};\n\nexport type BundleStats = {|\n  bundles: {[key: string]: BundleStat},\n  assets: {[key: string]: AssetStat},\n|};\n\nexport default (new Reporter({\n  async report({event, options}) {\n    if (event.type !== 'buildSuccess') {\n      return;\n    }\n\n    let bundlesByTarget: DefaultMap<\n      string /* target name */,\n      Array<PackagedBundle>,\n    > = new DefaultMap(() => []);\n    for (let bundle of event.bundleGraph.getBundles()) {\n      bundlesByTarget.get(bundle.target.name).push(bundle);\n    }\n\n    let reportsDir = path.join(options.projectRoot, 'parcel-bundle-reports');\n    await options.outputFS.mkdirp(reportsDir);\n\n    await Promise.all(\n      [...bundlesByTarget.entries()].map(([targetName, bundles]) =>\n        options.outputFS.writeFile(\n          path.join(reportsDir, `${targetName}-stats.json`),\n          JSON.stringify(getBundleStats(bundles, options), null, 2),\n        ),\n      ),\n    );\n  },\n}): Reporter);\n\nexport function getBundleStats(\n  bundles: Array<PackagedBundle>,\n  options: PluginOptions,\n): BundleStats {\n  let bundlesByName = new Map<string, BundleStat>();\n  let assetsById = new Map<string, AssetStat>();\n\n  // let seen = new Map();\n\n  for (let bundle of bundles) {\n    let bundleName = path.relative(options.projectRoot, bundle.filePath);\n\n    // If we've already seen this bundle, we can skip it... right?\n    if (bundlesByName.has(bundleName)) {\n      // Sanity check: this is the same bundle, right?\n      assert(bundlesByName.get(bundleName)?.size === bundle.stats.size);\n      continue;\n    }\n\n    let assets = [];\n    bundle.traverseAssets(({id, filePath, stats: {size}}) => {\n      assets.push(id);\n      let assetName = path.relative(options.projectRoot, filePath);\n      if (assetsById.has(id)) {\n        assert(assetsById.get(id)?.name === assetName);\n        assert(assetsById.get(id)?.size === size);\n        assetsById.get(id)?.bundles.push(bundleName);\n      } else {\n        assetsById.set(id, {name: assetName, size, bundles: [bundleName]});\n      }\n    });\n\n    bundlesByName.set(bundleName, {\n      id: bundle.id,\n      size: bundle.stats.size,\n      assets,\n    });\n  }\n\n  return {\n    bundles: Object.fromEntries(bundlesByName),\n    assets: Object.fromEntries(assetsById),\n  };\n}\n"
  },
  {
    "path": "packages/reporters/cli/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-cli\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/CLIReporter.js\",\n  \"source\": \"src/CLIReporter.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"targets\": {\n    \"main\": {\n      \"includeNodeModules\": {\n        \"@parcel/plugin\": false,\n        \"@parcel/types\": false,\n        \"@parcel/utils\": false,\n        \"chalk\": false,\n        \"term-size\": false\n      }\n    }\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"chalk\": \"^4.1.2\",\n    \"term-size\": \"^2.2.1\"\n  },\n  \"devDependencies\": {\n    \"@parcel/feature-flags\": \"2.16.4\",\n    \"filesize\": \"^10.1.6\",\n    \"nullthrows\": \"^1.1.1\",\n    \"ora\": \"^5.4.1\",\n    \"string-width\": \"^4.2.3\",\n    \"wrap-ansi\": \"^7.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/cli/src/CLIReporter.js",
    "content": "// @flow\nimport type {ReporterEvent, PluginOptions} from '@parcel/types';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {Color} from 'chalk';\n\nimport {Reporter} from '@parcel/plugin';\nimport {\n  getProgressMessage,\n  prettifyTime,\n  prettyDiagnostic,\n  throttle,\n} from '@parcel/utils';\nimport chalk from 'chalk';\n\nimport {getTerminalWidth} from './utils';\nimport logLevels from './logLevels';\nimport bundleReport from './bundleReport';\nimport phaseReport from './phaseReport';\nimport {\n  writeOut,\n  updateSpinner,\n  persistSpinner,\n  isTTY,\n  resetWindow,\n  persistMessage,\n} from './render';\nimport * as emoji from './emoji';\nimport wrapAnsi from 'wrap-ansi';\n\nconst THROTTLE_DELAY = 100;\nconst seenWarnings = new Set();\nconst seenPhases = new Set();\nconst seenPhasesGen = new Set();\n\nlet phaseStartTimes = {};\nlet pendingIncrementalBuild = false;\n\nlet statusThrottle = throttle((message: string) => {\n  updateSpinner(message);\n}, THROTTLE_DELAY);\n\n// Exported only for test\nexport async function _report(\n  event: ReporterEvent,\n  options: PluginOptions,\n): Promise<void> {\n  let logLevelFilter = logLevels[options.logLevel || 'info'];\n\n  switch (event.type) {\n    case 'buildStart': {\n      seenWarnings.clear();\n      seenPhases.clear();\n      if (logLevelFilter < logLevels.info) {\n        break;\n      }\n\n      // Clear any previous output\n      resetWindow();\n\n      break;\n    }\n    case 'buildProgress': {\n      if (logLevelFilter < logLevels.info) {\n        break;\n      }\n\n      if (pendingIncrementalBuild) {\n        pendingIncrementalBuild = false;\n        phaseStartTimes = {};\n        seenPhasesGen.clear();\n        seenPhases.clear();\n      }\n\n      if (!seenPhasesGen.has(event.phase)) {\n        phaseStartTimes[event.phase] = Date.now();\n        seenPhasesGen.add(event.phase);\n      }\n\n      if (!isTTY && logLevelFilter != logLevels.verbose) {\n        if (event.phase == 'transforming' && !seenPhases.has('transforming')) {\n          updateSpinner('Building...');\n        } else if (event.phase == 'bundling' && !seenPhases.has('bundling')) {\n          updateSpinner('Bundling...');\n        } else if (\n          (event.phase == 'packaging' || event.phase == 'optimizing') &&\n          !seenPhases.has('packaging') &&\n          !seenPhases.has('optimizing')\n        ) {\n          updateSpinner('Packaging & Optimizing...');\n        }\n        seenPhases.add(event.phase);\n        break;\n      }\n\n      let message = getProgressMessage(event);\n      if (message != null) {\n        if (isTTY) {\n          statusThrottle(chalk.gray.bold(message));\n        } else {\n          updateSpinner(message);\n        }\n      }\n      break;\n    }\n    case 'buildSuccess':\n      if (logLevelFilter < logLevels.info) {\n        break;\n      }\n\n      phaseStartTimes['buildSuccess'] = Date.now();\n\n      if (\n        options.serveOptions &&\n        event.bundleGraph\n          .getEntryBundles()\n          .some(b => b.env.isBrowser() || b.type === 'html')\n      ) {\n        persistMessage(\n          chalk.blue.bold(\n            `Server running at ${\n              options.serveOptions.https ? 'https' : 'http'\n            }://${options.serveOptions.host ?? 'localhost'}:${\n              options.serveOptions.port\n            }`,\n          ),\n        );\n      }\n\n      persistSpinner(\n        'buildProgress',\n        'success',\n        chalk.green.bold(`Built in ${prettifyTime(event.buildTime)}`),\n      );\n\n      if (options.mode === 'production') {\n        await bundleReport(\n          event.bundleGraph,\n          options.outputFS,\n          options.projectRoot,\n          options.detailedReport?.assetsPerBundle,\n        );\n      } else {\n        pendingIncrementalBuild = true;\n      }\n\n      if (process.env.PARCEL_SHOW_PHASE_TIMES) {\n        phaseReport(phaseStartTimes);\n      }\n      break;\n    case 'buildFailure':\n      if (logLevelFilter < logLevels.error) {\n        break;\n      }\n\n      resetWindow();\n\n      persistSpinner('buildProgress', 'error', chalk.red.bold('Build failed.'));\n\n      await writeDiagnostic(options, event.diagnostics, 'red', true);\n      break;\n    case 'cache':\n      if (event.size > 500000) {\n        switch (event.phase) {\n          case 'start':\n            updateSpinner('Writing cache to disk');\n            break;\n          case 'end':\n            persistSpinner(\n              'cache',\n              'success',\n              chalk.grey.bold(`Cache written to disk`),\n            );\n            break;\n        }\n      }\n      break;\n    case 'log': {\n      if (logLevelFilter < logLevels[event.level]) {\n        break;\n      }\n\n      switch (event.level) {\n        case 'success':\n          writeOut(chalk.green(event.message));\n          break;\n        case 'progress':\n          writeOut(event.message);\n          break;\n        case 'verbose':\n        case 'info':\n          await writeDiagnostic(options, event.diagnostics, 'blue');\n          break;\n        case 'warn':\n          if (\n            event.diagnostics.some(\n              diagnostic => !seenWarnings.has(diagnostic.message),\n            )\n          ) {\n            await writeDiagnostic(options, event.diagnostics, 'yellow', true);\n            for (let diagnostic of event.diagnostics) {\n              seenWarnings.add(diagnostic.message);\n            }\n          }\n          break;\n        case 'error':\n          await writeDiagnostic(options, event.diagnostics, 'red', true);\n          break;\n        default:\n          throw new Error('Unknown log level ' + event.level);\n      }\n    }\n  }\n}\n\nasync function writeDiagnostic(\n  options: PluginOptions,\n  diagnostics: Array<Diagnostic>,\n  color: Color,\n  isError: boolean = false,\n) {\n  let columns = getTerminalWidth().columns;\n  let indent = 2;\n  let spaceAfter = isError;\n  for (let diagnostic of diagnostics) {\n    let {message, stack, codeframe, hints, documentation} =\n      await prettyDiagnostic(diagnostic, options, columns - indent);\n    // $FlowFixMe[incompatible-use]\n    message = chalk[color](message);\n\n    if (spaceAfter) {\n      writeOut('');\n    }\n\n    if (message) {\n      writeOut(wrapWithIndent(message), isError);\n    }\n\n    if (stack || codeframe) {\n      writeOut('');\n    }\n\n    if (stack) {\n      writeOut(chalk.gray(wrapWithIndent(stack, indent)), isError);\n    }\n\n    if (codeframe) {\n      writeOut(indentString(codeframe, indent), isError);\n    }\n\n    if ((stack || codeframe) && (hints.length > 0 || documentation)) {\n      writeOut('');\n    }\n\n    // Write hints\n    let hintIndent = stack || codeframe ? indent : 0;\n    for (let hint of hints) {\n      writeOut(\n        wrapWithIndent(\n          `${emoji.hint} ${chalk.blue.bold(hint)}`,\n          hintIndent + 3,\n          hintIndent,\n        ),\n      );\n    }\n\n    if (documentation) {\n      writeOut(\n        wrapWithIndent(\n          `${emoji.docs} ${chalk.magenta.bold(documentation)}`,\n          hintIndent + 3,\n          hintIndent,\n        ),\n      );\n    }\n\n    spaceAfter = stack || codeframe || hints.length > 0 || documentation;\n  }\n\n  if (spaceAfter) {\n    writeOut('');\n  }\n}\n\nfunction wrapWithIndent(string, indent = 0, initialIndent = indent) {\n  let width = getTerminalWidth().columns;\n  return indentString(\n    wrapAnsi(string.trimEnd(), width - indent, {trim: false}),\n    indent,\n    initialIndent,\n  );\n}\n\nfunction indentString(string, indent = 0, initialIndent = indent) {\n  return (\n    ' '.repeat(initialIndent) + string.replace(/\\n/g, '\\n' + ' '.repeat(indent))\n  );\n}\n\nexport default (new Reporter({\n  report({event, options}) {\n    return _report(event, options);\n  },\n}): Reporter);\n"
  },
  {
    "path": "packages/reporters/cli/src/bundleReport.js",
    "content": "// @flow\nimport type {BundleGraph, FilePath, PackagedBundle} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\n\nimport {generateBuildMetrics, prettifyTime} from '@parcel/utils';\nimport {filesize} from 'filesize';\nimport chalk from 'chalk';\nimport nullthrows from 'nullthrows';\n\nimport * as emoji from './emoji';\nimport {writeOut, table} from './render';\nimport {formatFilename} from './utils';\n\nconst LARGE_BUNDLE_SIZE = 1024 * 1024;\nconst COLUMNS = [\n  {align: 'left'}, // name\n  {align: 'right'}, // size\n  {align: 'right'}, // time\n];\n\nexport default async function bundleReport(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  fs: FileSystem,\n  projectRoot: FilePath,\n  assetCount: number = 0,\n) {\n  let bundleList = bundleGraph.getBundles();\n\n  // Get a list of bundles sorted by size\n  let {bundles} =\n    assetCount > 0\n      ? await generateBuildMetrics(bundleList, fs, projectRoot)\n      : {\n          bundles: bundleList.map(b => {\n            return {\n              filePath: nullthrows(b.filePath),\n              size: b.stats.size,\n              time: b.stats.time,\n              assets: [],\n            };\n          }),\n        };\n  let rows = [];\n\n  for (let bundle of bundles) {\n    // Add a row for the bundle\n    rows.push([\n      formatFilename(bundle.filePath || '', chalk.cyan.bold),\n      chalk.bold(prettifySize(bundle.size, bundle.size > LARGE_BUNDLE_SIZE)),\n      chalk.green.bold(prettifyTime(bundle.time)),\n    ]);\n\n    if (assetCount > 0) {\n      let largestAssets = bundle.assets.slice(0, assetCount);\n      for (let asset of largestAssets) {\n        let columns: Array<string> = [\n          asset == largestAssets[largestAssets.length - 1] ? '└── ' : '├── ',\n          chalk.dim(prettifySize(asset.size)),\n          chalk.dim(chalk.green(prettifyTime(asset.time))),\n        ];\n\n        if (asset.filePath !== '') {\n          columns[0] += formatFilename(asset.filePath, chalk.reset);\n        } else {\n          columns[0] += 'Code from unknown sourcefiles';\n        }\n\n        // Add a row for the asset.\n        rows.push(columns);\n      }\n\n      if (bundle.assets.length > largestAssets.length) {\n        rows.push([\n          '└── ' +\n            chalk.dim(\n              `+ ${bundle.assets.length - largestAssets.length} more assets`,\n            ),\n        ]);\n      }\n\n      // If this isn't the last bundle, add an empty row before the next one\n      if (bundle !== bundles[bundles.length - 1]) {\n        rows.push([]);\n      }\n    }\n  }\n\n  // Render table\n  writeOut('');\n  table(COLUMNS, rows);\n}\n\nfunction prettifySize(size, isLarge) {\n  let res = filesize(size);\n  if (isLarge) {\n    return chalk.yellow(emoji.warning + '  ' + res);\n  }\n  return chalk.magenta(res);\n}\n"
  },
  {
    "path": "packages/reporters/cli/src/emoji.js",
    "content": "// @flow strict-local\n\n// From https://github.com/sindresorhus/is-unicode-supported/blob/8f123916d5c25a87c4f966dcc248b7ca5df2b4ca/index.js\n// This package is ESM-only so it has to be vendored\nfunction isUnicodeSupported() {\n  if (process.platform !== 'win32') {\n    return process.env.TERM !== 'linux'; // Linux console (kernel)\n  }\n\n  return (\n    Boolean(process.env.CI) ||\n    Boolean(process.env.WT_SESSION) || // Windows Terminal\n    process.env.ConEmuTask === '{cmd::Cmder}' || // ConEmu and cmder\n    process.env.TERM_PROGRAM === 'vscode' ||\n    process.env.TERM === 'xterm-256color' ||\n    process.env.TERM === 'alacritty'\n  );\n}\n\nconst supportsEmoji = isUnicodeSupported();\n\n// Fallback symbols for Windows from https://en.wikipedia.org/wiki/Code_page_437\nexport const progress: string = supportsEmoji ? '⏳' : '∞';\nexport const success: string = supportsEmoji ? '✨' : '√';\nexport const error: string = supportsEmoji ? '🚨' : '×';\nexport const warning: string = supportsEmoji ? '⚠️' : '‼';\nexport const info: string = supportsEmoji ? 'ℹ️' : 'ℹ';\nexport const hint: string = supportsEmoji ? '💡' : 'ℹ';\nexport const docs: string = supportsEmoji ? '📝' : 'ℹ';\n"
  },
  {
    "path": "packages/reporters/cli/src/logLevels.js",
    "content": "// @flow strict-local\n\nconst logLevels = {\n  none: 0,\n  error: 1,\n  warn: 2,\n  info: 3,\n  progress: 3,\n  success: 3,\n  verbose: 4,\n};\n\nexport default logLevels;\n"
  },
  {
    "path": "packages/reporters/cli/src/phaseReport.js",
    "content": "// @flow\nimport {prettifyTime} from '@parcel/utils';\nimport chalk from 'chalk';\nimport {writeOut} from './render';\nimport invariant from 'assert';\n\nexport default function phaseReport(phaseStartTimes: {[string]: number}) {\n  let phaseTimes = {};\n  if (phaseStartTimes['transforming'] && phaseStartTimes['bundling']) {\n    phaseTimes['Transforming'] =\n      phaseStartTimes['bundling'] - phaseStartTimes['transforming'];\n  }\n\n  let packagingAndOptimizing =\n    phaseStartTimes['packaging'] && phaseStartTimes['optimizing']\n      ? Math.min(phaseStartTimes['packaging'], phaseStartTimes['optimizing'])\n      : phaseStartTimes['packaging'] || phaseStartTimes['optimizing'];\n\n  if (phaseStartTimes['bundling'] && packagingAndOptimizing) {\n    phaseTimes['Bundling'] =\n      packagingAndOptimizing - phaseStartTimes['bundling'];\n  }\n\n  if (packagingAndOptimizing && phaseStartTimes['buildSuccess']) {\n    phaseTimes['Packaging & Optimizing'] =\n      phaseStartTimes['buildSuccess'] - packagingAndOptimizing;\n  }\n\n  for (let [phase, time] of Object.entries(phaseTimes)) {\n    invariant(typeof time === 'number');\n    writeOut(chalk.green.bold(`${phase} finished in ${prettifyTime(time)}`));\n  }\n}\n"
  },
  {
    "path": "packages/reporters/cli/src/render.js",
    "content": "// @flow\nimport type {Writable} from 'stream';\n\nimport readline from 'readline';\nimport ora from 'ora';\nimport stringWidth from 'string-width';\n\nimport type {PadAlign} from './utils';\nimport {pad, countLines} from './utils';\nimport * as emoji from './emoji';\n\ntype ColumnType = {|\n  align: PadAlign,\n|};\n\nexport const isTTY: any | boolean | true =\n  // $FlowFixMe\n  process.env.NODE_ENV !== 'test' && process.stdout.isTTY;\n\nlet stdout = process.stdout;\nlet stderr = process.stderr;\n\n// Some state so we clear the output properly\nlet lineCount = 0;\nlet errorLineCount = 0;\nlet statusPersisted = false;\n\nexport function _setStdio(stdoutLike: Writable, stderrLike: Writable) {\n  stdout = stdoutLike;\n  stderr = stderrLike;\n}\n\nlet spinner = ora({\n  color: 'green',\n  stream: stdout,\n  discardStdin: false,\n});\nlet persistedMessages = [];\n\nexport function writeOut(message: string, isError: boolean = false) {\n  let processedMessage = message + '\\n';\n  let hasSpinner = spinner.isSpinning;\n\n  // Stop spinner so we don't duplicate it\n  if (hasSpinner) {\n    spinner.stop();\n  }\n\n  let lines = countLines(message);\n  if (isError) {\n    stderr.write(processedMessage);\n    errorLineCount += lines;\n  } else {\n    stdout.write(processedMessage);\n    lineCount += lines;\n  }\n\n  // Restart the spinner\n  if (hasSpinner) {\n    spinner.start();\n  }\n}\n\nexport function persistMessage(message: string) {\n  if (persistedMessages.includes(message)) return;\n\n  persistedMessages.push(message);\n  writeOut(message);\n}\n\nexport function updateSpinner(message: string) {\n  // This helps the spinner play well with the tests\n  if (!isTTY) {\n    writeOut(message);\n    return;\n  }\n\n  spinner.text = message + '\\n';\n  if (!spinner.isSpinning) {\n    spinner.start();\n  }\n}\n\nexport function persistSpinner(\n  name: string,\n  status: 'success' | 'error',\n  message: string,\n) {\n  spinner.stopAndPersist({\n    symbol: emoji[status],\n    text: message,\n  });\n\n  statusPersisted = true;\n}\n\nfunction clearStream(stream: Writable, lines: number) {\n  if (!isTTY) return;\n\n  readline.moveCursor(stream, 0, -lines);\n  readline.clearScreenDown(stream);\n}\n\n// Reset the window's state\nexport function resetWindow() {\n  if (!isTTY) return;\n\n  // If status has been persisted we add a line\n  // Otherwise final states would remain in the terminal for rebuilds\n  if (statusPersisted) {\n    lineCount++;\n    statusPersisted = false;\n  }\n\n  clearStream(stderr, errorLineCount);\n  errorLineCount = 0;\n\n  clearStream(stdout, lineCount);\n  lineCount = 0;\n\n  for (let m of persistedMessages) {\n    writeOut(m);\n  }\n}\n\nexport function table(columns: Array<ColumnType>, table: Array<Array<string>>) {\n  // Measure column widths\n  let colWidths = [];\n  for (let row of table) {\n    let i = 0;\n    for (let item of row) {\n      colWidths[i] = Math.max(colWidths[i] || 0, stringWidth(item));\n      i++;\n    }\n  }\n\n  // Render rows\n  for (let row of table) {\n    let items = row.map((item, i) => {\n      // Add padding between columns unless the alignment is the opposite to the\n      // next column and pad to the column width.\n      let padding =\n        !columns[i + 1] || columns[i + 1].align === columns[i].align ? 4 : 0;\n      return pad(item, colWidths[i] + padding, columns[i].align);\n    });\n\n    writeOut(items.join(''));\n  }\n}\n"
  },
  {
    "path": "packages/reporters/cli/src/utils.js",
    "content": "// @flow\nimport path from 'path';\nimport chalk from 'chalk';\nimport stringWidth from 'string-width';\nimport termSize from 'term-size';\nimport {stripAnsi} from '@parcel/utils';\n\nexport type PadAlign = 'left' | 'right';\nlet terminalSize = termSize();\nprocess.stdout.on('resize', function () {\n  terminalSize = termSize();\n});\n\nexport function getTerminalWidth(): any {\n  return terminalSize;\n}\n\n// Pad a string with spaces on either side\nexport function pad(\n  text: string,\n  length: number,\n  align: PadAlign = 'left',\n): string {\n  let pad = ' '.repeat(length - stringWidth(text));\n  if (align === 'right') {\n    return pad + text;\n  }\n\n  return text + pad;\n}\n\nexport function formatFilename(\n  filename: string,\n  color: (s: string) => string = chalk.reset,\n): string {\n  let dir = path.relative(process.cwd(), path.dirname(filename));\n  return (\n    chalk.dim(dir + (dir ? path.sep : '')) + color(path.basename(filename))\n  );\n}\n\nexport function countLines(message: string): number {\n  let {columns} = terminalSize;\n\n  return stripAnsi(message)\n    .split('\\n')\n    .reduce((p, line) => p + Math.ceil((stringWidth(line) || 1) / columns), 0);\n}\n"
  },
  {
    "path": "packages/reporters/cli/test/CLIReporter.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport sinon from 'sinon';\nimport {PassThrough} from 'stream';\nimport {_report} from '../src/CLIReporter';\nimport * as render from '../src/render';\nimport {_setStdio} from '../src/render';\nimport {inputFS, outputFS} from '@parcel/test-utils';\nimport {NodePackageManager} from '@parcel/package-manager';\nimport stripAnsi from 'strip-ansi';\nimport * as bundleReport from '../src/bundleReport';\nimport {DEFAULT_FEATURE_FLAGS} from '@parcel/feature-flags';\n\nconst EMPTY_OPTIONS = {\n  cacheDir: '.parcel-cache',\n  parcelVersion: '',\n  entries: [],\n  logLevel: 'info',\n  targets: [],\n  projectRoot: '',\n  distDir: 'dist',\n  lockFile: undefined,\n  shouldAutoInstall: false,\n  shouldBuildLazily: false,\n  hmrOptions: undefined,\n  serveOptions: false,\n  mode: 'development',\n  shouldScopeHoist: false,\n  shouldOptimize: false,\n  env: {},\n  shouldDisableCache: false,\n  sourceMaps: false,\n  inputFS,\n  outputFS,\n  instanceId: 'test',\n  packageManager: new NodePackageManager(inputFS, '/'),\n  detailedReport: {\n    assetsPerBundle: 10,\n  },\n  featureFlags: DEFAULT_FEATURE_FLAGS,\n};\n\ndescribe('CLIReporter', () => {\n  let originalStdout;\n  let originalStderr;\n  let stdoutOutput;\n  let stderrOutput;\n\n  beforeEach(async () => {\n    // Stub these out to avoid writing noise to real stdio and to read from these\n    // otherwise only writable streams\n    originalStdout = process.stdout;\n    originalStderr = process.stderr;\n\n    stdoutOutput = '';\n    stderrOutput = '';\n\n    let mockStdout = new PassThrough();\n    mockStdout.on('data', d => (stdoutOutput += stripAnsi(d.toString())));\n    let mockStderr = new PassThrough();\n    mockStderr.on('data', d => (stderrOutput += stripAnsi(d.toString())));\n    _setStdio(mockStdout, mockStderr);\n\n    await _report(\n      {\n        type: 'buildStart',\n      },\n      EMPTY_OPTIONS,\n    );\n  });\n\n  afterEach(() => {\n    _setStdio(originalStdout, originalStderr);\n  });\n\n  it('writes log, info, success, and verbose log messages to stdout', async () => {\n    let options = {\n      ...EMPTY_OPTIONS,\n      logLevel: 'verbose',\n    };\n\n    await _report(\n      {\n        type: 'log',\n        level: 'info',\n        diagnostics: [\n          {\n            origin: 'test',\n            message: 'info',\n          },\n        ],\n      },\n      options,\n    );\n    await _report({type: 'log', level: 'success', message: 'success'}, options);\n    await _report(\n      {\n        type: 'log',\n        level: 'verbose',\n        diagnostics: [\n          {\n            origin: 'test',\n            message: 'verbose',\n          },\n        ],\n      },\n      options,\n    );\n\n    assert.equal(stdoutOutput, 'test: info\\nsuccess\\ntest: verbose\\n');\n  });\n\n  it('writes errors and warnings to stderr', async () => {\n    await _report(\n      {\n        type: 'log',\n        level: 'error',\n        diagnostics: [\n          {\n            origin: 'test',\n            message: 'error',\n          },\n        ],\n      },\n      EMPTY_OPTIONS,\n    );\n    await _report(\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: 'test',\n            message: 'warn',\n          },\n        ],\n      },\n      EMPTY_OPTIONS,\n    );\n\n    assert.equal(stdoutOutput, '\\n\\n');\n    assert.equal(stderrOutput, 'test: error\\ntest: warn\\n');\n  });\n\n  it('prints errors nicely', async () => {\n    await _report(\n      {\n        type: 'log',\n        level: 'error',\n        diagnostics: [\n          {\n            origin: 'test',\n            message: 'error',\n          },\n        ],\n      },\n      EMPTY_OPTIONS,\n    );\n    await _report(\n      {\n        type: 'log',\n        level: 'warn',\n        diagnostics: [\n          {\n            origin: 'test',\n            message: 'warn',\n          },\n        ],\n      },\n      EMPTY_OPTIONS,\n    );\n\n    assert.equal(stdoutOutput, '\\n\\n');\n    assert(stderrOutput.includes('test: error\\n'));\n    assert(stderrOutput.includes('test: warn\\n'));\n  });\n\n  it('writes buildProgress messages to stdout on the default loglevel', async () => {\n    await _report({type: 'buildProgress', phase: 'bundling'}, EMPTY_OPTIONS);\n    assert.equal(stdoutOutput, 'Bundling...\\n');\n  });\n\n  it('writes buildSuccess messages to stdout on the default loglevel', async () => {\n    await _report({type: 'buildProgress', phase: 'bundling'}, EMPTY_OPTIONS);\n    assert.equal(stdoutOutput, 'Bundling...\\n');\n  });\n\n  it('writes phase timings to stdout when PARCEL_SHOW_PHASE_TIMES is set', async () => {\n    let oldPhaseTimings = process.env['PARCEL_SHOW_PHASE_TIMES'];\n    const bundleReportStub = sinon.stub(bundleReport, 'default');\n    const persistSpinnerStub = sinon.stub(render, 'persistSpinner');\n\n    after(() => {\n      bundleReportStub.restore();\n      persistSpinnerStub.restore();\n      process.env['PARCEL_SHOW_PHASE_TIMES'] = oldPhaseTimings;\n    });\n\n    // emit a buildSuccess event to reset the timings and seen phases\n    // from the previous test\n    process.env['PARCEL_SHOW_PHASE_TIMES'] = undefined;\n    // $FlowFixMe\n    await _report({type: 'buildSuccess'}, EMPTY_OPTIONS);\n\n    process.env['PARCEL_SHOW_PHASE_TIMES'] = 'true';\n    await _report(\n      {type: 'buildProgress', phase: 'transforming', filePath: 'foo.js'},\n      EMPTY_OPTIONS,\n    );\n    await _report({type: 'buildProgress', phase: 'bundling'}, EMPTY_OPTIONS);\n    await _report(\n      // $FlowFixMe\n      {\n        type: 'buildProgress',\n        phase: 'packaging',\n        bundle: {\n          displayName: 'test',\n        },\n      },\n      EMPTY_OPTIONS,\n    );\n    // $FlowFixMe\n    await _report({type: 'buildSuccess'}, EMPTY_OPTIONS);\n    const expected =\n      /Building...\\nBundling...\\nPackaging & Optimizing...\\nTransforming finished in [0-9]ms\\nBundling finished in [0-9]ms\\nPackaging & Optimizing finished in [0-9]ms/;\n\n    assert.equal(expected.test(stdoutOutput), true);\n\n    stdoutOutput = '';\n\n    await _report(\n      {type: 'buildProgress', phase: 'transforming', filePath: 'foo.js'},\n      EMPTY_OPTIONS,\n    );\n    await _report({type: 'buildProgress', phase: 'bundling'}, EMPTY_OPTIONS);\n    await _report(\n      // $FlowFixMe\n      {\n        type: 'buildProgress',\n        phase: 'packaging',\n        bundle: {\n          displayName: 'test',\n        },\n      },\n      EMPTY_OPTIONS,\n    );\n    // $FlowFixMe\n    await _report({type: 'buildSuccess'}, EMPTY_OPTIONS);\n\n    assert.equal(\n      expected.test(stdoutOutput),\n      true,\n      'STDOUT output did not match',\n    );\n  });\n});\n"
  },
  {
    "path": "packages/reporters/dev-server/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-dev-server\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/ServerReporter.js\",\n  \"source\": \"src/ServerReporter.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"targets\": {\n    \"main\": {\n      \"includeNodeModules\": {\n        \"@parcel/codeframe\": false,\n        \"@parcel/plugin\": false,\n        \"@parcel/source-map\": false,\n        \"@parcel/utils\": false\n      }\n    }\n  },\n  \"dependencies\": {\n    \"@parcel/codeframe\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\"\n  },\n  \"devDependencies\": {\n    \"@parcel/babel-preset\": \"2.16.4\",\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"connect\": \"^3.7.0\",\n    \"ejs\": \"^3.1.10\",\n    \"fresh\": \"^0.5.2\",\n    \"http-proxy-middleware\": \"^2.0.9\",\n    \"launch-editor\": \"^2.10.0\",\n    \"mime-types\": \"2.1.18\",\n    \"nullthrows\": \"^1.1.1\",\n    \"serve-handler\": \"^6.1.6\",\n    \"ws\": \"^8.18.2\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/dev-server/src/HMRServer.js",
    "content": "// @flow\nimport type {\n  Asset,\n  Dependency,\n  PluginOptions,\n  BuildSuccessEvent,\n  BundledProgressEvent,\n} from '@parcel/types';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {AnsiDiagnosticResult} from '@parcel/utils';\nimport type {\n  ServerError,\n  HMRServerOptions,\n  Request,\n  Response,\n} from './types.js.flow';\nimport {setHeaders, SOURCES_ENDPOINT} from './Server';\n\nimport nullthrows from 'nullthrows';\nimport url, {fileURLToPath} from 'url';\nimport path from 'path';\nimport mime from 'mime-types';\nimport WebSocket from 'ws';\nimport invariant from 'assert';\nimport {Readable} from 'stream';\nimport {\n  ansiHtml,\n  createHTTPServer,\n  prettyDiagnostic,\n  PromiseQueue,\n  isDirectoryInside,\n  normalizeSeparators,\n} from '@parcel/utils';\nimport SourceMap from '@parcel/source-map';\nimport formatCodeFrame from '@parcel/codeframe';\nimport launchEditor from 'launch-editor';\n\nexport type HMRAsset = {|\n  id: string,\n  url: string,\n  type: string,\n  output: string,\n  envHash: string,\n  outputFormat: string,\n  depsByBundle: {[string]: {[string]: string, ...}, ...},\n|};\n\nexport type HMRMessage =\n  | {|\n      type: 'update',\n      assets: Array<HMRAsset>,\n    |}\n  | {|\n      type: 'reload',\n    |}\n  | {|\n      type: 'error',\n      diagnostics: {|\n        ansi: Array<AnsiDiagnosticResult>,\n        html: Array<$Rest<AnsiDiagnosticResult, {|codeframe: string|}>>,\n      |},\n    |};\n\nconst FS_CONCURRENCY = 64;\nconst HMR_ENDPOINT = '/__parcel_hmr';\nconst CODEFRAME_ENDPOINT = '/__parcel_code_frame';\nconst SOURCEMAP_ENDPOINT = '/__parcel_source_map';\nconst EDITOR_ENDPOINT = '/__parcel_launch_editor';\nconst BROADCAST_MAX_ASSETS = 10000;\n\nexport default class HMRServer {\n  wss: WebSocket.Server;\n  unresolvedError: HMRMessage | null = null;\n  options: HMRServerOptions;\n  event: BundledProgressEvent | BuildSuccessEvent | null = null;\n  stopServer: ?() => Promise<void>;\n  pending: boolean = true;\n  pendingRequests: Array<[Request, Response]> = [];\n\n  constructor(options: HMRServerOptions) {\n    this.options = options;\n  }\n\n  buildStart() {\n    this.pending = true;\n  }\n\n  buildSuccess(event: BuildSuccessEvent) {\n    this.pending = false;\n    this.event = event;\n\n    if (this.pendingRequests.length > 0) {\n      let pendingRequests = this.pendingRequests;\n      this.pendingRequests = [];\n      for (let [req, res] of pendingRequests) {\n        if (!this.handle(req, res)) {\n          res.statusCode = 404;\n          res.end();\n        }\n      }\n    }\n  }\n\n  async start() {\n    let server = this.options.devServer;\n    if (!server) {\n      let result = await createHTTPServer({\n        https: this.options.https,\n        inputFS: this.options.inputFS,\n        outputFS: this.options.outputFS,\n        cacheDir: this.options.cacheDir,\n        listener: (req, res) => {\n          setHeaders(res, this.options.cors ?? true);\n          if (req.method === 'OPTIONS') {\n            res.statusCode = 200;\n            res.end();\n            return;\n          }\n          if (!this.handle(req, res)) {\n            res.statusCode = 404;\n            res.end();\n          }\n        },\n      });\n      server = result.server;\n      server.listen(this.options.port, this.options.host);\n      this.stopServer = result.stop;\n    } else {\n      this.options.addMiddleware?.((req, res) => this.handle(req, res));\n    }\n    this.wss = new WebSocket.Server({server});\n\n    this.wss.on('connection', ws => {\n      if (this.unresolvedError) {\n        ws.send(JSON.stringify(this.unresolvedError));\n      }\n    });\n\n    // $FlowFixMe[incompatible-exact]\n    this.wss.on('error', err => this.handleSocketError(err));\n  }\n\n  handle(req: Request, res: Response): boolean {\n    let {pathname, query} = url.parse(req.originalUrl || req.url);\n    if (pathname != null && pathname.startsWith(HMR_ENDPOINT)) {\n      let id = pathname.slice(HMR_ENDPOINT.length + 1);\n      let bundleGraph = nullthrows(this.event).bundleGraph;\n      let asset = bundleGraph.getAssetById(id);\n      this.getHotAssetContents(asset).then(output => {\n        res.setHeader('Content-Type', mime.contentType(asset.type));\n        res.end(output);\n      });\n      return true;\n    } else if (\n      pathname?.startsWith(CODEFRAME_ENDPOINT) &&\n      req.method === 'POST'\n    ) {\n      if (this.pending) {\n        this.pendingRequests.push([req, res]);\n      } else {\n        this.serveCodeFrame(req, res);\n      }\n      return true;\n    } else if (pathname?.startsWith(SOURCEMAP_ENDPOINT)) {\n      if (this.pending) {\n        this.pendingRequests.push([req, res]);\n      } else {\n        let qs = new URLSearchParams(query || '');\n        let filename = qs.get('filename');\n        if (!filename) {\n          return false;\n        }\n        this.getSourceMapContents(filename).then(\n          map => {\n            res.setHeader('Content-Type', 'application/json');\n            res.end(map);\n          },\n          () => {\n            res.statusCode = 500;\n            res.end();\n          },\n        );\n      }\n      return true;\n    } else if (pathname?.startsWith(EDITOR_ENDPOINT) && query) {\n      let qs = new URLSearchParams(query);\n      let file = qs.get('file');\n      if (file) {\n        // File location might start with /__parcel_source_root if it came from a source map.\n        if (file.startsWith(SOURCES_ENDPOINT)) {\n          file = file.slice(SOURCES_ENDPOINT.length + 1);\n        } else if (!path.isAbsolute(file)) {\n          file = path.join(this.options.projectRoot, file);\n        }\n        launchEditor(file);\n      }\n      res.end();\n      return true;\n    }\n    return false;\n  }\n\n  async stop() {\n    if (this.stopServer != null) {\n      await this.stopServer();\n      this.stopServer = null;\n    }\n    this.wss.close();\n    for (const ws of this.wss.clients) {\n      ws.terminate();\n    }\n  }\n\n  async emitError(options: PluginOptions, diagnostics: Array<Diagnostic>) {\n    let renderedDiagnostics = await Promise.all(\n      diagnostics.map(d => prettyDiagnostic(d, options)),\n    );\n\n    // store the most recent error so we can notify new connections\n    // and so we can broadcast when the error is resolved\n    this.unresolvedError = {\n      type: 'error',\n      diagnostics: {\n        ansi: renderedDiagnostics,\n        html: renderedDiagnostics.map((d, i) => {\n          return {\n            message: ansiHtml(d.message),\n            stack: ansiHtml(d.stack),\n            frames: d.frames.map(f => ({\n              location: f.location,\n              code: ansiHtml(f.code),\n            })),\n            hints: d.hints.map(hint => ansiHtml(hint)),\n            documentation: diagnostics[i].documentationURL ?? '',\n          };\n        }),\n      },\n    };\n\n    this.broadcast(this.unresolvedError);\n  }\n\n  async getUpdate(\n    event: BundledProgressEvent | BuildSuccessEvent,\n  ): Promise<?HMRMessage> {\n    this.unresolvedError = null;\n    this.event = event;\n\n    let changedAssets = new Set(event.changedAssets.values());\n    if (changedAssets.size === 0) return Promise.resolve(null);\n\n    let queue = new PromiseQueue({maxConcurrent: FS_CONCURRENCY});\n    for (let asset of changedAssets) {\n      if (asset.type !== 'js' && asset.type !== 'css') {\n        // If all of the incoming dependencies of the asset actually resolve to a JS asset\n        // rather than the original, we can mark the runtimes as changed instead. URL runtimes\n        // have a cache busting query param added with HMR enabled which will trigger a reload.\n        let runtimes = new Set();\n        let incomingDeps = event.bundleGraph.getIncomingDependencies(asset);\n        let isOnlyReferencedByRuntimes = incomingDeps.every(dep => {\n          let resolved = event.bundleGraph.getResolvedAsset(dep);\n          let isRuntime = resolved?.type === 'js' && resolved !== asset;\n          if (resolved && isRuntime) {\n            runtimes.add(resolved);\n          }\n          return isRuntime;\n        });\n\n        if (isOnlyReferencedByRuntimes) {\n          for (let runtime of runtimes) {\n            changedAssets.add(runtime);\n          }\n\n          continue;\n        }\n      }\n\n      queue.add(async () => {\n        let dependencies = event.bundleGraph.getDependencies(asset);\n        let depsByBundle = {};\n        for (let bundle of event.bundleGraph.getBundlesWithAsset(asset)) {\n          let deps = {};\n          for (let dep of dependencies) {\n            let resolved = event.bundleGraph.getResolvedAsset(dep, bundle);\n            if (resolved) {\n              deps[getSpecifier(dep)] =\n                event.bundleGraph.getAssetPublicId(resolved);\n            }\n          }\n          depsByBundle[bundle.id] = deps;\n        }\n\n        return {\n          id: event.bundleGraph.getAssetPublicId(asset),\n          url: this.getSourceURL(asset),\n          type: asset.type,\n          // No need to send the contents of non-JS assets to the client.\n          output:\n            asset.type === 'js' ? await this.getHotAssetContents(asset) : '',\n          envHash: asset.env.id,\n          outputFormat: asset.env.outputFormat,\n          depsByBundle,\n        };\n      });\n    }\n\n    let assets = await queue.run();\n    if (assets.length >= BROADCAST_MAX_ASSETS) {\n      // Too many assets to send via an update without errors, just reload instead\n      return {type: 'reload'};\n    } else if (assets.length > 0) {\n      return {\n        type: 'update',\n        assets,\n      };\n    }\n  }\n\n  async getHotAssetContents(asset: Asset): Promise<string> {\n    let output = await asset.getCode();\n    let bundleGraph = nullthrows(this.event).bundleGraph;\n    if (asset.type === 'js') {\n      let publicId = bundleGraph.getAssetPublicId(asset);\n      output = `parcelHotUpdate['${publicId}'] = function (require, module, exports) {${output}}`;\n    }\n\n    let sourcemap = await asset.getMap();\n    if (sourcemap) {\n      let sourcemapStringified = await sourcemap.stringify({\n        format: 'inline',\n        sourceRoot:\n          (asset.env.isNode() ? this.options.projectRoot : SOURCES_ENDPOINT) +\n          '/',\n        // $FlowFixMe\n        fs: asset.fs,\n      });\n\n      invariant(typeof sourcemapStringified === 'string');\n      output += `\\n//# sourceMappingURL=${sourcemapStringified}`;\n      output += `\\n//# sourceURL=${encodeURI(this.getSourceURL(asset))}\\n`;\n    }\n\n    return output;\n  }\n\n  getSourceURLEndpoint(): string {\n    let origin = '';\n    if (\n      !this.options.devServer ||\n      // $FlowFixMe\n      this.bundleGraph?.getEntryBundles().some(b => b.env.isServer())\n    ) {\n      origin = `http://${this.options.host || 'localhost'}:${\n        this.options.port\n      }`;\n    }\n    return origin + HMR_ENDPOINT + '/';\n  }\n\n  getSourceURL(asset: Asset): string {\n    return this.getSourceURLEndpoint() + asset.id;\n  }\n\n  handleSocketError(err: ServerError) {\n    if (err.code === 'ECONNRESET') {\n      // This gets triggered on page refresh, ignore this\n      return;\n    }\n\n    this.options.logger.warn({\n      origin: '@parcel/reporter-dev-server',\n      message: `[${err.code}]: ${err.message}`,\n      stack: err.stack,\n    });\n  }\n\n  broadcast(msg: HMRMessage) {\n    const json = JSON.stringify(msg);\n    for (let ws of this.wss.clients) {\n      ws.send(json);\n    }\n  }\n\n  async serveCodeFrame(req: Request, res: Response) {\n    let distDir = this.options.distDir;\n    if (!distDir) {\n      res.statusCode = 500;\n      res.end();\n      return;\n    }\n\n    // $FlowFixMe\n    let webRequest = new Request('http://localhost' + req.url, {\n      method: 'POST',\n      headers: req.headers,\n      // $FlowFixMe\n      body: Readable.toWeb(req),\n      duplex: 'half',\n    });\n\n    let json = await webRequest.json();\n\n    let sourceMaps = new Map();\n    for (let frame of json.frames) {\n      try {\n        if (frame.fileName) {\n          let map;\n          let location = this.findSourceMap(frame.fileName);\n          if (location.type === 'bundle') {\n            // Read the corresponding source map for the bundle.\n            if (!sourceMaps.has(location)) {\n              let contents = await this.options.outputFS.readFile(\n                location.filePath + '.map',\n                'utf8',\n              );\n              let sm = new SourceMap(this.options.projectRoot);\n              sm.addVLQMap(JSON.parse(contents));\n              sourceMaps.set(location, sm);\n            }\n            map = sourceMaps.get(location);\n\n            let contents = await this.options.outputFS.readFile(\n              location.filePath,\n              'utf8',\n            );\n            frame.compiledLines = getCodeFrame(\n              frame.lineNumber,\n              frame.columnNumber,\n              contents,\n              json.contextLines,\n              path.extname(location.filePath).slice(1),\n            );\n            frame.fileName = normalizeSeparators(\n              path.relative(this.options.projectRoot, location.filePath),\n            );\n          } else if (location.type === 'asset') {\n            // Get source map from the asset.\n            let contents = await location.asset.getCode();\n            frame.compiledLines = getCodeFrame(\n              frame.lineNumber,\n              frame.columnNumber,\n              contents,\n              json.contextLines,\n              location.asset.type,\n            );\n            frame.fileName = normalizeSeparators(\n              path.relative(this.options.projectRoot, location.asset.filePath),\n            );\n            map = await location.asset.getMap();\n            if (!map) {\n              throw new Error('Asset does not have a source map');\n            }\n          }\n\n          if (map && frame.lineNumber != null) {\n            // Find the original location in the source map.\n            let mapping = map.findClosestMapping(\n              frame.lineNumber,\n              frame.columnNumber,\n            );\n            if (mapping) {\n              let sourceFileName = mapping.source;\n              let source = sourceFileName\n                ? map.getSourceContent(sourceFileName) || ''\n                : '';\n              if (mapping.original && sourceFileName) {\n                frame.sourceLineNumber = mapping.original.line;\n                frame.sourceColumnNumber = mapping.original.column;\n                frame.sourceLines = getCodeFrame(\n                  mapping.original.line,\n                  mapping.original.column + 1,\n                  source,\n                  json.contextLines,\n                  path.extname(source).slice(1),\n                );\n                frame.sourceFileName = normalizeSeparators(sourceFileName);\n              }\n            }\n          } else if (location.type === 'source') {\n            // This is already a source location. Generate a code frame.\n            frame.fileName = normalizeSeparators(\n              path.relative(this.options.projectRoot, location.filePath),\n            );\n            frame.sourceFileName = frame.fileName;\n            frame.sourceLineNumber = frame.lineNumber;\n            frame.sourceColumnNumber = frame.columnNumber;\n            let contents = await this.options.outputFS.readFile(\n              location.filePath,\n              'utf8',\n            );\n            frame.sourceLines = getCodeFrame(\n              frame.lineNumber,\n              frame.columnNumber,\n              contents,\n              json.contextLines,\n              path.extname(location.filePath).slice(1),\n            );\n          }\n        }\n      } catch (err) {\n        continue;\n      }\n    }\n\n    res.setHeader('Content-Type', 'application/json');\n    res.end(JSON.stringify(json.frames));\n  }\n\n  async getSourceMapContents(filePath: string): Promise<string> {\n    let location = await this.findSourceMap(filePath);\n    if (location.type === 'bundle') {\n      return this.options.outputFS.readFile(location.filePath + '.map', 'utf8');\n    }\n\n    let map;\n    if (location.type === 'source') {\n      // Return an empty source map\n      map = new SourceMap(this.options.projectRoot);\n      let contents = await this.options.inputFS.readFile(\n        location.filePath,\n        'utf8',\n      );\n      map.addEmptyMap(location.filePath, contents);\n    } else {\n      map = await location.asset.getMap();\n      if (!map) {\n        throw new Error('Asset does not have a source map');\n      }\n    }\n\n    let sourcemapStringified = await map.stringify({\n      format: 'string',\n      sourceRoot: SOURCES_ENDPOINT + '/',\n      // $FlowFixMe\n      fs: this.options.inputFS,\n    });\n    invariant(typeof sourcemapStringified === 'string');\n    return sourcemapStringified;\n  }\n\n  findSourceMap(\n    filePath: string,\n  ):\n    | {|type: 'bundle', filePath: string|}\n    | {|type: 'asset', asset: Asset|}\n    | {|type: 'source', filePath: string|} {\n    let distDir = this.options.distDir;\n    if (!distDir) {\n      throw new Error('Must have a distDir');\n    }\n\n    let event = this.event;\n    invariant(event?.type === 'buildSuccess');\n\n    // React generates URLs like rsc://React/Server/file:///foo/bar\n    if (filePath.startsWith('rsc://')) {\n      let url = new URL(filePath);\n      let index = url.pathname.indexOf('/', 1);\n      if (index >= 0) {\n        filePath = url.pathname.slice(index + 1);\n      } else {\n        throw new Error('Unexpected RSC URL');\n      }\n    }\n\n    // Remove public url prefix first, in case it has a protocol/origin.\n    let publicUrl = this.options.publicUrl;\n    if (publicUrl.endsWith('/')) {\n      publicUrl = publicUrl.slice(0, -1);\n    }\n\n    if (publicUrl.length > 0 && filePath.startsWith(publicUrl + '/')) {\n      filePath = filePath.slice(publicUrl.length + 1);\n    }\n\n    // Get path from URL.\n    if (filePath.startsWith('file://')) {\n      filePath = fileURLToPath(filePath);\n    } else {\n      if (/^https?:\\/\\//.test(filePath)) {\n        let url = new URL(filePath);\n        filePath = url.pathname.slice(1);\n      }\n\n      // If public url is just a subpath, strip it.\n      if (publicUrl.length > 0 && filePath.startsWith(publicUrl)) {\n        filePath = filePath.slice(publicUrl.length);\n      }\n    }\n\n    // If url starts with /__parcel_hmr, get source map by asset id.\n    let hmrEndpoint = this.getSourceURLEndpoint();\n    if (filePath.startsWith(hmrEndpoint)) {\n      let id = filePath.slice(hmrEndpoint.length);\n      return {\n        type: 'asset',\n        asset: event.bundleGraph.getAssetById(id),\n      };\n    }\n\n    if (filePath.startsWith('/') || path.isAbsolute(filePath)) {\n      filePath = path.normalize(filePath);\n    } else {\n      filePath = path.join(distDir, filePath);\n    }\n\n    // If the file is inside the distDir, it's a bundle path.\n    if (isDirectoryInside(filePath, distDir)) {\n      return {type: 'bundle', filePath: filePath};\n    }\n\n    // Otherwise, assume this refers to a source file.\n    // This can happen if the server uses --enable-source-maps,\n    // in which case Node will have already mapped the location.\n    if (isDirectoryInside(filePath, this.options.projectRoot)) {\n      return {type: 'source', filePath};\n    }\n\n    throw new Error('Source map not found');\n  }\n}\n\nfunction getSpecifier(dep: Dependency): string {\n  if (typeof dep.meta.placeholder === 'string') {\n    return dep.meta.placeholder;\n  }\n\n  return dep.specifier;\n}\n\nfunction getCodeFrame(\n  line: number,\n  column: number,\n  source: string,\n  contextLines: number,\n  language: string,\n): string {\n  return formatCodeFrame(\n    source,\n    [\n      {\n        start: {\n          line,\n          column,\n        },\n        end: {\n          line,\n          column,\n        },\n      },\n    ],\n    {\n      useColor: true,\n      syntaxHighlighting: true,\n      padding: {\n        before: contextLines,\n        after: contextLines,\n      },\n      language,\n    },\n  );\n}\n"
  },
  {
    "path": "packages/reporters/dev-server/src/NodeRunner.js",
    "content": "// @flow\nimport type {PluginLogger, BundleGraph, PackagedBundle} from '@parcel/types';\n\nimport {md, errorToDiagnostic} from '@parcel/diagnostic';\nimport nullthrows from 'nullthrows';\nimport {Worker} from 'worker_threads';\nimport path from 'path';\nimport {type Deferred, makeDeferredWithPromise} from '@parcel/utils';\nimport type {HMRMessage} from './HMRServer';\n\nexport type NodeRunnerOptions = {|\n  hmr: boolean,\n  logger: PluginLogger,\n|};\n\nexport class NodeRunner {\n  worker: Worker | null = null;\n  bundleGraph: BundleGraph<PackagedBundle> | null = null;\n  pending: Promise<void> | null = null;\n  deferred: Deferred<void> | null = null;\n  logger: PluginLogger;\n  hmr: boolean;\n\n  constructor(options: NodeRunnerOptions) {\n    this.logger = options.logger;\n    this.hmr = options.hmr;\n  }\n\n  buildStart() {\n    let {deferred, promise} = makeDeferredWithPromise();\n    this.pending = promise;\n    this.deferred = deferred;\n  }\n\n  async buildSuccess(bundleGraph: BundleGraph<PackagedBundle>) {\n    this.bundleGraph = bundleGraph;\n\n    let deferred = this.deferred;\n    this.pending = null;\n    this.deferred = null;\n\n    if (this.worker == null) {\n      await this.startWorker();\n    } else if (!this.hmr) {\n      await this.restartWorker();\n    }\n\n    deferred?.resolve();\n  }\n\n  startWorker(): Promise<void> {\n    let entry = nullthrows(this.bundleGraph)\n      .getEntryBundles()\n      .find(\n        b => b.env.isNode() && /^\\.(js|mjs|cjs)/.test(path.extname(b.filePath)),\n      );\n    if (entry) {\n      let relativePath = path.relative(process.cwd(), entry.filePath);\n      this.logger.log({message: md`Starting __${relativePath}__...`});\n      let worker = new Worker(entry.filePath, {\n        execArgv: ['--enable-source-maps'],\n        workerData: {\n          // Used by the hmr-runtime to detect when to send restart messages.\n          __parcel: true,\n        },\n        stdout: true,\n        stderr: true,\n      });\n\n      worker.on('error', (err: Error) => {\n        this.logger.error(errorToDiagnostic(err));\n      });\n\n      worker.stderr.setEncoding('utf8');\n      worker.stderr.on('data', data => {\n        for (let line of data.split('\\n')) {\n          this.logger.error({\n            origin: relativePath,\n            message: line,\n            skipFormatting: true,\n          });\n        }\n      });\n\n      worker.stdout.setEncoding('utf8');\n      worker.stdout.on('data', data => {\n        for (let line of data.split('\\n')) {\n          this.logger.log({\n            origin: relativePath,\n            message: line,\n            skipFormatting: true,\n          });\n        }\n      });\n\n      worker.on('exit', () => {\n        this.worker = null;\n      });\n\n      this.worker = worker;\n\n      return new Promise(resolve => {\n        if (this.hmr) {\n          worker.once('message', () => resolve());\n        } else {\n          worker.once('online', () => resolve());\n        }\n      });\n    } else {\n      return Promise.resolve();\n    }\n  }\n\n  async stop(): Promise<void> {\n    await this.worker?.terminate();\n    this.worker = null;\n  }\n\n  async restartWorker(): Promise<void> {\n    await this.stop();\n\n    // HMR updates are sent before packaging is complete.\n    // If the build is still pending, wait until it completes to restart.\n    if (!this.pending) {\n      await this.startWorker();\n    } else {\n      await this.pending;\n    }\n  }\n\n  emitUpdate(update: HMRMessage): Promise<void> {\n    if (update.type === 'reload') {\n      return this.restartWorker();\n    }\n\n    return new Promise((resolve, reject) => {\n      let worker = this.worker;\n      if (worker) {\n        worker.once('message', msg => {\n          if (msg === 'restart') {\n            this.restartWorker().then(resolve, reject);\n          } else {\n            resolve();\n          }\n        });\n\n        worker.postMessage(update);\n      } else {\n        resolve();\n      }\n    });\n  }\n}\n"
  },
  {
    "path": "packages/reporters/dev-server/src/Server.js",
    "content": "// @flow\n\nimport type {DevServerOptions, Request, Response} from './types.js.flow';\nimport type {\n  BuildSuccessEvent,\n  BundleGraph,\n  FilePath,\n  PluginOptions,\n  PackagedBundle,\n} from '@parcel/types';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {FileSystem} from '@parcel/fs';\nimport type {HTTPServer, FormattedCodeFrame} from '@parcel/utils';\n\nimport invariant from 'assert';\nimport path from 'path';\nimport url from 'url';\nimport {\n  ansiHtml,\n  createHTTPServer,\n  resolveConfig,\n  readConfig,\n  prettyDiagnostic,\n  relativePath,\n} from '@parcel/utils';\nimport serverErrors from './serverErrors';\nimport fs from 'fs';\nimport ejs from 'ejs';\nimport connect from 'connect';\nimport serveHandler from 'serve-handler';\nimport {createProxyMiddleware} from 'http-proxy-middleware';\nimport {URL} from 'url';\nimport fresh from 'fresh';\n\nexport function setHeaders(res: Response, cors: boolean) {\n  if (cors) {\n    res.setHeader('Access-Control-Allow-Origin', '*');\n    res.setHeader(\n      'Access-Control-Allow-Methods',\n      'GET, HEAD, PUT, PATCH, POST, DELETE',\n    );\n    res.setHeader(\n      'Access-Control-Allow-Headers',\n      'Origin, X-Requested-With, Content-Type, Accept, Content-Type',\n    );\n  }\n  res.setHeader('Cache-Control', 'max-age=0, must-revalidate');\n}\n\nconst SLASH_REGEX = /\\//g;\n\nexport const SOURCES_ENDPOINT = '/__parcel_source_root';\nconst TEMPLATE_404 = fs.readFileSync(\n  path.join(__dirname, 'templates/404.html'),\n  'utf8',\n);\n\nconst TEMPLATE_500 = fs.readFileSync(\n  path.join(__dirname, 'templates/500.html'),\n  'utf8',\n);\ntype NextFunction = (req: Request, res: Response, next?: (any) => any) => any;\n\nexport default class Server {\n  pending: boolean;\n  pendingRequests: Array<[Request, Response]>;\n  middleware: Array<(req: Request, res: Response) => boolean>;\n  options: DevServerOptions;\n  rootPath: string;\n  bundleGraph: BundleGraph<PackagedBundle> | null;\n  requestBundle: ?(bundle: PackagedBundle) => Promise<BuildSuccessEvent>;\n  errors: Array<{|\n    message: string,\n    stack: ?string,\n    frames: Array<FormattedCodeFrame>,\n    hints: Array<string>,\n    documentation: string,\n  |}> | null;\n  stopServer: ?() => Promise<void>;\n\n  constructor(options: DevServerOptions) {\n    this.options = options;\n    try {\n      this.rootPath = new URL(options.publicUrl).pathname;\n    } catch (e) {\n      this.rootPath = options.publicUrl;\n    }\n    this.pending = true;\n    this.pendingRequests = [];\n    this.middleware = [];\n    this.bundleGraph = null;\n    this.requestBundle = null;\n    this.errors = null;\n  }\n\n  buildStart() {\n    this.pending = true;\n  }\n\n  buildSuccess(\n    bundleGraph: BundleGraph<PackagedBundle>,\n    requestBundle: (bundle: PackagedBundle) => Promise<BuildSuccessEvent>,\n  ) {\n    this.bundleGraph = bundleGraph;\n    this.requestBundle = requestBundle;\n    this.errors = null;\n    this.pending = false;\n\n    if (this.pendingRequests.length > 0) {\n      let pendingRequests = this.pendingRequests;\n      this.pendingRequests = [];\n      for (let [req, res] of pendingRequests) {\n        this.respond(req, res);\n      }\n    }\n  }\n\n  async buildError(options: PluginOptions, diagnostics: Array<Diagnostic>) {\n    this.pending = false;\n    this.errors = await Promise.all(\n      diagnostics.map(async d => {\n        let ansiDiagnostic = await prettyDiagnostic(d, options);\n\n        return {\n          message: ansiHtml(ansiDiagnostic.message),\n          stack: ansiDiagnostic.stack ? ansiHtml(ansiDiagnostic.stack) : null,\n          frames: ansiDiagnostic.frames.map(f => ({\n            location: f.location,\n            code: ansiHtml(f.code),\n          })),\n          hints: ansiDiagnostic.hints.map(hint => ansiHtml(hint)),\n          documentation: d.documentationURL ?? '',\n        };\n      }),\n    );\n  }\n\n  respond(req: Request, res: Response): mixed {\n    if (this.middleware.some(handler => handler(req, res))) return;\n    let {pathname} = url.parse(req.originalUrl || req.url);\n    if (pathname == null) {\n      pathname = '/';\n    }\n\n    if (this.errors) {\n      return this.send500(req, res);\n    } else if (path.extname(pathname) === '') {\n      // If the URL doesn't start with the public path, or the URL doesn't\n      // have a file extension, send the main HTML bundle.\n      return this.sendIndex(req, res);\n    } else if (pathname.startsWith(SOURCES_ENDPOINT)) {\n      req.url = pathname.slice(SOURCES_ENDPOINT.length);\n      return this.serve(\n        this.options.inputFS,\n        this.options.projectRoot,\n        req,\n        res,\n        () => this.send404(req, res),\n      );\n    } else if (pathname.startsWith(this.rootPath)) {\n      // Otherwise, serve the file from the dist folder\n      req.url =\n        this.rootPath === '/' ? pathname : pathname.slice(this.rootPath.length);\n      if (req.url[0] !== '/') {\n        req.url = '/' + req.url;\n      }\n      return this.serveBundle(req, res, () => this.sendIndex(req, res));\n    } else {\n      return this.send404(req, res);\n    }\n  }\n\n  sendIndex(req: Request, res: Response) {\n    if (this.bundleGraph) {\n      // If the main asset is an HTML file, serve it\n      let htmlBundleFilePaths = this.bundleGraph\n        .getBundles()\n        .filter(bundle => path.posix.extname(bundle.name) === '.html')\n        .map(bundle => {\n          return `/${relativePath(\n            this.options.distDir,\n            bundle.filePath,\n            false,\n          )}`;\n        });\n\n      let indexFilePath = null;\n      let {pathname: reqURL} = url.parse(req.originalUrl || req.url);\n\n      if (!reqURL) {\n        reqURL = '/';\n      }\n\n      if (htmlBundleFilePaths.length === 1) {\n        indexFilePath = htmlBundleFilePaths[0];\n      } else {\n        let bestMatch = null;\n        for (let bundle of htmlBundleFilePaths) {\n          let bundleDir = path.posix.dirname(bundle);\n          let bundleDirSubdir = bundleDir === '/' ? bundleDir : bundleDir + '/';\n          let withoutExtension = path.posix.basename(\n            bundle,\n            path.posix.extname(bundle),\n          );\n          let isIndex = withoutExtension === 'index';\n\n          let matchesIsIndex = null;\n          if (\n            isIndex &&\n            (reqURL.startsWith(bundleDirSubdir) || reqURL === bundleDir)\n          ) {\n            // bundle is /bar/index.html and (/bar or something inside of /bar/** was requested was requested)\n            matchesIsIndex = true;\n          } else if (reqURL == path.posix.join(bundleDir, withoutExtension)) {\n            // bundle is /bar/foo.html and /bar/foo was requested\n            matchesIsIndex = false;\n          }\n          if (matchesIsIndex != null) {\n            let depth = bundle.match(SLASH_REGEX)?.length ?? 0;\n            if (\n              bestMatch == null ||\n              // This one is more specific (deeper)\n              bestMatch.depth < depth ||\n              // This one is just as deep, but the bundle name matches and not just index.html\n              (bestMatch.depth === depth && bestMatch.isIndex)\n            ) {\n              bestMatch = {bundle, depth, isIndex: matchesIsIndex};\n            }\n          }\n        }\n        indexFilePath = bestMatch?.['bundle'] ?? htmlBundleFilePaths[0];\n      }\n\n      if (indexFilePath) {\n        req.url = indexFilePath;\n        this.serveBundle(req, res, () => this.send404(req, res));\n      } else {\n        this.send404(req, res);\n      }\n    } else {\n      this.send404(req, res);\n    }\n  }\n\n  async serveBundle(\n    req: Request,\n    res: Response,\n    next: NextFunction,\n  ): Promise<void> {\n    let bundleGraph = this.bundleGraph;\n    if (bundleGraph) {\n      let {pathname} = url.parse(req.url);\n      if (!pathname) {\n        this.send500(req, res);\n        return;\n      }\n\n      let requestedPath = path.normalize(pathname.slice(1));\n      let bundle = bundleGraph\n        .getBundles()\n        .find(\n          b =>\n            path.relative(this.options.distDir, b.filePath) === requestedPath,\n        );\n      if (!bundle) {\n        this.serveDist(req, res, next);\n        return;\n      }\n\n      invariant(this.requestBundle != null);\n      try {\n        await this.requestBundle(bundle);\n      } catch (err) {\n        this.send500(req, res);\n        return;\n      }\n\n      this.serveDist(req, res, next);\n    } else {\n      this.send404(req, res);\n    }\n  }\n\n  serveDist(\n    req: Request,\n    res: Response,\n    next: NextFunction,\n  ): Promise<void> | Promise<mixed> {\n    return this.serve(\n      this.options.outputFS,\n      this.options.distDir,\n      req,\n      res,\n      next,\n    );\n  }\n\n  async serve(\n    fs: FileSystem,\n    root: FilePath,\n    req: Request,\n    res: Response,\n    next: NextFunction,\n  ): Promise<mixed> {\n    if (req.method !== 'GET' && req.method !== 'HEAD') {\n      // method not allowed\n      res.statusCode = 405;\n      res.setHeader('Allow', 'GET, HEAD');\n      res.setHeader('Content-Length', '0');\n      res.end();\n      return;\n    }\n\n    try {\n      var filePath = url.parse(req.url).pathname || '';\n      filePath = decodeURIComponent(filePath);\n    } catch (err) {\n      return this.sendError(res, 400);\n    }\n\n    filePath = path.normalize('.' + path.sep + filePath);\n\n    // malicious path\n    if (filePath.includes(path.sep + '..' + path.sep)) {\n      return this.sendError(res, 403);\n    }\n\n    // join / normalize from the root dir\n    if (!path.isAbsolute(filePath)) {\n      filePath = path.normalize(path.join(root, filePath));\n    }\n\n    try {\n      var stat = await fs.stat(filePath);\n    } catch (err) {\n      if (err.code === 'ENOENT') {\n        return next(req, res);\n      }\n\n      return this.sendError(res, 500);\n    }\n\n    // Fall back to next handler if not a file\n    if (!stat || !stat.isFile()) {\n      return next(req, res);\n    }\n\n    if (fresh(req.headers, {'last-modified': stat.mtime.toUTCString()})) {\n      res.statusCode = 304;\n      res.end();\n      return;\n    }\n\n    return serveHandler(\n      req,\n      res,\n      {\n        public: root,\n        cleanUrls: false,\n      },\n      {\n        lstat: path => fs.stat(path),\n        realpath: path => fs.realpath(path),\n        createReadStream: (path, options) => fs.createReadStream(path, options),\n        readdir: path => fs.readdir(path),\n      },\n    );\n  }\n\n  sendError(res: Response, statusCode: number) {\n    res.statusCode = statusCode;\n    res.end();\n  }\n\n  send404(req: Request, res: Response) {\n    res.statusCode = 404;\n    res.end(TEMPLATE_404);\n  }\n\n  send500(req: Request, res: Response): void | Response {\n    res.setHeader('Content-Type', 'text/html; charset=utf-8');\n    res.writeHead(500);\n\n    if (this.errors) {\n      return res.end(\n        ejs.render(TEMPLATE_500, {\n          errors: this.errors,\n          hmrOptions: this.options.hmrOptions,\n        }),\n      );\n    }\n  }\n\n  logAccessIfVerbose(req: Request) {\n    this.options.logger.verbose({\n      message: `Request: ${req.headers.host}${req.originalUrl || req.url}`,\n    });\n  }\n\n  /**\n   * Load proxy table from package.json and apply them.\n   */\n  async applyProxyTable(app: any): Promise<Server> {\n    // avoid skipping project root\n    const fileInRoot: string = path.join(this.options.projectRoot, 'index');\n\n    const configFilePath = await resolveConfig(\n      this.options.inputFS,\n      fileInRoot,\n      [\n        '.proxyrc.cts',\n        '.proxyrc.mts',\n        '.proxyrc.ts',\n        '.proxyrc.cjs',\n        '.proxyrc.mjs',\n        '.proxyrc.js',\n        '.proxyrc',\n        '.proxyrc.json',\n      ],\n      this.options.projectRoot,\n    );\n\n    if (!configFilePath) {\n      return this;\n    }\n\n    const filename = path.basename(configFilePath);\n\n    if (filename === '.proxyrc' || filename === '.proxyrc.json') {\n      let conf = await readConfig(this.options.inputFS, configFilePath);\n      if (!conf) {\n        return this;\n      }\n      let cfg = conf.config;\n      if (typeof cfg !== 'object') {\n        this.options.logger.warn({\n          message:\n            \"Proxy table in '.proxyrc' should be of object type. Skipping...\",\n        });\n        return this;\n      }\n      for (const [context, options] of Object.entries(cfg)) {\n        // each key is interpreted as context, and value as middleware options\n        app.use(createProxyMiddleware(context, options));\n      }\n    } else {\n      let cfg = await this.options.packageManager.require(\n        configFilePath,\n        fileInRoot,\n      );\n      if (\n        // $FlowFixMe\n        Object.prototype.toString.call(cfg) === '[object Module]'\n      ) {\n        cfg = cfg.default;\n      }\n\n      if (typeof cfg !== 'function') {\n        this.options.logger.warn({\n          message: `Proxy configuration file '${filename}' should export a function. Skipping...`,\n        });\n        return this;\n      }\n      cfg(app);\n    }\n\n    return this;\n  }\n\n  async start(): Promise<HTTPServer> {\n    const finalHandler = (req: Request, res: Response) => {\n      this.logAccessIfVerbose(req);\n\n      // Wait for the parcelInstance to finish bundling if needed\n      if (this.pending) {\n        this.pendingRequests.push([req, res]);\n      } else {\n        this.respond(req, res);\n      }\n    };\n\n    const app = connect();\n    app.use((req, res, next) => {\n      setHeaders(res, this.options.cors ?? true);\n      if (req.method === 'OPTIONS') {\n        res.statusCode = 200;\n        res.end();\n        return;\n      }\n      next();\n    });\n\n    app.use((req, res, next) => {\n      if (req.url === '/__parcel_healthcheck') {\n        res.statusCode = 200;\n        res.write(`${Date.now()}`);\n        res.end();\n      } else {\n        next();\n      }\n    });\n\n    await this.applyProxyTable(app);\n    app.use(finalHandler);\n\n    let {server, stop} = await createHTTPServer({\n      cacheDir: this.options.cacheDir,\n      https: this.options.https,\n      inputFS: this.options.inputFS,\n      listener: app,\n      outputFS: this.options.outputFS,\n      host: this.options.host,\n    });\n    this.stopServer = stop;\n\n    server.listen(this.options.port, this.options.host);\n    return new Promise((resolve, reject) => {\n      server.once('error', err => {\n        this.options.logger.error(\n          ({\n            message: serverErrors(err, this.options.port),\n          }: Diagnostic),\n        );\n        reject(err);\n      });\n\n      server.once('listening', () => {\n        resolve(server);\n      });\n    });\n  }\n\n  async stop(): Promise<void> {\n    invariant(this.stopServer != null);\n    await this.stopServer();\n    this.stopServer = null;\n  }\n}\n"
  },
  {
    "path": "packages/reporters/dev-server/src/ServerReporter.js",
    "content": "// @flow\n\nimport path from 'path';\nimport {Reporter} from '@parcel/plugin';\nimport HMRServer from './HMRServer';\nimport Server from './Server';\nimport {NodeRunner} from './NodeRunner';\n\nlet servers: Map<number, Server> = new Map();\nlet hmrServers: Map<number, HMRServer> = new Map();\nlet nodeRunners: Map<string, NodeRunner> = new Map();\nexport default (new Reporter({\n  async report({event, options, logger}) {\n    let {serveOptions, hmrOptions} = options;\n    let server = serveOptions ? servers.get(serveOptions.port) : undefined;\n    let hmrPort =\n      (hmrOptions && hmrOptions.port) || (serveOptions && serveOptions.port);\n    let hmrServer = hmrPort ? hmrServers.get(hmrPort) : undefined;\n    let nodeRunner = nodeRunners.get(options.instanceId);\n    switch (event.type) {\n      case 'watchEnd':\n        if (serveOptions) {\n          if (!server) {\n            return logger.warn({\n              message:\n                'Could not shutdown devserver because it does not exist.',\n            });\n          }\n          await server.stop();\n          servers.delete(server.options.port);\n        }\n        if (hmrOptions && hmrServer) {\n          await hmrServer.stop();\n          // $FlowFixMe[prop-missing]\n          hmrServers.delete(hmrServer.wss.options.port);\n        }\n        break;\n      case 'buildStart':\n        server?.buildStart();\n        hmrServer?.buildStart();\n        nodeRunner?.buildStart();\n        break;\n      case 'buildProgress':\n        if (\n          event.phase === 'bundled' &&\n          hmrServer &&\n          // Only send HMR updates before packaging if the built in dev server is used to ensure that\n          // no stale bundles are served. Otherwise emit it for 'buildSuccess'.\n          options.serveOptions !== false\n        ) {\n          let update = await hmrServer.getUpdate(event);\n          if (update) {\n            // If running in node, wait for the server to update before emitting the update\n            // on the client. This ensures that when the client reloads the server is ready.\n            if (nodeRunner) {\n              // Don't await here because that blocks the build from continuing\n              // and we may need to wait for the buildSuccess event.\n              let hmr = hmrServer;\n              nodeRunner.emitUpdate(update).then(() => hmr.broadcast(update));\n            } else {\n              hmrServer.broadcast(update);\n            }\n          }\n        }\n        break;\n      case 'buildSuccess': {\n        if (!server && !hmrServer && (serveOptions || hmrOptions)) {\n          [server, hmrServer] = await startDevServer(\n            options,\n            logger,\n            event.bundleGraph\n              .getEntryBundles()\n              .some(\n                b => b.env.isBrowser() || path.extname(b.filePath) === '.html',\n              ),\n          );\n        }\n\n        if (serveOptions && server) {\n          server.buildSuccess(event.bundleGraph, event.requestBundle);\n        }\n        if (hmrServer && options.serveOptions === false) {\n          let update = await hmrServer.getUpdate(event);\n          if (update) {\n            hmrServer.broadcast(update);\n          }\n        }\n\n        if (!nodeRunner && options.serveOptions) {\n          nodeRunner = new NodeRunner({logger, hmr: !!options.hmrOptions});\n          nodeRunners.set(options.instanceId, nodeRunner);\n        }\n        nodeRunner?.buildSuccess(event.bundleGraph);\n        hmrServer?.buildSuccess(event);\n        break;\n      }\n      case 'buildFailure':\n        // On buildFailure watchStart sometimes has not been called yet\n        // do not throw an additional warning here\n        if (server) {\n          await server.buildError(options, event.diagnostics);\n        }\n        if (hmrServer) {\n          await hmrServer.emitError(options, event.diagnostics);\n        }\n        break;\n    }\n  },\n}): Reporter);\n\nasync function startDevServer(options, logger, isBrowser) {\n  let {serveOptions, hmrOptions} = options;\n  let server = serveOptions ? servers.get(serveOptions.port) : undefined;\n  let hmrPort =\n    (hmrOptions && hmrOptions.port) || (serveOptions && serveOptions.port);\n  let hmrServer = hmrPort ? hmrServers.get(hmrPort) : undefined;\n\n  if (serveOptions && !server && isBrowser) {\n    let serverOptions = {\n      ...serveOptions,\n      projectRoot: options.projectRoot,\n      cacheDir: options.cacheDir,\n      // Override the target's publicUrl as that is likely meant for production.\n      // This could be configurable in the future.\n      publicUrl: serveOptions.publicUrl ?? '/',\n      inputFS: options.inputFS,\n      outputFS: options.outputFS,\n      packageManager: options.packageManager,\n      logger,\n      hmrOptions,\n    };\n\n    server = new Server(serverOptions);\n    servers.set(serveOptions.port, server);\n    const devServer = await server.start();\n\n    if (hmrOptions && hmrOptions.port === serveOptions.port) {\n      let hmrServerOptions = {\n        port: serveOptions.port,\n        host: hmrOptions.host,\n        devServer,\n        addMiddleware: handler => {\n          server?.middleware.push(handler);\n        },\n        logger,\n        https: options.serveOptions ? options.serveOptions.https : false,\n        cacheDir: options.cacheDir,\n        inputFS: options.inputFS,\n        outputFS: options.outputFS,\n        projectRoot: options.projectRoot,\n        distDir: serveOptions.distDir,\n        publicUrl: serveOptions.publicUrl ?? '/',\n        cors: serveOptions.cors,\n      };\n      hmrServer = new HMRServer(hmrServerOptions);\n      hmrServers.set(serveOptions.port, hmrServer);\n      await hmrServer.start();\n      return [server, hmrServer];\n    }\n  }\n\n  let port = hmrOptions?.port;\n  if (typeof port === 'number' && !hmrServer) {\n    let hmrServerOptions = {\n      port,\n      host: hmrOptions?.host,\n      logger,\n      https: options.serveOptions ? options.serveOptions.https : false,\n      cacheDir: options.cacheDir,\n      inputFS: options.inputFS,\n      outputFS: options.outputFS,\n      projectRoot: options.projectRoot,\n      distDir: serveOptions ? serveOptions.distDir : null,\n      publicUrl: serveOptions ? serveOptions.publicUrl ?? '/' : '/',\n      cors:\n        hmrOptions?.cors ?? (serveOptions ? serveOptions.cors : true) ?? true,\n    };\n    hmrServer = new HMRServer(hmrServerOptions);\n    hmrServers.set(port, hmrServer);\n    await hmrServer.start();\n  }\n\n  return [server, hmrServer];\n}\n"
  },
  {
    "path": "packages/reporters/dev-server/src/serverErrors.js",
    "content": "// @flow\nexport type ServerError = Error & {|\n  code: string,\n|};\n\nconst serverErrorList = {\n  EACCES: \"You don't have access to bind the server to port {port}.\",\n  EADDRINUSE: 'There is already a process listening on port {port}.',\n};\n\nexport default function serverErrors(err: ServerError, port: number): string {\n  let desc = `Error: ${\n    err.code\n  } occurred while setting up server on port ${port.toString()}.`;\n\n  if (serverErrorList[err.code]) {\n    desc = serverErrorList[err.code].replace(/{port}/g, port);\n  }\n\n  return desc;\n}\n"
  },
  {
    "path": "packages/reporters/dev-server/src/templates/404.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n    <title>Page not found</title>\n    <style>\n      body {\n        margin: 0;\n        font-family: sans-serif;\n      }\n\n      .error-title {\n        color: #282c33;\n        font-size: 3rem;\n        padding: 25px;\n        padding-bottom: 10px;\n        margin: 0;\n      }\n\n      .short-desc {\n        color: #282c33;\n        font-size: 2rem;\n        padding: 0 25px;\n        margin: 0;\n      }\n    </style>\n  </head>\n  <body>\n    <h1 class=\"error-title\">404</h1>\n    <h2 class=\"short-desc\">Page not found.</h2>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/reporters/dev-server/src/templates/500.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n    <title>🚨 Build Error</title>\n    <style>\n      html {\n        color-scheme: dark light;\n        background-color: #282c33;\n      }\n      \n      body {\n        margin: 0;\n        font-family: sans-serif;\n      }\n\n      .title-heading {\n        font-size: 2rem;\n        background-color: #fe0140;\n        color: #ffffff;\n        margin: 0 0 20px 0;\n        padding: 10px;\n      }\n\n      .error-message {\n        font-size: 1.2rem;\n        color: salmon;\n        margin: 10px;\n        font-family: Menlo, Consolas, monospace;\n        white-space: pre;\n      }\n\n      .error-hints-container {\n        margin: 5px 0 20px 0;\n        list-style: none;\n        padding: 0;\n      }\n\n      .error-hints-container li:before {\n        content: '💡 ';\n      }\n\n      .error-hint {\n        color: #5e8af7;\n        font-size: 0.8rem;\n        padding: 0 0 0 5px;\n        font-family: Menlo, Consolas, monospace;\n      }\n\n      .error-stack-trace {\n        padding: 20px 10px;\n        background-color: #282c33;\n        color: #c5ccdb;\n        font-family: Menlo, Consolas, monospace;\n        font-size: 0.8rem;\n        white-space: pre;\n      }\n\n      .documentation {\n        padding: 0 5px;\n        font-family: Menlo, Consolas, monospace;\n        font-size: 0.8rem;\n      }\n\n      .documentation a {\n        color: violet;\n      }\n    </style>\n  </head>\n  <body>\n    <h1 class=\"title-heading\">🚨 Parcel encountered errors</h1>\n    <% errors.forEach(function(error){ %>\n    <h2 class=\"error-message\"><%- error.message %></h2>\n\n    <div class=\"error-stack-trace\"><% if (error.frames?.length) { %><% error.frames.forEach(function(frame){ %><a href=\"/__parcel_launch_editor?file=<%- encodeURIComponent(frame.location) %>\" style=\"text-decoration: underline; color: #888\" onclick=\"fetch(this.href); return false\"><%- frame.location %></a>\n<%- frame.code %><% }); %><% } else { %><%- error.stack %><% } %></div>\n    <ul class=\"error-hints-container\">\n      <% error.hints.forEach(function(hint){ %>\n      <li class=\"error-hint\"><%- hint %></li>\n      <% }); %>\n    </ul>\n    <% if (error.documentation) { %>\n    <div class=\"documentation\">📝 <a href=\"<%- error.documentation %>\" target=\"_blank\">Learn more</a></div>\n    <% } %>\n    <% }); %>\n    <% if (hmrOptions) { %>\n    <script>\n      // Reload the page when an HMR update occurs.\n      var protocol =\n        (location.protocol == 'https:' &&\n          !['localhost', '127.0.0.1', '0.0.0.0'].includes(hostname))\n          ? 'wss'\n          : 'ws';\n      var hostname = <%- JSON.stringify(hmrOptions.host || null) %> || location.protocol.indexOf('http') === 0 ? location.hostname : 'localhost';\n      var port = <%- JSON.stringify(hmrOptions.port || null) %> || location.port;\n      var ws = new WebSocket(protocol + '://' + hostname + (port ? ':' + port : '') + '/');\n\n      var receivedInitialMessage = false;\n      ws.onmessage = (e) => {\n        let data = JSON.parse(e.data);\n\n        // The HMR server sends the pending error immediately on connect. Ignore this.\n        if (data.type == 'error' && !receivedInitialMessage) {\n          receivedInitialMessage = true;\n          return;\n        }\n\n        location.reload();\n      };\n    </script>\n    <% } %>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/reporters/dev-server/src/types.js.flow",
    "content": "// @flow\nimport type {\n  ServerOptions,\n  PluginLogger,\n  HMROptions,\n  HTTPSOptions,\n  FilePath,\n} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {HTTPServer} from '@parcel/utils';\nimport type {PackageManager} from '@parcel/package-manager';\nimport {\n  IncomingMessage as HTTPIncomingMessage,\n  ServerResponse as HTTPServerResponse,\n} from 'http';\nimport {\n  IncomingMessage as HTTPSIncomingMessage,\n  ServerResponse as HTTPSServerResponse,\n} from 'https';\n\ninterface HTTPRequest extends HTTPIncomingMessage {\n  originalUrl?: string;\n}\ninterface HTTPSRequest extends HTTPSIncomingMessage {\n  originalUrl?: string;\n}\nexport type Request = HTTPRequest | HTTPSRequest;\nexport type Response = HTTPServerResponse | HTTPSServerResponse;\nexport type DevServerOptions = {|\n  ...ServerOptions,\n  projectRoot: string,\n  publicUrl: string,\n  cacheDir: string,\n  inputFS: FileSystem,\n  outputFS: FileSystem,\n  logger: PluginLogger,\n  hmrOptions: ?HMROptions,\n  packageManager: PackageManager,\n|};\n\n// TODO: Figure out if there is a node.js type that could be imported with a complete ServerError\nexport type ServerError = Error & {|\n  code: string,\n|};\n\nexport type HMRServerOptions = {|\n  devServer?: HTTPServer,\n  addMiddleware?: (handler: (req: Request, res: Response) => boolean) => void,\n  port: number,\n  host: ?string,\n  logger: PluginLogger,\n  https?: HTTPSOptions | boolean,\n  cacheDir: FilePath,\n  inputFS: FileSystem,\n  outputFS: FileSystem,\n  projectRoot: FilePath,\n  distDir: ?FilePath,\n  publicUrl: string,\n  cors: ?boolean\n|};\n"
  },
  {
    "path": "packages/reporters/dev-server-sw/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-dev-server-sw\",\n  \"version\": \"2.16.4\",\n  \"description\": \"Blazing fast, zero configuration web application bundler\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/ServerReporter.js\",\n  \"source\": \"src/ServerReporter.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.11.0\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  },\n  \"devDependencies\": {\n    \"@parcel/types\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/dev-server-sw/src/HMRServer.js",
    "content": "// @flow\n\nimport type {\n  BuildSuccessEvent,\n  Dependency,\n  PluginOptions,\n  BundleGraph,\n  PackagedBundle,\n  Asset,\n} from '@parcel/types';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {AnsiDiagnosticResult} from '@parcel/utils';\n\nimport invariant from 'assert';\nimport {ansiHtml, prettyDiagnostic, PromiseQueue} from '@parcel/utils';\n\nconst HMR_ENDPOINT = '/__parcel_hmr/';\n\ntype HMRAsset = {|\n  id: string,\n  url: string,\n  type: string,\n  output: string,\n  envHash: string,\n  depsByBundle: {[string]: {[string]: string, ...}, ...},\n|};\n\nexport type HMRMessage =\n  | {|\n      type: 'update',\n      assets: Array<HMRAsset>,\n    |}\n  | {|\n      type: 'error',\n      diagnostics: {|\n        ansi: Array<AnsiDiagnosticResult>,\n        html: Array<$Rest<AnsiDiagnosticResult, {|codeframe: string|}>>,\n      |},\n    |};\n\nconst FS_CONCURRENCY = 64;\n\nexport default class HMRServer {\n  unresolvedError: HMRMessage | null = null;\n  broadcast: HMRMessage => void;\n\n  constructor(broadcast: HMRMessage => void) {\n    this.broadcast = broadcast;\n  }\n\n  async emitError(options: PluginOptions, diagnostics: Array<Diagnostic>) {\n    let renderedDiagnostics = await Promise.all(\n      diagnostics.map(d => prettyDiagnostic(d, options)),\n    );\n\n    // store the most recent error so we can notify new connections\n    // and so we can broadcast when the error is resolved\n    this.unresolvedError = {\n      type: 'error',\n      diagnostics: {\n        ansi: renderedDiagnostics,\n        html: renderedDiagnostics.map((d, i) => {\n          return {\n            message: ansiHtml(d.message),\n            stack: ansiHtml(d.stack),\n            frames: d.frames.map(f => ({\n              location: f.location,\n              code: ansiHtml(f.code),\n            })),\n            hints: d.hints.map(hint => ansiHtml(hint)),\n            documentation: diagnostics[i].documentationURL ?? '',\n          };\n        }),\n      },\n    };\n\n    this.broadcast(this.unresolvedError);\n  }\n\n  async emitUpdate(event: BuildSuccessEvent) {\n    this.unresolvedError = null;\n\n    let changedAssets = new Set(event.changedAssets.values());\n    if (changedAssets.size === 0) return;\n\n    let queue = new PromiseQueue({maxConcurrent: FS_CONCURRENCY});\n    for (let asset of changedAssets) {\n      if (asset.type !== 'js' && asset.type !== 'css') {\n        // If all of the incoming dependencies of the asset actually resolve to a JS asset\n        // rather than the original, we can mark the runtimes as changed instead. URL runtimes\n        // have a cache busting query param added with HMR enabled which will trigger a reload.\n        let runtimes = new Set();\n        let incomingDeps = event.bundleGraph.getIncomingDependencies(asset);\n        let isOnlyReferencedByRuntimes = incomingDeps.every(dep => {\n          let resolved = event.bundleGraph.getResolvedAsset(dep);\n          let isRuntime = resolved?.type === 'js' && resolved !== asset;\n          if (resolved && isRuntime) {\n            runtimes.add(resolved);\n          }\n          return isRuntime;\n        });\n\n        if (isOnlyReferencedByRuntimes) {\n          for (let runtime of runtimes) {\n            changedAssets.add(runtime);\n          }\n\n          continue;\n        }\n      }\n\n      queue.add(async () => {\n        let dependencies = event.bundleGraph.getDependencies(asset);\n        let depsByBundle = {};\n        for (let bundle of event.bundleGraph.getBundlesWithAsset(asset)) {\n          let deps = {};\n          for (let dep of dependencies) {\n            let resolved = event.bundleGraph.getResolvedAsset(dep, bundle);\n            if (resolved) {\n              deps[getSpecifier(dep)] =\n                event.bundleGraph.getAssetPublicId(resolved);\n            }\n          }\n          depsByBundle[bundle.id] = deps;\n        }\n\n        return {\n          id: event.bundleGraph.getAssetPublicId(asset),\n          url: getSourceURL(event.bundleGraph, asset),\n          type: asset.type,\n          // No need to send the contents of non-JS assets to the client.\n          output:\n            asset.type === 'js'\n              ? await getHotAssetContents(event.bundleGraph, asset)\n              : '',\n          envHash: asset.env.id,\n          depsByBundle,\n        };\n      });\n    }\n\n    let assets = await queue.run();\n    this.broadcast({\n      type: 'update',\n      assets: assets,\n    });\n  }\n}\n\nfunction getSpecifier(dep: Dependency): string {\n  if (typeof dep.meta.placeholder === 'string') {\n    return dep.meta.placeholder;\n  }\n\n  return dep.specifier;\n}\n\nexport async function getHotAssetContents(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  asset: Asset,\n): Promise<string> {\n  let output = await asset.getCode();\n  if (asset.type === 'js') {\n    let publicId = bundleGraph.getAssetPublicId(asset);\n    output = `parcelHotUpdate['${publicId}'] = function (require, module, exports) {${output}}`;\n  }\n\n  let sourcemap = await asset.getMap();\n  if (sourcemap) {\n    let sourcemapStringified = await sourcemap.stringify({\n      format: 'inline',\n      sourceRoot: '/__parcel_source_root/',\n      // $FlowFixMe\n      fs: asset.fs,\n    });\n\n    invariant(typeof sourcemapStringified === 'string');\n    output += `\\n//# sourceMappingURL=${sourcemapStringified}`;\n    output += `\\n//# sourceURL=${getSourceURL(bundleGraph, asset)}\\n`;\n  }\n\n  return output;\n}\n\nfunction getSourceURL(bundleGraph, asset) {\n  return HMR_ENDPOINT + asset.id;\n}\n"
  },
  {
    "path": "packages/reporters/dev-server-sw/src/ServerReporter.js",
    "content": "// @flow\nimport {Reporter} from '@parcel/plugin';\nimport HMRServer, {getHotAssetContents} from './HMRServer';\n\nlet hmrServer;\nlet hmrAssetSourceCleanup: (() => void) | void;\n\nexport default (new Reporter({\n  async report({event, options}) {\n    let {hmrOptions} = options;\n    switch (event.type) {\n      case 'watchStart': {\n        if (hmrOptions) {\n          hmrServer = new HMRServer(data =>\n            // $FlowFixMe\n            globalThis.PARCEL_SERVICE_WORKER('hmrUpdate', data),\n          );\n        }\n        break;\n      }\n      case 'watchEnd':\n        break;\n      case 'buildStart':\n        break;\n      case 'buildSuccess':\n        {\n          let files: {|[string]: string|} = {};\n          for (let f of await options.outputFS.readdir('/app/dist')) {\n            files[f] = await options.outputFS.readFile(\n              '/app/dist/' + f,\n              'utf8',\n            );\n          }\n          // $FlowFixMe\n          await globalThis.PARCEL_SERVICE_WORKER('setFS', files);\n\n          hmrAssetSourceCleanup?.();\n          // $FlowFixMe\n          hmrAssetSourceCleanup = globalThis.PARCEL_SERVICE_WORKER_REGISTER(\n            'hmrAssetSource',\n            async id => {\n              let bundleGraph = event.bundleGraph;\n              let asset = bundleGraph.getAssetById(id);\n              return [\n                asset.type,\n                await getHotAssetContents(bundleGraph, asset),\n              ];\n            },\n          );\n\n          if (hmrServer) {\n            await hmrServer?.emitUpdate(event);\n          }\n        }\n        break;\n      // We show this in the \"frontend\" as opposed to the iframe\n      // case 'buildFailure':\n      //   await hmrServer?.emitError(options, event.diagnostics);\n      //   break;\n    }\n  },\n}): Reporter);\n"
  },
  {
    "path": "packages/reporters/json/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-json\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/JSONReporter.js\",\n  \"source\": \"src/JSONReporter.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/json/src/JSONReporter.js",
    "content": "// @flow strict-local\nimport type {BuildProgressEvent, LogEvent} from '@parcel/types';\nimport type {BuildMetrics} from '@parcel/utils';\n\nimport {Reporter} from '@parcel/plugin';\nimport {generateBuildMetrics} from '@parcel/utils';\n\n/* eslint-disable no-console */\nconst writeToStdout = makeWriter(console.log);\nconst writeToStderr = makeWriter(console.error);\n/* eslint-enable no-console */\n\nconst LOG_LEVELS = {\n  none: 0,\n  error: 1,\n  warn: 2,\n  info: 3,\n  progress: 3,\n  success: 3,\n  verbose: 4,\n};\n\nexport default (new Reporter({\n  async report({event, options}) {\n    let logLevelFilter = options.logLevel || 'info';\n\n    switch (event.type) {\n      case 'buildStart':\n        if (LOG_LEVELS[logLevelFilter] >= LOG_LEVELS.info) {\n          writeToStdout({type: 'buildStart'}, logLevelFilter);\n        }\n        break;\n      case 'buildFailure':\n        if (LOG_LEVELS[logLevelFilter] >= LOG_LEVELS.error) {\n          writeToStderr(\n            {type: 'buildFailure', message: event.diagnostics[0].message},\n            logLevelFilter,\n          );\n        }\n        break;\n      case 'buildProgress':\n        if (LOG_LEVELS[logLevelFilter] >= LOG_LEVELS.progress) {\n          let jsonEvent = progressEventToJSONEvent(event);\n          if (jsonEvent != null) {\n            writeToStdout(jsonEvent, logLevelFilter);\n          }\n        }\n        break;\n      case 'buildSuccess':\n        if (LOG_LEVELS[logLevelFilter] >= LOG_LEVELS.success) {\n          let {bundles} = await generateBuildMetrics(\n            event.bundleGraph.getBundles(),\n            options.outputFS,\n            options.projectRoot,\n          );\n\n          writeToStdout(\n            {\n              type: 'buildSuccess',\n              buildTime: event.buildTime,\n              bundles: bundles,\n            },\n            logLevelFilter,\n          );\n        }\n        break;\n      case 'log':\n        writeLogEvent(event, logLevelFilter);\n    }\n  },\n}): Reporter);\n\nfunction makeWriter(\n  write: string => mixed,\n): (JSONReportEvent, $Keys<typeof LOG_LEVELS>) => void {\n  return (\n    event: JSONReportEvent,\n    logLevelFilter: $Keys<typeof LOG_LEVELS>,\n  ): void => {\n    let stringified;\n    try {\n      stringified = JSON.stringify(event);\n    } catch (err) {\n      // This should never happen so long as JSONReportEvent is easily serializable\n      if (LOG_LEVELS[logLevelFilter] >= LOG_LEVELS.error) {\n        writeToStderr(\n          {\n            type: 'log',\n            level: 'error',\n            diagnostics: [\n              {\n                origin: '@parcel/reporter-json',\n                message: err.message,\n                stack: err.stack,\n              },\n            ],\n          },\n          logLevelFilter,\n        );\n      }\n      return;\n    }\n\n    write(stringified);\n  };\n}\n\nfunction writeLogEvent(\n  event: LogEvent,\n  logLevelFilter: $Keys<typeof LOG_LEVELS>,\n): void {\n  if (LOG_LEVELS[logLevelFilter] < LOG_LEVELS[event.level]) {\n    return;\n  }\n  switch (event.level) {\n    case 'info':\n    case 'progress':\n    case 'success':\n    case 'verbose':\n      writeToStdout(event, logLevelFilter);\n      break;\n    case 'warn':\n    case 'error':\n      writeToStderr(event, logLevelFilter);\n      break;\n  }\n}\n\nfunction progressEventToJSONEvent(\n  progressEvent: BuildProgressEvent,\n): ?JSONProgressEvent {\n  switch (progressEvent.phase) {\n    case 'transforming':\n      return {\n        type: 'buildProgress',\n        phase: 'transforming',\n        filePath: progressEvent.filePath,\n      };\n    case 'bundling':\n      return {\n        type: 'buildProgress',\n        phase: 'bundling',\n      };\n    case 'optimizing':\n    case 'packaging':\n      return {\n        type: 'buildProgress',\n        phase: progressEvent.phase,\n        bundleName: progressEvent.bundle.displayName,\n      };\n  }\n}\n\ntype JSONReportEvent =\n  | LogEvent\n  | {|+type: 'buildStart'|}\n  | {|+type: 'buildFailure', message: string|}\n  | {|\n      +type: 'buildSuccess',\n      buildTime: number,\n      bundles?: $PropertyType<BuildMetrics, 'bundles'>,\n    |}\n  | JSONProgressEvent;\n\ntype JSONProgressEvent =\n  | {|\n      +type: 'buildProgress',\n      phase: 'transforming',\n      filePath: string,\n    |}\n  | {|+type: 'buildProgress', phase: 'bundling'|}\n  | {|\n      +type: 'buildProgress',\n      +phase: 'packaging' | 'optimizing',\n      bundleName?: string,\n    |};\n"
  },
  {
    "path": "packages/reporters/lsp-reporter/README.md",
    "content": "# LSP Reporter\n\nThis reporter is for sending diagnostics to a running [LSP server](../../utils/parcel-lsp/). This is inteded to be used alongside the Parcel VS Code extension.\n\nIt creates an IPC server for responding to requests for diagnostics from the LSP server, and pushes diagnostics to the LSP server.\n\n## Usage\n\nThis reporter is run with Parcel build, watch, and serve commands by passing `@parcel/reporter-lsp` to the `--reporter` option.\n\n```sh\nparcel serve --reporter @parcel/reporter-lsp\n```\n"
  },
  {
    "path": "packages/reporters/lsp-reporter/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-lsp\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/LspReporter.js\",\n  \"source\": \"src/LspReporter.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/lsp-protocol\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"node-ipc\": \"^9.2.1\",\n    \"nullthrows\": \"^1.1.1\",\n    \"ps-node\": \"^0.1.6\",\n    \"vscode-jsonrpc\": \"^8.2.1\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/lsp-reporter/src/LspReporter.js",
    "content": "// @flow strict-local\n\nimport type {Diagnostic as ParcelDiagnostic} from '@parcel/diagnostic';\nimport type {BundleGraph, FilePath, PackagedBundle} from '@parcel/types';\nimport type {Program, Query} from 'ps-node';\nimport type {Diagnostic, DocumentUri} from 'vscode-languageserver';\nimport type {MessageConnection} from 'vscode-jsonrpc/node';\nimport type {ParcelSeverity} from './utils';\n\nimport {\n  DefaultMap,\n  getProgressMessage,\n  makeDeferredWithPromise,\n} from '@parcel/utils';\nimport {Reporter} from '@parcel/plugin';\nimport path from 'path';\nimport os from 'os';\nimport url from 'url';\nimport fs from 'fs';\nimport nullthrows from 'nullthrows';\nimport * as ps from 'ps-node';\nimport {promisify} from 'util';\n\nimport {createServer} from './ipc';\nimport {\n  type PublishDiagnostic,\n  NotificationBuildStatus,\n  NotificationWorkspaceDiagnostics,\n  RequestDocumentDiagnostics,\n  RequestImporters,\n} from '@parcel/lsp-protocol';\n\nimport {\n  DiagnosticSeverity,\n  DiagnosticTag,\n  normalizeFilePath,\n  parcelSeverityToLspSeverity,\n} from './utils';\nimport type {FSWatcher} from 'fs';\n\nconst lookupPid: Query => Program[] = promisify(ps.lookup);\n\nconst ignoreFail = func => {\n  try {\n    func();\n  } catch (e) {\n    /**/\n  }\n};\n\nconst BASEDIR = fs.realpathSync(path.join(os.tmpdir(), 'parcel-lsp'));\nconst SOCKET_FILE = path.join(BASEDIR, `parcel-${process.pid}`);\nconst META_FILE = path.join(BASEDIR, `parcel-${process.pid}.json`);\n\nlet workspaceDiagnostics: DefaultMap<\n  string,\n  Array<Diagnostic>,\n> = new DefaultMap(() => []);\n\nconst getWorkspaceDiagnostics = (): Array<PublishDiagnostic> =>\n  [...workspaceDiagnostics].map(([uri, diagnostics]) => ({uri, diagnostics}));\n\nlet server;\nlet connections: Array<MessageConnection> = [];\n\nlet bundleGraphDeferrable =\n  makeDeferredWithPromise<?BundleGraph<PackagedBundle>>();\nlet bundleGraph: Promise<?BundleGraph<PackagedBundle>> =\n  bundleGraphDeferrable.promise;\n\nlet watchStarted = false;\nlet lspStarted = false;\nlet watchStartPromise;\n\nconst LSP_SENTINEL_FILENAME = 'lsp-server';\nconst LSP_SENTINEL_FILE = path.join(BASEDIR, LSP_SENTINEL_FILENAME);\n\nasync function watchLspActive(): Promise<FSWatcher> {\n  // Check for lsp-server when reporter is first started\n  try {\n    await fs.promises.access(LSP_SENTINEL_FILE, fs.constants.F_OK);\n    lspStarted = true;\n  } catch {\n    //\n  }\n\n  return fs.watch(BASEDIR, (eventType: string, filename: string) => {\n    switch (eventType) {\n      case 'rename':\n        if (filename === LSP_SENTINEL_FILENAME) {\n          fs.access(LSP_SENTINEL_FILE, fs.constants.F_OK, err => {\n            if (err) {\n              lspStarted = false;\n            } else {\n              lspStarted = true;\n            }\n          });\n        }\n    }\n  });\n}\n\nasync function doWatchStart(options) {\n  await fs.promises.mkdir(BASEDIR, {recursive: true});\n\n  // For each existing file, check if the pid matches a running process.\n  // If no process matches, delete the file, assuming it was orphaned\n  // by a process that quit unexpectedly.\n  for (let filename of fs.readdirSync(BASEDIR)) {\n    if (filename.endsWith('.json')) continue;\n    let pid = parseInt(filename.slice('parcel-'.length), 10);\n    let resultList = await lookupPid({pid});\n    if (resultList.length > 0) continue;\n    fs.unlinkSync(path.join(BASEDIR, filename));\n    ignoreFail(() => fs.unlinkSync(path.join(BASEDIR, filename + '.json')));\n  }\n\n  server = await createServer(SOCKET_FILE, connection => {\n    // console.log('got connection');\n    connections.push(connection);\n    connection.onClose(() => {\n      connections = connections.filter(c => c !== connection);\n    });\n\n    connection.onRequest(RequestDocumentDiagnostics, async uri => {\n      let graph = await bundleGraph;\n      if (!graph) return;\n\n      return getDiagnosticsUnusedExports(graph, uri);\n    });\n\n    connection.onRequest(RequestImporters, async params => {\n      let graph = await bundleGraph;\n      if (!graph) return null;\n\n      return getImporters(graph, params);\n    });\n\n    sendDiagnostics();\n  });\n  await fs.promises.writeFile(\n    META_FILE,\n    JSON.stringify({\n      projectRoot: options.projectRoot,\n      pid: process.pid,\n      argv: process.argv,\n    }),\n  );\n}\n\nwatchLspActive();\n\nexport default (new Reporter({\n  async report({event, options}) {\n    if (event.type === 'watchStart') {\n      watchStarted = true;\n    }\n\n    if (watchStarted && lspStarted) {\n      if (!watchStartPromise) {\n        watchStartPromise = doWatchStart(options);\n      }\n      await watchStartPromise;\n    }\n\n    switch (event.type) {\n      case 'watchStart': {\n        break;\n      }\n\n      case 'buildStart': {\n        bundleGraphDeferrable = makeDeferredWithPromise();\n        bundleGraph = bundleGraphDeferrable.promise;\n        updateBuildState('start');\n        clearDiagnostics();\n        break;\n      }\n      case 'buildSuccess':\n        bundleGraphDeferrable.deferred.resolve(event.bundleGraph);\n        updateBuildState('end');\n        sendDiagnostics();\n        break;\n      case 'buildFailure': {\n        bundleGraphDeferrable.deferred.resolve(undefined);\n        updateDiagnostics(event.diagnostics, 'error', options.projectRoot);\n        updateBuildState('end');\n        sendDiagnostics();\n        break;\n      }\n      case 'log':\n        if (\n          event.diagnostics != null &&\n          (event.level === 'error' ||\n            event.level === 'warn' ||\n            event.level === 'info' ||\n            event.level === 'verbose')\n        ) {\n          updateDiagnostics(\n            event.diagnostics,\n            event.level,\n            options.projectRoot,\n          );\n        }\n        break;\n      case 'buildProgress': {\n        let message = getProgressMessage(event);\n        if (message != null) {\n          updateBuildState('progress', message);\n        }\n        break;\n      }\n      case 'watchEnd':\n        connections.forEach(c => c.end());\n        await server.close();\n        ignoreFail(() => fs.unlinkSync(META_FILE));\n        break;\n    }\n  },\n}): Reporter);\n\nfunction updateBuildState(\n  state: 'start' | 'progress' | 'end',\n  message: string | void,\n) {\n  connections.forEach(c =>\n    c.sendNotification(NotificationBuildStatus, state, message),\n  );\n}\n\nfunction clearDiagnostics() {\n  workspaceDiagnostics.clear();\n}\nfunction sendDiagnostics() {\n  // console.log('send', getWorkspaceDiagnostics());\n  connections.forEach(c =>\n    c.sendNotification(\n      NotificationWorkspaceDiagnostics,\n      getWorkspaceDiagnostics(),\n    ),\n  );\n}\n\nfunction updateDiagnostics(\n  parcelDiagnostics: Array<ParcelDiagnostic>,\n  parcelSeverity: ParcelSeverity,\n  projectRoot: FilePath,\n): void {\n  for (let diagnostic of parcelDiagnostics) {\n    const codeFrames = diagnostic.codeFrames;\n    if (codeFrames == null) {\n      continue;\n    }\n\n    const firstCodeFrame = codeFrames[0];\n    const filePath = firstCodeFrame.filePath;\n    if (filePath == null) {\n      continue;\n    }\n\n    // We use the first highlight of the first codeFrame as the main Diagnostic,\n    // and we place everything else in the current Parcel diagnostic\n    // in relatedInformation\n    // https://code.visualstudio.com/api/references/vscode-api#DiagnosticRelatedInformation\n    const firstFrameHighlight = codeFrames[0].codeHighlights[0];\n    if (firstFrameHighlight == null) {\n      continue;\n    }\n\n    const relatedInformation = [];\n    for (const codeFrame of codeFrames) {\n      for (const highlight of codeFrame.codeHighlights) {\n        const filePath = codeFrame.filePath;\n        if (highlight === firstFrameHighlight || filePath == null) {\n          continue;\n        }\n\n        relatedInformation.push({\n          location: {\n            uri: `file://${normalizeFilePath(filePath, projectRoot)}`,\n            range: {\n              start: {\n                line: highlight.start.line - 1,\n                character: highlight.start.column - 1,\n              },\n              end: {\n                line: highlight.end.line - 1,\n                character: highlight.end.column,\n              },\n            },\n          },\n          message: highlight.message ?? diagnostic.message,\n        });\n      }\n    }\n\n    workspaceDiagnostics\n      .get(`file://${normalizeFilePath(filePath, projectRoot)}`)\n      .push({\n        range: {\n          start: {\n            line: firstFrameHighlight.start.line - 1,\n            character: firstFrameHighlight.start.column - 1,\n          },\n          end: {\n            line: firstFrameHighlight.end.line - 1,\n            character: firstFrameHighlight.end.column,\n          },\n        },\n        source: diagnostic.origin,\n        severity: parcelSeverityToLspSeverity(parcelSeverity),\n        message:\n          diagnostic.message +\n          (firstFrameHighlight.message == null\n            ? ''\n            : ' ' + firstFrameHighlight.message),\n        relatedInformation,\n      });\n  }\n}\n\nfunction getDiagnosticsUnusedExports(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  document: string,\n): Array<Diagnostic> {\n  let filename = url.fileURLToPath(document);\n  let diagnostics = [];\n\n  let asset = bundleGraph.traverse((node, context, actions) => {\n    if (node.type === 'asset' && node.value.filePath === filename) {\n      actions.stop();\n      return node.value;\n    }\n  });\n\n  if (asset) {\n    const generateDiagnostic = (loc, type) => ({\n      range: {\n        start: {\n          line: loc.start.line - 1,\n          character: loc.start.column - 1,\n        },\n        end: {\n          line: loc.end.line - 1,\n          character: loc.end.column,\n        },\n      },\n      source: '@parcel/core',\n      severity: DiagnosticSeverity.Hint,\n      message: `Unused ${type}.`,\n      tags: [DiagnosticTag.Unnecessary],\n    });\n\n    let usedSymbols = bundleGraph.getUsedSymbols(asset);\n    if (usedSymbols) {\n      for (let [exported, symbol] of asset.symbols) {\n        if (!usedSymbols.has(exported)) {\n          if (symbol.loc) {\n            diagnostics.push(generateDiagnostic(symbol.loc, 'export'));\n          }\n        }\n      }\n      // if (usedSymbols.size === 0 && asset.sideEffects !== false) {\n      //   diagnostics.push({\n      //     range: {\n      //       start: {\n      //         line: 0,\n      //         character: 0,\n      //       },\n      //       end: {\n      //         line: 0,\n      //         character: 1,\n      //       },\n      //     },\n      //     source: '@parcel/core',\n      //     severity: DiagnosticSeverity.Warning,\n      //     message: `Asset has no used exports, but is not marked as sideEffect-free so it cannot be excluded automatically.`,\n      //   });\n      // }\n    }\n\n    for (let dep of asset.getDependencies()) {\n      let usedSymbols = bundleGraph.getUsedSymbols(dep);\n      if (usedSymbols) {\n        for (let [exported, symbol] of dep.symbols) {\n          if (!usedSymbols.has(exported) && symbol.isWeak && symbol.loc) {\n            diagnostics.push(generateDiagnostic(symbol.loc, 'reexport'));\n          }\n        }\n      }\n    }\n  }\n  return diagnostics;\n}\n\n// function getDefinition(\n//   bundleGraph: BundleGraph<PackagedBundle>,\n//   document: string,\n//   position: Position,\n// ): Array<LocationLink> | void {\n//   let filename = url.fileURLToPath(document);\n\n//   let asset = bundleGraph.traverse((node, context, actions) => {\n//     if (node.type === 'asset' && node.value.filePath === filename) {\n//       actions.stop();\n//       return node.value;\n//     }\n//   });\n\n//   if (asset) {\n//     for (let dep of bundleGraph.getDependencies(asset)) {\n//       let loc = dep.loc;\n//       if (loc && isInRange(loc, position)) {\n//         let resolution = bundleGraph.getResolvedAsset(dep);\n//         if (resolution) {\n//           return [\n//             {\n//               originSelectionRange: {\n//                 start: {\n//                   line: loc.start.line - 1,\n//                   character: loc.start.column - 1,\n//                 },\n//                 end: {line: loc.end.line - 1, character: loc.end.column},\n//               },\n//               targetUri: `file://${resolution.filePath}`,\n//               targetRange: RANGE_DUMMY,\n//               targetSelectionRange: RANGE_DUMMY,\n//             },\n//           ];\n//         }\n//       }\n//     }\n//   }\n// }\n\nfunction getImporters(\n  bundleGraph: BundleGraph<PackagedBundle>,\n  document: string,\n): Array<DocumentUri> | null {\n  let filename = url.fileURLToPath(document);\n\n  let asset = bundleGraph.traverse((node, context, actions) => {\n    if (node.type === 'asset' && node.value.filePath === filename) {\n      actions.stop();\n      return node.value;\n    }\n  });\n\n  if (asset) {\n    let incoming = bundleGraph.getIncomingDependencies(asset);\n    return incoming\n      .filter(dep => dep.sourcePath != null)\n      .map(dep => `file://${nullthrows(dep.sourcePath)}`);\n  }\n  return null;\n}\n"
  },
  {
    "path": "packages/reporters/lsp-reporter/src/ipc.js",
    "content": "// @flow\nimport * as net from 'net';\nimport type {\n  MessageReader,\n  MessageWriter,\n  MessageConnection,\n} from 'vscode-jsonrpc/node';\nimport {\n  createMessageConnection,\n  SocketMessageReader,\n  SocketMessageWriter,\n} from 'vscode-jsonrpc/node';\n\nfunction createClientPipeTransport(\n  pipeName: string,\n  onConnected: (reader: MessageReader, writer: MessageWriter) => void,\n): Promise<{|close: () => Promise<void>|}> {\n  return new Promise((resolve, reject) => {\n    let server: net.Server = net.createServer((socket: net.Socket) => {\n      onConnected(\n        new SocketMessageReader(socket),\n        new SocketMessageWriter(socket),\n      );\n    });\n    server.on('error', reject);\n    server.listen(pipeName, () => {\n      server.removeListener('error', reject);\n      resolve({\n        close() {\n          return new Promise((res, rej) => {\n            server.close(e => {\n              if (e) rej(e);\n              else res();\n            });\n          });\n        },\n      });\n    });\n  });\n}\n\nexport function createServer(\n  filename: string,\n  setup: (connection: MessageConnection) => void,\n): Promise<{|close: () => Promise<void>|}> {\n  return createClientPipeTransport(\n    filename,\n    (reader: MessageReader, writer: MessageWriter) => {\n      let connection = createMessageConnection(reader, writer);\n      connection.listen();\n\n      setup(connection);\n    },\n  );\n}\n"
  },
  {
    "path": "packages/reporters/lsp-reporter/src/utils.js",
    "content": "// @flow\nimport type {DiagnosticLogEvent, FilePath} from '@parcel/types';\nimport type {ODiagnosticSeverity} from 'vscode-languageserver';\n\nimport path from 'path';\n\nexport type ParcelSeverity = DiagnosticLogEvent['level'];\n\nexport function parcelSeverityToLspSeverity(\n  parcelSeverity: ParcelSeverity,\n): ODiagnosticSeverity {\n  switch (parcelSeverity) {\n    case 'error':\n      return DiagnosticSeverity.Error;\n    case 'warn':\n      return DiagnosticSeverity.Warning;\n    case 'info':\n      return DiagnosticSeverity.Information;\n    case 'verbose':\n      return DiagnosticSeverity.Hint;\n    default:\n      throw new Error('Unknown severity');\n  }\n}\n\nexport function normalizeFilePath(\n  filePath: FilePath,\n  projectRoot: FilePath,\n): FilePath {\n  return path.isAbsolute(filePath)\n    ? filePath\n    : path.join(projectRoot, filePath);\n}\n\n// export function isInRange(loc: SourceLocation, position: Position): boolean {\n//   let pos = {line: position.line + 1, column: position.character + 1};\n\n//   if (pos.line < loc.start.line || loc.end.line < pos.line) {\n//     return false;\n//   }\n//   if (pos.line === loc.start.line) {\n//     return loc.start.column <= pos.column;\n//   }\n//   if (pos.line === loc.end.line - 1) {\n//     return pos.column < loc.start.column;\n//   }\n//   return true;\n// }\n\n// /** This range is used when refering to a whole file and not a specific range. */\n// export const RANGE_DUMMY: Range = {\n//   start: {line: 0, character: 0},\n//   end: {line: 0, character: 0},\n// };\n\n// Copied over from vscode-languageserver to prevent the runtime dependency\nexport const DiagnosticTag = {\n  /**\n   * Unused or unnecessary code.\n   *\n   * Clients are allowed to render diagnostics with this tag faded out instead of having\n   * an error squiggle.\n   */\n  // $FlowFixMe\n  Unnecessary: (1: ODiagnosticTag),\n  /**\n   * Deprecated or obsolete code.\n   *\n   * Clients are allowed to rendered diagnostics with this tag strike through.\n   */\n  // $FlowFixMe\n  Deprecated: (2: ODiagnosticTag),\n};\nexport const DiagnosticSeverity = {\n  /**\n   * Reports an error.\n   */\n  // $FlowFixMe\n  Error: (1: ODiagnosticSeverity),\n  /**\n   * Reports a warning.\n   */\n  // $FlowFixMe\n  Warning: (2: ODiagnosticSeverity),\n  /**\n   * Reports an information.\n   */\n  // $FlowFixMe\n  Information: (3: ODiagnosticSeverity),\n  /**\n   * Reports a hint.\n   */\n  // $FlowFixMe\n  Hint: (4: ODiagnosticSeverity),\n};\n"
  },
  {
    "path": "packages/reporters/sourcemap-visualiser/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-sourcemap-visualiser\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SourceMapVisualiser.js\",\n  \"source\": \"src/SourceMapVisualiser.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"@parcel/types\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/sourcemap-visualiser/src/SourceMapVisualiser.js",
    "content": "// @flow\nimport path from 'path';\nimport nullthrows from 'nullthrows';\nimport {Reporter} from '@parcel/plugin';\nimport {relativePath} from '@parcel/utils';\n\nexport default (new Reporter({\n  async report({event, options, logger}) {\n    if (event.type === 'buildSuccess') {\n      let bundles = [];\n      for (let bundle of event.bundleGraph.getBundles()) {\n        let p = bundle.filePath;\n        if (p) {\n          let mapFilePath = p + '.map';\n          let hasMap = await options.outputFS.exists(mapFilePath);\n          if (hasMap) {\n            let map = JSON.parse(\n              await options.outputFS.readFile(mapFilePath, 'utf-8'),\n            );\n\n            let mappedSources = await Promise.all(\n              map.sources.map(async (sourceName, index) => {\n                let sourceContent = map.sourcesContent?.[index];\n                if (sourceContent != null) {\n                  try {\n                    sourceContent = await options.inputFS.readFile(\n                      path.resolve(options.projectRoot, sourceName),\n                      'utf-8',\n                    );\n                  } catch (e) {\n                    logger.warn({\n                      message: `Error while loading content of ${sourceName}, ${e.message}`,\n                    });\n                  }\n                }\n\n                return {\n                  name: sourceName,\n                  content: sourceContent ?? '',\n                };\n              }),\n            );\n\n            let fileName = relativePath(options.projectRoot, p);\n            bundles.push({\n              name: fileName,\n              mappings: map.mappings,\n              names: map.names,\n              sources: mappedSources,\n              content: await options.outputFS.readFile(\n                nullthrows(bundle.filePath),\n                'utf-8',\n              ),\n            });\n          }\n        }\n      }\n\n      await options.outputFS.writeFile(\n        path.join(options.projectRoot, 'sourcemap-info.json'),\n        JSON.stringify(bundles),\n      );\n\n      logger.log({\n        message: `Goto https://sourcemap-visualiser.now.sh/ and upload the generated sourcemap-info.json file to visualise and debug the sourcemaps.`,\n      });\n    }\n  },\n}): Reporter);\n"
  },
  {
    "path": "packages/reporters/tracer/package.json",
    "content": "{\n  \"name\": \"@parcel/reporter-tracer\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/TracerReporter.js\",\n  \"source\": \"src/TracerReporter.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"chrome-trace-event\": \"^1.0.3\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/reporters/tracer/src/TracerReporter.js",
    "content": "// @flow\nimport invariant from 'assert';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport {Reporter} from '@parcel/plugin';\nimport {Tracer} from 'chrome-trace-event';\n\n// We need to maintain some state here to ensure we write to the same output, there should only be one\n// instance of this reporter (this gets asserted below)\nlet tracer;\nlet writeStream = null;\n\nfunction millisecondsToMicroseconds(milliseconds: number) {\n  return Math.floor(milliseconds * 1000);\n}\n\n// TODO: extract this to utils as it's also used in packages/core/workers/src/WorkerFarm.js\nfunction getTimeId() {\n  let now = new Date();\n  return (\n    String(now.getFullYear()) +\n    String(now.getMonth() + 1).padStart(2, '0') +\n    String(now.getDate()).padStart(2, '0') +\n    '-' +\n    String(now.getHours()).padStart(2, '0') +\n    String(now.getMinutes()).padStart(2, '0') +\n    String(now.getSeconds()).padStart(2, '0')\n  );\n}\n\nexport default (new Reporter({\n  report({event, options, logger}) {\n    let filename;\n    let filePath;\n    switch (event.type) {\n      case 'buildStart':\n        invariant(tracer == null, 'Tracer multiple initialisation');\n        tracer = new Tracer();\n        filename = `parcel-trace-${getTimeId()}.json`;\n        filePath = path.join(options.projectRoot, filename);\n        invariant(\n          writeStream == null,\n          'Trace write stream multiple initialisation',\n        );\n        logger.info({\n          message: `Writing trace to ${filename}. See https://parceljs.org/features/profiling/#analysing-traces for more information on working with traces.`,\n        });\n        writeStream = options.outputFS.createWriteStream(filePath);\n        nullthrows(tracer).pipe(nullthrows(writeStream));\n        break;\n      case 'trace':\n        // Due to potential race conditions at the end of the build, we ignore any trace events that occur\n        // after we've closed the write stream.\n        if (tracer === null) return;\n\n        tracer.completeEvent({\n          name: event.name,\n          cat: event.categories,\n          args: event.args,\n          ts: millisecondsToMicroseconds(event.ts),\n          dur: millisecondsToMicroseconds(event.duration),\n          tid: event.tid,\n          pid: event.pid,\n        });\n        break;\n      case 'buildSuccess':\n      case 'buildFailure':\n        nullthrows(tracer).flush();\n        tracer = null;\n        // We explicitly trigger `end` on the writeStream for the trace, then we need to wait for\n        // the `close` event before resolving the promise this report function returns to ensure\n        // that the file has been properly closed and moved from it's temp location before Parcel\n        // shuts down.\n        return new Promise((resolve, reject) => {\n          nullthrows(writeStream).once('close', err => {\n            writeStream = null;\n            if (err) {\n              reject(err);\n            } else {\n              resolve();\n            }\n          });\n          nullthrows(writeStream).end();\n        });\n    }\n  },\n}): Reporter);\n"
  },
  {
    "path": "packages/resolvers/default/package.json",
    "content": "{\n  \"name\": \"@parcel/resolver-default\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/DefaultResolver.js\",\n  \"source\": \"src/DefaultResolver.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/node-resolver-core\": \"3.7.4\",\n    \"@parcel/plugin\": \"2.16.4\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\"\n  }\n}\n"
  },
  {
    "path": "packages/resolvers/default/src/DefaultResolver.js",
    "content": "// @flow\n\nimport {Resolver} from '@parcel/plugin';\nimport NodeResolver from '@parcel/node-resolver-core';\n\n// Throw user friendly errors on special webpack loader syntax\n// ex. `imports-loader?$=jquery!./example.js`\nconst WEBPACK_IMPORT_REGEX = /^\\w+-loader(?:\\?\\S*)?!/;\n\nexport default (new Resolver({\n  async loadConfig({config, options, logger}) {\n    let conf = await config.getConfig([], {\n      packageKey: '@parcel/resolver-default',\n    });\n\n    return new NodeResolver({\n      fs: options.inputFS,\n      projectRoot: options.projectRoot,\n      packageManager: options.packageManager,\n      shouldAutoInstall: options.shouldAutoInstall,\n      mode: options.mode,\n      logger,\n      packageExports: conf?.contents?.packageExports ?? false,\n    });\n  },\n  resolve({dependency, specifier, config: resolver}) {\n    if (WEBPACK_IMPORT_REGEX.test(dependency.specifier)) {\n      throw new Error(\n        `The import path: ${dependency.specifier} is using webpack specific loader import syntax, which isn't supported by Parcel.`,\n      );\n    }\n\n    return resolver.resolve({\n      filename: specifier,\n      specifierType: dependency.specifierType,\n      range: dependency.range,\n      parent: dependency.resolveFrom,\n      env: dependency.env,\n      sourcePath: dependency.sourcePath,\n      loc: dependency.loc,\n      packageConditions: dependency.packageConditions,\n    });\n  },\n}): Resolver);\n"
  },
  {
    "path": "packages/resolvers/glob/package.json",
    "content": "{\n  \"name\": \"@parcel/resolver-glob\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/GlobResolver.js\",\n  \"source\": \"src/GlobResolver.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/node-resolver-core\": \"3.7.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/resolvers/glob/src/GlobResolver.js",
    "content": "// @flow\nimport {Resolver} from '@parcel/plugin';\nimport {\n  isGlob,\n  glob,\n  globToRegex,\n  relativePath,\n  normalizeSeparators,\n} from '@parcel/utils';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\nimport ThrowableDiagnostic, {\n  convertSourceLocationToHighlight,\n} from '@parcel/diagnostic';\nimport NodeResolver from '@parcel/node-resolver-core';\nimport invariant from 'assert';\n\nfunction errorToThrowableDiagnostic(error, dependency): ThrowableDiagnostic {\n  return new ThrowableDiagnostic({\n    diagnostic: {\n      message: error,\n      codeFrames: dependency.loc\n        ? [\n            {\n              codeHighlights: [\n                convertSourceLocationToHighlight(dependency.loc),\n              ],\n            },\n          ]\n        : undefined,\n    },\n  });\n}\n\nexport default (new Resolver({\n  async resolve({dependency, options, specifier, pipeline, logger}) {\n    if (!isGlob(specifier)) {\n      return;\n    }\n\n    let sourceAssetType = nullthrows(dependency.sourceAssetType);\n    let sourceFile = nullthrows(\n      dependency.resolveFrom ?? dependency.sourcePath,\n    );\n\n    let error;\n    if (sourceAssetType !== 'js' && sourceAssetType !== 'css') {\n      error = `Glob imports are not supported in ${sourceAssetType} files.`;\n    } else if (\n      dependency.specifierType === 'url' &&\n      !dependency.meta?.isCSSImport\n    ) {\n      error = 'Glob imports are not supported in URL dependencies.';\n    }\n\n    if (error) {\n      throw errorToThrowableDiagnostic(error, dependency);\n    }\n\n    let invalidateOnFileCreate = [];\n    let invalidateOnFileChange = new Set();\n\n    switch (specifier[0]) {\n      // Path specifier\n      case '.': {\n        specifier = path.resolve(path.dirname(sourceFile), specifier);\n        break;\n      }\n\n      // Absolute path. Make the glob relative to the project root.\n      case '/': {\n        specifier = path.resolve(options.projectRoot, specifier.slice(1));\n        break;\n      }\n\n      // Tilde path. Package relative. Resolve relative to nearest node_modules\n      // directory, the nearest directory with package.json or the project\n      // root - whichever comes first.\n      case '~': {\n        let dir = path.dirname(sourceFile);\n        let pkgPath = nullthrows(\n          options.inputFS.findAncestorFile(\n            ['package.json'],\n            dir,\n            options.projectRoot,\n          ),\n        );\n        specifier = path.resolve(path.dirname(pkgPath), specifier.slice(2));\n        break;\n      }\n\n      // Support package-ish specifiers like:\n      //   foo      (node_module)\n      //   @foo/bar (scoped node_module)\n      //\n      // First we resolve the initial portion using NodeResolver, then we tack\n      // on the remaining glob.\n      default: {\n        // Globs are not paths - so they always use / (see https://github.com/micromatch/micromatch#backslashes)\n        let splitOn = specifier.indexOf('/');\n        if (specifier[0] === '@') {\n          splitOn = specifier.indexOf('/', splitOn + 1);\n        }\n\n        // Since we've already asserted earlier that there is a glob present, it shouldn't be\n        // possible for there to be only a package here without any other path parts (e.g. `import('pkg')`)\n        invariant(splitOn !== -1);\n\n        let pkg = specifier.substring(0, splitOn);\n        let rest = specifier.substring(splitOn + 1);\n\n        // This initialisation code is copied from the DefaultResolver\n        const resolver = new NodeResolver({\n          fs: options.inputFS,\n          projectRoot: options.projectRoot,\n          packageManager: options.shouldAutoInstall\n            ? options.packageManager\n            : undefined,\n          mode: options.mode,\n          logger,\n        });\n\n        let result;\n        try {\n          result = await resolver.resolve({\n            filename: pkg + '/package.json',\n            parent: dependency.resolveFrom,\n            specifierType: 'esm',\n            env: dependency.env,\n            sourcePath: dependency.sourcePath,\n          });\n        } catch (err) {\n          if (err instanceof ThrowableDiagnostic) {\n            // Return instead of throwing so we can provide invalidations.\n            return {\n              diagnostics: err.diagnostics,\n              invalidateOnFileCreate,\n              invalidateOnFileChange: [...invalidateOnFileChange],\n            };\n          } else {\n            throw err;\n          }\n        }\n\n        if (!result || !result.filePath) {\n          throw errorToThrowableDiagnostic(\n            `Unable to resolve ${pkg} from ${sourceFile} when resolving specifier ${specifier}`,\n            dependency,\n          );\n        }\n\n        specifier = path.resolve(path.dirname(result.filePath), rest);\n        if (result.invalidateOnFileChange) {\n          for (let f of result.invalidateOnFileChange) {\n            invalidateOnFileChange.add(f);\n          }\n        }\n        if (result.invalidateOnFileCreate) {\n          invalidateOnFileCreate.push(...result.invalidateOnFileCreate);\n        }\n      }\n    }\n\n    let normalized = normalizeSeparators(specifier);\n    let files = await glob(normalized, options.inputFS, {\n      onlyFiles: true,\n    });\n\n    let dir = path.dirname(sourceFile);\n    let results = files.map(file => {\n      let relative = relativePath(dir, file);\n      if (pipeline) {\n        relative = `${pipeline}:${relative}`;\n      }\n\n      return [file, relative];\n    });\n\n    let code = '';\n    if (sourceAssetType === 'js') {\n      let re = globToRegex(normalized, {capture: true});\n      let matches = {};\n      for (let [file, relative] of results) {\n        let match = file.match(re);\n        if (!match) continue;\n        let parts = match\n          .slice(1)\n          .filter(Boolean)\n          .reduce((a, p) => a.concat(p.split('/')), []);\n        set(matches, parts, relative);\n      }\n\n      let {value, imports} = generate(matches, dependency.priority === 'lazy');\n      code = imports + 'module.exports = ' + value;\n    } else if (sourceAssetType === 'css') {\n      for (let [, relative] of results) {\n        code += `@import \"${relative}\";\\n`;\n      }\n    }\n\n    invalidateOnFileCreate.push({glob: normalized});\n\n    return {\n      filePath: path.join(\n        dir,\n        path.basename(specifier, path.extname(specifier)) +\n          '.' +\n          sourceAssetType,\n      ),\n      code,\n      invalidateOnFileCreate,\n      invalidateOnFileChange: [...invalidateOnFileChange],\n      pipeline: null,\n      priority: 'sync',\n    };\n  },\n}): Resolver);\n\nfunction set(obj, path, value) {\n  for (let i = 0; i < path.length - 1; i++) {\n    let part = path[i];\n\n    if (obj[part] == null) {\n      obj[part] = {};\n    }\n\n    obj = obj[part];\n  }\n\n  obj[path[path.length - 1]] = value;\n}\n\nfunction generate(matches, isAsync, indent = '', count = 0) {\n  if (typeof matches === 'string') {\n    if (isAsync) {\n      return {\n        imports: '',\n        value: `() => import(${JSON.stringify(matches)})`,\n        count,\n      };\n    }\n\n    let key = `_temp${count++}`;\n    return {\n      imports: `const ${key} = require(${JSON.stringify(matches)});`,\n      value: key,\n      count,\n    };\n  }\n\n  let imports = '';\n  let res = indent + '{';\n\n  let first = true;\n  for (let key in matches) {\n    if (!first) {\n      res += ',';\n    }\n\n    let {\n      imports: i,\n      value,\n      count: c,\n    } = generate(matches[key], isAsync, indent + '  ', count);\n    imports += `${i}\\n`;\n    count = c;\n\n    res += `\\n${indent}  ${JSON.stringify(key)}: ${value}`;\n    first = false;\n  }\n\n  res += '\\n' + indent + '}';\n  return {imports, value: res, count};\n}\n"
  },
  {
    "path": "packages/resolvers/repl-runtimes/package.json",
    "content": "{\n  \"name\": \"@parcel/resolver-repl-runtimes\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"private\": true,\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"source\": \"src/REPLRuntimesResolver.js\",\n  \"engines\": {\n    \"parcel\": \"^2.11.0\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.12.2\"\n  }\n}\n"
  },
  {
    "path": "packages/resolvers/repl-runtimes/src/REPLRuntimesResolver.js",
    "content": "// @flow\n\nimport {Resolver} from '@parcel/plugin';\nimport fs from 'fs';\nimport path from 'path';\n\nconst FILES = new Map([\n  [\n    '/app/packages/runtimes/js/src/helpers/cacheLoader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/cacheLoader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/get-worker-url.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/get-worker-url.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/browser/preload-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/browser/preload-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/browser/prefetch-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/browser/prefetch-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/browser/css-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/browser/css-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/browser/html-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/browser/html-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/browser/js-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/browser/js-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/browser/wasm-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/browser/wasm-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/browser/import-polyfill.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/browser/import-polyfill.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/worker/js-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/worker/js-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/worker/wasm-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/worker/wasm-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/node/css-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/node/css-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/node/html-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/node/html-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/node/js-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/node/js-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '/app/packages/runtimes/js/src/helpers/node/wasm-loader.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/runtimes/js/src/helpers/node/wasm-loader.js',\n      'utf8',\n    ),\n  ],\n  [\n    '@parcel/transformer-js/src/esmodule-helpers.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/transformers/js/src/esmodule-helpers.js',\n      'utf8',\n    ),\n  ],\n  [\n    '@parcel/transformer-react-refresh-wrap/src/helpers/helpers.js',\n    fs.readFileSync(\n      __dirname +\n        '/../../../../packages/transformers/react-refresh-wrap/src/helpers/helpers.js',\n      'utf8',\n    ),\n  ],\n]);\n\nconst REACT_ERROR_OVERLAY = fs.readFileSync(\n  __dirname + '/../../../../node_modules/@parcel/error-overlay/lib/index.js',\n  'utf8',\n);\n\nexport default (new Resolver({\n  resolve({dependency}) {\n    let {specifier, resolveFrom} = dependency;\n\n    if (resolveFrom && resolveFrom.startsWith('/app/packages/')) {\n      if (\n        specifier === '@parcel/error-overlay' &&\n        resolveFrom.startsWith('/app/packages/runtimes/react-refresh/src/')\n      ) {\n        return {\n          filePath: `/@parcel/error-overlay/lib/index.js`,\n          code: REACT_ERROR_OVERLAY,\n        };\n      }\n\n      let resolvedPath = specifier.startsWith('.')\n        ? path.resolve(path.dirname(resolveFrom), specifier)\n        : specifier;\n\n      let filePath;\n      let code;\n      if (FILES.has(resolvedPath)) {\n        filePath = resolvedPath;\n        code = FILES.get(resolvedPath);\n      } else if (FILES.has(resolvedPath + '.js')) {\n        filePath = resolvedPath + '.js';\n        code = FILES.get(resolvedPath + '.js');\n      }\n\n      if (filePath && code) {\n        return {\n          filePath: filePath.startsWith('@')\n            ? `/app/node_modules/${filePath}`\n            : filePath,\n          code,\n        };\n      }\n    }\n  },\n}): Resolver);\n"
  },
  {
    "path": "packages/runtimes/hmr/package.json",
    "content": "{\n  \"name\": \"@parcel/runtime-browser-hmr\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/HMRRuntime.js\",\n  \"source\": \"src/HMRRuntime.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/runtimes/hmr/src/HMRRuntime.js",
    "content": "// @flow strict-local\n\nimport {Runtime} from '@parcel/plugin';\nimport fs from 'fs';\nimport path from 'path';\n\n// Without this, the hmr-runtime.js is transpiled with the React Refresh swc transform because it\n// lives in `/app/packages/runtimes/...` and thus the `config` in the JSTransformer is actually the\n// user's package.json, and hmr-runtime.js is transpiled as a JSX asset.\nconst FILENAME =\n  // $FlowFixMe\n  process.env.PARCEL_BUILD_REPL && process.browser\n    ? '/' + __filename\n    : __filename;\n\nconst HMR_RUNTIME = fs.readFileSync(\n  path.join(__dirname, './loaders/hmr-runtime.js'),\n  'utf8',\n);\n\nexport default (new Runtime({\n  apply({bundle, bundleGraph, options}) {\n    if (\n      bundle.type !== 'js' ||\n      !options.hmrOptions ||\n      bundle.env.isLibrary ||\n      bundle.env.isWorklet() ||\n      bundle.env.sourceType === 'script'\n    ) {\n      return;\n    }\n\n    const {host, port} = options.hmrOptions;\n    let hasServerBundles = bundleGraph\n      .getEntryBundles()\n      .some(b => b.env.isServer());\n\n    return {\n      filePath: FILENAME,\n      code:\n        `var HMR_HOST = ${JSON.stringify(\n          host != null && host !== '0.0.0.0' ? host : null,\n        )};` +\n        `var HMR_PORT = ${JSON.stringify(\n          port != null &&\n            // Default to the HTTP port in the browser, only override\n            // in watch mode or if hmr port != serve port\n            (!options.serveOptions ||\n              options.serveOptions.port !== port ||\n              hasServerBundles)\n            ? port\n            : null,\n        )};` +\n        `var HMR_SERVER_PORT = ${JSON.stringify(port ?? null)};` +\n        `var HMR_SECURE = ${JSON.stringify(\n          !!(options.serveOptions && options.serveOptions.https),\n        )};` +\n        `var HMR_ENV_HASH = \"${bundle.env.id}\";` +\n        `var HMR_USE_SSE = ${\n          // $FlowFixMe\n          JSON.stringify(!!(process.env.PARCEL_BUILD_REPL && process.browser))\n        };` +\n        `module.bundle.HMR_BUNDLE_ID = ${JSON.stringify(bundle.id)};` +\n        HMR_RUNTIME,\n      isEntry: true,\n      env: {\n        sourceType: 'module',\n      },\n    };\n  },\n}): Runtime);\n"
  },
  {
    "path": "packages/runtimes/hmr/src/loaders/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config-browser\"\n}\n"
  },
  {
    "path": "packages/runtimes/hmr/src/loaders/hmr-runtime.js",
    "content": "// @flow\n/* global HMR_HOST, HMR_PORT, HMR_SERVER_PORT, HMR_ENV_HASH, HMR_SECURE, HMR_USE_SSE, chrome, browser, __parcel__import__, __parcel__importScripts__, ServiceWorkerGlobalScope */\n\n/*::\nimport type {\n  HMRAsset,\n  HMRMessage,\n} from '@parcel/reporter-dev-server/src/HMRServer.js';\ninterface ParcelRequire {\n  (string): mixed;\n  cache: {|[string]: ParcelModule|};\n  hotData: {|[string]: mixed|};\n  Module: any;\n  parent: ?ParcelRequire;\n  isParcelRequire: true;\n  modules: {|[string]: [Function, {|[string]: string|}]|};\n  HMR_BUNDLE_ID: string;\n  root: ParcelRequire;\n}\ninterface ParcelModule {\n  hot: {|\n    data: mixed,\n    accept(cb: (Function) => void): void,\n    dispose(cb: (mixed) => void): void,\n    // accept(deps: Array<string> | string, cb: (Function) => void): void,\n    // decline(): void,\n    _acceptCallbacks: Array<(Function) => void>,\n    _disposeCallbacks: Array<(mixed) => void>,\n  |};\n}\ninterface ExtensionContext {\n  runtime: {|\n    reload(): void,\n    getURL(url: string): string;\n    getManifest(): {manifest_version: number, ...};\n  |};\n}\ndeclare var module: {bundle: ParcelRequire, ...};\ndeclare var HMR_HOST: string;\ndeclare var HMR_PORT: string;\ndeclare var HMR_SERVER_PORT: string;\ndeclare var HMR_ENV_HASH: string;\ndeclare var HMR_SECURE: boolean;\ndeclare var HMR_USE_SSE: boolean;\ndeclare var chrome: ExtensionContext;\ndeclare var browser: ExtensionContext;\ndeclare var __parcel__import__: (string) => Promise<void>;\ndeclare var __parcel__importScripts__: (string) => Promise<void>;\ndeclare var globalThis: typeof self;\ndeclare var ServiceWorkerGlobalScope: Object;\n*/\n\nvar OVERLAY_ID = '__parcel__error__overlay__';\n\nvar OldModule = module.bundle.Module;\n\nfunction Module(moduleName) {\n  OldModule.call(this, moduleName);\n  this.hot = {\n    data: module.bundle.hotData[moduleName],\n    _acceptCallbacks: [],\n    _disposeCallbacks: [],\n    accept: function (fn) {\n      this._acceptCallbacks.push(fn || function () {});\n    },\n    dispose: function (fn) {\n      this._disposeCallbacks.push(fn);\n    },\n  };\n  module.bundle.hotData[moduleName] = undefined;\n}\nmodule.bundle.Module = Module;\nmodule.bundle.hotData = {};\n\nvar checkedAssets /*: {|[string]: boolean|} */,\n  disposedAssets /*: {|[string]: boolean|} */,\n  assetsToDispose /*: Array<[ParcelRequire, string]> */,\n  assetsToAccept /*: Array<[ParcelRequire, string]> */,\n  bundleNotFound = false;\n\nfunction getHostname() {\n  return (\n    HMR_HOST ||\n    (typeof location !== 'undefined' && location.protocol.indexOf('http') === 0\n      ? location.hostname\n      : 'localhost')\n  );\n}\n\nfunction getPort() {\n  return (\n    HMR_PORT ||\n    (typeof location !== 'undefined' ? location.port : HMR_SERVER_PORT)\n  );\n}\n\n// eslint-disable-next-line no-redeclare\nlet WebSocket = globalThis.WebSocket;\nif (!WebSocket && typeof module.bundle.root === 'function') {\n  try {\n    // eslint-disable-next-line no-global-assign\n    WebSocket = module.bundle.root('ws');\n  } catch {\n    // ignore.\n  }\n}\n\nvar hostname = getHostname();\nvar port = getPort();\nvar protocol =\n  HMR_SECURE ||\n  (typeof location !== 'undefined' &&\n    location.protocol === 'https:' &&\n    !['localhost', '127.0.0.1', '0.0.0.0'].includes(hostname))\n    ? 'wss'\n    : 'ws';\n\n// eslint-disable-next-line no-redeclare\nvar parent = module.bundle.parent;\nif (!parent || !parent.isParcelRequire) {\n  // Web extension context\n  var extCtx =\n    typeof browser === 'undefined'\n      ? typeof chrome === 'undefined'\n        ? null\n        : chrome\n      : browser;\n\n  // Safari doesn't support sourceURL in error stacks.\n  // eval may also be disabled via CSP, so do a quick check.\n  var supportsSourceURL = false;\n  try {\n    (0, eval)('throw new Error(\"test\"); //# sourceURL=test.js');\n  } catch (err) {\n    supportsSourceURL = err.stack.includes('test.js');\n  }\n\n  var ws;\n  if (HMR_USE_SSE) {\n    ws = new EventSource('/__parcel_hmr');\n  } else {\n    try {\n      // If we're running in the dev server's node runner, listen for messages on the parent port.\n      let {workerData, parentPort} = (module.bundle.root(\n        'node:worker_threads',\n      ) /*: any*/);\n      if (workerData?.__parcel) {\n        parentPort.on('message', async message => {\n          try {\n            await handleMessage(message);\n            parentPort.postMessage('updated');\n          } catch {\n            parentPort.postMessage('restart');\n          }\n        });\n\n        // After the bundle has finished running, notify the dev server that the HMR update is complete.\n        queueMicrotask(() => parentPort.postMessage('ready'));\n      }\n    } catch {\n      if (typeof WebSocket !== 'undefined') {\n        try {\n          ws = new WebSocket(\n            protocol + '://' + hostname + (port ? ':' + port : '') + '/',\n          );\n        } catch (err) {\n          // Ignore cloudflare workers error.\n          if (\n            err.message &&\n            !err.message.includes(\n              'Disallowed operation called within global scope',\n            )\n          ) {\n            console.error(err.message);\n          }\n        }\n      }\n    }\n  }\n\n  if (ws) {\n    // $FlowFixMe\n    ws.onmessage = async function (event /*: {data: string, ...} */) {\n      var data /*: HMRMessage */ = JSON.parse(event.data);\n      await handleMessage(data);\n    };\n\n    if (ws instanceof WebSocket) {\n      ws.onerror = function (e) {\n        if (e.message) {\n          console.error(e.message);\n        }\n      };\n\n      ws.onclose = function (e) {\n        if (process.env.PARCEL_BUILD_ENV !== 'test') {\n          console.warn('[parcel] 🚨 Connection to the HMR server was lost');\n        }\n      };\n    }\n  }\n}\n\nasync function handleMessage(data /*: HMRMessage */) {\n  checkedAssets = ({} /*: {|[string]: boolean|} */);\n  disposedAssets = ({} /*: {|[string]: boolean|} */);\n  assetsToAccept = [];\n  assetsToDispose = [];\n  bundleNotFound = false;\n\n  if (data.type === 'reload') {\n    fullReload();\n  } else if (data.type === 'update') {\n    // Remove error overlay if there is one\n    if (typeof document !== 'undefined') {\n      removeErrorOverlay();\n    }\n\n    let assets = data.assets;\n\n    // Handle HMR Update\n    let handled = assets.every(asset => {\n      return (\n        asset.type === 'css' ||\n        (asset.type === 'js' &&\n          hmrAcceptCheck(module.bundle.root, asset.id, asset.depsByBundle))\n      );\n    });\n\n    // Dispatch a custom event in case a bundle was not found. This might mean\n    // an asset on the server changed and we should reload the page. This event\n    // gives the client an opportunity to refresh without losing state\n    // (e.g. via React Server Components). If e.preventDefault() is not called,\n    // we will trigger a full page reload.\n    if (\n      handled &&\n      bundleNotFound &&\n      assets.some(a => a.envHash !== HMR_ENV_HASH) &&\n      typeof window !== 'undefined' &&\n      typeof CustomEvent !== 'undefined'\n    ) {\n      handled = !window.dispatchEvent(\n        new CustomEvent('parcelhmrreload', {cancelable: true}),\n      );\n    }\n\n    if (handled) {\n      console.clear();\n\n      // Dispatch custom event so other runtimes (e.g React Refresh) are aware.\n      if (typeof window !== 'undefined' && typeof CustomEvent !== 'undefined') {\n        window.dispatchEvent(new CustomEvent('parcelhmraccept'));\n      }\n\n      await hmrApplyUpdates(assets);\n\n      hmrDisposeQueue();\n\n      // Run accept callbacks. This will also re-execute other disposed assets in topological order.\n      let processedAssets = {};\n      for (let i = 0; i < assetsToAccept.length; i++) {\n        let id = assetsToAccept[i][1];\n\n        if (!processedAssets[id]) {\n          hmrAccept(assetsToAccept[i][0], id);\n          processedAssets[id] = true;\n        }\n      }\n    } else fullReload();\n  }\n\n  if (data.type === 'error') {\n    // Log parcel errors to console\n    for (let ansiDiagnostic of data.diagnostics.ansi) {\n      let stack = ansiDiagnostic.codeframe\n        ? ansiDiagnostic.codeframe\n        : ansiDiagnostic.stack;\n\n      console.error(\n        '🚨 [parcel]: ' +\n          ansiDiagnostic.message +\n          '\\n' +\n          stack +\n          '\\n\\n' +\n          ansiDiagnostic.hints.join('\\n'),\n      );\n    }\n\n    if (typeof document !== 'undefined') {\n      // Render the fancy html overlay\n      removeErrorOverlay();\n      var overlay = createErrorOverlay(data.diagnostics.html);\n      // $FlowFixMe\n      document.body.appendChild(overlay);\n    }\n  }\n}\n\nfunction removeErrorOverlay() {\n  var overlay = document.getElementById(OVERLAY_ID);\n  if (overlay) {\n    overlay.remove();\n    console.log('[parcel] ✨ Error resolved');\n  }\n}\n\nfunction createErrorOverlay(diagnostics) {\n  var overlay = document.createElement('div');\n  overlay.id = OVERLAY_ID;\n\n  let errorHTML =\n    '<div style=\"background: black; opacity: 0.85; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; font-family: Menlo, Consolas, monospace; z-index: 9999;\">';\n\n  for (let diagnostic of diagnostics) {\n    let stack = diagnostic.frames.length\n      ? diagnostic.frames.reduce((p, frame) => {\n          return `${p}\n<a href=\"${\n            protocol === 'wss' ? 'https' : 'http'\n          }://${hostname}:${port}/__parcel_launch_editor?file=${encodeURIComponent(\n            frame.location,\n          )}\" style=\"text-decoration: underline; color: #888\" onclick=\"fetch(this.href); return false\">${\n            frame.location\n          }</a>\n${frame.code}`;\n        }, '')\n      : diagnostic.stack;\n\n    errorHTML += `\n      <div>\n        <div style=\"font-size: 18px; font-weight: bold; margin-top: 20px;\">\n          🚨 ${diagnostic.message}\n        </div>\n        <pre>${stack}</pre>\n        <div>\n          ${diagnostic.hints.map(hint => '<div>💡 ' + hint + '</div>').join('')}\n        </div>\n        ${\n          diagnostic.documentation\n            ? `<div>📝 <a style=\"color: violet\" href=\"${diagnostic.documentation}\" target=\"_blank\">Learn more</a></div>`\n            : ''\n        }\n      </div>\n    `;\n  }\n\n  errorHTML += '</div>';\n\n  overlay.innerHTML = errorHTML;\n\n  return overlay;\n}\n\nfunction fullReload() {\n  if (typeof location !== 'undefined' && 'reload' in location) {\n    location.reload();\n  } else if (\n    typeof extCtx !== 'undefined' &&\n    extCtx &&\n    extCtx.runtime &&\n    extCtx.runtime.reload\n  ) {\n    extCtx.runtime.reload();\n  } else {\n    try {\n      let {workerData, parentPort} = (module.bundle.root(\n        'node:worker_threads',\n      ) /*: any*/);\n      if (workerData?.__parcel) {\n        parentPort.postMessage('restart');\n      }\n    } catch (err) {\n      console.error(\n        '[parcel] ⚠️ An HMR update was not accepted. Please restart the process.',\n      );\n    }\n  }\n}\n\nfunction getParents(bundle, id) /*: Array<[ParcelRequire, string]> */ {\n  var modules = bundle.modules;\n  if (!modules) {\n    return [];\n  }\n\n  var parents = [];\n  var k, d, dep;\n\n  for (k in modules) {\n    for (d in modules[k][1]) {\n      dep = modules[k][1][d];\n\n      if (dep === id || (Array.isArray(dep) && dep[dep.length - 1] === id)) {\n        parents.push([bundle, k]);\n      }\n    }\n  }\n\n  if (bundle.parent) {\n    parents = parents.concat(getParents(bundle.parent, id));\n  }\n\n  return parents;\n}\n\nfunction updateLink(link) {\n  var href = link.getAttribute('href');\n\n  if (!href) {\n    return;\n  }\n  var newLink = link.cloneNode();\n  newLink.onload = function () {\n    if (link.parentNode !== null) {\n      // $FlowFixMe\n      link.parentNode.removeChild(link);\n    }\n  };\n  newLink.setAttribute(\n    'href',\n    // $FlowFixMe\n    href.split('?')[0] + '?' + Date.now(),\n  );\n  // $FlowFixMe\n  link.parentNode.insertBefore(newLink, link.nextSibling);\n}\n\nvar cssTimeout = null;\nfunction reloadCSS() {\n  if (cssTimeout || typeof document === 'undefined') {\n    return;\n  }\n\n  cssTimeout = setTimeout(function () {\n    var links = document.querySelectorAll('link[rel=\"stylesheet\"]');\n    for (var i = 0; i < links.length; i++) {\n      // $FlowFixMe[incompatible-type]\n      var href /*: string */ = links[i].getAttribute('href');\n      var hostname = getHostname();\n      var servedFromHMRServer =\n        hostname === 'localhost'\n          ? new RegExp(\n              '^(https?:\\\\/\\\\/(0.0.0.0|127.0.0.1)|localhost):' + getPort(),\n            ).test(href)\n          : href.indexOf(hostname + ':' + getPort());\n      var absolute =\n        /^https?:\\/\\//i.test(href) &&\n        href.indexOf(location.origin) !== 0 &&\n        !servedFromHMRServer;\n      if (!absolute) {\n        updateLink(links[i]);\n      }\n    }\n\n    cssTimeout = null;\n  }, 50);\n}\n\nfunction hmrDownload(asset) {\n  if (asset.type === 'js') {\n    if (typeof document !== 'undefined') {\n      let script = document.createElement('script');\n      script.src = asset.url + '?t=' + Date.now();\n      if (asset.outputFormat === 'esmodule') {\n        script.type = 'module';\n      }\n      return new Promise((resolve, reject) => {\n        script.onload = () => resolve(script);\n        script.onerror = reject;\n        document.head?.appendChild(script);\n      });\n    } else if (typeof importScripts === 'function') {\n      // Worker scripts\n      if (asset.outputFormat === 'esmodule') {\n        return __parcel__import__(asset.url + '?t=' + Date.now());\n      } else {\n        return new Promise((resolve, reject) => {\n          try {\n            __parcel__importScripts__(asset.url + '?t=' + Date.now());\n            resolve();\n          } catch (err) {\n            reject(err);\n          }\n        });\n      }\n    }\n  }\n}\n\nasync function hmrApplyUpdates(assets) {\n  global.parcelHotUpdate = Object.create(null);\n\n  let scriptsToRemove;\n  try {\n    // If sourceURL comments aren't supported in eval, we need to load\n    // the update from the dev server over HTTP so that stack traces\n    // are correct in errors/logs. This is much slower than eval, so\n    // we only do it if needed (currently just Safari).\n    // https://bugs.webkit.org/show_bug.cgi?id=137297\n    // This path is also taken if a CSP disallows eval.\n    if (!supportsSourceURL) {\n      let promises = assets.map(asset =>\n        hmrDownload(asset)?.catch(err => {\n          // Web extension fix\n          if (\n            extCtx &&\n            extCtx.runtime &&\n            extCtx.runtime.getManifest().manifest_version == 3 &&\n            typeof ServiceWorkerGlobalScope != 'undefined' &&\n            global instanceof ServiceWorkerGlobalScope\n          ) {\n            extCtx.runtime.reload();\n            return;\n          }\n          throw err;\n        }),\n      );\n\n      scriptsToRemove = await Promise.all(promises);\n    }\n\n    assets.forEach(function (asset) {\n      hmrApply(module.bundle.root, asset);\n    });\n  } finally {\n    delete global.parcelHotUpdate;\n\n    if (scriptsToRemove) {\n      scriptsToRemove.forEach(script => {\n        if (script) {\n          document.head?.removeChild(script);\n        }\n      });\n    }\n  }\n}\n\nfunction hmrApply(bundle /*: ParcelRequire */, asset /*:  HMRAsset */) {\n  var modules = bundle.modules;\n  if (!modules) {\n    return;\n  }\n\n  if (asset.type === 'css') {\n    reloadCSS();\n  } else if (asset.type === 'js') {\n    let deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];\n    if (deps) {\n      if (modules[asset.id]) {\n        // Remove dependencies that are removed and will become orphaned.\n        // This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.\n        let oldDeps = modules[asset.id][1];\n        for (let dep in oldDeps) {\n          if (!deps[dep] || deps[dep] !== oldDeps[dep]) {\n            let id = oldDeps[dep];\n            let parents = getParents(module.bundle.root, id);\n            if (parents.length === 1) {\n              hmrDelete(module.bundle.root, id);\n            }\n          }\n        }\n      }\n\n      if (supportsSourceURL) {\n        // Global eval. We would use `new Function` here but browser\n        // support for source maps is better with eval.\n        (0, eval)(asset.output);\n      }\n\n      // $FlowFixMe\n      let fn = global.parcelHotUpdate[asset.id];\n      modules[asset.id] = [fn, deps];\n    }\n\n    // Always traverse to the parent bundle, even if we already replaced the asset in this bundle.\n    // This is required in case modules are duplicated. We need to ensure all instances have the updated code.\n    if (bundle.parent) {\n      hmrApply(bundle.parent, asset);\n    }\n  }\n}\n\nfunction hmrDelete(bundle, id) {\n  let modules = bundle.modules;\n  if (!modules) {\n    return;\n  }\n\n  if (modules[id]) {\n    // Collect dependencies that will become orphaned when this module is deleted.\n    let deps = modules[id][1];\n    let orphans = [];\n    for (let dep in deps) {\n      let parents = getParents(module.bundle.root, deps[dep]);\n      if (parents.length === 1) {\n        orphans.push(deps[dep]);\n      }\n    }\n\n    // Delete the module. This must be done before deleting dependencies in case of circular dependencies.\n    delete modules[id];\n    delete bundle.cache[id];\n\n    // Now delete the orphans.\n    orphans.forEach(id => {\n      hmrDelete(module.bundle.root, id);\n    });\n  } else if (bundle.parent) {\n    hmrDelete(bundle.parent, id);\n  }\n}\n\nfunction hmrAcceptCheck(\n  bundle /*: ParcelRequire */,\n  id /*: string */,\n  depsByBundle /*: ?{ [string]: { [string]: string } }*/,\n) {\n  checkedAssets = {};\n  if (hmrAcceptCheckOne(bundle, id, depsByBundle)) {\n    return true;\n  }\n\n  // Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.\n  let parents = getParents(module.bundle.root, id);\n  let accepted = false;\n  while (parents.length > 0) {\n    let v = parents.shift();\n    let a = hmrAcceptCheckOne(v[0], v[1], null);\n    if (a) {\n      // If this parent accepts, stop traversing upward, but still consider siblings.\n      accepted = true;\n    } else if (a !== null) {\n      // Otherwise, queue the parents in the next level upward.\n      let p = getParents(module.bundle.root, v[1]);\n      if (p.length === 0) {\n        // If there are no parents, then we've reached an entry without accepting. Reload.\n        accepted = false;\n        break;\n      }\n      parents.push(...p);\n    }\n  }\n\n  return accepted;\n}\n\nfunction hmrAcceptCheckOne(\n  bundle /*: ParcelRequire */,\n  id /*: string */,\n  depsByBundle /*: ?{ [string]: { [string]: string } }*/,\n) {\n  var modules = bundle.modules;\n  if (!modules) {\n    return;\n  }\n\n  if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {\n    // If we reached the root bundle without finding where the asset should go,\n    // there's nothing to do. Mark as \"accepted\" so we don't reload the page.\n    if (!bundle.parent) {\n      bundleNotFound = true;\n      return true;\n    }\n\n    return hmrAcceptCheckOne(bundle.parent, id, depsByBundle);\n  }\n\n  if (checkedAssets[id]) {\n    return null;\n  }\n\n  checkedAssets[id] = true;\n\n  var cached = bundle.cache[id];\n  if (!cached) {\n    return true;\n  }\n\n  assetsToDispose.push([bundle, id]);\n\n  if (cached && cached.hot && cached.hot._acceptCallbacks.length) {\n    assetsToAccept.push([bundle, id]);\n    return true;\n  }\n\n  return false;\n}\n\nfunction hmrDisposeQueue() {\n  // Dispose all old assets.\n  for (let i = 0; i < assetsToDispose.length; i++) {\n    let id = assetsToDispose[i][1];\n\n    if (!disposedAssets[id]) {\n      hmrDispose(assetsToDispose[i][0], id);\n      disposedAssets[id] = true;\n    }\n  }\n\n  assetsToDispose = [];\n}\n\nfunction hmrDispose(bundle /*: ParcelRequire */, id /*: string */) {\n  var cached = bundle.cache[id];\n  bundle.hotData[id] = {};\n  if (cached && cached.hot) {\n    cached.hot.data = bundle.hotData[id];\n  }\n\n  if (cached && cached.hot && cached.hot._disposeCallbacks.length) {\n    cached.hot._disposeCallbacks.forEach(function (cb) {\n      cb(bundle.hotData[id]);\n    });\n  }\n\n  delete bundle.cache[id];\n}\n\nfunction hmrAccept(bundle /*: ParcelRequire */, id /*: string */) {\n  // Execute the module.\n  bundle(id);\n\n  // Run the accept callbacks in the new version of the module.\n  var cached = bundle.cache[id];\n  if (cached && cached.hot && cached.hot._acceptCallbacks.length) {\n    let assetsToAlsoAccept = [];\n    cached.hot._acceptCallbacks.forEach(function (cb) {\n      let additionalAssets = cb(function () {\n        return getParents(module.bundle.root, id);\n      });\n      if (Array.isArray(additionalAssets) && additionalAssets.length) {\n        assetsToAlsoAccept.push(...additionalAssets);\n      }\n    });\n\n    if (assetsToAlsoAccept.length) {\n      let handled = assetsToAlsoAccept.every(function (a) {\n        return hmrAcceptCheck(a[0], a[1]);\n      });\n\n      if (!handled) {\n        return fullReload();\n      }\n\n      hmrDisposeQueue();\n    }\n  }\n}\n"
  },
  {
    "path": "packages/runtimes/js/package.json",
    "content": "{\n  \"name\": \"@parcel/runtime-js\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/JSRuntime.js\",\n  \"source\": \"src/JSRuntime.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/runtimes/js/src/JSRuntime.js",
    "content": "// @flow strict-local\n\nimport type {\n  BundleGraph,\n  BundleGroup,\n  Dependency,\n  Environment,\n  PluginOptions,\n  NamedBundle,\n  RuntimeAsset,\n} from '@parcel/types';\n\nimport {Runtime} from '@parcel/plugin';\nimport {relativeBundlePath, urlJoin, getImportMap} from '@parcel/utils';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\n\n// Used for as=\"\" in preload/prefetch\nconst TYPE_TO_RESOURCE_PRIORITY = {\n  css: 'style',\n  js: 'script',\n};\n\nconst BROWSER_PRELOAD_LOADER = './helpers/browser/preload-loader';\nconst BROWSER_PREFETCH_LOADER = './helpers/browser/prefetch-loader';\n\nconst LOADERS = {\n  browser: {\n    css: './helpers/browser/css-loader',\n    html: './helpers/browser/html-loader',\n    js: './helpers/browser/js-loader',\n    wasm: './helpers/browser/wasm-loader',\n    IMPORT_POLYFILL: './helpers/browser/import-polyfill',\n  },\n  worker: {\n    js: './helpers/worker/js-loader',\n    wasm: './helpers/worker/wasm-loader',\n    IMPORT_POLYFILL: false,\n  },\n  node: {\n    css: './helpers/node/css-loader',\n    html: './helpers/node/html-loader',\n    js: './helpers/node/js-loader',\n    wasm: './helpers/node/wasm-loader',\n    IMPORT_POLYFILL: null,\n  },\n};\n\nfunction getLoaders(\n  ctx: Environment,\n): ?{[string]: string, IMPORT_POLYFILL: null | false | string, ...} {\n  if (ctx.isWorker()) return LOADERS.worker;\n  if (ctx.isBrowser()) return LOADERS.browser;\n  if (ctx.isNode()) return LOADERS.node;\n  return null;\n}\n\n// This cache should be invalidated if new dependencies get added to the bundle without the bundle objects changing\n// This can happen when we reuse the BundleGraph between subsequent builds\nlet bundleDependencies = new WeakMap<\n  NamedBundle,\n  {|\n    asyncDependencies: Array<Dependency>,\n    otherDependencies: Array<Dependency>,\n  |},\n>();\n\nexport default (new Runtime({\n  apply({bundle, bundleGraph, options}) {\n    // Dependency ids in code replaced with referenced bundle names\n    // Loader runtime added for bundle groups that don't have a native loader (e.g. HTML/CSS/Worker - isURL?),\n    // and which are not loaded by a parent bundle.\n    // Loaders also added for modules that were moved to a separate bundle because they are a different type\n    // (e.g. WASM, HTML). These should be preloaded prior to the bundle being executed. Replace the entry asset(s)\n    // with the preload module.\n\n    if (bundle.type !== 'js') {\n      return;\n    }\n\n    let useRuntimeManifest = shouldUseRuntimeManifest(bundle, options);\n    let useImportMaps =\n      useRuntimeManifest && shouldUseImportMaps(bundleGraph, bundle);\n\n    let {asyncDependencies, otherDependencies} = getDependencies(bundle);\n\n    let assets = [];\n    for (let dependency of asyncDependencies) {\n      let resolved = bundleGraph.resolveAsyncDependency(dependency, bundle);\n      if (resolved == null) {\n        continue;\n      }\n\n      if (resolved.type === 'asset') {\n        if (!bundle.env.shouldScopeHoist) {\n          // If this bundle already has the asset this dependency references,\n          // return a simple runtime of `Promise.resolve(internalRequire(assetId))`.\n          // The linker handles this for scope-hoisting.\n          assets.push({\n            filePath: __filename,\n            code: `module.exports = Promise.resolve(parcelRequire(${JSON.stringify(\n              bundleGraph.getAssetPublicId(resolved.value),\n            )}))`,\n            dependency,\n            env: {sourceType: 'module'},\n          });\n        }\n      } else {\n        // Resolve the dependency to a bundle. If inline, export the dependency id,\n        // which will be replaced with the contents of that bundle later.\n        let referencedBundle = bundleGraph.getReferencedBundle(\n          dependency,\n          bundle,\n        );\n        if (referencedBundle?.bundleBehavior === 'inline') {\n          assets.push({\n            filePath: path.join(\n              __dirname,\n              `/bundles/${referencedBundle.id}.js`,\n            ),\n            code: `module.exports = Promise.resolve(${JSON.stringify(\n              dependency.id,\n            )});`,\n            dependency,\n            env: {sourceType: 'module'},\n          });\n          continue;\n        }\n\n        let loaderRuntime = getLoaderRuntime({\n          bundle,\n          dependency,\n          bundleGraph,\n          bundleGroup: resolved.value,\n          options,\n          useRuntimeManifest,\n          useImportMaps,\n        });\n\n        if (loaderRuntime != null) {\n          assets.push(loaderRuntime);\n        }\n      }\n    }\n\n    for (let dependency of otherDependencies) {\n      // Resolve the dependency to a bundle. If inline, export the dependency id,\n      // which will be replaced with the contents of that bundle later.\n      let referencedBundle = bundleGraph.getReferencedBundle(\n        dependency,\n        bundle,\n      );\n      if (referencedBundle?.bundleBehavior === 'inline') {\n        assets.push({\n          filePath: path.join(__dirname, `/bundles/${referencedBundle.id}.js`),\n          code: `module.exports = ${JSON.stringify(dependency.id)};`,\n          dependency,\n          env: {sourceType: 'module'},\n        });\n        continue;\n      }\n\n      // Otherwise, try to resolve the dependency to an external bundle group\n      // and insert a URL to that bundle.\n      let resolved = bundleGraph.resolveAsyncDependency(dependency, bundle);\n      if (dependency.specifierType === 'url' && resolved == null) {\n        // If a URL dependency was not able to be resolved, add a runtime that\n        // exports the original specifier.\n        assets.push({\n          filePath: __filename,\n          code: `module.exports = ${JSON.stringify(dependency.specifier)}`,\n          dependency,\n          env: {sourceType: 'module'},\n        });\n        continue;\n      }\n\n      if (resolved == null || resolved.type !== 'bundle_group') {\n        continue;\n      }\n\n      let bundleGroup = resolved.value;\n      let mainBundle = nullthrows(\n        bundleGraph.getBundlesInBundleGroup(bundleGroup).find(b => {\n          let entries = b.getEntryAssets();\n          return entries.some(e => bundleGroup.entryAssetId === e.id);\n        }),\n      );\n\n      // Skip URL runtimes for library builds. This is handled in packaging so that\n      // the url is inlined and statically analyzable.\n      if (bundle.env.isLibrary && mainBundle.bundleBehavior !== 'isolated') {\n        continue;\n      }\n\n      // URL dependency or not, fall back to including a runtime that exports the url\n      let mainAsset = mainBundle\n        .getEntryAssets()\n        .find(e => e.id === bundleGroup.entryAssetId);\n      if (\n        dependency.specifierType === 'url' ||\n        mainAsset?.meta.jsRuntime === 'url'\n      ) {\n        assets.push(\n          getURLRuntime(\n            dependency,\n            bundle,\n            mainBundle,\n            options,\n            useRuntimeManifest,\n            useImportMaps,\n          ),\n        );\n        continue;\n      }\n\n      if (mainBundle.type === 'node' && mainBundle.env.isNode()) {\n        let relativePathExpr = getAbsoluteUrlExpr(\n          bundle,\n          mainBundle,\n          options,\n          useRuntimeManifest,\n          useImportMaps,\n        );\n        assets.push({\n          filePath: __filename,\n          code: `module.exports = require('./helpers/node/node-loader.js')(${relativePathExpr});`,\n          dependency,\n          env: {sourceType: 'module'},\n        });\n      }\n    }\n\n    // In development, bundles can be created lazily. This means that the parent bundle may not\n    // know about all of the sibling bundles of a child when it is written for the first time.\n    // Therefore, we need to also ensure that the siblings are loaded when the child loads.\n    if (options.shouldBuildLazily && !bundle.env.shouldScopeHoist) {\n      let referenced = bundleGraph.getReferencedBundles(bundle);\n      for (let referencedBundle of referenced) {\n        let loaders = getLoaders(bundle.env);\n        if (!loaders) {\n          continue;\n        }\n\n        let loader = loaders[referencedBundle.type];\n        if (!loader) {\n          continue;\n        }\n\n        let loaderCode = `require(${JSON.stringify(\n          loader,\n        )})( ${getAbsoluteUrlExpr(\n          bundle,\n          referencedBundle,\n          options,\n          useRuntimeManifest,\n          useImportMaps,\n        )})`;\n        assets.push({\n          filePath: __filename,\n          code: loaderCode,\n          isEntry: true,\n          env: {sourceType: 'module'},\n        });\n      }\n    }\n\n    if (\n      useRuntimeManifest &&\n      !useImportMaps &&\n      bundle.env.context !== 'react-server' &&\n      bundle.env.context !== 'react-client' &&\n      bundleGraph\n        .getChildBundles(bundle)\n        .some(b => b.bundleBehavior !== 'inline') &&\n      isNewContext(bundle, bundleGraph)\n    ) {\n      assets.push({\n        filePath: __filename,\n        code: getRegisterCode(bundle, bundleGraph),\n        isEntry: true,\n        env: {sourceType: 'module'},\n      });\n    }\n\n    return assets;\n  },\n}): Runtime);\n\nfunction getDependencies(bundle: NamedBundle): {|\n  asyncDependencies: Array<Dependency>,\n  otherDependencies: Array<Dependency>,\n|} {\n  let cachedDependencies = bundleDependencies.get(bundle);\n\n  if (cachedDependencies) {\n    return cachedDependencies;\n  } else {\n    let asyncDependencies = [];\n    let otherDependencies = [];\n    bundle.traverse(node => {\n      if (node.type !== 'dependency') {\n        return;\n      }\n\n      let dependency = node.value;\n      if (\n        dependency.priority === 'lazy' &&\n        dependency.specifierType !== 'url'\n      ) {\n        asyncDependencies.push(dependency);\n      } else {\n        otherDependencies.push(dependency);\n      }\n    });\n    bundleDependencies.set(bundle, {asyncDependencies, otherDependencies});\n    return {asyncDependencies, otherDependencies};\n  }\n}\n\nfunction getLoaderRuntime({\n  bundle,\n  dependency,\n  bundleGroup,\n  bundleGraph,\n  options,\n  useRuntimeManifest,\n  useImportMaps,\n}: {|\n  bundle: NamedBundle,\n  dependency: Dependency,\n  bundleGroup: BundleGroup,\n  bundleGraph: BundleGraph<NamedBundle>,\n  options: PluginOptions,\n  useRuntimeManifest: boolean,\n  useImportMaps: boolean,\n|}): ?RuntimeAsset {\n  let loaders = getLoaders(bundle.env);\n  if (loaders == null) {\n    return;\n  }\n\n  let externalBundles = bundleGraph.getBundlesInBundleGroup(bundleGroup);\n  let mainBundle = nullthrows(\n    externalBundles.find(\n      bundle => bundle.getMainEntry()?.id === bundleGroup.entryAssetId,\n    ),\n  );\n\n  // CommonJS is a synchronous module system, so there is no need to load bundles in parallel.\n  // Importing of the other bundles will be handled by the bundle group entry.\n  // Do the same thing in library mode for ES modules, as we are building for another bundler\n  // and the imports for sibling bundles will be in the target bundle.\n\n  // Previously we also did this when building lazily, however it seemed to cause issues in some cases.\n  // The original comment as to why is left here, in case a future traveller is trying to fix that issue:\n  // > [...] the runtime itself could get deduplicated and only exist in the parent. This causes errors if an\n  // > old version of the parent without the runtime\n  // > is already loaded.\n  if (bundle.env.outputFormat === 'commonjs' || bundle.env.isLibrary) {\n    externalBundles = [mainBundle];\n  } else {\n    // Otherwise, load the bundle group entry after the others.\n    externalBundles.splice(externalBundles.indexOf(mainBundle), 1);\n    externalBundles.reverse().push(mainBundle);\n  }\n\n  // Determine if we need to add a dynamic import() polyfill, or if all target browsers support it natively.\n  let needsDynamicImportPolyfill =\n    !bundle.env.isLibrary && !bundle.env.supports('dynamic-import', true);\n\n  let loaderModules = [];\n\n  for (let to of externalBundles) {\n    let loader = loaders[to.type];\n    if (!loader) {\n      continue;\n    }\n\n    if (\n      to.type === 'js' &&\n      to.env.outputFormat === 'esmodule' &&\n      !needsDynamicImportPolyfill &&\n      useRuntimeManifest\n    ) {\n      if (useImportMaps) {\n        loaderModules.push(\n          `__parcel__import__(${JSON.stringify(to.publicId)})`,\n        );\n      } else {\n        loaderModules.push(\n          `parcelRequire.load(${JSON.stringify(to.publicId)})`,\n        );\n      }\n      continue;\n    }\n\n    // Use esmodule loader if possible\n    if (to.type === 'js' && to.env.outputFormat === 'esmodule') {\n      let relativePathExpr = getRelativePathExpr(bundle, to, options);\n      if (!needsDynamicImportPolyfill) {\n        loaderModules.push(`__parcel__import__(\"./\" + ${relativePathExpr})`);\n        continue;\n      }\n\n      loader = nullthrows(\n        loaders.IMPORT_POLYFILL,\n        `No import() polyfill available for context '${bundle.env.context}'`,\n      );\n    } else if (to.type === 'js' && to.env.outputFormat === 'commonjs') {\n      let relativePathExpr = getRelativePathExpr(bundle, to, options);\n      loaderModules.push(\n        `Promise.resolve(__parcel__require__(\"./\" + ${relativePathExpr}))`,\n      );\n      continue;\n    }\n\n    let absoluteUrlExpr = getAbsoluteUrlExpr(\n      bundle,\n      to,\n      options,\n      useRuntimeManifest,\n      useImportMaps,\n    );\n    let code = `require(${JSON.stringify(loader)})(${absoluteUrlExpr})`;\n\n    // In development, clear the require cache when an error occurs so the\n    // user can try again (e.g. after fixing a build error).\n    if (options.mode === 'development' && !bundle.env.shouldScopeHoist) {\n      code +=\n        '.catch(err => {delete module.bundle.cache[module.id]; throw err;})';\n    }\n    loaderModules.push(code);\n  }\n\n  // Similar to the comment above, this also used to be skipped when shouldBuildLazily was true,\n  // however it caused issues where a bundle group contained multiple bundles.\n  if (bundle.env.context === 'browser') {\n    loaderModules.push(\n      ...externalBundles\n        // TODO: Allow css to preload resources as well\n        .filter(to => to.type === 'js')\n        .flatMap(from => {\n          let {preload, prefetch} = getHintedBundleGroups(bundleGraph, from);\n\n          return [\n            ...getHintLoaders(\n              bundleGraph,\n              bundle,\n              preload,\n              BROWSER_PRELOAD_LOADER,\n              options,\n            ),\n            ...getHintLoaders(\n              bundleGraph,\n              bundle,\n              prefetch,\n              BROWSER_PREFETCH_LOADER,\n              options,\n            ),\n          ];\n        }),\n    );\n  }\n\n  if (loaderModules.length === 0) {\n    return;\n  }\n\n  let loaderCode = loaderModules.join(', ');\n  if (loaderModules.length > 1) {\n    loaderCode = `Promise.all([${loaderCode}])`;\n  } else {\n    loaderCode = `(${loaderCode})`;\n  }\n\n  if (mainBundle.type === 'js') {\n    loaderCode += `.then(() => parcelRequire('${bundleGraph.getAssetPublicId(\n      bundleGraph.getAssetById(bundleGroup.entryAssetId),\n    )}'))`;\n  }\n\n  return {\n    filePath: __filename,\n    code: `module.exports = ${loaderCode};`,\n    dependency,\n    env: {sourceType: 'module'},\n  };\n}\n\nfunction getHintedBundleGroups(\n  bundleGraph: BundleGraph<NamedBundle>,\n  bundle: NamedBundle,\n): {|preload: Array<BundleGroup>, prefetch: Array<BundleGroup>|} {\n  let preload = [];\n  let prefetch = [];\n  let {asyncDependencies} = getDependencies(bundle);\n  for (let dependency of asyncDependencies) {\n    let attributes = dependency.meta?.importAttributes;\n    if (\n      typeof attributes === 'object' &&\n      attributes != null &&\n      // $FlowFixMe\n      (attributes.preload || attributes.prefetch)\n    ) {\n      let resolved = bundleGraph.resolveAsyncDependency(dependency, bundle);\n      if (resolved?.type === 'bundle_group') {\n        // === true for flow\n        if (attributes.preload === true) {\n          preload.push(resolved.value);\n        }\n        if (attributes.prefetch === true) {\n          prefetch.push(resolved.value);\n        }\n      }\n    }\n  }\n\n  return {preload, prefetch};\n}\n\nfunction getHintLoaders(\n  bundleGraph: BundleGraph<NamedBundle>,\n  from: NamedBundle,\n  bundleGroups: Array<BundleGroup>,\n  loader: string,\n  options: PluginOptions,\n): Array<string> {\n  let hintLoaders = [];\n  for (let bundleGroupToPreload of bundleGroups) {\n    let bundlesToPreload =\n      bundleGraph.getBundlesInBundleGroup(bundleGroupToPreload);\n\n    for (let bundleToPreload of bundlesToPreload) {\n      let priority = TYPE_TO_RESOURCE_PRIORITY[bundleToPreload.type];\n      hintLoaders.push(\n        `require(${JSON.stringify(loader)})(${getAbsoluteUrlExpr(\n          from,\n          bundleToPreload,\n          options,\n          false,\n          false,\n        )}, ${priority ? JSON.stringify(priority) : 'null'}, ${JSON.stringify(\n          bundleToPreload.target.env.outputFormat === 'esmodule',\n        )})`,\n      );\n    }\n  }\n\n  return hintLoaders;\n}\n\nfunction isNewContext(\n  bundle: NamedBundle,\n  bundleGraph: BundleGraph<NamedBundle>,\n): boolean {\n  let parents = bundleGraph.getParentBundles(bundle);\n  let isInEntryBundleGroup = bundleGraph\n    .getBundleGroupsContainingBundle(bundle)\n    .some(g => bundleGraph.isEntryBundleGroup(g));\n  return (\n    isInEntryBundleGroup ||\n    parents.length === 0 ||\n    parents.some(\n      parent =>\n        parent.env.context !== bundle.env.context || parent.type !== 'js',\n    )\n  );\n}\n\nfunction getURLRuntime(\n  dependency: Dependency,\n  from: NamedBundle,\n  to: NamedBundle,\n  options: PluginOptions,\n  useRuntimeManifest: boolean,\n  useImportMaps: boolean,\n): RuntimeAsset {\n  let absoluteUrlExpr = getAbsoluteUrlExpr(\n    from,\n    to,\n    options,\n    useRuntimeManifest,\n    useImportMaps,\n  );\n  let code;\n\n  if (dependency.meta.webworker === true && !from.env.isLibrary) {\n    code = `let workerURL = require('./helpers/get-worker-url');\\n`;\n    code += `let url = new URL(${absoluteUrlExpr});\\n`;\n    code += `module.exports = workerURL(url.toString(), url.origin, ${String(\n      from.env.outputFormat === 'esmodule',\n    )});`;\n  } else if (from.env.isServer() && to.env.isBrowser()) {\n    code = `module.exports = ${JSON.stringify(\n      urlJoin(to.target.publicUrl, to.name),\n    )};`;\n  } else {\n    code = `module.exports = ${absoluteUrlExpr};`;\n  }\n\n  return {\n    filePath: __filename,\n    code,\n    dependency,\n    env: {sourceType: 'module'},\n  };\n}\n\nfunction getRegisterCode(\n  entryBundle: NamedBundle,\n  bundleGraph: BundleGraph<NamedBundle>,\n): string {\n  let mappings = getImportMap(bundleGraph, entryBundle);\n  return `parcelRequire.extendImportMap(${JSON.stringify(mappings)});`;\n}\n\nfunction getRelativePathExpr(\n  from: NamedBundle,\n  to: NamedBundle,\n  options: PluginOptions,\n  isURL = to.type !== 'js',\n): string {\n  let relativePath = relativeBundlePath(from, to, {leadingDotSlash: false});\n  let res = JSON.stringify(relativePath);\n  if (isURL && options.hmrOptions) {\n    res += ' + \"?\" + Date.now()';\n  }\n\n  return res;\n}\n\nfunction getAbsoluteUrlExpr(\n  bundle: NamedBundle,\n  to: NamedBundle,\n  options: PluginOptions,\n  useRuntimeManifest: boolean,\n  useImportMaps: boolean,\n) {\n  // let relativePathExpr;\n  if (useRuntimeManifest) {\n    if (useImportMaps) {\n      return `__parcel__import__.meta.resolve(${JSON.stringify(to.publicId)})`;\n    } else {\n      return `parcelRequire.resolve(${JSON.stringify(to.publicId)})`;\n    }\n  } else if (bundle.env.isLibrary) {\n    // This will be compiled to new URL(url, import.meta.url) or new URL(url, 'file:' + __filename).\n    let relativePathExpr = getRelativePathExpr(bundle, to, options);\n    return `new __parcel__URL__(${relativePathExpr}).toString()`;\n  } else {\n    let res = `parcelRequire.resolve(${JSON.stringify(to.name)})`;\n    if (to.type !== 'js' && options.hmrOptions) {\n      res += ' + \"?\" + Date.now()';\n    }\n    return res;\n  }\n}\n\nfunction shouldUseRuntimeManifest(\n  bundle: NamedBundle,\n  options: PluginOptions,\n): boolean {\n  let env = bundle.env;\n  return (\n    !env.isLibrary &&\n    bundle.bundleBehavior !== 'inline' &&\n    env.isBrowser() &&\n    options.mode === 'production'\n  );\n}\n\nfunction shouldUseImportMaps(\n  bundleGraph: BundleGraph<NamedBundle>,\n  bundle: NamedBundle,\n) {\n  return (\n    bundle.env.outputFormat === 'esmodule' &&\n    bundle.env.supports('import-meta-resolve') &&\n    !bundle.env.isIsolated() &&\n    bundleGraph.getEntryBundles().every(entry => entry.type === 'html')\n  );\n}\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/.babelrc",
    "content": "{\n  \"presets\": [\n    [\"@babel/preset-env\", {\n      \"targets\": {\n        \"ie\": 11\n      }\n    }]\n  ]\n}\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config-browser\"\n}\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/browser/css-loader.js",
    "content": "const cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function loadCSSBundle(bundle) {\n  return new Promise(function (resolve, reject) {\n    if (typeof document === 'undefined') {\n      return resolve();\n    }\n\n    var link = document.createElement('link');\n    link.rel = 'stylesheet';\n    link.href = bundle;\n\n    // Don't insert the same link element twice (e.g. if it was already in the HTML)\n    let existingLinks = document.getElementsByTagName('link');\n    let isCurrentBundle = function (existing) {\n      return (\n        existing.href === link.href && existing.rel.indexOf('stylesheet') > -1\n      );\n    };\n\n    if (Array.from(existingLinks).some(isCurrentBundle)) {\n      resolve();\n      return;\n    }\n\n    link.onerror = function (e) {\n      link.onerror = link.onload = null;\n      link.remove();\n      reject(e);\n    };\n\n    link.onload = function () {\n      link.onerror = link.onload = null;\n      resolve();\n    };\n\n    document.getElementsByTagName('head')[0].appendChild(link);\n  });\n});\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/browser/html-loader.js",
    "content": "const cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function loadHTMLBundle(bundle) {\n  return fetch(bundle).then(function (res) {\n    return res.text();\n  });\n});\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/browser/import-polyfill.js",
    "content": "const cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function importModule(bundle) {\n  return new Promise((resolve, reject) => {\n    // Add a global function to handle when the script loads.\n    let globalName = `i${('' + Math.random()).slice(2)}`;\n    global[globalName] = m => {\n      resolve(m);\n      cleanup();\n    };\n\n    // Remove script on load or error\n    let cleanup = () => {\n      delete global[globalName];\n      script.onerror = null;\n      script.remove();\n    };\n\n    // Append an inline script tag into the document head\n    let script = document.createElement('script');\n    script.async = true;\n    script.type = 'module';\n    script.charset = 'utf-8';\n    script.textContent = `import * as m from '${bundle}'; ${globalName}(m);`;\n    script.onerror = function (e) {\n      reject(e);\n      cleanup();\n    };\n\n    document.head.appendChild(script);\n  });\n});\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/browser/js-loader.js",
    "content": "const cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function loadJSBundle(bundle) {\n  return new Promise(function (resolve, reject) {\n    // Don't insert the same script twice (e.g. if it was already in the HTML)\n    let existingScripts = document.getElementsByTagName('script');\n    let isCurrentBundle = function (script) {\n      return script.src === bundle;\n    };\n\n    if ([].concat(existingScripts).some(isCurrentBundle)) {\n      resolve();\n      return;\n    }\n\n    var preloadLink = document.createElement('link');\n    preloadLink.href = bundle;\n    preloadLink.rel = 'preload';\n    preloadLink.as = 'script';\n    document.head.appendChild(preloadLink);\n\n    var script = document.createElement('script');\n    script.async = true;\n    script.type = 'text/javascript';\n    script.src = bundle;\n    script.onerror = function (e) {\n      var error = new TypeError(\n        `Failed to fetch dynamically imported module: ${bundle}. Error: ${e.message}`,\n      );\n      script.onerror = script.onload = null;\n      script.remove();\n      reject(error);\n    };\n\n    script.onload = function () {\n      script.onerror = script.onload = null;\n      resolve();\n    };\n\n    document.getElementsByTagName('head')[0].appendChild(script);\n  });\n});\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/browser/prefetch-loader.js",
    "content": "const cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function prefetchJSBundle(bundle, priority) {\n  var link = document.createElement('link');\n  link.rel = 'prefetch';\n  link.href = bundle;\n  if (priority) {\n    link.as = priority;\n  }\n\n  document.getElementsByTagName('head')[0].appendChild(link);\n  return Promise.resolve();\n}, 'prefetch');\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/browser/preload-loader.js",
    "content": "const cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function preloadJSBundle(\n  bundle,\n  priority,\n  isModule,\n) {\n  var link = document.createElement('link');\n  link.charset = 'utf-8';\n  link.rel = isModule ? 'modulepreload' : 'preload';\n  link.href = bundle;\n  if (priority) {\n    link.as = priority;\n  }\n\n  document.getElementsByTagName('head')[0].appendChild(link);\n  return Promise.resolve();\n},\n'preload');\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/browser/wasm-loader.js",
    "content": "const cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function loadWASMBundle(bundle) {\n  return fetch(bundle)\n    .then(function (res) {\n      if (WebAssembly.instantiateStreaming) {\n        return WebAssembly.instantiateStreaming(res);\n      } else {\n        return res.arrayBuffer().then(function (data) {\n          return WebAssembly.instantiate(data);\n        });\n      }\n    })\n    .then(function (wasmModule) {\n      return wasmModule.instance.exports;\n    });\n});\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/cacheLoader.js",
    "content": "let cachedBundles = {};\nlet cachedPreloads = {};\nlet cachedPrefetches = {};\n\nfunction getCache(type) {\n  switch (type) {\n    case 'preload':\n      return cachedPreloads;\n    case 'prefetch':\n      return cachedPrefetches;\n    default:\n      return cachedBundles;\n  }\n}\n\nmodule.exports = function cacheLoader(loader, type) {\n  return function (bundle) {\n    let cache = getCache(type);\n\n    if (cache[bundle]) {\n      return cache[bundle];\n    }\n\n    return (cache[bundle] = loader.apply(null, arguments).catch(function (e) {\n      delete cache[bundle];\n      throw e;\n    }));\n  };\n};\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/get-worker-url.js",
    "content": "module.exports = function loadWorker(workerUrl, origin, isESM) {\n  if (origin === self.location.origin) {\n    // If the worker bundle's url is on the same origin as the document,\n    // use the worker bundle's own url.\n    return workerUrl;\n  } else {\n    // Otherwise, create a blob URL which loads the worker bundle with `importScripts`.\n    let source = isESM\n      ? 'import ' + JSON.stringify(workerUrl) + ';'\n      : 'importScripts(' + JSON.stringify(workerUrl) + ');';\n    return URL.createObjectURL(\n      new Blob([source], {type: 'application/javascript'}),\n    );\n  }\n};\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/node/css-loader.js",
    "content": "// loading a CSS style is a no-op in Node.js\nmodule.exports = function loadCSSBundle() {\n  return Promise.resolve();\n};\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/node/html-loader.js",
    "content": "const fs = require('fs');\nconst cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function loadHTMLBundle(bundle) {\n  return new Promise(function (resolve, reject) {\n    fs.readFile(__dirname + bundle, 'utf8', function (err, data) {\n      if (err) {\n        reject(err);\n      } else {\n        // wait for the next event loop iteration, so we are sure\n        // the current module is fully loaded\n        setImmediate(function () {\n          resolve(data);\n        });\n      }\n    });\n  });\n});\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/node/js-loader.js",
    "content": "const fs = require('fs');\nconst cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function loadJSBundle(bundle) {\n  return new Promise(function (resolve, reject) {\n    fs.readFile(__dirname + bundle, 'utf8', function (err, data) {\n      if (err) {\n        reject(err);\n      } else {\n        // wait for the next event loop iteration, so we are sure\n        // the current module is fully loaded\n        setImmediate(function () {\n          resolve(data);\n        });\n      }\n    });\n  }).then(function (code) {\n    new Function('', code)();\n  });\n});\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/node/node-loader.js",
    "content": "const url = require('url');\nconst {createRequire} = require('module');\n\nmodule.exports = function loadNodeModule(bundle) {\n  let path = url.fileURLToPath(bundle);\n  let require = createRequire(path);\n  return require(path);\n};\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/node/wasm-loader.js",
    "content": "const fs = require('fs');\nconst cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function loadWASMBundle(bundle) {\n  return new Promise(function (resolve, reject) {\n    fs.readFile(__dirname + bundle, function (err, data) {\n      if (err) {\n        reject(err);\n      } else {\n        resolve(data.buffer);\n      }\n    });\n  })\n    .then(function (data) {\n      return WebAssembly.instantiate(data);\n    })\n    .then(function (wasmModule) {\n      return wasmModule.instance.exports;\n    });\n});\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/worker/js-loader.js",
    "content": "/* global __parcel__importScripts__:readonly*/\nconst cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function loadJSBundle(bundle) {\n  return new Promise(function (resolve, reject) {\n    try {\n      __parcel__importScripts__(bundle);\n      resolve();\n    } catch (e) {\n      reject(e);\n    }\n  });\n});\n"
  },
  {
    "path": "packages/runtimes/js/src/helpers/worker/wasm-loader.js",
    "content": "const cacheLoader = require('../cacheLoader');\n\nmodule.exports = cacheLoader(function loadWASMBundle(bundle) {\n  return fetch(bundle)\n    .then(function (res) {\n      if (WebAssembly.instantiateStreaming) {\n        return WebAssembly.instantiateStreaming(res);\n      } else {\n        return res.arrayBuffer().then(function (data) {\n          return WebAssembly.instantiate(data);\n        });\n      }\n    })\n    .then(function (wasmModule) {\n      return wasmModule.instance.exports;\n    });\n});\n"
  },
  {
    "path": "packages/runtimes/rsc/package.json",
    "content": "{\n  \"name\": \"@parcel/runtime-rsc\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/RSCRuntime.js\",\n  \"exports\": {\n    \".\": {\n      \"source\": \"./src/RSCRuntime.js\",\n      \"default\": \"./lib/RSCRuntime.js\"\n    },\n    \"./rsc-helpers\": \"./rsc-helpers.jsx\",\n    \"./jsx-dev-runtime\": \"./jsx-dev-runtime.js\",\n    \"./jsx-runtime\": \"./jsx-runtime\"\n  },\n  \"engines\": {\n    \"node\": \">= 12.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/runtimes/rsc/rsc-helpers.jsx",
    "content": "/* eslint-env browser */\n/* eslint-disable react/react-in-jsx-scope */\n/* @jsxRuntime automatic */\n\nexport function createResourcesProxy(module, esModule, resources, bootstrapScript) {\n  if (typeof module === 'function') {\n    return createResourcesValueProxy(module, resources, bootstrapScript);\n  }\n  \n  return new Proxy(module, {\n    get(target, prop, receiver) {\n      if (prop === '__esModule' && esModule) {\n        return true;\n      }\n      let value = Reflect.get(target, prop, receiver);\n      return createResourcesValueProxy(value, resources, bootstrapScript);\n    },\n  });\n}\n\nlet cache = new WeakMap();\nfunction createResourcesValueProxy(value, resources, bootstrapScript) {\n  if (typeof value === 'function') {\n    let cached = cache.get(value);\n    if (cached) {\n      return cached;\n    }\n\n    // Detect reads of `Component.prototype.isReactComponent` or `Component.$$typeof`\n    // prior to the function being called as an indication that this is a React component.\n    // If so, inject the resources as a sibling of the return value.\n    let isReactComponent = false;\n    let prototypeProxy;\n    if (typeof value.prototype === 'object') {\n      prototypeProxy = new Proxy(value.prototype, {\n        get(target, prop, receiver) {\n          if (prop === 'isReactComponent') {\n            isReactComponent = true;\n          }\n          return Reflect.get(target, prop, receiver);\n        }\n      });\n    }\n\n    let proxy = new Proxy(value, {\n      get(target, prop, receiver) {\n        if (prototypeProxy && prop === 'prototype' && Object.getOwnPropertyDescriptor(target, 'prototype').configurable) {\n          return prototypeProxy;\n        }\n\n        if (prop === '$$typeof') {\n          isReactComponent = true;\n        }\n\n        if (bootstrapScript && prop === 'bootstrapScript') {\n          return bootstrapScript;\n        }\n\n        return Reflect.get(target, prop, receiver);\n      },\n      apply(target, thisArg, args) {\n        let result = Reflect.apply(target, thisArg, args);\n        if (isReactComponent) {\n          return <>{resources}{result}</>\n        }\n        return result;\n      }\n    });\n\n    cache.set(value, proxy);\n    return proxy;\n  } else if (value && typeof value === 'object') {\n    let cached = cache.get(value);\n    if (cached) {\n      return cached;\n    }\n\n    let proxy = new Proxy(value, {\n      get(target, prop, receiver) {\n        let value = Reflect.get(target, prop, receiver);\n        return createResourcesValueProxy(value, resources, bootstrapScript);\n      }\n    });\n\n    cache.set(value, proxy);\n    return proxy;\n  }\n\n  return value;\n}\n\nexport function waitForCSS(url) {\n  return new Promise((resolve, reject) => {\n    if (typeof document === 'undefined') {\n      return resolve();\n    }\n\n    // Find a link element corresponding to this URL.\n    let link = document.querySelector(`link[rel=\"stylesheet\"][href=\"${CSS.escape(url)}\"]`);\n    if (!link) {\n      return resolve();\n    }\n\n    // If the link element already has a stylesheet associated with it, then it is already loaded.\n    if (link.sheet) {\n      return resolve();\n    }\n\n    link.addEventListener('load', () => {\n      resolve();\n    });\n\n    link.addEventListener('error', e => {\n      reject(e);\n    });\n  });\n}\n"
  },
  {
    "path": "packages/runtimes/rsc/src/RSCRuntime.js",
    "content": "// @flow strict-local\n\nimport {Runtime} from '@parcel/plugin';\nimport nullthrows from 'nullthrows';\nimport {\n  urlJoin,\n  normalizeSeparators,\n  relativeBundlePath,\n  getImportMap,\n} from '@parcel/utils';\nimport path from 'path';\nimport {hashString} from '@parcel/rust';\n\nexport default (new Runtime({\n  async loadConfig({config, options}) {\n    // This logic must be synced with the packager...\n    let packageName = await config.getConfigFrom(\n      options.projectRoot + '/index',\n      [],\n      {\n        packageKey: 'name',\n      },\n    );\n\n    let name = packageName?.contents ?? '';\n    return {\n      parcelRequireName: 'parcelRequire' + hashString(name).slice(-4),\n    };\n  },\n  apply({bundle, bundleGraph, config}) {\n    if (\n      bundle.type !== 'js' ||\n      (bundle.env.context !== 'react-server' &&\n        bundle.env.context !== 'react-client')\n    ) {\n      return [];\n    }\n\n    let runtimes = [];\n    bundle.traverse(node => {\n      if (node.type === 'dependency') {\n        let resolvedAsset = bundleGraph.getResolvedAsset(node.value, bundle);\n        let directives = resolvedAsset?.meta?.directives;\n\n        if (\n          node.value.env.isServer() &&\n          resolvedAsset &&\n          Array.isArray(directives) &&\n          directives.includes('use client-entry')\n        ) {\n          // Resolve to an empty module so the client entry does not run on the server.\n          runtimes.push({\n            filePath: replaceExtension(resolvedAsset.filePath),\n            code: '',\n            dependency: node.value,\n            env: {sourceType: 'module'},\n          });\n\n          // Server dependency on a client component.\n        } else if (\n          node.value.env.isServer() &&\n          resolvedAsset &&\n          resolvedAsset.env.context === 'react-client'\n        ) {\n          let bundles;\n          let async = bundleGraph.resolveAsyncDependency(node.value, bundle);\n          if (async?.type === 'bundle_group') {\n            bundles = bundleGraph.getBundlesInBundleGroup(async.value, {\n              includeIsolated: false,\n            });\n          } else {\n            bundles = bundleGraph.getReferencedBundles(bundle, {\n              includeIsolated: false,\n            });\n          }\n\n          let importMap = {};\n          let jsBundles = bundles\n            .filter(b => b.type === 'js' && b.env.isBrowser())\n            .map(b => {\n              let name = normalizeSeparators(b.name);\n              Object.assign(importMap, getImportMap(bundleGraph, b));\n              return name;\n            });\n\n          let code = `import {createClientReference} from \"react-server-dom-parcel/server.edge\";\\n`;\n          let resources = [];\n          if (node.value.priority === 'lazy') {\n            // If this is an async boundary, inject CSS.\n            // JS for client components is injected by prepareDestinationForModule in React.\n            for (let b of bundles) {\n              if (b.type === 'css') {\n                resources.push(renderStylesheet(bundle, b));\n              }\n            }\n\n            if (resources.length) {\n              code += `let resources = ${\n                resources.length > 1\n                  ? '<>' + resources.join('\\n') + '</>'\n                  : resources[0]\n              };\\n`;\n            }\n          }\n\n          let count = 0;\n          for (let symbol of bundleGraph.getExportedSymbols(\n            resolvedAsset,\n            bundle,\n          )) {\n            let ref = `createClientReference(${JSON.stringify(\n              bundleGraph.getAssetPublicId(symbol.asset),\n            )}, ${JSON.stringify(symbol.exportSymbol)}, ${JSON.stringify(\n              jsBundles,\n            )}${\n              Object.keys(importMap).length > 0\n                ? ', ' + JSON.stringify(importMap)\n                : ''\n            })`;\n            if (resources.length) {\n              code += `var Ref${++count} = ${ref};\\n`;\n              code += `exports[${JSON.stringify(\n                symbol.exportAs,\n              )}] = (props) => <>{resources}<Ref${count} {...props} /></>;\\n`;\n            } else {\n              code += `exports[${JSON.stringify(symbol.exportAs)}] = ${ref};\\n`;\n            }\n          }\n\n          code += `exports.__esModule = true;\\n`;\n\n          if (node.value.priority === 'lazy') {\n            code += 'module.exports = Promise.resolve(exports);\\n';\n          }\n\n          runtimes.push({\n            filePath: replaceExtension(resolvedAsset.filePath),\n            code,\n            dependency: node.value,\n            env: {sourceType: 'module'},\n          });\n\n          // Dependency on a server action.\n        } else if (\n          resolvedAsset &&\n          Array.isArray(directives) &&\n          directives.includes('use server')\n        ) {\n          let code;\n          if (node.value.env.isServer()) {\n            // Dependency on a \"use server\" module from a server environment.\n            // Mark each export as a server reference that can be passed to a client component as a prop.\n            code = `import {registerServerReference} from \"react-server-dom-parcel/server.edge\";\\n`;\n            let publicId = JSON.stringify(\n              bundleGraph.getAssetPublicId(resolvedAsset),\n            );\n            code += `let originalModule = parcelRequire(${publicId});\\n`;\n            code += `for (let key in originalModule) {\\n`;\n            code += `  Object.defineProperty(exports, key, {\\n`;\n            code += `    enumerable: true,\\n`;\n            code += `    get: () => {\\n`;\n            code += `      let value = originalModule[key];\\n`;\n            code += `      if (typeof value === 'function' && !value.$$typeof) {\\n`;\n            code += `        registerServerReference(value, ${publicId}, key);\\n`;\n            code += `      }\\n`;\n            code += `      return value;\\n`;\n            code += `    }\\n`;\n            code += `  });\\n`;\n            code += `}\\n`;\n          } else {\n            // Dependency on a \"use server\" module from a client environment.\n            // Create a client proxy module that will call the server.\n            code = `import {createServerReference} from \"react-server-dom-parcel/client\";\\n`;\n            let usedSymbols = bundleGraph.getUsedSymbols(resolvedAsset);\n            if (usedSymbols?.has('*')) {\n              usedSymbols = null;\n            }\n            for (let symbol of bundleGraph.getExportedSymbols(\n              resolvedAsset,\n              bundle,\n            )) {\n              if (usedSymbols && !usedSymbols.has(symbol.exportAs)) {\n                continue;\n              }\n              code += `exports[${JSON.stringify(\n                symbol.exportAs,\n              )}] = createServerReference(${JSON.stringify(\n                bundleGraph.getAssetPublicId(symbol.asset),\n              )}, ${JSON.stringify(symbol.exportSymbol)});\\n`;\n            }\n          }\n\n          code += `exports.__esModule = true;\\n`;\n          if (node.value.priority === 'lazy') {\n            code += 'module.exports = Promise.resolve(exports);\\n';\n          }\n\n          runtimes.push({\n            filePath: replaceExtension(resolvedAsset.filePath),\n            code,\n            dependency: node.value,\n            env: {sourceType: 'module'},\n            shouldReplaceResolution: true,\n          });\n        } else {\n          // Handle bundle group boundaries to automatically inject resources like CSS.\n          // This is normally handled by the JS runtime, but we need to add resources to the\n          // React tree so they get loaded during SSR as well.\n          let asyncResolution = bundleGraph.resolveAsyncDependency(node.value);\n          if (asyncResolution?.type === 'bundle_group') {\n            let bundles = bundleGraph.getBundlesInBundleGroup(\n              asyncResolution.value,\n              {includeIsolated: false},\n            );\n            let resources = [];\n            let js = [];\n            let preinit = [];\n            let css = [];\n            let bootstrapModules = [];\n            let entry;\n            let importMap = {};\n            for (let b of bundles) {\n              if (b.type === 'css') {\n                resources.push(renderStylesheet(bundle, b));\n                if (bundle.env.isBrowser()) {\n                  let url = urlJoin(b.target.publicUrl, b.name);\n                  preinit.push(\n                    `preinit(parcelRequire.resolve(${JSON.stringify(\n                      b.publicId,\n                    )}), {as: 'style', precedence: 'default'});`,\n                  );\n                  css.push(`waitForCSS(${JSON.stringify(url)})`);\n                }\n              } else if (b.type === 'js') {\n                if (b.env.isBrowser()) {\n                  let url = urlJoin(b.target.publicUrl, b.name);\n                  // Preload scripts for dynamic imports during SSR.\n                  // Can't use <script> because there might not be a prelude available yet.\n                  if (bundle.env.isBrowser()) {\n                    if (b.env.outputFormat === 'esmodule') {\n                      resources.push(\n                        `<link rel=\"modulepreload\" href=${resolveURL(\n                          bundle,\n                          b,\n                        )} />`,\n                      );\n                    } else {\n                      resources.push(\n                        `<link rel=\"preload\" as=\"script\" href=${resolveURL(\n                          bundle,\n                          b,\n                        )} />`,\n                      );\n                    }\n                  }\n                  bootstrapModules.push(url);\n                  Object.assign(importMap, getImportMap(bundleGraph, b));\n                }\n\n                if (b.env.context === bundle.env.context) {\n                  if (b.env.outputFormat === 'esmodule') {\n                    js.push(\n                      `parcelRequire.load(${JSON.stringify(b.publicId)})`,\n                    );\n                  } else if (b.env.outputFormat === 'commonjs') {\n                    let relativePath = JSON.stringify(\n                      relativeBundlePath(bundle, b),\n                    );\n                    js.push(\n                      `Promise.resolve(__parcel__require__(${relativePath}))`,\n                    );\n                  } else {\n                    throw new Error(\n                      'Unsupported output format: ' + b.env.outputFormat,\n                    );\n                  }\n                }\n\n                // Find the client entry in this bundle group if any.\n                if (bundle.env.isServer() && b.env.isBrowser() && !entry) {\n                  b.traverseAssets((a, ctx, actions) => {\n                    if (\n                      Array.isArray(a.meta.directives) &&\n                      a.meta.directives.includes('use client-entry')\n                    ) {\n                      entry = a;\n                      actions.stop();\n                    }\n                  });\n                }\n              }\n            }\n\n            if (\n              resources.length > 0 ||\n              (node.value.priority !== 'lazy' && entry)\n            ) {\n              // Use a proxy to attach resources to all exports.\n              // This will be used by the JSX runtime to automatically render CSS at bundle group boundaries.\n              let code = `import {createResourcesProxy, waitForCSS} from '@parcel/runtime-rsc/rsc-helpers';\\n`;\n              if (node.value.priority === 'lazy') {\n                if (preinit.length) {\n                  // Start preloading CSS via React.\n                  code += `import {preinit} from 'react-dom';\\n`;\n                  code += preinit.join('\\n') + '\\n';\n                }\n                code += `let promise = Promise.all([${js.join(\n                  ', ',\n                )}]).then(() => {\\n`;\n                // If promise is not being loaded by React.lazy, wait for CSS to load.\n                // Otherwise, React will suspend on the rendered <link> element in the resources.\n                // This allows React to start rendering earlier if the CSS takes longer to load.\n                if (css.length && node.value.meta.isReactLazy !== true) {\n                  code += `  return Promise.all([${css.join(', ')}]);\\n`;\n                  code += '}).then(() => {\\n';\n                }\n              }\n\n              // Also attach a bootstrap script which will be injected into the initial HTML.\n              if (node.value.priority !== 'lazy' && entry) {\n                let parcelRequireName = nullthrows(config).parcelRequireName;\n                let bootstrapScript = `Promise.all([${bootstrapModules\n                  .map(m => `import(\"${m}\")`)\n                  .join(',')}]).then(()=>`;\n                if (Object.keys(importMap).length > 0) {\n                  bootstrapScript += `(Object.assign(${parcelRequireName}.i??={},${JSON.stringify(\n                    importMap,\n                  )}),`;\n                }\n                bootstrapScript += `${parcelRequireName}(${JSON.stringify(\n                  bundleGraph.getAssetPublicId(entry),\n                )}))`;\n                if (Object.keys(importMap).length > 0) {\n                  bootstrapScript += ')';\n                }\n                code += `let bootstrapScript = ${JSON.stringify(\n                  bootstrapScript,\n                )};\\n`;\n              }\n\n              let resolvedAsset = bundleGraph.getAssetById(\n                asyncResolution.value.entryAssetId,\n              );\n              code += `let originalModule = parcelRequire(${JSON.stringify(\n                bundleGraph.getAssetPublicId(resolvedAsset),\n              )});\\n`;\n              code += `let resources = ${\n                resources.length > 1\n                  ? '<>\\n  ' + resources.join('\\n  ') + '\\n</>'\n                  : resources[0]\n              };\\n`;\n              let esModule =\n                resolvedAsset.symbols.get('default')?.meta?.isEsm === true;\n              code += `let res = createResourcesProxy(originalModule, ${String(\n                esModule,\n              )}, resources ${\n                node.value.priority !== 'lazy' && entry\n                  ? ', bootstrapScript'\n                  : ''\n              });\\n`;\n\n              if (node.value.priority === 'lazy') {\n                code += `  return res;\\n`;\n                code += `});\\n`;\n                code += `module.exports = promise;\\n`;\n              } else {\n                code += `module.exports = res;\\n`;\n              }\n\n              let filePath = nullthrows(node.value.sourcePath);\n              runtimes.push({\n                filePath: replaceExtension(filePath),\n                code,\n                dependency: node.value,\n                env: {sourceType: 'module'},\n              });\n            }\n          }\n        }\n      }\n    });\n\n    // Register server actions in the server entry point.\n    if (\n      bundle.env.isServer() &&\n      bundleGraph.getParentBundles(bundle).length === 0\n    ) {\n      let serverActions = getServerActions(bundleGraph);\n      let code = '';\n      if (serverActions.length > 0) {\n        code +=\n          'import {registerServerActions} from \"react-server-dom-parcel/server.edge\";\\n';\n        code += `registerServerActions({\\n`;\n        code += serverActions;\n        code += '});\\n';\n      }\n\n      // React needs AsyncLocalStorage defined as a global for the edge environment.\n      // Without this, preinit scripts won't be inserted during SSR.\n      code += 'if (typeof AsyncLocalStorage === \"undefined\") {\\n';\n      code += '  try {\\n';\n      code +=\n        '    globalThis.AsyncLocalStorage = require(\"node:async_hooks\").AsyncLocalStorage;\\n';\n      code += '  } catch {}\\n';\n      code += '}\\n';\n\n      runtimes.push({\n        filePath: replaceExtension(\n          bundle.getMainEntry()?.filePath ?? __filename,\n        ),\n        code,\n        isEntry: true,\n        env: {sourceType: 'module'},\n      });\n    }\n\n    return runtimes;\n  },\n}): Runtime);\n\nfunction replaceExtension(filePath, extension = '.jsx') {\n  let ext = path.extname(filePath);\n  return filePath.slice(0, -ext.length) + extension;\n}\n\nfunction renderStylesheet(from, to) {\n  return `<link rel=\"stylesheet\" href=${resolveURL(\n    from,\n    to,\n  )} precedence=\"default\" />`;\n}\n\nfunction resolveURL(from, to) {\n  if (from.env.isServer()) {\n    let url = urlJoin(to.target.publicUrl, to.name);\n    return JSON.stringify(url);\n  }\n\n  return `{parcelRequire.resolve(${JSON.stringify(to.publicId)})}`;\n}\n\nlet serverActionsCache = new WeakMap();\nfunction getServerActions(bundleGraph) {\n  let cached = serverActionsCache.get(bundleGraph);\n  if (cached != null) {\n    return cached;\n  }\n  let serverActions = '';\n  bundleGraph.traverse(node => {\n    if (\n      node.type === 'asset' &&\n      Array.isArray(node.value.meta?.directives) &&\n      node.value.meta.directives.includes('use server')\n    ) {\n      let bundlesWithAsset = bundleGraph.getBundlesWithAsset(node.value);\n      let bundles = new Set();\n      let referenced = bundleGraph.getReferencedBundles(bundlesWithAsset[0]);\n      bundles.add(normalizeSeparators(bundlesWithAsset[0].name));\n      for (let r of referenced) {\n        if (r.type === 'js' && r.env.context === 'react-server') {\n          bundles.add(normalizeSeparators(r.name));\n        }\n      }\n      serverActions += `  ${JSON.stringify(\n        bundleGraph.getAssetPublicId(node.value),\n      )}: ${JSON.stringify([...bundles])},\\n`;\n    }\n  });\n  serverActionsCache.set(bundleGraph, serverActions);\n  return serverActions;\n}\n"
  },
  {
    "path": "packages/runtimes/service-worker/package.json",
    "content": "{\n  \"name\": \"@parcel/runtime-service-worker\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"./lib/ServiceWorkerRuntime.js\",\n  \"source\": \"./src/ServiceWorkerRuntime.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/runtimes/service-worker/src/ServiceWorkerRuntime.js",
    "content": "// @flow\nimport {Runtime} from '@parcel/plugin';\nimport {urlJoin} from '@parcel/utils';\n\nexport default (new Runtime({\n  apply({bundle, bundleGraph}) {\n    if (bundle.env.context !== 'service-worker') {\n      return [];\n    }\n\n    let asset = bundle.traverse((node, _, actions) => {\n      if (\n        node.type === 'dependency' &&\n        node.value.specifier === '@parcel/service-worker' &&\n        !bundleGraph.isDependencySkipped(node.value)\n      ) {\n        actions.stop();\n        return bundleGraph.getResolvedAsset(node.value, bundle);\n      }\n    });\n\n    if (!asset) {\n      return [];\n    }\n\n    let manifest = [];\n    bundleGraph.traverseBundles(b => {\n      if (b.bundleBehavior === 'inline' || b.id === bundle.id) {\n        return;\n      }\n\n      manifest.push(urlJoin(b.target.publicUrl, b.name));\n    });\n\n    let code = `import {_register} from '@parcel/service-worker';\nconst manifest = ${JSON.stringify(manifest)};\nconst version = ${JSON.stringify(bundle.hashReference)};\n_register(manifest, version);\n`;\n\n    return [\n      {\n        filePath: asset.filePath,\n        code,\n        isEntry: true,\n        env: {sourceType: 'module'},\n      },\n    ];\n  },\n}): Runtime);\n"
  },
  {
    "path": "packages/runtimes/webextension/package.json",
    "content": "{\n  \"name\": \"@parcel/runtime-webextension\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/WebExtensionRuntime.js\",\n  \"source\": \"src/WebExtensionRuntime.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/runtimes/webextension/src/WebExtensionRuntime.js",
    "content": "// @flow strict-local\n\nimport {Runtime} from '@parcel/plugin';\nimport {replaceURLReferences} from '@parcel/utils';\nimport nullthrows from 'nullthrows';\nimport fs from 'fs';\nimport path from 'path';\n\nconst AUTORELOAD_BG = fs.readFileSync(\n  path.join(__dirname, 'autoreload-bg.js'),\n  'utf8',\n);\n\nexport default (new Runtime({\n  loadConfig({config}) {\n    config.invalidateOnBuild();\n  },\n  async apply({bundle, bundleGraph, options}) {\n    if (!bundle.env.isBrowser() || bundle.env.isWorklet()) {\n      return;\n    }\n\n    if (bundle.getMainEntry()?.meta.webextEntry === true) {\n      // Hack to bust packager cache when any descendants update\n      const descendants = [];\n      bundleGraph.traverseBundles(b => {\n        descendants.push(b.id);\n      }, bundle);\n      return {\n        filePath: __filename,\n        code: JSON.stringify(descendants),\n        isEntry: true,\n      };\n    } else if (options.hmrOptions && bundle.type == 'js') {\n      const manifest = bundleGraph\n        .getBundles()\n        .find(b => b.getMainEntry()?.meta.webextEntry === true);\n      const entry = manifest?.getMainEntry();\n      const insertDep = entry?.meta.webextBGInsert;\n      if (!manifest || !entry || insertDep == null) return;\n      const insertBundle = bundleGraph.getReferencedBundle(\n        nullthrows(entry?.getDependencies().find(dep => dep.id === insertDep)),\n        nullthrows(manifest),\n      );\n      let firstInsertableBundle;\n      bundleGraph.traverseBundles((b, _, actions) => {\n        if (b.type == 'js') {\n          firstInsertableBundle = b;\n          actions.stop();\n        }\n      }, insertBundle);\n\n      // Add autoreload\n      if (bundle === firstInsertableBundle) {\n        return [\n          {\n            filePath: __filename,\n            code: AUTORELOAD_BG,\n            isEntry: true,\n          },\n          {\n            filePath: __filename,\n            // cache bust on non-asset manifest.json changes\n            code: `JSON.parse(${JSON.stringify(\n              JSON.stringify(\n                JSON.parse(\n                  replaceURLReferences({\n                    bundle: manifest,\n                    bundleGraph,\n                    contents: await entry.getCode(),\n                    getReplacement: () => '',\n                  }).contents,\n                ),\n              ),\n            )})`,\n            isEntry: true,\n          },\n        ];\n      }\n    }\n  },\n}): Runtime);\n"
  },
  {
    "path": "packages/runtimes/webextension/src/autoreload-bg.js",
    "content": "/* global chrome, browser */\nlet env = typeof browser === 'undefined' ? chrome : browser;\nlet origReload = env.runtime.reload;\nlet avoidID = -1;\n\nlet promisify =\n  (obj, fn) =>\n  (...args) => {\n    if (typeof browser === 'undefined') {\n      return new Promise((resolve, reject) =>\n        obj[fn](...args, res =>\n          env.runtime.lastError ? reject(env.runtime.lastError) : resolve(res),\n        ),\n      );\n    }\n    return obj[fn](...args);\n  };\n\nlet queryTabs = promisify(env.tabs, 'query');\nlet messageTab = promisify(env.tabs, 'sendMessage');\n\nenv.runtime.reload = () => {\n  queryTabs({})\n    .then(tabs => {\n      return Promise.all(\n        tabs.map(tab => {\n          if (tab.id === avoidID) return;\n          return messageTab(tab.id, {\n            __parcel_hmr_reload__: true,\n          }).catch(() => {});\n        }),\n      );\n    })\n    .then(() => {\n      origReload.call(env.runtime);\n    });\n};\n\nenv.runtime.onMessage.addListener((msg, sender) => {\n  if (msg.__parcel_hmr_reload__) {\n    avoidID = sender.tab.id;\n    env.runtime.reload();\n  }\n});\n"
  },
  {
    "path": "packages/transformers/babel/README.md",
    "content": "# @parcel/transformer-babel\n\nThis Parcel transformer plugin is responsible for transforming assets with Babel. It uses `@babel/core` to resolve babel config the same way Babel does and uses that if found. If no filesystem config is found it uses a default config that supports the most common cases.\n\n## Default config\n\n- `@babel/preset-env` - Uses the targets defined in `package.json` or a default set of targets if none are defined to pass to `@babel/preset-env` as options. It runs over all source code as well as installed packages that have a browserslist with higher targets than the app being built by Parcel.\n- `@babel/plugin-flow-strip-types` - Right now it configures the flow plugin which uses the ast to check if there is a flow directive and strips types if so [TODO: It should do a cheap check of the code and only apply the plugin if a flow directive is found as it may affect parsing when it shouldn't]\n- `@babel/plugin-transform-typescript` - Configured for files with extenions `.ts` and `.tsx`\n- `@babel/plugin-transform-react-jsx` - Configured if file has extension `.jsx` or if a React like dependency is found as a dependency in package.json.\n\n## Custom config perf warnings\n\nParcel now supports all configuration formats that Babel supports, but some of them come with negative performance impacts.\n\n- `babel.config.js`/`.babelrc.js` - Since Babel 7, config files as JS are now supported. While this provides flexibility it hurts cacheability. Parcel cannot cache using the contents of the these files because the config they return is non deterministic based on content alone. Imported dependencies may change or the results may be based on environment variables. For this reason Parcel has to resolve load these files on each build and make sure their output is still the same. Another downside to using JS config files is that they end up being `require()`ed by Babel so Parcel cannot rebuild when the file changes in watch mode. To avoid these performance penalties, it is suggested that you use a `babel.config.json` or `.babelrc` file instead.\n- `require('@babel')` - With the advent of JS config files, it is now possible to directly require presets and plugins in configs instead of using names or paths that are resolved by Babel. Unfortunately this gives Parcel no information about which plugins/presets were used in a transformation so Parcel will be forced to run the Babel transformations on every build. It is suggested to avoid this type of configuration.\n"
  },
  {
    "path": "packages/transformers/babel/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-babel\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/BabelTransformer.js\",\n  \"source\": \"src/BabelTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"browserslist\": \"^4.24.5\",\n    \"json5\": \"^2.2.3\",\n    \"nullthrows\": \"^1.1.1\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@babel/preset-env\": \"^7.22.14\",\n    \"@babel/types\": \"^7.22.11\",\n    \"@parcel/types\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/babel/src/BabelTransformer.js",
    "content": "// @flow strict-local\n\nimport {babelErrorEnhancer} from './babelErrorUtils';\nimport {Transformer} from '@parcel/plugin';\nimport {relativeUrl} from '@parcel/utils';\nimport SourceMap from '@parcel/source-map';\nimport semver from 'semver';\nimport babel7 from './babel7';\nimport {load} from './config';\n\nexport default (new Transformer({\n  loadConfig({config, options, logger}) {\n    return load(config, options, logger);\n  },\n\n  canReuseAST({ast}) {\n    return ast.type === 'babel' && semver.satisfies(ast.version, '^7.0.0');\n  },\n\n  async transform({asset, config, logger, options, tracer}) {\n    try {\n      if (config?.config) {\n        if (\n          asset.meta.babelPlugins != null &&\n          Array.isArray(asset.meta.babelPlugins)\n        ) {\n          await babel7({\n            asset,\n            options,\n            logger,\n            babelOptions: config,\n            additionalPlugins: asset.meta.babelPlugins,\n            tracer,\n          });\n        } else {\n          await babel7({\n            asset,\n            options,\n            logger,\n            babelOptions: config,\n            tracer,\n          });\n        }\n      }\n\n      return [asset];\n    } catch (e) {\n      throw await babelErrorEnhancer(e, asset);\n    }\n  },\n\n  async generate({asset, ast, options}) {\n    let originalSourceMap = await asset.getMap();\n    let sourceFileName: string = relativeUrl(\n      options.projectRoot,\n      asset.filePath,\n    );\n\n    const babelCorePath = await options.packageManager.resolve(\n      '@babel/core',\n      asset.filePath,\n      {\n        range: '^7.12.0',\n        saveDev: true,\n        shouldAutoInstall: options.shouldAutoInstall,\n      },\n    );\n\n    const {default: generate} = await options.packageManager.require(\n      '@babel/generator',\n      babelCorePath.resolved,\n    );\n\n    let {code, rawMappings} = generate(ast.program, {\n      sourceFileName,\n      sourceMaps: !!asset.env.sourceMap,\n      comments: true,\n      importAttributesKeyword: 'with',\n    });\n\n    let map = new SourceMap(options.projectRoot);\n    if (rawMappings) {\n      map.addIndexedMappings(rawMappings);\n    }\n\n    if (originalSourceMap) {\n      // The babel AST already contains the correct mappings, but not the source contents.\n      // We need to copy over the source contents from the original map.\n      let sourcesContent = originalSourceMap.getSourcesContentMap();\n      for (let filePath in sourcesContent) {\n        let content = sourcesContent[filePath];\n        if (content != null) {\n          map.setSourceContent(filePath, content);\n        }\n      }\n    }\n\n    return {\n      content: code,\n      map,\n    };\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/babel/src/babel7.js",
    "content": "// @flow\n\nimport type {\n  MutableAsset,\n  AST,\n  PluginOptions,\n  PluginTracer,\n  PluginLogger,\n} from '@parcel/types';\nimport typeof * as BabelCore from '@babel/core';\n\nimport invariant from 'assert';\nimport path from 'path';\nimport {md} from '@parcel/diagnostic';\nimport {relativeUrl} from '@parcel/utils';\nimport {remapAstLocations} from './remapAstLocations';\n\nimport packageJson from '../package.json';\n\nconst transformerVersion: mixed = packageJson.version;\ninvariant(typeof transformerVersion === 'string');\n\ntype Babel7TransformOptions = {|\n  asset: MutableAsset,\n  options: PluginOptions,\n  logger: PluginLogger,\n  babelOptions: any,\n  additionalPlugins?: Array<any>,\n  tracer: PluginTracer,\n|};\n\nexport default async function babel7(\n  opts: Babel7TransformOptions,\n): Promise<?AST> {\n  let {asset, options, babelOptions, additionalPlugins = [], tracer} = opts;\n  const babelCore: BabelCore = await options.packageManager.require(\n    '@babel/core',\n    asset.filePath,\n    {\n      range: '^7.12.0',\n      saveDev: true,\n      shouldAutoInstall: options.shouldAutoInstall,\n    },\n  );\n\n  let config = {\n    ...babelOptions.config,\n    plugins: additionalPlugins.concat(babelOptions.config.plugins),\n    code: false,\n    ast: true,\n    filename: asset.filePath,\n    babelrc: false,\n    configFile: false,\n    parserOpts: {\n      ...babelOptions.config.parserOpts,\n      sourceFilename: relativeUrl(options.projectRoot, asset.filePath),\n      allowReturnOutsideFunction: true,\n      strictMode: false,\n      sourceType: 'module',\n      plugins: [\n        ...(babelOptions.config.parserOpts?.plugins ?? []),\n        ...(babelOptions.syntaxPlugins ?? []),\n        // Applied by preset-env\n        'classProperties',\n        'classPrivateProperties',\n        'classPrivateMethods',\n        'exportDefaultFrom',\n        // 'topLevelAwait'\n      ],\n    },\n    caller: {\n      name: 'parcel',\n      version: transformerVersion,\n      targets: JSON.stringify(babelOptions.targets),\n      outputFormat: asset.env.outputFormat,\n    },\n  };\n\n  if (tracer.enabled) {\n    config.wrapPluginVisitorMethod = (\n      key: string,\n      nodeType: string,\n      fn: Function,\n    ) => {\n      return function () {\n        let pluginKey = key;\n        if (pluginKey.startsWith(options.projectRoot)) {\n          pluginKey = path.relative(options.projectRoot, pluginKey);\n        }\n        const measurement = tracer.createMeasurement(\n          pluginKey,\n          nodeType,\n          path.relative(options.projectRoot, asset.filePath),\n        );\n        fn.apply(this, arguments);\n        measurement && measurement.end();\n      };\n    };\n  }\n\n  let ast = await asset.getAST();\n  let res;\n  if (ast) {\n    res = await babelCore.transformFromAstAsync(\n      ast.program,\n      asset.isASTDirty() ? undefined : await asset.getCode(),\n      config,\n    );\n  } else {\n    res = await babelCore.transformAsync(await asset.getCode(), config);\n    if (res.ast) {\n      let map = await asset.getMap();\n      if (map) {\n        remapAstLocations(babelCore.types, res.ast, map);\n      }\n    }\n    if (res.externalDependencies) {\n      for (let f of res.externalDependencies) {\n        if (!path.isAbsolute(f)) {\n          opts.logger.warn({\n            message: md`Ignoring non-absolute Babel external dependency: ${f}`,\n            hints: [\n              'Please report this to the corresponding Babel plugin and/or to Parcel.',\n            ],\n          });\n        } else {\n          if (await options.inputFS.exists(f)) {\n            asset.invalidateOnFileChange(f);\n          } else {\n            asset.invalidateOnFileCreate({filePath: f});\n          }\n        }\n      }\n    }\n  }\n\n  if (res.ast) {\n    asset.setAST({\n      type: 'babel',\n      version: '7.0.0',\n      program: res.ast,\n    });\n  }\n}\n"
  },
  {
    "path": "packages/transformers/babel/src/babelErrorUtils.js",
    "content": "// @flow\nimport type {BaseAsset} from '@parcel/types';\n\nexport type BabelError = Error & {\n  loc?: {\n    line: number,\n    column: number,\n    ...\n  },\n  source?: string,\n  filePath?: string,\n  ...\n};\n\nexport async function babelErrorEnhancer(\n  error: BabelError,\n  asset: BaseAsset,\n): Promise<BabelError> {\n  if (error.loc) {\n    let start = error.message.startsWith(asset.filePath)\n      ? asset.filePath.length + 1\n      : 0;\n    error.message = error.message.slice(start).split('\\n')[0].trim();\n  }\n\n  error.source = await asset.getCode();\n  error.filePath = asset.filePath;\n\n  return error;\n}\n"
  },
  {
    "path": "packages/transformers/babel/src/config.js",
    "content": "// @flow\n\nimport type {Config, PluginOptions, PluginLogger} from '@parcel/types';\nimport typeof * as BabelCore from '@babel/core';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport type {BabelConfig} from './types';\n\nimport json5 from 'json5';\nimport path from 'path';\nimport {hashObject, relativePath, resolveConfig} from '@parcel/utils';\nimport {md, generateJSONCodeHighlights} from '@parcel/diagnostic';\nimport {BABEL_CORE_RANGE} from './constants';\n\nimport isJSX from './jsx';\nimport getFlowOptions from './flow';\nimport {enginesToBabelTargets} from './utils';\n\nconst TYPESCRIPT_EXTNAME_RE = /\\.tsx?$/;\nconst JS_EXTNAME_RE = /^\\.(js|cjs|mjs)$/;\nconst BABEL_CONFIG_FILENAMES = [\n  '.babelrc',\n  '.babelrc.js',\n  '.babelrc.json',\n  '.babelrc.cjs',\n  '.babelrc.mjs',\n  '.babelignore',\n  'babel.config.js',\n  'babel.config.json',\n  'babel.config.mjs',\n  'babel.config.cjs',\n];\n\ntype BabelConfigResult = {|\n  internal: boolean,\n  config: BabelConfig,\n  targets?: mixed,\n  syntaxPlugins?: mixed,\n|};\n\nexport async function load(\n  config: Config,\n  options: PluginOptions,\n  logger: PluginLogger,\n): Promise<?BabelConfigResult> {\n  // Don't transpile inside node_modules\n  if (!config.isSource) {\n    return;\n  }\n\n  // Invalidate when any babel config file is added.\n  for (let fileName of BABEL_CONFIG_FILENAMES) {\n    config.invalidateOnFileCreate({\n      fileName,\n      aboveFilePath: config.searchPath,\n    });\n  }\n\n  // Do nothing if we cannot resolve any babel config filenames. Checking using our own\n  // config resolution (which is cached) is much faster than relying on babel.\n  if (\n    !(await resolveConfig(\n      options.inputFS,\n      config.searchPath,\n      BABEL_CONFIG_FILENAMES,\n      options.projectRoot,\n    ))\n  ) {\n    return buildDefaultBabelConfig(options, config);\n  }\n\n  const babelCore: BabelCore = await options.packageManager.require(\n    '@babel/core',\n    config.searchPath,\n    {\n      range: BABEL_CORE_RANGE,\n      saveDev: true,\n      shouldAutoInstall: options.shouldAutoInstall,\n    },\n  );\n  config.addDevDependency({\n    specifier: '@babel/core',\n    resolveFrom: config.searchPath,\n    range: BABEL_CORE_RANGE,\n  });\n\n  config.invalidateOnEnvChange('BABEL_ENV');\n  config.invalidateOnEnvChange('NODE_ENV');\n  let babelOptions = {\n    filename: config.searchPath,\n    cwd: options.projectRoot,\n    envName:\n      options.env.BABEL_ENV ??\n      options.env.NODE_ENV ??\n      (options.mode === 'production' || options.mode === 'development'\n        ? options.mode\n        : null) ??\n      'development',\n    showIgnoredFiles: true,\n  };\n\n  let partialConfig: ?{|\n    [string]: any,\n  |} = await babelCore.loadPartialConfigAsync(babelOptions);\n\n  let addIncludedFile = file => {\n    if (JS_EXTNAME_RE.test(path.extname(file))) {\n      // We need to invalidate on startup in case the config is non-static,\n      // e.g. uses unknown environment variables, reads from the filesystem, etc.\n      logger.warn({\n        message: `It looks like you're using a JavaScript Babel config file. This means the config cannot be watched for changes, and Babel transformations cannot be cached. You'll need to restart Parcel for changes to this config to take effect. Try using a ${\n          path.basename(file, path.extname(file)) + '.json'\n        } file instead.`,\n      });\n      config.invalidateOnStartup();\n\n      // But also add the config as a dev dependency so we can at least attempt invalidation in watch mode.\n      config.addDevDependency({\n        specifier: relativePath(options.projectRoot, file),\n        resolveFrom: path.join(options.projectRoot, 'index'),\n        // Also invalidate @babel/core when the config or a dependency updates.\n        // This ensures that the caches in @babel/core are also invalidated.\n        additionalInvalidations: [\n          {\n            specifier: '@babel/core',\n            resolveFrom: config.searchPath,\n            range: BABEL_CORE_RANGE,\n          },\n        ],\n      });\n    } else {\n      config.invalidateOnFileChange(file);\n    }\n  };\n\n  let warnOldVersion = () => {\n    logger.warn({\n      message:\n        'You are using an old version of @babel/core which does not support the necessary features for Parcel to cache and watch babel config files safely. You may need to restart Parcel for config changes to take effect. Please upgrade to @babel/core 7.12.0 or later to resolve this issue.',\n    });\n    config.invalidateOnStartup();\n  };\n\n  // Old versions of @babel/core return null from loadPartialConfig when the file should explicitly not be run through babel (ignore/exclude)\n  if (partialConfig == null) {\n    warnOldVersion();\n    return;\n  }\n\n  if (partialConfig.files == null) {\n    // If the files property is missing, we're on an old version of @babel/core.\n    // We need to invalidate on startup because we can't properly track dependencies.\n    if (partialConfig.hasFilesystemConfig()) {\n      warnOldVersion();\n\n      if (typeof partialConfig.babelrcPath === 'string') {\n        addIncludedFile(partialConfig.babelrcPath);\n      }\n\n      if (typeof partialConfig.configPath === 'string') {\n        addIncludedFile(partialConfig.configPath);\n      }\n    }\n  } else {\n    for (let file of partialConfig.files) {\n      addIncludedFile(file);\n    }\n  }\n\n  if (\n    partialConfig.fileHandling != null &&\n    partialConfig.fileHandling !== 'transpile'\n  ) {\n    return;\n  } else if (partialConfig.hasFilesystemConfig()) {\n    // Determine what syntax plugins we need to enable\n    let syntaxPlugins = [];\n    if (TYPESCRIPT_EXTNAME_RE.test(config.searchPath)) {\n      syntaxPlugins.push('typescript');\n      if (config.searchPath.endsWith('.tsx')) {\n        syntaxPlugins.push('jsx');\n      }\n    } else if (await isJSX(options, config)) {\n      syntaxPlugins.push('jsx');\n    }\n\n    // If the config has plugins loaded with require(), or inline plugins in the config,\n    // we can't cache the result of the compilation because we don't know where they came from.\n    if (hasRequire(partialConfig.options)) {\n      logger.warn({\n        message:\n          'It looks like you are using `require` to configure Babel plugins or presets. This means Babel transformations cannot be cached and will run on each build. Please use strings to configure Babel instead.',\n      });\n\n      config.setCacheKey(JSON.stringify(Date.now()));\n      config.invalidateOnStartup();\n    } else {\n      await warnOnRedundantPlugins(options.inputFS, partialConfig, logger);\n      definePluginDependencies(config, partialConfig.options, options);\n      config.setCacheKey(hashObject(partialConfig.options));\n    }\n\n    return {\n      internal: false,\n      config: partialConfig.options,\n      targets: enginesToBabelTargets(config.env),\n      syntaxPlugins,\n    };\n  } else {\n    return buildDefaultBabelConfig(options, config);\n  }\n}\n\nasync function buildDefaultBabelConfig(\n  options: PluginOptions,\n  config: Config,\n): Promise<?BabelConfigResult> {\n  // If this is a .ts or .tsx file, we don't need to enable flow.\n  if (TYPESCRIPT_EXTNAME_RE.test(config.searchPath)) {\n    return;\n  }\n\n  // Detect flow. If not enabled, babel doesn't need to run at all.\n  let babelOptions = await getFlowOptions(config, options);\n  if (babelOptions == null) {\n    return;\n  }\n\n  // When flow is enabled, we may also need to enable JSX so it parses properly.\n  let syntaxPlugins = [];\n  if (await isJSX(options, config)) {\n    syntaxPlugins.push('jsx');\n  }\n\n  definePluginDependencies(config, babelOptions, options);\n  return {\n    internal: true,\n    config: babelOptions,\n    syntaxPlugins,\n  };\n}\n\nfunction hasRequire(options) {\n  let configItems = [...options.presets, ...options.plugins];\n  return configItems.some(item => !item.file);\n}\n\nfunction definePluginDependencies(config, babelConfig: ?BabelConfig, options) {\n  if (babelConfig == null) {\n    return;\n  }\n\n  let configItems = [\n    ...(babelConfig.presets || []),\n    ...(babelConfig.plugins || []),\n  ];\n  for (let configItem of configItems) {\n    // FIXME: this uses a relative path from the project root rather than resolving\n    // from the config location because configItem.file.request can be a shorthand\n    // rather than a full package name.\n    config.addDevDependency({\n      specifier: relativePath(options.projectRoot, configItem.file.resolved),\n      resolveFrom: path.join(options.projectRoot, 'index'),\n      // Also invalidate @babel/core when the plugin or a dependency updates.\n      // This ensures that the caches in @babel/core are also invalidated.\n      additionalInvalidations: [\n        {\n          specifier: '@babel/core',\n          resolveFrom: config.searchPath,\n          range: BABEL_CORE_RANGE,\n        },\n      ],\n    });\n  }\n}\n\nconst redundantPresets = new Set([\n  '@babel/preset-env',\n  '@babel/preset-react',\n  '@babel/preset-typescript',\n  '@parcel/babel-preset-env',\n]);\n\nasync function warnOnRedundantPlugins(fs, babelConfig, logger) {\n  if (babelConfig == null) {\n    return;\n  }\n\n  let configPath = babelConfig.config ?? babelConfig.babelrc;\n  if (!configPath) {\n    return;\n  }\n\n  let presets = babelConfig.options.presets || [];\n  let plugins = babelConfig.options.plugins || [];\n  let foundRedundantPresets = new Set();\n\n  let filteredPresets = presets.filter(preset => {\n    if (redundantPresets.has(preset.file.request)) {\n      foundRedundantPresets.add(preset.file.request);\n      return false;\n    }\n\n    return true;\n  });\n\n  let filePath = path.relative(process.cwd(), configPath);\n  let diagnostics: Array<Diagnostic> = [];\n\n  if (\n    filteredPresets.length === 0 &&\n    foundRedundantPresets.size > 0 &&\n    plugins.length === 0\n  ) {\n    diagnostics.push({\n      message: md`Parcel includes transpilation by default. Babel config __${filePath}__ contains only redundant presets. Deleting it may significantly improve build performance.`,\n      codeFrames: [\n        {\n          filePath: configPath,\n          codeHighlights: await getCodeHighlights(\n            fs,\n            configPath,\n            foundRedundantPresets,\n          ),\n        },\n      ],\n      hints: [md`Delete __${filePath}__`],\n      documentationURL:\n        'https://parceljs.org/languages/javascript/#default-presets',\n    });\n  } else if (foundRedundantPresets.size > 0) {\n    diagnostics.push({\n      message: md`Parcel includes transpilation by default. Babel config __${filePath}__ includes the following redundant presets: ${[\n        ...foundRedundantPresets,\n      ].map(p =>\n        md.underline(p),\n      )}. Removing these may improve build performance.`,\n      codeFrames: [\n        {\n          filePath: configPath,\n          codeHighlights: await getCodeHighlights(\n            fs,\n            configPath,\n            foundRedundantPresets,\n          ),\n        },\n      ],\n      hints: [md`Remove the above presets from __${filePath}__`],\n      documentationURL:\n        'https://parceljs.org/languages/javascript/#default-presets',\n    });\n  }\n\n  if (foundRedundantPresets.has('@babel/preset-env')) {\n    diagnostics.push({\n      message:\n        \"@babel/preset-env does not support Parcel's targets, which will likely result in unnecessary transpilation and larger bundle sizes.\",\n      codeFrames: [\n        {\n          filePath: babelConfig.config ?? babelConfig.babelrc,\n          codeHighlights: await getCodeHighlights(\n            fs,\n            babelConfig.config ?? babelConfig.babelrc,\n            new Set(['@babel/preset-env']),\n          ),\n        },\n      ],\n      hints: [\n        `Either remove __@babel/preset-env__ to use Parcel's builtin transpilation, or replace with __@parcel/babel-preset-env__`,\n      ],\n      documentationURL:\n        'https://parceljs.org/languages/javascript/#custom-plugins',\n    });\n  }\n\n  if (diagnostics.length > 0) {\n    logger.warn(diagnostics);\n  }\n}\n\nasync function getCodeHighlights(fs, filePath, redundantPresets) {\n  let ext = path.extname(filePath);\n  if (ext !== '.js' && ext !== '.cjs' && ext !== '.mjs') {\n    let contents = await fs.readFile(filePath, 'utf8');\n    let json = json5.parse(contents);\n\n    let presets = json.presets || [];\n    let pointers = [];\n    for (let i = 0; i < presets.length; i++) {\n      if (Array.isArray(presets[i]) && redundantPresets.has(presets[i][0])) {\n        pointers.push({type: 'value', key: `/presets/${i}/0`});\n      } else if (redundantPresets.has(presets[i])) {\n        pointers.push({type: 'value', key: `/presets/${i}`});\n      }\n    }\n\n    if (pointers.length > 0) {\n      return generateJSONCodeHighlights(contents, pointers);\n    }\n  }\n\n  return [\n    {\n      start: {\n        line: 1,\n        column: 1,\n      },\n      end: {\n        line: 1,\n        column: 1,\n      },\n    },\n  ];\n}\n"
  },
  {
    "path": "packages/transformers/babel/src/constants.js",
    "content": "// @flow strict-local\n\nexport const BABEL_CORE_RANGE = '^7.12.0';\n"
  },
  {
    "path": "packages/transformers/babel/src/flow.js",
    "content": "// @flow\n\nimport type {Config, PluginOptions, PackageJSON} from '@parcel/types';\nimport type {BabelConfig} from './types';\nimport typeof * as BabelCore from '@babel/core';\n\nimport {BABEL_CORE_RANGE} from './constants';\nimport path from 'path';\n\n/**\n * Generates a babel config for stripping away Flow types.\n */\nexport default async function getFlowOptions(\n  config: Config,\n  options: PluginOptions,\n): Promise<?BabelConfig> {\n  if (!config.isSource) {\n    return null;\n  }\n\n  // Only add flow plugin if `flow-bin` is listed as a dependency in the root package.json\n  // @parcel/error-overlay package in integration tests is an exception\n  if (\n    !(\n      process.env.PARCEL_BUILD_ENV === 'test' &&\n      config.searchPath.includes('error-overlay')\n    )\n  ) {\n    let conf = await config.getConfigFrom<PackageJSON>(\n      options.projectRoot + '/index',\n      ['package.json'],\n    );\n    let pkg = conf?.contents;\n    if (\n      !pkg ||\n      (!(pkg.dependencies && pkg.dependencies['flow-bin']) &&\n        !(pkg.devDependencies && pkg.devDependencies['flow-bin']))\n    ) {\n      return null;\n    }\n  }\n\n  const babelCore: BabelCore = await options.packageManager.require(\n    '@babel/core',\n    config.searchPath,\n    {\n      range: BABEL_CORE_RANGE,\n      saveDev: true,\n      shouldAutoInstall: options.shouldAutoInstall,\n    },\n  );\n\n  await options.packageManager.require(\n    '@babel/plugin-transform-flow-strip-types',\n    config.searchPath,\n    {\n      range: '^7.0.0',\n      saveDev: true,\n      shouldAutoInstall: options.shouldAutoInstall,\n    },\n  );\n\n  return {\n    plugins: [\n      babelCore.createConfigItem(\n        ['@babel/plugin-transform-flow-strip-types', {requireDirective: true}],\n        {\n          type: 'plugin',\n          dirname: path.dirname(config.searchPath),\n        },\n      ),\n    ],\n  };\n}\n"
  },
  {
    "path": "packages/transformers/babel/src/jsx.js",
    "content": "// @flow strict-local\n\nimport type {Config, PluginOptions} from '@parcel/types';\n\nimport path from 'path';\n\nconst JSX_EXTENSIONS = new Set(['.jsx', '.tsx']);\nconst JSX_LIBRARIES = ['react', 'preact', 'nervejs', 'hyperapp'];\n\n/**\n * Returns whether an asset is likely JSX. Attempts to detect react or react-like libraries\n * along with\n */\nexport default async function isJSX(\n  options: PluginOptions,\n  config: Config,\n): Promise<boolean> {\n  if (!config.isSource) {\n    return false;\n  }\n\n  if (JSX_EXTENSIONS.has(path.extname(config.searchPath))) {\n    return true;\n  }\n\n  let pkg = await config.getPackage();\n  if (pkg?.alias && pkg.alias['react']) {\n    // e.g.: `{ alias: { \"react\": \"preact/compat\" } }`\n    return true;\n  } else {\n    // Find a dependency that implies JSX syntax.\n    return JSX_LIBRARIES.some(\n      libName =>\n        pkg &&\n        ((pkg.dependencies && pkg.dependencies[libName]) ||\n          (pkg.devDependencies && pkg.devDependencies[libName]) ||\n          (pkg.peerDependencies && pkg.peerDependencies[libName])),\n    );\n  }\n}\n"
  },
  {
    "path": "packages/transformers/babel/src/remapAstLocations.js",
    "content": "// @flow strict-local\n\nimport type {File as BabelNodeFile} from '@babel/types';\nimport type SourceMap from '@parcel/source-map';\nimport type {Node} from '@babel/types';\nimport typeof * as BabelTypes from '@babel/types';\n\nexport function remapAstLocations(\n  t: BabelTypes,\n  ast: BabelNodeFile,\n  map: SourceMap,\n) {\n  // remap ast to original mappings\n  // This improves sourcemap accuracy and fixes sourcemaps when scope-hoisting\n  traverseAll(t, ast.program, node => {\n    if (node.loc) {\n      if (node.loc?.start) {\n        let mapping = map.findClosestMapping(\n          node.loc.start.line,\n          node.loc.start.column,\n        );\n\n        if (mapping?.original) {\n          // $FlowFixMe\n          node.loc.start.line = mapping.original.line;\n          // $FlowFixMe\n          node.loc.start.column = mapping.original.column;\n\n          // $FlowFixMe\n          let length = node.loc.end.column - node.loc.start.column;\n\n          // $FlowFixMe\n          node.loc.end.line = mapping.original.line;\n          // $FlowFixMe\n          node.loc.end.column = mapping.original.column + length;\n\n          // $FlowFixMe\n          node.loc.filename = mapping.source;\n        } else {\n          // Maintain null mappings?\n          node.loc = null;\n        }\n      }\n    }\n  });\n}\n\nfunction traverseAll(\n  t: BabelTypes,\n  node: Node,\n  visitor: (node: Node) => void,\n): void {\n  if (!node) {\n    return;\n  }\n\n  visitor(node);\n\n  for (let key of t.VISITOR_KEYS[node.type] || []) {\n    // $FlowFixMe\n    let subNode: Node | Array<Node> = node[key];\n    if (Array.isArray(subNode)) {\n      for (let i = 0; i < subNode.length; i++) {\n        traverseAll(t, subNode[i], visitor);\n      }\n    } else {\n      traverseAll(t, subNode, visitor);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/transformers/babel/src/types.js",
    "content": "// @flow\n\nexport type BabelConfig = {|\n  plugins?: Array<any>,\n  presets?: Array<any>,\n|};\n"
  },
  {
    "path": "packages/transformers/babel/src/utils.js",
    "content": "// @flow\n\nimport type {Environment} from '@parcel/types';\nimport type {Targets as BabelTargets} from '@babel/preset-env';\n\nimport invariant from 'assert';\nimport semver from 'semver';\n\n// Copied from @babel/helper-compilation-targets/lib/options.js\nconst TargetNames = {\n  node: 'node',\n  chrome: 'chrome',\n  opera: 'opera',\n  edge: 'edge',\n  firefox: 'firefox',\n  safari: 'safari',\n  ie: 'ie',\n  ios: 'ios',\n  android: 'android',\n  electron: 'electron',\n  samsung: 'samsung',\n  rhino: 'rhino',\n};\n\n// List of browsers to exclude when the esmodule target is specified.\n// Based on https://caniuse.com/#feat=es6-module\nconst ESMODULE_BROWSERS = [\n  'not ie <= 11',\n  'not edge < 16',\n  'not firefox < 60',\n  'not chrome < 61',\n  'not safari < 11',\n  'not opera < 48',\n  'not ios_saf < 11',\n  'not op_mini all',\n  'not android < 76',\n  'not blackberry > 0',\n  'not op_mob > 0',\n  'not and_chr < 76',\n  'not and_ff < 68',\n  'not ie_mob > 0',\n  'not and_uc > 0',\n  'not samsung < 8.2',\n  'not and_qq > 0',\n  'not baidu > 0',\n  'not kaios > 0',\n];\n\nexport function enginesToBabelTargets(env: Environment): BabelTargets {\n  // \"Targets\" is the name @babel/preset-env uses for what Parcel calls engines.\n  // This should not be confused with Parcel's own targets.\n  // Unlike Parcel's engines, @babel/preset-env expects to work with minimum\n  // versions, not semver ranges, of its targets.\n  let targets = {};\n  for (let engineName of Object.keys(env.engines)) {\n    let engineValue = env.engines[engineName];\n\n    // if the engineValue is a string, it might be a semver range. Use the minimum\n    // possible version instead.\n    if (engineName === 'browsers') {\n      targets[engineName] = engineValue;\n    } else {\n      invariant(typeof engineValue === 'string');\n      if (!TargetNames.hasOwnProperty(engineName)) continue;\n      let minVersion = semver.minVersion(engineValue)?.toString();\n      targets[engineName] = minVersion ?? engineValue;\n    }\n  }\n\n  if (env.outputFormat === 'esmodule' && env.isBrowser()) {\n    // If there is already a browsers target, add a blacklist to exclude\n    // instead of using babel's esmodules target. This allows specifying\n    // a newer set of browsers than the baseline esmodule support list.\n    // See https://github.com/babel/babel/issues/8809.\n    if (targets.browsers) {\n      let browsers = Array.isArray(targets.browsers)\n        ? targets.browsers\n        : [targets.browsers];\n      targets.browsers = [...browsers, ...ESMODULE_BROWSERS];\n    } else {\n      targets.esmodules = true;\n    }\n  }\n\n  return targets;\n}\n"
  },
  {
    "path": "packages/transformers/coffeescript/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-coffeescript\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/CoffeeScriptTransformer.js\",\n  \"source\": \"src/CoffeeScriptTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"coffeescript\": \"^2.7.0\",\n    \"nullthrows\": \"^1.1.1\",\n    \"semver\": \"^7.7.1\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/coffeescript/src/CoffeeScriptTransformer.js",
    "content": "// @flow\nimport {Transformer} from '@parcel/plugin';\nimport SourceMap from '@parcel/source-map';\nimport coffee from 'coffeescript';\nimport {relativeUrl} from '@parcel/utils';\n\nexport default (new Transformer({\n  async transform({asset, options}) {\n    let sourceFileName: string = relativeUrl(\n      options.projectRoot,\n      asset.filePath,\n    );\n\n    asset.type = 'js';\n    let output = coffee.compile(await asset.getCode(), {\n      filename: sourceFileName,\n      sourceMap: !!asset.env.sourceMap,\n    });\n\n    // return from compile is based on sourceMap option\n    if (asset.env.sourceMap) {\n      let map = null;\n      if (output.v3SourceMap) {\n        map = new SourceMap(options.projectRoot);\n        map.addVLQMap(JSON.parse(output.v3SourceMap));\n      }\n\n      asset.setCode(output.js);\n      asset.setMap(map);\n    } else {\n      asset.setCode(output);\n    }\n\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/css/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-css\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/CSSTransformer.js\",\n  \"source\": \"src/CSSTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"browserslist\": \"^4.24.5\",\n    \"lightningcss\": \"^1.30.1\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"lightningcss-wasm\": \"^1.30.1\"\n  },\n  \"browser\": {\n    \"lightningcss\": \"lightningcss-wasm\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/css/src/CSSTransformer.js",
    "content": "// @flow strict-local\n\nimport type {SourceLocation} from '@parcel/types';\n\nimport path from 'path';\nimport SourceMap from '@parcel/source-map';\nimport {Transformer} from '@parcel/plugin';\nimport {\n  remapSourceLocation,\n  relativePath,\n  globToRegex,\n  normalizeSeparators,\n} from '@parcel/utils';\nimport {type SourceLocation as LightningSourceLocation} from 'lightningcss';\nimport * as native from 'lightningcss';\nimport browserslist from 'browserslist';\nimport nullthrows from 'nullthrows';\nimport ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';\n\nconst {transform, transformStyleAttribute, browserslistToTargets} = native;\n\nexport default (new Transformer({\n  async loadConfig({config, options}) {\n    let conf = await config.getConfigFrom(options.projectRoot + '/index', [], {\n      packageKey: '@parcel/transformer-css',\n    });\n    let contents = conf?.contents;\n    if (typeof contents?.cssModules?.include === 'string') {\n      contents.cssModules.include = [globToRegex(contents.cssModules.include)];\n    } else if (Array.isArray(contents?.cssModules?.include)) {\n      contents.cssModules.include = contents.cssModules.include.map(include =>\n        typeof include === 'string' ? globToRegex(include) : include,\n      );\n    }\n    if (typeof contents?.cssModules?.exclude === 'string') {\n      contents.cssModules.exclude = [globToRegex(contents.cssModules.exclude)];\n    } else if (Array.isArray(contents?.cssModules?.exclude)) {\n      contents.cssModules.exclude = contents.cssModules.exclude.map(exclude =>\n        typeof exclude === 'string' ? globToRegex(exclude) : exclude,\n      );\n    }\n    return contents;\n  },\n  async transform({asset, config, options, logger}) {\n    // Normalize the asset's environment so that properties that only affect JS don't cause CSS to be duplicated.\n    // For example, with ESModule and CommonJS targets, only a single shared CSS bundle should be produced.\n    let env = {\n      context: asset.env.context,\n      outputFormat: asset.env.outputFormat,\n      engines: asset.env.engines,\n      includeNodeModules: asset.env.includeNodeModules,\n      sourceType: asset.env.sourceType,\n      isLibrary: asset.env.isLibrary,\n      shouldOptimize: asset.env.shouldOptimize,\n      shouldScopeHoist: asset.env.shouldScopeHoist,\n      sourceMap: asset.env.sourceMap,\n      loc: asset.env.loc,\n    };\n\n    asset.setEnvironment({\n      context:\n        asset.env.context === 'react-server' ||\n        asset.env.context === 'react-client'\n          ? 'react-client'\n          : 'browser',\n      engines: {\n        browsers: asset.env.engines.browsers,\n      },\n      shouldOptimize: asset.env.shouldOptimize,\n      shouldScopeHoist: asset.env.shouldScopeHoist,\n      sourceMap: asset.env.sourceMap,\n    });\n\n    let [code, originalMap] = await Promise.all([\n      asset.getBuffer(),\n      asset.getMap(),\n      // $FlowFixMe native.default is the init function only when bundled for the browser build\n      process.browser && native.default(),\n    ]);\n\n    let targets = getTargets(asset.env.engines.browsers);\n    let res;\n    try {\n      if (asset.meta.type === 'attr') {\n        res = transformStyleAttribute({\n          code,\n          analyzeDependencies: true,\n          errorRecovery: config?.errorRecovery || false,\n          targets,\n        });\n      } else {\n        let cssModules = false;\n        if (\n          asset.meta.type !== 'tag' &&\n          asset.meta.cssModulesCompiled == null\n        ) {\n          let cssModulesConfig = config?.cssModules;\n          let isCSSModule = /\\.module\\./.test(asset.filePath);\n          if (asset.isSource) {\n            let projectRootPath = path.relative(\n              options.projectRoot,\n              asset.filePath,\n            );\n            if (typeof cssModulesConfig === 'boolean') {\n              isCSSModule = true;\n            } else if (cssModulesConfig?.include) {\n              isCSSModule = cssModulesConfig.include.some(include =>\n                include.test(projectRootPath),\n              );\n            } else if (cssModulesConfig?.global) {\n              isCSSModule = true;\n            }\n\n            if (\n              cssModulesConfig?.exclude?.some(exclude =>\n                exclude.test(projectRootPath),\n              )\n            ) {\n              isCSSModule = false;\n            }\n          }\n\n          if (isCSSModule) {\n            if (cssModulesConfig?.dashedIdents && !asset.isSource) {\n              cssModulesConfig.dashedIdents = false;\n            }\n\n            cssModules = cssModulesConfig ?? true;\n          }\n        }\n\n        res = transform({\n          filename: normalizeSeparators(\n            path.relative(options.projectRoot, asset.filePath),\n          ),\n          code,\n          cssModules,\n          analyzeDependencies:\n            asset.meta.hasDependencies !== false\n              ? {\n                  preserveImports: true,\n                }\n              : false,\n          sourceMap: !!asset.env.sourceMap,\n          drafts: config?.drafts,\n          pseudoClasses: config?.pseudoClasses,\n          errorRecovery: config?.errorRecovery || false,\n          targets,\n        });\n      }\n    } catch (err) {\n      err.filePath = asset.filePath;\n      let diagnostic = errorToDiagnostic(err, {\n        origin: '@parcel/transformer-css',\n      });\n      if (err.data?.type === 'AmbiguousUrlInCustomProperty' && err.data.url) {\n        let p =\n          '/' +\n          relativePath(\n            options.projectRoot,\n            path.resolve(path.dirname(asset.filePath), err.data.url),\n            false,\n          );\n        diagnostic[0].hints = [`Replace with: url(${p})`];\n        diagnostic[0].documentationURL =\n          'https://parceljs.org/languages/css/#url()';\n      }\n\n      throw new ThrowableDiagnostic({\n        diagnostic,\n      });\n    }\n\n    if (res.warnings) {\n      for (let warning of res.warnings) {\n        logger.warn({\n          message: warning.message,\n          codeFrames: [\n            {\n              filePath: asset.filePath,\n              codeHighlights: [\n                {\n                  start: {\n                    line: warning.loc.line,\n                    column: warning.loc.column + 1,\n                  },\n                  end: {\n                    line: warning.loc.line,\n                    column: warning.loc.column + 1,\n                  },\n                },\n              ],\n            },\n          ],\n        });\n      }\n    }\n\n    if (res.map != null) {\n      let vlqMap = JSON.parse(Buffer.from(res.map).toString());\n      let map = new SourceMap(options.projectRoot);\n      map.addVLQMap(vlqMap);\n\n      if (originalMap) {\n        map.extends(originalMap);\n      }\n\n      asset.setMap(map);\n    }\n\n    if (res.dependencies) {\n      for (let dep of res.dependencies) {\n        let loc = convertLoc(dep.loc);\n        if (originalMap) {\n          loc = remapSourceLocation(loc, originalMap);\n        }\n\n        if (dep.type === 'import' && !res.exports) {\n          asset.addDependency({\n            specifier: dep.url,\n            specifierType: 'url',\n            loc,\n            packageConditions: ['style'],\n            meta: {\n              // For the glob resolver to distinguish between `@import` and other URL dependencies.\n              isCSSImport: true,\n              media: dep.media,\n              placeholder: dep.placeholder,\n            },\n          });\n        } else if (dep.type === 'url') {\n          asset.addURLDependency(dep.url, {\n            loc,\n            meta: {\n              placeholder: dep.placeholder,\n            },\n          });\n        }\n      }\n    }\n\n    let assets = [asset];\n    let buffer = Buffer.from(res.code);\n\n    if (res.exports != null) {\n      let exports = res.exports;\n      asset.symbols.ensure();\n      asset.symbols.set('default', 'default');\n\n      let dependencies = new Map();\n      let locals = new Map();\n      let c = 0;\n      let depjs = '';\n      let js = '';\n      let cssImports = '';\n\n      let jsDeps = [];\n\n      for (let key in exports) {\n        locals.set(exports[key].name, key);\n      }\n\n      asset.uniqueKey ??= asset.id;\n\n      let seen = new Set();\n      let add = key => {\n        if (seen.has(key)) {\n          return;\n        }\n        seen.add(key);\n\n        let e = exports[key];\n        let s = `module.exports[${JSON.stringify(key)}] = \\`${e.name}`;\n\n        for (let ref of e.composes) {\n          s += ' ';\n          if (ref.type === 'local') {\n            let exported = nullthrows(locals.get(ref.name));\n            add(exported);\n            s += '${' + `module.exports[${JSON.stringify(exported)}]` + '}';\n            asset.addDependency({\n              specifier: nullthrows(asset.uniqueKey),\n              specifierType: 'esm',\n              symbols: new Map([\n                [exported, {local: ref.name, isWeak: false, loc: null}],\n              ]),\n              env,\n            });\n          } else if (ref.type === 'global') {\n            s += ref.name;\n          } else if (ref.type === 'dependency') {\n            let d = dependencies.get(ref.specifier);\n            if (d == null) {\n              d = `dep_${c++}`;\n              depjs += `import * as ${d} from ${JSON.stringify(\n                ref.specifier,\n              )};\\n`;\n              dependencies.set(ref.specifier, d);\n              cssImports += `@import \"${ref.specifier}\";\\n`;\n              asset.addDependency({\n                specifier: ref.specifier,\n                specifierType: 'esm',\n                packageConditions: ['style'],\n                env,\n              });\n            }\n            s += '${' + `${d}[${JSON.stringify(ref.name)}]` + '}';\n          }\n        }\n\n        s += '`;\\n';\n\n        // If the export is referenced internally (e.g. used @keyframes), add a self-reference\n        // to the JS so the symbol is retained during tree-shaking.\n        if (e.isReferenced) {\n          s += `module.exports[${JSON.stringify(key)}];\\n`;\n          asset.addDependency({\n            specifier: nullthrows(asset.uniqueKey),\n            specifierType: 'esm',\n            symbols: new Map([\n              [key, {local: exports[key].name, isWeak: false, loc: null}],\n            ]),\n            env,\n          });\n        }\n\n        js += s;\n      };\n\n      // It's possible that the exports can be ordered differently between builds.\n      // Sorting by key is safe as the order is irrelevant but needs to be deterministic.\n      for (let key of Object.keys(exports).sort()) {\n        asset.symbols.set(key, exports[key].name);\n        add(key);\n      }\n\n      if (res.dependencies) {\n        for (let dep of res.dependencies) {\n          if (dep.type === 'import') {\n            // TODO: Figure out how to treeshake this\n            let d = `dep_$${c++}`;\n            depjs += `import * as ${d} from ${JSON.stringify(dep.url)};\\n`;\n            js += `for (let key in ${d}) { if (key in module.exports) module.exports[key] += ' ' + ${d}[key]; else module.exports[key] = ${d}[key]; }\\n`;\n            asset.symbols.set('*', '*');\n          }\n        }\n      }\n\n      if (res.references != null) {\n        let references = res.references;\n        for (let symbol in references) {\n          let reference = references[symbol];\n          asset.addDependency({\n            specifier: reference.specifier,\n            specifierType: 'esm',\n            packageConditions: ['style'],\n            symbols: new Map([\n              [reference.name, {local: symbol, isWeak: false, loc: null}],\n            ]),\n            env,\n          });\n\n          asset.meta.hasReferences = true;\n          cssImports += `@import \"${reference.specifier}\";\\n`;\n        }\n      }\n\n      assets.push({\n        type: 'js',\n        content: depjs + js,\n        dependencies: jsDeps,\n        env,\n      });\n\n      // Prepend @import rules for each composes dependency so packager knows where to insert them.\n      if (cssImports.length > 0) {\n        buffer = Buffer.concat([Buffer.from(cssImports), buffer]);\n      }\n    }\n\n    asset.setBuffer(buffer);\n    return assets;\n  },\n}): Transformer);\n\nlet cache = new Map();\n\nfunction getTargets(browsers) {\n  if (browsers == null) {\n    return undefined;\n  }\n\n  let cached = cache.get(browsers);\n  if (cached != null) {\n    return cached;\n  }\n\n  let targets = browserslistToTargets(browserslist(browsers));\n\n  cache.set(browsers, targets);\n  return targets;\n}\n\nfunction convertLoc(loc: LightningSourceLocation): SourceLocation {\n  return {\n    filePath: loc.filePath,\n    start: {line: loc.start.line, column: loc.start.column},\n    end: {line: loc.end.line, column: loc.end.column + 1},\n  };\n}\n"
  },
  {
    "path": "packages/transformers/elm/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-elm\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/ElmTransformer.js\",\n  \"source\": \"src/ElmTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"command-exists\": \"^1.2.9\",\n    \"cross-spawn\": \"^7.0.6\",\n    \"elm-hot\": \"^1.1.6\",\n    \"node-elm-compiler\": \"^5.0.6\",\n    \"nullthrows\": \"^1.1.1\",\n    \"terser\": \"^5.39.0\"\n  },\n  \"peerDependencies\": {\n    \"elm\": \"^0.19.1-5\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/elm/src/ElmTransformer.js",
    "content": "// @flow strict-local\n\nimport {Transformer} from '@parcel/plugin';\nimport spawn from 'cross-spawn';\nimport path from 'path';\nimport {minify} from 'terser';\nimport ThrowableDiagnostic, {md} from '@parcel/diagnostic';\n// $FlowFixMe\nimport elm from 'node-elm-compiler';\n// $FlowFixMe\nimport elmHMR from 'elm-hot';\n\nimport {load, elmBinaryPath} from './loadConfig';\n\nlet isWorker;\ntry {\n  let worker_threads = require('worker_threads');\n  isWorker = worker_threads.threadId > 0;\n} catch (_) {\n  isWorker = false;\n}\n\nexport default (new Transformer({\n  loadConfig({config}) {\n    return load({config});\n  },\n\n  async transform({asset, options, logger}) {\n    const elmBinary = elmBinaryPath();\n    const compilerConfig = {\n      spawn,\n      cwd: path.dirname(asset.filePath),\n      // $FlowFixMe[sketchy-null-string]\n      debug: !options.env.PARCEL_ELM_NO_DEBUG && options.mode !== 'production',\n      optimize: asset.env.shouldOptimize,\n      report: 'json',\n    };\n    asset.invalidateOnEnvChange('PARCEL_ELM_NO_DEBUG');\n\n    const extraSources = resolveExtraSources({asset, logger});\n\n    extraSources.forEach(filePath => {\n      asset.invalidateOnFileChange(filePath);\n    });\n    const sources = [asset.filePath, ...extraSources];\n    const dependencies = await Promise.all(\n      sources.map(source => elm.findAllDependencies(source)),\n    );\n    const uniqueDeps = new Set(dependencies.flat());\n    Array.from(uniqueDeps).forEach(filePath => {\n      asset.invalidateOnFileChange(filePath);\n    });\n\n    // Workaround for `chdir` not working in workers\n    // this can be removed after https://github.com/isaacs/node-graceful-fs/pull/200 was mergend and used in parcel\n    // $FlowFixMe[method-unbinding]\n    process.chdir.disabled = isWorker;\n    let code;\n    try {\n      code = await compileToString(elm, elmBinary, sources, compilerConfig);\n    } catch (e) {\n      let compilerJson = e.message.split('\\n')[1];\n      let compilerDiagnostics = JSON.parse(compilerJson);\n\n      if (compilerDiagnostics.type === 'compile-errors') {\n        throw new ThrowableDiagnostic({\n          diagnostic: compilerDiagnostics.errors.flatMap(\n            elmCompileErrorToParcelDiagnostics,\n          ),\n        });\n      }\n\n      // compilerDiagnostics.type === \"error\"\n      // happens for example when compiled in prod mode with Debug.log in code\n      throw new ThrowableDiagnostic({\n        diagnostic: formatElmError(compilerDiagnostics, ''),\n      });\n    }\n\n    if (options.hmrOptions) {\n      code = elmHMR.inject(code);\n    }\n    if (compilerConfig.optimize) code = await minifyElmOutput(code);\n\n    asset.type = 'js';\n    asset.setCode(code);\n    return [asset];\n  },\n}): Transformer);\n\n// gather extra modules that should be added to the compilation process\nfunction resolveExtraSources({asset, logger}) {\n  const dirname = path.dirname(asset.filePath);\n  const relativePaths = asset.query.getAll('with');\n\n  if (relativePaths.length > 0) {\n    logger.info({\n      message: md`Compiling elm with additional sources: ${md.bold(\n        JSON.stringify(relativePaths),\n      )}`,\n    });\n  }\n\n  return relativePaths.map(relPath => path.join(dirname, relPath));\n}\n\nfunction compileToString(elm, elmBinary, sources, config) {\n  return elm.compileToString(sources, {\n    pathToElm: elmBinary,\n    ...config,\n  });\n}\n\nlet elmPureFuncs = [\n  'F2',\n  'F3',\n  'F4',\n  'F5',\n  'F6',\n  'F7',\n  'F8',\n  'F9',\n  'A2',\n  'A3',\n  'A4',\n  'A5',\n  'A6',\n  'A7',\n  'A8',\n  'A9',\n];\n\nasync function minifyElmOutput(source) {\n  // Recommended minification\n  // Based on: http://elm-lang.org/0.19.0/optimize\n  let result = await minify(source, {\n    compress: {\n      keep_fargs: false,\n      passes: 2,\n      pure_funcs: elmPureFuncs,\n      pure_getters: true,\n      unsafe: true,\n      unsafe_comps: true,\n    },\n    mangle: {\n      reserved: elmPureFuncs,\n    },\n  });\n\n  if (result.code != null) return result.code;\n  throw result.error;\n}\n\nfunction formatMessagePiece(piece) {\n  if (piece.string) {\n    if (piece.underline) {\n      return md`${md.underline(piece.string)}`;\n    }\n    return md`${md.bold(piece.string)}`;\n  }\n  return md`${piece}`;\n}\n\nfunction elmCompileErrorToParcelDiagnostics(error) {\n  const relativePath = path.relative(process.cwd(), error.path);\n  return error.problems.map(problem => formatElmError(problem, relativePath));\n}\n\nfunction formatElmError(problem, relativePath) {\n  const padLength = Math.max(\n    80 - 5 - problem.title.length - relativePath.length,\n    1,\n  );\n  const dashes = '-'.repeat(padLength);\n  const message = [\n    '',\n    `-- ${problem.title} ${dashes} ${relativePath}`,\n    '',\n    problem.message.map(formatMessagePiece).join(''),\n  ].join('\\n');\n\n  return {\n    message,\n    origin: '@parcel/elm-transformer',\n    stack: '', // set stack to empty since it is not useful\n  };\n}\n"
  },
  {
    "path": "packages/transformers/elm/src/loadConfig.js",
    "content": "// @flow strict-local\n\nimport type {Config} from '@parcel/types';\nimport path from 'path';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport commandExists from 'command-exists';\nimport nullthrows from 'nullthrows';\n\nasync function load({config}: {|config: Config|}): Promise<null> {\n  const elmConfig = await config.getConfig(['elm.json']);\n  if (!elmConfig) {\n    elmBinaryPath(); // Check if elm is even installed\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        origin: '@parcel/elm-transformer',\n        message: \"The 'elm.json' file is missing.\",\n        hints: [\n          \"Initialize your elm project by running 'elm init'\",\n          \"If you installed elm as project dependency then run 'yarn elm init' or 'npx elm init'\",\n        ],\n      },\n    });\n  }\n\n  return null;\n}\n\nfunction elmBinaryPath(): ?string {\n  let elmBinary = resolveLocalElmBinary();\n\n  if (elmBinary == null && !commandExists.sync('elm')) {\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: \"Can't find 'elm' binary.\",\n        hints: [\n          \"You can add it as an dependency for your project by running 'yarn add -D elm' or 'npm add -D elm'\",\n          'If you want to install it globally then follow instructions on https://elm-lang.org/',\n        ],\n        origin: '@parcel/elm-transformer',\n      },\n    });\n  }\n\n  return elmBinary;\n}\n\nfunction resolveLocalElmBinary() {\n  try {\n    let result = require.resolve('elm/package.json');\n    // $FlowFixMe\n    let pkg = require('elm/package.json');\n    let bin = nullthrows(pkg.bin);\n    return path.join(\n      path.dirname(result),\n      typeof bin === 'string' ? bin : bin.elm,\n    );\n  } catch (_) {\n    return null;\n  }\n}\n\nexport {load, elmBinaryPath};\n"
  },
  {
    "path": "packages/transformers/glsl/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-glsl\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/GLSLTransformer.js\",\n  \"source\": \"src/GLSLTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"glslify-bundle\": \"^5.1.1\",\n    \"glslify-deps\": \"^1.3.2\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/glsl/src/GLSLTransformer.js",
    "content": "// @flow\nimport path from 'path';\nimport {promisify} from 'util';\nimport {Transformer} from '@parcel/plugin';\nimport glslifyDeps from 'glslify-deps';\nimport glslifyBundle from 'glslify-bundle';\n\nexport default (new Transformer({\n  async transform({asset, resolve}) {\n    // Parse and collect dependencies with glslify-deps\n    let cwd = path.dirname(asset.filePath);\n    let depper = glslifyDeps({\n      cwd,\n      resolve: async (target, opts, next) => {\n        try {\n          let filePath = await resolve(\n            path.join(opts.basedir, 'index.glsl'),\n            target,\n          );\n\n          next(null, filePath);\n        } catch (err) {\n          next(err);\n        }\n      },\n    });\n\n    let ast = await promisify(depper.inline.bind(depper))(\n      await asset.getCode(),\n      cwd,\n    );\n\n    collectDependencies(asset, ast);\n\n    // Generate the bundled glsl file\n    let glsl = await glslifyBundle(ast);\n\n    asset.setCode(`module.exports=${JSON.stringify(glsl)};`);\n    asset.type = 'js';\n\n    return [asset];\n  },\n}): Transformer);\n\nfunction collectDependencies(asset, ast) {\n  for (let dep of ast) {\n    if (!dep.entry) {\n      asset.invalidateOnFileChange(dep.file);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/transformers/graphql/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-graphql\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/GraphQLTransformer.js\",\n  \"source\": \"src/GraphQLTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"graphql\": \"^15.10.1\",\n    \"graphql-import-macro\": \"^1.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/graphql/src/GraphQLTransformer.js",
    "content": "// @flow\nimport {Transformer} from '@parcel/plugin';\nimport {parse, print, Source, stripIgnoredCharacters} from 'graphql';\nimport {processDocumentImports} from 'graphql-import-macro';\n\nexport default (new Transformer({\n  async transform({asset, options, resolve}) {\n    const document = parse(new Source(await asset.getCode(), asset.filePath));\n    const expandedDocument = await processDocumentImports(document, loadImport);\n\n    async function loadImport(to, from) {\n      const filePath = await resolve(to, from);\n\n      asset.invalidateOnFileChange(filePath);\n\n      return parse(\n        new Source(await options.inputFS.readFile(filePath, 'utf-8'), filePath),\n      );\n    }\n\n    const generated = asset.env.shouldOptimize\n      ? stripIgnoredCharacters(print(expandedDocument))\n      : print(expandedDocument);\n\n    asset.type = 'js';\n    asset.setCode(`module.exports=${JSON.stringify(generated)};`);\n\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/html/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-html\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/HTMLTransformer.js\",\n  \"source\": \"src/HTMLTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/html/src/HTMLTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport {\n  transformHtml,\n  envToRust,\n  dependencyFromRust,\n  assetFromRust,\n} from '@parcel/rust';\n\nexport default (new Transformer({\n  async transform({asset, options}) {\n    if (asset.type === 'htm') {\n      asset.type = 'html';\n    }\n\n    asset.bundleBehavior = 'isolated';\n\n    let res = transformHtml({\n      code: await asset.getBuffer(),\n      filePath: asset.filePath,\n      xml: asset.type === 'xhtml',\n      env: envToRust(asset.env),\n      hmr: !!options.hmrOptions,\n    });\n\n    if (res.errors.length) {\n      throw new ThrowableDiagnostic({\n        diagnostic: res.errors,\n      });\n    }\n\n    asset.setBuffer(res.code);\n\n    let assets = [asset];\n    for (let dep of res.dependencies) {\n      asset.addDependency(dependencyFromRust(dep));\n    }\n\n    for (let a of res.assets) {\n      assets.push(assetFromRust(a));\n    }\n\n    return assets;\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/image/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-image\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/ImageTransformer.js\",\n  \"source\": \"src/ImageTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@parcel/workers\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"sharp\": \"^0.33.5\"\n  },\n  \"peerDependencies\": {\n    \"@parcel/core\": \"^2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/image/src/ImageTransformer.js",
    "content": "// @flow\nimport {validateConfig} from './validateConfig';\nimport {Transformer} from '@parcel/plugin';\nimport nullthrows from 'nullthrows';\nimport WorkerFarm from '@parcel/workers';\nimport loadSharp from './loadSharp';\n\n// from https://github.com/lovell/sharp/blob/df7b8ba73808fc494be413e88cfb621b6279218c/lib/output.js#L6-L17\nconst FORMATS = new Map([\n  ['jpeg', 'jpeg'],\n  ['jpg', 'jpeg'],\n  ['png', 'png'],\n  ['webp', 'webp'],\n  ['gif', 'gif'],\n  ['tiff', 'tiff'],\n  ['avif', 'avif'],\n  ['heic', 'heif'],\n  ['heif', 'heif'],\n]);\n\nlet isSharpLoadedOnMainThread = false;\n\nexport default (new Transformer({\n  async loadConfig({config}) {\n    let configFile: any = await config.getConfig(\n      ['sharp.config.json'], // '.sharprc', '.sharprc.json'\n      {packageKey: 'sharp'},\n    );\n\n    if (configFile?.contents) {\n      validateConfig(configFile.contents, configFile.filePath);\n      return configFile.contents;\n    } else {\n      return {};\n    }\n  },\n\n  async transform({config, asset, options}) {\n    asset.bundleBehavior = 'isolated';\n\n    const originalFormat = FORMATS.get(asset.type);\n    if (!originalFormat) {\n      throw new Error(\n        `The image transformer does not support ${asset.type} images.`,\n      );\n    }\n\n    const width = asset.query.has('width')\n      ? parseInt(asset.query.get('width'), 10)\n      : null;\n    const height = asset.query.has('height')\n      ? parseInt(asset.query.get('height'), 10)\n      : null;\n    const quality = asset.query.has('quality')\n      ? parseInt(asset.query.get('quality'), 10)\n      : config.quality;\n    let targetFormat = asset.query.get('as')?.toLowerCase().trim();\n    if (targetFormat && !FORMATS.has(targetFormat)) {\n      throw new Error(\n        `The image transformer does not support ${targetFormat} images.`,\n      );\n    }\n\n    const format = nullthrows(FORMATS.get(targetFormat || originalFormat));\n    const outputOptions = config[format];\n\n    if (width || height || quality || targetFormat || outputOptions) {\n      // Sharp must be required from the main thread as well to prevent errors when workers exit\n      // See https://sharp.pixelplumbing.com/install#worker-threads and https://github.com/lovell/sharp/issues/2263\n      if (WorkerFarm.isWorker() && !isSharpLoadedOnMainThread) {\n        let api = WorkerFarm.getWorkerApi();\n        await api.callMaster({\n          location: __dirname + '/loadSharp.js',\n          args: [\n            options.packageManager,\n            asset.filePath,\n            options.shouldAutoInstall,\n          ],\n        });\n\n        isSharpLoadedOnMainThread = true;\n      }\n\n      let inputBuffer = await asset.getBuffer();\n      let sharp = await loadSharp(\n        options.packageManager,\n        asset.filePath,\n        options.shouldAutoInstall,\n        true,\n      );\n\n      let imagePipeline = sharp(inputBuffer, {animated: true});\n\n      imagePipeline.withMetadata();\n\n      if (width || height) {\n        imagePipeline.resize(width, height);\n      }\n\n      imagePipeline.rotate();\n\n      const normalizedOutputOptions = outputOptions || {};\n      if (format === 'jpeg') {\n        normalizedOutputOptions.mozjpeg =\n          normalizedOutputOptions.mozjpeg ?? true;\n      }\n      imagePipeline[format]({\n        quality,\n        ...normalizedOutputOptions,\n      });\n\n      asset.type = format;\n\n      let buffer = await imagePipeline.toBuffer();\n      asset.setBuffer(buffer);\n    }\n\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/image/src/loadSharp.js",
    "content": "// @flow\nimport type {PackageManager} from '@parcel/package-manager';\nimport type {FilePath} from '@parcel/types';\n\nconst SHARP_RANGE = '^0.33.5';\n\n// This is used to load sharp on the main thread, which prevents errors when worker threads exit\n// See https://sharp.pixelplumbing.com/install#worker-threads and https://github.com/lovell/sharp/issues/2263\nmodule.exports = async (\n  packageManager: PackageManager,\n  filePath: FilePath,\n  shouldAutoInstall: boolean,\n  shouldReturn: boolean,\n): Promise<any> => {\n  let sharp = await packageManager.require('sharp', filePath, {\n    range: SHARP_RANGE,\n    shouldAutoInstall: shouldAutoInstall,\n  });\n\n  if (shouldReturn) {\n    return sharp;\n  }\n};\n"
  },
  {
    "path": "packages/transformers/image/src/validateConfig.js",
    "content": "// @flow\nimport type {SchemaEntity} from '@parcel/utils';\nimport {validateSchema} from '@parcel/utils';\n\n// https://sharp.pixelplumbing.com/api-output#jpeg\nconst JPEG_OUTPUT_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    quality: {\n      type: 'number',\n    },\n    progressive: {\n      type: 'boolean',\n    },\n    chromaSubsampling: {\n      type: 'string',\n    },\n    optimiseCoding: {\n      type: 'boolean',\n    },\n    optimizeCoding: {\n      type: 'boolean',\n    },\n    mozjpeg: {\n      type: 'boolean',\n    },\n    trellisQuantisation: {\n      type: 'boolean',\n    },\n    overshootDeringing: {\n      type: 'boolean',\n    },\n    optimiseScans: {\n      type: 'boolean',\n    },\n    optimizeScans: {\n      type: 'boolean',\n    },\n    quantisationTable: {\n      type: 'number',\n    },\n    quantizationTable: {\n      type: 'number',\n    },\n    force: {\n      type: 'boolean',\n    },\n  },\n  additionalProperties: true,\n};\n\n// https://sharp.pixelplumbing.com/api-output#png\nconst PNG_OUTPUT_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    quality: {\n      type: 'number',\n    },\n    progressive: {\n      type: 'boolean',\n    },\n    compressionLevel: {\n      type: 'number',\n    },\n    adaptiveFiltering: {\n      type: 'boolean',\n    },\n    palette: {\n      type: 'boolean',\n    },\n    colours: {\n      type: 'number',\n    },\n    colors: {\n      type: 'number',\n    },\n    dither: {\n      type: 'number',\n    },\n    force: {\n      type: 'boolean',\n    },\n  },\n  additionalProperties: true,\n};\n\n// https://sharp.pixelplumbing.com/api-output#webp\nconst WEBP_OUTPUT_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    quality: {\n      type: 'number',\n    },\n    alphaQuality: {\n      type: 'number',\n    },\n    lossless: {\n      type: 'boolean',\n    },\n    nearLossless: {\n      type: 'boolean',\n    },\n    smartSubsample: {\n      type: 'boolean',\n    },\n    reductionEffort: {\n      type: 'number',\n    },\n    pageHeight: {\n      type: 'number',\n    },\n    loop: {\n      type: 'number',\n    },\n    delay: {\n      type: 'array',\n      items: {\n        type: 'number',\n      },\n    },\n    force: {\n      type: 'boolean',\n    },\n  },\n  additionalProperties: true,\n};\n\n// https://sharp.pixelplumbing.com/api-output#gif\nconst GIF_OUTPUT_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    pageHeight: {\n      type: 'number',\n    },\n    loop: {\n      type: 'number',\n    },\n    delay: {\n      type: 'array',\n      items: {\n        type: 'number',\n      },\n    },\n    force: {\n      type: 'boolean',\n    },\n  },\n  additionalProperties: true,\n};\n\n// https://sharp.pixelplumbing.com/api-output#tiff\nconst TIFF_OUTPUT_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    quality: {\n      type: 'number',\n    },\n    force: {\n      type: 'boolean',\n    },\n    compression: {\n      type: 'string',\n    },\n    predictor: {\n      type: 'string',\n    },\n    pyramid: {\n      type: 'boolean',\n    },\n    tile: {\n      type: 'boolean',\n    },\n    tileWidth: {\n      type: 'number',\n    },\n    tileHeight: {\n      type: 'number',\n    },\n    xres: {\n      type: 'number',\n    },\n    yres: {\n      type: 'number',\n    },\n    bitdepth: {\n      type: 'number',\n    },\n  },\n  additionalProperties: true,\n};\n\n// https://sharp.pixelplumbing.com/api-output#avif\nconst AVIF_OUTPUT_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    quality: {\n      type: 'number',\n    },\n    lossless: {\n      type: 'boolean',\n    },\n    speed: {\n      type: 'number',\n    },\n    chromaSubsampling: {\n      type: 'string',\n    },\n  },\n  additionalProperties: true,\n};\n\n// https://sharp.pixelplumbing.com/api-output#heif\nconst HEIF_OUTPUT_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    quality: {\n      type: 'number',\n    },\n    compression: {\n      type: 'string',\n    },\n    lossless: {\n      type: 'boolean',\n    },\n    speed: {\n      type: 'number',\n    },\n    chromaSubsampling: {\n      type: 'string',\n    },\n  },\n  additionalProperties: true,\n};\n\nconst CONFIG_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    // Fallback quality\n    quality: {\n      type: 'number',\n    },\n    jpeg: JPEG_OUTPUT_SCHEMA,\n    png: PNG_OUTPUT_SCHEMA,\n    webp: WEBP_OUTPUT_SCHEMA,\n    gif: GIF_OUTPUT_SCHEMA,\n    tiff: TIFF_OUTPUT_SCHEMA,\n    avif: AVIF_OUTPUT_SCHEMA,\n    heif: HEIF_OUTPUT_SCHEMA,\n  },\n  additionalProperties: false,\n};\n\nexport function validateConfig(data: any, filePath: string) {\n  validateSchema.diagnostic(\n    CONFIG_SCHEMA,\n    {data, filePath},\n    '@parcel/transformer-image',\n    'Invalid sharp config',\n  );\n}\n"
  },
  {
    "path": "packages/transformers/inline/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-inline\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/InlineTransformer.js\",\n  \"source\": \"src/InlineTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/inline/src/InlineTransformer.js",
    "content": "// @flow strict-local\n\nimport {Transformer} from '@parcel/plugin';\n\nexport default (new Transformer({\n  transform({asset}) {\n    asset.bundleBehavior = 'inline';\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/inline-string/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-inline-string\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/InlineStringTransformer.js\",\n  \"source\": \"src/InlineStringTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/inline-string/src/InlineStringTransformer.js",
    "content": "// @flow strict-local\n\nimport {Transformer} from '@parcel/plugin';\n\nexport default (new Transformer({\n  transform({asset}) {\n    asset.bundleBehavior = 'inline';\n    asset.meta.inlineType = 'string';\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/js/.gitignore",
    "content": "target\n*.node\nnative.js\nnative.d.ts\n"
  },
  {
    "path": "packages/transformers/js/core/Cargo.toml",
    "content": "[package]\nauthors = [\"Devon Govett <devongovett@gmail.com>\"]\nname = \"parcel-js-swc-core\"\nversion = \"0.1.0\"\nedition = \"2024\"\n\n[lib]\ncrate-type = [\"rlib\"]\n\n[dependencies]\nswc_core = { version = \"21\", features = [\n  \"common\",\n  \"common_sourcemap\",\n  \"ecma_ast\",\n  \"ecma_codegen\",\n  \"ecma_parser\",\n  \"ecma_preset_env\",\n  \"ecma_transforms\",\n  \"ecma_transforms_compat\",\n  \"ecma_transforms_optimization\",\n  \"ecma_transforms_proposal\",\n  \"ecma_transforms_react\",\n  \"ecma_transforms_typescript\",\n  \"ecma_utils\",\n  \"ecma_visit\",\n  \"stacker\"\n] }\nindoc = \"1.0.3\"\nserde = \"1.0.123\"\nserde_bytes = \"0.11.5\"\nInflector = \"0.11.4\"\ndata-encoding = \"2.3.2\"\nsha-1 = \"0.10.0\"\ndunce = \"1.0.1\"\npathdiff = \"0.2.0\"\npath-slash = \"0.1.4\"\nindexmap = \"1.9.2\"\nparcel-macros = { path = \"../../../../crates/macros\" }\nparking_lot = \"0.12\"\nbitflags = { version = \"2.7.0\", features=[\"serde\"] }\nmdxjs = \"0.3.4\"\nmarkdown = { version = \"1.0.0-alpha.22\", features = [\"serde\"] }\nrustc-hash = \"2\"\n"
  },
  {
    "path": "packages/transformers/js/core/src/collect.rs",
    "content": "use std::collections::{HashMap, HashSet};\n\nuse serde::{Deserialize, Serialize};\nuse swc_core::{\n  common::{DUMMY_SP, Mark, Span, sync::Lrc},\n  ecma::{\n    ast::*,\n    atoms::Atom as JsWord,\n    utils::stack_size::maybe_grow_default,\n    visit::{Visit, VisitWith, noop_visit_type},\n  },\n};\n\nuse crate::{\n  id,\n  utils::{\n    Bailout, BailoutReason, SourceLocation, is_unresolved, match_export_name,\n    match_export_name_ident, match_import, match_member_expr, match_property_name, match_require,\n  },\n};\n\nmacro_rules! collect_visit_fn {\n  ($name:ident, $type:ident) => {\n    fn $name(&mut self, node: &$type) {\n      let in_module_this = self.in_module_this;\n      let in_function = self.in_function;\n      self.in_module_this = false;\n      self.in_function = true;\n      node.visit_children_with(self);\n      self.in_module_this = in_module_this;\n      self.in_function = in_function;\n    }\n  };\n}\n\n#[derive(Debug, Deserialize, PartialEq, Eq, Clone, Copy, Serialize)]\npub enum ImportKind {\n  Require,\n  Import,\n  DynamicImport,\n}\n\n#[derive(Debug)]\npub struct Import {\n  pub source: JsWord,\n  pub specifier: JsWord,\n  pub kind: ImportKind,\n  pub loc: SourceLocation,\n}\n\n#[derive(Debug, PartialEq, Eq)]\npub struct Export {\n  pub source: Option<JsWord>,\n  pub specifier: JsWord,\n  pub loc: SourceLocation,\n  pub is_esm: bool,\n}\n\npub struct Collect {\n  pub source_map: Lrc<swc_core::common::SourceMap>,\n  pub unresolved_mark: Mark,\n  pub ignore_mark: Mark,\n  pub global_mark: Mark,\n  pub static_cjs_exports: bool,\n  pub has_cjs_exports: bool,\n  pub is_esm: bool,\n  pub should_wrap: bool,\n  /// local variable binding -> descriptor\n  pub imports: HashMap<Id, Import>,\n  pub this_exprs: HashMap<JsWord, Span>,\n  /// exported name -> descriptor\n  pub exports: HashMap<JsWord, Export>,\n  /// local variable binding -> exported name\n  pub exports_locals: HashMap<Id, JsWord>,\n  /// source of the export-all --> location\n  pub exports_all: HashMap<JsWord, SourceLocation>,\n  /// the keys in `imports` that are actually used (referenced), except namespace imports\n  pub used_imports: HashSet<Id>,\n  pub non_static_access: HashMap<Id, Vec<Span>>,\n  pub non_const_bindings: HashMap<Id, Vec<Span>>,\n  pub non_static_requires: HashSet<JsWord>,\n  pub wrapped_requires: HashSet<String>,\n  pub bailouts: Option<Vec<Bailout>>,\n  in_module_this: bool,\n  in_top_level: bool,\n  in_export_decl: bool,\n  in_function: bool,\n  in_assign: bool,\n  in_class: bool,\n  is_module: bool,\n}\n\n#[derive(Debug, Clone, Serialize)]\n#[non_exhaustive]\npub struct CollectImportedSymbol {\n  pub source: JsWord,\n  pub local: JsWord,\n  pub imported: JsWord,\n  pub loc: SourceLocation,\n  pub kind: ImportKind,\n}\n\n#[derive(Debug, Serialize)]\n#[non_exhaustive]\npub struct CollectExportedSymbol {\n  pub source: Option<JsWord>,\n  pub local: JsWord,\n  pub exported: JsWord,\n  pub loc: SourceLocation,\n}\n\n#[derive(Debug, Serialize)]\npub struct CollectExportedAll {\n  pub source: JsWord,\n  pub loc: SourceLocation,\n}\n\n#[derive(Serialize, Debug)]\n#[non_exhaustive]\npub struct CollectResult {\n  pub imports: Vec<CollectImportedSymbol>,\n  pub exports: Vec<CollectExportedSymbol>,\n  pub exports_all: Vec<CollectExportedAll>,\n  pub should_wrap: bool,\n  pub has_cjs_exports: bool,\n  pub is_esm: bool,\n}\n\nimpl Collect {\n  pub fn new(\n    source_map: Lrc<swc_core::common::SourceMap>,\n    unresolved_mark: Mark,\n    ignore_mark: Mark,\n    global_mark: Mark,\n    trace_bailouts: bool,\n    is_module: bool,\n  ) -> Self {\n    Collect {\n      source_map,\n      unresolved_mark,\n      ignore_mark,\n      global_mark,\n      is_module,\n      static_cjs_exports: true,\n      has_cjs_exports: false,\n      is_esm: false,\n      should_wrap: false,\n      imports: HashMap::new(),\n      this_exprs: HashMap::new(),\n      exports: HashMap::new(),\n      exports_locals: HashMap::new(),\n      exports_all: HashMap::new(),\n      used_imports: HashSet::new(),\n      non_static_access: HashMap::new(),\n      non_const_bindings: HashMap::new(),\n      non_static_requires: HashSet::new(),\n      wrapped_requires: HashSet::new(),\n      in_module_this: true,\n      in_top_level: true,\n      in_export_decl: false,\n      in_function: false,\n      in_assign: false,\n      in_class: false,\n      bailouts: if trace_bailouts { Some(vec![]) } else { None },\n    }\n  }\n}\n\nimpl From<Collect> for CollectResult {\n  fn from(collect: Collect) -> CollectResult {\n    let imports = collect\n      .imports\n      .into_iter()\n      .filter(|(local, _)| collect.used_imports.contains(local))\n      .map(\n        |(\n          local,\n          Import {\n            source,\n            specifier,\n            loc,\n            kind,\n          },\n        )| CollectImportedSymbol {\n          source,\n          local: local.0,\n          imported: specifier,\n          loc,\n          kind,\n        },\n      )\n      .collect();\n\n    let mut exports: Vec<CollectExportedSymbol> = collect\n      .exports\n      .into_iter()\n      .map(\n        |(\n          exported,\n          Export {\n            source,\n            specifier,\n            loc,\n            ..\n          },\n        )| CollectExportedSymbol {\n          source,\n          local: specifier,\n          exported,\n          loc,\n        },\n      )\n      .collect();\n\n    // Add * symbol if there are any CJS exports so that unknown symbols don't cause errors (e.g. default interop).\n    if collect.has_cjs_exports {\n      exports.push(CollectExportedSymbol {\n        source: None,\n        exported: \"*\".into(),\n        local: \"_\".into(),\n        loc: SourceLocation {\n          start_line: 1,\n          start_col: 1,\n          end_line: 1,\n          end_col: 1,\n        },\n      })\n    }\n\n    CollectResult {\n      imports,\n      exports,\n      exports_all: collect\n        .exports_all\n        .into_iter()\n        .map(|(source, loc)| CollectExportedAll { source, loc })\n        .collect(),\n      should_wrap: collect.should_wrap,\n      has_cjs_exports: collect.has_cjs_exports,\n      is_esm: collect.is_esm,\n    }\n  }\n}\n\nimpl Visit for Collect {\n  fn visit_module(&mut self, node: &Module) {\n    self.in_module_this = true;\n    self.in_top_level = true;\n    self.in_function = false;\n    // Visit all imports first so that all imports are known when collecting used_imports\n    for n in &node.body {\n      if n.is_module_decl() {\n        n.visit_with(self);\n      }\n    }\n    for n in &node.body {\n      if !n.is_module_decl() {\n        n.visit_with(self);\n      }\n    }\n    self.in_module_this = false;\n\n    for (key, span) in std::mem::take(&mut self.this_exprs) {\n      if self.exports.contains_key(&key) {\n        self.should_wrap = true;\n        self.add_bailout(span, BailoutReason::ThisInExport);\n      }\n    }\n\n    if let Some(bailouts) = &mut self.bailouts {\n      for (key, Import { specifier, .. }) in &self.imports {\n        if specifier == \"*\" {\n          if let Some(spans) = self.non_static_access.get(key) {\n            for span in spans {\n              bailouts.push(Bailout {\n                loc: SourceLocation::from(&self.source_map, *span),\n                reason: BailoutReason::NonStaticAccess,\n              })\n            }\n          }\n        }\n      }\n\n      bailouts.sort_by(|a, b| a.loc.partial_cmp(&b.loc).unwrap());\n    }\n  }\n\n  collect_visit_fn!(visit_function, Function);\n  collect_visit_fn!(visit_getter_prop, GetterProp);\n  collect_visit_fn!(visit_setter_prop, SetterProp);\n\n  fn visit_arrow_expr(&mut self, node: &ArrowExpr) {\n    let in_function = self.in_function;\n    self.in_function = true;\n    node.visit_children_with(self);\n    self.in_function = in_function;\n  }\n\n  fn visit_module_item(&mut self, node: &ModuleItem) {\n    match node {\n      ModuleItem::ModuleDecl(_decl) => {\n        self.is_esm = true;\n      }\n      ModuleItem::Stmt(stmt) => {\n        match stmt {\n          Stmt::Decl(decl) => {\n            if let Decl::Var(_var) = decl {\n              decl.visit_children_with(self);\n              return;\n            }\n          }\n          Stmt::Expr(expr) => {\n            // Top-level require(). Do not traverse further so it is not marked as wrapped.\n            if let Some(_source) = self.match_require(&expr.expr) {\n              return;\n            }\n\n            // TODO: optimize `require('foo').bar` / `require('foo').bar()` as well\n          }\n          _ => {}\n        }\n      }\n    }\n\n    self.in_top_level = false;\n    node.visit_children_with(self);\n    self.in_top_level = true;\n  }\n\n  fn visit_import_decl(&mut self, node: &ImportDecl) {\n    for specifier in &node.specifiers {\n      match specifier {\n        ImportSpecifier::Named(named) => {\n          let imported = match &named.imported {\n            Some(imported) => match_export_name(imported).0.clone(),\n            None => named.local.sym.clone(),\n          };\n          self.imports.insert(\n            id!(named.local),\n            Import {\n              source: node.src.value.clone(),\n              specifier: imported,\n              kind: ImportKind::Import,\n              loc: SourceLocation::from(&self.source_map, named.span),\n            },\n          );\n        }\n        ImportSpecifier::Default(default) => {\n          self.imports.insert(\n            id!(default.local),\n            Import {\n              source: node.src.value.clone(),\n              specifier: \"default\".into(),\n              kind: ImportKind::Import,\n              loc: SourceLocation::from(&self.source_map, default.span),\n            },\n          );\n        }\n        ImportSpecifier::Namespace(namespace) => {\n          self.imports.insert(\n            id!(namespace.local),\n            Import {\n              source: node.src.value.clone(),\n              specifier: \"*\".into(),\n              kind: ImportKind::Import,\n              loc: SourceLocation::from(&self.source_map, namespace.span),\n            },\n          );\n        }\n      }\n    }\n  }\n\n  fn visit_named_export(&mut self, node: &NamedExport) {\n    for specifier in &node.specifiers {\n      let source = node.src.as_ref().map(|s| s.value.clone());\n      match specifier {\n        ExportSpecifier::Named(named) => {\n          let exported = match &named.exported {\n            Some(exported) => match_export_name(exported),\n            None => match_export_name(&named.orig),\n          };\n          let orig = match_export_name_ident(&named.orig);\n          let is_reexport = if source.is_none() {\n            // import {foo} from \"xyz\";\n            // export {foo};\n            self.imports.get(&id!(orig))\n          } else {\n            None\n          };\n          let (source, specifier) = if let Some(reexport) = is_reexport {\n            (Some(reexport.source.clone()), reexport.specifier.clone())\n          } else {\n            (source, orig.sym.clone())\n          };\n          self.exports.insert(\n            exported.0.clone(),\n            Export {\n              specifier,\n              loc: SourceLocation::from(&self.source_map, exported.1),\n              source,\n              is_esm: true,\n            },\n          );\n          if node.src.is_none() {\n            self\n              .exports_locals\n              .entry(id!(match_export_name_ident(&named.orig)))\n              .or_insert_with(|| exported.0.clone());\n          }\n        }\n        ExportSpecifier::Default(default) => {\n          self.exports.insert(\n            default.exported.sym.clone(),\n            Export {\n              specifier: \"default\".into(),\n              loc: SourceLocation::from(&self.source_map, default.exported.span),\n              source,\n              is_esm: true,\n            },\n          );\n          if node.src.is_none() {\n            self\n              .exports_locals\n              .entry(id!(default.exported))\n              .or_insert_with(|| \"default\".into());\n          }\n        }\n        ExportSpecifier::Namespace(namespace) => {\n          self.exports.insert(\n            match_export_name(&namespace.name).0,\n            Export {\n              specifier: \"*\".into(),\n              loc: SourceLocation::from(&self.source_map, namespace.span),\n              source,\n              is_esm: true,\n            },\n          );\n          // Populating exports_locals with * doesn't make any sense at all\n          // and hoist doesn't use this anyway.\n        }\n      }\n    }\n  }\n\n  fn visit_export_decl(&mut self, node: &ExportDecl) {\n    match &node.decl {\n      Decl::Class(class) => {\n        self.exports.insert(\n          class.ident.sym.clone(),\n          Export {\n            specifier: class.ident.sym.clone(),\n            loc: SourceLocation::from(&self.source_map, class.ident.span),\n            source: None,\n            is_esm: true,\n          },\n        );\n        self\n          .exports_locals\n          .insert(id!(class.ident), class.ident.sym.clone());\n      }\n      Decl::Fn(func) => {\n        self.exports.insert(\n          func.ident.sym.clone(),\n          Export {\n            specifier: func.ident.sym.clone(),\n            loc: SourceLocation::from(&self.source_map, func.ident.span),\n            source: None,\n            is_esm: true,\n          },\n        );\n        self\n          .exports_locals\n          .insert(id!(func.ident), func.ident.sym.clone());\n      }\n      Decl::Var(var) => {\n        for decl in &var.decls {\n          self.in_export_decl = true;\n          decl.name.visit_with(self);\n          self.in_export_decl = false;\n\n          decl.init.visit_with(self);\n        }\n      }\n      _ => {}\n    }\n\n    node.visit_children_with(self);\n  }\n\n  fn visit_export_default_decl(&mut self, node: &ExportDefaultDecl) {\n    match &node.decl {\n      DefaultDecl::Class(class) => {\n        if let Some(ident) = &class.ident {\n          self.exports.insert(\n            \"default\".into(),\n            Export {\n              specifier: ident.sym.clone(),\n              loc: SourceLocation::from(&self.source_map, node.span),\n              source: None,\n              is_esm: true,\n            },\n          );\n          self.exports_locals.insert(id!(ident), \"default\".into());\n        } else {\n          self.exports.insert(\n            \"default\".into(),\n            Export {\n              specifier: \"default\".into(),\n              loc: SourceLocation::from(&self.source_map, node.span),\n              source: None,\n              is_esm: true,\n            },\n          );\n        }\n      }\n      DefaultDecl::Fn(func) => {\n        if let Some(ident) = &func.ident {\n          self.exports.insert(\n            \"default\".into(),\n            Export {\n              specifier: ident.sym.clone(),\n              loc: SourceLocation::from(&self.source_map, node.span),\n              source: None,\n              is_esm: true,\n            },\n          );\n          self.exports_locals.insert(id!(ident), \"default\".into());\n        } else {\n          self.exports.insert(\n            \"default\".into(),\n            Export {\n              specifier: \"default\".into(),\n              loc: SourceLocation::from(&self.source_map, node.span),\n              source: None,\n              is_esm: true,\n            },\n          );\n        }\n      }\n      _ => {\n        unreachable!(\"unsupported export default declaration\");\n      }\n    };\n\n    node.visit_children_with(self);\n  }\n\n  fn visit_export_default_expr(&mut self, node: &ExportDefaultExpr) {\n    self.exports.insert(\n      \"default\".into(),\n      Export {\n        specifier: \"default\".into(),\n        loc: SourceLocation::from(&self.source_map, node.span),\n        source: None,\n        is_esm: true,\n      },\n    );\n\n    node.visit_children_with(self);\n  }\n\n  fn visit_export_all(&mut self, node: &ExportAll) {\n    self.exports_all.insert(\n      node.src.value.clone(),\n      SourceLocation::from(&self.source_map, node.span),\n    );\n  }\n\n  fn visit_return_stmt(&mut self, node: &ReturnStmt) {\n    if !self.in_function {\n      self.should_wrap = true;\n      self.add_bailout(node.span, BailoutReason::TopLevelReturn);\n    }\n\n    node.visit_children_with(self)\n  }\n\n  fn visit_binding_ident(&mut self, node: &BindingIdent) {\n    if self.in_export_decl {\n      self.exports.insert(\n        node.id.sym.clone(),\n        Export {\n          specifier: node.id.sym.clone(),\n          loc: SourceLocation::from(&self.source_map, node.id.span),\n          source: None,\n          is_esm: true,\n        },\n      );\n      self\n        .exports_locals\n        .insert(id!(node.id), node.id.sym.clone());\n    }\n\n    if self.in_assign && node.id.ctxt.has_mark(self.global_mark) {\n      self\n        .non_const_bindings\n        .entry(id!(node.id))\n        .or_default()\n        .push(node.id.span);\n    }\n  }\n\n  fn visit_assign_pat_prop(&mut self, node: &AssignPatProp) {\n    if self.in_export_decl {\n      self.exports.insert(\n        node.key.sym.clone(),\n        Export {\n          specifier: node.key.sym.clone(),\n          loc: SourceLocation::from(&self.source_map, node.key.span),\n          source: None,\n          is_esm: true,\n        },\n      );\n      self\n        .exports_locals\n        .insert(id!(node.key), node.key.sym.clone());\n    }\n\n    if self.in_assign && node.key.ctxt.has_mark(self.global_mark) {\n      self\n        .non_const_bindings\n        .entry(id!(node.key))\n        .or_default()\n        .push(node.key.span);\n    }\n\n    node.value.visit_with(self);\n  }\n\n  fn visit_member_expr(&mut self, node: &MemberExpr) {\n    // if module.exports, ensure only assignment or static member expression\n    // if exports, ensure only static member expression\n    // if require, could be static access (handle in fold)\n\n    if match_member_expr(node, vec![\"module\", \"exports\"], self.unresolved_mark) {\n      self.static_cjs_exports = false;\n      self.has_cjs_exports = true;\n      return;\n    }\n\n    if match_member_expr(node, vec![\"module\", \"hot\"], self.unresolved_mark) {\n      return;\n    }\n\n    if match_member_expr(node, vec![\"module\", \"require\"], self.unresolved_mark) {\n      return;\n    }\n\n    macro_rules! handle_export {\n      () => {\n        self.has_cjs_exports = true;\n        if let Some((name, span)) = match_property_name(&node) {\n          self.exports.insert(\n            name.clone(),\n            Export {\n              specifier: name,\n              source: None,\n              loc: SourceLocation::from(&self.source_map, span),\n              is_esm: false,\n            },\n          );\n        } else {\n          self.static_cjs_exports = false;\n          self.add_bailout(node.span, BailoutReason::NonStaticExports);\n        }\n      };\n    }\n\n    match &*node.obj {\n      Expr::Member(member) => {\n        if match_member_expr(member, vec![\"module\", \"exports\"], self.unresolved_mark) {\n          handle_export!();\n          return;\n        } else {\n          member.visit_with(self);\n        }\n      }\n      Expr::Ident(ident) => {\n        if &*ident.sym == \"exports\" && is_unresolved(&ident, self.unresolved_mark) {\n          handle_export!();\n        } else if ident.sym == \"module\" && is_unresolved(&ident, self.unresolved_mark) {\n          self.has_cjs_exports = true;\n          self.static_cjs_exports = false;\n          self.should_wrap = true;\n          self.add_bailout(node.span, BailoutReason::FreeModule);\n        } else if match_property_name(node).is_none() {\n          self\n            .non_static_access\n            .entry(id!(ident))\n            .or_default()\n            .push(node.span);\n        }\n        if self.imports.contains_key(&id!(ident)) {\n          self.used_imports.insert(id!(ident));\n        }\n        return;\n      }\n      Expr::This(_this) => {\n        if self.in_module_this {\n          if !self.is_module {\n            handle_export!();\n          }\n        } else if !self.in_class {\n          if let MemberProp::Ident(prop) = &node.prop {\n            self.this_exprs.insert(prop.sym.clone(), node.span);\n          }\n        }\n        return;\n      }\n      _ => {}\n    }\n\n    node.visit_children_with(self);\n  }\n\n  fn visit_unary_expr(&mut self, node: &UnaryExpr) {\n    if node.op == UnaryOp::TypeOf {\n      match &*node.arg {\n        Expr::Ident(ident)\n          if ident.sym == \"module\" && is_unresolved(&ident, self.unresolved_mark) =>\n        {\n          // Do nothing to avoid the ident visitor from marking the module as non-static.\n        }\n        _ => node.visit_children_with(self),\n      }\n    } else {\n      node.visit_children_with(self);\n    }\n  }\n\n  fn visit_expr(&mut self, node: &Expr) {\n    // If we reached this visitor, this is a non-top-level require that isn't in a variable\n    // declaration. We need to wrap the referenced module to preserve side effect ordering.\n    if let Some(source) = self.match_require(node) {\n      self.wrapped_requires.insert(source.to_string());\n      let span = match node {\n        Expr::Call(c) => c.span,\n        _ => unreachable!(),\n      };\n      self.add_bailout(span, BailoutReason::NonTopLevelRequire);\n    }\n\n    if let Some(source) = match_import(node) {\n      self.non_static_requires.insert(source.clone());\n      self.wrapped_requires.insert(source.to_string());\n      let span = match node {\n        Expr::Call(c) => c.span,\n        _ => unreachable!(),\n      };\n      self.add_bailout(span, BailoutReason::NonStaticDynamicImport);\n    }\n\n    match node {\n      Expr::Ident(ident) => {\n        // Bail if `module` or `exports` are accessed non-statically.\n        let is_module = ident.sym == \"module\";\n        let is_exports = &*ident.sym == \"exports\";\n        if (is_module || is_exports) && is_unresolved(&ident, self.unresolved_mark) {\n          self.has_cjs_exports = true;\n          self.static_cjs_exports = false;\n          if is_module {\n            self.should_wrap = true;\n            self.add_bailout(ident.span, BailoutReason::FreeModule);\n          } else {\n            self.add_bailout(ident.span, BailoutReason::FreeExports);\n          }\n        }\n\n        self\n          .non_static_access\n          .entry(id!(ident))\n          .or_default()\n          .push(ident.span);\n\n        if self.imports.contains_key(&id!(ident)) {\n          self.used_imports.insert(id!(ident));\n        }\n      }\n      _ => {\n        maybe_grow_default(|| node.visit_children_with(self));\n      }\n    }\n  }\n\n  fn visit_ident(&mut self, node: &Ident) {\n    // This visitor helps us identify used imports in cases like:\n    //\n    //   import { foo } from \"bar\";\n    //   const baz = { foo };\n    if self.imports.contains_key(&id!(node)) {\n      self.used_imports.insert(id!(node));\n    }\n  }\n\n  fn visit_class(&mut self, class: &Class) {\n    let in_module_this = self.in_module_this;\n    let in_function = self.in_function;\n    let in_class = self.in_class;\n\n    self.in_module_this = false;\n    self.in_function = true;\n    self.in_class = true;\n\n    class.visit_children_with(self);\n    self.in_module_this = in_module_this;\n    self.in_function = in_function;\n    self.in_class = in_class;\n  }\n\n  fn visit_this_expr(&mut self, node: &ThisExpr) {\n    if !self.is_module && self.in_module_this {\n      self.has_cjs_exports = true;\n      self.static_cjs_exports = false;\n      self.add_bailout(node.span, BailoutReason::FreeExports);\n    }\n  }\n\n  fn visit_assign_expr(&mut self, node: &AssignExpr) {\n    // if rhs is a require, record static accesses\n    // if lhs is `exports`, mark as CJS exports re-assigned\n    // if lhs is `module.exports`\n    // if lhs is `module.exports.XXX` or `exports.XXX`, record static export\n\n    self.in_assign = true;\n    node.left.visit_with(self);\n    self.in_assign = false;\n    node.right.visit_with(self);\n\n    if has_binding_identifier(&node.left, &\"exports\".into(), self.unresolved_mark) {\n      // Must wrap for cases like\n      // ```\n      // function logExports() {\n      //   console.log(exports);\n      // }\n      // exports.test = 2;\n      // logExports();\n      // exports = {test: 4};\n      // logExports();\n      // ```\n      self.static_cjs_exports = false;\n      self.has_cjs_exports = true;\n      self.should_wrap = true;\n      self.add_bailout(node.span, BailoutReason::ExportsReassignment);\n    } else if has_binding_identifier(&node.left, &\"module\".into(), self.unresolved_mark) {\n      // Same for `module`. If it is reassigned we can't correctly statically analyze.\n      self.static_cjs_exports = false;\n      self.has_cjs_exports = true;\n      self.should_wrap = true;\n      self.add_bailout(node.span, BailoutReason::ModuleReassignment);\n    }\n  }\n\n  fn visit_var_declarator(&mut self, node: &VarDeclarator) {\n    // if init is a require call, record static accesses\n    if let Some(init) = &node.init {\n      if let Some(source) = self.match_require(init) {\n        self.add_pat_imports(&node.name, &source, ImportKind::Require);\n        return;\n      }\n\n      match &**init {\n        Expr::Member(member) => {\n          if let Some(source) = self.match_require(&member.obj) {\n            // Convert member expression on require to a destructuring assignment.\n            // const yx = require('y').x; -> const {x: yx} = require('x');\n            let key = match &member.prop {\n              MemberProp::Computed(_) => PropName::Computed(ComputedPropName {\n                span: DUMMY_SP,\n                expr: Box::new(*member.obj.clone()),\n              }),\n              MemberProp::Ident(ident) => PropName::Ident(ident.clone()),\n              _ => unreachable!(),\n            };\n\n            self.add_pat_imports(\n              &Pat::Object(ObjectPat {\n                optional: false,\n                span: DUMMY_SP,\n                type_ann: None,\n                props: vec![ObjectPatProp::KeyValue(KeyValuePatProp {\n                  key,\n                  value: Box::new(node.name.clone()),\n                })],\n              }),\n              &source,\n              ImportKind::Require,\n            );\n            return;\n          }\n        }\n        Expr::Await(await_exp) => {\n          // let x = await import('foo');\n          // let {x} = await import('foo');\n          if let Some(source) = match_import(&await_exp.arg) {\n            self.add_pat_imports(&node.name, &source, ImportKind::DynamicImport);\n            return;\n          }\n        }\n        _ => {}\n      }\n    }\n\n    // This is visited via visit_module_item with is_top_level == true, it needs to be\n    // set to false for called visitors (and restored again).\n    let in_top_level = self.in_top_level;\n    self.in_top_level = false;\n    node.visit_children_with(self);\n    self.in_top_level = in_top_level;\n  }\n\n  fn visit_call_expr(&mut self, node: &CallExpr) {\n    if let Callee::Expr(expr) = &node.callee {\n      match &**expr {\n        Expr::Ident(ident) => {\n          if ident.sym == \"eval\" && is_unresolved(&ident, self.unresolved_mark) {\n            self.should_wrap = true;\n            self.add_bailout(node.span, BailoutReason::Eval);\n          }\n        }\n        Expr::Member(member) => {\n          // import('foo').then(foo => ...);\n          if let Some(source) = match_import(&member.obj) {\n            if match_property_name(member).map_or(false, |f| &*f.0 == \"then\") {\n              if let Some(ExprOrSpread { expr, .. }) = node.args.first() {\n                let param = match &**expr {\n                  Expr::Fn(func) => func.function.params.first().map(|param| &param.pat),\n                  Expr::Arrow(arrow) => arrow.params.first(),\n                  _ => None,\n                };\n\n                if let Some(param) = param {\n                  self.add_pat_imports(param, &source, ImportKind::DynamicImport);\n                } else {\n                  self.non_static_requires.insert(source.clone());\n                  self.wrapped_requires.insert(source.to_string());\n                  self.add_bailout(node.span, BailoutReason::NonStaticDynamicImport);\n                }\n\n                expr.visit_with(self);\n                return;\n              }\n            }\n          }\n        }\n        _ => {}\n      }\n    }\n\n    node.visit_children_with(self);\n  }\n}\n\nimpl Collect {\n  pub fn match_require(&self, node: &Expr) -> Option<JsWord> {\n    match_require(node, self.unresolved_mark, self.ignore_mark)\n  }\n\n  fn add_pat_imports(&mut self, node: &Pat, src: &JsWord, kind: ImportKind) {\n    if !self.in_top_level {\n      match kind {\n        ImportKind::Import => self\n          .wrapped_requires\n          .insert(format!(\"{}{}\", src.clone(), \"esm\")),\n        ImportKind::DynamicImport | ImportKind::Require => {\n          self.wrapped_requires.insert(src.to_string())\n        }\n      };\n      if kind != ImportKind::DynamicImport {\n        self.non_static_requires.insert(src.clone());\n        let span = match node {\n          Pat::Ident(id) => id.id.span,\n          Pat::Array(arr) => arr.span,\n          Pat::Object(obj) => obj.span,\n          Pat::Rest(rest) => rest.span,\n          Pat::Assign(assign) => assign.span,\n          Pat::Invalid(i) => i.span,\n          Pat::Expr(_) => DUMMY_SP,\n        };\n        self.add_bailout(span, BailoutReason::NonTopLevelRequire);\n      }\n    }\n\n    match node {\n      Pat::Ident(ident) => {\n        // let x = require('y');\n        // Need to track member accesses of `x`.\n        self.imports.insert(\n          id!(ident.id),\n          Import {\n            source: src.clone(),\n            specifier: \"*\".into(),\n            kind,\n            loc: SourceLocation::from(&self.source_map, ident.id.span),\n          },\n        );\n      }\n      Pat::Object(object) => {\n        for prop in &object.props {\n          match prop {\n            ObjectPatProp::KeyValue(kv) => {\n              let imported = match &kv.key {\n                PropName::Ident(ident) => ident.sym.clone(),\n                PropName::Str(str) => str.value.clone(),\n                _ => {\n                  // Non-static. E.g. computed property.\n                  self.non_static_requires.insert(src.clone());\n                  self.add_bailout(object.span, BailoutReason::NonStaticDestructuring);\n                  continue;\n                }\n              };\n\n              match &*kv.value {\n                Pat::Ident(ident) => {\n                  // let {x: y} = require('y');\n                  // Need to track `x` as a used symbol.\n                  self.imports.insert(\n                    id!(ident.id),\n                    Import {\n                      source: src.clone(),\n                      specifier: imported,\n                      kind,\n                      loc: SourceLocation::from(&self.source_map, ident.id.span),\n                    },\n                  );\n\n                  // Mark as non-constant. CJS exports can be mutated by other modules,\n                  // so it's not safe to reference them directly.\n                  self\n                    .non_const_bindings\n                    .entry(id!(ident.id))\n                    .or_default()\n                    .push(ident.id.span);\n                }\n                _ => {\n                  // Non-static.\n                  self.non_static_requires.insert(src.clone());\n                  self.add_bailout(object.span, BailoutReason::NonStaticDestructuring);\n                }\n              }\n            }\n            ObjectPatProp::Assign(assign) => {\n              // let {x} = require('y');\n              // let {x = 2} = require('y');\n              // Need to track `x` as a used symbol.\n              self.imports.insert(\n                id!(assign.key),\n                Import {\n                  source: src.clone(),\n                  specifier: assign.key.sym.clone(),\n                  kind,\n                  loc: SourceLocation::from(&self.source_map, assign.key.span),\n                },\n              );\n              self\n                .non_const_bindings\n                .entry(id!(assign.key))\n                .or_default()\n                .push(assign.key.span);\n            }\n            ObjectPatProp::Rest(_rest) => {\n              // let {x, ...y} = require('y');\n              // Non-static. We don't know what keys are used.\n              self.non_static_requires.insert(src.clone());\n              self.add_bailout(object.span, BailoutReason::NonStaticDestructuring);\n            }\n          }\n        }\n      }\n      _ => {\n        // Non-static.\n        self.non_static_requires.insert(src.clone());\n        let span = match node {\n          Pat::Ident(id) => id.id.span,\n          Pat::Array(arr) => arr.span,\n          Pat::Object(obj) => obj.span,\n          Pat::Rest(rest) => rest.span,\n          Pat::Assign(assign) => assign.span,\n          Pat::Invalid(i) => i.span,\n          Pat::Expr(_) => DUMMY_SP,\n        };\n        self.add_bailout(span, BailoutReason::NonStaticDestructuring);\n      }\n    }\n  }\n\n  pub fn get_non_const_binding_idents(&self, node: &Pat, idents: &mut Vec<Ident>) {\n    match node {\n      Pat::Ident(ident) => {\n        if self.non_const_bindings.contains_key(&id!(ident.id)) {\n          idents.push(ident.id.clone());\n        }\n      }\n      Pat::Object(object) => {\n        for prop in &object.props {\n          match prop {\n            ObjectPatProp::KeyValue(kv) => {\n              self.get_non_const_binding_idents(&kv.value, idents);\n            }\n            ObjectPatProp::Assign(assign) => {\n              if self.non_const_bindings.contains_key(&id!(assign.key)) {\n                idents.push(assign.key.id.clone());\n              }\n            }\n            ObjectPatProp::Rest(rest) => {\n              self.get_non_const_binding_idents(&rest.arg, idents);\n            }\n          }\n        }\n      }\n      Pat::Array(array) => {\n        for el in array.elems.iter().flatten() {\n          self.get_non_const_binding_idents(el, idents);\n        }\n      }\n      _ => {}\n    }\n  }\n\n  fn add_bailout(&mut self, span: Span, reason: BailoutReason) {\n    if let Some(bailouts) = &mut self.bailouts {\n      bailouts.push(Bailout {\n        loc: SourceLocation::from(&self.source_map, span),\n        reason,\n      })\n    }\n  }\n}\n\nfn has_binding_identifier(node: &AssignTarget, sym: &JsWord, unresolved_mark: Mark) -> bool {\n  pub struct BindingIdentFinder<'a> {\n    sym: &'a JsWord,\n    unresolved_mark: Mark,\n    found: bool,\n  }\n\n  impl Visit for BindingIdentFinder<'_> {\n    noop_visit_type!();\n\n    fn visit_binding_ident(&mut self, ident: &BindingIdent) {\n      if ident.id.sym == *self.sym && is_unresolved(&ident, self.unresolved_mark) {\n        self.found = true;\n      }\n    }\n  }\n\n  let mut visitor = BindingIdentFinder {\n    sym,\n    unresolved_mark,\n    found: false,\n  };\n  node.visit_with(&mut visitor);\n  visitor.found\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/constant_module.rs",
    "content": "use std::collections::HashSet;\n\nuse swc_core::ecma::{\n  ast::{Decl, Expr, Lit, Module, ModuleDecl, ModuleItem, Stmt, VarDeclKind, VarDeclarator},\n  atoms::Atom as JsWord,\n  visit::Visit,\n};\n\nfn is_safe_literal(lit: &Lit) -> bool {\n  matches!(\n    lit,\n    Lit::Str(..) | Lit::Bool(..) | Lit::BigInt(..) | Lit::Null(..) | Lit::Num(..)\n  )\n}\n\n/// Run analysis over a module to return whether it is a 'constant module'. A constant module is one\n/// which only consists of constant variable declaration export statements and is safe to inline\n/// at its usage site. Declarations are safe if they refer to value type literals (string, bool,\n/// null, big-int, numbers, certain template strings).\n///\n/// For example, this is a constant module:\n/// ```skip\n/// export const ANGLE = 30;\n/// export const COLOR = 'red';\n/// ```\n///\n/// For example, this is not a constant module:\n/// ```skip\n/// bail-out due to non-decl statement:\n/// import {writeFileSync, readFileSync} from 'fs';\n///\n/// // bail-out due to non-decl statement:\n/// writeFileSync('test', 'file');\n///\n/// // bail-out to non constant declarator RHS (only value type literals are supported):\n/// export const COLOR = readFileSync('test');\n///\n/// ```\npub struct ConstantModule {\n  pub is_constant_module: bool,\n  constants: HashSet<JsWord>,\n}\n\nimpl ConstantModule {\n  pub fn new() -> Self {\n    ConstantModule {\n      is_constant_module: true,\n      constants: HashSet::new(),\n    }\n  }\n\n  fn is_constant_declarator(&mut self, decl: &VarDeclarator) -> bool {\n    if let Some(init) = &decl.init {\n      match &**init {\n        Expr::Lit(lit) => is_safe_literal(lit),\n        Expr::Tpl(tpl) => {\n          for expr in &tpl.exprs {\n            match &**expr {\n              Expr::Lit(lit) => {\n                if !is_safe_literal(lit) {\n                  return false;\n                }\n              }\n              Expr::Ident(ident) => {\n                if !self.constants.contains(&ident.sym) {\n                  return false;\n                }\n              }\n              _ => {\n                return false;\n              }\n            }\n          }\n\n          true\n        }\n        _ => false,\n      }\n    } else {\n      true\n    }\n  }\n\n  fn is_constant_declaration(&mut self, decl: &Decl) -> bool {\n    if let Some(var_decl) = decl.as_var() {\n      if !matches!(var_decl.kind, VarDeclKind::Const) {\n        return false;\n      }\n\n      for declarator in &var_decl.decls {\n        if !self.is_constant_declarator(declarator) {\n          return false;\n        }\n\n        if let Some(ident) = declarator.name.as_ident() {\n          self.constants.insert(ident.id.sym.clone());\n        } else {\n          return false;\n        }\n      }\n\n      true\n    } else {\n      false\n    }\n  }\n}\n\nimpl Visit for ConstantModule {\n  fn visit_module(&mut self, module: &Module) {\n    if module.body.is_empty() {\n      // Empty modules should not be marked as constant modules\n      self.is_constant_module = false;\n      return;\n    }\n\n    for statement in &module.body {\n      match statement {\n        ModuleItem::ModuleDecl(module_decl) => match module_decl {\n          ModuleDecl::ExportDecl(export_decl) => {\n            let result = self.is_constant_declaration(&export_decl.decl);\n\n            if !result {\n              self.is_constant_module = false;\n              return;\n            }\n          }\n          _ => {\n            self.is_constant_module = false;\n            return;\n          }\n        },\n        ModuleItem::Stmt(stmt) => match stmt {\n          Stmt::Decl(decl) => {\n            let result = self.is_constant_declaration(decl);\n\n            if !result {\n              self.is_constant_module = false;\n              return;\n            }\n          }\n          _ => {\n            self.is_constant_module = false;\n            return;\n          }\n        },\n      }\n    }\n  }\n}\n\n#[cfg(test)]\nmod tests {\n  use swc_core::{\n    common::{FileName, Globals, SourceMap, comments::SingleThreadedComments, sync::Lrc},\n    ecma::{\n      parser::{Parser, StringInput, lexer::Lexer},\n      visit::VisitWith,\n    },\n  };\n\n  use super::*;\n  extern crate indoc;\n\n  fn is_constant_module(code: &str) -> bool {\n    let source_map = Lrc::new(SourceMap::default());\n    let source_file = source_map.new_source_file(Lrc::new(FileName::Anon), code.into());\n\n    let comments = SingleThreadedComments::default();\n    let lexer = Lexer::new(\n      Default::default(),\n      Default::default(),\n      StringInput::from(&*source_file),\n      Some(&comments),\n    );\n\n    let mut parser = Parser::new_from(lexer);\n    match parser.parse_module() {\n      Ok(module) => swc_core::common::GLOBALS.set(&Globals::new(), || {\n        swc_core::ecma::transforms::base::helpers::HELPERS.set(\n          &swc_core::ecma::transforms::base::helpers::Helpers::new(false),\n          || {\n            let mut constant_module = ConstantModule::new();\n            module.visit_with(&mut constant_module);\n\n            constant_module.is_constant_module\n          },\n        )\n      }),\n      Err(err) => {\n        panic!(\"{:?}\", err);\n      }\n    }\n  }\n\n  #[test]\n  fn string() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = 'Hi';\n    \"#,\n    );\n\n    assert!(result);\n  }\n\n  #[test]\n  fn null() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = null;\n    \"#,\n    );\n\n    assert!(result);\n  }\n\n  #[test]\n  fn bool() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = false;\n    \"#,\n    );\n\n    assert!(result);\n  }\n\n  #[test]\n  fn num() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = 3;\n    \"#,\n    );\n\n    assert!(result);\n  }\n\n  #[test]\n  fn bigint() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = 3n;\n    \"#,\n    );\n\n    assert!(result);\n  }\n\n  #[test]\n  fn unexported_consts() {\n    let result = is_constant_module(\n      r#\"\n    const local = 'local';\n    export const SOMETHING = 'export';\n    \"#,\n    );\n\n    assert!(result);\n  }\n\n  #[test]\n  fn template_literals() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = `TEST`;\n    \"#,\n    );\n\n    assert!(result);\n  }\n\n  #[test]\n  fn template_literals_known_var() {\n    let result = is_constant_module(\n      r#\"\n    const localVar = 'local';\n    export const SOMETHING = `TEST-${localVar}`;\n    \"#,\n    );\n\n    assert!(result);\n  }\n\n  #[test]\n  fn template_literals_nested_literal() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = `TEST-${'but-why'}`;\n    \"#,\n    );\n\n    assert!(result);\n  }\n\n  #[test]\n  fn template_literals_unknown_var() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = `TEST-${someVar}`;\n    \"#,\n    );\n\n    assert!(!result);\n  }\n\n  #[test]\n  fn side_effect() {\n    let result = is_constant_module(\n      r#\"\n    sideEffect();\n    export const SOMETHING = '';\n    \"#,\n    );\n\n    assert!(!result);\n  }\n\n  #[test]\n  fn import() {\n    let result = is_constant_module(\n      r#\"\n    import {something} from './somewhere';\n    export const SOMETHING = '';\n    \"#,\n    );\n\n    assert!(!result);\n  }\n\n  #[test]\n  fn object() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = {};\n    \"#,\n    );\n\n    assert!(!result);\n  }\n\n  #[test]\n  fn array() {\n    let result = is_constant_module(\n      r#\"\n    export const SOMETHING = [];\n    \"#,\n    );\n\n    assert!(!result);\n  }\n\n  #[test]\n  fn export_let() {\n    let result = is_constant_module(\n      r#\"\n    export let SOMETHING = 'Hi';\n    \"#,\n    );\n\n    assert!(!result);\n  }\n\n  #[test]\n  fn var() {\n    let result = is_constant_module(\n      r#\"\n    export var SOMETHING = 'Hi';\n    \"#,\n    );\n\n    assert!(!result);\n  }\n\n  #[test]\n  fn empty_file() {\n    let result = is_constant_module(r#\"\"#);\n\n    assert!(!result);\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/dependency_collector.rs",
    "content": "use std::{\n  collections::hash_map::DefaultHasher,\n  fmt,\n  hash::{Hash, Hasher},\n  path::Path,\n};\n\nuse bitflags::bitflags;\nuse parcel_macros::{Evaluator, JsValue};\nuse path_slash::PathBufExt;\nuse serde::{Deserialize, Serialize};\nuse swc_core::{\n  common::{DUMMY_SP, Mark, SourceMap, Span, SyntaxContext, sync::Lrc},\n  ecma::{\n    ast::{self, Callee, MemberProp, Module},\n    atoms::Atom as JsWord,\n    utils::{member_expr, stack_size::maybe_grow_default},\n    visit::{Fold, FoldWith},\n  },\n};\n\nuse crate::{Config, fold_member_expr_skip_prop, utils::*};\n\nmacro_rules! hash {\n  ($str:expr) => {{\n    let mut hasher = DefaultHasher::new();\n    $str.hash(&mut hasher);\n    hasher.finish()\n  }};\n}\n\n#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]\npub enum DependencyKind {\n  /// Corresponds to ESM import statements\n  /// ```skip\n  /// import {x} from './dependency';\n  /// ```\n  Import,\n  /// Corresponds to ESM re-export statements\n  /// ```skip\n  /// export {x} from './dependency';\n  /// ```\n  Export,\n  /// Corresponds to dynamic import statements\n  /// ```skip\n  /// import('./dependency').then(({x}) => {/* ... */});\n  /// ```\n  DynamicImport,\n  /// Corresponds to CJS require statements\n  /// ```skip\n  /// const {x} = require('./dependency');\n  /// ```\n  Require,\n  /// Corresponds to Worker URL statements\n  /// ```skip\n  /// const worker = new Worker(\n  ///     new URL('./dependency', import.meta.url),\n  ///     {type: 'module'}\n  /// );\n  /// ```\n  WebWorker,\n  /// Corresponds to ServiceWorker URL statements\n  /// ```skip\n  /// navigator.serviceWorker.register(\n  ///     new URL('./dependency', import.meta.url),\n  ///     {type: 'module'}\n  /// );\n  /// ```\n  ServiceWorker,\n  /// CSS / WebAudio worklets\n  /// ```skip\n  /// CSS.paintWorklet.addModule(\n  ///   new URL('./dependency', import.meta.url)\n  /// );\n  /// ```\n  Worklet,\n  /// URL statements\n  /// ```skip\n  /// let img = document.createElement('img');\n  /// img.src = new URL('hero.jpg', import.meta.url);\n  /// document.body.appendChild(img);\n  /// ```\n  Url,\n  /// `fs.readFileSync` statements\n  ///\n  /// > Calls to fs.readFileSync are replaced with the file's contents if the filepath is statically\n  /// > determinable and inside the project root.\n  ///\n  /// ```skip\n  /// import fs from \"fs\";\n  /// import path from \"path\";\n  ///\n  /// const data = fs.readFileSync(path.join(__dirname, \"data.json\"), \"utf8\");\n  /// ```\n  ///\n  /// * https://parceljs.org/features/node-emulation/#inlining-fs.readfilesync\n  File,\n  /// `parcelRequire` call.\n  Id,\n}\n\nbitflags! {\n  #[derive(Default, Debug, Clone, Copy, PartialEq)]\n  pub struct Helpers: u8 {\n    /// `import.meta.distDir` – a relative path from the current bundle to the distDir\n    const DIST_DIR = 1 << 0;\n    /// `import.meta.publicUrl` - absolute public URL\n    const PUBLIC_URL = 1 << 1;\n    /// `parcelRequire.load`\n    const LOAD = 1 << 2;\n    /// `parcelRequire.resolve`\n    const RESOLVE = 1 << 3;\n    /// `parcelRequire.extendImportMap`\n    const EXTEND_IMPORT_MAP = 1 << 4;\n    /// `import.meta.devServer` – URL of Parcel HMR server\n    const DEV_SERVER = 1 << 5;\n  }\n}\n\nimpl serde::Serialize for Helpers {\n  fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n  where\n    S: serde::Serializer,\n  {\n    self.bits().serialize(serializer)\n  }\n}\n\nimpl<'de> serde::Deserialize<'de> for Helpers {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    let bits: u8 = Deserialize::deserialize(deserializer)?;\n    Self::from_bits(bits).ok_or(serde::de::Error::custom(\"invalid flags\"))\n  }\n}\n\nimpl fmt::Display for DependencyKind {\n  fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n    write!(f, \"{:?}\", self)\n  }\n}\n\nbitflags! {\n  #[derive(Default, Clone, Copy, Debug, PartialEq)]\n  pub struct DependencyFlags: u8 {\n    const OPTIONAL = 1 << 0;\n    const HELPER = 1 << 1;\n    const NEEDS_STABLE_NAME = 1 << 2;\n    const REACT_LAZY = 1 << 3;\n  }\n}\n\nimpl serde::Serialize for DependencyFlags {\n  fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n  where\n    S: serde::Serializer,\n  {\n    self.bits().serialize(serializer)\n  }\n}\n\nimpl<'de> serde::Deserialize<'de> for DependencyFlags {\n  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n  where\n    D: serde::Deserializer<'de>,\n  {\n    let bits: u8 = Deserialize::deserialize(deserializer)?;\n    Self::from_bits(bits).ok_or(serde::de::Error::custom(\"invalid flags\"))\n  }\n}\n\n#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]\npub struct DependencyDescriptor {\n  pub kind: DependencyKind,\n  pub loc: SourceLocation,\n  /// The text specifier associated with the import/export statement.\n  pub specifier: JsWord,\n  pub attributes: Option<JsValue>,\n  pub flags: DependencyFlags,\n  pub source_type: Option<SourceType>,\n  pub placeholder: Option<String>,\n}\n\n/// This pass collects dependencies in a module and compiles references as needed to work with Parcel's JSRuntime.\npub fn dependency_collector<'a>(\n  module: Module,\n  source_map: Lrc<SourceMap>,\n  items: &'a mut Vec<DependencyDescriptor>,\n  ignore_mark: swc_core::common::Mark,\n  unresolved_mark: swc_core::common::Mark,\n  config: &'a Config,\n  diagnostics: &'a mut Vec<Diagnostic>,\n) -> (Module, Helpers) {\n  let mut collector = DependencyCollector {\n    source_map,\n    items,\n    in_try: false,\n    in_promise: false,\n    require_node: None,\n    ignore_mark,\n    unresolved_mark,\n    config,\n    diagnostics,\n    import_meta: None,\n    helpers: Helpers::empty(),\n  };\n\n  let module = module.fold_with(&mut collector);\n  (module, collector.helpers)\n}\n\nstruct DependencyCollector<'a> {\n  source_map: Lrc<SourceMap>,\n  items: &'a mut Vec<DependencyDescriptor>,\n  in_try: bool,\n  in_promise: bool,\n  require_node: Option<ast::CallExpr>,\n  ignore_mark: swc_core::common::Mark,\n  unresolved_mark: swc_core::common::Mark,\n  config: &'a Config,\n  diagnostics: &'a mut Vec<Diagnostic>,\n  import_meta: Option<ast::VarDecl>,\n  helpers: Helpers,\n}\n\nimpl<'a> DependencyCollector<'a> {\n  fn add_dependency(\n    &mut self,\n    mut specifier: JsWord,\n    span: swc_core::common::Span,\n    kind: DependencyKind,\n    attributes: Option<JsValue>,\n    is_optional: bool,\n    source_type: SourceType,\n    needs_stable_name: bool,\n  ) -> Option<JsWord> {\n    // Rewrite SWC helpers from ESM to CJS for library output.\n    let mut is_specifier_rewritten = false;\n    if self.config.is_library && !self.config.is_esm_output {\n      if let Some(rest) = specifier.strip_prefix(\"@swc/helpers/_/\") {\n        specifier = format!(\"@swc/helpers/cjs/{}.cjs\", rest).into();\n        is_specifier_rewritten = true;\n      }\n    }\n\n    // For ESM imports, the specifier will remain unchanged.\n    // For other types of dependencies, the specifier will be changed to a hash\n    // that also contains the dependency kind. This way, multiple kinds of dependencies\n    // to the same specifier can be used within the same file.\n    let placeholder = match kind {\n      DependencyKind::Import | DependencyKind::Export => {\n        if is_specifier_rewritten {\n          Some(specifier.as_ref().to_owned())\n        } else {\n          None\n        }\n      }\n      _ if !self.config.standalone => Some(format!(\n        \"{:x}\",\n        hash!(format!(\n          \"{}:{}:{}\",\n          self.get_project_relative_filename(),\n          specifier,\n          kind\n        )),\n      )),\n      _ => None,\n    };\n\n    let mut flags = DependencyFlags::empty();\n    flags.set(DependencyFlags::OPTIONAL, is_optional);\n    flags.set(DependencyFlags::HELPER, span.is_dummy());\n    flags.set(DependencyFlags::NEEDS_STABLE_NAME, needs_stable_name);\n\n    self.items.push(DependencyDescriptor {\n      kind,\n      loc: SourceLocation::from(&self.source_map, span),\n      specifier,\n      attributes,\n      flags,\n      source_type: Some(source_type),\n      placeholder: placeholder.clone(),\n    });\n\n    placeholder.map(|p| p.into())\n  }\n\n  fn add_url_dependency(\n    &mut self,\n    specifier: JsWord,\n    span: swc_core::common::Span,\n    kind: DependencyKind,\n    source_type: SourceType,\n    needs_stable_name: bool,\n    optional: bool,\n  ) -> ast::Expr {\n    // If not a library, replace with a require call pointing to a runtime that will resolve the url dynamically.\n    if !self.config.is_library && !self.config.standalone {\n      let placeholder = self.add_dependency(\n        specifier.clone(),\n        span,\n        kind,\n        None,\n        optional,\n        source_type,\n        needs_stable_name,\n      );\n      let specifier = if let Some(placeholder) = placeholder {\n        placeholder\n      } else {\n        specifier\n      };\n      return ast::Expr::Call(self.create_require(specifier));\n    }\n\n    // For library builds, we need to create something that can be statically analyzed by another bundler,\n    // so rather than replacing with a require call that is resolved by a runtime, replace with a `new URL`\n    // call with a placeholder for the relative path to be replaced during packaging.\n    let placeholder = if self.config.standalone {\n      specifier.as_ref().into()\n    } else {\n      format!(\n        \"{:x}\",\n        hash!(format!(\n          \"parcel_url:{}:{}:{}\",\n          self.config.filename, specifier, kind\n        ))\n      )\n    };\n    let mut flags = DependencyFlags::empty();\n    flags.set(DependencyFlags::OPTIONAL, optional || span.is_dummy());\n    flags.set(DependencyFlags::NEEDS_STABLE_NAME, needs_stable_name);\n    self.items.push(DependencyDescriptor {\n      kind,\n      loc: SourceLocation::from(&self.source_map, span),\n      specifier,\n      attributes: None,\n      flags,\n      source_type: Some(source_type),\n      placeholder: Some(placeholder.clone()),\n    });\n\n    create_url_constructor(\n      ast::Expr::Lit(ast::Lit::Str(placeholder.into())),\n      self.config.is_esm_output,\n    )\n  }\n\n  fn create_require(&mut self, specifier: JsWord) -> ast::CallExpr {\n    let mut res = create_require(specifier, self.unresolved_mark);\n\n    // For scripts, we replace with __parcel__require__, which is later replaced\n    // by a real parcelRequire of the resolved asset in the packager.\n    if self.config.source_type == SourceType::Script {\n      res.callee = ast::Callee::Expr(Box::new(ast::Expr::Ident(ast::Ident::new_no_ctxt(\n        \"__parcel__require__\".into(),\n        DUMMY_SP,\n      ))));\n    }\n    res\n  }\n\n  fn add_script_error(&mut self, span: Span) {\n    // Only add the diagnostic for imports/exports in scripts once.\n    if self.diagnostics.iter().any(|d| d.message == \"SCRIPT_ERROR\") {\n      return;\n    }\n\n    self.diagnostics.push(Diagnostic {\n      message: \"SCRIPT_ERROR\".to_string(),\n      code_highlights: Some(vec![CodeHighlight {\n        message: None,\n        loc: SourceLocation::from(&self.source_map, span),\n      }]),\n      hints: None,\n      show_environment: true,\n      severity: DiagnosticSeverity::Error,\n      documentation_url: Some(String::from(\n        \"https://parceljs.org/languages/javascript/#classic-scripts\",\n      )),\n    });\n  }\n}\n\nimpl<'a> Fold for DependencyCollector<'a> {\n  fn fold_module(&mut self, node: ast::Module) -> ast::Module {\n    let mut res = node.fold_children_with(self);\n    if let Some(decl) = self.import_meta.take() {\n      res.body.insert(\n        0,\n        ast::ModuleItem::Stmt(ast::Stmt::Decl(ast::Decl::Var(Box::new(decl)))),\n      );\n    }\n    res\n  }\n\n  fn fold_module_decl(&mut self, node: ast::ModuleDecl) -> ast::ModuleDecl {\n    // If an import or export is seen within a script, flag it to throw an error from JS.\n    if self.config.source_type == SourceType::Script {\n      match node {\n        ast::ModuleDecl::Import(ast::ImportDecl { span, .. })\n        | ast::ModuleDecl::ExportAll(ast::ExportAll { span, .. })\n        | ast::ModuleDecl::ExportDecl(ast::ExportDecl { span, .. })\n        | ast::ModuleDecl::ExportDefaultDecl(ast::ExportDefaultDecl { span, .. })\n        | ast::ModuleDecl::ExportDefaultExpr(ast::ExportDefaultExpr { span, .. })\n        | ast::ModuleDecl::ExportNamed(ast::NamedExport { span, .. }) => {\n          self.add_script_error(span)\n        }\n        _ => {}\n      }\n      return node;\n    }\n\n    node.fold_children_with(self)\n  }\n\n  fn fold_import_decl(&mut self, mut node: ast::ImportDecl) -> ast::ImportDecl {\n    if node.type_only {\n      return node;\n    }\n\n    let evaluator = Evaluator::new(&self.source_map);\n    let attributes = node\n      .with\n      .as_ref()\n      .and_then(|attrs| evaluator.eval_object(&*attrs).ok());\n\n    let rewritten = self.add_dependency(\n      node.src.value.clone(),\n      node.src.span,\n      DependencyKind::Import,\n      attributes,\n      false,\n      self.config.source_type,\n      false,\n    );\n\n    if let Some(rewritten) = rewritten {\n      node.src.value = rewritten;\n    }\n\n    node\n  }\n\n  fn fold_named_export(&mut self, mut node: ast::NamedExport) -> ast::NamedExport {\n    if let Some(src) = &mut node.src {\n      if node.type_only {\n        return node;\n      }\n\n      let evaluator = Evaluator::new(&self.source_map);\n      let attributes = node\n        .with\n        .as_ref()\n        .and_then(|attrs| evaluator.eval_object(&*attrs).ok());\n\n      let rewritten = self.add_dependency(\n        src.value.clone(),\n        src.span,\n        DependencyKind::Export,\n        attributes,\n        false,\n        self.config.source_type,\n        false,\n      );\n\n      if let Some(rewritten) = rewritten {\n        src.value = rewritten;\n      }\n    }\n\n    node\n  }\n\n  fn fold_export_all(&mut self, mut node: ast::ExportAll) -> ast::ExportAll {\n    let evaluator = Evaluator::new(&self.source_map);\n    let attributes = node\n      .with\n      .as_ref()\n      .and_then(|attrs| evaluator.eval_object(&*attrs).ok());\n\n    let rewritten = self.add_dependency(\n      node.src.value.clone(),\n      node.src.span,\n      DependencyKind::Export,\n      attributes,\n      false,\n      self.config.source_type,\n      false,\n    );\n\n    if let Some(rewritten) = rewritten {\n      node.src.value = rewritten;\n    }\n\n    node\n  }\n\n  fn fold_try_stmt(&mut self, node: ast::TryStmt) -> ast::TryStmt {\n    // Track if we're inside a try block to mark dependencies as optional.\n    self.in_try = true;\n    let block = node.block.fold_with(self);\n    self.in_try = false;\n\n    let handler = node.handler.map(|handler| handler.fold_with(self));\n    let finalizer = node.finalizer.map(|finalizer| finalizer.fold_with(self));\n\n    ast::TryStmt {\n      span: node.span,\n      block,\n      handler,\n      finalizer,\n    }\n  }\n\n  fn fold_call_expr(&mut self, node: ast::CallExpr) -> ast::CallExpr {\n    use ast::Expr::*;\n\n    let kind = match &node.callee {\n      Callee::Import(_) => DependencyKind::DynamicImport,\n      Callee::Expr(expr) => {\n        match &**expr {\n          Ident(ident) => {\n            // Bail if defined in scope\n            if !is_unresolved(&ident, self.unresolved_mark) {\n              return node.fold_children_with(self);\n            }\n\n            match ident.sym.to_string().as_str() {\n              \"require\" => {\n                if self.in_promise {\n                  DependencyKind::DynamicImport\n                } else {\n                  DependencyKind::Require\n                }\n              }\n              \"importScripts\" => {\n                if self.config.is_worker() {\n                  let (msg, span) = if self.config.source_type == SourceType::Script {\n                    // Ignore if argument is not a string literal.\n                    let span = if let Some(ast::ExprOrSpread { expr, .. }) = node.args.first() {\n                      match &**expr {\n                        Lit(ast::Lit::Str(ast::Str { value, span, .. })) => {\n                          // Ignore absolute URLs.\n                          if value.starts_with(\"http:\")\n                            || value.starts_with(\"https:\")\n                            || value.starts_with(\"//\")\n                          {\n                            return node.fold_children_with(self);\n                          }\n                          span\n                        }\n                        _ => {\n                          return node.fold_children_with(self);\n                        }\n                      }\n                    } else {\n                      return node.fold_children_with(self);\n                    };\n\n                    (\n                      \"Argument to importScripts() must be a fully qualified URL.\",\n                      *span,\n                    )\n                  } else {\n                    (\n                      \"importScripts() is not supported in module workers.\",\n                      node.span,\n                    )\n                  };\n                  self.diagnostics.push(Diagnostic {\n                    message: msg.to_string(),\n                    code_highlights: Some(vec![CodeHighlight {\n                      message: None,\n                      loc: SourceLocation::from(&self.source_map, span),\n                    }]),\n                    hints: Some(vec![String::from(\n                      \"Use a static `import`, or dynamic `import()` instead.\",\n                    )]),\n                    show_environment: self.config.source_type == SourceType::Script,\n                    severity: DiagnosticSeverity::Error,\n                    documentation_url: Some(String::from(\n                      \"https://parceljs.org/languages/javascript/#classic-script-workers\",\n                    )),\n                  });\n                }\n\n                return node.fold_children_with(self);\n              }\n              \"__parcel__require__\" => {\n                let mut call = node.fold_children_with(self);\n                if self.config.scope_hoist {\n                  call.callee = ast::Callee::Expr(Box::new(ast::Expr::Ident(ast::Ident::new(\n                    \"require\".into(),\n                    DUMMY_SP,\n                    SyntaxContext::empty().apply_mark(self.ignore_mark),\n                  ))));\n                } else {\n                  call.callee = ast::Callee::Expr(Box::new(ast::Expr::Member(member_expr!(\n                    Default::default(),\n                    call.span,\n                    module.require\n                  ))));\n                }\n                return call;\n              }\n              \"__parcel__import__\" => {\n                let mut call = node.fold_children_with(self);\n                call.callee = ast::Callee::Expr(Box::new(ast::Expr::Ident(ast::Ident::new(\n                  \"import\".into(),\n                  DUMMY_SP,\n                  SyntaxContext::empty().apply_mark(self.ignore_mark),\n                ))));\n                return call;\n              }\n              \"__parcel__importScripts__\" => {\n                let mut call = node.fold_children_with(self);\n                call.callee = ast::Callee::Expr(Box::new(ast::Expr::Ident(ast::Ident::new(\n                  \"importScripts\".into(),\n                  DUMMY_SP,\n                  SyntaxContext::empty().apply_mark(self.ignore_mark),\n                ))));\n                return call;\n              }\n              \"parcelRequire\" => {\n                if let Some(ast::ExprOrSpread { expr, .. }) = node.args.first() {\n                  if let Some((id, span)) = match_str(expr) {\n                    self.items.push(DependencyDescriptor {\n                      kind: DependencyKind::Id,\n                      loc: SourceLocation::from(&self.source_map, span),\n                      specifier: id,\n                      attributes: None,\n                      flags: DependencyFlags::empty(),\n                      source_type: None,\n                      placeholder: None,\n                    });\n                  }\n                }\n                let mut call = node.fold_children_with(self);\n                if !self.config.scope_hoist {\n                  call.callee = ast::Callee::Expr(Box::new(ast::Expr::Member(member_expr!(\n                    Default::default(),\n                    call.span,\n                    module.bundle.root\n                  ))));\n                }\n                return call;\n              }\n              _ => return node.fold_children_with(self),\n            }\n          }\n          Member(member) => {\n            if match_member_expr(member, vec![\"parcelRequire\", \"load\"], self.unresolved_mark) {\n              let mut call = node.fold_children_with(self);\n              let callee = if self.config.scope_hoist {\n                ast::Expr::Ident(ast::Ident::new_no_ctxt(\"$parcel$import\".into(), call.span))\n              } else {\n                ast::Expr::Member(member_expr!(\n                  Default::default(),\n                  call.span,\n                  module.bundle.load\n                ))\n              };\n              call.callee = ast::Callee::Expr(Box::new(callee));\n              self.helpers |= Helpers::LOAD;\n              return call;\n            } else if match_member_expr(\n              member,\n              vec![\"parcelRequire\", \"resolve\"],\n              self.unresolved_mark,\n            ) {\n              let mut call = node.fold_children_with(self);\n              let callee = if self.config.scope_hoist {\n                ast::Expr::Ident(ast::Ident::new_no_ctxt(\"$parcel$resolve\".into(), call.span))\n              } else {\n                ast::Expr::Member(member_expr!(\n                  Default::default(),\n                  call.span,\n                  module.bundle.resolve\n                ))\n              };\n              call.callee = ast::Callee::Expr(Box::new(callee));\n              self.helpers |= Helpers::RESOLVE;\n              return call;\n            } else if match_member_expr(\n              member,\n              vec![\"parcelRequire\", \"extendImportMap\"],\n              self.unresolved_mark,\n            ) {\n              let mut call = node.fold_children_with(self);\n              let callee = if self.config.scope_hoist {\n                ast::Expr::Ident(ast::Ident::new_no_ctxt(\n                  \"$parcel$extendImportMap\".into(),\n                  call.span,\n                ))\n              } else {\n                ast::Expr::Member(member_expr!(\n                  Default::default(),\n                  call.span,\n                  module.bundle.extendImportMap\n                ))\n              };\n              call.callee = ast::Callee::Expr(Box::new(callee));\n              self.helpers |= Helpers::EXTEND_IMPORT_MAP;\n              return call;\n            } else if match_member_expr(member, vec![\"module\", \"require\"], self.unresolved_mark) {\n              DependencyKind::Require\n            } else if self.config.is_browser()\n              && match_member_expr(\n                member,\n                vec![\"navigator\", \"serviceWorker\", \"register\"],\n                self.unresolved_mark,\n              )\n            {\n              DependencyKind::ServiceWorker\n            } else if self.config.is_browser()\n              && match_member_expr(\n                member,\n                vec![\"CSS\", \"paintWorklet\", \"addModule\"],\n                self.unresolved_mark,\n              )\n            {\n              DependencyKind::Worklet\n            } else {\n              let was_in_promise = self.in_promise;\n\n              // Match compiled dynamic imports (Parcel)\n              // Promise.resolve(require('foo'))\n              if match_member_expr(member, vec![\"Promise\", \"resolve\"], self.unresolved_mark) {\n                if let Some(expr) = node.args.first() {\n                  if match_require(&expr.expr, self.unresolved_mark, Mark::fresh(Mark::root()))\n                    .is_some()\n                  {\n                    self.in_promise = true;\n                    let node = node.fold_children_with(self);\n                    self.in_promise = was_in_promise;\n                    return node;\n                  }\n                }\n              }\n\n              // Match compiled dynamic imports (TypeScript)\n              // Promise.resolve().then(() => require('foo'))\n              // Promise.resolve().then(() => { return require('foo') })\n              // Promise.resolve().then(function () { return require('foo') })\n              //   but not\n              // Promise.resolve(require('foo'))\n              if let Call(call) = &*member.obj {\n                if let Callee::Expr(e) = &call.callee {\n                  if let Member(m) = &**e {\n                    if match_member_expr(m, vec![\"Promise\", \"resolve\"], self.unresolved_mark) &&\n                        // Make sure the arglist is empty.\n                        // I.e. do not proceed with the below unless Promise.resolve has an empty arglist\n                        // because build_promise_chain() will not work in this case.\n                        call.args.is_empty()\n                    {\n                      if let MemberProp::Ident(id) = &member.prop {\n                        if id.sym.to_string().as_str() == \"then\" {\n                          if let Some(arg) = node.args.first() {\n                            match &*arg.expr {\n                              Fn(_) | Arrow(_) => {\n                                self.in_promise = true;\n                                let node = node.clone().fold_children_with(self);\n                                self.in_promise = was_in_promise;\n\n                                // Transform Promise.resolve().then(() => __importStar(require('foo')))\n                                //   => Promise.resolve().then(() => require('foo')).then(res => __importStar(res))\n                                if let Some(require_node) = self.require_node.clone() {\n                                  self.require_node = None;\n                                  return build_promise_chain(node, require_node);\n                                }\n                              }\n                              _ => {}\n                            }\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n\n              return node.fold_children_with(self);\n            }\n          }\n          _ => return node.fold_children_with(self),\n        }\n      }\n      _ => return node.fold_children_with(self),\n    };\n\n    // Convert import attributes for dynamic import\n    let mut attributes = None;\n    if kind == DependencyKind::DynamicImport {\n      if let Some(arg) = node.args.get(1) {\n        if let Object(_) = &*arg.expr {\n          let evaluator = Evaluator::new(&self.source_map);\n          attributes = evaluator.eval(&*arg.expr).ok();\n        }\n      }\n    }\n\n    let mut is_specifier_str = false;\n    let node = if let Some(arg) = node.args.first() {\n      if kind == DependencyKind::ServiceWorker || kind == DependencyKind::Worklet {\n        let (source_type, opts) = if kind == DependencyKind::ServiceWorker {\n          match_worker_type(node.args.get(1))\n        } else {\n          // Worklets are always modules\n          (SourceType::Module, None)\n        };\n        let mut node = node.clone();\n\n        let (specifier, span, needs_stable_name, optional) =\n          if let Some(s) = self.match_new_url(&arg.expr) {\n            s\n          } else if let Lit(ast::Lit::Str(str_)) = &*arg.expr {\n            let (msg, docs) = if kind == DependencyKind::ServiceWorker {\n              (\n                \"Registering service workers with a string literal is not supported.\",\n                \"https://parceljs.org/languages/javascript/#service-workers\",\n              )\n            } else {\n              (\n                \"Registering worklets with a string literal is not supported.\",\n                \"https://parceljs.org/languages/javascript/#worklets\",\n              )\n            };\n            self.diagnostics.push(Diagnostic {\n              message: msg.to_string(),\n              code_highlights: Some(vec![CodeHighlight {\n                message: None,\n                loc: SourceLocation::from(&self.source_map, str_.span),\n              }]),\n              hints: Some(vec![format!(\n                \"Replace with: new URL('{}', import.meta.url)\",\n                str_.value,\n              )]),\n              show_environment: false,\n              severity: DiagnosticSeverity::Error,\n              documentation_url: Some(String::from(docs)),\n            });\n            return node;\n          } else {\n            return node;\n          };\n\n        node.args[0].expr = Box::new(self.add_url_dependency(\n          specifier,\n          span,\n          kind,\n          source_type,\n          needs_stable_name,\n          optional,\n        ));\n\n        match opts {\n          Some(opts) => {\n            node.args[1] = opts;\n          }\n          None => {\n            node.args.truncate(1);\n          }\n        }\n        return node;\n      }\n\n      if let Some((specifier, span)) = match_str(&arg.expr) {\n        is_specifier_str = true;\n        // require() calls aren't allowed in scripts, flag as an error.\n        if kind == DependencyKind::Require && self.config.source_type == SourceType::Script {\n          self.add_script_error(node.span);\n          return node;\n        }\n\n        let placeholder = self.add_dependency(\n          specifier,\n          span,\n          kind.clone(),\n          attributes,\n          kind == DependencyKind::Require && self.in_try,\n          self.config.source_type,\n          false,\n        );\n\n        if let Some(placeholder) = placeholder {\n          let mut node = node.clone();\n          node.args[0].expr = Box::new(ast::Expr::Lit(ast::Lit::Str(ast::Str {\n            value: placeholder,\n            span,\n            raw: None,\n          })));\n          node\n        } else {\n          node\n        }\n      } else {\n        node\n      }\n    } else {\n      node\n    };\n\n    // Replace import() with require()\n    if kind == DependencyKind::DynamicImport {\n      let mut call = node.fold_children_with(self);\n      if !self.config.scope_hoist && !self.config.standalone && is_specifier_str {\n        let name = match &self.config.source_type {\n          SourceType::Module => \"require\",\n          SourceType::Script => \"__parcel__require__\",\n        };\n        call.callee = ast::Callee::Expr(Box::new(ast::Expr::Ident(ast::Ident::new_no_ctxt(\n          name.into(),\n          DUMMY_SP,\n        ))));\n      }\n\n      // Drop import attributes\n      call.args.truncate(1);\n\n      // Track the returned require call to be replaced with a promise chain.\n      self.require_node = Some(call.clone());\n      call\n    } else if kind == DependencyKind::Require {\n      // Don't continue traversing so that the `require` isn't replaced with undefined\n      node\n    } else {\n      node.fold_children_with(self)\n    }\n  }\n\n  fn fold_unary_expr(&mut self, node: ast::UnaryExpr) -> ast::UnaryExpr {\n    // Don't traverse `typeof require` further to not replace `require` with undefined\n    if let ast::UnaryExpr {\n      op: ast::UnaryOp::TypeOf,\n      arg,\n      ..\n    } = &node\n    {\n      if let ast::Expr::Ident(ident) = &**arg {\n        if ident.sym == \"require\" && is_unresolved(&ident, self.unresolved_mark) {\n          return node;\n        }\n      }\n    }\n\n    node.fold_children_with(self)\n  }\n\n  fn fold_new_expr(&mut self, node: ast::NewExpr) -> ast::NewExpr {\n    use ast::Expr::*;\n\n    let matched = match &*node.callee {\n      Ident(id) => {\n        if id.sym == \"Worker\" || id.sym == \"SharedWorker\" {\n          // Bail if defined in scope\n          self.config.is_browser() && is_unresolved(&id, self.unresolved_mark)\n        } else if id.sym == \"Promise\" {\n          // Match requires inside promises (e.g. Rollup compiled dynamic imports)\n          // new Promise(resolve => resolve(require('foo')))\n          // new Promise(resolve => { resolve(require('foo')) })\n          // new Promise(function (resolve) { resolve(require('foo')) })\n          return self.fold_new_promise(node);\n        } else {\n          if id.sym == \"__parcel__URL__\" {\n            // new __parcel__URL__(url) -> new URL(url, import.meta.url)\n            if let Some(args) = &node.args {\n              if let ast::Expr::New(new) = create_url_constructor(\n                *args[0].expr.clone().fold_with(self),\n                self.config.is_esm_output,\n              ) {\n                return new;\n              }\n            }\n            unreachable!();\n          }\n          false\n        }\n      }\n      _ => false,\n    };\n\n    if !matched {\n      return node.fold_children_with(self);\n    }\n\n    if let Some(args) = &node.args {\n      if !args.is_empty() {\n        let (specifier, span, needs_stable_name, optional) =\n          if let Some(s) = self.match_new_url(&args[0].expr) {\n            s\n          } else if let Lit(ast::Lit::Str(str_)) = &*args[0].expr {\n            let constructor = match &*node.callee {\n              Ident(id) => id.sym.to_string(),\n              _ => \"Worker\".to_string(),\n            };\n            self.diagnostics.push(Diagnostic {\n              message: format!(\n                \"Constructing a {} with a string literal is not supported.\",\n                constructor\n              ),\n              code_highlights: Some(vec![CodeHighlight {\n                message: None,\n                loc: SourceLocation::from(&self.source_map, str_.span),\n              }]),\n              hints: Some(vec![format!(\n                \"Replace with: new URL('{}', import.meta.url)\",\n                str_.value\n              )]),\n              show_environment: false,\n              severity: DiagnosticSeverity::Error,\n              documentation_url: Some(String::from(\n                \"https://parceljs.org/languages/javascript/#web-workers\",\n              )),\n            });\n            return node;\n          } else {\n            return node;\n          };\n\n        let (source_type, opts) = match_worker_type(args.get(1));\n        let placeholder = self.add_url_dependency(\n          specifier,\n          span,\n          DependencyKind::WebWorker,\n          source_type,\n          needs_stable_name,\n          optional,\n        );\n\n        // Replace argument with a require call to resolve the URL at runtime.\n        let mut node = node.clone();\n        if let Some(mut args) = node.args.clone() {\n          args[0].expr = Box::new(placeholder);\n\n          // If module workers aren't supported natively, remove the `type: 'module'` option.\n          // If no other options are passed, remove the argument entirely.\n          if !self.config.supports_module_workers {\n            match opts {\n              None => {\n                args.truncate(1);\n              }\n              Some(opts) => {\n                args[1] = opts;\n              }\n            }\n          }\n          node.args = Some(args);\n        }\n\n        return node;\n      }\n    }\n\n    node.fold_children_with(self)\n  }\n\n  fold_member_expr_skip_prop! {}\n\n  fn fold_expr(&mut self, node: ast::Expr) -> ast::Expr {\n    use ast::*;\n\n    if self.is_import_meta(&node) {\n      return self.get_import_meta();\n    }\n\n    if self.is_import_meta_url(&node) {\n      return self.get_import_meta_url();\n    }\n\n    if let Some(expr) = self.match_import_meta_prop(&node) {\n      return expr;\n    }\n\n    if let Some((specifier, span, needs_stable_name, optional)) = self.match_new_url(&node) {\n      let url = self.add_url_dependency(\n        specifier,\n        span,\n        DependencyKind::Url,\n        self.config.source_type,\n        needs_stable_name,\n        optional,\n      );\n\n      // If this is a library, we will already have a URL object. Otherwise, we need to\n      // construct one from the string returned by the JSRuntime.\n      if !self.config.is_library && !self.config.standalone && !optional {\n        return Expr::New(NewExpr {\n          span: DUMMY_SP,\n          callee: Box::new(Expr::Ident(Ident::new_no_ctxt(\"URL\".into(), DUMMY_SP))),\n          ctxt: SyntaxContext::empty(),\n          args: Some(vec![ExprOrSpread {\n            expr: Box::new(url),\n            spread: None,\n          }]),\n          type_args: None,\n        });\n      }\n\n      return url;\n    }\n\n    let is_require = match &node {\n      Expr::Ident(ident) => {\n        if ident.sym == \"__parcel__import__\" {\n          return ast::Expr::Ident(\"import\".into());\n        }\n        // Free `require` -> undefined\n        ident.sym == \"require\" && is_unresolved(&ident, self.unresolved_mark)\n      }\n      Expr::Member(MemberExpr { obj: expr, .. }) => {\n        // e.g. `require.extensions` -> undefined\n        if let Expr::Ident(ident) = &**expr {\n          ident.sym == \"require\" && is_unresolved(&ident, self.unresolved_mark)\n        } else {\n          false\n        }\n      }\n      _ => false,\n    };\n\n    if is_require {\n      return ast::Expr::Ident(get_undefined_ident(self.unresolved_mark));\n    }\n\n    maybe_grow_default(|| node.fold_children_with(self))\n  }\n}\n\nimpl<'a> DependencyCollector<'a> {\n  fn fold_new_promise(&mut self, node: ast::NewExpr) -> ast::NewExpr {\n    use ast::Expr::*;\n\n    // Match requires inside promises (e.g. Rollup compiled dynamic imports)\n    // new Promise(resolve => resolve(require('foo')))\n    // new Promise(resolve => { resolve(require('foo')) })\n    // new Promise(function (resolve) { resolve(require('foo')) })\n    // new Promise(function (resolve) { return resolve(require('foo')) })\n    if let Some(args) = &node.args {\n      if let Some(arg) = args.first() {\n        let (resolve, expr) = match &*arg.expr {\n          Fn(f) => {\n            let param = f.function.params.first().map(|param| &param.pat);\n            let body = if let Some(body) = &f.function.body {\n              self.match_block_stmt_expr(body)\n            } else {\n              None\n            };\n            (param, body)\n          }\n          Arrow(f) => {\n            let param = f.params.first();\n            let body = match &*f.body {\n              ast::BlockStmtOrExpr::Expr(expr) => Some(&**expr),\n              ast::BlockStmtOrExpr::BlockStmt(block) => self.match_block_stmt_expr(block),\n            };\n            (param, body)\n          }\n          _ => (None, None),\n        };\n\n        let resolve_id = match resolve {\n          Some(ast::Pat::Ident(id)) => id.to_id(),\n          _ => return node.fold_children_with(self),\n        };\n\n        if let Some(ast::Expr::Call(call)) = expr {\n          if let ast::Callee::Expr(callee) = &call.callee {\n            if let ast::Expr::Ident(id) = &**callee {\n              if id.to_id() == resolve_id {\n                if let Some(arg) = call.args.first() {\n                  if match_require(&arg.expr, self.unresolved_mark, Mark::fresh(Mark::root()))\n                    .is_some()\n                  {\n                    let was_in_promise = self.in_promise;\n                    self.in_promise = true;\n                    let node = node.fold_children_with(self);\n                    self.in_promise = was_in_promise;\n                    return node;\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n\n    node.fold_children_with(self)\n  }\n\n  fn match_block_stmt_expr<'x>(&self, block: &'x ast::BlockStmt) -> Option<&'x ast::Expr> {\n    match block.stmts.last() {\n      Some(ast::Stmt::Expr(ast::ExprStmt { expr, .. })) => Some(&**expr),\n      Some(ast::Stmt::Return(ast::ReturnStmt { arg, .. })) => {\n        if let Some(arg) = arg {\n          Some(&**arg)\n        } else {\n          None\n        }\n      }\n      _ => None,\n    }\n  }\n}\n\n// If the `require` call is not immediately returned (e.g. wrapped in another function),\n// then transform the AST to create a promise chain so that the require is by itself.\n// This is because the require will return a promise rather than the module synchronously.\n// For example, TypeScript generates the following with the esModuleInterop flag:\n//   Promise.resolve().then(() => __importStar(require('./foo')));\n// This is transformed into:\n//   Promise.resolve().then(() => require('./foo')).then(res => __importStar(res));\nfn build_promise_chain(node: ast::CallExpr, require_node: ast::CallExpr) -> ast::CallExpr {\n  let mut transformer = PromiseTransformer {\n    require_node: Some(require_node),\n  };\n\n  let node = node.fold_with(&mut transformer);\n\n  if let Some(require_node) = &transformer.require_node {\n    if let Some(f) = node.args.first() {\n      // Add `res` as an argument to the original function\n      let f = match &*f.expr {\n        ast::Expr::Fn(f) => {\n          let mut f = f.clone();\n          f.function.params.insert(\n            0,\n            ast::Param {\n              pat: ast::Pat::Ident(ast::BindingIdent::from(ast::Ident::new_no_ctxt(\n                \"res\".into(),\n                DUMMY_SP,\n              ))),\n              decorators: vec![],\n              span: DUMMY_SP,\n            },\n          );\n          ast::Expr::Fn(f)\n        }\n        ast::Expr::Arrow(f) => {\n          let mut f = f.clone();\n          f.params.insert(\n            0,\n            ast::Pat::Ident(ast::BindingIdent::from(ast::Ident::new_no_ctxt(\n              \"res\".into(),\n              DUMMY_SP,\n            ))),\n          );\n          ast::Expr::Arrow(f)\n        }\n        _ => return node,\n      };\n\n      return ast::CallExpr {\n        callee: ast::Callee::Expr(Box::new(ast::Expr::Member(ast::MemberExpr {\n          span: DUMMY_SP,\n          obj: (Box::new(ast::Expr::Call(ast::CallExpr {\n            callee: node.callee,\n            args: vec![ast::ExprOrSpread {\n              expr: Box::new(ast::Expr::Fn(ast::FnExpr {\n                ident: None,\n                function: Box::new(ast::Function {\n                  body: Some(ast::BlockStmt {\n                    span: DUMMY_SP,\n                    stmts: vec![ast::Stmt::Return(ast::ReturnStmt {\n                      span: DUMMY_SP,\n                      arg: Some(Box::new(ast::Expr::Call(require_node.clone()))),\n                    })],\n                    ctxt: SyntaxContext::empty(),\n                  }),\n                  params: vec![],\n                  decorators: vec![],\n                  is_async: false,\n                  is_generator: false,\n                  return_type: None,\n                  type_params: None,\n                  span: DUMMY_SP,\n                  ctxt: SyntaxContext::empty(),\n                }),\n              })),\n              spread: None,\n            }],\n            span: DUMMY_SP,\n            ctxt: SyntaxContext::empty(),\n            type_args: None,\n          }))),\n          prop: MemberProp::Ident(ast::IdentName::new(\"then\".into(), DUMMY_SP)),\n        }))),\n        args: vec![ast::ExprOrSpread {\n          expr: Box::new(f),\n          spread: None,\n        }],\n        span: DUMMY_SP,\n        ctxt: SyntaxContext::empty(),\n        type_args: None,\n      };\n    }\n  }\n\n  node\n}\n\nfn create_url_constructor(url: ast::Expr, use_import_meta: bool) -> ast::Expr {\n  use ast::*;\n\n  let expr = if use_import_meta {\n    Expr::Member(MemberExpr {\n      span: DUMMY_SP,\n      obj: Box::new(Expr::MetaProp(MetaPropExpr {\n        kind: MetaPropKind::ImportMeta,\n        span: DUMMY_SP,\n      })),\n      prop: MemberProp::Ident(IdentName::new(\"url\".into(), DUMMY_SP)),\n    })\n  } else {\n    // CJS output: \"file:\" + __filename\n    Expr::Bin(BinExpr {\n      span: DUMMY_SP,\n      left: Box::new(Expr::Lit(Lit::Str(\"file:\".into()))),\n      op: BinaryOp::Add,\n      right: Box::new(Expr::Ident(Ident::new_no_ctxt(\n        \"__filename\".into(),\n        DUMMY_SP,\n      ))),\n    })\n  };\n\n  Expr::New(NewExpr {\n    span: DUMMY_SP,\n    ctxt: SyntaxContext::empty(),\n    callee: Box::new(Expr::Ident(Ident::new_no_ctxt(\"URL\".into(), DUMMY_SP))),\n    args: Some(vec![\n      ExprOrSpread {\n        expr: Box::new(url),\n        spread: None,\n      },\n      ExprOrSpread {\n        expr: Box::new(expr),\n        spread: None,\n      },\n    ]),\n    type_args: None,\n  })\n}\n\nstruct PromiseTransformer {\n  require_node: Option<ast::CallExpr>,\n}\n\nimpl Fold for PromiseTransformer {\n  fn fold_return_stmt(&mut self, node: ast::ReturnStmt) -> ast::ReturnStmt {\n    // If the require node is returned, no need to do any replacement.\n    if let Some(arg) = &node.arg {\n      if let ast::Expr::Call(call) = &**arg {\n        if let Some(require_node) = &self.require_node {\n          if require_node == call {\n            self.require_node = None\n          }\n        }\n      }\n    }\n\n    node.fold_children_with(self)\n  }\n\n  fn fold_arrow_expr(&mut self, node: ast::ArrowExpr) -> ast::ArrowExpr {\n    if let ast::BlockStmtOrExpr::Expr(expr) = &*node.body {\n      if let ast::Expr::Call(call) = &**expr {\n        if let Some(require_node) = &self.require_node {\n          if require_node == call {\n            self.require_node = None\n          }\n        }\n      }\n    }\n\n    node.fold_children_with(self)\n  }\n\n  fn fold_expr(&mut self, node: ast::Expr) -> ast::Expr {\n    let node = node.fold_children_with(self);\n\n    // Replace the original require node with a reference to a variable `res`,\n    // which will be added as a parameter to the parent function.\n    if let ast::Expr::Call(call) = &node {\n      if let Some(require_node) = &self.require_node {\n        if require_node == call {\n          return ast::Expr::Ident(ast::Ident::new_no_ctxt(\"res\".into(), DUMMY_SP));\n        }\n      }\n    }\n\n    node\n  }\n}\n\nimpl<'a> DependencyCollector<'a> {\n  fn match_new_url(\n    &mut self,\n    expr: &ast::Expr,\n  ) -> Option<(JsWord, swc_core::common::Span, bool, bool)> {\n    use ast::*;\n\n    if let Expr::New(new) = expr {\n      let is_url = match &*new.callee {\n        Expr::Ident(id) => id.sym == \"URL\" && is_unresolved(&id, self.unresolved_mark),\n        _ => false,\n      };\n\n      if !is_url {\n        return None;\n      }\n\n      if let Some(args) = &new.args {\n        let (specifier, span) = if let Some(arg) = args.first() {\n          match_str(&arg.expr)?\n        } else {\n          return None;\n        };\n\n        if let Some(arg) = args.get(1) {\n          if self.is_import_meta_url(&arg.expr) {\n            return Some((specifier, span, false, false));\n          }\n        }\n      }\n    }\n\n    if let Expr::Call(call) = expr {\n      if let Callee::Expr(expr) = &call.callee {\n        if matches!(&**expr, Expr::Ident(id) if id.sym == \"__parcel_url_dep__\") {\n          let (specifier, span) = if let Some(arg) = call.args.first() {\n            match_str(&arg.expr)?\n          } else {\n            return None;\n          };\n\n          let needs_stable_name = if let Some(arg) = call.args.get(1) {\n            matches!(&*arg.expr, Expr::Lit(Lit::Bool(Bool { value: true, .. })))\n          } else {\n            false\n          };\n\n          return Some((specifier, span, needs_stable_name, true));\n        }\n      }\n    }\n\n    // self reference, e.g. new Worker(import.meta.url)\n    if self.is_import_meta_url(expr) {\n      let filename = Path::new(&self.config.filename).file_name().unwrap();\n      let specifier = format!(\"./{}\", filename.to_string_lossy());\n      let span = match expr {\n        Expr::Member(member) => member.span,\n        _ => unreachable!(),\n      };\n      return Some((specifier.into(), span, false, false));\n    }\n\n    None\n  }\n\n  #[allow(clippy::wrong_self_convention)]\n  fn is_import_meta_url(&mut self, expr: &ast::Expr) -> bool {\n    use ast::*;\n\n    match expr {\n      Expr::Member(member) => {\n        if !self.is_import_meta(&member.obj) {\n          return false;\n        }\n\n        let name = match_property_name(member);\n\n        if let Some((name, _)) = name {\n          name == \"url\"\n        } else {\n          false\n        }\n      }\n      Expr::Bin(BinExpr {\n        op: BinaryOp::Add,\n        left,\n        right,\n        ..\n      }) => {\n        // Match \"file:\" + __filename\n        let left = match_str(left);\n        match (left, &**right) {\n          (Some((left, _)), Expr::Ident(Ident { sym: right, .. })) => {\n            &left == \"file:\" && right == \"__filename\"\n          }\n          _ => false,\n        }\n      }\n      _ => false,\n    }\n  }\n\n  #[allow(clippy::wrong_self_convention)]\n  fn is_import_meta(&mut self, expr: &ast::Expr) -> bool {\n    use ast::*;\n\n    match &expr {\n      ast::Expr::MetaProp(MetaPropExpr {\n        kind: MetaPropKind::ImportMeta,\n        span,\n      }) => {\n        if self.config.source_type == SourceType::Script {\n          self.diagnostics.push(Diagnostic {\n            message: \"`import.meta` is not supported outside a module.\".to_string(),\n            code_highlights: Some(vec![CodeHighlight {\n              message: None,\n              loc: SourceLocation::from(&self.source_map, *span),\n            }]),\n            hints: None,\n            show_environment: true,\n            severity: DiagnosticSeverity::Error,\n            documentation_url: Some(String::from(\n              \"https://parceljs.org/languages/javascript/#classic-scripts\",\n            )),\n          })\n        }\n        true\n      }\n      Expr::Member(member) => {\n        match_member_expr(member, vec![\"parcelRequire\", \"meta\"], self.unresolved_mark)\n      }\n      _ => false,\n    }\n  }\n\n  fn match_import_meta_prop(&mut self, expr: &ast::Expr) -> Option<ast::Expr> {\n    use ast::*;\n\n    match expr {\n      Expr::Member(member) => {\n        if !self.is_import_meta(&member.obj) {\n          return None;\n        }\n\n        let name = match_property_name(member);\n\n        if let Some((name, span)) = name {\n          match name.as_str() {\n            \"distDir\" => {\n              if self.config.is_library {\n                return if self.config.is_esm_output {\n                  Some(Expr::Member(member_expr!(\n                    Default::default(),\n                    span,\n                    import.meta.distDir\n                  )))\n                } else {\n                  Some(Expr::Member(member_expr!(\n                    Default::default(),\n                    span,\n                    parcelRequire.meta.distDir\n                  )))\n                };\n              }\n\n              self.helpers |= Helpers::DIST_DIR;\n              if self.config.scope_hoist {\n                Some(Expr::Ident(Ident::new_no_ctxt(\n                  \"$parcel$distDir\".into(),\n                  span,\n                )))\n              } else {\n                Some(Expr::Member(member_expr!(\n                  Default::default(),\n                  span,\n                  module.bundle.distDir\n                )))\n              }\n            }\n            \"publicUrl\" => {\n              if self.config.is_library {\n                return if self.config.is_esm_output {\n                  Some(Expr::Member(member_expr!(\n                    Default::default(),\n                    span,\n                    import.meta.publicUrl\n                  )))\n                } else {\n                  Some(Expr::Member(member_expr!(\n                    Default::default(),\n                    span,\n                    parcelRequire.meta.publicUrl\n                  )))\n                };\n              }\n\n              self.helpers |= Helpers::PUBLIC_URL;\n              if self.config.scope_hoist {\n                Some(Expr::Ident(Ident::new_no_ctxt(\n                  \"$parcel$publicUrl\".into(),\n                  span,\n                )))\n              } else {\n                Some(Expr::Member(member_expr!(\n                  Default::default(),\n                  span,\n                  module.bundle.publicUrl\n                )))\n              }\n            }\n            \"devServer\" => {\n              if self.config.is_library {\n                return if self.config.is_esm_output {\n                  Some(Expr::Member(member_expr!(\n                    Default::default(),\n                    span,\n                    import.meta.devServer\n                  )))\n                } else {\n                  Some(Expr::Member(member_expr!(\n                    Default::default(),\n                    span,\n                    parcelRequire.meta.devServer\n                  )))\n                };\n              }\n\n              self.helpers |= Helpers::DEV_SERVER;\n              if self.config.scope_hoist {\n                Some(Expr::Ident(Ident::new_no_ctxt(\n                  \"$parcel$devServer\".into(),\n                  span,\n                )))\n              } else {\n                Some(Expr::Member(member_expr!(\n                  Default::default(),\n                  span,\n                  module.bundle.devServer\n                )))\n              }\n            }\n            _ => None,\n          }\n        } else {\n          None\n        }\n      }\n      _ => None,\n    }\n  }\n\n  fn get_project_relative_filename(&self) -> String {\n    if let Some(relative) = pathdiff::diff_paths(&self.config.filename, &self.config.project_root) {\n      relative.to_slash_lossy()\n    } else if let Some(filename) = Path::new(&self.config.filename).file_name() {\n      String::from(filename.to_string_lossy())\n    } else {\n      String::from(\"unknown.js\")\n    }\n  }\n\n  fn get_import_meta_url(&mut self) -> ast::Expr {\n    use ast::*;\n\n    Expr::Lit(Lit::Str(\n      format!(\"file:///{}\", self.get_project_relative_filename()).into(),\n    ))\n  }\n\n  fn get_import_meta(&mut self) -> ast::Expr {\n    use ast::*;\n\n    if let Some(decl) = &self.import_meta {\n      if let Pat::Ident(name) = &decl.decls[0].name {\n        Expr::Ident(name.id.clone())\n      } else {\n        unreachable!()\n      }\n    } else {\n      // Declares a variable at the top of the module:\n      // var import_meta = Object.assign(Object.create(null), {url: 'file:///src/foo.js'});\n      let ident = Ident::new_private(\n        format!(\"${}$import_meta\", self.config.module_id).into(),\n        DUMMY_SP,\n      );\n      self.import_meta = Some(VarDecl {\n        kind: VarDeclKind::Var,\n        declare: false,\n        span: DUMMY_SP,\n        decls: vec![VarDeclarator {\n          name: Pat::Ident(BindingIdent::from(ident.clone())),\n          init: Some(Box::new(Expr::Call(CallExpr {\n            callee: Callee::Expr(Box::new(Expr::Member(MemberExpr {\n              obj: Box::new(Expr::Ident(Ident::new_no_ctxt(\"Object\".into(), DUMMY_SP))),\n              prop: MemberProp::Ident(IdentName::new(\"assign\".into(), DUMMY_SP)),\n              span: DUMMY_SP,\n            }))),\n            args: vec![\n              ExprOrSpread {\n                expr: Box::new(Expr::Call(CallExpr {\n                  callee: Callee::Expr(Box::new(Expr::Member(MemberExpr {\n                    obj: (Box::new(Expr::Ident(Ident::new_no_ctxt(\"Object\".into(), DUMMY_SP)))),\n                    prop: MemberProp::Ident(IdentName::new(\"create\".into(), DUMMY_SP)),\n                    span: DUMMY_SP,\n                  }))),\n                  args: vec![ExprOrSpread {\n                    expr: Box::new(Expr::Lit(Lit::Null(Null { span: DUMMY_SP }))),\n                    spread: None,\n                  }],\n                  span: DUMMY_SP,\n                  ctxt: SyntaxContext::empty(),\n                  type_args: None,\n                })),\n                spread: None,\n              },\n              ExprOrSpread {\n                expr: Box::new(Expr::Object(ObjectLit {\n                  props: vec![PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp {\n                    key: PropName::Ident(IdentName::new(\"url\".into(), DUMMY_SP)),\n                    value: Box::new(self.get_import_meta_url()),\n                  })))],\n                  span: DUMMY_SP,\n                })),\n                spread: None,\n              },\n            ],\n            span: DUMMY_SP,\n            ctxt: SyntaxContext::empty(),\n            type_args: None,\n          }))),\n          span: DUMMY_SP,\n          definite: false,\n        }],\n        ctxt: SyntaxContext::empty(),\n      });\n      Expr::Ident(ident)\n    }\n  }\n}\n\n// matches the `type: 'module'` option of workers\nfn match_worker_type(expr: Option<&ast::ExprOrSpread>) -> (SourceType, Option<ast::ExprOrSpread>) {\n  use ast::*;\n\n  if let Some(expr_or_spread) = expr {\n    if let Expr::Object(obj) = &*expr_or_spread.expr {\n      let mut source_type: Option<SourceType> = None;\n      let props: Vec<PropOrSpread> = obj\n        .props\n        .iter()\n        .filter(|key| {\n          let prop = match key {\n            PropOrSpread::Prop(prop) => prop,\n            _ => return true,\n          };\n\n          let kv = match &**prop {\n            Prop::KeyValue(kv) => kv,\n            _ => return true,\n          };\n\n          match &kv.key {\n            PropName::Ident(IdentName { sym, .. }) if sym == \"type\" => {}\n            PropName::Str(Str { value, .. }) if value == \"type\" => {}\n            _ => return true,\n          };\n\n          let v = if let Some((v, _)) = match_str(&kv.value) {\n            v\n          } else {\n            return true;\n          };\n\n          source_type = Some(if v == \"module\" {\n            SourceType::Module\n          } else {\n            SourceType::Script\n          });\n\n          false\n        })\n        .cloned()\n        .collect();\n\n      if let Some(source_type) = source_type {\n        let e = if props.is_empty() {\n          None\n        } else {\n          Some(ExprOrSpread {\n            spread: None,\n            expr: Box::new(Expr::Object(ObjectLit {\n              props,\n              span: obj.span,\n            })),\n          })\n        };\n\n        return (source_type, e);\n      }\n    }\n  }\n\n  (SourceType::Script, expr.cloned())\n}\n\n#[cfg(test)]\nmod test {\n  use super::*;\n  use crate::{\n    DependencyDescriptor,\n    test_utils::{RunTestContext, RunVisitResult, run_fold},\n  };\n\n  fn make_dependency_collector<'a>(\n    context: RunTestContext,\n    items: &'a mut Vec<DependencyDescriptor>,\n    diagnostics: &'a mut Vec<Diagnostic>,\n    config: &'a Config,\n  ) -> DependencyCollector<'a> {\n    DependencyCollector {\n      source_map: context.source_map.clone(),\n      items,\n      in_try: false,\n      in_promise: false,\n      require_node: None,\n      ignore_mark: Mark::new(),\n      unresolved_mark: context.unresolved_mark,\n      config,\n      diagnostics,\n      import_meta: None,\n      helpers: Helpers::empty(),\n    }\n  }\n\n  fn make_config() -> Config {\n    Config::default()\n  }\n\n  fn make_placeholder_hash(specifier: &str, dependency_kind: DependencyKind) -> String {\n    format!(\n      \"{:x}\",\n      hash!(format!(\"{}:{}:{}\", \"\", specifier, dependency_kind))\n    )\n  }\n\n  #[test]\n  fn test_dynamic_import_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = Config::default();\n    let input_code = r#\"\n      const { x } = await import('other');\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::DynamicImport);\n    let expected_code = format!(\n      r#\"\n      const {{ x }} = await require(\"{}\");\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::DynamicImport,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  #[test]\n  fn test_import_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = Config::default();\n    let input_code = r#\"\n      import { x } from 'other';\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let expected_code = r#\"\n      import { x } from 'other';\n    \"#\n    .trim_start()\n    .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::Import,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: None,\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  #[test]\n  fn test_export_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = Config::default();\n    let input_code = r#\"\n      export { x } from 'other';\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let expected_code = r#\"\n      export { x } from 'other';\n    \"#\n    .trim_start()\n    .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::Export,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: None,\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  #[test]\n  fn test_export_star_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = Config::default();\n    let input_code = r#\"\n      export * from 'other';\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let expected_code = r#\"\n      export * from 'other';\n    \"#\n    .trim_start()\n    .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::Export,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: None,\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  #[test]\n  fn test_require_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\n      const { x } = require('other');\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::Require);\n    let expected_code = format!(\n      r#\"\n      const {{ x }} = require(\"{}\");\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::Require,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  #[test]\n  fn test_optional_require_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\ntry {\n    const { x } = require('other');\n} catch (err) {}\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::Require);\n    let expected_code = format!(\n      r#\"\ntry {{\n    const {{ x }} = require(\"{}\");\n}} catch (err) {{}}\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::Require,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::OPTIONAL,\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  // Require is treated as dynamic import\n  #[test]\n  fn test_compiled_dynamic_imports() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\nPromise.resolve().then(() => require('other'));\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::DynamicImport);\n    let expected_code = format!(\n      r#\"\nPromise.resolve().then(()=>require(\"{}\"));\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::DynamicImport,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  // Require is treated as dynamic import\n  #[test]\n  fn test_compiled_dynamic_imports_with_chain() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\nPromise.resolve().then(() => doSomething(require('other')));\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::DynamicImport);\n    let expected_code = format!(\n      r#\"\nPromise.resolve().then(function() {{\n    return require(\"{}\");\n}}).then((res)=>doSomething(res));\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::DynamicImport,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  // Require is treated as dynamic import\n  #[test]\n  fn test_compiled_dynamic_imports_with_function_chain() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\nPromise.resolve().then(function() { return doSomething(require('other')); });\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::DynamicImport);\n    let expected_code = format!(\n      r#\"\nPromise.resolve().then(function() {{\n    return require(\"{}\");\n}}).then(function(res) {{\n    return doSomething(res);\n}});\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::DynamicImport,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  // Require is treated as dynamic import\n  #[test]\n  fn test_new_promise_require_imports() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\nnew Promise((resolve) => resolve(require(\"other\")));\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::DynamicImport);\n    let expected_code = format!(\n      r#\"\nnew Promise((resolve)=>resolve(require(\"{}\")));\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::DynamicImport,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  // Require is treated as dynamic import\n  #[test]\n  fn test_new_promise_require_imports_with_function_expr() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\nnew Promise(function(resolve) { return resolve(require(\"other\")) });\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::DynamicImport);\n    let expected_code = format!(\n      r#\"\nnew Promise(function(resolve) {{\n    return resolve(require(\"{}\"));\n}});\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::DynamicImport,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  // Require is treated as dynamic import\n  #[test]\n  fn test_promise_resolve_require_dynamic_import() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\nPromise.resolve(require(\"other\"));\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::DynamicImport);\n    let expected_code = format!(\n      r#\"\nPromise.resolve(require(\"{}\"));\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::DynamicImport,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  #[test]\n  fn test_worker_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\n      new Worker(new URL('other', import.meta.url), {type: 'module'});\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::WebWorker);\n    let expected_code = format!(\n      r#\"\n      new Worker(require(\"{}\"));\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::WebWorker,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  #[test]\n  fn test_service_worker_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\n      navigator.serviceWorker.register(new URL('other', import.meta.url), {type: 'module'});\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::ServiceWorker);\n    let expected_code = format!(\n      r#\"\n      navigator.serviceWorker.register(require(\"{}\"));\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::ServiceWorker,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  #[test]\n  fn test_worklet_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\n      CSS.paintWorklet.addModule(new URL('other', import.meta.url));\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"other\", DependencyKind::Worklet);\n    let expected_code = format!(\n      r#\"\n      CSS.paintWorklet.addModule(require(\"{}\"));\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::Worklet,\n        specifier: \"other\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n\n  #[test]\n  fn test_url_dependency() {\n    let mut items = vec![];\n    let mut diagnostics = vec![];\n    let config = make_config();\n    let input_code = r#\"\nlet img = document.createElement('img');\nimg.src = new URL('hero.jpg', import.meta.url);\ndocument.body.appendChild(img);\n    \"#;\n\n    let RunVisitResult { output_code, .. } = run_fold(input_code, |context| {\n      make_dependency_collector(context, &mut items, &mut diagnostics, &config)\n    });\n\n    let hash = make_placeholder_hash(\"hero.jpg\", DependencyKind::Url);\n    let expected_code = format!(\n      r#\"\nlet img = document.createElement('img');\nimg.src = new URL(require(\"{}\"));\ndocument.body.appendChild(img);\n    \"#,\n      hash\n    );\n    let expected_code = expected_code\n      .trim_start()\n      .trim_end_matches(|p: char| p == ' ');\n\n    assert_eq!(output_code, expected_code);\n    assert_eq!(diagnostics, []);\n    assert_eq!(\n      items,\n      [DependencyDescriptor {\n        kind: DependencyKind::Url,\n        specifier: \"hero.jpg\".into(),\n        attributes: None,\n        flags: DependencyFlags::empty(),\n        source_type: Some(SourceType::Module),\n        placeholder: Some(hash),\n        ..items[0].clone()\n      }]\n    );\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/env_replacer.rs",
    "content": "use std::{\n  collections::{HashMap, HashSet},\n  vec,\n};\n\nuse ast::*;\nuse swc_core::{\n  common::{DUMMY_SP, Mark, sync::Lrc},\n  ecma::{\n    ast,\n    atoms::Atom as JsWord,\n    visit::{VisitMut, VisitMutWith},\n  },\n};\n\nuse crate::utils::*;\n\n/// Replaces process.env usage with the literal strings for values referenced.\npub struct EnvReplacer<'a> {\n  pub replace_env: bool,\n  pub is_browser: bool,\n  pub env: &'a HashMap<JsWord, JsWord>,\n  pub used_env: &'a mut HashSet<JsWord>,\n  pub source_map: Lrc<swc_core::common::SourceMap>,\n  pub diagnostics: &'a mut Vec<Diagnostic>,\n  pub unresolved_mark: Mark,\n}\n\nimpl<'a> VisitMut for EnvReplacer<'a> {\n  fn visit_mut_expr(&mut self, node: &mut Expr) {\n    // Replace assignments to process.browser with `true`\n    // TODO: this seems questionable but we did it in the JS version??\n    if let Some(value) = self.replace_browser_assignment(&node) {\n      *node = value;\n      return;\n    }\n\n    // Replace `'foo' in process.env` with a boolean.\n    match &node {\n      Expr::Bin(binary) if binary.op == BinaryOp::In => {\n        if let (Expr::Lit(Lit::Str(left)), Expr::Member(member)) = (&*binary.left, &*binary.right) {\n          if match_member_expr(member, vec![\"process\", \"env\"], self.unresolved_mark) {\n            self.used_env.insert(left.value.clone());\n            *node = Expr::Lit(Lit::Bool(Bool {\n              value: self.env.contains_key(&left.value),\n              span: DUMMY_SP,\n            }));\n            return;\n          }\n        }\n      }\n      _ => {}\n    }\n\n    if let Expr::Member(member) = node {\n      if self.is_browser\n        && match_member_expr(member, vec![\"process\", \"browser\"], self.unresolved_mark)\n      {\n        *node = Expr::Lit(Lit::Bool(Bool {\n          value: true,\n          span: DUMMY_SP,\n        }));\n        return;\n      }\n\n      if !self.replace_env {\n        node.visit_mut_children_with(self);\n        return;\n      }\n\n      if let Expr::Member(obj) = &*member.obj {\n        if match_member_expr(obj, vec![\"process\", \"env\"], self.unresolved_mark) {\n          if let Some((sym, _)) = match_property_name(member) {\n            if let Some(replacement) = self.replace(&sym, true) {\n              *node = replacement;\n              return;\n            }\n          }\n        }\n      }\n    }\n\n    if let Expr::Assign(assign) = node {\n      if !self.replace_env {\n        node.visit_mut_children_with(self);\n        return;\n      }\n\n      // process.env.FOO = ...;\n      if let AssignTarget::Simple(SimpleAssignTarget::Member(member)) = &assign.left {\n        if let Expr::Member(obj) = &*member.obj {\n          if match_member_expr(obj, vec![\"process\", \"env\"], self.unresolved_mark) {\n            self.emit_mutating_error(assign.span);\n            assign.right.visit_mut_with(self);\n            *node = *assign.right.clone();\n            return;\n          }\n        }\n      }\n\n      if let Expr::Member(member) = &*assign.right {\n        if assign.op == AssignOp::Assign\n          && match_member_expr(member, vec![\"process\", \"env\"], self.unresolved_mark)\n        {\n          let pat = match &assign.left {\n            // ({x, y, z, ...} = process.env);\n            AssignTarget::Simple(SimpleAssignTarget::Ident(ident)) => {\n              Some(Pat::Ident(ident.clone()))\n            }\n            // foo = process.env;\n            AssignTarget::Pat(AssignTargetPat::Object(obj)) => Some(obj.clone().into()),\n            _ => None,\n          };\n          if let Some(pat) = pat {\n            let mut decls = vec![];\n            self.collect_pat_bindings(&pat, &mut decls);\n\n            let mut exprs: Vec<Box<Expr>> = decls\n              .iter()\n              .map(|decl| {\n                Box::new(Expr::Assign(AssignExpr {\n                  span: DUMMY_SP,\n                  op: AssignOp::Assign,\n                  left: decl.name.clone().try_into().unwrap(),\n                  right: Box::new(if let Some(init) = &decl.init {\n                    *init.clone()\n                  } else {\n                    Expr::Ident(get_undefined_ident(self.unresolved_mark))\n                  }),\n                }))\n              })\n              .collect();\n\n            exprs.push(Box::new(Expr::Object(ObjectLit {\n              span: DUMMY_SP,\n              props: vec![],\n            })));\n\n            *node = Expr::Seq(SeqExpr {\n              span: assign.span,\n              exprs,\n            });\n            return;\n          }\n        }\n      }\n    }\n\n    if self.replace_env {\n      match &node {\n        // e.g. delete process.env.SOMETHING\n        Expr::Unary(UnaryExpr { op: UnaryOp::Delete, arg, span, .. }) |\n        // e.g. process.env.UPDATE++\n        Expr::Update(UpdateExpr { arg, span, .. }) => {\n          if let Expr::Member(MemberExpr { obj, .. }) = &**arg {\n            if let Expr::Member(member) = &**obj {\n              if match_member_expr(member, vec![\"process\", \"env\"], self.unresolved_mark) {\n                self.emit_mutating_error(*span);\n                *node = match &node {\n                  Expr::Unary(_) => Expr::Lit(Lit::Bool(Bool { span: *span, value: true })),\n                  Expr::Update(_) => {\n                    // TODO: This can be written to run in-place to make it more efficient\n                    let mut replacement = *arg.clone();\n                    replacement.visit_mut_with(self);\n                    replacement\n                  }\n                  _ => unreachable!()\n                };\n              }\n            }\n          }\n        },\n        _ => {}\n      }\n    }\n\n    node.visit_mut_children_with(self);\n  }\n\n  fn visit_mut_var_decl(&mut self, node: &mut VarDecl) {\n    if !self.replace_env {\n      node.visit_mut_children_with(self);\n      return;\n    }\n\n    let mut decls = vec![];\n    for decl in &node.decls {\n      if let Some(init) = &decl.init {\n        if let Expr::Member(member) = &**init {\n          if match_member_expr(member, vec![\"process\", \"env\"], self.unresolved_mark) {\n            self.collect_pat_bindings(&decl.name, &mut decls);\n            continue;\n          }\n        }\n      }\n\n      let mut decl = decl.clone();\n      decl.visit_mut_with(self);\n      decls.push(decl);\n    }\n\n    *node = VarDecl {\n      span: node.span,\n      kind: node.kind,\n      decls,\n      declare: node.declare,\n      ctxt: node.ctxt,\n    };\n  }\n}\n\nimpl<'a> EnvReplacer<'a> {\n  /// If an expression matches `process.browser = ...` then the RHS is replaced with\n  /// `true` when `is_browser` is set to true.\n  ///\n  /// This likely doesn't make sense so it should be deprecated in the future.\n  fn replace_browser_assignment(&mut self, node: &Expr) -> Option<Expr> {\n    let Expr::Assign(assign) = node else {\n      return None;\n    };\n    let AssignTarget::Simple(SimpleAssignTarget::Member(member)) = &assign.left else {\n      return None;\n    };\n\n    if !self.is_browser\n      || !match_member_expr(member, vec![\"process\", \"browser\"], self.unresolved_mark)\n    {\n      return None;\n    }\n\n    let mut res = assign.clone();\n    res.right = Box::new(Expr::Lit(Lit::Bool(Bool {\n      value: true,\n      span: DUMMY_SP,\n    })));\n    Some(Expr::Assign(res))\n  }\n\n  fn replace(&mut self, sym: &JsWord, fallback_undefined: bool) -> Option<Expr> {\n    if let Some(val) = self.env.get(sym) {\n      self.used_env.insert(sym.clone());\n      return Some(Expr::Lit(Lit::Str(Str {\n        span: DUMMY_SP,\n        value: val.clone(),\n        raw: None,\n      })));\n    } else if fallback_undefined {\n      match sym as &str {\n        // don't replace process.env.hasOwnProperty with undefined\n        \"hasOwnProperty\"\n        | \"isPrototypeOf\"\n        | \"propertyIsEnumerable\"\n        | \"toLocaleString\"\n        | \"toSource\"\n        | \"toString\"\n        | \"valueOf\" => {}\n        _ => {\n          self.used_env.insert(sym.clone());\n          return Some(Expr::Ident(get_undefined_ident(self.unresolved_mark)));\n        }\n      };\n    }\n    None\n  }\n\n  fn collect_pat_bindings(&mut self, pat: &Pat, decls: &mut Vec<VarDeclarator>) {\n    match pat {\n      Pat::Object(object) => {\n        for prop in &object.props {\n          match prop {\n            ObjectPatProp::KeyValue(kv) => {\n              let key = match &kv.key {\n                PropName::Ident(ident) => Some(ident.sym.clone()),\n                PropName::Str(str) => Some(str.value.clone()),\n                // Non-static. E.g. computed property.\n                _ => None,\n              };\n\n              decls.push(VarDeclarator {\n                span: DUMMY_SP,\n                name: {\n                  // TODO: This can be written to run in-place to make it more efficient\n                  let mut replacement = *kv.value.clone();\n                  replacement.visit_mut_with(self);\n                  replacement\n                },\n                init: if let Some(key) = key {\n                  self.replace(&key, false).map(Box::new)\n                } else {\n                  None\n                },\n                definite: false,\n              });\n            }\n            ObjectPatProp::Assign(assign) => {\n              // let {x} = process.env;\n              // let {x = 2} = process.env;\n              decls.push(VarDeclarator {\n                span: DUMMY_SP,\n                name: Pat::Ident(BindingIdent::from(assign.key.clone())),\n                init: if let Some(init) = self.replace(&assign.key.sym, false) {\n                  Some(Box::new(init))\n                } else {\n                  // TODO: This can be written to run in-place to make it more efficient\n                  let mut replacement = assign.value.clone();\n                  replacement.visit_mut_with(self);\n                  replacement\n                },\n                definite: false,\n              })\n            }\n            ObjectPatProp::Rest(rest) => {\n              if let Pat::Ident(ident) = &*rest.arg {\n                decls.push(VarDeclarator {\n                  span: DUMMY_SP,\n                  name: Pat::Ident(ident.clone()),\n                  init: Some(Box::new(Expr::Object(ObjectLit {\n                    span: DUMMY_SP,\n                    props: vec![],\n                  }))),\n                  definite: false,\n                })\n              }\n            }\n          }\n        }\n      }\n      Pat::Ident(ident) => decls.push(VarDeclarator {\n        span: DUMMY_SP,\n        name: Pat::Ident(ident.clone()),\n        init: Some(Box::new(Expr::Object(ObjectLit {\n          span: DUMMY_SP,\n          props: vec![],\n        }))),\n        definite: false,\n      }),\n      _ => {}\n    }\n  }\n\n  fn emit_mutating_error(&mut self, span: swc_core::common::Span) {\n    self.diagnostics.push(Diagnostic {\n      message: \"Mutating process.env is not supported\".into(),\n      code_highlights: Some(vec![CodeHighlight {\n        message: None,\n        loc: SourceLocation::from(&self.source_map, span),\n      }]),\n      hints: None,\n      show_environment: false,\n      severity: DiagnosticSeverity::SourceError,\n      documentation_url: None,\n    });\n  }\n}\n\n#[cfg(test)]\nmod test {\n  use crate::test_utils::{RunTestContext, RunVisitResult, run_visit};\n\n  use super::*;\n\n  fn make_env_replacer<'a>(\n    run_test_context: RunTestContext,\n    env: &'a HashMap<JsWord, JsWord>,\n    used_env: &'a mut HashSet<JsWord>,\n    diagnostics: &'a mut Vec<Diagnostic>,\n  ) -> EnvReplacer<'a> {\n    EnvReplacer {\n      replace_env: true,\n      is_browser: true,\n      env,\n      used_env,\n      source_map: run_test_context.source_map.clone(),\n      diagnostics,\n      unresolved_mark: run_test_context.unresolved_mark,\n    }\n  }\n\n  #[test]\n  fn test_replacer_disabled() {\n    let env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"process.browser = '1234';\nconsole.log('thing' in process.env);\nconst isTest = process.env.IS_TEST === \"true\";\nconst { package, IS_TEST: isTest2, ...other } = process.env;\n\"#,\n      |run_test_context: RunTestContext| EnvReplacer {\n        replace_env: false,\n        is_browser: true,\n        env: &env,\n        used_env: &mut used_env,\n        source_map: run_test_context.source_map.clone(),\n        diagnostics: &mut diagnostics,\n        unresolved_mark: run_test_context.unresolved_mark,\n      },\n    );\n\n    // transforms the inline value\n    // TODO: This behaviour is wrong, nothing should be changed on this case\n    assert_eq!(\n      output_code,\n      r#\"process.browser = true;\nconsole.log(false);\nconst isTest = process.env.IS_TEST === \"true\";\nconst { package, IS_TEST: isTest2, ...other } = process.env;\n\"#,\n    );\n  }\n\n  // TODO: This behaviour should be removed and will be disabled for canary builds.\n  #[test]\n  fn test_replace_browser_assignments() {\n    let env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nprocess.browser = '1234';\nother = '1234';\nconsole.log(process.browser = false);\nconsole.log(other = false);\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // transforms the inline value\n    assert_eq!(\n      output_code,\n      r#\"process.browser = true;\nother = '1234';\nconsole.log(process.browser = true);\nconsole.log(other = false);\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(used_env, HashSet::new());\n    assert_eq!(diagnostics, vec![]);\n  }\n\n  #[test]\n  fn test_replace_env_assignments() {\n    let env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nprocess.env = {};\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // transforms the inline value\n    assert_eq!(\n      output_code,\n      r#\"process.env = {};\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(used_env, HashSet::new());\n    assert_eq!(diagnostics, vec![]);\n  }\n\n  #[test]\n  fn test_replace_env_member_assignments() {\n    let env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nprocess.env.PROP = 'other';\ndelete process.env.PROP;\nprocess.env.PROP++;\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // transforms the inline value\n    assert_eq!(\n      output_code,\n      r#\"'other';\ntrue;\nundefined;\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(used_env, HashSet::from([\"PROP\".into()]));\n    assert_eq!(diagnostics.len(), 3);\n    assert_eq!(\n      diagnostics[0].message,\n      \"Mutating process.env is not supported\"\n    );\n    assert_eq!(\n      diagnostics[1].message,\n      \"Mutating process.env is not supported\"\n    );\n    assert_eq!(\n      diagnostics[2].message,\n      \"Mutating process.env is not supported\"\n    );\n  }\n\n  #[test]\n  fn test_replace_env_in_expressions() {\n    let mut env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    env.insert(\"foo\".into(), \"foo\".into());\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nconsole.log(foo = process.env);\nconst x = ({ foo, ...others } = process.env);\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // TODO: This seems wrong as there's an extra trailing object\n    assert_eq!(\n      output_code,\n      r#\"console.log(foo = {}, {});\nconst x = (foo = \"foo\", others = {}, {});\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(used_env, HashSet::from([\"foo\".into()]));\n    assert_eq!(diagnostics.len(), 0);\n  }\n\n  #[test]\n  fn test_replace_process_dot_browser() {\n    let env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nconsole.log(process.browser);\nfunction run(enabled = process.browser) {}\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // transforms the inline value\n    assert_eq!(\n      output_code,\n      r#\"console.log(true);\nfunction run(enabled = true) {}\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(used_env, HashSet::new());\n    assert_eq!(diagnostics, vec![]);\n  }\n\n  #[test]\n  fn test_replace_foo_in_process_env() {\n    let mut env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    env.insert(\"thing\".into(), \"here\".into());\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nconsole.log('thing' in process.env);\nconsole.log('other' in process.env);\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // transforms the inline value\n    assert_eq!(\n      output_code,\n      r#\"console.log(true);\nconsole.log(false);\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(used_env, HashSet::from([\"thing\".into(), \"other\".into()]));\n    assert_eq!(diagnostics, vec![]);\n  }\n\n  #[test]\n  fn test_unrelated_code_is_not_affected() {\n    let env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nconst isTest = process.something;\nconst version = process.env.hasOwnProperty('version');\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // transforms the inline value\n    assert_eq!(\n      output_code,\n      r#\"const isTest = process.something;\nconst version = process.env.hasOwnProperty('version');\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(used_env, HashSet::new());\n    assert_eq!(diagnostics, vec![]);\n  }\n\n  #[test]\n  fn test_replace_env_has_the_variable() {\n    let mut env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    env.insert(\"IS_TEST\".into(), \"true\".into());\n    env.insert(\"VERSION\".into(), \"1.2.3\".into());\n    env.insert(\"package\".into(), \"parcel\".into());\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nconst isTest = process.env.IS_TEST === \"true\";\nconst version = process.env['VERSION'];\nconst { package, IS_TEST: isTest2 } = process.env;\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // transforms the inline value\n    assert_eq!(\n      output_code,\n      r#\"const isTest = \"true\" === \"true\";\nconst version = \"1.2.3\";\nconst package = \"parcel\", isTest2 = \"true\";\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(\n      used_env,\n      [\"package\", \"IS_TEST\", \"VERSION\"]\n        .iter()\n        .map(|s| (*s).into())\n        .collect()\n    );\n    assert_eq!(diagnostics, vec![]);\n  }\n\n  #[test]\n  fn test_replace_env_rest_spread() {\n    let mut env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    env.insert(\"package\".into(), \"parcel\".into());\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nconst { package, ...other } = process.env;\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // transforms the inline value\n    assert_eq!(\n      output_code,\n      r#\"const package = \"parcel\", other = {};\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(used_env, [\"package\"].iter().map(|s| (*s).into()).collect());\n    assert_eq!(diagnostics, vec![]);\n  }\n\n  #[test]\n  fn test_assign_env_to_variable() {\n    let mut env: HashMap<JsWord, JsWord> = HashMap::new();\n    let mut used_env = HashSet::new();\n    let mut diagnostics = Vec::new();\n\n    env.insert(\"A\".into(), \"A\".into());\n    env.insert(\"B\".into(), \"B\".into());\n    env.insert(\"C\".into(), \"C\".into());\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nconst env = process.env;\n    \"#,\n      |run_test_context: RunTestContext| {\n        make_env_replacer(run_test_context, &env, &mut used_env, &mut diagnostics)\n      },\n    );\n\n    // transforms the inline value\n    assert_eq!(\n      output_code,\n      r#\"const env = {};\n\"#\n    );\n    // tracks that the variable was used\n    assert_eq!(used_env, HashSet::new());\n    assert_eq!(diagnostics, vec![]);\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/fs.rs",
    "content": "use std::path::{Path, PathBuf};\n\nuse data_encoding::{BASE64, HEXLOWER};\nuse swc_core::{\n  common::{DUMMY_SP, Mark, Span, SyntaxContext},\n  ecma::{\n    ast::*,\n    atoms::Atom as JsWord,\n    utils::stack_size::maybe_grow_default,\n    visit::{Fold, FoldWith, VisitWith},\n  },\n};\n\nuse crate::{\n  collect::{Collect, Import},\n  dependency_collector::{DependencyDescriptor, DependencyFlags, DependencyKind},\n  id,\n  utils::SourceLocation,\n};\n\npub fn inline_fs<'a>(\n  filename: &str,\n  source_map: swc_core::common::sync::Lrc<swc_core::common::SourceMap>,\n  unresolved_mark: Mark,\n  global_mark: Mark,\n  project_root: &'a str,\n  deps: &'a mut Vec<DependencyDescriptor>,\n  is_module: bool,\n) -> impl Fold + 'a {\n  InlineFS {\n    filename: Path::new(filename).to_path_buf(),\n    collect: Collect::new(\n      source_map,\n      unresolved_mark,\n      Mark::fresh(Mark::root()),\n      global_mark,\n      false,\n      is_module,\n    ),\n    project_root,\n    deps,\n  }\n}\n\nstruct InlineFS<'a> {\n  filename: PathBuf,\n  collect: Collect,\n  project_root: &'a str,\n  deps: &'a mut Vec<DependencyDescriptor>,\n}\n\nimpl<'a> Fold for InlineFS<'a> {\n  fn fold_module(&mut self, node: Module) -> Module {\n    node.visit_with(&mut self.collect);\n    node.fold_children_with(self)\n  }\n\n  fn fold_expr(&mut self, node: Expr) -> Expr {\n    if let Expr::Call(call) = &node {\n      if let Callee::Expr(expr) = &call.callee {\n        if let Some((source, specifier)) = self.match_module_reference(expr) {\n          if &source == \"fs\" && &specifier == \"readFileSync\" {\n            if let Some(arg) = call.args.first() {\n              if let Some(res) = self.evaluate_fs_arg(&arg.expr, call.args.get(1), call.span) {\n                return res;\n              }\n            }\n          }\n        }\n      }\n    }\n\n    maybe_grow_default(|| node.fold_children_with(self))\n  }\n}\n\nimpl<'a> InlineFS<'a> {\n  fn match_module_reference(&self, node: &Expr) -> Option<(JsWord, JsWord)> {\n    match node {\n      Expr::Ident(ident) => {\n        if let Some(Import {\n          source, specifier, ..\n        }) = self.collect.imports.get(&id!(ident))\n        {\n          return Some((source.clone(), specifier.clone()));\n        }\n      }\n      Expr::Member(member) => {\n        let prop = match &member.prop {\n          MemberProp::Ident(ident) => ident.sym.clone(),\n          MemberProp::Computed(ComputedPropName { expr, .. }) => {\n            if let Expr::Lit(Lit::Str(str_)) = &**expr {\n              str_.value.clone()\n            } else {\n              return None;\n            }\n          }\n          _ => return None,\n        };\n\n        if let Some(source) = self.collect.match_require(&member.obj) {\n          return Some((source, prop));\n        }\n\n        if let Expr::Ident(ident) = &*member.obj {\n          if let Some(Import {\n            source, specifier, ..\n          }) = self.collect.imports.get(&id!(ident))\n          {\n            if specifier == \"default\" || specifier == \"*\" {\n              return Some((source.clone(), prop));\n            }\n          }\n        }\n      }\n      _ => {}\n    }\n\n    None\n  }\n\n  fn evaluate_fs_arg(\n    &mut self,\n    node: &Expr,\n    encoding: Option<&ExprOrSpread>,\n    span: Span,\n  ) -> Option<Expr> {\n    let mut evaluator = Evaluator { inline: self };\n\n    let res = node.clone().fold_with(&mut evaluator);\n    match res {\n      Expr::Lit(Lit::Str(str_)) => {\n        // Ignore if outside the project root\n        let path = match dunce::canonicalize(Path::new(&str_.value.to_string())) {\n          Ok(path) => path,\n          Err(_err) => return None,\n        };\n        if !path.starts_with(self.project_root) {\n          return None;\n        }\n\n        let encoding = match encoding {\n          Some(e) => match &*e.expr {\n            Expr::Lit(Lit::Str(str_)) => &str_.value,\n            _ => \"buffer\",\n          },\n          None => \"buffer\",\n        };\n\n        // TODO: this should probably happen in JS so we use Parcel's file system\n        // rather than only the real FS. Will need when we convert to WASM.\n        let contents = match encoding {\n          \"base64\" | \"buffer\" => {\n            if let Ok(contents) = std::fs::read(&path) {\n              BASE64.encode(&contents)\n            } else {\n              return None;\n            }\n          }\n          \"hex\" => {\n            if let Ok(contents) = std::fs::read(&path) {\n              HEXLOWER.encode(&contents)\n            } else {\n              return None;\n            }\n          }\n          \"utf8\" | \"utf-8\" => {\n            if let Ok(contents) = std::fs::read_to_string(&path) {\n              contents\n            } else {\n              return None;\n            }\n          }\n          _ => return None,\n        };\n\n        let contents = Expr::Lit(Lit::Str(contents.into()));\n\n        // Add a file dependency so the cache is invalidated when this file changes.\n        self.deps.push(DependencyDescriptor {\n          kind: DependencyKind::File,\n          loc: SourceLocation::from(&self.collect.source_map, span),\n          specifier: path.to_str().unwrap().into(),\n          attributes: None,\n          flags: DependencyFlags::empty(),\n          source_type: None,\n          placeholder: None,\n        });\n\n        // If buffer, wrap in Buffer.from(base64String, 'base64')\n        if encoding == \"buffer\" {\n          Some(Expr::Call(CallExpr {\n            callee: Callee::Expr(Box::new(Expr::Member(MemberExpr {\n              obj: Box::new(Expr::Ident(Ident::new(\n                \"Buffer\".into(),\n                DUMMY_SP,\n                SyntaxContext::empty().apply_mark(self.collect.unresolved_mark),\n              ))),\n              prop: MemberProp::Ident(IdentName::new(\"from\".into(), DUMMY_SP)),\n              span: DUMMY_SP,\n            }))),\n            args: vec![\n              ExprOrSpread {\n                expr: Box::new(contents),\n                spread: None,\n              },\n              ExprOrSpread {\n                expr: Box::new(Expr::Lit(Lit::Str(\"base64\".into()))),\n                spread: None,\n              },\n            ],\n            span: DUMMY_SP,\n            ctxt: SyntaxContext::empty(),\n            type_args: None,\n          }))\n        } else {\n          Some(contents)\n        }\n      }\n      _ => None,\n    }\n  }\n}\n\nstruct Evaluator<'a> {\n  inline: &'a InlineFS<'a>,\n}\n\nimpl<'a> Fold for Evaluator<'a> {\n  fn fold_expr(&mut self, node: Expr) -> Expr {\n    let node = maybe_grow_default(|| node.fold_children_with(self));\n\n    match &node {\n      Expr::Ident(ident) => match ident.sym.to_string().as_str() {\n        \"__dirname\" => Expr::Lit(Lit::Str(\n          self\n            .inline\n            .filename\n            .parent()\n            .unwrap()\n            .to_str()\n            .unwrap()\n            .into(),\n        )),\n        \"__filename\" => Expr::Lit(Lit::Str(self.inline.filename.to_str().unwrap().into())),\n        _ => node,\n      },\n      Expr::Bin(bin) => match bin.op {\n        BinaryOp::Add => {\n          let left = match &*bin.left {\n            Expr::Lit(Lit::Str(str_)) => str_.value.clone(),\n            _ => return node,\n          };\n\n          let right = match &*bin.right {\n            Expr::Lit(Lit::Str(str_)) => str_.value.clone(),\n            _ => return node,\n          };\n\n          Expr::Lit(Lit::Str(format!(\"{}{}\", left, right).into()))\n        }\n        _ => node,\n      },\n      Expr::Call(call) => {\n        let callee = match &call.callee {\n          Callee::Expr(expr) => expr,\n          _ => return node,\n        };\n\n        if let Some((source, specifier)) = self.inline.match_module_reference(callee) {\n          match (source.to_string().as_str(), specifier.to_string().as_str()) {\n            (\"path\", \"join\") => {\n              let mut path = PathBuf::new();\n              for arg in call.args.clone() {\n                let s = match &*arg.expr {\n                  Expr::Lit(Lit::Str(str_)) => str_.value.clone(),\n                  _ => return node,\n                };\n                if path.as_os_str().is_empty() {\n                  path.push(s.to_string());\n                } else {\n                  let s = s.to_string();\n                  let mut p = Path::new(s.as_str());\n\n                  // Node's path.join ignores separators at the start of path components.\n                  // Rust's does not, so we need to strip them.\n                  if let Ok(stripped) = p.strip_prefix(\"/\") {\n                    p = stripped;\n                  }\n                  path.push(p);\n                }\n              }\n\n              return Expr::Lit(Lit::Str(path.to_str().unwrap().into()));\n            }\n            _ => return node,\n          }\n        }\n\n        node\n      }\n      _ => node,\n    }\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/global_replacer.rs",
    "content": "use std::path::Path;\n\nuse indexmap::IndexMap;\nuse path_slash::PathBufExt;\nuse swc_core::{\n  common::{DUMMY_SP, Mark, SourceMap, SyntaxContext, sync::Lrc},\n  ecma::{\n    ast::{self, ComputedPropName, Expr, Module},\n    atoms::Atom as JsWord,\n    visit::{VisitMut, VisitMutWith},\n  },\n};\n\nuse crate::{\n  dependency_collector::{DependencyDescriptor, DependencyFlags, DependencyKind},\n  utils::{SourceLocation, SourceType, create_global_decl_stmt, create_require, is_unresolved},\n};\n\n/// Replaces a few node.js constants with literals or require statements.\n/// This duplicates some logic in [`NodeReplacer`]\n///\n/// (TODO: why is this needed?).\n///\n/// In particular, the following constants are replaced:\n///\n/// * `process` - Replaced with a dependency to a magic 'process' module\n/// * `Buffer` - Replaced with a dependency to a magic 'buffer' module\n/// * `__dirname` and `__filename` - Replaced with the file path\n/// * `global` - Replaced with `arguments[3]`.\n///\n/// Instead of being replaced in-place the identifiers are left in their\n/// location, but a declaration statement is added for the identifier at\n/// the top of the module.\n///\n/// For example if a module contains:\n/// ```skip\n/// function test() {\n///     console.log(process);\n/// }\n/// ```\n///\n/// It should be converted into:\n/// ```skip\n/// const process = require('process');\n/// function test() {\n///     console.log(process);\n/// }\n/// ```\npub struct GlobalReplacer<'a> {\n  pub source_map: Lrc<SourceMap>,\n  /// Require statements that are inserted into the file will be added to this list.\n  pub items: &'a mut Vec<DependencyDescriptor>,\n  pub global_mark: Mark,\n  /// Internal structure for inserted global statements.\n  pub globals: IndexMap<JsWord, (SyntaxContext, ast::Stmt)>,\n  pub project_root: &'a Path,\n  pub filename: &'a Path,\n  pub unresolved_mark: Mark,\n  pub scope_hoist: bool,\n}\n\nimpl VisitMut for GlobalReplacer<'_> {\n  fn visit_mut_expr(&mut self, node: &mut Expr) {\n    use ast::{Expr::*, MemberExpr, MemberProp};\n\n    let Ident(id) = node else {\n      node.visit_mut_children_with(self);\n      return;\n    };\n\n    // Only handle global variables\n    if !is_unresolved(&id, self.unresolved_mark) {\n      return;\n    }\n\n    let unresolved_mark = self.unresolved_mark;\n    match id.sym.to_string().as_str() {\n      \"process\" => {\n        if self.update_binding(id, |_| {\n          Call(create_require(\"process\".into(), unresolved_mark))\n        }) {\n          let specifier = id.sym.clone();\n          self.items.push(DependencyDescriptor {\n            kind: DependencyKind::Require,\n            loc: SourceLocation::from(&self.source_map, id.span),\n            specifier,\n            attributes: None,\n            flags: DependencyFlags::empty(),\n            source_type: Some(SourceType::Module),\n            placeholder: None,\n          });\n        }\n      }\n      \"Buffer\" => {\n        let specifier = JsWord::from(\"buffer\");\n        if self.update_binding(id, |_| {\n          Member(MemberExpr {\n            obj: Box::new(Call(create_require(specifier.clone(), unresolved_mark))),\n            prop: MemberProp::Ident(ast::IdentName::new(\"Buffer\".into(), DUMMY_SP)),\n            span: DUMMY_SP,\n          })\n        }) {\n          self.items.push(DependencyDescriptor {\n            kind: DependencyKind::Require,\n            loc: SourceLocation::from(&self.source_map, id.span),\n            specifier,\n            attributes: None,\n            flags: DependencyFlags::empty(),\n            source_type: Some(SourceType::Module),\n            placeholder: None,\n          });\n        }\n      }\n      \"__filename\" => {\n        self.update_binding(id, |this| {\n          let filename =\n            if let Some(relative) = pathdiff::diff_paths(this.filename, this.project_root) {\n              relative.to_slash_lossy()\n            } else if let Some(filename) = this.filename.file_name() {\n              format!(\"/{}\", filename.to_string_lossy())\n            } else {\n              String::from(\"/unknown.js\")\n            };\n\n          Lit(ast::Lit::Str(JsWord::from(filename).into()))\n        });\n      }\n      \"__dirname\" => {\n        self.update_binding(id, |this| {\n          let dirname = if let Some(dirname) = this.filename.parent() {\n            if let Some(relative) = pathdiff::diff_paths(dirname, this.project_root) {\n              relative.to_slash_lossy()\n            } else {\n              String::from(\"/\")\n            }\n          } else {\n            String::from(\"/\")\n          };\n          Lit(ast::Lit::Str(JsWord::from(dirname).into()))\n        });\n      }\n      \"global\" => {\n        if !self.scope_hoist {\n          self.update_binding(id, |_| {\n            Member(MemberExpr {\n              obj: Box::new(Ident(ast::Ident::new_no_ctxt(\"arguments\".into(), DUMMY_SP))),\n              prop: MemberProp::Computed(ComputedPropName {\n                span: DUMMY_SP,\n                expr: Box::new(Lit(ast::Lit::Num(3.into()))),\n              }),\n              span: DUMMY_SP,\n            })\n          });\n        }\n      }\n      _ => {}\n    }\n  }\n\n  fn visit_mut_module(&mut self, node: &mut Module) {\n    node.visit_mut_children_with(self);\n    node.body.splice(\n      0..0,\n      self\n        .globals\n        .drain(..)\n        .map(|(_, (_, stmt))| ast::ModuleItem::Stmt(stmt)),\n    );\n  }\n}\n\nimpl GlobalReplacer<'_> {\n  fn update_binding<F>(&mut self, id: &mut ast::Ident, expr: F) -> bool\n  where\n    F: FnOnce(&Self) -> Expr,\n  {\n    if let Some((syntax_context, _)) = self.globals.get(&id.sym) {\n      id.ctxt = *syntax_context;\n      false\n    } else {\n      let (decl, syntax_context) =\n        create_global_decl_stmt(id.sym.clone(), expr(self), self.global_mark);\n\n      id.ctxt = syntax_context;\n\n      self.globals.insert(id.sym.clone(), (syntax_context, decl));\n\n      true\n    }\n  }\n}\n\n#[cfg(test)]\nmod test {\n  use std::path::Path;\n\n  use swc_core::ecma::atoms::Atom as JsWord;\n\n  use crate::{\n    DependencyDescriptor, DependencyKind,\n    global_replacer::GlobalReplacer,\n    test_utils::{RunTestContext, RunVisitResult, run_visit},\n  };\n\n  fn make_global_replacer(\n    run_test_context: RunTestContext,\n    items: &mut Vec<DependencyDescriptor>,\n  ) -> GlobalReplacer {\n    GlobalReplacer {\n      source_map: run_test_context.source_map.clone(),\n      items,\n      global_mark: run_test_context.global_mark.clone(),\n      globals: Default::default(),\n      project_root: Path::new(\"project-root\"),\n      filename: Path::new(\"filename\"),\n      unresolved_mark: run_test_context.unresolved_mark.clone(),\n      scope_hoist: false,\n    }\n  }\n\n  #[test]\n  fn test_globals_visitor_with_require_process() {\n    let mut items = vec![];\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nconsole.log(process.test);\n    \"#,\n      |run_test_context: RunTestContext| make_global_replacer(run_test_context, &mut items),\n    );\n    assert_eq!(\n      output_code,\n      r#\"var process = require(\"process\");\nconsole.log(process.test);\n\"#\n    );\n    assert_eq!(items.len(), 1);\n    assert_eq!(items[0].kind, DependencyKind::Require);\n    assert_eq!(items[0].specifier, JsWord::from(\"process\"));\n  }\n\n  #[test]\n  fn test_transforms_computed_property() {\n    let mut items = vec![];\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nobject[process.test];\nobject[__dirname];\n    \"#,\n      |run_test_context: RunTestContext| make_global_replacer(run_test_context, &mut items),\n    );\n    assert_eq!(\n      output_code,\n      r#\"var process = require(\"process\");\nvar __dirname = \"..\";\nobject[process.test];\nobject[__dirname];\n\"#\n    );\n  }\n\n  #[test]\n  fn test_does_not_transform_member_property() {\n    let mut items = vec![];\n\n    let RunVisitResult { output_code, .. } = run_visit(\n      r#\"\nobject.process.test;\nobject.__filename;\n    \"#,\n      |run_test_context: RunTestContext| make_global_replacer(run_test_context, &mut items),\n    );\n    assert_eq!(\n      output_code,\n      r#\"object.process.test;\nobject.__filename;\n\"#\n    );\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/hoist.rs",
    "content": "use std::{\n  collections::{HashMap, HashSet, hash_map::DefaultHasher},\n  hash::Hasher,\n};\n\nuse indexmap::IndexMap;\nuse serde::{Deserialize, Serialize};\nuse swc_core::{\n  common::{DUMMY_SP, Mark, Span, SyntaxContext},\n  ecma::{\n    ast::*,\n    atoms::Atom as JsWord,\n    utils::stack_size::maybe_grow_default,\n    visit::{Fold, FoldWith},\n  },\n};\n\nuse crate::{\n  collect::{Collect, Export, Import, ImportKind},\n  id,\n  utils::{\n    CodeHighlight, Diagnostic, DiagnosticSeverity, SourceLocation, get_undefined_ident,\n    is_unresolved, match_export_name, match_export_name_ident, match_import, match_member_expr,\n    match_property_name, match_require,\n  },\n};\n\nmacro_rules! hash {\n  ($str:expr) => {{\n    let mut hasher = DefaultHasher::new();\n    hasher.write($str.as_bytes());\n    hasher.finish()\n  }};\n}\n\npub fn hoist(\n  module: Module,\n  module_id: &str,\n  unresolved_mark: Mark,\n  collect: &Collect,\n) -> Result<(Module, HoistResult, Vec<Diagnostic>), Vec<Diagnostic>> {\n  let mut hoist = Hoist::new(module_id, unresolved_mark, collect);\n  let module = module.fold_with(&mut hoist);\n\n  if !hoist.diagnostics.is_empty() {\n    return Err(hoist.diagnostics);\n  }\n\n  let diagnostics = std::mem::take(&mut hoist.diagnostics);\n  Ok((module, hoist.get_result(), diagnostics))\n}\n\n/// An exported identifier with its original name and new mangled name.\n///\n/// When a file exports a symbol, parcel will rewrite it as a mangled\n/// export identifier.\n#[derive(Debug, Serialize, Deserialize)]\npub struct ExportedSymbol {\n  /// The mangled name the transformer has generated and replaced the variable\n  /// uses with\n  pub local: JsWord,\n  /// The original source name that was exported\n  pub exported: JsWord,\n  /// The location of this export\n  pub loc: SourceLocation,\n  pub is_esm: bool,\n}\n\n/// An imported identifier with its rename and original name\n///\n/// For example, if an ESM module import is seen:\n///\n/// ```skip\n/// import { something } from './dependency-source';\n/// ```\n///\n/// The transformer will replace this import statement with a mangled identififer.\n///\n/// * `source` will be `'./dependency-source'`\n/// * `imported` will be `something`\n/// * `local` will usually be a mangled name the transformer has generated and replaced the\n///   call-site with - except for re-exports, in which case it's just the rename\n/// * `loc` will be this source-code location\n///\n/// See [`HoistResult::imported_symbols`] and [`HoistResult::re_exports`].\n#[derive(Debug, Serialize, Deserialize)]\npub struct ImportedSymbol {\n  /// The specifier for a certain dependency this symbol comes from\n  pub source: JsWord,\n  /// The (usually mangled) local name for a certain imported symbol\n  ///\n  /// On re-exports, this is rather the rename for the import. See `HoistResult::re_exports`.\n  pub local: JsWord,\n  /// The original name for a certain imported symbol\n  pub imported: JsWord,\n  /// A location in the import site\n  pub loc: SourceLocation,\n  /// The type of import this symbol is coming from\n  kind: ImportKind,\n}\n\n/// See [`HoistResult`] for field documentation.\nstruct Hoist<'a> {\n  module_id: &'a str,\n  collect: &'a Collect,\n  module_items: Vec<ModuleItem>,\n  export_decls: HashSet<JsWord>,\n  hoisted_imports: IndexMap<JsWord, ModuleItem>,\n  /// See [`HoistResult::imported_symbols`]\n  imported_symbols: Vec<ImportedSymbol>,\n  /// See [`HoistResult::exported_symbols`]\n  exported_symbols: Vec<ExportedSymbol>,\n  re_exports: Vec<ImportedSymbol>,\n  /// See [`HoistResult::self_references`]\n  self_references: HashSet<JsWord>,\n  /// See [`HoistResult::dynamic_imports`]\n  dynamic_imports: HashMap<JsWord, JsWord>,\n  in_function_scope: bool,\n  diagnostics: Vec<Diagnostic>,\n  unresolved_mark: Mark,\n}\n\n/// Data pertaining to mangled identifiers replacing import and export statements\n/// on transformed files.\n#[derive(Debug, Default, Serialize, Deserialize)]\n#[non_exhaustive]\npub struct HoistResult {\n  /// A vector of the symbols imported from other files.\n  ///\n  /// For example, if a source file is:\n  ///\n  /// ```skip\n  /// import { value as v1 } from './dependency-1';\n  /// import { value as v2 } from './dependency-2';\n  ///\n  /// function main() {\n  ///     console.log(v1);\n  ///     console.log(v2);\n  /// }\n  /// ```\n  ///\n  /// The transformer will replace all usages of `v1` and `v2` with a mangled generated name.\n  /// For example, the output will look like:\n  ///\n  /// ```skip\n  /// import './dependency-1';\n  /// import './dependency-2';\n  ///\n  /// function main() {\n  ///     console.log((0, $abc$import$hashfashdfashdfahsdfh_v1));\n  ///     console.log((0, $abc$import$hashfashdfashdfahsdfh_v2));\n  /// }\n  /// ```\n  ///\n  ///\n  /// This `imported_symbols` vector will be:\n  ///\n  /// ```skip\n  /// vec![\n  ///     ImportedSymbol {\n  ///         source: \"dependency-1\",\n  ///         local: \"$abc$import$hashfashdfashdfahsdfh_v1\",\n  ///         imported: \"value\",\n  ///         ...\n  ///     },\n  ///     ImportedSymbol {\n  ///         source: \"dependency-2\",\n  ///         local: \"$abc$import$hashfashdfashdfahsdfh_v2\",\n  ///         imported: \"value\",\n  ///         ...\n  ///     },\n  /// ]\n  /// ```\n  ///\n  /// `local` will be the manged name of the variables.\n  pub imported_symbols: Vec<ImportedSymbol>,\n  /// A vector of the symbols exported from this file, along with their mangled replacement\n  /// identifiers.\n  ///\n  /// For example, if a source file is:\n  ///\n  /// ```skip\n  /// export const x = 1234;\n  /// export function something() {}\n  /// ```\n  ///\n  /// The transformer will replace all usages of `x` and `something` with a mangled generated name.\n  /// For example, the output will look like:\n  ///\n  /// ```skip\n  /// const $abc$export$hashfashdfasdfahsdfh_x = 1234;\n  /// function $abc$export$hashfashdfasdfahsdfh_something() {}\n  /// ```\n  ///\n  ///\n  /// This `exported_symbols` vector will be:\n  ///\n  /// ```skip\n  /// vec![\n  ///     ExportedSymbol {\n  ///         exported: \"x\",\n  ///         local: \"$abc$export$hashfashdfashdfahsdfh_x\",\n  ///         ...\n  ///     },\n  ///     ExportedSymbol {\n  ///         exported: \"something\",\n  ///         local: \"$abc$export$hashfashdfashdfahsdfh_something\",\n  ///         ...\n  ///     },\n  /// ]\n  /// ```\n  pub exported_symbols: Vec<ExportedSymbol>,\n  /// Symbols re-exported from other modules.\n  ///\n  /// If a symbol is re-exported from another module, parcel will remove the export statement\n  /// from the asset.\n  ///\n  /// For example, if an input file is:\n  ///\n  /// ```skip\n  /// export { view as mainView } from './view';\n  /// ```\n  ///\n  /// The output will be\n  /// ```skip\n  /// import 'abc:./view:esm';\n  /// ```\n  ///\n  /// And this vector will contain the information about the re-exported symbol.\n  ///\n  /// On this case, the fields of `ImportedSymbol` will mean different things than they do for\n  /// [`HoistResult::imported_symbols`].\n  ///\n  /// In particular, since there is no mangled name, `local` means the \"exported\" name rather than\n  /// the mangled name.\n  ///\n  /// On the case above, this field would be:\n  ///\n  /// ```skip\n  /// vec![\n  ///     ImportedSymbol {\n  ///         source: \"./view\",\n  ///         local: \"mainView\",\n  ///         imported: \"view\",\n  ///         ...\n  ///     },\n  /// ]\n  /// ```\n  ///\n  /// On the case the export statement is an export star:\n  /// ```skip\n  /// export * from './something';\n  /// ```\n  ///\n  /// Then this array will have both `imported` and `local` set to a magic \"*\" value.\n  pub re_exports: Vec<ImportedSymbol>,\n  /// A vector of the 'original local' names of exported symbols that are self-referenced within the\n  /// file they are being exported from.\n  ///\n  /// For example, if a file is:\n  /// ```skip\n  /// exports.foo = 10;\n  /// exports.something = function() {\n  ///     return exports.foo;\n  /// }\n  /// ```\n  ///\n  /// `self_references` will contain the `foo` symbol, un-mangled. Note the output will be mangled:\n  /// ```skip\n  /// var $abc$export$6a5cdcad01c973fa;\n  /// var $abc$export$ce14ccb78c97a7d4;\n  /// $abc$export$6a5cdcad01c973fa = 10;\n  /// $abc$export$ce14ccb78c97a7d4 = function() {\n  ///     return $abc$export$6a5cdcad01c973fa;\n  /// };\n  /// ```\n  pub self_references: HashSet<JsWord>,\n  /// When require statements are used programmatically, their sources will be collected here.\n  ///\n  /// These would be the module names of dynamically imported or required modules.\n  ///\n  /// TODO: add example\n  pub wrapped_requires: HashSet<String>,\n  /// A map of async import placeholder variable names to source specifiers.\n  ///\n  /// When a dynamic import expression is found in the input file (`import('dependency')`), it is\n  /// replaced with a generated identifier.\n  ///\n  /// This output field contains a map of the generated placeholder variable to the dependency\n  /// specifier (`'dependency'`).\n  ///\n  /// For example, if the source file is\n  ///\n  /// ```skip\n  /// async function run() {\n  ///     const viewModule = await import('./view');\n  ///     viewModule.render();\n  /// }\n  /// ```\n  ///\n  /// And the `module_id` of this file is `\"moduleId\"`, then the transformer will replace this dynamic\n  /// import (assume `12345` is a hash of the `'view'` value):\n  ///\n  /// ```skip\n  /// async function run() {\n  ///     const viewModule = await $moduleId$importAsync$12345;\n  ///     viewModule.render();\n  /// }\n  /// ```\n  ///\n  /// The `dynamic_imports` field will then be:\n  ///\n  /// ```skip\n  /// {\n  ///     \"$moduleId$importAsync$12345\": \"./view\"\n  /// }\n  /// ```\n  ///\n  /// In other words, the keys are the generated identifier names, inserted by the transformer and\n  /// the values, the specifiers on the original source code.\n  pub dynamic_imports: HashMap<JsWord, JsWord>,\n  pub static_cjs_exports: bool,\n  pub has_cjs_exports: bool,\n  pub is_esm: bool,\n  pub should_wrap: bool,\n}\n\nimpl<'a> Hoist<'a> {\n  fn new(module_id: &'a str, unresolved_mark: Mark, collect: &'a Collect) -> Self {\n    Hoist {\n      module_id,\n      collect,\n      module_items: vec![],\n      export_decls: HashSet::new(),\n      hoisted_imports: IndexMap::new(),\n      imported_symbols: vec![],\n      exported_symbols: vec![],\n      re_exports: vec![],\n      self_references: HashSet::new(),\n      dynamic_imports: HashMap::new(),\n      in_function_scope: false,\n      diagnostics: vec![],\n      unresolved_mark,\n    }\n  }\n\n  fn get_result(self) -> HoistResult {\n    HoistResult {\n      imported_symbols: self.imported_symbols,\n      exported_symbols: self.exported_symbols,\n      re_exports: self.re_exports,\n      self_references: self.self_references,\n      dynamic_imports: self.dynamic_imports,\n      wrapped_requires: self.collect.wrapped_requires.clone(),\n      static_cjs_exports: self.collect.static_cjs_exports,\n      has_cjs_exports: self.collect.has_cjs_exports,\n      is_esm: self.collect.is_esm,\n      should_wrap: self.collect.should_wrap,\n    }\n  }\n}\n\nmacro_rules! hoist_visit_fn {\n  ($name:ident, $type:ident) => {\n    fn $name(&mut self, node: $type) -> $type {\n      let in_function_scope = self.in_function_scope;\n      self.in_function_scope = true;\n      let res = node.fold_children_with(self);\n      self.in_function_scope = in_function_scope;\n      res\n    }\n  };\n}\n\nimpl<'a> Fold for Hoist<'a> {\n  fn fold_module(&mut self, node: Module) -> Module {\n    let mut node = node;\n    for item in node.body {\n      match item {\n        ModuleItem::ModuleDecl(decl) => {\n          match decl {\n            ModuleDecl::Import(import) => {\n              self.hoisted_imports.insert(\n                import.src.value.clone(),\n                ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {\n                  specifiers: vec![],\n                  with: None,\n                  span: DUMMY_SP,\n                  src: Box::new(\n                    format!(\"{}:{}:{}\", self.module_id, import.src.value, \"esm\").into(),\n                  ),\n                  type_only: false,\n                  phase: Default::default(),\n                })),\n              );\n              // Ensure that all import specifiers are constant.\n              for specifier in &import.specifiers {\n                let local = match specifier {\n                  ImportSpecifier::Named(named) => &named.local,\n                  ImportSpecifier::Default(default) => &default.local,\n                  ImportSpecifier::Namespace(ns) => &ns.local,\n                };\n\n                if let Some(spans) = self.collect.non_const_bindings.get(&id!(local)) {\n                  let mut highlights: Vec<CodeHighlight> = spans\n                    .iter()\n                    .map(|span| CodeHighlight {\n                      loc: SourceLocation::from(&self.collect.source_map, *span),\n                      message: None,\n                    })\n                    .collect();\n\n                  highlights.push(CodeHighlight {\n                    loc: SourceLocation::from(&self.collect.source_map, local.span),\n                    message: Some(\"Originally imported here\".into()),\n                  });\n\n                  self.diagnostics.push(Diagnostic {\n                    message: \"Assignment to an import specifier is not allowed\".into(),\n                    code_highlights: Some(highlights),\n                    hints: None,\n                    show_environment: false,\n                    severity: DiagnosticSeverity::Error,\n                    documentation_url: None,\n                  })\n                }\n              }\n            }\n            ModuleDecl::ExportNamed(export) => {\n              if let Some(src) = export.src {\n                self.hoisted_imports.insert(\n                  src.value.clone(),\n                  ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {\n                    specifiers: vec![],\n                    with: None,\n                    span: DUMMY_SP,\n                    src: Box::new(Str {\n                      value: format!(\"{}:{}:{}\", self.module_id, src.value, \"esm\").into(),\n                      span: DUMMY_SP,\n                      raw: None,\n                    }),\n                    type_only: false,\n                    phase: Default::default(),\n                  })),\n                );\n\n                for specifier in export.specifiers {\n                  match specifier {\n                    ExportSpecifier::Named(named) => {\n                      let exported = match named.exported {\n                        Some(exported) => match_export_name(&exported).0,\n                        None => match_export_name(&named.orig).0.clone(),\n                      };\n                      self.re_exports.push(ImportedSymbol {\n                        source: src.value.clone(),\n                        local: exported,\n                        imported: match_export_name(&named.orig).0,\n                        loc: SourceLocation::from(&self.collect.source_map, named.span),\n                        kind: ImportKind::Import,\n                      });\n                    }\n                    ExportSpecifier::Default(default) => {\n                      self.re_exports.push(ImportedSymbol {\n                        source: src.value.clone(),\n                        local: default.exported.sym,\n                        imported: \"default\".into(),\n                        loc: SourceLocation::from(&self.collect.source_map, default.exported.span),\n                        kind: ImportKind::Import,\n                      });\n                    }\n                    ExportSpecifier::Namespace(namespace) => {\n                      self.re_exports.push(ImportedSymbol {\n                        source: src.value.clone(),\n                        local: match_export_name(&namespace.name).0,\n                        imported: \"*\".into(),\n                        loc: SourceLocation::from(&self.collect.source_map, namespace.span),\n                        kind: ImportKind::Import,\n                      });\n                    }\n                  }\n                }\n              } else {\n                for specifier in export.specifiers {\n                  if let ExportSpecifier::Named(named) = specifier {\n                    let id = id!(match_export_name_ident(&named.orig));\n                    let exported = match named.exported {\n                      Some(exported) => match_export_name(&exported).0,\n                      None => match_export_name(&named.orig).0,\n                    };\n                    if let Some(Import {\n                      source,\n                      specifier,\n                      kind,\n                      ..\n                    }) = self.collect.imports.get(&id)\n                    {\n                      self.re_exports.push(ImportedSymbol {\n                        source: source.clone(),\n                        local: exported,\n                        imported: specifier.clone(),\n                        loc: SourceLocation::from(&self.collect.source_map, named.span),\n                        kind: *kind,\n                      });\n                    } else {\n                      // A variable will appear only once in the `exports` mapping but\n                      // could be exported multiple times with different names.\n                      // Find the original exported name, and remap.\n                      let id = if self.collect.should_wrap {\n                        id.0\n                      } else {\n                        self\n                          .get_export_ident(DUMMY_SP, self.collect.exports_locals.get(&id).unwrap())\n                          .sym\n                      };\n                      self.exported_symbols.push(ExportedSymbol {\n                        local: id,\n                        exported,\n                        loc: SourceLocation::from(&self.collect.source_map, named.span),\n                        is_esm: true,\n                      });\n                    }\n                  }\n                }\n              }\n            }\n            ModuleDecl::ExportAll(export) => {\n              self.hoisted_imports.insert(\n                export.src.value.clone(),\n                ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {\n                  specifiers: vec![],\n                  with: None,\n                  span: DUMMY_SP,\n                  src: Box::new(\n                    format!(\"{}:{}:{}\", self.module_id, export.src.value, \"esm\").into(),\n                  ),\n                  type_only: false,\n                  phase: Default::default(),\n                })),\n              );\n              self.re_exports.push(ImportedSymbol {\n                source: export.src.value,\n                local: \"*\".into(),\n                imported: \"*\".into(),\n                loc: SourceLocation::from(&self.collect.source_map, export.span),\n                kind: ImportKind::Import,\n              });\n            }\n            ModuleDecl::ExportDefaultExpr(export) => {\n              let ident = self.get_export_ident(export.span, &\"default\".into());\n              let init = export.expr.fold_with(self);\n              self\n                .module_items\n                .push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl {\n                  declare: false,\n                  kind: VarDeclKind::Var,\n                  span: DUMMY_SP,\n                  ctxt: SyntaxContext::empty(),\n                  decls: vec![VarDeclarator {\n                    definite: false,\n                    span: DUMMY_SP,\n                    name: Pat::Ident(BindingIdent::from(ident)),\n                    init: Some(init),\n                  }],\n                })))));\n            }\n            ModuleDecl::ExportDefaultDecl(export) => {\n              let decl = match export.decl {\n                DefaultDecl::Class(class) => Decl::Class(ClassDecl {\n                  ident: if self.collect.should_wrap && class.ident.is_some() {\n                    class.ident.unwrap()\n                  } else {\n                    self.get_export_ident(DUMMY_SP, &\"default\".into())\n                  },\n                  declare: false,\n                  class: class.class.fold_with(self),\n                }),\n                DefaultDecl::Fn(func) => Decl::Fn(FnDecl {\n                  ident: if self.collect.should_wrap && func.ident.is_some() {\n                    func.ident.unwrap()\n                  } else {\n                    self.get_export_ident(DUMMY_SP, &\"default\".into())\n                  },\n                  declare: false,\n                  function: func.function.fold_with(self),\n                }),\n                _ => {\n                  unreachable!(\"unsupported export default declaration\");\n                }\n              };\n\n              self.module_items.push(ModuleItem::Stmt(Stmt::Decl(decl)));\n            }\n            ModuleDecl::ExportDecl(export) => {\n              let d = export.decl.fold_with(self);\n              self.module_items.push(ModuleItem::Stmt(Stmt::Decl(d)));\n            }\n            item => {\n              let d = item.fold_with(self);\n              self.module_items.push(ModuleItem::ModuleDecl(d))\n            }\n          }\n        }\n        ModuleItem::Stmt(stmt) => {\n          match stmt {\n            Stmt::Decl(decl) => {\n              match decl {\n                Decl::Var(var) => {\n                  let mut decls = vec![];\n                  for v in &var.decls {\n                    if let Some(init) = &v.init {\n                      // Match var x = require('foo');\n                      if let Some(source) =\n                        match_require(init, self.unresolved_mark, self.collect.ignore_mark)\n                      {\n                        // If the require is accessed in a way we cannot analyze, do not replace.\n                        // e.g. const {x: {y: z}} = require('x');\n                        // The require will be handled in the expression handler, below.\n                        if !self.collect.non_static_requires.contains(&source) {\n                          // If this is not the first declarator in the variable declaration, we need to\n                          // split the declaration into multiple to preserve side effect ordering.\n                          // var x = sideEffect(), y = require('foo'), z = 2;\n                          //   -> var x = sideEffect(); import 'foo'; var y = $id$import$foo, z = 2;\n                          if !decls.is_empty() {\n                            let var = VarDecl {\n                              span: var.span,\n                              ctxt: var.ctxt,\n                              kind: var.kind,\n                              declare: var.declare,\n                              decls: std::mem::take(&mut decls),\n                            };\n                            self\n                              .module_items\n                              .push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(var)))));\n                          }\n\n                          self\n                            .module_items\n                            .push(ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {\n                              specifiers: vec![],\n                              with: None,\n                              span: DUMMY_SP,\n                              src: Box::new(Str {\n                                value: format!(\"{}:{}\", self.module_id, source).into(),\n                                span: DUMMY_SP,\n                                raw: None,\n                              }),\n                              type_only: false,\n                              phase: Default::default(),\n                            })));\n\n                          // Create variable assignments for any declarations that are not constant.\n                          self.handle_non_const_require(v, &source);\n                          continue;\n                        }\n                      }\n\n                      if let Expr::Member(member) = &**init {\n                        // Match var x = require('foo').bar;\n                        if let Some(source) =\n                          match_require(&member.obj, self.unresolved_mark, self.collect.ignore_mark)\n                        {\n                          if !self.collect.non_static_requires.contains(&source) {\n                            // If this is not the first declarator in the variable declaration, we need to\n                            // split the declaration into multiple to preserve side effect ordering.\n                            // var x = sideEffect(), y = require('foo').bar, z = 2;\n                            //   -> var x = sideEffect(); import 'foo'; var y = $id$import$foo$bar, z = 2;\n                            if !decls.is_empty() {\n                              let var = VarDecl {\n                                span: var.span,\n                                ctxt: var.ctxt,\n                                kind: var.kind,\n                                declare: var.declare,\n                                decls: std::mem::take(&mut decls),\n                              };\n                              self\n                                .module_items\n                                .push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(var)))));\n                            }\n                            self\n                              .module_items\n                              .push(ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {\n                                specifiers: vec![],\n                                with: None,\n                                span: DUMMY_SP,\n                                src: Box::new(Str {\n                                  value: format!(\"{}:{}\", self.module_id, source,).into(),\n                                  span: DUMMY_SP,\n                                  raw: None,\n                                }),\n                                type_only: false,\n                                phase: Default::default(),\n                              })));\n\n                            self.handle_non_const_require(v, &source);\n                            continue;\n                          }\n                        }\n                      }\n                    }\n\n                    // Otherwise, fold the variable initializer. If requires were found\n                    // in the expression, they will be hoisted into module_items. If the\n                    // length increases, then we need to split the variable declaration\n                    // into multiple to preserve side effect ordering.\n                    // var x = 2, y = doSomething(require('foo')), z = 3;\n                    //   -> var x = 2; import 'foo'; var y = doSomething($id$import$foo), z = 3;\n                    let items_len = self.module_items.len();\n                    let d = v.clone().fold_with(self);\n                    if self.module_items.len() > items_len && !decls.is_empty() {\n                      let var = VarDecl {\n                        span: var.span,\n                        ctxt: var.ctxt,\n                        kind: var.kind,\n                        declare: var.declare,\n                        decls: std::mem::take(&mut decls),\n                      };\n                      self.module_items.insert(\n                        items_len,\n                        ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(var)))),\n                      );\n                    }\n                    decls.push(d);\n                  }\n\n                  // Push whatever declarators are left.\n                  if !decls.is_empty() {\n                    let var = VarDecl {\n                      span: var.span,\n                      ctxt: var.ctxt,\n                      kind: var.kind,\n                      declare: var.declare,\n                      decls,\n                    };\n                    self\n                      .module_items\n                      .push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(var)))))\n                  }\n                }\n                item => {\n                  let d = item.fold_with(self);\n                  self.module_items.push(ModuleItem::Stmt(Stmt::Decl(d)))\n                }\n              }\n            }\n            Stmt::Expr(ExprStmt { expr, span }) => {\n              if let Some(source) =\n                match_require(&expr, self.unresolved_mark, self.collect.ignore_mark)\n              {\n                // Require in statement position (`require('other');`) should behave just\n                // like `import 'other';` in that it doesn't add any symbols (not even '*').\n                self.add_require(&source, ImportKind::Require);\n              } else {\n                let d = expr.fold_with(self);\n                self\n                  .module_items\n                  .push(ModuleItem::Stmt(Stmt::Expr(ExprStmt { expr: d, span })))\n              }\n            }\n            item => {\n              let d = item.fold_with(self);\n              self.module_items.push(ModuleItem::Stmt(d))\n            }\n          }\n        }\n      }\n    }\n\n    self.module_items.splice(\n      0..0,\n      std::mem::take(&mut self.hoisted_imports).into_values(),\n    );\n    node.body = std::mem::take(&mut self.module_items);\n    node\n  }\n\n  hoist_visit_fn!(fold_function, Function);\n  hoist_visit_fn!(fold_class, Class);\n  hoist_visit_fn!(fold_getter_prop, GetterProp);\n  hoist_visit_fn!(fold_setter_prop, SetterProp);\n\n  fn fold_expr(&mut self, node: Expr) -> Expr {\n    match node {\n      Expr::OptChain(opt) => {\n        return Expr::OptChain(OptChainExpr {\n          span: opt.span,\n          optional: opt.optional,\n          base: Box::new(match *opt.base {\n            OptChainBase::Call(call) => OptChainBase::Call(call.fold_with(self)),\n            OptChainBase::Member(member) => {\n              if match_property_name(&member).is_some() {\n                OptChainBase::Member(MemberExpr {\n                  span: member.span,\n                  obj: member.obj.fold_with(self),\n                  // Don't visit member.prop so we avoid the ident visitor.\n                  prop: member.prop,\n                })\n              } else {\n                OptChainBase::Member(member.fold_children_with(self))\n              }\n            }\n          }),\n        });\n      }\n      Expr::Member(member) => {\n        if !self.collect.should_wrap {\n          if match_member_expr(&member, vec![\"module\", \"exports\"], self.unresolved_mark) {\n            self.self_references.insert(\"*\".into());\n            return Expr::Ident(self.get_export_ident(member.span, &\"*\".into()));\n          }\n\n          if match_member_expr(&member, vec![\"module\", \"hot\"], self.unresolved_mark) {\n            return Expr::Lit(Lit::Null(Null { span: member.span }));\n          }\n        }\n\n        let key = match match_property_name(&member) {\n          Some(v) => v.0,\n          _ => return Expr::Member(member.fold_children_with(self)),\n        };\n\n        match &*member.obj {\n          Expr::Ident(ident) => {\n            // import * as y from 'x'; OR const y = require('x'); OR const y = await import('x');\n            // y.foo -> $id$import$d141bba7fdc215a3$y\n            if let Some(Import {\n              source,\n              specifier,\n              kind,\n              ..\n            }) = self.collect.imports.get(&id!(ident))\n            {\n              // If there are any non-static accesses of the namespace, don't perform any replacement.\n              // This will be handled in the Ident visitor below, which replaces y -> $id$import$d141bba7fdc215a3.\n              if specifier == \"*\"\n                && !self.collect.non_static_access.contains_key(&id!(ident))\n                && !self.collect.non_const_bindings.contains_key(&id!(ident))\n                && !self.collect.non_static_requires.contains(source)\n              {\n                if *kind == ImportKind::DynamicImport {\n                  let name: JsWord = format!(\n                    \"${}$importAsync${:x}${:x}\",\n                    self.module_id,\n                    hash!(source),\n                    hash!(key)\n                  )\n                  .into();\n                  self.imported_symbols.push(ImportedSymbol {\n                    source: source.clone(),\n                    local: name,\n                    imported: key.clone(),\n                    loc: SourceLocation::from(&self.collect.source_map, member.span),\n                    kind: *kind,\n                  });\n                } else {\n                  return Expr::Ident(self.get_import_ident(\n                    member.span,\n                    source,\n                    &key,\n                    SourceLocation::from(&self.collect.source_map, member.span),\n                    *kind,\n                  ));\n                }\n              }\n            }\n\n            // exports.foo -> $id$export$foo\n            if &*ident.sym == \"exports\"\n              && is_unresolved(&ident, self.unresolved_mark)\n              && self.collect.static_cjs_exports\n              && !self.collect.should_wrap\n            {\n              self.self_references.insert(key.clone());\n              return Expr::Ident(self.get_export_ident(member.span, &key));\n            }\n          }\n          Expr::Call(_) => {\n            // require('foo').bar -> $id$import$foo$bar\n            if let Some(source) =\n              match_require(&member.obj, self.unresolved_mark, self.collect.ignore_mark)\n            {\n              self.add_require(&source, ImportKind::Require);\n              return Expr::Ident(self.get_import_ident(\n                member.span,\n                &source,\n                &key,\n                SourceLocation::from(&self.collect.source_map, member.span),\n                ImportKind::Require,\n              ));\n            }\n          }\n          Expr::Member(mem) => {\n            // module.exports.foo -> $id$export$foo\n            if self.collect.static_cjs_exports\n              && !self.collect.should_wrap\n              && match_member_expr(mem, vec![\"module\", \"exports\"], self.unresolved_mark)\n            {\n              self.self_references.insert(key.clone());\n              return Expr::Ident(self.get_export_ident(member.span, &key));\n            }\n          }\n          Expr::This(_) => {\n            // this.foo -> $id$export$foo\n            if self.collect.static_cjs_exports\n              && !self.collect.should_wrap\n              && !self.in_function_scope\n              && !self.collect.is_esm\n            {\n              self.self_references.insert(key.clone());\n              return Expr::Ident(self.get_export_ident(member.span, &key));\n            }\n          }\n          _ => {}\n        }\n\n        // Don't visit member.prop so we avoid the ident visitor.\n        return Expr::Member(MemberExpr {\n          span: member.span,\n          obj: member.obj.fold_with(self),\n          prop: member.prop,\n        });\n      }\n      Expr::Call(ref call) => {\n        // require('foo') -> $id$import$foo\n        if let Some(source) = match_require(&node, self.unresolved_mark, self.collect.ignore_mark) {\n          self.add_require(&source, ImportKind::Require);\n          return Expr::Ident(self.get_import_ident(\n            call.span,\n            &source,\n            &(\"*\".into()),\n            SourceLocation::from(&self.collect.source_map, call.span),\n            ImportKind::Require,\n          ));\n        }\n\n        if let Some(source) = match_import(&node) {\n          self.add_require(&source, ImportKind::DynamicImport);\n          let name: JsWord = format!(\"${}$importAsync${:x}\", self.module_id, hash!(source)).into();\n          self.dynamic_imports.insert(name.clone(), source.clone());\n          if self.collect.non_static_requires.contains(&source) || self.collect.should_wrap {\n            self.imported_symbols.push(ImportedSymbol {\n              source,\n              local: name.clone(),\n              imported: \"*\".into(),\n              loc: SourceLocation::from(&self.collect.source_map, call.span),\n              kind: ImportKind::DynamicImport,\n            });\n          }\n          return Expr::Ident(Ident::new(name, call.span, call.ctxt));\n        }\n      }\n      Expr::This(this) => {\n        if !self.in_function_scope {\n          // If ESM, replace `this` with `undefined`, otherwise with the CJS exports object.\n          if self.collect.is_esm {\n            return Expr::Ident(get_undefined_ident(self.unresolved_mark));\n          } else if !self.collect.should_wrap {\n            self.self_references.insert(\"*\".into());\n            return Expr::Ident(self.get_export_ident(this.span, &\"*\".into()));\n          }\n        }\n      }\n      Expr::Ident(ident) => {\n        // import { foo } from \"...\"; foo();\n        // ->\n        // import { foo } from \"...\"; (0, foo)();\n        if let Some(Import {\n          specifier, kind, ..\n        }) = self.collect.imports.get(&id!(ident))\n        {\n          if kind == &ImportKind::Import && specifier != \"*\" {\n            return Expr::Seq(SeqExpr {\n              span: ident.span,\n              exprs: vec![0.into(), Box::new(Expr::Ident(ident.fold_with(self)))],\n            });\n          }\n        }\n        return Expr::Ident(ident.fold_with(self));\n      }\n      _ => {}\n    }\n\n    maybe_grow_default(|| node.fold_children_with(self))\n  }\n\n  fn fold_seq_expr(&mut self, node: SeqExpr) -> SeqExpr {\n    // This is a hack to work around the SWC fixer pass removing identifiers in sequence expressions\n    // that aren't at the end. In general this makes sense, but we need to preserve these so that they\n    // can be replaced with a parcelRequire call in the linker. We just wrap with a unary expression to\n    // get around this for now.\n    let len = node.exprs.len();\n    let exprs = node\n      .exprs\n      .into_iter()\n      .enumerate()\n      .map(|(i, expr)| {\n        if i != len - 1\n          && match_require(&expr, self.unresolved_mark, self.collect.ignore_mark).is_some()\n        {\n          return Box::new(Expr::Unary(UnaryExpr {\n            op: UnaryOp::Bang,\n            arg: expr.fold_with(self),\n            span: DUMMY_SP,\n          }));\n        }\n\n        expr.fold_with(self)\n      })\n      .collect();\n\n    SeqExpr { exprs, ..node }\n  }\n\n  fn fold_ident(&mut self, node: Ident) -> Ident {\n    // import {x} from 'y'; OR const {x} = require('y');\n    // x -> $id$import$y$x\n    //\n    // import * as x from 'y'; OR const x = require('y');\n    // x -> $id$import$y\n    if let Some(Import {\n      source,\n      specifier,\n      kind,\n      loc,\n      ..\n    }) = self.collect.imports.get(&id!(node))\n    {\n      // If the require is accessed in a way we cannot analyze, do not replace.\n      // e.g. const {x: {y: z}} = require('x');\n      if !self.collect.non_static_requires.contains(source) {\n        if *kind == ImportKind::DynamicImport {\n          if specifier != \"*\" {\n            let name: JsWord = format!(\n              \"${}$importAsync${:x}${:x}\",\n              self.module_id,\n              hash!(source),\n              hash!(specifier)\n            )\n            .into();\n            self.imported_symbols.push(ImportedSymbol {\n              source: source.clone(),\n              local: name,\n              imported: specifier.clone(),\n              loc: loc.clone(),\n              kind: *kind,\n            });\n          } else if self.collect.non_static_access.contains_key(&id!(node)) {\n            let name: JsWord =\n              format!(\"${}$importAsync${:x}\", self.module_id, hash!(source)).into();\n            self.imported_symbols.push(ImportedSymbol {\n              source: source.clone(),\n              local: name,\n              imported: \"*\".into(),\n              loc: loc.clone(),\n              kind: *kind,\n            });\n          }\n        } else {\n          // If this identifier is not constant, we cannot directly reference the imported\n          // value. Instead, a new local variable is created that originally points to the\n          // required value, and we reference that instead. This allows the local variable\n          // to be re-assigned without affecting the original exported variable.\n          // See handle_non_const_require, below.\n          if self.collect.non_const_bindings.contains_key(&id!(node)) {\n            return self.get_require_ident(&node.sym);\n          }\n\n          return self.get_import_ident(node.span, source, specifier, loc.clone(), *kind);\n        }\n      }\n    }\n\n    if let Some(exported) = self.collect.exports_locals.get(&id!(node)) {\n      // If wrapped, mark the original symbol as exported.\n      // Otherwise replace with an export identifier.\n      if self.collect.should_wrap {\n        self.exported_symbols.push(ExportedSymbol {\n          local: node.sym.clone(),\n          exported: exported.clone(),\n          loc: SourceLocation::from(&self.collect.source_map, node.span),\n          is_esm: false,\n        });\n        return node;\n      } else {\n        return self.get_export_ident(node.span, exported);\n      }\n    }\n\n    if &*node.sym == \"exports\"\n      && is_unresolved(&node, self.unresolved_mark)\n      && !self.collect.should_wrap\n    {\n      self.self_references.insert(\"*\".into());\n      return self.get_export_ident(node.span, &\"*\".into());\n    }\n\n    if node.sym == \"global\" && is_unresolved(&node, self.unresolved_mark) {\n      return Ident::new(\"$parcel$global\".into(), node.span, node.ctxt);\n    }\n\n    if node.ctxt.has_mark(self.collect.global_mark)\n      && !is_unresolved(&node, self.unresolved_mark)\n      && !self.collect.should_wrap\n    {\n      let new_name: JsWord = format!(\"${}$var${}\", self.module_id, node.sym).into();\n      return Ident::new(new_name, node.span, node.ctxt);\n    }\n\n    node\n  }\n\n  fn fold_assign_expr(&mut self, node: AssignExpr) -> AssignExpr {\n    if self.collect.should_wrap {\n      return node.fold_children_with(self);\n    }\n\n    if let AssignTarget::Simple(SimpleAssignTarget::Member(member)) = &node.left {\n      if match_member_expr(member, vec![\"module\", \"exports\"], self.unresolved_mark) {\n        let ident = BindingIdent::from(self.get_export_ident(member.span, &\"*\".into()));\n        return AssignExpr {\n          span: node.span,\n          op: node.op,\n          left: AssignTarget::Simple(SimpleAssignTarget::Ident(ident.into())),\n          right: node.right.fold_with(self),\n        };\n      }\n\n      let is_cjs_exports = match &*member.obj {\n        Expr::Member(member) => {\n          match_member_expr(member, vec![\"module\", \"exports\"], self.unresolved_mark)\n        }\n        Expr::Ident(ident) => {\n          &*ident.sym == \"exports\" && is_unresolved(&ident, self.unresolved_mark)\n        }\n        Expr::This(_) if !self.in_function_scope => true,\n        _ => false,\n      };\n\n      if is_cjs_exports {\n        let key: JsWord = if self.collect.static_cjs_exports {\n          if let Some((name, _)) = match_property_name(member) {\n            name\n          } else {\n            unreachable!(\"Unexpected non-static CJS export\");\n          }\n        } else {\n          \"*\".into()\n        };\n\n        let ident = BindingIdent::from(self.get_export_ident(member.span, &key));\n        if self.collect.static_cjs_exports && self.export_decls.insert(ident.id.sym.clone()) {\n          self.hoisted_imports.insert(\n            ident.id.sym.clone(),\n            ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl {\n              declare: false,\n              kind: VarDeclKind::Var,\n              span: node.span,\n              ctxt: ident.ctxt,\n              decls: vec![VarDeclarator {\n                definite: false,\n                span: node.span,\n                name: Pat::Ident(BindingIdent::from(Ident::new(\n                  ident.id.sym.clone(),\n                  DUMMY_SP,\n                  ident.ctxt,\n                ))),\n                init: None,\n              }],\n            })))),\n          );\n        }\n\n        return AssignExpr {\n          span: node.span,\n          op: node.op,\n          left: if self.collect.static_cjs_exports {\n            AssignTarget::Simple(SimpleAssignTarget::Ident(ident.into()))\n          } else {\n            AssignTarget::Simple(SimpleAssignTarget::Member(MemberExpr {\n              span: member.span,\n              obj: Box::new(Expr::Ident(ident.id)),\n              prop: member.prop.clone().fold_with(self),\n            }))\n          },\n          right: node.right.fold_with(self),\n        };\n      }\n    }\n\n    node.fold_children_with(self)\n  }\n\n  fn fold_prop(&mut self, node: Prop) -> Prop {\n    match node {\n      Prop::Shorthand(ident) => Prop::KeyValue(KeyValueProp {\n        key: PropName::Ident(IdentName::new(ident.sym.clone(), DUMMY_SP)),\n        value: Box::new(Expr::Ident(ident.fold_with(self))),\n      }),\n      _ => node.fold_children_with(self),\n    }\n  }\n\n  fn fold_prop_name(&mut self, node: PropName) -> PropName {\n    match node {\n      PropName::Computed(k) => PropName::Computed(k.fold_with(self)),\n      k => k,\n    }\n  }\n\n  fn fold_object_pat_prop(&mut self, node: ObjectPatProp) -> ObjectPatProp {\n    if self.collect.should_wrap {\n      return node.fold_children_with(self);\n    }\n\n    // var {a, b} = foo; -> var {a: $id$var$a, b: $id$var$b} = foo;\n    match node {\n      ObjectPatProp::Assign(assign) => ObjectPatProp::KeyValue(KeyValuePatProp {\n        key: PropName::Ident(IdentName::new(assign.key.sym.clone(), DUMMY_SP)),\n        value: Box::new(match assign.value {\n          Some(value) => Pat::Assign(AssignPat {\n            left: Box::new(Pat::Ident(BindingIdent::from(assign.key.fold_with(self)))),\n            right: value.fold_with(self),\n            span: DUMMY_SP,\n          }),\n          None => Pat::Ident(BindingIdent::from(assign.key.fold_with(self))),\n        }),\n      }),\n      _ => node.fold_children_with(self),\n    }\n  }\n}\n\nimpl<'a> Hoist<'a> {\n  fn add_require(&mut self, source: &JsWord, import_kind: ImportKind) {\n    let src = match import_kind {\n      ImportKind::Import => format!(\"{}:{}:{}\", self.module_id, source, \"esm\"),\n      ImportKind::DynamicImport | ImportKind::Require => format!(\"{}:{}\", self.module_id, source),\n    };\n    self\n      .module_items\n      .push(ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {\n        specifiers: vec![],\n        with: None,\n        span: DUMMY_SP,\n        src: Box::new(src.into()),\n        type_only: false,\n        phase: Default::default(),\n      })));\n  }\n\n  fn get_import_name(&self, source: &JsWord, local: &JsWord) -> JsWord {\n    if local == \"*\" {\n      format!(\"${}$import${:x}\", self.module_id, hash!(source)).into()\n    } else {\n      format!(\n        \"${}$import${:x}${:x}\",\n        self.module_id,\n        hash!(source),\n        hash!(local)\n      )\n      .into()\n    }\n  }\n\n  fn get_import_ident(\n    &mut self,\n    span: Span,\n    source: &JsWord,\n    imported: &JsWord,\n    loc: SourceLocation,\n    kind: ImportKind,\n  ) -> Ident {\n    let new_name = self.get_import_name(source, imported);\n    self.imported_symbols.push(ImportedSymbol {\n      source: source.clone(),\n      local: new_name.clone(),\n      imported: imported.clone(),\n      loc,\n      kind,\n    });\n    Ident::new_no_ctxt(new_name, span)\n  }\n\n  fn get_require_ident(&self, local: &JsWord) -> Ident {\n    Ident::new_no_ctxt(\n      format!(\"${}$require${}\", self.module_id, local).into(),\n      DUMMY_SP,\n    )\n  }\n\n  fn get_export_ident(&mut self, span: Span, exported: &JsWord) -> Ident {\n    let new_name: JsWord = if exported == \"*\" {\n      format!(\"${}$exports\", self.module_id).into()\n    } else {\n      format!(\"${}$export${:x}\", self.module_id, hash!(exported)).into()\n    };\n\n    let is_esm = matches!(\n      self.collect.exports.get(exported),\n      Some(Export { is_esm: true, .. })\n    );\n\n    self.exported_symbols.push(ExportedSymbol {\n      local: new_name.clone(),\n      exported: exported.clone(),\n      loc: SourceLocation::from(&self.collect.source_map, span),\n      is_esm,\n    });\n\n    Ident::new_no_ctxt(new_name, span)\n  }\n\n  fn handle_non_const_require(&mut self, v: &VarDeclarator, source: &JsWord) {\n    // If any of the bindings in this declarator are not constant, we need to create\n    // a local variable referencing them so that we can safely re-assign the local variable\n    // without affecting the original export. This is only possible in CommonJS since ESM\n    // imports are constant (this is ensured by the diagnostic in fold_module above).\n    let mut non_const_bindings = vec![];\n    self\n      .collect\n      .get_non_const_binding_idents(&v.name, &mut non_const_bindings);\n\n    for ident in non_const_bindings {\n      if let Some(Import {\n        specifier, kind, ..\n      }) = self.collect.imports.get(&id!(ident))\n      {\n        let require_id = self.get_require_ident(&ident.sym);\n        let import_id = self.get_import_ident(\n          v.span,\n          source,\n          specifier,\n          SourceLocation::from(&self.collect.source_map, v.span),\n          *kind,\n        );\n        self\n          .module_items\n          .push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl {\n            declare: false,\n            kind: VarDeclKind::Var,\n            span: DUMMY_SP,\n            ctxt: SyntaxContext::empty(),\n            decls: vec![VarDeclarator {\n              definite: false,\n              span: DUMMY_SP,\n              name: Pat::Ident(BindingIdent::from(require_id)),\n              init: Some(Box::new(Expr::Ident(import_id))),\n            }],\n          })))));\n      }\n    }\n  }\n}\n\n#[cfg(test)]\nmod tests {\n  use swc_core::{\n    common::{FileName, Globals, SourceMap, comments::SingleThreadedComments, sync::Lrc},\n    ecma::{\n      codegen::text_writer::JsWriter,\n      parser::{Parser, StringInput, lexer::Lexer},\n      transforms::base::{fixer::fixer, hygiene::hygiene, resolver},\n      visit::{VisitMutWith, VisitWith},\n    },\n  };\n\n  use super::*;\n  use crate::utils::BailoutReason;\n  extern crate indoc;\n  use self::indoc::indoc;\n\n  fn parse(code: &str) -> (Collect, String, HoistResult) {\n    let source_map = Lrc::new(SourceMap::default());\n    let source_file = source_map.new_source_file(Lrc::new(FileName::Anon), code.into());\n\n    let comments = SingleThreadedComments::default();\n    let lexer = Lexer::new(\n      Default::default(),\n      Default::default(),\n      StringInput::from(&*source_file),\n      Some(&comments),\n    );\n\n    let mut parser = Parser::new_from(lexer);\n    match parser.parse_program() {\n      Ok(mut program) => swc_core::common::GLOBALS.set(&Globals::new(), || {\n        swc_core::ecma::transforms::base::helpers::HELPERS.set(\n          &swc_core::ecma::transforms::base::helpers::Helpers::new(false),\n          || {\n            let is_module = program.is_module();\n            let unresolved_mark = Mark::fresh(Mark::root());\n            let global_mark = Mark::fresh(Mark::root());\n            program.mutate(&mut resolver(unresolved_mark, global_mark, false));\n\n            let module = match program {\n              Program::Module(module) => module,\n              Program::Script(script) => Module {\n                span: script.span,\n                shebang: None,\n                body: script.body.into_iter().map(ModuleItem::Stmt).collect(),\n              },\n            };\n\n            let mut collect = Collect::new(\n              source_map.clone(),\n              unresolved_mark,\n              Mark::fresh(Mark::root()),\n              global_mark,\n              true,\n              is_module,\n            );\n            module.visit_with(&mut collect);\n\n            let (mut module, res) = {\n              let mut hoist = Hoist::new(\"abc\", unresolved_mark, &collect);\n              let module = module.fold_with(&mut hoist);\n              (module, hoist.get_result())\n            };\n\n            module.visit_mut_with(&mut (hygiene(), fixer(Some(&comments))));\n\n            let code = emit(source_map, comments, &module);\n            (collect, code, res)\n          },\n        )\n      }),\n      Err(err) => {\n        panic!(\"{:?}\", err);\n      }\n    }\n  }\n\n  fn emit(source_map: Lrc<SourceMap>, comments: SingleThreadedComments, module: &Module) -> String {\n    let mut src_map_buf = vec![];\n    let mut buf = vec![];\n    {\n      let writer = Box::new(JsWriter::new(\n        source_map.clone(),\n        \"\\n\",\n        &mut buf,\n        Some(&mut src_map_buf),\n      ));\n      let config =\n        swc_core::ecma::codegen::Config::default().with_target(swc_core::ecma::ast::EsVersion::Es5);\n      let mut emitter = swc_core::ecma::codegen::Emitter {\n        cfg: config,\n        comments: Some(&comments),\n        cm: source_map,\n        wr: writer,\n      };\n\n      emitter.emit_module(module).unwrap();\n    }\n\n    String::from_utf8(buf).unwrap()\n  }\n\n  macro_rules! map(\n    { $($key:expr => $value:expr),* } => {\n      {\n        #[allow(unused_mut)]\n        let mut m = HashMap::new();\n        $(\n          m.insert($key, $value);\n        )*\n        m\n      }\n    };\n  );\n\n  macro_rules! set(\n    { $($key:expr),* } => {\n      {\n        #[allow(unused_mut)]\n        let mut m = HashSet::new();\n        $(\n          m.insert($key);\n        )*\n        m\n      }\n    };\n  );\n\n  macro_rules! w {\n    ($s: expr) => {{\n      let w: JsWord = $s.into();\n      w\n    }};\n  }\n\n  macro_rules! assert_eq_imports {\n    ($m: expr, $match: expr) => {{\n      let mut map = HashMap::new();\n      for (key, val) in $m {\n        map.insert(\n          key.0,\n          (\n            val.source,\n            val.specifier,\n            val.kind == ImportKind::DynamicImport,\n          ),\n        );\n      }\n      assert_eq!(map, $match);\n    }};\n  }\n\n  macro_rules! assert_eq_imported_symbols {\n    ($m: expr, $match: expr) => {{\n      let mut map = HashMap::new();\n      for sym in $m {\n        map.insert(sym.local, (sym.source, sym.imported));\n      }\n      assert_eq!(map, $match);\n    }};\n  }\n\n  macro_rules! assert_eq_exported_symbols {\n    ($m: expr, $match: expr) => {{\n      let mut map = HashMap::new();\n      for sym in $m {\n        map.insert(sym.exported, (sym.local, sym.is_esm));\n      }\n      assert_eq!(map, $match);\n    }};\n  }\n\n  macro_rules! assert_eq_set {\n    ($m: expr, $match: expr) => {{\n      let mut map = HashSet::new();\n      for item in $m {\n        map.insert(item.0);\n      }\n      assert_eq!(map, $match);\n    }};\n  }\n\n  #[test]\n  fn collect_esm() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import {foo as bar} from 'other';\n    export {bar as test};\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"bar\") => (w!(\"other\"), w!(\"foo\"), false) }\n    );\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"test\") => Export {\n          source: Some(\"other\".into()),\n          specifier: \"foo\".into(),\n          loc: SourceLocation {\n            start_line: 3,\n            start_col: 20,\n            end_line: 3,\n            end_col: 24\n          },\n          is_esm: true\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import { a, b, c, d, e } from \"other\";\n    import * as x from \"other\";\n    import * as y from \"other\";\n\n    log(a);\n    b.x();\n    c();\n    log(x);\n    y.foo();\n    e.foo.bar();\n    \"#,\n    );\n    assert_eq_set!(\n      collect.used_imports,\n      set! { w!(\"a\"), w!(\"b\"), w!(\"c\"), w!(\"e\"), w!(\"x\"), w!(\"y\") }\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! {\n        w!(\"a\") => (w!(\"other\"), w!(\"a\"), false),\n        w!(\"b\") => (w!(\"other\"), w!(\"b\"), false),\n        w!(\"c\") => (w!(\"other\"), w!(\"c\"), false),\n        w!(\"d\") => (w!(\"other\"), w!(\"d\"), false),\n        w!(\"e\") => (w!(\"other\"), w!(\"e\"), false),\n        w!(\"x\") => (w!(\"other\"), w!(\"*\"), false),\n        w!(\"y\") => (w!(\"other\"), w!(\"*\"), false)\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import { formatters } from \"other\";\n\n    export function format() {\n      return formatters[something]();\n    }\n    \"#,\n    );\n    assert_eq_set!(collect.used_imports, set! { w!(\"formatters\") });\n  }\n\n  #[test]\n  fn collect_cjs_namespace() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    const x = require('other');\n    console.log(x.foo);\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"x\") => (w!(\"other\"), w!(\"*\"), false) }\n    );\n    assert_eq!(collect.non_static_access, map! {});\n\n    let (_collect, _code, hoist) = parse(\n      r#\"\n      require('other');\n    \"#,\n    );\n    assert_eq_imported_symbols!(hoist.imported_symbols, map! {});\n  }\n\n  #[test]\n  fn collect_cjs_namespace_non_static() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    const x = require('other');\n    console.log(x[foo]);\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"x\") => (w!(\"other\"), w!(\"*\"), false) }\n    );\n    assert_eq_set!(collect.non_static_access.into_keys(), set! { w!(\"x\") });\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    const x = require('other');\n    console.log(x);\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"x\") => (w!(\"other\"), w!(\"*\"), false) }\n    );\n    assert_eq_set!(collect.non_static_access.into_keys(), set! { w!(\"x\") });\n  }\n\n  #[test]\n  fn collect_cjs_destructure() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    const {foo: bar} = require('other');\n    exports.test = bar;\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"bar\") => (w!(\"other\"), w!(\"foo\"), false) }\n    );\n    assert!(collect.static_cjs_exports);\n  }\n\n  #[test]\n  fn collect_destructure_default() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import {bar} from 'source';\n\n    export function thing(props) {\n      const {something = bar} = props;\n      return something;\n    }\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"bar\") => (w!(\"source\"), w!(\"bar\"), false) }\n    );\n    assert_eq_set!(collect.used_imports, set! { w!(\"bar\") });\n  }\n\n  #[test]\n  fn collect_cjs_reassign() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    exports = 2;\n    \"#,\n    );\n    assert!(collect.should_wrap);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    module = 2;\n    \"#,\n    );\n    assert!(collect.should_wrap);\n  }\n\n  #[test]\n  fn collect_has_cjs_exports() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n      module.exports = {};\n    \"#,\n    );\n    assert!(collect.has_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n      this.someExport = 'true';\n    \"#,\n    );\n    assert!(collect.has_cjs_exports);\n\n    // Some TSC polyfills use a pattern like below.\n    // We want to avoid marking these modules as CJS\n    let (collect, _code, _hoist) = parse(\n      r#\"\n      import 'something';\n      var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function () {}\n    \"#,\n    );\n    assert!(!collect.has_cjs_exports);\n  }\n\n  #[test]\n  fn collect_should_wrap() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    eval('');\n    \"#,\n    );\n    assert!(collect.should_wrap);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    doSomething(module);\n    \"#,\n    );\n    assert!(collect.should_wrap);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    console.log(module.id);\n    \"#,\n    );\n    assert!(collect.should_wrap);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    console.log(typeof module);\n    console.log(module.hot);\n    \"#,\n    );\n    assert!(!collect.should_wrap);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    exports.foo = 2;\n    return;\n    exports.bar = 3;\n    \"#,\n    );\n    assert!(collect.should_wrap);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    const foo = {\n      get a() {\n        return 1;\n      },\n      set b(v) {\n        return;\n      },\n      run() {\n        return 3;\n      },\n    };\n    console.log(foo.a);\n    \"#,\n    );\n    assert!(!collect.should_wrap);\n  }\n\n  #[test]\n  fn collect_cjs_non_static_exports() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    exports[test] = 2;\n    \"#,\n    );\n    assert!(!collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    module.exports[test] = 2;\n    \"#,\n    );\n    assert!(!collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    this[test] = 2;\n    \"#,\n    );\n    assert!(!collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    module.exports[test] = 2;\n    \"#,\n    );\n    assert!(!collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    alert(exports)\n    \"#,\n    );\n    assert!(!collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    alert(module.exports)\n    \"#,\n    );\n    assert!(!collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    alert(this)\n    \"#,\n    );\n    assert!(!collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    exports.foo = 2;\n    \"#,\n    );\n    assert!(collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    module.exports.foo = 2;\n    \"#,\n    );\n    assert!(collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    this.foo = 2;\n    \"#,\n    );\n    assert!(collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    var exports = {};\n    exports[foo] = 2;\n    \"#,\n    );\n    assert!(collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    var module = {exports: {}};\n    module.exports[foo] = 2;\n    \"#,\n    );\n    assert!(collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    test(function(exports) { return Object.keys(exports) })\n    \"#,\n    );\n    assert!(collect.static_cjs_exports);\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    test(exports => Object.keys(exports))\n    \"#,\n    );\n    assert!(collect.static_cjs_exports);\n  }\n\n  #[test]\n  fn collect_dynamic_import() {\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    async function test() {\n      const x = await import('other');\n      x.foo;\n    }\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"x\") => (w!(\"other\"), w!(\"*\"), true) }\n    );\n    assert_eq_set!(collect.non_static_access.into_keys(), set! {});\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    async function test() {\n      const x = await import('other');\n      x[foo];\n    }\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"x\") => (w!(\"other\"), w!(\"*\"), true) }\n    );\n    assert_eq_set!(collect.non_static_access.into_keys(), set! { w!(\"x\") });\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    async function test() {\n      const {foo} = await import('other');\n    }\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"foo\") => (w!(\"other\"), w!(\"foo\"), true) }\n    );\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    async function test() {\n      const {foo: bar} = await import('other');\n    }\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"bar\") => (w!(\"other\"), w!(\"foo\"), true) }\n    );\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import('other').then(x => x.foo);\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"x\") => (w!(\"other\"), w!(\"*\"), true) }\n    );\n    assert_eq_set!(collect.non_static_access.into_keys(), set! {});\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import('other').then(x => x);\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"x\") => (w!(\"other\"), w!(\"*\"), true) }\n    );\n    assert_eq_set!(collect.non_static_access.into_keys(), set! { w!(\"x\") });\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import('other').then(({foo}) => foo);\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"foo\") => (w!(\"other\"), w!(\"foo\"), true) }\n    );\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import('other').then(({foo: bar}) => bar);\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"bar\") => (w!(\"other\"), w!(\"foo\"), true) }\n    );\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import('other').then(function (x) { return x.foo });\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"x\") => (w!(\"other\"), w!(\"*\"), true) }\n    );\n    assert_eq_set!(collect.non_static_access.into_keys(), set! {});\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import('other').then(function (x) { return x });\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"x\") => (w!(\"other\"), w!(\"*\"), true) }\n    );\n    assert_eq_set!(collect.non_static_access.into_keys(), set! { w!(\"x\") });\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import('other').then(function ({foo}) {});\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"foo\") => (w!(\"other\"), w!(\"foo\"), true) }\n    );\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import('other').then(function ({foo: bar}) {});\n    \"#,\n    );\n    assert_eq_imports!(\n      collect.imports,\n      map! { w!(\"bar\") => (w!(\"other\"), w!(\"foo\"), true) }\n    );\n    assert_eq!(collect.non_static_requires, set! {});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    import('other');\n    \"#,\n    );\n    assert_eq_imports!(collect.imports, map! {});\n    assert_eq!(collect.non_static_requires, set! {w!(\"other\")});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    let other = import('other');\n    \"#,\n    );\n    assert_eq_imports!(collect.imports, map! {});\n    assert_eq!(collect.non_static_requires, set! {w!(\"other\")});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n\n    let (collect, _code, _hoist) = parse(\n      r#\"\n    async function test() {\n      let {...other} = await import('other');\n    }\n    \"#,\n    );\n    assert_eq_imports!(collect.imports, map! {});\n    assert_eq!(collect.non_static_requires, set! {w!(\"other\")});\n    assert_eq!(collect.wrapped_requires, set! {String::from(\"other\")});\n  }\n\n  #[test]\n  fn fold_import() {\n    let (collect, code, _hoist) = parse(\n      r#\"\n    import {foo as bar} from 'other';\n    let test = {bar: 3};\n    console.log(bar, test.bar);\n    bar();\n    \"#,\n    );\n\n    assert!(collect.bailouts.unwrap().is_empty());\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other:esm\";\n    let $abc$var$test = {\n        bar: 3\n    };\n    console.log((0, $abc$import$70a00e0a8474f72a$6a5cdcad01c973fa), $abc$var$test.bar);\n    (0, $abc$import$70a00e0a8474f72a$6a5cdcad01c973fa)();\n    \"#}\n    );\n\n    let (collect, code, _hoist) = parse(\n      r#\"\n    import * as foo from 'other';\n    console.log(foo.bar);\n    foo.bar();\n    \"#,\n    );\n    assert!(collect.bailouts.unwrap().is_empty());\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other:esm\";\n    console.log($abc$import$70a00e0a8474f72a$d927737047eb3867);\n    $abc$import$70a00e0a8474f72a$d927737047eb3867();\n    \"#}\n    );\n\n    let (collect, code, _hoist) = parse(\n      r#\"\n    import * as foo from 'other';\n    foo.bar();\n    let y = \"bar\";\n    foo[y]();\n    \"#,\n    );\n    assert_eq!(\n      collect\n        .bailouts\n        .unwrap()\n        .iter()\n        .map(|b| &b.reason)\n        .collect::<Vec<_>>(),\n      vec![&BailoutReason::NonStaticAccess]\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other:esm\";\n    $abc$import$70a00e0a8474f72a.bar();\n    let $abc$var$y = \"bar\";\n    $abc$import$70a00e0a8474f72a[$abc$var$y]();\n    \"#}\n    );\n\n    let (collect, code, _hoist) = parse(\n      r#\"\n    import other from 'other';\n    console.log(other, other.bar);\n    other();\n    \"#,\n    );\n\n    assert!(collect.bailouts.unwrap().is_empty());\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other:esm\";\n    console.log((0, $abc$import$70a00e0a8474f72a$2e2bcd8739ae039), (0, $abc$import$70a00e0a8474f72a$2e2bcd8739ae039).bar);\n    (0, $abc$import$70a00e0a8474f72a$2e2bcd8739ae039)();\n    \"#}\n    );\n  }\n\n  #[test]\n  fn fold_import_hoist() {\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    import foo from 'other';\n    console.log(foo);\n    import bar from 'bar';\n    console.log(bar);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other:esm\";\n    import \"abc:bar:esm\";\n    console.log((0, $abc$import$70a00e0a8474f72a$2e2bcd8739ae039));\n    console.log((0, $abc$import$d927737047eb3867$2e2bcd8739ae039));\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    import foo from 'other';\n    console.log(foo);\n    const x = require('x');\n    console.log(x);\n    import bar from 'bar';\n    console.log(bar);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other:esm\";\n    import \"abc:bar:esm\";\n    console.log((0, $abc$import$70a00e0a8474f72a$2e2bcd8739ae039));\n    import \"abc:x\";\n    console.log($abc$import$d141bba7fdc215a3);\n    console.log((0, $abc$import$d927737047eb3867$2e2bcd8739ae039));\n    \"#}\n    );\n  }\n\n  #[test]\n  fn fold_static_require() {\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    const x = 4, {bar} = require('other'), baz = 3;\n    console.log(bar);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    const $abc$var$x = 4;\n    import \"abc:other\";\n    var $abc$require$bar = $abc$import$70a00e0a8474f72a$d927737047eb3867;\n    const $abc$var$baz = 3;\n    console.log($abc$require$bar);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    const x = 3, foo = require('other'), bar = 2;\n    console.log(foo.bar);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    const $abc$var$x = 3;\n    import \"abc:other\";\n    const $abc$var$bar = 2;\n    console.log($abc$import$70a00e0a8474f72a$d927737047eb3867);\n    \"#}\n    );\n  }\n\n  #[test]\n  fn fold_non_static_require() {\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    const {foo, ...bar} = require('other');\n    console.log(foo, bar);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    const { foo: $abc$var$foo, ...$abc$var$bar } = $abc$import$70a00e0a8474f72a;\n    console.log($abc$var$foo, $abc$var$bar);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    const {x: {y: z}} = require('x');\n    console.log(z);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:x\";\n    const { x: { y: $abc$var$z } } = $abc$import$d141bba7fdc215a3;\n    console.log($abc$var$z);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    const foo = require('other');\n    console.log(foo[bar]);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    console.log($abc$import$70a00e0a8474f72a[bar]);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    const foo = require('other');\n    console.log(foo[bar], foo.baz);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    console.log($abc$import$70a00e0a8474f72a[bar], $abc$import$70a00e0a8474f72a.baz);\n    \"#}\n    );\n  }\n\n  #[test]\n  fn fold_require_member() {\n    // let (_collect, code, _hoist) = parse(r#\"\n    // let foo;\n    // ({foo} = require('other'));\n    // console.log(foo);\n    // \"#);\n\n    // println!(\"{}\", code);\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    const foo = require('other').foo;\n    console.log(foo);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    var $abc$require$foo = $abc$import$70a00e0a8474f72a$6a5cdcad01c973fa;\n    console.log($abc$require$foo);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    const foo = require('other')[bar];\n    console.log(foo);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    const $abc$var$foo = $abc$import$70a00e0a8474f72a[bar];\n    console.log($abc$var$foo);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    const {foo} = require('other').foo;\n    console.log(foo);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    const { foo: $abc$var$foo } = $abc$import$70a00e0a8474f72a$6a5cdcad01c973fa;\n    console.log($abc$var$foo);\n    \"#}\n    );\n  }\n\n  #[test]\n  fn fold_require_wrapped() {\n    let (_collect, code, hoist) = parse(\n      r#\"\n    function x() {\n      const foo = require('other');\n      console.log(foo.bar);\n    }\n    require('bar');\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    function $abc$var$x() {\n        const foo = $abc$import$70a00e0a8474f72a;\n        console.log(foo.bar);\n    }\n    import \"abc:bar\";\n    \"#}\n    );\n    assert_eq!(\n      hoist.wrapped_requires,\n      HashSet::<String>::from_iter(vec![String::from(\"other\")])\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    var foo = function () {\n      if (Date.now() < 0) {\n        var bar = require(\"other\");\n      }\n    }();\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    var $abc$var$foo = function() {\n        if (Date.now() < 0) {\n            var bar = $abc$import$70a00e0a8474f72a;\n        }\n    }();\n    \"#}\n    );\n    assert_eq!(\n      hoist.wrapped_requires,\n      HashSet::<String>::from_iter(vec![String::from(\"other\")])\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    function x() {\n      const foo = require('other').foo;\n      console.log(foo);\n    }\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    function $abc$var$x() {\n        const foo = $abc$import$70a00e0a8474f72a$6a5cdcad01c973fa;\n        console.log(foo);\n    }\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    function x() {\n      console.log(require('other').foo);\n    }\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    function $abc$var$x() {\n        console.log($abc$import$70a00e0a8474f72a$6a5cdcad01c973fa);\n    }\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    function x() {\n      const foo = require('other')[test];\n      console.log(foo);\n    }\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    function $abc$var$x() {\n        const foo = $abc$import$70a00e0a8474f72a[test];\n        console.log(foo);\n    }\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    function x() {\n      const {foo} = require('other');\n      console.log(foo);\n    }\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    function $abc$var$x() {\n        const { foo: foo } = $abc$import$70a00e0a8474f72a;\n        console.log(foo);\n    }\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    let x = require('a') + require('b');\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:a\";\n    import \"abc:b\";\n    let $abc$var$x = $abc$import$407448d2b89b1813 + $abc$import$8b22cf2602fb60ce;\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    let x = (require('a'), require('b'));\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:a\";\n    import \"abc:b\";\n    let $abc$var$x = (!$abc$import$407448d2b89b1813, $abc$import$8b22cf2602fb60ce);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    let x = require('a') || require('b');\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:a\";\n    import \"abc:b\";\n    let $abc$var$x = $abc$import$407448d2b89b1813 || $abc$import$8b22cf2602fb60ce;\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    let x = condition ? require('a') : require('b');\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:a\";\n    import \"abc:b\";\n    let $abc$var$x = condition ? $abc$import$407448d2b89b1813 : $abc$import$8b22cf2602fb60ce;\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    if (condition) require('a');\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:a\";\n    if (condition) $abc$import$407448d2b89b1813;\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    for (let x = require('y'); x < 5; x++) {}\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:y\";\n    for(let x = $abc$import$4a5767248b18ef41; x < 5; x++){}\n    \"#}\n    );\n  }\n\n  #[test]\n  fn fold_export() {\n    let (_collect, code, hoist) = parse(\n      r#\"\n    let x = 3;\n    let y = 4;\n    let z = 6;\n    export {x, y};\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    let $abc$export$d141bba7fdc215a3 = 3;\n    let $abc$export$4a5767248b18ef41 = 4;\n    let $abc$var$z = 6;\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"x\") => (w!(\"$abc$export$d141bba7fdc215a3\"), true),\n        w!(\"y\") => (w!(\"$abc$export$4a5767248b18ef41\"), true)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    export default 3;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$2e2bcd8739ae039 = 3;\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"default\") => (w!(\"$abc$export$2e2bcd8739ae039\"), true)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    let x = 3;\n    export default x;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    let $abc$var$x = 3;\n    var $abc$export$2e2bcd8739ae039 = $abc$var$x;\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"default\") => (w!(\"$abc$export$2e2bcd8739ae039\"), true)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    export default function () {}\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    function $abc$export$2e2bcd8739ae039() {}\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"default\") => (w!(\"$abc$export$2e2bcd8739ae039\"), true)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    export default class {}\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    class $abc$export$2e2bcd8739ae039 {\n    }\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"default\") => (w!(\"$abc$export$2e2bcd8739ae039\"), true)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    console.log(module);\n    export default class X {}\n    \"#,\n    );\n\n    assert!(hoist.should_wrap);\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    console.log(module);\n    class X {\n    }\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(hoist.exported_symbols, map! {});\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    export var x = 2, y = 3;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n      var $abc$export$d141bba7fdc215a3 = 2, $abc$export$4a5767248b18ef41 = 3;\n      \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"x\") => (w!(\"$abc$export$d141bba7fdc215a3\"), true),\n        w!(\"y\") => (w!(\"$abc$export$4a5767248b18ef41\"), true)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    export var {x, ...y} = something;\n    export var [p, ...q] = something;\n    export var {x = 3} = something;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var { x: $abc$export$d141bba7fdc215a3, ...$abc$export$4a5767248b18ef41 } = something;\n    var [$abc$export$ffb5f4729a158638, ...$abc$export$9e5f44173e64f162] = something;\n    var { x: $abc$export$d141bba7fdc215a3 = 3 } = something;\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"x\") => (w!(\"$abc$export$d141bba7fdc215a3\"), true),\n        w!(\"y\") => (w!(\"$abc$export$4a5767248b18ef41\"), true),\n        w!(\"p\") => (w!(\"$abc$export$ffb5f4729a158638\"), true),\n        w!(\"q\") => (w!(\"$abc$export$9e5f44173e64f162\"), true),\n        w!(\"x\") => (w!(\"$abc$export$d141bba7fdc215a3\"), true)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    export function test() {}\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    function $abc$export$e0969da9b8fb378d() {}\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"test\") => (w!(\"$abc$export$e0969da9b8fb378d\"), true)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    export class Test {}\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    class $abc$export$1b16fc9eb974a84d {\n    }\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"Test\") => (w!(\"$abc$export$1b16fc9eb974a84d\"), true)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    export {foo} from 'bar';\n    \"#,\n    );\n\n    assert_eq_exported_symbols!(hoist.exported_symbols, map! {});\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:bar:esm\";\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    export * from 'bar';\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:bar:esm\";\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    export { settings as siteSettings } from \"./settings\";\n    export const settings = \"hi\";\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:./settings:esm\";\n    const $abc$export$a5a6e0b888b2c992 = \"hi\";\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"settings\") => (w!(\"$abc$export$a5a6e0b888b2c992\"), true)\n      }\n    );\n    assert_eq_imported_symbols!(\n      hoist.re_exports,\n      map! {\n        w!(\"siteSettings\") => (w!(\"./settings\"), w!(\"settings\"))\n      }\n    );\n\n    let (_collect, _code, hoist) = parse(\n      r#\"\n      export { format as formatDate };\n      export function format() {}\n    export default format;\n    \"#,\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"formatDate\") => (w!(\"$abc$export$d9468344d3651243\"), true),\n        w!(\"format\") => (w!(\"$abc$export$d9468344d3651243\"), true),\n        w!(\"default\") => (w!(\"$abc$export$2e2bcd8739ae039\"), true)\n      }\n    );\n  }\n\n  #[test]\n  fn fold_cjs_export() {\n    let (_collect, code, hoist) = parse(\n      r#\"\n    exports.foo = 2;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    $abc$export$6a5cdcad01c973fa = 2;\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"foo\") => (w!(\"$abc$export$6a5cdcad01c973fa\"), false)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    exports['foo'] = 2;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    $abc$export$6a5cdcad01c973fa = 2;\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"foo\") => (w!(\"$abc$export$6a5cdcad01c973fa\"), false)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    function init() {\n      exports.foo = 2;\n    }\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    function $abc$var$init() {\n        $abc$export$6a5cdcad01c973fa = 2;\n    }\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"foo\") => (w!(\"$abc$export$6a5cdcad01c973fa\"), false)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    module.exports.foo = 2;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    $abc$export$6a5cdcad01c973fa = 2;\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"foo\") => (w!(\"$abc$export$6a5cdcad01c973fa\"), false)\n      }\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    module.exports['foo'] = 2;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    $abc$export$6a5cdcad01c973fa = 2;\n    \"#}\n    );\n\n    assert_eq_exported_symbols!(\n      hoist.exported_symbols,\n      map! {\n        w!(\"foo\") => (w!(\"$abc$export$6a5cdcad01c973fa\"), false)\n      }\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    exports.foo = 2;\n    console.log(exports.foo)\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    $abc$export$6a5cdcad01c973fa = 2;\n    console.log($abc$export$6a5cdcad01c973fa);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    module.exports.foo = 2;\n    console.log(module.exports.foo)\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    $abc$export$6a5cdcad01c973fa = 2;\n    console.log($abc$export$6a5cdcad01c973fa);\n    \"#}\n    );\n  }\n\n  #[test]\n  fn fold_cjs_export_non_static() {\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    exports[foo] = 2;\n    exports.bar = 3;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    $abc$exports[foo] = 2;\n    $abc$exports.bar = 3;\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    module.exports[foo] = 2;\n    module.exports.bar = 3;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    $abc$exports[foo] = 2;\n    $abc$exports.bar = 3;\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    exports.foo = 2;\n    sideEffects(exports);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    $abc$exports.foo = 2;\n    sideEffects($abc$exports);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    exports.foo = 2;\n    sideEffects(module.exports);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    $abc$exports.foo = 2;\n    sideEffects($abc$exports);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    exports[foo] = 2;\n    console.log(exports[foo]);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    $abc$exports[foo] = 2;\n    console.log($abc$exports[foo]);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    exports[foo] = 2;\n    console.log(exports.foo);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    $abc$exports[foo] = 2;\n    console.log($abc$exports.foo);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    module.exports[foo] = 2;\n    console.log(module.exports[foo]);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    $abc$exports[foo] = 2;\n    console.log($abc$exports[foo]);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    module.exports[foo] = 2;\n    console.log(module.exports.foo);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    $abc$exports[foo] = 2;\n    console.log($abc$exports.foo);\n    \"#}\n    );\n\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    var module = {exports: {}};\n    module.exports.foo = 2;\n    console.log(module.exports.foo);\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$var$module = {\n        exports: {}\n    };\n    $abc$var$module.exports.foo = 2;\n    console.log($abc$var$module.exports.foo);\n    \"#}\n    );\n  }\n\n  #[test]\n  fn test_parse_self_reference() {\n    let (_collect, code, hoist) = parse(\n      r#\"\n    exports.foo = 10;\n    exports.something = function() {\n       return exports.foo;\n    }\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    var $abc$export$ce14ccb78c97a7d4;\n    $abc$export$6a5cdcad01c973fa = 10;\n    $abc$export$ce14ccb78c97a7d4 = function() {\n        return $abc$export$6a5cdcad01c973fa;\n    };\n    \"#}\n    );\n    assert_eq!(\n      hoist\n        .self_references\n        .iter()\n        .cloned()\n        .collect::<Vec<JsWord>>(),\n      vec![JsWord::from(\"foo\")]\n    );\n    assert_eq!(hoist.exported_symbols.len(), 3);\n    // First exported symbol is `export foo`\n    assert_eq!(\n      hoist.exported_symbols[0].local,\n      JsWord::from(\"$abc$export$6a5cdcad01c973fa\")\n    );\n    assert_eq!(hoist.exported_symbols[0].exported, JsWord::from(\"foo\"));\n\n    // Second is `export something`\n    assert_eq!(\n      hoist.exported_symbols[1].local,\n      JsWord::from(\"$abc$export$ce14ccb78c97a7d4\")\n    );\n    assert_eq!(\n      hoist.exported_symbols[1].exported,\n      JsWord::from(\"something\")\n    );\n\n    // Third is `export foo` again, but on the something location\n    assert_eq!(\n      hoist.exported_symbols[2].local,\n      JsWord::from(\"$abc$export$6a5cdcad01c973fa\")\n    );\n    assert_eq!(hoist.exported_symbols[2].exported, JsWord::from(\"foo\"));\n\n    assert_ne!(hoist.exported_symbols[2].loc, hoist.exported_symbols[0].loc);\n  }\n\n  #[test]\n  fn test_parse_module_exports() {\n    let (_collect, code, hoist) = parse(\n      r#\"\n    module.exports.foo = 10;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    $abc$export$6a5cdcad01c973fa = 10;\n    \"#}\n    );\n    assert_eq!(hoist.self_references.len(), 0);\n    assert_eq!(hoist.exported_symbols.len(), 1);\n    assert_eq!(\n      hoist.exported_symbols[0].local,\n      JsWord::from(\"$abc$export$6a5cdcad01c973fa\")\n    );\n    assert_eq!(hoist.exported_symbols[0].exported, JsWord::from(\"foo\"));\n  }\n\n  #[test]\n  fn test_parse_this() {\n    let (_collect, code, hoist) = parse(\n      r#\"\n    this.foo = 10;\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$export$6a5cdcad01c973fa;\n    $abc$export$6a5cdcad01c973fa = 10;\n    \"#}\n    );\n    assert_eq!(hoist.self_references.len(), 0);\n    assert_eq!(hoist.exported_symbols.len(), 1);\n    assert_eq!(\n      hoist.exported_symbols[0].local,\n      JsWord::from(\"$abc$export$6a5cdcad01c973fa\")\n    );\n    assert_eq!(hoist.exported_symbols[0].exported, JsWord::from(\"foo\"));\n  }\n\n  #[test]\n  fn test_parse_import_statement() {\n    let (_collect, code, hoist) = parse(\n      r#\"\n    import { x } from 'other';\n    async function test() {\n      console.log(x.foo);\n    }\n    \"#,\n    );\n\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other:esm\";\n    async function $abc$var$test() {\n        console.log((0, $abc$import$70a00e0a8474f72a$d141bba7fdc215a3).foo);\n    }\n    \"#}\n    );\n    assert_eq!(hoist.imported_symbols.len(), 1);\n    assert_eq!(hoist.imported_symbols[0].imported, JsWord::from(\"x\"));\n    assert_eq!(\n      hoist.imported_symbols[0].local,\n      JsWord::from(\"$abc$import$70a00e0a8474f72a$d141bba7fdc215a3\")\n    );\n    assert_eq!(hoist.imported_symbols[0].source, JsWord::from(\"other\"));\n    assert_eq!(hoist.imported_symbols[0].kind, ImportKind::Import);\n  }\n\n  #[test]\n  fn fold_dynamic_import() {\n    let (_collect, code, hoist) = parse(\n      r#\"\n    async function test() {\n      const x = await import('other');\n      console.log(x.foo);\n    }\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a$6a5cdcad01c973fa\") => (w!(\"other\"), w!(\"foo\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    async function $abc$var$test() {\n        const x = await $abc$importAsync$70a00e0a8474f72a;\n        console.log(x.foo);\n    }\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    async function test() {\n      const x = await import('other');\n      console.log(x[foo]);\n    }\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => (w!(\"other\"), w!(\"*\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    async function $abc$var$test() {\n        const x = await $abc$importAsync$70a00e0a8474f72a;\n        console.log(x[foo]);\n    }\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    async function test() {\n      const {foo} = await import('other');\n      console.log(foo);\n    }\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a$6a5cdcad01c973fa\") => (w!(\"other\"), w!(\"foo\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    async function $abc$var$test() {\n        const { foo: foo } = await $abc$importAsync$70a00e0a8474f72a;\n        console.log(foo);\n    }\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    async function test() {\n      const {foo: bar} = await import('other');\n      console.log(bar);\n    }\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a$6a5cdcad01c973fa\") => (w!(\"other\"), w!(\"foo\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    async function $abc$var$test() {\n        const { foo: bar } = await $abc$importAsync$70a00e0a8474f72a;\n        console.log(bar);\n    }\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    import('other').then(x => x.foo);\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a$6a5cdcad01c973fa\") => (w!(\"other\"), w!(\"foo\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    $abc$importAsync$70a00e0a8474f72a.then((x)=>x.foo);\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    import('other').then(x => x);\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => (w!(\"other\"), w!(\"*\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    $abc$importAsync$70a00e0a8474f72a.then((x)=>x);\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    import('other').then(({foo}) => foo);\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a$6a5cdcad01c973fa\") => (w!(\"other\"), w!(\"foo\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    $abc$importAsync$70a00e0a8474f72a.then(({ foo: foo })=>foo);\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    import('other').then(({foo: bar}) => bar);\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a$6a5cdcad01c973fa\") => (w!(\"other\"), w!(\"foo\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    $abc$importAsync$70a00e0a8474f72a.then(({ foo: bar })=>bar);\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    import('other').then(function (x) { return x.foo });\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a$6a5cdcad01c973fa\") => (w!(\"other\"), w!(\"foo\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    $abc$importAsync$70a00e0a8474f72a.then(function(x) {\n        return x.foo;\n    });\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    import('other').then(function (x) { return x });\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => (w!(\"other\"), w!(\"*\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    $abc$importAsync$70a00e0a8474f72a.then(function(x) {\n        return x;\n    });\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    import('other').then(function ({foo}) {});\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a$6a5cdcad01c973fa\") => (w!(\"other\"), w!(\"foo\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    $abc$importAsync$70a00e0a8474f72a.then(function({ foo: foo }) {});\n    \"#}\n    );\n\n    let (_collect, code, hoist) = parse(\n      r#\"\n    import('other').then(function ({foo: bar}) {});\n    \"#,\n    );\n    assert_eq_imported_symbols!(\n      hoist.imported_symbols,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a$6a5cdcad01c973fa\") => (w!(\"other\"), w!(\"foo\"))\n      }\n    );\n    assert_eq!(\n      hoist.dynamic_imports,\n      map! {\n        w!(\"$abc$importAsync$70a00e0a8474f72a\") => w!(\"other\")\n      }\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    import \"abc:other\";\n    $abc$importAsync$70a00e0a8474f72a.then(function({ foo: bar }) {});\n    \"#}\n    );\n  }\n\n  #[test]\n  fn fold_hoist_vars() {\n    let (_collect, code, _hoist) = parse(\n      r#\"\n    var x = 2;\n    var y = {x};\n    var z = {x: 3};\n    var w = {[x]: 4};\n\n    function test() {\n      var x = 3;\n    }\n    \"#,\n    );\n    assert_eq!(\n      code,\n      indoc! {r#\"\n    var $abc$var$x = 2;\n    var $abc$var$y = {\n        x: $abc$var$x\n    };\n    var $abc$var$z = {\n        x: 3\n    };\n    var $abc$var$w = {\n        [$abc$var$x]: 4\n    };\n    function $abc$var$test() {\n        var x = 3;\n    }\n    \"#}\n    );\n  }\n\n  #[test]\n  fn collect_exports() {\n    let (collect, _code, _hoist) = parse(\"export default function () {};\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"default\") => Export {\n          source: None,\n          specifier: \"default\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 1,\n            end_line: 1,\n            end_col: 30\n          },\n          is_esm: true\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\"export default function test () {};\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"default\") => Export {\n          source: None,\n          specifier: \"test\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 1,\n            end_line: 1,\n            end_col: 35\n          },\n          is_esm: true\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\"export default class {};\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"default\") => Export {\n          source: None,\n          specifier: \"default\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 1,\n            end_line: 1,\n            end_col: 24\n          },\n          is_esm: true\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\"export default class test {};\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"default\") => Export {\n          source: None,\n          specifier: \"test\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 1,\n            end_line: 1,\n            end_col: 29\n          },\n          is_esm: true\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\"export default foo;\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"default\") => Export {\n          source: None,\n          specifier: \"default\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 1,\n            end_line: 1,\n            end_col: 20\n          },\n          is_esm: true\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\"module.exports.foo = 2;\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"foo\") => Export {\n          source: None,\n          specifier: \"foo\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 16,\n            end_line: 1,\n            end_col: 19\n          },\n          is_esm: false\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\"module.exports['foo'] = 2;\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"foo\") => Export {\n          source: None,\n          specifier: \"foo\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 16,\n            end_line: 1,\n            end_col: 21\n          },\n          is_esm: false\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\"module.exports[`foo`] = 2;\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"foo\") => Export {\n          source: None,\n          specifier: \"foo\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 16,\n            end_line: 1,\n            end_col: 21\n          },\n          is_esm: false\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\"exports.foo = 2;\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"foo\") => Export {\n          source: None,\n          specifier: \"foo\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 9,\n            end_line: 1,\n            end_col: 12\n          },\n          is_esm: false\n        }\n      }\n    );\n\n    let (collect, _code, _hoist) = parse(\"this.foo = 2;\");\n    assert_eq!(\n      collect.exports,\n      map! {\n        w!(\"foo\") => Export {\n          source: None,\n          specifier: \"foo\".into(),\n          loc: SourceLocation {\n            start_line: 1,\n            start_col: 6,\n            end_line: 1,\n            end_col: 9\n          },\n          is_esm: false\n        }\n      }\n    );\n  }\n\n  #[test]\n  fn collect_this_exports() {\n    // module is wrapped when `this` accessor matches an export\n    let (collect, _code, _hoist) = parse(\n      r#\"\n      exports.foo = function() {\n        exports.bar()\n      }\n\n      exports.bar = function() {\n        this.baz()\n      }\n\n      exports.baz = function() {\n        return 2\n      }\n      \"#,\n    );\n    assert_eq!(\n      collect\n        .bailouts\n        .unwrap()\n        .iter()\n        .map(|b| &b.reason)\n        .collect::<Vec<_>>(),\n      vec![&BailoutReason::ThisInExport]\n    );\n    assert!(collect.should_wrap);\n\n    // module is not wrapped when `this` inside a class collides with an export\n    let (collect, _code, _hoist) = parse(\n      r#\"\n      class Foo {\n        constructor() {\n          this.a = 4\n        }\n\n        bar() {\n          return this.baz()\n        }\n\n        baz() {\n          return this.a\n        }\n      }\n\n      exports.baz = new Foo()\n      exports.a = 2\n      \"#,\n    );\n    assert_eq!(\n      collect\n        .bailouts\n        .unwrap()\n        .iter()\n        .map(|b| &b.reason)\n        .collect::<Vec<_>>(),\n      Vec::<&BailoutReason>::new()\n    );\n    assert!(!collect.should_wrap);\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/lib.rs",
    "content": "mod collect;\nmod constant_module;\nmod dependency_collector;\nmod env_replacer;\nmod fs;\nmod global_replacer;\nmod hoist;\nmod mdx;\nmod modules;\nmod node_replacer;\nmod react_lazy;\n#[cfg(test)]\nmod test_utils;\nmod typeof_replacer;\nmod utils;\n\nuse std::{\n  collections::{HashMap, HashSet},\n  path::{Path, PathBuf},\n  str::FromStr,\n};\n\npub use collect::CollectImportedSymbol;\nuse collect::{Collect, CollectResult};\nuse constant_module::ConstantModule;\nuse dependency_collector::Helpers;\npub use dependency_collector::{DependencyDescriptor, DependencyKind, dependency_collector};\nuse env_replacer::*;\nuse fs::inline_fs;\nuse global_replacer::GlobalReplacer;\npub use hoist::{ExportedSymbol, ImportedSymbol};\nuse hoist::{HoistResult, hoist};\nuse indexmap::IndexMap;\nuse mdx::{MdxAsset, TocNode, mdx};\nuse modules::esm2cjs;\nuse node_replacer::NodeReplacer;\nuse parcel_macros::{JsValue, MacroCallback, MacroError, Macros};\nuse path_slash::PathExt;\nuse react_lazy::ReactLazy;\nuse serde::{Deserialize, Serialize};\nuse swc_core::{\n  common::{\n    FileName, Globals, Mark, SourceMap, comments::SingleThreadedComments, errors::Handler,\n    pass::Optional, source_map::SourceMapGenConfig, sync::Lrc,\n  },\n  ecma::{\n    ast::{Expr, ExprStmt, Lit, Module, ModuleItem, Program, Stmt, Str},\n    atoms::Atom as JsWord,\n    codegen::text_writer::JsWriter,\n    parser::{EsSyntax, Parser, StringInput, Syntax, TsSyntax, error::Error, lexer::Lexer},\n    preset_env::{Mode::Entry, Targets, Version, Versions, preset_env},\n    transforms::{\n      base::{\n        assumptions::Assumptions,\n        fixer::{fixer, paren_remover},\n        helpers,\n        hygiene::hygiene,\n        resolver,\n      },\n      compat::reserved_words::reserved_words,\n      optimization::simplify::{dead_branch_remover, expr_simplifier},\n      proposal::decorators,\n      react, typescript,\n    },\n    visit::{FoldWith, VisitMutWith, VisitWith},\n  },\n};\nuse typeof_replacer::*;\nuse utils::{\n  CodeHighlight, Diagnostic, DiagnosticSeverity, ErrorBuffer, error_buffer_to_diagnostics,\n};\npub use utils::{SourceLocation, SourceType};\n\ntype SourceMapBuffer = Vec<(swc_core::common::BytePos, swc_core::common::LineCol)>;\n\n#[derive(Default, Serialize, Debug, Deserialize)]\npub struct Config {\n  pub filename: String,\n  #[serde(with = \"serde_bytes\")]\n  pub code: Vec<u8>,\n  pub module_id: String,\n  pub project_root: String,\n  pub env: HashMap<JsWord, JsWord>,\n  pub inline_fs: bool,\n  pub context: EnvContext,\n  #[serde(rename = \"type\")]\n  pub asset_type: Type,\n  pub jsx_pragma: Option<String>,\n  pub jsx_pragma_frag: Option<String>,\n  pub automatic_jsx_runtime: bool,\n  pub jsx_import_source: Option<String>,\n  pub decorators: bool,\n  pub use_define_for_class_fields: bool,\n  pub is_development: bool,\n  pub react_refresh: bool,\n  pub targets: Option<HashMap<String, String>>,\n  pub source_maps: bool,\n  pub scope_hoist: bool,\n  pub source_type: SourceType,\n  pub supports_module_workers: bool,\n  pub is_library: bool,\n  pub is_esm_output: bool,\n  pub trace_bailouts: bool,\n  pub is_swc_helpers: bool,\n  pub standalone: bool,\n  pub inline_constants: bool,\n}\n\n#[derive(Serialize, Deserialize, Debug, Default)]\n#[serde(rename_all = \"lowercase\")]\npub enum Type {\n  #[default]\n  Js,\n  Jsx,\n  Ts,\n  Tsx,\n  Mdx,\n}\n\n#[derive(Default, Serialize, Debug, Deserialize)]\n#[serde(rename_all = \"kebab-case\")]\npub enum EnvContext {\n  #[default]\n  Browser,\n  WebWorker,\n  ServiceWorker,\n  Worklet,\n  Node,\n  ElectronRenderer,\n  ElectronMain,\n  EdgeRoutine,\n  ReactClient,\n  ReactServer,\n}\n\nimpl Config {\n  fn is_browser(&self) -> bool {\n    use EnvContext::*;\n    matches!(\n      self.context,\n      Browser | WebWorker | ServiceWorker | Worklet | ElectronRenderer | ReactClient\n    )\n  }\n\n  fn is_node(&self) -> bool {\n    use EnvContext::*;\n    matches!(\n      self.context,\n      Node | ElectronMain | ElectronRenderer | ReactServer\n    )\n  }\n\n  fn is_server(&self) -> bool {\n    use EnvContext::*;\n    matches!(self.context, Node | ReactServer)\n  }\n\n  fn is_worker(&self) -> bool {\n    use EnvContext::*;\n    matches!(self.context, WebWorker | ServiceWorker)\n  }\n\n  fn is_worklet(&self) -> bool {\n    use EnvContext::*;\n    matches!(self.context, Worklet)\n  }\n\n  fn react_refresh(&self) -> bool {\n    self.is_browser()\n      && !self.is_library\n      && !self.is_worker()\n      && !self.is_worklet()\n      && self.react_refresh\n  }\n\n  fn inline_fs(&self) -> bool {\n    self.inline_fs && !self.is_node() && self.source_type != SourceType::Script\n  }\n\n  fn node_replacer(&self) -> bool {\n    self.is_node()\n  }\n\n  fn insert_node_globals(&self) -> bool {\n    !self.is_node() && self.source_type != SourceType::Script && !self.is_library\n  }\n\n  fn replace_env(&self) -> bool {\n    !self.is_node() || matches!(self.context, EnvContext::ReactServer)\n  }\n\n  fn is_jsx(&self) -> bool {\n    matches!(self.asset_type, Type::Jsx | Type::Tsx | Type::Mdx)\n  }\n\n  fn is_type_script(&self) -> bool {\n    matches!(self.asset_type, Type::Ts | Type::Tsx)\n  }\n}\n\n#[derive(Serialize, Debug, Default)]\n#[non_exhaustive]\npub struct TransformResult {\n  #[serde(with = \"serde_bytes\")]\n  pub code: Vec<u8>,\n  pub map: Option<String>,\n  pub shebang: Option<String>,\n  pub dependencies: Vec<DependencyDescriptor>,\n  pub hoist_result: Option<HoistResult>,\n  pub symbol_result: Option<CollectResult>,\n  pub diagnostics: Option<Vec<Diagnostic>>,\n  pub needs_esm_helpers: bool,\n  pub used_env: HashSet<JsWord>,\n  pub has_node_replacements: bool,\n  pub is_constant_module: bool,\n  pub directives: Vec<JsWord>,\n  pub helpers: Helpers,\n  pub mdx_toc: Vec<TocNode>,\n  pub mdx_exports: HashMap<JsWord, JsValue>,\n  pub mdx_assets: Vec<MdxAsset>,\n}\n\nfn targets_to_versions(targets: &Option<HashMap<String, String>>) -> Option<Versions> {\n  if let Some(targets) = targets {\n    macro_rules! set_target {\n      ($versions: ident, $name: ident) => {\n        let version = targets.get(stringify!($name));\n        if let Some(version) = version {\n          if let Ok(version) = Version::from_str(version.as_str()) {\n            $versions.$name = Some(version);\n          }\n        }\n      };\n    }\n\n    let mut versions = Versions::default();\n    set_target!(versions, chrome);\n    set_target!(versions, opera);\n    set_target!(versions, edge);\n    set_target!(versions, firefox);\n    set_target!(versions, safari);\n    set_target!(versions, ie);\n    set_target!(versions, ios);\n    set_target!(versions, android);\n    set_target!(versions, node);\n    set_target!(versions, electron);\n    return Some(versions);\n  }\n\n  None\n}\n\npub fn transform(\n  mut config: Config,\n  call_macro: Option<MacroCallback>,\n) -> Result<TransformResult, std::io::Error> {\n  let mut result = TransformResult::default();\n  let mut map_buf = vec![];\n\n  let code = unsafe { std::str::from_utf8_unchecked(&config.code) };\n  let source_map = Lrc::new(SourceMap::default());\n  // Attempt to convert the path to be relative to the project root.\n  // If outside the project root, use an absolute path so that if the project root moves the path still works.\n  let filename: PathBuf =\n    if let Ok(relative) = Path::new(&config.filename).strip_prefix(&config.project_root) {\n      relative.to_slash_lossy().into()\n    } else {\n      PathBuf::from(&config.filename)\n    };\n\n  let (module, comments) = if matches!(config.asset_type, Type::Mdx) {\n    source_map.new_source_file(Lrc::new(FileName::Real(filename)), code.into());\n\n    let res = mdx(&config);\n    match res {\n      Err(diagnostic) => {\n        result.diagnostics = Some(vec![diagnostic]);\n        return Ok(result);\n      }\n      Ok(res) => {\n        result.mdx_toc = res.toc;\n        result.mdx_exports = res.exports;\n        result.mdx_assets = res.assets;\n        (Program::Module(res.module), res.comments)\n      }\n    }\n  } else {\n    let module = parse(code, filename, &source_map, &config);\n\n    match module {\n      Err(errs) => {\n        let error_buffer = ErrorBuffer::default();\n        let handler = Handler::with_emitter(true, false, Box::new(error_buffer.clone()));\n        for err in errs {\n          err.into_diagnostic(&handler).emit();\n        }\n\n        result.diagnostics = Some(error_buffer_to_diagnostics(&error_buffer, &source_map));\n        return Ok(result);\n      }\n      Ok((module, comments)) => (module, comments),\n    }\n  };\n\n  let mut module = module;\n  result.shebang = match &mut module {\n    Program::Module(module) => module.shebang.take().map(|s| s.to_string()),\n    Program::Script(script) => script.shebang.take().map(|s| s.to_string()),\n  };\n\n  match &module {\n    Program::Module(module) => {\n      for item in &module.body {\n        if let ModuleItem::Stmt(Stmt::Expr(ExprStmt { expr, .. })) = item {\n          if let Expr::Lit(Lit::Str(Str { value, .. })) = &**expr {\n            result.directives.push(value.clone());\n            continue;\n          }\n        }\n        break;\n      }\n    }\n    Program::Script(script) => {\n      for item in &script.body {\n        if let Stmt::Expr(ExprStmt { expr, .. }) = item {\n          if let Expr::Lit(Lit::Str(Str { value, .. })) = &**expr {\n            result.directives.push(value.clone());\n            continue;\n          }\n        }\n        break;\n      }\n    }\n  }\n\n  if config.is_server() && !config.is_library && result.directives.contains(&\"use client\".into()) {\n    config.context = EnvContext::ReactClient;\n    config.is_esm_output = true;\n  } else if !config.is_server()\n    && !config.is_library\n    && result.directives.contains(&\"use server\".into())\n  {\n    config.context = EnvContext::ReactServer;\n    config.is_esm_output = false;\n  }\n\n  let mut global_deps = vec![];\n  let mut fs_deps = vec![];\n  let should_inline_fs =\n    config.inline_fs() && config.source_type != SourceType::Script && code.contains(\"readFileSync\");\n  let should_import_swc_helpers = match config.source_type {\n    SourceType::Module => true,\n    SourceType::Script => false,\n  };\n\n  swc_core::common::GLOBALS.set(&Globals::new(), || {\n    let error_buffer = ErrorBuffer::default();\n    let handler = Handler::with_emitter(true, false, Box::new(error_buffer.clone()));\n    swc_core::common::errors::HANDLER.set(&handler, || {\n      helpers::HELPERS.set(\n        &helpers::Helpers::new(\n          /* external helpers from @swc/helpers */ should_import_swc_helpers,\n        ),\n        || {\n          let mut react_options = react::Options::default();\n          if config.is_jsx() {\n            if let Some(jsx_pragma) = &config.jsx_pragma {\n              react_options.pragma = Some(Lrc::new(jsx_pragma.clone()));\n            }\n            if let Some(jsx_pragma_frag) = &config.jsx_pragma_frag {\n              react_options.pragma_frag = Some(Lrc::new(jsx_pragma_frag.clone()));\n            }\n            react_options.development = Some(config.is_development);\n            react_options.refresh = if config.react_refresh() {\n              Some(react::RefreshOptions::default())\n            } else {\n              None\n            };\n\n            react_options.runtime = if config.automatic_jsx_runtime {\n              if let Some(import_source) = &config.jsx_import_source {\n                react_options.import_source = Some(import_source.clone().into());\n              }\n              Some(react::Runtime::Automatic)\n            } else {\n              Some(react::Runtime::Classic)\n            };\n          }\n\n          let global_mark = Mark::fresh(Mark::root());\n          let unresolved_mark = Mark::fresh(Mark::root());\n          module.mutate(&mut (\n            resolver(unresolved_mark, global_mark, config.is_type_script()),\n            // Decorators can use type information, so must run before the TypeScript pass.\n            Optional::new(\n              decorators::decorators(decorators::Config {\n                legacy: true,\n                // Always disabled for now, SWC's implementation doesn't match TSC.\n                emit_metadata: false,\n                // use_define_for_class_fields is ignored here, uses preset-env assumptions instead\n                ..Default::default()\n              }),\n              config.decorators,\n            ),\n            Optional::new(\n              typescript::tsx(\n                source_map.clone(),\n                Default::default(),\n                typescript::TsxConfig {\n                  pragma: react_options.pragma.clone(),\n                  pragma_frag: react_options.pragma_frag.clone(),\n                },\n                Some(&comments),\n                unresolved_mark,\n                global_mark,\n              ),\n              config.is_type_script() && config.is_jsx(),\n            ),\n            Optional::new(\n              typescript::strip(unresolved_mark, global_mark),\n              config.is_type_script() && !config.is_jsx(),\n            ),\n          ));\n\n          let is_module = module.is_module();\n          // If it's a script, convert into module. This needs to happen after\n          // the resolver (which behaves differently for non-/strict mode).\n          let module = match module {\n            Program::Module(module) => module,\n            Program::Script(script) => Module {\n              span: script.span,\n              shebang: None,\n              body: script.body.into_iter().map(ModuleItem::Stmt).collect(),\n            },\n          };\n\n          let mut program = Program::Module(module);\n          program.mutate(&mut Optional::new(\n            react::react(\n              source_map.clone(),\n              Some(&comments),\n              react_options,\n              global_mark,\n              unresolved_mark,\n            ),\n            config.is_jsx(),\n          ));\n          let mut module = program.expect_module();\n\n          let mut preset_env_config = swc_core::ecma::preset_env::Config {\n            dynamic_import: true,\n            ..Default::default()\n          };\n          let versions = targets_to_versions(&config.targets);\n          let mut should_run_preset_env = false;\n          if !config.is_swc_helpers {\n            // Avoid transpiling @swc/helpers so that we don't cause infinite recursion.\n            // Filter the versions for preset_env only so that syntax support checks\n            // (e.g. in esm2cjs) still work correctly.\n            if let Some(versions) = versions {\n              should_run_preset_env = true;\n              preset_env_config.targets = Some(Targets::Versions(versions));\n              preset_env_config.shipped_proposals = true;\n              preset_env_config.mode = Some(Entry);\n              preset_env_config.bugfixes = true;\n            }\n          }\n\n          let mut assumptions = Assumptions::default();\n          if config.is_type_script() && !config.use_define_for_class_fields {\n            assumptions.set_public_class_fields |= true;\n          }\n\n          let mut diagnostics = vec![];\n          if let Some(call_macro) = call_macro {\n            let mut errors = Vec::new();\n            module = module.fold_with(&mut Macros::new(call_macro, &source_map, &mut errors));\n            for error in errors {\n              diagnostics.push(macro_error_to_diagnostic(error, &source_map));\n            }\n          }\n\n          if config.scope_hoist && config.inline_constants {\n            let mut constant_module = ConstantModule::new();\n            module.visit_with(&mut constant_module);\n            result.is_constant_module = constant_module.is_constant_module;\n          }\n\n          module.visit_mut_with(&mut (\n            Optional::new(\n              TypeofReplacer::new(unresolved_mark, config.is_node()),\n              config.source_type != SourceType::Script,\n            ),\n            // Inline process.env and process.browser,\n            Optional::new(\n              EnvReplacer {\n                replace_env: config.replace_env(),\n                env: &config.env,\n                is_browser: config.is_browser(),\n                used_env: &mut result.used_env,\n                source_map: source_map.clone(),\n                diagnostics: &mut diagnostics,\n                unresolved_mark,\n              },\n              config.source_type != SourceType::Script && !config.is_library,\n            ),\n            paren_remover(Some(&comments)),\n            // Simplify expressions and remove dead branches so that we\n            // don't include dependencies inside conditionals that are always false.\n            expr_simplifier(unresolved_mark, Default::default()),\n            dead_branch_remover(unresolved_mark),\n          ));\n\n          let mut module = module.fold_with(&mut Optional::new(\n            inline_fs(\n              config.filename.as_str(),\n              source_map.clone(),\n              unresolved_mark,\n              global_mark,\n              &config.project_root,\n              &mut fs_deps,\n              is_module,\n            ),\n            should_inline_fs,\n          ));\n\n          module.visit_mut_with(\n            // Replace __dirname and __filename with placeholders in Node env\n            &mut Optional::new(\n              NodeReplacer {\n                source_map: source_map.clone(),\n                items: &mut global_deps,\n                global_mark,\n                globals: IndexMap::new(),\n                filename: Path::new(&config.filename),\n                unresolved_mark,\n                has_node_replacements: &mut result.has_node_replacements,\n                is_esm: config.is_esm_output,\n              },\n              config.node_replacer(),\n            ),\n          );\n\n          module.visit_mut_with(\n            // Insert dependencies for node globals\n            &mut Optional::new(\n              GlobalReplacer {\n                source_map: source_map.clone(),\n                items: &mut global_deps,\n                global_mark,\n                globals: IndexMap::new(),\n                project_root: Path::new(&config.project_root),\n                filename: Path::new(&config.filename),\n                unresolved_mark,\n                scope_hoist: config.scope_hoist,\n              },\n              config.insert_node_globals(),\n            ),\n          );\n\n          let mut program = Program::Module(module);\n          program.mutate(&mut (\n            // Transpile new syntax to older syntax if needed\n            Optional::new(\n              preset_env(\n                unresolved_mark,\n                Some(&comments),\n                preset_env_config,\n                assumptions,\n                &mut Default::default(),\n              ),\n              should_run_preset_env,\n            ),\n            // Inject SWC helpers if needed.\n            helpers::inject_helpers(global_mark),\n          ));\n          let mut module = program.expect_module();\n\n          // Flush Id=(JsWord, SyntaxContexts) into unique names and reresolve to\n          // set global_mark for all nodes, even generated ones.\n          // - This will also remove any other other marks (like ignore_mark)\n          // This only needs to be done if preset_env ran because all other transforms\n          // insert declarations with global_mark (even though they are generated).\n          if config.scope_hoist && should_run_preset_env {\n            module.visit_mut_with(&mut (hygiene(), resolver(unresolved_mark, global_mark, false)))\n          }\n\n          // Collect dependencies\n          let ignore_mark = Mark::fresh(Mark::root());\n          let (module, helpers) = dependency_collector(\n            module,\n            source_map.clone(),\n            &mut result.dependencies,\n            ignore_mark,\n            unresolved_mark,\n            &config,\n            &mut diagnostics,\n          );\n\n          result.helpers = helpers;\n          diagnostics.extend(error_buffer_to_diagnostics(&error_buffer, &source_map));\n\n          if diagnostics\n            .iter()\n            .any(|d| d.severity == DiagnosticSeverity::Error)\n          {\n            result.diagnostics = Some(diagnostics);\n            return Ok(result);\n          }\n\n          let mut collect = Collect::new(\n            source_map.clone(),\n            unresolved_mark,\n            ignore_mark,\n            global_mark,\n            config.trace_bailouts,\n            is_module,\n          );\n          module.visit_with(&mut collect);\n          if let Some(bailouts) = &collect.bailouts {\n            diagnostics.extend(bailouts.iter().map(|bailout| bailout.to_diagnostic()));\n          }\n\n          if matches!(\n            config.context,\n            EnvContext::ReactClient | EnvContext::ReactServer\n          ) {\n            module.visit_with(&mut ReactLazy::new(&collect, &mut result.dependencies));\n          }\n\n          let mut module = if config.scope_hoist {\n            let res = hoist(module, config.module_id.as_str(), unresolved_mark, &collect);\n            match res {\n              Ok((module, hoist_result, hoist_diagnostics)) => {\n                result.hoist_result = Some(hoist_result);\n                diagnostics.extend(hoist_diagnostics);\n                module\n              }\n              Err(diagnostics) => {\n                result.diagnostics = Some(diagnostics);\n                return Ok(result);\n              }\n            }\n          } else {\n            // Bail if we could not statically analyze.\n            if collect.static_cjs_exports && !collect.should_wrap {\n              result.symbol_result = Some(collect.into());\n            }\n\n            let (module, needs_helpers) = esm2cjs(module, unresolved_mark, versions);\n            result.needs_esm_helpers = needs_helpers;\n            module\n          };\n\n          module.visit_mut_with(&mut (reserved_words(), hygiene(), fixer(Some(&comments))));\n\n          result.dependencies.extend(global_deps);\n          result.dependencies.extend(fs_deps);\n\n          if !diagnostics.is_empty() {\n            result.diagnostics = Some(diagnostics);\n          }\n\n          let (buf, src_map_buf) = emit(source_map.clone(), comments, &module, config.source_maps)?;\n          if config.source_maps\n            && source_map\n              .build_source_map_with_config(&src_map_buf, None, SourceMapConfig)\n              .to_writer(&mut map_buf)\n              .is_ok()\n          {\n            result.map = Some(String::from_utf8(map_buf).unwrap());\n          }\n          result.code = buf;\n          Ok(result)\n        },\n      )\n    })\n  })\n}\n\npub type ParseResult<T> = Result<T, Vec<Error>>;\n\nfn parse(\n  code: &str,\n  filename: PathBuf,\n  source_map: &Lrc<SourceMap>,\n  config: &Config,\n) -> ParseResult<(Program, SingleThreadedComments)> {\n  let source_file = source_map.new_source_file(Lrc::new(FileName::Real(filename)), code.into());\n  let comments = SingleThreadedComments::default();\n  let syntax = if config.is_type_script() {\n    Syntax::Typescript(TsSyntax {\n      tsx: config.is_jsx(),\n      decorators: config.decorators,\n      ..Default::default()\n    })\n  } else {\n    Syntax::Es(EsSyntax {\n      jsx: config.is_jsx(),\n      export_default_from: true,\n      decorators: config.decorators,\n      import_attributes: true,\n      allow_return_outside_function: true,\n      ..Default::default()\n    })\n  };\n\n  let lexer = Lexer::new(\n    syntax,\n    Default::default(),\n    StringInput::from(&*source_file),\n    Some(&comments),\n  );\n\n  let mut parser = Parser::new_from(lexer);\n  let result = parser.parse_program();\n\n  let module = match result {\n    Err(err) => {\n      // A fatal error\n      return Err(vec![err]);\n    }\n    Ok(module) => module,\n  };\n  // Recoverable errors\n  let errors = parser.take_errors();\n  if !errors.is_empty() {\n    return Err(errors);\n  }\n\n  Ok((module, comments))\n}\n\nfn emit(\n  source_map: Lrc<SourceMap>,\n  comments: SingleThreadedComments,\n  module: &Module,\n  source_maps: bool,\n) -> Result<(Vec<u8>, SourceMapBuffer), std::io::Error> {\n  let mut src_map_buf = vec![];\n  let mut buf = vec![];\n  {\n    let writer = Box::new(JsWriter::new(\n      source_map.clone(),\n      \"\\n\",\n      &mut buf,\n      if source_maps {\n        Some(&mut src_map_buf)\n      } else {\n        None\n      },\n    ));\n    let config = swc_core::ecma::codegen::Config::default()\n      .with_target(swc_core::ecma::ast::EsVersion::Es5)\n      // Make sure the output works regardless of whether it's loaded with the correct (utf8) encoding\n      .with_ascii_only(true);\n    let mut emitter = swc_core::ecma::codegen::Emitter {\n      cfg: config,\n      comments: Some(&comments),\n      cm: source_map,\n      wr: writer,\n    };\n\n    emitter.emit_module(module)?;\n  }\n\n  Ok((buf, src_map_buf))\n}\n\n// Exclude macro expansions from source maps.\nstruct SourceMapConfig;\nimpl SourceMapGenConfig for SourceMapConfig {\n  fn file_name_to_source(&self, f: &FileName) -> String {\n    f.to_string()\n  }\n\n  fn skip(&self, f: &FileName) -> bool {\n    matches!(f, FileName::MacroExpansion | FileName::Internal(..))\n  }\n}\n\nfn macro_error_to_diagnostic(error: MacroError, source_map: &SourceMap) -> Diagnostic {\n  match error {\n    MacroError::EvaluationError(span) => Diagnostic {\n      message: \"Could not statically evaluate macro argument\".into(),\n      code_highlights: Some(vec![CodeHighlight {\n        message: None,\n        loc: SourceLocation::from(source_map, span),\n      }]),\n      hints: None,\n      show_environment: false,\n      severity: crate::utils::DiagnosticSeverity::Error,\n      documentation_url: None,\n    },\n    MacroError::LoadError(err, span) => Diagnostic {\n      message: format!(\"Error loading macro: {}\", err),\n      code_highlights: Some(vec![CodeHighlight {\n        message: None,\n        loc: SourceLocation::from(source_map, span),\n      }]),\n      hints: None,\n      show_environment: false,\n      severity: crate::utils::DiagnosticSeverity::Error,\n      documentation_url: None,\n    },\n    MacroError::ExecutionError(err, span) => Diagnostic {\n      message: format!(\"Error evaluating macro: {}\", err),\n      code_highlights: Some(vec![CodeHighlight {\n        message: None,\n        loc: SourceLocation::from(source_map, span),\n      }]),\n      hints: None,\n      show_environment: false,\n      severity: crate::utils::DiagnosticSeverity::Error,\n      documentation_url: None,\n    },\n    MacroError::ParseError(err) => {\n      let error_buffer = ErrorBuffer::default();\n      let handler = Handler::with_emitter(true, false, Box::new(error_buffer.clone()));\n      err.into_diagnostic(&handler).emit();\n      let mut diagnostics = error_buffer_to_diagnostics(&error_buffer, source_map);\n      return diagnostics.pop().unwrap();\n    }\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/mdx.rs",
    "content": "use std::{borrow::Cow, collections::HashMap};\n\nuse crate::{\n  Config, SourceLocation,\n  utils::{CodeHighlight, Diagnostic, DiagnosticSeverity},\n};\nuse markdown::{\n  Location,\n  mdast::{AttributeValueExpression, Code, MdxjsEsm, Node, Text},\n  message::{Message, Place},\n  unist::Position,\n};\nuse mdxjs::{\n  Options,\n  hast::{AttributeContent, AttributeValue, MdxJsxAttribute},\n  hast_util_to_swc, mdast_util_from_mdx, mdast_util_to_hast, mdx_plugin_recma_document,\n  mdx_plugin_recma_jsx_rewrite,\n};\nuse parcel_macros::{Evaluator, JsValue};\nuse rustc_hash::FxHashSet;\nuse swc_core::{\n  common::{\n    DUMMY_SP, SourceMap,\n    comments::{Comments, SingleThreadedComments},\n    sync::Lrc,\n  },\n  ecma::{\n    ast::{\n      CallExpr, Callee, Decl, ExportDefaultExpr, ExportSpecifier, Expr, ExprOrSpread, Ident,\n      JSXAttrName, JSXAttrOrSpread, JSXAttrValue, JSXElement, JSXElementName, JSXExpr,\n      JSXExprContainer, JSXOpeningElement, Lit, Module, ModuleDecl, ModuleItem, Stmt, VarDeclKind,\n    },\n    atoms::Atom as JsWord,\n    codegen::to_code,\n    parser::{EsSyntax, Parser, StringInput, Syntax, TsSyntax, lexer::Lexer},\n    utils::for_each_binding_ident,\n    visit::{VisitMut, VisitMutWith},\n  },\n};\n\npub struct MdxResult {\n  pub module: Module,\n  pub comments: SingleThreadedComments,\n  pub toc: Vec<TocNode>,\n  pub exports: HashMap<JsWord, JsValue>,\n  pub assets: Vec<MdxAsset>,\n}\n\n#[derive(serde::Serialize, Debug)]\npub struct MdxAsset {\n  pub lang: String,\n  pub code: String,\n  pub position: Option<Position>,\n}\n\npub fn mdx(config: &Config) -> Result<MdxResult, Diagnostic> {\n  let mut options: Options = Options {\n    filepath: Some(config.filename.clone()),\n    development: config.is_development,\n    jsx: true,\n    ..Default::default()\n  };\n\n  let code = unsafe { std::str::from_utf8_unchecked(&config.code) };\n  let mut ast = mdast_util_from_mdx(code, &options)?;\n  let mut contents: Vec<_> = Vec::new();\n  toc(&ast, &mut contents);\n\n  let mut assets = Vec::new();\n  transform_code(&mut ast, &mut assets);\n  if !assets.is_empty() {\n    options.provider_import_source = Some(\"@parcel/transformer-js/src/mdx-components\".into());\n    let children = ast.children_mut().unwrap();\n    let imports = (0..assets.len()).map(|i| {\n      Node::MdxjsEsm(MdxjsEsm {\n        value: format!(\"import __parcelMdxImport{} from 'mdx-{}'\", i, i),\n        position: None,\n        stops: vec![],\n      })\n    });\n    children.extend(imports);\n  }\n\n  let hast = mdast_util_to_hast(&ast);\n  let location = Location::new(code.as_bytes());\n  let mut explicit_jsxs = FxHashSet::default();\n  let mut program = hast_util_to_swc(&hast, &options, Some(&location), &mut explicit_jsxs)?;\n  let exports = constant_exports(&program.module);\n\n  program.module.visit_mut_with(&mut DependencyVisitor);\n\n  mdx_plugin_recma_document(&mut program, &options, Some(&location))?;\n  mdx_plugin_recma_jsx_rewrite(&mut program, &options, Some(&location), &explicit_jsxs)?;\n\n  let comments = SingleThreadedComments::default();\n  for c in program.comments {\n    comments.add_leading(c.span.lo, c.clone());\n  }\n\n  Ok(MdxResult {\n    module: program.module,\n    comments,\n    toc: contents,\n    exports,\n    assets,\n  })\n}\n\n#[derive(serde::Serialize, Debug)]\npub struct TocNode {\n  pub title: String,\n  pub level: u8,\n  pub children: Vec<TocNode>,\n}\n\nfn toc(node: &Node, results: &mut Vec<TocNode>) {\n  match node {\n    Node::Heading(heading) => {\n      let toc = TocNode {\n        title: text(node).into_owned(),\n        level: heading.depth,\n        children: Vec::new(),\n      };\n\n      let mut children = results;\n      while let Some(last) = children.last() {\n        if toc.level > last.level {\n          children = &mut children.last_mut().unwrap().children;\n        } else {\n          break;\n        }\n      }\n      children.push(toc);\n    }\n    _ => {\n      if let Some(children) = node.children() {\n        for child in children {\n          toc(child, results)\n        }\n      }\n    }\n  }\n}\n\nfn text<'a>(node: &'a Node) -> Cow<'a, str> {\n  match node {\n    Node::Text(text) => Cow::Borrowed(&text.value),\n    _ => {\n      let mut result = Cow::Borrowed(\"\");\n      if let Some(children) = node.children() {\n        for child in children {\n          result += text(child);\n        }\n      }\n      result\n    }\n  }\n}\n\nstruct DependencyVisitor;\n\nimpl VisitMut for DependencyVisitor {\n  fn visit_mut_jsx_opening_element(&mut self, node: &mut JSXOpeningElement) {\n    node.visit_mut_children_with(self);\n\n    let element = match &node.name {\n      JSXElementName::Ident(id) => id.sym.as_str(),\n      _ => return,\n    };\n\n    for prop in &mut node.attrs {\n      if let JSXAttrOrSpread::JSXAttr(prop) = prop {\n        if let (JSXAttrName::Ident(name), Some(JSXAttrValue::Lit(specifier @ Lit::Str(_)))) =\n          (&prop.name, &prop.value)\n        {\n          if is_url(element, name.sym.as_str()) {\n            prop.value = Some(JSXAttrValue::JSXExprContainer(JSXExprContainer {\n              expr: JSXExpr::Expr(Box::new(Expr::Call(CallExpr {\n                callee: Callee::Expr(Box::new(Expr::Ident(Ident::new_no_ctxt(\n                  \"__parcel_url_dep__\".into(),\n                  DUMMY_SP,\n                )))),\n                args: vec![\n                  ExprOrSpread {\n                    expr: Box::new(Expr::Lit(specifier.clone())),\n                    spread: None,\n                  },\n                  ExprOrSpread {\n                    expr: Box::new(Expr::Lit(Lit::Bool(\n                      (element == \"a\" || element == \"iframe\").into(),\n                    ))),\n                    spread: None,\n                  },\n                ],\n                ..Default::default()\n              }))),\n              span: prop.span,\n            }));\n          }\n        }\n      }\n    }\n  }\n}\n\nfn is_url(el: &str, prop: &str) -> bool {\n  matches!(\n    (el, prop),\n    (\"img\", \"src\")\n      | (\"audio\", \"src\")\n      | (\"video\", \"src\")\n      | (\"video\", \"poster\")\n      | (\"source\", \"src\")\n      | (\"track\", \"src\")\n      | (\"iframe\", \"src\")\n      | (\"script\", \"src\")\n      | (\"embed\", \"src\")\n      | (\"a\", \"href\")\n      | (\"link\", \"href\")\n      | (\"use\", \"href\")\n      | (\"use\", \"xlink:href\")\n      | (\"script\", \"href\")\n      | (\"script\", \"xlink:href\")\n      | (\"image\", \"href\")\n      | (\"image\", \"xlink:href\")\n  )\n}\n\nfn constant_exports(module: &Module) -> HashMap<JsWord, JsValue> {\n  let mut exports = HashMap::new();\n  let sm = Default::default();\n  let mut evaluator = Evaluator::new(&sm);\n\n  for item in &module.body {\n    match item {\n      ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(exp)) => {\n        if let Decl::Var(var) = &exp.decl {\n          if var.kind == VarDeclKind::Const {\n            for decl in &var.decls {\n              if let Some(expr) = &decl.init {\n                let val = evaluator.eval(&*expr);\n                evaluator.eval_pat(val, &decl.name);\n\n                for_each_binding_ident(&decl.name, |id| {\n                  if let Some(Ok(val)) = evaluator.constants.get(&id.to_id()) {\n                    exports.insert(id.id.sym.clone(), val.clone());\n                  }\n                });\n              }\n            }\n          }\n        }\n      }\n      _ => {}\n    }\n  }\n\n  exports\n}\n\n/// Transform code fences with language and meta string into <CodeBlock> components.\nfn transform_code(node: &mut Node, assets: &mut Vec<MdxAsset>) {\n  match node {\n    Node::Code(code) if code.lang.is_some() => {\n      if let Some(replacement) = parse_code_block(code, assets) {\n        *node = replacement;\n      }\n    }\n    _ => {\n      if let Some(children) = node.children_mut() {\n        for child in children {\n          transform_code(child, assets);\n        }\n      }\n    }\n  }\n}\n\nfn parse_code_block(code: &Code, assets: &mut Vec<MdxAsset>) -> Option<Node> {\n  // Parse meta string as JSX props.\n  let ast = if let Some(meta) = &code.meta {\n    mdast_util_from_mdx(&format!(\"<CodeBlock {} />\", meta), &Default::default()).ok()?\n  } else {\n    mdast_util_from_mdx(\"<CodeBlock />\", &Default::default()).ok()?\n  };\n\n  if let Node::Root(root) = ast {\n    let mut node = root.children.into_iter().next().unwrap();\n    if let Node::MdxJsxFlowElement(ref mut element) = node {\n      if let Some(lang) = &code.lang {\n        element\n          .attributes\n          .push(AttributeContent::Property(MdxJsxAttribute {\n            name: \"lang\".into(),\n            value: Some(AttributeValue::Literal(lang.clone())),\n          }));\n\n        // Create an asset if the `render` prop is set to true.\n        if let Some(attr_idx) = element\n          .attributes\n          .iter()\n          .position(|attr| matches!(attr, AttributeContent::Property(p) if p.name == \"render\"))\n        {\n          if matches!(lang.as_str(), \"js\" | \"jsx\" | \"ts\" | \"tsx\") {\n            if let AttributeContent::Property(attr) = &mut element.attributes[attr_idx] {\n              attr.value = Some(AttributeValue::Expression(AttributeValueExpression {\n                value: format!(\"__parcelMdxImport{}\", assets.len()),\n                stops: vec![],\n              }));\n\n              assets.push(MdxAsset {\n                lang: lang.clone(),\n                code: transform_js_code_block(&code.value, lang),\n                position: code.position.clone(),\n              });\n            }\n          } else {\n            element.attributes.remove(attr_idx);\n            assets.push(MdxAsset {\n              lang: lang.clone(),\n              code: code.value.to_owned(),\n              position: code.position.clone(),\n            });\n          }\n        }\n      }\n\n      element.children = vec![Node::Text(Text {\n        value: code.value.clone(),\n        position: code.position.clone(),\n      })];\n      element.position = code.position.clone();\n      return Some(node);\n    }\n  }\n\n  None\n}\n\nfn transform_js_code_block(code: &str, lang: &str) -> String {\n  let code = code.to_owned();\n  let source_map = Lrc::new(SourceMap::default());\n  let source_file =\n    source_map.new_source_file(Lrc::new(swc_core::common::FileName::Anon), code.clone());\n\n  let lexer = Lexer::new(\n    if lang == \"ts\" || lang == \"tsx\" {\n      Syntax::Typescript(TsSyntax {\n        tsx: lang == \"tsx\",\n        ..Default::default()\n      })\n    } else {\n      Syntax::Es(EsSyntax {\n        jsx: lang == \"jsx\",\n        ..Default::default()\n      })\n    },\n    Default::default(),\n    StringInput::from(&*source_file),\n    None,\n  );\n\n  let mut parser = Parser::new_from(lexer);\n  match parser.parse_module() {\n    Err(_) => code,\n    Ok(mut module) => {\n      // Export the last declaration or expression if there are no explicit exports.\n      if !has_default_export(&module) {\n        let mut export_name = None;\n        for item in module.body.iter_mut().rev() {\n          match item {\n            ModuleItem::Stmt(Stmt::Decl(decl)) => {\n              match decl {\n                Decl::Class(c) => {\n                  export_name = Some(c.ident.clone());\n                }\n                Decl::Fn(f) => {\n                  export_name = Some(f.ident.clone());\n                }\n                _ => continue,\n              }\n              break;\n            }\n            ModuleItem::Stmt(Stmt::Expr(expr)) => {\n              *item = ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultExpr(ExportDefaultExpr {\n                expr: expr.expr.clone(),\n                span: expr.span,\n              }));\n              break;\n            }\n            _ => {}\n          }\n        }\n\n        if let Some(export_name) = export_name {\n          module\n            .body\n            .push(ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultExpr(\n              ExportDefaultExpr {\n                expr: Box::new(Expr::JSXElement(Box::new(JSXElement {\n                  opening: JSXOpeningElement {\n                    name: JSXElementName::Ident(export_name),\n                    attrs: vec![],\n                    self_closing: true,\n                    type_args: None,\n                    span: DUMMY_SP,\n                  },\n                  children: vec![],\n                  closing: None,\n                  span: DUMMY_SP,\n                }))),\n                span: DUMMY_SP,\n              },\n            )));\n        }\n      }\n\n      to_code(&module)\n    }\n  }\n}\n\nfn has_default_export(module: &Module) -> bool {\n  module.body.iter().any(|item| match item {\n    ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultDecl(_))\n    | ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultExpr(_)) => true,\n    ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(n)) => n.specifiers.iter().any(|s| match s {\n      ExportSpecifier::Default(_) => true,\n      ExportSpecifier::Namespace(_) => false,\n      ExportSpecifier::Named(named) => {\n        matches!(&named.exported, Some(exported) if exported.atom() == \"default\")\n      }\n    }),\n    _ => false,\n  })\n}\n\nimpl From<Message> for Diagnostic {\n  fn from(value: Message) -> Self {\n    let loc = if let Some(place) = value.place {\n      Some(match *place {\n        Place::Point(point) => SourceLocation {\n          start_line: point.line,\n          start_col: point.column,\n          end_line: point.line,\n          end_col: point.column,\n        },\n        Place::Position(pos) => SourceLocation {\n          start_line: pos.start.line,\n          start_col: pos.start.column,\n          end_line: pos.end.line,\n          end_col: pos.end.column,\n        },\n      })\n    } else {\n      None\n    };\n\n    Diagnostic {\n      message: value.reason,\n      severity: DiagnosticSeverity::Error,\n      hints: None,\n      code_highlights: loc.map(|loc| vec![CodeHighlight { message: None, loc }]),\n      show_environment: false,\n      documentation_url: None,\n    }\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/modules.rs",
    "content": "use std::collections::{HashMap, HashSet};\n\nuse inflector::Inflector;\nuse swc_core::{\n  common::{DUMMY_SP, Mark, Span, SyntaxContext},\n  ecma::{\n    ast::*,\n    atoms::Atom as JsWord,\n    preset_env::{Feature, Versions},\n    utils::stack_size::maybe_grow_default,\n    visit::{Fold, FoldWith},\n  },\n};\n\nuse crate::{\n  fold_member_expr_skip_prop, id,\n  utils::{get_undefined_ident, match_export_name, match_export_name_ident},\n};\n\npub fn esm2cjs(node: Module, unresolved_mark: Mark, versions: Option<Versions>) -> (Module, bool) {\n  let mut fold = ESMFold {\n    imports: HashMap::new(),\n    require_names: HashMap::new(),\n    interops: HashSet::new(),\n    requires: vec![],\n    exports: vec![],\n    needs_helpers: false,\n    in_export_decl: false,\n    in_function_scope: false,\n    mark: Mark::fresh(Mark::root()),\n    unresolved_mark,\n    versions,\n  };\n\n  let module = node.fold_with(&mut fold);\n  (module, fold.needs_helpers)\n}\n\nstruct ESMFold {\n  // Map of imported identifier to (source, specifier)\n  imports: HashMap<Id, (JsWord, JsWord)>,\n  // Map of source to (require identifier, mark)\n  require_names: HashMap<JsWord, (JsWord, Mark)>,\n  // Set of declared default interops, by source.\n  interops: HashSet<JsWord>,\n  // List of requires to insert at the top of the module.\n  requires: Vec<ModuleItem>,\n  // List of exports to add.\n  exports: Vec<ModuleItem>,\n  needs_helpers: bool,\n  in_export_decl: bool,\n  in_function_scope: bool,\n  mark: Mark,\n  unresolved_mark: Mark,\n  versions: Option<Versions>,\n}\n\nfn local_name_for_src(src: &JsWord) -> JsWord {\n  if !src.contains('/') {\n    return format!(\"_{}\", src.to_camel_case()).into();\n  }\n\n  format!(\"_{}\", src.split('/').last().unwrap().to_camel_case()).into()\n}\n\nimpl ESMFold {\n  fn get_require_name(&mut self, src: &JsWord, span: Span) -> Ident {\n    if let Some((name, mark)) = self.require_names.get(src) {\n      return Ident::new(name.clone(), span, SyntaxContext::empty().apply_mark(*mark));\n    }\n\n    let name = local_name_for_src(src);\n    let mark = Mark::fresh(Mark::root());\n    self.require_names.insert(src.clone(), (name.clone(), mark));\n    Ident::new(name, span, SyntaxContext::empty().apply_mark(mark))\n  }\n\n  fn get_interop_default_name(&mut self, src: &JsWord) -> Ident {\n    self.get_require_name(src, DUMMY_SP);\n    let (name, mark) = self.require_names.get(src).unwrap();\n    Ident::new(\n      format!(\"{}Default\", name).into(),\n      DUMMY_SP,\n      SyntaxContext::empty().apply_mark(*mark),\n    )\n  }\n\n  fn create_require(&mut self, src: JsWord, span: Span) {\n    if self.require_names.contains_key(&src) {\n      return;\n    }\n\n    let ident = self.get_require_name(&src, DUMMY_SP);\n    let require = ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl {\n      span,\n      ctxt: SyntaxContext::empty(),\n      kind: VarDeclKind::Var,\n      decls: vec![VarDeclarator {\n        span: DUMMY_SP,\n        name: Pat::Ident(ident.into()),\n        init: Some(Box::new(Expr::Call(crate::utils::create_require(\n          src,\n          self.unresolved_mark,\n        )))),\n        definite: false,\n      }],\n      declare: false,\n    }))));\n\n    self.requires.push(require)\n  }\n\n  fn create_interop_default(&mut self, src: JsWord) {\n    if self.interops.contains(&src) {\n      return;\n    }\n\n    let local = self.get_require_name(&src, DUMMY_SP);\n    let ident = self.get_interop_default_name(&src);\n    let interop = ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl {\n      span: DUMMY_SP,\n      ctxt: SyntaxContext::empty(),\n      kind: VarDeclKind::Var,\n      decls: vec![VarDeclarator {\n        span: DUMMY_SP,\n        name: Pat::Ident(ident.into()),\n        init: Some(Box::new(self.create_helper_call(\n          \"interopDefault\".into(),\n          vec![Expr::Ident(local)],\n          DUMMY_SP,\n        ))),\n        definite: false,\n      }],\n      declare: false,\n    }))));\n\n    self.requires.push(interop);\n    self.interops.insert(src);\n  }\n\n  fn create_helper_call(&mut self, name: JsWord, args: Vec<Expr>, span: Span) -> Expr {\n    self.needs_helpers = true;\n    let ident = Ident::new(\n      \"parcelHelpers\".into(),\n      DUMMY_SP,\n      SyntaxContext::empty().apply_mark(self.mark),\n    );\n    Expr::Call(CallExpr {\n      callee: Callee::Expr(Box::new(Expr::Member(MemberExpr {\n        obj: Box::new(Expr::Ident(ident)),\n        prop: MemberProp::Ident(IdentName::new(name, DUMMY_SP)),\n        span: DUMMY_SP,\n      }))),\n      args: args\n        .iter()\n        .map(|arg| ExprOrSpread {\n          expr: Box::new(arg.clone()),\n          spread: None,\n        })\n        .collect(),\n      span,\n      ctxt: SyntaxContext::empty(),\n      type_args: None,\n    })\n  }\n\n  fn call_helper(&mut self, name: JsWord, args: Vec<Expr>, span: Span) -> ModuleItem {\n    ModuleItem::Stmt(Stmt::Expr(ExprStmt {\n      expr: Box::new(self.create_helper_call(name, args, span)),\n      span,\n    }))\n  }\n\n  fn create_export(&mut self, exported: JsWord, local: Expr, span: Span) {\n    let export = self.call_helper(\n      \"export\".into(),\n      vec![\n        Expr::Ident(Ident::new_no_ctxt(\"exports\".into(), DUMMY_SP)),\n        Expr::Lit(Lit::Str(exported.into())),\n        if matches!(self.versions, Some(versions) if Feature::ArrowFunctions.should_enable(&versions, true, false)) {\n          Expr::Fn(FnExpr {\n            ident: None,\n            function: Box::new(Function {\n              body: Some(BlockStmt {\n                span: DUMMY_SP,\n                ctxt: SyntaxContext::empty(),\n                stmts: vec![Stmt::Return({\n                  ReturnStmt {\n                    span: DUMMY_SP,\n                    arg: Some(Box::new(local)),\n                  }\n                })],\n              }),\n              is_async: false,\n              is_generator: false,\n              params: vec![],\n              decorators: vec![],\n              span: DUMMY_SP,\n              ctxt: SyntaxContext::empty(),\n              return_type: None,\n              type_params: None,\n            }),\n          })\n        } else {\n          Expr::Arrow(ArrowExpr {\n            body: Box::new(BlockStmtOrExpr::Expr(Box::new(local))),\n            is_async: false,\n            is_generator: false,\n            params: vec![],\n            span: DUMMY_SP,\n            ctxt: SyntaxContext::empty(),\n            return_type: None,\n            type_params: None,\n          })\n        },\n      ],\n      span,\n    );\n    self.exports.push(export)\n  }\n\n  fn create_exports_assign(&mut self, name: JsWord, right: Expr, span: Span) -> ModuleItem {\n    ModuleItem::Stmt(Stmt::Expr(ExprStmt {\n      expr: Box::new(Expr::Assign(AssignExpr {\n        op: AssignOp::Assign,\n        left: AssignTarget::Simple(SimpleAssignTarget::Member(MemberExpr {\n          obj: Box::new(Expr::Ident(Ident::new_no_ctxt(\"exports\".into(), DUMMY_SP))),\n          prop: MemberProp::Ident(IdentName::new(name, DUMMY_SP)),\n          span: DUMMY_SP,\n        })),\n        right: Box::new(right),\n        span: DUMMY_SP,\n      })),\n      span,\n    }))\n  }\n\n  fn create_import_access(&mut self, source: &JsWord, imported: &JsWord, span: Span) -> Expr {\n    if imported == \"*\" {\n      let name = self.get_require_name(source, span);\n      return Expr::Ident(name);\n    }\n\n    let obj = if imported == \"default\" {\n      self.get_interop_default_name(source)\n    } else {\n      self.get_require_name(source, DUMMY_SP)\n    };\n\n    // import { foo } from \"...\"; foo();\n    // ->\n    // import { foo } from \"...\"; (0, foo)();\n    Expr::Seq(SeqExpr {\n      exprs: vec![\n        0.into(),\n        Box::new(Expr::Member(MemberExpr {\n          obj: Box::new(Expr::Ident(obj)),\n          prop: MemberProp::Ident(IdentName::new(imported.clone(), DUMMY_SP)),\n          span,\n        })),\n      ],\n      span,\n    })\n  }\n}\n\nmacro_rules! modules_visit_fn {\n  ($name:ident, $type:ident) => {\n    fn $name(&mut self, node: $type) -> $type {\n      let in_function_scope = self.in_function_scope;\n      self.in_function_scope = true;\n      let res = node.fold_children_with(self);\n      self.in_function_scope = in_function_scope;\n      res\n    }\n  };\n}\n\nimpl Fold for ESMFold {\n  fn fold_module(&mut self, node: Module) -> Module {\n    let mut is_esm = false;\n    let mut needs_interop_flag = false;\n\n    // First pass: collect all imported declarations. On the second pass, exports can be matched to\n    // imports (to better handle import/export pairs that are really just reexports).\n    //\n    // To ensure that all declarations that cause dependencies are kept in the same order, handle\n    // export declarations with a source in the first pass as well.\n    for item in &node.body {\n      if let ModuleItem::ModuleDecl(decl) = &item {\n        is_esm = true;\n        match decl {\n          ModuleDecl::Import(import) => {\n            self.create_require(import.src.value.clone(), import.span);\n\n            for specifier in &import.specifiers {\n              match specifier {\n                ImportSpecifier::Named(named) => {\n                  let imported = match &named.imported {\n                    Some(imported) => match_export_name(imported).0.clone(),\n                    None => named.local.sym.clone(),\n                  };\n                  self.imports.insert(\n                    id!(named.local),\n                    (import.src.value.clone(), imported.clone()),\n                  );\n                  if imported == \"default\" {\n                    self.create_interop_default(import.src.value.clone());\n                  }\n                }\n                ImportSpecifier::Default(default) => {\n                  self.imports.insert(\n                    id!(default.local),\n                    (import.src.value.clone(), \"default\".into()),\n                  );\n                  self.create_interop_default(import.src.value.clone());\n                }\n                ImportSpecifier::Namespace(namespace) => {\n                  self\n                    .imports\n                    .insert(id!(namespace.local), (import.src.value.clone(), \"*\".into()));\n                }\n              }\n            }\n          }\n          ModuleDecl::ExportNamed(export) => {\n            needs_interop_flag = true;\n\n            if let Some(src) = &export.src {\n              self.create_require(src.value.clone(), export.span);\n\n              for specifier in &export.specifiers {\n                match specifier {\n                  ExportSpecifier::Named(named) => {\n                    let exported = match &named.exported {\n                      Some(exported) => exported.clone(),\n                      None => named.orig.clone(),\n                    };\n\n                    if match_export_name(&named.orig).0 == \"default\" {\n                      self.create_interop_default(src.value.clone());\n                    }\n\n                    let specifier = self.create_import_access(\n                      &src.value,\n                      &match_export_name(&named.orig).0,\n                      DUMMY_SP,\n                    );\n                    self.create_export(match_export_name(&exported).0, specifier, export.span);\n                  }\n                  ExportSpecifier::Default(default) => {\n                    self.create_interop_default(src.value.clone());\n                    let specifier =\n                      self.create_import_access(&src.value, &\"default\".into(), DUMMY_SP);\n                    self.create_export(default.exported.sym.clone(), specifier, export.span);\n                  }\n                  ExportSpecifier::Namespace(namespace) => {\n                    let local = self.get_require_name(&src.value, DUMMY_SP);\n                    self.create_export(\n                      match_export_name(&namespace.name).0,\n                      Expr::Ident(local),\n                      export.span,\n                    )\n                  }\n                }\n              }\n            } else {\n              // Handled below\n            }\n          }\n          ModuleDecl::ExportAll(export) => {\n            needs_interop_flag = true;\n            self.create_require(export.src.value.clone(), export.span);\n            let require_name = self.get_require_name(&export.src.value, export.span);\n            let export = self.call_helper(\n              \"exportAll\".into(),\n              vec![\n                Expr::Ident(require_name),\n                Expr::Ident(Ident::new_no_ctxt(\"exports\".into(), DUMMY_SP)),\n              ],\n              export.span,\n            );\n            self.requires.push(export);\n          }\n          _ => (),\n        }\n      }\n    }\n\n    // If we didn't see any module declarations, nothing to do.\n    if !is_esm {\n      return node;\n    }\n\n    let node = node.fold_children_with(self);\n    let mut items = vec![];\n\n    // Second pass\n    for item in &node.body {\n      match &item {\n        ModuleItem::ModuleDecl(decl) => {\n          match decl {\n            ModuleDecl::Import(_) | ModuleDecl::ExportAll(_) => {\n              // Handled above\n            }\n            ModuleDecl::ExportNamed(export) => {\n              needs_interop_flag = true;\n              if export.src.is_none() {\n                for specifier in &export.specifiers {\n                  if let ExportSpecifier::Named(named) = specifier {\n                    let exported = match &named.exported {\n                      Some(exported) => exported.clone(),\n                      None => named.orig.clone(),\n                    };\n                    let orig = match_export_name_ident(&named.orig);\n\n                    // Handle import {foo} from 'bar'; export {foo};\n                    let value =\n                      if let Some((source, imported)) = self.imports.get(&id!(orig)).cloned() {\n                        self.create_import_access(\n                          &source,\n                          &imported,\n                          match_export_name(&named.orig).1,\n                        )\n                      } else {\n                        Expr::Ident(orig.clone())\n                      };\n\n                    self.create_export(match_export_name(&exported).0, value, export.span);\n                  }\n                }\n              } else {\n                // Handled above\n              }\n            }\n            ModuleDecl::ExportDefaultExpr(export) => {\n              needs_interop_flag = true;\n              items.push(self.create_exports_assign(\n                \"default\".into(),\n                *export.expr.clone(),\n                export.span,\n              ))\n            }\n            ModuleDecl::ExportDefaultDecl(export) => {\n              needs_interop_flag = true;\n\n              match &export.decl {\n                DefaultDecl::Class(class) => {\n                  if let Some(ident) = &class.ident {\n                    items.push(ModuleItem::Stmt(Stmt::Decl(Decl::Class(ClassDecl {\n                      ident: ident.clone(),\n                      declare: false,\n                      class: class.class.clone(),\n                    }))));\n                    items.push(self.create_exports_assign(\n                      \"default\".into(),\n                      Expr::Ident(ident.clone()),\n                      DUMMY_SP,\n                    ));\n                  } else {\n                    items.push(self.create_exports_assign(\n                      \"default\".into(),\n                      Expr::Class(ClassExpr {\n                        ident: None,\n                        class: class.class.clone(),\n                      }),\n                      export.span,\n                    ));\n                  }\n                }\n                DefaultDecl::Fn(func) => {\n                  if let Some(ident) = &func.ident {\n                    items.push(ModuleItem::Stmt(Stmt::Decl(Decl::Fn(FnDecl {\n                      ident: ident.clone(),\n                      declare: false,\n                      function: func.function.clone(),\n                    }))));\n                    self.create_export(\"default\".into(), Expr::Ident(ident.clone()), DUMMY_SP);\n                  } else {\n                    self.create_export(\n                      \"default\".into(),\n                      Expr::Fn(FnExpr {\n                        ident: None,\n                        function: func.function.clone(),\n                      }),\n                      export.span,\n                    );\n                  }\n                }\n                _ => {\n                  unreachable!(\"unsupported export default declaration\");\n                }\n              }\n            }\n            ModuleDecl::ExportDecl(export) => {\n              needs_interop_flag = true;\n              match &export.decl {\n                Decl::Class(class) => {\n                  self.create_export(\n                    class.ident.sym.clone(),\n                    Expr::Ident(class.ident.clone()),\n                    export.span,\n                  );\n                  items.push(ModuleItem::Stmt(Stmt::Decl(\n                    export.decl.clone().fold_with(self),\n                  )));\n                }\n                Decl::Fn(func) => {\n                  self.create_export(\n                    func.ident.sym.clone(),\n                    Expr::Ident(func.ident.clone()),\n                    export.span,\n                  );\n                  items.push(ModuleItem::Stmt(Stmt::Decl(\n                    export.decl.clone().fold_with(self),\n                  )));\n                }\n                Decl::Var(var) => {\n                  let mut var = var.clone();\n                  var.decls = var\n                    .decls\n                    .iter()\n                    .map(|decl| {\n                      let mut decl = decl.clone();\n                      self.in_export_decl = true;\n                      decl.name = decl.name.clone().fold_with(self);\n                      self.in_export_decl = false;\n                      decl.init = decl.init.clone().fold_with(self);\n                      decl\n                    })\n                    .collect();\n                  items.push(ModuleItem::Stmt(Stmt::Decl(Decl::Var(var))));\n                }\n                _ => {\n                  items.push(ModuleItem::Stmt(Stmt::Decl(\n                    export.decl.clone().fold_with(self),\n                  )));\n                }\n              }\n            }\n            _ => items.push(item.clone()),\n          }\n        }\n        _ => items.push(item.clone()),\n      }\n    }\n\n    if needs_interop_flag {\n      let helper = self.call_helper(\n        \"defineInteropFlag\".into(),\n        vec![Expr::Ident(Ident::new_no_ctxt(\"exports\".into(), DUMMY_SP))],\n        DUMMY_SP,\n      );\n      self.exports.insert(0, helper);\n    }\n\n    let mut node = node;\n    items.splice(0..0, self.requires.clone());\n    items.splice(0..0, self.exports.clone());\n\n    if self.needs_helpers {\n      items.insert(\n        0,\n        ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl {\n          span: DUMMY_SP,\n          ctxt: SyntaxContext::empty(),\n          kind: VarDeclKind::Var,\n          decls: vec![VarDeclarator {\n            span: DUMMY_SP,\n            name: Pat::Ident(\n              Ident::new(\n                \"parcelHelpers\".into(),\n                DUMMY_SP,\n                SyntaxContext::empty().apply_mark(self.mark),\n              )\n              .into(),\n            ),\n            init: Some(Box::new(Expr::Call(crate::utils::create_require(\n              \"@parcel/transformer-js/src/esmodule-helpers.js\".into(),\n              self.unresolved_mark,\n            )))),\n            definite: false,\n          }],\n          declare: false,\n        })))),\n      )\n    }\n\n    node.body = items;\n    node\n  }\n\n  fn fold_binding_ident(&mut self, node: BindingIdent) -> BindingIdent {\n    if self.in_export_decl {\n      // export const {foo} = ...;\n      self.create_export(node.id.sym.clone(), Expr::Ident(node.id.clone()), DUMMY_SP);\n    }\n\n    node.fold_children_with(self)\n  }\n\n  modules_visit_fn!(fold_function, Function);\n  modules_visit_fn!(fold_class, Class);\n  modules_visit_fn!(fold_getter_prop, GetterProp);\n  modules_visit_fn!(fold_setter_prop, SetterProp);\n\n  fn fold_expr(&mut self, node: Expr) -> Expr {\n    match &node {\n      Expr::Ident(ident) => {\n        if let Some((source, imported)) = self.imports.get(&id!(ident)).cloned() {\n          self.create_import_access(&source, &imported, ident.span)\n        } else {\n          node\n        }\n      }\n      Expr::This(_this) => {\n        if !self.in_function_scope {\n          Expr::Ident(get_undefined_ident(self.unresolved_mark))\n        } else {\n          node\n        }\n      }\n      _ => maybe_grow_default(|| node.fold_children_with(self)),\n    }\n  }\n\n  fn fold_prop(&mut self, node: Prop) -> Prop {\n    // let obj = {a, b}; -> let obj = {a: imported.a, b: imported.b};\n    match &node {\n      Prop::Shorthand(ident) => {\n        if let Some((source, imported)) = self.imports.get(&id!(ident)).cloned() {\n          Prop::KeyValue(KeyValueProp {\n            key: PropName::Ident(IdentName::new(ident.sym.clone(), DUMMY_SP)),\n            value: Box::new(self.create_import_access(&source, &imported, ident.span)),\n          })\n        } else {\n          node.fold_children_with(self)\n        }\n      }\n      _ => node.fold_children_with(self),\n    }\n  }\n\n  fold_member_expr_skip_prop! {}\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/node_replacer.rs",
    "content": "use std::{ffi::OsStr, path::Path};\n\nuse indexmap::IndexMap;\nuse swc_core::{\n  common::{DUMMY_SP, Mark, SourceMap, SyntaxContext, sync::Lrc},\n  ecma::{\n    ast::{self, MemberProp},\n    atoms::Atom as JsWord,\n    utils::member_expr,\n    visit::{VisitMut, VisitMutWith},\n  },\n};\n\nuse crate::{\n  dependency_collector::{DependencyDescriptor, DependencyFlags, DependencyKind},\n  utils::{SourceLocation, SourceType, create_global_decl_stmt, create_require, is_unresolved},\n};\n\n/// Replaces __filename and __dirname with globals that reference to string literals for the\n/// file-path of this file.\n///\n/// This is coupled with the packager implementations in `ScopeHoistingPackager.js` and\n/// `DevPackager.js` which handle inserting paths into this file through string replacement of\n/// the `\"$parcel$filenameReplace\"` and `\"$parcel$dirnameReplace\"` string literals.\npub struct NodeReplacer<'a> {\n  pub source_map: Lrc<SourceMap>,\n  pub global_mark: Mark,\n  pub globals: IndexMap<JsWord, (SyntaxContext, ast::Stmt)>,\n  pub filename: &'a Path,\n  pub is_esm: bool,\n  pub unresolved_mark: Mark,\n  /// This will be set to true if the file has either __dirname or __filename replacements inserted\n  pub has_node_replacements: &'a mut bool,\n  /// This will be populated with the added dependency into the `\"path\"` module.\n  pub items: &'a mut Vec<DependencyDescriptor>,\n}\n\nimpl<'a> VisitMut for NodeReplacer<'a> {\n  fn visit_mut_expr(&mut self, node: &mut ast::Expr) {\n    use ast::Expr::*;\n\n    match node {\n      Ident(id) => {\n        // Only handle global variables\n        if !is_unresolved(&id, self.unresolved_mark) {\n          return;\n        }\n\n        match id.sym.to_string().as_str() {\n          \"__filename\" => {\n            let path_module_specifier = JsWord::from(\"path\");\n            let replace_me_value = JsWord::from(\"$parcel$filenameReplace\");\n\n            let unresolved_mark = self.unresolved_mark;\n            let is_esm = self.is_esm;\n            let expr = |this: &NodeReplacer| {\n              let filename = if let Some(name) = this.filename.file_name() {\n                name\n              } else {\n                OsStr::new(\"unknown.js\")\n              };\n              Call(ast::CallExpr {\n                span: DUMMY_SP,\n                ctxt: SyntaxContext::empty(),\n                type_args: None,\n                args: vec![\n                  ast::ExprOrSpread {\n                    spread: None,\n                    // This also uses __dirname as later in the path.join call the hierarchy is then correct\n                    // Otherwise path.join(__filename, '..') would be one level to shallow (due to the /filename.js at the end)\n                    expr: Box::new(dirname(is_esm, unresolved_mark)),\n                  },\n                  ast::ExprOrSpread {\n                    spread: None,\n                    expr: Box::new(ast::Expr::Lit(ast::Lit::Str(ast::Str {\n                      span: DUMMY_SP,\n                      value: replace_me_value,\n                      raw: None,\n                    }))),\n                  },\n                  ast::ExprOrSpread {\n                    spread: None,\n                    expr: Box::new(ast::Expr::Lit(ast::Lit::Str(ast::Str {\n                      span: DUMMY_SP,\n                      value: JsWord::from(filename.to_string_lossy()),\n                      raw: None,\n                    }))),\n                  },\n                ],\n                callee: ast::Callee::Expr(Box::new(ast::Expr::Member(ast::MemberExpr {\n                  span: DUMMY_SP,\n                  obj: (Box::new(Call(create_require(\n                    path_module_specifier.clone(),\n                    unresolved_mark,\n                  )))),\n                  prop: MemberProp::Ident(ast::IdentName::new(\"resolve\".into(), DUMMY_SP)),\n                }))),\n              })\n            };\n            if self.update_binding(id, \"$parcel$__filename\".into(), expr) {\n              self.items.push(DependencyDescriptor {\n                kind: DependencyKind::Require,\n                loc: SourceLocation::from(&self.source_map, id.span),\n                specifier: path_module_specifier,\n                attributes: None,\n                flags: DependencyFlags::empty(),\n                source_type: Some(SourceType::Module),\n                placeholder: None,\n              });\n\n              *self.has_node_replacements = true;\n            }\n          }\n          \"__dirname\" => {\n            let path_module_specifier = JsWord::from(\"path\");\n            let replace_me_value = JsWord::from(\"$parcel$dirnameReplace\");\n\n            let unresolved_mark = self.unresolved_mark;\n            let is_esm = self.is_esm;\n            if self.update_binding(id, \"$parcel$__dirname\".into(), |_| {\n              Call(ast::CallExpr {\n                span: DUMMY_SP,\n                ctxt: SyntaxContext::empty(),\n                type_args: None,\n                args: vec![\n                  ast::ExprOrSpread {\n                    spread: None,\n                    expr: Box::new(dirname(is_esm, unresolved_mark)),\n                  },\n                  ast::ExprOrSpread {\n                    spread: None,\n                    expr: Box::new(ast::Expr::Lit(ast::Lit::Str(ast::Str {\n                      span: DUMMY_SP,\n                      value: replace_me_value,\n                      raw: None,\n                    }))),\n                  },\n                ],\n                callee: ast::Callee::Expr(Box::new(ast::Expr::Member(ast::MemberExpr {\n                  span: DUMMY_SP,\n                  obj: (Box::new(Call(create_require(\n                    path_module_specifier.clone(),\n                    unresolved_mark,\n                  )))),\n                  prop: MemberProp::Ident(ast::IdentName::new(\"resolve\".into(), DUMMY_SP)),\n                }))),\n              })\n            }) {\n              self.items.push(DependencyDescriptor {\n                kind: DependencyKind::Require,\n                loc: SourceLocation::from(&self.source_map, id.span),\n                specifier: path_module_specifier,\n                attributes: None,\n                flags: DependencyFlags::empty(),\n                source_type: Some(SourceType::Module),\n                placeholder: None,\n              });\n\n              *self.has_node_replacements = true;\n            }\n          }\n          _ => {}\n        }\n      }\n      _ => {\n        node.visit_mut_children_with(self);\n      }\n    };\n  }\n\n  // Do not traverse into the `prop` side of member expressions unless computed.\n  fn visit_mut_member_prop(&mut self, node: &mut MemberProp) {\n    match node {\n      MemberProp::Computed(computed) => {\n        computed.visit_mut_children_with(self);\n      }\n      _ => {}\n    }\n  }\n\n  fn visit_mut_module(&mut self, node: &mut ast::Module) {\n    // Insert globals at the top of the program\n    node.visit_mut_children_with(self);\n    node.body.splice(\n      0..0,\n      self\n        .globals\n        .drain(..)\n        .map(|(_, (_, stmt))| ast::ModuleItem::Stmt(stmt)),\n    );\n  }\n}\n\nimpl NodeReplacer<'_> {\n  fn update_binding<F>(&mut self, id_ref: &mut ast::Ident, new_name: JsWord, expr: F) -> bool\n  where\n    F: FnOnce(&Self) -> ast::Expr,\n  {\n    if let Some((ctxt, _)) = self.globals.get(&new_name) {\n      id_ref.sym = new_name;\n      id_ref.ctxt = *ctxt;\n      false\n    } else {\n      id_ref.sym = new_name;\n\n      let (decl, ctxt) = create_global_decl_stmt(id_ref.sym.clone(), expr(self), self.global_mark);\n      id_ref.ctxt = ctxt;\n\n      self.globals.insert(id_ref.sym.clone(), (ctxt, decl));\n      true\n    }\n  }\n}\n\nfn dirname(is_esm: bool, unresolved_mark: Mark) -> ast::Expr {\n  if is_esm {\n    use ast::*;\n    // require('path').dirname(require('url').fileURLToPath(import.meta.url))\n    // TODO: use import.meta.dirname if available?\n    Expr::Call(CallExpr {\n      callee: Callee::Expr(Box::new(Expr::Member(MemberExpr {\n        obj: Box::new(Expr::Call(create_require(\"path\".into(), unresolved_mark))),\n        prop: MemberProp::Ident(IdentName::new(\"dirname\".into(), DUMMY_SP)),\n        span: DUMMY_SP,\n      }))),\n      args: vec![ExprOrSpread {\n        expr: Box::new(Expr::Call(CallExpr {\n          callee: Callee::Expr(Box::new(Expr::Member(MemberExpr {\n            obj: Box::new(Expr::Call(create_require(\"url\".into(), unresolved_mark))),\n            prop: MemberProp::Ident(IdentName::new(\"fileURLToPath\".into(), DUMMY_SP)),\n            span: DUMMY_SP,\n          }))),\n          args: vec![ExprOrSpread {\n            expr: Box::new(Expr::Member(member_expr!(\n              Default::default(),\n              DUMMY_SP,\n              import.meta.url\n            ))),\n            spread: None,\n          }],\n          ..Default::default()\n        })),\n        spread: None,\n      }],\n      ..Default::default()\n    })\n  } else {\n    ast::Expr::Ident(ast::Ident::new_no_ctxt(\"__dirname\".into(), DUMMY_SP))\n  }\n}\n\n#[cfg(test)]\nmod test {\n  use crate::test_utils::run_visit;\n\n  use super::*;\n\n  #[test]\n  fn test_replace_filename() {\n    let mut has_node_replacements = false;\n    let mut items = vec![];\n\n    let code = r#\"\nconst filename = __filename;\nconsole.log(__filename);\n    \"#;\n    let output_code = run_visit(code, |context| NodeReplacer {\n      source_map: context.source_map.clone(),\n      global_mark: context.global_mark,\n      globals: IndexMap::new(),\n      filename: Path::new(\"/path/random.js\"),\n      has_node_replacements: &mut has_node_replacements,\n      items: &mut items,\n      unresolved_mark: context.unresolved_mark,\n      is_esm: false,\n    })\n    .output_code;\n\n    let expected_code = r#\"\nvar $parcel$__filename = require(\"path\").resolve(__dirname, \"$parcel$filenameReplace\", \"random.js\");\nconst filename = $parcel$__filename;\nconsole.log($parcel$__filename);\n\"#\n    .trim_start();\n    assert_eq!(output_code, expected_code);\n    assert_eq!(has_node_replacements, true);\n    assert_eq!(items[0].specifier, JsWord::from(\"path\"));\n    assert_eq!(items[0].kind, DependencyKind::Require);\n    assert_eq!(items[0].source_type, Some(SourceType::Module));\n    assert_eq!(items.len(), 1);\n  }\n\n  #[test]\n  fn test_replace_dirname() {\n    let mut has_node_replacements = false;\n    let mut items = vec![];\n\n    let code = r#\"\nconst dirname = __dirname;\nconsole.log(__dirname);\n    \"#;\n    let output_code = run_visit(code, |context| NodeReplacer {\n      source_map: context.source_map.clone(),\n      global_mark: context.global_mark,\n      globals: IndexMap::new(),\n      filename: Path::new(\"/path/random.js\"),\n      has_node_replacements: &mut has_node_replacements,\n      items: &mut items,\n      unresolved_mark: context.unresolved_mark,\n      is_esm: false,\n    })\n    .output_code;\n\n    let expected_code = r#\"\nvar $parcel$__dirname = require(\"path\").resolve(__dirname, \"$parcel$dirnameReplace\");\nconst dirname = $parcel$__dirname;\nconsole.log($parcel$__dirname);\n\"#\n    .trim_start();\n    assert_eq!(output_code, expected_code);\n    assert_eq!(has_node_replacements, true);\n    assert_eq!(items[0].specifier, JsWord::from(\"path\"));\n    assert_eq!(items[0].kind, DependencyKind::Require);\n    assert_eq!(items[0].source_type, Some(SourceType::Module));\n    assert_eq!(items.len(), 1);\n  }\n\n  #[test]\n  fn test_does_not_replace_if_variables_are_shadowed() {\n    let mut has_node_replacements = false;\n    let mut items = vec![];\n\n    let code = r#\"\nfunction something(__filename, __dirname) {\n    const filename = __filename;\n    console.log(__filename);\n    console.log(__dirname);\n}\n    \"#;\n    let output_code = run_visit(code, |context| NodeReplacer {\n      source_map: context.source_map.clone(),\n      global_mark: context.global_mark,\n      globals: IndexMap::new(),\n      filename: Path::new(\"/path/random.js\"),\n      has_node_replacements: &mut has_node_replacements,\n      items: &mut items,\n      unresolved_mark: context.unresolved_mark,\n      is_esm: false,\n    })\n    .output_code;\n\n    let expected_code = r#\"\nfunction something(__filename, __dirname) {\n    const filename = __filename;\n    console.log(__filename);\n    console.log(__dirname);\n}\n\"#\n    .trim_start();\n    assert_eq!(output_code, expected_code);\n    assert_eq!(has_node_replacements, false);\n    assert_eq!(items.len(), 0);\n  }\n\n  #[test]\n  fn test_does_not_replace_filename_or_dirname_identifiers_randomly() {\n    let mut has_node_replacements = false;\n    let mut items = vec![];\n\n    let code = r#\"\nconst filename = obj.__filename;\n    \"#;\n    let output_code = run_visit(code, |context| NodeReplacer {\n      source_map: context.source_map.clone(),\n      global_mark: context.global_mark,\n      globals: IndexMap::new(),\n      filename: Path::new(\"/path/random.js\"),\n      has_node_replacements: &mut has_node_replacements,\n      items: &mut items,\n      unresolved_mark: context.unresolved_mark,\n      is_esm: false,\n    })\n    .output_code;\n\n    let expected_code = r#\"\nconst filename = obj.__filename;\n\"#\n    .trim_start();\n    assert_eq!(output_code, expected_code);\n    assert_eq!(has_node_replacements, false);\n    assert_eq!(items.len(), 0);\n  }\n\n  #[test]\n  fn test_does_replace_filename_or_dirname_identifiers_on_member_props() {\n    let mut has_node_replacements = false;\n    let mut items = vec![];\n\n    let code = r#\"\nconst filename = obj[__filename];\n    \"#;\n    let output_code = run_visit(code, |context| NodeReplacer {\n      source_map: context.source_map.clone(),\n      global_mark: context.global_mark,\n      globals: IndexMap::new(),\n      filename: Path::new(\"/path/random.js\"),\n      has_node_replacements: &mut has_node_replacements,\n      items: &mut items,\n      unresolved_mark: context.unresolved_mark,\n      is_esm: false,\n    })\n    .output_code;\n\n    let expected_code = r#\"\nvar $parcel$__filename = require(\"path\").resolve(__dirname, \"$parcel$filenameReplace\", \"random.js\");\nconst filename = obj[$parcel$__filename];\n\"#\n    .trim_start();\n    assert_eq!(output_code, expected_code);\n    assert_eq!(has_node_replacements, true);\n    assert_eq!(items.len(), 1);\n  }\n\n  #[test]\n  fn test_esm() {\n    let mut has_node_replacements = false;\n    let mut items = vec![];\n\n    let code = r#\"\nconsole.log(__filename);\nconsole.log(__dirname);\n    \"#;\n    let output_code = run_visit(code, |context| NodeReplacer {\n      source_map: context.source_map.clone(),\n      global_mark: context.global_mark,\n      globals: IndexMap::new(),\n      filename: Path::new(\"/path/random.js\"),\n      has_node_replacements: &mut has_node_replacements,\n      items: &mut items,\n      unresolved_mark: context.unresolved_mark,\n      is_esm: true,\n    })\n    .output_code;\n\n    let expected_code = r#\"\nvar $parcel$__filename = require(\"path\").resolve(require(\"path\").dirname(require(\"url\").fileURLToPath(import.meta.url)), \"$parcel$filenameReplace\", \"random.js\");\nvar $parcel$__dirname = require(\"path\").resolve(require(\"path\").dirname(require(\"url\").fileURLToPath(import.meta.url)), \"$parcel$dirnameReplace\");\nconsole.log($parcel$__filename);\nconsole.log($parcel$__dirname);\n\"#\n    .trim_start();\n    assert_eq!(output_code, expected_code);\n    assert_eq!(has_node_replacements, true);\n    assert_eq!(items.len(), 2);\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/react_lazy.rs",
    "content": "use swc_core::ecma::{\n  ast::{CallExpr, Callee, Expr, MemberProp},\n  visit::{Visit, VisitWith},\n};\n\nuse crate::{\n  DependencyDescriptor, DependencyKind, collect::Collect, dependency_collector::DependencyFlags,\n  utils::match_str,\n};\n\n/// This pass marks dependencies created inside a React.lazy call.\npub struct ReactLazy<'a> {\n  collect: &'a Collect,\n  deps: &'a mut Vec<DependencyDescriptor>,\n  in_lazy: bool,\n}\n\nimpl<'a> ReactLazy<'a> {\n  pub fn new(collect: &'a Collect, deps: &'a mut Vec<DependencyDescriptor>) -> Self {\n    ReactLazy {\n      collect,\n      deps,\n      in_lazy: false,\n    }\n  }\n}\n\nimpl<'a> Visit for ReactLazy<'a> {\n  fn visit_call_expr(&mut self, node: &CallExpr) {\n    if let Callee::Expr(expr) = &node.callee {\n      match &**expr {\n        Expr::Ident(id) => {\n          if let Some(import) = self.collect.imports.get(&id.to_id()) {\n            if import.source == \"react\" && import.specifier == \"lazy\" {\n              self.in_lazy = true;\n              node.visit_children_with(self);\n              self.in_lazy = false;\n              return;\n            }\n          }\n        }\n        Expr::Member(member) => {\n          if let Expr::Ident(id) = &*member.obj {\n            if let Some(import) = self.collect.imports.get(&id.to_id()) {\n              if import.source == \"react\"\n                && (import.specifier == \"*\" || import.specifier == \"default\")\n                && matches!(&member.prop, MemberProp::Ident(id) if id.sym == \"lazy\")\n              {\n                self.in_lazy = true;\n                node.visit_children_with(self);\n                self.in_lazy = false;\n                return;\n              }\n            }\n          }\n        }\n        _ => {}\n      }\n    }\n\n    node.visit_children_with(self);\n\n    if !self.in_lazy {\n      return;\n    }\n\n    let is_import = match &node.callee {\n      Callee::Import(_) => true,\n      Callee::Expr(expr) => matches!(&**expr, Expr::Ident(id) if id.sym == \"require\"),\n      _ => false,\n    };\n\n    if !is_import {\n      return;\n    }\n\n    if let Some(arg) = node.args.get(0) {\n      if let Some((specifier, _)) = match_str(&*arg.expr) {\n        for dep in self.deps.iter_mut() {\n          if dep.kind == DependencyKind::DynamicImport\n            && (dep.specifier == specifier\n              || matches!(&dep.placeholder, Some(p) if p == specifier.as_str()))\n          {\n            dep.flags |= DependencyFlags::REACT_LAZY;\n          }\n        }\n      }\n    }\n  }\n}\n\n#[cfg(test)]\nmod test {\n  use swc_core::ecma::visit::VisitWith;\n  use swc_core::{common::Mark, ecma::ast::Module};\n\n  use super::*;\n  use crate::{\n    DependencyKind,\n    dependency_collector::DependencyFlags,\n    test_utils::{RunTestContext, run_with_transformation},\n  };\n\n  fn run(context: RunTestContext, module: &mut Module) {\n    let mut deps = Vec::new();\n    deps.push(DependencyDescriptor {\n      specifier: \"./lazy\".into(),\n      attributes: None,\n      flags: DependencyFlags::empty(),\n      kind: DependencyKind::DynamicImport,\n      loc: crate::SourceLocation {\n        start_line: 0,\n        start_col: 0,\n        end_line: 0,\n        end_col: 0,\n      },\n      source_type: None,\n      placeholder: None,\n    });\n\n    let mut collect = Collect::new(\n      context.source_map.clone(),\n      context.unresolved_mark,\n      Mark::fresh(Mark::root()),\n      context.global_mark,\n      false,\n      true,\n    );\n    module.visit_with(&mut collect);\n    module.visit_with(&mut ReactLazy::new(&collect, &mut deps));\n    assert_eq!(deps[0].flags, DependencyFlags::REACT_LAZY);\n  }\n\n  #[test]\n  fn test_named_import() {\n    let code = r#\"\nimport {lazy} from 'react';\n\nconst Foo = lazy(() => import('./lazy'));\n    \"#;\n\n    run_with_transformation(code, run);\n  }\n\n  fn test_renamed_import() {\n    let code = r#\"\n  import {lazy as myLazy} from 'react';\n\n  const Foo = myLazy(() => import('./lazy'));\n      \"#;\n    run_with_transformation(code, run);\n  }\n\n  #[test]\n  fn test_namespace_import() {\n    let code = r#\"\n  import * as React from 'react';\n\n  const Foo = React.lazy(() => import('./lazy'));\n      \"#;\n    run_with_transformation(code, run);\n  }\n\n  #[test]\n  fn test_default_import() {\n    let code = r#\"\n  import React from 'react';\n\n  const Foo = React.lazy(() => import('./lazy'));\n      \"#;\n    run_with_transformation(code, run);\n  }\n\n  fn test_require() {\n    let code = r#\"\n  const React = require('react');\n\n  const Foo = React.lazy(() => import('./lazy'));\n      \"#;\n    run_with_transformation(code, run);\n  }\n\n  fn test_require_destructure() {\n    let code = r#\"\n  const {lazy} = require('react');\n\n  const Foo = lazy(() => import('./lazy'));\n      \"#;\n    run_with_transformation(code, run);\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/test_utils.rs",
    "content": "use swc_core::{\n  common::{\n    FileName, GLOBALS, Globals, Mark, SourceMap, input::StringInput, sync::Lrc, util::take::Take,\n  },\n  ecma::{\n    ast::Module,\n    codegen::text_writer::JsWriter,\n    parser::{Parser, lexer::Lexer},\n    transforms::base::resolver,\n    visit::{Fold, FoldWith, VisitMut, VisitMutWith},\n  },\n};\n\npub(crate) struct RunTestContext {\n  /// Source-map in use\n  pub source_map: Lrc<SourceMap>,\n  /// Global mark from SWC resolver\n  pub global_mark: Mark,\n  /// Unresolved mark from SWC resolver\n  pub unresolved_mark: Mark,\n}\n\npub(crate) struct RunVisitResult<V> {\n  pub output_code: String,\n  #[allow(unused)]\n  pub visitor: V,\n}\n\n/// Helper to test SWC visitors.\n///\n/// * Parse `code` with SWC\n/// * Run a visitor over it\n/// * Return the result\n///\npub(crate) fn run_visit<V: VisitMut>(\n  code: &str,\n  make_visit: impl FnOnce(RunTestContext) -> V,\n) -> RunVisitResult<V> {\n  let (output_code, visitor) = run_with_transformation(\n    code,\n    |run_test_context: RunTestContext, module: &mut Module| {\n      let mut visit = make_visit(run_test_context);\n      module.visit_mut_with(&mut visit);\n      visit\n    },\n  );\n  RunVisitResult {\n    output_code,\n    visitor,\n  }\n}\n\n/// Same as `run_visit` but for `Fold` instances\n#[allow(unused)]\npub(crate) fn run_fold<V: Fold>(\n  code: &str,\n  make_fold: impl FnOnce(RunTestContext) -> V,\n) -> RunVisitResult<V> {\n  let (output_code, visitor) = run_with_transformation(\n    code,\n    |run_test_context: RunTestContext, module: &mut Module| {\n      let mut visit = make_fold(run_test_context);\n      *module = module.take().fold_with(&mut visit);\n      visit\n    },\n  );\n  RunVisitResult {\n    output_code,\n    visitor,\n  }\n}\n\n/// Parse code, run resolver over it, then run the `tranform` function with the parsed module\n/// codegen and return the results.\npub(crate) fn run_with_transformation<R>(\n  code: &str,\n  transform: impl FnOnce(RunTestContext, &mut Module) -> R,\n) -> (String, R) {\n  let source_map = Lrc::new(SourceMap::default());\n  let source_file = source_map.new_source_file(Lrc::new(FileName::Anon), code.into());\n\n  let lexer = Lexer::new(\n    Default::default(),\n    Default::default(),\n    StringInput::from(&*source_file),\n    None,\n  );\n\n  let mut parser = Parser::new_from(lexer);\n  let mut module = parser.parse_module().unwrap();\n\n  GLOBALS.set(&Globals::new(), || {\n    let global_mark = Mark::new();\n    let unresolved_mark = Mark::new();\n    module.visit_mut_with(&mut resolver(unresolved_mark, global_mark, false));\n\n    let context = RunTestContext {\n      source_map: source_map.clone(),\n      global_mark,\n      unresolved_mark,\n    };\n    let result = transform(context, &mut module);\n\n    let mut output_buffer = vec![];\n    let writer = JsWriter::new(source_map.clone(), \"\\n\", &mut output_buffer, None);\n    let mut emitter = swc_core::ecma::codegen::Emitter {\n      cfg: Default::default(),\n      cm: source_map,\n      comments: None,\n      wr: writer,\n    };\n    emitter.emit_module(&module).unwrap();\n    let output_code = String::from_utf8(output_buffer).unwrap();\n\n    (output_code, result)\n  })\n}\n\n#[cfg(test)]\nmod test {\n  use swc_core::ecma::{\n    ast::{Lit, Str},\n    visit::VisitMut,\n  };\n\n  use super::*;\n\n  #[test]\n  fn test_example() {\n    struct Visitor;\n    impl VisitMut for Visitor {\n      fn visit_mut_lit(&mut self, n: &mut Lit) {\n        *n = Lit::Str(Str::from(\"replacement\"));\n      }\n    }\n\n    let code = r#\"console.log('test!')\"#;\n    let RunVisitResult { output_code, .. } = run_visit(code, |_: RunTestContext| Visitor);\n    assert_eq!(\n      output_code,\n      r#\"console.log(\"replacement\");\n\"#\n    );\n  }\n\n  #[test]\n  fn test_fold() {\n    struct Folder;\n    impl Fold for Folder {\n      fn fold_lit(&mut self, _n: Lit) -> Lit {\n        Lit::Str(Str::from(\"replacement\"))\n      }\n    }\n\n    let code = r#\"console.log('test!')\"#;\n    let RunVisitResult { output_code, .. } = run_fold(code, |_: RunTestContext| Folder);\n    assert_eq!(\n      output_code,\n      r#\"console.log(\"replacement\");\n\"#\n    );\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/typeof_replacer.rs",
    "content": "use swc_core::{\n  common::Mark,\n  ecma::{\n    ast::{Expr, Lit, Str, UnaryOp},\n    visit::{VisitMut, VisitMutWith},\n  },\n};\n\nuse crate::utils::is_unresolved;\n\n/// Replaces `typeof module`, `typeof exports` and `typeof require` unary operator expressions\n/// with the resulting string literals.\n///\n/// Requires `unresolved_mark` as passed into `swc_ecma_transform_base::resolver`, which is a mark\n/// the SWC transformer will add into variables that are NOT shadowed. This means the `typeof`\n/// expression will be replaced at build time with the resulting literal only if it's referring to\n/// the global `module`, `exports` and `require` symbols.\npub struct TypeofReplacer {\n  unresolved_mark: Mark,\n  is_node: bool,\n}\n\nimpl TypeofReplacer {\n  pub fn new(unresolved_mark: Mark, is_node: bool) -> Self {\n    Self {\n      unresolved_mark,\n      is_node,\n    }\n  }\n}\n\nimpl TypeofReplacer {\n  /// Given an expression, optionally return a replacement if it happens to be `typeof $symbol` for\n  /// the constants supported in this transformation step (`require`, `exports` and `module`).\n  fn get_replacement(&mut self, node: &Expr) -> Option<Expr> {\n    let Expr::Unary(unary) = node else {\n      return None;\n    };\n    if unary.op != UnaryOp::TypeOf {\n      return None;\n    }\n    // typeof require -> \"function\"\n    // typeof module -> \"object\"\n    let Expr::Ident(ident) = &*unary.arg else {\n      return None;\n    };\n\n    if ident.sym == \"require\" && is_unresolved(&ident, self.unresolved_mark) {\n      return Some(Expr::Lit(Lit::Str(Str {\n        span: unary.span,\n        value: \"function\".into(),\n        raw: None,\n      })));\n    }\n\n    if &*ident.sym == \"exports\" && is_unresolved(&ident, self.unresolved_mark) {\n      return Some(Expr::Lit(Lit::Str(Str {\n        span: unary.span,\n        value: \"object\".into(),\n        raw: None,\n      })));\n    }\n\n    if ident.sym == \"module\" && is_unresolved(&ident, self.unresolved_mark) {\n      return Some(Expr::Lit(Lit::Str(Str {\n        span: unary.span,\n        value: \"object\".into(),\n        raw: None,\n      })));\n    }\n\n    // Replace `typeof process` with \"undefined\" in browser builds to avoid pulling in the polyfill.\n    if !self.is_node && ident.sym == \"process\" && is_unresolved(&ident, self.unresolved_mark) {\n      return Some(Expr::Lit(Lit::Str(Str {\n        span: unary.span,\n        value: \"undefined\".into(),\n        raw: None,\n      })));\n    }\n\n    None\n  }\n}\n\nimpl VisitMut for TypeofReplacer {\n  fn visit_mut_expr(&mut self, node: &mut Expr) {\n    let Some(replacement) = self.get_replacement(node) else {\n      node.visit_mut_children_with(self);\n      return;\n    };\n\n    *node = replacement;\n  }\n}\n\n#[cfg(test)]\nmod test {\n  use crate::test_utils::run_visit;\n\n  use super::*;\n\n  #[test]\n  fn test_visitor_typeof_replacer_without_shadowing() {\n    let code = r#\"\nconst x = typeof require;\nconst m = typeof module;\nconst e = typeof exports;\nconst p = typeof process;\n\"#;\n\n    let output_code = run_visit(code, |context| TypeofReplacer {\n      unresolved_mark: context.unresolved_mark,\n      is_node: false,\n    })\n    .output_code;\n\n    let expected_code = r#\"\nconst x = \"function\";\nconst m = \"object\";\nconst e = \"object\";\nconst p = \"undefined\";\n\"#\n    .trim_start();\n    assert_eq!(output_code, expected_code);\n  }\n\n  #[test]\n  fn test_typeof_nested_expression() {\n    let code = r#\"\nconst x = typeof require === 'function';\n\"#;\n\n    let output_code = run_visit(code, |context| TypeofReplacer {\n      unresolved_mark: context.unresolved_mark,\n      is_node: false,\n    })\n    .output_code;\n\n    let expected_code = r#\"\nconst x = \"function\" === 'function';\n\"#\n    .trim_start();\n    assert_eq!(output_code, expected_code);\n  }\n\n  #[test]\n  fn test_visitor_typeof_replacer_with_shadowing() {\n    let code = r#\"\nfunction wrapper({ require, exports }) {\n    const x = typeof require;\n    const m = typeof module;\n    const e = typeof exports;\n}\n    \"#;\n\n    let output_code = run_visit(code, |context| TypeofReplacer {\n      unresolved_mark: context.unresolved_mark,\n      is_node: false,\n    })\n    .output_code;\n\n    let expected_code = r#\"\nfunction wrapper({ require, exports }) {\n    const x = typeof require;\n    const m = \"object\";\n    const e = typeof exports;\n}\n\"#\n    .trim_start();\n    assert_eq!(output_code, expected_code);\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/core/src/utils.rs",
    "content": "use std::cmp::Ordering;\n\nuse serde::{Deserialize, Serialize};\nuse swc_core::{\n  common::{\n    DUMMY_SP, Mark, SourceMap, Span, SyntaxContext,\n    errors::{DiagnosticBuilder, Emitter},\n  },\n  ecma::{\n    ast::{self, Ident, IdentName},\n    atoms::Atom as JsWord,\n  },\n};\n\npub fn is_unresolved(ident: &Ident, unresolved_mark: Mark) -> bool {\n  ident.ctxt.outer() == unresolved_mark\n}\n\npub fn match_member_expr(expr: &ast::MemberExpr, idents: Vec<&str>, unresolved_mark: Mark) -> bool {\n  use ast::{Expr, Lit, MemberProp, Str};\n\n  let mut member = expr;\n  let mut idents = idents;\n  while idents.len() > 1 {\n    let expected = idents.pop().unwrap();\n    let prop = match &member.prop {\n      MemberProp::Computed(comp) => {\n        if let Expr::Lit(Lit::Str(Str { value: ref sym, .. })) = *comp.expr {\n          sym\n        } else {\n          return false;\n        }\n      }\n      MemberProp::Ident(IdentName { sym, .. }) => sym,\n      _ => return false,\n    };\n\n    if prop != expected {\n      return false;\n    }\n\n    match &*member.obj {\n      Expr::Member(m) => member = m,\n      Expr::Ident(id) => {\n        return idents.len() == 1\n          && id.sym == idents.pop().unwrap()\n          && is_unresolved(&id, unresolved_mark);\n      }\n      _ => return false,\n    }\n  }\n\n  false\n}\n\npub fn create_require(specifier: JsWord, unresolved_mark: Mark) -> ast::CallExpr {\n  ast::CallExpr {\n    callee: ast::Callee::Expr(Box::new(ast::Expr::Ident(ast::Ident::new(\n      \"require\".into(),\n      DUMMY_SP,\n      SyntaxContext::empty().apply_mark(unresolved_mark),\n    )))),\n    args: vec![ast::ExprOrSpread {\n      expr: Box::new(ast::Expr::Lit(ast::Lit::Str(specifier.into()))),\n      spread: None,\n    }],\n    span: DUMMY_SP,\n    ctxt: SyntaxContext::empty(),\n    type_args: None,\n  }\n}\n\nfn is_marked(mut ctxt: SyntaxContext, mark: Mark) -> bool {\n  loop {\n    let m = ctxt.remove_mark();\n    if m == Mark::root() {\n      return false;\n    }\n\n    if m == mark {\n      return true;\n    }\n  }\n}\n\npub fn match_str(node: &ast::Expr) -> Option<(JsWord, Span)> {\n  use ast::*;\n\n  match node {\n    // \"string\" or 'string'\n    Expr::Lit(Lit::Str(s)) => Some((s.value.clone(), s.span)),\n    // `string`\n    Expr::Tpl(tpl) if tpl.quasis.len() == 1 && tpl.exprs.is_empty() => {\n      Some(((*tpl.quasis[0].raw).into(), tpl.span))\n    }\n    _ => None,\n  }\n}\n\npub fn match_property_name(node: &ast::MemberExpr) -> Option<(JsWord, Span)> {\n  match &node.prop {\n    ast::MemberProp::Computed(s) => match_str(&s.expr),\n    ast::MemberProp::Ident(id) => Some((id.sym.clone(), id.span)),\n    ast::MemberProp::PrivateName(_) => None,\n  }\n}\n\npub fn match_export_name(name: &ast::ModuleExportName) -> (JsWord, Span) {\n  match name {\n    ast::ModuleExportName::Ident(id) => (id.sym.clone(), id.span),\n    ast::ModuleExportName::Str(s) => (s.value.clone(), s.span),\n  }\n}\n\n/// Properties like `ExportNamedSpecifier::orig` have to be an Ident if `src` is `None`\npub fn match_export_name_ident(name: &ast::ModuleExportName) -> &ast::Ident {\n  match name {\n    ast::ModuleExportName::Ident(id) => id,\n    ast::ModuleExportName::Str(_) => unreachable!(),\n  }\n}\n\npub fn match_require(node: &ast::Expr, unresolved_mark: Mark, ignore_mark: Mark) -> Option<JsWord> {\n  use ast::*;\n\n  match node {\n    Expr::Call(call) => match &call.callee {\n      Callee::Expr(expr) => match &**expr {\n        Expr::Ident(ident) => {\n          if ident.sym == \"require\"\n            && is_unresolved(&ident, unresolved_mark)\n            && !is_marked(ident.ctxt, ignore_mark)\n          {\n            if let Some(arg) = call.args.first() {\n              return match_str(&arg.expr).map(|(name, _)| name);\n            }\n          }\n\n          None\n        }\n        Expr::Member(member) => {\n          if match_member_expr(member, vec![\"module\", \"require\"], unresolved_mark) {\n            if let Some(arg) = call.args.first() {\n              return match_str(&arg.expr).map(|(name, _)| name);\n            }\n          }\n\n          None\n        }\n        _ => None,\n      },\n      _ => None,\n    },\n    _ => None,\n  }\n}\n\npub fn match_import(node: &ast::Expr) -> Option<JsWord> {\n  use ast::*;\n\n  match node {\n    Expr::Call(call) => match &call.callee {\n      Callee::Import(_) => {\n        if let Some(arg) = call.args.first() {\n          return match_str(&arg.expr).map(|(name, _)| name);\n        }\n        None\n      }\n      _ => None,\n    },\n    _ => None,\n  }\n}\n\n// `name` must not be an existing binding.\npub fn create_global_decl_stmt(\n  name: JsWord,\n  init: ast::Expr,\n  global_mark: Mark,\n) -> (ast::Stmt, SyntaxContext) {\n  // The correct value would actually be `DUMMY_SP.apply_mark(Mark::fresh(Mark::root()))`.\n  // But this saves us from running the resolver again in some cases.\n  let ctxt = SyntaxContext::empty().apply_mark(global_mark);\n\n  (\n    ast::Stmt::Decl(ast::Decl::Var(Box::new(ast::VarDecl {\n      kind: ast::VarDeclKind::Var,\n      declare: false,\n      span: DUMMY_SP,\n      ctxt,\n      decls: vec![ast::VarDeclarator {\n        name: ast::Pat::Ident(ast::BindingIdent::from(ast::Ident::new(\n          name, DUMMY_SP, ctxt,\n        ))),\n        span: DUMMY_SP,\n        definite: false,\n        init: Some(Box::new(init)),\n      }],\n    }))),\n    ctxt,\n  )\n}\n\npub fn get_undefined_ident(unresolved_mark: Mark) -> ast::Ident {\n  ast::Ident::new(\n    \"undefined\".into(),\n    DUMMY_SP,\n    SyntaxContext::empty().apply_mark(unresolved_mark),\n  )\n}\n\n#[derive(Debug, Serialize, Deserialize, Clone, Eq, PartialEq)]\n/// Corresponds to the JS SourceLocation type (1-based, end exclusive)\npub struct SourceLocation {\n  pub start_line: usize,\n  pub start_col: usize,\n  pub end_line: usize,\n  pub end_col: usize,\n}\n\nimpl SourceLocation {\n  pub fn from(source_map: &SourceMap, span: Span) -> Self {\n    if span.lo.is_dummy() || span.hi.is_dummy() {\n      return SourceLocation {\n        start_line: 1,\n        start_col: 1,\n        end_line: 1,\n        end_col: 2,\n      };\n    }\n\n    let start = source_map.lookup_char_pos(span.lo);\n    let end = source_map.lookup_char_pos(span.hi);\n    // SWC's columns are exclusive, ours are exclusive\n    // SWC has 0-based columns, ours are 1-based (column + 1)\n    SourceLocation {\n      start_line: start.line,\n      start_col: start.col_display + 1,\n      end_line: end.line,\n      end_col: end.col_display + 1,\n    }\n  }\n}\n\nimpl PartialOrd for SourceLocation {\n  fn partial_cmp(&self, other: &SourceLocation) -> Option<Ordering> {\n    match self.start_line.cmp(&other.start_line) {\n      Ordering::Equal => self.start_col.partial_cmp(&other.start_col),\n      o => Some(o),\n    }\n  }\n}\n\n#[derive(Serialize, Deserialize, Debug, PartialEq)]\npub struct CodeHighlight {\n  pub message: Option<String>,\n  pub loc: SourceLocation,\n}\n\n#[derive(Serialize, Deserialize, Debug, PartialEq)]\npub struct Diagnostic {\n  pub message: String,\n  pub code_highlights: Option<Vec<CodeHighlight>>,\n  pub hints: Option<Vec<String>>,\n  pub show_environment: bool,\n  pub severity: DiagnosticSeverity,\n  pub documentation_url: Option<String>,\n}\n\n#[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]\npub enum DiagnosticSeverity {\n  /// Fails the build with an error.\n  Error,\n  /// Logs a warning, but the build does not fail.\n  Warning,\n  /// An error if this is source code in the project, or a warning if in node_modules.\n  SourceError,\n}\n\n#[derive(Serialize, Debug, Deserialize, Eq, PartialEq, Clone, Copy)]\npub enum SourceType {\n  Script,\n  Module,\n}\n\nimpl Default for SourceType {\n  fn default() -> Self {\n    SourceType::Module\n  }\n}\n\n#[derive(Debug)]\npub struct Bailout {\n  pub loc: SourceLocation,\n  pub reason: BailoutReason,\n}\n\nimpl Bailout {\n  pub fn to_diagnostic(&self) -> Diagnostic {\n    let (message, documentation_url) = self.reason.info();\n    Diagnostic {\n      message: message.into(),\n      documentation_url: Some(documentation_url.into()),\n      code_highlights: Some(vec![CodeHighlight {\n        loc: self.loc.clone(),\n        message: None,\n      }]),\n      show_environment: false,\n      severity: DiagnosticSeverity::Warning,\n      hints: None,\n    }\n  }\n}\n\n#[derive(Debug, Eq, PartialEq)]\npub enum BailoutReason {\n  NonTopLevelRequire,\n  NonStaticDestructuring,\n  TopLevelReturn,\n  Eval,\n  NonStaticExports,\n  FreeModule,\n  FreeExports,\n  ExportsReassignment,\n  ModuleReassignment,\n  NonStaticDynamicImport,\n  NonStaticAccess,\n  ThisInExport,\n}\n\nimpl BailoutReason {\n  fn info(&self) -> (&str, &str) {\n    match self {\n      BailoutReason::NonTopLevelRequire => (\n        \"Conditional or non-top-level `require()` call. This causes the resolved module and all dependencies to be wrapped.\",\n        \"https://parceljs.org/features/scope-hoisting/#avoid-conditional-require()\",\n      ),\n      BailoutReason::NonStaticDestructuring => (\n        \"Non-static destructuring of `require` or dynamic `import()`. This causes all exports of the resolved module to be included.\",\n        \"https://parceljs.org/features/scope-hoisting/#commonjs\",\n      ),\n      BailoutReason::TopLevelReturn => (\n        \"Module contains a top-level `return` statement. This causes the module to be wrapped in a function and tree shaking to be disabled.\",\n        \"https://parceljs.org/features/scope-hoisting/#avoid-top-level-return\",\n      ),\n      BailoutReason::Eval => (\n        \"Module contains usage of `eval`. This causes the module to be wrapped in a function and minification to be disabled.\",\n        \"https://parceljs.org/features/scope-hoisting/#avoid-eval\",\n      ),\n      BailoutReason::NonStaticExports => (\n        \"Non-static access of CommonJS `exports` object. This causes tree shaking to be disabled for the module.\",\n        \"https://parceljs.org/features/scope-hoisting/#commonjs\",\n      ),\n      BailoutReason::FreeModule => (\n        \"Unknown usage of CommonJS `module` object. This causes the module to be wrapped, and tree shaking to be disabled.\",\n        \"https://parceljs.org/features/scope-hoisting/#commonjs\",\n      ),\n      BailoutReason::FreeExports => (\n        \"Unknown usage of CommonJS `exports` object. This causes tree shaking to be disabled.\",\n        \"https://parceljs.org/features/scope-hoisting/#commonjs\",\n      ),\n      BailoutReason::ExportsReassignment => (\n        \"Module contains a reassignment of the CommonJS `exports` object. This causes the module to be wrapped and tree-shaking to be disabled.\",\n        \"https://parceljs.org/features/scope-hoisting/#avoid-module-and-exports-re-assignment\",\n      ),\n      BailoutReason::ModuleReassignment => (\n        \"Module contains a reassignment of the CommonJS `module` object. This causes the module to be wrapped and tree-shaking to be disabled.\",\n        \"https://parceljs.org/features/scope-hoisting/#avoid-module-and-exports-re-assignment\",\n      ),\n      BailoutReason::NonStaticDynamicImport => (\n        \"Unknown dynamic import usage. This causes tree shaking to be disabled for the resolved module.\",\n        \"https://parceljs.org/features/scope-hoisting/#dynamic-imports\",\n      ),\n      BailoutReason::NonStaticAccess => (\n        \"Non-static access of an `import` or `require`. This causes tree shaking to be disabled for the resolved module.\",\n        \"https://parceljs.org/features/scope-hoisting/#dynamic-member-accesses\",\n      ),\n      BailoutReason::ThisInExport => (\n        \"Module contains `this` access of an exported value. This causes the module to be wrapped and tree-shaking to be disabled.\",\n        \"https://parceljs.org/features/scope-hoisting/#avoiding-bail-outs\",\n      ),\n    }\n  }\n}\n\n#[macro_export]\nmacro_rules! fold_member_expr_skip_prop {\n  () => {\n    fn fold_member_expr(\n      &mut self,\n      mut node: swc_core::ecma::ast::MemberExpr,\n    ) -> swc_core::ecma::ast::MemberExpr {\n      node.obj = node.obj.fold_with(self);\n\n      if let swc_core::ecma::ast::MemberProp::Computed(_) = node.prop {\n        node.prop = node.prop.fold_with(self);\n      }\n\n      node\n    }\n  };\n}\n\n#[macro_export]\nmacro_rules! id {\n  ($ident: expr) => {\n    $ident.to_id()\n  };\n}\n\n#[derive(Debug, Clone, Default)]\npub struct ErrorBuffer(\n  std::sync::Arc<parking_lot::Mutex<Vec<swc_core::common::errors::Diagnostic>>>,\n);\n\nimpl Emitter for ErrorBuffer {\n  fn emit(&mut self, db: &mut DiagnosticBuilder) {\n    self.0.lock().push((**db).clone());\n  }\n}\n\npub fn error_buffer_to_diagnostics(\n  error_buffer: &ErrorBuffer,\n  source_map: &SourceMap,\n) -> Vec<Diagnostic> {\n  let s = error_buffer.0.lock().clone();\n  s.iter()\n    .map(|diagnostic| {\n      let message = diagnostic.message();\n      let span = diagnostic.span.clone();\n      let suggestions = diagnostic.suggestions.clone();\n\n      let span_labels = span.span_labels();\n      let code_highlights = if !span_labels.is_empty() {\n        let mut highlights = vec![];\n        for span_label in span_labels {\n          highlights.push(CodeHighlight {\n            message: span_label.label,\n            loc: SourceLocation::from(source_map, span_label.span),\n          });\n        }\n\n        Some(highlights)\n      } else {\n        None\n      };\n\n      let hints = if !suggestions.is_empty() {\n        Some(\n          suggestions\n            .into_iter()\n            .map(|suggestion| suggestion.msg)\n            .collect(),\n        )\n      } else {\n        None\n      };\n\n      Diagnostic {\n        message,\n        code_highlights,\n        hints,\n        show_environment: false,\n        severity: DiagnosticSeverity::Error,\n        documentation_url: None,\n      }\n    })\n    .collect()\n}\n"
  },
  {
    "path": "packages/transformers/js/hoist.md",
    "content": "# SWC scope hoisting\n\nThis document describes how the SWC-based scope hoisting implementation works, in comparison to the previous implementation.\n\n## Overview\n\nScope hoisting is the process of combining multiple JavaScript modules together into a single scope. This enables dead code elimination (aka tree shaking) to be more effective, and improves runtime performance by making cross-module references static rather than dynamic property lookups.\n\nParcel has historically implemented scope hoisting in JavaScript on top of Babel ASTs. It operated in 3 phases:\n\n1. Hoist - on an individual module, rename all top-level variables to be unique, and perform static analysis on imports and exports to produce symbol data. This prepares the module to be concatenated safely with other modules.\n2. Concat - concatenate all modules together into a single scope, following the order of `$parcel$require` calls inserted by the hoist phase. This also handled wrapping modules that were required from a non-top-level statement to preserve side effect ordering. Operates on module ASTs.\n3. Link - replace temporary imported variable names with the resolved exported variable names from the imported module. In addition, output formats are handled here along with some dead code elimination. Operates on a single concatenated AST.\n\nThe new scope hoisting implementation operates in just two phases.\n\n1. Hoist - similar to the previous hoist implementation, but redesigned to allow subsequent phases to operate only using strings rather than ASTs for performance. This part is implemented in Rust.\n2. Packaging - This is a combination of the previous concat and link phases into a single phase, that does simple string replacements to match up imports and exports. In addition, wrapping of assets to preserve side effect ordering is done here, as well as insertion of exports namespace objects if needed.\n\n## Transforming\n\nThe hoist phase should do as much work as possible as it operates on ASTs and and in parallel on individual files. It's also implemented in Rust using SWC for performance.\n\nThis is implemented in two passes. The first pass analyzes and collects data about the module, which is used in the second pass, which actually transforms the module.\n\nIn the first pass, we collect:\n\n1. All imported/required variable names. This allows us to track static and non-static accesses of these variables to determine what symbols of a dependency are used.\n2. All exported variable names. This allows us to easily rename them later.\n3. All non-static member expressions and other accesses. This allows us to determine later whether we need to access a namespace object or if we can statically resolve all symbols of a dependency. We also track when a dependency is accessed non-statically by other means (e.g. a non-static destructuring assignment).\n4. Whether the CommonJS `exports` object is referenced non-statically. This means we will need to always use the namespace rather than resolving exports statically.\n5. Dependencies that need to be wrapped because they were required anywhere except a top-level variable declaration, e.g. inside a function. These deps need to be wrapped to preserve side effect ordering.\n6. Whether something in _this_ module requires us to wrap, e.g. `eval`, top-level return, non-static `module` access, `exports` re-assignment, etc.\n\nIn the second pass, we transform:\n\n1. For each import statement, a new import like `import \"module_id:dep_specifier\";` is hoisted to the top of the module. This indicates where the dependency code should be inserted by the packager later.\n2. For `require` calls, an import like above is inserted before the current top-level statement. This is new in this version, and prevents us needing to search for `$parcel$require` calls in statements to find where to insert the code in the packager. If the require is anywhere except a top-level variable declaration, it is marked as wrapped to preserve side effect ordering (also more conservative than before). The require is replaced by an identifier referencing the `*` symbol in the dependency, or the relevant symbol if in a statically resolvable member expression.\n3. Each export statement is replaced by its declaration/expression, if any, and renamed.\n4. CommonJS exports are replaced with variable assignments. If the CJS exports object is accessed non-statically, as determined in the previous phase, then an assignment to an object is emitted, otherwise each export is an individual variable.\n5. References to imports/requires are replaced with a renamed variable, and added to the symbols. If we previously determined in the first phase that the import was accessed non-statically, a member expression is used for all references to that dependency.\n6. All top-level variables are renamed to include the module id so that they can be concatenated together safely. This is skipped if the module needs to be wrapped, e.g. used `eval`.\n\nThe output from Rust is an object which is used by the JSTransformer Parcel plugin to add symbols to dependencies and the asset itself, along with some metadata that is used by the packager.\n\n## Packaging\n\nThe packager operates purely on strings now rather than ASTs. This makes it much faster since it doesn't need to deserialize a bunch of ASTs from disk and perform codegen.\n\nThe packager visits dependencies recursively, starting from the bundle entries, and following the `import` statements left by the hoist transform. It resolves the import specifiers to dependencies, follows the dependency to a resolved asset, and then recursively processes that asset. The `import` statement is replaced by the processed code of the dependency.\n\nFor each asset, we look at the symbols used by each dependency and resolve them to their final location, following re-exports. This is done by Parcel core in the bundle graph. We perform a string replacement for each temporary import name to the final resolved symbol. If the resolved asset is wrapped, we use `parcelRequire` to load it, and if it has non-static exports, we use a member expression on the namespace object.\n\nThe packager also synthesizes the exports object when needed. If the namespace is used, the asset has non-static exports, or it is wrapped, a namespace is declared, and each used symbol is added to the namespace using the `$parcel$export` helper. This is different from the previous implemetation, which added the exports object in the link phase, and then _removed_ it if unnecessary in the link phase. Now we do the opposite, which makes it possible to operate on strings rather than ASTs.\n\nIf the asset is wrapped, we use the `parcelRequire.register` function to register it in a module map. This is used both when the asset is required in a non top-level context, and also when the asset has non-statically analyzable code (e.g. `eval`). Previously we wrapped in hoist for the latter. In this case, a `module` and `exports` object are passed in, and we use those instead of the locally declared exports object, which makes circular dependencies work.\n\n## Summary of differences\n\n- requires and imports are now replaced with top-level `import \"module_id:specifier\"` statements rather than inline `$parcel$require` calls. This indicates where to insert the dependent code, and no longer requires the packager to search for requires inside statements.\n- THe hoist transform is much more conservative. Only top-level variable declarations pointing to a `require` or a member expression with a `require` are handled without wrapping. This should solve cases like [#5606](https://github.com/parcel-bundler/parcel/issues/5606). In addition, if any non-static access of an import occurs, we always use the namespace object rather than using static references for some imports and dynamic references for others. Same goes for exports.\n- Hoist no longer performs any wrapping. All wrapping is now handled in the packager.\n- The packager operates only on strings and does not require any ASTs.\n- The export namespace object is not generated in the hoist phases and instead is synthesized only when needed during packaging (e.g. if the module is accessed non-statically). This applies to both ESM and fully statically analyzable CJS. For CJS with exports that are non-static, the hoist phase still performs assignments to a namespace object.\n- We use `parcelRequire.register` for wrapping rather than `$init` calls. This should allow us to share a module map between bundles and solve some side effect ordering/circular dependency issues.\n\n## Examples\n\nThe following examples demonstrate how the scope hoisting implementation works.\n\n### ESM -> ESM\n\n#### Input\n\n```js\n// a.js\nimport {b} from './b';\nb();\n\n// b.js\nlet b = 2;\nexport {b};\n```\n\n#### Hoist output\n\n```js\n// a.js\nimport 'id:./b';\n$id$import$b$b();\n\n// b.js\nlet $id$export$b = 2;\n```\n\nimported symbols:\n\n| Local          | Specifier | Imported |\n| -------------- | --------- | -------- |\n| $id$import$b$b | ./b       | b        |\n\nexported symbols:\n\n| Exported | Local         |\n| -------- | ------------- |\n| b        | $id$export\\$b |\n\n#### Packaged output\n\n```js\nlet $id$export$b = 2;\n$id$export$b$b();\n```\n\n### ESM -> Static CJS\n\n#### Input\n\n```js\n// a.js\nimport {b} from './b';\nb();\n\n// b.js\nexports.b = 2;\n```\n\n#### Hoist output\n\n```js\n// a.js\nimport 'id:./b';\n$id$import$b$b();\n\n// b.js\nlet $id$export$b = 2;\n```\n\nimported symbols:\n\n| Local          | Specifier | Imported |\n| -------------- | --------- | -------- |\n| $id$import$b$b | ./b       | b        |\n\nexported symbols:\n\n| Exported | Local         |\n| -------- | ------------- |\n| b        | $id$export\\$b |\n\n#### Packaged output\n\n```js\nlet $id$export$b = 2;\n$id$export$b();\n```\n\n### Static CJS -> Static CJS\n\n#### Input\n\n```js\n// a.js\nconst {b} = require('./b');\nb();\n\n// b.js\nexports.b = 2;\n```\n\n#### Hoist output\n\n```js\n// a.js\nimport 'id:./b';\n$id$import$b$b();\n\n// b.js\nlet $id$export$b = 2;\n```\n\nimported symbols:\n\n| Local          | Specifier | Imported |\n| -------------- | --------- | -------- |\n| $id$import$b$b | ./b       | b        |\n\nexported symbols:\n\n| Exported | Local         |\n| -------- | ------------- |\n| b        | $id$export\\$b |\n\n#### Packaged output\n\n```js\nlet $id$export$b = 2;\n$id$export$b();\n```\n\n### Static CJS -> ESM\n\n#### Input\n\n```js\n// a.js\nconst {b} = require('./b');\nb();\n\n// b.js\nlet b = 2;\nexport {b};\n```\n\n#### Hoist output\n\n```js\n// a.js\nimport 'id:./b';\n$id$import$b$b();\n\n// b.js\nlet $id$export$b = 2;\n```\n\nimported symbols:\n\n| Local          | Specifier | Imported |\n| -------------- | --------- | -------- |\n| $id$import$b$b | ./b       | b        |\n\nexported symbols:\n\n| Exported | Local         |\n| -------- | ------------- |\n| b        | $id$export\\$b |\n\n#### Packaged output\n\n```js\nlet $id$export$b = 2;\n$id$export$b();\n```\n\n### Non-static require -> Static exports\n\n#### Input\n\n```js\n// a.js\nconst b = require('./b');\nb[something]();\n\n// b.js\nexports.foo = 2;\n```\n\n#### Hoist output\n\n```js\n// a.js\nimport 'id:./b';\n$id$import$b[something]();\n\n// b.js\nlet $id$export$foo = 2;\n```\n\nimported symbols:\n\n| Local         | Specifier | Imported |\n| ------------- | --------- | -------- |\n| $id$import\\$b | ./b       | \\*       |\n\nexported symbols:\n\n| Exported | Local           |\n| -------- | --------------- |\n| foo      | $id$export\\$foo |\n\n#### Packaged output\n\n```js\nlet $id$export$foo = 2;\nlet $id$exports = {};\n$parcel$export($id$exports, 'foo', () => $id$export$foo);\n$id$exports[something]();\n```\n\n### Static require -> Non-static exports\n\n#### Input\n\n```js\n// a.js\nconst b = require('./b');\nb.foo();\n\n// b.js\nexports[something] = 2;\n```\n\n#### Hoist output\n\n```js\n// a.js\nimport 'id:./b';\n$id$import$b$foo();\n\n// b.js\n$id$exports[something] = 2;\n```\n\nimported symbols:\n\n| Local            | Specifier | Imported |\n| ---------------- | --------- | -------- |\n| $id$import$b$foo | ./b       | foo      |\n\nexported symbols:\n\n| Exported | Local       |\n| -------- | ----------- |\n| \\*       | $id$exports |\n\n#### Packaged output\n\n```js\nlet $id$exports = {};\n$id$exports[something] = 2;\n$id$exports.foo();\n```\n\n### Non-static require -> Non static exports\n\n#### Input\n\n```js\n// a.js\nconst b = require('./b');\nb[foo]();\n\n// b.js\nexports[something] = 2;\n```\n\n#### Hoist output\n\n```js\n// a.js\nimport 'id:./b';\n$id$import$b[foo]();\n\n// b.js\n$id$exports[something] = 2;\n```\n\nimported symbols:\n\n| Local         | Specifier | Imported |\n| ------------- | --------- | -------- |\n| $id$import\\$b | ./b       | \\*       |\n\nexported symbols:\n\n| Exported | Local       |\n| -------- | ----------- |\n| \\*       | $id$exports |\n\noutput:\n\n```js\nlet $id$exports = {};\n$id$exports[something] = 2;\n$id$exports[foo]();\n```\n\n### Wrapped require\n\n#### Input\n\n```js\n// a.js\nfunction test() {\n  return require('./b').foo;\n}\n\n// b.js\nexports.foo = 2;\n```\n\n#### Hoist output\n\n```js\n// a.js\nimport 'id:./b';\nfunction test() {\n  return $id$import$b$foo;\n}\n\n// b.js\nlet $id$export$foo = 2;\n```\n\nimported symbols:\n\n| Local            | Specifier | Imported |\n| ---------------- | --------- | -------- |\n| $id$import$b$foo | ./b       | foo      |\n\nexported symbols:\n\n| Exported | Local           |\n| -------- | --------------- |\n| foo      | $id$export\\$foo |\n\nwrapped dependencies:\n\n- `./b`\n\n#### Packaged output\n\n```js\nparcelRequire.register('b', module => {\n  let $id$export$foo = 2;\n  $parcel$export(module.exports, 'foo', () => $id$export$foo);\n});\n\nfunction test() {\n  return parcelRequire('b').foo;\n}\n```\n\n## CommonJS patterns\n\n### Safe patterns\n\nThese are the patterns that we are able to fully statically analyze in CommonJS modules. This means that requires can be replaced with static variable references to the imported module's exports. The exports are static, so are replaced with individual variables for each exported symbol.\n\n#### Requires\n\n```js\nrequire('y');\nrequire('y').foo;\nrequire('y').foo();\n\nconst y = require('y');\nconst x = require('y').x;\nconst {x} = require('y');\nconst {x: y} = require('y');\nconst {x = 2} = require('y');\n\n// Safe but needs to be split into separate declarations.\nconst a = sideEffect(),\n  b = require('y');\n```\n\n#### Exports\n\n```js\nexports.foo = 2;\nmodule.exports.foo = 2;\nthis.foo = 2;\nexports['foo'] = 2;\n\nfunction test() {\n  exports.foo = 2;\n}\n```\n\n### Non-static patterns\n\nThese patterns require a namespace object to be used instead of static references.\n\n#### Requires\n\n```js\nrequire('x')[something];\nconst x = require('x')[something];\nconst x = require('x');\nx[something];\nconst {x, ...y} = require('x');\nx = require('y');\n({x} = require('y'));\n```\n\n#### Exports\n\n```js\nexports[foo] = 2;\nmodule.exports[foo] = 2;\nthis[foo] = 2;\n\nsideEffect(exports);\nsideEffect(module.exports);\n```\n\n### Wrap patterns\n\nThese patterns require the imported module to be wrapped to preserve side effect ordering.\n\n#### Requires\n\n```js\nfunction x() {\n  const x = require('y');\n  // etc.\n}\n\nconst x = sideEffect() + require('b');\nconst x = sideEffect(), require('b');\nconst x = sideEffect() || require('b');\nconst x = condition ? require('a') : require('b');\n\nif (condition) require('a');\nfor (let x = require('y'); x < 5; x++) {}\n// etc.\n```\n\n#### Exports\n\n```js\n// Exports re-assigned\nexports.foo = 2;\nexports = {};\nexports.bar = 3;\n\n({exports} = something);\n\n// Module accessed non-statically\nsideEffect(module);\n\n// Eval\neval('exports.foo = 2');\n\n// Top-level return\nreturn;\n```\n"
  },
  {
    "path": "packages/transformers/js/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-js\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/JSTransformer.js\",\n  \"source\": \"src/JSTransformer.js\",\n  \"scripts\": {\n    \"test\": \"mocha\"\n  },\n  \"engines\": {\n    \"parcel\": \"^2.16.4\",\n    \"node\": \">= 16.0.0\"\n  },\n  \"files\": [\n    \"lib\",\n    \"src\"\n  ],\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@parcel/workers\": \"2.16.4\",\n    \"@swc/helpers\": \"^0.5.0\",\n    \"browserslist\": \"^4.24.5\",\n    \"nullthrows\": \"^1.1.1\",\n    \"regenerator-runtime\": \"^0.14.1\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"peerDependencies\": {\n    \"@parcel/core\": \"^2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/js/src/JSTransformer.js",
    "content": "// @flow\nimport type {\n  JSONObject,\n  EnvMap,\n  SourceLocation,\n  FilePath,\n  FileCreateInvalidation,\n} from '@parcel/types';\nimport type {SchemaEntity} from '@parcel/utils';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport SourceMap from '@parcel/source-map';\nimport {Transformer} from '@parcel/plugin';\nimport {transform, transformAsync} from '@parcel/rust';\nimport browserslist from 'browserslist';\nimport semver from 'semver';\nimport nullthrows from 'nullthrows';\nimport invariant from 'assert';\nimport ThrowableDiagnostic, {\n  encodeJSONKeyComponent,\n  convertSourceLocationToHighlight,\n} from '@parcel/diagnostic';\nimport {validateSchema, remapSourceLocation, globMatch} from '@parcel/utils';\nimport pkg from '../package.json';\n\nconst JSX_EXTENSIONS = {\n  jsx: true,\n  tsx: true,\n};\n\nconst JSX_PRAGMA = {\n  react: {\n    pragma: 'React.createElement',\n    pragmaFrag: 'React.Fragment',\n    automatic: '>= 17.0.0 || ^16.14.0 || >= 0.0.0-0 < 0.0.0',\n  },\n  preact: {\n    pragma: 'h',\n    pragmaFrag: 'Fragment',\n    automatic: '>= 10.5.0',\n  },\n  nervjs: {\n    pragma: 'Nerv.createElement',\n    pragmaFrag: undefined,\n    automatic: undefined,\n  },\n  hyperapp: {\n    pragma: 'h',\n    pragmaFrag: undefined,\n    automatic: undefined,\n  },\n};\n\nconst BROWSER_MAPPING = {\n  and_chr: 'chrome',\n  and_ff: 'firefox',\n  ie_mob: 'ie',\n  ios_saf: 'ios',\n  op_mob: 'opera',\n  and_qq: null,\n  and_uc: null,\n  baidu: null,\n  bb: null,\n  kaios: null,\n  op_mini: null,\n};\n\n// List of browsers to exclude when the esmodule target is specified.\n// Based on https://caniuse.com/#feat=es6-module\nconst ESMODULE_BROWSERS = [\n  'not ie <= 11',\n  'not edge < 16',\n  'not firefox < 60',\n  'not chrome < 61',\n  'not safari < 11',\n  'not opera < 48',\n  'not ios_saf < 11',\n  'not op_mini all',\n  'not android < 76',\n  'not blackberry > 0',\n  'not op_mob > 0',\n  'not and_chr < 76',\n  'not and_ff < 68',\n  'not ie_mob > 0',\n  'not and_uc > 0',\n  'not samsung < 8.2',\n  'not and_qq > 0',\n  'not baidu > 0',\n  'not kaios > 0',\n];\n\nconst CONFIG_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    inlineFS: {\n      type: 'boolean',\n    },\n    inlineEnvironment: {\n      oneOf: [\n        {\n          type: 'boolean',\n        },\n        {\n          type: 'array',\n          items: {\n            type: 'string',\n          },\n        },\n      ],\n    },\n    unstable_inlineConstants: {\n      type: 'boolean',\n    },\n  },\n  additionalProperties: false,\n};\n\nconst SCRIPT_ERRORS = {\n  browser: {\n    message: 'Browser scripts cannot have imports or exports.',\n    hint: 'Add the type=\"module\" attribute to the <script> tag.',\n  },\n  'web-worker': {\n    message:\n      'Web workers cannot have imports or exports without the `type: \"module\"` option.',\n    hint: \"Add {type: 'module'} as a second argument to the Worker constructor.\",\n  },\n  'service-worker': {\n    message:\n      'Service workers cannot have imports or exports without the `type: \"module\"` option.',\n    hint: \"Add {type: 'module'} as a second argument to the navigator.serviceWorker.register() call.\",\n  },\n};\n\nconst OPTIONAL = 1 << 0;\nconst HELPER = 1 << 1;\nconst NEEDS_STABLE_NAME = 1 << 2;\nconst REACT_LAZY = 1 << 3;\n\ntype TSConfig = {\n  compilerOptions?: {\n    // https://www.typescriptlang.org/tsconfig#jsx\n    jsx?: 'react' | 'react-jsx' | 'react-jsxdev' | 'preserve' | 'react-native',\n    // https://www.typescriptlang.org/tsconfig#jsxFactory\n    jsxFactory?: string,\n    // https://www.typescriptlang.org/tsconfig#jsxFragmentFactory\n    jsxFragmentFactory?: string,\n    // https://www.typescriptlang.org/tsconfig#jsxImportSource\n    jsxImportSource?: string,\n    // https://www.typescriptlang.org/tsconfig#experimentalDecorators\n    experimentalDecorators?: boolean,\n    // https://www.typescriptlang.org/tsconfig#useDefineForClassFields\n    useDefineForClassFields?: boolean,\n    // https://www.typescriptlang.org/tsconfig#target\n    target?: string, // 'es3' | 'es5' | 'es6' | 'es2015' | ...  |'es2022' | ... | 'esnext'\n    ...\n  },\n  ...\n};\n\ntype MacroAsset = {|\n  type: string,\n  content: string,\n|};\n\n// NOTE: Make sure this is in sync with the TypeScript definition in the @parcel/macros package.\ntype MacroContext = {|\n  addAsset(asset: MacroAsset): void,\n  loc: {|\n    +filePath: string,\n    +line: number,\n    +col: number,\n  |},\n  invalidateOnFileChange(FilePath): void,\n  invalidateOnFileCreate(FileCreateInvalidation): void,\n  invalidateOnEnvChange(string): void,\n  invalidateOnStartup(): void,\n  invalidateOnBuild(): void,\n|};\n\nexport default (new Transformer({\n  async loadConfig({config, options}) {\n    let pkg = await config.getPackage();\n    let isJSX,\n      pragma,\n      pragmaFrag,\n      jsxImportSource,\n      automaticJSXRuntime,\n      reactRefresh,\n      decorators,\n      useDefineForClassFields;\n    if (config.isSource) {\n      let reactLib;\n      if (pkg?.alias && pkg.alias['react']) {\n        // e.g.: `{ alias: { \"react\": \"preact/compat\" } }`\n        reactLib = 'react';\n      } else {\n        // Find a dependency that we can map to a JSX pragma\n        reactLib = Object.keys(JSX_PRAGMA).find(\n          libName =>\n            pkg?.dependencies?.[libName] ||\n            pkg?.devDependencies?.[libName] ||\n            pkg?.peerDependencies?.[libName],\n        );\n      }\n\n      reactRefresh =\n        options.hmrOptions &&\n        options.mode === 'development' &&\n        Boolean(\n          pkg?.dependencies?.react ||\n            pkg?.devDependencies?.react ||\n            pkg?.peerDependencies?.react,\n        );\n\n      let tsconfig = await config.getConfigFrom<TSConfig>(\n        options.projectRoot + '/index',\n        ['tsconfig.json', 'jsconfig.json'],\n      );\n      let compilerOptions = tsconfig?.contents?.compilerOptions;\n\n      // Use explicitly defined JSX options in tsconfig.json over inferred values from dependencies.\n      pragma =\n        compilerOptions?.jsxFactory ||\n        (reactLib ? JSX_PRAGMA[reactLib].pragma : undefined);\n      pragmaFrag =\n        compilerOptions?.jsxFragmentFactory ||\n        (reactLib ? JSX_PRAGMA[reactLib].pragmaFrag : undefined);\n\n      if (\n        compilerOptions?.jsx === 'react-jsx' ||\n        compilerOptions?.jsx === 'react-jsxdev' ||\n        compilerOptions?.jsxImportSource\n      ) {\n        jsxImportSource = compilerOptions?.jsxImportSource;\n        automaticJSXRuntime = true;\n      } else if (reactLib) {\n        let effectiveReactLib =\n          pkg?.alias && pkg.alias['react'] === 'preact/compat'\n            ? 'preact'\n            : reactLib;\n        let reactLibVersion =\n          pkg?.dependencies?.[effectiveReactLib] ||\n          pkg?.devDependencies?.[effectiveReactLib] ||\n          pkg?.peerDependencies?.[effectiveReactLib];\n        if (effectiveReactLib === 'react' && reactLibVersion === 'canary') {\n          automaticJSXRuntime = true;\n        } else {\n          let automaticVersion = JSX_PRAGMA[effectiveReactLib]?.automatic;\n          reactLibVersion = reactLibVersion\n            ? semver.validRange(reactLibVersion)\n            : null;\n          let minReactLibVersion =\n            reactLibVersion !== null && reactLibVersion !== '*'\n              ? semver.minVersion(reactLibVersion)?.toString()\n              : null;\n\n          automaticJSXRuntime =\n            automaticVersion &&\n            !compilerOptions?.jsxFactory &&\n            minReactLibVersion != null &&\n            semver.satisfies(minReactLibVersion, automaticVersion, {\n              includePrerelease: true,\n            });\n        }\n\n        jsxImportSource = reactLib;\n      }\n\n      isJSX = Boolean(compilerOptions?.jsx || pragma);\n      decorators = compilerOptions?.experimentalDecorators;\n      useDefineForClassFields = compilerOptions?.useDefineForClassFields;\n      if (\n        useDefineForClassFields === undefined &&\n        compilerOptions?.target != null\n      ) {\n        // Default useDefineForClassFields to true if target is ES2022 or higher (including ESNext)\n        let target = compilerOptions.target.slice(2);\n        if (target === 'next') {\n          useDefineForClassFields = true;\n        } else {\n          useDefineForClassFields = Number(target) >= 2022;\n        }\n      }\n    }\n\n    // Check if we should ignore fs calls\n    // See https://github.com/defunctzombie/node-browser-resolve#skip\n    let ignoreFS =\n      pkg &&\n      pkg.browser &&\n      typeof pkg.browser === 'object' &&\n      pkg.browser.fs === false;\n\n    let conf = await config.getConfigFrom(options.projectRoot + '/index', [], {\n      packageKey: '@parcel/transformer-js',\n    });\n\n    let inlineEnvironment = config.isSource;\n    let inlineFS = !ignoreFS;\n    let inlineConstants = false;\n    if (conf && conf.contents) {\n      validateSchema.diagnostic(\n        CONFIG_SCHEMA,\n        {\n          data: conf.contents,\n          // FIXME\n          source: await options.inputFS.readFile(conf.filePath, 'utf8'),\n          filePath: conf.filePath,\n          prependKey: `/${encodeJSONKeyComponent('@parcel/transformer-js')}`,\n        },\n        // FIXME\n        '@parcel/transformer-js',\n        'Invalid config for @parcel/transformer-js',\n      );\n\n      inlineEnvironment = conf.contents?.inlineEnvironment ?? inlineEnvironment;\n      inlineFS = conf.contents?.inlineFS ?? inlineFS;\n      inlineConstants =\n        conf.contents?.unstable_inlineConstants ?? inlineConstants;\n    }\n\n    return {\n      isJSX,\n      automaticJSXRuntime,\n      jsxImportSource,\n      pragma,\n      pragmaFrag,\n      inlineEnvironment,\n      inlineFS,\n      inlineConstants,\n      reactRefresh,\n      decorators,\n      useDefineForClassFields,\n    };\n  },\n  async transform({asset, config, options, logger}) {\n    let [code, originalMap] = await Promise.all([\n      asset.getBuffer(),\n      asset.getMap(),\n    ]);\n\n    let targets;\n    if (asset.env.isElectron() && asset.env.engines.electron) {\n      targets = {\n        electron: semver.minVersion(asset.env.engines.electron)?.toString(),\n      };\n    } else if (asset.env.isBrowser() && asset.env.engines.browsers) {\n      targets = {};\n\n      let browsers = Array.isArray(asset.env.engines.browsers)\n        ? asset.env.engines.browsers\n        : [asset.env.engines.browsers];\n\n      // If the output format is esmodule, exclude browsers\n      // that support them natively so that we transpile less.\n      if (asset.env.outputFormat === 'esmodule') {\n        browsers = [...browsers, ...ESMODULE_BROWSERS];\n      }\n\n      browsers = browserslist(browsers);\n      for (let browser of browsers) {\n        let [name, version] = browser.split(' ');\n        if (BROWSER_MAPPING.hasOwnProperty(name)) {\n          name = BROWSER_MAPPING[name];\n          if (!name) {\n            continue;\n          }\n        }\n\n        let [major, minor = '0', patch = '0'] = version\n          .split('-')[0]\n          .split('.');\n        if (isNaN(major) || isNaN(minor) || isNaN(patch)) {\n          continue;\n        }\n        let semverVersion = `${major}.${minor}.${patch}`;\n\n        if (targets[name] == null || semver.gt(targets[name], semverVersion)) {\n          targets[name] = semverVersion;\n        }\n      }\n    } else if (asset.env.isNode() && asset.env.engines.node) {\n      targets = {node: semver.minVersion(asset.env.engines.node)?.toString()};\n    }\n\n    let env: EnvMap = {};\n\n    if (!config?.inlineEnvironment) {\n      if (options.env.NODE_ENV != null) {\n        env.NODE_ENV = options.env.NODE_ENV;\n      }\n\n      if (process.env.PARCEL_BUILD_ENV === 'test') {\n        env.PARCEL_BUILD_ENV = 'test';\n      }\n    } else if (Array.isArray(config?.inlineEnvironment)) {\n      for (let match of globMatch(\n        Object.keys(options.env),\n        config.inlineEnvironment,\n      )) {\n        env[match] = String(options.env[match]);\n      }\n    } else {\n      for (let key in options.env) {\n        if (!key.startsWith('npm_')) {\n          env[key] = String(options.env[key]);\n        }\n      }\n    }\n\n    let supportsModuleWorkers =\n      asset.env.shouldScopeHoist && asset.env.supports('worker-module', true);\n    let isJSX = Boolean(config?.isJSX);\n    if (asset.type === 'ts') {\n      isJSX = false;\n    } else if (!isJSX) {\n      isJSX = Boolean(JSX_EXTENSIONS[asset.type]);\n    }\n\n    let type = 'js';\n    if (asset.type === 'ts' || asset.type === 'tsx' || asset.type === 'mdx') {\n      type = asset.type;\n    } else if (isJSX) {\n      type = 'jsx';\n    }\n\n    let macroAssets = [];\n    let {\n      dependencies,\n      code: compiledCode,\n      map,\n      shebang,\n      hoist_result,\n      symbol_result,\n      needs_esm_helpers,\n      diagnostics,\n      used_env,\n      has_node_replacements,\n      is_constant_module,\n      directives,\n      helpers,\n      mdx_exports,\n      mdx_toc,\n      mdx_assets,\n    } = await (transformAsync || transform)({\n      filename: asset.filePath,\n      code,\n      module_id: asset.id,\n      project_root: options.projectRoot,\n      inline_fs: Boolean(config?.inlineFS),\n      context: asset.env.context,\n      env,\n      type,\n      jsx_pragma: config?.pragma,\n      jsx_pragma_frag: config?.pragmaFrag,\n      automatic_jsx_runtime: Boolean(\n        config?.automaticJSXRuntime || asset.meta.jsxRuntime === 'automatic',\n      ),\n      jsx_import_source: config?.jsxImportSource,\n      is_development: options.mode === 'development',\n      react_refresh: Boolean(config?.reactRefresh),\n      decorators: Boolean(config?.decorators),\n      use_define_for_class_fields: Boolean(config?.useDefineForClassFields),\n      targets,\n      source_maps: !!asset.env.sourceMap,\n      scope_hoist:\n        asset.env.shouldScopeHoist && asset.env.sourceType !== 'script',\n      source_type: asset.env.sourceType === 'script' ? 'Script' : 'Module',\n      supports_module_workers: supportsModuleWorkers,\n      is_library: asset.env.isLibrary,\n      is_esm_output: asset.env.outputFormat === 'esmodule',\n      trace_bailouts: options.logLevel === 'verbose',\n      is_swc_helpers: /@swc[/\\\\]helpers/.test(asset.filePath),\n      standalone: asset.query.has('standalone'),\n      inline_constants: config.inlineConstants,\n      callMacro: asset.isSource\n        ? async (err, src, exportName, args, loc) => {\n            let mod;\n            try {\n              mod = await options.packageManager.require(src, asset.filePath);\n\n              // Default interop for CommonJS modules.\n              if (\n                exportName === 'default' &&\n                !mod.__esModule &&\n                // $FlowFixMe\n                Object.prototype.toString.call(config) !== '[object Module]'\n              ) {\n                mod = {default: mod};\n              }\n\n              if (!Object.hasOwnProperty.call(mod, exportName)) {\n                throw new Error(`\"${src}\" does not export \"${exportName}\".`);\n              }\n            } catch (err) {\n              throw {\n                kind: 1,\n                message: err.message,\n              };\n            }\n\n            try {\n              if (typeof mod[exportName] === 'function') {\n                let ctx: MacroContext = {\n                  // Allows macros to emit additional assets to add as dependencies (e.g. css).\n                  addAsset(a: MacroAsset) {\n                    let k =\n                      (asset.uniqueKey ? asset.uniqueKey + ':' : '') +\n                      String(macroAssets.length);\n                    let map;\n                    if (asset.env.sourceMap) {\n                      // Generate a source map that maps each line of the asset to the original macro call.\n                      map = new SourceMap(options.projectRoot);\n                      let mappings = [];\n                      let line = 1;\n                      for (let i = 0; i <= a.content.length; i++) {\n                        if (i === a.content.length || a.content[i] === '\\n') {\n                          mappings.push({\n                            generated: {\n                              line,\n                              column: 0,\n                            },\n                            source: asset.filePath,\n                            original: {\n                              line: loc.line,\n                              column: loc.col,\n                            },\n                          });\n                          line++;\n                        }\n                      }\n\n                      map.addIndexedMappings(mappings);\n                      if (originalMap) {\n                        map.extends(originalMap);\n                      } else {\n                        map.setSourceContent(asset.filePath, code.toString());\n                      }\n                    }\n\n                    macroAssets.push({\n                      type: a.type,\n                      content: a.content,\n                      map,\n                      uniqueKey: k,\n                      bundleBehavior: null,\n                    });\n\n                    asset.addDependency({\n                      specifier: k,\n                      specifierType: 'esm',\n                    });\n                  },\n                  loc: {\n                    filePath: asset.filePath,\n                    line: loc.line,\n                    col: loc.col,\n                  },\n                  invalidateOnFileChange(filePath) {\n                    asset.invalidateOnFileChange(filePath);\n                  },\n                  invalidateOnFileCreate(invalidation) {\n                    asset.invalidateOnFileCreate(invalidation);\n                  },\n                  invalidateOnEnvChange(env) {\n                    asset.invalidateOnEnvChange(env);\n                  },\n                  invalidateOnStartup() {\n                    asset.invalidateOnStartup();\n                  },\n                  invalidateOnBuild() {\n                    asset.invalidateOnBuild();\n                  },\n                };\n\n                return mod[exportName].apply(ctx, args);\n              } else {\n                throw new Error(\n                  `\"${exportName}\" in \"${src}\" is not a function.`,\n                );\n              }\n            } catch (err) {\n              // Remove parcel core from stack and build string so Rust can process errors more easily.\n              let stack = (err.stack || '').split('\\n').slice(1);\n              let message = err.message;\n              for (let line of stack) {\n                if (line.includes(__filename)) {\n                  break;\n                }\n                message += '\\n' + line;\n              }\n              throw {\n                kind: 2,\n                message,\n              };\n            }\n          }\n        : null,\n    });\n\n    if (is_constant_module) {\n      asset.meta.isConstantModule = true;\n    }\n\n    let convertLoc = (loc): SourceLocation => {\n      let location = {\n        filePath: asset.filePath,\n        start: {\n          line: loc.start_line + Number(asset.meta.startLine ?? 1) - 1,\n          column: loc.start_col,\n        },\n        end: {\n          line: loc.end_line + Number(asset.meta.startLine ?? 1) - 1,\n          column: loc.end_col,\n        },\n      };\n\n      // If there is an original source map, use it to remap to the original source location.\n      if (originalMap) {\n        location = remapSourceLocation(location, originalMap);\n      }\n\n      return location;\n    };\n\n    if (diagnostics) {\n      let errors = diagnostics.filter(\n        d =>\n          d.severity === 'Error' ||\n          (d.severity === 'SourceError' && asset.isSource),\n      );\n      let warnings = diagnostics.filter(\n        d =>\n          d.severity === 'Warning' ||\n          (d.severity === 'SourceError' && !asset.isSource),\n      );\n      let convertDiagnostic = diagnostic => {\n        let message = diagnostic.message;\n        if (message === 'SCRIPT_ERROR') {\n          let err = SCRIPT_ERRORS[(asset.env.context: string)];\n          message = err?.message || SCRIPT_ERRORS.browser.message;\n        }\n\n        let res: Diagnostic = {\n          message,\n          codeFrames: [\n            {\n              filePath: asset.filePath,\n              codeHighlights: diagnostic.code_highlights?.map(highlight =>\n                convertSourceLocationToHighlight(\n                  convertLoc(highlight.loc),\n                  highlight.message ?? undefined,\n                ),\n              ),\n            },\n          ],\n          hints: diagnostic.hints,\n        };\n\n        if (diagnostic.documentation_url) {\n          res.documentationURL = diagnostic.documentation_url;\n        }\n\n        if (diagnostic.show_environment) {\n          if (asset.env.loc && asset.env.loc.filePath !== asset.filePath) {\n            res.codeFrames?.push({\n              filePath: asset.env.loc.filePath,\n              codeHighlights: [\n                convertSourceLocationToHighlight(\n                  asset.env.loc,\n                  'The environment was originally created here',\n                ),\n              ],\n            });\n          }\n\n          let err = SCRIPT_ERRORS[(asset.env.context: string)];\n          if (err) {\n            if (!res.hints) {\n              res.hints = [err.hint];\n            } else {\n              res.hints.push(err.hint);\n            }\n          }\n        }\n\n        return res;\n      };\n\n      if (errors.length > 0) {\n        throw new ThrowableDiagnostic({\n          diagnostic: errors.map(convertDiagnostic),\n        });\n      }\n\n      logger.warn(warnings.map(convertDiagnostic));\n    }\n\n    if (shebang) {\n      asset.meta.interpreter = shebang;\n    }\n\n    if (has_node_replacements) {\n      asset.meta.has_node_replacements = has_node_replacements;\n    }\n\n    if (asset.type === 'mdx') {\n      asset.meta.ssgMeta = {\n        exports: mdx_exports,\n        tableOfContents: mdx_toc,\n      };\n\n      for (let [i, mdxAsset] of mdx_assets.entries()) {\n        let map;\n        if (asset.env.sourceMap && mdxAsset.position) {\n          // Generate a source map that maps each line of the asset to the original code block.\n          map = new SourceMap(options.projectRoot);\n          let mappings = [];\n          let line = 1;\n          let column = mdxAsset.position.start.column;\n          for (\n            let i = mdxAsset.position.start.line + 1;\n            i < mdxAsset.position.end.line;\n            i++\n          ) {\n            mappings.push({\n              generated: {\n                line,\n                column: 0,\n              },\n              source: asset.filePath,\n              original: {\n                line: i,\n                column,\n              },\n            });\n            line++;\n            column = 0;\n          }\n\n          map.addIndexedMappings(mappings);\n          if (originalMap) {\n            map.extends(originalMap);\n          } else {\n            map.setSourceContent(asset.filePath, code.toString());\n          }\n        }\n\n        macroAssets.push({\n          type: mdxAsset.lang,\n          content: mdxAsset.code,\n          map,\n          uniqueKey: 'mdx-' + i,\n          bundleBehavior: null,\n        });\n      }\n    }\n\n    for (let env of used_env) {\n      asset.invalidateOnEnvChange(env);\n    }\n\n    asset.meta.id = asset.id;\n    asset.meta.directives = directives;\n    asset.meta.usedHelpers = helpers;\n    if (\n      asset.env.isServer() &&\n      !asset.env.isLibrary &&\n      (directives.includes('use client') ||\n        directives.includes('use client-entry'))\n    ) {\n      asset.setEnvironment({\n        context: 'react-client',\n        sourceType: 'module',\n        outputFormat: 'esmodule',\n        engines: asset.env.engines,\n        includeNodeModules: true,\n        isLibrary: false,\n        sourceMap: asset.env.sourceMap,\n        shouldOptimize: asset.env.shouldOptimize,\n        shouldScopeHoist: asset.env.shouldScopeHoist,\n      });\n    } else if (\n      !asset.env.isServer() &&\n      !asset.env.isLibrary &&\n      directives.includes('use server')\n    ) {\n      asset.setEnvironment({\n        context: 'react-server',\n        sourceType: 'module',\n        outputFormat: 'commonjs',\n        engines: asset.env.engines,\n        includeNodeModules: true,\n        isLibrary: false,\n        sourceMap: asset.env.sourceMap,\n        shouldOptimize: asset.env.shouldOptimize,\n        shouldScopeHoist: asset.env.shouldScopeHoist,\n      });\n    } else if (directives.includes('use server-entry')) {\n      if (!asset.env.isServer()) {\n        throw new Error(\n          'use server-entry must be imported in a server environment',\n        );\n      }\n      asset.bundleBehavior = 'isolated';\n    }\n\n    // Server actions must always be wrapped so they can be parcelRequired.\n    if (directives.includes('use server')) {\n      asset.meta.shouldWrap = true;\n    }\n\n    for (let dep of dependencies) {\n      if (dep.kind === 'WebWorker') {\n        // Use native ES module output if the worker was created with `type: 'module'` and all targets\n        // support native module workers. Only do this if parent asset output format is also esmodule so that\n        // assets can be shared between workers and the main thread in the global output format.\n        let outputFormat;\n        if (\n          asset.env.outputFormat === 'esmodule' &&\n          dep.source_type === 'Module' &&\n          supportsModuleWorkers\n        ) {\n          outputFormat = 'esmodule';\n        } else {\n          outputFormat =\n            asset.env.outputFormat === 'commonjs' ? 'commonjs' : 'global';\n        }\n\n        let loc = convertLoc(dep.loc);\n        asset.addURLDependency(dep.specifier, {\n          loc,\n          env: {\n            context: 'web-worker',\n            sourceType: dep.source_type === 'Module' ? 'module' : 'script',\n            outputFormat,\n            loc,\n          },\n          meta: {\n            webworker: true,\n            placeholder: dep.placeholder,\n          },\n        });\n      } else if (dep.kind === 'ServiceWorker') {\n        let loc = convertLoc(dep.loc);\n        asset.addURLDependency(dep.specifier, {\n          loc,\n          needsStableName: true,\n          env: {\n            context: 'service-worker',\n            sourceType: dep.source_type === 'Module' ? 'module' : 'script',\n            outputFormat: 'global', // TODO: module service worker support\n            loc,\n          },\n          meta: {\n            placeholder: dep.placeholder,\n          },\n        });\n      } else if (dep.kind === 'Worklet') {\n        let loc = convertLoc(dep.loc);\n        asset.addURLDependency(dep.specifier, {\n          loc,\n          env: {\n            context: 'worklet',\n            sourceType: 'module',\n            outputFormat: 'esmodule', // Worklets require ESM\n            loc,\n          },\n          meta: {\n            placeholder: dep.placeholder,\n          },\n        });\n      } else if (dep.kind === 'Url') {\n        asset.addURLDependency(dep.specifier, {\n          bundleBehavior: 'isolated',\n          loc: convertLoc(dep.loc),\n          needsStableName: Boolean(dep.flags & NEEDS_STABLE_NAME),\n          isOptional: Boolean(dep.flags & OPTIONAL),\n          meta: {\n            placeholder: dep.placeholder,\n          },\n        });\n      } else if (dep.kind === 'File') {\n        asset.invalidateOnFileChange(dep.specifier);\n      } else if (dep.kind === 'Id') {\n        // Record parcelRequire calls so that the dev packager can add them as dependencies.\n        // This allows the HMR runtime to collect parents across async boundaries (through runtimes).\n        // TODO: ideally this would result as an actual dep in the graph rather than asset.meta.\n        asset.meta.hmrDeps ??= [];\n        invariant(Array.isArray(asset.meta.hmrDeps));\n        asset.meta.hmrDeps.push(dep.specifier);\n      } else {\n        let meta: JSONObject = {kind: dep.kind};\n        if (dep.attributes) {\n          meta.importAttributes = dep.attributes;\n        }\n\n        if (dep.placeholder) {\n          meta.placeholder = dep.placeholder;\n        }\n\n        if (dep.flags & REACT_LAZY) {\n          meta.isReactLazy = true;\n        }\n\n        let env;\n        if (dep.kind === 'DynamicImport') {\n          // https://html.spec.whatwg.org/multipage/webappapis.html#hostimportmoduledynamically(referencingscriptormodule,-modulerequest,-promisecapability)\n          if (asset.env.isWorklet() || asset.env.context === 'service-worker') {\n            let loc = convertLoc(dep.loc);\n            let diagnostic = {\n              message: `import() is not allowed in ${\n                asset.env.isWorklet() ? 'worklets' : 'service workers'\n              }.`,\n              codeFrames: [\n                {\n                  filePath: asset.filePath,\n                  codeHighlights: [convertSourceLocationToHighlight(loc)],\n                },\n              ],\n              hints: ['Try using a static `import`.'],\n            };\n\n            if (asset.env.loc) {\n              diagnostic.codeFrames.push({\n                filePath: asset.env.loc.filePath,\n                codeHighlights: [\n                  convertSourceLocationToHighlight(\n                    asset.env.loc,\n                    'The environment was originally created here',\n                  ),\n                ],\n              });\n            }\n\n            throw new ThrowableDiagnostic({\n              diagnostic,\n            });\n          }\n\n          // If all of the target engines support dynamic import natively,\n          // we can output native ESM if scope hoisting is enabled.\n          // Only do this for scripts, rather than modules in the global\n          // output format so that assets can be shared between the bundles.\n          let outputFormat = asset.env.outputFormat;\n          if (\n            asset.env.sourceType === 'script' &&\n            asset.env.shouldScopeHoist &&\n            asset.env.supports('dynamic-import', true)\n          ) {\n            outputFormat = 'esmodule';\n          }\n\n          env = {\n            sourceType: 'module',\n            outputFormat,\n            loc: convertLoc(dep.loc),\n          };\n        }\n\n        // Always bundle helpers, even with includeNodeModules: false, except if this is a library.\n        let isHelper =\n          dep.flags & HELPER &&\n          !(\n            dep.specifier.endsWith('/jsx-runtime') ||\n            dep.specifier.endsWith('/jsx-dev-runtime')\n          );\n        if (isHelper && !asset.env.isLibrary) {\n          env = {\n            ...env,\n            includeNodeModules: true,\n          };\n        }\n\n        // Add required version range for helpers.\n        let range;\n        if (isHelper) {\n          let idx = dep.specifier.indexOf('/');\n          if (dep.specifier[0] === '@') {\n            idx = dep.specifier.indexOf('/', idx + 1);\n          }\n          let module = idx >= 0 ? dep.specifier.slice(0, idx) : dep.specifier;\n          range = pkg.dependencies[module];\n        }\n\n        if (dep.attributes?.env === 'react-server') {\n          env = {\n            ...env,\n            context: 'react-server',\n            outputFormat: 'commonjs',\n          };\n        } else if (dep.attributes?.env === 'react-client') {\n          env = {\n            ...env,\n            context: 'react-client',\n            outputFormat: 'esmodule',\n            includeNodeModules: true,\n          };\n\n          // This is a hack to prevent creating unnecessary shared bundles between actual client code\n          // and server code that runs in the client environment (e.g. react).\n          asset.isBundleSplittable = false;\n        }\n\n        asset.addDependency({\n          specifier: dep.specifier,\n          specifierType: dep.kind === 'Require' ? 'commonjs' : 'esm',\n          loc: convertLoc(dep.loc),\n          priority: dep.kind === 'DynamicImport' ? 'lazy' : 'sync',\n          isOptional: Boolean(dep.flags & OPTIONAL),\n          meta,\n          resolveFrom: isHelper ? __filename : undefined,\n          range,\n          env,\n        });\n      }\n    }\n\n    if (hoist_result) {\n      asset.symbols.ensure();\n      for (let {\n        exported,\n        local,\n        loc,\n        is_esm,\n      } of hoist_result.exported_symbols) {\n        asset.symbols.set(exported, local, convertLoc(loc), {isEsm: is_esm});\n      }\n\n      // deps is a map of dependencies that are keyed by placeholder or specifier\n      // If a placeholder is present, that is used first since placeholders are\n      // hashed with DependencyKind's.\n      // If not, the specifier is used along with its specifierType appended to\n      // it to separate dependencies with the same specifier.\n      let deps = new Map(\n        asset\n          .getDependencies()\n          .map(dep => [dep.meta.placeholder ?? dep.specifier, dep]),\n      );\n      for (let dep of deps.values()) {\n        dep.symbols.ensure();\n      }\n\n      for (let {\n        source,\n        local,\n        imported,\n        loc,\n      } of hoist_result.imported_symbols) {\n        let dep = deps.get(source);\n        if (!dep) continue;\n        dep.symbols.set(imported, local, convertLoc(loc));\n      }\n\n      for (let {source, local, imported, loc} of hoist_result.re_exports) {\n        let dep = deps.get(source);\n        if (!dep) continue;\n        if (local === '*' && imported === '*') {\n          dep.symbols.set('*', '*', convertLoc(loc), true);\n        } else {\n          let reExportName =\n            dep.symbols.get(imported)?.local ??\n            `$${asset.id}$re_export$${local}`;\n          asset.symbols.set(local, reExportName);\n          dep.symbols.set(imported, reExportName, convertLoc(loc), true);\n        }\n      }\n\n      for (let specifier of hoist_result.wrapped_requires) {\n        let dep = deps.get(specifier);\n        if (!dep) continue;\n        dep.meta.shouldWrap = true;\n      }\n\n      for (let name in hoist_result.dynamic_imports) {\n        let dep = deps.get(hoist_result.dynamic_imports[name]);\n        if (!dep) continue;\n        dep.meta.promiseSymbol = name;\n      }\n\n      if (hoist_result.self_references.length > 0) {\n        let symbols = new Map();\n        for (let name of hoist_result.self_references) {\n          // Do not create a self-reference for the `default` symbol unless we have seen an __esModule flag.\n          if (\n            name === 'default' &&\n            !asset.symbols.hasExportSymbol('__esModule')\n          ) {\n            continue;\n          }\n\n          let local = nullthrows(asset.symbols.get(name)).local;\n          symbols.set(name, {\n            local,\n            isWeak: false,\n            loc: null,\n          });\n        }\n\n        // Use the asset id as a unique key if one has not already been set.\n        // This lets us create a dependency on the asset itself by using it as a specifier.\n        // Using the unique key ensures that the dependency always resolves to the correct asset,\n        // even if it came from a transformer that produced multiple assets (e.g. css modules).\n        // Also avoids needing a resolution request.\n        asset.uniqueKey ||= asset.id;\n        asset.addDependency({\n          specifier: asset.uniqueKey,\n          specifierType: 'esm',\n          symbols,\n        });\n      }\n\n      // Add * symbol if there are CJS exports, no imports/exports at all\n      // (and the asset has side effects), or the asset is wrapped.\n      // This allows accessing symbols that don't exist without errors in symbol propagation.\n      if (\n        hoist_result.has_cjs_exports ||\n        (!hoist_result.is_esm &&\n          asset.sideEffects &&\n          deps.size === 0 &&\n          Object.keys(hoist_result.exported_symbols).length === 0) ||\n        (hoist_result.should_wrap && !asset.symbols.hasExportSymbol('*'))\n      ) {\n        asset.symbols.set('*', `$${asset.id}$exports`);\n      }\n\n      asset.meta.hasCJSExports = hoist_result.has_cjs_exports;\n      asset.meta.staticExports = hoist_result.static_cjs_exports;\n      asset.meta.shouldWrap ||= hoist_result.should_wrap;\n    } else {\n      if (symbol_result) {\n        let deps = new Map(\n          asset\n            .getDependencies()\n            .map(dep => [dep.meta.placeholder ?? dep.specifier, dep]),\n        );\n        asset.symbols.ensure();\n\n        for (let {exported, local, loc, source} of symbol_result.exports) {\n          let dep = source ? deps.get(source) : undefined;\n          asset.symbols.set(\n            exported,\n            `${dep?.id ?? ''}$${local}`,\n            convertLoc(loc),\n          );\n          if (dep != null) {\n            dep.symbols.ensure();\n            dep.symbols.set(\n              local,\n              `${dep?.id ?? ''}$${local}`,\n              convertLoc(loc),\n              true,\n            );\n          }\n        }\n\n        for (let {source, local, imported, loc} of symbol_result.imports) {\n          let dep = deps.get(source);\n          if (!dep) continue;\n          dep.symbols.ensure();\n          dep.symbols.set(imported, local, convertLoc(loc));\n        }\n\n        for (let {source, loc} of symbol_result.exports_all) {\n          let dep = deps.get(source);\n          if (!dep) continue;\n          dep.symbols.ensure();\n          dep.symbols.set('*', '*', convertLoc(loc), true);\n        }\n\n        // Add * symbol if there are CJS exports, no imports/exports at all, or the asset is wrapped.\n        // This allows accessing symbols that don't exist without errors in symbol propagation.\n        if (\n          symbol_result.has_cjs_exports ||\n          (!symbol_result.is_esm &&\n            deps.size === 0 &&\n            symbol_result.exports.length === 0) ||\n          (symbol_result.should_wrap && !asset.symbols.hasExportSymbol('*'))\n        ) {\n          asset.symbols.ensure();\n          asset.symbols.set('*', `$${asset.id}$exports`);\n        }\n      } else {\n        // If the asset is wrapped, add * as a fallback\n        asset.symbols.ensure();\n        asset.symbols.set('*', `$${asset.id}$exports`);\n      }\n\n      // For all other imports and requires, mark everything as imported (this covers both dynamic\n      // imports and non-top-level requires.)\n      for (let dep of asset.getDependencies()) {\n        if (dep.symbols.isCleared) {\n          dep.symbols.ensure();\n          dep.symbols.set('*', `${dep.id}$`);\n        }\n      }\n\n      if (needs_esm_helpers) {\n        asset.addDependency({\n          specifier: '@parcel/transformer-js/src/esmodule-helpers.js',\n          specifierType: 'esm',\n          resolveFrom: __filename,\n          env: {\n            includeNodeModules: {\n              '@parcel/transformer-js': true,\n            },\n          },\n        });\n      }\n    }\n\n    asset.type = 'js';\n    asset.setBuffer(compiledCode);\n\n    if (map) {\n      let sourceMap = new SourceMap(options.projectRoot);\n      sourceMap.addVLQMap(JSON.parse(map));\n      if (originalMap) {\n        sourceMap.extends(originalMap);\n      }\n      asset.setMap(sourceMap);\n    }\n\n    return [asset, ...macroAssets];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/js/src/esmodule-helpers.js",
    "content": "exports.interopDefault = function (a) {\n  return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n  Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n  Object.keys(source).forEach(function (key) {\n    if (\n      key === 'default' ||\n      key === '__esModule' ||\n      Object.prototype.hasOwnProperty.call(dest, key)\n    ) {\n      return;\n    }\n\n    Object.defineProperty(dest, key, {\n      enumerable: true,\n      get: function () {\n        return source[key];\n      },\n    });\n  });\n\n  return dest;\n};\n\nexports.export = function (dest, destName, get) {\n  Object.defineProperty(dest, destName, {\n    enumerable: true,\n    get: get,\n  });\n};\n"
  },
  {
    "path": "packages/transformers/js/src/mdx-components.jsx",
    "content": "/* @jsxRuntime automatic */\n/* eslint-disable react/prop-types */\n/* eslint-disable react/react-in-jsx-scope */\n\nfunction CodeBlock({lang, children, render}) {\n  return (\n    <>\n      <pre>\n        <code className={lang ? `language-${lang}` : undefined}>\n          {children}\n        </code>\n      </pre>\n      {render}\n    </>\n  );\n}\n\nconst components = {\n  CodeBlock\n};\n\nexport function useMDXComponents() {\n  return components;\n}\n"
  },
  {
    "path": "packages/transformers/json/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-json\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/JSONTransformer.js\",\n  \"source\": \"src/JSONTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"json5\": \"^2.2.3\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/json/src/JSONTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\nimport json5 from 'json5';\n\nexport default (new Transformer({\n  async transform({asset}) {\n    asset.type = 'js';\n    // Use JSON.parse(\"...\") for faster script parsing, see\n    // https://v8.dev/blog/cost-of-javascript-2019#json.\n    // Apply `JSON.stringify` twice to make it a valid string literal.\n    asset.setCode(\n      `module.exports = JSON.parse(${JSON.stringify(\n        JSON.stringify(json5.parse(await asset.getCode())),\n      )});`,\n    );\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/jsonld/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-jsonld\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/JSONLDTransformer.js\",\n  \"source\": \"src/JSONLDTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"scripts\": {\n    \"test\": \"yarn workspace @parcel/integration-tests test -g jsonld\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"json5\": \"^2.2.3\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/jsonld/src/JSONLDTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\nimport json5 from 'json5';\n\n// A list of all attributes in a schema that may produce a dependency\n// Based on https://schema.org/ImageObject\n// Section \"Instances of ImageObject may appear as values for the following properties\"\nconst SCHEMA_ATTRS = [\n  'logo',\n  'photo',\n  'image',\n  'thumbnail',\n  'screenshot',\n  'primaryImageOfPage',\n  'embedUrl',\n  'thumbnailUrl',\n  'video',\n  'contentUrl',\n  'url',\n];\n\nexport default (new Transformer({\n  async transform({asset}) {\n    let rawCode = await asset.getCode();\n    // allowing any recieved jsonld to be in json5 format\n    let jsonCode = json5.parse(rawCode);\n\n    jsonCode = extractUrlsFrom(jsonCode, asset);\n\n    // json should be injected back into the html page\n    asset.type = 'jsonld';\n    // setting it to jsonCode since the parser updates asset paths\n    asset.setCode(JSON.stringify(jsonCode));\n    return [asset];\n  },\n}): Transformer);\n\nfunction extractUrlsFrom(data, asset) {\n  if (!data) return null;\n\n  if (typeof data === 'string') {\n    let assetPath = asset.addURLDependency(data, {});\n    return assetPath;\n  }\n\n  if (Array.isArray(data)) return iterateThroughArray(data, asset);\n\n  return iterateThroughObject(data, asset);\n}\n\nfunction iterateThroughObject(jsonObject, asset) {\n  Object.keys(jsonObject)\n    .filter(k => SCHEMA_ATTRS.includes(k))\n    .forEach(k => {\n      let value = jsonObject[k];\n      jsonObject[k] = extractUrlsFrom(value, asset);\n    });\n\n  return jsonObject;\n}\n\nfunction iterateThroughArray(jsonArray, asset) {\n  Object.keys(jsonArray).forEach(i => {\n    let value = jsonArray[i];\n    jsonArray[i] = extractUrlsFrom(value, asset);\n  });\n\n  return jsonArray;\n}\n"
  },
  {
    "path": "packages/transformers/less/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-less\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/LessTransformer.js\",\n  \"source\": \"src/LessTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"less\": \"^4.3.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/less/src/LessTransformer.js",
    "content": "// @flow\nimport {typeof default as Less} from 'less';\nimport path from 'path';\nimport {Transformer} from '@parcel/plugin';\nimport SourceMap from '@parcel/source-map';\nimport less from 'less';\n\nimport {load} from './loadConfig';\n\n// E.g: ~library/file.less\nconst WEBPACK_ALIAS_RE = /^~[^/]/;\n\ntype LessConfig = {\n  sourceMap: any,\n  filename: string,\n  plugins: Array<any>,\n  ...\n};\n\nexport default (new Transformer({\n  loadConfig({config}) {\n    return load({config});\n  },\n\n  async transform({asset, options, config, resolve}) {\n    asset.type = 'css';\n    asset.meta.hasDependencies = false;\n\n    let code = await asset.getCode();\n    let result;\n    try {\n      let lessConfig: LessConfig = config ? {...config.config} : {};\n\n      if (asset.env.sourceMap) {\n        lessConfig.sourceMap = {};\n      }\n\n      lessConfig.filename = asset.filePath;\n      lessConfig.plugins = [\n        ...(lessConfig.plugins || []),\n        urlPlugin({asset}),\n        resolvePathPlugin({asset, resolve}),\n      ];\n\n      result = await less.render(code, lessConfig);\n    } catch (err) {\n      // For the error reporter\n      err.fileName = err.filename;\n      err.loc = {\n        line: err.line,\n        column: err.column,\n      };\n      throw err;\n    }\n\n    if (result.map != null) {\n      let map = new SourceMap(options.projectRoot);\n      let rawMap = JSON.parse(result.map);\n      map.addVLQMap({\n        ...rawMap,\n        sources: rawMap.sources.map(s => path.relative(options.projectRoot, s)),\n      });\n      asset.setMap(map);\n    }\n\n    asset.setCode(result.css);\n\n    return [asset];\n  },\n}): Transformer);\n\nfunction urlPlugin({asset}) {\n  return {\n    install(less: Less, pluginManager) {\n      // This is a hack; no such interface exists, even conceptually, in Less.\n      type LessNodeWithValue = less.tree.Node & {value: any, ...};\n\n      const visitor = new less.visitors.Visitor({\n        visitUrl(node) {\n          const valueNode = ((node.value: any): LessNodeWithValue);\n          const stringValue = (valueNode.value: string);\n          if (\n            !stringValue.startsWith('#') // IE's `behavior: url(#default#VML)`)\n          ) {\n            valueNode.value = asset.addURLDependency(stringValue, {});\n          }\n          return node;\n        },\n      });\n\n      // $FlowFixMe[method-unbinding]\n      visitor.run = visitor.visit;\n      pluginManager.addVisitor(visitor);\n    },\n  };\n}\n\nfunction resolvePathPlugin({asset, resolve}) {\n  return {\n    install(less, pluginManager) {\n      class LessFileManager extends less.FileManager {\n        supports() {\n          return true;\n        }\n\n        supportsSync() {\n          return false;\n        }\n\n        async loadFile(rawFilename, currentDirectory, options) {\n          let filename = rawFilename;\n\n          if (WEBPACK_ALIAS_RE.test(filename)) {\n            let correctPath = filename.replace(/^~/, '');\n            throw new Error(\n              `The @import path \"${filename}\" is using webpack specific syntax, which isn't supported by Parcel.\\n\\nTo @import files from node_modules, use \"${correctPath}\"`,\n            );\n          }\n\n          // Based on https://github.com/less/less.js/blob/master/packages/less/src/less-node/file-manager.js\n          let isAbsoluteFilename = this.isPathAbsolute(filename);\n          let paths = isAbsoluteFilename ? [''] : [currentDirectory];\n          if (options.paths) {\n            paths.push(...options.paths);\n          }\n\n          let prefixes = options.prefixes || [''];\n          let fileParts = this.extractUrlParts(filename);\n          let filePath;\n          let contents;\n\n          if (filename[0] !== '~') {\n            outer: for (let p of paths) {\n              for (let prefix of prefixes) {\n                filePath = fileParts.rawPath + prefix + fileParts.filename;\n                if (p) {\n                  filePath = path.join(p, filePath);\n                }\n\n                if (options.ext) {\n                  filePath = this.tryAppendExtension(filePath, options.ext);\n                }\n\n                try {\n                  contents = await asset.fs.readFile(filePath, 'utf8');\n                  break outer;\n                } catch (err) {\n                  asset.invalidateOnFileCreate({filePath});\n                }\n              }\n            }\n          }\n\n          if (!contents) {\n            filePath = await resolve(asset.filePath, filename, {\n              packageConditions: ['less', 'style'],\n            });\n            contents = await asset.fs.readFile(filePath, 'utf8');\n          }\n\n          if (filePath) {\n            asset.invalidateOnFileChange(filePath);\n          }\n\n          return {\n            contents,\n            filename: filePath,\n          };\n        }\n      }\n\n      pluginManager.addFileManager(new LessFileManager());\n    },\n  };\n}\n"
  },
  {
    "path": "packages/transformers/less/src/loadConfig.js",
    "content": "// @flow\nimport type {Config} from '@parcel/types';\nimport path from 'path';\n\ntype ConfigResult = {|\n  config: any,\n|};\n\nexport async function load({\n  config,\n}: {|\n  config: Config,\n|}): Promise<ConfigResult> {\n  let configFile = await config.getConfig(\n    ['.lessrc', '.lessrc.js', '.lessrc.cjs', '.lessrc.mjs'],\n    {\n      packageKey: 'less',\n    },\n  );\n\n  let configContents = {};\n  if (configFile != null) {\n    configContents = configFile.contents;\n\n    // Resolve relative paths from config file\n    if (configContents.paths) {\n      configContents.paths = configContents.paths.map(p =>\n        path.resolve(path.dirname(configFile.filePath), p),\n      );\n    }\n  }\n\n  // Rewrites urls to be relative to the provided filename\n  configContents.rewriteUrls = 'all';\n  configContents.plugins = configContents.plugins || [];\n\n  return {config: configContents};\n}\n"
  },
  {
    "path": "packages/transformers/node/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-node\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/NodeTransformer.js\",\n  \"source\": \"src/NodeTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/node/src/NodeTransformer.js",
    "content": "// @flow strict-local\n\nimport {Transformer} from '@parcel/plugin';\n\nexport default (new Transformer({\n  transform({asset}) {\n    asset.bundleBehavior = 'isolated';\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/postcss/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-postcss\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/PostCSSTransformer.js\",\n  \"source\": \"src/PostCSSTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"clone\": \"^2.1.2\",\n    \"nullthrows\": \"^1.1.1\",\n    \"postcss-value-parser\": \"^4.2.0\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"devDependencies\": {\n    \"postcss\": \"^8.5.3\",\n    \"postcss-modules\": \"^6.0.1\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/postcss/src/PostCSSTransformer.js",
    "content": "// @flow\n\nimport type {FilePath, Asset, MutableAsset, PluginOptions} from '@parcel/types';\n\nimport {hashString} from '@parcel/rust';\nimport {glob} from '@parcel/utils';\nimport {Transformer} from '@parcel/plugin';\nimport nullthrows from 'nullthrows';\nimport path from 'path';\nimport semver from 'semver';\nimport valueParser from 'postcss-value-parser';\nimport typeof * as Postcss from 'postcss';\n\nimport {load} from './loadConfig';\nimport {POSTCSS_RANGE} from './constants';\nimport {md, generateJSONCodeHighlights} from '@parcel/diagnostic';\n\nconst COMPOSES_RE = /composes:.+from\\s*(\"|').*(\"|')\\s*;?/;\nconst FROM_IMPORT_RE = /.+from\\s*(?:\"|')(.*)(?:\"|')\\s*;?/;\nconst LEGACY_MODULE_RE = /@value|:export|(:global|:local|:import)(?!\\s*\\()/i;\nconst MODULE_BY_NAME_RE = /\\.module\\./;\n\nexport default (new Transformer({\n  loadConfig({config, options, logger}) {\n    return load({config, options, logger});\n  },\n\n  canReuseAST({ast}) {\n    return (\n      ast.type === 'postcss' && semver.satisfies(ast.version, POSTCSS_RANGE)\n    );\n  },\n\n  async parse({asset, config, options}) {\n    let isLegacy = await isLegacyCssModule(asset);\n    if (!config && !isLegacy) {\n      return;\n    }\n\n    const postcss = await loadPostcss(options, asset.filePath);\n\n    return {\n      type: 'postcss',\n      version: '8.2.1',\n      program: postcss\n        .parse(await asset.getCode(), {\n          from: asset.filePath,\n        })\n        .toJSON(),\n    };\n  },\n\n  async transform({asset, config, options, resolve, logger}) {\n    asset.type = 'css';\n    let isLegacy = await isLegacyCssModule(asset);\n    if (isLegacy && !config) {\n      config = {\n        raw: {},\n        filePath: '',\n        hydrated: {\n          plugins: [],\n          from: asset.filePath,\n          to: asset.filePath,\n          modules: {},\n        },\n      };\n\n      // TODO: warning?\n    }\n\n    if (!config) {\n      return [asset];\n    }\n\n    const postcss: Postcss = await loadPostcss(options, asset.filePath);\n    let ast = nullthrows(await asset.getAST());\n    let program = postcss.fromJSON(ast.program);\n\n    let plugins = [...config.hydrated.plugins];\n    let cssModules: ?{|[string]: string|} = null;\n    if (config.hydrated.modules) {\n      asset.meta.cssModulesCompiled = 'postcss';\n\n      let code = asset.isASTDirty() ? null : await asset.getCode();\n      if (\n        Object.keys(config.hydrated.modules).length === 0 &&\n        code &&\n        !isLegacy &&\n        !LEGACY_MODULE_RE.test(code)\n      ) {\n        let filename = path.basename(config.filePath);\n        let message;\n        let configKey;\n        let hint;\n        if (config.raw.modules) {\n          message = md`The \"modules\" option in __${filename}__ can be replaced with configuration for @parcel/transformer-css to improve build performance.`;\n          configKey = '/modules';\n          hint = md`Remove the \"modules\" option from __${filename}__`;\n        } else {\n          message = md`The \"postcss-modules\" plugin in __${filename}__ can be replaced with configuration for @parcel/transformer-css to improve build performance.`;\n          configKey = '/plugins/postcss-modules';\n          hint = md`Remove the \"postcss-modules\" plugin from __${filename}__`;\n        }\n        if (filename === 'package.json') {\n          configKey = `/postcss${configKey}`;\n        }\n\n        let hints = [\n          'Enable the \"cssModules\" option for \"@parcel/transformer-css\" in your package.json',\n        ];\n        if (plugins.length === 0) {\n          message += md` Since there are no other plugins, __${filename}__ can be deleted safely.`;\n          hints.push(md`Delete __${filename}__`);\n        } else {\n          hints.push(hint);\n        }\n\n        let codeFrames;\n        if (path.extname(filename) !== '.js') {\n          let contents = await asset.fs.readFile(config.filePath, 'utf8');\n          codeFrames = [\n            {\n              language: 'json',\n              filePath: config.filePath,\n              code: contents,\n              codeHighlights: generateJSONCodeHighlights(contents, [\n                {\n                  key: configKey,\n                  type: 'key',\n                },\n              ]),\n            },\n          ];\n        } else {\n          codeFrames = [\n            {\n              filePath: config.filePath,\n              codeHighlights: [\n                {\n                  start: {line: 1, column: 1},\n                  end: {line: 1, column: 1},\n                },\n              ],\n            },\n          ];\n        }\n\n        logger.warn({\n          message,\n          hints,\n          documentationURL:\n            'https://parceljs.org/languages/css/#enabling-css-modules-globally',\n          codeFrames,\n        });\n      }\n\n      // TODO: should this be resolved from the project root?\n      let postcssModules = await options.packageManager.require(\n        'postcss-modules',\n        asset.filePath,\n        {\n          range: '^6.0.0',\n          saveDev: true,\n          shouldAutoInstall: options.shouldAutoInstall,\n        },\n      );\n\n      plugins.push(\n        postcssModules({\n          getJSON: (filename, json) => (cssModules = json),\n          Loader: await createLoader(asset, resolve, options),\n          generateScopedName: (name, filename) =>\n            `${name}_${hashString(\n              path.relative(options.projectRoot, filename),\n            ).substr(0, 6)}`,\n          ...config.hydrated.modules,\n        }),\n      );\n\n      if (code == null || COMPOSES_RE.test(code)) {\n        program.walkDecls(decl => {\n          let [, importPath] = FROM_IMPORT_RE.exec(decl.value) || [];\n          if (decl.prop === 'composes' && importPath != null) {\n            let parsed = valueParser(decl.value);\n\n            parsed.walk(node => {\n              if (node.type === 'string') {\n                asset.addDependency({\n                  specifier: importPath,\n                  specifierType: 'url',\n                  loc: {\n                    filePath: asset.filePath,\n                    start: decl.source.start,\n                    end: {\n                      line: decl.source.start.line,\n                      column: decl.source.start.column + importPath.length,\n                    },\n                  },\n                });\n              }\n            });\n          }\n        });\n      }\n    }\n\n    // $FlowFixMe Added in Flow 0.121.0 upgrade in #4381\n    let {messages, root} = await postcss(plugins).process(\n      program,\n      config.hydrated,\n    );\n    asset.setAST({\n      type: 'postcss',\n      version: '8.2.1',\n      program: root.toJSON(),\n    });\n    for (let msg of messages) {\n      if (msg.type === 'dependency') {\n        asset.invalidateOnFileChange(msg.file);\n      } else if (msg.type === 'dir-dependency') {\n        let pattern = `${msg.dir}/${msg.glob ?? '**/*'}`;\n        let files = await glob(pattern, asset.fs, {onlyFiles: true});\n        for (let file of files) {\n          asset.invalidateOnFileChange(path.normalize(file));\n        }\n        asset.invalidateOnFileCreate({glob: pattern});\n      }\n    }\n\n    let assets = [asset];\n    if (cssModules) {\n      // $FlowFixMe\n      let cssModulesList = (Object.entries(cssModules): Array<\n        [string, string],\n      >);\n      let deps = asset.getDependencies().filter(dep => dep.priority === 'sync');\n      let code: string;\n      if (deps.length > 0) {\n        code = `\n          module.exports = Object.assign({}, ${deps\n            .map(dep => `require(${JSON.stringify(dep.specifier)})`)\n            .join(', ')}, ${JSON.stringify(cssModules, null, 2)});\n        `;\n      } else {\n        code = cssModulesList\n          .map(\n            // This syntax enables shaking the invidual statements, so that unused classes don't even exist in JS.\n            ([className, classNameHashed]) =>\n              `module.exports[${JSON.stringify(className)}] = ${JSON.stringify(\n                classNameHashed,\n              )};`,\n          )\n          .join('\\n');\n      }\n\n      asset.symbols.ensure();\n      for (let [k, v] of cssModulesList) {\n        asset.symbols.set(k, v);\n      }\n      asset.symbols.set('default', 'default');\n\n      assets.push({\n        type: 'js',\n        content: code,\n      });\n    }\n    return assets;\n  },\n\n  async generate({asset, ast, options}) {\n    const postcss: Postcss = await loadPostcss(options, asset.filePath);\n\n    let code = '';\n    postcss.stringify(postcss.fromJSON(ast.program), c => {\n      code += c;\n    });\n\n    return {\n      content: code,\n    };\n  },\n}): Transformer);\n\nasync function createLoader(\n  asset: MutableAsset,\n  resolve: (from: FilePath, to: string) => Promise<FilePath>,\n  options: PluginOptions,\n) {\n  let {default: FileSystemLoader} = await options.packageManager.require(\n    'postcss-modules/build/FileSystemLoader',\n    asset.filePath,\n  );\n  return class ParcelFileSystemLoader extends FileSystemLoader {\n    async fetch(composesPath, relativeTo) {\n      let importPath = composesPath.replace(/^[\"']|[\"']$/g, '');\n      let resolved = await resolve(relativeTo, importPath);\n      let rootRelativePath = path.resolve(path.dirname(relativeTo), resolved);\n      let root = path.resolve('/');\n      // fixes an issue on windows which is part of the css-modules-loader-core\n      // see https://github.com/css-modules/css-modules-loader-core/issues/230\n      if (rootRelativePath.startsWith(root)) {\n        rootRelativePath = rootRelativePath.substr(root.length);\n      }\n\n      let source = await asset.fs.readFile(resolved, 'utf-8');\n      let {exportTokens} = await this.core.load(\n        source,\n        rootRelativePath,\n        undefined,\n        // $FlowFixMe[method-unbinding]\n        this.fetch.bind(this),\n      );\n      return exportTokens;\n    }\n\n    get finalSource() {\n      return '';\n    }\n  };\n}\n\nfunction loadPostcss(options: PluginOptions, from: FilePath): Promise<Postcss> {\n  return options.packageManager.require('postcss', from, {\n    range: POSTCSS_RANGE,\n    saveDev: true,\n    shouldAutoInstall: options.shouldAutoInstall,\n  });\n}\n\nasync function isLegacyCssModule(asset: Asset | MutableAsset) {\n  if (!MODULE_BY_NAME_RE.test(asset.filePath)) {\n    return false;\n  }\n\n  let code = await asset.getCode();\n  return LEGACY_MODULE_RE.test(code);\n}\n"
  },
  {
    "path": "packages/transformers/postcss/src/constants.js",
    "content": "// @flow\n\nexport const POSTCSS_RANGE = '^8.2.1';\n"
  },
  {
    "path": "packages/transformers/postcss/src/loadConfig.js",
    "content": "// @flow\nimport type {\n  Config,\n  FilePath,\n  PluginOptions,\n  PluginLogger,\n} from '@parcel/types';\nimport path from 'path';\nimport {md, generateJSONCodeHighlights} from '@parcel/diagnostic';\nimport nullthrows from 'nullthrows';\nimport clone from 'clone';\nimport {POSTCSS_RANGE} from './constants';\n\nimport loadExternalPlugins from './loadPlugins';\n\ntype ConfigResult = {|\n  raw: any,\n  filePath: string,\n  hydrated: {|\n    plugins: Array<any>,\n    from: FilePath,\n    to: FilePath,\n    modules: any,\n  |},\n|};\n\nasync function configHydrator(\n  configFile: any,\n  config: Config,\n  resolveFrom: FilePath,\n  options: PluginOptions,\n  logger: PluginLogger,\n): Promise<?ConfigResult> {\n  if (configFile == null) {\n    return;\n  }\n\n  // Load the custom config...\n  let modulesConfig;\n  let configFilePlugins = clone(configFile.plugins);\n  if (\n    configFilePlugins != null &&\n    typeof configFilePlugins === 'object' &&\n    configFilePlugins['postcss-modules'] != null\n  ) {\n    modulesConfig = configFilePlugins['postcss-modules'];\n    delete configFilePlugins['postcss-modules'];\n  }\n\n  if (!modulesConfig && configFile.modules) {\n    modulesConfig = {};\n  }\n\n  let plugins = await loadExternalPlugins(\n    configFilePlugins,\n    nullthrows(resolveFrom),\n    options,\n  );\n\n  // contents is either:\n  // from JSON:    { plugins: { 'postcss-foo': { ...opts } } }\n  // from JS (v8): { plugins: [ { postcssPlugin: 'postcss-foo', ...visitor callback functions } ]\n  // from JS (v7): { plugins: [ [Function: ...] ]\n  let pluginArray = Array.isArray(configFilePlugins)\n    ? configFilePlugins\n    : Object.keys(configFilePlugins);\n  for (let p of pluginArray) {\n    if (typeof p === 'string') {\n      config.addDevDependency({\n        specifier: p,\n        resolveFrom: nullthrows(resolveFrom),\n      });\n    }\n  }\n\n  let redundantPlugins = pluginArray.filter(\n    p => p === 'autoprefixer' || p === 'postcss-preset-env',\n  );\n  if (redundantPlugins.length > 0) {\n    let filename = path.basename(resolveFrom);\n    let isPackageJson = filename === 'package.json';\n    let message;\n    let hints = [];\n    if (!isPackageJson && redundantPlugins.length === pluginArray.length) {\n      message = md`Parcel includes CSS transpilation and vendor prefixing by default. PostCSS config __${filename}__ contains only redundant plugins. Deleting it may significantly improve build performance.`;\n      hints.push(md`Delete __${filename}__`);\n    } else {\n      message = md`Parcel includes CSS transpilation and vendor prefixing by default. PostCSS config __${filename}__ contains the following redundant plugins: ${[\n        ...redundantPlugins,\n      ].map(p =>\n        md.underline(p),\n      )}. Removing these may improve build performance.`;\n      hints.push(md`Remove the above plugins from __${filename}__`);\n    }\n\n    let codeFrames;\n    if (path.extname(filename) !== '.js') {\n      let contents = await options.inputFS.readFile(resolveFrom, 'utf8');\n      let prefix = isPackageJson ? '/postcss' : '';\n      codeFrames = [\n        {\n          language: 'json',\n          filePath: resolveFrom,\n          code: contents,\n          codeHighlights: generateJSONCodeHighlights(\n            contents,\n            redundantPlugins.map(plugin => ({\n              key: `${prefix}/plugins/${plugin}`,\n              type: 'key',\n            })),\n          ),\n        },\n      ];\n    } else {\n      codeFrames = [\n        {\n          filePath: resolveFrom,\n          codeHighlights: [\n            {\n              start: {line: 1, column: 1},\n              end: {line: 1, column: 1},\n            },\n          ],\n        },\n      ];\n    }\n\n    logger.warn({\n      message,\n      hints,\n      documentationURL: 'https://parceljs.org/languages/css/#default-plugins',\n      codeFrames,\n    });\n  }\n\n  return {\n    raw: configFile,\n    filePath: resolveFrom,\n    hydrated: {\n      plugins,\n      from: config.searchPath,\n      to: config.searchPath,\n      modules: modulesConfig,\n    },\n  };\n}\n\nexport async function load({\n  config,\n  options,\n  logger,\n}: {|\n  config: Config,\n  options: PluginOptions,\n  logger: PluginLogger,\n|}): Promise<?ConfigResult> {\n  if (!config.isSource) {\n    return;\n  }\n\n  let configFile: any = await config.getConfig(\n    [\n      '.postcssrc',\n      '.postcssrc.json',\n      '.postcssrc.js',\n      '.postcssrc.cjs',\n      '.postcssrc.mjs',\n      'postcss.config.js',\n      'postcss.config.cjs',\n      'postcss.config.mjs',\n    ],\n    {packageKey: 'postcss'},\n  );\n\n  let contents = null;\n  if (configFile) {\n    config.addDevDependency({\n      specifier: 'postcss',\n      resolveFrom: config.searchPath,\n      range: POSTCSS_RANGE,\n    });\n\n    contents = configFile.contents;\n    let isDynamic =\n      configFile && path.extname(configFile.filePath).endsWith('js');\n    if (isDynamic) {\n      // We have to invalidate on startup in case the config is non-deterministic,\n      // e.g. using unknown environment variables, reading from the filesystem, etc.\n      logger.warn({\n        message:\n          'WARNING: Using a JavaScript PostCSS config file means losing out on caching features of Parcel. Use a .postcssrc(.json) file whenever possible.',\n      });\n    }\n\n    if (typeof contents !== 'object') {\n      throw new Error('PostCSS config should be an object.');\n    }\n\n    if (\n      contents.plugins == null ||\n      typeof contents.plugins !== 'object' ||\n      Object.keys(contents.plugins).length === 0\n    ) {\n      throw new Error('PostCSS config must have plugins');\n    }\n  }\n\n  return configHydrator(\n    contents,\n    config,\n    configFile?.filePath,\n    options,\n    logger,\n  );\n}\n"
  },
  {
    "path": "packages/transformers/postcss/src/loadPlugins.js",
    "content": "// @flow\n\nimport type {FilePath, PluginOptions} from '@parcel/types';\nimport type {PackageManager} from '@parcel/package-manager';\n\nexport default async function loadExternalPlugins(\n  plugins: Array<string> | {|+[pluginName: string]: mixed|},\n  relative: FilePath,\n  options: PluginOptions,\n): Promise<Array<mixed>> {\n  if (Array.isArray(plugins)) {\n    return Promise.all(\n      plugins\n        .map(p =>\n          loadPlugin(\n            p,\n            relative,\n            null,\n            options.packageManager,\n            options.shouldAutoInstall,\n          ),\n        )\n        .filter(Boolean),\n    );\n  } else if (typeof plugins === 'object') {\n    let _plugins = plugins;\n    let mapPlugins = await Promise.all(\n      Object.keys(plugins).map(p =>\n        loadPlugin(\n          p,\n          relative,\n          _plugins[p],\n          options.packageManager,\n          options.shouldAutoInstall,\n        ),\n      ),\n    );\n    return mapPlugins.filter(Boolean);\n  } else {\n    return [];\n  }\n}\n\nasync function loadPlugin(\n  pluginArg: string | Function,\n  relative: FilePath,\n  options: mixed = {},\n  packageManager: PackageManager,\n  shouldAutoInstall: boolean,\n): mixed {\n  if (typeof pluginArg !== 'string') {\n    return pluginArg;\n  }\n\n  let plugin = await packageManager.require(pluginArg, relative, {\n    shouldAutoInstall,\n  });\n  plugin = plugin.default || plugin;\n\n  if (\n    options != null &&\n    typeof options === 'object' &&\n    Object.keys(options).length > 0\n  ) {\n    plugin = plugin(options);\n  }\n\n  return plugin.default || plugin;\n}\n"
  },
  {
    "path": "packages/transformers/posthtml/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-posthtml\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/PostHTMLTransformer.js\",\n  \"source\": \"src/PostHTMLTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/posthtml/src/PostHTMLTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\n\nimport path from 'path';\nimport loadPlugins from './loadPlugins';\n\nexport default (new Transformer({\n  async loadConfig({config, options, logger}) {\n    if (!config.isSource) {\n      return;\n    }\n\n    let configFile = await config.getConfig(\n      [\n        '.posthtmlrc',\n        '.posthtmlrc.js',\n        '.posthtmlrc.cjs',\n        '.posthtmlrc.mjs',\n        'posthtml.config.js',\n        'posthtml.config.cjs',\n        'posthtml.config.mjs',\n      ],\n      {\n        packageKey: 'posthtml',\n      },\n    );\n\n    if (configFile) {\n      let isJavascript = path.extname(configFile.filePath).endsWith('js');\n      if (isJavascript) {\n        // We have to invalidate on startup in case the config is non-deterministic,\n        // e.g. using unknown environment variables, reading from the filesystem, etc.\n        logger.warn({\n          message:\n            'WARNING: Using a JavaScript PostHTML config file means losing out on caching features of Parcel. Use a .posthtmlrc (JSON) file whenever possible.',\n        });\n      }\n\n      // Load plugins. This must be done before adding dev dependencies so we auto install.\n      let plugins = await loadPlugins(\n        configFile.contents.plugins,\n        config.searchPath,\n        options,\n      );\n\n      // Now add dev dependencies so we invalidate when they change.\n      let pluginArray = Array.isArray(configFile.contents.plugins)\n        ? configFile.contents.plugins\n        : Object.keys(configFile.contents.plugins);\n      for (let p of pluginArray) {\n        if (typeof p === 'string') {\n          config.addDevDependency({\n            specifier: p,\n            resolveFrom: configFile.filePath,\n          });\n        }\n      }\n\n      configFile.contents.plugins = plugins;\n\n      delete configFile.contents.render;\n\n      return configFile.contents;\n    }\n  },\n\n  async transform({asset, config, options}) {\n    if (!config) {\n      return [asset];\n    }\n\n    let posthtml = await options.packageManager.require(\n      'posthtml',\n      asset.filePath,\n      {\n        range: '^0.16.5',\n      },\n    );\n\n    let code = await asset.getCode();\n    let res = await posthtml(config.plugins).process(code, {\n      ...config,\n      plugins: config.plugins,\n      xmlMode: asset.type === 'xhtml',\n      closingSingleTag: asset.type === 'xhtml' ? 'slash' : undefined,\n    });\n\n    if (res.messages) {\n      for (let {type, file: filePath} of res.messages) {\n        if (type === 'dependency') {\n          asset.invalidateOnFileChange(filePath);\n        }\n      }\n    }\n\n    asset.setCode(res.html);\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/posthtml/src/loadPlugins.js",
    "content": "// @flow\n\nimport type {FilePath, PluginOptions} from '@parcel/types';\nimport type {PackageManager} from '@parcel/package-manager';\n\nexport default async function loadExternalPlugins(\n  plugins: Array<string> | {+[pluginName: string]: mixed, ...},\n  relative: FilePath,\n  options: PluginOptions,\n): Promise<Array<mixed>> {\n  if (Array.isArray(plugins)) {\n    return Promise.all(\n      plugins\n        .map(p =>\n          loadPlugin(\n            p,\n            relative,\n            null,\n            options.packageManager,\n            options.shouldAutoInstall,\n          ),\n        )\n        .filter(Boolean),\n    );\n  } else if (typeof plugins === 'object') {\n    let _plugins = plugins;\n    let mapPlugins = await Promise.all(\n      Object.keys(plugins).map(p =>\n        loadPlugin(\n          p,\n          relative,\n          _plugins[p],\n          options.packageManager,\n          options.shouldAutoInstall,\n        ),\n      ),\n    );\n    return mapPlugins.filter(Boolean);\n  } else {\n    return [];\n  }\n}\n\nasync function loadPlugin(\n  pluginArg: string | Function,\n  relative: FilePath,\n  options: mixed = {},\n  packageManager: PackageManager,\n  shouldAutoInstall: boolean,\n): mixed {\n  if (typeof pluginArg !== 'string') {\n    return pluginArg;\n  }\n\n  let plugin = await packageManager.require(pluginArg, relative, {\n    shouldAutoInstall,\n  });\n\n  plugin = plugin.default || plugin;\n\n  return plugin(options);\n}\n"
  },
  {
    "path": "packages/transformers/pug/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-pug\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/PugTransformer.js\",\n  \"source\": \"src/PugTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"pug\": \"^3.0.3\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/pug/src/PugTransformer.js",
    "content": "// @flow\n\nimport path from 'path';\nimport {Transformer} from '@parcel/plugin';\nimport pug from 'pug';\n\nexport default (new Transformer({\n  async loadConfig({config}) {\n    let configFile = await config.getConfig([\n      '.pugrc',\n      '.pugrc.js',\n      '.pugrc.cjs',\n      '.pugrc.mjs',\n      'pug.config.js',\n      'pug.config.cjs',\n      'pug.config.mjs',\n    ]);\n\n    return configFile?.contents;\n  },\n\n  async transform({asset, config}) {\n    const pugConfig = config ?? {};\n    const content = await asset.getCode();\n    const render = pug.compile(content, {\n      compileDebug: false,\n      basedir: path.dirname(asset.filePath),\n      filename: asset.filePath,\n      ...pugConfig,\n      pretty: pugConfig.pretty || false,\n    });\n\n    for (let filePath of render.dependencies) {\n      asset.invalidateOnFileChange(filePath);\n    }\n\n    asset.type = 'html';\n    asset.setCode(render(pugConfig.locals));\n\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/raw/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-raw\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/RawTransformer.js\",\n  \"source\": \"src/RawTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/raw/src/RawTransformer.js",
    "content": "// @flow strict-local\n\nimport {Transformer} from '@parcel/plugin';\n\nexport default (new Transformer({\n  transform({asset}) {\n    asset.bundleBehavior = 'isolated';\n    asset.meta.jsRuntime = 'url';\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/react-refresh-wrap/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-react-refresh-wrap\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/ReactRefreshWrapTransformer.js\",\n  \"source\": \"src/ReactRefreshWrapTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/error-overlay\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"react-refresh\": \"^0.16.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/react-refresh-wrap/src/ReactRefreshWrapTransformer.js",
    "content": "// @flow\n\nimport path from 'path';\nimport {Transformer} from '@parcel/plugin';\n\nfunction shouldExclude(asset, options) {\n  return (\n    !asset.isSource ||\n    !options.hmrOptions ||\n    !asset.env.isBrowser() ||\n    asset.env.isLibrary ||\n    asset.env.isWorker() ||\n    asset.env.isWorklet() ||\n    options.mode !== 'development' ||\n    !asset\n      .getDependencies()\n      .find(\n        v =>\n          v.specifier === 'react' ||\n          v.specifier === 'react/jsx-runtime' ||\n          v.specifier === 'react/jsx-dev-runtime' ||\n          v.specifier === '@emotion/react' ||\n          v.specifier === '@emotion/react/jsx-runtime' ||\n          v.specifier === '@emotion/react/jsx-dev-runtime',\n      )\n  );\n}\n\nexport default (new Transformer({\n  async transform({asset, options}) {\n    if (shouldExclude(asset, options)) {\n      return [asset];\n    }\n\n    let wrapperPath = `@parcel/transformer-react-refresh-wrap/${path.basename(\n      __dirname,\n    )}/helpers/helpers.js`;\n\n    let code = await asset.getCode();\n    let map = await asset.getMap();\n    let name = `$parcel$ReactRefreshHelpers$${asset.id.slice(-4)}`;\n\n    code = `var ${name} = require(${JSON.stringify(wrapperPath)});\n${name}.init();\nvar prevRefreshReg = globalThis.$RefreshReg$;\nvar prevRefreshSig = globalThis.$RefreshSig$;\n${name}.prelude(module);\n\ntry {\n${code}\n  ${name}.postlude(module);\n} finally {\n  globalThis.$RefreshReg$ = prevRefreshReg;\n  globalThis.$RefreshSig$ = prevRefreshSig;\n}`;\n\n    asset.setCode(code);\n    if (map) {\n      map.offsetLines(1, 7);\n      asset.setMap(map);\n    }\n\n    // The JSTransformer has already run, do it manually\n    asset.addDependency({\n      specifier: wrapperPath,\n      specifierType: 'esm',\n      resolveFrom: __filename,\n    });\n\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/react-refresh-wrap/src/helpers/.eslintrc.json",
    "content": "{\n  \"extends\": \"@parcel/eslint-config-browser\"\n}\n"
  },
  {
    "path": "packages/transformers/react-refresh-wrap/src/helpers/helpers.js",
    "content": "var Refresh = require('react-refresh/runtime');\n\nfunction debounce(func, delay) {\n  if (process.env.NODE_ENV === 'test') {\n    return function (args) {\n      func.call(null, args);\n    };\n  } else {\n    let timeout = undefined;\n    let lastTime = 0;\n    return function (args) {\n      // Call immediately if last call was more than the delay ago.\n      // Otherwise, set a timeout. This means the first call is fast\n      // (for the common case of a single update), and subsequent updates\n      // are batched.\n      let now = Date.now();\n      if (now - lastTime > delay) {\n        lastTime = now;\n        func.call(null, args);\n      } else {\n        clearTimeout(timeout);\n        timeout = setTimeout(function () {\n          timeout = undefined;\n          lastTime = Date.now();\n          func.call(null, args);\n        }, delay);\n      }\n    };\n  }\n}\nvar enqueueUpdate = debounce(function () {\n  Refresh.performReactRefresh();\n}, 30);\n\nmodule.exports.init = function () {\n  if (!globalThis.$RefreshReg$) {\n    Refresh.injectIntoGlobalHook(globalThis);\n    globalThis.$RefreshReg$ = function () {};\n    globalThis.$RefreshSig$ = function () {\n      return function (type) {\n        return type;\n      };\n    };\n\n    if (typeof window !== 'undefined') {\n      let ErrorOverlay = require('@parcel/error-overlay');\n      ErrorOverlay.setEditorHandler(function editorHandler(errorLocation) {\n        let file = `${errorLocation.fileName}:${\n          errorLocation.lineNumber || 1\n        }:${errorLocation.colNumber || 1}`;\n        fetch(\n          import.meta.devServer +\n            `/__parcel_launch_editor?file=${encodeURIComponent(file)}`,\n        );\n      });\n\n      ErrorOverlay.startReportingRuntimeErrors({\n        onError: function () {},\n      });\n\n      window.addEventListener('parcelhmraccept', () => {\n        ErrorOverlay.dismissRuntimeErrors();\n      });\n    }\n  }\n};\n\n// Everything below is either adapted or copied from\n// https://github.com/facebook/metro/blob/61de16bd1edd7e738dd0311c89555a644023ab2d/packages/metro/src/lib/polyfills/require.js\n// MIT License - Copyright (c) Facebook, Inc. and its affiliates.\n\nmodule.exports.prelude = function (module) {\n  globalThis.$RefreshReg$ = function (type, id) {\n    Refresh.register(type, module.id + ' ' + id);\n  };\n  globalThis.$RefreshSig$ = Refresh.createSignatureFunctionForTransform;\n};\n\nmodule.exports.postlude = function (module) {\n  if (typeof window === 'undefined') {\n    return;\n  }\n\n  if (isReactRefreshBoundary(module.exports)) {\n    registerExportsForReactRefresh(module);\n\n    if (module.hot) {\n      module.hot.dispose(function (data) {\n        if (Refresh.hasUnrecoverableErrors()) {\n          window.location.reload();\n        }\n\n        data.prevExports = module.exports;\n      });\n\n      module.hot.accept(function (getParents) {\n        var prevExports = module.hot.data.prevExports;\n        var nextExports = module.exports;\n        // Since we just executed the code for it, it's possible\n        // that the new exports make it ineligible for being a boundary.\n        var isNoLongerABoundary = !isReactRefreshBoundary(nextExports);\n        // It can also become ineligible if its exports are incompatible\n        // with the previous exports.\n        // For example, if you add/remove/change exports, we'll want\n        // to re-execute the importing modules, and force those components\n        // to re-render. Similarly, if you convert a class component\n        // to a function, we want to invalidate the boundary.\n        var didInvalidate = shouldInvalidateReactRefreshBoundary(\n          prevExports,\n          nextExports,\n        );\n        if (isNoLongerABoundary || didInvalidate) {\n          // We'll be conservative. The only case in which we won't do a full\n          // reload is if all parent modules are also refresh boundaries.\n          // In that case we'll add them to the current queue.\n          var parents = getParents();\n          if (parents.length === 0) {\n            // Looks like we bubbled to the root. Can't recover from that.\n            window.location.reload();\n            return;\n          }\n          return parents;\n        }\n        enqueueUpdate();\n      });\n    }\n  }\n};\n\nfunction isReactRefreshBoundary(exports) {\n  if (Refresh.isLikelyComponentType(exports)) {\n    return true;\n  }\n  if (exports == null || typeof exports !== 'object') {\n    // Exit if we can't iterate over exports.\n    return false;\n  }\n  var hasExports = false;\n  var areAllExportsComponents = true;\n  let isESM = '__esModule' in exports;\n  for (var key in exports) {\n    hasExports = true;\n    if (key === '__esModule') {\n      continue;\n    }\n    var desc = Object.getOwnPropertyDescriptor(exports, key);\n    if (desc && desc.get && !isESM) {\n      // Don't invoke getters for CJS as they may have side effects.\n      return false;\n    }\n    var exportValue = exports[key];\n    if (!Refresh.isLikelyComponentType(exportValue)) {\n      areAllExportsComponents = false;\n    }\n  }\n  return hasExports && areAllExportsComponents;\n}\n\nfunction shouldInvalidateReactRefreshBoundary(prevExports, nextExports) {\n  var prevSignature = getRefreshBoundarySignature(prevExports);\n  var nextSignature = getRefreshBoundarySignature(nextExports);\n  if (prevSignature.length !== nextSignature.length) {\n    return true;\n  }\n  for (var i = 0; i < nextSignature.length; i++) {\n    if (prevSignature[i] !== nextSignature[i]) {\n      return true;\n    }\n  }\n  return false;\n}\n\n// When this signature changes, it's unsafe to stop at this refresh boundary.\nfunction getRefreshBoundarySignature(exports) {\n  var signature = [];\n  signature.push(Refresh.getFamilyByType(exports));\n  if (exports == null || typeof exports !== 'object') {\n    // Exit if we can't iterate over exports.\n    // (This is important for legacy environments.)\n    return signature;\n  }\n  let isESM = '__esModule' in exports;\n  for (var key in exports) {\n    if (key === '__esModule') {\n      continue;\n    }\n    var desc = Object.getOwnPropertyDescriptor(exports, key);\n    if (desc && desc.get && !isESM) {\n      // Don't invoke getters for CJS as they may have side effects.\n      continue;\n    }\n    var exportValue = exports[key];\n    signature.push(key);\n    signature.push(Refresh.getFamilyByType(exportValue));\n  }\n  return signature;\n}\n\nfunction registerExportsForReactRefresh(module) {\n  var exports = module.exports,\n    id = module.id;\n  Refresh.register(exports, id + ' %exports%');\n  if (exports == null || typeof exports !== 'object') {\n    // Exit if we can't iterate over exports.\n    // (This is important for legacy environments.)\n    return;\n  }\n  let isESM = '__esModule' in exports;\n  for (var key in exports) {\n    var desc = Object.getOwnPropertyDescriptor(exports, key);\n    if (desc && desc.get && !isESM) {\n      // Don't invoke getters for CJS as they may have side effects.\n      continue;\n    }\n    var exportValue = exports[key];\n    var typeID = id + ' %exports% ' + key;\n    Refresh.register(exportValue, typeID);\n  }\n}\n"
  },
  {
    "path": "packages/transformers/react-static/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-react-static\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/ReactStaticTransformer.js\",\n  \"source\": \"src/ReactStaticTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/react-static/src/ReactStaticTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\n\nexport default (new Transformer({\n  transform({asset}) {\n    // ReactStaticPackager doesn't support scope hoisting.\n    if (asset.env.shouldScopeHoist) {\n      asset.setEnvironment({\n        shouldScopeHoist: false,\n        context: 'react-server',\n        sourceType: asset.env.sourceType,\n        outputFormat: asset.env.outputFormat,\n        engines: asset.env.engines,\n        includeNodeModules: asset.env.includeNodeModules,\n        isLibrary: asset.env.isLibrary,\n        sourceMap: asset.env.sourceMap,\n        shouldOptimize: asset.env.shouldOptimize,\n      });\n    }\n\n    asset.bundleBehavior = 'isolated';\n    asset.meta.bundleExtension = 'html';\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/sass/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-sass\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SassTransformer.js\",\n  \"source\": \"src/SassTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"sass\": \"^1.88.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/sass/src/SassTransformer.js",
    "content": "// @flow\nimport {Transformer} from '@parcel/plugin';\nimport path from 'path';\nimport sass from 'sass';\nimport {transformLegacy} from './legacy';\nimport {transformModern} from './modern';\n\nexport default (new Transformer({\n  async loadConfig({config, options}) {\n    let configFile = await config.getConfig(\n      ['.sassrc', '.sassrc.json', '.sassrc.js', '.sassrc.cjs', '.sassrc.mjs'],\n      {\n        packageKey: 'sass',\n      },\n    );\n\n    let configResult = configFile ? configFile.contents : {};\n\n    // Some packages in the wild declare a field `sass` in the package.json that\n    // is a relative path to the sass entrypoint. In those cases we simply\n    // initialize the config to an empty object.\n    if (typeof configResult === 'string') {\n      configResult = {};\n    }\n\n    let version = detectVersion(configResult);\n\n    if (version === 'legacy') {\n      // Resolve relative paths from config file\n      if (configFile && configResult.includePaths) {\n        configResult.includePaths = configResult.includePaths.map(p =>\n          path.resolve(path.dirname(configFile.filePath), p),\n        );\n      }\n\n      if (configResult.importer === undefined) {\n        configResult.importer = [];\n      } else if (!Array.isArray(configResult.importer)) {\n        configResult.importer = [configResult.importer];\n      }\n\n      // Always emit sourcemap\n      configResult.sourceMap = true;\n      // sources are created relative to the directory of outFile\n      configResult.outFile = path.join(options.projectRoot, 'style.css.map');\n      configResult.omitSourceMapUrl = true;\n      configResult.sourceMapContents = false;\n    } else if (version === 'modern') {\n      // Resolve relative paths from config file\n      if (configFile && configResult.loadPaths) {\n        configResult.loadPaths = configResult.loadPaths.map(p =>\n          path.resolve(path.dirname(configFile.filePath), p),\n        );\n      }\n\n      // Always emit sourcemap\n      configResult.sourceMap = true;\n    }\n\n    return {version, config: configResult};\n  },\n\n  async transform({asset, options, config: {version, config}, resolve}) {\n    if (version === 'legacy') {\n      await transformLegacy(asset, config, resolve, options);\n    } else {\n      await transformModern(asset, config, resolve, options);\n    }\n\n    return [asset];\n  },\n}): Transformer);\n\nfunction detectVersion(config: any) {\n  if (!sass.compileStringAsync) {\n    return 'legacy';\n  }\n\n  for (let legacyOption of [\n    'data',\n    'indentType',\n    'indentWidth',\n    'linefeed',\n    'outputStyle',\n    'importer',\n    'pkgImporter',\n    'includePaths',\n    'omitSourceMapUrl',\n    'outFile',\n    'sourceMapContents',\n    'sourceMapEmbed',\n    'sourceMapRoot',\n  ]) {\n    if (config[legacyOption] != null) {\n      return 'legacy';\n    }\n  }\n\n  for (let modernOption of [\n    'loadPaths',\n    'sourceMapIncludeSources',\n    'style',\n    'importers',\n  ]) {\n    if (config[modernOption] != null) {\n      return 'modern';\n    }\n  }\n\n  if (typeof config.sourceMap === 'string') {\n    return 'legacy';\n  }\n\n  if (\n    config.functions &&\n    typeof config.functions === 'object' &&\n    Object.keys(config.functions).length > 0\n  ) {\n    for (let key in config.functions) {\n      let fn = config.functions[key];\n      if (typeof fn === 'function' && fn.length > 1) {\n        return 'legacy';\n      }\n    }\n  }\n\n  return 'modern';\n}\n"
  },
  {
    "path": "packages/transformers/sass/src/legacy.js",
    "content": "// @flow\nimport type {MutableAsset, ResolveFn, PluginOptions} from '@parcel/types';\nimport path from 'path';\nimport {EOL} from 'os';\nimport SourceMap from '@parcel/source-map';\nimport sass from 'sass';\nimport {promisify} from 'util';\n\n// E.g: ~library/file.sass\nconst NODE_MODULE_ALIAS_RE = /^~[^/\\\\]/;\n\nexport async function transformLegacy(\n  asset: MutableAsset,\n  config: any,\n  resolve: ResolveFn,\n  options: PluginOptions,\n) {\n  let rawConfig = config ?? {};\n  let sassRender = promisify(sass.render.bind(sass));\n  let css;\n  try {\n    let code = await asset.getCode();\n    let result = await sassRender({\n      ...rawConfig,\n      file: asset.filePath,\n      data: rawConfig.data ? rawConfig.data + EOL + code : code,\n      importer: [\n        ...rawConfig.importer,\n        resolvePathImporter({\n          asset,\n          resolve,\n          includePaths: rawConfig.includePaths,\n          options,\n        }),\n      ],\n      indentedSyntax:\n        typeof rawConfig.indentedSyntax === 'boolean'\n          ? rawConfig.indentedSyntax\n          : asset.type === 'sass',\n    });\n\n    css = result.css;\n    for (let included of result.stats.includedFiles) {\n      if (included !== asset.filePath) {\n        asset.invalidateOnFileChange(included);\n      }\n    }\n\n    if (result.map != null) {\n      let map = new SourceMap(options.projectRoot);\n      map.addVLQMap(JSON.parse(result.map));\n      asset.setMap(map);\n    }\n  } catch (err) {\n    // Adapt the Error object for the reporter.\n    err.fileName = err.file;\n    err.loc = {\n      line: err.line,\n      column: err.column,\n    };\n\n    throw err;\n  }\n\n  asset.type = 'css';\n  asset.setCode(css);\n}\n\nfunction resolvePathImporter({asset, resolve, includePaths, options}) {\n  // This is a reimplementation of the Sass resolution algorithm that uses Parcel's\n  // FS and tracks all tried files so they are watched for creation.\n  async function resolvePath(\n    url,\n    prev,\n  ): Promise<{filePath: string, contents: string, ...} | void> {\n    /*\n      Imports are resolved by trying, in order:\n        * Loading a file relative to the file in which the `@import` appeared.\n        * Each custom importer.\n        * Loading a file relative to the current working directory (This rule doesn't really make sense for Parcel).\n        * Each load path in `includePaths`\n        * Each load path specified in the `SASS_PATH` environment variable, which should be semicolon-separated on Windows and colon-separated elsewhere.\n\n      See: https://sass-lang.com/documentation/js-api#importer\n      See also: https://github.com/sass/dart-sass/blob/006e6aa62f2417b5267ad5cdb5ba050226fab511/lib/src/importer/node/implementation.dart\n    */\n\n    let paths = [path.dirname(prev)];\n    if (includePaths) {\n      paths.push(...includePaths);\n    }\n\n    asset.invalidateOnEnvChange('SASS_PATH');\n    if (options.env.SASS_PATH) {\n      paths.push(\n        ...options.env.SASS_PATH.split(\n          process.platform === 'win32' ? ';' : ':',\n        ).map(p => path.resolve(options.projectRoot, p)),\n      );\n    }\n\n    const urls = [url];\n    const urlFileName = path.basename(url);\n    if (urlFileName[0] !== '_') {\n      urls.push(path.join(path.dirname(url), `_${urlFileName}`));\n    }\n\n    if (url[0] !== '~') {\n      for (let p of paths) {\n        for (let u of urls) {\n          const filePath = path.resolve(p, u);\n          try {\n            const contents = await asset.fs.readFile(filePath, 'utf8');\n            return {\n              filePath,\n              contents,\n            };\n          } catch (err) {\n            asset.invalidateOnFileCreate({filePath});\n          }\n        }\n      }\n    }\n\n    // If none of the default sass rules apply, try Parcel's resolver.\n    for (let u of urls) {\n      if (NODE_MODULE_ALIAS_RE.test(u)) {\n        u = u.slice(1);\n      }\n      try {\n        const filePath = await resolve(prev, u, {\n          packageConditions: ['sass', 'style'],\n        });\n        if (filePath) {\n          const contents = await asset.fs.readFile(filePath, 'utf8');\n          return {filePath, contents};\n        }\n      } catch (err) {\n        continue;\n      }\n    }\n  }\n\n  return function (rawUrl, prev, done) {\n    const url = rawUrl.replace(/^file:\\/\\//, '');\n    resolvePath(url, prev)\n      .then(resolved => {\n        if (resolved) {\n          done({\n            file: resolved.filePath,\n            contents: resolved.contents,\n          });\n        } else {\n          done();\n        }\n      })\n      .catch(done);\n  };\n}\n"
  },
  {
    "path": "packages/transformers/sass/src/modern.js",
    "content": "// @flow\nimport type {MutableAsset, ResolveFn, PluginOptions} from '@parcel/types';\nimport path from 'path';\nimport {extname} from 'path';\nimport SourceMap from '@parcel/source-map';\nimport sass from 'sass';\nimport {fileURLToPath, pathToFileURL} from 'url';\n\n// E.g: ~library/file.sass\nconst NODE_MODULE_ALIAS_RE = /^~[^/\\\\]/;\n\nexport async function transformModern(\n  asset: MutableAsset,\n  config: any,\n  resolve: ResolveFn,\n  options: PluginOptions,\n) {\n  let rawConfig = config ?? {};\n  let css;\n  try {\n    let code = await asset.getCode();\n    let indentedSyntax =\n      rawConfig.syntax === 'indented' ||\n      typeof rawConfig.indentedSyntax === 'boolean'\n        ? rawConfig.indentedSyntax\n        : undefined;\n    let result = await sass.compileStringAsync(code, {\n      ...rawConfig,\n      loadPaths: undefined,\n      url: pathToFileURL(asset.filePath),\n      importers: [\n        ...(rawConfig.importers || []),\n        resolvePathImporter({\n          asset,\n          resolve,\n          loadPaths: rawConfig.loadPaths,\n          indentedSyntax,\n          options,\n        }),\n      ],\n      syntax: (indentedSyntax != null ? indentedSyntax : asset.type === 'sass')\n        ? 'indented'\n        : 'scss',\n      sourceMap: !!asset.env.sourceMap,\n    });\n\n    css = result.css;\n    for (let included of result.loadedUrls) {\n      let file = fileURLToPath(included);\n      if (file !== asset.filePath) {\n        asset.invalidateOnFileChange(file);\n      }\n    }\n\n    if (result.sourceMap != null) {\n      let map = new SourceMap(options.projectRoot);\n      map.addVLQMap(result.sourceMap);\n      asset.setMap(map);\n    }\n  } catch (err) {\n    // Adapt the Error object for the reporter.\n    err.fileName = err.file;\n    err.loc = {\n      line: err.line,\n      column: err.column,\n    };\n\n    throw err;\n  }\n\n  asset.type = 'css';\n  asset.setCode(css);\n}\n\nfunction resolvePathImporter({\n  asset,\n  resolve,\n  loadPaths,\n  indentedSyntax,\n  options,\n}) {\n  return {\n    // This is a reimplementation of the Sass resolution algorithm that uses Parcel's\n    // FS and tracks all tried files so they are watched for creation.\n    async canonicalize(url, {containingUrl}) {\n      /*\n        Imports are resolved by trying, in order:\n          * Loading a file relative to the file in which the `@import` appeared.\n          * Each custom importer.\n          * Loading a file relative to the current working directory (This rule doesn't really make sense for Parcel).\n          * Each load path in `includePaths`\n          * Each load path specified in the `SASS_PATH` environment variable, which should be semicolon-separated on Windows and colon-separated elsewhere.\n\n        See: https://sass-lang.com/documentation/js-api#importer\n        See also: https://github.com/sass/dart-sass/blob/006e6aa62f2417b5267ad5cdb5ba050226fab511/lib/src/importer/node/implementation.dart\n      */\n\n      let containingPath = containingUrl\n        ? fileURLToPath(containingUrl)\n        : asset.filePath;\n      if (!containingUrl && url.startsWith('file:')) {\n        // If containingUrl is not provided, then url should be an absolute file:/// URL.\n        let filePath = fileURLToPath(url);\n        url = path.relative(path.dirname(containingPath), filePath);\n      }\n\n      let paths = [path.dirname(containingPath)];\n      if (loadPaths) {\n        paths.push(...loadPaths);\n      }\n\n      asset.invalidateOnEnvChange('SASS_PATH');\n      if (options.env.SASS_PATH) {\n        paths.push(\n          ...options.env.SASS_PATH.split(\n            process.platform === 'win32' ? ';' : ':',\n          ).map(p => path.resolve(options.projectRoot, p)),\n        );\n      }\n\n      // The importer should look for stylesheets by adding the prefix _ to the URL's basename,\n      // and by adding the extensions .sass and .scss if the URL doesn't already have one of those extensions.\n      const urls = [url];\n      const urlFileName = path.basename(url);\n      if (urlFileName[0] !== '_') {\n        urls.push(path.posix.join(path.dirname(url), `_${urlFileName}`));\n      }\n\n      let ext = path.extname(urlFileName);\n      if (ext !== '.sass' && ext !== '.scss') {\n        for (let url of [...urls]) {\n          urls.push(url + '.sass');\n          urls.push(url + '.scss');\n        }\n      }\n\n      // If none of the possible paths is valid, the importer should perform the same resolution on the URL followed by /index.\n      urls.push(path.posix.join(url, 'index.sass'));\n      urls.push(path.posix.join(url, 'index.scss'));\n      urls.push(path.posix.join(url, '_index.sass'));\n      urls.push(path.posix.join(url, '_index.scss'));\n\n      if (url[0] !== '~') {\n        for (let p of paths) {\n          for (let u of urls) {\n            let filePath = path.resolve(p, u);\n            let stat;\n            try {\n              stat = await asset.fs.stat(filePath);\n            } catch (err) {\n              // ignore.\n            }\n            if (stat?.isFile()) {\n              return pathToFileURL(filePath);\n            }\n\n            asset.invalidateOnFileCreate({filePath});\n          }\n        }\n      }\n\n      // If none of the default sass rules apply, try Parcel's resolver.\n      for (let u of urls) {\n        if (NODE_MODULE_ALIAS_RE.test(u)) {\n          u = u.slice(1);\n        }\n        try {\n          const filePath = await resolve(containingPath, u, {\n            packageConditions: ['sass', 'style'],\n          });\n          return pathToFileURL(filePath);\n        } catch (err) {\n          continue;\n        }\n      }\n    },\n    async load(url) {\n      let path = fileURLToPath(url);\n      const contents = await asset.fs.readFile(path, 'utf8');\n      return {\n        contents,\n        syntax: (\n          indentedSyntax != null ? indentedSyntax : extname(path) === '.sass'\n        )\n          ? 'indented'\n          : 'scss',\n      };\n    },\n  };\n}\n"
  },
  {
    "path": "packages/transformers/stylus/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-stylus\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/StylusTransformer.js\",\n  \"source\": \"src/StylusTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"stylus\": \"^0.63.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/stylus/src/StylusTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\nimport {createDependencyLocation, isGlob, glob, globSync} from '@parcel/utils';\nimport path from 'path';\nimport nativeFS from 'fs';\nimport stylus from 'stylus';\nimport Parser from 'stylus/lib/parser';\nimport DepsResolver from 'stylus/lib/visitor/deps-resolver';\nimport nodes from 'stylus/lib/nodes';\nimport utils from 'stylus/lib/utils';\nimport Evaluator from 'stylus/lib/visitor/evaluator';\n\nconst URL_RE = /^(?:url\\s*\\(\\s*)?['\"]?(?:[#/]|(?:https?:)?\\/\\/)/i;\n\nexport default (new Transformer({\n  async loadConfig({config}) {\n    let configFile = await config.getConfig(\n      ['.stylusrc', '.stylusrc.js', '.stylusrc.cjs', '.stylusrc.mjs'],\n      {\n        packageKey: 'stylus',\n      },\n    );\n\n    if (configFile) {\n      // Resolve relative paths from config file\n      if (configFile.contents.paths) {\n        configFile.contents.paths = configFile.contents.paths.map(p =>\n          path.resolve(path.dirname(configFile.filePath), p),\n        );\n      }\n\n      return configFile.contents;\n    }\n  },\n\n  async transform({asset, resolve, config, options}) {\n    let stylusConfig = config ?? {};\n    let code = await asset.getCode();\n    let style = stylus(code, {...stylusConfig});\n    style.set('filename', asset.filePath);\n    style.set('include css', true);\n    // Setup a handler for the URL function so we add dependencies for linked assets.\n    style.define('url', (node: stylus.nodes.String | stylus.nodes.Literal) => {\n      let filename = asset.addURLDependency(node.val, {\n        loc: createDependencyLocation(\n          {line: node.lineno, column: node.column},\n          node.val,\n        ),\n      });\n      return new stylus.nodes.Literal(`url(${JSON.stringify(filename)})`);\n    });\n\n    let {resolved: stylusPath} = await options.packageManager.resolve(\n      'stylus',\n      __filename,\n    );\n    let nativeGlob = await options.packageManager.require('glob', stylusPath);\n\n    style.set(\n      'Evaluator',\n      await createEvaluator(\n        code,\n        asset,\n        resolve,\n        style.options,\n        options,\n        nativeGlob,\n      ),\n    );\n\n    asset.type = 'css';\n    asset.setCode(style.render());\n    asset.meta.hasDependencies = false;\n    return [asset];\n  },\n}): Transformer);\n\nfunction attemptResolve(importedPath, filepath, asset, resolve, deps) {\n  if (deps.has(importedPath)) {\n    return;\n  }\n\n  if (isGlob(importedPath)) {\n    // Invalidate when new files are created that match the glob pattern.\n    let absoluteGlob = path.resolve(path.dirname(filepath), importedPath);\n    asset.invalidateOnFileCreate({glob: absoluteGlob});\n\n    deps.set(\n      importedPath,\n      glob(absoluteGlob, asset.fs, {\n        onlyFiles: true,\n      }).then(entries =>\n        Promise.all(\n          entries.map(entry =>\n            resolve(\n              filepath,\n              './' + path.relative(path.dirname(filepath), entry),\n              {\n                packageConditions: ['stylus', 'style'],\n              },\n            ),\n          ),\n        ),\n      ),\n    );\n  } else {\n    deps.set(\n      importedPath,\n      resolve(filepath, importedPath, {\n        packageConditions: ['stylus', 'style'],\n      }),\n    );\n  }\n}\n\nasync function getDependencies(\n  code,\n  filepath,\n  asset,\n  resolve,\n  options,\n  parcelOptions,\n  nativeGlob,\n  seen = new Set(),\n  includeImports = true,\n) {\n  seen.add(filepath);\n\n  nodes.filename = asset.filePath;\n\n  let parser = new Parser(code, options);\n  let ast = parser.parse();\n  let deps = new Map();\n\n  if (includeImports && options.imports) {\n    for (let importedPath of options.imports) {\n      attemptResolve(importedPath, filepath, asset, resolve, deps);\n    }\n  }\n\n  class ImportVisitor extends DepsResolver {\n    visitImport(imported) {\n      let importedPath = imported.path.first.string;\n      attemptResolve(importedPath, filepath, asset, resolve, deps);\n    }\n  }\n\n  new ImportVisitor(ast, options).visit(ast);\n\n  // Recursively process depdendencies, and return a map with all resolved paths.\n  let res = new Map();\n  await Promise.all(\n    Array.from(deps.entries()).map(async ([importedPath, resolved]) => {\n      try {\n        resolved = await resolved;\n      } catch (err) {\n        resolved = null;\n      }\n\n      let found;\n      if (resolved && (!Array.isArray(resolved) || resolved.length > 0)) {\n        found = Array.isArray(resolved) ? resolved : [resolved];\n        res.set(importedPath, resolved);\n      } else {\n        // If we couldn't resolve, try the normal stylus resolver.\n        // We just need to do this to keep track of the dependencies - stylus does the real work.\n\n        // support optional .styl\n        let originalPath = importedPath;\n        if (!/\\.styl$/i.test(importedPath)) {\n          importedPath += '.styl';\n        }\n\n        // Patch the native FS so we use Parcel's FS, and track files that are\n        // checked so we invalidate the cache when they are created.\n        let restore = patchNativeFS(asset.fs, nativeGlob);\n\n        let paths = [\n          ...new Set(\n            (options.paths || []).concat(path.dirname(filepath || '.')),\n          ),\n        ];\n        found = utils.find(importedPath, paths, filepath);\n        if (!found) {\n          found = utils.lookupIndex(originalPath, paths, filepath);\n        }\n\n        for (let invalidation of restore()) {\n          asset.invalidateOnFileCreate(invalidation);\n        }\n\n        if (!found) {\n          throw new Error('failed to locate file ' + originalPath);\n        }\n      }\n\n      // Recursively process resolved files as well to get nested deps\n      for (let resolved of found) {\n        if (!seen.has(resolved)) {\n          asset.invalidateOnFileChange(resolved);\n\n          let code = await asset.fs.readFile(resolved, 'utf8');\n          for (let [path, resolvedPath] of await getDependencies(\n            code,\n            resolved,\n            asset,\n            resolve,\n            options,\n            parcelOptions,\n            nativeGlob,\n            seen,\n            false,\n          )) {\n            res.set(path, resolvedPath);\n          }\n        }\n      }\n    }),\n  );\n\n  return res;\n}\n\nasync function createEvaluator(\n  code,\n  asset,\n  resolve,\n  options,\n  parcelOptions,\n  nativeGlob,\n) {\n  const deps = await getDependencies(\n    code,\n    asset.filePath,\n    asset,\n    resolve,\n    options,\n    parcelOptions,\n    nativeGlob,\n  );\n\n  // This is a custom stylus evaluator that extends stylus with support for the node\n  // require resolution algorithm. It also adds all dependencies to the parcel asset\n  // tree so the file watcher works correctly, etc.\n  class CustomEvaluator extends Evaluator {\n    visitImport(imported) {\n      let node = this.visit(imported.path).first;\n      let path = node.string;\n      if (node.name !== 'url' && path && !URL_RE.test(path)) {\n        let resolved = deps.get(path);\n\n        // First try resolving using the node require resolution algorithm.\n        // This allows stylus files in node_modules to be resolved properly.\n        // If we find something, update the AST so stylus gets the absolute path to load later.\n        if (resolved) {\n          if (!Array.isArray(resolved)) {\n            node.string = resolved;\n          } else {\n            // If the import resolves to multiple files (i.e. glob),\n            // replace it with a separate import node for each file\n            return mergeBlocks(\n              resolved.map(resolvedPath => {\n                node.string = resolvedPath;\n                let restore = patchNativeFS(asset.fs, nativeGlob);\n                let res = super.visitImport(imported.clone());\n                restore();\n                return res;\n              }),\n            );\n          }\n        }\n      }\n\n      // Patch the native FS so stylus uses Parcel's FS to read the file.\n      let restore = patchNativeFS(asset.fs, nativeGlob);\n\n      // Done. Let stylus do its thing.\n      let res = super.visitImport(imported);\n\n      restore();\n      return res;\n    }\n  }\n\n  return CustomEvaluator;\n}\n\nfunction patchNativeFS(fs, nativeGlob) {\n  let invalidations = [];\n  let readFileSync = nativeFS.readFileSync;\n  let statSync = nativeFS.statSync;\n\n  // $FlowFixMe\n  nativeFS.readFileSync = (filename, encoding) => {\n    return fs.readFileSync(filename, encoding);\n  };\n\n  // $FlowFixMe\n  nativeFS.statSync = p => {\n    try {\n      return fs.statSync(p);\n    } catch (err) {\n      // Track files that were checked but don't exist so that we watch for their creation.\n      if (!p.includes(`node_modules${path.sep}stylus`)) {\n        invalidations.push({filePath: p});\n      }\n      throw err;\n    }\n  };\n\n  // Patch the `glob` module as well so we use the Parcel FS and track invalidations.\n  let glob = nativeGlob.sync;\n  nativeGlob.sync = p => {\n    let res = globSync(p, fs);\n    if (!p.includes(`node_modules${path.sep}stylus`)) {\n      // Sometimes stylus passes file paths with no glob parts to the `glob` module.\n      // We want to avoid treating these as globs for performance.\n      if (isGlob(p)) {\n        invalidations.push({glob: p});\n      } else if (res.length === 0) {\n        invalidations.push({filePath: p});\n      }\n    }\n    return res;\n  };\n\n  return () => {\n    // $FlowFixMe\n    nativeFS.readFileSync = readFileSync;\n    // $FlowFixMe\n    nativeFS.statSync = statSync;\n    nativeGlob.sync = glob;\n    return invalidations;\n  };\n}\n\n/**\n * Puts the content of all given node blocks into the first one, essentially merging them.\n */\nfunction mergeBlocks(blocks) {\n  let finalBlock;\n  for (const block of blocks) {\n    if (finalBlock) {\n      // $FlowFixMe - finalBlock is definitely defined\n      block.nodes.forEach(node => finalBlock.push(node));\n    } else {\n      finalBlock = block;\n    }\n  }\n  return finalBlock;\n}\n"
  },
  {
    "path": "packages/transformers/sugarss/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-sugarss\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SugarssTransformer.js\",\n  \"source\": \"src/SugarssTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"postcss\": \"^8.5.3\",\n    \"sugarss\": \"^4.0.1\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/sugarss/src/SugarssTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\nimport postcss from 'postcss';\nimport sugarss from 'sugarss';\n\nexport default (new Transformer({\n  async transform({asset}) {\n    const code = await asset.getCode();\n    const {css} = await postcss().process(code, {\n      from: asset.filePath,\n      to: asset.filePath,\n      parser: sugarss,\n    });\n    asset.type = 'css';\n    asset.setCode(css);\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/svg/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-svg\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SVGTransformer.js\",\n  \"source\": \"src/SVGTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/svg/src/SVGTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\nimport ThrowableDiagnostic from '@parcel/diagnostic';\nimport {\n  transformSvg,\n  envToRust,\n  dependencyFromRust,\n  assetFromRust,\n} from '@parcel/rust';\n\nexport default (new Transformer({\n  async transform({asset}) {\n    asset.bundleBehavior = 'isolated';\n\n    let res = transformSvg({\n      code: await asset.getBuffer(),\n      filePath: asset.filePath,\n      xml: true,\n      env: envToRust(asset.env),\n      hmr: false,\n    });\n\n    if (res.errors.length) {\n      throw new ThrowableDiagnostic({\n        diagnostic: res.errors,\n      });\n    }\n\n    asset.setBuffer(res.code);\n\n    let assets = [asset];\n    for (let dep of res.dependencies) {\n      asset.addDependency(dependencyFromRust(dep));\n    }\n\n    for (let a of res.assets) {\n      assets.push(assetFromRust(a));\n    }\n\n    return assets;\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/svg-jsx/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-svg-jsx\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SvgJsxTransformer.js\",\n  \"source\": \"src/SvgJsxTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/svg-jsx/src/SvgJsxTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\n\nimport path from 'path';\nimport {convertSVGOConfig, relativePath} from '@parcel/utils';\nimport ThrowableDiagnostic, {\n  md,\n  generateJSONCodeHighlights,\n} from '@parcel/diagnostic';\nimport {svgReact, hashString} from '@parcel/rust';\n\nexport default (new Transformer({\n  async loadConfig({config, options}) {\n    let svgrResult: any = await config.getConfig([\n      '.svgrrc',\n      '.svgrrc.json',\n      '.svgrrc.js',\n      '.svgrrc.cjs',\n      '.svgrrc.mjs',\n      'svgr.config.json',\n      'svgr.config.js',\n      'svgr.config.cjs',\n      'svgr.config.mjs',\n    ]);\n    let svgoResult: any = await config.getConfig([\n      'svgo.config.js',\n      'svgo.config.cjs',\n      'svgo.config.mjs',\n      'svgo.config.json',\n    ]);\n\n    let contents = svgrResult?.contents?.svgoConfig ?? svgoResult?.contents;\n    let svgoConfig: any = {default: true};\n    if (contents) {\n      svgoConfig = await convertSVGOConfig(\n        contents,\n        svgrResult?.contents?.svgoConfig\n          ? svgrResult.filePath\n          : svgoResult.filePath,\n        svgrResult?.contents?.svgoConfig ? '/svgoConfig' : '',\n        options.inputFS,\n        'Use the legacy @parcel/transformer-svg-react instead of @parcel/transformer-svg-jsx if needed.',\n      );\n    }\n\n    let svgr = svgrResult?.contents;\n    if (svgoResult && svgr?.jsx) {\n      throw new ThrowableDiagnostic({\n        diagnostic: await createDiagnostic(\n          md`\nUnsupported SVGR option \"jsx\".\n          `,\n          svgrResult.filePath,\n          '/jsx',\n          options,\n        ),\n      });\n    }\n\n    if (svgr?.template) {\n      throw new ThrowableDiagnostic({\n        diagnostic: await createDiagnostic(\n          md`\nUnsupported SVGR option \"template\".\n          `,\n          svgrResult.filePath,\n          '/template',\n          options,\n        ),\n      });\n    }\n\n    // Prefix ids by default so they don't conflict between svgs.\n    if (svgoConfig && svgoConfig.prefixIds == null) {\n      let hash = hashString(\n        relativePath(options.projectRoot, config.searchPath),\n      );\n      svgoConfig.prefixIds = {\n        prefix: hash.slice(-6),\n        prefixClassNames: false,\n      };\n    }\n\n    return {svgr, svgo: svgoConfig};\n  },\n\n  async transform({asset, config}) {\n    let code = await asset.getBuffer();\n\n    let {code: jsx} = svgReact({\n      code,\n      config: {svgoConfig: config.svgo, ...config.svgr},\n    });\n\n    asset.type = 'jsx';\n    asset.bundleBehavior = null;\n    asset.meta.jsxRuntime = 'automatic';\n    asset.setBuffer(jsx);\n\n    return [asset];\n  },\n}): Transformer);\n\nasync function createDiagnostic(message, filePath, jsonPath, options) {\n  return {\n    message: message,\n    codeFrames: [\n      {\n        filePath: filePath,\n        codeHighlights:\n          path.basename(filePath) === '.svgrrc' ||\n          path.extname(filePath) === '.json'\n            ? generateJSONCodeHighlights(\n                await options.inputFS.readFile(filePath, 'utf8'),\n                [\n                  {\n                    key: jsonPath,\n                  },\n                ],\n              )\n            : [],\n      },\n    ],\n    hints: [\n      'Use the legacy @parcel/transformer-svg-react instead of @parcel/transformer-svg-jsx if needed.',\n    ],\n  };\n}\n"
  },
  {
    "path": "packages/transformers/svg-react/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-svg-react\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/SvgReactTransformer.js\",\n  \"source\": \"src/SvgReactTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@svgr/core\": \"^8.1.0\",\n    \"@svgr/plugin-jsx\": \"^8.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/svg-react/src/SvgReactTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\n\nimport jsxPlugin from '@svgr/plugin-jsx';\nimport {transform} from '@svgr/core';\nimport {detectSVGOVersion} from '@parcel/utils';\nimport path from 'path';\nimport {md, generateJSONCodeHighlights} from '@parcel/diagnostic';\n\nexport default (new Transformer({\n  async loadConfig({config, logger, options}) {\n    let svgrResult = await config.getConfig([\n      '.svgrrc',\n      '.svgrrc.json',\n      '.svgrrc.js',\n      '.svgrrc.cjs',\n      '.svgrrc.mjs',\n      'svgr.config.json',\n      'svgr.config.js',\n      'svgr.config.cjs',\n      'svgr.config.mjs',\n    ]);\n    let svgoResult: any = await config.getConfig([\n      'svgo.config.js',\n      'svgo.config.cjs',\n      'svgo.config.mjs',\n      'svgo.config.json',\n    ]);\n\n    let svgoConfig = svgrResult?.contents?.svgoConfig ?? svgoResult?.contents;\n    let svgoConfigPath = svgrResult?.contents?.svgoConfig\n      ? svgrResult.filePath\n      : svgoResult?.filePath;\n\n    // See if svgo is already installed.\n    let resolved;\n    try {\n      resolved = await options.packageManager.resolve(\n        'svgo',\n        path.join(options.projectRoot, 'index'),\n        {shouldAutoInstall: false},\n      );\n    } catch (err) {\n      // ignore.\n    }\n\n    // If so, use the existing installed version.\n    let svgoVersion = 3;\n    if (resolved) {\n      if (resolved.pkg?.version) {\n        svgoVersion = parseInt(resolved.pkg.version);\n      }\n    } else if (svgoConfig) {\n      // Otherwise try to detect the version based on the config file.\n      let v = detectSVGOVersion(svgoConfig);\n      if (svgoConfig != null && v.version === 2) {\n        logger.warn({\n          message: md`Detected deprecated SVGO v2 options in ${path.relative(\n            process.cwd(),\n            svgoConfigPath,\n          )}`,\n          codeFrames: [\n            {\n              filePath: svgoConfigPath,\n              codeHighlights:\n                path.basename(svgoConfigPath) === '.svgrrc' ||\n                path.extname(svgoConfigPath) === '.json'\n                  ? generateJSONCodeHighlights(\n                      await options.inputFS.readFile(svgoConfigPath, 'utf8'),\n                      [\n                        {\n                          key: `${\n                            svgrResult?.contents?.svgoConfig\n                              ? '/svgoConfig'\n                              : ''\n                          }${v.path}`,\n                        },\n                      ],\n                    )\n                  : [],\n            },\n          ],\n        });\n      }\n\n      svgoVersion = v.version;\n    }\n\n    return {svgr: svgrResult?.contents, svgo: svgoConfig, svgoVersion};\n  },\n\n  async transform({asset, config, options}) {\n    let code = await asset.getCode();\n\n    let plugins = [];\n    if (config.svgr?.svgo !== false) {\n      let svgo = await options.packageManager.require(\n        'svgo',\n        path.join(options.projectRoot, 'index'),\n        {\n          range: `^${config.svgoVersion}`,\n          saveDev: true,\n          shouldAutoInstall: options.shouldAutoInstall,\n        },\n      );\n\n      plugins.push(createSvgoPlugin(svgo));\n    }\n\n    plugins.push(jsxPlugin);\n\n    const jsx = await transform(\n      code,\n      {svgoConfig: config.svgo, ...config.svgr, runtimeConfig: false},\n      {\n        caller: {\n          name: '@parcel/transformer-svg-react',\n          defaultPlugins: plugins,\n        },\n        filePath: asset.filePath,\n      },\n    );\n\n    asset.type = config.svgr?.typescript ? 'tsx' : 'jsx';\n    asset.bundleBehavior = null;\n    asset.setCode(jsx);\n\n    return [asset];\n  },\n}): Transformer);\n\n// Below is copied from @svgr/plugin-svgo. MIT license.\n// https://github.com/gregberge/svgr/tree/180eb6d503215fc782dfece351ff751194a0dfed/packages/plugin-svgo\n\nfunction getSvgoConfigFromSvgrConfig(config) {\n  const params = {overrides: {}};\n  if (config.icon || config.dimensions === false) {\n    params.overrides.removeViewBox = false;\n  }\n  if (config.native) {\n    params.overrides.inlineStyles = {\n      onlyMatchedOnce: false,\n    };\n  }\n\n  return {\n    plugins: [\n      {\n        name: 'preset-default',\n        params,\n      },\n      'prefixIds',\n    ],\n  };\n}\n\nfunction getSvgoConfig(config) {\n  if (config.svgoConfig) return config.svgoConfig;\n  return getSvgoConfigFromSvgrConfig(config);\n}\n\nfunction createSvgoPlugin(svgo) {\n  return (code, config, state) => {\n    const svgoConfig = getSvgoConfig(config);\n    const result = svgo.optimize(code, {...svgoConfig, path: state.filePath});\n\n    // @ts-ignore\n    if (result.modernError) {\n      // @ts-ignore\n      throw result.modernError;\n    }\n\n    return result.data;\n  };\n}\n"
  },
  {
    "path": "packages/transformers/toml/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-toml\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/TOMLTransformer.js\",\n  \"source\": \"src/TOMLTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@iarna/toml\": \"^2.2.5\",\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/toml/src/TOMLTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\nimport toml from '@iarna/toml';\n\nexport default (new Transformer({\n  async transform({asset}) {\n    asset.type = 'js';\n    asset.setCode(\n      `module.exports = ${JSON.stringify(\n        toml.parse(await asset.getCode()),\n        null,\n        2,\n      )};`,\n    );\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/typescript-tsc/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-typescript-tsc\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/TSCTransformer.js\",\n  \"source\": \"src/TSCTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/ts-utils\": \"2.16.4\"\n  },\n  \"devDependencies\": {\n    \"typescript\": \">=3.0.0\"\n  },\n  \"peerDependencies\": {\n    \"typescript\": \">=3.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/typescript-tsc/src/TSCTransformer.js",
    "content": "// @flow strict-local\n\nimport type {TranspileOptions} from 'typescript';\n\nimport {Transformer} from '@parcel/plugin';\nimport {loadTSConfig} from '@parcel/ts-utils';\nimport typescript from 'typescript';\nimport SourceMap from '@parcel/source-map';\n\nexport default (new Transformer({\n  loadConfig({config, options}) {\n    return loadTSConfig(config, options);\n  },\n\n  async transform({asset, config, options}) {\n    let [code, originalMap] = await Promise.all([\n      asset.getCode(),\n      asset.getMap(),\n    ]);\n\n    let transpiled = typescript.transpileModule(\n      code,\n      ({\n        compilerOptions: {\n          // React is the default. Users can override this by supplying their own tsconfig,\n          // which many TypeScript users will already have for typechecking, etc.\n          jsx: typescript.JsxEmit.React,\n          ...config,\n          // Always emit output\n          noEmit: false,\n          // Don't compile ES `import`s -- scope hoisting prefers them and they will\n          // otherwise compiled to CJS via babel in the js transformer\n          module: typescript.ModuleKind.ESNext,\n          sourceMap: Boolean(asset.env.sourceMap),\n          mapRoot: options.projectRoot,\n        },\n        fileName: asset.filePath, // Should be relativePath?\n      }: TranspileOptions),\n    );\n\n    let {outputText, sourceMapText} = transpiled;\n\n    if (sourceMapText != null) {\n      outputText = outputText.substring(\n        0,\n        outputText.lastIndexOf('//# sourceMappingURL'),\n      );\n\n      let map = new SourceMap(options.projectRoot);\n      map.addVLQMap(JSON.parse(sourceMapText));\n      if (originalMap) {\n        map.extends(originalMap);\n      }\n      asset.setMap(map);\n    }\n\n    asset.type = 'js';\n    asset.setCode(outputText);\n\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/typescript-types/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-typescript-types\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/TSTypesTransformer.js\",\n  \"source\": \"src/TSTypesTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/ts-utils\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"typescript\": \">=3.0.0\"\n  },\n  \"peerDependencies\": {\n    \"typescript\": \">=3.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/typescript-types/src/TSModule.js",
    "content": "// @flow\n\nexport type Import = {|specifier: string, imported: string|};\nexport type Export =\n  | {|name: string, imported: string, specifier?: ?string|}\n  | {|specifier: string|};\n\nexport class TSModule {\n  imports: Map<string, Import>;\n  exports: Array<Export>;\n  bindings: Map<string, Set<any>>;\n  names: Map<string, string>;\n  used: Set<string>;\n\n  constructor() {\n    this.imports = new Map();\n    this.exports = [];\n    this.bindings = new Map();\n    this.names = new Map();\n    this.used = new Set();\n  }\n\n  addImport(local: string, specifier: string, imported: string) {\n    this.imports.set(local, {specifier, imported});\n    if (imported !== '*' && imported !== 'default') {\n      this.names.set(local, local);\n    }\n  }\n\n  // if not a reexport: imported = local, name = exported\n  addExport(name: string, imported: string, specifier: ?string) {\n    this.exports.push({name, specifier, imported});\n  }\n\n  addWildcardExport(specifier: string) {\n    this.exports.push({specifier});\n  }\n\n  addLocal(name: string, node: any) {\n    const bindings = this.bindings.get(name) ?? new Set();\n    bindings.add(node);\n    this.bindings.set(name, bindings);\n    if (name !== 'default') {\n      this.names.set(name, name);\n    }\n  }\n\n  getName(name: string): string {\n    return this.names.get(name) || name;\n  }\n\n  hasBinding(name: string): boolean {\n    return this.bindings.has(name);\n  }\n}\n"
  },
  {
    "path": "packages/transformers/typescript-types/src/TSModuleGraph.js",
    "content": "// @flow\nimport type {TSModule, Export} from './TSModule';\n\nimport nullthrows from 'nullthrows';\nimport invariant from 'assert';\nimport ts from 'typescript';\n\nexport class TSModuleGraph {\n  modules: Map<string, TSModule>;\n  mainModuleName: string;\n  mainModule: ?TSModule;\n  syntheticImportCount: number;\n\n  constructor(mainModuleName: string) {\n    this.modules = new Map();\n    this.mainModuleName = mainModuleName;\n    this.mainModule = null;\n    this.syntheticImportCount = 0;\n  }\n\n  addModule(name: string, module: TSModule) {\n    this.modules.set(name, module);\n    if (name === this.mainModuleName) {\n      this.mainModule = module;\n    }\n  }\n\n  getModule(name: string): ?TSModule {\n    return this.modules.get(name);\n  }\n\n  markUsed(module: TSModule, name: string, context: any): void {\n    // If name is imported, mark used in the original module\n    if (module.imports.has(name)) {\n      module.used.add(name);\n      let resolved = this.resolveImport(module, name);\n      // Missing or external\n      if (!resolved || resolved.module === module) {\n        return;\n      }\n\n      return this.markUsed(resolved.module, resolved.imported, context);\n    }\n\n    if (module.used.has(name)) {\n      return;\n    }\n\n    module.used.add(name);\n\n    // Visit all child nodes of the original binding and mark any referenced types as used.\n    let visit = (node: any) => {\n      if (ts.isQualifiedName(node) && ts.isIdentifier(node.left)) {\n        let resolved = this.resolveImport(\n          module,\n          node.left.text,\n          node.right.text,\n        );\n        if (resolved) {\n          this.markUsed(resolved.module, resolved.imported, context);\n        }\n      } else if (ts.isIdentifier(node)) {\n        this.markUsed(module, node.text, context);\n      }\n\n      return ts.visitEachChild(node, visit, context);\n    };\n\n    let bindings = module.bindings.get(name);\n    if (bindings) {\n      for (let node of bindings) {\n        ts.visitEachChild(node, visit, context);\n      }\n    }\n  }\n\n  getExport(\n    m: TSModule,\n    e: Export,\n  ): ?{|imported: string, module: TSModule, name: string|} {\n    invariant(e.name != null);\n    let exportName = e.name;\n\n    // Re-export\n    if (e.specifier && e.imported) {\n      let m = this.getModule(e.specifier);\n      if (!m) {\n        return null;\n      }\n\n      let exp = this.resolveExport(m, e.imported);\n      if (!exp) {\n        return null;\n      }\n\n      return {\n        module: exp.module,\n        imported: exp.imported || exp.name,\n        name: exportName,\n      };\n    }\n\n    // Import and then export\n    if (m.imports.has(exportName)) {\n      let imp = this.resolveImport(m, exportName);\n      if (!imp) {\n        return null;\n      }\n\n      return {module: imp.module, imported: imp.name, name: exportName};\n    }\n\n    // Named export\n    return {\n      module: m,\n      name: exportName,\n      imported: e.imported != null ? m.getName(e.imported) : exportName,\n    };\n  }\n\n  resolveImport(\n    module: TSModule,\n    local: string,\n    imported?: string,\n  ): ?{|imported: string, module: TSModule, name: string|} {\n    let i = module.imports.get(local);\n    if (!i) {\n      return null;\n    }\n\n    let m = this.getModule(i.specifier);\n    if (!m) {\n      // External module. pass through the import.\n      return {module, name: local, imported: imported || i.imported};\n    }\n\n    return this.resolveExport(m, imported || i.imported);\n  }\n\n  resolveExport(\n    module: TSModule,\n    name: string,\n  ): ?{|imported: string, module: TSModule, name: string|} {\n    for (let e of module.exports) {\n      if (e.name === name) {\n        return this.getExport(module, e);\n      } else if (e.specifier) {\n        const m = this.resolveExport(\n          nullthrows(this.getModule(e.specifier)),\n          name,\n        );\n        if (m) {\n          return m;\n        }\n      }\n    }\n  }\n\n  getAllExports(\n    module: TSModule = nullthrows(this.mainModule),\n    excludeDefault: boolean = false,\n  ): Array<{|imported: string, module: TSModule, name: string|}> {\n    let res = [];\n    for (let e of module.exports) {\n      if (e.name && (!excludeDefault || e.name !== 'default')) {\n        let exp = this.getExport(module, e);\n        if (exp) {\n          res.push(exp);\n        }\n      } else if (e.specifier) {\n        let m = this.getModule(e.specifier);\n        if (m) {\n          res.push(...this.getAllExports(m, true));\n        }\n      }\n    }\n    return res;\n  }\n\n  getAllImports(): Map<string, Map<string, string>> {\n    // Build a map of all imports for external modules\n    let importsBySpecifier: Map<string, Map<string, string>> = new Map();\n    for (let module of this.modules.values()) {\n      for (let [name, imp] of module.imports) {\n        if (module.used.has(name) && !this.modules.has(imp.specifier)) {\n          let importMap = importsBySpecifier.get(imp.specifier);\n          if (!importMap) {\n            importMap = new Map();\n            importsBySpecifier.set(imp.specifier, importMap);\n          }\n\n          name = module.getName(name);\n          importMap.set(name, imp.imported);\n        }\n      }\n    }\n\n    return importsBySpecifier;\n  }\n\n  propagate(context: any): Map<string, TSModule> {\n    // Resolve all exported values, and mark them as used.\n    let names = Object.create(null);\n    let exportedNames = new Map<string, TSModule>();\n    for (let e of this.getAllExports()) {\n      this.markUsed(e.module, e.imported, context);\n      e.module.names.set(e.imported, e.name);\n      names[e.name] = 1;\n      exportedNames.set(e.name, e.module);\n    }\n\n    let importedSymbolsToUpdate = [];\n\n    // Assign unique names across all modules\n    for (let m of this.modules.values()) {\n      for (let [orig, name] of m.names) {\n        if (exportedNames.has(name) && exportedNames.get(name) === m) {\n          continue;\n        }\n\n        if (!m.used.has(orig)) {\n          continue;\n        }\n\n        if (m.imports.has(orig)) {\n          // Update imports after all modules's local variables have been renamed\n          importedSymbolsToUpdate.push([m, orig]);\n          continue;\n        }\n\n        if (names[name]) {\n          m.names.set(name, `_${name}${names[name]++}`);\n        } else {\n          names[name] = 1;\n        }\n      }\n    }\n\n    // Map of imported specifiers -> map of imported names to local names\n    let imports = new Map();\n\n    for (let [m, orig] of importedSymbolsToUpdate) {\n      let imp = nullthrows(m.imports.get(orig));\n      let imported = nullthrows(this.resolveImport(m, orig));\n\n      // If the module is bundled, map the local name to the original exported name.\n      if (this.modules.has(imp.specifier)) {\n        m.names.set(orig, imported.imported);\n        continue;\n      }\n\n      // If it's external, then we need to dedup duplicate imported names, and ensure\n      // that they do not conflict with any exported or local names.\n      let importedNames = imports.get(imp.specifier);\n      if (!importedNames) {\n        importedNames = new Map();\n        imports.set(imp.specifier, importedNames);\n      }\n\n      let name = importedNames.get(imported.imported);\n      if (!name) {\n        if (names[imported.imported]) {\n          name = `_${imported.imported}${names[imported.imported]++}`;\n        } else {\n          name = imported.imported;\n          names[imported.imported] = 1;\n        }\n\n        importedNames.set(imported.imported, name);\n      }\n\n      m.names.set(orig, name);\n    }\n\n    return exportedNames;\n  }\n}\n"
  },
  {
    "path": "packages/transformers/typescript-types/src/TSTypesTransformer.js",
    "content": "// @flow strict-local\n\nimport {Transformer} from '@parcel/plugin';\nimport path from 'path';\nimport SourceMap from '@parcel/source-map';\nimport type {DiagnosticCodeFrame} from '@parcel/diagnostic';\nimport type {CompilerOptions} from 'typescript';\n\nimport ts from 'typescript';\nimport {CompilerHost, loadTSConfig} from '@parcel/ts-utils';\nimport {normalizeSeparators} from '@parcel/utils';\nimport ThrowableDiagnostic, {escapeMarkdown} from '@parcel/diagnostic';\nimport {TSModuleGraph} from './TSModuleGraph';\nimport nullthrows from 'nullthrows';\nimport {collect} from './collect';\nimport {shake} from './shake';\n\nexport default (new Transformer({\n  loadConfig({config, options}) {\n    return loadTSConfig(config, options);\n  },\n\n  transform({asset, config, options, logger}) {\n    let opts: CompilerOptions = {\n      // React is the default. Users can override this by supplying their own tsconfig,\n      // which many TypeScript users will already have for typechecking, etc.\n      jsx: ts.JsxEmit.React,\n      moduleResolution: ts.ModuleResolutionKind.NodeJs,\n      ...config,\n      // Always emit output\n      noEmit: false,\n      noEmitOnError: false,\n      declaration: true,\n      declarationMap: true,\n      isolatedModules: false,\n      emitDeclarationOnly: true,\n      outFile: 'index.d.ts',\n      // createProgram doesn't support incremental mode\n      composite: false,\n      incremental: false,\n    };\n\n    let host = new CompilerHost(options.inputFS, ts, logger);\n    // $FlowFixMe\n    let program = ts.createProgram([asset.filePath], opts, host);\n\n    for (let file of program.getSourceFiles()) {\n      if (path.normalize(file.fileName) !== asset.filePath) {\n        asset.invalidateOnFileChange(\n          host.redirectTypes.get(file.fileName) ?? file.fileName,\n        );\n      }\n    }\n\n    let mainModuleName = normalizeSeparators(\n      path\n        .relative(program.getCommonSourceDirectory(), asset.filePath)\n        .slice(0, -path.extname(asset.filePath).length),\n    );\n    let moduleGraph = new TSModuleGraph(mainModuleName);\n\n    let emitResult = program.emit(undefined, undefined, undefined, true, {\n      afterDeclarations: [\n        // 1. Build module graph\n        context => sourceFile => {\n          return collect(moduleGraph, context, sourceFile);\n        },\n        // 2. Tree shake and rename types\n        context => sourceFile => {\n          return shake(moduleGraph, context, sourceFile);\n        },\n      ],\n    });\n\n    let diagnostics = ts\n      .getPreEmitDiagnostics(program)\n      .concat(emitResult.diagnostics);\n\n    let diagnosticIds = new Set();\n    let deduplicatedDiagnostics = [];\n    for (let d of diagnostics) {\n      if (d.start != null && d.length != null && d.messageText != null) {\n        let id = `${d.start}:${d.length}:${ts.flattenDiagnosticMessageText(\n          d.messageText,\n          '\\n',\n        )}`;\n        if (!diagnosticIds.has(id)) {\n          deduplicatedDiagnostics.push(d);\n        }\n        diagnosticIds.add(id);\n      } else {\n        deduplicatedDiagnostics.push(d);\n      }\n    }\n\n    let parcelDiagnostics = deduplicatedDiagnostics.map(diagnostic => {\n      let filename = asset.filePath;\n      let {file} = diagnostic;\n\n      let diagnosticMessage = ts.flattenDiagnosticMessageText(\n        diagnostic.messageText,\n        '\\n',\n      );\n\n      let codeframe: ?DiagnosticCodeFrame;\n      if (file != null && diagnostic.start != null) {\n        let source = file.text || diagnostic.source;\n        if (file.fileName) {\n          filename = file.fileName;\n        }\n\n        // $FlowFixMe\n        if (source) {\n          let lineChar = file.getLineAndCharacterOfPosition(diagnostic.start);\n          let start = {\n            line: lineChar.line + 1,\n            column: lineChar.character + 1,\n          };\n          let end = {\n            line: start.line,\n            column: start.column + 1,\n          };\n\n          if (\n            typeof diagnostic.start === 'number' &&\n            typeof diagnostic.length === 'number'\n          ) {\n            let endCharPosition = file.getLineAndCharacterOfPosition(\n              diagnostic.start + diagnostic.length,\n            );\n\n            end = {\n              line: endCharPosition.line + 1,\n              column: endCharPosition.character,\n            };\n          }\n\n          codeframe = {\n            filePath: filename,\n            code: source,\n            codeHighlights: [\n              {\n                start,\n                end,\n                message: escapeMarkdown(diagnosticMessage),\n              },\n            ],\n          };\n        }\n      }\n\n      return {\n        message: escapeMarkdown(diagnosticMessage),\n        codeFrames: codeframe ? [codeframe] : undefined,\n      };\n    });\n\n    if (host.outputCode == null) {\n      throw new ThrowableDiagnostic({diagnostic: parcelDiagnostics});\n    } else {\n      for (let d of parcelDiagnostics) {\n        logger.warn(d);\n      }\n    }\n\n    let code = nullthrows(host.outputCode);\n    code = code.substring(0, code.lastIndexOf('//# sourceMappingURL'));\n\n    let map = JSON.parse(nullthrows(host.outputMap));\n    map.sources = map.sources.map(source =>\n      path.join(path.dirname(asset.filePath), source),\n    );\n\n    let sourceMap = null;\n    if (map.mappings) {\n      sourceMap = new SourceMap(options.projectRoot);\n      sourceMap.addVLQMap(map);\n    }\n\n    asset.type = 'ts';\n    asset.setCode(code);\n    asset.setMap(sourceMap);\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/typescript-types/src/collect.js",
    "content": "// @flow\nimport type {TSModuleGraph} from './TSModuleGraph';\n\nimport nullthrows from 'nullthrows';\nimport ts, {type EntityName} from 'typescript';\nimport {TSModule} from './TSModule';\nimport {getExportedName, isDeclaration} from './utils';\n\nexport function collect(\n  moduleGraph: TSModuleGraph,\n  context: any,\n  sourceFile: any,\n): any {\n  // Factory only exists on TS >= 4.0\n  const {factory = ts} = context;\n\n  // When module definitions are nested inside each other (e.g with module augmentation),\n  // we want to keep track of the hierarchy so we can associated nodes with the right module.\n  const moduleStack: Array<?TSModule> = [];\n  let _currentModule: ?TSModule;\n  let visit = (node: any): any => {\n    if (ts.isBundle(node)) {\n      return factory.updateBundle(node, ts.visitNodes(node.sourceFiles, visit));\n    }\n\n    if (ts.isModuleDeclaration(node)) {\n      moduleStack.push(_currentModule);\n      _currentModule = new TSModule();\n      moduleGraph.addModule(node.name.text, _currentModule);\n    }\n\n    if (!_currentModule) {\n      return ts.visitEachChild(node, visit, context);\n    }\n\n    let currentModule = nullthrows(_currentModule);\n    if (ts.isImportDeclaration(node) && node.importClause) {\n      if (node.importClause.namedBindings) {\n        if (node.importClause.namedBindings.elements) {\n          for (let element of node.importClause.namedBindings.elements) {\n            currentModule.addImport(\n              element.name.text,\n              node.moduleSpecifier.text,\n              (element.propertyName ?? element.name).text,\n            );\n          }\n        } else if (node.importClause.namedBindings.name) {\n          currentModule.addImport(\n            node.importClause.namedBindings.name.text,\n            node.moduleSpecifier.text,\n            '*',\n          );\n        }\n      }\n\n      if (node.importClause.name) {\n        currentModule.addImport(\n          node.importClause.name.text,\n          node.moduleSpecifier.text,\n          'default',\n        );\n      }\n    }\n\n    if (ts.isExportDeclaration(node)) {\n      if (node.exportClause) {\n        for (let element of node.exportClause.elements) {\n          if (node.moduleSpecifier) {\n            currentModule.addExport(\n              element.name.text,\n              (element.propertyName ?? element.name).text,\n              node.moduleSpecifier.text,\n            );\n          } else {\n            currentModule.addExport(\n              element.name.text,\n              (element.propertyName ?? element.name).text,\n            );\n          }\n        }\n      } else {\n        currentModule.addWildcardExport(node.moduleSpecifier.text);\n      }\n    }\n\n    node = ts.visitEachChild(node, visit, context);\n\n    if (\n      ts.isImportTypeNode(node) &&\n      ts.isLiteralTypeNode(node.argument) &&\n      ts.isStringLiteral(node.argument.literal)\n    ) {\n      let local = `$$parcel$import$${moduleGraph.syntheticImportCount++}`;\n      let [specifier, entity] = getImportName(node.qualifier, local, factory);\n      currentModule.addImport(local, node.argument.literal.text, specifier);\n      return factory.createTypeReferenceNode(entity, node.typeArguments);\n    }\n\n    // Handle `export default name;`\n    if (ts.isExportAssignment(node) && ts.isIdentifier(node.expression)) {\n      currentModule.addExport('default', node.expression.text);\n    }\n\n    if (isDeclaration(node)) {\n      if (node.name) {\n        currentModule.addLocal(node.name.text, node);\n      }\n\n      let name = getExportedName(node);\n      if (name) {\n        currentModule.addLocal(name, node);\n        currentModule.addExport(name, name);\n      }\n    }\n\n    if (ts.isVariableStatement(node) && node.modifiers) {\n      let isExported = node.modifiers.some(\n        m => m.kind === ts.SyntaxKind.ExportKeyword,\n      );\n      for (let v of node.declarationList.declarations) {\n        currentModule.addLocal(v.name.text, v);\n        if (isExported) {\n          currentModule.addExport(v.name.text, v.name.text);\n        }\n      }\n    }\n\n    // After we finish traversing the children of a module definition,\n    // we need to make sure that subsequent nodes get associated with the next-highest level module.\n    if (ts.isModuleDeclaration(node)) {\n      _currentModule = moduleStack.pop();\n    }\n    return node;\n  };\n\n  return ts.visitNode(sourceFile, visit);\n}\n\n// Traverse down an EntityName to the root identifier. Return that to use as the named import specifier,\n// and collect the remaining parts into a new QualifiedName with the local replacement at the root.\n// import('react').JSX.Element => import {JSX} from 'react'; JSX.Element\nfunction getImportName(\n  qualifier: ?EntityName,\n  local: string,\n  factory: typeof ts,\n) {\n  if (!qualifier) {\n    return ['*', factory.createIdentifier(local)];\n  }\n\n  if (qualifier.kind === ts.SyntaxKind.Identifier) {\n    return [qualifier.text, factory.createIdentifier(local)];\n  }\n\n  let [name, entity] = getImportName(qualifier.left, local, factory);\n  return [name, factory.createQualifiedName(entity, qualifier.right)];\n}\n"
  },
  {
    "path": "packages/transformers/typescript-types/src/shake.js",
    "content": "// @flow\nimport {TSModule} from './TSModule';\nimport type {TSModuleGraph} from './TSModuleGraph';\n\nimport ts from 'typescript';\nimport nullthrows from 'nullthrows';\nimport {getExportedName, isDeclaration} from './utils';\nimport {\n  createImportClause,\n  createImportDeclaration,\n  createImportSpecifier,\n  updateExportDeclaration,\n} from './wrappers';\n\nexport function shake(\n  moduleGraph: TSModuleGraph,\n  context: any,\n  sourceFile: any,\n): any {\n  // Factory only exists on TS >= 4.0\n  const {factory = ts} = context;\n\n  // We traverse things out of order which messes with typescript's internal state.\n  // We don't rely on the lexical environment, so just overwrite with noops to avoid errors.\n  context.suspendLexicalEnvironment = () => {};\n  context.resumeLexicalEnvironment = () => {};\n\n  // Propagate exports from the main module to determine what types should be included\n  let exportedNames = moduleGraph.propagate(context);\n\n  // When module definitions are nested inside each other (e.g with module augmentation),\n  // we want to keep track of the hierarchy so we can associated nodes with the right module.\n  const moduleStack: Array<?TSModule> = [];\n\n  let addedGeneratedImports = false;\n\n  let _currentModule: ?TSModule;\n  let visit = (node: any): any => {\n    if (ts.isBundle(node)) {\n      return factory.updateBundle(node, ts.visitNodes(node.sourceFiles, visit));\n    }\n\n    // Flatten all module declarations into the top-level scope\n    if (ts.isModuleDeclaration(node)) {\n      // Deeply nested module declarations are assumed to be module augmentations and left alone.\n      if (moduleStack.length >= 1) {\n        // Since we are hoisting them to the top-level scope, we need to add a \"declare\" keyword to make them ambient.\n        // we also want the declare keyword to come after the export keyword to guarantee a valid typings file.\n        node.modifiers ??= [];\n        const index =\n          node.modifiers[0]?.kind === ts.SyntaxKind.ExportKeyword ? 1 : 0;\n        node.modifiers.splice(\n          index,\n          0,\n          factory.createModifier(ts.SyntaxKind.DeclareKeyword),\n        );\n        return node;\n      }\n\n      moduleStack.push(_currentModule);\n      let isFirstModule = !_currentModule;\n      _currentModule = moduleGraph.getModule(node.name.text);\n      let statements = ts.visitEachChild(node, visit, context).body.statements;\n      _currentModule = moduleStack.pop();\n\n      if (isFirstModule && !addedGeneratedImports) {\n        statements.unshift(...generateImports(factory, moduleGraph));\n        addedGeneratedImports = true;\n      }\n\n      return statements;\n    }\n\n    if (!_currentModule) {\n      return ts.visitEachChild(node, visit, context);\n    }\n\n    // Remove inline imports. They are hoisted to the top of the output.\n    if (ts.isImportDeclaration(node)) {\n      return null;\n    }\n\n    let currentModule = nullthrows(_currentModule);\n    // Remove exports from flattened modules\n    if (ts.isExportDeclaration(node)) {\n      if (\n        !node.moduleSpecifier ||\n        moduleGraph.getModule(node.moduleSpecifier.text)\n      ) {\n        if (!node.moduleSpecifier && node.exportClause) {\n          // Filter exported elements to only external re-exports\n          let exported = [];\n          for (let element of node.exportClause.elements) {\n            let name = (element.propertyName ?? element.name).text;\n            if (\n              exportedNames.get(name) === currentModule &&\n              !currentModule.hasBinding(name)\n            ) {\n              exported.push(element);\n            }\n          }\n\n          if (exported.length > 0) {\n            return updateExportDeclaration(\n              factory,\n              node,\n              undefined, // modifiers\n              false, // isTypeOnly\n              factory.updateNamedExports(node.exportClause, exported),\n              undefined, // moduleSpecifier\n              undefined, // assertClause\n            );\n          }\n        }\n\n        return null;\n      }\n    }\n\n    // Remove export assignment if unused.\n    if (ts.isExportAssignment(node)) {\n      let name = currentModule.getName('default');\n      if (exportedNames.get(name) !== currentModule) {\n        return null;\n      }\n    }\n\n    if (isDeclaration(node)) {\n      let name = getExportedName(node) || node.name.text;\n\n      // Remove unused declarations\n      if (!currentModule.used.has(name)) {\n        return null;\n      }\n\n      // Remove original export modifiers\n      node.modifiers = (node.modifiers || []).filter(\n        m =>\n          m.kind !== ts.SyntaxKind.ExportKeyword &&\n          m.kind !== ts.SyntaxKind.DefaultKeyword,\n      );\n\n      // Rename declarations\n      let newName = currentModule.getName(name);\n      if (newName !== name && newName !== 'default') {\n        node.name = factory.createIdentifier(newName);\n      }\n\n      // Export declarations that should be exported\n      if (exportedNames.get(newName) === currentModule) {\n        if (newName === 'default') {\n          node.modifiers.unshift(\n            factory.createModifier(ts.SyntaxKind.DefaultKeyword),\n          );\n        }\n\n        node.modifiers.unshift(\n          factory.createModifier(ts.SyntaxKind.ExportKeyword),\n        );\n      } else if (\n        ts.isFunctionDeclaration(node) ||\n        ts.isClassDeclaration(node)\n      ) {\n        node.modifiers.unshift(\n          factory.createModifier(ts.SyntaxKind.DeclareKeyword),\n        );\n      }\n    }\n\n    if (ts.isVariableStatement(node)) {\n      node = ts.visitEachChild(node, visit, context);\n\n      // Remove empty variable statements\n      if (node.declarationList.declarations.length === 0) {\n        return null;\n      }\n\n      // Remove original export modifiers\n      node.modifiers = (node.modifiers || []).filter(\n        m =>\n          m.kind !== ts.SyntaxKind.ExportKeyword &&\n          m.kind !== ts.SyntaxKind.DeclareKeyword,\n      );\n\n      // Add export modifier if all declarations are exported.\n      let isExported = node.declarationList.declarations.every(\n        d => exportedNames.get(d.name.text) === currentModule,\n      );\n      if (isExported) {\n        node.modifiers.unshift(\n          factory.createModifier(ts.SyntaxKind.ExportKeyword),\n        );\n      } else {\n        // Otherwise, add `declare` modifier (required for top-level declarations in d.ts files).\n        node.modifiers.unshift(\n          factory.createModifier(ts.SyntaxKind.DeclareKeyword),\n        );\n      }\n\n      return node;\n    }\n\n    if (ts.isVariableDeclaration(node)) {\n      // Remove unused variables\n      if (!currentModule.used.has(node.name.text)) {\n        return null;\n      }\n    }\n\n    // Rename references\n    if (ts.isIdentifier(node) && currentModule.names.has(node.text)) {\n      let newName = nullthrows(currentModule.getName(node.text));\n      if (newName !== 'default') {\n        return factory.createIdentifier(newName);\n      }\n    }\n\n    // Replace namespace references with final names\n    if (ts.isQualifiedName(node) && ts.isIdentifier(node.left)) {\n      let resolved = moduleGraph.resolveImport(\n        currentModule,\n        node.left.text,\n        node.right.text,\n      );\n      if (resolved && resolved.module.hasBinding(resolved.name)) {\n        return factory.createIdentifier(resolved.name);\n      } else {\n        return factory.updateQualifiedName(\n          node,\n          factory.createIdentifier(currentModule.getName(node.left.text)),\n          node.right,\n        );\n      }\n    }\n\n    // Remove private properties\n    if (ts.isPropertyDeclaration(node)) {\n      let isPrivate =\n        node.modifiers &&\n        node.modifiers.some(m => m.kind === ts.SyntaxKind.PrivateKeyword);\n      if (isPrivate) {\n        return null;\n      }\n    }\n\n    return ts.visitEachChild(node, visit, context);\n  };\n\n  return ts.visitNode(sourceFile, visit);\n}\n\nfunction generateImports(factory: any, moduleGraph: TSModuleGraph) {\n  let importStatements = [];\n  for (let [specifier, names] of moduleGraph.getAllImports()) {\n    let defaultSpecifier;\n    let namespaceSpecifier;\n    let namedSpecifiers = [];\n    for (let [name, imported] of names) {\n      if (imported === 'default') {\n        defaultSpecifier = factory.createIdentifier(name);\n      } else if (imported === '*') {\n        namespaceSpecifier = factory.createNamespaceImport(\n          factory.createIdentifier(name),\n        );\n      } else {\n        namedSpecifiers.push(\n          createImportSpecifier(\n            factory,\n            false,\n            name === imported ? undefined : factory.createIdentifier(imported),\n            factory.createIdentifier(name),\n          ),\n        );\n      }\n    }\n\n    if (namespaceSpecifier) {\n      let importClause = createImportClause(\n        factory,\n        false,\n        defaultSpecifier,\n        namespaceSpecifier,\n      );\n      importStatements.push(\n        createImportDeclaration(\n          factory,\n          undefined,\n          importClause,\n          factory.createStringLiteral(specifier),\n          undefined,\n        ),\n      );\n      defaultSpecifier = undefined;\n    }\n\n    if (defaultSpecifier || namedSpecifiers.length > 0) {\n      let importClause = createImportClause(\n        factory,\n        false,\n        defaultSpecifier,\n        namedSpecifiers.length > 0\n          ? factory.createNamedImports(namedSpecifiers)\n          : undefined,\n      );\n      importStatements.push(\n        createImportDeclaration(\n          factory,\n          undefined,\n          importClause,\n          factory.createStringLiteral(specifier),\n          undefined,\n        ),\n      );\n    }\n  }\n\n  return importStatements;\n}\n"
  },
  {
    "path": "packages/transformers/typescript-types/src/utils.js",
    "content": "// @flow\nimport ts from 'typescript';\n\nexport function getExportedName(node: any): ?string {\n  if (!node.modifiers) {\n    return null;\n  }\n\n  if (!node.modifiers.some(m => m.kind === ts.SyntaxKind.ExportKeyword)) {\n    return null;\n  }\n\n  if (node.modifiers.some(m => m.kind === ts.SyntaxKind.DefaultKeyword)) {\n    return 'default';\n  }\n\n  return node.name.text;\n}\n\nexport function isDeclaration(node: any): boolean {\n  return (\n    ts.isFunctionDeclaration(node) ||\n    ts.isClassDeclaration(node) ||\n    ts.isInterfaceDeclaration(node) ||\n    ts.isEnumDeclaration(node) ||\n    ts.isTypeAliasDeclaration(node)\n  );\n}\n"
  },
  {
    "path": "packages/transformers/typescript-types/src/wrappers.js",
    "content": "// @flow\n/* eslint-disable no-unused-vars */\nimport type {\n  ExportDeclaration,\n  Expression,\n  Identifier,\n  ImportClause,\n  ImportDeclaration,\n  ImportSpecifier,\n  Modifier,\n  NamedImportBindings,\n} from 'typescript';\n\nimport ts from 'typescript';\nimport invariant from 'assert';\n\ntype AssertClause = any;\ntype NamedExportBindings = any;\n\nconst [majorVersion, minorVersion] = ts.versionMajorMinor\n  .split('.')\n  .map(num => parseInt(num, 10));\n\n// Everything below was generated using https://github.com/mischnic/tsc-version-wrapper\n\nexport const createImportClause: (\n  factory: any,\n  isTypeOnly: boolean,\n  name: Identifier | void,\n  namedBindings: NamedImportBindings | void,\n) => ImportClause = (() => {\n  if (majorVersion > 4 || (majorVersion === 4 && minorVersion >= 0)) {\n    return (factory, isTypeOnly, name, namedBindings) =>\n      factory.createImportClause(isTypeOnly, name, namedBindings);\n  } else if (majorVersion > 3 || (majorVersion === 3 && minorVersion >= 8)) {\n    return (factory, isTypeOnly, name, namedBindings) =>\n      factory.createImportClause(name, namedBindings, isTypeOnly);\n  } else if (majorVersion > 3 || (majorVersion === 3 && minorVersion >= 0)) {\n    return (factory, isTypeOnly, name, namedBindings) =>\n      factory.createImportClause(name, namedBindings);\n  } else {\n    invariant(false);\n  }\n})();\n\nexport const createImportDeclaration: (\n  factory: any,\n  modifiers: Modifier[] | void,\n  importClause: ImportClause | void,\n  moduleSpecifier: Expression,\n  assertClause: AssertClause,\n) => ImportDeclaration = (() => {\n  if (majorVersion > 4 || (majorVersion === 4 && minorVersion >= 8)) {\n    return (factory, modifiers, importClause, moduleSpecifier, assertClause) =>\n      factory.createImportDeclaration(\n        modifiers,\n        importClause,\n        moduleSpecifier,\n        assertClause,\n      );\n  } else if (majorVersion > 4 || (majorVersion === 4 && minorVersion >= 5)) {\n    return (factory, modifiers, importClause, moduleSpecifier, assertClause) =>\n      factory.createImportDeclaration(\n        undefined /* decorators */,\n        modifiers,\n        importClause,\n        moduleSpecifier,\n        assertClause,\n      );\n  } else if (majorVersion > 3 || (majorVersion === 3 && minorVersion >= 0)) {\n    return (factory, modifiers, importClause, moduleSpecifier, assertClause) =>\n      factory.createImportDeclaration(\n        undefined /* decorators */,\n        modifiers,\n        importClause,\n        moduleSpecifier,\n      );\n  } else {\n    invariant(false);\n  }\n})();\n\nexport const createImportSpecifier: (\n  factory: any,\n  isTypeOnly: boolean,\n  propertyName: Identifier | void,\n  name: Identifier,\n) => ImportSpecifier = (() => {\n  if (majorVersion > 4 || (majorVersion === 4 && minorVersion >= 5)) {\n    return (factory, isTypeOnly, propertyName, name) =>\n      factory.createImportSpecifier(isTypeOnly, propertyName, name);\n  } else if (majorVersion > 3 || (majorVersion === 3 && minorVersion >= 0)) {\n    return (factory, isTypeOnly, propertyName, name) =>\n      factory.createImportSpecifier(propertyName, name);\n  } else {\n    invariant(false);\n  }\n})();\n\nexport const updateExportDeclaration: (\n  factory: any,\n  node: ExportDeclaration,\n  modifiers: Modifier[] | void,\n  isTypeOnly: boolean,\n  exportClause: NamedExportBindings | void,\n  moduleSpecifier: Expression | void,\n  assertClause: AssertClause | void,\n) => ExportDeclaration = (() => {\n  if (majorVersion > 4 || (majorVersion === 4 && minorVersion >= 8)) {\n    return (\n      factory,\n      node,\n      modifiers,\n      isTypeOnly,\n      exportClause,\n      moduleSpecifier,\n      assertClause,\n    ) =>\n      factory.updateExportDeclaration(\n        node,\n        modifiers,\n        isTypeOnly,\n        exportClause,\n        moduleSpecifier,\n        assertClause,\n      );\n  } else if (majorVersion > 4 || (majorVersion === 4 && minorVersion >= 5)) {\n    return (\n      factory,\n      node,\n      modifiers,\n      isTypeOnly,\n      exportClause,\n      moduleSpecifier,\n      assertClause,\n    ) =>\n      factory.updateExportDeclaration(\n        node,\n        undefined /* decorators */,\n        modifiers,\n        isTypeOnly,\n        exportClause,\n        moduleSpecifier,\n        assertClause,\n      );\n  } else if (majorVersion > 4 || (majorVersion === 4 && minorVersion >= 0)) {\n    return (\n      factory,\n      node,\n      modifiers,\n      isTypeOnly,\n      exportClause,\n      moduleSpecifier,\n      assertClause,\n    ) =>\n      factory.updateExportDeclaration(\n        node,\n        undefined /* decorators */,\n        modifiers,\n        isTypeOnly,\n        exportClause,\n        moduleSpecifier,\n      );\n  } else if (majorVersion > 3 || (majorVersion === 3 && minorVersion >= 8)) {\n    return (\n      factory,\n      node,\n      modifiers,\n      isTypeOnly,\n      exportClause,\n      moduleSpecifier,\n      assertClause,\n    ) =>\n      factory.updateExportDeclaration(\n        node,\n        undefined /* decorators */,\n        modifiers,\n        exportClause,\n        moduleSpecifier,\n        isTypeOnly,\n      );\n  } else if (majorVersion > 3 || (majorVersion === 3 && minorVersion >= 0)) {\n    return (\n      factory,\n      node,\n      modifiers,\n      isTypeOnly,\n      exportClause,\n      moduleSpecifier,\n      assertClause,\n    ) =>\n      factory.updateExportDeclaration(\n        node,\n        undefined /* decorators */,\n        modifiers,\n        exportClause,\n        moduleSpecifier,\n      );\n  } else {\n    invariant(false);\n  }\n})();\n"
  },
  {
    "path": "packages/transformers/vue/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-vue\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/VueTransformer.js\",\n  \"source\": \"src/VueTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@ladjs/consolidate\": \"^1.0.4\",\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/source-map\": \"^2.1.1\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"@vue/compiler-sfc\": \"^3.2.27\",\n    \"nullthrows\": \"^1.1.1\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"devDependencies\": {\n    \"vue\": \"^3.5.13\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/vue/src/VueTransformer.js",
    "content": "// @flow strict-local\nimport type {TransformerResult} from '@parcel/types';\n\nimport {Transformer} from '@parcel/plugin';\nimport nullthrows from 'nullthrows';\nimport {hashObject} from '@parcel/utils';\nimport ThrowableDiagnostic, {\n  type Diagnostic,\n  convertSourceLocationToHighlight,\n  escapeMarkdown,\n  md,\n} from '@parcel/diagnostic';\nimport SourceMap from '@parcel/source-map';\nimport semver from 'semver';\nimport {basename, extname, relative, dirname} from 'path';\n// $FlowFixMe\nimport * as compiler from '@vue/compiler-sfc';\n// $FlowFixMe\nimport consolidate from '@ladjs/consolidate';\n\nconst MODULE_BY_NAME_RE = /\\.module\\./;\n\n// TODO: Use language-specific config files during preprocessing\nexport default (new Transformer({\n  async loadConfig({config}) {\n    let conf = await config.getConfig(\n      [\n        '.vuerc',\n        '.vuerc.json',\n        '.vuerc.js',\n        '.vuerc.cjs',\n        '.vuerc.mjs',\n        'vue.config.js',\n        'vue.config.cjs',\n        'vue.config.mjs',\n      ],\n      {packageKey: 'vue'},\n    );\n    let contents = {};\n    if (conf) {\n      config.invalidateOnStartup();\n      contents = conf.contents;\n      if (typeof contents !== 'object') {\n        // TODO: codeframe\n        throw new ThrowableDiagnostic({\n          diagnostic: {\n            message: 'Vue config should be an object.',\n            origin: '@parcel/transformer-vue',\n          },\n        });\n      }\n    }\n    return {\n      customBlocks: contents.customBlocks || {},\n      filePath: conf && conf.filePath,\n      compilerOptions: contents.compilerOptions || {},\n    };\n  },\n  canReuseAST({ast}) {\n    return ast.type === 'vue' && semver.satisfies(ast.version, '^3.0.0');\n  },\n  async parse({asset, options}) {\n    // TODO: This parses the vue component multiple times. Fix?\n    let code = await asset.getCode();\n    let parsed = compiler.parse(code, {\n      sourceMap: true,\n      filename: asset.filePath,\n    });\n    if (parsed.errors.length) {\n      throw new ThrowableDiagnostic({\n        diagnostic: parsed.errors.map(err => {\n          return createDiagnostic(err, asset.filePath);\n        }),\n      });\n    }\n\n    const descriptor = parsed.descriptor;\n    let id = hashObject({\n      filePath: asset.filePath,\n      source: options.mode === 'production' ? code : null,\n    }).slice(-6);\n\n    return {\n      type: 'vue',\n      version: '3.0.0',\n      program: {\n        ...descriptor,\n        script:\n          descriptor.script != null || descriptor.scriptSetup != null\n            ? compiler.compileScript(descriptor, {\n                id,\n                isProd: options.mode === 'production',\n              })\n            : null,\n        id,\n      },\n    };\n  },\n  async transform({asset, options, resolve, config}) {\n    let {template, script, styles, customBlocks, id} = nullthrows(\n      await asset.getAST(),\n    ).program;\n    let scopeId = 'data-v-' + id;\n    let hmrId = id + '-hmr';\n    let basePath = basename(asset.filePath);\n    if (asset.pipeline != null) {\n      return processPipeline({\n        asset,\n        template,\n        script,\n        styles,\n        customBlocks,\n        config,\n        basePath,\n        options,\n        resolve,\n        id,\n        hmrId,\n      });\n    }\n    return [\n      {\n        type: 'js',\n        uniqueKey: asset.id + '-glue',\n        content: `\nlet script;\nlet initialize = () => {\n  script = ${\n    script != null\n      ? `require('script:./${basePath}');\n  if (script.__esModule) script = script.default`\n      : '{}'\n  };\n  ${\n    template != null\n      ? `script.render = require('template:./${basePath}').render;`\n      : ''\n  }\n  ${\n    styles.length !== 0\n      ? `script.__cssModules = require('style:./${basePath}').default;`\n      : ''\n  }\n  ${\n    customBlocks != null\n      ? `require('custom:./${basePath}').default(script);`\n      : ''\n  }\n  script.__scopeId = '${scopeId}';\n  script.__file = ${JSON.stringify(\n    options.mode === 'production' ? basePath : asset.filePath,\n  )};\n};\ninitialize();\n${\n  options.hmrOptions\n    ? `if (module.hot) {\n  script.__hmrId = '${hmrId}';\n  module.hot.accept(() => {\n    setTimeout(() => {\n      initialize();\n      if (!__VUE_HMR_RUNTIME__.createRecord('${hmrId}', script)) {\n        __VUE_HMR_RUNTIME__.reload('${hmrId}', script);\n      }\n    }, 0);\n  });\n}`\n    : ''\n}\nexport default script;`,\n      },\n    ];\n  },\n}): Transformer);\n\nfunction createDiagnostic(err, filePath) {\n  if (typeof err === 'string') {\n    return {\n      message: err,\n      origin: '@parcel/transformer-vue',\n      filePath,\n    };\n  }\n  // TODO: codeframe\n  let diagnostic: Diagnostic = {\n    message: escapeMarkdown(err.message),\n    origin: '@parcel/transformer-vue',\n    name: err.name,\n    stack: err.stack,\n    codeFrames: err.loc\n      ? [\n          {\n            filePath,\n            codeHighlights: [convertSourceLocationToHighlight(err.loc)],\n          },\n        ]\n      : [],\n  };\n  return diagnostic;\n}\n\nasync function processPipeline({\n  asset,\n  template,\n  script,\n  styles,\n  customBlocks,\n  config,\n  basePath,\n  options,\n  resolve,\n  id,\n  hmrId,\n}) {\n  switch (asset.pipeline) {\n    case 'template': {\n      let isFunctional = template.functional;\n      if (template.src) {\n        template.content = (\n          await options.inputFS.readFile(\n            await resolve(asset.filePath, template.src),\n          )\n        ).toString();\n        template.lang = extname(template.src).slice(1);\n      }\n      let content = template.content;\n      if (template.lang && !['htm', 'html'].includes(template.lang)) {\n        let options = {};\n        let preprocessor = consolidate[template.lang];\n        // Pug doctype fix (fixes #7756)\n        switch (template.lang) {\n          case 'pug':\n            options.doctype = 'html';\n            break;\n        }\n        if (!preprocessor) {\n          // TODO: codeframe\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: md`Unknown template language: \"${template.lang}\"`,\n              origin: '@parcel/transformer-vue',\n            },\n          });\n        }\n        content = await preprocessor.render(content, options);\n      }\n      let templateComp = compiler.compileTemplate({\n        filename: asset.filePath,\n        source: content,\n        inMap: template.src ? undefined : template.map,\n        scoped: styles.some(style => style.scoped),\n        isFunctional,\n        compilerOptions: {\n          ...config.compilerOptions,\n          bindingMetadata: script ? script.bindings : undefined,\n        },\n        isProd: options.mode === 'production',\n        id,\n      });\n      if (templateComp.errors.length) {\n        throw new ThrowableDiagnostic({\n          diagnostic: templateComp.errors.map(err => {\n            return createDiagnostic(err, asset.filePath);\n          }),\n        });\n      }\n      let templateAsset: TransformerResult = {\n        type: 'js',\n        uniqueKey: asset.id + '-template',\n        ...(!template.src &&\n          asset.env.sourceMap && {\n            map: createMap(templateComp.map, options.projectRoot),\n          }),\n        content:\n          templateComp.code +\n          `\n${\n  options.hmrOptions\n    ? `if (module.hot) {\n  module.hot.accept(() => {\n    __VUE_HMR_RUNTIME__.rerender('${hmrId}', render);\n  })\n}`\n    : ''\n}`,\n      };\n      return [templateAsset];\n    }\n    case 'script': {\n      if (script.src) {\n        script.content = (\n          await options.inputFS.readFile(\n            await resolve(asset.filePath, script.src),\n          )\n        ).toString();\n        script.lang = extname(script.src).slice(1);\n      }\n      let type;\n      switch (script.lang || 'js') {\n        case 'javascript':\n        case 'js':\n          type = 'js';\n          break;\n        case 'jsx':\n          type = 'jsx';\n          break;\n        case 'typescript':\n        case 'ts':\n          type = 'ts';\n          break;\n        case 'tsx':\n          type = 'tsx';\n          break;\n        case 'coffeescript':\n        case 'coffee':\n          type = 'coffee';\n          break;\n        default:\n          // TODO: codeframe\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: md`Unknown script language: \"${script.lang}\"`,\n              origin: '@parcel/transformer-vue',\n            },\n          });\n      }\n      let scriptAsset = {\n        type,\n        uniqueKey: asset.id + '-script',\n        content: script.content,\n        ...(!script.src &&\n          asset.env.sourceMap && {\n            map: createMap(script.map, options.projectRoot),\n          }),\n      };\n\n      return [scriptAsset];\n    }\n    case 'style': {\n      let cssModules = {};\n      let assets = await Promise.all(\n        styles.map(async (style, i) => {\n          if (style.src) {\n            style.content = (\n              await options.inputFS.readFile(\n                await resolve(asset.filePath, style.src),\n              )\n            ).toString();\n            if (!style.module) {\n              style.module = MODULE_BY_NAME_RE.test(style.src);\n            }\n            style.lang = extname(style.src).slice(1);\n          }\n          switch (style.lang) {\n            case 'less':\n            case 'stylus':\n            case 'styl':\n            case 'scss':\n            case 'sass':\n            case 'css':\n            case undefined:\n              break;\n            default:\n              // TODO: codeframe\n              throw new ThrowableDiagnostic({\n                diagnostic: {\n                  message: md`Unknown style language: \"${style.lang}\"`,\n                  origin: '@parcel/transformer-vue',\n                },\n              });\n          }\n          let styleComp = await compiler.compileStyleAsync({\n            filename: asset.filePath,\n            source: style.content,\n            modules: style.module,\n            preprocessLang: style.lang || 'css',\n            scoped: style.scoped,\n            inMap: style.src ? undefined : style.map,\n            isProd: options.mode === 'production',\n            id,\n          });\n          if (styleComp.errors.length) {\n            throw new ThrowableDiagnostic({\n              diagnostic: styleComp.errors.map(err => {\n                return createDiagnostic(err, asset.filePath);\n              }),\n            });\n          }\n          let styleAsset = {\n            type: 'css',\n            content: styleComp.code,\n            sideEffects: true,\n            ...(!style.src &&\n              asset.env.sourceMap && {\n                map: createMap(style.map, options.projectRoot),\n              }),\n            uniqueKey: asset.id + '-style' + i,\n          };\n          if (styleComp.modules) {\n            if (typeof style.module === 'boolean') style.module = '$style';\n            cssModules[style.module] = {\n              ...cssModules[style.module],\n              ...styleComp.modules,\n            };\n          }\n          return styleAsset;\n        }),\n      );\n      if (Object.keys(cssModules).length !== 0) {\n        assets.push({\n          type: 'js',\n          uniqueKey: asset.id + '-cssModules',\n          content: `\nimport {render} from 'template:./${basePath}';\nlet cssModules = ${JSON.stringify(cssModules)};\n${\n  options.hmrOptions\n    ? `if (module.hot) {\n  module.hot.accept(() => {\n    __VUE_HMR_RUNTIME__.rerender('${hmrId}', render);\n  });\n};`\n    : ''\n}\nexport default cssModules;`,\n        });\n      }\n      return assets;\n    }\n    case 'custom': {\n      let toCall = [];\n      // To satisfy flow\n      if (!config) return [];\n      let types = new Set();\n      for (let block of customBlocks) {\n        let {type, src, content, attrs} = block;\n        if (!config.customBlocks[type]) {\n          // TODO: codeframe\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: md`No preprocessor found for block type ${type}`,\n              origin: '@parcel/transformer-vue',\n            },\n          });\n        }\n        if (src) {\n          content = (\n            await options.inputFS.readFile(await resolve(asset.filePath, src))\n          ).toString();\n        }\n        toCall.push([type, content, attrs]);\n        types.add(type);\n      }\n      return [\n        {\n          type: 'js',\n          uniqueKey: asset.id + '-custom',\n          content: `\nlet NOOP = () => {};\n${(\n  await Promise.all(\n    [...types].map(\n      async type =>\n        `import p${type} from './${relative(\n          dirname(asset.filePath),\n          await resolve(nullthrows(config.filePath), config.customBlocks[type]),\n        )}';\nif (typeof p${type} !== 'function') {\n  p${type} = NOOP;\n}`,\n    ),\n  )\n).join('\\n')}\nexport default script => {\n  ${toCall\n    .map(\n      ([type, content, attrs]) =>\n        `  p${type}(script, ${JSON.stringify(content)}, ${JSON.stringify(\n          attrs,\n        )});`,\n    )\n    .join('\\n')}\n}`,\n        },\n      ];\n    }\n    default: {\n      return [];\n    }\n  }\n}\n\nfunction createMap(rawMap, projectRoot: string) {\n  let newMap = new SourceMap(projectRoot);\n  newMap.addVLQMap(rawMap);\n  return newMap;\n}\n"
  },
  {
    "path": "packages/transformers/webextension/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-webextension\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/WebExtensionTransformer.js\",\n  \"source\": \"src/WebExtensionTransformer.js\",\n  \"engines\": {\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@mischnic/json-sourcemap\": \"^0.1.1\",\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"content-security-policy-parser\": \"^0.6.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/webextension/src/WebExtensionTransformer.js",
    "content": "// @flow\nimport type {MutableAsset, HMROptions} from '@parcel/types';\n\nimport {Transformer} from '@parcel/plugin';\nimport path from 'path';\nimport {parse} from '@mischnic/json-sourcemap';\nimport parseCSP from 'content-security-policy-parser';\nimport {validateSchema} from '@parcel/utils';\nimport ThrowableDiagnostic, {\n  getJSONHighlightLocation,\n  getJSONSourceLocation,\n  md,\n} from '@parcel/diagnostic';\nimport {glob} from '@parcel/utils';\nimport {MV3Schema, MV2Schema, VersionSchema} from './schema';\n\nconst DEP_LOCS = [\n  ['icons'],\n  ['browser_action', 'default_icon'],\n  ['browser_action', 'default_popup'],\n  ['page_action', 'default_icon'],\n  ['page_action', 'default_popup'],\n  ['action', 'default_icon'],\n  ['action', 'default_popup'],\n  ['background', 'scripts'],\n  ['chrome_url_overrides'],\n  ['devtools_page'],\n  ['options_ui', 'page'],\n  ['sandbox', 'pages'],\n  ['side_panel', 'default_path'],\n  ['sidebar_action', 'default_icon'],\n  ['sidebar_action', 'default_panel'],\n  ['storage', 'managed_schema'],\n  ['theme', 'images', 'theme_frame'],\n  ['theme', 'images', 'additional_backgrounds'],\n  ['user_scripts', 'api_script'],\n];\n\nasync function collectDependencies(\n  asset: MutableAsset,\n  program: any,\n  ptrs: {[key: string]: any, ...},\n  hmrOptions: ?HMROptions,\n) {\n  const hot = Boolean(hmrOptions);\n  const fs = asset.fs;\n  const filePath = asset.filePath;\n  const assetDir = path.dirname(filePath);\n  const isMV2 = program.manifest_version == 2;\n  delete program.$schema;\n  if (program.default_locale) {\n    const locales = path.join(assetDir, '_locales');\n    let err = !(await fs.exists(locales))\n      ? 'key'\n      : !(await fs.exists(\n          path.join(locales, program.default_locale, 'messages.json'),\n        ))\n      ? 'value'\n      : null;\n    if (err) {\n      throw new ThrowableDiagnostic({\n        diagnostic: [\n          {\n            message: 'Invalid Web Extension manifest',\n            origin: '@parcel/transformer-webextension',\n            codeFrames: [\n              {\n                filePath,\n                codeHighlights: [\n                  {\n                    ...getJSONHighlightLocation(ptrs['/default_locale'], err),\n                    message: md`Localization ${\n                      err == 'value'\n                        ? 'file for ' + program.default_locale\n                        : 'directory'\n                    } does not exist: ${path.relative(\n                      assetDir,\n                      path.join(locales, program.default_locale),\n                    )}`,\n                  },\n                ],\n              },\n            ],\n          },\n        ],\n      });\n    }\n    for (const locale of await fs.readdir(locales)) {\n      if (await fs.exists(path.join(locales, locale, 'messages.json'))) {\n        asset.addURLDependency(`_locales/${locale}/messages.json`, {\n          needsStableName: true,\n          pipeline: 'raw',\n        });\n      }\n    }\n  }\n  if (program.content_scripts) {\n    for (let i = 0; i < program.content_scripts.length; ++i) {\n      const sc = program.content_scripts[i];\n      for (const k of ['css', 'js']) {\n        const assets = sc[k] || [];\n        for (let j = 0; j < assets.length; ++j) {\n          assets[j] = asset.addURLDependency(assets[j], {\n            bundleBehavior: 'isolated',\n            loc: {\n              filePath,\n              ...getJSONSourceLocation(\n                ptrs[`/content_scripts/${i}/${k}/${j}`],\n                'value',\n              ),\n            },\n          });\n        }\n      }\n      if (hot && sc.js && sc.js.length) {\n        sc.js.push(\n          asset.addURLDependency('./runtime/autoreload.js', {\n            resolveFrom: __filename,\n          }),\n        );\n      }\n    }\n  }\n  if (program.dictionaries) {\n    for (const dict in program.dictionaries) {\n      const dictFile = program.dictionaries[dict];\n      if (path.extname(dictFile) != '.dic') {\n        throw new ThrowableDiagnostic({\n          diagnostic: [\n            {\n              message: 'Invalid Web Extension manifest',\n              origin: '@parcel/transformer-webextension',\n              codeFrames: [\n                {\n                  filePath,\n                  codeHighlights: [\n                    {\n                      ...getJSONHighlightLocation(\n                        ptrs[`/dictionaries/${dict}`],\n                        'value',\n                      ),\n                      message: 'Dictionaries must be .dic files',\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        });\n      }\n      const loc = {\n        filePath,\n        ...getJSONSourceLocation(ptrs[`/dictionaries/${dict}`], 'value'),\n      };\n      program.dictionaries[dict] = asset.addURLDependency(dictFile, {\n        needsStableName: true,\n        loc,\n      });\n      asset.addURLDependency(dictFile.slice(0, -4) + '.aff', {\n        needsStableName: true,\n        loc,\n      });\n    }\n  }\n  const browserActionName = isMV2 ? 'browser_action' : 'action';\n  if (program[browserActionName]?.theme_icons) {\n    for (let i = 0; i < program[browserActionName].theme_icons.length; ++i) {\n      const themeIcon = program[browserActionName].theme_icons[i];\n      for (const k of ['light', 'dark']) {\n        const loc = getJSONSourceLocation(\n          ptrs[`/${browserActionName}/theme_icons/${i}/${k}`],\n          'value',\n        );\n        themeIcon[k] = asset.addURLDependency(themeIcon[k], {\n          loc: {\n            ...loc,\n            filePath,\n          },\n        });\n      }\n    }\n  }\n  if (program.web_accessible_resources) {\n    let war = [];\n    for (let i = 0; i < program.web_accessible_resources.length; ++i) {\n      // TODO: this doesn't support Parcel resolution\n      const currentEntry = program.web_accessible_resources[i];\n      const files = isMV2 ? [currentEntry] : currentEntry.resources;\n      let currentFiles = [];\n      for (let j = 0; j < files.length; ++j) {\n        const globFiles = (\n          await glob(path.join(assetDir, files[j]), fs, {})\n        ).map(fp =>\n          asset.addURLDependency(path.relative(assetDir, fp), {\n            bundleBehavior: 'isolated',\n            needsStableName: true,\n            loc: {\n              filePath,\n              ...getJSONSourceLocation(\n                ptrs[\n                  `/web_accessible_resources/${i}${\n                    isMV2 ? '' : `/resources/${j}`\n                  }`\n                ],\n              ),\n            },\n          }),\n        );\n        currentFiles = currentFiles.concat(globFiles);\n      }\n      if (isMV2) {\n        war = war.concat(currentFiles);\n      } else {\n        currentEntry.resources = currentFiles;\n        war.push(currentEntry);\n      }\n    }\n    program.web_accessible_resources = war;\n  }\n  if (program.declarative_net_request) {\n    const rrs: {|path: string, id: string, enabled: boolean|}[] =\n      program.declarative_net_request?.rule_resources ?? [];\n    rrs.forEach((resources, i) => {\n      resources.path = asset.addURLDependency(resources.path, {\n        pipeline: 'raw',\n        loc: {\n          filePath,\n          ...getJSONSourceLocation(\n            ptrs[`/declarative_net_request/rule_resources/${i}/path`],\n            'value',\n          ),\n        },\n      });\n    });\n  }\n\n  for (const loc of DEP_LOCS) {\n    const location = '/' + loc.join('/');\n    if (!ptrs[location]) continue;\n    let parent: any = program;\n    for (let i = 0; i < loc.length - 1; ++i) {\n      parent = parent[loc[i]];\n    }\n    const lastLoc = loc[loc.length - 1];\n    const obj = parent[lastLoc];\n    if (typeof obj == 'string')\n      parent[lastLoc] = asset.addURLDependency(obj, {\n        bundleBehavior: 'isolated',\n        loc: {\n          filePath,\n          ...getJSONSourceLocation(ptrs[location], 'value'),\n        },\n        pipeline: path.extname(obj) == '.json' ? 'raw' : undefined,\n      });\n    else {\n      for (const k of Object.keys(obj)) {\n        obj[k] = asset.addURLDependency(obj[k], {\n          bundleBehavior: 'isolated',\n          loc: {\n            filePath,\n            ...getJSONSourceLocation(ptrs[location + '/' + k], 'value'),\n          },\n          pipeline: path.extname(obj[k]) == '.json' ? 'raw' : undefined,\n        });\n      }\n    }\n  }\n  if (program.background?.page) {\n    program.background.page = asset.addURLDependency(program.background.page, {\n      bundleBehavior: 'isolated',\n      loc: {\n        filePath,\n        ...getJSONSourceLocation(ptrs['/background/page'], 'value'),\n      },\n    });\n  }\n  if (program.background?.service_worker) {\n    program.background.service_worker = asset.addURLDependency(\n      program.background.service_worker,\n      {\n        bundleBehavior: 'isolated',\n        loc: {\n          filePath,\n          ...getJSONSourceLocation(ptrs['/background/service_worker'], 'value'),\n        },\n        env: {\n          context: 'service-worker',\n          sourceType: program.background.type == 'module' ? 'module' : 'script',\n        },\n      },\n    );\n  }\n  if (hot) {\n    if (isMV2) {\n      // To enable HMR, we must override the CSP to allow 'unsafe-eval'\n      program.content_security_policy = cspPatchHMR(\n        program.content_security_policy,\n      );\n    } else {\n      // Enable HMR for fetched localhost chunks\n      const csp = program.content_security_policy || {};\n      csp.extension_pages = cspPatchHMR(\n        csp.extension_pages,\n        `http://${hmrOptions?.host || 'localhost'}:*`,\n      );\n      // Sandbox allows eval by default\n      if (csp.sandbox) csp.sandbox = cspPatchHMR(csp.sandbox);\n      program.content_security_policy = csp;\n    }\n\n    if (!program.background) {\n      program.background = {};\n    }\n\n    if (program.background.page) {\n      asset.meta.webextBGInsert = program.background.page;\n    } else if (isMV2 || program.background.scripts) {\n      if (!program.background.scripts) {\n        program.background.scripts = [];\n      }\n      if (program.background.scripts.length == 0) {\n        program.background.scripts.push(\n          asset.addURLDependency('./runtime/default-bg.js', {\n            resolveFrom: __filename,\n          }),\n        );\n      }\n      asset.meta.webextBGInsert = program.background.scripts[0];\n    } else {\n      if (!program.background.service_worker) {\n        program.background.service_worker = asset.addURLDependency(\n          './runtime/default-bg.js',\n          {\n            resolveFrom: __filename,\n            env: {context: 'service-worker'},\n          },\n        );\n      }\n      asset.meta.webextBGInsert = program.background.service_worker;\n    }\n\n    if (!program.permissions) program.permissions = [];\n    if (!isMV2 && !program.permissions.includes('scripting')) {\n      program.permissions.push('scripting');\n    }\n    const hostPerms = [\n      ...new Set(program.content_scripts?.flatMap(sc => sc.matches)),\n    ];\n    if (isMV2) program.permissions = program.permissions.concat(hostPerms);\n    else {\n      if (!program.host_permissions) program.host_permissions = [];\n      program.host_permissions = program.host_permissions.concat(hostPerms);\n    }\n  }\n}\n\nfunction cspPatchHMR(policy: ?string, insert?: string) {\n  let defaultSrc = \"'self'\";\n  if (insert == null) {\n    insert = \"'unsafe-eval'\";\n    defaultSrc = \"'self' blob: filesystem:\";\n  }\n  if (policy) {\n    const csp = parseCSP(policy);\n    policy = '';\n    if (!csp['script-src']) {\n      csp['script-src'] = [defaultSrc];\n    }\n    if (!csp['script-src'].includes(insert)) {\n      csp['script-src'].push(insert);\n    }\n    if (csp.sandbox && !csp.sandbox.includes('allow-scripts')) {\n      csp.sandbox.push('allow-scripts');\n    }\n    for (const k in csp) {\n      policy += `${k} ${csp[k].join(' ')};`;\n    }\n    return policy;\n  } else {\n    return `script-src ${defaultSrc} ${insert};` + `object-src ${defaultSrc};`;\n  }\n}\n\nexport default (new Transformer({\n  async transform({asset, options}) {\n    // Set environment to browser, since web extensions are always used in\n    // browsers, and because it avoids delegating extra config to the user\n    asset.setEnvironment({\n      context: 'browser',\n      outputFormat:\n        asset.env.outputFormat == 'commonjs'\n          ? 'global'\n          : asset.env.outputFormat,\n      engines: {\n        browsers: asset.env.engines.browsers,\n      },\n      sourceMap: asset.env.sourceMap && {\n        ...asset.env.sourceMap,\n        // Inline source maps work most reliably on web extensions but allow users to overwrite\n        inline: asset.env.sourceMap.inline ?? true,\n        inlineSources: asset.env.sourceMap.inlineSources ?? true,\n      },\n      includeNodeModules: asset.env.includeNodeModules,\n      sourceType: asset.env.sourceType,\n      isLibrary: asset.env.isLibrary,\n      shouldOptimize: asset.env.shouldOptimize,\n      shouldScopeHoist: asset.env.shouldScopeHoist,\n    });\n    const code = await asset.getCode();\n    const parsed = parse(code);\n    const data: any = parsed.data;\n\n    // Not using a unified schema dramatically improves error messages\n    let schema = VersionSchema;\n    if (data.manifest_version === 3) {\n      schema = MV3Schema;\n    } else if (data.manifest_version === 2) {\n      schema = MV2Schema;\n    }\n\n    validateSchema.diagnostic(\n      schema,\n      {\n        data: data,\n        source: code,\n        filePath: asset.filePath,\n      },\n      '@parcel/transformer-webextension',\n      'Invalid Web Extension manifest',\n    );\n    await collectDependencies(asset, data, parsed.pointers, options.hmrOptions);\n    asset.setCode(JSON.stringify(data, null, 2));\n    asset.meta.webextEntry = true;\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/webextension/src/runtime/autoreload.js",
    "content": "/* global chrome, browser, addEventListener, location */\nvar env = typeof browser == 'undefined' ? chrome : browser;\nvar blockReload = true;\n\naddEventListener('beforeunload', function () {\n  if (!blockReload) return;\n  try {\n    env.runtime.sendMessage({\n      __parcel_hmr_reload__: true,\n    });\n    // spinlock for 500ms to let background reload\n    let end = Date.now() + 500;\n    while (Date.now() < end);\n  } catch (err) {\n    // ignore throwing if extension context invalidated\n  }\n});\n\nenv.runtime.onMessage.addListener(function (msg) {\n  if (msg.__parcel_hmr_reload__) {\n    blockReload = false;\n    setTimeout(function () {\n      location.reload();\n    }, 400);\n  }\n});\n"
  },
  {
    "path": "packages/transformers/webextension/src/runtime/default-bg.js",
    "content": ""
  },
  {
    "path": "packages/transformers/webextension/src/schema.js",
    "content": "// @flow strict-local\nimport type {SchemaEntity} from '@parcel/utils';\n\nconst validateVersion = (ver: string): ?string => {\n  const parts = ver.split('.', 5);\n  if (parts.length == 5) return 'Extension versions to have at most three dots';\n  if (\n    parts.every(\n      part => part.length != 0 && Number(part[0]) >= 0 && Number(part) < 65536,\n    )\n  )\n    return;\n  return 'Extension versions must be dot-separated integers between 0 and 65535';\n};\n\nconst string: SchemaEntity = {type: 'string'};\nconst boolean: SchemaEntity = {type: 'boolean'};\n\nconst icons: SchemaEntity = {\n  type: 'object',\n  properties: {},\n  additionalProperties: string,\n};\n\nconst actionProps = {\n  // FF only\n  browser_style: boolean,\n  chrome_style: boolean,\n  // You can also have a raw string, but not in Edge, apparently...\n  default_icon: {\n    oneOf: [icons, string],\n  },\n  default_popup: string,\n  default_title: string,\n};\n\nconst arrStr = {\n  type: 'array',\n  items: string,\n};\n\nconst browserAction = {\n  type: 'object',\n  properties: {\n    ...actionProps,\n    // rest are FF only\n    default_area: {\n      type: 'string',\n      enum: ['navbar', 'menupanel', 'tabstrip', 'personaltoolbar'],\n    },\n    theme_icons: {\n      type: 'array',\n      items: {\n        type: 'object',\n        properties: {\n          light: string,\n          dark: string,\n          size: {type: 'number'},\n        },\n        additionalProperties: false,\n        required: ['light', 'dark', 'size'],\n      },\n    },\n  },\n  additionalProperties: false,\n};\n\nconst warBase = {\n  type: 'object',\n  properties: {\n    resources: arrStr,\n    matches: arrStr,\n    extension_ids: arrStr,\n    use_dynamic_url: boolean,\n  },\n  additionalProperties: false,\n};\n\nconst mv2Background = {\n  type: 'object',\n  properties: {\n    scripts: arrStr,\n    page: string,\n    persistent: boolean,\n  },\n  additionalProperties: false,\n};\n\nconst commonProps = {\n  $schema: string,\n  name: string,\n  version: {\n    type: 'string',\n    __validate: validateVersion,\n  },\n  default_locale: string,\n  description: string,\n  icons,\n  author: string,\n  browser_specific_settings: {\n    type: 'object',\n    properties: {},\n    additionalProperties: {\n      type: 'object',\n      properties: {},\n    },\n  },\n  chrome_settings_overrides: {\n    type: 'object',\n    properties: {\n      homepage: string,\n      search_provider: {\n        type: 'object',\n        properties: {\n          name: string,\n          keyword: string,\n          favicon_url: string,\n          search_url: string,\n          encoding: string,\n          suggest_url: string,\n          image_url: string,\n          instant_url: string,\n          search_url_post_params: string,\n          suggest_url_post_params: string,\n          image_url_post_params: string,\n          instant_url_post_params: string,\n          alternate_urls: arrStr,\n          prepopulated_id: {type: 'number'},\n          is_default: boolean,\n        },\n        additionalProperties: false,\n        required: ['name', 'search_url'],\n      },\n      startup_pages: arrStr,\n    },\n    additionalProperties: false,\n  },\n  chrome_url_overrides: {\n    type: 'object',\n    properties: {\n      bookmarks: string,\n      history: string,\n      newtab: string,\n    },\n    additionalProperties: false,\n  },\n  commands: ({\n    type: 'object',\n    properties: {},\n    additionalProperties: {\n      type: 'object',\n      properties: {\n        suggested_key: {\n          type: 'object',\n          properties: {\n            default: string,\n            mac: string,\n            linux: string,\n            windows: string,\n            chromeos: string,\n            android: string,\n            ios: string,\n          },\n          additionalProperties: false,\n        },\n        description: string,\n      },\n      additionalProperties: false,\n    },\n  }: SchemaEntity),\n  content_scripts: {\n    type: 'array',\n    items: {\n      type: 'object',\n      properties: {\n        matches: arrStr,\n        css: arrStr,\n        js: arrStr,\n        match_about_blank: boolean,\n        exclude_matches: arrStr,\n        include_globs: arrStr,\n        exclude_globs: arrStr,\n        run_at: {\n          type: 'string',\n          enum: ['document_idle', 'document_start', 'document_end'],\n        },\n        all_frames: boolean,\n        world: {\n          type: 'string',\n          enum: ['ISOLATED', 'MAIN'],\n        },\n      },\n      additionalProperties: false,\n      required: ['matches'],\n    },\n  },\n  declarative_net_request: ({\n    type: 'object',\n    properties: {\n      rule_resources: {\n        type: 'array',\n        items: {\n          type: 'object',\n          properties: {\n            id: string,\n            enabled: boolean,\n            path: string,\n          },\n          additionalProperties: false,\n          required: ['id', 'enabled', 'path'],\n        },\n      },\n    },\n    additionalProperties: false,\n    required: ['rule_resources'],\n  }: SchemaEntity),\n  devtools_page: string,\n  // looks to be FF only\n  dictionaries: ({\n    type: 'object',\n    properties: {},\n    additionalProperties: string,\n  }: SchemaEntity),\n  externally_connectable: {\n    type: 'object',\n    properties: {\n      ids: arrStr,\n      matches: arrStr,\n      accept_tls_channel_id: boolean,\n    },\n    additionalProperties: false,\n  },\n  // These next two are where it gets a bit Chrome-y\n  // (we don't include all because some have next to no actual use)\n  file_browser_handlers: {\n    type: 'array',\n    items: {\n      type: 'object',\n      properties: {\n        id: string,\n        default_title: string,\n        file_filters: arrStr,\n      },\n      additionalProperties: false,\n      required: ['id', 'default_title', 'file_filters'],\n    },\n  },\n  file_system_provider_capabilities: {\n    type: 'object',\n    properties: {\n      configurable: boolean,\n      multiple_mounts: boolean,\n      watchable: boolean,\n      source: {\n        type: 'string',\n        enum: ['file', 'device', 'network'],\n      },\n    },\n    additionalProperties: false,\n    required: ['source'],\n  },\n  homepage_url: string,\n  incognito: {\n    type: 'string',\n    enum: ['spanning', 'split', 'not_allowed'],\n  },\n  key: string,\n  minimum_chrome_version: {\n    type: 'string',\n    __validate: validateVersion,\n  },\n  // No NaCl modules because deprecated\n  oauth2: {\n    type: 'object',\n    properties: {\n      client_id: string,\n      scopes: arrStr,\n    },\n    additionalProperties: false,\n  },\n  offline_enabled: boolean,\n  omnibox: ({\n    type: 'object',\n    properties: {},\n    additionalProperties: string,\n  }: SchemaEntity),\n  optional_host_permissions: arrStr,\n  optional_permissions: arrStr,\n  // options_page is deprecated\n  options_ui: {\n    type: 'object',\n    properties: {\n      browser_style: boolean,\n      chrome_style: boolean,\n      open_in_tab: boolean,\n      page: string,\n    },\n    additionalProperties: false,\n    required: ['page'],\n  },\n  permissions: arrStr,\n  // FF only, but has some use\n  protocol_handlers: {\n    type: 'array',\n    items: {\n      type: 'object',\n      properties: {\n        protocol: string,\n        name: string,\n        uriTemplate: string,\n      },\n      additionalProperties: false,\n      required: ['protocol', 'name', 'uriTemplate'],\n    },\n  },\n  // Chrome only\n  requirements: {\n    type: 'object',\n    properties: {\n      '3D': {\n        type: 'object',\n        properties: {\n          features: arrStr,\n        },\n        additionalProperties: false,\n      },\n    },\n  },\n  short_name: string,\n  // FF only, but has some use\n  sidebar_action: {\n    type: 'object',\n    properties: {\n      browser_style: actionProps.browser_style,\n      default_icon: actionProps.default_icon,\n      default_panel: string,\n      default_title: string,\n      open_at_install: boolean,\n    },\n    additionalProperties: false,\n    required: ['default_panel'],\n  },\n  storage: {\n    type: 'object',\n    properties: {\n      managed_schema: string,\n    },\n    additionalProperties: false,\n  },\n  theme: {\n    type: 'object',\n    properties: {\n      images: {\n        type: 'object',\n        properties: {\n          theme_frame: string,\n          additional_backgrounds: arrStr,\n        },\n        additionalProperties: false,\n      },\n      colors: {\n        type: 'object',\n        properties: {\n          bookmark_text: string,\n          button_background_active: string,\n          button_background_hover: string,\n          icons: string,\n          icons_attention: string,\n          frame: string,\n          frame_inactive: string,\n          ntp_background: string,\n          ntp_text: string,\n          popup: string,\n          popup_border: string,\n          popup_highlight: string,\n          popup_highlight_text: string,\n          popup_text: string,\n          sidebar: string,\n          sidebar_border: string,\n          sidebar_highlight: string,\n          sidebar_highlight_text: string,\n          sidebar_text: string,\n          tab_background_separator: string,\n          tab_background_text: string,\n          tab_line: string,\n          tab_loading: string,\n          tab_selected: string,\n          tab_text: string,\n          toolbar: string,\n          toolbar_bottom_separator: string,\n          toolbar_field: string,\n          toolbar_field_border: string,\n          toolbar_field_border_focus: string,\n          toolbar_field_focus: string,\n          toolbar_field_highlight: string,\n          toolbar_field_highlight_text: string,\n          toolbar_field_separator: string,\n          toolbar_field_text: string,\n          toolbar_field_text_focus: string,\n          toolbar_text: string,\n          toolbar_top_separator: string,\n          toolbar_vertical_separator: string,\n        },\n        additionalProperties: false,\n      },\n      properties: {\n        type: 'object',\n        properties: {\n          additional_backgrounds_alignment: arrStr,\n          additional_backgrounds_tiling: {\n            type: 'array',\n            items: {\n              type: 'string',\n              enum: ['no-repeat', 'repeat', 'repeat-x', 'repeat-y'],\n            },\n          },\n        },\n        additionalProperties: false,\n      },\n    },\n    additionalProperties: false,\n    required: ['colors'],\n  },\n  tts_engine: {\n    type: 'object',\n    properties: {\n      voices: {\n        type: 'array',\n        items: {\n          type: 'object',\n          properties: {\n            voice_name: string,\n            lang: string,\n            event_type: {\n              type: 'string',\n              enum: ['start', 'word', 'sentence', 'marker', 'end', 'error'],\n            },\n          },\n          additionalProperties: false,\n          required: ['voice_name', 'event_type'],\n        },\n      },\n    },\n    additionalProperties: false,\n  },\n  update_url: string,\n  user_scripts: {\n    type: 'object',\n    properties: {\n      api_script: string,\n    },\n    additionalProperties: false,\n  },\n  version_name: string,\n};\n\nexport const MV3Schema = ({\n  type: 'object',\n  properties: {\n    ...commonProps,\n    manifest_version: {\n      type: 'number',\n      enum: [3],\n    },\n    action: browserAction,\n    background: {\n      oneOf: [\n        {\n          type: 'object',\n          properties: {\n            service_worker: string,\n            type: {\n              type: 'string',\n              enum: ['classic', 'module'],\n            },\n            // to support both Chrome and Firefox\n            scripts: arrStr,\n            page: string,\n            persistent: boolean,\n          },\n          additionalProperties: false,\n          required: ['service_worker'],\n        },\n        mv2Background,\n      ], // for Firefox\n    },\n    content_security_policy: {\n      type: 'object',\n      properties: {\n        extension_pages: string,\n        sandbox: string,\n      },\n      additionalProperties: false,\n    },\n    host_permissions: arrStr,\n    sandbox: {\n      type: 'object',\n      properties: {\n        pages: arrStr,\n      },\n      additionalProperties: false,\n    },\n    side_panel: {\n      type: 'object',\n      properties: {\n        default_path: string,\n      },\n      additionalProperties: false,\n    },\n    web_accessible_resources: {\n      type: 'array',\n      items: {\n        oneOf: [\n          {\n            ...warBase,\n            required: ['resources', 'matches'],\n          },\n          {\n            ...warBase,\n            required: ['resources', 'extension_ids'],\n          },\n        ],\n      },\n    },\n  },\n  required: ['manifest_version', 'name', 'version'],\n}: SchemaEntity);\n\nexport const MV2Schema = ({\n  type: 'object',\n  properties: {\n    ...commonProps,\n    manifest_version: {\n      type: 'number',\n      enum: [2],\n    },\n    background: mv2Background,\n    browser_action: browserAction,\n    content_security_policy: string,\n    page_action: {\n      type: 'object',\n      properties: {\n        ...actionProps,\n        // rest are FF only\n        hide_matches: arrStr,\n        show_matches: arrStr,\n        pinned: boolean,\n      },\n      additionalProperties: false,\n    },\n    sandbox: {\n      type: 'object',\n      properties: {\n        pages: arrStr,\n        content_security_policy: string,\n      },\n      additionalProperties: false,\n    },\n    web_accessible_resources: arrStr,\n  },\n  required: ['manifest_version', 'name', 'version'],\n}: SchemaEntity);\n\nexport const VersionSchema = ({\n  type: 'object',\n  properties: {\n    $schema: string,\n    manifest_version: {\n      type: 'number',\n      enum: [2, 3],\n    },\n  },\n  required: ['manifest_version'],\n}: SchemaEntity);\n"
  },
  {
    "path": "packages/transformers/webmanifest/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-webmanifest\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/WebManifestTransformer.js\",\n  \"source\": \"src/WebManifestTransformer.js\",\n  \"engines\": {\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@mischnic/json-sourcemap\": \"^0.1.1\",\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/webmanifest/src/WebManifestTransformer.js",
    "content": "// @flow\n// https://developer.mozilla.org/en-US/docs/Web/Manifest\nimport type {SchemaEntity} from '@parcel/utils';\n\nimport invariant from 'assert';\nimport {parse} from '@mischnic/json-sourcemap';\nimport {getJSONSourceLocation} from '@parcel/diagnostic';\nimport {Transformer} from '@parcel/plugin';\nimport {validateSchema} from '@parcel/utils';\n\nconst RESOURCES_SCHEMA = {\n  type: 'array',\n  items: {\n    type: 'object',\n    properties: {\n      src: {\n        type: 'string',\n        __validate: s => {\n          if (s.length === 0) {\n            return 'Must not be empty';\n          }\n        },\n      },\n    },\n    required: ['src'],\n  },\n};\nconst MANIFEST_SCHEMA: SchemaEntity = {\n  type: 'object',\n  properties: {\n    icons: RESOURCES_SCHEMA,\n    screenshots: RESOURCES_SCHEMA,\n    shortcuts: {\n      type: 'array',\n      items: {\n        type: 'object',\n        properties: {\n          icons: RESOURCES_SCHEMA,\n        },\n      },\n    },\n    file_handlers: {\n      type: 'array',\n      items: {\n        type: 'object',\n        properties: {\n          icons: RESOURCES_SCHEMA,\n        },\n      },\n    },\n  },\n};\n\nexport default (new Transformer({\n  async transform({asset}) {\n    const source = await asset.getCode();\n    const {data, pointers} = parse(source);\n\n    validateSchema.diagnostic(\n      MANIFEST_SCHEMA,\n      {source, map: {data, pointers}, filePath: asset.filePath},\n      '@parcel/transformer-webmanifest',\n      'Invalid webmanifest',\n    );\n\n    function addResourceListToAsset(list, parent) {\n      if (list) {\n        invariant(Array.isArray(list));\n        for (let i = 0; i < list.length; i++) {\n          const res = list[i];\n          res.src = asset.addURLDependency(res.src, {\n            loc: {\n              filePath: asset.filePath,\n              ...getJSONSourceLocation(\n                pointers[`/${parent}/${i}/src`],\n                'value',\n              ),\n            },\n          });\n        }\n      }\n    }\n\n    for (const key of ['icons', 'screenshots']) {\n      const list = data[key];\n      addResourceListToAsset(list, key);\n    }\n\n    for (const key of ['shortcuts', 'file_handlers']) {\n      const list = data[key];\n      if (list) {\n        invariant(Array.isArray(list));\n        for (let i = 0; i < list.length; i++) {\n          const iconList = list[i].icons;\n          addResourceListToAsset(iconList, `${key}/${i}/icons`);\n        }\n      }\n    }\n\n    asset.type = 'webmanifest';\n    asset.setCode(JSON.stringify(data));\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/worklet/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-worklet\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/WorkletTransformer.js\",\n  \"source\": \"src/WorkletTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/worklet/src/WorkletTransformer.js",
    "content": "// @flow strict-local\n\nimport {Transformer} from '@parcel/plugin';\n\nexport default (new Transformer({\n  transform({asset}) {\n    asset.bundleBehavior = 'isolated';\n    asset.meta.jsRuntime = 'url';\n    asset.setEnvironment({\n      context: 'worklet',\n      sourceType: 'module',\n      outputFormat: 'esmodule', // Worklets require ESM\n      engines: asset.env.engines,\n      includeNodeModules: asset.env.includeNodeModules,\n      isLibrary: asset.env.isLibrary,\n      sourceMap: asset.env.sourceMap,\n      shouldOptimize: asset.env.shouldOptimize,\n      shouldScopeHoist: asset.env.shouldScopeHoist,\n    });\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/transformers/xml/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-xml\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/XMLTransformer.js\",\n  \"source\": \"src/XMLTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@xmldom/xmldom\": \"^0.9.8\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/xml/src/XMLTransformer.js",
    "content": "// @flow\nimport {Transformer} from '@parcel/plugin';\nimport {DOMParser, XMLSerializer} from '@xmldom/xmldom';\nimport * as atom from './atom';\nimport * as processingInstruction from './processing-instruction';\nimport * as rss from './rss';\n\nconst HANDLERS = {\n  'http://www.w3.org/2005/Atom': atom,\n};\n\nconst NON_NAMESPACED_HANDLERS = {\n  rss,\n};\n\nexport default (new Transformer({\n  async transform({asset}) {\n    let code = await asset.getCode();\n    let parser = new DOMParser();\n    let dom = parser.parseFromString(code, 'application/xml');\n\n    let parts = [];\n    let nonNamespacedHandlers = !dom.documentElement.namespaceURI\n      ? NON_NAMESPACED_HANDLERS[dom.documentElement.nodeName] || {}\n      : {};\n\n    walk(dom, node => {\n      let handler =\n        node.nodeType === node.ELEMENT_NODE\n          ? node.namespaceURI\n            ? HANDLERS[node.namespaceURI]?.[node.localName]\n            : nonNamespacedHandlers[node.nodeName]\n          : node.nodeType === node.PROCESSING_INSTRUCTION_NODE\n          ? processingInstruction[node.target]\n          : undefined;\n\n      if (handler) {\n        handler(node, asset, parts);\n      }\n    });\n\n    code = new XMLSerializer().serializeToString(dom);\n    asset.setCode(code);\n\n    return [asset, ...parts];\n  },\n}): Transformer);\n\nfunction walk(element, visit) {\n  visit(element);\n\n  element = element.firstChild;\n  while (element) {\n    walk(element, visit);\n    element = element.nextSibling;\n  }\n}\n"
  },
  {
    "path": "packages/transformers/xml/src/atom.js",
    "content": "// @flow\nimport type {MutableAsset, TransformerResult} from '@parcel/types';\nimport {XMLSerializer} from '@xmldom/xmldom';\nimport {urlHandler} from './utils';\n\n// Handlers for elements defined by the Atom spec.\n// See https://datatracker.ietf.org/doc/html/rfc4287\n\nexport function link(element: Element, asset: MutableAsset) {\n  let href = element.getAttribute('href');\n  if (href) {\n    href = asset.addURLDependency(href, {\n      needsStableName: true,\n    });\n\n    element.setAttribute('href', href);\n  }\n}\n\nexport const icon = urlHandler;\nexport const logo = urlHandler;\n\nexport function content(\n  element: Element,\n  asset: MutableAsset,\n  parts: Array<TransformerResult>,\n) {\n  let type = element.getAttribute('type');\n  let contents;\n  switch (type) {\n    case 'html':\n      contents = element.textContent;\n      element.textContent = '';\n      break;\n    case 'xhtml': {\n      let fragment = element.ownerDocument.createDocumentFragment();\n      let child;\n      while ((child = element.firstChild)) {\n        element.removeChild(child);\n        fragment.appendChild(child.cloneNode(true));\n      }\n      contents = new XMLSerializer().serializeToString(fragment);\n      break;\n    }\n    default:\n      return;\n  }\n\n  if (contents) {\n    let parcelKey = `${asset.id}:${parts.length}`;\n    let el = element.ownerDocument.createElementNS(\n      'https://parceljs.org',\n      'inline',\n    );\n    el.setAttribute('key', parcelKey);\n    el.setAttribute('type', type);\n    element.appendChild(el);\n\n    asset.addDependency({\n      specifier: parcelKey,\n      specifierType: 'esm',\n      bundleBehavior: 'inline',\n    });\n\n    parts.push({\n      type,\n      content: contents,\n      uniqueKey: parcelKey,\n      bundleBehavior: 'inline',\n    });\n  }\n}\n"
  },
  {
    "path": "packages/transformers/xml/src/processing-instruction.js",
    "content": "// @flow\nimport type {MutableAsset} from '@parcel/types';\nimport {DOMParser, XMLSerializer} from '@xmldom/xmldom';\n\n// Flow doesn't define ProcessingInstruction by default.\ntype ProcessingInstruction = CharacterData;\n\nmodule.exports = {\n  'xml-stylesheet': (node: ProcessingInstruction, asset: MutableAsset) => {\n    const pseudo = new DOMParser().parseFromString(\n      `<ψ ${node.data} />`,\n      'application/xml',\n    );\n\n    const input = pseudo.firstChild.getAttribute('href');\n    const output = asset.addURLDependency(input, {priority: 'parallel'});\n    pseudo.firstChild.setAttribute('href', output);\n\n    node.data = new XMLSerializer().serializeToString(pseudo).slice(2, -2);\n  },\n};\n"
  },
  {
    "path": "packages/transformers/xml/src/rss.js",
    "content": "// @flow\nimport type {MutableAsset, TransformerResult} from '@parcel/types';\nimport {urlHandler} from './utils';\n\n// Handlers for elements defined by the RSS spec.\n// See https://validator.w3.org/feed/docs/rss2.html\n\nexport const link = urlHandler;\nexport const url = urlHandler;\nexport const comments = urlHandler;\n\nexport function enclosure(element: Element, asset: MutableAsset) {\n  let url = element.getAttribute('url');\n  if (url) {\n    url = asset.addURLDependency(url, {});\n    element.setAttribute('url', url);\n  }\n}\n\nexport function description(\n  element: Element,\n  asset: MutableAsset,\n  parts: Array<TransformerResult>,\n) {\n  let parcelKey = `${asset.id}:${parts.length}`;\n\n  asset.addDependency({\n    specifier: parcelKey,\n    specifierType: 'esm',\n    bundleBehavior: 'inline',\n  });\n\n  parts.push({\n    type: 'html',\n    content: element.textContent,\n    uniqueKey: parcelKey,\n    bundleBehavior: 'inline',\n  });\n\n  let child;\n  while ((child = element.firstChild)) {\n    element.removeChild(child);\n  }\n\n  let el = element.ownerDocument.createElementNS(\n    'https://parceljs.org',\n    'inline',\n  );\n  el.setAttribute('key', parcelKey);\n  element.appendChild(el);\n}\n"
  },
  {
    "path": "packages/transformers/xml/src/utils.js",
    "content": "// @flow\nimport type {MutableAsset} from '@parcel/types';\n\nexport function urlHandler(element: Element, asset: MutableAsset) {\n  element.textContent = asset.addURLDependency(element.textContent.trim(), {\n    needsStableName: true,\n  });\n}\n"
  },
  {
    "path": "packages/transformers/yaml/package.json",
    "content": "{\n  \"name\": \"@parcel/transformer-yaml\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/YAMLTransformer.js\",\n  \"source\": \"src/YAMLTransformer.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/plugin\": \"2.16.4\",\n    \"js-yaml\": \"^4.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/transformers/yaml/src/YAMLTransformer.js",
    "content": "// @flow\n\nimport {Transformer} from '@parcel/plugin';\nimport yaml from 'js-yaml';\n\nexport default (new Transformer({\n  async transform({asset}) {\n    asset.type = 'js';\n    asset.setCode(\n      `module.exports = ${JSON.stringify(\n        yaml.load(await asset.getCode()),\n        null,\n        2,\n      )};`,\n    );\n    return [asset];\n  },\n}): Transformer);\n"
  },
  {
    "path": "packages/utils/babel-plugin-transform-runtime/package.json",
    "content": "{\n  \"name\": \"@parcel/babel-plugin-transform-runtime\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"dependencies\": {\n    \"@babel/plugin-transform-runtime\": \"^7.22.10\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-preset-env\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/babel-plugin-transform-runtime/src/index.js",
    "content": "const semver = require('semver');\nconst pluginTransformRuntime =\n  require('@babel/plugin-transform-runtime').default;\n\nconst COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER = '^2.0.0-alpha.1.1';\n\nmodule.exports = function parcelPluginTransformRuntime(api, opts, dirname) {\n  let name = api.caller(caller => caller && caller.name);\n  let version = api.caller(caller => caller && caller.version);\n\n  if (\n    name === 'parcel' &&\n    typeof version === 'string' &&\n    semver.satisfies(version, COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER)\n  ) {\n    let outputFormat = api.caller(caller => {\n      return caller && caller.outputFormat;\n    });\n    if (typeof outputFormat !== 'string' && outputFormat !== undefined) {\n      throw new Error('Expected outputFormat to be a string');\n    }\n\n    return pluginTransformRuntime(\n      api,\n      {...opts, useESModules: outputFormat === 'esmodule'},\n      dirname,\n    );\n  }\n\n  return pluginTransformRuntime(api, opts, dirname);\n};\n"
  },
  {
    "path": "packages/utils/babel-plugin-transform-runtime/test/babel-plugin-transform-runtime.test.js",
    "content": "// @flow\n\nimport * as babel from '@babel/core';\nimport assert from 'assert';\nimport preset from '@parcel/babel-preset-env';\n\nconst input = `\nexport function Foo(x) {\n  let a = {b: 6, ...x};\n  return a;\n}\n`;\n\nconst plugin = require.resolve('../src/index.js');\n\ndescribe('@parcel/plugin-transform-runtime', () => {\n  it('compiles against targets passed through caller with env = esmodule', () => {\n    let {code: transformed} = babel.transformSync(input, {\n      configFile: false,\n      presets: [preset],\n      plugins: [plugin],\n      caller: {\n        name: 'parcel',\n        version: '2.0.0',\n        targets: JSON.stringify({browsers: ['last 1 Chrome version']}),\n        env: 'esmodule',\n      },\n    });\n\n    assert(transformed.includes('function Foo'));\n    assert(transformed.includes('...x'));\n  });\n\n  it('compiles against targets passed through caller with no env', () => {\n    let {code: transformed} = babel.transformSync(input, {\n      configFile: false,\n      presets: [preset],\n      plugins: [plugin],\n      caller: {\n        name: 'parcel',\n        version: '2.0.0',\n        targets: JSON.stringify({browsers: ['last 1 Chrome version']}),\n      },\n    });\n\n    assert(transformed.includes('function Foo'));\n    assert(transformed.includes('...x'));\n  });\n});\n"
  },
  {
    "path": "packages/utils/babel-preset-env/package.json",
    "content": "{\n  \"name\": \"@parcel/babel-preset-env\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"dependencies\": {\n    \"@babel/preset-env\": \"^7.22.14\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\"\n  },\n  \"peerDependencies\": {\n    \"@babel/core\": \"^7.22.11\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/babel-preset-env/src/index.js",
    "content": "const semver = require('semver');\n\nconst COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER = '^2.0.0-beta.1';\n\nmodule.exports = function parcelBabelPresetEnv(api, opts) {\n  let name = api.caller(caller => caller && caller.name);\n  let version = api.caller(caller => caller && caller.version);\n\n  if (\n    name === 'parcel' &&\n    typeof version === 'string' &&\n    semver.satisfies(version, COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER)\n  ) {\n    let targets = api.caller(caller => caller && caller.targets);\n    if (typeof targets !== 'string') {\n      throw new Error('Expected targets to be a string');\n    }\n\n    return {\n      presets: [\n        [\n          '@babel/preset-env',\n          {\n            modules: false,\n            ignoreBrowserslistConfig: true,\n            targets: JSON.parse(targets),\n            useBuiltIns: 'entry',\n            corejs: 3,\n            shippedProposals: true,\n            ...opts,\n          },\n        ],\n      ],\n    };\n  }\n\n  return {\n    presets: [\n      [\n        '@babel/preset-env',\n        {\n          shippedProposals: true,\n          ...opts,\n        },\n      ],\n    ],\n  };\n};\n"
  },
  {
    "path": "packages/utils/babel-preset-env/test/preset-env.test.js",
    "content": "// @flow\n\nimport * as babel from '@babel/core';\nimport assert from 'assert';\n\nconst input = `\nexport default class Foo {\n  constructor(x) {\n    this.x = x;\n  }\n\n  load() {\n    import('./bar');\n  }\n\n  square() {\n    return this.x ** 2;\n  }\n}\n`;\n\nconst preset = require.resolve('../src');\n\ndescribe('@parcel/babel-preset-env', () => {\n  it('compiles against targets passed through caller when the caller is parcel 2.x', () => {\n    let {code: transformed} = babel.transformSync(input, {\n      configFile: false,\n      presets: [preset],\n      caller: {\n        name: 'parcel',\n        version: '2.0.0',\n        targets: JSON.stringify({\n          browsers: ['last 1 Chrome version'],\n        }),\n      },\n    });\n\n    assert(transformed.includes('class Foo'));\n    assert(transformed.includes('this.x ** 2'));\n    assert(transformed.includes('export default'));\n  });\n\n  it('does not compile against targets passed through caller when the caller is not parcel', () => {\n    let {code: transformed} = babel.transformSync(input, {\n      configFile: false,\n      presets: [preset],\n      caller: {\n        name: 'foo',\n        version: '2.0.0',\n        targets: JSON.stringify({\n          browsers: ['last 1 Chrome version'],\n        }),\n      },\n    });\n\n    assert(!transformed.includes('class Foo'));\n    assert(!transformed.includes('this.x ** 2'));\n    assert(!transformed.includes('export default'));\n  });\n\n  it('does not compile against targets passed through caller when the caller is not present', () => {\n    let {code: transformed} = babel.transformSync(input, {\n      configFile: false,\n      presets: [preset],\n    });\n\n    assert(!transformed.includes('class Foo'));\n    assert(!transformed.includes('this.x ** 2'));\n    assert(!transformed.includes('export default'));\n  });\n});\n"
  },
  {
    "path": "packages/utils/create-parcel/package.json",
    "content": "{\n  \"name\": \"create-parcel\",\n  \"version\": \"2.16.4\",\n  \"bin\": \"lib/create-parcel.js\",\n  \"main\": \"src/create-parcel.js\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\",\n    \"directory\": \"packages/utils/create-parcel\"\n  },\n  \"source\": \"src/create-parcel.js\",\n  \"files\": [\n    \"templates\",\n    \"lib\"\n  ],\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/src/create-parcel.js",
    "content": "#!/usr/bin/env node\n\n// @flow\n/* eslint-disable no-console */\n\n// $FlowFixMe\nimport fs from 'fs/promises';\nimport {readdirSync} from 'fs';\nimport path from 'path';\nimport {spawn as _spawn} from 'child_process';\n// $FlowFixMe\nimport {parseArgs, styleText} from 'util';\n\nconst supportsEmoji = isUnicodeSupported();\n\n// Fallback symbols for Windows from https://en.wikipedia.org/wiki/Code_page_437\nconst success: string = supportsEmoji ? '✨' : '√';\nconst error: string = supportsEmoji ? '🚨' : '×';\n\nconst {positionals} = parseArgs({\n  allowPositionals: true,\n  options: {},\n});\n\nlet template = positionals[0];\nif (!template) {\n  let packageManager = getCurrentPackageManager()?.name;\n  console.error(\n    `Usage: ${packageManager ?? 'npm'} create <template> [directory]\\n`,\n  );\n  printAvailableTemplates();\n  console.log('');\n  process.exit(1);\n}\n\nlet name = positionals[1];\nif (!name) {\n  name = '.';\n}\n\ninstall(template, name).then(\n  () => {\n    process.exit(0);\n  },\n  err => {\n    console.error(err);\n    process.exit(1);\n  },\n);\n\nasync function install(template: string, name: string) {\n  let templateDir = path.join(__dirname, '..', 'templates', template);\n  try {\n    await fs.stat(templateDir);\n  } catch {\n    console.error(\n      style(['red', 'bold'], `${error} Unknown template ${template}.\\n`),\n    );\n    printAvailableTemplates();\n    console.log('');\n    process.exit(1);\n    return;\n  }\n\n  if (name === '.') {\n    if ((await fs.readdir(name)).length !== 0) {\n      console.error(style(['red', 'bold'], `${error} Directory is not empty.`));\n      process.exit(1);\n      return;\n    }\n  } else {\n    try {\n      await fs.stat(name);\n      console.error(style(['red', 'bold'], `${error} ${name} already exists.`));\n      process.exit(1);\n      return;\n    } catch {\n      // ignore\n    }\n    await fs.mkdir(name, {recursive: true});\n  }\n\n  await spawn('git', ['init'], {\n    stdio: 'inherit',\n    cwd: name,\n  });\n\n  await fs.cp(templateDir, name, {\n    recursive: true,\n  });\n\n  await fs.rename(path.join(name, 'gitignore'), path.join(name, '.gitignore'));\n\n  let packageManager = getCurrentPackageManager()?.name;\n  switch (packageManager) {\n    case 'yarn':\n      await spawn('yarn', [], {cwd: name, stdio: 'inherit'});\n      break;\n    case 'pnpm':\n      await spawn('pnpm', ['install'], {cwd: name, stdio: 'inherit'});\n      break;\n    case 'npm':\n    default:\n      await spawn(\n        'npm',\n        ['install', '--legacy-peer-deps', '--no-audit', '--no-fund'],\n        {cwd: name, stdio: 'inherit'},\n      );\n      break;\n  }\n\n  await spawn('git', ['add', '-A'], {cwd: name});\n  await spawn(\n    'git',\n    ['commit', '--quiet', '-a', '-m', 'Initial commit from create-parcel'],\n    {\n      stdio: 'inherit',\n      cwd: name,\n    },\n  );\n\n  console.log('');\n  console.log(style(['green', 'bold'], `${success} Your new app is ready!\\n`));\n  console.log('To get started, run the following commands:');\n  console.log('');\n  if (name !== '.') {\n    console.log(`  cd ${name}`);\n  }\n  console.log(`  ${packageManager ?? 'npm'} start`);\n  console.log('');\n}\n\nfunction spawn(cmd, args, opts) {\n  return new Promise((resolve, reject) => {\n    let p = _spawn(cmd, args, {...opts, shell: process.platform === 'win32'});\n    p.on('close', (code, signal) => {\n      if (code || signal) {\n        reject(new Error(`${cmd} failed with exit code ${code}`));\n      } else {\n        resolve();\n      }\n    });\n  });\n}\n\nfunction getCurrentPackageManager(\n  userAgent: ?string = process.env.npm_config_user_agent,\n): ?{|name: string, version: string|} {\n  if (!userAgent) {\n    return undefined;\n  }\n\n  const pmSpec = userAgent.split(' ')[0];\n  const separatorPos = pmSpec.lastIndexOf('/');\n  const name = pmSpec.substring(0, separatorPos);\n  return {\n    name: name,\n    version: pmSpec.substring(separatorPos + 1),\n  };\n}\n\nfunction printAvailableTemplates() {\n  console.error('Available templates:\\n');\n  for (let dir of readdirSync(path.join(__dirname, '..', 'templates'))) {\n    console.error(`  • ${dir}`);\n  }\n}\n\n// From https://github.com/sindresorhus/is-unicode-supported/blob/8f123916d5c25a87c4f966dcc248b7ca5df2b4ca/index.js\n// This package is ESM-only so it has to be vendored\nfunction isUnicodeSupported() {\n  if (process.platform !== 'win32') {\n    return process.env.TERM !== 'linux'; // Linux console (kernel)\n  }\n\n  return (\n    Boolean(process.env.CI) ||\n    Boolean(process.env.WT_SESSION) || // Windows Terminal\n    process.env.ConEmuTask === '{cmd::Cmder}' || // ConEmu and cmder\n    process.env.TERM_PROGRAM === 'vscode' ||\n    process.env.TERM === 'xterm-256color' ||\n    process.env.TERM === 'alacritty'\n  );\n}\n\nfunction style(format, text) {\n  if (styleText) {\n    return styleText(format, text);\n  } else {\n    return text;\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-client/gitignore",
    "content": ".parcel-cache/\ndist/\nnode_modules/\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-client/package.json",
    "content": "{\n  \"name\": \"parcel-react-client-starter\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"source\": \"src/index.html\",\n  \"scripts\": {\n    \"start\": \"parcel\",\n    \"build\": \"parcel build\"\n  },\n  \"dependencies\": {\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^19.0.0\",\n    \"@types/react-dom\": \"^19.0.0\",\n    \"parcel\": \"^2.14.0\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-client/src/App.css",
    "content": "html {\n  color-scheme: light dark;\n  font-family: system-ui;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-client/src/App.tsx",
    "content": "import './App.css';\n\nexport function App() {\n  return (\n    <>\n      <h1>Parcel React App</h1>\n      <p>Edit <code>src/App.tsx</code> to get started!</p>\n    </>\n  );\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-client/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\"/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Parcel React App</title>\n  </head>\n  <body>\n    <div id=\"app\"></div>\n    <script type=\"module\" src=\"index.tsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-client/src/index.tsx",
    "content": "import { createRoot } from 'react-dom/client';\nimport { StrictMode } from 'react';\nimport { App } from './App';\n\nlet container = document.getElementById(\"app\")!;\nlet root = createRoot(container)\nroot.render(\n  <StrictMode>\n    <App />\n  </StrictMode>\n);\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-client/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    /* Visit https://aka.ms/tsconfig to read more about this file */\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"jsx\": \"react-jsx\",\n    \"useDefineForClassFields\": true,\n\n    /* Modules */\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n\n    /* Emit */\n    \"noEmit\": true,\n\n    /* Interop Constraints */\n    \"isolatedModules\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"allowImportingTsExtensions\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n\n    /* Type Checking */\n    \"strict\": true,\n\n    /* Completeness */\n    \"skipLibCheck\": true\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-server/gitignore",
    "content": ".parcel-cache/\ndist/\nnode_modules/\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-server/package.json",
    "content": "{\n  \"name\": \"parcel-react-server-starter\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"server\": \"dist/server.js\",\n  \"targets\": {\n    \"server\": {\n      \"source\": \"src/server.tsx\",\n      \"context\": \"react-server\",\n      \"includeNodeModules\": {\n        \"express\": false\n      }\n    }\n  },\n  \"scripts\": {\n    \"start\": \"parcel\",\n    \"build\": \"parcel build\"\n  },\n  \"dependencies\": {\n    \"@parcel/rsc\": \"^2.14.3\",\n    \"express\": \"^4.21.2\",\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  },\n  \"devDependencies\": {\n    \"@types/express\": \"^4\",\n    \"@types/parcel-env\": \"^0.0.6\",\n    \"@types/node\": \"^22.10.5\",\n    \"@types/react\": \"^19.0.0\",\n    \"@types/react-dom\": \"^19.0.0\",\n    \"parcel\": \"^2.14.0\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-server/src/Counter.tsx",
    "content": "\"use client\";\n\nimport { useState } from \"react\";\n\nexport function Counter() {\n  let [count, setCount] = useState(0);\n\n  return (\n    <button onClick={() => setCount(count + 1)}>Count: {count}</button>\n  );\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-server/src/Page.tsx",
    "content": "\"use server-entry\";\n\nimport './page.css';\nimport './client';\nimport { Counter } from './Counter';\nimport { action, name } from './actions';\n\nexport async function Page() {\n  return (\n    <html lang=\"en\">\n      <head>\n        <title>Parcel React Server App</title>\n      </head>\n      <body>\n        <h1>Parcel React Server App</h1>\n        <p>This page is a React Server Component! Edit <code>src/Page.tsx</code> to get started.</p>\n        <p>Here is a client component: <Counter /></p>\n        <hr />\n        <p>This form submits a server action.</p>\n        <form action={action}>\n          <label>Enter your name: <input name=\"name\" defaultValue={name} /></label>\n          <button>Submit</button>\n        </form>\n        {name && <p>Welcome {name}!</p>}\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-server/src/actions.ts",
    "content": "'use server';\n\nexport let name = '';\n\nexport function action(formData: FormData) {\n  name = (formData.get('name') as string) || '';\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-server/src/client.tsx",
    "content": "\"use client-entry\";\n\nimport type {ReactNode} from 'react';\nimport {hydrate, fetchRSC} from '@parcel/rsc/client';\n\nlet updateRoot = hydrate({\n  // Setup a callback to perform server actions.\n  // This sends a POST request to the server, and updates the page with the response.\n  async callServer(id, args) {\n    let {result, root} = await fetchRSC<{root: ReactNode, result: any}>(location.pathname, {\n      method: 'POST',\n      headers: {\n        'rsc-action-id': id,\n      },\n      body: args,\n    });\n    updateRoot(root);\n    return result;\n  },\n  // Intercept HMR window reloads, and do it with RSC instead.\n  onHmrReload() {\n    navigate(location.pathname);\n  },\n})\n\n// A very simple router. When we navigate, we'll fetch a new RSC payload from the server,\n// and in a React transition, stream in the new page. Once complete, we'll pushState to \n// update the URL in the browser.\nasync function navigate(pathname: string, push = false) {\n  let root = await fetchRSC<ReactNode>(pathname);\n  updateRoot(root, () => {\n    if (push) {\n      history.pushState(null, '', pathname);\n    }\n  });\n}\n\n// Intercept link clicks to perform RSC navigation.\ndocument.addEventListener('click', e => {\n  let link = (e.target as Element).closest('a');\n  if (\n    link &&\n    link instanceof HTMLAnchorElement &&\n    link.href &&\n    (!link.target || link.target === '_self') &&\n    link.origin === location.origin &&\n    !link.hasAttribute('download') &&\n    e.button === 0 && // left clicks only\n    !e.metaKey && // open in new tab (mac)\n    !e.ctrlKey && // open in new tab (windows)\n    !e.altKey && // download\n    !e.shiftKey &&\n    !e.defaultPrevented\n  ) {\n    e.preventDefault();\n    navigate(link.pathname, true);\n  }\n});\n\n// When the user clicks the back button, navigate with RSC.\nwindow.addEventListener('popstate', e => {\n  navigate(location.pathname);\n});\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-server/src/page.css",
    "content": "html {\n  color-scheme: light dark;\n  font-family: system-ui;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n}\n\nform {\n  display: flex;\n  flex-direction: column;\n  align-items: start;\n  gap: 8px;\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-server/src/server.tsx",
    "content": "import express from 'express';\nimport {renderRequest, callAction} from '@parcel/rsc/node';\n\n// Page components. These must have \"use server-entry\" so they are treated as code splitting entry points.\nimport {Page} from './Page';\n\nconst app = express();\n\napp.use(express.static('dist'));\n\napp.get('/', async (req, res) => {\n  await renderRequest(req, res, <Page />, {component: Page});\n});\n\napp.post('/', async (req, res) => {\n  let id = req.get('rsc-action-id');\n  let {result} = await callAction(req, id);\n  let root: any = <Page />;\n  if (id) {\n    root = {result, root};\n  }\n  await renderRequest(req, res, root, {component: Page});\n});\n\napp.listen(3000);\nconsole.log('Server listening on port 3000');\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-server/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    /* Visit https://aka.ms/tsconfig to read more about this file */\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"jsx\": \"react-jsx\",\n    \"useDefineForClassFields\": true,\n\n    /* Modules */\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n\n    /* Emit */\n    \"noEmit\": true,\n\n    /* Interop Constraints */\n    \"isolatedModules\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"allowImportingTsExtensions\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n\n    /* Type Checking */\n    \"strict\": true,\n\n    /* Completeness */\n    \"skipLibCheck\": true\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/gitignore",
    "content": ".parcel-cache/\ndist/\nnode_modules/\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/package.json",
    "content": "{\n  \"name\": \"parcel-react-static-starter\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"targets\": {\n    \"react-static\": {\n      \"source\": \"src/pages/*\",\n      \"context\": \"react-server\"\n    }\n  },\n  \"scripts\": {\n    \"start\": \"parcel\",\n    \"build\": \"parcel build\"\n  },\n  \"dependencies\": {\n    \"@parcel/rsc\": \"^2.14.3\",\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^19.0.0\",\n    \"@types/react-dom\": \"^19.0.0\",\n    \"parcel\": \"^2.14.0\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/src/client.tsx",
    "content": "\"use client-entry\";\n\nimport type { ReactNode } from 'react';\nimport {hydrate, fetchRSC} from '@parcel/rsc/client';\n\nlet updateRoot = hydrate({\n  // Intercept HMR window reloads, and do it with RSC instead.\n  onHmrReload() {\n    navigate(location.pathname);\n  }\n});\n\n// A very simple router. When we navigate, we'll fetch a new RSC payload,\n// and in a React transition, stream in the new page. Once complete, we'll\n// pushState to update the URL in the browser.\nasync function navigate(pathname: string, push = false) {\n  let root = await fetchRSC<ReactNode>(pathname.replace(/\\.html$/, '.rsc'));\n  updateRoot(root, () => {\n    if (push) {\n      history.pushState(null, '', pathname);\n    }\n  });\n}\n\n// Intercept link clicks to perform RSC navigation.\ndocument.addEventListener('click', e => {\n  let link = (e.target as Element).closest('a');\n  if (\n    link &&\n    link instanceof HTMLAnchorElement &&\n    link.href &&\n    (!link.target || link.target === '_self') &&\n    link.origin === location.origin &&\n    !link.hasAttribute('download') &&\n    e.button === 0 && // left clicks only\n    !e.metaKey && // open in new tab (mac)\n    !e.ctrlKey && // open in new tab (windows)\n    !e.altKey && // download\n    !e.shiftKey &&\n    !e.defaultPrevented\n  ) {\n    e.preventDefault();\n    navigate(link.pathname, true);\n  }\n});\n\n// When the user clicks the back button, navigate with RSC.\nwindow.addEventListener('popstate', e => {\n  navigate(location.pathname);\n});\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/src/components/Counter.tsx",
    "content": "\"use client\";\n\nimport { useState } from \"react\";\n\nexport function Counter() {\n  let [count, setCount] = useState(0);\n\n  return (\n    <button onClick={() => setCount(count + 1)}>Count: {count}</button>\n  );\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/src/components/MDXLayout.tsx",
    "content": "import type { PageProps } from '@parcel/rsc';\nimport type { ReactNode } from 'react';\nimport { Nav } from '../components/Nav';\nimport '../page.css';\nimport '../client';\n\ninterface LayoutProps extends PageProps {\n  children: ReactNode\n}\n\nexport default function Layout({children, pages, currentPage}: LayoutProps) {\n  return (\n    <html lang=\"en\">\n      <head>\n        <title>{currentPage.tableOfContents?.[0].title}</title>\n      </head>\n      <body>\n        {children}\n        <Nav pages={pages} currentPage={currentPage} />\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/src/components/Nav.css",
    "content": "nav a {\n  color: ButtonText;\n}\n\nnav a[aria-current] {\n  background: ButtonText;\n  color: Canvas;\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/src/components/Nav.tsx",
    "content": "import type { PageProps } from \"@parcel/rsc\";\nimport './Nav.css';\n\nexport function Nav({pages, currentPage}: PageProps) {\n  return (\n    <nav>\n      <h3>Navigation</h3>\n      <p><code>components/Nav.tsx</code> shows how to render a list of pages.</p>\n      <ul>\n        {pages.map(page => (\n          <li key={page.url}>\n            <a href={page.url} aria-current={page.url === currentPage.url ? 'page' : undefined}>\n              {page.name}\n            </a>\n          </li>\n        ))}\n      </ul>\n    </nav>\n  );\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/src/page.css",
    "content": "html {\n  color-scheme: light dark;\n  font-family: system-ui;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n}\n\n\nbody {\n  width: 850px;\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/src/pages/index.tsx",
    "content": "import type { PageProps } from '@parcel/rsc';\nimport { Nav } from '../components/Nav';\nimport { Counter } from '../components/Counter';\nimport '../page.css';\nimport '../client';\n\nexport default function Index({pages, currentPage}: PageProps) {\n  return (\n    <html lang=\"en\">\n      <head>\n        <title>Parcel Static React App</title>\n      </head>\n      <body>\n        <h1>Parcel Static React App</h1>\n        <p>This page is a React Server Component that is statically rendered at build time. Edit <code>pages/index.tsx</code> to get started.</p>\n        <p>Here is a client component: <Counter /></p>\n        <Nav pages={pages} currentPage={currentPage} />\n      </body>\n    </html>\n  );\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/src/pages/mdx.mdx",
    "content": "import Layout from '../components/MDXLayout';\nexport default Layout;\n\nimport {Counter} from '../components/Counter';\n\n# MDX page\n\nThis page is generated from an MDX file.\n\nHere is a client component: <Counter />\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/react-static/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    /* Visit https://aka.ms/tsconfig to read more about this file */\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"jsx\": \"react-jsx\",\n    \"useDefineForClassFields\": true,\n\n    /* Modules */\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n\n    /* Emit */\n    \"noEmit\": true,\n\n    /* Interop Constraints */\n    \"isolatedModules\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"allowImportingTsExtensions\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n\n    /* Type Checking */\n    \"strict\": true,\n\n    /* Completeness */\n    \"skipLibCheck\": true\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/vanilla/gitignore",
    "content": ".parcel-cache/\ndist/\nnode_modules/\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/vanilla/package.json",
    "content": "{\n  \"name\": \"parcel-vanilla-starter\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"source\": \"src/index.html\",\n  \"scripts\": {\n    \"start\": \"parcel\",\n    \"build\": \"parcel build\"\n  },\n  \"dependencies\": {},\n  \"devDependencies\": {\n    \"parcel\": \"^2.14.0\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/vanilla/src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Parcel Vanilla App</title>\n    <link rel=\"stylesheet\" href=\"style.css\">\n  </head>\n  <body>\n    <h1>Parcel Vanilla App</h1>\n    <p>Edit <code>src/index.html</code> to get started!</p>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/utils/create-parcel/templates/vanilla/src/style.css",
    "content": "html {\n  color-scheme: light dark;\n  font-family: system-ui;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n}\n"
  },
  {
    "path": "packages/utils/create-react-app/package.json",
    "content": "{\n  \"name\": \"@parcel/create-react-app\",\n  \"version\": \"2.16.4\",\n  \"bin\": {\n    \"parcel-create-react-app\": \"src/bin.js\"\n  },\n  \"main\": \"src/bin.js\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\",\n    \"directory\": \"packages/utils/create-react-app\"\n  },\n  \"source\": \"src/bin.js\",\n  \"files\": [\n    \"templates\",\n    \"lib\"\n  ],\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"dependencies\": {\n    \"chalk\": \"^4.1.2\",\n    \"command-exists\": \"^1.2.9\",\n    \"commander\": \"^12.1.0\",\n    \"cross-spawn\": \"^7.0.6\",\n    \"ncp\": \"^2.0.0\",\n    \"rimraf\": \"^5.0.10\",\n    \"simple-git\": \"^3.27.0\",\n    \"tempy\": \"^0.2.1\",\n    \"v8-compile-cache\": \"^2.4.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.22.11\",\n    \"@parcel/babel-register\": \"2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/create-react-app/src/bin.js",
    "content": "#!/usr/bin/env node\n\n'use strict';\n\nif (process.env.PARCEL_BUILD_ENV !== 'production') {\n  require('@parcel/babel-register');\n}\n\nrequire('v8-compile-cache');\nrequire('./cli');\n"
  },
  {
    "path": "packages/utils/create-react-app/src/cli.js",
    "content": "// @flow strict-local\n\nimport program from 'commander';\n// flowlint-next-line untyped-import:off\nimport {version} from '../package.json';\n// flowlint-next-line untyped-import:off\nimport simpleGit from 'simple-git';\nimport fs from 'fs';\nimport path from 'path';\nimport _ncp from 'ncp';\nimport {promisify} from 'util';\nimport commandExists from 'command-exists';\n// flowlint-next-line untyped-import:off\nimport spawn from 'cross-spawn';\nimport rimraf from 'rimraf';\nimport tempy from 'tempy';\nimport chalk from 'chalk';\nimport * as emoji from './emoji';\nimport type {ChildProcess} from 'child_process';\n\nconst TEMPLATES_DIR = path.resolve(__dirname, '../templates');\n\nconst ncp = promisify(_ncp);\n// eslint-disable-next-line no-console\nconst log = console.log;\n\nprogram\n  .name('create-react-app')\n  .version(version)\n  .arguments('<path-to-new-app>')\n  .action(command => {\n    run(command).catch(reason => {\n      // eslint-disable-next-line no-console\n      console.error(chalk`${emoji.error} {red ${reason.message}}`);\n      process.exit(1);\n    });\n  })\n  .parse();\n\nasync function run(packagePath: string) {\n  log(\n    chalk`${emoji.progress} {green Creating Parcel app at}`,\n    chalk.bold.underline(packagePath),\n  );\n  if (await fsExists(packagePath)) {\n    throw new Error(`File or directory at ${packagePath} already exists`);\n  }\n\n  let tempPath = tempy.directory();\n  try {\n    await createApp(path.basename(packagePath), tempPath);\n  } catch (e) {\n    await rimraf(tempPath);\n    throw e;\n  }\n\n  await fs.promises.rename(tempPath, packagePath);\n\n  log(\n    chalk`{green ${emoji.success} Successfully created a new Parcel app at {bold.underline ${packagePath}}.}`,\n  );\n  log(\n    chalk`${\n      emoji.info\n    }  {dim Run} {bold cd ${packagePath}} {dim and then} {bold ${\n      usesYarn ? 'yarn' : 'npm run'\n    } start} {dim to start developing with Parcel.}`,\n  );\n}\n\nasync function createApp(packageName: string, tempPath: string) {\n  log(emoji.progress, 'Creating package directory...');\n  const git = simpleGit({baseDir: tempPath});\n  log(emoji.progress, 'Initializing git repository...');\n  await git.init();\n\n  log(emoji.progress, 'Adding templates...');\n  async function writePackageJson() {\n    const packageJson = JSON.parse(\n      await fs.promises.readFile(\n        path.join(TEMPLATES_DIR, 'package.json'),\n        'utf8',\n      ),\n    );\n    await fs.promises.writeFile(\n      path.join(tempPath, 'package.json'),\n      JSON.stringify(\n        {\n          name: packageName,\n          ...packageJson,\n        },\n        null,\n        2,\n      ),\n    );\n  }\n\n  await Promise.all([\n    writePackageJson(),\n    ncp(path.join(TEMPLATES_DIR, 'default'), tempPath),\n  ]);\n\n  log(emoji.progress, 'Installing packages...');\n  await installPackages(['parcel@nightly', 'postcss', '@babel/core'], {\n    cwd: tempPath,\n    isDevDependency: true,\n  });\n  await installPackages(['react', 'react-dom'], {cwd: tempPath});\n\n  log(chalk.green(emoji.progress, 'Creating initial commit...'));\n  await git.add('.');\n  await git.commit('Initial commit created with @parcel/create-react-app');\n}\n\nasync function fsExists(filePath: string): Promise<boolean> {\n  try {\n    return (await fs.promises.stat(filePath)) && true;\n  } catch {\n    return false;\n  }\n}\n\nlet usesYarn;\nasync function installPackages(\n  packageExpressions: Array<string>,\n  opts: {|\n    cwd: string,\n    isDevDependency?: boolean,\n  |},\n): Promise<void> {\n  log(\n    emoji.progress,\n    chalk`{dim Installing}`,\n    chalk.bold(...packageExpressions),\n  );\n\n  if (usesYarn == null) {\n    usesYarn = await commandExists('yarn');\n    if (!usesYarn && !(await commandExists('npm'))) {\n      throw new Error('Neither npm nor yarn found on system');\n    }\n  }\n\n  if (usesYarn) {\n    return promiseFromProcess(\n      spawn(\n        'yarn',\n        [\n          'add',\n          opts.isDevDependency ? '--dev' : null,\n          ...packageExpressions,\n        ].filter(Boolean),\n        {cwd: opts.cwd},\n      ),\n    );\n  }\n\n  return promiseFromProcess(\n    spawn(\n      'npm',\n      [\n        'install',\n        opts.isDevDependency ? '--save-dev' : null,\n        ...packageExpressions,\n      ].filter(Boolean),\n      {cwd: opts.cwd},\n    ),\n  );\n}\n\nexport default function promiseFromProcess(\n  childProcess: ChildProcess,\n): Promise<void> {\n  return new Promise((resolve, reject) => {\n    childProcess.on('error', reject);\n    childProcess.on('close', code => {\n      if (code !== 0) {\n        reject(new Error('Child process failed'));\n        return;\n      }\n\n      resolve();\n    });\n  });\n}\n"
  },
  {
    "path": "packages/utils/create-react-app/src/emoji.js",
    "content": "// @flow strict-local\n\n// From https://github.com/sindresorhus/is-unicode-supported/blob/8f123916d5c25a87c4f966dcc248b7ca5df2b4ca/index.js\n// This package is ESM-only so it has to be vendored\nfunction isUnicodeSupported() {\n  if (process.platform !== 'win32') {\n    return process.env.TERM !== 'linux'; // Linux console (kernel)\n  }\n\n  return (\n    Boolean(process.env.CI) ||\n    Boolean(process.env.WT_SESSION) || // Windows Terminal\n    process.env.ConEmuTask === '{cmd::Cmder}' || // ConEmu and cmder\n    process.env.TERM_PROGRAM === 'vscode' ||\n    process.env.TERM === 'xterm-256color' ||\n    process.env.TERM === 'alacritty'\n  );\n}\n\nconst supportsEmoji = isUnicodeSupported();\n\n// Fallback symbols for Windows from https://en.wikipedia.org/wiki/Code_page_437\nexport const progress: string = supportsEmoji ? '⏳' : '∞';\nexport const success: string = supportsEmoji ? '✨' : '√';\nexport const error: string = supportsEmoji ? '🚨' : '×';\nexport const warning: string = supportsEmoji ? '⚠️' : '‼';\nexport const info: string = supportsEmoji ? 'ℹ️' : 'ℹ';\nexport const hint: string = supportsEmoji ? '💡' : 'ℹ';\n"
  },
  {
    "path": "packages/utils/create-react-app/templates/default/.gitignore",
    "content": ".parcel-cache/\ndist/\nnode_modules/\n"
  },
  {
    "path": "packages/utils/create-react-app/templates/default/src/App.css",
    "content": "body {\n  background-color: #21374b;\n  margin: 0;\n}\n"
  },
  {
    "path": "packages/utils/create-react-app/templates/default/src/App.js",
    "content": "import * as React from 'react';\nimport Parcel from './parcel';\nimport './App.css';\n\nexport default function App() {\n  return <Parcel />;\n}\n"
  },
  {
    "path": "packages/utils/create-react-app/templates/default/src/index.html",
    "content": "<html>\n  <body>\n    <div id=\"react-root\"></div>\n    <script type=\"module\" src=\"index.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/utils/create-react-app/templates/default/src/index.js",
    "content": "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport App from './App';\n\nReactDOM.render(<App />, document.getElementById('react-root'));\n"
  },
  {
    "path": "packages/utils/create-react-app/templates/default/src/parcel/index.css",
    "content": ".parcel-container {\n  height: 100vh;\n  width: 100vw;\n  display: flex;\n}\n\n.parcel-heading {\n  font-family: system-ui;\n  color: #e6daca;\n  margin: auto;\n}\n\n.parcel-logo {\n  margin-bottom: 60px;\n}\n\n.parcel-box {\n  position: relative;\n  height: 474px;\n  width: 600px;\n}\n\n.parcel-box-front {\n  position: absolute;\n  top: 0;\n  left: 0;\n}\n"
  },
  {
    "path": "packages/utils/create-react-app/templates/default/src/parcel/index.js",
    "content": "import * as React from 'react';\nimport logoUrl from 'url:./logo.svg';\nimport frontUrl from 'url:./front.png';\nimport backUrl from 'url:./back.png';\nimport './index.css';\n\nexport default function Parcel() {\n  return (\n    <div className=\"parcel-container\">\n      <div className=\"parcel-heading\">\n        <div>\n          <h1>Welcome to</h1>\n          <img src={logoUrl} className=\"parcel-logo\" alt=\"Parcel logo\" />\n        </div>\n\n        <div className=\"parcel-box\">\n          <img src={backUrl} alt=\"\" height=\"474\" />\n          <div id=\"icons\" />\n          <img\n            src={frontUrl}\n            className=\"parcel-box-front\"\n            alt=\"Parcel box\"\n            height=\"474\"\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n"
  },
  {
    "path": "packages/utils/create-react-app/templates/package.json",
    "content": "{\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"start\": \"parcel src/index.html\",\n    \"build\": \"parcel build src/index.html\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/error-overlay/.eslintrc",
    "content": "{\n  \"extends\": \"@parcel/eslint-config\",\n  \"rules\": {\n    \"react/react-in-jsx-scope\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/error-overlay/package.json",
    "content": "{\n  \"name\": \"@parcel/error-overlay\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"module\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"devDependencies\": {\n    \"ansi-html-community\": \"0.0.8\",\n    \"preact\": \"^10.26.6\"\n  },\n  \"alias\": {\n    \"preact/jsx-dev-runtime\": \"preact/jsx-runtime\"\n  },\n  \"targets\": {\n    \"module\": {\n      \"includeNodeModules\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/utils/error-overlay/src/components/CloseButton.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport {theme} from '../styles';\n\nconst closeButtonStyle = {\n  color: theme.closeColor,\n  lineHeight: '1rem',\n  fontSize: '1.5rem',\n  padding: '1rem',\n  cursor: 'pointer',\n  position: 'absolute',\n  right: 0,\n  top: 0,\n};\n\ntype CloseButtonPropsType = {|\n  close: () => void,\n|};\n\nfunction CloseButton({close}: CloseButtonPropsType): React$Element<any> {\n  return (\n    <span\n      title=\"Click or press Escape to dismiss.\"\n      onClick={close}\n      style={closeButtonStyle}\n    >\n      ×\n    </span>\n  );\n}\n\nexport default CloseButton;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/components/CodeBlock.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport {theme} from '../styles';\n\nconst _preStyle = {\n  position: 'relative',\n  display: 'block',\n  padding: '0.5em',\n  marginTop: '0.5em',\n  marginBottom: '0.5em',\n  overflowX: 'auto',\n  whiteSpace: 'pre-wrap',\n  borderRadius: '0.25rem',\n};\n\nconst codeStyle = {\n  fontFamily: 'Consolas, Menlo, monospace',\n};\n\ntype CodeBlockPropsType = {|\n  main: boolean,\n  codeHTML: string,\n|};\n\nfunction CodeBlock({main, codeHTML}: CodeBlockPropsType): React$Element<'pre'> {\n  const primaryPreStyle = {\n    ..._preStyle,\n    backgroundColor: theme.primaryPreBackground,\n    color: theme.primaryPreColor,\n  };\n  const secondaryPreStyle = {\n    ..._preStyle,\n    backgroundColor: theme.secondaryPreBackground,\n    color: theme.secondaryPreColor,\n  };\n  const preStyle = main ? primaryPreStyle : secondaryPreStyle;\n  const codeBlock = {__html: codeHTML};\n\n  return (\n    <pre style={preStyle}>\n      <code style={codeStyle} dangerouslySetInnerHTML={codeBlock} />\n    </pre>\n  );\n}\n\nexport default CodeBlock;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/components/Collapsible.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport {useState} from 'preact/hooks';\nimport {theme} from '../styles';\n\nconst _collapsibleStyle = {\n  cursor: 'pointer',\n  border: 'none',\n  display: 'block',\n  width: '100%',\n  textAlign: 'left',\n  fontFamily: 'Consolas, Menlo, monospace',\n  fontSize: '1em',\n  padding: '0px',\n  lineHeight: '1.5',\n};\n\nconst collapsibleCollapsedStyle = {\n  ..._collapsibleStyle,\n  color: theme.color,\n  background: theme.background,\n  marginBottom: '1.5em',\n};\n\nconst collapsibleExpandedStyle = {\n  ..._collapsibleStyle,\n  color: theme.color,\n  background: theme.background,\n  marginBottom: '0.6em',\n};\n\ntype CollapsiblePropsType = {|\n  children: React$Element<any>[],\n|};\n\nfunction Collapsible(props: CollapsiblePropsType): React$Element<'details'> {\n  const [collapsed, setCollapsed] = useState(true);\n\n  const toggleCollapsed = () => {\n    setCollapsed(!collapsed);\n  };\n\n  const count = props.children.length;\n  return (\n    <details open={!collapsed} onToggle={toggleCollapsed}>\n      <summary\n        style={collapsed ? collapsibleCollapsedStyle : collapsibleExpandedStyle}\n      >\n        {(collapsed ? '▶' : '▼') +\n          ` ${count} stack frames were ` +\n          (collapsed ? 'collapsed.' : 'expanded.')}\n      </summary>\n      <div>\n        {props.children}\n        <button onClick={toggleCollapsed} style={collapsibleExpandedStyle}>\n          {`▲ ${count} stack frames were expanded.`}\n        </button>\n      </div>\n    </details>\n  );\n}\n\nexport default Collapsible;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/components/ErrorOverlay.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-env browser */\n/* @flow */\nimport {useEffect} from 'preact/hooks';\nimport {theme} from '../styles';\n\nconst overlayStyle = {\n  position: 'relative',\n  display: 'inline-flex',\n  flexDirection: 'column',\n  height: '100%',\n  width: '1024px',\n  maxWidth: '100%',\n  overflowX: 'hidden',\n  overflowY: 'auto',\n  padding: '0.5rem',\n  boxSizing: 'border-box',\n  textAlign: 'left',\n  fontFamily: 'Consolas, Menlo, monospace',\n  fontSize: '11px',\n  whiteSpace: 'pre-wrap',\n  wordBreak: 'break-word',\n  lineHeight: 1.5,\n  color: theme.color,\n};\n\ntype ErrorOverlayPropsType = {|\n  children: React$Node,\n  shortcutHandler?: (eventKey: string) => void,\n|};\n\nfunction ErrorOverlay(props: ErrorOverlayPropsType): React$Element<'div'> {\n  const {shortcutHandler} = props;\n\n  useEffect(() => {\n    const onKeyDown = (e: KeyboardEvent) => {\n      if (shortcutHandler) {\n        shortcutHandler(e.key);\n      }\n    };\n    window.addEventListener('keydown', onKeyDown);\n    return () => {\n      window.removeEventListener('keydown', onKeyDown);\n    };\n  }, [shortcutHandler]);\n\n  return <div style={overlayStyle}>{props.children}</div>;\n}\n\nexport default ErrorOverlay;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/components/Footer.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport {theme} from '../styles';\n\nconst footerStyle = {\n  fontFamily: 'sans-serif',\n  color: theme.footer,\n  marginTop: '0.5rem',\n  flex: '0 0 auto',\n};\n\ntype FooterPropsType = {|\n  line1: string,\n  line2?: string,\n|};\n\nfunction Footer(props: FooterPropsType): React$Element<'div'> {\n  return (\n    <div style={footerStyle}>\n      {props.line1}\n      <br />\n      {props.line2}\n    </div>\n  );\n}\n\nexport default Footer;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/components/Header.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport {theme} from '../styles';\n\nconst headerStyle = {\n  fontSize: '2em',\n  fontFamily: 'sans-serif',\n  color: theme.headerColor,\n  whiteSpace: 'pre-wrap',\n  // Top bottom margin spaces header\n  // Right margin revents overlap with close button\n  margin: '0 2rem 0.75rem 0',\n  flex: '0 0 auto',\n};\n\ntype HeaderPropType = {|\n  headerText: string,\n|};\n\nfunction Header(props: HeaderPropType): React$Element<'div'> {\n  return <div style={headerStyle}>{props.headerText}</div>;\n}\n\nexport default Header;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/components/HydrationDiff.js",
    "content": "/** @flow */\nimport {theme} from '../styles';\n\nconst diffStyle = {\n  backgroundColor: theme.primaryPreBackground,\n  color: theme.primaryPreColor,\n  padding: '0.5em',\n  overflowX: 'auto',\n  whiteSpace: 'pre-wrap',\n  borderRadius: '0.25rem',\n};\n\nexport default function HydrationDiff({\n  diff,\n}: {|\n  diff: string,\n|}): React$Element<'pre'> {\n  let lines = diff\n    .split('\\n')\n    .flatMap((line, i) => [formatLine(line, i), '\\n'])\n    .slice(0, -1);\n  return <pre style={diffStyle}>{lines}</pre>;\n}\n\nfunction formatLine(line: string, index: number) {\n  if (line.startsWith('+')) {\n    return (\n      <span key={index} style={{color: theme.diffAdded, fontWeight: 'bold'}}>\n        {line}\n      </span>\n    );\n  } else if (line.startsWith('-') || line.startsWith('>')) {\n    return (\n      <span key={index} style={{color: theme.diffRemoved, fontWeight: 'bold'}}>\n        {line}\n      </span>\n    );\n  } else {\n    return line;\n  }\n}\n"
  },
  {
    "path": "packages/utils/error-overlay/src/components/NavigationBar.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport {theme} from '../styles';\n\nconst navigationBarStyle = {\n  marginBottom: '0.5rem',\n};\n\nconst buttonContainerStyle = {\n  marginRight: '1em',\n};\n\nconst _navButtonStyle = {\n  border: 'none',\n  borderRadius: '4px',\n  padding: '3px 6px',\n  cursor: 'pointer',\n};\n\nconst leftButtonStyle = {\n  ..._navButtonStyle,\n  backgroundColor: theme.navBackground,\n  color: theme.navArrow,\n  borderTopRightRadius: '0px',\n  borderBottomRightRadius: '0px',\n  marginRight: '1px',\n};\n\nconst rightButtonStyle = {\n  ..._navButtonStyle,\n  backgroundColor: theme.navBackground,\n  color: theme.navArrow,\n  borderTopLeftRadius: '0px',\n  borderBottomLeftRadius: '0px',\n};\n\ntype Callback = () => void;\n\ntype NavigationBarPropsType = {|\n  currentError: number,\n  totalErrors: number,\n  previous: Callback,\n  next: Callback,\n|};\n\nfunction NavigationBar(props: NavigationBarPropsType): React$Element<'div'> {\n  const {currentError, totalErrors, previous, next} = props;\n  return (\n    <div style={navigationBarStyle}>\n      <span style={buttonContainerStyle}>\n        <button onClick={previous} style={leftButtonStyle}>\n          ←\n        </button>\n        <button onClick={next} style={rightButtonStyle}>\n          →\n        </button>\n      </span>\n      {`${currentError} of ${totalErrors} errors on the page`}\n    </div>\n  );\n}\n\nexport default NavigationBar;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/containers/RuntimeError.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport Header from '../components/Header';\nimport StackTrace from './StackTrace';\n\nimport type {StackFrame} from '../utils/stack-frame';\nimport type {ErrorLocation} from '..';\nimport HydrationDiff from '../components/HydrationDiff';\n\nconst wrapperStyle = {\n  display: 'flex',\n  flexDirection: 'column',\n};\n\nexport type ErrorRecord = {|\n  error: Error,\n  unhandledRejection: boolean,\n  contextSize: number,\n  stackFrames: StackFrame[],\n|};\n\ntype Props = {|\n  errorRecord: ErrorRecord,\n  editorHandler?: ?(errorLoc: ErrorLocation) => void,\n|};\n\nfunction RuntimeError({\n  errorRecord,\n  editorHandler,\n}: Props): React$Element<'div'> {\n  const {error, unhandledRejection, contextSize, stackFrames} = errorRecord;\n  const errorName = unhandledRejection\n    ? 'Unhandled Rejection (' + error.name + ')'\n    : error.name;\n\n  // Make header prettier\n  const message = error.message;\n  let headerText =\n    message.match(/^\\w*:/) || !errorName ? message : errorName + ': ' + message;\n\n  headerText = headerText\n    // TODO: maybe remove this prefix from fbjs?\n    // It's just scaring people\n    .replace(/^Invariant Violation:\\s*/, '')\n    // This is not helpful either:\n    .replace(/^Warning:\\s*/, '')\n    // Break the actionable part to the next line.\n    // AFAIK React 16+ should already do this.\n    .replace(' Check the render method', '\\n\\nCheck the render method')\n    .replace(' Check your code at', '\\n\\nCheck your code at');\n\n  let link, diff;\n  if (headerText.includes('https://react.dev/link/hydration-mismatch')) {\n    [headerText, diff] = headerText.split(\n      'https://react.dev/link/hydration-mismatch',\n    );\n    link = 'https://react.dev/link/hydration-mismatch';\n  } else if (headerText.includes('This will cause a hydration error.')) {\n    [headerText, diff] = headerText.split('This will cause a hydration error.');\n    headerText += 'This will cause a hydration error.';\n  }\n\n  let lines = headerText.split('\\n');\n\n  return (\n    <div style={wrapperStyle}>\n      <Header headerText={lines[0]} />\n      <pre>{lines.slice(1).join('\\n').trim()}</pre>\n      {link && (\n        <div>\n          <a href={link} target=\"_blank\" rel=\"noreferrer\">\n            {link}\n          </a>\n        </div>\n      )}\n      {diff && <HydrationDiff diff={diff.trim()} />}\n      <StackTrace\n        stackFrames={stackFrames}\n        errorName={errorName}\n        contextSize={contextSize}\n        editorHandler={editorHandler}\n      />\n    </div>\n  );\n}\n\nexport default RuntimeError;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/containers/RuntimeErrorContainer.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport ErrorOverlay from '../components/ErrorOverlay';\nimport CloseButton from '../components/CloseButton';\nimport NavigationBar from '../components/NavigationBar';\nimport RuntimeError from './RuntimeError';\nimport Footer from '../components/Footer';\n\nimport type {ErrorRecord} from './RuntimeError';\nimport type {ErrorLocation} from '..';\nimport {useState} from 'preact/hooks';\n\ntype Props = {|\n  errorRecords: ErrorRecord[],\n  close: () => void,\n  editorHandler?: ?(errorLoc: ErrorLocation) => void,\n|};\n\nfunction RuntimeErrorContainer(\n  props: Props,\n): React$Element<typeof ErrorOverlay> {\n  const {errorRecords, close} = props;\n  const totalErrors = errorRecords.length;\n  let [currentIndex, setCurrentIndex] = useState(0);\n\n  let previous = () => {\n    setCurrentIndex(currentIndex > 0 ? currentIndex - 1 : totalErrors - 1);\n  };\n\n  let next = () => {\n    setCurrentIndex(currentIndex < totalErrors - 1 ? currentIndex + 1 : 0);\n  };\n\n  let shortcutHandler = (key: string) => {\n    if (key === 'Escape') {\n      props.close();\n    } else if (key === 'ArrowLeft') {\n      previous();\n    } else if (key === 'ArrowRight') {\n      next();\n    }\n  };\n\n  return (\n    <ErrorOverlay shortcutHandler={shortcutHandler}>\n      <CloseButton close={close} />\n      {totalErrors > 1 && (\n        <NavigationBar\n          currentError={currentIndex + 1}\n          totalErrors={totalErrors}\n          previous={previous}\n          next={next}\n        />\n      )}\n      <RuntimeError\n        errorRecord={errorRecords[currentIndex]}\n        editorHandler={props.editorHandler}\n      />\n      <Footer\n        line1=\"This screen is visible only in development. It will not appear if the app crashes in production.\"\n        line2=\"Open your browser’s developer console to further inspect this error.  Click the 'X' or hit ESC to dismiss this message.\"\n      />\n    </ErrorOverlay>\n  );\n}\n\nexport default RuntimeErrorContainer;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/containers/StackFrame.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport {useState} from 'preact/hooks';\nimport {theme} from '../styles';\nimport CodeBlock from '../components/CodeBlock';\nimport {getPrettyURL} from '../utils/getPrettyURL';\n\nimport type {StackFrame as StackFrameType} from '../utils/stack-frame';\nimport type {ErrorLocation} from '..';\nimport generateAnsiHTML from '../utils/generateAnsiHTML';\n\nconst linkStyle = {\n  fontSize: '0.9em',\n  marginBottom: '0.9em',\n};\n\nconst anchorStyle = {\n  textDecoration: 'none',\n  color: theme.anchorColor,\n  cursor: 'pointer',\n};\n\nconst codeAnchorStyle = {\n  cursor: 'pointer',\n};\n\nconst toggleStyle = {\n  color: theme.toggleColor,\n  cursor: 'pointer',\n  border: 'none',\n  display: 'block',\n  width: '100%',\n  textAlign: 'left',\n  background: theme.toggleBackground,\n  fontFamily: 'Consolas, Menlo, monospace',\n  fontSize: '1em',\n  padding: '0px',\n  lineHeight: '1.5',\n};\n\ntype StackFramePropsType = {|\n  frame: StackFrameType,\n  contextSize: number,\n  critical: boolean,\n  showCode: boolean,\n  editorHandler?: ?(errorLoc: ErrorLocation) => void,\n|};\n\nfunction StackFrame(props: StackFramePropsType): React$Element<'div'> {\n  const {frame, critical, showCode} = props;\n  const {\n    fileName,\n    lineNumber,\n    columnNumber,\n    _scriptCode: scriptLines,\n    _originalFileName: sourceFileName,\n    _originalLineNumber: sourceLineNumber,\n    _originalColumnNumber: sourceColumnNumber,\n    _originalScriptCode: sourceLines,\n  } = frame;\n  const functionName = frame.getFunctionName();\n\n  const [compiled, setCompiled] = useState(!sourceLines);\n\n  const toggleCompiled = () => {\n    setCompiled(!compiled);\n  };\n\n  const getErrorLocation = (): ErrorLocation | null => {\n    const {_originalFileName: fileName, _originalLineNumber: lineNumber} =\n      props.frame;\n    // Unknown file\n    if (!fileName) {\n      return null;\n    }\n    // e.g. \"/path-to-my-app/webpack/bootstrap eaddeb46b67d75e4dfc1\"\n    const isInternalWebpackBootstrapCode = fileName.trim().indexOf(' ') !== -1;\n    if (isInternalWebpackBootstrapCode) {\n      return null;\n    }\n    // Code is in a real file\n    return {fileName, lineNumber: lineNumber || 1};\n  };\n\n  const editorHandler = () => {\n    const errorLoc = getErrorLocation();\n    if (!errorLoc) {\n      return;\n    }\n    props.editorHandler?.(errorLoc);\n  };\n\n  const onKeyDown = (e: SyntheticKeyboardEvent<any>) => {\n    if (e.key === 'Enter') {\n      editorHandler();\n    }\n  };\n\n  const url = getPrettyURL(\n    sourceFileName,\n    sourceLineNumber,\n    sourceColumnNumber,\n    fileName,\n    lineNumber,\n    columnNumber,\n    compiled,\n  );\n\n  let codeBlockProps = null;\n  if (showCode) {\n    if (\n      compiled &&\n      scriptLines &&\n      scriptLines.length !== 0 &&\n      lineNumber != null\n    ) {\n      codeBlockProps = {\n        codeHTML: generateAnsiHTML(scriptLines),\n        main: critical,\n      };\n    } else if (\n      !compiled &&\n      sourceLines &&\n      sourceLines.length !== 0 &&\n      sourceLineNumber != null\n    ) {\n      codeBlockProps = {\n        codeHTML: generateAnsiHTML(sourceLines),\n        main: critical,\n      };\n    }\n  }\n\n  const canOpenInEditor =\n    getErrorLocation() !== null && props.editorHandler !== null;\n  return (\n    <div>\n      <div>{functionName}</div>\n      <div style={linkStyle}>\n        <span\n          role=\"link\"\n          style={canOpenInEditor ? anchorStyle : null}\n          onClick={canOpenInEditor ? editorHandler : null}\n          onKeyDown={canOpenInEditor ? onKeyDown : null}\n          tabIndex={canOpenInEditor ? '0' : null}\n        >\n          {url}\n        </span>\n      </div>\n      {codeBlockProps && (\n        <div style={{marginBottom: '1.5em'}}>\n          <span\n            onClick={canOpenInEditor ? editorHandler : null}\n            style={canOpenInEditor ? codeAnchorStyle : null}\n          >\n            <CodeBlock {...codeBlockProps} />\n          </span>\n          {scriptLines && sourceLines && (\n            <button style={toggleStyle} onClick={toggleCompiled}>\n              {'View ' + (compiled ? 'source' : 'compiled')}\n            </button>\n          )}\n        </div>\n      )}\n    </div>\n  );\n}\n\nexport default StackFrame;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/containers/StackTrace.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport StackFrame from './StackFrame';\nimport Collapsible from '../components/Collapsible';\nimport {isInternalFile} from '../utils/isInternalFile';\nimport {isBultinErrorName} from '../utils/isBultinErrorName';\n\nimport type {StackFrame as StackFrameType} from '../utils/stack-frame';\nimport type {ErrorLocation} from '..';\n\nconst traceStyle = {\n  fontSize: '1em',\n  flex: '0 1 auto',\n  minHeight: '0px',\n  overflow: 'auto',\n};\n\ntype Props = {|\n  stackFrames: StackFrameType[],\n  errorName: string,\n  contextSize: number,\n  editorHandler?: ?(errorLoc: ErrorLocation) => void,\n|};\n\nfunction StackTrace(props: Props): React$Element<'div'> {\n  const {stackFrames, errorName, contextSize, editorHandler} = props;\n  const renderedFrames = [];\n  let hasReachedAppCode = false,\n    currentBundle = [],\n    bundleCount = 0;\n\n  stackFrames.forEach((frame, index) => {\n    const {fileName, _originalFileName: sourceFileName} = frame;\n    const isInternalUrl = isInternalFile(sourceFileName, fileName);\n    const isThrownIntentionally = !isBultinErrorName(errorName);\n    const shouldCollapse =\n      isInternalUrl && (isThrownIntentionally || hasReachedAppCode);\n\n    if (!isInternalUrl) {\n      hasReachedAppCode = true;\n    }\n\n    const frameEle = (\n      <StackFrame\n        key={'frame-' + index}\n        frame={frame}\n        contextSize={contextSize}\n        critical={index === 0}\n        showCode={!shouldCollapse}\n        editorHandler={editorHandler}\n      />\n    );\n    const lastElement = index === stackFrames.length - 1;\n\n    if (shouldCollapse) {\n      currentBundle.push(frameEle);\n    }\n\n    if (!shouldCollapse || lastElement) {\n      if (currentBundle.length === 1) {\n        renderedFrames.push(currentBundle[0]);\n      } else if (currentBundle.length > 1) {\n        bundleCount++;\n        renderedFrames.push(\n          <Collapsible key={'bundle-' + bundleCount}>\n            {currentBundle}\n          </Collapsible>,\n        );\n      }\n      currentBundle = [];\n    }\n\n    if (!shouldCollapse) {\n      renderedFrames.push(frameEle);\n    }\n  });\n\n  return <div style={traceStyle}>{renderedFrames}</div>;\n}\n\nexport default StackTrace;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/effects/stackTraceLimit.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nlet stackTraceRegistered: boolean = false;\n// Default: https://docs.microsoft.com/en-us/scripting/javascript/reference/stacktracelimit-property-error-javascript\nlet restoreStackTraceValue: number = 10;\n\nconst MAX_STACK_LENGTH: number = 50;\n\nfunction registerStackTraceLimit(limit: number = MAX_STACK_LENGTH) {\n  if (stackTraceRegistered) {\n    return;\n  }\n  try {\n    restoreStackTraceValue = Error.stackTraceLimit;\n    Error.stackTraceLimit = limit;\n    stackTraceRegistered = true;\n  } catch (e) {\n    // Not all browsers support this so we don't care if it errors\n  }\n}\n\nfunction unregisterStackTraceLimit() {\n  if (!stackTraceRegistered) {\n    return;\n  }\n  try {\n    Error.stackTraceLimit = restoreStackTraceValue;\n    stackTraceRegistered = false;\n  } catch (e) {\n    // Not all browsers support this so we don't care if it errors\n  }\n}\n\nexport {\n  registerStackTraceLimit as register,\n  unregisterStackTraceLimit as unregister,\n};\n"
  },
  {
    "path": "packages/utils/error-overlay/src/effects/unhandledError.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nlet boundErrorHandler = null;\n\ntype ErrorCallback = (error: Error) => void;\n\nfunction errorHandler(callback: ErrorCallback, e: Event): void {\n  // $FlowFixMe\n  if (!e.error) {\n    return;\n  }\n  // $FlowFixMe\n  const {error} = e;\n  if (error instanceof Error) {\n    callback(error);\n  } else {\n    // A non-error was thrown, we don't have a trace. :(\n    // Look in your browser's devtools for more information\n    callback(new Error(error));\n  }\n}\n\nfunction registerUnhandledError(target: EventTarget, callback: ErrorCallback) {\n  if (boundErrorHandler !== null) {\n    return;\n  }\n  boundErrorHandler = errorHandler.bind(undefined, callback);\n  target.addEventListener('error', boundErrorHandler);\n}\n\nfunction unregisterUnhandledError(target: EventTarget) {\n  if (boundErrorHandler === null) {\n    return;\n  }\n  target.removeEventListener('error', boundErrorHandler);\n  boundErrorHandler = null;\n}\n\nexport {\n  registerUnhandledError as register,\n  unregisterUnhandledError as unregister,\n};\n"
  },
  {
    "path": "packages/utils/error-overlay/src/effects/unhandledRejection.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nlet boundRejectionHandler = null;\n\ntype ErrorCallback = (error: Error) => void;\n\nfunction rejectionHandler(\n  callback: ErrorCallback,\n  e: PromiseRejectionEvent,\n): void {\n  if (e == null || e.reason == null) {\n    return callback(new Error('Unknown'));\n  }\n  let {reason} = e;\n  if (reason instanceof Error) {\n    return callback(reason);\n  }\n  // A non-error was rejected, we don't have a trace :(\n  // Look in your browser's devtools for more information\n  return callback(new Error(reason));\n}\n\nfunction registerUnhandledRejection(\n  target: EventTarget,\n  callback: ErrorCallback,\n) {\n  if (boundRejectionHandler !== null) {\n    return;\n  }\n  boundRejectionHandler = rejectionHandler.bind(undefined, callback);\n  // $FlowFixMe\n  target.addEventListener('unhandledrejection', boundRejectionHandler);\n}\n\nfunction unregisterUnhandledRejection(target: EventTarget) {\n  if (boundRejectionHandler === null) {\n    return;\n  }\n  // $FlowFixMe\n  target.removeEventListener('unhandledrejection', boundRejectionHandler);\n  boundRejectionHandler = null;\n}\n\nexport {\n  registerUnhandledRejection as register,\n  unregisterUnhandledRejection as unregister,\n};\n"
  },
  {
    "path": "packages/utils/error-overlay/src/index.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-env browser */\n/* eslint-disable react/react-in-jsx-scope, no-console */\n/* @flow */\nimport type {ErrorRecord} from './listenToRuntimeErrors';\nimport {listenToRuntimeErrors, crashWithFrames} from './listenToRuntimeErrors';\nimport {render} from 'preact';\nimport RuntimeErrorContainer from './containers/RuntimeErrorContainer';\nimport {overlayStyle} from './styles';\n\ntype RuntimeReportingOptions = {|\n  onError: () => void,\n  filename?: string,\n|};\n\nexport type ErrorLocation = {|\n  fileName: string,\n  lineNumber: number,\n  colNumber?: number,\n|};\n\ntype EditorHandler = (errorLoc: ErrorLocation) => void;\n\nlet iframe: null | HTMLIFrameElement = null;\n\nlet editorHandler: null | EditorHandler = null;\nlet currentRuntimeErrorRecords: Array<ErrorRecord> = [];\nlet stopListeningToRuntimeErrors: null | (() => void) = null;\n\nexport function setEditorHandler(handler: EditorHandler | null) {\n  editorHandler = handler;\n  if (iframe) {\n    update();\n  }\n}\n\nexport function reportRuntimeError(\n  error: Error,\n  options: RuntimeReportingOptions,\n) {\n  crashWithFrames(handleRuntimeError(options))(error, false);\n}\n\nexport function startReportingRuntimeErrors(options: RuntimeReportingOptions) {\n  if (stopListeningToRuntimeErrors !== null) {\n    throw new Error('Already listening');\n  }\n  stopListeningToRuntimeErrors = listenToRuntimeErrors(\n    handleRuntimeError(options),\n  );\n}\n\nconst handleRuntimeError =\n  (options: RuntimeReportingOptions) => (errorRecord: ErrorRecord) => {\n    try {\n      if (typeof options.onError === 'function') {\n        options.onError.call(null);\n      }\n    } finally {\n      if (\n        currentRuntimeErrorRecords.some(\n          ({error}) => error === errorRecord.error,\n        )\n      ) {\n        // Deduplicate identical errors.\n        // This fixes https://github.com/facebook/create-react-app/issues/3011.\n        // eslint-disable-next-line no-unsafe-finally\n        return;\n      }\n      currentRuntimeErrorRecords = currentRuntimeErrorRecords.concat([\n        errorRecord,\n      ]);\n      update();\n    }\n  };\n\nexport function dismissRuntimeErrors() {\n  currentRuntimeErrorRecords = [];\n  update();\n}\n\nexport function stopReportingRuntimeErrors() {\n  if (stopListeningToRuntimeErrors === null) {\n    throw new Error('Not currently listening');\n  }\n  try {\n    stopListeningToRuntimeErrors();\n  } finally {\n    stopListeningToRuntimeErrors = null;\n  }\n}\n\nlet rootNode, shadow;\n\nfunction update() {\n  if (!rootNode) {\n    rootNode = document.createElement('parcel-error-overlay');\n    shadow = rootNode.attachShadow({mode: 'open'});\n    if (rootNode) {\n      document.body?.appendChild(rootNode);\n    }\n  }\n\n  if (currentRuntimeErrorRecords.length > 0 && shadow) {\n    render(\n      <dialog\n        ref={d => (d: any)?.showModal()}\n        style={overlayStyle}\n        onClose={dismissRuntimeErrors}\n      >\n        <ErrorOverlay />\n      </dialog>,\n      shadow,\n    );\n  } else {\n    rootNode?.remove();\n    rootNode = null;\n  }\n}\n\nfunction ErrorOverlay() {\n  if (currentRuntimeErrorRecords.length > 0) {\n    return (\n      <RuntimeErrorContainer\n        errorRecords={currentRuntimeErrorRecords}\n        close={dismissRuntimeErrors}\n        editorHandler={editorHandler}\n      />\n    );\n  }\n  return null;\n}\n\nif (process.env.NODE_ENV === 'production') {\n  console.warn(\n    'react-error-overlay is not meant for use in production. You should ' +\n      'ensure it is not included in your build to reduce bundle size.',\n  );\n}\n"
  },
  {
    "path": "packages/utils/error-overlay/src/listenToRuntimeErrors.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-env browser */\n/** @flow */\nimport {\n  register as registerError,\n  unregister as unregisterError,\n} from './effects/unhandledError';\nimport {\n  register as registerPromise,\n  unregister as unregisterPromise,\n} from './effects/unhandledRejection';\nimport {\n  register as registerStackTraceLimit,\n  unregister as unregisterStackTraceLimit,\n} from './effects/stackTraceLimit';\nimport getStackFrames from './utils/getStackFrames';\nimport type {StackFrame} from './utils/stack-frame';\n\nconst CONTEXT_SIZE: number = 3;\n\nexport type ErrorRecord = {|\n  error: Error,\n  unhandledRejection: boolean,\n  contextSize: number,\n  stackFrames: StackFrame[],\n|};\n\nexport function crashWithFrames(\n  crash: ErrorRecord => void,\n): (Error, boolean) => void {\n  return (error: Error, unhandledRejection = false) => {\n    getStackFrames(error, CONTEXT_SIZE)\n      .then(stackFrames => {\n        if (stackFrames == null) {\n          return;\n        }\n        crash({\n          error,\n          unhandledRejection,\n          contextSize: CONTEXT_SIZE,\n          stackFrames,\n        });\n      })\n      .catch(e => {\n        // eslint-disable-next-line no-console\n        console.log('Could not get the stack frames of error:', e);\n      });\n  };\n}\n\nfunction patchConsole(method: string, onError: (err: Error) => void) {\n  /* eslint-disable no-console */\n  let original = console[method];\n  console[method] = (...args) => {\n    let error = null;\n    if (typeof args[0] === 'string') {\n      let format = args[0].match(/%[oOdisfc]/g);\n      if (format) {\n        let errorIndex = format.findIndex(\n          match => match === '%o' || match === '%O',\n        );\n        if (errorIndex < 0) {\n          errorIndex = format.findIndex(match => match === '%s');\n        }\n        if (errorIndex >= 0) {\n          error = args[errorIndex + 1];\n        } else {\n          error = args[1];\n        }\n\n        if (!(error instanceof Error)) {\n          let index = 1;\n          let message = args[0].replace(/%[oOdisfc]/g, match => {\n            switch (match) {\n              case '%s':\n                return String(args[index++]);\n              case '%f':\n                return parseFloat(args[index++]);\n              case '%d':\n              case '%i':\n                return parseInt(args[index++], 10);\n              case '%o':\n              case '%O':\n                if (args[index] instanceof Error) {\n                  return String(args[index++]);\n                } else {\n                  return JSON.stringify(args[index++]);\n                }\n              case '%c':\n                index++;\n                return '';\n            }\n          });\n\n          error = new Error(message);\n        }\n      } else {\n        error = new Error(args[0]);\n      }\n    } else {\n      error = args.find(arg => arg instanceof Error);\n    }\n\n    if (\n      error &&\n      !error.message.includes('[parcel]') &&\n      typeof window !== 'undefined' &&\n      window.__REACT_DEVTOOLS_GLOBAL_HOOK__\n    ) {\n      // Attempt to append the React component stack\n      // TODO: use React.captureOwnerStack once stable.\n      let hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n      if (hook.renderers instanceof Map) {\n        for (let renderer of hook.renderers.values()) {\n          if (\n            typeof renderer?.currentDispatcherRef?.getCurrentStack ===\n            'function'\n          ) {\n            let stack = renderer.currentDispatcherRef.getCurrentStack();\n            if (stack) {\n              error.stack += stack;\n              break;\n            }\n          }\n        }\n      }\n\n      onError(error);\n    }\n\n    original.apply(console, args);\n  };\n  /* eslint-enable no-console */\n}\n\nexport function listenToRuntimeErrors(crash: ErrorRecord => void): () => void {\n  const crashWithFramesRunTime = crashWithFrames(crash);\n\n  registerError(window, error => crashWithFramesRunTime(error, false));\n  registerPromise(window, error => crashWithFramesRunTime(error, true));\n  registerStackTraceLimit();\n  patchConsole('error', error => crashWithFramesRunTime(error, false));\n\n  return function stopListening() {\n    unregisterStackTraceLimit();\n    unregisterPromise(window);\n    unregisterError(window);\n  };\n}\n"
  },
  {
    "path": "packages/utils/error-overlay/src/styles.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nexport type Theme = {|\n  // Colors for components styles\n  background: string, // Page background\n  color: string, // Base text\n  headerColor: string, // Header text\n  primaryPreBackground: string, // <pre/> Error background\n  primaryPreColor: string, // <pre/> Error text\n  secondaryPreBackground: string, // <pre/> Warning background\n  secondaryPreColor: string, // <pre/> Warning text\n  footer: string, // Footer text\n  anchorColor: string, // Link color\n  toggleBackground: string, // Toggle stack background\n  toggleColor: string, // Toggle stack text\n  closeColor: string, // Close button color\n  navBackground: string, // Navigation arrow background\n  navArrow: string, // Navigation arrow color\n  diffRemoved: string,\n  diffAdded: string,\n  // ANSI colors\n  // base00: string; // Default Background\n  base01: string, // Lighter Background (Used for status bars)\n  // base02: string, // Selection Background\n  base03: string, // Comments, Invisibles, Line Highlighting\n  // base04: string, // Dark Foreground (Used for status bars)\n  base05: string, // Default Foreground, Caret, Delimiters, Operators\n  // base06: string, // Light Foreground (Not often used)\n  // base07: string, // Light Background (Not often used)\n  base08: string, // Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted\n  // base09: string, // Integers, Boolean, Constants, XML Attributes, Markup Link Url\n  // base0A: string, // Classes, Markup Bold, Search Text Background\n  base0B: string, // Strings, Inherited Class, Markup Code, Diff Inserted\n  base0C: string, // Support, Regular Expressions, Escape Characters, Markup Quotes\n  // base0D: string, // Functions, Methods, Attribute IDs, Headings\n  base0E: string, // Keywords, Storage, Selector, Markup Italic, Diff Changed\n  // base0F: string, // Deprecated, Opening/Closing Embedded Language Tags e.g. <?php ?>\n|};\nconst lightTheme: Theme = {\n  // Colors for components styles\n  background: 'white',\n  color: 'black',\n  headerColor: '#ce1126',\n  primaryPreBackground: 'rgba(206, 17, 38, 0.05)',\n  primaryPreColor: 'inherit',\n  secondaryPreBackground: 'rgba(251, 245, 180, 0.3)',\n  secondaryPreColor: 'inherit',\n  footer: '#878e91',\n  anchorColor: '#878e91',\n  toggleBackground: 'transparent',\n  toggleColor: '#878e91',\n  closeColor: '#293238',\n  navBackground: 'rgba(206, 17, 38, 0.05)',\n  navArrow: '#ce1126',\n  diffAdded: 'green',\n  diffRemoved: '#ce1126',\n  // Light color scheme inspired by https://chriskempson.github.io/base16/css/base16-github.css\n  // base00: '#ffffff',\n  base01: '#f5f5f5',\n  // base02: '#c8c8fa',\n  base03: '#6e6e6e',\n  // base04: '#e8e8e8',\n  base05: '#333333',\n  // base06: '#ffffff',\n  // base07: '#ffffff',\n  base08: '#881280',\n  // base09: '#0086b3',\n  // base0A: '#795da3',\n  base0B: '#1155cc',\n  base0C: '#994500',\n  // base0D: '#795da3',\n  base0E: '#c80000',\n  // base0F: '#333333',\n};\n\nconst darkTheme: Theme = {\n  // Colors for components styles\n  background: '#353535',\n  color: 'white',\n  headerColor: '#e83b46',\n  primaryPreBackground: 'rgba(206, 17, 38, 0.1)',\n  primaryPreColor: '#fccfcf',\n  secondaryPreBackground: 'rgba(251, 245, 180, 0.1)',\n  secondaryPreColor: '#fbf5b4',\n  footer: '#878e91',\n  anchorColor: '#878e91',\n  toggleBackground: 'transparent',\n  toggleColor: '#878e91',\n  closeColor: '#ffffff',\n  navBackground: 'rgba(206, 17, 38, 0.2)',\n  navArrow: '#ce1126',\n  diffAdded: '#85e285',\n  diffRemoved: '#ff5459',\n  // Dark color scheme inspired by https://github.com/atom/base16-tomorrow-dark-theme/blob/master/styles/colors.less\n  // base00: '#1d1f21',\n  base01: '#282a2e',\n  // base02: '#373b41',\n  base03: '#969896',\n  // base04: '#b4b7b4',\n  base05: '#c5c8c6',\n  // base06: '#e0e0e0',\n  // base07: '#ffffff',\n  base08: '#cc6666',\n  // base09: '#de935f',\n  // base0A: '#f0c674',\n  base0B: '#b5bd68',\n  base0C: '#8abeb7',\n  // base0D: '#81a2be',\n  base0E: '#b294bb',\n  // base0F: '#a3685a',\n};\n\nexport const theme: Theme = (Object.fromEntries(\n  Object.keys(lightTheme).map(key => [\n    key,\n    `light-dark(${lightTheme[key]}, ${darkTheme[key]})`,\n  ]),\n): any);\n\nconst overlayStyle = {\n  width: '100vw',\n  height: '100vh',\n  maxWidth: 'none',\n  maxHeight: 'none',\n  border: 0,\n  margin: 0,\n  padding: 0,\n  boxSizing: 'border-box',\n  textAlign: 'center',\n  backgroundColor: theme.background,\n  outline: 'none',\n  colorScheme: 'light dark',\n};\n\nexport {overlayStyle, lightTheme, darkTheme};\n"
  },
  {
    "path": "packages/utils/error-overlay/src/utils/generateAnsiHTML.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\n\nimport {theme} from '../styles';\nimport ansiHTML from 'ansi-html-community';\n\n// Map ANSI colors from what babel-code-frame uses to base16-github\n// See: https://github.com/babel/babel/blob/e86f62b304d280d0bab52c38d61842b853848ba6/packages/babel-code-frame/src/index.js#L9-L22\nconst colors = {\n  reset: [theme.base05, 'transparent'],\n  black: theme.base05,\n  red: theme.base08 /* marker, bg-invalid */,\n  green: theme.base0B /* string */,\n  yellow: theme.base08 /* capitalized, jsx_tag, punctuator */,\n  blue: theme.base0C,\n  magenta: theme.base0C /* regex */,\n  cyan: theme.base0E /* keyword */,\n  gray: theme.base03 /* comment, gutter */,\n  lightgrey: theme.base01,\n  darkgrey: theme.base03,\n};\n\n// $FlowFixMe\nansiHTML.setColors(colors);\n// $FlowFixMe\nfor (let tag in ansiHTML.tags.open) {\n  // $FlowFixMe\n  ansiHTML.tags.open[tag] = ansiHTML.tags.open[tag].replace(\n    /#light-dark/g,\n    'light-dark',\n  );\n}\n\nfunction generateAnsiHTML(txt: string): string {\n  return ansiHTML(\n    txt.replace(/[&<>\"']/g, c => {\n      switch (c) {\n        case '&':\n          return '&amp';\n        case '<':\n          return '&lt;';\n        case '>':\n          return '&gt';\n        case '\"':\n          return '&quot;';\n        case \"'\":\n          return '&#39;';\n        default:\n          return c;\n      }\n    }),\n  );\n}\n\nexport default generateAnsiHTML;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/utils/getPrettyURL.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nfunction getPrettyURL(\n  sourceFileName: ?string,\n  sourceLineNumber: ?number,\n  sourceColumnNumber: ?number,\n  fileName: ?string,\n  lineNumber: ?number,\n  columnNumber: ?number,\n  compiled: boolean,\n): string {\n  let prettyURL;\n  if (!compiled && sourceFileName && typeof sourceLineNumber === 'number') {\n    // Remove everything up to the first /src/ or /node_modules/\n    const trimMatch = /^[/|\\\\].*?[/|\\\\]((src|node_modules)[/|\\\\].*)/.exec(\n      sourceFileName,\n    );\n    if (trimMatch && trimMatch[1]) {\n      prettyURL = trimMatch[1];\n    } else {\n      prettyURL = sourceFileName;\n    }\n    prettyURL += ':' + sourceLineNumber;\n    // Note: we intentionally skip 0's because they're produced by cheap webpack maps\n    if (sourceColumnNumber) {\n      prettyURL += ':' + sourceColumnNumber;\n    }\n  } else if (fileName && typeof lineNumber === 'number') {\n    prettyURL = fileName + ':' + lineNumber;\n    // Note: we intentionally skip 0's because they're produced by cheap webpack maps\n    if (columnNumber) {\n      prettyURL += ':' + columnNumber;\n    }\n  } else {\n    prettyURL = 'unknown';\n  }\n  return prettyURL.replace('webpack://', '.');\n}\n\nexport {getPrettyURL};\nexport default getPrettyURL;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/utils/getStackFrames.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport {StackFrame} from './stack-frame';\nimport {parse} from './parser';\n\n/**\n * Enhances a set of <code>StackFrame</code>s with their original positions and code (when available).\n * @param {StackFrame[]} frames A set of <code>StackFrame</code>s which contain (generated) code positions.\n * @param {number} [contextLines=3] The number of lines to provide before and after the line specified in the <code>StackFrame</code>.\n */\nasync function getStackFrames(\n  error: Error,\n  contextLines: number = 3,\n): Promise<StackFrame[] | null> {\n  const frames = parse(error);\n  // $FlowFixMe\n  let res = await fetch(import.meta.devServer + '/__parcel_code_frame', {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n    },\n    body: JSON.stringify({\n      contextLines,\n      frames: frames.map(f => ({\n        fileName: f.fileName,\n        lineNumber: f.lineNumber,\n        columnNumber: f.columnNumber,\n      })),\n    }),\n  });\n\n  let json = await res.json();\n  return json.map(\n    (f, i) =>\n      new StackFrame(\n        frames[i].functionName,\n        f.fileName,\n        f.lineNumber,\n        f.columnNumber,\n        f.compiledLines,\n        frames[i].functionName,\n        f.sourceFileName,\n        f.sourceLineNumber,\n        f.sourceColumnNumber,\n        f.sourceLines,\n      ),\n  );\n}\n\nexport default getStackFrames;\nexport {getStackFrames};\n"
  },
  {
    "path": "packages/utils/error-overlay/src/utils/isBultinErrorName.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nfunction isBultinErrorName(errorName: ?string): boolean {\n  switch (errorName) {\n    case 'EvalError':\n    case 'InternalError':\n    case 'RangeError':\n    case 'ReferenceError':\n    case 'SyntaxError':\n    case 'TypeError':\n    case 'URIError':\n      return true;\n    default:\n      return false;\n  }\n}\n\nexport {isBultinErrorName};\nexport default isBultinErrorName;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/utils/isInternalFile.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nfunction isInternalFile(sourceFileName: ?string, fileName: ?string): boolean {\n  return (\n    sourceFileName == null ||\n    sourceFileName === '' ||\n    sourceFileName.indexOf('~/') !== -1 ||\n    sourceFileName.indexOf('node_modules/') !== -1 ||\n    sourceFileName.indexOf('error-overlay') !== -1 ||\n    sourceFileName.trim().indexOf(' ') !== -1 ||\n    fileName == null ||\n    fileName === ''\n  );\n}\n\nexport {isInternalFile};\n"
  },
  {
    "path": "packages/utils/error-overlay/src/utils/parser.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\nimport StackFrame from './stack-frame';\n\nconst regexExtractLocation = /\\(?(.+?)(?::(\\d+))?(?::(\\d+))?\\)?$/;\n\nfunction extractLocation(token: string): [string, number, number] {\n  return (\n    // $FlowFixMe\n    regexExtractLocation\n      .exec(token)\n      // $FlowFixMe\n      .slice(1)\n      .map(v => {\n        const p = Number(v);\n        if (!isNaN(p)) {\n          return p;\n        }\n        return v;\n      })\n  );\n}\n\nconst regexValidFrame_Chrome = /^\\s*(at|in)\\s.+(:\\d+)/;\nconst regexValidFrame_FireFox =\n  /(^|@)\\S+:\\d+|.+line\\s+\\d+\\s+>\\s+(eval|Function).+/;\n\nfunction parseStack(stack: string[]): StackFrame[] {\n  let frames = stack\n    .filter(\n      e => regexValidFrame_Chrome.test(e) || regexValidFrame_FireFox.test(e),\n    )\n    .map(e => {\n      if (regexValidFrame_FireFox.test(e)) {\n        // Strip eval, we don't care about it\n        let isEval = false;\n        if (/ > (eval|Function)/.test(e)) {\n          e = e.replace(\n            / line (\\d+)(?: > eval line \\d+)* > (eval|Function):\\d+:\\d+/g,\n            ':$1',\n          );\n          isEval = true;\n        }\n        const data = e.split(/[@]/g);\n        const last = data.pop();\n        return new StackFrame(\n          data.join('@') || (isEval ? 'eval' : null),\n          ...extractLocation(last),\n        );\n      } else {\n        // Strip eval, we don't care about it\n        if (e.indexOf('(eval ') !== -1) {\n          e = e.replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n        }\n        if (e.indexOf('(at ') !== -1) {\n          e = e.replace(/\\(at /, '(');\n        }\n        const data = e.trim().split(/\\s+/g).slice(1);\n        const last = data.pop();\n        return new StackFrame(data.join(' ') || null, ...extractLocation(last));\n      }\n    });\n\n  let index = frames.findIndex(frame =>\n    frame.getFunctionName().includes('react-stack-bottom-frame'),\n  );\n  if (index >= 0) {\n    frames = frames.slice(0, index);\n  }\n\n  return frames;\n}\n\n/**\n * Turns an <code>Error</code>, or similar object, into a set of <code>StackFrame</code>s.\n * @alias parse\n */\nfunction parseError(error: Error | string | string[]): StackFrame[] {\n  if (error == null) {\n    throw new Error('You cannot pass a null object.');\n  }\n  if (typeof error === 'string') {\n    return parseStack(error.split('\\n'));\n  }\n  if (Array.isArray(error)) {\n    return parseStack(error);\n  }\n  if (typeof error.stack === 'string') {\n    return parseStack(error.stack.split('\\n'));\n  }\n  throw new Error('The error you provided does not contain a stack trace.');\n}\n\nexport {parseError as parse};\nexport default parseError;\n"
  },
  {
    "path": "packages/utils/error-overlay/src/utils/stack-frame.js",
    "content": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* @flow */\n\n/**\n * A representation of a stack frame.\n */\nclass StackFrame {\n  functionName: string | null;\n  fileName: string | null;\n  lineNumber: number | null;\n  columnNumber: number | null;\n\n  _originalFunctionName: string | null;\n  _originalFileName: string | null;\n  _originalLineNumber: number | null;\n  _originalColumnNumber: number | null;\n\n  _scriptCode: string | null;\n  _originalScriptCode: string | null;\n\n  constructor(\n    functionName: string | null = null,\n    fileName: string | null = null,\n    lineNumber: number | null = null,\n    columnNumber: number | null = null,\n    scriptCode: string | null = null,\n    sourceFunctionName: string | null = null,\n    sourceFileName: string | null = null,\n    sourceLineNumber: number | null = null,\n    sourceColumnNumber: number | null = null,\n    sourceScriptCode: string | null = null,\n  ) {\n    if (functionName && functionName.indexOf('Object.') === 0) {\n      functionName = functionName.slice('Object.'.length);\n    }\n    if (\n      // Chrome has a bug with inferring function.name:\n      // https://github.com/facebook/create-react-app/issues/2097\n      // Let's ignore a meaningless name we get for top-level modules.\n      functionName === 'friendlySyntaxErrorLabel' ||\n      functionName === 'exports.__esModule' ||\n      functionName === '<anonymous>' ||\n      !functionName\n    ) {\n      functionName = null;\n    }\n    this.functionName = functionName;\n\n    this.fileName = fileName;\n    this.lineNumber = lineNumber;\n    this.columnNumber = columnNumber;\n\n    this._originalFunctionName = sourceFunctionName;\n    this._originalFileName = sourceFileName;\n    this._originalLineNumber = sourceLineNumber;\n    this._originalColumnNumber = sourceColumnNumber;\n\n    this._scriptCode = scriptCode;\n    this._originalScriptCode = sourceScriptCode;\n  }\n\n  /**\n   * Returns the name of this function.\n   */\n  getFunctionName(): string {\n    return this.functionName || '(anonymous function)';\n  }\n\n  /**\n   * Returns the source of the frame.\n   * This contains the file name, line number, and column number when available.\n   */\n  getSource(): string {\n    let str = '';\n    if (this.fileName != null) {\n      str += this.fileName + ':';\n    }\n    if (this.lineNumber != null) {\n      str += this.lineNumber + ':';\n    }\n    if (this.columnNumber != null) {\n      str += this.columnNumber + ':';\n    }\n    return str.slice(0, -1);\n  }\n\n  /**\n   * Returns a pretty version of this stack frame.\n   */\n  toString(): string {\n    const functionName = this.getFunctionName();\n    const source = this.getSource();\n    return `${functionName}${source ? ` (${source})` : ``}`;\n  }\n}\n\nexport {StackFrame};\nexport default StackFrame;\n"
  },
  {
    "path": "packages/utils/events/package.json",
    "content": "{\n  \"name\": \"@parcel/events\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/events/src/Disposable.js",
    "content": "// @flow strict-local\n\nimport type {IDisposable} from './types';\n\nimport invariant from 'assert';\nimport {AlreadyDisposedError} from './errors';\n\ntype DisposableLike = IDisposable | (() => mixed);\n\n/*\n * A general-purpose disposable class. It can normalize disposable-like values\n * (such as single functions or IDisposables), as well as hold multiple\n * disposable-like values to be disposed of at once.\n */\nexport default class Disposable implements IDisposable {\n  disposed: boolean = false;\n  #disposables /*: ?Set<DisposableLike> */;\n\n  constructor(...disposables: Array<DisposableLike>) {\n    this.#disposables = new Set(disposables);\n  }\n\n  add(...disposables: Array<DisposableLike>): void {\n    if (this.disposed) {\n      throw new AlreadyDisposedError(\n        'Cannot add new disposables after disposable has been disposed',\n      );\n    }\n\n    invariant(this.#disposables != null);\n    for (let disposable of disposables) {\n      this.#disposables.add(disposable);\n    }\n  }\n\n  async dispose(): Promise<void> {\n    if (this.disposed) {\n      return;\n    }\n\n    this.disposed = true;\n\n    invariant(this.#disposables != null);\n    await Promise.all(\n      [...this.#disposables].map(disposable =>\n        typeof disposable === 'function' ? disposable() : disposable.dispose(),\n      ),\n    );\n\n    this.#disposables = null;\n  }\n}\n"
  },
  {
    "path": "packages/utils/events/src/ValueEmitter.js",
    "content": "// @flow strict-local\n\nimport type {IDisposable} from './types';\n\nimport {AlreadyDisposedError} from './errors';\n\n// Like an EventEmitter, but for only a single \"event\". This provides type-safety\n// for the values emitted. Rather than passing predetermined strings (which can\n// be misspelled), create an instance of ValueEmitter for every logical \"event\"\n// to be dispatched, and type it according to the type of value emitted.\nexport default class ValueEmitter<TValue> implements IDisposable {\n  // An array of listeners. One might think a Set would be better for O(1) removal,\n  // but splicing a JS array gets pretty close, and copying the array (as is done\n  // in emit) is far faster than a Set copy: https://github.com/atom/event-kit/pull/39\n  _listeners: Array<(value: TValue) => mixed> = [];\n  _disposed: boolean = false;\n\n  addListener(listener: (value: TValue) => mixed): IDisposable {\n    if (this._disposed) {\n      throw new AlreadyDisposedError(\n        'Cannot add a listener since this ValueEmitter has been disposed',\n      );\n    }\n\n    this._listeners.push(listener);\n\n    // Close over a reference to this emitter in the disposable below, rather\n    // than referencing `this` directly. This allows us to set it to null after\n    // slicing out the listener.\n    // This prevents anyone holding onto the disposable after disposal from\n    // unintentionally retaining a reference to this emitter.\n    let emitter = this;\n    return {\n      dispose() {\n        if (emitter == null) {\n          return;\n        }\n\n        if (emitter._disposed) {\n          emitter = null;\n          return;\n        }\n\n        let listeners = emitter._listeners;\n        let listenerIndex = listeners.indexOf(listener);\n        if (listenerIndex > -1) {\n          listeners.splice(listenerIndex, 1);\n        }\n\n        emitter = null;\n      },\n    };\n  }\n\n  emit(value: TValue): void {\n    if (this._disposed) {\n      throw new AlreadyDisposedError(\n        'Cannot emit since this ValueEmitter has been disposed',\n      );\n    }\n\n    // Iterate over a copy of listeners. This prevents the following cases:\n    // * When a listener callback can itself register a new listener and be\n    //   emitted as part of this iteration.\n    // * When a listener callback disposes of this emitter mid-emit, preventing\n    //   other listeners from receiving the event.\n    let listeners = this._listeners.slice();\n    for (let i = 0; i < listeners.length; i++) {\n      listeners[i](value);\n    }\n  }\n\n  dispose() {\n    if (this._disposed) {\n      return;\n    }\n\n    this._listeners = [];\n    this._disposed = true;\n  }\n}\n"
  },
  {
    "path": "packages/utils/events/src/errors.js",
    "content": "// @flow strict-local\n\nexport class AlreadyDisposedError extends Error {}\nObject.defineProperty(AlreadyDisposedError.prototype, 'name', {\n  value: 'AlreadyDisposedError',\n});\n"
  },
  {
    "path": "packages/utils/events/src/index.js",
    "content": "// @flow strict-local\n\nexport {default as Disposable} from './Disposable';\nexport {default as ValueEmitter} from './ValueEmitter';\nexport {AlreadyDisposedError} from './errors';\n"
  },
  {
    "path": "packages/utils/events/src/types.js",
    "content": "// @flow strict-local\n\nexport interface IDisposable {\n  /** This can return a Promise, as dispose() of all inner disposables are\n   * awaited in Disposable#dispose()\n   */\n  dispose(): mixed;\n}\n"
  },
  {
    "path": "packages/utils/events/test/Disposable.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport Disposable from '../src/Disposable';\nimport {AlreadyDisposedError} from '../src/errors';\n\ndescribe('Disposable', () => {\n  it('can wrap an IDisposable', () => {\n    let disposed;\n\n    new Disposable({\n      dispose() {\n        disposed = true;\n      },\n    }).dispose();\n    assert.equal(disposed, true);\n  });\n\n  it('can wrap a function to dispose', () => {\n    let disposed;\n    new Disposable(() => {\n      disposed = true;\n    }).dispose();\n    assert.equal(disposed, true);\n  });\n\n  it('can wrap many disposable-likes', () => {\n    let disposed1;\n    let disposed2;\n\n    new Disposable(\n      {\n        dispose() {\n          disposed1 = true;\n        },\n      },\n      () => {\n        disposed2 = true;\n      },\n    ).dispose();\n    assert.equal(disposed1, true);\n    assert.equal(disposed2, true);\n  });\n\n  it('can add disposables after construction', () => {\n    let disposed1;\n    let disposed2;\n    let disposed3;\n    let disposed4;\n\n    let disposable = new Disposable(\n      {\n        dispose() {\n          disposed1 = true;\n        },\n      },\n      () => {\n        disposed2 = true;\n      },\n    );\n\n    disposable.add(\n      () => {\n        disposed3 = true;\n      },\n      {\n        dispose() {\n          disposed4 = true;\n        },\n      },\n    );\n\n    assert.notEqual(disposed1, true);\n    assert.notEqual(disposed2, true);\n    assert.notEqual(disposed3, true);\n    assert.notEqual(disposed4, true);\n\n    disposable.dispose();\n\n    assert.equal(disposed1, true);\n    assert.equal(disposed2, true);\n    assert.equal(disposed3, true);\n    assert.equal(disposed4, true);\n  });\n\n  it(\n    'does not dispose inner disposables more than once,' +\n      ' and does not throw on subsequent disposals',\n    () => {\n      let disposed;\n      let disposable = new Disposable(() => {\n        if (disposed) {\n          // $FlowFixMe\n          assert.fail();\n        }\n        disposed = true;\n      });\n\n      disposable.dispose();\n      disposable.dispose();\n    },\n  );\n\n  it('throws if `add` is called after it has been disposed', () => {\n    let disposable = new Disposable();\n    disposable.dispose();\n    assert.throws(() => {\n      disposable.add(() => {});\n    }, AlreadyDisposedError);\n  });\n\n  it('can be checked for disposal state', () => {\n    let disposable = new Disposable();\n    assert.equal(disposable.disposed, false);\n    disposable.dispose();\n    assert.equal(disposable.disposed, true);\n  });\n});\n"
  },
  {
    "path": "packages/utils/events/test/ValueEmitter.test.js",
    "content": "// @flow strict-local\n\nimport assert from 'assert';\nimport ValueEmitter from '../src/ValueEmitter';\nimport {AlreadyDisposedError} from '../src/errors';\n\ndescribe('ValueEmitter', () => {\n  let emitter: ValueEmitter<number>;\n  let values: Array<number>;\n\n  beforeEach(() => {\n    emitter = new ValueEmitter();\n    values = [];\n  });\n\n  afterEach(() => {\n    emitter.dispose();\n  });\n\n  function numberListener(x: number): void {\n    values.push(x);\n  }\n\n  it('registers new listeners and can dispose of them', () => {\n    let disposable = emitter.addListener(numberListener);\n    assert.deepEqual(emitter._listeners, [numberListener]);\n\n    disposable.dispose();\n    assert.deepEqual(emitter._listeners, []);\n  });\n\n  it('emits values to registered listeners', () => {\n    let disposable = emitter.addListener(numberListener);\n    emitter.emit(42);\n    assert.deepEqual(values, [42]);\n\n    disposable.dispose();\n  });\n\n  it('does not emit to listeners that were just registered', () => {\n    let innerDisposable;\n    let disposable = emitter.addListener(() => {\n      innerDisposable = emitter.addListener(numberListener);\n    });\n\n    emitter.emit(42);\n    assert.deepEqual(values, []);\n\n    emitter.emit(27);\n    assert.deepEqual(values, [27]);\n\n    disposable.dispose();\n    innerDisposable && innerDisposable.dispose();\n  });\n\n  it('finishes emitting even if a listener disposes of the emitter mid-emit', () => {\n    let disposableA = emitter.addListener(() => {\n      emitter.dispose();\n    });\n\n    let disposableB = emitter.addListener(numberListener);\n\n    emitter.emit(42);\n    assert.deepEqual(values, [42]);\n\n    disposableA.dispose();\n    disposableB.dispose();\n  });\n\n  it('clears listeners when disposed', () => {\n    let disposable = emitter.addListener(numberListener);\n    assert.deepEqual(emitter._listeners, [numberListener]);\n\n    emitter.dispose();\n    assert.deepEqual(emitter._listeners, []);\n\n    disposable.dispose();\n  });\n\n  it('throws when adding a listener when already disposed', () => {\n    emitter.dispose();\n    assert.throws(() => {\n      emitter.addListener(numberListener);\n    }, AlreadyDisposedError);\n  });\n\n  it('throws when emitting when already disposed', () => {\n    emitter.dispose();\n    assert.throws(() => {\n      emitter.emit(42);\n    }, AlreadyDisposedError);\n  });\n\n  it('can be disposed multiple times', () => {\n    emitter.dispose();\n    assert.doesNotThrow(() => {\n      emitter.dispose();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/utils/macros/macros.d.ts",
    "content": "export interface MacroContext {\n  /** Adds an asset as a dependency of the JS module that called this macro. */\n  addAsset(asset: MacroAsset): void;\n  /** The source location of the macro call. */\n  loc: SourceLocation;\n  /** Invalidate the macro call whenever the given file changes. */\n  invalidateOnFileChange(filePath: string): void;\n  /** Invalidate the macro call when a file matching the given pattern is created. */\n  invalidateOnFileCreate(options: FileCreateInvalidation): void;\n  /** Invalidate the macro whenever the given environment variable changes. */\n  invalidateOnEnvChange(env: string): void;\n  /** Invalidate the macro whenever Parcel restarts. */\n  invalidateOnStartup(): void;\n  /** Invalidate the macro on every build. */\n  invalidateOnBuild(): void;\n}\n\n/**\n * Source locations are 1-based, meaning lines and columns start at 1\n */\nexport type SourceLocation = {\n  readonly filePath: string;\n\n  /** inclusive */\n  readonly start: {\n    readonly line: number;\n    readonly column: number;\n  };\n\n  /** exclusive */\n  readonly end: {\n    readonly line: number;\n    readonly column: number;\n  };\n};\n\nexport interface MacroAsset {\n  /** The type of the asset (e.g. `'css'`). */\n  type: string;\n  /** The content of the asset. */\n  content: string;\n}\n\nexport type FileCreateInvalidation =\n  | FileInvalidation\n  | GlobInvalidation\n  | FileAboveInvalidation;\n\n/** Invalidate when a file matching a glob is created. */\nexport interface GlobInvalidation {\n  glob: string;\n}\n\n/** Invalidate when a specific file is created. */\nexport interface FileInvalidation {\n  filePath: string;\n}\n\n/** Invalidate when a file of a specific name is created above a certain directory in the hierarchy. */\nexport interface FileAboveInvalidation {\n  fileName: string;\n  aboveFilePath: string;\n}\n"
  },
  {
    "path": "packages/utils/macros/package.json",
    "content": "{\n  \"name\": \"@parcel/macros\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"types\": \"macros.d.ts\",\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/.cargo/config.toml",
    "content": "[target.wasm32-unknown-unknown]\nrustflags = [\"-C\", \"link-arg=--export-table\"]\n"
  },
  {
    "path": "packages/utils/node-resolver-core/.gitignore",
    "content": "!/test/fixture/node_modules\n!/test/fixture/node_modules/.pnpm/*/node_modules\n*.node\n*.wasm\nnative.d.ts\nnative.js\n"
  },
  {
    "path": "packages/utils/node-resolver-core/build.rs",
    "content": "#[cfg(not(target_arch = \"wasm32\"))]\nextern crate napi_build;\n\nfn main() {\n  #[cfg(not(target_arch = \"wasm32\"))]\n  napi_build::setup();\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/package.json",
    "content": "{\n  \"name\": \"@parcel/node-resolver-core\",\n  \"version\": \"3.7.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"scripts\": {\n    \"test\": \"mocha test\"\n  },\n  \"files\": [\n    \"lib\"\n  ],\n  \"dependencies\": {\n    \"@mischnic/json-sourcemap\": \"^0.1.1\",\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/fs\": \"2.16.4\",\n    \"@parcel/rust\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"nullthrows\": \"^1.1.1\",\n    \"semver\": \"^7.7.1\"\n  },\n  \"devDependencies\": {\n    \"assert\": \"^2.1.0\",\n    \"browserify-zlib\": \"^0.2.0\",\n    \"buffer\": \"^5.5.0||^6.0.0\",\n    \"console-browserify\": \"^1.2.0\",\n    \"constants-browserify\": \"^1.0.0\",\n    \"crypto-browserify\": \"^3.12.1\",\n    \"domain-browser\": \"^5.7.0\",\n    \"events\": \"^3.3.0\",\n    \"https-browserify\": \"^1.0.0\",\n    \"os-browserify\": \"^0.3.0\",\n    \"path-browserify\": \"^1.0.1\",\n    \"process\": \"^0.11.10\",\n    \"punycode\": \"^2.3.1\",\n    \"querystring-es3\": \"^0.2.1\",\n    \"stream-browserify\": \"^3.0.0\",\n    \"stream-http\": \"^3.2.0\",\n    \"string_decoder\": \"^1.3.0\",\n    \"timers-browserify\": \"^2.0.12\",\n    \"tty-browserify\": \"^0.0.1\",\n    \"url\": \"^0.11.4\",\n    \"util\": \"^0.12.5\",\n    \"vm-browserify\": \"^1.1.2\"\n  },\n  \"browser\": {\n    \"./src/builtins.js\": \"./src/builtins.browser.js\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/src/Wrapper.js",
    "content": "// @flow\nimport type {\n  FilePath,\n  SpecifierType,\n  SemverRange,\n  Environment,\n  SourceLocation,\n  BuildMode,\n  ResolveResult,\n  PluginLogger,\n} from '@parcel/types';\nimport type {FileSystem} from '@parcel/fs';\nimport type {PackageManager} from '@parcel/package-manager';\nimport type {Diagnostic} from '@parcel/diagnostic';\nimport {NodeFS} from '@parcel/fs';\nimport {init, Resolver} from '@parcel/rust';\nimport builtins, {empty} from './builtins';\nimport path from 'path';\nimport {\n  relativePath,\n  findAlternativeNodeModules,\n  findAlternativeFiles,\n  loadConfig,\n  getModuleParts,\n} from '@parcel/utils';\nimport ThrowableDiagnostic, {\n  convertSourceLocationToHighlight,\n  encodeJSONKeyComponent,\n  errorToDiagnostic,\n  generateJSONCodeHighlights,\n  md,\n} from '@parcel/diagnostic';\nimport semver from 'semver';\nimport {parse} from '@mischnic/json-sourcemap';\nimport _Module from 'module';\n\n// Package.json fields. Must match package_json.rs.\nconst MAIN = 1 << 0;\nconst MODULE = 1 << 1;\nconst SOURCE = 1 << 2;\nconst BROWSER = 1 << 3;\nconst TYPES = 1 << 6;\n\nconst IS_FILE = 1 << 0;\nconst IS_DIR = 1 << 1;\nconst IS_SYMLINK = 1 << 2;\n\ntype Options = {|\n  fs: FileSystem,\n  projectRoot: FilePath,\n  packageManager?: PackageManager,\n  logger?: PluginLogger,\n  shouldAutoInstall?: boolean,\n  mode: BuildMode,\n  mainFields?: Array<string>,\n  extensions?: Array<string>,\n  packageExports?: boolean,\n|};\n\ntype ResolveOptions = {|\n  filename: FilePath,\n  parent: ?FilePath,\n  specifierType: SpecifierType,\n  range?: ?SemverRange,\n  env: Environment,\n  sourcePath?: ?FilePath,\n  loc?: ?SourceLocation,\n  packageConditions?: ?Array<string>,\n|};\n\nexport default class NodeResolver {\n  resolversByEnv: Map<string, any>;\n  options: Options;\n\n  constructor(options: Options) {\n    this.options = options;\n    this.resolversByEnv = new Map();\n  }\n\n  async resolve(options: ResolveOptions): Promise<?ResolveResult> {\n    // Special case\n    if (options.env.isElectron() && options.filename === 'electron') {\n      return {isExcluded: true};\n    }\n\n    let resolver = this.resolversByEnv.get(options.env.id);\n    if (!resolver) {\n      await init?.();\n      resolver = new Resolver(this.options.projectRoot, {\n        fs:\n          this.options.fs instanceof NodeFS &&\n          process.versions.pnp == null &&\n          // For Wasm builds\n          !init\n            ? undefined\n            : {\n                read: path => this.options.fs.readFileSync(path),\n                kind: path => {\n                  let flags = 0;\n                  try {\n                    let stat = this.options.fs.lstatSync(path);\n                    if (stat.isSymbolicLink()) {\n                      flags |= IS_SYMLINK;\n                      stat = this.options.fs.statSync(path);\n                    }\n                    if (stat.isFile()) {\n                      flags |= IS_FILE;\n                    } else if (stat.isDirectory()) {\n                      flags |= IS_DIR;\n                    }\n                  } catch (err) {\n                    // ignore\n                  }\n                  return flags;\n                },\n                readLink: path => this.options.fs.readlinkSync(path),\n              },\n        mode: 1,\n        includeNodeModules: options.env.includeNodeModules,\n        entries: this.options.mainFields\n          ? mainFieldsToEntries(this.options.mainFields)\n          : MAIN | MODULE | SOURCE | (options.env.isBrowser() ? BROWSER : 0),\n        extensions: this.options.extensions,\n        conditions: environmentToExportsConditions(\n          options.env,\n          this.options.mode,\n        ),\n        packageExports:\n          this.options.packageExports ||\n          options.env.context === 'react-server' ||\n          options.env.context === 'react-client',\n        moduleDirResolver:\n          process.versions.pnp != null\n            ? (module, from) => {\n                // $FlowFixMe[prop-missing]\n                let pnp = _Module.findPnpApi(path.dirname(from));\n\n                return pnp.resolveToUnqualified(\n                  // append slash to force loading builtins from npm\n                  module + '/',\n                  from,\n                );\n              }\n            : undefined,\n      });\n      this.resolversByEnv.set(options.env.id, resolver);\n    }\n\n    // Special case for entries. Convert absolute paths to relative from project root.\n    if (options.parent == null) {\n      options.parent = path.join(this.options.projectRoot, 'index');\n      if (path.isAbsolute(options.filename)) {\n        options.filename = relativePath(\n          this.options.projectRoot,\n          options.filename,\n        );\n      }\n    }\n\n    // Async resolver is only supported in non-WASM environments, and does not support JS callbacks (e.g. FS, PnP).\n    let canResolveAsync =\n      !init &&\n      this.options.fs instanceof NodeFS &&\n      process.versions.pnp == null;\n\n    let res = canResolveAsync\n      ? // $FlowFixMe[incompatible-call] - parent is not null here.\n        await resolver.resolveAsync(options)\n      : // $FlowFixMe[incompatible-call] - parent is not null here.\n        resolver.resolve(options);\n\n    // Invalidate whenever the .pnp.js file changes.\n    // TODO: only when we actually resolve a node_modules package?\n    if (\n      process.versions.pnp != null &&\n      options.parent &&\n      res.invalidateOnFileChange\n    ) {\n      // $FlowFixMe[prop-missing]\n      let pnp = _Module.findPnpApi(path.dirname(options.parent));\n      res.invalidateOnFileChange.push(pnp.resolveToUnqualified('pnpapi', null));\n    }\n\n    if (res.error) {\n      let diagnostic = await this.handleError(res.error, options);\n      return {\n        diagnostics: Array.isArray(diagnostic)\n          ? diagnostic\n          : diagnostic\n          ? [diagnostic]\n          : undefined,\n        invalidateOnFileCreate: res.invalidateOnFileCreate,\n        invalidateOnFileChange: res.invalidateOnFileChange,\n      };\n    }\n\n    switch (res.resolution?.type) {\n      case 'Path':\n        return {\n          filePath: res.resolution.value,\n          invalidateOnFileCreate: res.invalidateOnFileCreate,\n          invalidateOnFileChange: res.invalidateOnFileChange,\n          sideEffects: res.sideEffects,\n          query: res.query != null ? new URLSearchParams(res.query) : undefined,\n        };\n      case 'Builtin':\n        return this.resolveBuiltin(res.resolution.value, options);\n      case 'External': {\n        if (\n          options.sourcePath &&\n          options.env.isLibrary &&\n          options.specifierType !== 'url'\n        ) {\n          let diagnostic = await this.checkExcludedDependency(\n            options.sourcePath,\n            options.filename,\n            options,\n          );\n          if (diagnostic) {\n            return {\n              diagnostics: [diagnostic],\n              invalidateOnFileCreate: res.invalidateOnFileCreate,\n              invalidateOnFileChange: res.invalidateOnFileChange,\n            };\n          }\n        }\n\n        return {\n          isExcluded: true,\n          invalidateOnFileCreate: res.invalidateOnFileCreate,\n          invalidateOnFileChange: res.invalidateOnFileChange,\n        };\n      }\n      case 'Empty':\n        return {\n          filePath: empty,\n          invalidateOnFileCreate: res.invalidateOnFileCreate,\n          invalidateOnFileChange: res.invalidateOnFileChange,\n        };\n      case 'Global': {\n        let global = res.resolution.value;\n        return {\n          filePath: path.join(this.options.projectRoot, `${global}.js`),\n          code: `module.exports=${global};`,\n          invalidateOnFileCreate: res.invalidateOnFileCreate,\n          invalidateOnFileChange: res.invalidateOnFileChange,\n        };\n      }\n      default:\n        return null;\n    }\n  }\n\n  async resolveBuiltin(\n    {scheme, module}: {|scheme: string, module: string|},\n    options: ResolveOptions,\n  ): Promise<?ResolveResult> {\n    if (options.env.isNode() || options.env.context === 'react-server') {\n      return {isExcluded: true};\n    }\n\n    // By default, exclude node builtins from libraries unless explicitly opted in.\n    if (\n      options.env.isLibrary &&\n      this.shouldIncludeNodeModule(\n        options.env,\n        scheme ? `${scheme}:${module}` : module,\n      ) !== true\n    ) {\n      return {isExcluded: true};\n    }\n\n    let builtin = scheme === '' || scheme === 'node' ? builtins[module] : null;\n    if (!builtin || builtin.name === empty) {\n      return {\n        filePath: empty,\n      };\n    }\n\n    let resolved = await this.resolve({\n      ...options,\n      filename: builtin.name,\n    });\n\n    // Autoinstall/verify version of builtin polyfills\n    if (builtin.range != null) {\n      // This assumes that there are no polyfill packages that are scoped\n      // Append '/' to force this.packageManager to look up the package in node_modules\n      let packageName = builtin.name.split('/')[0] + '/';\n      let packageManager = this.options.packageManager;\n      if (resolved?.filePath == null) {\n        // Auto install the Node builtin polyfills\n        if (this.options.shouldAutoInstall && packageManager) {\n          this.options.logger?.warn({\n            message: md`Auto installing polyfill for Node builtin module \"${packageName}\"...`,\n            codeFrames: options.loc\n              ? [\n                  {\n                    filePath: options.loc.filePath,\n                    codeHighlights: options.loc\n                      ? [\n                          convertSourceLocationToHighlight(\n                            options.loc,\n                            'used here',\n                          ),\n                        ]\n                      : [],\n                  },\n                ]\n              : [],\n            documentationURL:\n              'https://parceljs.org/features/node-emulation/#polyfilling-%26-excluding-builtin-node-modules',\n          });\n\n          await packageManager.resolve(\n            packageName,\n            this.options.projectRoot + '/index',\n            {\n              saveDev: true,\n              shouldAutoInstall: true,\n              range: builtin.range,\n            },\n          );\n\n          // Need to clear the resolver caches after installing the package\n          this.resolversByEnv.clear();\n\n          // Re-resolve\n          return this.resolve({\n            ...options,\n            filename: builtin.name,\n            parent: this.options.projectRoot + '/index',\n          });\n        } else {\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: md`Node builtin polyfill \"${packageName}\" is not installed, but auto install is disabled.`,\n              codeFrames: options.loc\n                ? [\n                    {\n                      filePath: options.loc.filePath,\n                      codeHighlights: [\n                        convertSourceLocationToHighlight(\n                          options.loc,\n                          'used here',\n                        ),\n                      ],\n                    },\n                  ]\n                : [],\n              documentationURL:\n                'https://parceljs.org/features/node-emulation/#polyfilling-%26-excluding-builtin-node-modules',\n              hints: [\n                md`Install the \"${packageName}\" package with your package manager, and run Parcel again.`,\n              ],\n            },\n          });\n        }\n      } else if (builtin.range != null) {\n        // Assert correct version\n        try {\n          // TODO packageManager can be null for backwards compatibility, but that could cause invalid\n          // resolutions in monorepos\n          await packageManager?.resolve(\n            packageName,\n            this.options.projectRoot + '/index',\n            {\n              saveDev: true,\n              shouldAutoInstall: this.options.shouldAutoInstall,\n              range: builtin.range,\n            },\n          );\n        } catch (e) {\n          this.options.logger?.warn(errorToDiagnostic(e));\n        }\n      }\n    }\n\n    return resolved;\n  }\n\n  shouldIncludeNodeModule(\n    {includeNodeModules}: Environment,\n    name: string,\n  ): ?boolean {\n    if (includeNodeModules === false) {\n      return false;\n    }\n\n    if (Array.isArray(includeNodeModules)) {\n      let [moduleName] = getModuleParts(name);\n      return includeNodeModules.includes(moduleName);\n    }\n\n    if (includeNodeModules && typeof includeNodeModules === 'object') {\n      let [moduleName] = getModuleParts(name);\n      let include = includeNodeModules[moduleName];\n      if (include != null) {\n        return !!include;\n      }\n    }\n  }\n\n  async handleError(\n    error: any,\n    options: ResolveOptions,\n  ): Promise<?(Diagnostic | Array<Diagnostic>)> {\n    switch (error.type) {\n      case 'FileNotFound': {\n        let dir = path.dirname(error.from);\n        let relative = error.relative;\n        if (!relative.startsWith('.')) {\n          relative = './' + relative;\n        }\n\n        let potentialFiles = await findAlternativeFiles(\n          this.options.fs,\n          relative,\n          dir,\n          this.options.projectRoot,\n          true,\n          options.specifierType !== 'url',\n          // extensions.length === 0,\n        );\n\n        return {\n          message: md`Cannot load file '${relative}' in '${relativePath(\n            this.options.projectRoot,\n            dir,\n          )}'.`,\n          hints: potentialFiles.map(r => {\n            return `Did you mean '__${r}__'?`;\n          }),\n        };\n      }\n      case 'ModuleNotFound': {\n        let alternativeModules = await findAlternativeNodeModules(\n          this.options.fs,\n          error.module,\n          options.parent\n            ? path.dirname(options.parent)\n            : this.options.projectRoot,\n        );\n\n        return {\n          message: md`Cannot find module '${error.module}'`,\n          hints: alternativeModules.map(r => {\n            return `Did you mean '__${r}__'?`;\n          }),\n        };\n      }\n      case 'ModuleEntryNotFound': {\n        let dir = path.dirname(error.package_path);\n        let fileSpecifier = relativePath(dir, path.normalize(error.entry_path));\n        let alternatives = await findAlternativeFiles(\n          this.options.fs,\n          fileSpecifier,\n          dir,\n          this.options.projectRoot,\n        );\n\n        let alternative = alternatives[0];\n        let pkgContent = await this.options.fs.readFile(\n          error.package_path,\n          'utf8',\n        );\n        return {\n          message: md`Could not load '${fileSpecifier}' from module '${error.module}' found in package.json#${error.field}`,\n          codeFrames: [\n            {\n              filePath: error.package_path,\n              language: 'json',\n              code: pkgContent,\n              codeHighlights: generateJSONCodeHighlights(pkgContent, [\n                {\n                  key: `/${error.field}`,\n                  type: 'value',\n                  message: md`'${fileSpecifier}' does not exist${\n                    alternative ? `, did you mean '${alternative}'?` : ''\n                  }'`,\n                },\n              ]),\n            },\n          ],\n        };\n      }\n      case 'ModuleSubpathNotFound': {\n        let dir = path.dirname(error.package_path);\n        let relative = relativePath(dir, error.path, false);\n        let pkgContent = await this.options.fs.readFile(\n          error.package_path,\n          'utf8',\n        );\n        let pkg = JSON.parse(pkgContent);\n        let potentialFiles = [];\n        if (!pkg.exports) {\n          potentialFiles = await findAlternativeFiles(\n            this.options.fs,\n            relative,\n            dir,\n            this.options.projectRoot,\n            false,\n          );\n        }\n\n        if (!relative.startsWith('.')) {\n          relative = './' + relative;\n        }\n\n        return {\n          message: md`Cannot load file '${relative}' from module '${error.module}'`,\n          hints: potentialFiles.map(r => {\n            return `Did you mean '__${error.module}/${r}__'?`;\n          }),\n        };\n      }\n      case 'JsonError': {\n        let pkgContent = await this.options.fs.readFile(error.path, 'utf8');\n        return {\n          message: 'Error parsing JSON',\n          codeFrames: [\n            {\n              filePath: error.path,\n              language: 'json',\n              code: pkgContent,\n              // TODO\n              codeHighlights: [\n                {\n                  message: error.message,\n                  start: {\n                    line: error.line,\n                    column: error.column,\n                  },\n                  end: {\n                    line: error.line,\n                    column: error.column,\n                  },\n                },\n              ],\n            },\n          ],\n        };\n      }\n      case 'InvalidSpecifier': {\n        switch (error.kind) {\n          case 'EmptySpecifier':\n            return {\n              message: 'Invalid empty specifier',\n            };\n          case 'InvalidPackageSpecifier':\n            return {\n              message: 'Invalid package specifier',\n            };\n          case 'InvalidFileUrl':\n            return {\n              message: 'Invalid file url',\n            };\n          case 'UrlError':\n            return {\n              message: `Invalid URL: ${error.value}`,\n            };\n          default:\n            throw new Error('Unknown specifier error kind');\n        }\n      }\n      case 'UnknownScheme': {\n        return {\n          message: md`Unknown url scheme or pipeline '${error.scheme}:'`,\n        };\n      }\n      case 'PackageJsonError': {\n        let pkgContent = await this.options.fs.readFile(error.path, 'utf8');\n        // TODO: find alternative exports?\n        switch (error.error) {\n          case 'PackagePathNotExported': {\n            return {\n              message: md`Module '${options.filename}' is not exported from the '${error.module}' package`,\n              codeFrames: [\n                {\n                  filePath: error.path,\n                  language: 'json',\n                  code: pkgContent,\n                  codeHighlights: generateJSONCodeHighlights(pkgContent, [\n                    {\n                      key: `/exports`,\n                      type: 'value',\n                    },\n                  ]),\n                },\n              ],\n            };\n          }\n          case 'ImportNotDefined': {\n            let parsed = parse(pkgContent);\n            return {\n              message: md`Package import '${options.filename}' is not defined in the '${error.module}' package`,\n              codeFrames: [\n                {\n                  filePath: error.path,\n                  language: 'json',\n                  code: pkgContent,\n                  codeHighlights: parsed.pointers['/imports']\n                    ? generateJSONCodeHighlights(parsed, [\n                        {\n                          key: `/imports`,\n                          type: 'value',\n                        },\n                      ])\n                    : [],\n                },\n              ],\n            };\n          }\n          case 'InvalidPackageTarget': {\n            return {\n              message: md`Invalid package target in the '${error.module} package. Targets may not refer to files outside the package.`,\n              codeFrames: [\n                {\n                  filePath: error.path,\n                  language: 'json',\n                  code: pkgContent,\n                  codeHighlights: generateJSONCodeHighlights(pkgContent, [\n                    {\n                      // TODO: track exact location.\n                      key: `/exports`,\n                      type: 'value',\n                    },\n                  ]),\n                },\n              ],\n            };\n          }\n          case 'InvalidSpecifier': {\n            return {\n              message: md`Invalid package import specifier '${options.filename}'.`,\n            };\n          }\n        }\n        break;\n      }\n      case 'PackageJsonNotFound': {\n        return {\n          message: md`Cannot find a package.json above '${relativePath(\n            this.options.projectRoot,\n            options.parent\n              ? path.dirname(options.parent)\n              : this.options.projectRoot,\n          )}'`,\n        };\n      }\n      case 'TsConfigExtendsNotFound': {\n        let tsconfigContent = await this.options.fs.readFile(\n          error.tsconfig,\n          'utf8',\n        );\n        let nested = await this.handleError(error.error, options);\n        return [\n          {\n            message: 'Could not find extended tsconfig',\n            codeFrames: [\n              {\n                filePath: error.tsconfig,\n                language: 'json',\n                code: tsconfigContent,\n                codeHighlights: generateJSONCodeHighlights(tsconfigContent, [\n                  {\n                    key: `/extends`,\n                    type: 'value',\n                  },\n                ]),\n              },\n            ],\n          },\n          ...(Array.isArray(nested) ? nested : nested ? [nested] : []),\n        ];\n      }\n      case 'IOError': {\n        return {message: error.message};\n      }\n    }\n  }\n\n  async checkExcludedDependency(\n    sourceFile: FilePath,\n    name: string,\n    options: ResolveOptions,\n  ): Promise<?Diagnostic> {\n    let [moduleName] = getModuleParts(name);\n    let res = await loadConfig(\n      this.options.fs,\n      sourceFile,\n      ['package.json'],\n      this.options.projectRoot,\n      // By default, loadConfig uses JSON5. Use normal JSON for package.json files\n      // since they don't support comments and JSON.parse is faster.\n      {parser: (...args) => JSON.parse(...args)},\n    );\n    if (!res) {\n      return;\n    }\n\n    let pkg = res.config;\n    let pkgfile = res.files[0].filePath;\n    if (\n      !pkg.dependencies?.[moduleName] &&\n      !pkg.peerDependencies?.[moduleName] &&\n      !pkg.engines?.[moduleName]\n    ) {\n      let pkgContent = await this.options.fs.readFile(pkgfile, 'utf8');\n      return {\n        message: md`External dependency \"${moduleName}\" is not declared in package.json.`,\n        codeFrames: [\n          {\n            filePath: pkgfile,\n            language: 'json',\n            code: pkgContent,\n            codeHighlights: pkg.dependencies\n              ? generateJSONCodeHighlights(pkgContent, [\n                  {\n                    key: `/dependencies`,\n                    type: 'key',\n                  },\n                ])\n              : [\n                  {\n                    start: {\n                      line: 1,\n                      column: 1,\n                    },\n                    end: {\n                      line: 1,\n                      column: 1,\n                    },\n                  },\n                ],\n          },\n        ],\n        hints: [`Add \"${moduleName}\" as a dependency.`],\n      };\n    }\n\n    if (options.range) {\n      let range = options.range;\n      let depRange =\n        pkg.dependencies?.[moduleName] || pkg.peerDependencies?.[moduleName];\n      if (depRange && !semver.intersects(depRange, range)) {\n        let pkgContent = await this.options.fs.readFile(pkgfile, 'utf8');\n        let field = pkg.dependencies?.[moduleName]\n          ? 'dependencies'\n          : 'peerDependencies';\n        return {\n          message: md`External dependency \"${moduleName}\" does not satisfy required semver range \"${range}\".`,\n          codeFrames: [\n            {\n              filePath: pkgfile,\n              language: 'json',\n              code: pkgContent,\n              codeHighlights: generateJSONCodeHighlights(pkgContent, [\n                {\n                  key: `/${field}/${encodeJSONKeyComponent(moduleName)}`,\n                  type: 'value',\n                  message: 'Found this conflicting requirement.',\n                },\n              ]),\n            },\n          ],\n          hints: [\n            `Update the dependency on \"${moduleName}\" to satisfy \"${range}\".`,\n          ],\n        };\n      }\n    }\n  }\n}\n\nfunction environmentToExportsConditions(\n  env: Environment,\n  mode: ?BuildMode,\n): number {\n  // These must match the values in package_json.rs.\n  const NODE = 1 << 3;\n  const BROWSER = 1 << 4;\n  const WORKER = 1 << 5;\n  const WORKLET = 1 << 6;\n  const ELECTRON = 1 << 7;\n  const DEVELOPMENT = 1 << 8;\n  const PRODUCTION = 1 << 9;\n  const REACT_SERVER = 1 << 16;\n  const SOURCE = 1 << 17;\n\n  let conditions = SOURCE;\n  if (env.isBrowser()) {\n    conditions |= BROWSER;\n  }\n\n  if (env.isWorker()) {\n    conditions |= WORKER;\n  }\n\n  if (env.isWorklet()) {\n    conditions |= WORKLET;\n  }\n\n  if (env.isElectron()) {\n    conditions |= ELECTRON;\n  }\n\n  if (env.isNode()) {\n    conditions |= NODE;\n  }\n\n  if (env.context === 'react-server') {\n    conditions |= REACT_SERVER;\n  }\n\n  if (mode === 'production') {\n    conditions |= PRODUCTION;\n  } else if (mode === 'development') {\n    conditions |= DEVELOPMENT;\n  }\n\n  return conditions;\n}\n\nfunction mainFieldsToEntries(mainFields: Array<string>) {\n  let entries = 0;\n  for (let field of mainFields) {\n    switch (field) {\n      case 'main':\n        entries |= MAIN;\n        break;\n      case 'module':\n        entries |= MODULE;\n        break;\n      case 'source':\n        entries |= SOURCE;\n        break;\n      case 'browser':\n        entries |= BROWSER;\n        break;\n      case 'types':\n        entries |= TYPES;\n        break;\n      default:\n        throw new Error(`Unsupported main field \"${field}\"`);\n    }\n  }\n\n  return entries;\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/src/_empty.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/src/builtins.browser.js",
    "content": "// @flow strict-local\nconst builtinModules = [\n  '_http_agent',\n  '_http_client',\n  '_http_common',\n  '_http_incoming',\n  '_http_outgoing',\n  '_http_server',\n  '_stream_duplex',\n  '_stream_passthrough',\n  '_stream_readable',\n  '_stream_transform',\n  '_stream_wrap',\n  '_stream_writable',\n  '_tls_common',\n  '_tls_wrap',\n  'assert',\n  'assert/strict',\n  'async_hooks',\n  'buffer',\n  'child_process',\n  'cluster',\n  'console',\n  'constants',\n  'crypto',\n  'dgram',\n  'diagnostics_channel',\n  'dns',\n  'dns/promises',\n  'domain',\n  'events',\n  'fs',\n  'fs/promises',\n  'http',\n  'http2',\n  'https',\n  'inspector',\n  'module',\n  'net',\n  'os',\n  'path',\n  'path/posix',\n  'path/win32',\n  'perf_hooks',\n  'process',\n  'punycode',\n  'querystring',\n  'readline',\n  'repl',\n  'stream',\n  'stream/consumers',\n  'stream/promises',\n  'stream/web',\n  'string_decoder',\n  'sys',\n  'timers',\n  'timers/promises',\n  'tls',\n  'trace_events',\n  'tty',\n  'url',\n  'util',\n  'util/types',\n  'v8',\n  'vm',\n  'worker_threads',\n  'zlib',\n];\n\nexport const empty: string = '/_empty.js';\n\nlet builtins: {[string]: {|name: string, range: ?string|}, ...} =\n  // $FlowFixMe\n  Object.create(null);\n\n// use definite (current) list of Node builtins\nfor (let key of builtinModules) {\n  builtins[key] = {name: empty, range: null};\n}\n\nexport default builtins;\n"
  },
  {
    "path": "packages/utils/node-resolver-core/src/builtins.js",
    "content": "// @flow strict-local\n// $FlowFixMe this is untyped\nimport {builtinModules} from 'module';\nimport nullthrows from 'nullthrows';\n// flowlint-next-line untyped-import:off\nimport packageJson from '../package.json';\n\nexport const empty: string = require.resolve('./_empty.js');\n\nlet builtins: {[string]: {|name: string, range: ?string|}, ...} =\n  // $FlowFixMe\n  Object.create(null);\n\n// use definite (current) list of Node builtins\nfor (let key of builtinModules) {\n  builtins[key] = {name: empty, range: null};\n}\n\nlet polyfills = {\n  assert: 'assert',\n  buffer: 'buffer',\n  console: 'console-browserify',\n  constants: 'constants-browserify',\n  crypto: 'crypto-browserify',\n  domain: 'domain-browser',\n  events: 'events',\n  http: 'stream-http',\n  https: 'https-browserify',\n  os: 'os-browserify',\n  path: 'path-browserify',\n  process: 'process',\n  punycode: 'punycode',\n  querystring: 'querystring-es3',\n  stream: 'stream-browserify',\n  string_decoder: 'string_decoder',\n  sys: 'util',\n  timers: 'timers-browserify',\n  tty: 'tty-browserify',\n  url: 'url',\n  util: 'util',\n  vm: 'vm-browserify',\n  zlib: 'browserify-zlib',\n};\n\nfor (let k in polyfills) {\n  let polyfill = polyfills[k];\n  builtins[k] = {\n    name: polyfill + (builtinModules.includes(polyfill) ? '/' : ''),\n    range: nullthrows(packageJson.devDependencies[polyfill]),\n  };\n}\n\nexport default builtins;\n"
  },
  {
    "path": "packages/utils/node-resolver-core/src/index.js",
    "content": "// @flow\nexport {default} from './Wrapper';\nexport {Resolver as ResolverBase, init} from '@parcel/rust';\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/bar.html",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/bar.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/env-dep/package.json",
    "content": "{\n  \"engines\": {\n    \"atom\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/foo.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/nested/index.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/nested/test.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/nested/tsconfig.json",
    "content": "{\n  \"extends\": \"..\",\n  \"compilerOptions\": {\n    \"paths\": {\n      \"ts-path\": [\"test.js\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/package.json",
    "content": "{\n  \"name\": \"resolver\",\n  \"private\": true,\n  \"alias\": {\n    \"aliased\": \"foo\",\n    \"aliased-file\": \"./bar.js\",\n    \"something\": \"./nested/test.js\",\n    \"aliasedfolder\": \"./nested\",\n    \"aliasedabsolute\": \"/nested\",\n    \"foo/bar\": \"./bar.js\",\n    \"glob/*/*\": \"./nested/$2\",\n    \"./baz\": \"./bar.js\",\n    \"url\": false\n  },\n  \"imports\": {\n    \"#test\": \"./bar.js\"\n  },\n  \"dependencies\": {\n    \"foo\": \"^0.3.4\"\n  },\n  \"peerDependencies\": {\n    \"bar\": \"*\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/self/bar.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/self/foo.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/self/package.json",
    "content": "{\n  \"name\": \"self\",\n  \"exports\": {\n    \".\": \"./foo.js\",\n    \"./bar\": \"./bar.js\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/self-source/compiled.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/self-source/package.json",
    "content": "{\n  \"name\": \"self-source\",\n  \"exports\": {\n    \"source\": \"./source.js\",\n    \"default\": \"./compiled.js\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/self-source/source.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source/dist.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source/package.json",
    "content": "{\n  \"name\": \"source\",\n  \"main\": \"dist.js\",\n  \"source\": \"source.js\"\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source/source.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source-alias/dist.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source-alias/other.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source-alias/package.json",
    "content": "{\n  \"name\": \"source-alias\",\n  \"source\": {\n    \"./dist\": \"./source\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source-alias/source.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source-alias-glob/package.json",
    "content": "{\n  \"name\": \"source\",\n  \"main\": \"lib/test.js\",\n  \"source\": {\n    \"./lib/*\": \"./src/$1\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source-alias-glob/src/test.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source-exports/dist.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source-exports/package.json",
    "content": "{\n  \"name\": \"source-exports\",\n  \"exports\": \"./dist.js\",\n  \"source\": \"source.js\"\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/packages/source-exports/source.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/priority/foo/index.js",
    "content": "module.exports = 'foo/index.js';\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/priority/foo.js",
    "content": "module.exports = 'foo';\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/ts-extensions/a.cts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/ts-extensions/a.mts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/ts-extensions/a.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/ts-extensions/a.tsx",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/ts-extensions/b.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/ts-extensions/b.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/ts-extensions/c.js.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/ts-extensions/c.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/ts-extensions/index.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/builtins/thing.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/builtins/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/exports/index.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/exports/tsconfig.json",
    "content": "{\n  \"extends\": \"tsconfig-exports\"\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/extends-extension/base-tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"foo\": [\"foo.js\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/extends-extension/foo.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/extends-extension/tsconfig.json",
    "content": "{\n  \"extends\": \"./base-tsconfig\"\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/extends-node-module/bar.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/extends-node-module/tsconfig.json",
    "content": "{\n  \"extends\": \"@scope/tsconfig/tsconfig.json\"\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/extends-not-found/index.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/extends-not-found/tsconfig.json",
    "content": "{\n  \"extends\": \"./not-found\"\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/field/index.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/field/tsconfig.json",
    "content": "{\n  \"extends\": \"tsconfig-field\"\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/index/index.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/index/tsconfig.json",
    "content": "{\n  \"extends\": \"tsconfig-index\"\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/suffixes/a.ios.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/suffixes/a.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/suffixes/b.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/suffixes/c-test.ts",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/suffixes/index.ts",
    "content": "import './a';\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/suffixes/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"moduleSuffixes\": [\".ios\", \"-test\", \"\"]\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/trailing-comma/bar.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/trailing-comma/index.js",
    "content": ""
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig/trailing-comma/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"paths\": {\n      /* some comment */\n      \"foo\": [\"bar.js\"]\n    }\n  }\n  // another comment\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/fixture/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"ts-path\": [\"foo.js\"]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/utils/node-resolver-core/test/resolver.js",
    "content": "// @flow strict-local\nimport NodeResolver from '../src/Wrapper';\nimport path from 'path';\nimport assert from 'assert';\nimport nullthrows from 'nullthrows';\nimport {ncp, overlayFS, outputFS} from '@parcel/test-utils';\nimport {loadConfig as configCache} from '@parcel/utils';\nimport {createEnvironment} from '@parcel/core/src/Environment';\nimport Environment from '@parcel/core/src/public/Environment';\nimport {DEFAULT_OPTIONS} from '@parcel/core/test/test-utils';\n\nconst rootDir = path.join(__dirname, 'fixture');\n\nconst NODE_ENV = new Environment(\n  createEnvironment({\n    context: 'node',\n    includeNodeModules: false,\n  }),\n  DEFAULT_OPTIONS,\n);\n\nconst NODE_INCLUDE_ENV = new Environment(\n  createEnvironment({\n    context: 'node',\n    includeNodeModules: true,\n  }),\n  DEFAULT_OPTIONS,\n);\n\nconst BROWSER_ENV = new Environment(\n  createEnvironment({\n    context: 'browser',\n    includeNodeModules: true,\n  }),\n  DEFAULT_OPTIONS,\n);\n\ndescribe('resolver', function () {\n  let resolver, prodResolver;\n\n  beforeEach(async function () {\n    await overlayFS.mkdirp(rootDir);\n    await ncp(rootDir, rootDir);\n\n    // Create the symlinks here to prevent cross platform and git issues\n    await outputFS.symlink(\n      path.join(rootDir, 'packages/source'),\n      path.join(rootDir, 'node_modules/source'),\n    );\n    await outputFS.symlink(\n      path.join(\n        rootDir,\n        'node_modules/.pnpm/source-pnpm@1.0.0/node_modules/source-pnpm',\n      ),\n      path.join(rootDir, 'node_modules/source-pnpm'),\n    );\n    await outputFS.symlink(\n      path.join(rootDir, 'packages/source-alias'),\n      path.join(rootDir, 'node_modules/source-alias'),\n    );\n    await outputFS.symlink(\n      path.join(rootDir, 'packages/source-alias-glob'),\n      path.join(rootDir, 'node_modules/source-alias-glob'),\n    );\n    await outputFS.symlink(\n      path.join(rootDir, 'packages/source-exports'),\n      path.join(rootDir, 'node_modules/source-exports'),\n    );\n    await outputFS.symlink(\n      path.join(rootDir, 'bar.js'),\n      path.join(rootDir, 'baz.js'),\n    );\n    await outputFS.symlink(\n      path.join(rootDir, 'nested'),\n      path.join(rootDir, 'symlinked-nested'),\n    );\n\n    resolver = new NodeResolver({\n      fs: overlayFS,\n      projectRoot: rootDir,\n      mode: 'development',\n      packageExports: true,\n    });\n\n    prodResolver = new NodeResolver({\n      fs: overlayFS,\n      projectRoot: rootDir,\n      mode: 'production',\n      packageExports: true,\n    });\n\n    configCache.clear();\n  });\n\n  function normalize(res) {\n    return {\n      filePath: res?.filePath,\n      invalidateOnFileCreate:\n        res?.invalidateOnFileCreate?.sort((a, b) => {\n          let ax =\n            a.filePath ??\n            a.glob ??\n            (a.aboveFilePath != null && a.fileName != null\n              ? a.aboveFilePath + a.fileName\n              : '');\n          let bx =\n            b.filePath ??\n            b.glob ??\n            (b.aboveFilePath != null && b.fileName != null\n              ? b.aboveFilePath + b.fileName\n              : '');\n          return ax < bx ? -1 : 1;\n        }) ?? [],\n      invalidateOnFileChange: res?.invalidateOnFileChange?.sort() ?? [],\n      sideEffects: res?.sideEffects ?? true,\n    };\n  }\n\n  function check(resolved, expected) {\n    assert.deepEqual(normalize(resolved), normalize(expected));\n  }\n\n  describe('file paths', function () {\n    it('should resolve a relative path with an extension', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './bar.js',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'bar.js'));\n    });\n\n    it('should resolve a relative path without an extension', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'bar.js'));\n    });\n\n    it('should resolve an absolute path from the root module', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '/bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'nested', 'test.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'bar.js'));\n    });\n\n    it('should resolve an absolute path from a node_modules folder', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '/bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'node_modules', 'foo', 'index.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'bar.js'));\n    });\n\n    it('should resolve a tilde path from the root module', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '~/bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'nested', 'test.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'bar.js'));\n    });\n\n    it('should resolve a tilde path from the root module without a slash', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '~bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'nested', 'test.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'bar.js'));\n    });\n\n    it('should resolve a tilde path from a node_modules folder', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '~/bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'node_modules', 'foo', 'nested', 'baz.js'),\n      });\n      assert.equal(\n        nullthrows(resolved).filePath,\n        path.join(rootDir, 'node_modules', 'foo', 'bar.js'),\n      );\n    });\n\n    it('should resolve an index file in a directory', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './nested',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        nullthrows(resolved).filePath,\n        path.join(rootDir, 'nested', 'index.js'),\n      );\n    });\n\n    it('should not resolve an index file in a directory for URL specifiers', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './nested',\n        specifierType: 'url',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.deepEqual(nullthrows(resolved).diagnostics, [\n        {message: \"Cannot load file './nested' in './'.\", hints: []},\n      ]);\n    });\n\n    it('should resolve a file with a question mark with CommonJS specifiers', async function () {\n      // Windows filenames cannot contain question marks.\n      if (process.platform === 'win32') {\n        return;\n      }\n\n      await overlayFS.writeFile(path.join(rootDir, 'a?b.js'), '');\n\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './a?b.js',\n        specifierType: 'commonjs',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'a?b.js'));\n    });\n\n    it('should not resolve a file with a question mark with ESM specifiers', async function () {\n      // Windows filenames cannot contain question marks.\n      if (process.platform === 'win32') {\n        return;\n      }\n\n      await overlayFS.writeFile(path.join(rootDir, 'a?b.js'), '');\n\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './a?b.js',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.deepEqual(nullthrows(resolved).diagnostics, [\n        {message: \"Cannot load file './a' in './'.\", hints: []},\n      ]);\n    });\n\n    it('should resolve a file with an encoded question mark with ESM specifiers', async function () {\n      // Windows filenames cannot contain question marks.\n      if (process.platform === 'win32') {\n        return;\n      }\n\n      await overlayFS.writeFile(path.join(rootDir, 'a?b.js'), '');\n\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './a%3Fb.js',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'a?b.js'));\n    });\n\n    it('should not support percent encoding in CommonJS specifiers', async function () {\n      // Windows filenames cannot contain question marks.\n      if (process.platform === 'win32') {\n        return;\n      }\n\n      await overlayFS.writeFile(path.join(rootDir, 'a?b.js'), '');\n\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './a%3Fb.js',\n        specifierType: 'commonjs',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.deepEqual(nullthrows(resolved).diagnostics, [\n        {\n          message: \"Cannot load file './a%3Fb.js' in './'.\",\n          hints: [\"Did you mean '__./a?b.js__'?\"],\n        },\n      ]);\n    });\n\n    it('should support query params for ESM specifiers', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './nested?foo=bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        nullthrows(resolved).filePath,\n        path.join(rootDir, 'nested', 'index.js'),\n      );\n      // assert.deepEqual(nullthrows(resolved).query?.toString(), 'foo=bar');\n    });\n\n    it('should not support query params for CommonJS specifiers', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './nested?foo=bar',\n        specifierType: 'commonjs',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.deepEqual(nullthrows(resolved).diagnostics, [\n        {message: \"Cannot load file './nested?foo=bar' in './'.\", hints: []},\n      ]);\n    });\n  });\n\n  describe('builtins', function () {\n    it('should resolve node builtin modules', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'zlib',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: require.resolve('browserify-zlib'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/browserify-zlib',\n            aboveFilePath: rootDir,\n          },\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.dirname(require.resolve('browserify-zlib/lib')),\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          require.resolve('browserify-zlib/package.json'),\n        ],\n      });\n    });\n\n    it('Should be able to handle node: prefixes', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'node:zlib',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: require.resolve('browserify-zlib'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/browserify-zlib',\n            aboveFilePath: rootDir,\n          },\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.dirname(require.resolve('browserify-zlib/lib')),\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          require.resolve('browserify-zlib/package.json'),\n        ],\n      });\n    });\n\n    it('should resolve unimplemented node builtin modules to an empty file', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'fs',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(__dirname, '..', 'src', '_empty.js'),\n        sideEffects: undefined,\n        query: undefined,\n      });\n    });\n\n    it('should exclude node builtin modules with --target=node', async function () {\n      let resolved = await resolver.resolve({\n        env: NODE_ENV,\n        filename: 'zlib',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {isExcluded: true});\n    });\n\n    it('should exclude the electron module in electron environments', async function () {\n      let resolved = await resolver.resolve({\n        env: new Environment(\n          createEnvironment({\n            context: 'electron-main',\n            isLibrary: true,\n            includeNodeModules: true,\n          }),\n          DEFAULT_OPTIONS,\n        ),\n        filename: 'electron',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n        sourcePath: path.join(rootDir, 'foo.js'),\n      });\n\n      check(resolved, {isExcluded: true});\n    });\n  });\n\n  describe('node_modules', function () {\n    it('should resolve a node_modules index.js', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'foo',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'node_modules', 'foo', 'index.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/foo',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(rootDir, 'node_modules', 'foo', 'package.json'),\n        ],\n      });\n    });\n\n    it('should resolve a node_modules package.main', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-main',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'node_modules', 'package-main', 'main.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-main',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(rootDir, 'node_modules', 'package-main', 'package.json'),\n        ],\n      });\n    });\n\n    it('should resolve a node_modules package.module', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-module',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-module',\n          'module.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-module',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(rootDir, 'node_modules', 'package-module', 'package.json'),\n        ],\n      });\n    });\n\n    it('should resolve a node_modules package.browser main field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-browser',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-browser',\n          'browser.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-browser',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(rootDir, 'node_modules', 'package-browser', 'package.json'),\n        ],\n      });\n    });\n\n    it('should not resolve a node_modules package.browser main field with --target=node', async function () {\n      let resolved = await resolver.resolve({\n        env: NODE_INCLUDE_ENV,\n        filename: 'package-browser',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-browser',\n          'main.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-browser',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(rootDir, 'node_modules', 'package-browser', 'package.json'),\n        ],\n      });\n    });\n\n    it('should fall back to index.js when it cannot find package.main', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-fallback',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-fallback',\n          'index.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-fallback',\n            aboveFilePath: rootDir,\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-fallback',\n              'main.js',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-fallback',\n              'main.js.cjs',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-fallback',\n              'main.js.mjs',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-fallback',\n              'main.js.jsx',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-fallback',\n              'main.js.ts',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-fallback',\n              'main.js.tsx',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-fallback',\n              'main.js.js',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-fallback',\n              'main.js.json',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-fallback',\n              'main.js/package.json',\n            ),\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-fallback',\n            'package.json',\n          ),\n        ],\n      });\n    });\n\n    it('should resolve a node_module package.main pointing to a directory', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-main-directory',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-main-directory',\n          'nested',\n          'index.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-main-directory',\n            aboveFilePath: rootDir,\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested',\n              'package.json',\n            ),\n          },\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested.js',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested.json',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested.jsx',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested.cjs',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested.mjs',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested.ts',\n            ),\n          },\n          {\n            filePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-main-directory',\n              'nested.tsx',\n            ),\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-main-directory',\n            'package.json',\n          ),\n        ],\n      });\n    });\n\n    it('should resolve a file inside a node_modules folder', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'foo/nested/baz',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'node_modules', 'foo', 'nested', 'baz.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/foo',\n            aboveFilePath: rootDir,\n          },\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(rootDir, 'node_modules', 'foo', 'nested'),\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(rootDir, 'node_modules', 'foo', 'package.json'),\n        ],\n      });\n    });\n\n    it('should resolve a scoped module', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '@scope/pkg',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.resolve(rootDir, 'node_modules/@scope/pkg/index.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/@scope/pkg',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(rootDir, 'node_modules', '@scope', 'pkg', 'package.json'),\n        ],\n      });\n    });\n\n    it('should resolve a file inside a scoped module', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '@scope/pkg/foo/bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.resolve(rootDir, 'node_modules/@scope/pkg/foo/bar.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/@scope/pkg',\n            aboveFilePath: rootDir,\n          },\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(\n              rootDir,\n              'node_modules',\n              '@scope',\n              'pkg',\n              'foo',\n            ),\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(rootDir, 'node_modules', '@scope', 'pkg', 'package.json'),\n        ],\n      });\n    });\n\n    describe('sideEffects: false', function () {\n      it('should determine sideEffects correctly (file)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-false/src/index.js',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.resolve(\n            rootDir,\n            'node_modules/side-effects-false/src/index.js',\n          ),\n          sideEffects: false,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/side-effects-false',\n              aboveFilePath: rootDir,\n            },\n            {\n              fileName: 'package.json',\n              aboveFilePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-false',\n                'src',\n              ),\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-false',\n              'package.json',\n            ),\n          ],\n        });\n      });\n\n      it('should determine sideEffects correctly (extensionless file)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-false/src/index',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.resolve(\n            rootDir,\n            'node_modules/side-effects-false/src/index.js',\n          ),\n          sideEffects: false,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/side-effects-false',\n              aboveFilePath: rootDir,\n            },\n            {\n              fileName: 'package.json',\n              aboveFilePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-false',\n                'src',\n              ),\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-false',\n              'package.json',\n            ),\n          ],\n        });\n      });\n\n      it('should determine sideEffects correctly (sub folder)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-false/src/',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.resolve(\n            rootDir,\n            'node_modules/side-effects-false/src/index.js',\n          ),\n          sideEffects: false,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/side-effects-false',\n              aboveFilePath: rootDir,\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-false',\n                'src',\n                'package.json',\n              ),\n            },\n            {\n              aboveFilePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-false',\n                'src',\n              ),\n              fileName: 'package.json',\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-false',\n              'package.json',\n            ),\n          ],\n        });\n      });\n\n      it('should determine sideEffects correctly (main field)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-false/src/',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.resolve(\n            rootDir,\n            'node_modules/side-effects-false/src/index.js',\n          ),\n          sideEffects: false,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/side-effects-false',\n              aboveFilePath: rootDir,\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-false',\n                'src',\n                'package.json',\n              ),\n            },\n            {\n              aboveFilePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-false',\n                'src',\n              ),\n              fileName: 'package.json',\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-false',\n              'package.json',\n            ),\n          ],\n        });\n      });\n\n      it('should determine sideEffects correctly (main field exists in upward package)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-package-redirect-up/foo/bar',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.resolve(\n            rootDir,\n            'node_modules/side-effects-package-redirect-up/foo/real-bar.js',\n          ),\n          sideEffects: false,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/side-effects-package-redirect-up',\n              aboveFilePath: rootDir,\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-up',\n                'foo',\n                'bar',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-up',\n                'foo',\n                'bar.js',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-up',\n                'foo',\n                'bar.json',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-up',\n                'foo',\n                'bar.jsx',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-up',\n                'foo',\n                'bar.cjs',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-up',\n                'foo',\n                'bar.mjs',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-up',\n                'foo',\n                'bar.ts',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-up',\n                'foo',\n                'bar.tsx',\n              ),\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-package-redirect-up',\n              'package.json',\n            ),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-package-redirect-up',\n              'foo',\n              'bar',\n              'package.json',\n            ),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-package-redirect-up',\n              'foo',\n              'package.json',\n            ),\n          ],\n        });\n      });\n\n      it('should determine sideEffects correctly (main field exists in downward package)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-package-redirect-down/foo/bar',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.resolve(\n            rootDir,\n            'node_modules/side-effects-package-redirect-down/foo/bar/baz/real-bar.js',\n          ),\n          sideEffects: false,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/side-effects-package-redirect-down',\n              aboveFilePath: rootDir,\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-down',\n                'foo',\n                'bar',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-down',\n                'foo',\n                'bar.js',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-down',\n                'foo',\n                'bar.jsx',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-down',\n                'foo',\n                'bar.json',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-down',\n                'foo',\n                'bar.ts',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-down',\n                'foo',\n                'bar.tsx',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-down',\n                'foo',\n                'bar.cjs',\n              ),\n            },\n            {\n              filePath: path.join(\n                rootDir,\n                'node_modules',\n                'side-effects-package-redirect-down',\n                'foo',\n                'bar.mjs',\n              ),\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-package-redirect-down',\n              'package.json',\n            ),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-package-redirect-down',\n              'foo',\n              'bar',\n              'package.json',\n            ),\n            path.join(\n              rootDir,\n              'node_modules',\n              'side-effects-package-redirect-down',\n              'foo',\n              'bar',\n              'baz',\n              'package.json',\n            ),\n          ],\n        });\n      });\n    });\n\n    describe('sideEffects: globs', function () {\n      it('should determine sideEffects correctly (matched)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-false-glob/a/index',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(\n          {filePath: resolved?.filePath, sideEffects: resolved?.sideEffects},\n          {\n            filePath: path.resolve(\n              rootDir,\n              'node_modules/side-effects-false-glob/a/index.js',\n            ),\n            sideEffects: undefined,\n          },\n        );\n      });\n      it('should determine sideEffects correctly (unmatched)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-false-glob/b/index.js',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(\n          {filePath: resolved?.filePath, sideEffects: resolved?.sideEffects},\n          {\n            filePath: path.resolve(\n              rootDir,\n              'node_modules/side-effects-false-glob/b/index.js',\n            ),\n            sideEffects: false,\n          },\n        );\n      });\n      it('should determine sideEffects correctly (matched dotslash)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-false-glob/sub/index.js',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(\n          {filePath: resolved?.filePath, sideEffects: resolved?.sideEffects},\n          {\n            filePath: path.resolve(\n              rootDir,\n              'node_modules/side-effects-false-glob/sub/index.js',\n            ),\n            sideEffects: undefined,\n          },\n        );\n      });\n      it('should determine sideEffects correctly (unmatched, prefix in subdir)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-false-glob/sub/a/index.js',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(\n          {filePath: resolved?.filePath, sideEffects: resolved?.sideEffects},\n          {\n            filePath: path.resolve(\n              rootDir,\n              'node_modules/side-effects-false-glob/sub/a/index.js',\n            ),\n            sideEffects: false,\n          },\n        );\n      });\n      it('should determine sideEffects correctly (only name)', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'side-effects-false-glob/sub/index.json',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(\n          {filePath: resolved?.filePath, sideEffects: resolved?.sideEffects},\n          {\n            filePath: path.resolve(\n              rootDir,\n              'node_modules/side-effects-false-glob/sub/index.json',\n            ),\n            sideEffects: undefined,\n          },\n        );\n      });\n    });\n\n    it('should not resolve a node module for URL dependencies', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '@scope/pkg',\n        specifierType: 'url',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.deepEqual(nullthrows(resolved).diagnostics, [\n        {message: \"Cannot load file './@scope/pkg' in './'.\", hints: []},\n      ]);\n    });\n\n    it('should resolve a node module for URL dependencies with the npm: prefix', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'npm:@scope/pkg',\n        specifierType: 'url',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.deepEqual(\n        nullthrows(resolved).filePath,\n        path.join(rootDir, 'node_modules', '@scope', 'pkg', 'index.js'),\n      );\n    });\n\n    it('should support query params for bare ESM specifiers', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '@scope/pkg?foo=2',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        nullthrows(resolved).filePath,\n        path.resolve(rootDir, 'node_modules/@scope/pkg/index.js'),\n      );\n      assert.deepEqual(nullthrows(resolved).query?.toString(), 'foo=2');\n    });\n\n    it('should not support query params for bare CommonJS specifiers', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '@scope/pkg?foo=2',\n        specifierType: 'commonjs',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.deepEqual(nullthrows(resolved).diagnostics, [\n        {\n          message: `Cannot find module '@scope/pkg?foo=2'`,\n          hints: [\"Did you mean '__@scope/pkg__'?\"],\n        },\n      ]);\n    });\n\n    it('should support query params for npm: specifiers', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'npm:@scope/pkg?foo=2',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        nullthrows(resolved).filePath,\n        path.resolve(rootDir, 'node_modules/@scope/pkg/index.js'),\n      );\n      assert.deepEqual(nullthrows(resolved).query?.toString(), 'foo=2');\n    });\n  });\n\n  describe('aliases', function () {\n    it('should alias the main file using the package.browser field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-browser-alias',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-browser-alias',\n          'browser.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-browser-alias',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-browser-alias',\n            'package.json',\n          ),\n        ],\n      });\n    });\n\n    it('should alias a sub-file using the package.browser field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-browser-alias/foo',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-browser-alias',\n          'bar.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-browser-alias',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-browser-alias',\n            'package.json',\n          ),\n        ],\n      });\n    });\n\n    it('should alias a relative file using the package.browser field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './foo',\n        specifierType: 'esm',\n        parent: path.join(\n          rootDir,\n          'node_modules',\n          'package-browser-alias',\n          'browser.js',\n        ),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-browser-alias',\n          'bar.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-browser-alias',\n            'package.json',\n          ),\n        ],\n      });\n    });\n\n    it('should not alias using the package.browser field with --target=node', async function () {\n      let resolved = await resolver.resolve({\n        env: NODE_INCLUDE_ENV,\n        filename: 'package-browser-alias/foo',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-browser-alias',\n          'foo.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-browser-alias',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-browser-alias',\n            'package.json',\n          ),\n        ],\n      });\n    });\n\n    it('should alias a deep nested relative file using the package.browser field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './nested',\n        specifierType: 'esm',\n        parent: path.join(\n          rootDir,\n          'node_modules',\n          'package-browser-alias',\n          'browser.js',\n        ),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-browser-alias',\n          'subfolder1/subfolder2/subfile.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-browser-alias',\n              'subfolder1',\n              'subfolder2',\n            ),\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-browser-alias',\n            'package.json',\n          ),\n        ],\n      });\n    });\n\n    it('should alias a sub-file using the package.alias field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-alias/foo',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'node_modules', 'package-alias', 'bar.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-alias',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(rootDir, 'node_modules', 'package-alias', 'package.json'),\n        ],\n      });\n    });\n\n    it('should alias a relative file using the package.alias field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './foo',\n        specifierType: 'esm',\n        parent: path.join(\n          rootDir,\n          'node_modules',\n          'package-alias',\n          'browser.js',\n        ),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'node_modules', 'package-alias', 'bar.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'node_modules', 'package-alias', 'package.json'),\n        ],\n      });\n    });\n\n    it('should alias a glob using the package.alias field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './lib/test',\n        specifierType: 'esm',\n        parent: path.join(\n          rootDir,\n          'node_modules',\n          'package-alias-glob',\n          'index.js',\n        ),\n      });\n      check(resolved, {\n        filePath: path.join(\n          rootDir,\n          'node_modules',\n          'package-alias-glob',\n          'src',\n          'test.js',\n        ),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-alias-glob',\n              'lib',\n            ),\n          },\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(\n              rootDir,\n              'node_modules',\n              'package-alias-glob',\n              'src',\n            ),\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-alias-glob',\n            'package.json',\n          ),\n        ],\n      });\n    });\n\n    it('should apply a module alias using the package.alias field in the root package', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'aliased',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'node_modules', 'foo', 'index.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/foo',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'node_modules', 'foo', 'package.json'),\n        ],\n      });\n    });\n\n    it('should apply a global module alias using the package.alias field in the root package', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'aliased',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'node_modules', 'package-alias', 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'node_modules', 'foo', 'index.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/foo',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'node_modules', 'foo', 'package.json'),\n        ],\n      });\n    });\n\n    it('should apply a global module alias to a sub-file in a package', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'aliased/bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'node_modules', 'package-alias', 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'node_modules', 'foo', 'bar.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/foo',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'node_modules', 'foo', 'package.json'),\n        ],\n      });\n    });\n\n    it('should apply a module alias pointing to a file using the package.alias field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'aliased-file',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'bar.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should apply a global module alias pointing to a file using the package.alias field', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'aliased-file',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'node_modules', 'package-alias', 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'bar.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should apply an alias for a virtual module folder (relative to project dir)', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'aliasedfolder/test.js',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'nested', 'test.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(rootDir, 'nested'),\n          },\n        ],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should apply an alias for a virtual module folder only (relative to project dir)', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'aliasedfolder',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'nested', 'index.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(rootDir, 'nested'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.js'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.jsx'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.cjs'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.mjs'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.ts'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.tsx'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested', 'package.json'),\n          },\n        ],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should apply an alias for a virtual module folder (relative to root dir)', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'aliasedabsolute/test.js',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'nested', 'test.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(rootDir, 'nested'),\n          },\n        ],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should apply an alias for a virtual module folder only (relative to root dir)', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'aliasedabsolute',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'nested', 'index.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(rootDir, 'nested'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.js'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.jsx'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.cjs'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.mjs'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.ts'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested.tsx'),\n          },\n          {\n            filePath: path.join(rootDir, 'nested', 'package.json'),\n          },\n        ],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should apply an alias for a virtual module folder sub-path', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'foo/bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'bar.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should apply an alias for a virtual module folder glob sub-path', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'glob/bar/test',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'nested', 'test.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(rootDir, 'nested'),\n          },\n        ],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should apply an alias for a virtual module', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'something',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'nested', 'test.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(rootDir, 'nested'),\n          },\n        ],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should apply a global alias for a virtual module', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'something',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'node_modules', 'package-alias', 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(rootDir, 'nested', 'test.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'package.json',\n            aboveFilePath: path.join(rootDir, 'nested'),\n          },\n        ],\n        invalidateOnFileChange: [path.join(rootDir, 'package.json')],\n      });\n    });\n\n    it('should resolve to an empty file when package.browser resolves to false', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-browser-exclude',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(__dirname, '..', 'src', '_empty.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-browser-exclude',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-browser-exclude',\n            'package.json',\n          ),\n        ],\n      });\n    });\n\n    it('should resolve to an empty file when package.alias resolves to false', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-alias-exclude',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {\n        filePath: path.join(__dirname, '..', 'src', '_empty.js'),\n        sideEffects: undefined,\n        query: undefined,\n        invalidateOnFileCreate: [\n          {\n            fileName: 'node_modules/package-alias-exclude',\n            aboveFilePath: rootDir,\n          },\n        ],\n        invalidateOnFileChange: [\n          path.join(rootDir, 'package.json'),\n          path.join(rootDir, 'tsconfig.json'),\n          path.join(\n            rootDir,\n            'node_modules',\n            'package-alias-exclude',\n            'package.json',\n          ),\n        ],\n      });\n    });\n  });\n\n  describe('source field', function () {\n    describe('package behind symlinks', function () {\n      it('should use the source field, when its realpath is not under `node_modules`', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'source',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.join(rootDir, 'packages', 'source', 'source.js'),\n          sideEffects: undefined,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/source',\n              aboveFilePath: rootDir,\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(rootDir, 'node_modules', 'source', 'package.json'),\n            path.join(rootDir, 'packages', 'source', 'package.json'),\n          ],\n        });\n      });\n\n      it('should prioritize the source field over exports', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'source-exports',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.join(\n            rootDir,\n            'packages',\n            'source-exports',\n            'source.js',\n          ),\n          sideEffects: undefined,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/source-exports',\n              aboveFilePath: rootDir,\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(\n              rootDir,\n              'node_modules',\n              'source-exports',\n              'package.json',\n            ),\n            path.join(rootDir, 'packages', 'source-exports', 'package.json'),\n          ],\n        });\n      });\n\n      it('should not use the source field, when its realpath is under `node_modules`', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'source-pnpm',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.join(\n            rootDir,\n            'node_modules',\n            '.pnpm',\n            'source-pnpm@1.0.0',\n            'node_modules',\n            'source-pnpm',\n            'dist.js',\n          ),\n          sideEffects: undefined,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/source-pnpm',\n              aboveFilePath: rootDir,\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(rootDir, 'node_modules', 'source-pnpm', 'package.json'),\n            path.join(\n              rootDir,\n              'node_modules',\n              '.pnpm',\n              'source-pnpm@1.0.0',\n              'node_modules',\n              'source-pnpm',\n              'package.json',\n            ),\n          ],\n        });\n      });\n    });\n\n    describe('package not behind symlinks', function () {\n      it('should not use the source field', async function () {\n        let resolved = await resolver.resolve({\n          env: BROWSER_ENV,\n          filename: 'source-not-symlinked',\n          specifierType: 'esm',\n          parent: path.join(rootDir, 'foo.js'),\n        });\n        check(resolved, {\n          filePath: path.join(\n            rootDir,\n            'node_modules',\n            'source-not-symlinked',\n            'dist.js',\n          ),\n          sideEffects: undefined,\n          query: undefined,\n          invalidateOnFileCreate: [\n            {\n              fileName: 'node_modules/source-not-symlinked',\n              aboveFilePath: rootDir,\n            },\n          ],\n          invalidateOnFileChange: [\n            path.join(rootDir, 'package.json'),\n            path.join(rootDir, 'tsconfig.json'),\n            path.join(\n              rootDir,\n              'node_modules',\n              'source-not-symlinked',\n              'package.json',\n            ),\n          ],\n        });\n      });\n    });\n  });\n\n  describe('package exports', function () {\n    it('should resolve a browser development import', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-conditions',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        resolved?.filePath,\n        path.join(\n          rootDir,\n          'node_modules/package-conditions/browser-import-dev.mjs',\n        ),\n      );\n    });\n\n    it('should resolve a browser development require', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-conditions',\n        specifierType: 'commonjs',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        resolved?.filePath,\n        path.join(\n          rootDir,\n          'node_modules/package-conditions/browser-require-dev.cjs',\n        ),\n      );\n    });\n\n    it('should resolve a browser production import', async function () {\n      let resolved = await prodResolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-conditions',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        resolved?.filePath,\n        path.join(\n          rootDir,\n          'node_modules/package-conditions/browser-import-prod.mjs',\n        ),\n      );\n    });\n\n    it('should resolve a browser development require', async function () {\n      let resolved = await prodResolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-conditions',\n        specifierType: 'commonjs',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        resolved?.filePath,\n        path.join(\n          rootDir,\n          'node_modules/package-conditions/browser-require-prod.cjs',\n        ),\n      );\n    });\n\n    it('should resolve a node import', async function () {\n      let resolved = await resolver.resolve({\n        env: NODE_INCLUDE_ENV,\n        filename: 'package-conditions',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        resolved?.filePath,\n        path.join(rootDir, 'node_modules/package-conditions/node-import.mjs'),\n      );\n    });\n\n    it('should resolve a node require', async function () {\n      let resolved = await resolver.resolve({\n        env: NODE_INCLUDE_ENV,\n        filename: 'package-conditions',\n        specifierType: 'commonjs',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        resolved?.filePath,\n        path.join(rootDir, 'node_modules/package-conditions/node-require.cjs'),\n      );\n    });\n\n    it('should support resolving package self', async function () {\n      let resolved = await resolver.resolve({\n        env: NODE_INCLUDE_ENV,\n        filename: 'self',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'packages/self/foo.js'),\n      });\n      assert.equal(\n        resolved?.filePath,\n        path.join(rootDir, 'packages/self/foo.js'),\n      );\n    });\n\n    it('should support resolving package self with subpath', async function () {\n      let resolved = await resolver.resolve({\n        env: NODE_INCLUDE_ENV,\n        filename: 'self/bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'packages/self/foo.js'),\n      });\n      assert.equal(\n        resolved?.filePath,\n        path.join(rootDir, 'packages/self/bar.js'),\n      );\n    });\n\n    it('should support resolving package self with source field', async function () {\n      let resolved = await resolver.resolve({\n        env: NODE_INCLUDE_ENV,\n        filename: 'self-source',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'packages/self-source/foo.js'),\n      });\n      assert.equal(\n        resolved?.filePath,\n        path.join(rootDir, 'packages/self-source/source.js'),\n      );\n    });\n  });\n\n  describe('symlinks', function () {\n    it('should resolve symlinked files to their realpath', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './baz.js',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'bar.js'));\n    });\n\n    it('should resolve symlinked directories to their realpath', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './symlinked-nested',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(\n        nullthrows(resolved).filePath,\n        path.join(rootDir, 'nested', 'index.js'),\n      );\n    });\n  });\n\n  describe('error handling', function () {\n    it('should return diagnostics when package.module does not exist', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-module-fallback',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n\n      assert.equal(\n        nullthrows(nullthrows(result).diagnostics)[0].message,\n        `Could not load './module.js' from module 'package-module-fallback' found in package.json#module`,\n      );\n    });\n\n    it('should throw when a relative path cannot be resolved', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './xyz.js',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n\n      assert.equal(\n        nullthrows(nullthrows(result).diagnostics)[0].message,\n        `Cannot load file './xyz.js' in './'.`,\n      );\n    });\n\n    it('should throw when a node_module cannot be resolved', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'food',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n\n      assert.deepEqual(nullthrows(nullthrows(result).diagnostics)[0], {\n        message: `Cannot find module 'food'`,\n        hints: [`Did you mean '__foo__'?`],\n      });\n    });\n\n    it('should throw when a subfile of a node_module cannot be resolved', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'foo/bark',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n\n      assert.deepEqual(nullthrows(nullthrows(result).diagnostics)[0], {\n        message: `Cannot load file './bark' from module 'foo'`,\n        hints: [`Did you mean '__foo/bar__'?`],\n      });\n    });\n\n    it('should error when a library is missing an external dependency', async function () {\n      let result = await resolver.resolve({\n        env: new Environment(\n          createEnvironment({\n            context: 'browser',\n            isLibrary: true,\n            includeNodeModules: false,\n          }),\n          DEFAULT_OPTIONS,\n        ),\n        filename: 'test',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n        sourcePath: path.join(rootDir, 'foo.js'),\n      });\n\n      assert.equal(\n        result?.diagnostics?.[0].message,\n        'External dependency \"test\" is not declared in package.json.',\n      );\n    });\n\n    it('should not error when external dependencies are declared', async function () {\n      let result = await resolver.resolve({\n        env: new Environment(\n          createEnvironment({\n            context: 'browser',\n            isLibrary: true,\n            includeNodeModules: false,\n          }),\n          DEFAULT_OPTIONS,\n        ),\n        filename: 'foo',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n        sourcePath: path.join(rootDir, 'foo.js'),\n      });\n\n      assert.deepEqual(result, {\n        isExcluded: true,\n        invalidateOnFileChange: [],\n        invalidateOnFileCreate: [],\n      });\n    });\n\n    it('should not error when external dependencies are declared in peerDependencies', async function () {\n      let result = await resolver.resolve({\n        env: new Environment(\n          createEnvironment({\n            context: 'browser',\n            isLibrary: true,\n            includeNodeModules: false,\n          }),\n          DEFAULT_OPTIONS,\n        ),\n        filename: 'bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n        sourcePath: path.join(rootDir, 'foo.js'),\n      });\n\n      assert.deepEqual(result, {\n        isExcluded: true,\n        invalidateOnFileChange: [],\n        invalidateOnFileCreate: [],\n      });\n    });\n\n    it('should not error on missing dependencies for environment builtins', async function () {\n      let result = await resolver.resolve({\n        env: new Environment(\n          createEnvironment({\n            context: 'browser',\n            isLibrary: true,\n            includeNodeModules: false,\n          }),\n          DEFAULT_OPTIONS,\n        ),\n        filename: 'atom',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'env-dep/foo.js'),\n        sourcePath: path.join(rootDir, 'env-dep/foo.js'),\n      });\n\n      assert.deepEqual(result, {\n        isExcluded: true,\n        invalidateOnFileChange: [],\n        invalidateOnFileCreate: [],\n      });\n    });\n\n    it('should not error on builtin node modules', async function () {\n      let result = await resolver.resolve({\n        env: new Environment(\n          createEnvironment({\n            context: 'browser',\n            isLibrary: true,\n            includeNodeModules: false,\n          }),\n          DEFAULT_OPTIONS,\n        ),\n        filename: 'buffer',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'env-dep/foo.js'),\n        sourcePath: path.join(rootDir, 'env-dep/foo.js'),\n      });\n\n      assert.deepEqual(result, {isExcluded: true});\n    });\n\n    it('should error when a library has an incorrect external dependency version', async function () {\n      let result = await resolver.resolve({\n        env: new Environment(\n          createEnvironment({\n            context: 'browser',\n            isLibrary: true,\n            includeNodeModules: false,\n          }),\n          DEFAULT_OPTIONS,\n        ),\n        filename: 'foo',\n        specifierType: 'esm',\n        range: '^0.4.0',\n        parent: path.join(rootDir, 'foo.js'),\n        sourcePath: path.join(rootDir, 'foo.js'),\n      });\n\n      assert.equal(\n        result?.diagnostics?.[0].message,\n        'External dependency \"foo\" does not satisfy required semver range \"^0.4.0\".',\n      );\n    });\n\n    it('should error when package.json is invalid', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'json-error',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      let file = path.join(\n        rootDir,\n        'node_modules',\n        'json-error',\n        'package.json',\n      );\n      assert.deepEqual(result?.diagnostics, [\n        {\n          message: 'Error parsing JSON',\n          codeFrames: [\n            {\n              language: 'json',\n              filePath: file,\n              code: await overlayFS.readFile(file, 'utf8'),\n              codeHighlights: [\n                {\n                  message: 'expected `,` or `}` at line 3 column 3',\n                  start: {\n                    line: 3,\n                    column: 3,\n                  },\n                  end: {\n                    line: 3,\n                    column: 3,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n      ]);\n    });\n\n    it('should error on an invalid empty specifier', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.deepEqual(result?.diagnostics, [\n        {\n          message: 'Invalid empty specifier',\n        },\n      ]);\n    });\n\n    it('should error on unknown URL schemes', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'http://parceljs.org',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n        loc: {\n          filePath: path.join(rootDir, 'foo.js'),\n          start: {\n            line: 1,\n            column: 1,\n          },\n          end: {\n            line: 1,\n            column: 10,\n          },\n        },\n      });\n      assert.deepEqual(result?.diagnostics, [\n        {\n          message: `Unknown url scheme or pipeline 'http:'`,\n        },\n      ]);\n    });\n\n    it('should error on non-exported package paths', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-exports/internal',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      let file = path.join(\n        rootDir,\n        'node_modules/package-exports/package.json',\n      );\n      assert.deepEqual(result?.diagnostics, [\n        {\n          message: `Module 'package-exports/internal' is not exported from the 'package-exports' package`,\n          codeFrames: [\n            {\n              language: 'json',\n              filePath: file,\n              code: await overlayFS.readFile(file, 'utf8'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 4,\n                    column: 14,\n                  },\n                  end: {\n                    line: 13,\n                    column: 3,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n      ]);\n    });\n\n    it('should error when export does not exist', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-exports/missing',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.deepEqual(result?.diagnostics, [\n        {\n          message: `Cannot load file './missing.mjs' from module 'package-exports'`,\n          hints: [],\n        },\n      ]);\n    });\n\n    it('should error on undefined package imports', async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '#foo',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      let file = path.join(rootDir, 'package.json');\n      assert.deepEqual(result?.diagnostics, [\n        {\n          message: `Package import '#foo' is not defined in the 'resolver' package`,\n          codeFrames: [\n            {\n              language: 'json',\n              filePath: file,\n              code: await overlayFS.readFile(file, 'utf8'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 15,\n                    column: 14,\n                  },\n                  end: {\n                    line: 17,\n                    column: 3,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n      ]);\n    });\n\n    it(\"should error when package.json doesn't define imports field\", async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '#foo',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'node_modules', 'foo', 'foo.js'),\n      });\n      let file = path.join(rootDir, 'node_modules', 'foo', 'package.json');\n      assert.deepEqual(result?.diagnostics, [\n        {\n          message: `Package import '#foo' is not defined in the 'foo' package`,\n          codeFrames: [\n            {\n              language: 'json',\n              filePath: file,\n              code: await overlayFS.readFile(file, 'utf8'),\n              codeHighlights: [],\n            },\n          ],\n        },\n      ]);\n    });\n\n    it(\"should error when a package.json couldn't be found\", async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '#foo',\n        specifierType: 'esm',\n        parent: path.join(\n          rootDir,\n          'node_modules',\n          'tsconfig-not-used',\n          'foo.js',\n        ),\n      });\n      assert.deepEqual(result?.diagnostics, [\n        {\n          message: `Cannot find a package.json above './node\\\\_modules/tsconfig-not-used'`,\n        },\n      ]);\n    });\n\n    it(\"should error when a tsconfig.json extends couldn't be found\", async function () {\n      let result = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'tsconfig', 'extends-not-found', 'index.js'),\n      });\n      let file = path.join(\n        rootDir,\n        'tsconfig',\n        'extends-not-found',\n        'tsconfig.json',\n      );\n      assert.deepEqual(result?.diagnostics, [\n        {\n          message: 'Could not find extended tsconfig',\n          codeFrames: [\n            {\n              language: 'json',\n              filePath: file,\n              code: await overlayFS.readFile(file, 'utf8'),\n              codeHighlights: [\n                {\n                  message: undefined,\n                  start: {\n                    line: 2,\n                    column: 14,\n                  },\n                  end: {\n                    line: 2,\n                    column: 26,\n                  },\n                },\n              ],\n            },\n          ],\n        },\n        {\n          message:\n            \"Cannot load file './not-found' in './tsconfig/extends-not-found'.\",\n          hints: [],\n        },\n      ]);\n    });\n  });\n\n  describe('urls', function () {\n    it('should ignore protocol relative urls', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '//example.com/foo.png',\n        specifierType: 'url',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {isExcluded: true});\n    });\n\n    it('should ignore hash urls', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: '#hash',\n        specifierType: 'url',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {isExcluded: true});\n    });\n\n    it('should ignore http: urls', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'http://example.com/foo.png',\n        specifierType: 'url',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      check(resolved, {isExcluded: true});\n    });\n\n    it('should treat file: urls as absolute paths', async function () {\n      // TODO fixme\n      if (process.platform === 'win32') {\n        return;\n      }\n\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'file:///bar.js',\n        specifierType: 'url',\n        parent: path.join(rootDir, 'foo.js'),\n      });\n      assert.equal(nullthrows(resolved).filePath, path.join(rootDir, 'bar.js'));\n    });\n  });\n\n  describe('options', function () {\n    it('supports custom extensions', async function () {\n      let resolver = new NodeResolver({\n        fs: overlayFS,\n        projectRoot: rootDir,\n        mode: 'development',\n        extensions: ['html'],\n      });\n\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './bar',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.ts'),\n      });\n      assert.equal(\n        nullthrows(resolved).filePath,\n        path.join(rootDir, 'bar.html'),\n      );\n\n      resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: './foo',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.ts'),\n      });\n      assert.equal(nullthrows(resolved).filePath, null);\n    });\n\n    it('supports custom mainFields', async function () {\n      let resolved = await resolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-types',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.ts'),\n      });\n      assert.equal(\n        nullthrows(resolved).filePath,\n        path.join(rootDir, 'node_modules', 'package-types', 'main.js'),\n      );\n\n      let typesResolver = new NodeResolver({\n        fs: overlayFS,\n        projectRoot: rootDir,\n        mode: 'development',\n        mainFields: ['types', 'main'],\n      });\n\n      resolved = await typesResolver.resolve({\n        env: BROWSER_ENV,\n        filename: 'package-types',\n        specifierType: 'esm',\n        parent: path.join(rootDir, 'foo.ts'),\n      });\n      assert.equal(\n        nullthrows(resolved).filePath,\n        path.join(rootDir, 'node_modules', 'package-types', 'types.d.ts'),\n      );\n    });\n  });\n});\n"
  },
  {
    "path": "packages/utils/node-resolver-rs/src/tsconfig.rs",
    "content": "use std::{\n  borrow::Cow,\n  path::{Path, PathBuf},\n};\n\nuse crate::json_comments_rs::strip_comments_in_place;\nuse indexmap::IndexMap;\nuse itertools::Either;\n\nuse crate::{\n  cache::{Cache, CachedPath},\n  error::JsonError,\n  specifier::Specifier,\n  ResolverError,\n};\n\n#[derive(serde::Deserialize, Debug, Default)]\n#[serde(rename_all = \"camelCase\")]\nstruct SerializedTsConfig {\n  base_url: Option<PathBuf>,\n  paths: Option<IndexMap<Specifier<'static>, Vec<String>>>,\n  pub module_suffixes: Option<Vec<String>>,\n  // rootDirs??\n}\n\npub struct TsConfig {\n  pub path: CachedPath,\n  base_url: Option<CachedPath>,\n  paths: Option<IndexMap<Specifier<'static>, Vec<String>>>,\n  paths_base: CachedPath,\n  pub module_suffixes: Option<Vec<String>>,\n}\n\nfn deserialize_extends<'de, D>(deserializer: D) -> Result<Vec<Specifier<'static>>, D::Error>\nwhere\n  D: serde::Deserializer<'de>,\n{\n  use serde::Deserialize;\n\n  #[derive(serde::Deserialize)]\n  #[serde(untagged)]\n  enum StringOrArray {\n    String(Specifier<'static>),\n    Array(Vec<Specifier<'static>>),\n  }\n\n  Ok(match StringOrArray::deserialize(deserializer)? {\n    StringOrArray::String(s) => vec![s],\n    StringOrArray::Array(a) => a,\n  })\n}\n\n#[derive(serde::Deserialize, Debug)]\n#[serde(rename_all = \"camelCase\")]\nstruct SerializedTsConfigWrapper {\n  #[serde(default, deserialize_with = \"deserialize_extends\")]\n  pub extends: Vec<Specifier<'static>>,\n  #[serde(default)]\n  pub compiler_options: SerializedTsConfig,\n}\n\npub struct TsConfigWrapper {\n  pub extends: Vec<Specifier<'static>>,\n  pub compiler_options: TsConfig,\n}\n\nimpl TsConfig {\n  pub fn read<F: FnOnce(&mut TsConfigWrapper) -> Result<(), ResolverError>>(\n    path: &CachedPath,\n    process: F,\n    cache: &Cache,\n  ) -> Result<TsConfigWrapper, ResolverError> {\n    let data = cache.fs.read_to_string(path.as_path())?;\n    let mut tsconfig = TsConfig::parse(path.clone(), data, &cache)\n      .map_err(|e| JsonError::new(path.as_path().to_owned(), e))?;\n    process(&mut tsconfig)?;\n    Ok(tsconfig)\n  }\n\n  pub fn parse(\n    path: CachedPath,\n    mut data: String,\n    cache: &Cache,\n  ) -> serde_json::Result<TsConfigWrapper> {\n    let _ = strip_comments_in_place(data.as_mut_str(), Default::default(), true);\n    let wrapper: SerializedTsConfigWrapper = serde_json::from_str(&data)?;\n    Ok(TsConfigWrapper {\n      extends: wrapper.extends,\n      compiler_options: TsConfig::from_serialized(path, wrapper.compiler_options, cache),\n    })\n  }\n\n  fn from_serialized(path: CachedPath, serialized: SerializedTsConfig, cache: &Cache) -> TsConfig {\n    let base_url = serialized\n      .base_url\n      .map(|base_url| path.resolve(&base_url, cache));\n\n    TsConfig {\n      paths_base: if serialized.paths.is_some() {\n        base_url\n          .clone()\n          .unwrap_or_else(|| path.parent().unwrap().clone())\n      } else {\n        cache.get(Path::new(\"\"))\n      },\n      path,\n      base_url,\n      paths: serialized.paths,\n      module_suffixes: serialized.module_suffixes,\n    }\n  }\n\n  pub fn extend(&mut self, extended: &TsConfig) {\n    if self.base_url.is_none() {\n      self.base_url = extended.base_url.clone();\n    }\n\n    if self.paths.is_none() {\n      self.paths_base = extended.paths_base.clone();\n      self.paths = extended.paths.clone();\n    }\n\n    if self.module_suffixes.is_none() {\n      self.module_suffixes = extended.module_suffixes.clone();\n    }\n  }\n\n  pub fn paths<'a>(\n    &'a self,\n    specifier: &'a Specifier,\n    cache: &'a Cache,\n  ) -> impl Iterator<Item = CachedPath> + 'a {\n    if !matches!(specifier, Specifier::Package(..) | Specifier::Builtin(..)) {\n      return Either::Right(Either::Right(std::iter::empty()));\n    }\n\n    // If there is a base url setting, resolve it relative to the tsconfig.json file.\n    // Otherwise, the base for paths is implicitly the directory containing the tsconfig.\n    let base_url_iter = if let Some(base_url) = &self.base_url {\n      Either::Left(base_url_iter(base_url, specifier, cache))\n    } else {\n      Either::Right(std::iter::empty())\n    };\n\n    if let Some(paths) = &self.paths {\n      // Check exact match first.\n      if let Some(paths) = paths.get(specifier) {\n        return Either::Left(join_paths(&self.paths_base, paths, None, cache).chain(base_url_iter));\n      }\n\n      // Check patterns\n      let mut longest_prefix_length = 0;\n      let mut longest_suffix_length = 0;\n      let mut best_key = None;\n      let full_specifier = specifier.to_string();\n\n      for key in paths.keys() {\n        let path = key.to_string();\n        if let Some((prefix, suffix)) = path.split_once('*') {\n          if (best_key.is_none() || prefix.len() > longest_prefix_length)\n            && full_specifier.starts_with(prefix)\n            && full_specifier.ends_with(suffix)\n          {\n            longest_prefix_length = prefix.len();\n            longest_suffix_length = suffix.len();\n            best_key = Some(key);\n          }\n        }\n      }\n\n      if let Some(key) = best_key {\n        let paths = paths.get(key).unwrap();\n        return Either::Left(\n          join_paths(\n            &self.paths_base,\n            paths,\n            Some((full_specifier, longest_prefix_length, longest_suffix_length)),\n            cache,\n          )\n          .chain(base_url_iter),\n        );\n      }\n    }\n\n    if matches!(specifier, Specifier::Builtin(..)) {\n      // If specifier is a builtin then there's no match\n      return Either::Right(Either::Right(std::iter::empty()));\n    }\n\n    // If no paths were found, try relative to the base url.\n    Either::Right(base_url_iter)\n  }\n}\n\nfn join_paths<'a>(\n  base_url: &'a CachedPath,\n  paths: &'a [String],\n  replacement: Option<(Cow<'a, str>, usize, usize)>,\n  cache: &'a Cache,\n) -> impl Iterator<Item = CachedPath> + 'a {\n  paths\n    .iter()\n    .filter(|p| !p.ends_with(\".d.ts\"))\n    .map(move |path| {\n      if let Some((replacement, start, end)) = &replacement {\n        let path = path.replace('*', &replacement[*start..replacement.len() - *end]);\n        base_url.join(&path, cache)\n      } else {\n        base_url.join(path, cache)\n      }\n    })\n}\n\nfn base_url_iter<'a>(\n  base_url: &'a CachedPath,\n  specifier: &'a Specifier,\n  cache: &'a Cache,\n) -> impl Iterator<Item = CachedPath> + 'a {\n  std::iter::once_with(move || {\n    if let Specifier::Package(module, subpath) = specifier {\n      base_url.join_package(module, subpath, cache)\n    } else {\n      base_url.clone()\n    }\n  })\n}\n\n#[cfg(test)]\nmod tests {\n  use super::*;\n  use indexmap::indexmap;\n\n  #[test]\n  fn test_paths() {\n    let cache = Cache::default();\n    let tsconfig = TsConfig::from_serialized(\n      cache.get_normalized(\"/foo/tsconfig.json\"),\n      SerializedTsConfig {\n        base_url: None,\n        paths: Some(indexmap! {\n          \"jquery\".into() => vec![\"node_modules/jquery/dist/jquery\".into()],\n          \"*\".into() => vec![\"generated/*\".into()],\n          \"bar/*\".into() => vec![\"test/*\".into()],\n          \"bar/baz/*\".into() => vec![\"baz/*\".into(), \"yo/*\".into()],\n          \"@/components/*\".into() => vec![\"components/*\".into()],\n          \"url\".into() => vec![\"node_modules/my-url\".into()],\n        }),\n        module_suffixes: None,\n      },\n      &cache,\n    );\n\n    let test = |specifier: &str| {\n      tsconfig\n        .paths(&specifier.into(), &cache)\n        .collect::<Vec<CachedPath>>()\n    };\n\n    assert_eq!(\n      test(\"jquery\"),\n      vec![cache.get_normalized(\"/foo/node_modules/jquery/dist/jquery\")]\n    );\n    assert_eq!(\n      test(\"test\"),\n      vec![cache.get_normalized(\"/foo/generated/test\")]\n    );\n    assert_eq!(\n      test(\"test/hello\"),\n      vec![cache.get_normalized(\"/foo/generated/test/hello\")]\n    );\n    assert_eq!(test(\"bar/hi\"), vec![cache.get_normalized(\"/foo/test/hi\")]);\n    assert_eq!(\n      test(\"bar/baz/hi\"),\n      vec![\n        cache.get_normalized(\"/foo/baz/hi\"),\n        cache.get_normalized(\"/foo/yo/hi\")\n      ]\n    );\n    assert_eq!(\n      test(\"@/components/button\"),\n      vec![cache.get_normalized(\"/foo/components/button\")]\n    );\n    assert_eq!(test(\"./jquery\"), Vec::<CachedPath>::new());\n    assert_eq!(\n      test(\"url\"),\n      vec![cache.get_normalized(\"/foo/node_modules/my-url\")]\n    );\n  }\n\n  #[test]\n  fn test_base_url() {\n    let cache = Cache::default();\n    let tsconfig = TsConfig::from_serialized(\n      cache.get_normalized(\"/foo/tsconfig.json\"),\n      SerializedTsConfig {\n        base_url: Some(PathBuf::from(\"src\")),\n        paths: None,\n        module_suffixes: None,\n      },\n      &cache,\n    );\n\n    let test = |specifier: &str| {\n      tsconfig\n        .paths(&specifier.into(), &cache)\n        .collect::<Vec<CachedPath>>()\n    };\n\n    assert_eq!(test(\"foo\"), vec![cache.get_normalized(\"/foo/src/foo/\")]);\n    assert_eq!(\n      test(\"components/button\"),\n      vec![cache.get_normalized(\"/foo/src/components/button\")]\n    );\n    assert_eq!(test(\"./jquery\"), Vec::<CachedPath>::new());\n  }\n\n  #[test]\n  fn test_paths_and_base_url() {\n    let cache = Cache::default();\n    let tsconfig = TsConfig::from_serialized(\n      cache.get_normalized(\"/foo/tsconfig.json\"),\n      SerializedTsConfig {\n        base_url: Some(Path::new(\"src\").into()),\n        paths: Some(indexmap! {\n          \"*\".into() => vec![\"generated/*\".into()],\n          \"bar/*\".into() => vec![\"test/*\".into()],\n          \"bar/baz/*\".into() => vec![\"baz/*\".into(), \"yo/*\".into()],\n          \"@/components/*\".into() => vec![\"components/*\".into()],\n        }),\n        module_suffixes: None,\n      },\n      &cache,\n    );\n\n    let test = |specifier: &str| {\n      tsconfig\n        .paths(&specifier.into(), &cache)\n        .collect::<Vec<CachedPath>>()\n    };\n\n    assert_eq!(\n      test(\"test\"),\n      vec![\n        cache.get_normalized(\"/foo/src/generated/test\"),\n        cache.get_normalized(\"/foo/src/test/\")\n      ]\n    );\n    assert_eq!(\n      test(\"test/hello\"),\n      vec![\n        cache.get_normalized(\"/foo/src/generated/test/hello\"),\n        cache.get_normalized(\"/foo/src/test/hello\")\n      ]\n    );\n    assert_eq!(\n      test(\"bar/hi\"),\n      vec![\n        cache.get_normalized(\"/foo/src/test/hi\"),\n        cache.get_normalized(\"/foo/src/bar/hi\")\n      ]\n    );\n    assert_eq!(\n      test(\"bar/baz/hi\"),\n      vec![\n        cache.get_normalized(\"/foo/src/baz/hi\"),\n        cache.get_normalized(\"/foo/src/yo/hi\"),\n        cache.get_normalized(\"/foo/src/bar/baz/hi\")\n      ]\n    );\n    assert_eq!(\n      test(\"@/components/button\"),\n      vec![\n        cache.get_normalized(\"/foo/src/components/button\"),\n        cache.get_normalized(\"/foo/src/@/components/button\")\n      ]\n    );\n    assert_eq!(test(\"./jquery\"), Vec::<CachedPath>::new());\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcel-lsp/.gitignore",
    "content": "out\ndist\nnode_modules\n"
  },
  {
    "path": "packages/utils/parcel-lsp/package.json",
    "content": "{\n  \"name\": \"@parcel/lsp\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"./lib/LspServer.js\",\n  \"source\": \"src/LspServer.ts\",\n  \"types\": \"src/LspServer.ts\",\n  \"scripts\": {\n    \"watch\": \"tsc -watch -p ./\",\n    \"lint\": \"eslint src --ext ts\"\n  },\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/lsp-protocol\": \"2.16.4\",\n    \"@parcel/watcher\": \"^2.0.7\",\n    \"common-path-prefix\": \"^3.0.0\",\n    \"nullthrows\": \"^1.1.1\",\n    \"vscode-jsonrpc\": \"^8.2.1\",\n    \"vscode-languageclient\": \"^8.1.0\",\n    \"vscode-languageserver\": \"^8.1.0\",\n    \"vscode-languageserver-textdocument\": \"^1.0.12\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^22.15.17\",\n    \"@typescript-eslint/eslint-plugin\": \"^5.59.7\",\n    \"@typescript-eslint/parser\": \"^5.59.7\",\n    \"eslint\": \"^8.57.1\",\n    \"typescript\": \">=3.0.0\"\n  },\n  \"targets\": {\n    \"types\": false\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcel-lsp/src/LspServer.ts",
    "content": "import * as path from 'path';\nimport * as fs from 'fs';\nimport * as os from 'os';\nimport {\n  createConnection,\n  DiagnosticRefreshRequest,\n  DidChangeConfigurationNotification,\n  DocumentDiagnosticParams,\n  DocumentDiagnosticReport,\n  DocumentDiagnosticReportKind,\n  DocumentDiagnosticRequest,\n  DocumentUri,\n  InitializeParams,\n  InitializeResult,\n  ProposedFeatures,\n  TextDocumentSyncKind,\n  WorkDoneProgressServerReporter,\n} from 'vscode-languageserver/node';\n\nimport {\n  createServerPipeTransport,\n  createMessageConnection,\n  MessageConnection,\n} from 'vscode-jsonrpc/node';\nimport * as invariant from 'assert';\nimport * as url from 'url';\nimport commonPathPrefix = require('common-path-prefix');\n\n// import {TextDocument} from 'vscode-languageserver-textdocument';\nimport * as watcher from '@parcel/watcher';\nimport {\n  NotificationBuild,\n  NotificationBuildStatus,\n  NotificationWorkspaceDiagnostics,\n  RequestDocumentDiagnostics,\n  RequestImporters,\n} from '@parcel/lsp-protocol';\n\ntype Metafile = {\n  projectRoot: string;\n  pid: typeof process['pid'];\n  argv: typeof process['argv'];\n};\n\nconst connection = createConnection(ProposedFeatures.all);\nconst WORKSPACE_ROOT = process.cwd();\nconst LSP_SENTINEL_FILENAME = 'lsp-server';\n// Create a simple text document manager.\n// const documents: TextDocuments<TextDocument> = new TextDocuments(TextDocument);\n\nlet hasConfigurationCapability = false;\nlet hasWorkspaceFolderCapability = false;\n// let hasDiagnosticRelatedInformationCapability = false;\nlet hasDiagnosticsRefreshSupport = false;\n\nconnection.onInitialize((params: InitializeParams) => {\n  const capabilities = params.capabilities;\n\n  // Does the client support the `workspace/configuration` request?\n  // If not, we fall back using global settings.\n  hasConfigurationCapability = !!(\n    capabilities.workspace && !!capabilities.workspace.configuration\n  );\n  hasWorkspaceFolderCapability = !!(\n    capabilities.workspace && !!capabilities.workspace.workspaceFolders\n  );\n  // hasDiagnosticRelatedInformationCapability = !!(\n  //   capabilities.textDocument &&\n  //   capabilities.textDocument.publishDiagnostics &&\n  //   capabilities.textDocument.publishDiagnostics.relatedInformation\n  // );\n  hasDiagnosticsRefreshSupport = Boolean(\n    capabilities.workspace?.diagnostics?.refreshSupport,\n  );\n\n  const result: InitializeResult = {\n    capabilities: {\n      textDocumentSync: TextDocumentSyncKind.Incremental,\n      // Tell the client that this server supports code completion.\n      diagnosticProvider: {\n        workspaceDiagnostics: false,\n        interFileDependencies: true,\n      },\n    },\n  };\n\n  if (hasWorkspaceFolderCapability) {\n    result.capabilities.workspace = {\n      workspaceFolders: {\n        supported: true,\n      },\n    };\n  }\n  return result;\n});\n\nconnection.onInitialized(() => {\n  if (hasConfigurationCapability) {\n    // Register for all configuration changes.\n    connection.client.register(\n      DidChangeConfigurationNotification.type,\n      undefined,\n    );\n  }\n  if (hasWorkspaceFolderCapability) {\n    connection.workspace.onDidChangeWorkspaceFolders(_event => {\n      connection.console.log('Workspace folder change event received.');\n    });\n  }\n});\n\n// Proxy\nconnection.onRequest(RequestImporters, async params => {\n  let client = findClient(params);\n  if (client) {\n    let result = await client.connection.sendRequest(RequestImporters, params);\n    return result;\n  }\n  return null;\n});\n\nconnection.onRequest(\n  DocumentDiagnosticRequest.type,\n  async (\n    params: DocumentDiagnosticParams,\n  ): Promise<DocumentDiagnosticReport> => {\n    let client = findClient(params.textDocument.uri);\n    let result;\n    if (client) {\n      // console.log(\n      //   'DocumentDiagnosticRequest',\n      //   params.textDocument.uri,\n      //   params.previousResultId === client.lastBuild,\n      // );\n\n      if (params.previousResultId === client.lastBuild) {\n        return {\n          kind: DocumentDiagnosticReportKind.Unchanged,\n          resultId: client.lastBuild,\n        };\n      }\n\n      result = await client.connection.sendRequest(\n        RequestDocumentDiagnostics,\n        params.textDocument.uri,\n      );\n\n      if (result) {\n        client.uris.add(params.textDocument.uri);\n      }\n    }\n\n    return {\n      kind: DocumentDiagnosticReportKind.Full,\n      resultId: client?.lastBuild,\n      items: result ?? [],\n    };\n  },\n);\n\nconnection.listen();\n\nclass ProgressReporter {\n  progressReporterPromise?: Promise<WorkDoneProgressServerReporter> | null;\n  lastMessage?: string;\n  begin() {\n    this.progressReporterPromise = (async () => {\n      let reporter = await connection.window.createWorkDoneProgress();\n      reporter.begin('Parcel');\n      return reporter;\n    })();\n    this.progressReporterPromise.then(reporter => {\n      if (this.lastMessage != null) {\n        reporter.report(this.lastMessage);\n      }\n    });\n  }\n  async done() {\n    if (this.progressReporterPromise == null) {\n      this.begin();\n    }\n    invariant(this.progressReporterPromise != null);\n    (await this.progressReporterPromise).done();\n    this.progressReporterPromise = null;\n  }\n  async report(message: string) {\n    if (this.progressReporterPromise == null) {\n      this.lastMessage = message;\n      this.begin();\n    } else {\n      let r = await this.progressReporterPromise;\n      r.report(message);\n    }\n  }\n}\n\nfunction sendDiagnosticsRefresh() {\n  if (hasDiagnosticsRefreshSupport) {\n    connection.sendRequest(DiagnosticRefreshRequest.type);\n  }\n}\n\ntype Client = {\n  connection: MessageConnection;\n  projectRoot: string;\n  uris: Set<DocumentUri>;\n  lastBuild: string;\n};\n\nlet progressReporter = new ProgressReporter();\nlet clients: Map<string, Client> = new Map();\n\nfunction findClient(document: DocumentUri): Client | undefined {\n  let filepath = url.fileURLToPath(document);\n\n  let longestPrefix = 0;\n  let bestClient;\n  for (let [, client] of clients) {\n    let prefix = commonPathPrefix([client.projectRoot, filepath]).length;\n    if (longestPrefix < prefix) {\n      longestPrefix = prefix;\n      bestClient = client;\n    } else if (longestPrefix === prefix) {\n      console.warn('Ambiguous client for ' + filepath);\n    }\n  }\n  return bestClient;\n}\n\nfunction loadMetafile(filepath: string) {\n  const file = fs.readFileSync(filepath, 'utf-8');\n  return JSON.parse(file);\n}\n\nfunction createClient(metafilepath: string, metafile: Metafile) {\n  let socketfilepath = metafilepath.slice(0, -5);\n  let [reader, writer] = createServerPipeTransport(socketfilepath);\n  let client = createMessageConnection(reader, writer);\n  client.listen();\n\n  let uris = new Set<DocumentUri>();\n\n  let result = {\n    connection: client,\n    uris,\n    projectRoot: metafile.projectRoot,\n    lastBuild: '0',\n  };\n\n  client.onNotification(NotificationBuildStatus, (state, message) => {\n    // console.log('got NotificationBuildStatus', state, message);\n    if (state === 'start') {\n      progressReporter.begin();\n      for (let uri of uris) {\n        connection.sendDiagnostics({uri, diagnostics: []});\n      }\n    } else if (state === 'progress' && message != null) {\n      progressReporter.report(message);\n    } else if (state === 'end') {\n      result.lastBuild = String(Date.now());\n      sendDiagnosticsRefresh();\n      progressReporter.done();\n      connection.sendNotification(NotificationBuild);\n    }\n  });\n\n  client.onNotification(NotificationWorkspaceDiagnostics, diagnostics => {\n    // console.log('got NotificationWorkspaceDiagnostics', diagnostics);\n    for (let d of diagnostics) {\n      uris.add(d.uri);\n      connection.sendDiagnostics(d);\n    }\n  });\n\n  client.onClose(() => {\n    clients.delete(JSON.stringify(metafile));\n    sendDiagnosticsRefresh();\n    return Promise.all(\n      [...uris].map(uri => connection.sendDiagnostics({uri, diagnostics: []})),\n    );\n  });\n\n  sendDiagnosticsRefresh();\n  clients.set(JSON.stringify(metafile), result);\n}\n\n// Take realpath because to have consistent cache keys on macOS (/var -> /private/var)\nconst BASEDIR = path.join(fs.realpathSync(os.tmpdir()), 'parcel-lsp');\nfs.mkdirSync(BASEDIR, {recursive: true});\n\nfs.writeFileSync(path.join(BASEDIR, LSP_SENTINEL_FILENAME), '');\n\n// Search for currently running Parcel processes in the parcel-lsp dir.\n// Create an IPC client connection for each running process.\nfor (let filename of fs.readdirSync(BASEDIR)) {\n  if (!filename.endsWith('.json')) continue;\n  let filepath = path.join(BASEDIR, filename);\n  const contents = loadMetafile(filepath);\n  const {projectRoot} = contents;\n\n  if (WORKSPACE_ROOT === projectRoot) {\n    createClient(filepath, contents);\n  }\n}\n\n// Watch for new Parcel processes in the parcel-lsp dir, and disconnect the\n// client for each corresponding connection when a Parcel process ends\nwatcher.subscribe(BASEDIR, async (err, events) => {\n  if (err) {\n    throw err;\n  }\n\n  for (let event of events) {\n    if (event.type === 'create' && event.path.endsWith('.json')) {\n      const contents = loadMetafile(event.path);\n      const {projectRoot} = contents;\n\n      if (WORKSPACE_ROOT === projectRoot) {\n        createClient(event.path, contents);\n      }\n    } else if (event.type === 'delete' && event.path.endsWith('.json')) {\n      let existing = clients.get(event.path);\n      console.log('existing', event.path, existing);\n      if (existing) {\n        clients.delete(event.path);\n        existing.connection.end();\n      }\n    }\n  }\n});\n"
  },
  {
    "path": "packages/utils/parcel-lsp/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"target\": \"es6\",\n    \"outDir\": \"lib\",\n    \"lib\": [\"es6\"],\n    \"sourceMap\": true,\n    \"rootDir\": \"src\",\n    \"strict\": true,\n    \"allowJs\": true\n  },\n  \"include\": [\"src/*\"],\n  \"exclude\": [\"node_modules\", \".vscode-test\"]\n}\n"
  },
  {
    "path": "packages/utils/parcel-lsp-protocol/index.ts",
    "content": "export * from './src/index';\n"
  },
  {
    "path": "packages/utils/parcel-lsp-protocol/package.json",
    "content": "{\n  \"name\": \"@parcel/lsp-protocol\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"types\": \"src/index.js\",\n  \"scripts\": {\n    \"watch\": \"tsc -watch -p ./\"\n  },\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"devDependencies\": {\n    \"typescript\": \">=3.0.0\"\n  },\n  \"dependencies\": {\n    \"vscode-jsonrpc\": \"^8.2.1\"\n  },\n  \"targets\": {\n    \"types\": false\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcel-lsp-protocol/src/index.js",
    "content": "// @flow\nconst {\n  NotificationType,\n  NotificationType0,\n  NotificationType2,\n  RequestType,\n} = require('vscode-jsonrpc/node');\n\n// -------------------------------- Typescript-specific definitions\n\n/**\n * @typedef {import(\"vscode-languageserver\")} lsp\n *\n * @typedef PublishDiagnostic\n * @prop {import('vscode-languageserver').DocumentUri} uri\n * @prop {Array<import('vscode-languageserver').Diagnostics>} diagnostics\n */\n\n// -------------------------------- Flow-specific defintions\n\n/*::\nexport type PublishDiagnostic = {|\n  uri: DocumentUri,\n  diagnostics: Array<Diagnostic>,\n|};\n\nimport type {Diagnostic, DocumentUri} from 'vscode-languageserver';\n*/\n\n// --------------------------------\n\n/**\n * @type {RequestType<DocumentUri, Array<DocumentUri> | null, void>}\n */\n// Request: LSP Server -> Reporter\nexport const RequestImporters /*: RequestType<DocumentUri, Array<DocumentUri> | null, void> */ =\n  new RequestType('parcel/request-importers');\n\n/**\n * @type {RequestType<DocumentUri, Array<Diagnostic> | undefined, void>}\n */\n// Request: LSP Server -> Reporter\nexport const RequestDocumentDiagnostics /*: RequestType<DocumentUri, Array<Diagnostic> | void, void> */ =\n  new RequestType('parcel/request-document-diagnostics');\n\n/**\n * @type {NotificationType<Array<PublishDiagnostic>>}\n */\n// Notification: Reporter -> LSP Server\nexport const NotificationWorkspaceDiagnostics /*: NotificationType<Array<PublishDiagnostic>> */ =\n  new NotificationType('parcel/notification-workspace-diagnostics');\n\n/**\n * @type {NotificationType2<'start' | 'progress' | 'end', string | void>}\n */\n// Notification: Reporter -> LSP Server\nexport const NotificationBuildStatus /*: NotificationType2<'start' | 'progress' | 'end', string | void> */ =\n  new NotificationType2('parcel/notification-build-status');\n\n// --------------------------------\n\n// Notification: LSP Server -> VSC Extension\n/**\n * @type {import('vscode-languageserver').NotificationType0}\n */\nexport const NotificationBuild /*: mixed */ = new NotificationType0(\n  'parcel/notification-build',\n);\n"
  },
  {
    "path": "packages/utils/parcel-lsp-protocol/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"target\": \"es6\",\n    \"outDir\": \"lib\",\n    \"lib\": [\"es6\"],\n    \"sourceMap\": true,\n    \"rootDir\": \"src\",\n    \"strict\": true,\n    \"allowJs\": true\n  },\n  \"include\": [\"src/*\"],\n  \"exclude\": [\"node_modules\", \".vscode-test\"]\n}\n"
  },
  {
    "path": "packages/utils/parcel-watcher-watchman-js/README.md",
    "content": "# @parcel/watcher-watchman-js\n\nThis package acts as a drop-in replacements for `@parcel/watcher` but only for\nwatchman. It's a temporary workaround for some bugs and feature gaps with the\nC++ watchman client.\n\nIt is intended to replace `@parcel/watcher` within node_modules.\n"
  },
  {
    "path": "packages/utils/parcel-watcher-watchman-js/package.json",
    "content": "{\n  \"name\": \"@parcel/watcher-watchman-js\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"dependencies\": {\n    \"@parcel/logger\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"fb-watchman\": \"^2.0.2\"\n  },\n  \"devDependencies\": {\n    \"@parcel/watcher\": \"^2.4.1\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcel-watcher-watchman-js/src/index.js",
    "content": "import {ParcelWatcherWatchmanJS} from './wrapper';\n\nconst wrapper = new ParcelWatcherWatchmanJS();\n\nexport const writeSnapshot = wrapper.writeSnapshot.bind(wrapper);\nexport const getEventsSince = wrapper.getEventsSince.bind(wrapper);\nexport const subscribe = wrapper.subscribe.bind(wrapper);\nexport const unsubscribe = wrapper.unsubscribe.bind(wrapper);\n"
  },
  {
    "path": "packages/utils/parcel-watcher-watchman-js/src/wrapper.js",
    "content": "// @flow\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport * as watchman from 'fb-watchman';\nimport {isGlob} from '@parcel/utils';\nimport logger from '@parcel/logger';\nimport type {\n  Options,\n  Event,\n  SubscribeCallback,\n  AsyncSubscription,\n} from '@parcel/watcher';\n\ntype WatchmanArgs = any;\ntype FilePath = string;\ntype GlobPattern = string;\n\n// Matches the Watcher API from \"@parcel/watcher\"\nexport interface Watcher {\n  getEventsSince(\n    dir: FilePath,\n    snapshot: FilePath,\n    opts?: Options,\n  ): Promise<Array<Event>>;\n  subscribe(\n    dir: FilePath,\n    fn: SubscribeCallback,\n    opts?: Options,\n  ): Promise<AsyncSubscription>;\n  unsubscribe(\n    dir: FilePath,\n    fn: SubscribeCallback,\n    opts?: Options,\n  ): Promise<void>;\n  writeSnapshot(\n    dir: FilePath,\n    snapshot: FilePath,\n    opts?: Options,\n  ): Promise<FilePath>;\n}\n\nexport class ParcelWatcherWatchmanJS implements Watcher {\n  subscriptionName: string;\n  client: watchman.Client;\n  initPromise: Promise<void> | void;\n\n  constructor() {\n    this.subscriptionName = 'parcel-watcher-subscription-' + Date.now();\n    this.client = new watchman.Client();\n  }\n\n  commandAsync(args: any[]): Promise<any> {\n    return new Promise((resolve, reject) => {\n      const client = this.client;\n      client.command(\n        args,\n        // $FlowFixMe\n        (err: Error | null | undefined, response: any) => {\n          if (err) reject(err);\n          else resolve(response);\n        },\n      );\n    });\n  }\n\n  capabilityCheckAsync(args: any): Promise<any> {\n    return new Promise((resolve, reject) => {\n      const client = this.client;\n      client.capabilityCheck(\n        args,\n        // $FlowFixMe\n        (err: Error | null | undefined, response: any) => {\n          if (err) reject(err);\n          else resolve(response);\n        },\n      );\n    });\n  }\n  async _init(watchDir: string): Promise<void> {\n    await this.capabilityCheckAsync({optional: [], required: []});\n    const resp = await this.commandAsync(['watch-project', watchDir]);\n\n    if ('warning' in resp) {\n      logger.warn({message: resp.warning});\n    }\n  }\n\n  init(watchDir: string): Promise<void> {\n    if (this.initPromise) {\n      return this.initPromise;\n    }\n\n    this.initPromise = this._init(watchDir);\n\n    return this.initPromise;\n  }\n\n  // Types should match @parcel/watcher/index.js.flow\n  async writeSnapshot(dir: string, snapshot: FilePath): Promise<string> {\n    await this.init(dir);\n\n    const response = await this.commandAsync(['clock', dir]);\n    fs.writeFileSync(snapshot, response.clock, {\n      encoding: 'utf-8',\n    });\n    return response.clock;\n  }\n\n  async getEventsSince(\n    dir: string,\n    snapshot: FilePath,\n    opts?: Options,\n  ): Promise<Event[]> {\n    await this.init(dir);\n\n    const clock = fs.readFileSync(snapshot, {\n      encoding: 'utf-8',\n    });\n\n    const response = await this.commandAsync([\n      'query',\n      dir,\n      {\n        expression: this._createExpression(dir, opts?.ignore),\n        fields: ['name', 'mode', 'exists', 'new'],\n        since: clock,\n      },\n    ]);\n\n    return (response.files || []).map((file: any) => ({\n      path: file.name,\n      type: file.new ? 'create' : file.exists ? 'update' : 'delete',\n    }));\n  }\n\n  _createExpression(\n    dir: string,\n    ignore?: Array<FilePath | GlobPattern>,\n  ): WatchmanArgs {\n    const ignores = [\n      // Ignore the watchman cookie\n      ['match', '.watchman-cookie-*'],\n      // Ignore directory changes as they are just noise\n      ['type', 'd'],\n    ];\n\n    if (ignore) {\n      const customIgnores = ignore?.map(filePathOrGlob => {\n        const relative = path.relative(dir, filePathOrGlob);\n\n        if (isGlob(filePathOrGlob)) {\n          return ['match', relative, 'wholename'];\n        }\n\n        // If pattern is not a glob, then assume it's a directory.\n        // Ignoring single files is not currently supported\n        return ['dirname', relative];\n      });\n\n      ignores.push(...customIgnores);\n    }\n\n    return ['not', ['anyof', ...ignores]];\n  }\n\n  async subscribe(\n    dir: string,\n    fn: SubscribeCallback,\n    opts?: Options,\n  ): Promise<AsyncSubscription> {\n    await this.init(dir);\n\n    const {subscriptionName} = this;\n    const {clock} = await this.commandAsync(['clock', dir]);\n\n    await this.commandAsync([\n      'subscribe',\n      dir,\n      subscriptionName,\n      {\n        // `defer` can be used here if you want to pause the\n        // notification stream until something has finished.\n        //\n        // https://facebook.github.io/watchman/docs/cmd/subscribe#defer\n        // defer: ['my-company-example'],\n        expression: this._createExpression(dir, opts?.ignore),\n        fields: ['name', 'mode', 'exists', 'new'],\n        since: clock,\n      },\n    ]);\n\n    this.client.on('subscription', function (resp) {\n      if (!resp.files || resp.subscription !== subscriptionName) {\n        return;\n      }\n\n      fn(\n        null /* err */,\n        resp.files.map((file: any) => {\n          return {\n            path: path.join(dir, file.name),\n            type: file.new ? 'create' : file.exists ? 'update' : 'delete',\n          };\n        }),\n      );\n    });\n\n    const unsubscribe = async () => {\n      await this.commandAsync(['unsubscribe', dir, subscriptionName]);\n    };\n\n    return {\n      unsubscribe,\n    };\n  }\n\n  async unsubscribe(dir: string): Promise<void> {\n    await this.commandAsync(['unsubscribe', dir, this.subscriptionName]);\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcelforvscode/.eslintrc.json",
    "content": "{\n  \"root\": true,\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": 6,\n    \"sourceType\": \"module\"\n  },\n  \"plugins\": [\"@typescript-eslint\"],\n  \"rules\": {\n    \"@typescript-eslint/semi\": \"warn\",\n    \"curly\": \"warn\",\n    \"eqeqeq\": \"warn\",\n    \"no-throw-literal\": \"warn\",\n    \"semi\": \"off\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcelforvscode/.gitignore",
    "content": "out\ndist\nnode_modules\n.vscode-test/\n*.vsix\n"
  },
  {
    "path": "packages/utils/parcelforvscode/.vscodeignore",
    "content": ".vscode/**\n.vscode-test/**\nout/test/**\nsrc/**\n.gitignore\n.yarnrc\nvsc-extension-quickstart.md\n**/tsconfig.json\n**/.eslintrc.json\n**/*.map\n**/*.ts\n.parcel-cache/\n"
  },
  {
    "path": "packages/utils/parcelforvscode/.yarnrc",
    "content": "--ignore-engines true"
  },
  {
    "path": "packages/utils/parcelforvscode/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to the \"parcelforvscode\" extension will be documented in this file.\n\nCheck [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.\n\n## [Unreleased]\n\n- Initial release\n"
  },
  {
    "path": "packages/utils/parcelforvscode/CONTRIBUTING.md",
    "content": "## Development Debugging\n\n1. Go to the Run and Debug menu in VSCode\n2. Select \"Launch Parcel for VSCode Extension\"\n3. Specify in which project to run the Extension Development Host in `launch.json`:\n\n```\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"args\": [\n        \"${workspaceFolder}/packages/examples/kitchen-sink\", // Change this project\n        \"--extensionDevelopmentPath=${workspaceFolder}/packages/utils/parcelforvscode\"\n      ],\n      \"name\": \"Launch Parcel for VSCode Extension\",\n      \"outFiles\": [\n        \"${workspaceFolder}/packages/utils/parcelforvscode/out/**/*.js\"\n      ],\n      \"preLaunchTask\": \"Watch VSCode Extension\",\n      \"request\": \"launch\",\n      \"type\": \"extensionHost\"\n    }\n  ]\n}\n```\n\n4. Run a Parcel command (e.g. `parcel server --reporter @parcel/reporter-lsp`) in the Extension Host window.\n5. Diagnostics should appear in the Extension Host window in the Problems panel (Shift + CMD + m).\n6. Output from the extension should be available in the Output panel (Shift + CMD + u) in the launching window.\n\n## Packaging\n\n1. Run `yarn package`. The output is a `.vsix` file.\n2. Run `code --install-extension parcel-for-vscode-<version>.vsix`\n"
  },
  {
    "path": "packages/utils/parcelforvscode/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2017-present Devon Govett\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/utils/parcelforvscode/README.md",
    "content": "# Parcel\n\nThis extension shows errors, warnings and other diagnostics inline in VS Code.\n\n## Usage\n\n1. Install this extension\n2. In your project, install `@parcel/reporter-lsp` and run Parcel with that reporter, e.g. `parcel src/index.html --reporter @parcel/reporter-lsp`.\n"
  },
  {
    "path": "packages/utils/parcelforvscode/package.json",
    "content": "{\n  \"name\": \"parcel-for-vscode\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publisher\": \"parcel\",\n  \"icon\": \"logo.png\",\n  \"displayName\": \"Parcel for VS Code\",\n  \"parcel-lsp.trace.server\": \"verbose\",\n  \"description\": \"\",\n  \"private\": true,\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\",\n    \"directory\": \"packages/utils/parcelforvscode\"\n  },\n  \"engines\": {\n    \"vscode\": \"^1.67.0\"\n  },\n  \"categories\": [\n    \"Other\"\n  ],\n  \"activationEvents\": [\n    \"onStartupFinished\"\n  ],\n  \"contributes\": {\n    \"jsonValidation\": [\n      {\n        \"fileMatch\": \".parcelrc\",\n        \"url\": \"./schemas/parcelrc.schema.json\"\n      },\n      {\n        \"fileMatch\": \"package.json\",\n        \"url\": \"./schemas/package-targets.schema.json\"\n      }\n    ],\n    \"languages\": [\n      {\n        \"id\": \"jsonc\",\n        \"filenames\": [\n          \".parcelrc\",\n          \".parcelrc*\"\n        ]\n      }\n    ],\n    \"views\": {\n      \"explorer\": [\n        {\n          \"id\": \"importersView\",\n          \"name\": \"Importers\"\n        }\n      ]\n    },\n    \"viewsWelcome\": [\n      {\n        \"view\": \"importersView\",\n        \"contents\": \"Use 'Focus in importers view' to show importers of the active editor\"\n      }\n    ],\n    \"commands\": [\n      {\n        \"command\": \"importersView.focus\",\n        \"title\": \"Focus in importers view\"\n      }\n    ],\n    \"menus\": {\n      \"commandPalette\": [\n        {\n          \"command\": \"importersView.focus\"\n        }\n      ]\n    }\n  },\n  \"main\": \"./lib/extension.js\",\n  \"server\": \"./lib/server.js\",\n  \"targets\": {\n    \"main\": {\n      \"source\": \"src/extension.ts\",\n      \"outputFormat\": \"commonjs\",\n      \"isLibrary\": false,\n      \"optimize\": false,\n      \"includeNodeModules\": {\n        \"vscode\": false\n      },\n      \"context\": \"node\"\n    },\n    \"server\": {\n      \"source\": \"src/server.ts\",\n      \"outputFormat\": \"commonjs\",\n      \"isLibrary\": false,\n      \"optimize\": false,\n      \"includeNodeModules\": {\n        \"@parcel/watcher\": false\n      },\n      \"context\": \"node\"\n    }\n  },\n  \"scripts\": {\n    \"vscode:prepublish\": \"rm -rf lib; parcel build --no-cache\",\n    \"package\": \"vsce package --yarn\",\n    \"compile\": \"tsc -p ./\",\n    \"watch\": \"tsc -watch -p ./\",\n    \"pretest\": \"yarn run compile && yarn run lint\",\n    \"lint\": \"eslint src --ext ts\"\n  },\n  \"devDependencies\": {\n    \"@parcel/lsp\": \"2.16.4\",\n    \"@parcel/lsp-protocol\": \"2.16.4\",\n    \"@types/mocha\": \"^8.2.3\",\n    \"@types/node\": \"^22.15.17\",\n    \"@types/vscode\": \"^1.67.0\",\n    \"@typescript-eslint/eslint-plugin\": \"^5.59.7\",\n    \"@typescript-eslint/parser\": \"^5.59.7\",\n    \"eslint\": \"^8.57.1\",\n    \"glob\": \"^7.2.3\",\n    \"mocha\": \"^8.4.0\",\n    \"typescript\": \">=3.0.0\",\n    \"vsce-yarn-patch\": \"^1.66.2\",\n    \"vscode-languageclient\": \"^8.1.0\",\n    \"vscode-test\": \"^1.6.1\"\n  },\n  \"dependencies\": {\n    \"@parcel/watcher\": \"^2.0.7\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcelforvscode/schemas/package-targets.schema.json",
    "content": "{\n  \"title\": \"JSON schema for .parcelrc files\",\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"type\": \"object\",\n  \"$defs\": {\n    \"engines\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"browsers\": {\n          \"oneOf\": [\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            {\n              \"type\": \"string\"\n            }\n          ]\n        }\n      },\n      \"additionalProperties\": {\n        \"type\": \"string\"\n      }\n    },\n    \"target\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"context\": {\n          \"description\": \"The context property defines what type of environment to build for. This tells Parcel what environment-specific APIs are available, e.g. the DOM, Node filesystem APIs.\",\n          \"type\": \"string\",\n          \"enum\": [\n            \"node\",\n            \"browser\",\n            \"web-worker\",\n            \"electron-main\",\n            \"electron-renderer\",\n            \"service-worker\"\n          ]\n        },\n        \"includeNodeModules\": {\n          \"description\": \"Determines whether to bundle node_modules or treat them as external. The default is true for browser targets, and false for library targets.\",\n          \"oneOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\",\n                \"description\": \"a wildcard or filepath\"\n              }\n            },\n            {\n              \"type\": \"object\",\n              \"properties\": {},\n              \"additionalProperties\": {\n                \"type\": \"boolean\"\n              }\n            }\n          ]\n        },\n        \"outputFormat\": {\n          \"description\": \"Defines what type of module to output.\",\n          \"type\": \"string\",\n          \"enum\": [\"global\", \"esmodule\", \"commonjs\"]\n        },\n        \"distDir\": {\n          \"description\": \"Sets the location where compiled bundles in this target will be written\",\n          \"type\": \"string\"\n        },\n        \"publicUrl\": {\n          \"description\": \"Sets the base URL at which this bundle will be loaded at runtime\",\n          \"type\": \"string\"\n        },\n        \"isLibrary\": {\n          \"description\": \"When set to true, the target is treated as a library that would be published to npm and consumed by another tool rather than used directly in a browser or other target environment.\",\n          \"type\": \"boolean\"\n        },\n        \"source\": {\n          \"description\": \"Overrides the top-level `source` field in package.json for a target. This allows for each target to have different entries.\",\n          \"oneOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            }\n          ]\n        },\n        \"sourceMap\": {\n          \"description\": \"Enables or disables source maps, and sets source map options.\",\n          \"oneOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"type\": \"object\",\n              \"properties\": {\n                \"inlineSources\": {\n                  \"type\": \"boolean\"\n                },\n                \"sourceRoot\": {\n                  \"type\": \"string\"\n                },\n                \"inline\": {\n                  \"type\": \"boolean\"\n                }\n              },\n              \"additionalProperties\": false\n            }\n          ]\n        },\n        \"engines\": {\n          \"description\": \"Overrides the engines defined in the top-level `package.json#engines` and `browserslist` fields for this target.\",\n          \"$ref\": \"#/$defs/engines\"\n        },\n        \"optimize\": {\n          \"description\": \"Enables or disables optimization (e.g. minification). Exact behavior is determined by plugins.\",\n          \"type\": \"boolean\"\n        },\n        \"scopeHoist\": {\n          \"description\": \"Enables or disables scope hoisting.\",\n          \"type\": \"boolean\"\n        }\n      },\n      \"additionalProperties\": false\n    },\n    \"commonTarget\": {\n      \"oneOf\": [\n        {\n          \"$ref\": \"#/$defs/target\"\n        },\n        {\n          \"enum\": [false]\n        }\n      ]\n    }\n  },\n  \"properties\": {\n    \"targets\": {\n      \"type\": \"object\",\n      \"description\": \"Parcel can compile your source code in multiple different ways (targets) simultaneously.\",\n      \"properties\": {\n        \"main\": {\n          \"$ref\": \"#/$defs/commonTarget\"\n        },\n        \"module\": {\n          \"$ref\": \"#/$defs/commonTarget\"\n        },\n        \"browser\": {\n          \"$ref\": \"#/$defs/commonTarget\"\n        },\n        \"types\": {\n          \"$ref\": \"#/$defs/commonTarget\"\n        }\n      },\n      \"additionalProperties\": {\n        \"$ref\": \"#/$defs/target\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcelforvscode/schemas/parcelrc.schema.json",
    "content": "{\n  \"title\": \"JSON schema for .parcelrc files\",\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"type\": \"object\",\n  \"allowTrailingCommas\": true,\n  \"$defs\": {\n    \"plugin\": {\n      \"type\": \"string\"\n    },\n    \"plugins\": {\n      \"defaultSnippets\": [\n        {\n          \"body\": [\"$1\", \"...\"]\n        }\n      ],\n      \"type\": \"array\",\n      \"uniqueItems\": true,\n      \"items\": {\n        \"$ref\": \"#/$defs/plugin\"\n      }\n    },\n    \"pluginGlobMap\": {\n      \"type\": \"object\",\n      \"properties\": {},\n      \"additionalProperties\": {\n        \"$ref\": \"#/$defs/plugin\"\n      }\n    },\n    \"pluginsGlobMap\": {\n      \"type\": \"object\",\n      \"properties\": {},\n      \"additionalProperties\": {\n        \"$ref\": \"#/$defs/plugins\"\n      }\n    }\n  },\n  \"properties\": {\n    \"extends\": {\n      \"oneOf\": [\n        {\n          \"$ref\": \"#/$defs/plugin\"\n        },\n        {\n          \"$ref\": \"#/$defs/plugins\"\n        }\n      ],\n      \"default\": \"@parcel/extends-default\"\n    },\n    \"bundler\": {\n      \"description\": \"Transform the entire asset graph by grouping the assets into the output bundles.\",\n      \"$ref\": \"#/$defs/plugin\"\n    },\n    \"resolvers\": {\n      \"description\": \"Resolve a dependency to a file path or virtual module.\",\n      \"$ref\": \"#/$defs/plugins\"\n    },\n    \"transformers\": {\n      \"description\": \"Compile individual source files and extract dependencies.\",\n      \"$ref\": \"#/$defs/pluginsGlobMap\"\n    },\n    \"validators\": {\n      \"description\": \"Validates individual assets and can throw errors or log warnings with diagnostics to validate the input.\",\n      \"$ref\": \"#/$defs/pluginsGlobMap\"\n    },\n    \"namers\": {\n      \"description\": \"Determine the name of an output bundle.\",\n      \"$ref\": \"#/$defs/plugins\"\n    },\n    \"packagers\": {\n      \"description\": \"Combine multiple assets together into a single output bundle.\",\n      \"$ref\": \"#/$defs/pluginGlobMap\"\n    },\n    \"optimizers\": {\n      \"description\": \"Minify, optimize, and transform output bundles.\",\n      \"$ref\": \"#/$defs/pluginsGlobMap\"\n    },\n    \"compressors\": {\n      \"description\": \"Compress and encode output bundles in multiple formats.\",\n      \"$ref\": \"#/$defs/pluginsGlobMap\"\n    },\n    \"reporters\": {\n      \"description\": \"Receive events on build progress and completion.\",\n      \"$ref\": \"#/$defs/plugins\"\n    },\n    \"runtimes\": {\n      \"description\": \"Return additional assets to be inserted into a bundle.\",\n      \"$ref\": \"#/$defs/plugins\"\n    }\n  },\n  \"additionalProperties\": false,\n  \"default\": {\n    \"extends\": \"@parcel/config-default\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcelforvscode/src/extension.ts",
    "content": "/* eslint-disable @typescript-eslint/naming-convention */\nimport type {ExtensionContext} from 'vscode';\n\nimport * as vscode from 'vscode';\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport * as os from 'os';\n\nimport {\n  LanguageClient,\n  LanguageClientOptions,\n  ServerOptions,\n  TransportKind,\n} from 'vscode-languageclient/node';\nimport {addImportersView} from './importersView';\n\nlet client: LanguageClient;\n\nexport function activate(context: vscode.ExtensionContext) {\n  // The server is implemented in node\n  let serverModule = path.join(context.extensionPath, 'lib', 'server.js');\n  // The debug options for the server\n  // --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging\n  let debugOptions = {execArgv: ['--nolazy', '--inspect=6009']};\n\n  // If the extension is launched in debug mode then the debug server options are used\n  // Otherwise the run options are used\n  let serverOptions: ServerOptions = {\n    run: {module: serverModule, transport: TransportKind.ipc},\n    debug: {\n      module: serverModule,\n      transport: TransportKind.ipc,\n      options: debugOptions,\n    },\n  };\n\n  // Options to control the language client\n  let clientOptions: LanguageClientOptions = {\n    documentSelector: [{scheme: 'file', pattern: '**/*'}],\n  };\n  // Create the language client and start the client.\n  client = new LanguageClient('parcel', 'Parcel', serverOptions, clientOptions);\n\n  // Start the client. This will also launch the server\n  client.start();\n\n  addImportersView(context, client);\n}\n\nexport function deactivate(): Thenable<void> | undefined {\n  if (!client) {\n    return undefined;\n  }\n\n  const LSP_SENTINEL_FILEPATH = path.join(fs.realpathSync(os.tmpdir()), 'parcel-lsp', 'lsp-server');\n\n  if (fs.existsSync(LSP_SENTINEL_FILEPATH)) {\n    fs.rmSync(LSP_SENTINEL_FILEPATH);\n  } \n\n  return client.stop();\n}\n"
  },
  {
    "path": "packages/utils/parcelforvscode/src/importersView.ts",
    "content": "import * as vscode from 'vscode';\n\nimport {LanguageClient, DocumentUri} from 'vscode-languageclient/node';\nimport {NotificationBuild, RequestImporters} from '@parcel/lsp-protocol';\n\nexport function addImportersView(\n  context: vscode.ExtensionContext,\n  client: LanguageClient,\n) {\n  let importersTreeProvider = new ImportersTreeProvider(client);\n  context.subscriptions.push(\n    vscode.window.registerTreeDataProvider(\n      'importersView',\n      importersTreeProvider,\n    ),\n  );\n  context.subscriptions.push(\n    vscode.commands.registerCommand('importersView.focus', () => {\n      let activeEditor = vscode.window.activeTextEditor?.document.uri;\n      if (activeEditor) {\n        importersTreeProvider.setRoot(activeEditor.toString());\n      }\n    }),\n  );\n\n  context.subscriptions.push(\n    // Clear after builds\n    client.onNotification(NotificationBuild, () => {\n      importersTreeProvider.setRoot(undefined);\n    }),\n  );\n}\n\nexport class ImportersTreeProvider implements vscode.TreeDataProvider<string> {\n  client: LanguageClient;\n  cache: Map<DocumentUri, Array<DocumentUri>>;\n  changeEvent: vscode.EventEmitter<string | undefined>;\n\n  root: DocumentUri | undefined;\n  constructor(client: LanguageClient) {\n    this.client = client;\n    this.changeEvent = new vscode.EventEmitter();\n    this.onDidChangeTreeData = this.changeEvent.event;\n    this.cache = new Map();\n  }\n\n  setRoot(r: DocumentUri | undefined) {\n    this.root = r;\n    this.changeEvent.fire(undefined);\n    this.cache.clear();\n  }\n\n  onDidChangeTreeData:\n    | vscode.Event<string | void | string[] | null | undefined>\n    | undefined;\n\n  async getTreeItem(element: string) {\n    let uri = vscode.Uri.parse(element);\n    let children = await this.getChildren(element);\n    return {\n      resourceUri: uri,\n      collapsibleState:\n        children.length > 0\n          ? vscode.TreeItemCollapsibleState.Collapsed\n          : vscode.TreeItemCollapsibleState.None,\n      command: {\n        title: 'open',\n        command: 'vscode.open',\n        arguments: [uri],\n      },\n      iconPath: vscode.ThemeIcon.File,\n    };\n  }\n\n  async getChildren(element?: string | undefined) {\n    if (element) {\n      return await this.getAsset(element);\n    } else {\n      return this.root ? [this.root.toString()] : [];\n    }\n  }\n\n  private async getAsset(uri: DocumentUri) {\n    let cached = this.cache.get(uri);\n    if (cached) {\n      return cached;\n    }\n\n    let result = await this.client.sendRequest(RequestImporters, uri);\n    this.cache.set(uri, result ?? []);\n    return result ?? [];\n  }\n}\n"
  },
  {
    "path": "packages/utils/parcelforvscode/src/server.ts",
    "content": "import '@parcel/lsp';\n"
  },
  {
    "path": "packages/utils/parcelforvscode/src/test/runTest.ts",
    "content": "import * as path from 'path';\n\nimport { runTests } from 'vscode-test';\n\nasync function main() {\n\ttry {\n\t\t// The folder containing the Extension Manifest package.json\n\t\t// Passed to `--extensionDevelopmentPath`\n\t\tconst extensionDevelopmentPath = path.resolve(__dirname, '../../');\n\n\t\t// The path to test runner\n\t\t// Passed to --extensionTestsPath\n\t\tconst extensionTestsPath = path.resolve(__dirname, './suite/index');\n\n\t\t// Download VS Code, unzip it and run the integration test\n\t\tawait runTests({ extensionDevelopmentPath, extensionTestsPath });\n\t} catch (err) {\n\t\tconsole.error('Failed to run tests');\n\t\tprocess.exit(1);\n\t}\n}\n\nmain();\n"
  },
  {
    "path": "packages/utils/parcelforvscode/src/test/suite/extension.test.ts",
    "content": "import * as assert from 'assert';\n\n// You can import and use all API from the 'vscode' module\n// as well as import your extension to test it\nimport * as vscode from 'vscode';\n// import * as myExtension from '../../extension';\n\nsuite('Extension Test Suite', () => {\n\tvscode.window.showInformationMessage('Start all tests.');\n\n\ttest('Sample test', () => {\n\t\tassert.strictEqual(-1, [1, 2, 3].indexOf(5));\n\t\tassert.strictEqual(-1, [1, 2, 3].indexOf(0));\n\t});\n});\n"
  },
  {
    "path": "packages/utils/parcelforvscode/src/test/suite/index.ts",
    "content": "import * as path from 'path';\nimport * as Mocha from 'mocha';\nimport * as glob from 'glob';\n\nexport function run(): Promise<void> {\n\t// Create the mocha test\n\tconst mocha = new Mocha({\n\t\tui: 'tdd',\n\t\tcolor: true\n\t});\n\n\tconst testsRoot = path.resolve(__dirname, '..');\n\n\treturn new Promise((c, e) => {\n\t\tglob('**/**.test.js', { cwd: testsRoot }, (err, files) => {\n\t\t\tif (err) {\n\t\t\t\treturn e(err);\n\t\t\t}\n\n\t\t\t// Add files to the test suite\n\t\t\tfiles.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));\n\n\t\t\ttry {\n\t\t\t\t// Run the mocha test\n\t\t\t\tmocha.run(failures => {\n\t\t\t\t\tif (failures > 0) {\n\t\t\t\t\t\te(new Error(`${failures} tests failed.`));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tc();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(err);\n\t\t\t\te(err);\n\t\t\t}\n\t\t});\n\t});\n}\n"
  },
  {
    "path": "packages/utils/parcelforvscode/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"target\": \"es6\",\n    \"outDir\": \"lib\",\n    \"lib\": [\"es6\"],\n    \"sourceMap\": true,\n    \"rootDir\": \"src\",\n    \"strict\": true,\n    \"allowJs\": true\n  },\n  \"include\": [\"src/*\"],\n  \"exclude\": [\"node_modules\", \".vscode-test\"]\n}\n"
  },
  {
    "path": "packages/utils/parcelforvscode/vsc-extension-quickstart.md",
    "content": "# Welcome to your VS Code Extension\n\n## Get up and running straight away\n\n- Press `F5` to open a new window with your extension loaded.\n- Set breakpoints in your code inside `src/extension.ts` to debug your extension.\n- Find output from your extension in the debug console.\n- Run Parcel in a project with `--reporter @parcel/reporter-lsp`\n\n## Make changes\n\n- You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.\n- You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.\n\n## Explore the API\n\n- You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.\n\n## Run tests\n\n- Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`.\n- Press `F5` to run the tests in a new window with your extension loaded.\n- See the output of the test result in the debug console.\n- Make changes to `src/test/suite/extension.test.ts` or create new test files inside the `test/suite` folder.\n  - The provided test runner will only consider files matching the name pattern `**.test.ts`.\n  - You can create folders inside the `test` folder to structure your tests any way you want.\n\n## Go further\n\n- Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).\n- [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VSCode extension marketplace.\n- Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).\n"
  },
  {
    "path": "packages/utils/parcelforvscode/vscode-extension-TODO.md",
    "content": "Packages:\n\n- [@parcel/reporter-lsp](./packages/reporters/lsp-reporter/)\n- [parcel-for-vscode](./packages/utils/parcelforvscode/)\n- [@parcel/lsp](./packages/utils/parcel-lsp/)\n- [@parcel/lsp-protocol](./packages/utils/parcel-lsp-protocol)\n\nTODO:\n\n- [x] need to not wait for connections\n- [x] language server shuts down and kills our process when the extension is closed\n- [x] handle the case where parcel is started after the extension is running\n- [x] handle the case where extension is started while parcel is running\n- [x] support multiple parcels\n- [x] show prior diagnostics on connection\n- [x] only connect to parcels that match the workspace\n- [ ] show parcel diagnostic hints\n- [ ] implement quick fixes (requires Parcel changes?)\n- [x] cleanup LSP server sentinel when server shuts down\n- [x] support multiple LSP servers (make sure a workspace only sees errors from its server)\n- [x] cleanup the lsp reporter's server detection (make async, maybe use file watcher)\n- [ ] make @parcel/reporter-lsp part of default config or otherwise always installed\n      (or, move the reporter's behavior into core)\n\nIdeas:\n\n- a `parcel lsp` cli command to replace/subsume the standalone `@parcel/lsp` server\n  - this could take on the complexities of decision making like automatically\n    starting a Parcel build if one isn’t running, or sharing an LSP server\n    for the same parcel project with multiple workspaces/instances, etc.\n- integrating the behavior of `@parcel/reporter-lsp` into core\n  or otherwise having the reporter be 'always on' or part of default config\n"
  },
  {
    "path": "packages/utils/rsc/package.json",
    "content": "{\n  \"name\": \"@parcel/rsc\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"sideEffects\": false,\n  \"exports\": {\n    \".\": {\n      \"types\": \"./src/ssg.d.ts\"\n    },\n    \"./client\": {\n      \"types\": \"./lib/client.d.ts\",\n      \"default\": \"./src/client.tsx\"\n    },\n    \"./server\": {\n      \"types\": \"./lib/server.d.ts\",\n      \"default\": \"./src/server.tsx\"\n    },\n    \"./node\": {\n      \"types\": \"./lib/node.d.ts\",\n      \"default\": \"./src/node.tsx\"\n    }\n  },\n  \"dependencies\": {\n    \"react-server-dom-parcel\": \"^19.1.1\",\n    \"rsc-html-stream\": \"^0.0.6\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^22.15.17\",\n    \"@types/react\": \"^19.1.3\",\n    \"@types/react-dom\": \"^19.1.3\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"^19.1.0\",\n    \"react-dom\": \"^19.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/rsc/src/client.tsx",
    "content": "/* @jsxRuntime automatic */\nimport {ReactNode, startTransition, useInsertionEffect} from 'react';\nimport {createFromReadableStream, createFromFetch, encodeReply, setServerCallback as setReactServerCallback, createTemporaryReferenceSet} from 'react-server-dom-parcel/client';\nimport {rscStream} from 'rsc-html-stream/client';\nimport {hydrateRoot, HydrationOptions, Root} from 'react-dom/client';\n\nexport type CallServerCallback = <T>(id: string, args: any[]) => Promise<T>;\nexport function setServerCallback(cb: CallServerCallback): void {\n  return setReactServerCallback(cb);\n}\n\n// Stream in initial RSC payload embedded in the HTML.\nlet initialRSCPayload: Promise<ReactNode>;\nfunction RSCRoot({value, cb}: {value?: ReactNode, cb?: () => void}) {\n  initialRSCPayload ??= createFromReadableStream<ReactNode>(rscStream);\n  useInsertionEffect(() => {\n    cb?.();\n  });\n  return value === undefined ? initialRSCPayload : value;\n}\n\nexport interface HydrateOptions extends HydrationOptions {\n  callServer?: CallServerCallback,\n  onHmrReload?: () => void\n}\n\nexport function hydrate(options?: HydrateOptions): (value: ReactNode, cb?: () => void) => void {\n  if (options?.callServer) {\n    setServerCallback(options.callServer);\n  }\n\n  if (options?.onHmrReload) {\n    window.addEventListener('parcelhmrreload', e => {\n      e.preventDefault();\n      options?.onHmrReload?.();\n    });\n  }\n\n  let root: Root;\n  startTransition(() => {\n    root = hydrateRoot(document, <RSCRoot />, options);\n  });\n\n  return (value: ReactNode, cb?: () => void) => {\n    startTransition(() => {\n      root?.render(<RSCRoot value={value} cb={() => {cb?.(); cb = undefined}} />);\n    });\n  };\n}\n\nexport interface RSCRequestInit extends Omit<RequestInit, 'body'> {\n  body?: any\n}\n\nexport async function fetchRSC<T>(url: string | URL | Request, options?: RSCRequestInit): Promise<T> {\n  const temporaryReferences = createTemporaryReferenceSet();\n  const response = fetch(url, {\n    ...options,\n    headers: {\n      Accept: 'text/x-component',\n      ...options?.headers,\n    },\n    body: options && 'body' in options \n      ? await encodeReply(options.body, {temporaryReferences, signal: options?.signal})\n      : undefined,\n  });\n\n  return createFromFetch<T>(response, {temporaryReferences});\n}\n"
  },
  {
    "path": "packages/utils/rsc/src/node.tsx",
    "content": "/* @jsxRuntime automatic */\nimport type { IncomingMessage, ServerResponse } from 'http';\nimport type { ReadableStream as NodeReadableStream } from 'stream/web';\nimport type { ReactNode } from 'react';\n\nimport {Readable} from 'stream';\nimport {renderToReadableStream, createTemporaryReferenceSet} from 'react-server-dom-parcel/server.edge';\nimport {RSCToHTMLOptions, RSCOptions, renderHTML as renderHTMLBase, callAction as callActionBase, renderDevError} from './server';\n\nexport function renderRSC(root: any, options?: RSCOptions): Readable {\n  return Readable.fromWeb(renderToReadableStream(root, options) as NodeReadableStream);\n}\n\nexport async function renderHTML(root: any, options?: RSCToHTMLOptions): Promise<Readable> {\n  let htmlStream = await renderHTMLBase(root, options);\n  return Readable.fromWeb(htmlStream as NodeReadableStream);\n}\n\nconst temporaryReferencesSymbol = Symbol.for('temporaryReferences');\n\nexport interface RenderRequestOptions extends RSCToHTMLOptions {\n  renderError?: (err: Error) => ReactNode\n}\n\nexport async function renderRequest(request: IncomingMessage, response: ServerResponse, root: any, options?: RenderRequestOptions): Promise<void> {\n  options = {\n    ...options,\n    temporaryReferences: options?.temporaryReferences ?? (request as any)[temporaryReferencesSymbol]\n  };\n  \n  if (request.headers.accept?.includes('text/html')) {\n    try {\n      let html = await renderHTML(root, options);\n      response.setHeader('Content-Type', 'text/html');\n      html.pipe(response);\n    } catch (err) {\n      response.statusCode = 500;\n      let error = err instanceof Error ? err : new Error(String(err));\n      let renderedError;\n      try {\n        renderedError = options?.renderError \n          ? await renderHTMLBase(options.renderError(error), options)\n          : await renderDevError(error, options);\n      } catch {\n        renderedError = '<h1>Something went wrong!</h1>';\n      }\n      if (typeof renderedError === 'string') {\n        response.end(renderedError);\n      } else {\n        Readable.fromWeb(renderedError as NodeReadableStream).pipe(response);\n      }\n    }\n  } else {\n    response.setHeader('Content-Type', 'text/x-component');\n    renderRSC(root, options).pipe(response);\n  }\n}\n\nexport async function callAction(request: IncomingMessage, id: string | null | undefined): Promise<{result: any}> {\n  (request as any)[temporaryReferencesSymbol] ??= createTemporaryReferenceSet();\n\n  let req = new Request('http://localhost' + request.url, {\n    method: 'POST',\n    headers: request.headers as any,\n    body: Readable.toWeb(request) as ReadableStream,\n    // @ts-ignore\n    duplex: 'half'\n  });\n\n  (req as any)[temporaryReferencesSymbol] = (request as any)[temporaryReferencesSymbol];\n  return callActionBase(req, id);\n}\n"
  },
  {
    "path": "packages/utils/rsc/src/server.tsx",
    "content": "/* @jsxRuntime automatic */\nimport type { ErrorInfo } from 'react-dom/client';\n\n// Server dependencies.\nimport {renderToReadableStream, loadServerAction, decodeReply, decodeAction, createTemporaryReferenceSet} from 'react-server-dom-parcel/server.edge';\nimport {injectRSCPayload} from 'rsc-html-stream/server';\n\n// Client dependencies, used for SSR.\n// These must run in the same environment as client components (e.g. same instance of React).\nimport {createFromReadableStream} from 'react-server-dom-parcel/client.edge' with {env: 'react-client'};\nimport {renderToReadableStream as renderHTMLToReadableStream} from 'react-dom/server.edge' with {env: 'react-client'};\nimport {ComponentType, ReactNode} from 'react' with {env: 'react-client'};\n\nexport interface RSCOptions {\n  // environmentName?: string | (() => string),\n  // filterStackFrame?: (url: string, functionName: string) => boolean,\n  identifierPrefix?: string,\n  signal?: AbortSignal,\n  temporaryReferences?: any,\n  onError?: (error: unknown) => void,\n  onPostpone?: (reason: string) => void,\n}\n\nexport function renderRSC(root: any, options?: RSCOptions): ReadableStream {\n  return renderToReadableStream(root, options);\n}\n\nexport interface RSCToHTMLOptions {\n  component?: ComponentType,\n  identifierPrefix?: string;\n  namespaceURI?: string;\n  nonce?: string;\n  progressiveChunkSize?: number;\n  signal?: AbortSignal;\n  temporaryReferences?: any,\n  onError?: (error: unknown, errorInfo?: ErrorInfo) => string | void;\n}\n\nexport async function renderHTML(root: any, options?: RSCToHTMLOptions): Promise<ReadableStream> {\n  let rscStream = renderToReadableStream(root, options);\n\n  // Use client react to render the RSC payload to HTML.\n  let [s1, s2] = rscStream.tee();\n  let data: Promise<ReactNode>;\n  function Content() {\n    // Important: this must be constructed inside a component for preinit scripts to be inserted.\n    data ??= createFromReadableStream<ReactNode>(s1);\n    return data;\n  }\n\n  let htmlStream = await renderHTMLToReadableStream(<Content />, {\n    ...options,\n    bootstrapScriptContent: (options?.component as any)?.bootstrapScript,\n  });\n\n  return htmlStream.pipeThrough(injectRSCPayload(s2));\n}\n\nexport interface RenderRequestOptions extends RSCToHTMLOptions {\n  headers?: HeadersInit,\n  renderError?: (err: Error) => ReactNode\n}\n\nconst temporaryReferencesSymbol = Symbol.for('temporaryReferences')\n\nexport async function renderRequest(request: Request, root: any, options?: RenderRequestOptions): Promise<Response> {\n  options = {\n    ...options,\n    temporaryReferences: options?.temporaryReferences ?? (request as any)[temporaryReferencesSymbol]\n  };\n\n  if (request.headers.get('Accept')?.includes('text/html')) {\n    try {\n      let html = await renderHTML(root, options);\n      return new Response(html, {\n        headers: {\n          ...options?.headers,\n          'Content-Type': 'text/html'\n        }\n      });\n    } catch (err) {\n      let error = err instanceof Error ? err : new Error(String(err));\n      let res;\n      try {\n        res = options?.renderError \n          ? await renderHTML(options.renderError(error), options)\n          : await renderDevError(error, options);\n      } catch {\n        res = '<h1>Something went wrong!</h1>';\n      }\n      return new Response(res, {\n        status: 500,\n        headers: {\n          ...options?.headers,\n          'Content-Type': 'text/html'\n        }\n      });\n    }\n  } else {\n    let rscStream = renderToReadableStream(root, options);\n    return new Response(rscStream, {\n      headers: {\n        ...options?.headers,\n        'Content-Type': 'text/x-component'\n      }\n    });\n  }\n}\n\nexport async function callAction(request: Request, id: string | null | undefined): Promise<{result: any}> {\n  (request as any)[temporaryReferencesSymbol] ??= createTemporaryReferenceSet();\n\n  if (id) {\n    let action = await loadServerAction(id);\n    let body = request.headers.get('content-type')?.includes('multipart/form-data') \n      ? await request.formData()\n      : await request.text();\n    let args = await decodeReply<any[]>(body, {\n      temporaryReferences: (request as any)[temporaryReferencesSymbol]\n    });\n\n    let result = action.apply(null, args);\n    try {\n      // Wait for any mutations\n      await result;\n    } catch {\n      // Handle the error on the client\n    }\n    return {result};\n  } else {\n    // Form submitted by browser (progressive enhancement).\n    let formData = await request.formData();\n    let action = await decodeAction(formData);\n    // Don't catch error here: this should be handled by the caller (e.g. render an error page).\n    let result = await action();\n    return {result};\n  }\n}\n\nexport async function renderDevError(error: Error, options: RSCToHTMLOptions): Promise<ReadableStream | string> {\n  if (process.env.NODE_ENV !== 'production') {\n    let content = (\n      <html>\n        <meta charSet=\"utf-8\" />\n        <title>Error</title>\n        <body>\n          <noscript>\n            <h1>Error: {error.message}</h1>\n            <pre>{error.stack}</pre>\n          </noscript>\n        </body>\n      </html>\n    );\n\n    // Load bootstrap script containing error overlay, and re-throw server error on the client.\n    let bootstrapScript = (options?.component as any)?.bootstrapScript;\n    bootstrapScript += '.then(() => {';\n    bootstrapScript += `let err = new Error(${JSON.stringify(error.message)});`;\n    bootstrapScript += `err.stack = ${JSON.stringify(error.stack)};`;\n    bootstrapScript += 'throw err;';\n    bootstrapScript += '})';\n\n    return await renderHTML(content, {\n      ...options,\n      component: {\n        bootstrapScript\n      } as any\n    });\n  } else {\n    return '<h1>Something went wrong!</h1>';\n  }\n}\n"
  },
  {
    "path": "packages/utils/rsc/src/ssg.d.ts",
    "content": "export interface Page {\n  url: string;\n  name: string;\n  tableOfContents?: TocNode[];\n  exports?: Record<string, any>;\n}\n\nexport interface TocNode {\n  title: string;\n  level: number;\n  children: TocNode[];\n}\n\nexport interface PageProps {\n  pages: Page[];\n  currentPage: Page;\n}\n"
  },
  {
    "path": "packages/utils/rsc/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    /* Visit https://aka.ms/tsconfig to read more about this file */\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"jsx\": \"react-jsx\",\n    \"useDefineForClassFields\": true,\n\n    /* Modules */\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n\n    /* Emit */\n    \"noEmit\": true,\n    \"declaration\": true,\n\n    /* Interop Constraints */\n    \"isolatedModules\": true,\n    \"isolatedDeclarations\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"allowImportingTsExtensions\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n\n    /* Type Checking */\n    \"strict\": true,\n\n    /* Completeness */\n    \"skipLibCheck\": true\n  }\n}\n"
  },
  {
    "path": "packages/utils/rsc/types.d.ts",
    "content": "declare module 'react-server-dom-parcel/client' {\n  type TemporaryReferenceSet = {__ref: true};\n  type ReactCustomFormAction = {\n    name?: string;\n    action?: string;\n    encType?: string;\n    method?: string;\n    target?: string;\n    data?: null | FormData;\n  };\n  type EncodeFormActionCallback = <A>(\n    id: any,\n    args: Promise<A>,\n  ) => ReactCustomFormAction;\n  type Options = {\n    nonce?: string;\n    encodeFormAction?: EncodeFormActionCallback;\n    temporaryReferences?: TemporaryReferenceSet;\n    replayConsoleLogs?: boolean;\n    environmentName?: string;\n  };\n\n  export function createFromFetch<T>(\n    res: Promise<Response>,\n    options?: Options,\n  ): Promise<T>;\n  export function createFromReadableStream<T>(\n    stream: ReadableStream,\n    options?: Options,\n  ): Promise<T>;\n  export function encodeReply(\n    value: any,\n    options?: {\n      temporaryReferences?: TemporaryReferenceSet;\n      signal?: AbortSignal | null | undefined;\n    },\n  ): Promise<string | URLSearchParams | FormData>;\n  export function createTemporaryReferenceSet(): TemporaryReferenceSet;\n\n  type CallServerCallback = <T>(id: string, args: any[]) => Promise<T>;\n  export function setServerCallback(cb: CallServerCallback): void;\n}\n\ndeclare module 'react-server-dom-parcel/client.edge' {\n  export function createFromReadableStream<T>(\n    stream: ReadableStream,\n  ): Promise<T>;\n}\n\ndeclare module 'react-server-dom-parcel/server.edge' {\n  type TemporaryReferenceSet = {__ref: true};\n  type Options = {\n    environmentName?: string | (() => string);\n    filterStackFrame?: (url: string, functionName: string) => boolean;\n    identifierPrefix?: string;\n    signal?: AbortSignal;\n    temporaryReferences?: TemporaryReferenceSet;\n    onError?: (error: unknown) => void;\n    onPostpone?: (reason: string) => void;\n  };\n\n  export function renderToReadableStream(\n    value: any,\n    options?: Options,\n  ): ReadableStream;\n  export function loadServerAction(\n    id: string,\n  ): Promise<(...args: any[]) => Promise<any>>;\n  export function decodeReply<T>(\n    body: string | FormData,\n    options?: {temporaryReferences?: TemporaryReferenceSet},\n  ): Promise<T>;\n  export function decodeAction(\n    body: FormData,\n  ): Promise<(...args: any[]) => Promise<any>>;\n  export function createTemporaryReferenceSet(): TemporaryReferenceSet;\n}\n\ndeclare module 'react-dom/server.edge' {\n  export * from 'react-dom/server';\n}\n"
  },
  {
    "path": "packages/utils/service-worker/package.json",
    "content": "{\n  \"name\": \"@parcel/service-worker\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"service-worker.js\",\n  \"types\": \"service-worker.d.ts\",\n  \"sideEffects\": false,\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/service-worker/service-worker.d.ts",
    "content": "export const manifest: string[];\nexport const version: string;\n"
  },
  {
    "path": "packages/utils/service-worker/service-worker.js",
    "content": "export let manifest = [];\nexport let version = '';\n\n// Called by the runtime.\nexport function _register(m, v) {\n  manifest = m;\n  version = v;\n}\n"
  },
  {
    "path": "packages/utils/ts-utils/package.json",
    "content": "{\n  \"name\": \"@parcel/ts-utils\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/index.js\",\n  \"source\": \"src/index.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\"\n  },\n  \"dependencies\": {\n    \"nullthrows\": \"^1.1.1\"\n  },\n  \"devDependencies\": {\n    \"typescript\": \">=3.0.0\"\n  },\n  \"peerDependencies\": {\n    \"typescript\": \">=3.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/utils/ts-utils/src/CompilerHost.js",
    "content": "// @flow\nimport type {FileSystem} from '@parcel/fs';\nimport type {FilePath, PackageJSON, PluginLogger} from '@parcel/types';\nimport typeof TypeScriptModule from 'typescript'; // eslint-disable-line import/no-extraneous-dependencies\nimport type {CompilerOptions, SourceFile} from 'typescript';\nimport typeof {ScriptTarget} from 'typescript'; // eslint-disable-line import/no-extraneous-dependencies\n\nimport path from 'path';\nimport {FSHost} from './FSHost';\n\nexport class CompilerHost extends FSHost {\n  outputCode: ?string;\n  outputMap: ?string;\n  logger: PluginLogger;\n  // workaround for https://github.com/microsoft/TypeScript/issues/39547\n  redirectTypes: Map<FilePath, FilePath> = new Map();\n\n  constructor(fs: FileSystem, ts: TypeScriptModule, logger: PluginLogger) {\n    super(fs, ts);\n    this.logger = logger;\n  }\n\n  readFile(filePath: FilePath): void | string {\n    let contents = super.readFile(filePath);\n    if (contents && path.basename(filePath) === 'package.json') {\n      let json: PackageJSON = JSON.parse(contents);\n      if (\n        json.types != null &&\n        json.source != null &&\n        !super.fileExists(\n          path.posix.join(path.posix.dirname(filePath), json.types),\n        )\n      ) {\n        let source = path.posix.join(path.posix.dirname(filePath), json.source);\n        let fakeTypes =\n          source.slice(0, -path.posix.extname(source).length) + '.d.ts';\n        this.redirectTypes.set(fakeTypes, source);\n        json.types = fakeTypes;\n        this.logger.verbose({\n          message: `Faking missing \\`types\\` field in ${filePath} to be ${source}`,\n        });\n        return JSON.stringify(json);\n      }\n    }\n    return contents;\n  }\n\n  fileExists(filePath: FilePath): boolean {\n    if (this.redirectTypes.has(filePath)) {\n      return true;\n    } else {\n      return super.fileExists(filePath);\n    }\n  }\n\n  getSourceFile(\n    filePath: FilePath,\n    languageVersion: $Values<ScriptTarget>,\n  ): void | SourceFile {\n    let redirect = this.redirectTypes.get(filePath);\n    if (redirect != null) {\n      const sourceText = this.readFile(redirect);\n      return sourceText !== undefined\n        ? this.ts.createSourceFile(filePath, sourceText, languageVersion)\n        : undefined;\n    } else {\n      const sourceText = this.readFile(filePath);\n      return sourceText !== undefined\n        ? this.ts.createSourceFile(filePath, sourceText, languageVersion)\n        : undefined;\n    }\n  }\n\n  getDefaultLibFileName(options: CompilerOptions): string {\n    return this.ts.getDefaultLibFilePath(options);\n  }\n\n  writeFile(filePath: FilePath, content: string) {\n    if (path.extname(filePath) === '.map') {\n      this.outputMap = content;\n    } else {\n      this.outputCode = content;\n    }\n  }\n\n  getCanonicalFileName(fileName: FilePath): FilePath {\n    return this.ts.sys.useCaseSensitiveFileNames\n      ? fileName\n      : fileName.toLowerCase();\n  }\n\n  useCaseSensitiveFileNames(): boolean {\n    return this.ts.sys.useCaseSensitiveFileNames;\n  }\n\n  getNewLine(): string {\n    return this.ts.sys.newLine;\n  }\n}\n"
  },
  {
    "path": "packages/utils/ts-utils/src/FSHost.js",
    "content": "// @flow\nimport type {FileSystem} from '@parcel/fs';\nimport type {FilePath} from '@parcel/types';\nimport typeof TypeScriptModule from 'typescript'; // eslint-disable-line import/no-extraneous-dependencies\nimport path from 'path';\n\nexport class FSHost {\n  fs: FileSystem;\n  ts: TypeScriptModule;\n\n  constructor(fs: FileSystem, ts: TypeScriptModule) {\n    this.fs = fs;\n    this.ts = ts;\n  }\n\n  getCurrentDirectory: () => FilePath = () => {\n    return this.fs.cwd();\n  };\n\n  fileExists(filePath: FilePath): boolean {\n    try {\n      return this.fs.statSync(filePath).isFile();\n    } catch (err) {\n      return false;\n    }\n  }\n\n  readFile(filePath: FilePath): void | string {\n    try {\n      return this.fs.readFileSync(filePath, 'utf8');\n    } catch (err) {\n      if (err.code === 'ENOENT') {\n        return undefined;\n      }\n\n      throw err;\n    }\n  }\n\n  directoryExists(filePath: FilePath): boolean {\n    try {\n      return this.fs.statSync(filePath).isDirectory();\n    } catch (err) {\n      return false;\n    }\n  }\n\n  realpath(filePath: FilePath): FilePath {\n    try {\n      return this.fs.realpathSync(filePath);\n    } catch (err) {\n      return filePath;\n    }\n  }\n\n  getAccessibleFileSystemEntries(dirPath: FilePath): {|\n    directories: Array<FilePath>,\n    files: Array<FilePath>,\n  |} {\n    try {\n      let entries = this.fs.readdirSync(dirPath || '.').sort();\n      let files = [];\n      let directories = [];\n      for (let entry of entries) {\n        let filePath = path.join(dirPath, entry);\n\n        let stat;\n        try {\n          stat = this.fs.statSync(filePath);\n        } catch (e) {\n          continue;\n        }\n\n        if (stat.isFile()) {\n          files.push(entry);\n        } else if (stat.isDirectory()) {\n          directories.push(entry);\n        }\n      }\n\n      return {files, directories};\n    } catch (err) {\n      return {files: [], directories: []};\n    }\n  }\n\n  readDirectory(\n    root: FilePath,\n    extensions?: $ReadOnlyArray<string>,\n    excludes?: $ReadOnlyArray<string>,\n    includes?: $ReadOnlyArray<string>,\n    depth?: number,\n  ): any {\n    // $FlowFixMe[prop-missing]\n    return this.ts.matchFiles(\n      root,\n      extensions,\n      excludes,\n      includes,\n      this.ts.sys.useCaseSensitiveFileNames,\n      this.getCurrentDirectory(),\n      depth,\n      dirPath => this.getAccessibleFileSystemEntries(dirPath),\n      filePath => this.realpath(filePath),\n      dirPath => this.directoryExists(dirPath),\n    );\n  }\n}\n"
  },
  {
    "path": "packages/utils/ts-utils/src/LanguageServiceHost.js",
    "content": "// @flow\nimport type {FileSystem} from '@parcel/fs';\nimport type {FilePath} from '@parcel/types';\nimport typeof TypeScriptModule from 'typescript'; // eslint-disable-line import/no-extraneous-dependencies\nimport type {\n  CompilerOptions,\n  LanguageServiceHost as ILanguageServiceHost,\n  IScriptSnapshot,\n  ParsedCommandLine,\n} from 'typescript';\nimport {FSHost} from './FSHost';\n\n// the typings from flow-typed define the ILanguageServiceHost interface as\n// having its methods as properties with arrow functions. These should probably\n// be methods instead.\n// $FlowFixMe[method-unbinding]\nexport class LanguageServiceHost\n  extends FSHost\n  implements ILanguageServiceHost\n{\n  config: ParsedCommandLine;\n  files: {|[key: FilePath]: {|version: number|}|};\n\n  constructor(fs: FileSystem, ts: TypeScriptModule, config: ParsedCommandLine) {\n    super(fs, ts);\n    this.config = config;\n    this.files = {};\n  }\n\n  invalidate(fileName: FilePath) {\n    // When the typescript language server calls \"getScriptVersion\", it will normalize paths for cross-platform (e.g. C:\\myFile.ts on Windows becomes C:/myFile.ts). We need to do the same thing.\n    // $FlowFixMe getNormalizedAbsolutePath is missing from the flow-typed definition.\n    const normalizedFileName = this.ts.getNormalizedAbsolutePath(fileName);\n    const entry = this.files[normalizedFileName];\n\n    if (entry) {\n      entry.version++;\n    } else {\n      this.files[normalizedFileName] = {\n        version: 0,\n      };\n    }\n  }\n\n  getScriptFileNames(): Array<string> {\n    return this.config.fileNames;\n  }\n\n  getScriptVersion(fileName: FilePath): string {\n    return this.files[fileName] && this.files[fileName].version.toString();\n  }\n\n  getScriptSnapshot(fileName: string): IScriptSnapshot | void {\n    if (!this.fileExists(fileName)) {\n      return;\n    }\n\n    const content = this.readFile(fileName);\n\n    if (content) {\n      // $FlowFixMe\n      return this.ts.ScriptSnapshot.fromString(content);\n    }\n  }\n\n  getCompilationSettings(): CompilerOptions {\n    return this.config.options;\n  }\n\n  getDefaultLibFileName(projectOptions: any): string {\n    return this.ts.getDefaultLibFilePath(projectOptions);\n  }\n}\n"
  },
  {
    "path": "packages/utils/ts-utils/src/ParseConfigHost.js",
    "content": "// @flow\nimport type {FileSystem} from '@parcel/fs';\nimport type {FilePath} from '@parcel/types';\nimport typeof TypeScriptModule from 'typescript'; // eslint-disable-line import/no-extraneous-dependencies\nimport type {ParseConfigHost as IParseConfigHost} from 'typescript'; // eslint-disable-line import/no-extraneous-dependencies\nimport {FSHost} from './FSHost';\n\nexport class ParseConfigHost extends FSHost implements IParseConfigHost {\n  filesRead: Set<FilePath>;\n  useCaseSensitiveFileNames: boolean;\n\n  constructor(fs: FileSystem, ts: TypeScriptModule) {\n    super(fs, ts);\n    this.filesRead = new Set();\n    this.useCaseSensitiveFileNames = ts.sys.useCaseSensitiveFileNames;\n  }\n\n  readFile(filePath: FilePath): void | string {\n    this.filesRead.add(filePath);\n    return super.readFile(filePath);\n  }\n}\n"
  },
  {
    "path": "packages/utils/ts-utils/src/index.js",
    "content": "// @flow\nexport {FSHost} from './FSHost';\nexport {CompilerHost} from './CompilerHost';\nexport {ParseConfigHost} from './ParseConfigHost';\nexport {LanguageServiceHost} from './LanguageServiceHost';\nexport {loadTSConfig} from './loadTSConfig';\n"
  },
  {
    "path": "packages/utils/ts-utils/src/loadTSConfig.js",
    "content": "// @flow\nimport type {Config, PluginOptions} from '@parcel/types';\nimport {ParseConfigHost} from './ParseConfigHost';\nimport path from 'path';\nimport nullthrows from 'nullthrows';\nimport ts from 'typescript';\n\nexport async function loadTSConfig(\n  config: Config,\n  options: PluginOptions,\n): any {\n  let configResult = await config.getConfig(['tsconfig.json']);\n  if (!configResult) {\n    return;\n  }\n\n  let host = new ParseConfigHost(options.inputFS, ts);\n  let parsedConfig = ts.parseJsonConfigFileContent(\n    configResult.contents,\n    host,\n    path.dirname(nullthrows(configResult.filePath)),\n  );\n\n  // Add all of the extended config files to be watched\n  for (let file of host.filesRead) {\n    config.invalidateOnFileChange(path.resolve(file));\n  }\n\n  return parsedConfig.options;\n}\n"
  },
  {
    "path": "packages/validators/eslint/package.json",
    "content": "{\n  \"name\": \"@parcel/validator-eslint\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/EslintValidator.js\",\n  \"source\": \"src/EslintValidator.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\",\n    \"chalk\": \"^4.1.2\"\n  },\n  \"devDependencies\": {\n    \"eslint\": \"^8.57.1\"\n  },\n  \"peerDependencies\": {\n    \"eslint\": \"^6.0.0 || ^7.0.0 || ^8.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/validators/eslint/src/EslintValidator.js",
    "content": "// @flow\nimport {Validator} from '@parcel/plugin';\nimport {type DiagnosticCodeFrame, escapeMarkdown} from '@parcel/diagnostic';\nimport eslint from 'eslint';\nimport invariant from 'assert';\n\n// For eslint <8.0.0\nlet cliEngine = null;\n// For eslint >=8.0.0\nlet eslintEngine = null;\n\nexport default (new Validator({\n  async validate({asset}) {\n    if (!cliEngine && !eslintEngine) {\n      if (eslint.ESLint) {\n        eslintEngine = new eslint.ESLint({});\n      } else {\n        cliEngine = new eslint.CLIEngine({});\n      }\n    }\n    let code = await asset.getCode();\n\n    let results;\n    if (cliEngine != null) {\n      results = cliEngine.executeOnText(code, asset.filePath).results;\n    } else if (eslintEngine != null) {\n      results = await eslintEngine.lintText(code, {filePath: asset.filePath});\n    } else {\n      invariant(false);\n    }\n\n    let validatorResult = {\n      warnings: [],\n      errors: [],\n    };\n\n    for (let result of results) {\n      if (!result.errorCount && !result.warningCount) continue;\n\n      let codeframe: DiagnosticCodeFrame = {\n        filePath: asset.filePath,\n        code: result.source,\n        codeHighlights: result.messages.map(message => {\n          let start = {\n            line: message.line,\n            column: message.column,\n          };\n          return {\n            start,\n            // Parse errors have no ending\n            end:\n              message.endLine != null\n                ? {\n                    line: message.endLine,\n                    column: message.endColumn - 1,\n                  }\n                : start,\n            message: escapeMarkdown(message.message),\n          };\n        }),\n      };\n\n      let diagnostic = {\n        origin: '@parcel/validator-eslint',\n        message: `ESLint found **${result.errorCount}** __errors__ and **${result.warningCount}** __warnings__.`,\n        codeFrames: [codeframe],\n      };\n\n      if (result.errorCount > 0) {\n        validatorResult.errors.push(diagnostic);\n      } else {\n        validatorResult.warnings.push(diagnostic);\n      }\n    }\n\n    return validatorResult;\n  },\n}): Validator);\n"
  },
  {
    "path": "packages/validators/typescript/package.json",
    "content": "{\n  \"name\": \"@parcel/validator-typescript\",\n  \"version\": \"2.16.4\",\n  \"license\": \"MIT\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/parcel\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n  },\n  \"main\": \"lib/TypeScriptValidator.js\",\n  \"source\": \"src/TypeScriptValidator.js\",\n  \"engines\": {\n    \"node\": \">= 16.0.0\",\n    \"parcel\": \"^2.16.4\"\n  },\n  \"dependencies\": {\n    \"@parcel/diagnostic\": \"2.16.4\",\n    \"@parcel/plugin\": \"2.16.4\",\n    \"@parcel/ts-utils\": \"2.16.4\",\n    \"@parcel/types\": \"2.16.4\",\n    \"@parcel/utils\": \"2.16.4\"\n  },\n  \"devDependencies\": {\n    \"typescript\": \">=3.0.0\"\n  },\n  \"peerDependencies\": {\n    \"typescript\": \">=3.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/validators/typescript/src/TypeScriptValidator.js",
    "content": "// @flow\nimport type {\n  Asset,\n  ConfigResult,\n  PluginOptions,\n  ValidateResult,\n} from '@parcel/types';\nimport type {LanguageService, Diagnostic} from 'typescript'; // eslint-disable-line import/no-extraneous-dependencies\n\nimport path from 'path';\nimport ts from 'typescript';\nimport {type DiagnosticCodeFrame, escapeMarkdown} from '@parcel/diagnostic';\nimport {hashObject, loadConfig} from '@parcel/utils';\nimport {Validator} from '@parcel/plugin';\nimport {LanguageServiceHost, ParseConfigHost} from '@parcel/ts-utils';\n\nlet langServiceCache: {\n  [configHash: string]: {|\n    configHost: ParseConfigHost,\n    host: LanguageServiceHost,\n    service: LanguageService,\n  |},\n  ...\n} = {};\n\ntype TSValidatorConfig = {|\n  filepath: ?string,\n  baseDir: string,\n  configHash: string,\n  tsconfig: ConfigResult | null,\n|};\n\nexport default (new Validator({\n  async validateAll({\n    assets,\n    options,\n    resolveConfigWithPath,\n  }): Promise<Array<?ValidateResult>> {\n    // Build a collection that of all the LanguageServices related to files that just changed.\n    let servicesToValidate: Set<string> = new Set();\n    await Promise.all(\n      assets.map(async asset => {\n        let config = await getConfig(asset, options, resolveConfigWithPath);\n        let {configHash} = config;\n\n        // Create a languageService/host in the cache for the configuration if it doesn't already exist.\n        tryCreateLanguageService(config, asset, options);\n        if (!langServiceCache[configHash]) return;\n\n        // Invalidate the file with the LanguageServiceHost so Typescript knows it has changed.\n        langServiceCache[configHash].host.invalidate(asset.filePath);\n\n        servicesToValidate.add(configHash);\n      }),\n    );\n\n    // Ask typescript to analyze all changed programs and translate the results into ValidatorResult objects.\n    let validatorResults: Array<?ValidateResult> = [];\n    servicesToValidate.forEach(configHash => {\n      // Make sure that the filesystem being used by the LanguageServiceHost and ParseConfigHost is up-to-date.\n      // (This could change in the context of re-running tests, and probably also for other reasons).\n      langServiceCache[configHash].host.fs = options.inputFS;\n      langServiceCache[configHash].configHost.fs = options.inputFS;\n\n      let program = langServiceCache[configHash].service.getProgram();\n      if (!program) return;\n\n      let filesToCheck = program.getSourceFiles();\n      filesToCheck.forEach(sourceFile => {\n        let diagnostics = program.getSemanticDiagnostics(sourceFile);\n        validatorResults.push(\n          getValidateResultFromDiagnostics(sourceFile.fileName, diagnostics),\n        );\n      });\n    });\n\n    return validatorResults;\n  },\n}): Validator);\n\nasync function getConfig(\n  asset,\n  options,\n  resolveConfigWithPath,\n): Promise<TSValidatorConfig> {\n  let configNames = ['tsconfig.json'];\n  let tsconfig = await loadConfig(\n    asset.fs,\n    asset.filePath,\n    configNames,\n    options.projectRoot,\n  );\n  let configPath: ?string = await resolveConfigWithPath(\n    configNames,\n    asset.filePath,\n  );\n  let baseDir = configPath ? path.dirname(configPath) : options.projectRoot;\n  let configHash =\n    (tsconfig ? hashObject(tsconfig.config) : '') + '-' + baseDir;\n\n  return {\n    filepath: configPath,\n    baseDir,\n    configHash,\n    tsconfig: tsconfig?.config,\n  };\n}\n\n/** Tries to create a typescript language service instance in the cache if it doesn't already exist. */\nfunction tryCreateLanguageService(\n  config: TSValidatorConfig,\n  asset: Asset,\n  options: PluginOptions,\n): void {\n  if (config.tsconfig && !langServiceCache[config.configHash]) {\n    // In order to prevent race conditions where we accidentally create two language services for the same config,\n    // we need to re-check the cache to see if a service has been created while we were awaiting 'ts'.\n    if (!langServiceCache[config.configHash]) {\n      let configHost = new ParseConfigHost(options.inputFS, ts);\n      let parsedCommandLine = ts.parseJsonConfigFileContent(\n        config.tsconfig,\n        configHost,\n        config.baseDir,\n      );\n      const host = new LanguageServiceHost(\n        options.inputFS,\n        ts,\n        parsedCommandLine,\n      );\n      langServiceCache[config.configHash] = {\n        configHost,\n        host,\n        // $FlowFixMe[incompatible-variance]\n        // $FlowFixMe[incompatible-call]\n        service: ts.createLanguageService(host, ts.createDocumentRegistry()),\n      };\n    }\n  }\n}\n\n/** Translates semantic diagnostics (from TypeScript) into a ValidateResult that Parcel understands. */\nfunction getValidateResultFromDiagnostics(\n  filePath: string,\n  diagnostics: $ReadOnlyArray<Diagnostic>,\n): ValidateResult {\n  let validatorResult = {\n    warnings: [],\n    errors: [],\n  };\n\n  if (diagnostics.length > 0) {\n    for (let diagnostic of diagnostics) {\n      let filename = filePath;\n      let {file} = diagnostic;\n\n      let diagnosticMessage = escapeMarkdown(\n        typeof diagnostic.messageText === 'string'\n          ? diagnostic.messageText\n          : diagnostic.messageText.messageText,\n      );\n\n      let codeframe: ?DiagnosticCodeFrame;\n      if (file != null && diagnostic.start != null) {\n        let source = file.text || diagnostic.source;\n        if (file.fileName) {\n          filename = file.fileName;\n        }\n\n        if (source) {\n          let lineChar = file.getLineAndCharacterOfPosition(diagnostic.start);\n          let start = {\n            line: lineChar.line + 1,\n            column: lineChar.character + 1,\n          };\n          let end = {\n            line: start.line,\n            column: start.column + 1,\n          };\n\n          if (\n            typeof diagnostic.start === 'number' &&\n            typeof diagnostic.length === 'number'\n          ) {\n            let endCharPosition = file.getLineAndCharacterOfPosition(\n              diagnostic.start + diagnostic.length,\n            );\n\n            end = {\n              line: endCharPosition.line + 1,\n              column: endCharPosition.character + 1,\n            };\n          }\n\n          codeframe = {\n            filePath: filename,\n            code: source,\n            codeHighlights: [\n              {\n                start,\n                end,\n                message: diagnosticMessage,\n              },\n            ],\n          };\n        }\n      }\n\n      validatorResult.errors.push({\n        origin: '@parcel/validator-typescript',\n        message: diagnosticMessage,\n        codeFrames: codeframe ? [codeframe] : undefined,\n      });\n    }\n  }\n\n  return validatorResult;\n}\n"
  },
  {
    "path": "patches/@nodelib+fs.scandir+2.1.5.patch",
    "content": "diff --git a/node_modules/@nodelib/fs.scandir/out/constants.js b/node_modules/@nodelib/fs.scandir/out/constants.js\nindex 7e3d441..50bbdd9 100644\n--- a/node_modules/@nodelib/fs.scandir/out/constants.js\n+++ b/node_modules/@nodelib/fs.scandir/out/constants.js\n@@ -1,17 +1,3 @@\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n-exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;\n-const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');\n-if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {\n-    throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);\n-}\n-const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);\n-const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);\n-const SUPPORTED_MAJOR_VERSION = 10;\n-const SUPPORTED_MINOR_VERSION = 10;\n-const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;\n-const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;\n-/**\n- * IS `true` for Node.js 10.10 and greater.\n- */\n-exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;\n+exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = true;\n"
  },
  {
    "path": "rust-toolchain",
    "content": "stable\n"
  },
  {
    "path": "rustfmt.toml",
    "content": "edition = \"2024\"\ntab_spaces = 2\n"
  },
  {
    "path": "scripts/build-native.js",
    "content": "/* eslint-disable no-console */\nconst fs = require('fs');\nconst glob = require('fast-glob');\nconst path = require('path');\nconst {spawn, execSync} = require('child_process');\n\nlet release = process.argv.includes('--release');\nlet canary = process.argv.includes('--canary');\nlet wasm = process.argv.includes('--wasm');\n\nbuild();\n\nasync function build() {\n  if (process.env.CI && process.platform === 'darwin') {\n    setupMacBuild();\n  }\n\n  let packages = glob.sync('packages/*/*', {onlyFiles: false});\n  for (let pkg of packages) {\n    let pkgJSON;\n    try {\n      pkgJSON = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json')));\n      if (!wasm && !pkgJSON.napi) continue;\n      if (wasm && !pkgJSON.scripts?.['wasm:build-release']) continue;\n    } catch (err) {\n      continue;\n    }\n\n    console.log(`Building ${pkg}...`);\n    await new Promise((resolve, reject) => {\n      let args = [];\n      const prefix = wasm ? 'wasm:' : '';\n      if (release) {\n        args.push(prefix + 'build-release');\n      } else if (canary) {\n        args.push(prefix + 'build-canary');\n      } else {\n        args.push(prefix + 'build');\n      }\n      if (process.env.RUST_TARGET) {\n        args.push('--target', process.env.RUST_TARGET);\n      }\n\n      if (process.env.ZIG_GLIBC) {\n        args.push('--zig', '--zig-abi-suffix', process.env.ZIG_GLIBC);\n      }\n\n      let yarn = spawn('yarn', args, {\n        stdio: 'inherit',\n        cwd: pkg,\n        shell: true,\n      });\n\n      yarn.on('close', code => (code === 0 ? resolve() : reject()));\n    }).catch(() => process.exit(1));\n\n    if (pkgJSON.napi) {\n      for (let binding of glob.sync('*.node', {cwd: pkg, onlyFiles: false})) {\n        let match = binding.match(/^.*?\\.(.+?)\\.node$/);\n        if (match) {\n          fs.renameSync(path.join(pkg, binding), path.join(path.dirname(pkg), path.basename(pkg) + '-' + match[1], binding));\n        }\n      }\n    }\n  }\n}\n\n// This setup is necessary for cross-compilation for Apple Silicon in GitHub Actions.\nfunction setupMacBuild() {\n  // This forces Clang/LLVM to be used as a C compiler instead of GCC.\n  process.env.CC = execSync('xcrun -f clang', {encoding: 'utf8'}).trim();\n  process.env.CXX = execSync('xcrun -f clang++', {encoding: 'utf8'}).trim();\n\n  let sysRoot = execSync('xcrun --sdk macosx --show-sdk-path', {\n    encoding: 'utf8',\n  }).trim();\n  process.env.CFLAGS = `-isysroot ${sysRoot} -isystem ${sysRoot}`;\n  process.env.MACOSX_DEPLOYMENT_TARGET = '10.9';\n\n  if (process.env.RUST_TARGET === 'aarch64-apple-darwin') {\n    // Prevents the \"<jemalloc>: Unsupported system page size\" error when\n    // requiring parcel-node-bindings.darwin-arm64.node\n    process.env.JEMALLOC_SYS_WITH_LG_PAGE = 14;\n  }\n}\n"
  },
  {
    "path": "scripts/common.js",
    "content": "/* eslint-disable no-console */\nconst fs = require('fs');\nconst np = require('path');\nconst child_process = require('child_process');\n\n/**\n * Returns an object where\n *  key = path to project root\n *  value = parsed package.json\n */\nexports.findProjects = function findProjects(rootDir, files = {}) {\n  for (let file of fs.readdirSync(rootDir)) {\n    let projectPath = np.join(rootDir, file);\n    const stats = fs.statSync(projectPath);\n    if (stats && stats.isDirectory()) {\n      let packagePath = np.join(projectPath, 'package.json');\n      if (fs.existsSync(packagePath)) {\n        let pack = JSON.parse(fs.readFileSync(packagePath).toString());\n        files[projectPath] = pack;\n      } else {\n        findProjects(projectPath, files);\n      }\n    }\n  }\n\n  return files;\n};\n\n/**\n * Executes a command synchronously in the specified directory.\n */\nexports.exec = function exec(command, cwd) {\n  try {\n    console.log(`${cwd} ${command}`);\n    child_process.execSync(command, {cwd});\n  } catch (e) {\n    console.log(e.toString().slice(0, 50));\n  }\n};\n"
  },
  {
    "path": "scripts/link-all.js",
    "content": "#!/usr/bin/env node\n\n/* eslint-disable no-console */\n// links all packages that are interdependent within a directory recursively.\nlet args = process.argv.slice(2);\nif (args.length < 1) {\n  console.log(\n    `Usage:\n\n    link_all rootdir\n`,\n  );\n  process.exit(1);\n}\n\nconsole.log(\n  \"Yarn installing and linking all packages. Ignore any 'No registered package found errors'\",\n);\n\nconst rootDir = args[0];\nconst {findProjects, exec} = require('./common');\n\n//  all projects { [dirname]: package }\nlet projects = findProjects(rootDir);\n//  all project names\nlet names = new Set(Object.values(projects).map(pack => pack.name));\n//  first link all projects\nlet count = 0;\nfor (let path in projects) {\n  console.log(`${++count}/${names.size} setup ${path}`);\n  exec('yarn install && yarn unlink ; yarn link', path);\n}\ncount = 0;\n// then link to each other\nfor (let path in projects) {\n  let pack = projects[path];\n  console.log(`${++count}/${names.size} link ${path}`);\n  for (let dep in pack.dependencies || {}) {\n    if (names.has(dep)) {\n      exec(`yarn link ${dep}`, path);\n    }\n  }\n}\n"
  },
  {
    "path": "scripts/postinstall.js",
    "content": "/* eslint-disable no-console */\nconst fs = require('fs');\nconst path = require('path');\n\nif (shouldBuildNative()) {\n  require('./build-native');\n}\n\nfunction shouldBuildNative() {\n  try {\n    fs.statSync(path.join(__dirname, '..', 'packages/native-packages'));\n  } catch (e) {\n    console.log('Could not find linked native packages to build. Skipping...');\n    return false;\n  }\n  return true;\n}\n"
  },
  {
    "path": "scripts/swc-update-all.sh",
    "content": "#!/usr/bin/env bash\n\n# This bumps all swc crates in Cargo.lock to the latest version.\n# Before, update the swc_core version range in all Cargo.tomls to the latest version.\n\nset -eu\n\necho \"Listing all swc crates\"\n\nswc_crates=$(cargo metadata --format-version=1 --all-features | jq '.packages .[] | select(.repository == \"https://github.com/swc-project/swc.git\" or .repository == \"https://github.com/swc-project/plugins.git\") | .name' -r)\n\ncommand=\"cargo update\"\nfor crate in $swc_crates; do\n  command=\"$command -p $crate\"\ndone\n\necho \"Running: $command\"\neval $command\n"
  },
  {
    "path": "scripts/tag-release.mjs",
    "content": "/* eslint-disable no-console */\n\nimport {execSync} from 'node:child_process';\nimport {readFile} from 'node:fs/promises';\nimport {URL} from 'node:url';\n\nimport {program} from 'commander';\n\nasync function main(tag) {\n  let publishSummary = JSON.parse(\n    await readFile(\n      new URL('../lerna-publish-summary.json', import.meta.url).pathname,\n      'utf8',\n    ),\n  );\n\n  for (let {packageName, version} of publishSummary) {\n    execSync(`npm dist-tag add ${packageName}@${version} ${tag}`, {\n      encoding: 'utf8',\n    });\n  }\n}\n\nlet {tag} = program\n  // TODO Use requiredOption once commander is upgraded in the root\n  .option(\n    '--tag <tag>',\n    'The npm tag to add to every package published in the latest release',\n  )\n  .parse(process.argv)\n  .opts();\n\nif (!tag) {\n  throw new Error('Required option `tag` not specified');\n}\n\nmain(tag).then(() => {\n  console.log(`Successfully added @${tag} to released packages`);\n});\n"
  },
  {
    "path": "scripts/to-fs-fixture.js",
    "content": "#! /usr/bin/env node\n/* eslint-disable no-console */\n\nrequire('@parcel/babel-register');\n\nconst fs = require('node:fs').promises;\nconst path = require('node:path');\nconst {spawn, execSync} = require('node:child_process');\n\n/* eslint-disable import/no-extraneous-dependencies */\nconst commander = require('commander');\nconst inquirer = require('inquirer');\nconst chalk = require('chalk');\nconst diff = require('diff');\nconst nullthrows = require('nullthrows');\n\nconst {toFixture} = require('@parcel/test-utils/src/fsFixture');\nconst {isGlobMatch} = require('@parcel/utils/src/glob');\n/* eslint-enable import/no-extraneous-dependencies */\n\n/**\n * Some fixture dirs are organized in nested dirs, e.g.:\n *   integration/\n *     scope-hoisting/\n *       commonjs/\n *         fixture-dir/\n *\n * Keeping a list of these dirnames gives us a better chance of\n * identifying the fixture files without including extraneous files.\n */\nconst POSSIBLE_ROOTS = ['commonjs', 'es6', 'integration'];\n\n/**\n * A reciprocal pattern to `POSSIBLE_ROOTS` that is used\n * to rewrite fixture paths to match the new fs-fixture path.\n */\nconst ROOT_PATTERN =\n  /(\\/)?integration(?:\\/scope-hoisting\\/(?:(?:commonjs)|(?:es6)))?\\//;\n\n/** Where integration test fixtures are found */\nconst FIXTURE_PATH = path.resolve(\n  __dirname,\n  '../packages/core/integration-tests/test',\n);\n\n/** Where to insert the `overlayFS` argument for various test utils. */\nconst TEST_UTIL_ARITY = {\n  ncp: 3,\n  assertESMExports: 5,\n};\n\n/** A simple promisified exec(). */\nfunction execAsync(cmd) {\n  return new Promise((resolve, reject) => {\n    let child = spawn(cmd, {\n      stdio: 'inherit',\n      shell: true,\n    });\n\n    child.on('close', code => {\n      if (code !== 0) {\n        reject(new Error(`Exit code ${code}`));\n      } else {\n        resolve();\n      }\n    });\n  });\n}\n\n/** Pretty print a test fixture filepath. */\nfunction printPath(filePath) {\n  let root = path.resolve(\n    path.join(__dirname, '../packages/core/integration-tests/test'),\n  );\n  return chalk.blue(\n    path.relative(\n      root,\n      filePath.startsWith(root) ? filePath : path.join(root, filePath),\n    ),\n  );\n}\n\n/** Pretty print a code location. */\nfunction printLoc(loc) {\n  return chalk.dim(`${loc.start.line}:${loc.start.column}`);\n}\n\n/** Asserts that the given node is a test call expression. */\nfunction assertIsTest(file, test, api) {\n  let j = api.jscodeshift;\n\n  let it = test.find(j.CallExpression, {callee: {name: 'it'}});\n\n  if (it.length === 0) {\n    let loc = test.get('loc').value;\n    throw new Error(\n      `Expected an it() call at ${file.path}:${loc.start.line}:${loc.start.column}`,\n    );\n  }\n}\n\n/** Asserts that the given test is an async function declaration. */\nfunction assertIsAsyncTest(file, test, api) {\n  let j = api.jscodeshift;\n\n  assertIsTest(file, test, api);\n\n  let fn = test\n    .find(j.CallExpression, {callee: {name: 'it'}})\n    .get('arguments', 1).value;\n\n  if (\n    (fn.type !== 'FunctionExpression' &&\n      fn.type !== 'ArrowFunctionExpression') ||\n    !fn.async\n  ) {\n    throw new Error(\n      `Expected an async function at ${file.path}:${fn.loc.start.line}:${fn.loc.start.column}`,\n    );\n  }\n}\n\n/** Gets the test name as it might be presented by mocha. */\nfunction getTestName(test, api) {\n  let j = api.jscodeshift;\n  let it = test\n    .find(j.CallExpression, {callee: {name: 'it'}})\n    .get('arguments', 0).value.value;\n\n  let desc = [it];\n\n  let describe = test.closest(j.CallExpression, {callee: {name: 'describe'}});\n  while (describe.length > 0) {\n    desc.unshift(describe.get('arguments', 0).value.value);\n    describe = describe.closest(j.CallExpression, {callee: {name: 'describe'}});\n  }\n\n  return desc.join(' ');\n}\n\n/**\n * Find tests that contain fixture paths that contain `integration/`.\n * See `findFixturePaths` for more details.\n */\nfunction findTestsWithFixturePaths(root, api, options) {\n  const j = api.jscodeshift;\n\n  let testMap = new Map();\n  root\n    .find(j.ExpressionStatement, {expression: {callee: {name: 'it'}}})\n    .forEach(p => {\n      let test = j(p);\n      let fixturePaths = findFixturePaths(test, api, options);\n      if (\n        fixturePaths.literals.length > 0 ||\n        fixturePaths.templates.length > 0\n      ) {\n        testMap.set(test, fixturePaths);\n      }\n    });\n\n  return testMap;\n}\n\n/** Checks if the given fixture path matches any of the 'keep' globs. */\nfunction shouldKeepFixture(fixturePath, keep) {\n  if (keep == null) return false;\n  if (!Array.isArray(keep)) keep = [keep];\n  if (keep?.length) {\n    for (let glob of keep) {\n      if (isGlobMatch(fixturePath, glob, {bash: true})) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\n/** Checks if the given test name matches any of the 'grep' patterns. */\nfunction shouldTransformTest(testName, grep) {\n  if (grep == null) return true;\n  if (!Array.isArray(grep)) grep = [grep];\n  if (grep?.length) {\n    for (let pattern of grep) {\n      if (new RegExp(pattern).test(testName)) {\n        return true;\n      }\n    }\n  }\n}\n\n/**\n * Find fixture paths that contain `integration/`.\n *\n * Things we could find:\n *\n *   '/integration/...'\n *   __dirname + '/integration/...'\n *   path.join(__dirname, '/integration/...')\n *   `${__dirname}/integration/...`\n */\nfunction findFixturePaths(test, api, {verbose, keep}) {\n  let j = api.jscodeshift;\n  return {\n    literals: test.find(j.Literal).filter(p => {\n      let {value, loc} = p.value;\n      if (value?.includes?.('integration/')) {\n        if (shouldKeepFixture(value, keep)) {\n          if (verbose) {\n            console.log(\n              chalk.yellow(\n                `Skipping fixture path ${printPath(value)} at ${printLoc(\n                  loc,\n                )} because it matches a keep glob.`,\n              ),\n            );\n          }\n          return false;\n        }\n\n        if (verbose) {\n          console.log(\n            chalk.dim(\n              `Found fixture path ${printPath(p.value.value)} at ${printLoc(\n                loc,\n              )}`,\n            ),\n          );\n        }\n        return true;\n      }\n      return false;\n    }),\n    templates: test.find(j.TemplateElement).filter(p => {\n      let {value, loc} = p.value;\n      if (value?.cooked?.includes?.('integration/')) {\n        if (shouldKeepFixture(value.cooked, keep)) {\n          if (verbose) {\n            console.log(\n              chalk.yellow(\n                `Skipping fixture path ${printPath(value.cooked)} at ${printLoc(\n                  loc,\n                )} because it matches a keep glob.`,\n              ),\n            );\n          }\n          return false;\n        }\n\n        if (verbose) {\n          console.log(\n            chalk.dim(\n              `Found fixture path ${printPath(value.cooked)} at ${printLoc(\n                loc,\n              )}`,\n            ),\n          );\n        }\n        return true;\n      }\n      return false;\n    }),\n  };\n}\n\n/** Resolve a fixture path from a test to an absolute filepath. */\nfunction resolveFixturePath(value) {\n  let filePath = value;\n  let dirname = path.dirname(filePath);\n  while (POSSIBLE_ROOTS.every(root => path.basename(dirname) !== root)) {\n    if (filePath === dirname) {\n      throw new Error(\n        `Could not find one of ${POSSIBLE_ROOTS} in path: ${value}`,\n      );\n    }\n    filePath = dirname;\n    dirname = path.dirname(filePath);\n  }\n\n  filePath = path.resolve(path.join(FIXTURE_PATH, filePath));\n  return filePath;\n}\n\n/**\n * Given a set of nodes that specify fixture paths,\n * generates a map of fixture paths to the `fsFixture`\n * template string equivalents for the files in those paths.\n */\nasync function generateFsFixtures(fixturePaths, api, {verbose}) {\n  let toGenerate = [];\n\n  fixturePaths.literals.forEach(match => {\n    toGenerate.push(resolveFixturePath(match.get('value').value));\n  });\n\n  fixturePaths.templates.forEach(match => {\n    toGenerate.push(resolveFixturePath(match.get('value').value.cooked));\n  });\n\n  let fixtures = new Map();\n  for (let filePath of toGenerate) {\n    if (!fixtures.has(filePath)) {\n      try {\n        fixtures.set(filePath, await toFixture(fs, filePath, true));\n      } catch (e) {\n        if (e.code === 'ENOENT') {\n          if (verbose) {\n            console.log(\n              chalk.yellow(\n                `Skipping missing fixture path: ${printPath(filePath)}`,\n              ),\n            );\n          }\n          continue;\n        } else if (e.message.startsWith('Disallowed')) {\n          if (verbose) {\n            console.log(\n              chalk.yellow(\n                `Skipping fixture path with disallowed filetypes: ${printPath(\n                  filePath,\n                )}`,\n              ),\n            );\n          }\n          continue;\n        } else if (e.message.startsWith('File too large')) {\n          if (verbose) {\n            console.log(\n              chalk.yellow(\n                `Skipping fixture path with large file(s): ${printPath(\n                  filePath,\n                )}`,\n              ),\n            );\n          }\n          continue;\n        }\n        throw e;\n      }\n    }\n  }\n\n  return fixtures;\n}\n\n/** Print a diff of the test before and after the transform. */\nasync function printDiff(testName, testString, api, options) {\n  let j = api.jscodeshift;\n  let test = j(testString);\n  // Suppress redundant verbose output while generating the diff.\n  let opts = {...options, verbose: false};\n  let fixturePaths = findFixturePaths(test, api, opts);\n  let fixtures = await generateFsFixtures(fixturePaths, api, opts);\n  if (fixtures.size) {\n    insertFsFixtures(test, fixtures, api, opts);\n    replaceInputFS(test, api, opts);\n    replaceFixturePaths(fixturePaths, api, opts);\n    console.log(\n      diff\n        .createTwoFilesPatch('before', 'after', testString, test.toSource())\n        .split('\\n')\n        .map(line => {\n          if (/^\\++ /.test(line)) {\n            return chalk.green(line);\n          } else if (/^-+ /.test(line)) {\n            return chalk.red(line);\n          } else if (/^@+ /.test(line)) {\n            return chalk.black(line);\n          }\n          return line;\n        })\n        .join('\\n'),\n    );\n  }\n}\n\n/**\n * Replaces the fixture paths in the test with the paths\n * used in the generated `fsFixture` template string.\n */\nfunction replaceFixturePaths(fixturePaths, api) {\n  let j = api.jscodeshift;\n\n  for (let match of fixturePaths.literals.paths().map(p => j(p))) {\n    match.replaceWith(p => p.value.raw.replace(ROOT_PATTERN, '$1'));\n  }\n\n  for (let match of fixturePaths.templates.paths().map(p => j(p))) {\n    // TODO: Update the path. this probably isn't the right way?\n    match.replaceWith(p => p.value.value.cooked.replace(ROOT_PATTERN, '$1'));\n  }\n}\n\n/**\n * Where possible, specifies `overlayFS` as the input fs for the test.\n *\n * For example, in a test that uses the `bundle` test util, the options\n * to the `bundle` call will be updated to use `overlayFS` as the input fs,\n * unless already specified.\n * */\nfunction replaceInputFS(test, {jscodeshift: j}, {verbose}) {\n  let shouldReplace = false;\n  test.find(j.CallExpression).forEach(node => {\n    let {loc, arguments: args, callee} = node.value;\n    let name = callee?.name;\n    switch (name) {\n      case 'bundle':\n      case 'bundler': {\n        let options = args[1];\n        if (options) {\n          if (options.type === 'Identifier') {\n            args[1] = j.objectExpression([\n              j.property(\n                'init',\n                j.identifier('inputFS'),\n                j.identifier('overlayFS'),\n              ),\n              j.spreadElement(options),\n            ]);\n            if (verbose) {\n              console.log(\n                chalk.dim(\n                  `Adding ${chalk.yellow(\n                    'inputFS: overlayFS',\n                  )} option arg to ${chalk.yellow(name)} call at ${printLoc(\n                    loc,\n                  )}`,\n                ),\n              );\n            }\n          } else {\n            if (options.type !== 'ObjectExpression') {\n              throw new Error(\n                `Expected options to be an object, but saw ${options.type}`,\n              );\n            }\n            let inputFS = options.properties.find(\n              prop => prop.key.name === 'inputFS',\n            );\n            if (!inputFS) {\n              shouldReplace = true;\n              options.properties.push(\n                j.property(\n                  'init',\n                  j.identifier('inputFS'),\n                  j.identifier('overlayFS'),\n                ),\n              );\n              if (verbose) {\n                console.log(\n                  chalk.dim(\n                    `Adding ${chalk.yellow(\n                      'inputFS: overlayFS',\n                    )} option to ${chalk.yellow(name)} call at ${printLoc(\n                      loc,\n                    )}`,\n                  ),\n                );\n              }\n            } else if (verbose) {\n              console.log(\n                chalk.yellow(\n                  `Skipping ${name} call at ${printLoc(\n                    loc,\n                  )} because it already had an inputFS option.`,\n                ),\n              );\n            }\n          }\n        } else {\n          shouldReplace = true;\n          args[1] = j.objectExpression([\n            j.property(\n              'init',\n              j.identifier('inputFS'),\n              j.identifier('overlayFS'),\n            ),\n          ]);\n          if (verbose) {\n            console.log(\n              chalk.dim(\n                `Adding ${chalk.yellow(\n                  'inputFS: overlayFS',\n                )} option arg to ${chalk.yellow(name)} call at ${printLoc(\n                  loc,\n                )}`,\n              ),\n            );\n          }\n        }\n        break;\n      }\n      case 'assertESMExports':\n      case 'ncp': {\n        let arity = nullthrows(TEST_UTIL_ARITY[name]);\n        if (arity != null && args.length < arity) {\n          while (args.length < arity - 1) {\n            args.push(j.literal(null));\n          }\n          args.push(j.identifier('overlayFS'));\n          if (verbose) {\n            console.log(\n              chalk.dim(\n                `Adding ${chalk.yellow('overlayFS')} argument to ${chalk.yellow(\n                  name,\n                )} call at ${printLoc(loc)}`,\n              ),\n            );\n          }\n        } else if (verbose) {\n          console.log(\n            chalk.yellow(\n              `Skipping ${name} call at ${printLoc(\n                loc,\n              )} because it already has an fs argument.`,\n            ),\n          );\n        }\n        break;\n      }\n    }\n  });\n\n  if (shouldReplace) {\n    test.find(j.Identifier, {name: 'inputFS'}).forEach(path => {\n      if (path.parentPath.value.type === 'Property') return;\n      if (verbose) {\n        console.log(\n          chalk.dim(\n            `Replacing ${chalk.yellow('inputFS')} with ${chalk.yellow(\n              'overlayFS',\n            )} at ${printLoc(path.value.loc)}`,\n          ),\n        );\n      }\n      path.value.name = 'overlayFS';\n    });\n  }\n}\n\n/** Adds imports for `fsFixture` and `overlayFS`. */\nfunction insertFsFixtureImport(root, api) {\n  let j = api.jscodeshift;\n  // Insert import for fsFixture\n  let testUtils = root.find(j.ImportDeclaration, {\n    source: {value: '@parcel/test-utils'},\n  });\n\n  if (testUtils.length === 0) {\n    root.find(j.ImportDeclaration).at(-1).insertAfter(`\n        import {fsFixture, overlayFS} from '@parcel/test-utils';\n      `);\n  } else {\n    let specifiers = testUtils.find(j.Specifier);\n    if (!specifiers.paths().some(p => p.value.imported.name === 'fsFixture')) {\n      specifiers\n        .at(-1)\n        .insertAfter(j.importSpecifier(j.identifier('fsFixture')));\n    }\n    if (!specifiers.paths().some(p => p.value.imported.name === 'overlayFS')) {\n      specifiers\n        .at(-1)\n        .insertAfter(j.importSpecifier(j.identifier('overlayFS')));\n    }\n  }\n}\n\n/** Prints the `fsFixture` template string. */\nfunction printFsFixture(fixtures) {\n  return `await fsFixture(overlayFS, __dirname)\\`\\n${[...fixtures.values()]\n    .map(fixture =>\n      fixture\n        .toString()\n        .trim()\n        .split('\\n')\n        .map(l => `  ${l}`)\n        .join('\\n'),\n    )\n    .join('\\n')}\\`;`;\n}\n\n/** Adds fsFixture declaration expressions to the test. */\nfunction insertFsFixtures(test, fixtures, api) {\n  let j = api.jscodeshift;\n  let firstBodyNode = test\n    .find(j.CallExpression, {callee: {name: 'it'}})\n    .find(j.BlockStatement)\n    .get('body', 0);\n  firstBodyNode.insertBefore(printFsFixture(fixtures));\n}\n\n/** Prompts the user to transform a test. Noop if `yes` is true. */\nasync function promptToTransformFixtures(testName, {yes}) {\n  if (yes) return true;\n  let {result} = await inquirer.prompt({\n    type: 'expand',\n    name: 'result',\n    message: `Transform ${chalk.blue(testName)}`,\n    default: 0,\n    choices: [\n      {key: 'y', name: 'transform this test', value: true},\n      {key: 'n', name: 'do not transform this test', value: false},\n      {key: 'a', name: 'transform remaining tests in the file', value: 'all'},\n      {key: 'd', name: 'skip remaining tests in the file', value: 'none'},\n      {key: 'v', name: 'view the diff for this test', value: 'view'},\n    ],\n  });\n  return result;\n}\n\n/**\n * Finds all tests that use fs fixtures and converts them to use fsFixture.\n *\n * This is the transform that jscodeshift will run on each file.\n */\nasync function transform(file, api, options) {\n  const j = api.jscodeshift;\n  const root = j(file.source);\n\n  // Manage a local copy of options so we can modify it iteratively.\n  let opts = {...options, dryRun: options.dryRun ?? options.dry};\n  let hasTransformedFixtures = false;\n\n  // Manage a stack of tests so we can interactively transform them,\n  // e.g., view the diff, then decide to transform or not.\n  let tests = [...findTestsWithFixturePaths(root, api, opts)].reverse();\n\n  let printedDiff = new Set();\n  outer: while (tests.length) {\n    let [test, fixturePaths] = tests.pop();\n    let testName = getTestName(test, api);\n\n    if (!shouldTransformTest(testName, opts.grep)) {\n      if (opts.verbose) {\n        console.log(\n          chalk.yellow(\n            `Skipping ${chalk.blue(\n              testName,\n            )} because it does not match grep patterns.`,\n          ),\n        );\n      }\n      continue;\n    }\n\n    assertIsAsyncTest(file, test, api);\n\n    if (opts.verbose && (!opts.yes || opts.dryRun) && !printedDiff.has(test)) {\n      await printDiff(testName, test.toSource(), api, opts);\n    }\n    printedDiff.add(test);\n\n    switch (await promptToTransformFixtures(testName, opts)) {\n      case true: {\n        let fixtures = await generateFsFixtures(fixturePaths, api, opts);\n        if (fixtures.size) {\n          insertFsFixtures(test, fixtures, api, opts);\n          replaceInputFS(test, api, opts);\n          replaceFixturePaths(fixturePaths, api, opts);\n\n          hasTransformedFixtures = true;\n\n          // Report converted fixture filePaths for cleanup.\n          for (let fixturePath of fixtures.keys()) {\n            process.send?.({type: 'fixture', filePath: file.path, fixturePath});\n          }\n\n          // Also report the test scope so we know which tests need to be run.\n          process.send?.({type: 'test', filePath: file.path, testName});\n        }\n        break;\n      }\n      case 'all': {\n        opts.yes = true;\n        tests.push([test, fixturePaths]);\n        break;\n      }\n      case 'none': {\n        break outer;\n      }\n      case 'view': {\n        await printDiff(testName, test.toSource(), api, opts);\n        tests.push([test, fixturePaths]);\n        break;\n      }\n    }\n  }\n\n  if (hasTransformedFixtures) {\n    insertFsFixtureImport(root, api, options);\n    // Only return something if we changed something.\n    return root.toSource();\n  }\n}\n\nmodule.exports = transform;\nmodule.exports.parser = 'flow';\n\n/**\n * Runs jscodeshift to apply `transform` to `file`.\n * Collects the results of the transform and resolves to them when complete.\n */\nfunction runJsCodeshift(file, {dryRun, verbose, yes, keep, grep}) {\n  return new Promise((resolve, reject) => {\n    let results = {\n      /** A set of fixture paths that were converted. */\n      fixturesToCleanup: new Set(),\n      /** A set of test names that were modified. */\n      testsToVerify: new Set(),\n    };\n\n    let args = ['--run-in-band', '--parser=flow'];\n    if (dryRun) args.push('--dry');\n    if (verbose) args.push('--verbose=2');\n    if (yes) args.push('--yes');\n    if (keep?.length) args = args.concat(keep.map(k => `--keep \"${k}\"`));\n    if (grep?.length) args = args.concat(grep.map(g => `--grep \"${g}\"`));\n    args.push(`--transform=${__filename}`);\n    args = args.concat(file);\n\n    if (verbose) {\n      console.log(chalk.dim(`jscodeshift ${args.join(' ')}`));\n    }\n\n    const jscodeshift = spawn('jscodeshift', args, {\n      env: {FORCE_COLOR: 'true', ...process.env},\n      stdio: ['inherit', 'inherit', 'inherit', 'ipc'],\n      shell: true,\n    });\n\n    jscodeshift.on('message', event => {\n      switch (event.type) {\n        case 'fixture': {\n          results.fixturesToCleanup.add(event.fixturePath);\n          break;\n        }\n        case 'test': {\n          results.testsToVerify.add(event.testName);\n          break;\n        }\n        default: {\n          console.error(`Unknown event type: ${event.type}`);\n        }\n      }\n    });\n\n    jscodeshift.on('close', code => {\n      if (code !== 0) {\n        reject(new Error(`Exit code ${code}`));\n      } else {\n        resolve(results);\n      }\n    });\n  });\n}\n\n/** Cleans up old fixtures that were replaced by the transform. */\nasync function cleanupFixtures(fixturesToCleanup, {cleanup, dryRun, verbose}) {\n  if (!cleanup || fixturesToCleanup.size === 0) {\n    return;\n  }\n\n  console.log(\n    chalk.yellow(`Cleaning up ${fixturesToCleanup.size} fixtures...`),\n  );\n\n  for (let fixture of fixturesToCleanup) {\n    if (dryRun) {\n      console.log(chalk.green(`Would remove ${printPath(fixture)}`));\n      continue;\n    }\n\n    if (verbose) {\n      console.log(chalk.red(`Removing ${printPath(fixture)}`));\n    }\n\n    try {\n      await fs.rm(fixture, {recursive: true});\n    } catch (err) {\n      console.error(err);\n    }\n  }\n}\n\n/** Reports the results of the transforms. */\nfunction reportResults({fixturesToCleanup, testsToVerify}, options) {\n  if (fixturesToCleanup.size && !options.cleanup) {\n    console.log(\n      chalk.yellow(\n        `\\nThe following fixtures would've been removed with --cleanup:`,\n      ),\n    );\n    for (let fixture of fixturesToCleanup) {\n      console.log(chalk.yellow(`  ${printPath(fixture)}`));\n    }\n  }\n\n  if (testsToVerify.size === 0) {\n    console.log(\n      chalk.green(`\\nNo tests were modified. No need to verify any tests.`),\n    );\n    return;\n  }\n\n  for (let [filename, tests] of testsToVerify) {\n    console.log(\n      chalk.green(\n        `\\nPlease verify that ${chalk.blue(filename)} still passes all tests.`,\n      ),\n    );\n    if (options.verbose) {\n      if (options.dryRun) {\n        console.log(chalk.dim(`Tests that would've been modified:`));\n      } else {\n        console.log(chalk.dim(`Tests that were modified:`));\n      }\n      for (let test of tests) {\n        console.log(chalk.dim(`  ${test}`));\n      }\n    }\n  }\n}\n\n/** Bootstraps jscodeshift and runs the transform. */\nfunction bootstrap(files, {parent: options}) {\n  let cmd = 'npx --package jscodeshift';\n\n  let npxVersion = execSync('npx -v');\n  if (parseInt(npxVersion.toString().split('.').shift(), 10) > 6) {\n    cmd = `${cmd} --yes`;\n  }\n\n  // Bootstrap jscodeshift and rerun this script as a jscodeshift transform.\n  let args = ['run'];\n  if (options.cleanup) args.push('--cleanup');\n  if (options.dryRun) args.push('--dry-run');\n  if (options.verbose) args.push('--verbose');\n  if (options.yes) args.push('--yes');\n  if (options.keep) args = args.concat(options.keep.map(k => `--keep \"${k}\"`));\n  if (options.grep) args = args.concat(options.grep.map(g => `--grep \"${g}\"`));\n  args.push('--');\n  args = args.concat(files);\n  args = args.join(' ');\n\n  if (options.verbose) {\n    console.log(chalk.dim(`${cmd} -c '${__filename} ${args}'`));\n  }\n  return execAsync(`${cmd} -c '${__filename} ${args}'`);\n}\n\n/** Runs the transform and optionally cleans up and verifies the results. */\nasync function run(files, {parent: options}) {\n  let opts = {\n    cleanup: Boolean(options.cleanup),\n    dryRun: Boolean(options.dryRun),\n    keep: options.keep,\n    grep: options.grep,\n    verbose: Boolean(options.verbose) || Boolean(options.dryRun),\n    yes: Boolean(options.yes),\n  };\n\n  let fixturesToCleanup = new Set();\n  let testsToVerify = new Map();\n\n  for (let file of files) {\n    let results = await runJsCodeshift(file, opts);\n    for (let fixture of results.fixturesToCleanup) {\n      fixturesToCleanup.add(fixture);\n    }\n    testsToVerify.set(file, results.testsToVerify);\n  }\n\n  await cleanupFixtures(fixturesToCleanup, opts);\n  reportResults({fixturesToCleanup, testsToVerify}, opts);\n}\n\nif (require.main === module) {\n  let program = new commander.Command();\n  program\n    .arguments('<files...>')\n    .usage('[options] <files...>')\n    .description('Convert test files to use fsFixture.', {\n      files: 'One or more files to be transformed in-place. Required.',\n    })\n    .option('--cleanup', 'Cleanup old fixtures after running')\n    .option('--dry-run', 'Dry run (implies --verbose)')\n    .option(\n      '--grep <pattern>',\n      'Only transform tests matching this pattern. Can be repeated.',\n      (v, a) => a.concat(v),\n      [],\n    )\n    .option(\n      '--keep <glob>',\n      'Keep fixtures matching glob. Can be repeated.',\n      (v, a) => a.concat(v),\n      [],\n    )\n    .option('--verbose', 'Verbose output')\n    .option('--yes', 'Say yes to all prompts');\n\n  program.command('bootstrap <files...>', {noHelp: true}).action(bootstrap);\n  program.command('run <files...>', {noHelp: true}).action(run);\n\n  let args = process.argv;\n  if (!args.includes('--help') && !args.includes('-h')) {\n    if (!args[2] || !program.commands.some(c => c.name() === args[2])) {\n      args.splice(2, 0, 'bootstrap');\n    }\n  }\n\n  program.parse(args);\n}\n"
  },
  {
    "path": "scripts/unlink-all.js",
    "content": "#!/usr/bin/env node\n\n// unlinks all packages and deletes their node_modules folders\n/* eslint-disable no-console */\nlet args = process.argv.slice(2);\nif (args.length < 1) {\n  console.log(\n    `Usage:\n\n    unlink_all rootdir\n`,\n  );\n  process.exit(1);\n}\n\nconst rootDir = args[0];\nconst {findProjects, exec} = require('./common');\n\n//  all projects { [dirname]: package }\nlet projects = findProjects(rootDir);\n//  all project names\nlet names = new Set(Object.values(projects).map(pack => pack.name));\n//  clean all project node_modules folders.\nlet count = 0;\nfor (let path in projects) {\n  console.log(`${++count}/${names.size} unlinking ${path}`);\n  exec('yarn unlink ; rimraf node_modules', path);\n}\n"
  },
  {
    "path": "scripts/update-config-dependencies.js",
    "content": "const fs = require('fs');\nconst path = require('path');\nconst exec = require('child_process').execSync;\n\nlet packages = JSON.parse(\n  exec(\n    `${path.join(__dirname, '..', 'node_modules', '.bin', 'lerna')} ls --json`,\n  ),\n);\nlet packageVersions = new Map(packages.map(pkg => [pkg.name, pkg.version]));\n\nlet configsDir = path.join(__dirname, '..', 'packages', 'configs');\nlet configs = fs.readdirSync(configsDir);\nfor (let config of configs) {\n  let configPkgPath = path.join(configsDir, config, 'package.json');\n  let pkg = JSON.parse(fs.readFileSync(configPkgPath, 'utf8'));\n  if (pkg.parcelDependencies) {\n    for (let dep in pkg.parcelDependencies) {\n      let version = packageVersions.get(dep);\n      if (!version) {\n        throw new Error(`Unknown parcel dependency ${dep}`);\n      }\n\n      pkg.parcelDependencies[dep] = version;\n    }\n\n    fs.writeFileSync(configPkgPath, JSON.stringify(pkg, null, 2) + '\\n');\n  }\n}\n"
  },
  {
    "path": "scripts/update-engines-peerdeps.js",
    "content": "const fs = require('fs');\nconst path = require('path');\nconst exec = require('child_process').execSync;\n\nlet packages = JSON.parse(\n  exec(\n    `${path.join(__dirname, '..', 'node_modules', '.bin', 'lerna')} ls  --json`,\n  ),\n);\nlet packageVersions = new Map(\n  packages.map(pkg => [\n    pkg.name,\n    {version: pkg.version, location: pkg.location},\n  ]),\n);\nlet coreVersion = packageVersions.get('@parcel/core').version;\nlet coreRange =\n  coreVersion.includes('nightly') || process.argv.includes('--exact')\n    ? coreVersion\n    : `^${coreVersion}`;\n\nfor (let [, {location}] of packageVersions) {\n  let pkgPath = path.join(location, 'package.json');\n  let pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));\n  if (pkg.engines?.parcel != null) {\n    pkg.engines.parcel = coreRange;\n    fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\\n');\n  }\n  if (pkg.peerDependencies?.['@parcel/core'] != null) {\n    pkg.peerDependencies['@parcel/core'] = coreRange;\n    fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\\n');\n  }\n}\n"
  },
  {
    "path": "verdaccio.yml",
    "content": "storage: .verdaccio_storage\n\nauth:\n  htpasswd:\n    file: ./htpasswd\n    max_users: -1\n\nuplinks:\n  npmjs:\n    url: https://registry.npmjs.org/\n\npackages:\n  '@parcel/watcher':\n    access: $all\n    publish: $authenticated\n    unpublish: $authenticated\n    proxy: npmjs\n\n  '@parcel/source-map':\n    access: $all\n    publish: $authenticated\n    unpublish: $authenticated\n    proxy: npmjs\n\n  '@parcel/*':\n    access: $all\n    publish: $all\n    unpublish: $all\n\n  'parcel':\n    access: $all\n    publish: $all\n    unpublish: $all\n\n  '**':\n    access: $all\n    publish: $authenticated\n    unpublish: $authenticated\n    proxy: npmjs\n\nserver:\n  keepAliveTimeout: 60\n\npublish:\n  allow_offline: true\n\nlogs:\n  - {\n      type: file,\n      path: .verdaccio_storage/verdaccio.log,\n      format: pretty,\n      level: info,\n    }\n"
  },
  {
    "path": "verdaccioPublish.js",
    "content": "const {execSync} = require('child_process');\nconst fs = require('fs');\nconst path = require('path');\n\nconst run = cmd => execSync(cmd, {encoding: 'utf8', cwd: __dirname});\nconst bin = cmd => path.join(__dirname, 'node_modules/.bin', cmd);\n\nconst sha = run('git rev-parse --short HEAD').trim();\nconst version = JSON.parse(\n  fs.readFileSync(\n    path.join(__dirname, 'packages/core/core/package.json'),\n    'utf8',\n  ),\n).version;\n\ntry {\n  run(\n    `${bin(\n      'lerna',\n    )} version -y --no-push --no-git-tag-version --exact ${version}-${sha}`,\n  );\n\n  run(`git add .`);\n  run(`git commit -m 'Temp' --no-verify`);\n\n  run(\n    `${bin('lerna')} publish -y --registry http://localhost:4000 from-package`,\n  );\n} finally {\n  execSync(`git reset --hard ${sha}`);\n}\n"
  }
]